Re: How to set User Data information by UNO API?

2012-08-28 Thread Fernand Vanrie

On 28/08/2012 8:11, dongjun zong wrote:

Hi All,

  I want to use UNO API set User Data information, this is information
can be set by UI, tools->Options->OpenOffice->UserData.

Thanks.

have a look here 



hope it helps

Fernand


Re: [API] Problem with currency formatter in text field

2012-08-27 Thread Fernand Vanrie

 Carsten ,

you need a "refresch" off the field ?

hope it helps

Fernand
Hello, i have a problem with formatting of a text field. I create a 
text field in Java and insert this in a document.
The content is 0.0 and the format is the default currency. But the 
content is not formatted. The document show me 0.0 and not 0,00 €.

Why?

private void setTextField(Object[] value)
{
try
{
XTextDocument xTextDocument = (XTextDocument) 
UnoRuntime.queryInterface(XTextDocument.class, oBean.getDocument());
XController xController = 
xTextDocument.getCurrentController();
XTextViewCursorSupplier xTextViewCursorSupplier = 
(XTextViewCursorSupplier) 
UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xController);
XTextViewCursor xDocTextCursor = 
xTextViewCursorSupplier.getViewCursor();


XText xText = xDocTextCursor.getText();

xText.insertTextContent(xDocTextCursor, 
createTextField(xTextDocument, (String) value[2], (String) value[1]), 
false);

}
catch (Exception e)
{
logger.error(e);
}
}

private XDependentTextField createTextField(XTextDocument 
xTextDocument, String fieldName, String fieldValue)

{
XMultiServiceFactory xMultiServiceFactory = 
(XMultiServiceFactory) 
UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
XTextFieldsSupplier xTextFieldsSupplier = 
(XTextFieldsSupplier) 
UnoRuntime.queryInterface(XTextFieldsSupplier.class, xTextDocument);
XNameAccess xNamedFieldMasters = 
xTextFieldsSupplier.getTextFieldMasters();

XDependentTextField userField = null;
XPropertySet masterPropSet = null;

try
{
// Create the field...
userField = (XDependentTextField) 
UnoRuntime.queryInterface(XDependentTextField.class, 
xMultiServiceFactory.createInstance("com.sun.star.text.TextField.User"));


if 
(!xNamedFieldMasters.hasByName("com.sun.star.text.FieldMaster.User." + 
fieldName))

{
// Create the field master...
masterPropSet = (XPropertySet) 
UnoRuntime.queryInterface(XPropertySet.class, 
xMultiServiceFactory.createInstance("com.sun.star.text.FieldMaster.User"));


// Set the field name and content...
masterPropSet.setPropertyValue("Name", fieldName);
masterPropSet.setPropertyValue("Content", fieldValue);

if (fieldValue.equals("0.0"))
{
// Query the number formats supplier of the document
com.sun.star.util.XNumberFormatsSupplier 
xNumberFormatsSupplier = (com.sun.star.util.XNumberFormatsSupplier) 
UnoRuntime.queryInterface(com.sun.star.util.XNumberFormatsSupplier.class, 
xTextDocument);


// Get the number formats from the supplier
com.sun.star.util.XNumberFormats xNumberFormats = 
xNumberFormatsSupplier.getNumberFormats();


// Query the XNumberFormatTypes interface
com.sun.star.util.XNumberFormatTypes 
xNumberFormatTypes = (com.sun.star.util.XNumberFormatTypes) 
UnoRuntime.queryInterface(com.sun.star.util.XNumberFormatTypes.class, 
xNumberFormats);


// Get the number format index key of the default 
currency

// format,
// note the empty locale for default locale
com.sun.star.lang.Locale aLocale = new 
com.sun.star.lang.Locale();
int nCurrencyKey = 
xNumberFormatTypes.getStandardFormat(com.sun.star.util.NumberFormat.CURRENCY, 
aLocale);


XPropertySet fieldProperties = (XPropertySet) 
UnoRuntime.queryInterface(XPropertySet.class, userField);
fieldProperties.setPropertyValue("NumberFormat", new 
Integer(nCurrencyKey));


}
}
else
{
masterPropSet = (XPropertySet) 
UnoRuntime.queryInterface(XPropertySet.class, 
xNamedFieldMasters.getByName("com.sun.star.text.FieldMaster.User." + 
fieldName));

}

// Attach the fieldmaster to the field...
userField.attachTextFieldMaster(masterPropSet);
}
catch (java.lang.Exception e)
{
 logger.error(e);
}
return userField;
}

Kind regrads
Carsten







Re: VBA

2012-07-04 Thread Fernand Vanrie

Stefan ,

i use this code to open and run a report, the filter handling  is included

Sub Main ( sReportName ,sFilter, sBlancoFilter as string)

on local error goto errh
context = createUnoService("com.sun.star.sdb.DatabaseContext")
oDataBase = context.getByName("mysql_native_PMG_reports")
oDBDoc = oDataBase.DatabaseDocument
aArguments() = oDBDoc.getArgs()
  For i=LBound(aArguments()) To UBound(aArguments() ) ' nodig om te 
beletten dat er gevraagd wordt de macro's uit te voeren

If ( aArguments(i).Name = "MacroExecutionMode" ) Then
  aArguments(i).Value = 
"com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE"

End If
  Next i
  oDBDoc.attachResource( oDBDoc.URL, aArguments() )

   oReports = oDBDoc.getReportDocuments()
   dim Arguments(2) as New com.sun.star.beans.PropertyValue
Arguments(0).Name = "OpenMode"
Arguments(0).Value = "open" 'openDesign
Arguments(1).Name = "ActiveConnection"
Arguments(1).Value = oDatabase.getConnection("sos","hooghte")
Arguments(2).Name = "Hidden"
Arguments(2).Value = true
   toclose = oReports.loadComponentFromURL(sReportName 
,"_blank",0,Arguments()) ' open en sluiten om bepaalde componenten in 
geheugen te laden

   wait 1000
   toclose.close(true)
   oReport = oreports.getbyname(sReportName)

   oreportComponent = oreport.component

   oreportComponent.Filter = sFilter   ' xray oreportCom
   oReport.open
   ' filter weer op "niets te vinden zetten" anders blijft hij de 
settings van vorige run onthouden

   oreportComponent.filter = sBlancoFilter
   ' xray oreportCom
   ' print "stop"
exit sub
ErrH:
beep
MsgBox "Error " & err & ": " & error$ , 16

 end sub

hope it helps

Fernand

I want open a Report and change the filter dynamicly

I found the Code to Open
subdlg = 
getController().loadComponent(com.sun.star.sdb.application.DatabaseObject.REPORT,"Ergebnisse",FALSE)


but i dont know how i change the filter in the report

mfg

Stefan





Re: MySQL native Connector not working on fresh 3.4 install

2012-06-07 Thread Fernand Vanrie

all,
A bit brutal and drastic solution, but it works, i copied the user 
aplication data from L0 3.6 (where the Native connector is working) over 
the user aplication data from OO 3.4.

Now the connector works fine ?

please can someone tell me what peace of application data we are missing 
in a fresh install ?


Thanks

Fernand

 Alex,

I understand your point, but can you tell way The connector works in 
OO 3.4 when it  was installed under 3.3 and not from fresh 3.4 install ?
Everyting must been still in place, only some configuration has to 
been done   i suppose ?


Thanks

Fernand

Le 07/06/12 11:58, Fernand Vanrie a écrit :

Hi Fernand,


I know you are right person to discuss this, your point is that the
extension needs a recompile against the latest versions. You 
probably do

it for some platforms, but not for Windows ?

I no longer build it for anything other than my personal use, and then
only on Mac with the current master code source tree for LibreOffice. I
haven't yet tried building AOO on Mac, so have no experience there. At
one time, many years ago, I used to build OOo on the Mac, but it got too
much to handle for my own personal use case and I had other dead horses
to flog ;-)



How can we help you to make it also happens  for windows  and for OO as
for LO?


Like I said, I don't even do it for LO anymore. The major Linux distribs
eventually get around to providing it with the versions that they ship
of LO, so there's no need for me to hog my very old and slow processor,
just to match master building. So for my Linux boxes, I just wait until
the next version is released/updated. If that means that I don't get to
test it with current development, well, that's just tough, if there are
problems, they will show themselves soon enough :-))


For something to happen on Windows, it would require someone with the
dedication and knowledge to build AOO on that OS, and to know how to
re-integrate the build of the connector back into the build tree
(make/config files), because my understanding is that it has been ripped
out, unless there is just some magical configure switch that lets you
turn it back on again.


My current thinking is to move away from Base altogether as a UI
front-end for mysql/mariadb/postgres etc, and work on manipulating ODF
documents directly with output from my dbs via another programming
language (probably php, python or perl, or some strange combination of
all of them).


Alex








Re: MySQL native Connector not working on fresh 3.4 install

2012-06-07 Thread Fernand Vanrie

Alex

Thanks, hope someone can answer this question :-)

Greetz

Fernand

Le 07/06/12 13:32, Fernand Vanrie a écrit :

Hi Fernand,


I understand your point, but can you tell way The connector works in OO
3.4 when it  was installed under 3.3 and not from fresh 3.4 install ?
Everyting must been still in place, only some configuration has to been
done   i suppose ?


My guess would be that a brand new, default installation of 3.4 does not
include some configuration item that is taken up when you install 3.4 on
top of an existing 3.3. What particular entry that might be,
unfortunately, I have no idea. It would appear to be linked to the
component registration mechanism, but I know little to nothing about how
that works in detail.


Alex








Re: how get openoffice program path?

2012-06-07 Thread Fernand Vanrie

 jianlizhao,

do some googling on GetpathSettings

hope it helps

fernand

Hi

My os is ms windows.
I write a extention.
In my  extention how can I get openoffice program path.
I want to  Dynamic loading some dll.
Who can tell me get the  path method?


Best regards.




Re: MySQL native Connector not working on fresh 3.4 install

2012-06-07 Thread Fernand Vanrie

 Alex,

I understand your point, but can you tell way The connector works in OO 
3.4 when it  was installed under 3.3 and not from fresh 3.4 install ?
Everyting must been still in place, only some configuration has to been 
done   i suppose ?


Thanks

Fernand

Le 07/06/12 11:58, Fernand Vanrie a écrit :

Hi Fernand,


I know you are right person to discuss this, your point is that the
extension needs a recompile against the latest versions. You probably do
it for some platforms, but not for Windows ?

I no longer build it for anything other than my personal use, and then
only on Mac with the current master code source tree for LibreOffice. I
haven't yet tried building AOO on Mac, so have no experience there. At
one time, many years ago, I used to build OOo on the Mac, but it got too
much to handle for my own personal use case and I had other dead horses
to flog ;-)



How can we help you to make it also happens  for windows  and for OO as
for LO?


Like I said, I don't even do it for LO anymore. The major Linux distribs
eventually get around to providing it with the versions that they ship
of LO, so there's no need for me to hog my very old and slow processor,
just to match master building. So for my Linux boxes, I just wait until
the next version is released/updated. If that means that I don't get to
test it with current development, well, that's just tough, if there are
problems, they will show themselves soon enough :-))


For something to happen on Windows, it would require someone with the
dedication and knowledge to build AOO on that OS, and to know how to
re-integrate the build of the connector back into the build tree
(make/config files), because my understanding is that it has been ripped
out, unless there is just some magical configure switch that lets you
turn it back on again.


My current thinking is to move away from Base altogether as a UI
front-end for mysql/mariadb/postgres etc, and work on manipulating ODF
documents directly with output from my dbs via another programming
language (probably php, python or perl, or some strange combination of
all of them).


Alex








Re: MySQL native Connector not working on fresh 3.4 install

2012-06-07 Thread Fernand Vanrie

Alex,

I know you are right person to discuss this, your point is that the 
extension needs a recompile against the latest versions. You probably do 
it for some platforms, but not for Windows ?


How can we help you to make it also happens  for windows  and for OO as 
for LO?


Greetz

Fernand

Le 07/06/12 10:26, Fernand Vanrie a écrit :

Hi Fernand,


But when installing a fresh 3.4 on Windows, the Native Connector
installs without complains, but when opening the connection, there is a
error saying there is no Driver found on the given URL.
Please can someone help us to repair this minor problem ?
Thanks for any hint

I fear that the answer will be "help thyself". See recent bug reports
that I filed on issues with the connector(s).


Alex





MySQL native Connector not working on fresh 3.4 install

2012-06-07 Thread Fernand Vanrie
As the Native MySQL Connector is no longer supported by OO, filling a 
issue has no sense is suppose ?
We uses OO as a frontend for or MySQL based data . For years the Native 
Connector is the best, fasted and stable solution , it worked fine until 
3.3 and also on 3.4 installed on top of on a existing 3.3.
But when installing a fresh 3.4 on Windows, the Native Connector 
installs without complains, but when opening the connection, there is a 
error saying there is no Driver found on the given URL.

Please can someone help us to repair this minor problem ?
Thanks for any hint

Fernand


Re: [Rendering] Trying to render text page to a bitmap

2012-05-31 Thread Fernand Vanrie

 Ariel ,

Very instructive, copied to my learning stuff, thansk

i pointed Eric to a other technic, opening the doc in "preview" mode in 
a frame based on a new created window in a filepicker dialog.


Principle parts of the code

Sub PreviewWindowLoadOOFile(sUrl as String)
  oPreviewWindow = InstallNewPreviewWindow(oFPickerDialog.Window, 0)
  oFrame = createUnoService("com.sun.star.frame.Frame")
  oFrame.initialize(oPreviewWindow)
  Dim aProps(0) As New com.sun.star.beans.PropertyValue
  aProps(0).Name  = "Preview"
  aProps(0).Value = true
  oPreviewDoc = oFrame.loadComponentFromURL(sUrl, "", 0, aProps())

end sub



function InstallNewPreviewWindow(oWin as Object, lWinAttrs as Long) as 
Object

' Create a window descriptor and set up its properties
  Dim aDescriptor As New com.sun.star.awt.WindowDescriptor
  aDescriptor.Type = com.sun.star.awt.WindowClass.SIMPLE
  aDescriptor.Parent = oWin
  aDescriptor.Bounds = oWin.Windows(lLastWindowAtStart).PosSize
  aDescriptor.WindowAttributes = com.sun.star.awt.WindowAttribute.SHOW 
or lWinAttrs

  oToolkit = createUnoService("com.sun.star.awt.Toolkit")
  InstallNewPreviewWindow = oToolkit.createWindow(aDescriptor)
end function

Greetz
Fernand

REM  *  BASIC  *

Option Explicit

Sub Main
 GlobalScope.BasicLibraries.loadLibrary("Tools")
 Dim oDoc as Object
 oDoc = ThisComponent


 If HasUnoInterfaces(oDoc, "com.sun.star.view.XRenderable") Then
 Dim sBaseURL as String
 sBaseURL = DirectoryNameOutOfPath(oDoc.getURL(), "/")

 Dim oSFA as Object
 oSFA = CreateUnoService("com.sun.star.ucb.SimpleFileAccess")
 Dim oGraphicProvider as Object
 oGraphicProvider = 
CreateUnoService("com.sun.star.graphic.GraphicProvider")

 Dim oController as Object
 Dim oUnitConverter as Object
 oController = oDoc.getCurrentController()
 oUnitConverter = oController.getFrame().getComponentWindow()

 Dim oSelection as Object
 ' it could be the whole document
 oSelection = oDoc

 ' or the selection
 'Dim oTextCursor as Object
 'oTextCursor = 
oDoc.getText().createTextCursorByRange(oDoc.getText().getStart())
 'oTextCursor.goToRange(oDoc.getText().getEnd(), True)
 'oController.select(oTextCursor)
 'oSelection = oController.getSelection()

 Dim oDevice as Object
 Dim aRenderOptions(5) as New com.sun.star.beans.PropertyValue
 aRenderOptions(0).Name  = "RenderDevice"
 aRenderOptions(0).Value = oDevice
 aRenderOptions(1).Name  = "ExportNotesPages"
 aRenderOptions(1).Value = False
 aRenderOptions(2).Name  = "IsFirstPage"
 aRenderOptions(2).Value = True
 aRenderOptions(3).Name  = "IsLastPage"
 aRenderOptions(3).Value = False
 aRenderOptions(4).Name  = "IsSkipEmptyPages"
 aRenderOptions(4).Value = True
 aRenderOptions(5).Name  = "PageRange"
 aRenderOptions(5).Value = ""


 Dim nPageCount as Integer
 nPageCount = oDoc.getRendererCount( oSelection, aRenderOptions )
 If nPageCount>  0 Then
 Dim oToolkit as Object
 oToolkit = CreateUnoService("com.sun.star.awt.Toolkit")

 Dim oRenderer as Object
 Dim oPageSize as Object
 Dim i%
 Dim sURL$

 While nPageCount>  0
 nPageCount = nPageCount - 1
 oRenderer = oDoc.getRenderer(nPageCount, oSelection, 
aRenderOptions)
 For i = 0 To UBound(oRenderer)
 If oRenderer(i).Name = "PageSize" Then
 oPageSize = oRenderer(i).Value
 Exit For
 End If
 Next

 Dim oDeviceSize as Object
 oDeviceSize = oUnitConverter.convertSizeToPixel(oPageSize, 
com.sun.star.util.MeasureUnit.MM_100TH)
 oDevice = oToolkit.createScreenCompatibleDevice( 
oDeviceSize.Width, oDeviceSize.Height)
 aRenderOptions(0).Value = oDevice
 oDoc.render( nPageCount, oSelection, aRenderOptions)

 Dim oBitmap as Object
 oBitmap = oDevice.createBitmap( 0, 0, 
oDevice.Info.Width,oDevice.Info.Height)

 sURL = sBaseURL + "/" + CStr(nPageCount) + ".png"
 If oSFA.exists(sURL) Then oSFA.kill(sURL)
 StoreBitmapToURL(oGraphicProvider, oBitmap, sURL)
 Wend
 End If
 End If
End Sub

Sub StoreBitmapToURL(oGraphicProvider, oBitmap, sURL)
 Dim oMediaProperties(0) as New com.sun.star.beans.PropertyValue
 oMediaProperties(0).Name  = "Bitmap"
 oMediaProperties(0).Value = oBitmap

 Dim oGraphic as Object
 oGraphic = oGraphicProvider.queryGraphic(oMediaProperties)

 If NOT IsNull(oGraphic) Then
 Dim oMediaPropertiesOut(2) as New com.sun.star.beans.PropertyValue
 oMediaPropertie

Re: [Rendering] Trying to render text page to a bitmap

2012-05-30 Thread Fernand Vanrie

On 30/05/2012 15:58, Erik Wigforss wrote:

I get all kinds of errors. Errors I shouldn't even get. I have tried in AOO
and LO. Got it working in LO but very unstable crashing for no reason at
all every time. In AOO it don't work at all even if it works in LO
unstably. It's so wierd and totally random.

Now this line in "Function getGraphFromUrl(sFileURL as String) As Object"
don't work:
---
Dim oProvider As Object
oProvider = createUnoService("com.sun.star.graphic.GraphicProvider")
Dim oPropsIN(0 to 0) As Object
oPropsIN(0) = new com.sun.star.beans.PropertyValue
oPropsIN(0).Name  = "URL"
oPropsIN(0).Value = sFileURL
getGraphFromUrl = oProvider.queryGraphic(oPropsIN())
'< Don't working

you need the function :-)

function getGraphFromUrl(sFileURL as String) as Object
   oProvider = createUnoService("com.sun.star.graphic.GraphicProvider")
   Dim oPropsIN(0)as new com.sun.star.beans.PropertyValue
   oPropsIN(0).Name  = "URL"
   oPropsIN(0).Value = sFileURL
   getGraphFromUrl = oProvider.queryGraphic(oPropsIN())
end function






---
I have changed some line like the props setup lines beacuse they didn't
work at all before.

2012/5/30 Fernand Vanrie


Erik,

wath part of the code is not working ?


No the code is not working for me and I seek help.
I want to have help with thumbnails and previews thats quick and stable,
And the preview that exists is just too slow and unstable.

Did you know that MS Wordpad is creating the thumbnails for OOo but Ms
Office have no thumbnails? And the opposite for preview.

---
<http://openoffice.2283327.n4.
nabble.com/api-dev-Open-a-file-with-standard-
application-from-dialog-*<http://nabble.com/api-dev-Open-a-**file-with-standard-**application-from-dialog-*>
*td3067760.html<
http://openoffice.2283327.n4.**nabble.com/api-dev-Open-a-**
file-with-standard-**application-from-dialog-**td3067760.html<http://openoffice.2283327.n4.nabble.com/api-dev-Open-a-file-with-standard-application-from-dialog-td3067760.html>
--

2012/5/30 Fernand Vanrie

  On 30/05/2012 11:20, Erik Wigforss wrote:

  Hi,

Thanks for the code but it doesn't work.

  for you i suppose  :-)

  Heres my code to anser every question one will ever have about ooo.

Sub TheAnswerForEveryting()

If isDepressed() Then
   doNothing()
ElseIf isHappy() Then
   doSomething()
ElseIf isHatred() Then
  crashForNoReason()
ElseIf isPolite() Then
   throwAnError()
Else
   waitForOneSecondAndTryAgain()
End If
End Sub

Erik

2012/5/3 Fernand Vanrie

  Erik ,


With BASIC it can been done
have a look at this thread<http://openoffice.2283327.n4.<
http://openoffice.**2283327.n4<http://openoffice.2283327.n4>.>
**
nabble.com/api-dev-Open-a-**file-with-standard-<http://nabble.com/api-dev-Open-a-file-with-standard->
application-from-dialog-*http://nabble.com/api-dev-Open-a-**file-with-standard-**application-from-dialog-*>
*td3067760.html<http://openoffice.2283327.n4.nabble.
com/api-dev-Open-a-file-with-standard-application-from-**
dialog-td3067760.html<http://**openoffice.2283327.n4.nabble.**
com/api-dev-Open-a-file-with-**standard-application-from-**
dialog-td3067760.html<http://openoffice.2283327.n4.nabble.com/api-dev-Open-a-file-with-standard-application-from-dialog-td3067760.html>
hope it helps

Fernand

Hi, I'm trying to render a page to a bitmap and I don't get it working.
Drawing primitives works but not render a document. Do anyone know how
to
do this? Here is my code: public static BufferedImage makeThumb(File
inFile) throws IOException, BootstrapException,
IllegalArgumentException,
Exception, java.io.IOException { XComponentLoader xCompLoader =
OfficeConnection.**getConnection().**getXComponentLoader();
PropertyValue[] loadProps = new PropertyValue[2]; loadProps[0] =
OfficeTools.makeProperty("**ReadOnly", Boolean.TRUE);
loadProps[1] =
OfficeTools.makeProperty("**Hidden", Boolean.TRUE); XComponent
xDoc =
xCompLoader.**loadComponentFromURL(**
OfficeTools.makeOpenOfficeUrl(***
***inFile.getAbsolutePath()),
"_blank", 0, loadProps); XRenderable xRender =
(XRenderable)UnoRuntime.**
queryInterface(XRenderable.**class, xDoc); if (xRender != null) {
System.out.println("Is Renderable"); XDevice xDevice =
OfficeConnection.**
getConnection().getXToolkit().**createScreenCompatibleDevice(*

*1024,
1024); PropertyValue[] renderProps = new PropertyValue[2];
renderProps[0] =
OfficeTools.makeProperty("**RenderDevive", xDevice);
renderProps[1] =
OfficeTools.makeProperty("**PageRange", "1"); xRender.render(0,
xDoc,
renderProps); XBitmap xBitmap = xDevice.createBitmap(0, 0, 1024, 1024);
if
(xBitmap != null) return ImageIO.read(new
ByteArrayInputStream(xBitmap.*
***getDIB()));
else System.out.println("No bitmap created!"); } else {
System.out.println("Not Renderable"); } return null; } Thanks in
advance,
Erik Wigforss








Re: [Rendering] Trying to render text page to a bitmap

2012-05-30 Thread Fernand Vanrie

Erik,

wath part of the code is not working ?

No the code is not working for me and I seek help.
I want to have help with thumbnails and previews thats quick and stable,
And the preview that exists is just too slow and unstable.

Did you know that MS Wordpad is creating the thumbnails for OOo but Ms
Office have no thumbnails? And the opposite for preview.

---
<http://openoffice.2283327.n4.**
nabble.com/api-dev-Open-a-**file-with-standard-**application-from-dialog-*
*td3067760.html<
http://openoffice.2283327.n4.nabble.com/api-dev-Open-a-file-with-standard-application-from-dialog-td3067760.html
--

2012/5/30 Fernand Vanrie


On 30/05/2012 11:20, Erik Wigforss wrote:


Hi,

Thanks for the code but it doesn't work.


for you i suppose  :-)


Heres my code to anser every question one will ever have about ooo.

Sub TheAnswerForEveryting()

If isDepressed() Then
   doNothing()
ElseIf isHappy() Then
   doSomething()
ElseIf isHatred() Then
  crashForNoReason()
ElseIf isPolite() Then
   throwAnError()
Else
   waitForOneSecondAndTryAgain()
End If
End Sub

Erik

2012/5/3 Fernand Vanrie

  Erik ,

With BASIC it can been done
have a look at this 
thread<http://openoffice.**2283327.n4.<http://openoffice.2283327.n4.>
**
nabble.com/api-dev-Open-a-file-with-standard-
application-from-dialog-*<http://nabble.com/api-dev-Open-a-**file-with-standard-**application-from-dialog-*>
*td3067760.html<http://**openoffice.2283327.n4.nabble.**
com/api-dev-Open-a-file-with-**standard-application-from-**
dialog-td3067760.html<http://openoffice.2283327.n4.nabble.com/api-dev-Open-a-file-with-standard-application-from-dialog-td3067760.html>
hope it helps

Fernand

Hi, I'm trying to render a page to a bitmap and I don't get it working.
Drawing primitives works but not render a document. Do anyone know how to
do this? Here is my code: public static BufferedImage makeThumb(File
inFile) throws IOException, BootstrapException, IllegalArgumentException,
Exception, java.io.IOException { XComponentLoader xCompLoader =
OfficeConnection.getConnection().getXComponentLoader();
PropertyValue[] loadProps = new PropertyValue[2]; loadProps[0] =
OfficeTools.makeProperty("ReadOnly", Boolean.TRUE); loadProps[1] =
OfficeTools.makeProperty("Hidden", Boolean.TRUE); XComponent xDoc =
xCompLoader.loadComponentFromURL(OfficeTools.makeOpenOfficeUrl(*
***inFile.getAbsolutePath()),
"_blank", 0, loadProps); XRenderable xRender = (XRenderable)UnoRuntime.**
queryInterface(XRenderable.class, xDoc); if (xRender != null) {
System.out.println("Is Renderable"); XDevice xDevice =
OfficeConnection.**
getConnection().getXToolkit().**createScreenCompatibleDevice(***
*1024,
1024); PropertyValue[] renderProps = new PropertyValue[2];
renderProps[0] =
OfficeTools.makeProperty("RenderDevive", xDevice); renderProps[1] =
OfficeTools.makeProperty("PageRange", "1"); xRender.render(0, xDoc,
renderProps); XBitmap xBitmap = xDevice.createBitmap(0, 0, 1024, 1024);
if
(xBitmap != null) return ImageIO.read(new ByteArrayInputStream(xBitmap.*
***getDIB()));
else System.out.println("No bitmap created!"); } else {
System.out.println("Not Renderable"); } return null; } Thanks in advance,
Erik Wigforss







Re: [Rendering] Trying to render text page to a bitmap

2012-05-30 Thread Fernand Vanrie

On 30/05/2012 11:20, Erik Wigforss wrote:

Hi,

Thanks for the code but it doesn't work.

for you i suppose  :-)


Heres my code to anser every question one will ever have about ooo.

Sub TheAnswerForEveryting()

If isDepressed() Then
   doNothing()
ElseIf isHappy() Then
   doSomething()
ElseIf isHatred() Then
  crashForNoReason()
ElseIf isPolite() Then
   throwAnError()
Else
   waitForOneSecondAndTryAgain()
End If
End Sub

Erik

2012/5/3 Fernand Vanrie


Erik ,
With BASIC it can been done
have a look at this thread<http://openoffice.2283327.n4.**
nabble.com/api-dev-Open-a-**file-with-standard-**application-from-dialog-*
*td3067760.html<http://openoffice.2283327.n4.nabble.com/api-dev-Open-a-file-with-standard-application-from-dialog-td3067760.html>
hope it helps

Fernand

Hi, I'm trying to render a page to a bitmap and I don't get it working.
Drawing primitives works but not render a document. Do anyone know how to
do this? Here is my code: public static BufferedImage makeThumb(File
inFile) throws IOException, BootstrapException, IllegalArgumentException,
Exception, java.io.IOException { XComponentLoader xCompLoader =
OfficeConnection.**getConnection().**getXComponentLoader();
PropertyValue[] loadProps = new PropertyValue[2]; loadProps[0] =
OfficeTools.makeProperty("**ReadOnly", Boolean.TRUE); loadProps[1] =
OfficeTools.makeProperty("**Hidden", Boolean.TRUE); XComponent xDoc =
xCompLoader.**loadComponentFromURL(**OfficeTools.makeOpenOfficeUrl(**inFile.getAbsolutePath()),
"_blank", 0, loadProps); XRenderable xRender = (XRenderable)UnoRuntime.**
queryInterface(XRenderable.**class, xDoc); if (xRender != null) {
System.out.println("Is Renderable"); XDevice xDevice = OfficeConnection.**
getConnection().getXToolkit().**createScreenCompatibleDevice(**1024,
1024); PropertyValue[] renderProps = new PropertyValue[2]; renderProps[0] =
OfficeTools.makeProperty("**RenderDevive", xDevice); renderProps[1] =
OfficeTools.makeProperty("**PageRange", "1"); xRender.render(0, xDoc,
renderProps); XBitmap xBitmap = xDevice.createBitmap(0, 0, 1024, 1024); if
(xBitmap != null) return ImageIO.read(new 
ByteArrayInputStream(xBitmap.**getDIB()));
else System.out.println("No bitmap created!"); } else {
System.out.println("Not Renderable"); } return null; } Thanks in advance,
Erik Wigforss






Re: [EXT] Printing without empty pages

2012-05-24 Thread Fernand Vanrie

Ariel ,

Thanks very instructive (as always) but can you tell me why this

"com.sun.star.document.Settings"

are not available as a property off the document ?

Greetz

Fernand

Hi Fabian,

On Fri, May 18, 2012 at 12:22:15PM +0200, fabian wrote:

Hi,

I am facing the problem that a MailMerge adds empty pages to
a document. I know to avoid those pages the user can select to don't
print empty pages in the printer settings.

I would like to automatically don't print those pages and tried to
start the printer dialog myself with:

  PropertyValue[] propertyValueArray = new PropertyValue[1];
  propertyValueArray[0] = new PropertyValue();
  propertyValueArray[0].Name = "PrintEmptyPages";
  propertyValueArray[0].Value = new Boolean(false);

 executeDispatch(xDispatchProvider, ".uno:Print", "", 0,
 propertyValueArray);

".uno:Print" only supports the following properties:

* "PrinterName"   String
* "FileName"  String
* "From"  Integer
* "To"Integer
* "Copies"Integer
* "RangeText" String
* "Selection" Boolean
* "Asynchron" Boolean
* "Collate"   Boolean
* "Silent"Boolean

Info taken from sfx2/sdi/sfx.sdi: SfxBoolItem Print SID_PRINTDOC

* SfxStringItem  PrinterName SID_PRINTER_NAME
* SfxStringItem  FileNameSID_FILE_NAME
* SfxInt16Item   FromSID_PRINT_FIRST_PAGE
* SfxInt16Item   To  SID_PRINT_LAST_PAGE
* SfxInt16Item   Copies  SID_PRINT_COPIES
* SfxStringItem  RangeText   SID_PRINT_PAGES
* SfxBoolItemSelection   SID_SELECTION
* SfxBoolItemAsynchron   SID_ASYNCHRON
* SfxBoolItemCollate SID_PRINT_COLLATE
* SfxBoolItemSilent  SID_SILENT


In AOO 3.4, setting any argument will send directly to the printer,
instead of display the print dialog. I don't know if this is a feature
or a bug.


Unfortunatly this has no influence on the settings in the print
dialog. I have also tried to save and load the document with the
property:

   property.Name = "IsSkipEmptyPages"; property.Value = new
   Boolean(true);

but I guess this works only in case one exports a pdf.


Has anybody a solution in which the user does't have to care about
empty pages himself?

"PrintEmptyPages" is a property of service
com::sun::star::text::PrintSettings
http://www.openoffice.org/api/docs/common/ref/com/sun/star/text/PrintSettings.html#PrintEmptyPages

This service is included by the service
com::sun::star::text::DocumentSettings
http://www.openoffice.org/api/docs/common/ref/com/sun/star/text/DocumentSettings.html

com::sun::star::text::DocumentSettings has to be instanciated at the
document's factory:


Sub Main
 Dim oDoc as Object
 oDoc = ThisComponent

 Dim oDispatchProvider as Object
 Dim oDispatchHelper as Object
 oDispatchProvider = oDoc.getCurrentController().getFrame()
 oDispatchHelper = CreateUnoService("com.sun.star.frame.DispatchHelper")

 '===
 ' Document Settings

 'com.sun.star.text.DocumentSettings
 'com.sun.star.text.PrintSettings
 'com.sun.star.text.PrintPreviewSettings

 Dim oDocumentSettings as Object
 oDocumentSettings = oDoc.createInstance("com.sun.star.document.Settings")
 oDocumentSettings.setPropertyValue("PrintEmptyPages", False)

 
oDispatchHelper.executeDispatch(oDispatchProvider,".uno:Print","_self",0,oArguments)
End Sub

In this cases, the API reference is your friend:
http://www.openoffice.org/api/docs/common/ref/index-files/index-1.html


Regards




Re: Need confirmation on PDF export

2012-05-24 Thread Fernand Vanrie

Zoltán,

Indeed on windows 7 it install with a setup dialog for the PDF export.

the cheksum for mi install is ok ,

have to find  a other XP machine  who's is working correct on 3.3 and 
redo the install to find out if it was may already wrong on mi 3.3 ?


any idea how i can repair this thing manualy, i supose, to change or 
deleteting some xcu (configuartion) files ?


Greetz

Fernand

2012.05.22. 16:14 keltezéssel, Fernand Vanrie írta:

Zoltán,

I am using US Englisch,

at home i have a frech install on windows 7 i check there also

how do i  check the install set integrity ?

http://www.openoffice.org/download/checksums/3.4.0_checksums.html#howto

Zoltan


Thanks

Fernand

Hi Fernand,
2012.05.22. 11:18 keltezéssel, Fernand Vanrie írta:
After installing 3.4 based on a 3.3 On Windows XP there is no 
difference between Export to PDF directly and the export with 
PDF-settings. For both menu items there is no PDF-settings menu.
When using the Export menu item, there is only 1 choise: PDF (same 
as for PDF export directly)
Do i file a  issue ? or do i have to look else where to correct 
this Menu items ?
In my AOO 3.4 under win7, this is works, as earlier, the File>Export 
to PDF opens settings dilaog.
I installed such way, first unistalled OOo 3.3 than installed, AOO 
3.4, and not deleted user profile.


Which language version you installed, and you checked the install 
set integrity?

Zoltan



Greetz

Fernand








Re: Size of page headder

2012-05-23 Thread Fernand Vanrie

 fabian ,

the missing millimeters comes from the "style"  and the "fond". I 
suppose the coordinates off the vieuwcursor are calculated from the 
"baseline" , Styles can have TOP, BOTTOM , LEFT and RIGHT margins...

Right,

the attribute dynamicHeight is true. In which case is a header not dynamic? I 
tried to create a template with a ott, but when I load this ott the header is 
still dynamic.  I like the idea using the viewCursor but I only know how to 
create it by a textViewsupplier and not from my text cursor.

thanks!

best,
Fabian

I was able to get the Point coordinates of the End of my header textRange with 
the XtextViewCursor… This brings me close now to the right position. But still 
some millimeters are missing in my calculation, I guess some distance between 
the end of the textRange and the end of the header.
Its definitely not the distance between header and body since I get this 
distance from the page styles.








Re: Size of page headder

2012-05-22 Thread Fernand Vanrie

fabian,

Your headers have a "dynamic" height ?

Maybe you can move the viewcursor init and calculate the height from its 
position on start en end of the header ?

Hi Fernand,

I programing in Java but I already did what you described below. The pagestyles contain 
the the property "HeaderHeight" but as I wrote this always returns 0 
independently of how many lines I wrote in the header.
There is also the attribute "HeaderText" which gives me a XText of the Header 
content but this won't help since it's only the text.

I haven't tried to iterate over the frames yet, this might work for me…

best,
Fabian


On May 21, 2012, at 4:08 PM, Fernand Vanrie wrote:


fabian ,

You can find it in the "page styles"

Find my code belmow to handle some "text" i placed in a textframe (named 
"MyFooterFrame" )in the footer, you can do the same with the Header. Do a xray on the 
pagestyles to have additional information about the Header.

Hop it helps

Fernand

Sub FooterText
' On Local Error GoTo GeenFooterFrame
If (Not GlobalScope.BasicLibraries.isLibraryLoaded("Tools")) Then
   GlobalScope.BasicLibraries.LoadLibrary("Tools")
End If
oDocument = thisComponent
oStyles = oDocument.getStyleFamilies.getByName("PageStyles")
oFrames = oDocument.getTextFrames
xray ostyles.getbyindex(0)
oFooterframe = Oframes.getByName("MyFooterFrame")

oFooterText = oFooterFrame.Text
oFootertext.setstring("")
oFooterCursor = oFooterText.createTextCursor()
oFooterText.insertString(oFooterCursor, FileNameoutofPath(oDocument.Url , "/") 
, true)
exit sub

GeenFooterFrame:
beep
msgbox( "Er is geen ""FooterFrame"" meer, copieer het frame uit een ander document 
en ga verder" ,48)
exit sub

End Sub


Hi,

I want to find out the height of a document's header. Reading out the attribute 
HeaderHeight of the page properties only returns 0 and getting the XText of the 
header also didn't get me nowhere so far.

My goal is to insert a graphic at a user specified position of the page and for 
different reasons I can't simply use page as anchor. Therefore I need to know 
the height and width of the page margins and the page header to position the 
image independently of those dimensions.

Has anybody a hint how to get the header's height.

best Fabian.









Re: Need confirmation on PDF export

2012-05-22 Thread Fernand Vanrie

Zoltán,

I am using US Englisch,

at home i have a frech install on windows 7 i check there also

how do i  check the install set integrity ?

Thanks

Fernand

Hi Fernand,
2012.05.22. 11:18 keltezéssel, Fernand Vanrie írta:
After installing 3.4 based on a 3.3 On Windows XP there is no 
difference between Export to PDF directly and the export with 
PDF-settings. For both menu items there is no PDF-settings menu.
When using the Export menu item, there is only 1 choise: PDF (same as 
for PDF export directly)
Do i file a  issue ? or do i have to look else where to correct this 
Menu items ?
In my AOO 3.4 under win7, this is works, as earlier, the File>Export 
to PDF opens settings dilaog.
I installed such way, first unistalled OOo 3.3 than installed, AOO 
3.4, and not deleted user profile.


Which language version you installed, and you checked the install set 
integrity?

Zoltan



Greetz

Fernand





Need confirmation on PDF export

2012-05-22 Thread Fernand Vanrie
After installing 3.4 based on a 3.3 On Windows XP there is no difference 
between Export to PDF directly and the export with PDF-settings. For 
both menu items there is no PDF-settings menu.
When using the Export menu item, there is only 1 choise: PDF (same as 
for PDF export directly)
Do i file a  issue ? or do i have to look else where to correct this 
Menu items ?


Greetz

Fernand


Re: Size of page headder

2012-05-21 Thread Fernand Vanrie

 fabian ,

You can find it in the "page styles"

Find my code belmow to handle some "text" i placed in a textframe (named 
"MyFooterFrame" )in the footer, you can do the same with the Header. Do 
a xray on the pagestyles to have additional information about the Header.


Hop it helps

Fernand

Sub FooterText
' On Local Error GoTo GeenFooterFrame
 If (Not GlobalScope.BasicLibraries.isLibraryLoaded("Tools")) Then
   GlobalScope.BasicLibraries.LoadLibrary("Tools")
 End If
oDocument = thisComponent
oStyles = oDocument.getStyleFamilies.getByName("PageStyles")
oFrames = oDocument.getTextFrames
xray ostyles.getbyindex(0)
oFooterframe = Oframes.getByName("MyFooterFrame")

oFooterText = oFooterFrame.Text
oFootertext.setstring("")
oFooterCursor = oFooterText.createTextCursor()
oFooterText.insertString(oFooterCursor, FileNameoutofPath(oDocument.Url 
, "/") , true)

exit sub

GeenFooterFrame:
beep
msgbox( "Er is geen ""FooterFrame"" meer, copieer het frame uit een 
ander document en ga verder" ,48)

exit sub

End Sub


Hi,

I want to find out the height of a document's header. Reading out the attribute 
HeaderHeight of the page properties only returns 0 and getting the XText of the 
header also didn't get me nowhere so far.

My goal is to insert a graphic at a user specified position of the page and for 
different reasons I can't simply use page as anchor. Therefore I need to know 
the height and width of the page margins and the page header to position the 
image independently of those dimensions.

Has anybody a hint how to get the header's height.

best Fabian.







Re: [EXT] Printing without empty pages

2012-05-21 Thread Fernand Vanrie

fabian ,

I think you can not have access to the this Print Dialog using the API. 
I suppose the best way is to make a "private" print Dialog and using the 
API to alter the configuration settings to Not print Empty Pages .


Greetz

Fernand

Hi Fernand,

Thanks for replying!
These comments are related to the XPrintable Interface, which will work fine 
for direct printing I guess. In my case I still want the user to select his 
printer and printer settings therefore I need the OO print dialog.

best,
Fabian




Re: [EXT] Printing without empty pages

2012-05-18 Thread Fernand Vanrie

fabian ,

matbe this comments on a resolved issue 
 can helps ?

Hi,

I am facing the problem that a MailMerge adds empty pages to a document. I know 
to avoid those pages the user can select to don't print empty pages in the 
printer settings.

I would like to automatically don't print those pages and tried to start the 
printer dialog myself with:

  PropertyValue[] propertyValueArray = new PropertyValue[1];
 propertyValueArray[0] = new PropertyValue();
 propertyValueArray[0].Name = "PrintEmptyPages";
 propertyValueArray[0].Value = new Boolean(false);

 executeDispatch(xDispatchProvider, ".uno:Print", "", 0, 
propertyValueArray);

Unfortunatly this has no influence on the settings in the print dialog. I have 
also tried to save and load the document with the property:

   property.Name = "IsSkipEmptyPages";
property.Value = new Boolean(true);

but I guess this works only in case one exports a pdf.


Has anybody a solution in which the user does't have to care about empty pages 
himself?

best,
Fabian






Re: How to use the SortableGridDataModel

2012-05-16 Thread Fernand Vanrie

Tsutomu ,
Thanks a lot

I was making the Datamodel  and ColumnModel  like

  Datamodel = 
CreateUnoService("com.sun.star.awt.grid.DefaultGridDataModel")
  ColumnModel = 
CreateUnoService("com.sun.star.awt.grid.DefaultGridColumnModel")


and then adding this ellements to  the gGridModel was/is not working the 
columns are not sortable .
Using your way: Making first the GridModel and retrieving then the 
DataModel  and columnModel from it, works like a charme


Fernand




Sub Main
   d = CreateUnoDialog(DialogLibraries.Standard.Dialog1)
   dm = d.getModel()
   gm = dm.createInstance("com.sun.star.awt.grid.UnoControlGridModel")
   gm.setPropertyValues(_
 array("Height", "PositionX", "PositionY", "Width"), _
 array(100, 0, 0, 100))
   dm.insertByName("grid", gm)
   gm.SelectionModel = com.sun.star.view.SelectionType.MULTI

   cm = gm.ColumnModel
   c = cm.createColumn()
   c.Title = "foo"
   cm.addColumn(c)
   dm = gm.GridDataModel
   dm.addRows(array("", "", ""), array(array("c"), array("b"), array("a")))

   d.execute()
   d.dispose()
End Sub




How to use the SortableGridDataModel

2012-05-16 Thread Fernand Vanrie

Does anyone know to use the SortableGridDataModel  with Basic  ?

any hints are welcome

Greetz
Fernand


Re: offset pages in open office writer

2012-05-07 Thread Fernand Vanrie

  George ,
  Can been many reasons, but most likely, the fonts you use are not 
present on all your machines. When missing a font , OO gives no warning 
but try to "fake" the missing font who can gives your current problems.

Hope its helps,

Fernand
.


Hy!
My name is Saramet George, and i am one of the editors of the "ALS OB"
magazine from "Nicolae Iorga" highschool from Negresti, Vaslui, Romania.
Me and our entire editors team are using your lovely software
"OpenOffice.org 3.3" for editing our highscool's magazine, but we are
faceing a huge problem. When we transfer edited pages from a computer to
another the pages become offset, for example, if we have an article that
occupies two pages on  another computer it will be three pages long,  images
are not in their place, and even our customized templates for the magazine
are deformed.
What can we do to solve this BIG problem?





Re: [Rendering] Trying to render text page to a bitmap

2012-05-03 Thread Fernand Vanrie

Erik ,
With BASIC it can been done
have a look at this thread 



hope it helps

Fernand

Hi, I'm trying to render a page to a bitmap and I don't get it working. 
Drawing primitives works but not render a document. Do anyone know how 
to do this? Here is my code: public static BufferedImage makeThumb(File 
inFile) throws IOException, BootstrapException, 
IllegalArgumentException, Exception, java.io.IOException { 
XComponentLoader xCompLoader = 
OfficeConnection.getConnection().getXComponentLoader(); PropertyValue[] 
loadProps = new PropertyValue[2]; loadProps[0] = 
OfficeTools.makeProperty("ReadOnly", Boolean.TRUE); loadProps[1] = 
OfficeTools.makeProperty("Hidden", Boolean.TRUE); XComponent xDoc = 
xCompLoader.loadComponentFromURL(OfficeTools.makeOpenOfficeUrl(inFile.getAbsolutePath()), 
"_blank", 0, loadProps); XRenderable xRender = 
(XRenderable)UnoRuntime.queryInterface(XRenderable.class, xDoc); if 
(xRender != null) { System.out.println("Is Renderable"); XDevice xDevice 
= 
OfficeConnection.getConnection().getXToolkit().createScreenCompatibleDevice(1024, 
1024); PropertyValue[] renderProps = new PropertyValue[2]; 
renderProps[0] = OfficeTools.makeProperty("RenderDevive", xDevice); 
renderProps[1] = OfficeTools.makeProperty("PageRange", "1"); 
xRender.render(0, xDoc, renderProps); XBitmap xBitmap = 
xDevice.createBitmap(0, 0, 1024, 1024); if (xBitmap != null) return 
ImageIO.read(new ByteArrayInputStream(xBitmap.getDIB())); else 
System.out.println("No bitmap created!"); } else { 
System.out.println("Not Renderable"); } return null; } Thanks in 
advance, Erik Wigforss




Re: Distribution of Windows versions

2012-03-28 Thread Fernand Vanrie

 Rob ,

Interesting, do you have also figures about the differences in OS :  
Windows versus Linux or Mac etc..


Greetz

Fernand

There was a question in an earlier thread on whether we should still
support Windows 2000.  It was an open question whether we had many users on
that platform.

Here are the numbers we have, based on downloads.  Note that we can only
figure out what platform a user was on when they downloaded OpenOffice.  It
is entirely possible for someone to download from a Windows 7 machine and
then install it onto a Windows 2000 machine.  We have no easy way to
measure that.  However, that should be small compared to the number of
users who download onto the same machine they will be installing onto.

Win7   57.32%
XP   31.37%
Vista   10.07%
NT0.76%
2003 Server   0.32%
2000 0.14%
98  0.02%
CE  0.00%





Re: [EXTENSIONS][RELEASE] (was RE: Calling all volunteers: It is time to test)

2012-03-06 Thread Fernand Vanrie

I installed 3.4 on windows

3.3 is gone, what can been repaired, but:  all the extensions and there 
macro's are gone as wel. Problematic is that the Menu-toolbars of the 
deleted extensions are still present and pops up when starting. There is 
no way to delete this extentsion-related-toolbars.

We only can reinstall the extensions !

Greetz

Fernand




It is one thing to encourage users to remove their older versions.

It is another thing to automatically remove them and, along with that, features 
that they are relying upon.

I don't think the ability of OO.o to replace versions in the same line (i.e., 
3.* -- and 3.* did not remove 2.* and 1.* as far as I know) is the proper 
precedent.  I think how LibreOffice endeavored not to do that with their first 
and subsequent releases is the proper precedent.  This is not about wearing the 
crown, it is about serving the user community.

  - Dennis

-Original Message-
From: Rob Weir [mailto:robw...@apache.org]
Sent: Monday, March 05, 2012 10:09
To: ooo-dev@incubator.apache.org
Subject: Re: [EXTENSIONS][RELEASE] (was RE: Calling all volunteers: It is time 
to test)

On Mon, Mar 5, 2012 at 12:29 PM, Dennis E. Hamilton
  wrote:

If there is no solution for extensions, Apache OpenOffice 3.4 early incubator 
releases should not overload prior versions of OO.o.  I recommend that AOO 3.4 
install in its own locations and not do anything that would prevent 
side-by-side functioning.  (My recommendation would be that it do that anyhow.  
But with known breaking of an important down-level feature, that becomes 
imperative.)


In general, it is important for OOo 3.3 and earlier installs on
desktops to go away. Old releases increasingly become security
hazards, especially if they are no longer being actively maintained.
We do a great service to the community in general if we overwrite them
with the AOO 3.4.  This is true even given the inconvenience the user
experiences from the need to reinstall extensions.

In any case, I think the overwrite is fine.  It is what OOo 3.3 and
OOo 3.2 did as well by default.  We can document in the install
intructions how this can be overridden.


I think there should be OOo-dev releases only until this is handled as well.  
It is now clear that integration has problems and there is no reason to provoke 
more of it.


If you are volunteering to re-write the extension manager client
database support, please speak up and let us know your plan.


I also suspect that it is not a good idea to rebrand the Extensions and 
Templates pages at SourceForge quite so strongly, since the only extensions 
that are there now are for OO.o (and perhaps LibreOffice).

  - Dennis

-Original Message-
From: Jürgen Schmidt [mailto:jogischm...@googlemail.com]
Sent: Monday, March 05, 2012 02:06
To: ooo-dev@incubator.apache.org
Subject: Re: Calling all volunteers: It is time to test

On 3/2/12 6:38 PM, Larry Gusaas wrote:

On 2012-02-29 8:18 AM Rob Weir wrote:

Once you have installed, launch OpenOffice and look at the Help/About
box. If the revision shown there matches the build you installed
(e..g, "r1293550") then the install was a success. Please send a short
note to theooo-...@incubator.apache.org telling us what platform and
scenario you installed (fresh install, upgrade, install next to
LibreOffice, etc.). This will help us understand what scenarios have
already been attempted and which have not.

Using MacBook with OS X version 10.6.8

Downloaded OOo_3.4.0_MacOS_x86_install_en-US.dmg
Successfully installed replacing installation of OOo 3.3

Installation deleted all of the extensions in my user profile. Quit OOo
and replaced extension folder in my profile from my backup copy.
Restarted OOo 3.4 and extensions deleted again. Will try installed
individual extensions later today.

Hi Larry,

unfortunately extensions get lost because of the dropped Berkeley DB
which was used to manage installed extensions. We haven't found a simple
solution to migrate it. This will be documented in the release notes.

Sorry

Juergen



All .odt files I opened worked. Was able to work with and save in
Writer. The one database I have works. Will do further testing later.





Re: Convert table from absolute width to relative

2012-02-16 Thread Fernand Vanrie

Matheus

Get the ViewCursor

oViewCursor = oDocument.getCurrentController().getViewCursor()

this object can tell you nearly everyting,  about the the page and the 
evnvolved pagestyle where you can find the width etc..


Hope it helps

Fernand

Hi,

I need to programmatically convert some documents which contains some
table with absolute width to relative sizes. The purpose of that change
is that when converted to HTML the width of that absolute table is also
fixed, and that leads to scrollbars appearing when document is viewed in
small screen devices.

I don't know a better way to do that, so I thought on creating an event
handler to do these changes during the onSave and onSaveAs event. The
event is being caught, but I'm in doubt on how to get the necessary info
to do these changes.

More specifically, I've create a procedure to loop into all tables, and
test if it is relative width or not. If its has absolute width, I want
to change sizes. There are a lot of details involved, but in the
simplest case, I just need to get the fraction of page width that the
table occupies.

So that's my situation: if have a XTextTable, how can I get the page
width that contains that table? I tried to call getAnchor() without
success, as its said the TextTable docs that "(...) the anchor of the
actual implementation for text tables does not have a position in the
text. Thus that anchor can not be used for some operation like
XTextContent::attach or XText::insertTextContent or other function that
require the object to have a position in the text. (...)"

Does any of you can help me in solving that? Or is there another way to
do these transformations?

Best regards,
Matheus





Re: Could not create java implementation loader

2011-11-26 Thread Fernand Vanrie

Op 25/11/2011 20:37, Raphael Bircher schreef:

Am 25.11.11 16:13, schrieb Bert Frees:

On 25/11/2011 14:57, Jürgen Schmidt wrote:

On 11/25/11 2:50 PM, Bert Frees wrote:

Hi folks,

I'm sure this issue has been brought up before...

 From what I've read on forums, A LOT of Java extensions can not be
installed by some users because of the "Could not create Java
implementation loader" error.

The extension odt2braille I developed has this problem too, in 
Windows.

The error seems to happen randomly, with all kinds of OOo/LO versions,
Windows versions and Java versions. I've tried to understand what this
error is about, but I'm completely groping in the dark. I can find 
a lot

of suggestions on the web, but nobody really seems to know what causes
this error.

Until now, I've advised my users to try OpenOfficePortable or
LibreOfficePortable if they get this error, because it has already 
been

succesful a few times in my own experience. But apparently there are
also cases where it doesn't help.


sorry, but I haven't noticed this problem very often. Only during 
development time of an extension. I have several extensions 
developed years ago and they still work.


It would be interesting to get more information

- which OOo version
- which windows version
- which Java version

and in which combinations the error occur.

Juergen



Hi Juergen,

These are some examples of users that have run into the error:

- Windows XP SP3, LO3.3, Java 1.6_24/1.6_22.
- Windows 7, OOo3.3, Java 1.6_26
- Windows 7 (64 bit), OOo3.3, Java 1.6_25
I can be wrong, but as I know, OOo needs a 32 bit version of Java. OOo 
is 32 bit on Windows and the 64 Bit Version can't realy cooperate with 
OOo. Did. other Java Stuff at OOo works? like the Assistents?


Greetings Raphael

The problem started with a  3.3 version,but when the extension was 
instaled with 3.2 you can use and even reinstall it with 3.3.
We tryed everything to avoid the problem but no sucess, we still install 
with 3.2 and uses the extension with 3.3.

BTW LO is not suffering from this problem :-)
Greetz
Fernand







Re: [API] Re: No addRow method in XGridDataModel interface in Oo 3.4 beta

2011-11-15 Thread Fernand Vanrie

Ariel ,

As y do not know about  C++ and Java i stick to Basic :-)
Thanks (as always) for the knowledge !

BTW , I am interested in the Gridcontrol , because the Datasource 
browser is not working with a connection made using the "DriverManger".


oManager = CreateUnoService("com.sun.star.sdbc.DriverManager")
oConn = oManager.getConnectionWithInfo(sURL, oParms())

When using the "Database Context"  to get a connenction  , the 
DataSourceBrowser is working,


I am sure you can explain me why the DatasourceBrowser is not working 
with a connection made from the DriverManager !


Greetz

Fernand


Hi Fernando, Gerardo, *,

On Tue, Nov 15, 2011 at 09:59:48AM +0100, Fernand Vanrie wrote:

Ariel, Gerardo

I am working with LibreOffice OOO340m1 (Build:302) and all new
featers (like Backgroundcolors etc..) using the API and Basic seems
to work:

dlg.Model.createInstance("com.sun.star.awt.grid.UnoControlGridModel")
gcolm2 = CreateUnoService("com.sun.star.awt.grid.DefaultGridColumnModel")
gcolm2.addColumn(oCol)
gdatam2 = CreateUnoService("com.sun.star.awt.grid.DefaultGridDataModel")
gdatam2.addRow(nRowCount,oData2())

because this is Basic, but com.sun.star.awt.grid.DefaultGridDataModel in
3.4 implements XMutableGridDataModel, addRow is a method from this interface,
not from XGridDataModel anymore:

AOOo:
http://svn.apache.org/viewvc/incubator/ooo/trunk/main/offapi/com/sun/star/awt/grid/DefaultGridDataModel.idl?view=markup
http://svn.apache.org/viewvc/incubator/ooo/trunk/main/offapi/com/sun/star/awt/grid/XMutableGridDataModel.idl?view=markup
(May be the beta SDK docs could be uploaded to
http://ooo-site.staging.apache.org/api/ )

LO:
http://api.libreoffice.org/docs/common/ref/com/sun/star/awt/grid/DefaultGridDataModel.html
http://api.libreoffice.org/docs/common/ref/com/sun/star/awt/grid/XMutableGridDataModel.html

You don't have problems in Basic of course, but in C++ and Java you have
to query the right interface, XMutableGridDataModel  instead of XGridDataModel.
Gerardo should upgrade the minimal version to 3.4 otherwise the
extension won't work.


Regards




Re: [API] Re: No addRow method in XGridDataModel interface in Oo 3.4 beta

2011-11-15 Thread Fernand Vanrie

Ariel, Gerardo

I am working with LibreOffice OOO340m1 (Build:302) and all new featers 
(like Backgroundcolors etc..) using the API and Basic seems to work:


dlg.Model.createInstance("com.sun.star.awt.grid.UnoControlGridModel")
gcolm2 = CreateUnoService("com.sun.star.awt.grid.DefaultGridColumnModel")
gcolm2.addColumn(oCol)
gdatam2 = CreateUnoService("com.sun.star.awt.grid.DefaultGridDataModel")
gdatam2.addRow(nRowCount,oData2())

Greetz

Fernand

Hello Ariel.
Thank you again for pointing me in to the right direction. I think this
same error is caused in LibreOffice by this change in the UNO-AWT API.
Thanks.

On Mon, Nov 14, 2011 at 6:40 PM, Ariel Constenla-Haile<
ariel.constenla.ha...@gmail.com>  wrote:


Hi Gerardo,

On Mon, Nov 14, 2011 at 06:02:46PM -0600, Gerardo Gómez wrote:

Hello.
I've developed an extension which uses the XGridDataModel (especifically

a

grid). This extension works ok on Ooo 3.3, but when i try to use it in

the

new version, the 3.4 beta, the dialog that has the grid doesn't work at
all. This message is shown when i try to display the dialog with the

grid:

/opt/ooo-dev3/program/../basis-link/ure-link/lib/libstdc++.so.6: version
`GLIBCXX_3.4.11' not found (required by /usr/lib/libproxy.so.1)
Failed to load module: /usr/lib/gio/modules/libgiolibproxy.so
Exception in thread "Thread-175" java.lang.NoSuchMethodError:


com.sun.star.awt.grid.XGridDataModel.addRow(Ljava/lang/String;[Ljava/lang/Object;)V

 at util.OoGridDataModel.addRow(OoGridDataModel.java:43)
 at util.OoGridDataModel.addRow(OoGridDataModel.java:39)
 at


org.openoffice.gdocs.ui.dialogs.ImportDialog.getDocumentsGrid(ImportDialog.java:811)

 at


org.openoffice.gdocs.ui.dialogs.ImportDialog.initComponents(ImportDialog.java:319)

 at


org.openoffice.gdocs.ui.dialogs.ImportDialog.(ImportDialog.java:257)

 at org.openoffice.gdocs.UNOGDocs$3.run(UNOGDocs.java:262)
 at java.lang.Thread.run(Thread.java:662)

I think that this problem has to do with the new version (maybe because

it

is a beta).

the API was changed in an incompatible way with
http://hg.services.openoffice.org/OOO340/rev/435dac48d5dd
since 3.4 you have to use css.awt.grid.XMutableGridDataModel, it should
be document on the SDK you downloaded with OOo 3.4 beta


Regards
--
Ariel Constenla-Haile
La Plata, Argentina





Re: Problems displaying Dialogs on Mac OSX

2011-11-09 Thread Fernand Vanrie

Gerardo ,
maybe the General options must been set to use OO-(UNO-AWT)dialogs and 
not "system" dialogs


Hope it  helps
Fernand

Hello everybody.
I've been working with the UNO-AWT dialogs, i've "translated" the look and
feel of an extension, from using Java Swing to UNO-AWT. I've tested the
extension an it seems that the dialogs doesn't work on Mac OSX, but it
works on Windows XP 32 bits, and Linux Slackware 13.37 x64. So i think it
is more a Mac OSX thing, so do you know the cause of the problem, or some
dependecy or whatever?.
I doesn't put any debug dialog because when i tested it, it doesn't display
anything. Here it is the extension if you want to test it yourself:
http://ooo2gd.googlecode.com/issues/attachment?aid=1020004001&name=UNOGDocs.oxt&token=6ce68ec8588a3944efa1002c0a7781ce

Regards.





Re: Starting a conversation on AOOo 4.0

2011-09-23 Thread Fernand Vanrie

On 23/09/2011 15:28, Rob Weir wrote:

On Fri, Sep 23, 2011 at 2:39 AM, floris v  wrote:

I'm not so sure that further differentiation between AOO and LO is such a
good idea. The Document Foundation with LO was started because some people
didn't trust Oracle. Now that the code base is being transferred to ASF, and
it looks like ASF is taking its responsibility for OOo seriously (from the
outsider's point of view), the need for a separate LO may disappear. There
is some concern that the community will split over the differences between
the two versions, and a big difference in the user interface won't make that
better. And if OOo users want to help LO users in the forums, that will be
easier the more the two programs resemble each other in look and feel.


 From what I can see (and I see more than is public at this point) the
investment in AOOo is soon going to be greater than what is in LO.
These developers will not be very interested in sitting around,
When these developers are paid, they can start to tackle the most 
annoying bugs, this will make (100% sure) aOOo better  !



  doing
nothing, moving no faster than what LO can do.  It is natural, as AOOo
grows, for it to evolve quickly, bring more innovation, and leave
other forks behind.  I don't think we can or should try to avoid this.

Of course, there are ways to reduce the pain of divergence.  For
example, LO can take improvements from AOOo and merge them into LO.
The Apache license encourages this.  LO could also end its fork, and
put their development effort on the AOOo project.  They would be
welcome here, as long-lost brothers.


A very different reason to keep things as they are that it always takes time
to get used to a new UI. I _hate_ the most recent changes in the UI of most
browsers, that make finding the options screen almost impossible, and that
only because the designers wanted to get rid of the menu bar. We still work
with the qwerty keyboard, that has been designed to slow typists down, so I
can't find a good reason to change a working UI.

Good point.  We don't want to make changes just because we can make
changes.  We want a purpose.  Many users spend hours each day in front
of their spreadsheets or word processor.  They develop "muscle memory"
for every command keystroke, and play their word processor like a
piano.  We don't want to upset that.

On the other hand, most of our potential users are using MS Office,
and they have radically changed their UI

-Rob



Thank you,
Peter aka floris v


Op 22-9-2011 19:28, Guy Waterval schreef:

Hi all,

2011/9/21 Rob Weir


I don't want to distract us too much for the 3.4.0 work.  There is a
lot of work to do, mainly around the detailed work of IP review.
However, I think we should have a parallel conversation, with project
contributors as well as with users, about what we could do after that,
in a major release.


Perhaps time is coming to try to change the interface. We've now two
projects LO and AOO which have the same look and it's perhaps not so good.
I
think a new look for AOO could give it a better identitiy and could be
more
attactive for the mass of the end users as the old one. But as I'm not a
coder, I don't know if this could be "easily" realisable.

Best regards
gw







Re: Starting a conversation on AOOo 4.0

2011-09-23 Thread Fernand Vanrie

On 23/09/2011 15:28, Rob Weir wrote:
 We don't want to upset that. On the other hand, most of our potential 
users are using MS Office, and they have radically changed their UI...


Yes, with many pro's  and con's but we still have the 1 milion question: 
Must aOO or/and LO be a copy of the MS Office and his  UI ?


Greetz

Fernand



 -Rob

Thank you,
Peter aka floris v


Op 22-9-2011 19:28, Guy Waterval schreef:

Hi all,

2011/9/21 Rob Weir


I don't want to distract us too much for the 3.4.0 work.  There is a
lot of work to do, mainly around the detailed work of IP review.
However, I think we should have a parallel conversation, with project
contributors as well as with users, about what we could do after that,
in a major release.


Perhaps time is coming to try to change the interface. We've now two
projects LO and AOO which have the same look and it's perhaps not so good.
I
think a new look for AOO could give it a better identitiy and could be
more
attactive for the mass of the end users as the old one. But as I'm not a
coder, I don't know if this could be "easily" realisable.

Best regards
gw







Re: Targeted Donations?

2011-09-13 Thread Fernand Vanrie

Ross ,

Is  there a policy for "paid" bug repair ?

Greetz

Fernand

On 12 September 2011 19:56, FR web forum  wrote:

Hello,


If AOOo did this, it would be completely new (and IMHO the Board would have
to agree to it).

My query is just to have a formally answer to give at our users on the french 
forum.

We have sometime this question: "I want to donate, how can I do this?"

What should I say to them?

It depends on what they means by a "donation". If it is a significant
donation then they should look at the sponsorship programme, see
http://apache.org/foundation/sponsorship.html

If it is a small donation from an individual user we do not currently
have a means for accepting such. Every now and then someone decides
they are going to put a process in place to accept small donations.
Each time it progresses a little further but at the time of writing it
is not (as far as I'm aware) complete. Of course, if someone from OOo
would like to help make this happen then we need to talk to
fundraising@ to see what can be done.

In the meantime perhaps the community could put together a list of
external charities relating to the OO.o project and list these on the
OO.o site?

Ross

Ross