18 #include <document.hxx>
19 #include <unonames.hxx>
21 #include <globstr.hrc>
22 #include <strings.hrc>
33 #include <com/sun/star/chart2/data/LabeledDataSequence.hpp>
34 #include <com/sun/star/chart/ChartDataRowSource.hpp>
35 #include <com/sun/star/frame/XModel.hpp>
37 #include <com/sun/star/sheet/XDataPilotResults.hpp>
38 #include <com/sun/star/sheet/DataResultFlags.hpp>
40 #include <com/sun/star/sheet/XDimensionsSupplier.hpp>
41 #include <com/sun/star/sheet/XHierarchiesSupplier.hpp>
42 #include <com/sun/star/sheet/XLevelsSupplier.hpp>
43 #include <com/sun/star/sheet/XDataPilotMemberResults.hpp>
44 #include <com/sun/star/sheet/MemberResultFlags.hpp>
45 #include <com/sun/star/sheet/XMembersSupplier.hpp>
47 #include <com/sun/star/chart/ChartDataChangeEvent.hpp>
48 #include <com/sun/star/container/XNamed.hpp>
50 #include <unordered_map>
58 constexpr OUStringLiteral constIdCategories(u
"categories");
59 constexpr OUStringLiteral constIdLabel(u
"label");
60 constexpr OUStringLiteral constIdData(u
"data");
68 {
u"", 0, css::uno::Type(), 0, 0 }
70 return aDataProviderPropertyMap_Impl;
73 uno::Reference<frame::XModel> lcl_GetXModel(
const ScDocument * pDoc)
75 uno::Reference<frame::XModel>
xModel;
78 xModel.set(pObjSh->GetModel());
82 OUString lcl_identifierForData(sal_Int32 index)
84 return "PT@" + constIdData +
" " + OUString::number(index);
87 OUString lcl_identifierForLabel(sal_Int32 index)
89 return "PT@" + constIdLabel +
" " + OUString::number(index);
92 OUString lcl_identifierForCategories()
94 return "PT@" + constIdCategories;
97 std::vector<OUString> lcl_getVisiblePageMembers(
const uno::Reference<uno::XInterface> & xLevel)
99 std::vector<OUString> aResult;
103 uno::Reference<sheet::XMembersSupplier> xMembersSupplier(xLevel, uno::UNO_QUERY);
104 if (!xMembersSupplier.is())
107 uno::Reference<sheet::XMembersAccess> xMembersAccess = xMembersSupplier->getMembers();
108 if (!xMembersAccess.is())
111 const css::uno::Sequence<OUString> aMembersNames = xMembersAccess->getElementNames();
112 for (OUString
const & rMemberNames : aMembersNames)
114 uno::Reference<beans::XPropertySet> xProperties(xMembersAccess->getByName(rMemberNames), uno::UNO_QUERY);
115 if (!xProperties.is())
119 if (aCaption.isEmpty())
120 aCaption = rMemberNames;
125 aResult.push_back(aCaption);
139 , m_aPropSet(lcl_GetDataProviderPropertyMap())
140 , m_bIncludeHiddenCells(true)
141 , m_bNeedsUpdate(true)
142 , m_xContext(
comphelper::getProcessComponentContext())
144 rDoc.AddUnoObject(*
this);
147 PivotTableDataProvider::~PivotTableDataProvider()
152 m_pDocument->RemoveUnoObject( *
this);
157 if (rHint.
GetId() == SfxHintId::Dying)
159 m_pDocument =
nullptr;
161 else if (m_pDocument)
163 if (
auto pDataPilotHint = dynamic_cast<const ScDataPilotModifiedHint*>(&rHint))
165 if (pDataPilotHint->GetName() == m_sPivotTableName)
167 m_bNeedsUpdate =
true;
168 for (uno::Reference<util::XModifyListener>
const & xListener : m_aValueListeners)
170 css::chart::ChartDataChangeEvent
aEvent(static_cast<cppu::OWeakObject*>(
this),
171 css::chart::ChartDataChangeType_ALL,
173 xListener->modified(aEvent);
180 sal_Bool SAL_CALL PivotTableDataProvider::createDataSourcePossible(
const uno::Sequence<beans::PropertyValue>& )
186 if (m_sPivotTableName.isEmpty())
190 return bool(pDPCollection->
GetByName(m_sPivotTableName));
193 uno::Reference<chart2::data::XDataSource> SAL_CALL
194 PivotTableDataProvider::createDataSource(
const uno::Sequence<beans::PropertyValue>& aArguments)
199 throw uno::RuntimeException();
201 bool bOrientCol =
true;
202 OUString aRangeRepresentation;
204 for (beans::PropertyValue
const & rProperty : aArguments)
206 if (rProperty.Name ==
"DataRowSource")
208 chart::ChartDataRowSource eSource = chart::ChartDataRowSource_COLUMNS;
209 if (!(rProperty.Value >>= eSource))
211 sal_Int32 nSource(0);
212 if (rProperty.Value >>= nSource)
213 eSource = chart::ChartDataRowSource(nSource);
215 bOrientCol = (eSource == chart::ChartDataRowSource_COLUMNS);
217 else if (rProperty.Name ==
"CellRangeRepresentation")
218 rProperty.Value >>= aRangeRepresentation;
221 uno::Reference<chart2::data::XDataSource> xResult;
223 if (aRangeRepresentation == lcl_identifierForCategories())
224 xResult = createCategoriesDataSource(bOrientCol);
226 xResult = createValuesDataSource();
231 uno::Reference<chart2::data::XLabeledDataSequence>
232 PivotTableDataProvider::newLabeledDataSequence()
234 uno::Reference<chart2::data::XLabeledDataSequence> xResult;
237 xResult.set(chart2::data::LabeledDataSequence::create(
m_xContext), uno::UNO_QUERY_THROW);
241 uno::Reference<chart2::data::XDataSource>
242 PivotTableDataProvider::createCategoriesDataSource(
bool bOrientationIsColumn)
245 collectPivotTableData();
247 uno::Reference<chart2::data::XDataSource> xDataSource;
248 std::vector<uno::Reference<chart2::data::XLabeledDataSequence>> aLabeledSequences;
250 std::vector<std::vector<ValueAndFormat>>
const & rCategoriesVector = bOrientationIsColumn ? m_aCategoriesColumnOrientation
251 : m_aCategoriesRowOrientation;
253 for (std::vector<ValueAndFormat>
const & rCategories : rCategoriesVector)
255 uno::Reference<chart2::data::XLabeledDataSequence> xResult = newLabeledDataSequence();
256 std::unique_ptr<PivotTableDataSequence> pSequence;
258 lcl_identifierForCategories(), rCategories));
259 pSequence->setRole(
"categories");
260 xResult->setValues(uno::Reference<chart2::data::XDataSequence>(pSequence.release()));
262 aLabeledSequences.push_back(xResult);
269 void PivotTableDataProvider::collectPivotTableData()
276 m_aCategoriesColumnOrientation.clear();
277 m_aCategoriesRowOrientation.clear();
279 m_aDataRowVector.clear();
280 m_aColumnFields.clear();
281 m_aRowFields.clear();
282 m_aPageFields.clear();
283 m_aDataFields.clear();
284 m_aFieldOutputDescriptionMap.clear();
286 uno::Reference<sheet::XDataPilotResults> xDPResults(pDPObject->
GetSource(), uno::UNO_QUERY);
287 if (!xDPResults.is())
289 const uno::Sequence<uno::Sequence<sheet::DataResult>> xDataResultsSequence = xDPResults->getResults();
292 rtl::math::setNan(&fNan);
294 std::unordered_set<size_t> aValidRowIndex;
296 size_t nRowIndex = 0;
297 for (uno::Sequence<sheet::DataResult>
const & xDataResults : xDataResultsSequence)
299 std::vector<ValueAndFormat> aRow;
300 bool bRowEmpty =
true;
302 for (sheet::DataResult
const & rDataResult : xDataResults)
304 if (rDataResult.Flags & css::sheet::DataResultFlags::SUBTOTAL)
306 if (rDataResult.Flags == 0 || rDataResult.Flags & css::sheet::DataResultFlags::HASDATA)
308 aRow.emplace_back(rDataResult.Flags ? rDataResult.Value : fNan, 0);
309 if (rDataResult.Flags != 0)
313 aValidRowIndex.insert(nRowIndex);
320 size_t nColumnIndex = 0;
323 if (nColumnIndex >= m_aDataRowVector.size())
324 m_aDataRowVector.resize(nColumnIndex + 1);
325 m_aDataRowVector[nColumnIndex].push_back(aValue);
332 uno::Reference<sheet::XDimensionsSupplier> xDimensionsSupplier(pDPObject->
GetSource());
333 uno::Reference<container::XIndexAccess> xDims =
new ScNameToIndexAccess(xDimensionsSupplier->getDimensions());
335 std::unordered_map<OUString, sal_Int32> aDataFieldNumberFormatMap;
336 std::vector<OUString> aDataFieldNamesVectors;
338 std::unordered_map<OUString, OUString> aDataFieldCaptionNames;
340 sheet::DataPilotFieldOrientation eDataFieldOrientation = sheet::DataPilotFieldOrientation_HIDDEN;
342 for (sal_Int32 nDim = 0; nDim < xDims->getCount(); nDim++)
344 uno::Reference<uno::XInterface> xDim(xDims->getByIndex(nDim), uno::UNO_QUERY);
345 uno::Reference<beans::XPropertySet> xDimProp(xDim, uno::UNO_QUERY);
346 uno::Reference<sheet::XHierarchiesSupplier> xDimSupp(xDim, uno::UNO_QUERY);
348 if (!xDimProp.is() || !xDimSupp.is())
351 sheet::DataPilotFieldOrientation eDimOrient =
353 sheet::DataPilotFieldOrientation_HIDDEN);
355 if (eDimOrient == sheet::DataPilotFieldOrientation_HIDDEN)
358 uno::Reference<container::XIndexAccess> xHierarchies =
new ScNameToIndexAccess(xDimSupp->getHierarchies());
360 if (nHierarchy >= xHierarchies->getCount())
363 uno::Reference<sheet::XLevelsSupplier> xLevelsSupplier(xHierarchies->getByIndex(nHierarchy),
366 if (!xLevelsSupplier.is())
369 uno::Reference<container::XIndexAccess> xLevels =
new ScNameToIndexAccess(xLevelsSupplier->getLevels());
371 for (
tools::Long nLevel = 0; nLevel < xLevels->getCount(); nLevel++)
373 uno::Reference<uno::XInterface> xLevel(xLevels->getByIndex(nLevel), uno::UNO_QUERY);
374 uno::Reference<container::XNamed> xLevelName(xLevel, uno::UNO_QUERY);
375 uno::Reference<sheet::XDataPilotMemberResults> xLevelResult(xLevel, uno::UNO_QUERY );
377 if (xLevelName.is() && xLevelResult.is())
386 case sheet::DataPilotFieldOrientation_COLUMN:
388 m_aColumnFields.emplace_back(xLevelName->getName(), nDim, nDimPos, bHasHiddenMember);
390 const uno::Sequence<sheet::MemberResult> aSequence = xLevelResult->getResults();
394 for (sheet::MemberResult
const & rMember : aSequence)
397 if (rMember.Flags & sheet::MemberResultFlags::SUBTOTAL ||
398 rMember.Flags & sheet::MemberResultFlags::GRANDTOTAL)
400 if (rMember.Flags & sheet::MemberResultFlags::HASMEMBER ||
401 rMember.Flags & sheet::MemberResultFlags::CONTINUE)
403 if (!(rMember.Flags & sheet::MemberResultFlags::CONTINUE))
405 sCaption = rMember.Caption;
406 sName = rMember.Name;
409 if (i >= m_aLabels.size())
410 m_aLabels.resize(i + 1);
413 m_aLabels[i].resize(nDimPos + 1);
419 aDataFieldNamesVectors.push_back(sName);
420 eDataFieldOrientation = sheet::DataPilotFieldOrientation_COLUMN;
422 aDataFieldCaptionNames[rMember.Name] = rMember.Caption;
430 case sheet::DataPilotFieldOrientation_ROW:
432 m_aRowFields.emplace_back(xLevelName->getName(), nDim, nDimPos, bHasHiddenMember);
434 const uno::Sequence<sheet::MemberResult> aSequence = xLevelResult->getResults();
437 size_t nEachIndex = 0;
438 std::unique_ptr<ValueAndFormat> pItem;
440 for (sheet::MemberResult
const & rMember : aSequence)
442 bool bFound = aValidRowIndex.find(nEachIndex) != aValidRowIndex.end();
446 bool bHasContinueFlag = rMember.Flags & sheet::MemberResultFlags::CONTINUE;
448 if (rMember.Flags & sheet::MemberResultFlags::HASMEMBER || bHasContinueFlag)
450 if (!bHasContinueFlag)
458 if (i >= m_aCategoriesRowOrientation.size())
459 m_aCategoriesRowOrientation.resize(i + 1);
462 m_aCategoriesColumnOrientation.resize(nDimPos + 1);
463 m_aCategoriesColumnOrientation[nDimPos].push_back(*pItem);
466 m_aCategoriesRowOrientation[i].resize(nDimPos + 1);
467 m_aCategoriesRowOrientation[i][nDimPos] = *pItem;
472 aDataFieldNamesVectors.push_back(rMember.Name);
473 eDataFieldOrientation = sheet::DataPilotFieldOrientation_ROW;
476 aDataFieldCaptionNames[rMember.Name] = rMember.Caption;
488 case sheet::DataPilotFieldOrientation_PAGE:
490 m_aPageFields.emplace_back(xLevelName->getName(), nDim, nDimPos, bHasHiddenMember);
493 OUString aFieldOutputDescription;
494 if (bHasHiddenMember)
496 std::vector<OUString> aMembers = lcl_getVisiblePageMembers(xLevel);
498 if (aMembers.size() == 1)
499 aFieldOutputDescription = aMembers[0];
501 aFieldOutputDescription =
ScResId(SCSTR_MULTIPLE);
505 aFieldOutputDescription =
ScResId(SCSTR_ALL);
507 m_aFieldOutputDescriptionMap[nDim] = aFieldOutputDescription;
511 case sheet::DataPilotFieldOrientation_DATA:
513 aDataFieldNumberFormatMap[xLevelName->getName()] = nNumberFormat;
514 m_aDataFields.emplace_back(xLevelName->getName(), nDim, nDimPos, bHasHiddenMember);
526 for (chart2::data::PivotTableFieldEntry& rDataFields : m_aDataFields)
528 rDataFields.Name = aDataFieldCaptionNames[rDataFields.Name];
532 if (eDataFieldOrientation == sheet::DataPilotFieldOrientation_ROW)
534 for (std::vector<ValueAndFormat> & rDataRow : m_aDataRowVector)
539 OUString
sName = aDataFieldNamesVectors[i];
540 sal_Int32 nNumberFormat = aDataFieldNumberFormatMap[sName];
541 rItem.m_nNumberFormat = nNumberFormat;
546 else if (eDataFieldOrientation == sheet::DataPilotFieldOrientation_COLUMN)
549 for (std::vector<ValueAndFormat> & rDataRow : m_aDataRowVector)
551 OUString
sName = aDataFieldNamesVectors[i];
552 sal_Int32 nNumberFormat = aDataFieldNumberFormatMap[sName];
555 rItem.m_nNumberFormat = nNumberFormat;
563 auto funcDimensionPositionSortCompare = [] (chart2::data::PivotTableFieldEntry
const & entry1,
564 chart2::data::PivotTableFieldEntry
const & entry2)
566 return entry1.DimensionPositionIndex < entry2.DimensionPositionIndex;
569 std::sort(m_aColumnFields.begin(), m_aColumnFields.end(), funcDimensionPositionSortCompare);
570 std::sort(m_aRowFields.begin(), m_aRowFields.end(), funcDimensionPositionSortCompare);
571 std::sort(m_aPageFields.begin(), m_aPageFields.end(), funcDimensionPositionSortCompare);
572 std::sort(m_aDataFields.begin(), m_aDataFields.end(), funcDimensionPositionSortCompare);
575 m_bNeedsUpdate =
false;
578 uno::Reference<chart2::data::XDataSequence>
579 PivotTableDataProvider::assignValuesToDataSequence(
size_t nIndex)
581 uno::Reference<chart2::data::XDataSequence> xDataSequence;
582 if (nIndex >= m_aDataRowVector.size())
583 return xDataSequence;
585 OUString sDataID = lcl_identifierForData(nIndex);
587 std::vector<ValueAndFormat>
const & rRowOfData = m_aDataRowVector[nIndex];
588 std::unique_ptr<PivotTableDataSequence> pSequence;
590 pSequence->setRole(
"values-y");
591 xDataSequence.set(pSequence.release());
592 return xDataSequence;
595 uno::Reference<chart2::data::XDataSequence>
596 PivotTableDataProvider::assignLabelsToDataSequence(
size_t nIndex)
598 uno::Reference<chart2::data::XDataSequence> xDataSequence;
600 OUString sLabelID = lcl_identifierForLabel(nIndex);
605 if (m_aLabels.empty())
607 aLabel =
ScResId(STR_PIVOT_TOTAL);
609 else if (nIndex < m_aLabels.size())
615 aLabel.append(rItem.m_aString);
620 aLabel.append(
" - ").append(rItem.m_aString);
625 std::vector<ValueAndFormat> aLabelVector {
ValueAndFormat(aLabel.makeStringAndClear()) };
627 std::unique_ptr<PivotTableDataSequence> pSequence;
629 sLabelID, aLabelVector));
630 pSequence->setRole(
"values-y");
631 xDataSequence.set(pSequence.release());
632 return xDataSequence;
635 css::uno::Reference<css::chart2::data::XDataSequence>
636 PivotTableDataProvider::assignFirstCategoriesToDataSequence()
638 uno::Reference<chart2::data::XDataSequence> xDataSequence;
640 if (m_aCategoriesColumnOrientation.empty())
641 return xDataSequence;
643 std::vector<ValueAndFormat>
const & rCategories = m_aCategoriesColumnOrientation.back();
645 std::unique_ptr<PivotTableDataSequence> pSequence;
647 lcl_identifierForCategories(), rCategories));
648 pSequence->setRole(
"categories");
649 xDataSequence.set(uno::Reference<chart2::data::XDataSequence>(pSequence.release()));
651 return xDataSequence;
654 uno::Reference<chart2::data::XDataSource>
655 PivotTableDataProvider::createValuesDataSource()
658 collectPivotTableData();
660 uno::Reference<chart2::data::XDataSource> xDataSource;
661 std::vector<uno::Reference<chart2::data::XLabeledDataSequence>> aLabeledSequences;
665 uno::Reference<chart2::data::XLabeledDataSequence> xResult = newLabeledDataSequence();
666 xResult->setValues(assignFirstCategoriesToDataSequence());
667 aLabeledSequences.push_back(xResult);
672 for (
size_t i = 0;
i < m_aDataRowVector.size(); ++
i)
674 uno::Reference<chart2::data::XLabeledDataSequence> xResult = newLabeledDataSequence();
675 xResult->setValues(assignValuesToDataSequence(
i));
676 xResult->setLabel(assignLabelsToDataSequence(
i));
677 aLabeledSequences.push_back(xResult);
686 uno::Sequence<beans::PropertyValue> SAL_CALL PivotTableDataProvider::detectArguments(
687 const uno::Reference<chart2::data::XDataSource> & xDataSource)
689 if (!m_pDocument ||!xDataSource.is())
690 return uno::Sequence<beans::PropertyValue>();
693 {
"CellRangeRepresentation",
uno::Any(OUString(
"PivotChart")) },
694 {
"DataRowSource",
uno::Any(chart::ChartDataRowSource_COLUMNS) },
695 {
"FirstCellAsLabel",
uno::Any(
false) },
700 sal_Bool SAL_CALL PivotTableDataProvider::createDataSequenceByRangeRepresentationPossible(
const OUString& )
705 uno::Reference<chart2::data::XDataSequence> SAL_CALL
706 PivotTableDataProvider::createDataSequenceByRangeRepresentation(
const OUString& )
708 uno::Reference<chart2::data::XDataSequence> xDataSequence;
709 return xDataSequence;
712 uno::Reference<chart2::data::XDataSequence> SAL_CALL
713 PivotTableDataProvider::createDataSequenceByValueArray(
const OUString& ,
716 return uno::Reference<chart2::data::XDataSequence>();
719 uno::Reference<sheet::XRangeSelection> SAL_CALL PivotTableDataProvider::getRangeSelection()
721 uno::Reference<sheet::XRangeSelection> xResult;
723 uno::Reference<frame::XModel> xModel(lcl_GetXModel(m_pDocument));
725 xResult.set(xModel->getCurrentController(), uno::UNO_QUERY);
732 uno::Sequence<chart2::data::PivotTableFieldEntry> PivotTableDataProvider::getColumnFields()
737 uno::Sequence<chart2::data::PivotTableFieldEntry> PivotTableDataProvider::getRowFields()
742 uno::Sequence<chart2::data::PivotTableFieldEntry> PivotTableDataProvider::getPageFields()
747 uno::Sequence<chart2::data::PivotTableFieldEntry> PivotTableDataProvider::getDataFields()
752 OUString PivotTableDataProvider::getPivotTableName()
754 return m_sPivotTableName;
757 void PivotTableDataProvider::setPivotTableName(
const OUString& sPivotTableName)
762 m_sPivotTableName = sPivotTableName;
767 if (m_sPivotTableName.isEmpty())
779 uno::Reference<chart2::data::XDataSequence>
780 PivotTableDataProvider::createDataSequenceOfValuesByIndex(sal_Int32 nIndex)
785 collectPivotTableData();
787 return assignValuesToDataSequence(
size_t(nIndex));
790 uno::Reference<css::chart2::data::XDataSequence>
791 PivotTableDataProvider::createDataSequenceOfLabelsByIndex(sal_Int32 nIndex)
796 collectPivotTableData();
798 return assignLabelsToDataSequence(
size_t(nIndex));
801 uno::Reference<css::chart2::data::XDataSequence>
802 PivotTableDataProvider::createDataSequenceOfCategories()
807 collectPivotTableData();
809 return assignFirstCategoriesToDataSequence();
812 OUString PivotTableDataProvider::getFieldOutputDescription(sal_Int32 nDimensionIndex)
814 if (nDimensionIndex < 0)
816 return m_aFieldOutputDescriptionMap[size_t(nDimensionIndex)];
821 void SAL_CALL PivotTableDataProvider::addModifyListener(
const uno::Reference< util::XModifyListener>& aListener)
825 m_aValueListeners.emplace_back(aListener);
828 void SAL_CALL PivotTableDataProvider::removeModifyListener(
const uno::Reference<util::XModifyListener>& aListener )
832 sal_uInt16
nCount = m_aValueListeners.size();
833 for (sal_uInt16
n = nCount;
n--;)
835 uno::Reference<util::XModifyListener>& rObject = m_aValueListeners[
n];
836 if (rObject == aListener)
838 m_aValueListeners.erase(m_aValueListeners.begin() +
n);
845 uno::Reference< beans::XPropertySetInfo> SAL_CALL
846 PivotTableDataProvider::getPropertySetInfo()
849 static uno::Reference<beans::XPropertySetInfo> aRef =
854 void SAL_CALL PivotTableDataProvider::setPropertyValue(
const OUString& rPropertyName,
const uno::Any& rValue)
857 throw beans::UnknownPropertyException(rPropertyName);
859 if (!(rValue >>= m_bIncludeHiddenCells))
860 throw lang::IllegalArgumentException();
863 uno::Any SAL_CALL PivotTableDataProvider::getPropertyValue(
const OUString& rPropertyName)
867 aRet <<= m_bIncludeHiddenCells;
871 aRet <<= m_pDocument->PastingDrawFromOtherDoc();
874 throw beans::UnknownPropertyException(rPropertyName);
878 void SAL_CALL PivotTableDataProvider::addPropertyChangeListener(
880 const uno::Reference<beans::XPropertyChangeListener>& )
882 OSL_FAIL(
"Not yet implemented");
885 void SAL_CALL PivotTableDataProvider::removePropertyChangeListener(
887 const uno::Reference<beans::XPropertyChangeListener>& )
889 OSL_FAIL(
"Not yet implemented");
892 void SAL_CALL PivotTableDataProvider::addVetoableChangeListener(
894 const uno::Reference<beans::XVetoableChangeListener>& )
896 OSL_FAIL(
"Not yet implemented");
899 void SAL_CALL PivotTableDataProvider::removeVetoableChangeListener(
901 const uno::Reference<beans::XVetoableChangeListener>& )
903 OSL_FAIL(
"Not yet implemented");
#define SC_UNONAME_INCLUDEHIDDENCELLS
static sal_Int32 GetLongProperty(const css::uno::Reference< css::beans::XPropertySet > &xProp, const OUString &rName)
#define SC_UNONAME_USE_INTERNAL_DATA_PROVIDER
static EnumT GetEnumProperty(const css::uno::Reference< css::beans::XPropertySet > &xProp, const OUString &rName, EnumT nDefault)
#define SC_UNO_DP_POSITION
static OUString GetStringProperty(const css::uno::Reference< css::beans::XPropertySet > &xProp, const OUString &rName, const OUString &rDefault)
ScDPObject * GetByName(std::u16string_view rName) const
#define SC_UNO_DP_LAYOUTNAME
css::uno::Sequence< css::beans::PropertyValue > InitPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
css::uno::Reference< css::sheet::XDimensionsSupplier > const & GetSource()
void Notify(ScModelObj &rModelObj, const ScRangeList &rChangeRanges, const OUString &rType=OUString("cell-change"), const css::uno::Sequence< css::beans::PropertyValue > &rProperties=css::uno::Sequence< css::beans::PropertyValue >())
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
static bool GetBoolProperty(const css::uno::Reference< css::beans::XPropertySet > &xProp, const OUString &rName, bool bDefault=false)
OUString ScResId(const char *pId)
css::uno::Type const & get()
#define SC_SIMPLE_SERVICE_INFO(ClassName, ClassNameAscii, ServiceAscii)
#define SC_UNO_DP_HAS_HIDDEN_MEMBER
#define SC_UNO_DP_ORIENTATION
#define SC_UNO_DP_USEDHIERARCHY
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
#define SC_UNO_DP_ISVISIBLE
SfxObjectShell * GetDocumentShell() const
Reference< XModel > xModel
#define SC_UNO_DP_ISDATALAYOUT
Reference< XComponentContext > m_xContext
#define SC_SERVICENAME_CHART_PIVOTTABLE_DATAPROVIDER
#define SC_UNO_DP_NUMBERFO