summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2025-04-25 17:09:06 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2025-04-25 21:30:15 +0200
commit79daee261818e6f2919c10ef9c698d66e6fa9c6f (patch)
tree1968d93cf69850059153009250b77ff93f025ead /sc/source/ui
parent138f0a92f8c5ed300248b37fbff2a07e31596825 (diff)
ScSortItem: always pass ScViewData from caller
Change-Id: I95b273bebed032a3acb0bdca0e1ae30d0e98600d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184631 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/app/msgpool.cxx2
-rw-r--r--sc/source/ui/app/uiitems.cxx8
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx2
-rw-r--r--sc/source/ui/inc/uiitems.hxx2
4 files changed, 2 insertions, 12 deletions
diff --git a/sc/source/ui/app/msgpool.cxx b/sc/source/ui/app/msgpool.cxx
index 4675dc285ea0..5dd25412bfce 100644
--- a/sc/source/ui/app/msgpool.cxx
+++ b/sc/source/ui/app/msgpool.cxx
@@ -32,7 +32,7 @@ static ItemInfoPackage& getItemInfoPackageScMessage()
// m_nWhich, m_pItem, m_nSlotID, m_nItemInfoFlags
{ SCITEM_STRING, new SfxStringItem(SCITEM_STRING, OUString() ), 0, SFX_ITEMINFOFLAG_NONE },
{ SCITEM_SEARCHDATA, new SvxSearchItem(SCITEM_SEARCHDATA ), 0, SFX_ITEMINFOFLAG_NONE },
- { SCITEM_SORTDATA, new ScSortItem(SCITEM_SORTDATA, nullptr ), SID_SORT, SFX_ITEMINFOFLAG_NONE },
+ { SCITEM_SORTDATA, new ScSortItem(SCITEM_SORTDATA, nullptr, nullptr), SID_SORT, SFX_ITEMINFOFLAG_NONE },
{ SCITEM_QUERYDATA, new ScQueryItem(SCITEM_QUERYDATA, nullptr, nullptr ), SID_QUERY, SFX_ITEMINFOFLAG_NONE },
{ SCITEM_SUBTDATA, new ScSubTotalItem(SCITEM_SUBTDATA, nullptr, nullptr ), SID_SUBTOTALS, SFX_ITEMINFOFLAG_NONE },
{ SCITEM_CONSOLIDATEDATA, new ScConsolidateItem(SCITEM_CONSOLIDATEDATA, nullptr ), SID_CONSOLIDATE, SFX_ITEMINFOFLAG_NONE },
diff --git a/sc/source/ui/app/uiitems.cxx b/sc/source/ui/app/uiitems.cxx
index 4b6275a59146..96863bb2e820 100644
--- a/sc/source/ui/app/uiitems.cxx
+++ b/sc/source/ui/app/uiitems.cxx
@@ -131,14 +131,6 @@ ScSortItem::ScSortItem( sal_uInt16 nWhichP,
if ( pSortData ) theSortData = *pSortData;
}
-ScSortItem::ScSortItem( sal_uInt16 nWhichP,
- const ScSortParam* pSortData ) :
- SfxPoolItem ( nWhichP ),
- pViewData ( nullptr )
-{
- if ( pSortData ) theSortData = *pSortData;
-}
-
bool ScSortItem::operator==( const SfxPoolItem& rItem ) const
{
assert(SfxPoolItem::operator==(rItem));
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 91a7a25d3630..44b3e020e726 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -675,7 +675,7 @@ bool ScTabPageSortOptions::FillItemSet( SfxItemSet* rArgSet )
}
aNewSortData.aCollatorAlgorithm = sAlg;
- rArgSet->Put( ScSortItem( SCITEM_SORTDATA, &aNewSortData ) );
+ rArgSet->Put( ScSortItem( SCITEM_SORTDATA, pViewData, &aNewSortData ) );
return true;
}
diff --git a/sc/source/ui/inc/uiitems.hxx b/sc/source/ui/inc/uiitems.hxx
index 9dfcc713150a..c51f9f0e1fec 100644
--- a/sc/source/ui/inc/uiitems.hxx
+++ b/sc/source/ui/inc/uiitems.hxx
@@ -129,8 +129,6 @@ public:
ScSortItem( sal_uInt16 nWhich,
ScViewData* ptrViewData,
const ScSortParam* pSortData );
- ScSortItem( sal_uInt16 nWhich,
- const ScSortParam* pSortData );
virtual bool operator==( const SfxPoolItem& ) const override;
virtual ScSortItem* Clone( SfxItemPool *pPool = nullptr ) const override;