19 #include <document.hxx>
20 #include <unonames.hxx>
22 #include <globstr.hrc>
23 #include <strings.hrc>
34 #include <com/sun/star/chart2/data/LabeledDataSequence.hpp>
35 #include <com/sun/star/chart/ChartDataRowSource.hpp>
36 #include <com/sun/star/frame/XModel.hpp>
38 #include <com/sun/star/sheet/XDataPilotResults.hpp>
39 #include <com/sun/star/sheet/DataResultFlags.hpp>
41 #include <com/sun/star/sheet/XDimensionsSupplier.hpp>
42 #include <com/sun/star/sheet/XHierarchiesSupplier.hpp>
43 #include <com/sun/star/sheet/XLevelsSupplier.hpp>
44 #include <com/sun/star/sheet/XDataPilotMemberResults.hpp>
45 #include <com/sun/star/sheet/MemberResultFlags.hpp>
46 #include <com/sun/star/sheet/XMembersSupplier.hpp>
48 #include <com/sun/star/chart/ChartDataChangeEvent.hpp>
49 #include <com/sun/star/container/XNamed.hpp>
51 #include <unordered_map>
59 constexpr OUStringLiteral constIdCategories(u
"categories");
60 constexpr OUStringLiteral constIdLabel(u
"label");
61 constexpr OUStringLiteral constIdData(u
"data");
69 {
u"", 0, css::uno::Type(), 0, 0 }
71 return aDataProviderPropertyMap_Impl;
74 uno::Reference<frame::XModel> lcl_GetXModel(
const ScDocument * pDoc)
76 uno::Reference<frame::XModel>
xModel;
79 xModel.set(pObjSh->GetModel());
83 OUString lcl_identifierForData(sal_Int32 index)
85 return "PT@" + constIdData +
" " + OUString::number(index);
88 OUString lcl_identifierForLabel(sal_Int32 index)
90 return "PT@" + constIdLabel +
" " + OUString::number(index);
93 OUString lcl_identifierForCategories()
95 return "PT@" + constIdCategories;
98 std::vector<OUString> lcl_getVisiblePageMembers(
const uno::Reference<uno::XInterface> & xLevel)
100 std::vector<OUString> aResult;
104 uno::Reference<sheet::XMembersSupplier> xMembersSupplier(xLevel, uno::UNO_QUERY);
105 if (!xMembersSupplier.is())
108 uno::Reference<sheet::XMembersAccess> xMembersAccess = xMembersSupplier->getMembers();
109 if (!xMembersAccess.is())
112 const css::uno::Sequence<OUString> aMembersNames = xMembersAccess->getElementNames();
113 for (OUString
const & rMemberNames : aMembersNames)
115 uno::Reference<beans::XPropertySet> xProperties(xMembersAccess->getByName(rMemberNames), uno::UNO_QUERY);
116 if (!xProperties.is())
120 if (aCaption.isEmpty())
121 aCaption = rMemberNames;
126 aResult.push_back(aCaption);
140 , m_aPropSet(lcl_GetDataProviderPropertyMap())
141 , m_bIncludeHiddenCells(true)
142 , m_bNeedsUpdate(true)
143 , m_xContext(
comphelper::getProcessComponentContext())
145 rDoc.AddUnoObject(*
this);
148 PivotTableDataProvider::~PivotTableDataProvider()
153 m_pDocument->RemoveUnoObject( *
this);
158 if (rHint.
GetId() == SfxHintId::Dying)
160 m_pDocument =
nullptr;
162 else if (m_pDocument)
164 if (
auto pDataPilotHint = dynamic_cast<const ScDataPilotModifiedHint*>(&rHint))
166 if (pDataPilotHint->GetName() == m_sPivotTableName)
168 m_bNeedsUpdate =
true;
169 for (uno::Reference<util::XModifyListener>
const & xListener : m_aValueListeners)
171 css::chart::ChartDataChangeEvent
aEvent(static_cast<cppu::OWeakObject*>(
this),
172 css::chart::ChartDataChangeType_ALL,
174 xListener->modified(aEvent);
181 sal_Bool SAL_CALL PivotTableDataProvider::createDataSourcePossible(
const uno::Sequence<beans::PropertyValue>& )
187 if (m_sPivotTableName.isEmpty())
191 return bool(pDPCollection->
GetByName(m_sPivotTableName));
194 uno::Reference<chart2::data::XDataSource> SAL_CALL
195 PivotTableDataProvider::createDataSource(
const uno::Sequence<beans::PropertyValue>& aArguments)
200 throw uno::RuntimeException();
202 bool bOrientCol =
true;
203 OUString aRangeRepresentation;
205 for (beans::PropertyValue
const & rProperty : aArguments)
207 if (rProperty.Name ==
"DataRowSource")
209 chart::ChartDataRowSource eSource = chart::ChartDataRowSource_COLUMNS;
210 if (!(rProperty.Value >>= eSource))
212 sal_Int32 nSource(0);
213 if (rProperty.Value >>= nSource)
214 eSource = chart::ChartDataRowSource(nSource);
216 bOrientCol = (eSource == chart::ChartDataRowSource_COLUMNS);
218 else if (rProperty.Name ==
"CellRangeRepresentation")
219 rProperty.Value >>= aRangeRepresentation;
222 uno::Reference<chart2::data::XDataSource> xResult;
224 if (aRangeRepresentation == lcl_identifierForCategories())
225 xResult = createCategoriesDataSource(bOrientCol);
227 xResult = createValuesDataSource();
232 uno::Reference<chart2::data::XLabeledDataSequence>
233 PivotTableDataProvider::newLabeledDataSequence()
235 uno::Reference<chart2::data::XLabeledDataSequence> xResult;
238 xResult.set(chart2::data::LabeledDataSequence::create(
m_xContext), uno::UNO_QUERY_THROW);
242 uno::Reference<chart2::data::XDataSource>
243 PivotTableDataProvider::createCategoriesDataSource(
bool bOrientationIsColumn)
246 collectPivotTableData();
248 uno::Reference<chart2::data::XDataSource> xDataSource;
249 std::vector<uno::Reference<chart2::data::XLabeledDataSequence>> aLabeledSequences;
251 std::vector<std::vector<ValueAndFormat>>
const & rCategoriesVector = bOrientationIsColumn ? m_aCategoriesColumnOrientation
252 : m_aCategoriesRowOrientation;
254 for (std::vector<ValueAndFormat>
const & rCategories : rCategoriesVector)
256 uno::Reference<chart2::data::XLabeledDataSequence> xResult = newLabeledDataSequence();
258 lcl_identifierForCategories(), std::vector(rCategories)));
259 pSequence->setRole(
"categories");
260 xResult->setValues(uno::Reference<chart2::data::XDataSequence>(pSequence));
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();
291 std::unordered_set<size_t> aValidRowIndex;
293 size_t nRowIndex = 0;
294 for (uno::Sequence<sheet::DataResult>
const & xDataResults : xDataResultsSequence)
296 std::vector<ValueAndFormat> aRow;
297 bool bRowEmpty =
true;
299 for (sheet::DataResult
const & rDataResult : xDataResults)
301 if (rDataResult.Flags & css::sheet::DataResultFlags::SUBTOTAL)
303 if (rDataResult.Flags == 0 || rDataResult.Flags & css::sheet::DataResultFlags::HASDATA)
305 aRow.emplace_back(rDataResult.Flags ? rDataResult.Value
306 : std::numeric_limits<double>::quiet_NaN(), 0);
307 if (rDataResult.Flags != 0)
311 aValidRowIndex.insert(nRowIndex);
318 size_t nColumnIndex = 0;
321 if (nColumnIndex >= m_aDataRowVector.size())
322 m_aDataRowVector.resize(nColumnIndex + 1);
323 m_aDataRowVector[nColumnIndex].push_back(aValue);
330 uno::Reference<sheet::XDimensionsSupplier> xDimensionsSupplier(pDPObject->
GetSource());
331 uno::Reference<container::XIndexAccess> xDims =
new ScNameToIndexAccess(xDimensionsSupplier->getDimensions());
333 std::unordered_map<OUString, sal_Int32> aDataFieldNumberFormatMap;
334 std::vector<OUString> aDataFieldNamesVectors;
336 std::unordered_map<OUString, OUString> aDataFieldCaptionNames;
338 sheet::DataPilotFieldOrientation eDataFieldOrientation = sheet::DataPilotFieldOrientation_HIDDEN;
340 for (sal_Int32 nDim = 0; nDim < xDims->getCount(); nDim++)
342 uno::Reference<uno::XInterface> xDim(xDims->getByIndex(nDim), uno::UNO_QUERY);
343 uno::Reference<beans::XPropertySet> xDimProp(xDim, uno::UNO_QUERY);
344 uno::Reference<sheet::XHierarchiesSupplier> xDimSupp(xDim, uno::UNO_QUERY);
346 if (!xDimProp.is() || !xDimSupp.is())
349 sheet::DataPilotFieldOrientation eDimOrient =
351 sheet::DataPilotFieldOrientation_HIDDEN);
353 if (eDimOrient == sheet::DataPilotFieldOrientation_HIDDEN)
356 uno::Reference<container::XIndexAccess> xHierarchies =
new ScNameToIndexAccess(xDimSupp->getHierarchies());
358 if (nHierarchy >= xHierarchies->getCount())
361 uno::Reference<sheet::XLevelsSupplier> xLevelsSupplier(xHierarchies->getByIndex(nHierarchy),
364 if (!xLevelsSupplier.is())
367 uno::Reference<container::XIndexAccess> xLevels =
new ScNameToIndexAccess(xLevelsSupplier->getLevels());
369 for (
tools::Long nLevel = 0; nLevel < xLevels->getCount(); nLevel++)
371 uno::Reference<uno::XInterface> xLevel(xLevels->getByIndex(nLevel), uno::UNO_QUERY);
372 uno::Reference<container::XNamed> xLevelName(xLevel, uno::UNO_QUERY);
373 uno::Reference<sheet::XDataPilotMemberResults> xLevelResult(xLevel, uno::UNO_QUERY );
375 if (xLevelName.is() && xLevelResult.is())
384 case sheet::DataPilotFieldOrientation_COLUMN:
386 m_aColumnFields.emplace_back(xLevelName->getName(), nDim, nDimPos, bHasHiddenMember);
388 const uno::Sequence<sheet::MemberResult> aSequence = xLevelResult->getResults();
392 for (sheet::MemberResult
const & rMember : aSequence)
395 if (rMember.Flags & sheet::MemberResultFlags::SUBTOTAL ||
396 rMember.Flags & sheet::MemberResultFlags::GRANDTOTAL)
398 if (rMember.Flags & sheet::MemberResultFlags::HASMEMBER ||
399 rMember.Flags & sheet::MemberResultFlags::CONTINUE)
401 if (!(rMember.Flags & sheet::MemberResultFlags::CONTINUE))
403 sCaption = rMember.Caption;
404 sName = rMember.Name;
407 if (i >= m_aLabels.size())
408 m_aLabels.resize(i + 1);
411 m_aLabels[i].resize(nDimPos + 1);
417 aDataFieldNamesVectors.push_back(sName);
418 eDataFieldOrientation = sheet::DataPilotFieldOrientation_COLUMN;
420 aDataFieldCaptionNames[rMember.Name] = rMember.Caption;
428 case sheet::DataPilotFieldOrientation_ROW:
430 m_aRowFields.emplace_back(xLevelName->getName(), nDim, nDimPos, bHasHiddenMember);
432 const uno::Sequence<sheet::MemberResult> aSequence = xLevelResult->getResults();
435 size_t nEachIndex = 0;
436 std::unique_ptr<ValueAndFormat> pItem;
438 for (sheet::MemberResult
const & rMember : aSequence)
440 bool bFound = aValidRowIndex.find(nEachIndex) != aValidRowIndex.end();
444 bool bHasContinueFlag = rMember.Flags & sheet::MemberResultFlags::CONTINUE;
446 if (rMember.Flags & sheet::MemberResultFlags::HASMEMBER || bHasContinueFlag)
448 if (!bHasContinueFlag)
456 if (i >= m_aCategoriesRowOrientation.size())
457 m_aCategoriesRowOrientation.resize(i + 1);
460 m_aCategoriesColumnOrientation.resize(nDimPos + 1);
461 m_aCategoriesColumnOrientation[nDimPos].push_back(*pItem);
464 m_aCategoriesRowOrientation[i].resize(nDimPos + 1);
465 m_aCategoriesRowOrientation[i][nDimPos] = *pItem;
470 aDataFieldNamesVectors.push_back(rMember.Name);
471 eDataFieldOrientation = sheet::DataPilotFieldOrientation_ROW;
474 aDataFieldCaptionNames[rMember.Name] = rMember.Caption;
486 case sheet::DataPilotFieldOrientation_PAGE:
488 m_aPageFields.emplace_back(xLevelName->getName(), nDim, nDimPos, bHasHiddenMember);
491 OUString aFieldOutputDescription;
492 if (bHasHiddenMember)
494 std::vector<OUString> aMembers = lcl_getVisiblePageMembers(xLevel);
496 if (aMembers.size() == 1)
497 aFieldOutputDescription = aMembers[0];
499 aFieldOutputDescription =
ScResId(SCSTR_MULTIPLE);
503 aFieldOutputDescription =
ScResId(SCSTR_ALL);
505 m_aFieldOutputDescriptionMap[nDim] = aFieldOutputDescription;
509 case sheet::DataPilotFieldOrientation_DATA:
511 aDataFieldNumberFormatMap[xLevelName->getName()] = nNumberFormat;
512 m_aDataFields.emplace_back(xLevelName->getName(), nDim, nDimPos, bHasHiddenMember);
524 for (chart2::data::PivotTableFieldEntry& rDataFields : m_aDataFields)
526 rDataFields.Name = aDataFieldCaptionNames[rDataFields.Name];
530 if (eDataFieldOrientation == sheet::DataPilotFieldOrientation_ROW)
532 for (std::vector<ValueAndFormat> & rDataRow : m_aDataRowVector)
537 OUString
sName = aDataFieldNamesVectors[i];
538 sal_Int32 nNumberFormat = aDataFieldNumberFormatMap[sName];
539 rItem.m_nNumberFormat = nNumberFormat;
544 else if (eDataFieldOrientation == sheet::DataPilotFieldOrientation_COLUMN)
547 for (std::vector<ValueAndFormat> & rDataRow : m_aDataRowVector)
549 OUString
sName = aDataFieldNamesVectors[i];
550 sal_Int32 nNumberFormat = aDataFieldNumberFormatMap[sName];
553 rItem.m_nNumberFormat = nNumberFormat;
561 auto funcDimensionPositionSortCompare = [] (chart2::data::PivotTableFieldEntry
const & entry1,
562 chart2::data::PivotTableFieldEntry
const & entry2)
564 return entry1.DimensionPositionIndex < entry2.DimensionPositionIndex;
567 std::sort(m_aColumnFields.begin(), m_aColumnFields.end(), funcDimensionPositionSortCompare);
568 std::sort(m_aRowFields.begin(), m_aRowFields.end(), funcDimensionPositionSortCompare);
569 std::sort(m_aPageFields.begin(), m_aPageFields.end(), funcDimensionPositionSortCompare);
570 std::sort(m_aDataFields.begin(), m_aDataFields.end(), funcDimensionPositionSortCompare);
573 m_bNeedsUpdate =
false;
576 uno::Reference<chart2::data::XDataSequence>
577 PivotTableDataProvider::assignValuesToDataSequence(
size_t nIndex)
579 uno::Reference<chart2::data::XDataSequence> xDataSequence;
580 if (nIndex >= m_aDataRowVector.size())
581 return xDataSequence;
583 OUString sDataID = lcl_identifierForData(nIndex);
585 std::vector<ValueAndFormat>
const & rRowOfData = m_aDataRowVector[nIndex];
587 pSequence->setRole(
"values-y");
588 xDataSequence = pSequence;
589 return xDataSequence;
592 uno::Reference<chart2::data::XDataSequence>
593 PivotTableDataProvider::assignLabelsToDataSequence(
size_t nIndex)
595 uno::Reference<chart2::data::XDataSequence> xDataSequence;
597 OUString sLabelID = lcl_identifierForLabel(nIndex);
602 if (m_aLabels.empty())
604 aLabel =
ScResId(STR_PIVOT_TOTAL);
606 else if (nIndex < m_aLabels.size())
612 aLabel.append(rItem.m_aString);
617 aLabel.append(
" - " + rItem.m_aString);
622 std::vector<ValueAndFormat> aLabelVector {
ValueAndFormat(aLabel.makeStringAndClear()) };
625 sLabelID, std::move(aLabelVector)));
626 pSequence->setRole(
"values-y");
627 xDataSequence = pSequence;
628 return xDataSequence;
631 css::uno::Reference<css::chart2::data::XDataSequence>
632 PivotTableDataProvider::assignFirstCategoriesToDataSequence()
634 uno::Reference<chart2::data::XDataSequence> xDataSequence;
636 if (m_aCategoriesColumnOrientation.empty())
637 return xDataSequence;
639 std::vector<ValueAndFormat>
const & rCategories = m_aCategoriesColumnOrientation.back();
642 lcl_identifierForCategories(), std::vector(rCategories)));
643 pSequence->setRole(
"categories");
644 xDataSequence = pSequence;
646 return xDataSequence;
649 uno::Reference<chart2::data::XDataSource>
650 PivotTableDataProvider::createValuesDataSource()
653 collectPivotTableData();
655 uno::Reference<chart2::data::XDataSource> xDataSource;
656 std::vector<uno::Reference<chart2::data::XLabeledDataSequence>> aLabeledSequences;
660 uno::Reference<chart2::data::XLabeledDataSequence> xResult = newLabeledDataSequence();
661 xResult->setValues(assignFirstCategoriesToDataSequence());
662 aLabeledSequences.push_back(xResult);
667 for (
size_t i = 0;
i < m_aDataRowVector.size(); ++
i)
669 uno::Reference<chart2::data::XLabeledDataSequence> xResult = newLabeledDataSequence();
670 xResult->setValues(assignValuesToDataSequence(
i));
671 xResult->setLabel(assignLabelsToDataSequence(
i));
672 aLabeledSequences.push_back(xResult);
681 uno::Sequence<beans::PropertyValue> SAL_CALL PivotTableDataProvider::detectArguments(
682 const uno::Reference<chart2::data::XDataSource> & xDataSource)
684 if (!m_pDocument ||!xDataSource.is())
685 return uno::Sequence<beans::PropertyValue>();
688 {
"CellRangeRepresentation",
uno::Any(OUString(
"PivotChart")) },
689 {
"DataRowSource",
uno::Any(chart::ChartDataRowSource_COLUMNS) },
690 {
"FirstCellAsLabel",
uno::Any(
false) },
695 sal_Bool SAL_CALL PivotTableDataProvider::createDataSequenceByRangeRepresentationPossible(
const OUString& )
700 uno::Reference<chart2::data::XDataSequence> SAL_CALL
701 PivotTableDataProvider::createDataSequenceByRangeRepresentation(
const OUString& )
703 uno::Reference<chart2::data::XDataSequence> xDataSequence;
704 return xDataSequence;
707 uno::Reference<chart2::data::XDataSequence> SAL_CALL
708 PivotTableDataProvider::createDataSequenceByValueArray(
const OUString& ,
712 return uno::Reference<chart2::data::XDataSequence>();
715 uno::Reference<sheet::XRangeSelection> SAL_CALL PivotTableDataProvider::getRangeSelection()
717 uno::Reference<sheet::XRangeSelection> xResult;
719 uno::Reference<frame::XModel> xModel(lcl_GetXModel(m_pDocument));
721 xResult.set(xModel->getCurrentController(), uno::UNO_QUERY);
728 uno::Sequence<chart2::data::PivotTableFieldEntry> PivotTableDataProvider::getColumnFields()
733 uno::Sequence<chart2::data::PivotTableFieldEntry> PivotTableDataProvider::getRowFields()
738 uno::Sequence<chart2::data::PivotTableFieldEntry> PivotTableDataProvider::getPageFields()
743 uno::Sequence<chart2::data::PivotTableFieldEntry> PivotTableDataProvider::getDataFields()
748 OUString PivotTableDataProvider::getPivotTableName()
750 return m_sPivotTableName;
753 void PivotTableDataProvider::setPivotTableName(
const OUString& sPivotTableName)
758 m_sPivotTableName = sPivotTableName;
763 if (m_sPivotTableName.isEmpty())
775 uno::Reference<chart2::data::XDataSequence>
776 PivotTableDataProvider::createDataSequenceOfValuesByIndex(sal_Int32 nIndex)
781 collectPivotTableData();
783 return assignValuesToDataSequence(
size_t(nIndex));
786 uno::Reference<css::chart2::data::XDataSequence>
787 PivotTableDataProvider::createDataSequenceOfLabelsByIndex(sal_Int32 nIndex)
792 collectPivotTableData();
794 return assignLabelsToDataSequence(
size_t(nIndex));
797 uno::Reference<css::chart2::data::XDataSequence>
798 PivotTableDataProvider::createDataSequenceOfCategories()
803 collectPivotTableData();
805 return assignFirstCategoriesToDataSequence();
808 OUString PivotTableDataProvider::getFieldOutputDescription(sal_Int32 nDimensionIndex)
810 if (nDimensionIndex < 0)
812 return m_aFieldOutputDescriptionMap[size_t(nDimensionIndex)];
817 void SAL_CALL PivotTableDataProvider::addModifyListener(
const uno::Reference< util::XModifyListener>& aListener)
821 m_aValueListeners.emplace_back(aListener);
824 void SAL_CALL PivotTableDataProvider::removeModifyListener(
const uno::Reference<util::XModifyListener>& aListener )
828 sal_uInt16
nCount = m_aValueListeners.size();
829 for (sal_uInt16
n = nCount;
n--;)
831 uno::Reference<util::XModifyListener>& rObject = m_aValueListeners[
n];
832 if (rObject == aListener)
834 m_aValueListeners.erase(m_aValueListeners.begin() +
n);
841 uno::Reference< beans::XPropertySetInfo> SAL_CALL
842 PivotTableDataProvider::getPropertySetInfo()
845 static uno::Reference<beans::XPropertySetInfo> aRef =
850 void SAL_CALL PivotTableDataProvider::setPropertyValue(
const OUString& rPropertyName,
const uno::Any& rValue)
853 throw beans::UnknownPropertyException(rPropertyName);
855 if (!(rValue >>= m_bIncludeHiddenCells))
856 throw lang::IllegalArgumentException();
859 uno::Any SAL_CALL PivotTableDataProvider::getPropertyValue(
const OUString& rPropertyName)
863 aRet <<= m_bIncludeHiddenCells;
867 aRet <<= m_pDocument->PastingDrawFromOtherDoc();
870 throw beans::UnknownPropertyException(rPropertyName);
874 void SAL_CALL PivotTableDataProvider::addPropertyChangeListener(
876 const uno::Reference<beans::XPropertyChangeListener>& )
878 OSL_FAIL(
"Not yet implemented");
881 void SAL_CALL PivotTableDataProvider::removePropertyChangeListener(
883 const uno::Reference<beans::XPropertyChangeListener>& )
885 OSL_FAIL(
"Not yet implemented");
888 void SAL_CALL PivotTableDataProvider::addVetoableChangeListener(
890 const uno::Reference<beans::XVetoableChangeListener>& )
892 OSL_FAIL(
"Not yet implemented");
895 void SAL_CALL PivotTableDataProvider::removeVetoableChangeListener(
897 const uno::Reference<beans::XVetoableChangeListener>& )
899 OSL_FAIL(
"Not yet implemented");
#define SC_UNONAME_INCLUDEHIDDENCELLS
OUString ScResId(TranslateId aId)
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 >())
CAUTION! The following defines must be in the same namespace as the respective type.
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)
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
constexpr OUStringLiteral SC_SERVICENAME_CHART_PIVOTTABLE_DATAPROVIDER
#define SC_UNO_DP_NUMBERFO