diff options
Diffstat (limited to 'sc/source/ui/view/editsh.cxx')
-rw-r--r-- | sc/source/ui/view/editsh.cxx | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index aade068f089c..fd3418811b5c 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -34,6 +34,7 @@ #include <editeng/flditem.hxx> #include <editeng/fontitem.hxx> #include <svx/hlnkitem.hxx> +#include <sfx2/sidebar/EnumContext.hxx> #include <editeng/postitem.hxx> #include <editeng/scripttypeitem.hxx> #include <editeng/shdditem.hxx> @@ -96,6 +97,7 @@ ScEditShell::ScEditShell(EditView* pView, ScViewData* pData) : SetPool( pEditView->GetEditEngine()->GetEmptyItemSet().GetPool() ); SetUndoManager( &pEditView->GetEditEngine()->GetUndoManager() ); SetName(OUString("EditCell")); + SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_EditCell)); } ScEditShell::~ScEditShell() @@ -311,6 +313,17 @@ void ScEditShell::Execute( SfxRequest& rReq ) pTableView->SetSelection(ESelection(0,0,nPar-1,nLen)); if (pTopView) pTopView->SetSelection(ESelection(0,0,nPar-1,nLen)); + rBindings.Invalidate( SID_ATTR_CHAR_FONT ); + rBindings.Invalidate( SID_ATTR_CHAR_FONTHEIGHT ); + rBindings.Invalidate( SID_ATTR_CHAR_WEIGHT ); + rBindings.Invalidate( SID_ATTR_CHAR_POSTURE ); + rBindings.Invalidate( SID_ATTR_CHAR_UNDERLINE ); + rBindings.Invalidate( SID_ATTR_CHAR_STRIKEOUT ); + rBindings.Invalidate( SID_ATTR_CHAR_SHADOWED ); + rBindings.Invalidate( SID_ATTR_CHAR_KERNING ); + rBindings.Invalidate( SID_ATTR_CHAR_COLOR ); + rBindings.Invalidate( SID_SET_SUPER_SCRIPT ); + rBindings.Invalidate( SID_SET_SUB_SCRIPT ); } bSetModified = sal_False; } @@ -434,6 +447,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) } break; + case SID_CHAR_DLG_EFFECT: case SID_CHAR_DLG: { SfxItemSet aAttrs( pTableView->GetAttribs() ); @@ -446,6 +460,10 @@ void ScEditShell::Execute( SfxRequest& rReq ) SfxAbstractTabDialog* pDlg = pFact->CreateScCharDlg( pViewData->GetDialogParent(), &aAttrs, pObjSh, RID_SCDLG_CHAR ); OSL_ENSURE(pDlg, "Dialog create fail!"); + if (nSlot == SID_CHAR_DLG_EFFECT) + { + pDlg->SetCurPageId(RID_SVXPAGE_CHAR_EFFECTS); + } short nRet = pDlg->Execute(); // pDlg is needed below @@ -987,6 +1005,15 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq) rBindings.Invalidate( nSlot ); } break; + case SID_ATTR_CHAR_KERNING: + { + if(pArgs) + { + aSet.Put ( pArgs->Get(pArgs->GetPool()->GetWhich(nSlot))); + rBindings.Invalidate( nSlot ); + } + } + break; } // @@ -1073,6 +1100,27 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet) ScInputHandler* pHdl = GetMyInputHdl(); if ( pHdl && pHdl->IsFormulaMode() ) rSet.ClearItem( EE_CHAR_WEIGHT ); // hervorgehobene Klammern hier nicht + + SvxEscapement eEsc = (SvxEscapement) ( (const SvxEscapementItem&) + aAttribs.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue(); + if( eEsc == SVX_ESCAPEMENT_SUPERSCRIPT ) + { + rSet.Put( SfxBoolItem( SID_SET_SUPER_SCRIPT, sal_True ) ); + } + else if( eEsc == SVX_ESCAPEMENT_SUBSCRIPT ) + { + rSet.Put( SfxBoolItem( SID_SET_SUB_SCRIPT, sal_True ) ); + } + pViewData->GetBindings().Invalidate( SID_SET_SUPER_SCRIPT ); + pViewData->GetBindings().Invalidate( SID_SET_SUB_SCRIPT ); + + eState = aAttribs.GetItemState( EE_CHAR_KERNING, sal_True ); + pViewData->GetBindings().Invalidate( SID_ATTR_CHAR_KERNING ); + if ( eState == SFX_ITEM_DONTCARE ) + { + // rSet.InvalidateItem( SID_ATTR_CHAR_KERNING ); + rSet.InvalidateItem(EE_CHAR_KERNING); + } } String ScEditShell::GetSelectionText( sal_Bool bWholeWord ) |