Re: [dev] OO SDK 3.1.1, NB 6.8, Linux Ubuntu

2010-01-13 Thread Juergen Schmidt

On 1/13/10 8:57 AM, Stephan Bergmann wrote:

On Jan 12, 2010, at 8:06 PM, Fabio A. Miranda wrote:

debug options: -Xdebug
-Xrunjdwp:transport=dt_socket,address=catullus:33757
/opt/openoffice.org3/program/soffice
Picked up JAVA_TOOL_OPTIONS: -Xdebug
-Xrunjdwp:transport=dt_socket,address=catullus:33757
ERROR: transport error 202: connect failed: Connection refused
FATAL ERROR in native method: JDWP No transports initialized,
jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: JDWP Transport dt_socket failed to initialize,
TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports
initialized [../../../src/share/back/debugInit.c:708]
JavaVM: JNI_CreateJavaVM called _exit, caught by abort_handler in
javavm.cxx
[Java framework] sunjavaplugin.soCan not create JavaVirtualMachine,
abort handler was called.


I came across this post:

http://www.eclipse.org/forums/index.php?t=msggoto=506702;

that mentions the problem is related to Debian systems:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560142#35

Please, any core UNOPKG developer can confirm this ? at least, is the
issue related to networking due to connection refused from the
debugee ?


Yes, the JDWP error message makes it plausible that the problem is not related 
to OOo.  IIRC, JDWP is from the internals of the Java debug mechanism.
i remember that i had a similar problem but can't remember how i solved 
it. Fabio, can you test to debug your extension without having a network 
connection. I know it sounds strange but i would be interested if it 
works. I can't remember it exactly but i think it was a problem with 
resolving the hostname. And as i mentioned before i can't remember how 
to solve it.


Juergen

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



Re: [dev] Howto for developements on Draw

2010-01-13 Thread K S
Stefan,

This is an answer on a part of your question:
http://blogs.sun.com/GullFOSS/entry/building_openoffice_org_on_windows

Wishes,
Kirill



2010/1/5 Stefan Michalowski s.michalow...@free.fr

 Hi, sorry for asking such basic question :

 I would like to develop ontop of  Draw, some graphic drawing extensions.
 I have used Netbeans already, under Windows, and built a simple application
 with java.

 How should I start with the source of Draw, how to install and update OO
 environment for this ?
 I tried to follow your installation instructions, but didi not understand
 the steps.

 As I am not experienced in Java installation and build (did it only
 automatically through Netbeans), I need some help.

 Regards

 --
 Stefan Michalowski   06 68 08 35 50   s.michalow...@free.fr



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




[dev] MacOS UNOPKG error: NSAutoreleaseNoPool(): Object 0x1c0f2f0 of class RemoteControlContainer autoreleased with no pool in place - just leaking

2010-01-13 Thread Fabio A. Miranda
Anyone familiar with above error:

macbook:UniOffice fabio
$ /Applications/OpenOffice.org.app/Contents/program/unopkg
gui /var/folders/-y/-yoCVMk2FhuuUG+xfZdcZU
+++TI/-Tmp-/UniOffice/UniOffice.oxt 
2010-01-13 10:30:00.423 unopkg[302:903] *** __NSAutoreleaseNoPool():
Object 0x1c0f2f0 of class RemoteControlContainer autoreleased with no
pool in place - just leaking
2010-01-13 10:30:00.426 unopkg[302:903] *** __NSAutoreleaseNoPool():
Object 0x1c0f2b0 of class MultiClickRemoteBehavior autoreleased with no
pool in place - just leaking
macbook:UniOffice fabio$ 
macbook:UniOffice fabio$ 


macbook:~ fabio$ uname -a
Darwin macbook.local 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov  3
10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386
macbook:~ fabio$ 

Looks like a bug to file ?

thanks,




-- 
Fabio A. Miranda
Enterprise Software
http://www.grupocesa.com/


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



[dev] Help needed ...

2010-01-13 Thread Juergen Schmidt

Hi,

first of all sorry for cross posting but we need your help.

Maybe you have heard that we will have a stand (and a DevRoom) at the 
FOSDEM conference at the beginning of February. We are working on an 
endless presentation that we can run (besides demos) at the stand to 
inform users as well as developers and all other interested people.


The FOSDEM is typically an event where we are looking for new 
developers. But any kind of help is welcome and so we are looking for 
quotes from people about their motivation to work on the OpenOffice.org 
project, their experiences, their contribution etc. Please send us your 
quotes (~1-2 short paragraphs, think about presentation slides).


I know about very interesting people who started as GSOC students and 
who are professionals today working full time on OOo, or people started 
with SDK examples first and moved over to become an accepted 
developer... Many many more examples, so please don't hesitate and send 
us one or more quotes from you.


The results will be published and can probably be used for other events 
as well.


To have enough time to work on the material i would suggest that you 
send us your input until January 20th. Either to me directly or on one 
of the mailing lists.


Thanks in advance

Juergen

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



[dev] Please Help: Getting the width / height sizes to create a RectangleShape to create a boundary box

2010-01-13 Thread Chris Fleischmann

Hello folks, just wondering if there is a more accurate way of converting
pixels to 1/00mm in OpenOffice... Other than the 72 DPI type of calculation
people use?

Currently I do the following: 

if (fontDescriptor[i].Name.equalsIgnoreCase(Arial)) {
fontDescriptor[i].Height = (short)12; // just an
arbitrary height number.

XFont xFont = xDevice.getFont(fontDescriptor[i]);

width = xFont.getStringWidth(message);

SimpleFontMetric simpleFontMetric =
xFont.getFontMetric();

height = simpleFontMetric.Ascent +
simpleFontMetric.Descent +
simpleFontMetric.Leading;

break;
}
}
Object shape = xWriterFactory_tmp.createInstance(
com.sun.star.drawing.RectangleShape);

XShape xShape = (XShape) UnoRuntime.queryInterface(
XShape.class, shape);

xShape.setPosition(new Point(pageBorderLeft, pageBorderTop));

int nwidth = (int)(((float)width / (float)72) * (float)2540) +
50; // This is what I use to convert, which works on the MAC.
int nheight = (int)(((float)height / (float)72) * (float)2540) +
50; // This is what I use to convert, which works on the MAC.

System.out.println(New Height:  + nheight);
System.out.println(New Width:  + nwidth);

xShape.setSize(new Size(nwidth, nheight));

Now the above code works hapilly on my Apple Laptop, but when I move the
same code over to OpenSolaris and the width calculation is way off the
font is either larger or smaller depending on the height size of the font.

Any advice or help, much appreciated.

Thanks,

Chris

-- 
View this message in context: 
http://old.nabble.com/Please-Help%3A-Getting-the-width---height-sizes-to-create-a-RectangleShape-to-create-a-boundary-box-tp27152636p27152636.html
Sent from the openoffice - dev mailing list archive at Nabble.com.


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



Re: [dev] Please Help: Getting the width / height sizes to create a RectangleShape to create a boundary box

2010-01-13 Thread Ariel Constenla-Haile
Hello Chris,

On Wednesday 13 January 2010, 18:49, Chris Fleischmann wrote:
 Hello folks, just wondering if there is a more accurate way of converting
 pixels to 1/00mm in OpenOffice... Other than the 72 DPI type of calculation
 people use?
 
 Currently I do the following:
 
 if (fontDescriptor[i].Name.equalsIgnoreCase(Arial)) {
 fontDescriptor[i].Height = (short)12; // just an
 arbitrary height number.
 
 XFont xFont = xDevice.getFont(fontDescriptor[i]);
 
 width = xFont.getStringWidth(message);
 
 SimpleFontMetric simpleFontMetric =
 xFont.getFontMetric();
 
 height = simpleFontMetric.Ascent +
 simpleFontMetric.Descent +
 simpleFontMetric.Leading;
 
 break;
 }
 }
 Object shape = xWriterFactory_tmp.createInstance(
 com.sun.star.drawing.RectangleShape);
 
 XShape xShape = (XShape) UnoRuntime.queryInterface(
 XShape.class, shape);
 
 xShape.setPosition(new Point(pageBorderLeft, pageBorderTop));
 
 int nwidth = (int)(((float)width / (float)72) * (float)2540) +
 50; // This is what I use to convert, which works on the MAC.
 int nheight = (int)(((float)height / (float)72) * (float)2540)
  + 50; // This is what I use to convert, which works on the MAC.
 
 System.out.println(New Height:  + nheight);
 System.out.println(New Width:  + nwidth);
 
 xShape.setSize(new Size(nwidth, nheight));
 
 Now the above code works hapilly on my Apple Laptop, but when I move the
 same code over to OpenSolaris and the width calculation is way off the
 font is either larger or smaller depending on the height size of the font.
 
 Any advice or help, much appreciated.

did you try css.awt.XUnitConversion ? 
http://api.openoffice.org/docs/common/ref/com/sun/star/awt/XUnitConversion.html

see the macros in the doc attached to 
http://www.openoffice.org/issues/show_bug.cgi?id=94067

Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

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



Re: [dev] Please Help: Getting the width / height sizes to create a RectangleShape to create a boundary box

2010-01-13 Thread Chris Fleischmann

Thanks for the hints... I have since tried the following:

// get internal service factory of the document
XMultiServiceFactory xWriterFactory_tmp = (XMultiServiceFactory)
UnoRuntime.queryInterface(
XMultiServiceFactory.class, xWriterComponent_sdraw_dest);

XModel model = (XModel) UnoRuntime.queryInterface(XModel.class,
xWriterComponent_sdraw_dest);
XController controller = model.getCurrentController();
XWindow xWindow = controller.getFrame().getContainerWindow();

XWindowPeer xWindowPeer = (XWindowPeer)
UnoRuntime.queryInterface(XWindowPeer.class, xWindow);

// XToolkit aToolkit = xWindowPeer.getToolkit();
XUnitConversion m_xConversion = (XUnitConversion)
UnoRuntime.queryInterface(XUnitConversion.class,
xWindowPeer);

XDevice xDevice =
(XDevice)UnoRuntime.queryInterface(XDevice.class, xWindow);

FontDescriptor fontDescriptors[] = xDevice.getFontDescriptors();
FontDescriptor fontDescriptor = null;

Vector names = new Vector();

width = 0;
height = 0;

for (int i = 0; i  fontDescriptors.length; i++) {
if (!names.contains(fontDescriptors[i].Name)) {
names.add((String)fontDescriptors[i].Name);
}

if
(fontDescriptors[i].Name.equalsIgnoreCase(fontToUse.name)) {
fontDescriptors[i].Height = (short)fontToUse.size;

fontDescriptor = fontDescriptors[i];

XFont xFont = xDevice.getFont(fontDescriptors[i]);

width = xFont.getStringWidth(message);

SimpleFontMetric simpleFontMetric =
xFont.getFontMetric();

height = simpleFontMetric.Ascent +
simpleFontMetric.Descent +
simpleFontMetric.Leading;

break;
}
}

Then I use these settings in an attempt to wrap the text I am about to add
with a boundary using a rectangle shape:

Object shape = xWriterFactory_tmp.createInstance(
com.sun.star.drawing.RectangleShape);

XShape xShape = (XShape) UnoRuntime.queryInterface(
XShape.class, shape);

xShape.setPosition(new Point(pageBorderLeft, pageBorderTop));

Size aSize = new Size(width + 3, height + 3);// add a few pixels
for padding...

Size aPointInMM_100TH =
m_xConversion.convertSizeToLogic(aSize,
MeasureUnit.MM_100TH);

//int nwidth = (int)(((float)width / (float)72) * (float)2540) +
50;
//int nheight = (int)(((float)height / (float)72) * (float)2540)
+ 50;

int nwidth = aPointInMM_100TH.Width;
int nheight = aPointInMM_100TH.Height;

System.out.println(New Height:  + nheight);
System.out.println(New Width:  + nwidth);

xShape.setSize(new Size(nwidth, nheight));

xDrawPage.add(xShape);

// Now set the text
XText xText = (XText) UnoRuntime.queryInterface(XText.class,
xShape);

XTextCursor xTextCursor = xText.createTextCursor();
xTextCursor.gotoEnd(false);

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

xPropertySet.setPropertyValue(CharFontCharSet,
fontDescriptor.CharSet);
xPropertySet.setPropertyValue(CharFontFamily,
fontDescriptor.Family);
xPropertySet.setPropertyValue(CharHeight,
fontDescriptor.Height);
xPropertySet.setPropertyValue(CharFontName,
fontDescriptor.Name);
xPropertySet.setPropertyValue(CharFontPitch,
fontDescriptor.Pitch);
xPropertySet.setPropertyValue(CharPosture,
fontDescriptor.Slant);
xPropertySet.setPropertyValue(CharStrikeout,
fontDescriptor.Strikeout);
xPropertySet.setPropertyValue(CharUnderline,
fontDescriptor.Underline);
xPropertySet.setPropertyValue(CharWeight,
fontDescriptor.Weight);

xText.setString(message);

However, the resultant image is still not correct, see the following image: 
http://old.nabble.com/file/p27155936/image1.jpg  if I go then to draw and
expand the image, I then get the text, see image 2, 
http://old.nabble.com/file/p27155936/image2.jpg 

However, If I use my DPI calculation of 72 DPI FYI:

int nwidth = (int)(((float)width / (float)72) * (float)2540) + 50;
int nheight = (int)(((float)height / (float)72) * (float)2540) + 50;

I get the right sized image, at least for hte MAC, on OpenSolaris its no
good.

Any tips, or anything I am doing wrong, please let me know... Thanks once
again!

Regards,

Chris


Ariel Constenla-Haile wrote:
 
 Hello Chris,
 
 On Wednesday 13 January 2010, 18:49, Chris Fleischmann wrote:
 

Re: [dev] MacOS UNOPKG error: NSAutoreleaseNoPool(): Object 0x1c0f2f0 of class RemoteControlContainer autoreleased with no pool in place - just leaking

2010-01-13 Thread Stephan Bergmann
On Jan 13, 2010, at 6:06 PM, Fabio A. Miranda wrote:
 Anyone familiar with above error:
 
 macbook:UniOffice fabio
 $ /Applications/OpenOffice.org.app/Contents/program/unopkg
 gui /var/folders/-y/-yoCVMk2FhuuUG+xfZdcZU
 +++TI/-Tmp-/UniOffice/UniOffice.oxt 
 2010-01-13 10:30:00.423 unopkg[302:903] *** __NSAutoreleaseNoPool():
 Object 0x1c0f2f0 of class RemoteControlContainer autoreleased with no
 pool in place - just leaking
 2010-01-13 10:30:00.426 unopkg[302:903] *** __NSAutoreleaseNoPool():
 Object 0x1c0f2b0 of class MultiClickRemoteBehavior autoreleased with no
 pool in place - just leaking

I do occasionally see such XXX autoreleased with no pool in place - just 
leaking  when terminating OOo itself on Mac OS X, too.  I would assume they 
are harmless, though.  (The above unopkg call did work correctly for you, apart 
from those messages, didn't it?)

-Stephan

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