Re: [api-dev] registering script events
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, > However, I am not sure how to test equality of UNO objects in Basic, I'd > suppose that "=" might not really work here. Perhaps there's a dedicated > function for this. EqualUnoObjects( oObj1, oObj2 ) should work ... Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFDurKKTiyrQM/QSkURApodAJwORJc4HFLlOTo7kFVDSA1wU8C3uQCeMzvk T6l5GK8O4RK21d1ESFD4TQU= =OI4C -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Error running IDLC
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi > Idlc.exe - Unable to locate component "This application has failed to start > because reg3.dll was not found. Re-installing the application may fix the > problem." this looks like a environment path problem ... anyway, i send you a ready to run eclipse java project (containing a simple component) with an ant script (build.xml) ... HTH Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD4DBQFDv4zjTiyrQM/QSkURAi6IAJ4pDsh0rg7bB+oKvVGGLCw4nqJQ7wCYqS5z EX+49jipe9kAmdfRFlLVKg== =u3Zt -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] RE: simple java component
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Gautham, > I am trying to write a component that will be invoked > automatically when OOo initializes, and hence I expected some way to invoke > yours from the OOo writer, after loading. you should have a look at the job execution environment ... it's possible to start job's while oo is starting ... you're component can install an GlobalEventBroadcaster an listen for global/document events: try { XMultiComponentFactory xMultiComponentFactory = xComponentContext .getServiceManager(); Object objBroadCast = xMultiComponentFactory .createInstanceWithContext( "com.sun.star.frame.GlobalEventBroadcaster", xComponentContext); xEvtBroadcast = (XEventBroadcaster) UnoRuntime.queryInterface( XEventBroadcaster.class, objBroadCast); xEvtBroadcast.addEventListener(MyListener); } catch (Exception e) { e.printStackTrace(); } If you want to have access to your component via ui (toolsbar/menu), you can install a ProtocolHandler (i will send you an example project ...) > Please advice if such a thing is possible. At the moment I am reading > through the dev guide about debugging in a hope that I can see your > component working w/o having to write a remote client. I am able to remote debug oo components using the eclipse debugger... to do so, add the following statments to the jre oo uses ... (Tools -> Options ... -> OpenOffice.org -> Java) jre 1.4.2: -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n jre 1.5.0: agentlib:jdwp=transport=dt_socket,server=y,address=localhost:8000,suspend=n if you want to start a component remote, start oo using: soffice.exe -accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager you can verifiy the connection with: netstat -a regards Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFDv79hTiyrQM/QSkURAj/5AJ9I+qhYZosMWrsxc+iUYhjDbwnUCwCfTpk1 F50Ka2x3uhmmah9yCsPTiks= =hHk+ -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] loadComponentFromURL Worked in 1.1.x and Not in 2.x.x
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, >> >> Both URLs are wrong, local file URLs start with three slashes. OOo1 >> >> accepted the wrong ULRs but this was a bug that prevented other things >> >> to work correctly and so it needed to be fixed. I had a look at my java code, and noticed, that file.toURL().toExternalForm(); returns a "file:/E:/"... url, so i think for oo i should be converted to the new format, for example: try { com.sun.star.util.URL[] url = new com.sun.star.util.URL[1]; url[0] = new com.sun.star.util.URL(); // java net url ... (e.g. from file.toURL().toExternalForm();) url[0].Complete = "file:/E:/Data/home/file.sxw"; System.out.println("before: " + url[0].Complete); Object obj = xComponentContext.getServiceManager() .createInstanceWithContext( "com.sun.star.util.URLTransformer", xComponentContext); XURLTransformer transform = (XURLTransformer) UnoRuntime .queryInterface(XURLTransformer.class, obj); transform.parseStrict(url); System.out.println("after: " + url[0].Complete); } catch (Exception e1) { e1.printStackTrace(); } is this correct ? regards Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFDwqxeTiyrQM/QSkURAnWmAJ0WpEPzwMBqQFzjYeZjl/clIRnOPgCfQ2eh 8kddp/VpcjFfDCiKUTuz3WQ= =FiL0 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] using mozilla sunbird with oo ?...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I have a question about using the mozilla sunbird calendar from oo: I want to develop an oo java component, which creates vcalendar entries for the mozilla sunbird calendar, for example, after printing a writer document, the user should have an option to set a reminder ("please remind me in two weeks to look for an answer...") Currently it seems to be possible to create an own vcal file (calendar) an open it with sunbird. But is there any know api which will make it easier to access the calendar to add/remove entries... I know, that there is a couple of interfaces css.mozilla but don't know how to use it ... any hints ? Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFD1RfuTiyrQM/QSkURAlK8AKCLlCobKk/DjwmilpPZlfeGieeIhwCbBXbn u4DBJ10yQSgC4G05mkZuPsU= =i0s8 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] how to access the autofilter feature ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I tried to enable the autofilter feature for a named range using oo api ... First I recorded the following macro: - --8< Sub DataFilter() Dim oDoc as Object Dim dispatcher as Object Dim args1(0) as new com.sun.star.beans.PropertyValue oDoc = ThisComponent.CurrentController.Frame dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") ' select and mark data via named range ... args1(0).Name = "ToPoint" args1(0).Value = "X_FILTERAREA" dispatcher.executeDispatch(oDoc, ".uno:GoToCell", "", 0, args1()) ' enable/disable autofilter ... dispatcher.executeDispatch(oDoc, ".uno:DataFilterAutoFilter", "", 0, Array()) End Sub - -->8 It works, but it is not what i really wanted Second i created the following code snippet, using a temporary database range ... - --8< OPTION EXPLICIT Sub EnableAutoFilter() Call ApplyAutoFilter(ThisComponent, "X_FILTERAREA", True) End Sub Sub DisableAutoFilter() Call ApplyAutoFilter(ThisComponent, "X_FILTERAREA", False) End Sub Sub ApplyAutoFilter(oDocument as Object, ByVal sNamedRange as String, ByVal bEnabled as Boolean) Dim oRangeAddress as Object Dim sDatabaseRange as String sDatabaseRange = "TmpFilterArea" If oDocument.DatabaseRanges.hasByName(sDatabaseRange) Then If bEnabled = False Then oDocument.DatabaseRanges.getByName(sDatabaseRange).AutoFilter = False EndIf oDocument.DatabaseRanges.removeByName(sDatabaseRange) EndIf If bEnabled = True and oDocument.NamedRanges.hasByName(sNamedRange) Then oRangeAddress = oDocument.NamedRanges.getByName(sNamedRange).getReferredCells().getRangeAddress() oDocument.DatabaseRanges.addNewByName(sDatabaseRange, oRangeAddress) oDocument.DatabaseRanges.getByName(sDatabaseRange).AutoFilter = True EndIf End Sub - -->8 But is there no easier way to enable/disable an autofilter for a range ? And is it possible to find out, if an autofilter is enabled ? Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFD+gd4TiyrQM/QSkURAvO6AKDGOZI46q6hogH6Gt5SybSiMr+QCACgmo3J 7IbxcS0aqsai8uWuhTEDTnc= =nGH9 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How to close the quickstarter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, why not use openoffice2.0\program\quickstart - killtray to close the quickstart service ? Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFECE0STiyrQM/QSkURAiL9AJ0UjBPfqd2kiy48CCHx16MGx0wVxACgqCA7 Hs3RgVVWDIBfoHWf0HANPEc= =Qjbw -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Visible cells in OpenOffice Calc
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Rick, > I am trying to obtain all the spreadsheet cells which the user can see on the > screen. try: REM * BASIC * OPTION EXPLICIT Sub Main Dim oDocument as Object Dim oController as Object Dim oRange as Object Dim oRangeAddress as New com.sun.star.table.CellRangeAddress oDocument = ThisComponent If hasUnoInterfaces(oDocument, "com.sun.star.sheet.XSpreadsheetDocument") Then oController = oDocument.getCurrentController() oRangeAddress = oController.getVisibleRange() oRange = oController.getActiveSheet().getCellRangeByPosition(oRangeAddress.StartColumn,_ oRangeAddress.StartRow,_ oRangeAddress.EndColumn,_ oRangeAddress.EndRow) oController.select(oRange) EndIf End Sub regards Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFELn0bTiyrQM/QSkURAmTHAJ9TihM8lMcDwpHybCF5gD48RLTvlACbBwuC fv4P0tgJcGsZdREvlxISU8E= =+Y0l -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] [code snippet] ReadIniFile
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, i created my first snippet using the new snippetcreator ... Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEL9IUTiyrQM/QSkURAt/zAKCrGm+DVUYye8LWoVLpO54MEGWlIQCdFeOy eBD3+42PEihqwy3l0x+VT+k= =M72d -END PGP SIGNATURE- ini file fileaccess read How to read an ini file using oo basic ? the macro will read an ini file into a multidimensional array ... to acces the entries within the sections use: [DATA] mIni(0,0,0) -> [DATA] X=1 mIni(0,0,1) -> X / mIni(0,0,2) -> 1 Y=2 mIni(0,1,1) -> Y / mIni(0,1,2) -> 2 [HELP] mIni(1,0,0) -> [HELP] INFO=YES mIni(1,0,1) -> INFO / mIni(1,0,2) -> YES OPTION EXPLICIT Sub Main() Dim mIni() as String Dim sMsg as String Dim i as Integer Dim j as Integer mIni() = ReadIniFile("E:\temp\test.ini", "", 20, 50) For i = 0 To uBound(mIni()) sMsg = sMsg & mIni(i,0,0) & Chr(13) For j = 0 To 50 If mIni(i,j,1) <> "" Then sMsg = sMsg & mIni(i,j,1) & " = " & mIni(i,j,2) & Chr(13) EndIf Next j MsgBox sMsg sMsg = "" Next i End Sub Function ReadIniFile(ByVal sFile as String, ByVal sEncoding as String,_ ByVal nMaxSection as Integer, ByVal nMaxEntry as Integer) as Variant On Local Error Goto ErrorHandler Dim oFileAccess as Variant Dim oFile as Variant Dim oStream as Variant Dim mTmp() as String Dim sTmp as String Dim i as Long Dim j as Long Dim bFlag as Boolean Dim mArray(nMaxSection, nMaxEntry, 2) as String If sEncoding = "" Then sEncoding = "ISO-8859-1" EndIf oFileAccess = createUnoService("[EMAIL PROTECTED] com.sun.star.ucb.SimpleFileAccess}") If oFileAccess.exists(sFile) and Not oFileAccess.IsFolder(sFile) Then oFile = oFileAccess.openFileRead(sFile) oStream = createUnoService("[EMAIL PROTECTED] com.sun.star.io.TextInputStream}") oStream.setInputStream(oFile) oStream.setEncoding(sEncoding) i = 0 j = 0 mArray(0, 0, 0) = "[]" bFlag = True While Not oStream.isEOF sTmp = oStream.readLine() If sTmp <> "" and Left(sTmp, 1) <> ";" Then ' ignore comments ... If Left(sTmp, 1) = "[" Then If bFlag = True Then bFlag = False Else j = j + 1 i = 0 EndIf mArray(j, i, 0) = Trim(sTmp) Else mTmp() = Split(sTmp, "=", 2) If uBound(mTmp()) = 1 Then mArray(j, i, 1) = Trim(mTmp(0)) mArray(j, i, 2) = mTmp(1) Else mArray(j, i, 1) = Trim(sTmp) EndIf i = i + 1 EndIf EndIf Wend oStream.closeInput() oFile.closeInput() EndIf Redim Preserve mArray(j, nMaxEntry, 2) as String ReadIniFile = mArray() Exit Function ErrorHandler: mArray(0, 0, 0) = "-1" ReadIniFile = mArray() MsgBox Err() & Chr(13) & Error() & Chr(13) & Erl() End Function - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Insert Creation Date of Document
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Jo, > I'm trying to obtain the creation date of the currently open document. > (an exception will probably be needed if the document has not been saved yet). try ... OPTION EXPLICIT Sub Main Dim oDocument as Object Dim oInfo as Object Dim oDate as Object Dim nDate as Long Dim vTime as Variant oDocument = ThisComponent oInfo = oDocument.DocumentInfo ' get ... oDate = oInfo.CreationDate MsgBox oDate.Day & "." & oDate.Month & "." & oDate.Year & " " & oDate.Hours & ":" & oDate.Minutes ' set ... nDate = DateValue(Date) oDate.Day = Day(nDate) oDate.Month = Month(nDate) oDate.Year = Year(nDate) vTime = TimeValue(Time) oDate.Hours = Hour(vTime) oDate.Minutes = Minute(vTime) oDate.Seconds = Second(vTime) oInfo.CreationDate = oDate MsgBox oDate.Day & "." & oDate.Month & "." & oDate.Year & " " & oDate.Hours & ":" & oDate.Minutes End Sub Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.3 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD4DBQFEb1WKTiyrQM/QSkURApN7AKC8QKgtKHG2MwHsrZUJhKxmrKy85ACUDmt2 wo6P00ZQjQd3/qNcqb+Hig== =0zNX -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Put view cursor in a table cell (writer)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, try ... OPTION EXPLICIT Sub Main Dim oDocument as Object Dim oTable as object Dim oCell as object Dim oViewCursor as object oDocument = ThisComponent oTable = oDocument.TextTables.getByName("MyTable") oCell = oTable.getCellByName("A1") oViewCursor = oDocument.getCurrentController().ViewCursor oViewCursor.gotoRange(oCell.createTextCursor(), False) oDocument.getCurrentController().getFrame().getContainerWindow().Setfocus End Sub Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.3 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEcFDOTiyrQM/QSkURAgybAKCaCsN1nfC8dDWuJssGHLSnrXyy/wCfaKij qMGgZeNz6TTd7t+S2Eg4c4M= =rT2l -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] OO 2.0.3RC5: XStandaloneDocumentInfo causes crash
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I noticed, that instantiating the service "com.sun.star.document.XStandaloneDocumentInfo" via Basic causes a crash :-( SO 8.0 PU 3 is also affected ... please have a look at issue http://www.openoffice.org/issues/show_bug.cgi?id=60116 can somebody confirm this ? 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 - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.3 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEllUmTiyrQM/QSkURAnLvAJ4lngFtV9qwEG30UDiqEnqTO2HulACdHJLZ AZc5dJDECP87Q65Q0gS7XGw= =ZTJD -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Current Sheet
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Johnny, try ThisComponent.getCurrentController().getActiveSheet() Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.3 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEmteTTiyrQM/QSkURAvO7AJ9RYyCjF9QTs+dxjt4FPGwx8uhdSwCfUpwm hL7v0fKhNnvXI3ZTVFn1EtU= =JS+4 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] regcomp fails: "CannotRegisterImplementationException"
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Eric, maybe it is an environment path problem ? i remember, i had to change my ant scripts for use with oo 2.0 like this affects idlc, regmerge, javamaker ... Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.3 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEzv11TiyrQM/QSkURAoG3AJ4oZx8gzyPRzb8Y8+XAEltD6EE08gCfZdPL Nejqwn8blJDQG+kehgf3hwM= =OEIq -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] how to dispatch ".uno:ClosePreview" from java ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, at the moment I am trying to convert some of my basic macros into a java component :-) but get stuck with the following problem: dispatching ".uno:ClosePreview" from java seems not to work in all cases, if I open a message box directly after the "xDispatch.executeDispatch" the message box will be displayed in the preview mode ... after closing the message box, we are still in the preview mode ... the dispatch got lost ??? I think this i caused due to the async behaviour of the dispatching framwork ... I also tried xNotifyingDispatcher.dispatchWithNotification() without success ... :-( In Basic I used the following: Function ClosePreview() Dim oView as Object Dim oDispatcher as Object Dim mNoArgs() Dim i as Integer oView = ThisComponent.getCurrentController() If Not hasUnoInterfaces(oView, "com.sun.star.sheet.XSpreadsheetView") Then oDispatcher = createUnoService("com.sun.star.frame.DispatchHelper") oDispatcher.executeDispatch(ThisComponent.getCurrentController().Frame, ".uno:ClosePreview", "", 0, mNoArgs()) While Not hasUnoInterfaces(oView, "com.sun.star.sheet.XSpreadsheetView") and i < 10 Wait(0) oView = ThisComponent.getCurrentController() i = i + 1 Wend EndIf MsgBox "Hello World..." & CStr(i) End Function Any hints ? Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE1haCTiyrQM/QSkURArqIAJ9jFRKTyvkmU/u0/oeqGcu481KXvgCff5CJ L3IkL+IJav7TP1H5UhXoi/0= =hPV6 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] how to dispatch ".uno:ClosePreview" from java ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Andreas, Am 07.08.2006 08:41 schrieb Andreas Schlüns: > If you wish to force a synchronous execution of your dispatch you should > try the argument "Asynchron" as [bool] with a valud "false". are you sure, this works ? I can see no difference ... the preview is not closed even if I use xProps[0] = new PropertyValue(); xProps[0].Name = "Asynchron"; xProps[0].Value = Boolean.FALSE; Object oDispatch = xDispatch.executeDispatch(xProvider, ".uno:ClosePreview"l, "", 0, xProps); Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE13C+TiyrQM/QSkURAvx/AKCEoZChxyQqIRHG/uLM2Ysq0JUILQCgxX6J NiTJarJ+ikr96ToxHO5zqmk= =+nMh -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] how to dispatch ".uno:ClosePreview" from java ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Andreas, thanks for the detailed explanation ... I always try to avoid using dispatches ... > Next possible solutions: > a) close these preview using another API but I can not find an api for closing the calc preview ... Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE2hOATiyrQM/QSkURAm0bAKCYwz9ErcRiQYW1yCUMFHhYUxFslQCfZu2H 05ziXich0cBX9vq4lEYhNI4= =hc0q -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] how to dispatch ".uno:ClosePreview" from java ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Mathias, > The name of the property is "SynchronMode" and of course its value must > be set to "True" in case you want to have synchronous execution. I tried it, without success, it seems, it's not possible to close the preview from java ... regards Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE6VEjTiyrQM/QSkURAje2AKCd35SfCnSCL08eLm0C2EG9ig1/5QCgkdp+ NovSq7qZNyf5XIy225PjavM= =7Bbi -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] how to dispatch ".uno:ClosePreview" from java ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Mathias, > What means "without success"? What exactly did you do and what exactly > happened? that means, the preview is not closed, if i open a message box directly after the excecuteDispatch(), it does not matter if i use the SynchronMode or not ... the message box is shown in preview mode, after closing it, preview mode is still active ... without showMessageBox() the preview is closed ... here is a snippet of my code: PropertyValue[] xProps = new PropertyValue[1]; xProps[0] = new PropertyValue(); xProps[0].Name = "SynchronMode"; xProps[0].Value = Boolean.TRUE; executeDispatch(getModel().getCurrentController().getFrame(), ".uno:ClosePreview", xProps); showMessageBox(); public Object executeDispatch(XFrame xFrame, String sUrl, PropertyValue xProp[]) { Object dispatchHelper = null; try { dispatchHelper = xComponentContext.getServiceManager() .createInstanceWithContext("com.sun.star.frame.DispatchHelper", xComponentContext); } catch (Exception e) { return null; } XDispatchHelper xDispatch = (XDispatchHelper) UnoRuntime .queryInterface(XDispatchHelper.class, dispatchHelper); XDispatchProvider xProvider = (XDispatchProvider) UnoRuntime .queryInterface(XDispatchProvider.class, xFrame); Object oDispatch = xDispatch.executeDispatch(xProvider, sUrl, "", 0, xProp); return oDispatch; } public void showMessageBox() { XWindow xParent = null; XFrame xFrame = xController.getFrame(); XToolkit xToolkit = null; if (xFrame != null) xParent = xFrame.getContainerWindow(); try { xToolkit = (XToolkit) UnoRuntime.queryInterface(XToolkit.class, xComponentContext.getServiceManager() .createInstanceWithContext( "com.sun.star.awt.Toolkit", xComponentContext)); } catch (Exception e) { e.printStackTrace(); } Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE7atbTiyrQM/QSkURAp3RAJ0azSb+i4rboSD9ymm58sSGwA5l/ACePnYJ aoXXQSB/o85j7PPL9UQKTd8= =J1QP -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Unable to connect JDPA debugger
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, > The switch I am using is for 1.5 is what Oliver (on this list) suggested: > agentlib:jdwp=transport=dt_socket,server=y,address=localhost:8000,suspend=n what about the leading "-" ? - -agentlib:jdwp=transport=dt_socket,server=y,address=localhost:8000,suspend=n Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE8pNfTiyrQM/QSkURAt5GAKC20qC2FclyeEhvoUgi9yzr2Jy25wCcCe4r UvnYUIi5a+zLc2MmdMfxCBE= =pZMN -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] export/save embedded images
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Jimmy, > I did find an old OOMacro, which didn't actually work for me and I > didn't know how to convert to Java as well: > http://codesnippets.services.openoffice.org/Writer/Writer.ExtractGfx.snip the macro will work if you change the following lines: from: Dim oZipArchive as New com.sun.star.packages.Package to: Dim oZipArchive as Object from: Dim oFileAccess as New com.sun.star.ucb.SimpleFileAccess to: Dim oFileAccess as Object HTH Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE8/1nTiyrQM/QSkURAnZaAJ4nhBI0WmCabd2f9nRIMQzAy1dXGACfVEl3 18+QzWG2L/YelC5q4QgO5MA= =TV6C -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] settings.xml: "PrinterIndependentLayout"
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, i had a look into the settings.xml of a oo 2.0.4 writer document and found: high-resolution Is this correct ? I think the value should be "enabled" (like it is in oo 1.1.5) If I mark the checkbox in Tools -> Options... , the value changes to "disabled" Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFH71+TiyrQM/QSkURApDeAKCFspeqiXQP+/OmTmcU0RTMynQTJgCcCUO9 nZLOH6CwdQKFXgvGnXckkXk= =Qt+3 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] settings.xml: "PrinterIndependentLayout"
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ok, had a look into the online doc, "enabled" seems to be deprecated :-) > config:type="string"> > high-resolution > - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFH769TiyrQM/QSkURAnLqAJ9x2HHOhmwUAgUmPoUsLMm8fG1d9gCcDupQ 3q7KTrOqWzuqujr+C7lk+gI= =uWa7 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] how to copy textsection from a writer document to another ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, is there a possibility to copy a textsection from a source document to a destination document using the api ? At the moment i am using copy & paste but this has the disadvantage of loosing the paragraph format ... any hints ? Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFS3x8TiyrQM/QSkURAknJAJwMrfe6qesdVxwkD7KrqMQIoajHFQCggauk Ulwo9TZc+qazSRCWmBOSHDo= =iwGf -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] how to copy textsection from a writer document to another ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Stephan, thanks for the code snippet, i can use it as a workaround: - - first copy & paste the section - - second copy the properties of the paragraph styles but what i am really looking for is to store a textsection as url, or serialize it ... any hints ? Oliver GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFUMT0TiyrQM/QSkURAnNvAJ0d1GD2xhcXq5xkkCNdA8ufR033xACglEnT uznSsTwDCxbkQDOAhgeNjmE= =LLZl -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] how to copy textsection from a writer document to another ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Stephan, > why do you need the first step ? The code snippet copies the content of the > textsection already. what we do is to copy the user input text section from a document to a draft/copy template for printing purpose only ... the drafts/copyies have different page styles ... so we are looking for a clean solution - for example open the drafts/copyies in hidden mode an use the api for the copy process instead of dispatching it ... > Nicer would be if a text section would implement the > com.sun.star.util.XCloneable interface > so that you could create a clone and insert this as text content in a new > document ... but that it > doesn't as far as I know. Somethings I haven't considered yet is to use the > ContentExporter and > the parse the xml-stream ... not sure if that is any easier than travelling > through the structure of > the text section and rebuild it that way in a second document which you then > save. what about an rfe ? thanks Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFUf0ATiyrQM/QSkURAjrWAJ991O6VxYn6yoQ7Za9RuS37IDDN4ACeN3mk jjlDbMhjtG3WCSIs+WlJ9C8= =iBoN -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] how to copy textsection from a writer document to another ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Marc, > As a dirty trick you can temporarily define the source snippet as > "autotext" for inserting it into the target and delete the autotext > immediately afterwards. This does work. really nice trick, just tried it sucessfully ... :-) but still have the feeling, someone should request a rfe for the XCloneable interface ... :-) thanks Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFUf2HTiyrQM/QSkURAr7TAJ9sEsrheNmbpdMwmieSKsDH8s1ccACguCk1 B0iB8Q3hOHLAmA7wwDFg8Nk= =Hfqm -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] how to copy textsection from a writer document to another ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Peter, > how do you handle the problem, when the user works with headlines and > has made changes in the outline numbering? Then the draft will have another > layout. i will try to copy the properties from oSrcDoc.getChapterNumberingRules(), but don't know if this will work at this time :-) P.S. I found another posibility to copy the paragraph props: oSrcDoc.storeToURL(sTmpURL, mArgs()) oDstDoc.StyleFamilies.loadStylesFromURL(sTmpURL, mArgs()) Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFU2MOTiyrQM/QSkURAmo3AJ9aCjKDZhi0SCTIi/rLSfznzw5+1gCbB98r fJYxWgtyEQzJisFV8zX07DM= =Imqf -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] how to copy textsection from a writer document to another ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Peter, this will copy the outline numbering ... :-) Dim i as Integer Dim oSrcRules as Variant Dim oDstRules as Variant Dim oProps() as Variant oSrcRules = oSrcDoc.getChapterNumberingRules() oDstRules = oDstDoc.getChapterNumberingRules() For i = 0 To oSrcRules.getCount()-1 oProps() = oSrcRules.getByIndex(i) oDstRules.replaceByIndex(i, oProps()) Next i HTH Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFVLcUTiyrQM/QSkURAoRGAJwP/qhZZE+b4pcdfq8AycYu+2SEawCdEy3z UkVu/NP3H46ScG3KKTqhaHw= =Y3v9 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] how to copy textframes ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, i try to copy textframes (including content) from a source doc to a destination doc ... is this possible via api ? Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFVLhhTiyrQM/QSkURAvU0AJ9VpfKbFbTHUu60Wy8SxSyc2JnZZACbBK/s iIVV2fiOj4ehlfX71uGduw8= =5/Hi -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] printing current sheet
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Marc, > You can't, OO.o does not allow to do so. This should be worth an RFE (if > not already written). would be nice if someone will vote for my rfe ... :-) http://qa.openoffice.org/issues/show_bug.cgi?id=10658 Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD4DBQFFWf5qTiyrQM/QSkURApXRAJiIbmZTQKcW93ZYnIlLgON25qLUAJ4yGzJl +k0v9bNSJy0RN6c8XRBNXw== =0862 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How to copy all Content of a document
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Tobias, > But at the moment I don't find a solution how to select all content of a > document. Which interface stores all the content? AFAIK you can use something like this: oSrcDoc.CurrentController.Select(oSrcSection.Anchor) oDispatcher.executeDispatch(oSrcDispFrame, ".uno:Copy", "", 0, arr()) oDstDoc.CurrentController.Select(oDstSection.Anchor) oDispatcher.executeDispatch(oDstDispFrame, ".uno:Paste", "", 0, arr()) This will copy a Textsection into a Dst document ... Or you create a tmp autotext: oCursor = oSrcDoc.getText().createTextCursorByRange(oSrcSection.getAnchor().getStart()) oCursor.gotoRange(oSrcSection.getAnchor().getEnd(), True) oATContainer = CreateUnoService("com.sun.star.text.AutoTextContainer") ' use last path for autotext containers, this should be the user directory :-) oATContainer.insertNewByName("TMP" & "*" & CStr(oATContainer.getCount()-1)) oATGroup = oATContainer.getByName("TMP") oATGroup.insertNewByName("TMP", "TMP", oCursor) oCursor = oDstDoc.getText().createTextCursorByRange(oDstSection.getAnchor().getStart()) oATGroup.getByName("TMP").applyTo(oCursor) HTH Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFZvp1TiyrQM/QSkURAkFEAJ4xVacWCwVFvy9WBTADhkwYP0sN6wCdHRGr kd4TUjIYEwbJ3htJyhq5vHs= =+mOO -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] How to redraw form controls in a writer document ...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, is it possible to force a redraw of form controls (checkbox, optionbuttons) in a writer document ? I have the problem, that some checkboxes have the model state "enabled=false" but are shown enabled ... After switching to print preview an back, the checkboxes are disabled ... but this is not a solution ... BTW: this happens with SO 7.0 PU 7 ... Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFeslkTiyrQM/QSkURAto8AKCyH5RdXQiwea0ZFMspDF83yC4gFgCggKed RZ6CfVtj8wFNe6aYcA+i5NY= =eVYy -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How to redraw form controls in a writer document ...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Frank, > That's the control model, you need the control. Something like > oControl = ThisComponent.CurrentController.getControl( oModel ) aaahh, i forgot :-) oModel = ThisComponent.DrawPage.Forms.getByName("Standard").getByName("chk1") oControl = ThisComponent.getCurrentController.getControl(oModel) oControl.getPeer().invalidate(1) should do the job ... BTW: This does not work for SO 7.0 ... :-( Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFfZACTiyrQM/QSkURApf1AJ9dEJR3oYcmXvJCiwrhbFEuXDbqzgCgxJ7r y8+WfsZal5Nb/qOGiBbmOGs= =ryE8 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How to redraw form controls in a writer document ...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, > How exactly does "does not work" look like? Does it blow up your > machine, or simply give an error in some line? If the latter, in which? i tried with oControl.getPeer().invalidate(1) different flags, but the control is not updated to the correct model state ... only changing to printpreview (and back) updates the control to the correct model state ... BTW: this only happens, if i load the document through an external program, which opens a dialog directly after the loading process ... maybe it blocks the correct update process ... i will have a look ... Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFfuz1TiyrQM/QSkURAr+TAJ46QQXIs8i03W6/UFd+QQePCow+VACfXxpB oxNTAm0y8vJtCbwAnSgkrwU= =pKEq -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How to redraw form controls in a writer document ...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Frank, > MsgBox oControl.getPeer().getProperty( "Enabled" ) it's False (before and after the invalidate) > Alternatively, try (yes, it'd be a hack) > oControl.getPeer().setProperty( "Enabled", FALSE ) > oControl.getPeer().setProperty( "Enabled", TRUE ) same as above ... i will have a look after the code which is loading the document, cause this does not happen if i load the document via file -> open and start the dialog manually ... Thanks Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFgDneTiyrQM/QSkURAvl9AJ0dPTY0OC62qzVqkmroiC2XLAxXDQCcC68a 8WLQYSOq0WzhCpYo2T2LeIs= =Wc/b -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] delete file using oo file open dialog - no restore possible
Hi, one of our users complains, deleting a file using the oo file open dialog (context menu/ delete button) will delete the file immediatelly ... There seems no possibility to restore the file, e.g. windows trash can ... I remember, in SO 5.2 we had a OO trash can in user/store/trash ... Is there a way to activate the old behaviour ? Oliver -- "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] How to disable MenuItems temporary ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Is there are chance to enable/disable MenuItems temporary? (I know how to add/remove MenuItems ... but how to enable/disable ?) Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGhVCvTiyrQM/QSkURAstHAJ9LQ9dnSk4mRwY2pE+jGlJ2NMI+owCfWRXE D9+BaUSr2pIuLzo3ItZNWTY= =WjrY -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How to disable MenuItems temporary ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Carsten, > You can find more information about dispatch interception in the > Developer's Guide. I already had a look at the provided java example "DisableCommandsTest" but found 2 problems: - - disabling a command is persistent, after closing & restarting the office the command is still disabled - - I tried to enable the above mentioned disabled command after restarting, the attempt results in an office crash ... Maybe it's better to install a "dispatch interceptor" ... Thanks Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGiS8bTiyrQM/QSkURAiT6AJ9UGQxvjkc9bb2A3yiscRwBAz5UQgCeKEAc V5dfYBMB1n9ioKzbxUSf+Go= =afWI -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How to disable MenuItems temporary ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, i tried to implement a XDispatchProviderInterceptor class but my attemps always lead to an office crash :-( ... Can one provide an example, please ? I did: public class DispatchInterceptorDemo implements com.sun.star.frame.XDispatchProviderInterceptor { [...] com.sun.star.frame.XDispatchProvider xMaster = null; com.sun.star.frame.XDispatchProvider xSlave = null; Object desktop = xRemoteServiceManager.createInstanceWithContext( "com.sun.star.frame.Desktop", xRemoteContext); com.sun.star.frame.XDesktop xDesktop = (com.sun.star.frame.XDesktop) UnoRuntime .queryInterface(com.sun.star.frame.XDesktop.class, desktop); com.sun.star.frame.XFrame xFrame = xDesktop.getCurrentFrame(); com.sun.star.frame.XDispatchProviderInterception xDispatchInterceptor = null; xDispatchInterceptor = (com.sun.star.frame.XDispatchProviderInterception) UnoRuntime .queryInterface(com.sun.star.frame.XDispatchProviderInterception.class, xFrame); xDispatchInterceptor.registerDispatchProviderInterceptor(this); [...] public XDispatchProvider getMasterDispatchProvider() { return xMaster; } public XDispatchProvider getSlaveDispatchProvider() { return xSlave; } public void setMasterDispatchProvider(XDispatchProvider arg0) { System.out.println("-setMasterDispatchProvider()"); xMaster = arg0; } public void setSlaveDispatchProvider(XDispatchProvider arg0) { System.out.println("-setSlaveDispatchProvider()"); xSlave = arg0; } public XDispatch queryDispatch(URL arg0, String arg1, int arg2) { System.out.println("-queryDispatch: " + arg0.Complete + " " + arg1 + " " + arg2); if (xSlave != null) return xSlave.queryDispatch(arg0, arg1, arg2); return null; } public XDispatch[] queryDispatches(DispatchDescriptor[] arg0) { return null; } I connected to an OO Calc document and could see on my debugging console - -register dispatchinterceptor - -setMasterDispatchProvider() - -setSlaveDispatchProvider() - -queryDispatch: .uno:StatusDocPos 0 - -queryDispatch: .uno:StatusPageStyle 0 - -queryDispatch: .uno:Zoom 0 - -queryDispatch: .uno:InsertMode 0 - -queryDispatch: .uno:StatusSelectionMode 0 - -queryDispatch: .uno:ModifiedStatus 0 - -queryDispatch: .uno:Signature 0 - -queryDispatch: .uno:Position 0 - -queryDispatch: .uno:Size 0 - -queryDispatch: .uno:StateTableCell 0 - -queryDispatch: .uno:StatusBarFunc 0 now all toolbars are disabled, if i try to open the menu oo crashes with an "abnormal program termination" (soffice.bin) any hints ? Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGkQb9TiyrQM/QSkURAqDxAJ9fw0LUkNOvgQ9hY4dHJpD0YjseNgCgl5o5 jtX5nCai9xIx7Hxv63YRXHM= =k0j2 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How to disable MenuItems temporary ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Carsten, > Could you provide us a stack trace of your crash. i found the bug, i used the DisableCommandsTest as a template, and did not recognize,that the "finally" terminates the program :-) try { [remoteconnection] } finally { System.exit(0) } Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGkmVdTiyrQM/QSkURAlwxAJ0WZEuu5HOk9MvFyphtVab0gXey2wCbBxf6 tk3DBqcDCFJkvy/3uZTNpWg= =ZQAQ -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] problem removing XDispatchProviderInterceptor ...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I have a problem unregistering my XDispatchProviderInterceptor: I a user selects a special named sheet, i register a XDispatchProviderInterceptor to disable some menu/toolbar commands temporary. This works fine. But if I unregister my XDispatchProviderInterceptor (for example user selects another sheet) all command stay disabled ... Is there a way to force an update ? Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGo2a4TiyrQM/QSkURAsITAKCqraxajZoJ9e7qQYptLjEfWyvoPwCgs0Aw HU/G0XSLE/wrmUd0NTiw6Vk= =hDpd -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] problem removing XDispatchProviderInterceptor ...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Carsten, done :-) > code to verify your problems. You can send it to me via private e-mail > ([EMAIL PROTECTED]). Oliver GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGqM/9TiyrQM/QSkURAgRjAJ0fp8oBhpglJSNm4r3Q/WDk1DEpXACbBI6C 7wOfsEeJKKBZn2eg/igELM4= =6M9D -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] problem removing XDispatchProviderInterceptor ...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, mh, i send it to [EMAIL PROTECTED] on 23.07 ... > I am sorry but I haven't received any e-mail from you. Could you please ok, i will send it again ... Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGqhkXTiyrQM/QSkURAuB9AJ4qLH+7uBnVRznftYMzjUfV7lCgUQCfa9mb 72zWUNFdbAFhD34855HjfmY= =+Ave -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] problem removing XDispatchProviderInterceptor ...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Carsten, > ok, i will send it again ... did you get the source code ? Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGrv4eTiyrQM/QSkURAsm3AKCEcAjof+OGDrk1f4PgE0qo369bSQCffB5S oYRmriBo1zKIKzu1VItesG8= =xlBM -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] problem removing XDispatchProviderInterceptor ...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Andreas, > One question ... is the demo you sent the real application or a demo only ? no, it's only a part of my addon, i use the remote connection sometimes for debugging purpose ... > g) terminating the JVM ! > And thats exactly your problem. Nobody hold the client process alive. > So you register some UNO listener inside the office, shutdown the JVM > and all these listener are dead. I just tried it with my addon again, and got the same result as before: register Interceptor setMasterDispatchProvider() setSlaveDispatchProvider() - -> all macro:/// cmd's are disabled now ... i change to a different sheet, where my cmd's should be enabled (XActivationEventListener) ... now i see: unregisterInterceptor getSlaveDispatchProvider() getMasterDispatchProvider() setSlaveDispatchProvider() setMasterDispatchProvider( but all macro:/// cmd's stay disabled... :-) at this time and after the addon is still running ... I try to send you a demo addon, but this will take some time ... using oo 2.2.1 with vista business ... thanks Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGr1e+TiyrQM/QSkURApQhAKCk/l1kBlzgY5dE9q9vPYKJ/xsycwCgiQXA qdbdzg5dQmz6GJhQaQkBxQI= =Ptej -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] problem removing XDispatchProviderInterceptor ...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, i just found http://www.mail-archive.com/dev@api.openoffice.org/msg03806.html, where my problem is discussed ... At least, i known now, that i have to implement XDispatch with add/removeStatusListener and call statusChanged() ... now my toolbar icon gets disabled/enabled but not the menu items, i think i have to implement the container (ListenerHelper) ... thanks for your help :-) Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGsFt+TiyrQM/QSkURApzFAJ4oKhi8ZxGqLg3BUGwMGwI4sfkgxgCdEyMm +/OpQ1wqcdHw7wJdSmSyAAc= =ZCHG -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Styling cells in a spreadsheet in Basic
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Alexandro REM * BASIC * OPTION EXPLICIT Sub Main Dim oDoc as Object Dim oCell as Object Dim oRange as Object Dim oStyles as Object oDoc = ThisComponent 'direct (hard) cell formating ... oCell = oDoc.getSheets().getByIndex(0).getCellByPosition(0,0) oCell.CellBackColor = 256 'direct range formating ... oRange = oDoc.getSheets().getByIndex(0).getCellRangeByPosition(2,2,4,4) oRange.CellBackColor = 128 ' soft format via a cell style oStyles = oDoc.StyleFamilies.getByName("CellStyles") ' change color of build in cell style "Result" oStyles.getByName("Result").CellBackColor = 192 ' apply to a range ... oRange = oDoc.getSheets().getByIndex(0).getCellRangeByPosition(2,6,4,8) oRange.CellStyle = "Result" End Sub Oliver Am 23.10.2007 17:50 schrieb Alexandro Colorado: > Hi I want to know how to style cells in a spreadsheet, things like > background color, border and width. > > I am not sure if this is the best list to ask OOoBasic questions but > there it goes. If there is a better list for this, please let me know. > - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHHh31TiyrQM/QSkURArOdAJ0bgbsdZGNh3MBpJwRowAVDQSkGKQCfXg8b vyhxJyPIP2TOUSP4nX3cyvA= =dYkK -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Preselecting an Item in an css.awt.XListBox / css.awt.UnoControlListBoxModel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Tobias, have you tried: XListBox listbox = (XListBox) UnoRuntime.queryInterface(XListBox.class, xControl); listbox.selectItem(sValue, true); Oliver Am 09.11.2007 15:14 schrieb Tobias Krais: > Hi Cor, > >>> How can I preselect an item? >> In basic, I simply do this by >> >> oControl = oDocDlg.GetControl("xxx") >> oControl.selectItemPos(i, True) >> >> Thus not on the model. > > I use Java, so I cannot apply your suggestion on the control. The method > selectItemPos(...) is not available on the control, but on the model. > Using it on the model has no effects if the dialog is not yet executed. > > But thanks for the hint. > > Greetings, Tobias > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHNHxoTiyrQM/QSkURArsnAKCS4msdql/265+e4gEXTgEYN/ZqOQCfX2/T NaJRa9HtaGQmuui3Yfq+ScA= =V2l4 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Preselecting an Item in an css.awt.XListBox / css.awt.UnoControlListBoxModel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Tobias, > it's the same. Doesn't preselect. i am using // XContainerWindowEventHandler public boolean callHandlerMethod(XWindow aWindow, Object aEventObject, String sMethod) { XControlContainer xContainer = (XControlContainer) UnoRuntime.queryInterface( XControlContainer.class, aWindow); XControl xControl = xContainer.getControl("MyListBox"); XListBox listbox = (XListBox) UnoRuntime.queryInterface(XListBox.class, xControl); /// AAA, BBB, CCC, DDD ... listbox.selectItem("CCC", true); to set a ListBox on an OptionsPage ... The handler is called if one opens the page ... so it seems, the dialog is executed before the handler is called ... Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHNJQnTiyrQM/QSkURAmMzAJ9NsU9nKHGLay8RhzU7JSh/qTzVJgCfUy3o nXDvtcCSuF68kQp1a1QiqGc= =TOGz -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Problems with insertDocument
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Thomas, > I do have two writer Documents (lets call them "MasterDoc" and "Doc2"). > In all documents my Standard charFont ist "Arial", the properties of OOo > even shows "Arial" as a standard font for all selections. mh, i remember i had similar problems when i tried to copy text sections from one doc to another ... have you tried to use "StyleFamilies.loadStylesFromURL" ? mProps(0).Name = "LoadTextStyles" 'paragraph and character styles ... mProps(0).Value = True mProps(2).Name = "LoadNumberingStyles" mProps(2).Value = True mProps(1).Name = "LoadPageStyles" ' default is true ... mProps(1).Value = False mProps(3).Name = "LoadCellStyles" mProps(3).Value = False mProps(4).Name = "LoadFrameStyles" mProps(4).Value = False mProps(5).Name = "OverwriteStyles" mProps(5).Value = True oDoc.StyleFamilies.loadStylesFromURL(sURL, mProps()) Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHRwgpTiyrQM/QSkURAvG2AJ0b/J4Qf1v8Xe0Sg/x7v/FQzFE+gACgiFHh xhPKsjGc6goVs8ZRyf+f0u4= =AeLR -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Placing new Menu in TopMenuBar
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Fernand, > -can the place of the new Menu's been altered by the API have never tried to build a menu via api ... but it's possible to create menu's via an Addons.xcu ... you will have a "MergePoint" and "MergeCommand" to place the menu http://wiki.services.openoffice.org/wiki/Framework/WorkInProgress/Addon_Menu_Toolbar_Merging http://openoffice.org/2004/installation"; xmlns:oor="http://openoffice.org/2001/registry"; xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> .uno:WindowList AddBefore Test macro:///LibrarieName.ModuleName.sub1 com.sun.star.text.TextDocument,com.sun.star.sheet.SpreadsheetDocument _self private:separator Test ... macro:///LibrarieName.ModuleName.sub2 _self Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHSwdeTiyrQM/QSkURAg1PAJ43kwAmRhkP7k3yP4lofzPLHNP/twCgwYLb qsBAi9vri1B0jJWnLCFyrnU= =iOSR -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How to deploy Python macros as Addon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Paolo, >>> 19.6.1 "Scripting Framework URI Specification" >> Seems that URI does not work: i tried to create a script extension with java - but failed, after deploying the extension is always disabled ... :-( i have no problem to run the script, if i simply copy it to the \share\Scripts\java\ folder ... in this case i can call it for example with: "vnd.sun.star.script:ScriptDispatch.org.test.java.ScriptDispatch.execute?language=Java&location=share" from a form control ... any hint's ? can someone provide an example ? Oliver extension directory structure: - -- - - description.xml + ScriptDispatch - ScriptDispatch.jar - parcel-descriptor.xml + META-INF - manifest.xml: manifest.xml: - --- parcel-descriptor.xml - ---dispatches a java script... - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHXC5bTiyrQM/QSkURAiCVAJ90ozxQL2XUuhv1iYIPxhKPr69KFgCgjtPU PzPhKFTcKGw+69oOZL/KATw= =XM8l -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Attaching OO Javadoc to Eclipse
Hi Tobias, > to add /usr/lib/openoffice/sdk/docs/common/ref/. But this is not > accepted by eclipse as Javadoc. have you tried to place a simplae "package-list" file with content "com.sun.star" into docs/common/ref/ ? Oliver -- GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS. Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Attaching OO Javadoc to Eclipse
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, > I just tried it, but with no success. The index.html keeps missing. that's true, i get an error too, but it seems to work anyway for example (shift) (f2) over "XComponentContext" jumps to file:///D:/Programme/OpenOffice.org2.0_SDK/docs/common/ref/com/sun/star/uno/XComponentContext.html from .classpath file: classpathentry kind="lib" path="D:/StdProg/soffice8/program/classes/ridl.jar"> Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHXVF1TiyrQM/QSkURApQeAJ4tMY33hkWw8YLe+3/dlAGYQUD83ACgohnM BnJ31bu40KVYoTlCKrWFRI8= =ixzE -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] How to deploy Python macros as Addon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, > "vnd.sun.star.script:ScriptDispatch.org.test.java.ScriptDispatch.execute?language=Java&location=share" > > any hint's ? can someone provide an example ? got it, made a mistake during the package process and the url is vnd.sun.star.script:ScriptDispatch.org.test.java.ScriptDispatch.execute?language=Java&location=share:uno_packages/ScriptDispatch.oxt for uno_packages ... Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHXWCHTiyrQM/QSkURAnV1AJ9MEihSDdx8QtKlotDXSQv/1M4BYgCfS0LY 4heX7cBRqiEC9dSbruu8wm4= =E4AN -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Attaching OO Javadoc to Eclipse
Hi Tobias, > that works! Thanks for the hint. I did not know this shortcut. But what > still keeps missing is the tooltip when hovering the XComponentContext. just had a look with eclipse 3.4m4: you are right, i get an: "unknown javadoc format for ..." error too even if you create a copy of "module-ix.html" and name it "index.html" ... Do you know what kind of doc format is exspected ? Oliver -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Undo API
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, please have a look at: http://qa.openoffice.org/issues/show_bug.cgi?id=33781 As a dirty bugFix for this one can use for example oSheet.UnProtect("") in a loop to overwrite the undo list after perfoming some basic operations ... Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHgmIwTiyrQM/QSkURAhiKAJwLV97HLdPf1HoCoBiWlckYw4wN2QCgq/45 finKxajvlT9QplR/L8eH2sQ= =39Vt -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Undo API
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Mathias, | Do you agree that this is a duplicate to issue 53097? yes, but mine is older ;-) added me to cc for 53097 ... |We started to design an API for this quite some time ago but never found |enough time to implement it. IMHO the possibiltiy to clear the list would be a great help and would solve a lot of problems ... Oliver - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHg7mdTiyrQM/QSkURAsdlAKCDEsB76EHI+9zUwYeZlpI99pJCbACdGeXm p+D3XoR4X1Fh+hnf6SZffHY= =g11B -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Attaching OO Javadoc to Eclipse
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Tobias, yes please do so ... | Do you think it is worth to file an issue to create a javadoc compliant | documentation? - -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHn0wQTiyrQM/QSkURAossAJ9/SQmkZlaISfVB1+8J0eG24lDGvwCffKK5 5mAE/c4RyvT4XcggxroKhG4= =c9NH -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] XDispatchProviderInterceptor - menu entries stay disabled ...
Hi, i have a problem with a XDispatchProviderInterceptor and menu entries Scenario: If a user changes to a sheet named "Tabelle2" i register a XDispatchProviderInterceptor. Now all GUI elements with URL "macro:///InterceptorDemo" should be disabled. I added entries for "OfficeMenuBar", "OfficeToolBar" and "OfficeHelp" using a Addons.xcu. Everything works fine so far. Changing to the sheet "Tabelle2" disables the elements. Changing to another sheet, enables the elements. But if i remove the "OfficeToolBar" entry from the Addons.xcu, the menu entries will stay *disabled*, even if i change to another sheet ... What i noticed: - registering the interceptor does not call menu URL's they are called only if one opens the menue ... only "OfficeToolBar" are called at this time. - opening a menu will call "com.sun.star.frame.XDispatch.addStatusListener" **and** "com.sun.star.frame.XDispatch.removeStatusListener" ... this does not happen for "OfficeToolBar" elements... public void addStatusListener(XStatusListener xControl, URL aURL) { aListenerHelper.addListener(xFrame, xControl, aURL.Complete); aListenerHelper.notify(xFrame, aURL, false); } public void removeStatusListener(XStatusListener xControl, URL aURL) { // why is removeStatusListener called for menu entries on open ??? if (interceptor.isDispatchRegistered() == true) return; aListenerHelper.notify(xFrame, aURL, true); aListenerHelper.removeListener(xFrame, xControl, aURL.Complete); } any hints are welcome ;-) i can provide a ready to run example ... Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] XDispatchProviderInterceptor - menu entries stay disabled ...
Hi Carsten, > What you have found is an optimization for the menu implementation. > Status updates are not very cheap and the current states of the menu > entries are not visible to the user. The menu contains about 300 entries > and can have a significant performance impact for status updates. > Therefore we decided to retrieve the status on demand, means when the > menu gets opened by the user. The menu implementation uses add- and > removeStatusListener for every menu item to retrieve the status and > updates the state. This optimization is not possible for toolbars as > they are visible all the time. I don't think that this optimization can > have a negative impact on a correct implementation. It's just an > implementation detail. The status is retrieved on demand and not updated > whenever a state changed. thanks for detailed explanation. As a woraround i can add a toolbar icon for every menu command, but this will not help if i have submenu included, and the user opens the submenu before the interceptor is registered ... I will have a closer look when i am back home next weekend... Oliver -- Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] firefox 3.0b4 can't display developers guide...
Hi, it tried to open the developers guide (OOo-SDK_2.3.0_WindowsIntel_install.exe) using firefox 3.0b4 but failed: XML-Verarbeitungsfehler: Adresse: file:///C:/OpenOffice.org2.0_SDK/docs/DevelopersGuide/DevelopersGuide.xhtml Zeile Nr. 3, Spalte 527:http://www.w3.org/1999/xhtml";>http-equiv="content-type" content="text/html; charset=utf-8"/>Developer's Guiderel="stylesheet" type="text/css" href="./DevelopersGuide.css"/>content="StarOffice/OpenOffice XSLT (http://xml.openoffice.org/sx2ml)"/>content="Ralf Kuhnert"/>content="Jürgen Schmidt"/> seems, firefox 3.0b4 has problems with *.xhtml and no problems with firefox 2.x ... any hints ? Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] XSpreadsheetView.getSelection()
Hi, Am 25.03.2008 16:54 schrieb Andreas Saeger: Is my assumption right that the API does not offer any method to tell us if the cell is highlighted or not? this could be true, i remember i had similar problems when i tried to get the input state of a cell... Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
[api-dev] how to convert %20 to " " ?
Hi, i noticed PackageInformationProvider.get(xContext).getPackageLocation("MyExtension") returns a string url, for example: file:///c:/programs/soffice/OOo-dev%203/program/../share/uno_packages/cache/uno_packages/61.tmp_/myextension.oxt How can one convert the url to an external one (for example replace the %20 with a space) ? Is there a helper service ? Oliver -- 249 Spiele für nur 1 Preis. Die GMX Spieleflatrate schon ab 9,90 Euro. Neu: Asterix bei den Olympischen Spielen: http://flat.games.gmx.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] how to convert %20 to " " ?
Hi Ariel, thanks, it works perfect :-) Oliver GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] alternative for event onFirstVisibleTask
Hi, The event OnStartApp is an event of the GlobalDispatchProvider, but it is not an event that could be used in Jobs.xcu. I tried it, but it did not work (see my Jobs.xcu below). In this context another question: How could I ever use the event OnStartApp in my java-application? To receive this event, a listener has to be registered at the GlobalDispatchProvider. But how could this be done? i will send you an example extension via email ... it will start onStartApp and add Listeners to the GlobalEventBroadcaster ... should work with oo 2.4.1 ... Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] Interacting With Dialogs from Basic
Hi Hal, I want to do a few things with a dialog from Basic other than just get the values of some controls. maybe this helps: REM * BASIC * Dim oDialog Sub Main oDialog = CreateUnoDialog(GlobalScope.DialogLibraries.Standard.Dialog1) oDialog.Execute() End Sub Sub TextModified oDialog.getControl("Label1").setText(oDialog.getControl("TextField1").getText()) End Sub Sub OK MsgBox "OK" oDialog.EndExecute() End Sub Sub Cancel MsgBox "Cancel..." oDialog.EndExecute() End Sub http://openoffice.org/2000/dialog"; xmlns:script="http://openoffice.org/2000/script"; dlg:id="Dialog1" dlg:left="183" dlg:top="58" dlg:width="220" dlg:height="169" dlg:closeable="true" dlg:moveable="true"> dlg:height="23" dlg:value="Cancel"> script:macro-name="vnd.sun.star.script:Standard.Module1.Cancel?language=Basic&location=application" script:language="Script"/> dlg:height="21" dlg:value="OK"> script:macro-name="vnd.sun.star.script:Standard.Module1.OK?language=Basic&location=application" script:language="Script"/> dlg:height="23"> script:macro-name="vnd.sun.star.script:Standard.Module1.TextModified?language=Basic&location=application" script:language="Script"/> dlg:height="18" dlg:value="Label1"/> OIliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] cross library calls
Hi Craig, For example, from within a Staroffice basic routine can one call a python or java library routine? try: REM * BASIC * OPTION EXPLICIT Sub callScript() Dim oMSPFac as Object Dim oMSP as Object Dim oScriptProvider as Object oMSPFac = createUnoService("com.sun.star.script.provider.MasterScriptProviderFactory") oMSP = oMSPFac.createScriptProvider(ThisComponent) oScriptProvider = oMSP.getScript("vnd.sun.star.script:helloWorld.py$HelloWorldPython?language=Python&location=share") oScriptProvider.invoke(Array(), Array(), Array()) oScriptProvider = oMSP.getScript("vnd.sun.star.script:HelloWorld.helloworld.js?language=JavaScript&location=share") oScriptProvider.invoke(Array(), Array(), Array()) oScriptProvider = oMSP.getScript("vnd.sun.star.script:HelloWorld.helloworld.bsh?language=BeanShell&location=share") oScriptProvider.invoke(Array(), Array(), Array()) oScriptProvider = oMSP.getScript("vnd.sun.star.script:HelloWorld.HelloWorld.printHW?language=Java&location=share") oScriptProvider.invoke(Array(), Array(), Array()) End Sub Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] XCell methods getValue and getError
Hi, maybe a java snippet will help: Oliver [...] final CellContentType type = xCell.getType(); if (type == CellContentType.FORMULA) { final CellContentType cellType = (CellContentType) getPropertyValue(xCell, "FormulaResultType"); if (cellType.getValue() == FormulaResult.STRING) { final XTextRange xTextRange = getTextRange(xCell); if (xTextRange != null) return xTextRange.getString(); } else return new Double(xCell.getValue()); } } public XTextRange getTextRange(final XCell xCell) { if (xCell != null) return (XTextRange) UnoRuntime.queryInterface(XTextRange.class, xCell); return null; } Am 17.12.2008 16:08 schrieb Petteri Larjos: > Hello, > > I am using UNO C++ API and need help with XCell interface. > > Question 1 > How do I get value of cell which contains formula returninng text? For > example spreadsheet cell with formula '==CONCATENATE("some";"text")'. The > com.sun.star.table.xcell method getValue() returns zero and getFormula() > returns formula not value. Is there any way to get textual return value of > formula? Or is there any method to be sure that returned zero value of > getValue() is not result of string returned by formula? > > Question 2 > com.sun.star.table.xcell method getError() returns long value. How do I get > error string which corresponds with getError() value? > > Thank you very much! > > Regards, > petteri - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] XCell methods getValue and getError
Hi Daniel, please forgive me for asking but i changed the code to: final CellContentType type = xCell.getType(); if (type == CellContentType.FORMULA) { final Object obj = getPropertyValue(xCell, "FormulaResultType"); [...] } my debugger tells me "obj" is a CellContentType: objcom.sun.star.table.cellcontentt...@1612600 m_value 1 AnyConverter.toInt(obj) will fail too ... Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] XCell methods getValue and getError
Hi Daniel, > Forgive me for believing the API documentation and not checking the > implementation. :-) You are right, and Calc is wrong. Sigh. just found: http://www.oooforum.org/forum/viewtopic.phtml?t=6838 will you open an issue ? regards Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] Extension?
Hi, you can find some hints here: http://wiki.services.openoffice.org/wiki/OpenOffice_NetBeans_Integration?cid=926478 http://wiki.services.openoffice.org/wiki/Extensions_development?cid=926478 there is also a usesfull firefox extension here: http://wiki.services.openoffice.org/wiki/Firefox_OpenOffice.org_extension Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] Fwd: How to create a checkbox with UNO
Hi Frédéric, > I need to create a checkbox in oowriter document with an external script in here is a starbasic example how to add a command button into a writer document. HTH Oliver Option Explicit Sub CreateControl Dim oDocument as Object Dim oView as Object Dim oDrawPage as Object Dim oController as Object Dim oForm as Object Dim oEvents(0) as New com.sun.star.script.ScriptEventDescriptor Dim oControlShape as Object Dim oControlModel as Object Dim oSize as New com.sun.star.awt.Size Dim oPosition as New com.sun.star.awt.Point oDocument = StarDesktop.getCurrentComponent oView = oDocument.CurrentController ' calc document's ' oDrawPage = oView.getActiveSheet.DrawPage oDrawPage = oDocument.getDrawPage() oControlShape = oDocument.createInstance("com.sun.star.drawing.ControlShape") oSize.Height = 1000 oSize.Width = 3000 oPosition.X = 2000 oPosition.Y = 3000 oControlShape.setSize(oSize) oControlShape.SizeProtect = True oControlShape.setPosition(oPosition) oControlShape.MoveProtect = True oControlShape.setPropertyValue("AnchorType", com.sun.star.text.TextContentAnchorType.AT_PAGE) oControlShape.Name("My Shape") ' optional name for identification ... oControlModel = createUNOService("com.sun.star.form.component.CommandButton") oControlModel.Name = "My Control" oControlModel.Label = "Test" oControlModel.FontName = "Arial" oControlModel.FontHeight = 10 oControlModel.Tag = "Hello World !" oControlModel.Enabled = True oControlShape.setControl(oControlModel) oDrawPage.add(oControlShape) oController = oView.getControl(oControlModel) oController.SetFocus() oForm = oDrawPage.getForms.getByIndex(0) oEvents(0).ListenerType = "XActionListener" oEvents(0).EventMethod = "actionPerformed" oEvents(0).AddListenerParam = "" oEvents(0).ScriptType = "StarBasic" oEvents(0).ScriptCode = "application:Standard.Module1.Test" oForm.registerScriptEvent(0, oEvents(0)) Call XToggleDesignMode(oDocument) End Sub Sub Test(oEvt) Dim oControlModel as Object oControlModel = oEvt.Source.Model MsgBox oControlModel.Tag End Sub Sub XToggleDesignMode(oDocument as Object) ' from the Tools Library ... Dim aTransformer as Object Dim oDispatch as Object Dim oFrame as Object Dim aSwitchMode as New com.sun.star.util.URL Dim aEmptyArgs() as New com.sun.star.bean.PropertyValue aSwitchMode.Complete = ".uno:SwitchControlDesignMode" aTransformer = createUnoService("com.sun.star.util.URLTransformer") aTransformer.parseStrict(aSwitchMode) ' Print aTransformer.getPresentation(aSwitchmode, True) oFrame = oDocument.currentController.Frame oDispatch = oFrame.queryDispatch(aSwitchMode, oFrame.Name, 63) oDispatch.dispatch(aSwitchMode, aEmptyArgs()) End Sub -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] Fwd: How to create a checkbox with UNO
you will find additional information here: http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Forms/Scripting_and_Events -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] Fwd: How to create a checkbox with UNO
and to call a python script you can use: oEvents(0).ScriptType = "Python" oEvents(0).ScriptCode = "vnd.sun.star.script:helloworld.py$HelloWorldPython?language=Python&location=share" you have to change the the first line in "HelloWorld.py" too: -> def HelloWorldPython(evt): Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] Fwd: How to create a checkbox with UNO
Hi > Is this the only way of doing this because I'd rather keep my dev in only one > language ? it should be possible to script everything in python ... the basic example will only show the necessary steps to add a form control > "vnd.sun.star.script:helloworld.py$HelloWorldPython?language=Python&location=share" this is only an example how to call a script from a form controls event ... Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] How to make a Python macro visible to OOo?
Hi Andrew, > Use Tools -> Macros -> Organize Macros -> Python to view the Python > macros included with OOo. i t should be possible to deploy scrips via extension.mechanism i have written a java script dispatcher for form controls, for example a method "doSomething": vnd.sun.star.script:scriptdispatch.org.test.script.Dispatch.doSomething?language=Java&location=share:uno_packages/scriptdispatch.oxt this works perfect with oo 2.4.2 (i can connect the form control event with the above mentioned url using the gui editor) but just noticed, oo 3.0.1 installs the extension without any error message but it's not activated. i can not find any "share/Scripts/unopkg-desc.xml" which sholud contain the path to the url like: seems, something is broken ... :-( http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Scripting/Integration_with_Extension_Manager Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] How to make a Python macro visible to OOo?
Hi, i submitted an issue - imho unopkg is broken for deploying scrips http://www.openoffice.org/issues/show_bug.cgi?id=98990 -> unopkg won't install script extensions (missung: unopkg-desc) seems "unopkg-desc.xml" is not created during extension deployment. cause same extension works for me with oo 2.4.2 if i create the "unopkg-desc.xml" after deployment manually it will work ... so i think, this i just a deployment bug ... regards Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
[api-dev] multi pages view - accessing ViewLayoutColumns/ViewLayoutBookMode ?
Hi is it possible to access the Properties "ViewLayoutColumns and "ViewLayoutBookMode" through Api calls ? i found them stored inside "settings.xml" -> "ooo:configuration-settings" Oliver - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] show cellstyle-dialog
Hi Jörg, > dispatcher.executeDispatch(document, ".uno:EditStyle", "", 0, args1()) have you seen: http://www.oooforum.org/forum/viewtopic.phtml?t=2445&view=next http://www.meinews.net/tastenk-t6310.html?s=5db004da181dc1f346384bc236895386&; Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] OOo for MS Windows problem with extension developed under Linux
Hi, for me this works fine on windows: String sURL = getPackageLocation(xComponentContext, "my.extension"); // file:///C:/Program%20Files/OpenOffice.org%203/program/../share/uno_packages/cache/uno_packages/6A32.tmp_/myextension.oxt convertURL(xComponentContext).getSystemPathFromFileURL(sURL); // C:\Program Files\OpenOffice.org 3\program\..\share\uno_packages\cache\uno_packages\6A32.tmp_\myextension.oxt public static String getPackageLocation( final XComponentContext xComponentContext, final String identifier) { return PackageInformationProvider.get(xComponentContext) .getPackageLocation(identifier); } public static XFileIdentifierConverter convertURL(final XComponentContext xComponentContext) { try { return toFileIdentifierConverter(UnoBaseHelper .createInstanceWithContext(xComponentContext, "com.sun.star.ucb.FileContentProvider")); } catch (final Exception e) { e.printStackTrace(); Log.error(e.getMessage()); } return null; } public static XFileIdentifierConverter toFileIdentifierConverter( final Object obj) { if (obj != null) return (XFileIdentifierConverter) UnoRuntime.queryInterface( XFileIdentifierConverter.class, obj); return null; } Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] Four quick questions about OpenOffice.org BASIC (for Calc)
Hi Johnny, have you seen the Basic Devolper Guide ? there is a pdf version avaiable: http://wiki.services.openoffice.org/wiki/Documentation/Wiki_Books for firefox you can add an extension which will help you finding more information: https://addons.mozilla.org/de/firefox/addon/4102 there are also some code snippets avaiable: http://codesnippets.services.openoffice.org/index.xml Oliver > 1. How do I make a macro global? I have found instructions how to do > that, but those instructions are VERY old and not accurate… > 2. How can I delete a cell with a OpenOffice.org BASIC macro? I mean > delete, causing other cells to move one step, for example upwards. > 3. Is there some kind of reference manual of all possible existing > objects and things like that, such as > ThisComponent.Blahblah.Babbeliblah(hey,oops).blabbeliblah? In that > case, where? I know I found one a couple of years ago but now when I > search at Google, I only get crap… > 4. Why do we still have that useless macro recorder? No macro recorder > at all would probably be better than the crap we have had so far. It > confuses more than it helps and the macros it produce never work > anyway and relative macro recording is still not possible. > > Kind regards > > Johnny Rosenberg > > - > To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org > For additional commands, e-mail: dev-h...@api.openoffice.org > -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] Four quick questions about OpenOffice.org BASIC (for Calc)
Hi Johnny, just look here: http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Basic/Advanced_Library_Organization Oliver > I have now, but I couldn't fins anything about how to organizing > macros (for instance making them available for every document rather > than a specific one), but maybe one of the other guides on that site > will help me with that. -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] OpenOffice.org BASIC Sorting
Hi Johnny, > With Xray I found not only createSearchDescriptor in a range, but also > createSortDescriptor. However, I can't find any information anywhere > about how to use it. The Search thing is easy and II use it all the > time, like this: http://wiki.services.openoffice.org/wiki/Documentation/OOo3_User_Guides/Calc_Guide/Sorting Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] Calc: Serious problems accessing multi-line cell text.
Hi Jan, have you seen http://development.openoffice.org/releases/DEV300_m50_snapshot.html ? -> Transporting newlines in spreadsheet formulas http://www.openoffice.org/issues/show_bug.cgi?id=35913 Oliver Am 12.06.2009 22:39 schrieb Jan Holst Jensen: > Hi all. > > I am developing an add-in that has to work with multi-line text entries > in cells. The text entries that will be processed are protein entries > that in most formats are line-oriented, so there is no way around > dealing with multi-line cells. > > The code below illustrates that multi-line text entered into a cell lose > linefeeds when passed to a formula (seems like linefeeds are converted > to spaces ?). Open a blank spreadsheet document, paste the code into the > Standard module of that document and run the code. > > As you can see, all linefeeds are stripped when the Cell value is passed > to a formula: B1 shows 0. However, if linefeeds occur in the result of a > formula they are retained: B2 shows 2 (control chars of A1 are lost but > the added control chars of the ExtraLineFunc() function are counted). > > The really perplexing part is that if you access the Cell's String > property directly the control chars are accessible. See results in B4 > and B5. > > Is there any way that I can trick Calc to pass the cell value > differently to the underlying spreadsheet function ? The spreadsheet > function is implemented in Python as an UNO component if that's any help. > > Behavior observed in both OpenOffice 3.0.1 and 3.1.0. Only tested on > Windows XP. > > Cheers > -- Jan > > > Sub Main > Sheet = ThisComponent.Sheets(0) > Sheet.GetCellByPosition(0, 0).String = "Hello" & Chr(13) & Chr(10) & > "World" > Sheet.GetCellByPosition(0, 1).Formula = "=EXTRALINEFUNC(A1)" > > ' Passing Cell's text to function via formula. > Sheet.GetCellByPosition(1, 0).Formula = "=CONTROLCHARCOUNT(A1)" > Sheet.GetCellByPosition(1, 1).Formula = "=CONTROLCHARCOUNT(A2)" > > ' Passing Cell's text directly to function via the String property. > S = Sheet.GetCellByPosition(0, 0).String > Sheet.GetCellByPosition(1, 3).Value = ControlCharCount(S) > S = Sheet.GetCellByPosition(0, 1).String > Sheet.GetCellByPosition(1, 4).Value = ControlCharCount(S) > End Sub > > Function ExtraLineFunc(S1 as String) > ExtraLineFunc = S1 & Chr(13) & Chr(10) & "Extra line" > End Function > > Function ControlCharCount(S1 as String) > Dim Result as Integer > > Result = 0 > For i = 1 to Len(S1) Step 1 >If Asc(Mid(S1, i, 1)) < 32 Then > Result = Result + 1 >End If > Next i > > ControlCharCount = Result > End Function > > > - > To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org > For additional commands, e-mail: dev-h...@api.openoffice.org > -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] XComponentLoader: XModel as PropertyValue now crashes the office
Hi Peter, > In OpenOffice 3.2 this crashes the office. > I get a com.sun.star.lang.DisposedException: TransactionManager... > Owner instance already closed. Call was rejected! seems loadProps[1].Name = "Hidden"; loadProps[1].Value = Boolean.FALSE; will work, i get a second view, but indeed, TRUE will crash .. Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] How can i enable/disable toolbar elements?
Hi Nyári, > This statusListener works fine on the OfficeMenuBar elements, but it has > no effects on the OfficeToolBar elements. What is the solution, if i have > to change the toolbar elements' state too? > Any idea? Have you seen "Disabling Commands at runtime depending on context" http://www.mail-archive.com/dev@api.openoffice.org/msg03789.html ? Regards Oliver GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] change toolbar name
Hi, > Whats the for spreadsheets? you need a "CalcWindowState.xcu" and don't forget to change "oor:name="WriterWindowState" " to >oor:name="CalcWindowState" see http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/AddOns/Toolbars >An extension can define the toolbar title with WindowState.xcu files. >The title of the toolbar must be set for >each module where the toolbar will appear. One such file is necessary for each module. Continuing the example, the >toolbar title for Writer module will be specified in a WriterWindowState.xcu file: > >http://openoffice.org/2001/registry"; xmlns:xs="http://www.w3.org/2001/XMLSchema"; >oor:name="WriterWindowState" oor:package="org.openoffice.Office.UI"> > > > oor:name="private:resource/toolbar/addon_org.openoffice.Office.addon.example" oor:op="replace"> > > My pretty bar > > > > > >The UIName property supports localization. >Each WindowState.xcu file must be declared as a configuration data >file in the manifest.xml file. regards Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] Restricting Open and Save File to One Directory...
Hi Hal, > Okay, since there's no thoughts on limiting the load and save functions, > is there some other way, such as replacing the menu and icon buttons > with ones that call a different load or save function? > have you tried to restrict commands ? http://wiki.services.openoffice.org/wiki/Documentation/Administration_Guide/Restricting_functionality regards Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] Attempt for an UNO Undo API
Hi Frank, > has been a revenant in this list (and other places) for multiple years now. yes, for example: http://www.openoffice.org/issues/show_bug.cgi?id=33781 ;-) would be really great if an undo api could be implemented soon. but as you mentioned, maybe it would be better to keep it simple: - "clearing the undo list" is the most important feature, for example a document macro called from a form control can simply clear the list after changes have been made. btw: at the moment we use a loop of "oDoc.unprotect" or sometthing else to overwrite the undo list. - "enterUndoContext - leaveUndoContext" allows to undo multiple operations in one step, for example undo all changes which have been performed from a document macro. this would be a great help, cause at the moment a user don't know how many steps to go back. Regards Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] com.sun.star.sheet.GeneralFunction.COUNT ?
Hi, > This source code works on 3.1 and 3.3 but not in 3.2.1, any tips ? confirming, oo 3.2 fails to ... Regards Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] AddOn works on Windows but not on Linux
Hi >> Are you sure that location is already an empty string, or do you only >> observe that PackagePath below is an empty string? there is an open issue: Package Information Provider may deliver wrong urls http://www.openoffice.org/issues/show_bug.cgi?id=113752 Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] [SOLVED] RE: [api-dev] OpenOffice 3.2.1 not printing on Windows Servers through the API
Hi, > I finally figured out what the problem was. > It turned out that we would often send a copy count of 0 as a default i remember we had similar problems when upgrading from oo 1.1.5, our print dialog refused to print copy count's in some cases ... and here some other printing issues: http://www.openoffice.org/issues/show_bug.cgi?id=114817 missing com.sun.star.view.XPrintJobListener JOB_STARTED/JOB_COMPLETED events http://www.openoffice.org/issues/show_bug.cgi?id=113479 On particular printers only 1 copy printed although No of copies > 1 and not collated http://www.openoffice.org/issues/show_bug.cgi?id=116009 Missing PrintSingleJobs in "Tools - Options - OpenOffice.org Writer - Print" Dialog Regards Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] Fom basic: to assign a macro to event: 'Document closed'
Hi, you will find more information here: http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Document_Events OPTION EXPLICIT Sub setDocEvent() Dim oDoc as Object Dim mEvt(1) as New com.sun.star.beans.PropertyValue oDoc = ThisComponent mEvt(0).Name = "EventType" mEvt(0).Value= "Script" mEvt(1).Name = "Script" mEvt(1).Value ="vnd.sun.star.script:Standard.Module7.test?language=Basic&location=application" oDoc.getEvents().replaceByName("OnPrepareUnload", mEvt()) End Sub Regards Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
Re: [api-dev] Grid control on OOo 3.3.0
Hi Bernard Marcelly, some time ago i played with the new grid control: source code should run with oo 3.3 ... OPTION EXPLICIT Sub GridControlTest() Dim oColumnModel as Object Dim oColumn1 as Object Dim oColumn2 as Object Dim oDataModel as Object Dim oGridModel as Object Dim oGridControl as Object Dim oDialogModel as Object Dim oDialogControl as Object Dim i as Integer Dim rBounds as new com.sun.star.awt.Rectangle Dim oContWin as Object Dim oFrame as Object Dim oToolkit as Object Dim wd as new com.sun.star.awt.WindowDescriptor Dim oListener oColumnModel = createUnoService("com.sun.star.awt.grid.DefaultGridColumnModel") oColumn1 = createUnoService("com.sun.star.awt.grid.GridColumn") oColumn1.Title = "City" oColumn1.ColumnWidth = 30 oColumn2 = createUnoService("com.sun.star.awt.grid.GridColumn") oColumn2.Title = "Country" oColumn2.ColumnWidth = 50 oColumnModel.addColumn(oColumn1) oColumnModel.addColumn(oColumn2) oDataModel = createUnoService("com.sun.star.awt.grid.DefaultGridDataModel") For i = 0 To 10 oDataModel.addRow (""&i, Array(Chr(97+i), Chr(65+i))) Next i oDialogModel = createUnoService("com.sun.star.awt.UnoControlDialogModel") oDialogModel.Title = "GridControl Test" oDialogControl = createUnoService("com.sun.star.awt.UnoControlDialog") oDialogControl.setModel( oDialogModel ) oDialogControl.setPosSize( 100, 100, 300, 200, com.sun.star.awt.PosSize.POSSIZE) oGridModel = oDialogModel.createInstance("com.sun.star.awt.grid.UnoControlGridModel") oGridModel.Name = "MyGrid" oGridModel.GridDataModel = oDataModel oGridModel.ColumnModel = oColumnModel oGridModel.ShowColumnHeader = True oGridModel.ShowRowHeader = True oGridModel.HScroll = True oGridModel.VScroll = True oGridModel.Sizeable = True oGridControl = createUnoService("com.sun.star.awt.grid.UnoControlGrid") oGridControl.setModel(oGridModel) oDialogControl.addControl("MyGrid", oGridControl) oGridControl.setPosSize(10, 10, 280, 180, com.sun.star.awt.PosSize.POSSIZE) oToolkit = createUnoService("com.sun.star.awt.Toolkit") rBounds.X = oDialogControl.PosSize.X rBounds.Y = oDialogControl.PosSize.Y rBounds.Width = oDialogControl.PosSize.Width rBounds.Height = oDialogControl.PosSize.Height wd.Type = com.sun.star.awt.WindowClass.TOP wd.Bounds = rBounds With com.sun.star.awt.WindowAttribute wd.WindowAttributes = .BORDER + .MOVEABLE + .SIZEABLE + .CLOSEABLE End With wd.WindowServiceName = "window" oContWin = oToolkit.createWindow(wd) oFrame = createUnoService("com.sun.star.frame.Frame") oFrame.initialize(oContWin) StarDesktop.getFrames().append(oFrame) oFrame.Name = "TestGridFrame" oFrame.Title = "TestGridTitle" oGridControl.createPeer(oToolkit, oContWin) oContWin.setVisible(True) oListener = CreateUnoListener("XGridSelection_", "com.sun.star.awt.grid.XGridSelectionListener") oGridControl.addSelectionListener(oListener) End Sub Sub XGridSelection_selectionChanged(oEvt) MsgBox "selected row: " & oEvt.Row End Sub Sub XGridSelection_disposing(oEvt) End Sub Regards Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
[api-dev] Re: Load document into a named frame
Hi Andrew, i just tried your code with oo 1.1.5 and failed - vDoc is null after the second loadComponentFromURL ... so it seems not to work in oo 1.1.5 too ... Regards Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
[api-dev] read oo Enum/Constant values with VBScript ...
Hi, is it legal to use the following source code for reading oo Enum/Constant values ? cause i found all vbscript examples seem to use direct values instead of constants, for example: http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Bridge/Automation_Bridge and i am not a vba expert ;-) Regards Oliver 'This is a VBScript example Set objServiceManager= WScript.CreateObject("com.sun.star.ServiceManager") Set objCoreReflection= objServiceManager.createInstance("com.sun.star.reflection.CoreReflection") 'get some constant values MsgBox "PARAGRAPH_BREAK: " & GetConstantValue("com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK"), 64, "Constants" MsgBox "SOFT_HYPHEN: " & GetConstantValue("com.sun.star.text.ControlCharacter.SOFT_HYPHEN"), 64, "Constants" MsgBox "HARD_SPACE: " & GetConstantValue("com.sun.star.text.ControlCharacter.HARD_SPACE"), 64, "Constants" MsgBox "ALWAYS_EXECUTE_NO_WARN: " & GetConstantValue("com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE_NO_WARN"), 64, "Constants" 'get some enum values MsgBox "PREV: " & GetEnumValue("com.sun.star.text.PageNumberType", "PREV"), 64, "Enums" MsgBox "CURRENT: " & GetEnumValue("com.sun.star.text.PageNumberType", "CURRENT"), 64, "Enums" MsgBox "NEXT: " & GetEnumValue("com.sun.star.text.PageNumberType", "NEXT"), 64, "Enums" Function GetEnumValue(cName, cValue) 'GetEnumValue = objCoreReflection.forName(cName).getField(cValue).get(Nothing) If objCoreReflection.hasByHierarchicalName(cName) Then Set oIDL = objCoreReflection.getByHierarchicalName(cName) GetEnumValue = oIDL.getField(cValue).get(Nothing) Exit Function End If GetEnumValue = "" End Function Function GetConstantValue(cName) Set oContext = objServiceManager.createInstance("com.sun.star.configuration.bootstrap.BootstrapContext") Set oTDM = oContext.getValueByName("/singletons/com.sun.star.reflection.theTypeDescriptionManager") If oTDM.hasByHierarchicalName(cName) Then GetConstantValue = oTDM.getByHierarchicalName(cName) Exit Function End If GetConstantValue = "" End Function -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
[api-dev] Re: XJob freezes documents
Hi Peter, > but the document is frozen (no cursor, no scrolling, etc.) > Working with oo is possible with other documents furthermore. this sounds pretty much like my problem we were talking about some weeks ago: i print a document with my custom print dialog. after that a second document is opened, parts of the first documents are copied and then printed too. after closing this document the first document is frozen sometimes ... till now i have no solution for this problem, but i can recover the frozen document using the macro below. can you recover your the frozen document too ? Regards Oliver Sub DocRescue() Dim oDoc as Object Dim oServiceManager as Object Dim oDesktop as Object Dim oComponents as Object Dim oComponent as Object Dim oFrame as Object Dim sTitle as String Dim mFileProps(0) as New com.sun.star.beans.PropertyValue Dim oNull as Object oDoc = ThisComponent oServiceManager = GetProcessServiceManager() oDesktop = oServiceManager.createInstance("com.sun.star.frame.Desktop") oComponents = oDesktop.Components.CreateEnumeration While oComponents.HasMoreElements() oComponent = oComponents.NextElement If Not EqualUnoObjects(oDoc, oComponent) Then sTitle = oComponent.Title If MsgBox("Dokument: """ & sTitle & """ retten?", 32+4, "Dokument retten...") = 6 Then oFrame = oComponent.getCurrentController().getFrame() oFrame.Title = "wird geschlossen..." mFileProps(0).Name = "Model" mFileProps(0).Value = oComponent oDesktop.loadComponentFromURL("private:object", "_blank", 0, mFileProps()) Wait(1000) oComponent = oNull oFrame.dispose() oFrame = oNull Exit Sub EndIf EndIf Wend End Sub -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature
[api-dev] Re: Adding Items to a Sub-Menu
Hi Hal, >From what I remember, to add things to a sub menu, I have to do that by hand. > Am I wrong? Is there a way, using OO Basic to add items to a sub menu? i just found an example: Programmatically adding to existing Menus http://www.oooforum.org/forum/viewtopic.phtml?p=102127 to make it run i had to change the "sMyCommand" > The hard part is I only want those sub-menu items available when that > document window is selected. mh, don't know, the example will add an entry to all spreadsheets ... Regards Oliver -- GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45 signature.asc Description: OpenPGP digital signature