summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/frmdescr.cxx
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 /sfx2/source/doc/frmdescr.cxx
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>
Diffstat (limited to 'sfx2/source/doc/frmdescr.cxx')
-rw-r--r--sfx2/source/doc/frmdescr.cxx24
1 files changed, 5 insertions, 19 deletions
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: */