summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga.extern@allotropia.de>2024-11-06 21:33:46 +0100
committerBalazs Varga <balazs.varga.extern@allotropia.de>2024-11-14 23:53:24 +0100
commit83910246044c1e05a3b50e25d21ac6a31566cc38 (patch)
treec41d25de2d95d093d9f39707cc43a27f6fcea0ce /sc/inc
parentec13618a1836a46ada1fee72ce4de5c82c0051f6 (diff)
tdf#160404 tdf#160535 tdf#160536 - sc improve sheet protection
tdf#160404: Fix FILEOPEN XLSX Pivot table is not imported if sheet protection has Pivot table editing enabled - Import correctly the pivot tables, even if the tab protection is not allowing to use them. tdf#160535: Support sheet protection option: Use AutoFilter - Add new option for tab protection to enable/disable to use autofilter on the sheet. Import/export correctly to odf/ooxml. Add new ext-odf attribute: XML_USE_AUTOFILTER tdf#160536: Support sheet protection option: Use PivotTable&PivotChart - Add new option for tab protection to enable/disable to use Pivot table on the sheet. Import/export correctly to odf/ooxml. Add new ext-odf attribute: XML_USE_PIVOT Change-Id: I5d34e3608aed1a3d004ec553f6125b6428e9c05e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176274 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/document.hxx7
-rw-r--r--sc/inc/global.hxx5
-rw-r--r--sc/inc/table.hxx3
3 files changed, 10 insertions, 5 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 7caa75d7db1e..9f9a79eb024f 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -934,6 +934,7 @@ public:
SC_DLLPUBLIC bool HasPivotTable() const;
SC_DLLPUBLIC ScDPCollection* GetDPCollection();
SC_DLLPUBLIC const ScDPCollection* GetDPCollection() const;
+ SC_DLLPUBLIC const ScDPObject* GetDPAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const;
SC_DLLPUBLIC ScDPObject* GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
SC_DLLPUBLIC ScDPObject* GetDPAtCursor(ScAddress const& rAddress) const
{
@@ -1040,8 +1041,10 @@ public:
SCCOL nEndCol, SCROW nEndRow,
const ScMarkData& rMark ) const;
- bool IsEditActionAllowed( sc::ColRowEditAction eAction, SCTAB nTab, SCCOLROW nStart, SCCOLROW nEnd ) const;
- bool IsEditActionAllowed( sc::ColRowEditAction eAction, const ScMarkData& rMark, SCCOLROW nStart, SCCOLROW nEnd ) const;
+ bool IsEditActionAllowed( sc::EditAction eAction, SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
+ SCCOL nEndCol, SCROW nEndRow ) const;
+ bool IsEditActionAllowed( sc::EditAction eAction, const ScMarkData& rMark, SCCOL nStartCol,
+ SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ) const;
SC_DLLPUBLIC bool GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix );
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 79d24030179b..616930567210 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -425,7 +425,7 @@ enum ScDBObject
namespace sc {
-enum class ColRowEditAction
+enum class EditAction
{
Unknown,
InsertColumnsBefore,
@@ -433,7 +433,8 @@ enum class ColRowEditAction
InsertRowsBefore,
InsertRowsAfter,
DeleteColumns,
- DeleteRows
+ DeleteRows,
+ UpdatePivotTable
};
}
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index c1dfb716b595..5f36e5d9d5c7 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -409,7 +409,8 @@ public:
const ScTableProtection* GetProtection() const;
void GetUnprotectedCells( ScRangeList& rRangeList ) const;
- bool IsEditActionAllowed( sc::ColRowEditAction eAction, SCCOLROW nStart, SCCOLROW nEnd ) const;
+ bool IsEditActionAllowed( sc::EditAction eAction, SCCOL nStartCol, SCROW nStartRow,
+ SCCOL nEndCol, SCROW nEndRow ) const;
Size GetPageSize() const;
void SetPageSize( const Size& rSize );