summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-12 17:12:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-15 19:22:21 +0200
commiteaf0c263eb1a72a58d2a67cc0506ab022d7c4be4 (patch)
tree4c732e95b560235e83c6de4b5b96260b638fa88d /editeng
parent921ae49cd7e332d7e1ad702efe2198b2780cc829 (diff)
loplugin:staticconstfield improvements
And fix ScXMLCachedRowAttrAccess::Cache which was never setting its mnTab field, and hence would never be hit. And fix oox::xls::CellBlockBuffer, which was never setting mnCurrRow. Change-Id: I2c46aa050b9ebe3c2dc2e52579555f97945dd61c Reviewed-on: https://gerrit.libreoffice.org/61772 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/outliner/outliner.cxx11
-rw-r--r--editeng/source/outliner/outlvw.cxx4
2 files changed, 7 insertions, 8 deletions
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 42715dad0511..da008ce69989 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -66,8 +66,8 @@ using std::advance;
void Outliner::ImplCheckDepth( sal_Int16& rnDepth ) const
{
- if( rnDepth < nMinDepth )
- rnDepth = nMinDepth;
+ if( rnDepth < gnMinDepth )
+ rnDepth = gnMinDepth;
else if( rnDepth > nMaxDepth )
rnDepth = nMaxDepth;
}
@@ -713,7 +713,7 @@ void Outliner::ImplSetLevelDependentStyleSheet( sal_Int32 nPara )
void Outliner::ImplInitDepth( sal_Int32 nPara, sal_Int16 nDepth, bool bCreateUndo )
{
- DBG_ASSERT( ( nDepth >= nMinDepth ) && ( nDepth <= nMaxDepth ), "ImplInitDepth - Depth is invalid!" );
+ DBG_ASSERT( ( nDepth >= gnMinDepth ) && ( nDepth <= nMaxDepth ), "ImplInitDepth - Depth is invalid!" );
Paragraph* pPara = pParaList->GetParagraph( nPara );
if (!pPara)
@@ -1249,7 +1249,6 @@ Outliner::Outliner(SfxItemPool* pPool, OutlinerMode nMode)
: mnFirstSelPage(0)
, nDepthChangedHdlPrevDepth(0)
, nMaxDepth(9)
- , nMinDepth(-1)
, bFirstParaIsEmpty(true)
, nBlockInsCallback(0)
, bStrippingPortions(false)
@@ -1885,7 +1884,7 @@ void Outliner::Clear()
ImplBlockInsertionCallbacks( true );
pEditEngine->Clear();
pParaList->Clear();
- pParaList->Append( std::unique_ptr<Paragraph>(new Paragraph( nMinDepth )));
+ pParaList->Append( std::unique_ptr<Paragraph>(new Paragraph( gnMinDepth )));
bFirstParaIsEmpty = true;
ImplBlockInsertionCallbacks( false );
}
@@ -1893,7 +1892,7 @@ void Outliner::Clear()
{
Paragraph* pPara = pParaList->GetParagraph( 0 );
if(pPara)
- pPara->SetDepth( nMinDepth );
+ pPara->SetDepth( gnMinDepth );
}
}
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index f214ca3fe06d..1a211d87b02f 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -491,8 +491,8 @@ void OutlinerView::Indent( short nDiff )
if( nOldDepth == -1 )
continue;
- if ( nNewDepth < pOwner->nMinDepth )
- nNewDepth = pOwner->nMinDepth;
+ if ( nNewDepth < Outliner::gnMinDepth )
+ nNewDepth = Outliner::gnMinDepth;
if ( nNewDepth > pOwner->nMaxDepth )
nNewDepth = pOwner->nMaxDepth;