[dev] OpenOffice Training - Sri Lanka

2009-08-13 Thread Ashok Cananathan
Dear Sir,

Very glad to inform you that we are develop sinhala user manual for OpenOffice 
and we published in our website (http://www.computerland.lk/open_index.aspx) we 
train and we popularize OpenOffice software in Matara district was successfully 
carried out in Matara and Deniyaya. Under this programme, more than 500 people 
including school students, teachers and Nenasala (telecenters)  operators were 
given training on OpenOffice software in Sinhala language. The project was 
implemented by ComputerLand International (Pvt) Ltd.

Seminars for School children to introduce the benefits of OpenOffice were held 
in St. Mary's Convent, Matara, Deniyaya Central College and Thallala Maha 
Vidhylaya. More than 300 students & teachers participated in these seminars. 

In addition comprehensive in-depth one day training workshops with hands on 
training on OpenOffice were given to about 250 selected students, teachers and 
Nenasala (telecenters)  operators. All the beneficiaries were provided with 
Printed course books in Sinhalese and CDs containing OpenOffice.org software, 
User Manual (in Sinhala & English) & Multi Media Interactive Training Material 
to learn OpenOffice.

The training was conducted in 2 phases. The 1st Phase was conducted in Matara 
which covered Devinuwara, Dickwella, Hakmana, Kamburupitiya, Malimbada, 
FourGravets Mulatiyana, Thihagoda, Kirind Phulwella & Weligama Divisional 
Secretariat Divisions. The 2nd Phase was carried out in Deniyaya for the 
benefit of people from Akuressa, Athuraliya, Kotapola, Pasgoda, Pitabeddara and 
Welipitiya Divisional Secretariat Divisions.

Computerland has organized many publicity campaigns to coincide with the 
training. Leaflets consisting of a brief introduction to OpenOffice and the 
benefits of OpenOffice were distributed to the general public. In addition, 
posters were put up in strategic places. They also organized a Nenasala 
(telecenters)  walk where more than 120 people participated in Deniyaya town. 
The participants displayed OpenOffice banner and distributed promotional 
leaflets to promote OpenOffice. Along the way, two public meetings were 
conducted, one in front of the Deniyaya bus stand and the other one near the 
Deniyaya temple. Throughout the walk, a public addressing system was used to 
inform the public about the Vision of ICTA for bringing the benefits of ICT to 
the villages and the advantages of using OpenOffice. 

OpenOffice.org 3 is free software. That means you are free to download it, free 
to install it on as many PCs as you like, free to pass copies to as many people 
as you like. You may use OpenOffice.org 3 for any purpose without restriction: 
private, educational, public administration, commercial... Free, really free. 
OpenOffice software has different components for word processing, spread sheet, 
presentation, graphics and database. It is similar to other Office software.  

Information related to OpenOffice in Sinhala can be viewed free download 
www.computerland.lk/open_index.aspx

Now we are in conduction more trainings for public and government officers so 
we are requesting from you is please give us the OpenOffice Sinhalese language 
site permission us to edit and we have qualified lectures so they can act as 
help desk in Sinhalese language site and publish our web address in the Sri 
Lanka Sinhalese language site.

Your valuable suggestion & kind cooperation are highly appreciated.

Thanks and best regards,
C.Ashok

Content Officer
COMPUTERLAND INTERNATIONAL (PVT)LTD
Colombo 06
-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org

Re: [dev] OpenOffice XComponent, XComponentContext and thread safety....

2008-09-09 Thread ashok _
On Tue, Sep 9, 2008 at 9:54 AM, Stephan Bergmann
<[EMAIL PROTECTED]> wrote:
>>
>
> Most probably that Java exception is caused by the soffice process crashing,
> so you would need to have an eye on the soffice process (e.g., attach with a
> debugger; OOo's crash handling might prevent a core being generated for a
> process that would otherwise generate one).  And yes, multithreaded access
> to OOo is known to be, erm, adventurous.
>


Thanks for the feedback... Does that mean if i have a java Swing UNO
client, the only way to safely access the XComponent handler is to run
all the document processing via the XComponent handle on the main
event dispatch thread (EDT ? ) rather than a background thread... ? Is
there a better way to do thisbecause running all the document
processing on the EDT slows everything down... ?

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



[dev] OpenOffice XComponent, XComponentContext and thread safety....

2008-09-08 Thread ashok _
I have a java swing application that works as a UNO Client by loading
and connecting to OpenOffice.org Writer...

The openoffice XComponent handle is accessed by the main thread of the
application, and also by other parts of the program whcih update the
UI and run as SwingWorker threads...

I am having random crashes with the following exception being raised :

java.io.EOFException
at 
com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge$MessageDispatcher.run(java_remote_bridge.java:176)

Does this happen because the OOo XComponent handle is accessed across
thread boundaries ?

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



[dev] Re: openoffice plugin in netbeans 6.1

2008-06-25 Thread ashok _
On Wed, Jun 25, 2008 at 11:48 AM, ashok _ wrote:
> On Wed, Jun 25, 2008 at 11:43 AM, ashok _ wrote:
>
>> The only way i can open those projects is by disabling the OO.o
>> netbeans plugin... is this a known defect ?
>>
>
> I also noticed that activating the plugin disables the netbeans help 
> system
>


Okay... I resolved the problem by un-installing the plugin provided by
update center,
and then compiling the plugin from the CVS sources.  Everything is
working predictably
now...

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



[dev] Re: openoffice plugin in netbeans 6.1

2008-06-25 Thread ashok _
On Wed, Jun 25, 2008 at 11:43 AM, ashok _ wrote:

> The only way i can open those projects is by disabling the OO.o
> netbeans plugin... is this a known defect ?
>

I also noticed that activating the plugin disables the netbeans help system

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



[dev] openoffice plugin in netbeans 6.1

2008-06-25 Thread ashok _
I upgraded to netbeans 6.1 (on ubuntu 8.04 )... and the update center
provided the openoffice.org plugin (ver 1.1.2).

Unfortunately after upgrading I am unable to open some of my other
netbeans projects which dont use the OO.o plugin 

The only way i can open those projects is by disabling the OO.o
netbeans plugin... is this a known defect ?

this is the netbeans stack trace :

java.lang.IllegalArgumentException: Project myProjectName is not open
and cannot be set as main.
at 
org.netbeans.modules.project.ui.OpenProjectList.setMainProject(OpenProjectList.java:764)
at 
org.netbeans.modules.project.ui.actions.OpenProject.actionPerformed(OpenProject.java:136)
at 
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at 
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at 
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at 
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at 
javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1220)
at 
javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1261)
at java.awt.Component.processMouseEvent(Component.java:6041)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at java.awt.Component.processEvent(Component.java:5806)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4413)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4243)
at 
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at java.awt.Container.dispatchEventImpl(Container.java:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2440)
at java.awt.Component.dispatchEvent(Component.java:4243)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at 
org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
at 
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at 
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

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



Re: [dev] "Current Selection"

2008-04-09 Thread ashok _
On Mon, Apr 7, 2008 at 9:55 AM, Mathias Bauer <[EMAIL PROTECTED]> wrote:
>
>  > What I would really like to see ... but it doesnt seem to be possible
>  > ...  is for an XSelectionChangeListener to directly let me know if
>  > text was selected or not without doing this textrange comparison
>  > stuff (currently xselectionchange listener is invoked for
>  > everything...even mere movement of the cursor).
>
>  There is already a SelectionChangeListener support - but not at the
>  model, but at the Controller(s). And IMHO this is the right place.
>  Having a "getCurrentSelection" at the model is wrong IMHO and just made
>  for the convenience of lazy developers. ;-)

Yes, the XSelectionChangeListener at the controller level is what I
tried to use.
Unfortunately even moving the cursor in the document invokes a selectionChange
event (i.e. there is no text selected at all ) .
Is this is a bug , or is this the way it is ?

ashok

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



Re: [dev] "Current Selection"

2008-04-04 Thread ashok _
On Fri, Apr 4, 2008 at 11:44 AM, Caolan McNamara <[EMAIL PROTECTED]> wrote:
>  >
>  > No,  you can ...
>  >
>  > - queryInterface the selection object for selection ranges
>  > (com.sun.star.text.TextRanges)
>  > - get the first selected range
>  > - get a cursor over the range
>  > - if the cursor is collapsed (cursor.isCollapsed() ) it means no text
>  > was selected, otherwise it means text was select
>
>  Hmm, I suspect that wouldn't give a correct answer to "is something
>  selected?" in the case of a spreadsheet or drawing XModel instead of a
>  text document, nor in the case of a text document if e.g. only a graphic
>  is selected.
>


yes, my response was only in the context of a Writer document, dont know
about spreadsheets.

Checking if a graphic object is selected is quite easy (though a
different use case).

you just query the selection object if it
supportsService("com.sun.star.text.TextGraphicObject") .


ashok

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



Re: [dev] "Current Selection"

2008-04-04 Thread ashok _
On Thu, Apr 3, 2008 at 9:54 PM, Caolan McNamara  wrote:
> Am I right in that it is not possible to simply generically query any
>  given xModel's getCurrentSelection() result to answer the question "is
>  something selected".
>
>  C.

No,  you can ...

- queryInterface the selection object for selection ranges
(com.sun.star.text.TextRanges)
- get the first selected range
- get a cursor over the range
- if the cursor is collapsed (cursor.isCollapsed() ) it means no text
was selected, otherwise it means text was select

What I would really like to see ... but it doesnt seem to be possible
...  is for an XSelectionChangeListener to directly let me know if
text was selected or not without doing this textrange comparison
stuff (currently xselectionchange listener is invoked for
everything...even mere movement of the cursor).

I am trying to build functionality like a context sensitive toolbar
that gets activated only when text is selectd (like the copy, paste
toolbar in openoffice )... anyone know how to go about doing this ?

ashok



ashok

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



Re: [dev] Custom data inside OpenDocument

2007-10-12 Thread ashok _
On 10/12/07, Robert Vojta <[EMAIL PROTECTED]> wrote:
>
> Is there a generic way how to store custom data within a document and
> within an object (like table) inside document?
>

You can store metadata at document level :

for this you need to use the DocumentInfo serviceyou can set and
get any key value pair using the XPropertySet interface of this
service...

In starbasic you could do :

to set a custom property :
ThisComponent.DocumentInfo.SetPropertyValue("aCustomProperty", "a Custom Value")

to get a custom property:
ThisComponent.DocumentInfo.GetPropertyValue("aCustomProperty")

For individual tables:

 the tables expose a "UserDefinedAttributes" property via an
UserDefinedAttributesSupplier service

This allows you to set attribute metadata at table level...

Dim uda

uda = thisComponent.getTextTables().getbyname("table1")

uda is a NameContainer type and lets you set individual attribtues in
a com.sun.star.xml.AttributeData structure...

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



Re: [dev] question on custom XML schemas

2007-10-11 Thread ashok _
On 10/11/07, Charles-H. Schulz <[EMAIL PROTECTED]> wrote:

> this may not be the best list for this. Anyway, it was first asked in an
> ODF forum, but turned out to me (imho) a purely OOo-related question.
> See here: http://opendocument.xml.org/node/838#comment-74
>
> An answer would be appreciated.

I dont think there are plans to provide a feature like this, there was
a thread on the openoffice-xml list a while back which discussed some
alternatives :

http://xml.openoffice.org/servlets/ReadMsg?list=dev&msgNo=3064

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



[dev] Bug in TextSection implementation - Sections are enumerated incorrectly

2007-10-06 Thread ashok _
I found what seems to be an easily replicable bug in the TextSection
implementation :

I tried posting this earlier on API-DEV but didnt get a response, so i
decided to post it here:


I have a simple use case to duplicate the bug:

a) Create an empty writer document. (OOo 2.3 )
b) Insert a section, call it "Section1".
c) After this section, add a few paragraph breaks by hitting enter.
d) Insert a section, call it "Section2".
e) Now go to the space with line breaks between "Section1" and
"Section2", and insert another section called "Section3" there.
f) Finally click Format->Sections. and it displays the order of the
sections as :

Section1
Section2
Section3

When it should be:

Section1
Section3
Section2

The API also displays the order incorrectly:


Dim sections
sections = thisComponent.getTextSections().ElementNames
Dim i
Dim outStr
outStr = ""
For i=LBound(sections) to UBound(sections)
outStr = sections(i) + Chr(13)+Chr(10) + outStr
Next i
Msgbox outStr


if I save the document, and reopen it, the order is displayed correctly.

Is there any way to force the document to refresh itself to display
the correct order without saving it ? (refresh() and reformat() doesnt
work in this case)

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



[dev] TextSection - moving whole sections - Sections cannot be copied/cut using Dispatch API

2007-09-26 Thread ashok _
I have a document with multiple nested TextSections, I am displaying
these in a kind of Tree View.  The user would like to move whole
sections from one part of the document to another (like dragging and
moving a node of a tree). Currently the OpenOffice UI doesnt provide
this.

This functionality was relatively easy to build for simple
TextSections (i.e. sections that do not have child TextSections...). I
was using the dispatch copy and past API, along with programmatically
deleting the source TextSection and re-creating it in the new position
(since the Dispatch API doesnt lose any formatting information).

However implementing the same functionality for Sections which have
nested sections is a problem. Since the Cut / Paste of the dispatch
API does not recognize TextSections, Is there a reason why Copy /
Paste does not copy the TextSection ? (Or is it a bug... )


thanks

ashok

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



[dev] outline numbering limitations?

2007-09-25 Thread ashok _
I have a document template where I am creating various custom styles
from Heading1, Heading2 etc

charterTitle (derived from heading1)
charterText (derived from heading2)
...
noticeTitle (derived from heading1)
noticeText (derived from heading2)

All these styles appear in one document.  I have a screen in my
application where I display an outline of the document based on these
styles.

My problem is, I am using the ParaChapterNumberingLevel property of
the paragrpahs to generate the outlines, this numbering level is
defined in Writer's Tools->Outline numbering.

Here is the problem: both charterTitle and noticeTitle are dervived
from heading1 (and thus have the same numbering level) the outline
numbering screen forces a singular numbering hierarchy on the
document, which makes it impossible to have multiple numbering
hierarchies (multiple styles at heading1 level)

Also it makes it impossible more than 10 styles as part of outline hierarchy...

Is this a bug / missing feature or have i missed something ? It does
seem like a major limitation to me....

ashok

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



Re: [dev] Possible bug in bookmark implementation....?

2007-09-07 Thread ashok _
On 9/7/07, Andreas Martens wrote:

> What's the problem with a position marker?
> If you insert "AB" and then insert a bookmark between this two characters:
> What do you expect if you select both characters and delete them? The
> bookmark should be deleted as well, I assume.

Yes, to me this is correct behaviour...

> What do you expect if you press  beginning in front of the "A" two
> times? First the "A" will be deleted and then the "B". The bookmark will
> be deleted with the "B". Does this fit to your expectation? Or do you
> have a better idea?

Ah... I see... now i understand what you mean...:-)

The only other way i can think of is if a "search and replace" and
"deletion" were
treated as independent use cases.. in terms of text removalin that
the first one
retains the bookmarks and the second case does not

(just out of curiousity i did a test with ms-word... and there the
search-and-replace retains the beginning and trailing bookmarks.. but
when i use the backspace button to delete text... the bookmark appears
to move with the cursor...which also seems very odd to me..)

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



Re: [dev] Possible bug in bookmark implementation....?

2007-09-07 Thread ashok _
Hello Andreas:

On 9/7/07, Andreas Martens wrote:
> >
> yes, the position of 'bk02' is wrong, you should submit an issue with
> your findings.

Yes, I have done that now.

> The missed 'bk01' is another problem. We deal with a bookmark right
> before a character as if the character is marked.
>So this bookmark is
> moved with the character, e.g. if you select the word and drag&drop it
> somewhere else in your document, the bookmark will be moved, too. If you
> delete the word, the bookmark is deleted, too.
>If you replace your word
> by another word, the word is deleted (with the bookmark) and then
> another word is inserted (without bookmark). It will be difficult to
> specify this behavior in a way that delivers expected result for every
> situation.

I follow your argument, but the implementation of the bookmark seems a
bit inconsistent
to me. To me the bookmark should really only indicate a position
within the text, independent of a character that is following it,
since you can just type spaces in a document, and insert bookmarks.
Its a position marker independent of what follows it and what appears
before it...

I agree with the case where the bookmark is in the middle of the word,
and the whole word is cut and pasted in another part of the document,
and the bookmark also moves with the word.

But removing the bookmark before the character being replaced, seems
really odd behaviour to me, since the positional nature of the
bookmark hasnt been altered by the replace.

cheers

ashok

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



[dev] Possible bug in bookmark implementation....?

2007-09-06 Thread ashok _
I am using the write bookmark implementation via the API, and I think
I may have found a bug, and its replicable even in wordprocessor
mode

1) Create a new writer document.

2) type some text : "This is some text"

3) insert a bookmark "bk01", before the word some.

4) insert a bookmark "bk02", after the word some.
(right clicking on the status bar,  pages indicator displays the two
bookmarks...)

5) now do a find and replace of the word "some" with "the",

6) so the sentence in the document appears as:
   "This is the text",

7) Now right click on the status bar, pages indicator, and only the
second bookmark
remains ("bk02"), and this remaining bookmark is wrongly positioned at
the letter "t"
of the repacement word "the"

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



Re: [dev] addin deployment error

2007-06-14 Thread ashok _

On 6/14/07, Mark Greenbank wrote:


/home/mark/src/OOPMTriStats/nbproject/build-uno-impl.xml:135: exec returned:
134



Are you trying to deploy directly from netbeans ?
Because the above looks like an Ant build / compilation error...

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



Re: [dev] pyuno question

2007-03-12 Thread ashok _

Yes... python does not need to be preinstalled.  OO comes packaged
with python 2.3...

On 3/12/07, Bryan  Rasmussen <[EMAIL PROTECTED]> wrote:

Hi,

I was just wondering does the preinstallation of pyuno mean that the user
does not need to have python installed? I'm just wondering because I was
planning on writing a macro in python and haven't a without python installed
machine to test if it works on that machine. I could roll out a VM without
python I guess a simple yes or no is quicker.
:)

Cheers,
Bryan Rasmussen

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




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



Re: [dev] UNO Component HTTP connection....

2007-03-11 Thread ashok _

Hi,

sorry i didnt get back sooner.  I realized the system I was testing it on
was using a customized JVM setup, with different security settings, and that
JVM was being used only by Openoffice so once I switched back to another
JVM, the problem was sorted out.

thanks

ashok

On 3/11/07, Joerg Budischewski <[EMAIL PROTECTED]> wrote:


Hi,

you should post your idl method signature. Do you use out parameters, as
far as i remember, they can't be handled by StarBasic.

Bye,

Joerg

ashok _ wrote:
> Hi:
>
> Is there some kind of limitation in UNO components being able to make
> remote HTTP connections?
>
> I have a java UNO service which is being invoked from a basic macro.
> This component has a method that makes a remote http connection.  I
> get unknown exceptions every time the method making the remote
> connection is invoked.
>
> thanks
>
> ashok
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [dev] writer: export pages as bitmaps (e.g. PNG)

2007-03-09 Thread ashok _

If I can add to Frank's idea of working with PDF and then processing
the pdf into images.

I have used the iText library with good results :
http://sourceforge.net/projects/itext/
which allows you to manipulate pdf split it based on page
boundaries, output each page to a different format and so on.

So you could take the pdf output of writer and process it into images

On 3/9/07, Frank Meies - Sun Germany - Development - Software Engineer
<[EMAIL PROTECTED]> wrote:

Hi Laurent,

On 03/08/07 07:54, Laurent Denoue wrote:

> Is there an API to export each page of a Writer document as a picture?
> It's possible under Impress, as shown here:
> http://www.oesf.org/forums/lofiversion/index.php/t7790.html

I don't see a way to do this directly. What about using the pdf export
filter and use some external tools to convert the pages to graphic files?

Best regards,

Frank

--
Frank Meies (fme) - OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS

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




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



[dev] UNO Component HTTP connection....

2007-03-08 Thread ashok _

Hi:

Is there some kind of limitation in UNO components being able to make
remote HTTP connections?

I have a java UNO service which is being invoked from a basic macro.
This component has a method that makes a remote http connection.  I
get unknown exceptions every time the method making the remote
connection is invoked.

thanks

ashok

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



Re: [dev] Preserving tags with different namespace

2007-03-07 Thread ashok _

Hello Barry:

I think you could use either of the following approaches...:

1) use ParagraphUserDefinedAttributes
<http://api.openoffice.org/docs/common/ref/com/sun/star/style/ParagraphProperties.html#ParaUserDefinedAttributes>
these let you store (invisibly) custom attributes at the paragraph
style level

for example if you had to markup text in openoffice with an identifier
likeyou could store this i0001
value as a paragraph attribute for the specified paragraph in OO. The
attributes appear in styles.xml (and not content.xml) so you will have
to use XSLT to merge these attributes into your XML tags for the
required text fragment

(Note that, I tried using UserDefinedAttributes a while back, but
could never get them to work as the documentation said)

2) You could maybe encode the attributes into a openoffice text link,
by encoding all your attributes as plain text identifiers in the link
something like   and so
on... then when you transform the OO document you could parse the link
and convert that to the XML that you want

thanks

Ashok




On 3/5/07, Barry <[EMAIL PROTECTED]> wrote:

Hi,

Is it possible to add my own tags to an OpenDocument fie, in their own
namespace, and have OpenOffice preserve those tags across file edits?

I want to use this to include markup within an OpenDocument file and process it
with an external macro processor. The technique works really well, we're using
Jakarta Jelly as the macro processor, but subsequent changes to the OpenDocument
file remove all the Jelly tags.

Any ideas?

Thanks and Regards,

Barry


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




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



Re: [dev] Finding automatic page breaks

2007-03-03 Thread ashok _

I hope you are using an XML XSLT filter to write the export filter
rather than use a basic macro to iterate through the document.

The issue of soft page breaks, i suspect you will have to use XSL-FO
to identify the point of the page break.. since page length is
captured in terms of length (in cms) as part of page layout... my
point is, the soft page break is never recorded on the opendocument
but rather determined at the point of display by writer.  (you can
look at this page-layout attribute by unzipping an openoffice document
with soft page breaks and viewing the styles.xml and searching for
.

Maybe a way out for you could be to use both a macro and an XSLT
filter.  First use the macro to convert soft page breaks to hard page
breaks using a cursor to iteratively mark end of page for the writer
document (you can generate a temporary copy of the document since you
dont want to change your original...).  Then run an XSLT filter on
this document to transform to xhtml... page breaks should now be easy
to identify since the manual page breaks are recorded in
content.xml




On 3/2/07, ianmcr <[EMAIL PROTECTED]> wrote:


Hi,

I'm fairly new to OOo. I'm working on an export filter to produce accessible
html. I'm iterating over the text and identifying paragraphs, tables etc.
However, I need a reliable method of identifing soft page breaks.

(At the minute I use the page cursor to insert a marker string at the end of
each page. However, this causes problems with renumbering lists, headings
etc).

Is there a recommended method?


--
View this message in context: 
http://www.nabble.com/Finding-automatic-page-breaks-tf417.html#a9268943
Sent from the openoffice - dev mailing list archive at Nabble.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: [dev] Little update (Re: [dev] Seeking help on Ubuntu 6.10 OOo v. 2.0.4 for starting OOo via Java

2007-02-05 Thread ashok _

i have sent you the project with the build scripts offlist...

but you dont need things like ld_library_path for the jar deploymet to
work... there is an installationfinder & loader packaged within the
jar which locates the openoffice installation and other arbitary paths
automatically which i why i was suggesting that you use the
netbeans plugin to build your project... it generates the neccessary
ant scripts ...

On 2/5/07, Rony G. Flatscher <[EMAIL PROTECTED]> wrote:


Could you please either send me the jar-file (or its included manifest
file) and the settings of CLASSPATH, PATH and LD_LIBRARY_PATH (from the
test machine)?

TIA,

---rony


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



Re: [dev] Little update (Re: [dev] Seeking help on Ubuntu 6.10 OOo v. 2.0.4 for starting OOo via Java

2007-02-05 Thread ashok _

In fact... officebean.jar is not required for the helloworld appit
was suggested by the netbeans wizard, but it will work without it

On 2/5/07, Rony G. Flatscher <[EMAIL PROTECTED]> wrote:


One last remark: it is likely that your pacakge works because of
"officebean.jar".

But I would not want to be dependent on this jar-file as it mandates the
usage of OOo.



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



Re: [dev] Little update (Re: [dev] Seeking help on Ubuntu 6.10 OOo v. 2.0.4 for starting OOo via Java

2007-02-05 Thread ashok _

I tried executing the attached jar file on another ubuntu edgy  box
WITHOUT netbeans or the OO sdk...with just OO2.04 (the standard Ubuntu
openoffice installation) installed, it works perfectly, if i do either
: java -jar "helloworld.jar" or if do a launch with JVM from the Gnome
file manager...

the environment settings are that of an out of the box ubuntu edgy install



Ad your environment: it seems that you have the OOo SDK (and NetBeans)
at your disposal. The successful run from a packaged jar-file is
interesting: if possible, could you supply the jar as well your
environment settings in the command line window in which you are able to
run the app successfully?


As you can see my development box has a different setup, and the test
box has the standard ubuntu setup it works fine in both


See, I would like to learn what is needed for an "out-of-the-box" Ubuntu
OOo installation to be employed to run Java apps from the command line.
(Here SDK/NetBeans/Eclipse setups can come into ones way as it is then
not always clear which environment is in effect under which circumstances.)



helloworld.jar
Description: application/jar
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: [dev] Little update (Re: [dev] Seeking help on Ubuntu 6.10 OOo v. 2.0.4 for starting OOo via Java

2007-02-04 Thread ashok _

these were the required jar files suggested by netbeans:
(i noticed you didnt mention  jut.jar in the comments of your code)

juh.jar
jurt.jar
jut.jar
officebean.jar
ridl.jar
unoil.jar


On 2/5/07, ashok _ <[EMAIL PROTECTED]> wrote:

Hello Rony:

I used your code to successfully build and execute an openoffice UNO
client application.
(See the attached code).

i executed the jar file from the command line using:
java -jar "helloworld.jar"
and it launched openoffice writer and wrote the hellow world text into
the editor windwo

I am running ubuntu edgy, openoffice 2.1 , openoffice 2.1 SDK (in
/opt/openoffice.org2.1_sdk), jdk 1.5.08

I built the code using Netbeans (using the openoffice wizard, by
choosing OpenOffice UNO/Client Application as the project option).



On 2/5/07, Rony G. Flatscher <[EMAIL PROTECTED]> wrote:
> Hi,
>
> ashok _ wrote:
> > I am running oOo 2.1 on ubuntu...
> >
> > I am running the standard jdk 1.5.08 installation... everything works
> > fine for me.
> >
> > I noticed that i had to explicitly enable Java in oOo after the
> > installation, by going to tools->options->java and expicitly selecting
> > a JVM there
> > maybe that is the step you are missing?
> This seems to be necessary only, if Java is invoked from OpenOffice
> itself (either via the scripting framework, or because of using a Java
> UNO component, etc.).
>
> If one is using Java from the "outside" of OOo then that version of Java
> is used to drive OOo. One could set up different vesions of Java and use
> them to interface with OOo (as a matter of fact I have Java 1.1, 1.2,
> 1.3, 1.4, 1.5 and 1.6 on my machine, using 1.4 through 1.6 when running
> against OOo).
>
> ---
>
> So the question would be for me whether you are able to compile and run
> the enclosed Java program from the *command* line (not NetBeans, Eclipse
> etc.) under Ubuntu's OOo? If so, I would be *very* interested in your
> environment settings!
>
> TIA,
>
> ---rony
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>





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



Re: [dev] Little update (Re: [dev] Seeking help on Ubuntu 6.10 OOo v. 2.0.4 for starting OOo via Java

2007-02-04 Thread ashok _

Hello Rony:

I used your code to successfully build and execute an openoffice UNO
client application.
(See the attached code).

i executed the jar file from the command line using:
java -jar "helloworld.jar"
and it launched openoffice writer and wrote the hellow world text into
the editor windwo

I am running ubuntu edgy, openoffice 2.1 , openoffice 2.1 SDK (in
/opt/openoffice.org2.1_sdk), jdk 1.5.08

I built the code using Netbeans (using the openoffice wizard, by
choosing OpenOffice UNO/Client Application as the project option).



On 2/5/07, Rony G. Flatscher <[EMAIL PROTECTED]> wrote:

Hi,

ashok _ wrote:
> I am running oOo 2.1 on ubuntu...
>
> I am running the standard jdk 1.5.08 installation... everything works
> fine for me.
>
> I noticed that i had to explicitly enable Java in oOo after the
> installation, by going to tools->options->java and expicitly selecting
> a JVM there
> maybe that is the step you are missing?
This seems to be necessary only, if Java is invoked from OpenOffice
itself (either via the scripting framework, or because of using a Java
UNO component, etc.).

If one is using Java from the "outside" of OOo then that version of Java
is used to drive OOo. One could set up different vesions of Java and use
them to interface with OOo (as a matter of fact I have Java 1.1, 1.2,
1.3, 1.4, 1.5 and 1.6 on my machine, using 1.4 through 1.6 when running
against OOo).

---

So the question would be for me whether you are able to compile and run
the enclosed Java program from the *command* line (not NetBeans, Eclipse
etc.) under Ubuntu's OOo? If so, I would be *very* interested in your
environment settings!

TIA,

---rony



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



/*
 * helloworld.java
 *
 * Created on 05.01.2007 - 09:59:46
 *
 */

package org.openoffice.helloworld;

import com.sun.star.uno.XComponentContext;
import com.sun.star.comp.helper.Bootstrap;

/**
 *
 * @author administrator
 */
public class helloworld {

/** Creates a new instance of helloworld */
public helloworld() {
}

/**
 * @param args the command line arguments
 */
public static void main(String[] args) {
try {
// get the remote office component context
XComponentContext xContext = Bootstrap.bootstrap();
com.sun.star.frame.XDesktop xDesktop = null;
com.sun.star.lang.XMultiComponentFactory xMCF = null;


// (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 = 
xComponentLoader.loadComponentFromURL( "private:factory/swriter","_blank",
   0, xEmptyArgs);

// (6) get Text interface object and set a text
com.sun.star.text.XTextDocument xTextDocument =
(com.sun.star.text.XTextDocument)
com.sun.star.uno.UnoRuntime.queryInterface(
com.sun.star.text.XTextDocument.class, xComponent);

com.sun.star.text.XText xText = xTextDocument.getText();

// ((com.sun.star.text.XTextRange) xText).setString("Java was here!\r---rgf");
xText.setString("Java was here!\r---rgf");
}



}
catch (java.lang.Exception e){
e.printStackTrace();
}
System.exit( 0 );
}

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

Re: [dev] Little update (Re: [dev] Seeking help on Ubuntu 6.10 OOo v. 2.0.4 for starting OOo via Java

2007-02-04 Thread ashok _

I noticed you were setting a whole lot of classpaths

i would suggest you get hold of netbeans 6 milestone 5 IDE,  and
install the openoffice development plugin on top of that.  It takes  a
lot of pain out of the openoffice development process.by detecting
and setting up environment variables and so on

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



Re: [dev] Little update (Re: [dev] Seeking help on Ubuntu 6.10 OOo v. 2.0.4 for starting OOo via Java

2007-02-04 Thread ashok _

I am running oOo 2.1 on ubuntu...

I am running the standard jdk 1.5.08 installation... everything works
fine for me.

I noticed that i had to explicitly enable Java in oOo after the
installation, by going to tools->options->java and expicitly selecting
a JVM there

maybe that is the step you are missing?

On 2/4/07, Rony G. Flatscher <[EMAIL PROTECTED]> wrote:

Hi there,

just wanted to report that the genuine OOo 2.1 can be invoked via Java
from the command line, whereas the Ubuntu version cannot.

Did remove the genuine OOo 2.1 and re-installed the Ubuntu OOo 2.0.4
version (the latest they have). The Ubuntu version places the binaries
into /usr/lib/openoffice/program and the Java support to
/usr/share/java/openoffice. Setting CLASSPATH and LD_LIBRARY_PATH+PATH
to their respective settings does throw a
com.sun.star.comp.helper.BootstrapException (bootstrap cannot find
office executable).

Could it be that they have no test case for running OOo from the
commandline using Java ? Could that really be the case?? Or is there
something that I might still oversee, which is important for the Ubuntu
version but not for the genuine OOo distribution?

Regards,

---rony


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




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



[dev] validating open office document...

2006-11-06 Thread ashok _

hello there:

I am starting working on a particular front using openoffice, but I am
not sure if its entirely feasible.

--i am using openoffice as a structured document editor, users enter
text and style the text using custom headings and styles... (a)

--downstream the custom headings are xslted into a nested hierarchial
xml format... (b)

--before the transformation happens downstream, i want to validate the
opendocument to make sure the user has entered the headings in a
proper sequence and following a certain grammar  (c)

--to do this i will write a custom schema for the opendocument, which
enforces these rules, and i will validate the opendocument against
that schema
(the benefit of validating the opendocument rather than the downstream
transformed xml would be that i can provide interactive messages in
the context of the document being edited) (d)


I have been able to do (a) and (b), but (c) and (d) is where i want to
be am i aiming for something realistically possible or ?

thanks

Ashok

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



[dev] UNO component language....java vs python

2006-10-30 Thread ashok _

Hello there:

I need to write a UNO component - I am familiar with Java and Python -
I am attracted by the ease and the scripting paradigm of python - but
the support in openoffice for Java appears to be better?  I have a
feeling that the python UNO interface has not been updated in a while.

Would it be wise to go the python route for creating the UNO component...?

thanks

Ashok

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