summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-06-18 10:21:13 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-06-18 11:26:34 +0200
commit94546ae88d26facac1809a47a89a1bff866694e6 (patch)
tree679dd88f0a19b5e18465f6a1b2bc2a6818fda541 /reportdesign
parent32694db4bf90d58ed35987f3c56793a1530fb3d2 (diff)
rtl::Reference fits just fine here
Change-Id: I354b546654e665607d9be0d65f6327fabb5694de
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/inc/RptObject.hxx4
-rw-r--r--reportdesign/source/core/inc/ReportEngineJFree.hxx4
-rw-r--r--reportdesign/source/core/inc/Section.hxx4
-rw-r--r--reportdesign/source/core/sdr/RptObject.cxx4
-rw-r--r--reportdesign/source/ui/inc/ReportController.hxx1
-rw-r--r--reportdesign/source/ui/inc/toolboxcontroller.hxx4
-rw-r--r--reportdesign/source/ui/misc/toolboxcontroller.cxx39
7 files changed, 26 insertions, 34 deletions
diff --git a/reportdesign/inc/RptObject.hxx b/reportdesign/inc/RptObject.hxx
index 443f53328870..d9c8ea449c98 100644
--- a/reportdesign/inc/RptObject.hxx
+++ b/reportdesign/inc/RptObject.hxx
@@ -32,8 +32,6 @@
#include <svx/svdocirc.hxx>
#include <svx/svdogrp.hxx>
#include <svx/svdoashp.hxx>
-#include <comphelper/implementationreference.hxx>
-
namespace rptui
{
@@ -72,7 +70,7 @@ class OPropertyMediator;
class REPORTDESIGN_DLLPUBLIC OObjectBase
{
public:
- typedef ::comphelper::ImplementationReference<OPropertyMediator,::com::sun::star::beans::XPropertyChangeListener> TMediator;
+ typedef rtl::Reference<OPropertyMediator> TMediator;
protected:
mutable TMediator m_xMediator;
diff --git a/reportdesign/source/core/inc/ReportEngineJFree.hxx b/reportdesign/source/core/inc/ReportEngineJFree.hxx
index 3beeb25e19dd..62a03ddab358 100644
--- a/reportdesign/source/core/inc/ReportEngineJFree.hxx
+++ b/reportdesign/source/core/inc/ReportEngineJFree.hxx
@@ -32,8 +32,8 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/sdbc/XRowSet.hpp>
#include <comphelper/stl_types.hxx>
-#include <comphelper/implementationreference.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <rtl/ref.hxx>
namespace reportdesign
{
@@ -78,7 +78,7 @@ namespace reportdesign
virtual ~OReportEngineJFree();
public:
- typedef ::comphelper::ImplementationReference< OReportEngineJFree ,::com::sun::star::report::XReportEngine,::com::sun::star::uno::XWeak > TReportEngine;
+ typedef rtl::Reference<OReportEngineJFree> TReportEngine;
OReportEngineJFree(const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& context);
diff --git a/reportdesign/source/core/inc/Section.hxx b/reportdesign/source/core/inc/Section.hxx
index b0de3eccfdf0..0e115171a067 100644
--- a/reportdesign/source/core/inc/Section.hxx
+++ b/reportdesign/source/core/inc/Section.hxx
@@ -30,9 +30,9 @@
#include <com/sun/star/drawing/XShapeGrouper.hpp>
#include <com/sun/star/drawing/XShapes.hpp>
#include <com/sun/star/form/XFormsSupplier2.hpp>
-#include <comphelper/implementationreference.hxx>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <rtl/ref.hxx>
namespace reportdesign
{
@@ -127,7 +127,7 @@ namespace reportdesign
virtual void SAL_CALL disposing() SAL_OVERRIDE;
public:
- typedef ::comphelper::ImplementationReference< OSection ,::com::sun::star::report::XSection,::com::sun::star::uno::XWeak > TSection;
+ typedef rtl::Reference<OSection> TSection;
private:
OSection(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition >& xParentDef
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index 6c2287c4e0dd..45ade69b10e7 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -324,7 +324,7 @@ OObjectBase::OObjectBase(const OUString& _sComponentName)
OObjectBase::~OObjectBase()
{
- m_xMediator.reset();
+ m_xMediator.clear();
if ( isListening() )
EndListening();
m_xReportComponent.clear();
@@ -898,7 +898,7 @@ void OUnoObject::CreateMediator(bool _bReverse)
Reference<XPropertySet> xControlModel(GetUnoControlModel(),uno::UNO_QUERY);
if ( !m_xMediator.is() && m_xReportComponent.is() && xControlModel.is() )
- m_xMediator = TMediator::createFromQuery(new OPropertyMediator(m_xReportComponent.get(),xControlModel,getPropertyNameMap(GetObjIdentifier()),_bReverse));
+ m_xMediator = new OPropertyMediator(m_xReportComponent.get(),xControlModel,getPropertyNameMap(GetObjIdentifier()),_bReverse);
OObjectBase::StartListening();
}
}
diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx
index fd69b2497713..8e9b426ad248 100644
--- a/reportdesign/source/ui/inc/ReportController.hxx
+++ b/reportdesign/source/ui/inc/ReportController.hxx
@@ -44,7 +44,6 @@
#include <com/sun/star/util/XNumberFormatter.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
-#include <comphelper/implementationreference.hxx>
#include <comphelper/proparrhlp.hxx>
#include <comphelper/propertystatecontainer.hxx>
#include <comphelper/uno3.hxx>
diff --git a/reportdesign/source/ui/inc/toolboxcontroller.hxx b/reportdesign/source/ui/inc/toolboxcontroller.hxx
index b005b42d193e..8127988d1eb4 100644
--- a/reportdesign/source/ui/inc/toolboxcontroller.hxx
+++ b/reportdesign/source/ui/inc/toolboxcontroller.hxx
@@ -23,19 +23,19 @@
#include <map>
+#include <rtl/ref.hxx>
#include <svtools/toolboxcontroller.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/frame/XSubToolbarController.hpp>
#include <cppuhelper/implbase2.hxx>
-#include <comphelper/implementationreference.hxx>
class SfxToolBoxControl;
namespace rptui
{
typedef ::cppu::ImplHelper2 < ::com::sun::star::lang::XServiceInfo,
::com::sun::star::frame::XSubToolbarController> TToolboxController_BASE;
- typedef ::comphelper::ImplementationReference<SfxToolBoxControl,::com::sun::star::frame::XToolbarController> TToolbarHelper;
+ typedef rtl::Reference<SfxToolBoxControl> TToolbarHelper;
class OToolboxController : public ::svt::ToolboxController
,public TToolboxController_BASE
diff --git a/reportdesign/source/ui/misc/toolboxcontroller.cxx b/reportdesign/source/ui/misc/toolboxcontroller.cxx
index 66335da45a22..18588de9ed36 100644
--- a/reportdesign/source/ui/misc/toolboxcontroller.cxx
+++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx
@@ -143,48 +143,48 @@ void SAL_CALL OToolboxController::initialize( const Sequence< Any >& _rArguments
if ( m_aCommandURL == ".uno:BasicShapes" )
{
m_aStates.insert(TCommandState::value_type(OUString(".uno:BasicShapes"),sal_True));
- m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_BASIC,m_nToolBoxId,*pToolBox));
+ m_pToolbarController = new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_BASIC,m_nToolBoxId,*pToolBox);
}
else if ( m_aCommandURL == ".uno:SymbolShapes" )
{
m_aStates.insert(TCommandState::value_type(OUString(".uno:SymbolShapes"),sal_True));
- m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_SYMBOL,m_nToolBoxId,*pToolBox));
+ m_pToolbarController = new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_SYMBOL,m_nToolBoxId,*pToolBox);
}
else if ( m_aCommandURL == ".uno:ArrowShapes" )
{
m_aStates.insert(TCommandState::value_type(OUString(".uno:ArrowShapes"),sal_True));
- m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_ARROW,m_nToolBoxId,*pToolBox));
+ m_pToolbarController = new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_ARROW,m_nToolBoxId,*pToolBox);
}
else if ( m_aCommandURL == ".uno:FlowChartShapes" )
{
m_aStates.insert(TCommandState::value_type(OUString(".uno:FlowChartShapes"),sal_True));
- m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_FLOWCHART,m_nToolBoxId,*pToolBox));
+ m_pToolbarController = new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_FLOWCHART,m_nToolBoxId,*pToolBox);
}
else if ( m_aCommandURL == ".uno:CalloutShapes" )
{
m_aStates.insert(TCommandState::value_type(OUString(".uno:CalloutShapes"),sal_True));
- m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_CALLOUT,m_nToolBoxId,*pToolBox));
+ m_pToolbarController = new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_CALLOUT,m_nToolBoxId,*pToolBox);
}
else if ( m_aCommandURL == ".uno:StarShapes" )
{
m_aStates.insert(TCommandState::value_type(OUString(".uno:StarShapes"),sal_True));
- m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_STAR,m_nToolBoxId,*pToolBox));
+ m_pToolbarController = new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_STAR,m_nToolBoxId,*pToolBox);
}
else if ( m_aCommandURL == ".uno:CharFontName" )
{
m_aStates.insert(TCommandState::value_type(OUString(".uno:CharFontName"),sal_True));
- m_pToolbarController = TToolbarHelper::createFromQuery(new SvxFontNameToolBoxControl/*SvxStyleToolBoxControl*/(m_nSlotId = SID_ATTR_CHAR_FONT,m_nToolBoxId,*pToolBox));
+ m_pToolbarController = new SvxFontNameToolBoxControl/*SvxStyleToolBoxControl*/(m_nSlotId = SID_ATTR_CHAR_FONT,m_nToolBoxId,*pToolBox);
}
else if ( m_aCommandURL == ".uno:FontColor" || m_aCommandURL == ".uno:Color" )
{
m_aStates.insert(TCommandState::value_type(OUString(".uno:FontColor"),sal_True));
m_aStates.insert(TCommandState::value_type(OUString(".uno:Color"),sal_True));
- m_pToolbarController = TToolbarHelper::createFromQuery(new SvxColorToolBoxControl(m_nSlotId = SID_ATTR_CHAR_COLOR2,m_nToolBoxId,*pToolBox));
+ m_pToolbarController = new SvxColorToolBoxControl(m_nSlotId = SID_ATTR_CHAR_COLOR2,m_nToolBoxId,*pToolBox);
}
else
{
m_aStates.insert(TCommandState::value_type(OUString(".uno:BackgroundColor"),sal_True));
- m_pToolbarController = TToolbarHelper::createFromQuery(new SvxColorToolBoxControl(m_nSlotId = SID_BACKGROUND_COLOR,m_nToolBoxId,*pToolBox));
+ m_pToolbarController = new SvxColorToolBoxControl(m_nSlotId = SID_BACKGROUND_COLOR,m_nToolBoxId,*pToolBox);
}
TCommandState::iterator aIter = m_aStates.begin();
@@ -271,7 +271,7 @@ Reference< awt::XWindow > SAL_CALL OToolboxController::createPopupWindow() throw
Reference< awt::XWindow > xRet;
if ( m_pToolbarController.is() )
- xRet = m_pToolbarController.getRef()->createPopupWindow();
+ xRet = m_pToolbarController->createPopupWindow();
return xRet;
}
@@ -279,7 +279,7 @@ Reference< awt::XWindow > SAL_CALL OToolboxController::createPopupWindow() throw
void SAL_CALL OToolboxController::execute( sal_Int16 KeyModifier ) throw (uno::RuntimeException, std::exception)
{
if ( m_pToolbarController.is() )
- m_pToolbarController.getRef()->execute( KeyModifier );
+ m_pToolbarController->execute( KeyModifier );
}
sal_Bool SAL_CALL OToolboxController::opensSubToolbar() throw (uno::RuntimeException, std::exception)
@@ -296,9 +296,8 @@ OUString SAL_CALL OToolboxController::getSubToolbarName() throw (uno::RuntimeExc
{
SolarMutexGuard aSolarMutexGuard;
::osl::MutexGuard aGuard(m_aMutex);
- uno::Reference< frame::XSubToolbarController> xSub(m_pToolbarController.getRef(),uno::UNO_QUERY);
- if ( xSub.is() )
- return xSub->getSubToolbarName();
+ if ( m_pToolbarController.is() )
+ return m_pToolbarController->getSubToolbarName();
return OUString();
}
@@ -306,11 +305,9 @@ void SAL_CALL OToolboxController::functionSelected( const OUString& rCommand ) t
{
SolarMutexGuard aSolarMutexGuard;
::osl::MutexGuard aGuard(m_aMutex);
-
- uno::Reference< frame::XSubToolbarController> xSub(m_pToolbarController.getRef(),uno::UNO_QUERY);
- if ( xSub.is() )
+ if ( m_pToolbarController.is() )
{
- xSub->functionSelected(m_aCommandURL = rCommand);
+ m_pToolbarController->functionSelected(m_aCommandURL = rCommand);
}
}
@@ -318,10 +315,8 @@ void SAL_CALL OToolboxController::updateImage( ) throw (uno::RuntimeException,
{
SolarMutexGuard aSolarMutexGuard;
::osl::MutexGuard aGuard(m_aMutex);
-
- uno::Reference< frame::XSubToolbarController> xSub(m_pToolbarController.getRef(),uno::UNO_QUERY);
- if ( xSub.is() )
- xSub->updateImage();
+ if ( m_pToolbarController.is() )
+ m_pToolbarController->updateImage();
}
uno::Reference< awt::XWindow > SAL_CALL OToolboxController::createItemWindow( const uno::Reference< awt::XWindow >& _xParent)