diff options
Diffstat (limited to 'sd/source/ui/view/drtxtob.cxx')
-rw-r--r-- | sd/source/ui/view/drtxtob.cxx | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index f285f815ad96..d65fa4320775 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -30,6 +30,7 @@ #include <editeng/editeng.hxx> #include <editeng/outliner.hxx> #include <editeng/unolingu.hxx> +#include <editeng/kernitem.hxx> #include <vcl/vclenum.hxx> #include <sfx2/app.hxx> #include <svl/whiter.hxx> @@ -128,10 +129,30 @@ TextObjectBar::~TextObjectBar() SetRepeatTarget(NULL); } +void TextObjectBar::GetCharState( SfxItemSet& rSet ) +{ + SfxItemSet aCharAttrSet( mpView->GetDoc().GetPool() ); + mpView->GetAttributes( aCharAttrSet ); + + SfxItemSet aNewAttr( mpViewShell->GetPool(),EE_ITEMS_START,EE_ITEMS_END); + + aNewAttr.Put(aCharAttrSet, sal_False); + rSet.Put(aNewAttr, sal_False); + + SvxKerningItem aKern = ( (const SvxKerningItem&) aCharAttrSet.Get( EE_CHAR_KERNING ) ); + //aKern.SetWhich(SID_ATTR_CHAR_KERNING); + rSet.Put(aKern); + + SfxItemState eState = aCharAttrSet.GetItemState( EE_CHAR_KERNING, sal_True ); + if ( eState == SFX_ITEM_DONTCARE ) + { + rSet.InvalidateItem(EE_CHAR_KERNING); + } +} + /** * Status of attribute items. */ - void TextObjectBar::GetAttrState( SfxItemSet& rSet ) { SfxWhichIter aIter( rSet ); @@ -155,6 +176,8 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) case SID_ATTR_CHAR_FONTHEIGHT: case SID_ATTR_CHAR_WEIGHT: case SID_ATTR_CHAR_POSTURE: + case SID_ATTR_CHAR_SHADOWED: + case SID_ATTR_CHAR_STRIKEOUT: { sal_uInt16 stretchX = 100; sal_uInt16 stretchY = 100; @@ -452,6 +475,8 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) } // paragraph justification + SvxLRSpaceItem aLR = ( (const SvxLRSpaceItem&) aAttrSet.Get( EE_PARA_LRSPACE ) ); + rSet.Put(aLR); SvxAdjust eAdj = ( (const SvxAdjustItem&) aAttrSet.Get( EE_PARA_JUST ) ).GetAdjust(); switch( eAdj ) { @@ -471,6 +496,13 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) break; } + Invalidate(SID_ATTR_PARA_ADJUST_LEFT); + Invalidate(SID_ATTR_PARA_ADJUST_CENTER); + Invalidate(SID_ATTR_PARA_ADJUST_RIGHT); + Invalidate(SID_ATTR_PARA_ADJUST_BLOCK); + Invalidate(SID_ATTR_PARA_LINESPACE); + Invalidate(SID_ATTR_PARA_ULSPACE); + // paragraph text direction if( bDisableParagraphTextDirection ) { @@ -519,6 +551,17 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) } } + SvxLRSpaceItem aLRSpace = ( (const SvxLRSpaceItem&) aAttrSet.Get( EE_PARA_LRSPACE ) ); + aLRSpace.SetWhich(SID_ATTR_PARA_LRSPACE); + rSet.Put(aLRSpace); + Invalidate(SID_ATTR_PARA_LRSPACE); + //Added by xuxu + SfxItemState eState = aAttrSet.GetItemState( EE_PARA_LRSPACE ); + if ( eState == SFX_ITEM_DONTCARE ) + { + rSet.InvalidateItem(EE_PARA_LRSPACE); + rSet.InvalidateItem(SID_ATTR_PARA_LRSPACE); + } sal_uInt16 nLineSpace = (sal_uInt16) ( (const SvxLineSpacingItem&) aAttrSet. Get( EE_PARA_SBL ) ).GetPropLineSpace(); switch( nLineSpace ) |