sw/qa/extras/rtfimport/rtfimport.cxx  |    2 +-
 sw/qa/extras/txtexport/txtexport.cxx  |    2 +-
 sw/qa/extras/ww8export/ww8export2.cxx |    2 +-
 sw/qa/filter/ww8/ww8.cxx              |    8 ++++----
 sw/qa/uibase/uno/uno.cxx              |    2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 0b3ef02e8b5bbf7ca76ec4c46c0bd5b5651723bb
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Fri Nov 25 10:41:28 2022 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri Nov 25 13:31:54 2022 +0100

    SwModelTestBase: use createSwDoc
    
    in order to unify the code
    
    Change-Id: Iedeff59cc45775c80844e8e030f61354325399da
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143282
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx 
b/sw/qa/extras/rtfimport/rtfimport.cxx
index e7392d333068..eb8107f2f270 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1018,7 +1018,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo85179)
 CPPUNIT_TEST_FIXTURE(Test, testPasteFirstParaDirectFormat)
 {
     // Create a new document.
-    mxComponent = loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument");
+    createSwDoc();
     {
         // Set some direct formatting on the first paragraph, but leave 
paragraph adjust at its
         // default (left).
diff --git a/sw/qa/extras/txtexport/txtexport.cxx 
b/sw/qa/extras/txtexport/txtexport.cxx
index 99315fe44deb..338af339884e 100644
--- a/sw/qa/extras/txtexport/txtexport.cxx
+++ b/sw/qa/extras/txtexport/txtexport.cxx
@@ -109,7 +109,7 @@ DECLARE_TXTEXPORT_TEST(testTdf142669_utf16le, 
"UTF16LECRLF.txt")
 CPPUNIT_TEST_FIXTURE(TxtExportTest, testClearingBreakExport)
 {
     // Given a document with a clearing break:
-    mxComponent = loadFromDesktop("private:factory/swriter");
+    createSwDoc();
     uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, 
uno::UNO_QUERY);
     uno::Reference<text::XTextDocument> xTextDocument(mxComponent, 
uno::UNO_QUERY);
     uno::Reference<text::XTextContent> xLineBreak(
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx 
b/sw/qa/extras/ww8export/ww8export2.cxx
index f61d1ff4f115..9f33c596c83f 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -1082,7 +1082,7 @@ DECLARE_WW8EXPORT_TEST(testTdf118412, "tdf118412.doc")
 CPPUNIT_TEST_FIXTURE(Test, testContentControlExport)
 {
     // Given a document with a (rich text) content control:
-    mxComponent = loadFromDesktop("private:factory/swriter");
+    createSwDoc();
     uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, 
uno::UNO_QUERY);
     uno::Reference<text::XTextDocument> xTextDocument(mxComponent, 
uno::UNO_QUERY);
     uno::Reference<text::XText> xText = xTextDocument->getText();
diff --git a/sw/qa/filter/ww8/ww8.cxx b/sw/qa/filter/ww8/ww8.cxx
index 0810a15a54c3..8a2f97438d7b 100644
--- a/sw/qa/filter/ww8/ww8.cxx
+++ b/sw/qa/filter/ww8/ww8.cxx
@@ -61,7 +61,7 @@ CPPUNIT_TEST_FIXTURE(Test, testNegativePageBorderDocImport)
 CPPUNIT_TEST_FIXTURE(Test, testPlainTextContentControlExport)
 {
     // Given a document with a plain text content control around a text 
portion:
-    mxComponent = loadFromDesktop("private:factory/swriter");
+    createSwDoc();
     uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, 
uno::UNO_QUERY);
     uno::Reference<text::XTextDocument> xTextDocument(mxComponent, 
uno::UNO_QUERY);
     uno::Reference<text::XText> xText = xTextDocument->getText();
@@ -91,7 +91,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPlainTextContentControlExport)
 CPPUNIT_TEST_FIXTURE(Test, testDocxComboBoxContentControlExport)
 {
     // Given a document with a combo box content control around a text portion:
-    mxComponent = loadFromDesktop("private:factory/swriter");
+    createSwDoc();
     SwDoc* pDoc = getSwDoc();
     SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
     pWrtShell->InsertContentControl(SwContentControlType::COMBO_BOX);
@@ -113,7 +113,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDocxHyperlinkShape)
 {
     // Given a document with a hyperlink at char positions 0 -> 6 and a shape 
with text anchored at
     // char position 6:
-    mxComponent = loadFromDesktop("private:factory/swriter");
+    createSwDoc();
     uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, 
uno::UNO_QUERY);
     uno::Reference<text::XTextDocument> xTextDocument(mxComponent, 
uno::UNO_QUERY);
     uno::Reference<text::XText> xText = xTextDocument->getText();
@@ -144,7 +144,7 @@ CPPUNIT_TEST_FIXTURE(Test, 
testDocxContentControlDropdownEmptyDisplayText)
 {
     // Given a document with a dropdown content control, the only list item 
has no display text
     // (only a value):
-    mxComponent = loadFromDesktop("private:factory/swriter");
+    createSwDoc();
     SwDoc* pDoc = getSwDoc();
     SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
     pWrtShell->InsertContentControl(SwContentControlType::DROP_DOWN_LIST);
diff --git a/sw/qa/uibase/uno/uno.cxx b/sw/qa/uibase/uno/uno.cxx
index 3364ef8b0cd2..62af105d24dc 100644
--- a/sw/qa/uibase/uno/uno.cxx
+++ b/sw/qa/uibase/uno/uno.cxx
@@ -39,7 +39,7 @@ public:
 
 CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, testLockControllers)
 {
-    mxComponent = loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument");
+    createSwDoc();
     {
         uno::Reference<frame::XModel> xModel(mxComponent, 
uno::UNO_QUERY_THROW);
         xModel->lockControllers();

Reply via email to