summaryrefslogtreecommitdiff
path: root/sc/source/core/data/document.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-06-13 11:12:50 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-06-19 14:46:56 -0400
commit1d38cb365543924f9c50014e6b2227e77de1d0c9 (patch)
tree1e77d0d2f82330f16c09cda60864824397d132c4 /sc/source/core/data/document.cxx
parent2538e30ccc2e98de92de5157ca523fdb347eb537 (diff)
fdo#71076, fdo#71767: Preserve number formats when charts are copied.
Change-Id: If5ae8852152012483237e7602e56a0c46ea8748a
Diffstat (limited to 'sc/source/core/data/document.cxx')
-rw-r--r--sc/source/core/data/document.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 4df3001cecf9..fa71aa0d3c66 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2157,8 +2157,12 @@ void ScDocument::CopyStaticToDocument(const ScRange& rSrcRange, SCTAB nDestTab,
if (!pSrcTab || !pDestTab)
return;
+ pDestDoc->GetFormatTable()->MergeFormatter(*GetFormatTable());
+ SvNumberFormatterMergeMap aMap = pDestDoc->GetFormatTable()->ConvertMergeTableToMap();
+
pSrcTab->CopyStaticToDocument(
- rSrcRange.aStart.Col(), rSrcRange.aStart.Row(), rSrcRange.aEnd.Col(), rSrcRange.aEnd.Row(), pDestTab);
+ rSrcRange.aStart.Col(), rSrcRange.aStart.Row(), rSrcRange.aEnd.Col(), rSrcRange.aEnd.Row(),
+ aMap, pDestTab);
}
void ScDocument::CopyCellToDocument( const ScAddress& rSrcPos, const ScAddress& rDestPos, ScDocument& rDestDoc )