[Libreoffice-commits] core.git: Branch 'private/kohei/excel-2003-xml-orcus-filter' - 438 commits - avmedia/source basctl/source basegfx/source basic/qa basic/source bin/find-unused-defines.awk bin/find-unused-defines-in-hrc-files.py bin/find-unused-defines.py bin/find-unused-defines.sh bin/oss-fuzz-build.sh bin/sanitize-blacklist.txt bridges/inc bridges/source canvas/source chart2/inc chart2/source comphelper/Library_comphelper.mk comphelper/source compilerplugins/clang compilerplugins/Makefile-clang.mk config_host/config_gpgme.h.in config_host/config_libcxx.h.in config_host.mk.in configure.ac connectivity/inc connectivity/source cppcanvas/source cppuhelper/source cppu/qa cppu/source cui/inc cui/source cui/uiconfig dbaccess/source desktop/qa desktop/source dictionaries distro-configs/Jenkins download.lst drawinglayer/qa drawinglayer/source dtrans/source editeng/inc editeng/source .editorconfig emfio/source extensions/source external/boost external/glib2 external/gpgmepp external/libassuan externa l/libepubgen external/libgpg-error external/libmspub external/Module_external.mk extras/CustomTarget_glade.mk extras/source filter/Configuration_filter.mk filter/source forms/source formula/source fpicker/source framework/inc framework/qa framework/source helpcontent2 hwpfilter/source i18nlangtag/source i18npool/inc i18npool/source i18nutil/source icon-themes/breeze icon-themes/breeze_dark icon-themes/breeze_svg icon-themes/sifr icon-themes/sifr_dark icon-themes/tango idlc/source include/basegfx include/comphelper include/connectivity include/editeng include/filter include/formula include/framework include/i18nlangtag include/i18nutil include/LibreOfficeKit include/oox include/package include/sal include/sax include/sfx2 include/svl include/svtools include/svx include/test include/toolkit include/ucbhelper include/unotools include/vcl include/xmloff include/xmlscript ios/LibreOfficeLight l10ntools/source libreofficekit/qa libreofficekit/source lingucomponent/source linguistic/source lotuswordpro/source Makefile.fetch Makefile.in offapi/com offapi/UnoApi_offapi.mk officecfg/registry oox/source package/inc package/source postprocess/Module_postprocess.mk pyuno/inc qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests readlicense_oo/license reportdesign/inc reportdesign/source RepositoryExternal.mk Repository.mk salhelper/source sal/osl sal/rtl sccomp/Module_sccomp.mk sc/CppunitTest_sc_databaserangesobj.mk sc/CppunitTest_sc_datapilottablesobj.mk sc/CppunitTest_sc_functionlistobj.mk sc/CppunitTest_sc_recentfunctionsobj.mk sc/inc sc/Module_sc.mk sc/qa scripting/source sc/sdi sc/source sc/uiconfig sdext/source sd/inc sd/qa sd/source sd/uiconfig sd/xml setup_native/source sfx2/inc sfx2/sdi sfx2/source shell/Library_localebe.mk shell/source slideshow/source solenv/bin solenv/clang-format solenv/CompilerTest_compilerplugins_clang.mk solenv/flatpak-manifest.in solenv/gbuild soltools/cpp sot/source starmath/inc starmath/sdi starmath/source svl/source svtools/inc svtoo ls/source svtools/uiconfig svx/inc svx/sdi svx/source sw/CppunitTest_sw_fodfexport.mk sw/inc sw/Library_sw.mk sw/Module_sw.mk sw/qa sw/sdi sw/source sw/uiconfig sysui/productlist.mk test/Library_subsequenttest.mk test/source toolkit/source ucbhelper/source ucb/source unotools/source unoxml/source vbahelper/source vcl/backendtest vcl/commonfuzzer.mk vcl/CustomTarget_nativemath.mk vcl/Executable_mmlfuzzer.mk vcl/Executable_mtpfuzzer.mk vcl/Executable_pptxfuzzer.mk vcl/headless vcl/inc vcl/Module_vcl.mk vcl/opengl vcl/qa vcl/README.vars vcl/source vcl/StaticLibrary_fuzzer_math.mk vcl/unx vcl/win vcl/workben writerfilter/source writerperfect/Library_wpftwriter.mk writerperfect/qa writerperfect/source writerperfect/uiconfig xmlhelp/source xmloff/inc xmloff/source xmlsecurity/inc xmlsecurity/qa xmlsecurity/source xmlsecurity/uiconfig xmlsecurity/util

Kohei Yoshida kohei.yoshida at gmail.com
Sun Dec 10 02:37:53 UTC 2017


Rebased ref, commits from common ancestor:
commit dea1b3ebb9ba5f4d2b2b8ea032a8455c398c6e70
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Sat Dec 9 14:32:30 2017 -0500

    Handle per-cell settings of cell formats.
    
    Change-Id: I500d01921d436643499a24d375d40a607d8fd576

diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index d858ddc4ac0a..87ac4f89d0e8 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -638,9 +638,13 @@ void ScOrcusSheet::set_date_time(
     cellInserted();
 }
 
-void ScOrcusSheet::set_format(os::row_t /*row*/, os::col_t /*col*/, size_t xf_index)
+void ScOrcusSheet::set_format(os::row_t row, os::col_t col, size_t xf_index)
 {
     SAL_INFO("sc.orcus.style", "set format: " << xf_index);
+
+    ScPatternAttr aPattern(mrDoc.getDoc().GetPool());
+    mrStyles.applyXfToItemSet(aPattern.GetItemSet(), xf_index);
+    mrDoc.getDoc().ApplyPattern(col, row, mnTab, aPattern);
 }
 
 void ScOrcusSheet::set_format(os::row_t row_start, os::col_t col_start,
commit 465d845e36203da9168622969a95a083aca15313
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Sat Dec 9 13:38:27 2017 -0500

    Implement a reference resolver for orcus.
    
    Orcus uses this to resolve cell addresses for some ops.
    
    Change-Id: I6ee9667ad994fb830e545ba3368004866a048c25

diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index af5020c8ace4..b869e0bc43a4 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -47,6 +47,8 @@ class XStatusIndicator;
 class ScOrcusGlobalSettings : public orcus::spreadsheet::iface::import_global_settings
 {
     ScDocumentImport& mrDoc;
+    formula::FormulaGrammar::Grammar meCalcGrammar;
+    orcus::spreadsheet::formula_grammar_t meOrcusGrammar;
 
 public:
     ScOrcusGlobalSettings(ScDocumentImport& rDoc);
@@ -55,6 +57,23 @@ public:
 
     virtual void set_default_formula_grammar(orcus::spreadsheet::formula_grammar_t grammar) override;
     virtual orcus::spreadsheet::formula_grammar_t get_default_formula_grammar() const override;
+
+    formula::FormulaGrammar::Grammar getCalcGrammar() const
+    {
+        return meCalcGrammar;
+    }
+};
+
+class ScOrcusRefResolver : public orcus::spreadsheet::iface::import_reference_resolver
+{
+    const ScDocumentImport& mrDoc;
+    const ScOrcusGlobalSettings& mrGlobalSettings;
+
+public:
+    ScOrcusRefResolver( const ScDocumentImport& rDoc, const ScOrcusGlobalSettings& rGS );
+
+    orcus::spreadsheet::address_t resolve_address(const char* p, size_t n);
+    orcus::spreadsheet::range_t resolve_range(const char* p, size_t n);
 };
 
 class ScOrcusSharedStrings : public orcus::spreadsheet::iface::import_shared_strings
@@ -202,7 +221,7 @@ class ScOrcusSheet : public orcus::spreadsheet::iface::import_sheet
 public:
     ScOrcusSheet(ScDocumentImport& rDoc, SCTAB nTab, ScOrcusFactory& rFactory);
 
-    virtual orcus::spreadsheet::iface::import_auto_filter* get_auto_filter() override { return &maAutoFilter; }
+    virtual orcus::spreadsheet::iface::import_auto_filter* get_auto_filter() override;
     virtual orcus::spreadsheet::iface::import_table* get_table() override;
     virtual orcus::spreadsheet::iface::import_sheet_properties* get_sheet_properties() override;
     virtual orcus::spreadsheet::iface::import_conditional_format* get_conditional_format() override;
@@ -497,6 +516,7 @@ class ScOrcusFactory : public orcus::spreadsheet::iface::import_factory
 
     StringCellCaches maStringCells;
     ScOrcusGlobalSettings maGlobalSettings;
+    ScOrcusRefResolver maRefResolver;
     ScOrcusSharedStrings maSharedStrings;
     std::vector< std::unique_ptr<ScOrcusSheet> > maSheets;
     ScOrcusStyles maStyles;
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index ec93824093a2..d858ddc4ac0a 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -58,20 +58,97 @@ using namespace com::sun::star;
 
 namespace os = orcus::spreadsheet;
 
-ScOrcusGlobalSettings::ScOrcusGlobalSettings(ScDocumentImport& rDoc) : mrDoc(rDoc) {}
+namespace {
+
+formula::FormulaGrammar::Grammar getCalcGrammarFromOrcus( os::formula_grammar_t grammar )
+{
+    formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_ODFF;
+    switch(grammar)
+    {
+        case orcus::spreadsheet::formula_grammar_t::ods:
+            eGrammar = formula::FormulaGrammar::GRAM_ODFF;
+            break;
+        case orcus::spreadsheet::formula_grammar_t::xlsx_2007:
+        case orcus::spreadsheet::formula_grammar_t::xlsx_2010:
+            eGrammar = formula::FormulaGrammar::GRAM_OOXML;
+            break;
+        case orcus::spreadsheet::formula_grammar_t::gnumeric:
+            eGrammar = formula::FormulaGrammar::GRAM_ENGLISH_XL_A1;
+            break;
+        case orcus::spreadsheet::formula_grammar_t::xls_xml:
+            eGrammar = formula::FormulaGrammar::GRAM_ENGLISH_XL_R1C1;
+            break;
+        case orcus::spreadsheet::formula_grammar_t::unknown:
+            break;
+    }
+
+    return eGrammar;
+}
+
+}
+
+ScOrcusGlobalSettings::ScOrcusGlobalSettings(ScDocumentImport& rDoc) :
+    mrDoc(rDoc), meOrcusGrammar(os::formula_grammar_t::unknown) {}
 
 void ScOrcusGlobalSettings::set_origin_date(int year, int month, int day)
 {
     mrDoc.setOriginDate(year, month, day);
 }
 
-void ScOrcusGlobalSettings::set_default_formula_grammar(orcus::spreadsheet::formula_grammar_t /*grammar*/)
+void ScOrcusGlobalSettings::set_default_formula_grammar(os::formula_grammar_t grammar)
 {
+    meCalcGrammar = getCalcGrammarFromOrcus(grammar);
+    meOrcusGrammar = grammar;
 }
 
 orcus::spreadsheet::formula_grammar_t ScOrcusGlobalSettings::get_default_formula_grammar() const
 {
-    return orcus::spreadsheet::formula_grammar_t::unknown;
+    return meOrcusGrammar;
+}
+
+ScOrcusRefResolver::ScOrcusRefResolver( const ScDocumentImport& rDoc, const ScOrcusGlobalSettings& rGS ) :
+    mrDoc(rDoc), mrGlobalSettings(rGS) {}
+
+os::address_t ScOrcusRefResolver::resolve_address(const char* p, size_t n)
+{
+    OUString aStr(p, n, RTL_TEXTENCODING_UTF8);
+
+    ScAddress aAddr;
+    aAddr.Parse(aStr, nullptr,
+        formula::FormulaGrammar::extractRefConvention(
+            mrGlobalSettings.getCalcGrammar()));
+
+    os::address_t ret;
+
+    if (aAddr.IsValid())
+    {
+        ret.column = aAddr.Col();
+        ret.row = aAddr.Row();
+    }
+
+    return ret;
+}
+
+os::range_t ScOrcusRefResolver::resolve_range(const char* p, size_t n)
+{
+    OUString aStr(p, n, RTL_TEXTENCODING_UTF8);
+
+    ScRange aRange;
+    aRange.Parse(aStr, nullptr,
+        formula::FormulaGrammar::extractRefConvention(
+            mrGlobalSettings.getCalcGrammar()));
+
+    os::range_t ret;
+
+    if (aRange.IsValid())
+    {
+        ret.first.column = aRange.aStart.Col();
+        ret.first.row    = aRange.aStart.Row();
+        ret.last.column  = aRange.aEnd.Col();
+        ret.last.row     = aRange.aEnd.Row();
+    }
+
+    return ret;
 }
 
 ScOrcusFactory::StringCellCache::StringCellCache(const ScAddress& rPos, size_t nIndex) :
@@ -80,6 +157,7 @@ ScOrcusFactory::StringCellCache::StringCellCache(const ScAddress& rPos, size_t n
 ScOrcusFactory::ScOrcusFactory(ScDocument& rDoc) :
     maDoc(rDoc),
     maGlobalSettings(maDoc),
+    maRefResolver(maDoc, maGlobalSettings),
     maSharedStrings(*this),
     maStyles(rDoc),
     mnProgress(0) {}
@@ -487,6 +565,11 @@ void ScOrcusSheet::cellInserted()
     }
 }
 
+os::iface::import_auto_filter* ScOrcusSheet::get_auto_filter()
+{
+    return &maAutoFilter;
+}
+
 os::iface::import_table* ScOrcusSheet::get_table()
 {
     return nullptr;
@@ -569,35 +652,6 @@ void ScOrcusSheet::set_format(os::row_t row_start, os::col_t col_start,
     mrDoc.getDoc().ApplyPatternAreaTab(col_start, row_start, col_end, row_end, mnTab, aPattern);
 }
 
-namespace {
-
-formula::FormulaGrammar::Grammar getCalcGrammarFromOrcus( os::formula_grammar_t grammar )
-{
-    formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_ODFF;
-    switch(grammar)
-    {
-        case orcus::spreadsheet::formula_grammar_t::ods:
-            eGrammar = formula::FormulaGrammar::GRAM_ODFF;
-            break;
-        case orcus::spreadsheet::formula_grammar_t::xlsx_2007:
-        case orcus::spreadsheet::formula_grammar_t::xlsx_2010:
-            eGrammar = formula::FormulaGrammar::GRAM_OOXML;
-            break;
-        case orcus::spreadsheet::formula_grammar_t::gnumeric:
-            eGrammar = formula::FormulaGrammar::GRAM_ENGLISH_XL_A1;
-            break;
-        case orcus::spreadsheet::formula_grammar_t::xls_xml:
-            eGrammar = formula::FormulaGrammar::GRAM_ENGLISH_XL_R1C1;
-            break;
-        case orcus::spreadsheet::formula_grammar_t::unknown:
-            break;
-    }
-
-    return eGrammar;
-}
-
-}
-
 void ScOrcusSheet::set_formula(
     os::row_t row, os::col_t col, os::formula_grammar_t grammar, const char* p, size_t n)
 {
commit a851eddfeea59d520f78e95b95bab63345a7a1c8
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Sat Dec 9 09:47:10 2017 -0500

    Remove almost duplicate code blocks.
    
    Change-Id: Ib75d0caa41876908091bed374d3afd802928acf7

diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index e9f47167dab0..0f6c10621b9b 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -669,6 +669,8 @@ public:
     bool        ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
                                 SCCOL& rEndCol, SCROW& rEndRow,
                                 bool bRefresh );
+    void SetMergedCells( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
+
     const SfxPoolItem*      GetAttr( SCCOL nCol, SCROW nRow, sal_uInt16 nWhich ) const;
     const ScPatternAttr*    GetPattern( SCCOL nCol, SCROW nRow ) const;
     const ScPatternAttr*    GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, SCROW nEndRow ) const;
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 62c98d964c37..092044704c21 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -2020,15 +2020,11 @@ void ScDocument::DoEmptyBlock( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
 void ScDocument::DoMerge( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
                                     SCCOL nEndCol, SCROW nEndRow, bool bDeleteCaptions )
 {
-    ScMergeAttr aAttr( nEndCol-nStartCol+1, nEndRow-nStartRow+1 );
-    ApplyAttr( nStartCol, nStartRow, nTab, aAttr );
-
-    if ( nEndCol > nStartCol )
-        ApplyFlagsTab( nStartCol+1, nStartRow, nEndCol, nStartRow, nTab, ScMF::Hor );
-    if ( nEndRow > nStartRow )
-        ApplyFlagsTab( nStartCol, nStartRow+1, nStartCol, nEndRow, nTab, ScMF::Ver );
-    if ( nEndCol > nStartCol && nEndRow > nStartRow )
-        ApplyFlagsTab( nStartCol+1, nStartRow+1, nEndCol, nEndRow, nTab, ScMF::Hor | ScMF::Ver );
+    ScTable* pTab = FetchTable(nTab);
+    if (!pTab)
+        return;
+
+    pTab->SetMergedCells(nStartCol, nStartRow, nEndCol, nEndRow);
 
     // Remove all covered notes (removed captions are collected by drawing undo if active)
     InsertDeleteFlags nDelFlag = InsertDeleteFlags::NOTE | (bDeleteCaptions ? InsertDeleteFlags::NONE : InsertDeleteFlags::NOCAPTIONS);
diff --git a/sc/source/core/data/documentimport.cxx b/sc/source/core/data/documentimport.cxx
index ddfcf8b10a94..183f3e1650af 100644
--- a/sc/source/core/data/documentimport.cxx
+++ b/sc/source/core/data/documentimport.cxx
@@ -518,17 +518,7 @@ void ScDocumentImport::setMergedCells(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCO
     if (!pTab)
         return;
 
-    ScMergeAttr aAttr(nCol2-nCol1+1, nRow2-nRow1+1);
-    pTab->ApplyAttr(nCol1, nRow1, aAttr);
-
-    if (nCol1 < nCol2)
-        pTab->ApplyFlags(nCol1+1, nRow1, nCol2, nRow2, ScMF::Hor);
-
-    if (nRow1 < nRow2)
-        pTab->ApplyFlags(nCol1, nRow1+1, nCol1, nRow2, ScMF::Ver);
-
-    if (nCol1 < nCol2 && nRow1 < nRow2)
-        pTab->ApplyFlags(nCol1+1, nRow1+1, nCol2, nRow2, ScMF::Hor | ScMF::Ver);
+    pTab->SetMergedCells(nCol1, nRow1, nCol2, nRow2);
 }
 
 namespace {
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 626f58747571..1aa2d8384d1a 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1999,6 +1999,21 @@ bool ScTable::ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
     return bFound;
 }
 
+void ScTable::SetMergedCells( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
+{
+    ScMergeAttr aAttr(nCol2-nCol1+1, nRow2-nRow1+1);
+    ApplyAttr(nCol1, nRow1, aAttr);
+
+    if (nCol1 < nCol2)
+        ApplyFlags(nCol1+1, nRow1, nCol2, nRow2, ScMF::Hor);
+
+    if (nRow1 < nRow2)
+        ApplyFlags(nCol1, nRow1+1, nCol1, nRow2, ScMF::Ver);
+
+    if (nCol1 < nCol2 && nRow1 < nRow2)
+        ApplyFlags(nCol1+1, nRow1+1, nCol2, nRow2, ScMF::Hor | ScMF::Ver);
+}
+
 bool ScTable::IsBlockEmpty( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bIgnoreNotes ) const
 {
     if (!(ValidCol(nCol1) && ValidCol(nCol2)))
commit 3d3b7cd3ffd8c52f7d153eaab5adc14d02d05174
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Fri Dec 8 22:21:58 2017 -0500

    Handle merged cells.
    
    Change-Id: Iaa7194d4226300e495982bb1f90f72c31d748955

diff --git a/sc/inc/documentimport.hxx b/sc/inc/documentimport.hxx
index 03f415c381cc..b4c35e1f99b5 100644
--- a/sc/inc/documentimport.hxx
+++ b/sc/inc/documentimport.hxx
@@ -114,6 +114,8 @@ public:
 
     void setRowsVisible(SCTAB nTab, SCROW nRowStart, SCROW nRowEnd, bool bVisible);
 
+    void setMergedCells(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
+
     void finalize();
 
 private:
diff --git a/sc/source/core/data/documentimport.cxx b/sc/source/core/data/documentimport.cxx
index c41e134558bf..ddfcf8b10a94 100644
--- a/sc/source/core/data/documentimport.cxx
+++ b/sc/source/core/data/documentimport.cxx
@@ -512,6 +512,25 @@ void ScDocumentImport::setRowsVisible(SCTAB nTab, SCROW nRowStart, SCROW nRowEnd
     }
 }
 
+void ScDocumentImport::setMergedCells(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
+{
+    ScTable* pTab = mpImpl->mrDoc.FetchTable(nTab);
+    if (!pTab)
+        return;
+
+    ScMergeAttr aAttr(nCol2-nCol1+1, nRow2-nRow1+1);
+    pTab->ApplyAttr(nCol1, nRow1, aAttr);
+
+    if (nCol1 < nCol2)
+        pTab->ApplyFlags(nCol1+1, nRow1, nCol2, nRow2, ScMF::Hor);
+
+    if (nRow1 < nRow2)
+        pTab->ApplyFlags(nCol1, nRow1+1, nCol1, nRow2, ScMF::Ver);
+
+    if (nCol1 < nCol2 && nRow1 < nRow2)
+        pTab->ApplyFlags(nCol1+1, nRow1+1, nCol2, nRow2, ScMF::Hor | ScMF::Ver);
+}
+
 namespace {
 
 class CellStoreInitializer
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index eff9570e66c3..ec93824093a2 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -307,8 +307,9 @@ void ScOrcusSheetProperties::set_row_hidden(os::row_t row, bool hidden)
         mrDoc.getDoc().SetRowHidden(row, row, mnTab, hidden);
 }
 
-void ScOrcusSheetProperties::set_merge_cell_range(const orcus::spreadsheet::range_t& /*range*/)
+void ScOrcusSheetProperties::set_merge_cell_range(const orcus::spreadsheet::range_t& range)
 {
+    mrDoc.setMergedCells(mnTab, range.first.column, range.first.row, range.last.column, range.last.row);
 }
 
 ScOrcusConditionalFormat::ScOrcusConditionalFormat(SCTAB nTab, ScDocument& rDoc):
commit 3e7519517bee599fa67d3f071b88bc71bacbcf58
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Thu Dec 7 22:24:12 2017 -0500

    Remove unused method.
    
    Change-Id: Idc7919f04898b0298d6448d2dd84222b211cf5db

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 3096dc7aa5df..5c1b93763d1c 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -870,7 +870,6 @@ public:
                                             bool bNamesValid = false );
     SC_DLLPUBLIC bool           DeleteTabs( SCTAB nTab, SCTAB nSheets );
     SC_DLLPUBLIC bool           DeleteTab( SCTAB nTab );
-    SC_DLLPUBLIC void           ClearTabs();
     SC_DLLPUBLIC bool           RenameTab( SCTAB nTab, const OUString& rName,
                                            bool bExternalDocument = false );
     bool                        MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress = nullptr );
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index bc971f1b1c8f..f81fbeb1ecf6 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -783,15 +783,6 @@ bool ScDocument::DeleteTab( SCTAB nTab )
     return bValid;
 }
 
-void ScDocument::ClearTabs()
-{
-    for (auto& it: maTabs)
-    {
-        delete it;
-    }
-    maTabs.clear();
-}
-
 bool ScDocument::DeleteTabs( SCTAB nTab, SCTAB nSheets )
 {
     bool bValid = false;
commit f474e2240994d57de1586f88919e9abc1b46a33b
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Thu Dec 7 21:58:16 2017 -0500

    Take into account the fact that ScDocument already has one sheet.
    
    ScDocument already has one sheet upon creation, so we need to avoid
    appending sheet when the request is for the first sheet.
    
    Change-Id: Ie5526d6791e545f5faa0bf3f16988351c09e94c8

diff --git a/sc/inc/documentimport.hxx b/sc/inc/documentimport.hxx
index 00496cdaac2b..03f415c381cc 100644
--- a/sc/inc/documentimport.hxx
+++ b/sc/inc/documentimport.hxx
@@ -87,6 +87,7 @@ public:
     SCTAB getSheetIndex(const OUString& rName) const;
     SCTAB getSheetCount() const;
     bool appendSheet(const OUString& rName);
+    void setSheetName(SCTAB nTab, const OUString& rName);
 
     void setOriginDate(sal_uInt16 nYear, sal_uInt16 nMonth, sal_uInt16 nDay);
 
diff --git a/sc/source/core/data/documentimport.cxx b/sc/source/core/data/documentimport.cxx
index c46f1b09c95d..c41e134558bf 100644
--- a/sc/source/core/data/documentimport.cxx
+++ b/sc/source/core/data/documentimport.cxx
@@ -167,6 +167,11 @@ bool ScDocumentImport::appendSheet(const OUString& rName)
     return true;
 }
 
+void ScDocumentImport::setSheetName(SCTAB nTab, const OUString& rName)
+{
+    mpImpl->mrDoc.SetTabNameOnLoad(nTab, rName);
+}
+
 void ScDocumentImport::setOriginDate(sal_uInt16 nYear, sal_uInt16 nMonth, sal_uInt16 nDay)
 {
     if (!mpImpl->mrDoc.pDocOptions)
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 4a2f5567f583..eff9570e66c3 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -85,9 +85,19 @@ ScOrcusFactory::ScOrcusFactory(ScDocument& rDoc) :
     mnProgress(0) {}
 
 orcus::spreadsheet::iface::import_sheet* ScOrcusFactory::append_sheet(
-    orcus::spreadsheet::sheet_t /*sheet_index*/, const char* sheet_name, size_t sheet_name_length)
+    orcus::spreadsheet::sheet_t sheet_index, const char* sheet_name, size_t sheet_name_length)
 {
     OUString aTabName(sheet_name, sheet_name_length, RTL_TEXTENCODING_UTF8);
+
+    if (sheet_index == 0)
+    {
+        // The calc document initializes with one sheet already present.
+        assert(maDoc.getSheetCount() == 1);
+        maDoc.setSheetName(0, aTabName);
+        maSheets.push_back(o3tl::make_unique<ScOrcusSheet>(maDoc, 0, *this));
+        return maSheets.back().get();
+    }
+
     if (!maDoc.appendSheet(aTabName))
         return nullptr;
 
diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index fbbdd0b64e53..8683749fdd7c 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -55,7 +55,7 @@ uno::Reference<task::XStatusIndicator> getStatusIndicator(const SfxMedium& rMedi
     return xStatusIndicator;
 }
 
-bool loadFileContent(ScDocument& rDoc, SfxMedium& rMedium, orcus::iface::import_filter& filter)
+bool loadFileContent(SfxMedium& rMedium, orcus::iface::import_filter& filter)
 {
     SvStream* pStream = rMedium.GetInStream();
     pStream->Seek(0);
@@ -72,7 +72,6 @@ bool loadFileContent(ScDocument& rDoc, SfxMedium& rMedium, orcus::iface::import_
 
     try
     {
-        rDoc.ClearTabs();
         filter.read_stream(aBuffer.getStr(), aBuffer.getLength());
     }
     catch (const std::exception& e)
@@ -98,7 +97,7 @@ bool ScOrcusFiltersImpl::importCSV(ScDocument& rDoc, SfxMedium& rMedium) const
     aFactory.setStatusIndicator(getStatusIndicator(rMedium));
 
     orcus::orcus_csv filter(&aFactory);
-    return loadFileContent(rDoc, rMedium, filter);
+    return loadFileContent(rMedium, filter);
 }
 
 bool ScOrcusFiltersImpl::importGnumeric(ScDocument& rDoc, SfxMedium& rMedium) const
@@ -107,7 +106,7 @@ bool ScOrcusFiltersImpl::importGnumeric(ScDocument& rDoc, SfxMedium& rMedium) co
     aFactory.setStatusIndicator(getStatusIndicator(rMedium));
 
     orcus::orcus_gnumeric filter(&aFactory);
-    return loadFileContent(rDoc, rMedium, filter);
+    return loadFileContent(rMedium, filter);
 }
 
 bool ScOrcusFiltersImpl::importExcel2003XML(ScDocument& rDoc, SfxMedium& rMedium) const
@@ -116,7 +115,7 @@ bool ScOrcusFiltersImpl::importExcel2003XML(ScDocument& rDoc, SfxMedium& rMedium
     aFactory.setStatusIndicator(getStatusIndicator(rMedium));
 
     orcus::orcus_xls_xml filter(&aFactory);
-    return loadFileContent(rDoc, rMedium, filter);
+    return loadFileContent(rMedium, filter);
 }
 
 bool ScOrcusFiltersImpl::importXLSX(ScDocument& rDoc, SfxMedium& rMedium) const
@@ -125,7 +124,7 @@ bool ScOrcusFiltersImpl::importXLSX(ScDocument& rDoc, SfxMedium& rMedium) const
     aFactory.setStatusIndicator(getStatusIndicator(rMedium));
 
     orcus::orcus_xlsx filter(&aFactory);
-    return loadFileContent(rDoc, rMedium, filter);
+    return loadFileContent(rMedium, filter);
 }
 
 bool ScOrcusFiltersImpl::importODS(ScDocument& rDoc, SfxMedium& rMedium) const
@@ -134,7 +133,7 @@ bool ScOrcusFiltersImpl::importODS(ScDocument& rDoc, SfxMedium& rMedium) const
     aFactory.setStatusIndicator(getStatusIndicator(rMedium));
 
     orcus::orcus_ods filter(&aFactory);
-    return loadFileContent(rDoc, rMedium, filter);
+    return loadFileContent(rMedium, filter);
 }
 
 bool ScOrcusFiltersImpl::importODS_Styles(ScDocument& rDoc, OUString& aPath) const
commit 3f2467bbd123918800b3ccf3ddcf9a841d7919c6
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Thu Dec 7 21:34:40 2017 -0500

    All the other orcus-based filters should take the same code path.
    
    Change-Id: Iac96c6eb842a769d70c3f39830cbdb0e1ee93dc8

diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index 1773caa22330..fbbdd0b64e53 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -96,21 +96,9 @@ bool ScOrcusFiltersImpl::importCSV(ScDocument& rDoc, SfxMedium& rMedium) const
 {
     ScOrcusFactory aFactory(rDoc);
     aFactory.setStatusIndicator(getStatusIndicator(rMedium));
-    OString aSysPath = toSystemPath(rMedium.GetName());
-    const char* path = aSysPath.getStr();
 
-    try
-    {
-        orcus::orcus_csv filter(&aFactory);
-        filter.read_file(path);
-    }
-    catch (const std::exception&)
-    {
-        rDoc.InsertTab(SC_TAB_APPEND, "Foo");
-        rDoc.SetString(0, 0, 0, "Failed to load!!!");
-        return false;
-    }
-    return true;
+    orcus::orcus_csv filter(&aFactory);
+    return loadFileContent(rDoc, rMedium, filter);
 }
 
 bool ScOrcusFiltersImpl::importGnumeric(ScDocument& rDoc, SfxMedium& rMedium) const
@@ -135,42 +123,18 @@ bool ScOrcusFiltersImpl::importXLSX(ScDocument& rDoc, SfxMedium& rMedium) const
 {
     ScOrcusFactory aFactory(rDoc);
     aFactory.setStatusIndicator(getStatusIndicator(rMedium));
-    OString aSysPath = toSystemPath(rMedium.GetName());
-    const char* path = aSysPath.getStr();
-
-    try
-    {
-        orcus::orcus_xlsx filter(&aFactory);
-        filter.read_file(path);
-    }
-    catch (const std::exception& e)
-    {
-        SAL_WARN("sc", "Unable to load xlsx file! " << e.what());
-        return false;
-    }
 
-    return true;
+    orcus::orcus_xlsx filter(&aFactory);
+    return loadFileContent(rDoc, rMedium, filter);
 }
 
 bool ScOrcusFiltersImpl::importODS(ScDocument& rDoc, SfxMedium& rMedium) const
 {
     ScOrcusFactory aFactory(rDoc);
     aFactory.setStatusIndicator(getStatusIndicator(rMedium));
-    OString aSysPath = toSystemPath(rMedium.GetName());
-    const char* path = aSysPath.getStr();
-
-    try
-    {
-        orcus::orcus_ods filter(&aFactory);
-        filter.read_file(path);
-    }
-    catch (const std::exception& e)
-    {
-        SAL_WARN("sc", "Unable to load ods file! " << e.what());
-        return false;
-    }
 
-    return true;
+    orcus::orcus_ods filter(&aFactory);
+    return loadFileContent(rDoc, rMedium, filter);
 }
 
 bool ScOrcusFiltersImpl::importODS_Styles(ScDocument& rDoc, OUString& aPath) const
commit a5daf439828bdf7bc27f7aac3d9d79a2804e9d85
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Thu Dec 7 21:27:20 2017 -0500

    Remove code duplicates.
    
    Change-Id: I424e5999ef2ec6e71f6b6361ed91079b8d949555

diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index 6fc115bdce29..1773caa22330 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -55,6 +55,35 @@ uno::Reference<task::XStatusIndicator> getStatusIndicator(const SfxMedium& rMedi
     return xStatusIndicator;
 }
 
+bool loadFileContent(ScDocument& rDoc, SfxMedium& rMedium, orcus::iface::import_filter& filter)
+{
+    SvStream* pStream = rMedium.GetInStream();
+    pStream->Seek(0);
+    static const size_t nReadBuffer = 1024*32;
+    OStringBuffer aBuffer((int(nReadBuffer)));
+    size_t nRead = 0;
+    do
+    {
+        char pData[nReadBuffer];
+        nRead = pStream->ReadBytes(pData, nReadBuffer);
+        aBuffer.append(static_cast<sal_Char*>(pData), nRead);
+    }
+    while (nRead == nReadBuffer);
+
+    try
+    {
+        rDoc.ClearTabs();
+        filter.read_stream(aBuffer.getStr(), aBuffer.getLength());
+    }
+    catch (const std::exception& e)
+    {
+        SAL_WARN("sc", "Unable to load file via orcus filter! " << e.what());
+        return false;
+    }
+
+    return true;
+}
+
 }
 
 OString ScOrcusFiltersImpl::toSystemPath(const OUString& rPath)
@@ -88,64 +117,18 @@ bool ScOrcusFiltersImpl::importGnumeric(ScDocument& rDoc, SfxMedium& rMedium) co
 {
     ScOrcusFactory aFactory(rDoc);
     aFactory.setStatusIndicator(getStatusIndicator(rMedium));
-    SvStream* pStream = rMedium.GetInStream();
-    pStream->Seek(0);
-    static const size_t nReadBuffer = 1024*32;
-    OStringBuffer aBuffer((int(nReadBuffer)));
-    size_t nRead = 0;
-    do
-    {
-        char pData[nReadBuffer];
-        nRead = pStream->ReadBytes(pData, nReadBuffer);
-        aBuffer.append(static_cast<sal_Char*>(pData), nRead);
-    }
-    while (nRead == nReadBuffer);
-
-    try
-    {
-        rDoc.ClearTabs();
-        orcus::orcus_gnumeric filter(&aFactory);
-        filter.read_stream(aBuffer.getStr(), aBuffer.getLength());
-    }
-    catch (const std::exception& e)
-    {
-        SAL_WARN("sc", "Unable to load gnumeric file! " << e.what());
-        return false;
-    }
 
-    return true;
+    orcus::orcus_gnumeric filter(&aFactory);
+    return loadFileContent(rDoc, rMedium, filter);
 }
 
 bool ScOrcusFiltersImpl::importExcel2003XML(ScDocument& rDoc, SfxMedium& rMedium) const
 {
     ScOrcusFactory aFactory(rDoc);
     aFactory.setStatusIndicator(getStatusIndicator(rMedium));
-    SvStream* pStream = rMedium.GetInStream();
-    pStream->Seek(0);
-    static const size_t nReadBuffer = 1024*32;
-    OStringBuffer aBuffer((int(nReadBuffer)));
-    size_t nRead = 0;
-    do
-    {
-        char pData[nReadBuffer];
-        nRead = pStream->ReadBytes(pData, nReadBuffer);
-        aBuffer.append(static_cast<sal_Char*>(pData), nRead);
-    }
-    while (nRead == nReadBuffer);
-
-    try
-    {
-        rDoc.ClearTabs();
-        orcus::orcus_xls_xml filter(&aFactory);
-        filter.read_stream(aBuffer.getStr(), aBuffer.getLength());
-    }
-    catch (const std::exception& e)
-    {
-        SAL_WARN("sc", "Unable to load Excel 2003 XML file! " << e.what());
-        return false;
-    }
 
-    return true;
+    orcus::orcus_xls_xml filter(&aFactory);
+    return loadFileContent(rDoc, rMedium, filter);
 }
 
 bool ScOrcusFiltersImpl::importXLSX(ScDocument& rDoc, SfxMedium& rMedium) const
commit c1cadfb75dfc34b84f1608c11bb597e54a4eeaaf
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Sun Dec 3 21:25:53 2017 -0500

    Initial step on enabling the orcus-based Excel 2003 XML filter.
    
    Still some work remains in the orcus interface implementation code
    in sc.
    
    Change-Id: Idc4d95b489e8e55fbe3593557399610abe6c4ae0

diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
index f7c531bccbfe..4ef9adb18431 100644
--- a/filter/Configuration_filter.mk
+++ b/filter/Configuration_filter.mk
@@ -509,6 +509,7 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_calc_filters.x
 	MS_Excel_95_Vorlage_Template \
 	MS_Excel_97 \
 	MS_Excel_97_Vorlage_Template \
+	MS_Excel_2003_XML_Orcus \
 	Rich_Text_Format__StarCalc_ \
 	SYLK \
 	StarOffice_XML__Calc_ \
diff --git a/filter/source/config/fragments/filters/MS_Excel_2003_XML.xcu b/filter/source/config/fragments/filters/MS_Excel_2003_XML.xcu
index 729a73a93c7d..a0fc95939039 100644
--- a/filter/source/config/fragments/filters/MS_Excel_2003_XML.xcu
+++ b/filter/source/config/fragments/filters/MS_Excel_2003_XML.xcu
@@ -16,7 +16,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 -->
     <node oor:name="MS Excel 2003 XML" oor:op="replace">
-        <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER</value></prop>
+        <prop oor:name="Flags"><value>EXPORT ALIEN 3RDPARTYFILTER</value></prop>
         <prop oor:name="UIComponent"/>
         <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.XmlFilterAdaptor</value></prop>
         <prop oor:name="UserData"><value oor:separator=",">com.sun.star.documentconversion.XSLTFilter,,com.sun.star.comp.Calc.XMLOasisImporter,com.sun.star.comp.Calc.XMLOasisExporter,../$(share_subdir_name)/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl,../$(share_subdir_name)/xslt/export/spreadsheetml/ooo2spreadsheetml.xsl</value></prop>
diff --git a/filter/source/config/fragments/filters/MS_Excel_2003_XML_Orcus.xcu b/filter/source/config/fragments/filters/MS_Excel_2003_XML_Orcus.xcu
new file mode 100644
index 000000000000..2206b02747db
--- /dev/null
+++ b/filter/source/config/fragments/filters/MS_Excel_2003_XML_Orcus.xcu
@@ -0,0 +1,19 @@
+<!--
+ * 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/.
+-->
+<node oor:name="MS Excel 2003 XML Orcus" oor:op="replace">
+    <prop oor:name="Flags"><value>IMPORT ALIEN PREFERRED</value></prop>
+    <prop oor:name="UIComponent"/>
+    <prop oor:name="FilterService"/>
+    <prop oor:name="UserData"/>
+    <prop oor:name="Type"><value>calc_MS_Excel_2003_XML</value></prop>
+    <prop oor:name="TemplateName"/>
+    <prop oor:name="DocumentService"><value>com.sun.star.sheet.SpreadsheetDocument</value></prop>
+    <prop oor:name="UIName">
+        <value xml:lang="en-US">Microsoft Excel 2003 XML</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/types/calc_MS_Excel_2003_XML.xcu b/filter/source/config/fragments/types/calc_MS_Excel_2003_XML.xcu
index a0b3d90f2ff3..a3ee903b9ac4 100644
--- a/filter/source/config/fragments/types/calc_MS_Excel_2003_XML.xcu
+++ b/filter/source/config/fragments/types/calc_MS_Excel_2003_XML.xcu
@@ -16,12 +16,12 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 -->
     <node oor:name="calc_MS_Excel_2003_XML" oor:op="replace">
-        <prop oor:name="DetectService"><value>com.sun.star.comp.filters.XMLFilterDetect</value></prop>
+        <prop oor:name="DetectService"><value>com.sun.star.comp.sc.OrcusFilterDetect</value></prop>
         <prop oor:name="URLPattern"/>
         <prop oor:name="Extensions"><value>xml xls</value></prop>
         <prop oor:name="MediaType"/>
         <prop oor:name="Preferred"><value>false</value></prop>
-        <prop oor:name="PreferredFilter"><value>MS Excel 2003 XML</value></prop>
+        <prop oor:name="PreferredFilter"/>
         <prop oor:name="UIName">
             <value xml:lang="en-US">Microsoft Excel 2003 XML</value>
         </prop>
diff --git a/sc/inc/orcusfilters.hxx b/sc/inc/orcusfilters.hxx
index e96facbaa6e3..1f96d6ac1769 100644
--- a/sc/inc/orcusfilters.hxx
+++ b/sc/inc/orcusfilters.hxx
@@ -31,6 +31,8 @@ public:
 
     virtual bool importGnumeric(ScDocument& rDoc, SfxMedium& rMedium) const = 0;
 
+    virtual bool importExcel2003XML(ScDocument& rDoc, SfxMedium& rMedium) const = 0;
+
     virtual bool importXLSX(ScDocument& rDoc, SfxMedium& rMedium) const = 0;
 
     virtual bool importODS(ScDocument& rDoc, SfxMedium& rMedium) const = 0;
diff --git a/sc/source/filter/inc/orcusfiltersimpl.hxx b/sc/source/filter/inc/orcusfiltersimpl.hxx
index ee69df00b552..48011504fc5b 100644
--- a/sc/source/filter/inc/orcusfiltersimpl.hxx
+++ b/sc/source/filter/inc/orcusfiltersimpl.hxx
@@ -21,6 +21,7 @@ public:
 
     virtual bool importCSV(ScDocument& rDoc, SfxMedium& rMedium) const override;
     virtual bool importGnumeric(ScDocument& rDoc, SfxMedium& rMedium) const override;
+    virtual bool importExcel2003XML(ScDocument& rDoc, SfxMedium& rMedium) const override;
     virtual bool importXLSX(ScDocument& rDoc, SfxMedium& rMedium) const override;
     virtual bool importODS(ScDocument& rDoc, SfxMedium& rMedium) const override;
 
diff --git a/sc/source/filter/orcus/filterdetect.cxx b/sc/source/filter/orcus/filterdetect.cxx
index 861c351f0611..4503de7249ec 100644
--- a/sc/source/filter/orcus/filterdetect.cxx
+++ b/sc/source/filter/orcus/filterdetect.cxx
@@ -80,8 +80,16 @@ OUString OrcusFormatDetect::detect(css::uno::Sequence<css::beans::PropertyValue>
     }
 
     orcus::format_t eFormat = orcus::detect(reinterpret_cast<const unsigned char*>(aContent.getStr()), aContent.getLength());
-    if (eFormat == orcus::format_t::gnumeric)
-        return OUString("Gnumeric XML");
+
+    switch (eFormat)
+    {
+        case orcus::format_t::gnumeric:
+            return OUString("Gnumeric XML");
+        case orcus::format_t::xls_xml:
+            return OUString("calc_MS_Excel_2003_XML");
+        default:
+            ;
+    }
 
     return OUString();
 }
diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index 2aa7e8b30dc0..6fc115bdce29 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -25,6 +25,7 @@
 #include <orcus/orcus_csv.hpp>
 #include <orcus/orcus_gnumeric.hpp>
 #include <orcus/orcus_xlsx.hpp>
+#include <orcus/orcus_xls_xml.hpp>
 #include <orcus/orcus_ods.hpp>
 #include <orcus/orcus_import_ods.hpp>
 #include <orcus/global.hpp>
@@ -115,6 +116,38 @@ bool ScOrcusFiltersImpl::importGnumeric(ScDocument& rDoc, SfxMedium& rMedium) co
     return true;
 }
 
+bool ScOrcusFiltersImpl::importExcel2003XML(ScDocument& rDoc, SfxMedium& rMedium) const
+{
+    ScOrcusFactory aFactory(rDoc);
+    aFactory.setStatusIndicator(getStatusIndicator(rMedium));
+    SvStream* pStream = rMedium.GetInStream();
+    pStream->Seek(0);
+    static const size_t nReadBuffer = 1024*32;
+    OStringBuffer aBuffer((int(nReadBuffer)));
+    size_t nRead = 0;
+    do
+    {
+        char pData[nReadBuffer];
+        nRead = pStream->ReadBytes(pData, nReadBuffer);
+        aBuffer.append(static_cast<sal_Char*>(pData), nRead);
+    }
+    while (nRead == nReadBuffer);
+
+    try
+    {
+        rDoc.ClearTabs();
+        orcus::orcus_xls_xml filter(&aFactory);
+        filter.read_stream(aBuffer.getStr(), aBuffer.getLength());
+    }
+    catch (const std::exception& e)
+    {
+        SAL_WARN("sc", "Unable to load Excel 2003 XML file! " << e.what());
+        return false;
+    }
+
+    return true;
+}
+
 bool ScOrcusFiltersImpl::importXLSX(ScDocument& rDoc, SfxMedium& rMedium) const
 {
     ScOrcusFactory aFactory(rDoc);
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index a5cea0179018..d6f47b5d5f39 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -1168,6 +1168,14 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
 
             bRet = pOrcus->importGnumeric(aDocument, rMedium);
         }
+        else if (aFltName == "MS Excel 2003 XML Orcus")
+        {
+            ScOrcusFilters* pOrcus = ScFormatFilter::Get().GetOrcusFilters();
+            if (!pOrcus)
+                return false;
+
+            bRet = pOrcus->importExcel2003XML(aDocument, rMedium);
+        }
         else if (aFltName == pFilterAscii)
         {
             SfxItemSet*  pSet = rMedium.GetItemSet();
commit 05bc203c3aa15ec01cc71a18ff8928c62e06eb9e
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Sat Dec 9 15:23:12 2017 -0500

    Fix inconsistent naming of a variable.
    
    Change-Id: I769d95a9800919b2241d48de246bee7fdbaa7996
    Reviewed-on: https://gerrit.libreoffice.org/46170
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>

diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index 465014b0caf4..af5020c8ace4 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -296,7 +296,7 @@ private:
     {
         struct border_line
         {
-            SvxBorderLineStyle mestyle;
+            SvxBorderLineStyle meStyle;
             Color maColor;
             double mnWidth;
 
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 50b009cae3b9..4a2f5567f583 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -863,7 +863,7 @@ ScOrcusStyles::border::border():
 }
 
 ScOrcusStyles::border::border_line::border_line():
-    mestyle(SvxBorderLineStyle::SOLID),
+    meStyle(SvxBorderLineStyle::SOLID),
     maColor(COL_WHITE),
     mnWidth(0)
 {
@@ -907,17 +907,17 @@ void ScOrcusStyles::border::applyToItemSet(SfxItemSet& rSet) const
 
         if (current_border_line.first == orcus::spreadsheet::border_direction_t::diagonal_tl_br)
         {
-            editeng::SvxBorderLine aLine(&current_border_line.second.maColor, current_border_line.second.mnWidth, current_border_line.second.mestyle);
+            editeng::SvxBorderLine aLine(&current_border_line.second.maColor, current_border_line.second.mnWidth, current_border_line.second.meStyle);
             aDiagonal_TLBR.SetLine(&aLine);
         }
         else if (current_border_line.first == orcus::spreadsheet::border_direction_t::diagonal_bl_tr)
         {
-            editeng::SvxBorderLine aLine(&current_border_line.second.maColor, current_border_line.second.mnWidth, current_border_line.second.mestyle);
+            editeng::SvxBorderLine aLine(&current_border_line.second.maColor, current_border_line.second.mnWidth, current_border_line.second.meStyle);
             aDiagonal_BLTR.SetLine(&aLine);
         }
         else
         {
-            editeng::SvxBorderLine aLine(&current_border_line.second.maColor, current_border_line.second.mnWidth, current_border_line.second.mestyle);
+            editeng::SvxBorderLine aLine(&current_border_line.second.maColor, current_border_line.second.mnWidth, current_border_line.second.meStyle);
             aBoxItem.SetLine(&aLine, eDir);
         }
     }
@@ -1305,32 +1305,32 @@ void ScOrcusStyles::set_border_style(
         case orcus::spreadsheet::border_style_t::medium:
         case orcus::spreadsheet::border_style_t::thick:
         case orcus::spreadsheet::border_style_t::thin:
-            current_line.mestyle = SvxBorderLineStyle::SOLID;
+            current_line.meStyle = SvxBorderLineStyle::SOLID;
             break;
         case orcus::spreadsheet::border_style_t::dash_dot:
-            current_line.mestyle = SvxBorderLineStyle::DASH_DOT;
+            current_line.meStyle = SvxBorderLineStyle::DASH_DOT;
             break;
         case orcus::spreadsheet::border_style_t::dash_dot_dot:
-            current_line.mestyle = SvxBorderLineStyle::DASH_DOT_DOT;
+            current_line.meStyle = SvxBorderLineStyle::DASH_DOT_DOT;
             break;
         case orcus::spreadsheet::border_style_t::dashed:
-            current_line.mestyle = SvxBorderLineStyle::DASHED;
+            current_line.meStyle = SvxBorderLineStyle::DASHED;
             break;
         case orcus::spreadsheet::border_style_t::dotted:
-            current_line.mestyle = SvxBorderLineStyle::DOTTED;
+            current_line.meStyle = SvxBorderLineStyle::DOTTED;
             break;
         case orcus::spreadsheet::border_style_t::double_border:
-            current_line.mestyle = SvxBorderLineStyle::DOUBLE;
+            current_line.meStyle = SvxBorderLineStyle::DOUBLE;
             break;
         case orcus::spreadsheet::border_style_t::medium_dash_dot:
         case orcus::spreadsheet::border_style_t::slant_dash_dot:
-            current_line.mestyle = SvxBorderLineStyle::DASH_DOT;
+            current_line.meStyle = SvxBorderLineStyle::DASH_DOT;
             break;
         case orcus::spreadsheet::border_style_t::medium_dash_dot_dot:
-            current_line.mestyle = SvxBorderLineStyle::DASH_DOT_DOT;
+            current_line.meStyle = SvxBorderLineStyle::DASH_DOT_DOT;
             break;
         case orcus::spreadsheet::border_style_t::medium_dashed:
-            current_line.mestyle = SvxBorderLineStyle::DASHED;
+            current_line.meStyle = SvxBorderLineStyle::DASHED;
             break;
         default:
             ;
commit 202f46bfdeca9110ee37a06c848c505a05739a8f
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Sat Dec 9 22:17:44 2017 +0200

    tdf#114261 Retain toolbar:style after customization
    
    Change-Id: I50170a2433f5e20809dd5bca8cb764039e8e0d84
    Reviewed-on: https://gerrit.libreoffice.org/46169
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>

diff --git a/cui/source/customize/SvxConfigPageHelper.cxx b/cui/source/customize/SvxConfigPageHelper.cxx
index 0a182e13ec1b..18da75eb2c6e 100644
--- a/cui/source/customize/SvxConfigPageHelper.cxx
+++ b/cui/source/customize/SvxConfigPageHelper.cxx
@@ -412,7 +412,7 @@ css::uno::Sequence< css::beans::PropertyValue > SvxConfigPageHelper::ConvertSvxC
 css::uno::Sequence< css::beans::PropertyValue > SvxConfigPageHelper::ConvertToolbarEntry(
     const SvxConfigEntry* pEntry )
 {
-    css::uno::Sequence< css::beans::PropertyValue > aPropSeq( 4 );
+    css::uno::Sequence< css::beans::PropertyValue > aPropSeq( 5 );
 
     aPropSeq[0].Name = ITEM_DESCRIPTOR_COMMANDURL;
     aPropSeq[0].Value <<= pEntry->GetCommand();
@@ -436,6 +436,9 @@ css::uno::Sequence< css::beans::PropertyValue > SvxConfigPageHelper::ConvertTool
     aPropSeq[3].Name = ITEM_DESCRIPTOR_ISVISIBLE;
     aPropSeq[3].Value <<= pEntry->IsVisible();
 
+    aPropSeq[4].Name = ITEM_DESCRIPTOR_STYLE;
+    aPropSeq[4].Value <<= static_cast<sal_Int16>(pEntry->GetStyle());
+
     return aPropSeq;
 }
 
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index 5e65de3a830a..b8bf3fcd7020 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -330,7 +330,7 @@ public:
     const css::uno::Reference< css::graphic::XGraphic >& GetBackupGraphic()
                 { return xBackupGraphic; }
 
-    sal_Int32   GetStyle() { return nStyle; }
+    sal_Int32   GetStyle() const { return nStyle; }
     void        SetStyle( sal_Int32 style ) { nStyle = style; }
 };
 
commit c7755e615918c1a0cb3245f75334ba08f69ac226
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Fri Dec 8 21:08:29 2017 -0500

    Remove __ORCUS_STATIC_LIB defines.
    
    Since orcus is now integrated as dynamic shared libraries, we don't
    need these defines (in theory).
    
    Change-Id: I33ea2e862ecc23becf5d01173d3fb31c03797159
    Reviewed-on: https://gerrit.libreoffice.org/46166
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>

diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index b53c8377e1a0..117c4d21e9e8 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -23,9 +23,6 @@
 #include <cppunit/Asserter.h>
 #include <cppunit/AdditionalMessage.h>
 
-#if defined(_WIN32)
-#define __ORCUS_STATIC_LIB
-#endif
 #include <orcus/csv_parser.hpp>
 
 #include <fstream>
diff --git a/sc/source/filter/inc/orcusfiltersimpl.hxx b/sc/source/filter/inc/orcusfiltersimpl.hxx
index 27604fbd7a19..ee69df00b552 100644
--- a/sc/source/filter/inc/orcusfiltersimpl.hxx
+++ b/sc/source/filter/inc/orcusfiltersimpl.hxx
@@ -12,7 +12,6 @@
 
 #include <orcusfilters.hxx>
 
-#define __ORCUS_STATIC_LIB
 #include <orcus/xml_namespace.hpp>
 
 class ScOrcusFiltersImpl : public ScOrcusFilters
diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index c19cf038ee7b..465014b0caf4 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -24,7 +24,6 @@
 #include <rtl/strbuf.hxx>
 #include <editeng/borderline.hxx>
 
-#define __ORCUS_STATIC_LIB
 #include <orcus/spreadsheet/import_interface.hpp>
 
 #include <memory>
@@ -182,7 +181,6 @@ public:
 
     virtual void set_row_hidden(orcus::spreadsheet::row_t row, bool hidden) override;
 
-
     virtual void set_merge_cell_range(const orcus::spreadsheet::range_t& range) override;
 };
 
diff --git a/sc/source/ui/dataprovider/csvdataprovider.cxx b/sc/source/ui/dataprovider/csvdataprovider.cxx
index 1d61996f7a6e..a6850edec3de 100644
--- a/sc/source/ui/dataprovider/csvdataprovider.cxx
+++ b/sc/source/ui/dataprovider/csvdataprovider.cxx
@@ -11,11 +11,6 @@
 #include <datatransformation.hxx>
 #include <stringutil.hxx>
 
-#if defined(_WIN32)
-#if !defined __ORCUS_STATIC_LIB // avoid -Werror,-Wunused-macros
-#define __ORCUS_STATIC_LIB
-#endif
-#endif
 #include <orcus/csv_parser.hpp>
 
 namespace {
diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx
index f74feb7a7d06..eea81a1f41ae 100644
--- a/sc/source/ui/docshell/datastream.cxx
+++ b/sc/source/ui/docshell/datastream.cxx
@@ -29,10 +29,6 @@
 
 #include <officecfg/Office/Calc.hxx>
 
-
-#if defined(_WIN32)
-#define __ORCUS_STATIC_LIB
-#endif
 #include <orcus/csv_parser.hpp>
 
 #include <queue>
diff --git a/sc/source/ui/inc/dataprovider.hxx b/sc/source/ui/inc/dataprovider.hxx
index 14637a49703f..61d1e112f14f 100644
--- a/sc/source/ui/inc/dataprovider.hxx
+++ b/sc/source/ui/inc/dataprovider.hxx
@@ -33,10 +33,6 @@
 
 #include <officecfg/Office/Calc.hxx>
 
-#if defined(_WIN32)
-#define __ORCUS_STATIC_LIB
-#endif
-
 #include <orcus/csv_parser.hpp>
 
 class SvStream;
commit e9bac78922c70ad374ae4ca15d6f2258668697b7
Author: László Németh <nemeth at numbertext.org>
Date:   Wed Dec 6 18:30:20 2017 +0100

    Updated core
    Project: dictionaries  daa1165deae904b035dae296e97811fb2c4f771d
    
    tdf#95024 update Hungarian spelling dictionary
    
    – improved affix rules
    
    – extended pronunciation and common misspelling data for
      improved Hunspell suggestions
    
    - new and fixed words
    
    Change-Id: Ib8b9c371abcb764c3225180be2f0d6a21f757f09
    Reviewed-on: https://gerrit.libreoffice.org/45975
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/dictionaries b/dictionaries
index 16bfcddaad3e..daa1165deae9 160000
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit 16bfcddaad3e545a32ba2b5bfb6a6463e2ab1f68
+Subproject commit daa1165deae904b035dae296e97811fb2c4f771d
commit 4bd0f84d87c16b8dba4c31384c18d644c8f3470d
Author: Ricardo Palomares <rpmdisguise-java at yahoo.es>
Date:   Sat Dec 9 14:42:02 2017 +0100

    Updated core
    Project: dictionaries  16bfcddaad3e545a32ba2b5bfb6a6463e2ab1f68
    
    Bring shipped Spanish dictionary up to version 2.2
    
    Change-Id: Ia877b81fa5ecd021315643b1db49cfadebcdde1e
    Reviewed-on: https://gerrit.libreoffice.org/46142
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/dictionaries b/dictionaries
index 56684558fb8b..16bfcddaad3e 160000
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit 56684558fb8bdb05cf8bc3e4c183e78de630dd6d
+Subproject commit 16bfcddaad3e545a32ba2b5bfb6a6463e2ab1f68
commit 591ed2391389120efdf366f207642a98eb9f054c
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Fri Dec 8 02:38:10 2017 +0200

    tdf#113715 Fix .uno: names appearing in the customization dialog
    
    Change-Id: Ia4a4231acf2f15ebf58f2acd02b7fc0ab5a88072
    Reviewed-on: https://gerrit.libreoffice.org/46062
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Heiko Tietze <tietze.heiko at googlemail.com>
    Tested-by: Heiko Tietze <tietze.heiko at googlemail.com>
    Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>
    Tested-by: Maxim Monastirsky <momonasmon at gmail.com>

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index c91b33b9fe9e..4d25cc30a9f3 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
@@ -1879,14 +1879,6 @@
           <value>1</value>
         </prop>
       </node>
-      <node oor:name=".uno:AutoSum" oor:op="replace">
-        <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">Sum</value>
-        </prop>
-        <prop oor:name="Properties" oor:type="xs:int">
-          <value>1</value>
-        </prop>
-      </node>
       <node oor:name=".uno:TableSort" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
           <value xml:lang="en-US">So~rt...</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 791ebefce51b..0c70d811a465 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -6029,6 +6029,14 @@
           <value>1</value>
         </prop>
       </node>
+      <node oor:name=".uno:AutoSum" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+          <value xml:lang="en-US">Sum</value>
+        </prop>
+        <prop oor:name="Properties" oor:type="xs:int">
+          <value>1</value>
+        </prop>
+      </node>
       <node oor:name=".uno:ThesaurusFromContext" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
           <value xml:lang="en-US">Synony~ms</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 08127c537ee1..2c3c827be9c4 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -2393,14 +2393,6 @@
           <value xml:lang="en-US">Go to Previous Index Mark</value>
         </prop>
       </node>
-      <node oor:name=".uno:AutoSum" oor:op="replace">
-        <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">Sum</value>
-        </prop>
-        <prop oor:name="Properties" oor:type="xs:int">
-          <value>1</value>
-        </prop>
-      </node>
       <node oor:name=".uno:GotoNextTableFormula" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
           <value xml:lang="en-US">Go to next table formula</value>
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index 22a66319cd53..decb76cfc659 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -193,7 +193,11 @@ interface CellSelection
     SID_CHARMAP_CONTROL [ ExecMethod = ExecuteEdit; StateMethod = GetCellState; ]
 
     SID_INSERT_POSTIT   [ ExecMethod = ExecuteEdit; StateMethod = GetCellState; ]
-    SID_EDIT_POSTIT   [ ExecMethod = ExecuteEdit; StateMethod = GetCellState; ]
+    SID_EDIT_POSTIT
+    [
+        ExecMethod = ExecuteEdit; StateMethod = GetCellState;
+        ToolBoxConfig, MenuConfig , AccelConfig;
+    ]
 
     SID_TABOP               [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
     SID_CONSOLIDATE         [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 071ed56e250f..e06f17bd4695 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -2228,7 +2228,7 @@ SfxVoidItem SearchResultsDialog SID_SEARCH_RESULTS_DIALOG
     RecordAbsolute = FALSE,
     RecordPerSet;
 
-    AccelConfig = TRUE,
+    AccelConfig = FALSE,
     MenuConfig = FALSE,
     ToolBoxConfig = FALSE,
     GroupId = SfxGroupId::Options;
diff --git a/starmath/sdi/smath.sdi b/starmath/sdi/smath.sdi
index bf564dcf88cc..0ee7306938ca 100644
--- a/starmath/sdi/smath.sdi
+++ b/starmath/sdi/smath.sdi
@@ -228,9 +228,9 @@ SfxVoidItem InsertCommandText SID_INSERTCOMMANDTEXT
     RecordPerSet;
     Asynchron;
 
-    AccelConfig = TRUE,
-    MenuConfig = TRUE,
-    ToolBoxConfig = TRUE,
+    AccelConfig = FALSE,
+    MenuConfig = FALSE,
+    ToolBoxConfig = FALSE,
     GroupId = SfxGroupId::Insert;
 ]
 
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 3d684944a963..eed15720caa9 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -4491,9 +4491,9 @@ SfxVoidItem EditAnnotation SID_EDIT_POSTIT
     RecordAbsolute = FALSE,
     RecordPerSet;
 
-    AccelConfig = TRUE,
-    MenuConfig = TRUE,
-    ToolBoxConfig = TRUE,
+    AccelConfig = FALSE,
+    MenuConfig = FALSE,
+    ToolBoxConfig = FALSE,
     GroupId = SfxGroupId::Edit;
 ]
 
@@ -6166,7 +6166,7 @@ SvxSizeItem AttributePageSize SID_ATTR_PAGE_SIZE
 
     AccelConfig = FALSE,
     MenuConfig = FALSE,
-    ToolBoxConfig = TRUE,
+    ToolBoxConfig = FALSE,
     GroupId = SfxGroupId::Format;
 ]
 
diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi
index b31c42112be6..099033a1a278 100644
--- a/sw/sdi/_viewsh.sdi
+++ b/sw/sdi/_viewsh.sdi
@@ -430,6 +430,7 @@ interface BaseTextEditView
     [
         ExecMethod = Execute ;
         StateMethod = GetState ;
+        ToolBoxConfig;
     ]
     SID_ATTR_PAGE_MAXSIZE // status()
     [
commit e730c6ad094d63f133b338d111923dfade87d634
Author: andreas kainz <kainz.a at gmail.com>
Date:   Sat Dec 9 19:21:05 2017 +0100

    breeze-icons: update links.txt file
    
    Change-Id: Id6df93fdbc773f641b11c9340dccf1870e5579b6
    Reviewed-on: https://gerrit.libreoffice.org/46159
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: andreas_kainz <kainz.a at gmail.com>

diff --git a/icon-themes/breeze/links.txt b/icon-themes/breeze/links.txt
index f75980cd25e6..5c7a13247d97 100644
--- a/icon-themes/breeze/links.txt
+++ b/icon-themes/breeze/links.txt
@@ -1327,6 +1327,7 @@ sw/res/sf02.png cmd/sc_charfontname.png
 sw/res/sf03.png cmd/sc_diagramarea.png
 sw/res/sf04.png cmd/sc_showsinglepage.png
 sw/res/sf05.png cmd/sc_defaultbullet.png
+sw/res/sf06.png cmd/sc_inserttable.png
 
 sw/res/sr20000.png cmd/sc_downsearch.png
 sw/res/sr20001.png cmd/sc_upsearch.png
@@ -1372,8 +1373,8 @@ xmlsecurity/res/key_12.png dbaccess/res/pkey.png
 xmlsecurity/res/signet_11x16.png xmlsecurity/res/notcertificate_16.png
 
 cmd/lc_columnoperations.png cmd/lc_entirecolumn.png
-cmd/sc_columnoperations.png cmd/sc_entirecolumn.png 
-cmd/lc_rowoperations.png cmd/lc_entirerow.png 
+cmd/sc_columnoperations.png cmd/sc_entirecolumn.png
+cmd/lc_rowoperations.png cmd/lc_entirerow.png
 cmd/sc_rowoperations.png cmd/sc_entirerow.png
 
 cmd/sc_cellprotection.png cmd/sc_protect.png
diff --git a/icon-themes/breeze_dark/links.txt b/icon-themes/breeze_dark/links.txt
index f75980cd25e6..5c7a13247d97 100644
--- a/icon-themes/breeze_dark/links.txt
+++ b/icon-themes/breeze_dark/links.txt
@@ -1327,6 +1327,7 @@ sw/res/sf02.png cmd/sc_charfontname.png
 sw/res/sf03.png cmd/sc_diagramarea.png
 sw/res/sf04.png cmd/sc_showsinglepage.png
 sw/res/sf05.png cmd/sc_defaultbullet.png
+sw/res/sf06.png cmd/sc_inserttable.png
 
 sw/res/sr20000.png cmd/sc_downsearch.png
 sw/res/sr20001.png cmd/sc_upsearch.png
@@ -1372,8 +1373,8 @@ xmlsecurity/res/key_12.png dbaccess/res/pkey.png
 xmlsecurity/res/signet_11x16.png xmlsecurity/res/notcertificate_16.png
 
 cmd/lc_columnoperations.png cmd/lc_entirecolumn.png
-cmd/sc_columnoperations.png cmd/sc_entirecolumn.png 
-cmd/lc_rowoperations.png cmd/lc_entirerow.png 
+cmd/sc_columnoperations.png cmd/sc_entirecolumn.png
+cmd/lc_rowoperations.png cmd/lc_entirerow.png
 cmd/sc_rowoperations.png cmd/sc_entirerow.png
 
 cmd/sc_cellprotection.png cmd/sc_protect.png
diff --git a/icon-themes/breeze_svg/links.txt b/icon-themes/breeze_svg/links.txt
index f75980cd25e6..5c7a13247d97 100644
--- a/icon-themes/breeze_svg/links.txt
+++ b/icon-themes/breeze_svg/links.txt
@@ -1327,6 +1327,7 @@ sw/res/sf02.png cmd/sc_charfontname.png
 sw/res/sf03.png cmd/sc_diagramarea.png
 sw/res/sf04.png cmd/sc_showsinglepage.png
 sw/res/sf05.png cmd/sc_defaultbullet.png
+sw/res/sf06.png cmd/sc_inserttable.png
 
 sw/res/sr20000.png cmd/sc_downsearch.png
 sw/res/sr20001.png cmd/sc_upsearch.png
@@ -1372,8 +1373,8 @@ xmlsecurity/res/key_12.png dbaccess/res/pkey.png
 xmlsecurity/res/signet_11x16.png xmlsecurity/res/notcertificate_16.png
 
 cmd/lc_columnoperations.png cmd/lc_entirecolumn.png
-cmd/sc_columnoperations.png cmd/sc_entirecolumn.png 
-cmd/lc_rowoperations.png cmd/lc_entirerow.png 
+cmd/sc_columnoperations.png cmd/sc_entirecolumn.png
+cmd/lc_rowoperations.png cmd/lc_entirerow.png
 cmd/sc_rowoperations.png cmd/sc_entirerow.png
 
 cmd/sc_cellprotection.png cmd/sc_protect.png
commit ab3c05f55d87984b8b5f9b9b329698cb9bdfb40b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Dec 9 19:33:44 2017 +0000

    oss-fuzz hasn't merged this yet
    
    Change-Id: I0b36af5d18d1b02b7d5193e610606c5d15f95ad0

diff --git a/bin/oss-fuzz-build.sh b/bin/oss-fuzz-build.sh
index 10759eb31cd2..c9cb2f0f1b8f 100755
--- a/bin/oss-fuzz-build.sh
+++ b/bin/oss-fuzz-build.sh
@@ -43,4 +43,4 @@ cp $SRC/xml.dict $OUT/fodsfuzzer.dict
 cp $SRC/xml.dict $OUT/fodpfuzzer.dict
 cp $SRC/xml.dict $OUT/fodgfuzzer.dict
 cp $SRC/xml.dict $OUT/mmlfuzzer.dict
-cp $SRC/html_tags.dict $OUT/htmlfuzzer.dict
+#cp $SRC/html_tags.dict $OUT/htmlfuzzer.dict
commit 95d0281447cb55b6a1bee7ff81f85c06648657cc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Dec 8 19:54:43 2017 +0000

    catch exception for disable-database-connectivity case
    
    Change-Id: I39da810c4f44b8bbb7250aad17fb12ce5420a000
    Reviewed-on: https://gerrit.libreoffice.org/46117
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 0857e0ca48e3..b426b844f311 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -60,6 +60,7 @@
 #include <com/sun/star/awt/XImageConsumer.hpp>
 #include <com/sun/star/awt/ImageStatus.hpp>
 #include <com/sun/star/form/XImageProducerSupplier.hpp>
+#include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
 #include <com/sun/star/form/XForm.hpp>
 #include <doc.hxx>
 #include <IDocumentLayoutAccess.hxx>
@@ -1299,8 +1300,14 @@ void SwHTMLParser::NewForm( bool bAppend )
     if( !rSrvcMgr.is() )
         return;
 
-    uno::Reference< XInterface > xInt = rSrvcMgr->createInstance(
-        "com.sun.star.form.component.Form" );
+    uno::Reference< XInterface > xInt;
+    try
+    {
+        xInt = rSrvcMgr->createInstance("com.sun.star.form.component.Form");
+    }
+    catch (const css::lang::ServiceNotRegisteredException&)
+    {
+    }
     if( !xInt.is() )
         return;
 
commit 7459a283b3a08397d28861dbe588c9f5826398d4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Dec 8 17:16:48 2017 +0000

    valgrind: more leaks on loading abi3279-1.html
    
    Change-Id: I88d400cdd142094ece9d829a6f54a57e1b967962
    Reviewed-on: https://gerrit.libreoffice.org/46106
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx
index ae2fb28042e7..1c65226e4108 100644
--- a/sw/inc/htmltbl.hxx
+++ b/sw/inc/htmltbl.hxx
@@ -37,11 +37,11 @@ class SwFrameFormat;
 
 class SwHTMLTableLayoutCnts
 {
-    SwHTMLTableLayoutCnts *pNext;   ///< The next content.
+    std::shared_ptr<SwHTMLTableLayoutCnts> xNext;   ///< The next content.
 
     /// Only one of the following two pointers may be set!
     SwTableBox *pBox;               ///< A Box.
-    SwHTMLTableLayout *pTable;      ///< A "table within a table".
+    std::shared_ptr<SwHTMLTableLayout> xTable;      ///< A "table within a table".
 
     /** During first run there are still no boxes. In this case
        pStartNode is used instead of pBox. */
@@ -58,20 +58,18 @@ class SwHTMLTableLayoutCnts
 
 public:
 
-    SwHTMLTableLayoutCnts( const SwStartNode* pSttNd, SwHTMLTableLayout* pTab,
-                           bool bNoBreakTag, SwHTMLTableLayoutCnts* pNxt );
-
-    ~SwHTMLTableLayoutCnts();
+    SwHTMLTableLayoutCnts(const SwStartNode* pSttNd, SwHTMLTableLayout* pTab,
+                          bool bNoBreakTag, std::shared_ptr<SwHTMLTableLayoutCnts> const& rNxt);
 
     void SetTableBox( SwTableBox *pBx ) { pBox = pBx; }
     SwTableBox *GetTableBox() const { return pBox; }
 
-    SwHTMLTableLayout *GetTable() const { return pTable; }
+    SwHTMLTableLayout *GetTable() const { return xTable.get(); }
 
     const SwStartNode *GetStartNode() const;
 
     /// Calculation of next node.
-    SwHTMLTableLayoutCnts *GetNext() const { return pNext; }
+    const std::shared_ptr<SwHTMLTableLayoutCnts>& GetNext() const { return xNext; }
 
     void SetWidthSet( sal_uInt8 nRef ) { nWidthSet = nRef; }
     bool IsWidthSet( sal_uInt8 nRef ) const { return nRef==nWidthSet; }
@@ -84,7 +82,7 @@ public:
 
 class SwHTMLTableLayoutCell
 {
-    SwHTMLTableLayoutCnts *pContents;  ///< Content of cell.
+    std::shared_ptr<SwHTMLTableLayoutCnts> xContents;  ///< Content of cell.
 
     sal_uInt16 nRowSpan;               ///< ROWSPAN of cell.
     sal_uInt16 nColSpan;               ///< COLSPAN of cell.
@@ -95,16 +93,14 @@ class SwHTMLTableLayoutCell
 
 public:
 
-    SwHTMLTableLayoutCell( SwHTMLTableLayoutCnts *pCnts,
+    SwHTMLTableLayoutCell(std::shared_ptr<SwHTMLTableLayoutCnts> const& rCnts,
                          sal_uInt16 nRSpan, sal_uInt16 nCSpan,
                          sal_uInt16 nWidthOpt, bool bPrcWdthOpt,
                          bool bNWrapOpt );
 
-    ~SwHTMLTableLayoutCell();
-
     /// Set or get content of a cell.
-    void SetContents( SwHTMLTableLayoutCnts *pCnts ) { pContents = pCnts; }
-    SwHTMLTableLayoutCnts *GetContents() const { return pContents; }
+    void SetContents(std::shared_ptr<SwHTMLTableLayoutCnts> const& rCnts) { xContents = rCnts; }
+    const std::shared_ptr<SwHTMLTableLayoutCnts>& GetContents() const { return xContents; }
 
     inline void SetProtected();
 
@@ -353,8 +349,7 @@ inline void SwHTMLTableLayoutCell::SetProtected()
 {
     nRowSpan = 1;
     nColSpan = 1;
-
-    pContents = nullptr;
+    xContents.reset();
 }
 
 inline void SwHTMLTableLayoutColumn::MergeMinMaxNoAlign( sal_uLong nCMin,
diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index 9408d76aa681..7c45dd598f16 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -78,40 +78,26 @@ public:
 SwHTMLTableLayoutCnts::SwHTMLTableLayoutCnts( const SwStartNode *pSttNd,
                                           SwHTMLTableLayout* pTab,
                                           bool bNoBrTag,
-                                          SwHTMLTableLayoutCnts* pNxt ) :
-    pNext( pNxt ), pBox( nullptr ), pTable( pTab ), pStartNode( pSttNd ),
+                                          std::shared_ptr<SwHTMLTableLayoutCnts> const& rNxt ) :
+    xNext( rNxt ), pBox( nullptr ), xTable( pTab ), pStartNode( pSttNd ),
     nPass1Done( 0 ), nWidthSet( 0 ), bNoBreakTag( bNoBrTag )
 {}
 
-SwHTMLTableLayoutCnts::~SwHTMLTableLayoutCnts()
-{
-    delete pNext;
-    delete pTable;
-}
-
 const SwStartNode *SwHTMLTableLayoutCnts::GetStartNode() const
 {
     return pBox ? pBox->GetSttNd() : pStartNode;
 }
 
-SwHTMLTableLayoutCell::SwHTMLTableLayoutCell( SwHTMLTableLayoutCnts *pCnts,
+SwHTMLTableLayoutCell::SwHTMLTableLayoutCell(std::shared_ptr<SwHTMLTableLayoutCnts> const& rCnts,
                                           sal_uInt16 nRSpan, sal_uInt16 nCSpan,
                                           sal_uInt16 nWidth, bool bPrcWidth,
                                           bool bNWrapOpt ) :
-    pContents( pCnts ),
+    xContents(rCnts),
     nRowSpan( nRSpan ), nColSpan( nCSpan ),
     nWidthOption( nWidth ), bPrcWidthOption( bPrcWidth ),
     bNoWrapOption( bNWrapOpt )
 {}
 
-SwHTMLTableLayoutCell::~SwHTMLTableLayoutCell()
-{
-    if( nRowSpan==1 && nColSpan==1 )
-    {
-        delete pContents;
-    }
-}
-
 SwHTMLTableLayoutColumn::SwHTMLTableLayoutColumn( sal_uInt16 nWidth,
                                                   bool bRelWidth,
                                                   bool bLBorder ) :
@@ -471,7 +457,7 @@ void SwHTMLTableLayout::AutoLayoutPass1()
         for( sal_uInt16 j=0; j<m_nRows; j++ )
         {
             SwHTMLTableLayoutCell *pCell = GetCell(j,i);
-            SwHTMLTableLayoutCnts *pCnts = pCell->GetContents();
+            SwHTMLTableLayoutCnts *pCnts = pCell->GetContents().get();
 
             // We need to examine all rows in order to
             // get the column that should be calculated next.
@@ -589,7 +575,7 @@ void SwHTMLTableLayout::AutoLayoutPass1()
                             nAbsMinTableCell = nAbsMinTableCnts;
                     }
                     pCnts->SetPass1Done( m_nPass1Done );
-                    pCnts = pCnts->GetNext();
+                    pCnts = pCnts->GetNext().get();
                 }
 
 // This code previously came after AddBorderWidth
@@ -1598,7 +1584,7 @@ void SwHTMLTableLayout::SetWidths( bool bCallPass2, sal_uInt16 nAbsAvail,
         {
             SwHTMLTableLayoutCell *pCell = GetCell( i, j );
 
-            SwHTMLTableLayoutCnts* pContents = pCell->GetContents();
+            SwHTMLTableLayoutCnts* pContents = pCell->GetContents().get();
             while( pContents && !pContents->IsWidthSet(m_nWidthSet) )
             {
                 SwTableBox *pBox = pContents->GetTableBox();
@@ -1624,7 +1610,7 @@ void SwHTMLTableLayout::SetWidths( bool bCallPass2, sal_uInt16 nAbsAvail,
                 }
 
                 pContents->SetWidthSet( m_nWidthSet );
-                pContents = pContents->GetNext();
+                pContents = pContents->GetNext().get();
             }
         }
     }
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index c1303ebfe470..b8518a497f17 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -167,7 +167,7 @@ class HTMLTableCnts
     const SwStartNode *m_pStartNode;      // a paragraph
     HTMLTable *m_pTable;                  // a table
 
-    SwHTMLTableLayoutCnts* m_pLayoutInfo;
+    std::shared_ptr<SwHTMLTableLayoutCnts> m_xLayoutInfo;
 
     bool m_bNoBreak;
 
@@ -196,7 +196,7 @@ public:
 
     void SetNoBreak() { m_bNoBreak = true; }
 
-    SwHTMLTableLayoutCnts *CreateLayoutInfo();
+    const std::shared_ptr<SwHTMLTableLayoutCnts>& CreateLayoutInfo();
 };
 
 // Cell of a HTML table
@@ -616,8 +616,7 @@ public:
 void HTMLTableCnts::InitCtor()
 {
     m_pNext = nullptr;
-    m_pLayoutInfo = nullptr;
-
+    m_xLayoutInfo.reset();
     m_bNoBreak = false;
 }
 
@@ -651,23 +650,24 @@ void HTMLTableCnts::Add( HTMLTableCnts* pNewCnts )
 
 inline void HTMLTableCnts::SetTableBox( SwTableBox *pBox )
 {
-    OSL_ENSURE( m_pLayoutInfo, "There is no layout info" );
-    if( m_pLayoutInfo )
-        m_pLayoutInfo->SetTableBox( pBox );
+    OSL_ENSURE(m_xLayoutInfo.get(), "There is no layout info");
+    if (m_xLayoutInfo)
+        m_xLayoutInfo->SetTableBox(pBox);
 }
 
-SwHTMLTableLayoutCnts *HTMLTableCnts::CreateLayoutInfo()
+const std::shared_ptr<SwHTMLTableLayoutCnts>& HTMLTableCnts::CreateLayoutInfo()
 {
-    if( !m_pLayoutInfo )
+    if (!m_xLayoutInfo)
     {
-        SwHTMLTableLayoutCnts *pNextInfo = m_pNext ? m_pNext->CreateLayoutInfo() : nullptr;
+        std::shared_ptr<SwHTMLTableLayoutCnts> xNextInfo;
+        if (m_pNext)
+            xNextInfo = m_pNext->CreateLayoutInfo();
         SwHTMLTableLayout *pTableInfo = m_pTable ? m_pTable->CreateLayoutInfo() : nullptr;
 
-        m_pLayoutInfo = new SwHTMLTableLayoutCnts( m_pStartNode, pTableInfo,
-                                                 m_bNoBreak, pNextInfo );
+        m_xLayoutInfo.reset(new SwHTMLTableLayoutCnts(m_pStartNode, pTableInfo, m_bNoBreak, xNextInfo));
     }
 
-    return m_pLayoutInfo;
+    return m_xLayoutInfo;
 }
 
 HTMLTableCell::HTMLTableCell():
@@ -744,10 +744,11 @@ inline bool HTMLTableCell::GetValue( double& rValue ) const
 
 std::unique_ptr<SwHTMLTableLayoutCell> HTMLTableCell::CreateLayoutInfo()
 {
-    SwHTMLTableLayoutCnts *pCntInfo = m_xContents ? m_xContents->CreateLayoutInfo() : nullptr;
-
-    return std::unique_ptr<SwHTMLTableLayoutCell>(new SwHTMLTableLayoutCell( pCntInfo, nRowSpan, nColSpan, nWidth,
-                                      bRelWidth, bNoWrap ));
+    std::shared_ptr<SwHTMLTableLayoutCnts> xCntInfo;
+    if (m_xContents)
+        xCntInfo = m_xContents->CreateLayoutInfo();
+    return std::unique_ptr<SwHTMLTableLayoutCell>(new SwHTMLTableLayoutCell(xCntInfo, nRowSpan, nColSpan, nWidth,
+                                      bRelWidth, bNoWrap));
 }
 
 HTMLTableRow::HTMLTableRow(sal_uInt16 const nCells)
@@ -1097,11 +1098,10 @@ SwHTMLTableLayout *HTMLTable::CreateLayoutInfo()
 
             if( bExportable )
             {
-                SwHTMLTableLayoutCnts *pLayoutCnts =
+                const std::shared_ptr<SwHTMLTableLayoutCnts>& rLayoutCnts =
                     pLayoutCell->GetContents();
-                bExportable = !pLayoutCnts ||
-                              ( pLayoutCnts->GetStartNode() &&
-                                !pLayoutCnts->GetNext() );
+                bExportable = !rLayoutCnts ||
+                              (rLayoutCnts->GetStartNode() && !rLayoutCnts->GetNext());
             }
         }
     }
@@ -1625,12 +1625,12 @@ SwTableLine *HTMLTable::MakeTableLine( SwTableBox *pUpper,
                             GetPrevBoxStartNode( nTopRow, nStartCol );
                         std::shared_ptr<HTMLTableCnts> xCnts(new HTMLTableCnts(
                             m_pParser->InsertTableSection(pPrevStartNd)));
-                        SwHTMLTableLayoutCnts *pCntsLayoutInfo =
+                        const std::shared_ptr<SwHTMLTableLayoutCnts> xCntsLayoutInfo =
                             xCnts->CreateLayoutInfo();
 
                         pCell2->SetContents(xCnts);
                         SwHTMLTableLayoutCell *pCurrCell = m_pLayoutInfo->GetCell( nTopRow, nStartCol );
-                        pCurrCell->SetContents( pCntsLayoutInfo );
+                        pCurrCell->SetContents(xCntsLayoutInfo);
                         if( nBoxRowSpan < 0 )
                             pCurrCell->SetRowSpan( 0 );
 
@@ -1639,7 +1639,7 @@ SwTableLine *HTMLTable::MakeTableLine( SwTableBox *pUpper,
                         {
                             GetCell(nTopRow,j)->SetContents(xCnts);
                             m_pLayoutInfo->GetCell( nTopRow, j )
-                                       ->SetContents( pCntsLayoutInfo );
+                                       ->SetContents(xCntsLayoutInfo);
                         }
                     }
 
diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx
index b059f04eaa5d..12d26d1b7a53 100644
--- a/sw/source/filter/writer/wrtswtbl.cxx
+++ b/sw/source/filter/writer/wrtswtbl.cxx
@@ -817,13 +817,13 @@ SwWriteTable::SwWriteTable(const SwTable* pTable, const SwHTMLTableLayout *pLayo
                 pLayoutInfo->GetCell( nRow, nCol );
 
             const SwHTMLTableLayoutCnts *pLayoutCnts =
-                pLayoutCell->GetContents();
+                pLayoutCell->GetContents().get();
 
             // The cell begins actually a row above or further forward?
             if( ( nRow>0 && pLayoutCnts == pLayoutInfo->GetCell(nRow-1,nCol)
-                                                      ->GetContents() ) ||
+                                                      ->GetContents().get() ) ||
                 ( nCol>0 && pLayoutCnts == pLayoutInfo->GetCell(nRow,nCol-1)
-                                                      ->GetContents() ) )
+                                                      ->GetContents().get() ) )
             {
                 continue;
             }
commit bb966d78980177121a15678ee7933a1ffc971b69
Author: Olivier Hallot <olivier.hallot at libreoffice.org>
Date:   Sat Dec 9 16:34:07 2017 -0200

    Updated core
    Project: help  49abf8b9207718aab9d4ea943730314f71589d27
    
    Mute l10n for binary value
    
    Change-Id: I0266cc37fd208cad60c2df721fcaaefaa254c12a
    Reviewed-on: https://gerrit.libreoffice.org/46161
    Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>
    Tested-by: Olivier Hallot <olivier.hallot at libreoffice.org>

diff --git a/helpcontent2 b/helpcontent2
index 2e34647599ad..49abf8b92077 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 2e34647599ad3d6a8da7b280b1f19c9d02dab54f
+Subproject commit 49abf8b9207718aab9d4ea943730314f71589d27
commit 9eb0d61e830b4917f0961d9412320a0681bd46c7
Author: Olivier Hallot <olivier.hallot at libreoffice.org>
Date:   Sat Dec 9 15:09:21 2017 -0200

    Updated core
    Project: help  2e34647599ad3d6a8da7b280b1f19c9d02dab54f
    
    Finish help content for Presenter Console
    
    Change-Id: I0cb93fde983d7fab5d86a69bb576e84f2eafad77
    Reviewed-on: https://gerrit.libreoffice.org/46153
    Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>
    Tested-by: Olivier Hallot <olivier.hallot at libreoffice.org>

diff --git a/helpcontent2 b/helpcontent2
index 6dbfefa1bae1..2e34647599ad 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 6dbfefa1bae144444ab217abc5847d4a886a5755
+Subproject commit 2e34647599ad3d6a8da7b280b1f19c9d02dab54f
commit 0fa13a403fed6e729e58963479d34694afa7b8d8
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sat Dec 9 23:28:39 2017 +0900

    svtools: Simplify ImageMap with std::unique_ptr
    
    Change-Id: I49b3c21ff4d8177fb75197d6641040be0ace6324
    Reviewed-on: https://gerrit.libreoffice.org/46149
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/svtools/imap.hxx b/include/svtools/imap.hxx
index 427d2768b67d..e60efb9990ed 100644
--- a/include/svtools/imap.hxx
+++ b/include/svtools/imap.hxx
@@ -23,6 +23,7 @@
 #include <svtools/imapobj.hxx>
 #include <svtools/svtdllapi.h>
 #include <tools/stream.hxx>
+#include <memory>
 #include <vector>
 
 class Point;
@@ -35,7 +36,7 @@ class SVT_DLLPUBLIC ImageMap final
 {
 private:
 
-    ::std::vector< IMapObject* > maList;
+    std::vector<std::unique_ptr<IMapObject>> maList;
     OUString                     aName;
 
     // binary saving/loading
@@ -81,7 +82,7 @@ public:
     // not be destroyed from outside
     IMapObject*         GetIMapObject( size_t nPos ) const
                         {
-                            return ( nPos < maList.size() ) ? maList[ nPos ] : nullptr;
+                            return ( nPos < maList.size() ) ? maList[ nPos ].get() : nullptr;
                         }
 
     // returns the object which was hit first or NULL;
diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx
index 471399fd40bc..b06fd21042db 100644
--- a/svtools/source/misc/imap.cxx
+++ b/svtools/source/misc/imap.cxx
@@ -570,15 +570,15 @@ ImageMap::ImageMap( const ImageMap& rImageMap )
         switch( pCopyObj->GetType() )
         {
             case IMAP_OBJ_RECTANGLE:
-                maList.push_back( new IMapRectangleObject( *static_cast<IMapRectangleObject*>( pCopyObj ) ) );
+                maList.emplace_back( new IMapRectangleObject( *static_cast<IMapRectangleObject*>( pCopyObj ) ) );
             break;
 
             case IMAP_OBJ_CIRCLE:
-                maList.push_back( new IMapCircleObject( *static_cast<IMapCircleObject*>( pCopyObj ) ) );
+                maList.emplace_back( new IMapCircleObject( *static_cast<IMapCircleObject*>( pCopyObj ) ) );
             break;
 
             case IMAP_OBJ_POLYGON:
-                maList.push_back( new IMapPolygonObject( *static_cast<IMapPolygonObject*>( pCopyObj ) ) );
+                maList.emplace_back( new IMapPolygonObject( *static_cast<IMapPolygonObject*>( pCopyObj ) ) );
             break;
 
             default:
@@ -598,8 +598,6 @@ ImageMap::ImageMap( const ImageMap& rImageMap )
 
 ImageMap::~ImageMap()
 {
-
-    ClearImageMap();
 }
 
 
@@ -611,8 +609,6 @@ ImageMap::~ImageMap()
 
 void ImageMap::ClearImageMap()
 {
-    for(IMapObject* i : maList)
-        delete i;
     maList.clear();
 
     aName.clear();
@@ -638,15 +634,15 @@ ImageMap& ImageMap::operator=( const ImageMap& rImageMap )
         switch( pCopyObj->GetType() )
         {
             case IMAP_OBJ_RECTANGLE:
-                maList.push_back( new IMapRectangleObject( *static_cast<IMapRectangleObject*>(pCopyObj) ) );
+                maList.emplace_back( new IMapRectangleObject( *static_cast<IMapRectangleObject*>(pCopyObj) ) );
             break;
 
             case IMAP_OBJ_CIRCLE:
-                maList.push_back( new IMapCircleObject( *static_cast<IMapCircleObject*>(pCopyObj) ) );
+                maList.emplace_back( new IMapCircleObject( *static_cast<IMapCircleObject*>(pCopyObj) ) );
             break;
 
             case IMAP_OBJ_POLYGON:
-                maList.push_back( new IMapPolygonObject( *static_cast<IMapPolygonObject*>(pCopyObj) ) );
+                maList.emplace_back( new IMapPolygonObject( *static_cast<IMapPolygonObject*>(pCopyObj) ) );
             break;
 
             default:
@@ -678,7 +674,7 @@ bool ImageMap::operator==( const ImageMap& rImageMap )
 
         for ( size_t i = 0; ( i < nCount ) && !bDifferent; i++ )
         {
-            IMapObject* pObj = maList[ i ];
+            IMapObject* pObj = maList[ i ].get();
             IMapObject* pEqObj = rImageMap.GetIMapObject( i );
 
             if ( pObj->GetType() == pEqObj->GetType() )
@@ -745,15 +741,15 @@ void ImageMap::InsertIMapObject( const IMapObject& rIMapObject )
     switch( rIMapObject.GetType() )
     {
         case IMAP_OBJ_RECTANGLE:
-            maList.push_back( new IMapRectangleObject( static_cast<const IMapRectangleObject&>( rIMapObject ) ) );
+            maList.emplace_back( new IMapRectangleObject( static_cast<const IMapRectangleObject&>( rIMapObject ) ) );
         break;
 
         case IMAP_OBJ_CIRCLE:
-            maList.push_back( new IMapCircleObject( static_cast<const IMapCircleObject&>( rIMapObject ) ) );
+            maList.emplace_back( new IMapCircleObject( static_cast<const IMapCircleObject&>( rIMapObject ) ) );
         break;
 
         case IMAP_OBJ_POLYGON:
-            maList.push_back( new IMapPolygonObject( static_cast<const IMapPolygonObject&>( rIMapObject ) ) );
+            maList.emplace_back( new IMapPolygonObject( static_cast<const IMapPolygonObject&>( rIMapObject ) ) );
         break;
 
         default:
@@ -788,9 +784,9 @@ IMapObject* ImageMap::GetHitIMapObject( const Size& rTotalSize,
 
     // walk over all objects and execute HitTest
     IMapObject* pObj = nullptr;
-    for(IMapObject* i : maList) {
+    for(auto& i : maList) {
         if ( i->IsHit( aRelPoint ) ) {
-            pObj = i;
+            pObj = i.get();
             break;
         }
     }
@@ -804,7 +800,7 @@ void ImageMap::Scale( const Fraction& rFracX, const Fraction& rFracY )
 
     for ( size_t i = 0; i < nCount; i++ )
     {
-        IMapObject* pObj = maList[ i ];
+        IMapObject* pObj = maList[ i ].get();
 
         switch( pObj->GetType() )
         {
@@ -839,7 +835,7 @@ void ImageMap::ImpWriteImageMap( SvStream& rOStm ) const
 
     for ( size_t i = 0; i < nCount; i++ )
     {
-        IMapObject* pObj = maList[ i ];
+        auto& pObj = maList[ i ];
         pObj->Write( rOStm );
     }
 }
@@ -877,7 +873,7 @@ void ImageMap::ImpReadImageMap( SvStream& rIStm, size_t nCount )
             {
                 IMapRectangleObject* pObj = new IMapRectangleObject;
                 pObj->Read( rIStm );
-                maList.push_back( pObj );
+                maList.emplace_back( pObj );
             }
             break;
 
@@ -885,7 +881,7 @@ void ImageMap::ImpReadImageMap( SvStream& rIStm, size_t nCount )
             {
                 IMapCircleObject* pObj = new IMapCircleObject;
                 pObj->Read( rIStm );
-                maList.push_back( pObj );
+                maList.emplace_back( pObj );
             }
             break;
 
@@ -893,7 +889,7 @@ void ImageMap::ImpReadImageMap( SvStream& rIStm, size_t nCount )
             {
                 IMapPolygonObject* pObj = new IMapPolygonObject;
                 pObj->Read( rIStm );
-                maList.push_back( pObj );
+                maList.emplace_back( pObj );
             }
             break;
 
diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx
index a0b86edef094..a51bce522f27 100644
--- a/svtools/source/misc/imap2.cxx
+++ b/svtools/source/misc/imap2.cxx
@@ -159,7 +159,7 @@ void ImageMap::ImpWriteCERN( SvStream& rOStm ) const
 
     for ( size_t i = 0; i < nCount; i++ )
     {
-        IMapObject* pObj = maList[ i ];
+        IMapObject* pObj = maList[ i ].get();
 
         switch( pObj->GetType() )
         {
@@ -187,7 +187,7 @@ void ImageMap::ImpWriteNCSA( SvStream& rOStm  ) const
 
     for ( size_t i = 0; i < nCount; i++ )
     {
-        IMapObject* pObj = maList[ i ];
+        IMapObject* pObj = maList[ i ].get();
 
         switch( pObj->GetType() )
         {
@@ -273,8 +273,7 @@ void ImageMap::ImpReadCERNLine( const OString& rLine  )
         const OUString  aURL( ImpReadCERNURL( &pStr, "" ) );
         const tools::Rectangle aRect( aTopLeft, aBottomRight );
 
-        IMapRectangleObject* pObj = new IMapRectangleObject( aRect, aURL, OUString(), OUString(), OUString(), OUString() );
-        maList.push_back( pObj );
+        maList.emplace_back( new IMapRectangleObject( aRect, aURL, OUString(), OUString(), OUString(), OUString() ) );
     }
     else if ( ( aToken == "circle" ) || ( aToken == "circ" ) )
     {
@@ -282,8 +281,7 @@ void ImageMap::ImpReadCERNLine( const OString& rLine  )
         const long      nRadius = ImpReadCERNRadius( &pStr );
         const OUString  aURL( ImpReadCERNURL( &pStr, "" ) );
 
-        IMapCircleObject* pObj = new IMapCircleObject( aCenter, nRadius, aURL, OUString(), OUString(), OUString(), OUString() );
-        maList.push_back( pObj );
+        maList.emplace_back( new IMapCircleObject( aCenter, nRadius, aURL, OUString(), OUString(), OUString(), OUString() ) );
     }
     else if ( ( aToken == "polygon" ) || ( aToken == "poly" ) )
     {
@@ -296,8 +294,7 @@ void ImageMap::ImpReadCERNLine( const OString& rLine  )
 
         aURL = ImpReadCERNURL( &pStr, "" );
 
-        IMapPolygonObject* pObj = new IMapPolygonObject( aPoly, aURL, OUString(), OUString(), OUString(), OUString() );
-        maList.push_back( pObj );
+        maList.emplace_back( new IMapPolygonObject( aPoly, aURL, OUString(), OUString(), OUString(), OUString() ) );
     }
 }
 
@@ -414,8 +411,7 @@ void ImageMap::ImpReadNCSALine( const OString& rLine )
         const Point     aBottomRight( ImpReadNCSACoords( &pStr ) );
         const tools::Rectangle aRect( aTopLeft, aBottomRight );
 
-        IMapRectangleObject* pObj = new IMapRectangleObject( aRect, aURL, OUString(), OUString(), OUString(), OUString() );
-        maList.push_back( pObj );
+        maList.emplace_back( new IMapRectangleObject( aRect, aURL, OUString(), OUString(), OUString(), OUString() ) );
     }
     else if ( aToken == "circle" )
     {
@@ -425,8 +421,7 @@ void ImageMap::ImpReadNCSALine( const OString& rLine )
         long            nRadius = (long) sqrt( (double) aDX.X() * aDX.X() +
                                                (double) aDX.Y() * aDX.Y() );
 
-        IMapCircleObject* pObj = new IMapCircleObject( aCenter, nRadius, aURL, OUString(), OUString(), OUString(), OUString() );
-        maList.push_back( pObj );
+        maList.emplace_back( new IMapCircleObject( aCenter, nRadius, aURL, OUString(), OUString(), OUString(), OUString() ) );
     }
     else if ( aToken == "poly" )
     {
@@ -438,8 +433,7 @@ void ImageMap::ImpReadNCSALine( const OString& rLine )
         for ( sal_uInt16 i = 0; i < nCount; i++ )
             aPoly[ i ] = ImpReadNCSACoords( &pStr );
 
-        IMapPolygonObject* pObj = new IMapPolygonObject( aPoly, aURL, OUString(), OUString(), OUString(), OUString() );
-        maList.push_back( pObj );
+        maList.emplace_back( new IMapPolygonObject( aPoly, aURL, OUString(), OUString(), OUString(), OUString() ) );
     }
 }
 
commit d635da1972f15862bb283e77787243fbff8361a6
Author: Gabor Kelemen <kelemeng at ubuntu.com>
Date:   Wed Nov 29 01:06:46 2017 +0100

    tdf#114088 Translate default template names
    
    Change-Id: I173364d723e0afd7275b469aea1f2e8cb105fdab
    Reviewed-on: https://gerrit.libreoffice.org/45450
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index b857ae44ea41..889ccf8ab22b 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -266,16 +266,38 @@
 #define SFX_STR_SIDEBAR_RESTORE                 NC_("SFX_STR_SIDEBAR_RESTORE", "Restore Default")
 #define SFX_STR_SIDEBAR_HIDE_SIDEBAR            NC_("SFX_STR_SIDEBAR_HIDE_SIDEBAR", "Close Sidebar")
 
-#define STR_TEMPLATE_NAME1                      NC_("STR_TEMPLATE_NAME1", "Abstract Green")
-#define STR_TEMPLATE_NAME2                      NC_("STR_TEMPLATE_NAME2", "Abstract Red")
-#define STR_TEMPLATE_NAME3                      NC_("STR_TEMPLATE_NAME3", "Abstract Yellow")
-#define STR_TEMPLATE_NAME4                      NC_("STR_TEMPLATE_NAME4", "Bright Blue")
-#define STR_TEMPLATE_NAME5                      NC_("STR_TEMPLATE_NAME5", "DNA")
-#define STR_TEMPLATE_NAME6                      NC_("STR_TEMPLATE_NAME6", "Inspiration")
-#define STR_TEMPLATE_NAME7                      NC_("STR_TEMPLATE_NAME7", "Lush Green")
-#define STR_TEMPLATE_NAME8                      NC_("STR_TEMPLATE_NAME8", "Metropolis")
-#define STR_TEMPLATE_NAME9                      NC_("STR_TEMPLATE_NAME9", "Sunset")
-#define STR_TEMPLATE_NAME10                     NC_("STR_TEMPLATE_NAME10", "Vintage")
+// Translators: default Impress template names
+#define STR_TEMPLATE_NAME1                      NC_("STR_TEMPLATE_NAME1", "Alizarin")
+#define STR_TEMPLATE_NAME2                      NC_("STR_TEMPLATE_NAME2", "Beehive")
+#define STR_TEMPLATE_NAME3                      NC_("STR_TEMPLATE_NAME3", "Blue Curve")
+#define STR_TEMPLATE_NAME4                      NC_("STR_TEMPLATE_NAME4", "Blueprint Plans")
+#define STR_TEMPLATE_NAME5                      NC_("STR_TEMPLATE_NAME5", "Bright Blue")
+#define STR_TEMPLATE_NAME6                      NC_("STR_TEMPLATE_NAME6", "Classy Red")
+#define STR_TEMPLATE_NAME7                      NC_("STR_TEMPLATE_NAME7", "DNA")
+#define STR_TEMPLATE_NAME8                      NC_("STR_TEMPLATE_NAME8", "Focus")
+#define STR_TEMPLATE_NAME9                      NC_("STR_TEMPLATE_NAME9", "Forestbird")
+#define STR_TEMPLATE_NAME10                     NC_("STR_TEMPLATE_NAME10", "Impress")
+#define STR_TEMPLATE_NAME11                     NC_("STR_TEMPLATE_NAME11", "Inspiration")
+#define STR_TEMPLATE_NAME12                     NC_("STR_TEMPLATE_NAME12", "Lights")
+#define STR_TEMPLATE_NAME13                     NC_("STR_TEMPLATE_NAME13", "Lush Green")
+#define STR_TEMPLATE_NAME14                     NC_("STR_TEMPLATE_NAME14", "Metropolis")
+#define STR_TEMPLATE_NAME15                     NC_("STR_TEMPLATE_NAME15", "Midnightblue")
+#define STR_TEMPLATE_NAME16                     NC_("STR_TEMPLATE_NAME16", "Nature Illustration")
+#define STR_TEMPLATE_NAME17                     NC_("STR_TEMPLATE_NAME17", "Pencil")
+#define STR_TEMPLATE_NAME18                     NC_("STR_TEMPLATE_NAME18", "Piano")
+#define STR_TEMPLATE_NAME19                     NC_("STR_TEMPLATE_NAME19", "Portfolio")
+#define STR_TEMPLATE_NAME20                     NC_("STR_TEMPLATE_NAME20", "Progress")
+#define STR_TEMPLATE_NAME21                     NC_("STR_TEMPLATE_NAME21", "Sunset")
+#define STR_TEMPLATE_NAME22                     NC_("STR_TEMPLATE_NAME22", "Vintage")
+#define STR_TEMPLATE_NAME23                     NC_("STR_TEMPLATE_NAME23", "Vivid")
+// Translators: default Writer template names
+#define STR_TEMPLATE_NAME24                     NC_("STR_TEMPLATE_NAME24", "CV")
+#define STR_TEMPLATE_NAME25                     NC_("STR_TEMPLATE_NAME25", "Resume")
+#define STR_TEMPLATE_NAME26                     NC_("STR_TEMPLATE_NAME26", "Default")
+#define STR_TEMPLATE_NAME27                     NC_("STR_TEMPLATE_NAME27", "Modern")
+#define STR_TEMPLATE_NAME28                     NC_("STR_TEMPLATE_NAME28", "Modern business letter sans-serif")
+#define STR_TEMPLATE_NAME29                     NC_("STR_TEMPLATE_NAME29", "Modern business letter serif")
+#define STR_TEMPLATE_NAME30                     NC_("STR_TEMPLATE_NAME30", "Businesscard with logo")
 
 #define STR_CLEAR_CHAR                          NC_("STR_CLEAR_CHAR", "Remove")
 #define STR_CLEAR_ALL_CHAR                      NC_("STR_CLEAR_ALL_CHAR", "Clear All")
diff --git a/sfx2/inc/strings.hxx b/sfx2/inc/strings.hxx
index 9fb8ccf070fe..fe7f3d7b15d4 100644
--- a/sfx2/inc/strings.hxx
+++ b/sfx2/inc/strings.hxx
@@ -13,16 +13,36 @@
 #define STR_HTML_GENERATOR "%PRODUCTNAME %PRODUCTVERSION%PRODUCTEXTENSION (%1)"
 
 // Do not translate STR_TEMPLATE_NAME*_DEF names!!
-#define STR_TEMPLATE_NAME1_DEF  "Abstract Green"
-#define STR_TEMPLATE_NAME2_DEF  "Abstract Red"
-#define STR_TEMPLATE_NAME3_DEF  "Abstract Yellow"
-#define STR_TEMPLATE_NAME4_DEF  "Bright Blue"
-#define STR_TEMPLATE_NAME5_DEF  "DNA"
-#define STR_TEMPLATE_NAME6_DEF  "Inspiration"
-#define STR_TEMPLATE_NAME7_DEF  "Lush Green"
-#define STR_TEMPLATE_NAME8_DEF  "Metropolis"
-#define STR_TEMPLATE_NAME9_DEF  "Sunset"
-#define STR_TEMPLATE_NAME10_DEF "Vintage"
+#define STR_TEMPLATE_NAME1_DEF  "Alizarin"
+#define STR_TEMPLATE_NAME2_DEF  "Beehive"
+#define STR_TEMPLATE_NAME3_DEF  "Blue_Curve"
+#define STR_TEMPLATE_NAME4_DEF  "Blueprint_Plans"
+#define STR_TEMPLATE_NAME5_DEF  "Bright Blue"
+#define STR_TEMPLATE_NAME6_DEF  "Classy_Red"
+#define STR_TEMPLATE_NAME7_DEF  "DNA"
+#define STR_TEMPLATE_NAME8_DEF  "Focus"
+#define STR_TEMPLATE_NAME9_DEF  "Forestbird"
+#define STR_TEMPLATE_NAME10_DEF "Impress"
+#define STR_TEMPLATE_NAME11_DEF "Inspiration"
+#define STR_TEMPLATE_NAME12_DEF "Lights"
+#define STR_TEMPLATE_NAME13_DEF "LushGreen"
+#define STR_TEMPLATE_NAME14_DEF "Metropolis"
+#define STR_TEMPLATE_NAME15_DEF "Midnightblue"
+#define STR_TEMPLATE_NAME16_DEF "Nature_Illustration"
+#define STR_TEMPLATE_NAME17_DEF "Pencil"
+#define STR_TEMPLATE_NAME18_DEF "Piano"
+#define STR_TEMPLATE_NAME19_DEF "Portfolio"
+#define STR_TEMPLATE_NAME20_DEF "Progress"
+#define STR_TEMPLATE_NAME21_DEF "Sunset"
+#define STR_TEMPLATE_NAME22_DEF "Vintage"
+#define STR_TEMPLATE_NAME23_DEF "Vivid"
+#define STR_TEMPLATE_NAME24_DEF "CV"
+#define STR_TEMPLATE_NAME25_DEF "Resume"
+#define STR_TEMPLATE_NAME26_DEF "Default"
+#define STR_TEMPLATE_NAME27_DEF "Modern"
+#define STR_TEMPLATE_NAME28_DEF "Modern business letter sans-serif"
+#define STR_TEMPLATE_NAME29_DEF "Modern business letter serif"
+#define STR_TEMPLATE_NAME30_DEF "Businesscard-with-logo"
 
 #define SFX_ST_EDIT             "..."
 
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index e963a8b7797a..f5beabedfe78 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -481,7 +481,27 @@ OUString SfxDocumentTemplates::ConvertResourceString(const OUString& rString)
         STR_TEMPLATE_NAME7_DEF,
         STR_TEMPLATE_NAME8_DEF,
         STR_TEMPLATE_NAME9_DEF,
-        STR_TEMPLATE_NAME10_DEF
+        STR_TEMPLATE_NAME10_DEF,
+        STR_TEMPLATE_NAME11_DEF,
+        STR_TEMPLATE_NAME12_DEF,
+        STR_TEMPLATE_NAME13_DEF,
+        STR_TEMPLATE_NAME14_DEF,
+        STR_TEMPLATE_NAME15_DEF,
+        STR_TEMPLATE_NAME16_DEF,
+        STR_TEMPLATE_NAME17_DEF,
+        STR_TEMPLATE_NAME18_DEF,
+        STR_TEMPLATE_NAME19_DEF,
+        STR_TEMPLATE_NAME20_DEF,
+        STR_TEMPLATE_NAME21_DEF,
+        STR_TEMPLATE_NAME22_DEF,
+        STR_TEMPLATE_NAME23_DEF,
+        STR_TEMPLATE_NAME24_DEF,
+        STR_TEMPLATE_NAME25_DEF,
+        STR_TEMPLATE_NAME26_DEF,
+        STR_TEMPLATE_NAME27_DEF,
+        STR_TEMPLATE_NAME28_DEF,
+        STR_TEMPLATE_NAME29_DEF,
+        STR_TEMPLATE_NAME30_DEF
     };
 
     const char* STR_TEMPLATE_NAME[] =
@@ -496,6 +516,26 @@ OUString SfxDocumentTemplates::ConvertResourceString(const OUString& rString)
         STR_TEMPLATE_NAME8,
         STR_TEMPLATE_NAME9,
         STR_TEMPLATE_NAME10,
+        STR_TEMPLATE_NAME11,
+        STR_TEMPLATE_NAME12,
+        STR_TEMPLATE_NAME13,
+        STR_TEMPLATE_NAME14,
+        STR_TEMPLATE_NAME15,
+        STR_TEMPLATE_NAME16,
+        STR_TEMPLATE_NAME17,
+        STR_TEMPLATE_NAME18,
+        STR_TEMPLATE_NAME19,
+        STR_TEMPLATE_NAME20,
+        STR_TEMPLATE_NAME21,
+        STR_TEMPLATE_NAME22,
+        STR_TEMPLATE_NAME23,
+        STR_TEMPLATE_NAME24,
+        STR_TEMPLATE_NAME25,
+        STR_TEMPLATE_NAME26,
+        STR_TEMPLATE_NAME27,
+        STR_TEMPLATE_NAME28,
+        STR_TEMPLATE_NAME29,
+        STR_TEMPLATE_NAME30
     };
 
     assert(SAL_N_ELEMENTS(aTemplateNames) == SAL_N_ELEMENTS(STR_TEMPLATE_NAME));
commit b24df57536d822d5299165fc3d03a17a1f70101b
Author: Andrea Gelmini <andrea.gelmini at gelma.net>
Date:   Sat Dec 9 16:45:34 2017 +0100

    Removed duplicated include
    
    Change-Id: Ie4f0f27451e4cff2567239ec47dbf7a707987eb2
    Reviewed-on: https://gerrit.libreoffice.org/46150
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
    Tested-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 9c8f35dcc6d2..01a5e10eecbd 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -34,7 +34,6 @@
 #include <sfx2/dispatch.hxx>
 #include <sfx2/viewfrm.hxx>
 #include <sfx2/lokhelper.hxx>
-#include <sfx2/dispatch.hxx>
 #include <redline.hxx>
 #include <IDocumentRedlineAccess.hxx>
 #include <vcl/scheduler.hxx>
commit 8abda0217dcdfc45fc0f7e74a37d048c5fda395f
Author: Tamas Bunth <tamas.bunth at collabora.co.uk>
Date:   Sat Dec 9 15:34:33 2017 +0100

    Firebird: check isc_blob_info error
    
    Change-Id: I398bf195a8cfebe081fd3034d6c539b02aaf6d73
    Reviewed-on: https://gerrit.libreoffice.org/46148
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/connectivity/source/drivers/firebird/Blob.cxx b/connectivity/source/drivers/firebird/Blob.cxx
index 0cd5697992fd..d7e3ac40f016 100644
--- a/connectivity/source/drivers/firebird/Blob.cxx
+++ b/connectivity/source/drivers/firebird/Blob.cxx
@@ -74,7 +74,7 @@ void Blob::ensureBlobIsOpened()
     };
     char aResultBuffer[20];
 
-    isc_blob_info(m_statusVector,
+    aErr = isc_blob_info(m_statusVector,
                   &m_blobHandle,
                   sizeof(aBlobItems),
                   aBlobItems,
commit 7886de305809e265cd2126d39912147131d3a004
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Date:   Fri Dec 8 00:10:42 2017 +0100

    gpg4libre: check if we can really verify OpenPGP signatures
    
    And disable unit tests otherwise
    
    Change-Id: I32e1d8d2f8b0013d9cb43b78a55d23a1a29a8e8d
    Reviewed-on: https://gerrit.libreoffice.org/46057
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/config_host/config_gpgme.h.in b/config_host/config_gpgme.h.in
index a8435bd0aa43..7e46f3703ec3 100644
--- a/config_host/config_gpgme.h.in
+++ b/config_host/config_gpgme.h.in
@@ -16,6 +16,9 @@
 // Defined if gpgme support is available
 #define HAVE_FEATURE_GPGME 0
 
+// Defined if gpg and gpgme signature verification is available
+#define HAVE_FEATURE_GPGVERIFY 0
+
 #if HAVE_FEATURE_GPGME
 # include "config_lgpl.h"
 #endif
diff --git a/configure.ac b/configure.ac
index e216e5fd9617..449dfc1add54 100644
--- a/configure.ac
+++ b/configure.ac
@@ -133,9 +133,16 @@ dnl path location is git, so make sure we have it
     if test -n "$mac_git_path" -a -x "$mac_git_path" -a "$mac_git_path" != "/usr/bin/git" ; then
         mac_path="$mac_path:`dirname $mac_git_path`"
     fi
+dnl a not so common but nevertheless quite helpful thing that may be in a fancy
+dnl path location is gpg, so make sure we find it
+    mac_gpg_path=`which gpg 2>/dev/null`
+    if test -n "$mac_gpg_path" -a -x "$mac_gpg_path" -a "$mac_gpg_path" != "/usr/bin/gpg" ; then
+        mac_path="$mac_path:`dirname $mac_gpg_path`"
+    fi
     PATH="$mac_path"
     unset mac_path
-    unset git_mac_path
+    unset mac_git_path
+    unset mac_gpg_path
 }
 
 echo "********************************************************************"
@@ -10225,6 +10232,14 @@ if test "$_os" = "Linux" -o "$_os" = "Darwin" -o "$_os" = "WINNT" ; then
     fi
     ENABLE_GPGMEPP=TRUE
     AC_DEFINE([HAVE_FEATURE_GPGME])
+    AC_PATH_PROG(GPG, gpg)
+    # TODO: Windows's cygwin gpg does not seem to work with our gpgme,
+    # so let's exclude that manually for the moment
+    if test -n "$GPG" -a "$_os" != "WINNT"; then
+        # make sure we not only have a working gpgme, but a full working
+        # gpg installation to run OpenPGP signature verification
+        AC_DEFINE([HAVE_FEATURE_GPGVERIFY])
+    fi
 fi
 AC_SUBST(ENABLE_GPGMEPP)
 AC_SUBST(SYSTEM_GPGMEPP)
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx
index 9ea266907bcb..7e737f8f3bd4 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -42,6 +42,7 @@
 #include <sfx2/sfxbasemodel.hxx>
 #include <sfx2/objsh.hxx>
 #include <osl/file.hxx>
+#include <osl/process.h>
 #include <comphelper/ofopxmlhelper.hxx>
 
 #include <documentsignaturehelper.hxx>
@@ -103,8 +104,7 @@ public:
     void testXAdESGood();
     /// Test importing of signature line images
     void testSignatureLineImages();
-#ifdef LINUX
-# if HAVE_FEATURE_GPGME
+#if HAVE_FEATURE_GPGVERIFY
     /// Test a typical ODF where all streams are GPG-signed.

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list