diff options
-rw-r--r-- | include/vcl/font.hxx | 16 | ||||
-rw-r--r-- | starmath/source/rect.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/ctrltool.cxx | 14 | ||||
-rw-r--r-- | svtools/source/misc/sampletext.cxx | 36 | ||||
-rw-r--r-- | sw/source/core/inc/swfont.hxx | 8 | ||||
-rw-r--r-- | sw/source/ui/shells/annotsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/shells/drwtxtsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/shells/textsh.cxx | 2 | ||||
-rw-r--r-- | vcl/inc/impfont.hxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/font.cxx | 12 | ||||
-rw-r--r-- | vcl/source/gdi/outdev3.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 2 |
13 files changed, 53 insertions, 53 deletions
diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx index d886d48b9854..5fea235c65f9 100644 --- a/include/vcl/font.hxx +++ b/include/vcl/font.hxx @@ -48,8 +48,8 @@ private: public: Font(); Font( const Font& ); - Font( const String& rFamilyName, const Size& ); - Font( const String& rFamilyName, const String& rStyleName, const Size& ); + Font( const OUString& rFamilyName, const Size& ); + Font( const OUString& rFamilyName, const OUString& rStyleName, const Size& ); Font( FontFamily eFamily, const Size& ); ~Font(); @@ -60,14 +60,14 @@ public: void SetFillColor( const Color& ); const Color& GetFillColor() const; void SetTransparent( sal_Bool bTransparent ); - sal_Bool IsTransparent() const; + sal_Bool IsTransparent() const; void SetAlign( FontAlign ); FontAlign GetAlign() const; void SetName( const OUString& rFamilyName ); - const String& GetName() const; - void SetStyleName( const String& rStyleName ); - const String& GetStyleName() const; + const OUString& GetName() const; + void SetStyleName( const OUString& rStyleName ); + const OUString& GetStyleName() const; void SetSize( const Size& ); const Size& GetSize() const; void SetHeight( long nHeight ); @@ -89,10 +89,10 @@ public: void SetOrientation( short nLineOrientation ); short GetOrientation() const; void SetVertical( sal_Bool bVertical ); - sal_Bool IsVertical() const; + sal_Bool IsVertical() const; void SetKerning( FontKerning nKerning ); FontKerning GetKerning() const; - sal_Bool IsKerning() const; + sal_Bool IsKerning() const; void SetWeight( FontWeight ); FontWeight GetWeight() const; diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx index 19459867bba6..33bf42110eb0 100644 --- a/starmath/source/rect.cxx +++ b/starmath/source/rect.cxx @@ -133,7 +133,7 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat, aSize = Size(rDev.GetTextWidth(rText), rDev.GetTextHeight()); const FontMetric aFM (rDev.GetFontMetric()); - bool bIsMath = aFM.GetName().EqualsIgnoreCaseAscii( FONTNAME_MATH ); + bool bIsMath = aFM.GetName().equalsIgnoreAsciiCase( FONTNAME_MATH ); bool bAllowSmaller = bIsMath && !SmIsMathAlpha(rText); const long nFontHeight = rDev.GetFont().GetSize().Height(); diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index c90ae7e029ed..39049e2d2a46 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -1295,7 +1295,7 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt ) if (!bSymbolFont) { - const bool bNameBeginsWithLatinText = rInfo.GetName().GetChar(0) <= 'z'; + const bool bNameBeginsWithLatinText = rInfo.GetName()[0] <= 'z'; if (bNameBeginsWithLatinText || !bUsingCorrectFont) sSampleText = makeShortRepresentativeTextForSelectedFont(*rUDEvt.GetDevice()); diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index a6f0298f10d4..026dc945548c 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -123,7 +123,7 @@ static int sortWeightValue(FontWeight eWeight) return 0; // eWeight == WEIGHT_NORMAL } -static StringCompare ImplCompareFontInfo( ImplFontListFontInfo* pInfo1, +static sal_Int32 ImplCompareFontInfo( ImplFontListFontInfo* pInfo1, ImplFontListFontInfo* pInfo2 ) { //Sort non italic before italics @@ -141,7 +141,7 @@ static StringCompare ImplCompareFontInfo( ImplFontListFontInfo* pInfo1, else if ( nWeight1 > nWeight2 ) return COMPARE_GREATER; - return pInfo1->GetStyleName().CompareTo( pInfo2->GetStyleName() ); + return pInfo1->GetStyleName().compareTo( pInfo2->GetStyleName() ); } // ======================================================================= @@ -301,10 +301,10 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, sal_Bool bAll, ImplFontListFontInfo* pNewInfo = new ImplFontListFontInfo( aFontInfo, pDevice ); while ( pTemp ) { - StringCompare eComp = ImplCompareFontInfo( pNewInfo, pTemp ); - if ( (eComp == COMPARE_LESS) || (eComp == COMPARE_EQUAL) ) + sal_Int32 eComp = ImplCompareFontInfo( pNewInfo, pTemp ); + if ( eComp <= 0 ) { - if ( eComp == COMPARE_EQUAL ) + if ( eComp == 0 ) { // Overwrite charset, because charset should match // with the system charset @@ -505,7 +505,7 @@ OUString FontList::GetStyleName(const FontInfo& rInfo) const OUString FontList::GetFontMapText( const FontInfo& rInfo ) const { - if ( !rInfo.GetName().Len() ) + if ( rInfo.GetName().isEmpty() ) { return OUString(); } @@ -777,7 +777,7 @@ const sal_IntPtr* FontList::GetSizeAry( const FontInfo& rInfo ) const } // Falls kein Name, dann Standardgroessen - if ( !rInfo.GetName().Len() ) + if ( rInfo.GetName().isEmpty() ) return aStdSizeAry; // Zuerst nach dem Fontnamen suchen um das Device dann von dem diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx index 0b2f5abd2f64..fc54c0dc35b8 100644 --- a/svtools/source/misc/sampletext.cxx +++ b/svtools/source/misc/sampletext.cxx @@ -15,29 +15,29 @@ bool isOpenSymbolFont(const Font &rFont) { - return rFont.GetName().EqualsIgnoreCaseAscii("starsymbol") || - rFont.GetName().EqualsIgnoreCaseAscii("opensymbol"); + return rFont.GetName().equalsIgnoreAsciiCase("starsymbol") || + rFont.GetName().equalsIgnoreAsciiCase("opensymbol"); } bool isSymbolFont(const Font &rFont) { return (rFont.GetCharSet() == RTL_TEXTENCODING_SYMBOL) || - rFont.GetName().EqualsIgnoreCaseAscii("cmsy10") || - rFont.GetName().EqualsIgnoreCaseAscii("cmex10") || - rFont.GetName().EqualsIgnoreCaseAscii("feta26") || - rFont.GetName().EqualsIgnoreCaseAscii("jsMath-cmsy10") || - rFont.GetName().EqualsIgnoreCaseAscii("jsMath-cmex10") || - rFont.GetName().EqualsIgnoreCaseAscii("msam10") || - rFont.GetName().EqualsIgnoreCaseAscii("msbm10") || - rFont.GetName().EqualsIgnoreCaseAscii("wasy10") || - rFont.GetName().EqualsIgnoreCaseAscii("Denemo") || - rFont.GetName().EqualsIgnoreCaseAscii("GlyphBasic1") || - rFont.GetName().EqualsIgnoreCaseAscii("GlyphBasic2") || - rFont.GetName().EqualsIgnoreCaseAscii("GlyphBasic3") || - rFont.GetName().EqualsIgnoreCaseAscii("GlyphBasic4") || - rFont.GetName().EqualsIgnoreCaseAscii("Letters Laughing") || - rFont.GetName().EqualsIgnoreCaseAscii("MusiQwik") || - rFont.GetName().EqualsIgnoreCaseAscii("MusiSync") || + rFont.GetName().equalsIgnoreAsciiCase("cmsy10") || + rFont.GetName().equalsIgnoreAsciiCase("cmex10") || + rFont.GetName().equalsIgnoreAsciiCase("feta26") || + rFont.GetName().equalsIgnoreAsciiCase("jsMath-cmsy10") || + rFont.GetName().equalsIgnoreAsciiCase("jsMath-cmex10") || + rFont.GetName().equalsIgnoreAsciiCase("msam10") || + rFont.GetName().equalsIgnoreAsciiCase("msbm10") || + rFont.GetName().equalsIgnoreAsciiCase("wasy10") || + rFont.GetName().equalsIgnoreAsciiCase("Denemo") || + rFont.GetName().equalsIgnoreAsciiCase("GlyphBasic1") || + rFont.GetName().equalsIgnoreAsciiCase("GlyphBasic2") || + rFont.GetName().equalsIgnoreAsciiCase("GlyphBasic3") || + rFont.GetName().equalsIgnoreAsciiCase("GlyphBasic4") || + rFont.GetName().equalsIgnoreAsciiCase("Letters Laughing") || + rFont.GetName().equalsIgnoreAsciiCase("MusiQwik") || + rFont.GetName().equalsIgnoreAsciiCase("MusiSync") || isOpenSymbolFont(rFont); } diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx index f57147e22a90..82acffd8b5fb 100644 --- a/sw/source/core/inc/swfont.hxx +++ b/sw/source/core/inc/swfont.hxx @@ -288,8 +288,8 @@ public: FontItalic GetItalic() const { return aSub[nActual].GetItalic(); } LanguageType GetLanguage() const { return aSub[nActual].GetLanguage(); } FontAlign GetAlign() const { return aSub[nActual].GetAlign(); } - const XubString& GetName() const { return aSub[nActual].GetName(); } - const XubString& GetStyleName() const {return aSub[nActual].GetStyleName();} + const OUString& GetName() const { return aSub[nActual].GetName(); } + const OUString& GetStyleName() const {return aSub[nActual].GetStyleName();} FontFamily GetFamily() const { return aSub[nActual].GetFamily(); } FontPitch GetPitch() const { return aSub[nActual].GetPitch(); } rtl_TextEncoding GetCharSet() const { return aSub[nActual].GetCharSet(); } @@ -300,11 +300,11 @@ public: sal_uInt16 GetPropWidth() const { return aSub[nActual].GetPropWidth(); } sal_uInt16 GetOrientation( const sal_Bool nVertLayout = sal_False ) const; - inline const XubString& GetName( const sal_uInt8 nWhich ) const + inline const OUString& GetName( const sal_uInt8 nWhich ) const { return aSub[nWhich].GetName(); } inline LanguageType GetLanguage( const sal_uInt8 nWhich ) const { return aSub[nWhich].GetLanguage(); } - inline const XubString& GetStyleName( const sal_uInt8 nWhich ) const + inline const OUString& GetStyleName( const sal_uInt8 nWhich ) const { return aSub[nWhich].GetStyleName(); } inline FontFamily GetFamily( const sal_uInt8 nWhich ) const { return aSub[nWhich].GetFamily(); } diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index fcb4c3d44130..823bda44515d 100644 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -1754,7 +1754,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) pOLV->ShowCursor(); rReq.AppendItem( SfxStringItem( GetPool().GetWhich(SID_CHARMAP), sSym ) ); - if(aFont.GetName().Len()) + if(!aFont.GetName().isEmpty()) rReq.AppendItem( SfxStringItem( SID_ATTR_SPECIALCHAR, aFont.GetName() ) ); rReq.Done(); } diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx index 935011b6fe25..9f5d599d0a11 100644 --- a/sw/source/ui/shells/drwtxtsh.cxx +++ b/sw/source/ui/shells/drwtxtsh.cxx @@ -811,7 +811,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) pOLV->ShowCursor(); rReq.AppendItem( SfxStringItem( GetPool().GetWhich(SID_CHARMAP), sSym ) ); - if(aFont.GetName().Len()) + if(!aFont.GetName().isEmpty()) rReq.AppendItem( SfxStringItem( SID_ATTR_SPECIALCHAR, aFont.GetName() ) ); rReq.Done(); } diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index 7b74e5b490ca..32120c1a8838 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -1032,7 +1032,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) rSh.Insert( aChars ); // #108876# a font attribute has to be set always due to a guessed script type - if( aNewFont.GetName().Len() ) + if( !aNewFont.GetName().isEmpty() ) { SvxFontItem aNewFontItem( aFont ); aNewFontItem.SetFamilyName( aNewFont.GetName()); diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx index 26a9dd41aed9..4270e9d31d6c 100644 --- a/vcl/inc/impfont.hxx +++ b/vcl/inc/impfont.hxx @@ -54,8 +54,8 @@ private: void AskConfig(); FontRefCount mnRefCount; - String maFamilyName; - String maStyleName; + OUString maFamilyName; + OUString maStyleName; Size maSize; Color maColor; // compatibility, now on output device Color maFillColor; // compatibility, now on output device @@ -230,7 +230,7 @@ public: bool ParseCMAP( const unsigned char* pRawData, int nRawLength, CmapResult& ); -void UpdateAttributesFromPSName( const String& rPSName, ImplDevFontAttributes& ); +void UpdateAttributesFromPSName( const OUString& rPSName, ImplDevFontAttributes& ); #endif // _SV_IMPFONT_HXX diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx index eb678f62312a..3baff68a789c 100644 --- a/vcl/source/gdi/font.cxx +++ b/vcl/source/gdi/font.cxx @@ -249,7 +249,7 @@ Font::Font( const Font& rFont ) mpImplFont->mnRefCount++; } -Font::Font( const String& rFamilyName, const Size& rSize ) +Font::Font( const OUString& rFamilyName, const Size& rSize ) { DBG_CTOR( Font, NULL ); @@ -258,7 +258,7 @@ Font::Font( const String& rFamilyName, const Size& rSize ) mpImplFont->maSize = rSize; } -Font::Font( const String& rFamilyName, const String& rStyleName, const Size& rSize ) +Font::Font( const OUString& rFamilyName, const OUString& rStyleName, const Size& rSize ) { DBG_CTOR( Font, NULL ); @@ -343,7 +343,7 @@ void Font::SetName( const OUString& rFamilyName ) mpImplFont->maFamilyName = rFamilyName; } -void Font::SetStyleName( const String& rStyleName ) +void Font::SetStyleName( const OUString& rStyleName ) { DBG_CHKTHIS( Font, NULL ); @@ -618,7 +618,7 @@ sal_Bool Font::operator==( const Font& rFont ) const void Font::Merge( const Font& rFont ) { - if ( rFont.GetName().Len() ) + if ( !rFont.GetName().isEmpty() ) { SetName( rFont.GetName() ); SetStyleName( rFont.GetStyleName() ); @@ -988,9 +988,9 @@ sal_Bool Font::IsTransparent() const { return mpImplFont->mbTransparent; } FontAlign Font::GetAlign() const { return mpImplFont->meAlign; } -const String& Font::GetName() const { return mpImplFont->maFamilyName; } +const OUString& Font::GetName() const { return mpImplFont->maFamilyName; } -const String& Font::GetStyleName() const { return mpImplFont->maStyleName; } +const OUString& Font::GetStyleName() const { return mpImplFont->maStyleName; } const Size& Font::GetSize() const { return mpImplFont->maSize; } diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index 0f61edfd07e5..33f17abac378 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -523,7 +523,7 @@ Font OutputDevice::GetDefaultFont( sal_uInt16 nType, LanguageType eLang, } // No Name, than set all names - if ( !aFont.GetName().Len() ) + if ( aFont.GetName().isEmpty() ) { if ( nFlags & DEFAULTFONT_FLAGS_ONLYONE ) { diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index baa82e536d8d..af46ba0a6acb 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -4625,7 +4625,7 @@ Font PDFWriterImpl::replaceFont( const Font& rControlFont, const Font& rAppSetF bool bAdjustSize = false; Font aFont( rControlFont ); - if( ! aFont.GetName().Len() ) + if( aFont.GetName().isEmpty() ) { aFont = rAppSetFont; if( rControlFont.GetHeight() ) |