diff --git a/extensions/qa/bibliography/bibliography.cxx b/extensions/qa/bibliography/bibliography.cxx index 1657fec35db9..6c716269ad9b 100644 --- a/extensions/qa/bibliography/bibliography.cxx +++ b/extensions/qa/bibliography/bibliography.cxx @@ -26,8 +26,7 @@ class Test : public test::BootstrapFixture, public unotest::MacrosTest CPPUNIT_TEST_FIXTURE(Test, testBibliographyLoader) { // Given a bibliography provider: - uno::Reference xBibAccess - = frame::Bibliography::create(mxComponentContext); + uno::Reference xBibAccess = frame::Bibliography::create(m_xContext); uno::Reference xPropSet(xBibAccess, uno::UNO_QUERY); uno::Sequence aSeq; diff --git a/filter/qa/pdf.cxx b/filter/qa/pdf.cxx index 01a77ff56ff3..d9dfc4ef17dd 100644 --- a/filter/qa/pdf.cxx +++ b/filter/qa/pdf.cxx @@ -53,7 +53,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSignCertificateSubjectName) return; uno::Reference xSEInitializer - = xml::crypto::SEInitializer::create(mxComponentContext); + = xml::crypto::SEInitializer::create(m_xContext); uno::Reference xSecurityContext = xSEInitializer->createSecurityContext(OUString()); uno::Reference xSecurityEnvironment diff --git a/framework/qa/cppunit/CheckXTitle.cxx b/framework/qa/cppunit/CheckXTitle.cxx index 175e473fdd91..ce66c7379f02 100644 --- a/framework/qa/cppunit/CheckXTitle.cxx +++ b/framework/qa/cppunit/CheckXTitle.cxx @@ -51,7 +51,7 @@ CPPUNIT_TEST_FIXTURE(Test, checkDefaultTitle) uno::Reference xTitle(xFrame, css::uno::UNO_QUERY); OUString defaultTitle = xTitle->getTitle(); - uno::Reference xParser(util::URLTransformer::create(mxComponentContext)); + uno::Reference xParser(util::URLTransformer::create(m_xContext)); // Open print preview window and get title. util::URL printPreviewURL; @@ -113,7 +113,7 @@ CPPUNIT_TEST_FIXTURE(Test, setTitleAndCheck) uno::Reference xDispatchProvider(xModel->getCurrentController(), uno::UNO_QUERY); - uno::Reference xParser(util::URLTransformer::create(mxComponentContext)); + uno::Reference xParser(util::URLTransformer::create(m_xContext)); util::URL printPreviewURL; printPreviewURL.Complete = u".uno::PrintPreview"_ustr; diff --git a/framework/qa/cppunit/dispatchtest.cxx b/framework/qa/cppunit/dispatchtest.cxx index 42cf7ceed0a4..a6c7ccd20a69 100644 --- a/framework/qa/cppunit/dispatchtest.cxx +++ b/framework/qa/cppunit/dispatchtest.cxx @@ -182,7 +182,7 @@ CPPUNIT_TEST_FIXTURE(DispatchTest, testSfxOfficeDispatchDispose) uno::Reference xFrame(xController->getFrame(), uno::UNO_QUERY); CPPUNIT_ASSERT(xFrame.is()); - uno::Reference xParser(util::URLTransformer::create(mxComponentContext)); + uno::Reference xParser(util::URLTransformer::create(m_xContext)); util::URL url; url.Complete = xModel->getURL() + "#dummy"; xParser->parseStrict(url); diff --git a/framework/qa/cppunit/services.cxx b/framework/qa/cppunit/services.cxx index baf39ffa6a3f..ccc8ae255267 100644 --- a/framework/qa/cppunit/services.cxx +++ b/framework/qa/cppunit/services.cxx @@ -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); diff --git a/i18npool/qa/cppunit/test_defaultnumberingprovider.cxx b/i18npool/qa/cppunit/test_defaultnumberingprovider.cxx index 209fb47684f6..d18bd4984814 100644 --- a/i18npool/qa/cppunit/test_defaultnumberingprovider.cxx +++ b/i18npool/qa/cppunit/test_defaultnumberingprovider.cxx @@ -32,7 +32,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testNumberingIdentifi std::vector aFail; uno::Reference 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. @@ -83,7 +83,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testArabicZero) { // 1 -> "01" uno::Reference xFormatter( - text::DefaultNumberingProvider::create(mxComponentContext), uno::UNO_QUERY); + text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY); uno::Sequence aProperties = { comphelper::makePropertyValue(u"NumberingType"_ustr, static_cast(style::NumberingType::ARABIC_ZERO)), @@ -109,7 +109,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testArabicZero3) { // 10 -> "010" uno::Reference xFormatter( - text::DefaultNumberingProvider::create(mxComponentContext), uno::UNO_QUERY); + text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY); uno::Sequence aProperties = { comphelper::makePropertyValue(u"NumberingType"_ustr, static_cast(style::NumberingType::ARABIC_ZERO3)), @@ -135,7 +135,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testArabicZero4) { // 100 -> "0100" uno::Reference xFormatter( - text::DefaultNumberingProvider::create(mxComponentContext), uno::UNO_QUERY); + text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY); uno::Sequence aProperties = { comphelper::makePropertyValue(u"NumberingType"_ustr, static_cast(style::NumberingType::ARABIC_ZERO4)), @@ -161,7 +161,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testArabicZero5) { // 1000 -> "01000" uno::Reference xFormatter( - text::DefaultNumberingProvider::create(mxComponentContext), uno::UNO_QUERY); + text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY); uno::Sequence aProperties = { comphelper::makePropertyValue(u"NumberingType"_ustr, static_cast(style::NumberingType::ARABIC_ZERO5)), @@ -187,7 +187,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanCounting) { // 1 -> "일" uno::Reference xFormatter( - text::DefaultNumberingProvider::create(mxComponentContext), uno::UNO_QUERY); + text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY); uno::Sequence aProperties = { comphelper::makePropertyValue( u"NumberingType"_ustr, static_cast(style::NumberingType::NUMBER_HANGUL_KO)), @@ -222,7 +222,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanLegal) { // 1 -> "하나" uno::Reference xFormatter( - text::DefaultNumberingProvider::create(mxComponentContext), uno::UNO_QUERY); + text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY); uno::Sequence aProperties = { comphelper::makePropertyValue( u"NumberingType"_ustr, static_cast(style::NumberingType::NUMBER_LEGAL_KO)), @@ -399,7 +399,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital) { // 1 -> "일" uno::Reference xFormatter( - text::DefaultNumberingProvider::create(mxComponentContext), uno::UNO_QUERY); + text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY); uno::Sequence aProperties = { comphelper::makePropertyValue( u"NumberingType"_ustr, @@ -437,7 +437,7 @@ CPPUNIT_TEST_FIXTURE(I18npoolDefaultnumberingproviderTest, testKoreanDigital2) { // 1 -> "一" uno::Reference xFormatter( - text::DefaultNumberingProvider::create(mxComponentContext), uno::UNO_QUERY); + text::DefaultNumberingProvider::create(m_xContext), uno::UNO_QUERY); uno::Sequence aProperties = { comphelper::makePropertyValue( u"NumberingType"_ustr, diff --git a/include/test/bootstrapfixture.hxx b/include/test/bootstrapfixture.hxx index 438bba58a431..f512cabc7784 100644 --- a/include/test/bootstrapfixture.hxx +++ b/include/test/bootstrapfixture.hxx @@ -46,8 +46,6 @@ class OOO_DLLPUBLIC_TEST BootstrapFixture : public BootstrapFixtureBase bool m_bAssertOnDialog; protected: - css::uno::Reference 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 diff --git a/sd/qa/unit/export-tests-ooxml3.cxx b/sd/qa/unit/export-tests-ooxml3.cxx index 7493b24d3162..6afd99813242 100644 --- a/sd/qa/unit/export-tests-ooxml3.cxx +++ b/sd/qa/unit/export-tests-ooxml3.cxx @@ -319,7 +319,7 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf115005) // additional checks of the output file uno::Reference 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 names = xNameAccess->getElementNames(); @@ -352,7 +352,7 @@ int SdOOXMLExportTest3::testTdf115005_FallBack_Images(bool bAddReplacementImages // additional checks of the output file uno::Reference 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 names = xNameAccess->getElementNames(); diff --git a/svx/qa/unit/unodraw.cxx b/svx/qa/unit/unodraw.cxx index e65ec6528832..8dd5fa0be530 100644 --- a/svx/qa/unit/unodraw.cxx +++ b/svx/qa/unit/unodraw.cxx @@ -60,7 +60,7 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testWriterGraphicExport) // Export it as JPEG. uno::Reference xExportFilter - = drawing::GraphicExportFilter::create(mxComponentContext); + = drawing::GraphicExportFilter::create(m_xContext); // This resulted in a css::lang::IllegalArgumentException for a Writer // picture. xExportFilter->setSourceDocument(xShape); diff --git a/sw/qa/api/SwXAutoTextContainer.cxx b/sw/qa/api/SwXAutoTextContainer.cxx index 5812e1ec0c44..4d6031a990e4 100644 --- a/sw/qa/api/SwXAutoTextContainer.cxx +++ b/sw/qa/api/SwXAutoTextContainer.cxx @@ -45,7 +45,7 @@ public: virtual void setUp() override { UnoApiTest::setUp(); - mxDesktop.set(frame::Desktop::create(mxComponentContext)); + mxDesktop.set(frame::Desktop::create(m_xContext)); } Reference init() override diff --git a/sw/qa/api/SwXBookmark.cxx b/sw/qa/api/SwXBookmark.cxx index 3e6bf37eacbb..f078357f36d1 100644 --- a/sw/qa/api/SwXBookmark.cxx +++ b/sw/qa/api/SwXBookmark.cxx @@ -42,7 +42,7 @@ public: 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()); } diff --git a/sw/qa/api/SwXBookmarks.cxx b/sw/qa/api/SwXBookmarks.cxx index a3162f0053b6..0f1de2033509 100644 --- a/sw/qa/api/SwXBookmarks.cxx +++ b/sw/qa/api/SwXBookmarks.cxx @@ -45,7 +45,7 @@ public: 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()); } diff --git a/sw/qa/api/SwXChapterNumbering.cxx b/sw/qa/api/SwXChapterNumbering.cxx index 7b090134109b..dfa9ef6145b3 100644 --- a/sw/qa/api/SwXChapterNumbering.cxx +++ b/sw/qa/api/SwXChapterNumbering.cxx @@ -44,7 +44,7 @@ public: 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()); } diff --git a/sw/qa/api/SwXDocumentIndex.cxx b/sw/qa/api/SwXDocumentIndex.cxx index 9954f5bf3955..ffe38f42eabd 100644 --- a/sw/qa/api/SwXDocumentIndex.cxx +++ b/sw/qa/api/SwXDocumentIndex.cxx @@ -58,7 +58,7 @@ public: 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()); } diff --git a/sw/qa/api/SwXDocumentIndexMark.cxx b/sw/qa/api/SwXDocumentIndexMark.cxx index 5206dbe068a5..cb736f3d60cc 100644 --- a/sw/qa/api/SwXDocumentIndexMark.cxx +++ b/sw/qa/api/SwXDocumentIndexMark.cxx @@ -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( loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr), uno::UNO_QUERY_THROW); diff --git a/sw/qa/api/SwXDocumentIndexes.cxx b/sw/qa/api/SwXDocumentIndexes.cxx index 841609df5131..08de51571932 100644 --- a/sw/qa/api/SwXDocumentIndexes.cxx +++ b/sw/qa/api/SwXDocumentIndexes.cxx @@ -46,7 +46,7 @@ public: 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()); } diff --git a/sw/qa/api/SwXDocumentSettings.cxx b/sw/qa/api/SwXDocumentSettings.cxx index 509bbfc3eb22..31fbdceef06e 100644 --- a/sw/qa/api/SwXDocumentSettings.cxx +++ b/sw/qa/api/SwXDocumentSettings.cxx @@ -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() diff --git a/sw/qa/api/SwXFieldEnumeration.cxx b/sw/qa/api/SwXFieldEnumeration.cxx index 282d0322e051..e94d43ee4a5d 100644 --- a/sw/qa/api/SwXFieldEnumeration.cxx +++ b/sw/qa/api/SwXFieldEnumeration.cxx @@ -41,7 +41,7 @@ public: 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()); } diff --git a/sw/qa/api/SwXFootnote.cxx b/sw/qa/api/SwXFootnote.cxx index 9f5d1e488bcf..f0e189e0aba2 100644 --- a/sw/qa/api/SwXFootnote.cxx +++ b/sw/qa/api/SwXFootnote.cxx @@ -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( loadFromDesktop(u"private:factory/swriter"_ustr, u"com.sun.star.text.TextDocument"_ustr), uno::UNO_QUERY_THROW); diff --git a/sw/qa/api/SwXFootnotes.cxx b/sw/qa/api/SwXFootnotes.cxx index 2d8f99aafed8..f6ac8a7e2b53 100644 --- a/sw/qa/api/SwXFootnotes.cxx +++ b/sw/qa/api/SwXFootnotes.cxx @@ -45,7 +45,7 @@ public: 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()); } diff --git a/sw/qa/api/SwXFrames.cxx b/sw/qa/api/SwXFrames.cxx index 4cf72b9d42dc..41fa1beae80c 100644 --- a/sw/qa/api/SwXFrames.cxx +++ b/sw/qa/api/SwXFrames.cxx @@ -46,7 +46,7 @@ public: 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()); } diff --git a/sw/qa/api/SwXNumberingRules.cxx b/sw/qa/api/SwXNumberingRules.cxx index 67de5660e4ca..46baadfde0b6 100644 --- a/sw/qa/api/SwXNumberingRules.cxx +++ b/sw/qa/api/SwXNumberingRules.cxx @@ -52,7 +52,7 @@ public: 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()); } diff --git a/sw/qa/api/SwXParagraphEnumeration.cxx b/sw/qa/api/SwXParagraphEnumeration.cxx index f1dbac6c7ea4..0a8f08a17ed3 100644 --- a/sw/qa/api/SwXParagraphEnumeration.cxx +++ b/sw/qa/api/SwXParagraphEnumeration.cxx @@ -42,7 +42,7 @@ public: 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()); } diff --git a/sw/qa/api/SwXReferenceMark.cxx b/sw/qa/api/SwXReferenceMark.cxx index 7cfb8e598622..a1f0814ead7f 100644 --- a/sw/qa/api/SwXReferenceMark.cxx +++ b/sw/qa/api/SwXReferenceMark.cxx @@ -44,7 +44,7 @@ public: 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()); } diff --git a/sw/qa/api/SwXReferenceMarks.cxx b/sw/qa/api/SwXReferenceMarks.cxx index 22747741c72f..f03f3e78002a 100644 --- a/sw/qa/api/SwXReferenceMarks.cxx +++ b/sw/qa/api/SwXReferenceMarks.cxx @@ -48,7 +48,7 @@ public: 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()); } diff --git a/sw/qa/api/SwXStyleFamilies.cxx b/sw/qa/api/SwXStyleFamilies.cxx index f5f959cd77cc..7c30896222e6 100644 --- a/sw/qa/api/SwXStyleFamilies.cxx +++ b/sw/qa/api/SwXStyleFamilies.cxx @@ -48,7 +48,7 @@ public: 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()); } diff --git a/sw/qa/api/SwXTableCellText.cxx b/sw/qa/api/SwXTableCellText.cxx index 0f698b37154a..568d809a933f 100644 --- a/sw/qa/api/SwXTableCellText.cxx +++ b/sw/qa/api/SwXTableCellText.cxx @@ -49,7 +49,7 @@ public: 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()); } diff --git a/sw/qa/api/SwXTextEmbeddedObjects.cxx b/sw/qa/api/SwXTextEmbeddedObjects.cxx index 36afea6ca1dc..0ee5ed269702 100644 --- a/sw/qa/api/SwXTextEmbeddedObjects.cxx +++ b/sw/qa/api/SwXTextEmbeddedObjects.cxx @@ -51,7 +51,7 @@ public: 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()); } diff --git a/sw/qa/api/SwXTextField.cxx b/sw/qa/api/SwXTextField.cxx index 2cc708380da0..fe93fc7ff141 100644 --- a/sw/qa/api/SwXTextField.cxx +++ b/sw/qa/api/SwXTextField.cxx @@ -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()); } diff --git a/sw/qa/api/SwXTextFieldMasters.cxx b/sw/qa/api/SwXTextFieldMasters.cxx index ae233d595f51..27fe5aaee579 100644 --- a/sw/qa/api/SwXTextFieldMasters.cxx +++ b/sw/qa/api/SwXTextFieldMasters.cxx @@ -45,7 +45,7 @@ public: 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()); } diff --git a/sw/qa/api/SwXTextFieldTypes.cxx b/sw/qa/api/SwXTextFieldTypes.cxx index d95b2ed85691..f11c6620d20f 100644 --- a/sw/qa/api/SwXTextFieldTypes.cxx +++ b/sw/qa/api/SwXTextFieldTypes.cxx @@ -45,7 +45,7 @@ public: 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()); } diff --git a/sw/qa/api/SwXTextFrame.cxx b/sw/qa/api/SwXTextFrame.cxx index 44d316037f4f..b01d625604df 100644 --- a/sw/qa/api/SwXTextFrame.cxx +++ b/sw/qa/api/SwXTextFrame.cxx @@ -39,7 +39,7 @@ public: 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()); } diff --git a/sw/qa/api/SwXTextSections.cxx b/sw/qa/api/SwXTextSections.cxx index b81f43866713..4bc4eb6254c9 100644 --- a/sw/qa/api/SwXTextSections.cxx +++ b/sw/qa/api/SwXTextSections.cxx @@ -49,7 +49,7 @@ public: 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()); } diff --git a/sw/qa/api/SwXTextTables.cxx b/sw/qa/api/SwXTextTables.cxx index d67e376729d4..e9d3f135ccda 100644 --- a/sw/qa/api/SwXTextTables.cxx +++ b/sw/qa/api/SwXTextTables.cxx @@ -46,7 +46,7 @@ public: 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()); } diff --git a/sw/qa/extras/uiwriter/uiwriter8.cxx b/sw/qa/extras/uiwriter/uiwriter8.cxx index 2cd9e7f888a5..31529eeb9b10 100644 --- a/sw/qa/extras/uiwriter/uiwriter8.cxx +++ b/sw/qa/extras/uiwriter/uiwriter8.cxx @@ -2432,7 +2432,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf133477) // Save the shape to a BMP. uno::Reference xGraphicExporter - = drawing::GraphicExportFilter::create(mxComponentContext); + = drawing::GraphicExportFilter::create(m_xContext); uno::Reference xSourceDoc(getShape(1), uno::UNO_QUERY); xGraphicExporter->setSourceDocument(xSourceDoc); diff --git a/test/source/a11y/accessibletestbase.cxx b/test/source/a11y/accessibletestbase.cxx index 62b8043917df..27bea36f6084 100644 --- a/test/source/a11y/accessibletestbase.cxx +++ b/test/source/a11y/accessibletestbase.cxx @@ -43,7 +43,7 @@ void test::AccessibleTestBase::setUp() { test::BootstrapFixture::setUp(); - mxDesktop = frame::Desktop::create(mxComponentContext); + mxDesktop = frame::Desktop::create(m_xContext); } void test::AccessibleTestBase::close() diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx index 273109496012..891af3c6f640 100644 --- a/test/source/bootstrapfixture.cxx +++ b/test/source/bootstrapfixture.cxx @@ -113,8 +113,6 @@ void test::BootstrapFixture::setUp() #if OSL_DEBUG_LEVEL > 0 Scheduler::ProcessEventsToIdle(); #endif - - mxComponentContext.set(comphelper::getComponentContext(getMultiServiceFactory())); } test::BootstrapFixture::~BootstrapFixture() diff --git a/toolkit/qa/cppunit/Dialog.cxx b/toolkit/qa/cppunit/Dialog.cxx index 607a1863fc0b..e41b0bf946f6 100644 --- a/toolkit/qa/cppunit/Dialog.cxx +++ b/toolkit/qa/cppunit/Dialog.cxx @@ -33,18 +33,17 @@ class DialogTest : public test::BootstrapFixture, public unotest::MacrosTest CPPUNIT_TEST_FIXTURE(DialogTest, testDialogSizeable) { uno::Reference xDialog; - uno::Reference xFactory(mxComponentContext->getServiceManager(), + uno::Reference xFactory(m_xContext->getServiceManager(), uno::UNO_SET_THROW); uno::Reference xControlModel( xFactory->createInstanceWithContext(u"com.sun.star.awt.UnoControlDialogModel"_ustr, - mxComponentContext), + m_xContext), uno::UNO_QUERY_THROW); uno::Reference xPropSet(xControlModel, uno::UNO_QUERY_THROW); xPropSet->setPropertyValue(u"Sizeable"_ustr, uno::Any(true)); - uno::Reference xControl - = awt::UnoControlDialog::create(mxComponentContext); + uno::Reference xControl = awt::UnoControlDialog::create(m_xContext); xControl->setModel(xControlModel); xControl->setVisible(true); xDialog.set(xControl, uno::UNO_QUERY_THROW); diff --git a/toolkit/qa/cppunit/EventContainer.cxx b/toolkit/qa/cppunit/EventContainer.cxx index 1551f0584a25..8bd4e57c631c 100644 --- a/toolkit/qa/cppunit/EventContainer.cxx +++ b/toolkit/qa/cppunit/EventContainer.cxx @@ -38,11 +38,10 @@ class EventContainerTest : public test::BootstrapFixture // Otherwise this would break macro signatures. CPPUNIT_TEST_FIXTURE(EventContainerTest, testInsertOrder) { - Reference xFactory(mxComponentContext->getServiceManager(), - UNO_SET_THROW); + Reference xFactory(m_xContext->getServiceManager(), UNO_SET_THROW); Reference xControlModel( xFactory->createInstanceWithContext(u"com.sun.star.awt.UnoControlDialogModel"_ustr, - mxComponentContext), + m_xContext), UNO_QUERY_THROW); Reference xPropSet(xControlModel, UNO_QUERY_THROW); diff --git a/vcl/qa/cppunit/filter/ipdf/ipdf.cxx b/vcl/qa/cppunit/filter/ipdf/ipdf.cxx index 92c024bd34fa..b2594058dd36 100644 --- a/vcl/qa/cppunit/filter/ipdf/ipdf.cxx +++ b/vcl/qa/cppunit/filter/ipdf/ipdf.cxx @@ -51,7 +51,7 @@ void VclFilterIpdfTest::setUp() UnoApiTest::setUp(); MacrosTest::setUpX509(m_directories, u"vcl_filter_ipdf"_ustr); - mxSEInitializer = xml::crypto::SEInitializer::create(mxComponentContext); + mxSEInitializer = xml::crypto::SEInitializer::create(m_xContext); mxSecurityContext = mxSEInitializer->createSecurityContext(OUString()); } diff --git a/writerperfect/qa/unit/EPUBExportTest.cxx b/writerperfect/qa/unit/EPUBExportTest.cxx index cb38c64e4d21..98471c607a03 100644 --- a/writerperfect/qa/unit/EPUBExportTest.cxx +++ b/writerperfect/qa/unit/EPUBExportTest.cxx @@ -77,8 +77,7 @@ void EPUBExportTest::createDoc(std::u16string_view rFile, else aMediaDescriptor[u"FilterOptions"_ustr] <<= maFilterOptions; xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList()); - mxZipFile - = packages::zip::ZipFileAccess::createWithURL(mxComponentContext, maTempFile.GetURL()); + mxZipFile = packages::zip::ZipFileAccess::createWithURL(m_xContext, maTempFile.GetURL()); } std::map> EPUBExportTest::parseCss(const OUString& rName) @@ -165,7 +164,7 @@ CPPUNIT_TEST_FIXTURE(EPUBExportTest, testMimetype) mpXmlDoc, "/opf:package/opf:metadata/opf:meta[@name='generator']"_ostr, "content"_ostr); CPPUNIT_ASSERT(aGenerator.startsWith(utl::DocInfoHelper::GetGeneratorString())); - uno::Reference xMSF(mxComponentContext->getServiceManager(), + uno::Reference xMSF(m_xContext->getServiceManager(), uno::UNO_QUERY); constexpr OUString aServiceName(u"com.sun.star.comp.Writer.EPUBExportFilter"_ustr); uno::Reference xFilter(xMSF->createInstance(aServiceName), uno::UNO_QUERY); diff --git a/xmlscript/qa/cppunit/test.cxx b/xmlscript/qa/cppunit/test.cxx index f09bfac589dd..8f40e4fb8269 100644 --- a/xmlscript/qa/cppunit/test.cxx +++ b/xmlscript/qa/cppunit/test.cxx @@ -70,7 +70,7 @@ void XmlScriptTest::setUp() test::BootstrapFixture::setUp(); maDataPath = "/xmlscript/qa/cppunit/data/"; - mxDesktop.set(frame::Desktop::create(mxComponentContext)); + mxDesktop.set(frame::Desktop::create(m_xContext)); } Reference XmlScriptTest::importFile(std::u16string_view sFileName) @@ -87,12 +87,12 @@ Reference XmlScriptTest::importFile(std::u16string_vi aFile.close(); Reference xDialogModel( - mxComponentContext->getServiceManager()->createInstanceWithContext( - u"com.sun.star.awt.UnoControlDialogModel"_ustr, mxComponentContext), + m_xContext->getServiceManager()->createInstanceWithContext( + u"com.sun.star.awt.UnoControlDialogModel"_ustr, m_xContext), UNO_QUERY); ::xmlscript::importDialogModel(::xmlscript::createInputStream(std::move(bytes)), xDialogModel, - mxComponentContext, nullptr); + m_xContext, nullptr); Reference xDialogModelComp(xDialogModel, UNO_QUERY); if (xDialogModelComp) @@ -105,7 +105,7 @@ void XmlScriptTest::exportToFile(std::u16string_view sURL, Reference const& xDialogModel) { Reference xProvider( - ::xmlscript::exportDialogModel(xDialogModel, mxComponentContext, nullptr)); + ::xmlscript::exportDialogModel(xDialogModel, m_xContext, nullptr)); Reference xStream(xProvider->createInputStream()); Sequence bytes; diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx index 9d774735d30c..cc688397b630 100644 --- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx +++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx @@ -73,7 +73,7 @@ void PDFSigningTest::setUp() MacrosTest::setUpX509(m_directories, u"xmlsecurity_pdfsigning"_ustr); uno::Reference xSEInitializer - = xml::crypto::SEInitializer::create(mxComponentContext); + = xml::crypto::SEInitializer::create(m_xContext); uno::Reference xSecurityContext = xSEInitializer->createSecurityContext(OUString()); #if USE_CRYPTO_NSS @@ -88,7 +88,7 @@ void PDFSigningTest::setUp() std::vector PDFSigningTest::verify(const OUString& rURL, size_t nCount) { uno::Reference xSEInitializer - = xml::crypto::SEInitializer::create(mxComponentContext); + = xml::crypto::SEInitializer::create(m_xContext); uno::Reference xSecurityContext = xSEInitializer->createSecurityContext(OUString()); std::vector aRet; @@ -116,7 +116,7 @@ bool PDFSigningTest::sign(const OUString& rInURL, const OUString& rOutURL, { // Make sure that input has nOriginalSignatureCount signatures. uno::Reference xSEInitializer - = xml::crypto::SEInitializer::create(mxComponentContext); + = xml::crypto::SEInitializer::create(m_xContext); uno::Reference xSecurityContext = xSEInitializer->createSecurityContext(OUString()); vcl::filter::PDFDocument aDocument; @@ -238,7 +238,7 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testPDFRemove) // Make sure that good.pdf has 1 valid signature. uno::Reference xSEInitializer - = xml::crypto::SEInitializer::create(mxComponentContext); + = xml::crypto::SEInitializer::create(m_xContext); uno::Reference xSecurityContext = xSEInitializer->createSecurityContext(OUString()); vcl::filter::PDFDocument aDocument; @@ -284,7 +284,7 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testPDFRemoveAll) // testPDFRemove(), here intentionally test DocumentSignatureManager and // PDFSignatureHelper code as well. uno::Reference xSEInitializer - = xml::crypto::SEInitializer::create(mxComponentContext); + = xml::crypto::SEInitializer::create(m_xContext); uno::Reference xSecurityContext = xSEInitializer->createSecurityContext(OUString()); @@ -296,7 +296,7 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testPDFRemoveAll) osl::File::RC::E_None, osl::File::copy(m_directories.getURLFromSrc(DATA_DIRECTORY) + "2good.pdf", aOutURL)); // Load the test document as a storage and read its two signatures. - DocumentSignatureManager aManager(mxComponentContext, DocumentSignatureMode::Content); + DocumentSignatureManager aManager(m_xContext, DocumentSignatureMode::Content); std::unique_ptr pStream = utl::UcbStreamHelper::CreateStream(aOutURL, StreamMode::READ | StreamMode::WRITE); uno::Reference xStream(new utl::OStreamWrapper(std::move(pStream))); @@ -320,12 +320,12 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testPDFRemoveAll) CPPUNIT_TEST_FIXTURE(PDFSigningTest, testTdf107782) { uno::Reference xSEInitializer - = xml::crypto::SEInitializer::create(mxComponentContext); + = xml::crypto::SEInitializer::create(m_xContext); uno::Reference xSecurityContext = xSEInitializer->createSecurityContext(OUString()); // Load the test document as a storage and read its signatures. - DocumentSignatureManager aManager(mxComponentContext, DocumentSignatureMode::Content); + DocumentSignatureManager aManager(m_xContext, DocumentSignatureMode::Content); OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf107782.pdf"; std::unique_ptr pStream = utl::UcbStreamHelper::CreateStream(aURL, StreamMode::READ | StreamMode::WRITE); @@ -590,13 +590,13 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testUnknownSubFilter) // Tokenize the bugdoc. uno::Reference xSEInitializer - = xml::crypto::SEInitializer::create(mxComponentContext); + = xml::crypto::SEInitializer::create(m_xContext); uno::Reference xSecurityContext = xSEInitializer->createSecurityContext(OUString()); std::unique_ptr pStream = utl::UcbStreamHelper::CreateStream( m_directories.getURLFromSrc(DATA_DIRECTORY) + "cr-comment.pdf", StreamMode::STD_READ); uno::Reference xStream(new utl::OStreamWrapper(std::move(pStream))); - DocumentSignatureManager aManager(mxComponentContext, DocumentSignatureMode::Content); + DocumentSignatureManager aManager(m_xContext, DocumentSignatureMode::Content); aManager.setSignatureStream(xStream); aManager.read(/*bUseTempStream=*/false); @@ -615,14 +615,14 @@ CPPUNIT_TEST_FIXTURE(PDFSigningTest, testGoodCustomMagic) // Tokenize the bugdoc. uno::Reference xSEInitializer - = xml::crypto::SEInitializer::create(mxComponentContext); + = xml::crypto::SEInitializer::create(m_xContext); uno::Reference xSecurityContext = xSEInitializer->createSecurityContext(OUString()); std::unique_ptr pStream = utl::UcbStreamHelper::CreateStream( m_directories.getURLFromSrc(DATA_DIRECTORY) + "good-custom-magic.pdf", StreamMode::STD_READ); uno::Reference xStream(new utl::OStreamWrapper(std::move(pStream))); - DocumentSignatureManager aManager(mxComponentContext, DocumentSignatureMode::Content); + DocumentSignatureManager aManager(m_xContext, DocumentSignatureMode::Content); aManager.setSignatureStream(xStream); aManager.read(/*bUseTempStream=*/false); diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx index 5c91c17ffb1c..0f0a4a7249f2 100644 --- a/xmlsecurity/qa/unit/signing/signing.cxx +++ b/xmlsecurity/qa/unit/signing/signing.cxx @@ -96,7 +96,7 @@ void SigningTest::setUp() MacrosTest::setUpGpg(m_directories, u"xmlsecurity_signing"_ustr); // Initialize crypto after setting up the environment variables. - mxSEInitializer = xml::crypto::SEInitializer::create(mxComponentContext); + mxSEInitializer = xml::crypto::SEInitializer::create(m_xContext); mxSecurityContext = mxSEInitializer->createSecurityContext(OUString()); #if USE_CRYPTO_NSS #ifdef NSS_USE_ALG_IN_ANY_SIGNATURE @@ -141,7 +141,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testDescription) save(u"writer8"_ustr); - DocumentSignatureManager aManager(mxComponentContext, DocumentSignatureMode::Content); + DocumentSignatureManager aManager(m_xContext, DocumentSignatureMode::Content); CPPUNIT_ASSERT(aManager.init()); uno::Reference xStorage = comphelper::OStorageHelper::GetStorageOfFormatFromURL( @@ -173,7 +173,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testECDSA) save(u"writer8"_ustr); - DocumentSignatureManager aManager(mxComponentContext, DocumentSignatureMode::Content); + DocumentSignatureManager aManager(m_xContext, DocumentSignatureMode::Content); CPPUNIT_ASSERT(aManager.init()); uno::Reference xStorage = comphelper::OStorageHelper::GetStorageOfFormatFromURL( @@ -207,7 +207,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testECDSAOOXML) save(u"MS Word 2007 XML"_ustr); - DocumentSignatureManager aManager(mxComponentContext, DocumentSignatureMode::Content); + DocumentSignatureManager aManager(m_xContext, DocumentSignatureMode::Content); CPPUNIT_ASSERT(aManager.init()); uno::Reference xStorage = comphelper::OStorageHelper::GetStorageOfFormatFromURL( @@ -243,7 +243,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testECDSAPDF) save(u"writer_pdf_Export"_ustr); - DocumentSignatureManager aManager(mxComponentContext, DocumentSignatureMode::Content); + DocumentSignatureManager aManager(m_xContext, DocumentSignatureMode::Content); CPPUNIT_ASSERT(aManager.init()); std::unique_ptr pStream(utl::UcbStreamHelper::CreateStream( maTempFile.GetURL(), StreamMode::READ | StreamMode::WRITE)); @@ -283,7 +283,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testOOXMLDescription) save(u"MS Word 2007 XML"_ustr); - DocumentSignatureManager aManager(mxComponentContext, DocumentSignatureMode::Content); + DocumentSignatureManager aManager(m_xContext, DocumentSignatureMode::Content); CPPUNIT_ASSERT(aManager.init()); uno::Reference xStorage = comphelper::OStorageHelper::GetStorageOfFormatFromURL( @@ -314,7 +314,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testOOXMLAppend) // Copy the test document to a temporary file, as it'll be modified. createTempCopy(u"partial.docx"); // Load the test document as a storage and read its single signature. - DocumentSignatureManager aManager(mxComponentContext, DocumentSignatureMode::Content); + DocumentSignatureManager aManager(m_xContext, DocumentSignatureMode::Content); CPPUNIT_ASSERT(aManager.init()); uno::Reference xStorage = comphelper::OStorageHelper::GetStorageOfFormatFromURL( @@ -344,7 +344,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testOOXMLAppend) CPPUNIT_TEST_FIXTURE(SigningTest, testOOXMLRemove) { // Load the test document as a storage and read its signatures: purpose1 and purpose2. - DocumentSignatureManager aManager(mxComponentContext, DocumentSignatureMode::Content); + DocumentSignatureManager aManager(m_xContext, DocumentSignatureMode::Content); CPPUNIT_ASSERT(aManager.init()); createTempCopy(u"multi.docx"); uno::Reference xStorage @@ -376,7 +376,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testOOXMLRemoveAll) // Copy the test document to a temporary file, as it'll be modified. createTempCopy(u"partial.docx"); // Load the test document as a storage and read its single signature. - DocumentSignatureManager aManager(mxComponentContext, DocumentSignatureMode::Content); + DocumentSignatureManager aManager(m_xContext, DocumentSignatureMode::Content); CPPUNIT_ASSERT(aManager.init()); uno::Reference xStorage = comphelper::OStorageHelper::GetStorageOfFormatFromURL( @@ -406,7 +406,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testOOXMLRemoveAll) = xStorage->openStreamElement(u"[Content_Types].xml"_ustr, embed::ElementModes::READWRITE); uno::Reference xInputStream = xStream->getInputStream(); uno::Sequence> aContentTypeInfo - = comphelper::OFOPXMLHelper::ReadContentTypeSequence(xInputStream, mxComponentContext); + = comphelper::OFOPXMLHelper::ReadContentTypeSequence(xInputStream, m_xContext); const uno::Sequence& rOverrides = aContentTypeInfo[1]; CPPUNIT_ASSERT( std::none_of(rOverrides.begin(), rOverrides.end(), [](const beans::StringPair& rPair) { @@ -841,7 +841,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testXAdESNotype) createTempCopy(u"notype-xades.odt"); // Read existing signature. - DocumentSignatureManager aManager(mxComponentContext, DocumentSignatureMode::Content); + DocumentSignatureManager aManager(m_xContext, DocumentSignatureMode::Content); CPPUNIT_ASSERT(aManager.init()); uno::Reference xStorage = comphelper::OStorageHelper::GetStorageOfFormatFromURL( @@ -897,7 +897,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testXAdES) save(u"writer8"_ustr); - DocumentSignatureManager aManager(mxComponentContext, DocumentSignatureMode::Content); + DocumentSignatureManager aManager(m_xContext, DocumentSignatureMode::Content); CPPUNIT_ASSERT(aManager.init()); uno::Reference xStorage = comphelper::OStorageHelper::GetStorageOfFormatFromURL( @@ -950,7 +950,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testSigningMultipleTimes_ODT) save(u"writer8"_ustr); { - DocumentSignatureManager aManager(mxComponentContext, DocumentSignatureMode::Content); + DocumentSignatureManager aManager(m_xContext, DocumentSignatureMode::Content); CPPUNIT_ASSERT(aManager.init()); uno::Reference xStorage = comphelper::OStorageHelper::GetStorageOfFormatFromURL( @@ -1023,7 +1023,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testSigningMultipleTimes_OOXML) save(u"MS Word 2007 XML"_ustr); { - DocumentSignatureManager aManager(mxComponentContext, DocumentSignatureMode::Content); + DocumentSignatureManager aManager(m_xContext, DocumentSignatureMode::Content); CPPUNIT_ASSERT(aManager.init()); uno::Reference xStorage = comphelper::OStorageHelper::GetStorageOfFormatFromURL( diff --git a/xmlsecurity/qa/unit/signing/signing2.cxx b/xmlsecurity/qa/unit/signing/signing2.cxx index d59cfbec92eb..c84fa0b1051a 100644 --- a/xmlsecurity/qa/unit/signing/signing2.cxx +++ b/xmlsecurity/qa/unit/signing/signing2.cxx @@ -60,7 +60,7 @@ void SigningTest2::setUp() MacrosTest::setUpGpg(m_directories, u"xmlsecurity_signing2"_ustr); // Initialize crypto after setting up the environment variables. - mxSEInitializer = xml::crypto::SEInitializer::create(mxComponentContext); + mxSEInitializer = xml::crypto::SEInitializer::create(m_xContext); mxSecurityContext = mxSEInitializer->createSecurityContext(OUString()); #if USE_CRYPTO_NSS #ifdef NSS_USE_ALG_IN_ANY_SIGNATURE