diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-23 15:57:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-03-28 08:39:21 +0200 |
commit | b2e8bbeafa35c15d168961de711e4970eb0985cb (patch) | |
tree | 1d8259893caa4ff0c74a0e271c641c4f326ea8e2 /sc/inc | |
parent | c4170e4bcba61865425d03a1292b9aea39dc1e6d (diff) |
loplugin:useuniqueptr in ScColumn
Change-Id: Iff6c68a29b9e7660132cbe4e556802b0f63706f0
Reviewed-on: https://gerrit.libreoffice.org/51904
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/document.hxx | 10 | ||||
-rw-r--r-- | sc/inc/table.hxx | 40 |
2 files changed, 25 insertions, 25 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index bc05e844812e..4ed169e10152 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -613,7 +613,7 @@ public: SC_DLLPUBLIC void GetRangeNameMap(std::map<OUString, ScRangeName*>& rRangeName); SC_DLLPUBLIC ScRangeName* GetRangeName(SCTAB nTab) const; SC_DLLPUBLIC ScRangeName* GetRangeName() const; - void SetRangeName(SCTAB nTab, ScRangeName* pNew); + void SetRangeName(SCTAB nTab, std::unique_ptr<ScRangeName> pNew); void SetRangeName( std::unique_ptr<ScRangeName> pNewRangeName ); bool IsAddressInRangeName( RangeNameScope eScope, ScAddress& rAddress); @@ -818,7 +818,7 @@ public: OUString GetCopyTabName(SCTAB nTab) const; - SC_DLLPUBLIC void SetAnonymousDBData(SCTAB nTab, ScDBData* pDBData); + SC_DLLPUBLIC void SetAnonymousDBData(SCTAB nTab, std::unique_ptr<ScDBData> pDBData); SC_DLLPUBLIC ScDBData* GetAnonymousDBData(SCTAB nTab); /** One document global anonymous database range for temporary operations, @@ -1016,7 +1016,7 @@ public: bool HasAnyDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const; const ScSheetEvents* GetSheetEvents( SCTAB nTab ) const; - void SetSheetEvents( SCTAB nTab, const ScSheetEvents* pNew ); + void SetSheetEvents( SCTAB nTab, std::unique_ptr<ScSheetEvents> pNew ); bool HasSheetEventScript( SCTAB nTab, ScSheetEventId nEvent, bool bWithVbaEvents = false ) const; bool HasAnySheetEventScript( ScSheetEventId nEvent, bool bWithVbaEvents = false ) const; // on any sheet @@ -1929,8 +1929,8 @@ public: SC_DLLPUBLIC void AddPrintRange( SCTAB nTab, const ScRange& rNew ); /** Marks the specified sheet to be printed completely. Deletes old print ranges on the sheet! */ SC_DLLPUBLIC void SetPrintEntireSheet( SCTAB nTab ); - SC_DLLPUBLIC void SetRepeatColRange( SCTAB nTab, const ScRange* pNew ); - SC_DLLPUBLIC void SetRepeatRowRange( SCTAB nTab, const ScRange* pNew ); + SC_DLLPUBLIC void SetRepeatColRange( SCTAB nTab, std::unique_ptr<ScRange> pNew ); + SC_DLLPUBLIC void SetRepeatRowRange( SCTAB nTab, std::unique_ptr<ScRange> pNew ); ScPrintRangeSaver* CreatePrintRangeSaver() const; void RestorePrintRanges( const ScPrintRangeSaver& rSaver ); diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 08ddea363fbf..cb98a23f94af 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -183,7 +183,7 @@ private: std::unique_ptr<ScFlatUInt16RowSegments> mpRowHeights; std::unique_ptr<ScBitMaskCompressedArray<SCCOL, CRFlags>> mpColFlags; - ScBitMaskCompressedArray< SCROW, CRFlags>* pRowFlags; + std::unique_ptr<ScBitMaskCompressedArray< SCROW, CRFlags>> pRowFlags; std::unique_ptr<ScFlatBoolColSegments> mpHiddenCols; std::unique_ptr<ScFlatBoolRowSegments> mpHiddenRows; std::unique_ptr<ScFlatBoolColSegments> mpFilteredCols; @@ -194,16 +194,16 @@ private: ::std::set<SCCOL> maColPageBreaks; ::std::set<SCCOL> maColManualBreaks; - ScOutlineTable* pOutlineTable; + std::unique_ptr<ScOutlineTable> pOutlineTable; - ScSheetEvents* pSheetEvents; + std::unique_ptr<ScSheetEvents> pSheetEvents; mutable SCCOL nTableAreaX; mutable SCROW nTableAreaY; SCTAB nTab; ScDocument* pDocument; - utl::TextSearch* pSearchText; + std::unique_ptr<utl::TextSearch> pSearchText; mutable OUString aUpperName; // #i62977# filled only on demand, reset in SetName @@ -213,17 +213,17 @@ private: ScRangeVec aPrintRanges; - ScRange* pRepeatColRange; - ScRange* pRepeatRowRange; + std::unique_ptr<ScRange> pRepeatColRange; + std::unique_ptr<ScRange> pRepeatRowRange; sal_uInt16 nLockCount; - ScRangeList* pScenarioRanges; + std::unique_ptr<ScRangeList> pScenarioRanges; Color aScenarioColor; Color aTabBgColor; ScScenarioFlags nScenarioFlags; - ScDBData* pDBDataNoName; - mutable ScRangeName* mpRangeName; + std::unique_ptr<ScDBData> pDBDataNoName; + mutable std::unique_ptr<ScRangeName> mpRangeName; std::unique_ptr<ScConditionalFormatList> mpCondFormatList; @@ -275,7 +275,7 @@ public: const ScDocument& GetDoc() const { return *pDocument;} SCTAB GetTab() const { return nTab; } - ScOutlineTable* GetOutlineTable() { return pOutlineTable; } + ScOutlineTable* GetOutlineTable() { return pOutlineTable.get(); } ScColumn& CreateColumnIfNotExists( const SCCOL nScCol ) { @@ -307,8 +307,8 @@ public: void RemoveSubTotals( ScSubTotalParam& rParam ); bool DoSubTotals( ScSubTotalParam& rParam ); - const ScSheetEvents* GetSheetEvents() const { return pSheetEvents; } - void SetSheetEvents( const ScSheetEvents* pNew ); + const ScSheetEvents* GetSheetEvents() const { return pSheetEvents.get(); } + void SetSheetEvents( std::unique_ptr<ScSheetEvents> pNew ); bool IsVisible() const { return bVisible; } void SetVisible( bool bVis ); @@ -369,8 +369,8 @@ public: void GetName( OUString& rName ) const; void SetName( const OUString& rNewName ); - void SetAnonymousDBData(ScDBData* pDBData); - ScDBData* GetAnonymousDBData() { return pDBDataNoName;} + void SetAnonymousDBData(std::unique_ptr<ScDBData> pDBData); + ScDBData* GetAnonymousDBData() { return pDBDataNoName.get();} void GetCodeName( OUString& rName ) const { rName = aCodeName; } void SetCodeName( const OUString& rNewName ) { aCodeName = rNewName; } @@ -749,10 +749,10 @@ public: void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark ); void ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark ); - const ScRange* GetRepeatColRange() const { return pRepeatColRange; } - const ScRange* GetRepeatRowRange() const { return pRepeatRowRange; } - void SetRepeatColRange( const ScRange* pNew ); - void SetRepeatRowRange( const ScRange* pNew ); + const ScRange* GetRepeatColRange() const { return pRepeatColRange.get(); } + const ScRange* GetRepeatRowRange() const { return pRepeatRowRange.get(); } + void SetRepeatColRange( std::unique_ptr<ScRange> pNew ); + void SetRepeatRowRange( std::unique_ptr<ScRange> pNew ); sal_uInt16 GetPrintRangeCount() const { return static_cast< sal_uInt16 >( aPrintRanges.size() ); } const ScRange* GetPrintRange(sal_uInt16 nPos) const; @@ -854,7 +854,7 @@ public: CRFlags GetRowFlags( SCROW nRow ) const; const ScBitMaskCompressedArray< SCROW, CRFlags> * GetRowFlagsArray() const - { return pRowFlags; } + { return pRowFlags.get(); } bool UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, bool bShow ); bool UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, bool bShow ); @@ -961,7 +961,7 @@ public: void DestroySortCollator(); void SetDrawPageSize( bool bResetStreamValid = true, bool bUpdateNoteCaptionPos = true ); - void SetRangeName(ScRangeName* pNew); + void SetRangeName(std::unique_ptr<ScRangeName> pNew); ScRangeName* GetRangeName() const; void PreprocessRangeNameUpdate( |