diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-06-13 11:12:50 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-06-19 14:46:56 -0400 |
commit | 1d38cb365543924f9c50014e6b2227e77de1d0c9 (patch) | |
tree | 1e77d0d2f82330f16c09cda60864824397d132c4 /sc/source/core/data/document.cxx | |
parent | 2538e30ccc2e98de92de5157ca523fdb347eb537 (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.cxx | 6 |
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 ) |