summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-03-07 15:56:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-03-07 19:15:55 +0000
commitc596fd59dc75823002bdfd3676d600a56e3bfb5e (patch)
tree03a4f761c0e729de27a245bcf3a7701fd5b35781 /extensions
parente096fbc3e06d2c2b55ef8706c954efb6555ca0e6 (diff)
no need to allocate these separately
they are all one or two words in size Change-Id: I86611e14a32dda3ae2226bbfa775ad0234513888 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148425 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/propctrlr/propertycontrolextender.cxx26
-rw-r--r--extensions/source/propctrlr/propertycontrolextender.hxx3
2 files changed, 10 insertions, 19 deletions
diff --git a/extensions/source/propctrlr/propertycontrolextender.cxx b/extensions/source/propctrlr/propertycontrolextender.cxx
index 060a184872a2..d30331365831 100644
--- a/extensions/source/propctrlr/propertycontrolextender.cxx
+++ b/extensions/source/propctrlr/propertycontrolextender.cxx
@@ -42,26 +42,16 @@ namespace pcr
namespace KeyFunction = ::com::sun::star::awt::KeyFunction;
- //= PropertyControlExtender_Data
-
- struct PropertyControlExtender_Data
- {
- Reference< XPropertyControl > xControl;
- Reference< XWindow > xControlWindow;
- };
-
-
//= PropertyControlExtender
PropertyControlExtender::PropertyControlExtender( const Reference< XPropertyControl >& _rxObservedControl )
- :m_pData( new PropertyControlExtender_Data )
{
try
{
- m_pData->xControl.set( _rxObservedControl, UNO_SET_THROW );
- m_pData->xControlWindow.set( m_pData->xControl->getControlWindow(), UNO_SET_THROW );
- m_pData->xControlWindow->addKeyListener( this );
+ mxControl.set( _rxObservedControl, UNO_SET_THROW );
+ mxControlWindow.set( mxControl->getControlWindow(), UNO_SET_THROW );
+ mxControlWindow->addKeyListener( this );
}
catch( const Exception& )
{
@@ -77,7 +67,7 @@ namespace pcr
void SAL_CALL PropertyControlExtender::keyPressed( const KeyEvent& _event )
{
- OSL_ENSURE( _event.Source == m_pData->xControlWindow, "PropertyControlExtender::keyPressed: where does this come from?" );
+ OSL_ENSURE( _event.Source == mxControlWindow, "PropertyControlExtender::keyPressed: where does this come from?" );
if ( ( _event.KeyFunc != KeyFunction::DELETE )
|| ( _event.Modifiers != 0 )
)
@@ -85,7 +75,7 @@ namespace pcr
try
{
- Reference< XPropertyControl > xControl( m_pData->xControl, UNO_SET_THROW );
+ Reference< XPropertyControl > xControl( mxControl, UNO_SET_THROW );
// reset the value
xControl->setValue( Any() );
@@ -112,10 +102,10 @@ namespace pcr
void SAL_CALL PropertyControlExtender::disposing( const EventObject& Source )
{
- OSL_ENSURE( Source.Source == m_pData->xControlWindow, "PropertyControlExtender::disposing: where does this come from?" );
+ OSL_ENSURE( Source.Source == mxControlWindow, "PropertyControlExtender::disposing: where does this come from?" );
(void)Source.Source;
- m_pData->xControlWindow.clear();
- m_pData->xControl.clear();
+ mxControlWindow.clear();
+ mxControl.clear();
}
diff --git a/extensions/source/propctrlr/propertycontrolextender.hxx b/extensions/source/propctrlr/propertycontrolextender.hxx
index ed7c4a06c448..e376223ebf35 100644
--- a/extensions/source/propctrlr/propertycontrolextender.hxx
+++ b/extensions/source/propctrlr/propertycontrolextender.hxx
@@ -53,7 +53,8 @@ namespace pcr
virtual ~PropertyControlExtender() override;
private:
- std::unique_ptr< PropertyControlExtender_Data > m_pData;
+ css::uno::Reference< css::inspection::XPropertyControl > mxControl;
+ css::uno::Reference< css::awt::XWindow > mxControlWindow;
};