RE: [api-dev] OfficeToolbar Context property (enhancement request)

2006-05-08 Thread Tim Tow

I fixed two issues in the CWS tbcontrols regarding the context property. 
I think your reported problem should be resolved. Extending the Addons
configuration to support a context property at the toolbar itself would be
incompatible. Therefore this can only be added to a new major version.


As long as the issue I am seeing is solved by the fixes, then the context
property on a toolbar itself should not be necessary..

Tim

Tim Tow
Applied OLAP, Inc
256.990.0136


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



[api-dev] OfficeToolbar Context property (enhancement request)

2006-05-05 Thread Tim Tow
 
I have a custom toolbar in my add-in for Calc and have specified the context
for the toolbar buttons, however, some of my customers have reported the
toolbar itself is showing up in Impress and Draw with no buttons.  Is it
possible to add a context property to the toolbar itself in a future
version?

Tim

Tim Tow
Applied OLAP, Inc
256.990.0136

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



RE: [api-dev] OfficeToolbar titlebar?

2006-04-20 Thread Tim Tow

This is currently not really possible (there is only a ugly and complex
way), but we want to support this for OOo 2.0.3. If you can wait for OOo
2.0.3 you can easily set it with the Addon.xcu file.


I will put it in when it is easy as long as the addons.xcu with the new info
is backward compatible with Ooo 2.0.

Tim

Tim Tow
Applied OLAP, Inc
256.990.0136


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



RE: [api-dev] OpenOffice 2 Add-ins require Java 1.5 -- UnsupportedClassVersionError to blame

2006-04-19 Thread Tim Tow

javamaker generates class files that work with both 1.4 and 1.5.  Again, I
guess your problem is that your component is compiled with 1.5 and can thus
not be loaded by 1.4.


The only way I could get my addin to work with Java 1.4.2 was to decompile
the classes produced by javamaker, copy the code to java files and include
those java files in my distribution (along with removing the ant calls that
compiled idl/ran javamaker/etc).   I spent several hours trying to make
javamaker work so my compile would be seamless but had to 'punt' to the
workaround.

Tim

Tim Tow
Applied OLAP, Inc
256.990.0136


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



[api-dev] OpenOffice 2 Add-ins require Java 1.5?

2006-04-11 Thread Tim Tow

For some reason, I am under the impression that OpenOffice 2 Add-ins written
in Java require Java 1.5, however, when I open OpenOffice 2, JVMs for
version 1.4 seem to be selected by default.

Questions:

1. Does Ooo 2.0 require 1.5 for these addins?

2. What are the advantages/disadvantages for using Java 1.5 over Java 1.4?

3. Is there a way to have Ooo 2.0 default to (or show only) Java 1.5 in the
Tools, Options, OpenOffice.org, Java dialog?

Thanks,

Tim

Tim Tow
Applied OLAP, Inc
256.990.0136


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



[api-dev] XNameContainer.insertByName() causes sheet to become 'dirty'

2006-03-29 Thread Tim Tow

I have an issue with my Calc addin where whenever any workbook is opened,
even if *nothing* is changed on the sheet, when you close workbook you get
prompted to save the workbook.  I have traced the code to a call to
XNameContainer.insertByName().  Here is a code snippet:

//
// get XFormsSupplier from from XFormsSupplier off of sheet
XNameContainer xForms = getSheetForms(xSheet);

// return now if no XNameContainer
if (xForms == null) {
  return;
}

Object oForm = null;
Object oControl = null;

try {
  // get the form
  oForm = xForms.getByName(__MY_FORM__);
} catch (com.sun.star.container.NoSuchElementException ex) {
  // form has not been created - create
  try {
// create a dataform using the current context
oForm =
SOContext.createServiceInstance(com.sun.star.form.component.DataForm,
null);

// DEBUG - if line below is uncommented, no prompt for save 
// if (true) return;

xForms.insertByName(__MY_FORM__, oForm);

// DEBUG - if line below is uncommented (and return statement
// above is), prompt for save occurs 
if (true) return;
//

I can understand that inserting this object changes the worksheet, but is
there a way to prevent it from marking the workbook as 'dirty' (so users
don't get prompted to save the workbook merely because of this change?)

Alternatively, is there an equivilent to the Excel VBA Workbook.Saved
property?  Here is a a help file snippet from VBA:

You can set this property to True if you want to close a modified workbook
without either saving it or being prompted to save it.

Tim

Tim Tow
Applied OLAP, Inc
256.990.0136





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



RE: [api-dev] Calc addin - Custom toolbar not enabled

2006-03-14 Thread Tim Tow


The toolbar disables an entry for two reasons:
1. The queryDispatch(...) call on XDispatchProvider doesn't provide a
dispatch object.


I put in some messageboxes to see when queryDispatch is called (and to see
any exceptions thrown).  It appears the queryDispatch method doesn't get
called until I hit my custom menu (and those items are initialized).  I was
expecting them to be called on application startup based on the Jobs.xcu I
have defined:


?xml version=1.0 encoding=UTF-8?
oor:component-data xmlns:oor=http://openoffice.org/2001/registry;
xmlns:xs=http://www.w3.org/2001/XMLSchema; oor:name=Jobs
oor:package=org.openoffice.Office
 node oor:name=Jobs
  node oor:name=startApp oor:op=replace
   prop oor:name=Service
 
valuecom.appliedolap.objects.essbase.client.grid.staroffice.plugin.ui.Plug
inProtocolHandler/value
   /prop
  /node
 /node
 node oor:name=Events
  node oor:name=onFirstVisibleTask oor:op=replace
   node oor:name=JobList
node oor:name=startApp oor:op=replace/
   /node
  /node
  node oor:name=OnNew oor:op=replace
   node oor:name=JobList
node oor:name=startApp oor:op=replace/
   /node
  /node
  node oor:name=OnLoad oor:op=replace
   node oor:name=JobList
node oor:name=startApp oor:op=replace/
   /node
  /node
 /node
/oor:component-data

Based on this jobs.xcu, I would expect the initialization to happen on
onFirstVisibleTask, OnNew or OnLoad.  Am I wrong in that?  

BTW, it seemed to work in Ooo 1.1.4 without a problem.

Tim

Tim Tow
Applied OLAP, Inc
256.990.0136





 

-Original Message-
From: Carsten Driesner [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 14, 2006 3:15 AM
To: dev@api.openoffice.org
Subject: Re: [api-dev] Calc addin - Custom toolbar not enabled

Tim Tow wrote:
 I have a custom toolbar defined in Addons.xcu that is not enabling
properly.
 The icons appear to be found properly but are disabled.  The same URL 
 is being used on custom menubar, so it appears as though it is 
 registered properly.  Here is a snippet of the Addons.xcu for the toolbar:
 
 Two questions:
 
 1. What could be causing the toolbar to be disabled (and what is the 
 best way to debug this issue?); and
The toolbar disables an entry for two reasons:
1. The queryDispatch(...) call on XDispatchProvider doesn't provide a
dispatch object.
2. The dispatch object sends a statusChanged notification with
FeatureStateEvent.IsEnabled = false. This results in a disabled toolbar
item.
You have to check whether your queryDispatch function is called. If yes,
please check your statusChanged notification.
 
 2. Why does the submenu get the same icon as the toolbar when it isn't 
 specified to have an icon in Addons.xcu?
OpenOffice.org always associates an image to a command URL. Therefore you
see the same image on the toolbar and menu item.

Regards,
Carsten

-
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]