Re: copy part of text from api

2024-04-13 Thread Andrew Pitonyak
I will not have access to check (probably only my phone for a week or two), but 
can you pull xtransferable content from a cursor or range?

⁣Get BlueMail for Android ​

On Apr 13, 2024, 12:35 PM, at 12:35 PM, Zorg  wrote:
>Hello
>
>Hope some can help us here
>
>Here is the  problem
>
>
>We are developing our software using the uno api python
>(https://github.com/Probesys/lotemplate)
>
>We try to copy a text in a odt file and paste it without loosing the
>format of the text and without using the clipboard
>
>We know how to paste html
>
>https://github.com/Probesys/lotemplate/blob/master/lotemplate/classes.py
>
>(line 165-185)
>
>but we don't know how we can't copy a selected text without loosing
>format
>
>Actually we use .insertString
>
>https://github.com/Probesys/lotemplate/blob/master/lotemplate/Statement/ForStatement.py
>
>(line 286)
>
>
>I know it's possible to do it  using
>com.sun.star.datatransfer.clipboard.SystemClipboard
>
>But in that case we must embed a Xserver inside the docker container
>what we want to avoid
>
>So if anyone wants to give us a solution or a hint on how to do this
>
>thanks
>
>Zorg


Re: Seeking help with Windows build using v7.6.1.1

2023-09-04 Thread Andrew Richardson
Thank you for the input.  I scraped my original tree and restarted from
scratch under LODE's recommended '~/lode' path.  Seeing same build issues.
I have attempted to adjust my Norton 360 to exclude the LO build
processing, but it may still be a factor.
I am NOT willing to uninstall Norton on this machine, so I am aborting this
Windows build effort.
May try a Linux build to see if I have better luck...

On Mon, Sep 4, 2023 at 4:03 PM Noel Grandin  wrote:

>
> I am guessing either
>
> (a) anti-virus tool
>
> or
>
> (b) you are using a different git client and it has munged some line
> endings
>
>


Seeking help with Windows build using v7.6.1.1

2023-09-03 Thread Andrew Richardson
Hello all
Firstimer here, trying to set up initial Windows 11 build environment.  I
have followed the LODE instructions, using Visual Studio 2022 Community
edition.
I have set my 'dev/core' build tree to the 'libreoffice-7.6.1.1' tag using
git checkout.
I am seeing a few issues when doing a clean build.  Full build log (using
make -k switch) is available at link below.
Appreciate any help to fix these issues.
Thanks,
Andrew Richardson


1. Errors processing IDL files - Internal compiler problem
midl : error MIDL9008 : internal compiler problem - See documentation for
suggestions on how to find a workaround.
midl: Assertion failed: hr == S_OK, file com\rpc\midl\front\filehndl.cxx,
line 1024
make: ***
[C:/Users/spun6/LibreOffice/lode/dev/core/winaccessibility/CustomTarget_ia2_idl.mk:26:
C:/Users/spun6/LibreOffice/lode/dev/core/workdir/CustomTarget/winaccessibility/ia2/idl/ia2_api_all.h]
Error 48

midl : error MIDL9008 : internal compiler problem - See documentation for
suggestions on how to find a workaround.
midl: Assertion failed: hr == S_OK, file com\rpc\midl\front\filehndl.cxx,
line 1024
make: ***
[C:/Users/spun6/LibreOffice/lode/dev/core/winaccessibility/CustomTarget_ia2_idl.mk:26:
C:/Users/spun6/LibreOffice/lode/dev/core/workdir/CustomTarget/winaccessibility/ia2/idl/defines.h]
Error 48

midl : error MIDL9008 : internal compiler problem - See documentation for
suggestions on how to find a workaround.
midl: Assertion failed: hr == S_OK, file com\rpc\midl\front\filehndl.cxx,
line 1024
make: ***
[C:/Users/spun6/LibreOffice/lode/dev/core/winaccessibility/CustomTarget_ia2_idl.mk:26:
C:/Users/spun6/LibreOffice/lode/dev/core/workdir/CustomTarget/winaccessibility/ia2/idl/UAccCOM.h]
Error 48


2.  Errors processing IDL files - Invalid arguments
/usr/bin/sh: -c: line 1: syntax error near unexpected token `('
/usr/bin/sh: -c: line 1: `S=C:/Users/spun6/LibreOffice/lode/dev/core &&
I=$S/instdir && W=$S/workdir &&  midl.exe -tlb
$W/CustomTarget/shell/source/win32/spsupp/idl/spsupp.tlb -h
$W/CustomTarget/shell/source/win32/spsupp/idl/spsupp_h.h -iid
$W/CustomTarget/shell/source/win32/spsupp/idl/spsupp_i.c C:\Program
Files\Microsoft Visual
Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include;C:\Program
Files\Microsoft Visual
Studio\2022\Community\VC\Tools\MSVC\14.37.32822\ATLMFC\include;C:\Program
Files\Microsoft Visual
Studio\2022\Community\VC\Auxiliary\VS\include;C:\Program Files
(x86)\Windows Kits\10\include\10.0.22621.0\ucrt;C:\Program Files
(x86)\Windows Kits\10\include\10.0.22621.0\um;C:\Program Files
(x86)\Windows Kits\10\include\10.0.22621.0\shared;C:\Program Files
(x86)\Windows Kits\10\include\10.0.22621.0\winrt;C:\Program Files
(x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt;C:\Program Files
(x86)\Windows Kits\NETFXSDK\4.8\include\um
-IC:/PROGRA~2/WI3CF2~1/10/Include/10.0.22621.0/ucrt
-IC:/PROGRA~2/WI3CF2~1/10/include
-IC:/PROGRA~1/MICROS~4/2022/COMMUN~1/VC/Tools/MSVC/1437~1.328/Include
-IC:/PROGRA~2/WI3CF2~1/10/Include/10.0.22621.0/um
-IC:/PROGRA~2/WI3CF2~1/10/Include/10.0.22621.0/shared
-IC:/PROGRA~1/Java/jdk-20/include/win32 -IC:/PROGRA~1/Java/jdk-20/include
-Oicf $S/shell/source/win32/spsupp/spsupp.idl'
make: ***
[C:/Users/spun6/LibreOffice/lode/dev/core/shell/CustomTarget_spsupp_idl.mk:22:
C:/Users/spun6/LibreOffice/lode/dev/core/workdir/CustomTarget/shell/source/win32/spsupp/idl/spsupp.tlb]
Error 2


3. Configure fails for libffi component
configure: error: in
`/cygdrive/c/Users/spun6/LibreOffice/lode/dev/core/workdir/UnpackedTarball/libffi/x86_64-pc-cygwin':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: ***
[C:/Users/spun6/LibreOffice/lode/dev/core/external/libffi/ExternalProject_libffi.mk:28:
C:/Users/spun6/LibreOffice/lode/dev/core/workdir/ExternalProject/libffi/build]
Error 1

4. Build seems to hang (never completes when left overnight) after
'postgresql' component stage

File links:
   build.log::
https://drive.google.com/file/d/1KZJInodnQzf6SIUsVaW3er7Oi6dMOAZ7/view?usp=drive_link
   libffi config.log::
https://drive.google.com/file/d/1lssxS6Wnnaj1ehFt6gNnYjZBQ-kRGxz9/view?usp=drive_link


Re: paste html using API

2023-03-26 Thread Andrew Pitonyak

I have no idea if this will be of any use to you or not, but...

I do not generally use the API using Python so I cannot comment on using 
Python. 

I have also not used headless mode so I cannot comment on what is and is not 
available other than knowing that dispatches are not available. 

Finally, I have done almost nothing using the clipboard, but... 

First note that the clipboard should have content of different varieties. I 
assume that you are aware of this because you have a line as follows: 

 copy_with_format(value, 'text/html')
 
 And if I look at the clipboard I see this as an available type
 
   Dim sClipName As String
  Dim oClip As Object
  Dim oFlavors As Variant
  Dim oFlavor As Variant
  Dim i as Integer
  Dim s as String
  
  sClipName = "com.sun.star.datatransfer.clipboard.SystemClipboard"
  oClip = createUnoService(sClipName)
  oFlavors = oClip.getContents().getTransferDataFlavors()
  s = ""
  For i = LBound(oFlavors) To UBound(oFlavors)
    oFlavor = oFlavors(i)
    s = s & i & " : " & oFlavor.MimeType
    s = s & CHR$(10)
  Next
  MsgBox s
  
  
  I see that method defined in this code here: 
  
  
https://github.com/Probesys/lotemplate/blob/html_formatting/lotemplate/utils.py
  
  I see that you open a pipe. 
  
  I did some experiments and I am extracting the actual HTML. I assume that 
this is not really what you want, but this is how I extract it and display it. 
I was simply playing around with it out of curiousity.
  
    Dim sClipName As String
  Dim oClip As Object
  Dim oFlavors As Variant
  Dim oFlavor As Variant
  Dim i as Integer
  Dim idx as Integer
  Dim s as String
  
  sClipName = "com.sun.star.datatransfer.clipboard.SystemClipboard"
  oClip = createUnoService(sClipName)
  oFlavors = oClip.getContents().getTransferDataFlavors()
  s = ""
  idx = -1
  For i = LBound(oFlavors) To UBound(oFlavors)
    oFlavor = oFlavors(i)
    s = s & i & " : " & oFlavor.MimeType
    If oFlavor.MimeType = "text/html" Then
      idx = i
    End If
    s = s & CHR$(10)
  Next
  'MsgBox s
  
  If idx < 0 Then
    Print "text/html mime type not found"
    Exit Sub
   End If
  
  ' Now print the actual HMTL as a string!
  Dim oData As Variant
  oData = oClip.getContents().getTransferData(oFlavors(idx))
  s = ""
  For i = LBound(oData) To UBound(oData)
    s = s & CHR$(oData(i))
  Next
  MsgBox s

If I kept going, then I would attempt to then use the transferable content 
directly, which is obtained from oClip.getContents() I believe. But, one of the 
real questions is Does the clipboard have the contents shown in the correct 
format? I assume it does. 

So, perhaps this helps a little anyway. 

Andrew Pitonyak


On Sunday, March 26, 2023 06:06 EDT, Zorg  wrote:
  
Hello
Hope some can help me here
Here is my  problem

We are developing our software using the uno api python
We re trying to to copy a string formatted in html in a libreoffice odt
We manage to do it but using dispatcher
The problem is that dispatcher not working in headless mode so il force us to 
use a xserver (xvfb) et Xclip.
It work but it's far from being optimized.
here is the code 
https://github.com/Probesys/lotemplate/blob/html_formatting/lotemplate/classes.py
 line 349-355
We have try using XTransferable but without any success.
Thanks in advance for your help
Sorg   

 


Re: Bug 81720

2022-08-19 Thread Andrew Pitonyak
Phil,

You surely do NOT need my approval :-)

I was just asking since it seems consistent with other things in libre office.

Now I am curious about a field as the last thing in a document.  :-)

Had not considered using ESC to put the cursor out of a field, on the surface 
it feels like a really smart solution, but to be clear, if the devs choose to 
simply have an adjacent chair always be outside the field I would not complain, 
it would solve the end of document problem but makes it more difficult to 
append text in a field or deal with a one character looking field.

The zero length field... Uggg. Had not considered that one.

I am very happy to see how thoroughly y'all are working to get a correct 
solution.

Andrew.

⁣Get BlueMail for Android ​

On Aug 19, 2022, 7:26 PM, at 7:26 PM, Phillips Rogfield  
wrote:
>Hello,
>
>You are right that by putting the cursor to the left it writes normal
>text. It only happens when you put the cursor to the right of the
>field.
>
>It is not necessary that the field is the last thing in a file. It is
>sufficient it is the last thing in a paragraph. In this case you won't
>be able to insert text after the field without expanding the field. At
>least it will be not so simple. You will have to press Enter, space,
>left arrow, backspace, right arrow, and type.
>
>I also noticed an exception: if you don't select anything, and do
>Insert
>-> Cross Reference ->  Set Reference, type a name, press Insert and
>then
>Close, it will insert an empty reference (which I have no idea why it
>differs conceptually from a bookmark?). This empty reference will be
>not
>modifiable: nor by putting the cursor to the left nor to the right, the
>
>text of the reference will stay empty.
>
>So exception aside, I think maybe a good compromise would be that, if
>the user put the cursor on the right of a field, and press "Esc", it
>will start to type outside of the field, without expanding the field?
>Would that work?
>
>Best,
>
>Phil
>
>On 19/08/2022 16:04, Andrew Pitonyak wrote:
>> The general expected behavior in libre office, at least for me, is
>> that if I place the cursor and start typing, that it will continue
>> using the same attributes and properties of the character directly to
>
>> the left of the cursor. So, if I have bold text, and I placed the
>> cursor to the left of the bold text and I type, it will not be bold,
>> it will be whatever is to the left of the cursor. If the cursor is
>> immediately to the right of the bold text however then it will be
>bold.
>>
>> In this case, I assume, but have not verified or checked in anyway, 
>> references are a field. So the intent of this is to make certain that
>
>> when the cursor is sitting directly to the left or right of, whatever
>
>> is typed does not end up inside of that field. One side effect of
>this
>> I expect, is that if you have a field with only one character you
>will
>> have no way of modifying the text inside the field unless there is
>> some special case when the text of the field is selected. I did not
>> even check, can I select the text in a field? So what if the
>selection
>> is partially in a field?
>>
>> I would never have considered this a bug, I would have just
>considered
>> it an extension of expected behavior. The annoying part is that if
>the
>> field is the last thing in a file you have no way to add text after
>> the field unless you do it programmatically, but that is also true
>> last I checked of text tables.
>>
>> I hope other contributors to comments in the bugs are correct that it
>
>> is an easy fix, but I am skeptical.
>>
>> Get BlueMail for Android <https://bluemail.me>
>> On Aug 19, 2022, at 9:41 AM, Phillips Rogfield
>
>> wrote:
>>
>> Dear developers,
>>
>> I would like to fix bug 81720
>> <https://bugs.documentfoundation.org/show_bug.cgi?id=81720#c22>.
>>
>> Basically when you insert a ReferenceMark, if you put the cursor
>> at the edge of it (start or end), and type something, it will
>> expand on the reference mark instead of writing it as a “normal
>text”.
>>
>> You can find how to reproduce it in comment 22
>> <https://bugs.documentfoundation.org/show_bug.cgi?id=81720#c22>.
>>
>> I have set up my environment, but I’m not sure where is the code
>> that “checks” if something is a ReferenceMark, if anything.
>>
>> Can you point me in the right direction, please?
>>
>> Best,
>>
>> Phil
>>
>> ​
>>


Re: Bug 81720

2022-08-19 Thread Andrew Pitonyak
The general expected behavior in libre office, at least for me, is that if I 
place the cursor and start typing, that it will continue using the same 
attributes and properties of the character directly to the left of the cursor. 
So, if I have bold text, and I placed the cursor to the left of the bold text 
and I type, it will not be bold, it will be whatever is to the left of the 
cursor. If the cursor is immediately to the right of the bold text however then 
it will be bold.

In this case, I assume, but have not verified or checked in anyway,  references 
are a field. So the intent of this is to make certain that when the cursor is 
sitting directly to the left or right of, whatever is typed does not end up 
inside of that field. One side effect of this I expect, is that if you have a 
field with only one character you will have no way of modifying the text inside 
the field unless there is some special case when the text of the field is 
selected. I did not even check, can I select the text in a field? So what if 
the selection is partially in a field?

I would never have considered this a bug, I would have just considered it an 
extension of expected behavior. The annoying part is that if the field is the 
last thing in a file you have no way to add text after the field unless you do 
it programmatically, but that is also true last I checked of text tables.

I hope other contributors to comments in the bugs are correct that it is an 
easy fix, but I am skeptical.

⁣Get BlueMail for Android ​

On Aug 19, 2022, 9:41 AM, at 9:41 AM, Phillips Rogfield  
wrote:
>Dear developers,
>
>I would like to fix bug 81720
>.
>
>Basically when you insert a ReferenceMark, if you put the cursor at the
>
>edge of it (start or end), and type something, it will expand on the
>reference mark instead of writing it as a “normal text”.
>
>You can find how to reproduce it in comment 22
>.
>
>I have set up my environment, but I’m not sure where is the code that
>“checks” if something is a ReferenceMark, if anything.
>
>Can you point me in the right direction, please?
>
>Best,
>
>Phil
>
>​


Re: Headless mail merge

2022-04-06 Thread Andrew Pitonyak
The first step is always do it without a script until you like the result. Then 
you try to automate it.

I did it a few times many years ago and do not remember the process.

⁣Get BlueMail for Android ​

On Apr 6, 2022, 3:37 PM, at 3:37 PM, Marco Marinello  
wrote:
>Hi Andew,
>
>
>thank you for your answer. I'll take a look at the links you pointed
>to.
>
>The idea is, starting from a template in odt/doc/docx, to "fill in the
>gaps" and save the filled document. Is there any other way rather than
>mail merge?
>
>
>All the best,
>
>Marco
>
>
>Il 06/04/22 18:19, Andrew Pitonyak ha scritto:
>>
>> I had planned on documenting how to do this some years back and
>> AndrewBase.odt, and my only notes say that I should document the new
>> e-mail merge API released in OpenOffice.org version 2.01; that was a
>> long time ago. 
>>
>> I generally do not have reason to use mailmerge, but did you want to
>> send something by email or to print? 
>>
>> Someone posted a question about using mail merge with UNO in Basic
>here: 
>>
>>
>https://ask.libreoffice.org/t/syntax-for-using-spreadsheet-as-data-source-in-emailmerge-macro/24831
>>
>> From my perspective, the fact that they used the
>> server com.sun.star.text.MailMerge is useful in that it provides a
>> pointer to the service to look at. 
>>
>> Another request for help here: 
>>
>> https://forum.openoffice.org/en/forum/viewtopic.php?f=20=59312
>>
>> No answer; sadly. 
>>
>> In AndrewMacro.odt, there is an example that merges a bunch of
>> documents from a directory into a single document and it is listed as
>> being related to "mail merge", so I assume that somebody had run a
>> mail merge and this processes created many documents. But again, I
>> have not run a mail merge in many years. 
>>
>> On Wednesday, April 06, 2022 06:47 EDT, Marco Marinello
>>  wrote:
>>  
>>> Hi all,
>>>
>>>
>>> what's the easiest way to perform a mail-merge with libreoffice by
>>> passing arguments from an automated script? Should I use UNO?
>>>
>>> Do you have any reference?
>>>
>>>
>>> Thanks in advance,
>>>
>>> Best,
>>>
>>> Marco
>>>
>>>  
>>
>>
>>  


Re: Headless mail merge

2022-04-06 Thread Andrew Pitonyak

I had planned on documenting how to do this some years back and AndrewBase.odt, 
and my only notes say that I should document the new e-mail merge API released 
in OpenOffice.org version 2.01; that was a long time ago. 

I generally do not have reason to use mailmerge, but did you want to send 
something by email or to print? 

Someone posted a question about using mail merge with UNO in Basic here: 

https://ask.libreoffice.org/t/syntax-for-using-spreadsheet-as-data-source-in-emailmerge-macro/24831

>From my perspective, the fact that they used the server 
>com.sun.star.text.MailMerge is useful in that it provides a pointer to the 
>service to look at. 

Another request for help here: 

https://forum.openoffice.org/en/forum/viewtopic.php?f=20=59312

No answer; sadly. 

In AndrewMacro.odt, there is an example that merges a bunch of documents from a 
directory into a single document and it is listed as being related to "mail 
merge", so I assume that somebody had run a mail merge and this processes 
created many documents. But again, I have not run a mail merge in many years. 

On Wednesday, April 06, 2022 06:47 EDT, Marco Marinello 
 wrote:
 Hi all,


what's the easiest way to perform a mail-merge with libreoffice by
passing arguments from an automated script? Should I use UNO?

Do you have any reference?


Thanks in advance,

Best,

Marco

 

 


Re: tdf#140286 - CALC formula =INFO("OSVERSION") gives wrong output

2022-01-17 Thread Andrew Pitonyak

On Monday, January 17, 2022 17:17 EST, Wol  wrote:
 On 14/01/2022 22:24, Wols Lists wrote:
> On 14/01/2022 21:26, Chris Sherlock wrote:
>> I will work on a patch for Linux that parses /etc/os-release with a
>> fallback to just the kernel version if that is not available
>> (virtually all desktop systems use systemd now).
>
> Are you sure?
>
> Okay, it's mostly the mad hold-outs, but Devuan, funtoo, gentoo, that's
> three distros off the top of my head that don't default to systemd. And
> they're the ones (gentoo especially) that devs might well be running.
>
> I think a sane set of options from uname is much better. That's pretty
> much guaranteed to be universal, I believe, and you could even make the
> options a user-specified matter should they be mad enough to want to.
>
Just looked at /etc/os-release (as you may have guessed my gentoo system
does run systemd), and the ONLY useful information you'll get from it is
"Gentoo Linux".
So for those people who want more than just the distro name, os-release
is not enough.

anthony@thewolery ~/gitstuff/ScarletDME $ cat /etc/os-release
NAME=Gentoo
ID=gentoo
PRETTY_NAME="Gentoo/Linux"
ANSI_COLOR="1;32"
HOME_URL="https://www.gentoo.org/;
SUPPORT_URL="https://www.gentoo.org/support/;
BUG_REPORT_URL="https://bugs.gentoo.org/;
anthony@thewolery ~/gitstuff/ScarletDME $

Cheers,
WolI like the "PRETTY_NAME" and VERSION_ID as provided by /etc/os-release, and 
this is usually enough for most people. I commonly ask people which version of 
their OS they are running, but I rarely ask for more details than that; 
although I will admit that a certain Windows 10 release was not supporting 
something I was doing. 

What do you show from /proc/version? Lots of useful information ther, but, I 
need to work harder to recognize that my primary computer is running FEDORA. 

[andy@DESKTOP-6U3CUIF ~]$ cat /proc/version
Linux version 5.15.13-200.fc35.x86_64 
(mockbu...@bkernel01.iad2.fedoraproject.org) (gcc (GCC) 11.2.1 20211203 (Red 
Hat 11.2.1-7), GNU ld version 2.37-10.fc35) #1 SMP Wed Jan 5 16:39:13 UTC 2022



 


Re: ConfigManager warning

2021-12-26 Thread Andrew Pitonyak
Not that it helps your problem, but this is how I do it in basic

https://www.pitonyak.org/AndrewFontMacro.odt


⁣Get BlueMail for Android ​

On Dec 26, 2021, 2:08 PM, at 2:08 PM, Chris Sherlock 
 wrote:
>Hi all,
>
>I'm writing a basic utility to list font details, but I'm getting the
>following warning when I invoke the program:
>
>warn:unotools.config:79699:79699:unotools/source/config/configmgr.cxx:147:
>ConfigManager not empty
>
>Gerrit change is here:
>
>https://gerrit.libreoffice.org/c/core/+/127365
>
>Anyone know why this warning occurs? And how would I prevent it?
>
>Chris


bug related to how Basic handles arrays of Structures, location suggestions

2021-12-06 Thread Andrew Pitonyak

Wolfgang,
I verified that there is a bug related to how Basic handles arrays of 
Structures.
I tested against LibreOffice 7.2.2.2 on Fedora Linux as well as Windows 7.1.2.2 
and 7.2.4.1 so I filed a bug report:
https://bugs.documentfoundation.org/show_bug.cgi?id=146082
Note that a Structure copies by value, not be reference.
A work around until the bug is fixed, is to not use a notation such as:
 
Dim p(1 To 2) As PersonType
Dim p(1 To 2) As New com.sun.star.awt.Point
 
Instead, define the array as an Object or Variant and then initialize each entry
 
p(1) = CreateUnoStruct( "com.sun.star.awt.Point" )
p(2) = CreateUnoStruct( "com.sun.star.awt.Point" )
 
Use CreateObject("PersonType") for user defined types.
 
Developers,
 
Any suggestions as to where I might find the code where an array is 
“initialized” or where to look for handling to suggest what might cause the 
really strange behavior? I have not looked at LibreOffice code or built it for 
a while now.
 
Clearly there are differences in how an UNO struct and a user defined structure 
is created and stored since an array value might show as different depending on 
whether or not we copy it after access it. And how different solutions vary 
depending on the type after passed as an argument.
 
For those who are interested but too lazy to look up the bug referenced above:
 
This bug was originally noted with a user defined type so I wrote a test using 
a built-in UNO Struct com.sun.star.awt.Point
 
Test using User type “PersonType”
 
Type PersonType
FirstName As String
LastName As String
End Type
 
Sub PrintPersons(s, x)
Print "Expect (" & s & ") found (" & x.FirstName & " " & x.LastName & ")"
End Sub
 
Sub PrintPoint(s, x)
Print "Expect " & s & " Found (" & x.X & ", " & x.Y & ")"
End Sub
 
This is the original disturbing code. Attempting to copy an element from the 
array causes problems. The same when trying to assign back into to the array.
 
 
Sub otherExampleCreateNewType
REM Producing very strange errors.
REM Inspect the two array elements and h at the same time
REM down to the inside variables while executing lines 19 through 21 stepwise.
 
Dim Person(1 To 2) As PersonType
Person(1).FirstName = "Andrew"
Person(1).LastName = "Pitonyak"
Person(2).FirstName = "Funny"
Person(2).LastName = "Lupp"
 
PrintPersons("Andrew", Person(1)) ' Andrew (correct)
PrintPersons("Funny", Person(2)) ' Funny (correct)
 
Dim h As PersonType
h = Person(1)
Person(1) = Person(2)
Person(2) = h
PrintPersons("Funny", Person(1)) ' Andrew (wrong)
PrintPersons("Andrew", Person(2)) ' Funny (wrong)
 
REM Now look at the prints, and frown.
Dim h1 As PersonType, h2 As PersonType
h1 = Person(1)
h2 = Person(2)
PrintPersons("Funny", h1) ' Funny (correct)
PrintPersons("Andrew", h2) ' Funny (wrong)
 
End Sub
 
Next I run this using a built-in UNO type and have exactly the same incorrect 
behaviors
Sub otherExampleCreateAWTPoint
 
Dim p(1 To 2) As New com.sun.star.awt.Point
p(1).X = 1
p(1).Y = 2
p(2).X = 3
p(2).Y = 4
 
PrintPoint("(1, 2)", p(1)) ' Correct
PrintPoint("(3, 4)", p(2)) ' Correct
 
Dim h As New com.sun.star.awt.Point
h = p(1)
p(1) = p(2)
p(2) = h
PrintPoint("(3, 4)", p(1)) ' wrong
PrintPoint("(1, 2)", p(2)) ' wrong
 
REM Now look at the prints, and frown.
Dim h1 As New com.sun.star.awt.Point, h2 As New com.sun.star.awt.Point
h1 = p(1)
h2 = p(2)
PrintPoint("(3, 4)", h1) ' Correct
PrintPoint("(1, 2)", h2) ' Wrong
 
End Sub
 
I then changed how the array is declared as shown below and this fixed the 
problematic
 
Dim p(1 To 2) As Object
p(1) = CreateUnoStruct( "com.sun.star.awt.Point" )
p(2) = CreateUnoStruct( "com.sun.star.awt.Point" )
 
Doing the same for the PersonType also causes it to work as expected:
 
Dim Person(1 To 2) As Object
Person(1) = CreateObject("PersonType")
Person(2) = CreateObject("PersonType")
 
It gets worse. If I modify the subroutine to always make a copy of the object 
and then use the object that is passed to the subroutine, then suddenly the 
first program works for points, but the same fix does not work when done for 
PersonType.
 
Sub PrintPoint(s, y)
Dim x
x = y
Print "Expect " & s & " Found (" & x.X & ", " & x.Y & ")"
End Sub
 
Clearly something is wrong / inconsistent.
 
 
 


Error during start of building LibreOffice 7.2.0.1

2021-07-18 Thread Andrew Udvare
I got a syntax error from sh/make with the latest version.

The Makefile.in file has a command that runs through the shell with @. It uses 
\ to separate lines. It contains a comment on the second line that is not 
consumed by make and is not properly consumed by Bash.

https://github.com/LibreOffice/core/blob/master/Makefile.in#L63

I used sed to remove this line to successfully build: "/# if the 
systemd-detect-virt command/d"

I can understand that perhaps another shell will correctly consume this, but on 
macOS latest this does not work. It may be because /bin/sh is still an old copy 
of Bash while Apple is moving to ZSH.

 $ /bin/sh --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin20)
Copyright (C) 2007 Free Software Foundation, Inc.

-- 
Andrew Udvare
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - ucb/source

2021-04-14 Thread Andrew Udvare (via logerrit)
 ucb/source/ucp/webdav/webdavprovider.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 80146da04ce3595aa95f30d7490b83c048b0a000
Author: Andrew Udvare 
AuthorDate: Thu Dec 24 06:04:16 2020 -0500
Commit: Andras Timar 
CommitDate: Thu Apr 15 00:21:33 2021 +0200

ucp: fix call to getComponentContext

Commit 3f9940c2e050830051a31e4b70736132e034a9db mistakenly removed
include/ucbhelper/getcomponentcontext.hxx seeing the getComponentContext 
method
as unused.
According to that file, ucbhelper::getComponentContext was just a duplicate 
of
comphelper::getComponentContext so this commit changes to calling that 
method
instead.

Change-Id: Ibd66b56a72afce437a26417d7944ec1ace34a4eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108262
Reviewed-by: Julien Nabet 
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx 
b/ucb/source/ucp/webdav/webdavprovider.cxx
index 462e4e5a98f7..570b36e6180c 100644
--- a/ucb/source/ucp/webdav/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav/webdavprovider.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
 #include 
 #include 
 #include "webdavprovider.hxx"
@@ -106,7 +107,7 @@ static css::uno::Reference< css::uno::XInterface >
 ContentProvider_CreateInstance( const css::uno::Reference< 
css::lang::XMultiServiceFactory> & rSMgr )
 {
 css::lang::XServiceInfo* pX =
-static_cast(new ContentProvider( 
ucbhelper::getComponentContext(rSMgr) ));
+static_cast(new ContentProvider( 
comphelper::getComponentContext(rSMgr) ));
 return css::uno::Reference< css::uno::XInterface >::query( pX );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Problem with make

2021-04-02 Thread Andrew Hany
I've tried over 4 times to run the "make" command after installing all
dependencies and following the instructions on
https://wiki.documentfoundation.org/Development/BuildingOnWindows
However, it always gets stuck for hours at some point in the make process
after it keeps running normally for 6-7 hours. So I've been unable to
finish the make process.
P.s: I make sure my anti-virus software is turned off at that time.
- I've also tried running the Linux build instructions through a virtual
machine but still with no luck. Any suggestions on what I could do?
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Stuck while building

2021-04-01 Thread Andrew Hany
I'm trying to build LibreOffice on my Windows laptop in order to start
working on easy hacks and my proposal. However I am stuck with this command:
C:/cygwin64/opt/lo/bin/make

Attached below is where CYGWin was stuck for the past 5 hours. Any ideas on
how to solve this ? ( My antivirus is turned off ).
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: bin/unpack-sources

2021-02-25 Thread Andrew Udvare (via logerrit)
 bin/unpack-sources |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit f3b7dc649bc384be6000d98a87763cab26fe3f32
Author: Andrew Udvare 
AuthorDate: Fri Dec 18 03:23:37 2020 -0500
Commit: Thorsten Behrens 
CommitDate: Fri Feb 26 00:33:45 2021 +0100

fix unpack-sources to not require GNU find

This makes bin/unpack-sources work on systems that do not have
GNU coreutils in PATH, such as macOS.

Change-Id: I54ed219eedf0f45c039edb6e486f3afe273dd51f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107936
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/bin/unpack-sources b/bin/unpack-sources
index 2408eda1e14c..7221696e199f 100755
--- a/bin/unpack-sources
+++ b/bin/unpack-sources
@@ -85,7 +85,7 @@ for tarball in $tarballs ; do
 fi
 
 # create symlinks for module directories; ignore git-hooks directory
-for dir in `find "$lo_src_dir/$tarname" -mindepth 1 -maxdepth 1 -type d 
-path $lo_src_dir/$tarname/git-hooks -o -printf "$tarname/%f\n"` ; do
-ln -sf "src/$dir" "$start_dir"
-done
+while read -r dir; do
+ln -sf "src/${tarname}/$(basename "$dir")" "$start_dir"
+done < <(find "$lo_src_dir/$tarname" -mindepth 1 -maxdepth 1 -type d -path 
$lo_src_dir/$tarname/git-hooks)
 done
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: dependency-confusion

2021-02-21 Thread Andrew Udvare

On 21/02/2021 16:43, Rene Engelhard wrote:

And LibreOffice Online *does* use npm.


So while LibreOffice itself shouldn't be affected, conceptually by using
npm LibreOffce Online is.


I think if you use 'npm install' (or 'yarn install'), the manager should 
be pulling in the correct version and then hash checking based on the 
contents of the .lock file. Running `npm update`, `npm install package>` or similar may be affected.


The real issue is when a new dependency gets added or updated but 
everything seems normal, in that the replacement dependency has stubs to 
not make the code crash, but also does nefarious things in the 
background. There would be no way to know without deep inspection, and 
npm dependency trees are usually huge.


--
Andrew



OpenPGP_signature
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: dependency-confusion

2021-02-21 Thread Andrew Udvare


> On 2021-02-20, at 16:48, Jean-Baptiste Faure  wrote:
> 
> Hi,
> 
> I certainly did not understand everything in 
> https://medium.com/@alex.birsan/dependency-confusion-4a5d60fec610, but I 
> wonder if LibreOffice could be subject to this kind of vulnerability?

As far as I can tell, the dependencies that LibreOffice uses in distributions 
are gathered manually and updated manually. So, not really.

-- 
Andrew

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Patch: fix unpack-sources to not require GNU find

2021-02-18 Thread Andrew Udvare
Requesting review.

Patch submitted here a few months ago: 
https://gerrit.libreoffice.org/c/core/+/107936

The find that comes with macOS is BSD find and does not have -printf.

On macOS: $ man /usr/share/man/man1/find.1 | grep -F printf
(No results)

On Linux: $ man /usr/share/man/man1/find.1* | grep -F printf
   -delete, -exec, -execdir, -ok, -okdir, -fls, -fprint, -fprintf, -ls, 
-print and -printf.
  -printf with the %F directive to see the types of your 
filesystems.

Thanks

-- 
Andrew Udvare


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Added some information about Qt Creator IDE integration to the wiki

2021-02-10 Thread Andrew Pitonyak

Very nice, appreciated by my anyway!

On Wednesday, February 10, 2021 09:25 EST, Hossein Noorikhah 
 wrote:
 Hi,

I have added some information about how to use Qt Creator for
building, running and debugging LibreOffice in the appropriate section
of the wiki:
https://wiki.documentfoundation.org/Development/IDE#Qt_Creator

I think other sections related to other IDEs also need to be revised
and improved, because not everything works out of the box in the IDEs.

Regards,
Hossein
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: configure.ac

2021-02-09 Thread Andrew Udvare (via logerrit)
 configure.ac |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit d1dc51f95f9e831aa6adbbeff549c2017d2dfd82
Author: Andrew Udvare 
AuthorDate: Tue Dec 29 15:18:06 2020 -0500
Commit: Michael Stahl 
CommitDate: Tue Feb 9 18:36:23 2021 +0100

configure.ac: allow --enable-python=system on macOS if PYTHON is non-empty

This will work as long as a valid Python is in PATH, such as 
/usr/bin/python3
from Xcode or another version in some prefix like /opt/local.

Change-Id: Ic967c3ce2f9949d94c11c3449363841a1565cfa9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108486
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/configure.ac b/configure.ac
index e6607334b067..78bb7998e62c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9238,8 +9238,9 @@ AC_SUBST(XMLLINT)
 # Optionally user can pass an option to configure, i. e.
 # ./configure PYTHON=/usr/bin/python
 # =
-if test $_os = Darwin -a "$enable_python" != no -a "$enable_python" != 
fully-internal -a "$enable_python" != internal; then
+if test $_os = Darwin -a "$enable_python" != no -a "$enable_python" != 
fully-internal -a "$enable_python" != internal -a "$enable_python" != system; 
then
 # Only allowed choices for macOS are 'no', 'internal' (default), and 
'fully-internal'
+# unless PYTHON is defined as above which allows 'system'
 enable_python=internal
 fi
 if test "$build_os" != "cygwin" -a "$enable_python" != fully-internal; then
@@ -9311,7 +9312,7 @@ fully-internal)
 ;;
 system)
 AC_MSG_RESULT([system])
-if test "$_os" = Darwin; then
+if test "$_os" = Darwin -a -z "$PYTHON"; then
 AC_MSG_ERROR([--enable-python=system doesn't work on macOS because the 
version provided is obsolete])
 fi
 ;;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Crash on macOS with some custom fonts installed

2021-01-26 Thread Andrew Udvare
A user has reported that with some custom fonts installed, LibreOffice will 
crash at startup. This is with the latest 7.0.4.2 build.

https://trac.macports.org/ticket/62119

It appears the crash is in vcl/quartz/ctfonts.cxx in the 
DevFontFromCTFontDescriptor() function.

https://github.com/LibreOffice/core/blob/7a83d0a268a348a86dd31acbac94872eab82f75b/vcl/quartz/ctfonts.cxx#L304

Stack shows:

/usr/lib/system/libsystem_platform.dylib+0x3d7d(_sigtramp+0x1d)[0x7fff203b0d7d]
/usr/lib/system/libsystem_malloc.dylib+0x67aa(tiny_free_no_lock+0x45c)[0x7fff201977aa]
/Applications/MacPorts/LibreOffice.app/Contents/Frameworks/libvclplug_osxlo.dylib+0x34896
 
/Applications/MacPorts/LibreOffice.app/Contents/Frameworks/libvclplug_osxlo.dylib+0x35067
 DevFontFromCTFontDescriptor(__CTFontDescriptor const*, bool*)
/Applications/MacPorts/LibreOffice.app/Contents/Frameworks/libvclplug_osxlo.dylib+0x35067fontEnumCallBack(void
 const*, void*)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation+0x4562f(CFArrayApplyFunction+0x3e)[0x7fff2042862f]
SystemFontList::Init()
GetCoretextFontList()

Don't know yet which font is causing the issue, but the user does not want to 
disable a font (which works fine in other apps presumably) just to use LO.

-- 
Andrew Udvare


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


108486: configure.ac: add --enable-bogus-system-python

2021-01-07 Thread Andrew Udvare
https://gerrit.libreoffice.org/c/core/+/108486

Hi all,

My change is to allow macOS users to pick their own Python version for Pyuno. 
This is mostly intended for the MacPorts build but it can be applied to any 
user on macOS wanting to build the source to use with their own version of 
Python. The new option --enable-bogus-system-python is marked as not 
recommended to signal that this is not typically used. Unlike the 
bogus-pkg-config check, it does not test whether the Python version specified 
is actually 'bogus' (broken).

On macOS, /usr/bin/python3 can exist but without Xcode et al installed it is a 
stub. After Xcode et al is installed, it is a valid Python installation to 
build against. Note that MacPorts links against its own Python 3 implementation 
and not Apple's.

MacPorts port data: 
https://github.com/macports/macports-ports/tree/master/office/libreoffice (the 
webdav patch is already in https://gerrit.libreoffice.org/c/core/+/108262 )

We want to limit the amount of packages and duplicates of things like Python 
implementations. And as with all packages (ports) generally, our goal is to be 
able to build LibreOffice in the MacPorts environment without patches.

Thanks

-- 
Andrew Udvare
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: ucb/source

2020-12-24 Thread Andrew Udvare (via logerrit)
 ucb/source/ucp/webdav/webdavprovider.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f14b83b38d35a585976ef5d422754d8e0d0266a6
Author: Andrew Udvare 
AuthorDate: Thu Dec 24 06:04:16 2020 -0500
Commit: Noel Grandin 
CommitDate: Fri Dec 25 06:19:42 2020 +0100

ucp: fix call to getComponentContext

Commit 3f9940c2e050830051a31e4b70736132e034a9db mistakenly removed
include/ucbhelper/getcomponentcontext.hxx seeing the getComponentContext 
method
as unused.
According to that file, ucbhelper::getComponentContext was just a duplicate 
of
comphelper::getComponentContext so this commit changes to calling that 
method
instead.

Change-Id: Ibd66b56a72afce437a26417d7944ec1ace34a4eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108262
Reviewed-by: Julien Nabet 
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx 
b/ucb/source/ucp/webdav/webdavprovider.cxx
index 462e4e5a98f7..570b36e6180c 100644
--- a/ucb/source/ucp/webdav/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav/webdavprovider.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
 #include 
 #include 
 #include "webdavprovider.hxx"
@@ -106,7 +107,7 @@ static css::uno::Reference< css::uno::XInterface >
 ContentProvider_CreateInstance( const css::uno::Reference< 
css::lang::XMultiServiceFactory> & rSMgr )
 {
 css::lang::XServiceInfo* pX =
-static_cast(new ContentProvider( 
ucbhelper::getComponentContext(rSMgr) ));
+static_cast(new ContentProvider( 
comphelper::getComponentContext(rSMgr) ));
 return css::uno::Reference< css::uno::XInterface >::query( pX );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: FastSaxParser ans XFastParser

2020-11-26 Thread Andrew Pitonyak
I think that it is an external package. Search for libxml c++

so does my expectation that you need to install it and then make sure that your 
library includes no to look where it is installed. The latter part might come 
for free depending on your environment. For example, I'm Linux I probably could 
use dnf install  libXML and then everything would just work. But I'm just 
guessing.

Hopefully this at least gives you a place to look

⁣Sent from BlueMail ​

On Nov 26, 2020, 5:38 PM, at 5:38 PM, "Dante Doménech" 
 wrote:
>Hello.
>I'm sorry for asking stuff like this, but I'm not a full fledged
>developer
>and stuff like this is quite hard for me.
>
>Starmath mathml is supposed to use FastSaxParser (or I understand
>that). At
>least changes on FastSaxParserImpl will have repercussions on it.
>However,
>on mathmlimport.cxx we do use XFastParser. However FastSaxParser is a
>child
>class of XFastParser, so changes on it should not have repercussions on
>it's parent.
>
>So, what are we actually doing? And how has this stuff to be treated?
>Or at least some kind of documentation emplaining which kind of process
>are
>we using.
>
>If you try to copy paste the code outside to do some customized parser,
>it
>will break. There is that #*include* 
>
>which there is nowhere to be found (opengrok also fails in looking for
>it).
>There is no such file inside the only libxml directory to be found and
>the
>others files with that name don't seem to be related by the stuff that
>breaks when removed: xmlEntity, xmlEntityPtr, xmlChar, ... xml basic
>definitions.
>
>So, does anyone know which file is it?
>
>
>
>
>___
>LibreOffice mailing list
>LibreOffice@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


RE: calc: jumbo sheets on windows (never gonna happen)

2020-10-06 Thread Andrew Pitonyak
I think that the important point is that people do it in excel. They then try 
to open the file and they cannot. I have certainly been handled really large 
files perhaps it is simply a CSV file with lots of rows and I know how to deal 
with the spreadsheet so that's how I open it. Quick and dirty and off we go.

In general, these types of files come from a client so what are you going to 
do. I cannot tell you the number of times that someone has said hey we want to 
be able to open that in a spreadsheet program.

how often I see it is highly dependent on which projects I happen to be working 
at the time period. I think it's crazy? Yes. Do people do it successfully? Yes.

⁣Sent from BlueMail ​

On Oct 6, 2020, 6:22 PM, at 6:22 PM, nicholas ferguson 
 wrote:
>Can I ask what kind of platform would you use for 16 million rows that
>involve calculations?
>
>From: LibreOffice [mailto:libreoffice-boun...@lists.freedesktop.org] On
>Behalf Of Dan Lewis
>Sent: Tuesday, October 06, 2020 2:59 PM
>To: libreoffice@lists.freedesktop.org
>Subject: Re: calc: jumbo sheets on windows (never gonna happen)
>
>From my perspective, one needs to learn how to create a database in
>Base including tables, queries, forms and report when working with this
>much data. It is designed to handle large amounts of it. MySQL,
>Postgresql, and Oracle can be used as a backend  for Base being the
>front end.
>Dan
>On 10/6/20 12:09, Noel Grandin wrote:
>Hi
>
>i.e. very large spreadsheets of up to 16 million rows.
>
>So I did some more investigation into this. In various places, we need
>to accumulate things like row-heights and other things, numbers which,
>with jumbo sheets, easily exceed 32-bits.
>
>HOWEVER
>
>All over the place, we pass these values through
>sal_uLong/sal_Long/long/unsigned long.
>
>Which is 32-bits on Windows. Doh!
>
>Honestly, the only solution I can think of (and one I confidently
>expect us to reject), is that we declare a flag day, and search and
>replace sal_Long/sal_uLong/long/unsigned long with a 64-bit type across
>the ENTIRE code base.
>
>Regards, Noel Grandin.
>
>
>
>
>___
>LibreOffice mailing list
>LibreOffice@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/libreoffice
>
>
>
>
>___
>LibreOffice mailing list
>LibreOffice@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re[2]: Enabling Calc macro recording

2020-08-18 Thread Andrew Pitonyak

I guess if it will end up in the documentation, I should be more specific and 
not just go from memory!

The most versatile method to manipulate an LO document is to get the internal 
UNO objects and manipulate them. Using the model provides significant control, 
but you must understand much about the different services and interfaces. 
Another method, which requires very little understanding of the LO internals, 
is to use a UNO dispatcher. The macro recorder uses the dispatcher for all 
commands. The dispatcher requires (1) the command to dispatch such as 
".uno:Undo", (2) arguments that control the dispatch, and (3) an object capable 
of performing the dispatch. When writing your own macros, it is usually better 
to use the object model rather than the dispatcher. That said, some things are 
best handled by the dispatcher; for example, controlling the clipboard. The 
problem with using the macro recorder are that: 

1. The dispatches are not documented and are stated to be subject to change; 
although I have not seen them change over time. 
2. The recorder ignores some values from dialogs that are opened while 
recording a macro. It is possible, therefore, that you will record a 
complicated macro that will not actually playback everything that you did. One 
example is CSV import, the generated macro does nothing. I just verified that 
this is true. 


Side note, my book OOME, which is available as a free download, contains a 
macro that will enumerate the supported dispatches. Last time I ran it, it 
generated over 300,000 rows of dispatch commands. 

On Tuesday, August 18, 2020 14:40 EDT, "Steve (GMail)" 
 wrote:
  Thanks Andrew. I feel a need to put a brief clarification in Chapter 12 of 
the 7.0 Calc Guide. Regards, Steve  -- Original Message --From: "Andrew 
Pitonyak" To: "Steve (GMail)" 
Cc: "Development List" 
Sent: 18/08/2020 19:31:34Subject: Re: 
Enabling Calc macro recording It may not record input from a dialog. As an 
example, if you import a CSV file, I think that it does not remember the 
parameters that you used for the import. 

The macro it produces does not use commands that directly modify the underlying 
object model but instead build an object to encapsulate each call and send that 
object. This can make it more difficult to modify the created macro. 

On Tuesday, August 18, 2020 14:00 EDT, "Steve (GMail)" 
 wrote:
  All, In Calc, I notice the option to enable macro recording at Tools > 
Options > LibreOffice > Advanced is entitled "Enable macro recording (may be 
limited)".  Can anybody advise what to "(may be limited)" caveat refers to? 
Regards,
Steve Fanning 


 


 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Enabling Calc macro recording

2020-08-18 Thread Andrew Pitonyak

It may not record input from a dialog. As an example, if you import a CSV file, 
I think that it does not remember the parameters that you used for the import. 

The macro it produces does not use commands that directly modify the underlying 
object model but instead build an object to encapsulate each call and send that 
object. This can make it more difficult to modify the created macro. 

On Tuesday, August 18, 2020 14:00 EDT, "Steve (GMail)" 
 wrote:
  All, In Calc, I notice the option to enable macro recording at Tools > 
Options > LibreOffice > Advanced is entitled "Enable macro recording (may be 
limited)".  Can anybody advise what to "(may be limited)" caveat refers to? 
Regards,
Steve Fanning 


 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Forced Updates? WTF?

2020-06-09 Thread Andrew Pitonyak
Ten computers, have not seen this behavior even though I want it on a few of 
them. Did not even know LO could do it.

⁣Sent from BlueMail ​

On Jun 9, 2020, 6:49 PM, at 6:49 PM, "Christoph Schäfer" 
 wrote:
>
>
>> Gesendet: Dienstag, 09. Juni 2020 um 09:36 Uhr
>> Von: "Mike Kaganski" 
>> An: "Christoph Schäfer" ,
>LibreOffice@lists.freedesktop.org
>> Betreff: Re: Forced Updates? WTF?
>>
>> On 09.06.2020 3:22, Christoph Schäfer wrote:
>> > I never thought this was possible with LO, but it looks like the
>developers have chosen to override my default settings (notification,
>but no automatic updates). Yet, an update from 6.3 to 6.4 (Windows 10)
>has been enforced on me, which also led to data loss, as well as losing
>the "Recently Used" entries in the File dialogue.
>> >
>> >
>> > If this wasn't an attempt by Microsoft to damage LO (I'm on Windows
>10), I have to ask: What the hell were you thinking?
>> >
>> >
>> > This is unacceptable.
>>
>> ... so re-wording all that, "I don't know what had happened; and I
>don't
>> tell you all the details (like how had I installed LO in the first
>place
>> - e.g. from MSI taken from TDF site, or from Windows Store); and
>which
>> "helpful software" might be installed on my system helping to keep
>> software "up-to-date"; and I even don't know if that was some
>deliberate
>> decision, or a bug, - but I choose to be rude from start."
>>
>> I doubt it being acceptable.
>>
>> --
>
>Hi,
>
>It's true, I don't know what happened. I originally installed LO via
>the MSI installers from the TDF site, and I have no other "helpful
>software" regarding updates on my computers. Oh, wait, on my laptop I
>have installed a Windows update blocker, and yet the LO update happened
>in the background. At least on the laptop the "Recently Used" list
>wasn't lost, but the icon set reverted to the default setting. On my PC
>even the list was lost, the icon set was also changed, and the document
>restauration didn't work after the PC was forced to reboot, so I lost
>some work.
>
>If TDF is responsible for this (and I added a qualifier to my original
>post), I actually consider this to be rude behaviour.
>
>Christoph
>
>
>___
>LibreOffice mailing list
>LibreOffice@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: How do I get rid of this error? Macro file requires OpenOffice but I would like to use Libreoffice

2020-03-11 Thread Andrew Pitonyak
Not able to test for at least a week, but am curious what this causes an error.

where it fails, it verifies is something by that name is there and then it 
tries to remove it. If I was able to run a test I could check to make sure that 
the method is exist, but the real question, is do you have write access to 
whatever it is is trying to modify?

⁣Sent from BlueMail ​

On Mar 11, 2020, 3:00 PM, at 3:00 PM, Patrick Kariuki 
 wrote:
>I'm running a macro file on LibreOffice 6.2.8.2 and keep getting this
>- https://imgur.com/a/tpDocIu
>
>Error is on this code - https://pastebin.com/S9RtUWVK at Line 1327
>
>Please assist (I can send more information if required)
>
>Thanks.
>___
>LibreOffice mailing list
>LibreOffice@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sw/qa

2020-03-07 Thread Andrew Lee (李健秋) (via logerrit)
 sw/qa/extras/tiledrendering/tiledrendering.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 8905ed739110050f713c3f8030bd747fed1cb0dc
Author: Andrew Lee (李健秋) 
AuthorDate: Sat Mar 7 19:10:02 2020 +0800
Commit: Michael Meeks 
CommitDate: Sat Mar 7 17:47:38 2020 +0100

Add single setActive for all tests in tiledrendering module

Originally there are 'setActive' in the 1st call of each tests in the
tiledrendering module.

Here we add a single setActive to replace the 1st call of each tests.

Signed-off-by: Andrew Lee (李健秋) 
Change-Id: I7e8a6fa39d2d4bf0e4eab2e30cbee7437e59ef9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90157
Tested-by: Jenkins
Reviewed-by: Michael Meeks 

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 214b6352f9f6..2062b937ac9a 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -62,6 +62,7 @@ class SwTiledRenderingTest : public SwModelTestBase
 {
 public:
 SwTiledRenderingTest();
+virtual void setUp() override;
 virtual void tearDown() override;
 void testRegisterCallback();
 void testPostKeyEvent();
@@ -220,6 +221,13 @@ SwTiledRenderingTest::SwTiledRenderingTest()
 {
 }
 
+void SwTiledRenderingTest::setUp()
+{
+SwModelTestBase::setUp();
+
+comphelper::LibreOfficeKit::setActive(true);
+}
+
 void SwTiledRenderingTest::tearDown()
 {
 if (mxComponent.is())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/qa

2020-03-07 Thread Andrew Lee (李健秋) (via logerrit)
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   75 -
 1 file changed, 75 deletions(-)

New commits:
commit 54c6230a19359ef6ea6a11ed326c520cdbe271d4
Author: Andrew Lee (李健秋) 
AuthorDate: Sat Mar 7 19:15:19 2020 +0800
Commit: Michael Meeks 
CommitDate: Sat Mar 7 17:48:04 2020 +0100

Drop replaced setActive call of each tests in tiledrendering module

We added a single setup method to replaced setActive call in each
tests.

This commit drop all the replaced setActive call in each tests in
this tiledrendering module.

Signed-off-by: Andrew Lee (李健秋) 
Change-Id: If0d0b8f6cd03bfbb935bd8a0023530799f5cde34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90158
Tested-by: Jenkins
Reviewed-by: Michael Meeks 

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 2062b937ac9a..1e8baea4312f 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -364,7 +364,6 @@ void SwTiledRenderingTest::callbackImpl(int nType, const 
char* pPayload)
 
 void SwTiledRenderingTest::testRegisterCallback()
 {
-comphelper::LibreOfficeKit::setActive();
 SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
 SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
 
pWrtShell->GetSfxViewShell()->registerLibreOfficeKitViewCallback(::callback,
 this);
@@ -395,7 +394,6 @@ void SwTiledRenderingTest::testPostKeyEvent()
 
 void SwTiledRenderingTest::testPostMouseEvent()
 {
-comphelper::LibreOfficeKit::setActive();
 SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
 SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
 pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, 
/*bBasicCall=*/false);
@@ -439,8 +437,6 @@ void SwTiledRenderingTest::testSetTextSelection()
 
 void SwTiledRenderingTest::testGetTextSelection()
 {
-comphelper::LibreOfficeKit::setActive();
-
 SwXTextDocument* pXTextDocument = createDoc("shape-with-text.fodt");
 // No crash, just empty output for unexpected mime type.
 CPPUNIT_ASSERT_EQUAL(OString(), 
apitest::helper::transferable::getTextSelection(pXTextDocument->getSelection(), 
"foo/bar"));
@@ -522,8 +518,6 @@ void SwTiledRenderingTest::testResetSelection()
 
 void SwTiledRenderingTest::testInsertShape()
 {
-comphelper::LibreOfficeKit::setActive();
-
 SwXTextDocument* pXTextDocument = createDoc("2-pages.odt");
 SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
 
@@ -552,8 +546,6 @@ static void lcl_search(bool bBackward)
 
 void SwTiledRenderingTest::testSearch()
 {
-comphelper::LibreOfficeKit::setActive();
-
 SwXTextDocument* pXTextDocument = createDoc("search.odt");
 SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
 
pWrtShell->GetSfxViewShell()->registerLibreOfficeKitViewCallback(::callback,
 this);
@@ -619,8 +611,6 @@ void SwTiledRenderingTest::testSearchViewArea()
 
 void SwTiledRenderingTest::testSearchTextFrame()
 {
-comphelper::LibreOfficeKit::setActive();
-
 SwXTextDocument* pXTextDocument = createDoc("search.odt");
 SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
 
pWrtShell->GetSfxViewShell()->registerLibreOfficeKitViewCallback(::callback,
 this);
@@ -653,7 +643,6 @@ void SwTiledRenderingTest::testSearchTextFrameWrapAround()
 
 void SwTiledRenderingTest::testDocumentSizeChanged()
 {
-comphelper::LibreOfficeKit::setActive();
 // Get the current document size.
 SwXTextDocument* pXTextDocument = createDoc("2-pages.odt");
 SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
@@ -671,8 +660,6 @@ void SwTiledRenderingTest::testDocumentSizeChanged()
 
 void SwTiledRenderingTest::testSearchAll()
 {
-comphelper::LibreOfficeKit::setActive();
-
 SwXTextDocument* pXTextDocument = createDoc("search.odt");
 SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
 
pWrtShell->GetSfxViewShell()->registerLibreOfficeKitViewCallback(::callback,
 this);
@@ -691,7 +678,6 @@ void SwTiledRenderingTest::testSearchAll()
 
 void SwTiledRenderingTest::testSearchAllNotifications()
 {
-comphelper::LibreOfficeKit::setActive();
 SwXTextDocument* pXTextDocument = createDoc("search.odt");
 SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell();
 
pWrtShell->GetSfxViewShell()->registerLibreOfficeKitViewCallback(::callback,
 this);
@@ -714,8 +700,6 @@ void SwTiledRenderingTest::testSearchAllNotifications()
 
 void SwTiledRenderingTest::testPageDownInvalidation()
 {
-comphelper::LibreOfficeKit::setActive();
-
 SwXTextDocument* pXTextDocument = createDoc(&quo

Re: Writing a LibreOffice extension that logs user (and other) events in real-time

2019-11-28 Thread Andrew Pitonyak
Take a look at event listeners to see what they can do

the biggest problems will probably be related to things such as understanding 
which event listeners get called in which orders and also things like what will 
cause an event listener to disappear such as changing from a print view to a 
regular view

and finally some of that information could be really tricky such as 
understanding that they have selected a particular region when what you really 
have access to is things like mouse clicks and down and up and that sort of 
thing.



⁣Sent from BlueMail ​

On Nov 28, 2019, 7:20 PM, at 7:20 PM, Chide Groenouwe  wrote:
>Hi,
>
>I'm new to LibreOffice extension development. To prevent my team and I
>investing too much time in studying how to write LibreOffice
>extensions, I want to pose a question:
>
>Is it possible to capture/intercept all - or at least most - user
>events that occur within LibreOffice by means of an extension, in real-
>time? For example, suppose that someone
>
>0) opens a new document in Writer by using the drop-down menu item "New
>-> Text Document",
>1) types a text,
>2) selects a region using the mouse,
>3) presses the Italic button (so that the region becomes Italic), and
>4) saves the text by pressing Ctrl-s.
>
>Can you log all this information in real-time? Could you even log each
>keypress of the user when this user is writing the text? And can you
>also differentiate between the different methods that have been used to
>accomplish a certain task? For example, can one distinquish between
>saving a file by selecting a drop-down menu item, or saving a file by
>using the short-cut key Ctrl-s?
>
>Can this also be done for *other* extensions? Can you also log events
>that occur within these?
>
>Or should we use another approach to accomplish this all?
>
>(Although not needed for answering the question: If you wonder - the
>context has something to do with process mining (
>https://en.wikipedia.org/wiki/Process_mining) --  in this case to
>optimise software usage...)
>
>Thank you so much in advance,
>
>Chide Groenouwe
>
>
>
>
>___
>LibreOffice mailing list
>LibreOffice@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Andrew D. Todd license statement

2019-09-24 Thread Andrew Todd
To whom it may concern:

I, Andrew D. Todd, birthright citizen of the United States of America, and of 
the state of West Virginia, and of the county of Monongalia in West Virginia, 
being sixty-one years of age, under no legal disability, subject to no 
coercion, and of sound mind, will, and spirit:

Whereas I have transmitted to LibreOffice , and to the Open Document 
Foundation, a draft of a computer program, “ws_htm” (r 9, September 22, 2019), 
for the conversion of WordStar files to HTML. 

And whereas I propose to establish a “gerrit” account for the transmission of 
additional materials.

I declare the program, and every future version of it which I may create, to be 
in the public domain, and I further stipulate, with full legal severability, 
that:

All of my past & future contributions to LibreOffice may be licensed under the 
MPLv2/LGPLv3+ dual license. 

Done this day, September 24, 2019, at Morgantown, West Virginia.

Andrew D. Todd
   1249 Pineview Dr., Apt 1
   Morgantown, WV 26505
   USA

   a_d_t...@rowboats-sd-ca.com
andrew2david2t...@icloud.com

  Tel (North America): 304-599-0210

http://rowboats-sd-ca.com/

Sent from my iPhone
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

RE: need help to insert an image with a caption with the Libo java API

2019-09-06 Thread Andrew Pitonyak
Expression")
oField.NumberingType = com.sun.star.style.NumberingType.ARABIC
oField.NumberFormat = FindCreateNumberFormatStyle("###0", oDoc)
oField.attachTextFieldMaster(oMasterField)
oField.Content = name & " + 1"
Constants used to set the numbering type are set as shown in the Table 150.

Things to note.

1. The document creates field that you want to insert. 
2. The SetExpression field itself is directly attached to the associated Master 
field (attachTextFieldMaster). 
3. I actually create my own numbering style, I don't know what the default is 
or what happens if you do not set the style.  I just don't remember. 
4. This little snippet does not actually show you inserting the field. You do 
this by inserting text content with a text cursor. 
5. You will not see anything displayed, at least not correctly, until after you 
update fields from the menu. In the example I posted, i used a dispatch to do 
this for you. 

There is a full example that replaces text references for figures with actual 
fields such as this. I had a document with a bunch of manually entered values 
and I wanted to use fields. It was created before I knew how to do that using 
the UI. 

So, I hope this helps some. 

I am overdue for pushing a new copy of OOME4.odt; I made some changes in other 
areas, I just need to push it. 



On Friday, September 06, 2019 09:51 EDT, LORENZO Vincent 
 wrote:
  
Hi Andrew,

   Thank you for your answer. In fact I want to create a numbered caption 
(something like « Figure 1 : my nice caption ») under an inserted image and I 
want to create a table of figure with these captions to list all images.

-  The image is well inserted

-  The Table Of Figure is created and works fine when I add manually an 
image with a caption in the generated document.

-  This table of Figure doesn’t work for the image inserted 
programmatically, probably, because I don’t know how to create properly a 
numbered caption.


 
I’m a bit confused about the SetExpression, DependentField, field master, … I 
will continue to investigate about that, but if you have some references for 
me, please don’t hesitate.


 
Regards,

/Vincent Lorenzo


 
De : Andrew Pitonyak 
Envoyé : jeudi 5 septembre 2019 22:57
À : LORENZO Vincent 
Cc : Kaganski Mike ; Miklos Vajna 
; sos ; libreoffice@lists.freedesktop.org
Objet : RE: need help to insert an image with a caption with the Libo java API 
 wrote:
 

Hello everybody,
Since my last question, I switched task. Now I come back to my LibreOffice task 
to resolve my caption problem.
I'm still blocked on this problem. I get a different result compared to my last 
email, but the reference for the caption is still not found.
I replace Illustration by Figure, but the problem keeps the same.

I obtain a text:sequence-ref instead of a text:sequence. Does someone know why 
or which is the API to use to generate a text:sequence...

My result for the numbering of the caption:
Erreur : source de la référence non 
trouvée (the french text said "reference not found")

I would like to get :
1

My java code for that :

Object oReference = 
xMultiServiceFactory.createInstance("com.sun.star.text.textfield.GetReference");
XPropertySet oReferencePropertySet = 
UnoRuntime.queryInterface(XPropertySet.class, oReference);
oReferencePropertySet.setPropertyValue("SourceName", "Figure");// I get 
 De la part de 
LORENZO Vincent
Envoyé : vendredi 15 février 2019 14:37
À : Kaganski Mike ; Miklos Vajna 
; sos 
Cc : libreoffice@lists.freedesktop.org
Objet : [PROVENANCE INTERNET] RE: need help to insert an image with a caption 
with the Libo java API

Hello everybody,
I thank you for your answers. Yes I want to add an image with a caption 
programmatically and I want a caption like this "Illustration 1 : My caption"
To my mind, it would be better/cleaner if I was able to generate the same thing 
than I do the UI. Thanks to you, I succeed to build the expected structure for 
the image and to set a text below it, but I still have some problems, mainly 
with the GetReference.

The GetReference generates :
Erreur : source de la référence non 
trouvée (sorry my Libo is in French, it is written "Sorry 
: source of the reference not found").

And I would like to get a text:sequence instead of a text:reference, to get 
this result:
1

Please, do you know how I can build a text:sequence ?

Please found in attachment the java code I wrote [1], the expect xml structure 
[2] and the current xml structure [3].
I know I have some difference between [2] and [3] with the width/height 
properties and inside the draw frame, but it is not the subject of this thread.

[1] insertImage.java
[2] expectedResult.xml
[3] currentResult.xml

In addition, I have more generic question, do you know if it exists a 
documentation, indicating mapping, between the xml elements and how to 
get/create them from java ? For example, in xml svg:width

RE: need help to insert an image with a caption with the Libo java API

2019-09-05 Thread Andrew Pitonyak

Are you looking to insert the caption, or the reference to the caption? I think 
you want to insert a reference to a dependent field for a text field master. 
Does this sound correct? 

The text field master, which is of type: 

com.sun.star.text.fieldmaster.SetExpression.Figure

But you want to reference a Dependent field. If my guess is correct, this is 
how I insert a reference to the first Figure using Basic. Note that there is 
almost no error checking, so, this could go very wrong. 

Sub Main
  Dim oField
  Dim oNewField
  Dim oText
  Dim oCurs
  Dim oReferencedField
  Dim oEnum
  Dim oDispatcher      ' Dispatcher object.
  Dim oFrame

 ' Setup to perform a dispatch.
  oFrame = ThisComponent.CurrentController.Frame
  oDispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

  oText = ThisComponent.getText()
  oCurs = ThisComponent.CurrentController.getViewCursor()

    oEnum = ThisComponent.getTextFields().createEnumeration()
    If Not IsNull(oEnum) Then
    Do While oEnum.hasMoreElements()


      oField = oEnum.nextElement()
      'Inspect oField
      If oField.supportsService("com.sun.star.text.TextField.SetExpression") 
Then
        If oField.VariableName = "Figure" Then
          Print "Found one"
          Exit Do
        End If
      End If
    Loop
  End If

  ' No error checking, I just assume that I found one. DANGER DANGER DANGER


  oNewField = 
ThisComponent.createInstance("com.sun.star.text.textfield.GetReference")
  oNewField.ReferenceFieldPart = 
com.sun.star.text.ReferenceFieldPart.CATEGORY_AND_NUMBER
  oNewField.ReferenceFieldSource = 
com.sun.star.text.ReferenceFieldSource.SEQUENCE_FIELD
  oNewField.SequenceNumber = oField.SequenceValue
  oNewField.SourceName = "Figure"
  oText.insertTextContent(oCurs, oNewField, True)
  
  ' This next part will NOT work until after all of the fields have updated.
  ' So, force an update.
  oDispatcher.executeDispatch(oFrame, ".uno:UpdateFields", "", 0, Array())
End Sub


On Thursday, September 05, 2019 10:59 EDT, LORENZO Vincent 
 wrote:
 Hello everybody,
Since my last question, I switched task. Now I come back to my LibreOffice task 
to resolve my caption problem.
I'm still blocked on this problem. I get a different result compared to my last 
email, but the reference for the caption is still not found.
I replace Illustration by Figure, but the problem keeps the same.

I obtain a text:sequence-ref instead of a text:sequence. Does someone know why 
or which is the API to use to generate a text:sequence...

My result for the numbering of the caption:
Erreur : source de la référence non 
trouvée (the french text said "reference not found")

I would like to get :
1

My java code for that :

Object oReference = 
xMultiServiceFactory.createInstance("com.sun.star.text.textfield.GetReference");
XPropertySet oReferencePropertySet = 
UnoRuntime.queryInterface(XPropertySet.class, oReference);
oReferencePropertySet.setPropertyValue("SourceName", "Figure");// I get 
 De la part de 
LORENZO Vincent
Envoyé : vendredi 15 février 2019 14:37
À : Kaganski Mike ; Miklos Vajna 
; sos 
Cc : libreoffice@lists.freedesktop.org
Objet : [PROVENANCE INTERNET] RE: need help to insert an image with a caption 
with the Libo java API

Hello everybody,
I thank you for your answers. Yes I want to add an image with a caption 
programmatically and I want a caption like this "Illustration 1 : My caption"
To my mind, it would be better/cleaner if I was able to generate the same thing 
than I do the UI. Thanks to you, I succeed to build the expected structure for 
the image and to set a text below it, but I still have some problems, mainly 
with the GetReference.

The GetReference generates :
Erreur : source de la référence non 
trouvée (sorry my Libo is in French, it is written "Sorry 
: source of the reference not found").

And I would like to get a text:sequence instead of a text:reference, to get 
this result:
1

Please, do you know how I can build a text:sequence ?

Please found in attachment the java code I wrote [1], the expect xml structure 
[2] and the current xml structure [3].
I know I have some difference between [2] and [3] with the width/height 
properties and inside the draw frame, but it is not the subject of this thread.

[1] insertImage.java
[2] expectedResult.xml
[3] currentResult.xml

In addition, I have more generic question, do you know if it exists a 
documentation, indicating mapping, between the xml elements and how to 
get/create them from java ? For example, in xml svg:width is called Height in 
the java API, and my Textframe becomes mailto:mikekagan...@hotmail.com]
Envoyé : mercredi 13 février 2019 11:42
À : Miklos Vajna ; LORENZO Vincent 

Cc : libreoffice@lists.freedesktop.org
Objet : Re: need help to insert an image with a caption with the Libo java API

On 13.02.2019 12:45, Miklos Vajna via LibreOffice wrote:
> Hi,
>
> On Tue, Feb 12, 2019 at 09:27:15AM +, LORENZO Vincent 
>  wrote:
>> I would like to add a caption, to an inserted 

Re: Reveal Codes macros now works

2019-07-11 Thread Andrew Pitonyak

I expect that if I add GPL code to my code, then my code becomes GPL. I think 
that is why LGPL was developed because if I linked to a GPL library there was 
concern that then your entire code base became GPL. 

I am not a lawyer, but it is why I won't use GPL code in my code unless I 
intend to release it as such. 

In this case, I added a few lines of code to code that is labeled GPL. This is 
not significant code, it is a few fixes. It can stay as GPL. Normally I release 
my code as open. 

On Thursday, July 11, 2019 02:32 EDT, Uwe Brauer  wrote:
 
> On 10/07/19 17:54, Andrew Pitonyak wrote:

> I would also appreciate having a copy of them to try. Unfortunately, I
> am likely to be highly critical, but then, I hope those comments will be
> helpful.

Please take in mind, that Andrew is not the original author. I find it
very generous of him to provide his help to make these macros work. My
hope is, as I said elsewhere, that others developer get and idea of the
feature and might generalize it to not read only.

> Please do email them directly ...

> No your changes are NOT GPL if you don't want them to be. Please mark
> your changes as being under the LO MPL licence. Okay, the resultant file
> can only be *distributed* under the GPL, but if somebody then rewrites
> the GPL stuff out, the file will change to LO licence.

I am not sure I understand (I am no lawyer, but I have contributed over
the years to GPL software).
I thought GPL is a rather capitalistic license, you obtain something
(code) you have to pay for it (by your code).

So if you modify a existing program under GPL (and I think modify means
here more than 5 lines of code, either add functionality or modify it),
you must release the code under the same license. You are not allowed to
release them under stay CC, or MIT or whatsoever. So when you say your
code, do you mean these 5 lines and whether you can release these 5
lines under the license of your choice. Is that what you mean?

Regards

Uwe


 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: Reveal Codes macros now works

2019-07-10 Thread Andrew Pitonyak

On Wednesday, July 10, 2019 10:52 EDT, Uwe Brauer  wrote:
 >>> "AP" == Andrew Pitonyak  writes:

> There was so much static related to the orginal question, that I opted to 
> simply started a new thread. 
> I was provided with a linke to the orignal documents:

> https://web.archive.org/web/20180326030224/http://homepages.paradise.net.nz/hillview/OOo/

> There are three documents and I have the original description listed below, 
> but, this is what I did. 
> I ignored the original document. I have working copies of documents 2
> and 3. They are not well tested, but, they are in the ODT format, and
> they seem to do what they are supposed. I don't think i can attach
> them. I can post them to my own site later tonight, or, I can post
> them in some other suggested location. 

I would very much appreciate having a copy of these three files.

As for the site, I can't come up with any solution I have tested.
Dropbox is out of question I presume.

Thanks again for you work.

UweI only worked through two of the documents (number 2 and number 3). I can 
post them to my personal web site if we have no common place to put such 
things; I just need to take the time to do it. If you don't mind if I email 
them directly,  i can make that happen even faster than posting them on my web 
site. 

Side note: The macros are marked GPL, which is kind of viral in nature, which 
makes my changes (which are clearly marked with " ' ADP " in the comments) 
under the same license.  My expectation is that any changes I made will be very 
similar for the first document, which I did not touch or try. The things that I 
needed to change were as follows: 

1. An UNO enum was TypeClass.String (or something similar) and it needed to 
be TypeClass.STRING. I don't know if it changed, or, if something else changed. 
Last time I concerned myself with such things, the first use of an enum had to 
be the same case, but subsiquent uses were case insensitive. 

2. In a few places, there were some array access errors, so, I added "On Error 
ResumeNext" and then I primed the return value with something specific, made 
the call, then I used "On Error GoTo 0" to disable error trapping. 

3. Very similar to 2, but some integer (nProperty I think) was -1 rather than a 
valid value, so, I tested for it. I did not work hard to understand the 
impliciations. 

The odd errors that I received last time I looked at this did not appear, not 
sure why. I never did figure out why the third document did not have an obvious 
way to call the configure dialog, but (1) I did not spend a lot of time looking 
for it and (2) I think it was intended to be installed and I did not install it 
or even look at how to install it. My primary focus was to make the macros not 
fail. My expectation is that I missed something, but, it is probably easily 
fixed if you see the pattern. 

Andrew Pitonyak
and...@pitonyak.org




 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Reveal Codes macros now works

2019-07-09 Thread Andrew Pitonyak

There was so much static related to the orginal question, that I opted to 
simply started a new thread. 
I was provided with a linke to the orignal documents:

https://web.archive.org/web/20180326030224/http://homepages.paradise.net.nz/hillview/OOo/

There are three documents and I have the original description listed below, 
but, this is what I did. 
I ignored the original document. I have working copies of documents 2 and 3. 
They are not well tested, but, they are in the ODT format, and they seem to do 
what they are supposed. I don't think i can attach them. I can post them to my 
own site later tonight, or, I can post them in some other suggested location. 

This is the originally posted description. 

RevealCodes.sxw - This is very much a work in progress that I need some 
feedback on. The concept is to try and provide the sort of functionality that 
WordPerfect's RevealCodes. At this stage it is fairly primitive - I need 
feedback as to what people want so that I can improve it. Last updated 10 June 
2004.

RevealCodes2.sxw - This is an alternative to the above RevealCodes and is, 
perhaps, closer to the way WordPerfect works. If you want this macro to be 
improved then give me feedback! Either directly or via the forum thread: 
http://www.oooforum.org/forum/viewtopic.php?p=36976. Last updated 06 Oct 2004.

RevealCodes3.sxw - A third alternative. This macro requires to be installed to 
be able to use it - therefore it doesn't have a Demo button. Use RevealCodes2 
above for a general concept demo. This version is configurable, including 
button colours and what happens when you click a button. Last updated 
12-Nov-2004.

 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: Reveal code, old macros convert them to LO

2019-07-04 Thread Andrew Pitonyak
So I read your response to say...

If it is a read only display them it is not worth the time to bother with it...

That is certainly easier than trying to make it work :-)

⁣Sent from BlueMail ​

On Jul 4, 2019, 10:26 PM, at 10:26 PM, Wols Lists  
wrote:
>On 05/07/19 03:15, Wol's lists wrote:
>> On 04/07/2019 11:08, Uwe Brauer wrote:
>>>
>>>  From time to time the question pops up whether LO could support
>>> Wordperfects reveal code. Sometimes it is stated that this feature
>could
>>> be implemented by a macro/extension.
>>
>> Bear in mind that "reveal codes" is an EDITING window. That was what
>was
>> wrong with MS's pale imitation. So if your macros merely display the
>> formatting of a paragraph, that is NOT NOT NOT "reveal codes", and
>any
>> WordPerfect lover will simply ignore it.
>
>As a quick example - which illustrates its power - I seem to remember a
>post to this list a week or so ago which said "if the first thing in a
>writer document is a table, how do I put something in front of it?".
>Word struggles with this, writer struggles with it ...
>
>In WordPerfect, in RevealCodes, just click *in front* of the [table-on]
>code, and start typing ... easy peasy !!!
>
>Cheers,
>Wol
>___
>LibreOffice mailing list
>LibreOffice@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: Writer TextTable access via the UNO API

2019-06-21 Thread Andrew Pitonyak

In OOME, I do not really discuss this, but, I do in AndrewMacro.odt where I 
claim (in the section "Enumerating cells in any text table" that you need to 
first use getCellNames() and then use getCellByName(aName).

If you want to be even more complete, you may need to worry about things such 
as sections, floating frames, etc. Annoying, right? I don't think that I have 
ever written code that attempts to enumerate all of these things to get every 
XText object. Luckily, some of these things you can simplify by enumerating 
certain objects independtly; for example, you could enumerate a Single XText 
object in a single method, and then get all of the text tables using 
oDoc.getTextTables() and have a method to specifically handle text tables 
rather than recognizing them as you traverse the text; if you did not need to 
retain locality or something. 



On Friday, June 21, 2019 09:56 EDT, Michael Stahl  wrote:
 On 21.06.19 13:22, Adomas Venčkauskas wrote:
> Hello,
>
> I need my Java extension to iterate over all hyperlinks in a Writer
> document. This is fine with Paragraph TextPortion enumeration, but no
> portion enumeration is available in TextTables. What would be the best
> way to enumerate all hyperlinks in TextTables?

you first need to enumerate the cells in the table, then the cells
implement XText so you can enumerate the paragraphs in the cells like
the paragraphs in the top-level body text.

to enumerate the cells i guess you can use getCellNames().
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

[Libreoffice-commits] core.git: vcl/source

2019-05-03 Thread Andrew Hyatt (via logerrit)
 vcl/source/control/button.cxx |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit 89775fd396e413daaf0e71710211075450bdc0ed
Author: Andrew Hyatt 
AuthorDate: Thu May 2 14:33:12 2019 -0400
Commit: Tor Lillqvist 
CommitDate: Fri May 3 12:14:36 2019 +0200

tdf#125088 Make button text white for blue buttons on macOS

Change-Id: I6479b8b1544c5aa8a582854f4db4b4c4c01c28ed
Reviewed-on: https://gerrit.libreoffice.org/71710
Tested-by: Julien Nabet 
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 93aed205fdcb..5ab14d2c2db2 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -812,6 +812,16 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* 
pDev, DrawFlags nDrawFl
 
 if ( nDrawFlags & DrawFlags::Mono )
 aColor = COL_BLACK;
+#ifdef MACOSX
+else if ((nButtonFlags & DrawButtonFlags::Default) && !(GetStyle() & 
WB_FLATBUTTON))
+{
+// Make text color white if the button is a default control on macOS.
+// Without this you get a button with a blue background and blue text
+// which stands out as not looking right on macOS where default buttons
+// have white text and a blue background.
+aColor = COL_WHITE;
+}
+#endif
 else if( (nButtonFlags & DrawButtonFlags::Highlight) && 
IsNativeControlSupported(ControlType::Pushbutton, ControlPart::Entire) )
 {
 if (nButtonFlags & DrawButtonFlags::Pressed)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Andrew Hyatt license statement

2019-05-02 Thread Andrew Hyatt
All of my past & future contributions to LibreOffice may be licensed under the 
MPLv2/LGPLv3+ dual license.

Andrew Hyatt
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Chance of Colour Underlining

2019-04-15 Thread Andrew Williams
How do I chance the underling under the wording from black to red, please 

Thanks in advance
Andrew WilliamsUnited Kingdom
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: how to create and fill a table of contents ?

2019-02-09 Thread Andrew Douglas Pitonyak

Forgot to add the link:


http://www.pitonyak.org/OOME_4_0.odt


On 2/8/19 8:42 AM, LORENZO Vincent wrote:


Hello,

I’m looking for a code example to create a table of contents and fill 
it programmatically. I thought find something like an object called 
XTableOfContents  in the unoil library, but nothing and Google didn’t 
really help me.


So, please if you some pointers, code examples, or advices they will 
be welcome.


Best Regards,

--

Vincent LORENZO

01-69-08-17-24

CEA Saclay Nano-INNOV

Institut CARNOT CEA LIST

Point Courrier n° 174

91 191 Gif sur Yvette CEDEX


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: how to create and fill a table of contents ?

2019-02-09 Thread Andrew Douglas Pitonyak


From OOME on my web site, well, part of that section:

Finding and inserting a table of contents (TOC) is easy unless you want 
to change the defaults. The following macro checks ThisComponent to see 
if the document contains a content index.


REM Find TOC if it exists.

oIndexes = ThisComponent.getDocumentIndexes()

bIndexFound = False

For i = 0 To oIndexes.getCount() - 1

oIndex = oIndexes.getByIndex(i)

If oIndex.supportsService("com.sun.star.text.ContentIndex") Then

bIndexFound = True

Exit For

End If

Next

Use dispose to remove an existing index from the document.

When I create a TOC, I usually set CreateFromOutline to true to create 
the index based on the document outline styles (see Listing 399).


/*Listing 399.* Insert a standard TOC into a document./

Sub InsertATOC

REM Author: Andrew Pitonyak

Dim oCurs 'Used to insert the text content.

Dim oIndexes 'All of the existing indexes

Dim oIndex 'TOC if it exists and a new one if not

Dim i% 'Find an existing TOC

Dim bIndexFound As Boolean 'Flag to track if the TOC was found





REM Find TOC if it exists.

oIndexes = ThisComponent.getDocumentIndexes()

bIndexFound = False

For i = 0 To oIndexes.getCount() - 1

oIndex = oIndexes.getByIndex(i)

If oIndex.supportsService("com.sun.star.text.ContentIndex") Then

bIndexFound = True

Exit For

End If

Next

If Not bIndexFound Then

Print "I did not find an existing content index"

REM Create and insert a new TOC.

REM The new TOC must be created by the document that will contain the TOC.

oIndex = ThisComponent.createInstance("com.sun.star.text.ContentIndex")



oIndex.CreateFromOutline = True

oCurs = ThisComponent.getText().createTextCursor()

oCurs.gotoStart(False)

ThisComponent.getText().insertTextContent(oCurs, oIndex, False)

End If

REM Even the newly inserted index is not updated until right HERE!

oIndex.update()

End Sub

The same code can be used to create a DocumentIndex, ContentIndex, 
UserDefinedIndex, IllustrationIndex, TableIndex, or ObjectIndex. 
Properties common to all index types are shown in Table 157.



This is the latest version on my web site as an ODT file. The document 
contains most of the macros in the book, so, you will be asked if you 
want to enable macros when  you load it. If you do not enable them, you 
cannot run the contained macros from buttons embedded in the text, which 
you probably do not care about so no worries if you do not enable that. 
Hope this helps.




On 2/8/19 8:42 AM, LORENZO Vincent wrote:


Hello,

I’m looking for a code example to create a table of contents and fill 
it programmatically. I thought find something like an object called 
XTableOfContents  in the unoil library, but nothing and Google didn’t 
really help me.


So, please if you some pointers, code examples, or advices they will 
be welcome.


Best Regards,

--

Vincent LORENZO

01-69-08-17-24

CEA Saclay Nano-INNOV

Institut CARNOT CEA LIST

Point Courrier n° 174

91 191 Gif sur Yvette CEDEX


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: When file truncation happens by Basic's Open statement

2018-12-21 Thread Andrew Pitonyak

I evaluated the behavior from Basic for all of the different modes based on a 
specific build on a specific Linux platform. I did not read the code, nor did I 
test different platforms. I documented all of this in OOME on my web site. 
Don't remember the direct link, but, it is on http://www.pitonyak.org under my 
macros page. 

I also loop at a few other methods for opening files using a service that might 
be useful to you. 

On Friday, December 21, 2018 14:15 EST, Kaganski Mike 
 wrote:
 Hi!

On 21.12.2018 20:37, Takeshi Abe wrote:
> In order to tell whether the behavior reported in tdf#119102 [1] is a bug
> or not, I would like to understand the specification of LibO Basic's Open
> statement [2].
>
> The following table summarizes what current (master) LibO does, which I read
> from SbiStream::Open() in basic/source/runtime/iosys.cxx.
>
> ACCESS\FOR | APPEND | BINARY | INPUT | OUTPUT | RANDOM |
> --+++---+++
> default | - | - | - | X | - |
> READ ("read only") | - | - | - | - | - |
> WRITE ("write only") | - | -(*) | X | X | -(**) |
> READ WRITE ("both") | - | -(*) | X | X | -(**) |
>
> "X": the runtime deletes the file of given path first if already exists;
> "-": it does not.
> (*) requested in i#18638 ;
> see commit 23b49669ab70cac72d5f6d955e7d2af617e6934e.
> (**) requested in i#61277 ;
> see commit 42a63dd0e81f13a84a5f551e03ede685e2bf34c7.
>
> So here is a couple of questions popping up on a confused soul:
>
> (1) What does the default ACCESS mode mean?
> Is it just the same as READ, WRITE, or READ WRITE?
> Or does it depends on given FOR mode?
>
> (2) Does 'FOR INPUT + ACCESS WRITE' or 'FOR OUTPUT + ACCESS READ' make
> any sense?

Cannot answer the questions; just for completeness, something you could
already know:

the current handling of BINARY opened for write was defined in commit
23b49669ab70cac72d5f6d955e7d2af617e6934e [1] for #i18638 [2].

[1]
https://git.libreoffice.org/core/+/23b49669ab70cac72d5f6d955e7d2af617e6934e%5E%21/
[2] https://bz.apache.org/ooo/show_bug.cgi?id=18638

--
Best regards,
Mike Kaganski
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Andrew Udvare license statement

2018-10-01 Thread Andrew Udvare
All of my past & future contributions to LibreOffice may be licensed
under the MPLv2/LGPLv3+ dual license.

-- 
Andrew



signature.asc
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: How to insert extra and hidden information for each element of document via LibreOffice API?

2018-07-26 Thread Andrew Pitonyak
 

When I think of UML, I think of a graphical representation. Your
description leads me to believe that you will have a "text"
representation. 

My first thought was user defined attributes


https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1xml_1_1UserDefinedAttributesSupplier.html


OK, so what supports that? I did not look into it, but, some
possibilities might include (assuming that my guesses from the link
above are accurate), 

1. A text section. I was hoping that a paragraph
and it seems that it does NOT. You could create a new text section for
each bit, since it looks like text section would contain this (but I did
not verify). 

2. Paragraph Style. The bad thing is that it looks like
it would be on a style, so, you would need to create a new style for
each item of interest. I have two comments on this. First, you could
embed an XML UserDefinedAttributes for each paragraph style that you
create. Second, you could embed simple information (maybe) into the
style name. 

3. You could place the UML into a text table with a "cell"
for each identifiable part and place an attribute into each cell
properties object. I have a simple example of this for a a Calc cell in
OOME4, but I have not test run it against a text table cell. 

Is the
user expected to edit this data in any way? If not, then you could embed
the entire original UML as a user defined attribute as a single user
defined attribute attached to some element (such as a style that is not
otherwise used). 

Your comments lead me to believe that you are not
able to choose some formatted text method to embed the data of interest
that might be bale to parse from regular text. 

No idea if this is of
any use, but maybe. I have not tried any of these suggestions to
make sure that they work. HTH. 

On 2018-07-24 7:20, MUNOZ JULHO
Yupanqui wrote: 

> Hi everyone, 
> 
> I am working with the Eclipse
Papyrus team on a UML to odt generator. Besides one way generating, it
should be able to handle bidirectional synchronization between these two
"worlds". 
> For reaching this goal, I need to map each model element
with its respective doc element. For example, a package name will be
transformed to a section in a document or a comment in a paragraph. I am
looking for a way to reference the UML element from the odt document,
for example adding the ID of the UML element to an odt "paragraph". 
>

> In the users mailing list, Regina Henschel, suggested me to use
bookmarks. It is a good idea, but, if is possible, I want to hide this
information.
> 
> Does anyone have another suggestion? 
> 
> Best
regards, 
> 
> Yupanqui 
> 
>
___
> LibreOffice mailing
list
> LibreOffice@lists.freedesktop.org
>
https://lists.freedesktop.org/mailman/listinfo/libreoffice [1]




Links:
--
[1]
https://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


String Length and Array Indexes in macros

2018-05-15 Thread Andrew Pitonyak


Last time I documented Strings and arrays, an array index was limited 
to +/-32K and a string was similarly limited.


I am now documenting them again and I am hoping that someone knows off 
hand what the new limitations are so that I do not need to scour the 
code to find out. My best guess is that this now uses a 32-bit long, so, 
+/- 2G.




Andrew Pitonyak


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Association between ToC index object and its paragraph content

2017-12-12 Thread Andrew Pitonyak


Disclaimer: I have not taken the time to look at the problem, but, if 
you have a text range, or have the ability to get a text range out of 
what you have, then you can compare the starting and ending positions. 
You might need to create a text cursor from the range to do this. I do 
not have the ability to test this at the moment, but that is where I 
would look if I needed to answer a similar question. Note also that with 
an appropriate cursor, you can do things such as jump to the start and 
end of a paragraph.


If a paragraph contains content that uses a different Text object, or 
you happen to be trying to compare content that lives in different text 
objects, this will fail; for example, each cell in a Text Table uses its 
own Text object if my memory serves me correctly. This means that you 
cannot compare the location of an object in one cell with that in 
another cell or outside the text table.


On 2017-12-12 5:04, Jens Tröger wrote:

Thanks Miklos!

Interesting detail though: for any number of XTextContent objects
(i.e. paragraphs with implementationName=SwXParagraph) which 
represent

_the same_ paragraph in the document, there’s no real way to tell
that these objects do, in fact, represent the same paragraph?

Huh. Cheers,
Jens


On Dec 12, 2017, at 19:37, Miklos Vajna  
wrote:


https://lists.freedesktop.org/archives/libreoffice/2017-December/079050.html
has code samples on how the reference-to-bookmark is represented as 
a
HyperlinkURL property, and how the bookmark is a Bookmark text 
portion.

There is no closer connection between these two, I think.

Regards,
Miklos


--
Jens Tröger
http://savage.light-speed.de/

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Andrew Williams's license statement

2016-07-31 Thread Andrew Williams
All of my past & future contributions to LibreOffice may be
licensed under the MPLv2/LGPLv3+ dual license.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Collabora Online 1.0 Roadmap and Questions

2016-06-23 Thread Andrew McGlashan
Hi Michael,

On 23/06/2016 3:13 AM, Michael Meeks wrote:
> On Wed, 2016-06-22 at 11:38 -0400, Adam Saunders wrote:
>> I'm in the midst of writing a news article about the Collabora Online
>> 1.0 release. I had a couple questions for you:
> 
>   Let me get to those privately - some of the answers don't really belong
> on this list.

WHY?  Please share to the list too.

Thanks
A.



signature.asc
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Open web page from dialog

2016-06-11 Thread Andrew Pitonyak
I think this is usually done by invoking a command to the operating system. 
Cannot easily lookup how this is done right now

It is likely os dependent. 

Sent from BlueMail



On Jun 11, 2016, 3:24 PM, at 3:24 PM, "Jan Rheinländer"  
wrote:
>Hi,
>
>is it possible to open a website in the user's preferred browser from a
>dialog (or from a Basic macro, or through the UNO API)?
>
>I see that the "Help" - "About" dialog does this, but it is defined in
>the source in Glade format, different to the Basic dialogs.
>
>Thanks for any ideas!
>
>Jan
>
>___
>LibreOffice mailing list
>LibreOffice@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Libre Office online

2016-04-07 Thread Andrew McGlashan
Hi,

On 6/04/2016 4:44 PM, Muhammad Asad wrote:
> I have successfully setup LibreOffice online, Kudos to you guys. I just
> have a simple question, can i give a url to a document in file_path
> query string param ? When i am giving it a url to a document with http
> or https it says socket closed.
> 
> file_path=file:///home/administrator/test.docx this works fine.
> file_path=http://mydomain.com/myfile.docs this doesn;t work.
> 
> So just wanted to ask is this something which is currently supported or not?

Not sure, but I think this is the kind of thing you might do in
conjunction with an ownCloud URL.

Cheers
AndrewM
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Road map? mobile devices...

2016-04-06 Thread Andrew McGlashan
Hi,

On 5/04/2016 7:54 PM, Christian Lohmaier wrote:
> On Tue, Mar 29, 2016 at 2:54 AM, Andrew McGlashan
> <andrew.mcglas...@affinityvision.com.au> wrote:
>>
>> I was wondering if or when LibreOffice would be available for full use
>> on either or both of Android / iOS.
>>
>> I know there is a viewer version for Android
> 
> that also allows for some editing. Defining a useful UI/picking the
> editing parts in a way that makes sense for a mobile version (i.e. one
> you can use with touch on limited screen estate) is the really
> challenging part (besides performance...)

Yes, I understand.  But we have lots of "mobile" devices these days,
tablets and the like; some running Android, others running iOS and the
odd ones running something else

There are plenty of tablets that have bluetooth keyboards (mobile phones
or phablets can have them too).  Sometimes they also have mice, so it
isn't just touch UI.

The problem space is this, client uses MS Office on their desktops, they
have iPhones and iPads (predominantly), they can use M$ versions of
Office on those devices, but they cannot use LibreOffice versions on any
device in any kind of meaningful way.

Soon we'll have people running Android on devices like the Pixel C from
Google.

Now, if we had full LO to compete with Google Docs (and other tools),
then that might be enough.  Do we sort of have that with ownCloud?  Have
we got it without ownCloud as well?

> So you will never get "full use" with mobile versions - this just
> doesn't make sense UI wise. (Getting the stuff in for final touches
> (fixing typos, other small mistakes) or rough outlining is what the
> mobile apps should aim for from my POV).

Yes, I hate auto-corrections in swype like keyboards on mobiles, but
they can work well too.

> As this is the developer list: you're more than welcome to jump in and
> e.g. design android activities with useful editing features presented
> in a useful way. You don't even need to hook them up to perform the
> actual editing if you're UI designer.

I understand, but users aren't are not developers and if there was a
"users" list (which I don't know there is), then the same questions
there might not get any kind of suitable response to this problem space.

I would dearly love to be able to exit every single M$ product if that
was possible and I would be happy to encourage everybody that I could
that there are very good and valid alternatives that will work for them
no matter what device they chose to use.  And, as I said, perhaps we
will have that via browser apps; but I'm not so sure where that is at
today either.

Kind Regards
AndrewM



signature.asc
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Road map? mobile devices...

2016-04-01 Thread Andrew McGlashan
Hi,

On 1/04/2016 6:12 PM, Miklos Vajna wrote:
> You probably didn't get an answer as this list is for discussing code
> and patches. If you have such a question, feel free to ask.

Okay, thanks, is there a different and more appropriate list?

What I want to know most is when I might be able to use LibreOffice
fully on both Android and iOS devices.

Thanks
AndrewM
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Road map? mobile devices...

2016-03-31 Thread Andrew McGlashan
Hi,

  --- resend ---

I was wondering if or when LibreOffice would be available for full use
on either or both of Android / iOS.

I know there is a viewer version for Android and I've considered setting
up LibreOffice with ownCloud, but I really would like to be able to
migrate users to full mobile use apps for use on their phones and tablets.

Without full mobile device support, too many people are subscribing to
Office 365 and that is what I want to avoid as soon as possible.

The last thing I want is for users to feel [or have little choice]  that
they have to enter in to the M$ world for mobile usage.

Thanks
AndrewM


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Road map? mobile devices...

2016-03-29 Thread Andrew McGlashan
Hi,

I was wondering if or when LibreOffice would be available for full use
on either or both of Android / iOS.

I know there is a viewer version for Android and I've considered setting
up LibreOffice with ownCloud, but I really would like to be able to
migrate users to full mobile use apps for use on their phones and tablets.

Without full mobile device support, too many people are subscribing to
Office 365 and that is what I want to avoid as soon as possible.

The last thing I want is for users to feel [or have little choice]  that
they have to enter in to the M$ world for mobile usage.

Thanks
AndrewM



signature.asc
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: suggested method to create LibreOffice Extensions

2015-11-16 Thread Andrew Pitonyak
If you email me directly I can send you a copy of my macro formatter stuff with 
the document I use to generate the OXT file. Won't have access until Thursday 
or Friday.

On Nov 16, 2015 3:52 AM, Andrea Castellani  wrote:
>
> Hello everyone, 
> almost three years ago I received help from this mailing list to create 
> an extension for LibreOffice, which became "FirmaconDike" (thanks!): 
> http://extensions.libreoffice.org/extension-center/firmacondike-1 
>
> Today I have to re-examine this issue in a LibreOffice lesson, in witch 
> I would like to explain how to create an extension "from scratch". 
>
> I thought to write a simple macro with students, such as "Hello world", 
> and explain step by step how to generate the oxt file. 
>
> Seeking documentation, I saw a lot of confusion on the subject and the 
> argument (as you know) is only present on the site of AOO. 
>
> I tried to use BAB Paolo Mantovani, both in the new version that in the 
> previous one, and it seemed a very good macro to create extensions. 
>
> The Extension oxt who created BAB does not work, then I fear that BAB is 
> incompatible with LibreOffice (I have the 5.0.2.2). Opening it, it gives 
> me an error: 
> (Com.sun.star.deployment.DeploymentException) {{Message = "You \ X00e8 
> an error occurred while enabling: HelloWorld" Context = 
> (com.sun.star.uno.XInterface) @ 7f2fec3ef8b0}, Cause = ( any) 
> {(com.sun.star.lang.IllegalArgumentException) {{{Message = "" Context = 
> (com.sun.star.uno.XInterface) @ 0}}, ArgumentPosition = (short) 0}}} 
>
> Here you can find the extension generated by BAB: 
> http://www.libreitalia.it/cloud/public.php?service=files=77d91958fb91ecab19ec2b0b62844d63
>  
>
> I have not tried a "reverse engineering" of oxt file to understand what 
> it changes from another oxt  (such as "FirmaconDike"), looking for 
> suggestions from you, who are much more experienced than me. 
>
> Does anyone have experience with BAB and LibreOffice? 
> What is the official method (or recommended one) to create extensions 
> for LibreOffice? 
>
> I apologize if you have already solved this problem in another thread 
>
> Thank you, 
>
> Andrea Castellani 
> www.libreitalia.it 
> ___ 
> LibreOffice mailing list 
> LibreOffice@lists.freedesktop.org 
> http://lists.freedesktop.org/mailman/listinfo/libreoffice 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Macro to load and run ppt for impress

2015-07-08 Thread Andrew Douglas Pitonyak
This does work for me, but, only if I define some global variables in 
the defining module. Try setting OptionExplicit at the top of the module 
and it will flag all of those undefined variables for you.


Global oGlob
GLobal oListener
Global boFinished
Global url



On 07/06/2015 04:54 PM, Jerry Geis wrote:


Sub Load(arg as String)

'register a global event listener, because
'we have to wait until loading has finished
oGlob = CreateUnoService(com.sun.star.frame.GlobalEventBroadcaster)
oListener = 
CreateUnoListener(EvList_,com.sun.star.document.XEventListener)

oGlob.addEventListener(oListener)
boFinished = false

'hide the document while loading so that we do not see the loading window
Dim aProps(2) as new com.sun.star.beans.PropertyValue
Dim oDoc as Object
aProps(0).Name  = Hidden
aProps(0).Value = true
aProps(1).Name  = ReadOnly
aProps(1).Value = true
url = arg
oDoc = StarDesktop.loadComponentFromURL(url, _default, 0, aProps)

'wait until loading has finished
while (not boFinished)
wait(5)
wend

oGlob.removeEventListener(oListener)

'loading is done, set the presentation parameters
oDoc.Presentation.Pause = 0
'show the window now as presentation cannot be started
'(segmentation faults) if it is not
oDoc.CurrentController.Frame.ContainerWindow.Visible = true
oDoc.CurrentController.Frame.ContainerWindow.setVisible(false)
'start the presentation
oDoc.Presentation.Start

End Sub

Sub EvList_notifyEvent( o as object )
if o.EventName = OnLoadFinished then
if url = o.Source.Location then
boFinished = true
endif
endif

End Sub

Sub EvList_disposing()
End Sub


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

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


LibreOffice 4.x copyright date is 2014

2015-07-06 Thread Andrew Pitonyak

Latest release of LO 4.x

Help  About

Shows the a copyright date of 2014.

I just installed the latest release candidate (2) and it has a 2015 
copyright, so this probably only matters if there is another release of 
4.x for some reason. I thought that the latest 4.x release was 2015.


Andrew Pitonyak





___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Q: How to get the path of all opened spreadsheet documents

2015-06-08 Thread Andrew Douglas Pitonyak


Calc documents implement the following service:

com.sun.star.sheet.SpreadsheetDocument

Using that with the examples below based on a write document:


'**
'// Count the total number of open componets.
'// This includes all document types as well
'// as things such as the Basic IDE and help windows.
'**
Function numberOfOpenComponents As Integer
  Dim i As Integer
  Dim oDocs
  Dim oDoc
  i = 0

  oDocs = StarDesktop.getComponents().createEnumeration()
  Do While oDocs.hasMoreElements()
oDoc = oDocs.nextElement()
i = i + 1
  Loop
  numberOfOpenComponents = i
End Function

'**
'// Count number of open Write documents.
'**
Function countOpenWriteDocs() As Integer
  countOpenWriteDocs = 
countTypedComponents(com.sun.star.text.TextDocument)

End Function

'**
'// Count number of documents that are open with the specified service type.
'**
Function countTypedComponents(serviceName$) As Integer
  Dim i As Integer
  Dim oDocs
  Dim oDoc
  i = 0

  oDocs = StarDesktop.getComponents().createEnumeration()
  Do While oDocs.hasMoreElements()
oDoc = oDocs.nextElement()
If oDoc.supportsService(serviceName) Then
  i = i + 1
End If
  Loop
  countTypedComponents = i
End Function

'**
'// Return true if the specified document is a Write document.
'**
Function isWriteDocument(oDoc) As Boolean
  If IsNull(oDoc) Then
isWriteDocument = False
  ElseIf IsEmpty(oDoc) Then
isWriteDocument = False
  ElseIf  oDoc.supportsService(com.sun.star.text.TextDocument) Then
isWriteDocument = True
  Else
isWriteDocument = False
  End If
End Function




On 06/07/2015 09:21 PM, Zhang, William wrote:


Hi Andrew,

Thanks a lot for your reply.

Q1: In your case do you only care about documents that have been 
saved... Ignoring new never saved to disk docs?


àWhat I want to get is all calc documents as long as the doc is 
opened, no matter it have been saved or not.


  So firstly, I want to know if it’s possible to do it in this case. 
If no, maybe I can only care the doc which have been saved and ignore 
which is not saved.


Q2: You enumerate the open components from the desktop object and 
check of the component is a calc document.


àSorry, I know how to get the desktop object, but I am not clear how 
to get the open component and check them as you mentioned.


  This is my gap, would you please give example code based on my 
comment for Q1?


Thanks in advanced!

Best Regards

William

-Original Message-
From: Andrew Pitonyak [mailto:and...@pitonyak.org]
Sent: 2015年6月5日19:15
To: Zhang, William
Cc: libreoffice@lists.freedesktop.org
Subject: Re: Q: How to get the path of all opened spreadsheet documents

No time to find the solution now But I have done this sort of 
thing in basic.


You enumerate the open components from the desktop object and check of 
the component is a calc document.


In your case do you only care about documents that have been saved... 
Ignoring new never saved to disk docs?


Think I can find a basic example of it helps

On Jun 4, 2015 10:35 PM, Zhang, William 
william.zh...@ptn.advantest.com 
mailto:william.zh...@ptn.advantest.com wrote:




 Hi,







 Request:



 In RedHat7, I want to get the path of all opened spreadsheet documents with 
Java.







 What I’ve done:



 1.I used Runtime.exec(cmd…) with Java code, the ‘cmd’was defined with 
“ps –ef | grep xxx”




 -if only one spreadsheet document opened, the returned info list the correct 
document, I can parse it and get the file path




 -but if multi spreadsheet documents opened, the returned process still only 
list the first document, I cannot get other documents.




2.I also test in bash, it seems “ps -ef”cannot list all files.







 So , I want to know is there any other way to do it. such as using UNO service with 
libreoffice API to get it.




 Anyone who knows it is much appreciate.







 Best Regards



 William







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

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Q: How to get the path of all opened spreadsheet documents

2015-06-06 Thread Andrew Pitonyak
No time to find the solution now But I have done this sort of thing in 
basic.

You enumerate the open components from the desktop object and check of the 
component is a calc document.

In your case do you only care about documents that have been saved... Ignoring 
new never saved to disk docs?

Think I can find a basic example of it helps

On Jun 4, 2015 10:35 PM, Zhang, William william.zh...@ptn.advantest.com 
wrote:

 Hi,

  

 Request:

 In RedHat7, I want to get the path of all opened spreadsheet documents with 
 Java.

  

 What I’ve done:

 1.   I used Runtime.exec(cmd…) with Java code, the ‘cmd’ was defined with 
 “ps –ef | grep xxx”

 -if only one spreadsheet document opened, the returned info list the correct 
 document, I can parse it and get the file path

 -but if multi spreadsheet documents opened, the returned process still only 
 list the first document, I cannot get other documents.

    2.  I also test in bash, it seems “ps -ef” cannot list all files.

  

 So , I want to know is there any other way to do it. such as using UNO 
 service with libreoffice API to get it.

 Anyone who knows it is much appreciate.

  

 Best Regards

 William

  
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: extras/source

2015-05-07 Thread Andrew
-User-Male1.png   |binary
 extras/source/gallery/people/Computer-User-Male2.png   |binary
 extras/source/gallery/people/ConstructionWorker.png|binary
 extras/source/gallery/people/ConstructionWorker2.png   |binary
 extras/source/gallery/people/Detective1.png|binary
 extras/source/gallery/people/Detective2.png|binary
 extras/source/gallery/people/Doctor-Female1.png|binary
 extras/source/gallery/people/Doctor-Female2.png|binary
 extras/source/gallery/people/Doctor-Male1.png  |binary
 extras/source/gallery/people/Doctor-Male2.png  |binary
 extras/source/gallery/people/Nurse1.png|binary
 extras/source/gallery/people/Nurse2.png|binary
 extras/source/gallery/people/PoliceOfficer1.png|binary
 extras/source/gallery/people/PoliceOfficer2.png|binary
 extras/source/gallery/people/Presenter-Female1.png |binary
 extras/source/gallery/people/Presenter-Female2.png |binary
 extras/source/gallery/people/Presenter-Male1.png   |binary
 extras/source/gallery/people/Presenter-Male2.png   |binary
 extras/source/gallery/people/Student-Female.png|binary
 extras/source/gallery/people/Student-Male.png  |binary
 extras/source/gallery/people/Surgeon-Female1.png   |binary
 extras/source/gallery/people/Surgeon-Female2.png   |binary
 extras/source/gallery/people/Surgeon1.png  |binary
 extras/source/gallery/people/Surgeon2.png  |binary
 extras/source/gallery/people/Teacher1.png  |binary
 extras/source/gallery/people/Teacher2.png  |binary
 extras/source/gallery/people/Tourist-Female1.png   |binary
 extras/source/gallery/people/Tourist-Female2.png   |binary
 extras/source/gallery/people/Tourist-Male1.png |binary
 extras/source/gallery/people/Tourist-Male2.png |binary
 extras/source/gallery/transportation/Airplane-Blue.png |binary
 extras/source/gallery/transportation/Bicycle-Blue.png  |binary
 extras/source/gallery/transportation/Boat.png  |binary
 extras/source/gallery/transportation/Bus.png   |binary
 extras/source/gallery/transportation/Canoe-Blue.png|binary
 extras/source/gallery/transportation/Car-Red.png   |binary
 extras/source/gallery/transportation/Helicopter-Blue.png   |binary
 extras/source/gallery/transportation/Motorcycle-Red.png|binary
 extras/source/gallery/transportation/Pedestrian-Blue.png   |binary
 extras/source/gallery/transportation/PersonalTransporter-Green.png |binary
 extras/source/gallery/transportation/Sailboat-Red.png  |binary
 extras/source/gallery/transportation/Scooter-Orange.png|binary
 extras/source/gallery/transportation/Train-Red.png |binary
 extras/source/gallery/transportation/Truck-Blue.png|binary
 175 files changed

New commits:
commit e658cb4d5ce49d3a3c6acc63155974b5ff8490c7
Author: Andrew dent@gmail.com
Date:   Thu May 7 20:25:07 2015 +0100

Clipart - PNG files optimized.

Lossless optimisation of PNG image files in clipart Gallery.
Total saving of 887 KB !
Used ImageOptim.com and custom tools ('pngslim').

- Arrows: Saved ~44KB out of 189KB. ~23% per file on average (up to 38%).
- Computers: Saved ~17KB out of 242KB. ~7% per file on average (up to 11%).
- Education: Saved ~142KB out of 804KB. ~18% per file on average (up to 
36%).
- Environment: Saved ~197KB out of 1.3MB. ~14% per file on average (up to 
23%).
- Finance: Saved ~67KB out of 695KB. ~10% per file on average (up to 37%).
- People: Saved ~280KB out of 2.7MB. ~10% per file on average (up to 15%).
- Transportation: Saved ~141KB out of 1MB. ~14% per file on average (up to 
15%).

Change-Id: I1812ae84e5672d49a7798dc44f518c1d6cd70ec1
Note: These should ultimately be replaced with original (/improved) SVG 
vector artwork.
Signed-off-by: Andrew dent@gmail.com
Reviewed-on: https://gerrit.libreoffice.org/15669
Reviewed-by: Adolfo Jayme Barrientos fit...@ubuntu.com
Tested-by: Adolfo Jayme Barrientos fit...@ubuntu.com

diff --git a/extras/source/gallery/arrows/A16-CircleArrow.png 
b/extras/source/gallery/arrows/A16-CircleArrow.png
index 2d7fe19..24595ce 100644
Binary files a/extras/source/gallery/arrows/A16-CircleArrow.png and 
b/extras/source/gallery/arrows/A16-CircleArrow.png differ
diff --git a/extras/source/gallery/arrows/A17-CircleArrow.png 
b/extras/source/gallery/arrows/A17-CircleArrow.png
index 2c41a68..937da7b

[Libreoffice-commits] core.git: icon-themes/breeze icon-themes/galaxy icon-themes/human icon-themes/oxygen icon-themes/sifr icon-themes/tango icon-themes/tango_testing

2015-04-21 Thread Andrew
/pageproppanel/documentsizeB4_24x24.png  
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/documentsizeB5_24x24.png  
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/documentsizeC5_24x24.png  
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/documentsize_L_A3_24x24.png   
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/documentsize_L_A4_24x24.png   
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/documentsize_L_A5_24x24.png   
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/documentsize_L_B4_24x24.png   
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/documentsize_L_B5_24x24.png   
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/documentsize_L_C5_24x24.png   
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/documentsize_L_copy_24x24.png 
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/documentsizecopy_24x24.png
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/format_L_copy_24x24.png   
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/format_L_mirror_24x24.png 
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/format_L_narrow_24x24.png 
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/format_L_nomal_24x24.png  
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/format_L_wide_24x24.png   
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/formatcopy_24x24.png  
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/formatmirror_24x24.png
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/formatnarrow_24x24.png
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/formatnormal_24x24.png
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/formatwide_24x24.png  
|binary
 icon-themes/tango/sw/res/sidebar/pageproppanel/portraitcopy_24x24.png
|binary
 icon-themes/tango/vcl/res/msgbox.png 
|binary
 icon-themes/tango_testing/cmd/lc_calloutshapes.rectangular-callout.png   
|binary
 icon-themes/tango_testing/cmd/sc_symbolshapes.quad-bevel.png 
|binary
 197 files changed

New commits:
commit 3cdc48dc9db54a123ee243913177827ca6629d0b
Author: Andrew dent@gmail.com
Date:   Mon Apr 20 00:07:03 2015 +0100

Optimization of icon themes.

Lossless optimization of PNG files in icon themes. Using ImageOptim (and 
some other tools). April 2015 update.
Sifr: Saved 14KB out of 293KB. ~5% overall (up to 60% per file).
Tango: Saved 10KB out of 749KB. ~1% per file on average (up to 53.1%).
Small improvements to other themes: Breeze, Galaxy, Human, Oxygen and Tango 
Testing.

Change-Id: Ib82ab16eaa3eb7a617e768a8b2fe7f04b43f9d7f
Signed-off-by: Andrew dent@gmail.com
Reviewed-on: https://gerrit.libreoffice.org/15472
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Adolfo Jayme Barrientos fit...@ubuntu.com

diff --git a/icon-themes/breeze/avmedia/res/avaudiologo.png 
b/icon-themes/breeze/avmedia/res/avaudiologo.png
index a7f07a4..dce174e 100755
Binary files a/icon-themes/breeze/avmedia/res/avaudiologo.png and 
b/icon-themes/breeze/avmedia/res/avaudiologo.png differ
diff --git a/icon-themes/breeze/avmedia/res/avemptylogo.png 
b/icon-themes/breeze/avmedia/res/avemptylogo.png
old mode 100644
new mode 100755
index 1172426..1692865
Binary files a/icon-themes/breeze/avmedia/res/avemptylogo.png and 
b/icon-themes/breeze/avmedia/res/avemptylogo.png differ
diff --git a/icon-themes/breeze/res/base128.png 
b/icon-themes/breeze/res/base128.png
old mode 100644
new mode 100755
index 0d36fae..ad6cb8b
Binary files a/icon-themes/breeze/res/base128.png and 
b/icon-themes/breeze/res/base128.png differ
diff --git a/icon-themes/breeze/res/calc128.png 
b/icon-themes/breeze/res/calc128.png
old mode 100644
new mode 100755
index e128c85..0c3389d
Binary files a/icon-themes/breeze/res/calc128.png and 
b/icon-themes/breeze/res/calc128.png differ
diff --git a/icon-themes/breeze/res/draw128.png 
b/icon-themes/breeze/res/draw128.png
old mode 100644
new mode 100755
index 6a6bf23..d4f3e17
Binary files a/icon-themes/breeze/res/draw128.png and 
b/icon-themes/breeze/res/draw128.png differ
diff --git a/icon-themes/breeze/res/impress128.png 
b/icon-themes/breeze/res/impress128.png
old mode 100644
new mode 100755
index 36d669d..c0bcf95
Binary files a/icon-themes/breeze/res/impress128.png and 
b/icon-themes/breeze/res/impress128.png differ
diff --git a/icon-themes/breeze/res/main128.png 
b/icon-themes/breeze/res/main128.png
old mode 100644
new mode 100755
index 10b6af7..bb4548e
Binary files a/icon-themes/breeze/res/main128.png and 
b/icon-themes/breeze/res/main128.png differ
diff --git a/icon-themes/breeze/res/math128.png 
b/icon-themes/breeze/res/math128.png
old mode 100644
new mode 100755
index cf43711..80c3b9d
Binary files a/icon-themes/breeze/res/math128.png and 
b/icon-themes/breeze/res/math128.png differ
diff --git a/icon-themes/breeze/res/odb_96_8.png

[Libreoffice-commits] core.git: icon-themes/breeze

2015-04-20 Thread Andrew
/breeze/res/sx10607.png|binary
 icon-themes/breeze/res/sx10707.png|binary
 icon-themes/breeze/res/sx10728.png|binary
 icon-themes/breeze/res/target.png |binary
 icon-themes/breeze/sc/imglst/na010.png|binary
 icon-themes/breeze/sc/imglst/na011.png|binary
 icon-themes/breeze/sc/imglst/na07.png |binary
 icon-themes/breeze/sd/res/graphic.png |binary
 icon-themes/breeze/sd/res/waiticon.png|binary
 icon-themes/breeze/sfx2/res/128x128_calc_doc-p.png|binary
 icon-themes/breeze/sfx2/res/hlpdoc.png|binary
 icon-themes/breeze/svtools/res/ed03.png   |binary
 icon-themes/breeze/svtools/res/ed06.png   |binary
 icon-themes/breeze/svtools/res/ed07.png   |binary
 icon-themes/breeze/svtools/res/list_add.png   |binary
 icon-themes/breeze/svx/res/cd017.png  |binary
 icon-themes/breeze/svx/res/cropmarkers.png|binary
 icon-themes/breeze/svx/res/fontworkalignstretch_16.png|binary
 icon-themes/breeze/svx/res/id032.png  |binary
 icon-themes/breeze/svx/res/markers.png|binary
 icon-themes/breeze/svx/res/slidezoombutton_10.png |binary
 icon-themes/breeze/svx/res/slidezoomin_10.png |binary
 icon-themes/breeze/svx/res/slidezoomout_10.png|binary
 icon-themes/breeze/sw/imglst/sc20233.png  |binary
 icon-themes/breeze/sw/imglst/sc20246.png  |binary
 icon-themes/breeze/sw/res/redline_inserted.png|binary
 icon-themes/breeze/xmlsecurity/res/key_12.png |binary
 238 files changed

New commits:
commit ab19dd7715ee62d2c7767ebb443189603b2a82f7
Author: Andrew dent@gmail.com
Date:   Mon Apr 20 00:16:33 2015 +0100

Optimize Breeze icon theme - Pt.3

Lossless image compression of png files using ImageOptim.
Saved 27KB out of 488KB. ~5% overall (up to 66% per file).

Change-Id: Ida48909411b02bbc6d355dc0678151089afabc26
Signed-off-by: Andrew dent@gmail.com
Reviewed-on: https://gerrit.libreoffice.org/15393
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Adolfo Jayme Barrientos fit...@ubuntu.com

diff --git a/icon-themes/breeze/chart2/res/dataeditor_icon01.png 
b/icon-themes/breeze/chart2/res/dataeditor_icon01.png
index cf5909c..3db52e6 100644
Binary files a/icon-themes/breeze/chart2/res/dataeditor_icon01.png and 
b/icon-themes/breeze/chart2/res/dataeditor_icon01.png differ
diff --git a/icon-themes/breeze/chart2/res/dataeditor_icon02.png 
b/icon-themes/breeze/chart2/res/dataeditor_icon02.png
index a9d6737..b2008ac 100644
Binary files a/icon-themes/breeze/chart2/res/dataeditor_icon02.png and 
b/icon-themes/breeze/chart2/res/dataeditor_icon02.png differ
diff --git a/icon-themes/breeze/chart2/res/dataeditor_icon03.png 
b/icon-themes/breeze/chart2/res/dataeditor_icon03.png
index 853d9e5..d702acb 100644
Binary files a/icon-themes/breeze/chart2/res/dataeditor_icon03.png and 
b/icon-themes/breeze/chart2/res/dataeditor_icon03.png differ
diff --git a/icon-themes/breeze/chart2/res/dataeditor_icon04.png 
b/icon-themes/breeze/chart2/res/dataeditor_icon04.png
index eed3a5f..4450df1 100644
Binary files a/icon-themes/breeze/chart2/res/dataeditor_icon04.png and 
b/icon-themes/breeze/chart2/res/dataeditor_icon04.png differ
diff --git a/icon-themes/breeze/chart2/res/dataeditor_icon05.png 
b/icon-themes/breeze/chart2/res/dataeditor_icon05.png
index 83775b1..7a69699 100644
Binary files a/icon-themes/breeze/chart2/res/dataeditor_icon05.png and 
b/icon-themes/breeze/chart2/res/dataeditor_icon05.png differ
diff --git a/icon-themes/breeze/chart2/res/dataeditor_icon06.png 
b/icon-themes/breeze/chart2/res/dataeditor_icon06.png
index fa8885b..8345535 100644
Binary files a/icon-themes/breeze/chart2/res/dataeditor_icon06.png and 
b/icon-themes/breeze/chart2/res/dataeditor_icon06.png differ
diff --git a/icon-themes/breeze/chart2/res/dataeditor_icon07.png 
b/icon-themes/breeze/chart2/res/dataeditor_icon07.png
index a9d6737..b2008ac 100644
Binary files a/icon-themes/breeze/chart2/res/dataeditor_icon07.png and 
b/icon-themes/breeze/chart2/res/dataeditor_icon07.png differ
diff --git a/icon-themes/breeze/chart2/res/errorbothhori_30.png 
b/icon-themes/breeze/chart2/res/errorbothhori_30.png
index 7f48f84..c78dd2e 100644
Binary files a/icon-themes/breeze/chart2/res/errorbothhori_30.png and 
b/icon-themes/breeze/chart2/res/errorbothhori_30.png differ
diff --git a/icon-themes/breeze/chart2/res/errorbothverti_30.png 
b/icon-themes/breeze/chart2/res/errorbothverti_30.png
index 3398597..e0d093c 100644
Binary files a/icon-themes/breeze/chart2/res/errorbothverti_30.png and 
b/icon-themes/breeze/chart2

Re: Loading LaTeX document results in odd output

2015-04-09 Thread Andrew Pitonyak
What happens of you rename the file to have a .txt file extension?

On Apr 9, 2015 3:44 AM, =?ISO-8859-1?Q?Jens_Tr=F6ger?= 
jens.troe...@light-speed.de wrote:

 Hi, 

 I'm not sure if this is the right place to post this.  After running LO 
 I loaded a LaTeX file: 

   http://www.math.duke.edu/computing/tex/templates/samplefile.tex 

 which gave me the following terminal output: 

   savage@pooh ~  /Applications/LibreOffice64.app/Contents/MacOS/soffice 
   :1: parser error : Document is empty 
   \documentclass{article} 
   ^ 

 I have noticed similar and more on Linux LO.  What's that about?  Can 
 and should I ignore this? 

 Cheers, 
 Jens 

 -- 
 Jens Tröger 
 http://savage.light-speed.de/ 
 ___ 
 LibreOffice mailing list 
 LibreOffice@lists.freedesktop.org 
 http://lists.freedesktop.org/mailman/listinfo/libreoffice 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: icon-themes/galaxy icon-themes/hicontrast icon-themes/human icon-themes/industrial icon-themes/oxygen icon-themes/sifr icon-themes/tango icon-themes/tango_testing

2015-02-26 Thread Andrew
 dev/null   |binary
 icon-themes/human/CopyrightsHuman  |   12 
 icon-themes/human/svtools/res/triangle_down.png|binary
 icon-themes/human/svtools/res/triangle_right.png   |binary
 icon-themes/industrial/fpicker/res/fp015.png   |binary
 icon-themes/industrial/res/sc10713.png |binary
 icon-themes/oxygen/CopyrightsHuman |   13 
 icon-themes/oxygen/CopyrightsOxygen|   41 
 icon-themes/oxygen/formula/res/fapclose.png|binary
 icon-themes/oxygen/formula/res/faperror.png|binary
 icon-themes/oxygen/formula/res/fapok.png   |binary
 icon-themes/oxygen/formula/res/fapopen.png |binary
 icon-themes/oxygen/formula/res/refinp1.png |binary
 icon-themes/oxygen/formula/res/refinp2.png |binary
 icon-themes/oxygen/svtools/res/triangle_down.png   |binary
 icon-themes/oxygen/svtools/res/triangle_right.png  |binary
 icon-themes/sifr/framework/res/info_26.svg |  410 --
 icon-themes/tango/cmd/sc_connector.png |binary
 icon-themes/tango/cmd/sc_connectorarrowend.png |binary
 icon-themes/tango/cmd/sc_connectorarrows.png   |binary
 icon-themes/tango/cmd/sc_connectorarrowstart.png   |binary
 icon-themes/tango/cmd/sc_connectorcircleend.png|binary
 icon-themes/tango/cmd/sc_connectorcircles.png  |binary
 icon-themes/tango/cmd/sc_connectorcirclestart.png  |binary
 icon-themes/tango/cmd/sc_connectorcurve.png|binary
 icon-themes/tango/cmd/sc_connectorcurvearrowend.png|binary
 icon-themes/tango/cmd/sc_connectorcurvearrows.png  |binary
 icon-themes/tango/cmd/sc_connectorcurvearrowstart.png  |binary
 icon-themes/tango/cmd/sc_connectorcurvecircleend.png   |binary
 icon-themes/tango/cmd/sc_connectorcurvecircles.png |binary
 icon-themes/tango/cmd/sc_connectorcurvecirclestart.png |binary
 icon-themes/tango/cmd/sc_connectorline.png |binary
 icon-themes/tango/cmd/sc_connectorlinearrowend.png |binary
 icon-themes/tango/cmd/sc_connectorlinearrows.png   |binary
 icon-themes/tango/cmd/sc_connectorlinearrowstart.png   |binary
 icon-themes/tango/cmd/sc_connectorlinecircleend.png|binary
 icon-themes/tango/cmd/sc_connectorlinecircles.png  |binary
 icon-themes/tango/cmd/sc_connectorlinecirclestart.png  |binary
 icon-themes/tango/cmd/sc_connectorlines.png|binary
 icon-themes/tango/cmd/sc_connectorlinesarrowend.png|binary
 icon-themes/tango/cmd/sc_connectorlinesarrows.png  |binary
 icon-themes/tango/cmd/sc_connectorlinesarrowstart.png  |binary
 icon-themes/tango/cmd/sc_connectorlinescircleend.png   |binary
 icon-themes/tango/cmd/sc_connectorlinescircles.png |binary
 icon-themes/tango/cmd/sc_connectorlinescirclestart.png |binary
 icon-themes/tango/cmd/sc_connectortoolbox.png  |binary
 icon-themes/tango/cmd/sc_connectortoolbox.xcf.bz2  |binary
 icon-themes/tango/links.txt|   31 
 icon-themes/tango/res/lo03123.svg  | 1055 --
 icon-themes/tango/res/lo03126.svg  | 1056 --
 icon-themes/tango/res/lo03139.svg  | 2867 -
 icon-themes/tango/res/lo03144.svg  | 2225 -
 icon-themes/tango/res/lo03162.svg  | 1350 
 icon-themes/tango/res/lo03163.svg  |  586 ---
 icon-themes/tango/res/lo03216.svg  | 2135 
 icon-themes/tango/res/lo03226.svg  | 2348 -
 icon-themes/tango/res/lo03227.svg  | 1381 
 icon-themes/tango/res/lo03242.svg  | 2381 --
 icon-themes/tango/res/lx03128.svg  | 1054 --
 icon-themes/tango/res/lx03216.svg  |  566 ---
 icon-themes/tango/res/sc05596.svg  | 1412 
 icon-themes/tango/sd/res/objekt.svg|  406 --
 icon-themes/tango/svx/res/apply.png|binary
 icon-themes/tango/vcl/res/msgbox.xcf.bz2   |binary
 icon-themes/tango/vcl/source/src/question.svg  |  387 --
 65 files changed, 7 insertions(+), 21709 deletions(-)

New commits:
commit 945e8c4f5a377d328afdafe1410609a3ad1e7425
Author: Andrew dent@gmail.com
Date:   Sun Feb 15 01:33:31 2015 +

tdf#30425 Remove old icons -2

Remove outdated icons from themes, to make future maintenance easier.
Fixed file names and updated 'missing' log, 'copyright' text and 'links' 
for themes- where needed.
(Checked against current 'images.zip' bundled themes and git history).

Change-Id: If97378582377a64ed798eb44596ac56b89e3eb12
Signed-off-by: Andrew dent@gmail.com
Reviewed-on: https://gerrit.libreoffice.org/14583
Reviewed-by: Adolfo Jayme Barrientos fit...@ubuntu.com
Tested

Re: How do I tear down soffice cleanly?

2015-02-25 Thread Andrew Pitonyak
Test your coffee against the basic IDE and a help window, one might not support 
close if my memory is correct.

On Feb 25, 2015 7:16 PM, =?ISO-8859-1?Q?Jens_Tr=F6ger?= 
jens.troe...@light-speed.de wrote:

 Thanks Michael.  Looking at 13. in this FAQ 

   http://www.openoffice.org/udk/python/python-bridge.html#faq 

 it seems that queryInterface() is not needed.  Thus, I'm using the 
 following code now 

     document.close(True) 
     document.dispose() 

 and that seems to work too. 
 Jens 


 On Wed, Feb 25, 2015 at 09:18:38PM +0100, Michael Stahl wrote: 
  On 24.02.2015 18:41, Jens Tröger wrote: 
   Supporting documentation: 
   
     
  http://www.openoffice.org/api/docs/common/ref/com/sun/star/util/XCloseable.html
   
     
  https://wiki.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Closing_Documents
   
   
   I've now used this code: 
   
   if document.supportsService(com.sun.star.util.XCloseable) :    
   document.close(True) 
   office.document.dispose() 
    
   
  
  dispose() needs to go into an else branch. 
  
  i don't think supportsService will work here - it is not a service but 
  an interface, usually you check that with queryInterface() but since 
  Python is dynamically typed i don't know off-hand what the most 
  idiomatic way to check for it would be. 
  
  but i would assume that all LO application document types implement 
  XCloseable. 

 -- 
 Jens Tröger 
 http://savage.light-speed.de/ 
 ___ 
 LibreOffice mailing list 
 LibreOffice@lists.freedesktop.org 
 http://lists.freedesktop.org/mailman/listinfo/libreoffice 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Ask for help, Young developer request

2015-02-20 Thread Andrew Pitonyak
First use XModifiable and if
isModified is true call
setModified to set to false.

See of that helps.

On Feb 20, 2015 3:12 AM, =?UTF-8?Q?Bart=C5=82omiej_Mikos_PrimeSoft_Polska?= 
bartlomiej.mi...@primesoft.pl wrote:

 Good Morning, 

 I have problem with use of java LibreOffice Api 4.3 

 Is a possible way to close XComponent (xlsx type) in save way?. 

 I have converting to pdf method. I use XStorable.storeToURL() The 
 converting works fine, but when I try to close like this: 

  if (xStorable != null) { 
  XCloseable closeable = 
 UnoRuntime.queryInterface(XCloseable.class, xStorable); 
  if (closeable != null) { 
  try { 
  closeable.close(true); 
  } catch (CloseVetoException closeVetoException) { 
  //problem with xlsx files, always occure 
  } 
  } else { 
  XComponent xComp = 
 UnoRuntime.queryInterface(XComponent.class, xStorable); 
  xComp.dispose(); 
  } 
  } 

 I tried to dispose a XController and the XFrame. In that case window is 
 closed, but in next time XComponentLoader cannot load the XComponent, 
 problem with socket etc. 

 Can You tell me what i should do to make it work fine?. Maybe i should 
 know more about something or You had some simillar problems?. 

 I hope You will find time to answer, 
 Have a nice day. 


 ___ 
 LibreOffice mailing list 
 LibreOffice@lists.freedesktop.org 
 http://lists.freedesktop.org/mailman/listinfo/libreoffice 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: icon-themes/crystal icon-themes/human icon-themes/industrial icon-themes/oxygen icon-themes/tango icon-themes/tango_testing

2015-02-16 Thread Andrew
 dev/null   
|binary
 icon-themes/human/CopyrightsTango  
|1 
 icon-themes/industrial/cmd/lc_arrowshapes.notched-left-arrow.svg   
|  125 -
 icon-themes/industrial/cmd/lc_fontworkshapetype.png
|binary
 icon-themes/industrial/cmd/sc_fontworkshapetype.png
|binary
 icon-themes/industrial/duplicates  
|1 
 icon-themes/industrial/missing 
|1 
 icon-themes/oxygen/CopyrightsOxygen
|  220 +-
 icon-themes/oxygen/CopyrightsTango 
|1 
 icon-themes/tango/cmd/lc_presentationcurrentslide2.svg 
|  921 --
 icon-themes/tango/links.txt
|1 
 icon-themes/tango_testing/cmd/lc_stylenewbyexample-lc_styleupdatebyexample.svg 
|  502 -
 icon-themes/tango_testing/cmd/lc_stylenewbyexample.svg 
|  502 +
 13 files changed, 608 insertions(+), 1667 deletions(-)

New commits:
commit 18f41dfaf19d656d290c47d196ef2702e169a522
Author: Andrew dent@gmail.com
Date:   Thu Feb 12 01:07:58 2015 +

Remove old icons.

Remove outdated icons from themes, to bring inline with Galaxy.
Fixed file names where needed.
Update 'missing' log and 'links' for themes.

Change-Id: Ic4bbdf91c69e555919ea71c96c0155a7db8f0165
Signed-off-by: Andrew dent@gmail.com
Reviewed-on: https://gerrit.libreoffice.org/14466
Reviewed-by: Jan Holesovsky ke...@collabora.com
Tested-by: Jan Holesovsky ke...@collabora.com

diff --git a/icon-themes/crystal/cmd/lc_addbookmark.png 
b/icon-themes/crystal/cmd/lc_addbookmark.png
deleted file mode 100644
index d862e30..000
Binary files a/icon-themes/crystal/cmd/lc_addbookmark.png and /dev/null differ
diff --git a/icon-themes/crystal/cmd/lc_helpmenu.png 
b/icon-themes/crystal/cmd/lc_helpmenu.png
deleted file mode 100644
index 03724ee..000
Binary files a/icon-themes/crystal/cmd/lc_helpmenu.png and /dev/null differ
diff --git a/icon-themes/crystal/cmd/lc_print.png.png 
b/icon-themes/crystal/cmd/lc_print.png.png
deleted file mode 100644
index 63c8dda..000
Binary files a/icon-themes/crystal/cmd/lc_print.png.png and /dev/null differ
diff --git a/icon-themes/crystal/cmd/lc_stop.png 
b/icon-themes/crystal/cmd/lc_stop.png
deleted file mode 100644
index 38d7e4e..000
Binary files a/icon-themes/crystal/cmd/lc_stop.png and /dev/null differ
diff --git a/icon-themes/crystal/cmd/sc_addbookmark.png 
b/icon-themes/crystal/cmd/sc_addbookmark.png
deleted file mode 100644
index d8f21a3..000
Binary files a/icon-themes/crystal/cmd/sc_addbookmark.png and /dev/null differ
diff --git a/icon-themes/crystal/cmd/sc_helpmenu.png 
b/icon-themes/crystal/cmd/sc_helpmenu.png
deleted file mode 100644
index 57626e2..000
Binary files a/icon-themes/crystal/cmd/sc_helpmenu.png and /dev/null differ
diff --git a/icon-themes/crystal/cmd/sc_stop.png 
b/icon-themes/crystal/cmd/sc_stop.png
deleted file mode 100644
index 853548d..000
Binary files a/icon-themes/crystal/cmd/sc_stop.png and /dev/null differ
diff --git a/icon-themes/human/CopyrightsTango 
b/icon-themes/human/CopyrightsTango
index 056bf18..b6348f2 100644
--- a/icon-themes/human/CopyrightsTango
+++ b/icon-themes/human/CopyrightsTango
@@ -9,7 +9,6 @@ Copyright 2006 Jakub Steiner. Available under the terms of the 
GPL. (source: htt
 /cmd/sc_toggleobjectrotatemode.png
 /cmd/lc_advancedmode.png
 /cmd/sc_advancedmode.png
-/cmd/lc_bmpmask.png
 
 Copyright 2006-2007 Andreas Nilsson. Available under the terms of the GPL 
(source: http://tango.freedesktop.org/ArtLibreSet)
 /cmd/lc_aligncenter.png
diff --git a/icon-themes/human/cmd/lc_addbookmark.png 
b/icon-themes/human/cmd/lc_addbookmark.png
deleted file mode 100644
index f1eeb8d..000
Binary files a/icon-themes/human/cmd/lc_addbookmark.png and /dev/null differ
diff --git a/icon-themes/human/cmd/lc_stop.png 
b/icon-themes/human/cmd/lc_stop.png
deleted file mode 100644
index 16d5c50..000
Binary files a/icon-themes/human/cmd/lc_stop.png and /dev/null differ
diff --git a/icon-themes/human/cmd/lc_styleupdatebyexample.png 
b/icon-themes/human/cmd/lc_styleupdatebyexample.png
deleted file mode 100644
index 7633991..000
Binary files a/icon-themes/human/cmd/lc_styleupdatebyexample.png and /dev/null 
differ
diff --git a/icon-themes/human/cmd/msgbox-error.png 
b/icon-themes/human/cmd/msgbox-error.png
deleted file mode 100644
index e0a2bfb..000
Binary files a/icon-themes/human/cmd/msgbox-error.png and /dev/null differ
diff --git a/icon-themes/human/cmd/msgbox-info.png 
b/icon-themes/human/cmd/msgbox-info.png
deleted file mode 100644
index 6eb4752..000
Binary files a/icon-themes/human/cmd/msgbox-info.png

[Libreoffice-commits] core.git: icon-themes/crystal icon-themes/galaxy icon-themes/hicontrast icon-themes/human icon-themes/industrial icon-themes/oxygen icon-themes/tango icon-themes/tango_testing

2015-02-10 Thread Andrew
 dev/null|binary
 icon-themes/tango/links.txt |   81 
 2 files changed, 81 deletions(-)

New commits:
commit 3324d52dccacff9c3d8b18fe5deb8570a713d7c1
Author: Andrew dent@gmail.com
Date:   Sun Feb 8 12:58:24 2015 +

Remove duplicate L10n icons.

Remove icons that simply duplicate the default images, but are incorrectly 
stored in Locale specific directories (e.g. /cmd/pt-BR/). If they are removed, 
the default will be used anyway. De-duplication makes the task of icon theming 
easier TDF#30425.

Galaxy - 124x removed:
- lc_bold x10, 2.4KB. Default: 'B'.
- sc_bold x10, 1.6KB.
- lc_italic  x13, 2.8KB. Default: 'I'.
- sc_italic x13, 2.1KB.
- lc_underline x12, 2.8KB. Default: 'U'.
- sc_underline x12, 2.0KB.
- lc_underlinedouble x9, 2.2KB. Default: 'U'.
- sc_underlinedouble x9, 1.7KB.
- sc_label x26, 5.4KB. Default: 'ABC'.
- lc_numberformatdecimal x5, 1.7KB Default: '0.0'.
- sc_numberformatdecimal x5, 1.2KB.

Check and remove corresponding icons from other themes: Crystal - 82x.
Hicontrast - 97x.
Human - 76x.
Industrial - 76x.
Oxygen - 79x.
Tango - 81x deletions from links.txt: # Removing language specificity….
Tango_testing - 25x.

Change-Id: I4e42b494cbdfac2b377fae077001306778addfd0
Signed-off-by: Andrew dent@gmail.com
Reviewed-on: https://gerrit.libreoffice.org/14378
Reviewed-by: Jan Holesovsky ke...@collabora.com
Tested-by: Jan Holesovsky ke...@collabora.com

diff --git a/icon-themes/crystal/cmd/ar/lc_bold.png 
b/icon-themes/crystal/cmd/ar/lc_bold.png
deleted file mode 100644
index dbfa91b..000
Binary files a/icon-themes/crystal/cmd/ar/lc_bold.png and /dev/null differ
diff --git a/icon-themes/crystal/cmd/ar/lc_italic.png 
b/icon-themes/crystal/cmd/ar/lc_italic.png
deleted file mode 100644
index ddf8a94..000
Binary files a/icon-themes/crystal/cmd/ar/lc_italic.png and /dev/null differ
diff --git a/icon-themes/crystal/cmd/ar/lc_underline.png 
b/icon-themes/crystal/cmd/ar/lc_underline.png
deleted file mode 100644
index 5dcb197..000
Binary files a/icon-themes/crystal/cmd/ar/lc_underline.png and /dev/null differ
diff --git a/icon-themes/crystal/cmd/ar/sc_bold.png 
b/icon-themes/crystal/cmd/ar/sc_bold.png
deleted file mode 100644
index 653e0d8..000
Binary files a/icon-themes/crystal/cmd/ar/sc_bold.png and /dev/null differ
diff --git a/icon-themes/crystal/cmd/ar/sc_italic.png 
b/icon-themes/crystal/cmd/ar/sc_italic.png
deleted file mode 100644
index ff09c12..000
Binary files a/icon-themes/crystal/cmd/ar/sc_italic.png and /dev/null differ
diff --git a/icon-themes/crystal/cmd/ar/sc_underline.png 
b/icon-themes/crystal/cmd/ar/sc_underline.png
deleted file mode 100644
index 8a151c2..000
Binary files a/icon-themes/crystal/cmd/ar/sc_underline.png and /dev/null differ
diff --git a/icon-themes/crystal/cmd/ar/sc_underlinedouble.png 
b/icon-themes/crystal/cmd/ar/sc_underlinedouble.png
deleted file mode 100644
index e02d401..000
Binary files a/icon-themes/crystal/cmd/ar/sc_underlinedouble.png and /dev/null 
differ
diff --git a/icon-themes/crystal/cmd/cs/lc_bold.png 
b/icon-themes/crystal/cmd/cs/lc_bold.png
deleted file mode 100644
index dbfa91b..000
Binary files a/icon-themes/crystal/cmd/cs/lc_bold.png and /dev/null differ
diff --git a/icon-themes/crystal/cmd/cs/lc_italic.png 
b/icon-themes/crystal/cmd/cs/lc_italic.png
deleted file mode 100644
index ddf8a94..000
Binary files a/icon-themes/crystal/cmd/cs/lc_italic.png and /dev/null differ
diff --git a/icon-themes/crystal/cmd/cs/lc_underline.png 
b/icon-themes/crystal/cmd/cs/lc_underline.png
deleted file mode 100644
index b865e1d..000
Binary files a/icon-themes/crystal/cmd/cs/lc_underline.png and /dev/null differ
diff --git a/icon-themes/crystal/cmd/cs/sc_bold.png 
b/icon-themes/crystal/cmd/cs/sc_bold.png
deleted file mode 100644
index 653e0d8..000
Binary files a/icon-themes/crystal/cmd/cs/sc_bold.png and /dev/null differ
diff --git a/icon-themes/crystal/cmd/cs/sc_italic.png 
b/icon-themes/crystal/cmd/cs/sc_italic.png
deleted file mode 100644
index ff09c12..000
Binary files a/icon-themes/crystal/cmd/cs/sc_italic.png and /dev/null differ
diff --git a/icon-themes/crystal/cmd/cs/sc_underline.png 
b/icon-themes/crystal/cmd/cs/sc_underline.png
deleted file mode 100644
index 8a151c2..000
Binary files a/icon-themes/crystal/cmd/cs/sc_underline.png and /dev/null differ
diff --git a/icon-themes/crystal/cmd/cs/sc_underlinedouble.png 
b/icon-themes/crystal/cmd/cs/sc_underlinedouble.png
deleted file mode 100644
index e02d401..000
Binary files a/icon-themes/crystal/cmd/cs/sc_underlinedouble.png and /dev/null 
differ
diff --git a/icon-themes/crystal/cmd/de/lc_underline.png 
b/icon-themes/crystal/cmd/de/lc_underline.png
deleted file mode 100644
index 82bd288..000
Binary files a/icon-themes/crystal/cmd/de/lc_underline.png and /dev/null

Re: Java sidebar extensions and LibreOffice

2015-02-10 Thread Andrew Pitonyak
I see where you go to the end of the document, but I don't see you placing the 
cursor at the start.

I expect you to first go to the start with no selection and then Juno to the 
end with selection.

I suspect that you are simply setting  paragraph properties on the last  
paragraph.

That said, it is difficult for me to read the code on my phone

You may need  to enumerate the content (paragraphs) and set each paragraph or 
supported text content areas especially of your content is complex; for 
example, containing tables or frames.

On Feb 10, 2015 8:52 AM, fma fma3...@gmail.com wrote:

 I found it!!! 
 Still don't know what's going on behind the scenes, but at least the panel 
 is now visible. 
 In the build path of the extension, I changed the pointing of *unoil.jar* 
 from the file included in the path of AOO installation ( 
 /aoo_installation_path\program\classes/ ) to the one in the installation 
 path of LO ( /aoo_installation_path\program\classes/ ). 
 This raised an error in *AnalogClockPanel.java*, which was asking for adding 
 the unimplemented method *getMinimalWidth()*: I added it, generated the oxt 
 file and...  Voila!... the extension now runs fine on LO 4.4 too. 
 Unfortunately, I have now two problems with my custom extension, which 
 manipulates in several ways the active text document. 
 In details, I have two operations running fine in AOO 4.1.1 but having 
 unexpected results in LO 4.4; here they are: 

 *Code snippet 1 *- expected behaviour: formatting the whole document with 
 font Arial Black, size 14, justified; current behaviour: only the last 
 paragraph is formatted 

 /// active writer document 
 XTextDocument xTextDocument = (XTextDocument) 
 UnoRuntime.queryInterface(XTextDocument.class, xCurrentComponent); 

 // creating text range and cursor 
 XText xText = xTextDocument.getText(); 
 XTextRange xTextRange = xText.createTextCursor(); 

 // going to the end of document 
 ((XTextCursor)xTextRange).gotoEnd(true); 

 // getting properties 
 XPropertySet xTextProps = (XPropertySet) 
 UnoRuntime.queryInterface(XPropertySet.class, xTextRange); 

 // setting font size 
 xTextProps.setPropertyValue(CharHeight, new Float(14)); 

 // justifying 
 xTextProps.setPropertyValue(ParaAdjust,com.sun.star.style.ParagraphAdjust.BLOCK);
  

 // setting font 
 xTextProps.setPropertyValue(CharFontName, Arial Black); 
 / 

 *Code snippet 2* - expected behaviour: inserting a page break just before 
 each paragraph starting with the word Chapter; current behaviour: nothing 
 happens 

 /XTextCursor xTextCursor = xText.createTextCursor(); 

 // using a search descriptor to perform insert operations 
 XSearchable xSearchable = (XSearchable) 
 UnoRuntime.queryInterface(XSearchable.class, xTextDocument); 
 XSearchDescriptor xSearchDescriptor = xSearchable.createSearchDescriptor(); 

 xSearchDescriptor.setPropertyValue(SearchRegularExpression, new 
 Boolean(true)); 
 xSearchDescriptor.setPropertyValue(SearchCaseSensitive, new 
 Boolean(true)); 
 xSearchDescriptor.setSearchString(Chapter); 

 XInterface xInterface= (XInterface) 
 xSearchable.findFirst(xSearchDescriptor); 
 while (xInterface != null){ 

 XTextRange xStart = (com.sun.star.text.XTextRange) 
 UnoRuntime.queryInterface(com.sun.star.text.XTextRange.class, xInterface); 

 xTextCursor.gotoRange(xStart, false); 

 XPropertySet cursorProperty = UnoRuntime.queryInterface(XPropertySet.class, 
 xTextCursor);    

 cursorProperty.setPropertyValue(BreakType, BreakType.PAGE_BEFORE); 
 //$NON-NLS-1$ 

 xInterface = (XInterface) xSearchable.findNext(xInterface, 
 xSearchDescriptor); 
 } / 

 Any ideas about the reasons of the misbehaviour? 
 Thanks in advance and best regards 



 -- 
 View this message in context: 
 http://nabble.documentfoundation.org/Java-sidebar-extensions-and-LibreOffice-tp4139084p4139618.html
  
 Sent from the Dev mailing list archive at Nabble.com. 
 ___ 
 LibreOffice mailing list 
 LibreOffice@lists.freedesktop.org 
 http://lists.freedesktop.org/mailman/listinfo/libreoffice 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: icon-themes/galaxy icon-themes/hicontrast icon-themes/human icon-themes/oxygen icon-themes/tango

2015-02-06 Thread Andrew
 dev/null   |binary
 icon-themes/hicontrast/cmd/lc_autopilotmenu.png|binary
 icon-themes/hicontrast/cmd/sc_autopilotmenu.png|binary
 icon-themes/hicontrast/cmd/sc_characterbackgroundpattern.png   |binary
 icon-themes/hicontrast/cmd/sc_showannotations.png  |binary
 icon-themes/hicontrast/cmd/sc_spacing.png  |binary
 icon-themes/hicontrast/sc/res/sidebar/morebutton.bmp   |binary
 icon-themes/hicontrast/svx/res/symphony/sc_backgroundcolor.png |binary
 icon-themes/oxygen/CopyrightsHuman |1 -
 9 files changed, 1 deletion(-)

New commits:
commit 9506eaa6faf8f9d38d38d9bb25fa89968e23230c
Author: Andrew dent@gmail.com
Date:   Fri Feb 6 21:39:54 2015 +

Tidy up HC icons.

Remove and fix stray Hicontrast (HC) icons.
- Remove old HC icons from Human, Oxygen  Tango themes. (They should only 
exist in specific HC theme).
- Move few icons misplaced in Galaxy to correct HC theme.
- Fix HC filename: lch_autopilotmenu  lc_autopilotmenu.

Change-Id: I12b9729888ff7927f9c8f31d1d66d178ef39150b
Signed-off-by: Andrew dent@gmail.com
Reviewed-on: https://gerrit.libreoffice.org/14352
Reviewed-by: Jan Holesovsky ke...@collabora.com
Tested-by: Jan Holesovsky ke...@collabora.com

diff --git a/icon-themes/galaxy/cmd/sc_open_h.png 
b/icon-themes/galaxy/cmd/sc_open_h.png
deleted file mode 100644
index 892919b..000
Binary files a/icon-themes/galaxy/cmd/sc_open_h.png and /dev/null differ
diff --git a/icon-themes/hicontrast/cmd/lch_autopilotmenu.png 
b/icon-themes/hicontrast/cmd/lc_autopilotmenu.png
similarity index 100%
rename from icon-themes/hicontrast/cmd/lch_autopilotmenu.png
rename to icon-themes/hicontrast/cmd/lc_autopilotmenu.png
diff --git a/icon-themes/hicontrast/cmd/sch_autopilotmenu.png 
b/icon-themes/hicontrast/cmd/sc_autopilotmenu.png
similarity index 100%
rename from icon-themes/hicontrast/cmd/sch_autopilotmenu.png
rename to icon-themes/hicontrast/cmd/sc_autopilotmenu.png
diff --git a/icon-themes/galaxy/cmd/sch_characterbackgroundpattern.png 
b/icon-themes/hicontrast/cmd/sc_characterbackgroundpattern.png
similarity index 100%
rename from icon-themes/galaxy/cmd/sch_characterbackgroundpattern.png
rename to icon-themes/hicontrast/cmd/sc_characterbackgroundpattern.png
diff --git a/icon-themes/galaxy/cmd/sch_showannotations.png 
b/icon-themes/hicontrast/cmd/sc_showannotations.png
similarity index 100%
rename from icon-themes/galaxy/cmd/sch_showannotations.png
rename to icon-themes/hicontrast/cmd/sc_showannotations.png
diff --git a/icon-themes/galaxy/cmd/sch_spacing.png 
b/icon-themes/hicontrast/cmd/sc_spacing.png
similarity index 100%
rename from icon-themes/galaxy/cmd/sch_spacing.png
rename to icon-themes/hicontrast/cmd/sc_spacing.png
diff --git a/icon-themes/galaxy/sc/res/sidebar/morebutton_h.bmp 
b/icon-themes/hicontrast/sc/res/sidebar/morebutton.bmp
similarity index 100%
rename from icon-themes/galaxy/sc/res/sidebar/morebutton_h.bmp
rename to icon-themes/hicontrast/sc/res/sidebar/morebutton.bmp
diff --git a/icon-themes/galaxy/svx/res/symphony/sch_backgroundcolor.png 
b/icon-themes/hicontrast/svx/res/symphony/sc_backgroundcolor.png
similarity index 100%
rename from icon-themes/galaxy/svx/res/symphony/sch_backgroundcolor.png
rename to icon-themes/hicontrast/svx/res/symphony/sc_backgroundcolor.png
diff --git a/icon-themes/human/chart2/res/dataeditor_icon_h04.png 
b/icon-themes/human/chart2/res/dataeditor_icon_h04.png
deleted file mode 100644
index f46142b..000
Binary files a/icon-themes/human/chart2/res/dataeditor_icon_h04.png and 
/dev/null differ
diff --git a/icon-themes/human/cmd/sc_open_h.png 
b/icon-themes/human/cmd/sc_open_h.png
deleted file mode 100644
index 892919b..000
Binary files a/icon-themes/human/cmd/sc_open_h.png and /dev/null differ
diff --git a/icon-themes/human/res/imh30821.png 
b/icon-themes/human/res/imh30821.png
deleted file mode 100644
index 34e08b6..000
Binary files a/icon-themes/human/res/imh30821.png and /dev/null differ
diff --git a/icon-themes/human/res/tbh01.png b/icon-themes/human/res/tbh01.png
deleted file mode 100644
index 444cb3e..000
Binary files a/icon-themes/human/res/tbh01.png and /dev/null differ
diff --git a/icon-themes/human/res/tbh05.png b/icon-themes/human/res/tbh05.png
deleted file mode 100644
index cb5e15a..000
Binary files a/icon-themes/human/res/tbh05.png and /dev/null differ
diff --git a/icon-themes/human/sd/res/graphic_h.png 
b/icon-themes/human/sd/res/graphic_h.png
deleted file mode 100644
index 52611d8..000
Binary files a/icon-themes/human/sd/res/graphic_h.png and /dev/null differ
diff --git a/icon-themes/human/svx/res/galicon_h.png 
b/icon-themes/human/svx/res/galicon_h.png
deleted file mode 100644
index a7080b6..000
Binary files a/icon-themes/human/svx/res/galicon_h.png and /dev/null differ
diff --git a/icon-themes/human/svx/res

Re: Inserting a value into a XComponentContext

2014-12-03 Thread Andrew Pitonyak
Guessing from memory and not east for me to verify at the Moment, but I thought 
that the context was read only. I think that of you want to add values you need 
to create a new one with the desired named value pairs.

Are you able to inspect an object to see of it supports setting values... 

I have done very little in this area and don't remember...

Chris Sherlock chris.sherloc...@gmail.com wrote:

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Inserting a value into a XComponentContext

2014-11-30 Thread Andrew Pitonyak
Anything I have done has been in basic, which abstracts ask the hard bits of 
casting away. 

Of Han that looks to be correct based on my memory. More specifically, that you 
add the values (or pad the values) on creation. 

Chris Sherlock chris.sherloc...@gmail.com wrote:

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Inserting a value into a XComponentContext

2014-11-30 Thread Andrew Pitonyak
No stress on the number of mails.

I did not think that you could change a context after it was created... But I 
would certainly try if I had a need. I know very little about this specifically.

Chris Sherlock chris.sherloc...@gmail.com wrote:

Oh, and sorry for the number of emails, but I guess I'm assuming that you can 
add a new property key at any point by insertByName()... 


Thanks in advance, UNO is a little tricky at this level. At least that's what 
I find... from what I can tell, it really comes down to the 
cppuhelper::ComponentContext class which implements the XNameContainer 
interface. *Please* correct me if I'm wrong :-)


Chris


On Mon, Dec 1, 2014 at 10:29 AM, Chris Sherlock chris.sherloc...@gmail.com 
wrote:

So what about the following approach:


Reference XComponentContext  xContext = 
::comphelper::getProcessComponentContext();
::cppu::ContextEntry_Init aContextInfo[] =
{
    ::cppu::ContextEntry_Init(testkey, uno::Any() ),
}

xNewContext = ::cppu::createComponentContext(aContextInfo, 
sizeof(aContextInfo) / sizeof (aHandlerContextInfo[0]), xContext);


Then to get access to the container, I use something like this:


Reference container::XNameContainer  xNameContainer( xContext, UNO_QUERY );


Is this the right approach? Will the delegate ComponentContext work?


Chris



On Mon, Dec 1, 2014 at 12:25 AM, Andrew Pitonyak and...@pitonyak.org wrote:

Guessing from memory and not east for me to verify at the Moment, but I 
thought that the context was read only. I think that of you want to add values 
you need to create a new one with the desired named value pairs.

Are you able to inspect an object to see of it supports setting values... 

I have done very little in this area and don't remember...



Chris Sherlock chris.sherloc...@gmail.com wrote:

Hi all, 


How do you insert a value to be retrieved later into an XComponentContext 
reference?


I see there is a XNameContainer, which is created by 
comphelper::NameContainer_createInstance(::cppu::UnoTypesal_Int32::get()) or 
whatever value you want. From here you then do insertByName. 


However, how do you then insert this into the component context?


Chris



___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Who knows of a free UML tool to work with libreoffice?

2014-11-26 Thread Andrew Douglas Pitonyak

Nicholas,

Can you clarify your request?


Do you simply need a free UML tool, something that allows you to model 
UML from within LO, or something to create UML for use by the official 
LO project?



Some years back, I found a UML to a project that directed that open 
source tools be used. If I remember correctly, we chose ArgoUML. That 
was sufficiently long ago that there are likely new options.


http://en.wikipedia.org/wiki/List_of_Unified_Modeling_Language_tools
http://en.wikipedia.org/wiki/Category:Free_UML_tools

My preferred UML package for general use is Enterprise Architect by Sparx.

http://www.sparxsystems.com/

The thing that I liked about their software is that they have a version 
that is price accessible to individual developers. For example, the 
Desktop version is $135. My complaint with the desktop version is that 
it does not support code import / export, and it is nice to be able to 
point at a block of code and then import it into UML class diagrams. 
That is supported by the professional version for $199. Even in a 
corporate setting I have not found the extra features overly compelling 
(because last I checked [8 years ago, so this may have changed], the 
ability to use a DBMS as the back-end stored an XML blob representing 
large chunks of the diagram so that multiple people could not edit 
near portions at the same time, they had to be totally separate 
packages).


http://www.sparxsystems.com/products/ea/purchase.html

The Sparx product (when I last evaluated, which was when their top 
version was the Corporate Edition), it did not come close to packages 
such as Rational Rose with respect to things like integration with 
multiple levels of development at the cost thousands of dollars. On the 
other hand, if you primarily are interested in UML, it is pretty 
comprehensive and their bang for the buck (so to speak) is very high.


The Sparx Enterprise Architect (EA) program is able to generate very 
nice reports that you can then edit inside of LO, but, they don't 
round-trip back into EA. I expect that any of the products, free or 
otherwise, will allow you to generate some sort of artifact that you can 
then embed in an LO document, but, the standard UML packages will likely 
not create something that integrates with LO or allows round-tripping 
the data (create in tool, edit in LO, bring back into the tool).


Interested if you do find something that does integrate.

If you are interested in direct integration, then you will need to use 
Draw and do all the work yourself


For example:
http://mvantzet.wordpress.com/2009/10/20/drawing-uml-diagrams-in-openoffice-draw/




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

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Changes to 'refs/changes/61/8361/1'

2014-09-29 Thread Andrew

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/61/8361/3'

2014-09-29 Thread Andrew

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/04/8404/1'

2014-09-29 Thread Andrew

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/95/8795/1'

2014-09-29 Thread Andrew

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/00/2300/2'

2014-09-29 Thread Andrew Branch

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/00/2300/1'

2014-09-29 Thread Andrew Branch

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/70/8370/1'

2014-09-29 Thread Andrew

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/70/8370/2'

2014-09-29 Thread Andrew

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/94/8794/1'

2014-09-29 Thread Andrew

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/63/8363/2'

2014-09-29 Thread Andrew

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/63/8363/1'

2014-09-29 Thread Andrew

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/94/8794/2'

2014-09-29 Thread Andrew

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/99/8799/1'

2014-09-29 Thread Andrew

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Top posting vs posting styles

2014-09-24 Thread Andrew Douglas Pitonyak
It seems to be an issue where one's view point is attacked with 
religious zeal.  The fact that people feel so strongly on both sides is 
an indicator to me that it is nothing more than personal preference.  
The posting style used affects the best way to follow the thread. If you 
leave everything in every response, then it is easier to read from the 
top to the bottom to understand everything if bottom posting is used. If 
you read every post as it comes in, it is easier to follow if top 
posting is used unless your mail reader auto-magically hides all of the 
contained previous posts. Well, that is my opinion anyway.


A sufficient number of people bottom post that I installed a plug-in 
that hides all previous posts unless I expand them out manually. 
Annoying that I need to do that, but, otherwise, it just takes too long 
to read the emails. It is then annoying when I want to read something 
part way through, but, I don't generally complain about it.


My general approach is to reply using whatever method has already been 
used in posts. So, if there is already a response, I will make my 
response to be top or bottom based on the previous responses. 
Consistency within a single message strikes me as a good choice. I make 
random decisions of top or bottom based on not much when I am the first 
responder. I am more likely to top post for a person that appears to be 
a newbie since it seems to me that people without exposure to mailing 
lists are more inclined to to top post. I don't know if that is because 
that seems to be the way that outlook operates or that is simply what is 
more natural for them to use. I do know that if I used outlook from work 
to respond to these messages, it would be a bunch of extra effort to do 
anything but top post.





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

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Should we use boost::math::log1p/expm1 instead of rtl_math_log1p/expm1 ?

2014-09-17 Thread Andrew Douglas Pitonyak

On 09/15/2014 03:38 PM, julien2412 wrote:

Hello,

Following
http://cgit.freedesktop.org/libreoffice/core/commit/?id=a3ad01dc1e07da21182077bd899094fd73f57714,
should  it worth it to replace rtl_math_log1p/rtl_math_expm1 and related by
boost::math::log1p/expm1 ?
Or should we let the code as it is right now?

Since we already use Boost, I thought it could be interesting to use it even
more, waiting by a even more C++11 compatibility (since this standard
includes these 2 functions).

Julien



--
View this message in context: 
http://nabble.documentfoundation.org/Should-we-use-boost-math-log1p-expm1-instead-of-rtl-math-log1p-expm1-tp4122334.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice



Julien, I am curious if you have done any testing. On a whim, I ran the 
following on my 64-bit Fedora machine using g++.


#include boost/math/special_functions/log1p.hpp
#include boost/math/special_functions/expm1.hpp

#include iostream
#include math.h

int main()
{
  double min_x = -0.2;
  double max_x = 0.2;
  long max_its = 1000;
  double delta_x = (max_x - min_x) / (max_its - 1);
  double x;
  double d;
  long i;
  for (i=0; imax_its; ++i) {
x = min_x + i * delta_x;
d = fabs(log1p(x) - boost::math::log1p(x));
if (d  0.0) {
  std::cout  1. diff(  x  ) =   d  std::endl;
}
  }

  for (i=0; imax_its; ++i) {
x = min_x + i * delta_x;
d = fabs(expm1(x) - boost::math::expm1(x));
if (d  0.0) {
  std::cout  2. diff(  x  ) =   d  std::endl;
}
  }
  std::cout  Finished!  std::endl;
  return 0;
}

No differences were found in this little test. Then again, on Fedora, 
Boost may be configured to use the built-in implementation, I don't 
really know. I did not check our source code, but, it might reduce the 
LO code complexity a little bit, that might be a gain.


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

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PATCH 01/17] XSLT: Better error messages in measure_conversion.xsl

2014-08-19 Thread Andrew Sayers
On Mon, Aug 18, 2014 at 02:05:15pm +0200, Jan-Marek Glogowski wrote:
 Thanks for the patches, but they won't be accepted in this form.
 
 Please follow
 
 https://wiki.documentfoundation.org/Development/gerrit

Er, ok.  I had been following Google's first link for libreoffice patch
process:

https://wiki.documentfoundation.org/Development/Patch_Handling_Guidelines

That page implies both forms are acceptable, so I picked the one that seemed
like the least hassle for a one-time patch.  If that's not the case, could I
suggest making the page a simple link to the gerrit page, or at least amending
the pre-preamble with words to the effect of patches will no longer be
accepted in the form described on this page?

- Andrew
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH 17/17] XHTML export: remove 'odfLiEnd'

2014-08-15 Thread andrew-libreoffice . org
From: Andrew Sayers andrew-libreoffice@pileofstuff.org

Inserting space to work around an IE6/7 bug does more harm than good nowadays.
---
 filter/source/xslt/odf2xhtml/export/xhtml/body.xsl   | 6 --
 filter/source/xslt/odf2xhtml/export/xhtml/header.xsl | 5 -
 2 files changed, 11 deletions(-)

diff --git filter/source/xslt/odf2xhtml/export/xhtml/body.xsl 
filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
index bbf90d5..245da83 100644
--- filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
+++ filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
@@ -2559,9 +2559,6 @@
xsl:with-param name=globalData 
select=$globalData/
xsl:with-param name=listIndent 
select=$minLabelWidth/
/xsl:apply-templates
-   !-- this span disables the float necessary to bring 
two block elements on one line. It contains a space as IE6 bug workaround --
-   span class=odfLiEnd/span
-   xsl:text#x200b;/xsl:text
/xsl:element
 
xsl:apply-templates mode=list-item-children 
select=following-sibling::*[1]
@@ -2628,9 +2625,6 @@
/xsl:apply-templates
/xsl:element
 
-   !-- this span disables the float necessary to bring 
two block elements on one line. It contains a space as IE6 bug workaround --
-   span class=odfLiEnd/span
-   xsl:text#x200b;/xsl:text
/xsl:element
 
xsl:apply-templates mode=list-item-children 
select=following-sibling::*[1]
diff --git filter/source/xslt/odf2xhtml/export/xhtml/header.xsl 
filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
index f76c451..d0db766 100644
--- filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
+++ filter/source/xslt/odf2xhtml/export/xhtml/header.xsl
@@ -99,11 +99,6 @@
/xsl:text
 xsl:textli { list-style: none; margin:0; padding:0;}
/xsl:text
-xsl:comment li span.odfLiEnd - IE 7 issue/xsl:comment
-xsl:text
-   /xsl:text
-xsl:textli span. { clear: both; line-height:0; width:0; height:0; margin:0; 
padding:0; }
-   /xsl:text
 xsl:textspan.footnodeNumber { padding-right:1em; }
/xsl:text
 xsl:textspan.annotation_style_by_filter { font-size:95%; font-family:Arial; 
background-color:#fff000;  margin:0; border:0; padding:0;  }
-- 
1.8.5.1

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH 03/17] XHTML export: remove trailing space

2014-08-14 Thread andrew-libreoffice . org
From: Andrew Sayers andrew-libreoffice@pileofstuff.org

---
 .../source/xslt/odf2xhtml/export/common/body.xsl   | 68 +++---
 .../export/common/styles/style_mapping_css.xsl |  6 +-
 2 files changed, 37 insertions(+), 37 deletions(-)

diff --git filter/source/xslt/odf2xhtml/export/common/body.xsl 
filter/source/xslt/odf2xhtml/export/common/body.xsl
index 3196fac..4353c7c 100644
--- filter/source/xslt/odf2xhtml/export/common/body.xsl
+++ filter/source/xslt/odf2xhtml/export/common/body.xsl
@@ -151,7 +151,7 @@
xsl:apply-templates select=@* | node()
xsl:with-param name=globalData 
select=$globalData/
/xsl:apply-templates
-   
+
/xsl:element
/xsl:if
/xsl:template
@@ -170,13 +170,13 @@
/xsl:choose
 /xsl:attribute
 /xsl:template
-
+
xsl:template match=text:sequence
xsl:param name=globalData/
 
xsl:element namespace={$namespace} name=a
xsl:apply-templates select=@* /
-   xsl:attribute name=id   
+   xsl:attribute name=id
xsl:choose
xsl:when 
test=number(substring(@text:ref-name,1,1))
!-- Heuristic: If the first character 
is a number a 'a_' will be set
@@ -186,7 +186,7 @@
xsl:otherwise
xsl:value-of 
select=translate(@text:ref-name, '#xA;amp;lt;gt;.,;: %()[]/\+', 
'___')/
/xsl:otherwise
-   /xsl:choose   
+   /xsl:choose
/xsl:attribute
/xsl:element
 
@@ -210,7 +210,7 @@
xsl:otherwise
xsl:value-of 
select=translate(@text:name, '#xA;amp;lt;gt;.,;: %()[]/\+', 
'___')/
/xsl:otherwise
-   /xsl:choose   
+   /xsl:choose
/xsl:attribute
/xsl:element
 
@@ -256,60 +256,60 @@
xsl:apply-templates/
/xsl:template
 
-   
+
 xsl:template match=office:annotation
 xsl:element name=span
-xsl:attribute name=titleannotation/xsl:attribute   
-xsl:attribute 
name=classannotation_style_by_filter/xsl:attribute
+xsl:attribute name=titleannotation/xsl:attribute
+xsl:attribute 
name=classannotation_style_by_filter/xsl:attribute
 xsl:apply-templates select=@* /
-br/
+br/
 xsl:text[ANNOTATION:/xsl:text
 br/
 xsl:apply-templates select=* mode=annotation/
-xsl:text]/xsl:text   
+xsl:text]/xsl:text
 /xsl:element
 /xsl:template
-
+
 xsl:template match=text:p mode=annotation
-br/
+br/
 xsl:element name=span
-xsl:textNOTE: '/xsl:text
+xsl:textNOTE: '/xsl:text
 xsl:apply-templates /
-xsl:text'/xsl:text
+xsl:text'/xsl:text
 /xsl:element
 /xsl:template
-
+
 xsl:template match=dc:creator mode=annotation
-br/ 
+br/
 xsl:element name=span
-xsl:attribute name=titledc:creator/xsl:attribute  
-xsl:textBY '/xsl:text
+xsl:attribute name=titledc:creator/xsl:attribute
+xsl:textBY '/xsl:text
 xsl:apply-templates /
 xsl:text'/xsl:text
-/xsl:element   
+/xsl:element
 /xsl:template
-
-xsl:template match=dc:date mode=annotation  
-br/ 
+
+xsl:template match=dc:date mode=annotation
+br/
 xsl:element name=span
 xsl:attribute name=titledc:date/xsl:attribute
-xsl:textON '/xsl:text
+xsl:textON '/xsl:text
 xsl:apply-templates /
 xsl:text'/xsl:text
-/xsl:element   
-/xsl:template
-
+/xsl:element
+/xsl:template
+
 xsl:template match=meta:date-string mode=annotation
-br/
+br/
 xsl:element name=span
-xsl:attribute name=titlemeta-date-string/xsl:attribute  
-xsl:textMETA DATE '/xsl:text
+xsl:attribute name=titlemeta-date-string/xsl:attribute
+xsl:textMETA DATE '/xsl:text
 xsl:apply-templates /
-xsl:text

[PATCH 12/17] XHTML export: strip whitespace in binary data

2014-08-14 Thread andrew-libreoffice . org
From: Andrew Sayers andrew-libreoffice@pileofstuff.org

Fixes output in xsltproc
---
 filter/source/xslt/odf2xhtml/export/common/body.xsl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git filter/source/xslt/odf2xhtml/export/common/body.xsl 
filter/source/xslt/odf2xhtml/export/common/body.xsl
index cfb464f..5aed262 100644
--- filter/source/xslt/odf2xhtml/export/common/body.xsl
+++ filter/source/xslt/odf2xhtml/export/common/body.xsl
@@ -360,7 +360,7 @@
xsl:value-of select=concat('a_', 
translate(normalize-space($title), '.,;: %()[]/\+', '_'))/
/xsl:when
xsl:when test=self::draw:image[office:binary-data]
-   
xsl:textdata:image/*;base64,/xsl:textxsl:value-of 
select=office:binary-data/
+   
xsl:textdata:image/*;base64,/xsl:textxsl:value-of select=translate( 
translate(office:binary-data, ' ', '' ), '#10;', '' )/
/xsl:when
xsl:otherwise
xsl:choose
-- 
1.8.5.1

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH 13/17] XHTML export: silence an unhelpful warning

2014-08-14 Thread andrew-libreoffice . org
From: Andrew Sayers andrew-libreoffice@pileofstuff.org

---
 filter/source/xslt/odf2xhtml/export/common/body.xsl | 2 +-
 filter/source/xslt/odf2xhtml/export/xhtml/body.xsl  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git filter/source/xslt/odf2xhtml/export/common/body.xsl 
filter/source/xslt/odf2xhtml/export/common/body.xsl
index 5aed262..dfb49c0 100644
--- filter/source/xslt/odf2xhtml/export/common/body.xsl
+++ filter/source/xslt/odf2xhtml/export/common/body.xsl
@@ -431,7 +431,7 @@
!-- default template for not recognized elements --
xsl:template match=*
xsl:param name=globalData/
-   xsl:messageUsing default element rule for ODF element 
'xsl:value-of select=name()/'./xsl:message
+   xsl:if test=$debugEnabledxsl:messageUsing default element 
rule for ODF element 'xsl:value-of select=name()/'./xsl:message/xsl:if
 
xsl:apply-templates
xsl:with-param name=globalData select=$globalData/
diff --git filter/source/xslt/odf2xhtml/export/xhtml/body.xsl 
filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
index 5df5cd4..51fb7b6 100644
--- filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
+++ filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
@@ -1537,12 +1537,12 @@
xsl:value-of 
select=../svg:title/
/xsl:when
xsl:otherwise
-   xsl:message
+   xsl:if 
test=$debugEnabledxsl:message
Accessibility Warning:
 No alternate text ('svg:title' element) set for
 image '
xsl:value-of 
select=@xlink:href/'!
-   /xsl:message
+   /xsl:message/xsl:if
/xsl:otherwise
/xsl:choose
/xsl:attribute
-- 
1.8.5.1

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH 06/17] XHTML export: Specify the font-family for bullet points

2014-08-14 Thread andrew-libreoffice . org
From: Andrew Sayers andrew-libreoffice@pileofstuff.org

---
 filter/source/xslt/odf2xhtml/export/xhtml/body.xsl | 10 ++
 1 file changed, 10 insertions(+)

diff --git filter/source/xslt/odf2xhtml/export/xhtml/body.xsl 
filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
index 6f3e980..fc018c4 100644
--- filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
+++ filter/source/xslt/odf2xhtml/export/xhtml/body.xsl
@@ -2023,6 +2023,16 @@

xsl:text;min-width:/xsl:text

xsl:value-of select=$listLabelWidth/

xsl:textcm;/xsl:text
+   
xsl:variable name=fontFamilyContent
+   
xsl:value-of 
select=$listLevelStyle/style:text-properties/@fo:font-family/
+   
/xsl:variable
+   
xsl:choose
+   
xsl:when test=$fontFamilyContent != ''
+   
xsl:textfont-family:/xsl:text
+   
xsl:value-of select=$fontFamilyContent/
+   
xsl:text;/xsl:text
+   
/xsl:when
+   
/xsl:choose

/xsl:attribute

xsl:variable name=labelContent

xsl:choose
-- 
1.8.5.1

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


  1   2   3   >