diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-03-27 15:43:01 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-03-27 15:43:01 +0100 |
commit | 2b86de6137b5cc7cc09176b1d31240aaab4b61df (patch) | |
tree | d4a56926e742d046ac71b00eb08a5b384aef781c /vcl | |
parent | -Werror=unused-macros (diff) | |
download | core-2b86de6137b5cc7cc09176b1d31240aaab4b61df.tar.gz core-2b86de6137b5cc7cc09176b1d31240aaab4b61df.zip |
-Werror=unused-macros
Change-Id: Ifaf464b6a0ff7f365ddb2d123de9976fd90fdf21
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/sgvtext.cxx | 6 | ||||
-rw-r--r-- | vcl/source/filter/wmf/enhwmf.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/wmf/winmtf.hxx | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx index db9bd3b68407..b011da279064 100644 --- a/vcl/source/filter/sgvtext.cxx +++ b/vcl/source/filter/sgvtext.cxx @@ -17,7 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include "sal/config.h" +#include <boost/static_assert.hpp> #include <rtl/math.h> #include <comphelper/string.hxx> #include <tools/config.hxx> @@ -673,8 +675,8 @@ sal_uInt16 GetCharWidth(OutputDevice& rOut, UCHAR c) { // with MaxChar == 255 c cannot be greater than MaxChar // assert if MaxChar is ever changed - OSL_ENSURE( MaxChar == 255, "MaxChar not 255" ); - OSL_ENSURE(sizeof(UCHAR) == 1, "should be 1"); + BOOST_STATIC_ASSERT( MaxChar == 255 ); + BOOST_STATIC_ASSERT(sizeof(UCHAR) == 1); if (c>=MinChar /*&& c<=MaxChar*/) { ChrWidth=(sal_uInt16)rOut.GetTextWidth(rtl::OUString(reinterpret_cast<sal_Char*>(&c), 1, RTL_TEXTENCODING_IBM_437)); diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx index b10a803e8892..ec9a1b10e031 100644 --- a/vcl/source/filter/wmf/enhwmf.cxx +++ b/vcl/source/filter/wmf/enhwmf.cxx @@ -1269,7 +1269,6 @@ sal_Bool EnhWMFReader::ReadEnhWMF() } break; -#ifdef WIN_MTF_ASSERT default : WinMtfAssertHandler( "Unknown Meta Action" ); break; case EMR_MASKBLT : WinMtfAssertHandler( "MaskBlt" ); break; case EMR_PLGBLT : WinMtfAssertHandler( "PlgBlt" ); break; @@ -1326,7 +1325,6 @@ sal_Bool EnhWMFReader::ReadEnhWMF() case EMR_GDICOMMENT : case EMR_HEADER : // has already been read at ReadHeader() break; -#endif } } pWMF->Seek( nNextPos ); diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx index a6eedcec9977..b524d0a6499a 100644 --- a/vcl/source/filter/wmf/winmtf.hxx +++ b/vcl/source/filter/wmf/winmtf.hxx @@ -293,6 +293,8 @@ struct WMF_EXTERNALHEADER; #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 |