tdf#90230 SwDoc::AppendDoc: take care of marks when inserting page break

SwDoc::AppendDoc() inserts nodes from an other document, and before
doing that, it inserts a page break at the end of the document. In case
there are marks at the end of the last paragraph, the insertion of the
page break moves them to the next page. This is a rare situation, but
happens e.g. when the source document is an empty one: then MM puts a
mark at the first paragraph of each inserted MM part, and then the first
paragraph == the last paragraph, so the mark of the only paragraph in
the document gets moved to the next page.

This is a problem on its own, but is detected by the SwIndexReg dtor
when that empty paragraph gets deleted later in SwNodes::Delete() called
by SwDoc::AppendDoc(), resulting in an assertion failure.

Triggered by commit a305a2c91420652db450b7f8edd140e1d69f42cf (use
bookmarks to mark mailmerge parts in a mailmerge document (fdo#80823),
2014-10-20), these not adjusted bookmarks were not detected before.

Unit test not included, as the entire mailmerge unit test framework is missing
in 4.1.

Conflicts:
	sw/qa/extras/mailmerge/mailmerge.cxx

Change-Id: I89775b477a2fd3182b2bc87144aed2bfe7912aff
1 file changed
tree: 98e5563f4c4e9703937270a3df067f34b45d79f9
  1. .git-hooks/
  2. accessibility/
  3. afms/
  4. android/
  5. animations/
  6. apache-commons/
  7. apple_remote/
  8. autodoc/
  9. avmedia/
  10. basctl/
  11. basebmp/
  12. basegfx/
  13. basic/
  14. bean/
  15. beanshell/
  16. bin/
  17. binaryurp/
  18. bluez_bluetooth/
  19. boost/
  20. bridges/
  21. cairo/
  22. canvas/
  23. chart2/
  24. cli_ure/
  25. clucene/
  26. codemaker/
  27. comphelper/
  28. compilerplugins/
  29. config_host/
  30. configmgr/
  31. connectivity/
  32. cosv/
  33. cppcanvas/
  34. cppu/
  35. cppuhelper/
  36. cppunit/
  37. cpputools/
  38. crashrep/
  39. ct2n/
  40. cui/
  41. curl/
  42. dbaccess/
  43. desktop/
  44. distro-configs/
  45. drawinglayer/
  46. dtrans/
  47. editeng/
  48. embeddedobj/
  49. embedserv/
  50. epm/
  51. eventattacher/
  52. expat/
  53. extensions/
  54. external/
  55. extras/
  56. fileaccess/
  57. filter/
  58. firefoxos/
  59. fontconfig/
  60. forms/
  61. formula/
  62. fpicker/
  63. framework/
  64. freetype/
  65. graphite/
  66. harfbuzz/
  67. helpcompiler/
  68. hsqldb/
  69. hunspell/
  70. hwpfilter/
  71. hyphen/
  72. i18nlangtag/
  73. i18npool/
  74. i18nutil/
  75. icon-themes/
  76. icu/
  77. idl/
  78. idlc/
  79. include/
  80. instsetoo_native/
  81. io/
  82. ios/
  83. javaunohelper/
  84. jfreereport/
  85. jpeg/
  86. jurt/
  87. jvmaccess/
  88. jvmfwk/
  89. l10ntools/
  90. languagetool/
  91. lcms2/
  92. libcdr/
  93. libcmis/
  94. libexttextcat/
  95. liblangtag/
  96. libmariadb/
  97. libmspub/
  98. libmwaw/
  99. libodfgen/
  100. liborcus/
  101. libpng/
  102. librelogo/
  103. libvisio/
  104. libwpd/
  105. libwpg/
  106. libwps/
  107. libxml2/
  108. libxmlsec/
  109. libxslt/
  110. lingucomponent/
  111. linguistic/
  112. lotuswordpro/
  113. lpsolve/
  114. m4/
  115. mdds/
  116. Mesa/
  117. more_fonts/
  118. moz/
  119. mysqlc/
  120. mysqlcppconn/
  121. mythes/
  122. neon/
  123. nlpsolver/
  124. np_sdk/
  125. nss/
  126. o3tl/
  127. odk/
  128. offapi/
  129. officecfg/
  130. oovbaapi/
  131. oox/
  132. openldap/
  133. openssl/
  134. package/
  135. padmin/
  136. postgresql/
  137. postprocess/
  138. psprint_config/
  139. python3/
  140. pyuno/
  141. qadevOOo/
  142. readlicense_oo/
  143. redland/
  144. registry/
  145. remotebridges/
  146. reportbuilder/
  147. reportdesign/
  148. rhino/
  149. ridljar/
  150. rsc/
  151. sal/
  152. salhelper/
  153. sane/
  154. sax/
  155. sc/
  156. scaddins/
  157. sccomp/
  158. scp2/
  159. scripting/
  160. sd/
  161. sdext/
  162. setup_native/
  163. sfx2/
  164. shell/
  165. slideshow/
  166. smoketest/
  167. solenv/
  168. soltools/
  169. sot/
  170. starmath/
  171. stoc/
  172. store/
  173. svgio/
  174. svl/
  175. svtools/
  176. svx/
  177. sw/
  178. swext/
  179. sysui/
  180. test/
  181. testtools/
  182. tomcat/
  183. toolkit/
  184. tools/
  185. touch/
  186. tubes/
  187. twain/
  188. ucb/
  189. ucbhelper/
  190. ucpp/
  191. udkapi/
  192. udm/
  193. unixODBC/
  194. UnoControls/
  195. unodevtools/
  196. unoidl/
  197. unoil/
  198. unotest/
  199. unotools/
  200. unoxml/
  201. ure/
  202. uui/
  203. vbahelper/
  204. vcl/
  205. vigra/
  206. wizards/
  207. writerfilter/
  208. writerperfect/
  209. x11_extensions/
  210. xmerge/
  211. xmlhelp/
  212. xmloff/
  213. xmlreader/
  214. xmlscript/
  215. xmlsecurity/
  216. xpdf/
  217. xsltml/
  218. zlib/
  219. .gitattributes
  220. .gitignore
  221. .gitmodules
  222. .gitreview
  223. autogen.sh
  224. config.guess
  225. config.sub
  226. config_host.mk.in
  227. configure.ac
  228. COPYING
  229. COPYING.LGPL
  230. COPYING.MPL
  231. download.lst
  232. g
  233. install-sh
  234. Library_merged.mk
  235. Library_urelibs.mk
  236. lo.xcent.in
  237. logerrit
  238. Makefile.fetch
  239. Makefile.gbuild
  240. Makefile.in
  241. README.Android
  242. README.Code
  243. README.cross
  244. README.Solaris
  245. README.solver
  246. Repository.mk
  247. RepositoryExternal.mk
  248. RepositoryFixes.mk
  249. RepositoryModule_build.mk
  250. RepositoryModule_host.mk
  251. TEMPLATE.SOURCECODE.HEADER
  252. unusedcode.easy
  253. unusedcode.exclude
  254. unusedcode.README