summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-22 15:58:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-23 11:55:06 +0100
commitadb2b8ffd742c94a4fd9899164c6a11037a3bde1 (patch)
treea081ca4a20c90a424036ca99e78487f33189f4a0 /extensions
parentcd383000f84b8b75ffe15d1cd1bb8d5a14a71685 (diff)
loplugin:unusedfields in extensions
Change-Id: I9d23d64f67f3f4490cbcddd1cd07ab267d5e3e95 Reviewed-on: https://gerrit.libreoffice.org/68229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/inc/strings.hrc3
-rw-r--r--extensions/source/bibliography/bibview.cxx3
-rw-r--r--extensions/source/bibliography/bibview.hxx1
-rw-r--r--extensions/source/bibliography/datman.cxx104
-rw-r--r--extensions/source/bibliography/datman.hxx10
-rw-r--r--extensions/source/update/check/updatehdl.cxx3
-rw-r--r--extensions/source/update/check/updatehdl.hxx3
7 files changed, 1 insertions, 126 deletions
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