summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-06-26 14:52:18 +0200
committerMichael Stahl <mstahl@redhat.com>2013-06-26 17:16:49 +0200
commit19694e844942d44d2c2d5e1d1b95b49d03916573 (patch)
tree4197c3e58e300c043e7822c580e46605aef76e8e /sw
parent51c79f97a90eaf469d1d2531f3f0eccfafe0f94c (diff)
SetFmtItemByAutoFmt/SetTxtFmtCollByAutoFmt called with SwTxtNode
... always so don't need to check for it. Change-Id: I4bbc2a44a9c3d4ebde766a64a6ab78f7ead9c7af
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docfmt.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index c94b913f104a..18bad13e7585 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -2411,8 +2411,9 @@ void SwDoc::SetTxtFmtCollByAutoFmt( const SwPosition& rPos, sal_uInt16 nPoolId,
{
SwPaM aPam( rPos );
SwTxtNode* pTNd = rPos.nNode.GetNode().GetTxtNode();
+ assert(pTNd);
- if( mbIsAutoFmtRedline && pTNd )
+ if (mbIsAutoFmtRedline)
{
// create the redline object
const SwTxtFmtColl& rColl = *pTNd->GetTxtColl();
@@ -2442,7 +2443,7 @@ void SwDoc::SetTxtFmtCollByAutoFmt( const SwPosition& rPos, sal_uInt16 nPoolId,
SetTxtFmtColl( aPam, GetTxtCollFromPool( nPoolId ) );
- if( pSet && pTNd && pSet->Count() )
+ if (pSet && pSet->Count())
{
aPam.SetMark();
aPam.GetMark()->nContent.Assign(pTNd, pTNd->GetTxt().getLength());
@@ -2453,10 +2454,11 @@ void SwDoc::SetTxtFmtCollByAutoFmt( const SwPosition& rPos, sal_uInt16 nPoolId,
void SwDoc::SetFmtItemByAutoFmt( const SwPaM& rPam, const SfxItemSet& rSet )
{
SwTxtNode* pTNd = rPam.GetPoint()->nNode.GetNode().GetTxtNode();
+ assert(pTNd);
RedlineMode_t eOld = GetRedlineMode();
- if( mbIsAutoFmtRedline && pTNd )
+ if (mbIsAutoFmtRedline)
{
// create the redline object
SwRedline* pRedl = new SwRedline( nsRedlineType_t::REDLINE_FORMAT, rPam );