diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-14 22:22:21 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-14 23:33:43 +0200 |
commit | 8c0be54a7da6262dffe04357121814dd22b5d7fe (patch) | |
tree | a282a2f48f912ac930c888a2d39d1519e7ae4287 | |
parent | a4f512d09ff39ef2a46a7e5ad512460c6093d25a (diff) |
tdf#43157: convert cppcanvas module away from OSL_ASSERT
2nd attempt, this time I've decided makes more sense to just produce
a warning.
Change-Id: Iaf373a2d38e8f47266b00ea869de38a584788d45
Reviewed-on: https://gerrit.libreoffice.org/37598
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
-rwxr-xr-x | cppcanvas/source/mtfrenderer/emfpfont.cxx | 2 | ||||
-rw-r--r-- | cppcanvas/source/mtfrenderer/emfplus.cxx | 2 | ||||
-rwxr-xr-x | cppcanvas/source/mtfrenderer/emfpstringformat.cxx | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/cppcanvas/source/mtfrenderer/emfpfont.cxx b/cppcanvas/source/mtfrenderer/emfpfont.cxx index 2df7981e6ab6..71ce93cdf4d1 100755 --- a/cppcanvas/source/mtfrenderer/emfpfont.cxx +++ b/cppcanvas/source/mtfrenderer/emfpfont.cxx @@ -51,7 +51,7 @@ namespace cppcanvas s.ReadUInt32(header).ReadFloat(emSize).ReadUInt32(sizeUnit).ReadInt32(fontFlags).ReadUInt32(reserved).ReadUInt32(length); - OSL_ASSERT((header >> 12) == 0xdbc01); + SAL_WARN_IF((header >> 12) != 0xdbc01, "cppcanvas.emf", "Invalid header - not 0xdbc01"); SAL_INFO("cppcanvas.emf", "EMF+\tfont\nEMF+\theader: 0x" << std::hex << (header >> 12) << " version: 0x" << (header & 0x1fff) << " size: " << std::dec << emSize << " unit: 0x" << std::hex << sizeUnit << std::dec); SAL_INFO("cppcanvas.emf", "EMF+\tflags: 0x" << std::hex << fontFlags << " reserved: 0x" << reserved << " length: 0x" << std::hex << length << std::dec); diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index aea0aef58a95..8cfd1127540e 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -450,7 +450,7 @@ namespace cppcanvas int length = aStartColor.getLength (); uno::Sequence< double > aColor (length); - OSL_ASSERT (length == aEndColor.getLength()); + SAL_WARN_IF(length != aEndColor.getLength(), "cppcanvas.emf", "length != aEndColor.getLength()"); for (int i = 0; i < brush->blendPoints; i++) { aStops[i] = brush->blendPositions [i]; diff --git a/cppcanvas/source/mtfrenderer/emfpstringformat.cxx b/cppcanvas/source/mtfrenderer/emfpstringformat.cxx index 01bbb4aae874..a677be4c11c5 100755 --- a/cppcanvas/source/mtfrenderer/emfpstringformat.cxx +++ b/cppcanvas/source/mtfrenderer/emfpstringformat.cxx @@ -52,7 +52,7 @@ namespace cppcanvas s.ReadFloat(firstTabOffset).ReadInt32(hotkeyPrefix).ReadFloat(leadingMargin).ReadFloat(trailingMargin).ReadFloat(tracking); s.ReadInt32(trimming).ReadInt32(tabStopCount).ReadInt32(rangeCount); - OSL_ASSERT((header >> 12) == 0xdbc01); + SAL_WARN_IF((header >> 12) != 0xdbc01, "cppcanvas.emf", "Invalid header - not 0xdbc01"); SAL_INFO("cppcanvas.emf", "EMF+\t string format\nEMF+\theader: 0x" << std::hex << (header >> 12) << " version: 0x" << (header & 0x1fff) << " StringFormatFlags: " << std::dec << stringFormatFlags << " Language: " << language); SAL_INFO("cppcanvas.emf", "EMF+\t StringAlignment: " << stringAlignment << " LineAlign: " << lineAlign << " DigitSubstitution: " << digitSubstitution << " DigitLanguage: " << digitLanguage); |