summaryrefslogtreecommitdiff
path: root/editeng/source/editeng/ContentNode.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'editeng/source/editeng/ContentNode.cxx')
-rw-r--r--editeng/source/editeng/ContentNode.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/editeng/source/editeng/ContentNode.cxx b/editeng/source/editeng/ContentNode.cxx
index de5e2150b151..b7e7f4b0e8ee 100644
--- a/editeng/source/editeng/ContentNode.cxx
+++ b/editeng/source/editeng/ContentNode.cxx
@@ -564,10 +564,7 @@ void ContentNode::SetChar(sal_Int32 nPos, sal_Unicode c)
void ContentNode::Insert(const OUString& rStr, sal_Int32 nPos)
{
- if (nPos == 0 && maString.getLength() == 0)
- maString = rStr; // avoid allocation
- else
- maString = maString.replaceAt(nPos, 0, rStr);
+ maString = maString.replaceAt(nPos, 0, rStr);
}
void ContentNode::Append(std::u16string_view rStr)