To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=98455 Issue #|98455 Summary|setLinkMode = NONE does not work. Component|Spreadsheet Version|OOo 2.4.1 Platform|Unknown URL|http://wiki.services.openoffice.org/wiki/Documentation |/DevGuide/Spreadsheets/Sheet_Links OS/Version|All Status|UNCONFIRMED Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|code Assigned to|spreadsheet Reported by|knobo
------- Additional comments from [email protected] Sun Jan 25 14:36:57 +0000 2009 ------- According to the manual LinkMode = com.sun.star.sheet.SheetLinkMode.NONE should disable the link. But, if I link a document, then set link mode to NONE, and save the document, the linked file is updated. The problem is noticeable when the import of the file starts at 2nd line, as the old file is then overwritten, and some information is gone. To reproduce the bug: 1. Run the main sub ruteine one time. 2. Save the document. 3. Inspect foobar.csv, and see that the header in the csv file is gone. According to the documentation, the link should be removed. This is the code I used. sub Main dim document as object document = ThisComponent insertFile(document, "insert", "/home/knobo/foobar.csv") end sub Sub insertFile(oDoc as object, Sheet as string, filename as string) oPlan = oDoc.getSheets().getByName( Sheet ) sURL = ConvertToURL ( filename ) sOrigem = "" sFiltro = "Text - txt - csv (StarCalc)" ' Use ; as seperator ' No string quotation ' Start at 2nd line. ' default format for every column sOpc = "59,,0,2,1/1/1/1" nModo = com.sun.star.sheet.SheetLinkMode.NORMAL oPlan.link( sURL, sOrigem, sFiltro, sOpc, nModo ) oPlan.setLinkMode( com.sun.star.sheet.SheetLinkMode.NONE ) End sub ------------ foobar.csv ------------ Head1;head2;head3 1;2;3 4;5;6 7;8;9 --------------------------------------------------------------------- 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]
