Issue 7711 - All graphics disappear after exporting the current writer document to a new writer using XMLExporter and XMLImporter
Summary: All graphics disappear after exporting the current writer document to a new w...
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Linux, all
: P3 Trivial
Target Milestone: ---
Assignee: Unknown
QA Contact: issues@api
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2002-09-13 09:19 UTC by Unknown
Modified: 2013-02-24 21:08 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Unknown 2002-09-13 09:19:48 UTC
I am trying to write a java program to clone a document in the current
writer to a blank new writer. I am using XMLExporter and XMLImporter to
implement this. Here is the code :

    .....
    Object Importer = (XInterface) xMSF.createInstance
         ("com.sun.star.comp.Writer.XMLImporter");
    XImporter xIm = (XImporter) UnoRuntime.queryInterface
         (XImporter.class,Importer);
    xIm.setTargetDocument(xTextDoc2);

    XDocumentHandler docHandler = (XDocumentHandler)
                     
    UnoRuntime.queryInterface(XDocumentHandler.class,Importer);

    Any arg = new Any(new Type(XDocumentHandler.class),docHandler);

    Object Exporter = (XInterface) xMSF.createInstanceWithArguments(
        "com.sun.star.comp.Writer.XMLExporter", new Object[] {arg});
    XExporter xEx = (XExporter)
        UnoRuntime.queryInterface(XExporter.class,Exporter);
    xEx.setSourceDocument(xTextDoc);

    PropertyValue[] desc =  new PropertyValue[1] ;
        desc[0] = new PropertyValue();
        desc[0].Name = "FilterName" ;
        desc[0].Value = "swriter: StarOffice XML (Writer)" ;

    XFilter filter = (XFilter)
        UnoRuntime.queryInterface(XFilter.class,Exporter);

    filter.filter(desc) ;
    ......

The code works fine with the text and table ( all string and format are
preserved ). However, all the graphics are disappeared in the new
writer. 

I had tried to compare the sxw files outputed by the original
document and the document generated after running the code. I saved the
documents to sxw files and unzip them to compare their content.xml. I
found that the drawing coordinates in the generated document are
different !!

The orginal document's content.xml :
    <draw:rect text:anchor-type="paragraph" draw:z-index="0"
    draw:style-name="gr1" draw:text-style-name="P2" svg:width="7.649cm"
    svg:height="2.999cm" svg:x="1.138cm" svg:y="0.471cm">

The generated document's content.xml
    <draw:rect text:anchor-type="paragraph" draw:z-index="0"
    draw:style-name="gr1" draw:text-style-name="P2" svg:width="7.652cm"
    svg:height="3.003cm" svg:x="-10.867cm" svg:y="-34.422cm">
 
The svg:x and svg:y are changed !!! The svg:heigth and svg:width are
also changed a little bit.
Comment 1 ooo 2002-12-19 10:56:25 UTC
as far as I see, this is an implementation issue
Comment 2 michael.brauer 2003-01-22 13:41:35 UTC
Wilson, can you attach the document that caused problems as well as
the a sample java program. Thanks.
Comment 3 Rainer Bielefeld 2003-07-24 18:57:32 UTC
No reporter-activity for 7 months
No votes
No other one who confirmed the problem

I think we should close that issue as “invalid”,  if someone still
sees the problem, the issue can be reopened

If I will not see any further action as votes, attachments or
confirmations in this issue, I will have to close this issue
2003-08-31 as WFM.

Rainer
Comment 4 Rainer Bielefeld 2003-09-16 07:38:00 UTC
Closing issue due to inactivity as INVALID.

Please open a new issue if the problem still exists in the latest
release of OOo.

Rainer
Comment 5 Rainer Bielefeld 2003-09-16 07:38:12 UTC
.
Comment 6 ace_dent 2008-05-17 21:26:26 UTC
The Issue you raised has been marked as 'Resolved' and not updated within the
last 1 year+. I am therefore setting this issue to 'Verified' as the first step
towards Closing it. If you feel this is incorrect, please re-open the issue and
add any comments.

Many thanks,
Andrew
 
Cleaning-up and Closing old Issues
~ The Grand Bug Squash, pre v3 ~
http://marketing.openoffice.org/3.0/announcementbeta.html
Comment 7 ace_dent 2008-05-17 23:29:41 UTC
As per previous posting: Verified -> Closed.
A Closed Issue is a Happy Issue (TM).

Regards,
Andrew