[Libreoffice-commits] core.git: sc/source sc/workben

Jochen Nitschke j.nitschke+logerrit at ok.de
Fri Apr 1 08:56:00 UTC 2016


 sc/source/core/data/cellvalues.cxx         |    8 +++-
 sc/source/core/data/table3.cxx             |   11 ++++--
 sc/source/core/inc/bcaslot.hxx             |    7 ++--
 sc/source/core/opencl/opbase.hxx           |    9 ++++-
 sc/source/core/tool/callform.cxx           |    6 ++-
 sc/source/core/tool/scmatrix.cxx           |    6 ++-
 sc/source/filter/inc/fprogressbar.hxx      |    6 ++-
 sc/source/filter/inc/ftools.hxx            |    6 ++-
 sc/source/filter/inc/xehelper.hxx          |   40 ++++++++++++++----------
 sc/source/filter/inc/xicontent.hxx         |   48 +++++++++++++++--------------
 sc/source/filter/inc/xihelper.hxx          |   45 ++++++++++++++++-----------
 sc/source/filter/inc/xiname.hxx            |    6 ++-
 sc/source/filter/inc/xistyle.hxx           |   32 +++++++++++++++----
 sc/source/filter/inc/xlpage.hxx            |    7 +++-
 sc/source/filter/inc/xltools.hxx           |   17 ++++++----
 sc/source/filter/oox/formulabuffer.cxx     |   15 ++++++---
 sc/source/filter/oox/workbookhelper.cxx    |    8 +++-
 sc/source/filter/xml/XMLExportIterator.hxx |    6 ++-
 sc/source/filter/xml/xmlcelli.hxx          |    6 ++-
 sc/source/filter/xml/xmlimprt.hxx          |    7 ++--
 sc/source/ui/docshell/documentlinkmgr.cxx  |    6 ++-
 sc/source/ui/inc/datastream.hxx            |    6 ++-
 sc/source/ui/inc/filtdlg.hxx               |    7 +++-
 sc/source/ui/inc/inputhdl.hxx              |    7 ++--
 sc/source/ui/inc/tabview.hxx               |    8 +++-
 sc/source/ui/sidebar/ScPanelFactory.hxx    |    8 +++-
 sc/source/ui/unoobj/chart2uno.cxx          |   13 ++++++-
 sc/workben/dpcache/perf-test.cpp           |    7 ++--
 28 files changed, 234 insertions(+), 124 deletions(-)

New commits:
commit 3c43a4810f505c071bcc99aeda47162a4b7b1681
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Fri Apr 1 10:00:23 2016 +0200

    tdf#94306 Replace boost::noncopyable in sc/source
    
    and sc/workben with C++11 delete copy ctors
    add default ctors needed missing
    delete some ctors instead of making them private
    
    Change-Id: I0a131f95444ef040e5d580d8326f372b8167e19b
    Reviewed-on: https://gerrit.libreoffice.org/23717
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sc/source/core/data/cellvalues.cxx b/sc/source/core/data/cellvalues.cxx
index 183daf9..d653687 100644
--- a/sc/source/core/data/cellvalues.cxx
+++ b/sc/source/core/data/cellvalues.cxx
@@ -12,7 +12,6 @@
 #include <cellvalue.hxx>
 
 #include <cassert>
-#include <boost/noncopyable.hpp>
 
 namespace sc {
 
@@ -29,12 +28,17 @@ struct BlockPos
 CellValueSpan::CellValueSpan( SCROW nRow1, SCROW nRow2 ) :
     mnRow1(nRow1), mnRow2(nRow2) {}
 
-struct CellValuesImpl : boost::noncopyable
+struct CellValuesImpl
 {
     CellStoreType maCells;
     CellTextAttrStoreType maCellTextAttrs;
     CellStoreType::iterator miCellPos;
     CellTextAttrStoreType::iterator miAttrPos;
+
+    CellValuesImpl() = default;
+
+    CellValuesImpl(const CellValuesImpl&) = delete;
+    const CellValuesImpl& operator=(const CellValuesImpl&) = delete;
 };
 
 CellValues::CellValues() :
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 29e5744..af2e564 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -71,7 +71,6 @@
 #include <unordered_set>
 #include <vector>
 #include <boost/checked_delete.hpp>
-#include <boost/noncopyable.hpp>
 #include <mdds/flat_segment_tree.hpp>
 
 using namespace ::com::sun::star;
@@ -219,7 +218,7 @@ struct ScSortInfo
 };
 IMPL_FIXEDMEMPOOL_NEWDEL( ScSortInfo )
 
-class ScSortInfoArray : private boost::noncopyable
+class ScSortInfoArray
 {
 public:
 
@@ -259,6 +258,9 @@ private:
     bool mbUpdateRefs;
 
 public:
+    ScSortInfoArray(const ScSortInfoArray&) = delete;
+    const ScSortInfoArray& operator=(const ScSortInfoArray&) = delete;
+
     ScSortInfoArray( sal_uInt16 nSorts, SCCOLROW nInd1, SCCOLROW nInd2 ) :
         pppInfo(nullptr),
         nCount( nInd2 - nInd1 + 1 ), nStart( nInd1 ),
@@ -538,7 +540,7 @@ ScSortInfoArray* ScTable::CreateSortInfoArray(
 
 namespace {
 
-struct SortedColumn : boost::noncopyable
+struct SortedColumn
 {
     typedef mdds::flat_segment_tree<SCROW, const ScPatternAttr*> PatRangeType;
 
@@ -550,6 +552,9 @@ struct SortedColumn : boost::noncopyable
     PatRangeType maPatterns;
     PatRangeType::const_iterator miPatternPos;
 
+    SortedColumn(const SortedColumn&) = delete;
+    const SortedColumn operator=(const SortedColumn&) = delete;
+
     explicit SortedColumn( size_t nTopEmptyRows ) :
         maCells(nTopEmptyRows),
         maCellTextAttrs(nTopEmptyRows),
diff --git a/sc/source/core/inc/bcaslot.hxx b/sc/source/core/inc/bcaslot.hxx
index 0f606d7..ab5b93c 100644
--- a/sc/source/core/inc/bcaslot.hxx
+++ b/sc/source/core/inc/bcaslot.hxx
@@ -26,8 +26,6 @@
 #include <set>
 #include <unordered_set>
 
-#include <boost/noncopyable.hpp>
-
 #include <svl/broadcast.hxx>
 
 #include "global.hxx"
@@ -51,7 +49,7 @@ struct AreaListener
     Used in a Unique Associative Container.
  */
 
-class ScBroadcastArea : private boost::noncopyable
+class ScBroadcastArea
 {
 private:
     ScBroadcastArea*    pUpdateChainNext;
@@ -63,6 +61,9 @@ private:
     bool mbGroupListening:1;
 
 public:
+    ScBroadcastArea(const ScBroadcastArea&) = delete;
+    const ScBroadcastArea& operator=(const ScBroadcastArea&) = delete;
+
     ScBroadcastArea( const ScRange& rRange );
 
     inline SvtBroadcaster&       GetBroadcaster()       { return aBroadcaster; }
diff --git a/sc/source/core/opencl/opbase.hxx b/sc/source/core/opencl/opbase.hxx
index 2896b81..f214241 100644
--- a/sc/source/core/opencl/opbase.hxx
+++ b/sc/source/core/opencl/opbase.hxx
@@ -16,7 +16,6 @@
 
 #include <formula/token.hxx>
 #include <formula/vectortoken.hxx>
-#include <boost/noncopyable.hpp>
 #include <memory>
 #include <set>
 
@@ -81,9 +80,15 @@ private:
 };
 
 /// (Partially) abstract base class for an operand
-class DynamicKernelArgument : private boost::noncopyable
+class DynamicKernelArgument
 {
 public:
+    /// delete copy constructor
+    DynamicKernelArgument( const DynamicKernelArgument& ) = delete;
+
+    /// delete copy-assignment operator
+    const DynamicKernelArgument& operator=( const DynamicKernelArgument& ) = delete;
+
     DynamicKernelArgument( const ScCalcConfig& config, const std::string& s, FormulaTreeNodeRef ft );
     virtual ~DynamicKernelArgument() {}
 
diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx
index af214393..075f3f3 100644
--- a/sc/source/core/tool/callform.cxx
+++ b/sc/source/core/tool/callform.cxx
@@ -19,7 +19,6 @@
 
 #include <sal/config.h>
 
-#include <boost/noncopyable.hpp>
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
 #include <osl/module.hxx>
@@ -77,12 +76,15 @@ typedef void (CALLTYPE* Unadvice)( double&      nHandle );
 #define UNADVICE                "Unadvice"
 #endif
 
-class ModuleData: private boost::noncopyable
+class ModuleData
 {
 friend class ModuleCollection;
     OUString aName;
     osl::Module* pInstance;
 public:
+    ModuleData(const ModuleData&) = delete;
+    const ModuleData& operator=(const ModuleData&) = delete;
+
     ModuleData(const OUString& rStr, osl::Module* pInst) : aName(rStr), pInstance(pInst) {}
     ~ModuleData() { delete pInstance; }
 
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 7c66db7..52189cd 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -29,7 +29,6 @@
 #include "matrixoperators.hxx"
 #include "math.hxx"
 
-#include <boost/noncopyable.hpp>
 #include <svl/zforlist.hxx>
 #include <svl/sharedstring.hxx>
 #include <tools/stream.hxx>
@@ -204,13 +203,16 @@ typedef double TMatFlag;
 const TMatFlag SC_MATFLAG_EMPTYRESULT = 1.0;
 const TMatFlag SC_MATFLAG_EMPTYPATH   = 2.0;
 
-class ScMatrixImpl: private boost::noncopyable
+class ScMatrixImpl
 {
     MatrixImplType maMat;
     MatrixImplType maMatFlag;
     ScInterpreter* pErrorInterpreter;
 
 public:
+    ScMatrixImpl(const ScMatrixImpl&) = delete;
+    const ScMatrixImpl& operator=(const ScMatrixImpl&) = delete;
+
     ScMatrixImpl(SCSIZE nC, SCSIZE nR);
     ScMatrixImpl(SCSIZE nC, SCSIZE nR, double fInitVal);
 
diff --git a/sc/source/filter/inc/fprogressbar.hxx b/sc/source/filter/inc/fprogressbar.hxx
index ad0f992..9070a00 100644
--- a/sc/source/filter/inc/fprogressbar.hxx
+++ b/sc/source/filter/inc/fprogressbar.hxx
@@ -20,7 +20,6 @@
 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_FPROGRESSBAR_HXX
 #define INCLUDED_SC_SOURCE_FILTER_INC_FPROGRESSBAR_HXX
 
-#include <boost/noncopyable.hpp>
 #include <vector>
 #include <memory>
 #include "globstr.hrc"
@@ -101,9 +100,12 @@ const sal_Int32 SCF_INV_SEGMENT = -1;
         // not allowed (second segment active):   aProgress.Progress();
         // not allowed (first segment not empty): aProgress.GetSegmentProgressBar( nSeg1 );
  */
-class ScfProgressBar : private boost::noncopyable
+class ScfProgressBar
 {
 public:
+    ScfProgressBar(const ScfProgressBar&) = delete;
+    const ScfProgressBar operator=(const ScfProgressBar&) = delete;
+
     explicit            ScfProgressBar( SfxObjectShell* pDocShell, const OUString& rText );
     explicit            ScfProgressBar( SfxObjectShell* pDocShell, sal_uInt16 nResId );
     virtual             ~ScfProgressBar();
diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx
index 6a36b3d..2ee6555 100644
--- a/sc/source/filter/inc/ftools.hxx
+++ b/sc/source/filter/inc/ftools.hxx
@@ -25,7 +25,6 @@
 #include <limits>
 #include <sal/macros.h>
 #include <sot/storage.hxx>
-#include <boost/noncopyable.hpp>
 #include <oox/helper/helper.hxx>
 #include "filter.hxx"
 #include "scdllapi.h"
@@ -121,9 +120,12 @@ class ScStyleSheetPool;
 class SvStream;
 
 /** Contains static methods used anywhere in the filters. */
-class ScfTools : private boost::noncopyable
+class ScfTools
 {
 public:
+// *** noncopyable *** --------------------------------------------------------
+    ScfTools(const ScfTools&) = delete;
+    const ScfTools& operator=(const ScfTools&) = delete;
 
 // *** common methods *** -----------------------------------------------------
 
diff --git a/sc/source/filter/inc/xehelper.hxx b/sc/source/filter/inc/xehelper.hxx
index c07d18e..30eae8d 100644
--- a/sc/source/filter/inc/xehelper.hxx
+++ b/sc/source/filter/inc/xehelper.hxx
@@ -20,7 +20,6 @@
 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_XEHELPER_HXX
 #define INCLUDED_SC_SOURCE_FILTER_INC_XEHELPER_HXX
 
-#include <boost/noncopyable.hpp>
 #include <memory>
 #include "xladdress.hxx"
 #include "xeroot.hxx"
@@ -209,9 +208,17 @@ class ScPatternAttr;
 /** This class provides methods to create an XclExpString.
     @descr  The string can be created from an edit engine text object or
     directly from a Calc edit cell. */
-class XclExpStringHelper : private boost::noncopyable
+class XclExpStringHelper
 {
 public:
+    /** removes copy constructor */
+    XclExpStringHelper(const XclExpStringHelper &) = delete;
+    /** remove copy-assignment operator */
+    const XclExpStringHelper& operator=(const XclExpStringHelper&) = delete;
+    /** We don't want anybody to instantiate this class, since it is just a
+        collection of static methods */
+    XclExpStringHelper() = delete;
+
     /** Creates a new unformatted string from the passed string.
         @descr  Creates a Unicode string or a byte string, depending on the
                 current BIFF version contained in the passed XclExpRoot object.
@@ -315,12 +322,6 @@ public:
     /** Returns the script type first text portion different to WEAK, or the system
         default script type, if there is only weak script in the passed string. */
     static sal_Int16    GetLeadingScriptType( const XclExpRoot& rRoot, const OUString& rString );
-
-private:
-    /** We don't want anybody to instantiate this class, since it is just a
-        collection of static methods. To enforce this, the default constructor
-        is made private */
-    XclExpStringHelper();
 };
 
 // Header/footer conversion ===================================================
@@ -356,9 +357,14 @@ class EditEngine;
     Known but unsupported control sequences:
     &G                      picture
  */
-class XclExpHFConverter : protected XclExpRoot, private boost::noncopyable
+class XclExpHFConverter : protected XclExpRoot
 {
 public:
+    /** delete copy constructor */
+    XclExpHFConverter(const XclExpHFConverter&) = delete;
+    /** delete copy-assignment operator */
+    const XclExpHFConverter& operator=(const XclExpHFConverter&) = delete;
+
     explicit            XclExpHFConverter( const XclExpRoot& rRoot );
 
     /** Generates the header/footer string from the passed edit engine text objects. */
@@ -389,20 +395,22 @@ private:
 /** This class contains static methods to encode a file URL.
     @descr  Excel stores URLs in a format that contains special control characters,
     i.e. for directory separators or volume names. */
-class XclExpUrlHelper : private boost::noncopyable
+class XclExpUrlHelper
 {
 public:
+    /** delete copy constructor */
+    XclExpUrlHelper(const XclExpUrlHelper&) = delete;
+    /** delete copy-assignment operator */
+    const XclExpUrlHelper& operator=(const XclExpUrlHelper&) = delete;
+    /** We don't want anybody to instantiate this class, since it is just a
+        collection of static methods. */
+    XclExpUrlHelper() = delete;
+
     /** Encodes and returns the URL passed in rAbsUrl to an Excel like URL.
         @param pTableName  Optional pointer to a table name to be encoded in this URL. */
     static OUString EncodeUrl( const XclExpRoot& rRoot, const OUString& rAbsUrl, const OUString* pTableName = nullptr );
     /** Encodes and returns the passed DDE link to an Excel like DDE link. */
     static OUString EncodeDde( const OUString& rApplic, const OUString& rTopic );
-
-private:
-    /** We don't want anybody to instantiate this class, since it is just a
-        collection of static methods. To enforce this, the default constructor
-        is made private */
-    XclExpUrlHelper();
 };
 
 class ScMatrix;
diff --git a/sc/source/filter/inc/xicontent.hxx b/sc/source/filter/inc/xicontent.hxx
index 5eb6811..47fabf3 100644
--- a/sc/source/filter/inc/xicontent.hxx
+++ b/sc/source/filter/inc/xicontent.hxx
@@ -31,7 +31,6 @@
 #include <map>
 #include <vector>
 #include <memory>
-#include <boost/noncopyable.hpp>
 
 /* ============================================================================
 Classes to import the big Excel document contents (related to several cells or
@@ -73,9 +72,17 @@ private:
 // Hyperlinks =================================================================
 
 /** Provides importing hyperlinks and inserting them into a document. */
-class XclImpHyperlink : private boost::noncopyable
+class XclImpHyperlink
 {
 public:
+    /** delete copy constructor */
+    XclImpHyperlink(const XclImpHyperlink&) = delete;
+    /** delete copy-assignment operator  */
+    const XclImpHyperlink& operator=(const XclImpHyperlink&) = delete;
+    /** We don't want anybody to instantiate this class, since it is just a
+        collection of static methods. */
+    XclImpHyperlink() = delete;
+
     /** Reads a HLINK record and inserts it into the document.
         @descr  Import stream must be located at start of a HLINK record. */
     static void         ReadHlink( XclImpStream& rStrm );
@@ -89,29 +96,24 @@ public:
     /** Convert the sheet name with invalid character(s) in URL when the URL is
         to a location within the same document (e.g. #'Sheet&Name'.A1). */
     static void         ConvertToValidTabName(OUString& rName);
-
-private:
-    /** We don't want anybody to instantiate this class, since it is just a
-        collection of static methods. To enforce this, the default constructor
-        is made private */
-    XclImpHyperlink();
 };
 
 // Label ranges ===============================================================
 
 /** Provides importing label ranges and inserting them into a document. */
-class XclImpLabelranges : private  boost::noncopyable
+class XclImpLabelranges
 {
 public:
+    /** delete copy constructor */
+    XclImpLabelranges(const XclImpLabelranges&) = delete;
+    /** delete copy-assignment operator */
+    const XclImpLabelranges& operator=(const XclImpLabelranges&) = delete;
+    /** We don't want anybody to instantiate this class, since it is just a
+        collection of static methods. */
+    XclImpLabelranges() = delete;
     /** Reads a LABELRANGES record and inserts the label ranges into the document.
         @descr  Import stream must be located at start of a LABELRANGES record. */
     static void         ReadLabelranges( XclImpStream& rStrm );
-
-private:
-    /** We don't want anybody to instantiate this class, since it is just a
-        collection of static methods. To enforce this, the default constructor
-        is made private */
-    XclImpLabelranges();
 };
 
 // Conditional formatting =====================================================
@@ -253,18 +255,20 @@ private:
 // Decryption =================================================================
 
 /** Provides static functions to import stream decryption settings. */
-class XclImpDecryptHelper : private boost::noncopyable
+class XclImpDecryptHelper
 {
 public:
+    /** delete copy constructor */
+    XclImpDecryptHelper(const XclImpDecryptHelper&) = delete;
+    /** delete copy-assignment operator */
+    const XclImpDecryptHelper& operator=(const XclImpDecryptHelper&) = delete;
+    /** We don't want anybody to instantiate this class, since it is just a
+        collection of static methods. */
+    XclImpDecryptHelper() = delete;
+
     /** Reads the FILEPASS record, queries a password and sets decryption algorithm.
         @return  Error code that may cause an error message after import. */
     static ErrCode      ReadFilepass( XclImpStream& rStrm );
-
-private:
-    /** We don't want anybody to instantiate this class, since it is just a
-        collection of static methods. To enforce this, the default constructor
-        is made private */
-    XclImpDecryptHelper();
 };
 
 // Document protection ========================================================
diff --git a/sc/source/filter/inc/xihelper.hxx b/sc/source/filter/inc/xihelper.hxx
index 08fb986..a0ff9bc 100644
--- a/sc/source/filter/inc/xihelper.hxx
+++ b/sc/source/filter/inc/xihelper.hxx
@@ -21,7 +21,6 @@
 #define INCLUDED_SC_SOURCE_FILTER_INC_XIHELPER_HXX
 
 #include <editeng/editdata.hxx>
-#include <boost/noncopyable.hpp>
 #include "types.hxx"
 #include "xladdress.hxx"
 #include "xiroot.hxx"
@@ -105,9 +104,16 @@ class EditTextObject;
 /** This class provides methods to convert an XclImpString.
     @The string can be converted to an edit engine text object or directly
     to a Calc edit cell. */
-class XclImpStringHelper : private boost::noncopyable
+class XclImpStringHelper
 {
 public:
+    /** delete copy constructor */
+    XclImpStringHelper(const XclImpStringHelper&) = delete;
+    /** delete copy-assignment operator */
+    const XclImpStringHelper& operator=(const XclImpStringHelper&) = delete;
+    /** We don't want anybody to instantiate this class, since it is just a
+        collection of static methods. */
+    XclImpStringHelper() = delete;
     /** Returns a new edit engine text object.
         @param nXFIndex  Index to XF for first text portion (for escapement). */
     static EditTextObject* CreateTextObject(
@@ -117,12 +123,6 @@ public:
     static void SetToDocument(
         ScDocumentImport& rDoc, const ScAddress& rPos, const XclImpRoot& rRoot,
         const XclImpString& rString, sal_uInt16 nXFIndex = 0 );
-
-private:
-    /** We don't want anybody to instantiate this class, since it is just a
-        collection of static methods. To enforce this, the default constructor
-        is made private */
-    XclImpStringHelper();
 };
 
 // Header/footer conversion ===================================================
@@ -162,9 +162,14 @@ struct XclFontData;
     Known but unsupported control sequences:
     &G                      picture
  */
-class XclImpHFConverter : protected XclImpRoot, private boost::noncopyable
+class XclImpHFConverter : protected XclImpRoot
 {
 public:
+    /** delete copy constructor */
+    XclImpHFConverter(const XclImpHFConverter&) = delete;
+    /** delete copy-assignment operator */
+    const XclImpHFConverter& operator=(const XclImpHFConverter&) = delete;
+
     explicit            XclImpHFConverter( const XclImpRoot& rRoot );
                         virtual ~XclImpHFConverter();
 
@@ -247,9 +252,17 @@ private:
 /** This class contains static methods to decode an URL stored in an Excel file.
     @descr  Excel URLs can contain a sheet name, for instance: path\[test.xls]Sheet1
     This sheet name will be extracted automatically. */
-class XclImpUrlHelper : private boost::noncopyable
+class XclImpUrlHelper
 {
 public:
+    /** delete copy constructor */
+    XclImpUrlHelper(const XclImpUrlHelper&) = delete;
+    /** delete copy-assignment operator */
+    const XclImpUrlHelper& operator=(const XclImpUrlHelper&) = delete;
+    /** We don't want anybody to instantiate this class, since it is just a
+        collection of static methods. */
+    XclImpUrlHelper() = delete;
+
     /** Decodes an encoded external document URL with optional sheet name.
         @param rUrl  Returns the decoded file name incl. path.
         @param rTabName  Returns the decoded sheet name.
@@ -278,12 +291,6 @@ public:
         For OLE object links: Decodes to class name and document URL.
         @return  true = decoding was successful, returned strings are valid (not empty). */
     static bool         DecodeLink( OUString& rApplic, OUString& rTopic, const OUString& rEncUrl );
-
-private:
-    /** We don't want anybody to instantiate this class, since it is just a
-        collection of static methods. To enforce this, the default constructor
-        is made private */
-    XclImpUrlHelper();
 };
 
 // Cached values ==============================================================
@@ -292,9 +299,13 @@ class ScTokenArray;
 
 /** This class stores one cached value of a cached value list (used for instance in
     CRN, EXTERNNAME, tArray). */
-class XclImpCachedValue : private boost::noncopyable
+class XclImpCachedValue
 {
 public:
+    /** delete copy constructor */
+    XclImpCachedValue(const XclImpCachedValue&) = delete;
+    /** delete copy-assignment operator */
+    const XclImpCachedValue& operator=(const XclImpCachedValue&) = delete;
     /** Creates a cached value and reads contents from stream and stores it with its array address. */
     explicit            XclImpCachedValue( XclImpStream& rStrm );
     virtual             ~XclImpCachedValue();
diff --git a/sc/source/filter/inc/xiname.hxx b/sc/source/filter/inc/xiname.hxx
index 8c06a13..ca3b8dc 100644
--- a/sc/source/filter/inc/xiname.hxx
+++ b/sc/source/filter/inc/xiname.hxx
@@ -26,7 +26,6 @@
 
 #include "rangenam.hxx"
 
-#include <boost/noncopyable.hpp>
 #include <memory>
 #include <vector>
 
@@ -34,7 +33,7 @@ class ScRangeData;
 class ScTokenArray;
 
 /** Represents a defined name. It may be related to a single sheet or global. */
-class XclImpName : protected XclImpRoot, public boost::noncopyable
+class XclImpName : protected XclImpRoot
 {
     struct TokenStrmData
     {
@@ -47,6 +46,9 @@ class XclImpName : protected XclImpRoot, public boost::noncopyable
     };
 
 public:
+    XclImpName(const XclImpName&) = delete;
+    const XclImpName& operator=(const XclImpName&) = delete;
+
     explicit            XclImpName( XclImpStream& rStrm, sal_uInt16 nXclNameIdx );
 
     inline const OUString& GetXclName() const { return maXclName; }
diff --git a/sc/source/filter/inc/xistyle.hxx b/sc/source/filter/inc/xistyle.hxx
index 55c4132..0237d50 100644
--- a/sc/source/filter/inc/xistyle.hxx
+++ b/sc/source/filter/inc/xistyle.hxx
@@ -24,7 +24,6 @@
 #include <memory>
 #include <vector>
 #include <tools/mempool.hxx>
-#include <boost/noncopyable.hpp>
 #include "rangelst.hxx"
 #include "patattr.hxx"
 #include "xladdress.hxx"
@@ -156,9 +155,14 @@ private:
 };
 
 /** Stores the data of all fonts occurred in an Excel file. */
-class XclImpFontBuffer : protected XclImpRoot, private boost::noncopyable
+class XclImpFontBuffer : protected XclImpRoot
 {
 public:
+    /** delete copy constructor */
+    XclImpFontBuffer(const XclImpFontBuffer&) = delete;
+    /** delete copy-assignment operator */
+    const XclImpFontBuffer& operator=(const XclImpFontBuffer&) = delete;
+
     explicit            XclImpFontBuffer( const XclImpRoot& rRoot );
 
     /** Clears all buffered data, used to set up for a new sheet. */
@@ -376,9 +380,13 @@ inline bool operator!=( const XclImpXFIndex& rLeft, const XclImpXFIndex& rRight
 { return !(rLeft == rRight); }
 
 /** Contains all data of a XF record and a Calc item set. */
-class XclImpXF : public XclXFBase, protected XclImpRoot, private boost::noncopyable
+class XclImpXF : public XclXFBase, protected XclImpRoot
 {
 public:
+    /** make noncopyable */
+    XclImpXF(const XclImpXF&) = delete;
+    const XclImpXF& operator=(const XclImpXF&) = delete;
+
     explicit            XclImpXF( const XclImpRoot& rRoot );
     virtual             ~XclImpXF();
 
@@ -472,9 +480,13 @@ private:
 
 /** Contains all XF records occurred in the file.
     @descr  This class is able to read XF records (BIFF2 - BIFF8) and STYLE records (BIFF8). */
-class XclImpXFBuffer : protected XclImpRoot, private boost::noncopyable
+class XclImpXFBuffer : protected XclImpRoot
 {
 public:
+    /** make noncopyable */
+    XclImpXFBuffer(const XclImpXFBuffer&) = delete;
+    const XclImpXFBuffer& operator=(const XclImpXFBuffer&) = delete;
+
     explicit            XclImpXFBuffer( const XclImpRoot& rRoot );
 
     /** Clears all buffered data, used to set up for a new sheet. */
@@ -557,9 +569,13 @@ inline bool XclImpXFRange::Contains( SCROW nScRow ) const
 }
 
 /** Contains the XF indexes for every used cell in a column. */
-class XclImpXFRangeColumn : private boost::noncopyable
+class XclImpXFRangeColumn
 {
 public:
+    /** make noncopyable */
+    XclImpXFRangeColumn(const XclImpXFRangeColumn&) = delete;
+    const XclImpXFRangeColumn& operator=(const XclImpXFRangeColumn&) = delete;
+
     typedef std::vector< std::unique_ptr<XclImpXFRange> > IndexList;
 
     inline explicit     XclImpXFRangeColumn() {}
@@ -595,9 +611,13 @@ private:
 };
 
 /** Contains the XF indexes for every used cell in a single sheet. */
-class XclImpXFRangeBuffer : protected XclImpRoot, private boost::noncopyable
+class XclImpXFRangeBuffer : protected XclImpRoot
 {
 public:
+    /** make noncopyable */
+    XclImpXFRangeBuffer(const XclImpXFRangeBuffer&) = delete;
+    const XclImpXFRangeBuffer& operator=(const XclImpXFRangeBuffer&) = delete;
+
     explicit            XclImpXFRangeBuffer( const XclImpRoot& rRoot );
     virtual             ~XclImpXFRangeBuffer();
 
diff --git a/sc/source/filter/inc/xlpage.hxx b/sc/source/filter/inc/xlpage.hxx
index b60d21a..9fe993c 100644
--- a/sc/source/filter/inc/xlpage.hxx
+++ b/sc/source/filter/inc/xlpage.hxx
@@ -21,7 +21,6 @@
 #define INCLUDED_SC_SOURCE_FILTER_INC_XLPAGE_HXX
 
 #include <tools/gen.hxx>
-#include <boost/noncopyable.hpp>
 #include "xltools.hxx"
 #include <memory>
 
@@ -90,8 +89,12 @@ const sal_uInt16 EXC_PAPERSIZE_USER         = 0xFFFF;
 class SvxBrushItem;
 
 /** Contains all page (print) settings for a single sheet. */
-struct XclPageData : private boost::noncopyable
+struct XclPageData
 {
+    /** noncopyable */
+    XclPageData(const XclPageData&) = delete;
+    const XclPageData& operator=(const XclPageData&) = delete;
+
     typedef std::unique_ptr< SvxBrushItem > SvxBrushItemPtr;
 
     ScfUInt16Vec        maHorPageBreaks;    /// Horizontal page breaks.
diff --git a/sc/source/filter/inc/xltools.hxx b/sc/source/filter/inc/xltools.hxx
index 7e203f7..fa0b952 100644
--- a/sc/source/filter/inc/xltools.hxx
+++ b/sc/source/filter/inc/xltools.hxx
@@ -22,7 +22,6 @@
 
 #include "address.hxx"
 #include "ftools.hxx"
-#include <boost/noncopyable.hpp>
 
 class SfxObjectShell;
 
@@ -76,9 +75,18 @@ XclExpStream& operator<<( XclExpStream& rStrm, const XclGuid& rGuid );
 // Excel Tools ================================================================
 
 /** This class contains static helper methods for the Excel import and export filters. */
-class XclTools : private boost::noncopyable
+class XclTools
 {
 public:
+    // noncopyable nonconstructable -------------------------------------------
+
+    XclTools(const XclTools&) = delete;
+    const XclTools& operator=(const XclTools&) = delete;
+    /** We don't want anybody to instantiate this class, since it is just a
+        collection of static items. */
+    XclTools() = delete;
+
+
     // GUID's -----------------------------------------------------------------
 
     static const XclGuid maGuidStdLink;     /// GUID of StdLink (HLINK record).
@@ -238,11 +246,6 @@ private:
     static const OUString maCFStyleNamePrefix2; /// Prefix for cond. formatting style names from OOX filter.
     static const OUString maSbMacroPrefix;   /// Prefix for StarBasic macros.
     static const OUString maSbMacroSuffix;   /// Suffix for StarBasic macros.
-
-    /** We don't want anybody to instantiate this class, since it is just a
-        collection of static items. To enforce this, the default constructor
-        is made private */
-    XclTools();
 };
 
 // read/write colors ----------------------------------------------------------
diff --git a/sc/source/filter/oox/formulabuffer.cxx b/sc/source/filter/oox/formulabuffer.cxx
index 818dd4d..9c010cb 100644
--- a/sc/source/filter/oox/formulabuffer.cxx
+++ b/sc/source/filter/oox/formulabuffer.cxx
@@ -36,7 +36,6 @@ using namespace ::com::sun::star::table;
 using namespace ::com::sun::star::sheet;
 using namespace ::com::sun::star::container;
 
-#include <boost/noncopyable.hpp>
 #include <memory>
 
 namespace oox { namespace xls {
@@ -47,15 +46,20 @@ namespace {
  * Cache the token array for the last cell position in each column. We use
  * one cache per sheet.
  */
-class CachedTokenArray : private boost::noncopyable
+class CachedTokenArray
 {
 public:
+    CachedTokenArray(const CachedTokenArray&) = delete;
+    const CachedTokenArray& operator=(const CachedTokenArray&) = delete;
 
-    struct Item : boost::noncopyable
+    struct Item
     {
         SCROW mnRow;
         ScFormulaCell* mpCell;
 
+        Item(const Item&) = delete;
+        const Item& operator=(const Item&) = delete;
+
         Item() : mnRow(-1), mpCell(nullptr) {}
     };
 
@@ -307,7 +311,7 @@ void processSheetFormulaCells(
         applyCellFormulaValues(rDoc, *rItem.mpCellFormulaValues);
 }
 
-class WorkerThread: public salhelper::Thread, private boost::noncopyable
+class WorkerThread: public salhelper::Thread
 {
     ScDocumentImport& mrDoc;
     FormulaBuffer::SheetItem& mrItem;
@@ -315,6 +319,9 @@ class WorkerThread: public salhelper::Thread, private boost::noncopyable
     const uno::Sequence<sheet::ExternalLinkInfo>& mrExternalLinks;
 
 public:
+    WorkerThread(const WorkerThread&) = delete;
+    const WorkerThread& operator=(const WorkerThread&) = delete;
+
     WorkerThread(
         ScDocumentImport& rDoc, FormulaBuffer::SheetItem& rItem, SvNumberFormatter* pFormatter,
         const uno::Sequence<sheet::ExternalLinkInfo>& rExternalLinks ) :
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index 62bc87d..546d4f4 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -85,7 +85,6 @@
 #include <comphelper/processfactory.hxx>
 #include <officecfg/Office/Calc.hxx>
 
-#include <boost/noncopyable.hpp>
 #include <memory>
 
 namespace oox {
@@ -110,9 +109,14 @@ bool IgnoreCaseCompare::operator()( const OUString& rName1, const OUString& rNam
     return rName1.compareToIgnoreAsciiCase(rName2 ) < 0;
 }
 
-class WorkbookGlobals : private boost::noncopyable
+class WorkbookGlobals
 {
 public:
+    // noncopyable ------------------------------------------------------------
+
+    WorkbookGlobals(const WorkbookGlobals&) = delete;
+    const WorkbookGlobals& operator=(const WorkbookGlobals&) = delete;
+
     explicit            WorkbookGlobals( ExcelFilter& rFilter );
                         ~WorkbookGlobals();
 
diff --git a/sc/source/filter/xml/XMLExportIterator.hxx b/sc/source/filter/xml/XMLExportIterator.hxx
index 203f2f4..2419616 100644
--- a/sc/source/filter/xml/XMLExportIterator.hxx
+++ b/sc/source/filter/xml/XMLExportIterator.hxx
@@ -36,7 +36,6 @@
 #include "postit.hxx"
 #include "cellvalue.hxx"
 
-#include <boost/noncopyable.hpp>
 #include <memory>
 
 class   ScHorizontalCellIterator;
@@ -315,8 +314,11 @@ struct ScMyCell
                                 ~ScMyCell();
 };
 
-class ScMyNotEmptyCellsIterator : private boost::noncopyable
+class ScMyNotEmptyCellsIterator
 {
+    ScMyNotEmptyCellsIterator(const ScMyNotEmptyCellsIterator&) = delete;
+    const ScMyNotEmptyCellsIterator& operator=(const ScMyNotEmptyCellsIterator&) = delete;
+
     css::uno::Reference<css::sheet::XSpreadsheet> xTable;
     css::uno::Reference<css::table::XCellRange> xCellRange;
     css::table::CellAddress             aLastAddress;
diff --git a/sc/source/filter/xml/xmlcelli.hxx b/sc/source/filter/xml/xmlcelli.hxx
index 56090ca..883b3c7 100644
--- a/sc/source/filter/xml/xmlcelli.hxx
+++ b/sc/source/filter/xml/xmlcelli.hxx
@@ -28,7 +28,6 @@
 #include <editeng/flditem.hxx>
 
 #include <boost/optional.hpp>
-#include <boost/noncopyable.hpp>
 #include <memory>
 #include <vector>
 
@@ -47,11 +46,14 @@ class ScXMLTableRowCellContext : public ScXMLImportContext
         explicit ParaFormat(ScEditEngineDefaulter& rEditEngine);
     };
 
-    struct Field : boost::noncopyable
+    struct Field
     {
         SvxFieldData* mpData;
         ESelection maSelection;
 
+        Field(const Field&) = delete;
+        const Field& operator=(const Field&) = delete;
+
         explicit Field(SvxFieldData* pData);
         ~Field();
     };
diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx
index 395c0e8..18aaddf 100644
--- a/sc/source/filter/xml/xmlimprt.hxx
+++ b/sc/source/filter/xml/xmlimprt.hxx
@@ -42,8 +42,6 @@
 #include <com/sun/star/util/XNumberFormatTypes.hpp>
 #include <com/sun/star/sheet/XSheetCellRangeContainer.hpp>
 
-#include <boost/noncopyable.hpp>
-
 #include <memory>
 #include <unordered_map>
 #include <map>
@@ -820,8 +818,11 @@ typedef std::vector<ScMyImportValidation>           ScMyImportValidations;
 class ScMyStylesImportHelper;
 class ScXMLEditAttributeMap;
 
-class ScXMLImport: public SvXMLImport, private boost::noncopyable
+class ScXMLImport: public SvXMLImport
 {
+    ScXMLImport(const ScXMLImport&) = delete;
+    const ScXMLImport& operator=(const ScXMLImport&) = delete;
+
     typedef std::unordered_map< OUString, sal_Int16, OUStringHash >   CellTypeMap;
     typedef ::std::map<SCTAB, std::unique_ptr<ScMyNamedExpressions>> SheetNamedExpMap;
 
diff --git a/sc/source/ui/docshell/documentlinkmgr.cxx b/sc/source/ui/docshell/documentlinkmgr.cxx
index 322c1bb..3b17a66 100644
--- a/sc/source/ui/docshell/documentlinkmgr.cxx
+++ b/sc/source/ui/docshell/documentlinkmgr.cxx
@@ -26,17 +26,19 @@
 #include <sfx2/linkmgr.hxx>
 #include <vcl/layout.hxx>
 
-#include <boost/noncopyable.hpp>
 #include <memory>
 
 namespace sc {
 
-struct DocumentLinkManagerImpl : boost::noncopyable
+struct DocumentLinkManagerImpl
 {
     SfxObjectShell* mpShell;
     std::unique_ptr<DataStream> mpDataStream;
     std::unique_ptr<sfx2::LinkManager> mpLinkManager;
 
+    DocumentLinkManagerImpl(const DocumentLinkManagerImpl&) = delete;
+    const DocumentLinkManagerImpl& operator=(const DocumentLinkManagerImpl&) = delete;
+
     explicit DocumentLinkManagerImpl(SfxObjectShell* pShell)
         : mpShell(pShell), mpDataStream(nullptr), mpLinkManager(nullptr) {}
 
diff --git a/sc/source/ui/inc/datastream.hxx b/sc/source/ui/inc/datastream.hxx
index cf9b93d..c60bec0 100644
--- a/sc/source/ui/inc/datastream.hxx
+++ b/sc/source/ui/inc/datastream.hxx
@@ -17,7 +17,6 @@
 #include <vcl/timer.hxx>
 #include <address.hxx>
 
-#include <boost/noncopyable.hpp>
 #include <vector>
 
 #include <documentstreamaccess.hxx>
@@ -33,9 +32,12 @@ namespace datastreams {
     class ReaderThread;
 }
 
-class DataStream : private boost::noncopyable
+class DataStream
 {
 public:
+    DataStream(const DataStream&) = delete;
+    const DataStream& operator=(const DataStream&) = delete;
+
     struct Cell
     {
         struct Str
diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx
index 473a6fd..98f7d4d 100644
--- a/sc/source/ui/inc/filtdlg.hxx
+++ b/sc/source/ui/inc/filtdlg.hxx
@@ -35,7 +35,6 @@
 #include <deque>
 #include <vector>
 #include <map>
-#include <boost/noncopyable.hpp>
 
 class ScFilterOptionsMgr;
 class ScViewData;
@@ -44,10 +43,14 @@ class ScQueryItem;
 
 class ScFilterDlg : public ScAnyRefDlg
 {
-    struct EntryList : boost::noncopyable
+    struct EntryList
     {
         std::vector<ScTypedStrData> maList;
         size_t mnHeaderPos;
+
+        EntryList(const EntryList&) = delete;
+        const EntryList& operator=(const EntryList&) = delete;
+
         EntryList();
     };
     typedef std::map<SCCOL, std::unique_ptr<EntryList>> EntryListsMap;
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index ee2632c..562955b 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -33,8 +33,6 @@
 
 #include <set>
 
-#include <boost/noncopyable.hpp>
-
 class ScDocument;
 class ScTabViewShell;
 class ScInputWindow;
@@ -52,7 +50,7 @@ struct ESelection;
 
 //  ScInputHandler
 
-class ScInputHandler : private boost::noncopyable
+class ScInputHandler
 {
 private:
     VclPtr<ScInputWindow>          pInputWin;
@@ -163,6 +161,9 @@ private:
     DECL_LINK_TYPED( ShowHideTipVisibleSecParentListener, VclWindowEvent&, void );
 
 public:
+    ScInputHandler(const ScInputHandler&) = delete;
+    const ScInputHandler& operator=(const ScInputHandler&) = delete;
+
                     ScInputHandler();
     virtual         ~ScInputHandler();
 
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index fee9cf9..685de7d 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -29,8 +29,6 @@
 #include "gridwin.hxx"
 #include "drawview.hxx"
 
-#include <boost/noncopyable.hpp>
-
 namespace editeng {
     struct MisspellRanges;
 }
@@ -80,7 +78,7 @@ public:
     virtual void    DataChanged( const DataChangedEvent& rDCEvt ) override;
 };
 
-class ScTabView : private boost::noncopyable
+class ScTabView
 {
 private:
     enum BlockMode { None = 0, Normal = 1, Own = 2 };
@@ -226,6 +224,10 @@ protected:
     void            UpdateIMap( SdrObject* pObj );
 
 public:
+    /** make noncopyable */
+                    ScTabView(const ScTabView&) = delete;
+    const ScTabView&    operator=(const ScTabView&) = delete;
+
                     ScTabView( vcl::Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell );
                     ~ScTabView();
 
diff --git a/sc/source/ui/sidebar/ScPanelFactory.hxx b/sc/source/ui/sidebar/ScPanelFactory.hxx
index 92a88b1..989de37 100644
--- a/sc/source/ui/sidebar/ScPanelFactory.hxx
+++ b/sc/source/ui/sidebar/ScPanelFactory.hxx
@@ -24,7 +24,6 @@
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/ui/XUIElementFactory.hpp>
-#include <boost/noncopyable.hpp>
 
 
 namespace sc { namespace sidebar {
@@ -37,11 +36,14 @@ namespace
 }
 
 class ScPanelFactory
-    : private ::boost::noncopyable,
-      private ::cppu::BaseMutex,
+    : private ::cppu::BaseMutex,
       public PanelFactoryInterfaceBase
 {
 public:
+    // noncopyable
+    ScPanelFactory(const ScPanelFactory&) = delete;
+    const ScPanelFactory& operator=(const ScPanelFactory&) = delete;
+
     ScPanelFactory();
     virtual ~ScPanelFactory();
 
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 160c94e..d331f2c 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -20,7 +20,6 @@
 #include <sal/config.h>
 
 #include <utility>
-#include <boost/noncopyable.hpp>
 
 #include "chart2uno.hxx"
 #include "miscuno.hxx"
@@ -139,12 +138,17 @@ uno::Reference< frame::XModel > lcl_GetXModel( ScDocument * pDoc )
     return xModel;
 }
 
-struct TokenTable : boost::noncopyable
+struct TokenTable
 {
     SCROW mnRowCount;
     SCCOL mnColCount;
     vector<FormulaToken*> maTokens;
 
+    // noncopyable
+    TokenTable(const TokenTable&) = delete;
+    const TokenTable& operator=(const TokenTable&) = delete;
+
+    TokenTable() = default;
     void init( SCCOL nColCount, SCROW nRowCount )
     {
         mnColCount = nColCount;
@@ -426,7 +430,7 @@ vector<ScTokenRef> Chart2PositionMap::getDataRowRanges(SCROW nRow) const
  * Designed to be a drop-in replacement for ScChartPositioner, in order to
  * handle external references.
  */
-class Chart2Positioner : private boost::noncopyable
+class Chart2Positioner
 {
     enum GlueType
     {
@@ -438,6 +442,9 @@ class Chart2Positioner : private boost::noncopyable
     };
 
 public:
+    Chart2Positioner(const Chart2Positioner&) = delete;
+    const Chart2Positioner& operator=(const Chart2Positioner&) = delete;
+
     Chart2Positioner(ScDocument* pDoc, const vector<ScTokenRef>& rRefTokens) :
         mrRefTokens(rRefTokens),
         mpPositionMap(nullptr),
diff --git a/sc/workben/dpcache/perf-test.cpp b/sc/workben/dpcache/perf-test.cpp
index b606e47..8bc5026 100644
--- a/sc/workben/dpcache/perf-test.cpp
+++ b/sc/workben/dpcache/perf-test.cpp
@@ -17,8 +17,6 @@
 #include <algorithm>
 #include <functional>
 
-#include <boost/noncopyable.hpp>
-
 using namespace std;
 
 namespace {
@@ -68,11 +66,14 @@ double multiplier = 10.0;
 bool dump_values = true;
 #endif
 
-struct field : boost::noncopyable
+struct field
 {
     std::vector<int> items;   /// unique values
     std::vector<size_t> data;   /// original value series as indices into unique values.
     std::vector<size_t> order;  /// ascending order of the values as indices.
+
+    field(const field&) = delete;
+    const field operator=(const field&) = delete;
 };
 
 long compare(int left, int right)


More information about the Libreoffice-commits mailing list