config/config_global.h.in | 1 + configure.ac | 33 +++++++++++++++++++++++++++++++++ oox/inc/oox/vml/vmlshape.hxx | 4 ++-- sal/inc/sal/types.h | 13 +++++++++++++ 4 files changed, 49 insertions(+), 2 deletions(-)
New commits: commit 3891d323cdc3c03154f5682baaeaa4b2ef015a63 Author: Miklos Vajna <vmik...@suse.cz> Date: Wed Jan 30 18:38:13 2013 +0100 Introduce SAL_OVERRIDE Change-Id: I3675b627d5e9ca19b2c4fb69fef12d0dabf94a43 diff --git a/config/config_global.h.in b/config/config_global.h.in index 7080a69..0f85b59 100644 --- a/config/config_global.h.in +++ b/config/config_global.h.in @@ -13,6 +13,7 @@ Any change in this header will cause a rebuild of almost everything. #define CONFIG_GLOBAL_H #undef HAVE_CXX11_DELETE +#undef HAVE_CXX11_OVERRIDE #undef HAVE_GCC_BUILTIN_ATOMIC #undef HAVE_SFINAE_ANONYMOUS_BROKEN #undef HAVE_THREADSAFE_STATICS diff --git a/configure.ac b/configure.ac index e49cc38..a707d4a 100644 --- a/configure.ac +++ b/configure.ac @@ -5649,6 +5649,39 @@ else AC_MSG_RESULT([no (C++11 disabled)]) fi +dnl ================================== +dnl Check for C++11 "override" support +dnl ================================== + +AC_MSG_CHECKING([whether $CXX supports C++11 override syntax]) +if test "$HAVE_CXX0X" = "TRUE"; then + save_CXXFLAGS=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11" + AC_LANG_PUSH([C++]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +struct A +{ + virtual void test(); +}; + +struct B : A +{ + virtual void test() override; +}; +]])],[HAVE_CXX11_OVERRIDE=TRUE],[]) + + AC_LANG_POP([C++]) + CXXFLAGS=$save_CXXFLAGS + if test "$HAVE_CXX11_OVERRIDE" = "TRUE"; then + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_CXX11_OVERRIDE]) + else + AC_MSG_RESULT([no]) + fi +else + AC_MSG_RESULT([no (C++11 disabled)]) +fi + dnl =================================================================== dnl system stl sanity tests dnl =================================================================== diff --git a/oox/inc/oox/vml/vmlshape.hxx b/oox/inc/oox/vml/vmlshape.hxx index 8373d4f..f1a9652 100644 --- a/oox/inc/oox/vml/vmlshape.hxx +++ b/oox/inc/oox/vml/vmlshape.hxx @@ -340,9 +340,9 @@ public: protected: /** Returns the absolute shape rectangle. */ - virtual ::com::sun::star::awt::Rectangle getAbsRectangle() const; + virtual ::com::sun::star::awt::Rectangle getAbsRectangle() const SAL_OVERRIDE; /** Returns the rectangle relative to the parent coordinate system. */ - virtual ::com::sun::star::awt::Rectangle getRelRectangle() const; + virtual ::com::sun::star::awt::Rectangle getRelRectangle() const SAL_OVERRIDE; }; /** Bezier shape object that supports to, from, control1 and control2 diff --git a/sal/inc/sal/types.h b/sal/inc/sal/types.h index 8ada6d7..117de03 100644 --- a/sal/inc/sal/types.h +++ b/sal/inc/sal/types.h @@ -416,6 +416,19 @@ namespace css = ::com::sun::star; #define SAL_DELETED_FUNCTION #endif +/** C++11 "override" feature. + + With HAVE_CXX11_OVERRIDE, force the method to override a existing method in + parent, error out if the method with the correct signature does not exist. + + @since LibreOffice 4.1 +*/ +#if defined HAVE_CXX11_OVERRIDE +#define SAL_OVERRIDE override +#else +#define SAL_OVERRIDE +#endif + #endif /* __cplusplus */ #ifdef __cplusplus _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits