[Libreoffice-commits] core.git: sc/inc sc/source
Caolán McNamara
caolanm at redhat.com
Tue Jun 6 19:37:08 UTC 2017
sc/inc/attarray.hxx | 4 ++--
sc/inc/column.hxx | 4 ++--
sc/inc/table.hxx | 2 +-
sc/source/core/data/attarray.cxx | 18 +++++++++---------
sc/source/core/data/column.cxx | 6 +++---
sc/source/core/data/document.cxx | 12 ++++++------
sc/source/core/data/table2.cxx | 8 ++++----
7 files changed, 27 insertions(+), 27 deletions(-)
New commits:
commit e4008dc0c3b43c9eacdd88511075be2b883c9a77
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 6 13:43:35 2017 +0100
first arg of ApplyBlockFrame is never null
Change-Id: Ie65fce6041278c6758df266c4ef097a5758f75dd
Reviewed-on: https://gerrit.libreoffice.org/38448
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/inc/attarray.hxx b/sc/inc/attarray.hxx
index b7ac603f47ba..551ec560981f 100644
--- a/sc/inc/attarray.hxx
+++ b/sc/inc/attarray.hxx
@@ -124,8 +124,8 @@ public:
void MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner, ScLineFlags& rFlags,
SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight ) const;
- void ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInfoItem* pLineInner,
- SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight );
+ void ApplyBlockFrame(const SvxBoxItem& rLineOuter, const SvxBoxInfoItem* pLineInner,
+ SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight);
void SetPattern( SCROW nRow, const ScPatternAttr* pPattern, bool bPutToPool = false );
void SetPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr* pPattern,
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 585b930cf56a..16a2733495b7 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -454,8 +454,8 @@ public:
void MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
ScLineFlags& rFlags,
SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight ) const;
- void ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInfoItem* pLineInner,
- SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight );
+ void ApplyBlockFrame(const SvxBoxItem& rLineOuter, const SvxBoxInfoItem* pLineInner,
+ SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight);
void ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr );
void ApplyPattern( SCROW nRow, const ScPatternAttr& rPatAttr );
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index eb55829d65fe..8b096b1fadba 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -653,7 +653,7 @@ public:
ScLineFlags& rFlags,
SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow ) const;
- void ApplyBlockFrame( const SvxBoxItem* pLineOuter,
+ void ApplyBlockFrame(const SvxBoxItem& rLineOuter,
const SvxBoxInfoItem* pLineInner,
SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow );
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 94c2fce5d620..9f5141402043 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1244,15 +1244,15 @@ bool ScAttrArray::ApplyFrame( const SvxBoxItem* pBoxItem,
}
}
-void ScAttrArray::ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInfoItem* pLineInner,
- SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight )
+void ScAttrArray::ApplyBlockFrame(const SvxBoxItem& rLineOuter, const SvxBoxInfoItem* pLineInner,
+ SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight)
{
if (nStartRow == nEndRow)
- ApplyFrame( pLineOuter, pLineInner, nStartRow, nEndRow, bLeft, nDistRight, true, 0 );
+ ApplyFrame(&rLineOuter, pLineInner, nStartRow, nEndRow, bLeft, nDistRight, true, 0);
else if ( pData )
{
- ApplyFrame( pLineOuter, pLineInner, nStartRow, nStartRow, bLeft, nDistRight,
- true, nEndRow-nStartRow );
+ ApplyFrame(&rLineOuter, pLineInner, nStartRow, nStartRow, bLeft, nDistRight,
+ true, nEndRow-nStartRow);
if ( nEndRow > nStartRow+1 ) // inner part available?
{
@@ -1265,8 +1265,8 @@ void ScAttrArray::ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInf
for (SCSIZE i=nStartIndex; i<=nEndIndex;)
{
nTmpEnd = std::min( (SCROW)(nEndRow-1), pData[i].nRow );
- bool bChanged = ApplyFrame( pLineOuter, pLineInner, nTmpStart, nTmpEnd,
- bLeft, nDistRight, false, nEndRow-nTmpEnd );
+ bool bChanged = ApplyFrame(&rLineOuter, pLineInner, nTmpStart, nTmpEnd,
+ bLeft, nDistRight, false, nEndRow - nTmpEnd);
nTmpStart = nTmpEnd+1;
if (bChanged)
{
@@ -1278,11 +1278,11 @@ void ScAttrArray::ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInf
}
}
- ApplyFrame( pLineOuter, pLineInner, nEndRow, nEndRow, bLeft, nDistRight, false, 0 );
+ ApplyFrame(&rLineOuter, pLineInner, nEndRow, nEndRow, bLeft, nDistRight, false, 0);
}
else
{
- ApplyFrame( pLineOuter, pLineInner, nStartRow, nEndRow, bLeft, nDistRight, true, 0 );
+ ApplyFrame(&rLineOuter, pLineInner, nStartRow, nEndRow, bLeft, nDistRight, true, 0);
}
}
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 17974f0aa46a..3d04070ebab5 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -363,10 +363,10 @@ void ScColumn::MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInn
pAttrArray->MergeBlockFrame( pLineOuter, pLineInner, rFlags, nStartRow, nEndRow, bLeft, nDistRight );
}
-void ScColumn::ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInfoItem* pLineInner,
- SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight )
+void ScColumn::ApplyBlockFrame(const SvxBoxItem& rLineOuter, const SvxBoxInfoItem* pLineInner,
+ SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight)
{
- pAttrArray->ApplyBlockFrame( pLineOuter, pLineInner, nStartRow, nEndRow, bLeft, nDistRight );
+ pAttrArray->ApplyBlockFrame(rLineOuter, pLineInner, nStartRow, nEndRow, bLeft, nDistRight);
}
const ScPatternAttr* ScColumn::GetPattern( SCROW nRow ) const
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 71c523dd54c6..647db469ae87 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -5658,7 +5658,7 @@ void ScDocument::ApplySelectionFrame( const ScMarkData& rMark,
for ( size_t j=0; j < nRangeCount; j++ )
{
ScRange aRange = *aRangeList[ j ];
- maTabs[*itr]->ApplyBlockFrame( &rLineOuter, pLineInner,
+ maTabs[*itr]->ApplyBlockFrame( rLineOuter, pLineInner,
aRange.aStart.Col(), aRange.aStart.Row(),
aRange.aEnd.Col(), aRange.aEnd.Row() );
}
@@ -5713,7 +5713,7 @@ void ScDocument::ApplySelectionFrame( const ScMarkData& rMark,
for ( size_t j=0; j < nEnvelopeRangeCount; j++ )
{
const ScRange* pRange = rRangeListTopEnvelope[ j ];
- maTabs[*itr1]->ApplyBlockFrame( &aTop, &aTopInfo,
+ maTabs[*itr1]->ApplyBlockFrame( aTop, &aTopInfo,
pRange->aStart.Col(), pRange->aStart.Row(),
pRange->aEnd.Col(), pRange->aEnd.Row() );
}
@@ -5721,7 +5721,7 @@ void ScDocument::ApplySelectionFrame( const ScMarkData& rMark,
for ( size_t j=0; j < nEnvelopeRangeCount; j++ )
{
const ScRange* pRange = rRangeListBottomEnvelope[ j ];
- maTabs[*itr1]->ApplyBlockFrame( &aBottom, &aBottomInfo,
+ maTabs[*itr1]->ApplyBlockFrame( aBottom, &aBottomInfo,
pRange->aStart.Col(), pRange->aStart.Row(),
pRange->aEnd.Col(), pRange->aEnd.Row() );
}
@@ -5729,7 +5729,7 @@ void ScDocument::ApplySelectionFrame( const ScMarkData& rMark,
for ( size_t j=0; j < nEnvelopeRangeCount; j++ )
{
const ScRange* pRange = rRangeListLeftEnvelope[ j ];
- maTabs[*itr1]->ApplyBlockFrame( &aLeft, &aLeftInfo,
+ maTabs[*itr1]->ApplyBlockFrame( aLeft, &aLeftInfo,
pRange->aStart.Col(), pRange->aStart.Row(),
pRange->aEnd.Col(), pRange->aEnd.Row() );
}
@@ -5737,7 +5737,7 @@ void ScDocument::ApplySelectionFrame( const ScMarkData& rMark,
for ( size_t j=0; j < nEnvelopeRangeCount; j++ )
{
const ScRange* pRange = rRangeListRightEnvelope[ j ];
- maTabs[*itr1]->ApplyBlockFrame( &aRight, &aRightInfo,
+ maTabs[*itr1]->ApplyBlockFrame( aRight, &aRightInfo,
pRange->aStart.Col(), pRange->aStart.Row(),
pRange->aEnd.Col(), pRange->aEnd.Row() );
}
@@ -5754,7 +5754,7 @@ void ScDocument::ApplyFrameAreaTab(const ScRange& rRange,
SCTAB nEndTab = rRange.aStart.Tab();
for (SCTAB nTab=nStartTab; nTab<=nEndTab && nTab < static_cast<SCTAB>(maTabs.size()); nTab++)
if (maTabs[nTab])
- maTabs[nTab]->ApplyBlockFrame(&rLineOuter, &rLineInner,
+ maTabs[nTab]->ApplyBlockFrame(rLineOuter, &rLineInner,
rRange.aStart.Col(), rRange.aStart.Row(),
rRange.aEnd.Col(), rRange.aEnd.Row());
}
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 49f040d5e5de..72140a83f36b 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -2472,16 +2472,16 @@ void ScTable::MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInne
}
}
-void ScTable::ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInfoItem* pLineInner,
- SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow )
+void ScTable::ApplyBlockFrame(const SvxBoxItem& rLineOuter, const SvxBoxInfoItem* pLineInner,
+ SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow)
{
if (ValidColRow(nStartCol, nStartRow) && ValidColRow(nEndCol, nEndRow))
{
PutInOrder(nStartCol, nEndCol);
PutInOrder(nStartRow, nEndRow);
for (SCCOL i=nStartCol; i<=nEndCol; i++)
- aCol[i].ApplyBlockFrame( pLineOuter, pLineInner,
- nStartRow, nEndRow, (i==nStartCol), nEndCol-i );
+ aCol[i].ApplyBlockFrame(rLineOuter, pLineInner,
+ nStartRow, nEndRow, (i==nStartCol), nEndCol-i);
}
}
More information about the Libreoffice-commits
mailing list