summaryrefslogtreecommitdiff
path: root/sc/source/core/data/dpsave.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2012-02-17 23:37:45 -0500
committerKohei Yoshida <kohei.yoshida@suse.com>2012-02-22 14:02:05 -0500
commit057d4db997796fa47f71c31b3bcda892c97d65c7 (patch)
tree19defcabedfd982011e14dfadb2408250bd229a3 /sc/source/core/data/dpsave.cxx
parentb6ddd7008b4a7331d6dd1d7fdfcc342c41fbd06a (diff)
Properly transfer layout and subtotal names before and after the dialog.
Diffstat (limited to 'sc/source/core/data/dpsave.cxx')
-rw-r--r--sc/source/core/data/dpsave.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 27d6c686ca23..a16732c13176 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -422,6 +422,11 @@ const OUString* ScDPSaveDimension::GetSubtotalName() const
return mpSubtotalName.get();
}
+void ScDPSaveDimension::RemoveSubtotalName()
+{
+ mpSubtotalName.reset();
+}
+
bool ScDPSaveDimension::IsMemberNameInUse(const OUString& rName) const
{
MemberList::const_iterator itr = maMemberList.begin(), itrEnd = maMemberList.end();
@@ -904,9 +909,11 @@ ScDPSaveDimension* ScDPSaveData::GetExistingDataLayoutDimension() const
ScDPSaveDimension* ScDPSaveData::DuplicateDimension(const ::rtl::OUString& rName)
{
// always insert new
- //! check if dimension is there?
- ScDPSaveDimension* pOld = GetDimensionByName( rName );
+ ScDPSaveDimension* pOld = GetExistingDimensionByName(rName);
+ if (!pOld)
+ return NULL;
+
ScDPSaveDimension* pNew = new ScDPSaveDimension( *pOld );
pNew->SetDupFlag( true );
aDimList.push_back(pNew);