| View previous topic :: View next topic |
| Author |
Message |
goa103 OOo Advocate


Joined: 11 May 2003 Posts: 279
|
Posted: Mon Dec 20, 2004 11:39 pm Post subject: Display book title from its ISBN number using Fields |
|
|
Hello,
We have a books database and we would like to reference its books in our documents using their ISBN numbers. As a developer I'm new to OOo development and wonder what would be the best solution to implement such a feature. The idea would be to provide writers with a simple form that allows them to select a book, the macro would then insert a special field. This field would have a value, the ISBN, and would display the book title, using the ISBN number. It would be the same that the DocInformation:Title field but for our books.
Actually I don't know how to implement my own field nor how to connect to our database. In fact I don't even want to connect to the database as I think about implementing a web service to access it. It would avoid users from connecting, directly to it, even if they would have to use their usernames and passwords, I prefer the web service web, could even use the Amazon web services for example !
The current solution provides the writers with a simple input dialog that allows them to enter the ISBN number, the macro then inserts a simple text, not a field, like book ISBN number. Wouah .
Some questions I need to solve :
- Is it possible to implement our own fields using Basic ? I never tried to develop Java or C++ macros yet.
- Are fields the only way to insert dynamic text in a document ? At first we also thought about just visually replacing a text pattern, #book_ISBN number for example, but that's what fields are meant for afterall... Any other idea ?
- What's the best way to access a web service (SOAP, WSDL...) ? First I would like to access the Amazon one, implemented as a SOAP web service.
All your remarks and suggestions to help us improve this feature are welcome.
JM _________________ An OOo mascot designer |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
goa103 OOo Advocate


Joined: 11 May 2003 Posts: 279
|
Posted: Tue Dec 21, 2004 6:50 am Post subject: |
|
|
| SergeM wrote: | | I haven't great ideas for your problem. Just a word to say I have not tackled DataBase access in my C++ document. You will then not find any help in it if you want to use C++. |
Does it mean you can embed C++ code in a OOo document ??? I thought about developing a C++ plugin to implement this feature as I know C++. See, we use a MySQL database and using a programming library like mysql++ is peace of cake. However I'm sure it's not that hard to access a database using Basic, I read something about using UNO to access a database, like we would use ODBC to access a database : MySQL, PostgreSQL...
I found a section about Text fields in the OOo developer's guide and will take some time to read it. Also there's the Database Access chapter to read. I don't have much time to read them all so I was excepting some quick & dirty help from the community .
Thanks for your remark, now I have one more document to read, yours .
JM _________________ An OOo mascot designer |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
Posted: Tue Dec 21, 2004 7:29 am Post subject: |
|
|
The more easy language you can embed in a document is OOoBasic.
With C++ it's not the same. You can only provide a dll and a rdb file, I mean a UNO component and ask a user to install them. If the users work undifferently under Winows or Linux, it's more difficult (you have to provide a .uno.so file too) I think the more easy is to do all in OOoBasic.
What I said in previous post is only : I haven't worked with DataBase access and C++. That doesn't mean it's difficult but only I have not enough free time for that  _________________ Linux & Windows OOo3.0
UNO & C++ : WIKI
http://wiki.services.openoffice.org/wiki/Using_Cpp_with_the_OOo_SDK
In French
http://wiki.services.openoffice.org/wiki/Documentation/FR/Cpp_Guide |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
goa103 OOo Advocate


Joined: 11 May 2003 Posts: 279
|
Posted: Tue Dec 21, 2004 9:30 am Post subject: |
|
|
| SergeM wrote: | The more easy language you can embed in a document is OOoBasic.
With C++ it's not the same. You can only provide a dll and a rdb file, I mean a UNO component and ask a user to install them. If the users work undifferently under Winows or Linux, it's more difficult (you have to provide a .uno.so file too) I think the more easy is to do all in OOoBasic. |
Basic is easy to but I heard C++ and Java UNO technology were more powerful. I think there are some good remarks about this subject in the Developer's Guide. However... I never found time to read them .
| Quote: | What I said in previous post is only : I haven't worked with DataBase access and C++. That doesn't mean it's difficult but only I have not enough free time for that  |
Warning : french words incoming !!!
Après on dit que les français sont des fainéants !
It is not trou hat all mon bon Monsieur .
Plus sérieusement félicitations pour ton travail sur ce document, j'espère trouver enough de time free pour lire quelques chapitres (Just congratulating him for providing the community with the UNO/C++ document). _________________ An OOo mascot designer |
|
| Back to top |
|
 |
goa103 OOo Advocate


Joined: 11 May 2003 Posts: 279
|
Posted: Tue Dec 21, 2004 9:36 am Post subject: |
|
|
| SergeM wrote: | | If you chose C++ language, I am interested by your future work. I can then add a chapter on the subject and your name in my document. |
Sorry but when it comes to portability, I will turn to Java, not C++. If I develop a OOo plugin, I want all users being able to use it, not only Windows or Unix users. Moreover developing a cross-platform application in C++ is really tricky as you have to build a release for all target platforms, this process can be easied by using a builder but... Java . _________________ An OOo mascot designer |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
|