diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-02-14 23:05:16 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-02-15 10:53:21 -0500 |
commit | 1577fe0bad673fea0814c6db91ad5466c819306d (patch) | |
tree | e080fd68cdb0ac734920d046ec9e2718dcfa5a63 /sc | |
parent | sw: include fieldmarks in document model dump (diff) | |
download | core-1577fe0bad673fea0814c6db91ad5466c819306d.tar.gz core-1577fe0bad673fea0814c6db91ad5466c819306d.zip |
This one is less awkward.
Change-Id: I3bb9555ff4db6728a9a50ee5459faf981232445a
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/dptabres.cxx | 40 |
1 files changed, 12 insertions, 28 deletions
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx index e5395988ec0a..c21c5c1cb2be 100644 --- a/sc/source/core/data/dptabres.cxx +++ b/sc/source/core/data/dptabres.cxx @@ -734,37 +734,21 @@ void ScDPResultData::SetMeasureData( { // We need to have at least one measure data at all times. - if (rFunctions.empty()) - { - std::vector<ScSubTotalFunc> aDummy(1, SUBTOTAL_FUNC_NONE); - maMeasureFuncs.swap(aDummy); - } - else - maMeasureFuncs.swap(rFunctions); + maMeasureFuncs.swap(rFunctions); + if (maMeasureFuncs.empty()) + maMeasureFuncs.push_back(SUBTOTAL_FUNC_NONE); - if (rRefs.empty()) - { - std::vector<sheet::DataPilotFieldReference> aDummy(1); // default ctor is ok. - maMeasureRefs.swap(aDummy); - } - else - maMeasureRefs.swap(rRefs); + maMeasureRefs.swap(rRefs); + if (maMeasureRefs.empty()) + maMeasureRefs.push_back(sheet::DataPilotFieldReference()); // default ctor is ok. - if (rRefOrient.empty()) - { - std::vector<sal_uInt16> aDummy(1, sheet::DataPilotFieldOrientation_HIDDEN); - maMeasureRefOrients.swap(aDummy); - } - else - maMeasureRefOrients.swap(rRefOrient); + maMeasureRefOrients.swap(rRefOrient); + if (maMeasureRefOrients.empty()) + maMeasureRefOrients.push_back(sheet::DataPilotFieldOrientation_HIDDEN); - if (rNames.empty()) - { - std::vector<OUString> aDummy(1, ScGlobal::GetRscString(STR_EMPTYDATA)); - maMeasureNames.swap(aDummy); - } - else - maMeasureNames.swap(rNames); + maMeasureNames.swap(rNames); + if (maMeasureNames.empty()) + maMeasureNames.push_back(ScGlobal::GetRscString(STR_EMPTYDATA)); } void ScDPResultData::SetDataLayoutOrientation( sal_uInt16 nOrient ) |