desktop/qa/desktop_lib/test_desktop_lib.cxx |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

New commits:
commit 400fc54e4288bfef1e3020f338df74fb5ae55e5b
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Mon Mar 30 19:38:31 2020 -0400
Commit:     Henry Castro <hcas...@collabora.com>
CommitDate: Thu May 21 00:41:59 2020 +0200

    lok: unit test GetControlState
    
    Change-Id: I7187fe787aaed33d85ad76b612725741e9f586d9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91383
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Henry Castro <hcas...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91579
    Tested-by: Jenkins
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94518
    Tested-by: Henry Castro <hcas...@collabora.com>

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 9ce44aacafc7..6f68380daea7 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -53,6 +53,7 @@
 #include <config_mpl.h>
 
 #include <lib/init.hxx>
+#include <svx/svxids.hrc>
 
 using namespace com::sun::star;
 using namespace desktop;
@@ -149,6 +150,7 @@ public:
     void testShowHideDialog();
     void testDialogInput();
     void testCalcSaveAs();
+    void testControlState();
     void testABI();
 
     CPPUNIT_TEST_SUITE(DesktopLOKTest);
@@ -207,6 +209,7 @@ public:
     CPPUNIT_TEST(testShowHideDialog);
     CPPUNIT_TEST(testDialogInput);
     CPPUNIT_TEST(testCalcSaveAs);
+    CPPUNIT_TEST(testControlState);
     CPPUNIT_TEST(testABI);
     CPPUNIT_TEST_SUITE_END();
 
@@ -2732,6 +2735,19 @@ void DesktopLOKTest::testCalcSaveAs()
     CPPUNIT_ASSERT_EQUAL(OString("X"), aView.m_aCellFormula);
 }
 
+void DesktopLOKTest::testControlState()
+{
+    LibLODocument_Impl* pDocument = loadDoc("search.ods");
+    pDocument->pClass->postUnoCommand(pDocument, ".uno:StarShapes", nullptr, 
false);
+    Scheduler::ProcessEventsToIdle();
+
+    boost::property_tree::ptree aState;
+    SfxViewShell* pViewShell = SfxViewShell::Current();
+    pViewShell->GetViewFrame()->GetBindings().Update();
+    
pViewShell->GetViewFrame()->GetBindings().QueryControlState(SID_ATTR_TRANSFORM_WIDTH,
 aState);
+    CPPUNIT_ASSERT(!aState.empty());
+}
+
 namespace {
 
 constexpr size_t classOffset(int i)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to