include/svl/poolitem.hxx | 1 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu | 34 ++ sc/Library_sc.mk | 2 sc/UIConfig_scalc.mk | 1 sc/inc/dbdata.hxx | 36 ++ sc/inc/mid.h | 3 sc/inc/sc.hrc | 1 sc/inc/scitems.hxx | 4 sc/inc/shellids.hxx | 1 sc/sdi/scalc.sdi | 17 + sc/sdi/scslots.sdi | 13 sc/sdi/tableshell.sdi | 18 + sc/source/core/tool/dbdata.cxx | 181 +++++++++++ sc/source/ui/app/msgpool.cxx | 4 sc/source/ui/app/scdll.cxx | 2 sc/source/ui/app/typemap.cxx | 1 sc/source/ui/inc/tableshell.hxx | 42 ++ sc/source/ui/inc/tabvwsh.hxx | 8 sc/source/ui/sidebar/DatabasePropertyPanel.cxx | 140 ++++++++ sc/source/ui/sidebar/DatabasePropertyPanel.hxx | 67 ++++ sc/source/ui/sidebar/ScPanelFactory.cxx | 6 sc/source/ui/view/tableshell.cxx | 128 +++++++ sc/source/ui/view/tabview3.cxx | 8 sc/source/ui/view/tabvwsh4.cxx | 37 ++ sc/uiconfig/scalc/ui/sidebardatabase.ui | 124 +++++++ svx/source/sidebar/paragraph/ParaPropertyPanel.cxx | 1 26 files changed, 875 insertions(+), 5 deletions(-)
New commits: commit e65e38b9395e5af13e0c00b593d71741ee957350 Author: Markus Mohrhard <[email protected]> AuthorDate: Mon Aug 4 02:21:26 2025 +0800 Commit: Balazs Varga <[email protected]> CommitDate: Wed Jan 7 17:09:55 2026 +0100 add sidebar entry for calc database ranges Change-Id: I0b141c4e6fefd78bfcc7b30f4aad7fdcc42eee23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193667 Tested-by: Andras Timar <[email protected]> Reviewed-by: Andras Timar <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196735 Tested-by: Balazs Varga <[email protected]> Reviewed-by: Balazs Varga <[email protected]> diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx index ab574757b41a..7ae4724be410 100644 --- a/include/svl/poolitem.hxx +++ b/include/svl/poolitem.hxx @@ -134,6 +134,7 @@ enum class SfxItemType : sal_uInt16 SbxItemType, ScCondFormatItemType, ScConsolidateItemType, + ScDatabaseSettingItemType, ScHyphenateCellType, ScIndentItemType, ScInputStatusItemType, diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu index aa211cc7ca25..2a9e2da5769b 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu @@ -450,6 +450,7 @@ Calc, EditCell, visible ; Calc, Pivot, visible ; Calc, Sparkline, visible ; + Calc, Table, visible ; </value> </prop> <prop oor:name="ImplementationURL" oor:type="xs:string"> @@ -486,6 +487,7 @@ Calc, EditCell, visible ; Calc, Pivot, visible, .uno:CellTextDlg ; Calc, Sparkline, visible ; + Calc, Table, visible ; DrawImpress, Draw, hidden ; DrawImpress, DrawFontwork, hidden ; DrawImpress, DrawText, visible ; @@ -1476,6 +1478,7 @@ Calc, EditCell, visible ; Calc, Pivot, visible ; Calc, Sparkline, visible ; + Calc, Table, visible ; </value> </prop> <prop oor:name="ImplementationURL" oor:type="xs:string"> @@ -1510,6 +1513,7 @@ Calc, default, visible ; Calc, Pivot, visible ; Calc, Sparkline, visible ; + Calc, Table, visible ; </value> </prop> <prop oor:name="ImplementationURL" oor:type="xs:string"> @@ -1523,6 +1527,35 @@ </prop> </node> + <node oor:name="ScDatabasePropertyPanel" oor:op="replace"> + <prop oor:name="Title" oor:type="xs:string"> + <value xml:lang="en-US">Database Range</value> + </prop> + <prop oor:name="Id" oor:type="xs:string"> + <value>ScDatabasePropertyPanel</value> + </prop> + <prop oor:name="DeckId" oor:type="xs:string"> + <value>PropertyDeck</value> + </prop> + <prop oor:name="DefaultMenuCommand"> + <value>.uno:FormatCellDialog</value> + </prop> + <prop oor:name="ContextList"> + <value oor:separator=";"> + Calc, Table, visible ; + </value> + </prop> + <prop oor:name="ImplementationURL" oor:type="xs:string"> + <value>private:resource/toolpanel/ScPanelFactory/DatabasePropertyPanel</value> + </prop> + <prop oor:name="OrderIndex" oor:type="xs:int"> + <value>500</value> + </prop> + <prop oor:name="WantsAWT" oor:type="xs:boolean"> + <value>false</value> + </prop> + </node> + <node oor:name="ScNumberFormatPropertyPanel" oor:op="replace"> <prop oor:name="Title" oor:type="xs:string"> <value xml:lang="en-US">Number Format</value> @@ -1544,6 +1577,7 @@ Calc, default, visible ; Calc, Pivot, visible ; Calc, Sparkline, visible ; + Calc, Table, visible ; </value> </prop> <prop oor:name="ImplementationURL" oor:type="xs:string"> diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk index 32b5770be95d..0ae9ceff975b 100644 --- a/sc/Library_sc.mk +++ b/sc/Library_sc.mk @@ -536,6 +536,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\ sc/source/ui/sidebar/CellLineStyleControl \ sc/source/ui/sidebar/CellAppearancePropertyPanel \ sc/source/ui/sidebar/CellBorderStyleControl \ + sc/source/ui/sidebar/DatabasePropertyPanel \ sc/source/ui/sidebar/NumberFormatControl \ sc/source/ui/sidebar/NumberFormatPropertyPanel \ sc/source/ui/sidebar/ScPanelFactory \ @@ -692,6 +693,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\ sc/source/ui/view/spelleng \ sc/source/ui/view/spellcheckcontext \ sc/source/ui/view/tabcont \ + sc/source/ui/view/tableshell \ sc/source/ui/view/tabsplit \ sc/source/ui/view/tabview \ sc/source/ui/view/tabview2 \ diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk index e1e03bb2f099..7a4a49b63c48 100644 --- a/sc/UIConfig_scalc.mk +++ b/sc/UIConfig_scalc.mk @@ -246,6 +246,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\ sc/uiconfig/scalc/ui/sidebaralignment \ sc/uiconfig/scalc/ui/sidebarnumberformat \ sc/uiconfig/scalc/ui/sidebarcellappearance \ + sc/uiconfig/scalc/ui/sidebardatabase \ sc/uiconfig/scalc/ui/simplerefdialog \ sc/uiconfig/scalc/ui/solverdlg \ sc/uiconfig/scalc/ui/solveroptionsdialog \ diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx index 9b7a148e49e3..85cf87ee4e38 100644 --- a/sc/inc/dbdata.hxx +++ b/sc/inc/dbdata.hxx @@ -26,6 +26,7 @@ #include "rangelst.hxx" #include <svl/listener.hxx> +#include <svl/poolitem.hxx> #include <memory> #include <set> @@ -36,6 +37,40 @@ struct ScSortParam; struct ScQueryParam; struct ScSubTotalParam; +class SC_DLLPUBLIC ScDatabaseSettingItem final : public SfxPoolItem +{ + bool mbHeaderRow; + bool mbTotalRow; + bool mbFirstCol; + bool mbLastCol; + bool mbStripedRows; + bool mbStripedCols; + bool mbShowFilters; + +public: + static SfxPoolItem* CreateDefault(); + DECLARE_ITEM_TYPE_FUNCTION(ScDatabaseSettingItem) + ScDatabaseSettingItem(); + ScDatabaseSettingItem(bool bHeaderRow, bool bTotalRow, bool bFirstCol, bool bLastCol, bool bStripedRows, bool bStripedCols, bool bShowFilter); + ScDatabaseSettingItem( const ScDatabaseSettingItem& rItem ); + virtual ~ScDatabaseSettingItem() override; + + virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; + virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; + + ScDatabaseSettingItem& operator=( const ScDatabaseSettingItem& rItem ); + virtual bool operator==( const SfxPoolItem& ) const override; + virtual ScDatabaseSettingItem* Clone( SfxItemPool *pPool = nullptr ) const override; + + bool HasHeaderRow() const; + bool HasTotalRow() const; + bool HasFirstCol() const; + bool HasLastCol() const; + bool HasStripedRows() const; + bool HasStripedCols() const; + bool HasShowFilters() const; +}; + /** Enum used to indicate which portion of the DBArea is to be considered. */ enum class ScDBDataPortion { @@ -95,6 +130,7 @@ struct SAL_DLLPUBLIC ScTableStyleParam bool mbLastColumn; ScTableStyleParam(); + ScTableStyleParam(const ScTableStyleParam& rParam) = default; bool operator== (const ScTableStyleParam& rData) const; }; diff --git a/sc/inc/mid.h b/sc/inc/mid.h index 614bcf91ee02..e609a184e7ff 100644 --- a/sc/inc/mid.h +++ b/sc/inc/mid.h @@ -24,6 +24,9 @@ #define MID_2 2 #define MID_3 3 #define MID_4 4 +#define MID_5 4 +#define MID_6 4 +#define MID_7 4 #endif diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index 629289aef0bf..87bdc3bd96e0 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -638,6 +638,7 @@ static_assert(SID_PREVIEW_END < SID_KEYFUNC_START, "calc slots ids trampling inf #define SID_EDIT_SPARKLINE (SID_NEW_SLOTS+116) #define SID_SC_OPT_LINKS TypedWhichId<SfxBoolItem>(SID_NEW_SLOTS + 117) #define SID_CLEAR_AUTO_FILTER (SID_NEW_SLOTS+118) +#define SID_DATABASE_SETTINGS (SID_NEW_SLOTS+119) // idl parameter diff --git a/sc/inc/scitems.hxx b/sc/inc/scitems.hxx index 57493ddd8dcc..90bb67cb67c9 100644 --- a/sc/inc/scitems.hxx +++ b/sc/inc/scitems.hxx @@ -74,6 +74,7 @@ class SfxUInt16Item; class ScPageHFItem; class ScPageScaleToItem; class SvxSetItem; +class ScDatabaseSetting; // Item-IDs for UI-MsgPool: @@ -90,8 +91,9 @@ class SvxSetItem; #define SCITEM_PIVOTDATA TypedWhichId<ScPivotItem>(1106) #define SCITEM_SOLVEDATA TypedWhichId<ScSolveItem>(1107) #define SCITEM_USERLIST TypedWhichId<ScUserListItem>(1108) +#define SCITEM_DATABASE_SETTING TypedWhichId<ScDatabaseSetting>(1109) -#define MSGPOOL_END 1108 +#define MSGPOOL_END 1109 // Item-IDs for attributes: diff --git a/sc/inc/shellids.hxx b/sc/inc/shellids.hxx index ecef989d87bb..f8db5abcddc5 100644 --- a/sc/inc/shellids.hxx +++ b/sc/inc/shellids.hxx @@ -40,5 +40,6 @@ #define SCID_PAGEBREAK_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(16)) #define SCID_MEDIA_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(17)) #define SCID_SPARKLINE_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(18)) +#define SCID_TABLE_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(19)) /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi index a241c6c15086..3573e4b83888 100644 --- a/sc/sdi/scalc.sdi +++ b/sc/sdi/scalc.sdi @@ -6458,6 +6458,23 @@ SfxBoolItem CellProtection SID_SCATTR_CELLPROTECTION GroupId = SfxGroupId::Format; ] +ScDatabaseSettingItem DatabaseSettings SID_DATABASE_SETTINGS + +[ + AutoUpdate = FALSE, + FastCall = TRUE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = SfxGroupId::Table; +] + SfxVoidItem SelectArrayFormula SID_MARKARRAYFORMULA () diff --git a/sc/sdi/scslots.sdi b/sc/sdi/scslots.sdi index f6ccd7113d5b..77b97f36baa7 100644 --- a/sc/sdi/scslots.sdi +++ b/sc/sdi/scslots.sdi @@ -21,6 +21,18 @@ module StarCalc SlotIdFile( "scslots.hrc" ) ] { + struct ScDatabaseSetting + { + BOOL HeaderRow MID_1; + BOOL TotalRow MID_2; + BOOL FirstCol MID_3; + BOOL LastCol MID_4; + BOOL StripedRows MID_5; + BOOL StripedCols MID_6; + BOOL ShowFilters MID_7; + }; + item ScDatabaseSetting ScDatabaseSettingItem; + struct ScProtection { BOOL Locked MID_1; @@ -59,6 +71,7 @@ module StarCalc include "pgbrksh.sdi" include "mediash.sdi" include "SparklineShell.sdi" + include "tableshell.sdi" } diff --git a/sc/sdi/tableshell.sdi b/sc/sdi/tableshell.sdi new file mode 100644 index 000000000000..c3147e933208 --- /dev/null +++ b/sc/sdi/tableshell.sdi @@ -0,0 +1,18 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + */ + +interface Table +{ + SID_DATABASE_SETTINGS [ ExecMethod = ExecuteDatabaseSettings; StateMethod = GetDatabaseSettings; ] +} + +shell ScTableShell +{ + import Table; +} diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx index 1f5309050b5c..da3f9dca6d1a 100644 --- a/sc/source/core/tool/dbdata.cxx +++ b/sc/source/core/tool/dbdata.cxx @@ -42,6 +42,187 @@ #include <memory> #include <utility> +using namespace com::sun::star; + +ScDatabaseSettingItem::ScDatabaseSettingItem(): + SfxPoolItem(SCITEM_DATABASE_SETTING), + mbHeaderRow(false), + mbTotalRow(false), + mbFirstCol(false), + mbLastCol(false), + mbStripedRows(false), + mbStripedCols(false), + mbShowFilters(false) +{ +} + +ScDatabaseSettingItem::ScDatabaseSettingItem(bool bHeaderRow, bool bTotalRow, bool bFirstCol, bool bLastCol, bool bStripedRows, bool bStripedCols, bool bShowFilters): + SfxPoolItem(SCITEM_DATABASE_SETTING), + mbHeaderRow(bHeaderRow), + mbTotalRow(bTotalRow), + mbFirstCol(bFirstCol), + mbLastCol(bLastCol), + mbStripedRows(bStripedRows), + mbStripedCols(bStripedCols), + mbShowFilters(bShowFilters) +{ +} + +ScDatabaseSettingItem::ScDatabaseSettingItem(const ScDatabaseSettingItem& rItem): + SfxPoolItem(SCITEM_DATABASE_SETTING), + mbHeaderRow(rItem.mbHeaderRow), + mbTotalRow(rItem.mbTotalRow), + mbFirstCol(rItem.mbFirstCol), + mbLastCol(rItem.mbLastCol), + mbStripedRows(rItem.mbStripedRows), + mbStripedCols(rItem.mbStripedCols), + mbShowFilters(rItem.mbShowFilters) +{ +} + +ScDatabaseSettingItem::~ScDatabaseSettingItem() +{ +} + +bool ScDatabaseSettingItem::QueryValue(uno::Any& rVal, sal_uInt8 nMemberId ) const +{ + switch (nMemberId) + { + case 0: + rVal <<= mbHeaderRow; + break; + case 1: + rVal <<= mbTotalRow; + break; + case 2: + rVal <<= mbFirstCol; + break; + case 3: + rVal <<= mbLastCol; + break; + case 4: + rVal <<= mbStripedRows; + break; + case 5: + rVal <<= mbStripedCols; + break; + case 6: + rVal <<= mbShowFilters; + break; + default: + return false; + } + + return true; +} + +bool ScDatabaseSettingItem::PutValue(const uno::Any& rVal, sal_uInt8 nMemberId ) +{ + bool bVal = false; + + bool bRet = (rVal >>= bVal); + + if(!bRet) + return false; + + switch (nMemberId) + { + case 0: + mbHeaderRow = bVal; + break; + case 1: + mbTotalRow = bVal; + break; + case 2: + mbFirstCol = bVal; + break; + case 3: + mbLastCol = bVal; + break; + case 4: + mbStripedRows = bVal; + break; + case 5: + mbStripedCols = bVal; + break; + case 6: + mbShowFilters = bVal; + break; + default: + return false; + } + + return true; +} + +ScDatabaseSettingItem* ScDatabaseSettingItem::Clone(SfxItemPool* ) const +{ + return new ScDatabaseSettingItem(*this); +} + +SfxPoolItem* ScDatabaseSettingItem::CreateDefault() +{ + return new ScDatabaseSettingItem; +} + +ScDatabaseSettingItem& ScDatabaseSettingItem::operator=(const ScDatabaseSettingItem& rItem) +{ + mbHeaderRow = rItem.mbHeaderRow; + mbTotalRow = rItem.mbTotalRow; + mbFirstCol = rItem.mbFirstCol; + mbLastCol = rItem.mbLastCol; + mbStripedRows = rItem.mbStripedRows; + mbStripedCols = rItem.mbStripedCols; + mbShowFilters = rItem.mbShowFilters; + + return *this; +} + +bool ScDatabaseSettingItem::operator==(const SfxPoolItem& rItem) const +{ + bool bSameBase = SfxPoolItem::operator==(rItem); + if (!bSameBase) + return false; + + const ScDatabaseSettingItem& rDBItem = static_cast<const ScDatabaseSettingItem&>(rItem); + return mbHeaderRow == rDBItem.mbHeaderRow && mbTotalRow == rDBItem.mbTotalRow && mbFirstCol == rDBItem.mbFirstCol && mbLastCol == rDBItem.mbLastCol && mbStripedRows == rDBItem.mbStripedRows && mbStripedCols == rDBItem.mbStripedCols && mbShowFilters == rDBItem.mbShowFilters; +} + +bool ScDatabaseSettingItem::HasHeaderRow() const +{ + return mbHeaderRow; +} + +bool ScDatabaseSettingItem::HasTotalRow() const +{ + return mbTotalRow; +} + +bool ScDatabaseSettingItem::HasFirstCol() const +{ + return mbFirstCol; +} + +bool ScDatabaseSettingItem::HasLastCol() const +{ + return mbLastCol; +} + +bool ScDatabaseSettingItem::HasStripedRows() const +{ + return mbStripedRows; +} + +bool ScDatabaseSettingItem::HasStripedCols() const +{ + return mbStripedCols; +} + +bool ScDatabaseSettingItem::HasShowFilters() const +{ + return mbShowFilters; +} + ScTableStyleParam::ScTableStyleParam(): mbRowStripes(true), mbColumnStripes(false), diff --git a/sc/source/ui/app/msgpool.cxx b/sc/source/ui/app/msgpool.cxx index a8ab8230d2a3..990eac60fdf3 100644 --- a/sc/source/ui/app/msgpool.cxx +++ b/sc/source/ui/app/msgpool.cxx @@ -22,6 +22,7 @@ #include <sc.hrc> #include <docpool.hxx> #include <msgpool.hxx> +#include <dbdata.hxx> static ItemInfoPackage& getItemInfoPackageScMessage() { @@ -38,7 +39,8 @@ static ItemInfoPackage& getItemInfoPackageScMessage() { SCITEM_CONSOLIDATEDATA, new ScConsolidateItem(SCITEM_CONSOLIDATEDATA, nullptr ), SID_CONSOLIDATE, SFX_ITEMINFOFLAG_NONE }, { SCITEM_PIVOTDATA, new ScPivotItem(SCITEM_PIVOTDATA, nullptr, nullptr, false ), SID_PIVOT_TABLE, SFX_ITEMINFOFLAG_NONE }, { SCITEM_SOLVEDATA, new ScSolveItem(SCITEM_SOLVEDATA, nullptr ), SID_SOLVE, SFX_ITEMINFOFLAG_NONE }, - { SCITEM_USERLIST, new ScUserListItem(SCITEM_USERLIST ), SID_SCUSERLISTS, SFX_ITEMINFOFLAG_NONE } + { SCITEM_USERLIST, new ScUserListItem(SCITEM_USERLIST ), SID_SCUSERLISTS, SFX_ITEMINFOFLAG_NONE }, + { SCITEM_DATABASE_SETTING, new ScDatabaseSettingItem(), SID_DATABASE_SETTINGS, SFX_ITEMINFOFLAG_NONE } }}; virtual const ItemInfoStatic& getItemInfoStatic(size_t nIndex) const override { return maItemInfos[nIndex]; } diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index bca5cf652598..98b208d822ac 100644 --- a/sc/source/ui/app/scdll.cxx +++ b/sc/source/ui/app/scdll.cxx @@ -52,6 +52,7 @@ #include <pgbrksh.hxx> #include <scdll.hxx> #include <SparklineShell.hxx> +#include <tableshell.hxx> #include <appoptio.hxx> #include <searchresults.hxx> @@ -129,6 +130,7 @@ void ScDLL::Init() ScEditShell ::RegisterInterface(pMod); ScPivotShell ::RegisterInterface(pMod); sc::SparklineShell ::RegisterInterface(pMod); + ScTableShell ::RegisterInterface(pMod); ScAuditingShell ::RegisterInterface(pMod); ScFormatShell ::RegisterInterface(pMod); ScCellShell ::RegisterInterface(pMod); diff --git a/sc/source/ui/app/typemap.cxx b/sc/source/ui/app/typemap.cxx index 067d9bf40b99..df9d4d79e98d 100644 --- a/sc/source/ui/app/typemap.cxx +++ b/sc/source/ui/app/typemap.cxx @@ -86,6 +86,7 @@ #include <avmedia/mediaitem.hxx> #include <sfx2/frame.hxx> #include <attrib.hxx> +#include <dbdata.hxx> #include <svx/sdprcitm.hxx> #include <svx/sdmetitm.hxx> #include <svx/pageitem.hxx> diff --git a/sc/source/ui/inc/tableshell.hxx b/sc/source/ui/inc/tableshell.hxx new file mode 100644 index 000000000000..4466d190caf7 --- /dev/null +++ b/sc/source/ui/inc/tableshell.hxx @@ -0,0 +1,42 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + */ + +#pragma once + +#include <sfx2/shell.hxx> + +#include <shellids.hxx> + +class ScTabViewShell; +class SfxModule; +class ScDBData; + +class ScTableShell final : public SfxShell +{ +public: + SFX_DECL_INTERFACE(SCID_TABLE_SHELL) + +private: + /// SfxInterface initializer. + static void InitInterface_Impl(); + const ScDBData* GetDBDataAtCursor(); + +public: + ScTableShell(ScTabViewShell* pView); + virtual ~ScTableShell() override; + + void ExecuteDatabaseSettings(SfxRequest& rReq); + void GetDatabaseSettings(SfxItemSet& rSet); + +private: + ScTabViewShell* m_pViewShell; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index f437eb5872e3..b9597ccedb21 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -66,8 +66,11 @@ class ScNavigatorSettings; class ScDrawTransferObj; class ScCondFormatDlgData; class ScDispatchProviderInterceptor; +class ScTableShell; -namespace sc { class SparklineShell; } +namespace sc { + class SparklineShell; +} struct ScHeaderFieldData; @@ -93,6 +96,7 @@ enum ObjectSelectionType OST_Graphic, OST_Media, OST_Sparkline, + OST_Table, }; class ScFormEditData; @@ -128,6 +132,7 @@ private: std::unique_ptr<ScEditShell> pEditShell; std::unique_ptr<ScPivotShell> pPivotShell; std::unique_ptr<sc::SparklineShell> m_pSparklineShell; + std::unique_ptr<ScTableShell> m_pTableShell; std::unique_ptr<ScAuditingShell> pAuditingShell; std::unique_ptr<ScDrawFormShell> pDrawFormShell; std::unique_ptr<ScCellShell> pCellShell; @@ -332,6 +337,7 @@ public: void SetPivotShell( bool bActive ); void SetSparklineShell(bool bActive); + void SetTableShell(bool bActive); void SetDialogDPObject( std::unique_ptr<ScDPObject> pObj ); const ScDPObject* GetDialogDPObject() const { return pDialogDPObject.get(); } diff --git a/sc/source/ui/sidebar/DatabasePropertyPanel.cxx b/sc/source/ui/sidebar/DatabasePropertyPanel.cxx new file mode 100644 index 000000000000..c2dcc3825124 --- /dev/null +++ b/sc/source/ui/sidebar/DatabasePropertyPanel.cxx @@ -0,0 +1,140 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + */ + +#include "DatabasePropertyPanel.hxx" +#include <editeng/justifyitem.hxx> +#include <sc.hrc> +#include <attrib.hxx> +#include <scitems.hxx> +#include <sfx2/bindings.hxx> +#include <sfx2/dispatch.hxx> +#include <svl/intitem.hxx> +#include <svl/itemset.hxx> +#include <svx/rotmodit.hxx> +#include <svtools/unitconv.hxx> +#include <com/sun/star/lang/IllegalArgumentException.hpp> +#include <dbdata.hxx> + +using namespace css; +using namespace css::uno; + +// namespace open + +namespace sc::sidebar +{ +ScDatabasePropertyPanel::ScDatabasePropertyPanel(weld::Widget* pParent, + const css::uno::Reference<css::frame::XFrame>&, + SfxBindings* pBindings) + : PanelLayout(pParent, u"DatabasePropertyPanel"_ustr, + u"modules/scalc/ui/sidebardatabase.ui"_ustr) + , m_xChkHeaderRow(m_xBuilder->weld_check_button(u"chk_header_row"_ustr)) + , m_xChkTotalRow(m_xBuilder->weld_check_button(u"chk_total_row"_ustr)) + , m_xChkFilterButtons(m_xBuilder->weld_check_button(u"chk_filter_buttons"_ustr)) + , m_xChkBandedRows(m_xBuilder->weld_check_button(u"chk_banded_rows"_ustr)) + , m_xChkBandedColumns(m_xBuilder->weld_check_button(u"chk_banded_cols"_ustr)) + , m_xChkFirstColumn(m_xBuilder->weld_check_button(u"chk_first_column"_ustr)) + , m_xChkLastColumn(m_xBuilder->weld_check_button(u"chk_last_column"_ustr)) + , maHeaderRowCtrl(SID_DATABASE_SETTINGS, *pBindings, *this) + , mpBindings(pBindings) +{ + Initialize(); +} + +ScDatabasePropertyPanel::~ScDatabasePropertyPanel() +{ + m_xChkHeaderRow.reset(); + m_xChkTotalRow.reset(); + m_xChkFilterButtons.reset(); + m_xChkBandedRows.reset(); + m_xChkBandedColumns.reset(); + m_xChkFirstColumn.reset(); + m_xChkLastColumn.reset(); + + maHeaderRowCtrl.dispose(); +} + +void ScDatabasePropertyPanel::Initialize() +{ + m_xChkHeaderRow->connect_toggled(LINK(this, ScDatabasePropertyPanel, EntryChanged)); + m_xChkTotalRow->connect_toggled(LINK(this, ScDatabasePropertyPanel, EntryChanged)); + m_xChkFilterButtons->connect_toggled(LINK(this, ScDatabasePropertyPanel, EntryChanged)); + m_xChkBandedRows->connect_toggled(LINK(this, ScDatabasePropertyPanel, EntryChanged)); + m_xChkBandedColumns->connect_toggled(LINK(this, ScDatabasePropertyPanel, EntryChanged)); + m_xChkFirstColumn->connect_toggled(LINK(this, ScDatabasePropertyPanel, EntryChanged)); + m_xChkLastColumn->connect_toggled(LINK(this, ScDatabasePropertyPanel, EntryChanged)); +} + +std::unique_ptr<PanelLayout> +ScDatabasePropertyPanel::Create(weld::Widget* pParent, + const css::uno::Reference<css::frame::XFrame>& rxFrame, + SfxBindings* pBindings) +{ + if (pParent == nullptr) + throw lang::IllegalArgumentException( + u"no parent Window given to ScDatabasePropertyPanel::Create"_ustr, nullptr, 0); + if (!rxFrame.is()) + throw lang::IllegalArgumentException( + u"no XFrame given to ScDatabasePropertyPanel::Create"_ustr, nullptr, 1); + if (pBindings == nullptr) + throw lang::IllegalArgumentException( + u"no SfxBindings given to ScDatabasePropertyPanel::Create"_ustr, nullptr, 2); + + return std::make_unique<ScDatabasePropertyPanel>(pParent, rxFrame, pBindings); +} + +void ScDatabasePropertyPanel::HandleContextChange(const vcl::EnumContext& rContext) +{ + if (maContext == rContext) + { + // Nothing to do. + return; + } + + maContext = rContext; +} + +void ScDatabasePropertyPanel::NotifyItemUpdate(sal_uInt16 nSID, SfxItemState eState, + const SfxPoolItem* pState) +{ + switch (nSID) + { + case SID_DATABASE_SETTINGS: + if (eState >= SfxItemState::DEFAULT + && dynamic_cast<const ScDatabaseSettingItem*>(pState)) + { + const ScDatabaseSettingItem* pItem + = static_cast<const ScDatabaseSettingItem*>(pState); + m_xChkHeaderRow->set_active(pItem->HasHeaderRow()); + m_xChkTotalRow->set_active(pItem->HasTotalRow()); + m_xChkFirstColumn->set_active(pItem->HasFirstCol()); + m_xChkLastColumn->set_active(pItem->HasLastCol()); + m_xChkBandedRows->set_active(pItem->HasStripedRows()); + m_xChkBandedColumns->set_active(pItem->HasStripedCols()); + m_xChkFilterButtons->set_active(pItem->HasShowFilters()); + } + break; + } +} + +IMPL_LINK_NOARG(ScDatabasePropertyPanel, EntryChanged, weld::Toggleable&, void) +{ + ScDatabaseSettingItem aItem(m_xChkHeaderRow->get_active(), m_xChkTotalRow->get_active(), + m_xChkFirstColumn->get_active(), m_xChkLastColumn->get_active(), + m_xChkBandedRows->get_active(), m_xChkBandedColumns->get_active(), + m_xChkFilterButtons->get_active()); + GetBindings()->GetDispatcher()->ExecuteList(SID_DATABASE_SETTINGS, SfxCallMode::RECORD, + { &aItem }); +} + +// namespace close + +} // end of namespace ::sc::sidebar + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/sidebar/DatabasePropertyPanel.hxx b/sc/source/ui/sidebar/DatabasePropertyPanel.hxx new file mode 100644 index 000000000000..d1d6f6e39c99 --- /dev/null +++ b/sc/source/ui/sidebar/DatabasePropertyPanel.hxx @@ -0,0 +1,67 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + */ +#pragma once + +#include <sfx2/sidebar/ControllerItem.hxx> +#include <sfx2/sidebar/IContextChangeReceiver.hxx> +#include <sfx2/weldutils.hxx> +#include <sfx2/sidebar/PanelLayout.hxx> +#include <vcl/EnumContext.hxx> + +namespace sc::sidebar +{ +class ScDatabasePropertyPanel : public PanelLayout, + public ::sfx2::sidebar::IContextChangeReceiver, + public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface +{ +public: + static std::unique_ptr<PanelLayout> + Create(weld::Widget* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame, + SfxBindings* pBindings); + + virtual void HandleContextChange(const vcl::EnumContext& rContext) override; + + virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, + const SfxPoolItem* pState) override; + + virtual void GetControlState(const sal_uInt16 /*nSId*/, + boost::property_tree::ptree& /*rState*/) override{}; + + SfxBindings* GetBindings() { return mpBindings; } + + // constructor/destructor + ScDatabasePropertyPanel(weld::Widget* pParent, + const css::uno::Reference<css::frame::XFrame>& rxFrame, + SfxBindings* pBindings); + virtual ~ScDatabasePropertyPanel() override; + +private: + //ui controls + std::unique_ptr<weld::CheckButton> m_xChkHeaderRow; + std::unique_ptr<weld::CheckButton> m_xChkTotalRow; + std::unique_ptr<weld::CheckButton> m_xChkFilterButtons; + std::unique_ptr<weld::CheckButton> m_xChkBandedRows; + std::unique_ptr<weld::CheckButton> m_xChkBandedColumns; + std::unique_ptr<weld::CheckButton> m_xChkFirstColumn; + std::unique_ptr<weld::CheckButton> m_xChkLastColumn; + + ::sfx2::sidebar::ControllerItem maHeaderRowCtrl; + + DECL_LINK(EntryChanged, weld::Toggleable&, void); + + vcl::EnumContext maContext; + SfxBindings* mpBindings; + + void Initialize(); +}; + +} // end of namespace ::sc::sidebar + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/sidebar/ScPanelFactory.cxx b/sc/source/ui/sidebar/ScPanelFactory.cxx index 37df0fc263ab..c68311106249 100644 --- a/sc/source/ui/sidebar/ScPanelFactory.cxx +++ b/sc/source/ui/sidebar/ScPanelFactory.cxx @@ -22,6 +22,7 @@ #include "AlignmentPropertyPanel.hxx" #include "CellAppearancePropertyPanel.hxx" #include "NumberFormatPropertyPanel.hxx" +#include "DatabasePropertyPanel.hxx" #include <navipi.hxx> #include <dwfunctr.hxx> @@ -94,6 +95,11 @@ Reference<ui::XUIElement> SAL_CALL ScPanelFactory::createUIElement ( xPanel = std::make_unique<ScFunctionWin>(pParent, pBindings); nMinimumSize = 0; } + else if (rsResourceURL.endsWith("/DatabasePropertyPanel")) + { + xPanel = ScDatabasePropertyPanel::Create( pParent, xFrame, pBindings ); + nMinimumSize = 0; + } if (xPanel) xElement = sfx2::sidebar::SidebarPanelBase::Create( diff --git a/sc/source/ui/view/tableshell.cxx b/sc/source/ui/view/tableshell.cxx new file mode 100644 index 000000000000..8fc525e1d5a1 --- /dev/null +++ b/sc/source/ui/view/tableshell.cxx @@ -0,0 +1,128 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + */ + +#include <scitems.hxx> +#include <sfx2/objface.hxx> +#include <sfx2/objsh.hxx> +#include <sfx2/bindings.hxx> +#include <sfx2/request.hxx> +#include <svl/whiter.hxx> +#include <vcl/EnumContext.hxx> + +#include <sc.hrc> +#include <tableshell.hxx> +#include <tabvwsh.hxx> +#include <docsh.hxx> +#include <document.hxx> +#include <dbdata.hxx> +#include <dbdocfun.hxx> + +#define ShellClass_ScTableShell +#include <scslots.hxx> + +SFX_IMPL_INTERFACE(ScTableShell, SfxShell) + +void ScTableShell::InitInterface_Impl() {} + +ScTableShell::ScTableShell(ScTabViewShell* pViewShell) + : SfxShell(pViewShell) + , m_pViewShell(pViewShell) +{ + SetPool(&m_pViewShell->GetPool()); + ScViewData& rViewData = m_pViewShell->GetViewData(); + SfxUndoManager* pUndoManager = rViewData.GetSfxDocShell()->GetUndoManager(); + SetUndoManager(pUndoManager); + if (!rViewData.GetDocument().IsUndoEnabled()) + { + pUndoManager->SetMaxUndoActionCount(0); + } + SetName("Table"); + SfxShell::SetContextName(vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Table)); +} + +ScTableShell::~ScTableShell() = default; + +const ScDBData* ScTableShell::GetDBDataAtCursor() +{ + ScViewData& rViewData = m_pViewShell->GetViewData(); + const ScAddress aAddr = rViewData.GetCurPos(); + return rViewData.GetDocument().GetDBAtCursor(aAddr.Col(), aAddr.Row(), aAddr.Tab(), + ScDBDataPortion::AREA); +} + +void ScTableShell::ExecuteDatabaseSettings(SfxRequest& rReq) +{ + const SfxItemSet* pSet = rReq.GetArgs(); + sal_uInt16 nSlot = rReq.GetSlot(); + ScViewData& rViewData = m_pViewShell->GetViewData(); + SfxBindings& rBindings = rViewData.GetBindings(); + + switch (nSlot) + { + case SID_DATABASE_SETTINGS: + { + const SfxPoolItem* pItem; + SfxItemState eItemState = pSet->GetItemState(SCITEM_DATABASE_SETTING, true, &pItem); + if (eItemState == SfxItemState::SET + && dynamic_cast<const ScDatabaseSettingItem*>(pItem)) + { + const ScDatabaseSettingItem* pDBItem + = static_cast<const ScDatabaseSettingItem*>(pItem); + const ScDBData* pDBData = GetDBDataAtCursor(); + if (pDBData) + { + ScDBData aNewDBData(*pDBData); + aNewDBData.SetAutoFilter(pDBItem->HasShowFilters()); + aNewDBData.SetHeader(pDBItem->HasHeaderRow()); + aNewDBData.SetTotals(pDBItem->HasTotalRow()); + + ScTableStyleParam aNewParam(*pDBData->GetTableStyleInfo()); + aNewParam.mbRowStripes = pDBItem->HasStripedRows(); + aNewParam.mbColumnStripes = pDBItem->HasStripedCols(); + aNewParam.mbFirstColumn = pDBItem->HasFirstCol(); + aNewParam.mbLastColumn = pDBItem->HasLastCol(); + aNewDBData.SetTableStyleInfo(aNewParam); + + ScDBDocFunc aFunc(*rViewData.GetDocShell()); + aFunc.ModifyDBData(aNewDBData); + } + } + break; + } + } + + rBindings.Invalidate(SID_DATABASE_SETTINGS); +} + +void ScTableShell::GetDatabaseSettings(SfxItemSet& rSet) +{ + SfxWhichIter aIter(rSet); + sal_uInt16 nWhich = aIter.FirstWhich(); + while (nWhich) + { + switch (nWhich) + { + case SCITEM_DATABASE_SETTING: + const ScDBData* pDBData = GetDBDataAtCursor(); + if (pDBData) + { + const ScTableStyleParam* pParam = pDBData->GetTableStyleInfo(); + rSet.Put(ScDatabaseSettingItem(pDBData->HasHeader(), pDBData->HasTotals(), + pParam->mbFirstColumn, pParam->mbLastColumn, + pParam->mbRowStripes, pParam->mbColumnStripes, + pDBData->HasAutoFilter())); + } + break; + } + nWhich = aIter.NextWhich(); + } +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index ea051f680372..5b1bc08da37f 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -674,8 +674,14 @@ void ScTabView::CursorPosChanged() if (!bDataPilot) { - bool bSparkline = rDocument.HasSparkline(aViewData.GetCurPos()); + const ScAddress rAddr = aViewData.GetCurPos(); + bool bSparkline = rDocument.HasSparkline(rAddr); aViewData.GetViewShell()->SetSparklineShell(bSparkline); + if (!bSparkline) + { + bool bHasDBTable = rDocument.GetDBAtCursor(rAddr.Col(), rAddr.Row(), rAddr.Tab(), ScDBDataPortion::AREA) != nullptr; + aViewData.GetViewShell()->SetTableShell(bHasDBTable); + } } // UpdateInputHandler now in CellContentChanged diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index defbfa0c8fdf..8ecdd362a01e 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -47,6 +47,7 @@ #include <editsh.hxx> #include <pivotsh.hxx> #include <SparklineShell.hxx> +#include <tableshell.hxx> #include <auditsh.hxx> #include <drtxtob.hxx> #include <inputhdl.hxx> @@ -717,6 +718,25 @@ void ScTabViewShell::SetSparklineShell(bool bActive) SetCurSubShell(OST_Cell); } +void ScTabViewShell::SetTableShell(bool bActive) +{ + if (eCurOST != OST_Table && eCurOST != OST_Cell) + return; + + if (bActive) + { + bActiveDrawTextSh = bActiveDrawSh = false; + bActiveDrawFormSh=false; + bActiveGraphicSh=false; + bActiveMediaSh=false; + bActiveOleObjectSh=false; + bActiveChartSh=false; + SetCurSubShell(OST_Table); + } + else + SetCurSubShell(OST_Cell); +} + void ScTabViewShell::SetAuditShell( bool bActive ) { if ( bActive ) @@ -990,6 +1010,20 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, bool bForce) bCellBrush = true; } break; + case OST_Table: + { + AddSubShell(*pCellShell); + if(bPgBrk) AddSubShell(*pPageBreakShell); + + if (!m_pTableShell) + { + m_pTableShell.reset(new ScTableShell(this)); + m_pTableShell->SetRepeatTarget(&aTarget); + } + AddSubShell(*m_pTableShell); + bCellBrush = true; + } + break; default: OSL_FAIL("wrong shell requested"); break; @@ -1038,7 +1072,7 @@ SfxShell* ScTabViewShell::GetMySubShell() const pSub == pPivotShell.get() || pSub == pAuditingShell.get() || pSub == pDrawFormShell.get() || pSub == pCellShell.get() || pSub == pOleObjectShell.get() || pSub == pChartShell.get() || pSub == pGraphicShell.get() || pSub == pMediaShell.get() || pSub == pPageBreakShell.get() || - pSub == m_pSparklineShell.get()) + pSub == m_pSparklineShell.get() || pSub == m_pTableShell.get()) { return pSub; // found } @@ -2206,6 +2240,7 @@ ScTabViewShell::~ScTabViewShell() pEditShell.reset(); pPivotShell.reset(); m_pSparklineShell.reset(); + m_pTableShell.reset(); pAuditingShell.reset(); pCurFrameLine.reset(); mpFormEditData.reset(); diff --git a/sc/uiconfig/scalc/ui/sidebardatabase.ui b/sc/uiconfig/scalc/ui/sidebardatabase.ui new file mode 100644 index 000000000000..393cb22d631e --- /dev/null +++ b/sc/uiconfig/scalc/ui/sidebardatabase.ui @@ -0,0 +1,124 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.40.0 --> +<interface domain="sc"> + <requires lib="gtk+" version="3.20"/> + <!-- n-columns=2 n-rows=5 --> + <object class="GtkGrid" id="DatabasePropertyPanel"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <child> + <object class="GtkCheckButton" id="chk_header_row"> + <property name="label" translatable="yes" context="sidebardatabase|show_header_row_checkbox">Show Header Row</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="chk_first_column"> + <property name="label" translatable="yes" context="sidebardatabase|first_column_formatting_checkbox">First Column</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">4</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="chk_last_column"> + <property name="label" translatable="yes" context="sidebardatabase|last_column_formatting_checkbox">Last Column</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">4</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="chk_banded_cols"> + <property name="label" translatable="yes" context="sidebardatabase|banded_columns_formatting_checkbox">Banded Columns</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">3</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="chk_banded_rows"> + <property name="label" translatable="yes" context="sidebardatabase|banded_rows_formatting_checkbox">Banded Rows</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">3</property> + </packing> + </child> + <child> + <object class="GtkSeparator"> + <property name="visible">True</property> + <property name="can-focus">False</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">2</property> + </packing> + </child> + <child> + <object class="GtkSeparator"> + <property name="visible">True</property> + <property name="can-focus">False</property> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">2</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="chk_filter_buttons"> + <property name="label" translatable="yes" context="sidebardatabase|show_filter_buttons_checkbox">Show Filter Buttons</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="chk_total_row"> + <property name="label" translatable="yes" context="sidebardatabase|show_total_row_checkbox">Show Total Row</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">0</property> + </packing> + </child> + <child> + <placeholder/> + </child> + </object> +</interface> diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index deff3dcf1ec5..1e963565bb7a 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -125,6 +125,7 @@ void ParaPropertyPanel::HandleContextChange ( case CombinedEnumContext(Application::Calc, Context::Cell): case CombinedEnumContext(Application::Calc, Context::Pivot): case CombinedEnumContext(Application::Calc, Context::Sparkline): + case CombinedEnumContext(Application::Calc, Context::Table): case CombinedEnumContext(Application::DrawImpress, Context::Text): case CombinedEnumContext(Application::DrawImpress, Context::OutlineText): set_hyphenation_base_visible(false);
