[Libreoffice-commits] core.git: 2 commits - sc/qa

Pranav Kant pranavk at collabora.com
Sun Jun 19 14:03:30 UTC 2016


 sc/qa/unit/tiledrendering/tiledrendering.cxx |   26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

New commits:
commit 5bf9c67fa14e8b3c30e6ca7afc414414b4eb3ad6
Author: Pranav Kant <pranavk at collabora.com>
Date:   Sun Jun 19 19:27:36 2016 +0530

    sc lok: Unit test for empty column selection
    
    Make sure newline characters are not copied, fixed in
    82ed95b7554cfa3b5e98f67cc53c6219e3a09886
    
    Change-Id: Ic8d45ba44c1092d733bed4afc049463e546d10d9

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 8389f16..9ae9f01 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -52,6 +52,7 @@ public:
     void testSortAscendingDescending();
     void testPartHash();
     void testDocumentSize();
+    void testEmptyColumnSelection();
 #endif
 
     CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
@@ -60,6 +61,7 @@ public:
     CPPUNIT_TEST(testSortAscendingDescending);
     CPPUNIT_TEST(testPartHash);
     CPPUNIT_TEST(testDocumentSize);
+    CPPUNIT_TEST(testEmptyColumnSelection);
 #endif
     CPPUNIT_TEST_SUITE_END();
 
@@ -336,6 +338,28 @@ void ScTiledRenderingTest::testDocumentSize()
     comphelper::LibreOfficeKit::setActive(false);
 }
 
+void ScTiledRenderingTest::testEmptyColumnSelection()
+{
+    comphelper::LibreOfficeKit::setActive();
+    ScModelObj* pModelObj = createDoc("select-row-cols.ods");
+    uno::Sequence<beans::PropertyValue> aArgs(2);
+
+    // Select empty column, 1000
+    aArgs[0].Name = OUString::fromUtf8("Col");
+    aArgs[0].Value <<= static_cast<sal_Int32>(1000 - 1);
+    aArgs[1].Name = OUString::fromUtf8("Modifier");
+    aArgs[1].Value <<= static_cast<sal_uInt16>(0);
+    comphelper::dispatchCommand(".uno:SelectColumn", aArgs);
+
+    // Get plain selection
+    OString aUsedMimeType;
+    OString aResult = pModelObj->getTextSelection("text/plain;charset=utf-8", aUsedMimeType);
+    // should be an empty string
+    CPPUNIT_ASSERT_EQUAL(OString(), aResult);
+
+    comphelper::LibreOfficeKit::setActive(false);
+}
+
 #endif
 
 CPPUNIT_TEST_SUITE_REGISTRATION(ScTiledRenderingTest);
commit 3960e15735a7defb19d921bb7b861b59e7b9548c
Author: Pranav Kant <pranavk at collabora.com>
Date:   Sun Jun 19 19:11:59 2016 +0530

    sc lok: Remove useless comment/code
    
    Change-Id: I69a0c2b6810b38de5de94eb9789839a4d6de8d87

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 168987c..8389f16 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -163,8 +163,6 @@ void ScTiledRenderingTest::testRowColumnSelections()
 {
     comphelper::LibreOfficeKit::setActive();
     ScModelObj* pModelObj = createDoc("select-row-cols.ods");
-    //ScDocument* pDoc = pModelObj->GetDocument();
-
     uno::Sequence<beans::PropertyValue> aArgs(2);
 
     // Select the 5th row with no modifier


More information about the Libreoffice-commits mailing list