From 7c831c94ceaf7f48383315216573b1f5691c10bc Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 12 May 2020 17:16:22 +0100 Subject: the returned awt::XControlModel is just used as a flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I4167be9e6b14b6a3454652fed86e785c1ea0d4b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94074 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- extensions/source/bibliography/general.cxx | 8 ++++---- extensions/source/bibliography/general.hxx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx index d1141afe76a6..c1963ae322ea 100644 --- a/extensions/source/bibliography/general.cxx +++ b/extensions/source/bibliography/general.cxx @@ -423,8 +423,8 @@ void BibGeneralPage::AddControlWithError( const OUString& rColumnName, FixedText // adds also the XControl and creates a map entry in nFT2CtrlMap[] for mapping between control and FT sal_Int16 nIndex = -1; - uno::Reference< awt::XControlModel > xTmp = AddXControl(rColumnName, rLabel, sHelpId, nIndex, rChildren); - if( xTmp.is() ) + bool bSuccess = AddXControl(rColumnName, rLabel, sHelpId, nIndex, rChildren); + if (bSuccess) { DBG_ASSERT( nIndexInFTArray < FIELD_COUNT, "*BibGeneralPage::AddControlWithError(): wrong array index!" ); DBG_ASSERT( nFT2CtrlMap[ nIndexInFTArray ] < 0, "+BibGeneralPage::AddControlWithError(): index already in use!" ); @@ -440,7 +440,7 @@ void BibGeneralPage::AddControlWithError( const OUString& rColumnName, FixedText } } -uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl( +bool BibGeneralPage::AddXControl( const OUString& rName, FixedText& rLabel, const OString& sHelpId, sal_Int16& rIndex, std::vector& rChildren) @@ -520,7 +520,7 @@ uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl( { OSL_FAIL("BibGeneralPage::AddXControl: something went wrong!"); } - return xCtrModel; + return xCtrModel.is(); } void BibGeneralPage::InitFixedTexts() diff --git a/extensions/source/bibliography/general.hxx b/extensions/source/bibliography/general.hxx index f48573fa5eb4..8c95e6dad42f 100644 --- a/extensions/source/bibliography/general.hxx +++ b/extensions/source/bibliography/general.hxx @@ -121,7 +121,7 @@ class BibGeneralPage : public TabPage, public BibShortCutHandler BibDataManager* pDatMan; - css::uno::Reference< css::awt::XControlModel > + bool AddXControl( const OUString& rName, FixedText& rLabel, const OString& sHelpId, sal_Int16& rIndex, std::vector& rChildren ); -- cgit