Page 1 of 1

[Solved] Template changer extension

Posted: Fri Apr 04, 2008 1:18 pm
by ovidiu21
Hello, i need some help with building a small extension for OpenOffice.I need to automatically insert some templates in a document and also to have them organized in some sort of categories.Can someone help me?Give me some tips.
-----------------------------------------------------------------------------------------------------------
OpenOffice.org 2.4
OS-Windows XP
Question

Re: Template changer extension

Posted: Fri Apr 04, 2008 2:02 pm
by Hagar Delest
You'll have to be more precise because templates in OOo are documents that are used to contain pre-set layout and styles. They're used to create documents having the same look and formatting. So having several of these documents in a single one has no meaning.

What do you mean by several templates here?

Re: Template changer extension

Posted: Fri Apr 04, 2008 2:10 pm
by ovidiu21
Hello and thx for your reply.The templates i want to insert are some label templates(for cd-s, evelopes etc).And all of them have to be categorized by type for example.

Re: Template changer extension

Posted: Fri Apr 04, 2008 4:50 pm
by Hagar Delest
That's still not very clear. What are these labels? Pictures in a folder? What do you mean by automatically insert them? Select them all and drag'n drop them in a Writer document? How could Writer categorize them? Use the Heading styles to set the categories titles and create a TOC (Table Of Content) at beginning of the document for example (you can have it hyperlinked).

Re: Template changer extension

Posted: Fri Apr 04, 2008 9:23 pm
by ovidiu21
More clearly
The main point is that i have to do a simple extension for Openoffice.org .
The label templates for Openoffice 2.0 on this page will be in the
extension: http://www.worldlabel.com/Pages/openoffice-template.htm,
in categories by type and also Avery Cross reference category.

There are some template packages here, you maybe someone can get idea :
http://extensions.services.openoffice.o ... my/term/36

Re: Template changer extension

Posted: Fri Apr 04, 2008 9:47 pm
by Hagar Delest
OK, so if I understand well, you want to design an .oxt extension that will install templates (for labels, ...) in the user profile. And these templates should be organized in categories so that the user is not lost with a single container. Am I right?

I move your thread in the Extension forum.

I've never created any extension so I can't help. I had tried some time ago but not enough time in fact. Have you searched the OOo web site to see if there was any tutorial available to design such extensions?

Good luck.

Re: Template changer extension

Posted: Fri Apr 04, 2008 10:32 pm
by ovidiu21
Hey.
I see u got the main idea of what i need to do.I have already searched for any tutorial which could help me, but nothing so far.
I need some starting point or any advices which could help me.I was thinking to create a database with all the labels.That would give me also the possibility to organize everything and also to have the search option.But still i don't know how to associate the labels i need with the database(how to connect them).
And after that i don't know if i can create an extension form all of that.

Re: Template changer extension

Posted: Sat Apr 05, 2008 8:29 am
by probe1
You already found the Wiki - and the listed links there?!

http://wiki.services.openoffice.org/wik ... _Practices

Re: Template changer extension

Posted: Sat Apr 05, 2008 11:15 am
by ovidiu21
Hello , an tnx for the link.I really didn't know that there is a special wiki for OpenOffice.I am quite new at this , so don't hurry up to criticize me :roll:
Anyway , i will use all the materials i have gathered and i will start working.Any suggestions or any help will be very welcomed .

one more quesion!

Posted: Sat Apr 05, 2008 12:31 pm
by ovidiu21
Can i use Visual Basic to develop a small add-on for Openoffice?And if the answer is yes, can some one tell me the most important steps i have to make?

Re: Template changer extension

Posted: Sat Apr 05, 2008 2:34 pm
by Hagar Delest
MS Visual Basic is not compatible with OOo. You've to use the OOo Basic. Some links in the Macro forum.

Templates included in the extension?

Posted: Sun Apr 06, 2008 11:15 am
by ovidiu21
Hello again.I have started to work on this project and until now everything worked just fine.The bad part is that now i face another problem:How do i include my own templates in an extension?Like i have said on the previous replays i want to create a complete extension which will include my templates and a couple of other functions.
I have found this on the net, but i really don't know how to deal with it:
http://wiki.services.openoffice.org/wik ... eployement
So...can anyone give me a hint?

Re: Template changer extension

Posted: Wed Apr 09, 2008 4:00 am
by DrewJensen
Hi,

Another resource you want to check out is the mailing list for the extension project, particularly the dev list.
The list archive can be found at Extension project dev mailing list and has lots of good information.

Next you want to get your hands on a packager to help put the actual oxt file together.

For StarBasic projects look at http://extensions.services.openoffice.o ... donBuilder. In fact what you might want to do is grab this extension, create a simple basic library and then use the BasicAddonBuilder to generate an oxt file based on it. Once you have done that you can do the following: Open the oxt file with an archiving tool ( 7zip for instance ) and extract the files to a sub-directory. This sub-directory now contains the layout needed, along with the configuration files of the oxt file. This is a good reference for use when reading the documention.

In fact now that I think about it - you could download one of the extensions that distributes templates, there are a good number at the extension site, and unzip that oxt file and see exactly how they handle it // brilliant...

Re: Template changer extension

Posted: Thu Apr 10, 2008 6:52 am
by ovidiu21
Thank you very much for the information.
Now i have solved the problem.I will put here soon exactly the solution.