Table Style: introduce insert/delete Table... command available from
menubar Insert and Data. With that command a new Table Style area (context) can be added to the sheet with a defalt table style name (Table1, Table2 etc.). If the default ooxml table styles are available the "TableStyleMedium2" style will be automatically applied (same as in Mso), which can be modified to any other available style after that. Also add new command for delete a table context. It is also available from Insert and Data menubar. For simplifying the dbrange behaviour, it will not possible to change DbRange properties of those DbRanges which has Table context. (same as in MSO) from the older DbRange dialog Includes cleanup for unused-but-set variables (-Werror). Change-Id: I98067e895d9595ba07206759deff6848dc299216 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194408 Tested-by: Balazs Varga <balazs.varga@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Balazs Varga <balazs.varga@collabora.com> Code-Style: Balazs Varga <balazs.varga@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196768 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197994 Tested-by: Jenkins
This commit is contained in:
@@ -1164,6 +1164,47 @@
|
||||
<value>1</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name=".uno:DataTableMenu" oor:op="replace">
|
||||
<prop oor:name="Label" oor:type="xs:string">
|
||||
<value xml:lang="en-US">~Table</value>
|
||||
</prop>
|
||||
<prop oor:name="Properties" oor:type="xs:int">
|
||||
<value>1</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name=".uno:RunInsCalcTable" oor:op="replace">
|
||||
<prop oor:name="Label" oor:type="xs:string">
|
||||
<value xml:lang="en-US">~Insert Table...</value>
|
||||
</prop>
|
||||
<prop oor:name="TargetURL" oor:type="xs:string">
|
||||
<value>.uno:InsertCalcTable</value>
|
||||
</prop>
|
||||
<prop oor:name="Properties" oor:type="xs:int">
|
||||
<value>1</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name=".uno:InsertCalcTable" oor:op="replace">
|
||||
<prop oor:name="Label" oor:type="xs:string">
|
||||
<value xml:lang="en-US">Table...</value>
|
||||
</prop>
|
||||
<prop oor:name="TooltipLabel" oor:type="xs:string">
|
||||
<value xml:lang="en-US">Insert Table</value>
|
||||
</prop>
|
||||
<prop oor:name="Properties" oor:type="xs:int">
|
||||
<value>1</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name=".uno:RemoveCalcTable" oor:op="replace">
|
||||
<prop oor:name="Label" oor:type="xs:string">
|
||||
<value xml:lang="en-US">~Remove Table...</value>
|
||||
</prop>
|
||||
<prop oor:name="TooltipLabel" oor:type="xs:string">
|
||||
<value xml:lang="en-US">Delete Table</value>
|
||||
</prop>
|
||||
<prop oor:name="Properties" oor:type="xs:int">
|
||||
<value>1</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name=".uno:InsertSparkline" oor:op="replace">
|
||||
<prop oor:name="Label" oor:type="xs:string">
|
||||
<value xml:lang="en-US">Sparkline...</value>
|
||||
|
||||
@@ -593,6 +593,20 @@
|
||||
<value>recordtrackedchanges</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name="c47" oor:op="replace">
|
||||
<prop oor:name="Command">
|
||||
<value>.uno:DataTableMenu</value>
|
||||
</prop>
|
||||
<prop oor:name="Module">
|
||||
<value/>
|
||||
</prop>
|
||||
<prop oor:name="Controller">
|
||||
<value>com.sun.star.comp.framework.ResourceMenuController</value>
|
||||
</prop>
|
||||
<prop oor:name="Value">
|
||||
<value>datatablemenu</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name="WindowListMenu" oor:op="replace">
|
||||
<prop oor:name="Command">
|
||||
<value>.uno:WindowList</value>
|
||||
|
||||
@@ -429,6 +429,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
|
||||
sc/source/ui/dbgui/csvsplits \
|
||||
sc/source/ui/dbgui/csvtablebox \
|
||||
sc/source/ui/dbgui/dbnamdlg \
|
||||
sc/source/ui/dbgui/dbtabledlg \
|
||||
sc/source/ui/dbgui/filtdlg \
|
||||
sc/source/ui/dbgui/foptmgr \
|
||||
sc/source/ui/dbgui/imoptdlg \
|
||||
|
||||
@@ -22,6 +22,7 @@ $(eval $(call gb_UIConfig_add_popupmenufiles,modules/scalc,\
|
||||
sc/uiconfig/scalc/popupmenu/column_operations \
|
||||
sc/uiconfig/scalc/popupmenu/conditional \
|
||||
sc/uiconfig/scalc/popupmenu/conditional_easy \
|
||||
sc/uiconfig/scalc/popupmenu/datatablemenu \
|
||||
sc/uiconfig/scalc/popupmenu/draw \
|
||||
sc/uiconfig/scalc/popupmenu/drawtext \
|
||||
sc/uiconfig/scalc/popupmenu/form \
|
||||
@@ -124,6 +125,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
|
||||
sc/uiconfig/scalc/ui/dataproviderdlg \
|
||||
sc/uiconfig/scalc/ui/definedatabaserangedialog \
|
||||
sc/uiconfig/scalc/ui/definename \
|
||||
sc/uiconfig/scalc/ui/definetablerangedialog \
|
||||
sc/uiconfig/scalc/ui/deletecells \
|
||||
sc/uiconfig/scalc/ui/deletecolumnentry \
|
||||
sc/uiconfig/scalc/ui/deletecontents \
|
||||
|
||||
@@ -372,6 +372,7 @@ public:
|
||||
ScDBData* findByIndex(sal_uInt16 nIndex);
|
||||
ScDBData* findByUpperName(const OUString& rName);
|
||||
iterator findByUpperName2(const OUString& rName);
|
||||
iterator findByPointer(const ScDBData* p);
|
||||
ScDBData* findByName(const OUString& rName);
|
||||
|
||||
/** Takes ownership of p and attempts to insert it into the collection.
|
||||
|
||||
@@ -899,6 +899,7 @@ public:
|
||||
ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion);
|
||||
SC_DLLPUBLIC const ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const;
|
||||
SC_DLLPUBLIC ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
|
||||
std::vector<const ScDBData*> GetAllDBsInArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab) const;
|
||||
void RefreshDirtyTableColumnNames();
|
||||
SC_DLLPUBLIC sc::ExternalDataMapper& GetExternalDataMapper();
|
||||
|
||||
|
||||
+9
-2
@@ -67,9 +67,11 @@
|
||||
#define STR_UNDO_REMOVEALLOTLNS NC_("STR_UNDO_REMOVEALLOTLNS", "Clear Outline")
|
||||
#define STR_UNDO_AUTOOUTLINE NC_("STR_UNDO_AUTOOUTLINE", "AutoOutline")
|
||||
#define STR_UNDO_SUBTOTALS NC_("STR_UNDO_SUBTOTALS", "Subtotals")
|
||||
#define STR_UNDO_TABLETOTALS NC_("STR_UNDO_TABLETOTALS", "Tabletotals")
|
||||
#define STR_UNDO_TABLETOTALS NC_("STR_UNDO_TABLETOTALS", "Table Total Row")
|
||||
#define STR_UNDO_SORT NC_("STR_UNDO_SORT", "Sort")
|
||||
#define STR_UNDO_QUERY NC_("STR_UNDO_QUERY", "Filter")
|
||||
#define STR_UNDO_DBADDTABLE NC_("STR_UNDO_DBTABLE", "Create table")
|
||||
#define STR_UNDO_DBREMTABLE NC_("STR_UNDO_DBTABLE", "Delete table")
|
||||
#define STR_UNDO_DBDATA NC_("STR_UNDO_DBDATA", "Change Database Range")
|
||||
#define STR_UNDO_IMPORTDATA NC_("STR_UNDO_IMPORTDATA", "Importing")
|
||||
#define STR_UNDO_REPEATDB NC_("STR_UNDO_REPEATDB", "Refresh range")
|
||||
@@ -135,6 +137,8 @@
|
||||
#define STR_MSSG_DELETECELLS_0 NC_("STR_MSSG_DELETECELLS_0", "Deleting in merged ranges not possible")
|
||||
#define STR_MSSG_MERGECELLS_0 NC_("STR_MSSG_MERGECELLS_0", "Cell merge not possible if cells already merged")
|
||||
#define STR_SORT_ERR_MERGED NC_("STR_SORT_ERR_MERGED", "Ranges containing merged cells can only be sorted without formats.")
|
||||
#define STR_TABLE_ERR_ADD NC_("STR_TABLE_ERR_ADD", "Cannot add a new table to the sheet.")
|
||||
#define STR_TABLE_ERR_DEL NC_("STR_TABLE_ERR_DEL", "Cannot delete table from the sheet.")
|
||||
#define STR_MSSG_SOLVE_0 NC_("STR_MSSG_SOLVE_0", "Goal Seek succeeded. Result: ")
|
||||
#define STR_MSSG_SOLVE_1 NC_("STR_MSSG_SOLVE_1", "\n\nInsert the result into the variable cell?")
|
||||
#define STR_MSSG_SOLVE_2 NC_("STR_MSSG_SOLVE_2", "Goal Seek failed.\n\n")
|
||||
@@ -188,6 +192,8 @@
|
||||
#define STR_INVALIDTABNAME NC_("STR_INVALIDTABNAME", "Invalid sheet name.\n\nThe sheet name must not:\n• be empty\n• already exist\n• contain [ ] * ? : / \\ \n• use ' (apostrophe) as first or last character.")
|
||||
#define STR_SCENARIO NC_("STR_SCENARIO", "Scenario")
|
||||
#define STR_PIVOT_TABLE NC_("STR_PIVOT_TABLE", "Pivot Table")
|
||||
#define STR_CALC_TABLE NC_("STR_CALC_TABLE", "Table")
|
||||
#define STR_INVALIDTABLE NC_("STR_INVALIDTABLE", "The selected area is already part of another Table.")
|
||||
// Text strings for captions of subtotal functions.
|
||||
#define STR_FUN_TEXT_SUM NC_("STR_FUN_TEXT_SUM", "Sum")
|
||||
#define STR_FUN_TEXT_SELECTION_COUNT NC_("STR_FUN_TEXT_SELECTION_COUNT", "Selection count")
|
||||
@@ -208,9 +214,10 @@
|
||||
#define STR_TABLE_GRAND_STDDEV NC_("STR_TABLE_GRAND_STDDEV", "Grand StdDev")
|
||||
#define STR_TABLE_GRAND_SUM NC_("STR_TABLE_GRAND_SUM", "Grand Sum")
|
||||
#define STR_TABLE_GRAND_VAR NC_("STR_TABLE_GRAND_VAR", "Grand Var")
|
||||
#define STR_TABLE_TOTAL NC_("STR_TABLE_TOTAL", "Summary")
|
||||
#define STR_TABLE_TOTAL NC_("STR_TABLE_TOTAL", "Total")
|
||||
#define STR_NOCHARTATCURSOR NC_("STR_NOCHARTATCURSOR", "No chart found at this position.")
|
||||
#define STR_PIVOT_NOTFOUND NC_("STR_PIVOT_NOTFOUND", "No pivot table found at this position.")
|
||||
#define STR_TABLE_NOTFOUND NC_("STR_TABLE_NOTFOUND", "No Calc Table found at this position.")
|
||||
#define STR_EMPTYDATA NC_("STR_EMPTYDATA", "(empty)")
|
||||
#define STR_PRINT_INVALID_AREA NC_("STR_PRINT_INVALID_AREA", "Invalid print range")
|
||||
#define STR_PAGESTYLE NC_("STR_PAGESTYLE", "Page Style")
|
||||
|
||||
@@ -639,6 +639,8 @@ static_assert(SID_PREVIEW_END < SID_KEYFUNC_START, "calc slots ids trampling inf
|
||||
#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)
|
||||
#define SID_INSERT_CALCTABLE (SID_NEW_SLOTS+120)
|
||||
#define SID_REMOVE_CALCTABLE (SID_NEW_SLOTS+121)
|
||||
|
||||
// idl parameter
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ interface CellSelection
|
||||
FID_CURRENTVALIDATION [ ExecMethod = ExecuteDB; StateMethod = GetBlockState; ]
|
||||
SID_TEXT_TO_COLUMNS [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
|
||||
SID_CLEAR_AUTO_FILTER [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
|
||||
SID_INSERT_CALCTABLE [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
|
||||
|
||||
// } database operations
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ interface TableDraw
|
||||
SID_DEFINE_DBNAME [ StateMethod = StateDisableItems; ]
|
||||
SID_OPENDLG_CONSOLIDATE [ StateMethod = StateDisableItems; ]
|
||||
SID_OPENDLG_EDIT_PRINTAREA [ StateMethod = StateDisableItems; ]
|
||||
SID_INSERT_CALCTABLE [ StateMethod = StateDisableItems; ]
|
||||
// others:
|
||||
SID_DRAW_CHART [ StateMethod = StateDisableItems; ]
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ interface TableDrawText
|
||||
SID_DEFINE_DBNAME [ StateMethod = StateDisableItems; ]
|
||||
SID_OPENDLG_CONSOLIDATE [ StateMethod = StateDisableItems; ]
|
||||
SID_OPENDLG_EDIT_PRINTAREA [ StateMethod = StateDisableItems; ]
|
||||
SID_INSERT_CALCTABLE [ StateMethod = StateDisableItems; ]
|
||||
// others:
|
||||
SID_DRAW_CHART [ StateMethod = StateDisableItems; ]
|
||||
SID_OPENDLG_FUNCTION [ StateMethod = StateDisableItems; ]
|
||||
|
||||
@@ -6476,6 +6476,42 @@ ScDatabaseSettingItem DatabaseSettings SID_DATABASE_SETTINGS
|
||||
]
|
||||
|
||||
|
||||
SfxVoidItem InsertCalcTable SID_INSERT_CALCTABLE
|
||||
()
|
||||
[
|
||||
AutoUpdate = FALSE,
|
||||
FastCall = FALSE,
|
||||
ReadOnlyDoc = TRUE,
|
||||
Toggle = FALSE,
|
||||
Container = FALSE,
|
||||
RecordAbsolute = FALSE,
|
||||
RecordPerSet;
|
||||
|
||||
AccelConfig = TRUE,
|
||||
MenuConfig = TRUE,
|
||||
ToolBoxConfig = TRUE,
|
||||
GroupId = SfxGroupId::Data;
|
||||
]
|
||||
|
||||
|
||||
SfxVoidItem RemoveCalcTable SID_REMOVE_CALCTABLE
|
||||
()
|
||||
[
|
||||
AutoUpdate = FALSE,
|
||||
FastCall = FALSE,
|
||||
ReadOnlyDoc = TRUE,
|
||||
Toggle = FALSE,
|
||||
Container = FALSE,
|
||||
RecordAbsolute = FALSE,
|
||||
RecordPerSet;
|
||||
|
||||
AccelConfig = TRUE,
|
||||
MenuConfig = TRUE,
|
||||
ToolBoxConfig = TRUE,
|
||||
GroupId = SfxGroupId::Data;
|
||||
]
|
||||
|
||||
|
||||
SfxVoidItem SelectArrayFormula SID_MARKARRAYFORMULA
|
||||
()
|
||||
[
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
interface Table
|
||||
{
|
||||
SID_DATABASE_SETTINGS [ ExecMethod = ExecuteDatabaseSettings; StateMethod = GetDatabaseSettings; ]
|
||||
SID_REMOVE_CALCTABLE [ ExecMethod = ExecuteDatabaseSettings; StateMethod = GetDatabaseSettings; ]
|
||||
}
|
||||
|
||||
shell ScTableShell
|
||||
|
||||
@@ -357,6 +357,15 @@ ScDBData* ScDocument::GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nC
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::vector<const ScDBData*> ScDocument::GetAllDBsInArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
|
||||
SCROW nRow2, SCTAB nTab) const
|
||||
{
|
||||
if (pDBCollection)
|
||||
return pDBCollection->GetAllDBsInArea(nCol1, nRow1, nCol2, nRow2, nTab);
|
||||
else
|
||||
return std::vector<const ScDBData*>();
|
||||
}
|
||||
|
||||
void ScDocument::RefreshDirtyTableColumnNames()
|
||||
{
|
||||
if (pDBCollection)
|
||||
|
||||
@@ -1881,6 +1881,11 @@ auto ScDBCollection::NamedDBs::findByUpperName2(const OUString& rName) -> iterat
|
||||
m_DBs.begin(), m_DBs.end(), FindByUpperName(rName));
|
||||
}
|
||||
|
||||
auto ScDBCollection::NamedDBs::findByPointer( const ScDBData* p ) -> iterator
|
||||
{
|
||||
return find_if(m_DBs.begin(), m_DBs.end(), FindByPointer(p));
|
||||
}
|
||||
|
||||
ScDBData* ScDBCollection::NamedDBs::findByName(const OUString& rName)
|
||||
{
|
||||
DBsType::iterator itr = find_if(m_DBs.begin(), m_DBs.end(), FindByName(rName));
|
||||
|
||||
@@ -199,6 +199,7 @@ void ScDLL::Init()
|
||||
ScPrintAreasDlgWrapper ::RegisterChildWindow(false, pMod);
|
||||
ScColRowNameRangesDlgWrapper::RegisterChildWindow(false, pMod);
|
||||
ScFormulaDlgWrapper ::RegisterChildWindow(false, pMod);
|
||||
ScTableLayoutWrapper ::RegisterChildWindow(false, pMod);
|
||||
|
||||
ScRandomNumberGeneratorDialogWrapper::RegisterChildWindow(false, pMod);
|
||||
ScSamplingDialogWrapper ::RegisterChildWindow(false, pMod);
|
||||
|
||||
@@ -354,9 +354,18 @@ void ScDbNameDlg::UpdateDBData( const OUString& rStrName )
|
||||
}
|
||||
|
||||
m_xBtnAdd->set_label( aStrModify );
|
||||
m_xBtnAdd->set_sensitive(true);
|
||||
m_xBtnRemove->set_sensitive(true);
|
||||
m_xOptions->set_sensitive(true);
|
||||
if (!pData->GetTableStyleInfo())
|
||||
{
|
||||
m_xOptions->set_sensitive(true);
|
||||
m_xBtnAdd->set_sensitive(true);
|
||||
m_xBtnRemove->set_sensitive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_xBtnAdd->set_sensitive(false);
|
||||
m_xBtnRemove->set_sensitive(false);
|
||||
m_xOptions->set_sensitive(false);
|
||||
}
|
||||
}
|
||||
|
||||
bool ScDbNameDlg::IsRefInputMode() const
|
||||
@@ -591,7 +600,12 @@ IMPL_LINK_NOARG(ScDbNameDlg, NameModifyHdl, weld::ComboBox&, void)
|
||||
m_xBtnRemove->set_sensitive(false);
|
||||
}
|
||||
|
||||
m_xAssignFrame->set_sensitive(true);
|
||||
const ScDBData* pData = aLocalDbCol.getNamedDBs().findByUpperName(
|
||||
ScGlobal::getCharClass().uppercase(theName));
|
||||
if (pData && pData->GetTableStyleInfo())
|
||||
m_xAssignFrame->set_sensitive(false);
|
||||
else
|
||||
m_xAssignFrame->set_sensitive(true);
|
||||
|
||||
//@BugID 54702 enable/disable in the base class only
|
||||
//SFX_APPWINDOW->set_sensitive(true);
|
||||
|
||||
@@ -0,0 +1,222 @@
|
||||
/* -*- 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/.
|
||||
*
|
||||
* This file incorporates work covered by the following license notice:
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed
|
||||
* with this work for additional information regarding copyright
|
||||
* ownership. The ASF licenses this file to you under the Apache
|
||||
* License, Version 2.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include <comphelper/string.hxx>
|
||||
#include <unotools/charclass.hxx>
|
||||
#include <vcl/svapp.hxx>
|
||||
#include <vcl/weld/weld.hxx>
|
||||
#include <o3tl/string_view.hxx>
|
||||
|
||||
#include <reffact.hxx>
|
||||
#include <document.hxx>
|
||||
#include <globstr.hrc>
|
||||
#include <scresid.hxx>
|
||||
#include <dbtabledlg.hxx>
|
||||
#include <dbdocfun.hxx>
|
||||
#include <tablestyle.hxx>
|
||||
|
||||
ScDbTableDlg::ScDbTableDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent,
|
||||
ScViewData& rViewData)
|
||||
: ScAnyRefDlgController(pB, pCW, pParent, u"modules/scalc/ui/definetablerangedialog.ui"_ustr,
|
||||
u"tablerangedialog"_ustr)
|
||||
, m_rViewData(rViewData)
|
||||
, rDoc(rViewData.GetDocument())
|
||||
, bRefInputMode(true)
|
||||
, aAddrDetails(rDoc.GetAddressConvention(), 0, 0)
|
||||
, m_xAssignFrame(m_xBuilder->weld_frame(u"rangeframe"_ustr))
|
||||
, m_xEdAssign(new formula::RefEdit(m_xBuilder->weld_entry(u"assign"_ustr)))
|
||||
, m_xRbAssign(new formula::RefButton(m_xBuilder->weld_button(u"assgnrb"_ustr)))
|
||||
, m_xOptions(m_xBuilder->weld_widget(u"options"_ustr))
|
||||
, m_xBtnHeader(m_xBuilder->weld_check_button(u"bheaders"_ustr))
|
||||
, m_xBtnOk(m_xBuilder->weld_button(u"ok"_ustr))
|
||||
, m_xBtnCancel(m_xBuilder->weld_button(u"cancel"_ustr))
|
||||
{
|
||||
m_xEdAssign->SetReferences(this, m_xAssignFrame.get());
|
||||
m_xRbAssign->SetReferences(this, m_xEdAssign.get());
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
ScDbTableDlg::~ScDbTableDlg()
|
||||
{
|
||||
if (m_xInfoBox)
|
||||
m_xInfoBox->response(RET_OK);
|
||||
}
|
||||
|
||||
void ScDbTableDlg::Init()
|
||||
{
|
||||
m_xBtnHeader->set_active(true); // Default: with column headers
|
||||
|
||||
m_xBtnOk->connect_clicked(LINK(this, ScDbTableDlg, OkBtnHdl));
|
||||
m_xBtnCancel->connect_clicked(LINK(this, ScDbTableDlg, CancelBtnHdl));
|
||||
m_xEdAssign->SetModifyHdl(LINK(this, ScDbTableDlg, AssModifyHdl));
|
||||
|
||||
SCCOL nStartCol, nEndCol = 0;
|
||||
SCROW nStartRow, nEndRow = 0;
|
||||
SCTAB nStartTab, nEndTab = 0;
|
||||
|
||||
m_rViewData.GetSimpleArea(nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab);
|
||||
theCurArea = ScRange(nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab);
|
||||
OUString theAreaStr = theCurArea.Format(rDoc, ScRefFlags::RANGE_ABS_3D, aAddrDetails);
|
||||
m_xEdAssign->SetText(theAreaStr);
|
||||
|
||||
bInvalid = false;
|
||||
}
|
||||
|
||||
void ScDbTableDlg::SetReference(const ScRange& rRef, ScDocument& rDocP)
|
||||
{
|
||||
if (!m_xEdAssign->GetWidget()->get_sensitive())
|
||||
return;
|
||||
|
||||
if (rRef.aStart != rRef.aEnd)
|
||||
RefInputStart(m_xEdAssign.get());
|
||||
|
||||
theCurArea = rRef;
|
||||
|
||||
OUString aRefStr(theCurArea.Format(rDocP, ScRefFlags::RANGE_ABS_3D, aAddrDetails));
|
||||
m_xEdAssign->SetRefString(aRefStr);
|
||||
m_xOptions->set_sensitive(true);
|
||||
}
|
||||
|
||||
void ScDbTableDlg::Close() { DoClose(ScTableLayoutWrapper::GetChildWindowId()); }
|
||||
|
||||
void ScDbTableDlg::SetActive()
|
||||
{
|
||||
m_xEdAssign->GrabFocus();
|
||||
RefInputDone();
|
||||
}
|
||||
|
||||
bool ScDbTableDlg::IsRefInputMode() const { return bRefInputMode; }
|
||||
|
||||
void ScDbTableDlg::ErrorBox(const OUString& rString)
|
||||
{
|
||||
if (m_xInfoBox)
|
||||
m_xInfoBox->response(RET_OK);
|
||||
|
||||
m_xInfoBox = std::shared_ptr<weld::MessageDialog>(Application::CreateMessageDialog(
|
||||
m_xDialog.get(), VclMessageType::Warning, VclButtonsType::Ok, rString));
|
||||
|
||||
m_xInfoBox->runAsync(m_xInfoBox, [this](sal_Int32) { m_xInfoBox = nullptr; });
|
||||
}
|
||||
|
||||
IMPL_LINK_NOARG(ScDbTableDlg, OkBtnHdl, weld::Button&, void)
|
||||
{
|
||||
bInvalid = false;
|
||||
|
||||
OUString aNewArea = m_xEdAssign->GetText();
|
||||
|
||||
if (aNewArea.isEmpty())
|
||||
return;
|
||||
|
||||
ScRange aTmpRange;
|
||||
if (aTmpRange.ParseAny(aNewArea, rDoc, aAddrDetails) & ScRefFlags::VALID)
|
||||
{
|
||||
if (aTmpRange.aStart.Row() == aTmpRange.aEnd.Row()) // minimum 2 row height needs
|
||||
aTmpRange.aEnd.IncRow();
|
||||
theCurArea = aTmpRange;
|
||||
|
||||
std::vector<const ScDBData*> aDBData = rDoc.GetAllDBsInArea(
|
||||
theCurArea.aStart.Col(), theCurArea.aStart.Row(), theCurArea.aEnd.Col(),
|
||||
theCurArea.aEnd.Row(), theCurArea.aStart.Tab());
|
||||
|
||||
for (const ScDBData* pDBData : aDBData)
|
||||
{
|
||||
if (pDBData->GetTableStyleInfo())
|
||||
{
|
||||
bInvalid = true;
|
||||
theCurArea = ScRange();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (bInvalid)
|
||||
{
|
||||
ErrorBox(ScResId(STR_INVALIDTABLE));
|
||||
m_xEdAssign->SelectAll();
|
||||
m_xEdAssign->GrabFocus();
|
||||
return;
|
||||
}
|
||||
|
||||
// insert new area
|
||||
OUString aTable = ScResId(STR_CALC_TABLE);
|
||||
tools::Long nCount = 0;
|
||||
const ScDBData* pDummy = nullptr;
|
||||
ScDBCollection::NamedDBs& rDBs = rDoc.GetDBCollection()->getNamedDBs();
|
||||
OUString aNewName;
|
||||
do
|
||||
{
|
||||
++nCount;
|
||||
aNewName = aTable + OUString::number(nCount);
|
||||
pDummy = rDBs.findByUpperName(ScGlobal::getCharClass().uppercase(aNewName));
|
||||
} while (pDummy);
|
||||
|
||||
OUString aDefault = u""_ustr;
|
||||
if (const ScTableStyles* pTableStyles = rDoc.GetTableStyles())
|
||||
{
|
||||
const ScTableStyle* pTableStyle
|
||||
= pTableStyles->GetTableStyle(u"TableStyleMedium2"_ustr);
|
||||
if (pTableStyle)
|
||||
aDefault = u"TableStyleMedium2"_ustr;
|
||||
}
|
||||
|
||||
ScDBDocFunc aFunc(*m_rViewData.GetDocShell());
|
||||
bInvalid = !aFunc.AddDBTable(aNewName, ScRange(theCurArea.aStart, theCurArea.aEnd),
|
||||
m_xBtnHeader->get_active(), true, false, aDefault);
|
||||
|
||||
m_xEdAssign->SetText(u""_ustr);
|
||||
m_xBtnHeader->set_active(true);
|
||||
theCurArea = ScRange();
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorBox(ScResId(STR_ERR_INVALID_AREA));
|
||||
m_xEdAssign->SelectAll();
|
||||
m_xEdAssign->GrabFocus();
|
||||
bInvalid = true;
|
||||
}
|
||||
|
||||
if (!bInvalid)
|
||||
response(RET_OK);
|
||||
}
|
||||
|
||||
IMPL_LINK_NOARG(ScDbTableDlg, CancelBtnHdl, weld::Button&, void) { response(RET_CANCEL); }
|
||||
|
||||
IMPL_LINK_NOARG(ScDbTableDlg, AssModifyHdl, formula::RefEdit&, void)
|
||||
{
|
||||
ScRange aTmpRange;
|
||||
OUString aText = m_xEdAssign->GetText();
|
||||
if (aTmpRange.ParseAny(aText, rDoc, aAddrDetails) & ScRefFlags::VALID)
|
||||
theCurArea = aTmpRange;
|
||||
|
||||
if (!aText.isEmpty())
|
||||
{
|
||||
m_xBtnHeader->set_sensitive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_xBtnHeader->set_sensitive(false);
|
||||
}
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
@@ -69,6 +69,117 @@ bool ScDBDocFunc::CheckSheetViewProtection(sc::Operation eOperation)
|
||||
return aSheetViewTester.check(eOperation);
|
||||
}
|
||||
|
||||
bool ScDBDocFunc::AddDBTable(const OUString& rName, const ScRange& rRange, bool bHeader,
|
||||
bool bRecord, bool bApi, const OUString& rStyleName)
|
||||
{
|
||||
ScDocShellModificator aModificator(rDocShell);
|
||||
|
||||
ScDocument& rDoc = rDocShell.GetDocument();
|
||||
ScDBCollection* pDocColl = rDoc.GetDBCollection();
|
||||
if (bRecord && !rDoc.IsUndoEnabled())
|
||||
bRecord = false;
|
||||
|
||||
if (rStyleName.isEmpty())
|
||||
{
|
||||
if (!bApi)
|
||||
rDocShell.ErrorMessage(STR_TABLE_ERR_ADD);
|
||||
return false;
|
||||
}
|
||||
|
||||
std::unique_ptr<ScDBCollection> pUndoColl;
|
||||
if (bRecord)
|
||||
pUndoColl.reset(new ScDBCollection(*pDocColl));
|
||||
|
||||
std::unique_ptr<ScDBData> pNew(new ScDBData(rName, rRange.aStart.Tab(), rRange.aStart.Col(),
|
||||
rRange.aStart.Row(), rRange.aEnd.Col(), rRange.aEnd.Row(),
|
||||
true, bHeader, false, u""_ustr, rStyleName));
|
||||
if (pNew)
|
||||
{
|
||||
pNew->SetAutoFilter(true);
|
||||
rDoc.ApplyFlagsTab(rRange.aStart.Col(), rRange.aStart.Row(), rRange.aEnd.Col(),
|
||||
rRange.aStart.Row(), rRange.aStart.Tab(), ScMF::Auto);
|
||||
}
|
||||
|
||||
bool bCompile = !rDoc.IsImportingXML();
|
||||
if (bCompile)
|
||||
rDoc.PreprocessDBDataUpdate();
|
||||
|
||||
bool bOk = pDocColl->getNamedDBs().insert(std::move(pNew));
|
||||
if (bCompile)
|
||||
rDoc.CompileHybridFormula();
|
||||
|
||||
if (!bOk && !bApi)
|
||||
{
|
||||
rDocShell.ErrorMessage(STR_TABLE_ERR_ADD);
|
||||
return false;
|
||||
}
|
||||
|
||||
rDocShell.PostPaint(rRange, PaintPartFlags::Grid | PaintPartFlags::Left | PaintPartFlags::Top | PaintPartFlags::Size);
|
||||
|
||||
if (bRecord)
|
||||
{
|
||||
rDocShell.GetUndoManager()->AddUndoAction(
|
||||
std::make_unique<ScUndoDBTable>(rDocShell, rName, true/*bInsert*/, std::move(pUndoColl),
|
||||
std::make_unique<ScDBCollection>(*pDocColl)));
|
||||
}
|
||||
|
||||
aModificator.SetDocumentModified();
|
||||
SfxGetpApp()->Broadcast(SfxHint(SfxHintId::ScDbAreasChanged));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ScDBDocFunc::DeleteDBTable(const ScDBData* pDBObj, bool bRecord, bool bApi)
|
||||
{
|
||||
bool bDone = false;
|
||||
ScDocument& rDoc = rDocShell.GetDocument();
|
||||
ScDBCollection* pDocColl = rDoc.GetDBCollection();
|
||||
if (bRecord && !rDoc.IsUndoEnabled())
|
||||
bRecord = false;
|
||||
|
||||
ScDBCollection::NamedDBs& rDBs = pDocColl->getNamedDBs();
|
||||
auto const iter = rDBs.findByPointer(pDBObj);
|
||||
if (iter != rDBs.end())
|
||||
{
|
||||
ScDocShellModificator aModificator(rDocShell);
|
||||
std::unique_ptr<ScDBCollection> pUndoColl;
|
||||
if (bRecord)
|
||||
pUndoColl.reset(new ScDBCollection(*pDocColl));
|
||||
|
||||
OUString aTableName = iter->get()->GetName();
|
||||
ScRange aRange;
|
||||
iter->get()->GetArea(aRange);
|
||||
|
||||
rDoc.PreprocessDBDataUpdate();
|
||||
rDBs.erase(iter);
|
||||
rDoc.CompileHybridFormula();
|
||||
|
||||
if (aRange.IsValid())
|
||||
{
|
||||
rDoc.RemoveFlagsTab(aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(),
|
||||
aRange.aStart.Row(), aRange.aStart.Tab(), ScMF::Auto);
|
||||
rDocShell.PostPaint(aRange, PaintPartFlags::Grid | PaintPartFlags::Left
|
||||
| PaintPartFlags::Top | PaintPartFlags::Size);
|
||||
}
|
||||
|
||||
if (bRecord)
|
||||
{
|
||||
rDocShell.GetUndoManager()->AddUndoAction(
|
||||
std::make_unique<ScUndoDBTable>(rDocShell, aTableName, false/*bInsert*/, std::move(pUndoColl),
|
||||
std::make_unique<ScDBCollection>(*pDocColl)));
|
||||
}
|
||||
|
||||
aModificator.SetDocumentModified();
|
||||
SfxGetpApp()->Broadcast(SfxHint(SfxHintId::ScDbAreasChanged));
|
||||
bDone = true;
|
||||
}
|
||||
else if (!bApi)
|
||||
{
|
||||
rDocShell.ErrorMessage(STR_TABLE_ERR_DEL);
|
||||
}
|
||||
|
||||
return bDone;
|
||||
}
|
||||
|
||||
bool ScDBDocFunc::AddDBRange( const OUString& rName, const ScRange& rRange )
|
||||
{
|
||||
|
||||
|
||||
@@ -77,6 +77,10 @@ public:
|
||||
void DoTableSubTotals( SCTAB nTab, const ScDBData& rNewData, const ScSubTotalParam& rParam,
|
||||
bool bRecord, bool bApi );
|
||||
|
||||
bool AddDBTable(const OUString& rName, const ScRange& rRange, bool bHeader, bool bRecord,
|
||||
bool bApi, const OUString& rStyleName = u""_ustr);
|
||||
bool DeleteDBTable(const ScDBData* pDBObj, bool bRecord, bool bApi );
|
||||
|
||||
SC_DLLPUBLIC bool AddDBRange( const OUString& rName, const ScRange& rRange );
|
||||
bool DeleteDBRange( const OUString& rName );
|
||||
bool RenameDBRange( const OUString& rOld, const OUString& rNew );
|
||||
|
||||
@@ -59,6 +59,8 @@ public:
|
||||
void DoTableSubTotals( const ScDBData& rNewData, const ScSubTotalParam& rParam,
|
||||
bool bRecord = true );
|
||||
|
||||
void DeleteCalcTable();
|
||||
|
||||
void ToggleAutoFilter();
|
||||
void HideAutoFilter();
|
||||
void ClearAutoFilter();
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/* -*- 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/.
|
||||
*
|
||||
* This file incorporates work covered by the following license notice:
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed
|
||||
* with this work for additional information regarding copyright
|
||||
* ownership. The ASF licenses this file to you under the Apache
|
||||
* License, Version 2.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include "anyrefdg.hxx"
|
||||
#include <dbdata.hxx>
|
||||
|
||||
class ScViewData;
|
||||
class ScDocument;
|
||||
|
||||
class ScDbTableDlg : public ScAnyRefDlgController
|
||||
{
|
||||
public:
|
||||
ScDbTableDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent,
|
||||
ScViewData& rViewData);
|
||||
virtual ~ScDbTableDlg() override;
|
||||
|
||||
virtual void SetReference( const ScRange& rRef, ScDocument& rDoc ) override;
|
||||
|
||||
virtual bool IsRefInputMode() const override;
|
||||
virtual void SetActive() override;
|
||||
virtual void Close() override;
|
||||
|
||||
private:
|
||||
bool bInvalid;
|
||||
|
||||
ScViewData& m_rViewData;
|
||||
const ScDocument& rDoc;
|
||||
bool bRefInputMode;
|
||||
ScAddress::Details aAddrDetails;
|
||||
ScRange theCurArea;
|
||||
|
||||
std::unique_ptr<weld::Frame> m_xAssignFrame;
|
||||
std::unique_ptr<formula::RefEdit> m_xEdAssign;
|
||||
std::unique_ptr<formula::RefButton> m_xRbAssign;
|
||||
|
||||
std::unique_ptr<weld::Widget> m_xOptions;
|
||||
std::unique_ptr<weld::CheckButton> m_xBtnHeader;
|
||||
|
||||
std::unique_ptr<weld::Button> m_xBtnOk;
|
||||
std::unique_ptr<weld::Button> m_xBtnCancel;
|
||||
|
||||
std::shared_ptr<weld::MessageDialog> m_xInfoBox;
|
||||
|
||||
void Init();
|
||||
void ErrorBox(const OUString& rString);
|
||||
|
||||
DECL_LINK( CancelBtnHdl, weld::Button&, void );
|
||||
DECL_LINK( OkBtnHdl, weld::Button&, void );
|
||||
DECL_LINK( AssModifyHdl, formula::RefEdit&, void );
|
||||
};
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
@@ -48,6 +48,7 @@ DECL_WRAPPER_WITHID(ScColRowNameRangesDlgWrapper)
|
||||
DECL_WRAPPER_WITHID(ScFormulaDlgWrapper)
|
||||
DECL_WRAPPER_WITHID(ScHighlightChgDlgWrapper)
|
||||
DECL_WRAPPER_WITHID(ScCondFormatDlgWrapper)
|
||||
DECL_WRAPPER_WITHID(ScTableLayoutWrapper)
|
||||
|
||||
class ScDescriptiveStatisticsDialogWrapper :
|
||||
public ChildControllerWrapper<SID_DESCRIPTIVE_STATISTICS_DIALOG>
|
||||
|
||||
@@ -205,6 +205,30 @@ private:
|
||||
std::unique_ptr<ScDBCollection> xUndoDB;
|
||||
};
|
||||
|
||||
class ScUndoDBTable : public ScSimpleUndo
|
||||
{
|
||||
public:
|
||||
ScUndoDBTable(ScDocShell& rNewDocShell, const OUString& rNewTable, bool bIns,
|
||||
std::unique_ptr<ScDBCollection> pNewUndoColl,
|
||||
std::unique_ptr<ScDBCollection> pNewRedoColl);
|
||||
virtual ~ScUndoDBTable() override;
|
||||
|
||||
virtual void Undo() override;
|
||||
virtual void Redo() override;
|
||||
virtual void Repeat(SfxRepeatTarget& rTarget) override;
|
||||
virtual bool CanRepeat(SfxRepeatTarget& rTarget) const override;
|
||||
|
||||
virtual OUString GetComment() const override;
|
||||
|
||||
private:
|
||||
OUString aTableName;
|
||||
bool bInsert;
|
||||
std::unique_ptr<ScDBCollection> pUndoColl;
|
||||
std::unique_ptr<ScDBCollection> pRedoColl;
|
||||
|
||||
void DoChange(const bool bUndo);
|
||||
};
|
||||
|
||||
class ScUndoTableTotals: public ScDBFuncUndo
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -747,6 +747,94 @@ bool ScUndoSubTotals::CanRepeat(SfxRepeatTarget& /* rTarget */) const
|
||||
return false; // is not possible due to column numbers
|
||||
}
|
||||
|
||||
ScUndoDBTable::ScUndoDBTable(ScDocShell& rNewDocShell, const OUString& rNewTable, bool bIns,
|
||||
std::unique_ptr<ScDBCollection> pNewUndoColl,
|
||||
std::unique_ptr<ScDBCollection> pNewRedoColl ) :
|
||||
ScSimpleUndo( rNewDocShell ),
|
||||
aTableName( rNewTable ),
|
||||
bInsert( bIns ),
|
||||
pUndoColl( std::move(pNewUndoColl) ),
|
||||
pRedoColl( std::move(pNewRedoColl) )
|
||||
{
|
||||
}
|
||||
|
||||
ScUndoDBTable::~ScUndoDBTable()
|
||||
{
|
||||
}
|
||||
|
||||
OUString ScUndoDBTable::GetComment() const
|
||||
{ // "Insert/Delete tables";
|
||||
return bInsert ? ScResId(STR_UNDO_DBADDTABLE) : ScResId(STR_UNDO_DBREMTABLE);
|
||||
}
|
||||
|
||||
void ScUndoDBTable::Undo()
|
||||
{
|
||||
BeginUndo();
|
||||
DoChange(true);
|
||||
SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
|
||||
EndUndo();
|
||||
}
|
||||
|
||||
void ScUndoDBTable::Redo()
|
||||
{
|
||||
BeginRedo();
|
||||
DoChange(false);
|
||||
SfxGetpApp()->Broadcast( SfxHint( SfxHintId::ScDbAreasChanged ) );
|
||||
EndRedo();
|
||||
}
|
||||
|
||||
void ScUndoDBTable::Repeat(SfxRepeatTarget& /* rTarget */)
|
||||
{
|
||||
}
|
||||
|
||||
bool ScUndoDBTable::CanRepeat(SfxRepeatTarget& /* rTarget */) const
|
||||
{
|
||||
return false; // is not possible
|
||||
}
|
||||
|
||||
void ScUndoDBTable::DoChange(const bool bUndo)
|
||||
{
|
||||
ScDBCollection* pWorkRefData = bUndo ? pUndoColl.get() : pRedoColl.get();
|
||||
|
||||
ScDocument& rDoc = rDocShell.GetDocument();
|
||||
bool bOldAutoCalc = rDoc.GetAutoCalc();
|
||||
rDoc.SetAutoCalc(false); // Avoid unnecessary calculations
|
||||
rDoc.PreprocessDBDataUpdate();
|
||||
rDoc.SetDBCollection(std::unique_ptr<ScDBCollection>(new ScDBCollection(*pWorkRefData)), true);
|
||||
rDoc.CompileHybridFormula();
|
||||
rDoc.SetAutoCalc(bOldAutoCalc);
|
||||
|
||||
pWorkRefData = !bInsert ? pUndoColl.get() : pRedoColl.get();
|
||||
if (const ScDBData* pDBData = pWorkRefData->getNamedDBs().findByUpperName(
|
||||
ScGlobal::getCharClass().uppercase(aTableName)))
|
||||
{
|
||||
ScRange aRange;
|
||||
pDBData->GetArea(aRange);
|
||||
if (!aRange.IsValid())
|
||||
return;
|
||||
|
||||
if (pDBData->HasAutoFilter())
|
||||
{
|
||||
const bool bApply = (bInsert != bUndo);
|
||||
auto func = bApply ? &ScDocument::ApplyFlagsTab : &ScDocument::RemoveFlagsTab;
|
||||
(rDoc.*func)(aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(),
|
||||
aRange.aStart.Row(), aRange.aStart.Tab(), ScMF::Auto);
|
||||
}
|
||||
|
||||
if (ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell())
|
||||
{
|
||||
SCTAB nTab = aRange.aStart.Tab();
|
||||
SCTAB nVisTab = pViewShell->GetViewData().GetTabNumber();
|
||||
if (nVisTab != nTab)
|
||||
pViewShell->SetTabNo(nTab);
|
||||
|
||||
rDocShell.PostPaint(ScRange(0, 0, nTab, rDoc.MaxCol(), rDoc.MaxRow(), nTab),
|
||||
PaintPartFlags::Grid | PaintPartFlags::Left | PaintPartFlags::Top
|
||||
| PaintPartFlags::Size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ScUndoTableTotals::ScUndoTableTotals(ScDocShell& rNewDocShell, SCTAB nNewTab,
|
||||
const ScSubTotalParam& rNewParam, SCROW nNewEndY,
|
||||
ScDocumentUniquePtr pNewUndoDoc,
|
||||
|
||||
@@ -763,6 +763,16 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
|
||||
}
|
||||
break;
|
||||
|
||||
case SID_INSERT_CALCTABLE:
|
||||
{
|
||||
sal_uInt16 nId = ScTableLayoutWrapper::GetChildWindowId();
|
||||
SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
|
||||
SfxChildWindow* pWnd = rViewFrm.GetChildWindow(nId);
|
||||
|
||||
pScMod->SetRefDialog(nId, pWnd == nullptr);
|
||||
}
|
||||
break;
|
||||
|
||||
case SID_SELECT_DB:
|
||||
{
|
||||
if ( pReqArgs )
|
||||
@@ -1380,6 +1390,61 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case SID_INSERT_CALCTABLE:
|
||||
{
|
||||
bool bDisable = false;
|
||||
if (!rDoc.HasTableStyles() || pDocSh->IsDocShared())
|
||||
bDisable = true;
|
||||
else
|
||||
{
|
||||
SCCOL nStartCol, nEndCol;
|
||||
SCROW nStartRow, nEndRow;
|
||||
SCTAB nStartTab, nEndTab;
|
||||
|
||||
bool bSelected
|
||||
= (GetViewData().GetSimpleArea(nStartCol, nStartRow, nStartTab, nEndCol,
|
||||
nEndRow, nEndTab) == SC_MARK_SIMPLE);
|
||||
|
||||
if (bSelected)
|
||||
{
|
||||
if (nStartCol == nEndCol && nStartRow == nEndRow)
|
||||
bSelected = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
nStartCol = GetViewData().GetCurX();
|
||||
nStartRow = GetViewData().GetCurY();
|
||||
nStartTab = GetViewData().CurrentTabForData();
|
||||
}
|
||||
|
||||
if (!bSelected)
|
||||
{
|
||||
const ScDBData* pDBData = rDoc.GetDBAtCursor(
|
||||
nStartCol, nStartRow, nStartTab, ScDBDataPortion::AREA);
|
||||
if (pDBData && pDBData->GetTableStyleInfo())
|
||||
bDisable = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<const ScDBData*> aDBData = rDoc.GetAllDBsInArea(
|
||||
nStartCol, nStartRow, nEndCol, nEndRow, nStartTab);
|
||||
for (const ScDBData* pDBData : aDBData)
|
||||
{
|
||||
if (pDBData->GetTableStyleInfo())
|
||||
{
|
||||
bDisable = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bDisable)
|
||||
rSet.DisableItem( nWhich );
|
||||
}
|
||||
break;
|
||||
|
||||
case SID_DATA_PROVIDER:
|
||||
break;
|
||||
case SID_DATA_PROVIDER_REFRESH:
|
||||
|
||||
@@ -702,6 +702,22 @@ void ScDBFunc::DoTableSubTotals( const ScDBData& rNewData, const ScSubTotalParam
|
||||
SelectionChanged();
|
||||
}
|
||||
|
||||
void ScDBFunc::DeleteCalcTable()
|
||||
{
|
||||
ScDocShell* pDocSh = GetViewData().GetDocShell();
|
||||
ScDocument& rDoc = pDocSh->GetDocument();
|
||||
ScDBData* pDBObj = rDoc.GetDBAtCursor(GetViewData().GetCurX(), GetViewData().GetCurY(),
|
||||
GetViewData().CurrentTabForData(), ScDBDataPortion::AREA);
|
||||
if (pDBObj && pDBObj->GetTableStyleInfo())
|
||||
{
|
||||
ScDBDocFunc aFunc(*pDocSh);
|
||||
aFunc.DeleteDBTable(pDBObj, true, false);
|
||||
CursorPosChanged(); // shells may be switched
|
||||
}
|
||||
else
|
||||
ErrorMessage(STR_TABLE_NOTFOUND);
|
||||
}
|
||||
|
||||
// consolidate
|
||||
|
||||
void ScDBFunc::Consolidate( const ScConsolidateParam& rParam )
|
||||
|
||||
@@ -2524,7 +2524,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
|
||||
// add/replace total row
|
||||
aSubTotalParam.bRemoveOnly = false;
|
||||
aSubTotalParam.bReplace = true;
|
||||
aFunc.DoTableSubTotals(aNewDBData.GetTab(), aNewDBData, aSubTotalParam, true, true);
|
||||
aFunc.DoTableSubTotals(aNewDBData.GetTab(), aNewDBData, aSubTotalParam, true, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -49,6 +49,7 @@ SFX_IMPL_MODELESSDIALOGCONTOLLER_WITHID(ScAcceptChgDlgWrapper, FID_CHG_ACCEPT)
|
||||
SFX_IMPL_MODELESSDIALOGCONTOLLER_WITHID(ScHighlightChgDlgWrapper, FID_CHG_SHOW)
|
||||
SFX_IMPL_MODELESSDIALOGCONTOLLER_WITHID(ScSimpleRefDlgWrapper, WID_SIMPLE_REF)
|
||||
SFX_IMPL_MODELESSDIALOGCONTOLLER_WITHID(ScCondFormatDlgWrapper, WID_CONDFRMT_REF)
|
||||
SFX_IMPL_MODELESSDIALOGCONTOLLER_WITHID(ScTableLayoutWrapper, SID_INSERT_CALCTABLE)
|
||||
|
||||
SFX_IMPL_CHILDWINDOW_WITHID(ScValidityRefChildWin, SID_VALIDITY_REFERENCE)
|
||||
|
||||
@@ -115,6 +116,7 @@ IMPL_CONTROLLER_CHILD_CTOR( ScPrintAreasDlgWrapper, SID_OPENDLG_EDIT_PRINTAREA )
|
||||
|
||||
IMPL_CONTROLLER_CHILD_CTOR( ScFormulaDlgWrapper, SID_OPENDLG_FUNCTION )
|
||||
|
||||
IMPL_CONTROLLER_CHILD_CTOR( ScTableLayoutWrapper, SID_INSERT_CALCTABLE )
|
||||
|
||||
// ScSimpleRefDlgWrapper
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ void ScTableShell::ExecuteDatabaseSettings(SfxRequest& rReq)
|
||||
aSubTotalParam.bRemoveOnly = true;
|
||||
aSubTotalParam.bReplace = true;
|
||||
aFunc.DoTableSubTotals(aNewDBData.GetTab(), aNewDBData, aSubTotalParam,
|
||||
true, true);
|
||||
true, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -117,7 +117,7 @@ void ScTableShell::ExecuteDatabaseSettings(SfxRequest& rReq)
|
||||
aSubTotalParam.bRemoveOnly = false;
|
||||
aSubTotalParam.bReplace = false;
|
||||
aFunc.DoTableSubTotals(aNewDBData.GetTab(), aNewDBData, aSubTotalParam,
|
||||
true, true);
|
||||
true, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -126,8 +126,13 @@ void ScTableShell::ExecuteDatabaseSettings(SfxRequest& rReq)
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SID_REMOVE_CALCTABLE:
|
||||
{
|
||||
m_pViewShell->DeleteCalcTable();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
rBindings.Invalidate(SID_DATABASE_SETTINGS);
|
||||
@@ -142,6 +147,7 @@ void ScTableShell::GetDatabaseSettings(SfxItemSet& rSet)
|
||||
switch (nWhich)
|
||||
{
|
||||
case SCITEM_DATABASE_SETTING:
|
||||
{
|
||||
const ScDBData* pDBData = GetDBDataAtCursor();
|
||||
if (pDBData)
|
||||
{
|
||||
@@ -160,6 +166,9 @@ void ScTableShell::GetDatabaseSettings(SfxItemSet& rSet)
|
||||
pDBData->HasAutoFilter(), u""_ustr));
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SID_REMOVE_CALCTABLE:
|
||||
break;
|
||||
}
|
||||
nWhich = aIter.NextWhich();
|
||||
|
||||
@@ -82,6 +82,7 @@ void ScTabViewShell::InitInterface_Impl()
|
||||
GetStaticInterface()->RegisterChildWindow(ScValidityRefChildWin::GetChildWindowId());
|
||||
GetStaticInterface()->RegisterChildWindow(sc::SearchResultsDlgWrapper::GetChildWindowId());
|
||||
GetStaticInterface()->RegisterChildWindow(sc::ConditionalFormatEasyDialogWrapper::GetChildWindowId());
|
||||
GetStaticInterface()->RegisterChildWindow(ScTableLayoutWrapper::GetChildWindowId());
|
||||
|
||||
GetStaticInterface()->RegisterChildWindow(ScRandomNumberGeneratorDialogWrapper::GetChildWindowId());
|
||||
GetStaticInterface()->RegisterChildWindow(ScSamplingDialogWrapper::GetChildWindowId());
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <consdlg.hxx>
|
||||
#include <filtdlg.hxx>
|
||||
#include <dbnamdlg.hxx>
|
||||
#include <dbtabledlg.hxx>
|
||||
#include <areasdlg.hxx>
|
||||
#include <crnrdlg.hxx>
|
||||
#include <formula.hxx>
|
||||
@@ -260,6 +261,16 @@ std::shared_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
|
||||
xResult = std::make_shared<ScDbNameDlg>(pB, pCW, pParent, GetViewData());
|
||||
break;
|
||||
}
|
||||
case SID_INSERT_CALCTABLE:
|
||||
{
|
||||
GetDBData(true, SC_DB_OLD);
|
||||
const ScMarkData& rMark = GetViewData().GetMarkData();
|
||||
if ( !rMark.IsMarked() && !rMark.IsMultiMarked() )
|
||||
MarkDataArea( false );
|
||||
|
||||
xResult = std::make_shared<ScDbTableDlg>(pB, pCW, pParent, GetViewData());
|
||||
break;
|
||||
}
|
||||
case SID_OPENDLG_EDIT_PRINTAREA:
|
||||
xResult = std::make_shared<ScPrintAreasDlg>(pB, pCW, pParent, GetViewData());
|
||||
break;
|
||||
|
||||
@@ -210,6 +210,7 @@
|
||||
<menu:menuitem menu:id=".uno:InsertObjectChart"/>
|
||||
<menu:menuitem menu:id=".uno:InsertSparkline"/>
|
||||
<menu:menuitem menu:id=".uno:DataDataPilotRun"/>
|
||||
<menu:menuitem menu:id=".uno:InsertCalcTable"/>
|
||||
<menu:menu menu:id=".uno:GraphicMenu">
|
||||
<menu:menupopup>
|
||||
<menu:menuitem menu:id=".uno:Gallery"/>
|
||||
@@ -619,6 +620,7 @@
|
||||
<menu:menuitem menu:id=".uno:DeletePivotTable"/>
|
||||
</menu:menupopup>
|
||||
</menu:menu>
|
||||
<menu:menu menu:id=".uno:DataTableMenu"/>
|
||||
<menu:menuseparator/>
|
||||
<menu:menu menu:id=".uno:CellContentsMenu">
|
||||
<menu:menupopup>
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
* 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/.
|
||||
*
|
||||
-->
|
||||
<menu:menupopup xmlns:menu="http://openoffice.org/2001/menu">
|
||||
<menu:menuitem menu:id=".uno:RunInsCalcTable"/>
|
||||
<menu:menuitem menu:id=".uno:RemoveCalcTable"/>
|
||||
</menu:menupopup>
|
||||
@@ -0,0 +1,207 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.38.2 -->
|
||||
<interface domain="sc">
|
||||
<requires lib="gtk+" version="3.24"/>
|
||||
<object class="GtkDialog" id="tablerangedialog">
|
||||
<property name="can-focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="border-width">6</property>
|
||||
<property name="title" translatable="yes" context="definetablerangedialog|DefineTableRangeDialog">Create Table</property>
|
||||
<property name="default-width">0</property>
|
||||
<property name="default-height">0</property>
|
||||
<property name="type-hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox1">
|
||||
<property name="can-focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">12</property>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox" id="dialog-action_area1">
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="layout-style">end</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="ok">
|
||||
<property name="label" translatable="yes" context="stock">_OK</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="can-default">True</property>
|
||||
<property name="has-default">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="use-underline">True</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="ok-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="definetablerangedialog|extended_tip|ok">Saves all changes and closes dialog.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="cancel">
|
||||
<property name="label" translatable="yes" context="stock">_Cancel</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="use-underline">True</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="cancel-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="definetablerangedialog|extended_tip|cancel">Closes dialog and discards all changes.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack-type">end</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="rangeframe">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="label-xalign">0</property>
|
||||
<property name="shadow-type">none</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="box3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="margin-start">12</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="assign">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="activates-default">True</property>
|
||||
<property name="truncate-multiline">True</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="assign-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="definetablerangedialog|extended_tip|assign">Click the Shrink icon to reduce the dialog to the size of the input field. It is then easier to mark the required reference in the sheet. The icons then automatically convert to the Maximize icon. Click it to restore the dialog to its original size.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="assgnrb">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="receives-default">True</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="assgnrb-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="definetablerangedialog|extended_tip|assignrb">Click the Shrink icon to reduce the dialog to the size of the input field. It is then easier to mark the required reference in the sheet. The icons then automatically convert to the Maximize icon. Click it to restore the dialog to its original size.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="range">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes" context="definetablerangedialog|range">Range</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="options">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="margin-start">12</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">3</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="bheaders">
|
||||
<property name="label" translatable="yes" context="definetablerangedialog|containscolumnlabels">Co_ntains column labels</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="active">True</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="bheaders-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="definetablerangedialog|extended_tip|ContainsColumnLabels">Selected cell ranges contain labels.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<action-widgets>
|
||||
<action-widget response="-5">ok</action-widget>
|
||||
<action-widget response="-6">cancel</action-widget>
|
||||
</action-widgets>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="tablerangedialog-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="definetablerangedialog|extended_tip|DefineTableRangeDialog">Defines a database range based on the selected cells in your sheet.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -146,6 +146,19 @@
|
||||
<property name="action_name">.uno:DeletePivotTable</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorMenuItem" id="MenuData-separator411">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="MenuData-DataTableMenu">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="action_name">.uno:DataTableMenu</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorMenuItem" id="MenuData-separator4">
|
||||
<property name="visible">True</property>
|
||||
|
||||
@@ -146,6 +146,19 @@
|
||||
<property name="action_name">.uno:DeletePivotTable</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorMenuItem" id="separator169">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="DataTableMenu">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="action_name">.uno:DataTableMenu</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorMenuItem" id="separator167">
|
||||
<property name="visible">True</property>
|
||||
@@ -4715,6 +4728,31 @@
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="sfxlo-NotebookbarToolBox" id="SectionBottom38c">
|
||||
<property name="visible">False</property> <!-- no icon yet -->
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="toolbar_style">icons</property>
|
||||
<property name="show_arrow">False</property>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="Insert-Table">
|
||||
<property name="visible">True</property>
|
||||
<property name="action_name">.uno:InsertCalcTable</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="sfxlo-NotebookbarToolBox" id="SectionBottom38">
|
||||
<property name="visible">True</property>
|
||||
@@ -4737,7 +4775,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -4763,7 +4801,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
@@ -2841,6 +2841,19 @@
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="MenuData-DataTableMenu">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="action_name">.uno:DataTableMenu</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorMenuItem" id="MenuData-separator411">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="MenuData-FormatSparklineMenu">
|
||||
<property name="visible">True</property>
|
||||
@@ -4907,6 +4920,7 @@
|
||||
<class name="context-Pivot"/>
|
||||
<class name="context-Sparkline"/>
|
||||
<class name="context-Trendline"/>
|
||||
<class name="context-Table"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
|
||||
@@ -521,6 +521,19 @@
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="MenuData-DataTableMenu">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="action_name">.uno:DataTableMenu</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorMenuItem" id="MenuData-separator411">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="MenuData-FormatSparklineMenu">
|
||||
<property name="visible">True</property>
|
||||
|
||||
@@ -1351,6 +1351,8 @@ const std::map<std::u16string_view, KitUnoCommand>& GetKitUnoCommandList()
|
||||
{ u"IncrementIndent", { PayloadType::EnabledPayload, true } },
|
||||
{ u"DecrementIndent", { PayloadType::EnabledPayload, true } },
|
||||
{ u"EditHeaderAndFooter", { PayloadType::EnabledPayload, true } },
|
||||
{ u"InsertCalcTable", { PayloadType::EnabledPayload, true } },
|
||||
{ u"RemoveCalcTable", { PayloadType::EnabledPayload, true } },
|
||||
{ u"InsertSparkline", { PayloadType::EnabledPayload, true } },
|
||||
{ u"DeleteSparkline", { PayloadType::EnabledPayload, true } },
|
||||
{ u"DeleteSparklineGroup", { PayloadType::EnabledPayload, true } },
|
||||
|
||||
@@ -8467,6 +8467,7 @@ sc/source/ui/dbgui/csvtablebox.cxx
|
||||
sc/source/ui/dbgui/dapidata.cxx
|
||||
sc/source/ui/dbgui/dapitype.cxx
|
||||
sc/source/ui/dbgui/dbnamdlg.cxx
|
||||
sc/source/ui/dbgui/dbtabladlg.cxx
|
||||
sc/source/ui/dbgui/dpgroupdlg.cxx
|
||||
sc/source/ui/dbgui/filtdlg.cxx
|
||||
sc/source/ui/dbgui/foptmgr.cxx
|
||||
@@ -8610,6 +8611,7 @@ sc/source/ui/inc/datatransformation.hxx
|
||||
sc/source/ui/inc/dbdocfun.hxx
|
||||
sc/source/ui/inc/dbfunc.hxx
|
||||
sc/source/ui/inc/dbnamdlg.hxx
|
||||
sc/source/ui/inc/dbtabledlg.hxx
|
||||
sc/source/ui/inc/docfunc.hxx
|
||||
sc/source/ui/inc/docfuncutil.hxx
|
||||
sc/source/ui/inc/docsh.hxx
|
||||
|
||||
@@ -14,6 +14,7 @@ sc/uiconfig/scalc/ui/covariancedialog.ui://GtkButton[@id='input-range-button'] b
|
||||
sc/uiconfig/scalc/ui/covariancedialog.ui://GtkButton[@id='output-range-button'] button-no-label
|
||||
sc/uiconfig/scalc/ui/definedatabaserangedialog.ui://GtkButton[@id='assignrb'] button-no-label
|
||||
sc/uiconfig/scalc/ui/definename.ui://GtkButton[@id='refbutton'] button-no-label
|
||||
sc/uiconfig/scalc/ui/definetablerangedialog.ui://GtkButton[@id='assgnrb'] button-no-label
|
||||
sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui://GtkButton[@id='input-range-button'] button-no-label
|
||||
sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui://GtkButton[@id='output-range-button'] button-no-label
|
||||
sc/uiconfig/scalc/ui/exponentialsmoothingdialog.ui://GtkButton[@id='input-range-button'] button-no-label
|
||||
|
||||
@@ -1247,6 +1247,7 @@ gb_emscripten_fs_image_files += \
|
||||
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/datetimetransformationentry.ui \
|
||||
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/definedatabaserangedialog.ui \
|
||||
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/definename.ui \
|
||||
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/definetablerangedialog.ui \
|
||||
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/deletecells.ui \
|
||||
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/deletecolumnentry.ui \
|
||||
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/deletecontents.ui \
|
||||
|
||||
@@ -206,6 +206,7 @@ constexpr auto ScalcDialogList
|
||||
{ u"modules/scalc/ui/definedatabaserangedialog.ui" },
|
||||
{ u"modules/scalc/ui/selectrange.ui" },
|
||||
{ u"modules/scalc/ui/selectsheetviewdialog.ui" },
|
||||
{ u"modules/scalc/ui/definetablerangedialog.ui" },
|
||||
});
|
||||
|
||||
constexpr auto SwriterDialogList
|
||||
|
||||
Reference in New Issue
Block a user