From d02f75a8c36705924ddd6a5921fe3012fafce812 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Wed, 10 Apr 2013 08:20:16 +0000 Subject: Resolves: #i121420# merge sidebar feature (cherry picked from commit 0a0a9b32aa5bf1ce2554ad37cbba3c7a105db2b5) Conflicts: chart2/source/controller/dialogs/dlg_View3D.cxx chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx chart2/source/controller/drawinglayer/ViewElementListProvider.cxx chart2/source/controller/inc/ViewElementListProvider.hxx chart2/source/controller/inc/dlg_View3D.hxx chart2/source/controller/main/ShapeController.cxx chart2/source/inc/chartview/DrawModelWrapper.hxx chart2/source/view/main/DrawModelWrapper.cxx cui/source/inc/border.hxx cui/source/inc/cuitabarea.hxx cui/source/inc/cuitabline.hxx cui/source/inc/sdrcelldlg.hxx cui/source/inc/treeopt.hxx cui/source/options/optchart.cxx cui/source/options/optchart.hxx cui/source/options/optcolor.cxx cui/source/options/treeopt.cxx cui/source/tabpages/backgrnd.cxx cui/source/tabpages/border.cxx cui/source/tabpages/chardlg.cxx cui/source/tabpages/numpages.cxx cui/source/tabpages/tpcolor.cxx cui/source/tabpages/tplneend.cxx editeng/inc/editeng/outliner.hxx extensions/source/propctrlr/standardcontrol.cxx framework/source/register/registerservices.cxx offapi/com/sun/star/ui/makefile.mk officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu officecfg/registry/data/org/openoffice/Office/UI/makefile.mk officecfg/registry/schema/org/openoffice/Office/UI/makefile.mk postprocess/packregistry/makefile.mk reportdesign/source/ui/dlg/Condition.cxx reportdesign/source/ui/misc/UITools.cxx sc/inc/document.hxx sc/inc/helpids.h sc/inc/sc.hrc sc/prj/build.lst sc/sdi/scalc.sdi sc/source/core/data/documen9.cxx sc/source/core/data/drwlayer.cxx sc/source/ui/app/scdll.cxx sc/source/ui/app/typemap.cxx sc/source/ui/dbgui/scendlg.cxx sc/source/ui/docshell/docsh2.cxx sc/source/ui/docshell/docsh4.cxx sc/source/ui/drawfunc/chartsh.cxx sc/source/ui/drawfunc/drawsh.cxx sc/source/ui/drawfunc/drawsh2.cxx sc/source/ui/drawfunc/drawsh4.cxx sc/source/ui/drawfunc/drformsh.cxx sc/source/ui/drawfunc/drtxtob.cxx sc/source/ui/drawfunc/drtxtob1.cxx sc/source/ui/drawfunc/drtxtob2.cxx sc/source/ui/drawfunc/graphsh.cxx sc/source/ui/drawfunc/oleobjsh.cxx sc/source/ui/inc/chartsh.hxx sc/source/ui/inc/formatsh.hxx sc/source/ui/miscdlgs/tabbgcolordlg.cxx sc/source/ui/navipi/navipi.cxx sc/source/ui/optdlg/opredlin.cxx sc/source/ui/optdlg/tpview.cxx sc/source/ui/sidebar/makefile.mk sc/source/ui/view/auditsh.cxx sc/source/ui/view/cellsh.cxx sc/source/ui/view/editsh.cxx sc/source/ui/view/formatsh.cxx sc/source/ui/view/pivotsh.cxx sc/source/ui/view/tabvwsh.cxx sc/util/makefile.mk sd/inc/sdabstdlg.hxx sd/prj/build.lst sd/sdi/ToolPanelViewShell.sdi sd/sdi/makefile.mk sd/source/ui/accessibility/makefile.mk sd/source/ui/animations/CustomAnimationDialog.cxx sd/source/ui/dlg/PaneChildWindows.cxx sd/source/ui/dlg/PaneShells.cxx sd/source/ui/dlg/copydlg.cxx sd/source/ui/dlg/navigatr.cxx sd/source/ui/dlg/sddlgfact.cxx sd/source/ui/dlg/sddlgfact.hxx sd/source/ui/docshell/docshel3.cxx sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx sd/source/ui/framework/factories/TaskPanelFactory.cxx sd/source/ui/framework/factories/TaskPanelFactory.hxx sd/source/ui/framework/factories/ViewShellWrapper.cxx sd/source/ui/framework/factories/makefile.mk sd/source/ui/framework/module/ImpressModule.cxx sd/source/ui/framework/module/ToolPanelModule.cxx sd/source/ui/framework/tools/FrameworkHelper.cxx sd/source/ui/func/fuolbull.cxx sd/source/ui/inc/DrawViewShell.hxx sd/source/ui/inc/PaneChildWindows.hxx sd/source/ui/inc/celltempl.hxx sd/source/ui/inc/copydlg.hxx sd/source/ui/inc/dlgpage.hxx sd/source/ui/inc/framework/FrameworkHelper.hxx sd/source/ui/inc/prltempl.hxx sd/source/ui/inc/tabtempl.hxx sd/source/ui/inc/taskpane/ILayoutableWindow.hxx sd/source/ui/inc/taskpane/PanelId.hxx sd/source/ui/inc/tpaction.hxx sd/source/ui/sidebar/AllMasterPagesSelector.cxx sd/source/ui/sidebar/AllMasterPagesSelector.hxx sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx sd/source/ui/sidebar/DocumentHelper.cxx sd/source/ui/sidebar/DocumentHelper.hxx sd/source/ui/sidebar/LayoutMenu.cxx sd/source/ui/sidebar/LayoutMenu.hxx sd/source/ui/sidebar/MasterPageContainer.cxx sd/source/ui/sidebar/MasterPageContainer.hxx sd/source/ui/sidebar/MasterPageContainerFiller.cxx sd/source/ui/sidebar/MasterPageContainerFiller.hxx sd/source/ui/sidebar/MasterPageContainerProviders.cxx sd/source/ui/sidebar/MasterPageContainerProviders.hxx sd/source/ui/sidebar/MasterPageContainerQueue.cxx sd/source/ui/sidebar/MasterPageContainerQueue.hxx sd/source/ui/sidebar/MasterPageDescriptor.cxx sd/source/ui/sidebar/MasterPageDescriptor.hxx sd/source/ui/sidebar/MasterPageObserver.cxx sd/source/ui/sidebar/MasterPagesSelector.cxx sd/source/ui/sidebar/MasterPagesSelector.hxx sd/source/ui/sidebar/PreviewValueSet.cxx sd/source/ui/sidebar/PreviewValueSet.hxx sd/source/ui/sidebar/RecentMasterPagesSelector.cxx sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx sd/source/ui/sidebar/SidebarShellManager.cxx sd/source/ui/sidebar/SlideTransitionPanel.hxx sd/source/ui/sidebar/makefile.mk sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx sd/source/ui/table/TableDesignPane.hxx sd/source/ui/toolpanel/ControlContainer.cxx sd/source/ui/toolpanel/ControlContainerDescriptor.hxx sd/source/ui/toolpanel/MethodGuard.hxx sd/source/ui/toolpanel/ScrollPanel.cxx sd/source/ui/toolpanel/SlideSorterCacheDisplay.cxx sd/source/ui/toolpanel/SubToolPanel.cxx sd/source/ui/toolpanel/TaskPaneFocusManager.cxx sd/source/ui/toolpanel/TaskPaneTreeNode.cxx sd/source/ui/toolpanel/TitleBar.cxx sd/source/ui/toolpanel/TitledControl.cxx sd/source/ui/toolpanel/ToolPanel.cxx sd/source/ui/toolpanel/ToolPanel.hxx sd/source/ui/toolpanel/ToolPanelFactory.cxx sd/source/ui/toolpanel/ToolPanelUIElement.cxx sd/source/ui/toolpanel/ToolPanelUIElement.hxx sd/source/ui/toolpanel/ToolPanelViewShell.cxx sd/source/ui/toolpanel/controls/CustomAnimationPanel.cxx sd/source/ui/toolpanel/controls/CustomAnimationPanel.hxx sd/source/ui/toolpanel/controls/MasterPagesPanel.cxx sd/source/ui/toolpanel/controls/MasterPagesPanel.hxx sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx sd/source/ui/toolpanel/controls/SlideTransitionPanel.hxx sd/source/ui/toolpanel/controls/TableDesignPanel.cxx sd/source/ui/toolpanel/controls/TableDesignPanel.hxx sd/source/ui/unoidl/UnoDocumentSettings.cxx sd/source/ui/view/ViewShellBase.cxx sd/source/ui/view/drtxtob.cxx sd/source/ui/view/drviews3.cxx sd/source/ui/view/drviews7.cxx sd/source/ui/view/drviewsa.cxx sd/source/ui/view/drviewsf.cxx sd/source/ui/view/outlnvsh.cxx sd/source/ui/view/sdview.cxx sd/source/ui/view/viewshel.cxx sd/uiconfig/sdraw/menubar/menubar.xml sd/util/makefile.mk sfx2/Package_inc.mk sfx2/inc/sfx2/sfx.hrc sfx2/inc/sfx2/sfxsids.hrc sfx2/source/control/bindings.cxx sfx2/source/dialog/templdlg.cxx sfx2/source/inc/templdgi.hxx svx/AllLangResTarget_svx.mk svx/Package_inc.mk svx/inc/svx/XPropertyTable.hxx svx/inc/svx/bmpmask.hxx svx/inc/svx/colrctrl.hxx svx/inc/svx/dialogs.hrc svx/inc/svx/dlgctrl.hxx svx/inc/svx/dlgutil.hxx svx/inc/svx/drawitem.hxx svx/inc/svx/fontwork.hxx svx/inc/svx/galbrws.hxx svx/inc/svx/sdr/table/tablecontroller.hxx svx/inc/svx/svdmodel.hxx svx/inc/svx/svdstr.hrc svx/inc/svx/svxids.hrc svx/inc/svx/svxitems.hrc svx/inc/svx/xattr.hxx svx/inc/svx/xflgrit.hxx svx/inc/svx/xflhtit.hxx svx/inc/svx/xit.hxx svx/inc/svx/xlineit.hxx svx/inc/svx/xlndsit.hxx svx/inc/svx/xlnedit.hxx svx/inc/svx/xlnstit.hxx svx/inc/svx/xtable.hxx svx/sdi/svx.sdi svx/source/dialog/_bmpmask.cxx svx/source/dialog/dialcontrol.cxx svx/source/dialog/dlgctrl.cxx svx/source/dialog/dlgutil.cxx svx/source/dialog/fontwork.cxx svx/source/gallery2/galbrws.cxx svx/source/gallery2/galbrws1.cxx svx/source/gallery2/gallery1.cxx svx/source/items/drawitem.cxx svx/source/items/svxitems.src svx/source/sdr/attribute/sdrformtextattribute.cxx svx/source/sidebar/ColorPanel.hxx svx/source/sidebar/EmptyPanel.hrc svx/source/sidebar/EmptyPanel.hxx svx/source/sidebar/gallery/GalleryPanel.hxx svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdmodel.cxx svx/source/svdraw/svdogrp.cxx svx/source/svdraw/svdstr.src svx/source/tbxctrls/tbcontrl.cxx svx/source/unodraw/XPropertyTable.cxx svx/source/unodraw/unoctabl.cxx svx/source/xoutdev/XPropertyEntry.cxx svx/source/xoutdev/xattr.cxx svx/source/xoutdev/xattr2.cxx svx/source/xoutdev/xtabbtmp.cxx svx/source/xoutdev/xtabcolr.cxx svx/source/xoutdev/xtabdash.cxx svx/source/xoutdev/xtabgrdt.cxx svx/source/xoutdev/xtabhtch.cxx svx/source/xoutdev/xtable.cxx svx/source/xoutdev/xtablend.cxx svx/util/svx.component sw/inc/cmdid.h sw/inc/docsh.hxx sw/inc/editsh.hxx sw/inc/helpid.h sw/inc/rcid.hrc sw/inc/swabstdlg.hxx sw/inc/swcommands.h sw/sdi/swriter.sdi sw/source/core/doc/docdesc.cxx sw/source/core/draw/drawdoc.cxx sw/source/ui/app/docsh2.cxx sw/source/ui/app/docshdrw.cxx sw/source/ui/app/docshini.cxx sw/source/ui/app/docst.cxx sw/source/ui/config/optpage.cxx sw/source/ui/dialog/swdlgfact.cxx sw/source/ui/dialog/swdlgfact.hxx sw/source/ui/fmtui/tmpdlg.cxx sw/source/ui/inc/tmpdlg.hxx sw/source/ui/misc/pggrid.cxx sw/source/ui/shells/annotsh.cxx sw/source/ui/shells/basesh.cxx sw/source/ui/shells/beziersh.cxx sw/source/ui/shells/drawdlg.cxx sw/source/ui/shells/drawsh.cxx sw/source/ui/shells/drformsh.cxx sw/source/ui/shells/drwbassh.cxx sw/source/ui/shells/drwtxtex.cxx sw/source/ui/shells/drwtxtsh.cxx sw/source/ui/shells/frmsh.cxx sw/source/ui/shells/grfsh.cxx sw/source/ui/shells/olesh.cxx sw/source/ui/shells/tabsh.cxx sw/source/ui/shells/textsh.cxx sw/source/ui/shells/textsh1.cxx sw/source/ui/shells/txtnum.cxx sw/source/ui/uiview/viewtab.cxx sw/source/ui/uno/unofreg.cxx sw/source/ui/utlui/navipi.cxx sw/util/sw.component vcl/inc/vcl/split.hxx vcl/inc/vcl/window.hxx vcl/inc/window.h vcl/source/window/split.cxx vcl/source/window/window.cxx vcl/source/window/window4.cxx Change-Id: Idebaff59f9d60e4e93290cefefdda4c5a1e9215e Resolves: #i122194# Adapted license text in propertypanel.hrc then renamed it to ResourceDefinitions.hrc (cherry picked from commit e952d1401c1adc41934118ba7f542611ef9da11b) Conflicts: sfx2/Package_inc.mk sfx2/source/sidebar/SidebarChildWindow.cxx svx/source/sidebar/graphic/GraphicPropertyPanel.cxx svx/source/sidebar/line/LinePropertyPanel.cxx svx/source/sidebar/possize/PosSizePropertyPanel.cxx sw/source/ui/sidebar/PagePropertyPanel.src sw/source/ui/sidebar/WrapPropertyPanel.src Change-Id: Ie009056a78ab108556717a501399c83b477b3548 Resolves: #i122194# finally I got the correct file name Change-Id: If7a075af8c9a829f6f0a69f883c5c6d4ac97ba2a More merge changes for optional sidebar: revert toolpanel removal, restore and re-enable task pane remove apparently un-used SidebarFactory module add extra visibility annotation to ItemReceiverUpdate --- sc/source/ui/view/auditsh.cxx | 3 +- sc/source/ui/view/cellsh.cxx | 3 + sc/source/ui/view/cellsh3.cxx | 8 + sc/source/ui/view/drawview.cxx | 7 + sc/source/ui/view/editsh.cxx | 48 ++++ sc/source/ui/view/formatsh.cxx | 529 ++++++++++++++++++++++++++++++++++++++++- sc/source/ui/view/gridwin.cxx | 26 ++ sc/source/ui/view/pivotsh.cxx | 2 + sc/source/ui/view/tabview3.cxx | 27 +++ sc/source/ui/view/tabvwsh.cxx | 2 + sc/source/ui/view/tabvwsh4.cxx | 5 + sc/source/ui/view/viewfunc.cxx | 5 + 12 files changed, 651 insertions(+), 14 deletions(-) (limited to 'sc/source/ui/view') diff --git a/sc/source/ui/view/auditsh.cxx b/sc/source/ui/view/auditsh.cxx index ea6d75cda660..136f15523203 100644 --- a/sc/source/ui/view/auditsh.cxx +++ b/sc/source/ui/view/auditsh.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include "auditsh.hxx" #include "tabvwsh.hxx" @@ -61,6 +62,7 @@ ScAuditingShell::ScAuditingShell(ScViewData* pData) : } SetHelpId( HID_SCSHELL_AUDIT ); SetName(OUString("Auditing")); + SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Auditing)); } //------------------------------------------------------------------------ @@ -137,5 +139,4 @@ void ScAuditingShell::GetState( SfxItemSet& rSet ) rSet.Put( SfxBoolItem( nFunction, sal_True ) ); // aktive Funktion markieren } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index 47dc5ed61128..06856778bbf9 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -33,7 +33,9 @@ #include #include #include +#include #include +#include #include #include "cellsh.hxx" @@ -79,6 +81,7 @@ ScCellShell::ScCellShell(ScViewData* pData) : { SetHelpId(HID_SCSHELL_CELLSH); SetName(OUString("Cell")); + SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Cell)); } ScCellShell::~ScCellShell() diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index cf82d0eb70f9..81c58f6a6401 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -357,6 +357,14 @@ void ScCellShell::Execute( SfxRequest& rReq ) pTabViewShell->ExecuteCellFormatDlg(rReq, "alignment"); break; + case SID_CELL_FORMAT_BORDER: + pTabViewShell->ExecuteCellFormatDlg( rReq, "borders" ); + break; + + case SID_CHAR_DLG_EFFECT: + pTabViewShell->ExecuteCellFormatDlg( rReq, "fonteffects" ); + break; + case SID_OPENDLG_SOLVE: { sal_uInt16 nId = ScSolverDlgWrapper::GetChildWindowId(); diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx index e249e8c884dc..c664cbde1515 100644 --- a/sc/source/ui/view/drawview.cxx +++ b/sc/source/ui/view/drawview.cxx @@ -177,6 +177,10 @@ void ScDrawView::InvalidateDrawTextAttrs() rBindings.Invalidate( SID_ULINE_VAL_DOTTED ); rBindings.Invalidate( SID_ATTR_CHAR_OVERLINE ); rBindings.Invalidate( SID_ATTR_CHAR_COLOR ); + rBindings.Invalidate( SID_ATTR_PARA_ADJUST_LEFT ); + rBindings.Invalidate( SID_ATTR_PARA_ADJUST_RIGHT ); + rBindings.Invalidate( SID_ATTR_PARA_ADJUST_BLOCK ); + rBindings.Invalidate( SID_ATTR_PARA_ADJUST_CENTER); rBindings.Invalidate( SID_ALIGNLEFT ); rBindings.Invalidate( SID_ALIGNCENTERHOR ); rBindings.Invalidate( SID_ALIGNRIGHT ); @@ -186,6 +190,9 @@ void ScDrawView::InvalidateDrawTextAttrs() rBindings.Invalidate( SID_ATTR_PARA_LINESPACE_20 ); rBindings.Invalidate( SID_SET_SUPER_SCRIPT ); rBindings.Invalidate( SID_SET_SUB_SCRIPT ); + rBindings.Invalidate( SID_ATTR_CHAR_KERNING ); + rBindings.Invalidate( SID_ATTR_CHAR_STRIKEOUT ); + rBindings.Invalidate( SID_ATTR_CHAR_SHADOWED ); rBindings.Invalidate( SID_TEXTDIRECTION_LEFT_TO_RIGHT ); rBindings.Invalidate( SID_TEXTDIRECTION_TOP_TO_BOTTOM ); rBindings.Invalidate( SID_ATTR_PARA_LEFT_TO_RIGHT ); 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 #include #include +#include #include #include #include @@ -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 ) diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 656f6080be47..398075107cd2 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -22,6 +22,7 @@ #include #include "scitems.hxx" +#include #include #include @@ -1016,13 +1017,96 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq ) break; case SID_NUMBER_FORMAT: - if ( pReqArgs ) + //if ( pReqArgs ) + //{ + // const SfxPoolItem* pItem; + // if(pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET) + // { + // String aCode = ((const SfxStringItem*)pItem)->GetValue(); + // pTabViewShell->SetNumFmtByStr( aCode ); + // } + //} + + // symphony version with format interpretation + if(pReqArgs) { const SfxPoolItem* pItem; - if(pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET) + ScDocument* pDoc = pViewData->GetDocument(); + SvNumberFormatter* pFormatter = pDoc->GetFormatTable(); + LanguageType eLanguage = ScGlobal::eLnge; + sal_Int16 eType = -1; + sal_uInt32 nCurrentNumberFormat; + + pDoc->GetNumberFormat(pViewData->GetCurX(), pViewData->GetCurY(), pViewData->GetTabNo(), nCurrentNumberFormat); + const SvNumberformat* pEntry = pFormatter->GetEntry(nCurrentNumberFormat); + + if(pEntry) + { + eLanguage = pEntry->GetLanguage(); + eType = pEntry->GetType(); + } + + //Just use eType to judge whether the command is fired for NUMBER/PERCENT/CURRENCY + //In sidebar, users can fire SID_NUMBER_FORMAT command by operating the related UI controls before they are disable + switch(eType) + { + case NUMBERFORMAT_ALL: + case NUMBERFORMAT_NUMBER: + case NUMBERFORMAT_NUMBER| NUMBERFORMAT_DEFINED: + case NUMBERFORMAT_PERCENT: + case NUMBERFORMAT_PERCENT| NUMBERFORMAT_DEFINED: + case NUMBERFORMAT_CURRENCY: + case NUMBERFORMAT_CURRENCY|NUMBERFORMAT_DEFINED: + eType = 0; + break; + default: + eType =-1; + } + + if(SFX_ITEM_SET == pReqArgs->GetItemState(nSlot, true, &pItem) && eType != -1) { String aCode = ((const SfxStringItem*)pItem)->GetValue(); - pTabViewShell->SetNumFmtByStr( aCode ); + sal_uInt16 aLen = aCode.Len(); + String* sFormat = new String[4]; + String sTmpStr = OUString(); + sal_uInt16 nCount(0); + sal_uInt16 nStrCount(0); + + while(nCount < aLen) + { + sal_Unicode cChar = aCode.GetChar(nCount); + + if(cChar == sal_Unicode(',')) + { + sFormat[nStrCount] = sTmpStr; + sTmpStr = OUString(); + nStrCount++; + } + else + { + sTmpStr += cChar; + } + + nCount++; + + if(nStrCount > 3) + break; + } + + const sal_Bool bThousand = (sal_Bool)sFormat[0].ToInt32(); + const sal_Bool bNegRed = (sal_Bool)sFormat[1].ToInt32(); + const sal_uInt16 nPrecision = (sal_uInt16)sFormat[2].ToInt32(); + const sal_uInt16 nLeadZeroes = (sal_uInt16)sFormat[3].ToInt32(); + + aCode = pFormatter->GenerateFormat( + nCurrentNumberFormat,//modify + eLanguage, + bThousand, + bNegRed, + nPrecision, + nLeadZeroes); + pTabViewShell->SetNumFmtByStr(aCode); + delete[] sFormat; } } break; @@ -1046,6 +1130,49 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq ) } break; + case SID_NUMBER_TYPE_FORMAT: + { + SfxInt16Item aFormatItem((const SfxInt16Item&)rReq.GetArgs()->Get(nSlot)); + sal_uInt16 nFormat = aFormatItem.GetValue(); + switch(nFormat) + { + case 0: + pTabViewShell->SetNumberFormat( NUMBERFORMAT_NUMBER); //Modify + break; + case 1: + pTabViewShell->SetNumberFormat( NUMBERFORMAT_NUMBER, 2 ); //Modify + break; + case 2: + pTabViewShell->SetNumberFormat( NUMBERFORMAT_PERCENT ); + break; + case 3: + pTabViewShell->SetNumberFormat( NUMBERFORMAT_CURRENCY ); + break; + case 4: + pTabViewShell->SetNumberFormat( NUMBERFORMAT_DATE ); + break; + case 5: + pTabViewShell->SetNumberFormat( NUMBERFORMAT_TIME ); + break; + case 6: + pTabViewShell->SetNumberFormat( NUMBERFORMAT_SCIENTIFIC ); + break; + case 7: + pTabViewShell->SetNumberFormat( NUMBERFORMAT_FRACTION ); + break; + case 8: + pTabViewShell->SetNumberFormat( NUMBERFORMAT_LOGICAL ); + break; + case 9: + pTabViewShell->SetNumberFormat( NUMBERFORMAT_TEXT ); + break; + default: + ; + } + rReq.Done(); + } + break; + default: OSL_FAIL("falscher Slot bei ExecuteEdit"); break; @@ -1119,7 +1246,10 @@ void ScFormatShell::ExecuteAlignment( SfxRequest& rReq ) } } } - + rBindings.Invalidate( SID_ATTR_PARA_ADJUST_LEFT ); + rBindings.Invalidate( SID_ATTR_PARA_ADJUST_RIGHT ); + rBindings.Invalidate( SID_ATTR_PARA_ADJUST_BLOCK ); + rBindings.Invalidate( SID_ATTR_PARA_ADJUST_CENTER); rBindings.Invalidate( SID_ALIGNLEFT ); rBindings.Invalidate( SID_ALIGNRIGHT ); rBindings.Invalidate( SID_ALIGNCENTERHOR ); @@ -1647,6 +1777,43 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) } break; + case SID_ATTR_BORDER_DIAG_TLBR: + case SID_ATTR_BORDER_DIAG_BLTR: + { + const ScPatternAttr* pOldAttrs = pTabViewShell->GetSelectionPattern(); + SfxItemSet* pOldSet = new SfxItemSet(pOldAttrs->GetItemSet()); + SfxItemSet* pNewSet = new SfxItemSet(pOldAttrs->GetItemSet()); + const SfxPoolItem* pItem = 0; + + if(SID_ATTR_BORDER_DIAG_TLBR == nSlot) + { + if(SFX_ITEM_SET == pNewAttrs->GetItemState(ATTR_BORDER_TLBR, true, &pItem)) + { + SvxLineItem aItem(ATTR_BORDER_TLBR); + aItem.SetLine(((const SvxLineItem&)pNewAttrs->Get(ATTR_BORDER_TLBR)).GetLine()); + pNewSet->Put(aItem); + rReq.AppendItem(aItem); + pTabViewShell->ApplyAttributes(pNewSet, pOldSet); + } + } + else // if( nSlot == SID_ATTR_BORDER_DIAG_BLTR ) + { + if(SFX_ITEM_SET == pNewAttrs->GetItemState(ATTR_BORDER_BLTR, true, &pItem )) + { + SvxLineItem aItem(ATTR_BORDER_BLTR); + aItem.SetLine(((const SvxLineItem&)pNewAttrs->Get(ATTR_BORDER_BLTR)).GetLine()); + pNewSet->Put(aItem); + rReq.AppendItem(aItem); + pTabViewShell->ApplyAttributes(pNewSet, pOldSet); + } + } + + delete pOldSet; + delete pNewSet; + rBindings.Invalidate(nSlot); + } + break; + // ATTR_BACKGROUND (=SID_ATTR_BRUSH) muss ueber zwei IDs // gesetzt werden: case SID_BACKGROUND_COLOR: @@ -1698,7 +1865,7 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet ) { ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); - const ::editeng::SvxBorderLine* pLine = pTabViewShell->GetDefaultFrameLine(); + //const ::editeng::SvxBorderLine* pLine = pTabViewShell->GetDefaultFrameLine(); const SvxBrushItem& rBrushItem = (const SvxBrushItem&)rAttrSet.Get( ATTR_BACKGROUND ); SfxWhichIter aIter( rSet ); sal_uInt16 nWhich = aIter.FirstWhich(); @@ -1725,11 +1892,175 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet ) case SID_BACKGROUND_COLOR: { rSet.Put( SvxColorItem( rBrushItem.GetColor(), SID_BACKGROUND_COLOR ) ); + + if(SFX_ITEM_DONTCARE == rAttrSet.GetItemState(ATTR_BACKGROUND)) + { + rSet.InvalidateItem(SID_BACKGROUND_COLOR); + } } break; + case SID_FRAME_LINESTYLE: case SID_FRAME_LINECOLOR: { - rSet.Put( SvxColorItem( pLine ? pLine->GetColor() : Color(), SID_FRAME_LINECOLOR ) ); + // handled together because both need the cell border information for decisions + // rSet.Put( SvxColorItem( pLine ? pLine->GetColor() : Color(), SID_FRAME_LINECOLOR ) ); + Color aCol = 0; + editeng::SvxBorderLine aLine(0,0,0,0); + bool bCol = 0; + bool bColDisable = 0, bStyleDisable = 0; + SvxBoxItem aBoxItem(ATTR_BORDER); + SvxBoxInfoItem aInfoItem(ATTR_BORDER_INNER); + + pTabViewShell->GetSelectionFrame(aBoxItem, aInfoItem); + + if( aBoxItem.GetTop() ) + { + bCol = 1; + aCol = aBoxItem.GetTop()->GetColor() ; + aLine.SetColor(aCol); + aLine.SetWidth( aBoxItem.GetTop()->GetWidth()); + aLine.SetBorderLineStyle( aBoxItem.GetTop()->GetBorderLineStyle()); + } + + if( aBoxItem.GetBottom() ) + { + if(bCol == 0) + { + bCol = 1; + aCol = aBoxItem.GetBottom()->GetColor() ; + aLine.SetColor(aCol); + aLine.SetWidth( aBoxItem.GetBottom()->GetWidth()); + aLine.SetBorderLineStyle( aBoxItem.GetBottom()->GetBorderLineStyle()); + } + else + { + if(aCol != aBoxItem.GetBottom()->GetColor() ) + bColDisable = 1; + if(!( aLine == *(aBoxItem.GetBottom())) ) + bStyleDisable = 1; + } + } + + if( aBoxItem.GetLeft() ) + { + if(bCol == 0) + { + bCol = 1; + aCol = aBoxItem.GetLeft()->GetColor() ; + aLine.SetColor(aCol); + aLine.SetWidth( aBoxItem.GetLeft()->GetWidth()); + aLine.SetBorderLineStyle( aBoxItem.GetLeft()->GetBorderLineStyle()); + } + else + { + if(aCol != aBoxItem.GetLeft()->GetColor() ) + bColDisable = 1; + if(!( aLine == *(aBoxItem.GetLeft())) ) + bStyleDisable = 1; + } + } + + if( aBoxItem.GetRight() ) + { + if(bCol == 0) + { + bCol = 1; + aCol = aBoxItem.GetRight()->GetColor() ; + aLine.SetColor(aCol); + aLine.SetWidth( aBoxItem.GetRight()->GetWidth()); + aLine.SetBorderLineStyle( aBoxItem.GetRight()->GetBorderLineStyle()); + } + else + { + if(aCol != aBoxItem.GetRight()->GetColor() ) + bColDisable = 1; + if(!( aLine == *(aBoxItem.GetRight())) ) + bStyleDisable = 1; + } + } + + if( aInfoItem.GetVert()) + { + if(bCol == 0) + { + bCol = 1; + aCol = aInfoItem.GetVert()->GetColor() ; + aLine.SetColor(aCol); + aLine.SetWidth( aInfoItem.GetVert()->GetWidth()); + aLine.SetBorderLineStyle( aInfoItem.GetVert()->GetBorderLineStyle()); + } + else + { + if(aCol != aInfoItem.GetVert()->GetColor() ) + bColDisable = 1; + if(!( aLine == *(aInfoItem.GetVert())) ) + bStyleDisable = 1; + } + } + + if( aInfoItem.GetHori()) + { + if(bCol == 0) + { + bCol = 1; + aCol = aInfoItem.GetHori()->GetColor() ; + aLine.SetColor(aCol); + aLine.SetWidth( aInfoItem.GetHori()->GetWidth()); + aLine.SetBorderLineStyle( aInfoItem.GetHori()->GetBorderLineStyle()); + } + else + { + if(aCol != aInfoItem.GetHori()->GetColor() ) + bColDisable = 1; + if(!( aLine == *(aInfoItem.GetHori())) ) + bStyleDisable = 1; + } + } + + if( !aInfoItem.IsValid( VALID_VERT ) + || !aInfoItem.IsValid( VALID_HORI ) + || !aInfoItem.IsValid( VALID_LEFT ) + || !aInfoItem.IsValid( VALID_RIGHT ) + || !aInfoItem.IsValid( VALID_TOP ) + || !aInfoItem.IsValid( VALID_BOTTOM ) ) + { + bColDisable = 1; + bStyleDisable = 1; + } + + if(SID_FRAME_LINECOLOR == nWhich) + { + if(bColDisable) // if different lines have differernt colors + { + aCol = COL_TRANSPARENT; + rSet.Put( SvxColorItem(aCol, SID_FRAME_LINECOLOR ) ); + rSet.InvalidateItem(SID_FRAME_LINECOLOR); + } + else if( bCol == 0 && bColDisable == 0) // if no line available + { + aCol = COL_AUTO; + rSet.Put( SvxColorItem(aCol, SID_FRAME_LINECOLOR ) ); + } + else + rSet.Put( SvxColorItem(aCol, SID_FRAME_LINECOLOR ) ); + } + else // if( nWhich == SID_FRAME_LINESTYLE) + { + if(bStyleDisable) // if have several lines but don't have same style + { + aLine.SetWidth( 1 ); + SvxLineItem aItem(SID_FRAME_LINESTYLE); + aItem.SetLine(&aLine); + rSet.Put( aItem ); + rSet.InvalidateItem(SID_FRAME_LINESTYLE); + } + else // all the lines have same style or no line availavle, use initial value (0,0,0,0) + { + SvxLineItem aItem(SID_FRAME_LINESTYLE); + aItem.SetLine(&aLine); + rSet.Put( aItem ); + } + } } break; case SID_ATTR_BRUSH: @@ -1740,6 +2071,13 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet ) } nWhich = aIter.NextWhich(); } + + if(nWhich) + { + // stuff for sidebar panels + Invalidate(SID_ATTR_ALIGN_DEGREES); + Invalidate(SID_ATTR_ALIGN_STACKED); + } } //------------------------------------------------------------------ @@ -2013,22 +2351,139 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet ) switch ( nWhich ) { case SID_NUMBER_FORMAT: + //{ + // String aFormatCode; // bleibt leer, wenn dont-care + // + // const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); + // if ( rAttrSet.GetItemState( ATTR_VALUE_FORMAT ) != SFX_ITEM_DONTCARE ) + // { + // sal_uLong nNumberFormat = ((const SfxUInt32Item&)rAttrSet.Get( + // ATTR_VALUE_FORMAT )).GetValue(); + // + // SvNumberFormatter* pFormatter = pDoc->GetFormatTable(); + // const SvNumberformat* pFormatEntry = pFormatter->GetEntry( nNumberFormat ); + // if ( pFormatEntry ) + // aFormatCode = pFormatEntry->GetFormatstring(); + // } + // + // rSet.Put( SfxStringItem( nWhich, aFormatCode ) ); + //} + + // symphony version with format interpretation { - String aFormatCode; // bleibt leer, wenn dont-care + const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); - const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); - if ( rAttrSet.GetItemState( ATTR_VALUE_FORMAT ) != SFX_ITEM_DONTCARE ) + if(SFX_ITEM_DONTCARE != rAttrSet.GetItemState(ATTR_VALUE_FORMAT)) { - sal_uLong nNumberFormat = ((const SfxUInt32Item&)rAttrSet.Get( - ATTR_VALUE_FORMAT )).GetValue(); + SvNumberFormatter* pFormatter = pDoc->GetFormatTable(); + sal_uInt32 nNumberFormat = ((const SfxUInt32Item&)rAttrSet.Get(ATTR_VALUE_FORMAT)).GetValue(); + bool bThousand(false); + bool bNegRed(false); + sal_uInt16 nPrecision(0); + sal_uInt16 nLeadZeroes(0); + + pFormatter->GetFormatSpecialInfo(nNumberFormat,bThousand, bNegRed, nPrecision, nLeadZeroes); + String aFormat; + static String sBreak = OUString(","); + const String sThousand = OUString::number(static_cast(bThousand)); + const String sNegRed = OUString::number(static_cast(bNegRed)); + const String sPrecision = OUString::number(nPrecision); + const String sLeadZeroes = OUString::number(nLeadZeroes); + + aFormat += sThousand; + aFormat += sBreak; + aFormat += sNegRed; + aFormat += sBreak; + aFormat += sPrecision; + aFormat += sBreak; + aFormat += sLeadZeroes; + aFormat += sBreak; + + rSet.Put(SfxStringItem(nWhich, aFormat)); + } + else + { + rSet.InvalidateItem( nWhich ); + } + } + break; + case SID_NUMBER_TYPE_FORMAT: + { + sal_Int16 aFormatCode = -1; + const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); + if ( rAttrSet.GetItemState( ATTR_VALUE_FORMAT ) >= SFX_ITEM_AVAILABLE ) //Modify for more robust + { SvNumberFormatter* pFormatter = pDoc->GetFormatTable(); + sal_uInt32 nNumberFormat = pTabViewShell->GetSelectionPattern()->GetNumberFormat( pFormatter ); const SvNumberformat* pFormatEntry = pFormatter->GetEntry( nNumberFormat ); + bool bStandard = false; + if ( pFormatEntry ) - aFormatCode = pFormatEntry->GetFormatstring(); + { + aFormatCode = pFormatEntry->GetType(); + bStandard = pFormatEntry->IsStandard(); + } + + switch(aFormatCode) + { + case NUMBERFORMAT_NUMBER: + case NUMBERFORMAT_NUMBER| NUMBERFORMAT_DEFINED: + //use format code and standard format code to judge whether it is General, + //if (nNumberFormat == nStandardNumberFormat) + if (bStandard) + aFormatCode = 0; + else + aFormatCode = 1; + break; + case NUMBERFORMAT_PERCENT: + case NUMBERFORMAT_PERCENT| NUMBERFORMAT_DEFINED: + aFormatCode = 2; + break; + case NUMBERFORMAT_CURRENCY: + case NUMBERFORMAT_CURRENCY| NUMBERFORMAT_DEFINED: + aFormatCode = 3; + break; + case NUMBERFORMAT_DATE: + case NUMBERFORMAT_DATE| NUMBERFORMAT_DEFINED: + //Add + case NUMBERFORMAT_DATETIME: + case NUMBERFORMAT_DATETIME | NUMBERFORMAT_DEFINED: + aFormatCode = 4; + break; + case NUMBERFORMAT_TIME: + case NUMBERFORMAT_TIME| NUMBERFORMAT_DEFINED: + aFormatCode = 5; + break; + case NUMBERFORMAT_SCIENTIFIC: + case NUMBERFORMAT_SCIENTIFIC| NUMBERFORMAT_DEFINED: + aFormatCode = 6; + break; + case NUMBERFORMAT_FRACTION: + case NUMBERFORMAT_FRACTION| NUMBERFORMAT_DEFINED: + aFormatCode = 7; + break; + case NUMBERFORMAT_LOGICAL: + case NUMBERFORMAT_LOGICAL| NUMBERFORMAT_DEFINED: + aFormatCode = 8; + break; + case NUMBERFORMAT_TEXT: + case NUMBERFORMAT_TEXT| NUMBERFORMAT_DEFINED: + aFormatCode = 9; + break; + default: + aFormatCode = -1; //for more roburst + } + if( aFormatCode == -1 ) + rSet.InvalidateItem( nWhich ); + else + rSet.Put( SfxInt16Item( nWhich, aFormatCode ) ); + } + else + { + rSet.InvalidateItem( nWhich ); } - rSet.Put( SfxStringItem( nWhich, aFormatCode ) ); } break; case SID_NUMBER_SCIENTIFIC: @@ -2323,4 +2778,52 @@ short ScFormatShell::GetCurrentNumberFormatType() return nType; } +void ScFormatShell::ExecViewOptions( SfxRequest& rReq ) +{ + ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); + SfxBindings& rBindings = pViewData->GetBindings(); + const SfxItemSet* pNewAttrs = rReq.GetArgs(); + + if ( pNewAttrs ) + { + sal_uInt16 nSlot = rReq.GetSlot(); + + if( nSlot == SID_SCGRIDSHOW) + { + + ScViewData* pLclViewData = pTabViewShell->GetViewData(); + const ScViewOptions& rOldOpt = pLclViewData->GetOptions(); + ScDocShell* pDocSh = PTR_CAST(ScDocShell, SfxObjectShell::Current()); + bool bState = ((const SfxBoolItem &)pNewAttrs->Get( pNewAttrs->GetPool()->GetWhich( nSlot ) )).GetValue(); + + if ( (bool)rOldOpt.GetOption( VOPT_GRID ) != bState) + { + ScViewOptions rNewOpt(rOldOpt); + rNewOpt.SetOption( VOPT_GRID, bState); + pLclViewData->SetOptions( rNewOpt ); + pLclViewData->GetDocument()->SetViewOptions( rNewOpt ); + pDocSh->SetDocumentModified(); + //add , write the change to sc view config + ScModule* pScMod = SC_MOD(); + pScMod->SetViewOptions( rNewOpt ); + //add end + rBindings.Invalidate( nSlot ); + } + } + } + +} + +void ScFormatShell::GetViewOptions( SfxItemSet& rSet ) +{ + ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); + if( pTabViewShell ) + { + ScViewOptions aViewOpt = pTabViewShell->GetViewData()->GetOptions(); + rSet.ClearItem(SID_SCGRIDSHOW); + SfxBoolItem aItem( SID_SCGRIDSHOW, aViewOpt.GetOption( VOPT_GRID ) ); + rSet.Put(aItem); + } +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 86cddf2526c9..4a5c9b522947 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -2038,7 +2038,20 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) } if (DrawMouseButtonUp(rMEvt)) // includes format paint brush handling for drawing objects + { + ScTabViewShell* pViewShell = pViewData->GetViewShell(); + SfxBindings& rFrmBindings=pViewShell->GetViewFrame()->GetBindings(); + rFrmBindings.Invalidate(SID_ATTR_TRANSFORM_WIDTH); + rFrmBindings.Invalidate(SID_ATTR_TRANSFORM_HEIGHT); + rFrmBindings.Invalidate(SID_ATTR_TRANSFORM_POS_X); + rFrmBindings.Invalidate(SID_ATTR_TRANSFORM_POS_Y); + rFrmBindings.Invalidate(SID_ATTR_TRANSFORM_ANGLE); + rFrmBindings.Invalidate(SID_ATTR_TRANSFORM_ROT_X); + rFrmBindings.Invalidate(SID_ATTR_TRANSFORM_ROT_Y); + rFrmBindings.Invalidate(SID_ATTR_TRANSFORM_AUTOWIDTH); + rFrmBindings.Invalidate(SID_ATTR_TRANSFORM_AUTOHEIGHT); return; + } rMark.SetMarking(false); @@ -3245,7 +3258,20 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt) return; if (DrawKeyInput(rKEvt)) + { + const KeyCode& rLclKeyCode = rKEvt.GetKeyCode(); + if (rLclKeyCode.GetCode() == KEY_DOWN + || rLclKeyCode.GetCode() == KEY_UP + || rLclKeyCode.GetCode() == KEY_LEFT + || rLclKeyCode.GetCode() == KEY_RIGHT) + { + ScTabViewShell* pViewShell = pViewData->GetViewShell(); + SfxBindings& rBindings = pViewShell->GetViewFrame()->GetBindings(); + rBindings.Invalidate(SID_ATTR_TRANSFORM_POS_X); + rBindings.Invalidate(SID_ATTR_TRANSFORM_POS_Y); + } return; + } if (!pViewData->GetView()->IsDrawSelMode() && !DrawHasMarkedObj()) // keine Eingaben im Zeichenmodus { //! DrawShell abfragen !!! diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx index 57a7b56ad33d..40f278699022 100644 --- a/sc/source/ui/view/pivotsh.cxx +++ b/sc/source/ui/view/pivotsh.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include "sc.hrc" #include "pivotsh.hxx" @@ -68,6 +69,7 @@ ScPivotShell::ScPivotShell( ScTabViewShell* pViewSh ) : } SetHelpId( HID_SCSHELL_PIVOTSH ); SetName(OUString("Pivot")); + SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Pivot)); } //------------------------------------------------------------------------ diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 0124f6a0f795..30750750a697 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -212,6 +212,18 @@ void ScTabView::InvalidateAttribs() rBindings.Invalidate( SID_ATTR_CHAR_OVERLINE ); + rBindings.Invalidate( SID_ATTR_CHAR_KERNING ); + rBindings.Invalidate( SID_SET_SUPER_SCRIPT ); + rBindings.Invalidate( SID_SET_SUB_SCRIPT ); + rBindings.Invalidate( SID_ATTR_CHAR_STRIKEOUT ); + rBindings.Invalidate( SID_ATTR_CHAR_SHADOWED ); + + rBindings.Invalidate( SID_ATTR_PARA_ADJUST_LEFT ); + rBindings.Invalidate( SID_ATTR_PARA_ADJUST_RIGHT ); + rBindings.Invalidate( SID_ATTR_PARA_ADJUST_BLOCK ); + rBindings.Invalidate( SID_ATTR_PARA_ADJUST_CENTER); + rBindings.Invalidate( SID_NUMBER_TYPE_FORMAT); + rBindings.Invalidate( SID_ALIGNLEFT ); rBindings.Invalidate( SID_ALIGNRIGHT ); rBindings.Invalidate( SID_ALIGNBLOCK ); @@ -221,6 +233,21 @@ void ScTabView::InvalidateAttribs() rBindings.Invalidate( SID_ALIGNBOTTOM ); rBindings.Invalidate( SID_ALIGNCENTERVER ); + // stuff for sidebar panels + { + rBindings.Invalidate( SID_H_ALIGNCELL ); + rBindings.Invalidate( SID_V_ALIGNCELL ); + rBindings.Invalidate( SID_ATTR_ALIGN_INDENT ); + rBindings.Invalidate( SID_FRAME_LINECOLOR ); + rBindings.Invalidate( SID_FRAME_LINESTYLE ); + rBindings.Invalidate( SID_ATTR_BORDER_OUTER ); + rBindings.Invalidate( SID_ATTR_BORDER_INNER ); + rBindings.Invalidate( SID_SCGRIDSHOW ); + rBindings.Invalidate( SID_ATTR_BORDER_DIAG_TLBR ); + rBindings.Invalidate( SID_ATTR_BORDER_DIAG_BLTR ); + rBindings.Invalidate( SID_NUMBER_TYPE_FORMAT ); + } + rBindings.Invalidate( SID_BACKGROUND_COLOR ); rBindings.Invalidate( SID_ATTR_ALIGN_LINEBREAK ); diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx index f4d277fac4e2..537499b528ee 100644 --- a/sc/source/ui/view/tabvwsh.cxx +++ b/sc/source/ui/view/tabvwsh.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include "tabvwsh.hxx" #include "docsh.hxx" @@ -54,6 +55,7 @@ SFX_IMPL_INTERFACE(ScTabViewShell,SfxViewShell,ScResId(SCSTR_TABVIEWSHELL)) SFX_CHILDWINDOW_REGISTRATION(SfxInfoBarContainerChild::GetChildWindowId()); SFX_CHILDWINDOW_CONTEXT_REGISTRATION(SID_NAVIGATOR); SFX_CHILDWINDOW_REGISTRATION(SID_TASKPANE); + SFX_CHILDWINDOW_REGISTRATION(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId()); SFX_CHILDWINDOW_REGISTRATION(ScNameDlgWrapper::GetChildWindowId()); SFX_CHILDWINDOW_REGISTRATION(ScNameDefDlgWrapper::GetChildWindowId()); SFX_CHILDWINDOW_REGISTRATION(ScSolverDlgWrapper::GetChildWindowId()); diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index ecc73952b53a..377546fb9120 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -212,6 +213,10 @@ void ScTabViewShell::Activate(sal_Bool bMDI) // Wenn Referenzeingabe-Tip-Hilfe hier wieder angezeigt werden soll (ShowRefTip), // muss sie beim Verschieben der View angepasst werden (gibt sonst Probleme unter OS/2 // beim Umschalten zwischen Dokumenten) + + ContextChangeEventMultiplexer::NotifyContextChange( + GetController(), + ::sfx2::sidebar::EnumContext::Context_Default); } void ScTabViewShell::Deactivate(sal_Bool bMDI) diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 49f8533a482f..e114c99bfbb2 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -2758,6 +2758,11 @@ void ScViewFunc::ChangeIndent( sal_Bool bIncrement ) { pDocSh->UpdateOle(pViewData); StartFormatArea(); + + // stuff for sidebar panels + SfxBindings& rBindings = GetViewData()->GetBindings(); + rBindings.Invalidate( SID_H_ALIGNCELL ); + rBindings.Invalidate( SID_ATTR_ALIGN_INDENT ); } } -- cgit