LibreOffice Module sc (master)  1
Static Public Member Functions | List of all members
ScfApiHelper Class Reference

Static API helper functions. More...

#include <fapihelper.hxx>

Static Public Member Functions

template<typename Type >
static css::uno::Sequence< TypeVectorToSequence (const ::std::vector< Type > &rVector)
 Converts a non-empty vector into a UNO sequence containing elements of the same type. More...
 
static OUString GetServiceName (const css::uno::Reference< css::uno::XInterface > &xInt)
 Returns the service name provided via the XServiceName interface, or an empty string on error. More...
 
static css::uno::Reference< css::lang::XMultiServiceFactory > GetServiceFactory (const SfxObjectShell *pShell)
 Returns the multi service factory from a document shell. More...
 
static css::uno::Reference< css::uno::XInterface > CreateInstance (const css::uno::Reference< css::lang::XMultiServiceFactory > &xFactory, const OUString &rServiceName)
 Creates an instance from the passed service name, using the passed service factory. More...
 
static css::uno::Reference< css::uno::XInterface > CreateInstance (const SfxObjectShell *pShell, const OUString &rServiceName)
 Creates an instance from the passed service name, using the service factory of the passed object. More...
 
static css::uno::Reference< css::uno::XInterface > CreateInstance (const OUString &rServiceName)
 Creates an instance from the passed service name, using the process service factory. More...
 
static css::uno::Sequence< css::beans::NamedValue > QueryEncryptionDataForMedium (SfxMedium &rMedium,::comphelper::IDocPasswordVerifier &rVerifier, const ::std::vector< OUString > *pDefaultPasswords)
 Opens a password dialog and returns the encryption data. More...
 

Detailed Description

Static API helper functions.

Definition at line 46 of file fapihelper.hxx.

Member Function Documentation

static css::uno::Reference< css::uno::XInterface > ScfApiHelper::CreateInstance ( const css::uno::Reference< css::lang::XMultiServiceFactory > &  xFactory,
const OUString &  rServiceName 
)
static
Reference< XInterface > ScfApiHelper::CreateInstance ( const SfxObjectShell pShell,
const OUString &  rServiceName 
)
static

Creates an instance from the passed service name, using the service factory of the passed object.

Definition at line 92 of file fapihelper.cxx.

References CreateInstance(), and GetServiceFactory().

Reference< XInterface > ScfApiHelper::CreateInstance ( const OUString &  rServiceName)
static

Creates an instance from the passed service name, using the process service factory.

Definition at line 97 of file fapihelper.cxx.

References CreateInstance(), and comphelper::getProcessServiceFactory().

Reference< XMultiServiceFactory > ScfApiHelper::GetServiceFactory ( const SfxObjectShell pShell)
static

Returns the multi service factory from a document shell.

Definition at line 66 of file fapihelper.cxx.

References SfxObjectShell::GetModel(), and xFactory.

Referenced by CreateInstance().

OUString ScfApiHelper::GetServiceName ( const css::uno::Reference< css::uno::XInterface > &  xInt)
static

Returns the service name provided via the XServiceName interface, or an empty string on error.

Definition at line 57 of file fapihelper.cxx.

Referenced by XclExpChValueRange::Convert(), and ScfPropertySet::GetServiceName().

uno::Sequence< beans::NamedValue > ScfApiHelper::QueryEncryptionDataForMedium ( SfxMedium rMedium,
::comphelper::IDocPasswordVerifier rVerifier,
const ::std::vector< OUString > *  pDefaultPasswords 
)
static

Opens a password dialog and returns the encryption data.

Returns
The encryption data or an empty sequence on 'Cancel' or any error.

Definition at line 102 of file fapihelper.cxx.

References SfxItemSet::ClearItem(), SfxMedium::GetInteractionHandler(), SfxMedium::GetItemSet(), SfxMedium::GetOrigURL(), SfxUnoAnyItem::GetValue(), CntUnencodedStringItem::GetValue(), SfxItemSet::Put(), and comphelper::DocPasswordHelper::requestAndVerifyDocPassword().

Referenced by XclRoot::RequestEncryptionData().

template<typename Type >
css::uno::Sequence< Type > ScfApiHelper::VectorToSequence ( const ::std::vector< Type > &  rVector)
static

Converts a non-empty vector into a UNO sequence containing elements of the same type.

Definition at line 81 of file fapihelper.hxx.

Referenced by XclImpChSeries::CreateDataSeries(), XclImpChSerErrorBar::CreateErrorBar(), XclImpChTypeGroup::CreateStockSeries(), and XclImpChSourceLink::CreateStringSequence().


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