Guest User

git diff

a guest
Feb 27th, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 61.46 KB | None | 0 0
  1. elixir@ubuntu:~/lo$ git diff --color
  2. diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
  3. index c734642..1a31330 100644
  4. --- a/basctl/source/basicide/bastype3.cxx
  5. +++ b/basctl/source/basicide/bastype3.cxx
  6. @@ -221,7 +221,7 @@ SbxVariable* TreeListBox::FindVariable( SvTreeListEntry* pEntry )
  7. // extract the module name from the string like "Sheet1 (Example1)"
  8. if( bDocumentObjects )
  9. {
  10. - sal_uInt16 nIndex = 0;
  11. + sal_Int32 nIndex = 0;
  12. aName = aName.GetToken( 0, ' ', nIndex );
  13. }
  14. pVar = static_cast<StarBASIC*>(pVar)->FindModule( aName );
  15. diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
  16. index cb843d6..f172160 100644
  17. --- a/basctl/source/basicide/macrodlg.cxx
  18. +++ b/basctl/source/basicide/macrodlg.cxx
  19. @@ -355,7 +355,7 @@ SbMethod* MacroChooser::CreateMacro()
  20. // extract the module name from the string like "Sheet1 (Example1)"
  21. if( aDesc.GetLibSubName() == IDE_RESSTR(RID_STR_DOCUMENT_OBJECTS) )
  22. {
  23. - sal_uInt16 nIndex = 0;
  24. + sal_Int32 nIndex = 0;
  25. aModName = aModName.GetToken( 0, ' ', nIndex );
  26. }
  27. pModule = pBasic->FindModule( aModName );
  28. @@ -663,7 +663,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
  29. // extract the module name from the string like "Sheet1 (Example1)"
  30. if( aDesc.GetLibSubName() == IDE_RESSTR(RID_STR_DOCUMENT_OBJECTS) )
  31. {
  32. - sal_uInt16 nIndex = 0;
  33. + sal_Int32 nIndex = 0;
  34. aMod = aMod.GetToken( 0, ' ', nIndex );
  35. }
  36. String aSub( aDesc.GetMethodName() );
  37. diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
  38. index 7bfbbf5..cc3bcc0 100644
  39.  
  40. [4]+ Stopped git diff --color
  41. elixir@ubuntu:~/lo$ git diff
  42. diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
  43. index c734642..1a31330 100644
  44. --- a/basctl/source/basicide/bastype3.cxx
  45. +++ b/basctl/source/basicide/bastype3.cxx
  46. @@ -221,7 +221,7 @@ SbxVariable* TreeListBox::FindVariable( SvTreeListEntry* pEntry )
  47. // extract the module name from the string like "Sheet1 (Example1)"
  48. if( bDocumentObjects )
  49. {
  50. - sal_uInt16 nIndex = 0;
  51. + sal_Int32 nIndex = 0;
  52. aName = aName.GetToken( 0, ' ', nIndex );
  53. }
  54. pVar = static_cast<StarBASIC*>(pVar)->FindModule( aName );
  55. diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
  56. index cb843d6..f172160 100644
  57. --- a/basctl/source/basicide/macrodlg.cxx
  58. +++ b/basctl/source/basicide/macrodlg.cxx
  59. @@ -355,7 +355,7 @@ SbMethod* MacroChooser::CreateMacro()
  60. // extract the module name from the string like "Sheet1 (Example1)"
  61. if( aDesc.GetLibSubName() == IDE_RESSTR(RID_STR_DOCUMENT_OBJECTS) )
  62. {
  63. - sal_uInt16 nIndex = 0;
  64. + sal_Int32 nIndex = 0;
  65. aModName = aModName.GetToken( 0, ' ', nIndex );
  66. }
  67. pModule = pBasic->FindModule( aModName );
  68. @@ -663,7 +663,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
  69. // extract the module name from the string like "Sheet1 (Example1)"
  70. if( aDesc.GetLibSubName() == IDE_RESSTR(RID_STR_DOCUMENT_OBJECTS) )
  71. {
  72. - sal_uInt16 nIndex = 0;
  73. + sal_Int32 nIndex = 0;
  74. aMod = aMod.GetToken( 0, ' ', nIndex );
  75. }
  76. String aSub( aDesc.GetMethodName() );
  77. diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
  78. index 7bfbbf5..cc3bcc0 100644
  79.  
  80. [5]+ Stopped git diff
  81. elixir@ubuntu:~/lo$ git diff --color
  82. diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
  83. index c734642..1a31330 100644
  84. --- a/basctl/source/basicide/bastype3.cxx
  85. +++ b/basctl/source/basicide/bastype3.cxx
  86. @@ -221,7 +221,7 @@ SbxVariable* TreeListBox::FindVariable( SvTreeListEntry* pEntry )
  87. // extract the module name from the string like "Sheet1 (Example1)"
  88. if( bDocumentObjects )
  89. {
  90. - sal_uInt16 nIndex = 0;
  91. + sal_Int32 nIndex = 0;
  92. aName = aName.GetToken( 0, ' ', nIndex );
  93. }
  94. pVar = static_cast<StarBASIC*>(pVar)->FindModule( aName );
  95. diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
  96. index cb843d6..f172160 100644
  97. --- a/basctl/source/basicide/macrodlg.cxx
  98. +++ b/basctl/source/basicide/macrodlg.cxx
  99. @@ -355,7 +355,7 @@ SbMethod* MacroChooser::CreateMacro()
  100. // extract the module name from the string like "Sheet1 (Example1)"
  101. if( aDesc.GetLibSubName() == IDE_RESSTR(RID_STR_DOCUMENT_OBJECTS) )
  102. {
  103. - sal_uInt16 nIndex = 0;
  104. + sal_Int32 nIndex = 0;
  105. aModName = aModName.GetToken( 0, ' ', nIndex );
  106. }
  107. pModule = pBasic->FindModule( aModName );
  108. @@ -663,7 +663,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
  109. // extract the module name from the string like "Sheet1 (Example1)"
  110. if( aDesc.GetLibSubName() == IDE_RESSTR(RID_STR_DOCUMENT_OBJECTS) )
  111. {
  112. - sal_uInt16 nIndex = 0;
  113. + sal_Int32 nIndex = 0;
  114. aMod = aMod.GetToken( 0, ' ', nIndex );
  115. }
  116. String aSub( aDesc.GetMethodName() );
  117. diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
  118. index 7bfbbf5..cc3bcc0 100644
  119. --- a/cui/source/dialogs/scriptdlg.cxx
  120. +++ b/cui/source/dialogs/scriptdlg.cxx
  121. @@ -1232,8 +1232,8 @@ void SvxScriptOrgDialog::RestorePreviousSelection()
  122. if( aStoredEntry.Len() <= 0 )
  123. return;
  124. SvTreeListEntry* pEntry = 0;
  125. - sal_uInt16 nIndex = 0;
  126. - while ( nIndex != STRING_NOTFOUND )
  127. + sal_Int32 nIndex = 0;
  128. + while ( nIndex != -1 )
  129. {
  130. String aTmp( aStoredEntry.GetToken( 0, ';', nIndex ) );
  131. SvTreeListEntry* pTmpEntry = m_pScriptsBox->FirstChild( pEntry );
  132. diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx
  133. index db8aa6c..d3144fc 100644
  134. --- a/filter/source/msfilter/util.cxx
  135. +++ b/filter/source/msfilter/util.cxx
  136. @@ -163,7 +163,7 @@ sal_Unicode bestFitOpenSymbolToMSFont(sal_Unicode cChar,
  137. let words own font substitution kick in
  138. */
  139. rChrSet = RTL_TEXTENCODING_UNICODE;
  140. - xub_StrLen nIndex = 0;
  141. + sal_Int32 nIndex = 0;
  142. rFontName = ::GetNextFontToken(rFontName, nIndex);
  143. }
  144. else
  145. diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
  146. index 74bf784..592005c 100644
  147. --- a/fpicker/source/office/iodlg.cxx
  148. +++ b/fpicker/source/office/iodlg.cxx
  149. @@ -1467,8 +1467,8 @@ SvtFileDialogFilter_Impl* SvtFileDialog::FindFilter_Impl
  150.  
  151. if ( _bMultiExt )
  152. {
  153. - sal_uInt16 nIdx = 0;
  154. - while ( !pFoundFilter && nIdx != STRING_NOTFOUND )
  155. + sal_Int32 nIdx = 0;
  156. + while ( !pFoundFilter && nIdx != -1 )
  157. {
  158. aSingleType = rType.GetToken( 0, FILEDIALOG_DEF_EXTSEP, nIdx );
  159. #ifdef UNX
  160. @@ -3305,7 +3305,8 @@ void SvtFileDialog::appendDefaultExtension(String& _rFileName,
  161. if ( ! aType.EqualsAscii(FILEDIALOG_FILTER_ALL) )
  162. {
  163. sal_uInt16 nWildCard = comphelper::string::getTokenCount(aType, FILEDIALOG_DEF_EXTSEP);
  164. - sal_uInt16 nIndex, nPos = 0;
  165. + sal_uInt16 nIndex;
  166. + sal_Int32 nPos = 0;
  167.  
  168. for ( nIndex = 0; nIndex < nWildCard; nIndex++ )
  169. {
  170. diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
  171. index 6d3869b..7ad8114 100644
  172. --- a/sfx2/source/appl/childwin.cxx
  173. +++ b/sfx2/source/appl/childwin.cxx
  174. @@ -104,7 +104,7 @@ sal_Bool GetPosSizeFromString( const String& rStr, Point& rPos, Size& rSize )
  175. if ( comphelper::string::getTokenCount(rStr, '/') != 4 )
  176. return sal_False;
  177.  
  178. - xub_StrLen nIdx = 0;
  179. + sal_Int32 nIdx = 0;
  180. rPos.X() = rStr.GetToken(0, '/', nIdx).ToInt32();
  181. rPos.Y() = rStr.GetToken(0, '/', nIdx).ToInt32();
  182. rSize.Width() = rStr.GetToken(0, '/', nIdx).ToInt32();
  183. diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
  184. index 91cf2e7..32d3919 100644
  185. --- a/sfx2/source/appl/linkmgr2.cxx
  186. +++ b/sfx2/source/appl/linkmgr2.cxx
  187. @@ -238,7 +238,7 @@ bool LinkManager::GetDisplayNames( const SvBaseLink * pLink,
  188. case OBJECT_CLIENT_GRF:
  189. case OBJECT_CLIENT_OLE:
  190. {
  191. - sal_uInt16 nPos = 0;
  192. + sal_Int32 nPos = 0;
  193. String sFile( sLNm.GetToken( 0, ::sfx2::cTokenSeperator, nPos ) );
  194. String sRange( sLNm.GetToken( 0, ::sfx2::cTokenSeperator, nPos ) );
  195.  
  196. @@ -262,7 +262,7 @@ bool LinkManager::GetDisplayNames( const SvBaseLink * pLink,
  197. break;
  198. case OBJECT_CLIENT_DDE:
  199. {
  200. - sal_uInt16 nTmp = 0;
  201. + sal_Int32 nTmp = 0;
  202. String sCmd( sLNm );
  203. String sServer( sCmd.GetToken( 0, cTokenSeperator, nTmp ) );
  204. String sTopic( sCmd.GetToken( 0, cTokenSeperator, nTmp ) );
  205. diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
  206. index 9cbd3b2..f649c60 100644
  207. --- a/sfx2/source/appl/lnkbase2.cxx
  208. +++ b/sfx2/source/appl/lnkbase2.cxx
  209. @@ -602,7 +602,7 @@ static DdeTopic* FindTopic( const String & rLinkName, sal_uInt16* pItemStt )
  210. return 0;
  211.  
  212. String sNm( rLinkName );
  213. - sal_uInt16 nTokenPos = 0;
  214. + sal_Int32 nTokenPos = 0;
  215. rtl::OUString sService( sNm.GetToken( 0, cTokenSeperator, nTokenPos ) );
  216.  
  217. DdeServices& rSvc = DdeService::GetServices();
  218. diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
  219. index 066de34..8fca1a3 100644
  220. --- a/sfx2/source/appl/newhelp.cxx
  221. +++ b/sfx2/source/appl/newhelp.cxx
  222. @@ -320,7 +320,7 @@ void ContentListBox_Impl::InitRoot()
  223. {
  224. String aRow( pEntries[i] );
  225. String aTitle, aURL;
  226. - xub_StrLen nIdx = 0;
  227. + sal_Int32 nIdx = 0;
  228. aTitle = aRow.GetToken( 0, '\t', nIdx );
  229. aURL = aRow.GetToken( 0, '\t', nIdx );
  230. sal_Unicode cFolder = aRow.GetToken( 0, '\t', nIdx ).GetChar(0);
  231. @@ -364,7 +364,7 @@ void ContentListBox_Impl::RequestingChildren( SvTreeListEntry* pParent )
  232. {
  233. String aRow( pEntries[i] );
  234. String aTitle, aURL;
  235. - xub_StrLen nIdx = 0;
  236. + sal_Int32 nIdx = 0;
  237. aTitle = aRow.GetToken( 0, '\t', nIdx );
  238. aURL = aRow.GetToken( 0, '\t', nIdx );
  239. sal_Unicode cFolder = aRow.GetToken( 0, '\t', nIdx ).GetChar(0);
  240. @@ -1082,7 +1082,7 @@ IMPL_LINK_NOARG(SearchTabPage_Impl, SearchHdl)
  241. {
  242. String aRow( pFacs[i] );
  243. String aTitle, aType;
  244. - xub_StrLen nIdx = 0;
  245. + sal_Int32 nIdx = 0;
  246. aTitle = aRow.GetToken( 0, '\t', nIdx );
  247. aType = aRow.GetToken( 0, '\t', nIdx );
  248. String* pURL = new String( aRow.GetToken( 0, '\t', nIdx ) );
  249. @@ -1601,7 +1601,7 @@ void SfxHelpIndexWindow_Impl::Initialize()
  250. {
  251. String aRow( pFacs[i] );
  252. String aTitle, aType, aURL;
  253. - xub_StrLen nIdx = 0;
  254. + sal_Int32 nIdx = 0;
  255. aTitle = aRow.GetToken( 0, '\t', nIdx );
  256. aType = aRow.GetToken( 0, '\t', nIdx );
  257. aURL = aRow.GetToken( 0, '\t', nIdx );
  258. @@ -2952,7 +2952,7 @@ void SfxHelpWindow_Impl::LoadConfig()
  259. {
  260. aUserData = String( aTemp );
  261. DBG_ASSERT( comphelper::string::getTokenCount(aUserData, ';') == 6, "invalid user data" );
  262. - sal_uInt16 nIdx = 0;
  263. + sal_Int32 nIdx = 0;
  264. nIndexSize = aUserData.GetToken( 0, ';', nIdx ).ToInt32();
  265. nTextSize = aUserData.GetToken( 0, ';', nIdx ).ToInt32();
  266. sal_Int32 nWidth = aUserData.GetToken( 0, ';', nIdx ).ToInt32();
  267. diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx
  268. index 7d7c45a..c5745f0 100644
  269. --- a/sfx2/source/dialog/srchdlg.cxx
  270. +++ b/sfx2/source/dialog/srchdlg.cxx
  271. @@ -89,7 +89,7 @@ void SearchDialog::LoadConfig()
  272. {
  273. String sUserData( aTemp );
  274. DBG_ASSERT( comphelper::string::getTokenCount(sUserData, ';') == 5, "invalid config data" );
  275. - xub_StrLen nIdx = 0;
  276. + sal_Int32 nIdx = 0;
  277. String sSearchText = sUserData.GetToken( 0, ';', nIdx );
  278. m_aWholeWordsBox.Check( sUserData.GetToken( 0, ';', nIdx ).ToInt32() == 1 );
  279. m_aMatchCaseBox.Check( sUserData.GetToken( 0, ';', nIdx ).ToInt32() == 1 );
  280. @@ -97,7 +97,7 @@ void SearchDialog::LoadConfig()
  281. m_aBackwardsBox.Check( sUserData.GetToken( 0, ';', nIdx ).ToInt32() == 1 );
  282.  
  283. nIdx = 0;
  284. - while ( nIdx != STRING_NOTFOUND )
  285. + while ( nIdx != -1 )
  286. m_aSearchEdit.InsertEntry( sSearchText.GetToken( 0, '\t', nIdx ) );
  287. m_aSearchEdit.SelectEntryPos(0);
  288. }
  289. diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
  290. index dfb0a10..5b021fb 100644
  291. --- a/svtools/source/contnr/fileview.cxx
  292. +++ b/svtools/source/contnr/fileview.cxx
  293. @@ -1599,7 +1599,7 @@ void SvtFileView::SetConfigString( const String& rCfgStr )
  294. HeaderBar* pBar = mpImp->mpView->GetHeaderBar();
  295. DBG_ASSERT( pBar, "invalid headerbar" );
  296.  
  297. - sal_uInt16 nIdx = 0;
  298. + sal_Int32 nIdx = 0;
  299. mpImp->mnSortColumn = (sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
  300. sal_Bool bUp = (sal_Bool)(sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
  301. HeaderBarItemBits nBits = pBar->GetItemBits( mpImp->mnSortColumn );
  302. @@ -1616,7 +1616,7 @@ void SvtFileView::SetConfigString( const String& rCfgStr )
  303. }
  304. pBar->SetItemBits( mpImp->mnSortColumn, nBits );
  305.  
  306. - while ( nIdx != STRING_NOTFOUND )
  307. + while ( nIdx != -1 )
  308. {
  309. sal_uInt16 nItemId = (sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
  310. pBar->SetItemSize( nItemId, rCfgStr.GetToken( 0, ';', nIdx ).ToInt32() );
  311. diff --git a/svtools/source/urlobj/inetimg.cxx b/svtools/source/urlobj/inetimg.cxx
  312. index 185e024..263404c 100644
  313. --- a/svtools/source/urlobj/inetimg.cxx
  314. +++ b/svtools/source/urlobj/inetimg.cxx
  315. @@ -64,7 +64,7 @@ sal_Bool INetImage::Read( SvStream& rIStm, sal_uLong nFormat )
  316. case SOT_FORMATSTR_ID_INET_IMAGE:
  317. {
  318. String sINetImg = read_zeroTerminated_uInt8s_ToOUString(rIStm, RTL_TEXTENCODING_UTF8);
  319. - xub_StrLen nStart = 0;
  320. + sal_Int32 nStart = 0;
  321. aImageURL = sINetImg.GetToken( 0, TOKEN_SEPARATOR, nStart );
  322. aTargetURL = sINetImg.GetToken( 0, TOKEN_SEPARATOR, nStart );
  323. aTargetFrame = sINetImg.GetToken( 0, TOKEN_SEPARATOR, nStart );
  324. diff --git a/unotools/inc/unotools/fontdefs.hxx b/unotools/inc/unotools/fontdefs.hxx
  325. index df79a0f..72a656e 100644
  326. --- a/unotools/inc/unotools/fontdefs.hxx
  327. +++ b/unotools/inc/unotools/fontdefs.hxx
  328. @@ -84,9 +84,9 @@ public:
  329. #define DEFAULTFONT_CTL_HEADING ((sal_uInt16)4003)
  330. #define DEFAULTFONT_CTL_DISPLAY ((sal_uInt16)4004)
  331.  
  332. -UNOTOOLS_DLLPUBLIC String GetNextFontToken( const String& rTokenStr, xub_StrLen& rIndex );
  333. +UNOTOOLS_DLLPUBLIC OUString GetNextFontToken( const OUString& rTokenStr, sal_Int32& rIndex );
  334.  
  335. -UNOTOOLS_DLLPUBLIC void GetEnglishSearchFontName( String& rName );
  336. +UNOTOOLS_DLLPUBLIC void GetEnglishSearchFontName( OUString& rName );
  337.  
  338. #endif
  339.  
  340. diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx
  341. index a111488..06eeafc 100644
  342. --- a/unotools/source/misc/fontcvt.cxx
  343. +++ b/unotools/source/misc/fontcvt.cxx
  344. @@ -1432,40 +1432,40 @@ static ConvertChar aImplStarSymbolCvt = { NULL, "StarBats", ImplStarSymbolToStar
  345. const ConvertChar* ConvertChar::GetRecodeData( const String& rOrgFontName, const String& rMapFontName )
  346. {
  347. const ConvertChar* pCvt = NULL;
  348. - String aOrgName( rOrgFontName );
  349. + OUString aOrgName( rOrgFontName );
  350. GetEnglishSearchFontName( aOrgName );
  351. - String aMapName( rMapFontName );
  352. + OUString aMapName( rMapFontName );
  353. GetEnglishSearchFontName( aMapName );
  354.  
  355. - if( aMapName.EqualsAscii( "starsymbol" )
  356. - || aMapName.EqualsAscii( "opensymbol" ) )
  357. + if( aMapName == "starsymbol"
  358. + || aMapName == "opensymbol" )
  359. {
  360. int nEntries = SAL_N_ELEMENTS(aStarSymbolRecodeTable);
  361. for( int i = 0; i < nEntries; ++i)
  362. {
  363. RecodeTable& r = aStarSymbolRecodeTable[i];
  364. - if( aOrgName.EqualsAscii( r.pOrgName ) )
  365. + if( aOrgName.equalsAscii( r.pOrgName ) )
  366. { pCvt = &r.aCvt; break; }
  367. }
  368. }
  369. //It's plausible that it's better to implement this
  370. //as an additional encoding alongside the existing
  371. //adobe-symbol to unicode conversion in rtl instead
  372. - else if( aMapName.EqualsAscii("applesymbol") )
  373. + else if( aMapName == "applesymbol" )
  374. {
  375. int nEntries = SAL_N_ELEMENTS(aAppleSymbolRecodeTable);
  376. for( int i = 0; i < nEntries; ++i)
  377. {
  378. RecodeTable& r = aAppleSymbolRecodeTable[i];
  379. - if( aOrgName.EqualsAscii( r.pOrgName ) )
  380. + if( aOrgName.equalsAscii( r.pOrgName ) )
  381. { pCvt = &r.aCvt; break; }
  382. }
  383. }
  384. - else if( aMapName.EqualsAscii( "starbats" ) )
  385. + else if( aMapName == "starbats" )
  386. {
  387. - if( aOrgName.EqualsAscii( "starsymbol" ) )
  388. + if( aOrgName == "starsymbol" )
  389. pCvt = &aImplStarSymbolCvt;
  390. - else if( aOrgName.EqualsAscii( "opensymbol" ) )
  391. + else if( aOrgName == "opensymbol" )
  392. pCvt = &aImplStarSymbolCvt;
  393. }
  394.  
  395. @@ -1479,7 +1479,7 @@ FontToSubsFontConverter CreateFontToSubsFontConverter(
  396. {
  397. const ConvertChar* pCvt = NULL;
  398.  
  399. - String aName = rOrgName;
  400. + OUString aName = rOrgName;
  401. GetEnglishSearchFontName( aName );
  402.  
  403. if ( nFlags & FONTTOSUBSFONT_IMPORT )
  404. @@ -1490,15 +1490,15 @@ FontToSubsFontConverter CreateFontToSubsFontConverter(
  405. for( int i = 0; i < nEntries; ++i )
  406. {
  407. RecodeTable& r = aStarSymbolRecodeTable[i];
  408. - if( aName.EqualsAscii( r.pOrgName ) )
  409. + if( aName.equalsAscii( r.pOrgName ) )
  410. { pCvt = &r.aCvt; break; }
  411. }
  412. }
  413. else
  414. {
  415. // TODO: FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS
  416. - if( aName.EqualsAscii( "starsymbol" ) ) pCvt = &aImplStarSymbolCvt;
  417. - else if( aName.EqualsAscii( "opensymbol" ) ) pCvt = &aImplStarSymbolCvt;
  418. + if( aName == "starsymbol" ) pCvt = &aImplStarSymbolCvt;
  419. + else if( aName == "opensymbol" ) pCvt = &aImplStarSymbolCvt;
  420. }
  421.  
  422. return (FontToSubsFontConverter)pCvt;
  423. diff --git a/unotools/source/misc/fontdefs.cxx b/unotools/source/misc/fontdefs.cxx
  424. index 7785e807..6c4fdb1 100644
  425. --- a/unotools/source/misc/fontdefs.cxx
  426. +++ b/unotools/source/misc/fontdefs.cxx
  427. @@ -20,6 +20,7 @@
  428. #include <unotools/fontdefs.hxx>
  429. #include <unotools/fontcfg.hxx>
  430. #include <boost/unordered_map.hpp>
  431. +#include <rtl/ustrbuf.hxx>
  432.  
  433. struct ImplLocalizedFontName
  434. {
  435. @@ -321,42 +322,42 @@ static ImplLocalizedFontName aImplLocalizedNamesList[] =
  436.  
  437. // -----------------------------------------------------------------------
  438.  
  439. -void GetEnglishSearchFontName( String& rName )
  440. +void GetEnglishSearchFontName( OUString& rName )
  441. {
  442. bool bNeedTranslation = false;
  443. - xub_StrLen nLen = rName.Len();
  444. + sal_Int32 nLen = rName.getLength();
  445.  
  446. // Remove trailing whitespaces
  447. - xub_StrLen i = nLen;
  448. - while ( i && (rName.GetChar( i-1 ) < 32) )
  449. + sal_Int32 i = nLen;
  450. + while ( i && (rName[ i-1 ] < 32) )
  451. i--;
  452. if ( i != nLen )
  453. - rName.Erase( i );
  454. + rName.copy( 0, i );
  455.  
  456. // Remove Script at the end
  457. // Scriptname must be the last part of the fontname and
  458. // looks like "fontname (scriptname)". So there can only be a
  459. // script name at the and of the fontname, when the last char is ')'
  460. - if ( (nLen >= 3) && rName.GetChar( nLen-1 ) == ')' )
  461. + if ( (nLen >= 3) && rName[ nLen-1 ] == ')' )
  462. {
  463. int nOpen = 1;
  464. - xub_StrLen nTempLen = nLen-2;
  465. + sal_Int32 nTempLen = nLen-2;
  466. while ( nTempLen )
  467. {
  468. - if ( rName.GetChar( nTempLen ) == '(' )
  469. + if ( rName[ nTempLen ] == '(' )
  470. {
  471. nOpen--;
  472. if ( !nOpen )
  473. {
  474. // Remove Space at the end
  475. - if ( nTempLen && (rName.GetChar( nTempLen-1 ) == ' ') )
  476. + if ( nTempLen && (rName[ nTempLen-1 ] == ' ') )
  477. nTempLen--;
  478. - rName.Erase( nTempLen );
  479. + rName.copy( 0, nTempLen );
  480. nLen = nTempLen;
  481. break;
  482. }
  483. }
  484. - if ( rName.GetChar( nTempLen ) == ')' )
  485. + if ( rName[ nTempLen ] == ')' )
  486. nOpen++;
  487. nTempLen--;
  488. }
  489. @@ -367,7 +368,7 @@ void GetEnglishSearchFontName( String& rName )
  490. i = 0;
  491. while ( i < nLen )
  492. {
  493. - sal_Unicode c = rName.GetChar( i );
  494. + sal_Unicode c = rName[ i ];
  495. if ( c > 127 )
  496. {
  497. // Translate to Lowercase-ASCII
  498. @@ -378,8 +379,13 @@ void GetEnglishSearchFontName( String& rName )
  499. // Upper to Lower
  500. if ( (c >= 'A') && (c <= 'Z') )
  501. c += 'a' - 'A';
  502. - rName.SetChar( i, c );
  503. - }
  504. + //rName[ i ] = c ;
  505. +
  506. + OUStringBuffer aTmpStr( rName.getStr() ) ;
  507. + aTmpStr[ i ] = c ;
  508. + rName = aTmpStr.makeStringAndClear() ;
  509. +
  510. + }
  511. else
  512. {
  513. // Only Fontnames with None-Ascii-Characters must be translated
  514. @@ -393,12 +399,21 @@ void GetEnglishSearchFontName( String& rName )
  515. if ( (c >= 'A') && (c <= 'Z') )
  516. {
  517. c += 'a' - 'A';
  518. - rName.SetChar( i, c );
  519. + //rName[ i ] = c ;
  520. +
  521. + OUStringBuffer aTmpStr( rName.getStr() ) ;
  522. + aTmpStr[ i ] = c ;
  523. + rName = aTmpStr.makeStringAndClear() ;
  524. +
  525. }
  526. else if( ((c < '0') || (c > '9')) && (c != ';') ) // not 0-9 or semicolon
  527. {
  528. // Remove white spaces and special characters
  529. - rName.Erase( i, 1 );
  530. +
  531. + OUStringBuffer aTmpStr( rName.getStr() ) ;
  532. + aTmpStr.remove(i,1);
  533. + rName = aTmpStr.makeStringAndClear() ;
  534. +
  535. nLen--;
  536. continue;
  537. }
  538. @@ -423,41 +438,41 @@ void GetEnglishSearchFontName( String& rName )
  539.  
  540. FontNameDictionary::const_iterator it = aDictionary.find( rName );
  541. if( it != aDictionary.end() )
  542. - rName.AssignAscii( it->second );
  543. + rName = OUString::createFromAscii ( it->second ) ;
  544. }
  545. }
  546.  
  547. // -----------------------------------------------------------------------
  548.  
  549. -String GetNextFontToken( const String& rTokenStr, xub_StrLen& rIndex )
  550. +OUString GetNextFontToken( const OUString& rTokenStr, sal_Int32& rIndex )
  551. {
  552. // check for valid start index
  553. - int nStringLen = rTokenStr.Len();
  554. + int nStringLen = rTokenStr.getLength();
  555. if( rIndex >= nStringLen )
  556. {
  557. - rIndex = STRING_NOTFOUND;
  558. - return String();
  559. + rIndex = -1;
  560. + return OUString();
  561. }
  562.  
  563. // find the next token delimiter and return the token substring
  564. - const sal_Unicode* pStr = rTokenStr.GetBuffer() + rIndex;
  565. - const sal_Unicode* pEnd = rTokenStr.GetBuffer() + nStringLen;
  566. + const sal_Unicode* pStr = rTokenStr.getStr() + rIndex;
  567. + const sal_Unicode* pEnd = rTokenStr.getStr() + nStringLen;
  568. for(; pStr < pEnd; ++pStr )
  569. if( (*pStr == ';') || (*pStr == ',') )
  570. break;
  571.  
  572. - xub_StrLen nTokenStart = rIndex;
  573. - xub_StrLen nTokenLen;
  574. + sal_Int32 nTokenStart = rIndex;
  575. + sal_Int32 nTokenLen;
  576. if( pStr < pEnd )
  577. {
  578. - rIndex = sal::static_int_cast<xub_StrLen>(pStr - rTokenStr.GetBuffer());
  579. + rIndex = sal::static_int_cast<sal_Int32>(pStr - rTokenStr.getStr());
  580. nTokenLen = rIndex - nTokenStart;
  581. ++rIndex; // skip over token separator
  582. }
  583. else
  584. {
  585. // no token delimiter found => handle last token
  586. - rIndex = STRING_NOTFOUND;
  587. + rIndex = -1;
  588. nTokenLen = STRING_LEN;
  589.  
  590. // optimize if the token string consists of just one token
  591. @@ -470,17 +485,17 @@ String GetNextFontToken( const String& rTokenStr, xub_StrLen& rIndex )
  592.  
  593. // =======================================================================
  594.  
  595. -static bool ImplIsFontToken( const String& rName, const String& rToken )
  596. +static bool ImplIsFontToken( const OUString& rName, const String& rToken )
  597. {
  598. - String aTempName;
  599. - xub_StrLen nIndex = 0;
  600. + OUString aTempName;
  601. + sal_Int32 nIndex = 0;
  602. do
  603. {
  604. aTempName = GetNextFontToken( rName, nIndex );
  605. if ( rToken == aTempName )
  606. return true;
  607. }
  608. - while ( nIndex != STRING_NOTFOUND );
  609. + while ( nIndex != -1 );
  610.  
  611. return false;
  612. }
  613. @@ -506,18 +521,18 @@ void AddTokenFontName( String& rName, const String& rNewToken )
  614.  
  615. // =======================================================================
  616.  
  617. -String GetSubsFontName( const String& rName, sal_uLong nFlags )
  618. +String GetSubsFontName( const OUString& rName, sal_uLong nFlags )
  619. {
  620. String aName;
  621.  
  622. - xub_StrLen nIndex = 0;
  623. - String aOrgName = GetNextFontToken( rName, nIndex );
  624. + sal_Int32 nIndex = 0;
  625. + OUString aOrgName = GetNextFontToken( rName, nIndex );
  626. GetEnglishSearchFontName( aOrgName );
  627.  
  628. // #93662# do not try to replace StarSymbol with MS only font
  629. if( nFlags == (SUBSFONT_MS|SUBSFONT_ONLYONE)
  630. - && ( aOrgName.EqualsAscii( "starsymbol" )
  631. - || aOrgName.EqualsAscii( "opensymbol" ) ) )
  632. + && ( aOrgName == "starsymbol"
  633. + || aOrgName == "opensymbol" ) )
  634. return aName;
  635.  
  636. const utl::FontNameAttr* pAttr = utl::FontSubstConfiguration::get().getSubstInfo( aOrgName );
  637. diff --git a/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx b/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
  638. index 8e2a4bb..93c487e 100644
  639. --- a/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
  640. +++ b/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
  641. @@ -296,16 +296,16 @@ static bool GetDevFontAttributes( ATSUFontID nFontID, ImplDevFontAttributes& rDF
  642. continue;
  643.  
  644. // convert to unicode name
  645. - UniString aUtf16Name;
  646. + OUString aUtf16Name;
  647. if( eEncoding == RTL_TEXTENCODING_UNICODE ) // we are just interested in UTF16 encoded names
  648. - aUtf16Name = rtl::OUString( (const sal_Unicode*)&aNameBuffer[0], nNameLength/2 );
  649. + aUtf16Name = OUString( (const sal_Unicode*)&aNameBuffer[0], nNameLength/2 );
  650. else if( eEncoding == RTL_TEXTENCODING_UCS4 )
  651. - aUtf16Name = UniString(); // TODO
  652. + aUtf16Name = OUString(); // TODO
  653. else // assume the non-unicode encoded names are byte encoded
  654. - aUtf16Name = UniString( &aNameBuffer[0], nNameLength, eEncoding );
  655. + aUtf16Name = OUString( &aNameBuffer[0], nNameLength, eEncoding );
  656.  
  657. // ignore empty strings
  658. - if( aUtf16Name.Len() <= 0 )
  659. + if( aUtf16Name.getLength() <= 0 )
  660. continue;
  661.  
  662. // handle the name depending on its namecode
  663. @@ -313,7 +313,7 @@ static bool GetDevFontAttributes( ATSUFontID nFontID, ImplDevFontAttributes& rDF
  664. {
  665. case kFontFamilyName:
  666. // ignore font names starting with '.'
  667. - if( aUtf16Name.GetChar(0) == '.' )
  668. + if( aUtf16Name[0] == '.' )
  669. nNameValue = 0;
  670. else if( rDFA.GetFamilyName().Len() )
  671. {
  672. diff --git a/vcl/generic/fontmanager/fontsubst.cxx b/vcl/generic/fontmanager/fontsubst.cxx
  673. index 73d1d3a..53767ba 100644
  674. --- a/vcl/generic/fontmanager/fontsubst.cxx
  675. +++ b/vcl/generic/fontmanager/fontsubst.cxx
  676. @@ -161,8 +161,8 @@ bool FcPreMatchSubstititution::FindFontSubstitute( FontSelectPattern &rFontSelDa
  677. if( rFontSelData.IsSymbolFont() )
  678. return false;
  679. // StarSymbol is a unicode font, but it still deserves the symbol flag
  680. - if( 0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "starsymbol", 10)
  681. - || 0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "opensymbol", 10) )
  682. + if( 0 == rFontSelData.maSearchName.compareTo( "starsymbol", 10)
  683. + || 0 == rFontSelData.maSearchName.compareTo( "opensymbol", 10) )
  684. return false;
  685.  
  686. //see fdo#41556 and fdo#47636
  687. @@ -188,7 +188,7 @@ bool FcPreMatchSubstititution::FindFontSubstitute( FontSelectPattern &rFontSelDa
  688. rtl::OUString aDummy;
  689. const FontSelectPattern aOut = GetFcSubstitute( rFontSelData, aDummy );
  690.  
  691. - if( !aOut.maSearchName.Len() )
  692. + if( !aOut.maSearchName.getLength() )
  693. return false;
  694.  
  695. const bool bHaveSubstitute = !uselessmatch( rFontSelData, aOut );
  696. @@ -230,8 +230,8 @@ bool FcGlyphFallbackSubstititution::FindFontSubstitute( FontSelectPattern& rFont
  697. if( rFontSelData.IsSymbolFont() )
  698. return false;
  699. // StarSymbol is a unicode font, but it still deserves the symbol flag
  700. - if( 0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "starsymbol", 10)
  701. - || 0 == rFontSelData.maSearchName.CompareIgnoreCaseToAscii( "opensymbol", 10) )
  702. + if( 0 == rFontSelData.maSearchName.compareTo( "starsymbol", 10)
  703. + || 0 == rFontSelData.maSearchName.compareTo( "opensymbol", 10) )
  704. return false;
  705.  
  706. const FontSelectPattern aOut = GetFcSubstitute( rFontSelData, rMissingCodes );
  707. @@ -239,7 +239,7 @@ bool FcGlyphFallbackSubstititution::FindFontSubstitute( FontSelectPattern& rFont
  708. // FC doing it would be preferable because it knows the invariables
  709. // e.g. FC knows the FC rule that all Arial gets replaced by LiberationSans
  710. // whereas we would have to check for every size or attribute
  711. - if( !aOut.maSearchName.Len() )
  712. + if( !aOut.maSearchName.getLength() )
  713. return false;
  714.  
  715. const bool bHaveSubstitute = !uselessmatch( rFontSelData, aOut );
  716. diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
  717. index df24b76..aac8088 100644
  718. --- a/vcl/generic/glyphs/gcach_ftyp.cxx
  719. +++ b/vcl/generic/glyphs/gcach_ftyp.cxx
  720. @@ -945,8 +945,8 @@ void ServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor ) const
  721.  
  722. //Always consider [star]symbol as symbol fonts
  723. if (
  724. - (rTo.GetFamilyName().EqualsAscii("OpenSymbol")) ||
  725. - (rTo.GetFamilyName().EqualsAscii("StarSymbol"))
  726. + (rTo.GetFamilyName() == "OpenSymbol" ) ||
  727. + (rTo.GetFamilyName() == "StarSymbol" )
  728. )
  729. {
  730. rTo.SetSymbolFlag( true );
  731. diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
  732. index 79a2d7a..1d1322c 100644
  733. --- a/vcl/generic/glyphs/glyphcache.cxx
  734. +++ b/vcl/generic/glyphs/glyphcache.cxx
  735. @@ -86,7 +86,7 @@ size_t GlyphCache::IFSD_Hash::operator()( const FontSelectPattern& rFontSelData
  736. // TODO: is it worth to improve this hash function?
  737. sal_IntPtr nFontId = reinterpret_cast<sal_IntPtr>( rFontSelData.mpFontData );
  738. #ifdef ENABLE_GRAPHITE
  739. - if (rFontSelData.maTargetName.Search(grutils::GrFeatureParser::FEAT_PREFIX)
  740. + if (rFontSelData.maTargetName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX)
  741. != STRING_NOTFOUND)
  742. {
  743. rtl::OString aFeatName = rtl::OUStringToOString( rFontSelData.maTargetName, RTL_TEXTENCODING_UTF8 );
  744. @@ -138,9 +138,9 @@ bool GlyphCache::IFSD_Equal::operator()( const FontSelectPattern& rA, const Font
  745. if (rA.meLanguage != rB.meLanguage)
  746. return false;
  747. // check for features
  748. - if ((rA.maTargetName.Search(grutils::GrFeatureParser::FEAT_PREFIX)
  749. + if ((rA.maTargetName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX)
  750. != STRING_NOTFOUND ||
  751. - rB.maTargetName.Search(grutils::GrFeatureParser::FEAT_PREFIX)
  752. + rB.maTargetName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX)
  753. != STRING_NOTFOUND) && rA.maTargetName != rB.maTargetName)
  754. return false;
  755. #endif
  756. diff --git a/vcl/inc/outdev.h b/vcl/inc/outdev.h
  757. index 20c1d36..0842a01 100644
  758. --- a/vcl/inc/outdev.h
  759. +++ b/vcl/inc/outdev.h
  760. @@ -54,9 +54,9 @@ public:
  761. ImplDevFontListData( const String& rSearchName );
  762. ~ImplDevFontListData();
  763.  
  764. - const String& GetFamilyName() const { return maName; }
  765. + const OUString& GetFamilyName() const { return maName; }
  766. const String& GetSearchName() const { return maSearchName; }
  767. - const String& GetAliasNames() const { return maMapNames; }
  768. + const OUString& GetAliasNames() const { return maMapNames; }
  769. bool IsScalable() const { return mpFirst->IsScalable(); }
  770. int GetMinQuality() const { return mnMinQuality; }
  771.  
  772. @@ -73,9 +73,9 @@ public:
  773. private:
  774. friend class ImplDevFontList; // TODO: remove soon
  775. PhysicalFontFace* mpFirst; // linked list of physical font faces
  776. - String maName; // Fontname (original font family name)
  777. + OUString maName; // Fontname (original font family name)
  778. String maSearchName; // normalized font family name
  779. - String maMapNames; // fontname aliases
  780. + OUString maMapNames; // fontname aliases
  781. sal_uIntPtr mnTypeFaces; // Typeface Flags
  782. sal_uIntPtr mnMatchType; // MATCH - Type
  783. String maMatchFamilyName; // MATCH - FamilyName
  784. @@ -148,13 +148,13 @@ protected:
  785.  
  786. struct ImplFontSubstEntry
  787. {
  788. - String maName;
  789. - String maReplaceName;
  790. - String maSearchName;
  791. - String maSearchReplaceName;
  792. - sal_uInt16 mnFlags;
  793. + String maName;
  794. + String maReplaceName;
  795. + OUString maSearchName;
  796. + OUString maSearchReplaceName;
  797. + sal_uInt16 mnFlags;
  798.  
  799. - ImplFontSubstEntry( const String& rFontName, const String& rSubstFontName, sal_uInt16 nSubstFlags );
  800. + ImplFontSubstEntry( const OUString& rFontName, const OUString& rSubstFontName, sal_uInt16 nSubstFlags );
  801. };
  802.  
  803. class ImplDirectFontSubstitution
  804. diff --git a/vcl/inc/outfont.hxx b/vcl/inc/outfont.hxx
  805. index 53ec909..8e355d5 100644
  806. --- a/vcl/inc/outfont.hxx
  807. +++ b/vcl/inc/outfont.hxx
  808. @@ -54,16 +54,16 @@ namespace com { namespace sun { namespace star { namespace lang { struct Locale;
  809. class ImplFontAttributes
  810. {
  811. public: // TODO: create matching interface class
  812. - const String& GetFamilyName() const { return maName; }
  813. - const String& GetStyleName() const { return maStyleName; }
  814. + const OUString& GetFamilyName() const { return maName; }
  815. + const OUString& GetStyleName() const { return maStyleName; }
  816. FontWeight GetWeight() const { return meWeight; }
  817. FontItalic GetSlant() const { return meItalic; }
  818. FontFamily GetFamilyType() const { return meFamily; }
  819. FontPitch GetPitch() const { return mePitch; }
  820. FontWidth GetWidthType() const { return meWidthType; }
  821. bool IsSymbolFont() const { return mbSymbolFlag; }
  822. - void SetFamilyName(const String sFamilyName) { maName = sFamilyName; }
  823. - void SetStyleName( const String sStyleName) { maStyleName = sStyleName; }
  824. + void SetFamilyName(const OUString sFamilyName) { maName = sFamilyName; }
  825. + void SetStyleName( const OUString sStyleName) { maStyleName = sStyleName; }
  826. void SetFamilyType(const FontFamily eFontFamily) { meFamily = eFontFamily; }
  827. void SetPitch(const FontPitch ePitch ) { mePitch = ePitch; }
  828. void SetItalic(const FontItalic eItalic ) { meItalic = eItalic; }
  829. @@ -77,8 +77,8 @@ public: // TODO: create matching interface class
  830. }
  831.  
  832. private:
  833. - String maName; // Font Family Name
  834. - String maStyleName; // Font Style Name
  835. + OUString maName; // Font Family Name
  836. + OUString maStyleName; // Font Style Name
  837. FontWeight meWeight; // Weight Type
  838. FontItalic meItalic; // Slant Type
  839. FontFamily meFamily; // Family Type
  840. @@ -138,8 +138,8 @@ public:
  841. PhysicalFontFace* CreateAlias() const { return Clone(); }
  842.  
  843. bool IsBetterMatch( const FontSelectPattern&, FontMatchStatus& ) const;
  844. - StringCompare CompareWithSize( const PhysicalFontFace& ) const;
  845. - StringCompare CompareIgnoreSize( const PhysicalFontFace& ) const;
  846. + sal_Int32 CompareWithSize( const PhysicalFontFace& ) const;
  847. + sal_Int32 CompareIgnoreSize( const PhysicalFontFace& ) const;
  848. virtual ~PhysicalFontFace() {}
  849. virtual PhysicalFontFace* Clone() const = 0;
  850.  
  851. @@ -172,8 +172,8 @@ public:
  852. }
  853.  
  854. public:
  855. - String maTargetName; // name of the font name token that is chosen
  856. - String maSearchName; // name of the font that matches best
  857. + OUString maTargetName; // name of the font name token that is chosen
  858. + OUString maSearchName; // name of the font that matches best
  859. int mnWidth; // width of font in pixel units
  860. int mnHeight; // height of font in pixel units
  861. float mfExactHeight; // requested height (in pixels with subpixel details)
  862. @@ -231,7 +231,7 @@ public:
  863. // find the device font
  864. ImplDevFontListData* FindFontFamily( const String& rFontName ) const;
  865. ImplDevFontListData* ImplFindByFont( FontSelectPattern&, bool bPrinter, ImplDirectFontSubstitution* ) const;
  866. - ImplDevFontListData* ImplFindBySearchName( const String& ) const;
  867. + ImplDevFontListData* ImplFindBySearchName( const OUString& ) const;
  868.  
  869. // suggest fonts for glyph fallback
  870. ImplDevFontListData* GetGlyphFallbackFont( FontSelectPattern&,
  871. @@ -359,7 +359,7 @@ public: // TODO: make data members private
  872. bool mbInit; // true if maMetric member is valid
  873.  
  874. void AddFallbackForUnicode( sal_UCS4, FontWeight eWeight, const String& rFontName );
  875. - bool GetFallbackForUnicode( sal_UCS4, FontWeight eWeight, String* pFontName ) const;
  876. + bool GetFallbackForUnicode( sal_UCS4, FontWeight eWeight, OUString* pFontName ) const;
  877. void IgnoreFallbackForUnicode( sal_UCS4, FontWeight eWeight, const String& rFontName );
  878.  
  879. private:
  880. diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
  881. index 8356a52..27ae468 100644
  882. --- a/vcl/source/control/combobox.cxx
  883. +++ b/vcl/source/control/combobox.cxx
  884. @@ -382,10 +382,10 @@ IMPL_LINK_NOARG(ComboBox, ImplSelectHdl)
  885. aText = mpSubEdit->GetText();
  886.  
  887. // Alle Eintraege entfernen, zu denen es einen Entry gibt, der aber nicht selektiert ist.
  888. - xub_StrLen nIndex = 0;
  889. - while ( nIndex != STRING_NOTFOUND )
  890. + sal_Int32 nIndex = 0;
  891. + while ( nIndex != -1 )
  892. {
  893. - xub_StrLen nPrevIndex = nIndex;
  894. + sal_Int32 nPrevIndex = nIndex;
  895. XubString aToken = aText.GetToken( 0, mcMultiSep, nIndex );
  896. xub_StrLen nTokenLen = aToken.Len();
  897. aToken = comphelper::string::strip(aToken, ' ');
  898. diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
  899. index b80e8e0..2f16fac 100644
  900. --- a/vcl/source/gdi/font.cxx
  901. +++ b/vcl/source/gdi/font.cxx
  902. @@ -168,7 +168,7 @@ void Impl_Font::AskConfig()
  903. sal_uLong nType = 0;
  904. FontWeight eWeight = WEIGHT_DONTKNOW;
  905. FontWidth eWidthType = WIDTH_DONTKNOW;
  906. - String aMapName = maFamilyName;
  907. + OUString aMapName = maFamilyName;
  908. GetEnglishSearchFontName( aMapName );
  909. utl::FontSubstConfiguration::getMapName( aMapName,
  910. aShortName, aFamilyName, eWeight, eWidthType, nType );
  911. diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
  912. index 1364fcf..50e22a7 100644
  913. --- a/vcl/source/gdi/outdev3.cxx
  914. +++ b/vcl/source/gdi/outdev3.cxx
  915. @@ -60,7 +60,7 @@
  916.  
  917. #include "unotools/fontcvt.hxx"
  918. #include "unotools/fontcfg.hxx"
  919. -
  920. +//#include "unotools/fontdefs.hxx"
  921. #include "osl/file.h"
  922.  
  923. #include <config_graphite.h>
  924. @@ -359,8 +359,8 @@ void ImplDirectFontSubstitution::AddFontSubstitute( const String& rFontName,
  925.  
  926. // -----------------------------------------------------------------------
  927.  
  928. -ImplFontSubstEntry::ImplFontSubstEntry( const String& rFontName,
  929. - const String& rSubstFontName, sal_uInt16 nSubstFlags )
  930. +ImplFontSubstEntry::ImplFontSubstEntry( const OUString& rFontName,
  931. + const OUString& rSubstFontName, sal_uInt16 nSubstFlags )
  932. : maName( rFontName )
  933. , maReplaceName( rSubstFontName )
  934. , mnFlags( nSubstFlags )
  935. @@ -434,11 +434,11 @@ bool ImplDirectFontSubstitution::FindFontSubstitute( String& rSubstName,
  936.  
  937. // -----------------------------------------------------------------------
  938.  
  939. -static void ImplFontSubstitute( String& rFontName,
  940. +static void ImplFontSubstitute( OUString& rFontName,
  941. sal_uInt16 nFlags, ImplDirectFontSubstitution* pDevSpecific )
  942. {
  943. #ifdef DBG_UTIL
  944. - String aTempName = rFontName;
  945. + OUString aTempName = rFontName;
  946. GetEnglishSearchFontName( aTempName );
  947. DBG_ASSERT( aTempName == rFontName, "ImplFontSubstitute() called without a searchname" );
  948. #endif
  949. @@ -553,9 +553,9 @@ Font OutputDevice::GetDefaultFont( sal_uInt16 nType, LanguageType eLang,
  950. pOutDev->ImplInitFontList();
  951.  
  952. // Search Font in the FontList
  953. - String aName;
  954. - String aSearchName;
  955. - xub_StrLen nIndex = 0;
  956. + OUString aName;
  957. + OUString aSearchName;
  958. + sal_Int32 nIndex = 0;
  959. do
  960. {
  961. aSearchName = GetNextFontToken( aSearch, nIndex );
  962. @@ -568,7 +568,7 @@ Font OutputDevice::GetDefaultFont( sal_uInt16 nType, LanguageType eLang,
  963. break;
  964. }
  965. }
  966. - while ( nIndex != STRING_NOTFOUND );
  967. + while ( nIndex != -1 );
  968. aFont.SetName( aName );
  969. }
  970.  
  971. @@ -582,7 +582,7 @@ Font OutputDevice::GetDefaultFont( sal_uInt16 nType, LanguageType eLang,
  972. pOutDev = (const OutputDevice *)ImplGetSVData()->mpDefaultWin;
  973. if( !pOutDev )
  974. {
  975. - xub_StrLen nIndex = 0;
  976. + sal_Int32 nIndex = 0;
  977. aFont.SetName( aSearch.GetToken( 0, ';', nIndex ) );
  978. }
  979. else
  980. @@ -744,14 +744,14 @@ PhysicalFontFace::PhysicalFontFace( const ImplDevFontAttributes& rDFA, int nMagi
  981. {
  982. // StarSymbol is a unicode font, but it still deserves the symbol flag
  983. if( !IsSymbolFont() )
  984. - if( 0 == GetFamilyName().CompareIgnoreCaseToAscii( "starsymbol", 10)
  985. - || 0 == GetFamilyName().CompareIgnoreCaseToAscii( "opensymbol", 10) )
  986. + if( 0 == GetFamilyName().compareTo( "starsymbol", 10)
  987. + || 0 == GetFamilyName().compareTo( "opensymbol", 10) )
  988. SetSymbolFlag( true );
  989. }
  990.  
  991. // -----------------------------------------------------------------------
  992.  
  993. -StringCompare PhysicalFontFace::CompareIgnoreSize( const PhysicalFontFace& rOther ) const
  994. +sal_Int32 PhysicalFontFace::CompareIgnoreSize( const PhysicalFontFace& rOther ) const
  995. {
  996. // compare their width, weight, italic and style name
  997. if( GetWidthType() < rOther.GetWidthType() )
  998. @@ -769,15 +769,15 @@ StringCompare PhysicalFontFace::CompareIgnoreSize( const PhysicalFontFace& rOthe
  999. else if( GetSlant() > rOther.GetSlant() )
  1000. return COMPARE_GREATER;
  1001.  
  1002. - StringCompare eCompare = GetFamilyName().CompareTo( rOther.GetFamilyName() );
  1003. + sal_Int32 eCompare = GetFamilyName().compareTo( rOther.GetFamilyName() );
  1004. return eCompare;
  1005. }
  1006.  
  1007. // -----------------------------------------------------------------------
  1008.  
  1009. -StringCompare PhysicalFontFace::CompareWithSize( const PhysicalFontFace& rOther ) const
  1010. +sal_Int32 PhysicalFontFace::CompareWithSize( const PhysicalFontFace& rOther ) const
  1011. {
  1012. - StringCompare eCompare = CompareIgnoreSize( rOther );
  1013. + sal_Int32 eCompare = CompareIgnoreSize( rOther );
  1014. if( eCompare != COMPARE_EQUAL )
  1015. return eCompare;
  1016.  
  1017. @@ -809,12 +809,12 @@ bool PhysicalFontFace::IsBetterMatch( const FontSelectPattern& rFSD, FontMatchSt
  1018. {
  1019. int nMatch = 0;
  1020.  
  1021. - const String& rFontName = rFSD.maTargetName;
  1022. - if( (rFontName == GetFamilyName()) || rFontName.EqualsIgnoreCaseAscii( GetFamilyName() ) )
  1023. + const OUString& rFontName = rFSD.maTargetName;
  1024. + if( (rFontName == GetFamilyName()) || rFontName.compareTo( GetFamilyName() ) )
  1025. nMatch += 240000;
  1026.  
  1027. if( rStatus.mpTargetStyleName
  1028. - && GetStyleName().EqualsIgnoreCaseAscii( rStatus.mpTargetStyleName ) )
  1029. + && GetStyleName().compareTo( rStatus.mpTargetStyleName ) )
  1030. nMatch += 120000;
  1031.  
  1032. if( (rFSD.GetPitch() != PITCH_DONTKNOW) && (rFSD.GetPitch() == GetPitch()) )
  1033. @@ -988,7 +988,7 @@ inline void ImplFontEntry::AddFallbackForUnicode( sal_UCS4 cChar, FontWeight eWe
  1034.  
  1035. // -----------------------------------------------------------------------
  1036.  
  1037. -inline bool ImplFontEntry::GetFallbackForUnicode( sal_UCS4 cChar, FontWeight eWeight, String* pFontName ) const
  1038. +inline bool ImplFontEntry::GetFallbackForUnicode( sal_UCS4 cChar, FontWeight eWeight, OUString* pFontName ) const
  1039. {
  1040. if( !mpUnicodeFallbackList )
  1041. return false;
  1042. @@ -1113,7 +1113,7 @@ bool ImplDevFontListData::AddFontFace( PhysicalFontFace* pNewData )
  1043. PhysicalFontFace** ppHere = &mpFirst;
  1044. for(; (pData=*ppHere) != NULL; ppHere=&pData->mpNext )
  1045. {
  1046. - StringCompare eComp = pNewData->CompareWithSize( *pData );
  1047. + sal_Int32 eComp = pNewData->CompareWithSize( *pData );
  1048. if( eComp == COMPARE_GREATER )
  1049. continue;
  1050. if( eComp == COMPARE_LESS )
  1051. @@ -1396,7 +1396,7 @@ ImplDevFontListData* ImplDevFontList::GetGlyphFallbackFont( FontSelectPattern& r
  1052. cChar = rMissingCodes.iterateCodePoints( &nStrIndex );
  1053. bCached = rFontSelData.mpFontEntry->GetFallbackForUnicode( cChar, rFontSelData.GetWeight(), &rFontSelData.maSearchName );
  1054. // ignore entries which don't have a fallback
  1055. - if( !bCached || (rFontSelData.maSearchName.Len() != 0) )
  1056. + if( !bCached || (rFontSelData.maSearchName.getLength() != 0) )
  1057. break;
  1058. }
  1059.  
  1060. @@ -1406,7 +1406,7 @@ ImplDevFontListData* ImplDevFontList::GetGlyphFallbackFont( FontSelectPattern& r
  1061. // so update rMissingCodes with codepoints not yet resolved by this fallback
  1062. int nRemainingLength = 0;
  1063. sal_UCS4* pRemainingCodes = (sal_UCS4*)alloca( rMissingCodes.getLength() * sizeof(sal_UCS4) );
  1064. - String aFontName;
  1065. + OUString aFontName;
  1066. while( nStrIndex < rMissingCodes.getLength() )
  1067. {
  1068. cChar = rMissingCodes.iterateCodePoints( &nStrIndex );
  1069. @@ -1424,7 +1424,7 @@ ImplDevFontListData* ImplDevFontList::GetGlyphFallbackFont( FontSelectPattern& r
  1070. // apply outdev3.cxx specific fontname normalization
  1071. GetEnglishSearchFontName( rFontSelData.maSearchName );
  1072. else
  1073. - rFontSelData.maSearchName = String();
  1074. + rFontSelData.maSearchName = OUString();
  1075.  
  1076. //See fdo#32665 for an example. FreeSerif that has glyphs in normal
  1077. //font, but not in the italic or bold version
  1078. @@ -1443,7 +1443,7 @@ ImplDevFontListData* ImplDevFontList::GetGlyphFallbackFont( FontSelectPattern& r
  1079. break;
  1080. cChar = aOldMissingCodes.iterateCodePoints( &nStrIndex );
  1081. }
  1082. - if( rFontSelData.maSearchName.Len() != 0 )
  1083. + if( rFontSelData.maSearchName.getLength() != 0 )
  1084. {
  1085. // remove cache entries that were still not resolved
  1086. for( nStrIndex = 0; nStrIndex < rMissingCodes.getLength(); )
  1087. @@ -1456,7 +1456,7 @@ ImplDevFontListData* ImplDevFontList::GetGlyphFallbackFont( FontSelectPattern& r
  1088. }
  1089.  
  1090. // find the matching device font
  1091. - if( rFontSelData.maSearchName.Len() != 0 )
  1092. + if( rFontSelData.maSearchName.getLength() != 0 )
  1093. pFallbackData = FindFontFamily( rFontSelData.maSearchName );
  1094. }
  1095.  
  1096. @@ -1478,7 +1478,7 @@ ImplDevFontListData* ImplDevFontList::GetGlyphFallbackFont( FontSelectPattern& r
  1097.  
  1098. void ImplDevFontList::Add( PhysicalFontFace* pNewData )
  1099. {
  1100. - String aSearchName = pNewData->GetFamilyName();
  1101. + OUString aSearchName = pNewData->GetFamilyName();
  1102. GetEnglishSearchFontName( aSearchName );
  1103.  
  1104. DevFontList::const_iterator it = maDevFontList.find( aSearchName );
  1105. @@ -1501,7 +1501,7 @@ void ImplDevFontList::Add( PhysicalFontFace* pNewData )
  1106. // -----------------------------------------------------------------------
  1107.  
  1108. // find the font from the normalized font family name
  1109. -ImplDevFontListData* ImplDevFontList::ImplFindBySearchName( const String& rSearchName ) const
  1110. +ImplDevFontListData* ImplDevFontList::ImplFindBySearchName( const OUString& rSearchName ) const
  1111. {
  1112. #ifdef DEBUG
  1113. String aTempName = rSearchName;
  1114. @@ -1536,12 +1536,12 @@ ImplDevFontListData* ImplDevFontList::ImplFindByAliasName(const rtl::OUString& r
  1115. while( it != maDevFontList.end() )
  1116. {
  1117. ImplDevFontListData* pData = (*it).second;
  1118. - if( !pData->maMapNames.Len() )
  1119. + if( !pData->maMapNames.getLength() )
  1120. continue;
  1121.  
  1122. // if one alias name matches we found a matching font
  1123. rtl::OUString aTempName;
  1124. - xub_StrLen nIndex = 0;
  1125. + sal_Int32 nIndex = 0;
  1126. do
  1127. {
  1128. aTempName = GetNextFontToken( pData->maMapNames, nIndex );
  1129. @@ -1549,7 +1549,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByAliasName(const rtl::OUString& r
  1130. if ( (aTempName == rSearchName) || (aTempName == rShortName) )
  1131. return pData;
  1132. }
  1133. - while ( nIndex != STRING_NOTFOUND );
  1134. + while ( nIndex != -1 );
  1135. }
  1136.  
  1137. return NULL;
  1138. @@ -1560,7 +1560,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByAliasName(const rtl::OUString& r
  1139. ImplDevFontListData* ImplDevFontList::FindFontFamily( const String& rFontName ) const
  1140. {
  1141. // normalize the font fomily name and
  1142. - String aName = rFontName;
  1143. + OUString aName = rFontName;
  1144. GetEnglishSearchFontName( aName );
  1145. ImplDevFontListData* pFound = ImplFindBySearchName( aName );
  1146. return pFound;
  1147. @@ -1573,10 +1573,10 @@ ImplDevFontListData* ImplDevFontList::ImplFindByTokenNames(const rtl::OUString&
  1148. ImplDevFontListData* pFoundData = NULL;
  1149.  
  1150. // use normalized font name tokens to find the font
  1151. - for( xub_StrLen nTokenPos = 0; nTokenPos != STRING_NOTFOUND; )
  1152. + for( sal_Int32 nTokenPos = 0; nTokenPos != -1; )
  1153. {
  1154. - String aSearchName = GetNextFontToken( rTokenStr, nTokenPos );
  1155. - if( !aSearchName.Len() )
  1156. + OUString aSearchName = GetNextFontToken( rTokenStr, nTokenPos );
  1157. + if( !aSearchName.getLength() )
  1158. continue;
  1159. GetEnglishSearchFontName( aSearchName );
  1160. pFoundData = ImplFindBySearchName( aSearchName );
  1161. @@ -1597,7 +1597,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindBySubstFontAttr( const utl::FontNa
  1162. ::std::vector< String >::const_iterator it = rFontAttr.Substitutions.begin();
  1163. for(; it != rFontAttr.Substitutions.end(); ++it )
  1164. {
  1165. - String aSearchName( *it );
  1166. + OUString aSearchName( *it );
  1167. GetEnglishSearchFontName( aSearchName );
  1168.  
  1169. pFoundData = ImplFindBySearchName( aSearchName );
  1170. @@ -2199,8 +2199,8 @@ size_t FontSelectPatternAttributes::hashCode() const
  1171. size_t nHash = aFontNameHash( maSearchName );
  1172. #ifdef ENABLE_GRAPHITE
  1173. // check for features and generate a unique hash if necessary
  1174. - if (maTargetName.Search(grutils::GrFeatureParser::FEAT_PREFIX)
  1175. - != STRING_NOTFOUND)
  1176. + if (maTargetName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX)
  1177. + != -1)
  1178. {
  1179. nHash = aFontNameHash( maTargetName );
  1180. }
  1181. @@ -2299,9 +2299,9 @@ bool ImplFontCache::IFSD_Equal::operator()(const FontSelectPattern& rA, const Fo
  1182.  
  1183. #ifdef ENABLE_GRAPHITE
  1184. // check for features
  1185. - if ((rA.maTargetName.Search(grutils::GrFeatureParser::FEAT_PREFIX)
  1186. + if ((rA.maTargetName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX)
  1187. != STRING_NOTFOUND ||
  1188. - rB.maTargetName.Search(grutils::GrFeatureParser::FEAT_PREFIX)
  1189. + rB.maTargetName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX)
  1190. != STRING_NOTFOUND) && rA.maTargetName != rB.maTargetName)
  1191. return false;
  1192. #endif
  1193. @@ -2498,8 +2498,8 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern& rFSD,
  1194. nSubstFlags |= FONT_SUBSTITUTE_SCREENONLY;
  1195.  
  1196. bool bMultiToken = false;
  1197. - xub_StrLen nTokenPos = 0;
  1198. - String& aSearchName = rFSD.maSearchName; // TODO: get rid of reference
  1199. + sal_Int32 nTokenPos = 0;
  1200. + OUString& aSearchName = rFSD.maSearchName; // TODO: get rid of reference
  1201. for(;;)
  1202. {
  1203. rFSD.maTargetName = GetNextFontToken( rFSD.GetFamilyName(), nTokenPos );
  1204. @@ -2508,11 +2508,11 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern& rFSD,
  1205. #ifdef ENABLE_GRAPHITE
  1206. // Until features are properly supported, they are appended to the
  1207. // font name, so we need to strip them off so the font is found.
  1208. - xub_StrLen nFeat = aSearchName.Search(grutils::GrFeatureParser::FEAT_PREFIX);
  1209. + xub_StrLen nFeat = aSearchName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX);
  1210. String aOrigName = rFSD.maTargetName;
  1211. - String aBaseFontName(aSearchName, 0, (nFeat != STRING_NOTFOUND)?nFeat:aSearchName.Len());
  1212. + String aBaseFontName(aSearchName, 0, (nFeat != STRING_NOTFOUND)?nFeat:aSearchName.getLength());
  1213. if (nFeat != STRING_NOTFOUND && STRING_NOTFOUND !=
  1214. - aSearchName.Search(grutils::GrFeatureParser::FEAT_ID_VALUE_SEPARATOR, nFeat))
  1215. + aSearchName.indexOf(grutils::GrFeatureParser::FEAT_ID_VALUE_SEPARATOR, nFeat))
  1216. {
  1217. aSearchName = aBaseFontName;
  1218. rFSD.maTargetName = aBaseFontName;
  1219. @@ -2525,23 +2525,23 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern& rFSD,
  1220. // #114999# special emboldening for Ricoh fonts
  1221. // TODO: smarter check for special cases by using PreMatch infrastructure?
  1222. if( (rFSD.GetWeight() > WEIGHT_MEDIUM)
  1223. - && aSearchName.EqualsAscii( "hg", 0, 2) )
  1224. - {
  1225. - String aBoldName;
  1226. - if( aSearchName.EqualsAscii( "hggothicb", 0, 9) )
  1227. - aBoldName = String("hggothice");
  1228. - else if( aSearchName.EqualsAscii( "hgpgothicb", 0, 10) )
  1229. - aBoldName = String("hgpgothice");
  1230. - else if( aSearchName.EqualsAscii( "hgminchol", 0, 9) )
  1231. - aBoldName = String("hgminchob");
  1232. - else if( aSearchName.EqualsAscii( "hgpminchol", 0, 10) )
  1233. - aBoldName = String("hgpminchob");
  1234. - else if( aSearchName.EqualsAscii( "hgminchob" ) )
  1235. - aBoldName = String("hgminchoe");
  1236. - else if( aSearchName.EqualsAscii( "hgpminchob" ) )
  1237. - aBoldName = String("hgpminchoe");
  1238. -
  1239. - if( aBoldName.Len() && ImplFindBySearchName( aBoldName ) )
  1240. + && aSearchName.equalsIgnoreAsciiCase( "hg" ) )
  1241. + {
  1242. + OUString aBoldName;
  1243. + if( aSearchName.equalsIgnoreAsciiCase( "hggothicb" ) )
  1244. + aBoldName = OUString("hggothice");
  1245. + else if( aSearchName.equalsIgnoreAsciiCase( "hgpgothicb" ) )
  1246. + aBoldName = OUString("hgpgothice");
  1247. + else if( aSearchName.equalsIgnoreAsciiCase( "hgminchol" ) )
  1248. + aBoldName = OUString("hgminchob");
  1249. + else if( aSearchName.equalsIgnoreAsciiCase( "hgpminchol" ) )
  1250. + aBoldName = OUString("hgpminchob");
  1251. + else if( aSearchName.equalsIgnoreAsciiCase( "hgminchob" ) )
  1252. + aBoldName = OUString("hgminchoe");
  1253. + else if( aSearchName.equalsIgnoreAsciiCase( "hgpminchob" ) )
  1254. + aBoldName = OUString("hgpminchoe");
  1255. +
  1256. + if( aBoldName.getLength() && ImplFindBySearchName( aBoldName ) )
  1257. {
  1258. // the other font is available => use it
  1259. aSearchName = aBoldName;
  1260. @@ -2597,7 +2597,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern& rFSD,
  1261. return pFoundData;
  1262.  
  1263. // break after last font name token was checked unsuccessfully
  1264. - if( nTokenPos == STRING_NOTFOUND)
  1265. + if( nTokenPos == -1 )
  1266. break;
  1267. bMultiToken = true;
  1268. }
  1269. @@ -2607,7 +2607,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern& rFSD,
  1270. // available when there is a matching entry in the Tools->Options->Fonts
  1271. // dialog witho neither ALWAYS nor SCREENONLY flags set and the substitution
  1272. // font is available
  1273. - for( nTokenPos = 0; nTokenPos != STRING_NOTFOUND; )
  1274. + for( nTokenPos = 0; nTokenPos != -1; )
  1275. {
  1276. if( bMultiToken )
  1277. {
  1278. @@ -2616,7 +2616,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern& rFSD,
  1279. GetEnglishSearchFontName( aSearchName );
  1280. }
  1281. else
  1282. - nTokenPos = STRING_NOTFOUND;
  1283. + nTokenPos = -1;
  1284. if( mpPreMatchHook )
  1285. if( mpPreMatchHook->FindFontSubstitute( rFSD ) )
  1286. GetEnglishSearchFontName( aSearchName );
  1287. @@ -2640,7 +2640,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern& rFSD,
  1288. String aSearchFamilyName;
  1289. FontWeight eSearchWeight = rFSD.GetWeight();
  1290. FontWidth eSearchWidth = rFSD.GetWidthType();
  1291. - sal_uLong nSearchType = 0;
  1292. + sal_uLong nSearchType = 0;
  1293. FontSubstConfiguration::getMapName( aSearchName, aSearchShortName, aSearchFamilyName,
  1294. eSearchWeight, eSearchWidth, nSearchType );
  1295.  
  1296. @@ -2670,7 +2670,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern& rFSD,
  1297.  
  1298. // use font fallback
  1299. const FontNameAttr* pFontAttr = NULL;
  1300. - if( aSearchName.Len() )
  1301. + if( aSearchName.getLength() )
  1302. {
  1303. // get fallback info using FontSubstConfiguration and
  1304. // the target name, it's shortened name and family name in that order
  1305. @@ -2701,10 +2701,10 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern& rFSD,
  1306. }
  1307.  
  1308. // now try the other font name tokens
  1309. - while( nTokenPos != STRING_NOTFOUND )
  1310. + while( nTokenPos != -1 )
  1311. {
  1312. index 20c1d36..0842a01 100644
  1313. --- a/vcl/inc/outdev.h
  1314. +++ b/vcl/inc/outdev.h
  1315. @@ -54,9 +54,9 @@ public:
  1316. ImplDevFontListData( const String& rSearchName );
  1317. ~ImplDevFontListData();
  1318.  
  1319. - const String& GetFamilyName() const { return maName; }
  1320. + const OUString& GetFamilyName() const { return maName; }
  1321. const String& GetSearchName() const { return maSearchName; }
  1322. - const String& GetAliasNames() const { return maMapNames; }
  1323. + const OUString& GetAliasNames() const { return maMapNames; }
  1324. bool IsScalable() const { return mpFirst->IsScalable(); }
  1325. int GetMinQuality() const { return mnMinQuality; }
  1326.  
  1327. @@ -73,9 +73,9 @@ public:
  1328. private:
  1329. friend class ImplDevFontList; // TODO: remove soon
  1330. PhysicalFontFace* mpFirst; // linked list of physical font faces
  1331. - String maName; // Fontname (original font family name)
  1332. + OUString maName; // Fontname (original font family name)
  1333. String maSearchName; // normalized font family name
  1334. - String maMapNames; // fontname aliases
  1335. + OUString maMapNames; // fontname aliases
  1336. sal_uIntPtr mnTypeFaces; // Typeface Flags
  1337. sal_uIntPtr mnMatchType; // MATCH - Type
  1338. String maMatchFamilyName; // MATCH - FamilyName
  1339. @@ -148,13 +148,13 @@ protected:
  1340.  
  1341. struct ImplFontSubstEntry
  1342. {
  1343. - String maName;
  1344. - String maReplaceName;
  1345. - String maSearchName;
  1346. - String maSearchReplaceName;
  1347. - sal_uInt16 mnFlags;
  1348. + String maName;
  1349. :
Advertisement
Add Comment
Please, Sign In to add comment