fdo#46808, Convert FrameLoaderFactory and ContentHandlerFactory to new style
by creating a common service interface for them to implement Change-Id: Icec85c55ed0ac13a6c785fdad6b0cd9c11878ba5
This commit is contained in:
@@ -89,7 +89,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL ContentHandlerFactory::crea
|
||||
lQuery[0].Name = PROPNAME_TYPES;
|
||||
lQuery[0].Value <<= lTypes;
|
||||
|
||||
css::uno::Reference< css::container::XEnumeration > xSet = createSubSetEnumerationByProperties(lQuery);
|
||||
css::uno::Reference< css::container::XEnumeration > xSet = BaseContainer::createSubSetEnumerationByProperties(lQuery);
|
||||
while(xSet->hasMoreElements())
|
||||
{
|
||||
::comphelper::SequenceAsHashMap lHandlerProps(xSet->nextElement());
|
||||
@@ -143,7 +143,7 @@ css::uno::Sequence< OUString > SAL_CALL ContentHandlerFactory::getAvailableServi
|
||||
throw(css::uno::RuntimeException)
|
||||
{
|
||||
// must be the same list as ((XNameAccess*)this)->getElementNames() return!
|
||||
return getElementNames();
|
||||
return BaseContainer::getElementNames();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -21,7 +21,7 @@
|
||||
#define __FILTER_CONFIG_CONTENTHANDLERFACTORY_HXX_
|
||||
|
||||
#include "basecontainer.hxx"
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
#include <com/sun/star/frame/XLoaderFactory.hpp>
|
||||
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
|
||||
#include <cppuhelper/implbase1.hxx>
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace filter{
|
||||
/** @short implements the service <type scope="com.sun.star.document">ContentHandlerFactory</type>.
|
||||
*/
|
||||
class ContentHandlerFactory : public ::cppu::ImplInheritanceHelper1< BaseContainer ,
|
||||
css::lang::XMultiServiceFactory >
|
||||
css::frame::XLoaderFactory >
|
||||
{
|
||||
//-------------------------------------------
|
||||
// native interface
|
||||
@@ -125,6 +125,27 @@ class ContentHandlerFactory : public ::cppu::ImplInheritanceHelper1< BaseContain
|
||||
@return The new instance of this service as an uno reference.
|
||||
*/
|
||||
static css::uno::Reference< css::uno::XInterface > impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR);
|
||||
|
||||
|
||||
// Overrides to resolve ambiguity
|
||||
virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
|
||||
{ return BaseContainer::getByName(aName); }
|
||||
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames() throw (::com::sun::star::uno::RuntimeException)
|
||||
{ return BaseContainer::getElementNames(); }
|
||||
virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{ return BaseContainer::hasByName(aName); }
|
||||
|
||||
virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw (::com::sun::star::uno::RuntimeException)
|
||||
{ return BaseContainer::getElementType(); }
|
||||
virtual ::sal_Bool SAL_CALL hasElements() throw (::com::sun::star::uno::RuntimeException)
|
||||
{ return BaseContainer::hasElements(); }
|
||||
|
||||
virtual ::com::sun::star::uno::Reference< css::container::XEnumeration > SAL_CALL createSubSetEnumerationByQuery( const ::rtl::OUString& Query ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{ return BaseContainer::createSubSetEnumerationByQuery(Query); }
|
||||
virtual ::com::sun::star::uno::Reference< css::container::XEnumeration > SAL_CALL createSubSetEnumerationByProperties( const ::com::sun::star::uno::Sequence< css::beans::NamedValue >& Properties ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{ return BaseContainer::createSubSetEnumerationByProperties(Properties); }
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace config
|
||||
|
@@ -86,7 +86,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL FrameLoaderFactory::createI
|
||||
lQuery[0].Name = PROPNAME_TYPES;
|
||||
lQuery[0].Value <<= lTypes;
|
||||
|
||||
css::uno::Reference< css::container::XEnumeration > xSet = createSubSetEnumerationByProperties(lQuery);
|
||||
css::uno::Reference< css::container::XEnumeration > xSet = BaseContainer::createSubSetEnumerationByProperties(lQuery);
|
||||
while(xSet->hasMoreElements())
|
||||
{
|
||||
::comphelper::SequenceAsHashMap lLoaderProps(xSet->nextElement());
|
||||
@@ -140,7 +140,7 @@ css::uno::Sequence< OUString > SAL_CALL FrameLoaderFactory::getAvailableServiceN
|
||||
throw(css::uno::RuntimeException)
|
||||
{
|
||||
// must be the same list as ((XNameAccess*)this)->getElementNames() return!
|
||||
return getElementNames();
|
||||
return BaseContainer::getElementNames();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -21,7 +21,7 @@
|
||||
#define __FILTER_CONFIG_FRAMELOADERFACTORY_HXX_
|
||||
|
||||
#include "basecontainer.hxx"
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
#include <com/sun/star/frame/XLoaderFactory.hpp>
|
||||
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
|
||||
#include <cppuhelper/implbase1.hxx>
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace filter{
|
||||
/** @short implements the service <type scope="com.sun.star.document">FrameLoaderFactory</type>.
|
||||
*/
|
||||
class FrameLoaderFactory : public ::cppu::ImplInheritanceHelper1< BaseContainer ,
|
||||
css::lang::XMultiServiceFactory >
|
||||
css::frame::XLoaderFactory >
|
||||
{
|
||||
//-------------------------------------------
|
||||
// native interface
|
||||
@@ -125,6 +125,25 @@ class FrameLoaderFactory : public ::cppu::ImplInheritanceHelper1< BaseContainer
|
||||
@return The new instance of this service as an uno reference.
|
||||
*/
|
||||
static css::uno::Reference< css::uno::XInterface > impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR);
|
||||
|
||||
// Overrides to resolve ambiguity
|
||||
virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (css::container::NoSuchElementException, css::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
|
||||
{ return BaseContainer::getByName(aName); }
|
||||
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames() throw (::com::sun::star::uno::RuntimeException)
|
||||
{ return BaseContainer::getElementNames(); }
|
||||
virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{ return BaseContainer::hasByName(aName); }
|
||||
|
||||
virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw (::com::sun::star::uno::RuntimeException)
|
||||
{ return BaseContainer::getElementType(); }
|
||||
virtual ::sal_Bool SAL_CALL hasElements() throw (::com::sun::star::uno::RuntimeException)
|
||||
{ return BaseContainer::hasElements(); }
|
||||
|
||||
virtual ::com::sun::star::uno::Reference< css::container::XEnumeration > SAL_CALL createSubSetEnumerationByQuery( const ::rtl::OUString& Query ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{ return BaseContainer::createSubSetEnumerationByQuery(Query); }
|
||||
virtual ::com::sun::star::uno::Reference< css::container::XEnumeration > SAL_CALL createSubSetEnumerationByProperties( const ::com::sun::star::uno::Sequence< css::beans::NamedValue >& Properties ) throw (::com::sun::star::uno::RuntimeException)
|
||||
{ return BaseContainer::createSubSetEnumerationByProperties(Properties); }
|
||||
|
||||
};
|
||||
|
||||
} // namespace config
|
||||
|
@@ -28,13 +28,11 @@ namespace framework{
|
||||
// used servicenames by framework
|
||||
//_________________________________________________________________________________________________________________
|
||||
|
||||
#define SERVICENAME_FRAMELOADERFACTORY DECLARE_ASCII("com.sun.star.frame.FrameLoaderFactory" )
|
||||
#define SERVICENAME_FILTERFACTORY DECLARE_ASCII("com.sun.star.document.FilterFactory" )
|
||||
#define SERVICENAME_TYPEDETECTION DECLARE_ASCII("com.sun.star.document.TypeDetection" )
|
||||
#define SERVICENAME_CFGUPDATEACCESS DECLARE_ASCII("com.sun.star.configuration.ConfigurationUpdateAccess") // provides read/write access to the configuration
|
||||
#define SERVICENAME_CFGREADACCESS DECLARE_ASCII("com.sun.star.configuration.ConfigurationAccess" ) // provides readonly access to the configuration
|
||||
#define SERVICENAME_CONTENTHANDLER DECLARE_ASCII("com.sun.star.frame.ContentHandler" )
|
||||
#define SERVICENAME_CONTENTHANDLERFACTORY DECLARE_ASCII("com.sun.star.frame.ContentHandlerFactory" )
|
||||
#define SERVICENAME_JOB DECLARE_ASCII("com.sun.star.task.Job" )
|
||||
#define SERVICENAME_PROTOCOLHANDLER DECLARE_ASCII("com.sun.star.frame.ProtocolHandler" )
|
||||
#define SERVICENAME_POPUPMENUCONTROLLERFACTORY DECLARE_ASCII("com.sun.star.frame.PopupMenuControllerFactory" )
|
||||
|
@@ -36,40 +36,42 @@
|
||||
#include <comphelper/configuration.hxx>
|
||||
#include "officecfg/Office/Common.hxx"
|
||||
|
||||
#include <com/sun/star/task/ErrorCodeRequest.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/uno/RuntimeException.hpp>
|
||||
#include <com/sun/star/frame/DispatchResultState.hpp>
|
||||
#include <com/sun/star/frame/FrameSearchFlag.hpp>
|
||||
#include <com/sun/star/util/URLTransformer.hpp>
|
||||
#include <com/sun/star/util/XURLTransformer.hpp>
|
||||
#include <com/sun/star/ucb/UniversalContentBroker.hpp>
|
||||
#include <com/sun/star/util/XCloseable.hpp>
|
||||
#include <com/sun/star/lang/XComponent.hpp>
|
||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||
#include <com/sun/star/lang/DisposedException.hpp>
|
||||
#include <com/sun/star/awt/XWindow.hpp>
|
||||
#include <com/sun/star/awt/XWindow2.hpp>
|
||||
#include <com/sun/star/awt/XTopWindow.hpp>
|
||||
#include <com/sun/star/container/XNameAccess.hpp>
|
||||
#include <com/sun/star/container/XContainerQuery.hpp>
|
||||
#include <com/sun/star/container/XEnumeration.hpp>
|
||||
#include <com/sun/star/document/MacroExecMode.hpp>
|
||||
#include <com/sun/star/document/XTypeDetection.hpp>
|
||||
#include <com/sun/star/document/XActionLockable.hpp>
|
||||
#include <com/sun/star/document/UpdateDocMode.hpp>
|
||||
#include <com/sun/star/frame/Desktop.hpp>
|
||||
#include <com/sun/star/frame/OfficeFrameLoader.hpp>
|
||||
#include <com/sun/star/frame/XModel.hpp>
|
||||
#include <com/sun/star/frame/XFrameLoader.hpp>
|
||||
#include <com/sun/star/frame/XSynchronousFrameLoader.hpp>
|
||||
#include <com/sun/star/frame/XNotifyingDispatch.hpp>
|
||||
#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
|
||||
#include <com/sun/star/task/XStatusIndicator.hpp>
|
||||
#include <com/sun/star/util/XModifiable.hpp>
|
||||
#include <com/sun/star/frame/FrameLoaderFactory.hpp>
|
||||
#include <com/sun/star/frame/ContentHandlerFactory.hpp>
|
||||
#include <com/sun/star/frame/DispatchResultState.hpp>
|
||||
#include <com/sun/star/frame/FrameSearchFlag.hpp>
|
||||
#include <com/sun/star/frame/XDispatchProvider.hpp>
|
||||
#include <com/sun/star/document/XTypeDetection.hpp>
|
||||
#include <com/sun/star/document/XActionLockable.hpp>
|
||||
#include <com/sun/star/lang/XComponent.hpp>
|
||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||
#include <com/sun/star/lang/DisposedException.hpp>
|
||||
#include <com/sun/star/io/XInputStream.hpp>
|
||||
#include <com/sun/star/task/XInteractionHandler.hpp>
|
||||
#include <com/sun/star/container/XNameAccess.hpp>
|
||||
#include <com/sun/star/container/XContainerQuery.hpp>
|
||||
#include <com/sun/star/container/XEnumeration.hpp>
|
||||
#include <com/sun/star/document/MacroExecMode.hpp>
|
||||
#include <com/sun/star/document/UpdateDocMode.hpp>
|
||||
#include <com/sun/star/task/ErrorCodeRequest.hpp>
|
||||
#include <com/sun/star/task/InteractionHandler.hpp>
|
||||
#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
|
||||
#include <com/sun/star/task/XStatusIndicator.hpp>
|
||||
#include <com/sun/star/uno/RuntimeException.hpp>
|
||||
#include <com/sun/star/ucb/UniversalContentBroker.hpp>
|
||||
#include <com/sun/star/util/URLTransformer.hpp>
|
||||
#include <com/sun/star/util/XURLTransformer.hpp>
|
||||
#include <com/sun/star/util/XCloseable.hpp>
|
||||
#include <com/sun/star/util/XModifiable.hpp>
|
||||
|
||||
#include <vcl/window.hxx>
|
||||
#include <vcl/wrkwin.hxx>
|
||||
@@ -644,7 +646,7 @@ LoadEnv::EContentType LoadEnv::classifyContent(const OUString&
|
||||
OUString sType = xDetect->queryTypeByURL(sURL);
|
||||
|
||||
css::uno::Sequence< css::beans::NamedValue > lQuery(1) ;
|
||||
css::uno::Reference< css::container::XContainerQuery > xContainer ;
|
||||
css::uno::Reference< css::frame::XLoaderFactory > xLoaderFactory;
|
||||
css::uno::Reference< css::container::XEnumeration > xSet ;
|
||||
css::uno::Sequence< OUString > lTypesReg(1);
|
||||
|
||||
@@ -669,10 +671,8 @@ LoadEnv::EContentType LoadEnv::classifyContent(const OUString&
|
||||
lQuery[0].Name = sPROP_TYPES;
|
||||
lQuery[0].Value <<= lTypesReg;
|
||||
|
||||
xContainer = css::uno::Reference< css::container::XContainerQuery >(
|
||||
xContext->getServiceManager()->createInstanceWithContext(SERVICENAME_FRAMELOADERFACTORY, xContext),
|
||||
css::uno::UNO_QUERY);
|
||||
xSet = xContainer->createSubSetEnumerationByProperties(lQuery);
|
||||
xLoaderFactory = css::frame::FrameLoaderFactory::create(xContext);
|
||||
xSet = xLoaderFactory->createSubSetEnumerationByProperties(lQuery);
|
||||
// at least one registered frame loader is enough!
|
||||
if (xSet->hasMoreElements())
|
||||
return E_CAN_BE_LOADED;
|
||||
@@ -686,10 +686,8 @@ LoadEnv::EContentType LoadEnv::classifyContent(const OUString&
|
||||
lQuery[0].Name = sPROP_TYPES;
|
||||
lQuery[0].Value <<= lTypesReg;
|
||||
|
||||
xContainer = css::uno::Reference< css::container::XContainerQuery >(
|
||||
xContext->getServiceManager()->createInstanceWithContext(SERVICENAME_CONTENTHANDLERFACTORY, xContext),
|
||||
css::uno::UNO_QUERY);
|
||||
xSet = xContainer->createSubSetEnumerationByProperties(lQuery);
|
||||
xLoaderFactory = css::frame::ContentHandlerFactory::create(xContext);
|
||||
xSet = xLoaderFactory->createSubSetEnumerationByProperties(lQuery);
|
||||
// at least one registered content handler is enough!
|
||||
if (xSet->hasMoreElements())
|
||||
return E_CAN_BE_HANDLED;
|
||||
@@ -911,9 +909,7 @@ sal_Bool LoadEnv::impl_handleContent()
|
||||
css::util::URL aURL = m_aURL;
|
||||
|
||||
// get necessary container to query for a handler object
|
||||
css::uno::Reference< css::lang::XMultiServiceFactory > xFactory(m_xContext->getServiceManager()->createInstanceWithContext(SERVICENAME_CONTENTHANDLERFACTORY, m_xContext), css::uno::UNO_QUERY);
|
||||
|
||||
css::uno::Reference< css::container::XContainerQuery > xQuery (xFactory , css::uno::UNO_QUERY);
|
||||
css::uno::Reference< css::frame::XLoaderFactory > xLoaderFactory = css::frame::ContentHandlerFactory::create(m_xContext);
|
||||
|
||||
aReadLock.unlock();
|
||||
// <- SAFE -----------------------------------
|
||||
@@ -928,7 +924,7 @@ sal_Bool LoadEnv::impl_handleContent()
|
||||
|
||||
OUString sPROP_NAME(PROP_NAME);
|
||||
|
||||
css::uno::Reference< css::container::XEnumeration > xSet = xQuery->createSubSetEnumerationByProperties(lQuery);
|
||||
css::uno::Reference< css::container::XEnumeration > xSet = xLoaderFactory->createSubSetEnumerationByProperties(lQuery);
|
||||
while(xSet->hasMoreElements())
|
||||
{
|
||||
::comphelper::SequenceAsHashMap lProps (xSet->nextElement());
|
||||
@@ -937,7 +933,7 @@ sal_Bool LoadEnv::impl_handleContent()
|
||||
css::uno::Reference< css::frame::XNotifyingDispatch > xHandler;
|
||||
try
|
||||
{
|
||||
xHandler = css::uno::Reference< css::frame::XNotifyingDispatch >(xFactory->createInstance(sHandler), css::uno::UNO_QUERY);
|
||||
xHandler = css::uno::Reference< css::frame::XNotifyingDispatch >(xLoaderFactory->createInstance(sHandler), css::uno::UNO_QUERY);
|
||||
if (!xHandler.is())
|
||||
continue;
|
||||
}
|
||||
@@ -1212,8 +1208,7 @@ css::uno::Reference< css::uno::XInterface > LoadEnv::impl_searchLoader()
|
||||
throw LoadEnvException(LoadEnvException::ID_INVALID_MEDIADESCRIPTOR);
|
||||
|
||||
// try to locate any interested frame loader
|
||||
css::uno::Reference< css::lang::XMultiServiceFactory > xLoaderFactory(m_xContext->getServiceManager()->createInstanceWithContext(SERVICENAME_FRAMELOADERFACTORY, m_xContext), css::uno::UNO_QUERY);
|
||||
css::uno::Reference< css::container::XContainerQuery > xQuery (xLoaderFactory , css::uno::UNO_QUERY);
|
||||
css::uno::Reference< css::frame::XLoaderFactory > xLoaderFactory = css::frame::FrameLoaderFactory::create(m_xContext);
|
||||
|
||||
aReadLock.unlock();
|
||||
// <- SAFE -----------------------------------
|
||||
@@ -1227,7 +1222,7 @@ css::uno::Reference< css::uno::XInterface > LoadEnv::impl_searchLoader()
|
||||
|
||||
OUString sPROP_NAME(PROP_NAME);
|
||||
|
||||
css::uno::Reference< css::container::XEnumeration > xSet = xQuery->createSubSetEnumerationByProperties(lQuery);
|
||||
css::uno::Reference< css::container::XEnumeration > xSet = xLoaderFactory->createSubSetEnumerationByProperties(lQuery);
|
||||
while(xSet->hasMoreElements())
|
||||
{
|
||||
// try everyone ...
|
||||
|
@@ -189,12 +189,14 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/frame,\
|
||||
AutoRecovery \
|
||||
AppDispatchProvider \
|
||||
Bibliography \
|
||||
ContentHandlerFactory \
|
||||
Desktop \
|
||||
DispatchHelper \
|
||||
DispatchRecorder \
|
||||
DispatchRecorderSupplier \
|
||||
DocumentTemplates \
|
||||
Frame \
|
||||
FrameLoaderFactory \
|
||||
GlobalEventBroadcaster \
|
||||
LayoutManager \
|
||||
MediaTypeDetectionHelper \
|
||||
@@ -935,14 +937,12 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/formula
|
||||
$(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/frame,\
|
||||
Components \
|
||||
ContentHandler \
|
||||
ContentHandlerFactory \
|
||||
Controller \
|
||||
DesktopTask \
|
||||
DesktopTasks \
|
||||
DispatchProvider \
|
||||
FrameControl \
|
||||
FrameLoader \
|
||||
FrameLoaderFactory \
|
||||
FramesContainer \
|
||||
PopupMenuController \
|
||||
PopupMenuControllerFactory \
|
||||
@@ -2607,6 +2607,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/frame,\
|
||||
XLayoutManagerListener \
|
||||
XLoadEventListener \
|
||||
XLoadable \
|
||||
XLoaderFactory \
|
||||
XMenuBarAcceptor \
|
||||
XMenuBarMergingAcceptor \
|
||||
XModel \
|
||||
|
@@ -19,9 +19,7 @@
|
||||
#ifndef __com_sun_star_frame_ContentHandlerFactory_idl__
|
||||
#define __com_sun_star_frame_ContentHandlerFactory_idl__
|
||||
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.idl>
|
||||
#include <com/sun/star/container/XNameAccess.idl>
|
||||
#include <com/sun/star/container/XContainerQuery.idl>
|
||||
#include <com/sun/star/frame/XLoaderFactory.idl>
|
||||
|
||||
|
||||
module com { module sun { module star { module frame {
|
||||
@@ -37,51 +35,7 @@ module com { module sun { module star { module frame {
|
||||
</ul>
|
||||
</p>
|
||||
*/
|
||||
published service ContentHandlerFactory
|
||||
{
|
||||
/** interface to create handler objects by using his internal name
|
||||
|
||||
<p>
|
||||
Returned objects must support the service specification of a <type>ContentHandler</type>.
|
||||
They can be created by using of his internal name, which must be unambiguous everytime, only.
|
||||
To get this name use further specified interfaces of this factory for access on
|
||||
the flat configuration.
|
||||
</p>
|
||||
*/
|
||||
interface com::sun::star::lang::XMultiServiceFactory;
|
||||
|
||||
/** provides access to the whole content handler configuration
|
||||
|
||||
<p>
|
||||
This interface supports an access to the internal configuration
|
||||
of all accessible handler objects. The return value of
|
||||
<member scope="com::sun::star::container">XNameAccess::getByName()</member> is a property sequence
|
||||
packed in an any.
|
||||
</p>
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td><b>Types<b></td>
|
||||
<td>[string]</td>
|
||||
<td>file types for which handler is registered</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>UIName<b></td>
|
||||
<td>[string]</td>
|
||||
<td>UI representable and localized name</td>
|
||||
</tr>
|
||||
</table>
|
||||
*/
|
||||
interface com::sun::star::container::XNameAccess;
|
||||
|
||||
/** supports query mode for configuration access
|
||||
|
||||
<p>
|
||||
This interface can be used to get sub sets of current configuration entries
|
||||
which represent given search parameters.
|
||||
</p>
|
||||
*/
|
||||
interface com::sun::star::container::XContainerQuery;
|
||||
};
|
||||
published service ContentHandlerFactory : XLoaderFactory;
|
||||
|
||||
|
||||
}; }; }; };
|
||||
|
@@ -19,9 +19,7 @@
|
||||
#ifndef __com_sun_star_frame_FrameLoaderFactory_idl__
|
||||
#define __com_sun_star_frame_FrameLoaderFactory_idl__
|
||||
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.idl>
|
||||
#include <com/sun/star/container/XNameAccess.idl>
|
||||
#include <com/sun/star/container/XContainerQuery.idl>
|
||||
#include <com/sun/star/frame/XLoaderFactory.idl>
|
||||
|
||||
|
||||
module com { module sun { module star { module frame {
|
||||
@@ -37,50 +35,7 @@ module com { module sun { module star { module frame {
|
||||
</ul>
|
||||
</p>
|
||||
*/
|
||||
published service FrameLoaderFactory
|
||||
{
|
||||
/** interface to create loader objects by using his internal name
|
||||
|
||||
<p>
|
||||
Returned objects must support the service specification of a <type>FrameLoader</type>
|
||||
or <type>SynchronousFrameLoader</type>. (Note: last one will be preferred if both ones
|
||||
are available)
|
||||
They can be created by using of his internal name, which must be unambiguous everytime, only.
|
||||
To get this name use further specified interfaces of this factory for access on
|
||||
the flat configuration.
|
||||
</p>
|
||||
*/
|
||||
interface com::sun::star::lang::XMultiServiceFactory;
|
||||
|
||||
/** provides access to the whole frame loader configuration
|
||||
|
||||
<p>This interface supports an access to the internal configuration of all accessible loader objects.
|
||||
The return value of <member scope="com::sun::star::container">XNameAccess::getByName()</member>
|
||||
is a property sequence packed in an any. </p>
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td><b>Types<b></td>
|
||||
<td>[string]</td>
|
||||
<td>file types which loader is registered for</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>UIName<b></td>
|
||||
<td>[string]</td>
|
||||
<td>UI representable and localized name</td>
|
||||
</tr>
|
||||
</table>
|
||||
*/
|
||||
interface com::sun::star::container::XNameAccess;
|
||||
|
||||
/** supports query mode for configuration access
|
||||
|
||||
<p>
|
||||
This interface can be used to get sub sets of current configuration entries
|
||||
which represent given search parameters.
|
||||
</p>
|
||||
*/
|
||||
interface com::sun::star::container::XContainerQuery;
|
||||
};
|
||||
published service FrameLoaderFactory : XLoaderFactory;
|
||||
|
||||
|
||||
}; }; }; };
|
||||
|
86
offapi/com/sun/star/frame/XLoaderFactory.idl
Normal file
86
offapi/com/sun/star/frame/XLoaderFactory.idl
Normal file
@@ -0,0 +1,86 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* This file incorporates work covered by the following license notice:
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed
|
||||
* with this work for additional information regarding copyright
|
||||
* ownership. The ASF licenses this file to you under the Apache
|
||||
* License, Version 2.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
#ifndef __com_sun_star_frame_XLoaderFactory_idl__
|
||||
#define __com_sun_star_frame_XLoaderFactory_idl__
|
||||
|
||||
#include <com/sun/star/container/XContainerQuery.idl>
|
||||
#include <com/sun/star/container/XNameAccess.idl>
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.idl>
|
||||
|
||||
|
||||
|
||||
module com { module sun { module star { module frame {
|
||||
|
||||
/**
|
||||
Unified service interface for FrameLoaderFactory and ContentHandlerFactory.
|
||||
|
||||
@since LibreOffice 4.2
|
||||
*/
|
||||
published interface XLoaderFactory
|
||||
{
|
||||
/** interface to create loader objects by using his internal name
|
||||
|
||||
<p>
|
||||
Returned objects must support the service specification of a <type>FrameLoader</type>
|
||||
or <type>SynchronousFrameLoader</type>. (Note: last one will be preferred if both ones
|
||||
are available)
|
||||
They can be created by using of his internal name, which must be unambiguous everytime, only.
|
||||
To get this name use further specified interfaces of this factory for access on
|
||||
the flat configuration.
|
||||
</p>
|
||||
*/
|
||||
interface com::sun::star::lang::XMultiServiceFactory;
|
||||
|
||||
/** provides access to the whole frame loader configuration
|
||||
|
||||
<p>This interface supports an access to the internal configuration of all accessible loader objects.
|
||||
The return value of <member scope="com::sun::star::container">XNameAccess::getByName()</member>
|
||||
is a property sequence packed in an any. </p>
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td><b>Types<b></td>
|
||||
<td>[string]</td>
|
||||
<td>file types which loader is registered for</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>UIName<b></td>
|
||||
<td>[string]</td>
|
||||
<td>UI representable and localized name</td>
|
||||
</tr>
|
||||
</table>
|
||||
*/
|
||||
interface com::sun::star::container::XNameAccess;
|
||||
|
||||
/** supports query mode for configuration access
|
||||
|
||||
<p>
|
||||
This interface can be used to get sub sets of current configuration entries
|
||||
which represent given search parameters.
|
||||
</p>
|
||||
*/
|
||||
interface com::sun::star::container::XContainerQuery;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}; }; }; };
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
Binary file not shown.
Reference in New Issue
Block a user