To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=85423
                 Issue #|85423
                 Summary|storeAsURL for writer/web document into MS Word 97 (an
                        |d less) produce corrupted document 
               Component|Word processor
                 Version|OOo 2.0.4
                Platform|PC
                     URL|
              OS/Version|All
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|save-export
             Assigned to|mru
             Reported by|ashtokalo





------- Additional comments from [EMAIL PROTECTED] Mon Jan 21 09:18:43 +0000 
2008 -------
In case we need to save writer/web document (e.g. HTML) into MS Word (except MS
Word 2003 XML) we got document that could be viewed and edited with Open Office,
but wrong for Microsoft Office 2003 (maybe other versions too). This only
happens if you do that in Basic or via API by methods storeToURL or storeAsURL.

The problem discovered with following code:

Sub SaveAs(cFilter As String, cSource As String, cTarget As String)
    cUrl = ConvertToURL( cSource )
    oDoc = StarDesktop.LoadComponentFromURL(cUrl, "_blank", 0, _
         Array(MakePropertyValue( "Hidden", True ),))
    cUrl = ConvertToURL( cTarget )
    oDoc.storeToURL( cUrl, Array( MakePropertyValue( "FilterName", cFilter ),))
    oDoc.close( True )
End Sub

Function MakePropertyValue( Optional cName As String, Optional uValue ) _
   As com.sun.star.beans.PropertyValue
   Dim oPropertyValue As New com.sun.star.beans.PropertyValue
   If Not IsMissing( cName ) Then
      oPropertyValue.Name = cName
   EndIf
   If Not IsMissing( uValue ) Then
      oPropertyValue.Value = uValue
   EndIf
   MakePropertyValue() = oPropertyValue
End Function

The value for cFilter is "MS Word 97", cSource is filename of HTML document,
cTarget is name of new file with extension .doc.

I also check this behavior with JodConverter with same result.

The document we got in result looks like normal. But if you open this document
with MS Word you find set of ````` (depends on original text length) drew on
window form without page (for Print layout). For Normal layout the text visible,
but each character placed on separate line. Only in Outline layout the content
visible as it should be.

At the same time Open Office show the document without any artifacts.

Moreover, it's not clear why API allows save writer/web document into MS Word
document if UI limit me to do that.

The bug was reproduced with Windows XP, Windows 2000 and Windows 2003 in Open
Office v 2.0.4 and Open Office 2.2.1.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
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]

Reply via email to