10#ifndef INCLUDED_TEST_UNOAPI_TEST_HXX
11#define INCLUDED_TEST_UNOAPI_TEST_HXX
21#include <com/sun/star/lang/XComponent.hpp>
22#include <osl/file.hxx>
33 virtual void setUp()
override;
36 OUString createFileURL(std::u16string_view aFileBase);
37 OUString createFilePath(std::u16string_view aFileBase);
38 void load(
const OUString& rURL,
const char* pPassword =
nullptr);
39 OUString
loadFromURL(std::u16string_view aFileBase,
const char* pPassword =
nullptr);
42 const css::uno::Sequence<css::uno::Any>& rParams = {});
44 void save(
const OUString& rFilter,
const char* pPassword =
nullptr);
45 void saveAndReload(
const OUString& rFilter,
const char* pPassword =
nullptr);
47 std::unique_ptr<vcl::pdf::PDFiumDocument> parsePDFExport(
const OString& rPassword = OString());
49 void createTempCopy(std::u16string_view fileName);
52 void setFilterOptions(
const OUString& rFilterOptions) { maFilterOptions = rFilterOptions; }
56 maImportFilterOptions = rFilterOptions;
76 setTestInteractionHandler(
const char* pPassword,
77 std::vector<com::sun::star::beans::PropertyValue>& rFilterOptions);
88 const sal_Int32 nTolerance,
const CppUnit::SourceLine& rSourceLine)
90 CPPUNIT_NS::assertDoubleEquals(rExpected.
Top(), rActual.
Top(), nTolerance, rSourceLine,
92 CPPUNIT_NS::assertDoubleEquals(rExpected.
Left(), rActual.
Left(), nTolerance, rSourceLine,
94 CPPUNIT_NS::assertDoubleEquals(rExpected.
GetWidth(), rActual.
GetWidth(), nTolerance,
95 rSourceLine,
"different Width");
97 rSourceLine,
"different Height");
100#define CPPUNIT_ASSERT_RECTANGLE_EQUAL_WITH_TOLERANCE(aExpected, aActual, aTolerance) \
101 assertRectangleEqual(aExpected, aActual, aTolerance, CPPUNIT_SOURCELINE())
void setFilterOptions(const OUString &rFilterOptions)
css::uno::Reference< css::lang::XComponent > mxComponent2
rtl::Reference< TestInteractionHandler > xInteractionHandler
void setImportFilterName(const OUString &rFilterName)
OUString maImportFilterName
utl::TempFileNamed maTempFile
css::uno::Reference< css::lang::XComponent > mxComponent
OUString maImportFilterOptions
void setImportFilterOptions(const OUString &rFilterOptions)
virtual void tearDown() override
virtual void setUp() override
bool executeMacro(SfxObjectShell *pShell, const OUString &sMacroName, uno::Sequence< uno::Any > &aArgs, uno::Any &aRet, const uno::Any &)
Graphic loadFromURL(OUString const &rURL, weld::Window *pParentWin)
#define OOO_DLLPUBLIC_TEST
void assertRectangleEqual(const tools::Rectangle &rExpected, const tools::Rectangle &rActual, const sal_Int32 nTolerance, const CppUnit::SourceLine &rSourceLine)