[api-dev] Mergepoints for Extension

2008-11-17 Thread Thomas Krumbein
Hey,

I want to add with an extension an own menu-item to a existing submenu
in calc.

I know the technic, but I do not now the correct mergepoints. Maybe
someone can help?

OK, my proposal is to add an item in the data-menu, submenu datapilot,
after the item delete.

I only have a german version, so the correct names are:  Daten -
Datenpilot - löschen

Now I am looking for the three mergingpoints:

1:   uno:dataMenu  
2.   ???
3.   ???

Thnaks for your help

Thomas

-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Re: OLE Bridge - Strange exception

2008-11-17 Thread Joachim Lingner
Could you strip down your program so that it still runs and the error 
can still be reproduced?


Joachim

Carlos Rocha wrote:

Hi Joachim,

Thanks for the reply.

Maybe the implmentation of XDispatchProviderInterceptor is faulty. I 
assume that you implemented it VB. In case you have not already have a 
look at


http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Bridge/Automation_Objects_with_UNO_Interfaces 



Here is my implementation. The Interceptor registration is accepted and 
it works as expected, intercepting de URL commands I want. But I'm 
unable to release the Interceptor before closing the document.


'--- Declarations
Option Explicit

Private oMaster As Object, oSlave As Object
Private interfaces(0) As String

' XDispatchProviderInterception

Public Property Get Bridge_implementedInterfaces() As Variant
Bridge_implementedInterfaces = interfaces
End Property
'---
Private Sub Class_Initialize()
interfaces(0) = com.sun.star.frame.XDispatchProviderInterceptor
End Sub
'---
Public Function queryDispatch(URL, TargetFrameName, SearchFlags)
Select Case URL.complete
Case .uno:SaveAs, .uno:Save, .uno:CloseWin, .uno:CloseDoc, 
.uno:Quit

Set queryDispatch = New XDispatch
Case Else
Set queryDispatch = oSlave.queryDispatch(URL, TargetFrameName, 
SearchFlags)

End Select
End Function
'---
Public Function queryDispatches(mDispatches)
'queryDispatches = mDispatches()
End Function
'---
Public Property Get getSlaveDispatchProvider()
Set getSlaveDispatchProvider = oSlave
End Property
'---
Public Sub setSlaveDispatchProvider(oSlaveDispatchProvider)
Set oSlave = oSlaveDispatchProvider
End Sub
'---
Public Property Get getMasterDispatchProvider()
Set getMasterDispatchProvider = oMaster
End Property
'---
Public Sub setMasterDispatchProvider(oMasterDispatchProvider)
Set oMaster = oMasterDispatchProvider
End Sub
'- End XDispatchProviderInterceptor


Carlos Rocha wrote:



Hi,

Using VB with Automation Bridge.

The folowing code raises an exception when calling 
releaseDispatchProviderInterceptor. Everything else works fine, 
including the interception, but I'm unable to release it before 
closing the document.


//--
Set oXDispatchProviderInterceptor = New XDispatchProviderInterceptor




oFrame.registerDispatchProviderInterceptor oXDispatchProviderInterceptor
oFrame.releaseDispatchProviderInterceptor oXDispatchProviderInterceptor
//--

The error message is: (in case I can't attach the image)

/
Runtime error '1001':

com.sun.star.uno.RuntimeException: [automation bridge] unexpected 
exception in IUnknownWrapper_Impl::Invoke !!

/

What does this mean? anything wrong with 
oXDispatchProviderInterceptor object?





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Netbeans OOo Plugin 2.0: How to add custom files for an option dialog to an add-on project?

2008-11-17 Thread Benjamin Vollmer

Hi,

A small update: I corrected the paths to the .xcs / .xcu files and now 
both files will be included in the generated .oxt file. I have now a new 
leaf in the writer options as I should be, but the dialog elements from 
the referred .xdl file are still missing.


Is there a way to debug this problem?

regards
Benjamin

Juergen Schmidt wrote:

Hi Benjamin,

well it depends where you add the files in your project. With the old 
plugin it should work if the files are in the project/src directory.


You should use the latest plugin (2.0.1, not available via the update 
center so far) and you should create the xcu/xcs files with the new 
file wizard. The plugin will create the files under a new directory 
registry/[data/**/*.xcu|schema/**/*.xcs]. The reason for that is first 
a clear separation of related office only files. And take care of the 
package name in the xcu file. For example for an options page it 
should be project/registry/data/org/openoffice/Office/OptionsDialog.xcu
The reason for this is a potentially easier integration in the open 
office build and localization process.


I will provide a detailed step by step example online asap (part of my 
oocon workshop).


I will upload the 2.0.1 plugin in the file section of the api project 
later today. After some more testing we will provide it via the NB 
update center as well.


Juergen

Benjamin Vollmer wrote:

Hello,

last Weekend I tried to enable a custom option pane for my extension 
project. After some research a found the following helpful resources:


http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Options_Dialog 


http://lxr.go-oo.org/source/framework/desktop/test/deployment/options/
http://extensions.openoffice.org/servlets/ReadMsg?list=devmsgNo=1420

So I added three files to my project. One for configuration data 
(*.xcu), one for the configuration schema (*.xcs) and a dialog file 
(*.xdl). Then I added the entries for the .xcu and .xcs files to the 
uno-extension-manifest. But it seems that the NetBeans Plugin ignores 
my custom .xcs and .xcu files. When I deploy the project, both files 
are missing in the .oxt package and I get an error when I want to add 
the extension in the extension manager. Of course I can add the files 
manually to the .oxt package, but thats annoying. Is this a bug or am 
I doing something wrong?


BTW: I also have also a description file and it is also missing in 
the .oxt package?



Regards
Benjamin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Netbeans OOo Plugin 2.0: How to add custom files for an option dialog to an add-on project?

2008-11-17 Thread Juergen Schmidt

Hi,

sure you need the appropriate modules with debug info. But i would first 
check the extension identifier. It is important that you use the correct 
identifier that you have defined in the project properties (or in the 
description.xml) in the OptionsDialog.xcu as well.


You can also debug your options handler object (the object that 
implements the XContainerWindowEventHandler) and can check if it gets 
instantiated. Set a breakpoint in the callHandlerMethod method


Juergen

Benjamin Vollmer wrote:

Hi,

A small update: I corrected the paths to the .xcs / .xcu files and now 
both files will be included in the generated .oxt file. I have now a new 
leaf in the writer options as I should be, but the dialog elements from 
the referred .xdl file are still missing.


Is there a way to debug this problem?

regards
Benjamin

Juergen Schmidt wrote:

Hi Benjamin,

well it depends where you add the files in your project. With the old 
plugin it should work if the files are in the project/src directory.


You should use the latest plugin (2.0.1, not available via the update 
center so far) and you should create the xcu/xcs files with the new 
file wizard. The plugin will create the files under a new directory 
registry/[data/**/*.xcu|schema/**/*.xcs]. The reason for that is first 
a clear separation of related office only files. And take care of the 
package name in the xcu file. For example for an options page it 
should be project/registry/data/org/openoffice/Office/OptionsDialog.xcu
The reason for this is a potentially easier integration in the open 
office build and localization process.


I will provide a detailed step by step example online asap (part of my 
oocon workshop).


I will upload the 2.0.1 plugin in the file section of the api project 
later today. After some more testing we will provide it via the NB 
update center as well.


Juergen

Benjamin Vollmer wrote:

Hello,

last Weekend I tried to enable a custom option pane for my extension 
project. After some research a found the following helpful resources:


http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Options_Dialog 


http://lxr.go-oo.org/source/framework/desktop/test/deployment/options/
http://extensions.openoffice.org/servlets/ReadMsg?list=devmsgNo=1420

So I added three files to my project. One for configuration data 
(*.xcu), one for the configuration schema (*.xcs) and a dialog file 
(*.xdl). Then I added the entries for the .xcu and .xcs files to the 
uno-extension-manifest. But it seems that the NetBeans Plugin ignores 
my custom .xcs and .xcu files. When I deploy the project, both files 
are missing in the .oxt package and I get an error when I want to add 
the extension in the extension manager. Of course I can add the files 
manually to the .oxt package, but thats annoying. Is this a bug or am 
I doing something wrong?


BTW: I also have also a description file and it is also missing in 
the .oxt package?



Regards
Benjamin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Mergepoints for Extension

2008-11-17 Thread Carsten Driesner

Thomas Krumbein wrote:

Hey,

I want to add with an extension an own menu-item to a existing submenu
in calc.

I know the technic, but I do not now the correct mergepoints. Maybe
someone can help?

OK, my proposal is to add an item in the data-menu, submenu datapilot,
after the item delete.

I only have a german version, so the correct names are:  Daten -
Datenpilot - löschen

Now I am looking for the three mergingpoints:

1:   uno:dataMenu  
2.   ???
3.   ???


Hi Thomas,

It's fairly simple to find the correct merge point. You first have to 
look into the corresponding XML file which defines the whole menu bar. 
For your use case it's the calc menu bar. You can find the file here:
installation folder\OpenOffice.org\Basis 
3.0\share\config\soffice.cfg\modules\scalc\menubar. The menubar.xml file 
provides you all necessary commands. The merge point must contain the 
whole path, separating each command entry with '\'. In your case the 
merge point must be:

MergePoint = .uno:DataMenu\.uno:DataPilotMenu\.uno:DeletePivotTable
MergeCommand = AddBehind

Regards,
Carsten

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[api-dev] Re: OLE Bridge - Strange exception

2008-11-17 Thread Carlos Rocha

Hi Joachim Lingner,

Could you strip down your program so that it still runs and the error 
can still be reproduced?


You mean make it as small as possible? yes I can, but it's an ActiveX 
(OCX) wrapper so it needs a client, and it uses another wrapper (COM) 
that allows me to embed OOo in a form. But all the stuff is done in the 
OCX wrapper.
If your idea is to test the smallest sample possible that reproduces the 
error I can get it (that's what I have at the momment), but it needs a 
client to call it, and I don't know how to make one with VB yet :(


Some more info:

1. I'm unable to close the document (or the frame). After forcing a 
dispose hasMoreComponents is still true, and if I create a new document 
after that, it is created without margins or the frame(?) (that allows 
us to write on it), but the interception still works, so I think that 
something inside the dispatch process is preventing the document (or the 
Frame) to close.


2. I tried to register a CloseListener with both the Document OR the 
Frame. If with the document, oDocument.close(true) doesn't throw a 
CloseVetoException if the CloseListener is removed inside queryClosing 
(but it doesn't close), but with the Frame CloseVetoException is thrown 
either way.


So, believing that nothing is wrong with the interception OOo core, I 
think I only need to know something more about what to do before 
releasing the Interception (or during the Interception self work - 
StatusListener, FeatureStateEvent,...)


Thank you for your time
Carlos


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]