summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-21 20:45:23 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-01-21 20:45:23 +0000
commit761af268383e4e7b62e993b262df012f6e1fb332 (patch)
tree9bcc3c080dd09e77f4e1f421f68db676c78b97c0 /vcl/source
parent56af72b6fa52df8722a6f5b369ec1c2bb39285dd (diff)
coverity#1399156 split ImplCreateSwapInfo and ImplClearGraphics
Change-Id: Iab449967c70a55c03c3e6b95de8e7d973cb68089
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/gdi/impgraph.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 2fba2a6bc167..1a330c3047a8 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -293,14 +293,17 @@ bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const
return bRet;
}
-void ImpGraphic::ImplClearGraphics( bool bCreateSwapInfo )
+void ImpGraphic::ImplCreateSwapInfo()
{
- if( bCreateSwapInfo && !ImplIsSwapOut() )
+ if (!ImplIsSwapOut())
{
maSwapInfo.maPrefMapMode = ImplGetPrefMapMode();
maSwapInfo.maPrefSize = ImplGetPrefSize();
}
+}
+void ImpGraphic::ImplClearGraphics()
+{
maEx.Clear();
maMetaFile.Clear();
@@ -345,12 +348,11 @@ void ImpGraphic::ImplClear()
mbSwapOut = false;
// cleanup
- ImplClearGraphics( false );
+ ImplClearGraphics();
meType = GraphicType::NONE;
mnSizeBytes = 0;
}
-
void ImpGraphic::ImplSetDefaultType()
{
ImplClear();
@@ -1180,7 +1182,8 @@ bool ImpGraphic::ImplSwapOut()
void ImpGraphic::ImplSwapOutAsLink()
{
- ImplClearGraphics( true );
+ ImplCreateSwapInfo();
+ ImplClearGraphics();
mbSwapOut = true;
}
@@ -1198,7 +1201,8 @@ bool ImpGraphic::ImplSwapOut( SvStream* xOStm )
if( !xOStm->GetError() )
{
- ImplClearGraphics( true );
+ ImplCreateSwapInfo();
+ ImplClearGraphics();
bRet = mbSwapOut = true;
}
}