To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=43995





------- Additional comments from [EMAIL PROTECTED] Fri Mar  4 04:37:52 -0800 
2005 -------
The fix seems to be trivial. 

In WPXInputStream * WPXSvInputStream::getDocumentOLEStream()

you open a stream by calling

mxChildStream = mxChildStorage->OpenSotStream(
                        rtl::OUString::createFromAscii( "PerfectOffice_MAIN" ),
                        STREAM_STD_READ );

If the storage is another format you will of course not get a valid stream, so
before using this stream you must check it. A possible fix is:

WPXInputStream * WPXSvInputStream::getDocumentOLEStream()
{
        SvStream *pStream = utl::UcbStreamHelper::CreateStream( mxStream );
        mxChildStorage = new SotStorage( pStream, TRUE );
        mxChildStream = mxChildStorage->OpenSotStream(
                        rtl::OUString::createFromAscii( "PerfectOffice_MAIN" ),
                        STREAM_STD_READ );

        if ( !mxChildStream->GetError() )
        {
            Reference < XInputStream > xContents = new
utl::OSeekableInputStreamWrapper( mxChildStream );
            if (xContents.is())
                return new WPXSvInputStream( xContents );
        }    

        return NULL;
}

But of course YMMV. :-)

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