remove some manual refcounting in reportdesign
Change-Id: I660b94acaf07f7ff79b787a6e7bbbcbdbeae0ac0 Reviewed-on: https://gerrit.libreoffice.org/26009 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
committed by
Noel Grandin
parent
e626ebf508
commit
5dd00fedb4
@@ -90,11 +90,11 @@ namespace rptui
|
|||||||
css::uno::Sequence< css::beans::PropertyValue>
|
css::uno::Sequence< css::beans::PropertyValue>
|
||||||
m_aCollapsedSections;
|
m_aCollapsedSections;
|
||||||
TransferableDataHelper m_aSystemClipboard; // content of the clipboard
|
TransferableDataHelper m_aSystemClipboard; // content of the clipboard
|
||||||
TransferableClipboardListener*
|
rtl::Reference<TransferableClipboardListener>
|
||||||
m_pClipbordNotifier; /// notifier for changes in the clipboard
|
m_pClipboardNotifier; /// notifier for changes in the clipboard
|
||||||
VclPtr<OGroupsSortingDialog> m_pGroupsFloater;
|
VclPtr<OGroupsSortingDialog> m_pGroupsFloater;
|
||||||
|
|
||||||
OXReportControllerObserver* m_pReportControllerObserver;
|
rtl::Reference<OXReportControllerObserver> m_pReportControllerObserver;
|
||||||
|
|
||||||
ODesignView* getDesignView() const { return static_cast< ODesignView* >( getView() ); }
|
ODesignView* getDesignView() const { return static_cast< ODesignView* >( getView() ); }
|
||||||
|
|
||||||
|
@@ -276,7 +276,6 @@ OReportController::OReportController(Reference< XComponentContext > const & xCon
|
|||||||
:OReportController_BASE(xContext)
|
:OReportController_BASE(xContext)
|
||||||
,OPropertyStateContainer(OGenericUnoController_Base::rBHelper)
|
,OPropertyStateContainer(OGenericUnoController_Base::rBHelper)
|
||||||
,m_aSelectionListeners( getMutex() )
|
,m_aSelectionListeners( getMutex() )
|
||||||
,m_pClipbordNotifier(nullptr)
|
|
||||||
,m_pGroupsFloater(nullptr)
|
,m_pGroupsFloater(nullptr)
|
||||||
,m_sMode("normal")
|
,m_sMode("normal")
|
||||||
,m_nSplitPos(-1)
|
,m_nSplitPos(-1)
|
||||||
@@ -297,7 +296,6 @@ OReportController::OReportController(Reference< XComponentContext > const & xCon
|
|||||||
{
|
{
|
||||||
// new Observer
|
// new Observer
|
||||||
m_pReportControllerObserver = new OXReportControllerObserver(*this);
|
m_pReportControllerObserver = new OXReportControllerObserver(*this);
|
||||||
m_pReportControllerObserver->acquire();
|
|
||||||
registerProperty("ZoomValue", PROPERTY_ID_ZOOMVALUE,
|
registerProperty("ZoomValue", PROPERTY_ID_ZOOMVALUE,
|
||||||
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::TRANSIENT,
|
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::TRANSIENT,
|
||||||
&m_nZoomValue, ::cppu::UnoType<sal_Int16>::get());
|
&m_nZoomValue, ::cppu::UnoType<sal_Int16>::get());
|
||||||
@@ -314,12 +312,11 @@ IMPLEMENT_FORWARD_XINTERFACE2(OReportController,OReportController_BASE,OReportCo
|
|||||||
void OReportController::disposing()
|
void OReportController::disposing()
|
||||||
{
|
{
|
||||||
|
|
||||||
if ( m_pClipbordNotifier )
|
if ( m_pClipboardNotifier.is() )
|
||||||
{
|
{
|
||||||
m_pClipbordNotifier->ClearCallbackLink();
|
m_pClipboardNotifier->ClearCallbackLink();
|
||||||
m_pClipbordNotifier->AddRemoveListener( getView(), false );
|
m_pClipboardNotifier->AddRemoveListener( getView(), false );
|
||||||
m_pClipbordNotifier->release();
|
m_pClipboardNotifier.clear();
|
||||||
m_pClipbordNotifier = nullptr;
|
|
||||||
}
|
}
|
||||||
if ( m_pGroupsFloater )
|
if ( m_pGroupsFloater )
|
||||||
{
|
{
|
||||||
@@ -356,7 +353,7 @@ void OReportController::disposing()
|
|||||||
if ( m_aReportModel )
|
if ( m_aReportModel )
|
||||||
listen(false);
|
listen(false);
|
||||||
m_pReportControllerObserver->Clear();
|
m_pReportControllerObserver->Clear();
|
||||||
m_pReportControllerObserver->release();
|
m_pReportControllerObserver.clear();
|
||||||
}
|
}
|
||||||
catch(const uno::Exception&)
|
catch(const uno::Exception&)
|
||||||
{
|
{
|
||||||
@@ -1768,9 +1765,8 @@ bool OReportController::Construct(vcl::Window* pParent)
|
|||||||
// now that we have a view we can create the clipboard listener
|
// now that we have a view we can create the clipboard listener
|
||||||
m_aSystemClipboard = TransferableDataHelper::CreateFromSystemClipboard( getView() );
|
m_aSystemClipboard = TransferableDataHelper::CreateFromSystemClipboard( getView() );
|
||||||
m_aSystemClipboard.StartClipboardListening( );
|
m_aSystemClipboard.StartClipboardListening( );
|
||||||
m_pClipbordNotifier = new TransferableClipboardListener( LINK( this, OReportController, OnClipboardChanged ) );
|
m_pClipboardNotifier = new TransferableClipboardListener( LINK( this, OReportController, OnClipboardChanged ) );
|
||||||
m_pClipbordNotifier->acquire();
|
m_pClipboardNotifier->AddRemoveListener( getView(), true );
|
||||||
m_pClipbordNotifier->AddRemoveListener( getView(), true );
|
|
||||||
|
|
||||||
OReportController_BASE::Construct(pParent);
|
OReportController_BASE::Construct(pParent);
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user