diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-02-17 23:37:45 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-02-22 14:02:05 -0500 |
commit | 057d4db997796fa47f71c31b3bcda892c97d65c7 (patch) | |
tree | 19defcabedfd982011e14dfadb2408250bd229a3 /sc/source/core/data/dpsave.cxx | |
parent | b6ddd7008b4a7331d6dd1d7fdfcc342c41fbd06a (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.cxx | 11 |
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); |