Re: [dev] Automatic Math Formula Sizing

2008-07-11 Thread Thomas Lange - Sun Germany - ham02 - Hamburg

Hi Gvarek,

The easiest way would be to wait and try again once OOo 3.0 becomes
available. There were two bugs in respect to this behavior and at least
one (probably both) got only fixed for OOo 3.0.

Please note that I'm not promising you that it I'll work. I'm just
stating that a regression in this area was fixed. And may those fixes
are all you need.

If you like to know in advance you may download a developer snapshot of
at least DEV300 m24 to check things out.


Regards,
Thomas



 Dear OOo developers,
 
 I have a question that I asked on the OOo community forum, but I was advised 
 to forward it here.
 
 I am trying to automatically produce documents in Open Document Format (ODF) 
 and to open them in OOo Writer. Everything is working great, except for the 
 size of the mathematical formula.
 
 In the content.xml file, I put a MathML formula in a draw:frame object, like 
 this:
 draw:frame
   draw:name=Objekt1
   text:anchor-type=as-char
   svg:width=2.972cm
   svg:height=1.138cm
   draw:z-index=0
   draw:object
 math:math
 [... MathML content here ...]
 /math:math
 /draw:object
 /draw:frame
 
 The problem is that I do not know the size of the formula, so I figured I 
 would just remove the svg:width and svg:height attributes:
 draw:frame
   draw:name=Objekt1
   text:anchor-type=as-char
   draw:z-index=0
 This worked fine with OOo Writer 2.3 in Linux: it would automatically resize 
 all formulas upon loading. Now that I have upgraded to OOo 2.4, it does not 
 work so well anymore: all the equations are tiny and I do not know how to 
 tell OOo Writer to scale them automatically. Nevertheless, the equations are 
 there, and if I double-click on them, they are correctly resized; but I do 
 not want to do that if the document contains hundreds of equations.
 
 Do you know how to solve this problem? Is there a special attribute in 
 draw:frame or draw:object that I can use for this? Or is there a way to tell 
 Writer to query OOo Math for the size, instead of relying on the 
 svg:width/svg:height attributes?
 
 For more details, you can find a sample document and screenshots here:
 http://user.services.openoffice.org/en/forum/viewtopic.php?f=30t=7509
 
 Thanks and kind regards,
 Gvarek
 
 -
 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: [dev] POPUPMENU

2008-07-11 Thread rameshkancherla

Hi Carstern,
I have seen in developers guide as

A context menu is displayed when an object is right clicked. Typically, a
context menu has context dependent functions to manipulate the selected
object, such as cut, copy and paste. Developers can intercept context menus
before they are displayed to cancel the execution of a context menu, add,
delete, or modify the menu by replacing context menu entries or complete sub
menus. It is possible to provide new customized context menus. 

But i have to show popupmenu in openoffice when user left clicked on tool
bar button. can you please give me an advice how do i implement it.

Thanks  Regards
Ramesh K

ms777 wrote:
 
 Hi Carsten,
 
 thanks for the answer. I created an issue:
 http://www.openoffice.org/issues/show_bug.cgi?id=91477
 
 
 ms777
 
 
 
 Carsten Driesner wrote:
 
 ms777 wrote:
 
 Carsten Driesner wrote:

 ... Here you have to create your own popup menu (using
 com.sun.star.awt.PopupMenu) and fill 
 it with your menu items using images and execute it. ...


 
 Carsten,
 
 how do you set images using the com.sun.star.awt.PopupMenu service ? It
 implements XPopupMenu, which does not expose any setImage function. In
 the
 OO's UI File/New menu, oo uses the newmenucontroller
 (http://framework.openoffice.org/source/browse/framework/framework/source/uielement/newmenucontroller.cxx?rev=1.11.30.1view=markup),
 which internally uses pPopupMenu-SetItemImage( nItemId, aImage ).
 SetItemImage, however is not part of XPopup or any other interface
 definition ...
 
 It seems necessary to program a menucontroller in C and to rebuild OO to
 do
 use the same approach in order to use SetItemImage in an own
 PopupMenuController ... or alternatively program the popup menu window
 from
 scratch using only the drawing primitives 
 
 
 Hi ms777,
 
 Sorry that I answer so late but I was very busy with OOo final tasks. I 
 have to admit that you are totally right. That's a missing function in 
 UNO AWT. Could you or ramesh K write me an issue and I will add this 
 function to the popup menu object?
 Ramesh K, although you have to implement your own toolbar controller to 
 get all the feature you want, you won't be able to add images to your 
 popup menu. I am not sure if you still want to prepare your work and add 
 the missing part when the new function is available. Currently you have 
 to accept that images in your own popup menu are not available for 
 extensions. Due to a different interface it's possible to add images to 
 context menus, see Context menu interceptor. Due to the fact that we 
 are short before the OOo 3.0 final, please excuse me if I cannot answer 
 every question in short amount of time.
 
 Regards,
 Carsten
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/POPUPMENU-tp17917898p18397516.html
Sent from the openoffice - dev mailing list archive at Nabble.com.


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



Re: [dev] Automatic Math Formula Sizing

2008-07-11 Thread Thomas Lange - Sun Germany - ham02 - Hamburg

Hi,

Just as an additional reference: Have a look in issue 59205 and the
other one mentioned in that one.

Thomas



Gvarek Naskov wrote:

 Dear OOo developers,
 
 I have a question that I asked on the OOo community forum, but I was advised 
 to forward it here.
 
 I am trying to automatically produce documents in Open Document Format (ODF) 
 and to open them in OOo Writer. Everything is working great, except for the 
 size of the mathematical formula.
 
 In the content.xml file, I put a MathML formula in a draw:frame object, like 
 this:
 draw:frame
   draw:name=Objekt1
   text:anchor-type=as-char
   svg:width=2.972cm
   svg:height=1.138cm
   draw:z-index=0
   draw:object
 math:math
 [... MathML content here ...]
 /math:math
 /draw:object
 /draw:frame
 
 The problem is that I do not know the size of the formula, so I figured I 
 would just remove the svg:width and svg:height attributes:
 draw:frame
   draw:name=Objekt1
   text:anchor-type=as-char
   draw:z-index=0
 This worked fine with OOo Writer 2.3 in Linux: it would automatically resize 
 all formulas upon loading. Now that I have upgraded to OOo 2.4, it does not 
 work so well anymore: all the equations are tiny and I do not know how to 
 tell OOo Writer to scale them automatically. Nevertheless, the equations are 
 there, and if I double-click on them, they are correctly resized; but I do 
 not want to do that if the document contains hundreds of equations.
 
 Do you know how to solve this problem? Is there a special attribute in 
 draw:frame or draw:object that I can use for this? Or is there a way to tell 
 Writer to query OOo Math for the size, instead of relying on the 
 svg:width/svg:height attributes?
 
 For more details, you can find a sample document and screenshots here:
 http://user.services.openoffice.org/en/forum/viewtopic.php?f=30t=7509
 
 Thanks and kind regards,
 Gvarek
 
 -
 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: [dev] lxr.go-oo.org

2008-07-11 Thread Jan Holesovsky
Hi Terrence,

On Saturday 05 July 2008 15:48, Terrence Enger wrote:

 Not strictly on topic here, so I apologize in advance.

 For the last several days, every identifier search at lxr.go-oo.org has
 returned ... zero definitions, zero references.

We are hitting an inode count quota on the server from time to time - sorry 
for that :-(  Should become better; as a workaround, please use the general 
search in cases you get zero as the result.

 I do not see a contact listed on the search page (and the existence of
 class `contact` makes code results dominate a google search).  To whom
 should I whine, I mean complain, I mean offer my useful feedback about
 the site grin /?

[EMAIL PROTECTED] is the right mailing list for the go-oo related stuff.

Hope that helps,
Jan

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



Re: [dev] Programming

2008-07-11 Thread Jan Holesovsky
Hi,

On Monday 07 July 2008 09:51, d m wrote:

 I am interested in programming for open office. Please help me in getting
 started.

The easiest start is probably to have a look at the 
http://wiki.services.openoffice.org/wiki/I_want_to_be_an_OpenOffice.org_developer
 
wiki page.  If you have more questions, we'll be happy to answer :-) - IRC 
will be the easiest way.

Regards,
Jan

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



Re: [dev] Interested in Development Projects (Code Writing)

2008-07-11 Thread Jan Holesovsky
Hi Julie,

On Tuesday 08 July 2008 01:57, J.B. Participant wrote:

   I have an interest in learning C++, Java, JavaScript, advanced HTML (know
 some), advanced CSS (know some) and other program languages. Therefore, I
 would like to begin receiving volunteer code writing assignments.

OpenOffice.org is probably not the easiest option for starting to learn C++ or 
Java - it's quite complex.  But I don't want to scare you ;-) - if you are 
interested in more info, please have a look at

http://wiki.services.openoffice.org/wiki/I_want_to_be_an_OpenOffice.org_developer

and show up on the IRC, that's the easiest way how to help to get you started.

Regards,
Jan

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



Re: [dev] New Developer

2008-07-11 Thread Jan Holesovsky
Hi Ahmed,

On Wednesday 09 July 2008 19:16, Ahmed El-Deeb wrote:

 My name is Ahmed El-Deeb and I am a recent Computer Science
 graduate. I would like to join the development team of OpenOffice.

http://wiki.services.openoffice.org/wiki/I_want_to_be_an_OpenOffice.org_developer
 
might be interesting for you :-)  You may also consider showing up on the 
IRC.

Regards,
Jan

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



Re: [dev] programming

2008-07-11 Thread Jan Holesovsky
Hi,

On Tuesday 01 July 2008 07:42, Big Bear wrote:

 I like to help with OpenOffice programming

http://wiki.services.openoffice.org/wiki/I_want_to_be_an_OpenOffice.org_developer
 
might be interesting for you then :-)  Please have a look, and show up on the 
IRC if you are still interested.

Regards,
Jan

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



[dev] Java 1.5 now minimal requirement ? (Re: [dev] RFC: java 1.5

2008-07-11 Thread Rony G. Flatscher

Hi there,

just noticed that running DEV300/m23 with Java 1.4 does not work anymore:

- cut here -
E:\rony\dev\bsf\src\bintestOOo.rex
Exception in thread main java.lang.UnsupportedClassVersionError: 
com/sun/star/comp/helper/Bootstrap (Unsupported major.minor version 49.0)

   at java.lang.ClassLoader.defineClass0(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
   at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)

   at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
   at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
   at org.apache.bsf.util.EngineUtils.loadClass(EngineUtils.java:385)
   at 
org.rexxla.bsf.engines.rexx.RexxAndJava.javaCallBSF(RexxAndJava.java:3191)

- cut here -


Going back to this list, the last comment on RFC for Java 1.5 was:

Mathias Bauer wrote:

Hi all,

Christoph Neumann wrote:

  

Kay Ramme - Sun Germany - Hamburg wrote:


Stephan Bergmann wrote:
  

Malte Timmermann wrote:


My point of view:

Most people agree that OOo mustn't loose (meta) data when Java is not
available, but plug ins for working with meta data can rely on Java.

Changing OOo's Java base line from 1.4 to 1.5 is fine for most people 
then.
  

AFAIK the current Java baseline is 1.3.1.

That is correct, the (still) valid consensus regarding Java can be found 
here:


http://tools.openoffice.org/policies/java_usage.html

respectively the background:

http://tools.openoffice.org/servlets/ReadMsg?list=jdkmsgNo=90
  

This document is aged four. Shouldn't we reconsider about this status?



I think what we need is a list of complete and 100% free Java
implementations on all relevant platforms and the Java version they are
compatible to. Do we have one? Or do we have a volunteer creating one?

Ciao,
Mathias
  


Not having noticed a consensus to have Java 1.5 as the required version 
for OOo (yet), I just was wondering, whether m23 is mistakingly built 
with Java 1.5 or whether from now on Java 1.5 would be the minimal 
version for OOo.And if the latter, what about newer builds of OOo 2.*, 
would they mandate at least Java 1.5 as well?


---rony



[dev] Listening for document events.

2008-07-11 Thread Andrew Buza
I'm working on creating an Add-on for OpenOffice (I hope this is the
right place for such questions). I've gone through most of the
documentation, but since this is my first exposure to UNO and the
office environment I'm still not sure how everything fits together.

I need to listen for document events (OnLoad, OnSave, etc.), so I've
created an XEventListener implementation, but I'm not sure how to add
this listener to the XEventBroadcaster on the OfficeDocument service.
I'd like it to be attached automatically when the office is started in
order to capture events throughout the session.

It looks like I can get the service manager/XMultiComponentFactory
through the XComponentContext, create an OfficeDocument and query  for
its XEventBroadcaster, but I'm not sure where and when this can be
done.

I'm using Java (with the NetBeans IDE) and OOo 2.4.

Thanks

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



Re: [dev] Listening for document events.

2008-07-11 Thread Robert Vojta
Hi Andrew,

 I'd like it to be attached automatically when the office is started in
 order to capture events throughout the session.

I assume from this part that you would like to listen for events from
all documents. My recommendation is ...

 - write Job [1] and assign it to event OnAppStart [2]
 - register your listener in GlobalEventBroadcaster [3]

... GlobalEventBroadcaster includes XEventBroadcaster as
OfficeDocument. The only difference is that XEventBroadcaster in
OfficeDocument broadcasts events for one document and
XEventBroadcaster in GlobalEventBroadcaster broadcasts events for all
documents. AFAIK you can use protocol handler instead of job with
OnAppStart event too.

[1] 
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/Jobs/Jobs
[2] 
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/Jobs/List_of_Supported_Events
[3] 
http://api.openoffice.org/docs/common/ref/com/sun/star/frame/GlobalEventBroadcaster.html

You can find examples in OpenOffice.org SDK directory tree ...

Job - [SDK]/examples/DevelopersGuide/Components/Addons/JobsAddon
ProtocolHandler -
[SDK]/xamples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java

Protocol handler in Java can be generated by the OpenOffice.org
plug-in in the NetBeans for you. Create new project OpenOffice.org
Addon ...

HTH,
-- 
Robert Vojta

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