summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-03 15:58:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-04 08:36:11 +0200
commitfb0644e8f0a944c10b654233813ab40792e78e0a (patch)
tree411696fe0ee42747fb0c131a6ff80ff3d16e48a6
parentb3499a00fc7c1ce3393577c592b9ac6771d2a922 (diff)
loplugin:unusedfields in sfx2
Change-Id: I9f57545ca4ee5159a095f9b35267d298ccc7fb4e Reviewed-on: https://gerrit.libreoffice.org/39476 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--compilerplugins/clang/unusedfields.writeonly.results10
-rw-r--r--cui/source/dialogs/linkdlg.cxx2
-rw-r--r--include/sfx2/frmdescr.hxx7
-rw-r--r--include/sfx2/lnkbase.hxx3
-rw-r--r--sfx2/source/appl/lnkbase2.cxx6
-rw-r--r--sfx2/source/appl/workwin.cxx1
-rw-r--r--sfx2/source/bastyp/frmhtml.cxx10
-rw-r--r--sfx2/source/doc/frmdescr.cxx24
-rw-r--r--sfx2/source/inc/workwin.hxx4
-rw-r--r--sfx2/source/sidebar/DeckLayouter.cxx4
10 files changed, 10 insertions, 61 deletions
diff --git a/compilerplugins/clang/unusedfields.writeonly.results b/compilerplugins/clang/unusedfields.writeonly.results
index 3accc97043e6..aa9677d52c55 100644
--- a/compilerplugins/clang/unusedfields.writeonly.results
+++ b/compilerplugins/clang/unusedfields.writeonly.results
@@ -1210,10 +1210,6 @@ include/opencl/platforminfo.hxx:30
OpenCLDeviceInfo mnComputeUnits size_t
include/opencl/platforminfo.hxx:31
OpenCLDeviceInfo mnFrequency size_t
-include/sfx2/frmdescr.hxx:69
- SfxFrameDescriptor bResizeVertical _Bool
-include/sfx2/lnkbase.hxx:79
- sfx2::SvBaseLink bUseCache _Bool
include/sfx2/msg.hxx:117
SfxType0 createSfxPoolItemFunc std::function<SfxPoolItem *(void)>
include/sfx2/msg.hxx:119
@@ -2814,8 +2810,6 @@ sfx2/source/doc/doctempl.cxx:118
DocTempl::DocTempl_EntryData_Impl mxObjShell class SfxObjectShellLock
sfx2/source/doc/docundomanager.cxx:198
sfx2::UndoManagerGuard m_guard class SfxModelGuard
-sfx2/source/doc/frmdescr.cxx:29
- SfxFrameDescriptor_Impl pWallpaper class Wallpaper *
sfx2/source/inc/appdata.hxx:76
SfxAppData_Impl pDocTopics SfxDdeDocTopics_Impl *
sfx2/source/inc/appdata.hxx:77
@@ -2830,10 +2824,6 @@ sfx2/source/inc/appdata.hxx:93
SfxAppData_Impl m_pSbxErrorHdl class SfxErrorHandler *
sfx2/source/inc/docundomanager.hxx:92
SfxModelGuard m_aGuard class SolarMutexResettableGuard
-sfx2/source/inc/workwin.hxx:52
- SfxObjectBar_Impl pIFace class SfxInterface *
-sfx2/source/sidebar/DeckLayouter.cxx:50
- sfx2::sidebar::(anonymous namespace)::LayoutItem mnPanelIndex sal_Int32
sfx2/source/view/classificationcontroller.cxx:59
sfx2::ClassificationCategoriesController m_aPropertyListener class sfx2::ClassificationPropertyListener
slideshow/source/engine/opengl/TransitionImpl.hxx:296
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index bcbc7919d9dd..50d6bd047ca2 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -303,9 +303,7 @@ IMPL_LINK_NOARG(SvBaseLinksDlg, UpdateNowClickHdl, Button*, void)
for(const auto & i : pLinkMgr->GetLinks())
if( xLink == i )
{
- xLink->SetUseCache( false );
SetType( *xLink, aPosArr[ n ], xLink->GetUpdateMode() );
- xLink->SetUseCache( true );
break;
}
}
diff --git a/include/sfx2/frmdescr.hxx b/include/sfx2/frmdescr.hxx
index eab02e3b3f62..8433afa93887 100644
--- a/include/sfx2/frmdescr.hxx
+++ b/include/sfx2/frmdescr.hxx
@@ -66,7 +66,6 @@ class SFX2_DLLPUBLIC SfxFrameDescriptor
ScrollingMode eScroll;
bool bHasBorder;
bool bHasBorderSet;
- bool bResizeVertical;
std::unique_ptr< SfxFrameDescriptor_Impl > pImpl;
public:
@@ -80,10 +79,6 @@ public:
void SetURL( const OUString& rURL );
void SetActualURL( const OUString& rURL );
- // Size
- void SetResizable( bool bRes )
- { bResizeVertical = bRes; }
-
// FrameName
const OUString& GetName() const
{ return aName; }
@@ -100,8 +95,6 @@ public:
void SetScrollingMode( ScrollingMode eMode )
{ eScroll = eMode; }
- void SetWallpaper( const Wallpaper& rWallpaper );
-
// FrameBorder
bool HasFrameBorder() const
{ return bHasBorder; }
diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx
index 339c8032ccb8..eaeebe466f40 100644
--- a/include/sfx2/lnkbase.hxx
+++ b/include/sfx2/lnkbase.hxx
@@ -76,7 +76,6 @@ private:
sal_uInt16 nObjType;
bool bVisible : 1;
bool bSynchron : 1;
- bool bUseCache : 1; // for Graphics Links!
bool bWasLastEditOK : 1;
DECL_LINK( EndEditHdl, const OUString&, void );
@@ -154,8 +153,6 @@ public:
bool IsSynchron() const { return bSynchron; }
void SetSynchron( bool bFlag ) { bSynchron = bFlag; }
- void SetUseCache( bool bFlag ) { bUseCache = bFlag; }
-
void setStreamToLoadFrom(
const css::uno::Reference<css::io::XInputStream>& xInputStream,
bool bIsReadOnly )
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index d3aa40b38090..c4bd1ac7382c 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -126,7 +126,7 @@ SvBaseLink::SvBaseLink()
{
nObjType = OBJECT_CLIENT_SO;
pImplData = new ImplBaseLinkData;
- bVisible = bSynchron = bUseCache = true;
+ bVisible = bSynchron = true;
bWasLastEditOK = false;
}
@@ -137,7 +137,7 @@ SvBaseLink::SvBaseLink( SfxLinkUpdateMode nUpdateMode, SotClipboardFormatId nCon
{
nObjType = OBJECT_CLIENT_SO;
pImplData = new ImplBaseLinkData;
- bVisible = bSynchron = bUseCache = true;
+ bVisible = bSynchron = true;
bWasLastEditOK = false;
// It is going to be a Ole-Link,
@@ -184,7 +184,7 @@ SvBaseLink::SvBaseLink( const OUString& rLinkName, sal_uInt16 nObjectType, SvLin
: pImpl()
, m_bIsReadOnly(false)
{
- bVisible = bSynchron = bUseCache = true;
+ bVisible = bSynchron = true;
bWasLastEditOK = false;
aLinkName = rLinkName;
pImplData = new ImplBaseLinkData;
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 8e662c6f44b2..9bab15397683 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -1000,7 +1000,6 @@ void SfxWorkWindow::SetObjectBar_Impl(sal_uInt16 nPos, SfxVisibilityFlags nFlags
}
SfxObjectBar_Impl aObjBar;
- aObjBar.pIFace = pIFace;
aObjBar.eId = eId;
aObjBar.nPos = nPos;
aObjBar.nMode = nFlags;
diff --git a/sfx2/source/bastyp/frmhtml.cxx b/sfx2/source/bastyp/frmhtml.cxx
index 094a616b45e2..f49cbd8e0b5f 100644
--- a/sfx2/source/bastyp/frmhtml.cxx
+++ b/sfx2/source/bastyp/frmhtml.cxx
@@ -60,13 +60,6 @@ void SfxFrameHTMLParser::ParseFrameOptions(
{
switch( rOption.GetToken() )
{
- case HtmlOptionId::BORDERCOLOR:
- {
- Color aColor;
- rOption.GetColor( aColor );
- pFrame->SetWallpaper( Wallpaper( aColor ) );
- break;
- }
case HtmlOptionId::SRC:
pFrame->SetURL(
INetURLObject::GetAbsURL(
@@ -102,9 +95,6 @@ void SfxFrameHTMLParser::ParseFrameOptions(
pFrame->SetFrameBorder( bBorder );
break;
}
- case HtmlOptionId::NORESIZE:
- pFrame->SetResizable( false );
- break;
default:
break;
}
diff --git a/sfx2/source/doc/frmdescr.cxx b/sfx2/source/doc/frmdescr.cxx
index bf5685bf5b08..143c8742b2f4 100644
--- a/sfx2/source/doc/frmdescr.cxx
+++ b/sfx2/source/doc/frmdescr.cxx
@@ -23,18 +23,13 @@
#include <sfx2/frmdescr.hxx>
#include <sfx2/app.hxx>
+#include <memory>
struct SfxFrameDescriptor_Impl
{
- Wallpaper* pWallpaper;
- SfxItemSet* pArgs;
+ std::unique_ptr<SfxItemSet> pArgs;
- SfxFrameDescriptor_Impl() : pWallpaper( nullptr ), pArgs( nullptr ) {}
- ~SfxFrameDescriptor_Impl()
- {
- delete pWallpaper;
- delete pArgs;
- }
+ SfxFrameDescriptor_Impl() {}
};
SfxFrameDescriptor::SfxFrameDescriptor() :
@@ -42,7 +37,6 @@ SfxFrameDescriptor::SfxFrameDescriptor() :
eScroll( ScrollingMode::Auto ),
bHasBorder( true ),
bHasBorderSet( false ),
- bResizeVertical( true ),
pImpl( new SfxFrameDescriptor_Impl )
{
}
@@ -54,8 +48,8 @@ SfxFrameDescriptor::~SfxFrameDescriptor()
SfxItemSet* SfxFrameDescriptor::GetArgs()
{
if( !pImpl->pArgs )
- pImpl->pArgs = new SfxAllItemSet( SfxGetpApp()->GetPool() );
- return pImpl->pArgs;
+ pImpl->pArgs.reset( new SfxAllItemSet( SfxGetpApp()->GetPool() ) );
+ return pImpl->pArgs.get();
}
void SfxFrameDescriptor::SetURL( const OUString& rURL )
@@ -71,12 +65,4 @@ void SfxFrameDescriptor::SetActualURL( const OUString& rURL )
pImpl->pArgs->ClearItem();
}
-void SfxFrameDescriptor::SetWallpaper( const Wallpaper& rWallpaper )
-{
- DELETEZ( pImpl->pWallpaper );
-
- if ( rWallpaper.GetStyle() != WallpaperStyle::NONE )
- pImpl->pWallpaper = new Wallpaper( rWallpaper );
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index 7eb7e8a649e7..6f1eb124f1b2 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -49,14 +49,12 @@ struct SfxObjectBar_Impl
SfxVisibilityFlags nMode; // special visibility flags
sal_uInt16 nPos;
bool bDestroy;
- SfxInterface* pIFace;
SfxObjectBar_Impl() :
eId(ToolbarId::None),
nMode(SfxVisibilityFlags::Invisible),
nPos(0),
- bDestroy(false),
- pIFace(nullptr)
+ bDestroy(false)
{}
};
diff --git a/sfx2/source/sidebar/DeckLayouter.cxx b/sfx2/source/sidebar/DeckLayouter.cxx
index 5a37474148c5..b0d177ec7406 100644
--- a/sfx2/source/sidebar/DeckLayouter.cxx
+++ b/sfx2/source/sidebar/DeckLayouter.cxx
@@ -47,11 +47,10 @@ namespace {
css::ui::LayoutSize maLayoutSize;
sal_Int32 mnDistributedHeight;
sal_Int32 mnWeight;
- sal_Int32 mnPanelIndex;
bool mbShowTitleBar;
LayoutItem()
- : mpPanel(),maLayoutSize(0,0,0),mnDistributedHeight(0),mnWeight(0),mnPanelIndex(0),mbShowTitleBar(true)
+ : mpPanel(),maLayoutSize(0,0,0),mnDistributedHeight(0),mnWeight(0),mbShowTitleBar(true)
{}
};
tools::Rectangle LayoutPanels (
@@ -115,7 +114,6 @@ void DeckLayouter::LayoutDeck (
for (sal_Int32 nIndex(0),nCount(rPanels.size()); nIndex<nCount; ++nIndex)
{
aLayoutItems[nIndex].mpPanel = rPanels[nIndex];
- aLayoutItems[nIndex].mnPanelIndex = nIndex;
}
aBox = LayoutPanels(
aBox,