[Libreoffice-commits] core.git: vcl/inc vcl/source
Chris Sherlock
chris.sherlock79 at gmail.com
Fri Jan 22 15:29:34 PST 2016
vcl/inc/impfont.hxx | 43 +++++++++++++++++++++++++++----------------
vcl/source/font/font.cxx | 43 ++++++++++++++++++++++---------------------
2 files changed, 49 insertions(+), 37 deletions(-)
New commits:
commit d8df6631ac173a920be834096c522014732ac151
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Sat Jan 23 03:33:55 2016 +1100
vcl: reorder and correctly initialize ImplFont private variables
Change-Id: I12b4f066c71ab5a0506c833b688fae741d0a5a8b
Reviewed-on: https://gerrit.libreoffice.org/21718
Tested-by: Chris Sherlock <chris.sherlock79 at gmail.com>
Reviewed-by: Chris Sherlock <chris.sherlock79 at gmail.com>
diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx
index c6667ef..d3bc42c 100644
--- a/vcl/inc/impfont.hxx
+++ b/vcl/inc/impfont.hxx
@@ -88,24 +88,22 @@ public:
private:
friend class vcl::Font;
+ friend SvStream& ReadImplFont( SvStream& rIStm, ImplFont& );
+ friend SvStream& WriteImplFont( SvStream& rOStm, const ImplFont& );
+
void AskConfig();
sal_uInt32 mnRefCount;
+
+ // Device independent variables
OUString maFamilyName;
OUString maStyleName;
- Size maSize;
- Color maColor; // compatibility, now on output device
- Color maFillColor; // compatibility, now on output device
- rtl_TextEncoding meCharSet;
- bool mbSymbol;
- LanguageTag maLanguageTag;
- LanguageTag maCJKLanguageTag;
+ FontWeight meWeight;
FontFamily meFamily;
FontPitch mePitch;
- TextAlign meAlign;
- FontWeight meWeight;
FontWidth meWidthType;
FontItalic meItalic;
+ TextAlign meAlign;
FontUnderline meUnderline;
FontUnderline meOverline;
FontStrikeout meStrikeout;
@@ -113,21 +111,34 @@ private:
FontEmphasisMark meEmphasisMark;
short mnOrientation;
FontKerning mnKerning;
- bool mbWordLine:1,
+ Size maSize;
+ rtl_TextEncoding meCharSet;
+
+ LanguageTag maLanguageTag;
+ LanguageTag maCJKLanguageTag;
+
+ // Flags - device independent
+ bool mbSymbol:1,
mbOutline:1,
mbConfigLookup:1, // there was a config lookup
mbShadow:1,
mbVertical:1,
- mbTransparent:1, // compatibility, now on output device
- mbDevice:1,
+ mbTransparent:1; // compatibility, now on output device
+
+ // deprecated variables - device independent
+ Color maColor; // compatibility, now on output device
+ Color maFillColor; // compatibility, now on output device
+
+ // Device dependent variables
+ OUString maMapNames;
+ bool mbWordLine:1,
mbEmbeddable:1,
mbSubsettable:1,
- mbRotatable:1; // is "rotatable" even a word?!? I'll keep it for consistency for now
+ mbRotatable:1, // is "rotatable" even a word?!? I'll keep it for consistency for now
+ mbDevice:1;
+
int mnQuality;
- OUString maMapNames;
- friend SvStream& ReadImplFont( SvStream& rIStm, ImplFont& );
- friend SvStream& WriteImplFont( SvStream& rOStm, const ImplFont& );
};
#endif // INCLUDED_VCL_INC_IMPFONT_HXX
diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx
index 994df92..8efdd1e 100644
--- a/vcl/source/font/font.cxx
+++ b/vcl/source/font/font.cxx
@@ -841,18 +841,12 @@ bool Font::IsSameInstance( const vcl::Font& rFont ) const { return (mpImplFont =
ImplFont::ImplFont() :
mnRefCount( 1 ),
- maColor( COL_TRANSPARENT ),
- maFillColor( COL_TRANSPARENT ),
- meCharSet( RTL_TEXTENCODING_DONTKNOW ),
- mbSymbol( false ),
- maLanguageTag( LANGUAGE_DONTKNOW ),
- maCJKLanguageTag( LANGUAGE_DONTKNOW ),
+ meWeight( WEIGHT_DONTKNOW ),
meFamily( FAMILY_DONTKNOW ),
mePitch( PITCH_DONTKNOW ),
- meAlign( ALIGN_TOP ),
- meWeight( WEIGHT_DONTKNOW ),
meWidthType( WIDTH_DONTKNOW ),
meItalic( ITALIC_NONE ),
+ meAlign( ALIGN_TOP ),
meUnderline( UNDERLINE_NONE ),
meOverline( UNDERLINE_NONE ),
meStrikeout( STRIKEOUT_NONE ),
@@ -860,16 +854,22 @@ ImplFont::ImplFont() :
meEmphasisMark( EMPHASISMARK_NONE ),
mnOrientation( 0 ),
mnKerning( FontKerning::NONE ),
- mbWordLine( false ),
+ meCharSet( RTL_TEXTENCODING_DONTKNOW ),
+ maLanguageTag( LANGUAGE_DONTKNOW ),
+ maCJKLanguageTag( LANGUAGE_DONTKNOW ),
+ mbSymbol( false ),
mbOutline( false ),
mbConfigLookup( false ),
mbShadow( false ),
mbVertical( false ),
mbTransparent( true ),
- mbDevice( false ),
+ maColor( COL_TRANSPARENT ),
+ maFillColor( COL_TRANSPARENT ),
+ mbWordLine( false ),
mbEmbeddable( false ),
mbSubsettable( false ),
mbRotatable( false ),
+ mbDevice( false ),
mnQuality( 0 )
{}
@@ -877,19 +877,12 @@ ImplFont::ImplFont( const ImplFont& rImplFont ) :
mnRefCount( 1 ),
maFamilyName( rImplFont.maFamilyName ),
maStyleName( rImplFont.maStyleName ),
- maSize( rImplFont.maSize ),
- maColor( rImplFont.maColor ),
- maFillColor( rImplFont.maFillColor ),
- meCharSet( rImplFont.meCharSet ),
- mbSymbol( false ),
- maLanguageTag( rImplFont.maLanguageTag ),
- maCJKLanguageTag( rImplFont.maCJKLanguageTag ),
+ meWeight( rImplFont.meWeight ),
meFamily( rImplFont.meFamily ),
mePitch( rImplFont.mePitch ),
- meAlign( rImplFont.meAlign ),
- meWeight( rImplFont.meWeight ),
meWidthType( rImplFont.meWidthType ),
meItalic( rImplFont.meItalic ),
+ meAlign( rImplFont.meAlign ),
meUnderline( rImplFont.meUnderline ),
meOverline( rImplFont.meOverline ),
meStrikeout( rImplFont.meStrikeout ),
@@ -897,16 +890,24 @@ ImplFont::ImplFont( const ImplFont& rImplFont ) :
meEmphasisMark( rImplFont.meEmphasisMark ),
mnOrientation( rImplFont.mnOrientation ),
mnKerning( rImplFont.mnKerning ),
- mbWordLine( rImplFont.mbWordLine ),
+ maSize( rImplFont.maSize ),
+ meCharSet( rImplFont.meCharSet ),
+ maLanguageTag( rImplFont.maLanguageTag ),
+ maCJKLanguageTag( rImplFont.maCJKLanguageTag ),
+ mbSymbol( rImplFont.mbSymbol ),
mbOutline( rImplFont.mbOutline ),
mbConfigLookup( rImplFont.mbConfigLookup ),
mbShadow( rImplFont.mbShadow ),
mbVertical( rImplFont.mbVertical ),
mbTransparent( rImplFont.mbTransparent ),
- mbDevice( rImplFont.mbDevice ),
+ maColor( rImplFont.maColor ),
+ maFillColor( rImplFont.maFillColor ),
+ maMapNames( rImplFont.maMapNames ),
+ mbWordLine( rImplFont.mbWordLine ),
mbEmbeddable( rImplFont.mbEmbeddable ),
mbSubsettable( rImplFont.mbSubsettable ),
mbRotatable( rImplFont.mbRotatable ),
+ mbDevice( rImplFont.mbDevice ),
mnQuality( rImplFont.mnQuality )
{}
More information about the Libreoffice-commits
mailing list