Hello
We use OpenOffice to create the text of Classified Ads using a client
side Uno interface and OO-side OoBasic macros. We are saving Office2
documents using the SXW filter til all customers are migrated from
oo-1.1.3.
We mark pending graphics by creating a target instance of
"com.sun.star.drawing.RectangleShape" using an OoBasic macro, and
re-setting properties from the client via Uno; specifically the
'draw:name' property is set to "<PendingGraphicKey>, <GraphicId>". I
find that the SXW filter removes the 'draw:name="xxx"' property when
saving 00-2.4 documents. The pending graphic key is now missing.
== OoBasic
Sub createIRES (iWidth as Integer, iHeight as Integer)
on Error goto ErrorHandler
oVCursor =
nxGetThisComponent().getCurrentController().getViewCursor()
oCursor = nxGetThisComponent().getText().createTextCursor()
oCursor.gotoStart(FALSE)
oRectShape =
nxGetThisComponent().createInstance("com.sun.star.drawing.RectangleShape
")
' Set the name of the shape as 'IRES' to differentiate with other
RectangleShape objects
oRectShape.Name = "IRES"
etc
==
== Uno test for pending graphic
private boolean isIRES(XShape xShape) throws EditorDisposedException
{
boolean isIRES = false;
if ((xShape !=null) &&
xShape.getShapeType().equals("com.sun.star.drawing.RectangleShape") try
{
XPropertySet xProperties = getPropertySet(xShape);
String name =
(String)xProperties.getPropertyValue("Name");
if ((name != null) && !name.equals("IRES")) {
isIRES = true;
}
}
catch (DisposedException ex) { throw new
EditorDisposedException(editor); }
catch (Throwable tr) { caught(tr, true); }
return isIRES;
}
==
OO-2.4 documents saved via the SXW filter fail this test
Executing the macro under OO-2.4 and saving the document as ODT and as
SXW and viewing the content.xml show that the 'draw:name="xxx"' element
is saved in ODT and not in SXW.
Executing the macro under OO-1.1.3 and saving the document (SXW) always
saves the 'Draw:name="xxx"'.
Is this a known problem?
Is there a fix in a later version of oo-2.4 (including Portuguese.Brazil
version)?
Thanx
John Sisson