23#include <document.hxx>
29#include <tokenarray.hxx>
33#include <osl/diagnose.h>
37#include <com/sun/star/sheet/XSpreadsheet.hpp>
38#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
39#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
47 mbSelectProtectedCells(true),
48 mbSelectUnprotectedCells(true),
49 mbInsertColumns(false),
51 mbDeleteColumns(false),
57 : rImport(rTempImport),
58 aFixupOLEs(rTempImport),
59 maCurrentCellPos(
ScAddress::INITIALIZE_INVALID),
61 nCurrentDrawPage( -1 ),
72uno::Reference<sheet::XSpreadsheet> getCurrentSheet(
const uno::Reference<frame::XModel>& xModel,
SCTAB nSheet)
74 uno::Reference<sheet::XSpreadsheet> xSheet;
75 uno::Reference<sheet::XSpreadsheetDocument> xSpreadDoc(xModel, uno::UNO_QUERY);
79 uno::Reference <sheet::XSpreadsheets> xSheets(xSpreadDoc->getSheets());
83 uno::Reference <container::XIndexAccess> xIndex(xSheets, uno::UNO_QUERY);
87 xSheet.set(xIndex->getByIndex(nSheet), uno::UNO_QUERY);
129 if ( sStyleName.isEmpty() )
143 uno::Reference <beans::XPropertySet> xProperties(
xCurrentSheet, uno::UNO_QUERY);
144 if ( !xProperties.is() )
151 XmlStyleFamily::TABLE_TABLE, sStyleName,
true)));
156 ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(
rImport.GetModel())->GetSheetSaveData();
194 uno::Sequence<sal_Int8> aHash;
214 "sc",
"more columns than fit into SCCOL");
222 uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(
xCurrentSheet, uno::UNO_QUERY );
223 if( xDrawPageSupplier.is() )
224 xDrawPage.set(xDrawPageSupplier->getDrawPage());
253 const OUString &rRangeList)
262 OSL_ENSURE(nEndRow >= nStartRow,
"wrong row order");
263 OSL_ENSURE(nEndColumn >= nStartColumn,
"wrong column order");
Accessor class to ScDocument.
void setMatrixCells(const ScRange &rRange, const ScTokenArray &rArray, formula::FormulaGrammar::Grammar eGrammar)
ScSheetLimits & GetSheetLimits() const
SC_DLLPUBLIC SCCOL MaxCol() const
void AppendTabOnLoad(const OUString &rName)
void SetTabNameOnLoad(SCTAB nTab, const OUString &rName)
SC_DLLPUBLIC void SetTabProtection(SCTAB nTab, const ScTableProtection *pProtect)
void IncXMLImportedFormulaCount(sal_uInt64 nVal)
void AddOLE(const css::uno::Reference< css::drawing::XShape > &rShape, const OUString &rRangeList)
void AddColumnStyle(const OUString &rStyleName, const sal_Int32 nColumn, const sal_Int32 nRepeat)
void InsertCol(const sal_Int32 nCol, const sal_Int32 nTab)
void SetRowStyle(const OUString &rStyleName)
void AddColumn(bool bIsCovered)
sal_Int16 nCurrentDrawPage
css::uno::Reference< css::sheet::XSpreadsheet > xCurrentSheet
sal_Int16 nCurrentXShapes
ScRangeList maMatrixRangeList
css::uno::Reference< css::drawing::XShapes > const & GetCurrentXShapes()
css::uno::Reference< css::drawing::XDrawPage > xDrawPage
void SetRowStyle(const OUString &rCellStyleName)
OUString sCurrentSheetName
sal_Int32 nCurrentColCount
void AddOLE(const css::uno::Reference< css::drawing::XShape > &rShape, const OUString &rRangeList)
void NewSheet(const OUString &sTableName, const OUString &sStyleName, const ScXMLTabProtectionData &rProtectData)
bool IsPartOfMatrix(const ScAddress &rScAddress) const
ScXMLTabProtectionData maProtectionData
SCCOL GetCurrentColCount() const
css::uno::Reference< css::drawing::XDrawPage > const & GetCurrentXDrawPage()
ScAddress maCurrentCellPos
void AddMatrixRange(const SCCOL nStartColumn, const SCROW nStartRow, const SCCOL nEndColumn, const SCROW nEndRow, const OUString &rFormula, const OUString &rFormulaNmsp, const formula::FormulaGrammar::Grammar)
css::uno::Reference< css::drawing::XShapes > xShapes
void AddColStyle(const sal_Int32 nRepeat, const OUString &rCellStyleName)
void SetTableStyle(const OUString &sStyleName)
ScMyTables(ScXMLImport &rImport)
bool Contains(const ScRange &) const
void push_back(const ScRange &rRange)
void AddTableStyle(const OUString &rName, const ScAddress &rCellPos)
sheet protection state container
void setOption(Option eOption, bool bEnabled)
virtual void setPasswordHash(const css::uno::Sequence< sal_Int8 > &aPassword, ScPasswordHash eHash, ScPasswordHash eHash2=PASSHASH_UNSPECIFIED) override
virtual void setProtected(bool bProtected) override
void AssignXMLString(const OUString &rText, const OUString &rFormulaNmsp)
Assign XML string placeholder to the array.
static ScDocument * GetScDocument(const css::uno::Reference< css::frame::XModel > &xModel)
Use this class to manage solar mutex locking instead of calling LockSolarMutex() and UnlockSolarMutex...
ScMyStylesImportHelper * GetStylesImportHelper()
ScDocumentImport & GetDoc()
ScDocument * GetDocument()
void SetStylesToRangesFinished()
const SvXMLStyleContext * FindStyleChildContext(XmlStyleFamily nFamily, const OUString &rName, bool bCreateIndex=false) const
virtual void FillPropertySet(const css::uno::Reference< css::beans::XPropertySet > &rPropSet) override
static void decode(css::uno::Sequence< sal_Int8 > &aPass, std::u16string_view sBuffer)
#define SAL_WARN_IF(condition, area, stream)
SCCOL GetMaxColCount() const
bool mbSelectUnprotectedCells
bool mbSelectProtectedCells