LibreOffice Module test (master) 1
|
#include <unoapi_test.hxx>
Public Member Functions | |
UnoApiTest (OUString path) | |
virtual void | setUp () override |
virtual void | tearDown () override |
OUString | createFileURL (std::u16string_view aFileBase) |
OUString | createFilePath (std::u16string_view aFileBase) |
void | load (const OUString &rURL, const char *pPassword=nullptr) |
OUString | loadFromURL (std::u16string_view aFileBase, const char *pPassword=nullptr) |
css::uno::Any | executeMacro (const OUString &rScriptURL, const css::uno::Sequence< css::uno::Any > &rParams={}) |
void | save (const OUString &rFilter, const char *pPassword=nullptr) |
void | saveAndReload (const OUString &rFilter, const char *pPassword=nullptr) |
std::unique_ptr< vcl::pdf::PDFiumDocument > | parsePDFExport (const OString &rPassword=OString()) |
void | createTempCopy (std::u16string_view fileName) |
void | skipValidation () |
void | setFilterOptions (const OUString &rFilterOptions) |
void | setImportFilterOptions (const OUString &rFilterOptions) |
void | setImportFilterName (const OUString &rFilterName) |
Public Member Functions inherited from test::BootstrapFixture | |
DECL_DLLPRIVATE_STATIC_LINK (BootstrapFixture, ImplInitFilterHdl, ConvertData &, bool) | |
BootstrapFixture (bool bAssertOnDialog=true, bool bNeedUCB=true) | |
virtual | ~BootstrapFixture () override |
virtual void | setUp () override |
void | validate (const OUString &rURL, ValidationFormat) const |
Public Member Functions inherited from test::BootstrapFixtureBase | |
BootstrapFixtureBase () | |
virtual | ~BootstrapFixtureBase () override |
const css::uno::Reference< css::uno::XComponentContext > & | getComponentContext () const |
const css::uno::Reference< css::lang::XMultiServiceFactory > & | getMultiServiceFactory () const |
virtual void | setUp () override |
virtual void | tearDown () override |
Public Member Functions inherited from unotest::MacrosTest | |
MacrosTest () | |
~MacrosTest () | |
css::uno::Reference< css::lang::XComponent > | loadFromDesktop (const OUString &rURL, const OUString &rDocService=OUString(), const css::uno::Sequence< css::beans::PropertyValue > &rExtra_args=css::uno::Sequence< css::beans::PropertyValue >()) |
void | setUpNssGpg (const test::Directories &rDirectories, const OUString &rTestName) |
void | tearDownNssGpg () |
Protected Attributes | |
css::uno::Reference< css::lang::XComponent > | mxComponent |
css::uno::Reference< css::lang::XComponent > | mxComponent2 |
utl::TempFileNamed | maTempFile |
SvMemoryStream | maMemory |
rtl::Reference< TestInteractionHandler > | xInteractionHandler |
Protected Attributes inherited from test::BootstrapFixture | |
css::uno::Reference< css::uno::XComponentContext > | mxComponentContext |
Protected Attributes inherited from test::BootstrapFixtureBase | |
Directories | m_directories |
css::uno::Reference< css::uno::XComponentContext > | m_xContext |
css::uno::Reference< css::lang::XMultiServiceFactory > | m_xSFactory |
css::uno::Reference< css::lang::XMultiComponentFactory > | m_xFactory |
Protected Attributes inherited from unotest::MacrosTest | |
css::uno::Reference< css::frame::XDesktop2 > | mxDesktop |
Private Member Functions | |
void | setTestInteractionHandler (const char *pPassword, std::vector< com::sun::star::beans::PropertyValue > &rFilterOptions) |
Private Attributes | |
bool | mbSkipValidation |
OUString | m_aBaseString |
OUString | maFilterOptions |
OUString | maImportFilterOptions |
OUString | maImportFilterName |
Additional Inherited Members | |
Static Public Member Functions inherited from test::BootstrapFixture | |
static sal_uInt16 | getDefaultDeviceBitCount () |
Static Public Member Functions inherited from unotest::MacrosTest | |
static css::uno::Any | dispatchCommand (const css::uno::Reference< css::lang::XComponent > &xComponent, const OUString &rCommand, const css::uno::Sequence< css::beans::PropertyValue > &rPropertyValues) |
static std::unique_ptr< SvStream > | parseExportStream (const OUString &url, const OUString &rStreamName) |
static bool | IsValid (const css::uno::Reference< css::security::XCertificate > &cert, const css::uno::Reference< css::xml::crypto::XSecurityEnvironment > &env) |
static css::uno::Reference< css::security::XCertificate > | GetValidCertificate (const css::uno::Sequence< css::uno::Reference< css::security::XCertificate > > &certs, const css::uno::Reference< css::xml::crypto::XSecurityEnvironment > &env, const css::uno::Sequence< css::beans::PropertyValue > &rFilterData={}) |
Static Protected Member Functions inherited from test::BootstrapFixture | |
static bool | IsDefaultDPI () |
static std::pair< double, double > | getDPIScaling () |
Definition at line 28 of file unoapi_test.hxx.
UnoApiTest::UnoApiTest | ( | OUString | path | ) |
Definition at line 27 of file unoapi_test.cxx.
References utl::TempFileNamed::EnableKillingFile(), and maTempFile.
OUString UnoApiTest::createFilePath | ( | std::u16string_view | aFileBase | ) |
Definition at line 66 of file unoapi_test.cxx.
References test::Directories::getSrcRootPath(), m_aBaseString, and test::BootstrapFixtureBase::m_directories.
OUString UnoApiTest::createFileURL | ( | std::u16string_view | aFileBase | ) |
Definition at line 61 of file unoapi_test.cxx.
References test::Directories::getSrcRootURL(), m_aBaseString, and test::BootstrapFixtureBase::m_directories.
Referenced by createTempCopy(), and loadFromURL().
void UnoApiTest::createTempCopy | ( | std::u16string_view | fileName | ) |
Definition at line 228 of file unoapi_test.cxx.
References createFileURL(), utl::TempFileNamed::GetURL(), and maTempFile.
uno::Any UnoApiTest::executeMacro | ( | const OUString & | rScriptURL, |
const css::uno::Sequence< css::uno::Any > & | rParams = {} |
||
) |
Definition at line 131 of file unoapi_test.cxx.
References SfxObjectShell::CallXScript(), ERRCODE_NONE, mxComponent, and result.
void UnoApiTest::load | ( | const OUString & | rURL, |
const char * | pPassword = nullptr |
||
) |
Definition at line 83 of file unoapi_test.cxx.
References comphelper::containerToSequence(), unotest::MacrosTest::loadFromDesktop(), maImportFilterName, maImportFilterOptions, mxComponent, setTestInteractionHandler(), and xInteractionHandler.
Referenced by loadFromURL(), and saveAndReload().
OUString UnoApiTest::loadFromURL | ( | std::u16string_view | aFileBase, |
const char * | pPassword = nullptr |
||
) |
Definition at line 124 of file unoapi_test.cxx.
References createFileURL(), and load().
std::unique_ptr< vcl::pdf::PDFiumDocument > UnoApiTest::parsePDFExport | ( | const OString & | rPassword = OString() | ) |
Definition at line 213 of file unoapi_test.cxx.
References vcl::pdf::PDFiumLibrary::get(), SvMemoryStream::GetData(), SvMemoryStream::GetSize(), utl::TempFileNamed::GetURL(), maMemory, maTempFile, and SvStream::WriteStream().
void UnoApiTest::save | ( | const OUString & | rFilter, |
const char * | pPassword = nullptr |
||
) |
Definition at line 145 of file unoapi_test.cxx.
References utl::TempFileNamed::GetFileName(), utl::TempFileNamed::GetURL(), maFilterOptions, maTempFile, mbSkipValidation, test::MSBINARY, mxComponent, test::ODF, test::OOXML, utl::MediaDescriptor::PROP_ENCRYPTIONDATA, skipValidation(), and test::BootstrapFixture::validate().
Referenced by saveAndReload().
void UnoApiTest::saveAndReload | ( | const OUString & | rFilter, |
const char * | pPassword = nullptr |
||
) |
Definition at line 206 of file unoapi_test.cxx.
References utl::TempFileNamed::GetURL(), load(), maTempFile, and save().
|
inline |
Definition at line 52 of file unoapi_test.hxx.
|
inline |
Definition at line 59 of file unoapi_test.hxx.
|
inline |
Definition at line 54 of file unoapi_test.hxx.
|
private |
Definition at line 71 of file unoapi_test.cxx.
References xInteractionHandler.
Referenced by load().
|
overridevirtual |
Reimplemented from test::BootstrapFixture.
Definition at line 34 of file unoapi_test.cxx.
References comphelper::getComponentContext(), test::BootstrapFixtureBase::getMultiServiceFactory(), SfxApplication::GetOrCreate(), unotest::MacrosTest::mxDesktop, and test::BootstrapFixture::setUp().
|
inline |
Definition at line 51 of file unoapi_test.hxx.
Referenced by save().
|
overridevirtual |
Reimplemented from test::BootstrapFixtureBase.
Definition at line 44 of file unoapi_test.cxx.
References mxComponent, mxComponent2, and test::BootstrapFixtureBase::tearDown().
|
private |
Definition at line 80 of file unoapi_test.hxx.
Referenced by createFilePath(), and createFileURL().
|
private |
Definition at line 81 of file unoapi_test.hxx.
Referenced by save().
|
private |
Definition at line 84 of file unoapi_test.hxx.
Referenced by load().
|
private |
Definition at line 83 of file unoapi_test.hxx.
Referenced by load().
|
protected |
Definition at line 70 of file unoapi_test.hxx.
Referenced by parsePDFExport().
|
protected |
Definition at line 68 of file unoapi_test.hxx.
Referenced by createTempCopy(), UnoApiXmlTest::parseExport(), parsePDFExport(), save(), saveAndReload(), and UnoApiTest().
|
private |
Definition at line 79 of file unoapi_test.hxx.
Referenced by save().
|
protected |
Definition at line 63 of file unoapi_test.hxx.
Referenced by executeMacro(), load(), save(), and tearDown().
|
protected |
Definition at line 66 of file unoapi_test.hxx.
Referenced by tearDown().
|
protected |
Definition at line 72 of file unoapi_test.hxx.
Referenced by load(), and setTestInteractionHandler().