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

Jochen Nitschke j.nitschke+logerrit at ok.de
Tue Apr 26 16:44:38 UTC 2016


 sc/inc/clipcontext.hxx             |    9 +++------
 sc/inc/documentimport.hxx          |    3 +--
 sc/inc/dpoutputgeometry.hxx        |    3 +--
 sc/inc/dpshttab.hxx                |    4 ++--
 sc/inc/editdataarray.hxx           |    4 +---
 sc/inc/fielduno.hxx                |    3 +--
 sc/inc/fmtuno.hxx                  |    8 ++++----
 sc/inc/grouparealistener.hxx       |    3 +--
 sc/inc/hints.hxx                   |    3 +--
 sc/inc/queryparam.hxx              |    3 +--
 sc/inc/refhint.hxx                 |    3 +--
 sc/inc/styleuno.hxx                |    2 +-
 sc/inc/textuno.hxx                 |    4 ++--
 sc/inc/token.hxx                   |   10 ++++------
 sc/inc/viewuno.hxx                 |    2 +-
 sc/source/core/inc/addinhelpid.hxx |    2 +-
 sc/source/core/inc/doubleref.hxx   |    4 ++--
 sc/source/filter/inc/ftools.hxx    |    8 +++-----
 sc/source/filter/inc/xestream.hxx  |    7 ++++---
 sc/source/ui/inc/protectiondlg.hxx |    3 +--
 sc/source/ui/inc/retypepassdlg.hxx |    6 ++----
 sc/source/ui/inc/uiitems.hxx       |    4 +---
 22 files changed, 39 insertions(+), 59 deletions(-)

New commits:
commit 2bb6221b39192d23ff0ceac3619461949edb5204
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Tue Apr 26 16:10:13 2016 +0200

    C++11: disable ctors instead of not implementing them (sc)
    
    replace the old declare and don't implement pattern
    with C++11 delete keyword
    
    Change-Id: I96c71d512d8dab4ad7c806c2e871604163fc49c1
    Reviewed-on: https://gerrit.libreoffice.org/24399
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: David Tardon <dtardon at redhat.com>

diff --git a/sc/inc/clipcontext.hxx b/sc/inc/clipcontext.hxx
index 0e9a27b..31a1c60 100644
--- a/sc/inc/clipcontext.hxx
+++ b/sc/inc/clipcontext.hxx
@@ -32,9 +32,8 @@ class ClipContextBase
 {
     std::unique_ptr<ColumnBlockPositionSet> mpSet;
 
-    ClipContextBase(); // disabled
-
 public:
+    ClipContextBase() = delete;
     ClipContextBase(const ClipContextBase&) = delete;
     const ClipContextBase& operator=(const ClipContextBase&) = delete;
     ClipContextBase(ScDocument& rDoc);
@@ -68,8 +67,6 @@ class CopyFromClipContext : public ClipContextBase
     bool mbCloneNotes:1;
     bool mbTableProtected:1;
 
-    CopyFromClipContext(); // disabled
-
 public:
 
     struct Range
@@ -80,6 +77,7 @@ public:
         SCROW mnRow2;
     };
 
+    CopyFromClipContext() = delete;
     CopyFromClipContext(ScDocument& rDoc,
         ScDocument* pRefUndoDoc, ScDocument* pClipDoc, InsertDeleteFlags nInsertFlag,
         bool bAsLink, bool bSkipAttrForEmptyCells);
@@ -137,9 +135,8 @@ class CopyToClipContext : public ClipContextBase
     bool mbKeepScenarioFlags:1;
     bool mbCloneNotes:1;
 
-    CopyToClipContext(); // disabled
-
 public:
+    CopyToClipContext() = delete;
     CopyToClipContext(ScDocument& rDoc, bool bKeepScenarioFlags, bool bCloneNotes);
     virtual ~CopyToClipContext();
 
diff --git a/sc/inc/documentimport.hxx b/sc/inc/documentimport.hxx
index 765a921..1d8641a 100644
--- a/sc/inc/documentimport.hxx
+++ b/sc/inc/documentimport.hxx
@@ -41,8 +41,6 @@ class SC_DLLPUBLIC ScDocumentImport
 {
     std::unique_ptr<ScDocumentImportImpl> mpImpl;
 
-    ScDocumentImport(); // disabled
-
 public:
 
     struct SC_DLLPUBLIC Attrs
@@ -55,6 +53,7 @@ public:
         Attrs();
     };
 
+    ScDocumentImport() = delete;
     ScDocumentImport(ScDocument& rDoc);
     ScDocumentImport(const ScDocumentImport&) = delete;
     const ScDocumentImport& operator=(const ScDocumentImport&) = delete;
diff --git a/sc/inc/dpoutputgeometry.hxx b/sc/inc/dpoutputgeometry.hxx
index 7cc9297..d5202ae 100644
--- a/sc/inc/dpoutputgeometry.hxx
+++ b/sc/inc/dpoutputgeometry.hxx
@@ -30,6 +30,7 @@ class SC_DLLPUBLIC ScDPOutputGeometry
 public:
     enum FieldType { Column = 0, Row, Page, Data, None };
 
+    ScDPOutputGeometry() = delete;
     ScDPOutputGeometry(const ScRange& rOutRange, bool bShowFilter);
     ~ScDPOutputGeometry();
 
@@ -51,8 +52,6 @@ public:
     std::pair<FieldType, size_t> getFieldButtonType(const ScAddress& rPos) const;
 
 private:
-    ScDPOutputGeometry(); // disabled
-
     void adjustFieldsForDataLayout(sal_uInt32& rColumnFields, sal_uInt32& rRowFields) const;
 
 private:
diff --git a/sc/inc/dpshttab.hxx b/sc/inc/dpshttab.hxx
index c3adf8e..7ee71a3 100644
--- a/sc/inc/dpshttab.hxx
+++ b/sc/inc/dpshttab.hxx
@@ -43,9 +43,9 @@ class ScDPDimensionSaveData;
  */
 class ScSheetSourceDesc
 {
-    ScSheetSourceDesc(); // disabled
-
 public:
+    ScSheetSourceDesc() = delete;
+
     SC_DLLPUBLIC ScSheetSourceDesc(ScDocument* pDoc);
 
     SC_DLLPUBLIC void SetSourceRange(const ScRange& rRange);
diff --git a/sc/inc/editdataarray.hxx b/sc/inc/editdataarray.hxx
index a917dcd..37fd1f9 100644
--- a/sc/inc/editdataarray.hxx
+++ b/sc/inc/editdataarray.hxx
@@ -34,6 +34,7 @@ public:
     class Item
     {
     public:
+        Item() = delete;
         explicit Item(SCTAB nTab, SCCOL nCol, SCROW nRow,
                       EditTextObject* pOldData, EditTextObject* pNewData);
         ~Item();
@@ -45,9 +46,6 @@ public:
         SCROW GetRow() const { return mnRow;}
 
     private:
-        Item(); // disabled
-
-    private:
         std::shared_ptr<EditTextObject> mpOldData;
         std::shared_ptr<EditTextObject> mpNewData;
         SCTAB mnTab;
diff --git a/sc/inc/fielduno.hxx b/sc/inc/fielduno.hxx
index 0616be1..08c768d 100644
--- a/sc/inc/fielduno.hxx
+++ b/sc/inc/fielduno.hxx
@@ -191,6 +191,7 @@ class ScEditFieldObj : public cppu::WeakImplHelper<
                         public ScMutexHelper,
                         public ::cppu::OComponentHelper
 {
+    ScEditFieldObj() = delete;
     ScEditFieldObj(const ScEditFieldObj&) = delete;
     const ScEditFieldObj& operator=(const ScEditFieldObj&) = delete;
 
@@ -208,8 +209,6 @@ class ScEditFieldObj : public cppu::WeakImplHelper<
     bool mbIsFixed:1;
 
 private:
-    ScEditFieldObj(); // disabled
-
     SvxFieldData* getData();
 
     void setPropertyValueURL(const OUString& rName, const css::uno::Any& rVal);
diff --git a/sc/inc/fmtuno.hxx b/sc/inc/fmtuno.hxx
index 5b870ea..76209ad 100644
--- a/sc/inc/fmtuno.hxx
+++ b/sc/inc/fmtuno.hxx
@@ -78,9 +78,8 @@ private:
 
     ScTableConditionalEntry*    GetObjectByIndex_Impl(sal_uInt16 nIndex) const;
     void                        AddEntry_Impl(const ScCondFormatEntryItem& aEntry);
-
-    ScTableConditionalFormat(); // disable
 public:
+                            ScTableConditionalFormat() = delete;
                             ScTableConditionalFormat(ScDocument* pDoc, sal_uLong nKey,
                                     SCTAB nTab, formula::FormulaGrammar::Grammar eGrammar);
     virtual                 ~ScTableConditionalFormat();
@@ -145,8 +144,8 @@ class ScTableConditionalEntry : public cppu::WeakImplHelper<
 private:
     ScCondFormatEntryItem       aData;
 
-    ScTableConditionalEntry(); // disabled
 public:
+                            ScTableConditionalEntry() = delete;
                             ScTableConditionalEntry(const ScCondFormatEntryItem& aItem);
     virtual                 ~ScTableConditionalEntry();
 
@@ -219,8 +218,9 @@ private:
 
     void                    ClearData_Impl();
 
-    ScTableValidationObj(); // disabled
 public:
+
+                            ScTableValidationObj() = delete;
                             ScTableValidationObj(ScDocument* pDoc, sal_uLong nKey,
                                                 const formula::FormulaGrammar::Grammar eGrammar);
     virtual                 ~ScTableValidationObj();
diff --git a/sc/inc/grouparealistener.hxx b/sc/inc/grouparealistener.hxx
index 5c6fee9..eab9edb 100644
--- a/sc/inc/grouparealistener.hxx
+++ b/sc/inc/grouparealistener.hxx
@@ -35,10 +35,9 @@ class FormulaGroupAreaListener : public SvtListener
     bool mbStartFixed;
     bool mbEndFixed;
 
-    FormulaGroupAreaListener(); // disabled
-
 public:
 
+    FormulaGroupAreaListener() = delete;
     FormulaGroupAreaListener( const ScRange& rRange, const ScDocument& rDocument,
             const ScAddress& rTopCellPos, SCROW nGroupLen, bool bStartFixed, bool bEndFixed );
 
diff --git a/sc/inc/hints.hxx b/sc/inc/hints.hxx
index f219973..9999326 100644
--- a/sc/inc/hints.hxx
+++ b/sc/inc/hints.hxx
@@ -30,9 +30,8 @@ class ScPaintHint : public SfxHint
     sal_uInt16  nParts;
     bool        bPrint;     //  flag indicating whether print/preview if affected
 
-    ScPaintHint(); // disabled
-
 public:
+                    ScPaintHint() = delete;
                     ScPaintHint( const ScRange& rRng, sal_uInt16 nPaint = PAINT_ALL );
                     virtual ~ScPaintHint();
 
diff --git a/sc/inc/queryparam.hxx b/sc/inc/queryparam.hxx
index dba6c53..c1ea63a 100644
--- a/sc/inc/queryparam.hxx
+++ b/sc/inc/queryparam.hxx
@@ -119,14 +119,13 @@ struct ScDBQueryParamBase : public ScQueryParamBase
 
     DataType        GetType() const { return meType;}
 
+    ScDBQueryParamBase() = delete;
     virtual ~ScDBQueryParamBase();
 
 protected:
     ScDBQueryParamBase(DataType eType);
 
 private:
-    ScDBQueryParamBase();
-
     DataType        meType;
 };
 
diff --git a/sc/inc/refhint.hxx b/sc/inc/refhint.hxx
index 8d00ae1..ffbe7fe 100644
--- a/sc/inc/refhint.hxx
+++ b/sc/inc/refhint.hxx
@@ -32,12 +32,11 @@ public:
 private:
     Type meType;
 
-    RefHint(); // disabled
-
 protected:
     RefHint( Type eType );
 
 public:
+    RefHint() = delete;
     virtual ~RefHint() = 0;
 
     Type getType() const;
diff --git a/sc/inc/styleuno.hxx b/sc/inc/styleuno.hxx
index a532698..d1a8fd9 100644
--- a/sc/inc/styleuno.hxx
+++ b/sc/inc/styleuno.hxx
@@ -231,8 +231,8 @@ private:
                                                   css::uno::RuntimeException,
                                                   std::exception);
 
-    ScStyleObj(); // disabled
 public:
+                            ScStyleObj() = delete;
                             ScStyleObj(ScDocShell* pDocSh, SfxStyleFamily eFam, const OUString& rName);
     virtual                 ~ScStyleObj();
 
diff --git a/sc/inc/textuno.hxx b/sc/inc/textuno.hxx
index 607e65b..861a178 100644
--- a/sc/inc/textuno.hxx
+++ b/sc/inc/textuno.hxx
@@ -64,12 +64,12 @@ private:
     rtl::Reference<ScHeaderFooterTextObj> mxCenterText;
     rtl::Reference<ScHeaderFooterTextObj> mxRightText;
 
-    ScHeaderFooterContentObj(); // disabled
-
 public:
     ScHeaderFooterContentObj( const EditTextObject* pLeft,
                               const EditTextObject* pCenter,
                               const EditTextObject* pRight );
+
+                            ScHeaderFooterContentObj() = delete;
     virtual                 ~ScHeaderFooterContentObj();
 
                             // for ScPageHFItem (using getImplementation)
diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx
index 6c3bb679..a15933a 100644
--- a/sc/inc/token.hxx
+++ b/sc/inc/token.hxx
@@ -153,10 +153,10 @@ class ScExternalSingleRefToken : public formula::FormulaToken
     svl::SharedString           maTabName;
     ScSingleRefData             maSingleRef;
 
-    ScExternalSingleRefToken(); // disabled
 public:
     ScExternalSingleRefToken( sal_uInt16 nFileId, const svl::SharedString& rTabName, const ScSingleRefData& r );
     ScExternalSingleRefToken( const ScExternalSingleRefToken& r );
+    ScExternalSingleRefToken() = delete;
     virtual ~ScExternalSingleRefToken();
 
     virtual sal_uInt16                  GetIndex() const override;
@@ -173,8 +173,8 @@ class ScExternalDoubleRefToken : public formula::FormulaToken
     svl::SharedString           maTabName;  // name of the first sheet
     ScComplexRefData            maDoubleRef;
 
-    ScExternalDoubleRefToken(); // disabled
 public:
+    ScExternalDoubleRefToken() = delete;
     ScExternalDoubleRefToken( sal_uInt16 nFileId, const svl::SharedString& rTabName, const ScComplexRefData& r );
     ScExternalDoubleRefToken( const ScExternalDoubleRefToken& r );
     virtual ~ScExternalDoubleRefToken();
@@ -196,8 +196,8 @@ class ScExternalNameToken : public formula::FormulaToken
     sal_uInt16                  mnFileId;
     svl::SharedString           maName;
 
-    ScExternalNameToken(); // disabled
 public:
+    ScExternalNameToken() = delete;
     ScExternalNameToken( sal_uInt16 nFileId, const svl::SharedString& rName );
     ScExternalNameToken( const ScExternalNameToken& r );
     virtual ~ScExternalNameToken();
@@ -225,6 +225,7 @@ public:
         DATA_TOTALS = DATA | TOTALS
     };
 
+    ScTableRefToken() = delete;
     ScTableRefToken( sal_uInt16 nIndex, Item eItem );
     ScTableRefToken( const ScTableRefToken& r );
     virtual ~ScTableRefToken();
@@ -245,9 +246,6 @@ private:
     formula::FormulaTokenRef    mxAreaRefRPN;   ///< resulting RPN area
     sal_uInt16                  mnIndex;    ///< index into table / database range collection
     Item                        meItem;
-
-    ScTableRefToken(); // disabled
-
 };
 
 // Only created from within the interpreter, no conversion from ScRawToken,
diff --git a/sc/inc/viewuno.hxx b/sc/inc/viewuno.hxx
index e90e7ad..90c3a37 100644
--- a/sc/inc/viewuno.hxx
+++ b/sc/inc/viewuno.hxx
@@ -184,9 +184,9 @@ private:
     void                    EndActivationListening();
     bool                    mbLeftMousePressed;
     bool                    mbPendingSelectionChanged;
-    ScTabViewObj(); // disabled
 public:
                             ScTabViewObj(ScTabViewShell* pViewSh);
+                            ScTabViewObj() = delete;
     virtual                 ~ScTabViewObj();
 
     virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType )
diff --git a/sc/source/core/inc/addinhelpid.hxx b/sc/source/core/inc/addinhelpid.hxx
index 59ffc1e..42b8c2d 100644
--- a/sc/source/core/inc/addinhelpid.hxx
+++ b/sc/source/core/inc/addinhelpid.hxx
@@ -32,8 +32,8 @@ private:
     const ScUnoAddInHelpId*     pCurrHelpIds;       /// Array of function names and help IDs.
     sal_uInt32                  nArrayCount;        /// Count of array entries.
 
-    ScUnoAddInHelpIdGenerator(); // disabled
 public:
+                                ScUnoAddInHelpIdGenerator() = delete;
                                 ScUnoAddInHelpIdGenerator( const OUString& rServiceName );
 
     /** Sets service name of the AddIn. Has to be done before requesting help IDs. */
diff --git a/sc/source/core/inc/doubleref.hxx b/sc/source/core/inc/doubleref.hxx
index bf601e2..56fcd0b 100644
--- a/sc/source/core/inc/doubleref.hxx
+++ b/sc/source/core/inc/doubleref.hxx
@@ -39,6 +39,8 @@ class ScDBRangeBase
 public:
     enum RefType { INTERNAL, EXTERNAL }; // TODO: We may not need this after all... (kohei)
 
+    ScDBRangeBase() = delete;
+
     virtual ~ScDBRangeBase() = 0;
 
     bool fillQueryEntries(ScQueryParamBase* pParam, const ScDBRangeBase* pDBRef) const;
@@ -84,8 +86,6 @@ protected:
     static void fillQueryOptions(ScQueryParamBase* pParam);
 
 private:
-    ScDBRangeBase(); // disabled
-
     ScDocument* mpDoc;
 };
 
diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx
index 2ee6555..1fb6b03 100644
--- a/sc/source/filter/inc/ftools.hxx
+++ b/sc/source/filter/inc/ftools.hxx
@@ -123,7 +123,9 @@ class SvStream;
 class ScfTools
 {
 public:
-// *** noncopyable *** --------------------------------------------------------
+    /** We don't want anybody to instantiate this class, since it is just a
+        collection of static items. */
+    ScfTools() = delete;
     ScfTools(const ScfTools&) = delete;
     const ScfTools& operator=(const ScfTools&) = delete;
 
@@ -248,10 +250,6 @@ private:
     static const OUString& GetHTMLIndexPrefix();
     /** Returns the prefix for table names. */
     static const OUString& GetHTMLNamePrefix();
-    /** 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 */
-    ScfTools();
 };
 
 // Containers =================================================================
diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx
index 901e7da..0d14f36 100644
--- a/sc/source/filter/inc/xestream.hxx
+++ b/sc/source/filter/inc/xestream.hxx
@@ -247,11 +247,12 @@ namespace sc { class CompileFormulaContext; }
 
 class XclXmlUtils
 {
-    XclXmlUtils();
-    ~XclXmlUtils();
+public:
+    XclXmlUtils() = delete;
+    ~XclXmlUtils() = delete;
     XclXmlUtils(const XclXmlUtils&) = delete;
     XclXmlUtils& operator=(const XclXmlUtils&) = delete;
-public:
+
     static void                     GetFormulaTypeAndValue( ScFormulaCell& rCell, const char*& sType, OUString& rValue);
     static OUString          GetStreamName( const char* sStreamDir, const char* sStream, sal_Int32 nId );
 
diff --git a/sc/source/ui/inc/protectiondlg.hxx b/sc/source/ui/inc/protectiondlg.hxx
index 69e8f84..6833117b 100644
--- a/sc/source/ui/inc/protectiondlg.hxx
+++ b/sc/source/ui/inc/protectiondlg.hxx
@@ -33,6 +33,7 @@ class ScTableProtection;
 class ScTableProtectionDlg : public ModalDialog
 {
 public:
+    ScTableProtectionDlg() = delete;
     explicit ScTableProtectionDlg(vcl::Window* pParent);
     virtual ~ScTableProtectionDlg();
     virtual void dispose() override;
@@ -44,8 +45,6 @@ public:
     void WriteData(ScTableProtection& rData) const;
 
 private:
-    ScTableProtectionDlg(); // disabled
-
     void Init();
 
     void EnableOptionalWidgets(bool bEnable = true);
diff --git a/sc/source/ui/inc/retypepassdlg.hxx b/sc/source/ui/inc/retypepassdlg.hxx
index c5606ba..8fefc82 100644
--- a/sc/source/ui/inc/retypepassdlg.hxx
+++ b/sc/source/ui/inc/retypepassdlg.hxx
@@ -44,6 +44,7 @@ public:
     typedef std::shared_ptr<ScDocProtection>    DocProtectionPtr;
     typedef std::shared_ptr<ScTableProtection>  TabProtectionPtr;
 
+    ScRetypePassDlg() = delete;
     explicit ScRetypePassDlg(vcl::Window* pParent);
     virtual ~ScRetypePassDlg();
     virtual void dispose() override;
@@ -58,8 +59,6 @@ public:
     void WriteNewDataToDocument(ScDocument& rDoc) const;
 
 private:
-    ScRetypePassDlg(); // disabled
-
     void Init();
     void PopulateDialog();
     void SetDocData();
@@ -101,6 +100,7 @@ private:
 class ScRetypePassInputDlg : public ModalDialog
 {
 public:
+    ScRetypePassInputDlg() = delete;
     explicit ScRetypePassInputDlg(vcl::Window* pParent, ScPassHashProtectable* pProtected);
     virtual ~ScRetypePassInputDlg();
     virtual void dispose() override;
@@ -111,8 +111,6 @@ public:
     OUString GetNewPassword() const;
 
 private:
-    ScRetypePassInputDlg(); // disabled
-
     void Init();
     void CheckPasswordInput();
 
diff --git a/sc/source/ui/inc/uiitems.hxx b/sc/source/ui/inc/uiitems.hxx
index 21cb4a5..4d89719 100644
--- a/sc/source/ui/inc/uiitems.hxx
+++ b/sc/source/ui/inc/uiitems.hxx
@@ -103,6 +103,7 @@ class ScEditViewHint : public SfxHint
     ScAddress                   aCursorPos;
 
 public:
+                    ScEditViewHint() = delete;
                     ScEditViewHint( ScEditEngineDefaulter* pEngine, const ScAddress& rCurPos );
                     virtual ~ScEditViewHint();
 
@@ -110,9 +111,6 @@ public:
     SCROW           GetRow() const      { return aCursorPos.Row(); }
     SCTAB           GetTab() const      { return aCursorPos.Tab(); }
     ScEditEngineDefaulter*  GetEngine() const   { return pEditEngine; }
-
-private:
-    ScEditViewHint(); // disabled
 };
 
 class ScIndexHint : public SfxHint


More information about the Libreoffice-commits mailing list