Kaydet (Commit) dda14afa authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

Use UNO ctors for extrusion and fontwork toolbar controls

Change-Id: I075b1cbe648dfaf8bb7cee6d353cbdcf26c4465c
Reviewed-on: https://gerrit.libreoffice.org/57143
Tested-by: Jenkins
Reviewed-by: 's avatarMaxim Monastirsky <momonasmon@gmail.com>
üst 526a6baf
......@@ -14211,7 +14211,6 @@ svx/source/accessibility/lookupcolorname.cxx
svx/source/accessibility/lookupcolorname.hxx
svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
svx/source/accessibility/svxrectctaccessiblecontext.cxx
svx/source/core/coreservices.cxx
svx/source/core/extedit.cxx
svx/source/core/graphichelper.cxx
svx/source/customshapes/EnhancedCustomShape2d.cxx
......@@ -14405,7 +14404,6 @@ svx/source/inc/cell.hxx
svx/source/inc/celltypes.hxx
svx/source/inc/charmapacc.hxx
svx/source/inc/clonelist.hxx
svx/source/inc/coreservices.hxx
svx/source/inc/datalistener.hxx
svx/source/inc/datanavi.hxx
svx/source/inc/delayedevent.hxx
......
......@@ -105,7 +105,6 @@ $(eval $(call gb_Library_use_system_darwin_frameworks,svxcore,\
endif
$(eval $(call gb_Library_add_exception_objects,svxcore,\
svx/source/core/coreservices \
svx/source/core/extedit \
svx/source/core/graphichelper \
svx/source/customshapes/EnhancedCustomShape2d \
......
/* -*- 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 .
*/
/** this file contains the uno service registrations for all services in the svxcore lib */
#include <sal/types.h>
#include <cppuhelper/factory.hxx>
#include <coreservices.hxx>
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::registry;
extern "C"
{
SAL_DLLPUBLIC_EXPORT void * svxcore_component_getFactory (
const sal_Char * pImplName, void * pServiceManager, void * )
{
void * pRet = nullptr;
if( pServiceManager )
{
Reference< XSingleServiceFactory > xFactory;
if( svx::ExtrusionDepthController_getImplementationName().equalsAscii( pImplName ) )
{
xFactory = ::cppu::createSingleFactory(
static_cast< XMultiServiceFactory * >( pServiceManager ),
svx::ExtrusionDepthController_getImplementationName(),
svx::ExtrusionDepthController_createInstance,
svx::ExtrusionDepthController_getSupportedServiceNames() );
}
else if( svx::ExtrusionDirectionControl_getImplementationName().equalsAscii( pImplName ) )
{
xFactory = ::cppu::createSingleFactory(
static_cast< XMultiServiceFactory * >( pServiceManager ),
svx::ExtrusionDirectionControl_getImplementationName(),
svx::ExtrusionDirectionControl_createInstance,
svx::ExtrusionDirectionControl_getSupportedServiceNames() );
}
else if( svx::ExtrusionLightingControl_getImplementationName().equalsAscii( pImplName ) )
{
xFactory = ::cppu::createSingleFactory(
static_cast< XMultiServiceFactory * >( pServiceManager ),
svx::ExtrusionLightingControl_getImplementationName(),
svx::ExtrusionLightingControl_createInstance,
svx::ExtrusionLightingControl_getSupportedServiceNames() );
}
else if( svx::ExtrusionSurfaceControl_getImplementationName().equalsAscii( pImplName ) )
{
xFactory = ::cppu::createSingleFactory(
static_cast< XMultiServiceFactory * >( pServiceManager ),
svx::ExtrusionSurfaceControl_getImplementationName(),
svx::ExtrusionSurfaceControl_createInstance,
svx::ExtrusionSurfaceControl_getSupportedServiceNames() );
}
else if( svx::FontworkAlignmentControl_getImplementationName().equalsAscii( pImplName ) )
{
xFactory = ::cppu::createSingleFactory(
static_cast< XMultiServiceFactory * >( pServiceManager ),
svx::FontworkAlignmentControl_getImplementationName(),
svx::FontworkAlignmentControl_createInstance,
svx::FontworkAlignmentControl_getSupportedServiceNames() );
}
else if( svx::FontworkCharacterSpacingControl_getImplementationName().equalsAscii( pImplName ) )
{
xFactory = ::cppu::createSingleFactory(
static_cast< XMultiServiceFactory * >( pServiceManager ),
svx::FontworkCharacterSpacingControl_getImplementationName(),
svx::FontworkCharacterSpacingControl_createInstance,
svx::FontworkCharacterSpacingControl_getSupportedServiceNames() );
} if( xFactory.is())
{
xFactory->acquire();
pRet = xFactory.get();
}
}
return pRet;
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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 INCLUDED_SVX_SOURCE_INC_CORESERVICES_HXX
#define INCLUDED_SVX_SOURCE_INC_CORESERVICES_HXX
#include <sal/config.h>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <rtl/ustring.hxx>
#include <sal/types.h>
namespace com { namespace sun { namespace star {
namespace lang { class XMultiServiceFactory; }
namespace uno { class XInterface; }
} } }
namespace svx
{
OUString ExtrusionDepthController_getImplementationName();
/// @throws css::uno::RuntimeException
css::uno::Reference< css::uno::XInterface > ExtrusionDepthController_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > &);
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > ExtrusionDepthController_getSupportedServiceNames();
OUString ExtrusionDirectionControl_getImplementationName();
/// @throws css::uno::RuntimeException
css::uno::Reference< css::uno::XInterface > ExtrusionDirectionControl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > &);
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > ExtrusionDirectionControl_getSupportedServiceNames();
OUString ExtrusionLightingControl_getImplementationName();
/// @throws css::uno::RuntimeException
css::uno::Reference< css::uno::XInterface > ExtrusionLightingControl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > &);
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > ExtrusionLightingControl_getSupportedServiceNames();
OUString ExtrusionSurfaceControl_getImplementationName();
/// @throws css::uno::RuntimeException
css::uno::Reference< css::uno::XInterface > ExtrusionSurfaceControl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > &);
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > ExtrusionSurfaceControl_getSupportedServiceNames();
OUString FontworkAlignmentControl_getImplementationName();
/// @throws css::uno::RuntimeException
css::uno::Reference< css::uno::XInterface > FontworkAlignmentControl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > &);
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > FontworkAlignmentControl_getSupportedServiceNames();
OUString FontworkCharacterSpacingControl_getImplementationName();
/// @throws css::uno::RuntimeException
css::uno::Reference< css::uno::XInterface > FontworkCharacterSpacingControl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > &);
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > FontworkCharacterSpacingControl_getSupportedServiceNames();
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -36,7 +36,6 @@
#include <svx/sdasitm.hxx>
#include <svx/dialmgr.hxx>
#include <coreservices.hxx>
#include <helpids.h>
#include "extrusioncontrols.hxx"
#include <extrusiondepthdialog.hxx>
......@@ -320,36 +319,27 @@ void SAL_CALL ExtrusionDirectionControl::initialize( const css::uno::Sequence< c
// XServiceInfo
OUString ExtrusionDirectionControl_getImplementationName()
OUString ExtrusionDirectionControl::getImplementationName()
{
return OUString( "com.sun.star.comp.svx.ExtrusionDirectionController" );
}
Sequence< OUString > ExtrusionDirectionControl_getSupportedServiceNames()
Sequence< OUString > ExtrusionDirectionControl::getSupportedServiceNames()
{
Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" };
return aSNS;
}
Reference< XInterface > ExtrusionDirectionControl_createInstance(
const Reference< XMultiServiceFactory >& rSMgr
)
{
return *new ExtrusionDirectionControl( comphelper::getComponentContext(rSMgr) );
}
OUString SAL_CALL ExtrusionDirectionControl::getImplementationName( )
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
com_sun_star_comp_svx_ExtrusionDirectionControl_get_implementation(
css::uno::XComponentContext* xContext,
css::uno::Sequence<css::uno::Any> const &)
{
return ExtrusionDirectionControl_getImplementationName();
return cppu::acquire(new ExtrusionDirectionControl(xContext));
}
Sequence< OUString > SAL_CALL ExtrusionDirectionControl::getSupportedServiceNames( )
{
return ExtrusionDirectionControl_getSupportedServiceNames();
}
ExtrusionDepthDialog::ExtrusionDepthDialog(weld::Window* pParent, double fDepth, FieldUnit eDefaultUnit)
: GenericDialogController(pParent, "svx/ui/extrustiondepthdialog.ui", "ExtrustionDepthDialog")
......@@ -565,33 +555,27 @@ void SAL_CALL ExtrusionDepthController::initialize( const css::uno::Sequence< cs
// XServiceInfo
OUString ExtrusionDepthController_getImplementationName()
OUString ExtrusionDepthController::getImplementationName()
{
return OUString( "com.sun.star.comp.svx.ExtrusionDepthController" );
}
Sequence< OUString > ExtrusionDepthController_getSupportedServiceNames()
Sequence< OUString > ExtrusionDepthController::getSupportedServiceNames()
{
Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" };
return aSNS;
}
Reference< XInterface > ExtrusionDepthController_createInstance( const Reference< XMultiServiceFactory >& rSMgr )
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
com_sun_star_comp_svx_ExtrusionDepthController_get_implementation(
css::uno::XComponentContext* xContext,
css::uno::Sequence<css::uno::Any> const &)
{
return *new ExtrusionDepthController( comphelper::getComponentContext(rSMgr) );
return cppu::acquire(new ExtrusionDepthController(xContext));
}
OUString SAL_CALL ExtrusionDepthController::getImplementationName( )
{
return ExtrusionDepthController_getImplementationName();
}
Sequence< OUString > SAL_CALL ExtrusionDepthController::getSupportedServiceNames( )
{
return ExtrusionDepthController_getSupportedServiceNames();
}
static const char g_sExtrusionLightingDirection[] = ".uno:ExtrusionLightingDirection";
static const char g_sExtrusionLightingIntensity[] = ".uno:ExtrusionLightingIntensity";
......@@ -825,38 +809,28 @@ void SAL_CALL ExtrusionLightingControl::initialize( const css::uno::Sequence< cs
// XServiceInfo
OUString ExtrusionLightingControl_getImplementationName()
OUString ExtrusionLightingControl::getImplementationName()
{
return OUString( "com.sun.star.comp.svx.ExtrusionLightingController" );
}
Sequence< OUString > ExtrusionLightingControl_getSupportedServiceNames()
Sequence< OUString > ExtrusionLightingControl::getSupportedServiceNames()
{
Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" };
return aSNS;
}
Reference< XInterface > ExtrusionLightingControl_createInstance(
const Reference< XMultiServiceFactory >& rSMgr
)
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
com_sun_star_comp_svx_ExtrusionLightingControl_get_implementation(
css::uno::XComponentContext* xContext,
css::uno::Sequence<css::uno::Any> const &)
{
return *new ExtrusionLightingControl( comphelper::getComponentContext(rSMgr) );
return cppu::acquire(new ExtrusionLightingControl(xContext));
}
OUString SAL_CALL ExtrusionLightingControl::getImplementationName( )
{
return ExtrusionLightingControl_getImplementationName();
}
Sequence< OUString > SAL_CALL ExtrusionLightingControl::getSupportedServiceNames( )
{
return ExtrusionLightingControl_getSupportedServiceNames();
}
static const char g_sExtrusionSurface[] = ".uno:ExtrusionSurface";
ExtrusionSurfaceWindow::ExtrusionSurfaceWindow(
......@@ -961,36 +935,25 @@ void SAL_CALL ExtrusionSurfaceControl::initialize( const css::uno::Sequence< css
// XServiceInfo
OUString ExtrusionSurfaceControl_getImplementationName()
OUString ExtrusionSurfaceControl::getImplementationName()
{
return OUString( "com.sun.star.comp.svx.ExtrusionSurfaceController" );
}
Sequence< OUString > ExtrusionSurfaceControl_getSupportedServiceNames()
Sequence< OUString > ExtrusionSurfaceControl::getSupportedServiceNames()
{
Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" };
return aSNS;
}
Reference< XInterface > ExtrusionSurfaceControl_createInstance(
const Reference< XMultiServiceFactory >& rSMgr
)
{
return *new ExtrusionSurfaceControl( comphelper::getComponentContext(rSMgr) );
}
OUString SAL_CALL ExtrusionSurfaceControl::getImplementationName( )
{
return ExtrusionSurfaceControl_getImplementationName();
}
Sequence< OUString > SAL_CALL ExtrusionSurfaceControl::getSupportedServiceNames( )
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
com_sun_star_comp_svx_ExtrusionSurfaceControl_get_implementation(
css::uno::XComponentContext* xContext,
css::uno::Sequence<css::uno::Any> const &)
{
return ExtrusionSurfaceControl_getSupportedServiceNames();
return cppu::acquire(new ExtrusionSurfaceControl(xContext));
}
}
......
......@@ -46,9 +46,7 @@
#include <svx/gallery.hxx>
#include <svx/dlgutil.hxx>
#include <svx/fontworkgallery.hxx>
#include <coreservices.hxx>
#include <algorithm>
#include <memory>
......@@ -404,36 +402,28 @@ void SAL_CALL FontworkAlignmentControl::initialize( const css::uno::Sequence< cs
// XServiceInfo
OUString FontworkAlignmentControl_getImplementationName()
OUString FontworkAlignmentControl::getImplementationName()
{
return OUString( "com.sun.star.comp.svx.FontworkAlignmentController" );
}
Sequence< OUString > FontworkAlignmentControl_getSupportedServiceNames()
Sequence< OUString > FontworkAlignmentControl::getSupportedServiceNames()
{
Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" };
return aSNS;
}
Reference< XInterface > FontworkAlignmentControl_createInstance( const Reference< XMultiServiceFactory >& rSMgr )
{
return *new FontworkAlignmentControl( comphelper::getComponentContext(rSMgr) );
}
OUString SAL_CALL FontworkAlignmentControl::getImplementationName( )
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
com_sun_star_comp_svx_FontworkAlignmentControl_get_implementation(
css::uno::XComponentContext* xContext,
css::uno::Sequence<css::uno::Any> const &)
{
return FontworkAlignmentControl_getImplementationName();
return cppu::acquire(new FontworkAlignmentControl(xContext));
}
Sequence< OUString > SAL_CALL FontworkAlignmentControl::getSupportedServiceNames( )
{
return FontworkAlignmentControl_getSupportedServiceNames();
}
class FontworkCharacterSpacingWindow : public ToolbarMenu
{
public:
......@@ -628,36 +618,28 @@ void SAL_CALL FontworkCharacterSpacingControl::initialize( const css::uno::Seque
// XServiceInfo
OUString FontworkCharacterSpacingControl_getImplementationName()
OUString FontworkCharacterSpacingControl::getImplementationName()
{
return OUString( "com.sun.star.comp.svx.FontworkCharacterSpacingController" );
}
Sequence< OUString > FontworkCharacterSpacingControl_getSupportedServiceNames()
Sequence< OUString > FontworkCharacterSpacingControl::getSupportedServiceNames()
{
Sequence<OUString> aSNS { "com.sun.star.frame.ToolbarController" };
return aSNS;
}
Reference< XInterface > FontworkCharacterSpacingControl_createInstance( const Reference< XMultiServiceFactory >& rSMgr )
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
com_sun_star_comp_svx_FontworkCharacterSpacingControl_get_implementation(
css::uno::XComponentContext* xContext,
css::uno::Sequence<css::uno::Any> const &)
{
return *new FontworkCharacterSpacingControl( comphelper::getComponentContext(rSMgr) );
return cppu::acquire(new FontworkCharacterSpacingControl(xContext));
}
OUString SAL_CALL FontworkCharacterSpacingControl::getImplementationName( )
{
return FontworkCharacterSpacingControl_getImplementationName();
}
Sequence< OUString > SAL_CALL FontworkCharacterSpacingControl::getSupportedServiceNames( )
{
return FontworkCharacterSpacingControl_getSupportedServiceNames();
}
FontworkCharacterSpacingDialog::FontworkCharacterSpacingDialog( vcl::Window* pParent, sal_Int32 nScale )
: ModalDialog( pParent, "FontworkSpacingDialog" , "svx/ui/fontworkspacingdialog.ui" )
{
......
......@@ -17,27 +17,33 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
prefix="svxcore" xmlns="http://openoffice.org/2010/uno-components">
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.Draw.GraphicExporter"
constructor="com_sun_star_comp_Draw_GraphicExporter_get_implementation">
<service name="com.sun.star.drawing.GraphicExportFilter"/>
</implementation>
<implementation name="com.sun.star.comp.svx.ExtrusionDepthController">
<implementation name="com.sun.star.comp.svx.ExtrusionDepthController"
constructor="com_sun_star_comp_svx_ExtrusionDepthController_get_implementation">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
<implementation name="com.sun.star.comp.svx.ExtrusionDirectionController">
<implementation name="com.sun.star.comp.svx.ExtrusionDirectionController"
constructor="com_sun_star_comp_svx_ExtrusionDirectionControl_get_implementation">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
<implementation name="com.sun.star.comp.svx.ExtrusionLightingController">
<implementation name="com.sun.star.comp.svx.ExtrusionLightingController"
constructor="com_sun_star_comp_svx_ExtrusionLightingControl_get_implementation">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
<implementation name="com.sun.star.comp.svx.ExtrusionSurfaceController">
<implementation name="com.sun.star.comp.svx.ExtrusionSurfaceController"
constructor="com_sun_star_comp_svx_ExtrusionSurfaceControl_get_implementation">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
<implementation name="com.sun.star.comp.svx.FontworkAlignmentController">
<implementation name="com.sun.star.comp.svx.FontworkAlignmentController"
constructor="com_sun_star_comp_svx_FontworkAlignmentControl_get_implementation">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
<implementation name="com.sun.star.comp.svx.FontworkCharacterSpacingController">
<implementation name="com.sun.star.comp.svx.FontworkCharacterSpacingController"
constructor="com_sun_star_comp_svx_FontworkCharacterSpacingControl_get_implementation">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
<implementation name="com.sun.star.comp.svx.FrameToolBoxControl"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment