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 | bExpandCollapse |
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 233 of file dpsave.hxx.
typedef std::unordered_map<OUString, size_t> ScDPSaveData::DimOrderType |
Definition at line 237 of file dpsave.hxx.
typedef std::vector<std::unique_ptr<ScDPSaveDimension> > ScDPSaveData::DimsType |
Definition at line 238 of file dpsave.hxx.
|
private |
Definition at line 235 of file dpsave.hxx.
ScDPSaveData::ScDPSaveData | ( | ) |
Definition at line 692 of file dpsave.cxx.
ScDPSaveData::ScDPSaveData | ( | const ScDPSaveData & | r | ) |
Definition at line 704 of file dpsave.cxx.
References m_DimList, and pDimensionData.
ScDPSaveData::~ScDPSaveData | ( | ) |
Definition at line 765 of file dpsave.cxx.
Referenced by operator=().
void ScDPSaveData::AddDimension | ( | ScDPSaveDimension * | pDim | ) |
Definition at line 827 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 1371 of file dpsave.cxx.
References DimensionsChanged(), ScDPUtil::isDuplicateDimension(), m_DimList, and maDupNameCounts.
Referenced by GetDataLayoutDimension(), GetDimensionByName(), and GetNewDimensionByName().
void ScDPSaveData::BuildAllDimensionMembers | ( | ScDPTableData * | pData | ) |
Definition at line 1219 of file dpsave.cxx.
References aMap, i, m_DimList, mbDimensionMembersBuilt, and pData.
|
private |
Definition at line 1338 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 1386 of file dpsave.cxx.
References mpDimOrder.
Referenced by AddDimension(), AppendNewDimension(), RemoveDimensionByName(), and SetPosition().
void ScDPSaveData::Dump | ( | ) | const |
ScDPSaveDimension & ScDPSaveData::DuplicateDimension | ( | const ScDPSaveDimension & | rDim | ) |
Definition at line 915 of file dpsave.cxx.
References AddDimension().
ScDPSaveDimension * ScDPSaveData::DuplicateDimension | ( | std::u16string_view | rName | ) |
Definition at line 889 of file dpsave.cxx.
References AddDimension(), and GetExistingDimensionByName().
Referenced by XclImpPTField::ConvertDataField(), ScDPObject::ConvertOrientation(), GetNewDimensionByName(), and ScDataPilotFieldObj::setOrientation().
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 811 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.
References nColumnGrandMode.
Referenced by ScDataPilotDescriptorBase::getPropertyValue(), XclExpPivotTable::SetPropertiesFromDP(), and ScXMLExportDataPilot::WriteDataPilots().
tools::Long ScDPSaveData::GetDataDimensionCount | ( | ) | const |
Definition at line 946 of file dpsave.cxx.
References m_DimList.
Referenced by XclExpXmlPivotTables::SavePivotTableXml().
ScDPSaveDimension * ScDPSaveData::GetDataLayoutDimension | ( | ) |
Definition at line 870 of file dpsave.cxx.
References AppendNewDimension(), and GetExistingDataLayoutDimension().
Referenced by XclImpPivotTable::Convert(), ScDPObject::ConvertOrientation(), XclImpPTField::ConvertRowColField(), and ScGridWindow::DPTestMouse().
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 838 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(), ScGridWindow::DPTestMouse(), ScDPObject::ToggleDetails(), and ScGridWindow::UpdateDPFromFieldPopupMenu().
ScDPDimensionSaveData * ScDPSaveData::GetDimensionData | ( | ) |
Definition at line 1204 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 796 of file dpsave.cxx.
References GetAllDimensionsByOrientation(), and mpDimOrder.
|
inline |
Definition at line 343 of file dpsave.hxx.
References bDrillDown.
Referenced by ScGridWindow::DoPushPivotToggle(), ScDataPilotDescriptorBase::getPropertyValue(), ScGridWindow::MouseButtonUp(), ScPivotLayoutDialog::ScPivotLayoutDialog(), XclExpPivotTable::SetPropertiesFromDP(), and ScXMLExportDataPilot::WriteDataPilots().
ScDPSaveDimension * ScDPSaveData::GetExistingDataLayoutDimension | ( | ) | const |
Definition at line 879 of file dpsave.cxx.
References m_DimList.
Referenced by GetDataLayoutDimension(), and XclExpPivotTable::SetPropertiesFromDP().
ScDPSaveDimension * ScDPSaveData::GetExistingDimensionByName | ( | std::u16string_view | rName | ) | const |
Definition at line 849 of file dpsave.cxx.
References m_DimList.
Referenced by ScGridWindow::AcceptPrivateDrop(), ScPivotLayoutDialog::ApplyLabelData(), XclImpPTField::ConvertFieldInfo(), DuplicateDimension(), HasInvisibleMember(), ScDBFunc::HasSelectionForDrillDown(), lcl_FillDPFieldPopupData(), XclExpXmlPivotTables::SavePivotTableXml(), and ScDPShowDetailDlg::ScDPShowDetailDlg().
|
inline |
Definition at line 353 of file dpsave.hxx.
References pDimensionData.
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 347 of file dpsave.hxx.
References bExpandCollapse.
Referenced by XclExpXmlPivotTables::SavePivotTableXml(), ScPivotLayoutDialog::ScPivotLayoutDialog(), and ScXMLExportDataPilot::WriteDataPilots().
|
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 936 of file dpsave.cxx.
References m_DimList.
const std::optional< OUString > & ScDPSaveData::GetGrandTotalName | ( | ) | const |
Definition at line 774 of file dpsave.cxx.
References mpGrandTotalName.
Referenced by ScDataPilotDescriptorBase::getPropertyValue(), ScXMLExportDataPilot::WriteDataPilots(), and WriteToSource().
|
inline |
Definition at line 331 of file dpsave.hxx.
References nIgnoreEmptyMode.
Referenced by ScDataPilotDescriptorBase::getPropertyValue(), and ScXMLExportDataPilot::WriteDataPilots().
ScDPSaveDimension * ScDPSaveData::GetInnermostDimension | ( | css::sheet::DataPilotFieldOrientation | nOrientation | ) |
Definition at line 922 of file dpsave.cxx.
References m_DimList.
Referenced by ScDBFunc::HasSelectionForDrillDown().
ScDPSaveDimension * ScDPSaveData::GetNewDimensionByName | ( | const OUString & | rName | ) |
Definition at line 859 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.
References nRepeatEmptyMode.
Referenced by ScDataPilotDescriptorBase::getPropertyValue(), and ScXMLExportDataPilot::WriteDataPilots().
|
inline |
Definition at line 327 of file dpsave.hxx.
References nRowGrandMode.
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 1316 of file dpsave.cxx.
References GetExistingDimensionByName(), and ScDPSaveDimension::HasInvisibleMember().
Referenced by XclImpPivotTable::ApplyMergeFlags().
bool ScDPSaveData::IsEmpty | ( | ) | const |
Definition at line 1157 of file dpsave.cxx.
References m_DimList.
Referenced by ScDBFunc::MakePivotTable().
ScDPSaveData & ScDPSaveData::operator= | ( | const ScDPSaveData & | r | ) |
Definition at line 724 of file dpsave.cxx.
References ~ScDPSaveData().
bool ScDPSaveData::operator== | ( | const ScDPSaveData & | r | ) | const |
Definition at line 734 of file dpsave.cxx.
References bDrillDown, bFilterButton, m_DimList, mbDimensionMembersBuilt, mpGrandTotalName, nColumnGrandMode, nIgnoreEmptyMode, nRepeatEmptyMode, nRowGrandMode, and pDimensionData.
void ScDPSaveData::RemoveAllGroupDimensions | ( | const OUString & | rSrcDimName, |
std::vector< OUString > * | pDeletedNames = nullptr |
||
) |
Definition at line 1167 of file dpsave.cxx.
References ScDPSaveGroupDimension::GetGroupDimName(), pDimensionData, and RemoveDimensionByName().
void ScDPSaveData::RemoveDimensionByName | ( | const OUString & | rName | ) |
Definition at line 902 of file dpsave.cxx.
References DimensionsChanged(), m_DimList, and RemoveDuplicateNameCount().
Referenced by ScDataPilotFieldObj::createDateGroup(), and RemoveAllGroupDimensions().
|
private |
Definition at line 1352 of file dpsave.cxx.
References ScDPUtil::getSourceDimensionName(), ScDPUtil::isDuplicateDimension(), and maDupNameCounts.
Referenced by RemoveDimensionByName().
void ScDPSaveData::SetColumnGrand | ( | bool | bSet | ) |
Definition at line 987 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 1211 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 1012 of file dpsave.cxx.
References bDrillDown.
Referenced by ScPivotLayoutDialog::ApplySaveData(), XclImpPivotTable::Convert(), and ScDataPilotDescriptorBase::setPropertyValue().
void ScDPSaveData::SetExpandCollapse | ( | bool | bSet | ) |
Definition at line 1017 of file dpsave.cxx.
References bExpandCollapse.
Referenced by ScPivotLayoutDialog::ApplySaveData().
void ScDPSaveData::SetFilterButton | ( | bool | bSet | ) |
Definition at line 1007 of file dpsave.cxx.
References bFilterButton.
Referenced by ScPivotLayoutDialog::ApplySaveData(), XclImpPivotTable::Convert(), and ScDataPilotDescriptorBase::setPropertyValue().
void ScDPSaveData::SetGrandTotalName | ( | const OUString & | rName | ) |
Definition at line 769 of file dpsave.cxx.
References mpGrandTotalName.
Referenced by XclImpPivotTable::Convert(), and ScDataPilotDescriptorBase::setPropertyValue().
void ScDPSaveData::SetIgnoreEmptyRows | ( | bool | bSet | ) |
Definition at line 997 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 959 of file dpsave.cxx.
References DimensionsChanged(), ScDPSaveDimension::GetOrientation(), and m_DimList.
Referenced by ScDataPilotFieldObj::createDateGroup(), ScDataPilotFieldObj::createNameGroup(), ScGridWindow::DPTestMouse(), and ScDataPilotFieldObj::setOrientation().
void ScDPSaveData::SetRepeatIfEmpty | ( | bool | bSet | ) |
Definition at line 1002 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 992 of file dpsave.cxx.
References nRowGrandMode.
Referenced by ScPivotLayoutDialog::ApplySaveData(), XclImpPivotTable::Convert(), ScDataPilotDescriptor::ScDataPilotDescriptor(), and ScDataPilotDescriptorBase::setPropertyValue().
void ScDPSaveData::SyncAllDimensionMembers | ( | ScDPTableData * | pData | ) |
void ScDPSaveData::WriteToSource | ( | const css::uno::Reference< css::sheet::XDimensionsSupplier > & | xSource | ) |
Definition at line 1037 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 249 of file dpsave.hxx.
Referenced by GetDrillDown(), operator==(), and SetDrillDown().
|
private |
Definition at line 250 of file dpsave.hxx.
Referenced by GetExpandCollapse(), and SetExpandCollapse().
|
private |
Definition at line 248 of file dpsave.hxx.
Referenced by GetFilterButton(), operator==(), and SetFilterButton().
|
private |
Definition at line 241 of file dpsave.hxx.
Referenced by AddDimension(), AppendNewDimension(), BuildAllDimensionMembers(), GetAllDimensionsByOrientation(), GetDataDimensionCount(), GetDimensionByName(), GetDimensions(), GetExistingDataLayoutDimension(), GetExistingDimensionByName(), GetFirstDimension(), GetInnermostDimension(), GetNewDimensionByName(), IsEmpty(), operator==(), RemoveDimensionByName(), ScDPSaveData(), SetPosition(), SyncAllDimensionMembers(), and WriteToSource().
|
private |
Definition at line 242 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 244 of file dpsave.hxx.
Referenced by GetColumnGrand(), operator==(), SetColumnGrand(), and WriteToSource().
|
private |
Definition at line 246 of file dpsave.hxx.
Referenced by GetIgnoreEmptyRows(), operator==(), SetIgnoreEmptyRows(), and WriteToSource().
|
private |
Definition at line 247 of file dpsave.hxx.
Referenced by GetRepeatIfEmpty(), operator==(), SetRepeatIfEmpty(), and WriteToSource().
|
private |
Definition at line 245 of file dpsave.hxx.
Referenced by GetRowGrand(), operator==(), SetRowGrand(), and WriteToSource().
|
private |
keep track of number of duplicates in each name.
Definition at line 243 of file dpsave.hxx.
Referenced by GetDimensionData(), GetExistingDimensionData(), operator==(), RemoveAllGroupDimensions(), ScDPSaveData(), and SetDimensionData().