summaryrefslogtreecommitdiff
path: root/goodies/source/graphic
diff options
context:
space:
mode:
authorKai Ahrens <ka@openoffice.org>2002-08-01 09:00:27 +0000
committerKai Ahrens <ka@openoffice.org>2002-08-01 09:00:27 +0000
commit44084ecab5a2692c6b76ca365050437b6ce4c36b (patch)
tree7e37f95fd90cdaff0ba8ad34a7e3f16717f4bb00 /goodies/source/graphic
parente965905dbcfa0595e34dcdedcd6e26a7c781025c (diff)
#101737#: don't set reset drawmode for metafile playing
Diffstat (limited to 'goodies/source/graphic')
-rw-r--r--goodies/source/graphic/grfmgr.cxx22
1 files changed, 14 insertions, 8 deletions
diff --git a/goodies/source/graphic/grfmgr.cxx b/goodies/source/graphic/grfmgr.cxx
index 511a5d7aa520..1ee23712176c 100644
--- a/goodies/source/graphic/grfmgr.cxx
+++ b/goodies/source/graphic/grfmgr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: grfmgr.cxx,v $
*
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: ka $ $Date: 2002-07-30 12:58:11 $
+ * last change: $Author: ka $ $Date: 2002-08-01 10:00:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -663,12 +663,16 @@ List* GraphicObject::GetAnimationInfoList() const
BOOL GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicAttr* pAttr, ULONG nFlags )
{
- GraphicAttr aAttr( pAttr ? *pAttr : GetAttr() );
- Point aPt( rPt );
- Size aSz( rSz );
- BOOL bCropped = aAttr.IsCropped();
- BOOL bCached = FALSE;
- BOOL bRet;
+ GraphicAttr aAttr( pAttr ? *pAttr : GetAttr() );
+ Point aPt( rPt );
+ Size aSz( rSz );
+ const sal_uInt32 nOldDrawMode = pOut->GetDrawMode();
+ BOOL bCropped = aAttr.IsCropped();
+ BOOL bCached = FALSE;
+ BOOL bRet;
+
+ if( !( GRFMGR_DRAW_USE_DRAWMODE_SETTINGS & nFlags ) )
+ pOut->SetDrawMode( nOldDrawMode & ( ~( DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT ) ) );
// mirrored horizontically
if( aSz.Width() < 0L )
@@ -716,6 +720,8 @@ BOOL GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
if( bCropped )
pOut->Pop();
+ pOut->SetDrawMode( nOldDrawMode );
+
return bRet;
}