[Libreoffice-commits] core.git: sd/qa

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Sep 22 17:38:22 UTC 2018


 sd/qa/unit/data/tdf67248.odg |binary
 sd/qa/unit/misc-tests.cxx    |   15 +++++++++++++++
 2 files changed, 15 insertions(+)

New commits:
commit 47f84e024344d9a50e44dda4f947945e8fc643b5
Author:     Regina Henschel <rb.henschel at t-online.de>
AuthorDate: Sat Sep 22 12:52:37 2018 +0200
Commit:     Regina Henschel <rb.henschel at t-online.de>
CommitDate: Sat Sep 22 19:38:01 2018 +0200

    tdf#67248 unittest for: Use localized layer name only ...
    
    for display in UI. The test counts the layers. The error was, that a
    user layer was merged into a standard layer.
    
    Change-Id: Ib73e14965689b005a7d42811b6de9126dd3ef57d
    Reviewed-on: https://gerrit.libreoffice.org/60892
    Tested-by: Jenkins
    Reviewed-by: Regina Henschel <rb.henschel at t-online.de>

diff --git a/sd/qa/unit/data/tdf67248.odg b/sd/qa/unit/data/tdf67248.odg
new file mode 100644
index 000000000000..03417effa62d
Binary files /dev/null and b/sd/qa/unit/data/tdf67248.odg differ
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index a3e717cca5e6..df038e5fde65 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -67,6 +67,7 @@ public:
     void testTdf101242_ODF();
     void testTdf101242_settings();
     void testTdf119392();
+    void testTdf67248();
 
     CPPUNIT_TEST_SUITE(SdMiscTest);
     CPPUNIT_TEST(testTdf96206);
@@ -79,6 +80,7 @@ public:
     CPPUNIT_TEST(testTdf101242_ODF);
     CPPUNIT_TEST(testTdf101242_settings);
     CPPUNIT_TEST(testTdf119392);
+    CPPUNIT_TEST(testTdf67248);
     CPPUNIT_TEST_SUITE_END();
 
 virtual void registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) override
@@ -535,6 +537,19 @@ void SdMiscTest::testTdf119392()
     xDocShRef->DoClose();
 }
 
+void SdMiscTest::testTdf67248()
+{
+    // The document tdf67248.odg has been created with a German UI. It has a user layer named "Background".
+    // On opening the user layer must still exists. The error was, that it was merged into the standard
+    // layer "background".
+    sd::DrawDocShellRef xDocShRef = Load(m_directories.getURLFromSrc("/sd/qa/unit/data/tdf67248.odg"), ODG);
+    CPPUNIT_ASSERT_MESSAGE("Failed to load file.", xDocShRef.is());
+    SdrLayerAdmin& rLayerAdmin = xDocShRef->GetDoc()->GetLayerAdmin();
+    CPPUNIT_ASSERT_EQUAL( sal_uInt16(6), rLayerAdmin.GetLayerCount());
+
+    xDocShRef->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdMiscTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();


More information about the Libreoffice-commits mailing list