summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2015-02-23 02:19:32 +0100
committerAndras Timar <andras.timar@collabora.com>2015-03-13 10:23:55 +0100
commitb60635df9cccd0472450d79af4f8e36bddf29ff4 (patch)
treec581d264b0da4590ba715be28f963e074753b56a
parentc9bae5c5f0b9219391e604a1d61126ea3d2c943c (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 Conflicts: sc/source/filter/oox/excelfilter.cxx Change-Id: I9be8b019fae69cd206203591982a89648965692f
-rw-r--r--sc/source/filter/oox/excelfilter.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/sc/source/filter/oox/excelfilter.cxx b/sc/source/filter/oox/excelfilter.cxx
index 3da6f1ceda1e..ee4bfa2a74c4 100644
--- a/sc/source/filter/oox/excelfilter.cxx
+++ b/sc/source/filter/oox/excelfilter.cxx
@@ -99,19 +99,8 @@ 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;
try
{
- xBookGlob = WorkbookHelper::constructGlobals( *this );
- }
- catch (...)
- {
- }
- if ( xBookGlob.get() && importFragment( new WorkbookFragment( *xBookGlob, aWorkbookPath ) ) )
- {
try
{
importDocumentProperties();
@@ -124,8 +113,19 @@ bool ExcelFilter::importDocument() throw()
{
SAL_WARN("sc", "exception when importing document properties");
}
- return true;
+ /* 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;
}