[Libreoffice-commits] core.git: Branch 'feature/orcus-continuous-integration' - 5119 commits - accessibility/inc accessibility/source android/Bootstrap android/experimental android/mobile-config.py android/Module_android.mk animations/source apple_remote/source autogen.sh avmedia/inc avmedia/Library_avmediagst.mk avmedia/Library_avmedia.mk avmedia/Library_avmediaogl.mk avmedia/Library_avmediavlc.mk avmedia/Module_avmedia.mk avmedia/source basctl/inc basctl/Module_basctl.mk basctl/source basctl/uiconfig basegfx/source basic/inc basic/Library_sb.mk basic/Module_basic.mk basic/qa basic/source bean/com bean/inc bean/Library_officebean.mk bean/native bean/qa bean/test binaryurp/qa binaryurp/source bin/distro-install-file-lists bin/distro-install-sdk bin/find-german-comments bin/findunusedcode bin/find-unused-defines.awk bin/find-unused-defines.sh bin/generate-bash-completion bin/gen-iwyu-dummy-lib bin/gen-iwyu-dummy-lib.awk bin/lo-all-static-libs bin/lo-generate-source-tarball bin/lolcat bin/parse-per fcheck.py bin/refcount_leak.py bin/run bin/update_pch.sh bridges/inc bridges/Jar_java_uno.mk bridges/Library_cpp_uno.mk bridges/source bridges/test canvas/Library_directx9canvas.mk canvas/Library_gdipluscanvas.mk canvas/Library_oglcanvas.mk canvas/source canvas/StaticLibrary_directxcanvas.mk canvas/workben chart2/CppunitTest_chart2_export.mk chart2/CppunitTest_chart2_import.mk chart2/CppunitTest_chart2_xshape.mk chart2/inc chart2/Library_chartcontroller.mk chart2/Library_chartcore.mk chart2/Library_chartopengl.mk chart2/opengl chart2/qa chart2/source chart2/uiconfig clew/Library_clew.mk clew/Makefile clew/Module_clew.mk clew/source cli_ure/qa cli_ure/source codemaker/source comphelper/inc comphelper/Library_comphelper.mk comphelper/qa comphelper/source compilerplugins/clang config_host/config_features.h.in config_host/config_folders.h.in config_host/config_oauth2.h.in config_host.mk.in configmgr/CppunitTest_configmgr_unit.mk configmgr/qa configmgr/source configure.ac connectivity/co m connectivity/CppunitTest_connectivity_commontools.mk connectivity/inc connectivity/Jar_ConnectivityTools.mk connectivity/JunitTest_complex.mk connectivity/org connectivity/qa connectivity/registry connectivity/source cppcanvas/CppunitTest_cppcanvas_emfplus.mk cppcanvas/qa cppcanvas/source cppuhelper/inc cppuhelper/qa cppuhelper/source cppuhelper/test cppu/qa cppu/source cpputools/source crashrep/CustomTarget_crashrep_res.mk crashrep/Executable_crashrep.mk crashrep/Makefile crashrep/Module_crashrep.mk crashrep/README crashrep/source crashrep/WinResTarget_crashrep.mk cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk dbaccess/inc dbaccess/Module_dbaccess.mk dbaccess/qa dbaccess/source dbaccess/uiconfig desktop/Executable_crashrep_com.mk desktop/Executable_soffice_bin.mk desktop/Executable_soffice.mk desktop/Executable_unopkg.mk desktop/inc desktop/Library_active_native.mk desktop/Library_passive_native.mk desktop/Library_sofficeapp.mk desktop/Module_desktop.mk desktop/Pa ckage_sbase_sh.mk desktop/Package_scalc_sh.mk desktop/Package_scripts.mk desktop/Package_sdraw_sh.mk desktop/Package_simpress_sh.mk desktop/Package_smath_sh.mk desktop/Package_swriter_sh.mk desktop/Pagein_common.mk desktop/scripts desktop/source desktop/StaticLibrary_winextendloaderenv.mk desktop/StaticLibrary_winloader.mk desktop/test desktop/uiconfig desktop/unx desktop/win32 dictionaries distro-configs/LibreOfficeAndroidAarch64.conf distro-configs/LibreOfficeAndroid.conf distro-configs/LibreOfficeAndroidX86.conf distro-configs/LibreOfficeLinux.conf distro-configs/LibreOfficeOpenBSD.conf distro-configs/OxygenOfficeLinux.conf download.lst drawinglayer/source dtrans/source dtrans/test editeng/CppunitTest_editeng_core.mk editeng/CustomTarget_generated.mk editeng/inc editeng/Library_editeng.mk editeng/Module_editeng.mk editeng/qa editeng/source embeddedobj/source embeddedobj/test embedserv/source eventattacher/source extensions/Executable_pluginapp.bin.mk extensions/Library_scn.mk ext ensions/qa extensions/source extensions/test extensions/uiconfig extensions/workben external/apache-commons external/boost external/coinmp external/collada2gltf external/cppunit external/curl external/firebird external/glew external/glm external/harfbuzz external/icu external/jpeg-turbo external/languagetool external/lcms2 external/libabw external/libcdr external/libcmis external/libebook external/libetonyek external/libexttextcat external/libfreehand external/libgltf external/liblangtag external/libmspub external/libmwaw external/libodfgen external/liborcus external/libpagemaker external/librevenge external/libvisio external/libwpd external/libwpg external/libwps external/libxml2 external/libxmlsec external/libxslt external/lpsolve external/Module_external.mk external/mysqlcppconn external/nss external/openldap external/openssl external/poppler external/python3 external/redland external/vigra extras/Module_extras.mk extras/Package_tplofficorr.mk extras/Package_tploffimisc.mk extras /Package_tplpersonal.mk extras/Package_tplpresnt.mk extras/source filter/Configuration_filter.mk filter/CppunitTest_filter_eps_test.mk filter/CppunitTest_filter_pcd_test.mk filter/Module_filter.mk filter/qa filter/source filter/uiconfig forms/inc forms/qa forms/source formula/Library_for.mk formula/source formula/uiconfig fpicker/source fpicker/uiconfig framework/inc framework/JunitTest_framework_complex.mk framework/qa framework/source .gitignore helpcompiler/inc helpcompiler/source helpcontent2 hwpfilter/source i18nlangtag/qa i18nlangtag/source i18npool/inc i18npool/qa i18npool/source i18nutil/source icon-themes/breeze icon-themes/crystal icon-themes/galaxy icon-themes/hicontrast icon-themes/human icon-themes/industrial icon-themes/oxygen icon-themes/sifr icon-themes/tango icon-themes/tango_testing idlc/inc idlc/source idl/inc idl/source include/avmedia include/basebmp include/basegfx include/basic include/canvas include/clew include/codemaker include/com include/comphelper includ e/connectivity include/cppu include/cppuhelper include/dbaccess include/drawinglayer include/editeng include/filter include/formula include/framework include/jvmfwk include/LibreOfficeKit include/o3tl include/oox include/opencl include/osl include/package include/postwin.h include/registry include/rsc include/rtl include/sal include/salhelper include/sax include/sfx2 include/sot include/svl include/svtools include/svx include/test include/toolkit include/tools include/ucbhelper include/uno include/unotools include/vbahelper include/vcl include/xmloff include/xmlreader instsetoo_native/CustomTarget_install.mk instsetoo_native/CustomTarget_setup.mk instsetoo_native/inc_ooohelppack instsetoo_native/inc_openoffice instsetoo_native/inc_sdkoo instsetoo_native/Module_instsetoo_native.mk instsetoo_native/ooenv instsetoo_native/Package_instsetoo_native_ooenv.mk instsetoo_native/Package_setup.mk instsetoo_native/util io/CppunitTest_io_textinputstream.mk io/Module_io.mk io/qa ios/CustomTarget_ LibreOffice_app.mk ios/CustomTarget_MobileLibreOffice_app.mk ios/CustomTarget_TiledLibreOffice_app.mk ios/Executable_LibreOffice.mk ios/experimental io/source ios/shared io/test javaunohelper/com javaunohelper/Jar_juh.mk javaunohelper/JunitTest_juh.mk javaunohelper/source javaunohelper/test jurt/com jurt/Jar_jurt.mk jurt/JunitTest_java_remote.mk jurt/JunitTest_uno.mk jurt/Library_jpipe.mk jurt/source jurt/test jurt/workbench jvmaccess/source jvmfwk/CustomTarget_jvmfwk_jvmfwk3_ini.mk jvmfwk/inc jvmfwk/Module_jvmfwk.mk jvmfwk/Package_jvmfwk_jvmfwk3_ini.mk jvmfwk/Package_rcfiles.mk jvmfwk/plugins jvmfwk/source l10ntools/inc l10ntools/source Library_merged.mk librelogo/CustomTarget_librelogo.mk librelogo/Module_librelogo.mk libreofficekit/CppunitTest_libreofficekit_tiledrendering.mk libreofficekit/qa libreofficekit/source lingucomponent/source linguistic/qa linguistic/source linguistic/workben lotuswordpro/source Makefile.fetch Makefile.in mysqlc/Library_mysqlc.mk mysqlc/source nlpsolve r/Jar_EvolutionarySolver.mk nlpsolver/Jar_nlpsolver.mk nlpsolver/src nlpsolver/ThirdParty o3tl/qa odk/config odk/CppunitTest_odk_checkapi.mk odk/docs odk/examples odk/index.html odk/index_online.html odk/Package_config.mk odk/Package_odk_headers.mk odk/qa odk/settings odk/source odk/util offapi/com offapi/UnoApi_offapi.mk officecfg/Configuration_officecfg.mk officecfg/registry oox/CustomTarget_generated.mk oox/inc oox/source opencl/inc opencl/Library_opencl.mk opencl/Makefile opencl/Module_opencl.mk opencl/README opencl/source package/inc package/Library_package2.mk package/source postprocess/CustomTarget_images.mk postprocess/CustomTarget_registry.mk postprocess/Rdb_services.mk pyuno/CustomTarget_python_shell.mk pyuno/CustomTarget_pyuno_pythonloader_ini.mk pyuno/demo pyuno/inc pyuno/Module_pyuno.mk pyuno/Package_python_scripts.mk pyuno/Package_pyuno_pythonloader_ini.mk pyuno/source pyuno/zipcore qadevOOo/Jar_OOoRunnerLight.mk qadevOOo/Jar_OOoRunner.mk qadevOOo/Module_qadevOOo.mk qa devOOo/qa qadevOOo/runner qadevOOo/testdocs qadevOOo/tests readlicense_oo/docs readlicense_oo/license README.Android README.cross registry/source registry/tools remotebridges/examples remotebridges/source reportbuilder/Jar_reportbuilder.mk reportbuilder/java reportdesign/inc reportdesign/qa reportdesign/source reportdesign/uiconfig RepositoryExternal.mk RepositoryFixes.mk Repository.mk RepositoryModule_host.mk ridljar/com ridljar/JunitTest_util.mk rsc/inc rsc/source sal/android sal/cppunittester salhelper/qa sal/inc sal/Library_sal.mk sal/osl sal/qa sal/rtl sal/test sal/textenc sal/workben sax/Library_expwrap.mk sax/source sax/test scaddins/source sccomp/source sc/CppunitTest_sc_annotationobj.mk sc/CppunitTest_sc_annotationshapeobj.mk sc/CppunitTest_sc_annotationsobj.mk sc/CppunitTest_sc_cellrangeobj.mk sc/CppunitTest_sc_chart_regression_test.mk sc/CppunitTest_sc_condformats.mk sc/CppunitTest_sc_databaserangeobj.mk sc/CppunitTest_sc_datapilotfieldobj.mk sc/CppunitTest_sc_datapilotta bleobj.mk sc/CppunitTest_sc_editfieldobj_cell.mk sc/CppunitTest_sc_editfieldobj_header.mk sc/CppunitTest_sc_html_export_test.mk sc/CppunitTest_sc_macros_test.mk sc/CppunitTest_sc_modelobj.mk sc/CppunitTest_sc_namedrangeobj.mk sc/CppunitTest_sc_namedrangesobj.mk sc/CppunitTest_sc_opencl_test.mk sc/CppunitTest_sc_outlineobj.mk sc/CppunitTest_sc_perfobj.mk sc/CppunitTest_sc_rangelst_test.mk sc/CppunitTest_sc_styleloaderobj.mk sc/CppunitTest_sc_subsequent_export_test.mk sc/CppunitTest_sc_tablesheetobj.mk sc/CppunitTest_sc_tablesheetsobj.mk sc/CppunitTest_sc_ucalc.mk sc/inc sc/Library_scfilt.mk sc/Library_sc.mk sc/Library_scopencl.mk sc/Library_scui.mk sc/Module_sc.mk scp2/AutoInstall.mk scp2/inc scp2/InstallModule_base.mk scp2/InstallModule_calc.mk scp2/InstallModule_crashrep.mk scp2/InstallModule_draw.mk scp2/InstallModule_extensions.mk scp2/InstallModule_impress.mk scp2/InstallModule_math.mk scp2/InstallModule_ooo.mk scp2/InstallModule_python.mk scp2/InstallModule_quickstart.mk scp2/I nstallModule_writer.mk scp2/InstallScript_setup_osl.mk scp2/Module_scp2.mk scp2/source sc/qa scripting/examples scripting/java scripting/Module_scripting.mk scripting/Pyuno_mailmerge.mk scripting/source sc/sdi sc/source sc/uiconfig sc/UIConfig_scalc.mk sc/workben sd/AllLangResTarget_sd.mk sd/CppunitTest_sd_export_tests.mk sdext/inc sdext/source sd/inc sd/qa sd/README_REMOTE sd/sdi sd/source sd/uiconfig sd/UIConfig_simpress.mk setup_native/Library_shlxtmsi.mk setup_native/scripts setup_native/source sfx2/inc sfx2/JunitTest_sfx2_complex.mk sfx2/Library_sfx.mk sfx2/qa sfx2/sdi sfx2/source sfx2/uiconfig shell/Executable_gnome_open_url.mk shell/inc shell/Module_shell.mk shell/source slideshow/inc slideshow/Library_OGLTrans.mk slideshow/Library_slideshow.mk slideshow/source slideshow/test smoketest/data smoketest/libtest.cxx solenv/bin solenv/doc solenv/gbuild solenv/gcc-wrappers solenv/gdb solenv/inc soltools/cpp soltools/mkdepend sot/qa sot/source sot/workben starmath/inc starmath/qa st armath/source starmath/uiconfig starmath/UIConfig_smath.mk stoc/source stoc/test store/source store/workben svgio/CppunitTest_svgio.mk svgio/inc svgio/qa svgio/source svl/inc svl/Library_svl.mk svl/qa svl/source svtools/CppunitTest_svtools_graphic.mk svtools/inc svtools/langsupport svtools/qa svtools/README svtools/source svtools/uiconfig svx/AllLangResTarget_ofa.mk svx/AllLangResTarget_svx.mk svx/Executable_gengal.mk svx/inc svx/Library_svxcore.mk svx/Library_svx.mk svx/qa svx/sdi svx/source svx/uiconfig svx/UIConfig_svx.mk svx/util svx/workben sw/AllLangResTarget_sw.mk sw/CppunitTest_sw_filters_test.mk sw/CppunitTest_sw_globalfilter.mk sw/CppunitTest_sw_odfexport.mk sw/CppunitTest_sw_rtfexport.mk sw/CppunitTest_sw_tox.mk sw/CppunitTest_sw_uiwriter.mk sw/CppunitTest_sw_uwriter.mk sw/CustomTarget_generated.mk sw/Executable_tiledrendering.mk swext/mediawiki sw/inc sw/Library_sw.mk sw/Module_sw.mk sw/qa sw/README sw/sdi sw/source sw/uiconfig sw/UIConfig_swriter.mk sysui/CustomTarget_s olaris.mk sysui/desktop test/Library_test.mk test/Package_unittest.mk test/source testtools/com testtools/qa testtools/source test/user-template toolkit/Library_tk.mk toolkit/qa toolkit/source toolkit/test tools/CppunitTest_tools_test.mk tools/inc tools/Library_tl.mk tools/qa tools/source touch/CustomTarget_touch_javamaker.mk touch/idl touch/InternalUnoApi_touch.mk touch/Library_libotouch.mk touch/Makefile touch/Module_touch.mk touch/README touch/source translations tubes/source ucbhelper/Library_ucbhelper.mk ucbhelper/source ucb/qa ucb/source ucb/test udkapi/com UnoControls/inc UnoControls/Makefile UnoControls/source unodevtools/source unoidl/source unotest/source unotools/CppunitTest_unotools_fontdefs.mk unotools/inc unotools/JunitTest_unotools_complex.mk unotools/qa unotools/source unoxml/Library_unoxml.mk unoxml/qa unoxml/source unusedcode.easy ure/Package_install.mk ure/Rdb_ure.mk ure/source uui/Library_uui.mk uui/source uui/uiconfig uui/UIConfig_uui.mk vbahelper/inc vbahelper/ Module_vbahelper.mk vbahelper/source vcl/android vcl/CppunitTest_vcl_outdev.mk vcl/Executable_icontest.mk vcl/Executable_mtfdemo.mk vcl/Executable_outdevgrind.mk vcl/Executable_ui-previewer.mk vcl/Executable_vcldemo.mk vcl/generic vcl/headless vcl/inc vcl/ios vcl/Library_vcl.mk vcl/Library_vclopengl.mk vcl/Library_vclplug_gen.mk vcl/Library_vclplug_gtk3.mk vcl/Library_vclplug_gtk.mk vcl/Library_vclplug_kde4.mk vcl/Library_vclplug_kde.mk vcl/Module_vcl.mk vcl/opengl vcl/osx vcl/Package_fontunxppds.mk vcl/Package_opengl.mk vcl/qa vcl/quartz vcl/README vcl/README.GDIMetaFile vcl/source vcl/StaticLibrary_glxtest.mk vcl/uiconfig vcl/unx vcl/win vcl/WinResTarget_vcl.mk vcl/workben winaccessibility/source wizards/com wizards/Jar_commonwizards.mk wizards/Package_access2base.mk wizards/source writerfilter/CppunitTest_writerfilter_misc.mk writerfilter/inc writerfilter/Library_writerfilter.mk writerfilter/qa writerfilter/README writerfilter/source writerperfect/inc writerperfect/Library_wpftdr aw.mk writerperfect/Library_wpftimpress.mk writerperfect/Library_wpftwriter.mk writerperfect/qa writerperfect/source xmerge/source xmlhelp/source xmloff/dtd xmloff/inc xmloff/qa xmloff/source xmlscript/inc xmlscript/source xmlscript/test xmlsecurity/source xmlsecurity/test_docs xmlsecurity/uiconfig

Markus Mohrhard markus.mohrhard at collabora.co.uk
Fri Jan 9 21:32:23 PST 2015


Rebased ref, commits from common ancestor:
commit c92c2a80d4e82193b811928aaff3b42a470d9510
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Fri Jan 9 18:39:35 2015 +0100

    temp
    
    Change-Id: Ia71c6f0b673f58b804403841a92f7ab30a619e3e

diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 8a00f21..5801bbc 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -222,6 +222,26 @@ ScOrcusSheetProperties::~ScOrcusSheetProperties()
 {
 }
 
+namespace {
+
+double translateToInternal(double nVal, orcus::length_unit_t unit)
+{
+    switch(unit)
+    {
+        case orcus::length_unit_inch:
+        case orcus::length_unit_twip:
+        case orcus::length_unit_point:
+        case orcus::length_unit_centimeter:
+        case orcus::length_unit_unknown:
+        default:
+            break;
+    }
+    return 0;
+}
+
+
+}
+
 void ScOrcusSheetProperties::set_column_width(os::col_t col, double width, orcus::length_unit_t /*unit*/)
 {
     mrDoc.getDoc().SetColWidthOnly(col, mnTab, width);
commit a66bf2318604a2cef24632a4642b4b7f6f2dbec0
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Tue Oct 28 14:46:26 2014 +0100

    implement import_sheet_properties interface
    
    Change-Id: Ifed14df422c067fb6faacf370cbe9e1acf336d24

diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index 0ef0d7d..37986a3 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -101,6 +101,25 @@ private:
     ScRange maRange;
 };
 
+class ScOrcusSheetProperties : public orcus::spreadsheet::iface::import_sheet_properties
+{
+    ScDocumentImport& mrDoc;
+    SCTAB mnTab;
+public:
+    ScOrcusSheetProperties(SCTAB nTab, ScDocumentImport& rDoc);
+    virtual ~ScOrcusSheetProperties();
+
+    virtual void set_column_width(orcus::spreadsheet::col_t col, double width, orcus::length_unit_t unit) SAL_OVERRIDE;
+
+    virtual void set_column_hidden(orcus::spreadsheet::col_t col, bool hidden) SAL_OVERRIDE;
+
+    virtual void set_row_height(orcus::spreadsheet::row_t row, double height, orcus::length_unit_t unit) SAL_OVERRIDE;
+
+    virtual void set_row_hidden(orcus::spreadsheet::row_t row, bool hidden) SAL_OVERRIDE;
+
+    virtual void set_merge_cell_range(const char* p_range, size_t n_range) SAL_OVERRIDE;
+};
+
 class ScOrcusSheet : public orcus::spreadsheet::iface::import_sheet
 {
     ScDocumentImport& mrDoc;
@@ -108,6 +127,7 @@ class ScOrcusSheet : public orcus::spreadsheet::iface::import_sheet
     ScOrcusFactory& mrFactory;
     sc::SharedFormulaGroups maFormulaGroups;
     ScOrcusAutoFilter maAutoFilter;
+    ScOrcusSheetProperties maProperties;
 
     typedef std::map<size_t, ScRangeData*> SharedFormulaContainer;
     SharedFormulaContainer maSharedFormulas;
@@ -120,6 +140,7 @@ public:
     ScOrcusSheet(ScDocumentImport& rDoc, SCTAB nTab, ScOrcusFactory& rFactory);
 
     virtual orcus::spreadsheet::iface::import_auto_filter* get_auto_filter() SAL_OVERRIDE { return &maAutoFilter; }
+    virtual orcus::spreadsheet::iface::import_sheet_properties* get_sheet_properties() SAL_OVERRIDE;
 
     // Orcus import interface
     virtual void set_auto(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, const char* p, size_t n) SAL_OVERRIDE;
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index d96ae77..8a00f21 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -212,8 +212,51 @@ void ScOrcusFactory::setStatusIndicator(const uno::Reference<task::XStatusIndica
     mxStatusIndicator = rIndicator;
 }
 
+ScOrcusSheetProperties::ScOrcusSheetProperties(SCTAB nTab, ScDocumentImport& rDoc):
+    mrDoc(rDoc),
+    mnTab(nTab)
+{
+}
+
+ScOrcusSheetProperties::~ScOrcusSheetProperties()
+{
+}
+
+void ScOrcusSheetProperties::set_column_width(os::col_t col, double width, orcus::length_unit_t /*unit*/)
+{
+    mrDoc.getDoc().SetColWidthOnly(col, mnTab, width);
+}
+
+void ScOrcusSheetProperties::set_column_hidden(os::col_t col, bool hidden)
+{
+    if (hidden)
+        mrDoc.getDoc().SetColHidden(col, col, mnTab, hidden);
+}
+
+void ScOrcusSheetProperties::set_row_height(os::row_t row, double height, orcus::length_unit_t /*unit*/)
+{
+    mrDoc.getDoc().SetRowHeightOnly(row, row,mnTab, height);
+}
+
+void ScOrcusSheetProperties::set_row_hidden(os::row_t row, bool hidden)
+{
+    if (hidden)
+        mrDoc.getDoc().SetRowHidden(row, row, mnTab, hidden);
+}
+
+void ScOrcusSheetProperties::set_merge_cell_range(const char* /*p_range*/, size_t /*n_range*/)
+{
+}
+
 ScOrcusSheet::ScOrcusSheet(ScDocumentImport& rDoc, SCTAB nTab, ScOrcusFactory& rFactory) :
-    mrDoc(rDoc), mnTab(nTab), mrFactory(rFactory), maAutoFilter(rDoc.getDoc()), mnCellCount(0) {}
+    mrDoc(rDoc),
+    mnTab(nTab),
+    mrFactory(rFactory),
+    maAutoFilter(rDoc.getDoc()),
+    maProperties(mnTab, mrDoc),
+    mnCellCount(0)
+{
+}
 
 void ScOrcusSheet::cellInserted()
 {
@@ -225,6 +268,11 @@ void ScOrcusSheet::cellInserted()
     }
 }
 
+os::iface::import_sheet_properties* ScOrcusSheet::get_sheet_properties()
+{
+    return &maProperties;
+}
+
 void ScOrcusSheet::set_auto(os::row_t row, os::col_t col, const char* p, size_t n)
 {
     OUString aVal(p, n, RTL_TEXTENCODING_UTF8);
commit 3cb51e0f87e39d67680e25098ce6350f5655bf9b
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Tue Oct 28 14:33:33 2014 +0100

    prevent default operator=
    
    Change-Id: Ibcd843a992b06b73e628b0249fb9f3ea723510d2

diff --git a/sc/inc/documentimport.hxx b/sc/inc/documentimport.hxx
index e561fcd..0fff682 100644
--- a/sc/inc/documentimport.hxx
+++ b/sc/inc/documentimport.hxx
@@ -41,6 +41,7 @@ class SC_DLLPUBLIC ScDocumentImport : boost::noncopyable
     ScDocumentImportImpl* mpImpl;
 
     ScDocumentImport(); // disabled
+    ScDocumentImport& operator=(const ScDocumentImport&); //disabled
 
 public:
 
commit 5a18b7159115fa4c70f4024a03a14432473c0863
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Tue Oct 28 00:12:06 2014 +0100

    don't protect the gnumeric filter with the USE_ORCUS flag
    
    Change-Id: Id91c7844879bea589bf97f999fd0c69669dfa7f6

diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index f24f8b3..03288b2 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -661,13 +661,6 @@ namespace {
 
 bool queryOrcusTypeAndFilter(const uno::Sequence<beans::PropertyValue>& rDescriptor, OUString& rType, OUString& rFilter)
 {
-    // depending on the experimental mode
-    uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
-    if (!xContext.is() || !officecfg::Office::Common::Misc::ExperimentalMode::get(xContext))
-    {
-        return false;
-    }
-
     OUString aURL;
     sal_Int32 nSize = rDescriptor.getLength();
     for (sal_Int32 i = 0; i < nSize; ++i)
@@ -683,10 +676,6 @@ bool queryOrcusTypeAndFilter(const uno::Sequence<beans::PropertyValue>& rDescrip
     if (aURL.isEmpty() || aURL.copy(0,8).equalsIgnoreAsciiCase("private:"))
         return false;
 
-    OUString aUseOrcus;
-    rtl::Bootstrap::get("LIBO_USE_ORCUS", aUseOrcus);
-    bool bUseOrcus = (aUseOrcus == "YES");
-
     // TODO : Type must be set to be generic_Text (or any other type that
     // exists) in order to find a usable loader. Exploit it as a temporary
     // hack.
@@ -698,6 +687,17 @@ bool queryOrcusTypeAndFilter(const uno::Sequence<beans::PropertyValue>& rDescrip
         return true;
     }
 
+    // depending on the experimental mode
+    uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
+    if (!xContext.is() || !officecfg::Office::Common::Misc::ExperimentalMode::get(xContext))
+    {
+        return false;
+    }
+
+    OUString aUseOrcus;
+    rtl::Bootstrap::get("LIBO_USE_ORCUS", aUseOrcus);
+    bool bUseOrcus = (aUseOrcus == "YES");
+
     if (!bUseOrcus)
         return false;
 
commit 596aa54b860cf08e046a9e21a75a23e073af7900
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Tue Aug 26 15:18:19 2014 +0200

    import cell fill color
    
    Change-Id: Icbc6ef69a00f05ffa7bb78227968c13a16cdc7a0

diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index 2f84f3a..0ef0d7d 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -183,6 +183,8 @@ private:
         OUString maPattern;
         Color maFgColor;
         Color maBgColor;
+
+        void applyToItemSet(SfxItemSet& rSet) const;
     };
 
     fill maCurrentFill;
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 155dcf4..d96ae77 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -24,6 +24,7 @@
 #include <editeng/postitem.hxx>
 #include <editeng/wghtitem.hxx>
 #include <editeng/colritem.hxx>
+#include <editeng/brushitem.hxx>
 #include <editeng/udlnitem.hxx>
 
 #include <formula/token.hxx>
@@ -494,6 +495,14 @@ void ScOrcusStyles::font::applyToItemSet(SfxItemSet& rSet) const
     rSet.Put(SvxUnderlineItem(meUnderline, ATTR_FONT_UNDERLINE));
 }
 
+void ScOrcusStyles::fill::applyToItemSet(SfxItemSet& rSet) const
+{
+    if (maPattern.equalsIgnoreAsciiCase("none"))
+        return;
+
+    rSet.Put(SvxBrushItem(maFgColor, ATTR_BACKGROUND));
+}
+
 ScOrcusStyles::protection::protection():
     mbHidden(false),
     mbLocked(false)
@@ -627,22 +636,26 @@ void ScOrcusStyles::set_fill_count(size_t /*n*/)
     // needed at all?
 }
 
-void ScOrcusStyles::set_fill_pattern_type(const char* /*s*/, size_t /*n*/)
+void ScOrcusStyles::set_fill_pattern_type(const char* s, size_t n)
 {
+    maCurrentFill.maPattern = OUString(s, n, RTL_TEXTENCODING_UTF8);
 }
 
-void ScOrcusStyles::set_fill_fg_color(orcus::spreadsheet::color_elem_t /*alpha*/, orcus::spreadsheet::color_elem_t /*red*/, orcus::spreadsheet::color_elem_t /*green*/, orcus::spreadsheet::color_elem_t /*blue*/)
+void ScOrcusStyles::set_fill_fg_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue)
 {
+    maCurrentFill.maFgColor = Color(alpha, red, green, blue);
 }
 
-void ScOrcusStyles::set_fill_bg_color(orcus::spreadsheet::color_elem_t /*alpha*/, orcus::spreadsheet::color_elem_t /*red*/, orcus::spreadsheet::color_elem_t /*green*/, orcus::spreadsheet::color_elem_t /*blue*/)
+void ScOrcusStyles::set_fill_bg_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue)
 {
+    maCurrentFill.maBgColor = Color(alpha, red, green, blue);
 }
 
 size_t ScOrcusStyles::commit_fill()
 {
     SAL_INFO("sc.orcus.style", "commit fill");
-    return 0;
+    maFills.push_back(maCurrentFill);
+    return maFills.size() - 1;
 }
 
 // border
commit 5d226d978ceb335edad7016d4aa651fda0a525d3
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Tue Aug 26 15:17:19 2014 +0200

    we need to create the default styles in the interface right now
    
    We should fix this but it needs some work in the import code.
    
    Change-Id: If9ce52f6aa2b30faf832a89f39abef4b853a5ec1

diff --git a/sc/inc/stlpool.hxx b/sc/inc/stlpool.hxx
index e83aef0..15acaf8 100644
--- a/sc/inc/stlpool.hxx
+++ b/sc/inc/stlpool.hxx
@@ -21,6 +21,7 @@
 #define INCLUDED_SC_INC_STLPOOL_HXX
 
 #include <svl/style.hxx>
+#include "scdllapi.h"
 
 class ScStyleSheet;
 class ScDocument;
@@ -42,7 +43,7 @@ public:
     SfxStyleSheetBase*  GetActualStyleSheet ()
                                 { return pActualStyleSheet; }
 
-    void                CreateStandardStyles();
+    void SC_DLLPUBLIC CreateStandardStyles();
     void                CopyStdStylesFrom( ScStyleSheetPool* pSrcPool );
 
     void                CopyStyleFrom( ScStyleSheetPool* pSrcPool,
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 9ffdd45..155dcf4 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -471,6 +471,7 @@ size_t ScOrcusSharedStrings::commit_segments()
 ScOrcusStyles::ScOrcusStyles(ScDocument& rDoc):
     mrDoc(rDoc)
 {
+    mrDoc.GetStyleSheetPool()->CreateStandardStyles();
 }
 
 ScOrcusStyles::font::font():
commit 83d36cb14b1ee016f78ccdd974050db3ba59cf58
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Tue Aug 26 15:14:41 2014 +0200

    import font underline
    
    Change-Id: I4857d9d49b9f6ef1b92a1d5f61f9f9e852620949

diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index 0e69882..2f84f3a 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -14,6 +14,7 @@
 #include "documentimport.hxx"
 
 #include <tools/color.hxx>
+#include <tools/fontenum.hxx>
 
 #include "sharedformulagroups.hxx"
 
@@ -167,6 +168,7 @@ private:
         OUString maName;
         double mnSize;
         Color maColor;
+        FontUnderline meUnderline;
 
         font();
 
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index d41d307..9ffdd45 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -24,6 +24,7 @@
 #include <editeng/postitem.hxx>
 #include <editeng/wghtitem.hxx>
 #include <editeng/colritem.hxx>
+#include <editeng/udlnitem.hxx>
 
 #include <formula/token.hxx>
 #include <tools/datetime.hxx>
@@ -475,7 +476,8 @@ ScOrcusStyles::ScOrcusStyles(ScDocument& rDoc):
 ScOrcusStyles::font::font():
     mbBold(false),
     mbItalic(false),
-    mnSize(10)
+    mnSize(10),
+    meUnderline(UNDERLINE_NONE)
 {
 }
 
@@ -488,6 +490,7 @@ void ScOrcusStyles::font::applyToItemSet(SfxItemSet& rSet) const
     rSet.Put(SvxWeightItem(eWeight, ATTR_FONT_WEIGHT));
 
     rSet.Put(SvxColorItem(maColor, ATTR_FONT_COLOR));
+    rSet.Put(SvxUnderlineItem(meUnderline, ATTR_FONT_UNDERLINE));
 }
 
 ScOrcusStyles::protection::protection():
@@ -583,8 +586,22 @@ void ScOrcusStyles::set_font_size(double point)
     maCurrentFont.mnSize = point;
 }
 
-void ScOrcusStyles::set_font_underline(orcus::spreadsheet::underline_t /*e*/)
+void ScOrcusStyles::set_font_underline(orcus::spreadsheet::underline_t e)
 {
+    switch(e)
+    {
+        case orcus::spreadsheet::underline_single:
+        case orcus::spreadsheet::underline_single_accounting:
+            maCurrentFont.meUnderline = UNDERLINE_SINGLE;
+            break;
+        case orcus::spreadsheet::underline_double:
+        case orcus::spreadsheet::underline_double_accounting:
+            maCurrentFont.meUnderline = UNDERLINE_DOUBLE;
+            break;
+        case orcus::spreadsheet::underline_none:
+            maCurrentFont.meUnderline = UNDERLINE_NONE;
+            break;
+    }
 }
 
 void ScOrcusStyles::set_font_color(orcus::spreadsheet::color_elem_t alpha,
commit 5305e3c95b5bb1b601be4bb212b94188053aacf7
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Sat Aug 23 15:25:05 2014 +0200

    next step on correct styles import from orcus
    
    Change-Id: I5d7487dee3120b2a74affe6b081d0c1ea338edc0

diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index f188f04..0e69882 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -31,6 +31,7 @@ class ScDocumentImport;
 class ScOrcusSheet;
 class ScOrcusFactory;
 class ScRangeData;
+class SfxItemSet;
 
 namespace com { namespace sun { namespace star { namespace task {
 
@@ -157,6 +158,7 @@ public:
 class ScOrcusStyles : public orcus::spreadsheet::iface::import_styles
 {
 private:
+    ScDocument& mrDoc;
 
     struct font
     {
@@ -167,6 +169,8 @@ private:
         Color maColor;
 
         font();
+
+        void applyToItemSet(SfxItemSet& rSet) const;
     };
 
     font maCurrentFont;
@@ -217,6 +221,7 @@ private:
         size_t mnBorderId;
         size_t mnProtectionId;
         size_t mnNumberFormatId;
+        size_t mnStyleXf;
 
         xf();
     };
@@ -236,7 +241,10 @@ private:
 
     cell_style maCurrentCellStyle;
 
+    void applyXfToItemSet(SfxItemSet& rSet, const xf& rXf);
+
 public:
+    ScOrcusStyles(ScDocument& rDoc);
     // font
 
     virtual void set_font_count(size_t n) SAL_OVERRIDE;
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index f82996e..d41d307 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -18,6 +18,12 @@
 #include "globstr.hrc"
 #include "compiler.hxx"
 #include "dbdata.hxx"
+#include "stlpool.hxx"
+#include "scitems.hxx"
+
+#include <editeng/postitem.hxx>
+#include <editeng/wghtitem.hxx>
+#include <editeng/colritem.hxx>
 
 #include <formula/token.hxx>
 #include <tools/datetime.hxx>
@@ -53,6 +59,7 @@ ScOrcusFactory::ScOrcusFactory(ScDocument& rDoc) :
     maDoc(rDoc),
     maGlobalSettings(maDoc),
     maSharedStrings(*this),
+    maStyles(rDoc),
     mnProgress(0) {}
 
 orcus::spreadsheet::iface::import_sheet* ScOrcusFactory::append_sheet(const char* sheet_name, size_t sheet_name_length)
@@ -460,6 +467,11 @@ size_t ScOrcusSharedStrings::commit_segments()
     return mrFactory.addString(OStringToOUString(aStr, RTL_TEXTENCODING_UTF8));
 }
 
+ScOrcusStyles::ScOrcusStyles(ScDocument& rDoc):
+    mrDoc(rDoc)
+{
+}
+
 ScOrcusStyles::font::font():
     mbBold(false),
     mbItalic(false),
@@ -467,6 +479,17 @@ ScOrcusStyles::font::font():
 {
 }
 
+void ScOrcusStyles::font::applyToItemSet(SfxItemSet& rSet) const
+{
+    FontItalic eItalic = mbItalic ? ITALIC_NORMAL : ITALIC_NONE;
+    rSet.Put(SvxPostureItem(eItalic, ATTR_FONT_POSTURE));
+
+    FontWeight eWeight = mbBold ? WEIGHT_BOLD : WEIGHT_NORMAL;
+    rSet.Put(SvxWeightItem(eWeight, ATTR_FONT_WEIGHT));
+
+    rSet.Put(SvxColorItem(maColor, ATTR_FONT_COLOR));
+}
+
 ScOrcusStyles::protection::protection():
     mbHidden(false),
     mbLocked(false)
@@ -482,7 +505,8 @@ ScOrcusStyles::xf::xf():
     mnFillId(0),
     mnBorderId(0),
     mnProtectionId(0),
-    mnNumberFormatId(0)
+    mnNumberFormatId(0),
+    mnStyleXf(0)
 {
 }
 
@@ -492,6 +516,47 @@ ScOrcusStyles::cell_style::cell_style():
 {
 }
 
+void ScOrcusStyles::applyXfToItemSet(SfxItemSet& rSet, const xf& rXf)
+{
+    size_t nFontId = rXf.mnFontId;
+    if (nFontId >= maFonts.size())
+    {
+        SAL_WARN("sc.orcus.styles", "invalid font id");
+        return;
+    }
+
+    const font& rFont = maFonts[nFontId];
+    rFont.applyToItemSet(rSet);
+
+    size_t nFillId = rXf.mnFillId;
+    if (nFillId >= maFills.size())
+    {
+        SAL_WARN("sc.orcus.styles", "invalid fill id");
+        return;
+    }
+
+    size_t nBorderId = rXf.mnBorderId;
+    if (nBorderId >= maBorders.size())
+    {
+        SAL_WARN("sc.orcus.styles", "invalid border id");
+        return;
+    }
+
+    size_t nProtectionId = rXf.mnProtectionId;
+    if (nProtectionId >= maProtections.size())
+    {
+        SAL_WARN("sc.orcus.styles", "invalid protection id");
+        return;
+    }
+
+    size_t nNumberFormatId = rXf.mnNumberFormatId;
+    if (nNumberFormatId >= maNumberFormats.size())
+    {
+        SAL_WARN("sc.orcus.styles", "invalid number format id");
+        return;
+    }
+}
+
 void ScOrcusStyles::set_font_count(size_t /*n*/)
 {
     // needed at all?
@@ -532,6 +597,7 @@ void ScOrcusStyles::set_font_color(orcus::spreadsheet::color_elem_t alpha,
 
 size_t ScOrcusStyles::commit_font()
 {
+    SAL_INFO("sc.orcus.style", "commit font");
     maFonts.push_back(maCurrentFont);
     return maFonts.size() - 1;
 }
@@ -557,6 +623,7 @@ void ScOrcusStyles::set_fill_bg_color(orcus::spreadsheet::color_elem_t /*alpha*/
 
 size_t ScOrcusStyles::commit_fill()
 {
+    SAL_INFO("sc.orcus.style", "commit fill");
     return 0;
 }
 
@@ -583,6 +650,7 @@ void ScOrcusStyles::set_border_color(orcus::spreadsheet::border_direction_t /*di
 
 size_t ScOrcusStyles::commit_border()
 {
+    SAL_INFO("sc.orcus.styles", "commit border");
     return 0;
 }
 
@@ -599,6 +667,7 @@ void ScOrcusStyles::set_cell_locked(bool b)
 
 size_t ScOrcusStyles::commit_cell_protection()
 {
+    SAL_INFO("sc.orcus.styles", "commit cell protection");
     maProtections.push_back(maCurrentProtection);
     return maProtections.size() - 1;
 }
@@ -619,6 +688,7 @@ void ScOrcusStyles::set_number_format_code(const char* s, size_t n)
 
 size_t ScOrcusStyles::commit_number_format()
 {
+    SAL_INFO("sc.orcus.styles", "commit number format");
     maNumberFormats.push_back(maCurrentNumberFormat);
     return maNumberFormats.size() - 1;
 }
@@ -632,6 +702,7 @@ void ScOrcusStyles::set_cell_style_xf_count(size_t /*n*/)
 
 size_t ScOrcusStyles::commit_cell_style_xf()
 {
+    SAL_INFO("sc.orcus.styles", "commit cell style xf");
     maCellStyleXfs.push_back(maCurrentXF);
     return maCellStyleXfs.size() - 1;
 }
@@ -645,6 +716,7 @@ void ScOrcusStyles::set_cell_xf_count(size_t /*n*/)
 
 size_t ScOrcusStyles::commit_cell_xf()
 {
+    SAL_INFO("sc.orcus.styles", "commit cell xf");
     maCellXfs.push_back(maCurrentXF);
     return maCellXfs.size() - 1;
 }
@@ -676,8 +748,9 @@ void ScOrcusStyles::set_xf_protection(size_t index)
     maCurrentXF.mnProtectionId = index;
 }
 
-void ScOrcusStyles::set_xf_style_xf(size_t /*index*/)
+void ScOrcusStyles::set_xf_style_xf(size_t index)
 {
+    maCurrentXF.mnStyleXf = index;
 }
 
 void ScOrcusStyles::set_xf_apply_alignment(bool /*b*/)
@@ -719,6 +792,20 @@ void ScOrcusStyles::set_cell_style_builtin(size_t index)
 
 size_t ScOrcusStyles::commit_cell_style()
 {
+    SAL_INFO("sc.orcus.styles", "commit cell styles");
+    if (maCurrentCellStyle.mnXFId >= maCellStyleXfs.size())
+    {
+        SAL_WARN("sc.orcus.styles", "invalid xf id for commit cell style");
+        return 0;
+    }
+
+    ScStyleSheetPool* pPool = mrDoc.GetStyleSheetPool();
+    SfxStyleSheetBase& rBase = pPool->Make(maCurrentCellStyle.maName, SFX_STYLE_FAMILY_PARA);
+    SfxItemSet& rSet = rBase.GetItemSet();
+
+    xf& rXf = maCellStyleXfs[maCurrentCellStyle.mnXFId];
+    applyXfToItemSet(rSet, rXf);
+
     return 0;
 }
 
commit f69f358a20b17194a1d043c9385d012608b19933
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Sat Aug 23 15:24:04 2014 +0200

    import font color correctly
    
    Change-Id: I7996da193d24e81a625070ddfc7d17311af38774

diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 875f47c3..f82996e 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -522,11 +522,12 @@ void ScOrcusStyles::set_font_underline(orcus::spreadsheet::underline_t /*e*/)
 {
 }
 
-void ScOrcusStyles::set_font_color(orcus::spreadsheet::color_elem_t,
-            orcus::spreadsheet::color_elem_t,
-            orcus::spreadsheet::color_elem_t,
-            orcus::spreadsheet::color_elem_t)
+void ScOrcusStyles::set_font_color(orcus::spreadsheet::color_elem_t alpha,
+            orcus::spreadsheet::color_elem_t red,
+            orcus::spreadsheet::color_elem_t green,
+            orcus::spreadsheet::color_elem_t blue)
 {
+    maCurrentFont.maColor = Color(alpha, red, green, blue);
 }
 
 size_t ScOrcusStyles::commit_font()
commit 5c18a077ba7150c3bca82d3990b59f68442c315a
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Fri Aug 22 11:22:03 2014 +0200

    remove crazy whitespaces
    
    Change-Id: Ia104e5dedbaf19dff5b0eaf4eb6f4c355570cc00

diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 4e46c53..f24f8b3 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -1079,9 +1079,9 @@ bool LoadEnv::impl_loadContent()
     // So we prevent our code against wrong using. Why?
     // It could be, that using of this progress could make trouble. e.g. He make window visible ...
     // but shouldn't do that. But if no indicator is available ... nobody has a chance to do that!
-    bool                                           bHidden    = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_HIDDEN()         , sal_False                                           );
-    bool                                           bMinimized = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_MINIMIZED()      , sal_False                                           );
-    bool                                           bPreview   = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_PREVIEW()        , sal_False                                           );
+    bool bHidden    = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_HIDDEN(), sal_False);
+    bool bMinimized = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_MINIMIZED(), sal_False);
+    bool bPreview   = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_PREVIEW(), sal_False);
     css::uno::Reference< css::task::XStatusIndicator > xProgress  = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_STATUSINDICATOR(), css::uno::Reference< css::task::XStatusIndicator >());
 
     if (!bHidden && !bMinimized && !bPreview && !xProgress.is())
commit dc1964251105dbe74803b362c0f4af85af4a05be
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Fri Aug 22 11:21:44 2014 +0200

    make experimental orcus import work again
    
    Change-Id: I2e599331669c3018557835ab227395c54c247ac9

diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index f73754d..4e46c53 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -762,6 +762,7 @@ void LoadEnv::impl_detectTypeAndFilter()
         m_lMediaDescriptor[utl::MediaDescriptor::PROP_TYPENAME()] <<= sType;
         m_lMediaDescriptor[utl::MediaDescriptor::PROP_FILTERNAME()] <<= sFilter;
         m_lMediaDescriptor[utl::MediaDescriptor::PROP_FILTERPROVIDER()] <<= OUString("orcus");
+        m_lMediaDescriptor[utl::MediaDescriptor::PROP_DOCUMENTSERVICE()] <<= OUString("com.sun.star.sheet.SpreadsheetDocument");
         return;
     }
 
commit faaee5f4340524ebfab8708a1491439607d9b4ac
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Fri Aug 22 09:03:42 2014 +0200

    tep for correct styles import from orcus
    
    Change-Id: Ifdd4686b5fd8a00dbe8ff74400a909697895e30b

diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index 5ce55e6..f188f04 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -13,6 +13,8 @@
 #include "address.hxx"
 #include "documentimport.hxx"
 
+#include <tools/color.hxx>
+
 #include "sharedformulagroups.hxx"
 
 #include <rtl/strbuf.hxx>
@@ -23,6 +25,7 @@
 #include <boost/ptr_container/ptr_vector.hpp>
 #include <map>
 #include <unordered_map>
+#include <vector>
 
 class ScDocumentImport;
 class ScOrcusSheet;
@@ -153,6 +156,85 @@ public:
 
 class ScOrcusStyles : public orcus::spreadsheet::iface::import_styles
 {
+private:
+
+    struct font
+    {
+        bool mbBold;
+        bool mbItalic;
+        OUString maName;
+        double mnSize;
+        Color maColor;
+
+        font();
+    };
+
+    font maCurrentFont;
+    std::vector<font> maFonts;
+
+    struct fill
+    {
+        OUString maPattern;
+        Color maFgColor;
+        Color maBgColor;
+    };
+
+    fill maCurrentFill;
+    std::vector<fill> maFills;
+
+    struct border
+    {
+
+        border();
+    };
+
+    border maCurrentBorder;
+    std::vector<border> maBorders;
+
+    struct protection
+    {
+        bool mbHidden;
+        bool mbLocked;
+
+        protection();
+    };
+
+    protection maCurrentProtection;
+    std::vector<protection> maProtections;
+
+    struct number_format
+    {
+        OUString maCode;
+    };
+
+    number_format maCurrentNumberFormat;
+    std::vector<number_format> maNumberFormats;
+
+    struct xf
+    {
+        size_t mnFontId;
+        size_t mnFillId;
+        size_t mnBorderId;
+        size_t mnProtectionId;
+        size_t mnNumberFormatId;
+
+        xf();
+    };
+
+    xf maCurrentXF;
+    std::vector<xf> maCellStyleXfs;
+    std::vector<xf> maCellXfs;
+
+    struct cell_style
+    {
+        OUString maName;
+        size_t mnXFId;
+        size_t mnBuiltInId;
+
+        cell_style();
+    };
+
+    cell_style maCurrentCellStyle;
 
 public:
     // font
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index a532029..875f47c3 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -460,25 +460,62 @@ size_t ScOrcusSharedStrings::commit_segments()
     return mrFactory.addString(OStringToOUString(aStr, RTL_TEXTENCODING_UTF8));
 }
 
+ScOrcusStyles::font::font():
+    mbBold(false),
+    mbItalic(false),
+    mnSize(10)
+{
+}
+
+ScOrcusStyles::protection::protection():
+    mbHidden(false),
+    mbLocked(false)
+{
+}
+
+ScOrcusStyles::border::border()
+{
+}
+
+ScOrcusStyles::xf::xf():
+    mnFontId(0),
+    mnFillId(0),
+    mnBorderId(0),
+    mnProtectionId(0),
+    mnNumberFormatId(0)
+{
+}
+
+ScOrcusStyles::cell_style::cell_style():
+    mnXFId(0),
+    mnBuiltInId(0)
+{
+}
+
 void ScOrcusStyles::set_font_count(size_t /*n*/)
 {
     // needed at all?
 }
 
-void ScOrcusStyles::set_font_bold(bool /*b*/)
+void ScOrcusStyles::set_font_bold(bool b)
 {
+    maCurrentFont.mbBold = b;
 }
 
-void ScOrcusStyles::set_font_italic(bool /*b*/)
+void ScOrcusStyles::set_font_italic(bool b)
 {
+    maCurrentFont.mbItalic = b;
 }
 
-void ScOrcusStyles::set_font_name(const char* /*s*/, size_t /*n*/)
+void ScOrcusStyles::set_font_name(const char* s, size_t n)
 {
+    OUString aName(s, n, RTL_TEXTENCODING_UTF8);
+    maCurrentFont.maName = aName;
 }
 
-void ScOrcusStyles::set_font_size(double /*point*/)
+void ScOrcusStyles::set_font_size(double point)
 {
+    maCurrentFont.mnSize = point;
 }
 
 void ScOrcusStyles::set_font_underline(orcus::spreadsheet::underline_t /*e*/)
@@ -494,7 +531,8 @@ void ScOrcusStyles::set_font_color(orcus::spreadsheet::color_elem_t,
 
 size_t ScOrcusStyles::commit_font()
 {
-    return 0;
+    maFonts.push_back(maCurrentFont);
+    return maFonts.size() - 1;
 }
 
 // fill
@@ -548,17 +586,20 @@ size_t ScOrcusStyles::commit_border()
 }
 
 // cell protection
-void ScOrcusStyles::set_cell_hidden(bool /*b*/)
+void ScOrcusStyles::set_cell_hidden(bool b)
 {
+    maCurrentProtection.mbHidden = b;
 }
 
-void ScOrcusStyles::set_cell_locked(bool /*b*/)
+void ScOrcusStyles::set_cell_locked(bool b)
 {
+    maCurrentProtection.mbLocked = b;
 }
 
 size_t ScOrcusStyles::commit_cell_protection()
 {
-    return 0;
+    maProtections.push_back(maCurrentProtection);
+    return maProtections.size() - 1;
 }
 
 void ScOrcusStyles::set_number_format_count(size_t)
@@ -569,13 +610,16 @@ void ScOrcusStyles::set_number_format_identifier(size_t)
 {
 }
 
-void ScOrcusStyles::set_number_format_code(const char* /*s*/, size_t /*n*/)
+void ScOrcusStyles::set_number_format_code(const char* s, size_t n)
 {
+    OUString aCode(s, n, RTL_TEXTENCODING_UTF8);
+    maCurrentNumberFormat.maCode = aCode;
 }
 
 size_t ScOrcusStyles::commit_number_format()
 {
-    return 0;
+    maNumberFormats.push_back(maCurrentNumberFormat);
+    return maNumberFormats.size() - 1;
 }
 
 // cell style xf
@@ -587,7 +631,8 @@ void ScOrcusStyles::set_cell_style_xf_count(size_t /*n*/)
 
 size_t ScOrcusStyles::commit_cell_style_xf()
 {
-    return 0;
+    maCellStyleXfs.push_back(maCurrentXF);
+    return maCellStyleXfs.size() - 1;
 }
 
 // cell xf
@@ -599,30 +644,35 @@ void ScOrcusStyles::set_cell_xf_count(size_t /*n*/)
 
 size_t ScOrcusStyles::commit_cell_xf()
 {
-    return 0;
+    maCellXfs.push_back(maCurrentXF);
+    return maCellXfs.size() - 1;
 }
 
 // xf (cell format) - used both by cell xf and cell style xf.
 
-void ScOrcusStyles::set_xf_number_format(size_t /*index*/)
+void ScOrcusStyles::set_xf_number_format(size_t index)
 {
-    // no number format interfaces implemented yet
+    maCurrentXF.mnNumberFormatId = index;
 }
 
-void ScOrcusStyles::set_xf_font(size_t /*index*/)
+void ScOrcusStyles::set_xf_font(size_t index)
 {
+    maCurrentXF.mnFontId = index;
 }
 
-void ScOrcusStyles::set_xf_fill(size_t /*index*/)
+void ScOrcusStyles::set_xf_fill(size_t index)
 {
+    maCurrentXF.mnFillId = index;
 }
 
-void ScOrcusStyles::set_xf_border(size_t /*index*/)
+void ScOrcusStyles::set_xf_border(size_t index)
 {
+    maCurrentXF.mnBorderId = index;
 }
 
-void ScOrcusStyles::set_xf_protection(size_t /*index*/)
+void ScOrcusStyles::set_xf_protection(size_t index)
 {
+    maCurrentXF.mnProtectionId = index;
 }
 
 void ScOrcusStyles::set_xf_style_xf(size_t /*index*/)
@@ -649,17 +699,21 @@ void ScOrcusStyles::set_cell_style_count(size_t /*n*/)
     // needed at all?
 }
 
-void ScOrcusStyles::set_cell_style_name(const char* /*s*/, size_t /*n*/)
+void ScOrcusStyles::set_cell_style_name(const char* s, size_t n)
 {
+    OUString aName(s, n, RTL_TEXTENCODING_UTF8);
+    maCurrentCellStyle.maName = aName;
 }
 
-void ScOrcusStyles::set_cell_style_xf(size_t /*index*/)
+void ScOrcusStyles::set_cell_style_xf(size_t index)
 {
+    maCurrentCellStyle.mnXFId = index;
 }
 
-void ScOrcusStyles::set_cell_style_builtin(size_t /*index*/)
+void ScOrcusStyles::set_cell_style_builtin(size_t index)
 {
     // not needed for gnumeric
+    maCurrentCellStyle.mnBuiltInId = index;
 }
 
 size_t ScOrcusStyles::commit_cell_style()
commit 6c5cb1d3ce2e69f6bce96997c0115e00765a17f9
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Fri Aug 22 09:03:30 2014 +0200

    parse the range for autofilter
    
    Change-Id: Ia47e42db3a66a8d620803468182e8b9d3465b8e4

diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index e1138da..5ce55e6 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -92,6 +92,8 @@ public:
 
 private:
     ScDocument& mrDoc;
+
+    ScRange maRange;
 };
 
 class ScOrcusSheet : public orcus::spreadsheet::iface::import_sheet
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index f79efc2..a532029 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -683,6 +683,8 @@ void ScOrcusAutoFilter::set_range(const char* p_ref, size_t n_ref)
 {
     OUString aRange(p_ref, n_ref, RTL_TEXTENCODING_UTF8);
     SAL_INFO("sc.orcus.autofilter", "set_range: " << aRange);
+
+    maRange.Parse(aRange);
 }
 
 void ScOrcusAutoFilter::set_column(orcus::spreadsheet::col_t col)
commit d4cc0442655d28a259d5129c95cbd7d4befb5c73
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Tue Aug 19 17:31:02 2014 +0200

    import table as ScDBData
    
    Change-Id: Ibce6247b19ca7c0788743baba24d07722500efd0

diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index 0fdde68..e1138da 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -284,6 +284,9 @@ private:
     ScDocument& mrDoc;
     ScOrcusAutoFilter maAutoFilter;
 
+    ScRange maRange;
+    OUString maName;
+
 public:
     ScOrcusTable(SCTAB nTab, ScDocument& rDoc);
     virtual ~ScOrcusTable();
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 7399b87..f79efc2 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -17,6 +17,7 @@
 #include "docoptio.hxx"
 #include "globstr.hrc"
 #include "compiler.hxx"
+#include "dbdata.hxx"
 
 #include <formula/token.hxx>
 #include <tools/datetime.hxx>
@@ -726,10 +727,30 @@ void ScOrcusTable::set_identifier(size_t id)
     SAL_INFO("sc.orcus.table", "set_identifier :" << id);
 }
 
+namespace {
+
+std::ostream& operator<<(std::ostream& rStrm, const ScAddress& rAddr)
+{
+    rStrm << "Col: " << rAddr.Col() << ", Row: " << rAddr.Row() << ", Tab: " << rAddr.Tab();
+    return rStrm;
+}
+
+std::ostream& operator<<(std::ostream& rStrm, const ScRange& rRange)
+{
+    rStrm << "aStart: " << rRange.aStart << std::endl;
+    rStrm << "aEnd: " << rRange.aEnd;
+    return rStrm;
+}
+
+}
+
 void ScOrcusTable::set_range(const char* p_ref, size_t n_ref)
 {
     OUString aRange(p_ref, n_ref, RTL_TEXTENCODING_UTF8);
     SAL_INFO("sc.orcus.table", "set_range: " << aRange);
+
+    maRange.Parse(aRange);
+    SAL_INFO("sc.orcus.table", "set_range translated range: " << maRange);
 }
 
 void ScOrcusTable::set_totals_row_count(size_t row_count)
@@ -739,8 +760,8 @@ void ScOrcusTable::set_totals_row_count(size_t row_count)
 
 void ScOrcusTable::set_name(const char* p, size_t n)
 {
-    OUString aName(p, n, RTL_TEXTENCODING_UTF8);
-    SAL_INFO("sc.orcus.table", "set_name: " << aName);
+    maName = OUString(p, n, RTL_TEXTENCODING_UTF8);
+    SAL_INFO("sc.orcus.table", "set_name: " << maName);
 }
 
 void ScOrcusTable::set_display_name(const char* p, size_t n)
@@ -810,6 +831,13 @@ void ScOrcusTable::set_style_show_column_stripes(bool b)
 void ScOrcusTable::commit()
 {
     SAL_INFO("sc.orcus.table", "commit");
+
+    ScDBData* pDBData = new ScDBData(maName, mnTab,
+                        maRange.aStart.Col(), maRange.aStart.Row(),
+                        maRange.aEnd.Col(), maRange.aEnd.Row());
+
+    if(!mrDoc.GetDBCollection()->getNamedDBs().insert(pDBData))
+        delete pDBData;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 2251ba580ba093bdea831ebd38dad2c2bda1db64
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Tue Aug 19 14:56:01 2014 +0200

    add autofilter to table import
    
    Change-Id: Ifde0871a1769fd7890a71381dd90955e500b5cb2

diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index 251513f..0fdde68 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -281,9 +281,11 @@ class ScOrcusTable : public orcus::spreadsheet::iface::import_table
 {
 private:
     SCTAB mnTab;
+    ScDocument& mrDoc;
+    ScOrcusAutoFilter maAutoFilter;
 
 public:
-    ScOrcusTable(SCTAB nTab);
+    ScOrcusTable(SCTAB nTab, ScDocument& rDoc);
     virtual ~ScOrcusTable();
 
     virtual orcus::spreadsheet::iface::import_auto_filter* get_auto_filter() SAL_OVERRIDE;
diff --git a/sc/source/filter/oox/worksheetfragment.cxx b/sc/source/filter/oox/worksheetfragment.cxx
index 6e96e0f..feae634 100644
--- a/sc/source/filter/oox/worksheetfragment.cxx
+++ b/sc/source/filter/oox/worksheetfragment.cxx
@@ -210,7 +210,7 @@ WorksheetFragment::WorksheetFragment( const WorksheetHelper& rHelper, const OUSt
             nRead = xStream->readBytes(aData, 8000);
             aString.append(OString((char*) aData.getConstArray(), nRead));
         } while(nRead == 8000);
-        ScOrcusTable aTable(getSheetIndex());
+        ScOrcusTable aTable(getSheetIndex(), getScDocument());
         orcus::import_xlsx::read_table(aString.getStr(), aString.getLength(), &aTable);
     }
 
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 03c3a38..7399b87 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -215,11 +215,6 @@ void ScOrcusSheet::cellInserted()
     }
 }
 
-os::iface::import_table* ScOrcusSheet::get_table()
-{
-    return NULL;
-}
-
 void ScOrcusSheet::set_auto(os::row_t row, os::col_t col, const char* p, size_t n)
 {
     OUString aVal(p, n, RTL_TEXTENCODING_UTF8);
@@ -710,8 +705,10 @@ void ScOrcusAutoFilter::commit()
     SAL_INFO("sc.orcus.autofilter", "commit");
 }
 
-ScOrcusTable::ScOrcusTable(SCTAB nTab):
-    mnTab(nTab)
+ScOrcusTable::ScOrcusTable(SCTAB nTab, ScDocument& rDoc):
+    mnTab(nTab),
+    mrDoc(rDoc),
+    maAutoFilter(rDoc)
 {
 }
 
@@ -721,7 +718,7 @@ ScOrcusTable::~ScOrcusTable()
 
 os::iface::import_auto_filter* ScOrcusTable::get_auto_filter()
 {
-    return NULL;
+    return &maAutoFilter;
 }
 
 void ScOrcusTable::set_identifier(size_t id)
commit 490a3d6384c0acf565e94344fae754e5af0db9e1
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Mon Aug 18 07:56:31 2014 +0200

    add more orcus debug output
    
    Change-Id: I6f9135d0532026dffbb43c3b32d32cfc811a5823

diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 8aa1329..03c3a38 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -683,24 +683,31 @@ ScOrcusAutoFilter::~ScOrcusAutoFilter()
 {
 }
 
-void ScOrcusAutoFilter::set_range(const char* /*p_ref*/, size_t /*n_ref*/)
+void ScOrcusAutoFilter::set_range(const char* p_ref, size_t n_ref)
 {
+    OUString aRange(p_ref, n_ref, RTL_TEXTENCODING_UTF8);
+    SAL_INFO("sc.orcus.autofilter", "set_range: " << aRange);
 }
 
-void ScOrcusAutoFilter::set_column(orcus::spreadsheet::col_t /*col*/)
+void ScOrcusAutoFilter::set_column(orcus::spreadsheet::col_t col)
 {
+    SAL_INFO("sc.orcus.autofilter", "set_column: " << col);
 }
 
-void ScOrcusAutoFilter::append_column_match_value(const char* /*p*/, size_t /*n*/)
+void ScOrcusAutoFilter::append_column_match_value(const char* p, size_t n)
 {
+    OUString aString(p, n, RTL_TEXTENCODING_UTF8);
+    SAL_INFO("sc.orcus.autofilter", "append_column_match_value: " << aString);
 }
 
 void ScOrcusAutoFilter::commit_column()
 {
+    SAL_INFO("sc.orcus.autofilter", "commit column");
 }
 
 void ScOrcusAutoFilter::commit()
 {
+    SAL_INFO("sc.orcus.autofilter", "commit");
 }
 
 ScOrcusTable::ScOrcusTable(SCTAB nTab):
commit cd41f5299cbfc638521b9d12af9117528c61dc15
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Mon Aug 18 07:51:05 2014 +0200

    add ScOrcusSheet::get_table method
    
    Change-Id: I2369e29e96cf33dbe263b090dee0d1100ecce8de

diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index e2a10a2..8aa1329 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -215,6 +215,11 @@ void ScOrcusSheet::cellInserted()
     }
 }
 
+os::iface::import_table* ScOrcusSheet::get_table()
+{
+    return NULL;
+}
+
 void ScOrcusSheet::set_auto(os::row_t row, os::col_t col, const char* p, size_t n)
 {
     OUString aVal(p, n, RTL_TEXTENCODING_UTF8);
commit cccb58855d5093dee32f125df8dda8bbc94aa343
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Mon Aug 18 02:01:58 2014 +0200

    use orcus for table import
    
    This is a proof of concept and shows that it is possible to partially
    replace the OOXML import with orcus.
    
    Change-Id: I610cec4ba4ec6f966848397ec9f0c465520a3c65

diff --git a/sc/source/filter/oox/worksheetfragment.cxx b/sc/source/filter/oox/worksheetfragment.cxx
index 666550f..6e96e0f 100644
--- a/sc/source/filter/oox/worksheetfragment.cxx
+++ b/sc/source/filter/oox/worksheetfragment.cxx
@@ -44,11 +44,15 @@
 #include "workbooksettings.hxx"
 #include "worksheetsettings.hxx"
 
+#include "orcusinterface.hxx"
+#include <orcus/orcus_import_xlsx.hpp>
+
 namespace oox {
 namespace xls {
 
 using namespace ::com::sun::star::table;
 using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star;
 using namespace ::oox::core;
 
 namespace {
@@ -196,7 +200,19 @@ WorksheetFragment::WorksheetFragment( const WorksheetHelper& rHelper, const OUSt
     // import data tables related to this worksheet
     RelationsRef xTableRels = getRelations().getRelationsFromTypeFromOfficeDoc( "table" );
     for( ::std::map< OUString, Relation >::const_iterator aIt = xTableRels->begin(), aEnd = xTableRels->end(); aIt != aEnd; ++aIt )
-        importOoxFragment( new TableFragment( *this, getFragmentPathFromRelation( aIt->second ) ) );
+    {
+        OUString aFragmentPath = getFragmentPathFromRelation( aIt->second );
+        uno::Reference<io::XInputStream> xStream = rHelper.getBaseFilter().openInputStream(aFragmentPath);
+        uno::Sequence<sal_Int8> aData(8000);
+        sal_Int32 nRead = 0;
+        OStringBuffer aString;
+        do {
+            nRead = xStream->readBytes(aData, 8000);
+            aString.append(OString((char*) aData.getConstArray(), nRead));
+        } while(nRead == 8000);
+        ScOrcusTable aTable(getSheetIndex());
+        orcus::import_xlsx::read_table(aString.getStr(), aString.getLength(), &aTable);
+    }
 
     // import comments related to this worksheet
     OUString aCommentsFragmentPath = getFragmentPathFromFirstTypeFromOfficeDoc( "comments" );
commit 3ffac303c73d4ca3fbf32d93d2b5efabeb037b4b
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Mon Aug 18 01:36:43 2014 +0200

    make these types future proof
    
    Our core already supports more than 32k sheets and we should not use
    sal_Int16 anymore for sheets.
    
    Change-Id: Ifeb321cba044b255ef2e7d34da0908c27877d6ae

diff --git a/sc/source/filter/inc/worksheethelper.hxx b/sc/source/filter/inc/worksheethelper.hxx
index 27bb7e3..22b4c0c 100644
--- a/sc/source/filter/inc/worksheethelper.hxx
+++ b/sc/source/filter/inc/worksheethelper.hxx
@@ -193,7 +193,7 @@ public:
     /** Returns the type of this sheet. */
     WorksheetType       getSheetType() const;
     /** Returns the index of the current sheet. */
-    sal_Int16           getSheetIndex() const;
+    sal_Int32           getSheetIndex() const;
     /** Returns the XSpreadsheet interface of the current sheet. */
     const ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheet >&
                         getSheet() const;
diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx
index aaa45a9..3f0b584 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -218,7 +218,7 @@ public:
     /** Returns the type of this sheet. */
     inline WorksheetType getSheetType() const { return meSheetType; }
     /** Returns the index of the current sheet. */
-    inline sal_Int16    getSheetIndex() const { return maUsedArea.Sheet; }
+    inline sal_Int32    getSheetIndex() const { return maUsedArea.Sheet; }
     /** Returns the XSpreadsheet interface of the current sheet. */
     inline const Reference< XSpreadsheet >& getSheet() const { return mxSheet; }
 
@@ -1386,7 +1386,7 @@ WorksheetType WorksheetHelper::getSheetType() const
     return mrSheetGlob.getSheetType();
 }
 
-sal_Int16 WorksheetHelper::getSheetIndex() const
+sal_Int32 WorksheetHelper::getSheetIndex() const
 {
     return mrSheetGlob.getSheetIndex();
 }
commit abd5e25b2863d829588cca098a35fbe483f3f6a4
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Mon Aug 18 00:16:03 2014 +0200

    implement orcus::spreadsheet::iface::import_table interface
    
    Just some stubs to check that it is working.
    
    Change-Id: I24e61cd24030ca5adeb07222fd63464d836ecb3d

diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index cc4d12c..251513f 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -277,5 +277,43 @@ public:
     void setStatusIndicator(const com::sun::star::uno::Reference<com::sun::star::task::XStatusIndicator>& rIndicator);
 };
 
+class ScOrcusTable : public orcus::spreadsheet::iface::import_table
+{
+private:
+    SCTAB mnTab;
+
+public:
+    ScOrcusTable(SCTAB nTab);
+    virtual ~ScOrcusTable();
+
+    virtual orcus::spreadsheet::iface::import_auto_filter* get_auto_filter() SAL_OVERRIDE;
+
+    virtual void set_identifier(size_t id) SAL_OVERRIDE;
+
+    virtual void set_range(const char* p_ref, size_t n_ref) SAL_OVERRIDE;
+
+    virtual void set_totals_row_count(size_t row_count) SAL_OVERRIDE;
+
+    virtual void set_name(const char* p, size_t n) SAL_OVERRIDE;
+
+    virtual void set_display_name(const char* p, size_t n) SAL_OVERRIDE;
+
+    virtual void set_column_count(size_t n) SAL_OVERRIDE;
+
+    virtual void set_column_identifier(size_t id) SAL_OVERRIDE;
+    virtual void set_column_name(const char* p, size_t n) SAL_OVERRIDE;
+    virtual void set_column_totals_row_label(const char* p, size_t n) SAL_OVERRIDE;
+    virtual void set_column_totals_row_function(orcus::spreadsheet::totals_row_function_t func) SAL_OVERRIDE;
+    virtual void commit_column() SAL_OVERRIDE;
+
+    virtual void set_style_name(const char* p, size_t n) SAL_OVERRIDE;
+    virtual void set_style_show_first_column(bool b) SAL_OVERRIDE;
+    virtual void set_style_show_last_column(bool b) SAL_OVERRIDE;
+    virtual void set_style_show_row_stripes(bool b) SAL_OVERRIDE;
+    virtual void set_style_show_column_stripes(bool b) SAL_OVERRIDE;
+
+    virtual void commit() SAL_OVERRIDE;
+};
+
 #endif
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 660512c..e2a10a2 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -698,4 +698,109 @@ void ScOrcusAutoFilter::commit()
 {
 }
 
+ScOrcusTable::ScOrcusTable(SCTAB nTab):
+    mnTab(nTab)
+{
+}
+
+ScOrcusTable::~ScOrcusTable()
+{
+}
+
+os::iface::import_auto_filter* ScOrcusTable::get_auto_filter()
+{
+    return NULL;
+}
+
+void ScOrcusTable::set_identifier(size_t id)
+{
+    SAL_INFO("sc.orcus.table", "set_identifier :" << id);
+}
+
+void ScOrcusTable::set_range(const char* p_ref, size_t n_ref)
+{
+    OUString aRange(p_ref, n_ref, RTL_TEXTENCODING_UTF8);
+    SAL_INFO("sc.orcus.table", "set_range: " << aRange);
+}
+
+void ScOrcusTable::set_totals_row_count(size_t row_count)
+{
+    SAL_INFO("sc.orcus.table", "set_totals_row_count: " << row_count);
+}
+
+void ScOrcusTable::set_name(const char* p, size_t n)
+{
+    OUString aName(p, n, RTL_TEXTENCODING_UTF8);
+    SAL_INFO("sc.orcus.table", "set_name: " << aName);
+}
+
+void ScOrcusTable::set_display_name(const char* p, size_t n)
+{
+    OUString aName(p, n, RTL_TEXTENCODING_UTF8);
+    SAL_INFO("sc.orcus.table", "set_display_name: " << aName);
+}
+
+void ScOrcusTable::set_column_count(size_t n)
+{
+    SAL_INFO("sc.orcus.table", "set_column_count: " << n);
+}
+
+void ScOrcusTable::set_column_identifier(size_t id)
+{
+    SAL_INFO("sc.orcus.table", "set_column_identifier: " << id);
+}
+
+void ScOrcusTable::set_column_name(const char* p, size_t n)
+{
+    OUString aName(p, n, RTL_TEXTENCODING_UTF8);
+    SAL_INFO("sc.orcus.table", "set_column_name: " << aName);
+}
+
+void ScOrcusTable::set_column_totals_row_label(const char* p, size_t n)
+{
+    OUString aLabel(p, n, RTL_TEXTENCODING_UTF8);
+    SAL_INFO("sc.orcus.table", "set_column_totals_row_label: " << aLabel);
+}
+
+void ScOrcusTable::set_column_totals_row_function(os::totals_row_function_t )
+{
+    SAL_INFO("sc.orcus.table", "set_column_totals_row_function");
+}
+
+void ScOrcusTable::commit_column()
+{
+    SAL_INFO("sc.orcus.table", "commit_column");
+}
+
+void ScOrcusTable::set_style_name(const char* p, size_t n)
+{
+    OUString aName(p, n, RTL_TEXTENCODING_UTF8);
+    SAL_INFO("sc.orcus.table", "set_style_name: " << aName);
+}
+
+void ScOrcusTable::set_style_show_first_column(bool b)
+{
+    SAL_INFO("sc.orcus.table", "set_style_show_first_column: " << b);
+}
+
+void ScOrcusTable::set_style_show_last_column(bool b)
+{
+    SAL_INFO("sc.orcus.table", "set_style_show_last_column: " << b);
+}
+
+void ScOrcusTable::set_style_show_row_stripes(bool b)
+{
+    SAL_INFO("sc.orcus.table", "set_style_show_row_stripes: " << b);
+}
+
+void ScOrcusTable::set_style_show_column_stripes(bool b)
+{
+    SAL_INFO("sc.orcus.table", "set_style_show_column_stripes: " << b);
+}
+
+void ScOrcusTable::commit()
+{
+    SAL_INFO("sc.orcus.table", "commit");
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 84993c08be9ec2ab0104bd8cdb89341ecbc53ccf
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Sun Aug 17 09:47:28 2014 +0200

    make the code work against current orcus master
    
    Change-Id: I9840b3b2a2d01514ba7b15112e66c878b7b395b1

diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index a778310..cc4d12c 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -38,11 +38,14 @@ class XStatusIndicator;
 class ScOrcusGlobalSettings : public orcus::spreadsheet::iface::import_global_settings
 {
     ScDocumentImport& mrDoc;
+    orcus::spreadsheet::formula_grammar_t meGrammar;
 
 public:
     ScOrcusGlobalSettings(ScDocumentImport& rDoc);
 
     virtual void set_origin_date(int year, int month, int day) SAL_OVERRIDE;
+    virtual void set_default_formula_grammar(orcus::spreadsheet::formula_grammar_t) SAL_OVERRIDE;
+    virtual orcus::spreadsheet::formula_grammar_t get_default_formula_grammar() const SAL_OVERRIDE;
 };
 
 class ScOrcusSharedStrings : public orcus::spreadsheet::iface::import_shared_strings
@@ -123,6 +126,7 @@ public:
 
     virtual void set_formula(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, orcus::spreadsheet::formula_grammar_t grammar, const char* p, size_t n) SAL_OVERRIDE;
     virtual void set_formula_result(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, const char* p, size_t n) SAL_OVERRIDE;
+    virtual void set_formula_result(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, double value) SAL_OVERRIDE;
 
     virtual void set_shared_formula(
         orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, orcus::spreadsheet::formula_grammar_t grammar, size_t sindex,
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 3735f28..660512c 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -35,6 +35,16 @@ void ScOrcusGlobalSettings::set_origin_date(int year, int month, int day)
     mrDoc.setOriginDate(year, month, day);
 }
 
+void ScOrcusGlobalSettings::set_default_formula_grammar(os::formula_grammar_t eGrammar)
+{
+    meGrammar = eGrammar;
+}
+
+os::formula_grammar_t ScOrcusGlobalSettings::get_default_formula_grammar() const
+{
+    return meGrammar;
+}
+
 ScOrcusFactory::StringCellCache::StringCellCache(const ScAddress& rPos, size_t nIndex) :
     maPos(rPos), mnIndex(nIndex) {}
 
@@ -270,16 +280,18 @@ formula::FormulaGrammar::Grammar getCalcGrammarFromOrcus( os::formula_grammar_t
     formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_ODFF;
     switch(grammar)
     {
-        case orcus::spreadsheet::ods:
+        case orcus::spreadsheet::formula_grammar_ods:
             eGrammar = formula::FormulaGrammar::GRAM_ODFF;
             break;
-        case orcus::spreadsheet::xlsx_2007:
-        case orcus::spreadsheet::xlsx_2010:
+        case orcus::spreadsheet::formula_grammar_xlsx_2007:
+        case orcus::spreadsheet::formula_grammar_xlsx_2010:
             eGrammar = formula::FormulaGrammar::GRAM_OOXML;
             break;
-        case orcus::spreadsheet::gnumeric:
+        case orcus::spreadsheet::formula_grammar_gnumeric:
             eGrammar = formula::FormulaGrammar::GRAM_ENGLISH_XL_A1;
             break;
+        default:
+            break;
     }
 
     return eGrammar;
@@ -309,6 +321,18 @@ void ScOrcusSheet::set_formula_result(os::row_t row, os::col_t col, const char*
     pCell->SetHybridString(mrDoc.getDoc().GetSharedStringPool().intern(aResult));
 }
 
+void ScOrcusSheet::set_formula_result(os::row_t row, os::col_t col, double value)
+{
+    ScFormulaCell* pCell = mrDoc.getDoc().GetFormulaCell(ScAddress(col, row, mnTab));
+    if (!pCell)
+    {
+        SAL_WARN("sc", "trying to set formula result for non formula \
+                cell! Col: " << col << ";Row: " << row << ";Tab: " << mnTab);
+        return;
+    }
+    pCell->SetHybridDouble(value);
+}
+
 void ScOrcusSheet::set_shared_formula(
     os::row_t row, os::col_t col, os::formula_grammar_t grammar, size_t sindex,
     const char* p_formula, size_t n_formula)
commit b7d07699c8142e33f9d05d4e203b6fb567f36a9b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 9 16:44:07 2015 +0000

    asan: heap-buffer-overflow on ooo8726-1.doc
    
    Change-Id: I9fd7b873b6e64a6450c1bd946cd9bb08c293290a

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 6b8b9b4..62b9039 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -358,11 +358,12 @@ const wwSprmSearcher *wwSprmParser::GetWW6SprmSearcher()
         {108, { 0, L_VAR} }, // "sprmCMajority50" chp.fBold, chp.fItalic, ...
         {109, { 2, L_FIX} }, // "sprmCHpsMul" chp.hps percentage to grow hps
         {110, { 2, L_FIX} }, // "sprmCCondHyhen" chp.ysri ysri
-        {111, { 2, L_FIX} }, // rtl bold
-        {112, { 2, L_FIX} }, // rtl italic
-        {113, { 0, L_VAR} }, // rtl property ?
-        {115, { 0, L_VAR} }, // rtl property ?
-        {116, { 0, L_VAR} }, // unknown
+        {111, { 2, L_FIX} }, // ww7 font
+        {112, { 2, L_FIX} }, // ww7 CJK font
+        {113, { 2, L_FIX} }, // ww7 rtl font
+        {114, { 2, L_FIX} }, // ww7 lid
+        {115, { 2, L_FIX} }, // ww7 rtl colour ?
+        {116, { 2, L_FIX} }, // ww7 fontsize
         {117, { 1, L_FIX} }, // "sprmCFSpec" chp.fSpec  1 or 0 bit
         {118, { 1, L_FIX} }, // "sprmCFObj" chp.fObj 1 or 0 bit
         {119, { 1, L_FIX} }, // "sprmPicBrcl" pic.brcl brcl (see PIC definition)
commit 82f02d7248f5959409a9a90f936649d602905067
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 9 16:23:36 2015 +0000

    boost::scoped_ptr->std::unique_ptr
    
    Change-Id: I844532d08123ed0c91ccec73cc806277fd821089

diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx
index 22326a6..7912bf5 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -20,7 +20,6 @@
 #include <stdio.h>
 
 #include <avmedia/mediawindow.hxx>
-#include <boost/scoped_ptr.hpp>
 #include "mediawindow_impl.hxx"
 #include "mediamisc.hxx"
 #include "mediawindow.hrc"
@@ -34,6 +33,7 @@
 #include "com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp"
 #include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
 #include "com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp"
+#include <memory>
 
 #define AVMEDIA_FRAMEGRABBER_DEFAULTFRAME_MEDIATIME 3.0
 
@@ -404,7 +404,7 @@ uno::Reference< graphic::XGraphic > MediaWindow::grabFrame( const OUString& rURL
 {
     uno::Reference< media::XPlayer >    xPlayer( createPlayer( rURL, rReferer, &sMimeType ) );
     uno::Reference< graphic::XGraphic > xRet;
-    boost::scoped_ptr< Graphic > apGraphic;
+    std::unique_ptr< Graphic > xGraphic;
 
     if( xPlayer.is() )
     {
@@ -428,19 +428,19 @@ uno::Reference< graphic::XGraphic > MediaWindow::grabFrame( const OUString& rURL
             if( !aPrefSize.Width && !aPrefSize.Height )
             {
                 const BitmapEx aBmpEx( getAudioLogo() );
-                apGraphic.reset( new Graphic( aBmpEx ) );
+                xGraphic.reset( new Graphic( aBmpEx ) );
             }
         }
     }
 
-    if( !xRet.is() && !apGraphic.get() )
+    if( !xRet.is() && !xGraphic.get() )
     {
         const BitmapEx aBmpEx( getEmptyLogo() );
-        apGraphic.reset( new Graphic( aBmpEx ) );
+        xGraphic.reset( new Graphic( aBmpEx ) );
     }
 
-    if( apGraphic.get() )
-        xRet = apGraphic->GetXGraphic();
+    if( xGraphic.get() )
+        xRet = xGraphic->GetXGraphic();
 
     return xRet;
 }
diff --git a/avmedia/source/viewer/mediawindow_impl.hxx b/avmedia/source/viewer/mediawindow_impl.hxx
index ce2c24b..c5c65fa 100644
--- a/avmedia/source/viewer/mediawindow_impl.hxx
+++ b/avmedia/source/viewer/mediawindow_impl.hxx
@@ -173,7 +173,7 @@ namespace avmedia
             ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >   mxEventsIf;
             MediaEventListenersImpl*                                                mpEvents;
             bool                                                                    mbEventTransparent;
-            boost::scoped_ptr<MediaChildWindow>                                     mpChildWindow;
+            std::unique_ptr<MediaChildWindow>                                       mpChildWindow;
             MediaWindowControl*                                                     mpMediaWindowControl;
             BitmapEx*                                                               mpEmptyBmpEx;
             BitmapEx*                                                               mpAudioBmpEx;
diff --git a/avmedia/source/vlc/vlcmanager.hxx b/avmedia/source/vlc/vlcmanager.hxx
index 36eebce..f9b1a1c 100644
--- a/avmedia/source/vlc/vlcmanager.hxx
+++ b/avmedia/source/vlc/vlcmanager.hxx
@@ -19,10 +19,10 @@
 
 #ifndef INCLUDED_AVMEDIA_SOURCE_VLC_VLCMANAGER_HXX
 #define INCLUDED_AVMEDIA_SOURCE_VLC_VLCMANAGER_HXX
-#include <boost/scoped_ptr.hpp>
 #include <com/sun/star/media/XManager.hpp>
 #include "vlccommon.hxx"
 #include "wrapper/Wrapper.hxx"
+#include <memory>
 
 namespace avmedia {
 namespace vlc {
@@ -30,7 +30,7 @@ namespace vlc {
 class Manager : public ::cppu::WeakImplHelper2 < ::com::sun::star::media::XManager,
                                                     ::com::sun::star::lang::XServiceInfo >
 {
-    boost::scoped_ptr<wrapper::Instance> mInstance;
+    std::unique_ptr<wrapper::Instance> mInstance;
     wrapper::EventHandler mEventHandler;
 public:
     Manager( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMgr );
@@ -55,4 +55,4 @@ private:
 
 #endif
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/avmedia/mediaitem.hxx b/include/avmedia/mediaitem.hxx
index e3300b3..84cb424 100644
--- a/include/avmedia/mediaitem.hxx
+++ b/include/avmedia/mediaitem.hxx
@@ -20,14 +20,13 @@
 #ifndef INCLUDED_AVMEDIA_MEDIAITEM_HXX
 #define INCLUDED_AVMEDIA_MEDIAITEM_HXX
 
-#include <boost/scoped_ptr.hpp>
-
 #include <tools/rtti.hxx>
 #include <svl/poolitem.hxx>
 #include <com/sun/star/media/ZoomLevel.hpp>
 #include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/embed/XStorage.hpp>
 #include <avmedia/avmediadllapi.h>
+#include <memory>
 
 #define AVMEDIA_SETMASK_NONE        ((sal_uInt32)(0x00000000))
 #define AVMEDIA_SETMASK_STATE       ((sal_uInt32)(0x00000001))
@@ -120,7 +119,7 @@ public:
 private:
 
     struct Impl;
-    ::boost::scoped_ptr<Impl> m_pImpl;
+    std::unique_ptr<Impl> m_pImpl;
 };
 
 typedef ::avmedia::MediaItem avmedia_MediaItem;
diff --git a/include/avmedia/mediawindow.hxx b/include/avmedia/mediawindow.hxx
index 1ab2c05..71cf1fa 100644
--- a/include/avmedia/mediawindow.hxx
+++ b/include/avmedia/mediawindow.hxx
@@ -20,8 +20,8 @@
 #ifndef INCLUDED_AVMEDIA_MEDIAWINDOW_HXX
 #define INCLUDED_AVMEDIA_MEDIAWINDOW_HXX
 
+#include <memory>
 #include <vector>
-#include <boost/scoped_ptr.hpp>
 #include <tools/gen.hxx>
 #include <com/sun/star/media/ZoomLevel.hpp>
 #include <com/sun/star/media/XPlayer.hpp>
@@ -117,7 +117,7 @@ namespace avmedia
         AVMEDIA_DLLPRIVATE MediaWindow& operator =( const MediaWindow& );
 
         ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >   mxIFace;
-        boost::scoped_ptr<priv::MediaWindowImpl> mpImpl;
+        std::unique_ptr<priv::MediaWindowImpl> mpImpl;
     };
 }
 
diff --git a/include/basebmp/bitmapdevice.hxx b/include/basebmp/bitmapdevice.hxx
index 600eabe..48c6d47 100644
--- a/include/basebmp/bitmapdevice.hxx
+++ b/include/basebmp/bitmapdevice.hxx
@@ -25,11 +25,11 @@
 #include <basebmp/scanlineformats.hxx>
 #include <basebmp/basebmpdllapi.h>
 
-#include <boost/scoped_ptr.hpp>
 #include <boost/shared_ptr.hpp>
 #include <boost/shared_array.hpp>
 #include <boost/enable_shared_from_this.hpp>
 #include <boost/noncopyable.hpp>
+#include <memory>
 #include <vector>
 
 namespace basegfx
@@ -656,7 +656,7 @@ private:
 
     BitmapDeviceSharedPtr getGenericRenderer() const;
 
-    boost::scoped_ptr< ImplBitmapDevice > mpImpl;
+    std::unique_ptr< ImplBitmapDevice > mpImpl;
 };
 
 /** Function to create a BitmapDevice for given scanline format
commit 31498259bb801dee7bb2d7cb2b40162876116aa4
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Jan 9 16:42:09 2015 +0100

    loplugin:cstylecast: warn about certain redundant reinterpret_casts
    
    Change-Id: Iaa46849742c215798722d03d9ee59bb39d8033f7

diff --git a/binaryurp/source/unmarshal.cxx b/binaryurp/source/unmarshal.cxx
index d04c889..f34bfd3 100644
--- a/binaryurp/source/unmarshal.cxx
+++ b/binaryurp/source/unmarshal.cxx
@@ -465,7 +465,7 @@ BinaryAny Unmarshal::readSequence(css::uno::TypeDescription const & type) {
             static_cast< sal_Sequence * >(buf)->elements + i * ctd.get()->nSize,
             const_cast< void * >(as[i].getValue(ctd)), ctd.get(), 0);
     }
-    return BinaryAny(type, reinterpret_cast< sal_Sequence ** >(&buf));
+    return BinaryAny(type, &buf);
 }
 
 void Unmarshal::readMemberValues(
diff --git a/compilerplugins/clang/cstylecast.cxx b/compilerplugins/clang/cstylecast.cxx
index 53b7d88..4f8bd4b 100644
--- a/compilerplugins/clang/cstylecast.cxx
+++ b/compilerplugins/clang/cstylecast.cxx
@@ -47,6 +47,8 @@ public:
 
     bool VisitCStyleCastExpr(const CStyleCastExpr * expr);
 
+    bool VisitImplicitCastExpr(ImplicitCastExpr const * expr);
+
 private:
     bool externCFunction;
 };
@@ -136,6 +138,32 @@ bool CStyleCast::VisitCStyleCastExpr(const CStyleCastExpr * expr) {
     return true;
 }
 
+bool CStyleCast::VisitImplicitCastExpr(const ImplicitCastExpr * expr) {
+    if (ignoreLocation(expr) || expr->getCastKind() != CK_BitCast) {
+        return true;
+    }
+    QualType t = expr->getType();
+    if (!(t->isPointerType()
+          && t->getAs<PointerType>()->getPointeeType()->isVoidType()
+          && expr->getSubExpr()->getType()->isPointerType()))
+    {
+        return true;
+    }
+    Expr const * e = expr->getSubExpr()->IgnoreParenImpCasts();
+    while (isa<CXXConstCastExpr>(e)) {
+        e = dyn_cast<CXXConstCastExpr>(e)->getSubExpr()->IgnoreParenImpCasts();
+    }
+    if (isa<CXXReinterpretCastExpr>(e)) {
+        report(
+            DiagnosticsEngine::Warning,
+            ("redundant reinterpret_cast, result is implicitly cast to void"
+             " pointer"),
+            e->getExprLoc())
+            << e->getSourceRange();
+    }
+    return true;
+}
+
 loplugin::Plugin::Registration< CStyleCast > X("cstylecast");
 
 }
commit 97a8b3ed5e5bd42e213d3230fa764b0f5d10f0f2
Author: Eike Rathke <erack at redhat.com>
Date:   Fri Jan 9 13:53:27 2015 +0100

    Resolves: fdo#85617 always store fully encoded external document name
    
    Also OOXML calls these API functions, this is the central place to handle it.

diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index ce36197..bec0c4d 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -1709,7 +1709,8 @@ Reference< sheet::XExternalDocLink > SAL_CALL ScExternalDocLinksObj::addDocLink(
         throw (RuntimeException, std::exception)
 {
     SolarMutexGuard aGuard;
-    sal_uInt16 nFileId = mpRefMgr->getExternalFileId(aDocName);
+    OUString aDocUrl( ScGlobal::GetAbsDocName( aDocName, mpDocShell));
+    sal_uInt16 nFileId = mpRefMgr->getExternalFileId(aDocUrl);
     Reference< sheet::XExternalDocLink > aDocLink(new ScExternalDocLinkObj(mpDocShell, mpRefMgr, nFileId));
     return aDocLink;
 }
@@ -1718,10 +1719,11 @@ Any SAL_CALL ScExternalDocLinksObj::getByName(const OUString &aName)
         throw (container::NoSuchElementException, lang::WrappedTargetException, RuntimeException, std::exception)
 {
     SolarMutexGuard aGuard;
-    if (!mpRefMgr->hasExternalFile(aName))
+    OUString aDocUrl( ScGlobal::GetAbsDocName( aName, mpDocShell));
+    if (!mpRefMgr->hasExternalFile(aDocUrl))
         throw container::NoSuchElementException();
 
-    sal_uInt16 nFileId = mpRefMgr->getExternalFileId(aName);
+    sal_uInt16 nFileId = mpRefMgr->getExternalFileId(aDocUrl);
     Reference< sheet::XExternalDocLink > aDocLink(new ScExternalDocLinkObj(mpDocShell, mpRefMgr, nFileId));
 
     Any aAny;
commit b6339617b1cc3136f9e527acd0746d712cd21643
Author: Eike Rathke <erack at redhat.com>
Date:   Fri Jan 9 13:44:32 2015 +0100

    do not drop entire external reference, fdo#85617 related
    
    If there are no matching tab names for a FileId, preserve at least the known
    reference parts. In case of 2D references the sheet name is in the token if
    for example read from .xlsx, only for 3D references the second sheet name
    would be needed. The underlying makeExternalRefStr() and its subroutines
    handle the missing tabname elements gracefully.
    
    Still this situation is worth an assertion.

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index f6c868d..9ae1474 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -4160,8 +4160,7 @@ void ScCompiler::CreateStringFromExternal(OUStringBuffer& rBuffer, FormulaToken*
         {
             vector<OUString> aTabNames;
             pRefMgr->getAllCachedTableNames(nFileId, aTabNames);
-            if (aTabNames.empty())
-                return;
+            assert(!aTabNames.empty()); // something is seriously wrong, but continue
 
             pConv->makeExternalRefStr(
                 rBuffer, GetPos(), nFileId, *pFileName, aTabNames, t->GetString().getString(),
commit 7eb5e135422f1a5830a44d129300bc3fafb4627d
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Jan 8 23:01:44 2015 +0100

    write externalLink Relationship Target IURI encoded, fdo#85617 related
    
    Change-Id: I3df065af8e4ef44734f468fd455c3b7c93d7fbc6

diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 521d1a9..47de380 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -353,7 +353,9 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU
     {
         sal_uInt16 nLevel;
         bool bRel;
-        OUString aFileName( BuildFileName( nLevel, bRel, rUrl, rRoot ) );
+        /* TODO: should we differentiate between BIFF and OOXML and write IURI
+         * encoded for OOXML? */
+        OUString aFileName( BuildFileName( nLevel, bRel, rUrl, rRoot, false ) );
 
         if( eProtocol == INET_PROT_SMB )
         {
@@ -444,9 +446,10 @@ XclExpHyperlink::~XclExpHyperlink()
 }
 
 OUString XclExpHyperlink::BuildFileName(
-        sal_uInt16& rnLevel, bool& rbRel, const OUString& rUrl, const XclExpRoot& rRoot )
+        sal_uInt16& rnLevel, bool& rbRel, const OUString& rUrl, const XclExpRoot& rRoot, bool bEncoded )
 {
-    OUString aDosName( INetURLObject( rUrl ).getFSysPath( INetURLObject::FSYS_DOS ) );
+    INetURLObject aURLObject( rUrl );
+    OUString aDosName( bEncoded ? aURLObject.GetURLPath() : aURLObject.getFSysPath( INetURLObject::FSYS_DOS ) );
     rnLevel = 0;
     rbRel = rRoot.IsRelUrl();
 
@@ -455,7 +458,8 @@ OUString XclExpHyperlink::BuildFileName(
         // try to convert to relative file name
         OUString aTmpName( aDosName );
         aDosName = INetURLObject::GetRelURL( rRoot.GetBasePath(), rUrl,
-            INetURLObject::WAS_ENCODED, INetURLObject::DECODE_WITH_CHARSET );
+            INetURLObject::WAS_ENCODED,
+            (bEncoded ? INetURLObject::DECODE_TO_IURI : INetURLObject::DECODE_WITH_CHARSET));
 
         if (aDosName.startsWith(INET_FILE_SCHEME))
         {
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index 7cbf9a5..5ac4d84 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -1655,7 +1655,7 @@ void XclExpSupbook::SaveXml( XclExpXmlStream& rStrm )
     bool bRel = true;
     OUString sId = rStrm.addRelation( pExternalLink->getOutputStream(),
             "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",
-            XclExpHyperlink::BuildFileName( nLevel, bRel, maUrl, GetRoot()),
+            XclExpHyperlink::BuildFileName( nLevel, bRel, maUrl, GetRoot(), true),
             true );
 
     pExternalLink->startElement( XML_externalLink,
diff --git a/sc/source/filter/inc/xecontent.hxx b/sc/source/filter/inc/xecontent.hxx
index 2142293..f2e8ee9 100644
--- a/sc/source/filter/inc/xecontent.hxx
+++ b/sc/source/filter/inc/xecontent.hxx
@@ -113,10 +113,11 @@ public:
 
     /** Builds file name from the passed file URL. Tries to convert to relative file name.
         @param rnLevel  (out-param) The parent directory level.
-        @param rbRel  (out-param) true = path is relative. */
+        @param rbRel  (out-param) true = path is relative.
+        @param bEncoded if true return an IURI encoded name, not a DOS name. */
     static OUString     BuildFileName(
                             sal_uInt16& rnLevel, bool& rbRel,
-                            const OUString& rUrl, const XclExpRoot& rRoot );
+                            const OUString& rUrl, const XclExpRoot& rRoot, bool bEncoded );
 private:
 
     /** Writes the body of the HLINK record. */
commit 19feb49bd1b232425b7be19b55b950cbbc1bff67
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Jan 7 22:26:40 2015 +0100

    Revert "NO_DECODE breaks non-ascii urls, fdo#85617"
    
    This reverts commit 808b0bf831d4a4fdb60c01865d0a7dd36cf9d521.
    
    This is not the right fix, it cures a symptom but probably will break
    other cases. See also my comment on https://gerrit.libreoffice.org/13670
    
    Change-Id: I5bb661ba2bcbd387a69aacf08cb13b503315c5b1

diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index 5fd14cc..93da6d3 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -327,7 +327,7 @@ OUString ScGlobal::GetAbsDocName( const OUString& rFileName,
         if ( pMedium )
         {
             bool bWasAbs = true;
-            aAbsName = pMedium->GetURLObject().smartRel2Abs( rFileName, bWasAbs ).GetMainURL(INetURLObject::DECODE_TO_IURI);
+            aAbsName = pMedium->GetURLObject().smartRel2Abs( rFileName, bWasAbs ).GetMainURL(INetURLObject::NO_DECODE);
         }
         else
         {   // This can't happen, but ...
commit 8f43132c4d68dd2a1af7a4d1088413c2a0064902
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 9 14:55:35 2015 +0000

    asan: stack-buffer-overflow with fdo76216-1.doc
    
    Change-Id: Ica5ebb04ec50c6579f71d1152ae7619dd37b879e

diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index eaf080e..95790be 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -1373,13 +1373,13 @@ bool EnhWMFReader::ReadEnhWMF()
                              .ReadUChar( aLogFont.lfQuality )
                              .ReadUChar( aLogFont.lfPitchAndFamily );
 
-                        sal_Unicode lfFaceName[ LF_FACESIZE ];
-
-                        for ( int i = 0; i < LF_FACESIZE; i++ )
+                        sal_Unicode lfFaceName[LF_FACESIZE+1];
+                        lfFaceName[LF_FACESIZE] = 0;
+                        for (int i = 0; i < LF_FACESIZE; ++i)
                         {
-                            sal_uInt16 nChar;
-                            pWMF->ReadUInt16( nChar );
-                            lfFaceName[ i ] = nChar;
+                            sal_uInt16 nChar(0);
+                            pWMF->ReadUInt16(nChar);
+                            lfFaceName[i] = nChar;
                         }
                         aLogFont.alfFaceName = OUString( lfFaceName );
 
commit 1fa6ce352d7b72f039e55d830a6a9ae64fddc085
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Jan 9 15:45:44 2015 +0100

    include is unused again
    
    Change-Id: I921c631545be6da66639709642e423c44e82c5af

diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx
index 639f8fa..e37f751 100644
--- a/include/formula/tokenarray.hxx
+++ b/include/formula/tokenarray.hxx
@@ -26,7 +26,6 @@
 #include <o3tl/underlying_type.hxx>
 
 #include <limits.h>
-#include <type_traits>
 #include <unordered_set>
 
 namespace svl {
commit a1ecce3ad7df6a82191c4956cec986dc50503dde
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Jan 9 15:44:29 2015 +0100

    One more place to work around missing std::underlying_type for GCC 4.6
    
    Change-Id: I46225e30f6326e0af5a8ac3bebe9847f4dbe50d0

diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx
index d9c02da..639f8fa 100644
--- a/include/formula/tokenarray.hxx
+++ b/include/formula/tokenarray.hxx
@@ -23,6 +23,8 @@
 #include <com/sun/star/sheet/FormulaToken.hpp>
 #include <formula/token.hxx>
 #include <formula/ExternalReferenceHelper.hxx>
+#include <o3tl/underlying_type.hxx>
+
 #include <limits.h>
 #include <type_traits>
 #include <unordered_set>
@@ -90,7 +92,7 @@ public:
     inline  bool    isRewriteNeeded( OpCode eOp ) const;
 };
 
-typedef std::unordered_set<OpCode, std::hash<std::underlying_type<OpCode>::type> > unordered_opcode_set;
+typedef std::unordered_set<OpCode, std::hash<o3tl::underlying_type<OpCode>::type> > unordered_opcode_set;
 
 class FORMULA_DLLPUBLIC FormulaTokenArray
 {
diff --git a/include/o3tl/typed_flags_set.hxx b/include/o3tl/typed_flags_set.hxx
index 501a09a..001d3fe 100644
--- a/include/o3tl/typed_flags_set.hxx
+++ b/include/o3tl/typed_flags_set.hxx
@@ -23,19 +23,13 @@
 #include <sal/config.h>
 
 #include <cassert>
-#include <type_traits>
+
+#include <o3tl/underlying_type.hxx>
 
 namespace o3tl {
 
 template<typename T> struct typed_flags {};
 
-#if defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ <= 7 && \
-    !defined __clang__
-#define O3TL_STD_UNDERLYING_TYPE_E signed int
-#else
-#define O3TL_STD_UNDERLYING_TYPE_E typename std::underlying_type<E>::type
-#endif
-
 /// Mark a (scoped) enumeration as a set of bit flags, with accompanying
 /// operations.
 ///
@@ -49,7 +43,7 @@ template<typename T> struct typed_flags {};
 ///
 /// \param E the enumeration type.
 /// \param M the all-bits-set value for the bit flags.
-template<typename E, O3TL_STD_UNDERLYING_TYPE_E M>
+template<typename E, typename underlying_type<E>::type M>
 struct is_typed_flags {
     static_assert(
         M >= 0, "is_typed_flags expects only non-negative bit values");
@@ -58,7 +52,7 @@ struct is_typed_flags {
 
     class Wrap {
     public:
-        explicit Wrap(O3TL_STD_UNDERLYING_TYPE_E value):
+        explicit Wrap(typename underlying_type<E>::type value):
             value_(value)
         { assert(value >= 0); }
 
@@ -67,7 +61,7 @@ struct is_typed_flags {
 #if !defined _MSC_VER || _MSC_VER > 1700
         explicit
 #endif
-        operator O3TL_STD_UNDERLYING_TYPE_E() { return value_; }
+        operator typename underlying_type<E>::type() { return value_; }
 
 #if !defined _MSC_VER || _MSC_VER > 1700
         explicit
@@ -75,20 +69,20 @@ struct is_typed_flags {
         operator bool() { return value_ != 0; }
 
     private:
-        O3TL_STD_UNDERLYING_TYPE_E value_;
+        typename underlying_type<E>::type value_;
     };
 
-    static O3TL_STD_UNDERLYING_TYPE_E const mask = M;
+    static typename underlying_type<E>::type const mask = M;
 };
 
 }
 
 template<typename E>
 inline typename o3tl::typed_flags<E>::Wrap operator ~(E rhs) {
-    assert(static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs) >= 0);
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(rhs) >= 0);
     return static_cast<typename o3tl::typed_flags<E>::Wrap>(
         o3tl::typed_flags<E>::mask
-        & ~static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs));
+        & ~static_cast<typename o3tl::underlying_type<E>::type>(rhs));
 }
 
 template<typename E>
@@ -97,36 +91,36 @@ inline typename o3tl::typed_flags<E>::Wrap operator ~(
 {
     return static_cast<typename o3tl::typed_flags<E>::Wrap>(
         o3tl::typed_flags<E>::mask
-        & ~static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs));
+        & ~static_cast<typename o3tl::underlying_type<E>::type>(rhs));
 }
 
 template<typename E>
 inline typename o3tl::typed_flags<E>::Wrap operator ^(E lhs, E rhs) {
-    assert(static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs) >= 0);
-    assert(static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs) >= 0);
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(lhs) >= 0);
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(rhs) >= 0);
     return static_cast<typename o3tl::typed_flags<E>::Wrap>(
-        static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs)
-        ^ static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs));
+        static_cast<typename o3tl::underlying_type<E>::type>(lhs)
+        ^ static_cast<typename o3tl::underlying_type<E>::type>(rhs));
 }
 
 template<typename E>
 inline typename o3tl::typed_flags<E>::Wrap operator ^(
     E lhs, typename o3tl::typed_flags<E>::Wrap rhs)
 {
-    assert(static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs) >= 0);
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(lhs) >= 0);
     return static_cast<typename o3tl::typed_flags<E>::Wrap>(
-        static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs)
-        ^ static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs));
+        static_cast<typename o3tl::underlying_type<E>::type>(lhs)
+        ^ static_cast<typename o3tl::underlying_type<E>::type>(rhs));
 }
 
 template<typename E>
 inline typename o3tl::typed_flags<E>::Wrap operator ^(
     typename o3tl::typed_flags<E>::Wrap lhs, E rhs)
 {
-    assert(static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs) >= 0);
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(rhs) >= 0);
     return static_cast<typename o3tl::typed_flags<E>::Wrap>(
-        static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs)
-        ^ static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs));
+        static_cast<typename o3tl::underlying_type<E>::type>(lhs)
+        ^ static_cast<typename o3tl::underlying_type<E>::type>(rhs));
 }
 
 template<typename E>
@@ -135,37 +129,37 @@ inline typename o3tl::typed_flags<E>::Wrap operator ^(
     typename o3tl::typed_flags<E>::Wrap rhs)
 {
     return static_cast<typename o3tl::typed_flags<E>::Wrap>(
-        static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs)
-        ^ static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs));
+        static_cast<typename o3tl::underlying_type<E>::type>(lhs)
+        ^ static_cast<typename o3tl::underlying_type<E>::type>(rhs));
 }
 
 template<typename E>
 inline typename o3tl::typed_flags<E>::Wrap operator &(E lhs, E rhs) {
-    assert(static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs) >= 0);
-    assert(static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs) >= 0);
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(lhs) >= 0);
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(rhs) >= 0);
     return static_cast<typename o3tl::typed_flags<E>::Wrap>(
-        static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs)
-        & static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs));
+        static_cast<typename o3tl::underlying_type<E>::type>(lhs)
+        & static_cast<typename o3tl::underlying_type<E>::type>(rhs));
 }
 
 template<typename E>
 inline typename o3tl::typed_flags<E>::Wrap operator &(
     E lhs, typename o3tl::typed_flags<E>::Wrap rhs)
 {
-    assert(static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs) >= 0);
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(lhs) >= 0);
     return static_cast<typename o3tl::typed_flags<E>::Wrap>(
-        static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs)
-        & static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs));
+        static_cast<typename o3tl::underlying_type<E>::type>(lhs)
+        & static_cast<typename o3tl::underlying_type<E>::type>(rhs));
 }
 
 template<typename E>
 inline typename o3tl::typed_flags<E>::Wrap operator &(
     typename o3tl::typed_flags<E>::Wrap lhs, E rhs)
 {
-    assert(static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs) >= 0);
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(rhs) >= 0);
     return static_cast<typename o3tl::typed_flags<E>::Wrap>(
-        static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs)
-        & static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs));
+        static_cast<typename o3tl::underlying_type<E>::type>(lhs)
+        & static_cast<typename o3tl::underlying_type<E>::type>(rhs));
 }
 
 template<typename E>
@@ -174,37 +168,37 @@ inline typename o3tl::typed_flags<E>::Wrap operator &(
     typename o3tl::typed_flags<E>::Wrap rhs)
 {
     return static_cast<typename o3tl::typed_flags<E>::Wrap>(
-        static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs)
-        & static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs));
+        static_cast<typename o3tl::underlying_type<E>::type>(lhs)
+        & static_cast<typename o3tl::underlying_type<E>::type>(rhs));
 }
 
 template<typename E>
 inline typename o3tl::typed_flags<E>::Wrap operator |(E lhs, E rhs) {
-    assert(static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs) >= 0);
-    assert(static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs) >= 0);
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(lhs) >= 0);
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(rhs) >= 0);
     return static_cast<typename o3tl::typed_flags<E>::Wrap>(
-        static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs)
-        | static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs));
+        static_cast<typename o3tl::underlying_type<E>::type>(lhs)
+        | static_cast<typename o3tl::underlying_type<E>::type>(rhs));
 }
 
 template<typename E>
 inline typename o3tl::typed_flags<E>::Wrap operator |(
     E lhs, typename o3tl::typed_flags<E>::Wrap rhs)
 {
-    assert(static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs) >= 0);
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(lhs) >= 0);
     return static_cast<typename o3tl::typed_flags<E>::Wrap>(
-        static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs)
-        | static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs));
+        static_cast<typename o3tl::underlying_type<E>::type>(lhs)
+        | static_cast<typename o3tl::underlying_type<E>::type>(rhs));
 }
 
 template<typename E>
 inline typename o3tl::typed_flags<E>::Wrap operator |(
     typename o3tl::typed_flags<E>::Wrap lhs, E rhs)
 {
-    assert(static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs) >= 0);
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(rhs) >= 0);
     return static_cast<typename o3tl::typed_flags<E>::Wrap>(
-        static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs)
-        | static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs));
+        static_cast<typename o3tl::underlying_type<E>::type>(lhs)
+        | static_cast<typename o3tl::underlying_type<E>::type>(rhs));
 }
 
 template<typename E>
@@ -213,14 +207,14 @@ inline typename o3tl::typed_flags<E>::Wrap operator |(
     typename o3tl::typed_flags<E>::Wrap rhs)
 {
     return static_cast<typename o3tl::typed_flags<E>::Wrap>(
-        static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs)
-        | static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs));
+        static_cast<typename o3tl::underlying_type<E>::type>(lhs)
+        | static_cast<typename o3tl::underlying_type<E>::type>(rhs));
 }
 
 template<typename E>
 inline typename o3tl::typed_flags<E>::Self operator &=(E & lhs, E rhs) {
-    assert(static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs) >= 0);
-    assert(static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs) >= 0);
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(lhs) >= 0);
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(rhs) >= 0);
     lhs = lhs & rhs;
     return lhs;
 }
@@ -229,15 +223,15 @@ template<typename E>
 inline typename o3tl::typed_flags<E>::Self operator &=(
     E & lhs, typename o3tl::typed_flags<E>::Wrap rhs)
 {
-    assert(static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs) >= 0);
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(lhs) >= 0);
     lhs = lhs & rhs;
     return lhs;
 }
 
 template<typename E>
 inline typename o3tl::typed_flags<E>::Self operator |=(E & lhs, E rhs) {
-    assert(static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs) >= 0);
-    assert(static_cast<O3TL_STD_UNDERLYING_TYPE_E>(rhs) >= 0);
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(lhs) >= 0);
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(rhs) >= 0);
     lhs = lhs | rhs;
     return lhs;
 }
@@ -246,13 +240,11 @@ template<typename E>
 inline typename o3tl::typed_flags<E>::Self operator |=(
     E & lhs, typename o3tl::typed_flags<E>::Wrap rhs)
 {
-    assert(static_cast<O3TL_STD_UNDERLYING_TYPE_E>(lhs) >= 0);
+    assert(static_cast<typename o3tl::underlying_type<E>::type>(lhs) >= 0);
     lhs = lhs | rhs;
     return lhs;
 }
 
-#undef O3TL_STD_UNDERLYING_TYPE_E
-
 #endif /* INCLUDED_O3TL_TYPED_FLAGS_SET_HXX */
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/o3tl/underlying_type.hxx b/include/o3tl/underlying_type.hxx
new file mode 100644
index 0000000..3d8b625
--- /dev/null
+++ b/include/o3tl/underlying_type.hxx
@@ -0,0 +1,32 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_O3TL_UNDERLYING_TYPE_HXX
+#define INCLUDED_O3TL_UNDERLYING_TYPE_HXX
+
+#include <sal/config.h>
+
+#include <type_traits>
+
+namespace o3tl {
+
+template<typename T> struct underlying_type {
+#if defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ <= 7 && \
+        !defined __clang__
+    typedef int type;
+#else
+    typedef typename std::underlying_type<T>::type type;
+#endif
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 8a50042889c138a6efbb395f3cb748beaac22189
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Jan 9 15:39:25 2015 +0100

    Work around -fsanitize=null
    
    ...at least in CppunitTest_sd_export_tests, the dynamic_cast in
    PPTWriterBase::GetStyleSheets (sd/source/filter/eppt/pptx-epptbase.cxx) can
    fail, but the resulting reference appears to not be accessed then.  So change
    from reference to (potentially null) pointer.
    
    Change-Id: Ide49be7bffefa7906e84349642f7c3d0666d414e

diff --git a/sd/source/filter/eppt/epptbase.hxx b/sd/source/filter/eppt/epptbase.hxx
index 4b552a5..c3554cd 100644
--- a/sd/source/filter/eppt/epptbase.hxx
+++ b/sd/source/filter/eppt/epptbase.hxx
@@ -289,12 +289,12 @@ struct PPTExParaLevel
 
 struct PPTExParaSheet
 {
-                PPTExBulletProvider& rBuProv;
+                PPTExBulletProvider* pBuProv;
 
                 sal_uInt32  mnInstance;
 
                 PPTExParaLevel  maParaLevel[ 5 ];
-                PPTExParaSheet( int nInstance, sal_uInt16 nDefaultTab, PPTExBulletProvider& rProv );
+                PPTExParaSheet( int nInstance, sal_uInt16 nDefaultTab, PPTExBulletProvider* pProv );
 
                 void    SetStyleSheet( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &,
                                         FontCollection& rFontCollection, int nLevel, const PPTExCharLevel& rCharLevel );
@@ -310,7 +310,7 @@ class PPTExStyleSheet
                 PPTExCharSheet*     mpCharSheet[ PPTEX_STYLESHEETENTRYS ];
                 PPTExParaSheet*     mpParaSheet[ PPTEX_STYLESHEETENTRYS ];
 
-                PPTExStyleSheet( sal_uInt16 nDefaultTab, PPTExBulletProvider& rBuProv );
+                PPTExStyleSheet( sal_uInt16 nDefaultTab, PPTExBulletProvider* pBuProv );
                 ~PPTExStyleSheet();
 
                 PPTExParaSheet& GetParaSheet( int nInstance ) { return *mpParaSheet[ nInstance ]; };
diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx
index 2ec0569..2cb8998 100644
--- a/sd/source/filter/eppt/pptx-epptbase.cxx
+++ b/sd/source/filter/eppt/pptx-epptbase.cxx
@@ -540,7 +540,7 @@ bool PPTWriterBase::GetStyleSheets()
             ? (sal_uInt16)( *(sal_Int32*)mAny.getValue() / 4.40972 )
             : 1250;
 
-        maStyleSheetList.push_back( new PPTExStyleSheet( nDefaultTab, *dynamic_cast<PPTExBulletProvider*>(this) ) );
+        maStyleSheetList.push_back( new PPTExStyleSheet( nDefaultTab, dynamic_cast<PPTExBulletProvider*>(this) ) );
         SetCurrentStyleSheet( nPageNum );
         if ( GetPageByIndex( nPageNum, MASTER ) )
             aXNamed = Reference< XNamed >
diff --git a/sd/source/filter/eppt/pptx-stylesheet.cxx b/sd/source/filter/eppt/pptx-stylesheet.cxx
index 1961326..8278b61 100644
--- a/sd/source/filter/eppt/pptx-stylesheet.cxx
+++ b/sd/source/filter/eppt/pptx-stylesheet.cxx
@@ -129,8 +129,8 @@ void PPTExCharSheet::Write( SvStream& rSt, PptEscherEx*, sal_uInt16 nLev, bool,
     }
 }
 
-PPTExParaSheet::PPTExParaSheet( int nInstance, sal_uInt16 nDefaultTab, PPTExBulletProvider& rProv ) :
-    rBuProv     ( rProv ),
+PPTExParaSheet::PPTExParaSheet( int nInstance, sal_uInt16 nDefaultTab, PPTExBulletProvider* pProv ) :
+    pBuProv     ( pProv ),
     mnInstance  ( nInstance )
 {
     bool bHasBullet = false;
@@ -226,7 +226,7 @@ PPTExParaSheet::PPTExParaSheet( int nInstance, sal_uInt16 nDefaultTab, PPTExBull
 void PPTExParaSheet::SetStyleSheet( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet,
                                         FontCollection& rFontCollection, int nLevel, const PPTExCharLevel& rCharLevel )
 {
-    ParagraphObj aParagraphObj( rXPropSet, rBuProv );
+    ParagraphObj aParagraphObj( rXPropSet, pBuProv );
     aParagraphObj.CalculateGraphicBulletSize( rCharLevel.mnFontHeight );
     PPTExParaLevel& rLev = maParaLevel[ nLevel ];
 
@@ -292,7 +292,7 @@ void PPTExParaSheet::SetStyleSheet( const ::com::sun::star::uno::Reference< ::co
             {
                 PPTExParaLevel& rLevel = maParaLevel[ i ];
                 if ( i )
-                    aParagraphObj.ImplGetNumberingLevel( rBuProv, i, false );
+                    aParagraphObj.ImplGetNumberingLevel( pBuProv, i, false );
                 rLevel.mnTextOfs = aParagraphObj.nTextOfs;
                 rLevel.mnBulletOfs = (sal_uInt16)aParagraphObj.nBulletOfs;
                 rLevel.mnBulletChar = aParagraphObj.cBulletId;
@@ -321,7 +321,7 @@ void PPTExParaSheet::Write( SvStream& rSt, PptEscherEx*, sal_uInt16 nLev, bool,
             maParaLevel[ 2 ].mbExtendedBulletsUsed || maParaLevel[ 3 ].mbExtendedBulletsUsed ||
                 maParaLevel[ 4 ].mbExtendedBulletsUsed )
     {
-        SvStream& rOut = rBuProv.aBuExMasterStream;
+        SvStream& rOut = pBuProv->aBuExMasterStream;
         if ( !nLev )
         {
             rOut.WriteUInt32( ( ( EPP_PST_ExtendedParagraphMasterAtom << 16 ) | ( mnInstance << 4 ) ) )
@@ -384,11 +384,11 @@ void PPTExParaSheet::Write( SvStream& rSt, PptEscherEx*, sal_uInt16 nLev, bool,
     }
 }
 
-PPTExStyleSheet::PPTExStyleSheet( sal_uInt16 nDefaultTab, PPTExBulletProvider& rBuProv )
+PPTExStyleSheet::PPTExStyleSheet( sal_uInt16 nDefaultTab, PPTExBulletProvider* pBuProv )
 {
     for ( int nInstance = EPP_TEXTTYPE_Title; nInstance <= EPP_TEXTTYPE_QuarterBody; nInstance++ )
     {
-        mpParaSheet[ nInstance ] = ( nInstance == EPP_TEXTTYPE_notUsed ) ? NULL : new PPTExParaSheet( nInstance, nDefaultTab, rBuProv );
+        mpParaSheet[ nInstance ] = ( nInstance == EPP_TEXTTYPE_notUsed ) ? NULL : new PPTExParaSheet( nInstance, nDefaultTab, pBuProv );
         mpCharSheet[ nInstance ] = ( nInstance == EPP_TEXTTYPE_notUsed ) ? NULL : new PPTExCharSheet( nInstance );
     }
 }
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index 86bf44b..06f21bb 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -647,7 +647,7 @@ PortionObj& PortionObj::operator=( const PortionObj& rPortionObj )
 }
 
 ParagraphObj::ParagraphObj(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet,
-    PPTExBulletProvider& rProv)
+    PPTExBulletProvider* pProv)
     : PropStateValue()
     , SOParagraph()
     , mvPortions()
@@ -673,7 +673,7 @@ ParagraphObj::ParagraphObj(const ::com::sun::star::uno::Reference< ::com::sun::s
     nBulletFlags = 0;
     nParaFlags = 0;
 
-    ImplGetParagraphValues( rProv, false );
+    ImplGetParagraphValues( pProv, false );
 }
 
 ParagraphObj::ParagraphObj(::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & rXTextContent,
@@ -743,7 +743,7 @@ ParagraphObj::ParagraphObj(::com::sun::star::uno::Reference< ::com::sun::star::t
                 }
             }
         }
-        ImplGetParagraphValues( rProv, true );
+        ImplGetParagraphValues( &rProv, true );
     }
 }
 
@@ -789,7 +789,7 @@ void ParagraphObj::CalculateGraphicBulletSize( sal_uInt16 nFontHeight )
     }
 }
 
-void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int16 nNumberingDepth, bool bIsBullet, bool bGetPropStateValue )
+void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider* pBuProv, sal_Int16 nNumberingDepth, bool bIsBullet, bool bGetPropStateValue )
 {
     ::com::sun::star::uno::Any aAny;
     if ( GetPropertyValue( aAny, mXPropSet, OUString( "ParaLeftMargin" ) ) )
@@ -914,7 +914,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1
                                 OString aUniqueId( OUStringToOString(aGraphicURL.copy(nIndex), RTL_TEXTENCODING_UTF8) );
                                 if ( !aUniqueId.isEmpty() )
                                 {
-                                    nBulletId = rBuProv.GetId( aUniqueId, aBuGraSize );
+                                    nBulletId = pBuProv->GetId( aUniqueId, aBuGraSize );
                                     if ( nBulletId != 0xffff )
                                         bExtendedBulletsUsed = true;
                                 }
@@ -1103,7 +1103,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1
         nBulletOfs = 0;
 }
 
-void ParagraphObj::ImplGetParagraphValues( PPTExBulletProvider& rBuProv, bool bGetPropStateValue )
+void ParagraphObj::ImplGetParagraphValues( PPTExBulletProvider* pBuProv, bool bGetPropStateValue )
 {
     ::com::sun::star::uno::Any aAny;
     if ( GetPropertyValue( aAny, mXPropSet, "NumberingLevel", true ) )
@@ -1129,7 +1129,7 @@ void ParagraphObj::ImplGetParagraphValues( PPTExBulletProvider& rBuProv, bool bG
         nDepth = 0;
         mbIsBullet = false;
     }
-    ImplGetNumberingLevel( rBuProv, nDepth, mbIsBullet, bGetPropStateValue );
+    ImplGetNumberingLevel( pBuProv, nDepth, mbIsBullet, bGetPropStateValue );
 
     if ( ImplGetPropertyValue( OUString( "ParaTabStops" ), bGetPropStateValue ) )
         maTabStop = *( ::com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop>*)mAny.getValue();
diff --git a/sd/source/filter/eppt/text.hxx b/sd/source/filter/eppt/text.hxx
index 15d87ba..eb58689 100644
--- a/sd/source/filter/eppt/text.hxx
+++ b/sd/source/filter/eppt/text.hxx
@@ -186,8 +186,8 @@ class ParagraphObj : public PropStateValue, public SOParagraph
         void            ImplConstruct( const ParagraphObj& rParagraphObj );
         void            ImplClear();
         sal_uInt32      ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosition );
-        void            ImplGetParagraphValues( PPTExBulletProvider& rBuProv, bool bGetPropStateValue = false );
-        void            ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int16 nDepth, bool bIsBullet, bool bGetPropStateValue = false );

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list