diff options
author | Armin Le Grand <alg@apache.org> | 2012-07-26 16:02:57 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2012-07-26 16:02:57 +0000 |
commit | c3f714be4453789706df803568dca9aa3086ed01 (patch) | |
tree | c832fb56f9434bbc7e023d21fa5b2916fd058ace /cui | |
parent | 0c170376f7e1896455f439237055e39df020e7ae (diff) |
#116001# TextToFitSize item/property optimized to boolean
Notes
Notes:
ignore: reverted
Diffstat (limited to 'cui')
-rw-r--r-- | cui/inc/pch/precompiled_cui.hxx | 1 | ||||
-rw-r--r-- | cui/source/tabpages/textattr.cxx | 14 |
2 files changed, 6 insertions, 9 deletions
diff --git a/cui/inc/pch/precompiled_cui.hxx b/cui/inc/pch/precompiled_cui.hxx index 7219eba0aec2..cb7e3dd301e1 100644 --- a/cui/inc/pch/precompiled_cui.hxx +++ b/cui/inc/pch/precompiled_cui.hxx @@ -217,7 +217,6 @@ #include "com/sun/star/drawing/TextAdjust.hpp" #include "com/sun/star/drawing/TextAnimationDirection.hpp" #include "com/sun/star/drawing/TextAnimationKind.hpp" -#include "com/sun/star/drawing/TextFitToSizeType.hpp" #include "com/sun/star/drawing/TextHorizontalAdjust.hpp" #include "com/sun/star/drawing/TextVerticalAdjust.hpp" #include "com/sun/star/drawing/TextureKind.hpp" diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index 606585d96f75..827317bc2099 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -347,9 +347,8 @@ void __EXPORT SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) // Am Rahmen anpassen if ( rAttrs.GetItemState( SDRATTR_TEXT_FITTOSIZE ) != SFX_ITEM_DONTCARE ) { - SdrFitToSizeType eFTS = (SdrFitToSizeType) - ( ( const SdrTextFitToSizeTypeItem& )rAttrs.Get( SDRATTR_TEXT_FITTOSIZE ) ).GetValue(); - aTsbFitToSize.SetState( eFTS == SDRTEXTFIT_NONE ? STATE_NOCHECK : STATE_CHECK ); + const sal_Bool bFTS = ( ( const SdrTextFitToSizeTypeItem& )rAttrs.Get( SDRATTR_TEXT_FITTOSIZE ) ).GetValue(); + aTsbFitToSize.SetState( bFTS ? STATE_CHECK : STATE_NOCHECK ); aTsbFitToSize.EnableTriState( sal_False ); } else @@ -443,16 +442,15 @@ sal_Bool SvxTextAttrPage::FillItemSet( SfxItemSet& rAttrs) eState = aTsbFitToSize.GetState(); if( eState != aTsbFitToSize.GetSavedValue() ) { - SdrFitToSizeType eFTS; + sal_Bool bFTS; switch( eState ) { default: ; //prevent warning DBG_ERROR( "svx::SvxTextAttrPage::FillItemSet(), unhandled state!" ); - case STATE_NOCHECK: eFTS = SDRTEXTFIT_NONE; break; - //case STATE_CHECK: eFTS = SDRTEXTFIT_RESIZEATTR; break; - case STATE_CHECK: eFTS = SDRTEXTFIT_PROPORTIONAL; break; + case STATE_NOCHECK: bFTS = sal_False; break; + case STATE_CHECK: bFTS = sal_True; break; } - rAttrs.Put( SdrTextFitToSizeTypeItem( eFTS ) ); + rAttrs.Put( SdrTextFitToSizeTypeItem( bFTS ) ); } // zentriert |