diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-07-01 10:33:48 -0500 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-07-02 07:31:30 +0000 |
commit | 6a08067902ddc0ec61a7c7b4b0035b303f643a50 (patch) | |
tree | cd49d1824cd169d9d224925b836eaa70de27414e /vcl | |
parent | 82a1d75ee59c46e6bb361b98c520cc4eff2e770c (diff) |
OUString convertion for unotools
Change-Id: Ifae7f344e3827875e32afa3cda23c771f5735707
Reviewed-on: https://gerrit.libreoffice.org/4659
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/edit/xtextedt.cxx | 12 | ||||
-rw-r--r-- | vcl/source/gdi/font.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/outdev3.cxx | 20 |
3 files changed, 19 insertions, 17 deletions
diff --git a/vcl/source/edit/xtextedt.cxx b/vcl/source/edit/xtextedt.cxx index ace53c7de387..3cc021f7a20a 100644 --- a/vcl/source/edit/xtextedt.cxx +++ b/vcl/source/edit/xtextedt.cxx @@ -166,9 +166,9 @@ sal_Bool ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& bForward ? ( nNode <= nEndNode) : ( nNode >= nEndNode ); bForward ? nNode++ : nNode-- ) { - String aText = GetText( nNode ); - sal_uInt16 nStartPos = 0; - sal_uInt16 nEndPos = aText.Len(); + OUString aText = GetText( nNode ); + sal_Int32 nStartPos = 0; + sal_Int32 nEndPos = aText.getLength(); if ( nNode == nStartNode ) { if ( bForward ) @@ -185,9 +185,9 @@ sal_Bool ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& } if ( bForward ) - bFound = aSearcher.SearchFrwrd( aText, &nStartPos, &nEndPos ); + bFound = aSearcher.SearchForward( aText, &nStartPos, &nEndPos ); else - bFound = aSearcher.SearchBkwrd( aText, &nEndPos, &nStartPos ); + bFound = aSearcher.SearchBackward( aText, &nEndPos, &nStartPos ); if ( bFound ) { @@ -197,7 +197,7 @@ sal_Bool ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& rSel.GetEnd().GetIndex() = nEndPos; // Select over the paragraph? // FIXME This should be max long... - if( nEndPos == sal::static_int_cast<sal_uInt16>(-1) ) // sal_uInt16 for 0 and -1 ! + if( nEndPos == -1) { if ( (rSel.GetEnd().GetPara()+1) < GetParagraphCount() ) { diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx index 94c64e10f806..eb678f62312a 100644 --- a/vcl/source/gdi/font.cxx +++ b/vcl/source/gdi/font.cxx @@ -153,8 +153,8 @@ void Impl_Font::AskConfig() // prepare the FontSubst configuration lookup const utl::FontSubstConfiguration& rFontSubst = utl::FontSubstConfiguration::get(); - String aShortName; - String aFamilyName; + OUString aShortName; + OUString aFamilyName; sal_uLong nType = 0; FontWeight eWeight = WEIGHT_DONTKNOW; FontWidth eWidthType = WIDTH_DONTKNOW; diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index 999f703ebf7c..6809232b0c1d 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -1071,10 +1071,12 @@ bool ImplDevFontListData::AddFontFace( PhysicalFontFace* pNewData ) void ImplDevFontListData::InitMatchData( const utl::FontSubstConfiguration& rFontSubst, const String& rSearchName ) { - String aShortName; + OUString aShortName; + OUString aMatchFamilyName(maMatchFamilyName); // get font attributes from the decorated font name - rFontSubst.getMapName( rSearchName, aShortName, maMatchFamilyName, + rFontSubst.getMapName( rSearchName, aShortName, aMatchFamilyName, meMatchWeight, meMatchWidth, mnMatchType ); + maMatchFamilyName = aMatchFamilyName; const FontNameAttr* pFontAttr = rFontSubst.getSubstInfo( rSearchName ); // eventually use the stripped name if( !pFontAttr ) @@ -1483,7 +1485,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindBySubstFontAttr( const utl::FontNa ImplDevFontListData* pFoundData = NULL; // use the font substitutions suggested by the FontNameAttr to find the font - ::std::vector< String >::const_iterator it = rFontAttr.Substitutions.begin(); + ::std::vector< OUString >::const_iterator it = rFontAttr.Substitutions.begin(); for(; it != rFontAttr.Substitutions.end(); ++it ) { OUString aSearchName( *it ); @@ -2501,8 +2503,8 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern& rFSD, GetEnglishSearchFontName( aSearchName ); } - String aSearchShortName; - String aSearchFamilyName; + OUString aSearchShortName; + OUString aSearchFamilyName; FontWeight eSearchWeight = rFSD.GetWeight(); FontWidth eSearchWidth = rFSD.GetWidthType(); sal_uLong nSearchType = 0; @@ -2521,8 +2523,8 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern& rFSD, a korean bitmap font that is not suitable here. Use the font replacement table, that automatically leads to the desired "HG Mincho Light J". Same story for MS Gothic, there are thai and korean "Gothic" fonts, so we even prefer Andale */ - static String aMS_Mincho( "msmincho" ); - static String aMS_Gothic( "msgothic" ); + static OUString aMS_Mincho( "msmincho" ); + static OUString aMS_Gothic( "msgothic" ); if ((aSearchName != aMS_Mincho) && (aSearchName != aMS_Gothic)) // TODO: add heuristic to only throw out the fake ms* fonts #endif @@ -2574,8 +2576,8 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern& rFSD, aSearchName = rFSD.maTargetName; GetEnglishSearchFontName( aSearchName ); - String aTempShortName; - String aTempFamilyName; + OUString aTempShortName; + OUString aTempFamilyName; sal_uLong nTempType = 0; FontWeight eTempWeight = rFSD.GetWeight(); FontWidth eTempWidth = WIDTH_DONTKNOW; |