Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing
|Summary:||StandaloneDocumentInfo unit test.|
|Product:||App Dev||Reporter:||Oliver Brinzing <oliver.brinzing>|
|Status:||CLOSED FIXED||QA Contact:||issues@api <issues>|
|Version:||3.3.0 or older (OOo)|
|Issue Type:||PATCH||Latest Confirmation in:||---|
|Issue Depends on:|
Description Oliver Brinzing 2006-01-06 08:50:35 UTC
Hi, as one can read, i still have problems using XStandaloneDocumentInfo ... using the code snippet to read and write the documentinfo from different files causes the following problems: *.sdw *.sxw *.odt read write read write read write oo 1.1.5 ok ok ok fails fails fails oo 2.0.1 fails fails ok fails ok fails regards Oliver REM ***** BASIC ***** Option Explicit Sub Main On Local Error Goto ErrorHandler Dim oSM, oDesk, oInfo As Object Dim sFile as String Dim sTitle as String sFile = "E:\test.sdw" ' sFile = "E:\test.sxw" ' sFile = "E:\test.odt" oSM = CreateObject("com.sun.star.ServiceManager") oInfo = oSM.createInstance("com.sun.star.document.StandaloneDocumentInfo") oInfo.loadFromURL(ConvertToUrl(sFile)) sTitle = oInfo.getPropertyValue("Title") msgBox sTitle oInfo.setPropertyValue("Title", "Hello World") oInfo.storeIntoURL(ConvertToUrl(sFile)) Exit Sub ErrorHandler: MsgBox Error() & Chr(13) & Erl() & Chr(13) & Err() End Sub
Comment 1 Oliver Brinzing 2006-01-06 08:52:00 UTC
Created attachment 32950 [details] 3 test files zipped (*.sdw, *.sxw, *.odt)
Comment 2 stephan.wunderlich 2006-01-06 10:58:04 UTC
sw->as: the problem with the sdw-files is most likely issue 36993 ... but the fact that we can't store document info in the other files looks like a new issue to me.
Comment 3 stephan.wunderlich 2006-01-06 15:28:46 UTC
Comment 4 Oliver Brinzing 2006-06-08 17:44:46 UTC
Hi, just noticed, that instantiating the service "com.sun.star.document.XStandaloneDocumentInfo" via OO 2.0.3 RC 5 causes a crash :-( SO 8.0 PU 3 is also affected ... so please change target milestone/priority ... Oliver
Comment 5 andreas.schluens 2006-06-20 12:31:50 UTC
AS->brinzing: The last described problem is not realy a problem the StandaloneDocumentInfo service. It's a problem of the introspection of basic. Because basic tries to call the new created service before it was realy initialized ... because this service must be called within its method loadFromURL() first. Calling any other method before will throw an exception or produce a crash. Reason: without a related document this service cant work. see #i59538# for further informations.
Comment 6 andreas.schluens 2006-06-20 12:37:15 UTC
Comment 7 andreas.schluens 2007-01-02 10:16:50 UTC
Comment 8 zhangxiaofei.ooo 2007-10-25 07:06:28 UTC
Created attachment 49137 [details] The unit test for StandaloneDocumentInfo
Comment 9 mikhail.voytenko 2007-10-25 11:58:19 UTC
The tests show that the scenario works well now for all the mentioned types of the documents. So the original problem was solved by the reimplementation of the service that was done some time ago. Since the problem is not reproducible, I am changing the title and use the bug to integrate the provided unit test in one of the next framework cws.
Comment 10 mikhail.voytenko 2007-10-25 11:59:33 UTC
The unit test will be integrated for OOo2.4.
Comment 11 mikhail.voytenko 2007-12-04 11:17:38 UTC
The patch has been integrated into fwk79 cws.
Comment 12 mikhail.voytenko 2007-12-04 12:53:27 UTC
The test is integrated into fwk79.
Comment 13 mikhail.voytenko 2007-12-14 14:01:44 UTC
Development issue, verified by myself.
Comment 14 mikhail.voytenko 2008-02-28 09:30:48 UTC