diff options
author | Malte Timmermann <mt@openoffice.org> | 2001-11-27 16:31:09 +0000 |
---|---|---|
committer | Malte Timmermann <mt@openoffice.org> | 2001-11-27 16:31:09 +0000 |
commit | ea0b75528e0db09bf8d90c77d8898e09bec3462f (patch) | |
tree | f91ccda24c0c810348c3a5beac7d7dc1c3119636 /svx/source/editeng/editdoc.cxx | |
parent | Bug #95010#: set at the stacktype attrset the correct parent, #91596#: set th... (diff) | |
download | core-ea0b75528e0db09bf8d90c77d8898e09bec3462f.tar.gz core-ea0b75528e0db09bf8d90c77d8898e09bec3462f.zip |
#95195# CreateFont, Escapenemt: DFLT_ESC_AUTO_ ...
Diffstat (limited to 'svx/source/editeng/editdoc.cxx')
-rw-r--r-- | svx/source/editeng/editdoc.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/svx/source/editeng/editdoc.cxx b/svx/source/editeng/editdoc.cxx index 1122d33241b4..8904626a7b08 100644 --- a/svx/source/editeng/editdoc.cxx +++ b/svx/source/editeng/editdoc.cxx @@ -2,9 +2,9 @@ * * $RCSfile: editdoc.cxx,v $ * - * $Revision: 1.22 $ + * $Revision: 1.23 $ * - * last change: $Author: mt $ $Date: 2001-11-26 15:38:21 $ + * last change: $Author: mt $ $Date: 2001-11-27 17:31:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1263,8 +1263,15 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, BOOL bSearchInParent ) rFont.SetShadow( ((const SvxShadowedItem&)rSet.Get( EE_CHAR_SHADOW )).GetValue() ); if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_ESCAPEMENT ) == SFX_ITEM_ON ) ) { - rFont.SetEscapement( ((const SvxEscapementItem&)rSet.Get( EE_CHAR_ESCAPEMENT)).GetEsc() ); - rFont.SetPropr( ((const SvxEscapementItem&)rSet.Get( EE_CHAR_ESCAPEMENT)).GetProp() ); + USHORT nProp = ((const SvxEscapementItem&)rSet.Get( EE_CHAR_ESCAPEMENT)).GetProp(); + rFont.SetPropr( (BYTE)nProp ); + + short nEsc = ((const SvxEscapementItem&)rSet.Get( EE_CHAR_ESCAPEMENT)).GetEsc(); + if ( nEsc == DFLT_ESC_AUTO_SUPER ) + nEsc = 100 - nProp; + else if ( nEsc == DFLT_ESC_AUTO_SUB ) + nEsc = -( 100 - nProp ); + rFont.SetEscapement( nEsc ); } if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_PAIRKERNING ) == SFX_ITEM_ON ) ) rFont.SetKerning( ((const SvxAutoKernItem&)rSet.Get( EE_CHAR_PAIRKERNING )).GetValue() ); |