To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=101283
------- Additional comments from [email protected] Fri Jul 17 07:27:16 +0000 2009 ------- I encountered the same issue recently. The issue is particularly bad because you save a document in one state (with bookmark in front of text), you close the document, open it again and it is in a different state (text lies inside of bookmark) without you changing anything in the document. Obviously the internal state of the document and what is written in the content.xml do not correspond correctly. I attached a simplified test document below. Do the following: 1. Look at the content.xml in simplifiedSelfExpandingBookmark.odt. The important part is the following: <text:bookmark-start text:name="test"/><text:bookmark-end text:name="test"/>def Notice that the text "def" comes AFTER the bookmark. 2. Open simplifiedSelfExpandingBookmark.odt in writer. 3. Save the document under a different name with "Save as.." 4. Look at the content.xml in the new document. Magically the content.xml has changed to: <text:bookmark-start text:name="test"/>def<text:bookmark-end text:name="test"/> So now the text "def" is INSIDE of the bookmark even though I didn't change a thing in the document before saving it again. It should be obvious why this is pretty bad, but just to iterate further consider the following example where you have a macro which looks something like this: Sub Main bookmark = ThisComponent.getBookmarks().getByName("test") bookmark.getAnchor().setString("abc") End Sub And now do the following: 1. Open a new writer document 2. Enter the text "abcdef" 3. Select "abc" 4. Insert a bookmark on "abc" using Insert->Bookmark. Name the bookmark "test". 5. Open the navigator (F5) 6. Select the bookmark "test" using the navigator. 7. Hit Del, thus deleting "abc" (The bookmark "test" is still there). 8. Save the document. We now have exactly the case shown in simplifiedSelfExpandingBookmark.odt where in content.xml the "test"-Bookmark comes before the text "def". If we now call our macro everything works as expected. The text "abc" gets inserted inside the bookmark "test", and the document now contains the string "abcdef". But if we close the document first and open it again (or just reload it with File->Reload), the macro has a different effect! It deletes the text "def" and the document now only contains the string "abc". So even though we theoretically have the exact same document the same macro does different things to it after a reload of the document (without changing anything to the document). --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
