Skip to content

Commit

Permalink
BootstrapFixture: get rid of mxComponentContext
Browse files Browse the repository at this point in the history
Change-Id: I0318485c3c0159277e47096e0c7e0df8ed109ea4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169865
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
  • Loading branch information
Xisco Fauli committed Jul 2, 2024
1 parent 49e3ebc commit 83a8d5a
Show file tree
Hide file tree
Showing 45 changed files with 85 additions and 93 deletions.
3 changes: 1 addition & 2 deletions extensions/qa/bibliography/bibliography.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ class Test : public test::BootstrapFixture, public unotest::MacrosTest
CPPUNIT_TEST_FIXTURE(Test, testBibliographyLoader)
{
// Given a bibliography provider:
uno::Reference<container::XNameAccess> xBibAccess
= frame::Bibliography::create(mxComponentContext);
uno::Reference<container::XNameAccess> xBibAccess = frame::Bibliography::create(m_xContext);
uno::Reference<beans::XPropertySet> xPropSet(xBibAccess, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aSeq;

Expand Down
2 changes: 1 addition & 1 deletion filter/qa/pdf.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSignCertificateSubjectName)
return;

uno::Reference<xml::crypto::XSEInitializer> xSEInitializer
= xml::crypto::SEInitializer::create(mxComponentContext);
= xml::crypto::SEInitializer::create(m_xContext);
uno::Reference<xml::crypto::XXMLSecurityContext> xSecurityContext
= xSEInitializer->createSecurityContext(OUString());
uno::Reference<xml::crypto::XSecurityEnvironment> xSecurityEnvironment
Expand Down
4 changes: 2 additions & 2 deletions framework/qa/cppunit/CheckXTitle.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ CPPUNIT_TEST_FIXTURE(Test, checkDefaultTitle)
uno::Reference<frame::XTitle> xTitle(xFrame, css::uno::UNO_QUERY);
OUString defaultTitle = xTitle->getTitle();

uno::Reference<util::XURLTransformer> xParser(util::URLTransformer::create(mxComponentContext));
uno::Reference<util::XURLTransformer> xParser(util::URLTransformer::create(m_xContext));

// Open print preview window and get title.
util::URL printPreviewURL;
Expand Down Expand Up @@ -113,7 +113,7 @@ CPPUNIT_TEST_FIXTURE(Test, setTitleAndCheck)

uno::Reference<frame::XDispatchProvider> xDispatchProvider(xModel->getCurrentController(),
uno::UNO_QUERY);
uno::Reference<util::XURLTransformer> xParser(util::URLTransformer::create(mxComponentContext));
uno::Reference<util::XURLTransformer> xParser(util::URLTransformer::create(m_xContext));

util::URL printPreviewURL;
printPreviewURL.Complete = u".uno::PrintPreview"_ustr;
Expand Down
2 changes: 1 addition & 1 deletion framework/qa/cppunit/dispatchtest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ CPPUNIT_TEST_FIXTURE(DispatchTest, testSfxOfficeDispatchDispose)
uno::Reference<frame::XDispatchProvider> xFrame(xController->getFrame(), uno::UNO_QUERY);
CPPUNIT_ASSERT(xFrame.is());

uno::Reference<util::XURLTransformer> xParser(util::URLTransformer::create(mxComponentContext));
uno::Reference<util::XURLTransformer> xParser(util::URLTransformer::create(m_xContext));
util::URL url;
url.Complete = xModel->getURL() + "#dummy";
xParser->parseStrict(url);
Expand Down
2 changes: 1 addition & 1 deletion framework/qa/cppunit/services.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ CPPUNIT_TEST_FIXTURE(Test, testURLTransformer_parseSmart)

css::util::URL aURL;
aURL.Complete = "www.example.com:8080/foo/bar?q=baz#F";
css::uno::Reference xParser(css::util::URLTransformer::create(mxComponentContext));
css::uno::Reference xParser(css::util::URLTransformer::create(m_xContext));
CPPUNIT_ASSERT(xParser->parseSmart(aURL, u"http:"_ustr));
CPPUNIT_ASSERT_EQUAL(u"http://www.example.com:8080/foo/bar?q=baz#F"_ustr, aURL.Complete);
CPPUNIT_ASSERT_EQUAL(u"http://www.example.com:8080/foo/bar"_ustr, aURL.Main);
Expand Down
18 changes: 9 additions & 9 deletions i18npool/qa/cppunit/test_defaultnumberingprovider.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testNumberingIdentifi
std::vector<OString> aFail;

uno::Reference<text::XNumberingTypeInfo> xFormatter(
text::DefaultNumberingProvider::create(mxComponentContext), uno::UNO_QUERY);
text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY);

// Do not use getSupportedNumberingTypes() because it depends on
// configuration whether CTL and CJK numberings are included or not.
Expand Down Expand Up @@ -83,7 +83,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testArabicZero)
{
// 1 -> "01"
uno::Reference<text::XNumberingFormatter> xFormatter(
text::DefaultNumberingProvider::create(mxComponentContext), uno::UNO_QUERY);
text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aProperties = {
comphelper::makePropertyValue(u"NumberingType"_ustr,
static_cast<sal_uInt16>(style::NumberingType::ARABIC_ZERO)),
Expand All @@ -109,7 +109,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testArabicZero3)
{
// 10 -> "010"
uno::Reference<text::XNumberingFormatter> xFormatter(
text::DefaultNumberingProvider::create(mxComponentContext), uno::UNO_QUERY);
text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aProperties = {
comphelper::makePropertyValue(u"NumberingType"_ustr,
static_cast<sal_uInt16>(style::NumberingType::ARABIC_ZERO3)),
Expand All @@ -135,7 +135,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testArabicZero4)
{
// 100 -> "0100"
uno::Reference<text::XNumberingFormatter> xFormatter(
text::DefaultNumberingProvider::create(mxComponentContext), uno::UNO_QUERY);
text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aProperties = {
comphelper::makePropertyValue(u"NumberingType"_ustr,
static_cast<sal_uInt16>(style::NumberingType::ARABIC_ZERO4)),
Expand All @@ -161,7 +161,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testArabicZero5)
{
// 1000 -> "01000"
uno::Reference<text::XNumberingFormatter> xFormatter(
text::DefaultNumberingProvider::create(mxComponentContext), uno::UNO_QUERY);
text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aProperties = {
comphelper::makePropertyValue(u"NumberingType"_ustr,
static_cast<sal_uInt16>(style::NumberingType::ARABIC_ZERO5)),
Expand All @@ -187,7 +187,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanCounting)
{
// 1 -> "일"
uno::Reference<text::XNumberingFormatter> xFormatter(
text::DefaultNumberingProvider::create(mxComponentContext), uno::UNO_QUERY);
text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aProperties = {
comphelper::makePropertyValue(
u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_HANGUL_KO)),
Expand Down Expand Up @@ -222,7 +222,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal)
{
// 1 -> "하나"
uno::Reference<text::XNumberingFormatter> xFormatter(
text::DefaultNumberingProvider::create(mxComponentContext), uno::UNO_QUERY);
text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aProperties = {
comphelper::makePropertyValue(
u"NumberingType"_ustr, static_cast<sal_uInt16>(style::NumberingType::NUMBER_LEGAL_KO)),
Expand Down Expand Up @@ -399,7 +399,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital)
{
// 1 -> "일"
uno::Reference<text::XNumberingFormatter> xFormatter(
text::DefaultNumberingProvider::create(mxComponentContext), uno::UNO_QUERY);
text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aProperties = {
comphelper::makePropertyValue(
u"NumberingType"_ustr,
Expand Down Expand Up @@ -437,7 +437,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital2)
{
// 1 -> "一"
uno::Reference<text::XNumberingFormatter> xFormatter(
text::DefaultNumberingProvider::create(mxComponentContext), uno::UNO_QUERY);
text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aProperties = {
comphelper::makePropertyValue(
u"NumberingType"_ustr,
Expand Down
2 changes: 0 additions & 2 deletions include/test/bootstrapfixture.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ class OOO_DLLPUBLIC_TEST BootstrapFixture : public BootstrapFixtureBase
bool m_bAssertOnDialog;

protected:
css::uno::Reference<css::uno::XComponentContext> mxComponentContext;

// A convenience function to be used to conditionally exclude tests not behaving properly
// on UI scaling other than 1:1. Using this should be considered a temporary workaround,
// until a proper fix is implemented that either considers the DPI properly in the test, or
Expand Down
4 changes: 2 additions & 2 deletions sd/qa/unit/export-tests-ooxml3.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf115005)

// additional checks of the output file
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
= packages::zip::ZipFileAccess::createWithURL(mxComponentContext, maTempFile.GetURL());
= packages::zip::ZipFileAccess::createWithURL(m_xContext, maTempFile.GetURL());

// check that the document contains original vector images
const uno::Sequence<OUString> names = xNameAccess->getElementNames();
Expand Down Expand Up @@ -352,7 +352,7 @@ int SdOOXMLExportTest3::testTdf115005_FallBack_Images(bool bAddReplacementImages

// additional checks of the output file
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
= packages::zip::ZipFileAccess::createWithURL(mxComponentContext, maTempFile.GetURL());
= packages::zip::ZipFileAccess::createWithURL(m_xContext, maTempFile.GetURL());

// check that the document contains original vector images
const uno::Sequence<OUString> names = xNameAccess->getElementNames();
Expand Down
2 changes: 1 addition & 1 deletion svx/qa/unit/unodraw.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testWriterGraphicExport)

// Export it as JPEG.
uno::Reference<drawing::XGraphicExportFilter> xExportFilter
= drawing::GraphicExportFilter::create(mxComponentContext);
= drawing::GraphicExportFilter::create(m_xContext);
// This resulted in a css::lang::IllegalArgumentException for a Writer
// picture.
xExportFilter->setSourceDocument(xShape);
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXAutoTextContainer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class SwXAutoTextContainer final : public UnoApiTest,
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
}

Reference<XInterface> init() override
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXBookmark.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class SwXBookmark final : public UnoApiTest,
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXBookmarks.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class SwXBookmarks final : public UnoApiTest,
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXChapterNumbering.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class SwXChapterNumbering final : public UnoApiTest,
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXDocumentIndex.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class SwXDocumentIndex final : public UnoApiTest,
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXDocumentIndexMark.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void SwXDocumentIndexMark::setUp()
{
test::BootstrapFixture::setUp();

mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxTextDocument = uno::Reference<text::XTextDocument>(
loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr),
uno::UNO_QUERY_THROW);
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXDocumentIndexes.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class SwXDocumentIndexes final : public UnoApiTest,
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXDocumentSettings.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void SwXDocumentSettings::setUp()
{
test::BootstrapFixture::setUp();

mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
}

void SwXDocumentSettings::tearDown()
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXFieldEnumeration.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class SwXFieldEnumeration final : public UnoApiTest, public apitest::XEnumeratio
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXFootnote.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void SwXFootnote::setUp()
{
test::BootstrapFixture::setUp();

mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxTextDocument = Reference<text::XTextDocument>(
loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr),
uno::UNO_QUERY_THROW);
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXFootnotes.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class SwXFootnotes final : public UnoApiTest,
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXFrames.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class SwXFramesText final : public UnoApiTest,
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXNumberingRules.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class SwXNumberingRules final : public UnoApiTest,
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXParagraphEnumeration.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class SwXParagraphEnumeration final : public UnoApiTest, public apitest::XEnumer
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXReferenceMark.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class SwXReferenceMark final : public UnoApiTest,
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXReferenceMarks.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class SwXReferenceMarks final : public UnoApiTest,
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXStyleFamilies.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class SwXStyleFamilies final : public UnoApiTest,
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXTableCellText.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class SwXTableCellText final : public UnoApiTest,
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXTextEmbeddedObjects.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class SwXTextEmbeddedObjects final : public UnoApiTest,
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXTextField.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct SwXTextField final : public UnoApiTest,
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXTextFieldMasters.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class SwXTextFieldMasters final : public UnoApiTest,
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXTextFieldTypes.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class SwXTextFieldTypes final : public UnoApiTest,
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXTextFrame.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class SwXTextFrame final : public UnoApiTest,
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXTextSections.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class SwXTextSections final : public UnoApiTest,
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
2 changes: 1 addition & 1 deletion sw/qa/api/SwXTextTables.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class SwXTextTables final : public UnoApiTest,
virtual void setUp() override
{
UnoApiTest::setUp();
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxDesktop.set(frame::Desktop::create(m_xContext));
mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
CPPUNIT_ASSERT(mxComponent.is());
}
Expand Down
Loading

0 comments on commit 83a8d5a

Please sign in to comment.