Created attachment 85731 [details] Zip file of 3 screenshots show - mail merge field, first page, other pages Problem description: Format (page style) of the first page (only) changed from other pages in mailmerge. Steps to reproduce: 1. Create new text (writer) document. 2. Change page style setting, such as set top margin to 5 cm. 3. Add text and mail merge field. 4. Save file as ODF Document Template (.ott) and close file 5. Create new text document from .ott file (in step 4). 6. Menu Tool > Mail Merge Wizard and doing step by step. 7. Set filter record in step 3 of Wizard and next until step 7 personalize document. 8. click on > edit individual document in step 7 of wizard. 9. Mail Merge Wizard generate new document that has pages (equal records match). 10. The first page has top margin set to 2 or 2.5 cm but other page top margin set to 5 cm. 11. If you want to set first page to the same as others use Menu > Format > Page... and click on OK button. Current behavior: If mail merge file use page style that has margin setting different. The first page has not been set to that page style until use Menu > Format > Page and click OK button. Expected behavior: Format of all page has the same page style in mail merge. Operating System: Windows XP Version: 4.1.1.2 release Last worked in: 4.1.0.4 release
I am experiencing this same behavior with LibreOffice 4.1.2.3 on Ubuntu.
i would suspect my first-page header fixes but... those are in 4.1.2 and this is borked in 4.1.1 already? actually 4.1.1.2 is working fine here... regression from: commit 75084f6c42c27dc95418df9cefed2fddfb26000e Author: Michael Stahl <mstahl@redhat.com> AuthorDate: Tue Aug 20 11:41:37 2013 +0200 fdo#66145: do not check IsFirstShared() in SwPageDesc::GetLeftFmt() ... and GetRightFmt(). If the first format is requested it must be returned; the sharing works by copying the SwFmtHeader/Footer from aMaster to the other members.
Comment on attachment 85731 [details] Zip file of 3 screenshots show - mail merge field, first page, other pages i also have this problem. I am on opensuse 13.1. libreoffice writer 4.1.4.2
Seen here also on Ubuntu 13.10 with LO 4.1.3.2.
I actually bisected and reverted the patch on master and it fixes the problem for me.
(In reply to comment #5) > I actually bisected and reverted the patch on master and it fixes the > problem for me. Just to make it clear - the bisect found the same commit, mst suspected: commit 75084f6c42c27dc95418df9cefed2fddfb26000e
I've seen this issue intermittently for a while on both Windows and OSX versions. I've tested with 4.3.0.4 and it's still there. This is really a serious problem for regular (daily) mail-merge usage.
Created attachment 104106 [details] throwaway patch to help debug this
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=5c1cc92ee09f9fcc99077cacd3fc55640f03b7b2 fdo#69282: sw: fix updating of page styles via SwDocShell::_LoadStyles() The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
hmm.... in the call from SwDBManager::MergeDocuments() to _LoadStyles() previously the page was re-formatted to the proper size but not any more... hmm SwDoc::CopyPageDesc does not send a modify for firsts? suspicious, but does not cause _this_ problem... ahhh.... here is where the size of the SwPageFrm was invalidated previously, where it was erroneously using the Master SwFrmFmt on the first page too: #0 SwFrm::_InvalidateSize (this=0x6f16300) at /sw/source/core/inc/frame.hxx:738 #1 0x00007fcebd0993f0 in SwFrm::Modify (this=0x6f16300, pOld=0x7ffff874eb10, pNew=0x7ffff874eb40) at /sw/source/core/layout/wsfrm.cxx:265 #2 0x00007fcebd02a3f9 in SwPageFrm::Modify (this=0x6f16300, pOld=0x7ffff874ee20, pNew=0x7ffff874ee50) at /sw/source/core/layout/pagechg.cxx:518 #3 0x00007fcebcba06b8 in SwModify::ModifyBroadcast (this=0x6e817c8, pOldValue=0x7ffff874ee20, pNewValue=0x7ffff874ee50, nType=0x7fcebcb9f9a0 <SwClient::CreateType()>) at /sw/source/core/attr/calbck.cxx:349 #4 0x00007fcebcba010e in SwModify::NotifyClients (this=0x6e817c8, pOldValue=0x7ffff874ee20, pNewValue=0x7ffff874ee50) at /sw/source/core/attr/calbck.cxx:188 #5 0x00007fcebcba402f in SwFmt::Modify (this=0x6e817c8, pOldValue=0x7ffff874ee20, pNewValue=0x7ffff874ee50) at /sw/source/core/attr/format.cxx:343 #6 0x00007fcebcfac875 in SwFrmFmt::Modify (this=0x6e817c8, pOld=0x7ffff874ee20, pNew=0x7ffff874ee50) at /sw/source/core/layout/atrfrm.cxx:2481 #7 0x00007fcebcba0ebd in SwClient::ModifyNotification (this=0x6e817c8, pOldValue=0x7ffff874ee20, pNewValue=0x7ffff874ee50) at /sw/inc/calbck.hxx:100 #8 0x00007fcebcba5378 in SwFmt::SetFmtAttr (this=0x6e817c8, rSet=...) at /sw/source/core/attr/format.cxx:631 #9 0x00007fcebccea97a in SwDoc::CopyPageDesc (this=0x6edcd20, rSrcDesc=..., rDstDesc=..., bCopyPoolIds=true) at /sw/source/core/doc/docfmt.cxx:1437 #10 0x00007fcebcceb3cc in SwDoc::ReplaceStyles (this=0x6edcd20, rSource=..., bIncludePageStyles=true) at /sw/source/core/doc/docfmt.cxx:1541 #11 0x00007fcebd60cc04 in SwDocShell::_LoadStyles (this=0x6e4a780, rSource=..., bPreserveCurrentDocument=true) at /sw/source/uibase/app/docst.cxx:1269 #12 0x00007fcebd88da07 in SwDBManager::MergeDocuments (this=0x4b71f10, rMMConfig=..., rSourceView=...) at /sw/source/uibase/dbui/dbmgr.cxx:2885 fixed on master
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-4-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=11525a6f164a5b89caffded73a35797a044f4107&h=libreoffice-4-3 fdo#69282: sw: fix updating of page styles via SwDocShell::_LoadStyles() It will be available in LibreOffice 4.3.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-4-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f23d6a124dc413bcbb98f5145d230de707ca85db&h=libreoffice-4-2 fdo#69282: sw: fix updating of page styles via SwDocShell::_LoadStyles() It will be available in LibreOffice 4.2.7. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
*** Bug 77680 has been marked as a duplicate of this bug. ***
*** Bug 75990 has been marked as a duplicate of this bug. ***
Varun committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=9060439f98e771d5079fb4434e2152bee053c40d Added Test for tdf#69282 copy page style b/w docs It will be available in 5.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.