summaryrefslogtreecommitdiff
path: root/sc/inc/table.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-31 15:47:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-01 18:12:09 +0200
commitdabd26614ddf73a2fb382e7a105c8c11c88741d9 (patch)
tree42365adb8b0d740da2dee4dc82aa76ad80542902 /sc/inc/table.hxx
parent49b9401465730b1151917bffcbc0ad1f0622fcee (diff)
pass ScRange around by value
it's a very small object, and trivially movable. No need to allocate it separately Change-Id: I0adf947433e73a425f39004297c450a93ac4e5f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135216 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc/table.hxx')
-rw-r--r--sc/inc/table.hxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 6c083e064add..1a0a0e477758 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -216,8 +216,8 @@ private:
ScRangeVec aPrintRanges;
- std::unique_ptr<ScRange> pRepeatColRange;
- std::unique_ptr<ScRange> pRepeatRowRange;
+ std::optional<ScRange> moRepeatColRange;
+ std::optional<ScRange> moRepeatRowRange;
sal_uInt16 nLockCount;
@@ -793,10 +793,10 @@ public:
void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark );
void ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark );
- 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 );
+ const std::optional<ScRange>& GetRepeatColRange() const { return moRepeatColRange; }
+ const std::optional<ScRange>& GetRepeatRowRange() const { return moRepeatRowRange; }
+ void SetRepeatColRange( std::optional<ScRange> oNew );
+ void SetRepeatRowRange( std::optional<ScRange> oNew );
sal_uInt16 GetPrintRangeCount() const { return static_cast< sal_uInt16 >( aPrintRanges.size() ); }
const ScRange* GetPrintRange(sal_uInt16 nPos) const;