summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/impgraph.hxx3
-rw-r--r--vcl/source/gdi/impgraph.cxx16
2 files changed, 12 insertions, 7 deletions
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx
index 4dea38c03874..6b4babd41db8 100644
--- a/vcl/inc/impgraph.hxx
+++ b/vcl/inc/impgraph.hxx
@@ -69,7 +69,8 @@ private:
bool operator==( const ImpGraphic& rImpGraphic ) const;
bool operator!=( const ImpGraphic& rImpGraphic ) const { return !( *this == rImpGraphic ); }
- void ImplClearGraphics( bool bCreateSwapInfo );
+ void ImplCreateSwapInfo();
+ void ImplClearGraphics();
void ImplClear();
GraphicType ImplGetType() const { return meType;}
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;
}
}