diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2015-02-23 02:19:32 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-03-12 16:55:59 +0100 |
commit | e4c6dcef807d24be29975d8fa1ad0ca435e914c5 (patch) | |
tree | 9b08b42a685ff805b34112dab0542b52f6f712a2 | |
parent | 648d3022bd77e66fdf3fe42132b6dc207c5a2804 (diff) |
import the document properties before the document
That allows us to potentially change the import depending on the
producer of the document.
This becomes necessary to handle MSO 2007 chart drawingml streams
correctly.
(cherry picked from commit a2fa9e2468aa5c4fd4b610c5d0ebc8959e87a072)
Conflicts:
sc/source/filter/oox/excelfilter.cxx
Change-Id: I9be8b019fae69cd206203591982a89648965692f
-rw-r--r-- | sc/source/filter/oox/excelfilter.cxx | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/sc/source/filter/oox/excelfilter.cxx b/sc/source/filter/oox/excelfilter.cxx index 6c2d6bd53339..8495767efd6b 100644 --- a/sc/source/filter/oox/excelfilter.cxx +++ b/sc/source/filter/oox/excelfilter.cxx @@ -105,11 +105,7 @@ bool ExcelFilter::importDocument() throw() if( aWorkbookPath.isEmpty() ) return false; - /* Construct the WorkbookGlobals object referred to by every instance of - the class WorkbookHelper, and execute the import filter by constructing - an instance of WorkbookFragment and loading the file. */ - WorkbookGlobalsRef xBookGlob = WorkbookHelper::constructGlobals( *this ); - if ( xBookGlob.get() && importFragment( new WorkbookFragment( *xBookGlob, aWorkbookPath ) ) ) + try { try { @@ -119,8 +115,23 @@ bool ExcelFilter::importDocument() throw() { SAL_WARN("sc", "exception when importing document properties " << e.Message); } - return true; + catch( ... ) + { + SAL_WARN("sc", "exception when importing document properties"); + } + /* Construct the WorkbookGlobals object referred to by every instance of + the class WorkbookHelper, and execute the import filter by constructing + an instance of WorkbookFragment and loading the file. */ + WorkbookGlobalsRef xBookGlob(WorkbookHelper::constructGlobals(*this)); + if (xBookGlob.get() && importFragment(new WorkbookFragment(*xBookGlob, aWorkbookPath))) + { + return true; + } + } + catch (...) + { } + return false; } |