Kaydet (Commit) 5e4b4eec authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:unusedfields in sfx2

Change-Id: Id6666065bf3b27388d87aa2605229e83f1aed79a
Reviewed-on: https://gerrit.libreoffice.org/40255Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 182a74d9
......@@ -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
......
......@@ -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()
......
......@@ -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;
......
......@@ -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 );
......
......@@ -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.
......
......@@ -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 );
......
......@@ -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() ) {
......
......@@ -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 ) );
......
......@@ -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 );
......
......@@ -912,7 +912,7 @@ bool SfxObjectShell::IsAutoLoadLocked() const
*/
{
return !IsReadOnly() || pImpl->nAutoLoadLocks > 0;
return !IsReadOnly();
}
......
......@@ -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;
......
......@@ -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;
......
......@@ -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() )
{
......
......@@ -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();
}
......
......@@ -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();
......
......@@ -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)
......
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment