summaryrefslogtreecommitdiff
path: root/emfio
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-09-03 20:37:55 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-09-04 09:52:48 +0200
commitc8a3f0fe63e38a1b597327d1145568dc9ae7a84a (patch)
treecb16d608da936a45bea725e0c5435eab8812a845 /emfio
parent595371e520ce4f64ad9d99a7866bdb8404271b6e (diff)
crashtesting: uninherited GDIObj is also possible here
e.g. kde239472-4.doc and W_META_CREATEPALETTE etc create objects that can be selected but are just a base GDIObj Change-Id: I4b99978c49f5abb7fb1c616d044ba25c793577be Reviewed-on: https://gerrit.libreoffice.org/41869 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'emfio')
-rw-r--r--emfio/source/reader/mtftools.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index 4edfeb4817cd..ce2b8ab1b395 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -546,7 +546,7 @@ namespace emfio
{
if ( nIndex & ENHMETA_STOCK_OBJECT )
{
- sal_uInt16 nStockId = (sal_uInt8)nIndex;
+ sal_uInt16 nStockId = (sal_uInt8)nIndex;
switch( nStockId )
{
case WHITE_BRUSH :
@@ -608,6 +608,8 @@ namespace emfio
if ( (sal_uInt32)nIndex < mvGDIObj.size() )
pGDIObj = mvGDIObj[ nIndex ].get();
+ fprintf(stderr, "index %d is %p\n", nIndex, pGDIObj);
+
if ( pGDIObj )
{
if (const auto pen = dynamic_cast<WinMtfLineStyle*>(pGDIObj))
@@ -620,9 +622,9 @@ namespace emfio
}
else if (const auto font = dynamic_cast<WinMtfFontStyle*>(
pGDIObj))
+ {
maFont = font->aFont;
- else
- assert(false);
+ }
}
}
}
@@ -715,6 +717,7 @@ namespace emfio
if ( nIndex == mvGDIObj.size() )
ImplResizeObjectArry( mvGDIObj.size() + 16 );
+ fprintf(stderr, "index %ld set to %p\n", nIndex, pObject.get());
mvGDIObj[ nIndex ] = std::move(pObject);
}
@@ -751,6 +754,8 @@ namespace emfio
if ( (sal_uInt32)nIndex >= mvGDIObj.size() )
ImplResizeObjectArry( nIndex + 16 );
+ fprintf(stderr, "22 index %d set to %p\n", nIndex, pObject.get());
+
mvGDIObj[ nIndex ] = std::move(pObject);
}
}