Hi Miklos,
Am 26.06.2014 10:54, schrieb Miklos Vajna:
On Wed, Jun 25, 2014 at 01:09:01PM +0200, Jan-Marek Glogowski <glogow@fbihome.de> wrote:
My best idea is to use
SwNodeIndex aSourceIdx( rSource.GetNodes().GetEndOfExtras(), *1* );
Are you sure such an explicit offset is required here? I'm thinking
about special situations like when the document starts with a table, if
you want to paste that into a new document, you probably want to have
the selection start at the first content node of the document, so no
static offset will work here.
I'm thinking about something like:
SwNodeIndex aNodeIndex rSource.GetNodes().GetEndOfAutotext();
SwCntntNode* pStart = rSource.GetNodes().GoNext(&aNodeIndex);
Any kind of explicit offset sounds a bit scary to me.
Well the current code uses the explicit offset 2 in SwDoc::Paste and
SwFEShell::Paste, which ignores the first content node, which results in
losing the paragraph anchored Flys of the first paragraph of the document.
For a whole document paste, I want the whole document, including the
first node with the pagedesc. This is probably special case for Mail
Merge. I added a boolean to SwFEShell::Paste, so this really pastes the
whole document.
The only user of SwDoc::Paste is SwDoc::CreateCopy. I've merged the
SwDoc::Paste code into SwDoc::CreateCopy. SwDoc::Paste used the fixed
offset of 2 for the source document content offset - same for the target
insert.
SwPaM aPara( <document content start );
this->DelFullPara(aPara);
But you're not really trying to delete the paragraph content, just join
the two, right? SwDoc::DeleteAndJoin() might be useful to do that.
No - I really tried to get rid of the whole page.
I pushed my current "works for me" changeset to
private/jmux/mailmerge-fixes. Would be happy, if I can get a review.
Thanks
Jan-Marek
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.