Bugzilla – Attachment 67516 Details for
Bug 49819
FILEOPEN error when loading a particular .docx file.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
debugging patch
scratch.diff (text/plain), 3.72 KB, created by
Michael Meeks
on 2012-09-21 17:29:28 UTC
(
hide
)
Description:
debugging patch
Filename:
MIME Type:
Creator:
Michael Meeks
Created:
2012-09-21 17:29:28 UTC
Size:
3.72 KB
patch
obsolete
>diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx >index 06253f3..f43775b 100644 >--- a/sfx2/source/doc/docfile.cxx >+++ b/sfx2/source/doc/docfile.cxx >@@ -1241,6 +1241,8 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( sal_Bool bCreateTempIf > return pImp->xStorage; > > SFX_ITEMSET_ARG( GetItemSet(), pRepairItem, SfxBoolItem, SID_REPAIRPACKAGE, false); >+ fprintf( stderr, "here: repair ? %p %d\n", >+ pRepairItem, (int)(pRepairItem ? pRepairItem->GetValue() : 0) ); > if ( pRepairItem && pRepairItem->GetValue() ) > { > // the storage should be created for repairing mode >diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx >index cf8d0c2..c80e583 100644 >--- a/sfx2/source/doc/objstor.cxx >+++ b/sfx2/source/doc/objstor.cxx >@@ -33,6 +33,7 @@ > #include <com/sun/star/document/XExporter.hpp> > #include <com/sun/star/document/FilterOptionsRequest.hpp> > #include <com/sun/star/document/XInteractionFilterOptions.hpp> >+#include <com/sun/star/packages/zip/ZipIOException.hpp> > #include <com/sun/star/task/XInteractionHandler.hpp> > #include <com/sun/star/task/XInteractionAskLater.hpp> > #include <com/sun/star/task/FutureDocumentVersionProductUpdateRequest.hpp> >@@ -2219,7 +2220,13 @@ sal_Bool SfxObjectShell::ImportFrom( SfxMedium& rMedium, bool bInsert ) > } > > return xLoader->filter( aArgs ); >- }catch(...) >+ } >+ catch (const packages::zip::ZipIOException&) >+ { >+ fprintf( stderr, "zip except 0x%x 0x%x\n", (int)GetError(), (int)GetErrorCode() ); >+ SetError( ERRCODE_IO_BROKENPACKAGE, "Badness in the underlying package format." ); >+ } >+ catch(...) > {} > } > >diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx >index 38a9961..0a7e14a 100644 >--- a/writerfilter/source/dmapper/DomainMapper.cxx >+++ b/writerfilter/source/dmapper/DomainMapper.cxx >@@ -102,11 +102,14 @@ LoggedStream(dmapper_logger, "DomainMapper"), > > //import document properties > >+ fprintf( stderr, "FIXME horrible hack!\n" ); >+ sal_Bool bRepairStorage = sal_True; >+ > try > { > uno::Reference< lang::XMultiServiceFactory > xFactory(xContext->getServiceManager(), uno::UNO_QUERY_THROW); > uno::Reference< embed::XStorage > xDocumentStorage = >- (comphelper::OStorageHelper::GetStorageOfFormatFromInputStream(OFOPXML_STORAGE_FORMAT_STRING, xInputStream)); >+ (comphelper::OStorageHelper::GetStorageOfFormatFromInputStream(OFOPXML_STORAGE_FORMAT_STRING, xInputStream, xFactory, bRepairStorage )); > > uno::Reference< uno::XInterface > xTemp = xContext->getServiceManager()->createInstanceWithContext( > "com.sun.star.document.OOXMLDocumentPropertiesImporter", >diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx >index 9874740..8341588 100644 >--- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx >+++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx >@@ -38,9 +38,13 @@ OOXMLStreamImpl::OOXMLStreamImpl > uno::Reference<io::XInputStream> xStorageStream, StreamType_t nType) > : mxContext(xContext), mxStorageStream(xStorageStream), mnStreamType(nType) > { >+ fprintf( stderr, "here - another disaster\n" ); >+ uno::Reference< lang::XMultiServiceFactory > xFactory(xContext->getServiceManager(), uno::UNO_QUERY_THROW); >+ >+ sal_Bool bRepairStorage = sal_True; > mxStorage.set > (comphelper::OStorageHelper::GetStorageOfFormatFromInputStream >- (OFOPXML_STORAGE_FORMAT_STRING, mxStorageStream)); >+ (OFOPXML_STORAGE_FORMAT_STRING, mxStorageStream, xFactory, bRepairStorage)); > mxRelationshipAccess.set(mxStorage, uno::UNO_QUERY_THROW); > > init();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 49819
:
61470
| 67516