diff options
Diffstat (limited to 'sw/source/ui/shells/drwtxtex.cxx')
-rw-r--r-- | sw/source/ui/shells/drwtxtex.cxx | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx index 31760259ed19..c6f20106e601 100644 --- a/sw/source/ui/shells/drwtxtex.cxx +++ b/sw/source/ui/shells/drwtxtex.cxx @@ -29,6 +29,8 @@ #include <tools/shl.hxx> #include <svx/svdview.hxx> #include <editeng/spltitem.hxx> +#include <editeng/lrspitem.hxx> +#include <editeng/ulspitem.hxx> #include <editeng/orphitem.hxx> #include <editeng/formatbreakitem.hxx> #include <editeng/widwitem.hxx> @@ -204,6 +206,33 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) case SID_ATTR_PARA_ADJUST_BLOCK: aNewAttr.Put(SvxAdjustItem(SVX_ADJUST_BLOCK, EE_PARA_JUST)); break; + case SID_ATTR_PARA_LRSPACE: + { + SvxLRSpaceItem aParaMargin((const SvxLRSpaceItem&)rReq. + GetArgs()->Get(nSlot)); + aParaMargin.SetWhich( EE_PARA_LRSPACE ); + aNewAttr.Put(aParaMargin); + rReq.Done(); + } + break; + case SID_ATTR_PARA_LINESPACE: + { + SvxLineSpacingItem aLineSpace = (const SvxLineSpacingItem&)pNewAttrs->Get( + GetPool().GetWhich(nSlot)); + aLineSpace.SetWhich( EE_PARA_SBL ); + aNewAttr.Put( aLineSpace ); + rReq.Done(); + } + break; + case SID_ATTR_PARA_ULSPACE: + { + SvxULSpaceItem aULSpace = (const SvxULSpaceItem&)pNewAttrs->Get( + GetPool().GetWhich(nSlot)); + aULSpace.SetWhich( EE_PARA_ULSPACE ); + aNewAttr.Put( aULSpace ); + rReq.Done(); + } + break; case SID_ATTR_PARA_LINESPACE_10: { @@ -254,6 +283,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) } break; + case SID_CHAR_DLG_EFFECT: case SID_CHAR_DLG: case SID_CHAR_DLG_FOR_PARAGRAPH: { @@ -285,6 +315,10 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg(pView->GetWindow(), *pView, aDlgAttr, 0, sal_True); OSL_ENSURE(pDlg, "Dialogdiet fail!"); + if (nSlot == SID_CHAR_DLG_EFFECT) + { + pDlg->SetCurPageId(TP_CHAR_EXT); + } sal_uInt16 nRet = pDlg->Execute(); if(RET_OK == nRet ) { @@ -586,6 +620,49 @@ ASK_ADJUST: } break; + case SID_ATTR_PARA_LRSPACE: + { + SfxItemState eState = aEditAttr.GetItemState(EE_PARA_LRSPACE); + if( eState >= SFX_ITEM_DEFAULT ) + { + SvxLRSpaceItem aLR = (const SvxLRSpaceItem&) aEditAttr.Get( EE_PARA_LRSPACE ); + aLR.SetWhich(SID_ATTR_PARA_LRSPACE); + rSet.Put(aLR); + } + else + rSet.InvalidateItem(nSlotId); + nSlotId = 0; + } + break; + case SID_ATTR_PARA_LINESPACE: + { + SfxItemState eState = aEditAttr.GetItemState(EE_PARA_SBL); + if( eState >= SFX_ITEM_DEFAULT ) + { + SvxLineSpacingItem aLR = (const SvxLineSpacingItem&) aEditAttr.Get( EE_PARA_SBL ); + rSet.Put(aLR); + } + else + rSet.InvalidateItem(nSlotId); + nSlotId = 0; + } + break; + case SID_ATTR_PARA_ULSPACE: + { + SfxItemState eState = aEditAttr.GetItemState(EE_PARA_ULSPACE); + if( eState >= SFX_ITEM_DEFAULT ) + { + SvxULSpaceItem aULSpace = (const SvxULSpaceItem&) aEditAttr.Get( EE_PARA_ULSPACE ); + aULSpace.SetWhich(SID_ATTR_PARA_ULSPACE); + rSet.Put(aULSpace); + } + else + rSet.InvalidateItem(nSlotId); + Invalidate(SID_ATTR_PARA_ULSPACE); + nSlotId = 0; + } + break; + case SID_ATTR_PARA_LINESPACE_10: nLSpace = 100; goto ASK_LINESPACE; case SID_ATTR_PARA_LINESPACE_15: nLSpace = 150; goto ASK_LINESPACE; case SID_ATTR_PARA_LINESPACE_20: nLSpace = 200; goto ASK_LINESPACE; |