summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-01-08 16:02:43 +0100
committerAndras Timar <andras.timar@collabora.com>2016-02-02 14:20:15 +0100
commita82bc15971efbee53a2d475894d8c244a74e7d75 (patch)
treeed846d6e780ada49b20469a86723e01141192c61 /include
parentea136b7d345a1bae4e343e6064153fcae764f8ab (diff)
tdf#96480: ODF import: eliminate duplicate cross reference heading bookmarks
7c3c3006deaaaf1bb3f2f4eeeaf11da3bcebe53c is apparently worse than it appeared at first glance since there are numerous assumptions about bookmarks, such as that if they were inserted successfully they may be copied successfully, which isn't the case for duplicate cross reference bookmarks. So fix this differently, by eliminating the duplicates and mapping all reference fields to refer to the surviving bookmark. It was not possible to do this in SwXBookmark by checking the makeMark() return as that would raise interesting problems such as it's currently guaranteed to have 1:1 SwXBoomarks to core Marks so we can't just connect 2 SwXBookmarks to the same core Mark, and we also can't leave the SwXBookmark unconnected after attach. Another alternative would be to temporarily allow inserting the duplicate bookmarks and then eliminate them after the import, but what is implemented now is to check from xmloff for duplicates, which is reasonably simple. (cherry picked from commit 774fb6d2e7cf36b677e66c54278225b1256bd40f) Change-Id: I7ee4854d1c9d8bf74201089cbb7287b1bd8ee3b9 Reviewed-on: https://gerrit.libreoffice.org/21369 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 55d2301ac658167396bf5533c940bceffff67f04)
Diffstat (limited to 'include')
-rw-r--r--include/xmloff/txtimp.hxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/xmloff/txtimp.hxx b/include/xmloff/txtimp.hxx
index ca0ce7ab7e5a..291998bae489 100644
--- a/include/xmloff/txtimp.hxx
+++ b/include/xmloff/txtimp.hxx
@@ -733,6 +733,9 @@ public:
void SetCellParaStyleDefault(OUString const& rNewValue);
OUString const& GetCellParaStyleDefault();
+
+ void AddCrossRefHeadingMapping(OUString const& rFrom, OUString const& rTo);
+ void MapCrossRefHeadingFieldsHorribly();
};
#endif