diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-15 11:24:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-15 11:30:42 +0200 |
commit | 3b48b3cc92c93911f61535d22a2c8731574ee51a (patch) | |
tree | 2602c98df9d414d803e94bf9f80780d4395b8d8f /sd | |
parent | b79b5e0df6dc5a0ba18054b0503d6fa804b69f02 (diff) |
loplugin:singlevalfields in sc..vcl
Change-Id: I68752a3daf5ddd8581c07759b8be2c1dabbb9258
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/anminfo.hxx | 1 | ||||
-rw-r--r-- | sd/source/core/anminfo.cxx | 4 | ||||
-rw-r--r-- | sd/source/filter/html/htmlex.cxx | 15 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationList.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/func/fuoaprms.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/view/SlsLayouter.cxx | 16 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unoobj.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/DocumentRenderer.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/view/sdview2.cxx | 2 |
11 files changed, 14 insertions, 46 deletions
diff --git a/sd/inc/anminfo.hxx b/sd/inc/anminfo.hxx index 1bce875044fc..11d04fd29e95 100644 --- a/sd/inc/anminfo.hxx +++ b/sd/inc/anminfo.hxx @@ -49,7 +49,6 @@ public: OUString maSoundFile; ///< Path to the sound file in MS DOS notation bool mbSoundOn; ///< Sound on / off bool mbPlayFull; ///< play sound completely. - SdrPathObj* mpPathObj; ///< The path object css::presentation::ClickAction meClickAction; ///< Action at mouse click css::presentation::AnimationEffect meSecondEffect; ///< for object fading. css::presentation::AnimationSpeed meSecondSpeed; ///< for object fading. diff --git a/sd/source/core/anminfo.cxx b/sd/source/core/anminfo.cxx index f0b5f10bd7f4..1783bec9eae8 100644 --- a/sd/source/core/anminfo.cxx +++ b/sd/source/core/anminfo.cxx @@ -45,7 +45,6 @@ SdAnimationInfo::SdAnimationInfo(SdrObject& rObject) mbDimHide (false), mbSoundOn (false), mbPlayFull (false), - mpPathObj (nullptr), meClickAction (presentation::ClickAction_NONE), meSecondEffect (presentation::AnimationEffect_NONE), meSecondSpeed (presentation::AnimationSpeed_SLOW), @@ -60,7 +59,7 @@ SdAnimationInfo::SdAnimationInfo(SdrObject& rObject) SdAnimationInfo::SdAnimationInfo(const SdAnimationInfo& rAnmInfo, SdrObject& rObject) : SdrObjUserData (rAnmInfo), - mePresObjKind (PRESOBJ_NONE), + mePresObjKind (PRESOBJ_NONE), meEffect (rAnmInfo.meEffect), meTextEffect (rAnmInfo.meTextEffect), meSpeed (rAnmInfo.meSpeed), @@ -73,7 +72,6 @@ SdAnimationInfo::SdAnimationInfo(const SdAnimationInfo& rAnmInfo, SdrObject& rOb maSoundFile (rAnmInfo.maSoundFile), mbSoundOn (rAnmInfo.mbSoundOn), mbPlayFull (rAnmInfo.mbPlayFull), - mpPathObj (nullptr), meClickAction (rAnmInfo.meClickAction), meSecondEffect (rAnmInfo.meSecondEffect), meSecondSpeed (rAnmInfo.meSecondSpeed), diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 917c3e5c7896..e495a5f1a220 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -130,7 +130,6 @@ class EasyFile { private: SvStream* pOStm; - SfxMedium* pMedium; bool bOpen; public: @@ -3139,7 +3138,6 @@ OUString HtmlExport::GetButtonName( int nButton ) EasyFile::EasyFile() { - pMedium = nullptr; pOStm = nullptr; bOpen = false; } @@ -3179,7 +3177,6 @@ sal_uLong EasyFile::createStream( const OUString& rUrl, SvStream* &rpStr ) if( nErr != 0 ) { bOpen = false; - delete pMedium; delete pOStm; pOStm = nullptr; } @@ -3222,18 +3219,6 @@ sal_uLong EasyFile::close() bOpen = false; - if( pMedium ) - { - // transmitted - pMedium->Close(); - pMedium->Commit(); - - nErr = pMedium->GetError(); - - delete pMedium; - pMedium = nullptr; - } - return nErr; } diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index b15f0b9bbc16..2cbac3ec54cd 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -216,8 +216,8 @@ private: OUString msEffectName; CustomAnimationEffectPtr mpEffect; const CustomAnimationPresets* mpCustomAnimationPresets; - const long nIconWidth = 19; - const long nItemMinHeight = 38; + static const long nIconWidth = 19; + static const long nItemMinHeight = 38; }; CustomAnimationListEntryItem::CustomAnimationListEntryItem( const OUString& aDescription, const CustomAnimationEffectPtr& pEffect, CustomAnimationList* pParent ) @@ -384,7 +384,7 @@ public: private: OUString msDescription; - const long nIconWidth = 19; + static const long nIconWidth = 19; }; CustomAnimationTriggerEntryItem::CustomAnimationTriggerEntryItem( const OUString& aDescription ) diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx index 7c21c3944d49..e5ef8a46f744 100644 --- a/sd/source/ui/func/fuoaprms.cxx +++ b/sd/source/ui/func/fuoaprms.cxx @@ -729,7 +729,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) pAction->SetSoundOn(pInfo->mbSoundOn, bSoundOn); pAction->SetSound(pInfo->maSoundFile, aSound); pAction->SetPlayFull(pInfo->mbPlayFull, bPlayFull); - pAction->SetPathObj(pInfo->mpPathObj, pPath); + pAction->SetPathObj(nullptr, pPath); pAction->SetClickAction(pInfo->meClickAction, eClickAction); pAction->SetBookmark(pInfo->GetBookmark(), aBookmark); pAction->SetVerb(pInfo->mnVerb, (sal_uInt16)pInfo->GetBookmark().toInt32() ); diff --git a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx index d0c0c2096ff5..9b7f551e57f0 100644 --- a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx +++ b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx @@ -180,8 +180,7 @@ std::shared_ptr<PageCacheManager> PageCacheManager::Instance() PageCacheManager::PageCacheManager() : mpPageCaches(new PageCacheContainer()), - mpRecentlyUsedPageCaches(new RecentlyUsedPageCaches()), - mnMaximalRecentlyCacheCount(2) + mpRecentlyUsedPageCaches(new RecentlyUsedPageCaches()) { } diff --git a/sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx b/sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx index 91e289c37f15..4d3efe48565b 100644 --- a/sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx +++ b/sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx @@ -122,7 +122,7 @@ private: they have become inactive, i.e. after they are not used anymore by a slide sorter. */ - const sal_uInt32 mnMaximalRecentlyCacheCount; + static const sal_uInt32 mnMaximalRecentlyCacheCount = 2; PageCacheManager(); ~PageCacheManager(); diff --git a/sd/source/ui/slidesorter/view/SlsLayouter.cxx b/sd/source/ui/slidesorter/view/SlsLayouter.cxx index cc8380e690f4..05ca714e6fa9 100644 --- a/sd/source/ui/slidesorter/view/SlsLayouter.cxx +++ b/sd/source/ui/slidesorter/view/SlsLayouter.cxx @@ -30,10 +30,10 @@ class Layouter::Implementation { public: VclPtr<sd::Window> mpWindow; - sal_Int32 mnRequestedLeftBorder; - sal_Int32 mnRequestedRightBorder; - sal_Int32 mnRequestedTopBorder; - sal_Int32 mnRequestedBottomBorder; + static const sal_Int32 mnRequestedLeftBorder = 5; + static const sal_Int32 mnRequestedRightBorder = 5; + static const sal_Int32 mnRequestedTopBorder = 5; + static const sal_Int32 mnRequestedBottomBorder = 5; sal_Int32 mnLeftBorder; sal_Int32 mnRightBorder; sal_Int32 mnTopBorder; @@ -430,10 +430,6 @@ Layouter::Implementation::Implementation ( sd::Window *pWindow, const std::shared_ptr<view::Theme>& rpTheme) : mpWindow(pWindow), - mnRequestedLeftBorder(5), - mnRequestedRightBorder(5), - mnRequestedTopBorder(5), - mnRequestedBottomBorder(5), mnLeftBorder(5), mnRightBorder(5), mnTopBorder(5), @@ -458,10 +454,6 @@ Layouter::Implementation::Implementation ( Layouter::Implementation::Implementation (const Implementation& rImplementation) : mpWindow(rImplementation.mpWindow), - mnRequestedLeftBorder(rImplementation.mnRequestedLeftBorder), - mnRequestedRightBorder(rImplementation.mnRequestedRightBorder), - mnRequestedTopBorder(rImplementation.mnRequestedTopBorder), - mnRequestedBottomBorder(rImplementation.mnRequestedBottomBorder), mnLeftBorder(rImplementation.mnLeftBorder), mnRightBorder(rImplementation.mnRightBorder), mnTopBorder(rImplementation.mnTopBorder), diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index 4d49bb3eeaad..d49a4a4560b4 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -797,10 +797,6 @@ css::uno::Any SAL_CALL SdXShape::getPropertyValue( const OUString& PropertyName case WID_STYLE: aRet = GetStyleSheet(); break; - case WID_ANIMPATH: - if( pInfo && pInfo->mpPathObj ) - aRet <<= pInfo->mpPathObj->getUnoShape(); - break; case WID_IMAGEMAP: { uno::Reference< uno::XInterface > xImageMap; diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 6c81a615a3e1..86aa5e15cf19 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -789,8 +789,7 @@ namespace { const sal_uInt16 nPaperTray) : PrinterPage(ePageKind, MapMode(), bPrintMarkedOnly, rsPageString, rPageStringOffset, nDrawMode, eOrientation, nPaperTray), - mnPageIndex(nPageIndex), - mnGap(500) + mnPageIndex(nPageIndex) { } @@ -850,7 +849,7 @@ namespace { private: const sal_uInt16 mnPageIndex; - const sal_Int32 mnGap; + static const sal_Int32 mnGap = 500; }; /** Print two slides to one printer page so that the resulting pages diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index a3a615d728f3..8c178c2dec9a 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -765,7 +765,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, pAction->SetSoundOn(pInfo->mbSoundOn, pInfo->mbSoundOn); pAction->SetSound(pInfo->maSoundFile, pInfo->maSoundFile); pAction->SetPlayFull(pInfo->mbPlayFull, pInfo->mbPlayFull); - pAction->SetPathObj(pInfo->mpPathObj, pInfo->mpPathObj); + pAction->SetPathObj(nullptr, nullptr); pAction->SetClickAction(pInfo->meClickAction, eClickAction); pAction->SetBookmark(pInfo->GetBookmark(), aBookmark); pAction->SetVerb(pInfo->mnVerb, pInfo->mnVerb); |