From 01dd299bded81700bc976881c6ea954a09015f9f Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Fri, 20 Jun 2014 09:54:25 -0400 Subject: [PATCH] fdo#71076: Write test for this. This was actually just one element of all that contributed to this bug. Unfortunately it's a bit hard to test the others. Change-Id: I7a0d88c0b829e7b7859aecfc20df87f6837ecb4a --- sc/inc/document.hxx | 5 ++-- .../data/ods/copy-merged-number-formats.ods | Bin 0 -> 23185 bytes sc/qa/unit/subsequent_filters-test.cxx | 25 ++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 sc/qa/unit/data/ods/copy-merged-number-formats.ods diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 700086dae7f1..5d6cc276153b 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1217,13 +1217,14 @@ public: /** * Copy only raw cell values to another document. Formula cells are - * converted to raw cells. No formatting info are copied. + * converted to raw cells. No formatting info are copied except for + * number formats. * * @param rSrcRange source range in the source document * @param nDestTab table in the clip document to copy to. * @param pDestDoc document to copy to */ - void CopyStaticToDocument(const ScRange& rSrcRange, SCTAB nDestTab, ScDocument* pDestDoc); + SC_DLLPUBLIC void CopyStaticToDocument(const ScRange& rSrcRange, SCTAB nDestTab, ScDocument* pDestDoc); /** * Copy only cell, nothing but cell to another document. diff --git a/sc/qa/unit/data/ods/copy-merged-number-formats.ods b/sc/qa/unit/data/ods/copy-merged-number-formats.ods new file mode 100644 index 0000000000000000000000000000000000000000..39555e0b44808c346f6f2e3c180170af2aafa9df GIT binary patch literal 23185 zcmb5W1ymf(x-N{nJA~lw5L|+Lu;A_%++BjZy95vJ4#C~s9fG?%{LQ!bIrrYR_C5c) zv(_ZTKzG$tS3U0|H7zd<4uJsz0s{haA37-#Xvr1E00IK?@dVxiu`;(Zc675f*0;5_ zG&j_DG`F#4bhb8Pu+eugcVMuwHMTagF?6yrwsvH2u(dbVH*zpDHg=T%KhBA}U9a3q z0|N5#!~xE!WaeaLV6AU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eb{{fKXFpB^H literal 0 HcmV?d00001 diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 2e5a8f6df0d4..bdc58b840d0f 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -174,6 +174,7 @@ public: void testExternalRefCacheXLSX(); void testExternalRefCacheODS(); void testHybridSharedStringODS(); + void testCopyMergedNumberFormats(); CPPUNIT_TEST_SUITE(ScFiltersTest); CPPUNIT_TEST(testBasicCellContentODS); @@ -252,6 +253,7 @@ public: CPPUNIT_TEST(testExternalRefCacheXLSX); CPPUNIT_TEST(testExternalRefCacheODS); CPPUNIT_TEST(testHybridSharedStringODS); + CPPUNIT_TEST(testCopyMergedNumberFormats); CPPUNIT_TEST_SUITE_END(); private: @@ -2583,6 +2585,29 @@ void ScFiltersTest::testHybridSharedStringODS() xDocSh->DoClose(); } +void ScFiltersTest::testCopyMergedNumberFormats() +{ + ScDocShellRef xDocSh = loadDoc("copy-merged-number-formats.", ODS); + CPPUNIT_ASSERT(xDocSh.Is()); + ScDocument* pDoc = xDocSh->GetDocument(); + + // Cells B1, C1 and D1 are formatted as dates. + OUString aStrB1 = pDoc->GetString(ScAddress(1,0,0)); + OUString aStrC1 = pDoc->GetString(ScAddress(2,0,0)); + OUString aStrD1 = pDoc->GetString(ScAddress(3,0,0)); + + ScDocument aCopyDoc; + aCopyDoc.InsertTab(0, "CopyHere"); + pDoc->CopyStaticToDocument(ScRange(1,0,0,3,0,0), 0, &aCopyDoc); + + // Make sure the date formats are copied to the new document. + CPPUNIT_ASSERT_EQUAL(aStrB1, aCopyDoc.GetString(ScAddress(1,0,0))); + CPPUNIT_ASSERT_EQUAL(aStrC1, aCopyDoc.GetString(ScAddress(2,0,0))); + CPPUNIT_ASSERT_EQUAL(aStrD1, aCopyDoc.GetString(ScAddress(3,0,0))); + + xDocSh->DoClose(); +} + ScFiltersTest::ScFiltersTest() : ScBootstrapFixture( "/sc/qa/unit/data" ) {