openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rony G. Flatscher (Apache)" <>
Subject Re: Sidebar for Developers
Date Wed, 09 Oct 2013 13:01:31 GMT

On 09.10.2013 14:42, Andre Fischer wrote:
> On 03.10.2013 11:37, Jörg Schmidt wrote:
>> Hello,
>>> From: Andre Fischer []
>>>> It took a long time but here is my example, a simple search
>>> for writer.
>>> That's OK.  I just came back from my vacation and am now
>>> catching up on
>>> emails.
>>>> Can you please help me now?
>>> I will try.  Can you tell me, what the extension does and how
>>> you want
>>> it to work and look?
>> The extension function is very simple, there is a dialog with two text fields to
>> enter a search string and a replacement text, and two buttons to start searching
>> or replacing. The extension is for writer.
>> So not much function but it is indeed primarily an example of integration in the
>> sidebar
>> This dialogue should now be implemented, he works as a sidebar, so:
>> 2 text fields for entering
>> 4 Label Fields
>> 2 buttons to launch two Basic Macros
> I was somewhat but not entirely successful in turning your BASIC script into a sidebar
> I have created an Eclipse project of the sidebar panel [1].   Run the 'oxt' target of
the Ant
> build file to create the file SidebarBasicPanelDemo.oxt in the dist/ directory.   Install
> extension in a 4.* OpenOffice and restart.  Now you should see in the sidebar tab bar
a new entry
> with a gear icon.  Click on it to swtich to the demo panel.
> What works is that the dialog is displayed as expected.  Callbacks into the BASIC script
work also.
> What does not work is that the BASIC script can not access the dialog for eg retrieval
of the
> search strings.  The reason for that is that the dialog is not created from the script
in the
> 'Start_dialog' function but on the Java side of the implementation. I tried to call from
Java into
> BASIC with the dialog object.  The call works, but I did not get the public BASIC variable
> 'ts_dialog' to work.  When you click on the 'Suche Nächsten' button then the ts_dialog
value is
> empty again.
> But maybe this is a good thing, because every document has its own side bar and its own
> dialog.  Using a single global variable to hold the dialog would not work.  As I do not
> OpenOffice BASIC well enough to know if and how object orientation works, I did not try
to fix this.
> I also do not know how to change the event callbacks to pass parameters to the BASIC
> Without parameters, your BASIC script does not know from which instance of the dialog
it has been
> called and thus could not retrieve the search string, even if it could access the dialogs.
> Using the BASIC dialog but do the implementation in Java would be much easier and more
> Best regards,
> Andre
> [1]
Very interesting!

Would it be possible for you use e.g. BeanShell, JavaScript, Pyhton,  instead of AOO Basic
to fetch
the values in the Basic dialog one way or another? If so, could you please create such a sidebar
extension too, which could serve as a great template for script coders to take advantage of
the new
sidebar feature?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message