diff options
27 files changed, 115 insertions, 142 deletions
diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx index 456aca2f50e5..12066dc92b91 100644 --- a/sax/source/expatwrap/sax_expat.cxx +++ b/sax/source/expatwrap/sax_expat.cxx @@ -34,6 +34,7 @@ #include <cppuhelper/weak.hxx> #include <cppuhelper/implbase3.hxx> #include <cppuhelper/supportsservice.hxx> +#include <rtl/ref.hxx> #include <expat.h> @@ -1021,13 +1022,12 @@ void SaxExpatParser_Impl::callbackEndCDATA( void *pvThis ) extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_extensions_xml_sax_ParserExpat_get_implementation( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, + css::uno::XComponentContext *, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new SaxExpatParser)); + rtl::Reference<SaxExpatParser> x(new SaxExpatParser); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx index 7f0d498ae2cc..be86b61d18f4 100644 --- a/sax/source/expatwrap/saxwriter.cxx +++ b/sax/source/expatwrap/saxwriter.cxx @@ -36,11 +36,9 @@ #include <cppuhelper/implbase2.hxx> #include <cppuhelper/supportsservice.hxx> -#include <rtl/strbuf.hxx> -#include <rtl/byteseq.hxx> +#include <rtl/ref.hxx> #include <rtl/ustrbuf.hxx> -using namespace ::rtl; using namespace ::std; using namespace ::osl; using namespace ::cppu; @@ -1374,13 +1372,12 @@ void SAXWriter::unknown(const OUString& sString) throw (SAXException, RuntimeExc extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_extensions_xml_sax_Writer_get_implementation( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, + css::uno::XComponentContext *, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new SAXWriter)); + rtl::Reference<SAXWriter> x(new SAXWriter); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index 5f86b88bf5dc..57bff21ed59f 100644 --- a/sax/source/fastparser/fastparser.cxx +++ b/sax/source/fastparser/fastparser.cxx @@ -1428,13 +1428,12 @@ bool FastSaxParser::hasNamespaceURL( const OUString& rPrefix ) const extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_extensions_xml_sax_FastParser_get_implementation( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, + css::uno::XComponentContext *, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new FastSaxParser)); + rtl::Reference<FastSaxParser> x(new FastSaxParser); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/appl/appbaslib.cxx b/sfx2/source/appl/appbaslib.cxx index a980606c587a..4b96cc2e6c0e 100644 --- a/sfx2/source/appl/appbaslib.cxx +++ b/sfx2/source/appl/appbaslib.cxx @@ -161,8 +161,7 @@ com_sun_star_comp_sfx2_ApplicationDialogLibraryContainer_get_implementation( css::uno::Sequence<css::uno::Any> const &) { SFX_APP()->GetBasicManager(); - Reference< XInterface > xRet = - Reference< XInterface >( SFX_APP()->GetDialogContainer(), UNO_QUERY ); + Reference< XInterface > xRet( SFX_APP()->GetDialogContainer(), UNO_QUERY ); xRet->acquire(); return xRet.get(); } @@ -176,8 +175,7 @@ com_sun_star_comp_sfx2_ApplicationScriptLibraryContainer_get_implementation( css::uno::Sequence<css::uno::Any> const &) { SFX_APP()->GetBasicManager(); - Reference< XInterface > xRet = - Reference< XInterface >( SFX_APP()->GetBasicContainer(), UNO_QUERY ); + Reference< XInterface > xRet( SFX_APP()->GetBasicContainer(), UNO_QUERY ); xRet->acquire(); return xRet.get(); } diff --git a/sfx2/source/notify/globalevents.cxx b/sfx2/source/notify/globalevents.cxx index 173e0b104ce5..5c8605282b52 100644 --- a/sfx2/source/notify/globalevents.cxx +++ b/sfx2/source/notify/globalevents.cxx @@ -534,7 +534,7 @@ struct Instance { static_cast<cppu::OWeakObject *>(new SfxGlobalEvents_Impl(context))) {} - css::uno::Reference<css::uno::XInterface> instance; + rtl::Reference<css::uno::XInterface> instance; }; struct Singleton: @@ -549,8 +549,7 @@ com_sun_star_comp_sfx2_GlobalEventBroadcaster_get_implementation( css::uno::XComponentContext *context, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - Singleton::get(context).instance); + rtl::Reference<css::uno::XInterface> x(Singleton::get(context).instance); x->acquire(); return x.get(); } diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx index ca66017a9e87..c1c07e17079e 100644 --- a/stoc/source/defaultregistry/defaultregistry.cxx +++ b/stoc/source/defaultregistry/defaultregistry.cxx @@ -27,6 +27,7 @@ #include <cppuhelper/implementationentry.hxx> #include <cppuhelper/supportsservice.hxx> #include <registry/registry.hxx> +#include <rtl/ref.hxx> #include <com/sun/star/registry/XSimpleRegistry.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -1354,10 +1355,9 @@ com_sun_star_comp_stoc_NestedRegistry_get_implementation( SAL_UNUSED_PARAMETER css::uno::XComponentContext *, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new NestedRegistryImpl)); + rtl::Reference<NestedRegistryImpl> x(new NestedRegistryImpl); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx index 7b7a13cca5ef..e5daf98392f8 100644 --- a/stoc/source/implementationregistration/implreg.cxx +++ b/stoc/source/implementationregistration/implreg.cxx @@ -30,9 +30,9 @@ #include <uno/mapping.hxx> #include <osl/thread.h> +#include <rtl/ref.hxx> #include <rtl/ustring.hxx> #include <rtl/ustrbuf.hxx> -#include <rtl/strbuf.hxx> #include <osl/process.h> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -1821,11 +1821,9 @@ com_sun_star_comp_stoc_ImplementationRegistration_get_implementation( css::uno::XComponentContext *context, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>( - new ImplementationRegistration(context))); + rtl::Reference<ImplementationRegistration> x(new ImplementationRegistration(context)); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/stoc/source/loader/dllcomponentloader.cxx b/stoc/source/loader/dllcomponentloader.cxx index b8e196ab3d0f..14fc172cd4a6 100644 --- a/stoc/source/loader/dllcomponentloader.cxx +++ b/stoc/source/loader/dllcomponentloader.cxx @@ -24,6 +24,7 @@ #include <osl/mutex.hxx> #include <osl/diagnose.h> #include <osl/module.h> +#include <rtl/ref.hxx> #include <rtl/ustring.hxx> #include <uno/environment.h> #include <uno/mapping.hxx> @@ -169,10 +170,9 @@ com_sun_star_comp_stoc_DLLComponentLoader_get_implementation( css::uno::XComponentContext *context, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new DllComponentLoader(context))); + rtl::Reference<DllComponentLoader> x(new DllComponentLoader(context)); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx index 9edb8c4edef3..2e6c84bac924 100644 --- a/stoc/source/security/access_controller.cxx +++ b/stoc/source/security/access_controller.cxx @@ -26,8 +26,8 @@ #include <osl/mutex.hxx> #include <osl/thread.hxx> +#include <rtl/ref.hxx> #include <rtl/ustrbuf.hxx> -#include <rtl/string.hxx> #include <uno/current_context.h> #include <uno/lbnames.h> @@ -984,10 +984,9 @@ com_sun_star_security_comp_stoc_AccessController_get_implementation( css::uno::XComponentContext *context, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new AccessController(context))); + rtl::Reference<AccessController> x(new AccessController(context)); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/stoc/source/security/file_policy.cxx b/stoc/source/security/file_policy.cxx index 47d1ae602a3e..4cd5e8c000ab 100644 --- a/stoc/source/security/file_policy.cxx +++ b/stoc/source/security/file_policy.cxx @@ -23,7 +23,7 @@ #include <osl/diagnose.h> #include <osl/file.h> #include <rtl/byteseq.hxx> -#include <rtl/string.hxx> +#include <rtl/ref.hxx> #include <rtl/ustrbuf.hxx> #include <cppuhelper/access_control.hxx> @@ -42,7 +42,6 @@ #define IMPL_NAME "com.sun.star.security.comp.stoc.FilePolicy" using namespace ::osl; -using namespace ::rtl; using namespace ::cppu; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -157,7 +156,7 @@ class PolicyReader oslFileHandle m_file; sal_Int32 m_linepos; - ByteSequence m_line; + rtl::ByteSequence m_line; sal_Int32 m_pos; sal_Unicode m_back; @@ -546,10 +545,9 @@ com_sun_star_security_comp_stoc_FilePolicy_get_implementation( css::uno::XComponentContext *context, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new FilePolicy(context))); + rtl::Reference<FilePolicy> x(new FilePolicy(context)); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index 42531052a39c..1dd406ec89e0 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -19,6 +19,7 @@ #include <osl/mutex.hxx> #include <osl/diagnose.h> +#include <rtl/ref.hxx> #include <rtl/ustrbuf.hxx> #include <boost/unordered_map.hpp> @@ -1675,10 +1676,9 @@ com_sun_star_comp_stoc_OServiceManager_get_implementation( css::uno::XComponentContext *context, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new OServiceManager(context))); + rtl::Reference<OServiceManager> x(new OServiceManager(context)); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL @@ -1686,10 +1686,9 @@ com_sun_star_comp_stoc_ORegistryServiceManager_get_implementation( css::uno::XComponentContext *context, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new ORegistryServiceManager(context))); + rtl::Reference<ORegistryServiceManager> x(new ORegistryServiceManager(context)); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL @@ -1697,10 +1696,9 @@ com_sun_star_comp_stoc_OServiceManagerWrapper_get_implementation( css::uno::XComponentContext *context, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new OServiceManagerWrapper(context))); + rtl::Reference<OServiceManagerWrapper> x(new OServiceManagerWrapper(context)); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/stoc/source/simpleregistry/simpleregistry.cxx b/stoc/source/simpleregistry/simpleregistry.cxx index 97fe443a9762..96230e17ab97 100644 --- a/stoc/source/simpleregistry/simpleregistry.cxx +++ b/stoc/source/simpleregistry/simpleregistry.cxx @@ -1128,10 +1128,9 @@ com_sun_star_comp_stoc_SimpleRegistry_get_implementation( SAL_UNUSED_PARAMETER css::uno::XComponentContext *, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new SimpleRegistry)); + rtl::Reference<SimpleRegistry> x(new SimpleRegistry); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index 00250e838eda..b2ea034b8fd6 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -38,6 +38,7 @@ #include "descriptor.hxx" #include "graphic.hxx" +#include <rtl/ref.hxx> #include <svtools/grfmgr.hxx> #include "provider.hxx" #include <vcl/dibtools.hxx> @@ -857,13 +858,12 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_graphic_GraphicProvider_get_implementation( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, - css::uno::Sequence<css::uno::Any> const &) + css::uno::XComponentContext *, + css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new GraphicProvider)); + rtl::Reference<GraphicProvider> x(new GraphicProvider); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/graphic/renderer.cxx b/svtools/source/graphic/renderer.cxx index 2b3fc31e52ee..0621e570a467 100644 --- a/svtools/source/graphic/renderer.cxx +++ b/svtools/source/graphic/renderer.cxx @@ -26,6 +26,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include <comphelper/propertysetinfo.hxx> #include <cppuhelper/supportsservice.hxx> +#include <rtl/ref.hxx> #include <svl/itemprop.hxx> #include <svtools/grfmgr.hxx> #include <comphelper/servicehelper.hxx> @@ -293,13 +294,12 @@ void SAL_CALL GraphicRendererVCL::render( const uno::Reference< graphic::XGraphi extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_graphic_GraphicRendererVCL_get_implementation( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, - css::uno::Sequence<css::uno::Any> const &) + css::uno::XComponentContext *, + css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new GraphicRendererVCL)); + rtl::Reference<GraphicRendererVCL> x(new GraphicRendererVCL); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/hatchwindow/hatchwindowfactory.cxx b/svtools/source/hatchwindow/hatchwindowfactory.cxx index 17c05840dafa..afa3f3322533 100644 --- a/svtools/source/hatchwindow/hatchwindowfactory.cxx +++ b/svtools/source/hatchwindow/hatchwindowfactory.cxx @@ -21,6 +21,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <cppuhelper/implbase2.hxx> #include <cppuhelper/supportsservice.hxx> +#include <rtl/ref.hxx> #include <vcl/svapp.hxx> #include <hatchwindow.hxx> @@ -85,13 +86,12 @@ uno::Sequence< OUString > SAL_CALL OHatchWindowFactory::getSupportedServiceNames extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_embed_HatchWindowFactory_get_implementation( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, - css::uno::Sequence<css::uno::Any> const &) + css::uno::XComponentContext *, + css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new OHatchWindowFactory)); + rtl::Reference<OHatchWindowFactory> x(new OHatchWindowFactory); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/inc/renderer.hxx b/svtools/source/inc/renderer.hxx index a69bac71f7e5..397ba033525e 100644 --- a/svtools/source/inc/renderer.hxx +++ b/svtools/source/inc/renderer.hxx @@ -37,15 +37,13 @@ class GraphicRendererVCL : public ::cppu::OWeakAggObject, public ::comphelper::PropertySetHelper, public ::com::sun::star::graphic::XGraphicRenderer { + static ::comphelper::PropertySetInfo* createPropertySetInfo(); + public: GraphicRendererVCL(); ~GraphicRendererVCL() throw(); -protected: - - static ::comphelper::PropertySetInfo* createPropertySetInfo(); - // XInterface virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index 861c42a9eeb9..2c3cd3e3f978 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -25,6 +25,7 @@ #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/drawing/XCustomShapeEngine.hpp> +#include <rtl/ref.hxx> #include "svx/EnhancedCustomShape2d.hxx" #include "EnhancedCustomShape3d.hxx" #include "EnhancedCustomShapeFontWork.hxx" @@ -490,13 +491,12 @@ Sequence< Reference< drawing::XCustomShapeHandle > > SAL_CALL EnhancedCustomShap extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_drawing_EnhancedCustomShapeEngine_get_implementation( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, + css::uno::XComponentContext *, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new EnhancedCustomShapeEngine)); + rtl::Reference<EnhancedCustomShapeEngine> x(new EnhancedCustomShapeEngine); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/primitive2d/primitivefactory2d.cxx b/svx/source/sdr/primitive2d/primitivefactory2d.cxx index abcdd911dc0d..ded21f9db57b 100644 --- a/svx/source/sdr/primitive2d/primitivefactory2d.cxx +++ b/svx/source/sdr/primitive2d/primitivefactory2d.cxx @@ -19,6 +19,7 @@ #include <com/sun/star/graphic/XPrimitiveFactory2D.hpp> #include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <rtl/ref.hxx> #include <svx/svdobj.hxx> #include <svx/svdpage.hxx> #include <svx/unoapi.hxx> @@ -89,13 +90,12 @@ Primitive2DSequence SAL_CALL PrimitiveFactory2D::createPrimitivesFromXDrawPage( extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_graphic_PrimitiveFactory2D_get_implementation( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, + css::uno::XComponentContext *, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new PrimitiveFactory2D)); + rtl::Reference<PrimitiveFactory2D> x(new PrimitiveFactory2D); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/PanelFactory.cxx b/svx/source/sidebar/PanelFactory.cxx index dbf9c08363fc..26352c004ae1 100644 --- a/svx/source/sidebar/PanelFactory.cxx +++ b/svx/source/sidebar/PanelFactory.cxx @@ -206,11 +206,10 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement ( extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL org_apache_openoffice_comp_svx_sidebar_PanelFactory_get_implementation( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, + css::uno::XComponentContext *, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new PanelFactory)); + rtl::Reference<PanelFactory> x(new PanelFactory); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index b20337fb88c1..d93065ea531a 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -23,6 +23,7 @@ #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> +#include <rtl/ref.hxx> #include <vcl/svapp.hxx> #include <vcl/window.hxx> #include <toolkit/helper/vclunohelper.hxx> @@ -443,10 +444,9 @@ com_sun_star_svx_FontHeightToolBoxController_get_implementation( css::uno::XComponentContext *rxContext, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new FontHeightToolBoxControl(rxContext))); + rtl::Reference<FontHeightToolBoxControl> x(new FontHeightToolBoxControl(rxContext)); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index b3fdbfbf8c7f..05c6bfe80d8c 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -39,6 +39,7 @@ #include <vcl/toolbox.hxx> #include <vcl/svapp.hxx> #include <osl/mutex.hxx> +#include <rtl/ref.hxx> #include <rtl/instance.hxx> using namespace css; @@ -1054,10 +1055,9 @@ com_sun_star_svx_FindTextToolboxController_get_implementation( css::uno::XComponentContext *context, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new FindTextToolbarController(context))); + rtl::Reference<FindTextToolbarController> x(new FindTextToolbarController(context)); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL @@ -1065,10 +1065,9 @@ com_sun_star_svx_ExitFindbarToolboxController_get_implementation( css::uno::XComponentContext *context, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new ExitSearchToolboxController(context))); + rtl::Reference<ExitSearchToolboxController> x(new ExitSearchToolboxController(context)); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL @@ -1076,11 +1075,10 @@ com_sun_star_svx_UpSearchToolboxController_get_implementation( css::uno::XComponentContext *context, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new UpDownSearchToolboxController( - context, UpDownSearchToolboxController::UP ))); + rtl::Reference<UpDownSearchToolboxController> x(new UpDownSearchToolboxController( + context, UpDownSearchToolboxController::UP)); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL @@ -1088,11 +1086,10 @@ com_sun_star_svx_DownSearchToolboxController_get_implementation( css::uno::XComponentContext *context, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new UpDownSearchToolboxController( - context, UpDownSearchToolboxController::DOWN ))); + rtl::Reference<UpDownSearchToolboxController> x(new UpDownSearchToolboxController( + context, UpDownSearchToolboxController::DOWN)); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL @@ -1100,10 +1097,9 @@ com_sun_star_svx_MatchCaseToolboxController_get_implementation( css::uno::XComponentContext *context, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new MatchCaseToolboxController(context))); + rtl::Reference<MatchCaseToolboxController> x(new MatchCaseToolboxController(context)); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL @@ -1111,10 +1107,9 @@ com_sun_star_svx_FindAllToolboxController_get_implementation( css::uno::XComponentContext *context, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new FindAllToolboxController(context))); + rtl::Reference<FindAllToolboxController> x(new FindAllToolboxController(context)); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL @@ -1122,10 +1117,9 @@ com_sun_star_comp_svx_Impl_FindbarDispatcher_get_implementation( SAL_UNUSED_PARAMETER css::uno::XComponentContext *, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new FindbarDispatcher)); + rtl::Reference<FindbarDispatcher> x(new FindbarDispatcher); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 9a21919750b2..7a611be3cf3b 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -1282,13 +1282,12 @@ Graphic SvxGetGraphicForShape( SdrObject& rShape, bool bVector ) extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_Draw_GraphicExporter_get_implementation( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, + css::uno::XComponentContext *, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new GraphicExporter)); + rtl::Reference<GraphicExporter> x(new GraphicExporter); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx index 1644601e76e3..5fdb5f228eaa 100644 --- a/svx/source/unodraw/recoveryui.cxx +++ b/svx/source/unodraw/recoveryui.cxx @@ -29,6 +29,7 @@ #include <cppuhelper/implbase2.hxx> #include <osl/file.hxx> #include <rtl/bootstrap.hxx> +#include <rtl/ref.hxx> #include <comphelper/processfactory.hxx> #include <cppuhelper/supportsservice.hxx> @@ -424,10 +425,9 @@ com_sun_star_comp_svx_RecoveryUI_get_implementation( css::uno::XComponentContext *context, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new RecoveryUI(context))); + rtl::Reference<RecoveryUI> x(new RecoveryUI(context)); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx index 019654c5fd91..b707904edd52 100644 --- a/svx/source/unodraw/unoctabl.cxx +++ b/svx/source/unodraw/unoctabl.cxx @@ -23,6 +23,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <cppuhelper/implbase2.hxx> #include <cppuhelper/supportsservice.hxx> +#include <rtl/ref.hxx> #include <svx/xtable.hxx> using namespace ::com::sun::star; @@ -186,13 +187,12 @@ sal_Bool SAL_CALL SvxUnoColorTable::hasElements() extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_drawing_SvxUnoColorTable_get_implementation( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, + css::uno::XComponentContext *, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new SvxUnoColorTable)); + rtl::Reference<SvxUnoColorTable> x(new SvxUnoColorTable); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx index 916d1f07a001..8b873acf6ed1 100644 --- a/svx/source/unodraw/unoshcol.cxx +++ b/svx/source/unodraw/unoshcol.cxx @@ -27,6 +27,7 @@ #include <cppuhelper/interfacecontainer.hxx> #include <cppuhelper/supportsservice.hxx> #include <osl/mutex.hxx> +#include <rtl/ref.hxx> #include <svx/unoprov.hxx> using namespace ::com::sun::star; @@ -270,13 +271,12 @@ uno::Sequence< OUString > SAL_CALL SvxShapeCollection::getSupportedServiceNames( extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_drawing_SvxShapeCollection_get_implementation( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, + css::uno::XComponentContext *, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new SvxShapeCollection)); + rtl::Reference<SvxShapeCollection> x(new SvxShapeCollection); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unogallery/unogalthemeprovider.cxx b/svx/source/unogallery/unogalthemeprovider.cxx index 7878e906ecd7..2fcaec8ff295 100644 --- a/svx/source/unogallery/unogalthemeprovider.cxx +++ b/svx/source/unogallery/unogalthemeprovider.cxx @@ -22,6 +22,7 @@ #include "unogaltheme.hxx" #include "svx/gallery1.hxx" #include <osl/mutex.hxx> +#include <rtl/ref.hxx> #include <vcl/svapp.hxx> #include <unotools/pathoptions.hxx> #include <comphelper/servicehelper.hxx> @@ -232,13 +233,12 @@ void SAL_CALL GalleryThemeProvider::removeByName( const OUString& rName ) extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_gallery_GalleryThemeProvider_get_implementation( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, + css::uno::XComponentContext *, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new GalleryThemeProvider)); + rtl::Reference<GalleryThemeProvider> x(new GalleryThemeProvider); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index b95d38fdb0f6..f9bad053927c 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -19,7 +19,6 @@ #include <comphelper/string.hxx> #include <sal/macros.h> -#include <rtl/strbuf.hxx> #include <com/sun/star/embed/XTransactedObject.hpp> #include <com/sun/star/embed/ElementModes.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -29,6 +28,7 @@ #include <cppuhelper/compbase4.hxx> #include <cppuhelper/supportsservice.hxx> +#include <rtl/ref.hxx> #include <unotools/ucbstreamhelper.hxx> #include <unotools/streamwrap.hxx> #include <unotools/tempfile.hxx> @@ -1052,14 +1052,13 @@ Sequence< OUString > SAL_CALL SvXMLGraphicImportExportHelper::getSupportedServic */ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_Svx_GraphicImportHelper_get_implementation( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, + css::uno::XComponentContext *, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new SvXMLGraphicImportExportHelper( - GRAPHICHELPER_MODE_READ))); + rtl::Reference<SvXMLGraphicImportExportHelper> x( + new SvXMLGraphicImportExportHelper(GRAPHICHELPER_MODE_READ)); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /** Create this with createInstanceWithArguments. service name @@ -1076,14 +1075,13 @@ com_sun_star_comp_Svx_GraphicImportHelper_get_implementation( */ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_Svx_GraphicExportHelper_get_implementation( - SAL_UNUSED_PARAMETER css::uno::XComponentContext *, + css::uno::XComponentContext *, css::uno::Sequence<css::uno::Any> const &) { - css::uno::Reference<css::uno::XInterface> x( - static_cast<cppu::OWeakObject *>(new SvXMLGraphicImportExportHelper( - GRAPHICHELPER_MODE_WRITE ))); + rtl::Reference<SvXMLGraphicImportExportHelper> x( + new SvXMLGraphicImportExportHelper(GRAPHICHELPER_MODE_WRITE)); x->acquire(); - return x.get(); + return static_cast<cppu::OWeakObject *>(x.get()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |