diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-28 16:31:30 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-29 01:59:55 +0000 |
commit | d1a49df6833ff16f5cbaf98534eaae62693e520b (patch) | |
tree | 2bbf60556966b4939f3700cab9d1a6278e6b67f0 /editeng/source/items | |
parent | 6402164182865d7644d2e93158a23e12a6da3926 (diff) |
vcl: add text alignment functions to ImplFont and FontAttributes
ImplFont and FontAttributes now have GetAlignment and SetAlignment,
and I have renamed Font::GetAlign to Font::GetAlignment, and
Font::SetAlign to Font::SetAlignment.
See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor
and mutator for font scaling in FontMetric") for reasoning behind
patch.
Unit test added to vcl/qa/cppunit/font.cxx to test text alignment.
Change-Id: I6272c84fc9416c90616d957d1897eba9469fe7ba
Reviewed-on: https://gerrit.libreoffice.org/21876
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'editeng/source/items')
-rw-r--r-- | editeng/source/items/bulitem.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index 09f37e929d1b..2f258620279c 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -44,7 +44,7 @@ void SvxBulletItem::StoreFont( SvStream& rStream, const vcl::Font& rFont ) rStream.WriteUInt16( nTemp ); nTemp = (sal_uInt16)rFont.GetPitch(); rStream.WriteUInt16( nTemp ); - nTemp = (sal_uInt16)rFont.GetAlign(); rStream.WriteUInt16( nTemp ); + nTemp = (sal_uInt16)rFont.GetAlignment(); rStream.WriteUInt16( nTemp ); nTemp = (sal_uInt16)rFont.GetWeight(); rStream.WriteUInt16( nTemp ); nTemp = (sal_uInt16)rFont.GetUnderline(); rStream.WriteUInt16( nTemp ); nTemp = (sal_uInt16)rFont.GetStrikeout(); rStream.WriteUInt16( nTemp ); @@ -73,7 +73,7 @@ vcl::Font SvxBulletItem::CreateFont( SvStream& rStream, sal_uInt16 nVer ) aFont.SetCharSet((rtl_TextEncoding)nTemp); rStream.ReadUInt16( nTemp ); aFont.SetPitch((FontPitch)nTemp); - rStream.ReadUInt16( nTemp ); aFont.SetAlign((FontAlign)nTemp); + rStream.ReadUInt16( nTemp ); aFont.SetAlignment((FontAlign)nTemp); rStream.ReadUInt16( nTemp ); aFont.SetWeight((FontWeight)nTemp); rStream.ReadUInt16( nTemp ); aFont.SetUnderline((FontUnderline)nTemp); rStream.ReadUInt16( nTemp ); aFont.SetStrikeout((FontStrikeout)nTemp); @@ -202,7 +202,7 @@ SfxPoolItem* SvxBulletItem::Create( SvStream& rStrm, sal_uInt16 /*nVersion*/ ) c void SvxBulletItem::SetDefaultFont_Impl() { aFont = OutputDevice::GetDefaultFont( DefaultFontType::FIXED, LANGUAGE_SYSTEM, GetDefaultFontFlags::NONE ); - aFont.SetAlign( ALIGN_BOTTOM); + aFont.SetAlignment( ALIGN_BOTTOM); aFont.SetTransparent( true ); } |