summaryrefslogtreecommitdiffstats
path: root/src/extension
diff options
context:
space:
mode:
authorDavid Mathog <mathog@caltech.edu>2013-10-24 21:32:31 +0000
committer~suv <suv-sf@users.sourceforge.net>2013-10-24 21:32:31 +0000
commit28c2b3040acb1984f352e1672ed65fa78fe44dde (patch)
tree1140d1f184ef98bb978afc8f5489b8c8f3bf37f6 /src/extension
parenttry to add some const-correctness (diff)
downloadinkscape-28c2b3040acb1984f352e1672ed65fa78fe44dde.tar.gz
inkscape-28c2b3040acb1984f352e1672ed65fa78fe44dde.zip
Fix for Bug 1243937 (EMF import, diagram obscured by full page rectangle)
Fixed bugs: - https://launchpad.net/bugs/1243937 (bzr r12720)
Diffstat (limited to 'src/extension')
-rw-r--r--src/extension/internal/emf-inout.cpp1
-rw-r--r--src/extension/internal/wmf-inout.cpp3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/extension/internal/emf-inout.cpp b/src/extension/internal/emf-inout.cpp
index ab03f832f..f4b26d4f0 100644
--- a/src/extension/internal/emf-inout.cpp
+++ b/src/extension/internal/emf-inout.cpp
@@ -2859,6 +2859,7 @@ std::cout << "BEFORE DRAW"
if (!pEmr->cbBmiSrc) {
// should be an application of a DIBPATTERNBRUSHPT, use a solid color instead
+ if(pEmr->dwRop == U_NOOP)break; /* GDI applications apparently often end with this as a sort of flush(), nothing should be drawn */
int32_t dx = pEmr->Dest.x;
int32_t dy = pEmr->Dest.y;
int32_t dw = pEmr->cDest.x;
diff --git a/src/extension/internal/wmf-inout.cpp b/src/extension/internal/wmf-inout.cpp
index 208077cd1..f98890809 100644
--- a/src/extension/internal/wmf-inout.cpp
+++ b/src/extension/internal/wmf-inout.cpp
@@ -2284,6 +2284,7 @@ std::cout << "BEFORE DRAW"
dbg_str << "<!-- U_WMR_BITBLT -->\n";
nSize = U_WMRBITBLT_get(contents,&Dst,&cwh,&Src,&dwRop3,&Bm16,&px);
if(!px){
+ if(dwRop3 == U_NOOP)break; /* GDI applications apparently often end with this as a sort of flush(), nothing should be drawn */
int32_t dx = Dst.x;
int32_t dy = Dst.y;
int32_t dw = cwh.x;
@@ -2321,6 +2322,7 @@ std::cout << "BEFORE DRAW"
dbg_str << "<!-- U_WMR_STRETCHBLT -->\n";
nSize = U_WMRSTRETCHBLT_get(contents,&Dst,&cDst,&Src,&cSrc,&dwRop3,&Bm16,&px);
if(!px){
+ if(dwRop3 == U_NOOP)break; /* GDI applications apparently often end with this as a sort of flush(), nothing should be drawn */
int32_t dx = Dst.x;
int32_t dy = Dst.y;
int32_t dw = cDst.x;
@@ -2715,6 +2717,7 @@ std::cout << "BEFORE DRAW"
if (!dib) {
// should be an application of a DIBPATTERNBRUSHPT, use a solid color instead
+ if(dwRop3 == U_NOOP)break; /* GDI applications apparently often end with this as a sort of flush(), nothing should be drawn */
int32_t dx = Dst.x;
int32_t dy = Dst.y;
int32_t dw = cwh.x;