[libreoffice-users] Single graph line from multiple rows of data

2012-03-15 Thread Dag Wieers

Hi,

I was just wondering if this is possible. I have a spreadsheet document 
that consists of the following structure


  Jan  Feb  Mar  Apr  May Jun  Jul  Aug  Sep  Oct  Nov  Dec
2010 
2011

2012

Is it possible to have a graph spanning multiple months/years on the X 
axis showing a single line on my graph ?


 ^
 | _.
 |  _.  _.'
 |   _.'  '.__.'
 | .'
 +---
   J A J O J A J O J A J O
   201020112012

The default behaviour is to have multiple lines for each month or for each 
year in a single graph, but I want to span multiple years.


Possible or workarounds ?

Thanks,
--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Re: Presentation conversion to/from Powerpoint - layout

2012-03-04 Thread Dag Wieers

On Sat, 3 Mar 2012, Andreas Säger wrote:


Am 02.03.2012 19:25, Dag Wieers wrote:


 I didn't reply to your post in this thread. I was replying to e-letter's
 post. Maybe you got lost and assumed I was replying to your post, I
 don't know.


I wonder who got lost in this thread actually.

This is the only answer to e-letter:

 There is nothing sensible in spelling Microsoft as 'm$', being
 condescending to users and force your opinions on others.


It is not followed by any other posting.


Yet, the link you carefully removed from my mail was *your* answer to my 
mail to e-letter's mail:


http://www.mail-archive.com/users@global.libreoffice.org/msg17560.html

So we are not discussing whatever mail you initially send to Roger, we are 
discussing the tone and content of e-letter's mail and how the LibreOffice 
project is representing itself to users.


And e-letter is doing it again, Roger is offering to report a bug and is 
discouraged from the very start. Way to go !


--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]
--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Re: Presentation conversion to/from Powerpoint - layout

2012-03-04 Thread Dag Wieers

On Sat, 3 Mar 2012, e-letter wrote:


On 02/03/2012, Roger Sawkins ro...@sawkins.name wrote:

Well, having had your little spat I see we have got back to suggestions as
to
what I might do about my problem.


What you choose to call a spat reveals your ignorance of the
historical context of gnu/linux and consequent inability to comprehend
the connection with your problem.


Bear in mind I am new to this game. There is a suggestion of reporting a
bug. I realise there is a link for that, but what is the best way? Should


There is no shame in being new: everyone starts ignorant; it is now
up to you to acquire the necessary knowledge to understand the fallacy
of your problem.


I include a sample of a Ppt conversion (and vice versa) with examples of the
problems, or just list them.


The former, not via a mailing list!

Your original post does not explain nor justify why LO should be used
to create m$ formats.

As indicated by previous reply, if consistent conversion is so
important to you and similar m$ fans, have you contacted m$ and asked
an equivalent question: I want to be able to edit and save odf
presentations ((f)odp) in m$o and LO, but formatting is lost. Please
improve m$o. By the way, how do I submit a bug report to m$

--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


Please read the part of the Posting guidelines as is appended to every 
post:


TDF/LibreOffice Mailing List Netiquette
http://wiki.documentfoundation.org/Netiquette#Avoid_Advocacy

It states:


Avoid Advocacy

TDF and LibreOffice mailing lists are for constructive discussions 
about TDF as a project, and LibreOffice as a personal productivity 
software. TDF as a community was born out of a positive attitude with 
regards to the future of free software and free office suites, and 
therefore we expect the subject and the tone of discussions to be in line 
with this positive attitude.


TDF does not like negative attitudes in general, even when targeted to 
companies advocating proprietary software (e.g. about Microsoft being the 
root of all evil).



So while I hate to have to bring up rules, in this case I want to make 
clear to Roger and other subscribers e-letter is not representing the 
LibreOffice project.


--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Re: Presentation conversion to/from Powerpoint - layout

2012-03-04 Thread Dag Wieers

On Fri, 2 Mar 2012, Roger Sawkins wrote:


Well, having had your little spat I see we have got back to suggestions as to
what I might do about my problem.

Bear in mind I am new to this game. There is a suggestion of reporting a
bug. I realise there is a link for that, but what is the best way? Should
I include a sample of a Ppt conversion (and vice versa) with examples of the
problems, or just list them.


Including simple sample files would certainly be useful. Also a 
description of the various steps, as well as software versions and system 
environment (that can affect the issue, like the fonts installed etc...)


Bugs that are attractive (i.e. are well-documented and look easy to verify 
without the need to have more interaction) tend to get more support than 
vague claims or complicated descriptions that require more work by bug 
triage people or developers.


Make sure that what you contribute will be public and cannot contain 
content that is copyrighted or illegal to share.




Incidentally, there has been some comment about the 'different fonts on
different machines'. I am using Times New Roman (plain and bold) and as far
as I know that is available on any Windows machine, so presumably that is
not causing the problem.


Even when the fonts appear to be installed on the system, software bugs in 
the filters might be causing such issues. I don't expect them to, but bugs 
tend to be unexpected...


--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Re: Presentation conversion to/from Powerpoint - layout

2012-03-02 Thread Dag Wieers

On Fri, 2 Mar 2012, Andreas Säger wrote:


Am 02.03.2012 01:49, Dag Wieers wrote:

 Why are you so defensive ?

 Open Source thrives on people that are interested in a certain subject,
 and one of those subjects could be improving the PPT import and export
 filters. Even if you personally are not affected by such improvements,
 why would you go against any such progress ? Why can users that
 experience a problem not report this to the benefit for those who would
 like to see this fixed ?

 Why are you concerned with what other people are willing to spend their
 free time (or maybe even paid time) on ?

 It's one thing to have a personal preference over what *other* people
 do, it's a completely different subject if one is being condescending to
 users who have different expectations or use-cases than yourself.


OK, can open source make my car fly and swim if I only wish hard enough?


What does flying/swimming cars have to do with improving the existing PPT 
import and export filter ?



There are limitations in software development just like there are limitations 
in the physical technology.


I am not denying there are limitations, but I refuse to believe we have 
come to the point we have reached any such limitation.



MS has the big truck and refuses to carry the comparatively small ODF 
payload. Instead they do nothing and watch how we spend a lot of time 
struggling with their huge payload on a comparatively small truck. Finally, 
LibreOffice 5 will be an alternative OOXML suite with ODF as legacy file 
format to be dropped in version 6.


It's a fallacy to think that the number of developers in LibreOffice is a 
constant, and that the only way to improve (what you deem) important is to 
focus. The success of Open Source is that it enables people to get 
involved in what interests *them*, and your reaction, both in style and 
body, actively demotivates people to get involved in anything other than 
what *you* think is important.


If more people engage (and you seem to be afraid of having _new_ people 
become engaged in areas you are not interested in) we enlarge the 
development community, or at least make it easier to track known issues 
and potential improvements.


I don't know what you are afraid of, but fear is the path to the dark 
side. Fear leads to anger. Anger leads to hate...


--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]
--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Re: Presentation conversion to/from Powerpoint - layout

2012-03-02 Thread Dag Wieers

On Fri, 2 Mar 2012, Andreas Säger wrote:


Am 02.03.2012 12:33, Dag Wieers wrote:


 What does flying/swimming cars have to do with improving the existing
 PPT import and export filter ?


It's the economy! Only dreams are free. Of course everybody wants the magic 
soft to open each and every proprietary file format of computing history.


Again, a user reports a problem with the PPT import/export filter, and 
instead of constructive feedback on how to improve the situation we get:


 - Microsoft trashing (or rather, m$ tra$shing)
 - Lectures on ODF
 - Blaming the workflow or the user not choosing either MS Office or LibreOffice

I object to all that because it's not unreasonable to improve the 
situation and the user can contribute to improving the filters by 
reporting simple examples showing the issue.


And then you start about flying and swiming cars, dreams, magic and 
whatnot.




 I don't know what you are afraid of, but fear is the path to the dark
 side. Fear leads to anger. Anger leads to hate...


All I wish is a little more self confidence regarding the ODF standard. We 
don't need a third decade where virtually everybody is occupied with MS 
interfaces, MS documents, MS browsers, MS APIs, MS protocols and extensions 
of all kinds.


Well, you are preaching to the wrong choir, and that's not helpful.

--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]
--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Re: Presentation conversion to/from Powerpoint - layout

2012-03-02 Thread Dag Wieers

On Fri, 2 Mar 2012, Andreas Säger wrote:


Am 02.03.2012 12:40, Dag Wieers wrote:

 On Fri, 2 Mar 2012, Andreas Säger wrote:

  Am 02.03.2012 09:41, Andreas Säger wrote:
 


Please read the original posting and my reply. Then try to contribute 
something helpful and substancial.


I didn't reply to your post in this thread. I was replying to e-letter's 
post. Maybe you got lost and assumed I was replying to your post, I don't 
know.


http://www.mail-archive.com/users@global.libreoffice.org/msg17560.html

Have a nice life !
--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]
--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Re: Presentation conversion to/from Powerpoint - layout

2012-03-02 Thread Dag Wieers

On Fri, 2 Mar 2012, Andreas Säger wrote:

So what do you reply to Roger Sawkins? That he can file a bug report hoping 
that some day in future LibreOffice will fully support the extinct ppt 
format?


Yup, with the help of the community we can improve LibreOffice so that in 
the future people are more happy with the PPT import/export filter. For 
this to happen we need good information and simple test-cases showing the 
ill-behavior.


IMO that's a better response than the original:

Your are wasting your time. Make a cost-benefit analysis and decide
whether to use either LO or m$; do not bother trying to use both.

There's no guarantee that Roger will take the time to do this, and there 
is not guarantee that someone will pick up the bug reports.


But it is guaranteed that if we tell people they are wasting their time 
using LibreOffice in a certain way, no progress is made on that front.


Which would be a true shame.

--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]
--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Re: Presentation conversion to/from Powerpoint - layout

2012-03-01 Thread Dag Wieers

On Thu, 1 Mar 2012, Andreas Säger wrote:


Am 01.03.2012 15:20, Dag Wieers wrote:

 On Tue, 28 Feb 2012, e-letter wrote:
  On 28/02/2012, Roger Sawkins ro...@sawkins.name wrote:
 
   I have Powerpoint on one machine and LibreOffice on another. I want

   to be
   able to edit and save PowerPoints on either machine. However, when
   loading
   Ppt in Presentation it does not always convert font and layout 
   properly.

   Occasional tabs or spaces are missing or duplicated; occasional text
   boxes
   have text outside the slide, etc.
 
  Your are wasting your time. Make a cost-benefit analysis and decide

  whether to use either LO or m$; do not bother trying to use both.

 Are we being rude today ?

 The case Roger describes is something we all encounter when
 exporting/importing PPT documents. And while we do not control how
 (various) Microsoft products behave when using ODF, we can undoubtedly
 do a better job at making sure the import from and export to PPT (and
 PPTX) is smoother.


Really? Can we realistically do a better job when millions of users want 
another set of MS features each and every day?
When downloading the Microsoft *viewers* for WinWord, Excel and Powerpoint, 
these three *viewers* cover the file formats doc(x), rtf, xls(x) and ppt(x). 
Their download size is close to the download size of OpenOffice.org (single 
language, no extensions but including additional components, 4 macro 
languages and read-write access to dozends of file formats).
How much coding does it take if you are aiming to 100% compatibility with 
their proprietary file formats?
What does it mean that the specification of OOXML weighs 8 times more print 
pages than the specification of ODF?


Why are you so defensive ?

Open Source thrives on people that are interested in a certain subject, 
and one of those subjects could be improving the PPT import and export 
filters. Even if you personally are not affected by such improvements, why 
would you go against any such progress ? Why can users that experience a 
problem not report this to the benefit for those who would like to see 
this fixed ?


Why are you concerned with what other people are willing to spend their 
free time (or maybe even paid time) on ?


It's one thing to have a personal preference over what *other* people do, 
it's a completely different subject if one is being condescending to 
users who have different expectations or use-cases than yourself.


--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]
--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Presentation conversion to/from Powerpoint - layout

2012-03-01 Thread Dag Wieers

On Thu, 1 Mar 2012, e-letter wrote:


On 01/03/2012, Dag Wieers d...@wieers.com wrote:

On Tue, 28 Feb 2012, e-letter wrote:

On 28/02/2012, Roger Sawkins ro...@sawkins.name wrote:


I have Powerpoint on one machine and LibreOffice on another. I want to be
able to edit and save PowerPoints on either machine. However, when
loading
Ppt in Presentation it does not always convert font and layout properly.
Occasional tabs or spaces are missing or duplicated; occasional text
boxes
have text outside the slide, etc.


Your are wasting your time. Make a cost-benefit analysis and decide
whether to use either LO or m$; do not bother trying to use both.


Are we being rude today ?


No we are asking a sensible, direct question.


There is nothing sensible in spelling Microsoft as 'm$', being 
condescending to users and force your opinions on others.


We all like to have ODF as _the_ standard, and preferably everyone in the 
world is using LibreOffice (and for compatibility _only_ LibreOffice), but 
here is a reality check: the world is not nearly there...


--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] corrupt .odt file

2012-02-22 Thread Dag Wieers

On Wed, 22 Feb 2012, Jan Kessinger wrote:


the odt file for storing my workresults is broken.
I did not backup the file for the past 19 days.
So it does hurt :(

Here is what happened:

I was rendering XSL to PDF, which consumed lots of system-resources.
The system was not responding properly anymore.
I got impatient and pressed the reset button.

-rw-rw-r-- 1 jan  jan  2735419 2012-02-21 14:05 2012-02-02_LSF14.odt
-rw-rw-r-- 1 jan  jan0 2012-02-21 14:05 .~lock.2012-02-02_LSF14.odt#

As you can see above there is a .~lock file.
Which means that the system was busy doing something with the file when i 
pressed reset.


http://12monkeys.dyndns.org/media/2012-02-02_LSF14_corrupt.odt 2735419 
2012-02-21 14:05 2012-02-02_LSF14_corrupt.odt
http://12monkeys.dyndns.org/media/2012-02-02_LSF14_proper.odt 1402415 
2012-02-02 15:16 2012-02-02_LSF14_proper.odt


I would be super happy if you could help me fixing the corrupt file.


The files are no longer there. Does it mean your problem is solved ?

--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] program will NOT install RE http://www.libreoffice.org/download35/

2012-02-20 Thread Dag Wieers

On Mon, 20 Feb 2012, Darlene Sartore wrote:


Have tried all morning to install LibreOffice... downloads to Desktop ...
installs gets passed few steps, then gives popup saying to shut down
LibreOffice 3.5...  Nothing is open.. when click OK , installation stops
...  restarted computer... still same...  Downloaded again... still same...
restarted computer... Had Tech access my computer and he got same event...
He had me do the download for portable, that didn't seem to like being on
Desktop... and do NOT have a thumb drive to test it on.. HELP..


It is a known problem, you have to uninstall the older version on your 
system, or update it to 3.4.5 before you can upgrade to 3.5.0.


It was mentioned in the release notes (at the end):

http://www.libreoffice.org/download/3-5-new-features-and-fixes/

Sorry for the inconvenience,
--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Helper utilities and ODT to PDF conversion.

2012-02-15 Thread Dag Wieers

On Mon, 13 Feb 2012, 52midnight wrote:


Over the years I've searched unsuccessfully for a simple ODT viewer that
worked, and now have a need for commandline conversion of ODT to PDF. A
search of the Internet turned up mostly old utilities from SWX days, a
number of forum threads of various vintages (none of which offered a
solution) and a more recent Perl script – anytopdf – that doesn't work.
Being something of a Perl aficonado I've been working with this script. To
save space I've uploaded a page with details:


Just to make sure, you know that LibreOffice has the --convert-to option, 
so you can simply do:


libreoffice --convert-to pdf file1 ...

There's also a tool I wrote that should work on Windows, Linux and MacOSX 
called 'unoconv', which offers some more functionality. It would be nice 
if all the functionality of unoconv would be integrated into LibreOffice.


 - influencing the import and export filters, similar to the import/export
   option dialogs in LibreOffice

 - apply template during conversion, so you can apply styling/formatting
   when converting documents

 - so it works when LibreOffice is already running, or multiple instances
   are running in parallel (e.g. for batch conversion)

Currently the --convert-to fails when LibreOffice is already running.

--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]
--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


[libreoffice-users] Table of Contents with clickable links

2011-12-01 Thread Dag Wieers

Hi,

For my asciidoc-odf project I am looking for a way to have a Table of 
Contents with clickable links to bring you automatically to the content. 
This is how most of the PDFs ought to work, but I cannot make this work in 
LibreOffice and as a result it doesn't work in the generated PDF.


Can someone explain me how to do this in Libreoffice ?

The Index/Table dialog has a button Hyperlink, which doesn't seem to have 
any effect, but it might be something I do not understand in this regard.


Thanks in advance !
--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Table of Contents with clickable links

2011-12-01 Thread Dag Wieers

On Fri, 2 Dec 2011, Simon Cropper wrote:


On 02/12/11 11:00, Dag Wieers wrote:


 Can someone explain me how to do this in Libreoffice ?

 The Index/Table dialog has a button Hyperlink, which doesn't seem to
 have any effect, but it might be something I do not understand in this
 regard.


* Create hyperlinks in a ToC. See manual.
http://help.libreoffice.org/Writer/Formatting_an_Index_or_a_Table_of_Contents


Ok, thanks. I came across that one before, but failed to make it work. 
Thanks to your reply I persevered and found what I was doing wrong.

I can now generate a Table of Contents with working links by default !

One remark, the dialog where you edit the Index/Table where you have the 
E# and E buttons. Those buttons are too small so you can not see in fact 
what they state. For example, the LS and LE buttons do not properly show 
the text either. That makes it hard to understand what is going on.


This is using LibreOffice 3.4.4 on a RHEL6 using Gnome.

--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Formatting source code snippets in LibreOffice Writer

2011-11-28 Thread Dag Wieers

On Mon, 28 Nov 2011, txapollo243 wrote:


I was wondering if there is a nice way of  formatting source code snippets
in LibreOffice Writer (I use the 3.3.2 version). I know it can be done
manually by changing the source code's paragraph's font to something
distinct like Courier or Courier New, but I am looking for something more
aesthetically pleasing. I mean not only using an appropriate font, but also
reserved words-specific coloring, indentation, e.t.c. Is there a plugin to
do this? The question came to me because of an 8085 Assembly project at my
university, in which we have to provide reports to our instructor, but
certainly it could also be useful for writing reports for projects based on
other programming languages.

I have tried different googling combinations, but because of the common use
of the term source code in the context of development, all of the results
were irrelevant.


There are two options that I currently know of, and one I would like to 
implement. The use-case is a bit different, but it does work. It's not a 
plugin though, but maybe that's not that hard to do.



The options are:

 - GNU source-highlight (with the .outlang from the asciidoc-odf project)
   https://github.com/dagwieers/asciidoc-odf/tree/master/filters/source

 - AsciiDoc's code-filter (with ODF support from the asciidoc-odf project)
   https://github.com/dagwieers/asciidoc-odf/tree/master/filters/code


And potentially:

 - pygments (ODF output does not exist yet, not a priority for me atm)
   https://github.com/dagwieers/asciidoc-odf/issues/20


These programs output ODF when you provide it source-code either by 
piping, or using an option. When you pipe source-code it usually 
outputs ODF snippets (without styles). If you provide a file on 
the command line, it generates a Flat ODF file.


AsciiDoc's code-filter is more basic and by default does not use colors. 
GNU source-highlight works as expected and supports more languages.


Only yesterday I added placeholder README files, I still need to add 
command line examples and more information, but I only yesterday received 
feedback that code-filter would no longer ship with AsciiDoc.


The pygments implementation looks interesting, because of the wide support 
of languages.


There are two options in using GNU source-highlight (and future pygments). 
Either add/import the styles from another document (to have the colors) or 
have GNU source-highligh create a complete separate .fodt and import the 
document. Without the styles it won't show anything !


The asciidoc-odf project uses those three (mutual-exclusive) methods 
during generating ODF, so it is well integrated.


I would like to have feedback on the default output of GNU 
source-highlight. We might be able to improve the output before it gets 
included in the upstream project.


Kind regards,
--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] The tone of thiese Lists

2011-11-27 Thread Dag Wieers

On Sat, 26 Nov 2011, Scott Castaline wrote:


On 11/26/2011 11:27 AM, David wrote:


 Well I was wondering. I joined these lists hoping for 'pearls of
 wisdom'. If I want bickering, name calling, or insults I could just call
 my ex-wife.

 :-)


All my exes live in Texas :-)


Is this in reference to 'pearls of wisdom' or the bickering ? ;-)

--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Re: SUMIF on certain values

2011-11-23 Thread Dag Wieers

On Tue, 22 Nov 2011, Regina Henschel wrote:


Gérard Fargeot schrieb:


 =SUMIF(A2:A7,9|10|11,B2:B7)

 With Regular expressions enabled in Tools  Options  LibreOffice Calc
 Calculate.


It should be not comma but semicolon as function separator.

=SUMIF(A2:A7;9|10|11;B2:B7)


If I use semicolons, LibreOffice changes them to comma's again. But it 
does work with comma's here. Maybe this is related to locale ?




It is a nice way, using a regular expression. I haven't consider it before.


Indeed :) Very useful ! Thanks !

--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]
--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


Re: [libreoffice-users] Images get smaller and deformed in .doc

2011-11-20 Thread Dag Wieers

On Sun, 20 Nov 2011, José Antonio Moray Serrano wrote:

The problem happens with the LibreOffice Writer and the format .doc . 
When I insert an image and use it as Como carácter (in spanish, I 
don't know how it's called in English. See first capture), I save the 
document and there's no problem (See second capture), but when I open 
the document (or a document created with Word) the image gets smaller 
and deformed (see third capture). I think it's some kind of bug, but I 
need to know if I can solve this problem somehow, because I need it to 
work as I said.


It looks as if the dimensions of the frame are the same (the border of 
the page seems to indicate this), but a margin was added.


--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]
--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



[libreoffice-users] A general error occurred while accessing your central configuration.

2011-10-28 Thread Dag Wieers

Hi,

When trying to run LibreOffice 3.3 on a system that also has LibreOffice 
3.4 installed, I get a pop-up window saying:


LibreOffice 3.3 - Fatal Error

The application cannot be started.
A general error occurred while
accessing your central configuration.

I assume this is because LibreOffice 3.4 changed the configuration at some 
point that is incompatible for LibreOffice 3.3. I have multiple 
installations for testing purposes.


What is the advised solution for running in such a situation ?

--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Re: How to change the layout of document via PyUNO/UNO

2011-10-17 Thread Dag Wieers

On Mon, 17 Oct 2011, Alexander Thurgood wrote:


Le 17/10/11 13:17, Gabriel Monnerat a écrit :


I would like to know that is possible change the document layout via
UNO because after convert the document it is not opened in standard
layout(is opening in another layout).

So, is possible change the layout and define it on document?


You might need to give us a bit more detail about what it is exactly
that you are trying to do ?

You write after convert document :
- which document ?
- which format(s) ?
- how are you converting it ?

Also, what do you mean by another layout ?


Since Gabriel and I are both working on similar tools, I think I know what 
he needs. We both have written a tool to convert documents using 
LibreOffice import and export filters. We use PyUNO to open and save 
documents and during this 'conversion' problems have been reported that 
the page format (eg. A4) is not retained.


My understanding is that either the original document has no paper format 
configured, or it does not fit the expected dimensions. So the question 
is, how can we set (enforce) the correct page dimensions before exporting 
to another document format using PyUNO ?


I have found some example code in Basic, however I couldn't transcode it 
to working Python code :-/


PS The tool I am working on is available from:

http://github.com/dagwieers/unoconv

Kind regards,
--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]
--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



[libreoffice-users] ODF backend for AsciiDoc

2011-10-01 Thread Dag Wieers

Hi,

This is the first public announcement of a new project I started to create 
an ODF backend for AsciiDoc. For those who don't know AsciiDoc, AsciiDoc 
is a lightweight markup language that is designed to map to DocBook 
semantics, and as such, ideal for creating consistent documentation, 
articles and O'Reilly books ;-)


http://www.methods.co.nz/asciidoc

Being able to convert from AsciiDoc to ODF (onto other formats through 
LibreOffice) is something that always appealed to me, and lead me to 
create unoconv for non-interactive conversions, and get 
involved with docbook2odf. However XSLT is not something I can introduce 
with great confidence at companies as part of a technical documentation 
workflow and docbook2odf was not the easiest to maintain.


The ultimate goal is for people to write basic documents in AsciiDoc, 
convert them to ODF, PDF or Word documents while applying a style in the 
process, without having to launch LibreOffice. However LibreOffice could 
be used to visually fine-tune the styling and using it in future 
conversions in order to give your documents a common identity 
(aka. corporate identity).


Result: no more messing around with XSLT or XSL-FO, and much more options 
wrt. styling.


The ODF backend for AsciiDoc is located at:

https://github.com/dagwieers/asciidoc-odf

and feedback, pull-requests or ideas are very welcome.

PS I am going to give a presentation about unoconv at the LibreOffice
   conference in Paris on friday 14/10 afternoon. I would like to also
   discuss this project at the conference, but likely one presentation
   slot will not be sufficient to discuss both unoconv and asciidoc-odf,
   so if you are attending the conference and interested to discuss both
   projects we can meet after the unoconv presentation.

PS I have noticed a few strange behaviours related to LibreOffice that I
   do not understand and like to share with this list in the meantime.

Kind regards,
--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Re: OASIS Standard ODF 1.2 Approved

2011-10-01 Thread Dag Wieers

On Sat, 1 Oct 2011, Tom Davies wrote:

All releases of LibreOffice have used the 1.2 (Extended) by default.  I 
think OpenOffice was using it for quite a long time before that too.  I 
think the only program that still uses the older 1.1 or 1.0 formats is 
MS Office 2010.  I think Google-docs, KOffice, Calligra, AbiWord  
Gnumeric (together those 2 form Gnome Office) and the IBM's Lotus 
Symphony (or whatever it's called) all have been using 1.2 for a few 
years. 


In LibreOffice you can confirm by clicking on
Tools - Options - + Load/Save - General
about half-way down there is a drop-down showing 1.2 (Extended).  I 
usually change this to the older 1.0/1.1 in order to be able to send 
stuff to MS Office users more easily.


If you do have an older program then install any version of LibreOffice 
instead! ;) Lol


Thanks for making this clear to an ODF novice like me :)

I was wondering what standard I would use for my project and settled for 
ODF v1.1 (given that nearly everywhere, OASIS website and Wikipedia) 
refered to v1.2 as a draft.


Is there an overview of the changes to the standard between v1.1 and v1.2 ?

It might be possible to have both an odt11 and odt12 backend with odt12 
inheriting the bulk of odt11 and implementing just the differences.


Thanks in advance,
--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]
--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] use of flat xml formats

2011-09-27 Thread Dag Wieers

On Tue, 27 Sep 2011, planas wrote:

On Tue, 2011-09-27 at 14:41 +0100, e-letter wrote: 


Is there a logical reason why xslt filters need to be selected
manually for installation? Flat xml file formats are a very good
feature, especially for document version control. Why is flat xml not
the default file format for LO?


I am not sure which filters come installed in the base configuration
because I tend install all the filters.

The ODF formats are default because they are official (ISO?) standards
for general purpose office type documents. Because ODF formats are an
international standard producers of office suites - in theory - should
support the latest version (1.2) allowing users to easily share
documents no matter what program produced the original. MS has not
implemented 1.2 support yet in MSO 2010. I believe the ODF formats are a
type of compressed xml file. The issue of flat xml is whether other,
particularly commercial, suites directly support the format. My
suspicion  is FLOSS projects probably do but commercial support may be
erratic.


Cfr. http://en.wikipedia.org/wiki/OpenDocument_technical_specification



  Document Representation

  The OpenDocument format supports the following two ways of document
  representation:

  - As a single XML document - also known as Flat XML or Uncompressed XML
Files. Single OpenDocument XML files are not widely used. Filename
extensions for a single OpenDocument XML documents are not defined in
the OpenDocument technical specification, but commonly used are .xml,
   .fodt,[1][2] .fods, ... etc.

  - As a collection of several subdocuments within a package, each of
which stores part of the complete document. This is the common
representation of OpenDocument documents. It uses filename extensions
such as .odt, .ott, .ods, .odp ... etc. The package is a standard ZIP
file with different filename extension and with defined structure of
subdocuments. Each subdocument within a package has a different
document root and stores a particular aspect of the XML document. All
types of documents (e.g. text and spreadsheet documents) use the same
document and subdocuments definitions.



I am writing an AsciiDoc backend to produce ODF files directly from 
AsciiDoc. I was also looking for a flat file importer. Currently 
LibreOffice and OpenOffice want to open such a .fodt (or .xml) file as 
text rather than an pure ODF file.


Flat ODF file support would be useful to anyone producing/converting 
simple ODF files, and can help with learning/debugging ODF. It could be

very useful to the larger ODF development community.

Kind regards,
--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Re: use of flat xml formats

2011-09-27 Thread Dag Wieers

On Tue, 27 Sep 2011, NoOp wrote:


On 09/27/2011 12:05 PM, Dag Wieers wrote:
,,,


I am writing an AsciiDoc backend to produce ODF files directly from
AsciiDoc. I was also looking for a flat file importer. Currently
LibreOffice and OpenOffice want to open such a .fodt (or .xml) file as
text rather than an pure ODF file.


I suspect it's a Windows version issue. I can easily open .fodt, .fods
in linux LO 3.3.4  3.4.3. Windows versions act (using the same test
files) do as you suggest and only open as text.


I am using Linux, however I found that the flat XML ODF files require an 
office:mimetype attribute to the office:document root-element. Not doing 
this will make LibreOffice (3.4.3) fail to open the document as ODF, but 
instead as plain text.


So adding:

office:mimetype=application/vnd.oasis.opendocument.text

did the trick for me !

--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



[libreoffice-users] Invoice automation using macros

2011-04-04 Thread Dag Wieers

Hi,

I have quite simple LibreOffice invoices, one file per invoice. There are 
2 items in each invoice I would like to make dynamic.


 1. Invoice number
 2. Due date

For the invoice number, I created a user field InvoiceNumber and a macro 
UpdateInvoiceNumber, which automatically extracts the invoice number 
from the filename and updates the field when the file is opened. This 
works great as I simply can copy my invoice to the new name 
(invoice--MM-#NR-company) and the document is updated automatically 
with /MM/#NR.


Now for the due date its more simple, but I cannot make it work. I used to 
have 2 fields, invoice date and due date. Both are fixed date fields, the 
second is 30 days off. To update them, I have to open the new invoice 
copy, double-click the invoice date field, disable the 'fixed' (so that 
is shows today's date), then make it fixed again, so it doesn't change the 
next time I may edit it. Repeat the same procedure for the due date 
fields. (twice, because I repeat the due date at the end in bold)


Now, what I intended to do was to create another user field of the due 
date and automatically update both with the date set in the invoice date 
field (which remains a fixed date) and add 30 days.


But the problem is that, contrary to user fields, date fields cannot be 
referenced in Basic (likely because they do not have a name). Or at least 
I cannot find it anywhere.


Below is the code I am using in LibreOffice to update the  InvoiceNumber. 
Can someone tell me how I can get the value of a (fixed) Date field ? Or 
is there an easier way to update dates, and manipulate them elsewhere ?



Sub Main
UpdateInvoiceNumber()
RemUpdateDueDate()
End Sub

Sub UpdateDueDate
Rem Don't know how to get to the invoice date fixed date field in the document
InvoiceDateField = thisComponent.getTextFieldMasters().getByName( 
com.sun.star.text.fieldmaster.InvoiceDate )
end Sub

sub UpdateInvoiceNumber
InvoiceNumberField = thisComponent.getTextFieldMasters().getByName( 
com.sun.star.text.fieldmaster.User.InvoiceNumber )
InvoiceNumberField.Content = InvoiceNumber()
disp = createUnoService(com.sun.star.frame.DispatchHelper)
disp.executeDispatch(thisComponent.CurrentController.Frame, .uno:UpdateFields, 
, 0, Array())
end Sub

Function InvoiceNumber
InvoiceNumber = ERROR
If (Not GlobalScope.BasicLibraries.isLibraryLoaded(Tools)) Then
GlobalScope.BasicLibraries.LoadLibrary(Tools)
End If
InvoiceNumber = FileNameoutofPath(thisComponent.getURL(), /)
InvoiceNumber = Mid(InvoiceNumber, 9, 11)
InvoiceNumber = ReplaceStr(InvoiceNumber, -, /)
End Function

Function ReplaceStr(myString As String, str1 As String, str2 As String)
ReplaceStr = join(split(myString, str1), str2)
End Function


PS Is there an easier way to look at the document object model than using 
a watch in your macro editor ? Preferably something to search. That would 
be so useful !


Thanks for your insights !
--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

--
Unsubscribe instructions: E-mail to users+h...@libreoffice.org
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/www/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Invoice automation using macros

2011-04-04 Thread Dag Wieers

On Mon, 4 Apr 2011, Dag Wieers wrote:

But the problem is that, contrary to user fields, date fields cannot be 
referenced in Basic (likely because they do not have a name). Or at least I 
cannot find it anywhere.


With some help from the OpenOffice forums I solved this by not using 
fixed date fields, but rather using user fields (variables) with a Date 
format.


The downside is that editing them is editing the number of days since 
Epoch (although it does accept a 2011.04.04 string).


To use the below code as macro in your documents, simply create three user 
fields named InvoiceNumber (string), InvoiceDate (Date formatted) and 
DueDate (Date formatted), and use a filename that matches 
invoice-2001/03/011-customer.odt (year/month/number) or simply modify the 
code to do what you like ;-)


And then link the below event-handlers to their respective event from 
Tools  Customize  Events.



REM For testing purposes
Sub Main
updateInvoiceNumber()
updateDueDate()
End Sub

REM Event handler when opening a document
Sub _Open
updateInvoiceNumber()
End Sub

REM Event handler when a document is being saved
Sub _Save
updateDueDate()
End Sub

REM Event handler when a document is modified
Sub _Modified
updateDueDate()
End Sub

REM Update a user field (DueDate) with the invoice date + 30 days
Sub updateDueDate
DueDate = getDueDate()
DueDateField = thisComponent.getTextFieldMasters().getByName( 
com.sun.star.text.fieldmaster.User.DueDate )
If (DueDateField.Value  DueDate) Then
DueDateField.Value = DueDate
thisComponent.TextFields.refresh()
EndIf
End Sub

REM Retrieve the user field (InvoiceDate) from the document and make 
DueDate = InvoiceDate + 30

Function getDueDate
If (Not GlobalScope.BasicLibraries.isLibraryLoaded(Tools)) Then
GlobalScope.BasicLibraries.LoadLibrary(Tools)
End If
InvoiceDateField = thisComponent.getTextFieldMasters().getByName( 
com.sun.star.text.fieldmaster.User.InvoiceDate )
getDueDate = InvoiceDateField.Value + 30
End Function

REM Update a user field (InvoiceNumber) with a slice of the document name
Sub updateInvoiceNumber
InvoiceNumber = getInvoiceNumber()
InvoiceNumberField = thisComponent.getTextFieldMasters().getByName( 
com.sun.star.text.fieldmaster.User.InvoiceNumber )
If (InvoiceNumberField.Content  InvoiceNumber) Then
InvoiceNumberField.Content = InvoiceNumber
thisComponent.TextFields.refresh()
End If
End Sub

REM Extract the invoice number from the document name (slice 9-20)
Function getInvoiceNumber
If (Not GlobalScope.BasicLibraries.isLibraryLoaded(Tools)) Then
GlobalScope.BasicLibraries.LoadLibrary(Tools)
End If
getInvoiceNumber = FileNameoutofPath(thisComponent.getURL(), /)
getInvoiceNumber = Mid(getInvoiceNumber, 9, 11)
getInvoiceNumber = ReplaceStr(getInvoiceNumber, -, /)
End Function

REM Return a string with str1 replaced with str2
Function ReplaceStr(myString As String, str1 As String, str2 As String)
ReplaceStr = join(split(myString, str1), str2)
End Function


Hope this is useful to you.
--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, i...@dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

--
Unsubscribe instructions: E-mail to users+h...@libreoffice.org
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/www/users/
All messages sent to this list will be publicly archived and cannot be deleted