summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-21 08:43:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-21 09:39:21 +0200
commit5e4b4eecb1b2b7113f45e9468574624d30c7097c (patch)
tree701fc89158bfbffab65fc222e062a927aa769120
parent182a74d937088f0f08850014a7b918719e106b7d (diff)
loplugin:unusedfields in sfx2
Change-Id: Id6666065bf3b27388d87aa2605229e83f1aed79a Reviewed-on: https://gerrit.libreoffice.org/40255 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--compilerplugins/clang/unusedfields.readonly.results18
-rw-r--r--include/sfx2/StylePreviewRenderer.hxx2
-rw-r--r--include/sfx2/mailmodelapi.hxx2
-rw-r--r--include/sfx2/tabdlg.hxx1
-rw-r--r--include/sfx2/titledockwin.hxx5
-rw-r--r--include/sfx2/viewsh.hxx2
-rw-r--r--sfx2/source/dialog/mailmodel.cxx42
-rw-r--r--sfx2/source/dialog/tabdlg.cxx20
-rw-r--r--sfx2/source/dialog/titledockwin.cxx8
-rw-r--r--sfx2/source/doc/objmisc.cxx2
-rw-r--r--sfx2/source/doc/objxtor.cxx4
-rw-r--r--sfx2/source/inc/objshimp.hxx2
-rw-r--r--sfx2/source/view/frame.cxx2
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx6
-rw-r--r--sfx2/source/view/viewsh.cxx1
-rw-r--r--svx/source/styles/CommonStylePreviewRenderer.cxx2
17 files changed, 13 insertions, 108 deletions
diff --git a/compilerplugins/clang/unusedfields.readonly.results b/compilerplugins/clang/unusedfields.readonly.results
index a0cbcb37d6c8..7badc8cb155c 100644
--- a/compilerplugins/clang/unusedfields.readonly.results
+++ b/compilerplugins/clang/unusedfields.readonly.results
@@ -592,10 +592,6 @@ include/registry/refltype.hxx:68
RTUik m_Data4 sal_uInt32
include/registry/refltype.hxx:69
RTUik m_Data5 sal_uInt32
-include/sfx2/mailmodelapi.hxx:53
- SfxMailModel mpCcList std::unique_ptr<AddressList_Impl>
-include/sfx2/mailmodelapi.hxx:54
- SfxMailModel mpBccList std::unique_ptr<AddressList_Impl>
include/sfx2/msg.hxx:105
SfxType createSfxPoolItemFunc std::function<SfxPoolItem *(void)>
include/sfx2/msg.hxx:106
@@ -610,14 +606,6 @@ include/sfx2/msg.hxx:119
SfxType0 nAttribs sal_uInt16
include/sfx2/sidebar/ResourceManager.hxx:103
sfx2::sidebar::ResourceManager maMiscOptions class SvtMiscOptions
-include/sfx2/StylePreviewRenderer.hxx:29
- sfx2::StylePreviewRenderer msRenderText class rtl::OUString
-include/sfx2/tabdlg.hxx:89
- SfxTabDialog m_bItemsReset _Bool
-include/sfx2/titledockwin.hxx:87
- sfx2::TitledDockingWindow m_aEndDockingHdl Link<class sfx2::TitledDockingWindow *, void>
-include/sfx2/viewsh.hxx:153
- SfxViewShell pSubShell class SfxShell *
include/svl/ondemand.hxx:59
OnDemandLocaleDataWrapper aSysLocale class SvtSysLocale
include/svl/svdde.hxx:60
@@ -1112,18 +1100,12 @@ sfx2/source/control/dispatch.cxx:132
SfxDispatcher_Impl aObjBars struct SfxObjectBars_Impl [13]
sfx2/source/control/dispatch.cxx:133
SfxDispatcher_Impl aFixedObjBars struct SfxObjectBars_Impl [13]
-sfx2/source/dialog/tabdlg.cxx:114
- TabDlg_Impl bModified _Bool
sfx2/source/doc/doctempl.cxx:118
DocTempl::DocTempl_EntryData_Impl mxObjShell class SfxObjectShellLock
sfx2/source/doc/sfxbasemodel.cxx:189
IMPL_SfxBaseModel_DataContainer m_xStarBasicAccess Reference<script::XStarBasicAccess>
sfx2/source/inc/appdata.hxx:104
SfxAppData_Impl nDocModalMode sal_uInt16
-sfx2/source/inc/objshimp.hxx:104
- SfxObjectShell_Impl nAutoLoadLocks sal_uInt16
-sfx2/source/inc/objshimp.hxx:111
- SfxObjectShell_Impl bDisposing _Bool
slideshow/source/engine/opengl/TransitionImpl.hxx:296
Vertex normal glm::vec3
slideshow/source/engine/opengl/TransitionImpl.hxx:297
diff --git a/include/sfx2/StylePreviewRenderer.hxx b/include/sfx2/StylePreviewRenderer.hxx
index eb016d6cf1d4..94ec091b2928 100644
--- a/include/sfx2/StylePreviewRenderer.hxx
+++ b/include/sfx2/StylePreviewRenderer.hxx
@@ -25,7 +25,6 @@ protected:
OutputDevice& mrOutputDev;
SfxStyleSheetBase* mpStyle;
long mnMaxHeight;
- OUString msRenderText;
public:
enum class RenderAlign
@@ -41,7 +40,6 @@ public:
, mrOutputDev(rOutputDev)
, mpStyle(pStyle)
, mnMaxHeight(nMaxHeight)
- , msRenderText()
{}
virtual ~StylePreviewRenderer()
diff --git a/include/sfx2/mailmodelapi.hxx b/include/sfx2/mailmodelapi.hxx
index b0591e845045..bcf04760dde3 100644
--- a/include/sfx2/mailmodelapi.hxx
+++ b/include/sfx2/mailmodelapi.hxx
@@ -50,8 +50,6 @@ protected:
private:
std::unique_ptr<AddressList_Impl> mpToList;
- std::unique_ptr<AddressList_Impl> mpCcList;
- std::unique_ptr<AddressList_Impl> mpBccList;
OUString maFromAddress;
OUString maSubject;
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 81c521aa10b5..533496966d12 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -86,7 +86,6 @@ friend class SfxTabDialogUIObject;
std::unique_ptr< TabDlg_Impl > m_pImpl;
sal_uInt16* m_pRanges;
sal_uInt16 m_nAppPageId;
- bool m_bItemsReset;
bool m_bStandardPushed;
DECL_DLLPRIVATE_LINK(ActivatePageHdl, TabControl*, void );
diff --git a/include/sfx2/titledockwin.hxx b/include/sfx2/titledockwin.hxx
index 93c5f5527f57..c40808c3289d 100644
--- a/include/sfx2/titledockwin.hxx
+++ b/include/sfx2/titledockwin.hxx
@@ -63,9 +63,6 @@ namespace sfx2
virtual void DataChanged( const DataChangedEvent& i_rDataChangedEvent ) override;
virtual void SetText( const OUString& i_rText ) override;
- // DockingWindow overridables
- void EndDocking(const tools::Rectangle& rRect, bool bFloatMode) override;
-
virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
protected:
/** internal version of ResetToolBox
@@ -84,8 +81,6 @@ namespace sfx2
VclPtr<ToolBox> m_aToolbox;
VclPtr<Window> m_aContentWindow;
- Link<TitledDockingWindow*,void> m_aEndDockingHdl;
-
/** The border that is painted around the inner window. The bevel
shadow lines are part of the border, so where the border is 0 no
such line is painted.
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 6e7053421dae..c11df0fc735f 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -150,7 +150,6 @@ friend class SfxPrinterController;
std::unique_ptr<struct SfxViewShell_Impl> pImpl;
SfxViewFrame* pFrame;
- SfxShell* pSubShell;
VclPtr<vcl::Window> pWindow;
bool bNoNewWindow;
bool mbPrinterSettingsModified;
@@ -214,7 +213,6 @@ public:
virtual bool HasSelection( bool bText = true ) const;
virtual SdrView* GetDrawView() const;
- SfxShell* GetSubShell() const { return pSubShell; }
void AddSubShell( SfxShell& rShell );
void RemoveSubShell( SfxShell *pShell=nullptr );
SfxShell* GetSubShell( sal_uInt16 );
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 873ae8e84509..81c0f80338b8 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -726,55 +726,23 @@ SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css:
xSimpleMailMessage->setOriginator( maFromAddress );
size_t nToCount = mpToList ? mpToList->size() : 0;
- size_t nCcCount = mpCcList ? mpCcList->size() : 0;
- size_t nCcSeqCount = nCcCount;
// set recipient (only one) for this simple mail server!!
- if ( nToCount > 1 )
- {
- nCcSeqCount = nToCount - 1 + nCcCount;
- xSimpleMailMessage->setRecipient( mpToList->at( 0 ) );
- nSendFlags = SimpleMailClientFlags::NO_USER_INTERFACE;
- }
- else if ( nToCount == 1 )
+ if ( nToCount >= 1 )
{
xSimpleMailMessage->setRecipient( mpToList->at( 0 ) );
nSendFlags = SimpleMailClientFlags::NO_USER_INTERFACE;
}
// all other recipient must be handled with CC recipients!
- if ( nCcSeqCount > 0 )
+ if ( nToCount > 1 )
{
- size_t nIndex = 0;
- Sequence< OUString > aCcRecipientSeq;
-
- aCcRecipientSeq.realloc( nCcSeqCount );
- if ( nCcSeqCount > nCcCount )
- {
- for ( size_t i = 1; i < nToCount; ++i )
- {
- aCcRecipientSeq[nIndex++] = mpToList->at(i);
- }
- }
-
- for ( size_t i = 0; i < nCcCount; i++ )
- {
- aCcRecipientSeq[nIndex++] = mpCcList->at(i);
- }
+ Sequence< OUString > aCcRecipientSeq( nToCount - 1 );
+ for ( size_t i = 1; i < nToCount; ++i )
+ aCcRecipientSeq[i - 1] = mpToList->at(i);
xSimpleMailMessage->setCcRecipient( aCcRecipientSeq );
}
- size_t nBccCount = mpBccList ? mpBccList->size() : 0;
- if ( nBccCount > 0 )
- {
- Sequence< OUString > aBccRecipientSeq( nBccCount );
- for ( size_t i = 0; i < nBccCount; ++i )
- {
- aBccRecipientSeq[i] = mpBccList->at(i);
- }
- xSimpleMailMessage->setBccRecipient( aBccRecipientSeq );
- }
-
Sequence< OUString > aAttachmentSeq(&(maAttachedDocuments[0]),maAttachedDocuments.size());
if ( xSimpleMailMessage->getSubject().isEmpty() ) {
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 44f3118c6c6a..046f7baae4bc 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -111,14 +111,11 @@ typedef std::vector<Data_Impl*> SfxTabDlgData_Impl;
struct TabDlg_Impl
{
- bool bModified : 1,
- bModal : 1,
+ bool bModal : 1,
bHideResetBtn : 1;
SfxTabDlgData_Impl aData;
explicit TabDlg_Impl( sal_uInt8 nCnt ) :
-
- bModified ( false ),
bModal ( true ),
bHideResetBtn ( false )
{
@@ -321,7 +318,6 @@ SfxTabDialog::SfxTabDialog
, m_pOutSet(nullptr)
, m_pRanges(nullptr)
, m_nAppPageId(USHRT_MAX)
- , m_bItemsReset(false)
, m_bStandardPushed(false)
, m_pExampleSet(nullptr)
{
@@ -792,7 +788,7 @@ short SfxTabDialog::Ok()
}
}
- if ( m_pImpl->bModified || ( m_pOutSet && m_pOutSet->Count() > 0 ) )
+ if ( m_pOutSet && m_pOutSet->Count() > 0 )
bModified = true;
if (m_bStandardPushed)
@@ -1067,18 +1063,8 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl, void )
// Create TabPage if possible:
if ( !pTabPage )
{
- const SfxItemSet* pTmpSet = nullptr;
-
if ( m_pSet )
- {
- if ( m_bItemsReset && m_pSet->GetParent() )
- pTmpSet = m_pSet->GetParent();
- else
- pTmpSet = m_pSet;
- }
-
- if ( pTmpSet )
- pTabPage = (pDataObject->fnCreatePage)( pTabCtrl, pTmpSet );
+ pTabPage = (pDataObject->fnCreatePage)( pTabCtrl, m_pSet );
else
pTabPage = (pDataObject->fnCreatePage)
( pTabCtrl, CreateInputItemSet( nId ) );
diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx
index 3a12553aa8a3..8b43c8c23fb4 100644
--- a/sfx2/source/dialog/titledockwin.cxx
+++ b/sfx2/source/dialog/titledockwin.cxx
@@ -252,14 +252,6 @@ namespace sfx2
SfxDockingWindow::StateChanged( i_nType );
}
- void TitledDockingWindow::EndDocking( const tools::Rectangle& i_rRect, bool i_bFloatMode )
- {
- SfxDockingWindow::EndDocking( i_rRect, i_bFloatMode );
-
- m_aEndDockingHdl.Call( this );
- }
-
-
void TitledDockingWindow::DataChanged( const DataChangedEvent& i_rDataChangedEvent )
{
SfxDockingWindow::DataChanged( i_rDataChangedEvent );
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index febf5fbfe728..4e910b57fcc5 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -912,7 +912,7 @@ bool SfxObjectShell::IsAutoLoadLocked() const
*/
{
- return !IsReadOnly() || pImpl->nAutoLoadLocks > 0;
+ return !IsReadOnly();
}
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 8b25c10f7fe1..513e148a6a82 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -240,11 +240,9 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
,nFlagsInProgress( SfxLoadedFlags::NONE )
,bModalMode( false )
,bRunningMacro( false )
- ,nAutoLoadLocks( 0 )
,eFlags( SfxObjectShellFlags::UNDEFINED )
,bReadOnlyUI( false )
,nStyleFilter( 0 )
- ,bDisposing( false )
,m_bEnableSetModified( true )
,m_bIsModified( false )
,m_nMapUnit( MapUnit::Map100thMM )
@@ -390,7 +388,7 @@ bool SfxObjectShell::CloseInternal()
if ( !pImpl->bClosing )
{
// Do not close if a progress is still running
- if ( !pImpl->bDisposing && GetProgress() )
+ if ( GetProgress() )
return false;
pImpl->bClosing = true;
diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx
index 24bfb66d405a..42c619c70de3 100644
--- a/sfx2/source/inc/objshimp.hxx
+++ b/sfx2/source/inc/objshimp.hxx
@@ -101,14 +101,12 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
SfxLoadedFlags nFlagsInProgress;
bool bModalMode;
bool bRunningMacro;
- sal_uInt16 nAutoLoadLocks;
SfxObjectShellFlags eFlags;
bool bReadOnlyUI;
tools::SvRef<SvRefBase> xHeaderAttributes;
::rtl::Reference< SfxBaseModel >
pBaseModel;
sal_uInt16 nStyleFilter;
- bool bDisposing;
bool m_bEnableSetModified;
bool m_bIsModified;
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 9bee390c7f6f..760cf75b6049 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -123,7 +123,7 @@ bool SfxFrame::DoClose()
try
{
Reference< XCloseable > xCloseable ( pImpl->xFrame, UNO_QUERY );
- if ( (!GetCurrentDocument() || !GetCurrentDocument()->Get_Impl()->bDisposing ) && xCloseable.is())
+ if (xCloseable.is())
xCloseable->close(true);
else if ( pImpl->xFrame.is() )
{
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index c74166027e8d..71040a9e3d7c 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -1234,8 +1234,6 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
if ( i_eConnect != E_RECONNECT )
{
pViewFrame->GetDispatcher()->Push( *m_pData->m_pViewShell );
- if ( m_pData->m_pViewShell->GetSubShell() )
- pViewFrame->GetDispatcher()->Push( *m_pData->m_pViewShell->GetSubShell() );
m_pData->m_pViewShell->PushSubShells_Impl();
pViewFrame->GetDispatcher()->Flush();
}
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index a22aae8818e6..7ec9a6190148 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -950,11 +950,7 @@ void SfxViewFrame::PopShellAndSubShells_Impl( SfxViewShell& i_rViewShell )
{
// more sub shells on the stack, which were not affected by PopSubShells_Impl
SfxShell *pSubShell = m_pDispatcher->GetShell( nLevel-1 );
- if ( pSubShell == i_rViewShell.GetSubShell() )
- // "real" sub shells will be deleted elsewhere
- m_pDispatcher->Pop( *pSubShell, SfxDispatcherPopFlags::POP_UNTIL );
- else
- m_pDispatcher->Pop( *pSubShell, SfxDispatcherPopFlags::POP_UNTIL | SfxDispatcherPopFlags::POP_DELETE );
+ m_pDispatcher->Pop( *pSubShell, SfxDispatcherPopFlags::POP_UNTIL | SfxDispatcherPopFlags::POP_DELETE );
}
m_pDispatcher->Pop( i_rViewShell );
m_pDispatcher->Flush();
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 7dc86b388164..67b326205ed9 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1075,7 +1075,6 @@ SfxViewShell::SfxViewShell
: SfxShell(this)
, pImpl( new SfxViewShell_Impl(nFlags) )
, pFrame(pViewFrame)
-, pSubShell(nullptr)
, pWindow(nullptr)
, bNoNewWindow( nFlags & SfxViewShellFlags::NO_NEWWINDOW )
, mbPrinterSettingsModified(false)
diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx b/svx/source/styles/CommonStylePreviewRenderer.cxx
index bb27770bcf75..ab1d05fb94ed 100644
--- a/svx/source/styles/CommonStylePreviewRenderer.cxx
+++ b/svx/source/styles/CommonStylePreviewRenderer.cxx
@@ -185,7 +185,7 @@ Size CommonStylePreviewRenderer::getRenderSize()
bool CommonStylePreviewRenderer::render(const tools::Rectangle& aRectangle, RenderAlign eRenderAlign)
{
- const OUString& rText = msRenderText.isEmpty() ? maStyleName : msRenderText;
+ const OUString& rText = maStyleName;
// setup the device & draw
vcl::Font aOldFont(mrOutputDev.GetFont());