[Libreoffice-commits] core.git: 2 commits - connectivity/source vcl/qa
David Ostrovsky
david at ostrovsky.org
Thu Feb 4 10:58:50 UTC 2016
connectivity/source/drivers/mork/MDriver.hxx | 7 +++---
connectivity/source/drivers/mork/MQueryHelper.hxx | 6 +++--
vcl/qa/cppunit/canvasbitmaptest.cxx | 24 ++++++++++++----------
3 files changed, 22 insertions(+), 15 deletions(-)
New commits:
commit 40da8f2ae60ceb41ab4dd1052fcfc011f6b8f54b
Author: David Ostrovsky <david at ostrovsky.org>
Date: Thu Feb 4 11:17:10 2016 +0100
mork: boost::noncopyable->'= delete'
Change-Id: Ibe5e44af2348150fef0fa3d3e579ca2893fc6b1c
Reviewed-on: https://gerrit.libreoffice.org/22095
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: David Ostrovsky <david at ostrovsky.org>
diff --git a/connectivity/source/drivers/mork/MDriver.hxx b/connectivity/source/drivers/mork/MDriver.hxx
index 7f3e75e6..205ffeb 100644
--- a/connectivity/source/drivers/mork/MDriver.hxx
+++ b/connectivity/source/drivers/mork/MDriver.hxx
@@ -14,7 +14,6 @@
#include <cassert>
-#include <boost/noncopyable.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/sdbc/DriverPropertyInfo.hpp>
@@ -47,8 +46,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL
create(css::uno::Reference< css::uno::XComponentContext > const &);
class MorkDriver:
- public cppu::WeakImplHelper< css::lang::XServiceInfo, css::sdbc::XDriver >,
- private boost::noncopyable
+ public cppu::WeakImplHelper< css::lang::XServiceInfo, css::sdbc::XDriver >
{
public:
explicit MorkDriver(css::uno::Reference< css::uno::XComponentContext > const context);
@@ -61,6 +59,9 @@ public:
OUString getProfilePath() {return m_sProfilePath;}
private:
+ MorkDriver(const MorkDriver&) SAL_DELETED_FUNCTION;
+ MorkDriver& operator=(const MorkDriver&) SAL_DELETED_FUNCTION;
+
virtual ~MorkDriver() {}
virtual OUString SAL_CALL getImplementationName()
diff --git a/connectivity/source/drivers/mork/MQueryHelper.hxx b/connectivity/source/drivers/mork/MQueryHelper.hxx
index 904026d..278c6d8 100644
--- a/connectivity/source/drivers/mork/MQueryHelper.hxx
+++ b/connectivity/source/drivers/mork/MQueryHelper.hxx
@@ -26,7 +26,6 @@
#include <osl/conditn.hxx>
#include <osl/thread.hxx>
#include <connectivity/FValue.hxx>
-#include <boost/noncopyable.hpp>
#include "MErrorResource.hxx"
#include <unordered_map>
@@ -105,7 +104,7 @@ namespace connectivity
const OUString& getValue() const { return m_aValue; }
};
- class MQueryExpression : public MQueryExpressionBase, private boost::noncopyable
+ class MQueryExpression : public MQueryExpressionBase
{
friend class MQueryHelper;
@@ -147,6 +146,9 @@ namespace connectivity
ExprVector m_aExprVector;
bool_cond m_aExprCondType;
+ private:
+ MQueryExpression(const MQueryExpression&) SAL_DELETED_FUNCTION;
+ MQueryExpression& operator=(const MQueryExpression&) SAL_DELETED_FUNCTION;
};
class MQueryHelperResultEntry
commit d33c002c474a034db9ad7390aec7ced113dcfb3e
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Feb 4 11:58:16 2016 +0100
Use CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE
Change-Id: I2f6da8bb39ebd791f0bd3aa955dfc8c83b96ca04
diff --git a/vcl/qa/cppunit/canvasbitmaptest.cxx b/vcl/qa/cppunit/canvasbitmaptest.cxx
index 4a61cfe..ae47526 100644
--- a/vcl/qa/cppunit/canvasbitmaptest.cxx
+++ b/vcl/qa/cppunit/canvasbitmaptest.cxx
@@ -155,12 +155,14 @@ void checkCanvasBitmap( const rtl::Reference<VclCanvasBitmap>& xBmp,
CPPUNIT_ASSERT_MESSAGE( "rgb colors are not within [0,1] range",
std::none_of(pRGBStart,pRGBEnd,&rangeCheck));
- CPPUNIT_ASSERT_MESSAGE( "First pixel is not white",
- rtl::math::approxEqual(pRGBStart[0].Red, 1.0) &&
- rtl::math::approxEqual(pRGBStart[0].Green, 1.0) &&
- rtl::math::approxEqual(pRGBStart[0].Blue, 1.0) );
- CPPUNIT_ASSERT_MESSAGE( "Second pixel is not opaque",
- rtl::math::approxEqual(pARGBStart[1].Alpha, 1.0) );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(
+ "First pixel is not white", 1.0, pRGBStart[0].Red, 1E-12);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(
+ "First pixel is not white", 1.0, pRGBStart[0].Green, 1E-12);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(
+ "First pixel is not white", 1.0, pRGBStart[0].Blue, 1E-12);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(
+ "Second pixel is not opaque", 1.0, pARGBStart[1].Alpha, 1E-12);
if( aContainedBmpEx.IsTransparent() )
{
CPPUNIT_ASSERT_MESSAGE( "First pixel is not fully transparent",
@@ -199,10 +201,12 @@ void checkCanvasBitmap( const rtl::Reference<VclCanvasBitmap>& xBmp,
xPal->getColorSpace().is());
}
- CPPUNIT_ASSERT_MESSAGE( "150th pixel is not white",
- rtl::math::approxEqual(pRGBStart[150].Red, 1.0) &&
- rtl::math::approxEqual(pRGBStart[150].Green, 1.0) &&
- rtl::math::approxEqual(pRGBStart[150].Blue, 1.0) );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(
+ "150th pixel is not white", 1.0, pRGBStart[150].Red, 1E-12);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(
+ "150th pixel is not white", 1.0, pRGBStart[150].Green, 1E-12);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(
+ "150th pixel is not white", 1.0, pRGBStart[150].Blue, 1E-12);
if( nOriginalDepth > 8 )
{
More information about the Libreoffice-commits
mailing list