summaryrefslogtreecommitdiff
path: root/sc/source/ui/miscdlgs
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-13 17:02:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-15 07:30:26 +0100
commita3aceef8200e48173df4b5e67b5d6fb393a23ad9 (patch)
tree7b0b0b117c8e3c15c2b126b085d11a21c2446991 /sc/source/ui/miscdlgs
parentd775ef360168271f429466bbc174ae7dec402f1d (diff)
don't use heap for elements in ScRangePairList
no need to store small objects like this out of line. And use std::array for ScRangePair, so we get range checking in debug mode. Change-Id: Ie4690edbb4c3fdc4e08206cb016b8167a399d95a Reviewed-on: https://gerrit.libreoffice.org/51268 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/miscdlgs')
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index 31df267e218f..8cbdf77a2b1c 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -391,7 +391,7 @@ void ScColRowNameRangesDlg::UpdateNames()
pLbRange->SetEntryData( nPos, reinterpret_cast<void*>(nEntryDataDelim) );
if ( (nCount = xColNameRanges->size()) > 0 )
{
- std::vector<ScRangePair*> aSortArray(xColNameRanges->CreateNameSortedArray(
+ std::vector<const ScRangePair*> aSortArray(xColNameRanges->CreateNameSortedArray(
pDoc ));
nCount = aSortArray.size();
for ( j=0; j < nCount; j++ )
@@ -435,7 +435,7 @@ void ScColRowNameRangesDlg::UpdateNames()
pLbRange->SetEntryData( nPos, reinterpret_cast<void*>(nEntryDataDelim) );
if ( (nCount = xRowNameRanges->size()) > 0 )
{
- std::vector<ScRangePair*> aSortArray(xRowNameRanges->CreateNameSortedArray(
+ std::vector<const ScRangePair*> aSortArray(xRowNameRanges->CreateNameSortedArray(
pDoc ));
nCount = aSortArray.size();
for ( j=0; j < nCount; j++ )
@@ -557,11 +557,11 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, AddBtnHdl, Button*, void)
ScRangePair* pPair;
if ( ( pPair = xColNameRanges->Find( theCurArea ) ) != nullptr )
{
- xColNameRanges->Remove( pPair );
+ xColNameRanges->Remove( *pPair );
}
if ( ( pPair = xRowNameRanges->Find( theCurArea ) ) != nullptr )
{
- xRowNameRanges->Remove( pPair );
+ xRowNameRanges->Remove( *pPair );
}
if ( pBtnColHead->IsChecked() )
xColNameRanges->Join( ScRangePair( theCurArea, theCurData ) );
@@ -619,9 +619,9 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, RemoveBtnHdl, Button*, void)
if (RET_YES == QUERYBOX(GetFrameWeld(), aMsg))
{
if ( bColName )
- xColNameRanges->Remove( pPair );
+ xColNameRanges->Remove( *pPair );
else
- xRowNameRanges->Remove( pPair );
+ xRowNameRanges->Remove( *pPair );
UpdateNames();
const sal_Int32 nCnt = pLbRange->GetEntryCount();