[Libreoffice-commits] core.git: 3 commits - canvas/source include/canvas include/comphelper include/tools
Michael Stahl
mstahl at redhat.com
Thu Jan 28 01:13:05 PST 2016
canvas/source/cairo/cairo_canvashelper_text.cxx | 2 -
canvas/source/opengl/ogl_canvascustomsprite.cxx | 2 -
canvas/source/opengl/ogl_spritedevicehelper.cxx | 2 -
canvas/source/vcl/canvashelper.cxx | 4 +-
include/canvas/base/bitmapcanvasbase.hxx | 2 -
include/canvas/base/canvasbase.hxx | 34 ++++++++++++------------
include/canvas/base/canvascustomspritebase.hxx | 6 ++--
include/canvas/base/graphicdevicebase.hxx | 8 ++---
include/canvas/base/integerbitmapbase.hxx | 8 ++---
include/canvas/base/spritecanvasbase.hxx | 8 ++---
include/canvas/debug.hxx | 4 +-
include/canvas/verifyinput.hxx | 1
include/comphelper/numberedcollection.hxx | 9 +++---
include/tools/diagnose_ex.h | 11 +++----
14 files changed, 50 insertions(+), 51 deletions(-)
New commits:
commit 10303054067258016fbbae018ea848f74adc4964
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Jan 27 21:48:13 2016 +0100
tools: replace BOOST_CURRENT_FUNCTION with __func__
Change-Id: I7149d58dbcfceff00921af419251e47378127137
diff --git a/include/tools/diagnose_ex.h b/include/tools/diagnose_ex.h
index 7dec15c..4ece912 100644
--- a/include/tools/diagnose_ex.h
+++ b/include/tools/diagnose_ex.h
@@ -36,7 +36,6 @@ TOOLS_DLLPUBLIC void DbgUnhandledException(const css::uno::Any& caughtException,
#include <cppuhelper/exc_hlp.hxx>
#include <osl/diagnose.h>
#include <osl/thread.h>
- #include <boost/current_function.hpp>
/** reports a caught UNO exception via OSL diagnostics
@@ -44,7 +43,7 @@ TOOLS_DLLPUBLIC void DbgUnhandledException(const css::uno::Any& caughtException,
handling is not correct ....
*/
#define DBG_UNHANDLED_EXCEPTION() \
- DbgUnhandledException( ::cppu::getCaughtException(), BOOST_CURRENT_FUNCTION, SAL_DETAIL_WHERE);
+ DbgUnhandledException( ::cppu::getCaughtException(), __func__, SAL_DETAIL_WHERE);
#else // OSL_DEBUG_LEVEL
#define DBG_UNHANDLED_EXCEPTION()
@@ -56,14 +55,14 @@ TOOLS_DLLPUBLIC void DbgUnhandledException(const css::uno::Any& caughtException,
#define ENSURE_ARG_OR_THROW(c, m) if( !(c) ) { \
OSL_ENSURE(c, m); \
throw css::lang::IllegalArgumentException( \
- OUStringLiteral(BOOST_CURRENT_FUNCTION) \
+ OUStringLiteral(__func__) \
+ ",\n" m, \
css::uno::Reference< css::uno::XInterface >(), \
0 ); }
#define ENSURE_ARG_OR_THROW2(c, m, ifc, arg) if( !(c) ) { \
OSL_ENSURE(c, m); \
throw css::lang::IllegalArgumentException( \
- OUStringLiteral(BOOST_CURRENT_FUNCTION) \
+ OUStringLiteral(__func__) \
+ ",\n" m, \
ifc, \
arg ); }
@@ -75,14 +74,14 @@ TOOLS_DLLPUBLIC void DbgUnhandledException(const css::uno::Any& caughtException,
if( !(c) ){ \
OSL_ENSURE(c, m); \
throw css::uno::RuntimeException( \
- OUStringLiteral(BOOST_CURRENT_FUNCTION) + ",\n" m, \
+ OUStringLiteral(__func__) + ",\n" m, \
css::uno::Reference< css::uno::XInterface >() ); }
#define ENSURE_OR_THROW2(c, m, ifc) \
if( !(c) ) { \
OSL_ENSURE(c, m); \
throw css::uno::RuntimeException( \
- OUStringLiteral(BOOST_CURRENT_FUNCTION) + ",\n" m, \
+ OUStringLiteral(__func__) + ",\n" m, \
ifc ); }
/** This macro asserts the given condition (in debug mode), and
commit d01f7db4b5f51d1be8ba210625f4ad1ebf5c6e8f
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Jan 27 21:44:49 2016 +0100
canvas: replace BOOST_CURRENT_FUNCTION with __func__
Change-Id: I384472894288081423ae9467cc439b10d637f6e0
diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx b/canvas/source/cairo/cairo_canvashelper_text.cxx
index 6f37f7f3..3d975cb 100644
--- a/canvas/source/cairo/cairo_canvashelper_text.cxx
+++ b/canvas/source/cairo/cairo_canvashelper_text.cxx
@@ -118,7 +118,7 @@ namespace cairocanvas
ColorType eColorType )
{
::canvas::tools::verifyInput( renderState,
- BOOST_CURRENT_FUNCTION,
+ __func__,
const_cast<rendering::XCanvas*>(pOwner), // only for refcount
2,
eColorType == IGNORE_COLOR ? 0 : 3 );
diff --git a/canvas/source/opengl/ogl_canvascustomsprite.cxx b/canvas/source/opengl/ogl_canvascustomsprite.cxx
index b410c56..7170534 100644
--- a/canvas/source/opengl/ogl_canvascustomsprite.cxx
+++ b/canvas/source/opengl/ogl_canvascustomsprite.cxx
@@ -73,7 +73,7 @@ namespace oglcanvas
uno::RuntimeException, std::exception)
{
canvas::tools::verifyArgs(aNewPos, viewState, renderState,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< ::cppu::OWeakObject* >(this));
::osl::MutexGuard aGuard( m_aMutex );
diff --git a/canvas/source/opengl/ogl_spritedevicehelper.cxx b/canvas/source/opengl/ogl_spritedevicehelper.cxx
index 0932e0c..e1ebe43 100644
--- a/canvas/source/opengl/ogl_spritedevicehelper.cxx
+++ b/canvas/source/opengl/ogl_spritedevicehelper.cxx
@@ -380,7 +380,7 @@ namespace oglcanvas
void SpriteDeviceHelper::dumpScreenContent() const
{
- SAL_INFO("canvas.ogl", BOOST_CURRENT_FUNCTION );
+ SAL_INFO("canvas.ogl", __func__);
}
void SpriteDeviceHelper::show( const ::rtl::Reference< CanvasCustomSprite >& xSprite )
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index bee83b1..441590b 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -677,7 +677,7 @@ namespace vclcanvas
"bitmap is NULL");
::canvas::tools::verifyInput( renderState,
- BOOST_CURRENT_FUNCTION,
+ __func__,
mpDevice,
4,
bModulateColors ? 3 : 0 );
@@ -1195,7 +1195,7 @@ namespace vclcanvas
"outdev null. Are we disposed?" );
::canvas::tools::verifyInput( renderState,
- BOOST_CURRENT_FUNCTION,
+ __func__,
mpDevice,
2,
eColorType == IGNORE_COLOR ? 0 : 3 );
diff --git a/include/canvas/base/bitmapcanvasbase.hxx b/include/canvas/base/bitmapcanvasbase.hxx
index bd144f5..b4b4936 100644
--- a/include/canvas/base/bitmapcanvasbase.hxx
+++ b/include/canvas/base/bitmapcanvasbase.hxx
@@ -112,7 +112,7 @@ namespace canvas
{
tools::verifyArgs(sourceCanvas, sourceRect, sourceViewState, sourceRenderState,
destRect, destViewState, destRenderState,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< typename BaseType::UnambiguousBaseType* >(this));
typename BaseType::BaseType::MutexType aGuard( BaseType::m_aMutex );
diff --git a/include/canvas/base/canvasbase.hxx b/include/canvas/base/canvasbase.hxx
index 9bb513c..1af4d92 100644
--- a/include/canvas/base/canvasbase.hxx
+++ b/include/canvas/base/canvasbase.hxx
@@ -139,7 +139,7 @@ namespace canvas
std::exception) override
{
tools::verifyArgs(aPoint, viewState, renderState,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
MutexType aGuard( BaseType::m_aMutex );
@@ -156,7 +156,7 @@ namespace canvas
std::exception) override
{
tools::verifyArgs(aStartPoint, aEndPoint, viewState, renderState,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
MutexType aGuard( BaseType::m_aMutex );
@@ -175,7 +175,7 @@ namespace canvas
std::exception) override
{
tools::verifyArgs(aBezierSegment, aEndPoint, viewState, renderState,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
MutexType aGuard( BaseType::m_aMutex );
@@ -194,7 +194,7 @@ namespace canvas
std::exception) override
{
tools::verifyArgs(xPolyPolygon, viewState, renderState,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
MutexType aGuard( BaseType::m_aMutex );
@@ -214,7 +214,7 @@ namespace canvas
std::exception) override
{
tools::verifyArgs(xPolyPolygon, viewState, renderState, strokeAttributes,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
MutexType aGuard( BaseType::m_aMutex );
@@ -233,7 +233,7 @@ namespace canvas
css::uno::RuntimeException) override
{
tools::verifyArgs(xPolyPolygon, viewState, renderState, strokeAttributes,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
MutexType aGuard( BaseType::m_aMutex );
@@ -253,7 +253,7 @@ namespace canvas
css::uno::RuntimeException) override
{
tools::verifyArgs(xPolyPolygon, viewState, renderState, textures, xMapping, strokeAttributes,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
MutexType aGuard( BaseType::m_aMutex );
@@ -271,7 +271,7 @@ namespace canvas
css::uno::RuntimeException) override
{
tools::verifyArgs(xPolyPolygon, viewState, renderState, strokeAttributes,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
MutexType aGuard( BaseType::m_aMutex );
@@ -290,7 +290,7 @@ namespace canvas
std::exception) override
{
tools::verifyArgs(xPolyPolygon, viewState, renderState,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
MutexType aGuard( BaseType::m_aMutex );
@@ -310,7 +310,7 @@ namespace canvas
std::exception) override
{
tools::verifyArgs(xPolyPolygon, viewState, renderState, textures,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
MutexType aGuard( BaseType::m_aMutex );
@@ -328,7 +328,7 @@ namespace canvas
const css::uno::Reference< css::geometry::XMapping2D >& xMapping ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException) override
{
tools::verifyArgs(xPolyPolygon, viewState, renderState, textures, xMapping,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
MutexType aGuard( BaseType::m_aMutex );
@@ -349,7 +349,7 @@ namespace canvas
// dummy, to keep argPos in sync
fontRequest,
fontMatrix,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
MutexType aGuard( BaseType::m_aMutex );
@@ -364,7 +364,7 @@ namespace canvas
css::uno::RuntimeException) override
{
tools::verifyArgs(aFilter,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
MutexType aGuard( BaseType::m_aMutex );
@@ -384,7 +384,7 @@ namespace canvas
std::exception) override
{
tools::verifyArgs(xFont, viewState, renderState,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
tools::verifyRange( textDirection,
css::rendering::TextDirection::WEAK_LEFT_TO_RIGHT,
@@ -407,7 +407,7 @@ namespace canvas
std::exception) override
{
tools::verifyArgs(laidOutText, viewState, renderState,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
MutexType aGuard( BaseType::m_aMutex );
@@ -424,7 +424,7 @@ namespace canvas
const css::rendering::RenderState& renderState ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException) override
{
tools::verifyArgs(xBitmap, viewState, renderState,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
MutexType aGuard( BaseType::m_aMutex );
@@ -440,7 +440,7 @@ namespace canvas
const css::rendering::RenderState& renderState ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException) override
{
tools::verifyArgs(xBitmap, viewState, renderState,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
MutexType aGuard( BaseType::m_aMutex );
diff --git a/include/canvas/base/canvascustomspritebase.hxx b/include/canvas/base/canvascustomspritebase.hxx
index 9813f5b..830bf9b 100644
--- a/include/canvas/base/canvascustomspritebase.hxx
+++ b/include/canvas/base/canvascustomspritebase.hxx
@@ -119,7 +119,7 @@ namespace canvas
css::uno::RuntimeException) override
{
tools::verifyArgs(xBitmap, viewState, renderState,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< typename BaseType::UnambiguousBaseType* >(this));
typename BaseType::MutexType aGuard( BaseType::m_aMutex );
@@ -156,7 +156,7 @@ namespace canvas
css::uno::RuntimeException) override
{
tools::verifyArgs(aNewPos, viewState, renderState,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< typename BaseType::UnambiguousBaseType* >(this));
typename BaseType::MutexType aGuard( BaseType::m_aMutex );
@@ -168,7 +168,7 @@ namespace canvas
css::uno::RuntimeException) override
{
tools::verifyArgs(aTransformation,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< typename BaseType::UnambiguousBaseType* >(this));
typename BaseType::MutexType aGuard( BaseType::m_aMutex );
diff --git a/include/canvas/base/graphicdevicebase.hxx b/include/canvas/base/graphicdevicebase.hxx
index a6db316..b679cf4 100644
--- a/include/canvas/base/graphicdevicebase.hxx
+++ b/include/canvas/base/graphicdevicebase.hxx
@@ -187,7 +187,7 @@ namespace canvas
std::exception) override
{
tools::verifyBitmapSize(size,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
MutexType aGuard( BaseType::m_aMutex );
@@ -199,7 +199,7 @@ namespace canvas
css::uno::RuntimeException) override
{
tools::verifyBitmapSize(size,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
MutexType aGuard( BaseType::m_aMutex );
@@ -213,7 +213,7 @@ namespace canvas
std::exception) override
{
tools::verifyBitmapSize(size,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
MutexType aGuard( BaseType::m_aMutex );
@@ -225,7 +225,7 @@ namespace canvas
css::uno::RuntimeException) override
{
tools::verifyBitmapSize(size,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< UnambiguousBaseType* >(this));
MutexType aGuard( BaseType::m_aMutex );
diff --git a/include/canvas/base/integerbitmapbase.hxx b/include/canvas/base/integerbitmapbase.hxx
index 4995578..0d6440a 100644
--- a/include/canvas/base/integerbitmapbase.hxx
+++ b/include/canvas/base/integerbitmapbase.hxx
@@ -45,7 +45,7 @@ namespace canvas
const css::geometry::IntegerRectangle2D& rect ) throw (css::lang::IndexOutOfBoundsException, css::rendering::VolatileContentDestroyedException, css::uno::RuntimeException, std::exception) override
{
tools::verifyArgs(rect,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< typename Base::UnambiguousBaseType* >(this));
tools::verifyIndexRange(rect, Base::getSize() );
@@ -60,7 +60,7 @@ namespace canvas
const css::geometry::IntegerRectangle2D& rect ) throw (css::lang::IllegalArgumentException, css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override
{
tools::verifyArgs(bitmapLayout, rect,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< typename Base::UnambiguousBaseType* >(this));
tools::verifyIndexRange(rect, Base::getSize() );
@@ -74,7 +74,7 @@ namespace canvas
const css::geometry::IntegerPoint2D& pos ) throw (css::lang::IllegalArgumentException, css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override
{
tools::verifyArgs(bitmapLayout, pos,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< typename Base::UnambiguousBaseType* >(this));
tools::verifyIndexRange(pos, Base::getSize() );
@@ -87,7 +87,7 @@ namespace canvas
const css::geometry::IntegerPoint2D& pos ) throw (css::lang::IndexOutOfBoundsException, css::rendering::VolatileContentDestroyedException, css::uno::RuntimeException, std::exception) override
{
tools::verifyArgs(pos,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< typename Base::UnambiguousBaseType* >(this));
tools::verifyIndexRange(pos, Base::getSize() );
diff --git a/include/canvas/base/spritecanvasbase.hxx b/include/canvas/base/spritecanvasbase.hxx
index ba3ae03..9656be3 100644
--- a/include/canvas/base/spritecanvasbase.hxx
+++ b/include/canvas/base/spritecanvasbase.hxx
@@ -92,7 +92,7 @@ namespace canvas
css::uno::RuntimeException) override
{
tools::verifyArgs(animation,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< typename BaseType::UnambiguousBaseType* >(this));
typename BaseType::MutexType aGuard( BaseType::m_aMutex );
@@ -106,7 +106,7 @@ namespace canvas
css::uno::RuntimeException) override
{
tools::verifyArgs(animationBitmaps,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< typename BaseType::UnambiguousBaseType* >(this));
tools::verifyRange( interpolationMode,
css::rendering::InterpolationMode::NEAREST_NEIGHBOR,
@@ -121,7 +121,7 @@ namespace canvas
css::uno::RuntimeException) override
{
tools::verifySpriteSize(spriteSize,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< typename BaseType::UnambiguousBaseType* >(this));
typename BaseType::MutexType aGuard( BaseType::m_aMutex );
@@ -133,7 +133,7 @@ namespace canvas
css::uno::RuntimeException) override
{
tools::verifyArgs(original,
- BOOST_CURRENT_FUNCTION,
+ __func__,
static_cast< typename BaseType::UnambiguousBaseType* >(this));
typename BaseType::MutexType aGuard( BaseType::m_aMutex );
diff --git a/include/canvas/debug.hxx b/include/canvas/debug.hxx
index 308026a..f8b8d29 100644
--- a/include/canvas/debug.hxx
+++ b/include/canvas/debug.hxx
@@ -33,7 +33,7 @@
# if OSL_DEBUG_LEVEL > 2
# include <osl/diagnose.h>
# define SHARED_PTR_LEFTOVERS(a) OSL_TRACE("%s\n%s: Unreachable objects still use %d bytes\n", \
- BOOST_CURRENT_FUNCTION, a, \
+ __func__, a, \
find_unreachable_objects(true) )
# else
/** This macro shows how much memory is still used by shared_ptrs
@@ -44,7 +44,7 @@
from deletion by circular references.
*/
# define SHARED_PTR_LEFTOVERS(a) OSL_TRACE("%s\n%s: Unreachable objects still use %d bytes\n", \
- BOOST_CURRENT_FUNCTION, a, \
+ __func__, a, \
find_unreachable_objects(false) )
# endif
diff --git a/include/canvas/verifyinput.hxx b/include/canvas/verifyinput.hxx
index 615f529..d8e95ac 100644
--- a/include/canvas/verifyinput.hxx
+++ b/include/canvas/verifyinput.hxx
@@ -27,7 +27,6 @@
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <algorithm>
-#include <boost/current_function.hpp>
#include <canvas/canvastoolsdllapi.h>
commit 8b1fc9108fdc114d65a2a116bd88081dcb39dbaa
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Jan 27 21:28:44 2016 +0100
comphelper: replace boost::hash with std::hash
Change-Id: I9824145518cbac6ae3e700c402f1335b7d1b56f8
diff --git a/include/comphelper/numberedcollection.hxx b/include/comphelper/numberedcollection.hxx
index 9937d7e..1f44fd0 100644
--- a/include/comphelper/numberedcollection.hxx
+++ b/include/comphelper/numberedcollection.hxx
@@ -30,7 +30,8 @@
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/weakref.hxx>
#include <cppuhelper/implbase.hxx>
-#include <boost/functional/hash.hpp>
+
+#include <functional>
#include <unordered_map>
#include <vector>
@@ -59,9 +60,9 @@ class COMPHELPER_DLLPUBLIC NumberedCollection : private ::cppu::BaseMutex
};
typedef std::unordered_map<
- long ,
- TNumberedItem ,
- ::boost::hash< long > ,
+ long,
+ TNumberedItem,
+ ::std::hash<long>,
::std::equal_to< long > > TNumberedItemHash;
typedef ::std::vector< long > TDeadItemList;
More information about the Libreoffice-commits
mailing list