summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2013-11-19 11:36:23 +0100
committerJan Holesovsky <kendy@collabora.com>2013-11-25 14:10:45 +0100
commit5854f6c4e1fe0ddb64f74722222b2ddbceaad9d0 (patch)
tree11b1b2a9b011d9f31f34ddd5198521ea19d06fc6 /vcl
parent6f6b12cb246c9eaeb7a4b835ce5e15dc7ab48646 (diff)
EMF: More useful debugging output.
Change-Id: I2aa0e97878db62275d794be43a7d351e5ae25f1c
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/wmf/enhwmf.cxx102
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx34
-rw-r--r--vcl/source/filter/wmf/winmtf.hxx14
3 files changed, 51 insertions, 99 deletions
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 2e790811a638..3ad448193a58 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -1378,57 +1378,57 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
}
break;
- default : WinMtfAssertHandler( "Unknown Meta Action" ); break;
- case EMR_MASKBLT : WinMtfAssertHandler( "MaskBlt" ); break;
- case EMR_PLGBLT : WinMtfAssertHandler( "PlgBlt" ); break;
- case EMR_SETDIBITSTODEVICE : WinMtfAssertHandler( "SetDIBitsToDevice" ); break;
- case EMR_FRAMERGN : WinMtfAssertHandler( "FrameRgn" ); break;
- case EMR_INVERTRGN : WinMtfAssertHandler( "InvertRgn" ); break;
- case EMR_PAINTRGN : WinMtfAssertHandler( "PaintRgn" ); break;
- case EMR_FLATTENPATH : WinMtfAssertHandler( "FlattenPath" ); break;
- case EMR_WIDENPATH : WinMtfAssertHandler( "WidenPath" ); break;
- case EMR_POLYDRAW : WinMtfAssertHandler( "Polydraw" ); break;
- case EMR_SETARCDIRECTION : WinMtfAssertHandler( "SetArcDirection" ); break;
- case EMR_SETPALETTEENTRIES : WinMtfAssertHandler( "SetPaletteEntries" ); break;
- case EMR_RESIZEPALETTE : WinMtfAssertHandler( "ResizePalette" ); break;
- case EMR_EXTFLOODFILL : WinMtfAssertHandler( "ExtFloodFill" ); break;
- case EMR_ANGLEARC : WinMtfAssertHandler( "AngleArc" ); break;
- case EMR_SETCOLORADJUSTMENT : WinMtfAssertHandler( "SetColorAdjustment" ); break;
- case EMR_POLYDRAW16 : WinMtfAssertHandler( "PolyDraw16" ); break;
- case EMR_POLYTEXTOUTA : WinMtfAssertHandler( "PolyTextOutA" ); break;
- case EMR_POLYTEXTOUTW : WinMtfAssertHandler( "PolyTextOutW" ); break;
- case EMR_CREATECOLORSPACE : WinMtfAssertHandler( "CreateColorSpace" ); break;
- case EMR_SETCOLORSPACE : WinMtfAssertHandler( "SetColorSpace" ); break;
- case EMR_DELETECOLORSPACE : WinMtfAssertHandler( "DeleteColorSpace" ); break;
- case EMR_GLSRECORD : WinMtfAssertHandler( "GlsRecord" ); break;
- case EMR_GLSBOUNDEDRECORD : WinMtfAssertHandler( "GlsBoundRecord" ); break;
- case EMR_PIXELFORMAT : WinMtfAssertHandler( "PixelFormat" ); break;
- case EMR_DRAWESCAPE : WinMtfAssertHandler( "DrawEscape" ); break;
- case EMR_EXTESCAPE : WinMtfAssertHandler( "ExtEscape" ); break;
- case EMR_STARTDOC : WinMtfAssertHandler( "StartDoc" ); break;
- case EMR_SMALLTEXTOUT : WinMtfAssertHandler( "SmallTextOut" ); break;
- case EMR_FORCEUFIMAPPING : WinMtfAssertHandler( "ForceUFIMapping" ); break;
- case EMR_NAMEDESCAPE : WinMtfAssertHandler( "NamedEscape" ); break;
- case EMR_COLORCORRECTPALETTE : WinMtfAssertHandler( "ColorCorrectPalette" ); break;
- case EMR_SETICMPROFILEA : WinMtfAssertHandler( "SetICMProfileA" ); break;
- case EMR_SETICMPROFILEW : WinMtfAssertHandler( "SetICMProfileW" ); break;
- case EMR_TRANSPARENTBLT : WinMtfAssertHandler( "TransparenBlt" ); break;
- case EMR_TRANSPARENTDIB : WinMtfAssertHandler( "TransparenDib" ); break;
- case EMR_GRADIENTFILL : WinMtfAssertHandler( "GradientFill" ); break;
- case EMR_SETLINKEDUFIS : WinMtfAssertHandler( "SetLinkedUFIS" ); break;
-
- case EMR_SETMAPPERFLAGS : WinMtfAssertHandler( "SetMapperFlags", 0 ); break;
- case EMR_SETICMMODE : WinMtfAssertHandler( "SetICMMode", 0 ); break;
- case EMR_CREATEMONOBRUSH : WinMtfAssertHandler( "CreateMonoBrush", 0 ); break;
- case EMR_SETBRUSHORGEX : WinMtfAssertHandler( "SetBrushOrgEx", 0 ); break;
- case EMR_SETMETARGN : WinMtfAssertHandler( "SetMetArgn", 0 ); break;
- case EMR_SETMITERLIMIT : WinMtfAssertHandler( "SetMiterLimit", 0 ); break;
- case EMR_EXCLUDECLIPRECT : WinMtfAssertHandler( "ExcludeClipRect", 0 ); break;
- case EMR_REALIZEPALETTE : WinMtfAssertHandler( "RealizePalette", 0 ); break;
- case EMR_SELECTPALETTE : WinMtfAssertHandler( "SelectPalette", 0 ); break;
- case EMR_CREATEPALETTE : WinMtfAssertHandler( "CreatePalette", 0 ); break;
- case EMR_ALPHADIBBLEND : WinMtfAssertHandler( "AlphaDibBlend", 0 ); break;
- case EMR_SETTEXTJUSTIFICATION : WinMtfAssertHandler( "SetTextJustification", 0 ); break;
+ default : SAL_INFO("vcl.emf", "Unknown Meta Action"); break;
+ case EMR_MASKBLT : SAL_INFO("vcl.emf", "not implemented '" << "MaskBlt" << "'"); break;
+ case EMR_PLGBLT : SAL_INFO("vcl.emf", "not implemented '" << "PlgBlt" << "'"); break;
+ case EMR_SETDIBITSTODEVICE : SAL_INFO("vcl.emf", "not implemented '" << "SetDIBitsToDevice" << "'"); break;
+ case EMR_FRAMERGN : SAL_INFO("vcl.emf", "not implemented '" << "FrameRgn" << "'"); break;
+ case EMR_INVERTRGN : SAL_INFO("vcl.emf", "not implemented '" << "InvertRgn" << "'"); break;
+ case EMR_PAINTRGN : SAL_INFO("vcl.emf", "not implemented '" << "PaintRgn" << "'"); break;
+ case EMR_FLATTENPATH : SAL_INFO("vcl.emf", "not implemented '" << "FlattenPath" << "'"); break;
+ case EMR_WIDENPATH : SAL_INFO("vcl.emf", "not implemented '" << "WidenPath" << "'"); break;
+ case EMR_POLYDRAW : SAL_INFO("vcl.emf", "not implemented '" << "Polydraw" << "'"); break;
+ case EMR_SETARCDIRECTION : SAL_INFO("vcl.emf", "not implemented '" << "SetArcDirection" << "'"); break;
+ case EMR_SETPALETTEENTRIES : SAL_INFO("vcl.emf", "not implemented '" << "SetPaletteEntries" << "'"); break;
+ case EMR_RESIZEPALETTE : SAL_INFO("vcl.emf", "not implemented '" << "ResizePalette" << "'"); break;
+ case EMR_EXTFLOODFILL : SAL_INFO("vcl.emf", "not implemented '" << "ExtFloodFill" << "'"); break;
+ case EMR_ANGLEARC : SAL_INFO("vcl.emf", "not implemented '" << "AngleArc" << "'"); break;
+ case EMR_SETCOLORADJUSTMENT : SAL_INFO("vcl.emf", "not implemented '" << "SetColorAdjustment" << "'"); break;
+ case EMR_POLYDRAW16 : SAL_INFO("vcl.emf", "not implemented '" << "PolyDraw16" << "'"); break;
+ case EMR_POLYTEXTOUTA : SAL_INFO("vcl.emf", "not implemented '" << "PolyTextOutA" << "'"); break;
+ case EMR_POLYTEXTOUTW : SAL_INFO("vcl.emf", "not implemented '" << "PolyTextOutW" << "'"); break;
+ case EMR_CREATECOLORSPACE : SAL_INFO("vcl.emf", "not implemented '" << "CreateColorSpace" << "'"); break;
+ case EMR_SETCOLORSPACE : SAL_INFO("vcl.emf", "not implemented '" << "SetColorSpace" << "'"); break;
+ case EMR_DELETECOLORSPACE : SAL_INFO("vcl.emf", "not implemented '" << "DeleteColorSpace" << "'"); break;
+ case EMR_GLSRECORD : SAL_INFO("vcl.emf", "not implemented '" << "GlsRecord" << "'"); break;
+ case EMR_GLSBOUNDEDRECORD : SAL_INFO("vcl.emf", "not implemented '" << "GlsBoundRecord" << "'"); break;
+ case EMR_PIXELFORMAT : SAL_INFO("vcl.emf", "not implemented '" << "PixelFormat" << "'"); break;
+ case EMR_DRAWESCAPE : SAL_INFO("vcl.emf", "not implemented '" << "DrawEscape" << "'"); break;
+ case EMR_EXTESCAPE : SAL_INFO("vcl.emf", "not implemented '" << "ExtEscape" << "'"); break;
+ case EMR_STARTDOC : SAL_INFO("vcl.emf", "not implemented '" << "StartDoc" << "'"); break;
+ case EMR_SMALLTEXTOUT : SAL_INFO("vcl.emf", "not implemented '" << "SmallTextOut" << "'"); break;
+ case EMR_FORCEUFIMAPPING : SAL_INFO("vcl.emf", "not implemented '" << "ForceUFIMapping" << "'"); break;
+ case EMR_NAMEDESCAPE : SAL_INFO("vcl.emf", "not implemented '" << "NamedEscape" << "'"); break;
+ case EMR_COLORCORRECTPALETTE : SAL_INFO("vcl.emf", "not implemented '" << "ColorCorrectPalette" << "'"); break;
+ case EMR_SETICMPROFILEA : SAL_INFO("vcl.emf", "not implemented '" << "SetICMProfileA" << "'"); break;
+ case EMR_SETICMPROFILEW : SAL_INFO("vcl.emf", "not implemented '" << "SetICMProfileW" << "'"); break;
+ case EMR_TRANSPARENTBLT : SAL_INFO("vcl.emf", "not implemented '" << "TransparenBlt" << "'"); break;
+ case EMR_TRANSPARENTDIB : SAL_INFO("vcl.emf", "not implemented '" << "TransparenDib" << "'"); break;
+ case EMR_GRADIENTFILL : SAL_INFO("vcl.emf", "not implemented '" << "GradientFill" << "'"); break;
+ case EMR_SETLINKEDUFIS : SAL_INFO("vcl.emf", "not implemented '" << "SetLinkedUFIS" << "'"); break;
+
+ case EMR_SETMAPPERFLAGS : SAL_INFO("vcl.emf", "not implemented '" << "SetMapperFlags" << "'"); break;
+ case EMR_SETICMMODE : SAL_INFO("vcl.emf", "not implemented '" << "SetICMMode" << "'"); break;
+ case EMR_CREATEMONOBRUSH : SAL_INFO("vcl.emf", "not implemented '" << "CreateMonoBrush" << "'"); break;
+ case EMR_SETBRUSHORGEX : SAL_INFO("vcl.emf", "not implemented '" << "SetBrushOrgEx" << "'"); break;
+ case EMR_SETMETARGN : SAL_INFO("vcl.emf", "not implemented '" << "SetMetArgn" << "'"); break;
+ case EMR_SETMITERLIMIT : SAL_INFO("vcl.emf", "not implemented '" << "SetMiterLimit" << "'"); break;
+ case EMR_EXCLUDECLIPRECT : SAL_INFO("vcl.emf", "not implemented '" << "ExcludeClipRect" << "'"); break;
+ case EMR_REALIZEPALETTE : SAL_INFO("vcl.emf", "not implemented '" << "RealizePalette" << "'"); break;
+ case EMR_SELECTPALETTE : SAL_INFO("vcl.emf", "not implemented '" << "SelectPalette" << "'"); break;
+ case EMR_CREATEPALETTE : SAL_INFO("vcl.emf", "not implemented '" << "CreatePalette" << "'"); break;
+ case EMR_ALPHADIBBLEND : SAL_INFO("vcl.emf", "not implemented '" << "AlphaDibBlend" << "'"); break;
+ case EMR_SETTEXTJUSTIFICATION : SAL_INFO("vcl.emf", "not implemented '" << "SetTextJustification" << "'"); break;
case EMR_GDICOMMENT :
case EMR_HEADER : // has already been read at ReadHeader()
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index 09d847e557a6..4a0d0273ae5a 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -265,45 +265,11 @@ WinMtfFontStyle::WinMtfFontStyle( LOGFONTW& rFont )
};
-#ifdef WIN_MTF_ASSERT
-void WinMtfAssertHandler( const sal_Char* pAction, sal_uInt32 nFlags )
-{
- static bool bOnlyOnce;
- static sal_Int32 nAssertCount;
-
- if ( nFlags & WIN_MTF_ASSERT_INIT )
- nAssertCount = 0;
- if ( nFlags & WIN_MTF_ASSERT_ONCE )
- bOnlyOnce = true;
- if ( nFlags & WIN_MTF_ASSERT_MIFE )
- {
- if ( ( nAssertCount == 0 ) || !bOnlyOnce )
- {
- OStringBuffer aText("WMF/EMF Import: ");
- if (pAction)
- aText.append(pAction);
- aText.append(" needs to be implemented");
- DBG_ASSERT( 0, aText.getStr() );
- }
- nAssertCount++;
- }
-}
-#endif
-
-
WinMtf::WinMtf( WinMtfOutput* pWinMtfOutput, SvStream& rStreamWMF, FilterConfigItem* pConfigItem ) :
pOut ( pWinMtfOutput ),
pWMF ( &rStreamWMF ),
pFilterConfigItem ( pConfigItem )
{
-#ifdef WIN_MTF_ASSERT
- // we want to assert not implemented features, but we do this
- // only once, so that nobody is handicapped by getting too many assertions
- // I hope this will bring more testdocuments, without support of these
- // testdocuments the implementation of missing features won't be possible. (SJ)
- WinMtfAssertHandler( NULL, WIN_MTF_ASSERT_INIT | WIN_MTF_ASSERT_ONCE );
-#endif
-
SvLockBytes *pLB = pWMF->GetLockBytes();
if ( pLB )
pLB->SetSynchronMode( sal_True );
diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx
index 14def6d888ef..163c9fc623f9 100644
--- a/vcl/source/filter/wmf/winmtf.hxx
+++ b/vcl/source/filter/wmf/winmtf.hxx
@@ -20,10 +20,6 @@
#ifndef INCLUDED_VCL_SOURCE_FILTER_WMF_WINMTF_HXX
#define INCLUDED_VCL_SOURCE_FILTER_WMF_WINMTF_HXX
-#ifdef DBG_UTIL
-#define WIN_MTF_ASSERT
-#endif
-
#include <sot/object.hxx>
#include <boost/shared_ptr.hpp>
#include <vcl/graph.hxx>
@@ -287,16 +283,6 @@ struct WMF_EXTERNALHEADER;
//============================ WMFReader ==================================
-#ifdef WIN_MTF_ASSERT
-#define WIN_MTF_ASSERT_INIT 0x80000000
-#define WIN_MTF_ASSERT_ONCE 0x40000000
-#define WIN_MTF_ASSERT_MIFE 0x20000000
-
-void WinMtfAssertHandler( const sal_Char*, sal_uInt32 nFlags = WIN_MTF_ASSERT_MIFE );
-#else
-inline void WinMtfAssertHandler( const sal_Char*, sal_uInt32 = 0 ) {}
-#endif
-
class WinMtfClipPath
{
basegfx::tools::B2DClipState maClip;