diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-02-07 12:27:16 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-02-07 12:36:01 +0100 |
commit | bdf2fcd5afb4a4fb1fe0683cf07a8beec78dcc04 (patch) | |
tree | 43dcaaa4325b8a76d2099f1dd74a2ea232ad2a67 | |
parent | cfa3d6e562e758cbc18a099aa2a87309735ddf84 (diff) |
loplugin:deletedspecial
Change-Id: Ieeca9fe957e7bc6a4cf9d7d6ac57f9ed150aab78
41 files changed, 104 insertions, 164 deletions
diff --git a/sc/inc/attarray.hxx b/sc/inc/attarray.hxx index 21a8eb6a18b0..c555a12a433d 100644 --- a/sc/inc/attarray.hxx +++ b/sc/inc/attarray.hxx @@ -95,10 +95,8 @@ friend class ScHorizontalAttrIterator; void RemoveCellCharAttribs( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr* pPattern, ScEditDataArray* pDataArray ); - // prevent the copy c'tor and operator= - // this is just to prevent accidental use - ScAttrArray(const ScAttrArray&); - ScAttrArray& operator=(const ScAttrArray&); + ScAttrArray(const ScAttrArray&) SAL_DELETED_FUNCTION; + ScAttrArray& operator=(const ScAttrArray&) SAL_DELETED_FUNCTION; public: ScAttrArray( SCCOL nNewCol, SCTAB nNewTab, ScDocument* pDoc ); diff --git a/sc/inc/bulkdatahint.hxx b/sc/inc/bulkdatahint.hxx index 31c13fb9ea2c..f5361ac3452f 100644 --- a/sc/inc/bulkdatahint.hxx +++ b/sc/inc/bulkdatahint.hxx @@ -23,8 +23,8 @@ class BulkDataHint : public SfxSimpleHint struct Impl; Impl* mpImpl; - BulkDataHint( const BulkDataHint& ); - BulkDataHint& operator= ( const BulkDataHint& ); + BulkDataHint( const BulkDataHint& ) SAL_DELETED_FUNCTION; + BulkDataHint& operator= ( const BulkDataHint& ) SAL_DELETED_FUNCTION; public: BulkDataHint( ScDocument& rDoc, const ColumnSpanSet* pSpans ); diff --git a/sc/inc/cellvalues.hxx b/sc/inc/cellvalues.hxx index b545fcdd9115..53f3a4c39670 100644 --- a/sc/inc/cellvalues.hxx +++ b/sc/inc/cellvalues.hxx @@ -42,8 +42,8 @@ class CellValues { CellValuesImpl* mpImpl; - CellValues( const CellValues& ); // disabled - CellValues& operator= ( const CellValues& ); // disabled + CellValues( const CellValues& ) SAL_DELETED_FUNCTION; + CellValues& operator= ( const CellValues& ) SAL_DELETED_FUNCTION; public: CellValues(); @@ -89,8 +89,8 @@ class TableValues Impl* mpImpl; - TableValues( const TableValues& ); // disabled - TableValues& operator= ( const TableValues& ); // disabled + TableValues( const TableValues& ) SAL_DELETED_FUNCTION; + TableValues& operator= ( const TableValues& ) SAL_DELETED_FUNCTION; public: diff --git a/sc/inc/chart2uno.hxx b/sc/inc/chart2uno.hxx index f42f9bae5e8d..4dfdbebcbeb2 100644 --- a/sc/inc/chart2uno.hxx +++ b/sc/inc/chart2uno.hxx @@ -372,8 +372,7 @@ private: DECL_LINK( ValueListenerHdl, SfxHint* ); private: - ScChart2DataSequence(); // disabled - ScChart2DataSequence(const ScChart2DataSequence& r); // disabled + ScChart2DataSequence(const ScChart2DataSequence& r) SAL_DELETED_FUNCTION; class ExternalRefListener : public ScExternalRefManager::LinkListener { @@ -386,8 +385,7 @@ private: const std::unordered_set<sal_uInt16>& getAllFileIds() { return maFileIds;} private: - ExternalRefListener(); - ExternalRefListener(const ExternalRefListener& r); + ExternalRefListener(const ExternalRefListener& r) SAL_DELETED_FUNCTION; ScChart2DataSequence& mrParent; std::unordered_set<sal_uInt16> maFileIds; diff --git a/sc/inc/chartarr.hxx b/sc/inc/chartarr.hxx index 0dfcede88928..4dcda4091b2b 100644 --- a/sc/inc/chartarr.hxx +++ b/sc/inc/chartarr.hxx @@ -39,7 +39,7 @@ class ScMemChart OUString* pColText; OUString* pRowText; - ScMemChart(const ScMemChart& rMemChart); // not implemented + ScMemChart(const ScMemChart& rMemChart) SAL_DELETED_FUNCTION; public: ScMemChart(SCCOL nCols, SCROW nRows); diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx index 85356ed9c325..b8b72f365828 100644 --- a/sc/inc/chartlis.hxx +++ b/sc/inc/chartlis.hxx @@ -52,8 +52,7 @@ public: std::unordered_set<sal_uInt16>& getAllFileIds() { return maFileIds;} private: - ExternalRefListener(); - ExternalRefListener(const ExternalRefListener& r); + ExternalRefListener(const ExternalRefListener& r) SAL_DELETED_FUNCTION; ScChartListener& mrParent; std::unordered_set<sal_uInt16> maFileIds; @@ -72,8 +71,7 @@ private: bool bDirty:1; bool bSeriesRangesScheduled:1; - // not implemented - ScChartListener& operator=( const ScChartListener& ); + ScChartListener& operator=( const ScChartListener& ) SAL_DELETED_FUNCTION; public: ScChartListener( const OUString& rName, ScDocument* pDoc, @@ -155,8 +153,7 @@ private: DECL_LINK(TimerHdl, void *); - // not implemented - ScChartListenerCollection& operator=( const ScChartListenerCollection& ); + ScChartListenerCollection& operator=( const ScChartListenerCollection& ) SAL_DELETED_FUNCTION; public: ScChartListenerCollection( ScDocument* pDoc ); diff --git a/sc/inc/chartlock.hxx b/sc/inc/chartlock.hxx index c5383a645ad6..c41c537b1f40 100644 --- a/sc/inc/chartlock.hxx +++ b/sc/inc/chartlock.hxx @@ -44,8 +44,7 @@ private: std::vector< ::com::sun::star::uno::WeakReference< ::com::sun::star::frame::XModel > > maChartModels; - ScChartLockGuard(); - ScChartLockGuard( const ScChartLockGuard& ); + ScChartLockGuard( const ScChartLockGuard& ) SAL_DELETED_FUNCTION; }; /** Use this to lock all charts in the calc for a little time. @@ -69,8 +68,7 @@ private: DECL_LINK(TimeoutHdl, void *); - ScTemporaryChartLock(); - ScTemporaryChartLock( const ScTemporaryChartLock& ); + ScTemporaryChartLock( const ScTemporaryChartLock& ) SAL_DELETED_FUNCTION; }; #endif diff --git a/sc/inc/chartpos.hxx b/sc/inc/chartpos.hxx index 8b71a22c1d39..44aa987d302a 100644 --- a/sc/inc/chartpos.hxx +++ b/sc/inc/chartpos.hxx @@ -48,9 +48,8 @@ class ScChartPositionMap ); ~ScChartPositionMap(); //! deletes all ScAddress* - // not implemented - ScChartPositionMap( const ScChartPositionMap& ); - ScChartPositionMap& operator=( const ScChartPositionMap& ); + ScChartPositionMap( const ScChartPositionMap& ) SAL_DELETED_FUNCTION; + ScChartPositionMap& operator=( const ScChartPositionMap& ) SAL_DELETED_FUNCTION; public: diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx index d808dbf884c6..6599d841b95a 100644 --- a/sc/inc/chgtrack.hxx +++ b/sc/inc/chgtrack.hxx @@ -96,9 +96,8 @@ class ScChangeAction; class ScChangeActionLinkEntry { - // not implemented, prevent usage - ScChangeActionLinkEntry( const ScChangeActionLinkEntry& ); - ScChangeActionLinkEntry& operator=( const ScChangeActionLinkEntry& ); + ScChangeActionLinkEntry( const ScChangeActionLinkEntry& ) SAL_DELETED_FUNCTION; + ScChangeActionLinkEntry& operator=( const ScChangeActionLinkEntry& ) SAL_DELETED_FUNCTION; protected: @@ -223,9 +222,8 @@ class ScChangeAction friend class ScChangeActionMove; friend class ScChangeActionContent; - // not implemented, prevent usage - ScChangeAction( const ScChangeAction& ); - ScChangeAction& operator=( const ScChangeAction& ); + ScChangeAction( const ScChangeAction& ) SAL_DELETED_FUNCTION; + ScChangeAction& operator=( const ScChangeAction& ) SAL_DELETED_FUNCTION; protected: @@ -944,9 +942,8 @@ class ScChangeTrack : public utl::ConfigurationListener bool bUseFixDateTime:1; bool bTimeNanoSeconds:1; - // not implemented, prevent usage - ScChangeTrack( const ScChangeTrack& ); - ScChangeTrack& operator=( const ScChangeTrack& ); + ScChangeTrack( const ScChangeTrack& ) SAL_DELETED_FUNCTION; + ScChangeTrack& operator=( const ScChangeTrack& ) SAL_DELETED_FUNCTION; static SCROW InitContentRowsPerSlot(); diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index b5b9f0c99093..d7dee135e841 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -157,8 +157,8 @@ friend class sc::EditTextIterator; friend class sc::CellValues; friend class sc::TableValues; - ScColumn(const ScColumn&); // disabled - ScColumn& operator= (const ScColumn&); // disabled + ScColumn(const ScColumn&) SAL_DELETED_FUNCTION; + ScColumn& operator= (const ScColumn&) SAL_DELETED_FUNCTION; bool ParseString( ScCellValue& rCell, diff --git a/sc/inc/compare.hxx b/sc/inc/compare.hxx index 5f99ef2db4aa..69080a51a344 100644 --- a/sc/inc/compare.hxx +++ b/sc/inc/compare.hxx @@ -56,10 +56,8 @@ struct CompareOptions CompareOptions( ScDocument* pDoc, const ScQueryEntry& rEntry, bool bReg ); private: - // Not implemented, prevent usage. - CompareOptions(); - CompareOptions( const CompareOptions & ); - CompareOptions& operator=( const CompareOptions & ); + CompareOptions( const CompareOptions & ) SAL_DELETED_FUNCTION; + CompareOptions& operator=( const CompareOptions & ) SAL_DELETED_FUNCTION; }; /** @param pOptions diff --git a/sc/inc/dapiuno.hxx b/sc/inc/dapiuno.hxx index d43156c42484..ab4bfe323a44 100644 --- a/sc/inc/dapiuno.hxx +++ b/sc/inc/dapiuno.hxx @@ -419,7 +419,7 @@ protected: ScFieldIdentifier maFieldId; private: - ScDataPilotChildObjBase& operator=( const ScDataPilotChildObjBase& ); + ScDataPilotChildObjBase& operator=( const ScDataPilotChildObjBase& ) SAL_DELETED_FUNCTION; }; typedef ::cppu::WeakImplHelper4 diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 4c8aea481143..3ed76a6b41d9 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1866,7 +1866,7 @@ public: std::vector<Color> GetDocColors(); private: - ScDocument(const ScDocument& r); // disabled with no definition + ScDocument(const ScDocument& r) SAL_DELETED_FUNCTION; void FindMaxRotCol( SCTAB nTab, RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCOL nX2 ) const; diff --git a/sc/inc/dpdimsave.hxx b/sc/inc/dpdimsave.hxx index ae49102eacdf..49c400cbabea 100644 --- a/sc/inc/dpdimsave.hxx +++ b/sc/inc/dpdimsave.hxx @@ -203,7 +203,7 @@ private: typedef ::std::vector< ScDPSaveGroupDimension > ScDPSaveGroupDimVec; typedef ::std::map<OUString, ScDPSaveNumGroupDimension> ScDPSaveNumGroupDimMap; - ScDPDimensionSaveData& operator=( const ScDPDimensionSaveData& ); + ScDPDimensionSaveData& operator=( const ScDPDimensionSaveData& ) SAL_DELETED_FUNCTION; ScDPSaveGroupDimVec maGroupDims; ScDPSaveNumGroupDimMap maNumGroupDims; diff --git a/sc/inc/dpfilteredcache.hxx b/sc/inc/dpfilteredcache.hxx index 878e98c71076..8bd1a4104c5c 100644 --- a/sc/inc/dpfilteredcache.hxx +++ b/sc/inc/dpfilteredcache.hxx @@ -150,8 +150,7 @@ public: #endif private: - ScDPFilteredCache(); - ScDPFilteredCache(const ScDPFilteredCache&); + ScDPFilteredCache(const ScDPFilteredCache&) SAL_DELETED_FUNCTION; /** * Check if a given row meets all specified criteria. diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index 0de3654edb2f..9aab2af911ac 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -75,8 +75,8 @@ public: void SetDoReferesh(bool b); private: - ScExternalRefLink(); // disabled - ScExternalRefLink(const ScExternalRefLink&); // disabled + ScExternalRefLink() SAL_DELETED_FUNCTION; + ScExternalRefLink(const ScExternalRefLink&) SAL_DELETED_FUNCTION; DECL_LINK( ExternalRefEndEditHdl, void* ); @@ -705,8 +705,7 @@ public: void enableDocTimer( bool bEnable ); private: - ScExternalRefManager(); - ScExternalRefManager(const ScExternalRefManager&); + ScExternalRefManager(const ScExternalRefManager&) SAL_DELETED_FUNCTION; void refreshAllRefCells(sal_uInt16 nFileId); diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx index c3a8f0e0f997..143ae2973b48 100644 --- a/sc/inc/formulacell.hxx +++ b/sc/inc/formulacell.hxx @@ -158,7 +158,7 @@ private: bool UpdateReferenceOnCopy( const sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc, const ScAddress* pUndoCellPos ); - ScFormulaCell( const ScFormulaCell& ); + ScFormulaCell( const ScFormulaCell& ) SAL_DELETED_FUNCTION; public: enum CompareState { NotEqual = 0, EqualInvariant, EqualRelativeRef }; diff --git a/sc/inc/linkuno.hxx b/sc/inc/linkuno.hxx index ca026190d14c..2addfba54403 100644 --- a/sc/inc/linkuno.hxx +++ b/sc/inc/linkuno.hxx @@ -516,8 +516,7 @@ public: throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; private: - ScExternalSheetCacheObj(); - ScExternalSheetCacheObj(const ScExternalSheetCacheObj&); + ScExternalSheetCacheObj(const ScExternalSheetCacheObj&) SAL_DELETED_FUNCTION; private: ScDocShell* mpDocShell; @@ -611,8 +610,7 @@ public: virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; private: - ScExternalDocLinksObj(); - ScExternalDocLinksObj(const ScExternalDocLinksObj&); + ScExternalDocLinksObj(const ScExternalDocLinksObj&) SAL_DELETED_FUNCTION; private: ScDocShell* mpDocShell; diff --git a/sc/inc/listenerquery.hxx b/sc/inc/listenerquery.hxx index 129ff0fb9eb0..960ad9cd9232 100644 --- a/sc/inc/listenerquery.hxx +++ b/sc/inc/listenerquery.hxx @@ -52,8 +52,8 @@ class QueryRange : public SvtListener::QueryBase struct Impl; Impl* mpImpl; - QueryRange( const QueryRange& ); // disabled - QueryRange& operator= ( const QueryRange& ); // disabled + QueryRange( const QueryRange& ) SAL_DELETED_FUNCTION; + QueryRange& operator= ( const QueryRange& ) SAL_DELETED_FUNCTION; public: QueryRange(); diff --git a/sc/inc/lookupcache.hxx b/sc/inc/lookupcache.hxx index 249b7942559c..6748ef00c7c9 100644 --- a/sc/inc/lookupcache.hxx +++ b/sc/inc/lookupcache.hxx @@ -74,9 +74,7 @@ public: delete mpStr; } - // prevent usage - QueryCriteria(); - QueryCriteria & operator=( const QueryCriteria & r ); + QueryCriteria & operator=( const QueryCriteria & r ) SAL_DELETED_FUNCTION; public: @@ -200,9 +198,8 @@ private: ScRange maRange; ScDocument * mpDoc; - // prevent usage - ScLookupCache( const ScLookupCache & ); - ScLookupCache & operator=( const ScLookupCache & ); + ScLookupCache( const ScLookupCache & ) SAL_DELETED_FUNCTION; + ScLookupCache & operator=( const ScLookupCache & ) SAL_DELETED_FUNCTION; }; diff --git a/sc/inc/patattr.hxx b/sc/inc/patattr.hxx index 90516ccf0c37..dfba0e23629e 100644 --- a/sc/inc/patattr.hxx +++ b/sc/inc/patattr.hxx @@ -140,9 +140,8 @@ class ScFontToSubsFontConverter_AutoPtr DestroyFontToSubsFontConverter( h ); } - /// prevent usage - ScFontToSubsFontConverter_AutoPtr( const ScFontToSubsFontConverter_AutoPtr& ); - ScFontToSubsFontConverter_AutoPtr& operator=( const ScFontToSubsFontConverter_AutoPtr& ); + ScFontToSubsFontConverter_AutoPtr( const ScFontToSubsFontConverter_AutoPtr& ) SAL_DELETED_FUNCTION; + ScFontToSubsFontConverter_AutoPtr& operator=( const ScFontToSubsFontConverter_AutoPtr& ) SAL_DELETED_FUNCTION; public: ScFontToSubsFontConverter_AutoPtr() diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx index e4408b2cf8a2..7a376d22e064 100644 --- a/sc/inc/postit.hxx +++ b/sc/inc/postit.hxx @@ -142,8 +142,8 @@ public: void UpdateCaptionPos( const ScAddress& rPos ); private: - ScPostIt( const ScPostIt& ); - ScPostIt& operator=( const ScPostIt& ); + ScPostIt( const ScPostIt& ) SAL_DELETED_FUNCTION; + ScPostIt& operator=( const ScPostIt& ) SAL_DELETED_FUNCTION; /** Creates the caption object from initial caption data if existing. */ void CreateCaptionFromInitData( const ScAddress& rPos ) const; diff --git a/sc/inc/progress.hxx b/sc/inc/progress.hxx index a658829612a2..d65c9b56ce37 100644 --- a/sc/inc/progress.hxx +++ b/sc/inc/progress.hxx @@ -52,9 +52,8 @@ private: SfxProgress* pProgress; - /// not implemented - ScProgress( const ScProgress& ); - ScProgress& operator=( const ScProgress& ); + ScProgress( const ScProgress& ) SAL_DELETED_FUNCTION; + ScProgress& operator=( const ScProgress& ) SAL_DELETED_FUNCTION; static void CalcGlobalPercent( sal_uLong nVal ) { diff --git a/sc/inc/reftokenhelper.hxx b/sc/inc/reftokenhelper.hxx index 137f266078ac..0ce3336db8c2 100644 --- a/sc/inc/reftokenhelper.hxx +++ b/sc/inc/reftokenhelper.hxx @@ -28,45 +28,39 @@ class ScDocument; class ScRange; class ScRangeList; -class ScRefTokenHelper +namespace ScRefTokenHelper { -private: - ScRefTokenHelper(); - ScRefTokenHelper(const ScRefTokenHelper&); - ~ScRefTokenHelper(); - -public: /** * Compile an array of reference tokens from a data source range string. * The source range may consist of multiple ranges separated by ';'s. */ - static void compileRangeRepresentation( + void compileRangeRepresentation( ::std::vector<ScTokenRef>& rRefTokens, const OUString& rRangeStr, ScDocument* pDoc, const sal_Unicode cSep, ::formula::FormulaGrammar::Grammar eGrammar, bool bOnly3DRef = false); - static bool getRangeFromToken(ScRange& rRange, const ScTokenRef& pToken, const ScAddress& rPos, bool bExternal = false); + bool getRangeFromToken(ScRange& rRange, const ScTokenRef& pToken, const ScAddress& rPos, bool bExternal = false); - static void getRangeListFromTokens(ScRangeList& rRangeList, const ::std::vector<ScTokenRef>& pTokens, const ScAddress& rPos); + void getRangeListFromTokens(ScRangeList& rRangeList, const ::std::vector<ScTokenRef>& pTokens, const ScAddress& rPos); /** * Create a double reference token from a range object. */ - static void getTokenFromRange(ScTokenRef& pToken, const ScRange& rRange); + void getTokenFromRange(ScTokenRef& pToken, const ScRange& rRange); - static void getTokensFromRangeList(::std::vector<ScTokenRef>& pTokens, const ScRangeList& rRanges); + void getTokensFromRangeList(::std::vector<ScTokenRef>& pTokens, const ScRangeList& rRanges); - static bool SC_DLLPUBLIC isRef(const ScTokenRef& pToken); - static bool SC_DLLPUBLIC isExternalRef(const ScTokenRef& pToken); + bool SC_DLLPUBLIC isRef(const ScTokenRef& pToken); + bool SC_DLLPUBLIC isExternalRef(const ScTokenRef& pToken); - static bool SC_DLLPUBLIC intersects( + bool SC_DLLPUBLIC intersects( const ::std::vector<ScTokenRef>& rTokens, const ScTokenRef& pToken, const ScAddress& rPos); - static void SC_DLLPUBLIC join(::std::vector<ScTokenRef>& rTokens, const ScTokenRef& pToken, const ScAddress& rPos); + void SC_DLLPUBLIC join(::std::vector<ScTokenRef>& rTokens, const ScTokenRef& pToken, const ScAddress& rPos); - static bool getDoubleRefDataFromToken(ScComplexRefData& rData, const ScTokenRef& pToken); + bool getDoubleRefDataFromToken(ScComplexRefData& rData, const ScTokenRef& pToken); - static ScTokenRef createRefToken(const ScAddress& rAddr); - static ScTokenRef createRefToken(const ScRange& rRange); + ScTokenRef createRefToken(const ScAddress& rAddr); + ScTokenRef createRefToken(const ScRange& rRange); }; #endif diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx index 6bcd8857f1e0..c4b924d4075d 100644 --- a/sc/inc/scmatrix.hxx +++ b/sc/inc/scmatrix.hxx @@ -117,9 +117,8 @@ class SC_DLLPUBLIC ScMatrix // only delete via Delete() ~ScMatrix(); - // not implemented, prevent usage - ScMatrix( const ScMatrix& ); - ScMatrix& operator=( const ScMatrix&); + ScMatrix( const ScMatrix& ) SAL_DELETED_FUNCTION; + ScMatrix& operator=( const ScMatrix&) SAL_DELETED_FUNCTION; public: enum Op { Add, Sub, Mul, Div }; diff --git a/sc/inc/tabprotection.hxx b/sc/inc/tabprotection.hxx index 0843a1fde1dc..1458399fd9c2 100644 --- a/sc/inc/tabprotection.hxx +++ b/sc/inc/tabprotection.hxx @@ -37,23 +37,18 @@ enum ScPasswordHash PASSHASH_UNSPECIFIED }; -class ScPassHashHelper +namespace ScPassHashHelper { -public: /** Check for the compatibility of all password hashes. If there is at * least one hash that needs to be regenerated, it returns true. If all * hash values are compatible with the specified hash type, then it * returns false. */ - static bool needsPassHashRegen(const ScDocument& rDoc, ScPasswordHash eHash1, ScPasswordHash eHash2 = PASSHASH_UNSPECIFIED); - - static OUString getHashURI(ScPasswordHash eHash); + bool needsPassHashRegen(const ScDocument& rDoc, ScPasswordHash eHash1, ScPasswordHash eHash2 = PASSHASH_UNSPECIFIED); - static ScPasswordHash getHashTypeFromURI(const OUString& rURI); + OUString getHashURI(ScPasswordHash eHash); -private: - ScPassHashHelper(); - ~ScPassHashHelper(); -}; + ScPasswordHash getHashTypeFromURI(const OUString& rURI); +} class SAL_NO_VTABLE ScPassHashProtectable { diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx index 0d54a4b03816..f742d01ad7a1 100644 --- a/sc/inc/token.hxx +++ b/sc/inc/token.hxx @@ -368,9 +368,8 @@ class SingleDoubleRefModifier ScSingleRefData* pS; ScComplexRefData* pD; - // not implemented, prevent usage - SingleDoubleRefModifier( const SingleDoubleRefModifier& ); - SingleDoubleRefModifier& operator=( const SingleDoubleRefModifier& ); + SingleDoubleRefModifier( const SingleDoubleRefModifier& ) SAL_DELETED_FUNCTION; + SingleDoubleRefModifier& operator=( const SingleDoubleRefModifier& ) SAL_DELETED_FUNCTION; public: SingleDoubleRefModifier( formula::FormulaToken& rT ) diff --git a/sc/inc/unitconv.hxx b/sc/inc/unitconv.hxx index 4280f22ebed9..94bc16a8eba7 100644 --- a/sc/inc/unitconv.hxx +++ b/sc/inc/unitconv.hxx @@ -27,8 +27,7 @@ class ScUnitConverterData { OUString maIndexString; double mfValue; - // not implemented - ScUnitConverterData& operator=( const ScUnitConverterData& ); + ScUnitConverterData& operator=( const ScUnitConverterData& ) SAL_DELETED_FUNCTION; public: ScUnitConverterData( const OUString& rFromUnit, diff --git a/sc/source/core/inc/bcaslot.hxx b/sc/source/core/inc/bcaslot.hxx index 6f5dfe4b1b4b..144d2d7390be 100644 --- a/sc/source/core/inc/bcaslot.hxx +++ b/sc/source/core/inc/bcaslot.hxx @@ -285,9 +285,8 @@ private: private: ScBroadcastAreaSlot** ppSlots; - // prevent usage - TableSlots( const TableSlots& ); - TableSlots& operator=( const TableSlots& ); + TableSlots( const TableSlots& ) SAL_DELETED_FUNCTION; + TableSlots& operator=( const TableSlots& ) SAL_DELETED_FUNCTION; }; typedef ::std::map< SCTAB, TableSlots* > TableSlotsMap; diff --git a/sc/source/core/inc/jumpmatrix.hxx b/sc/source/core/inc/jumpmatrix.hxx index 0f5be1945457..62b6a58e05aa 100644 --- a/sc/source/core/inc/jumpmatrix.hxx +++ b/sc/source/core/inc/jumpmatrix.hxx @@ -89,9 +89,8 @@ class ScJumpMatrix /** Flush different types or non-consecutive buffers. */ void FlushBufferOtherThan( BufferType eType, SCSIZE nC, SCSIZE nR ); - // not implemented, prevent usage - ScJumpMatrix( const ScJumpMatrix& ); - ScJumpMatrix& operator=( const ScJumpMatrix& ); + ScJumpMatrix( const ScJumpMatrix& ) SAL_DELETED_FUNCTION; + ScJumpMatrix& operator=( const ScJumpMatrix& ) SAL_DELETED_FUNCTION; public: ScJumpMatrix( SCSIZE nColsP, SCSIZE nRowsP ); diff --git a/sc/source/filter/inc/biffhelper.hxx b/sc/source/filter/inc/biffhelper.hxx index 80086bd3e055..33d8bd202884 100644 --- a/sc/source/filter/inc/biffhelper.hxx +++ b/sc/source/filter/inc/biffhelper.hxx @@ -627,8 +627,8 @@ public: static bool skipRecordBlock( BiffInputStream& rStrm, sal_uInt16 nEndRecId ); private: - BiffHelper(); // not implemented - ~BiffHelper(); // not implemented + BiffHelper() SAL_DELETED_FUNCTION; + ~BiffHelper() SAL_DELETED_FUNCTION; }; /** BIFF12 stream operator for an OUString, reads 32-bit string length and Unicode array. */ diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx index 5bb2b204ed9d..aad2d435246d 100644 --- a/sc/source/filter/inc/xestream.hxx +++ b/sc/source/filter/inc/xestream.hxx @@ -258,8 +258,8 @@ class XclXmlUtils { XclXmlUtils(); ~XclXmlUtils(); - XclXmlUtils(const XclXmlUtils&); - XclXmlUtils& operator=(const XclXmlUtils&); + XclXmlUtils(const XclXmlUtils&) SAL_DELETED_FUNCTION; + XclXmlUtils& operator=(const XclXmlUtils&) SAL_DELETED_FUNCTION; 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/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx index fd7f3e79d6eb..53967876efd6 100644 --- a/sc/source/filter/inc/xestyle.hxx +++ b/sc/source/filter/inc/xestyle.hxx @@ -129,33 +129,28 @@ class SvxFont; const size_t EXC_FONTLIST_NOTFOUND = static_cast< size_t >( -1 ); -/** Static helper functions for font export. */ -class XclExpFontHelper +/** Helper functions for font export. */ +namespace XclExpFontHelper { -public: /** Returns the script type of the first font item found in the item set and its parents. */ - static sal_Int16 GetFirstUsedScript( + sal_Int16 GetFirstUsedScript( const XclExpRoot& rRoot, const SfxItemSet& rItemSet ); /** Returns a VCL font object filled from the passed item set. */ - static vcl::Font GetFontFromItemSet( + vcl::Font GetFontFromItemSet( const XclExpRoot& rRoot, const SfxItemSet& rItemSet, sal_Int16 nScript ); /** Returns true, if at least one font related item is set in the passed item set. @param bDeep true = Searches in parent item sets too. */ - static bool CheckItems( + bool CheckItems( const XclExpRoot& rRoot, const SfxItemSet& rItemSet, sal_Int16 nScript, bool bDeep ); - -private: - XclExpFontHelper(); - ~XclExpFontHelper(); -}; +} /** Stores all data of an Excel font and provides export of FONT records. */ class XclExpFont : public XclExpRecord, protected XclExpRoot diff --git a/sc/source/filter/oox/workbooksettings.cxx b/sc/source/filter/oox/workbooksettings.cxx index 71ee5106fea3..b61885e6d46f 100644 --- a/sc/source/filter/oox/workbooksettings.cxx +++ b/sc/source/filter/oox/workbooksettings.cxx @@ -40,8 +40,6 @@ using namespace ::com::sun::star::sheet; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::util; -using ::oox::core::CodecHelper; - namespace { const sal_uInt32 BIFF12_WORKBOOKPR_DATE1904 = 0x00000001; @@ -108,7 +106,7 @@ WorkbookSettings::WorkbookSettings( const WorkbookHelper& rHelper ) : void WorkbookSettings::importFileSharing( const AttributeList& rAttribs ) { maFileSharing.maUserName = rAttribs.getXString( XML_userName, OUString() ); - maFileSharing.mnPasswordHash = CodecHelper::getPasswordHash( rAttribs, XML_reservationPassword ); + maFileSharing.mnPasswordHash = oox::core::CodecHelper::getPasswordHash( rAttribs, XML_reservationPassword ); maFileSharing.mbRecommendReadOnly = rAttribs.getBool( XML_readOnlyRecommended, false ); } diff --git a/sc/source/filter/oox/worksheetsettings.cxx b/sc/source/filter/oox/worksheetsettings.cxx index 1d0166824fab..89aa4768bb04 100644 --- a/sc/source/filter/oox/worksheetsettings.cxx +++ b/sc/source/filter/oox/worksheetsettings.cxx @@ -37,8 +37,6 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::util; -using ::oox::core::CodecHelper; - namespace { const sal_uInt8 BIFF12_SHEETPR_FILTERMODE = 0x01; @@ -110,7 +108,7 @@ void WorksheetSettings::importOutlinePr( const AttributeList& rAttribs ) void WorksheetSettings::importSheetProtection( const AttributeList& rAttribs ) { - maSheetProt.mnPasswordHash = CodecHelper::getPasswordHash( rAttribs, XML_password ); + maSheetProt.mnPasswordHash = oox::core::CodecHelper::getPasswordHash( rAttribs, XML_password ); maSheetProt.mbSheet = rAttribs.getBool( XML_sheet, false ); maSheetProt.mbObjects = rAttribs.getBool( XML_objects, false ); maSheetProt.mbScenarios = rAttribs.getBool( XML_scenarios, false ); @@ -173,7 +171,7 @@ void WorksheetSettings::importProtectedRange( const AttributeList& rAttribs ) void WorksheetSettings::importChartProtection( const AttributeList& rAttribs ) { - maSheetProt.mnPasswordHash = CodecHelper::getPasswordHash( rAttribs, XML_password ); + maSheetProt.mnPasswordHash = oox::core::CodecHelper::getPasswordHash( rAttribs, XML_password ); maSheetProt.mbSheet = rAttribs.getBool( XML_content, false ); maSheetProt.mbObjects = rAttribs.getBool( XML_objects, false ); } diff --git a/sc/source/filter/xml/XMLConverter.hxx b/sc/source/filter/xml/XMLConverter.hxx index 7baa9ef8521e..cac22847bc0a 100644 --- a/sc/source/filter/xml/XMLConverter.hxx +++ b/sc/source/filter/xml/XMLConverter.hxx @@ -132,23 +132,18 @@ struct ScXMLConditionParseResult sal_Int32 mnEndIndex; /// Index of first character following the condition. }; -class ScXMLConditionHelper +namespace ScXMLConditionHelper { -public: /** Parses the next condition in a 'condition' attribute value of e.g. conditional formatting or data validation. */ - static void parseCondition( + void parseCondition( ScXMLConditionParseResult& rParseResult, const OUString& rAttribute, sal_Int32 nStartIndex ); - static OUString getExpression(const sal_Unicode*& rpcString, const sal_Unicode* pcEnd, sal_Unicode cEndChar ); - -private: - ScXMLConditionHelper(); - ~ScXMLConditionHelper(); -}; + OUString getExpression(const sal_Unicode*& rpcString, const sal_Unicode* pcEnd, sal_Unicode cEndChar ); +} #endif diff --git a/sc/source/ui/inc/cliputil.hxx b/sc/source/ui/inc/cliputil.hxx index 883b4ca1db2c..442dc46f3fcf 100644 --- a/sc/source/ui/inc/cliputil.hxx +++ b/sc/source/ui/inc/cliputil.hxx @@ -18,17 +18,14 @@ class ScDocument; class ScMarkData; class ScRangeList; -class ScClipUtil +namespace ScClipUtil { - ScClipUtil(); - ~ScClipUtil(); -public: - static void PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTabViewShell, bool bShowDialog ); + void PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTabViewShell, bool bShowDialog ); - static bool CheckDestRanges( + bool CheckDestRanges( ScDocument* pDoc, SCCOL nSrcCols, SCROW nSrcRows, const ScMarkData& rMark, const ScRangeList& rDest); -}; +} #endif diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index ba92007da839..f7c2f2865e28 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -461,9 +461,8 @@ class SC_DLLPUBLIC ScDocShellModificator bool bAutoCalcShellDisabled; bool bIdleEnabled; - // not implemented - ScDocShellModificator( const ScDocShellModificator& ); - ScDocShellModificator& operator=( const ScDocShellModificator& ); + ScDocShellModificator( const ScDocShellModificator& ) SAL_DELETED_FUNCTION; + ScDocShellModificator& operator=( const ScDocShellModificator& ) SAL_DELETED_FUNCTION; public: ScDocShellModificator( ScDocShell& ); diff --git a/sc/source/ui/inc/undobase.hxx b/sc/source/ui/inc/undobase.hxx index 30670d219e73..67ecb454d784 100644 --- a/sc/source/ui/inc/undobase.hxx +++ b/sc/source/ui/inc/undobase.hxx @@ -36,7 +36,7 @@ class ScDBData; class ScSimpleUndo: public SfxUndoAction { - ScSimpleUndo(const ScSimpleUndo&); // disabled + ScSimpleUndo(const ScSimpleUndo&) SAL_DELETED_FUNCTION; public: typedef boost::ptr_map<SCTAB,sc::ColumnSpanSet> DataSpansType; diff --git a/sc/source/ui/unoobj/celllistsource.hxx b/sc/source/ui/unoobj/celllistsource.hxx index 03b1e670fd8d..e42f92c922b3 100644 --- a/sc/source/ui/unoobj/celllistsource.hxx +++ b/sc/source/ui/unoobj/celllistsource.hxx @@ -143,9 +143,8 @@ namespace calc void notifyModified(); private: - OCellListSource(); // never implemented - OCellListSource( const OCellListSource& ); // never implemented - OCellListSource& operator=( const OCellListSource& ); // never implemented + OCellListSource( const OCellListSource& ) SAL_DELETED_FUNCTION; + OCellListSource& operator=( const OCellListSource& ) SAL_DELETED_FUNCTION; }; } // namespace calc diff --git a/sc/source/ui/unoobj/cellvaluebinding.hxx b/sc/source/ui/unoobj/cellvaluebinding.hxx index 4b1ff8067615..612ad1c6dd61 100644 --- a/sc/source/ui/unoobj/cellvaluebinding.hxx +++ b/sc/source/ui/unoobj/cellvaluebinding.hxx @@ -138,9 +138,8 @@ namespace calc void setBooleanFormat(); private: - OCellValueBinding(); // never implemented - OCellValueBinding( const OCellValueBinding& ); // never implemented - OCellValueBinding& operator=( const OCellValueBinding& ); // never implemented + OCellValueBinding( const OCellValueBinding& ) SAL_DELETED_FUNCTION; + OCellValueBinding& operator=( const OCellValueBinding& ) SAL_DELETED_FUNCTION; }; } // namespace calc |