diff options
author | Philipp Weissenbacher <p.weissenbacher@gmail.com> | 2013-03-26 15:47:41 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-03-26 15:09:10 +0000 |
commit | a5fef4aff586c053486116bcc34cea084457b5e5 (patch) | |
tree | 2b8aa247e1b2d7c74b3fd5de303a330eb132339c /vcl/source/gdi/font.cxx | |
parent | 705f0bb3280b53b4bb789a27f011486d834a01ea (diff) |
Translate German comments, clean up some WS
Change-Id: I1a6a99bb8efe8c3d10973c255040fbbf0f76f27d
Reviewed-on: https://gerrit.libreoffice.org/3057
Reviewed-by: Michael Meeks <michael.meeks@suse.com>
Tested-by: Michael Meeks <michael.meeks@suse.com>
Diffstat (limited to 'vcl/source/gdi/font.cxx')
-rw-r--r-- | vcl/source/gdi/font.cxx | 143 |
1 files changed, 39 insertions, 104 deletions
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx index 1ce1a0dd68a4..50c105dc3ca9 100644 --- a/vcl/source/gdi/font.cxx +++ b/vcl/source/gdi/font.cxx @@ -37,12 +37,8 @@ using namespace vcl; -// ======================================================================= - DBG_NAME( Font ) -// ----------------------------------------------------------------------- - Impl_Font::Impl_Font() : maColor( COL_TRANSPARENT ), maFillColor( COL_TRANSPARENT ) @@ -72,8 +68,6 @@ Impl_Font::Impl_Font() : mbConfigLookup = false; } -// ----------------------------------------------------------------------- - Impl_Font::Impl_Font( const Impl_Font& rImplFont ) : maFamilyName( rImplFont.maFamilyName ), maStyleName( rImplFont.maStyleName ), @@ -106,8 +100,6 @@ Impl_Font::Impl_Font( const Impl_Font& rImplFont ) mbConfigLookup = rImplFont.mbConfigLookup; } -// ----------------------------------------------------------------------- - bool Impl_Font::operator==( const Impl_Font& rOther ) const { // equality tests split up for easier debugging @@ -151,8 +143,6 @@ bool Impl_Font::operator==( const Impl_Font& rOther ) const return true; } -// ----------------------------------------------------------------------- - void Impl_Font::AskConfig() { if( mbConfigLookup ) @@ -225,8 +215,6 @@ void Impl_Font::AskConfig() meWidthType = eWidthType; } -// ======================================================================= - void Font::MakeUnique() { // create a copy if others still reference it @@ -238,8 +226,6 @@ void Font::MakeUnique() } } -// ----------------------------------------------------------------------- - Font::Font() { DBG_CTOR( Font, NULL ); @@ -250,8 +236,6 @@ Font::Font() mpImplFont = &aStaticImplFont; } -// ----------------------------------------------------------------------- - Font::Font( const Font& rFont ) { DBG_CTOR( Font, NULL ); @@ -264,19 +248,15 @@ Font::Font( const Font& rFont ) mpImplFont->mnRefCount++; } -// ----------------------------------------------------------------------- - Font::Font( const String& rFamilyName, const Size& rSize ) { DBG_CTOR( Font, NULL ); - mpImplFont = new Impl_Font; - mpImplFont->maFamilyName= rFamilyName; - mpImplFont->maSize = rSize; + mpImplFont = new Impl_Font; + mpImplFont->maFamilyName = rFamilyName; + mpImplFont->maSize = rSize; } -// ----------------------------------------------------------------------- - Font::Font( const String& rFamilyName, const String& rStyleName, const Size& rSize ) { DBG_CTOR( Font, NULL ); @@ -287,8 +267,6 @@ Font::Font( const String& rFamilyName, const String& rStyleName, const Size& rSi mpImplFont->maSize = rSize; } -// ----------------------------------------------------------------------- - Font::Font( FontFamily eFamily, const Size& rSize ) { DBG_CTOR( Font, NULL ); @@ -298,8 +276,6 @@ Font::Font( FontFamily eFamily, const Size& rSize ) mpImplFont->maSize = rSize; } -// ----------------------------------------------------------------------- - Font::~Font() { DBG_DTOR( Font, NULL ); @@ -315,8 +291,6 @@ Font::~Font() } } -// ----------------------------------------------------------------------- - void Font::SetColor( const Color& rColor ) { DBG_CHKTHIS( Font, NULL ); @@ -328,8 +302,6 @@ void Font::SetColor( const Color& rColor ) } } -// ----------------------------------------------------------------------- - void Font::SetFillColor( const Color& rColor ) { DBG_CHKTHIS( Font, NULL ); @@ -340,8 +312,6 @@ void Font::SetFillColor( const Color& rColor ) mpImplFont->mbTransparent = true; } -// ----------------------------------------------------------------------- - void Font::SetTransparent( sal_Bool bTransparent ) { DBG_CHKTHIS( Font, NULL ); @@ -353,8 +323,6 @@ void Font::SetTransparent( sal_Bool bTransparent ) } } -// ----------------------------------------------------------------------- - void Font::SetAlign( FontAlign eAlign ) { DBG_CHKTHIS( Font, NULL ); @@ -366,8 +334,6 @@ void Font::SetAlign( FontAlign eAlign ) } } -// ----------------------------------------------------------------------- - void Font::SetName( const rtl::OUString& rFamilyName ) { DBG_CHKTHIS( Font, NULL ); @@ -376,8 +342,6 @@ void Font::SetName( const rtl::OUString& rFamilyName ) mpImplFont->maFamilyName = rFamilyName; } -// ----------------------------------------------------------------------- - void Font::SetStyleName( const String& rStyleName ) { DBG_CHKTHIS( Font, NULL ); @@ -386,8 +350,6 @@ void Font::SetStyleName( const String& rStyleName ) mpImplFont->maStyleName = rStyleName; } -// ----------------------------------------------------------------------- - void Font::SetSize( const Size& rSize ) { DBG_CHKTHIS( Font, NULL ); @@ -399,8 +361,6 @@ void Font::SetSize( const Size& rSize ) } } -// ----------------------------------------------------------------------- - void Font::SetFamily( FontFamily eFamily ) { DBG_CHKTHIS( Font, NULL ); @@ -412,8 +372,6 @@ void Font::SetFamily( FontFamily eFamily ) } } -// ----------------------------------------------------------------------- - void Font::SetCharSet( CharSet eCharSet ) { DBG_CHKTHIS( Font, NULL ); @@ -425,8 +383,6 @@ void Font::SetCharSet( CharSet eCharSet ) } } -// ----------------------------------------------------------------------- - void Font::SetLanguage( LanguageType eLanguage ) { DBG_CHKTHIS( Font, NULL ); @@ -438,8 +394,6 @@ void Font::SetLanguage( LanguageType eLanguage ) } } -// ----------------------------------------------------------------------- - void Font::SetCJKContextLanguage( LanguageType eLanguage ) { DBG_CHKTHIS( Font, NULL ); @@ -451,8 +405,6 @@ void Font::SetCJKContextLanguage( LanguageType eLanguage ) } } -// ----------------------------------------------------------------------- - void Font::SetPitch( FontPitch ePitch ) { DBG_CHKTHIS( Font, NULL ); @@ -464,8 +416,6 @@ void Font::SetPitch( FontPitch ePitch ) } } -// ----------------------------------------------------------------------- - void Font::SetOrientation( short nOrientation ) { DBG_CHKTHIS( Font, NULL ); @@ -477,8 +427,6 @@ void Font::SetOrientation( short nOrientation ) } } -// ----------------------------------------------------------------------- - void Font::SetVertical( sal_Bool bVertical ) { DBG_CHKTHIS( Font, NULL ); @@ -490,8 +438,6 @@ void Font::SetVertical( sal_Bool bVertical ) } } -// ----------------------------------------------------------------------- - void Font::SetKerning( FontKerning nKerning ) { DBG_CHKTHIS( Font, NULL ); @@ -503,15 +449,11 @@ void Font::SetKerning( FontKerning nKerning ) } } -// ----------------------------------------------------------------------- - sal_Bool Font::IsKerning() const { return (mpImplFont->mnKerning & KERNING_FONTSPECIFIC) != 0; } -// ----------------------------------------------------------------------- - void Font::SetWeight( FontWeight eWeight ) { DBG_CHKTHIS( Font, NULL ); @@ -523,8 +465,6 @@ void Font::SetWeight( FontWeight eWeight ) } } -// ----------------------------------------------------------------------- - void Font::SetWidthType( FontWidth eWidth ) { DBG_CHKTHIS( Font, NULL ); @@ -536,8 +476,6 @@ void Font::SetWidthType( FontWidth eWidth ) } } -// ----------------------------------------------------------------------- - void Font::SetItalic( FontItalic eItalic ) { DBG_CHKTHIS( Font, NULL ); @@ -549,8 +487,6 @@ void Font::SetItalic( FontItalic eItalic ) } } -// ----------------------------------------------------------------------- - void Font::SetOutline( sal_Bool bOutline ) { DBG_CHKTHIS( Font, NULL ); @@ -562,8 +498,6 @@ void Font::SetOutline( sal_Bool bOutline ) } } -// ----------------------------------------------------------------------- - void Font::SetShadow( sal_Bool bShadow ) { DBG_CHKTHIS( Font, NULL ); @@ -575,8 +509,6 @@ void Font::SetShadow( sal_Bool bShadow ) } } -// ----------------------------------------------------------------------- - void Font::SetUnderline( FontUnderline eUnderline ) { DBG_CHKTHIS( Font, NULL ); @@ -588,8 +520,6 @@ void Font::SetUnderline( FontUnderline eUnderline ) } } -// ----------------------------------------------------------------------- - void Font::SetOverline( FontUnderline eOverline ) { DBG_CHKTHIS( Font, NULL ); @@ -601,8 +531,6 @@ void Font::SetOverline( FontUnderline eOverline ) } } -// ----------------------------------------------------------------------- - void Font::SetStrikeout( FontStrikeout eStrikeout ) { DBG_CHKTHIS( Font, NULL ); @@ -614,8 +542,6 @@ void Font::SetStrikeout( FontStrikeout eStrikeout ) } } -// ----------------------------------------------------------------------- - void Font::SetRelief( FontRelief eRelief ) { DBG_CHKTHIS( Font, NULL ); @@ -627,8 +553,6 @@ void Font::SetRelief( FontRelief eRelief ) } } -// ----------------------------------------------------------------------- - void Font::SetEmphasisMark( FontEmphasisMark eEmphasisMark ) { DBG_CHKTHIS( Font, NULL ); @@ -640,8 +564,6 @@ void Font::SetEmphasisMark( FontEmphasisMark eEmphasisMark ) } } -// ----------------------------------------------------------------------- - void Font::SetWordLineMode( sal_Bool bWordLine ) { DBG_CHKTHIS( Font, NULL ); @@ -653,21 +575,19 @@ void Font::SetWordLineMode( sal_Bool bWordLine ) } } -// ----------------------------------------------------------------------- - Font& Font::operator=( const Font& rFont ) { DBG_CHKTHIS( Font, NULL ); DBG_CHKOBJ( &rFont, Font, NULL ); DBG_ASSERT( rFont.mpImplFont->mnRefCount < 0xFFFE, "Font: RefCount overflow" ); - // Zuerst Referenzcounter erhoehen, damit man sich selbst zuweisen kann - // RefCount == 0 fuer statische Objekte + // Increment RefCount first, so that we can reference ourselves + // RefCount == 0 for static objects if ( rFont.mpImplFont->mnRefCount ) rFont.mpImplFont->mnRefCount++; - // Wenn es keine statischen ImplDaten sind, dann loeschen, wenn es - // die letzte Referenz ist, sonst Referenzcounter decrementieren + // If it's not static ImplData and if it's the last reference, delete it + // else decrement RefCount if ( mpImplFont->mnRefCount ) { if ( mpImplFont->mnRefCount == 1 ) @@ -681,8 +601,6 @@ Font& Font::operator=( const Font& rFont ) return *this; } -// ----------------------------------------------------------------------- - sal_Bool Font::operator==( const Font& rFont ) const { DBG_CHKTHIS( Font, NULL ); @@ -696,8 +614,6 @@ sal_Bool Font::operator==( const Font& rFont ) const return sal_False; } -// ----------------------------------------------------------------------- - void Font::Merge( const Font& rFont ) { if ( rFont.GetName().Len() ) @@ -761,9 +677,6 @@ void Font::GetFontAttributes( ImplFontAttributes& rAttrs ) const rAttrs.SetSymbolFlag( mpImplFont->meCharSet == RTL_TEXTENCODING_SYMBOL ); } - -// ----------------------------------------------------------------------- - SvStream& operator>>( SvStream& rIStm, Impl_Font& rImpl_Font ) { VersionCompat aCompat( rIStm, STREAM_READ ); @@ -809,8 +722,6 @@ SvStream& operator>>( SvStream& rIStm, Impl_Font& rImpl_Font ) return rIStm; } -// ----------------------------------------------------------------------- - SvStream& operator<<( SvStream& rOStm, const Impl_Font& rImpl_Font ) { VersionCompat aCompat( rOStm, STREAM_WRITE, 3 ); @@ -847,22 +758,17 @@ SvStream& operator<<( SvStream& rOStm, const Impl_Font& rImpl_Font ) return rOStm; } -// ----------------------------------------------------------------------- - SvStream& operator>>( SvStream& rIStm, Font& rFont ) { rFont.MakeUnique(); return( rIStm >> *rFont.mpImplFont ); } -// ----------------------------------------------------------------------- - SvStream& operator<<( SvStream& rOStm, const Font& rFont ) { return( rOStm << *rFont.mpImplFont ); } -// ----------------------------------------------------------------------- namespace { bool identifyTrueTypeFont( const void* i_pBuffer, sal_uInt32 i_nSize, Font& o_rResult ) @@ -873,7 +779,7 @@ namespace { TTGlobalFontInfo aInfo; GetTTGlobalFontInfo( pTTF, &aInfo ); - // most important: the family name + // most importantly: the family name if( aInfo.ufamily ) o_rResult.SetName( aInfo.ufamily ); else if( aInfo.family ) @@ -1071,38 +977,67 @@ Font Font::identifyFont( const void* i_pBuffer, sal_uInt32 i_nSize ) return aResult; } -// the inlines from the font.hxx header are now instantiated for pImpl-ification -// TODO: reformat +// The inlines from the font.hxx header are now instantiated for pImpl-ification const Color& Font::GetColor() const { return mpImplFont->maColor; } + const Color& Font::GetFillColor() const { return mpImplFont->maFillColor; } + sal_Bool Font::IsTransparent() const { return mpImplFont->mbTransparent; } + FontAlign Font::GetAlign() const { return mpImplFont->meAlign; } + const String& Font::GetName() const { return mpImplFont->maFamilyName; } + const String& Font::GetStyleName() const { return mpImplFont->maStyleName; } + const Size& Font::GetSize() const { return mpImplFont->maSize; } + void Font::SetHeight( long nHeight ) { SetSize( Size( mpImplFont->maSize.Width(), nHeight ) ); } + long Font::GetHeight() const { return mpImplFont->maSize.Height(); } + void Font::SetWidth( long nWidth ) { SetSize( Size( nWidth, mpImplFont->maSize.Height() ) ); } + long Font::GetWidth() const { return mpImplFont->maSize.Width(); } + rtl_TextEncoding Font::GetCharSet() const { return mpImplFont->meCharSet; } + LanguageType Font::GetLanguage() const { return mpImplFont->meLanguage; } + LanguageType Font::GetCJKContextLanguage() const { return mpImplFont->meCJKLanguage; } + short Font::GetOrientation() const { return mpImplFont->mnOrientation; } + sal_Bool Font::IsVertical() const { return mpImplFont->mbVertical; } + FontKerning Font::GetKerning() const { return mpImplFont->mnKerning; } + FontPitch Font::GetPitch() const { return mpImplFont->GetPitch(); } + FontWeight Font::GetWeight() const { return mpImplFont->GetWeight(); } + FontWidth Font::GetWidthType() const { return mpImplFont->GetWidthType(); } + FontItalic Font::GetItalic() const { return mpImplFont->GetItalic(); } + FontFamily Font::GetFamily() const { return mpImplFont->GetFamily(); } + sal_Bool Font::IsOutline() const { return mpImplFont->mbOutline; } + sal_Bool Font::IsShadow() const { return mpImplFont->mbShadow; } + FontRelief Font::GetRelief() const { return mpImplFont->meRelief; } + FontUnderline Font::GetUnderline() const { return mpImplFont->meUnderline; } + FontUnderline Font::GetOverline() const { return mpImplFont->meOverline; } + FontStrikeout Font::GetStrikeout() const { return mpImplFont->meStrikeout; } + FontEmphasisMark Font::GetEmphasisMark() const { return mpImplFont->meEmphasisMark; } + sal_Bool Font::IsWordLineMode() const { return mpImplFont->mbWordLine; } + sal_Bool Font::IsSameInstance( const Font& rFont ) const { return (mpImplFont == rFont.mpImplFont); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |