LibreOffice Module test (master) 1
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
UnoApiTest Class Reference

#include <unoapi_test.hxx>

Inheritance diagram for UnoApiTest:
[legend]
Collaboration diagram for UnoApiTest:
[legend]

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::PDFiumDocumentparsePDFExport (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< TestInteractionHandlerxInteractionHandler
 
- 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< SvStreamparseExportStream (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 ()
 

Detailed Description

Definition at line 28 of file unoapi_test.hxx.

Constructor & Destructor Documentation

◆ UnoApiTest()

UnoApiTest::UnoApiTest ( OUString  path)

Definition at line 27 of file unoapi_test.cxx.

References utl::TempFileNamed::EnableKillingFile(), and maTempFile.

Member Function Documentation

◆ createFilePath()

OUString UnoApiTest::createFilePath ( std::u16string_view  aFileBase)

◆ createFileURL()

OUString UnoApiTest::createFileURL ( std::u16string_view  aFileBase)

◆ createTempCopy()

void UnoApiTest::createTempCopy ( std::u16string_view  fileName)

Definition at line 228 of file unoapi_test.cxx.

References createFileURL(), utl::TempFileNamed::GetURL(), and maTempFile.

◆ executeMacro()

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.

◆ load()

void UnoApiTest::load ( const OUString &  rURL,
const char *  pPassword = nullptr 
)

◆ loadFromURL()

OUString UnoApiTest::loadFromURL ( std::u16string_view  aFileBase,
const char *  pPassword = nullptr 
)

Definition at line 124 of file unoapi_test.cxx.

References createFileURL(), and load().

◆ parsePDFExport()

std::unique_ptr< vcl::pdf::PDFiumDocument > UnoApiTest::parsePDFExport ( const OString &  rPassword = OString())

◆ save()

void UnoApiTest::save ( const OUString &  rFilter,
const char *  pPassword = nullptr 
)

◆ 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().

◆ setFilterOptions()

void UnoApiTest::setFilterOptions ( const OUString &  rFilterOptions)
inline

Definition at line 52 of file unoapi_test.hxx.

◆ setImportFilterName()

void UnoApiTest::setImportFilterName ( const OUString &  rFilterName)
inline

Definition at line 59 of file unoapi_test.hxx.

◆ setImportFilterOptions()

void UnoApiTest::setImportFilterOptions ( const OUString &  rFilterOptions)
inline

Definition at line 54 of file unoapi_test.hxx.

◆ setTestInteractionHandler()

void UnoApiTest::setTestInteractionHandler ( const char *  pPassword,
std::vector< com::sun::star::beans::PropertyValue > &  rFilterOptions 
)
private

Definition at line 71 of file unoapi_test.cxx.

References xInteractionHandler.

Referenced by load().

◆ setUp()

void UnoApiTest::setUp ( )
overridevirtual

◆ skipValidation()

void UnoApiTest::skipValidation ( )
inline

Definition at line 51 of file unoapi_test.hxx.

Referenced by save().

◆ tearDown()

void UnoApiTest::tearDown ( )
overridevirtual

Reimplemented from test::BootstrapFixtureBase.

Definition at line 44 of file unoapi_test.cxx.

References mxComponent, mxComponent2, and test::BootstrapFixtureBase::tearDown().

Member Data Documentation

◆ m_aBaseString

OUString UnoApiTest::m_aBaseString
private

Definition at line 80 of file unoapi_test.hxx.

Referenced by createFilePath(), and createFileURL().

◆ maFilterOptions

OUString UnoApiTest::maFilterOptions
private

Definition at line 81 of file unoapi_test.hxx.

Referenced by save().

◆ maImportFilterName

OUString UnoApiTest::maImportFilterName
private

Definition at line 84 of file unoapi_test.hxx.

Referenced by load().

◆ maImportFilterOptions

OUString UnoApiTest::maImportFilterOptions
private

Definition at line 83 of file unoapi_test.hxx.

Referenced by load().

◆ maMemory

SvMemoryStream UnoApiTest::maMemory
protected

Definition at line 70 of file unoapi_test.hxx.

Referenced by parsePDFExport().

◆ maTempFile

utl::TempFileNamed UnoApiTest::maTempFile
protected

◆ mbSkipValidation

bool UnoApiTest::mbSkipValidation
private

Definition at line 79 of file unoapi_test.hxx.

Referenced by save().

◆ mxComponent

css::uno::Reference<css::lang::XComponent> UnoApiTest::mxComponent
protected

Definition at line 63 of file unoapi_test.hxx.

Referenced by executeMacro(), load(), save(), and tearDown().

◆ mxComponent2

css::uno::Reference<css::lang::XComponent> UnoApiTest::mxComponent2
protected

Definition at line 66 of file unoapi_test.hxx.

Referenced by tearDown().

◆ xInteractionHandler

rtl::Reference<TestInteractionHandler> UnoApiTest::xInteractionHandler
protected

Definition at line 72 of file unoapi_test.hxx.

Referenced by load(), and setTestInteractionHandler().


The documentation for this class was generated from the following files: