sw/qa/extras/uiwriter/uiwriter.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit c8968b12f9ae88f592d8a8d17cdecfae8aa8722e
Author: Miklos Vajna <[email protected]>
Date:   Mon Sep 26 17:51:17 2016 +0200

    CppunitTest_sw_uiwriter: avoid SfxLokHelper
    
    It assumes that the process has only a single document opened
    (createView() creates a new window on the frame returned by
    SfxViewFrame::First()), while it's possible that in this test an other
    testcase forgot to dispose its component.
    
    This way testCursorWindows() depends less on other testcases, and
    ideally all testcases should be entirely independent of each other.
    
    Change-Id: I35decb0b69aeebd3984f4da4386c696a63fe3e04
    Reviewed-on: https://gerrit.libreoffice.org/29300
    Reviewed-by: Miklos Vajna <[email protected]>
    Tested-by: Jenkins <[email protected]>

diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index d6208c7..d6deb9d 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -91,7 +91,8 @@
 #include <comphelper/propertysequence.hxx>
 #include <sfx2/classificationhelper.hxx>
 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
-#include <sfx2/lokhelper.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/dispatch.hxx>
 #include <config_features.h>
 
 static const char* DATA_DIRECTORY = "/sw/qa/extras/uiwriter/data/";
@@ -3989,7 +3990,7 @@ void SwUiWriterTest::testCursorWindows()
     SwWrtShell* pWrtShell1 = pDocShell->GetWrtShell();
 
     // Create a second view and type something.
-    SfxLokHelper::createView();
+    
pDocShell->GetViewShell()->GetViewFrame()->GetDispatcher()->Execute(SID_NEWWINDOW,
 SfxCallMode::SYNCHRON | SfxCallMode::RECORD);
     SwWrtShell* pWrtShell2 = pDocShell->GetWrtShell();
     OUString aText("foo");
     pWrtShell2->Insert(aText);
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to