[Libreoffice-commits] core.git: sw/qa sw/source

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Fri May 8 20:44:11 UTC 2020


 sw/qa/extras/tiledrendering/tiledrendering.cxx |   19 +------------------
 sw/source/core/crsr/bookmrk.cxx                |    3 +++
 2 files changed, 4 insertions(+), 18 deletions(-)

New commits:
commit 13e5f0cdcf8df61276e8aa05920d4e7ba3ae94c1
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Thu May 7 12:08:39 2020 +0200
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Fri May 8 22:43:27 2020 +0200

    lok: MSForms: dont send form field button data with empty text area.
    
    Change-Id: I88d793765b58a3c483aad51d1a0e2e9f0159d5f1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93660
    Tested-by: Jenkins
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index c8ecee6fa5b0..f7cc2d67d16f 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -2555,24 +2555,7 @@ void SwTiledRenderingTest::testDropDownFormFieldButton()
 
     // Move the cursor to trigger displaying of the field button.
     pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
-
-    CPPUNIT_ASSERT(!m_aFormFieldButton.isEmpty());
-
-    // First we have a button with an empty text area.
-    {
-        std::stringstream aStream(m_aFormFieldButton.getStr());
-        boost::property_tree::ptree aTree;
-        boost::property_tree::read_json(aStream, aTree);
-
-        OString sAction = aTree.get_child("action").get_value<std::string>().c_str();
-        CPPUNIT_ASSERT_EQUAL(OString("show"), sAction);
-
-        OString sType = aTree.get_child("type").get_value<std::string>().c_str();
-        CPPUNIT_ASSERT_EQUAL(OString("drop-down"), sType);
-
-        OString sTextArea = aTree.get_child("textArea").get_value<std::string>().c_str();
-        CPPUNIT_ASSERT_EQUAL(OString("0, 0, -1, -1"), sTextArea);
-    }
+    CPPUNIT_ASSERT(m_aFormFieldButton.isEmpty());
 
     // Do a tile rendering to trigger the button message with a valide text area
     size_t nCanvasWidth = 1024;
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 6695d8a0aae6..38b96d053237 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -726,6 +726,9 @@ namespace sw::mark
             OStringBuffer sPayload;
             if (sAction == "show")
             {
+                if(m_aPortionPaintArea.IsEmpty())
+                    return;
+
                 sPayload = OStringLiteral("{\"action\": \"show\","
                            " \"type\": \"drop-down\", \"textArea\": \"") +
                            m_aPortionPaintArea.SVRect().toString() + "\",";


More information about the Libreoffice-commits mailing list