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 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 703 of file dpsave.cxx.
References m_DimList, and pDimensionData.
ScDPSaveData::~ScDPSaveData | ( | ) |
Definition at line 763 of file dpsave.cxx.
Referenced by operator=().
void ScDPSaveData::AddDimension | ( | ScDPSaveDimension * | pDim | ) |
Definition at line 825 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 1364 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 1212 of file dpsave.cxx.
References aMap, i, m_DimList, mbDimensionMembersBuilt, and pData.
|
private |
Definition at line 1331 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 1379 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 913 of file dpsave.cxx.
References AddDimension().
ScDPSaveDimension * ScDPSaveData::DuplicateDimension | ( | std::u16string_view | rName | ) |
Definition at line 887 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 809 of file dpsave.cxx.
References ScDPSaveDimension::GetOrientation(), and m_DimList.
Referenced by XclImpPivotTable::ApplyMergeFlags(), and GetDimensionSortOrder().
|
inline |
Definition at line 322 of file dpsave.hxx.
References nColumnGrandMode.
Referenced by ScDataPilotDescriptorBase::getPropertyValue(), XclExpPivotTable::SetPropertiesFromDP(), and ScXMLExportDataPilot::WriteDataPilots().
tools::Long ScDPSaveData::GetDataDimensionCount | ( | ) | const |
Definition at line 944 of file dpsave.cxx.
References m_DimList.
Referenced by XclExpXmlPivotTables::SavePivotTableXml().
ScDPSaveDimension * ScDPSaveData::GetDataLayoutDimension | ( | ) |
Definition at line 868 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 836 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 1197 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 270 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 794 of file dpsave.cxx.
References GetAllDimensionsByOrientation(), and mpDimOrder.
|
inline |
Definition at line 342 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 877 of file dpsave.cxx.
References m_DimList.
Referenced by GetDataLayoutDimension(), and XclExpPivotTable::SetPropertiesFromDP().
ScDPSaveDimension * ScDPSaveData::GetExistingDimensionByName | ( | std::u16string_view | rName | ) | const |
Definition at line 847 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 348 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 338 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 934 of file dpsave.cxx.
References m_DimList.
const std::optional< OUString > & ScDPSaveData::GetGrandTotalName | ( | ) | const |
Definition at line 772 of file dpsave.cxx.
References mpGrandTotalName.
Referenced by ScDataPilotDescriptorBase::getPropertyValue(), ScXMLExportDataPilot::WriteDataPilots(), and WriteToSource().
|
inline |
Definition at line 330 of file dpsave.hxx.
References nIgnoreEmptyMode.
Referenced by ScDataPilotDescriptorBase::getPropertyValue(), and ScXMLExportDataPilot::WriteDataPilots().
ScDPSaveDimension * ScDPSaveData::GetInnermostDimension | ( | css::sheet::DataPilotFieldOrientation | nOrientation | ) |
Definition at line 920 of file dpsave.cxx.
References m_DimList.
Referenced by ScDBFunc::HasSelectionForDrillDown().
ScDPSaveDimension * ScDPSaveData::GetNewDimensionByName | ( | const OUString & | rName | ) |
Definition at line 857 of file dpsave.cxx.
References AppendNewDimension(), DuplicateDimension(), and m_DimList.
Referenced by XclImpPTField::ConvertDataField(), and XclImpPTField::ConvertRCPField().
|
inline |
Definition at line 334 of file dpsave.hxx.
References nRepeatEmptyMode.
Referenced by ScDataPilotDescriptorBase::getPropertyValue(), and ScXMLExportDataPilot::WriteDataPilots().
|
inline |
Definition at line 326 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 1309 of file dpsave.cxx.
References GetExistingDimensionByName(), and ScDPSaveDimension::HasInvisibleMember().
Referenced by XclImpPivotTable::ApplyMergeFlags().
bool ScDPSaveData::IsEmpty | ( | ) | const |
Definition at line 1150 of file dpsave.cxx.
References m_DimList.
Referenced by ScDBFunc::MakePivotTable().
ScDPSaveData & ScDPSaveData::operator= | ( | const ScDPSaveData & | r | ) |
Definition at line 722 of file dpsave.cxx.
References ~ScDPSaveData().
bool ScDPSaveData::operator== | ( | const ScDPSaveData & | r | ) | const |
Definition at line 732 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 1160 of file dpsave.cxx.
References ScDPSaveGroupDimension::GetGroupDimName(), pDimensionData, and RemoveDimensionByName().
void ScDPSaveData::RemoveDimensionByName | ( | const OUString & | rName | ) |
Definition at line 900 of file dpsave.cxx.
References DimensionsChanged(), m_DimList, and RemoveDuplicateNameCount().
Referenced by ScDataPilotFieldObj::createDateGroup(), and RemoveAllGroupDimensions().
|
private |
Definition at line 1345 of file dpsave.cxx.
References ScDPUtil::getSourceDimensionName(), ScDPUtil::isDuplicateDimension(), and maDupNameCounts.
Referenced by RemoveDimensionByName().
void ScDPSaveData::SetColumnGrand | ( | bool | bSet | ) |
Definition at line 985 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 1204 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 1010 of file dpsave.cxx.
References bDrillDown.
Referenced by ScPivotLayoutDialog::ApplySaveData(), XclImpPivotTable::Convert(), and ScDataPilotDescriptorBase::setPropertyValue().
void ScDPSaveData::SetFilterButton | ( | bool | bSet | ) |
Definition at line 1005 of file dpsave.cxx.
References bFilterButton.
Referenced by ScPivotLayoutDialog::ApplySaveData(), XclImpPivotTable::Convert(), and ScDataPilotDescriptorBase::setPropertyValue().
void ScDPSaveData::SetGrandTotalName | ( | const OUString & | rName | ) |
Definition at line 767 of file dpsave.cxx.
References mpGrandTotalName.
Referenced by XclImpPivotTable::Convert(), and ScDataPilotDescriptorBase::setPropertyValue().
void ScDPSaveData::SetIgnoreEmptyRows | ( | bool | bSet | ) |
Definition at line 995 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 957 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 1000 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 990 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 1030 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 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 253 of file dpsave.hxx.
Referenced by BuildAllDimensionMembers(), and operator==().
|
mutableprivate |
Definition at line 256 of file dpsave.hxx.
Referenced by DimensionsChanged(), and GetDimensionSortOrder().
|
private |
Definition at line 255 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().