[Libreoffice-commits] core.git: cui/source include/vcl svx/source vcl/source vcl/workben
Caolán McNamara
caolanm at redhat.com
Fri Jan 20 18:56:34 UTC 2017
cui/source/customize/cfg.cxx | 3 ---
include/vcl/image.hxx | 2 +-
svx/source/engine3d/float3d.cxx | 3 +--
vcl/source/window/toolbox2.cxx | 2 --
vcl/workben/outdevgrind.cxx | 2 ++
5 files changed, 4 insertions(+), 8 deletions(-)
New commits:
commit 370613e5917366698d4d9ec078f79f9a48ce8b02
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 20 11:42:31 2017 +0000
warn about unused Images
Change-Id: I5502b28411282354019af51a09c860099c652006
Reviewed-on: https://gerrit.libreoffice.org/33348
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index d411fa8..4a77f42 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -3539,8 +3539,6 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, void )
GetSaveInData()->GetImageManager()->replaceImages(
GetImageType(), aURLSeq, aGraphicSeq );
- Image aImage( newgraphic );
-
m_pContentsListBox->GetModel()->Remove( pActEntry );
SvTreeListEntry* pNewLBEntry =
InsertEntryIntoUI( pEntry, nSelectionPos );
@@ -3595,7 +3593,6 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, void )
GetSaveInData()->GetImageManager()->replaceImages(
GetImageType(), aURLSeq, aGraphicSeq );
- Image aImage( backup );
m_pContentsListBox->GetModel()->Remove( pActEntry );
SvTreeListEntry* pNewLBEntry =
diff --git a/include/vcl/image.hxx b/include/vcl/image.hxx
index 88a0c04..752b900 100644
--- a/include/vcl/image.hxx
+++ b/include/vcl/image.hxx
@@ -50,7 +50,7 @@ namespace vcl
#define IMAGELIST_IMAGE_NOTFOUND ((sal_uInt16)0xFFFF)
-class VCL_DLLPUBLIC Image
+class SAL_WARN_UNUSED VCL_DLLPUBLIC Image
{
friend class ::OutputDevice;
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
index b20b711..6791a73 100644
--- a/svx/source/engine3d/float3d.cxx
+++ b/svx/source/engine3d/float3d.cxx
@@ -1847,8 +1847,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_FOCAL_LENGTH);
-// Lighting
- Image aImg;
+ // Lighting
basegfx::B3DVector aVector;
Color aColor;
const SfxItemSet aLightItemSet(m_pCtlLightPreview->GetSvx3DLightControl().Get3DAttributes());
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 037d228..10cede7 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -972,7 +972,6 @@ void ToolBox::SetItemImage( sal_uInt16 nItemId, const Image& rImage )
static Image ImplRotImage( const Image& rImage, long nAngle10 )
{
- Image aRet;
BitmapEx aRotBitmapEx( rImage.GetBitmapEx() );
aRotBitmapEx.Rotate( nAngle10, Color( COL_WHITE ) );
@@ -1011,7 +1010,6 @@ void ToolBox::SetItemImageAngle( sal_uInt16 nItemId, long nAngle10 )
static Image ImplMirrorImage( const Image& rImage )
{
- Image aRet;
BitmapEx aMirrBitmapEx( rImage.GetBitmapEx() );
aMirrBitmapEx.Mirror( BmpMirrorFlags::Horizontal );
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index 0e0e19d..f4c8c7d 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -138,7 +138,9 @@ void setupMethodStubs( functor_vector_type& res )
const BitmapEx aBitmapExAlpha( aBitmap, aBitmapAlien );
const BitmapEx aBitmapExAlphaAlien( aBitmapAlien, aBitmapAlien );
+#ifdef NEEDS_QUALIY_PARAMTER
const Image aImage( aBitmapEx );
+#endif
const Gradient aGradient(GradientStyle::Elliptical,aBlackColor,aWhiteColor);
const Hatch aHatch(HatchStyle::Triple,aBlackColor,4,450);
const Wallpaper aWallpaper( aWhiteColor );
More information about the Libreoffice-commits
mailing list