summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-05-12 13:00:16 +0200
committerMichael Stahl <mstahl@redhat.com>2015-05-12 13:11:30 +0200
commitc74631a0ffd32d3e0794fdd861582ca5b1d55b45 (patch)
treeb3c7ed5b83653926d7b24efc05beb452146c0dbf
parent36a7ac0de3c97168f401e84f4ce45d1e7a1776c3 (diff)
sw: remove redundant parameter of SwXText::Impl::ConvertCell()
Change-Id: I8f435c4a8bb8e2ad118abd001df56162a3996521
-rw-r--r--sw/source/core/unocore/unotext.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 8b3facc69f0c..e07403b2c914 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -110,7 +110,6 @@ public:
throw (lang::IllegalArgumentException, uno::RuntimeException);
void ConvertCell(
- const bool bFirstCell,
const uno::Sequence< uno::Reference< text::XTextRange > > & rCell,
::std::vector<SwNodeRange> & rRowNodes,
::std::unique_ptr< SwPaM > & rpFirstPaM,
@@ -1816,7 +1815,6 @@ static bool lcl_SimilarPosition( const sal_Int32 nPos1, const sal_Int32 nPos2 )
}
void SwXText::Impl::ConvertCell(
- const bool bFirstCell,
const uno::Sequence< uno::Reference< text::XTextRange > > & rCell,
::std::vector<SwNodeRange> & rRowNodes,
::std::unique_ptr< SwPaM > & rpFirstPaM,
@@ -1905,7 +1903,7 @@ void SwXText::Impl::ConvertCell(
have to be aligned on paragraph borders by inserting paragraph
breaks. Non-consecutive ranges must initiate an exception.
*/
- if (bFirstCell)
+ if (!pLastCell) // first cell?
{
// align the beginning - if necessary
if (aStartCellPam.Start()->nContent.GetIndex())
@@ -1980,8 +1978,9 @@ void SwXText::Impl::ConvertCell(
SwNodeRange aCellRange(aStartCellPam.Start()->nNode,
aEndCellPam.End()->nNode);
rRowNodes.push_back(aCellRange); // note: invalidates pLastCell!
- if (bFirstCell)
+ if (!pLastCell)
{
+ assert(!rpFirstPaM);
rpFirstPaM.reset(new SwPaM(*aStartCellPam.Start()));
}
}
@@ -2250,7 +2249,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
(nCell == 0)
? ((nRow == 0) ? nullptr : &*aTableNodes.rbegin()->rbegin())
: &*aRowNodes.rbegin());
- m_pImpl->ConvertCell((nCell == 0) && (nRow == 0), pRow[nCell],
+ m_pImpl->ConvertCell(pRow[nCell],
aRowNodes, pFirstPaM, pLastCell, bExcept);
}
aTableNodes.push_back(aRowNodes);