[api-dev] Re: Constant values for Function arguments

2011-08-18 Thread Thomas Krumbein
Hey Johnny,

honestly, a lot of your questions/things are basics...

VALUE, STRING, FORMULA and DATETIME are reserved words in Basic and
cannot be used as constant or variable names. Ever thought about this?

Try to put a character in Front (i.E. nValue, or myString)  and
everything works as expected

Best regards
Thomas


Am 18.08.2011 12:52, schrieb Johnny Rosenberg:
 Here's another delicate problem that's easy to work around, but still
 very strange:
 
 Module 2:
 ———Code starts below———
 REM  *  BASIC  *
 
 Option Explicit
 
 Public Const VALUE=1
 Public Const STRING=4
 Public Const FORMULA=16
 Public Const DATETIME=2
 
 Sub HelloWorld
   Print Hello world!
 End Sub
 ———End of code———
 
 
 Module1:
 ———Code starts below———
 REM  *  BASIC  *
 
 Option Explicit
 
 Sub Main
   Dim A
   A=VALUE+STRING+FORMULA
 End Sub
 ———End of code———
 Run Main and you will get an error message at ”A=VALUE+STRING+FORMULA”.
 If you run step by step (Ctrl+F8 in the BASIC IDE) and stop at that
 line and then hover your mouse pointer over VALUE or STRING or
 FORMULA, you can clearly see its values, but obviously this doesn't
 help. Dimensioning A as Variant, as I did, doesn't help either. If you
 look at VALUE, STRING or FORMULA in the variable monitor (or whatever
 it's called in English), the window at the bottom left, you can see
 that they are Variant/Integer and you can see their correct values.
 
 So now, let's move the constant definition to Module1:
 Module 2:
 ———Code starts below———
 REM  *  BASIC  *
 
 Option Explicit
 
 Sub HelloWorld
   Print Hello world!
 End Sub
 ———End of code———
 
 
 Module1:
 ———Code starts below———
 REM  *  BASIC  *
 
 Option Explicit
 
 Public Const VALUE=1
 Public Const STRING=4
 Public Const FORMULA=16
 Public Const DATETIME=2
 
 Sub Main
   Dim A
   A=VALUE+STRING+FORMULA
 End Sub
 ———End of code———
 
 Now Main in Module1 works as expected, but take a look in the monitor
 again. Those constants appears in exactly the same way this time as
 before, the only exception is that this works.
 I would be very grateful for an explanation about this. Is there
 REALLY a logical reason for it to be this way or should I report this
 as a bug as soon as possible?
 
 Of course I can define those constants in every module, but isn't one
 of the points by declaring as Public that I can reach them in all my
 modules? Well, in this case I can; I just can't use them, at least not
 when adding them to each other.
 ”A=VALUE” works in both my examples, but obviously not
 ”A=VALUE+STRING+FORMULA” for some reason I am sure absolutely nobody
 can explain, so please prove me wrong here…!
 
 :D
 
 
 Kind regards
 
 Johnny Rosenberg
 ジョニー・ローゼンバーグ

-- 
-
To unsubscribe send email to dev-unsubscr...@api.openoffice.org
For additional commands send email to sy...@api.openoffice.org
with Subject: help


Re: [api-dev] Document Server Memory Leak Suspicion

2010-11-03 Thread Thomas Lange
Morgen Mathias,

Nur falls es dich interessiert:
Deine Mail kommt bei mir als von gestern 18:43 an...

Thomas



On 02.11.2010 18:43, Mathias Bauer wrote:

 Hi Chris,
 
 On 02.11.2010 13:40, Chris Rider wrote:
 I hope this is an active mailing list ~ we have a serious issue with the
 document server and are trying to track down some more knowledge that
 might exist about it.

 I have new information from further testing, but here's a quick summary:
 We have a program that calls the document server to load a PPT file (as
 explained below). That goes fine, and then we call it to close the file
 after some time... also goes fine -- mostly. The file will close, but
 then the memory continues to be eaten up by document server until the
 machine becomes non-responsive.

 We've run strace and can't find anything.
 We're calling the server over port 2803.
 We're calling the close method (which I've learned also calls dispose,
 etc.).

 We've got hundreds of products at customers and some are beginning to
 doubt OpenOffice as a platform... please help!
 
 We still don't have enough information, or perhaps not the right one. 
 OOo in general definitely does not have a memory leak of that kind - you 
 wouldn't be the first to find it in case of. I know that OOo is used as 
 a server in a lot of installations without such huge problems. So there 
 must be a particular issue that is special for your setup.
 
 So let's summarize and see where we can make progress. We should try to 
 describe everything exactly as possible.
 
 You are talking about a document server and a DocumentLoader. The 
 latter seems to be a C++ application and the former seems to be an 
 instance of OOo that is talking with the C++ application though a remote 
 UNO bridge.
 
 The DocumentLoader seems to use this instance of OOo to load a ppt file 
 and then it seems that something is eating up your memory.
 
 Is that the correct picture? If not, can you describe it better? 
 Especially we need to know most exactly how OOo is used in this scenario.
 
 Next question - this something that eats up your memory - did you 
 verify that it is the OOo process whose memory consumption goes through 
 the roof?
 
 Another question: did you try the same with other kinds of documents 
 (not ppt)?
 
 Regards,
 Mathias
 


-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



[api-dev] How can I check, if a macro (basic) is still running?

2010-08-20 Thread Thomas Krumbein
Hey,

I do have some macros, which will start on events (for example document
close) or with user-action (menu-button).

Those macros presents dialogs and the user can do some inputs and so on.

Now it is possibel, to start the marco several times (i.e. close two
documents in a very short time, click twice on a start-Button, if the
dialog-Window is only visible, not started with execute).

Now I am looking for a possibility to check first, if the macro is still
running - and do then an exit sub.

My first intent was, to check, if the dialog-window is still open and
identify this frame using the frames-title.

so I create an enumeration
oComp = stardesktop.getComponents.createEnumeration

but I only get the main components - so i.e. the writer-frame.

So, how can I identify my dialog-frames or is there another possibility
to identify, if my marco is still running?

Thanks for any hints.

Best regards
Thomas


-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] How can I check, if a macro (basic) is still running?

2010-08-20 Thread Thomas Krumbein
Hey Daniel,

yes, this is a very simple solution - and should be work :-)

Thank you :-)

Best regards
Thomas

Daniel Rentz schrieb:
 Am 20.08.2010 09:51, schrieb Thomas Krumbein:
 Hi,
 
 
 I do have some macros, which will start on events (for example document
 close) or with user-action (menu-button).

 Those macros presents dialogs and the user can do some inputs and so on.

 Now it is possibel, to start the marco several times (i.e. close two
 documents in a very short time, click twice on a start-Button, if the
 dialog-Window is only visible, not started with execute).

 Now I am looking for a possibility to check first, if the macro is still
 running - and do then an exit sub.

 My first intent was, to check, if the dialog-window is still open and
 identify this frame using the frames-title.

 so I create an enumeration
 oComp = stardesktop.getComponents.createEnumeration

 but I only get the main components - so i.e. the writer-frame.

 So, how can I identify my dialog-frames or is there another possibility
 to identify, if my marco is still running?
 
 My first idea is a kind of a mutex, though it's not a high-end solution...
 
 
 
 Dim running As Boolean ' global variable initializes to 0 - false
 
 Sub MyMacro
  If running Then Exit Sub
  running = True
  On Error Goto errorhandler
  ...
 
  ...
  running = False
  Exit Sub
 errorhandler:
  MsgBox Error!
  running = False
 End Sub
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
 For additional commands, e-mail: dev-h...@api.openoffice.org
 
 


-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] How can I check, if a macro (basic) is still running?

2010-08-20 Thread Thomas Krumbein
Hey Fernand,

Fernand Vanrie schrieb:
 Thomas,
 
 Do not look for a frame your dialog is opened in a window
 
 oWin = GetWindowOpen(Dialog1)
 
 this gives you yes or no a a window object   containing Dialog1
 
 hope it helps

not really ...

Where is this function or methode GetWindowOpen defined? I searched
inside the IDL but cannot find it.
Just a call getWindowOpen(xxx) will produce an error - methode not
find...
believe, there is something missing. But what?

Regards
Thomas


-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



[api-dev] Opening *.dbf file - workaround?

2010-08-11 Thread Thomas Krumbein
Hey,

I do have a problem to open a *.dbf file in calc via basic-macro.
Typically it is not a problem - I am using the following code and it
works fine (in my systems - all OOo  3.2). It is even not nessessary to
pass an FilterName - just open it.


  ...
  sURL = convertToURL(D:\Daten\AUSKUNFT.DBF)


  REM Datei als Calcdokument hidden öffnen
  dim arg(1) as new com.sun.star.beans.PropertyValue
  arg(0).name = Hidden
  arg(0).value = true
  arg(1).name = FilterName
  arg(1).value = dBase

  oCalcDoc = starDesktop.loadComponentFromURL(sURL, _blank, 0, arg())
'  xray oCalcDoc
  oTab = oCalcDoc.getSheets().getByIndex(0)
  ...

Unfortunatly it does not work in OOo 3.0.1 on win 2000. In this case
loadComponentFromURL Methode delivers nothing - even not an error. I
believe, that the filter is defect or something else.
The variable oCalcDoc is empty, next line will create an error.

Now I need a solution to open this file (*.dbf) as a calc-document - it
is not possible to change the OOo version or the system.

Has someone a workaround or a solution?

Thank you for any hints

Thomas




-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] [terrible solution..] Opening *.dbf file - workaround?

2010-08-11 Thread Thomas Krumbein
Hey,

if someone is interested: I found a very terrible solution, but it works:
  ...
  dim oFrame as object
  dim dispatcher as object
  dim oCalcDoc as object
  dim sUrl as string

  sUrl = convertToURL(D:\Daten\AUSKUNFT.DBF)

  oCalcDoc = starDesktop.loadComponentFromURL(private:factory/scalc,
_blank, 0, array())

  rem get access to the document-frame
  oFrame   = oCalcDoc.CurrentController.Frame
  dispatcher = createUnoService(com.sun.star.frame.DispatchHelper)

  dim args1(2) as new com.sun.star.beans.PropertyValue
  args1(0).Name = URL
  args1(0).Value = sURL
  args1(1).Name = FilterName
  args1(1).Value = dBase
  args1(2).Name = FilterOptions
  args1(2).Value = IBMPC_850

  rem execute dispatch
  dispatcher.executeDispatch(oFrame, .uno:Open, , 0, args1())
  rem hide the currentWindow
  oFrame.getContainerWindow().setVisible(false)
  rem get access to the only sheet
  otab = oFrame.creator.currentComponent.sheets(0)

  msgbox oTab.getCellrangeByName(A3).string
  ...

It is nessesary to create first an empty frame (new document) before I
can open the dbf file (with the dispatch command). Unfortunatly this din
not work in hidden mode so it is still visible during loading
process. So, I do have a workaround - but it is still terrible.
If someone do have a better idea - please let me know...

Thanks
Thomas





Thomas Krumbein schrieb:
 Hey,
 
 I do have a problem to open a *.dbf file in calc via basic-macro.
 Typically it is not a problem - I am using the following code and it
 works fine (in my systems - all OOo  3.2). It is even not nessessary to
 pass an FilterName - just open it.
 
 
   ...
   sURL = convertToURL(D:\Daten\AUSKUNFT.DBF)
 
 
   REM Datei als Calcdokument hidden öffnen
   dim arg(1) as new com.sun.star.beans.PropertyValue
   arg(0).name = Hidden
   arg(0).value = true
   arg(1).name = FilterName
   arg(1).value = dBase
 
   oCalcDoc = starDesktop.loadComponentFromURL(sURL, _blank, 0, arg())
 '  xray oCalcDoc
   oTab = oCalcDoc.getSheets().getByIndex(0)
   ...
 
 Unfortunatly it does not work in OOo 3.0.1 on win 2000. In this case
 loadComponentFromURL Methode delivers nothing - even not an error. I
 believe, that the filter is defect or something else.
 The variable oCalcDoc is empty, next line will create an error.
 
 Now I need a solution to open this file (*.dbf) as a calc-document - it
 is not possible to change the OOo version or the system.
 
 Has someone a workaround or a solution?
 
 Thank you for any hints
 
 Thomas
 
 
 
 


-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] [terrible solution..] Opening *.dbf file - workaround?

2010-08-11 Thread Thomas Krumbein
Hey Bernhard,

Bernard Marcelly schrieb:
 Message de Thomas Krumbein  date 2010-08-11 14:48 :
 
 Hi,
 This old version may not be able to guess the import filter and encoding of 
 the 
 dBase document. 

Yes, that is right...

Did you try to add this information?
 
dim arg(2) as new com.sun.star.beans.PropertyValue
arg(0).Name = Hidden
arg(0).Value = true
arg(1).Name = FilterName
arg(1).Value = dBase
arg(2).Name = FilterOptions
arg(2).Value = IBMPC_850
 
oCalcDoc = StarDesktop.loadComponentFromURL(sURL, _blank, 0, arg())

Yes, I tried this first ;-) It dosen't work - oCalcdoc is empty afterwards.

The dispatcher code works only with a visible frame, if I use a hidden
one, the code captured the active window (frame).

 Version 3.0.1 is an obsolete and buggy version, it should not be used anymore 
 in 
 a professional (or even personal) environment.

Well, I know this ;-)
Unfortunatly a lot of big customers will not change there version in
three or six month periods. In my case, the customer owns more then
15000 installations - and he is still using the 3.0.1.
By the way: Even the 3.2.1 is buggy. We are evaluate the upgrading
sinse some month - but I am not shure, if it will really take place this
year...  OK, this problem here is solved, my code is really better - but
I have to solve it for the 3.0.1 too.

Thank you and best regards
Thomas


-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Searching for a Document Property - Writer

2010-08-09 Thread Thomas Krumbein
Hey Jürgen,

Jürgen Schmidt schrieb:
 On 8/8/10 8:35 PM, Thomas Krumbein wrote:
[..]
 But where it is?
 
 at the DocumentSettings! Get the DocumentSettings from the document, 
 check the property if present or not and set the value if necessary.
 
 Where exactly is your problem now?

My Problem? There are no documentSettings. I try xray, I use the
debug-window inside the ide - where are the documentSettings?

Try this:

oDoc = thisComponent

And now?
oDoc.DocumentSettings  'error
oDoc.currentController.DocumentSettings 'error

I have looked at every possible object or property - where are the
settings? That is what I ask for - please give me a hint where I can
find them??

regards
Thomas

PS: I am programming in basic!


-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Searching for a Document Property - Writer

2010-08-09 Thread Thomas Krumbein
Hey Bernhard,

thank you for your explanation :-)  Now I got it...

Bernard Marcelly schrieb:
 Message de Thomas Krumbein  date 2010-08-08 20:35 :
 the searched property is: PrinterIndependentLayout
 I can set a value using basic as you mentioned - that works.
 But: Even using xray I cannot find the property anywhere in the
 document. Maybe you have an idea?
 
 This is a property of service com.sun.star.document.Settings that you can see 
 with Xray and modify by program.
 
 Remember that this service has to be instantiated from the document 
 (ThisComponent), it is not directly accessible.
 
 Although this property is documented as optional, it should be provided by 
 official OpenOffice versions. I found it in various Writer documents, even in 
 a 
 sxw document not modified since year 2002, and in MS-Word documents opened by 
 OOo 3.1.1.
 
 Dim ds As Object
 ds = ThisComponent.createInstance(com.sun.star.text.DocumentSettings)
 xray ds
 
 ds.PrinterIndependentLayout = 
 com.sun.star.document.PrinterIndependentLayout.HIGH_RESOLUTION
 
 HIGH_RESOLUTION sets the flag in Writer  Compatibility  Use printer metrics 
 for document formatting.
 DISABLED and LOW_RESOLUTION both reset the flag.

Where I have my errors: Because this flag is stored inside the document
(settings.xml), I was looking to get a direct access to this property.
I thought, creating a new service is the way to create a new property
but I wasn´t aware, that - loading a document - the presets will be
overwritten by the documents settings - and therefor visible, when
inspecting the DocumentSettings -Service.

Thanks again,
Thomas

-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Searching for a Document Property - Writer

2010-08-08 Thread Thomas Krumbein
Hey Bernard,

Bernard Marcelly schrieb:
 Message de Thomas Krumbein  date 2010-08-04 11:24 :
 Hey,

 By one of my customer we have a problem during migration to OOo 3.2.1:

 The page-layout is different and this is dramaticly because the page
 break in now one line prior - and a lot of document didn´1 work as
 expected.

 Analysing the problem it depend on a different setting in the option menu:
 in tools - options - OOo writer - compatibility the first checkbox (in
 German Druckermaße für Dokumentformatierung verwenden) is not set any
 more.
 Unfortunatly when I open a existing document via macro this checkbox is
 marked - so the information musst be stored anywhere in the document.

 But I do not know where???  Any hints?
 I will try to change the setting per basicmacro after insert such a
 document.

 Thanks in advance,

 Thomas

 Hi Thomas,
 It is more exactly the equivalent check in the printer dialog box, Options...
 
 Dim ds As Object
 ds = ThisComponent.createInstance(com.sun.star.text.DocumentSettings)
 ds.PrintPaperFromSetup = False

Hmm, no - this was the wrong property. I have now checked the
settings.xml and have searched for different values - the searched
property is:
PrinterIndependentLayout
I can set a value using basic as you mentioned - that works.
But: Even using xray I cannot find the property anywhere in the
document. Maybe you have an idea?
Because - before I set this property I would like to check the actual
value - if this property is active (property is optional). But how to du
this???

Best regards
Thomas


-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Searching for a Document Property - Writer

2010-08-08 Thread Thomas Krumbein
Hey Andrew,

Andrew Douglas Pitonyak schrieb:
[..]
 Hmm, no - this was the wrong property. I have now checked the
 settings.xml and have searched for different values - the searched
 property is:
 PrinterIndependentLayout
 I can set a value using basic as you mentioned - that works.
 But: Even using xray I cannot find the property anywhere in the
 document. Maybe you have an idea?
 Because - before I set this property I would like to check the actual
 value - if this property is active (property is optional). But how to du
 this???

 Best regards
 Thomas


 Probably this:
 
 PrinterIndependentLayout
 
 http://api.openoffice.org/docs/common/ref/com/sun/star/document/PrinterIndependentLayout.html
 
 For me, I think that 1 is enabled and 3 is disabled.
 

No, should be disabled(1) and enabled  - equal to high-resulution (3)

I know the API and can set the property - but afterwards I cannot find
this property using basic.
My problem is: we have a lot of documents, created in Versions 2.x and
3.0.1 - when open thm in OOo 3.2.1 the property is sometimes set,
sometimes not. It may depends on creation date and version, but I am not
shure.
So, to repair this, I want to change the property to Hight-resulution
- whitch means (3), but only, if the property is present - typicaly then
set to disabled (1).

But where it is?

Best regards
Thomas

-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



[api-dev] Searching for a Document Property - Writer

2010-08-04 Thread Thomas Krumbein
Hey,

By one of my customer we have a problem during migration to OOo 3.2.1:

The page-layout is different and this is dramaticly because the page
break in now one line prior - and a lot of document didn´1 work as
expected.

Analysing the problem it depend on a different setting in the option menu:
in tools - options - OOo writer - compatibility the first checkbox (in
German Druckermaße für Dokumentformatierung verwenden) is not set any
more.
Unfortunatly when I open a existing document via macro this checkbox is
marked - so the information musst be stored anywhere in the document.

But I do not know where???  Any hints?
I will try to change the setting per basicmacro after insert such a
document.

Thanks in advance,

Thomas

-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] forcing dos line endings on unix

2010-08-04 Thread Thomas Krumbein
Hey Marc,

Marc Santhoff schrieb:
[..]
 I would rather change the macro using another technique, ucb or the
 like, for writing files than tell the users to install something else
 (because my macro program is not able to ...).

I am writing my csv files using ucb. In this case I can even pass the
encoding-type for output file.

So, try this:

oSFA = createUnoService(com.sun.star.ucb.SimpleFileAccess)
oOutputStream = createUnoService(com.sun.star.io.TextOutputStream)

oDatei = oSFA.OpenFileReadWrite(sURL)  'sURL should be the URL of your
csv-file

oOutputStream.SetOutputStream(oDatei.getOutPutStream)

sString = this is your text(first line)...  chr(13)  chr(10)
sString = sString  and now line 2...

oOutputStream.writeString(sString)

'Again add a windows line-feed:
oOutputStream.writeString(chr(13)  chr(10))

'close the file
oOutPutStream.closeOutput()


best regards
Thomas
-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Searching for a Document Property - Writer

2010-08-04 Thread Thomas Krumbein
Bernard Marcelly schrieb:
[..]
 Hi Thomas,
 It is more exactly the equivalent check in the printer dialog box, Options...
 
 Dim ds As Object
 ds = ThisComponent.createInstance(com.sun.star.text.DocumentSettings)
 ds.PrintPaperFromSetup = False

Oh, thanks for this information. I will try it as soon as possibel.

Thank you.

Thomas


-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



[api-dev] Get access to addon_toolbar

2010-07-29 Thread Thomas Krumbein
Hey,

I tried to get access to a toolbar created via addon.xcu of an extension.

Part of my addon.xcu:
..
node oor:name=AddonUI
   node oor:name=OfficeToolBar
node oor:name=MAK017_AL.OfficeToolBar oor:op=replace
   node oor:name=m1 oor:op=replace
...

Trying to access later this toolbar using configuration-manager:

...
aModTB = array(com.sun.star.text.TextDocument)
 oModuleCfgMgrSupplier =
createUnoService(com.sun.star.ui.ModuleUIConfigurationManagerSupplier)
 'xray oModuleCfgMgr
  For i = 0 to uBound(aModTB)  'für jedes Modul

oModuleCfgMgr =
oModuleCfgMgrSupplier.getUIConfigurationManager(aModTB(i) )

if (
oModuleCfgMgr.hasSettings(private:resource/toolbar/addon_MAK017_AL.OfficeToolBar))
then
  oMod = oModuleCfgMgr.getSettings(
private:resource/toolbar/addon_MAK017_AL.OfficeToolBar ,
true).getByIndex(0) 
...

There is no setting in container. The code will work, if the
toolbar-name starts with custom_, but this is only possible if I
create the toolbar via macro.
Is there another way to get access to this addon- toolbar?

Thanks in advance

Thomas



-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Get access to addon_toolbar

2010-07-29 Thread Thomas Krumbein
Hey Carsten,

Carsten Driesner schrieb:
[..]
 Hi Thomas,
 
 There is no way to access an add-on toolbar via the configuration API. 
 These toolbars are not stored in the UI configuration base, but in the 
 Office configuration. They are created on-demand via the Addons.xcu and 
 not by reading a toolbar.xml file. I don't know why you want to change 
 the structure using the UI configuration API. You have access using the 
 Addons.xcu file. Custom toolbars are persistent toolbars where their 
 structure is stored in the soffice.cfg folder. You can still access the 
 toolbar (without structure info) via the LayoutManager and make it 
 visible/invisible, move it around or dock/undock it.

Yes, this is possible, but I want to change the displayed title of a
integrated button in real-time. Thia is possible using a custom-
toolbar and using the ConfigurationManager.
I haven´d found a way to use the layout Manger??

Thomas


-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



[api-dev] How to copy Master-Pages from one to another Impress-Dok?

2010-07-11 Thread Thomas Krumbein
Hey,

I tried to copy some Master-pages from one Impress-Dok to another one
using Basic.

Unfortunatly I do not have any success :-(

What I tried to do:
Becouse i do not find a direct way to copy the Masterpage, I thought
about simulat way as doing it using the UI .
Using the UI it is easy: Select a slide, that used (based on) the wanted
masterpage, - Copy - activate the new presentation - Paste - the
complete slide ist inserted and also the new masterpage.
Now I can delete the inserted slide - the Masterpage ist still remaining.

My fist approch to simulate this workflow looks fine - and works fisrt
time (Im using dispatch-commands uno:copy and uno-paste - changing the
activ Doc etc).

Second step by opening the old presentation via API and try copy
paste - nothing would be transfered.

looking a step deeper the problem was, that typically the main
window-frame (workspace) is activated - to copy a hole slide it is
nessessary to activate the left frame - this one, where you find all the
slides.
Even in UI it is not possible to copy a hole slide, if this frame is not
activate for example per mouse-click.
So I try to activate this left frame, but I cannot identify this
clearly. Using ContainerWindow - accessibleChilds ... I can identify the
Menubar, and some toolbars - but I do not know how to identify this
left frame. Any Hints?

Even this hole process ist really uneffectiv and not nice - maybe
someone knows another approch?

Via UI it is even possible to integrate a hole document (menu - insert
- document) but I cannot find a way to to this via api. Dispatch
command uno:insertDocument needs arguments, but trying with
standard-args as it works by writer-docs - fails:

arg(0).name = Name
arg(0).value = file:///.
arg(1).name = Filter
arg(1).name = impress8

Something missing?

I am working wit OOo 3.2.1 on Windows Vista.

If someone knows a way to import Masterpages from one impress-Dokument
to another (both known by name) using basic please let me know.

Thanks in advance

Thomas

-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



[api-dev] Call Python script in OOo Basic

2010-04-06 Thread Thomas Krumbein
Hey,

in one of my basic-macros I have to call a python script and work
afterwards with the results - i.e. the content of a created textfile.

At the moment I do this using the shell service. But there are two
things, which I do not like:
- when calling the shellservice a console-window will pop in front for a
very short moment.
- the Python script create a text-file, then I read the text file.
Because the Basic-script do not stop on the shellservice call, I have to
use a wait() statemet to be sure, the file is created.

Is there - maybe - another way to call a python script in basic? I have
to call the python script with parameters and - if possible - to get a
flag or something back, so that I now, python script is done.

Best regards
Thomas
-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



[api-dev] Problems with MySQL Connection Sun native Driver

2010-03-30 Thread Thomas Krumbein
Hey,

I do have al lot of problems trying to connect to a MySQL Database via
Sun native driver.
Funny: When I install the driver last week, everything works well, I got
the connection-object and could work with it.
This week - I only get errors.
Even, when I try to connect via UI- just errors.
Today at first I got errors, then could connect via UI by changeing the
IP - so, not use 127.0.0.1 but the static IP-Adress of the PC:

Neverthless - using my code (see below) I always get the following error:
Type:com.sun.star.sdbc.SQLException
Message: Can`t connect to MySQL server on '127.0.0.1' (10013)

Even when I changed the IP on complete different IP-Numbers (existing
and non existing) - the Error-Message is still the same )(with IP
127.0.0.1 - localhost)

My MySQL-Server is working fine, I can connect via MySQL Administrator
and even it works today using the JDBC Driver instead of the nativ driver.

The following code works fine last week - not any more today. Any
suggestions?

function TIMM_getConnection()
  dim oCon as variant  'Connection-Objekt
  dim oDM as variant   'TreiberManager
  dim dbprop(1) as new com.sun.star.beans.PropertyValue

  dbprop(0).name = user
  dbprop(0).value = SWB
  dbprop(1).name = password
  dbprop(1).value = swb

  oDM = createUnoService(com.sun.star.sdbc.DriverManager)

  oCon =
oDM.getConnectionWithInfo(sdbc:mysql:mysqlc://127.0.0.1:3306/timm,
dbprop())
  oCon.setCatalog(timm)
  TIMM_getConnection = oCon
End function

Best regards
Thomas

-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Problems with MySQL Connection Sun native Driver

2010-03-30 Thread Thomas Krumbein
Hey Fernand,

thank you for your answer. Yes, this way works and I try this before,
but I work on a customer extension and this is the badest option. What
I did not understand is why it was working last week but not this week??
And why in any case the error-massage returns localhost (127.0.0.1)?

By the way: inserting data-rows in different tables with forein keys
seems to be a little bit tricky? To get the index (primery key) of the
just inserted row I tried to use select from table
last_inserted_id(), but unfortunatly it does not work.
So I insert first a unigue string in a special field and use afterwards
a select id from table where field='string'
Then I complete the datarow and write afterwards the dependend rows to
other tables - not really perform.
How are you doing this job?

best regards
Thomas

Fernand Vanrie schrieb:
 Thomas ,
 
 To avoid problems like you desribed we nowadays uses  the 
 com.sun.star.sdb.DatabaseContext as a binding point to our MySQL server.
 So we place a OO-DB-document where all OO- users can acces the document 
 with the lowest posible rights ( to avoid unwanted acces to the MySQL 
 Tables)
 The we declare this DB-doc as a database in OO with a stadard name like 
 mysql_native
 For connecting we uses in our macro's:
 
 oDB = CreateUnoService(com.sun.star.sdb.DatabaseContext)
   oConn = 
 oDB.GetByName(mysql_native).GetConnection(username,password)
 
 We change username and password in our macro's (who are scrambled) 
 depending on the aplication needs
 This aproach has also the advantage that you can make MySQL data 
 available in the Beamer (Datasource browser)
 
 Hope it helps


-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] doing getEmbeddedObject() on formulas slows down equation editor

2010-01-21 Thread Thomas Lange - Sun Microsystems

Hi,

Muddybeemer wrote:
 Hello,

 I am writing a Java Plugin that extracts the formula string from all the
 embedded OOOMath objects in a document. I do: 

 XComponent xc = xEOS.getEmbeddedObject() 

 to get the formula string for each formula.  

 The plugin works as expected, except that after the script operates on a
 document with many formulas, it then takes MUCH longer than usual to
 open one of these formulas in the equation editor, which is very
 inconvenient.  I have narrowed the problem down to the
 xEOS.getEmbeddedObject() statement. 

 I thought it might be a reference problem, so I tried xc.dispose(), but
 this does not help.  Am I not handling the xComponent correctly?

 Any help would be appreciated. 

 I'm running Java 1.6.0_15 and Openoffice 3.1 in Ubuntu.

 Regards,

 Toby
   

Well I don't know whats 'much longer than usual' ...
But with the Basic Macro below I extracted the content of 700 Formulas
in about 15 sec.
(Don't know if that is specifically slow or not though.)

oDoc = ThisComponent
oObjects = oDoc.getEmbeddedObjects()

aText = 
n = oObjects.getCount()
for i = 0 to n-1
oObj = oObjects.getByIndex(i).getEmbeddedObject()
if (oObj.supportsService(com.sun.star.formula.FormulaProperties)) then
aText = aText + CHR$(13) + CHR$(10) + oObj.Formula
end if
next i
msgbox aText


Regards,
Thomas



-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



[api-dev] Logging slide number in Presentation

2009-11-04 Thread Thomas Pietrzak
Hi,

I'm new to this API and I have to code (in Java) a simple events logger
in presentation, like slide change, etc.

As far as I understood I have to make an Add-On. I use Netbeans, and I
generated a template code. Now I need a access to the
XSlideshowController object in order to get the page number.

So how can I access this XSlideShowController?

Do you think there is a better (simpler) way to do that?

Is there any SlideChange callback somewhere?

---
Tom



signature.asc
Description: OpenPGP digital signature


Re: [api-dev] source code of open office

2009-10-21 Thread Thomas Lange - Sun Germany - ham02 - Hamburg

Hi,

Santhosh Ejanthkar wrote:
 HI,

i am trying to extend developing of open office in android application.
 can u let me from where i should i download the source code of the open
 office.
  i ve explored the site of the open office but not able to download it. any
 help.
   
Usually you would need to install subversion and get access with that.
See http://wiki.services.openoffice.org/wiki/Setting_up_Subversion_Access

Thomas




-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Asking for help to develop a extensions for the Open office

2009-09-18 Thread Thomas Lange - Sun Germany - ham02 - Hamburg

Hi udana,

udana chathuranga wrote:
 I am a university student who follow a computer degree.I have to do a
 project about any open source software.So I am interesting in doing a
 project with open office .I will be grateful if you can suggest me,what I
 can add to your open office software.

   
Well, that would largely depend upon the time frame available on your side.
How many weeks it should take at most? And how many hours per week are
you planning to work on it?

Regards,
Thomas





-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Page Style for a Dictionary

2009-09-03 Thread Thomas Lange - Sun Germany - ham02 - Hamburg

Hi Jonathan,

Jonathan Kaye wrote:
 Hi all,
 I posted this several days ago on comp.openoffice.questions and haven't 
 received anything I can use to solve the problem. Any ideas out there?

 This may be a tricky one. I am helping to produce a dictionary and things 
 are nearing completion thanks to the outstanding support from the Openoffice 
 groups. 
 I've got an .odt file laid out exactly as it should be. Entries are in 
 paragraph form using the hanging indent style. The only hard line breaks are 
 to separate one entry from another.

 I need to create a unique header for each page. On the header we should see 
 the first 3 characters of the first entry on the page and then the first 3 
 characters of the last entry on the page. Note that these are usually not 
 the first and last lines, respectively since entries may run over (soft) 
 page breaks; there are no hard page breaks in the document. I think I know 
 how to left/right justify the 1st and last entry characters (using left and 
 right tabs) but how do I get this into a header? It seems to be that 
 creating a page style is the way to go. I don't think there's a way to find 
 soft page breaks using a regular expression.

 What I want to know is does such a page style for dictionaries already 
 exist? I don't want to reinvent the wheel here. If so, a link would be 
 greatly appreciated. I've looked fairly hard for one but come up empty. If, 
 indeed, none exist, then any hints about to create the page style (if that's 
 the best way to do it) would be greatly appreciated. I'm using OOo3.1.
   

I have asked around, and no we have no means of creating such a page
style. Also no one could think off different means to produce a similar
effect.
Thus I'm afraid you are the first one who ever had told us about such
need. :-(

The only reasonable choice you have is to file a feature request about
this, and hopefully it gets supported in the future. I do believe that
this is really a very reasonable request.

Do you know if it is possible in competitive products?
If so you should also state this in the feature request as well!
Compatibility issues are usually always getting some more attention than
other non-fatal issues.


Regards,
Thomas



-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Problems with clearContents in OO 3.1 (XP and W2K)

2009-06-05 Thread Thomas Krumbein
Hey Bart,

Bart Aimar schrieb:
 The classic method clearContents seems not work properly in OO 3.1 
 under windows XP and W2k.

Works well under Vista and OOo 3.1 :-)


 Here a simple test:
 
 http://aimar.mrjive.it/node/61
 

Regards
Thomas

## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] open office math objects

2009-03-09 Thread Thomas Lange - Sun Germany - ham02 - Hamburg

Hi,


 is there a way how to access math objects available in open office using
 java?
 
 i am trying to make an addon for open office which will enable users to
 insert equations without using OO.o Math. 
 
 Here's how it should work: there will be a button in the toolbar and when it
 is clicked, a WYSIWYG editor would popup and the user would just have to
 click buttons to insert math objects and make their own equations. when
 they're done, they should be able to insert the equation that they made in
 the document.
 
 is that even possible?
 
 i am using OpenOffice 2.4, java, netbeans 6.5.

See http://www.oooforum.org/forum/viewtopic.phtml?t=31265highlight=

Thomas


-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



[api-dev] Need Help on global event listener

2009-02-16 Thread Thomas Krumbein
Hey,

I need some help in using a global event listener.

What I want to do:
Insert a writer-Document at a spezific position of another open writer
Document.
OK, inserting and so is not a üroblem, that works fine. But I want to
open the document, with will be inserted, by double-click in
file-explorer or via web-interface (Browser)
My idea is to store the last used writer-instance in a global variable,
check, if the new open document is one to insert (special name in
Doc-Info), and - if it matched - close the document and insert it.

So I register a GlobalEventListener and check, if the document onFocus
is a writer-instance. If yes, I stored it in a variable, if it is still
stored, I do nothing.
If I open a new document, this get the focus, I check the name, if it is
a matched Document, fine, then I want to insert it.
Unfortuantly this is the end of my OOo-Instance - it goes away -
everything...

I cannot really find the problem, maybe someone can give me a hint?

My code (in parts):
**
global gel as object   'GobalEventBroadaster Service
global oListener as object


Sub StartListenerTest

  gel = createUnoService(com.sun.star.frame.GlobalEventBroadcaster)
  oListener = CreateUnoListener(
DocumentListener_,com.sun.star.document.XEventListener )

  gel.addEventListener( oListener)

End Sub



Sub DocumentListener_notifyEvent( o as object )

on error goto ende
if o.EventName = OnFocus then

   if thisComponent.supportsService(com.sun.star.text.TextDocument) then

'   do something
oDoc = thisComponent
' Pos1
' bring another instane of an open Writer-Document in forground

oWriterAkt.getCurrentController().frame.ContainerWindow.setFocus()
' insert a Document in this Document on ViewCursor Position
 '  ...


'  close actual Document
oDoc.close(true)
' Pos2

  end if
end if
ende:
end sub
***

I tried to remove the Listener at pos1 ( sel.removeEventListener(
oListener) ) and afterwards register it again at Pos2 - no effect.

The hole system is very instable - even if I remove the oDoc.close()
line. I don't know, what to do


Thanks in advance

Thomas



-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



[api-dev] Mergepoints for Extension

2008-11-17 Thread Thomas Krumbein
Hey,

I want to add with an extension an own menu-item to a existing submenu
in calc.

I know the technic, but I do not now the correct mergepoints. Maybe
someone can help?

OK, my proposal is to add an item in the data-menu, submenu datapilot,
after the item delete.

I only have a german version, so the correct names are:  Daten -
Datenpilot - löschen

Now I am looking for the three mergingpoints:

1:   uno:dataMenu  
2.   ???
3.   ???

Thnaks for your help

Thomas

-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

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



Re: [api-dev] Problems with an addon

2008-09-16 Thread thomas
Hi,

try to use Netbeans6 and the OpenOffice Plugin. Then you have a working
example.

Tom

On Di, 2008-09-16 at 16:26 +0200, Joel Cordeiro wrote:
 Hi,
 
 i'm having some problems implementing a addon for the open office. I
 wish to add some menu entries to the context menu. At this time i'm
 just trying to run the example gived on the developers guide. I put
 the code in a jar, with an ant build gived too in the same guide, and
 added to the extension manager, but nothing happens. Could anyone tell
 me the main steps to do something like that?
 
 The Ant i'm using is the one at the page 37 of the Developers Guide.
 The example code for add menu entries to the context menu, i'm using
 is the one at the page 320 of the developers guide.
 I put in attach the jar i got.
 
 Could anyone help me?
 
 Best regards,
 Joel Filipe Antunes Cordeiro
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 
 -
 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] How to write Helpfiles (.xhp) for OpenOffice

2008-09-06 Thread thomas
Hi all,

i want to write some Helpfiles for my OOCalc Addins.
A good start point is
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Help_Content
 and there is a link to 
http://documentation.openoffice.org/online_help/OOo2HelpAuthoring.pdf where 
should be a description for the .xhp File Format. But the link does not work 
for me.
Is there any other good Documentation about the Helpfile Format?

Best regards,

Tom


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



Re: [api-dev] How to write Helpfiles (.xhp) for OpenOffice [SOLVED]

2008-09-06 Thread thomas
hi,

i found the document under
http://documentation.openoffice.org/online_help/helpers/helpauthoring/guide/OOo2HelpAuthoring.pdf

I also changed the broken link in the Wiki.

Tom


On Sa, 2008-09-06 at 19:29 -0400, thomas wrote:
 Hi all,
 
 i want to write some Helpfiles for my OOCalc Addins.
 A good start point is
 http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Help_Content
  and there is a link to 
 http://documentation.openoffice.org/online_help/OOo2HelpAuthoring.pdf where 
 should be a description for the .xhp File Format. But the link does not work 
 for me.
 Is there any other good Documentation about the Helpfile Format?
 
 Best regards,
 
 Tom
 
 
 -
 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] Helpfile doesn't work

2008-09-06 Thread thomas
Hi all,

i try to use a Helpfile (.xhp) with a OO-Calc-Addin.

The Helpfile looks like:

##

?xml version=1.0 encoding=UTF-8?
helpdocument version=1.0
meta
topic id=textcalcpv indexer=include status=PUBLISH
title id=title xml-lang=delibRESys - Photovoltaik/title
filenamede.solarstrike.pv.oocalc.helpfile.xhp/filename
/topic
/meta
body
bookmark xml-lang=de branch=index
id=bm_pvbookmark_valuelibRESys/bookmark_value/bookmark
paragraph role=heading id=hd_id314879712 xml-lang=de level=1
l10n=UHeading blub/paragraph
paragraph role=paragraph id=par_id315259723 xml-lang=de
l10n=CHGVorausgesetzt, Sie haben die Zeilen- und Spaltenkoordinaten
eingegeben, ordnet $[officename] Calc Namen und Bereiche automatisch
einander zu. Siehe die folgende Abbildung:/paragraph
/body
/helpdocument

##

When i start the OpenOffice Help (with F1), i can see the Entry
libRESys, so the Helpfile works. But i can't see the Paragraphs and i
don't know why. My Help for the Entry libRESys is just empty.
Can anybody help?

Cheers,

Tom


OpenOffice 2.4.1 , Ubuntu 8.10 , Kernel 2.6.27


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



Re: [api-dev] Api for enterprise dictionaries available?

2008-08-25 Thread Thomas Lange - Sun Germany - ham02 - Hamburg

Hi all,

Juergen Schmidt wrote:
 Hi Per,

 i would say it is possible but i am no expert in this area and probably 
   Thomas Lange can provide some more details.

 The integration is done via UNO interfaces and it is possible to provide 
 an own implementation for them.

 Juergen


 Per Eriksson wrote:
  Hi,
  
  Can dictionary technology companies integrate their proprietary data in 
  an extension NOT using the Hunspell technology, but writing their own 
  engine?
  
  Companies having dictionary data and wanting to develop solutions for 
  OpenOffice.org might not be able to transform it into Hunspell data.
  
  Thanks a lot for your help,
  
   

First let's assume that there is the usual confusion about dictionaries
and spell checkers, including user dictionaries.

I assume
- that you don't want to write a dictionary for the existing Hunspell
spell checker
- and that you don't want to just add one or more user-dictionaries


Provided the above, what you want to do is to implement a spell checker
on your own!

For that there is a documentation which was already used to create the
first OOo spell checker:
http://sw.openoffice.org/drafts/linguistic_howto.html#1.SpellcheckerimplementationHOWTO|outline

And that can as well be done in an extension.
The sample code however makes use of some libraries that can no be used
with extensions. But the differences should not be too troublesome.


Also for OOo 3.01 we are working on integration for grammar checking (or
better called proof reading) within the Writer application.
That API is already functional but the framework still misses some
implementations.
Thus sentence based checking will be available as well.
However that API is not yet finalized and may undergo minor changes in
the future. Thus it will be possible to make use of it but if API
changes are happening you would be required to update your extension.


Regards,
Thomas








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



Re: [api-dev] Api for enterprise dictionaries available?

2008-08-25 Thread Thomas Lange - Sun Germany - ham02 - Hamburg

Hi again,

Just one more thing the API can be viewed here:
http://api.openoffice.org/docs/common/ref/com/sun/star/linguistic2/module-ix.html

The files related to grammar checking however are at best scarcely
commented right now.

Also if you have some reasonable requests for changes/improvements to
the API we will have an open ear for those.


Regards,
Thomas

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



Re: [api-dev] Howto create CalcAddin and then a .oxt File?

2008-08-22 Thread Thomas
Hi Juergen,

i already wrote a Bugreport (see
http://www.openoffice.org/issues/show_bug.cgi?id=92911 ) for the problem
with netbeans. I hope this will be fixed soon. But i can't wait for the
fix and have to write the plugin, so i want to do it without the help of
netbeans. 
I will try to use GNU make and hope i will understand.

Thanks  best regards,

Tom


Am Freitag, den 22.08.2008, 13:25 +0200 schrieb Juergen Schmidt:
 Hi Thomas,
 
 it is more interesting why the plugin doesn't work anymore.
 
 - on which platform do you work?
 - which version of the plugin do you use?
 - which office version do you use?
 - which SDK version do you use?
 
 Related to your question, check the SDK add-in example to see how you 
 can build an oxt package with gnu make. Maybe it's easier for you to 
 understand the necessary steps as to read the ant scripts in NetBeans.
 
 And of course read the appropriate chapter in the DevGuide where you can 
 find all the info about the package descriptor file description.xml. 
 Maybe start with 
 http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Checklist_for_Writing_Extensions
 
 Juergen
 
 
 Thomas wrote:
  Hi all,
  
  i developed already some Calc-Addins with Java and Netbeans and the
  OO-Netbeans-Plugin. Now i want to know the steps what i have to do to
  develop a Addin without Netbeans because the OO-Netbeans-Plugin doesn't
  work any longer (i already send a bug report).
  I already have:
  1) a working plugin (CentralRegistrationClass.java,
  OOCalcAddin_Solar.java, XOOCalcAddin_Solar.java,
  OOCalcAddin_SolarImpl.java, CalcAddins.xcu, description.xml)
  2) i can compile the idl-files to urd-files
  3) i can merge the urd files to types.rdb
  4) i can use javamaker to create the java classes
  
  My question ist, what i should do next? At the end, i want to have a
  working package (.oxt) which i can install with the Extension Manager.
  
  
  Best regards,
  
  Tom
  
  
  
  -
  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]
 


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



Re: [api-dev] Interface XPrinterServer

2008-08-21 Thread Thomas Krumbein
Hey Carsten,

Carsten Driesner schrieb:

 I just found the Interface com.sun.star.awt.XPrinterServer which
 provides a method getPrinterNames.

 But: which service supports this Interface? I cannot find one?

 Can somebody give me an advice?

 com.sun.star.awt.PrinterServer

Ahh, thank you. But it is still not ready, isn't it?

I can create an service css.awt.PrinterServer, but using xray there is
nearly nothing in.

And calling the method getPrinterNames() say: No such method.

Best regards
Thomas


-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

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



Re: [api-dev] Interface XPrinterServer

2008-08-21 Thread Thomas Krumbein
Hey Fernand,

Fernand Vanrie schrieb:
[..]
 Thomas, find this really  old topic on the forum 
 http://www.oooforum.org/forum/viewtopic.phtml?t=5228

Ahh, sorry, your are right ...

I know a lot of these old topics regarding getting list of printers -
not special this one - but I cheched all the other ones...
Then I looked through the IDL - maybe there is something new - and find
this Interface. I never recognise this before so I thought, it was new :-(

OK, my fauld, sorry again...

Thomas

-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

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



[api-dev] Howto create CalcAddin and then a .oxt File?

2008-08-21 Thread Thomas
Hi all,

i developed already some Calc-Addins with Java and Netbeans and the
OO-Netbeans-Plugin. Now i want to know the steps what i have to do to
develop a Addin without Netbeans because the OO-Netbeans-Plugin doesn't
work any longer (i already send a bug report).
I already have:
1) a working plugin (CentralRegistrationClass.java,
OOCalcAddin_Solar.java, XOOCalcAddin_Solar.java,
OOCalcAddin_SolarImpl.java, CalcAddins.xcu, description.xml)
2) i can compile the idl-files to urd-files
3) i can merge the urd files to types.rdb
4) i can use javamaker to create the java classes

My question ist, what i should do next? At the end, i want to have a
working package (.oxt) which i can install with the Extension Manager.


Best regards,

Tom



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



[api-dev] Error while writing a OOCalc-Addin with Java

2008-08-20 Thread Thomas
hi,

i write a OOCalc Addin with Java and got the following error when i want
to create the java-classes with javamaker:

 [EMAIL PROTECTED]:~$ javamaker  -nD -Gc -BUCR -O ./build/classes/
build/idl/rdb/types.rdb 
/usr/lib/openoffice/sdk/linux/bin/javamaker.bin ERROR: Bad type
information: com/sun/star/uno/XComponentContext

I don't know what to do now. I didn't find something about this error in
the net.

The file types.rdb looks like this (checked with regview):

-
/
 / UCR
   / de
 / solarstrike
   / thermal
 / oocalc
   / XOOCalcAddin_Thermal
 Value: Type = RG_VALUETYPE_BINARY
Size = 325
Data = version: 1
   documentation: 
   file name: 
   type class: interface
   type name:
de/solarstrike/thermal/oocalc/XOOCalcAddin_Thermal
   super type count: 1
   super type name 0:
com/sun/star/uno/XInterface
   field count: 0
   method count: 1
   method 0:
   documentation: 
   flags: synchronous
   name: function1
   return type name: long
   parameter count: 1
   parameter 0:
   flags: in
   name: parameter0
   type name: long
   exception count: 0
   reference count: 1
   reference 0:
   documentation: used to set an add-in
locale for formatting reasons for example
   flags: optional
   sort: supports
   type name:
com/sun/star/lang/XLocalizable

   Value: Type = RG_VALUETYPE_BINARY
  Size = 72
  Data = version: 0
 documentation: 
 file name: 
 type class: module
 type name: de/solarstrike/thermal/oocalc
 super type count: 0
 field count: 0
 method count: 0
 reference count: 0

   / OOCalcAddin_Thermal
 Value: Type = RG_VALUETYPE_BINARY
Size = 180
Data = version: 1
   documentation: 
   file name: 
   type class: service
   type name:
de/solarstrike/thermal/oocalc/OOCalcAddin_Thermal
   super type count: 1
   super type name 0:
de/solarstrike/thermal/oocalc/XOOCalcAddin_Thermal
   field count: 0
   method count: 1
   method 0:
   documentation: 
   flags: synchronous
   name: 
   return type name: void
   parameter count: 0
   exception count: 0
   reference count: 0

 Value: Type = RG_VALUETYPE_BINARY
Size = 65
Data = version: 0
   documentation: 
   file name: 
   type class: module
   type name: de/solarstrike/thermal
   super type count: 0
   field count: 0
   method count: 0
   reference count: 0

   Value: Type = RG_VALUETYPE_BINARY
  Size = 57
  Data = version: 0
 documentation: 
 file name: 
 type class: module
 type name: de/solarstrike
 super type count: 0
 field count: 0
 method count: 0
 reference count: 0

 Value: Type = RG_VALUETYPE_BINARY
Size = 45
Data = version: 0
   documentation: 
   file name: 
   type class: module
   type name: de
   super type count: 0
   field count: 0
   method count: 0
   reference count: 0
-

Any ideas what the problem could be? Or do you need more information?
I use ubuntu 8.04, Openoffice 2.4 and java6. I created already some
other Addins with netbeans6 and this addins work well. I don't know why
this one isn't 

[api-dev] Interface XPrinterServer

2008-08-20 Thread Thomas Krumbein
Hey,

I just found the Interface com.sun.star.awt.XPrinterServer which
provides a method getPrinterNames.

But: which service supports this Interface? I cannot find one?

Can somebody give me an advice?

Thanks

Thomas


-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

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



Re: [api-dev] Implementing UNO service as singleton

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

Hi Marcin,

Maybe this link will be helpfull:
  http://www.javacoffeebreak.com/articles/designpatterns/index.html
To me it looks as if it covers all related problems.

Other similar link
http://www.javaworld.com/javaworld/jw-04-2003/jw-0425-designpatterns.html
http://www.javaworld.com/javaworld/jw-04-2003/jw-0425-designpatterns.html?page=2

At a quick glance at them I also noted the topic of sharing only one
instance between different JVM or processes. Maybe you like to check
that out as well.


Thomas



 Hi,
 
 I'm implementing a class that implements a known OOo service (actually, 
 several ones, but the important one is XGrammarChecker). The problem is 
 that the class is instantiated many times in OOo whenever a UI item is 
 used, and the instances created do not share data.
 
 So I think I should guarantee that the service is instantiated only once 
 per OOo instance. As far as I understand, I need to make a singleton 
 class for this purpose. The docs (if one can call it docs) refer to 
 writing an IDL spec which is not useful for implementing a known UNO 
 service, so I think in this case writing IDL is completely superfluous. 
 All I want from the class is that it's created only once per JVM in OOo 
 (the code is in Java). What should I do to make my class a one-instance 
 class? Is it enough to add some registry code to __writeRegistryServiceInfo?
 
 You can find the whole code in our CVS repo:
 
 http://languagetool.cvs.sourceforge.net/languagetool/JLanguageTool/src/java/de/danielnaber/languagetool/openoffice/Main.java?view=markup
 
 Anyway, if there is a better or easier way to share implementation data 
 of multiple instances, I could use it as well but I think that for 
 performance purposes, it's wise to have only a single instance of my 
 service - it's a grammar checker that will be run in the background 
 thread in Writer, and instantiating the class is somewhat costly.
 
 Thanks for your advice, and best regards,
 Marcin
 
 -
 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] How to use com.sun.star.ui.dialogs.FolderPicker such that it works as documented ?

2008-06-14 Thread Thomas Krumbein
Hi rony,

Rony G. Flatscher schrieb:
[..]
 Platform is Windows XP SP 3.
 
[..]
 However, this does not work at all. Tried all variations (system file 
 path, URL, with and without trailing slash, feeding the directory path 
 exactly like the service returns it).

It is a bug of Windows - i guess, you use the windows own dialogs?

Change to OpenOffice.org own dialogs (Extras - options - OOo - general)
and it will work :-)

 Actually, using setDisplayDirectory() works, as a 
 getDisplayDirectory() thereafter will return the set directory. 
 However, the dialog does not pick that directory but displays the root.

It is set correct, but Windows could not use it :-(

 Haven't found an issue on this so I am wondering whether someone knows 
 what one is supposed to do beyond what the documentation says?

No issue, because not a problem of OpenOffice.org.

best regards
Thomas


-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

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



[api-dev] Problems with insertDocument

2007-11-23 Thread Thomas Krumbein
Hey,

I do have some strange problems using insertDocument. Maybe someone can
give me some advise?

Situation:
I do have two writer Documents (lets call them MasterDoc and Doc2).
In all documents my Standard charFont ist Arial, the properties of OOo
even shows Arial as a standard font for all selections.

Now, I am using insertDocumentFromURL() to insert Doc2 in my
MasterDocument. It works fine - but afterwards the Paragraph-style
Standard of my MasterDoc is changes and charFont is now Times New
Roman

Therefor the hole formating of the document looks real strange.

By the way - the same happend, when I insert the doc via Gui.

OK, I can change the CharFontName of the Paragraph style back to Arial
after inserting the document - but all Paragraph styles, who are not
based on Standard are still in Times New Roman.
I tried to find the reason (I never use Times New Roman) or a property
to fix it - I find nothing and do not really have more ideas.

Additional information: All documents are converted MS Word documents -
so I am afraid, there is still some information left - but how can I get
it out?

Thanks

Thomas

-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

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



Re: [api-dev] Print Property in Calc: Only selected sheets

2007-11-16 Thread Thomas Krumbein
Niklas Nebel schrieb:
 Thomas Krumbein wrote:
 Using print-areas for selected part of different sheets setting by basic
   is still working, unfortunatly the new property Print only selected
 sheets stopps the printing prozess, if set.

 I cannot find this property to change by basic makro. Can someone give
 me a hint?

 because it is still a very usefull property for users, I like to change
 the value to Print all, then print all my print-areas and restore the
 property aferwards.
 
 It's property PrintAllSheets in com.sun.star.sheet.GlobalSheetSettings.

Thank you :-)

Greetings

Thomas


-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

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



[api-dev] Print Property in Calc: Only selected sheets

2007-11-16 Thread Thomas Krumbein
Hey,

Using print-areas for selected part of different sheets setting by basic
  is still working, unfortunatly the new property Print only selected
sheets stopps the printing prozess, if set.

I cannot find this property to change by basic makro. Can someone give
me a hint?

because it is still a very usefull property for users, I like to change
the value to Print all, then print all my print-areas and restore the
property aferwards.

Thanks

Thomas
-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

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



[api-dev] Code-Highlighting in Basic IDE

2007-10-30 Thread Thomas Krumbein
Hey,

I am working on an extention for easy code-dokumentation. Therefor I
want to import code (from basic-bibliotheks) to a writer document -
adding some spezial informations like line-numbers and so on.
OK, technical no problem, but inside the Basic-IDE we have nice
code-highlighting which I would like to add.

There should be some code inside OOo, which identifies keywords,
strings, comments and so on. Is it possible to use this code-fragments
from UNO?

Can somebody give me some hints, where I can find some more informations
- or some code-snipplets?

Thanks in advance

Thomas


-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

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



Re: [api-dev] Code-Highlighting in Basic IDE

2007-10-30 Thread Thomas Krumbein
Hi Ariel, hi Malte,

thank you for the information.

Ariel Constenla-Haile schrieb:
[..]
 See Andrew Pitonyak's Macro Document at 
 http://www.pitonyak.org/AndrewMacro.odt
 
 chap. 9 Formatting macros containg macros to format Basic code just 
 like the IDE does.

OK, this is a fine start - and helps me really.

Best regards

Thomas

-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

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



Re: [api-dev] NodePath-name for LanguageSettings

2007-09-05 Thread Thomas Lange - Sun Germany - ham02 - Hamburg
Hello Fernand,

 the my code is now somthing like:
 
 Sub ChangeSystemLanguage
 dim aArgs(0) as  Object
 dim aPropValue as new  com.sun.star.beans.PropertyValue
 
 xconfig = 
 createunoservice(com.sun.star.configuration.ConfigurationProvider)
 aPropValue.Name = nodepath
 aPropValue.Value = org.openoffice.Office.Linguistic
 aArgs(0) = aPropValue
 
 
 xAccess = 
 xconfig.createinstanceWithArguments(com.sun.star.configuration.ConfigurationUpdateAccess,aArgs())
 
  slocale = xAccess.General.defaultLocale
  sLocale = nl-BE
  xAccess.General.defaultLocale = slocale
  xAccess.commitchanges
 End Sub
 
 but how can i reset the for current document only setting
 
 i must looked over it, can simply not find this setting in the xaccess 
 object structure
 
 maybe you can help me out ?

A little experiment showed that the value for current document only is
not persistent when restarting the Office. Thus it is most likely that
there is no respective setting in the configuration, and therefore you
can't change it's value via API.

Thomas

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



Re: [api-dev] NodePath-name for LanguageSettings

2007-09-04 Thread Thomas Lange - Sun Germany - ham02 - Hamburg

Hello Fernand,

Should be sth. like org.openoffice.Office.Linguistic.
See share\registry\data\org\openoffice\Office\Linguistic.xcu

Thomas


 For changing the 'use of systemdialogs i found somewher the correct 
 name of the Nodpath
  and used in basic coding like:
 
 xconfig = 
 createunoservice(com.sun.star.configuration.ConfigurationProvider)
 aPropValue.Name = nodepath
 aPropValue.Value = org.openoffice.Office.Common/Misc
 aArgs(0) = aPropValue
 
 wher can i find the nodepath-name for changing the LanguagesStettings 
 in OO
 
 
 thanks for any hint
 
 Fernand
 
 -
 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] Is there an example for packaging macros as an extension somewhere ?

2007-07-08 Thread Thomas Krumbein
Hey Rony,

Rony G. Flatscher schrieb:
 Hi there,
 
 looking for an example package that shows how one needs to package a set
 of macros (and maybe a customized toolbar to present and start those
 macros)  such that one can use the Extension manager to deploy them (or
 unopkg for that matter).
 
 Is there any nutshell example available or does anyone have hints where
 one could find information about this?

Try this fine tool for packaging an extenion :-)

http://wiki.services.openoffice.org/wiki/Extensions_Packager

More Examples for extenions you find here:

http://wiki.services.openoffice.org/wiki/Extensions_repository

Regards

Thomas



-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

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



Re: [api-dev] Remove rendered graphics from dialogs

2007-04-16 Thread Thomas Krumbein
Hey Fernand,

Fernand Vanrie schrieb:
[..]
 /i struggeld also long time to solve this problem
 then a clever gui on the forum who learned us to use a peer dow to 
 render a graphic, found also the solution: invalidate  the window
 for invalidating there are several way's depending on what part of the 
 window hes to been refresched .OO uses rheir famous constants for it (I 
 uses 2 ) who works fine
 
 gives you dialog a unique name as dialog1   and uses thisi code:
 
 oWin =GetWindowOpen(Dialog1)  'the titel of the dialog must be 
 Dialog1'
   oWin.invalidate(2)  ' 2 works fine but there are other constants ans 
 combinations posibla

I try this - but nothig happend :-(
Then I changed a little bit the constant 2 and when I use 1 it works
fine :-)

So thank you for this code, now my project works as expected. Now i try
to learn, what invalidate() means and haw it works.

Again - thank you for your help :-)

regards
Thomas

-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

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



[api-dev] Remove rendered graphics from dialogs

2007-04-15 Thread Thomas Krumbein
Hey,

I am working on a project, in which I display embedded graphics of a
writer-document in a dialog.

With some help of this list (spezial thanks to Fernand ;-) ) I can now
show the embedded graphics dirct on the dialog.

I use for this the following code:

REM URL des Bildes auslesen
oBild = oDoc.getGraphicObjects().getByName(sName)
sBildURL = Mid(oBild.GraphicURL, 28, len(oBild.GraphicURL))
REM Bild aus Datei als Objekt laden
for i = 0 to uBound(aBildNamen())
if InStr(1, aBildNamen(i), sBildURL, 0) then
oVorschauGrafik =
getGraphFromStream(oPictures.getByName(aBildNamen(i)).getInputStream())
exit For
end if
next
REM Porportionfaktor Laden
nProp =
oVorschauGrafik.sizepixel.width/oVorschauGrafik.sizepixel.height  '  1
= Hochkant, 1 -Querformat, = 1 Quadrat

'   oRenderer = createUnoService(com.sun.star.graphic.GraphicRendererVCL)
Dim sRect as new com.sun.star.awt.Rectangle
sRect.X = 335
sRect.Y = 40
sRect.Width = 150
sRect.Height = 150
if nProp  1 then   'Hochkant
  sRect.Width = 150 * nProp
  sRect.X = 335 + (150 - sRect.Width)/2
elseif nProp  1 then  'Querformat
sRect.Height = 150 / nProp
sRect.Y = 40 + (150 - sRect.Height)/2
end if

oPaintListener = CreateUnoListener(MyDialog_,
com.sun.star.awt.XPaintListener)

oDlg.Peer.addPaintListener( oPaintListener )

oRenderer.Device = oDlg.Peer.createGraphics.Device
oRenderer.DestinationRect = sRect
oRenderer.render(oVorschauGrafik)

The renderer is defined in a seperat Part of the macro:

oRenderer = createUnoService(com.sun.star.graphic.GraphicRendererVCL)


The Problem is now, that I use the same part of the dialog to show
selected graphics. That is no problem, when all graphics have the same
size and do not have transparent Pixels. The renderer will change the
used Pixels.

But it is a problem, when I read a smaler graphic - or a transparent
gif-graphic - then you will see the prior graphic on not used pixels of
the rectangular area.

So my question: How can I remove the rendered graphic from diolog? Or is
there a posbility, to overwirte the whole area with the
background-pixelcolour?

Thanks or your help

Thomas


-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

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



[api-dev] Question to Thread [ ImageURL in a UnoControlImageControlModel]

2007-04-11 Thread Thomas Krumbein
Hey guys,

I tried to solve a very similar problem as discribed in a thread showing
in mid of march, title: ImageURL in a UnoControlImageControlModel
author: Fernand Vanrie [EMAIL PROTECTED]

Fernand wrote, he has a solution and it works fine, but unfortuantly I
cannot get it to work.

Short indroduction: I want to show in a dialog (ImageControl) embeded
graphic-objects (Bitmaps) of an word-document. The solution of Fernand was:

 sub Render
 oDialogControl = createUnoService( com.sun.star.awt.UnoControlDialog )
 oRenderer = createUnoService(com.sun.star.graphic.GraphicRendererVCL)
 Dim sRect as new com.sun.star.awt.Rectangle
 sRect.X = 0
 sRect.Y = 0
 sRect.Width = 800
 sRect.Height = 600 
 oRenderer.setPropertyValue(DestinationRect, sRect)
 'the renderer shall paint to the dialog window
 xray odialog
 oDialogControl = Odialog
 oRenderer.setPropertyValue(Device, 
 oDialogControl.Peer.createGraphics.Device)
 
 aArgs(0).Name  = GraphicRenderer
 aArgs(0).Value = oRenderer
 
 xExporter = createUnoService( com.sun.star.drawing.GraphicExportFilter )
 xray odocument.drawpage
 xExporter.setSourceDocument( odocument.drawpage.getbyindex(5))
 
 oPaintListener = CreateUnoListener(MyDialog_, 
 com.sun.star.awt.XPaintListener)
 
 oDialogControl.Peer.addPaintListener( oPaintListener )
 
 odialog.execute
  
 
 'oDoc.close(true)
 end sub
 
 
 sub MyDialog_windowPaint(oEvt)
 if oEvt.count  0 then exit sub
 orenderer.render(oPreviewGraph)
 end sub
 
 sub MyDialog_disposing(oEvt As Object)
 end sub

But I think, this is only a part of his code. I did not get it to work.
I know the original code out of the forum - but even this did not work.
As I understand - maybe Fernand can help? - the xExporter object is
not used here?
What is oPreviewGraph? An Inputstream? a graficObject - and how did
you get it?
I get an error at this point - and it stopps in a endless loop, only to
stop by killing the task - not really productiv for learning.

So, is it possible to get the whole code so that I can understand how
its work?

Or can someone else give me a shot help how to show embedded Graphics
easy in a dialogs-control?

My solution at the time is to export the graphic to an external file and
then use the URL proberty to import the graphic to the Control. It
works, but I think, there must be an easier way.

Many thanks for your help

best regards
Thomas


-- 
## Marketing deutschsprachiges Projekt
## http://de.openoffice.org  - www.openoffice.org
## Vorstand OpenOffice.org Deutschland e.V.
## Mitglieder willkommen: www.OOoDeV.org

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



[api-dev] How to insert a Basic macro into a document by using UNO API

2006-12-08 Thread Thomas Benisch

Jinhong Zou wrote:
 There are some trouble with me in the use of open office. I have no
 idea except to ask for help from you.

 I want to insert some Macro to the document  with the OpenOffice
 API,but I have not found any way could do this  successful.

 In my mind , to insert Star Basic code to the  .odt file with
 OpenOffice API is feasible . Is that right?

 If possible,could you give me some simple example for show me how to
 accomplish this function?

 Or give some advise for  me to found the answer,thank you !

 Please forgive my pool english ~~

 good luck ~

 



 Mars Zou

If you want to insert an OpenOffice.org Basic macro into a document, the
com.sun.star.script.XLibraryContainer API is your friend.
For more details please have a look at section 11.4.2
(Accessing Libraries from Basic) of the developers guide
(http://api.openoffice.org/DevelopersGuide/DevelopersGuide.html).

Thomas

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



Re: [api-dev] Get Actual Height of Frame Problems

2006-05-29 Thread Thomas Lange

Hi Kent,

 I am still having a running battle with getting the
 actual height of a frame.
 
 I thought I had a workaround, but it is buggy, or
 probably I am doing something wrong.
 
 If I never mess with the selection then it works. But
 as soon as I start setting the selection, it stops
 working.
 
 It fails on goto range. I have tried passing goto
 range every type of conceivable cursor or range, and I
 always get com.sun.star.uno.RuntimeException: no text
 selection.
 
 Does anyone have any ideas?
 
 What about a slightly different approach? For example,
 if I make the textframe selected is there no way I can
 get its height throught the dispatcher? The height is
 there in the statusbar.

There is only one working solution, to introduce a new property:
http://so-web.germany.sun.com/iBIS/servlet/edit.ControlPanel?tid=i63211

It should work when the mentioned CWS got integrated.
This will probably take some weeks since I'm still using it to fix bugs.

Regards,
Thomas

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



[api-dev] Larger Documents Failing

2006-05-19 Thread Gascoigne Thomas








Hi,



Im using the following code snippet to get
contents of word documents as strings:



 XTextDocument xTextDocument =
(XTextDocument) UnoRuntime.queryInterface(

  XTextDocument.class,
xComp); 

 

 String s =
xTextDocument.getText().getString();





This seems to work fine for documents up to around
5MB in size and just return  for larger documents. Anybody have
an idea of why I get this problem? Maybe you need to set available memory
somewhere, I tried Xmx1024m as a jvm argument but still fails with no
exception.



Cheers, Thomas




**
The information in this e-mail and any attachment is confidential. 
It is intended only for the named recipient(s). If you are not a
named recipient please notify the sender immediately and do not
disclose the contents to another person or take copies. Although
Axxia Systems has taken every reasonable precaution to ensure
that any attachment to this e-mail has been checked for viruses, 
it is strongly recommended that you carry out your own virus 
check before opening any attachment, as we cannot accept
liability for any damage sustained as a result of software virus 
infection. Axxia Systems reserves the right and senders of
messages shall be taken to consent to the monitoring and
recording of e-mails addressed to axxia.com.
**





RE: [api-dev] Re: Get a word doc as a java String

2006-05-18 Thread Gascoigne Thomas
Thanks a lot. Just one last thing, I'm assuming that the server will
allow (and handle performantly) multiple concurrent requests to open and
extract text from (different) documents? Cheers, Thomas

-Original Message-
From: Kent Gibson [mailto:[EMAIL PROTECTED] 
Sent: 18 May 2006 10:22
To: dev@api.openoffice.org
Subject: RE: [api-dev] Re: Get a word doc as a java String

I may be wrong, but no matter what you will need the
server running, the only question is how transparent
it is to you, if you use the bean examples or
something called nice office access (not very well
documented in english though) then the connection
handling is relativley transparent, they will kick
start the server, (but you will probably not be able
to bring it down again. I use macros to do that.)
Otherwise you will need to start the server from hand
listenning to a port. 90% of the effort is getting
that connection and getting that document open.

--- Gascoigne Thomas [EMAIL PROTECTED] wrote:

 Cheers Kent,
 
 Just another quick one before I give it a try. To do
 this simple text
 extraction task should it be possible to use an OO
 api in process by
 just including necessary jars or will it required a
 full OO 'server'
 running either locally or remotely?  
 Thanks, Thomas
 
 
 
 -Original Message-
 From: Kent Gibson [mailto:[EMAIL PROTECTED] 
 Sent: 17 May 2006 18:36
 To: dev@api.openoffice.org
 Subject: Re: [api-dev] Re: Get a word doc as a java
 String
 
 it really won't be too tricky. You will need to
 connect, and then convert your document. There are
 examples for connection and conversion (filters). Be
 sure to look in the java examples directory of the
 sdk.  
 
 Be sure to also look on the openoffice snippets
 page,
 there are some bootstrapping classe which will get
 you
 up and runny very quickly. other than that you will
 probably have to be a bit more specific. 
 
 good luck
 
 --- Gascoigne Thomas [EMAIL PROTECTED] wrote:
 
  Hi,
  
   
  
  I need to turn MS Word documents into plain text
 so
  that they can be
  indexed for searching purposes. Would the Open
  Office UNO api provide
  
  a relatively straight forward and painless way to
 do
  this. I basically
  need to read word docs in and get a java String
  representation of the
  doc out. Any advise greatly appreciated, Thomas
  
   
  
  
 

**
  The information in this e-mail and any attachment
 is
  confidential. 
  It is intended only for the named recipient(s). If
  you are not a
  named recipient please notify the sender
 immediately
  and do not
  disclose the contents to another person or take
  copies. Although
  Axxia Systems has taken every reasonable
 precaution
  to ensure
  that any attachment to this e-mail has been
 checked
  for viruses, 
  it is strongly recommended that you carry out your
  own virus 
  check before opening any attachment, as we cannot
  accept
  liability for any damage sustained as a result of
  software virus 
  infection. Axxia Systems reserves the right and
  senders of
  messages shall be taken to consent to the
 monitoring
  and
  recording of e-mails addressed to axxia.com.
 

**
  
  
 
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam
 protection around 
 http://mail.yahoo.com 
 

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


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
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] Re: Get a word doc as a java String

2006-05-18 Thread Gascoigne Thomas
Thanks for that. Would such a solution with a request broker have the
effect of serializing the processing of each document? Cheers, Thomas

-Original Message-
From: Tom Schindl [mailto:[EMAIL PROTECTED] 
Sent: 18 May 2006 11:23
To: dev@api.openoffice.org
Subject: Re: [api-dev] Re: Get a word doc as a java String

No please note that one single OO-Instance can only handle one single
conversion process = OpenOffice can not deal with multiple threads from
external. You need to implement a request broker. There are plenty
examples out there e.g. one writen in python, ...

Tom

Gascoigne Thomas wrote:
 Thanks a lot. Just one last thing, I'm assuming that the server will
 allow (and handle performantly) multiple concurrent requests to open
and
 extract text from (different) documents? Cheers, Thomas
 
 -Original Message-
 From: Kent Gibson [mailto:[EMAIL PROTECTED] 
 Sent: 18 May 2006 10:22
 To: dev@api.openoffice.org
 Subject: RE: [api-dev] Re: Get a word doc as a java String
 
 I may be wrong, but no matter what you will need the
 server running, the only question is how transparent
 it is to you, if you use the bean examples or
 something called nice office access (not very well
 documented in english though) then the connection
 handling is relativley transparent, they will kick
 start the server, (but you will probably not be able
 to bring it down again. I use macros to do that.)
 Otherwise you will need to start the server from hand
 listenning to a port. 90% of the effort is getting
 that connection and getting that document open.
 
 --- Gascoigne Thomas [EMAIL PROTECTED] wrote:
 
 
Cheers Kent,

Just another quick one before I give it a try. To do
this simple text
extraction task should it be possible to use an OO
api in process by
just including necessary jars or will it required a
full OO 'server'
running either locally or remotely?  
Thanks, Thomas



-Original Message-
From: Kent Gibson [mailto:[EMAIL PROTECTED] 
Sent: 17 May 2006 18:36
To: dev@api.openoffice.org
Subject: Re: [api-dev] Re: Get a word doc as a java
String

it really won't be too tricky. You will need to
connect, and then convert your document. There are
examples for connection and conversion (filters). Be
sure to look in the java examples directory of the
sdk.  

Be sure to also look on the openoffice snippets
page,
there are some bootstrapping classe which will get
you
up and runny very quickly. other than that you will
probably have to be a bit more specific. 

good luck

--- Gascoigne Thomas [EMAIL PROTECTED] wrote:


Hi,

 

I need to turn MS Word documents into plain text

so

that they can be
indexed for searching purposes. Would the Open
Office UNO api provide

a relatively straight forward and painless way to

do

this. I basically
need to read word docs in and get a java String
representation of the
doc out. Any advise greatly appreciated, Thomas

 




 **
 
The information in this e-mail and any attachment

is

confidential. 
It is intended only for the named recipient(s). If
you are not a
named recipient please notify the sender

immediately

and do not
disclose the contents to another person or take
copies. Although
Axxia Systems has taken every reasonable

precaution

to ensure
that any attachment to this e-mail has been

checked

for viruses, 
it is strongly recommended that you carry out your
own virus 
check before opening any attachment, as we cannot
accept
liability for any damage sustained as a result of
software virus 
infection. Axxia Systems reserves the right and
senders of
messages shall be taken to consent to the

monitoring

and
recording of e-mails addressed to axxia.com.


 **
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam
protection around 
http://mail.yahoo.com 


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


 
 
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com 
 
 -
 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]
 
 

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



Re: [api-dev] OO Basic editor questions

2006-01-25 Thread Thomas Benisch

Rony G. Flatscher wrote:
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.


Just for the case, that somebody wants to work on this. The key problem
with the integration of external editors or IDEs is, that those editors
work on the disk file system and cannot work on virtual file systems.
The Basic IDE works on some kind of virtual file system, for document 
macros especially on the document storage.


Thomas

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



Re: [api-dev] Two little suggestions ad http://codesnippe ts.services.openoffice.org/snippet.dtd

2005-11-15 Thread Thomas Schindl
 two short remarks on 
 http://codesnippets.services.openoffice.org/snippet.dtd. 
 
 * ATTLIST for ELEMENT snippet:
   o Starting with OOo 2.0 there are two officially supported
 scripting languages missing from the valid values for the
 language attribute: BeanShell and JavaScript. Due to
 the availablity of the scripting framework additional
 scripting languages are possible, like ooRexx (in beta).
 Also, XSL is now listed as a language on the snippet site
 and would be missing from this DTD.
 As additional scripting languages can be made available for
 which nutshell examples could be supplied, the values for
 the language attribute should be maintained accordingly.
 To be able to supply snippets until the language attribute
 is updated a value of Other may be helpful together with
 maybe a new CDATA attribute otherLanguage (or the like) to
 allow naming the new/unsupported language.

1. Yes you are right, that I forgot to add the XSL-Language to the Snippet-
   DTD when I added XSL-Support to snippet page

2. Not long time we discussed ago about adding new languages and came
   from my point-of-view to the following conclusion:
   a. At the moment we concentrate on the most used languages
   b. We change the snippet-page design from a programming view
  to a problem centric view
   c. We want to port every snippet to every language
   d. We discuss adding new languages

3. Adding new languages
   Only adding them to the snippet-DTD is not enough we also have to
   provide Syntax-Highlighting for those languages which means creating
   VIM-Highlight-File which knows how to highlihgt syntax


 * ATTLIST for ELEMENT operating-systems
   o Same reasoning as with snippet: there are operating
 systems with OOo ported to them that are unlisted, e.g.
 OS/2 and eComStation, possibly AIX and the like. Hence
 the attribute name should allow for Other and possibly
 add a new CDATA attribute other-operating-system to be
 able to denote the operating system.
 [BTW, shouldn't the ATTLIST denote operating-systems (with
 a trailing s to match the element's name for which the
 attributre list gets defined)?]

I'll take a look and add them

Tom

 
 Regards,
 
 ---rony
 
 
 

-- 
Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner

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



Re: [api-dev] Returnvalues from Macros - ooRexx example

2005-10-31 Thread Thomas Schindl
Hi,

maybe I've missed something and but is ooRex a seperate scripting language
and if yes should we add it to our snippet collection.

Tom

 --- Ursprüngliche Nachricht ---
 Von: Rony G. Flatscher [EMAIL PROTECTED]
 An: dev@api.openoffice.org
 Betreff: Re: [api-dev] Returnvalues from Macros - ooRexx example
 Datum: Mon, 31 Oct 2005 17:53:02 +0100
 
 Hi there,
 
 got a few more minutes, so enclosed you'll find the ooRexx 
 version/rendering of the C++/Java version of invoking a script in 
 another language, retrieve its return value and display it in the writer 
 component:
 
 --- cut here --
 oDesktop = UNO.createDesktop()-- get the default UNO Desktop 
 service object
 xComponentLoader = oDesktop~XDesktop~XComponentLoader  -- get the 
 componentLoader interface
 
-- load an empty writer component
 oWriterComponent = 
 xComponentLoader~loadComponentFromURL(private:factory/swriter, 
 _blank, 0, .uno~noProps)
 
-- get the script provider from the writer component
 oSP=oWriterComponent~XScriptProviderSupplier~getScriptProvider
-- define the script we wish access to

oScript=oSP~getScript(vnd.sun.star.script:Tools.Misc.GetProductname?language=Basiclocation=application)
 
-- invoke the script: first define arguments, then invoke it
-- create 1-dimensional Java array of type Object
 arguments =.bsf~bsf.createArray(.bsf4rexx~Object.class, 1)
-- create 2-dimensional Java array of primitive datatype short
 indexes   =.bsf~bsf.createArray(.bsf4rexx~short, 1, 1)
-- create 2-dimensional Java array of type Object
 outparam  =.bsf~bsf.createArray(.bsf4rexx~Object.class, 1, 1)
-- invoke script to get product name (includes version information)
 pname=oScript~invoke(arguments, indexes, outparam)
 
-- get XTextDocument interface, text and set it to product name
 oWriterComponent~XTextDocument~getText~setString(pname)
 
 ::requires UNO.CLS   -- load ooRexx support for UNO
 --- cut here --
 
 ---rony
 
 P.S.: Line comments start with two consecutive dashes: --
 
 
 Rony G. Flatscher wrote:
 
 
  would you have a Java rendering of that interesting code-snippets 
  handy by any chance?
 
  ---rony
 
 
  Well, fulfilling my own request :) here's an example in Java of 
  running a macro via the scripting framework:
 
  --- cut here --
  class Test {
public static void main (String args[]) {
  // excerpted from HardFormatting.java from the OOo 
  development package
  com.sun.star.frame.XDesktop xDesktop = null;
  com.sun.star.lang.XMultiComponentFactory xMCF = null;
  try {
com.sun.star.uno.XComponentContext xContext = null;
 
// (1) bootstrap the UNO runtime environment
xContext = com.sun.star.comp.helper.Bootstrap.bootstrap();
 
// (2) get the service manager
xMCF = xContext.getServiceManager();
if( xMCF != null )
{
  System.out.println(Connected to a running office ...);
  // (3) start up an instance of office
  Object oDesktop = xMCF.createInstanceWithContext(
  com.sun.star.frame.Desktop, xContext);
  // (4a) get the XDesktop interface object
  xDesktop = (com.sun.star.frame.XDesktop)
  com.sun.star.uno.UnoRuntime.queryInterface(
  com.sun.star.frame.XDesktop.class, oDesktop);
 
  // (4b) get the desktop's component loader interface object
  com.sun.star.frame.XComponentLoader xComponentLoader =
  (com.sun.star.frame.XComponentLoader)
  com.sun.star.uno.UnoRuntime.queryInterface(
  com.sun.star.frame.XComponentLoader.class,
 xDesktop);
 
  // create an empty text (swriter) document
  com.sun.star.beans.PropertyValue xEmptyArgs[] = // empty 
  property array
  new com.sun.star.beans.PropertyValue[0];
 
  // (5) create an empty word processor (swriter) component 
  (document)
  com.sun.star.lang.XComponent xComponent =   // text document
 
  xComponentLoader.loadComponentFromURL(private:factory/swriter, 
  _blank, 0, xEmptyArgs);
 
  com.sun.star.script.provider.XScriptProvider oSP= 
  (com.sun.star.script.provider.XScriptProvider)
  ( ((com.sun.star.script.provider.XScriptProviderSupplier)
  com.sun.star.uno.UnoRuntime.queryInterface(
  
  com.sun.star.script.provider.XScriptProviderSupplier.class, 
  xComponent)).getScriptProvider()
  );
 
 // load and run script
  com.sun.star.script.provider.XScript 
 

oScript=oSP.getScript(vnd.sun.star.script:Tools.Misc.GetProductname?language=Basiclocation=application);

 
  System.out.println(oScript=[+oScript+]);
 
  java.lang.Object arguments []   =  {null}  ,  // 
  single-dimensional array
   outparam  [][] = { {null} }; // 
 

Re: [api-dev] Returnvalues from Macros

2005-10-25 Thread Thomas Schindl
But I think if you are calling a OOBasic-Macro e.g. from Java
you need to invoke the ScriptingFramework don't you?

So maybe the snippet should deal with calling a Macro from some UNO-Binding
e.g. C++, Java, Python, ... and fetching its return value.

Tom


 --- Ursprüngliche Nachricht ---
 Von: G. Jasper [EMAIL PROTECTED]
 An: dev@api.openoffice.org
 Betreff: Re: [api-dev] Returnvalues from Macros
 Datum: Mon, 24 Oct 2005 19:45:46 +0200
 
 Tom Schindl wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Matthias Benkmann wrote:
   
 
 On 10/17/05, Alexander Peters [EMAIL PROTECTED] wrote:
 
 
 
 Hello!
 I use OLE to connect to OpenOffice.org Writer and want to get
 Returncodes from Macros which i execute with a dispatcher. How can i
 make this? Or is there an other way to execute macros to get a
 returnvalue? Any Codesnip in any language will help me.
   
 
 If you don't need compatibility with versions prior to 2.0, you can
 use the Scripting Framework (Developer's Guide chapter 18).
 
 The involved services and interfaces are
 
 The following code demonstrates the SFW:
 
 Sub Main
   doc = ThisComponent
   scriptProvider = doc.getScriptProvider()
   script =

scriptProvider.getScript(vnd.sun.star.script:Standard.Module1.Foo?language=Basiclocation=document)
   retval = script.invoke(Array(Hallo World), Array(), Array())
   MsgBox(retval)
 End Sub
 
 Function Foo(st as String) as String
   MsgBox(st)
   Foo = Bye Bye
 End Function
 
 
 Matthias
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 This would be a great short code-snippet ;-)
 Tom
 
 Tom, Matthias, Alexander,
 
 I suppose my example was too elaborate. The essence was in
 calling the function, which returns a value, just as it does in
 Matthias Benkmann's example.
 But the code snippet can be much shorter, because you don't
 need the scriptProvider at all:
 
 Sub shortMBNKMN
 MsgBox Foo( Hello World )
 End Sub
 
 Function Foo(st as String) as String
   MsgBox(st)
   Foo = Bye Bye
 End Function
 
 This gives exactly the same result.
 
 Sincerely,
 Gerrit Jasper
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail
+++ GMX - die erste Adresse für Mail, Message, More +++

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



Re: [api-dev] instantiating Basic dialogs from UNO componets

2005-07-19 Thread Thomas Benisch

Thank you, Thomas! However, the company I work for does not use the beta version
yet, just OOo 1.1.4. I've just checked that this service is not available
there. Can that be achieved - even if much more hardly - by 1.1.4 UNO
primitives?


No, that's not possible.

Thomas

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



Re: [api-dev] instantiating Basic dialogs from UNO componets

2005-07-18 Thread Thomas Benisch

Jorge Marques Pelizzoni wrote:


Hi, all! Once Mathias Bauer wrote:



But why do you want to call Basic macros from C++? I would expect that
you instantiate your (IDE-designed) dialog from your C++ code (should 
be possible by some UNO calls) ...



Its is exactly those UNO calls that interest me. How can I (i) load/access Basic
libraries from an arbitrary UNO component, (ii) identify my dialog there and
finally instantiate it if I do not have e.g. CreateUnoDialog or DialogLibraries
outside Basic?

Thanks in advance. Cheers,

Jorge.


Especially for dialogs designed with the dialog
editor in the Basic IDE there's the
com.sun.star.awt.DialogProvider service available
(OOo 2.0 code line). The dialog can be created
with the createDialog() method and takes a
script URL as parameter.

If you want to load a dialog called 'MyDialog' in the
dialog library 'MyDialogLibrary' of the user/share
installation, the script URL would be:

vnd.sun.star.script:MyDialogLibrary.MyDialog?location=application

A dialog of the current document can be loaded by

vnd.sun.star.script:MyDocumentLibrary.MyDocumentDialog?location=document

Please note, that for dialogs in documents the XModel of
the current document must be passed as parameter when
instantiating the DialogProvider service.

See also section 18.3.4 of the developers guide, which contains
an example written in Java.

Thomas


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



Re: [api-dev] unable to invoke a BeanShell Macro from an uno-package

2005-05-17 Thread Thomas Benisch
Hi Christoph,
Christoph Lutz wrote:
Hi,
I have got a question regarding the scripting-framework and uno-packages 
and I hope this is the correct list since the list [EMAIL PROTECTED] 
seems to be inactive. If not, please hint me to the correct list.

I want to deploy and invoke scripting-framework-macros within 
uno-packages. After installing a package via unopkg add, the 
invokation of the macro is done via a URL that I pass to the 
swriter-command in the commandline. Thus I am convinced to have 
everything done like documented in the Developers Guide (OOo 2), I get 
an error message Library Library1 not found! and the macro doesn't start.

Let me try to describe how I got there:
1) I used the default HelloWorld-macro one gets when createing a new 
BeanShell-macro using Tools-Macros-Organize Macros--BeanShell / 
create... I stored the macro called Macro1.bsh in the Library1 and 
attached it to a new writer-document.

2) I stored the writer document and extracted the directory 
Scripts/BeanShell/Library1 from the zipped document.

These steps are just to get a valid test-macro Macro1.bsh in a valid 
Library1 with a valid parcel-descriptor.xml. The next steps are about 
to create a simple uno-package that provides the macro:

3) I created a new temporary directory as a container for my new 
uno-package. I copied the extracted directory Library1 into the new 
temporary directory.

4) Now I created a new directory called META-INF within the temporary 
directory and added the following manifest.xml-file:

?xml version=1.0 encoding=UTF-8?
!DOCTYPE manifest:manifest PUBLIC -//OpenOffice.org//DTD Manifest 
1.0//EN Manifest.dtd
manifest:manifest
 manifest:file-entry 
manifest:media-type=application/vnd.sun.star.framework-script 
manifest:full-path=Library1/
/manifest:manifest

This structure is as documented on page 1075 in the DevGuide 2.
5) I bundled (zipped) the files in the temporary directory to 
test.uno.pkg and installed the package using unopkg add 
pathto/test.uno.pkg. A subsequent unopkg list produced the 
following output:

C:\Program Files\OpenOffice.org 1.9.79\programunopkg list
all deployed user packages:
Name: test.uno.pkg
 URL: 
vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE/uno_packages/A.tmp_/test.uno.pkg 

 is registered: yes
 Media-Type: application/vnd.sun.star.package-bundle
 Description: UNO Package Bundle
 bundled Packages: {
   Name: Library1
 URL: 
vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE/uno_packages/A.tmp_/test.uno.pkg/Library1 

 is registered: yes
 Media-Type: application/vnd.sun.star.framework-script
 Description: BeanShell Bibliothek
 }
6) now I tried to invoke the new macro using the following 
URL-parameter-string for the swriter command:

C:\Program Files\OpenOffice.org 1.9.79\programswriter 
vnd.sun.star.script:Library1.Macro1.bsh?language=BeanShelllocation=user:uno_package/test.uno.pkg 
the macro can be invoked by
C:\Program Files\OpenOffice.org 1.9.79\programswriter 
vnd.sun.star.script:Library1.Macro1.bsh?language=BeanShelllocation=user:uno_packages/test.uno.pkg 

There was only a simple typo, you wrote 'uno_package' instead of
'uno_packages'. Nevertheless the macro won't run, but the office
unfortunately crashes. I wrote #i49388# for the crash.
I got the following error-messages (translated from the german version):
A scripting-framework error occured when trying to execute the BeanShell 
script Macro1.bsh
Message: Library Library1 not found.

The URL-string I used is documented on Page 1067 in the DevGuide 2, so I 
think it should be correct.

Have I done something wrong or can you confirm I have done everything 
correct, so I can submit a bug?
Every hints are welcome! Today I used OOo 1.9.m79 but I had the same 
experience with version 1.9.m100.

Thank you very much!
best regards,
Christoph Lutz
Even after #i49388# is fixed, please be aware of the fact, that your
macro won't run in the context of your document. Invoking macros
from commandline is done asynchronously, which means that the macro
might run before the document is fully loaded.
If you want to run the macro in the document context, add the macro
to your document and create an event binding.
Thomas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [api-dev] bug in windows OOo 1.1.4 bootstrap - InvocationTargetException

2005-04-15 Thread Thomas Benisch
Hi Mike,
We decided to go for a) and I don't really see any problems
with it. You mentioned the problem with OOo 1.1.x which
always writes to HKEY_CURRENT_USER. This is a bug and very
unfortunate. I think this bug cannot be fixed in OOo 1.1.x
but probably I'm wrong. Therefore I only see two solutions.
Either you remove all OOo 1.1.x installations from the system
or you delete the registry key in HKEY_CURRENT_USER.
as a workaround for your current problem you can try the
following. Install your OOo 1.1.4 as network installation,
that means '.\setup -net -alluser'. After that you
make your user installation without parameters '.\setup'.
Note, that the second .\setup must be called from your
program directory, which was created by the network installation.
Then the registry key is written to HKLM instead of HKCU.
Thomas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [api-dev] bug in windows OOo 1.1.4 bootstrap - InvocationTargetException

2005-04-13 Thread Thomas Benisch
Kay Ramme - Sun Germany - Hamburg wrote:
Mike,
Mike Traum wrote:
Kay,
I understand what you're saying about the Bootsrap, but right now,
the Loader is completely dependant on OOo.
As far as the error reporting to the user, this could be done. But,
maybe I wasn't clear because I made some points in previous emails.
If a user has an installation of OOo 1.1.x and 1.9.x on their
machine.  and my application requires 1.9.x, I really think the
Bootstrap (or Loader to be more specific) needs to do it's best to
find the 1.9.x installation. As detailed in other messsages, under
this situation, a client under Windows will always get the 1.1.x
instance and a unix/linux client, I believe, will simply get
whichever one was installed most recently. Telling a user that 1.9.x
is required when they actually have it installed on their machine
will make no sense to them, and I think exposes a flaw in the Loader.
I tend to agree, that in the current situation it probably is most 
reasonable to find the installation with the highest version number, as 
per definition it is compatible to older ones anyway.

Such a change can be done without API changes, IMHO open points are
- does Java applications need to be rejarred to benefit from the change?
- it is enough to adapt this change in the latest OOo builds or do we 
need to patch the 1.1 branch also?

Thomas, may be you can shed some light on this? Obviously the best 
solution would just be some modifications for the current build.

Kay
There's no unique way to define the latest installation by using the
version number. The problem is, that we have various products, e.g.
OpenOffice.org, StarOffice and many others. Nobody knows now,
if OpenOffice.org 5.0 will be newer than StarOffice 12.
Therefore we decided, that the user or administrator makes the decision,
which office is used by defining the default installation.
In addition, the current implementation of the loader does only find
the default installation. Therefore it's not possible to choose an
installation from a list of all installations. There was some
prototype which tried to find all installations on a system, but
first of all this prototype did not find all installations and
second this prototype had very poor performance (e.g. searching whole
disks for a office installation takes time).
Thomas

Thanks,
mike
--- Kay Ramme - Sun Germany - Hamburg [EMAIL PROTECTED] wrote:

Hi Mike,
as outlined in my other mail, there are various combination 
possibilities of OOo installations and different client
requirements(, which even hold true for documents e.g. with embedded 
code).

The automatic bootstrapping is designed in a way, that it may be
usable for any kind of future UNO application, by slightly changing 
the implementation. Eventually having a central repository, where _all_

services shall be registered, certainly including different OOo 
installations. For UNO, and OOo is just a collection of UNO
components, the right level for defining requirements is the 
SERVICE. Unfortunately such an automatic requirement checking is not
available yet.

To help with your problem of being dependent against a particular
OOo version, wouldn't the problem be solved by just reporting that a 
particular service is not available and by giving some hints for 
diagnostic purposes? E.g. something like Service BLA could not
be instantiated, this service is not available in OOo versions earlier
than 1.9.x.

Kay
Mike Traum wrote:
Putting it in the documentation really doesn't solve the problem,
though.
I really can't understand why this would not be a good idea. For
example, I have written a client app using the OOo 1.9.x sdk,

which
uses functionality that is not backward compatible. Why would I

want
the Loader to find an instance of OOo 1.1.x, which is guaranteed

to
fail with my app?
mike
--- Christian Junker [EMAIL PROTECTED] wrote:

I don't think this would be a good idea, addressing this issue in 
the introductory text of the new SDK is
the
better approach since it's more general. My proposal is to

include
a
note that examples might not work with the new SDK for OO 1.1.x

or
older.
On Apr 11, 2005 6:22 PM, Mike Traum [EMAIL PROTECTED] wrote:

I see what you're saying about the independence of UNO and
OpenOffice.
But, I guess when I was talking about the searching algorithm. I

was

really referring to the algorithm being done in Loader. Loader

is
completely dependenant on OpenOffice, so I think that it should

be

searching for a compatible version of OpenOffice, and then fall

back

if it doesn't find one.
mike
--- Jürgen Schmidt [EMAIL PROTECTED] wrote:

Hi
Mike Traum wrote:

If SDK 1.9m77 is truely incompatible with OOo 1.1.x, what's

the

purpose of the whole search algorithm in the bootstrap?

Shouldn't

it,

then, just be searching for installations it's compatible

with?

the SDK maybe use features that are only available in the

current

or
newer office versions. So the only statement from our side is

that

the
SDK will work

Re: [api-dev] windows bootstrap against multiple installed versions - 1.x will always trump newer version

2005-04-07 Thread Thomas Benisch
Hi Mike,
you're right. I had some discussion with some experts here, and
the problem is, that when installing OOo 1.1.4 with /NET there's
no registry key written to HKEY_LOCAL_MACHINE. When a user starts
the user installation, the registry key is written to
HKEY_CURRENT_USER.
As a real system integration (that means in this case writing keys to
HKEY_LOCAL_MACHINE) is only available since OOo 2.0, you can
workaround this problem only by deinstalling OOo 1.1.4 or
specifying the office installation as parameter.
Thomas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [api-dev] bug in windows Bootstrap when multiple Oo's are installed?

2005-04-06 Thread Thomas Benisch
This can't be changed anymore. Regardless which key is used we would
break compatibility by using a new one in the next version (changes for
OOo2.0 are too late now) just to avoid possible problems with outdated
versions that will get out of use in the near future. So a bug report
would be a waste of time.
But maybe the problem is not the key, I just heard that OOo1.1.4 *does*
support the new bootstrapping and the key *is* a new one. Maybe Thomas
can make this clear. So we need to know: which version of OOo1.x exactly
did you use?
The new bootstrap mechanism was introduced in SO7 PP3 (I think this is
OOo 1.1.2) for Java only and in OOo 2.0 for Java and C++. Also the NEW
registry key was introduced with those versions.
As Mathias already wrote, it's too late to change the default behaviour
of the bootstrap mechanism, as this would break compatibility.
Looking at your stack trace it seems, that your OOo 1.x installation was
found and the bootstrap method was called. In the past there were
several bug fixes in the bootstrap method, and I assume that your
OOo 1.x installation didn't have all of the bug fixes.
E.g. the bootstrap method was not working, if your installation path
contained spaces (e.g. C:\Program Files\OpenOffice1.1.2).
Thomas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [api-dev] How to protect from disposed exception?

2005-03-16 Thread Thomas Schindl
Hi,

I don't know if these exceptions are related to that but OO is not thread
save thus you have to serialize calls to it in your java-app.

Tom

 Hi,
  
 We have a multi-threaded Java environment. We are using OpenOffice.org
 1.1.3. There are times when we make a series of UNO calls (mostly
 setting properties, save, and call macros) and also get a series of
 exceptions. The exceptions follow: 
  
 com.sun.star.lib.uno.protocols.urp.Unmarshal.readboolean -
 unexpected:java.io.EOFException
 com.sun.star.io.IOException: java.net.SocketException: Socket closed
 java_remote_bridge
 [EMAIL PROTECTED] is
 disposed
  
 How can we defend against these exceptions?
  
 Thanks
 Bob Crothers
  
  
 

-- 
SMS bei wichtigen e-mails und Ihre Gedanken sind frei ...
Alle Infos zur SMS-Benachrichtigung: http://www.gmx.net/de/go/sms

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



Re: [api-dev] [code snippet] Drawing on Uno Dialogs

2005-03-16 Thread Thomas Schindl
Hi,

would it be easier to use SWT?

Tom

 Hi Kohei,
 
   no, they will probably not extended and i hope that we will find an
   alternative (however it will look like) that it will be possible to
   implement own dialogs for extensions with the same look and feel as
   the rest of the office on all supported platforms. Easy to create (GUI
   editor, easy to handle (API), easy to deploy (with UNO packages),
   language independent, ... are only some of my wishes for the
   replacement ;-)
  
  Speaking of wishes... ;-)
  
  It would be cool to have an API compatible to Swing API.  That way for
  Java coders the migration effort is nearly zero, and even for non-Java
  coders, the migration toward Java Swing after UNO (if they so desire)
  would be relatively painless.
 
 I would like to see Swing itself be integrated.  Of course, that only
 works for Java.  This needed two issues fixed:
 
 1st: A portable and official way of adding Swing components to non-Java
 parent windows.
 
 2nd: Getting the OOo and Swing look and feel the same for the different
 planforms.
 
   Michael
 
 
 -- 
 Michael Hoennig [EMAIL PROTECTED]
 project lead OpenOffice.org API
 http://api.openoffice.org
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
DSL Komplett von GMX +++ Supergünstig und stressfrei einsteigen!
AKTION Kein Einrichtungspreis nutzen: http://www.gmx.net/de/go/dsl

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



Re: [api-dev] IDL-Reference

2005-03-16 Thread Thomas Schindl
Hi,

How is the IDL created? Maybe we could switch to output format to XML and
then do the same the codesnippet page does? 
XML = HTML 
* once sorted alphabetically 
* once grouped like it is now

According to the what the user desires? We could even create other output
formats from this point on e.g. PDF, ... .

I just needed to know how to create the IDL-page-creation is done at the
moment (hopefully some template mechanism) ;-)

Tom

 Hi Tom,
 
  I suppose that the IDL-Reference Properties are ordered at the moment 
  using the occurrence of the properties in the IDL-File. The good point 
  about this is that you can group together things like RightMargin and 
  LeftMargin but for someone who is looking for a property it would be 
  much more useful to have the properties sorted alphabetically.
  
  What do the others think about it?
 
 Nobody seems to have an opionion about it.  Ok, my opinion is also not
 helpful.  Either way can be useful.  Grouping logically (meaning like in
 the IDL file) or alphabetically both have their advantages.  I don't know
 what's better.
 
 Ideally we would have a dynamic online reference manual where you can
 select both orders and the sorting is done as you choose.  Any volunteers?
 ;-)
 
   Michael
 
 -- 
 Michael Hoennig [EMAIL PROTECTED]
 project lead OpenOffice.org API
 http://api.openoffice.org
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
DSL Komplett von GMX +++ Supergünstig und stressfrei einsteigen!
AKTION Kein Einrichtungspreis nutzen: http://www.gmx.net/de/go/dsl

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



Re: [api-dev] Code snippets ....

2005-03-10 Thread Thomas Schindl
I thought about automatically linking all imports or includes when we are
talking C++. We could even link all com.sun to the IDL?

What do you think about it?

Tom


 Hi Tom,
 
 thanks for the extensison, i think it is very helpful to improve the 
 navigation to the IDL reference and implicit to the DevGuide.
 
 - Juergen
 
 Tom Schindl wrote:
  Jürgen Schmidt wrote:
  
  Tom Schindl wrote:
 
  Jürgen Schmidt wrote:
 
  Hi,
 
  we have started some time ago with our code snippet base where Tom 
  Schindle did a great work and also Paolo Mantovani who created the 
  code snippet wizard.
  I would like to invite all of you to submit code snippets for often 
  used API's or often asked questions. I think it so important to have 
  a good base of code snippets which helps people to solve their 
  problems fast or simple get started. I have promised that i will 
  submit one snippet per week and i must apologize that i haven't 
  reached my personal goal but i will work on it when i have time ;-)
 
  The upcoming MS Office Developer Studio will come with a bunch of 
  code snippets for often used API's. Everything is well integrated 
  and the user have only to click here and there, fill in some gaps 
  (controlled navigation from gap to gap) and has then a working macro.
  We will probably not reach this kind of IDE integration but we can 
  provide a good code snippet base. And of course it is possible to 
  take this code snippets, convert them all to Java for example and 
  create an extension for NetBeans or Eclipse. Any volunteers here?
  
  
  I have added today 3 new snippets:
  
 

http://codesnippets.services.openoffice.org/Calc/Calc.SwitchPageSizeToDin.snip

  
 

http://codesnippets.services.openoffice.org/Calc/Calc.SwitchOrientation.snip

  
  http://codesnippets.services.openoffice.org/Calc/Calc.AutoFormat.snip
  
  And because I have been at it I added a new functionality to add links 
  to IDL documentation.
  
  The syntax is lend from javadoc:
  * In Text-Sections one could use: [EMAIL PROTECTED] $IDL-Definition}
  * In Code-Comments one could use: [EMAIL PROTECTED] $IDL-Definition}
  
  $IDL-Definition means a fully qualified Class-name including the package
  e.g. com.sun.star.table.XAutoFormattable
  
  An example usage could be seen in Calc.AutoFormat.snip
  
  The search functionality is still on my list and I hope I can manage 
  soon to implement it.
  
  Tom
  
  -
  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]
 

-- 
SMS bei wichtigen e-mails und Ihre Gedanken sind frei ...
Alle Infos zur SMS-Benachrichtigung: http://www.gmx.net/de/go/sms

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