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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Apr 24 18:23:23 UTC 2020


 desktop/qa/desktop_lib/test_desktop_lib.cxx |   14 ++++++--------
 svx/source/tbxctrls/tbcontrl.cxx            |    1 -
 2 files changed, 6 insertions(+), 9 deletions(-)

New commits:
commit d263afb35f3532844a10c23c30e28b5360d96fe4
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Apr 24 12:53:56 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Apr 24 20:22:40 2020 +0200

    don't need to include combobox.hxx
    
    Change-Id: I3cc0fe1be7e7bc28a398c04a6702a6cd4d7d6b53
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92855
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index ce0a55d2acf8..3344279f1a78 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -19,11 +19,11 @@
 #include <boost/property_tree/json_parser.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 
-#include <vcl/combobox.hxx>
 #include <vcl/scheduler.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/syswin.hxx>
 #include <vcl/window.hxx>
+#include <vcl/ctrl.hxx>
 #include <comphelper/processfactory.hxx>
 #include <rtl/math.hxx>
 #include <rtl/uri.hxx>
@@ -1754,16 +1754,15 @@ void DesktopLOKTest::testDialogInput()
 
     Control* pCtrlFocused = GetFocusControl(pWindow.get());
     CPPUNIT_ASSERT(pCtrlFocused);
-    ComboBox* pCtrlURL = dynamic_cast<ComboBox*>(pCtrlFocused);
-    CPPUNIT_ASSERT(pCtrlURL);
-    CPPUNIT_ASSERT_EQUAL(OUString(""), pCtrlURL->GetText());
+    CPPUNIT_ASSERT_EQUAL(WindowType::COMBOBOX, pCtrlFocused->GetType());
+    CPPUNIT_ASSERT_EQUAL(OUString(""), pCtrlFocused->GetText());
 
     vcl::LOKWindowId nDialogId = pWindow->GetLOKWindowId();
     pDocument->pClass->postWindowExtTextInputEvent(pDocument, nDialogId, LOK_EXT_TEXTINPUT, "wiki.");
     pDocument->pClass->postWindowExtTextInputEvent(pDocument, nDialogId, LOK_EXT_TEXTINPUT_END, "wiki.");
     pDocument->pClass->removeTextContext(pDocument, nDialogId, 1, 0);
     Scheduler::ProcessEventsToIdle();
-    CPPUNIT_ASSERT_EQUAL(OUString("wiki"), pCtrlURL->GetText());
+    CPPUNIT_ASSERT_EQUAL(OUString("wiki"), pCtrlFocused->GetText());
 
     static_cast<SystemWindow*>(pWindow.get())->Close();
     Scheduler::ProcessEventsToIdle();
@@ -2650,9 +2649,8 @@ void DesktopLOKTest::testDialogPaste()
 
     Control* pCtrlFocused = GetFocusControl(pWindow.get());
     CPPUNIT_ASSERT(pCtrlFocused);
-    ComboBox* pCtrlURL = dynamic_cast<ComboBox*>(pCtrlFocused);
-    CPPUNIT_ASSERT(pCtrlURL);
-    CPPUNIT_ASSERT_EQUAL(OUString("www.softwarelibre.org.bo"), pCtrlURL->GetText());
+    CPPUNIT_ASSERT_EQUAL(WindowType::COMBOBOX, pCtrlFocused->GetType());
+    CPPUNIT_ASSERT_EQUAL(OUString("www.softwarelibre.org.bo"), pCtrlFocused->GetText());
 
     static_cast<SystemWindow*>(pWindow.get())->Close();
     Scheduler::ProcessEventsToIdle();
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index cf5541622150..a56ab368f12a 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -25,7 +25,6 @@
 #include <svl/poolitem.hxx>
 #include <svl/itemset.hxx>
 #include <vcl/commandinfoprovider.hxx>
-#include <vcl/combobox.hxx>
 #include <vcl/event.hxx>
 #include <vcl/toolbox.hxx>
 #include <vcl/customweld.hxx>


More information about the Libreoffice-commits mailing list