Re: [api-dev] problem with OfficeBean and JInternalFrame

2006-01-18 Thread Andreas Schlüns

Markus Plessing wrote:

Hello Roberto,

Roberto Battistoni schrieb:

I'm trying to add an OfficeBean to a  JInternalFrame, but Oo start in a
without-frame window in a full-screen mode, not in the JInternalFrame.
Why this?
[...] 


The Java-Window has to provide a system window handle using a
java.awt.Canvas and some JNI-Methods. For further information see the
corresponding part of the DevGuide : 6.1.7 Java_Window_Integration
http://api.openoffice.org/docs/DevelopersGuide/OfficeDev/OfficeDev.xhtml


That's true ...
The implemented JNI-methods retrieves the system window handle from the 
java.awt.Canvas ... but they work only in case the java-windows was 
already shown. Otherwhise they are not able to return such window handle.


But if then the office is asked to create a new document window it get's 
0 as parent instead of a valid window handle. And so it creates a window 
on the system desktop instead of creating a child window placed into the 
java environment.


Two solutions:
- make sure that your java window was shown before you create the office 
document


- wait for the fix inside the bean (which is currently in progress)

Regards
Andreas



Greetings

Markus



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



Re: [api-dev] quickstarter / storeToURL problem (python)

2006-01-18 Thread Andreas Schlüns

Daniela Garling wrote:

Please dump the URL you created on demand to the console.
May be it will be generated wrong in such case.
As next try you should dump the error message given by the catched 
exception. May be it shows the problem already.


Regards
Andreas


Hello list,

I have encountered a problem that I cannot understand no matter how hard
I try:

I have  a python app that calls openoffice to create a writer document.
it then saves it to disk
using model.storeAsURL where model is the current document. So far so good.
Then I want to extract the raw text from the document using this function:

# code snippet 
def rawText(self, model, storepath):
   cwd = systemPathToFileUrl( getcwd() )
   makedir(self)
   filename = os.environ['TEMP'] + '\\' + storepath + '.txt'
   storeUrl = absolutize( cwd, systemPathToFileUrl(filename) )
   filterName = Text (Encoded)
   storeProps = PropertyValue( FilterName , 0, filterName , 0 ),
   model.storeToURL(storeUrl, storeProps)
# end of code snippet ##

now - this code works. everytime. EXCEPT for, when i just restarted the
quickstarter.
so the way to reproduce the problem is:
quit quickstarter. start quickstarter. start python app. initiate
creation of document. save
document to disk, thereby initiate extraction of rawtext. -
ErrorCodeIOException
the way to solve this problem is:
quit python app. start python app. initiate creation of document. save
document to disk,
thereby initiate extraction of rawtext. - success.

i suspected it might have something to do with how fast the office gets
done with the
saving of the document and all and tried working around that by using
this code:

# code snippet ###
def rawText(self, model, storepath):
   cwd = systemPathToFileUrl( getcwd() )
   makedir(self)
   filename = os.environ['TEMP'] + '\\' + storepath + '.txt'
   storeUrl = absolutize( cwd, systemPathToFileUrl(filename) )
   filterName = Text (Encoded)
   storeProps = PropertyValue( FilterName , 0, filterName , 0 ),
   try:
   open(os.environ['TEMP'] + '\\'+ storepath, 'r')
   model.storeToURL(storeUrl, storeProps)
   except ErrorCodeIOException:
   time.sleep(2)
   rawText(self, model, storepath)
# end of code snippet ##

to no avail though. :/ if there's anybody with any explanation or
workaround or
even fix for this problem, please respond.
Thanks in advance,
Daniela


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



[api-dev] Text field: Text always preselected (highlighted)

2006-01-18 Thread Felix E. Klee
I've created a dialog with a text field.  This works fine, except for that the 
text is always preselected, which I do *not* want.  Here's what I tried:

With Dialog.getControl(Notiz)
.setText(Notiz)
Dim Auswahl As New com.sun.star.awt.Selection
Auswahl.Min = 0
Auswahl.Max = 0
.setSelection(Auswahl)
End With

How do I make the selection go away?

-- 
Dipl.-Phys. Felix E. Klee
Email: [EMAIL PROTECTED] (work), [EMAIL PROTECTED] (home)
Tel: +49 721 8307937, Fax: +49 721 8307936
Linuxburg, Goethestr. 15A, 76135 Karlsruhe, Germany

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



Re: [api-dev] OO Basic editor questions

2006-01-18 Thread Mathias Bauer
Felix E. Klee wrote:

 Concerning the macro editor provided by OO 1.1.4 I've two questions:
 
 1. Is it possible to have two Windows open showing different Basic files?

No.

 2. Is there an EMACS mode suitable for editing OO Basic files?

You can write your code in EMACS and import it. ;-)
OK, just kidding. What exactly do you mean?

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

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



Re: [api-dev] OO Basic editor questions

2006-01-18 Thread Andrew Jensen

Jürgen Schmidt wrote:


Mathias Bauer wrote:


Felix E. Klee wrote:


Concerning the macro editor provided by OO 1.1.4 I've two questions:

1. Is it possible to have two Windows open showing different Basic 
files?



No.


2. Is there an EMACS mode suitable for editing OO Basic files?



You can write your code in EMACS and import it. ;-)
OK, just kidding. What exactly do you mean?



i assume that he mean if the basic IDE can emulate an emacs so that a 
emacs user feel at home ;-) Some IDE's can emulate or embed vi or 
emacs.

But of course the Basic IDE haven't this feature


Why do you say  'But of course', it sounds like...Well if you really 
have to use Basic what do you want. I for one would like a decent editor.




Juergen



Best regards,
Mathias



-
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] OO Basic editor questions

2006-01-18 Thread Christian Junker
Hi Felix,

2006/1/18, Felix E. Klee [EMAIL PROTECTED]:
 Concerning the macro editor provided by OO 1.1.4 I've two questions:

 1. Is it possible to have two Windows open showing different Basic files?

No, I don't thin so.

 2. Is there an EMACS mode suitable for editing OO Basic files?

No, but if you want to implement that, it would surely be a nice thing.

--
Best Regards
Christian Junker

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



Re: [api-dev] OO Basic editor questions

2006-01-18 Thread Andrew Jensen
*chuckling*...OK...so it's either ...Show me the money! or delve into 
a 6 million line C++ program...nice choice.


Well, truthfully - if the Base module doesn't improve it won't matter to 
me anyway...and right now tonight I am not in the mood to discuss 
'Build' vs 'Buy' pros and cons. ( I usually detest people that make 
comments like the one I just made..people say some variation of it 
constantly on the forum boards, so I apologize ) But I am having a hard 
enough time trying to figure out how to make the darn thing work 
properly - and it feels like I have been living in the Basic IDE for the 
past 6 months, which I thought would be the easiest route to some real 
solutions..silly me I kind of thought the D in IDE stood for development.


No don't take time from the core stuff for an editor enhancement.

Sincerely

Drew


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



Re: [api-dev] OO Basic editor questions

2006-01-18 Thread Rony G. Flatscher




Christian Junker wrote:

  Hi Felix,

2006/1/18, Felix E. Klee [EMAIL PROTECTED]:
  
  
Concerning the macro editor provided by OO 1.1.4 I've two questions:

1. Is it possible to have two Windows open showing different Basic files?

  
  No, I don't thin so.
  
  
2. Is there an EMACS mode suitable for editing OO Basic files?

  
  No, but if you want to implement that, it would surely be a nice thing.
  

Hmm, how about a menu option allowing editing text with an external
editor like emacs, vim etc. ? 

The same would make life for programmers a easier with the scripting
framework editor as well.

---rony