summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-02-15 13:29:04 +0100
committerMichael Stahl <mstahl@redhat.com>2013-02-15 22:43:47 +0100
commitd47218d79a2440e71efb66b2224063801ba6623b (patch)
tree59f8adddb1418602250b3bb7ad163e371e162974 /sw/inc
parent447bb5b5006051672ec526b75bec7db02d2db82e (diff)
fdo#60732: make callers of SwTxtNode::InsertText more robust:
Return the actually inserted string from InsertText(), so callers can check if the insertion was actually successful. Especially InsertHint() will likely cause problems if it cannot insert its CH_TXTATR; also Undo objects should not Undo more than was actually inserted. Change-Id: I87c9ea8b226ae4a2a6c20c112da76db07051a1bf
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/ndtxt.hxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 4b78cd9731fe..0c48f6409b90 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -244,7 +244,10 @@ public:
virtual sal_uInt16 ResetAllAttr();
/// insert text content
- void InsertText( const XubString & rStr, const SwIndex & rIdx,
+ /// @param rStr text to insert; in case it does not fit into the limit of
+ /// TXTNODE_MAX, the longest prefix that fits is inserted
+ /// @return the prefix of rStr that was actually inserted
+ OUString InsertText( const XubString & rStr, const SwIndex & rIdx,
const enum IDocumentContentOperations::InsertFlags nMode
= IDocumentContentOperations::INS_DEFAULT );