Re: ImageURL

2017-11-30 Thread sos

you always need to convert a system path to a URL (i think :-) )
use the "ConvertToUrl" function what will result in 
"file:///images/apple.png"

Hope it helps
Greetz
Fernand

On 30/11/2017 13:09, Rushna Jabi wrote:

Hi all,
I am working on OpenOffice plugin using NetBeans 8.0.2.
I have created a dialog using XDialog and now I want add image on this
dialog.
but I am not getting image.

My code is:

//create the image model and set the properties
  Object imageModel =
xMultiServiceFactory.createInstance("com.sun.star.awt.UnoControlImageControlModel");
 XPropertySet imageProperties = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, imageModel);
 imageProperties.setPropertyValue("PositionX", new Integer(0));
 imageProperties.setPropertyValue("PositionY", new Integer(0));
 imageProperties.setPropertyValue("Width", new Integer(150));
 imageProperties.setPropertyValue("Height", new Integer(150));
 imageProperties.setPropertyValue("Name", name);
 imageProperties.setPropertyValue("ScaleImage", new Boolean(true));

 imageProperties.setPropertyValue("ImageURL", new
String("/images/apple.png"));

 // insert the control models into the dialog model
 XNameContainer xNameCont = ( XNameContainer
)UnoRuntime.queryInterface( XNameContainer.class, dialogModel );


xNameCont.insertByName(name, imageModel);


I am not getting image on Dialog using relative path.
I need your support, please help me.



Thanks & regards,
Rushna Jabi
Software Engineer




-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: apache odftoolkit question

2017-10-05 Thread sos
Is suppose you must change the PageStyle and that must been done after 
inserting a pagebreak

hopes it helps
grt;
Fernand
On 05/10/2017 14:05, Vitaliy Yatsunskyi wrote:

Please help me to answer my question
https://stackoverflow.com/questions/46580464/apache-odftoolkit-portrait-landscape-mode

I'm using library apache odftoolkit
 to generate report from Java code
to *.odt file. Have code like this:

outputOdt = TextDocument.newTextDocument();
Paragraph p = outputOdt.addParagraph("some text");
p.appendTextContent("some text");

I'm adding paragraphs, tables, setting fonts, and it works fine. But I need
to set some pages in my document in Landscape mode but don't know how to do
this. I found API class PageLayoutProperties and method
setPrintOrientation(), but don't know where to call it. Anybody know?
Thank you!




-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: Import & export Basic libraries ?

2017-10-05 Thread sos

Chrstophe,

maybe this 2 BASIC subs clould help

sub AddBasicLibrary(srcname,destname)
Dim oSrcDoc as object
Dim SrcLibraryName As String, DestLibraryName As String
Dim oSrcLib As Object, oDestLib As Object, iCounter As Integer
Dim oSrc2Lib As Object , oDest2Lib As Object
Dim iLib As Integer
Dim ModuleName AS String, oModule AS Object
Dim sSrcModules
' set these 2 variables to your lib name
SrcLibraryName = srcname' library that contains the modules
DestLibraryName = destname
' This library will be created and is the
' destination for the modules from the source document.
Dim mFileProperties(0) As New com.sun.star.beans.PropertyValue


   mFileProperties(0).Name="Hidden"
   mFileProperties(0).Value= true
  ' on local error goto geenfile
   oSrcDoc = 
StarDesktop.LoadComponentFromURL(ConvertToURL("t:\template\artikels\macros\Macros_Opmaak_artikels_LaatsteVersie.odt"), 
"_blank", 0, mFileProperties())


oSrcLibs = oSrcDoc.BasicLibraries
oDestLibs = BasicLibraries 'out of this document
oSrcLibs.LoadLibrary(SrcLibraryName)'[DL] Added LoadLibrary
For iLib = 1 To 2 ' this makes two passes, one for the dialogues and one 
for the macros

If oDestLibs.hasByName( DestLibraryName ) = TRue Then
   DeleteBasicLibrary( DestLibraryName) ' = SUB om leeg te maken
   oDestLibs.createLibrary(DestLibraryName )
else
   oDestLibs.createLibrary(DestLibraryName )
End If
If oSrcLibs.hasByName( SrcLibraryName ) Then
oSrcLib = oSrcLibs.getByName( SrcLibraryName )
oDestLib = oDestLibs.getByName(DestLibraryName)
sSrcModules = oSrcLib.getElementNames()
iCounter = lBound( sSrcModules() )
while( iCounter <= uBound( sSrcModules() ) )
If oDestLib.hasByName( sSrcModules(iCounter) ) = False Then
'On Error Goto ErrorHandler
oDestLib.insertByName(  sSrcModules(iCounter), 
oSrcLib.getByName( sSrcModules(iCounter) )

End If
iCounter = iCounter + 1
wend
End If
oSrcLibs = oSrcDoc.DialogLibraries  'DialogLibraries ' The same for 
the Dialog libraries

oDestLibs = DialogLibraries
oSrcLibs.LoadLibrary( SrcLibraryName )'[DL] Added LoadLibrary
Next iLib
'end if
oSrcDoc.dispose

Exit sub

Geenfile:
'Style = 48 'OKonly + Exclamation
MsgBox "ERROR bij het laden van 
t:\template\artikels\macros\Macros_Opmaak_artikels_LaatsteVersie.odt" & 
chr(13) & "Bestaat niet !!!"

'AddBasicLibrary = False
End Sub

Sub DeleteBasicLibrary( srcname)
Dim DelLibraryName As String
Dim oDelLib As Object, iCounter As Integer
Dim oLib As Object, oGlobalLib As Object
Dim iLib As Integer
Dim sSrcModules
DelLibraryName = srcname
oLib =  BasicLibraries ' For Basic libaries in this document
For iLib = 1 To 2 ' this makes two passes, one for the dialogues and one 
for the macros

If oLib.hasByName( DelLibraryName ) Then
oLib.removeLibrary( DelLibraryName )
End If
oLib = DialogLibraries
Next iLib

End Sub


On 05/10/2017 11:00, CHRISTOPHE JOYAU wrote:

Hello,

I'm looking for a way to import Basic Libraries with Open Office 4.X about 
Libraries of a component (not about Globalscope Libraries).

I know to export with :

Librairies=BasicLibrairies
For Each Librairie In Librairies()
BasicLibraries.exportLibrary(Librairie.Name,ConvertToUrl(Chem & 
"Basic"),com.sun.star.ucb.AuthenticationRequest)
Next

So i get in directory Chem & "Basic" => xba and xlb


I 'd like to do inverse operation and it 's not working if i use
BasicLibraries.CreateLibraryLink(R,ConvertToUrl(Chem & "Basic\" & R),False)

With this command i can obtain a new library R in my component but with an error and it's 
empty and with a password " " ( it's mad !) .

Could you please endicate the good command to import libraries ?

Thank you for your attention and i hope your answer !
Avec mes salutations,
Christophe Joyau
Pupitreur assistant-Utilisateurs
C entre I nterrégional de S aisie des D onnées
22 bis avenue du 8 mai 1945
95200 Sarcelles
Tel : 09.70.27.18.57
' Ensemble des librairies contenues dans Clas ( il aurait été plus simple 
d'utiliser seulement )





-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: images overlapping in java bridge

2017-06-06 Thread sos


On 06/06/2017 11:27, Vijayalakshmi A P wrote:

Hi,

This is in OO3.3.

I am writing images and data to the doc export.

The issue I am facing is when I try to insert multiple images one after
another,
They just keep overlapping each other.

your code must repositioning every image


Can anyone plz help me to get across this??

The images should appear one after another.


Thanks
Vijaya




-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: Is anyone working on a CMYK option in OpenOffice?

2017-02-13 Thread sos

Russell,
I do not think anyone is working on this feature.
This days the convertion from RGB tot CMYK is done once the PDF is made, 
the whole colour content is then converted by specialised software who 
produce CMYK bound to the machines who will print the PDF.
Every printing house has his own CMYK standards and they are best placed 
to do this conversions.


Greetz

Fernand
On 12/02/2017 03:32, Russell Mathews wrote:

G'day,

Is anyone working on a CMYK option in OpenOffice; that is that OO will
export a PDF with CMYK colour?


**
Russell G H Mathews BCom BSc LLB BA

Email: http://HaigReport.com/eml.html
**




-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: Basic editor and key-words

2016-01-01 Thread sos




Sent from my Samsung Galaxy smartphone. Original message From: 
FR web forum  Date: 31/12/2015  17:39  (GMT+01:00) To: 
dev@openoffice.apache.org Subject: Re: Basic editor and key-words 
>There is a difference between reserved words and (predefined) function 
>names. This belongs to ALL programming languages.

>LBound and UBound are not reserved words.

OK the goal is to help programmers
So we can have a different color for predefined functions? 

+1  and have a tool to list this functions I do a lot of basic coding and also 
a lot of Googling to find functions I need :-)
-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org


Re: One Addons.xcu with toolbars for AOO and LO possible?

2015-09-15 Thread SOS

in LO the higest "working version is limited to "3.0" so its a bug
On 15/09/2015 19:23, Tsutomu Uchino wrote:

Hi,

I have added l:LibreOffice-minimal-version to my extension's
deescription.xml file.
But I got error while installing the package to Apache OpenOffice 4.
On the current version, you can not put it into an extension that targets
AOO.

Regards

2015-09-16 1:51 GMT+09:00 Oliver Brinzing :


Hi Mathias,

I can't find any explanation for a difference for the 

node in description.xml. It seems AOO and LO tests always against the
same entries.


please see
https://wiki.documentfoundation.org/Development/Extension_Development for
lo:

http://openoffice.org/extensions/description/2006";
  xmlns:l="http://libreoffice.org/extensions/description/2011";
  xmlns:d="
http://openoffice.org/extensions/description/2006";
  xmlns:xlink="http://www.w3.org/1999/xlink";>

   
http://openoffice.org/extensions/description/2006";
  xmlns:l="http://openoffice.org/extensions/description/2006";
  xmlns:d="
http://openoffice.org/extensions/description/2006";
  xmlns:xlink="http://www.w3.org/1999/xlink";>

   



Regards
Oliver



-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org





-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: [Discuss] Review and improve graphics memory handling

2015-05-27 Thread SOS

Armin,

Just tried manualy , but not reproducable on windows8.
So it is solved or onlyhappening  when using the API.
Not worthy to lose more time on it.
Sorry

Fernand

On 27/05/2015 10:36, armin.le.gr...@me.com wrote:

Hi greetz,

cannot say if this is related - probably not. If you have a 
reproducable (short?) way to show this, please open a task and 
describe it there. Thanks in advance, this is important.


Sincerely,
alg

On 26.05.2015 15:26, SOS wrote:

Armin,
Do not know if his is related but there is  a memory leak when using 
ImageControls in dialogs. When filling a ImageControl with image 
data, it eats memory and only release this memory after restarting OO.


greetz

Fernand

On 26/05/2015 14:45, armin.le.gr...@me.com wrote:

Hi Rory,

On 26.05.2015 10:37, Rory O'Farrell wrote:

On Tue, 26 May 2015 10:19:07 +0200
"armin.le.gr...@me.com"  wrote:


Hi,

it should be http://bz.apache.org/ooo/show_bug.cgi?id=125519 which is
fixed and in master, would be a candidate for AOO412, too.

Sincerely,
alg


Thank you for the link to Bugzilla, Armin.  That bug might answer 
the crash problem which seems to be Windows related; as most of our 
Users are using Windows that is good.


However this does not address the overall problem of the increasing 
slow memory management as memory allocated and used by OO increases 
when large files are processed, be they of graphics or just text 
file handling.  It may be that the fundamental logic underlying the 
file structure and its processing will not permit of any 
improvement in this (I don't know - it is currently beyond my 
knowledge), but often a change in the algorithm used will allow an 
improvement in a program bottleneck.


Has anyone any thoughts on that aspect?


Yes, constantly. For 32bit AOO (Windows unfortunately) the 4GB mem 
quickly gets filled with modern bitmaps. The mentioned fix resolves 
that by limiting used mem for loaded pics - not much else to be done 
without bigger redesigns and on 32bit.

Rewrites of this aspect are surely welcome!

Sincerely,
alg




On 26.05.2015 00:28, Kay Schenk wrote:

On 05/25/2015 11:03 AM, Rory O'Farrell wrote:
There are constant reports of images going missing in OO 
Writer.  The
problem is not consistently reproducible, but is there 
nevertheless.

A recent report suggests it might be memory related:
https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=41271&p=353246#p353246 



   It is also informative to move back along that thread for other
instances of the problem.  I doubt that we can dismiss all
occurrences of this problem as "finger trouble" (i.e., improper 
user

usage).

Might it be time to consider increasing the maximum memory 
allocation

for graphics (currently 256 MB) and to review the memory management
of the suggested compilers?  Also, in case the problem arises from
background processing which has not completed on shut down of OO,
ought a "please wait" flag be displayed, a flag specifically 
keyed to

any such background process?

In these days of large memory 256MB is a very small allocation.
Having observed OO's use of memory with large text (not graphics)
files I note that its allocation and consumption of memory is
increasingly slower as the amount of memory used by it 
increases.  It
is most certainly not linear - I have no accurate method of 
deciding

if the increase in slowness is geometric or even exponential.


I found John Ha's analyses and comments back from Apr, 2014 very
informative. And, his final followup on Jun 7, 2014 certainly 
indicates

the problem stems from exceeding the graphic memory limits.

I couldn't find an actual issue that directly related to this so 
I will

enter one, and reference this thread.   Maybe that will help raise
attention to it.


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org







-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org




-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: [Discuss] Review and improve graphics memory handling

2015-05-26 Thread SOS

Armin,
Do not know if his is related but there is  a memory leak when using 
ImageControls in dialogs. When filling a ImageControl with image data, 
it eats memory and only release this memory after restarting OO.


greetz

Fernand

On 26/05/2015 14:45, armin.le.gr...@me.com wrote:

Hi Rory,

On 26.05.2015 10:37, Rory O'Farrell wrote:

On Tue, 26 May 2015 10:19:07 +0200
"armin.le.gr...@me.com"  wrote:


Hi,

it should be http://bz.apache.org/ooo/show_bug.cgi?id=125519 which is
fixed and in master, would be a candidate for AOO412, too.

Sincerely,
alg


Thank you for the link to Bugzilla, Armin.  That bug might answer the 
crash problem which seems to be Windows related; as most of our Users 
are using Windows that is good.


However this does not address the overall problem of the increasing 
slow memory management as memory allocated and used by OO increases 
when large files are processed, be they of graphics or just text file 
handling.  It may be that the fundamental logic underlying the file 
structure and its processing will not permit of any improvement in 
this (I don't know - it is currently beyond my knowledge), but often 
a change in the algorithm used will allow an improvement in a program 
bottleneck.


Has anyone any thoughts on that aspect?


Yes, constantly. For 32bit AOO (Windows unfortunately) the 4GB mem 
quickly gets filled with modern bitmaps. The mentioned fix resolves 
that by limiting used mem for loaded pics - not much else to be done 
without bigger redesigns and on 32bit.

Rewrites of this aspect are surely welcome!

Sincerely,
alg




On 26.05.2015 00:28, Kay Schenk wrote:

On 05/25/2015 11:03 AM, Rory O'Farrell wrote:

There are constant reports of images going missing in OO Writer.  The
problem is not consistently reproducible, but is there nevertheless.
A recent report suggests it might be memory related:
https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=41271&p=353246#p353246 



   It is also informative to move back along that thread for other
instances of the problem.  I doubt that we can dismiss all
occurrences of this problem as "finger trouble" (i.e., improper user
usage).

Might it be time to consider increasing the maximum memory allocation
for graphics (currently 256 MB) and to review the memory management
of the suggested compilers?  Also, in case the problem arises from
background processing which has not completed on shut down of OO,
ought a "please wait" flag be displayed, a flag specifically keyed to
any such background process?

In these days of large memory 256MB is a very small allocation.
Having observed OO's use of memory with large text (not graphics)
files I note that its allocation and consumption of memory is
increasingly slower as the amount of memory used by it increases.  It
is most certainly not linear - I have no accurate method of deciding
if the increase in slowness is geometric or even exponential.


I found John Ha's analyses and comments back from Apr, 2014 very
informative. And, his final followup on Jun 7, 2014 certainly 
indicates

the problem stems from exceeding the graphic memory limits.

I couldn't find an actual issue that directly related to this so I 
will

enter one, and reference this thread.   Maybe that will help raise
attention to it.


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org







-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: running the database as an app

2015-03-04 Thread SOS

can been done using the API and basic
but using Dialogs instead off forms is a better solution, but more work 
the write the code


greetz

Fernand
On 3/03/2015 20:24, Brooks Schoolcraft wrote:
Can I set up an app (icon) on several desktops that bring up just the 
form(s) needed to interact with the database (which will reside on a 
network drive)?


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: Looking for C++ APIs or Source code

2015-02-05 Thread SOS

 Nayana ,

What you wanted to produce is very easy when using the API and basic  
who is simular tot VSB. the code can been packed as a extension   ( 
there is a lot of usefull code around om the web and forums)


hope it helps

Fernand

HI,

I am very new to AOO.
I want to develop a project to generate Excel report file.
I am planning to use NI-Labwindows platform to develop my project. if it 
doesn't support then i will prefer to do with Visual Studio (VC++).
Can you please send the required C++ API's for to do the same.

It will be really helpful if you could send me few sample example codes.

there is no C++ API that you can use standalone but you can use the C++
binding of the UNO API. The API that is used in the office but also in
macros or extensions or external apps remote controlling the office.

I think thr latter one can be an option for you. You have to run the
office in server mode (means headless without GUI) listening on a port
for incoming UNO calls. Your cleint app can connect via UNO and can
create a new document and and can fill it.

For a first impression take a look into the SDK [1]. But keep in mind
most of the samples are in Java. But a few samples show the initial
steps to bootstrap UNO in C++ and create a connection to an office.

The API is the same in C++ but the language binding is a bit different
to Java. Please see the Developers Guide [2] for a general introduction.

Juergen

[1] http://www.openoffice.org/api/SDK/index.html
[2] https://wiki.openoffice.org/wiki/Documentation/DevGuide


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org