diff options
author | László Németh <nemeth@numbertext.org> | 2021-06-09 15:56:09 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-06-10 09:07:03 +0200 |
commit | 68b6004fe9df184bcbaf46dd53abfec228219df6 (patch) | |
tree | fd2cc53899adc395d0d5385f3c4d710abbdf2f6c /sw/source/uibase | |
parent | 2693ef720d9aaabe4fca0183f0c91ab34cf47fb4 (diff) |
tdf#141994 track changes: record insertion of images
by adding a SwRangeRedline to the anchoring point of
the image inserted with Insert->Image... or
"Insert Image" of the Standard toolbar.
Note: Only images anchored as characters can be
recorded this way, so change the default to-character
anchoring at enabled change tracking. (In other office
suites, as-character insertion is the default anchoring
for inserted images with disabled change tracking, too.)
Follow-up to commit d6322bcedc197a654abc7d64bfea8cf570f123bf
"tdf#59463 track changes: record deletion of images".
Change-Id: I593abbdb6f9f2b1a5265f112103479c1833166af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116924
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh1.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index b26af831754d..d32a6154146d 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -336,6 +336,11 @@ void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter, pFrameMgr->SetHeightSizeType(SwFrameSize::Fixed); } + // during change tracking, insert the image anchored as character + // (to create an SwRangeRedline on its anchor point) + if ( IsRedlineOn() && nAnchorType != RndStdIds::FLY_AS_CHAR ) + pFrameMgr->SetAnchor( RndStdIds::FLY_AS_CHAR ); + // Insert the graphic SwFEShell::Insert(rPath, rFilter, &rGrf, &pFrameMgr->GetAttrSet()); if ( bOwnMgr ) |