summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-22 12:25:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-22 18:03:27 +0100
commite79e8117dcc7475d8d90afeaaac9eb7050ff244e (patch)
treebba5f505c33796799aef9d19464132b22cccaa5d /sfx2
parentbacd06e9270ab64fa2c8243181c19c977d2bb649 (diff)
loplugin:unusedfields in sfx2
Change-Id: I92b25efa78e156c89a0532aec632a31ec2029e05 Reviewed-on: https://gerrit.libreoffice.org/68202 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/helpinterceptor.cxx39
-rw-r--r--sfx2/source/appl/helpinterceptor.hxx11
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx1
-rw-r--r--sfx2/source/control/templatedefaultview.cxx1
-rw-r--r--sfx2/source/control/templatelocalview.cxx2
-rw-r--r--sfx2/source/dialog/tabdlg.cxx3
-rw-r--r--sfx2/source/doc/docfilt.cxx5
-rw-r--r--sfx2/source/doc/doctempl.cxx3
-rw-r--r--sfx2/source/doc/frmdescr.cxx3
-rw-r--r--sfx2/source/sidebar/DeckDescriptor.cxx2
-rw-r--r--sfx2/source/sidebar/PanelDescriptor.cxx2
-rw-r--r--sfx2/source/sidebar/ResourceManager.cxx4
-rw-r--r--sfx2/source/sidebar/TabBar.cxx1
-rw-r--r--sfx2/source/view/viewsh.cxx4
14 files changed, 11 insertions, 70 deletions
diff --git a/sfx2/source/appl/helpinterceptor.cxx b/sfx2/source/appl/helpinterceptor.cxx
index 8c782108857a..0b6034a6c0da 100644
--- a/sfx2/source/appl/helpinterceptor.cxx
+++ b/sfx2/source/appl/helpinterceptor.cxx
@@ -51,30 +51,22 @@ HelpInterceptor_Impl::~HelpInterceptor_Impl()
void HelpInterceptor_Impl::addURL( const OUString& rURL )
{
- if ( !m_pHistory )
- m_pHistory.reset( new std::vector<std::unique_ptr<HelpHistoryEntry_Impl>> );
-
- size_t nCount = m_pHistory->size();
+ size_t nCount = m_vHistoryUrls.size();
if ( nCount && m_nCurPos < ( nCount - 1 ) )
{
for ( size_t i = nCount - 1; i > m_nCurPos; i-- )
{
- m_pHistory->erase( m_pHistory->begin() + i );
+ m_vHistoryUrls.erase( m_vHistoryUrls.begin() + i );
}
}
Reference<XFrame> xFrame(m_xIntercepted, UNO_QUERY);
Reference<XController> xController;
if(xFrame.is())
xController = xFrame->getController();
- if(xController.is() && !m_pHistory->empty())
- {
- m_pHistory->at( m_nCurPos )->aViewData = xController->getViewData();
- }
m_aCurrentURL = rURL;
- Any aEmptyViewData;
- m_pHistory->emplace_back( new HelpHistoryEntry_Impl( rURL, aEmptyViewData ) );
- m_nCurPos = m_pHistory->size() - 1;
+ m_vHistoryUrls.emplace_back( rURL );
+ m_nCurPos = m_vHistoryUrls.size() - 1;
// TODO ?
if ( m_xListener.is() )
{
@@ -101,12 +93,12 @@ void HelpInterceptor_Impl::setInterception( const Reference< XFrame >& xFrame )
bool HelpInterceptor_Impl::HasHistoryPred() const
{
- return m_pHistory && ( m_nCurPos > 0 );
+ return m_nCurPos > 0;
}
bool HelpInterceptor_Impl::HasHistorySucc() const
{
- return m_pHistory && ( m_nCurPos < ( m_pHistory->size() - 1 ) );
+ return m_nCurPos < ( m_vHistoryUrls.size() - 1 );
}
@@ -199,30 +191,17 @@ void SAL_CALL HelpInterceptor_Impl::dispatch(
if ( !bBack && aURL.Complete != ".uno:Forward" )
return;
- if ( !m_pHistory )
+ if ( m_vHistoryUrls.empty() )
return;
- if(m_pHistory->size() > m_nCurPos)
- {
- Reference<XFrame> xFrame(m_xIntercepted, UNO_QUERY);
- Reference<XController> xController;
- if(xFrame.is())
- xController = xFrame->getController();
- if(xController.is())
- {
- m_pHistory->at( m_nCurPos )->aViewData = xController->getViewData();
- }
- }
-
sal_uIntPtr nPos = ( bBack && m_nCurPos > 0 ) ? --m_nCurPos
- : ( !bBack && m_nCurPos < m_pHistory->size() - 1 )
+ : ( !bBack && m_nCurPos < m_vHistoryUrls.size() - 1 )
? ++m_nCurPos
: ULONG_MAX;
if ( nPos < ULONG_MAX )
{
- HelpHistoryEntry_Impl* pEntry = m_pHistory->at( nPos ).get();
- m_pWindow->loadHelpContent(pEntry->aURL, false); // false => don't add item to history again!
+ m_pWindow->loadHelpContent(m_vHistoryUrls[nPos], false); // false => don't add item to history again!
}
m_pWindow->UpdateToolbox();
diff --git a/sfx2/source/appl/helpinterceptor.hxx b/sfx2/source/appl/helpinterceptor.hxx
index 1c7b29803472..c6cb021680bb 100644
--- a/sfx2/source/appl/helpinterceptor.hxx
+++ b/sfx2/source/appl/helpinterceptor.hxx
@@ -31,15 +31,6 @@
#include <vector>
#include <memory>
-struct HelpHistoryEntry_Impl
-{
- OUString const aURL;
- css::uno::Any aViewData;
-
- HelpHistoryEntry_Impl( const OUString& rURL, const css::uno::Any& rViewData ) :
- aURL( rURL ), aViewData(rViewData) {}
-};
-
class SfxHelpWindow_Impl;
class HelpInterceptor_Impl : public ::cppu::WeakImplHelper<
css::frame::XDispatchProviderInterceptor,
@@ -60,7 +51,7 @@ friend class SfxHelpWindow_Impl;
css::uno::Reference< css::frame::XStatusListener > m_xListener;
- std::unique_ptr<std::vector<std::unique_ptr<HelpHistoryEntry_Impl>>> m_pHistory;
+ std::vector<OUString> m_vHistoryUrls;
VclPtr<SfxHelpWindow_Impl> m_pWindow;
sal_uIntPtr m_nCurPos;
OUString m_aCurrentURL;
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index e506de0bc734..7f4d919546a3 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -1079,7 +1079,6 @@ void SfxFilterContainer::ReadSingleFilter_Impl(
{
pFilt->SetVersion( nFormatVersion );
}
- pFilt->SetURLPattern(sPattern);
}
void SfxFilterContainer::ReadFilters_Impl( bool bUpdate )
diff --git a/sfx2/source/control/templatedefaultview.cxx b/sfx2/source/control/templatedefaultview.cxx
index b5ca2ba75123..dd75a537177e 100644
--- a/sfx2/source/control/templatedefaultview.cxx
+++ b/sfx2/source/control/templatedefaultview.cxx
@@ -53,7 +53,6 @@ void TemplateDefaultView::reload()
void TemplateDefaultView::showAllTemplates()
{
mnCurRegionId = 0;
- maCurRegionName.clear();
insertItems(maAllTemplates, false);
maOpenRegionHdl.Call(nullptr);
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index 75d9296e390e..d15109f8943b 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -183,7 +183,6 @@ void TemplateLocalView::reload ()
void TemplateLocalView::showAllTemplates()
{
mnCurRegionId = 0;
- maCurRegionName.clear();
insertItems(maAllTemplates, false, true);
@@ -193,7 +192,6 @@ void TemplateLocalView::showAllTemplates()
void TemplateLocalView::showRegion(TemplateContainerItem const *pItem)
{
mnCurRegionId = pItem->mnRegionId+1;
- maCurRegionName = pItem->maTitle;
insertItems(pItem->maTemplates);
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 2c7f0a4e3c63..90ab0b9246e3 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -455,7 +455,6 @@ void SfxTabDialog::dispose()
m_pBox.clear();
m_pTabCtrl.clear();
m_pOKBtn.clear();
- m_pApplyBtn.clear();
m_pUserBtn.clear();
m_pCancelBtn.clear();
m_pHelpBtn.clear();
@@ -486,8 +485,6 @@ void SfxTabDialog::Init_Impl()
if (m_bOwnsOKBtn)
m_pOKBtn = VclPtr<OKButton>::Create(m_pActionArea);
- m_pApplyBtn = m_pUIBuilder->get<PushButton>("apply");
- m_pUserBtn = m_pUIBuilder->get<PushButton>("user");
m_pCancelBtn = m_pUIBuilder->get<CancelButton>("cancel");
m_bOwnsCancelBtn = m_pCancelBtn == nullptr;
if (m_bOwnsCancelBtn)
diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx
index ef1bef3235d6..32c56d8f2b9f 100644
--- a/sfx2/source/doc/docfilt.cxx
+++ b/sfx2/source/doc/docfilt.cxx
@@ -97,11 +97,6 @@ OUString SfxFilter::GetDefaultExtension() const
}
-void SfxFilter::SetURLPattern( const OUString& rStr )
-{
- aPattern = rStr.toAsciiLowerCase();
-}
-
OUString SfxFilter::GetSuffixes() const
{
OUString aRet = GetWildcard().getGlob();
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 5dcbd550ec9f..139d4aaa4c41 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -148,7 +148,6 @@ class RegionData_Impl
std::vector<std::unique_ptr<DocTempl_EntryData_Impl>> maEntries;
OUString maTitle;
OUString maOwnURL;
- OUString maTargetURL;
private:
size_t GetEntryPos( const OUString& rTitle,
@@ -159,7 +158,6 @@ public:
RegionData_Impl( const SfxDocTemplate_Impl* pParent,
const OUString& rTitle );
- void SetTargetURL( const OUString& rURL ) { maTargetURL = rURL; }
void SetHierarchyURL( const OUString& rURL) { maOwnURL = rURL; }
DocTempl_EntryData_Impl* GetEntry( size_t nIndex ) const;
@@ -1069,7 +1067,6 @@ bool SfxDocumentTemplates::SetName( const OUString& rName, sal_uInt16 nRegion, s
if ( xTemplates->renameGroup( pRegion->GetTitle(), rName ) )
{
pRegion->SetTitle( rName );
- pRegion->SetTargetURL( "" );
pRegion->SetHierarchyURL( "" );
return true;
}
diff --git a/sfx2/source/doc/frmdescr.cxx b/sfx2/source/doc/frmdescr.cxx
index 2912b57c529e..09fb74c19da8 100644
--- a/sfx2/source/doc/frmdescr.cxx
+++ b/sfx2/source/doc/frmdescr.cxx
@@ -50,9 +50,8 @@ void SfxFrameDescriptor::SetURL( const OUString& rURL )
SetActualURL(aURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ));
}
-void SfxFrameDescriptor::SetActualURL( const OUString& rURL )
+void SfxFrameDescriptor::SetActualURL( const OUString& )
{
- aActualURL = INetURLObject(rURL);
if ( m_pArgs )
m_pArgs->ClearItem();
}
diff --git a/sfx2/source/sidebar/DeckDescriptor.cxx b/sfx2/source/sidebar/DeckDescriptor.cxx
index fd4f6400fe4f..6a55dfbd202c 100644
--- a/sfx2/source/sidebar/DeckDescriptor.cxx
+++ b/sfx2/source/sidebar/DeckDescriptor.cxx
@@ -28,7 +28,6 @@ DeckDescriptor::DeckDescriptor()
msHighContrastIconURL(),
msTitleBarIconURL(),
msHighContrastTitleBarIconURL(),
- msHelpURL(),
msHelpText(),
maContextList(),
mbIsEnabled(true),
@@ -45,7 +44,6 @@ DeckDescriptor::DeckDescriptor (const DeckDescriptor& rOther)
msHighContrastIconURL(rOther.msHighContrastIconURL),
msTitleBarIconURL(rOther.msTitleBarIconURL),
msHighContrastTitleBarIconURL(rOther.msHighContrastTitleBarIconURL),
- msHelpURL(rOther.msHelpURL),
msHelpText(rOther.msHelpText),
maContextList(rOther.maContextList),
mbIsEnabled(rOther.mbIsEnabled),
diff --git a/sfx2/source/sidebar/PanelDescriptor.cxx b/sfx2/source/sidebar/PanelDescriptor.cxx
index 43426171e925..90d4183ae4b2 100644
--- a/sfx2/source/sidebar/PanelDescriptor.cxx
+++ b/sfx2/source/sidebar/PanelDescriptor.cxx
@@ -28,7 +28,6 @@ PanelDescriptor::PanelDescriptor()
msDeckId(),
msTitleBarIconURL(),
msHighContrastTitleBarIconURL(),
- msHelpURL(),
maContextList(),
msImplementationURL(),
mnOrderIndex(10000), // Default value as defined in Sidebar.xcs
@@ -45,7 +44,6 @@ PanelDescriptor::PanelDescriptor (const PanelDescriptor& rOther)
msDeckId(rOther.msDeckId),
msTitleBarIconURL(rOther.msTitleBarIconURL),
msHighContrastTitleBarIconURL(rOther.msHighContrastTitleBarIconURL),
- msHelpURL(rOther.msHelpURL),
maContextList(rOther.maContextList),
msImplementationURL(rOther.msImplementationURL),
mnOrderIndex(rOther.mnOrderIndex),
diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx
index 669402270691..3ef85d0a09ea 100644
--- a/sfx2/source/sidebar/ResourceManager.cxx
+++ b/sfx2/source/sidebar/ResourceManager.cxx
@@ -268,7 +268,6 @@ void ResourceManager::ReadDeckList()
rDeckDescriptor.msHighContrastIconURL = getString(aDeckNode, "HighContrastIconURL");
rDeckDescriptor.msTitleBarIconURL = getString(aDeckNode, "TitleBarIconURL");
rDeckDescriptor.msHighContrastTitleBarIconURL = getString(aDeckNode, "HighContrastTitleBarIconURL");
- rDeckDescriptor.msHelpURL = getString(aDeckNode, "HelpURL");
rDeckDescriptor.msHelpText = rDeckDescriptor.msTitle;
rDeckDescriptor.mnOrderIndex = getInt32(aDeckNode, "OrderIndex");
rDeckDescriptor.mbExperimental = getBool(aDeckNode, "IsExperimental");
@@ -429,7 +428,6 @@ void ResourceManager::ReadPanelList()
rPanelDescriptor.msDeckId = getString(aPanelNode, "DeckId");
rPanelDescriptor.msTitleBarIconURL = getString(aPanelNode, "TitleBarIconURL");
rPanelDescriptor.msHighContrastTitleBarIconURL = getString(aPanelNode, "HighContrastTitleBarIconURL");
- rPanelDescriptor.msHelpURL = getString(aPanelNode, "HelpURL");
rPanelDescriptor.msImplementationURL = getString(aPanelNode, "ImplementationURL");
rPanelDescriptor.mnOrderIndex = getInt32(aPanelNode, "OrderIndex");
rPanelDescriptor.mbShowForReadOnlyDocuments = getBool(aPanelNode, "ShowForReadOnlyDocument");
@@ -663,7 +661,6 @@ void ResourceManager::ReadLegacyAddons (const Reference<frame::XController>& rxC
rDeckDescriptor.msHighContrastIconURL = rDeckDescriptor.msIconURL;
rDeckDescriptor.msTitleBarIconURL.clear();
rDeckDescriptor.msHighContrastTitleBarIconURL.clear();
- rDeckDescriptor.msHelpURL = getString(aChildNode, "HelpURL");
rDeckDescriptor.msHelpText = rDeckDescriptor.msTitle;
rDeckDescriptor.mbIsEnabled = true;
rDeckDescriptor.mnOrderIndex = 100000 + nReadIndex;
@@ -677,7 +674,6 @@ void ResourceManager::ReadLegacyAddons (const Reference<frame::XController>& rxC
rPanelDescriptor.msDeckId = rsNodeName;
rPanelDescriptor.msTitleBarIconURL.clear();
rPanelDescriptor.msHighContrastTitleBarIconURL.clear();
- rPanelDescriptor.msHelpURL = getString(aChildNode, "HelpURL");
rPanelDescriptor.msImplementationURL = rsNodeName;
rPanelDescriptor.mnOrderIndex = 100000 + nReadIndex;
rPanelDescriptor.mbShowForReadOnlyDocuments = false;
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index 670f8fbf6ef9..d2e9f699ad46 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -393,7 +393,6 @@ IMPL_LINK_NOARG(TabBar, OnToolboxClicked, Button*, void)
{
DeckMenuData aData;
aData.msDisplayName = xDeckDescriptor->msTitle;
- aData.msDeckId = xDeckDescriptor->msId;
aData.mbIsCurrentDeck = item.mpButton->IsChecked();
aData.mbIsActive = !item.mbIsHidden;
aData.mbIsEnabled = item.mpButton->IsEnabled();
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 8471cdc845c8..47fbfd7afbf7 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -452,10 +452,6 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
SfxMailModel aModel;
OUString aDocType;
- const SfxStringItem* pMailSubject = rReq.GetArg<SfxStringItem>(SID_MAIL_SUBJECT);
- if ( pMailSubject )
- aModel.SetSubject( pMailSubject->GetValue() );
-
const SfxStringItem* pMailRecipient = rReq.GetArg<SfxStringItem>(SID_MAIL_RECIPIENT);
if ( pMailRecipient )
{