summaryrefslogtreecommitdiff
path: root/emfio
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2022-09-07 13:20:56 +0200
committerArmin Le Grand <Armin.Le.Grand@me.com>2022-09-08 13:33:58 +0200
commit707b0c328a282d993fa33b618083d20b6c521de6 (patch)
treef73397fe8c30bb9e21997dcd7232da1e210cecba /emfio
parent7d9c03fb354af184f35e257f319a70ef3481703a (diff)
Rework of SoftEdgePrimitive2D
This is pretty much the same for SoftEdgePrimitive2D as the change for GlowPrimitive2D, so for more comments please refer to commit c2d1458723c66c2fd717a112f89f773226adc841 Added suggested change of DoSaveForVisualControl mechanism Change-Id: I28901e7a0b6e1823000d2aa6a335ce2fd80e6ce3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139585 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'emfio')
-rw-r--r--emfio/source/reader/emfreader.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx
index 2d50a9a057bb..37978478bdbe 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -1496,16 +1496,22 @@ namespace emfio
}
}
- #ifdef DBG_UTIL
+#ifdef DBG_UTIL
static bool bDoSaveForVisualControl(false); // loplugin:constvars:ignore
if(bDoSaveForVisualControl)
{
- SvFileStream aNew("c:\\metafile_content.png", StreamMode::WRITE|StreamMode::TRUNC);
- vcl::PngImageWriter aPNGWriter(aNew);
- aPNGWriter.write(aBitmapEx);
+ // VCL_DUMP_BMP_PATH should be like C:/path/ or ~/path/
+ static const OUString sDumpPath(OUString::createFromAscii(std::getenv("VCL_DUMP_BMP_PATH")));
+ if(!sDumpPath.isEmpty())
+ {
+ SvFileStream aNew(sDumpPath + "metafile_content.png",
+ StreamMode::WRITE | StreamMode::TRUNC);
+ vcl::PngImageWriter aPNGWriter(aNew);
+ aPNGWriter.write(aBitmapEx);
+ }
}
- #endif
+#endif
maBmpSaveList.emplace_back(aBitmapEx, aRect, SRCAND|SRCINVERT);
}
}