editeng/source/accessibility/AccessibleStaticTextBase.cxx | 14 - editeng/source/editeng/eertfpar.cxx | 1 editeng/source/misc/unolingu.cxx | 1 editeng/source/outliner/outliner.cxx | 4 extensions/inc/strings.hrc | 3 extensions/source/bibliography/bibview.cxx | 3 extensions/source/bibliography/bibview.hxx | 1 extensions/source/bibliography/datman.cxx | 104 -------------- extensions/source/bibliography/datman.hxx | 10 - extensions/source/update/check/updatehdl.cxx | 3 extensions/source/update/check/updatehdl.hxx | 3 include/editeng/editdata.hxx | 2 include/editeng/outliner.hxx | 1 include/editeng/unolingu.hxx | 2 14 files changed, 2 insertions(+), 150 deletions(-)
New commits: commit 3010e0a6b7f4f41f8bda43d0e9931ef731090f48 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Feb 22 16:39:29 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Feb 23 11:55:13 2019 +0100 loplugin:unusedfields in editeng Change-Id: Ic237f67cb48d8894227805904fbba3b7865b2358 Reviewed-on: https://gerrit.libreoffice.org/68230 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/editeng/source/accessibility/AccessibleStaticTextBase.cxx index c28c94b7dc99..b37d62d57979 100644 --- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx +++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx @@ -173,10 +173,6 @@ namespace accessibility // guard for maOffset mutable ::osl::Mutex maMutex; - - /// our current offset to the containing shape/cell (guarded by maMutex) - Point maOffset; - }; @@ -186,8 +182,7 @@ namespace accessibility AccessibleStaticTextBase_Impl::AccessibleStaticTextBase_Impl() : mxTextParagraph( new AccessibleEditableTextPara(nullptr) ), maEditSource(), - maMutex(), - maOffset(0,0) + maMutex() { // TODO: this is still somewhat of a hack, all the more since @@ -204,13 +199,6 @@ namespace accessibility void AccessibleStaticTextBase_Impl::SetOffset( const Point& rPoint ) { - - // guard against non-atomic access to maOffset data structure - { - ::osl::MutexGuard aGuard( maMutex ); - maOffset = rPoint; - } - if( mxTextParagraph.is() ) mxTextParagraph->SetEEOffset( rPoint ); } diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx index 54c585c44560..02df47e17d2d 100644 --- a/editeng/source/editeng/eertfpar.cxx +++ b/editeng/source/editeng/eertfpar.cxx @@ -248,7 +248,6 @@ void EditRTFParser::InsertText() if (mpEditEngine->IsRtfImportHandlerSet()) { RtfImportInfo aImportInfo(RtfImportState::InsertText, this, mpEditEngine->CreateESelection(aCurSel)); - aImportInfo.aText = aText; mpEditEngine->CallRtfImportHandler(aImportInfo); } aCurSel = mpEditEngine->InsertText(aCurSel, aText); diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx index 5841f4def1a7..aae91634d45c 100644 --- a/editeng/source/misc/unolingu.cxx +++ b/editeng/source/misc/unolingu.cxx @@ -711,7 +711,6 @@ SvxAlternativeSpelling SvxGetAltSpelling( aRes.nChangedPos = nL; aRes.nChangedLength = nLen - nL - nR; aRes.bIsAltSpelling = true; - aRes.xHyphWord = rHyphWord; } return aRes; } diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index a7ec83d0837d..72fece8bfaff 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -1611,10 +1611,6 @@ EBulletInfo Outliner::GetBulletInfo( sal_Int32 nPara ) if( pFmt->GetBulletFont() ) aInfo.aFont = *pFmt->GetBulletFont(); } - else if ( pFmt->GetBrush()->GetGraphicObject() ) - { - aInfo.aGraphic = pFmt->GetBrush()->GetGraphicObject()->GetGraphic(); - } } if ( aInfo.bVisible ) diff --git a/include/editeng/editdata.hxx b/include/editeng/editdata.hxx index d0517d1dc413..dc882a93d165 100644 --- a/include/editeng/editdata.hxx +++ b/include/editeng/editdata.hxx @@ -255,8 +255,6 @@ struct RtfImportInfo int nToken; short nTokenValue; - OUString aText; - RtfImportInfo( RtfImportState eState, SvParser<int>* pPrsrs, const ESelection& rSel ); ~RtfImportInfo(); }; diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index 67d2c47bb222..718424ae463a 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -546,7 +546,6 @@ struct EBulletInfo sal_uInt16 nType; // see SvxNumberType OUString aText; SvxFont aFont; - Graphic aGraphic; sal_Int32 nParagraph; tools::Rectangle aBounds; diff --git a/include/editeng/unolingu.hxx b/include/editeng/unolingu.hxx index 4575e201d5ac..6e1b81177640 100644 --- a/include/editeng/unolingu.hxx +++ b/include/editeng/unolingu.hxx @@ -91,8 +91,6 @@ namespace com { namespace sun { namespace star { namespace linguistic2 { struct SvxAlternativeSpelling { OUString aReplacement; - css::uno::Reference< css::linguistic2::XHyphenatedWord > - xHyphWord; sal_Int16 nChangedPos, nChangedLength; bool bIsAltSpelling; commit adb2b8ffd742c94a4fd9899164c6a11037a3bde1 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Feb 22 15:58:52 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Feb 23 11:55:06 2019 +0100 loplugin:unusedfields in extensions Change-Id: I9d23d64f67f3f4490cbcddd1cd07ab267d5e3e95 Reviewed-on: https://gerrit.libreoffice.org/68229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/extensions/inc/strings.hrc b/extensions/inc/strings.hrc index 45fe49a8167b..04d160c3907e 100644 --- a/extensions/inc/strings.hrc +++ b/extensions/inc/strings.hrc @@ -291,11 +291,8 @@ #define RID_UPDATE_STR_DOWNLOAD_UNAVAIL NC_("RID_UPDATE_STR_DOWNLOAD_UNAVAIL", "The automatic download of the update is currently not available.\n\nClick 'Download...' to download %PRODUCTNAME %NEXTVERSION manually from the web site.") #define RID_UPDATE_STR_DOWNLOADING NC_("RID_UPDATE_STR_DOWNLOADING", "Downloading %PRODUCTNAME %NEXTVERSION...") #define RID_UPDATE_STR_READY_INSTALL NC_("RID_UPDATE_STR_READY_INSTALL", "Download of %PRODUCTNAME %NEXTVERSION completed. Ready for installation.") -#define RID_UPDATE_STR_CANCEL_TITLE NC_("RID_UPDATE_STR_CANCEL_TITLE", "%PRODUCTNAME %PRODUCTVERSION") #define RID_UPDATE_STR_CANCEL_DOWNLOAD NC_("RID_UPDATE_STR_CANCEL_DOWNLOAD", "Do you really want to cancel the download?") #define RID_UPDATE_STR_BEGIN_INSTALL NC_("RID_UPDATE_STR_BEGIN_INSTALL", "To install the update, %PRODUCTNAME %PRODUCTVERSION needs to be closed. Do you want to install the update now?") -#define RID_UPDATE_STR_INSTALL_NOW NC_("RID_UPDATE_STR_INSTALL_NOW", "Install ~now") -#define RID_UPDATE_STR_INSTALL_LATER NC_("RID_UPDATE_STR_INSTALL_LATER", "Install ~later") #define RID_UPDATE_STR_INSTALL_ERROR NC_("RID_UPDATE_STR_INSTALL_ERROR", "Could not run the installer application, please run %FILE_NAME in %DOWNLOAD_PATH manually.") #define RID_UPDATE_STR_OVERWRITE_WARNING NC_("RID_UPDATE_STR_OVERWRITE_WARNING", "A file with that name already exists! Do you want to overwrite the existing file?") #define RID_UPDATE_STR_RELOAD_WARNING NC_("RID_UPDATE_STR_RELOAD_WARNING", "A file with the name '%FILENAME' already exists in '%DOWNLOAD_PATH'! Do you want to continue with the download or delete and reload the file?") diff --git a/extensions/source/bibliography/bibview.cxx b/extensions/source/bibliography/bibview.cxx index d82c4955cec6..bd8e4433b6c7 100644 --- a/extensions/source/bibliography/bibview.cxx +++ b/extensions/source/bibliography/bibview.cxx @@ -114,7 +114,6 @@ namespace bib pGeneralPage->RemoveListeners(); pGeneralPage.disposeAndClear(); - m_xGeneralPage = nullptr; BibWindow::dispose(); } @@ -128,11 +127,9 @@ namespace bib m_pGeneralPage->Hide(); m_pGeneralPage->RemoveListeners(); m_pGeneralPage.disposeAndClear(); - m_xGeneralPage = nullptr; } m_pGeneralPage = VclPtr<BibGeneralPage>::Create( this, m_pDatMan ); - m_xGeneralPage = m_pGeneralPage->GetFocusListener().get(); m_pGeneralPage->Show(); if( HasFocus() ) diff --git a/extensions/source/bibliography/bibview.hxx b/extensions/source/bibliography/bibview.hxx index 25b579a87107..72caf5325156 100644 --- a/extensions/source/bibliography/bibview.hxx +++ b/extensions/source/bibliography/bibview.hxx @@ -58,7 +58,6 @@ namespace bib private: BibDataManager* m_pDatMan; css::uno::Reference< css::form::XLoadable> m_xDatMan; - css::uno::Reference< css::awt::XFocusListener> m_xGeneralPage; VclPtr<BibGeneralPage> m_pGeneralPage; BibViewFormControlContainer m_aFormControlContainer; diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index 5af530a355cc..8f456b889181 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -571,7 +571,6 @@ void SAL_CALL BibInterceptorHelper::setMasterDispatchProvider( const css::uno::R } -#define STR_UID "uid" OUString const gGridName("theGrid"); OUString const gViewName("theView"); OUString const gGlobalName("theGlobals"); @@ -596,7 +595,6 @@ BibDataManager::~BibDataManager() { Reference< XComponent > xConnection; xPrSet->getPropertyValue("ActiveConnection") >>= xConnection; - RemoveMeAsUidListener(); if (xLoad.is()) xLoad->unload(); if (xComp.is()) @@ -1068,7 +1066,6 @@ void SAL_CALL BibDataManager::load( ) if ( xFormAsLoadable.is() ) { xFormAsLoadable->load(); - SetMeAsUidListener(); EventObject aEvt( static_cast< XWeak* >( this ) ); m_aLoadListeners.notifyEach( &XLoadListener::loaded, aEvt ); @@ -1092,7 +1089,6 @@ void SAL_CALL BibDataManager::unload( ) m_aLoadListeners.notifyEach( &XLoadListener::unloading, aEvt ); } - RemoveMeAsUidListener(); xFormAsLoadable->unload(); { @@ -1357,106 +1353,6 @@ Reference< awt::XControlModel > BibDataManager::loadControlModel( return xModel; } -void BibDataManager::disposing( const EventObject& /*Source*/ ) -{ - // not interested in -} - - -void BibDataManager::propertyChange(const beans::PropertyChangeEvent& evt) -{ - try - { - if(evt.PropertyName == FM_PROP_VALUE) - { - if( evt.NewValue.getValueType() == cppu::UnoType<io::XInputStream>::get()) - { - Reference< io::XDataInputStream > xStream( - evt.NewValue, UNO_QUERY ); - aUID <<= xStream->readUTF(); - } - else - aUID = evt.NewValue; - } - } - catch (const Exception&) - { - OSL_FAIL("::propertyChange: something went wrong !"); - } -} - - -void BibDataManager::SetMeAsUidListener() -{ - try - { - Reference< XNameAccess > xFields = getColumns( m_xForm ); - if (!xFields.is()) - return; - - OUString theFieldName; - for( const OUString& rName : xFields->getElementNames() ) - { - if (rName.equalsIgnoreAsciiCase(STR_UID)) - { - theFieldName=rName; - break; - } - } - - if(!theFieldName.isEmpty()) - { - Any aElement; - - aElement = xFields->getByName(theFieldName); - auto xPropSet = o3tl::doAccess<Reference<XPropertySet>>(aElement); - - (*xPropSet)->addPropertyChangeListener(FM_PROP_VALUE, this); - } - - } - catch (const Exception&) - { - OSL_FAIL("Exception in BibDataManager::SetMeAsUidListener"); - } -} - - -void BibDataManager::RemoveMeAsUidListener() -{ - try - { - Reference< XNameAccess > xFields = getColumns( m_xForm ); - if (!xFields.is()) - return; - - OUString theFieldName; - for(const OUString& rName : xFields->getElementNames() ) - { - if (rName.equalsIgnoreAsciiCase(STR_UID)) - { - theFieldName=rName; - break; - } - } - - if(!theFieldName.isEmpty()) - { - Any aElement; - - aElement = xFields->getByName(theFieldName); - auto xPropSet = o3tl::doAccess<Reference<XPropertySet>>(aElement); - - (*xPropSet)->removePropertyChangeListener(FM_PROP_VALUE, this); - } - - } - catch (const Exception&) - { - OSL_FAIL("Exception in BibDataManager::RemoveMeAsUidListener"); - } -} - void BibDataManager::CreateMappingDialog(vcl::Window* pParent) { VclPtrInstance< MappingDialog_Impl > pDlg(pParent, this); diff --git a/extensions/source/bibliography/datman.hxx b/extensions/source/bibliography/datman.hxx index e9aa2559f849..3048b616a52c 100644 --- a/extensions/source/bibliography/datman.hxx +++ b/extensions/source/bibliography/datman.hxx @@ -73,8 +73,7 @@ public: virtual void SAL_CALL setMasterDispatchProvider( const css::uno::Reference< css::frame::XDispatchProvider >& xNewMasterDispatchProvider ) override; }; -typedef cppu::WeakComponentImplHelper < css::beans::XPropertyChangeListener - , css::form::XLoadable +typedef cppu::WeakComponentImplHelper < css::form::XLoadable > BibDataManager_Base; class BibDataManager final :public ::comphelper::OMutexAndBroadcastHelper @@ -91,7 +90,6 @@ private: OUString aActiveDataTable; OUString aDataSourceURL; OUString aQuoteChar; - css::uno::Any aUID; ::comphelper::OInterfaceContainerHelper2 m_aLoadListeners; @@ -101,8 +99,6 @@ private: OUString sIdentifierMapping; void InsertFields(const css::uno::Reference< css::form::XFormComponent > & xGrid); - void SetMeAsUidListener(); - void RemoveMeAsUidListener(); css::uno::Reference< css::awt::XControlModel > const & updateGridModel(const css::uno::Reference< css::form::XForm > & xDbForm); @@ -124,10 +120,6 @@ public: BibDataManager(); virtual ~BibDataManager() override; - virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent& evt) override; - virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override; - - css::uno::Reference< css::form::XForm > createDatabaseForm( BibDBDescriptor& aDesc); css::uno::Reference< css::awt::XControlModel > updateGridModel(); diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx index 522587dea6b7..6fa8e25a1441 100644 --- a/extensions/source/update/check/updatehdl.cxx +++ b/extensions/source/update/check/updatehdl.cxx @@ -628,11 +628,8 @@ void UpdateHandler::loadStrings() msDownloadNotAvail = loadString( loc, RID_UPDATE_STR_DOWNLOAD_UNAVAIL ); msDownloading = loadString( loc, RID_UPDATE_STR_DOWNLOADING ); msReady2Install = loadString( loc, RID_UPDATE_STR_READY_INSTALL ); - msCancelTitle = loadString( loc, RID_UPDATE_STR_CANCEL_TITLE ); msCancelMessage = loadString( loc, RID_UPDATE_STR_CANCEL_DOWNLOAD ); msInstallMessage = loadString( loc, RID_UPDATE_STR_BEGIN_INSTALL ); - msInstallNow = loadString( loc, RID_UPDATE_STR_INSTALL_NOW ); - msInstallLater = loadString( loc, RID_UPDATE_STR_INSTALL_LATER ); msInstallError = loadString( loc, RID_UPDATE_STR_INSTALL_ERROR ); msOverwriteWarning = loadString( loc, RID_UPDATE_STR_OVERWRITE_WARNING ); msPercent = loadString( loc, RID_UPDATE_STR_PERCENT ); diff --git a/extensions/source/update/check/updatehdl.hxx b/extensions/source/update/check/updatehdl.hxx index 6870c13e3c45..bb49d779ed6c 100644 --- a/extensions/source/update/check/updatehdl.hxx +++ b/extensions/source/update/check/updatehdl.hxx @@ -105,11 +105,8 @@ private: OUString msDownloadNotAvail; // RID_UPDATE_STR_DOWNLOAD_UNAVAIL OUString msDownloading; // RID_UPDATE_STR_DOWNLOADING OUString msReady2Install; // RID_UPDATE_STR_READY_INSTALL - OUString msCancelTitle; // RID_UPDATE_STR_CANCEL_TITLE OUString msCancelMessage; // RID_UPDATE_STR_CANCEL_DOWNLOAD OUString msInstallMessage; // RID_UPDATE_STR_BEGIN_INSTALL - OUString msInstallNow; // RID_UPDATE_STR_INSTALL_NOW - OUString msInstallLater; // RID_UPDATE_STR_INSTALL_LATER OUString msInstallError; // RID_UPDATE_STR_INSTALL_ERROR OUString msOverwriteWarning; // RID_UPDATE_STR_OVERWRITE_WARNING OUString msPercent; // RID_UPDATE_STR_PERCENT _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits