summaryrefslogtreecommitdiffstats
path: root/extensions/source/propctrlr
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-08 11:10:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-08 11:11:52 +0000
commit1b277a37c5ad219d2e275df1289ccfbce27183ee (patch)
tree19ed989da90eaca6e3847239a47f1095d5cc9841 /extensions/source/propctrlr
parentreduce copying when decomposing drawinglayer primitives (diff)
downloadcore-1b277a37c5ad219d2e275df1289ccfbce27183ee.tar.gz
core-1b277a37c5ad219d2e275df1289ccfbce27183ee.zip
loplugin:expandablemethods in extensions
Change-Id: I93a770933de86146de1d25db9d596615916c3e28 Reviewed-on: https://gerrit.libreoffice.org/30689 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions/source/propctrlr')
-rw-r--r--extensions/source/propctrlr/browserline.cxx18
-rw-r--r--extensions/source/propctrlr/browserline.hxx1
-rw-r--r--extensions/source/propctrlr/browserlistbox.cxx17
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx37
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.hxx10
-rw-r--r--extensions/source/propctrlr/propcontroller.cxx20
-rw-r--r--extensions/source/propctrlr/propcontroller.hxx5
-rw-r--r--extensions/source/propctrlr/sqlcommanddesign.cxx8
-rw-r--r--extensions/source/propctrlr/sqlcommanddesign.hxx5
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx2
10 files changed, 29 insertions, 94 deletions
diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx
index d40f9f31cee4..b9fe58839c72 100644
--- a/extensions/source/propctrlr/browserline.cxx
+++ b/extensions/source/propctrlr/browserline.cxx
@@ -386,8 +386,12 @@ namespace pcr
}
- void OBrowserLine::impl_getImagesFromURL_nothrow( const OUString& _rImageURL, Image& _out_rImage )
+ void OBrowserLine::ShowBrowseButton( const OUString& _rImageURL, bool _bPrimary )
{
+ PushButton& rButton( impl_ensureButton( _bPrimary ) );
+
+ OSL_PRECOND( !_rImageURL.isEmpty(), "OBrowserLine::ShowBrowseButton: use the other version if you don't have an image!" );
+ Image aImage;
try
{
Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
@@ -398,22 +402,12 @@ namespace pcr
aMediaProperties[0].Value <<= _rImageURL;
Reference< XGraphic > xGraphic( xGraphicProvider->queryGraphic( aMediaProperties ), UNO_QUERY_THROW );
- _out_rImage = Image( xGraphic );
+ aImage = Image( xGraphic );
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
- }
-
-
- void OBrowserLine::ShowBrowseButton( const OUString& _rImageURL, bool _bPrimary )
- {
- PushButton& rButton( impl_ensureButton( _bPrimary ) );
-
- OSL_PRECOND( !_rImageURL.isEmpty(), "OBrowserLine::ShowBrowseButton: use the other version if you don't have an image!" );
- Image aImage;
- impl_getImagesFromURL_nothrow( _rImageURL, aImage );
rButton.SetModeImage( aImage );
}
diff --git a/extensions/source/propctrlr/browserline.hxx b/extensions/source/propctrlr/browserline.hxx
index 5442c193a883..815ac667a006 100644
--- a/extensions/source/propctrlr/browserline.hxx
+++ b/extensions/source/propctrlr/browserline.hxx
@@ -122,7 +122,6 @@ namespace pcr
void impl_layoutComponents();
PushButton& impl_ensureButton( bool _bPrimary );
- static void impl_getImagesFromURL_nothrow( const OUString& _rImageURL, Image& _out_rImage );
};
diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx
index b0e723171b52..9d6b899ce0e2 100644
--- a/extensions/source/propctrlr/browserlistbox.cxx
+++ b/extensions/source/propctrlr/browserlistbox.cxx
@@ -180,13 +180,6 @@ namespace pcr
*/
void impl_processEvent_throw( const ::comphelper::AnyEvent& _rEvent );
- /** checks whether we're alive
-
- @throws DisposedException
- if the instance is already disposed
- */
- void impl_checkAlive_throw() const;
-
/** checks whether the instance is already disposed
*/
bool impl_isDisposed_nothrow() const { return m_pContext.get() == nullptr; }
@@ -214,13 +207,6 @@ namespace pcr
}
- void PropertyControlContext_Impl::impl_checkAlive_throw() const
- {
- if ( impl_isDisposed_nothrow() )
- throw DisposedException( OUString(), *const_cast< PropertyControlContext_Impl* >( this ) );
- }
-
-
void SAL_CALL PropertyControlContext_Impl::dispose()
{
SolarMutexGuard aGuard;
@@ -245,7 +231,8 @@ namespace pcr
{
SolarMutexGuard aGuard;
- impl_checkAlive_throw();
+ if ( impl_isDisposed_nothrow() )
+ throw DisposedException( OUString(), *this );
pEvent = new ControlEvent( _rxControl, _eType );
if ( m_eMode == eSynchronously )
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index c20126ef3b6a..ae1f136a93cd 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -825,21 +825,6 @@ namespace pcr
}
- void FormComponentPropertyHandler::onNewComponent()
- {
- FormComponentPropertyHandler_Base::onNewComponent();
- if ( !m_xComponentPropertyInfo.is() && m_xComponent.is() )
- throw NullPointerException();
-
- m_xPropertyState.set( m_xComponent, UNO_QUERY );
- m_eComponentClass = eUnknown;
- m_bComponentIsSubForm = m_bHaveListSource = m_bHaveCommand = false;
- m_nClassId = 0;
-
- impl_initComponentMetaData_throw();
- }
-
-
Sequence< Property > SAL_CALL FormComponentPropertyHandler::doDescribeSupportedProperties() const
{
if ( !m_xComponentPropertyInfo.is() )
@@ -1535,7 +1520,7 @@ namespace pcr
// ----- DataSourceName -----
case PROPERTY_ID_DATASOURCE:
// reset the connection, now that we have a new data source
- impl_clearRowsetConnection_nothrow();
+ m_xRowSetConnection.clear();
// available list source values (tables or queries) might have changed
if ( !_bFirstTimeInit && m_bHaveListSource )
@@ -2016,11 +2001,19 @@ namespace pcr
}
- void FormComponentPropertyHandler::impl_initComponentMetaData_throw()
+ void FormComponentPropertyHandler::onNewComponent()
{
+ FormComponentPropertyHandler_Base::onNewComponent();
+ if ( !m_xComponentPropertyInfo.is() && m_xComponent.is() )
+ throw NullPointerException();
+
+ m_xPropertyState.set( m_xComponent, UNO_QUERY );
+ m_eComponentClass = eUnknown;
+ m_bComponentIsSubForm = m_bHaveListSource = m_bHaveCommand = false;
+ m_nClassId = 0;
+
try
{
-
// component class
m_eComponentClass = eUnknown;
@@ -2064,7 +2057,7 @@ namespace pcr
}
catch( const Exception& )
{
- OSL_FAIL( "FormComponentPropertyHandler::impl_initComponentMetaData_throw: caught an exception!" );
+ OSL_FAIL( "FormComponentPropertyHandler::onNewComponent: caught an exception!" );
DBG_UNHANDLED_EXCEPTION();
}
}
@@ -2364,12 +2357,6 @@ namespace pcr
}
- void FormComponentPropertyHandler::impl_clearRowsetConnection_nothrow()
- {
- m_xRowSetConnection.clear();
- }
-
-
void FormComponentPropertyHandler::impl_displaySQLError_nothrow( const ::dbtools::SQLExceptionInfo& _rErrorDescriptor ) const
{
::dbtools::showError( _rErrorDescriptor, VCLUnoHelper::GetInterface( impl_getDefaultDialogParent_nothrow() ), m_xContext );
diff --git a/extensions/source/propctrlr/formcomponenthandler.hxx b/extensions/source/propctrlr/formcomponenthandler.hxx
index 0041b124068e..0b2791dfbef9 100644
--- a/extensions/source/propctrlr/formcomponenthandler.hxx
+++ b/extensions/source/propctrlr/formcomponenthandler.hxx
@@ -137,12 +137,6 @@ namespace pcr
virtual void onNewComponent() override;
private:
- /** initializes some (cached) meta data about the component
- @throws RuntimeException
- if a serious error occurs, for instance if the component does not provide an XPropertySetInfo instance
- */
- void impl_initComponentMetaData_throw();
-
/** classifies our component, in case it's a control model, by ClassId
Note that UNO dialog controls are also classified, though they don't have the ClassId property
@@ -191,10 +185,6 @@ namespace pcr
*/
bool impl_ensureRowsetConnection_nothrow() const;
- /** clears ->m_xRowSetConnection
- */
- void impl_clearRowsetConnection_nothrow();
-
/** fills an ->LineDescriptor with information to represent a cursor source
of our form - that is, a table, a query, or an SQL statement.
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index 43a1e6c089a7..7ab004a9f10c 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -187,18 +187,6 @@ namespace pcr
}
- void OPropertyBrowserController::impl_updateReadOnlyView_nothrow()
- {
- // this is a huge cudgel, admitted.
- // The problem is that in case we were previously read-only, all our controls
- // were created read-only, too. We cannot simply switch them to not-read-only.
- // Even if they had an API for this, we do not know whether they were
- // originally created read-only, or if they are read-only just because
- // the model was.
- impl_rebindToInspectee_nothrow( m_aInspectedObjects );
- }
-
-
bool OPropertyBrowserController::impl_isReadOnlyModel_throw() const
{
if ( !m_xModel.is() )
@@ -721,7 +709,13 @@ namespace pcr
if ( _rEvent.Source == m_xModel )
{
if ( _rEvent.PropertyName == "IsReadOnly" )
- impl_updateReadOnlyView_nothrow();
+ // this is a huge cudgel, admitted.
+ // The problem is that in case we were previously read-only, all our controls
+ // were created read-only, too. We cannot simply switch them to not-read-only.
+ // Even if they had an API for this, we do not know whether they were
+ // originally created read-only, or if they are read-only just because
+ // the model was.
+ impl_rebindToInspectee_nothrow( m_aInspectedObjects );
return;
}
diff --git a/extensions/source/propctrlr/propcontroller.hxx b/extensions/source/propctrlr/propcontroller.hxx
index 52b8b4ae0fdb..bf99b6d3f34a 100644
--- a/extensions/source/propctrlr/propcontroller.hxx
+++ b/extensions/source/propctrlr/propcontroller.hxx
@@ -374,11 +374,6 @@ namespace pcr
*/
bool impl_isReadOnlyModel_throw() const;
- /** updates our view so that it is read-only, as indicated by the model property
- @see impl_isReadOnlyModel_throw
- */
- void impl_updateReadOnlyView_nothrow();
-
/** starts or stops listening at the model
*/
void impl_startOrStopModelListening_nothrow( bool _bDoListen ) const;
diff --git a/extensions/source/propctrlr/sqlcommanddesign.cxx b/extensions/source/propctrlr/sqlcommanddesign.cxx
index 1d565c6f870c..643698543e55 100644
--- a/extensions/source/propctrlr/sqlcommanddesign.cxx
+++ b/extensions/source/propctrlr/sqlcommanddesign.cxx
@@ -145,7 +145,7 @@ namespace pcr
{
if ( m_xDesigner.is() && ( Source.Source == m_xDesigner ) )
{
- impl_designerClosed_nothrow();
+ m_aCloseLink.Call( *this );
m_xDesigner.clear();
}
}
@@ -298,12 +298,6 @@ namespace pcr
}
- void SQLCommandDesigner::impl_designerClosed_nothrow()
- {
- m_aCloseLink.Call( *this );
- }
-
-
void SQLCommandDesigner::impl_closeDesigner_nothrow()
{
OSL_PRECOND( isActive(), "SQLCommandDesigner::impl_closeDesigner_nothrow: invalid calle!" );
diff --git a/extensions/source/propctrlr/sqlcommanddesign.hxx b/extensions/source/propctrlr/sqlcommanddesign.hxx
index d712312c52bd..106b94617264 100644
--- a/extensions/source/propctrlr/sqlcommanddesign.hxx
+++ b/extensions/source/propctrlr/sqlcommanddesign.hxx
@@ -149,11 +149,6 @@ namespace pcr
css::uno::Reference< css::frame::XFrame >
impl_createEmptyParentlessTask_nothrow() const;
- /** called whenever the component denoted by m_xDesigner has been closed
- <em>by an external instance</em>
- */
- void impl_designerClosed_nothrow();
-
/** closes the component denoted by m_xDesigner
@precond
our designer component is actually active (->isActive)
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 7d422966aff4..af15abfb508e 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -669,7 +669,7 @@ namespace pcr
css::util::Color nColor = COL_TRANSPARENT;
_rValue >>= nColor;
::Color aRgbCol((ColorData)nColor);
- getTypedControlWindow()->SelectEntry(std::make_pair(aRgbCol, MakeHexStr(nColor, 8)));
+ getTypedControlWindow()->SelectEntry(std::make_pair(aRgbCol, MakeHexStr(nColor, 8)));
}
else
getTypedControlWindow()->SetNoSelection();