the XText interface is inconsistent in its definition of the bAbsorb
parameter of the methods insertString, insertControlCharacter and
insertTextContent.

the documentation for insertControlCharacter is silent on the matter.
insertString says:

http://api.openoffice.org/docs/common/ref/com/sun/star/text/XSimpleText.html#insertString

Parameter bAbsorb
    specifies whether the text spanned by xRange will be replaced. If true
then the content of xRange will be replaced by aString, otherwise aString
will be inserted at the beginning of xRange.


and insertTextContent:

http://api.openoffice.org/docs/common/ref/com/sun/star/text/XText.html#insertTextContent

Parameter bAbsorb
    specifies whether the text spanned by xRange will be replaced. If true
then the content of xRange will be replaced by xContent, otherwise
xContent will be inserted at the end of xRange.


so for insertString, it is the beginning of xRange, but for
insertTextContent, it is the end of xRange.
apparently this inconsistency also confused the implementer of SwXText in
writer, because it consistently implements insertion at the start of the
range in all 3 methods:

http://svn.services.openoffice.org/opengrok/xref/DEV300_m54/sw/source/core/unocore/unotext.cxx#544

 544                            xTempRange = xRange->getStart();


so, what to do?
fix the implementation in writer to be inconsistent to match the API
specification?
or fix the API specification to consistently refer to the start of xRange?

regards,
michael

-- 
"Measuring software productivity by lines of code is like measuring
 progress on an airplane by how much it weighs." -- Bill Gates


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to