summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/txtnode/atrfld.cxx4
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx8
2 files changed, 5 insertions, 7 deletions
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index 4beca6d098c6..3aa9a961a784 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -401,8 +401,8 @@ void SwTextField::ExpandTextField(const bool bForceNotify) const
}
}
}
-
- m_aExpand = aNewExpand;
+ else
+ m_aExpand = aNewExpand;
const_cast<SwTextField*>(this)->NotifyContentChange( const_cast<SwFormatField&>(GetFormatField()) );
}
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 5d0e74955bc0..8391a652df2f 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -3023,7 +3023,7 @@ OUString SwTextNode::GetExpandText( const sal_Int32 nIdx,
eMode |= ExpandMode::ExpandFootnote;
ModelToViewHelper aConversionMap(*this, eMode);
- OUString aExpandText = aConversionMap.getViewText();
+ const OUString aExpandText = aConversionMap.getViewText();
const sal_Int32 nExpandBegin = aConversionMap.ConvertToViewPosition( nIdx );
sal_Int32 nEnd = nLen == -1 ? GetText().getLength() : nIdx + nLen;
const sal_Int32 nExpandEnd = aConversionMap.ConvertToViewPosition( nEnd );
@@ -3991,11 +3991,9 @@ void SwTextNode::SetListId(OUString const& rListId)
OUString SwTextNode::GetListId() const
{
- OUString sListId;
-
const SfxStringItem& rListIdItem =
dynamic_cast<const SfxStringItem&>(GetAttr( RES_PARATR_LIST_ID ));
- sListId = rListIdItem.GetValue();
+ const OUString sListId {rListIdItem.GetValue()};
// As long as no explicit list id attribute is set, use the list id of
// the list, which has been created for the applied list style.
@@ -4004,7 +4002,7 @@ OUString SwTextNode::GetListId() const
SwNumRule* pRule = GetNumRule();
if ( pRule )
{
- sListId = pRule->GetDefaultListId();
+ return pRule->GetDefaultListId();
}
}