[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-5-4' - 28 commits - compilerplugins/clang cui/source dbaccess/source icon-themes/galaxy instsetoo_native/inc_common instsetoo_native/util officecfg/registry package/source postprocess/CustomTarget_registry.mk pyuno/source sal/textenc sc/qa sc/source sfx2/source svtools/source sw/qa sw/source ucbhelper/source vcl/inc vcl/source writerfilter/source

Katarina Behrens Katarina.Behrens at cib.de
Fri Feb 9 00:39:57 UTC 2018


Rebased ref, commits from common ancestor:
commit b53c154e64306749525359e8dde5861aabc91399
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Wed Feb 10 14:42:18 2016 +0100

    Branded images for msi installer
    
    The sizes are 122 x 234, 374 x 44 installed units respectively, according to
    http://msdn.microsoft.com/de-de/library/windows/desktop/aa369490%28v=vs.85%29.aspx
    
    it is 163x312, 499x58 pixels at 96 dpi. I bumped dpi to 120 and it still looks pixelated,
    but it's as good as it gets.
    
    For better results, we need different graphics, with less fine details given the very limited
    space
    
    Change-Id: I4a7eafed16fd79f377d27afa8151cfab614b464b

diff --git a/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp b/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp
index e267d49ab73e..471eea4c22e6 100644
Binary files a/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp and b/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp differ
diff --git a/instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp b/instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp
index b824ddf35d9d..2703670952bd 100644
Binary files a/instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp and b/instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp differ
commit 16499723d69c9ab7cada60aec61e0e2b174b0b75
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Tue Feb 9 11:09:30 2016 +0100

    Branded application icons
    
    sadly, this doesn't replace Windows taskbar icon, that must be living somewhere
    else. It works on Linux though.
    
     Conflicts:
            icon-themes/galaxy/res/main128.png
            icon-themes/galaxy/res/mainapp_16.png
            icon-themes/galaxy/res/mainapp_16_8.png
            icon-themes/galaxy/res/mainapp_32.png
            icon-themes/galaxy/res/mainapp_32_8.png
            icon-themes/galaxy/res/mainapp_48_8.png
    
    Change-Id: I028fc68d96f02113622c5e1ec3ed830ac797be0b

diff --git a/icon-themes/galaxy/res/main128.png b/icon-themes/galaxy/res/main128.png
index 2779337e7b0a..818b7330c25b 100644
Binary files a/icon-themes/galaxy/res/main128.png and b/icon-themes/galaxy/res/main128.png differ
diff --git a/icon-themes/galaxy/res/mainapp_16.png b/icon-themes/galaxy/res/mainapp_16.png
old mode 100755
new mode 100644
index 4a96735b6bb6..13945eeadfd4
Binary files a/icon-themes/galaxy/res/mainapp_16.png and b/icon-themes/galaxy/res/mainapp_16.png differ
diff --git a/icon-themes/galaxy/res/mainapp_16_8.png b/icon-themes/galaxy/res/mainapp_16_8.png
index 94abb952996b..13945eeadfd4 100644
Binary files a/icon-themes/galaxy/res/mainapp_16_8.png and b/icon-themes/galaxy/res/mainapp_16_8.png differ
diff --git a/icon-themes/galaxy/res/mainapp_32.png b/icon-themes/galaxy/res/mainapp_32.png
index 88e4e1c8f18f..c653935c0c6b 100755
Binary files a/icon-themes/galaxy/res/mainapp_32.png and b/icon-themes/galaxy/res/mainapp_32.png differ
diff --git a/icon-themes/galaxy/res/mainapp_32_8.png b/icon-themes/galaxy/res/mainapp_32_8.png
index 2c8a21fbcf3b..c653935c0c6b 100644
Binary files a/icon-themes/galaxy/res/mainapp_32_8.png and b/icon-themes/galaxy/res/mainapp_32_8.png differ
diff --git a/icon-themes/galaxy/res/mainapp_48_8.png b/icon-themes/galaxy/res/mainapp_48_8.png
index cdebedf6a051..562ea23e89c2 100644
Binary files a/icon-themes/galaxy/res/mainapp_48_8.png and b/icon-themes/galaxy/res/mainapp_48_8.png differ
commit 39dbed1b4e185b5d631c7f3cec5ca3fc92388abc
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Tue Feb 9 10:38:29 2016 +0100

    Point to CIB helpdesk
    
    it's pretty mean, b/c German translation (which I can't change) says the site
    is in English, while CIB site is in German only and can't be switched to other
    lang
    
     Conflicts:
            sfx2/source/appl/appserv.cxx
    
    Change-Id: Ifbbb9e9d2bbee40998c07d1c68b61cd20d77dbc3

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index d6424c2d06ef..9d2ff11b0b4f 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -498,8 +498,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
         case SID_SEND_FEEDBACK:
         {
             OUString module = SfxHelp::GetCurrentModuleIdentifier();
-            OUString sURL("http://hub.libreoffice.org/send-feedback/?LOversion=" + utl::ConfigManager::getAboutBoxProductVersion() +
-                "&LOlocale=" + utl::ConfigManager::getLocale() + "&LOmodule=" + module.copy(module.lastIndexOf('.') + 1 )  );
+            OUString sURL("http://libreoffice.cib.de/support");
             sfx2::openUriExternally(sURL, false);
             break;
         }
commit ee4c28eb96248810f4fd9fb38802471f13633875
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Tue Feb 9 10:00:30 2016 +0100

    Point to CIB website
    
    this idiotic postprocess script hard-codes libreoffice.org for some reason, grr
    
    Change-Id: Ide1f19d4da9a437e01118e8baf74c0d1a8ca2e10

diff --git a/instsetoo_native/util/openoffice.lst.in b/instsetoo_native/util/openoffice.lst.in
index 06bd10a2004e..134c9143bd61 100644
--- a/instsetoo_native/util/openoffice.lst.in
+++ b/instsetoo_native/util/openoffice.lst.in
@@ -67,7 +67,7 @@ LibreOffice
             CHANGETARGETDIR 1
             PATCHCODEFILE ooo_patchcodes.txt
             STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/
-            STARTCENTER_INFO_URL https://www.libreoffice.org/
+            STARTCENTER_INFO_URL http://libreoffice.cib.de/
             STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
             DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
             STARTCENTER_HIDE_EXTERNAL_LINKS 0
@@ -120,7 +120,7 @@ LibreOfficeDev
             CODEFILENAME codes_ooodev.txt
             LOCALUSERDIR $ORIGIN/..
             STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/
-            STARTCENTER_INFO_URL https://www.libreoffice.org/
+            STARTCENTER_INFO_URL http://libreoffice.cib.de/
             STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
             DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
             STARTCENTER_HIDE_EXTERNAL_LINKS 0
@@ -162,7 +162,7 @@ LibreOffice_SDK
             CHANGETARGETDIR 1
             DONTUSESTARTMENUFOLDER 1
             STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/
-            STARTCENTER_INFO_URL https://www.libreoffice.org/
+            STARTCENTER_INFO_URL http://libreoffice.cib.de/
             STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
             DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
             STARTCENTER_HIDE_EXTERNAL_LINKS 0
@@ -208,7 +208,7 @@ LibreOfficeDev_SDK
             CHANGETARGETDIR 1
             DONTUSESTARTMENUFOLDER 1
             STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/
-            STARTCENTER_INFO_URL https://www.libreoffice.org/
+            STARTCENTER_INFO_URL http://libreoffice.cib.de/
             STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
             DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
             STARTCENTER_HIDE_EXTERNAL_LINKS 0
diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk
index cc12759f676b..584d90b46414 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -547,7 +547,7 @@ postprocess_main_SED := \
 	-e 's,$${PRODUCTVERSION},$(PRODUCTVERSION),g' \
 	-e 's,$${PRODUCTEXTENSION},.$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX),g' \
 	-e 's,$${STARTCENTER_ADDFEATURE_URL},http://extensions.libreoffice.org/,g' \
-	-e 's,$${STARTCENTER_INFO_URL},https://www.libreoffice.org/,g' \
+	-e 's,$${STARTCENTER_INFO_URL},http://libreoffice.cib.de/,g' \
 	-e 's,$${STARTCENTER_HIDE_EXTERNAL_LINKS},0,g' \
 	-e 's,$${STARTCENTER_TEMPLREP_URL},http://templates.libreoffice.org/,g' \
 	-e 's,$${SYSTEM_LIBEXTTEXTCAT_DATA},$(SYSTEM_LIBEXTTEXTCAT_DATA),g' \
diff --git a/svtools/source/misc/langhelp.cxx b/svtools/source/misc/langhelp.cxx
index 16a3a1d8191c..24b066a9dac3 100644
--- a/svtools/source/misc/langhelp.cxx
+++ b/svtools/source/misc/langhelp.cxx
@@ -16,6 +16,7 @@
 
 void localizeWebserviceURI( OUString& rURI )
 {
+    const OUString aPrefix = "?lang=";
     OUString aLang = Application::GetSettings().GetUILanguageTag().getLanguage();
     if ( aLang.equalsIgnoreAsciiCase("pt")
          && Application::GetSettings().GetUILanguageTag().getCountry().equalsIgnoreAsciiCase("br") )
@@ -30,6 +31,7 @@ void localizeWebserviceURI( OUString& rURI )
             aLang = "zh-tw";
     }
 
+    rURI += aPrefix;
     rURI += aLang;
 }
 
commit 3774bbb349e3cbec84249e9be6b8f20440efdcdd
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Mon Sep 21 13:47:57 2015 +0200

    CIB branding for start center
    
    Conflicts:
            icon-themes/galaxy/sfx2/res/startcenter-logo.png
    
    Change-Id: I9887fded72131c7888d6e1b1165a778c8da2952d

diff --git a/icon-themes/galaxy/sfx2/res/logo.png b/icon-themes/galaxy/sfx2/res/logo.png
index 5d7e59c8d549..1f215d3ba8d0 100644
Binary files a/icon-themes/galaxy/sfx2/res/logo.png and b/icon-themes/galaxy/sfx2/res/logo.png differ
diff --git a/icon-themes/galaxy/sfx2/res/startcenter-logo.png b/icon-themes/galaxy/sfx2/res/startcenter-logo.png
index 78bc4ebd9e20..ef903fb008a0 100644
Binary files a/icon-themes/galaxy/sfx2/res/startcenter-logo.png and b/icon-themes/galaxy/sfx2/res/startcenter-logo.png differ
diff --git a/icon-themes/galaxy/sfx2/res/startcenter-logo.svg b/icon-themes/galaxy/sfx2/res/startcenter-logo.svg
new file mode 100644
index 000000000000..e1c80e595d6a
--- /dev/null
+++ b/icon-themes/galaxy/sfx2/res/startcenter-logo.svg
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   id="svg3360"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   width="368.00235"
+   height="116.34795"
+   viewBox="0 0 368.00235 116.34795"
+   sodipodi:docname="startcenter-logo.svg">
+  <metadata
+     id="metadata3366">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs3364">
+    <clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath3372">
+      <rect
+         style="fill:#ffd5d5"
+         id="rect3374"
+         width="368.00235"
+         height="116.34795"
+         x="2.077642"
+         y="105.41204" />
+    </clipPath>
+  </defs>
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1920"
+     inkscape:window-height="1173"
+     id="namedview3362"
+     showgrid="false"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0"
+     inkscape:zoom="0.96262974"
+     inkscape:cx="182.96235"
+     inkscape:cy="110.88"
+     inkscape:window-x="1911"
+     inkscape:window-y="-9"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="svg3360" />
+  <image
+     width="370.07999"
+     height="221.75999"
+     preserveAspectRatio="none"
+     xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgIAAAE0CAYAAABejlvhAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz
+AAATOQAAEzkBj8JWAQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAA2VSURB
+VHic7d17tJV1mcDx58ABEVkKjnhhLaTERhGJCW+V5n2p43U0Fa8BXijzlrryMs6k2aRLTYs0zBjN
+0WLQaTIgkTFRtPKaISZKyk1BFLnfDwcOzB/qck7vFhTOfvdxns/nz9+zOe/DX+e79tnvfuuGdu+1
+LgCAlNrUegEAoHaEAAAkJgQAIDEhAACJCQEASEwIAEBiQgAAEhMCAJCYEACAxIQAACQmBAAgMSEA
+AIkJAQBITAgAQGJCAAASEwIAkJgQAIDEhAAAJCYEACAxIQAAiQkBAEhMCABAYkIAABITAgCQmBAA
+gMSEAAAkJgQAIDEhAACJCQEASEwIAEBiQgAAEhMCAJCYEACAxIQAACQmBAAgMSEAAIkJAQBITAgA
+QGJCAAASEwIAkJgQAIDEhAAAJCYEACAxIQAAiQkBAEhMCABAYkIAABITAgCQmBAAgMSEAAAkJgQA
+IDEhAACJCQEASEwIAEBiQgAAEhMCAJCYEACAxIQAACQmBAAgMSEAAIkJAQBITAgAQGJCAAASEwIA
+kJgQAIDEhAAAJCYEACAxIQAAiQkBAEhMCABAYkIAABITAgCQmBAAgMSEAAAkJgQAIDEhAACJCQEA
+SEwIAEBiQgAAEhMCAJCYEACAxIQAACQmBAAgMSEAAIkJAQBITAgAQGJCAAASEwIAkJgQAIDEhAAA
+JCYEACAxIQAAiQkBAEhMCABAYkIAABITAgCQmBAAgMSEAAAkJgQAIDEhAACJCQEASEwIAEBiQgAA
+EhMCAJCYEACAxIQAACQmBAAgMSEAAIkJAQBITAgAQGJCAAASEwIAkJgQAIDEhAAAJCYEACAxIQAA
+iQkBAEhMCABAYkIAABITAgCQmBAAgMSEAAAkJgQAIDEhAACJCQEASEwIAEBiQgAAEhMCAJCYEACA
+xIQAACQmBAAgMSEAAIkJAQBITAgAQGJCAAASEwIAkJgQAIDEhAAAJCYEACAxIQAAiQkBAEhMCABA
+YkIAABITAgCQmBAAgMSEAAAkJgQAIDEhAACJCQEASEwIAEBiQgAAEhMCAJCYEACAxIQAACQmBAAg
+MSEAAIkJAQBITAgAQGJCAAASEwIAkJgQAIDEhAAAJCYEACAxIQAAiQkBAEhMCABAYkIAABITAgCQ
+mBAAgMSEAAAkJgQAIDEhAACJCQEASEwIAEBiQgAAEhMCAJCYEACAxIQAACQmBAAgMSEAAIkJAQBI
+TAgAQGJCAAASEwIAkJgQAIDEhAAAJCYEACAxIQAAiQkBAEhMCABAYkIAABITAgCQWH2tFwDg/7ft
+9+wXu5x4XGy21Za1XuVjWb1iRcz4n3Ex/ZHHNvjabvvsGbucdHy026Jji+6waNqMmDjsnli1aHGL
+/txK6oZ277Wu6lcBIKWufXrHCSNHRJv6trVe5RN7Ycgd8dwtt33kfNt/6BMnPDg86tpW5/82b9Kr
+8aujTop1a9dW5ed/wJ8GAKiazx528KcyAiIi9rj4vNjn8m995HzHg/avWgRERGzTu1d03ukzVfv5
+HxACAFRNfcfNa73CJul3weD48r98u+Js7kuTqn79+o4t+yeHSoQAAKxH38GD4sv/ennh/I1x42Pi
+sHvKX6iF+bAgAKUacfDRsXDKtFqvUdE2vXeNY4bfHR26dG523vfcgVG/+ebx5NXXRaz78KN1T33v
+pljTsCr2uPDrZa/aYrwjAADvmzdpcow+7axoWLCwMOt9Rv844PprIurqmp0/d/OQeGHIHWWt2OKE
+AAD8H/MmTY7fnHhmrJg7rzDb7fST44Abro26Ns1/fT53y23xpx/+pKwVW5QQAIC/sXDKtBh58sBY
+8e7cwmy3006qGAPP//An8cwNt5a1YosRAgBQwaKp02Jk/4GxfM67hVmvU0+MA2+8rhADE+7493jm
+hlvKWrFFCAEA+AiLpk6PUacMqhgDu/Y/IQ4ZcmPhuwQm3HFXPP39m8tacZMJAQBYj0VTp8eo/gNj
++TtzCrPPHXdUHDrkxsKXJr1458/jqe/dVNaKm0QIAMAGLJo2Ix484YxYOuutwmznY4+MQ398cyEG
+Jg67J5785+82u92wNRICAPAxLJ31Vow8aUAsmTmrMOt59BFx6G0/KMTApF/cH0+08hgQAgDwMS19
+a3aMPHlALHlzZmHW86jD49Dbb4k29c2/q++VXz4QT1x1bdUfHrSxhAAAfALL3no7RvYfGEveqBAD
+Rx4WRwz7cbRt377Z+SvD/yueuPKaVhkDQgAAPqH3YmBALJ7xZmHW45AD4/CfDSnEwKsj/jvGX/Gd
+VhcDQgAANsKy2e/Eb756RsXnJvQ4+IA4Ytht0XazzZqdT77/1zHu4iti7ZqmstbcICEAABtpxdx5
+Mar/wFj4+tTCbMeDvlIxBl4f+VCMu/jyVhMDQgAANsGKufNiZP+BseC1KYXZjgfuF/941+1R36FD
+s/Mpox+ORy/6dquIASEAAJto5bz5Mar/wFjw19cLs+777xtH3XtntNuiY7Pzqb8dG49ecFmsXbOm
+rDUrEgIA0AJWzl8Qo04ZFPMnv1aYdfviXnHkPT8txsCYR2LsuRdFU2NjWWsWCAEAaCEr5y+I0aee
+FfNf/Wth1m2fPeOo/7gz2nXaotn5G+PGx+++eWmsXb268G+aGhqqtusHhAAAtKCV8xfEyJMHxNyX
+Xi7Mdth7j4oxMP2Rx2Ls4IubvTMwb9LkWDh1etX3FQIA0MJWLV4So087O9598S+F2Q579Yuj7/tZ
+tO/Uqdn5G+PGx6+POyVeuvu++NOPhsbo08+OdU3V/zChEACAKli1ZGn89oxzYs6Elwqz7ff4Qhw7
+4u7YbKstm53PmzQ5/njtDfH8rbdHw4KFpewpBACgSt6LgXNjzp8nFmZdP797HDP8rtis81Y12OxD
+QgAAqqhx6fsx8MKLhVnXPr3jmOF3RYcunWuw2XuEAABUWeOyZTH69LNj9tPPFWZdd98tjhl+d81i
+QAgAQAlWr1gZYwadF2899Wxhtk3vXd+Lga27lL6XEACAkmwoBv7pV/dFx67blLqTEACAEq1Z2RBj
+Bp0Xs/7wdGHWZeed4rgH7omO23YtbR8hAAAlW7OyIR4+6/yY9funCrPOPXeK4+7/eWyx3bal7CIE
+AKAG1jQ0xMNnXxAzn/hDYda5505x+J1Doq5N9X9NCwEAqJE1DQ3x8DkXxpuP/74w265f39jqMztW
+fQchAAA11LRqVYw998KY/czzhVm7v/ka4moQAgBQY02NjRUfUlQGIQAAiQkBAEhMCABAYkIAABIT
+AgCQmBAAgNagrq4mlxUCAJCYEACAxIQAACQmBAAgMSEAAIkJAQBoDdw1AACUTQgAQGJCAAASEwIA
+kJgQAIDEhAAAJCYEAKAVqHP7IABQNiEAAIkJAQBITAgAQGJCAAASEwIAkJgQAIDWwO2DAEDZhAAA
+JCYEACAxIQAAiQkBAEhMCABAK+ChQwCQWIetu9TkukIAAFqBbT+/e+Fs7ZrVVb+uEACAGuvap3ds
+9dkehfPlb8+p+rWFAADUWN/BAwtnS2bOioaFi6p+bSEAADX0d7vtEjsffUThfMbvHi/l+kIAAGql
+ri72++7VUde2bfPzdevilV8+UMoKQgAAaqTv2V+LbvvsWTifMW58LHx9aik7CAEAqIGufXrHF6+6
+tHC+rqkpnrtpSGl7CAEAKFn7Tp3isKG3Rpt27Qqzl+8dEfMnv1baLkIAAEpU16ZNHPSDf4ste3Qv
+zJa8OTOevflHpe4jBACgRPtec1XsdORhhfN1TU3x2CVXxeply0vdRwgAQEn2uOgb0WfQ6RVnz940
+JN5+/s8lbyQEAKAUvU75aux92YUVZ9PHPhoTfnpXyRu9RwgAQJXtevLxsf/110ZUeMLgnAkvxbhL
+roxYt678xSKiviZXBYAkvnDeORVvE4yIWPDalHhowNdj9fIVJW/1ISEAAFVQ17ZtfOW6q6P3madU
+nC+b/U489LXBsWrR4pI3a04IAEAL67B1lzj4lu9Hj0MOrDhfOW9+jDp1UCyb/U65i1UgBACgBXX7
+0t5x6JAbY4vtt6s4XzJzVjx05uBYPP2NkjerTAgAQAtoU9829vzW+dHv/HOLDxF637sTX44xA78R
+K+cvKHm7jyYEAGATdT9gv9j3O1dEl8/1/MjXvPnYk/HINy+J1StWlrjZhgkBANgI9Zt3iB6HHBh9
+zxkQ2/Xru97Xvnzvf8Yfr70+1q5pKmm7j08IAFCqvS69IFYtWVLrNTZa2/bto1O3HWK7fn2jvkOH
+9b529bLlMf7Ka2LKqDElbffJCQEAStXz6CNqvUIp3nlhQjx+2dWxaNqMWq+yXkIAgOqp0bfl1VLD
+wkXx/K23x6T7RsS6tWtrvc4GCQEAqmb+5NdrvUJpGpcujUm/eCAmDB0WqxZ/ev70IQQAqJrXHhwd
+3b60V/z98cdGm/rKt9R9mq1atDjenfiXmDb20Zgyckw0LltW65U+sbqh3Xvle98GgFK1bd8+6jdf
+/wfrPm3Wrl7d6m4F3BjeEQCg6poaG6OpsbHWa1CBxxADQGJCAAASEwIAkJgQAIDEhAAAJCYEACAx
+IQAAiQkBAEhMCABAYkIAABITAgCQmBAAgMSEAAAkJgQAIDEhAACJCQEASEwIAEBiQgAAEvtfFz6z
+i6MwXbQAAAAASUVORK5CYII=
+"
+     id="image3368"
+     x="0"
+     y="0"
+     clip-path="url(#clipPath3372)"
+     transform="translate(-2.077642,-105.41204)" />
+</svg>
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index b3998b6eb52d..0b8b304fe691 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -3565,14 +3565,14 @@
           <info>
             <desc>Specifies the background color of the start center.</desc>
           </info>
-          <value>14540253</value>
+          <value>9903402</value>
         </prop>
         <prop oor:name="StartCenterTextColor" oor:type="xs:int" oor:nillable="false">
           <!-- Default 3355443 = 0x333333 as specified in tdf#90452, comment 45 -->
           <info>
             <desc>Specifies the text color of the buttons in the start center.</desc>
           </info>
-          <value>3355443</value>
+          <value>15658734</value>
         </prop>
         <prop oor:name="StartCenterThumbnailsBackgroundColor" oor:type="xs:int" oor:nillable="false">
           <!-- Default 6710886 = 0x666666 as specified in tdf#90452, comment 45 -->
commit f0416352ba0290087ad20f4e3a84c34fe7212a21
Author: Khaled Hosny <khaledhosny at eglug.org>
Date:   Thu Feb 8 14:31:34 2018 +0200

    Removed unused code for reading kern table
    
    Reviewed-on: https://gerrit.libreoffice.org/49426
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Khaled Hosny <khaledhosny at eglug.org>
    (cherry picked from commit e3caecb5a33288dd46a80b2ffcc47a2288305052)
    
    Change-Id: I66b17dbee0a04e61b99e23933a7fed4be30f3a93
    Reviewed-on: https://gerrit.libreoffice.org/49452
    Reviewed-by: Khaled Hosny <khaledhosny at eglug.org>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx
index 17efc970fa9b..bca8054b6875 100644
--- a/vcl/inc/sft.hxx
+++ b/vcl/inc/sft.hxx
@@ -102,13 +102,6 @@ namespace vcl
         FWIDTH_ULTRA_EXPANDED = 9           /**< 200% of normal                     */
     };
 
-/** Type of the 'kern' table, stored in TrueTypeFont::kerntype */
-    enum KernType {
-        KT_NONE         = 0,                /**< no kern table                      */
-        KT_APPLE_NEW    = 1,                /**< new Apple kern table               */
-        KT_MICROSOFT    = 2                 /**< Microsoft table                    */
-    };
-
 /** Composite glyph flags definition */
     enum CompositeFlags {
         ARG_1_AND_2_ARE_WORDS     = 1,
@@ -197,12 +190,6 @@ namespace vcl
 #define TYPEFLAG_COPYRIGHT_MASK 0x000000E
 #define TYPEFLAG_PS_OPENTYPE    0x0010000
 
-/** Structure used by KernGlyphs()      */
-    typedef struct {
-        int x;                    /**< positive: right, negative: left                        */
-        int y;                    /**< positive: up, negative: down                           */
-    } KernData;
-
 /** ControlPoint structure used by GetTTGlyphPoints() */
     typedef struct {
         sal_uInt32 flags;             /**< 00000000 00000000 e0000000 bbbbbbbb */
@@ -495,10 +482,6 @@ namespace vcl
         sal_uInt32 (*mapper)(const sal_uInt8 *, sal_uInt32, sal_uInt32); /* character to glyphID translation function                          */
         const sal_uInt8   **tables;                        /* array of pointers to raw subtables in SFNT file                    */
         sal_uInt32  *tlens;                                /* array of table lengths                                             */
-        int         kerntype;                              /* Defined in the KernType enum                                       */
-        sal_uInt32  nkern;                                 /* number of kern subtables                                           */
-        const sal_uInt8** kerntables;                      /* array of pointers to kern subtables                                */
-        void        *pGSubstitution;                       /* info provided by GSUB for UseGSUB()                                */
     };
 
 /* indexes into TrueTypeFont::tables[] and TrueTypeFont::tlens[] */
@@ -514,7 +497,6 @@ namespace vcl
 #define O_vmtx 9     /* 'vmtx' */
 #define O_OS2  10    /* 'OS/2' */
 #define O_post 11    /* 'post' */
-#define O_kern 12    /* 'kern' */
 #define O_cvt  13    /* 'cvt_' - only used in TT->TT generation */
 #define O_prep 14    /* 'prep' - only used in TT->TT generation */
 #define O_fpgm 15    /* 'fpgm' - only used in TT->TT generation */
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 966393fa4fe3..f968c9c092d9 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -123,7 +123,6 @@ static const sal_uInt32 T_otto = 0x4f54544f;        /* 'OTTO' */
 #define T_vmtx 0x766D7478
 #define T_OS2  0x4F532F32
 #define T_post 0x706F7374
-#define T_kern 0x6B65726E
 #define T_cvt  0x63767420
 #define T_prep 0x70726570
 #define T_fpgm 0x6670676D
@@ -1345,86 +1344,6 @@ static void FindCmap(TrueTypeFont *ttf)
     }
 }
 
-static void GetKern(TrueTypeFont *ttf)
-{
-    const sal_uInt8* table = getTable(ttf, O_kern);
-    int nTableSize = getTableSize(ttf, O_kern);
-    const sal_uInt8 *ptr;
-
-    if( !table )
-        goto badtable;
-
-    if (nTableSize >= 4 && GetUInt16(table, 0) == 0) { /* Traditional Microsoft style table with sal_uInt16 version and nTables fields */
-        ttf->nkern = GetUInt16(table, 2);
-        ttf->kerntype = KT_MICROSOFT;
-        ptr = table + 4;
-
-        const sal_uInt32 remaining_table_size = nTableSize-4;
-        const sal_uInt32 nMinRecordSize = 2;
-        const sal_uInt32 nMaxRecords = remaining_table_size / nMinRecordSize;
-        if (ttf->nkern > nMaxRecords)
-        {
-            SAL_WARN("vcl.fonts", "Parsing error in " << OUString::createFromAscii(ttf->fname) <<
-                     ": " << nMaxRecords << " max possible entries, but " <<
-                     ttf->nkern << " claimed, truncating");
-            ttf->nkern = nMaxRecords;
-        }
-
-        ttf->kerntables = static_cast<const sal_uInt8**>(calloc(ttf->nkern, sizeof(sal_uInt8 *)));
-        assert(ttf->kerntables != nullptr);
-
-        for( unsigned i = 0; i < ttf->nkern; ++i) {
-            ttf->kerntables[i] = ptr;
-            ptr += GetUInt16(ptr, 2);
-            /* sanity check */
-            if( ptr > ttf->ptr+ttf->fsize )
-            {
-                free( ttf->kerntables );
-                goto badtable;
-            }
-        }
-        return;
-    }
-
-    if (nTableSize >= 8 && GetUInt32(table, 0) == 0x00010000) { /* MacOS style kern tables: fixed32 version and sal_uInt32 nTables fields */
-        ttf->nkern = GetUInt32(table, 4);
-        ttf->kerntype = KT_APPLE_NEW;
-        ptr = table + 8;
-
-        const sal_uInt32 remaining_table_size = nTableSize-8;
-        const sal_uInt32 nMinRecordSize = 4;
-        const sal_uInt32 nMaxRecords = remaining_table_size / nMinRecordSize;
-        if (ttf->nkern > nMaxRecords)
-        {
-            SAL_WARN("vcl.fonts", "Parsing error in " << OUString::createFromAscii(ttf->fname) <<
-                     ": " << nMaxRecords << " max possible entries, but " <<
-                     ttf->nkern << " claimed, truncating");
-            ttf->nkern = nMaxRecords;
-        }
-
-        ttf->kerntables = static_cast<const sal_uInt8**>(calloc(ttf->nkern, sizeof(sal_uInt8 *)));
-        assert(ttf->kerntables != nullptr);
-
-        for( unsigned i = 0; i < ttf->nkern; ++i) {
-            ttf->kerntables[i] = ptr;
-            ptr += GetUInt32(ptr, 0);
-            /* sanity check; there are some fonts that are broken in this regard */
-            if( ptr > ttf->ptr+ttf->fsize )
-            {
-                free( ttf->kerntables );
-                goto badtable;
-            }
-        }
-        return;
-    }
-
-  badtable:
-    ttf->kerntype = KT_NONE;
-    ttf->kerntables = nullptr;
-
-    return;
-}
-
 /*- Public functions */
 
 int CountTTCFonts(const char* fname)
@@ -1452,7 +1371,6 @@ static void allocTrueTypeFont( TrueTypeFont** ttf )
         (*ttf)->fsize = -1;
         (*ttf)->ptr = nullptr;
         (*ttf)->nglyphs = 0xFFFFFFFF;
-        (*ttf)->pGSubstitution = nullptr;
     }
 }
 
@@ -1597,7 +1515,6 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
             case T_vmtx: nIndex = O_vmtx; break;
             case T_OS2 : nIndex = O_OS2;  break;
             case T_post: nIndex = O_post; break;
-            case T_kern: nIndex = O_kern; break;
             case T_cvt : nIndex = O_cvt;  break;
             case T_prep: nIndex = O_prep; break;
             case T_fpgm: nIndex = O_fpgm; break;
@@ -1722,7 +1639,6 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
 
     GetNames(t);
     FindCmap(t);
-    GetKern(t);
 
     return SF_OK;
 }
@@ -1744,7 +1660,6 @@ void CloseTTFont(TrueTypeFont *ttf)
         free( ttf->usubfamily );
     free(ttf->tables);
     free(ttf->tlens);
-    free(ttf->kerntables);
 
     free(ttf);
     return;
commit df30a561499305a1da6c5fb578315feefe873881
Author: Justin Luth <justin_luth at sil.org>
Date:   Fri Feb 2 14:53:40 2018 +0300

    init known ExtraLanguages before document loads
    
    Extensions can add RegisterOnTheFly languages for spell checkers.
    A late initialization of the LanguageTable resulted in the inability
    to recognize the available spell checker.
    
    So, if a .doc file had an onTheFly language inside, and it was
    the first document that LibreOffice opened, then the spell checking
    extension was disabled for any other document opened while LibreOffice
    was living, including docx and odt files.  (Starting with a blank
    document, or a .docx or .odt file seems to initialize OK - and
    then subsequent .doc files are also ok in those sessions.)
    
    Ensuring that the static LanguageTable is intialized early in the process
    avoids this headache.
    
    In my case, .doc was failing with:
    LanguageTag::registerOnTheFly: not cross-inserted
    0x7e0 for 'kbo' have 'en-US'
    
    but with this patch now matches .odt/docx with:
    
    LanguageTag::registerOnTheFly: cross-inserted
    0x7e0 for 'kbo' [have 'kbo']
    
    This fixes .ods .odg, odp,
               .xls .xlsx .ppt, pptx
               .doc and likely many others
    
    Change-Id: Ie6dcbfd73e063eef4573016c3c62d29cf8ad43ca
    Reviewed-on: https://gerrit.libreoffice.org/49142
    Reviewed-by: Martin Hosken <martin_hosken at sil.org>
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 427c0804cd4aecde1cadb7cb3c4f3487991bd573)
    Reviewed-on: https://gerrit.libreoffice.org/49171
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    (cherry picked from commit d51c01846afb9bea5a39fd48fbb30b9fd02c2870)
    Reviewed-on: https://gerrit.libreoffice.org/49449
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 759cc16b987c..b295345ca46e 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -73,6 +73,7 @@
 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/interaction.hxx>
+#include <svtools/langtab.hxx>
 #include <svtools/sfxecode.hxx>
 #include <unotools/configmgr.hxx>
 #include <unotools/securityoptions.hxx>
@@ -655,6 +656,9 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
     pImpl->nLoadedFlags = SfxLoadedFlags::NONE;
     pImpl->bModelInitialized = false;
 
+    // initialize static language table so language-related extensions are learned before the document loads
+    (void)SvtLanguageTable::GetLanguageEntryCount();
+
     //TODO/LATER: make a clear strategy how to handle "UsesStorage" etc.
     bool bOwnStorageFormat = IsOwnStorageFormat( *pMedium );
     bool bHasStorage = IsPackageStorageFormat_Impl( *pMedium );
commit a704756d92d0dcb4822e7115a293192378151859
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 8 17:05:11 2018 +0000

    ofz#6112 wrong start off sets for korean KSC5601 table
    
    Change-Id: If986352478f34f54015f1969c97c26e2ef05c06c
    Reviewed-on: https://gerrit.libreoffice.org/49446
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sal/textenc/tcvtkr6.tab b/sal/textenc/tcvtkr6.tab
index fab6c6131a5f..776c15dbcf5e 100644
--- a/sal/textenc/tcvtkr6.tab
+++ b/sal/textenc/tcvtkr6.tab
@@ -401,13 +401,13 @@ static ImplUniToDBCSHighTab const aKSC5601DBCSHighTab[256] =
     { 0x02, 0xFB, aImplUniToDBCSTab_KSC5601_6A },               /* 0x6A */
     { 0x04, 0xEC, aImplUniToDBCSTab_KSC5601_6B },               /* 0x6B */
     { 0x08, 0xF3, aImplUniToDBCSTab_KSC5601_6C },               /* 0x6C */
-    { 0x03, 0xFB, aImplUniToDBCSTab_KSC5601_6D },               /* 0x6D */
+    { 0x0B, 0xFB, aImplUniToDBCSTab_KSC5601_6D },               /* 0x6D */
     { 0x17, 0xFF, aImplUniToDBCSTab_KSC5601_6E },               /* 0x6E */
     { 0x01, 0xFE, aImplUniToDBCSTab_KSC5601_6F },               /* 0x6F */
     { 0x01, 0xFD, aImplUniToDBCSTab_KSC5601_70 },               /* 0x70 */
     { 0x04, 0xFF, aImplUniToDBCSTab_KSC5601_71 },               /* 0x71 */
     { 0x00, 0xFD, aImplUniToDBCSTab_KSC5601_72 },               /* 0x72 */
-    { 0x02, 0xFE, aImplUniToDBCSTab_KSC5601_73 },               /* 0x73 */
+    { 0x0A, 0xFE, aImplUniToDBCSTab_KSC5601_73 },               /* 0x73 */
     { 0x01, 0xF7, aImplUniToDBCSTab_KSC5601_74 },               /* 0x74 */
     { 0x01, 0xFC, aImplUniToDBCSTab_KSC5601_75 },               /* 0x75 */
     { 0x00, 0xFE, aImplUniToDBCSTab_KSC5601_76 },               /* 0x76 */
commit 1c6311b3fe9bbbf978960167bd67cf8d51cd1f6e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 1 16:12:21 2018 +0000

    ofz#4767 Bad-cast
    
    Reviewed-on: https://gerrit.libreoffice.org/47235
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 5670a9619b77a6a9e53b0cf20c059ea66ca5f450)
    
    ofz: avoid deleting the table still being processed
    
    Reviewed-on: https://gerrit.libreoffice.org/46902
    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>
    (cherry picked from commit f297b0d043e0767d85f00aa1e4cae5b036b0ac51)
    
    ofz#4753 Bad-cast, check all open tables
    
    Reviewed-on: https://gerrit.libreoffice.org/47199
    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>
    (cherry picked from commit 80fc91db239869b513f47866f45d8a43fb98fe16)
    
    CurrentTableInPaM->PendingTableInPaM
    
    (cherry picked from commit 2ed6eba4f99681fe717741ddc1534ed3ccc15e82)
    
    ofz#4848 Null-dereference READ
    
    (cherry picked from commit d4d0b1a2b9f11fb7629559e08c345697ba129c04)
    
    ofz#4817 Bad-cast
    
    Reviewed-on: https://gerrit.libreoffice.org/47236
    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>
    (cherry picked from commit 9e269ef68e33fc9da154f6694be7cbcd5e3b4bfc)
    
    ofz#4872 Null-dereference READ
    
    we're going to need a bigger boat
    
    Reviewed-on: https://gerrit.libreoffice.org/47269
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit dfc72242e5bf67bdd5127bf38ed2ad5b3e49cea3)
    
    ofz#4971 Bad-cast
    
    Reviewed-on: https://gerrit.libreoffice.org/47466
    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>
    (cherry picked from commit c75c3b2fdab5614664215e52d85657472ec86f05)
    
    ofz#5007 Null-dereference READ
    
    Reviewed-on: https://gerrit.libreoffice.org/47537
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 6d05e0945054459ed04d50ae16731f933be48664)
    
    ofz#5235 Bad-cast
    
    Reviewed-on: https://gerrit.libreoffice.org/47747
    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>
    (cherry picked from commit 710cf469bf0e43a021fc1a24a80745bc602368ef)
    
    ofz#5909 Null-dereference READ
    
    Reviewed-on: https://gerrit.libreoffice.org/49218
    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>
    (cherry picked from commit 5090d575117fbe6ced75dc45c514f8d990523251)
    
    ofz#6064 clear footnotes from tobe-deleted paragraph
    
    Change-Id: Ibf8285efae7c570452954feb41a1a36bf44504a4
    a92d469fd0e280bdc6470e780ab12b00366f0f8d
    e6e2fb9f2e16e021a4719c418f52ce074c359904
    c8b48d3b3e3f87e9ac3e8a6bb832f8e8dfe8ab7d
    632aca7e3f59b7edf48c8c35eff4abf1946af652
    5dc9c66ce17f6401fbc9683cf8b10bf62755a166
    e4ee3ae1ac9f906ca3faec412bbafc0c6a911aaf
    cf66aa82e72a2b9f24f590b84bb0441ebf09463f
    830483071ce481fd14b0d1227c90e492e125f35e
    041f09f37941a92ccee3f0ebf9e5a950dee0c52f
    830d3e8bda517e7681cea7481c32457486ced693
    33f75adab35d43a4bbf51e33a0abcb5daeca93a3
    
    ofz: Null-deref
    
    Change-Id: I9992191fe5b4cfd771cc36a61d0ebaa8a9e6e9db
    Reviewed-on: https://gerrit.libreoffice.org/46743
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit e867b393ef95cb9bec7f68787771dfa329b00bea)
    
    ofz#4728 Null-deref
    
    Reviewed-on: https://gerrit.libreoffice.org/47000
    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>
    (cherry picked from commit f2e0c18cd44fff1e1b79924f582ced400fb00dad)
    
    Change-Id: Ide91a63424f864e2913b8268c4eca7961ba54572
    Reviewed-on: https://gerrit.libreoffice.org/49358
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/qa/core/data/html/fail/ofz5909-1.html b/sw/qa/core/data/html/fail/ofz5909-1.html
new file mode 100644
index 000000000000..9511b2bc1eac
--- /dev/null
+++ b/sw/qa/core/data/html/fail/ofz5909-1.html
@@ -0,0 +1 @@
+<table><td><a class="sdfootnoteanc"href=" sdfootnote1   "></a><div id="sdfootnote1"><table><td>
\ No newline at end of file
diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index 9f9e6fdfeac1..dcfed6c3f04c 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -561,10 +561,9 @@ void SwHTMLTableLayout::AutoLayoutPass1()
                             nIdx++;
                         }
                     }
-                    else
+                    else if (SwHTMLTableLayout *pChild = pCnts->GetTable())
                     {
                         OSL_ENSURE( false, "Sub tables in HTML import?" );
-                        SwHTMLTableLayout *pChild = pCnts->GetTable();
                         pChild->AutoLayoutPass1();
                         sal_uLong nMaxTableCnts = pChild->m_nMax;
                         sal_uLong nAbsMinTableCnts = pChild->m_nMin;
@@ -1608,7 +1607,7 @@ void SwHTMLTableLayout::SetWidths( bool bCallPass2, sal_uInt16 nAbsAvail,
                 {
                     SetBoxWidth( pBox, j, pCell->GetColSpan() );
                 }
-                else
+                else if (SwHTMLTableLayout *pTable = pContents->GetTable())
                 {
                     sal_uInt16 nAbs = 0, nRel = 0, nLSpace = 0, nRSpace = 0,
                            nInhSpace = 0;
@@ -1620,7 +1619,7 @@ void SwHTMLTableLayout::SetWidths( bool bCallPass2, sal_uInt16 nAbsAvail,
                         nRSpace = GetRightCellSpace( j, nColSpan );
                         nInhSpace = GetInhCellSpace( j, nColSpan );
                     }
-                    pContents->GetTable()->SetWidths( bCallPass2, nAbs, nRel,
+                    pTable->SetWidths( bCallPass2, nAbs, nRel,
                                                     nLSpace, nRSpace,
                                                     nInhSpace );
                 }
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index 9f2fea2a1743..272d04f8ddeb 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -31,17 +31,6 @@
 #include "swhtml.hxx"
 #include "wrthtml.hxx"
 
-struct SwHTMLFootEndNote_Impl
-{
-    SwHTMLTextFootnotes aTextFootnotes;
-    std::vector<OUString> aNames;
-
-    OUString sName;
-    OUString sContent;            // Infos fuer die letzte Fussnote
-    bool bEndNote;
-    bool bFixed;
-};
-
 sal_Int32 lcl_html_getNextPart( OUString& rPart, const OUString& rContent,
                              sal_Int32 nPos )
 {
@@ -209,11 +198,8 @@ void SwHTMLParser::FinishFootEndNote()
         m_pPam->GetNode().GetTextNode()->GetTextAttrForCharAt(
             m_pPam->GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_FTN ) );
     // In header and footer no footnotes can be inserted.
-    if( pTextFootnote )
-    {
-        m_pFootEndNoteImpl->aTextFootnotes.push_back( pTextFootnote );
-        m_pFootEndNoteImpl->aNames.push_back(m_pFootEndNoteImpl->sName);
-    }
+    if (pTextFootnote)
+        m_pFootEndNoteImpl->aTextFootnotes.push_back(SwHTMLTextFootnote(m_pFootEndNoteImpl->sName,pTextFootnote));
     m_pFootEndNoteImpl->sName = aEmptyOUStr;
     m_pFootEndNoteImpl->sContent = aEmptyOUStr;
     m_pFootEndNoteImpl->bFixed = false;
@@ -235,19 +221,18 @@ SwNodeIndex *SwHTMLParser::GetFootEndNoteSection( const OUString& rName )
 {
     SwNodeIndex *pStartNodeIdx = nullptr;
 
-    if( m_pFootEndNoteImpl )
+    if (m_pFootEndNoteImpl)
     {
         OUString aName(rName.toAsciiUpperCase());
 
-        size_t nCount = m_pFootEndNoteImpl->aNames.size();
+        size_t nCount = m_pFootEndNoteImpl->aTextFootnotes.size();
         for(size_t i = 0; i < nCount; ++i)
         {
-            if(m_pFootEndNoteImpl->aNames[i] == aName)
+            if (m_pFootEndNoteImpl->aTextFootnotes[i].sName == aName)
             {
-                pStartNodeIdx = m_pFootEndNoteImpl->aTextFootnotes[i]->GetStartNode();
-                m_pFootEndNoteImpl->aNames.erase(m_pFootEndNoteImpl->aNames.begin() + i);
+                pStartNodeIdx = m_pFootEndNoteImpl->aTextFootnotes[i].pTextFootnote->GetStartNode();
                 m_pFootEndNoteImpl->aTextFootnotes.erase( m_pFootEndNoteImpl->aTextFootnotes.begin() + i );
-                if(m_pFootEndNoteImpl->aNames.empty())
+                if (m_pFootEndNoteImpl->aTextFootnotes.empty())
                 {
                     delete m_pFootEndNoteImpl;
                     m_pFootEndNoteImpl = nullptr;
@@ -288,7 +273,7 @@ Writer& OutHTML_SwFormatFootnote( Writer& rWrt, const SfxPoolItem& rHt )
     }
 
     if( !rHTMLWrt.m_pFootEndNotes )
-        rHTMLWrt.m_pFootEndNotes = new SwHTMLTextFootnotes;
+        rHTMLWrt.m_pFootEndNotes = new std::vector<SwTextFootnote*>;
     rHTMLWrt.m_pFootEndNotes->insert( rHTMLWrt.m_pFootEndNotes->begin() + nPos, pTextFootnote );
 
     OStringBuffer sOut;
diff --git a/sw/source/filter/html/htmlnumreader.cxx b/sw/source/filter/html/htmlnumreader.cxx
index 3b4ae766bdd3..3a17e18bce30 100644
--- a/sw/source/filter/html/htmlnumreader.cxx
+++ b/sw/source/filter/html/htmlnumreader.cxx
@@ -470,6 +470,13 @@ void SwHTMLParser::NewNumBulListItem( HtmlTokenId nToken )
         AppendTextNode( AM_NOSPACE, false );
     m_bNoParSpace = false;    // no space in <LI>!
 
+    SwTextNode* pTextNode = m_pPam->GetNode().GetTextNode();
+    if (!pTextNode)
+    {
+        SAL_WARN("sw.html", "No Text-Node at PaM-Position");
+        return;
+    }
+
     const bool bCountedInList = nToken != HtmlTokenId::LISTHEADER_ON;
 
     HTMLAttrContext *pCntxt = new HTMLAttrContext( nToken );
@@ -505,7 +512,6 @@ void SwHTMLParser::NewNumBulListItem( HtmlTokenId nToken )
         m_nOpenParaToken = nToken;
     }
 
-    SwTextNode* pTextNode = m_pPam->GetNode().GetTextNode();
     static_cast<SwContentNode *>(pTextNode)->SetAttr( SwNumRuleItem(aNumRuleName) );
     pTextNode->SetAttrListLevel(nLevel);
     // #i57656# - <IsCounted()> state of text node has to be adjusted accordingly.
@@ -599,7 +605,11 @@ void SwHTMLParser::EndNumBulListItem( HtmlTokenId nToken, bool bSetColl )
 void SwHTMLParser::SetNodeNum( sal_uInt8 nLevel )
 {
     SwTextNode* pTextNode = m_pPam->GetNode().GetTextNode();
-    OSL_ENSURE( pTextNode, "No Text-Node at PaM-Position" );
+    if (!pTextNode)
+    {
+        SAL_WARN("sw.html", "No Text-Node at PaM-Position");
+        return;
+    }
 
     OSL_ENSURE( GetNumInfo().GetNumRule(), "No numbering rule" );
     const OUString& rName = GetNumInfo().GetNumRule()->GetName();
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index b1151ca37313..ae36ae1870c8 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -195,7 +195,11 @@ void SwHTMLParser::NewDivision( HtmlTokenId nToken )
                 static_cast<const SwStartNode *>( &rContentStIdx.GetNode() );
             aDelPam.GetPoint()->nNode = pStNd->EndOfSectionIndex() - 1;
 
-            m_xDoc->getIDocumentContentOperations().DelFullPara( aDelPam );
+            if (!PendingObjectsInPaM(aDelPam))
+            {
+                ClearFootnotesInRange(aDelPam.GetMark()->nNode, aDelPam.GetPoint()->nNode);
+                m_xDoc->getIDocumentContentOperations().DelFullPara(aDelPam);
+            }
 
             // update page style
             for( size_t i=0; i < m_xDoc->GetPageDescCnt(); i++ )
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index e033e4f36c61..6d80b324b885 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -35,6 +35,7 @@
 #include <svl/urihelper.hxx>
 #include <o3tl/make_unique.hxx>
 
+#include <dcontact.hxx>
 #include <fmtornt.hxx>
 #include <frmfmt.hxx>
 #include <fmtfsize.hxx>
@@ -58,6 +59,7 @@
 #include "swhtml.hxx"
 #include "swcss1.hxx"
 #include <numrule.hxx>
+#include <txtftn.hxx>
 
 #define NETSCAPE_DFLT_BORDER 1
 #define NETSCAPE_DFLT_CELLSPACING 2
@@ -617,6 +619,8 @@ public:
 
     void IncBoxCount() { m_nBoxes++; }
     bool IsOverflowing() const { return m_nBoxes > 64000; }
+
+    bool PendingDrawObjectsInPaM(SwPaM& rPam) const;
 };
 
 void HTMLTableCnts::InitCtor()
@@ -1075,10 +1079,14 @@ HTMLTable::HTMLTable( SwHTMLParser* pPars, HTMLTable *pTopTab,
 
     for( sal_uInt16 i=0; i<m_nCols; i++ )
         m_pColumns->push_back(o3tl::make_unique<HTMLTableColumn>());
+
+    m_pParser->RegisterHTMLTable(this);
 }
 
 HTMLTable::~HTMLTable()
 {
+    m_pParser->DeregisterHTMLTable(this);
+
     delete m_pResizeDrawObjects;
     delete m_pDrawObjectPrcWidths;
 
@@ -1714,9 +1722,9 @@ SwTableBox *HTMLTable::MakeTableBox( SwTableLine *pUpper,
             pBox = NewTableBox( pCnts->GetStartNode(), pUpper );
             pCnts->SetTableBox( pBox );
         }
-        else
+        else if (HTMLTable* pTable = pCnts->GetTable())
         {
-            pCnts->GetTable()->InheritVertBorders( this, nLeftCol,
+            pTable->InheritVertBorders( this, nLeftCol,
                                                    nRightCol-nLeftCol );
             // ... that's a table. We'll build a new box and put the rows of the table
             // in the rows of the box
@@ -1729,6 +1737,10 @@ SwTableBox *HTMLTable::MakeTableBox( SwTableLine *pUpper,
             pCnts->GetTable()->MakeTable( pBox, nAbs, nRel, nLSpace, nRSpace,
                                           nInhSpace );
         }
+        else
+        {
+            return nullptr;
+        }
     }
     else
     {
@@ -2405,6 +2417,12 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail,
             break;
         }
 
+        if (!m_pSwTable)
+        {
+            SAL_WARN("sw.html", "no table");
+            return;
+        }
+
         // get the table format and adapt it
         SwFrameFormat *pFrameFormat = m_pSwTable->GetFrameFormat();
         pFrameFormat->SetFormatAttr( SwFormatHoriOrient(0,eHoriOri) );
@@ -3594,6 +3612,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
                 const SwTable* pSwTable = m_xDoc->InsertTable(
                         SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 1 ),
                         *m_pPam->GetPoint(), 1, 1, text::HoriOrientation::LEFT );
+                SwFrameFormat *pFrameFormat = pSwTable ? pSwTable->GetFrameFormat() : nullptr;
 
                 if( bForceFrame )
                 {
@@ -3603,22 +3622,20 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
                 }
                 else
                 {
-                    if( bStyleParsed )
+                    if (bStyleParsed && pFrameFormat)
                     {
                         m_pCSS1Parser->SetFormatBreak( aItemSet, aPropInfo );
-                        pSwTable->GetFrameFormat()->SetFormatAttr( aItemSet );
+                        pFrameFormat->SetFormatAttr( aItemSet );
                     }
                     m_pPam->Move( fnMoveBackward );
                 }
 
                 SwNode const*const pNd = & m_pPam->GetPoint()->nNode.GetNode();
-                if( !bAppended && !bForceFrame )
-                {
-                    SwTextNode *const pOldTextNd =
-                        pSavePos->nNode.GetNode().GetTextNode();
-                    OSL_ENSURE( pOldTextNd, "Why we aren't in a text node?" );
-                    SwFrameFormat *pFrameFormat = pSwTable->GetFrameFormat();
+                SwTextNode *const pOldTextNd = (!bAppended && !bForceFrame) ?
+                    pSavePos->nNode.GetNode().GetTextNode() : nullptr;
 
+                if (pFrameFormat && pOldTextNd)
+                {
                     const SfxPoolItem* pItem2;
                     if( SfxItemState::SET == pOldTextNd->GetSwAttrSet()
                             .GetItemState( RES_PAGEDESC, false, &pItem2 ) &&
@@ -3931,15 +3948,21 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
             InsertTableSection( static_cast< sal_uInt16 >(pSaveStruct->IsHeaderCell()
                                         ? RES_POOLCOLL_TABLE_HDLN
                                         : RES_POOLCOLL_TABLE ));
-        const SwEndNode *pEndNd = pStNd->EndOfSectionNode();
-        SwContentNode *pCNd = m_xDoc->GetNodes()[pEndNd->GetIndex()-1] ->GetContentNode();
-        //Added defaults to CJK and CTL
-        SvxFontHeightItem aFontHeight( 40, 100, RES_CHRATR_FONTSIZE );
-        pCNd->SetAttr( aFontHeight );
-        SvxFontHeightItem aFontHeightCJK( 40, 100, RES_CHRATR_CJK_FONTSIZE );
-        pCNd->SetAttr( aFontHeightCJK );
-        SvxFontHeightItem aFontHeightCTL( 40, 100, RES_CHRATR_CTL_FONTSIZE );
-        pCNd->SetAttr( aFontHeightCTL );
+
+        if (!pStNd)
+            eState = SvParserState::Error;
+        else
+        {
+            const SwEndNode *pEndNd = pStNd->EndOfSectionNode();
+            SwContentNode *pCNd = m_xDoc->GetNodes()[pEndNd->GetIndex()-1] ->GetContentNode();
+            //Added defaults to CJK and CTL
+            SvxFontHeightItem aFontHeight( 40, 100, RES_CHRATR_FONTSIZE );
+            pCNd->SetAttr( aFontHeight );
+            SvxFontHeightItem aFontHeightCJK( 40, 100, RES_CHRATR_CJK_FONTSIZE );
+            pCNd->SetAttr( aFontHeightCJK );
+            SvxFontHeightItem aFontHeightCTL( 40, 100, RES_CHRATR_CTL_FONTSIZE );
+            pCNd->SetAttr( aFontHeightCTL );
+        }
 
         pSaveStruct->AddContents( new HTMLTableCnts(pStNd) );
         pSaveStruct->ClearIsInSection();
@@ -4972,6 +4995,134 @@ HTMLTableOptions::HTMLTableOptions( const HTMLOptions& rOptions,
     }
 }
 
+namespace
+{
+    class FrameDeleteWatch : public SwClient
+    {
+        SwFrameFormat* m_pObjectFormat;
+        bool m_bDeleted;
+    public:
+        FrameDeleteWatch(SwFrameFormat* pObjectFormat)
+            : m_pObjectFormat(pObjectFormat)
+            , m_bDeleted(false)
+        {
+            if (m_pObjectFormat)
+                m_pObjectFormat->Add(this);
+
+        }
+
+        virtual void SwClientNotify(const SwModify& rModify, const SfxHint& rHint) override
+        {
+            SwClient::SwClientNotify(rModify, rHint);
+            if (auto pDrawFrameFormatHint = dynamic_cast<const sw::DrawFrameFormatHint*>(&rHint))
+            {
+                if (pDrawFrameFormatHint->m_eId == sw::DrawFrameFormatHintId::DYING)
+                {
+                    m_pObjectFormat->Remove(this);
+                    m_bDeleted = true;
+                }
+            }
+        }
+
+        bool WasDeleted() const
+        {
+            return m_bDeleted;
+        }
+
+        virtual ~FrameDeleteWatch() override
+        {
+            if (!m_bDeleted && m_pObjectFormat)
+                m_pObjectFormat->Remove(this);
+        }
+    };
+
+    class IndexInRange
+    {
+    private:
+        SwNodeIndex maStart;
+        SwNodeIndex maEnd;
+    public:
+        explicit IndexInRange(const SwNodeIndex& rStart, const SwNodeIndex& rEnd)
+            : maStart(rStart)
+            , maEnd(rEnd)
+        {
+        }
+        bool operator()(const SwHTMLTextFootnote& rTextFootnote) const
+        {
+            const SwNodeIndex aTextIdx(rTextFootnote.pTextFootnote->GetTextNode());
+            return aTextIdx >= maStart && aTextIdx <= maEnd;
+        }
+    };
+}
+
+void SwHTMLParser::ClearFootnotesInRange(const SwNodeIndex& rMkNdIdx, const SwNodeIndex& rPtNdIdx)
+{
+    //similarly for footnotes
+    if (m_pFootEndNoteImpl)
+    {
+        m_pFootEndNoteImpl->aTextFootnotes.erase(std::remove_if(m_pFootEndNoteImpl->aTextFootnotes.begin(),
+            m_pFootEndNoteImpl->aTextFootnotes.end(), IndexInRange(rMkNdIdx, rPtNdIdx)), m_pFootEndNoteImpl->aTextFootnotes.end());
+        if (m_pFootEndNoteImpl->aTextFootnotes.empty())
+        {
+            delete m_pFootEndNoteImpl;
+            m_pFootEndNoteImpl = nullptr;
+        }
+    }
+
+    //follow DelFlyInRange pattern here
+    const bool bDelFwrd = rMkNdIdx.GetIndex() <= rPtNdIdx.GetIndex();
+
+    SwDoc* pDoc = rMkNdIdx.GetNode().GetDoc();
+    SwFrameFormats& rTable = *pDoc->GetSpzFrameFormats();
+    for ( auto i = rTable.size(); i; )
+    {
+        SwFrameFormat *pFormat = rTable[--i];
+        const SwFormatAnchor &rAnch = pFormat->GetAnchor();
+        SwPosition const*const pAPos = rAnch.GetContentAnchor();
+        if (pAPos &&
+            ((rAnch.GetAnchorId() == RndStdIds::FLY_AT_PARA) ||
+             (rAnch.GetAnchorId() == RndStdIds::FLY_AT_CHAR)) &&
+            ( bDelFwrd
+                ? rMkNdIdx < pAPos->nNode && pAPos->nNode <= rPtNdIdx
+                : rPtNdIdx <= pAPos->nNode && pAPos->nNode < rMkNdIdx ))
+        {
+            if( rPtNdIdx != pAPos->nNode )
+            {
+                // If the Fly is deleted, all Flys in its content have to be deleted too.
+                const SwFormatContent &rContent = pFormat->GetContent();
+                // But only fly formats own their content, not draw formats.
+                if (rContent.GetContentIdx() && pFormat->Which() == RES_FLYFRMFMT)
+                {
+                    ClearFootnotesInRange(*rContent.GetContentIdx(),
+                                          SwNodeIndex(*rContent.GetContentIdx()->GetNode().EndOfSectionNode()));
+                }
+            }
+        }
+    }
+}
+
+void SwHTMLParser::DeleteSection(SwStartNode* pSttNd)
+{
+    //if section to be deleted contains a pending m_pMarquee, it will be deleted
+    //so clear m_pMarquee pointer if that's the case
+    SwFrameFormat* pObjectFormat = m_pMarquee ? ::FindFrameFormat(m_pMarquee) : nullptr;
+    FrameDeleteWatch aWatch(pObjectFormat);
+
+    //similarly for footnotes
+    SwNodeIndex aSttIdx(*pSttNd), aEndIdx(*pSttNd->EndOfSectionNode());
+    ClearFootnotesInRange(aSttIdx, aEndIdx);
+
+    m_xDoc->getIDocumentContentOperations().DeleteSection(pSttNd);
+
+    if (pObjectFormat)
+    {
+        if (aWatch.WasDeleted())
+            m_pMarquee = nullptr;
+        else
+            pObjectFormat->Remove(&aWatch);
+    }
+}
+
 HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
                                      bool bIsParentHead,
                                      bool bHasParentSection,
@@ -5186,7 +5337,7 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
                 // The section isn't needed anymore
                 m_pPam->SetMark();
                 m_pPam->DeleteMark();
-                m_xDoc->getIDocumentContentOperations().DeleteSection( const_cast<SwStartNode *>(pCapStNd) );
+                DeleteSection(const_cast<SwStartNode*>(pCapStNd));
                 m_pTable->SetCaption( nullptr, false );
             }
 
@@ -5205,8 +5356,9 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
             m_bUpperSpace = true;
             SetTextCollAttrs();
 
-            m_nParaCnt = m_nParaCnt - std::min(m_nParaCnt,
-                pTCntxt->GetTableNode()->GetTable().GetTabSortBoxes().size());
+            SwTableNode* pTableNode = pTCntxt->GetTableNode();
+            size_t nTableBoxSize = pTableNode ? pTableNode->GetTable().GetTabSortBoxes().size() : 0;
+            m_nParaCnt = m_nParaCnt - std::min(m_nParaCnt, nTableBoxSize);
 
             // Jump to a table if needed
             if( JUMPTO_TABLE == m_eJumpTo && m_pTable->GetSwTable() &&
@@ -5235,7 +5387,7 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
         {
             m_pPam->SetMark();
             m_pPam->DeleteMark();
-            m_xDoc->getIDocumentContentOperations().DeleteSection( const_cast<SwStartNode *>(pCapStNd) );
+            DeleteSection(const_cast<SwStartNode*>(pCapStNd));
             pCurTable->SetCaption( nullptr, false );
         }
     }
@@ -5253,4 +5405,51 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust,
     return pRetTable;
 }
 
+bool HTMLTable::PendingDrawObjectsInPaM(SwPaM& rPam) const
+{
+    if (!m_pResizeDrawObjects)
+        return false;
+
+    bool bRet = false;
+
+    sal_uInt16 nCount = m_pResizeDrawObjects->size();
+    for (sal_uInt16 i = 0; i < nCount && !bRet; ++i)
+    {
+        SdrObject *pObj = (*m_pResizeDrawObjects)[i];
+        SwFrameFormat* pObjectFormat = ::FindFrameFormat(pObj);
+        if (!pObjectFormat)
+            continue;
+        const SwFormatAnchor& rAnch = pObjectFormat->GetAnchor();
+        if (const SwPosition* pPos = rAnch.GetContentAnchor())
+        {
+            SwNodeIndex aObjNodeIndex(pPos->nNode);
+            bRet = (aObjNodeIndex >= rPam.Start()->nNode && aObjNodeIndex <= rPam.End()->nNode);
+        }
+    }
+
+    return bRet;
+}
+
+bool SwHTMLParser::PendingObjectsInPaM(SwPaM& rPam) const
+{
+    bool bRet = false;
+    for (const auto& a : m_aTables)
+    {
+        bRet = a->PendingDrawObjectsInPaM(rPam);
+        if (bRet)
+            break;
+        const SwTable *pTable = a->GetSwTable();
+        if (!pTable)
+            continue;
+        const SwTableNode* pTableNode = pTable->GetTableNode();
+        if (!pTableNode)
+            continue;
+        SwNodeIndex aTableNodeIndex(*pTableNode);
+        bRet = (aTableNodeIndex >= rPam.Start()->nNode && aTableNodeIndex <= rPam.End()->nNode);
+        if (bRet)
+            break;
+    }
+    return bRet;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index f3560b11fbb6..5150785c3111 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -1446,10 +1446,10 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken )
         if( !aToken.isEmpty() && ' '==aToken[0] && !IsReadPRE() )
         {
             sal_Int32 nPos = m_pPam->GetPoint()->nContent.GetIndex();
-            if( nPos )
+            const SwTextNode* pTextNode = nPos ? m_pPam->GetPoint()->nNode.GetNode().GetTextNode() : nullptr;
+            if (pTextNode)
             {
-                const OUString& rText =
-                    m_pPam->GetPoint()->nNode.GetNode().GetTextNode()->GetText();
+                const OUString& rText = pTextNode->GetText();
                 sal_Unicode cLast = rText[--nPos];
                 if( ' ' == cLast || '\x0a' == cLast)
                     aToken = aToken.copy(1);
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 5284590f9f0f..dcb616636054 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -404,6 +404,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
     SwNodeIndex     *m_pSttNdIdx;
 
     HTMLTable       *m_pTable;      // current "outermost" table
+    std::vector<HTMLTable*> m_aTables;
     SwHTMLForm_Impl *m_pFormImpl;   // current form
     SdrObject       *m_pMarquee;    // current marquee
     SwField         *m_pField;      // current field
@@ -643,6 +644,10 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
     // tags realized via character styles
     void NewCharFormat( HtmlTokenId nToken );
 
+    void ClearFootnotesInRange(const SwNodeIndex& rSttIdx, const SwNodeIndex& rEndIdx);
+
+    void DeleteSection(SwStartNode* pSttNd);
+
     // <SDFIELD>
 public:
     static SvxNumType GetNumType( const OUString& rStr, SvxNumType eDfltType );
@@ -857,6 +862,8 @@ private:
     bool HasCurrentParaFlys( bool bNoSurroundOnly = false,
                              bool bSurroundOnly = false ) const;
 
+    bool PendingObjectsInPaM(SwPaM& rPam) const;
+
 public:         // used in tables
 
     // Create brush item (with new) or 0
@@ -894,6 +901,18 @@ public:
 
     virtual bool ParseMetaOptions( const css::uno::Reference<css::document::XDocumentProperties>&,
             SvKeyValueIterator* ) override;
+
+
+    void RegisterHTMLTable(HTMLTable* pNew)
+    {
+        m_aTables.push_back(pNew);
+    }
+
+    void DeregisterHTMLTable(HTMLTable* pOld)
+    {
+        m_aTables.erase(std::remove(m_aTables.begin(), m_aTables.end(), pOld));
+    }
+
 };
 
 struct SwPendingStackData
@@ -973,6 +992,29 @@ inline void SwHTMLParser::PushContext( HTMLAttrContext *pCntxt )
     m_aContexts.push_back( pCntxt );
 }
 
+class SwTextFootnote;
+
+struct SwHTMLTextFootnote
+{
+    OUString sName;
+    SwTextFootnote* pTextFootnote;
+    SwHTMLTextFootnote(const OUString &rName, SwTextFootnote* pInTextFootnote)
+        : sName(rName)
+        , pTextFootnote(pInTextFootnote)
+    {
+    }
+};
+
+struct SwHTMLFootEndNote_Impl
+{
+    std::vector<SwHTMLTextFootnote> aTextFootnotes;
+
+    OUString sName;
+    OUString sContent;            // information for the last footnote
+    bool bEndNote;
+    bool bFixed;
+};
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index 6061bd4c2eec..afbd9b1a7c68 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -59,8 +59,6 @@ class SwHTMLPosFlyFrames;
 class SwTextFootnote;
 enum class HtmlPosition;
 
-typedef std::vector<SwTextFootnote*> SwHTMLTextFootnotes;
-
 extern SwAttrFnTab aHTMLAttrFnTab;
 
 #define HTML_PARSPACE (MM50)
@@ -286,7 +284,7 @@ public:
     SwHTMLFormatInfos m_CharFormatInfos;
     SwHTMLFormatInfos m_TextCollInfos;
     std::vector<SwFormatINetFormat*> m_aINetFormats; // the "open" INet attributes
-    SwHTMLTextFootnotes *m_pFootEndNotes;
+    std::vector<SwTextFootnote*> *m_pFootEndNotes;
 
     OUString m_aCSS1Selector;           // style selector
     OUString m_aNonConvertableCharacters;
commit 43b1e91ec376ae69c843e576cf7352f085d356b6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Feb 7 16:20:54 2018 +0000

    return early on short stream
    
    Change-Id: Ia9cb4dec5358281322a2428c5f2153836a1ee1af
    Reviewed-on: https://gerrit.libreoffice.org/49375
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 37a1b14bfc6b..966393fa4fe3 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -1534,6 +1534,8 @@ int OpenTTFontBuffer(const void* pBuffer, sal_uInt32 nLen, sal_uInt32 facenum, T
 
 static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
 {
+    if (t->fsize < 4)
+        return SF_TTFORMAT;
     int i;
     sal_uInt32 length, tag;
     sal_uInt32 tdoffset = 0;        /* offset to TableDirectory in a TTC file. For TTF files is 0 */
commit 358808aeb353e9d17e54c6255dd10be4a7517136
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Feb 7 16:05:08 2018 +0000

    stay within font bounds
    
    Change-Id: Ie8ed610b71cb1b20963827c2be97155d2d8aa22c
    Reviewed-on: https://gerrit.libreoffice.org/49371
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 566226f1e1f0..37a1b14bfc6b 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -1576,7 +1576,12 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
     /* parse the tables */
     for (i=0; i<(int)t->ntables; i++) {
         int nIndex;
-        tag = GetUInt32(t->ptr + tdoffset + 12, 16 * i);
+        const sal_uInt32 nStart = tdoffset + 12;
+        const sal_uInt32 nOffset = 16 * i;
+        if (nStart + nOffset + sizeof(sal_uInt32) <=  static_cast<sal_uInt32>(t->fsize))
+            tag = GetUInt32(t->ptr + nStart, nOffset);
+        else
+            tag = static_cast<sal_uInt32>(-1);
         switch( tag ) {
             case T_maxp: nIndex = O_maxp; break;
             case T_glyf: nIndex = O_glyf; break;
commit f975fbf50ef6da9d610885eb7ca46d93ef779481
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Feb 7 16:51:32 2018 +0000

    what matters is the availability of the last element, not the first
    
    Change-Id: I23d3abdbe62b735d66261fb337613da88cc4206b
    Reviewed-on: https://gerrit.libreoffice.org/49380
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 28713f47dbd7..566226f1e1f0 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -2450,7 +2450,8 @@ void GetTTGlobalFontInfo(TrueTypeFont *ttf, TTGlobalFontInfo *info)
     info->symbolEncoded = (ttf->cmapType == CMAP_MS_Symbol);
 
     const sal_uInt8* table = getTable(ttf, O_OS2);
-    if (table) {
+    sal_uInt32 table_size = getTableSize(ttf, O_OS2);
+    if (table && table_size >= 42) {
         info->weight = GetUInt16(table, 4);
         info->width  = GetUInt16(table, 6);
 
@@ -2458,7 +2459,7 @@ void GetTTGlobalFontInfo(TrueTypeFont *ttf, TTGlobalFontInfo *info)
          * Microsoft old (78 bytes long) and Microsoft new (86 bytes long,)
          * Apple's documentation recommends looking at the table length.
          */
-        if (getTableSize(ttf, O_OS2) > 68) {
+        if (table_size >= 78) {
             info->typoAscender = XUnits(UPEm,GetInt16(table, 68));
             info->typoDescender = XUnits(UPEm, GetInt16(table, 70));
             info->typoLineGap = XUnits(UPEm, GetInt16(table, 72));
commit d566c200995d2124fb76adc9484cb8ef58ab78ae
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Feb 7 16:57:27 2018 +0000

    check kern table size
    
    Change-Id: I65b5f0a8950d54c00d6fd7c385ca1c5dca2ef2c8
    Reviewed-on: https://gerrit.libreoffice.org/49384
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 2170acd08d1c..28713f47dbd7 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -1354,7 +1354,7 @@ static void GetKern(TrueTypeFont *ttf)
     if( !table )
         goto badtable;
 
-    if (GetUInt16(table, 0) == 0) {                                /* Traditional Microsoft style table with sal_uInt16 version and nTables fields */
+    if (nTableSize >= 4 && GetUInt16(table, 0) == 0) { /* Traditional Microsoft style table with sal_uInt16 version and nTables fields */
         ttf->nkern = GetUInt16(table, 2);
         ttf->kerntype = KT_MICROSOFT;
         ptr = table + 4;
@@ -1386,7 +1386,7 @@ static void GetKern(TrueTypeFont *ttf)
         return;
     }
 
-    if (GetUInt32(table, 0) == 0x00010000) {                       /* MacOS style kern tables: fixed32 version and sal_uInt32 nTables fields */
+    if (nTableSize >= 8 && GetUInt32(table, 0) == 0x00010000) { /* MacOS style kern tables: fixed32 version and sal_uInt32 nTables fields */
         ttf->nkern = GetUInt32(table, 4);
         ttf->kerntype = KT_APPLE_NEW;
         ptr = table + 8;
commit a39e2684d48046d18bd486d145b9d4a3d2044e8a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Feb 7 12:29:32 2018 +0000

    sanity check cmap table size
    
    Change-Id: I010c2fd221bcd86a62efd9996a0c34930828cb6d
    Reviewed-on: https://gerrit.libreoffice.org/49350
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 0f031d055ae3..2170acd08d1c 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -1231,6 +1231,12 @@ static void FindCmap(TrueTypeFont *ttf)
 {
     const sal_uInt8* table = getTable(ttf, O_cmap);
     sal_uInt32 table_size = getTableSize(ttf, O_cmap);
+    if (table_size < 4)
+    {
+        SAL_WARN("vcl.fonts", "Parsing error in " << OUString::createFromAscii(ttf->fname) <<
+                 "cmap table size too short");
+        return;
+    }
     sal_uInt16 ncmaps = GetUInt16(table, 2);
     sal_uInt32 AppleUni   = 0;              // Apple Unicode
     sal_uInt32 ThreeZero  = 0;              /* MS Symbol            */
commit a224d33cbf098c361a7244569d5088044561f3ee
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 6 21:21:30 2018 +0000

    MemoryByteGrabber sequence has to exist for Grabber lifetime
    
    it just takes a c++ ref, so a temp is an unsuitable arg
    
    Change-Id: I40490e94d977df91b985bc4ae458b68ee85d5dfe
    Reviewed-on: https://gerrit.libreoffice.org/49323
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx
index 547be25ed23a..cb85ecd655ae 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -866,7 +866,7 @@ sal_Int32 ZipFile::readCEN()
         if ( static_cast < sal_Int64 > ( nCenLen ) != nRead )
             throw ZipException ("Error reading CEN into memory buffer!" );
 
-        MemoryByteGrabber aMemGrabber ( aCENBuffer );
+        MemoryByteGrabber aMemGrabber(aCENBuffer);
 
         ZipEntry aEntry;
         sal_Int16 nCommentLen;
@@ -980,7 +980,8 @@ void ZipFile::recover()
                 if ( nPos < nBufSize - 30 && pBuffer[nPos] == 'P' && pBuffer[nPos+1] == 'K' && pBuffer[nPos+2] == 3 && pBuffer[nPos+3] == 4 )
                 {
                     ZipEntry aEntry;
-                    MemoryByteGrabber aMemGrabber ( Sequence< sal_Int8 >( &(pBuffer[nPos+4]), 26 ) );
+                    Sequence<sal_Int8> aTmpBuffer(&(pBuffer[nPos+4]), 26);
+                    MemoryByteGrabber aMemGrabber(aTmpBuffer);
 
                     aEntry.nVersion = aMemGrabber.ReadInt16();
                     if ( ( aEntry.nVersion & 1 ) != 1 )
@@ -1050,7 +1051,8 @@ void ZipFile::recover()
                 else if (pBuffer[nPos] == 'P' && pBuffer[nPos+1] == 'K' && pBuffer[nPos+2] == 7 && pBuffer[nPos+3] == 8 )
                 {
                     sal_Int64 nCompressedSize, nSize;
-                    MemoryByteGrabber aMemGrabber ( Sequence< sal_Int8 >( &(pBuffer[nPos+4]), 12 ) );
+                    Sequence<sal_Int8> aTmpBuffer(&(pBuffer[nPos+4]), 12);
+                    MemoryByteGrabber aMemGrabber(aTmpBuffer);
                     sal_Int32 nCRC32 = aMemGrabber.ReadInt32();
                     sal_uInt32 nCompressedSize32 = aMemGrabber.ReadUInt32();
                     sal_uInt32 nSize32 = aMemGrabber.ReadUInt32();
commit 437af3bf0bea4f9dd5d7a555deb631d2e4e42597
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 6 21:12:48 2018 +0000

    rtf: null-deref
    
    Change-Id: I9c4510cb91e2572a3ab2b62497dc4dd9fd1119c8
    Reviewed-on: https://gerrit.libreoffice.org/49342
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index d608fac48c68..e5295f80b1ee 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -869,6 +869,7 @@ void ListsManager::lcl_sprm( Sprm& rSprm )
             }
             break;
             case NS_ooxml::LN_CT_Lvl_lvlPicBulletId:
+            if (ListLevel::Pointer pCurrentLevel = m_pCurrentDefinition->GetCurrentLevel())
             {
                 uno::Reference<drawing::XShape> xShape;
                 for (std::vector<NumPicBullet::Pointer>::iterator it = m_aNumPicBullets.begin(); it != m_aNumPicBullets.end(); ++it)
@@ -885,15 +886,15 @@ void ListsManager::lcl_sprm( Sprm& rSprm )
                     try
                     {
                         uno::Any aAny = xPropertySet->getPropertyValue("GraphicURL");
-                        if (aAny.has<OUString>())
-                            m_pCurrentDefinition->GetCurrentLevel()->SetGraphicURL(aAny.get<OUString>());
+                        if (aAny.has<OUString>() && pCurrentLevel)
+                            pCurrentLevel->SetGraphicURL(aAny.get<OUString>());
                     } catch(const beans::UnknownPropertyException&)
                     {}
                     try
                     {
                         uno::Reference< graphic::XGraphic > gr;
                         xPropertySet->getPropertyValue("Bitmap") >>= gr;
-                        m_pCurrentDefinition->GetCurrentLevel()->SetGraphicBitmap( gr );
+                        pCurrentLevel->SetGraphicBitmap( gr );
                     } catch(const beans::UnknownPropertyException&)
                     {}
 
@@ -908,12 +909,12 @@ void ListsManager::lcl_sprm( Sprm& rSprm )
                         int nWidth = (nHeight * aPrefSize.Width) / aPrefSize.Height;
 
                         awt::Size aSize( convertMm100ToTwip(nWidth), convertMm100ToTwip(nHeight) );
-                        m_pCurrentDefinition->GetCurrentLevel()->SetGraphicSize( aSize );
+                        pCurrentLevel->SetGraphicSize( aSize );
                     }
                     else
                     {
                         awt::Size aSize( convertMm100ToTwip(aPrefSize.Width), convertMm100ToTwip(aPrefSize.Height) );
-                        m_pCurrentDefinition->GetCurrentLevel()->SetGraphicSize( aSize );
+                        pCurrentLevel->SetGraphicSize( aSize );
                     }
                 }
             }
@@ -944,26 +945,26 @@ void ListsManager::lcl_sprm( Sprm& rSprm )
             }
             break;
             case NS_ooxml::LN_CT_Lvl_start:
-                if (m_pCurrentDefinition->GetCurrentLevel().get())
-                    m_pCurrentDefinition->GetCurrentLevel( )->SetValue( nSprmId, nIntValue );
+                if (ListLevel::Pointer pCurrentLevel = m_pCurrentDefinition->GetCurrentLevel())
+                    pCurrentLevel->SetValue( nSprmId, nIntValue );
                 bIsStartVisited = true;
             break;
             case NS_ooxml::LN_CT_Lvl_numFmt:
             case NS_ooxml::LN_CT_Lvl_isLgl:
             case NS_ooxml::LN_CT_Lvl_legacy:
-                if (m_pCurrentDefinition->GetCurrentLevel().get())
+                if (ListLevel::Pointer pCurrentLevel = m_pCurrentDefinition->GetCurrentLevel())
                 {
-                    m_pCurrentDefinition->GetCurrentLevel( )->SetValue( nSprmId, nIntValue );
+                    pCurrentLevel->SetValue( nSprmId, nIntValue );
                     if( !bIsStartVisited )
                     {
-                        m_pCurrentDefinition->GetCurrentLevel( )->SetValue( NS_ooxml::LN_CT_Lvl_start, 0 );
+                        pCurrentLevel->SetValue( NS_ooxml::LN_CT_Lvl_start, 0 );
                         bIsStartVisited = true;
                     }
                 }
             break;
             case NS_ooxml::LN_CT_Lvl_suff:
             {
-                if (m_pCurrentDefinition->GetCurrentLevel().get())
+                if (ListLevel::Pointer pCurrentLevel = m_pCurrentDefinition->GetCurrentLevel())
                 {
                     SvxNumberFormat::LabelFollowedBy value = SvxNumberFormat::LISTTAB;
                     if( rSprm.getValue()->getString() == "tab" )
@@ -975,7 +976,7 @@ void ListsManager::lcl_sprm( Sprm& rSprm )
                     else
                         SAL_WARN( "writerfilter", "Unknown ST_LevelSuffix value "
                             << rSprm.getValue()->getString());
-                    m_pCurrentDefinition->GetCurrentLevel()->SetValue( nSprmId, value );
+                    pCurrentLevel->SetValue( nSprmId, value );
                 }
             }
             break;
@@ -1012,11 +1013,15 @@ void ListsManager::lcl_sprm( Sprm& rSprm )
                     nValue = text::HoriOrientation::RIGHT;
                     break;
                 }
+
                 if (nValue != text::HoriOrientation::NONE)
                 {
-                    m_pCurrentDefinition->GetCurrentLevel( )->Insert(
-                        PROP_ADJUST, uno::makeAny( nValue ) );
-                        writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
+                    if (ListLevel::Pointer pLevel = m_pCurrentDefinition->GetCurrentLevel())
+                    {
+                        pLevel->Insert(
+                            PROP_ADJUST, uno::makeAny( nValue ) );
+                            writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
+                    }
                 }
             }
             break;
@@ -1040,10 +1045,12 @@ void ListsManager::lcl_sprm( Sprm& rSprm )
             case NS_ooxml::LN_CT_Lvl_pStyle:
             {
                 OUString sStyleName = rSprm.getValue( )->getString( );
-                ListLevel::Pointer pLevel = m_pCurrentDefinition->GetCurrentLevel( );
-                StyleSheetTablePtr pStylesTable = m_rDMapper.GetStyleSheetTable( );
-                const StyleSheetEntryPtr pStyle = pStylesTable->FindStyleSheetByISTD( sStyleName );
-                pLevel->SetParaStyle( pStyle );
+                if (ListLevel::Pointer pLevel = m_pCurrentDefinition->GetCurrentLevel())
+                {
+                    StyleSheetTablePtr pStylesTable = m_rDMapper.GetStyleSheetTable( );
+                    const StyleSheetEntryPtr pStyle = pStylesTable->FindStyleSheetByISTD( sStyleName );
+                    pLevel->SetParaStyle( pStyle );
+                }
             }
             break;
             case NS_ooxml::LN_CT_Num_lvlOverride:
@@ -1058,9 +1065,11 @@ void ListsManager::lcl_sprm( Sprm& rSprm )
                 if(m_pCurrentDefinition)
                 {
                     if (ListLevel::Pointer pCurrentLevel = m_pCurrentDefinition->GetCurrentLevel())
+                    {
                         // <w:num> -> <w:lvlOverride> -> <w:startOverride> is the non-abstract equivalent of
                         // <w:abstractNum> -> <w:lvl> -> <w:start>
                         pCurrentLevel->SetValue(NS_ooxml::LN_CT_Lvl_start, nIntValue);
+                    }
                 }
             }
             break;
@@ -1079,9 +1088,9 @@ void ListsManager::lcl_sprm( Sprm& rSprm )
             case NS_ooxml::LN_EG_RPrBase_eastAsianLayout:
                 //no break!
             default:
-                if( m_pCurrentDefinition->GetCurrentLevel( ).get())
+                if (ListLevel::Pointer pCurrentLevel = m_pCurrentDefinition->GetCurrentLevel())
                 {
-                    m_rDMapper.PushListProperties( m_pCurrentDefinition->GetCurrentLevel( ) );
+                    m_rDMapper.PushListProperties(pCurrentLevel);
                     m_rDMapper.sprm( rSprm );
                     m_rDMapper.PopListProperties();
                 }
commit 5e2680ebda010ac3f10e2e972e68b831c12c1e93
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Feb 5 16:53:03 2018 +0100

    sw: disable testTableKeep on WNT
    
    Fails from time to time, like so:
    https://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=MASTER&brief-log=1517842001.29090#err2
    
    Change-Id: Ia33193fbfa05da58d31bcc5008beea32c1feb2fe
    (cherry picked from commit b2a053160c4c8eb0acd66b74c52dbda23a654bda)
    Reviewed-on: https://gerrit.libreoffice.org/49289
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index ebb49f6ae2d1..a7079660be73 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -1273,7 +1273,7 @@ DECLARE_WW8EXPORT_TEST(testCommentExport, "comment-export.odt")
     }
 }
 
-#if !defined(MACOSX)
+#if !defined(MACOSX) && !defined(_WIN32)
 #if !TEST_FONTS_MISSING
 DECLARE_WW8EXPORT_TEST(testTableKeep, "tdf91083.odt")
 {
commit 01f19aba638860db54ca9a60e30ce6f21ee0ea5a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Feb 2 21:12:31 2018 +0000

    Resolves: tdf#115369 wrong cell shadow icons
    
    regression from...
    
    commit 910f91a3e5228f26f0692f870a3fd3919835eb27
    Author: Caolán McNamara <caolanm at redhat.com>
    Date:   Wed Dec 21 13:04:30 2016 +0000
    
        unwind IL_SDW_BITMAPS ImageList
    
    Change-Id: I9ecb5c45c240af0214666c56401abb07eb99e5f1
    Reviewed-on: https://gerrit.libreoffice.org/49168
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>

diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 1e5c5937d326..03a8c9acb0b2 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -169,8 +169,8 @@ SvxBorderTabPage::SvxBorderTabPage(vcl::Window* pParent, const SfxItemSet& rCore
     {
         RID_SVXBMP_SHADOWNONE,
         RID_SVXBMP_SHADOW_BOT_RIGHT,
-        RID_SVXBMP_SHADOW_BOT_LEFT,
         RID_SVXBMP_SHADOW_TOP_RIGHT,
+        RID_SVXBMP_SHADOW_BOT_LEFT,
         RID_SVXBMP_SHADOW_TOP_LEFT
     };
 
commit e392f847bff0321d7884daabe74d91d90f07a0bf
Author: Bartosz Kosiorek <gang65 at poczta.onet.pl>
Date:   Tue Feb 6 00:45:32 2018 +0100

    tdf#114820 Fix reading external reference for VLOOKUP and HLOOKUP
    
    Change-Id: Iaa1307123d97a740bdaf90647e8adff224211851
    Reviewed-on: https://gerrit.libreoffice.org/49263
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 5c3d0a70a0edb182714725ef920d74667feffb0e)
    Reviewed-on: https://gerrit.libreoffice.org/49316

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 53122e82cb40..f40637f33540 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -6634,7 +6634,9 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry)
             }
         }
         break;
-        case svMatrix :
+        case svExternalDoubleRef:
+        case svExternalSingleRef:
+        case svMatrix:
         {
             svl::SharedString aStr;
             const ScMatValType nType = GetDoubleOrStringFromMatrix(rItem.mfVal, aStr);
@@ -6651,6 +6653,7 @@ bool ScInterpreter::FillEntry(ScQueryEntry& rEntry)
     } // switch ( GetStackType() )
     return true;
 }
+
 void ScInterpreter::ScVLookup()
 {
     CalculateLookup(false);
commit ae86218101c27a2e35a10940661e4c6421870e71
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Feb 3 15:23:48 2018 +0100

    tdf#114731: persona html can contain " instead of "
    
    So let's replace all " with &#34 in the retrieved html
    
    Change-Id: I4a90ecc51e7ce6d1e080e6c1b17b82fe9a29d65e
    Reviewed-on: https://gerrit.libreoffice.org/49179
    Tested-by: Julien Nabet <serval2412 at yahoo.fr>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit 2e6bbc04d906ed308fc5ca769bad7b8b4676594e)
    Reviewed-on: https://gerrit.libreoffice.org/49286
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx
index fa4d7f452072..d40742155adb 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -554,10 +554,13 @@ static OUString searchValue( const OString &rBuffer, sal_Int32 from, const OStri
 }
 
 /// Parse the Persona web page, and find where to get the bitmaps + the color values.
-static bool parsePersonaInfo( const OString &rBuffer, OUString *pHeaderURL, OUString *pFooterURL,
+static bool parsePersonaInfo( const OString &rBufferArg, OUString *pHeaderURL, OUString *pFooterURL,
                               OUString *pTextColor, OUString *pAccentColor, OUString *pPreviewURL,
                               OUString *pName )
 {
+    // tdf#115417: buffer retrieved from html response can contain " or "
+    // let's replace the whole buffer with last one so we can treat it easily
+    OString rBuffer = rBufferArg.replaceAll(OString("""), OString("""));
     // it is the first attribute that contains "persona="
     sal_Int32 persona = rBuffer.indexOf( "data-browsertheme=\"{" );
     if ( persona < 0 )
commit 362b0c521c1c58dc8ea5e87ecbb482d5bdc073f4
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Feb 1 13:52:00 2018 +0100

    tdf#114815 pyuno: avoid 2 threads initing python in parallel
    
    According to the crash reports, it's possible for the grammar checking
    thread to call GetGrammarChecker, instantiating lightproof, at the same
    time as the main thread instantiates LngSvcMgr, which also instantiates
    (some?) (all?) grammar checkers.
    
    Ensure that pyuno_loader::CreateInstance() initialises Python only
    once with a C++11 thread safe static.
    
    For the backport, use rtl::Static instead, because on the 5.4 branch
    MSVC does not have HAVE_THREADSAFE_STATICS enabled.
    
    Change-Id: I5b1faba9107355c508831a078366e4a29fdbfadf
    (cherry picked from commit 5357ca82846ea7147ad61e9340f25647a5934eb0)
    Reviewed-on: https://gerrit.libreoffice.org/49116
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx
index adbf6c88e098..0408af0f4043 100644
--- a/pyuno/source/loader/pyuno_loader.cxx
+++ b/pyuno/source/loader/pyuno_loader.cxx
@@ -31,6 +31,7 @@
 #include <rtl/ustrbuf.hxx>
 #include <rtl/strbuf.hxx>
 #include <rtl/bootstrap.hxx>
+#include <rtl/instance.hxx>
 
 #include <cppuhelper/implementationentry.hxx>
 #include <cppuhelper/factory.hxx>
@@ -176,11 +177,10 @@ static void prependPythonPath( const OUString & pythonPathBootstrap )
     osl_setEnvironment(envVar.pData, envValue.pData);
 }
 
-Reference< XInterface > CreateInstance( const Reference< XComponentContext > & ctx )
+struct PythonInit
 {
-    Reference< XInterface > ret;
-
-    if( ! Py_IsInitialized() )
+PythonInit() {
+    if (! Py_IsInitialized()) // may be inited by getComponentContext() already
     {
         OUString pythonPath;
         OUString pythonHome;
@@ -236,9 +236,26 @@ Reference< XInterface > CreateInstance( const Reference< XComponentContext > & c
         // PyThreadAttach below.
         PyThreadState_Delete(tstate);
     }
+}
+};
+
+namespace {
+    struct thePythonInit : public rtl::Static<PythonInit, thePythonInit> {};
+}
+
+Reference<XInterface> CreateInstance(const Reference<XComponentContext> & ctx)
+{
+    // tdf#114815 thread-safe static to init python only once
+    thePythonInit::get();
+
+    Reference< XInterface > ret;
 
     PyThreadAttach attach( PyInterpreterState_Head() );
     {
+        // note: this can't race against getComponentContext() because
+        // either (in soffice.bin) CreateInstance() must be called before
+        // getComponentContext() can be called, or (in python.bin) the other
+        // way around
         if( ! Runtime::isInitialized() )
         {
             Runtime::initialize( ctx );
commit d4a41817aa86fffaa3a27265966bc8265d34dd0a
Author: Bartosz Kosiorek <gang65 at poczta.onet.pl>
Date:   Tue Feb 6 02:10:14 2018 +0100

    tdf#115162 Fix support for external reference for IFS functions
    
    Functions SUMIFS, AVERAGEIFS, COUNTIFS, MINIFS, MAXIFS were not
    supported External references.
    
    The root cause issue, was using PopMatrix() method for:
    svExternalSingleRef and svExternalDoubleRef.
    
    PopMatrix() method only supports svMatrix, and in other
    cases returns FormulaError::IllegalParameter error.
    
    To resolve that issue, the method GetMatrix() was used.
    It is properly support svMatrix, svExternalSingleRef and svExternalDoubleRef.
    
    Change-Id: I3e30ca50069264a6d990b16ec668e6d0df51c6e6
    Reviewed-on: https://gerrit.libreoffice.org/49264
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit b6db65752c60de7268e4f65d7fc5ac110adb2fb0)
    Reviewed-on: https://gerrit.libreoffice.org/49284

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 42db756a2e01..53122e82cb40 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -5431,7 +5431,7 @@ void ScInterpreter::IterateParametersIfs( sc::ParamIfsResult& rRes )
                 case svExternalSingleRef:
                 case svExternalDoubleRef:
                     {
-                        pQueryMatrix = PopMatrix();
+                        pQueryMatrix = GetMatrix();
                         if (!pQueryMatrix)
                         {
                             SetError( FormulaError::IllegalParameter);
@@ -5590,7 +5590,7 @@ void ScInterpreter::IterateParametersIfs( sc::ParamIfsResult& rRes )
                 case svExternalSingleRef:
                 case svExternalDoubleRef:
                     {
-                        pMainMatrix = PopMatrix();
+                        pMainMatrix = GetMatrix();
                         if (!pMainMatrix)
                         {
                             SetError( FormulaError::IllegalParameter);
commit e9d8b260708bc12e00bf79ff436cb87e12922fab
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Feb 5 17:17:17 2018 +0100

    rhbz#1541486: Fix localized'ness of ooSetupFactoryUIName props
    
    8f44fb5ee0bd21d192820ffd359504f6d1c68a52 "Mark Base window titles for
    localisation" localized some uses of ooSetupFactoryUIName in
    officecfg/registry/data/org/openoffice/Setup.xcu, but failed to mark the prop as
    oor:localized="true" in officecfg/registry/schema/org/openoffice/Setup.xcs.  (So
    some arbitrary localized version of the prop would win at runtime, potentially
    displaying certain window titles in wrong languages.)
    
    Other uses of ooSetupFactoryUIName in Setup.xcu (for "Calc", "Impress",
    "Writer", etc.) have never been localized, and are probably not meant to be
    localized.  AFAICS, irrespective of oor:localized="true" in Setup.xcs, their
    values not being marked with xml:lang="en-US" in Setup.xcu will mean that they
    will not appear in
    translations/source/*/officecfg/registry/data/org/openoffice.po and will not
    accidentally start to be translated after this commit.
    
    (Theoretically, inconsistencies between oor:localized in xcs and uses of
    xml:lang in xcu could statically be caught at build time, e.g., with
    officecfg/util/sanity.xsl.  However, those checks work on each XML file
    individually, so don't have the schema information available when looking at
    the data in the xcu file.  And those checks are written in XSLT, which makes
    writing new checks rather, erm, unpleasant.)
    
    Change-Id: I9c61e8ebf75d3d54f7e5b6688eac47a6ed8dc5c3
    Reviewed-on: https://gerrit.libreoffice.org/49252
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    (cherry picked from commit ffd8369b909c86653ef30593fddf67c9f5308583)
    Reviewed-on: https://gerrit.libreoffice.org/49271
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/officecfg/registry/schema/org/openoffice/Setup.xcs b/officecfg/registry/schema/org/openoffice/Setup.xcs
index 3eecf9728b4c..bcb86849226f 100644
--- a/officecfg/registry/schema/org/openoffice/Setup.xcs
+++ b/officecfg/registry/schema/org/openoffice/Setup.xcs
@@ -149,7 +149,7 @@
           <desc>Specifies the short name of the factory.</desc>
         </info>
       </prop>
-      <prop oor:name="ooSetupFactoryUIName" oor:type="xs:string">
+      <prop oor:name="ooSetupFactoryUIName" oor:type="xs:string" oor:localized="true">
         <!-- UIHints: setup -->
         <info>
           <desc>Specifies the UI name of the factory.</desc>
commit e6c9b806cd4eaf166bfe8cfc1a4b6741f2be83f0
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Feb 2 15:11:25 2018 +0100

    ofz#5435 sw: fix SwCache::Insert() stale pointers
    
    If SwCache::Insert() happens to delete the object that m_pFirst or
    m_pRealFirst point to, which is unlikely as it means every other object
    is locked, then these pointers must be updated.
    
    This sometimes happens in the bugdoc after scrolling around for some
    time.
    
    Change-Id: I13f04d28c37969469efa4e1109c7f5b751ceba96
    Reviewed-on: https://gerrit.libreoffice.org/49151
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit 269d6d3366eea8541d965181dfdda1fdc5ef2d00)
    Reviewed-on: https://gerrit.libreoffice.org/49234
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx
index f75468219873..64ae10658518 100644
--- a/sw/source/core/bastyp/swcache.cxx
+++ b/sw/source/core/bastyp/swcache.cxx
@@ -367,16 +367,34 @@ bool SwCache::Insert( SwCacheObj *pNew )
 
         nPos = pObj->GetCachePos();
         if ( pObj == m_pLast )
-        { OSL_ENSURE( pObj->GetPrev(), "Last but no Prev" );
+        {
             m_pLast = pObj->GetPrev();
-            m_pLast->SetNext( nullptr );
+            assert(m_pLast); // must have capacity > 1
         }
-        else
+        if (pObj == m_pFirst)
         {
-            if ( pObj->GetPrev() )
-                pObj->GetPrev()->SetNext( pObj->GetNext() );
-            if ( pObj->GetNext() )
-                pObj->GetNext()->SetPrev( pObj->GetPrev() );
+            if (pObj->GetNext())
+            {
+                m_pFirst = pObj->GetNext();
+            }
+            else
+            {
+                m_pFirst = pObj->GetPrev();
+            }
+            assert(m_pFirst); // must have capacity > 1
+        }
+        if (pObj == m_pRealFirst)
+        {
+            m_pRealFirst = pObj->GetNext();
+            assert(m_pRealFirst); // must have capacity > 1
+        }
+        if (pObj->GetPrev())
+        {
+            pObj->GetPrev()->SetNext( pObj->GetNext() );
+        }
+        if (pObj->GetNext())
+        {
+            pObj->GetNext()->SetPrev( pObj->GetPrev() );
         }
         delete pObj;
         m_aCacheObjects[nPos] = pNew;
commit b2b491a5c63081d6a62df07c7430b604ba06d922
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Feb 5 23:13:08 2018 +0100

    Turn assert into SAL_WARN
    
    In the wild there are named expressions without expression and
    formula error cells without formula.
    
    Change-Id: I11546b09173de65cebe776529edee74c549d73c8
    (cherry picked from commit 951dd781743c975a7d29cc30e88e1b4a56c0b176)
    Reviewed-on: https://gerrit.libreoffice.org/49259
    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/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index ca8227058d5a..b7ccee14d2b7 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -1170,7 +1170,10 @@ void ScDocument::CheckLinkFormulaNeedingCheck( const ScTokenArray& rCode )
     }
     else
     {
-        assert(!"called with empty ScTokenArray");
+        // Possible with named expression without expression like Excel
+        // internal print ranges, obscure user define names, ... formula error
+        // cells without formula ...
+        SAL_WARN("sc.core","ScDocument::CheckLinkFormulaNeedingCheck - called with empty ScTokenArray");
     }
 }
 
commit 5c77726f88d1a04616bb177505a7733b0e008f5c
Author: David Tardon <dtardon at redhat.com>
Date:   Sun Nov 5 20:41:03 2017 +0100

    Related: rhbz#304121 one slash is enough
    
    (cherry picked from commit 1bacce999d7dad91b1f87baaf09b08e6b4629fad)
    
    Change-Id: I35fbca7592f3e17a071df567f691c62fe9232fc1
    Reviewed-on: https://gerrit.libreoffice.org/49241
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/ucbhelper/source/provider/contentinfo.cxx b/ucbhelper/source/provider/contentinfo.cxx
index 2ad3edc29d5d..cdbae40880fc 100644
--- a/ucbhelper/source/provider/contentinfo.cxx
+++ b/ucbhelper/source/provider/contentinfo.cxx
@@ -23,7 +23,7 @@
 
  *************************************************************************/
 #include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star//ucb/UnsupportedCommandException.hpp>
+#include <com/sun/star/ucb/UnsupportedCommandException.hpp>
 #include <com/sun/star/ucb/XPropertySetRegistry.hpp>
 
 #include "osl/mutex.hxx"
commit d78a70d34ac5eac0b9bd831d7cd5777a55d906ac
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Feb 2 14:13:35 2018 +0100

    sc: disable "forecast.ets.add.fods" test file on Macs
    
    This sometimes fails, since months, and nobody has fixed it.
    Let's improve the reliability of CI a bit.
    
    Change-Id: Ic4d2e085151855d35804f8ed6ebca04366815c0b
    Reviewed-on: https://gerrit.libreoffice.org/49144
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit 00a6f0908a73a80fb0521e1f4cdc99647e43c126)
    Reviewed-on: https://gerrit.libreoffice.org/49228

diff --git a/sc/qa/unit/functions_test.cxx b/sc/qa/unit/functions_test.cxx
index ac9a430a96e7..e48c209e1974 100644
--- a/sc/qa/unit/functions_test.cxx
+++ b/sc/qa/unit/functions_test.cxx
@@ -40,6 +40,10 @@ bool FunctionsTest::load(const OUString& rFilter, const OUString& rURL,
 
     ScDocument& rDoc = xDocShRef->GetDocument();
 
+#ifdef __APPLE__
+// FIXME tends to fail a lot
+if (!rURL.endsWith("forecast.ets.add.fods"))
+#endif
     CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, rDoc.GetValue(1, 2, 0), 1e-14);
 
     xDocShRef->DoClose();
commit b5440ce23b17d84f7971cb7ea35512d5cac69c9f
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Jan 31 14:34:31 2018 +0100

    tdf#114596 dbaccess: fix mysterious dataloss bug
    
    OBookmarkContainer actually re-uses the reference count of
    ODatabaseSource, so converting ODatabaseSource::m_aBookmark to Reference
    created a cycle, which somehow causes the dataloss, because evidently
    something as important as storing the data must be done in the
    destructor.
    
    (regression from 2660d24a07866e083c5135ea263030f3e3a2e729)
    
    (cherry picked from commit 96ae2a3300811897c24cccb20f8c2faf382483df)
    
    tdf#114596 compilerplugins: add exception to [loplugin:refcounting]
    (cherry picked from commit e80da60895b45309fa1d018760d5f11cca4367f4)
    
    Change-Id: I4cad01dc9cdaf405c1eb31d6c0e161eb6712b78f
    Reviewed-on: https://gerrit.libreoffice.org/49026
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/compilerplugins/clang/refcounting.cxx b/compilerplugins/clang/refcounting.cxx
index e008a9e501dd..5a4a40a37d3c 100644
--- a/compilerplugins/clang/refcounting.cxx
+++ b/compilerplugins/clang/refcounting.cxx
@@ -146,6 +146,10 @@ bool containsXInterfaceSubclass(const Type* pType0) {
         if (isDerivedFrom(pRecordDecl, "XPropertyList")) { // module svx
             return false;
         }
+        // tdf#114596
+        if (isDerivedFrom(pRecordDecl, "dbaccess::OBookmarkContainer")) { // module dbaccess
+            return false;
+        }
     }
     if (pRecordDecl) {
         const ClassTemplateSpecializationDecl* pTemplate = dyn_cast<ClassTemplateSpecializationDecl>(pRecordDecl);
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index c56f67b90f18..cf6ab3c45a55 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -472,7 +472,7 @@ ODatabaseSource::ODatabaseSource(const ::rtl::Reference<ODatabaseModelImpl>& _pI
             :ModelDependentComponent( _pImpl )
             ,ODatabaseSource_Base( getMutex() )
             ,OPropertySetHelper( ODatabaseSource_Base::rBHelper )
-            ,m_xBookmarks( new OBookmarkContainer( *this, getMutex() ) )
+            , m_Bookmarks(*this, getMutex())
             ,m_aFlushListeners( getMutex() )
 {
     // some kind of default
@@ -1162,7 +1162,8 @@ Reference< XConnection > ODatabaseSource::getConnection(const OUString& user, co
 Reference< XNameAccess > SAL_CALL ODatabaseSource::getBookmarks(  )
 {
     ModelMethodGuard aGuard( *this );

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list