LibreOffice Module sc (master)
1
|
#include <dpsave.hxx>
Public Types | |
typedef std::unordered_map< OUString, size_t > | DimOrderType |
typedef std::vector< std::unique_ptr< ScDPSaveDimension > > | DimsType |
Private Types | |
typedef std::unordered_map< OUString, size_t > | DupNameCountType |
Private Member Functions | |
void | CheckDuplicateName (ScDPSaveDimension &rDim) |
void | RemoveDuplicateNameCount (const OUString &rName) |
ScDPSaveDimension * | AppendNewDimension (const OUString &rName, bool bDataLayout) |
Append a new original dimension. More... | |
void | DimensionsChanged () |
Private Attributes | |
DimsType | m_DimList |
DupNameCountType | maDupNameCounts |
std::unique_ptr< ScDPDimensionSaveData > | pDimensionData |
keep track of number of duplicates in each name. More... | |
sal_uInt16 | nColumnGrandMode |
sal_uInt16 | nRowGrandMode |
sal_uInt16 | nIgnoreEmptyMode |
sal_uInt16 | nRepeatEmptyMode |
bool | bFilterButton |
bool | bDrillDown |
bool | mbDimensionMembersBuilt |
if true, all dimensions already have all of their member instances created. More... | |
std::optional< OUString > | mpGrandTotalName |
std::unique_ptr< DimOrderType > | mpDimOrder |
Definition at line 234 of file dpsave.hxx.
typedef std::unordered_map<OUString, size_t> ScDPSaveData::DimOrderType |
Definition at line 238 of file dpsave.hxx.
typedef std::vector<std::unique_ptr<ScDPSaveDimension> > ScDPSaveData::DimsType |
Definition at line 239 of file dpsave.hxx.
|
private |
Definition at line 236 of file dpsave.hxx.
ScDPSaveData::ScDPSaveData | ( | ) |
Definition at line 690 of file dpsave.cxx.
ScDPSaveData::ScDPSaveData | ( | const ScDPSaveData & | r | ) |
Definition at line 701 of file dpsave.cxx.
References m_DimList, and pDimensionData.
ScDPSaveData::~ScDPSaveData | ( | ) |
Definition at line 761 of file dpsave.cxx.
Referenced by operator=().
void ScDPSaveData::AddDimension | ( | ScDPSaveDimension * | pDim | ) |
Definition at line 823 of file dpsave.cxx.
References CheckDuplicateName(), DimensionsChanged(), and m_DimList.
Referenced by DuplicateDimension().
|
private |
Append a new original dimension.
Not to be called to insert a duplicate dimension.
rName | Dimension name. The name must be the original dimension name; not a duplicate dimension name. |
bDataLayout | true if this is a data layout dimension, false otherwise. |
Definition at line 1350 of file dpsave.cxx.
References DimensionsChanged(), ScDPUtil::isDuplicateDimension(), and maDupNameCounts.
Referenced by GetDataLayoutDimension(), GetDimensionByName(), and GetNewDimensionByName().
void ScDPSaveData::BuildAllDimensionMembers | ( | ScDPTableData * | pData | ) |
Definition at line 1210 of file dpsave.cxx.
References aMap, ScDPTableData::GetColumnCount(), ScDPTableData::GetColumnEntries(), ScDPTableData::getDimensionName(), ScDPTableData::GetFormattedString(), ScDPTableData::GetMemberById(), i, m_DimList, and mbDimensionMembersBuilt.
|
private |
Definition at line 1317 of file dpsave.cxx.
References aName, ScDPUtil::createDuplicateDimensionName(), ScDPSaveDimension::GetName(), ScDPUtil::getSourceDimensionName(), maDupNameCounts, ScDPSaveDimension::SetDupFlag(), and ScDPSaveDimension::SetName().
Referenced by AddDimension().
|
private |
Definition at line 1365 of file dpsave.cxx.
References mpDimOrder.
Referenced by AddDimension(), AppendNewDimension(), RemoveDimensionByName(), and SetPosition().
void ScDPSaveData::Dump | ( | ) | const |
ScDPSaveDimension * ScDPSaveData::DuplicateDimension | ( | std::u16string_view | rName | ) |
Definition at line 885 of file dpsave.cxx.
References AddDimension(), and GetExistingDimensionByName().
Referenced by XclImpPTField::ConvertDataField(), ScDPObject::ConvertOrientation(), GetNewDimensionByName(), and ScDataPilotFieldObj::setOrientation().
ScDPSaveDimension & ScDPSaveData::DuplicateDimension | ( | const ScDPSaveDimension & | rDim | ) |
Definition at line 911 of file dpsave.cxx.
References AddDimension().
void ScDPSaveData::GetAllDimensionsByOrientation | ( | css::sheet::DataPilotFieldOrientation | eOrientation, |
std::vector< const ScDPSaveDimension * > & | rDims | ||
) | const |
Get all dimensions in a given orientation.
The order represents the actual order of occurrence. The returned list also includes data layout dimension.
eOrientation | orientation |
rDims | (out) list of dimensions for specified orientation |
Definition at line 807 of file dpsave.cxx.
References ScDPSaveDimension::GetOrientation(), and m_DimList.
Referenced by XclImpPivotTable::ApplyMergeFlags(), and GetDimensionSortOrder().
|
inline |
Definition at line 323 of file dpsave.hxx.
Referenced by ScDataPilotDescriptorBase::getPropertyValue(), XclExpPivotTable::SetPropertiesFromDP(), and ScXMLExportDataPilot::WriteDataPilots().
tools::Long ScDPSaveData::GetDataDimensionCount | ( | ) | const |
Definition at line 942 of file dpsave.cxx.
References m_DimList.
Referenced by XclExpXmlPivotTables::SavePivotTableXml().
ScDPSaveDimension * ScDPSaveData::GetDataLayoutDimension | ( | ) |
Definition at line 866 of file dpsave.cxx.
References AppendNewDimension(), and GetExistingDataLayoutDimension().
Referenced by XclImpPivotTable::Convert(), ScDPObject::ConvertOrientation(), and XclImpPTField::ConvertRowColField().
ScDPSaveDimension * ScDPSaveData::GetDimensionByName | ( | const OUString & | rName | ) |
Get a dimension object by its name.
If one doesn't exist for the given name, it creates a new one.
rName | dimension name |
Definition at line 834 of file dpsave.cxx.
References AppendNewDimension(), and m_DimList.
Referenced by ScDPObject::ConvertOrientation(), oox::xls::PivotTableField::convertPageField(), oox::xls::PivotTableField::convertRowColPageField(), ScDataPilotFieldObj::createDateGroup(), ScDataPilotFieldObj::createNameGroup(), ScDBFunc::DataPilotSort(), ScDPObject::ToggleDetails(), and ScGridWindow::UpdateDPFromFieldPopupMenu().
ScDPDimensionSaveData * ScDPSaveData::GetDimensionData | ( | ) |
Definition at line 1195 of file dpsave.cxx.
References pDimensionData.
Referenced by XclImpPCField::ConvertDateGroupField(), XclImpPCField::ConvertNumGroupField(), XclImpPCField::ConvertStdGroupField(), ScDataPilotFieldObj::createDateGroup(), ScDataPilotFieldObj::createNameGroup(), XclExpXmlPivotCaches::SavePivotCacheXml(), and ScDataPilotFieldObj::setGroupInfo().
|
inline |
Definition at line 271 of file dpsave.hxx.
References m_DimList.
Referenced by XclExpXmlPivotTables::SavePivotTableXml(), ScDataPilotFieldObj::setOrientation(), ScXMLExportDataPilot::WriteDimensions(), and XclExpPivotTable::XclExpPivotTable().
const ScDPSaveData::DimOrderType & ScDPSaveData::GetDimensionSortOrder | ( | ) | const |
Get sort order map to sort row and column dimensions in order of appearance.
Row dimensions get sorted before column dimensions. This is used to traverse result tree, which is structured following this order.
Definition at line 792 of file dpsave.cxx.
References GetAllDimensionsByOrientation(), and mpDimOrder.
|
inline |
Definition at line 343 of file dpsave.hxx.
References bDrillDown.
Referenced by ScDataPilotDescriptorBase::getPropertyValue(), ScGridWindow::MouseButtonUp(), ScPivotLayoutDialog::ScPivotLayoutDialog(), XclExpPivotTable::SetPropertiesFromDP(), and ScXMLExportDataPilot::WriteDataPilots().
ScDPSaveDimension * ScDPSaveData::GetExistingDataLayoutDimension | ( | ) | const |
Definition at line 875 of file dpsave.cxx.
References m_DimList.
Referenced by GetDataLayoutDimension(), and XclExpPivotTable::SetPropertiesFromDP().
ScDPSaveDimension * ScDPSaveData::GetExistingDimensionByName | ( | std::u16string_view | rName | ) | const |
Definition at line 845 of file dpsave.cxx.
References m_DimList.
Referenced by ScGridWindow::AcceptPrivateDrop(), ScPivotLayoutDialog::ApplyLabelData(), XclImpPTField::ConvertFieldInfo(), ScGridWindow::DPLaunchFieldPopupMenu(), DuplicateDimension(), HasInvisibleMember(), ScDBFunc::HasSelectionForDrillDown(), XclExpXmlPivotTables::SavePivotTableXml(), and ScDPShowDetailDlg::ScDPShowDetailDlg().
|
inline |
Definition at line 349 of file dpsave.hxx.
Referenced by XclExpPivotCache::AddGroupFields(), ScDataPilotFieldObj::getGroupInfo(), ScDPCollection::GetReferenceGroups(), ScDataPilotFieldObj::hasGroupInfo(), ScDBFunc::HasSelectionForDateGroup(), ScDBFunc::HasSelectionForNumGroup(), XclExpPCField::InsertNumDateGroupItems(), ScDBFunc::MakePivotTable(), ScDBDocFunc::RefreshPivotTableGroups(), ScDPCollection::ReloadGroupsInCache(), and ScXMLExportDataPilot::WriteDimensions().
|
inline |
Definition at line 339 of file dpsave.hxx.
References bFilterButton.
Referenced by ScDataPilotDescriptorBase::getPropertyValue(), ScPivotLayoutDialog::ScPivotLayoutDialog(), XclExpPivotTable::SetPropertiesFromDP(), and ScXMLExportDataPilot::WriteDataPilots().
ScDPSaveDimension * ScDPSaveData::GetFirstDimension | ( | css::sheet::DataPilotFieldOrientation | eOrientation | ) |
Definition at line 932 of file dpsave.cxx.
References m_DimList.
const std::optional< OUString > & ScDPSaveData::GetGrandTotalName | ( | ) | const |
Definition at line 770 of file dpsave.cxx.
References mpGrandTotalName.
Referenced by ScDataPilotDescriptorBase::getPropertyValue(), XclPTViewEx9Info::Init(), ScXMLExportDataPilot::WriteDataPilots(), and WriteToSource().
|
inline |
Definition at line 331 of file dpsave.hxx.
Referenced by ScDataPilotDescriptorBase::getPropertyValue(), and ScXMLExportDataPilot::WriteDataPilots().
ScDPSaveDimension * ScDPSaveData::GetInnermostDimension | ( | css::sheet::DataPilotFieldOrientation | nOrientation | ) |
Definition at line 918 of file dpsave.cxx.
References m_DimList.
Referenced by ScDBFunc::HasSelectionForDrillDown().
ScDPSaveDimension * ScDPSaveData::GetNewDimensionByName | ( | const OUString & | rName | ) |
Definition at line 855 of file dpsave.cxx.
References AppendNewDimension(), DuplicateDimension(), and m_DimList.
Referenced by XclImpPTField::ConvertDataField(), and XclImpPTField::ConvertRCPField().
|
inline |
Definition at line 335 of file dpsave.hxx.
Referenced by ScDataPilotDescriptorBase::getPropertyValue(), and ScXMLExportDataPilot::WriteDataPilots().
|
inline |
Definition at line 327 of file dpsave.hxx.
Referenced by ScDataPilotDescriptorBase::getPropertyValue(), XclExpPivotTable::SetPropertiesFromDP(), and ScXMLExportDataPilot::WriteDataPilots().
bool ScDPSaveData::HasInvisibleMember | ( | std::u16string_view | rDimName | ) | const |
Check whether a dimension has one or more invisible members.
rDimName | dimension name |
Definition at line 1295 of file dpsave.cxx.
References GetExistingDimensionByName(), and ScDPSaveDimension::HasInvisibleMember().
Referenced by XclImpPivotTable::ApplyMergeFlags().
bool ScDPSaveData::IsEmpty | ( | ) | const |
Definition at line 1148 of file dpsave.cxx.
References m_DimList.
Referenced by ScDBFunc::MakePivotTable().
ScDPSaveData & ScDPSaveData::operator= | ( | const ScDPSaveData & | r | ) |
Definition at line 720 of file dpsave.cxx.
References ~ScDPSaveData().
bool ScDPSaveData::operator== | ( | const ScDPSaveData & | r | ) | const |
Definition at line 730 of file dpsave.cxx.
References bDrillDown, bFilterButton, comphelper::ContainerUniquePtrEquals(), m_DimList, mbDimensionMembersBuilt, mpGrandTotalName, nColumnGrandMode, nIgnoreEmptyMode, nRepeatEmptyMode, nRowGrandMode, and pDimensionData.
void ScDPSaveData::RemoveAllGroupDimensions | ( | const OUString & | rSrcDimName, |
std::vector< OUString > * | pDeletedNames = nullptr |
||
) |
Definition at line 1158 of file dpsave.cxx.
References ScDPSaveGroupDimension::GetGroupDimName(), pDimensionData, and RemoveDimensionByName().
void ScDPSaveData::RemoveDimensionByName | ( | const OUString & | rName | ) |
Definition at line 898 of file dpsave.cxx.
References DimensionsChanged(), m_DimList, and RemoveDuplicateNameCount().
Referenced by ScDataPilotFieldObj::createDateGroup(), and RemoveAllGroupDimensions().
|
private |
Definition at line 1331 of file dpsave.cxx.
References ScDPUtil::getSourceDimensionName(), ScDPUtil::isDuplicateDimension(), and maDupNameCounts.
Referenced by RemoveDimensionByName().
void ScDPSaveData::SetColumnGrand | ( | bool | bSet | ) |
Definition at line 983 of file dpsave.cxx.
References nColumnGrandMode.
Referenced by ScPivotLayoutDialog::ApplySaveData(), XclImpPivotTable::Convert(), ScDataPilotDescriptor::ScDataPilotDescriptor(), and ScDataPilotDescriptorBase::setPropertyValue().
void ScDPSaveData::SetDimensionData | ( | const ScDPDimensionSaveData * | pNew | ) |
Definition at line 1202 of file dpsave.cxx.
References pDimensionData.
Referenced by ScDBDocFunc::CreatePivotTable(), oox::xls::PivotTable::finalizeFieldsImport(), ScDBFunc::MakePivotTable(), ScDBDocFunc::RefreshPivotTableGroups(), and ScDataPilotFieldObj::setGroupInfo().
void ScDPSaveData::SetDrillDown | ( | bool | bSet | ) |
Definition at line 1008 of file dpsave.cxx.
References bDrillDown.
Referenced by ScPivotLayoutDialog::ApplySaveData(), XclImpPivotTable::Convert(), and ScDataPilotDescriptorBase::setPropertyValue().
void ScDPSaveData::SetFilterButton | ( | bool | bSet | ) |
Definition at line 1003 of file dpsave.cxx.
References bFilterButton.
Referenced by ScPivotLayoutDialog::ApplySaveData(), XclImpPivotTable::Convert(), and ScDataPilotDescriptorBase::setPropertyValue().
void ScDPSaveData::SetGrandTotalName | ( | const OUString & | rName | ) |
Definition at line 765 of file dpsave.cxx.
References mpGrandTotalName.
Referenced by XclImpPivotTable::Convert(), and ScDataPilotDescriptorBase::setPropertyValue().
void ScDPSaveData::SetIgnoreEmptyRows | ( | bool | bSet | ) |
Definition at line 993 of file dpsave.cxx.
References nIgnoreEmptyMode.
Referenced by ScPivotLayoutDialog::ApplySaveData(), XclImpPivotTable::Convert(), ScDataPilotDescriptor::ScDataPilotDescriptor(), and ScDataPilotDescriptorBase::setPropertyValue().
void ScDPSaveData::SetPosition | ( | ScDPSaveDimension * | pDim, |
tools::Long | nNew | ||
) |
Definition at line 955 of file dpsave.cxx.
References DimensionsChanged(), ScDPSaveDimension::GetOrientation(), and m_DimList.
Referenced by ScDataPilotFieldObj::createDateGroup(), ScDataPilotFieldObj::createNameGroup(), and ScDataPilotFieldObj::setOrientation().
void ScDPSaveData::SetRepeatIfEmpty | ( | bool | bSet | ) |
Definition at line 998 of file dpsave.cxx.
References nRepeatEmptyMode.
Referenced by ScPivotLayoutDialog::ApplySaveData(), XclImpPivotTable::Convert(), ScDataPilotDescriptor::ScDataPilotDescriptor(), and ScDataPilotDescriptorBase::setPropertyValue().
void ScDPSaveData::SetRowGrand | ( | bool | bSet | ) |
Definition at line 988 of file dpsave.cxx.
References nRowGrandMode.
Referenced by ScPivotLayoutDialog::ApplySaveData(), XclImpPivotTable::Convert(), ScDataPilotDescriptor::ScDataPilotDescriptor(), and ScDataPilotDescriptorBase::setPropertyValue().
void ScDPSaveData::SyncAllDimensionMembers | ( | ScDPTableData * | pData | ) |
Definition at line 1256 of file dpsave.cxx.
References aMap, ScDPTableData::GetColumnCount(), ScDPTableData::GetColumnEntries(), ScDPTableData::getDimensionName(), ScDPTableData::GetFormattedString(), ScDPTableData::GetMemberById(), i, and m_DimList.
void ScDPSaveData::WriteToSource | ( | const css::uno::Reference< css::sheet::XDimensionsSupplier > & | xSource | ) |
Definition at line 1028 of file dpsave.cxx.
References aName, ScUnoHelpFunctions::GetBoolProperty(), GetGrandTotalName(), ScDPUtil::getSourceDimensionName(), lcl_ResetOrient(), lcl_SetBoolProperty(), m_DimList, nColumnGrandMode, nIgnoreEmptyMode, nRepeatEmptyMode, nRowGrandMode, SAL_INFO, SAL_WARN_IF, SC_DPSAVEMODE_DONTKNOW, SC_UNO_DP_COLGRAND, SC_UNO_DP_GRANDTOTAL_NAME, SC_UNO_DP_IGNOREEMPTY, SC_UNO_DP_ISDATALAYOUT, SC_UNO_DP_REPEATEMPTY, SC_UNO_DP_ROWGRAND, ScUnoHelpFunctions::SetOptionalPropertyValue(), and TOOLS_WARN_EXCEPTION.
|
private |
Definition at line 250 of file dpsave.hxx.
Referenced by GetDrillDown(), operator==(), and SetDrillDown().
|
private |
Definition at line 249 of file dpsave.hxx.
Referenced by GetFilterButton(), operator==(), and SetFilterButton().
|
private |
Definition at line 242 of file dpsave.hxx.
Referenced by AddDimension(), BuildAllDimensionMembers(), GetAllDimensionsByOrientation(), GetDataDimensionCount(), GetDimensionByName(), GetDimensions(), GetExistingDataLayoutDimension(), GetExistingDimensionByName(), GetFirstDimension(), GetInnermostDimension(), GetNewDimensionByName(), IsEmpty(), operator==(), RemoveDimensionByName(), ScDPSaveData(), SetPosition(), SyncAllDimensionMembers(), and WriteToSource().
|
private |
Definition at line 243 of file dpsave.hxx.
Referenced by AppendNewDimension(), CheckDuplicateName(), and RemoveDuplicateNameCount().
|
private |
if true, all dimensions already have all of their member instances created.
Definition at line 254 of file dpsave.hxx.
Referenced by BuildAllDimensionMembers(), and operator==().
|
mutableprivate |
Definition at line 257 of file dpsave.hxx.
Referenced by DimensionsChanged(), and GetDimensionSortOrder().
|
private |
Definition at line 256 of file dpsave.hxx.
Referenced by GetGrandTotalName(), operator==(), and SetGrandTotalName().
|
private |
Definition at line 245 of file dpsave.hxx.
Referenced by operator==(), SetColumnGrand(), and WriteToSource().
|
private |
Definition at line 247 of file dpsave.hxx.
Referenced by operator==(), SetIgnoreEmptyRows(), and WriteToSource().
|
private |
Definition at line 248 of file dpsave.hxx.
Referenced by operator==(), SetRepeatIfEmpty(), and WriteToSource().
|
private |
Definition at line 246 of file dpsave.hxx.
Referenced by operator==(), SetRowGrand(), and WriteToSource().
|
private |
keep track of number of duplicates in each name.
Definition at line 244 of file dpsave.hxx.
Referenced by GetDimensionData(), operator==(), RemoveAllGroupDimensions(), ScDPSaveData(), and SetDimensionData().