summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2016-04-10 21:41:44 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-04-11 07:15:35 +0000
commitc210bf4510585b554e0e9a371f27fa27e2874762 (patch)
tree62f8c45ab415da97af398508e3ea64329268e7a3 /sal
parentcf81f3ba0602eeffad8907a1bb9cdd24e62c2d1e (diff)
tdf#94306 replace boost::noncopyable r.. to sdext
... in modules reportdesign to sdext Replace with C++11 delete copy-constructur and copy-assignment. Remove boost/noncopyable.hpp includes. Make some overloaded ctors explicit (most in sd slidesorter). Add deleted copy-assignment in sc/inc/chart2uno.hxx. Change-Id: I21d4209f0ddb00063ca827474516a05ab4bb2f9a Reviewed-on: https://gerrit.libreoffice.org/23970 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/cppunittester/cppunittester.cxx12
-rw-r--r--sal/osl/unx/file.cxx5
-rw-r--r--sal/osl/unx/file_path_helper.cxx6
-rw-r--r--sal/qa/osl/setthreadname/test-setthreadname.cxx7
-rw-r--r--sal/rtl/bootstrap.cxx11
-rw-r--r--sal/rtl/rtl_process.cxx6
-rw-r--r--sal/textenc/textenc.cxx11
7 files changed, 40 insertions, 18 deletions
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx
index 30347c178c16..3beb9013093c 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -52,7 +52,6 @@
#include "cppunit/plugin/DynamicLibraryManagerException.h"
#include "cppunit/portability/Stream.h"
-#include "boost/noncopyable.hpp"
#include <memory>
#include <boost/algorithm/string.hpp>
@@ -86,9 +85,11 @@ std::string convertLazy(rtl::OUString const & s16) {
//Output how long each test took
class TimingListener
: public CppUnit::TestListener
- , private boost::noncopyable
{
public:
+ TimingListener(const TimingListener&) = delete;
+ TimingListener& operator=(const TimingListener&) = delete;
+
void startTest( CppUnit::Test *) override
{
m_nStartTime = osl_getGlobalTimer();
@@ -112,9 +113,11 @@ private:
// have a useful value to identify the source
class EyecatcherListener
: public CppUnit::TestListener
- , private boost::noncopyable
{
public:
+ EyecatcherListener() = default;
+ EyecatcherListener(const EyecatcherListener&) = delete;
+ EyecatcherListener& operator=(const EyecatcherListener&) = delete;
void startTest( CppUnit::Test* test) override
{
std::unique_ptr<char[]> tn(new char [ test->getName().length() + 2 ]);
@@ -209,7 +212,6 @@ void addRecursiveTests(const std::vector<std::string>& test_names, CppUnit::Test
//exception before falling over and dying
class CPPUNIT_API ProtectedFixtureFunctor
: public CppUnit::Functor
- , private boost::noncopyable
{
private:
const std::string &testlib;
@@ -224,6 +226,8 @@ public:
, result(result_)
{
}
+ ProtectedFixtureFunctor(const ProtectedFixtureFunctor&) = delete;
+ ProtectedFixtureFunctor& operator=(const ProtectedFixtureFunctor&) = delete;
bool run() const
{
#ifdef DISABLE_DYNLOADING
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 3f44a1019065..2938e0e1da37 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -19,7 +19,6 @@
#include <config_features.h>
-#include "boost/noncopyable.hpp"
#include "osl/file.hxx"
#include "osl/detail/file.h"
@@ -152,12 +151,14 @@ struct FileHandle_Impl
/** Buffer cache / allocator.
*/
- class Allocator: private boost::noncopyable
+ class Allocator
{
rtl_cache_type * m_cache;
size_t m_bufsiz;
public:
+ Allocator(const Allocator&) = delete;
+ Allocator& operator=(const Allocator&) = delete;
static Allocator & get();
void allocate (sal_uInt8 ** ppBuffer, size_t * pnSize);
diff --git a/sal/osl/unx/file_path_helper.cxx b/sal/osl/unx/file_path_helper.cxx
index ec8eeb5666ce..23486c596a4d 100644
--- a/sal/osl/unx/file_path_helper.cxx
+++ b/sal/osl/unx/file_path_helper.cxx
@@ -20,7 +20,6 @@
#include "file_path_helper.hxx"
#include "uunxapi.hxx"
-#include <boost/noncopyable.hpp>
#include <osl/diagnose.h>
#include <rtl/ustring.hxx>
#include <sal/log.hxx>
@@ -157,7 +156,7 @@ bool SAL_CALL osl_systemPathIsLocalOrParentDirectoryEntry(
the specified character
**********************************************/
-class path_list_iterator: private boost::noncopyable
+class path_list_iterator
{
public:
@@ -173,6 +172,9 @@ public:
reset();
}
+ path_list_iterator(const path_list_iterator&) = delete;
+ path_list_iterator& operator=(const path_list_iterator&) = delete;
+
void reset()
{
m_path_segment_begin = m_path_segment_end = m_path_list.getStr();
diff --git a/sal/qa/osl/setthreadname/test-setthreadname.cxx b/sal/qa/osl/setthreadname/test-setthreadname.cxx
index be0b030d61dc..d188b07214c7 100644
--- a/sal/qa/osl/setthreadname/test-setthreadname.cxx
+++ b/sal/qa/osl/setthreadname/test-setthreadname.cxx
@@ -22,7 +22,6 @@
#include <limits>
#include <sal/types.h>
-#include "boost/noncopyable.hpp"
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
@@ -31,9 +30,13 @@
namespace {
-class TestThread: public osl::Thread, private boost::noncopyable {
+class TestThread: public osl::Thread {
private:
virtual void SAL_CALL run() override;
+public:
+ TestThread() = default;
+ TestThread(const TestThread&) = delete;
+ TestThread& operator=(const TestThread&) = delete;
};
void TestThread::run() {
diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx
index 84fd1fc1798b..030afe4e5897 100644
--- a/sal/rtl/bootstrap.cxx
+++ b/sal/rtl/bootstrap.cxx
@@ -37,7 +37,6 @@
#include <rtl/malformeduriexception.hxx>
#include <rtl/uri.hxx>
-#include <boost/noncopyable.hpp>
#include <list>
#include <algorithm>
#include <unordered_map>
@@ -407,7 +406,7 @@ Bootstrap_Impl * get_static_bootstrap_handle()
return s_handle;
}
-struct FundamentalIniData: private boost::noncopyable {
+struct FundamentalIniData {
rtlBootstrapHandle ini;
FundamentalIniData() {
@@ -422,6 +421,9 @@ struct FundamentalIniData: private boost::noncopyable {
}
~FundamentalIniData() { rtl_bootstrap_args_close(ini); }
+
+ FundamentalIniData(const FundamentalIniData&) = delete;
+ FundamentalIniData& operator=(const FundamentalIniData&) = delete;
};
struct FundamentalIni: public rtl::Static< FundamentalIniData, FundamentalIni >
@@ -578,11 +580,14 @@ void Bootstrap_Impl::expandValue(
namespace {
-struct bootstrap_map: private boost::noncopyable {
+struct bootstrap_map {
typedef std::unordered_map<
rtl::OUString, Bootstrap_Impl *,
rtl::OUStringHash > t;
+ bootstrap_map(const bootstrap_map&) = delete;
+ bootstrap_map& operator=(const bootstrap_map&) = delete;
+
// get and release must only be called properly synchronized via some mutex
// (e.g., osl::Mutex::getGlobalMutex()):
diff --git a/sal/rtl/rtl_process.cxx b/sal/rtl/rtl_process.cxx
index 5eb411ba72d5..a391dc8e7453 100644
--- a/sal/rtl/rtl_process.cxx
+++ b/sal/rtl/rtl_process.cxx
@@ -21,7 +21,6 @@
#include <cstring>
-#include "boost/noncopyable.hpp"
#include "rtl/instance.hxx"
#include "rtl/process.h"
#include "rtl/uuid.h"
@@ -29,10 +28,13 @@
namespace {
-class Id: private boost::noncopyable {
+class Id {
public:
Id() { rtl_createUuid(uuid_, nullptr, false); }
+ Id(const Id&) = delete;
+ Id& operator=(const Id&) = delete;
+
void copy(sal_uInt8 * target) const
{ std::memcpy(target, uuid_, UUID_SIZE); }
diff --git a/sal/textenc/textenc.cxx b/sal/textenc/textenc.cxx
index e4a6a6c89217..afae9c2eb41e 100644
--- a/sal/textenc/textenc.cxx
+++ b/sal/textenc/textenc.cxx
@@ -26,7 +26,6 @@
#include <cstddef>
#include <cstdlib>
-#include "boost/noncopyable.hpp"
#include "osl/diagnose.h"
#include "osl/module.hxx"
#include "rtl/instance.hxx"
@@ -359,12 +358,15 @@ namespace {
extern "C" ImplTextEncodingData const * sal_getFullTextEncodingData(
rtl_TextEncoding); // from tables.cxx in sal_textenc library
-class FullTextEncodingData: private boost::noncopyable {
+class FullTextEncodingData {
public:
ImplTextEncodingData const * get(rtl_TextEncoding encoding) {
(void) this; // loplugin:staticmethods
return sal_getFullTextEncodingData(encoding);
}
+ FullTextEncodingData() = default;
+ FullTextEncodingData(const FullTextEncodingData&) = delete;
+ FullTextEncodingData& operator=(const FullTextEncodingData&) = delete;
};
#else
@@ -377,7 +379,7 @@ void SAL_CALL thisModule() {}
};
-class FullTextEncodingData: private boost::noncopyable {
+class FullTextEncodingData {
public:
FullTextEncodingData() {
if (!module_.loadRelative(&thisModule, SAL_MODULENAME("sal_textenclo")))
@@ -398,6 +400,9 @@ public:
return (*function_)(encoding);
}
+ FullTextEncodingData(const FullTextEncodingData&) = delete;
+ FullTextEncodingData& operator=(const FullTextEncodingData&) = delete;
+
private:
osl::Module module_;
TextEncodingFunction * function_;