26#include <unonames.hxx>
27#include <document.hxx>
111#include <rtl/ustring.hxx>
115#include <rtl/math.hxx>
126#include <com/sun/star/beans/XPropertySet.hpp>
127#include <com/sun/star/container/XNamed.hpp>
128#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
129#include <com/sun/star/form/XFormsSupplier2.hpp>
130#include <com/sun/star/io/XActiveDataSource.hpp>
131#include <com/sun/star/io/XSeekable.hpp>
132#include <com/sun/star/sheet/XUsedAreaCursor.hpp>
133#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
134#include <com/sun/star/sheet/XPrintAreas.hpp>
135#include <com/sun/star/sheet/XUniqueCellFormatRangesSupplier.hpp>
136#include <com/sun/star/sheet/XLabelRange.hpp>
137#include <com/sun/star/sheet/NamedRangeFlag.hpp>
138#include <com/sun/star/sheet/XSheetCellCursor.hpp>
139#include <com/sun/star/sheet/XSheetCellRanges.hpp>
140#include <com/sun/star/sheet/XSheetLinkable.hpp>
141#include <com/sun/star/sheet/GlobalSheetSettings.hpp>
142#include <com/sun/star/table/XColumnRowRange.hpp>
143#include <com/sun/star/util/XProtectable.hpp>
144#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
145#include <com/sun/star/chart2/XChartDocument.hpp>
146#include <com/sun/star/chart2/data/XRangeXMLConversion.hpp>
147#include <com/sun/star/chart2/data/XDataReceiver.hpp>
149#include <com/sun/star/document/XDocumentProperties.hpp>
150#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
160#include <officecfg/Office/Common.hxx>
169#define SC_VIEWCHANGES_COUNT 13
170#define SC_SHOW_CHANGES 0
171#define SC_SHOW_ACCEPTED_CHANGES 1
172#define SC_SHOW_REJECTED_CHANGES 2
173#define SC_SHOW_CHANGES_BY_DATETIME 3
174#define SC_SHOW_CHANGES_BY_DATETIME_MODE 4
175#define SC_SHOW_CHANGES_BY_DATETIME_FIRST_DATETIME 5
176#define SC_SHOW_CHANGES_BY_DATETIME_SECOND_DATETIME 6
177#define SC_SHOW_CHANGES_BY_AUTHOR 7
178#define SC_SHOW_CHANGES_BY_AUTHOR_NAME 8
179#define SC_SHOW_CHANGES_BY_COMMENT 9
180#define SC_SHOW_CHANGES_BY_COMMENT_TEXT 10
181#define SC_SHOW_CHANGES_BY_RANGES 11
182#define SC_SHOW_CHANGES_BY_RANGES_LIST 12
188using ::com::sun::star::uno::UNO_QUERY;
192OUString lcl_RangeSequenceToString(
193 const uno::Sequence< OUString > & rRanges,
194 const uno::Reference< chart2::data::XRangeXMLConversion > & xFormatConverter )
196 OUStringBuffer aResult;
197 const sal_Int32 nMaxIndex( rRanges.getLength() - 1 );
199 for( sal_Int32
i=0;
i<=nMaxIndex; ++
i )
201 OUString aRange( rRanges[
i] );
202 if( xFormatConverter.is())
203 aRange = xFormatConverter->convertRangeToXML( aRange );
204 aResult.append( aRange );
206 aResult.append( cSep );
208 return aResult.makeStringAndClear();
248extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
251 return cppu::acquire(
new ScXMLExport(context,
"com.sun.star.comp.Calc.XMLExporter", SvXMLExportFlags::ALL));
254extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
257 return cppu::acquire(
new ScXMLExport(context,
"com.sun.star.comp.Calc.XMLMetaExporter", SvXMLExportFlags::META));
260extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
263 return cppu::acquire(
new ScXMLExport(context,
"com.sun.star.comp.Calc.XMLStylesExporter", SvXMLExportFlags::STYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::FONTDECLS));
266extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
269 return cppu::acquire(
new ScXMLExport(context,
"com.sun.star.comp.Calc.XMLContentExporter", SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::SCRIPTS|SvXMLExportFlags::FONTDECLS));
272extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
275 return cppu::acquire(
new ScXMLExport(context,
"com.sun.star.comp.Calc.XMLSettingsExporter", SvXMLExportFlags::SETTINGS));
278extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
281 return cppu::acquire(
new ScXMLExport(context,
"com.sun.star.comp.Calc.XMLOasisExporter", SvXMLExportFlags::ALL|SvXMLExportFlags::OASIS));
284extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
287 return cppu::acquire(
new ScXMLExport(context,
"com.sun.star.comp.Calc.XMLOasisMetaExporter", SvXMLExportFlags::META|SvXMLExportFlags::OASIS));
290extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
293 return cppu::acquire(
new ScXMLExport(context,
"com.sun.star.comp.Calc.XMLOasisStylesExporter", SvXMLExportFlags::STYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::OASIS));
296extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
299 return cppu::acquire(
new ScXMLExport(context,
"com.sun.star.comp.Calc.XMLOasisContentExporter", SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::CONTENT|SvXMLExportFlags::SCRIPTS|SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::OASIS));
302extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
305 return cppu::acquire(
new ScXMLExport(context,
"com.sun.star.comp.Calc.XMLOasisSettingsExporter", SvXMLExportFlags::SETTINGS|SvXMLExportFlags::OASIS));
321 virtual void onExport(
const uno::Reference < drawing::XShape >& xShape )
override;
326void ScXMLShapeExport::onExport(
const uno::Reference < drawing::XShape >& xShape )
328 uno::Reference< beans::XPropertySet > xShapeProp( xShape, uno::UNO_QUERY );
329 if( xShapeProp.is() )
331 sal_Int16 nLayerID = 0;
333 GetExport().AddAttribute(XML_NAMESPACE_TABLE, XML_TABLE_BACKGROUND, XML_TRUE);
339 css::uno::Reference<css::sheet::XGlobalSheetSettings> xProperties =
346 const css::uno::Reference< css::uno::XComponentContext >& rContext,
352 pCurrentCell(nullptr),
356 bHasRowHeader(false),
357 bRowHeaderOpen(false)
395 if( !(
getExportFlags() & (SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT)) )
442 const char pXmlHeader[] =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
443 sal_Int32 nLen = strlen(pXmlHeader);
445 uno::Sequence<sal_Int8> aFileStart(nLen);
446 sal_Int32 nRead =
xSourceStream->readBytes( aFileStart, nLen );
448 if ( nRead != nLen || memcmp( aFileStart.getConstArray(), pXmlHeader, nLen ) != 0 )
474 NumberFormatIndexMap::const_iterator itr =
aNumFmtIndexMap.find(nNumFmt);
486 uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc(
GetModel(), uno::UNO_QUERY);
487 if (!xSpreadDoc.is())
490 uno::Reference<container::XIndexAccess> xIndex(xSpreadDoc->getSheets(), uno::UNO_QUERY);
494 nTableCount = xIndex->getCount();
500 for (
SCTAB nTable = 0; nTable < nTableCount; ++nTable)
503 uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xIndex->getByIndex(nTable), uno::UNO_QUERY);
504 if (!xDrawPageSupplier.is())
507 uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage());
515 sal_Int32 nShapes = xDrawPage->getCount();
516 for (sal_Int32 nShape = 0; nShape < nShapes; ++nShape)
518 uno::Reference<drawing::XShape> xShape(xDrawPage->getByIndex(nShape), uno::UNO_QUERY);
522 uno::Reference<beans::XPropertySet> xShapeProp(xShape, uno::UNO_QUERY);
523 if (!xShapeProp.is())
526 sal_Int16 nLayerID = 0;
527 bool bExtracted = xShapeProp->getPropertyValue(
SC_LAYERID) >>= nLayerID;
546 aMyShape.
aAddress = pAnchor->maStart;
551 aMyShape.
nEndX = pAnchor->maEndOffset.X();
552 aMyShape.
nEndY = pAnchor->maEndOffset.Y();
556 pSharedData->SetLastColumn(nTable, pAnchor->maStart.Col());
557 pSharedData->SetLastRow(nTable, pAnchor->maStart.Row());
576 ScMyShapeList::const_iterator aShapeItr = aDummyInitList.end();
579 pShapeList = &
pSharedData->GetShapesContainer()->GetShapes();
580 aShapeItr = pShapeList->begin();
584 css::uno::Sequence<OUString> aAutoStylePropNames =
GetAutoStylePool()->GetPropertyNames();
585 for (
SCTAB nTable = 0; nTable < nTableCount; ++nTable)
587 uno::Reference<drawing::XDrawPage> xDrawPage(
pSharedData->GetDrawPage(nTable));
592 uno::Reference< form::XFormsSupplier2 > xFormsSupplier( xDrawPage, uno::UNO_QUERY );
593 if( xFormsSupplier.is() && xFormsSupplier->hasForms() )
601 for (
const auto& rxShape : (*pTableShapes)[nTable])
603 GetShapeExport()->collectShapeAutoStyles(rxShape, aAutoStylePropNames);
609 ScMyShapeList::const_iterator aEndItr(pShapeList->end());
610 while ( aShapeItr != aEndItr && ( aShapeItr->aAddress.Tab() == nTable ) )
612 GetShapeExport()->collectShapeAutoStyles(aShapeItr->xShape, aAutoStylePropNames);
620 for (
const auto& rNoteShape : rNoteShapes)
622 if ( rNoteShape.aPos.Tab() == nTable )
623 GetShapeExport()->collectShapeAutoStyles(rNoteShape.xShape, aAutoStylePropNames);
635 SCTAB nTableCount(0);
636 sal_Int32 nShapesCount(0);
640 uno::Sequence<beans::NamedValue> stats
642 {
"TableCount",
uno::Any(
static_cast<sal_Int32
>(nTableCount)) },
643 {
"CellCount",
uno::Any(nCellCount) },
644 {
"ObjectCount",
uno::Any(nShapesCount) }
648 uno::Reference<document::XDocumentPropertiesSupplier> xPropSup(
GetModel(),
649 uno::UNO_QUERY_THROW);
650 uno::Reference<document::XDocumentProperties> xDocProps(
651 xPropSup->getDocumentProperties());
652 if (xDocProps.is()) {
653 xDocProps->setDocumentStatistics(stats);
668 table::CellRangeAddress aCellAddress;
669 uno::Reference<sheet::XSheetCellCursor> xCursor(xTable->createCursor());
670 uno::Reference<sheet::XUsedAreaCursor> xUsedArea (xCursor, uno::UNO_QUERY);
671 uno::Reference<sheet::XCellRangeAddressable> xCellAddress (xCursor, uno::UNO_QUERY);
672 if (xUsedArea.is() && xCellAddress.is())
674 xUsedArea->gotoEndOfUsedArea(
true);
675 aCellAddress = xCellAddress->getRangeAddress();
685 for (
const auto & rLink : rLinks)
720 if ( nTab < pDoc->GetTableCount() )
733 const sal_Int32 nIndex,
const bool bIsAutoStyle,
const bool bIsVisible)
737 if (nStyleIndex != -1)
741 if (nRepeatColumns > 1)
743 OUString sOUEndCol(OUString::number(nRepeatColumns));
752 const sal_Int32 nStyleIndex,
const bool bIsVisible)
754 sal_Int32 nRepeat(1);
755 sal_Int32 nPrevIndex(
pDefaults->GetColDefaults()[nColumn].nIndex);
756 bool bPrevAutoStyle(
pDefaults->GetColDefaults()[nColumn].bIsAutoStyle);
757 for (sal_Int32
i = nColumn + 1;
i < nColumn + nRepeatColumns; ++
i)
759 if ((
pDefaults->GetColDefaults()[
i].nIndex != nPrevIndex) ||
760 (
pDefaults->GetColDefaults()[
i].bIsAutoStyle != bPrevAutoStyle))
763 nPrevIndex =
pDefaults->GetColDefaults()[
i].nIndex;
764 bPrevAutoStyle =
pDefaults->GetColDefaults()[
i].bIsAutoStyle;
785 sal_Int32 nColsRepeated (1);
787 sal_Int32 nPrevColumn(0);
788 bool bPrevIsVisible (
true);
789 bool bWasHeader (
false);
790 bool bIsClosed (
true);
791 sal_Int32 nPrevIndex (-1);
793 for (nColumn = 0; nColumn <=
pSharedData->GetLastColumn(nTable); ++nColumn)
796 bool bIsVisible(
true);
799 const bool bIsHeader = bHasColumnHeader && (aColumnHeaderRange.
aStart.
Col() <= nColumn) && (nColumn <= aColumnHeaderRange.
aEnd.
Col());
800 if (bIsHeader != bWasHeader)
806 WriteColumn(nPrevColumn, nColsRepeated, nPrevIndex, bPrevIsVisible);
810 bPrevIsVisible = bIsVisible;
812 nPrevColumn = nColumn;
822 WriteColumn(nPrevColumn, nColsRepeated, nPrevIndex, bPrevIsVisible);
828 bPrevIsVisible = bIsVisible;
830 nPrevColumn = nColumn;
836 else if (nColumn == 0)
840 bPrevIsVisible = bIsVisible;
843 else if ((bIsVisible == bPrevIsVisible) && (
nIndex == nPrevIndex) &&
848 WriteColumn(nPrevColumn, nColsRepeated, nPrevIndex, bPrevIsVisible);
865 bPrevIsVisible = bIsVisible;
867 nPrevColumn = nColumn;
871 WriteColumn(nPrevColumn, nColsRepeated, nPrevIndex, bPrevIsVisible);
893 vector<sal_uInt32> aNumFmts;
895 const OUString aDefaultStyle = OUString(
"Default").intern();
896 for (
const auto& rNumFmt : aNumFmts)
898 sal_Int32 nNumFmt =
static_cast<sal_Int32
>(rNumFmt);
904 vector<XMLPropertyState> aProps;
905 aVal <<= aDefaultStyle;
906 aProps.emplace_back(nEntryIndex, aVal);
930 std::vector<XMLPropertyState>& rPropStates,
933 sal_Int32 nEntryCount = xMapper->GetEntryCount();
938 sal_Int32 nIndexFontName = xMapper->GetEntryIndex(XML_NAMESPACE_STYLE, rXMLName, 0);
940 if (nIndexFontName == -1 || nIndexFontName >= nEntryCount)
946 auto const nPitch(pItem->
GetPitch());
949 sFamilyName, sStyleName, nFamily, nPitch, eEnc));
955 rPropStates.emplace_back(nIndexFontName,
uno::Any(sName));
960 std::vector<XMLPropertyState>& rPropStates,
const std::vector<const SfxPoolItem*>& rSecAttrs,
964 sal_Int32 nEntryCount = xMapper->GetEntryCount();
965 rPropStates.reserve(rSecAttrs.size());
968 if (
p->Which() == EE_FEATURE_FIELD)
978 sal_Int32
nIndex = xMapper->GetEntryIndex(
981 if (nIndex == -1 || nIndex >= nEntryCount)
988 handleFont(rExport, rPropStates, p, xMapper, u
"font-name");
991 handleFont(rExport, rPropStates, p, xMapper, u
"font-name-asian");
994 handleFont(rExport, rPropStates, p, xMapper, u
"font-name-complex");
1003 rPropStates.emplace_back(nIndex, aAny);
1013 rPropStates.emplace_back(nIndex, aAny);
1023 rPropStates.emplace_back(nIndex, aAny);
1029 sal_Int32 nIndexStyle = xMapper->GetEntryIndex(XML_NAMESPACE_STYLE, u
"text-underline-style", 0);
1030 if (nIndexStyle == -1 || nIndexStyle > nEntryCount)
1033 sal_Int32 nIndexWidth = xMapper->GetEntryIndex(XML_NAMESPACE_STYLE, u
"text-underline-width", 0);
1034 if (nIndexWidth == -1 || nIndexWidth > nEntryCount)
1037 sal_Int32 nIndexType = xMapper->GetEntryIndex(XML_NAMESPACE_STYLE, u
"text-underline-type", 0);
1038 if (nIndexType == -1 || nIndexType > nEntryCount)
1041 sal_Int32 nIndexColor = xMapper->FindEntryIndex(
"CharUnderlineColor", XML_NAMESPACE_STYLE, u
"text-underline-color");
1042 if (nIndexColor == -1 || nIndexColor > nEntryCount)
1045 sal_Int32 nIndexHasColor = xMapper->FindEntryIndex(
"CharUnderlineHasColor", XML_NAMESPACE_STYLE, u
"text-underline-color");
1046 if (nIndexHasColor == -1 || nIndexHasColor > nEntryCount)
1051 rPropStates.emplace_back(nIndexStyle, aAny);
1052 rPropStates.emplace_back(nIndexType, aAny);
1053 rPropStates.emplace_back(nIndexWidth, aAny);
1056 rPropStates.emplace_back(nIndexColor, aAny);
1059 rPropStates.emplace_back(nIndexHasColor, aAny);
1065 sal_Int32 nIndexStyle = xMapper->GetEntryIndex(XML_NAMESPACE_STYLE, u
"text-overline-style", 0);
1066 if (nIndexStyle == -1 || nIndexStyle > nEntryCount)
1069 sal_Int32 nIndexWidth = xMapper->GetEntryIndex(XML_NAMESPACE_STYLE, u
"text-overline-width", 0);
1070 if (nIndexWidth == -1 || nIndexWidth > nEntryCount)
1073 sal_Int32 nIndexType = xMapper->GetEntryIndex(XML_NAMESPACE_STYLE, u
"text-overline-type", 0);
1074 if (nIndexType == -1 || nIndexType > nEntryCount)
1077 sal_Int32 nIndexColor = xMapper->FindEntryIndex(
"CharOverlineColor", XML_NAMESPACE_STYLE, u
"text-overline-color");
1078 if (nIndexColor == -1 || nIndexColor > nEntryCount)
1081 sal_Int32 nIndexHasColor = xMapper->FindEntryIndex(
"CharOverlineHasColor", XML_NAMESPACE_STYLE, u
"text-overline-color");
1082 if (nIndexHasColor == -1 || nIndexHasColor > nEntryCount)
1087 rPropStates.emplace_back(nIndexStyle, aAny);
1088 rPropStates.emplace_back(nIndexType, aAny);
1089 rPropStates.emplace_back(nIndexWidth, aAny);
1092 rPropStates.emplace_back(nIndexColor, aAny);
1095 rPropStates.emplace_back(nIndexHasColor, aAny);
1104 if ( aAny >>= nColor )
1106 sal_Int32 nIndexColor = ( nColor ==
COL_AUTO ) ? xMapper->GetEntryIndex(
1107 XML_NAMESPACE_STYLE,
GetXMLToken( XML_USE_WINDOW_FONT_COLOR ), 0 ) : nIndex;
1108 rPropStates.emplace_back( nIndexColor, aAny );
1117 rPropStates.emplace_back(nIndex, aAny);
1125 rPropStates.emplace_back(nIndex, aAny);
1133 rPropStates.emplace_back(nIndex, aAny);
1141 rPropStates.emplace_back(nIndex, aAny);
1149 rPropStates.emplace_back(nIndex, aAny);
1157 rPropStates.emplace_back(nIndex, aAny);
1165 rPropStates.emplace_back(nIndex, aAny);
1173 rPropStates.emplace_back(nIndex, aAny);
1178 sal_Int32 nIndexEsc = xMapper->FindEntryIndex(
"CharEscapement", XML_NAMESPACE_STYLE, u
"text-position");
1179 if (nIndexEsc == -1 || nIndexEsc > nEntryCount)
1182 sal_Int32 nIndexEscHeight = xMapper->FindEntryIndex(
"CharEscapementHeight", XML_NAMESPACE_STYLE, u
"text-position");
1183 if (nIndexEscHeight == -1 || nIndexEscHeight > nEntryCount)
1189 rPropStates.emplace_back(nIndexEsc, aAny);
1192 rPropStates.emplace_back(nIndexEscHeight, aAny);
1201 rPropStates.emplace_back(nIndex, aAny);
1212 sal_Int32 nIndexLanguage, nIndexCountry, nIndexScript, nIndexTag;
1216 nIndexLanguage = xMapper->GetEntryIndex( XML_NAMESPACE_FO, u
"language", 0);
1217 nIndexCountry = xMapper->GetEntryIndex( XML_NAMESPACE_FO, u
"country", 0);
1218 nIndexScript = xMapper->GetEntryIndex( XML_NAMESPACE_FO, u
"script", 0);
1219 nIndexTag = xMapper->GetEntryIndex( XML_NAMESPACE_STYLE, u
"rfc-language-tag", 0);
1222 nIndexLanguage = xMapper->GetEntryIndex( XML_NAMESPACE_STYLE, u
"language-asian", 0);
1223 nIndexCountry = xMapper->GetEntryIndex( XML_NAMESPACE_STYLE, u
"country-asian", 0);
1224 nIndexScript = xMapper->GetEntryIndex( XML_NAMESPACE_STYLE, u
"script-asian", 0);
1225 nIndexTag = xMapper->GetEntryIndex( XML_NAMESPACE_STYLE, u
"rfc-language-tag-asian", 0);
1228 nIndexLanguage = xMapper->GetEntryIndex( XML_NAMESPACE_STYLE, u
"language-complex", 0);
1229 nIndexCountry = xMapper->GetEntryIndex( XML_NAMESPACE_STYLE, u
"country-complex", 0);
1230 nIndexScript = xMapper->GetEntryIndex( XML_NAMESPACE_STYLE, u
"script-complex", 0);
1231 nIndexTag = xMapper->GetEntryIndex( XML_NAMESPACE_STYLE, u
"rfc-language-tag-complex", 0);
1234 nIndexLanguage = nIndexCountry = nIndexScript = nIndexTag = -1;
1236 assert( nIndexLanguage >= 0 && nIndexCountry >= 0 && nIndexScript >= 0 && nIndexTag >= 0);
1237 rPropStates.emplace_back( nIndexLanguage, aAny);
1238 rPropStates.emplace_back( nIndexCountry, aAny);
1239 rPropStates.emplace_back( nIndexScript, aAny);
1240 rPropStates.emplace_back( nIndexTag, aAny);
1263 sal_Int32 nCellCount = 0;
1266 std::vector<editeng::Section> aAttrs;
1267 pEdit->GetAllSections(aAttrs);
1271 for (
const auto& rSec : aAttrs)
1273 const std::vector<const SfxPoolItem*>& rSecAttrs = rSec.maAttributes;
1274 if (rSecAttrs.empty())
1278 std::vector<XMLPropertyState> aPropStates;
1279 toXMLPropertyStates(*
this, aPropStates, rSecAttrs, xMapper, rAttrMap);
1280 if (!aPropStates.empty())
1281 xStylePool->Add(XmlStyleFamily::TEXT_TEXT, OUString(), std::move(aPropStates));
1292#if OSL_DEBUG_LEVEL > 0
1293 sal_Int32 nPrevCol(0);
1296 sal_Int32 nPrevValidationIndex(-1);
1297 bool bIsAutoStyle(
true);
1298 bool bIsFirst(
true);
1301#if OSL_DEBUG_LEVEL > 0
1302 OSL_ENSURE(bIsFirst || (!bIsFirst && (nPrevCol + nCols == aRange.
nStartColumn)),
"here are some columns missing");
1311#if OSL_DEBUG_LEVEL > 0
1325 if (nPrevValidationIndex > -1)
1336#if OSL_DEBUG_LEVEL > 0
1346 if (nPrevValidationIndex > -1)
1357 const sal_Int32 nIndex,
const sal_Int32 nEqualRows,
1358 bool bHidden,
bool bFiltered)
1390 const sal_Int32 nIndex,
const sal_Int32 nStartRow,
const sal_Int32 nEqualRows,
1391 bool bHidden,
bool bFiltered)
1410 nEquals = nEqualRows;
1412 nOpenRow = nStartRow + nEquals - 1;
1413 if (nEquals < nEqualRows)
1417 nOpenRow = nStartRow + nEqualRows - 1;
1425 const sal_Int32 nIndex,
const sal_Int32 nStartRow,
const sal_Int32 nEqualRows,
1426 bool bHidden,
bool bFiltered)
1430 CloseRow(nStartRow + nEqualRows - 1);
1438 sal_Int32 nPrevIndex(0),
nIndex;
1439 bool bPrevHidden =
false;
1440 bool bPrevFiltered =
false;
1441 bool bHidden =
false;
1442 bool bFiltered =
false;
1443 sal_Int32 nEqualRows(1);
1444 sal_Int32 nEndRow(nStartRow + nRepeatRow);
1445 sal_Int32 nEndRowHidden = nStartRow - 1;
1446 sal_Int32 nEndRowFiltered = nStartRow - 1;
1448 for (nRow = nStartRow; nRow < nEndRow; ++nRow)
1450 if (nRow == nStartRow)
1452 nPrevIndex =
pRowStyles->GetStyleNameIndex(nTable, nRow);
1455 if (nRow > nEndRowHidden)
1457 bPrevHidden = rRowAttr.
rowHidden(nTable, nRow, nEndRowHidden);
1458 bHidden = bPrevHidden;
1460 if (nRow > nEndRowFiltered)
1462 bPrevFiltered = rRowAttr.
rowFiltered(nTable, nRow, nEndRowFiltered);
1463 bFiltered = bPrevFiltered;
1473 if (nRow > nEndRowHidden)
1474 bHidden = rRowAttr.
rowHidden(nTable, nRow, nEndRowHidden);
1475 if (nRow > nEndRowFiltered)
1476 bFiltered = rRowAttr.
rowFiltered(nTable, nRow, nEndRowFiltered);
1478 if (
nIndex == nPrevIndex && bHidden == bPrevHidden && bFiltered == bPrevFiltered &&
1485 assert(nPrevIndex >= 0 &&
"coverity#1438402");
1487 OpenAndCloseRow(nPrevIndex, nRow - nEqualRows, nEqualRows, bPrevHidden, bPrevFiltered);
1491 bPrevHidden = bHidden;
1492 bPrevFiltered = bFiltered;
1496 assert(nPrevIndex >= 0 &&
"coverity#1438402");
1497 OpenNewRow(nPrevIndex, nRow - nEqualRows, nEqualRows, bPrevHidden, bPrevFiltered);
1502 bool bHidden =
false;
1503 bool bFiltered =
false;
1506 sal_Int32 nEndRowHidden;
1507 sal_Int32 nEndRowFiltered;
1508 bHidden = rRowAttr.
rowHidden(nTable, nStartRow, nEndRowHidden);
1509 bFiltered = rRowAttr.
rowFiltered(nTable, nStartRow, nEndRowFiltered);
1511 assert(
nIndex >= 0 &&
"coverity#1438402");
1514 nOpenRow = nStartRow + nRepeatRow - 1;
1540 const sal_Int32 nEndCol,
const sal_Int32 nEndRow,
const sal_Int32 nSheet)
1544 if (nStartRow == nEndRow)
1548 OpenRow(nSheet, nStartRow, 1, aRowAttr);
1560 sal_Int32 nTotalRows(nEndRow - nStartRow + 1 - 1);
1561 while (nRows < nTotalRows)
1566 OSL_ENSURE(nMaxRows,
"something went wrong");
1567 if (nMaxRows >= nTotalRows - nRows)
1569 OpenRow(nSheet, nStartRow + nRows, nTotalRows - nRows, aRowAttr);
1570 nRows += nTotalRows - nRows;
1574 OpenRow(nSheet, nStartRow + nRows, nMaxRows, aRowAttr);
1582 if (nTotalRows == 1)
1584 OpenRow(nSheet, nEndRow, 1, aRowAttr);
1592 sal_Int32 nTotalRows(nEndRow - nStartRow + 1 - 1);
1593 while (nRows < nTotalRows)
1597 OSL_ENSURE(nMaxRows,
"something went wrong");
1598 if (nMaxRows >= nTotalRows - nRows)
1600 OpenRow(nSheet, nStartRow + nRows, nTotalRows - nRows, aRowAttr);
1601 nRows += nTotalRows - nRows;
1605 OpenRow(nSheet, nStartRow + nRows, nMaxRows, aRowAttr);
1613 OpenRow(nSheet, nEndRow, 1, aRowAttr);
1622 bool& rHasRowHeader,
ScRange& rRowHeaderRange,
1623 OUString& rPrintRanges)
const
1625 uno::Reference <sheet::XPrintAreas> xPrintAreas (
xCurrentTable, uno::UNO_QUERY);
1626 if (!xPrintAreas.is())
1629 rHasRowHeader = xPrintAreas->getPrintTitleRows();
1630 rHasColumnHeader = xPrintAreas->getPrintTitleColumns();
1631 table::CellRangeAddress rTempRowHeaderRange = xPrintAreas->getTitleRows();
1632 rRowHeaderRange =
ScRange(rTempRowHeaderRange.StartColumn,
1633 rTempRowHeaderRange.StartRow,
1634 rTempRowHeaderRange.Sheet,
1635 rTempRowHeaderRange.EndColumn,
1636 rTempRowHeaderRange.EndRow,
1637 rTempRowHeaderRange.Sheet);
1638 table::CellRangeAddress rTempColumnHeaderRange = xPrintAreas->getTitleColumns();
1639 rColumnHeaderRange =
ScRange(rTempColumnHeaderRange.StartColumn,
1640 rTempColumnHeaderRange.StartRow,
1641 rTempColumnHeaderRange.Sheet,
1642 rTempColumnHeaderRange.EndColumn,
1643 rTempColumnHeaderRange.EndRow,
1644 rTempColumnHeaderRange.Sheet);
1645 uno::Sequence< table::CellRangeAddress > aRangeList( xPrintAreas->getPrintAreas() );
1651 size_t nDepth = pFields->
GetDepth();
1652 for (
size_t i = 0;
i < nDepth; ++
i)
1655 for (
size_t j = 0; j < nFields; ++j)
1660 aGroup.
nLevel =
static_cast<sal_Int16
>(
i);
1693 uno::Sequence<sal_Int8> aPassHash;
1743 const uno::Reference< io::XOutputStream >& xOutput,
1746 const sal_Int32 nBufSize = 16*1024;
1747 uno::Sequence<sal_Int8> aSequence(nBufSize);
1749 sal_Int32 nRemaining =
nCount;
1752 while ( nRemaining > 0 )
1754 sal_Int32 nRead = xInput->readBytes( aSequence, std::min( nRemaining, nBufSize ) );
1758 if ( nRead < 1 || aSequence[0] !=
static_cast<sal_Int8>(
'<') )
1764 if (nRead == nRemaining)
1767 if ( aSequence[nRead-1] !=
static_cast<sal_Int8>(
'>') )
1773 if ( nRead == nBufSize )
1775 xOutput->writeBytes( aSequence );
1776 nRemaining -= nRead;
1782 uno::Sequence<sal_Int8> aTempBuf( aSequence.getConstArray(), nRead );
1783 xOutput->writeBytes( aTempBuf );
1797 const sal_Int32 nMaxSize = 32*1024;
1799 if ( nBytesToSkip > 0 )
1801 sal_Int32 nRemaining = nBytesToSkip;
1802 while ( nRemaining > 0 )
1804 sal_Int32 nSkip = std::min( nRemaining, nMaxSize );
1805 xInput->skipBytes( nSkip );
1806 nRemaining -= nSkip;
1813 uno::Reference<xml::sax::XDocumentHandler> xHandler =
GetDocHandler();
1814 uno::Reference<io::XActiveDataSource> xDestSource( xHandler, uno::UNO_QUERY );
1815 if ( !xDestSource.is() )
1818 uno::Reference<io::XOutputStream> xDestStream = xDestSource->getOutputStream();
1819 uno::Reference<io::XSeekable> xDestSeek( xDestStream, uno::UNO_QUERY );
1820 if ( !xDestSeek.is() )
1824 xDestSource->setOutputStream( xDestStream );
1828 const OString aOutStr(
"\n ");
1829 uno::Sequence<sal_Int8> aOutSeq(
reinterpret_cast<sal_Int8 const *
>(aOutStr.getStr()), aOutStr.getLength() );
1830 xDestStream->writeBytes( aOutSeq );
1833 rNewStart =
static_cast<sal_Int32
>(xDestSeek->getPosition());
1843 uno::Sequence<OUString> aEmptySeq;
1848 rNewEnd =
static_cast<sal_Int32
>(xDestSeek->getPosition());
1860 ScFormatSaveData* pFormatData = comphelper::getFromUnoTunnel<ScModelObj>(xSpreadDoc)->GetFormatSaveData();
1862 for (
const auto& rFormatInfo : pFormatData->
maIDToName)
1864 xAutoStylePool->RegisterDefinedName(XmlStyleFamily::TABLE_CELL, rFormatInfo.second);
1873 SCTAB nTableCount(0);
1874 sal_Int32 nShapesCount(0);
1876 OSL_FAIL(
"no shared data set");
1884 uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc(
GetModel(), uno::UNO_QUERY );
1885 if ( !xSpreadDoc.is() )
1888 ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(xSpreadDoc)->GetSheetSaveData();
1892 uno::Reference<container::XIndexAccess> xIndex( xSpreadDoc->getSheets(), uno::UNO_QUERY );
1898 sal_Int32 nTableCount(xIndex->getCount());
1914 mpCellsItr->SetEmptyDatabaseRanges( &aEmptyRanges );
1916 mpCellsItr->SetDetectiveOp( &aDetectiveOpContainer );
1918 if (nTableCount > 0)
1921 for (sal_Int32 nTable = 0; nTable < nTableCount; ++nTable)
1923 sal_Int32 nStartOffset = -1;
1924 sal_Int32 nEndOffset = -1;
1926 pSheetData->
GetStreamPos( nTable, nStartOffset, nEndOffset );
1928 if ( nStartOffset >= 0 && nEndOffset >= 0 &&
xSourceStream.is() )
1930 sal_Int32 nNewStart = -1;
1931 sal_Int32 nNewEnd = -1;
1935 pSheetData->
AddSavePos( nTable, nNewStart, nNewEnd );
1942 uno::Reference<sheet::XSpreadsheet> xTable(xIndex->getByIndex(nTable), uno::UNO_QUERY);
1964 uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc(
GetModel(), uno::UNO_QUERY );
1965 if (xSpreadDoc.is())
1970 SCTAB nTableCount(0);
1971 sal_Int32 nShapesCount(0);
1977 uno::Reference <lang::XMultiServiceFactory> xMultiServiceFactory(
GetModel(), uno::UNO_QUERY);
1978 if (xMultiServiceFactory.is())
1980 uno::Reference <beans::XPropertySet> xProperties(xMultiServiceFactory->createInstance(
"com.sun.star.sheet.Defaults"), uno::UNO_QUERY);
1981 if (xProperties.is())
1992 aStylesExp->exportStyleFamily(OUString(
"CellStyles"),
1999 const uno::Reference<sheet::XSpreadsheet>& xTable,
2000 sal_Int32 nTable,
const OUString* pOldName)
2002 css::uno::Any aAny = xProperties->getPropertyValue(
"FormatID");
2003 sal_uInt64 nKey = 0;
2007 uno::Reference<sheet::XSheetCellRanges> xCellRanges( xProperties, uno::UNO_QUERY );
2009 OUString sStyleName;
2010 sal_Int32 nNumberFormat(-1);
2011 sal_Int32 nValidationIndex(-1);
2013 std::vector< XMLPropertyState >::iterator aItr(aPropStates.begin());
2014 std::vector< XMLPropertyState >::iterator aEndItr(aPropStates.end());
2016 while (aItr != aEndItr)
2018 if (aItr->mnIndex != -1)
2029 aItr = aPropStates.erase(aItr);
2030 aEndItr = aPropStates.end();
2035 aItr->maValue >>= sStyleName;
2043 if (aItr->maValue >>= nNumberFormat)
2064 aPropStates.clear();
2065 if (nNumberFormat == -1)
2067 if (sStyleName.isEmpty())
2070 if (!aPropStates.empty())
2075 if (
GetAutoStylePool()->AddNamed(*pOldName, XmlStyleFamily::TABLE_CELL, sStyleName, std::move(aPropStates)))
2085 bool bAdded =
false;
2088 uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc(
GetModel(), uno::UNO_QUERY );
2089 ScFormatSaveData* pFormatData = comphelper::getFromUnoTunnel<ScModelObj>(xSpreadDoc)->GetFormatSaveData();
2090 auto itr = pFormatData->
maIDToName.find(nKey);
2093 sName = itr->second;
2099 bool bIsAutoStyle(
true);
2107 const uno::Sequence<table::CellRangeAddress> aAddresses(xCellRanges->getRangeAddresses());
2108 bool bGetMerge(
true);
2109 for (table::CellRangeAddress
const & address : aAddresses)
2111 pSharedData->SetLastColumn(nTable, address.EndColumn);
2113 pCellStyles->AddRangeStyleName(address,
nIndex, bIsAutoStyle, nValidationIndex, nNumberFormat);
2115 bGetMerge =
GetMerged(&address, xTable);
2126 const uno::Sequence<table::CellRangeAddress> aAddresses(xCellRanges->getRangeAddresses());
2127 bool bGetMerge(
true);
2128 for (table::CellRangeAddress
const & address : aAddresses)
2131 bGetMerge =
GetMerged(&address, xTable);
2132 pCellStyles->AddRangeStyleName(address,
nIndex,
false, nValidationIndex, nNumberFormat);
2133 if( sStyleName !=
"Default" || nValidationIndex != -1 )
2135 pSharedData->SetLastColumn(nTable, address.EndColumn);
2144 const OUString* pOldName, sal_Int32& rIndex,
bool& rIsVisible)
2147 if(aPropStates.empty())
2150 auto aItr = std::find_if(aPropStates.begin(), aPropStates.end(),
2152 return xColumnStylesPropertySetMapper->GetEntryContextId(rPropState.mnIndex) == CTF_SC_ISVISIBLE; });
2153 if (aItr != aPropStates.end())
2155 aItr->maValue >>= rIsVisible;
2158 const OUString sParent;
2161 if (
GetAutoStylePool()->AddNamed(*pOldName, XmlStyleFamily::TABLE_COLUMN, sParent, std::move(aPropStates)))
2181 const OUString* pOldName, sal_Int32& rIndex)
2184 if(aPropStates.empty())
2187 const OUString sParent;
2190 if (
GetAutoStylePool()->AddNamed(*pOldName, XmlStyleFamily::TABLE_ROW, sParent, std::move(aPropStates)))
2194 rIndex =
pRowStyles->AddStyleName(*pOldName);
2212 uno::Reference<container::XEnumeration> xEnum( xEnumAccess->createEnumeration() );
2215 sal_Int32 nSkip =
nIndex;
2218 (void) xEnum->nextElement();
2221 aRet = xEnum->nextElement();
2223 catch (container::NoSuchElementException&)
2240 uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc(
GetModel(), uno::UNO_QUERY );
2241 if (!xSpreadDoc.is())
2244 uno::Reference<container::XIndexAccess> xIndex( xSpreadDoc->getSheets(), uno::UNO_QUERY );
2254 ScSheetSaveData* pSheetData = comphelper::getFromUnoTunnel<ScModelObj>(xSpreadDoc)->GetSheetSaveData();
2255 if (pSheetData &&
pDoc)
2260 for (
SCTAB nTab=0; nTab<nTabCount; ++nTab)
2265 const std::vector<ScCellStyleEntry>& rCellEntries = pSheetData->
GetCellStyles();
2266 for (
const auto& rCellEntry : rCellEntries)
2269 sal_Int32 nTable = aPos.
Tab();
2273 uno::Reference <sheet::XSpreadsheet> xTable(xIndex->getByIndex(nTable), uno::UNO_QUERY);
2274 uno::Reference <beans::XPropertySet> xProperties(
2275 xTable->getCellByPosition( aPos.
Col(), aPos.
Row() ), uno::UNO_QUERY );
2282 const std::vector<ScCellStyleEntry>& rColumnEntries = pSheetData->
GetColumnStyles();
2283 for (
const auto& rColumnEntry : rColumnEntries)
2285 ScAddress aPos = rColumnEntry.maCellPos;
2286 sal_Int32 nTable = aPos.
Tab();
2290 uno::Reference<table::XColumnRowRange> xColumnRowRange(xIndex->getByIndex(nTable), uno::UNO_QUERY);
2291 uno::Reference<table::XTableColumns> xTableColumns(xColumnRowRange->getColumns());
2292 uno::Reference<beans::XPropertySet> xColumnProperties(xTableColumns->getByIndex( aPos.
Col() ), uno::UNO_QUERY);
2295 bool bIsVisible(
true);
2301 const std::vector<ScCellStyleEntry>& rRowEntries = pSheetData->
GetRowStyles();
2302 for (
const auto& rRowEntry : rRowEntries)
2305 sal_Int32 nTable = aPos.
Tab();
2309 uno::Reference<table::XColumnRowRange> xColumnRowRange(xIndex->getByIndex(nTable), uno::UNO_QUERY);
2310 uno::Reference<table::XTableRows> xTableRows(xColumnRowRange->getRows());
2311 uno::Reference<beans::XPropertySet> xRowProperties(xTableRows->getByIndex( aPos.
Row() ), uno::UNO_QUERY);
2319 const std::vector<ScCellStyleEntry>& rTableEntries = pSheetData->
GetTableStyles();
2320 for (
const auto& rTableEntry : rTableEntries)
2323 sal_Int32 nTable = aPos.
Tab();
2328 uno::Reference<beans::XPropertySet> xTableProperties(xIndex->getByIndex(nTable), uno::UNO_QUERY);
2329 if (xTableProperties.is())
2332 OUString
sName( rTableEntry.maName );
2333 GetAutoStylePool()->AddNamed(
sName, XmlStyleFamily::TABLE_TABLE, OUString(), std::move(aPropStates));
2344 const std::vector<ScNoteStyleEntry>& rNoteEntries = pSheetData->
GetNoteStyles();
2345 for (
const auto& rNoteEntry : rNoteEntries)
2355 OSL_ENSURE( pNote,
"note not found" );
2360 uno::Reference<beans::XPropertySet> xShapeProperties( pDrawObj->
getUnoShape(), uno::UNO_QUERY );
2361 if (xShapeProperties.is())
2363 if ( !rNoteEntry.maStyleName.isEmpty() )
2365 std::vector<XMLPropertyState> aPropStates(xShapeMapper->Filter(*
this, xShapeProperties));
2366 OUString
sName( rNoteEntry.maStyleName );
2367 GetAutoStylePool()->AddNamed(
sName, XmlStyleFamily::SD_GRAPHICS_ID, OUString(), std::move(aPropStates));
2370 if ( !rNoteEntry.maTextStyle.isEmpty() )
2372 std::vector<XMLPropertyState> aPropStates(
2374 OUString
sName( rNoteEntry.maTextStyle );
2375 GetAutoStylePool()->AddNamed(
sName, XmlStyleFamily::TEXT_PARAGRAPH, OUString(), std::move(aPropStates));
2387 const std::vector<ScTextStyleEntry>& rNoteParaEntries = pSheetData->
GetNoteParaStyles();
2388 for (
const auto& rNoteParaEntry : rNoteParaEntries)
2390 ScAddress aPos = rNoteParaEntry.maCellPos;
2396 OSL_ENSURE( pNote,
"note not found" );
2400 uno::Reference<container::XEnumerationAccess> xCellText(pDrawObj->
getUnoShape(), uno::UNO_QUERY);
2401 uno::Reference<beans::XPropertySet> xParaProp(
2402 lcl_GetEnumerated( xCellText, rNoteParaEntry.maSelection.nStartPara ), uno::UNO_QUERY );
2403 if ( xParaProp.is() )
2405 std::vector<XMLPropertyState> aPropStates(xParaPropMapper->Filter(*
this, xParaProp));
2406 OUString
sName( rNoteParaEntry.maName );
2407 GetAutoStylePool()->AddNamed(
sName, XmlStyleFamily::TEXT_PARAGRAPH, OUString(), std::move(aPropStates));
2418 const std::vector<ScTextStyleEntry>& rNoteTextEntries = pSheetData->
GetNoteTextStyles();
2419 for (
const auto& rNoteTextEntry : rNoteTextEntries)
2421 ScAddress aPos = rNoteTextEntry.maCellPos;
2427 OSL_ENSURE( pNote,
"note not found" );
2431 uno::Reference<text::XSimpleText> xCellText(pDrawObj->
getUnoShape(), uno::UNO_QUERY);
2432 uno::Reference<beans::XPropertySet> xCursorProp(xCellText->createTextCursor(), uno::UNO_QUERY);
2433 ScDrawTextCursor* pCursor = comphelper::getFromUnoTunnel<ScDrawTextCursor>( xCursorProp );
2436 pCursor->SetSelection( rNoteTextEntry.maSelection );
2438 std::vector<XMLPropertyState> aPropStates(xTextPropMapper->Filter(*
this, xCursorProp));
2439 OUString
sName( rNoteTextEntry.maName );
2452 uno::Reference<beans::XPropertySet> xPrevCursorProp;
2453 const std::vector<ScTextStyleEntry>& rTextEntries = pSheetData->
GetTextStyles();
2454 for (
const auto& rTextEntry : rTextEntries)
2457 sal_Int32 nTable = aPos.
Tab();
2465 uno::Reference<beans::XPropertySet> xCursorProp;
2466 if (xPrevCursorProp && aPrevPos == aPos)
2467 xCursorProp = xPrevCursorProp;
2470 uno::Reference<table::XCellRange> xCellRange(xIndex->getByIndex(nTable), uno::UNO_QUERY);
2471 uno::Reference<text::XSimpleText> xCellText(xCellRange->getCellByPosition(aPos.
Col(), aPos.
Row()), uno::UNO_QUERY);
2472 xCursorProp.set(xCellText->createTextCursor(), uno::UNO_QUERY);
2474 ScCellTextCursor* pCursor = comphelper::getFromUnoTunnel<ScCellTextCursor>( xCursorProp );
2477 pCursor->SetSelection( rTextEntry.maSelection );
2479 std::vector<XMLPropertyState> aPropStates(xTextPropMapper->Filter(*
this, xCursorProp));
2480 OUString
sName( rTextEntry.maName );
2483 xPrevCursorProp = xCursorProp;
2492 SCTAB nTableCount(0);
2493 sal_Int32 nShapesCount(0);
2496 sal_Int32 nTableCount(xIndex->getCount());
2501 uno::Reference <sheet::XSpreadsheet> xTable(xIndex->getByIndex(nTable), uno::UNO_QUERY);
2506 uno::Reference<beans::XPropertySet> xTableProperties(xTable, uno::UNO_QUERY);
2507 if (xTableProperties.is())
2510 if(!aPropStates.empty())
2519 uno::Reference<sheet::XUniqueCellFormatRangesSupplier> xCellFormatRanges ( xTable, uno::UNO_QUERY );
2520 if ( xCellFormatRanges.is() )
2522 uno::Reference<container::XIndexAccess> xFormatRangesIndex(xCellFormatRanges->getUniqueCellFormatRanges());
2523 if (xFormatRangesIndex.is())
2525 sal_Int32 nFormatRangesCount(xFormatRangesIndex->getCount());
2527 for (sal_Int32 nFormatRange = 0; nFormatRange < nFormatRangesCount; ++nFormatRange)
2529 uno::Reference< sheet::XSheetCellRanges> xCellRanges(xFormatRangesIndex->getByIndex(nFormatRange), uno::UNO_QUERY);
2530 if (xCellRanges.is())
2532 uno::Reference <beans::XPropertySet> xProperties (xCellRanges, uno::UNO_QUERY);
2533 if (xProperties.is())
2542 uno::Reference<table::XColumnRowRange> xColumnRowRange (xTable, uno::UNO_QUERY);
2543 if (xColumnRowRange.is() &&
pDoc)
2546 uno::Reference<table::XTableColumns> xTableColumns(xColumnRowRange->getColumns());
2547 if (xTableColumns.is())
2551 table::CellRangeAddress aCellAddress(
GetEndAddress(xTable));
2552 if (aCellAddress.EndColumn > nColumns)
2559 sal_Int32 nColumn = 0;
2560 while (nColumn <= pDoc->MaxCol())
2563 bool bIsVisible(
true);
2564 uno::Reference <beans::XPropertySet> xColumnProperties(xTableColumns->getByIndex(nColumn), uno::UNO_QUERY);
2565 if (xColumnProperties.is())
2570 sal_Int32 nOld(nColumn);
2572 for (sal_Int32
i = nOld + 1;
i < nColumn; ++
i)
2575 if (aCellAddress.EndColumn > nColumns)
2577 bool bIsVisible(
true);
2579 for (sal_Int32
i = nColumns + 1;
i <= aCellAddress.EndColumn; ++
i)
2583 uno::Reference<table::XTableRows> xTableRows(xColumnRowRange->getRows());
2584 if (xTableRows.is())
2591 while (nRow <= pDoc->MaxRow())
2594 uno::Reference <beans::XPropertySet> xRowProperties(xTableRows->getByIndex(nRow), uno::UNO_QUERY);
2595 if(xRowProperties.is())
2600 sal_Int32 nOld(nRow);
2602 if (nRow > nOld + 1)
2624 uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc(
GetModel(), uno::UNO_QUERY );
2625 if (!xSpreadDoc.is())
2628 uno::Reference<container::XIndexAccess> xIndex( xSpreadDoc->getSheets(), uno::UNO_QUERY );
2691 pSharedData->AddNoteObj( xShape, pCaptData->maStart );
2695 OSL_ENSURE( pCaptData->maStart.Tab() ==
nCurrentTable,
"invalid table in object data" );
2714 const uno::Reference <sheet::XSpreadsheet>& xTable)
2717 sal_Int32 nRow(pCellAddress->StartRow);
2718 sal_Int32 nCol(pCellAddress->StartColumn);
2719 sal_Int32 nEndRow(pCellAddress->EndRow);
2720 sal_Int32 nEndCol(pCellAddress->EndColumn);
2721 bool bRowInc(nEndRow > nRow);
2722 while(!bReady && nRow <= nEndRow && nCol <= nEndCol)
2724 uno::Reference<sheet::XSheetCellRange> xSheetCellRange(xTable->getCellRangeByPosition(nCol, nRow, nCol, nRow), uno::UNO_QUERY);
2725 if (xSheetCellRange.is())
2727 uno::Reference<sheet::XSheetCellCursor> xCursor(xTable->createCursorByRange(xSheetCellRange));
2730 uno::Reference<sheet::XCellRangeAddressable> xCellAddress (xCursor, uno::UNO_QUERY);
2731 xCursor->collapseToMergedArea();
2732 table::CellRangeAddress aCellAddress2(xCellAddress->getRangeAddress());
2733 ScRange aScRange( aCellAddress2.StartColumn, aCellAddress2.StartRow, aCellAddress2.Sheet,
2734 aCellAddress2.EndColumn, aCellAddress2.EndRow, aCellAddress2.Sheet );
2736 if ((aScRange.
aEnd.
Row() > nRow ||
2737 aScRange.
aEnd.
Col() > nCol) &&
2757 OSL_ENSURE(!(!bReady && nEndRow > nRow && nEndCol > nCol),
"should not be possible");
2762 ScRange& aCellAddress,
bool& bIsFirst)
const
2770 aCellAddress = aMatrixRange;
2796 uno::Reference<container::XNamed> xName (xTable, uno::UNO_QUERY );
2801 OUString sOUTableName(xName->getName());
2805 uno::Reference<util::XProtectable> xProtectable (xTable, uno::UNO_QUERY);
2807 if (xProtectable.is() && xProtectable->isProtected())
2864 OUString sPrintRanges;
2866 bool bHasColumnHeader;
2868 if( !sPrintRanges.isEmpty() )
2903 uno::Reference<document::XEventsSupplier> xSupplier(xTable, uno::UNO_QUERY);
2904 uno::Reference<container::XNameAccess> xEvents = xSupplier->getEvents();
2910 uno::Reference<drawing::XDrawPage> xDrawPage;
2911 if (
pSharedData->HasForm(nTable, xDrawPage) && xDrawPage.is())
2916 OSL_ENSURE( bRet,
"OFormLayerXMLExport::seekPage failed!" );
2924 pSharedData->SetLastColumn(nTable, aRange.EndColumn);
2930 if (bHasColumnHeader)
2939 ExportColumns(nTable, aColumnHeaderRange, bHasColumnHeader);
2940 bool bIsFirst(
true);
2941 sal_Int32 nEqualCells(0);
2992 if (pRangeName && !pRangeName->
empty())
3010 std::unique_ptr<SvXMLElementExport> pElem;
3011 if (!rStyleName.isEmpty())
3014 rExport.
AddAttribute(XML_NAMESPACE_TEXT, XML_STYLE_NAME, rStyleName);
3026 case text::textfield::Type::URL:
3033 rExport.
AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE,
"simple");
3035 if (!aTargetFrame.isEmpty())
3036 rExport.
AddAttribute(XML_NAMESPACE_OFFICE, XML_TARGET_FRAME_NAME, aTargetFrame);
3049 OUStringBuffer
aBuf;
3050 sal_Int32 nVal = aDate.GetYear();
3053 nVal = aDate.GetMonth();
3058 nVal = aDate.GetDay();
3062 rExport.
AddAttribute(XML_NAMESPACE_STYLE, XML_DATA_STYLE_NAME,
"N2");
3063 rExport.
AddAttribute(XML_NAMESPACE_TEXT, XML_DATE_VALUE,
aBuf.makeStringAndClear());
3071 case text::textfield::Type::DOCINFO_TITLE:
3100 ScXMLExport& rExport, std::u16string_view rParaText,
3103 std::vector<editeng::Section>::const_iterator it, std::vector<editeng::Section>::const_iterator
const & itEnd )
3109 for (; it != itEnd; ++it)
3115 std::vector<XMLPropertyState> aPropStates;
3117 OUString aStyleName = xStylePool->Find(XmlStyleFamily::TEXT_TEXT, OUString(), aPropStates);
3118 if (aContent ==
"\x001" && !pField)
3122 if (
p->Which() == EE_FEATURE_TAB)
3130 writeContent(rExport, aStyleName, aContent, pField);
3146 if (bIsFirstMatrixCell)
3153 bool bIsEmpty(
false);
3154 switch (aCell.
nType)
3156 case table::CellContentType_EMPTY :
3161 case table::CellContentType_VALUE :
3170 case table::CellContentType_TEXT :
3174 bool bExportValue = sCellString.indexOf(
'\x001') == -1;
3176 sCellString, sFormattedString, bExportValue);
3182 case table::CellContentType_FORMULA :
3188 if (!bIsMatrix || bIsFirstMatrixCell)
3197 sal_uInt16 nNamespacePrefix =
3209 if (pFormulaCell->
GetErrCode() != FormulaError::NONE)
3219 else if (pFormulaCell->
IsValue())
3291 bool bPrevCharWasSpace =
true;
3307 std::vector<OUString> aParaTexts;
3309 aParaTexts.reserve(nParaCount);
3310 for (sal_Int32
i = 0;
i < nParaCount; ++
i)
3311 aParaTexts.push_back(pText->
GetText(
i));
3314 std::vector<editeng::Section> aAttrs;
3316 std::vector<editeng::Section>::const_iterator itSec = aAttrs.begin(), itSecEnd = aAttrs.end();
3317 std::vector<editeng::Section>::const_iterator itPara = itSec;
3318 sal_Int32 nCurPara = 0;
3319 for (; itSec != itSecEnd; ++itSec)
3327 flushParagraph(*
this, aParaTexts[nCurPara], xMapper, xStylePool, rAttrMap, itPara, itSec);
3332 flushParagraph(*
this, aParaTexts[nCurPara], xMapper, xStylePool, rAttrMap, itPara, itSecEnd);
3341 const sal_Unicode* pEnd =
p +
static_cast<size_t>(aResStr.getLength());
3343 for (;
p != pEnd; ++
p)
3353 aContent = OUString(pPara,
p-pPara);
3365 aContent = OUString(pPara, pEnd-pPara);
3373 uno::Reference < beans::XPropertySet > xShapeProps ( xShape, uno::UNO_QUERY );
3374 bool bIsChart(
false );
3375 if (xShapeProps.is())
3377 sal_Int32 nZOrder = 0;
3378 if (xShapeProps->getPropertyValue(
"ZOrder") >>= nZOrder)
3382 uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xShapeProps->getPropertySetInfo();
3383 OUString sPropCLSID (
"CLSID");
3384 if( xPropSetInfo->hasPropertyByName( sPropCLSID ) )
3387 if (xShapeProps->getPropertyValue( sPropCLSID ) >>= sCLSID)
3389 if ( sCLSID.equalsIgnoreAsciiCase(
GetChartExport()->getChartCLSID()) )
3395 OUString aChartName;
3396 xShapeProps->getPropertyValue(
"PersistName" ) >>= aChartName;
3404 if ( rRangeList.
is() )
3407 if ( !sRanges.isEmpty() )
3411 pAttrList->AddAttribute(
3420 if ( sRanges.isEmpty() )
3422 uno::Reference< frame::XModel > xChartModel;
3423 if( ( xShapeProps->getPropertyValue(
"Model" ) >>= xChartModel ) &&
3426 uno::Reference< chart2::XChartDocument > xChartDoc( xChartModel, uno::UNO_QUERY );
3427 uno::Reference< chart2::data::XDataReceiver > xReceiver( xChartModel, uno::UNO_QUERY );
3428 if( xChartDoc.is() && xReceiver.is() &&
3429 ! xChartDoc->hasInternalDataProvider())
3433 uno::Sequence< OUString > aRepresentations(
3434 xReceiver->getUsedRangeRepresentations());
3438 if (aRepresentations.hasElements())
3443 uno::Reference< chart2::data::XRangeXMLConversion > xRangeConverter( xChartDoc->getDataProvider(), uno::UNO_QUERY );
3444 sRanges = lcl_RangeSequenceToString( aRepresentations, xRangeConverter );
3446 pAttrList->AddAttribute(
3450 catch (
const lang::IllegalArgumentException&)
3483 aPoint.X = aCellRectFull.
Right();
3485 aPoint.X = aCellRectFull.
Left();
3486 aPoint.Y = aCellRectFull.
Top();
3488 for (
const auto& rShape : rMyCell.
aShapeList)
3490 if (rShape.xShape.is())
3495 bool bNeedsRestore =
false;
3498 std::unique_ptr<SdrObjGeoData> pGeoData;
3510 aSnapStartAddress = pObjData->
maStart;
3516 aSnapStartAddress.
Col(), aSnapStartAddress.
Row(), aSnapStartAddress.
Col(),
3517 aSnapStartAddress.
Row(), aSnapStartAddress.
Tab(),
false );
3519 aSnapStartAddress.
Col(), aSnapStartAddress.
Row(), aSnapStartAddress.
Col(),
3520 aSnapStartAddress.
Row(), aSnapStartAddress.
Tab(),
true );
3523 if (pObj && (
abs(nLeftDiff) > 1 ||
abs(nTopDiff) > 1))
3525 bNeedsRestore =
true;
3532 if (rShape.bResizeWithCell && pObjData)
3540 aSnapStartAddress.
Col(), aSnapStartAddress.
Row(), aSnapStartAddress.
Col(),
3541 aSnapStartAddress.
Row(), aSnapStartAddress.
Tab(),
false );
3543 aSnapEndAddress.
Col(), aSnapEndAddress.
Row(), aSnapEndAddress.
Col(),
3544 aSnapEndAddress.
Row(), aSnapEndAddress.
Tab(),
false );
3547 aRectFull.
SetLeft(aEndCellRect.
Right() - aSnapEndOffset.X());
3548 aRectFull.
SetRight(aStartCellRect.
Right() - aSnapStartOffset.X());
3552 aRectFull.
SetLeft(aStartCellRect.
Left() + aSnapStartOffset.X());
3553 aRectFull.
SetRight(aEndCellRect.
Left() + aSnapEndOffset.X());
3555 aRectFull.
SetTop(aStartCellRect.
Top() + aSnapStartOffset.Y());
3556 aRectFull.
SetBottom(aEndCellRect.
Top() + aSnapEndOffset.Y());
3561 bNeedsRestore =
true;
3573 if ( rShape.bResizeWithCell &&
3574 rShape.xShape->getShapeType() !=
"com.sun.star.drawing.CaptionShape" )
3576 OUString sEndAddress;
3579 OUStringBuffer sBuffer;
3581 sBuffer, rShape.nEndX);
3584 sBuffer, rShape.nEndY);
3595 if (pObj && bNegativePage
3596 && rShape.xShape->getShapeType() ==
"com.sun.star.drawing.MeasureShape")
3600 aPoint.X = aSnapRect.
Left() + aSnapRect.
Right() - aPoint.X;
3603 && ((rShape.bResizeWithCell && pObj->
GetObjIdentifier() == SdrObjKind::CustomShape
3608 awt::Point aMatrixTranslate = rShape.xShape->getPosition();
3609 aPoint.X = aMatrixTranslate.X - pNRObjData->
maStartOffset.X();
3610 aPoint.Y = aMatrixTranslate.Y - pNRObjData->
maStartOffset.Y();
3616 if (bNeedsRestore && pObj && pGeoData)
3625 if (!pTableShapes || (*pTableShapes)[
nCurrentTable].empty())
3628 OSL_ENSURE(pTableShapes->size() >
static_cast<size_t>(
nCurrentTable),
"wrong Table");
3639 uno::Reference<beans::XPropertySet> xShapeProp(rxShape, uno::UNO_QUERY);
3640 awt::Rectangle aFrameRect;
3641 if (xShapeProp.is() && (xShapeProp->getPropertyValue(
"FrameRect") >>= aFrameRect))
3647 awt::Point aRefPoint;
3648 aRefPoint.X = 2 * aFrameRect.X + aFrameRect.Width - 1;
3677 OUStringBuffer sValue;
3696 uno::Reference<drawing::XShape> xCurrentShape( pNoteCaption->
getUnoShape(), uno::UNO_QUERY );
3697 if (xCurrentShape.get()!=xShape.get())
3700 const OUString& sAuthor(pNote->
GetAuthor());
3701 if (!sAuthor.isEmpty())
3709 const OUString& aDate(pNote->
GetDate());
3717 OUStringBuffer sBuf;
3755 uno::Reference<drawing::XShape> xShape( pNoteCaption->
getUnoShape(), uno::UNO_QUERY );
3770 sal_Int32 nObjCount(rObjVec.size());
3771 sal_Int32 nOpCount(rOpVec.size());
3772 if( !(nObjCount || nOpCount) )
3777 for(
const auto& rObj : rObjVec)
3788 if( rObj.bHasError )
3795 for(
const auto& rOp : rOpVec)
3807 if (nEqualCellCount > 0)
3809 sal_Int32 nTemp(nEqualCellCount + 1);
3810 OUString sOUEqualCellCount(OUString::number(nTemp));
3824 bool bIsEqual =
false;
3847 switch ( aCell1.
nType )
3849 case table::CellContentType_EMPTY :
3854 case table::CellContentType_VALUE :
3862 case table::CellContentType_TEXT :
3872 case table::CellContentType_FORMULA :
3892 uno::Reference<beans::XPropertySet> xPropertySet(xSpreadDoc, uno::UNO_QUERY);
3893 if (!xPropertySet.is())
3896 bool bCalcAsShown (::cppu::any2bool( xPropertySet->getPropertyValue(
SC_UNO_CALCASSHOWN) ));
3897 bool bIgnoreCase (::cppu::any2bool( xPropertySet->getPropertyValue(
SC_UNO_IGNORECASE) ));
3898 bool bLookUpLabels (::cppu::any2bool( xPropertySet->getPropertyValue(
SC_UNO_LOOKUPLABELS) ));
3899 bool bMatchWholeCell (::cppu::any2bool( xPropertySet->getPropertyValue(
SC_UNO_MATCHWHOLE) ));
3900 bool bUseRegularExpressions (::cppu::any2bool( xPropertySet->getPropertyValue(
SC_UNO_REGEXENABLED) ));
3902 if (bUseWildcards && bUseRegularExpressions)
3903 bUseRegularExpressions =
false;
3904 bool bIsIterationEnabled (::cppu::any2bool( xPropertySet->getPropertyValue(
SC_UNO_ITERENABLED) ));
3906 sal_Int32 nIterationCount(100);
3908 double fIterationEpsilon = 0;
3910 util::Date aNullDate;
3912 if (!(bCalcAsShown || bIgnoreCase || !bLookUpLabels || !bMatchWholeCell || !bUseRegularExpressions ||
3914 bIsIterationEnabled || nIterationCount != 100 || !::rtl::math::approxEqual(fIterationEpsilon, 0.001) ||
3915 aNullDate.Day != 30 || aNullDate.Month != 12 || aNullDate.Year != 1899 || nYear2000 != 1930))
3922 if (!bMatchWholeCell)
3926 if (!bUseRegularExpressions)
3930 if (nYear2000 != 1930)
3936 if (aNullDate.Day != 30 || aNullDate.Month != 12 || aNullDate.Year != 1899)
3938 OUStringBuffer sDate;
3943 if (bIsIterationEnabled || nIterationCount != 100 || !::rtl::math::approxEqual(fIterationEpsilon, 0.001))
3945 if (bIsIterationEnabled)
3947 if (nIterationCount != 100)
3951 if (!::rtl::math::approxEqual(fIterationEpsilon, 0.001))
3953 OUStringBuffer sBuffer;
3965 uno::Reference <sheet::XSheetLinkable> xLinkable (
xCurrentTable, uno::UNO_QUERY);
3966 if (!(xLinkable.is() &&
GetModel().is()))
3969 sheet::SheetLinkMode nMode (xLinkable->getLinkMode());
3970 if (nMode == sheet::SheetLinkMode_NONE)
3973 OUString sLink (xLinkable->getLinkUrl());
3974 uno::Reference <beans::XPropertySet> xProps (
GetModel(), uno::UNO_QUERY);
3978 uno::Reference <container::XIndexAccess> xIndex(xProps->getPropertyValue(
SC_UNO_SHEETLINKS), uno::UNO_QUERY);
3982 sal_Int32
nCount(xIndex->getCount());
3987 uno::Reference <beans::XPropertySet> xLinkProps;
3988 for (sal_Int32
i = 0; (
i <
nCount) && !bFound; ++
i)
3990 xLinkProps.set(xIndex->getByIndex(
i), uno::UNO_QUERY);
3991 if (xLinkProps.is())
3995 bFound = sLink == sNewLink;
3998 if (!(bFound && xLinkProps.is()))
4002 OUString sFilterOptions;
4003 OUString sTableName (xLinkable->getLinkSheetName());
4004 sal_Int32 nRefresh(0);
4008 if (sLink.isEmpty())
4013 if (!sTableName.isEmpty())
4015 if (!sFilter.isEmpty())
4017 if (!sFilterOptions.isEmpty())
4019 if (nMode != sheet::SheetLinkMode_NORMAL)
4023 OUStringBuffer sBuffer;
4025 static_cast<double>(nRefresh) / 86400 );
4058 OUString sRangeListStr;
4061 if (!sComment.isEmpty())
4068 uno::Reference< beans::XPropertySet > xDocProp( xSpreadDoc, uno::UNO_QUERY );
4069 if( !xDocProp.is() )
return;
4072 uno::Reference< container::XIndexAccess > xColRangesIAccess(xDocProp->getPropertyValue(
SC_UNO_COLLABELRNG ), uno::UNO_QUERY);
4073 if( xColRangesIAccess.is() )
4074 nCount += xColRangesIAccess->getCount();
4076 uno::Reference< container::XIndexAccess > xRowRangesIAccess(xDocProp->getPropertyValue(
SC_UNO_ROWLABELRNG ), uno::UNO_QUERY);
4077 if( xRowRangesIAccess.is() )
4078 nCount += xRowRangesIAccess->getCount();
4090 if( !xRangesIAccess.is() )
return;
4092 sal_Int32
nCount(xRangesIAccess->getCount());
4095 uno::Reference< sheet::XLabelRange > xRange(xRangesIAccess->getByIndex(
nIndex ), uno::UNO_QUERY);
4099 table::CellRangeAddress aCellRange( xRange->getLabelArea() );
4102 aCellRange = xRange->getDataArea();
4131 if (rDataSources.empty())
4135 for (
const auto& itr : rDataSources)
4152 for (
auto& itr : aDataTransformations)
4156 switch(aTransformationType)
4161 std::shared_ptr<sc::ColumnRemoveTransformation> aDeleteTransformation = std::dynamic_pointer_cast<sc::ColumnRemoveTransformation>(itr);
4162 std::set<SCCOL> aColumns = aDeleteTransformation->getColumns();
4164 for(
auto&
col : aColumns)
4174 std::shared_ptr<sc::SplitColumnTransformation> aSplitTransformation = std::dynamic_pointer_cast<sc::SplitColumnTransformation>(itr);
4184 std::shared_ptr<sc::MergeColumnTransformation> aMergeTransformation = std::dynamic_pointer_cast<sc::MergeColumnTransformation>(itr);
4185 std::set<SCCOL> aColumns = aMergeTransformation->getColumns();
4190 for(
auto&
col : aColumns)
4201 std::shared_ptr<sc::SortTransformation> aSortTransformation = std::dynamic_pointer_cast<sc::SortTransformation>(itr);
4202 ScSortParam aSortParam = aSortTransformation->getSortParam();
4220 std::shared_ptr<sc::TextTransformation> aTextTransformation = std::dynamic_pointer_cast<sc::TextTransformation>(itr);
4224 switch ( aTextTransformType )
4240 std::set<SCCOL> aColumns = aTextTransformation->getColumns();
4244 for(
auto&
col : aColumns)
4255 std::shared_ptr<sc::AggregateFunction> aAggregateFunction = std::dynamic_pointer_cast<sc::AggregateFunction>(itr);
4256 std::set<SCCOL> aColumns = aAggregateFunction->getColumns();
4260 switch (aAggregateType)
4278 for(
auto&
col : aColumns)
4289 std::shared_ptr<sc::NumberTransformation> aNumberTransformation = std::dynamic_pointer_cast<sc::NumberTransformation>(itr);
4293 switch ( aNumberTransformType )
4339 std::set<SCCOL> aColumns = aNumberTransformation->getColumn();
4340 for(
auto&
col : aColumns)
4351 std::shared_ptr<sc::ReplaceNullTransformation> aReplaceNullTransformation = std::dynamic_pointer_cast<sc::ReplaceNullTransformation>(itr);
4352 std::set<SCCOL> aColumns = aReplaceNullTransformation->getColumn();
4357 for(
auto&
col : aColumns)
4368 std::shared_ptr<sc::DateTimeTransformation> aDateTimeTransformation = std::dynamic_pointer_cast<sc::DateTimeTransformation>(itr);
4372 switch ( aDateTimeTransformationType )
4432 std::set<SCCOL> aColumns = aDateTimeTransformation->getColumn();
4433 for(
auto&
col : aColumns)
4452 if (!officecfg::Office::Common::Misc::ExperimentalMode::get())
4493 for (
const auto& rxEntry : *pRangeName)
4497 OUString sBaseCellAddress;
4498 rxEntry.second->ValidateTabRefs();
4501 assert(!sBaseCellAddress.isEmpty());
4505 OUString sTempSymbol(sSymbol);
4507 if (rxEntry.second->IsReference(aRange))
4510 OUString sContent(sTempSymbol.copy(1, sTempSymbol.getLength() -2 ));
4513 sal_Int32 nRangeType = rxEntry.second->GetUnoType();
4514 OUStringBuffer sBufferRangeType;
4519 if (!sBufferRangeType.isEmpty())
4520 sBufferRangeType.append(
" ");
4523 if ((nRangeType & sheet::NamedRangeFlag::FILTER_CRITERIA) == sheet::NamedRangeFlag::FILTER_CRITERIA)
4525 if (!sBufferRangeType.isEmpty())
4526 sBufferRangeType.append(
" ");
4529 if ((nRangeType & sheet::NamedRangeFlag::PRINT_AREA) == sheet::NamedRangeFlag::PRINT_AREA)
4531 if (!sBufferRangeType.isEmpty())
4532 sBufferRangeType.append(
" ");
4535 OUString sRangeType = sBufferRangeType.makeStringAndClear();
4536 if (!sRangeType.isEmpty())
4552 aSparklineGroupExport.
write();
4557OUString getCondFormatEntryType(
const ScColorScaleEntry& rEntry,
bool bFirst =
true)
4568 return "percentile";
4576 return "auto-minimum";
4578 return "auto-maximum";
4594 return "last-7-days";
4602 return "this-month";
4604 return "last-month";
4606 return "next-month";
4623 if(!pCondFormatList)
4626 if (pCondFormatList->