svx: Use constructor feature for SvxShapeCollection.
Change-Id: If717b1d526e5d3e67adae4a224018b6da4bf09aa
This commit is contained in:
@@ -81,11 +81,8 @@ public:
|
|||||||
virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
|
virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
|
||||||
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
|
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
|
||||||
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
|
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
|
||||||
static com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static();
|
|
||||||
static OUString getImplementationName_Static();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
::com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL SvxShapeCollection_createInstance( const com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rSMgr );
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@@ -25,7 +25,6 @@
|
|||||||
#include "../customshapes/EnhancedCustomShapeEngine.hxx"
|
#include "../customshapes/EnhancedCustomShapeEngine.hxx"
|
||||||
|
|
||||||
#include <svx/xtable.hxx>
|
#include <svx/xtable.hxx>
|
||||||
#include "svx/unoshcol.hxx"
|
|
||||||
|
|
||||||
using namespace ::com::sun::star;
|
using namespace ::com::sun::star;
|
||||||
using namespace ::rtl;
|
using namespace ::rtl;
|
||||||
@@ -249,13 +248,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL svx_component_getFactory (
|
|||||||
create_EnhancedCustomShapeEngine,
|
create_EnhancedCustomShapeEngine,
|
||||||
EnhancedCustomShapeEngine_getSupportedServiceNames() );
|
EnhancedCustomShapeEngine_getSupportedServiceNames() );
|
||||||
}
|
}
|
||||||
else if( rtl_str_compare( pImplName, "com.sun.star.drawing.SvxShapeCollection" ) == 0 )
|
|
||||||
{
|
|
||||||
xFactory = createSingleFactory( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ),
|
|
||||||
SvxShapeCollection::getImplementationName_Static(),
|
|
||||||
SvxShapeCollection_createInstance,
|
|
||||||
SvxShapeCollection::getSupportedServiceNames_Static() );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( xFactory.is())
|
if( xFactory.is())
|
||||||
{
|
{
|
||||||
|
@@ -18,9 +18,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <com/sun/star/document/EventObject.hpp>
|
#include <com/sun/star/document/EventObject.hpp>
|
||||||
|
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||||
|
|
||||||
#include "svx/unoshcol.hxx"
|
|
||||||
#include <svx/unoprov.hxx>
|
#include <svx/unoprov.hxx>
|
||||||
|
#include <svx/unoshcol.hxx>
|
||||||
#include <cppuhelper/supportsservice.hxx>
|
#include <cppuhelper/supportsservice.hxx>
|
||||||
|
|
||||||
using namespace ::cppu;
|
using namespace ::cppu;
|
||||||
@@ -209,11 +210,6 @@ sal_Bool SAL_CALL SvxShapeCollection::hasElements() throw( uno::RuntimeException
|
|||||||
// XServiceInfo
|
// XServiceInfo
|
||||||
OUString SAL_CALL SvxShapeCollection::getImplementationName()
|
OUString SAL_CALL SvxShapeCollection::getImplementationName()
|
||||||
throw( uno::RuntimeException )
|
throw( uno::RuntimeException )
|
||||||
{
|
|
||||||
return getImplementationName_Static();
|
|
||||||
}
|
|
||||||
|
|
||||||
OUString SvxShapeCollection::getImplementationName_Static()
|
|
||||||
{
|
{
|
||||||
return OUString("com.sun.star.drawing.SvxShapeCollection");
|
return OUString("com.sun.star.drawing.SvxShapeCollection");
|
||||||
}
|
}
|
||||||
@@ -225,11 +221,6 @@ sal_Bool SAL_CALL SvxShapeCollection::supportsService( const OUString& ServiceNa
|
|||||||
}
|
}
|
||||||
|
|
||||||
uno::Sequence< OUString > SAL_CALL SvxShapeCollection::getSupportedServiceNames() throw( uno::RuntimeException )
|
uno::Sequence< OUString > SAL_CALL SvxShapeCollection::getSupportedServiceNames() throw( uno::RuntimeException )
|
||||||
{
|
|
||||||
return getSupportedServiceNames_Static();
|
|
||||||
}
|
|
||||||
|
|
||||||
uno::Sequence< OUString > SvxShapeCollection::getSupportedServiceNames_Static()
|
|
||||||
{
|
{
|
||||||
uno::Sequence< OUString > aSeq(2);
|
uno::Sequence< OUString > aSeq(2);
|
||||||
aSeq.getArray()[0] = "com.sun.star.drawing.Shapes";
|
aSeq.getArray()[0] = "com.sun.star.drawing.Shapes";
|
||||||
@@ -237,9 +228,16 @@ uno::Sequence< OUString > SvxShapeCollection::getSupportedServiceNames_Static()
|
|||||||
return aSeq;
|
return aSeq;
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference< XInterface > SAL_CALL SvxShapeCollection_createInstance( const Reference< ::com::sun::star::lang::XMultiServiceFactory >& )
|
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
|
||||||
|
com_sun_star_drawing_SvxShapeCollection_implementation_getFactory(
|
||||||
|
SAL_UNUSED_PARAMETER css::uno::XComponentContext *,
|
||||||
|
uno_Sequence * arguments)
|
||||||
{
|
{
|
||||||
return *( new SvxShapeCollection() );
|
assert(arguments != 0 && arguments->nElements == 0); (void) arguments;
|
||||||
|
css::uno::Reference<css::uno::XInterface> x(
|
||||||
|
static_cast<cppu::OWeakObject *>(new SvxShapeCollection));
|
||||||
|
x->acquire();
|
||||||
|
return x.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -35,7 +35,8 @@
|
|||||||
<implementation name="com.sun.star.drawing.EnhancedCustomShapeEngine">
|
<implementation name="com.sun.star.drawing.EnhancedCustomShapeEngine">
|
||||||
<service name="com.sun.star.drawing.CustomShapeEngine"/>
|
<service name="com.sun.star.drawing.CustomShapeEngine"/>
|
||||||
</implementation>
|
</implementation>
|
||||||
<implementation name="com.sun.star.drawing.SvxShapeCollection">
|
<implementation name="com.sun.star.drawing.SvxShapeCollection"
|
||||||
|
constructor="com_sun_star_drawing_SvxShapeCollection_implementation_getFactory">
|
||||||
<service name="com.sun.star.drawing.ShapeCollection"/>
|
<service name="com.sun.star.drawing.ShapeCollection"/>
|
||||||
</implementation>
|
</implementation>
|
||||||
<implementation name="com.sun.star.drawing.SvxUnoColorTable">
|
<implementation name="com.sun.star.drawing.SvxUnoColorTable">
|
||||||
|
Reference in New Issue
Block a user