[dev] please help me for search of app.font

2011-05-24 Thread FARIBA GHANBARI
Hi 
can you send me app.font for civil 3d software
I have a dwg.file that need app.font  to show layer name, it language is 
chenese or japanes or korian, and i can,t underestand it. if posible for you 
please send me app.font 

Thanks, fariba-- 
-
To unsubscribe send email to dev-unsubscr...@openoffice.org
For additional commands send email to sy...@openoffice.org
with Subject: help


Re: [dev] please help where file to fix this export filter bug

2010-07-15 Thread Daniel Rentz

Am 15.07.2010 06:23, schrieb Tantai Thanakanok:

I want to fix this bug http://qa.openoffice.org/issues/show_bug.cgi?id=93503 . 
(Calc export of Buddhist date to Excel is broken)

Steps to reproduce:

1. Start OpenOffice.org Calc
2. Tool -  Option -  Language Setting -  Languages and set Locale setting to 
Thai
3. Type a date (ex. 15/05/2008) in a cell
4. Click the cell and choose Format -  Cells -  Numbers, then changes the
following
3.1) Change Category to Date
3.2) Change Language to Thai
3.3) Change Fomat to 31 ธันวาคม 2542
5. Click OK
6. Save as Microsoft Excel 97/2000/XP (.xls)
7. Exit OpenOffice.org Calc
8. Open the xls file in Microsoft Excel
Excel will show error dialog box Some number formats may have been lost.
9. Observe the Date will be formatted as an integer number

This bug caused by format code in xls file created by OpenOffice.org contain [~buddhist] and 
excel can't resolve [~buddhist] to [-107041E].
I test by use hex editor open file with [~buddhist] format code and and change 
it to [-107041E]. after I fix it, xls file is display correctly.
After testing I want to fix code but I can't find where to fix it. can anyone 
help me to find it.


Hi,

the export of number formats to Excel format is implemented in

File: sc/source/filter/excel/xestyle.cxx
Class: XclExpNumFmtBuffer

special handling may be added to the function 
XclExpNumFmtBuffer::GetFormatCode() that already contains special 
handling for e.g. the General or for Boolean format codes.



Regards
Daniel

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



[dev] please help where file to fix this export filter bug

2010-07-14 Thread Tantai Thanakanok
I want to fix this bug http://qa.openoffice.org/issues/show_bug.cgi?id=93503 . 
(Calc export of Buddhist date to Excel is broken) 




Steps to reproduce: 

1. Start OpenOffice.org Calc 
2. Tool - Option - Language Setting - Languages and set Locale setting to 
Thai 
3. Type a date (ex. 15/05/2008) in a cell 
4. Click the cell and choose Format - Cells - Numbers, then changes the 
following 
3.1) Change Category to Date 
3.2) Change Language to Thai 
3.3) Change Fomat to 31 ธันวาคม 2542 
5. Click OK 
6. Save as Microsoft Excel 97/2000/XP (.xls) 
7. Exit OpenOffice.org Calc 
8. Open the xls file in Microsoft Excel 
Excel will show error dialog box Some number formats may have been lost. 
9. Observe the Date will be formatted as an integer number 

This bug caused by format code in xls file created by OpenOffice.org contain 
[~buddhist] and excel can't resolve [~buddhist] to [-107041E]. 
I test by use hex editor open file with [~buddhist] format code and and change 
it to [-107041E]. after I fix it, xls file is display correctly. 
After testing I want to fix code but I can't find where to fix it. can anyone 
help me to find it. 

-- 
_/|\_ Tantai Thanakanok. Open Source Development Co., Ltd. 
Tel: +66 38 311816, Fax: +66 38 773128, http://www.osdev.co.th/ 


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

2010-01-14 Thread Chris Fleischmann

Hello, I ended up solving my problem going about it the other way around
adding the text to an auto expanding Textshape, then capturing the size that
way.

Thanks anyway...

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

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

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

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

xDrawPage.add(xShape);

XPropertySet shapeProperties =
(XPropertySet)UnoRuntime.queryInterface(
XPropertySet.class, shape);

shapeProperties.setPropertyValue(TextContourFrame, new
Boolean(true));
shapeProperties.setPropertyValue(FillTransparence, 100);
shapeProperties.setPropertyValue(FillStyle , FillStyle.SOLID);
shapeProperties.setPropertyValue(FillColor, new Color(255, 0,
0).getRGB());

shapeProperties.setPropertyValue(TextAutoGrowHeight, new
Boolean(true));
shapeProperties.setPropertyValue(TextAutoGrowWidth, new
Boolean(true));

if (showBorder == true) {
shapeProperties.setPropertyValue(LineTransparence, 100);
shapeProperties.setPropertyValue(LineColor, new Color(255,
0, 0).getRGB());
shapeProperties.setPropertyValue(LineWidth, 0);
} else {
shapeProperties.setPropertyValue(LineColor, new Color(0,
0, 0).getRGB());
shapeProperties.setPropertyValue(LineWidth, 1);
}

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

// setSizeAndStyle(xText, fontToUse, centreText);
XTextCursor xTextCursor = xText.createTextCursor();
xTextCursor.gotoEnd(false);

setSizeAndStyle(xText, fontToUse, centreText);

xText.setString(message);

// Now fix the size and shape of the text object.
int nSaveWidth = xShape.getSize().Width;
int nSaveHeight = xShape.getSize().Height;

xShape.setSize(new Size(nSaveWidth + 50, nSaveHeight));





Chris Fleischmann wrote:
 
 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 = 

[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] please help

2010-01-11 Thread Christian Lohmaier
Hi *,

On Mon, Jan 11, 2010 at 6:57 AM,  tangjiqi...@redoffice.com wrote:
 When compailing openoffice on linux, what  Parameters should I add to make 
 Insert - movie and sound valid? My compile Parameters: bash ./configure 
 --with-ant-home=/opt/apache-ant-1.7.0 --with-jdk-home=/usr/jave/jdk1.5.0_10.

You need to install the Java Media Framework on the computer where OOo
is installed to make it work. (i.e. install the jmf and add the
corresponding jars to OOo's CLASSPATH settings in Tools|Options → Java
Note that by default JMF only supports a limited amount of mediatypes,
so you would need to install additonal plugins/wrappers for JMF.

ciao
Christian

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



[dev] please help

2010-01-10 Thread
When compailing openoffice on linux, what  Parameters should I add to make 
Insert - movie and sound valid? My compile Parameters: bash ./configure 
--with-ant-home=/opt/apache-ant-1.7.0 --with-jdk-home=/usr/jave/jdk1.5.0_10.


Re: [dev] Please help: saving document as DOC format, then opening, losing position properties for TextGraphicObject

2010-01-03 Thread tora - Takamichi Akiyama

Hi,

Chris Fleischmann wrote:

Hi basically I am using the OpenOffice SDK (3.1.1) to create a new Writer
document. I add images with the following code, passing in the XText (which
in this case is an XText from a XTextFrame).



XTextCursor xTextCursor = xFrameText.createTextCursor();

...

xFrameText.insertTextContent(xTextCursor, xNewTextContent, false);


What I tried is:
XTextDocument xTextDocument = (XTextDocument) 
UnoRuntime.queryInterface(XTextDocument.class, oDoc);
XText xText = xTextDocument.getText();
XTextCursor xTextCursor = xText.createTextCursor();
...
xText.insertTextContent(xTextCursor, xTextContent, false);

Details:
 
http://tora-japan.com/wiki/Insert_an_image_file_into_OpenOffice.org_Writer_document_and_save_it_as_a_Microsoft_Office_97-2003_file

Tora

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



Re: [dev] Please help: saving document as DOC format, then opening, losing position properties for TextGraphicObject

2010-01-02 Thread tora - Takamichi Akiyama

I am not sure, but, hopefully, this could be a hint.

After manually inserting a graphic image into an empty Writer document,
the following code fragment of OpenOffice.org Basic reports that

HoriOrientRelation = 7
VertOrientPosition = 7

Sub Main
oObject = ThisComponent.getDrawPage().getByIndex(0)
print AnchorType =   oObject.AnchorType
print Height =   oObject.Height
print Width =oObject.Width
print HoriOrient =   oObject.HoriOrient
print HoriOrientPosition =   oObject.HoriOrientPosition
print HoriOrientRelation =   oObject.HoriOrientRelation
print VertOrient =   oObject.VertOrient
print VertOrientPosition =   oObject.VertOrientPosition
print VertOrientRelation =   oObject.VertOrientRelation
End Sub

They seem to be described at
http://api.openoffice.org/docs/common/ref/com/sun/star/text/RelOrientation.html


An export filter for Microsoft Word 97-2003 (not for 2007, though) has some 
relevant code.
http://svn.services.openoffice.org/ooo/tags/OpenOffice_3_1_1/sw/source/filter/ww8/wrtw8esh.cxx

bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient _iorHoriOri, ...
{
...
// convert horizontal position, if needed
{
enum HoriConv { NO_CONV, CONV2PG, CONV2COL, CONV2CHAR };
HoriConv eHoriConv( NO_CONV );
...
case text::RelOrientation::PAGE_FRAME:
case text::RelOrientation::PAGE_PRINT_AREA:
{
if ( bConvDueToOrientation || bFollowTextFlow )
eHoriConv = CONV2PG;
}
...
case text::RelOrientation::FRAME:
{
if ( bConvDueToOrientation )
eHoriConv = CONV2COL;
}
...

Tora


Chris Fleischmann wrote:

OpenOffice 3.1.1. Java SDK, MAC OS X 10.6.2, MS Word 2007/2008.

Firstly I am happily able to position my TextGraphicObject's where I need
them, ie., I use the following code to position the TextGrahicObject in
OpenOffice with a particular width and height:



xProps.setPropertyValue(HoriOrient, new 
Short(HoriOrientation.NONE));
xProps.setPropertyValue(HoriOrientPosition, new Integer(pos_x));



However when I open up the document in MS Word, the image, has been
left-aligned (lots its X position) and lots its Y position?

Is there a way to make sure the position is maintained in both OOo and MS
Word?

Thanks in advance,

Chris


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



Re: [dev] Please help: saving document as DOC format, then opening, losing position properties for TextGraphicObject

2010-01-02 Thread Chris Fleischmann

Thanks for responding, I have since tried playing around with the orientation
settings, but alas, its still not keeping the x/y position from the
paragraph anchor when I open it up in Word ... See the picture properties
here for one of my images in openoffice 3.1.1:

http://old.nabble.com/file/p26992864/Screen%2Bshot%2B2010-01-02%2Bat%2B11.46.15%2BPM.png
 

Unfortunately, it still moves to the TOP of the paragraph anchor, and also
moves to the leftmost position possible.

So given the paragraph anchor, the image moves to the top left position of
the anchor.

Thanks in advance for any other tips.


tora - Takamichi Akiyama wrote:
 
 I am not sure, but, hopefully, this could be a hint.
 
 After manually inserting a graphic image into an empty Writer document,
 the following code fragment of OpenOffice.org Basic reports that
 
   HoriOrientRelation = 7
   VertOrientPosition = 7
 
 Sub Main
   oObject = ThisComponent.getDrawPage().getByIndex(0)
   print AnchorType =   oObject.AnchorType
   print Height =   oObject.Height
   print Width =oObject.Width
   print HoriOrient =   oObject.HoriOrient
   print HoriOrientPosition =   oObject.HoriOrientPosition
   print HoriOrientRelation =   oObject.HoriOrientRelation
   print VertOrient =   oObject.VertOrient
   print VertOrientPosition =   oObject.VertOrientPosition
   print VertOrientRelation =   oObject.VertOrientRelation
 End Sub
 
 They seem to be described at
 http://api.openoffice.org/docs/common/ref/com/sun/star/text/RelOrientation.html
 
 
 An export filter for Microsoft Word 97-2003 (not for 2007, though) has
 some relevant code.
 http://svn.services.openoffice.org/ooo/tags/OpenOffice_3_1_1/sw/source/filter/ww8/wrtw8esh.cxx
 
 bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient _iorHoriOri, ...
 {
 ...
  // convert horizontal position, if needed
  {
  enum HoriConv { NO_CONV, CONV2PG, CONV2COL, CONV2CHAR };
  HoriConv eHoriConv( NO_CONV );
 ...
  case text::RelOrientation::PAGE_FRAME:
  case text::RelOrientation::PAGE_PRINT_AREA:
  {
  if ( bConvDueToOrientation || bFollowTextFlow )
  eHoriConv = CONV2PG;
  }
 ...
  case text::RelOrientation::FRAME:
  {
  if ( bConvDueToOrientation )
  eHoriConv = CONV2COL;
  }
 ...
 
 Tora
 
 
 Chris Fleischmann wrote:
 OpenOffice 3.1.1. Java SDK, MAC OS X 10.6.2, MS Word 2007/2008.
 
 Firstly I am happily able to position my TextGraphicObject's where I need
 them, ie., I use the following code to position the TextGrahicObject in
 OpenOffice with a particular width and height:
 
 xProps.setPropertyValue(HoriOrient, new
 Short(HoriOrientation.NONE));
 xProps.setPropertyValue(HoriOrientPosition, new
 Integer(pos_x));
 
 However when I open up the document in MS Word, the image, has been
 left-aligned (lots its X position) and lots its Y position?
 
 Is there a way to make sure the position is maintained in both OOo and MS
 Word?
 
 Thanks in advance,
 
 Chris
 
 -
 To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
 For additional commands, e-mail: dev-h...@openoffice.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Please-help%3A-saving-document-as-DOC-format%2C-then-opening%2C-losing-position-properties-for-TextGraphicObject-tp26989671p26992864.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: saving document as DOC format, then opening, losing position properties for TextGraphicObject

2010-01-02 Thread tora - Takamichi Akiyama

Are you using vertical writing? If so, there is a bug which
misinterprets the position of graphic object during importing
from and exporting into Microsoft Word 97-2003.

 http://qa.openoffice.org/issues/show_bug.cgi?id=86769
 
http://www.openoffice.org/nonav/issues/showattachment.cgi/61766/i86769_wordarts_01_doc_snapshots.png

How are you trying to achieve your needs?  Like this?
 1. Prepare OpenOffice.org 3.1.1 on MacOS X 10.6.2.
 2. Start your Java program to create an empty Writer document or
to open an existing Writer document and then
to import a graphic image file.
 3. How do you save the Writer document as a Word file?
by hand or by the Java program?
 4. What file type or FilterName do you use for saving the document?
Microsoft Word 97/2000/XP   writer_MS_Word_97
Microsoft Word 2003 XML writer_MS_Word_2003_XML
Microsoft Word 2007 XML writer_MS_Word_2007
 5. Anything else that you have noticed...

There might be several possibilities, I guess:
 (a) Something in your Java program.
 (b) Bugs in OpenOffice.org 3.1.1.
 (c) Bugs in Microsoft Office running on Macintosh.

What will happen with your environment?
 1. Manually create an empty Writer document.
 2. Manually import a graphic image.
 3. Move it and alter its attributes.
 4. Save it as Word 97/2000/XP and/or Word 2003 XML.
 5. Open it with your Word 2007/2008.

Tora

Chris Fleischmann wrote:

Thanks for responding, I have since tried playing around with the orientation
settings, but alas, its still not keeping the x/y position from the
paragraph anchor when I open it up in Word ... See the picture properties
here for one of my images in openoffice 3.1.1:

http://old.nabble.com/file/p26992864/Screen%2Bshot%2B2010-01-02%2Bat%2B11.46.15%2BPM.png 


Unfortunately, it still moves to the TOP of the paragraph anchor, and also
moves to the leftmost position possible.

So given the paragraph anchor, the image moves to the top left position of
the anchor.

Thanks in advance for any other tips.


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



Re: [dev] Please help: saving document as DOC format, then opening, losing position properties for TextGraphicObject

2010-01-02 Thread tora - Takamichi Akiyama

Hi,
What I have just noticed with writer_MS_Word_2003_XML is ...

Steps
 1. Manually create an empty Writer document.
 2. Manually import a graphic image.
 3. Move it and alter its attributes.
 4. Save it as Word 2003 XML.
 5. Open it with my favorite text editor.

The inside of the XML file
w:pict
 w:binData w:name=wordml://graphics1...(encoded image 
data).../w:binData
 v:shape id=_x0_0_0_0 
style=position:absolute;z-index:0;left:0pt;top:0pt;width:0pt;
  v:imagedata src=wordml://graphics1 o:title=graphics1/
 /v:shape
/w:pict

It says ... left:0pt;top:0pt; ...

Tora


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



Re: [dev] Please help: saving document as DOC format, then opening, losing position properties for TextGraphicObject

2010-01-02 Thread vito smolej
What about putting the graphics into a container - a text box for
instance -, which is able to listen to your prayers (g)?

Regards

Vito

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



Re: [dev] Please help: saving document as DOC format, then opening, losing position properties for TextGraphicObject

2010-01-02 Thread Chris Fleischmann

Hello...

I have since tried the following code, which aims to do just that... It add
the picture to a frame, The frame is either anchored to a paragraph or
frame...Thats is, I have a parent frame which is anchored to a particular
page, with PAGE anchoring... Inside that frame is the NEW frame that now
holds the image.

This all works in OpenOffice... The document works perfectly. In MS Word...
I don't see the images or new frames at all.

See code here:

protected XTextFrame getTextFrame(XText xText,
int width,
int height,
int x,
int y,
TextContentAnchorType anchorType,
short horiOrient,
short vertOrient) throws Exception {
Object textFrame =
xWriterFactory_dest.createInstance(com.sun.star.text.TextFrame);

XTextFrame xTextFrame = (XTextFrame)
UnoRuntime.queryInterface(XTextFrame.class, textFrame);

XPropertySet xShapeProps = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, xTextFrame);

BorderLine aBorderLine = new BorderLine();
aBorderLine.OuterLineWidth = 1;
aBorderLine.Color = new Integer(0x00);

xShapeProps.setPropertyValue(TopBorder, aBorderLine);
xShapeProps.setPropertyValue(BottomBorder, aBorderLine);
xShapeProps.setPropertyValue(LeftBorder, aBorderLine);
xShapeProps.setPropertyValue(RightBorder, aBorderLine);

xShapeProps.setPropertyValue(AnchorType, anchorType);

// Setting the vertical and horizontal position
xShapeProps.setPropertyValue(FrameIsAutomaticHeight, new
Boolean(false));
xShapeProps.setPropertyValue(SizeType, new Short((short)1));

xShapeProps.setPropertyValue(HoriOrient, new Short(horiOrient));
xShapeProps.setPropertyValue(VertOrient, new Short(vertOrient));

xShapeProps.setPropertyValue(FrameWidthAbsolute, new
Integer(width));
xShapeProps.setPropertyValue(FrameHeightAbsolute, new
Integer(height));

xShapeProps.setPropertyValue(LeftBorderDistance, new Integer(0));
xShapeProps.setPropertyValue(RightBorderDistance, new Integer(0));
xShapeProps.setPropertyValue(TopBorderDistance, new Integer(0));
xShapeProps.setPropertyValue(BottomBorderDistance, new
Integer(0));

// Setting the vertical and horizontal position
if (horiOrient == HoriOrientation.NONE) {
xShapeProps.setPropertyValue(HoriOrientPosition, new
Integer(x));
}

if (vertOrient == VertOrientation.NONE) {
xShapeProps.setPropertyValue(VertOrientPosition, new
Integer(y));
}

xShapeProps.setPropertyValue(TextWrap, WrapTextMode.NONE);

xText.insertTextContent(xText.getEnd(), xTextFrame, false);

return xTextFrame;
}


And the addImage method has since been changed too:


/**
 * Use this method to add a JPG to the textframe.
 *
 * @param strImgFileName The image to add.
 * @param width The width of the image.
 * @param height The height of the image.
 * @param centreImage Centre the image.
 * @param x The position on the frame from the left margin (of the
frame).
 * @param y The position on the frame from the top margin (of the
frame).
 *
 * @throws Exception
 */
private void addJPGImage(XTextFrame xTextFrame,
String strImgFileName,
int width,
int height,
boolean centreImage,
int x,
int y)
throws Exception {
// allocate an xText object in case it's required.
XText xText = xTextDocument_dest.getText();

// Test whether we need to assign a different text frame.
if (xTextFrame != null) {
xFrameText = (XText) UnoRuntime.queryInterface(XText.class,
xTextFrame);
}

XTextFrame tmp_xTextFrame = null;

if (centreImage == true) {
int anchor = -1;

if (xTextFrame != null) {
anchor = TextContentAnchorType.AT_FRAME_value;
} else {
anchor = TextContentAnchorType.AT_PARAGRAPH_value;
}

tmp_xTextFrame = getTextFrame(xFrameText.getText(),
width,
height,
x,
y,
TextContentAnchorType.fromInt(anchor),
HoriOrientation.CENTER,
VertOrientation.TOP);
} else {
int pos_x = -1;
int pos_y = -1;

short horiOrient = HoriOrientation.NONE;
short vertOrient = VertOrientation.NONE;

int anchor = -1;

if (xTextFrame != null) {
anchor = TextContentAnchorType.AT_FRAME_value;
} else {
anchor = TextContentAnchorType.AT_PARAGRAPH_value;
}

// The X orientation, is moved 10mm to the right... move it
back.
if (x == (-1)) {
horiOrient = HoriOrientation.NONE;
pos_x = 0;
 

[dev] Please help: saving document as DOC format, then opening, losing position properties for TextGraphicObject

2010-01-01 Thread Chris Fleischmann

Hello All,

OpenOffice 3.1.1. Java SDK, MAC OS X 10.6.2, MS Word 2007/2008.

Firstly I am happily able to position my TextGraphicObject's where I need
them, ie., I use the following code to position the TextGrahicObject in
OpenOffice with a particular width and height:

Object newImage =
xWriterFactory_dest.createInstance(com.sun.star.text.TextGraphicObject);

XTextContent xNewTextContent = (XTextContent)
UnoRuntime.queryInterface(XTextContent.class, newImage);

XTextCursor xTextCursor = xFrameText.createTextCursor();

xTextCursor.gotoEnd(false);

XPropertySet xProps =
(XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, newImage);

// helper-stuff to let OOo create an internal name of the graphic
// that can be used later (internal name consists of various
checksums)
MessageDigest md = MessageDigest.getInstance(MD5);
md.update(strImgFileName.getBytes(), 0, strImgFileName.length());

String internalName = new BigInteger(1, md.digest()).toString(16);

XNameContainer xBitmapContainer = (XNameContainer)
UnoRuntime.queryInterface(
XNameContainer.class, xWriterFactory_dest.createInstance(
com.sun.star.drawing.BitmapTable));

xBitmapContainer.insertByName(internalName, strImgFileName);

String internalURL =
(String)(xBitmapContainer.getByName(internalName));

xProps.setPropertyValue(AnchorType,
TextContentAnchorType.AT_PARAGRAPH);

xProps.setPropertyValue(Width, width);
xProps.setPropertyValue(Height, height);

if (centreImage == true) {
int pos_x = (frame_size.Width / 2) - (width / 2);

// update frame width with the new dimensions.
xProps.setPropertyValue(HoriOrient, new
Short(HoriOrientation.NONE));
xProps.setPropertyValue(HoriOrientPosition, new
Integer(pos_x));
} else {
int pos_x = 1000;
int pos_y = 1000;

xProps.setPropertyValue(HoriOrient, new
Short(HoriOrientation.NONE));
xProps.setPropertyValue(HoriOrientPosition, new
Integer(pos_x));

xProps.setPropertyValue(VertOrient, new
Short(HoriOrientation.NONE));
xProps.setPropertyValue(VertOrientPosition, new
Integer(pos_y));
}

xtext.insertTextContent(xTextCursor, xNewTextContent, false);

// remove unnecessary object reference
xBitmapContainer.removeByName(internalName);

However when I open up the document in MS Word, the image, has been
left-aligned (lots its X position) and lots its Y position?

Is there a way to make sure the position is maintained in both OOo and MS
Word?

Thanks in advance,

Chris


-- 
View this message in context: 
http://old.nabble.com/Please-help%3A-saving-document-as-DOC-format%2C-then-opening%2C-losing-position-properties-for-TextGraphicObject-tp26989671p26989671.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



[dev] Please, Help me get started

2009-05-18 Thread Thocrun


[dev] Please help a newbie: configure on Windows XP SP2

2008-12-05 Thread Eng. Jose R. Robles
Hi dev's:

This is my configure command:

./configure\
  --disable-directx\
  --with-cl-home=/cygdrive/F/Programs/MSVC_Express/VC\
  --disable-activex\
  --disable-atl\
  --with-frame-home=/cygdrive/f/Programs/MS_SDK/Windows/v6.1 \
  --with-psdk-home=/cygdrive/f/Programs/MS_SDK/Windows/v6.1  \
  --with-midl-path=/cygdrive/f/Programs/MS_SDK/Windows/v6.1/Bin  \
  --with-asm-home=/cygdrive/f/Programs/MSVC_Express/VC   \
  --with-jdk-home=/cygdrive/e/JDK_15 \
  --with-csc-path=/cygdrive/c/Windows/Microsoft.NET/Framework/v3.5 \
  --with-ant-home=/cygdrive/e/Programs/Ant_17\
  --with-use-shell=bash

I am getting the following output from configure:

---
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for gawk... gawk
checking for gawk... /usr/bin/gawk
checking for sed... /usr/bin/sed
checking for solenv environment... default
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking target system type... i686-pc-cygwin
cygwin
checking Cygwin version... 1.5.25(0.156/4/2)
checking whether to enable crashdump feature... no
checking whether to use the standard non-optimizing compiler... no
checking whether to turn warnings to errors... no
checking whether to do a debug build... no
checking whether to build with additional debug utilities... no, full
product bu
ild
checking whether to include symbols into final build... no
checking whether to strip the solver or not checking whether to enable
nativ
e CUPS support... no
checking whether to enable fontconfig support... no
checking whether to enable filters for legacy binary file formats
(StarOffice 5.
2)... no
checking whether to use DirectX... yes
checking whether to use ActiveX... yes
checking whether to use ATL... yes
checking whether to use RPATH in shared libraries... yes
checking whether to include MySpell dictionaries... yes
checking which shell to use... 4nt
configure: WARNING: Windows/OS/2 4NT builds don't test for the shell
checking gcc home... /usr
checking whether to enable pch feature... no
checking for GNU make... make
checking the GNU make version... make 3.81
checking for perl... /usr/bin/perl
checking the Perl version... checked (perl 5)
checking for required Perl modules... all modules found
checking for friendly registry keys... done
checking the Microsoft C/C++ Compiler... found
(/cygdrive/f/Programs/MSVC_E~1/VC
/bin/cl.exe)
checking the Version of Microsoft C/C++ Compiler... found Compiler version
00150
0003072.
found .NET 2008 / VS 9.0.
checking for midl.exe... no
Can't find MS Visual Studio / VC++ at ./oowintool line 175.
configure: error: midl.exe not found. Make sure it's in the path or
use --with-midl-path

-

But midl.exe is there:

$ ls -al /cygdrive/f/Programs/MS_SDK/Windows/v6.1/Bin/midl.exe
-rwxrwx---+ 1 Administrators SYSTEM 88576 Jan 16  2008
/cygdrive/f/Programs/MS_S
DK/Windows/v6.1/Bin/midl.exe

My $PATH is:

/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/f/Programs/DirectX9/Ut
ilities/Bin/x86:/cygdrive/e/orant/bin:/cygdrive/c/WINDOWS/system32:/cygdrive
/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/e/JDK_15/bin:.:


Please notice it's ignoring all the options (checking whether to use
DirectX... yes)!

Am I missing anything?

Thank you for your replies.


Jose


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] Please help a newbie: configure on Windows XP SP2

2008-12-05 Thread Regina Henschel

Hi Jose,

and here is my configure, which I used to build cws odff05, which is 
based on m36.


./configure \
 --with-directx-home=/cygdrive/c/Programme/dxsdk \
 --with-cl-home=/cygdrive/c/Programme/Microsoft Visual Studio 9.0/VC \
 --disable-activex \
 --disable-build-mozilla \
 --disable-directx \
 --disable-epm \
 --with-win32 \
 --with-frame-home=/cygdrive/c/Programme/Microsoft SDKs/Windows/v6.1 \
 --with-psdk-home=/cygdrive/c/Programme/Microsoft SDKs/Windows/v6.1 \
 --with-midl-path=/cygdrive/c/Programme/Microsoft 
SDKs/Windows/v6.0A/Bin \
 --with-asm-home=/cygdrive/c/Programme/Microsoft Visual Studio 
9.0/VC/Bin \

 --with-jdk-home=/cygdrive/c/Programme/Java/jdk1.6.0_06 \
 --with-csc-path=/cygdrive/c/Windows/Microsoft.NET/Framework/v3.5 \
 --with-ant-home=/apache-ant-1.7.0 \
 --with-use-shell=bash

kind regards
Regina

Eng. Jose R. Robles schrieb:

Hi dev's:

This is my configure command:

./configure\
  --disable-directx\
  --with-cl-home=/cygdrive/F/Programs/MSVC_Express/VC\
  --disable-activex\
  --disable-atl\
  --with-frame-home=/cygdrive/f/Programs/MS_SDK/Windows/v6.1 \
  --with-psdk-home=/cygdrive/f/Programs/MS_SDK/Windows/v6.1  \
  --with-midl-path=/cygdrive/f/Programs/MS_SDK/Windows/v6.1/Bin  \
  --with-asm-home=/cygdrive/f/Programs/MSVC_Express/VC   \
  --with-jdk-home=/cygdrive/e/JDK_15 \
  --with-csc-path=/cygdrive/c/Windows/Microsoft.NET/Framework/v3.5 \
  --with-ant-home=/cygdrive/e/Programs/Ant_17\
  --with-use-shell=bash



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] Please help for creating com.sun.star.awt.Toolkit service

2008-06-28 Thread Rainman Lee
hi Carsten,
it's ok. but I still think that there might be something not
initialized though it's not VCL.
thank you very much, I will keep trying to find the murderer. ;)
best wishes, Rainman.

On Fri, Jun 20, 2008 at 8:59 PM, Carsten Driesner
[EMAIL PROTECTED] wrote:
 Rainman Lee wrote:

 thank you very much Carsten!
 I will try it.
 but, I guess i was missing something by far.
 I notice that there is a InitVCL call, in the file you mentioned. but it
 seems that it need something like a static or dynamic lib to get it work.
 where can I get such a lib, should I compile the vcl project on my
 computer
 or I can just download it somewhere.
 thank you, and hope your reply.

 Hi Rainman,

 Sorry for the wrong information. I missed a special part inside the toolkit
 project which takes over the VCL initialization in case the Application
 object is not in execute mode, which is true in your case. Currently I am
 without a clue why you can see a crash creating com.sun.star.awt.Toolkit.
 May be you can write an issue via Issue Tracker and attach some sample code
 to reproduce your problem.

 Regards,
 Carsten

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] Please help for creating com.sun.star.awt.Toolkit service

2008-06-20 Thread Rainman Lee
thank you very much Carsten!
I will try it.
but, I guess i was missing something by far.
I notice that there is a InitVCL call, in the file you mentioned. but it
seems that it need something like a static or dynamic lib to get it work.
where can I get such a lib, should I compile the vcl project on my computer
or I can just download it somewhere.
thank you, and hope your reply.

best wishes, Rainman.

On Thu, Jun 19, 2008 at 11:14 PM, Carsten Driesner [EMAIL PROTECTED]
wrote:

 Rainman Lee wrote:

 hello everyone,
 I'm trying to use uno controls independently without OO runing.
 but when I try to create the com.sun.star.awt.Toolkit service in my
 program,
 it crashes.
 I have tried to create other services (e.g. UnoButtonModel), and it seeems
 ok.
 I use OOo 2.4 on windows platform with Visual C++ for this testing, and
 here
 is how I do:

 first, I implement a uno component with XMain interface.
 in its run method, I just try to get the service manager through the
 component context that I have restored during the component instantiation.

 virtual ::sal_Int32 SAL_CALL run(const Sequence ::rtl::OUString 
 aArguments) SAL_THROW((RuntimeException))
 {
if (m_xContext.is())
MessageBox(NULL, TEXT(1 OK!), TEXT(Msg), MB_OK);

Referencelang::XMultiComponentFactory xMultiFactory =
 m_xContext.get()-getServiceManager();
if (xMultiFactory.is())
MessageBox(NULL, TEXT(2 OK!), TEXT(Msg), MB_OK);

ReferenceXInterface xInterface =

 xMultiFactory.get()-createInstanceWithContext(Lcom.sun.star.awt.Toolkit,
 m_xContext);
if (xInterface.is())
MessageBox(NULL, TEXT(3 OK!), TEXT(Msg), MB_OK);
return 0;
 }

 then I register all uno dll components in [OFFICE_PROGRAM_PATH] with my
 component into a new rdb file.(myservices.rdb)
 finally I run uno -s MY_SERVICENAME -ro myservices.rdb to startup my uno
 component.

 when the component is runing, it shows the first two message boxes as
 expected, and crashes without showing the last one.
 but if I replace com.sun.star.awt.Toolkit with
 com.sun.star.awt.UnoButtonModel or
 com.sun.star.awt.ContainerWindowProvider instead, it runs correctly with
 all message boxes displayed.
 so why cant I create the Toolkit service in my component? does this
 serivce
 depend on other services or things which I haven't prepared ready?
 hope for your reply, and thanks very much!

 Hi Rainman,

 You have to make sure that VCL is properly initialized before you can use
 UNO awt! UNO awt is a wrapper around VCL and cannot work correctly if VCL
 has not been initialized. To initialize VCL you have to call InitVCL(...).
 You can find how to call InitVCL in the desktop project, e.g. look within
 desktop/source/pkgchk/unopkg/unopkg_misc.cxx at the function getUNO(...).
 There is also a function called DeInitVCL().

 Regards,
 Carsten


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: [dev] Please help for creating com.sun.star.awt.Toolkit service

2008-06-20 Thread Eike Rathke
Hi Stephan,

On Thursday, 2008-06-19 14:30:09 +0200, Stephan Bergmann wrote:

 On Windows, the L... version should also work, by accident.  
 (sal_Unicode is a typedef for wchar_t there, and there is a non-explicit  
 rtl::OUString(sal_Unicode const *) ctor).

Ah, that explains why a compiler accepts it, after I sent the mail
I already wondered..

Highly unportable though.

  Eike

-- 
 OOo/SO Calc core developer. Number formatter stricken i18n transpositionizer.
 SunSign   0x87F8D412 : 2F58 5236 DB02 F335 8304  7D6C 65C9 F9B5 87F8 D412
 OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
 Please don't send personal mail to the [EMAIL PROTECTED] account, which I use 
for
 mailing lists only and don't read from outside Sun. Use [EMAIL PROTECTED] 
Thanks.


pgp3TxmfTvEo9.pgp
Description: PGP signature


Re: [dev] Please help for creating com.sun.star.awt.Toolkit service

2008-06-20 Thread Caolan McNamara
On Fri, 2008-06-20 at 12:28 +0200, Eike Rathke wrote:
 Hi Stephan,
 
 On Thursday, 2008-06-19 14:30:09 +0200, Stephan Bergmann wrote:
 
  On Windows, the L... version should also work, by accident.  

 Highly unportable though.

gcc has a -fshort-wchar feature (like mozilla uses) and SunPro has a U
string option. I've wondered if there would be any advantage to hacking
up some sort of const_rtl_uString magic which would implement a
rtl_uString compatible layout string struct that could be initialized
from a L/U string, eliding the rtl_uString constructor for such
const rtl_uStrings enabling them to be stored in the rodata section.
Maybe giving some measurable startup performance advantage.

C.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] Please help for creating com.sun.star.awt.Toolkit service

2008-06-20 Thread Carsten Driesner

Rainman Lee wrote:

thank you very much Carsten!
I will try it.
but, I guess i was missing something by far.
I notice that there is a InitVCL call, in the file you mentioned. but it
seems that it need something like a static or dynamic lib to get it work.
where can I get such a lib, should I compile the vcl project on my computer
or I can just download it somewhere.
thank you, and hope your reply.


Hi Rainman,

Sorry for the wrong information. I missed a special part inside the 
toolkit project which takes over the VCL initialization in case the 
Application object is not in execute mode, which is true in your case. 
Currently I am without a clue why you can see a crash creating 
com.sun.star.awt.Toolkit. May be you can write an issue via Issue 
Tracker and attach some sample code to reproduce your problem.


Regards,
Carsten

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dev] Please help for creating com.sun.star.awt.Toolkit service

2008-06-19 Thread Rainman Lee
hello everyone,
I'm trying to use uno controls independently without OO runing.
but when I try to create the com.sun.star.awt.Toolkit service in my program,
it crashes.
I have tried to create other services (e.g. UnoButtonModel), and it seeems
ok.
I use OOo 2.4 on windows platform with Visual C++ for this testing, and here
is how I do:

first, I implement a uno component with XMain interface.
in its run method, I just try to get the service manager through the
component context that I have restored during the component instantiation.

virtual ::sal_Int32 SAL_CALL run(const Sequence ::rtl::OUString 
aArguments) SAL_THROW((RuntimeException))
{
if (m_xContext.is())
MessageBox(NULL, TEXT(1 OK!), TEXT(Msg), MB_OK);

Referencelang::XMultiComponentFactory xMultiFactory =
m_xContext.get()-getServiceManager();
if (xMultiFactory.is())
MessageBox(NULL, TEXT(2 OK!), TEXT(Msg), MB_OK);

ReferenceXInterface xInterface =
xMultiFactory.get()-createInstanceWithContext(Lcom.sun.star.awt.Toolkit,
m_xContext);
if (xInterface.is())
MessageBox(NULL, TEXT(3 OK!), TEXT(Msg), MB_OK);
return 0;
}

then I register all uno dll components in [OFFICE_PROGRAM_PATH] with my
component into a new rdb file.(myservices.rdb)
finally I run uno -s MY_SERVICENAME -ro myservices.rdb to startup my uno
component.

when the component is runing, it shows the first two message boxes as
expected, and crashes without showing the last one.
but if I replace com.sun.star.awt.Toolkit with
com.sun.star.awt.UnoButtonModel or
com.sun.star.awt.ContainerWindowProvider instead, it runs correctly with
all message boxes displayed.
so why cant I create the Toolkit service in my component? does this serivce
depend on other services or things which I haven't prepared ready?
hope for your reply, and thanks very much!

best wishes!
Rainman.


Re: [dev] Please help for creating com.sun.star.awt.Toolkit service

2008-06-19 Thread Eike Rathke
Hi Rainman,

On Thursday, 2008-06-19 16:13:01 +0800, Rainman Lee wrote:

 [...]
 ReferenceXInterface xInterface =
 xMultiFactory.get()-createInstanceWithContext(Lcom.sun.star.awt.Toolkit,
 m_xContext);
 [...]
 when the component is runing, it shows the first two message boxes as
 expected, and crashes without showing the last one.

I'm almost certain that Lsome string is the culprit, because the
method expects a rtl::OUString there. Use
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.awt.Toolkit))
instead.

However, that would not explain why that

 but if I replace com.sun.star.awt.Toolkit with
 com.sun.star.awt.UnoButtonModel or
 com.sun.star.awt.ContainerWindowProvider instead, it runs correctly with
 all message boxes displayed.

works, but I guess it just does not crash by accident because of
different memory layout.

  Eike

-- 
 OOo/SO Calc core developer. Number formatter stricken i18n transpositionizer.
 SunSign   0x87F8D412 : 2F58 5236 DB02 F335 8304  7D6C 65C9 F9B5 87F8 D412
 OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
 Please don't send personal mail to the [EMAIL PROTECTED] account, which I use 
for
 mailing lists only and don't read from outside Sun. Use [EMAIL PROTECTED] 
Thanks.


pgpZNMgxrz7Tw.pgp
Description: PGP signature


Re: [dev] Please help for creating com.sun.star.awt.Toolkit service

2008-06-19 Thread Stephan Bergmann

Eike Rathke wrote:

Hi Rainman,

On Thursday, 2008-06-19 16:13:01 +0800, Rainman Lee wrote:


[...]
ReferenceXInterface xInterface =
xMultiFactory.get()-createInstanceWithContext(Lcom.sun.star.awt.Toolkit,
m_xContext);
[...]
when the component is runing, it shows the first two message boxes as
expected, and crashes without showing the last one.


I'm almost certain that Lsome string is the culprit, because the
method expects a rtl::OUString there. Use
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.awt.Toolkit))
instead.


On Windows, the L... version should also work, by accident. 
(sal_Unicode is a typedef for wchar_t there, and there is a non-explicit 
rtl::OUString(sal_Unicode const *) ctor).


-Stephan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] Please help for creating com.sun.star.awt.Toolkit service

2008-06-19 Thread Rainman Lee
I just googled my problem, and there was a same problem 3 years ago.(
http://osdir.com/ml/openoffice.devel.udk/2005-09/msg00076.html)
but unfortunately, no solution at that time.
Is there someone kind can fix it today?
thanks again.

best wishes, Rainman

On Thu, Jun 19, 2008 at 8:30 PM, Stephan Bergmann [EMAIL PROTECTED]
wrote:

 Eike Rathke wrote:

 Hi Rainman,

 On Thursday, 2008-06-19 16:13:01 +0800, Rainman Lee wrote:

  [...]
ReferenceXInterface xInterface =

 xMultiFactory.get()-createInstanceWithContext(Lcom.sun.star.awt.Toolkit,
 m_xContext);
 [...]
 when the component is runing, it shows the first two message boxes as
 expected, and crashes without showing the last one.


 I'm almost certain that Lsome string is the culprit, because the
 method expects a rtl::OUString there. Use
 rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.awt.Toolkit))
 instead.


 On Windows, the L... version should also work, by accident. (sal_Unicode
 is a typedef for wchar_t there, and there is a non-explicit
 rtl::OUString(sal_Unicode const *) ctor).

 -Stephan

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: [dev] Please Help Me

2006-06-15 Thread Mathias Bauer
Hi Steven,

Steven Sagers wrote:

 I am interested in help Open Office and Star office. I need help
 getting Started.  Can you Help Me?  I have lots of Ideas.

First you should subscribe to the list you are posting to. This avoids
that you miss answers that don't put you in CC:

Well, there are a lot of things that can be done for OOo. What you could
do depends on your skills: are you a developer (C++ preferred) or do you
want to provide templates, do you want to write documentation or do you
want to join the QA team?

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dev] Please Help Me

2006-06-13 Thread Steven Sagers
I am interested in help Open Office and Star office. I need help getting 
Started.  Can you Help Me?  I have lots of Ideas.  
   
  Thanks
   
  Sincerely Yours
   
  Sages
   

 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: [dev] Please help. I can't get registered at www.openoffic.org. Has been 2 weeks.

2006-03-01 Thread Charles-H.Schulz
Hello Bill,

Although I am not the administrator of the site nor its webmaster, I
took a look in the general members list and saw the two usernames you
have submitted. Please check your email filters. If there is really no
email message from SourceCast, let me know and I'll register you (again)
; you will be able to change your profile completely afterwards.

In regard of OOoForum, this site is a separate web site that is not run
by us nor by any parent organization; it is hence logical that you could
not enter your username and password.

Hope this helps,

Charles-H. Schulz,
Lead of the Native-Language
Confederation, OpenOffice.org
http://native-lang.openoffice.org

Bill Jones wrote:

 2-27-06

 I realize that you are not the correct person to contact about
 this but I have emailed [EMAIL PROTECTED] and
 [EMAIL PROTECTED] (I guessed at that one out of desperation),
 over the last 2 weeks and have gotten no replies.

 Username:  billjonesronald (also tried billjonesronald1)
 email:  [EMAIL PROTECTED]

 I have never received back a confirmation notice from the
 registering system
 containing my initial password!  I started this process on 2-13-06.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dev] Please help. I can't get registered at www.openoffic.org. Has been 2 weeks.

2006-02-28 Thread Bill Jones

2-27-06

I realize that you are not the correct person to contact about
this but I have emailed [EMAIL PROTECTED] and
[EMAIL PROTECTED] (I guessed at that one out of desperation),
over the last 2 weeks and have gotten no replies.

Username:  billjonesronald (also tried billjonesronald1)
email:  [EMAIL PROTECTED]

I have never received back a confirmation notice from the registering 
system

containing my initial password!  I started this process on 2-13-06.

Can you please pass this request on to someone that can setup my
account and have an initial password sent to me?  The system does
know that billjonesronald already exists, but I still do not have an
initial password from the system to get started.  IF NECESSARY,
CALL ME (PHONE BELOW) AND LEAVE IT ON MY MESSAGE BOX.

I have OpenOffice2.0 on my Mac OS X (10.3.9) with X11 1.0, and would 
like

to contribute to your effort.

(NOTE: an email to a forum person that was brave enough to list
 his email address at www.oooforum.org (andrew something)
 took pity on me when I was having problems getting 
registered
 there.  He was good enough to send my request to 
[EMAIL PROTECTED]
 and I did end up getting registered there within a day, 
but the username
 and emial and password (billjonesronald, 
[EMAIL PROTECTED], x)
 that work there at oooforum.org will not work at 
openoffice.org.)


Woe is me

Thanks
Bill Jones
Ronald, WA
509-649-3347

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] Please help. I can't get registered at www.openoffic.org. Has been 2 weeks.

2006-02-28 Thread Louis Suarez-Potts

Bill,
I'll deal with this.

Best,
Louis

smime.p7s
Description: S/MIME cryptographic signature