summaryrefslogtreecommitdiff
path: root/extensions
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
parentf2beebbfe78bfd5dd26318ea269f49aeee6bd642 (diff)
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')
-rw-r--r--extensions/source/bibliography/formcontrolcontainer.cxx7
-rw-r--r--extensions/source/bibliography/formcontrolcontainer.hxx2
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.cxx25
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.hxx1
-rw-r--r--extensions/source/dbpilots/groupboxwiz.cxx18
-rw-r--r--extensions/source/dbpilots/groupboxwiz.hxx5
-rw-r--r--extensions/source/dbpilots/listcombowizard.cxx2
-rw-r--r--extensions/source/dbpilots/listcombowizard.hxx2
-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
18 files changed, 47 insertions, 138 deletions
diff --git a/extensions/source/bibliography/formcontrolcontainer.cxx b/extensions/source/bibliography/formcontrolcontainer.cxx
index 9d71877ede83..f0dfe3b77741 100644
--- a/extensions/source/bibliography/formcontrolcontainer.cxx
+++ b/extensions/source/bibliography/formcontrolcontainer.cxx
@@ -69,7 +69,7 @@ namespace bib
m_pFormAdapter->acquire();
m_pFormAdapter->Init( this );
- ensureDesignMode();
+ implSetDesignMode( !m_xForm.is() || !m_xForm->isLoaded() );
}
m_xForm = _rxForm;
@@ -109,11 +109,6 @@ namespace bib
}
}
- void FormControlContainer::ensureDesignMode()
- {
- implSetDesignMode( !m_xForm.is() || !m_xForm->isLoaded() );
- }
-
void FormControlContainer::_loaded( const css::lang::EventObject& /*_rEvent*/ )
{
implSetDesignMode( false );
diff --git a/extensions/source/bibliography/formcontrolcontainer.hxx b/extensions/source/bibliography/formcontrolcontainer.hxx
index 3f35df98268e..a75a528a7c5e 100644
--- a/extensions/source/bibliography/formcontrolcontainer.hxx
+++ b/extensions/source/bibliography/formcontrolcontainer.hxx
@@ -46,8 +46,6 @@ namespace bib
void connectForm( const css::uno::Reference< css::form::XLoadable >& _rxForm );
void disconnectForm();
- void ensureDesignMode();
-
virtual css::uno::Reference< css::awt::XControlContainer >
getControlContainer() = 0;
diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx
index 0dc6b2791074..99382137faee 100644
--- a/extensions/source/dbpilots/commonpagesdbp.cxx
+++ b/extensions/source/dbpilots/commonpagesdbp.cxx
@@ -62,7 +62,16 @@ namespace dbp
get(m_pDatasourceLabel, "datasourcelabel");
get(m_pSearchDatabase, "search");
- implCollectDatasource();
+ try
+ {
+ m_xDSContext = getContext().xDatasourceContext;
+ if (m_xDSContext.is())
+ fillListBox(*m_pDatasource, m_xDSContext->getElementNames());
+ }
+ catch (const Exception&)
+ {
+ OSL_FAIL("OTableSelectionPage::OTableSelectionPage: could not collect the data source names!");
+ }
m_pDatasource->SetSelectHdl(LINK(this, OTableSelectionPage, OnListboxSelection));
m_pTable->SetSelectHdl(LINK(this, OTableSelectionPage, OnListboxSelection));
@@ -361,20 +370,6 @@ namespace dbp
}
- void OTableSelectionPage::implCollectDatasource()
- {
- try
- {
- m_xDSContext = getContext().xDatasourceContext;
- if (m_xDSContext.is())
- fillListBox(*m_pDatasource, m_xDSContext->getElementNames());
- }
- catch (const Exception&)
- {
- OSL_FAIL("OTableSelectionPage::implCollectDatasource: could not collect the data source names!");
- }
- }
-
OMaybeListSelectionPage::OMaybeListSelectionPage( OControlWizard* _pParent, const OString& _rID, const OUString& _rUIXMLDescription )
:OControlWizardPage(_pParent, _rID, _rUIXMLDescription)
,m_pYes(nullptr)
diff --git a/extensions/source/dbpilots/commonpagesdbp.hxx b/extensions/source/dbpilots/commonpagesdbp.hxx
index 345113939c5b..99d3ad09ac80 100644
--- a/extensions/source/dbpilots/commonpagesdbp.hxx
+++ b/extensions/source/dbpilots/commonpagesdbp.hxx
@@ -58,7 +58,6 @@ namespace dbp
DECL_LINK( OnListboxDoubleClicked, ListBox&, void );
DECL_LINK( OnSearchClicked, Button*, void );
- void implCollectDatasource();
void implFillTables(const css::uno::Reference< css::sdbc::XConnection >&
_rxConn = css::uno::Reference< css::sdbc::XConnection >());
diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx
index ddce66693089..ddb34e420b60 100644
--- a/extensions/source/dbpilots/groupboxwiz.cxx
+++ b/extensions/source/dbpilots/groupboxwiz.cxx
@@ -153,8 +153,12 @@ namespace dbp
}
- void OGroupBoxWizard::createRadios()
+ bool OGroupBoxWizard::onFinish()
{
+ // commit the basic control settings
+ commitControlSettings(&m_aSettings);
+
+ // create the radio buttons
try
{
OOptionGroupLayouter aLayouter( getComponentContext() );
@@ -164,16 +168,6 @@ namespace dbp
{
OSL_FAIL("OGroupBoxWizard::createRadios: caught an exception while creating the radio shapes!");
}
- }
-
-
- bool OGroupBoxWizard::onFinish()
- {
- // commit the basic control settings
- commitControlSettings(&m_aSettings);
-
- // create the radio buttons
- createRadios();
return OControlWizard::onFinish();
}
@@ -480,7 +474,7 @@ namespace dbp
OUString& OOptionDBFieldPage::getDBFieldSetting()
{
- return getSettings().sDBField;
+ return static_cast<OGroupBoxWizard*>(getDialog())->getSettings().sDBField;
}
OFinalizeGBWPage::OFinalizeGBWPage( OControlWizard* _pParent )
diff --git a/extensions/source/dbpilots/groupboxwiz.hxx b/extensions/source/dbpilots/groupboxwiz.hxx
index 92ddc89cabaf..2745de988d17 100644
--- a/extensions/source/dbpilots/groupboxwiz.hxx
+++ b/extensions/source/dbpilots/groupboxwiz.hxx
@@ -60,9 +60,6 @@ namespace dbp
virtual bool onFinish() override;
virtual bool approveControl(sal_Int16 _nClassId) override;
-
- protected:
- void createRadios();
};
class OGBWPage : public OControlWizardPage
@@ -160,8 +157,6 @@ namespace dbp
explicit OOptionDBFieldPage( OControlWizard* _pParent );
protected:
- OOptionGroupSettings& getSettings() { return static_cast<OGroupBoxWizard*>(getDialog())->getSettings(); }
-
// ODBFieldPage overridables
virtual OUString& getDBFieldSetting() override;
};
diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx
index a53288b0674e..6f9386e81efb 100644
--- a/extensions/source/dbpilots/listcombowizard.cxx
+++ b/extensions/source/dbpilots/listcombowizard.cxx
@@ -511,7 +511,7 @@ namespace dbp
OUString& OComboDBFieldPage::getDBFieldSetting()
{
- return getSettings().sLinkedFormField;
+ return static_cast<OListComboWizard*>(getDialog())->getSettings().sLinkedFormField;
}
diff --git a/extensions/source/dbpilots/listcombowizard.hxx b/extensions/source/dbpilots/listcombowizard.hxx
index 5cc6555ff120..135bc1da88aa 100644
--- a/extensions/source/dbpilots/listcombowizard.hxx
+++ b/extensions/source/dbpilots/listcombowizard.hxx
@@ -174,8 +174,6 @@ namespace dbp
explicit OComboDBFieldPage( OControlWizard* _pParent );
protected:
- OListComboSettings& getSettings() { return static_cast<OListComboWizard*>(getDialog())->getSettings(); }
-
// TabPage overridables
virtual void ActivatePage() override;
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();