diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-10-09 21:23:17 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-10-10 08:51:15 +0100 |
commit | e8bbb76827dd7a0e30d7d1db34a812a84d85f390 (patch) | |
tree | e00f9726de86b80843a2bdd68857c793e70c4a0c | |
parent | 2d25e3c354bfed19ee5c6f596cf57eb58ead9162 (diff) |
ensure correct export size type in stream operation
-rw-r--r-- | editeng/qa/items/borderline_test.cxx | 19 | ||||
-rw-r--r-- | solenv/gbuild/platform/unxgcc.mk | 1 | ||||
-rw-r--r-- | sw/source/ui/config/uinums.cxx | 2 | ||||
-rw-r--r-- | tools/qa/urlobj/tools_urlobj_test.cxx | 19 |
4 files changed, 40 insertions, 1 deletions
diff --git a/editeng/qa/items/borderline_test.cxx b/editeng/qa/items/borderline_test.cxx index 519d916fe57b..80a840c72389 100644 --- a/editeng/qa/items/borderline_test.cxx +++ b/editeng/qa/items/borderline_test.cxx @@ -48,6 +48,25 @@ using namespace editeng; +CPPUNIT_NS_BEGIN + +template<> struct assertion_traits<SvxBorderStyle> +{ + static bool equal( const SvxBorderStyle& x, const SvxBorderStyle& y ) + { + return x == y; + } + + static std::string toString( const SvxBorderStyle& x ) + { + OStringStream ost; + ost << static_cast<unsigned int>(x); + return ost.str(); + } +}; + +CPPUNIT_NS_END + namespace { class BorderLineTest : public CppUnit::TestFixture diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index 180ff5e75aa4..0379d7cb385d 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -82,6 +82,7 @@ gb_CXXFLAGS := \ -Wendif-labels \ -Wextra \ -Wshadow \ + -Wsign-promo \ -Woverloaded-virtual \ -Wno-non-virtual-dtor \ -fPIC \ diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx index 8d85cf96def0..4be6ecfcaab5 100644 --- a/sw/source/ui/config/uinums.cxx +++ b/sw/source/ui/config/uinums.cxx @@ -485,7 +485,7 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream ) rStream << sal_uInt16(aFmt.GetNumberingType()) << aFmt.GetBulletChar() - << (aFmt.GetIncludeUpperLevels() > 0) + << static_cast<sal_Bool>(aFmt.GetIncludeUpperLevels() > 0) << aFmt.GetStart(); rStream.WriteByteString( aFmt.GetPrefix(), eEncoding ); rStream.WriteByteString( aFmt.GetSuffix(), eEncoding ); diff --git a/tools/qa/urlobj/tools_urlobj_test.cxx b/tools/qa/urlobj/tools_urlobj_test.cxx index 4763c2a8a0d7..da11113111d1 100644 --- a/tools/qa/urlobj/tools_urlobj_test.cxx +++ b/tools/qa/urlobj/tools_urlobj_test.cxx @@ -37,6 +37,25 @@ #define OUSTR_TO_STDSTR( oustr ) std::string( rtl::OUStringToOString( oustr, RTL_TEXTENCODING_ASCII_US ).getStr() ) +CPPUNIT_NS_BEGIN + +template<> struct assertion_traits<INetProtocol> +{ + static bool equal( const INetProtocol& x, const INetProtocol& y ) + { + return x == y; + } + + static std::string toString( const INetProtocol& x ) + { + OStringStream ost; + ost << static_cast<unsigned int>(x); + return ost.str(); + } +}; + +CPPUNIT_NS_END + namespace tools_urlobj { |