Re: [dev] suppress popup of InputFields when opening a template

2006-06-02 Thread Peter Eberlein

Hi Christoph,


Christoph Lutz schrieb:

Hi Mathias,


 is there a way to suppress the popup of InputFields when I open a

 template
  that contains InputFields?

No. If a document or a template is opened via UI all dialogs are allowed
by default. Suppressing them needs dispatch interception but I don't see
the point in doing it. Can you explain?



As a migration-strategy we would like to do a soft-migration from MS-Office
to OOo. This means we have users working parallel either with MSO or OOo 
and
with document-templates in .dot AND .ott-Format. There are about 
(estimated)

3000 dot-templates which should be accessed from OOo and don't contain
complex content, but Word's Text-FormFields. As you surely know, Word's
simple Text-FormFields which are very common in all of our .dot-Templates
are mapped to InputFields in OOo which behave different. The two main
advantages of Word's TextFields are:

1) Direct editing is possible (without popup) which provides a much better
overview of the document and the editing-result.
2) you can navigate through the Fields using the TAB-Key.
3) the user can decide by himself when it's time to fillout the Fields.

OOo's popping-up InputFields are much more annoying in this point:
1) the automatic popup overlays the interesting field which harms the
overview of the document.
2) navigation with TAB is not possible and pressing Enter in the dialog
causes the cursor to jump to the next line, not to the next InputField.
There is no easy way to navigate to the next InputField leafing the finges
on the keyboard (you have to use the mouse to press OK - YES, 5 times
pressing SHIFT+TAB works also, but this is not a real alternative)
3) You can not decide when you want to fill the fields as the popup comes
automatically on load-time.

Of course, InputFields work, but our users would not accept them in the
direct competition between MSO and OOo!

Since we don't expect OOo to provide the missing feature in the near 
future,

we decided to provide a workaround for the unwanted behaviour of
InputFields:
We would like to collect all inputFields and join all the single
dialog-windows into one large (selmade AWT) dialog-window that is diplayed
beside(!) the office-document. Users can fill in the values und use the
tab-key as used. There will be no window overlaying the document.



Why not converting the input-fields automatically into user fields and 
resaving the templates, so that you can use your (modified) program (of 
course before the user work with them)?



The corresponding program listens on the ON_NEW-Event of the
GlobalEventDispatcher, but this Event is only called AFTER the automatic
popup of inputFields. I am asking the above question, because I want my 
code

to run without the automatic popup.

Hope this helped to understand my point



of course this doesn't help at the moment,
but please take a look at the issue forms handling in OO 2.x/3.0
http://qa.openoffice.org/issues/show_bug.cgi?id=65951

I appreciate any comments.

Peter

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



[dev] Play slideshow without User Input

2006-06-02 Thread Andy Cordwell


I'd like to write a application that opens a PowerPoint presentation and 
plays it to the end, all without user intervention.  I've written a Java 
program (based on the PresentationDemo sample - see below) that:


Opens the presentation
For each page, sets the Change = 1 and Duration = 5
Sets IsAutomatic = False in the Presentation property set.  Together 
with above displays each page for 5 seconds then moves on.

Starts the presentation.

However, this will stop as soon as the first animated shape is encounter 
and waits for user input before animating and proceeding (which is 
unacceptable for my application since there will be no user input).  
Explicitly disabling the Animations Allowed property (both in the UI and 
from code) doesn't appear to do anything - the presentation still waits 
for user click before proceeding.  Have I misunderstood what this 
feature will do?


One possible solution is to set Custom Animation ~ Effect ~ Start = 
After Previous and set the Effect Options ~ Timing ~ Delay = a few 
seconds, applying these settings to each relevant animated shape.  
Unfortunately, I can't find a way of doing this through the API.  Is 
this method supported through the Java / C++ API? 


Are there any other suggestions to accomplish hands off playing?

I'm currently using Java for prototyping, and will rewrite in C++ once 
complete.  Running version 2.0.2 under FedoraCore4.


Thanks,

Andy


public class PresentationDemo
{
   public static void main( String args[] )
   {
   try
   {
   // Startup the loader
   XComponentContext xOfficeContext = 
com.sun.star.comp.helper.Bootstrap.bootstrap();
   XMultiComponentFactory xServiceManager = 
xOfficeContext.getServiceManager();
   Object oDesktop = xServiceManager.createInstanceWithContext( 
com.sun.star.frame.Desktop, xOfficeContext );
   XComponentLoader xCompLoader 
=(XComponentLoader)UnoRuntime.queryInterface(XComponentLoader.class, 
oDesktop);


   // Open the document
   String  file_url = /home/mine/OO_Test2/SimplePresentation.odp;
   XComponent xComponent = xCompLoader.loadComponentFromURL( 
file_url, _blank, 0, new com.sun.star.beans.PropertyValue[0] );


   int slide_show_duration = 2;
   
   // Loop through each page and set the duration
   XDrawPagesSupplier xDrawPagesSupplier = 
(XDrawPagesSupplier)UnoRuntime.queryInterface( XDrawPagesSupplier.class, 
xComponent );

   XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
   int i;
   for ( i = 0; i  xDrawPages.getCount(); i++ )
   {
   System.out.println( Page: + i );
   
   XDrawPage xDrawPage = 
(XDrawPage)UnoRuntime.queryInterface( XDrawPage.class, 
xDrawPages.getByIndex( i ));
   XPropertySet xPropSet = 
(XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, xDrawPage);


   xPropSet.setPropertyValue( Change, new Integer( 1 ) );
   xPropSet.setPropertyValue( Duration, new Integer( 
slide_show_duration ) );
   
   // Walk the animations object tree and set onClick to 
after previous
   
   // get the shape container for page one
   XShapes xShapes = (XShapes)UnoRuntime.queryInterface( 
XShapes.class, xDrawPage );


   int shape_index = 0;
   for( shape_index = 0; shape_index  xShapes.getCount(); 
shape_index++ )

   {
   XShape xShape = (XShape)UnoRuntime.queryInterface( 
XShape.class, xShapes.getByIndex( shape_index ) );


   XPropertySetxShapePropSet = (XPropertySet) 
UnoRuntime.queryInterface( XPropertySet.class, xShape );
   
   //String handler = AnyConverter.toString( 
xShapePropSet.getPropertyValue( OnClick) );
   //Object handler = xShapePropSet.getPropertyValue( 
OnClick);
   ClickAction action = (ClickAction) 
xShapePropSet.getPropertyValue( OnClick );
   
   String bookmark = 
(String)xShapePropSet.getPropertyValue( Bookmark);
   AnimationEffect effect = 
(AnimationEffect)xShapePropSet.getPropertyValue( Effect );
   
   // -1 means no order.  0 + (doc state 1 - are they 
incorrect?) means animated.  -1 means none
   int presentationOrder = 
((Integer)xShapePropSet.getPropertyValue( PresentationOrder )).intValue();
   
   short delay = 
((Short)xShapePropSet.getPropertyValue( TextAnimationDelay 
)).shortValue();
   AnimationSpeed speed = 
(AnimationSpeed)xShapePropSet.getPropertyValue( Speed );
   
   System.out.println(

   \tShape: + shape_index +
Action: + action.getValue() +
Effect: + effect.getValue() +
  

Re: [dev] Play slideshow without User Input

2006-06-02 Thread Christian Lippka

Hi Andy,

in impress, each slide in the API supports the 
com::sun::star::animations::XAnimationNodeSupplier interface which

returns you the time line for that slide. Just browse through that
container hierarchic of the animation nodes and change the begin
attribute from all note that have a begin of Timing::INDEFINITE
to 0.0 (see com::sun::star::animations::XAnimationNode )

Regards,
Christian

Andy Cordwell wrote:


I'd like to write a application that opens a PowerPoint presentation and 
plays it to the end, all without user intervention.  I've written a Java 
program (based on the PresentationDemo sample - see below) that:


Opens the presentation
For each page, sets the Change = 1 and Duration = 5
Sets IsAutomatic = False in the Presentation property set.  Together 
with above displays each page for 5 seconds then moves on.

Starts the presentation.

However, this will stop as soon as the first animated shape is encounter 
and waits for user input before animating and proceeding (which is 
unacceptable for my application since there will be no user input).  
Explicitly disabling the Animations Allowed property (both in the UI and 
from code) doesn't appear to do anything - the presentation still waits 
for user click before proceeding.  Have I misunderstood what this 
feature will do?


One possible solution is to set Custom Animation ~ Effect ~ Start = 
After Previous and set the Effect Options ~ Timing ~ Delay = a few 
seconds, applying these settings to each relevant animated shape.  
Unfortunately, I can't find a way of doing this through the API.  Is 
this method supported through the Java / C++ API?

Are there any other suggestions to accomplish hands off playing?

I'm currently using Java for prototyping, and will rewrite in C++ once 
complete.  Running version 2.0.2 under FedoraCore4.


Thanks,

Andy


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



Re: [dev] Play slideshow without User Input

2006-06-02 Thread Andy Cordwell

Christian,

Thanks for your suggestion - which I'm struggling to understand with my 
limited OO knowledge!


I've got the XAnimationNode interface via the XAnimationNodeSupplier for 
a slide (see code below).  But I can't see how to obtain an iteration 
interface so I can obtain the hierarchy of animation nodes.


Apologies if I've missed something obvious here ;)

Andy


XDrawPagesSupplier xDrawPagesSupplier = 
(XDrawPagesSupplier)UnoRuntime.queryInterface( XDrawPagesSupplier.class, 
xComponent );

XDrawPages xDrawPages = xDrawPagesSupplier.getDrawPages();
int i;
for ( i = 0; i  xDrawPages.getCount(); i++ )
{   
   System.out.println( Page: + i );
  
   XDrawPage xDrawPage = (XDrawPage)UnoRuntime.queryInterface( 
XDrawPage.class, xDrawPages.getByIndex( i ));


   XAnimationNodeSupplier  animation_node_supplier = 
(XAnimationNodeSupplier)UnoRuntime.queryInterface(XAnimationNodeSupplier.class, 
xDrawPage);
   XAnimationNode animation_node = 
(XAnimationNode)animation_node_supplier.getAnimationNode();

}



Christian Lippka wrote:

Hi Andy,

in impress, each slide in the API supports the 
com::sun::star::animations::XAnimationNodeSupplier interface which

returns you the time line for that slide. Just browse through that
container hierarchic of the animation nodes and change the begin
attribute from all note that have a begin of Timing::INDEFINITE
to 0.0 (see com::sun::star::animations::XAnimationNode )

Regards,
Christian

Andy Cordwell wrote:


I'd like to write a application that opens a PowerPoint presentation 
and plays it to the end, all without user intervention.  I've written 
a Java program (based on the PresentationDemo sample - see below) that:


Opens the presentation
For each page, sets the Change = 1 and Duration = 5
Sets IsAutomatic = False in the Presentation property set.  Together 
with above displays each page for 5 seconds then moves on.

Starts the presentation.

However, this will stop as soon as the first animated shape is 
encounter and waits for user input before animating and proceeding 
(which is unacceptable for my application since there will be no user 
input).  Explicitly disabling the Animations Allowed property (both 
in the UI and from code) doesn't appear to do anything - the 
presentation still waits for user click before proceeding.  Have I 
misunderstood what this feature will do?


One possible solution is to set Custom Animation ~ Effect ~ Start = 
After Previous and set the Effect Options ~ Timing ~ Delay = a few 
seconds, applying these settings to each relevant animated shape.  
Unfortunately, I can't find a way of doing this through the API.  Is 
this method supported through the Java / C++ API?

Are there any other suggestions to accomplish hands off playing?

I'm currently using Java for prototyping, and will rewrite in C++ 
once complete.  Running version 2.0.2 under FedoraCore4.


Thanks,

Andy


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



[dev] OO Write Customize problem

2006-06-02 Thread Hlupheka Mahesu
Hi
Firstly i will to thank you for informative articles that
you write to make our life easier, keep up the good work.

Question: OpenOffice version 2 Writer (Windows XP or 2000)

I have customized OO Writer for my users so that when they
want to open a specific OO document in my Delphi
Application they can only open it with limited Menus, which
is working 100%. I have even removed the customize menu
from the Menu to prevent them from resetting back to
factory settings but what i have realized is that there is
a drop down button on the toolbar and when cliked, it
display the Customize menu and i don't want this users to
have this menu or button, so how do i go about removing it
completly in a nutshell how do i remove/disable the
customize button on the toolbar??

Thanking a million for your response.

Regards

Abel Mahesu
South Africa
___
For super low premiums, click here http://www.webmail.co.za/dd.pwm

http://www.webmail.co.za the South African FREE email service

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



[dev] Writting at end of Document in Visual Basic

2006-06-02 Thread Albert Mateu
 
This is a part of my Visual Basic code, ( i 've to use them :P but now whith 
Open office  == :))



   Set OpenPar(0) = MakePropertyValue(ReadOnly, False)
   Set OpenPar(1) = MakePropertyValue(Hidden, False)
   Set oDoc = oDesk.loadComponentFromURL(ConvertToUrl(YourPathFile), 
_blank, 0, OpenPar()) 'can be a Ms Word, Open office , etc

 Set objText = oDoc.GetText
 Set objCursor = objText.createTextCursor
  
objCursor.gotoEnd 
objCursor.collapseToEnd 'its important to move the cursor to end, i don't 
know why

'Create a paragraph break
'The second argument is a 
com::sun::star::text::ControlCharacter::PARAGRAPH_BREAK constant
Call objText.insertControlCharacter(objCursor, 0, False)
'insert text at the end of the document
Call objText.insertString(objCursor, insertText  vbLf, False)


[dev] Implementierung

2006-06-02 Thread Mei Miao


Hallo Zusammen,

ich muss eine oder mehrere Einschränkungen von Writer, Math und Impress durch 
neue Implementierungen abbauen, das ganze auf XP. Mein erstes Problem fängt mit 
der Quellcode an. Wo kann man die runterladen? Jemand hat mir diese Seite 
empfohlen: http://download.openoffice.org/2.0.2/source.htm 
[http://download.openoffice.org/2.0.2/source.htm], auf die zeigt aber nur Erro. 
Meine andere Frage ist, brauche ich dazu noch andere Software oder was anderes?

Gruß

Mei

 



Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach!
Mehr Infos unter *http://freemail.web.de/home/landingpad/?mc=021131* 
[http://freemail.web.de/home/landingpad/?mc=021131]


[dev] Is it still worth to work on OpenOffice' gui toolkit?

2006-06-02 Thread Clemens Eisserer

Hello,

I am a long-term openoffice user and to some degree a bit of gui
performance fanatic.
I dislike UIs which show tearing effects and don't perform well and
just very few toolkits really make me happy performance-feeling whise.
I just can speak for OOo running on Linux, which shows some ugliness
when working with menus and some other small  performance glitches.

I would like to work on it in my vacation, however does it still make
sence to work on the currently used toolkit (vcl or however its
called)? I read many articles that OOo will move to a self-written
abstraction layer which uses underlaying widgets.
In which timeframe will this happen, or is this still planned at all.

Thank you, lg Clemens

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