diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-17 13:16:30 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-17 13:10:42 +0000 |
commit | bb674aa5503ff40a5619d1fb4c9f310da5f5c983 (patch) | |
tree | e9b6d62f258cded0a5f207609a61157c8d0ef4c2 /sd | |
parent | b79cf88a048e5d8c784c97d99155104aef3d5dca (diff) |
loplugin:unusedfields
Change-Id: Id2dbbf384637223db3d334d95332251832918003
Reviewed-on: https://gerrit.libreoffice.org/30927
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/cusshow.hxx | 10 | ||||
-rw-r--r-- | sd/source/core/cusshow.cxx | 9 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptin.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/ppt/propread.cxx | 11 | ||||
-rw-r--r-- | sd/source/filter/ppt/propread.hxx | 3 | ||||
-rw-r--r-- | sd/source/ui/dlg/custsdlg.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unocpres.cxx | 4 |
7 files changed, 15 insertions, 26 deletions
diff --git a/sd/inc/cusshow.hxx b/sd/inc/cusshow.hxx index d0509ad04881..a4ab36d38f52 100644 --- a/sd/inc/cusshow.hxx +++ b/sd/inc/cusshow.hxx @@ -33,19 +33,15 @@ public: typedef ::std::vector<const SdPage*> PageVec; private: - PageVec maPages; + PageVec maPages; OUString aName; - SdDrawDocument* pDoc; // this is a weak reference to a possible living api wrapper for this custom show css::uno::WeakReference< css::uno::XInterface > mxUnoCustomShow; - SdCustomShow() = delete; - public: - // single argument ctors shall be explicit - explicit SdCustomShow(SdDrawDocument* pDrawDoc); - SdCustomShow(SdDrawDocument* pDrawDoc, css::uno::Reference< css::uno::XInterface > const & xShow ); + SdCustomShow(); + SdCustomShow(css::uno::Reference< css::uno::XInterface > const & xShow ); ~SdCustomShow(); diff --git a/sd/source/core/cusshow.cxx b/sd/source/core/cusshow.cxx index 8f67ca963bc4..c96db3077ee4 100644 --- a/sd/source/core/cusshow.cxx +++ b/sd/source/core/cusshow.cxx @@ -34,9 +34,8 @@ using namespace ::com::sun::star; |* Ctor |* \************************************************************************/ -SdCustomShow::SdCustomShow(SdDrawDocument* pDrawDoc) - : maPages(), - pDoc(pDrawDoc) +SdCustomShow::SdCustomShow() + : maPages() { } @@ -49,12 +48,10 @@ SdCustomShow::SdCustomShow( const SdCustomShow& rShow ) : maPages(rShow.maPages) { aName = rShow.GetName(); - pDoc = rShow.pDoc; } -SdCustomShow::SdCustomShow(SdDrawDocument* pDrawDoc, css::uno::Reference< css::uno::XInterface > const & xShow ) +SdCustomShow::SdCustomShow(css::uno::Reference< css::uno::XInterface > const & xShow ) : maPages(), - pDoc(pDrawDoc), mxUnoCustomShow( xShow ) { } diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 3b22b8c3e897..78b5e274c7cd 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -1305,7 +1305,7 @@ bool ImplSdPPTImport::Import() SdCustomShowList* pList = mpDoc->GetCustomShowList( true ); if ( pList ) { - SdCustomShow* pSdCustomShow = new SdCustomShow( mpDoc ); + SdCustomShow* pSdCustomShow = new SdCustomShow; pSdCustomShow->SetName( aCuShow ); sal_uInt32 nFound = 0; for ( sal_uInt32 nS = 0; nS < nSCount; nS++ ) diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx index c76e60f79a8a..383f403322ed 100644 --- a/sd/source/filter/ppt/propread.cxx +++ b/sd/source/filter/ppt/propread.cxx @@ -23,10 +23,9 @@ #include <osl/diagnose.h> #include <o3tl/make_unique.hxx> -PropEntry::PropEntry( sal_uInt32 nId, const sal_uInt8* pBuf, sal_uInt32 nBufSize, sal_uInt16 nTextEnc ) : +PropEntry::PropEntry( sal_uInt32 nId, const sal_uInt8* pBuf, sal_uInt32 nBufSize ) : mnId ( nId ), mnSize ( nBufSize ), - mnTextEnc ( nTextEnc ), mpBuf ( new sal_uInt8[ nBufSize ] ) { memcpy( static_cast<void*>(mpBuf), static_cast<void const *>(pBuf), nBufSize ); @@ -35,7 +34,6 @@ PropEntry::PropEntry( sal_uInt32 nId, const sal_uInt8* pBuf, sal_uInt32 nBufSize PropEntry::PropEntry( const PropEntry& rProp ) : mnId ( rProp.mnId ), mnSize ( rProp.mnSize ), - mnTextEnc ( rProp.mnTextEnc ), mpBuf ( new sal_uInt8[ mnSize ] ) { memcpy( static_cast<void*>(mpBuf), static_cast<void const *>(rProp.mpBuf), mnSize ); @@ -48,7 +46,6 @@ PropEntry& PropEntry::operator=(const PropEntry& rPropEntry) delete[] mpBuf; mnId = rPropEntry.mnId; mnSize = rPropEntry.mnSize; - mnTextEnc = rPropEntry.mnTextEnc; mpBuf = new sal_uInt8[ mnSize ]; memcpy( static_cast<void*>(mpBuf), static_cast<void const *>(rPropEntry.mpBuf), mnSize ); } @@ -260,15 +257,15 @@ void Section::AddProperty( sal_uInt32 nId, const sal_uInt8* pBuf, sal_uInt32 nBu for ( iter = maEntries.begin(); iter != maEntries.end(); ++iter ) { if ( (*iter)->mnId == nId ) - (*iter).reset(new PropEntry( nId, pBuf, nBufSize, mnTextEnc )); + (*iter).reset(new PropEntry( nId, pBuf, nBufSize )); else if ( (*iter)->mnId > nId ) - maEntries.insert( iter, o3tl::make_unique<PropEntry>( nId, pBuf, nBufSize, mnTextEnc )); + maEntries.insert( iter, o3tl::make_unique<PropEntry>( nId, pBuf, nBufSize )); else continue; return; } - maEntries.push_back( o3tl::make_unique<PropEntry>( nId, pBuf, nBufSize, mnTextEnc ) ); + maEntries.push_back( o3tl::make_unique<PropEntry>( nId, pBuf, nBufSize ) ); } void Section::GetDictionary(Dictionary& rDict) diff --git a/sd/source/filter/ppt/propread.hxx b/sd/source/filter/ppt/propread.hxx index 682076d6e4ed..04c619a4565c 100644 --- a/sd/source/filter/ppt/propread.hxx +++ b/sd/source/filter/ppt/propread.hxx @@ -87,10 +87,9 @@ struct PropEntry { sal_uInt32 mnId; sal_uInt32 mnSize; - sal_uInt16 mnTextEnc; sal_uInt8* mpBuf; - PropEntry( sal_uInt32 nId, const sal_uInt8* pBuf, sal_uInt32 nBufSize, sal_uInt16 nTextEnc ); + PropEntry( sal_uInt32 nId, const sal_uInt8* pBuf, sal_uInt32 nBufSize ); PropEntry( const PropEntry& rProp ); ~PropEntry() { delete[] mpBuf; } ; diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx index 1fce442ae152..8c6673011075 100644 --- a/sd/source/ui/dlg/custsdlg.cxx +++ b/sd/source/ui/dlg/custsdlg.cxx @@ -338,7 +338,7 @@ SdDefineCustomShowDlg::SdDefineCustomShowDlg( vcl::Window* pWindow, } else { - rpCustomShow = new SdCustomShow( &rDoc ); + rpCustomShow = new SdCustomShow; m_pEdtName->SetText( OUString( SdResId( STR_NEW_CUSTOMSHOW ) ) ); m_pEdtName->SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) ); rpCustomShow->SetName( m_pEdtName->GetText() ); diff --git a/sd/source/ui/unoidl/unocpres.cxx b/sd/source/ui/unoidl/unocpres.cxx index c2d7bd5230ea..61cddf6c2929 100644 --- a/sd/source/ui/unoidl/unocpres.cxx +++ b/sd/source/ui/unoidl/unocpres.cxx @@ -108,7 +108,7 @@ void SAL_CALL SdXCustomPresentation::insertByIndex( sal_Int32 Index, const uno:: mpModel = pPage->GetModel(); if( nullptr != mpModel && nullptr == mpSdCustomShow && mpModel->GetDoc() ) - mpSdCustomShow = new SdCustomShow( mpModel->GetDoc() ); + mpSdCustomShow = new SdCustomShow; mpSdCustomShow->PagesVector().insert(mpSdCustomShow->PagesVector().begin() + Index, static_cast<SdPage*>(pPage->GetSdrPage())); @@ -349,7 +349,7 @@ void SAL_CALL SdXCustomPresentationAccess::insertByName( const OUString& aName, SdCustomShow* pShow = pXShow->GetSdCustomShow(); if( nullptr == pShow ) { - pShow = new SdCustomShow( mrModel.GetDoc(), xContainer ); + pShow = new SdCustomShow( xContainer ); pXShow->SetSdCustomShow( pShow ); } else |