tdf#139734 Remove redundant asserts after functions loadFromDesktop and load
MacrosTest::loadFromDesktop itself asserts on its return value.
Thus, the additional checks in unit tests are redundant, and only create
noise unrelated to the tested functionality.
SwModelTestBase::load calls SwModelTestBase::loadURL which calls loadFromDesktop from within.
Change-Id: I30061bbc6e13e05f0cfbf17a7910926070b996f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111547
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
diff --git a/sw/qa/api/SwXDocumentSettings.cxx b/sw/qa/api/SwXDocumentSettings.cxx
index 6345a05..da2b366 100644
--- a/sw/qa/api/SwXDocumentSettings.cxx
+++ b/sw/qa/api/SwXDocumentSettings.cxx
@@ -74,8 +74,6 @@
uno::Reference<uno::XInterface> SwXDocumentSettings::init()
{
mxComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<lang::XMultiServiceFactory> xFactory(xTextDocument, uno::UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXTextField.cxx b/sw/qa/api/SwXTextField.cxx
index 7bd56f8..27a6eb4 100644
--- a/sw/qa/api/SwXTextField.cxx
+++ b/sw/qa/api/SwXTextField.cxx
@@ -73,7 +73,6 @@
Reference<XInterface> SwXTextField::init()
{
component_ = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
CPPUNIT_ASSERT(component_.is());
Reference<text::XTextDocument> xTextDocument(component_, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(component_, UNO_QUERY_THROW);
diff --git a/sw/qa/api/SwXTextTable.cxx b/sw/qa/api/SwXTextTable.cxx
index 8f8f180..71a3a50 100644
--- a/sw/qa/api/SwXTextTable.cxx
+++ b/sw/qa/api/SwXTextTable.cxx
@@ -69,7 +69,6 @@
Reference<XInterface> SwXTextTable::init()
{
component_ = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
CPPUNIT_ASSERT(component_.is());
Reference<text::XTextDocument> xTextDocument(component_, UNO_QUERY_THROW);
Reference<lang::XMultiServiceFactory> xMSF(component_, UNO_QUERY_THROW);
Reference<text::XText> xText = xTextDocument->getText();
diff --git a/sw/qa/api/terminate.cxx b/sw/qa/api/terminate.cxx
index 5f077d0..9a0e26d 100644
--- a/sw/qa/api/terminate.cxx
+++ b/sw/qa/api/terminate.cxx
@@ -53,7 +53,6 @@
{
auto const component
= loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
CPPUNIT_ASSERT(component.is());
css::uno::Reference<css::text::XTextDocument> xTextDocument(component,
css::uno::UNO_QUERY_THROW);
css::uno::Reference<css::lang::XMultiServiceFactory> xMSF(component, css::uno::UNO_QUERY_THROW);
diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx
index cb26163..3a693af 100644
--- a/sw/qa/core/macros-test.cxx
+++ b/sw/qa/core/macros-test.cxx
@@ -113,9 +113,6 @@
OUString aFileName;
createFileURL(testInfo[i].sFileBaseName, u"doc", aFileName);
uno::Reference< css::lang::XComponent > xComponent = loadFromDesktop(aFileName, "com.sun.star.text.TextDocument");
OUString sMsg = "Failed to load " + aFileName;
CPPUNIT_ASSERT_MESSAGE( OUStringToOString( sMsg, RTL_TEXTENCODING_UTF8 ).getStr(), xComponent.is() );
OUString sUrl = testInfo[i].sMacroUrl;
Any aRet;
Sequence< sal_Int16 > aOutParamIndex;
@@ -349,9 +346,6 @@
createFileURL(u"fdo68983.", u"odt", aFileName);
Reference< css::lang::XComponent > xComponent =
loadFromDesktop(aFileName, "com.sun.star.text.TextDocument");
CPPUNIT_ASSERT_MESSAGE("Failed to load fdo68983.odt", xComponent.is());
Reference< frame::XStorable > xDocStorable(xComponent, UNO_QUERY_THROW);
utl::TempFile aTempFile;
diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx
index 0b3f23d..12eb3b7 100644
--- a/sw/qa/extras/layout/layout2.cxx
+++ b/sw/qa/extras/layout/layout2.cxx
@@ -1781,9 +1781,6 @@
// inline the loading because currently properties can't be passed...
mxComponent = loadFromDesktop(url, "com.sun.star.text.TextDocument",
comphelper::containerToSequence(aFilterOptions));
CPPUNIT_ASSERT(mxComponent.is());
uno::Sequence<beans::PropertyValue> props(comphelper::InitPropertySequence({
{ "FilterName", uno::Any(OUString("writer_pdf_Export")) },
}));
diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx b/sw/qa/extras/mailmerge/mailmerge.cxx
index 824c4bb..83cbee5 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -247,7 +247,6 @@
std::cout << filename << ",";
mnStartTime = osl_getGlobalTimer();
mxComponent = loadFromDesktop(msMailMergeOutputURL + "/" + filename, "com.sun.star.text.TextDocument");
CPPUNIT_ASSERT( mxComponent.is());
OString name2 = OUStringToOString( filename, RTL_TEXTENCODING_UTF8 );
discardDumpedLayout();
if (mustCalcLayoutOf(name2.getStr()))
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index cfb22cd..fa52094 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -4455,7 +4455,6 @@
// Load: should have a component and a data source, too.
// Path with "#" must not cause issues
load(OUString(DATA_DIRECTORY + OUStringLiteral(u"hash%23path/")), "embedded-data-source.odt");
CPPUNIT_ASSERT(mxComponent.is());
CPPUNIT_ASSERT(xDatabaseContext->hasByName("calc-data-source"));
// Data source has a table named Sheet1.
diff --git a/test/source/sheet/xspreadsheets2.cxx b/test/source/sheet/xspreadsheets2.cxx
index 9c53af7..406d8ba 100644
--- a/test/source/sheet/xspreadsheets2.cxx
+++ b/test/source/sheet/xspreadsheets2.cxx
@@ -323,9 +323,6 @@
createFileURL(aFileBase, aFileURL);
uno::Reference< lang::XComponent > xComp = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComp.is());
uno::Reference< sheet::XSpreadsheetDocument > xDoc(xComp, UNO_QUERY_THROW);
return xDoc;
}
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index f9d3897..365a9a0 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -83,8 +83,6 @@
{
// Import the bugdoc and export as PDF.
mxComponent = loadFromDesktop(rURL);
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
xStorable->storeToURL(maTempFile.GetURL(), rDescriptor.getAsConstPropertyValueList());
@@ -122,8 +120,6 @@
// Import the bugdoc and export as PDF.
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + rFile;
mxComponent = loadFromDesktop(aURL);
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
utl::MediaDescriptor aMediaDescriptor;
aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
@@ -145,8 +141,6 @@
// Import the bugdoc and export as PDF.
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf106059.odt";
mxComponent = loadFromDesktop(aURL);
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
utl::MediaDescriptor aMediaDescriptor;
aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
@@ -232,8 +226,6 @@
// Import the bugdoc and export as PDF.
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf105461.odp";
mxComponent = loadFromDesktop(aURL);
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
utl::MediaDescriptor aMediaDescriptor;
aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
@@ -280,8 +272,6 @@
// Import the bugdoc and print to PDF.
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf107868.odt";
mxComponent = loadFromDesktop(aURL);
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
uno::Reference<view::XPrintable> xPrintable(mxComponent, uno::UNO_QUERY);
CPPUNIT_ASSERT(xPrintable.is());
@@ -369,8 +359,6 @@
// Import the bugdoc and export as PDF.
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf106206.odt";
mxComponent = loadFromDesktop(aURL);
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
utl::MediaDescriptor aMediaDescriptor;
aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
@@ -419,8 +407,6 @@
// Import the bugdoc and export as PDF.
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf109143.odt";
mxComponent = loadFromDesktop(aURL);
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
utl::MediaDescriptor aMediaDescriptor;
aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
@@ -460,8 +446,6 @@
// Import the bugdoc and export as PDF.
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf106972.odt";
mxComponent = loadFromDesktop(aURL);
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
utl::MediaDescriptor aMediaDescriptor;
aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
@@ -510,8 +494,6 @@
// Import the bugdoc and export as PDF.
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf106972-pdf17.odt";
mxComponent = loadFromDesktop(aURL);
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
utl::MediaDescriptor aMediaDescriptor;
aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
@@ -550,8 +532,6 @@
// Import the bugdoc and print to PDF.
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "softhyphen_pdf.odt";
mxComponent = loadFromDesktop(aURL);
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
uno::Reference<view::XPrintable> xPrintable(mxComponent, uno::UNO_QUERY);
CPPUNIT_ASSERT(xPrintable.is());
@@ -810,8 +790,6 @@
// Import the bugdoc and export as PDF.
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf108963.odp";
mxComponent = loadFromDesktop(aURL);
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
utl::MediaDescriptor aMediaDescriptor;
aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
@@ -1063,8 +1041,6 @@
// Import the bugdoc and export as PDF.
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf115117-1.odt";
mxComponent = loadFromDesktop(aURL);
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
utl::MediaDescriptor aMediaDescriptor;
aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
@@ -1110,8 +1086,6 @@
// Import the bugdoc and export as PDF.
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf115117-2.odt";
mxComponent = loadFromDesktop(aURL);
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
utl::MediaDescriptor aMediaDescriptor;
aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
@@ -1440,8 +1414,6 @@
// Import the bugdoc and export as PDF.
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf105954.odt";
mxComponent = loadFromDesktop(aURL);
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
utl::MediaDescriptor aMediaDescriptor;
aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
@@ -1769,7 +1741,6 @@
// Load the Writer document.
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "toc-link.fodt";
mxComponent = loadFromDesktop(aURL);
CPPUNIT_ASSERT(mxComponent.is());
// Update the ToC.
uno::Reference<text::XDocumentIndexesSupplier> xDocumentIndexesSupplier(mxComponent,
@@ -1947,7 +1918,6 @@
{
// Create an empty document.
mxComponent = loadFromDesktop("private:factory/swriter");
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
@@ -2020,7 +1990,6 @@
{
// Create an empty document.
mxComponent = loadFromDesktop("private:factory/swriter");
CPPUNIT_ASSERT(mxComponent.is());
// Save as PDF.
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
@@ -2043,7 +2012,6 @@
{
// Create an empty document.
mxComponent = loadFromDesktop("private:factory/swriter");
CPPUNIT_ASSERT(mxComponent.is());
// Save as PDF.
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
@@ -2090,8 +2058,6 @@
// Load the PDF and save as PDF
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "SimpleMultiPagePDF.pdf";
mxComponent = loadFromDesktop(aURL);
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
utl::MediaDescriptor aMediaDescriptor;
aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
@@ -2273,8 +2239,6 @@
// Load the PDF and save as PDF
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "PDFWithImages.pdf";
mxComponent = loadFromDesktop(aURL);
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
utl::MediaDescriptor aMediaDescriptor;
aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
@@ -2489,8 +2453,6 @@
// Load the PDF and save as PDF
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "ComplexContentDictionary.pdf";
mxComponent = loadFromDesktop(aURL);
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
utl::MediaDescriptor aMediaDescriptor;
aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
@@ -2579,8 +2541,6 @@
// Import a basic document (document doesn't really matter)
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "BrownFoxLazyDog.odt";
mxComponent = loadFromDesktop(aURL);
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
utl::MediaDescriptor aMediaDescriptor;
aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
diff --git a/writerperfect/qa/unit/EPUBExportTest.cxx b/writerperfect/qa/unit/EPUBExportTest.cxx
index d703c9f..c176960 100644
--- a/writerperfect/qa/unit/EPUBExportTest.cxx
+++ b/writerperfect/qa/unit/EPUBExportTest.cxx
@@ -94,8 +94,6 @@
// Import the bugdoc and export as EPUB.
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + rFile;
mxComponent = loadFromDesktop(aURL);
CPPUNIT_ASSERT(mxComponent.is());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
maTempFile.EnableKillingFile();
utl::MediaDescriptor aMediaDescriptor;
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx
index a76b142..cfe9c74 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -1079,8 +1079,6 @@
// load the template as-is to validate signatures
mxComponent = loadFromDesktop(
aURL, OUString(), comphelper::InitPropertySequence({ { "AsTemplate", uno::Any(false) } }));
CPPUNIT_ASSERT_MESSAGE(OUStringToOString(sLoadMessage, RTL_TEXTENCODING_UTF8).getStr(),
mxComponent.is());
// we are a template, and have a valid document and macro signature
assertDocument(CPPUNIT_SOURCELINE(), "writer8_template", SignatureState::OK, SignatureState::OK,
@@ -1132,8 +1130,6 @@
mxComponent
= loadFromDesktop(aTempFileSaveAsOTT.GetURL(), OUString(),
comphelper::InitPropertySequence({ { "AsTemplate", uno::Any(false) } }));
CPPUNIT_ASSERT_MESSAGE(OUStringToOString(sLoadMessage, RTL_TEXTENCODING_UTF8).getStr(),
mxComponent.is());
// the loaded document is a OTT with a valid macro signature
assertDocument(CPPUNIT_SOURCELINE(), "writer8_template", SignatureState::NOSIGNATURES,
@@ -1166,8 +1162,6 @@
mxComponent
= loadFromDesktop(aTempFileSaveAsODT_OTT.GetURL(), OUString(),
comphelper::InitPropertySequence({ { "AsTemplate", uno::Any(false) } }));
CPPUNIT_ASSERT_MESSAGE(OUStringToOString(sLoadMessage, RTL_TEXTENCODING_UTF8).getStr(),
mxComponent.is());
// the loaded document is a OTT with a valid macro signature
assertDocument(CPPUNIT_SOURCELINE(), "writer8_template", SignatureState::NOSIGNATURES,
@@ -1183,8 +1177,6 @@
// load the template as-is to validate signatures
mxComponent = loadFromDesktop(
aURL, OUString(), comphelper::InitPropertySequence({ { "AsTemplate", uno::Any(false) } }));
CPPUNIT_ASSERT_MESSAGE(OUStringToOString(sLoadMessage, RTL_TEXTENCODING_UTF8).getStr(),
mxComponent.is());
// we are a template, and have a non-invalid macro signature
assertDocument(CPPUNIT_SOURCELINE(), "writer8_template", SignatureState::NOSIGNATURES,
@@ -1227,8 +1219,6 @@
mxComponent->dispose();
mxComponent = loadFromDesktop(
aURL, OUString(), comphelper::InitPropertySequence({ { "AsTemplate", uno::Any(false) } }));
CPPUNIT_ASSERT_MESSAGE(OUStringToOString(sLoadMessage, RTL_TEXTENCODING_UTF8).getStr(),
mxComponent.is());
// we are a template, and have a non-invalid macro signature
assertDocument(CPPUNIT_SOURCELINE(), "writer8_template", SignatureState::NOSIGNATURES,
@@ -1254,8 +1244,6 @@
mxComponent
= loadFromDesktop(aTempFileSaveAsOTT.GetURL(), OUString(),
comphelper::InitPropertySequence({ { "AsTemplate", uno::Any(false) } }));
CPPUNIT_ASSERT_MESSAGE(OUStringToOString(sLoadMessage, RTL_TEXTENCODING_UTF8).getStr(),
mxComponent.is());
// the loaded document is a 1.2 OTT without any signatures
assertDocument(CPPUNIT_SOURCELINE(), "writer8_template", SignatureState::NOSIGNATURES,
@@ -1283,8 +1271,6 @@
// load the template as-is to validate signatures
mxComponent = loadFromDesktop(
aURL, OUString(), comphelper::InitPropertySequence({ { "AsTemplate", uno::Any(false) } }));
CPPUNIT_ASSERT_MESSAGE(OUStringToOString(sLoadMessage, RTL_TEXTENCODING_UTF8).getStr(),
mxComponent.is());
// we are a template, and have a non-invalid macro signature
assertDocument(CPPUNIT_SOURCELINE(), "writer8_template", SignatureState::NOSIGNATURES,
@@ -1336,8 +1322,6 @@
mxComponent
= loadFromDesktop(aTempFileSaveAsOTT.GetURL(), OUString(),
comphelper::InitPropertySequence({ { "AsTemplate", uno::Any(false) } }));
CPPUNIT_ASSERT_MESSAGE(OUStringToOString(sLoadMessage, RTL_TEXTENCODING_UTF8).getStr(),
mxComponent.is());
// the loaded document is a OTT with a non-invalid macro signature
assertDocument(CPPUNIT_SOURCELINE(), "writer8_template", SignatureState::NOSIGNATURES,
@@ -1370,8 +1354,6 @@
mxComponent
= loadFromDesktop(aTempFileSaveAsODT_OTT.GetURL(), OUString(),
comphelper::InitPropertySequence({ { "AsTemplate", uno::Any(false) } }));
CPPUNIT_ASSERT_MESSAGE(OUStringToOString(sLoadMessage, RTL_TEXTENCODING_UTF8).getStr(),
mxComponent.is());
// the loaded document is a OTT with a non-invalid macro signature
assertDocument(CPPUNIT_SOURCELINE(), "writer8_template", SignatureState::NOSIGNATURES,
diff --git a/xmlsecurity/qa/unit/signing/signing2.cxx b/xmlsecurity/qa/unit/signing/signing2.cxx
index e23c553..a436711 100644
--- a/xmlsecurity/qa/unit/signing/signing2.cxx
+++ b/xmlsecurity/qa/unit/signing/signing2.cxx
@@ -78,12 +78,9 @@
CPPUNIT_TEST_FIXTURE(SigningTest2, testPreserveMacroSignatureODB)
{
const OUString aURL(m_directories.getURLFromSrc(DATA_DIRECTORY) + "odb_signed_macros.odb");
const OUString sLoadMessage = "loading failed: " + aURL;
// load the file
mxComponent = loadFromDesktop(aURL, "com.sun.star.sdb.OfficeDatabaseDocument");
CPPUNIT_ASSERT_MESSAGE(OUStringToOString(sLoadMessage, RTL_TEXTENCODING_UTF8).getStr(),
mxComponent.is());
// save as ODB
utl::TempFile aTempFileSaveAsODB;