Re: [libreoffice-users] Do Macros run serially or in parallel?

2014-04-04 Thread Alex McMurchy
Noel

A question inline.

Alex

On Tuesday 01 Apr 2014 21:57:45 Marion & Noel Lodge wrote:
> Hi,
> 
> In opening my database accounting system, I trigger via the Form: When
> loading event, a macro, (Sub Init()), containing the database
> initialisation routines.
> 
> As the Form loads it displays the first record in the database, including
> the account number.   To make things easier for the user, the Text modified
> event on the account number control, triggers a macro, (Sub AccName()),
> that displays the account name.

Do you do this because the table associated with the form doesn't contain the 
Account Name, so you have to get the account name from some other table?

> 
> Sometimes the system has crashed because it seems that Sub AccName() has
> fired before Sub Init() has finished.  (Sub AccName() depends on some of
> the structures that Sub Init() sets up.)
> 
> Is it possible that both Subs are running in parallel or do they always run
> in series on a first come first served basis?
> 
> If the latter, are there coding techniques that can be used to ensure that
> Sub Init() always runs first?
> 
> If the former, how can I ensure that Sub AccName() waits until Sub Init()
> has finished?
> 
> Can someone point me to any articles on this subject?
> 
> Thanks,
> 
> Noel
> --
> Noel Lodge
> lodg...@gmail.com
> 
> 

-- 
To unsubscribe e-mail to: users+unsubscr...@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: Page margins

2014-04-04 Thread Cor Nouws
Hi Tinker,

Tinkerer wrote (02-04-14 20:15)

> I need to make frequent changes to the Page Format on the three Sheets that
> I print from.
> I cannot predetermine every change, so a change in the margins is the
> simplest way out, or it would be if it remains with that sheet only.

I would suggest to add more page-styles (right-click on the name in the
window Style and Formatting and choose New), and apply a different style
to each sheet (double click on the name with the desired sheet active).

> BTW. Re. CT2N.  Using Libre version 3, I was not able to add your suggestion
> for the £ prefix as the Macro was in the Libre Macros.  In version 4, the
> macro is in "My Macros", so I was able to alter it.
> It works great. 
> Many thanks.

Thanks for the compliments and happy to read that it helps. (there's a
list of wishes to implement in CT2N that I'm not able to work on for
some time already - alas).

Regards,
Cor


-- 
Cor Nouws
GPD key ID: 0xB13480A6 - 591A 30A7 36A0 CE3C 3D28  A038 E49D 7365 B134 80A6
- vrijwilliger http://nl.libreoffice.org
- volunteer http://www.libreoffice.org
- The Document Foundation Membership Committee Member


-- 
To unsubscribe e-mail to: users+unsubscr...@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] Do Macros run serially or in parallel?

2014-04-04 Thread Fernand Vanrie

Noel , Andrew,

What system are you running ?

on windows the wait is doing OK

try this code


s1 = "1.  " + Now()
Wait(2000)
s2 = "2.  " + Now()
msgbox (s1 & chr(13)&  s2)

s1 an s2 differs from 2 seconds (wait 2000)

Greetz

Fernand

Hi Andrew,

Yes, that is what seems to be happening.  Even if there is a bit of code
between the Wait(2000) and the next Print #giInit, the time is the same.
Only if there is substantial code after the Wait(2000) does the time
change.  For example -
1.  04/04/2014 13:50:24
2.  04/04/2014 13:50:24
3.  04/04/2014 13:50:24
4.  04/04/2014 13:50:24
5.  B4 UpdateFundAndGenLed()  04/04/2014 13:50:24
6.  04/04/2014 13:50:28
7.  04/04/2014 13:50:28

After 5. the Init macro calls another macro.

Something odd seems to be happening with the Wait command.  Perhaps I am
missing something.  You can see why I was wanting to get fractions of a
second in the print statements.

Noel

--
Marion & Noel Lodge
lodg...@gmail.com


On 4 April 2014 03:06, Andrew Douglas Pitonyak  wrote:


So, are you saying that you have:


Print #giInit, "1.  " + Now()
Wait(2000)
Print #giInit, "2.  " + Now()

And it prints the same value for now?



On 04/03/2014 09:12 AM, Marion & Noel Lodge wrote:


Thanks for the replies to my original post.

They gave me something to work on and I have made some progress.  I think
that the macros run in series, but I am not yet sure of that.

For some reason the wait(2000) commands that I inserted into the the
macros
don't seem to work and I am getting several lines with the identical time
stamps, like this -
1.  03/04/2014 23:44:57
2.  03/04/2014 23:44:57
3.  03/04/2014 23:44:57

I looked up the formatting for time stamps and
DD:MM: hh:mm:ss.00 is supposed to give fractions of a second, but I
don't know how to apply this to the Now() function.

The code I am using to print to the text files is -

   giInit = FreeFile()
   Open "D:\LibreOffice\InitfTransEntry.txt" for Output as giInit
   Print #giInit, "1.  " + Now()

Any suggestions as to how I can format Now(), or should I use a different
function to get more accurate timing?

Thanks,

Noel
--
Noel Lodge
lodg...@gmail.com


On 2 April 2014 00:05, Andrew Douglas Pitonyak 
wrote:

  Sadly, I do not have a definitive answer to your question, but I do have

some thoughts... (see inline)


On 04/01/2014 06:57 AM, Marion & Noel Lodge wrote:

  Hi,

In opening my database accounting system, I trigger via the Form: When
loading event, a macro, (Sub Init()), containing the database
initialisation routines.

As the Form loads it displays the first record in the database,
including
the account number.   To make things easier for the user, the Text
modified
event on the account number control, triggers a macro, (Sub AccName()),
that displays the account name.

  And I assume that this is built into the form.


   Sometimes the system has crashed because it seems that Sub AccName()
has


fired before Sub Init() has finished.  (Sub AccName() depends on some of
the structures that Sub Init() sets up.)

Is it possible that both Subs are running in parallel or do they always
run
in series on a first come first served basis?

  Warning: Speculation... So insert the following text before each

statement
below:  "I am making a wild unsubstantiated guess that"

1. The form is populated before Init() finishes
2. AccName() is called as soon as text is pushed into the control.

So, if this is the case, then AccName may be called before Init()
finishes. If you really want to know if they run at the same time, you
could do a not so quick test and modify each routine so that the macro
does
something like this:

Sub Init()
Write current time to a file
delay a second or two
Do the work
delay a second or two
Write the current time to a file
End Sub

Use a different file for each subroutine, then compare the start and end
time to see if they overlap. You can probably get away with using a
simple
print statement at the start and end.


   If the latter, are there coding techniques that can be used to ensure
that


Sub Init() always runs first?

  If things run serially and AccName is called based on something done in

Init(), it may be possible that Init() cannot complete until after
   AccName() finishes.


I suppose that another possibility is to set a "Global" variable such as
"InitComplete". set to false when Init() starts, and set to true when it
completes. Modify AccName to check for InitComplete. If things are
serial,
then you may need to simply return. If not, then have AccName wait for a
few seconds and try again. If things are truly serial, then I would
expect
them to fail every time, and they don't fail every time, so it is likely
not the case.



  If the former, how can I ensure that Sub AccName() waits until Sub

Init()
has finished?

  Oh wait, see above! :-)



  Can someone point me to any articles on this subject?

Thanks,

Noel
--
Noel Lodge
lodg...@gmail.com


  --

Andrew Pitonyak
My Macro Document

[libreoffice-users] Re: Company Move: Need to Know

2014-04-04 Thread Alex Thurgood
Le 02/04/2014 06:54, Sqwuiddy a écrit :


Whoa !! Too many questions in one post.


> Part of our company has moved completely to LibreOffice and removed
> Microsoft Office from their computers. I have tried programming mail merge
> templates on my computer, and then having them open it on theirs, and the

I hope that the migrated templates are in ODF format (ott), or else you
are heading for trouble...


> documents will not merge. The first error we encountered was that the IF
> statements that I built didn’t function at all. I simply wanted to make an
> “X” appear when a field contained a certain value. These were if statements
> that would function on my computer. The second error was that… well, none of

IF statements should work, at least within ODF documents, as far as I know.


> the merge fields merged. When I re-inserted them they worked fine, but they
> wouldn’t pull from the database even after re-registering it. My question
> here is, does Word give Libre Writer a leg up if both programs are on one
> computer? Is that why when I moved a document I’d programmed and tested to

No, Word does not help Writer in any way here to my knowledge. More
likely it comes down to the fact that your template when transferred
must contain the same paths to the data source (which you don't mention
in detail). From the rest of your post, it appears that you are merging
from an Excel sheet ? For the mailmerge to work reproducibly, your ODF
document must reference the Excel sheet as a datasource in the same way
as on your own machine, and if the datasource is registered with LO, it
is written into the user configuration.


> 
> Nested IF Statements:
> 
> Is this possible? I have tried a variety of things and I’ve done a good deal
> of research, and I’ve hit a wall. We cannot move forward if we do not have

No idea, as I've never tried this.



> 
> IF Statements resulting in a Mail Merge Field:
> 
> So far I have only been able to make conditional mail merge fields
> hide/appear using hidden sections. This is not a practical technique for us,
> as our documents are built almost entirely on conditionally revealed values.
> I have researched this as much as I could, it seems I cannot create a
> conditional statement that results in a mail merge field, but I wanted to
> confirm.


My understanding was that hidden sections was the route to choose in
order to obtain what you want. It might be possible to obtain something
similar via User variables, which are stored in the document, but the
number of these that you can define are limited (4 or 6 or something so
small as to be practically useless ?).

There are other techniques available that do not rely on the UI to do
this, including setting variables within the document as any given
character, and then using a scripting framework to control replacement
of those variables with the values you want and have a user driven
interface, but most of these are command line solutions (Python, Java,
Rexx, etc)


> 
> Formatting Fields:
> 
> We regularly use a formatting switch on our mail merge fields in Word 2010
> called “DollarText.” This takes a number from an Excel spreadsheet and
> spells it out, like below:
> 
> Cell Value: $1,231.67
> Formatted: One thousand, two hundred and thirty one dollars and sixty seven
> cents.
> 
> We have other switches that we need to use as well, but those don’t seem
> available in the list of additional formats. Is there a workaround for this,
> or am I missing something? I have to admit, I don’t fully understand how to
> build custom formats (I haven’t found much documentation on them at all).

You would probably require a macro to convert a number to spelled-out
text, there used to be one around in the shape of an extension that
could do this, but I haven't checked recently. As for user defined
formats, these tend to be limited to fairly simple string formats,
otherwise you're going to have to devise a macro to do it for you.


> 
> Check Boxes:
> 
> FormCheckBoxes from Word do not translate in Writer. Meaning, I can open
> Word 97-2003 documents containing these functional check boxes with Libre
> Writer but they do not print. Is there a setting somewhere that I need to
> switch or perhaps a better alternative? I have tried retemplating these
> documents in Libre using Writer’s FormCheckBoxes but they are impossible for
> me to place on a table. Wingdings are also not an option.

Non-printing of Word checkboxes is/was a known bug. Don't know if that
has been fixed, or if a fix is even in the works. I have always found
that using Writer checkbox controls is fraught with dissatisfaction
because they are too small, do not scale well, and do not allow you to
choose the tick mark character.


> 
> Table-Intensive Documents:
> 
> We build forms that go to court, so they have to be laid out in tables
> exactly as the court requires. Most of the time we build these forms on
> tables in Word. When opened in Libre Writer, the tables break, cells expa

Re: [libreoffice-users] Thunderbird - too many Address Books

2014-04-04 Thread James Knott
Scott Castaline wrote:
> I've always used as my first entry in each address book @@@. That
> seems to still work as far as I can tell. My understanding is that the
> bots can't seem to deal with that entry or it'll ignore the rest once
> it encounters it.

Where are those "bots" running?  Is this a Windows thing?  I run Linux
on my computers.


-- 
To unsubscribe e-mail to: users+unsubscr...@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] Won't print portrait

2014-04-04 Thread Kracked_P_P---webmaster

On 04/03/2014 12:11 PM, James Knott wrote:

Kracked_P_P---webmaster wrote:

What printer are you using?  And what printer "driver"?  PDF or
Postscript lever 1, 2, or 3?

Which version was the last it worked?  The same and now it does not work?
If that is the case, it may be a problem with the config users files.

I don't recall how long ago, as it's been a while since I printed an
envelope.  However, it's a Dell 1110 with the Dell 1110 Foomatic/gdi
drivers.  However, further testing reveals it may be a printer problem,
as I can print to PDF properly.



I have has issues with a certain printer while other worked fine.  The 
issue was that the laser printer was "stuck" printing in the 4 page per 
sheet mode, but would only print one of the very small pages per sheet, 
instead of 4.  I never used that mode before. The other printers would 
print normally.  The only other time was when a printer would bot duplex 
print when it did a few days before.  Both needed the user config folder 
to be recreated. For some reason, sometimes a "gremlin" decided to mess 
up one of the config files and I cannot find where it was mess with.  So 
recreating the folder works.  I just then have to add the extensions 
needed.  No problems there.


I never had any luck with finding a Dell printer driver for Ubuntu, or 
at least the ones I have had given to me to "pass on to others if 
needed".  So I stick with HP and Canon [need to go to the UK site since 
the US site does not support Linux].


--
To unsubscribe e-mail to: users+unsubscr...@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: Company Move: Need to Know

2014-04-04 Thread Tom Davies
Hi :)
This is part of the reason for keeping existing versions of MS Office
during the migration period.

Existing templates and documents hopefully work well on existing
versions of MS Office.  They don't always work so well on newer
versions of MS Office but upgrading the templates is then considered
part of the cost of the upgrade.


MS Office 2007 uses a "transitional" OOXML format.  MS Office 2010
uses a different one.  MS Office 2013 uses yet another by default but
allow "strict" OOXML through the
File - "Save As ..."
menu.  There was some attempt to 'backport' the OOXML format to 2003
and earlier but i'm not sure which of the "transitional" formats was
used or if it was yet another version.

Mostly MS Office 2003 and earlier use a previous MS format that had
finally become fully interoperable with many other programs, suites
and usable cross-platform but MS chose that moment to start using
OOXML which promised (but apparently failed to deliver) the promise of
interoperability that the older format had just achieved.  The new
OOXML format kinda forces everyone to keep buying their newer and
newer versions of MS Office.  MS Office is one of the biggest income
streams for the profit making company.


By contrast LibreOffice, OpenOffice, Caligra/KOffice, IBM Lotus
Symphony and many other programs all use ODF and can easily be set to
default to the ISO standard that works exactly the same in all
versions of all programs, except MS Office.



So, sticking with MS formats and MS programs ensures needing to
upgrade all the templates every 3 years or so.  Moving to LibreOffice
means upgrading to the ODF formats and templates this one time.

The additional advantage with migrating to LibreOffice (or OpenOffice)
is that it is possible to do so without losing your existing version
of MS Office.  MS Office doesn't really allow that as an option.
Well, it does but it's difficult to do and leads to confusions and
problems.  I've done it but it's really not worth the hassle.


So, keeping existing MS Office for existing templates and documents is
smart.  New templates and documents need to start being made on
LibreOffice but you can still use the old ones on MS Office.  Plus it
gives you more time to upgrade existing templates and test they work
before becoming dependant on them.

Regards from
Tom :)











On 4 April 2014 10:02, Alex Thurgood  wrote:
> Le 02/04/2014 06:54, Sqwuiddy a écrit :
>
>
> Whoa !! Too many questions in one post.
>
>
>> Part of our company has moved completely to LibreOffice and removed
>> Microsoft Office from their computers. I have tried programming mail merge
>> templates on my computer, and then having them open it on theirs, and the
>
> I hope that the migrated templates are in ODF format (ott), or else you
> are heading for trouble...
>
>
>> documents will not merge. The first error we encountered was that the IF
>> statements that I built didn't function at all. I simply wanted to make an
>> "X" appear when a field contained a certain value. These were if statements
>> that would function on my computer. The second error was that... well, none 
>> of
>
> IF statements should work, at least within ODF documents, as far as I know.
>
>
>> the merge fields merged. When I re-inserted them they worked fine, but they
>> wouldn't pull from the database even after re-registering it. My question
>> here is, does Word give Libre Writer a leg up if both programs are on one
>> computer? Is that why when I moved a document I'd programmed and tested to
>
> No, Word does not help Writer in any way here to my knowledge. More
> likely it comes down to the fact that your template when transferred
> must contain the same paths to the data source (which you don't mention
> in detail). From the rest of your post, it appears that you are merging
> from an Excel sheet ? For the mailmerge to work reproducibly, your ODF
> document must reference the Excel sheet as a datasource in the same way
> as on your own machine, and if the datasource is registered with LO, it
> is written into the user configuration.
>
>
>>
>> Nested IF Statements:
>>
>> Is this possible? I have tried a variety of things and I've done a good deal
>> of research, and I've hit a wall. We cannot move forward if we do not have
>
> No idea, as I've never tried this.
>
>
>
>>
>> IF Statements resulting in a Mail Merge Field:
>>
>> So far I have only been able to make conditional mail merge fields
>> hide/appear using hidden sections. This is not a practical technique for us,
>> as our documents are built almost entirely on conditionally revealed values.
>> I have researched this as much as I could, it seems I cannot create a
>> conditional statement that results in a mail merge field, but I wanted to
>> confirm.
>
>
> My understanding was that hidden sections was the route to choose in
> order to obtain what you want. It might be possible to obtain something
> similar via User variables, which are stored in the document, but the
> number

Re: [libreoffice-users] MSO for iPad, big deal or big yawn

2014-04-04 Thread Kracked_P_P---webmaster

On 04/03/2014 01:57 PM, Johnny Rosenberg wrote:

About running Apache OpenOffice or LibreOffice on Android devices: Wouldn't
it, in theory at least, be possible to run both of them if you first
install Ubuntu on your Android device? I know, then it's not Android any
more, but still…


Johnny Rosenberg



MS just announced that it will offer free MS OS for smartphones and 
tablets with a 9 inch or smaller display non-business device. They 
decided that since Android is free, MS OS should be free istead of 
asking the manufactures to pay $5 to $15 each device. They hope this 
will increase the MS OS mobile device market share.  They may also be 
offering a 1 year of free "cloud" services like Office 365 for these 
devices.


So if they do start getting more market share on tablets, our developers 
may need to make sure LO would on tablet versions of Windows 8.1, like 
their own "tablet" device.  I do not know if anyone on these lists 
bought one of these MS tablets and/or knows if LO would work on them.  
If it does, then we are prepared for that MS market grabbing "offer".


As for Ubuntu on a tablet - I would like for someone to tell me OFF LIST 
how to do such a thing and what the system specs low end really is for 
Ubuntu on a tablet.  I have an old 7 inch that could use a new OS.


--
To unsubscribe e-mail to: users+unsubscr...@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] Do Macros run serially or in parallel?

2014-04-04 Thread Andrew Douglas Pitonyak


Yes, I did the same test on Linux, and it works there as well.

Sub NowTest
  Dim s As String
  s = "1.  " & Now()
  Wait(2000)
  s = s & CHR$(10) & "2.  " & Now()
  MsgBox s
End Sub

Can you try running this method, and, then, after that works, use 
similar code in your event handler to print a message to the screen in 
the two places of interest to see if maybe the wait command fails to 
work in an event handler.


I did a quick test to see if the NOW function returned a value with 
precision greater than one second, and, it seems that it does not. if it 
did, then waiting for 500 milliseconds should clearly show fractional 
seconds, yet, my fractional seconds are always on the order of 10^-7


Sub NowTest
  Dim s As String
  Dim l As Double
  l = Now
  s = "1.  " & Now() & " = " & l
  Dim dSec As Double
  Dim lSec As Long
  lSec = CLng((l*1440 - CLng(l*1440)) * 60)
  dSec = (l*1440 - CLng(l*1440)) * 60 -lSec
  s = "1.  " & Now() & " = " & dSec

  Wait(1000)
  l = Now
  lSec = CLng((l*1440 - CLng(l*1440)) * 60)
  dSec = (l*1440 - CLng(l*1440)) * 60 -lSec
  s = s & CHR(10) & "2.  " & Now() & " = " & dSec
  MsgBox s
End Sub


On 04/04/2014 03:23 AM, Fernand Vanrie wrote:

Noel , Andrew,

What system are you running ?

on windows the wait is doing OK

try this code


s1 = "1.  " + Now()
Wait(2000)
s2 = "2.  " + Now()
msgbox (s1 & chr(13)&  s2)

s1 an s2 differs from 2 seconds (wait 2000)

Greetz

Fernand

Hi Andrew,

Yes, that is what seems to be happening.  Even if there is a bit of code
between the Wait(2000) and the next Print #giInit, the time is the same.
Only if there is substantial code after the Wait(2000) does the time
change.  For example -
1.  04/04/2014 13:50:24
2.  04/04/2014 13:50:24
3.  04/04/2014 13:50:24
4.  04/04/2014 13:50:24
5.  B4 UpdateFundAndGenLed()  04/04/2014 13:50:24
6.  04/04/2014 13:50:28
7.  04/04/2014 13:50:28

After 5. the Init macro calls another macro.

Something odd seems to be happening with the Wait command. Perhaps I am
missing something.  You can see why I was wanting to get fractions of a
second in the print statements.

Noel

--
Marion & Noel Lodge
lodg...@gmail.com


On 4 April 2014 03:06, Andrew Douglas Pitonyak  
wrote:



So, are you saying that you have:


Print #giInit, "1.  " + Now()
Wait(2000)
Print #giInit, "2.  " + Now()

And it prints the same value for now?



On 04/03/2014 09:12 AM, Marion & Noel Lodge wrote:


Thanks for the replies to my original post.

They gave me something to work on and I have made some progress.  I 
think

that the macros run in series, but I am not yet sure of that.

For some reason the wait(2000) commands that I inserted into the the
macros
don't seem to work and I am getting several lines with the 
identical time

stamps, like this -
1.  03/04/2014 23:44:57
2.  03/04/2014 23:44:57
3.  03/04/2014 23:44:57

I looked up the formatting for time stamps and
DD:MM: hh:mm:ss.00 is supposed to give fractions of a second, 
but I

don't know how to apply this to the Now() function.

The code I am using to print to the text files is -

   giInit = FreeFile()
   Open "D:\LibreOffice\InitfTransEntry.txt" for Output as giInit
   Print #giInit, "1.  " + Now()

Any suggestions as to how I can format Now(), or should I use a 
different

function to get more accurate timing?

Thanks,

Noel
--
Noel Lodge
lodg...@gmail.com


On 2 April 2014 00:05, Andrew Douglas Pitonyak 
wrote:

  Sadly, I do not have a definitive answer to your question, but I 
do have

some thoughts... (see inline)


On 04/01/2014 06:57 AM, Marion & Noel Lodge wrote:

  Hi,
In opening my database accounting system, I trigger via the Form: 
When

loading event, a macro, (Sub Init()), containing the database
initialisation routines.

As the Form loads it displays the first record in the database,
including
the account number.   To make things easier for the user, the Text
modified
event on the account number control, triggers a macro, (Sub 
AccName()),

that displays the account name.

  And I assume that this is built into the form.


   Sometimes the system has crashed because it seems that Sub 
AccName()

has

fired before Sub Init() has finished.  (Sub AccName() depends on 
some of

the structures that Sub Init() sets up.)

Is it possible that both Subs are running in parallel or do they 
always

run
in series on a first come first served basis?

  Warning: Speculation... So insert the following text before each

statement
below:  "I am making a wild unsubstantiated guess that"

1. The form is populated before Init() finishes
2. AccName() is called as soon as text is pushed into the control.

So, if this is the case, then AccName may be called before Init()
finishes. If you really want to know if they run at the same time, 
you
could do a not so quick test and modify each routine so that the 
macro

does
something like this:

Sub Init()
Write current time to a file
delay a second or two
Do the work
delay a second or two
Write the current t

Re: [libreoffice-users] Do Macros run serially or in parallel?

2014-04-04 Thread Andrew Douglas Pitonyak
Oh, and you can use GetSystemTicks() to return the number of system 
ticks, which should be a better judge of when something occurred. Also, 
if Wait does not work, you can always use a busy wait based either on 
"now" or GetSystemTicks.


On 04/04/2014 03:23 AM, Fernand Vanrie wrote:

Noel , Andrew,

What system are you running ?

on windows the wait is doing OK

try this code


s1 = "1.  " + Now()
Wait(2000)
s2 = "2.  " + Now()
msgbox (s1 & chr(13)&  s2)

s1 an s2 differs from 2 seconds (wait 2000)

Greetz

Fernand

Hi Andrew,

Yes, that is what seems to be happening.  Even if there is a bit of code
between the Wait(2000) and the next Print #giInit, the time is the same.
Only if there is substantial code after the Wait(2000) does the time
change.  For example -
1.  04/04/2014 13:50:24
2.  04/04/2014 13:50:24
3.  04/04/2014 13:50:24
4.  04/04/2014 13:50:24
5.  B4 UpdateFundAndGenLed()  04/04/2014 13:50:24
6.  04/04/2014 13:50:28
7.  04/04/2014 13:50:28

After 5. the Init macro calls another macro.

Something odd seems to be happening with the Wait command. Perhaps I am
missing something.  You can see why I was wanting to get fractions of a
second in the print statements.

Noel

--
Marion & Noel Lodge
lodg...@gmail.com


On 4 April 2014 03:06, Andrew Douglas Pitonyak  
wrote:



So, are you saying that you have:


Print #giInit, "1.  " + Now()
Wait(2000)
Print #giInit, "2.  " + Now()

And it prints the same value for now?



On 04/03/2014 09:12 AM, Marion & Noel Lodge wrote:


Thanks for the replies to my original post.

They gave me something to work on and I have made some progress.  I 
think

that the macros run in series, but I am not yet sure of that.

For some reason the wait(2000) commands that I inserted into the the
macros
don't seem to work and I am getting several lines with the 
identical time

stamps, like this -
1.  03/04/2014 23:44:57
2.  03/04/2014 23:44:57
3.  03/04/2014 23:44:57

I looked up the formatting for time stamps and
DD:MM: hh:mm:ss.00 is supposed to give fractions of a second, 
but I

don't know how to apply this to the Now() function.

The code I am using to print to the text files is -

   giInit = FreeFile()
   Open "D:\LibreOffice\InitfTransEntry.txt" for Output as giInit
   Print #giInit, "1.  " + Now()

Any suggestions as to how I can format Now(), or should I use a 
different

function to get more accurate timing?

Thanks,

Noel
--
Noel Lodge
lodg...@gmail.com


On 2 April 2014 00:05, Andrew Douglas Pitonyak 
wrote:

  Sadly, I do not have a definitive answer to your question, but I 
do have

some thoughts... (see inline)


On 04/01/2014 06:57 AM, Marion & Noel Lodge wrote:

  Hi,
In opening my database accounting system, I trigger via the Form: 
When

loading event, a macro, (Sub Init()), containing the database
initialisation routines.

As the Form loads it displays the first record in the database,
including
the account number.   To make things easier for the user, the Text
modified
event on the account number control, triggers a macro, (Sub 
AccName()),

that displays the account name.

  And I assume that this is built into the form.


   Sometimes the system has crashed because it seems that Sub 
AccName()

has

fired before Sub Init() has finished.  (Sub AccName() depends on 
some of

the structures that Sub Init() sets up.)

Is it possible that both Subs are running in parallel or do they 
always

run
in series on a first come first served basis?

  Warning: Speculation... So insert the following text before each

statement
below:  "I am making a wild unsubstantiated guess that"

1. The form is populated before Init() finishes
2. AccName() is called as soon as text is pushed into the control.

So, if this is the case, then AccName may be called before Init()
finishes. If you really want to know if they run at the same time, 
you
could do a not so quick test and modify each routine so that the 
macro

does
something like this:

Sub Init()
Write current time to a file
delay a second or two
Do the work
delay a second or two
Write the current time to a file
End Sub

Use a different file for each subroutine, then compare the start 
and end

time to see if they overlap. You can probably get away with using a
simple
print statement at the start and end.


   If the latter, are there coding techniques that can be used to 
ensure

that


Sub Init() always runs first?

  If things run serially and AccName is called based on something 
done in

Init(), it may be possible that Init() cannot complete until after
   AccName() finishes.


I suppose that another possibility is to set a "Global" variable 
such as
"InitComplete". set to false when Init() starts, and set to true 
when it

completes. Modify AccName to check for InitComplete. If things are
serial,
then you may need to simply return. If not, then have AccName wait 
for a

few seconds and try again. If things are truly serial, then I would
expect
them to fail every time, and they don'

[libreoffice-users] Re: Modifying Styles

2014-04-04 Thread CVAlkan
Just a thought:

In the Tools|Options dialog, there is a section under LibreOffice|General
titled "Document Status."

Under that is a check box labelled: "Allow to save document even when the
document is not modified"

On your installation, is that box checked or unchecked?

That may not be your issue, but it might help narrow things down ...



--
View this message in context: 
http://nabble.documentfoundation.org/Modifying-Styles-tp4103518p4104116.html
Sent from the Users mailing list archive at Nabble.com.

-- 
To unsubscribe e-mail to: users+unsubscr...@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] MSO for iPad, big deal or big yawn

2014-04-04 Thread Tom Davies
Hi :)
A friend showed of his brand new Windows Phone and about a week later
grumbled that it had already slowed down and even given him a BSOD
type thing.

Getting onto Android makes sense, porting to iThings shortly after
would be great.  Windows would be nice but Android is the main one
imo.  Yes being as unprepared for Windows phones as MS was for Phones
and tablets to take off at all would be dumb but Android is the
top-seller by such a huge margin that it really needs to be the focus.

Windows might be free but even so, is it really worth even that much??
Regards from
Tom :)


On 4 April 2014 14:33, Kracked_P_P---webmaster
 wrote:
> On 04/03/2014 01:57 PM, Johnny Rosenberg wrote:
>>
>> About running Apache OpenOffice or LibreOffice on Android devices:
>> Wouldn't
>> it, in theory at least, be possible to run both of them if you first
>> install Ubuntu on your Android device? I know, then it's not Android any
>> more, but still...
>>
>>
>> Johnny Rosenberg
>>
>
> MS just announced that it will offer free MS OS for smartphones and tablets
> with a 9 inch or smaller display non-business device. They decided that
> since Android is free, MS OS should be free istead of asking the
> manufactures to pay $5 to $15 each device. They hope this will increase the
> MS OS mobile device market share.  They may also be offering a 1 year of
> free "cloud" services like Office 365 for these devices.
>
> So if they do start getting more market share on tablets, our developers may
> need to make sure LO would on tablet versions of Windows 8.1, like their own
> "tablet" device.  I do not know if anyone on these lists bought one of these
> MS tablets and/or knows if LO would work on them.  If it does, then we are
> prepared for that MS market grabbing "offer".
>
> As for Ubuntu on a tablet - I would like for someone to tell me OFF LIST how
> to do such a thing and what the system specs low end really is for Ubuntu on
> a tablet.  I have an old 7 inch that could use a new OS.
>
> --
> To unsubscribe e-mail to: users+unsubscr...@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

-- 
To unsubscribe e-mail to: users+unsubscr...@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] Re: Page margins

2014-04-04 Thread Tinkerer
Thank you Cor.
Your suggestion sounds a lot simpler.
Re CT2N.  Let me know when you update it.

Best regards, Tink.



--
View this message in context: 
http://nabble.documentfoundation.org/Page-margins-tp4103796p4104128.html
Sent from the Users mailing list archive at Nabble.com.

-- 
To unsubscribe e-mail to: users+unsubscr...@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] Meeting for active LibreOffice users Netherlands and Flanders: 5-4-2014

2014-04-04 Thread Tom Davies
Hi :)
Quick translate gave me
"this Saturday, there is a meeting for active LibreOffice users
Will take place in Woerden, to do with ... everything
Interest:. come along "
Regards from
Tom :)



On 3 April 2014 21:59, Cor Nouws  wrote:
> Hi,
>
> A little promo for those on the list reading Dutch!
>
> a.s. zaterdag is er een bijeenkomst voor actieve LibreOffice gebruikers.
> Zal plaatshebben in Woerden, met van alles te doen...
> Interesse: kom eens langs.
> Zie
>   https://wiki.documentfoundation.org/NL/bijeenkomst_2014-04-05
>
> Cheers,
>
> --
> Cor Nouws
> GPD key ID: 0xB13480A6 - 591A 30A7 36A0 CE3C 3D28  A038 E49D 7365 B134 80A6
> - vrijwilliger http://nl.libreoffice.org
> - volunteer http://www.libreoffice.org
> - The Document Foundation Membership Committee Member
>
>
> --
> To unsubscribe e-mail to: users+unsubscr...@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
>

-- 
To unsubscribe e-mail to: users+unsubscr...@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] Re: Microsoft Revisits the '80s With MS-DOS, Word for Windows Source Code,

2014-04-04 Thread CVAlkan
Not sure if my recollections are correct, but I don't believe either DOS
(before 2.x) or the DOS version of Word were written by Microsoft. I seem to
recall that both were purchased and re-branded.

Word for MS-DOS was typical of the approach Microsoft would perfect over
many subsequent years. Its success (actually not all that great) was based
almost entirely on marketing.

In its heyday, almost all word processors for the MS-DOS / PC-DOS platform
were at least as good as Word, and many were far superior. WordPerfect (4.x
and later) were far more suitable for anyone actually attempting to create a
document. Word, for instance, took up fully half of the available (80x25)
screen space with typically "intuitive" menus (isn't it obvious to a new
user that Esc-File-Transfer is the appropriate sequence for saving a file? -
and weren't most users pretty new back then?).

And as for printing, one needed to have a Microsoft "approved" (as opposed
to "supported;" even then, arrogance was one of their hallmarks) printer
(nothing wrong with Epson and Okidata, of course, but remember when the HP
LaserJet first appeared?) to get any output. Most of its competitors
supported many more devices. My recollection is that Microsoft Word's
support for the LaserJet (we had both where I worked when that first
appeared) came a good six months after WordPerfect's.

I remember training secretaries on an IBM standalone word processor machine
(can't recall the model, but it used 8" floppies); this effort went quite
smoothly. When we later began introducing those PC things, I had a devil of
a time training those same secretaries on Word (we fell for the OS-WP
compatibility argument), it was a disaster. We then shifted gears to
WordPerfect which had an even higher learning curve initially, but most
caught on to its way of thinking very quickly.

When WordPerfect 5.x arrived, there was even the ability to display a
graphic preview (almost WYSIWYG) display of the printed output on a normal
character screen - and this was available not only for DOS versions, but on
a wide variety of platforms such as the then popular DEC and DG terminals.
Since most other machines had standard VT-100 emulation, life was good for
WordPerfect users.

In those days as I recall, I only ran into a minority of businesses that
used Word. There were a good number of other pretty capable word processors
in use, a number of which also included "database" and other such modules
(too primitive to call them "suites," I suppose, but the idea was there. But
I think the combination of WordPerfect and Lotus 1-2-3 was far more common
than Word and (uh-oh, Excel didn't come along until later).

Sorry for the trip down memory lane, but I agree that this is undoubtedly
some sort of publicity stunt. Call me cynical, but I can't help wondering
what's up their sleeve with this.




--
View this message in context: 
http://nabble.documentfoundation.org/Microsoft-Revisits-the-80s-With-MS-DOS-Word-for-Windows-Source-Code-tp4103960p4104153.html
Sent from the Users mailing list archive at Nabble.com.

-- 
To unsubscribe e-mail to: users+unsubscr...@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] Intentionally crashing LibreOffice when frozen/LibreOffice will not start.

2014-04-04 Thread andrewH
I am working with a data set that keeps causing my LibreOffice to freeze. I
am pretty sure that this is only because it is big. It is a pipe-separated
text from the US Economic Census imported into Calc, about 30 columns and
around a million rows. (The actual data set is bigger, but Calc quits at a
million-odd. The complete file is about 0.8 gig.) I suspect but can not
prove that this is related to file handling somehow, e.g. breaking down
during auto-saving. The first time I saved the data as a Calc file it took
nearly an hour with the "soffice.bin *32" process running at 25 percent of
CPU time and using about 825 meg of memory the entire time. (Not sure why
this is showing up as a 32-bit version).  And when Calc freezes, all the
LibreOffice programs freeze. So I can't just switch to another file and
noodle away while waiting.

So of course, what I really want is a spreadsheet that reads more rows and
doesn't crash. But I assume others are already asking for that, & do not
know how to add anything helpful to that effort. So instead I am asking a
more modest question: What is the best way to crash a frozen LibreOffice if
I want to minimize the data and files lost?

Note that this is the question I started with. Now I have a new and more
urgent question: Why won't LibreOffice start at all? See below.

When Calc froze, I closed it in the usual way with the usual upper-right
close window button. This results in the message:

"The file '$(ARG1)' is corrupt and therefore cannot be opened. LibreOffice
can try to repair the file.

LO can try to repair the file. The corruption could be the result of
document manipulation or of structural document damage due to data
transmission. We recommend that you do not trust the content  of the
repaired document. Execution of macros is disabled for this document. Should
LO repair the file?"

I choose  

"Message "The file '$(ARG1)' could not be repaired and therefore cannot be
opened."

The document recovery window said "recovery of your documents was finished"
while the big spreadsheet still said "recovery in process" and a Writer file
said "not recovered yet". Three Writer files said "recovery
successful"Because no LibreOffice process seemed to be using much CPU time,
I assumed that it was again frozen rather than still working (though
"soffice.bin *32" still had 1.14 gig in memory) and hit the "finish" button. 

I got a message, "Fatal Error - Bad Allocation" and nothing was recovered. 

I tried opening Writer, and the document recovery box popped up again, but
with one fewer Writer files listed. This time it started on the spreadsheet,
never finished (though the window again said  "recovery of your documents
was finished") and never got to the remaining files, though I let it run all
night. In the morning I hit finis, and the recovery window disappeared with
nothing taking its place.

I tried to start Writer again. Nothing happened - no error, no window,
nothing. I tried opening a Writer document by clicking on it in Windows
Explorer. Nothing. I tried opening a (different) Calc file. 

Windows Task Manager shows five instances of soffice.bin *32 running, five
instances of soffice.exe * 32, and four instances of swriter.exe *32

I am running LibreOffice 4.2 on Windows 7 64-bit with SP1, on a Dell i5
machine with 24 gig of RAM. I do not recall there being a separate 64-bit
version, but the installer put it in my 64-bit programs directory.

Advice and suggestions most welcome.




--
View this message in context: 
http://nabble.documentfoundation.org/Intentionally-crashing-LibreOffice-when-frozen-LibreOffice-will-not-start-tp4104156.html
Sent from the Users mailing list archive at Nabble.com.

-- 
To unsubscribe e-mail to: users+unsubscr...@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] Re: Intentionally crashing LibreOffice when frozen/LibreOffice will not start.

2014-04-04 Thread Owen Genat
andrewH wrote
> I am working with a data set that keeps causing my LibreOffice to freeze.
> I am pretty sure that this is only because it is big. It is a
> pipe-separated text from the US Economic Census imported into Calc, about
> 30 columns and around a million rows. (The actual data set is bigger, but
> Calc quits at a million-odd. The complete file is about 0.8 gig.) I
> suspect but can not prove that this is related to file handling somehow,
> e.g. breaking down during auto-saving.
> 
> [...]
> 
> Because no LibreOffice process seemed to be using much CPU time, I assumed
> that it was again frozen rather than still working (though "soffice.bin
> *32" still had 1.14 gig in memory) and hit the "finish" button. 
> 
> [...] 
> 
> I am running LibreOffice 4.2 on Windows 7 64-bit with SP1, on a Dell i5
> machine with 24 gig of RAM. I do not recall there being a separate 64-bit
> version, but the installer put it in my 64-bit programs directory.

There is only a 32 bit version of LO for Windows, so that is not an issue.
It sounds to me as though the input filter is choking on the amount of data
to be read. The RAM usage figures are smaller than I would expect for that
amount of file data, although if it is uncompressed then it is less
surprising cf. with my testing in  this

  
AskLO answer. I have pushed Calc v4.2 even higher on occasion. If it is a
public dataset can you post a link for others to test?
Best wishes, Owen.



--
View this message in context: 
http://nabble.documentfoundation.org/Intentionally-crashing-LibreOffice-when-frozen-LibreOffice-will-not-start-tp4104156p4104164.html
Sent from the Users mailing list archive at Nabble.com.

-- 
To unsubscribe e-mail to: users+unsubscr...@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] Intentionally crashing LibreOffice when frozen/LibreOffice will not start.

2014-04-04 Thread Andrew Douglas Pitonyak

On 04/04/2014 07:44 PM, andrewH wrote:

I am working with a data set that keeps causing my LibreOffice to freeze. I
am pretty sure that this is only because it is big. It is a pipe-separated
text from the US Economic Census imported into Calc, about 30 columns and
around a million rows. (The actual data set is bigger, but Calc quits at a
million-odd. The complete file is about 0.8 gig.) I suspect but can not
prove that this is related to file handling somehow, e.g. breaking down
during auto-saving. The first time I saved the data as a Calc file it took
nearly an hour with the "soffice.bin *32" process running at 25 percent of
CPU time and using about 825 meg of memory the entire time. (Not sure why
this is showing up as a 32-bit version).  And when Calc freezes, all the
LibreOffice programs freeze. So I can't just switch to another file and
noodle away while waiting.


It looks to me as though Calc cannot handle more than 1048576 rows of data,

Do you have more rows than that? If yes, then I think that you cannot 
open the file.


If you have less than that, and, if you think that you are simply 
running out of memory if you can figure out how to get the data to 
me, I can run a test on a 64 bit version (running on Linux). My machine 
has 32 GB of RAM...



--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php


--
To unsubscribe e-mail to: users+unsubscr...@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