25#include <document.hxx>
30#include <unonames.hxx>
38#include <com/sun/star/sheet/XSpreadsheet.hpp>
39#include <com/sun/star/table/XColumnRowRange.hpp>
40#include <com/sun/star/sheet/XPrintAreas.hpp>
42#include <osl/diagnose.h>
56 OUString sCellStyleName;
59 for (
auto &it : *rAttrList)
61 switch (it.getToken())
83 sCellStyleName = it.toString();
103uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
105 const uno::Reference< xml::sax::XFastAttributeList > & xAttrList )
146 OSL_FAIL(
"it seems here is a nonvalid file; possible missing of table:table-cell element");
155 if (nFirstRow > pDoc->
MaxRow())
156 nFirstRow = pDoc->
MaxRow();
157 if (nCurrentRow > pDoc->
MaxRow())
158 nCurrentRow = pDoc->
MaxRow();
159 uno::Reference <table::XCellRange> xCellRange(xSheet->getCellRangeByPosition(0, nFirstRow, 0, nCurrentRow));
160 if (!xCellRange.is())
163 uno::Reference<table::XColumnRowRange> xColumnRowRange (xCellRange, uno::UNO_QUERY);
164 if (!xColumnRowRange.is())
167 uno::Reference <beans::XPropertySet> xRowProperties(xColumnRowRange->getRows(), uno::UNO_QUERY);
168 if (!xRowProperties.is())
179 XmlStyleFamily::TABLE_ROW,
sStyleName,
true))));
186 ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(rXMLImport.GetModel())->GetSheetSaveData();
197 bool bFiltered (
false);
215 bool bOptionalHeight =
false;
216 any >>= bOptionalHeight;
221 std::vector<ScDocRowHeightUpdater::TabRanges>& rRecalcRanges = rXMLImport.
GetRecalcRowRanges();
222 while (
static_cast<SCTAB>(rRecalcRanges.size()) <= nSheet)
224 rRecalcRanges.emplace_back(0, pDoc->
MaxRow());
226 rRecalcRanges.at(nSheet).mnTab = nSheet;
232 if (pOptimalHeight && ::cppu::any2bool(pOptimalHeight->
maValue))
234 rRecalcRanges.at(nSheet).maRanges.setFalse(nFirstRow, nCurrentRow);
238 rRecalcRanges.at(nSheet).maRanges.setTrue(nFirstRow, nCurrentRow);
243 rRecalcRanges.at(nSheet).maRanges.setTrue(nFirstRow, nCurrentRow);
250 const bool bTempHeader,
251 const bool bTempGroup ) :
255 bHeader(bTempHeader),
270 if ( rAttrList.is() )
273 if (aIter != rAttrList->end())
283uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
285 const uno::Reference< xml::sax::XFastAttributeList > & xAttrList )
322 if (xPrintAreas.is())
324 if (!xPrintAreas->getPrintTitleRows())
326 xPrintAreas->setPrintTitleRows(
true);
327 table::CellRangeAddress aRowHeaderRange;
329 aRowHeaderRange.EndRow = nHeaderEndRow;
330 xPrintAreas->setTitleRows(aRowHeaderRange);
334 table::CellRangeAddress aRowHeaderRange(xPrintAreas->getTitleRows());
335 aRowHeaderRange.EndRow = nHeaderEndRow;
336 xPrintAreas->setTitleRows(aRowHeaderRange);
void setRowsVisible(SCTAB nTab, SCROW nRowStart, SCROW nRowEnd, bool bVisible)
ScSheetLimits & GetSheetLimits() const
SC_DLLPUBLIC SCROW MaxRow() const
SC_DLLPUBLIC ScOutlineTable * GetOutlineTable(SCTAB nTab, bool bCreate=false)
const ScAddress & GetCurrentCellPos() const
SCROW GetCurrentRow() const
SCTAB GetCurrentSheet() const
const css::uno::Reference< css::sheet::XSpreadsheet > & GetCurrentXSheet() const
void SetRowStyle(const OUString &rCellStyleName)
bool Insert(SCCOLROW nStartPos, SCCOLROW nEndPos, bool &rSizeChanged, bool bHidden=false)
const ScOutlineArray & GetRowArray() const
void AddRowStyle(const OUString &rName, const ScAddress &rCellPos)
This class exists only to provide GetScImport() to its derived classes.
ScXMLImport & GetScImport()
Use this class to manage solar mutex locking instead of calling LockSolarMutex() and UnlockSolarMutex...
ScDocumentImport & GetDoc()
std::vector< ScDocRowHeightUpdater::TabRanges > & GetRecalcRowRanges()
ScDocument * GetDocument()
ScXMLTableRowContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
virtual ~ScXMLTableRowContext() override
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual ~ScXMLTableRowsContext() override
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
ScXMLTableRowsContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, const bool bHeader, const bool bGroup)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
const SvXMLStyleContext * FindStyleChildContext(XmlStyleFamily nFamily, const OUString &rName, bool bCreateIndex=false) const
SCTAB GetLastSheet() const
XMLPropertyState * FindProperty(const sal_Int16 nContextID)
void SetLastSheet(SCTAB nNew)
virtual void FillPropertySet(const css::uno::Reference< css::beans::XPropertySet > &rPropSet) override
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
XML_DEFAULT_CELL_STYLE_NAME
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
SCROW GetMaxRowCount() const
constexpr OUStringLiteral SC_UNONAME_OHEIGHT
#define XML_ELEMENT(prefix, name)
constexpr OUStringLiteral SC_ISFILTERED
#define CTF_SC_ROWOPTIMALHEIGHT