[Libreoffice-bugs] [Bug 143819] Undo doesn't restore image anchor position

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Sep 14 09:51:02 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=143819

Stephan Bergmann <sbergman at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vmiklos at collabora.com

--- Comment #6 from Stephan Bergmann <sbergman at redhat.com> ---
(In reply to Stephan Bergmann from comment #5)
> > commit 0a4d77f35e96e4dfdf69cc5ceb788ddaa849084c
> > Author: Miklos Vajna <vmiklos at collabora.co.uk>
> > Date:   Mon Oct 6 15:26:35 2014 +0200
> > 
> >     SwTxtNode::Update: don't move anchors at insert position
> >     
> >     Use cases:
> >     
> >     1) User of the XTextAppend API's uses appendTextPortion(), then
> >     appendTextContent(), then appendTextPortion() again. It's expected that
> >     the text content will be in the middle of the paragraph, but before, it
> >     was at the end of it.
> >     
> >     It's possible to work this around by inserting the text contents only at
> >     the end of the paragraph (like it's done for ODF import in
> >     XMLParaContext::~XMLParaContext()), but probably it's not a good idea to
> >     copy&paste this workaround in all the import filters.
> >     
> >     2) User types some characters in a new document, then inserts a picture,
> >     and sets anchor type to at-char. Now the anchor point is set to the end
> >     of the paragraph, but it's impossible to type anything after that
> >     character.
> >     
> >     To be fair, now it's not possible to type something *before* the anchor
> >     point, if it's at the first character, but hopefully that's less of an
> >     issue, since setting the anchor type to at-char sets it to the end of
> >     the paragraph, not at the start of it.
> >     
> >     Change-Id: Ia8b33e8880aae86f62fae09cd5ac1cf82c83320f
> > 
> >  sw/qa/extras/ooxmlexport/data/anchor-position.docx | Bin 0 -> 14599 bytes
> >  sw/qa/extras/ooxmlexport/ooxmlexport.cxx           |   9 +++++++++
> >  sw/qa/extras/ooxmlexport/ooxmlexport5.cxx          |   2 +-
> >  sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx        |   2 +-
> >  sw/source/core/txtnode/ndtxt.cxx                   |  16 ++++++++++++++++
> >  5 files changed, 27 insertions(+), 2 deletions(-)

Miklos, I wild guess that the above might be the relevant commit?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210914/52acca9d/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list