summaryrefslogtreecommitdiff
path: root/sw/source/core/docnode
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-09-08 10:21:09 +0200
committerNoel Grandin <noel@peralex.com>2016-09-08 11:47:19 +0200
commit0f8a30318695447e205b17fb0af06362ab890bc3 (patch)
tree7d31a0475a732772dd0967ba7be29868e24a09ab /sw/source/core/docnode
parentac1c3f2ab68a17b6508901bf9b5abdad618158a6 (diff)
loplugin:constantparam in sw
Change-Id: Ibae4cac28e6ff52298c804519f683017729c07a5
Diffstat (limited to 'sw/source/core/docnode')
-rw-r--r--sw/source/core/docnode/ndtbl.cxx32
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx2
2 files changed, 6 insertions, 28 deletions
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 1c928728ec75..936a5b512abd 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -2709,7 +2709,7 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* ,
}
void SwDoc::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly,
- const SwCursor* pCursor, const SwCellFrame* pBoxFrame )
+ const SwCellFrame* pBoxFrame )
{
const SwTableBox* pBox = nullptr;
SwTabFrame *pTab = nullptr;
@@ -2719,29 +2719,9 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly,
pTab = const_cast<SwFrame*>(static_cast<SwFrame const *>(pBoxFrame))->ImplFindTabFrame();
pBox = pBoxFrame->GetTabBox();
}
- else if( pCursor )
- {
- const SwContentNode* pCNd = pCursor->GetContentNode();
- if( !pCNd )
- return ;
-
- Point aPt;
- const SwShellCursor *pShCursor = dynamic_cast<const SwShellCursor*>(pCursor);
- if( pShCursor )
- aPt = pShCursor->GetPtPos();
-
- const SwFrame* pTmpFrame = pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt, nullptr, false );
- do {
- pTmpFrame = pTmpFrame->GetUpper();
- } while ( !pTmpFrame->IsCellFrame() );
-
- pBoxFrame = static_cast<const SwCellFrame*>(pTmpFrame);
- pTab = const_cast<SwFrame*>(static_cast<SwFrame const *>(pBoxFrame))->ImplFindTabFrame();
- pBox = pBoxFrame->GetTabBox();
- }
- else if( !pCursor && !pBoxFrame )
+ else
{
- OSL_ENSURE( false, "One of them needs to be specified!" );
+ OSL_ENSURE( false, "must specify pBoxFrame" );
return ;
}
@@ -2784,7 +2764,7 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly,
SetTabCols(rTab, rNew, aOld, pBox, bCurRowOnly );
}
-void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCursor*,
+void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly,
const SwCellFrame* pBoxFrame )
{
SwTabFrame *pTab;
@@ -4635,7 +4615,7 @@ SwTableAutoFormat* SwDoc::MakeTableStyle(const OUString& rName, bool bBroadcast)
return pTableFormat;
}
-std::unique_ptr<SwTableAutoFormat> SwDoc::DelTableStyle(const OUString& rName, bool bBroadcast, std::vector<SwTable*>* pAffectedTables)
+std::unique_ptr<SwTableAutoFormat> SwDoc::DelTableStyle(const OUString& rName, bool bBroadcast)
{
if (bBroadcast)
BroadcastStyleOperation(rName, SfxStyleFamily::Table, SfxStyleSheetHintId::ERASED);
@@ -4667,8 +4647,6 @@ std::unique_ptr<SwTableAutoFormat> SwDoc::DelTableStyle(const OUString& rName, b
}
}
- if (pAffectedTables)
- *pAffectedTables = vAffectedTables;
return pReleasedFormat;
}
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 6f197f4ff227..7d728a29ea93 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -1574,7 +1574,7 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, bool bBalance )
const sal_Int16 nOriHori = pFormat->GetHoriOrient().GetHoriOrient();
// We can leave the "real" work to the SwTable now
- SetTabCols( aTabCols, false, nullptr, static_cast<SwCellFrame*>(pBoxFrame) );
+ SetTabCols( aTabCols, false, static_cast<SwCellFrame*>(pBoxFrame) );
// Alignment might have been changed in SetTabCols; restore old value
const SwFormatHoriOrient &rHori = pFormat->GetHoriOrient();