LibreOffice Module sc (master)  1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
ScDPObject Class Reference

#include <dpobject.hxx>

Collaboration diagram for ScDPObject:

Public Member Functions

 ScDPObject (ScDocument *pD)
 ScDPObject (const ScDPObject &r)
 ~ScDPObject ()
ScDPObjectoperator= (const ScDPObject &r)
void EnableGetPivotData (bool b)
void SetAllowMove (bool bSet)
void InvalidateData ()
void Clear ()
void ClearTableData ()
void ReloadGroupTableData ()
void Output (const ScAddress &rPos)
ScRange GetNewOutputRange (bool &rOverflow)
ScRange GetOutputRangeByType (sal_Int32 nType)
ScRange GetOutputRangeByType (sal_Int32 nType) const
void SetSaveData (const ScDPSaveData &rData)
ScDPSaveDataGetSaveData () const
void SetOutRange (const ScRange &rRange)
const ScRangeGetOutRange () const
void SetHeaderLayout (bool bUseGrid)
bool GetHeaderLayout () const
void SetSheetDesc (const ScSheetSourceDesc &rDesc)
void SetImportDesc (const ScImportSourceDesc &rDesc)
void SetServiceData (const ScDPServiceDesc &rDesc)
void WriteSourceDataTo (ScDPObject &rDest) const
void WriteTempDataTo (ScDPObject &rDest) const
const ScSheetSourceDescGetSheetDesc () const
const ScImportSourceDescGetImportSourceDesc () const
const ScDPServiceDescGetDPServiceDesc () const
css::uno::Reference< css::sheet::XDimensionsSupplier > const & GetSource ()
bool IsSheetData () const
bool IsImportData () const
bool IsServiceData () const
void SetName (const OUString &rNew)
const OUString & GetName () const
void SetTag (const OUString &rNew)
const OUString & GetTag () const
bool IsDataDescriptionCell (const ScAddress &rPos)
 Data description cell displays the description of a data dimension if and only if there is only one data dimension. More...
bool IsDimNameInUse (std::u16string_view rName) const
OUString GetDimName (tools::Long nDim, bool &rIsDataLayout, sal_Int32 *pFlags=nullptr)
bool IsDuplicated (tools::Long nDim)
tools::Long GetDimCount ()
void GetHeaderPositionData (const ScAddress &rPos, css::sheet::DataPilotTableHeaderData &rData)
tools::Long GetHeaderDim (const ScAddress &rPos, css::sheet::DataPilotFieldOrientation &rOrient)
bool GetHeaderDrag (const ScAddress &rPos, bool bMouseLeft, bool bMouseTop, tools::Long nDragDim, tools::Rectangle &rPosRect, css::sheet::DataPilotFieldOrientation &rOrient, tools::Long &rDimPos)
bool IsFilterButton (const ScAddress &rPos)
OUString GetFormattedString (std::u16string_view rDimName, const double fValue)
double GetPivotData (const OUString &rDataFieldName, std::vector< css::sheet::DataPilotFieldFilter > &rFilters)
bool ParseFilters (OUString &rDataFieldName, std::vector< css::sheet::DataPilotFieldFilter > &rFilters, std::vector< sal_Int16 > &rFilterFuncs, std::u16string_view rFilterList)
void GetMemberResultNames (ScDPUniqueStringSet &rNames, tools::Long nDimension)
void ToggleDetails (const css::sheet::DataPilotTableHeaderData &rElemDesc, ScDPObject *pDestObj)
void FillOldParam (ScPivotParam &rParam) const
void FillLabelData (sal_Int32 nDim, ScDPLabelData &Labels)
void FillLabelData (ScPivotParam &rParam)
bool GetHierarchiesNA (sal_Int32 nDim, css::uno::Reference< css::container::XNameAccess > &xHiers)
void GetHierarchies (sal_Int32 nDim, css::uno::Sequence< OUString > &rHiers)
sal_Int32 GetUsedHierarchy (sal_Int32 nDim)
bool GetMembersNA (sal_Int32 nDim, css::uno::Reference< css::sheet::XMembersAccess > &xMembers)
bool GetMembersNA (sal_Int32 nDim, sal_Int32 nHier, css::uno::Reference< css::sheet::XMembersAccess > &xMembers)
bool GetMemberNames (sal_Int32 nDim, css::uno::Sequence< OUString > &rNames)
bool GetMembers (sal_Int32 nDim, sal_Int32 nHier,::std::vector< ScDPLabelData::Member > &rMembers)
void UpdateReference (UpdateRefMode eUpdateRefMode, const ScRange &r, SCCOL nDx, SCROW nDy, SCTAB nDz)
bool RefsEqual (const ScDPObject &r) const
void WriteRefsTo (ScDPObject &r) const
void GetPositionData (const ScAddress &rPos, css::sheet::DataPilotTablePositionData &rPosData)
bool GetDataFieldPositionData (const ScAddress &rPos, css::uno::Sequence< css::sheet::DataPilotFieldFilter > &rFilters)
void GetDrillDownData (const ScAddress &rPos, css::uno::Sequence< css::uno::Sequence< css::uno::Any > > &rTableData)
void RefreshAfterLoad ()
void BuildAllDimensionMembers ()
bool SyncAllDimensionMembers ()
 Remove in the save data entries for members that don't exist anymore. More...
void PutInteropGrabBag (std::map< OUString, css::uno::Any > &&val)
std::pair< bool, css::uno::Any > GetInteropGrabBagValue (const OUString &sName) const
void Dump () const
void DumpCache () const

Static Public Member Functions

static bool HasRegisteredSources ()
static std::vector< OUString > GetRegisteredSources ()
static css::uno::Reference< css::sheet::XDimensionsSupplier > CreateSource (const ScDPServiceDesc &rDesc)
static void ConvertOrientation (ScDPSaveData &rSaveData, const ScPivotFieldVector &rFields, css::sheet::DataPilotFieldOrientation nOrient, const css::uno::Reference< css::sheet::XDimensionsSupplier > &xSource, const ScDPLabelDataVector &rLabels, const ScPivotFieldVector *pRefColFields=nullptr, const ScPivotFieldVector *pRefRowFields=nullptr, const ScPivotFieldVector *pRefPageFields=nullptr)
static bool IsOrientationAllowed (css::sheet::DataPilotFieldOrientation nOrient, sal_Int32 nDimFlags)

Private Member Functions

SAL_DLLPRIVATE ScDPTableDataGetTableData ()
SAL_DLLPRIVATE void CreateObjects ()
SAL_DLLPRIVATE void CreateOutput ()
SAL_DLLPRIVATE void ClearSource ()
SAL_DLLPRIVATE void FillLabelDataForDimension (const css::uno::Reference< css::container::XIndexAccess > &xDims, sal_Int32 nDim, ScDPLabelData &rLabelData)

Private Attributes

std::unique_ptr< ScDPSaveDatapSaveData
OUString aTableName
OUString aTableTag
ScRange aOutRange
std::unique_ptr< ScSheetSourceDescpSheetDesc
std::unique_ptr< ScImportSourceDescpImpDesc
std::unique_ptr< ScDPServiceDescpServDesc
std::shared_ptr< ScDPTableDatampTableData
css::uno::Reference< css::sheet::XDimensionsSupplier > xSource
std::unique_ptr< ScDPOutputpOutput
std::map< OUString, css::uno::Any > maInteropGrabBag
sal_Int32 nHeaderRows
bool mbHeaderLayout:1
bool bAllowMove:1
bool bSettingsChanged:1
bool mbEnableGetPivotData:1

Detailed Description

Definition at line 83 of file dpobject.hxx.

Constructor & Destructor Documentation

ScDPObject::ScDPObject ( ScDocument pD)

Definition at line 310 of file dpobject.cxx.

ScDPObject::ScDPObject ( const ScDPObject r)

Definition at line 320 of file dpobject.cxx.

References pImpDesc, pSaveData, pServDesc, and pSheetDesc.

ScDPObject::~ScDPObject ( )

Definition at line 343 of file dpobject.cxx.

References Clear().

Member Function Documentation

void ScDPObject::BuildAllDimensionMembers ( )
void ScDPObject::Clear ( )

Definition at line 790 of file dpobject.cxx.

References ClearTableData(), maInteropGrabBag, pImpDesc, pOutput, pSaveData, pServDesc, and pSheetDesc.

Referenced by operator=(), and ~ScDPObject().

void ScDPObject::ClearSource ( )

Definition at line 857 of file dpobject.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, and xSource.

Referenced by ClearTableData(), and ReloadGroupTableData().

void ScDPObject::ClearTableData ( )

Definition at line 801 of file dpobject.cxx.

References ClearSource(), and mpTableData.

Referenced by Clear(), SetImportDesc(), SetServiceData(), and SetSheetDesc().

void ScDPObject::ConvertOrientation ( ScDPSaveData rSaveData,
const ScPivotFieldVector rFields,
css::sheet::DataPilotFieldOrientation  nOrient,
const css::uno::Reference< css::sheet::XDimensionsSupplier > &  xSource,
const ScDPLabelDataVector rLabels,
const ScPivotFieldVector pRefColFields = nullptr,
const ScPivotFieldVector pRefRowFields = nullptr,
const ScPivotFieldVector pRefPageFields = nullptr 
void ScDPObject::CreateObjects ( )
void ScDPObject::CreateOutput ( )
uno::Reference< sheet::XDimensionsSupplier > ScDPObject::CreateSource ( const ScDPServiceDesc rDesc)
void ScDPObject::Dump ( ) const
void ScDPObject::DumpCache ( ) const
void ScDPObject::EnableGetPivotData ( bool  b)

Definition at line 377 of file dpobject.cxx.

References mbEnableGetPivotData.

void ScDPObject::FillLabelData ( sal_Int32  nDim,
ScDPLabelData Labels 
void ScDPObject::FillLabelData ( ScPivotParam rParam)
void ScDPObject::FillLabelDataForDimension ( const css::uno::Reference< css::container::XIndexAccess > &  xDims,
sal_Int32  nDim,
ScDPLabelData rLabelData 
void ScDPObject::FillOldParam ( ScPivotParam rParam) const
bool ScDPObject::GetDataFieldPositionData ( const ScAddress rPos,
css::uno::Sequence< css::sheet::DataPilotFieldFilter > &  rFilters 
tools::Long ScDPObject::GetDimCount ( )

Definition at line 1276 of file dpobject.cxx.

References xSource.

Referenced by lcl_GetObjectIndex(), and ScDPShowDetailDlg::ScDPShowDetailDlg().

OUString ScDPObject::GetDimName ( tools::Long  nDim,
bool &  rIsDataLayout,
sal_Int32 *  pFlags = nullptr 
const ScDPServiceDesc* ScDPObject::GetDPServiceDesc ( ) const
void ScDPObject::GetDrillDownData ( const ScAddress rPos,
css::uno::Sequence< css::uno::Sequence< css::uno::Any > > &  rTableData 

Definition at line 1159 of file dpobject.cxx.

References CreateOutput(), GetDataFieldPositionData(), and xSource.

Referenced by ScDataPilotTableObj::getDrillDownData().

OUString ScDPObject::GetFormattedString ( std::u16string_view  rDimName,
const double  fValue 
tools::Long ScDPObject::GetHeaderDim ( const ScAddress rPos,
css::sheet::DataPilotFieldOrientation &  rOrient 
bool ScDPObject::GetHeaderDrag ( const ScAddress rPos,
bool  bMouseLeft,
bool  bMouseTop,
tools::Long  nDragDim,
tools::Rectangle rPosRect,
css::sheet::DataPilotFieldOrientation &  rOrient,
tools::Long rDimPos 

Definition at line 1415 of file dpobject.cxx.

References CreateOutput(), and pOutput.

bool ScDPObject::GetHeaderLayout ( ) const
void ScDPObject::GetHeaderPositionData ( const ScAddress rPos,
css::sheet::DataPilotTableHeaderData &  rData 
void ScDPObject::GetHierarchies ( sal_Int32  nDim,
css::uno::Sequence< OUString > &  rHiers 

Definition at line 2491 of file dpobject.cxx.

References GetHierarchiesNA().

Referenced by FillLabelDataForDimension().

bool ScDPObject::GetHierarchiesNA ( sal_Int32  nDim,
css::uno::Reference< css::container::XNameAccess > &  xHiers 

Definition at line 2474 of file dpobject.cxx.

References GetSource().

Referenced by GetHierarchies().

const ScImportSourceDesc* ScDPObject::GetImportSourceDesc ( ) const
std::pair<bool, css::uno::Any> ScDPObject::GetInteropGrabBagValue ( const OUString &  sName) const

Definition at line 266 of file dpobject.hxx.

Referenced by XclExpXmlPivotTables::SavePivotTableXml().

bool ScDPObject::GetMemberNames ( sal_Int32  nDim,
css::uno::Sequence< OUString > &  rNames 

Definition at line 997 of file dpobject.cxx.

References GetMembers(), GetUsedHierarchy(), i, maName, and n.

Referenced by ScDBFunc::DataPilotMove().

void ScDPObject::GetMemberResultNames ( ScDPUniqueStringSet rNames,
tools::Long  nDimension 

Definition at line 1423 of file dpobject.cxx.

References CreateOutput(), and pOutput.

Referenced by ScDBFunc::SetDataPilotDetails(), and ScDBFunc::UngroupDataPilot().

bool ScDPObject::GetMembers ( sal_Int32  nDim,
sal_Int32  nHier,
::std::vector< ScDPLabelData::Member > &  rMembers 
bool ScDPObject::GetMembersNA ( sal_Int32  nDim,
css::uno::Reference< css::sheet::XMembersAccess > &  xMembers 

Referenced by GetMembers().

bool ScDPObject::GetMembersNA ( sal_Int32  nDim,
sal_Int32  nHier,
css::uno::Reference< css::sheet::XMembersAccess > &  xMembers 
const OUString& ScDPObject::GetName ( ) const
ScRange ScDPObject::GetNewOutputRange ( bool &  rOverflow)

Definition at line 874 of file dpobject.cxx.

References aOutRange, ScRange::aStart, CreateOutput(), and pOutput.

Referenced by ScDBDocFunc::CreatePivotTable().

ScRange ScDPObject::GetOutputRangeByType ( sal_Int32  nType)
ScRange ScDPObject::GetOutputRangeByType ( sal_Int32  nType) const

Definition at line 921 of file dpobject.cxx.

References ScAddress::INITIALIZE_INVALID, and pOutput.

const ScRange & ScDPObject::GetOutRange ( ) const
double ScDPObject::GetPivotData ( const OUString &  rDataFieldName,
std::vector< css::sheet::DataPilotFieldFilter > &  rFilters 
void ScDPObject::GetPositionData ( const ScAddress rPos,
css::sheet::DataPilotTablePositionData &  rPosData 

Definition at line 1135 of file dpobject.cxx.

References CreateOutput(), and pOutput.

Referenced by ScDataPilotTableObj::getPositionData().

std::vector< OUString > ScDPObject::GetRegisteredSources ( )
ScDPSaveData* ScDPObject::GetSaveData ( ) const

Definition at line 141 of file dpobject.hxx.

Referenced by ScGridWindow::AcceptPrivateDrop(), XclExpPivotCache::AddGroupFields(), XclImpPivotTable::ApplyFieldInfo(), oox::xls::PivotTableField::convertPageField(), oox::xls::PivotTableField::convertRowColPageField(), ScDataPilotFieldObj::createDateGroup(), ScDataPilotFieldObj::createNameGroup(), XclExpPivotTableManager::CreatePivotCache(), ScDBDocFunc::CreatePivotTable(), ScDBFunc::DataPilotInput(), ScDBFunc::DataPilotMove(), ScDBFunc::DataPilotSort(), ScDBDocFunc::DataPilotUpdate(), ScDBFunc::DateGroupDataPilot(), ScGridWindow::DPLaunchFieldPopupMenu(), oox::xls::PivotTable::finalizeFieldsImport(), ScDataPilotFieldObj::getGroupInfo(), ScDataPilotDescriptorBase::getPropertyValue(), ScDPCollection::GetReferenceGroups(), ScDBFunc::GroupDataPilot(), ScDataPilotFieldObj::hasGroupInfo(), ScDBFunc::HasSelectionForDateGroup(), ScDBFunc::HasSelectionForDrillDown(), ScDBFunc::HasSelectionForNumGroup(), XclPTViewEx9Info::Init(), XclExpPCField::InsertNumDateGroupItems(), ScDBFunc::MakePivotTable(), ScGridWindow::MouseButtonUp(), ScDBFunc::NumGroupDataPilot(), ScDBDocFunc::RefreshPivotTableGroups(), ScDPCollection::ReloadGroupsInCache(), XclExpXmlPivotCaches::SavePivotCacheXml(), XclExpXmlPivotTables::SavePivotTableXml(), ScDPShowDetailDlg::ScDPShowDetailDlg(), ScPivotLayoutDialog::ScPivotLayoutDialog(), ScDBFunc::SetDataPilotDetails(), ScDataPilotFieldObj::setGroupInfo(), ScDataPilotFieldObj::setOrientation(), ScDataPilotDescriptorBase::setPropertyValue(), ScDBFunc::UngroupDataPilot(), ScGridWindow::UpdateDPFromFieldPopupMenu(), XclExpPCField::XclExpPCField(), and XclExpPivotTable::XclExpPivotTable().

const ScSheetSourceDesc* ScDPObject::GetSheetDesc ( ) const
uno::Reference< sheet::XDimensionsSupplier > const & ScDPObject::GetSource ( )
ScDPTableData * ScDPObject::GetTableData ( )
const OUString& ScDPObject::GetTag ( ) const

Definition at line 169 of file dpobject.hxx.

Referenced by ScDataPilotTableObj::getTag().

sal_Int32 ScDPObject::GetUsedHierarchy ( sal_Int32  nDim)
bool ScDPObject::HasRegisteredSources ( )
void ScDPObject::InvalidateData ( )
bool ScDPObject::IsDataDescriptionCell ( const ScAddress rPos)

Data description cell displays the description of a data dimension if and only if there is only one data dimension.

It's usually located at the upper-left corner of the table output.

Definition at line 500 of file dpobject.cxx.

References ScRange::aStart, CreateOutput(), pOutput, pSaveData, and TABLE.

Referenced by ScDBFunc::DataPilotInput().

bool ScDPObject::IsDimNameInUse ( std::u16string_view  rName) const
bool ScDPObject::IsDuplicated ( tools::Long  nDim)

Definition at line 1247 of file dpobject.cxx.

References nDimCount, SC_UNO_DP_ORIGINAL, and xSource.

Referenced by ScDPShowDetailDlg::ScDPShowDetailDlg().

bool ScDPObject::IsFilterButton ( const ScAddress rPos)

Definition at line 1401 of file dpobject.cxx.

References CreateOutput(), and pOutput.

Referenced by ScGridWindow::DoPushPivotButton().

bool ScDPObject::IsImportData ( ) const
bool ScDPObject::IsOrientationAllowed ( css::sheet::DataPilotFieldOrientation  nOrient,
sal_Int32  nDimFlags 
bool ScDPObject::IsServiceData ( ) const

Definition at line 164 of file dpobject.hxx.

Referenced by ScCellShell::ExecuteEdit().

bool ScDPObject::IsSheetData ( ) const
ScDPObject & ScDPObject::operator= ( const ScDPObject r)
void ScDPObject::Output ( const ScAddress rPos)
bool ScDPObject::ParseFilters ( OUString &  rDataFieldName,
std::vector< css::sheet::DataPilotFieldFilter > &  rFilters,
std::vector< sal_Int16 > &  rFilterFuncs,
std::u16string_view  rFilterList 
void ScDPObject::PutInteropGrabBag ( std::map< OUString, css::uno::Any > &&  val)

Definition at line 262 of file dpobject.hxx.

Referenced by oox::xls::PivotTable::finalizeImport().

void ScDPObject::RefreshAfterLoad ( )
bool ScDPObject::RefsEqual ( const ScDPObject r) const

Definition at line 1109 of file dpobject.cxx.

References aOutRange, and pSheetDesc.

void ScDPObject::ReloadGroupTableData ( )
void ScDPObject::SetAllowMove ( bool  bSet)

Definition at line 382 of file dpobject.cxx.

References bAllowMove.

Referenced by ScDBDocFunc::DataPilotUpdate(), and ScDBDocFunc::UpdatePivotTable().

void ScDPObject::SetHeaderLayout ( bool  bUseGrid)

Definition at line 397 of file dpobject.cxx.

References mbHeaderLayout.

Referenced by XclImpPivotTable::ApplyMergeFlags().

void ScDPObject::SetImportDesc ( const ScImportSourceDesc rDesc)
void ScDPObject::SetName ( const OUString &  rNew)
void ScDPObject::SetOutRange ( const ScRange rRange)
void ScDPObject::SetSaveData ( const ScDPSaveData rData)
void ScDPObject::SetServiceData ( const ScDPServiceDesc rDesc)
void ScDPObject::SetSheetDesc ( const ScSheetSourceDesc rDesc)
void ScDPObject::SetTag ( const OUString &  rNew)

Definition at line 495 of file dpobject.cxx.

References aTableTag.

Referenced by ScDataPilotTablesObj::insertNewByName(), and ScDataPilotTableObj::setTag().

bool ScDPObject::SyncAllDimensionMembers ( )

Remove in the save data entries for members that don't exist anymore.

This is called during pivot table refresh.

Definition at line 974 of file dpobject.cxx.

References GetTableData(), pData, pSaveData, pServDesc, ScDPTableData::ReloadCacheTable(), and ScDPTableData::SetEmptyFlags().

Referenced by ScDBDocFunc::CreatePivotTable(), ScDBDocFunc::DataPilotUpdate(), XclExpXmlPivotTableManager::Initialize(), and ScDBDocFunc::UpdatePivotTable().

void ScDPObject::ToggleDetails ( const css::sheet::DataPilotTableHeaderData &  rElemDesc,
ScDPObject pDestObj 
void ScDPObject::UpdateReference ( UpdateRefMode  eUpdateRefMode,
const ScRange r,
void ScDPObject::WriteRefsTo ( ScDPObject r) const

Definition at line 1128 of file dpobject.cxx.

References aOutRange, pSheetDesc, SetOutRange(), and SetSheetDesc().

Referenced by ScDPCollection::WriteRefsTo().

void ScDPObject::WriteSourceDataTo ( ScDPObject rDest) const
void ScDPObject::WriteTempDataTo ( ScDPObject rDest) const

Definition at line 480 of file dpobject.cxx.

References nHeaderRows.

Member Data Documentation

ScRange ScDPObject::aOutRange
OUString ScDPObject::aTableName

Definition at line 89 of file dpobject.hxx.

Referenced by operator=(), SetName(), and WriteSourceDataTo().

OUString ScDPObject::aTableTag

Definition at line 90 of file dpobject.hxx.

Referenced by operator=(), SetTag(), and WriteSourceDataTo().

bool ScDPObject::bAllowMove

Definition at line 106 of file dpobject.hxx.

Referenced by CreateOutput(), operator=(), and SetAllowMove().

bool ScDPObject::bSettingsChanged

Definition at line 107 of file dpobject.hxx.

Referenced by CreateObjects(), InvalidateData(), operator=(), and ReloadGroupTableData().

std::map<OUString, css::uno::Any> ScDPObject::maInteropGrabBag

Definition at line 102 of file dpobject.hxx.

Referenced by Clear(), and operator=().

bool ScDPObject::mbEnableGetPivotData

Definition at line 108 of file dpobject.hxx.

Referenced by EnableGetPivotData(), GetPivotData(), GetTableData(), and operator=().

bool ScDPObject::mbHeaderLayout

Definition at line 105 of file dpobject.hxx.

Referenced by CreateOutput(), operator=(), and SetHeaderLayout().

std::shared_ptr<ScDPTableData> ScDPObject::mpTableData

Definition at line 95 of file dpobject.hxx.

Referenced by ClearTableData(), GetTableData(), ParseFilters(), and ReloadGroupTableData().

sal_Int32 ScDPObject::nHeaderRows

Definition at line 104 of file dpobject.hxx.

Referenced by CreateOutput(), operator=(), RefreshAfterLoad(), and WriteTempDataTo().

ScDocument* ScDPObject::pDoc
std::unique_ptr<ScImportSourceDesc> ScDPObject::pImpDesc
std::unique_ptr<ScDPOutput> ScDPObject::pOutput
std::unique_ptr<ScDPSaveData> ScDPObject::pSaveData
std::unique_ptr<ScDPServiceDesc> ScDPObject::pServDesc
std::unique_ptr<ScSheetSourceDesc> ScDPObject::pSheetDesc
css::uno::Reference<css::sheet::XDimensionsSupplier> ScDPObject::xSource

The documentation for this class was generated from the following files: