[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - 80 commits - configure.ac cui/source dbaccess/source desktop/source download.lst editeng/source external/apr external/cairo external/libnumbertext external/mdnsresponder external/poppler extras/source filter/source fpicker/source helpcontent2 i18npool/source icon-themes/colibre icon-themes/galaxy icon-themes/karasa_jaga icon-themes/tango include/com include/oox instsetoo_native/inc_common instsetoo_native/util jurt/com lotuswordpro/source odk/build-examples_common.mk odk/CustomTarget_javadoc.mk officecfg/registry oox/source postprocess/CustomTarget_registry.mk sc/CppunitTest_sc_pdf_export.mk sc/inc sc/Module_sc.mk sc/qa sc/source sc/uiconfig sd/qa sfx2/source stoc/source svtools/source svx/source sw/CppunitTest_sw_ooxmlimport2.mk sw/qa sw/source toolkit/CppunitTest_toolkit.mk toolkit/qa toolkit/source translations uui/source vcl/qa vcl/source vcl/unx writerfilter/source xmloff/source

Thorsten Behrens (via logerrit) logerrit at kemper.freedesktop.org
Thu Mar 28 15:50:57 UTC 2019


Rebased ref, commits from common ancestor:
commit 26edd27f129b0f5948825c5dd434f612e27619eb
Author:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
AuthorDate: Wed Jul 18 18:06:44 2018 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Mar 28 16:48:48 2019 +0100

    Default OpenGL to off on all platforms
    
    Change-Id: Ide04d3b37b9fabb64d514fd87acbdfe9e49e6727

diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index 26d1ba053a1e..1e001efd4a12 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -59,9 +59,7 @@
   </node>
   <node oor:name="VCL">
     <prop oor:name="UseOpenGL" oor:type="xs:boolean">
-      <value install:module="macosx">false</value>
-      <value install:module="unx">false</value>
-      <value install:module="wnt">true</value>
+      <value>false</value>
     </prop>
   </node>
   <node oor:name="I18N">
commit 9113c297808e3b00a0f97fee485b379b3fa1db95
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Thu Jan 12 16:46:45 2017 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Mar 28 16:48:48 2019 +0100

    Disable crash reporter UI
    
    Change-Id: I8106ec674080ede7072581dab2e6700040de5828
    (cherry picked from commit b981aa30c3eb5ddd0cf6c35e4c37ab687667f71b)

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index c83d424f8a30..e7a4f82ba081 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -913,7 +913,8 @@ bool crashReportInfoExists()
 #if HAVE_FEATURE_BREAKPAD
 void handleCrashReport()
 {
-    static const char SERVICENAME_CRASHREPORT[] = "com.sun.star.comp.svx.CrashReportUI";
+    // Don't show the dialog since we don't offer upload - only want the dumps
+    /*static const char SERVICENAME_CRASHREPORT[] = "com.sun.star.comp.svx.CrashReportUI";
 
     css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
 
@@ -927,7 +928,7 @@ void handleCrashReport()
     css::util::URL aURL;
     css::uno::Any aRet = xRecoveryUI->dispatchWithReturnValue(aURL, css::uno::Sequence< css::beans::PropertyValue >());
     bool bRet = false;
-    aRet >>= bRet;
+    aRet >>= bRet;*/
 }
 #endif
 
commit 2e273fe7ca8d852e3d1999557ae02c43855c0ddd
Author:     Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Wed Feb 10 14:42:18 2016 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Mar 28 16:48:48 2019 +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 5a163cf86c23..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 b4210d131ba2..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 c2ea4faa7e77d66b8e9c00dd7b71dca97227dfea
Author:     Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Tue Feb 9 11:09:30 2016 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Mar 28 16:48:48 2019 +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
new file mode 100644
index 000000000000..818b7330c25b
Binary files /dev/null and b/icon-themes/galaxy/res/main128.png differ
diff --git a/icon-themes/galaxy/res/mainapp_48_8.png b/icon-themes/galaxy/res/mainapp_48_8.png
new file mode 100644
index 000000000000..562ea23e89c2
Binary files /dev/null and b/icon-themes/galaxy/res/mainapp_48_8.png differ
diff --git a/icon-themes/tango/res/mainapp_16.png b/icon-themes/tango/res/mainapp_16.png
index 4a96735b6bb6..13945eeadfd4 100644
Binary files a/icon-themes/tango/res/mainapp_16.png and b/icon-themes/tango/res/mainapp_16.png differ
diff --git a/icon-themes/tango/res/mainapp_16_8.png b/icon-themes/tango/res/mainapp_16_8.png
index 94abb952996b..13945eeadfd4 100644
Binary files a/icon-themes/tango/res/mainapp_16_8.png and b/icon-themes/tango/res/mainapp_16_8.png differ
diff --git a/icon-themes/tango/res/mainapp_32.png b/icon-themes/tango/res/mainapp_32.png
index 88e4e1c8f18f..c653935c0c6b 100644
Binary files a/icon-themes/tango/res/mainapp_32.png and b/icon-themes/tango/res/mainapp_32.png differ
diff --git a/icon-themes/tango/res/mainapp_32_8.png b/icon-themes/tango/res/mainapp_32_8.png
index 2c8a21fbcf3b..c653935c0c6b 100644
Binary files a/icon-themes/tango/res/mainapp_32_8.png and b/icon-themes/tango/res/mainapp_32_8.png differ
commit 12e7cab72eaef3fa9f6867c3566760d547a30de1
Author:     Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Tue Feb 9 10:38:29 2016 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Mar 28 16:48:47 2019 +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 1c19d40fecd9..755d2cce31d7 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -533,7 +533,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
         case SID_SEND_FEEDBACK:
         {
             OUString module = SfxHelp::GetCurrentModuleIdentifier();
-            OUString sURL("https://hub.libreoffice.org/send-feedback/?LOversion=" + utl::ConfigManager::getAboutBoxProductVersion() +
+            OUString sURL("https://libreoffice.cib.de/support?LOversion=" + utl::ConfigManager::getAboutBoxProductVersion() +
                 "&LOlocale=" + utl::ConfigManager::getLocale() + "&LOmodule=" + module.copy(module.lastIndexOf('.') + 1 )  );
             sfx2::openUriExternally(sURL, false);
             break;
commit b9ae127d206e4030e7023715ae796e9b1e3dd52d
Author:     Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Tue Feb 9 10:00:30 2016 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Mar 28 16:48:47 2019 +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 8394418d5fe6..023085ab5279 100644
--- a/instsetoo_native/util/openoffice.lst.in
+++ b/instsetoo_native/util/openoffice.lst.in
@@ -69,7 +69,7 @@ LibreOffice
             CHANGETARGETDIR 1
             PATCHCODEFILE ooo_patchcodes.txt
             STARTCENTER_ADDFEATURE_URL https://extensions.libreoffice.org/
-            STARTCENTER_INFO_URL https://www.libreoffice.org/
+            STARTCENTER_INFO_URL https://libreoffice.cib.de/
             STARTCENTER_TEMPLREP_URL https://templates.libreoffice.org/
             DICT_REPO_URL https://extensions.libreoffice.org/dictionaries/
             STARTCENTER_HIDE_EXTERNAL_LINKS 0
@@ -122,7 +122,7 @@ LibreOfficeDev
             CODEFILENAME codes_ooodev.txt
             LOCALUSERDIR $ORIGIN/..
             STARTCENTER_ADDFEATURE_URL https://extensions.libreoffice.org/
-            STARTCENTER_INFO_URL https://www.libreoffice.org/
+            STARTCENTER_INFO_URL https://libreoffice.cib.de/
             STARTCENTER_TEMPLREP_URL https://templates.libreoffice.org/
             DICT_REPO_URL https://extensions.libreoffice.org/dictionaries/
             STARTCENTER_HIDE_EXTERNAL_LINKS 0
@@ -164,7 +164,7 @@ LibreOffice_SDK
             CHANGETARGETDIR 1
             DONTUSESTARTMENUFOLDER 1
             STARTCENTER_ADDFEATURE_URL https://extensions.libreoffice.org/
-            STARTCENTER_INFO_URL https://www.libreoffice.org/
+            STARTCENTER_INFO_URL https://libreoffice.cib.de/
             STARTCENTER_TEMPLREP_URL https://templates.libreoffice.org/
             DICT_REPO_URL https://extensions.libreoffice.org/dictionaries/
             STARTCENTER_HIDE_EXTERNAL_LINKS 0
@@ -210,7 +210,7 @@ LibreOfficeDev_SDK
             CHANGETARGETDIR 1
             DONTUSESTARTMENUFOLDER 1
             STARTCENTER_ADDFEATURE_URL https://extensions.libreoffice.org/
-            STARTCENTER_INFO_URL https://www.libreoffice.org/
+            STARTCENTER_INFO_URL https://libreoffice.cib.de/
             STARTCENTER_TEMPLREP_URL https://templates.libreoffice.org/
             DICT_REPO_URL https://extensions.libreoffice.org/dictionaries/
             STARTCENTER_HIDE_EXTERNAL_LINKS 0
diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk
index 7548789e9766..8e48f55d9aed 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -553,7 +553,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 75ce24b589a3..c48fa7c6b87a 100644
--- a/svtools/source/misc/langhelp.cxx
+++ b/svtools/source/misc/langhelp.cxx
@@ -25,6 +25,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") )
@@ -39,6 +40,7 @@ void localizeWebserviceURI( OUString& rURI )
             aLang = "zh-tw";
     }
 
+    rURI += aPrefix;
     rURI += aLang;
 }
 
commit a6cb5f54e00e56b4bd8b71422d9564a1246ea2ce
Author:     Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Mon Sep 21 13:47:57 2015 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Mar 28 16:48:47 2019 +0100

    CIB branding for start center
    
    Change-Id: I9887fded72131c7888d6e1b1165a778c8da2952d

diff --git a/icon-themes/colibre/sfx2/res/startcenter-logo.png b/icon-themes/colibre/sfx2/res/startcenter-logo.png
index 78bc4ebd9e20..ef903fb008a0 100644
Binary files a/icon-themes/colibre/sfx2/res/startcenter-logo.png and b/icon-themes/colibre/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/icon-themes/karasa_jaga/sfx2/res/logo.png b/icon-themes/karasa_jaga/sfx2/res/logo.png
index 9ba6acaaaa0d..1f215d3ba8d0 100644
Binary files a/icon-themes/karasa_jaga/sfx2/res/logo.png and b/icon-themes/karasa_jaga/sfx2/res/logo.png differ
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 6b5729412f6e..bba14a7a79c1 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -3598,14 +3598,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 57e6e1e1cec5465b81450bcbabac43beaee7ea74
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Wed Mar 13 17:35:27 2019 +0100
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Thu Mar 28 14:50:06 2019 +0100

    fix grayscale jpeg writing in pdfexport (tdf#121615)
    
    If the bitmap to be written is non-8bit, e.g. in case of using OpenGL
    (on Linux the test requires "SAL_FORCEGL=1 SAL_USE_VCLPLUGIN=gen",
    on Windows it's probably the default case), then the bitmap is not
    in native format for 8bit. This was done correctly by 45e8e0fbee40f
    that introduced it but somehow it got lost later (I can't even find
    where).
    
    Reviewed-on: https://gerrit.libreoffice.org/69213
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
    (cherry picked from commit 4b48f5c2fd2d0d6de1e1df4c13ceba47b1da7b5e)
    
    Change-Id: Ib1810cb9cf12e373c1cb41da40fa28e96ad7db28
    Reviewed-on: https://gerrit.libreoffice.org/69851
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/vcl/qa/cppunit/pdfexport/data/tdf121615.odt b/vcl/qa/cppunit/pdfexport/data/tdf121615.odt
new file mode 100644
index 000000000000..7d2a87cf0e40
Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf121615.odt differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 78cec0a881d7..5c4b4a8c7141 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -21,6 +21,7 @@
 #include <unotest/macros_test.hxx>
 #include <unotools/mediadescriptor.hxx>
 #include <unotools/tempfile.hxx>
+#include <vcl/graphicfilter.hxx>
 #include <vcl/filter/pdfdocument.hxx>
 #include <tools/zcodec.hxx>
 #include <fpdf_edit.h>
@@ -29,6 +30,15 @@
 
 using namespace ::com::sun::star;
 
+static std::ostream& operator<<(std::ostream& rStrm, const Color& rColor)
+{
+    rStrm << "Color: R:" << static_cast<int>(rColor.GetRed())
+          << " G:" << static_cast<int>(rColor.GetGreen())
+          << " B:" << static_cast<int>(rColor.GetBlue())
+          << " A:" << static_cast<int>(rColor.GetTransparency());
+    return rStrm;
+}
+
 namespace
 {
 
@@ -90,6 +100,7 @@ public:
     void testTdf105954();
     void testTdf106702();
     void testTdf113143();
+    void testTdf121615();
 
     CPPUNIT_TEST_SUITE(PdfExportTest);
     CPPUNIT_TEST(testTdf106059);
@@ -120,6 +131,7 @@ public:
     CPPUNIT_TEST(testTdf105954);
     CPPUNIT_TEST(testTdf106702);
     CPPUNIT_TEST(testTdf113143);
+    CPPUNIT_TEST(testTdf121615);
     CPPUNIT_TEST_SUITE_END();
 };
 
@@ -1465,6 +1477,52 @@ void PdfExportTest::testForcePoint71()
     topdf("forcepoint71.key");
 }
 
+void PdfExportTest::testTdf121615()
+{
+    vcl::filter::PDFDocument aDocument;
+    load("tdf121615.odt", aDocument);
+
+    // The document has one page.
+    std::vector<vcl::filter::PDFObjectElement*> aPages = aDocument.GetPages();
+    CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aPages.size());
+
+    // Get access to the only image on the only page.
+    vcl::filter::PDFObjectElement* pResources = aPages[0]->LookupObject("Resources");
+    CPPUNIT_ASSERT(pResources);
+    auto pXObjects = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pResources->Lookup("XObject"));
+    CPPUNIT_ASSERT(pXObjects);
+    CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pXObjects->GetItems().size());
+    vcl::filter::PDFObjectElement* pXObject = pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
+    CPPUNIT_ASSERT(pXObject);
+    vcl::filter::PDFStreamElement* pStream = pXObject->GetStream();
+    CPPUNIT_ASSERT(pStream);
+    SvMemoryStream& rObjectStream = pStream->GetMemory();
+
+    // Load the embedded image.
+    rObjectStream.Seek( 0 );
+    GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
+    Graphic aGraphic;
+    sal_uInt16 format;
+    ErrCode bResult = rFilter.ImportGraphic(aGraphic, OUString( "import" ), rObjectStream,
+        GRFILTER_FORMAT_DONTKNOW, &format);
+    CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
+
+    // The image should be grayscale 8bit JPEG.
+    sal_uInt16 jpegFormat = rFilter.GetImportFormatNumberForShortName( JPG_SHORTNAME );
+    CPPUNIT_ASSERT( jpegFormat != GRFILTER_FORMAT_NOTFOUND );
+    CPPUNIT_ASSERT_EQUAL( jpegFormat, format );
+    BitmapEx aBitmap = aGraphic.GetBitmapEx();
+    CPPUNIT_ASSERT_EQUAL( 200L, aBitmap.GetSizePixel().Width());
+    CPPUNIT_ASSERT_EQUAL( 300L, aBitmap.GetSizePixel().Height());
+    CPPUNIT_ASSERT_EQUAL( 8, int(aBitmap.GetBitCount()));
+    // tdf#121615 was caused by broken handling of data width with 8bit color,
+    // so the test image has some black in the bottomright corner, check it's there
+    CPPUNIT_ASSERT_EQUAL( COL_WHITE, aBitmap.GetPixelColor( 0, 0 ));
+    CPPUNIT_ASSERT_EQUAL( COL_WHITE, aBitmap.GetPixelColor( 0, 299 ));
+    CPPUNIT_ASSERT_EQUAL( COL_WHITE, aBitmap.GetPixelColor( 199, 0 ));
+    CPPUNIT_ASSERT_EQUAL( COL_BLACK, aBitmap.GetPixelColor( 199, 299 ));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(PdfExportTest);
 
 }
diff --git a/vcl/source/filter/jpeg/JpegWriter.cxx b/vcl/source/filter/jpeg/JpegWriter.cxx
index f6787145eabf..c7a476a84de6 100644
--- a/vcl/source/filter/jpeg/JpegWriter.cxx
+++ b/vcl/source/filter/jpeg/JpegWriter.cxx
@@ -223,7 +223,10 @@ bool JPEGWriter::Write( const Graphic& rGraphic )
         if( mpExpWasGrey )
             *mpExpWasGrey = mbGreys;
 
-        mbNative = ( mpReadAccess->GetScanlineFormat() == ScanlineFormat::N24BitTcRgb );
+        if ( mbGreys )
+            mbNative = ( mpReadAccess->GetScanlineFormat() == ScanlineFormat::N8BitPal );
+        else
+            mbNative = ( mpReadAccess->GetScanlineFormat() == ScanlineFormat::N24BitTcRgb );
 
         if( !mbNative )
             mpBuffer = new sal_uInt8[ AlignedWidth4Bytes( mbGreys ? mpReadAccess->Width() * 8L : mpReadAccess->Width() * 24L ) ];
commit e051b74e274c78d91ce69b37d896861816f5b6ea
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Wed Mar 13 17:23:42 2019 +0100
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Thu Mar 28 14:49:41 2019 +0100

    fix transparency handling in BitmapEx::GetPixelColor()
    
    Apparently the Color class uses transparency as the opposite
    of the normally used meaning of opacity, so transparency 255
    means transparent.
    
    Change-Id: I3a76c2c93d98ad3c850017d3fd569b04dc6c19c8
    Reviewed-on: https://gerrit.libreoffice.org/69211
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/69884
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index c81b8b0fd446..5642beba0c4d 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -762,7 +762,7 @@ Color BitmapEx::GetPixelColor(sal_Int32 nX, sal_Int32 nY) const
             aColor.SetTransparency( pAlphaReadAccess->GetPixel( nY, nX ).GetIndex() );
         }
         else
-            aColor.SetTransparency(255);
+            aColor.SetTransparency(0);
         return aColor;
 }
 
commit cdef6e5f4053adf5413781a9282285eab3923373
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Mar 25 12:06:20 2019 +0000
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Wed Mar 27 16:33:31 2019 +0100

    Resolves: tdf#124142 don't deref nullptr
    
    Change-Id: Ie14600e9f9a1e1c4e99c7a872f5d677453481888
    Reviewed-on: https://gerrit.libreoffice.org/69666
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit ac7ce7a64ef903bad1476f5635a7b2a1e951a7a3)
    Reviewed-on: https://gerrit.libreoffice.org/69694
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 6fe6857b72d1..dc619361a7e7 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -195,7 +195,8 @@ namespace sw
             , m_pBasePool(pDocShell->GetStyleSheetPool())
             , m_pDocShell(pDocShell)
         {
-            StartListening(*m_pBasePool);
+            if (m_pBasePool) //tdf#124142 html docs can have no styles
+                StartListening(*m_pBasePool);
         }
 
         //XIndexAccess
commit 078dbe815940018705a5c69ddb8ac9d1897689c1
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Mon Mar 25 22:33:03 2019 +0100
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Tue Mar 26 17:13:08 2019 +0100

    Assign [kmr-Latn-TR] TRY|₺ currency, TRY|YTL and TRL|TL are legacyOnly
    
    This was done long ago for the tr-TR locale as well.
    
    Change-Id: I5bf8595f6d49adb7fd76b3c4924c4d72b3b8ea5e
    Reviewed-on: https://gerrit.libreoffice.org/69717
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Jenkins
    (cherry picked from commit 4ca9db953d59d93ce8e3a54a36d23ed52b9c62a9)
    Reviewed-on: https://gerrit.libreoffice.org/69723
    Tested-by: Eike Rathke <erack at redhat.com>
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/i18npool/source/localedata/data/kmr_Latn_TR.xml b/i18npool/source/localedata/data/kmr_Latn_TR.xml
index 2762df9e630f..a566c67170b9 100644
--- a/i18npool/source/localedata/data/kmr_Latn_TR.xml
+++ b/i18npool/source/localedata/data/kmr_Latn_TR.xml
@@ -52,7 +52,7 @@
     <TimePM>PN</TimePM>
     <MeasurementSystem>US</MeasurementSystem>
   </LC_CTYPE>
-  <LC_FORMAT replaceFrom="[CURRENCY]" replaceTo="[$TL-626]">
+  <LC_FORMAT replaceFrom="[CURRENCY]" replaceTo="[$₺-626]">
     <DateAcceptancePattern>M/D</DateAcceptancePattern>
     <FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0">
       <FormatCode>General</FormatCode>
@@ -335,14 +335,21 @@
     </Calendar>
   </LC_CALENDAR>
   <LC_CURRENCY>
-    <Currency default="true" usedInCompatibleFormatCodes="false">
+    <Currency default="true" usedInCompatibleFormatCodes="true">
+      <CurrencyID>TRY</CurrencyID>
+      <CurrencySymbol>₺</CurrencySymbol>
+      <BankSymbol>TRY</BankSymbol>
+      <CurrencyName>Türk Lirası</CurrencyName>
+      <DecimalPlaces>2</DecimalPlaces>
+    </Currency>
+    <Currency default="false" usedInCompatibleFormatCodes="false" legacyOnly="true">
       <CurrencyID>TRY</CurrencyID>
       <CurrencySymbol>YTL</CurrencySymbol>
       <BankSymbol>TRY</BankSymbol>
       <CurrencyName>Yeni Türk Lirası</CurrencyName>
       <DecimalPlaces>2</DecimalPlaces>
     </Currency>
-    <Currency default="false" usedInCompatibleFormatCodes="true">
+    <Currency default="false" usedInCompatibleFormatCodes="false" legacyOnly="true">
       <CurrencyID>TRL</CurrencyID>
       <CurrencySymbol>TL</CurrencySymbol>
       <BankSymbol>TRL</BankSymbol>
commit be189bfc1709dce48111eed49d847c05ef82164e
Author:     Khaled Hosny <khaledhosny at eglug.org>
AuthorDate: Thu Mar 21 15:00:22 2019 +0200
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Fri Mar 22 10:02:28 2019 +0100

    tdf#124109: Revert "Only do kashida insertion with fonts that have non-zero width kashidas"
    
    This reverts commit c45b23377bb2fe44c26f1287ff38495344e4ca50.
    
    This commit breaks Kashida justification when a document is first opened (the
    kashida justification will be disabled and spaces will be used untill the text
    is changed). Probably it is checking for width of Kashida glyph too early. Also
    I'm not sure what the reverted commit was trying to fix since we already do
    kashida justification in fonts that has non-zero width Kashida and it has been
    the case for a long time.
    
    This does not fix the original issue in the document attched with the bug
    report, but if fixes kashida not being applied when opening the document.
    
    Change-Id: Ic95859bca94fa792793e3223d2adb465bc6d880f
    Reviewed-on: https://gerrit.libreoffice.org/69509
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
    (cherry picked from commit 0a8e9cc5c1782f1cd50ef338ec2aa4f6776a4c0e)
    Reviewed-on: https://gerrit.libreoffice.org/69519
    Reviewed-by: Khaled Hosny <khaledhosny at eglug.org>

diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index 8383292105bc..bacc39e348b1 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -113,9 +113,6 @@ void SwTextAdjuster::FormatBlock( )
 static bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTextSizeInfo& rInf, SwTextIter& rItr,
             sal_Int32& rKashidas, TextFrameIndex& nGluePortion)
 {
-    if ( rInf.GetOut()->GetMinKashida() <= 0 )
-        return false;
-
     // i60594 validate Kashida justification
     TextFrameIndex nIdx = rItr.GetStart();
     TextFrameIndex nEnd = rItr.GetEnd();
@@ -153,6 +150,12 @@ static bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTextSizeInfo& rInf,
         sal_Int32 nKashidasInAttr = rSI.KashidaJustify ( nullptr, nullptr, nIdx, nNext - nIdx );
         if (nKashidasInAttr > 0)
         {
+            // Kashida glyph looks suspicious, skip Kashida justification
+            if ( rInf.GetOut()->GetMinKashida() <= 0 )
+            {
+                return false;
+            }
+
             sal_Int32 nKashidasDropped = 0;
             if ( !SwScriptInfo::IsArabicText( rInf.GetText(), nIdx, nNext - nIdx ) )
             {
@@ -212,7 +215,7 @@ static bool lcl_CheckKashidaWidth ( SwScriptInfo& rSI, SwTextSizeInfo& rInf, SwT
             sal_Int32 nKashidasInAttr = rSI.KashidaJustify ( nullptr, nullptr, nIdx, nNext - nIdx );
 
             long nFontMinKashida = rInf.GetOut()->GetMinKashida();
-            if ( nKashidasInAttr > 0 && SwScriptInfo::IsArabicText( rInf.GetText(), nIdx, nNext - nIdx ) )
+            if ( nFontMinKashida && nKashidasInAttr > 0 && SwScriptInfo::IsArabicText( rInf.GetText(), nIdx, nNext - nIdx ) )
             {
                 sal_Int32 nKashidasDropped = 0;
                 while ( rKashidas && nGluePortion && nKashidasInAttr > 0 &&
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 69593f8d157c..f520130458e2 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -115,8 +115,7 @@ static TextFrameIndex lcl_AddSpace(const SwTextSizeInfo &rInf,
     // Kashida Justification: Insert Kashidas
     if ( nEnd > nPos && pSI && COMPLEX == nScript )
     {
-        if ( SwScriptInfo::IsArabicText( *pStr, nPos, nEnd - nPos ) && rInf.GetOut()->GetMinKashida()
-            && pSI->CountKashida() )
+        if ( SwScriptInfo::IsArabicText( *pStr, nPos, nEnd - nPos ) && pSI->CountKashida() )
         {
             const sal_Int32 nKashRes = pSI->KashidaJustify( nullptr, nullptr, nPos, nEnd - nPos );
             // i60591: need to check result of KashidaJustify
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index a0a38aa94364..5c7ab0e0ad93 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -1249,8 +1249,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
                 // Kashida Justification
                 if ( SwFontScript::CTL == nActual && nSpaceAdd )
                 {
-                    if ( SwScriptInfo::IsArabicText( rInf.GetText(), rInf.GetIdx(), rInf.GetLen() )
-                        && rInf.GetOut().GetMinKashida() )
+                    if ( SwScriptInfo::IsArabicText( rInf.GetText(), rInf.GetIdx(), rInf.GetLen() ) )
                     {
                         if ( pSI && pSI->CountKashida() &&
                             pSI->KashidaJustify( pKernArray.get(), nullptr, rInf.GetIdx(),
@@ -1456,8 +1455,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
             // Kashida Justification
             if ( SwFontScript::CTL == nActual && nSpaceAdd )
             {
-                if ( SwScriptInfo::IsArabicText( rInf.GetText(), rInf.GetIdx(), rInf.GetLen() )
-                    && rInf.GetOut().GetMinKashida() )
+                if ( SwScriptInfo::IsArabicText( rInf.GetText(), rInf.GetIdx(), rInf.GetLen() ) )
                 {
                     if ( pSI && pSI->CountKashida() &&
                          pSI->KashidaJustify( pKernArray.get(), pScrArray.get(), rInf.GetIdx(),
@@ -2053,8 +2051,7 @@ TextFrameIndex SwFntObj::GetCursorOfst(SwDrawTextInfo &rInf)
         // Kashida Justification
         if ( SwFontScript::CTL == nActual && rInf.GetSpace() )
         {
-            if ( SwScriptInfo::IsArabicText( rInf.GetText(), rInf.GetIdx(), rInf.GetLen() )
-                && rInf.GetOut().GetMinKashida() )
+            if ( SwScriptInfo::IsArabicText( rInf.GetText(), rInf.GetIdx(), rInf.GetLen() ) )
             {
                 if ( pSI && pSI->CountKashida() &&
                     pSI->KashidaJustify( pKernArray.get(), nullptr, rInf.GetIdx(), rInf.GetLen(),
commit df3fed52760a72b2a729f7b685adaa2da86d7f76
Author:     Juergen Funk <juergen.funk_ml at cib.de>
AuthorDate: Thu Mar 21 09:22:03 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Mar 21 14:23:46 2019 +0100

    pUnoReturn should be null when UNO methode is VOID
    
    the problem is that at least the msvc_win32_x86-64 bridge's
    unoInterfaceProxyDispatch
    (bridges/source/cpp_uno/msvc_win32_x86-64/uno2cpp.cxx)
    requires pUnoReturn to be a nullptr when the UNO method has VOID
    return type (see computation of retKind in cpp_call in the same file),
    but that IdlInterfaceMethodImpl::invoke doesn't set up the arguments
    according to that expectation.
    
    
    Change-Id: I187a997300571cd9822de2eeacf7ad887ad00a4f
    Reviewed-on: https://gerrit.libreoffice.org/69495
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    Tested-by: Stephan Bergmann <sbergman at redhat.com>
    (cherry picked from commit 14a11ab5dfa2ea34049866517ee78170922aee4e)
    Reviewed-on: https://gerrit.libreoffice.org/69502
    Tested-by: Jenkins

diff --git a/stoc/source/corereflection/criface.cxx b/stoc/source/corereflection/criface.cxx
index 25839f741f5f..4ce3b0fc8ae0 100644
--- a/stoc/source/corereflection/criface.cxx
+++ b/stoc/source/corereflection/criface.cxx
@@ -594,7 +594,7 @@ Any SAL_CALL IdlInterfaceMethodImpl::invoke( const Any & rObj, Sequence< Any > &
         // end of a "short" struct by writing the full contents of a "long"
         // register); so create enough space here (assuming that no ABI requires
         // padding larger than 16 byte boundaries):
-        void * pUnoReturn = alloca( multipleOf16(pReturnType->nSize) );
+        void * pUnoReturn = (pReturnType->nSize == 0) ? nullptr : alloca( multipleOf16(pReturnType->nSize) );
         void ** ppUnoArgs = static_cast<void **>(alloca( sizeof(void *) * nParams *2 ));
         typelib_TypeDescription ** ppParamTypes = reinterpret_cast<typelib_TypeDescription **>(ppUnoArgs + nParams);
 
commit b407d93a055eb2875dfaac9836b082230efe4eff
Author:     Serge Krot <Serge.Krot at cib.de>
AuthorDate: Mon Mar 11 10:24:53 2019 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed Mar 20 10:42:17 2019 +0100

    tdf#120161 sc: pdf export unit test
    
    Change-Id: I42579d4d61be43318f7e2b06b3465890dd624a12
    Reviewed-on: https://gerrit.libreoffice.org/69035
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit 87bf5a930a72a12f88a21b450da0dd86348c3077)
    Reviewed-on: https://gerrit.libreoffice.org/69412

diff --git a/sc/CppunitTest_sc_pdf_export.mk b/sc/CppunitTest_sc_pdf_export.mk
new file mode 100644
index 000000000000..be938026323c
--- /dev/null
+++ b/sc/CppunitTest_sc_pdf_export.mk
@@ -0,0 +1,97 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,sc_pdf_export))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sc_pdf_export, \
+    sc/qa/extras/scpdfexport \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sc_pdf_export, \
+    boost_headers \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sc_pdf_export, \
+    comphelper \
+    cppu \
+    editeng \
+    sal \
+    sax \
+    sc \
+    sfx \
+    svl \
+    test \
+    tl \
+    unotest \
+    utl \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sc_pdf_export,\
+    -I$(SRCDIR)/sc/source/ui/inc \
+    -I$(SRCDIR)/sc/inc \
+    $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sc_pdf_export,\
+    udkapi \
+    offapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sc_pdf_export))
+$(eval $(call gb_CppunitTest_use_vcl,sc_pdf_export))
+
+$(eval $(call gb_CppunitTest_use_components,sc_pdf_export,\
+    basic/util/sb \
+    comphelper/util/comphelp \
+    configmgr/source/configmgr \
+    dbaccess/util/dba \
+    eventattacher/source/evtatt \
+    filter/source/config/cache/filterconfig1 \
+    filter/source/pdf/pdffilter \
+    filter/source/storagefilterdetect/storagefd \
+    forms/util/frm \
+    framework/util/fwk \
+    i18npool/source/search/i18nsearch \
+    i18npool/util/i18npool \
+    linguistic/source/lng \
+    oox/util/oox \
+    package/source/xstor/xstor \
+    package/util/package2 \
+    sax/source/expatwrap/expwrap \
+    scripting/source/basprov/basprov \
+    scripting/source/dlgprov/dlgprov \
+    scripting/source/vbaevents/vbaevents \
+    scripting/util/scriptframe \
+    sc/util/sc \
+    sc/util/scd \
+    sc/util/scfilt \
+    $(call gb_Helper_optional,SCRIPTING, \
+        sc/util/vbaobj) \
+    sfx2/util/sfx \
+    sot/util/sot \
+    svl/source/fsstor/fsstorage \
+    svtools/util/svt \
+    svx/util/svx \
+    svx/util/svxcore \
+    toolkit/util/tk \
+    ucb/source/core/ucb1 \
+    ucb/source/ucp/file/ucpfile1 \
+    ucb/source/ucp/tdoc/ucptdoc1 \
+    unotools/util/utl \
+    unoxml/source/rdf/unordf \
+    unoxml/source/service/unoxml \
+    uui/util/uui \
+    vcl/vcl.common \
+    vbahelper/util/msforms \
+    xmloff/util/xo \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sc_pdf_export))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index 35277496202a..0fc331e22cd1 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -61,6 +61,7 @@ endif
 $(eval $(call gb_Module_add_slowcheck_targets,sc, \
 	CppunitTest_sc_cond_format_merge \
 	CppunitTest_sc_new_cond_format_api \
+	CppunitTest_sc_pdf_export \
 	CppunitTest_sc_subsequent_filters_test \
 	CppunitTest_sc_subsequent_export_test \
 	CppunitTest_sc_html_export_test \
diff --git a/sc/qa/extras/scpdfexport.cxx b/sc/qa/extras/scpdfexport.cxx
new file mode 100644
index 000000000000..02f00f8fac5d
--- /dev/null
+++ b/sc/qa/extras/scpdfexport.cxx
@@ -0,0 +1,284 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <sal/config.h>
+
+#include <com/sun/star/frame/Desktop.hpp>
+#include <com/sun/star/frame/XStorable.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/sheet/XSpreadsheet.hpp>
+#include <com/sun/star/table/XCellRange.hpp>
+#include <com/sun/star/util/URL.hpp>
+#include <test/bootstrapfixture.hxx>
+#include <unotools/tempfile.hxx>
+#include <unotest/macros_test.hxx>
+#include <docsh.hxx>
+#include <editutil.hxx>
+#include <editeng/eeitem.hxx>
+#include <editeng/editobj.hxx>
+#include <editeng/fontitem.hxx>
+#include <osl/file.hxx>
+#include <comphelper/processfactory.hxx>
+
+using namespace css::lang;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+
+class ScPDFExportTest : public test::BootstrapFixture, public unotest::MacrosTest
+{
+    Reference<XComponent> mxComponent;
+    Reference<frame::XFrame> xTargetFrame;
+
+public:
+    ScPDFExportTest() {}
+
+    virtual void setUp() override final;
+    virtual void tearDown() override final;
+
+    // helpers
+private:
+    std::shared_ptr<utl::TempFile> exportToPdf(uno::Reference<frame::XModel>& xModel,
+                                               const ScRange& range);
+
+    static bool hasFontInPdf(const std::shared_ptr<utl::TempFile>& pXPathFile,
+                             const char* sFontName, bool& bFound);
+
+    void setFont(ScFieldEditEngine& rEE, sal_Int32 nStart, sal_Int32 nEnd,
+                 const OUString& rFontName);
+
+    // unit tests
+public:
+    void testExportRange_Tdf120161();
+
+    CPPUNIT_TEST_SUITE(ScPDFExportTest);
+    CPPUNIT_TEST(testExportRange_Tdf120161);
+    CPPUNIT_TEST_SUITE_END();
+};
+
+void ScPDFExportTest::setUp()
+{
+    test::BootstrapFixture::setUp();
+
+    mxDesktop.set(
+        css::frame::Desktop::create(comphelper::getComponentContext(getMultiServiceFactory())));
+
+    {
+        uno::Reference<frame::XDesktop2> xDesktop = mxDesktop;
+        CPPUNIT_ASSERT(xDesktop.is());
+
+        // Create spreadsheet
+        uno::Sequence<beans::PropertyValue> args(1);
+        args[0].Name = "Hidden";
+        args[0].Value <<= true;
+        mxComponent = xDesktop->loadComponentFromURL("private:factory/scalc", "_blank", 0, args);
+        CPPUNIT_ASSERT(mxComponent.is());
+
+        // create a frame
+        xTargetFrame = xDesktop->findFrame("_blank", 0);
+        CPPUNIT_ASSERT(xTargetFrame.is());
+
+        uno::Reference<frame::XModel> xModel
+            = uno::Reference<frame::XModel>(mxComponent, uno::UNO_QUERY);
+        uno::Reference<frame::XModel2> xModel2(xModel, UNO_QUERY);
+        CPPUNIT_ASSERT(xModel2.is());
+
+        Reference<frame::XController2> xController(
+            xModel2->createDefaultViewController(xTargetFrame), UNO_QUERY);
+        CPPUNIT_ASSERT(xController.is());
+
+        // introduce model/view/controller to each other
+        xController->attachModel(xModel2.get());
+        xModel2->connectController(xController.get());
+
+        xTargetFrame->setComponent(xController->getComponentWindow(), xController.get());
+        xController->attachFrame(xTargetFrame);
+
+        xModel2->setCurrentController(xController.get());
+    }
+}
+
+void ScPDFExportTest::tearDown()
+{
+    if (mxComponent.is())
+        mxComponent->dispose();
+
+    test::BootstrapFixture::tearDown();
+}
+
+bool ScPDFExportTest::hasFontInPdf(const std::shared_ptr<utl::TempFile>& pXPathFile,
+                                   const char* sFontName, bool& bFound)
+{
+    SvStream* pStream = pXPathFile->GetStream(StreamMode::STD_READ);
+    CPPUNIT_ASSERT(pStream);
+
+    // get file size
+    pStream->Seek(STREAM_SEEK_TO_END);
+    const std::size_t nFileSize = pStream->Tell();
+    if (nFileSize == 0)
+        return false;
+
+    // read file content
+    char* pBuffer = new char[nFileSize];
+    pStream->Seek(STREAM_SEEK_TO_BEGIN);
+    const std::size_t nRead = pStream->ReadBytes(pBuffer, nFileSize);
+    if (nRead == nFileSize)
+    {
+        const std::string haystack(pBuffer, pBuffer + nFileSize);
+        const std::string needle(sFontName);
+        const std::size_t n = haystack.find(needle);
+        bFound = (n != std::string::npos);
+    }
+    delete[] pBuffer;
+
+    // close and return the status
+    pStream = nullptr;
+    pXPathFile->CloseStream();
+    return (nRead == nFileSize);
+}
+
+std::shared_ptr<utl::TempFile> ScPDFExportTest::exportToPdf(uno::Reference<frame::XModel>& xModel,
+                                                            const ScRange& range)
+{
+    // create temp file name
+    std::shared_ptr<utl::TempFile> pTempFile(new utl::TempFile());
+    pTempFile->EnableKillingFile();
+    OUString sFileURL = pTempFile->GetURL();
+    // Note: under Windows path path should be with "/" delimiters instead of "\\"
+    // due to usage of INetURLObject() that converts "\\" to hexdecimal notation.
+    ::osl::FileBase::getFileURLFromSystemPath(sFileURL, sFileURL);
+
+    // get XSpreadsheet
+    uno::Reference<sheet::XSpreadsheetDocument> xDoc(xModel, uno::UNO_QUERY_THROW);
+    uno::Reference<sheet::XSpreadsheets> xSheets(xDoc->getSheets(), UNO_QUERY_THROW);
+    uno::Reference<container::XIndexAccess> xIndex(xSheets, uno::UNO_QUERY_THROW);
+    uno::Reference<sheet::XSpreadsheet> rSheet(xIndex->getByIndex(0), UNO_QUERY_THROW);
+
+    // select requested cells to print
+    // query for the XCellRange interface
+    uno::Reference<table::XCellRange> rCellRange(rSheet, UNO_QUERY);
+    uno::Reference<table::XCellRange> xCellRange = rCellRange->getCellRangeByPosition(
+        range.aStart.Col(), range.aStart.Row(), range.aEnd.Col(), range.aEnd.Row());
+    {
+        uno::Reference<frame::XController> xController = xModel->getCurrentController();
+        CPPUNIT_ASSERT(xController.is());
+
+        uno::Reference<view::XSelectionSupplier> xSelection(xController, uno::UNO_QUERY_THROW);
+        CPPUNIT_ASSERT(xSelection.is());
+
+        uno::Any rCellRangeAny(xCellRange);
+        xSelection->select(rCellRangeAny);
+    }
+
+    // init special pdf export params
+    css::uno::Sequence<css::beans::PropertyValue> aFilterData(3);
+    aFilterData[0].Name = "Selection";
+    aFilterData[0].Value <<= xCellRange;
+    aFilterData[1].Name = "Printing";
+    aFilterData[1].Value <<= sal_Int32(2);
+    aFilterData[2].Name = "ViewPDFAfterExport";
+    aFilterData[2].Value <<= true;
+
+    // init set of params for storeToURL() call
+    css::uno::Sequence<css::beans::PropertyValue> seqArguments(3);
+    seqArguments[0].Name = "FilterData";
+    seqArguments[0].Value <<= aFilterData;
+    seqArguments[1].Name = "FilterName";
+    seqArguments[1].Value <<= OUString("calc_pdf_Export");
+    seqArguments[2].Name = "URL";
+    seqArguments[2].Value <<= sFileURL;
+
+    // call storeToURL()
+    uno::Reference<lang::XComponent> xComponent(mxComponent, UNO_QUERY_THROW);
+    uno::Reference<css::frame::XStorable> xStorable(xComponent, UNO_QUERY);
+    xStorable->storeToURL(sFileURL, seqArguments);
+
+    // return file object with generated PDF
+    return pTempFile;
+}
+
+void ScPDFExportTest::setFont(ScFieldEditEngine& rEE, sal_Int32 nStart, sal_Int32 nEnd,
+                              const OUString& rFontName)
+{
+    ESelection aSel;
+    aSel.nStartPara = aSel.nEndPara = 0;
+    aSel.nStartPos = nStart;
+    aSel.nEndPos = nEnd;
+
+    SfxItemSet aItemSet = rEE.GetEmptyItemSet();
+    SvxFontItem aItem(FAMILY_MODERN, rFontName, "", PITCH_VARIABLE, RTL_TEXTENCODING_UTF8,
+                      EE_CHAR_FONTINFO);
+    aItemSet.Put(aItem);
+    rEE.QuickSetAttribs(aItemSet, aSel);
+}
+
+// Selection was not taken into account during export into PDF
+void ScPDFExportTest::testExportRange_Tdf120161()
+{
+    // create test document
+    uno::Reference<frame::XModel> xModel
+        = uno::Reference<frame::XModel>(mxComponent, uno::UNO_QUERY);
+    uno::Reference<sheet::XSpreadsheetDocument> xDoc(xModel, uno::UNO_QUERY_THROW);
+    uno::Reference<sheet::XSpreadsheets> xSheets(xDoc->getSheets(), UNO_QUERY_THROW);
+    uno::Reference<container::XIndexAccess> xIndex(xSheets, uno::UNO_QUERY_THROW);
+    xSheets->insertNewByName("First Sheet", 0);
+    uno::Reference<sheet::XSpreadsheet> rSheet(xIndex->getByIndex(0), UNO_QUERY_THROW);
+
+    // 2. Setup data
+    {
+        SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent);
+        CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
+        ScDocShellRef xDocSh = dynamic_cast<ScDocShell*>(pFoundShell);
+        CPPUNIT_ASSERT(xDocSh.get() != nullptr);
+
+        // put some content into the first row with default font
+        ScDocument& rDoc = xDocSh->GetDocument();
+        for (unsigned int r = 0; r < 1; ++r)
+            for (unsigned int c = 0; c < 14; ++c)
+                rDoc.SetValue(ScAddress(c, r, 0), (r + 1) * (c + 1));
+
+        // set "Text" to H1 cell with "DejaVuSans" font
+        ScFieldEditEngine& rEE = rDoc.GetEditEngine();
+        rEE.Clear();
+        rEE.SetText("Text");
+        setFont(rEE, 0, 4, "DejaVuSans"); // set font for first 4 chars
+        rDoc.SetEditText(ScAddress(7, 0, 0), rEE.CreateTextObject());
+    }
+
+    // A1:G1
+    {
+        ScRange range1(0, 0, 0, 6, 0, 0);
+        std::shared_ptr<utl::TempFile> pXPathFile = exportToPdf(xModel, range1);
+        bool bFound = false;
+        CPPUNIT_ASSERT(hasFontInPdf(pXPathFile, "DejaVuSans", bFound));
+        CPPUNIT_ASSERT_EQUAL(false, bFound);
+    }
+
+    // G1:H1
+    {
+        ScRange range1(6, 0, 0, 7, 0, 0);
+        std::shared_ptr<utl::TempFile> pXPathFile = exportToPdf(xModel, range1);
+        bool bFound = false;
+        CPPUNIT_ASSERT(hasFontInPdf(pXPathFile, "DejaVuSans", bFound));
+        CPPUNIT_ASSERT_EQUAL(true, bFound);
+    }
+
+    // H1:I1
+    {
+        ScRange range1(7, 0, 0, 8, 0, 0);
+        std::shared_ptr<utl::TempFile> pXPathFile = exportToPdf(xModel, range1);
+        bool bFound = false;
+        CPPUNIT_ASSERT(hasFontInPdf(pXPathFile, "DejaVuSans", bFound));
+        CPPUNIT_ASSERT_EQUAL(true, bFound);
+    }
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(ScPDFExportTest);
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 0c70e9ab4713a50fec558d6c4e4dfb2517039fc8
Author:     Serge Krot <Serge.Krot at cib.de>
AuthorDate: Wed Mar 6 23:49:54 2019 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Tue Mar 19 10:23:23 2019 +0100

    tdf#120161 sc: use selection to set required printed area
    
    Change-Id: Id0798cbff2d327e2bb955fbbc530a201975f6003
    Reviewed-on: https://gerrit.libreoffice.org/68833
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit 03b6c20c66047af41ed2f78fe5dd229cd06392e8)
    Reviewed-on: https://gerrit.libreoffice.org/69118
    Reviewed-by: Serge Krot (CIB) <Serge.Krot at cib.de>
    Tested-by: Serge Krot (CIB) <Serge.Krot at cib.de>
    (cherry picked from commit f0b71fafd3a2fd6158c5952d601092179cba21e5)
    Reviewed-on: https://gerrit.libreoffice.org/69263

diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 1fd3c9158d7f..1d0928c34cbe 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1971,7 +1971,8 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
 
 
     std::unique_ptr<ScPrintFunc, o3tl::default_delete<ScPrintFunc>> pPrintFunc;
-    if (m_pPrintState && m_pPrintState->nPrintTab == nTab)
+    if (m_pPrintState && m_pPrintState->nPrintTab == nTab
+        && ! pSelRange) // tdf#120161 use selection to set required printed area
         pPrintFunc.reset(new ScPrintFunc(pDev, pDocShell, *m_pPrintState, &aStatus.GetOptions()));
     else
         pPrintFunc.reset(new ScPrintFunc(pDev, pDocShell, nTab, pPrintFuncCache->GetFirstAttr(nTab), nTotalPages, pSelRange, &aStatus.GetOptions()));
commit b0464b42d1416a521e6ce0e492f1628b5fb46910
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Tue Mar 5 12:41:44 2019 +0100
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Thu Mar 14 15:18:00 2019 +0100

    do not access uninitialized values when printing (tdf#121439)
    
    The assert in the bugreport is triggered by ScPrintFunc::CalcPages() passing
    uninitialized values of nEndRow (and others). These variables apparently
    get initialized only by constructors that take ScPrintState. These ctors
    also set (the somewhat poorly named) bState and the call to CalcPages()
    is guarded by this. However, GetPrintState() will simply create ScPrintState
    filled with these uninitialized values and later on this will be used
    with these ctors, so bState will be set, but nEndRow will be bogus.
    
    Although 5217a2a0bf27e496cc429ee45dff7c239b466ae6 introduced tdf#121439,
    this strange bState logic and unitialized variables has been these since
    the initial commit, and the code doesn't take any precautions to check
    whether the values are valid or not, so I assume this always was just lucky
    enough to work and 5217a2a0bf finally triggered a problem.
    
    Given that it's rather unclear to me how this is supposed to work properly,
    just add an extra flag to both ScPrintFunc and ScPrintState marking whether
    the values are set or not and make CalcPages() depends on this flag instead.
    
    Change-Id: I0620de6562865c24f5a0edca2566b01546bf2e2b
    Reviewed-on: https://gerrit.libreoffice.org/68739
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
    Tested-by: Jenkins
    (cherry picked from commit 9432bab9f8f4a246d205ff2a460f60aeedba8ce1)
    Reviewed-on: https://gerrit.libreoffice.org/69262
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
    Tested-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sc/source/ui/inc/printfun.hxx b/sc/source/ui/inc/printfun.hxx
index 2df47432c89a..fd2f486ac5ce 100644
--- a/sc/source/ui/inc/printfun.hxx
+++ b/sc/source/ui/inc/printfun.hxx
@@ -153,6 +153,7 @@ struct ScPrintState                         //  Save Variables from ScPrintFunc
     SCROW   nStartRow;
     SCCOL   nEndCol;
     SCROW   nEndRow;
+    bool    bPrintAreaValid; // the 4 variables above are set
     sal_uInt16  nZoom;
     size_t  nPagesX;
     size_t  nPagesY;
@@ -175,6 +176,7 @@ struct ScPrintState                         //  Save Variables from ScPrintFunc
         , nStartRow(0)
         , nEndCol(0)
         , nEndRow(0)
+        , bPrintAreaValid(false)
         , nZoom(0)
         , nPagesX(0)
         , nPagesY(0)
@@ -212,7 +214,7 @@ private:
     const ScRange*      pUserArea;          //  Selection, if set in dialog
 
     const SfxItemSet*   pParamSet;          //  Selected template
-    bool                bState;             // created from State-struct
+    bool                bFromPrintState;    // created from State-struct
 
                                             //  Parameter from template:
     sal_uInt16          nLeftMargin;
@@ -261,6 +263,7 @@ private:
     SCROW               nStartRow;
     SCCOL               nEndCol;
     SCROW               nEndRow;
+    bool                bPrintAreaValid; // the 4 variables above are set
 
     sc::PrintPageRanges m_aRanges;
 
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 4ddc1f64f0ce..59d5ed9ca96f 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -191,7 +191,7 @@ void ScPrintFunc::Construct( const ScPrintOptions* pOptions )
         pParamSet = nullptr;
     }
 
-    if (!bState)
+    if (!bFromPrintState)
         nZoom = 100;
     nManualZoom = 100;
     bClearWin = false;
@@ -214,13 +214,14 @@ ScPrintFunc::ScPrintFunc( ScDocShell* pShell, SfxPrinter* pNewPrinter, SCTAB nTa
         nPageStart          ( nPage ),
         nDocPages           ( nDocP ),
         pUserArea           ( pArea ),
-        bState              ( false ),
+        bFromPrintState     ( false ),
         bSourceRangeValid   ( false ),
         bPrintCurrentTable  ( false ),
         bMultiArea          ( false ),
         mbHasPrintRange(true),
         nTabPages           ( 0 ),
         nTotalPages         ( 0 ),
+        bPrintAreaValid     ( false ),
         pPageData           ( pData )
 {
     pDev = pPrinter.get();
@@ -247,6 +248,7 @@ ScPrintFunc::ScPrintFunc(ScDocShell* pShell, SfxPrinter* pNewPrinter,
     nStartRow   = rState.nStartRow;
     nEndCol     = rState.nEndCol;
     nEndRow     = rState.nEndRow;
+    bPrintAreaValid = rState.bPrintAreaValid;
     nZoom       = rState.nZoom;
     m_aRanges.m_nPagesX = rState.nPagesX;
     m_aRanges.m_nPagesY = rState.nPagesY;
@@ -254,7 +256,7 @@ ScPrintFunc::ScPrintFunc(ScDocShell* pShell, SfxPrinter* pNewPrinter,
     nTotalPages = rState.nTotalPages;
     nPageStart  = rState.nPageStart;
     nDocPages   = rState.nDocPages;
-    bState      = true;
+    bFromPrintState = true;
 
     if (rState.bSavedStateRanges)
     {
@@ -279,13 +281,14 @@ ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell, SCTAB nTab,
         nPageStart          ( nPage ),
         nDocPages           ( nDocP ),
         pUserArea           ( pArea ),
-        bState              ( false ),
+        bFromPrintState     ( false ),
         bSourceRangeValid   ( false ),
         bPrintCurrentTable  ( false ),
         bMultiArea          ( false ),
         mbHasPrintRange(true),
         nTabPages           ( 0 ),
         nTotalPages         ( 0 ),
+        bPrintAreaValid     ( false ),
         pPageData           ( nullptr )
 {
     pDev = pOutDev;
@@ -311,6 +314,7 @@ ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell,
     nStartRow   = rState.nStartRow;
     nEndCol     = rState.nEndCol;
     nEndRow     = rState.nEndRow;
+    bPrintAreaValid = rState.bPrintAreaValid;
     nZoom       = rState.nZoom;
     m_aRanges.m_nPagesX = rState.nPagesX;
     m_aRanges.m_nPagesY = rState.nPagesY;
@@ -318,7 +322,7 @@ ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell,
     nTotalPages = rState.nTotalPages;
     nPageStart  = rState.nPageStart;
     nDocPages   = rState.nDocPages;
-    bState      = true;
+    bFromPrintState = true;
 
     if (rState.bSavedStateRanges)
     {
@@ -339,6 +343,7 @@ void ScPrintFunc::GetPrintState(ScPrintState& rState,  bool bSavePageRanges)
     rState.nStartRow    = nStartRow;
     rState.nEndCol      = nEndCol;
     rState.nEndRow      = nEndRow;
+    rState.bPrintAreaValid = bPrintAreaValid;
     rState.nZoom        = nZoom;
     rState.nPagesX      = m_aRanges.m_nPagesX;
     rState.nPagesY      = m_aRanges.m_nPagesY;
@@ -370,6 +375,7 @@ void ScPrintFunc::FillPageData()
         sal_uInt16 nCount = sal::static_int_cast<sal_uInt16>( pPageData->GetCount() );
         ScPrintRangeData& rData = pPageData->GetData(nCount);       // count up
 
+        assert( bPrintAreaValid );
         rData.SetPrintRange( ScRange( nStartCol, nStartRow, nPrintTab,
                                         nEndCol, nEndRow, nPrintTab ) );
         // #i123672#
@@ -697,6 +703,7 @@ bool ScPrintFunc::AdjustPrintArea( bool bNew )
         nStartRow = 0;
         if (!pDoc->GetPrintArea( nPrintTab, nEndCol, nEndRow, bNotes ))
             return false;   // nothing
+        bPrintAreaValid = true;
     }
     else
     {
@@ -735,10 +742,12 @@ bool ScPrintFunc::AdjustPrintArea( bool bNew )
         if (!bFound)
             return false;   // empty
 
+        bPrintAreaValid = true;
         if (bForcedChangeRow)
             bChangeRow = true;
     }
 
+    assert( bPrintAreaValid );
     pDoc->ExtendMerge( nStartCol,nStartRow, nEndCol,nEndRow, nPrintTab );  // no Refresh, incl. Attrs
 
     if ( bChangeCol )
@@ -1058,7 +1067,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
 
             //  Split pages
 
-    if (!bState)
+    if (!bPrintAreaValid)
     {
         nTabPages = CountPages();                                   // also calculates zoom
         nTotalPages = nTabPages;
@@ -2546,6 +2555,7 @@ long ScPrintFunc::CountNotePages()
 
         if (bDoThis)
         {
+            assert( bPrintAreaValid );
             for ( SCCOL nCol = nStartCol; nCol <= nEndCol; ++nCol )
             {
                 if (pDoc->HasColNotes(nCol, nPrintTab))
@@ -3005,6 +3015,7 @@ static void lcl_SetHidden( const ScDocument* pDoc, SCTAB nPrintTab, ScPageRowEnt
 
 void ScPrintFunc::CalcPages()               // calculates aPageRect and pages from nZoom
 {
+    assert( bPrintAreaValid );
     m_aRanges.calculate(pDoc, aTableParam.bSkipEmpty, aAreaParam.bPrintArea, nStartRow, nEndRow, nStartCol, nEndCol, nPrintTab, GetDocPageSize());
 }
 
commit 718e49e1f4281cfc77d05e537aab0cf701f6e341
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Tue Feb 19 23:24:58 2019 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed Mar 13 17:00:40 2019 +0100

    tdf#123547: do the same as in lcl_DrawBullet from cui/numpages.cxx
    
    See bt https://bugs.documentfoundation.org/attachment.cgi?id=149389
    It seems the method from cui/numpages.cxx takes more things into account
    
    At least, it doesn't crash for the attachment of this tracker
    
    Change-Id: I05ca0b019ac483890bea4acdbb695d73b660e638
    Reviewed-on: https://gerrit.libreoffice.org/68033
    Tested-by: Jenkins
    (cherry picked from commit 684fcf2fce915f3e3e553c67fb57bdbfc8f159d5)
    Reviewed-on: https://gerrit.libreoffice.org/68843
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    (cherry picked from commit 7f2322afea3b25bc45f438b8ae9d4977ac378c1c)
    Reviewed-on: https://gerrit.libreoffice.org/69172
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index c23794861501..23bb9c66ca4d 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -822,13 +822,30 @@ static long lcl_DrawBullet(vcl::RenderContext* pVDev, const SwNumFormat& rFormat
 {
     vcl::Font aTmpFont(pVDev->GetFont());
 
-    vcl::Font aFont(*rFormat.GetBulletFont());
-    aFont.SetFontSize(rSize);
+    // via Uno it's possible that no font has been set!
+    vcl::Font aFont(rFormat.GetBulletFont() ? *rFormat.GetBulletFont() : aTmpFont);
+    Size aTmpSize(rSize);
+    aTmpSize.setWidth( aTmpSize.Width() * ( rFormat.GetBulletRelSize()) );
+    aTmpSize.setWidth( aTmpSize.Width() / 100 ) ;
+    aTmpSize.setHeight( aTmpSize.Height() * ( rFormat.GetBulletRelSize()) );
+    aTmpSize.setHeight( aTmpSize.Height() / 100 ) ;
+    // in case of a height of zero it is drawn in original height
+    if(!aTmpSize.Height())
+        aTmpSize.setHeight( 1 );
+    aFont.SetFontSize(aTmpSize);
     aFont.SetTransparent(true);
-    pVDev->SetFont(aFont);
+    Color aBulletColor = rFormat.GetBulletColor();
+    if(aBulletColor == COL_AUTO)
+        aBulletColor = pVDev->GetFillColor().IsDark() ? COL_WHITE : COL_BLACK;
+    else if(aBulletColor == pVDev->GetFillColor())
+        aBulletColor.Invert();
+    aFont.SetColor(aBulletColor);
+    pVDev->SetFont( aFont );
     OUString aText(rFormat.GetBulletChar());
-    pVDev->DrawText(Point(nXStart, nYStart), aText);
-    const long nRet = pVDev->GetTextWidth(aText);
+    long nY = nYStart;
+    nY -= ((aTmpSize.Height() - rSize.Height())/ 2);
+    pVDev->DrawText( Point(nXStart, nY), aText );
+    long nRet = pVDev->GetTextWidth(aText);
 
     pVDev->SetFont(aTmpFont);
     return nRet;
commit 5ed02ae1d3437473d48e9b421e496216e4f3dd76
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Mar 12 12:57:20 2019 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed Mar 13 16:57:53 2019 +0100

    poppler: upgrade to release 0.74.0
    
    Fixes CVE-2019-7310.
    
    Add patch to fix CVE-2019-9200 too.
    
    CVE-2018-20662 looks irrelevant because we don't build pdfunite tool.
    
    Reviewed-on: https://gerrit.libreoffice.org/69094
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    (cherry picked from commit f9b354784faf65ecc8024cf6d7d7aaf589f6d91f)
    
    Change-Id: I5e7ddabbb341f6bfefb376d552b50c4006f41906
    Reviewed-on: https://gerrit.libreoffice.org/69119
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/download.lst b/download.lst
index e9941ccc1725..d1c494eddecf 100644
--- a/download.lst
+++ b/download.lst
@@ -206,8 +206,8 @@ export PIXMAN_SHA256SUM := 21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3
 export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz
 export LIBPNG_SHA256SUM := 2f1e960d92ce3b3abd03d06dfec9637dfbd22febf107a536b44f7a47c60659f6
 export LIBPNG_TARBALL := libpng-1.6.34.tar.xz
-export POPPLER_SHA256SUM := e44b5543903128884ba4538c2a97d3bcc8889e97ffacc4636112101f0238db03
-export POPPLER_TARBALL := poppler-0.73.0.tar.xz
+export POPPLER_SHA256SUM := 92e09fd3302567fd36146b36bb707db43ce436e8841219025a82ea9fb0076b2f
+export POPPLER_TARBALL := poppler-0.74.0.tar.xz
 export POSTGRESQL_SHA256SUM := db61d498105a7d5fe46185e67ac830c878cdd7dc1f82a87f06b842217924c461
 export POSTGRESQL_TARBALL := c0b4799ea9850eae3ead14f0a60e9418-postgresql-9.2.1.tar.bz2
 export PYTHON_SHA256SUM := f55cde04f521f273c7cba08912921cc5642cfc15ca7b22d5829f0aff4371155f
diff --git a/external/poppler/0001-ImageStream-getLine-fix-crash-on-broken-files.patch.1 b/external/poppler/0001-ImageStream-getLine-fix-crash-on-broken-files.patch.1
new file mode 100644
index 000000000000..b459a0a0bef7
--- /dev/null
+++ b/external/poppler/0001-ImageStream-getLine-fix-crash-on-broken-files.patch.1
@@ -0,0 +1,27 @@
+From f4136a6353162db249f63ddb0f20611622ab61b4 Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid at kde.org>
+Date: Wed, 27 Feb 2019 19:43:22 +0100
+Subject: [PATCH] ImageStream::getLine: fix crash on broken files
+
+Fixes #728
+---
+ poppler/Stream.cc | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/poppler/Stream.cc b/poppler/Stream.cc
+index 33537b0e..a41435ab 100644
+--- a/poppler/Stream.cc
++++ b/poppler/Stream.cc
+@@ -496,6 +496,9 @@ unsigned char *ImageStream::getLine() {
+   }
+  
+   int readChars = str->doGetChars(inputLineSize, inputLine);
++  if (unlikely(readChars == -1)) {
++      readChars = 0;
++  }
+   for ( ; readChars < inputLineSize; readChars++) inputLine[readChars] = EOF;
+   if (nBits == 1) {
+     unsigned char *p = inputLine;
+-- 
+2.20.1
+
diff --git a/external/poppler/UnpackedTarball_poppler.mk b/external/poppler/UnpackedTarball_poppler.mk
index 5b91e1628ba6..151fa5d0444f 100644
--- a/external/poppler/UnpackedTarball_poppler.mk
+++ b/external/poppler/UnpackedTarball_poppler.mk
@@ -14,6 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,poppler,$(POPPLER_TARBALL),,poppler
 $(eval $(call gb_UnpackedTarball_add_patches,poppler,\
 	external/poppler/poppler-config.patch.1 \
 	external/poppler/poppler-c++11.patch.1 \
+	external/poppler/0001-ImageStream-getLine-fix-crash-on-broken-files.patch.1 \
 ))
 
 # std::make_unique is only available in C++14
diff --git a/external/poppler/poppler-config.patch.1 b/external/poppler/poppler-config.patch.1
index e312573f1ff3..1c68806276f7 100644
--- a/external/poppler/poppler-config.patch.1
+++ b/external/poppler/poppler-config.patch.1
@@ -195,7 +195,7 @@ index 0fbd336a..451213f8 100644
 +#define PACKAGE_NAME "poppler"
 +
 +/* Define to the full name and version of this package. */
-+#define PACKAGE_STRING "poppler 0.73.0"
++#define PACKAGE_STRING "poppler 0.74.0"
 +
 +/* Define to the one symbol short name of this package. */
 +#define PACKAGE_TARNAME "poppler"
@@ -204,7 +204,7 @@ index 0fbd336a..451213f8 100644
 +#define PACKAGE_URL ""
 +
 +/* Define to the version of this package. */
-+#define PACKAGE_VERSION "0.73.0"
++#define PACKAGE_VERSION "0.74.0"
 +
 +/* Poppler data dir */
 +#define POPPLER_DATADIR "/usr/local/share/poppler"
@@ -228,7 +228,7 @@ index 0fbd336a..451213f8 100644
 +/* #undef USE_FLOAT */
 +
 +/* Version number of package */
-+#define VERSION "0.73.0"
++#define VERSION "0.74.0"
 +
 +#if defined(__APPLE__)
 +#elif defined (_WIN32)
@@ -304,7 +304,7 @@ index 0fbd336a..451213f8 100644
 +
 +/* Defines the poppler version. */
 +#ifndef POPPLER_VERSION
-+#define POPPLER_VERSION "0.73.0"
++#define POPPLER_VERSION "0.74.0"
 +#endif
 +
 +/* Enable multithreading support. */
@@ -466,9 +466,9 @@ index 0fbd336a..451213f8 100644
 +
 +#include "poppler-global.h"
 +
-+#define POPPLER_VERSION "0.73.0"
++#define POPPLER_VERSION "0.74.0"
 +#define POPPLER_VERSION_MAJOR 0
-+#define POPPLER_VERSION_MINOR 73
++#define POPPLER_VERSION_MINOR 74
 +#define POPPLER_VERSION_MICRO 0
 +
 +namespace poppler
commit f053400c3f8c89ae122387dc64c63d2cfba86bbb
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Mar 6 12:03:32 2019 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Tue Mar 12 04:15:07 2019 +0100

    tdf#116195 sw: remove DisableOffPagePositioning handling from ODF import
    
    SwXMLImport::SetConfigurationSettings() needs to handle only those
    settings for which the default is different vs. old OOo/LO versions;
    DisableOffPagePositioning however defaults to false, so we can just rely
    on that default.  The inverted bDisableOffPagePositioning check is
    wrong.
    
    (regression from fe3d5766fa3c42f6cf8d1ea47af820e0b1c1cf48)
    
    Change-Id: I300fa597f58b586b49089bb555a00a6923862abe
    Reviewed-on: https://gerrit.libreoffice.org/68801
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    (cherry picked from commit 8f3df3a5a1570eea4d931f737c474df8601377ec)
    Reviewed-on: https://gerrit.libreoffice.org/69037
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index d838a8adb8a6..1f4d243f6c93 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1358,7 +1358,6 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
     aExcludeWhenNotLoadingUserSettings.insert("TabOverMargin");
     aExcludeWhenNotLoadingUserSettings.insert("PropLineSpacingShrinksFirstLine");
     aExcludeWhenNotLoadingUserSettings.insert("SubtractFlysAnchoredAtFlys");
-    aExcludeWhenNotLoadingUserSettings.insert("DisableOffPagePositioning");
 
     sal_Int32 nCount = aConfigProps.getLength();
     const PropertyValue* pValues = aConfigProps.getConstArray();
@@ -1392,7 +1391,6 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
     bool bTabOverMargin = false;
     bool bPropLineSpacingShrinksFirstLine = false;
     bool bSubtractFlysAnchoredAtFlys = false;
-    bool bDisableOffPagePositioning = false;
     bool bCollapseEmptyCellPara = false;
 
     const PropertyValue* currentDatabaseDataSource = nullptr;
@@ -1486,8 +1484,6 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
                     bPropLineSpacingShrinksFirstLine = true;
                 else if (pValues->Name == "SubtractFlysAnchoredAtFlys")
                     bSubtractFlysAnchoredAtFlys = true;
-                else if (pValues->Name == "DisableOffPagePositioning")
-                    bDisableOffPagePositioning = true;
                 else if (pValues->Name == "CollapseEmptyCellPara")
                     bCollapseEmptyCellPara = true;
             }
@@ -1650,9 +1646,6 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
     if (!bSubtractFlysAnchoredAtFlys)
         xProps->setPropertyValue("SubtractFlysAnchoredAtFlys", makeAny(true));
 
-    if ( bDisableOffPagePositioning )
-        xProps->setPropertyValue("DisableOffPagePositioning", makeAny(true));
-
     if (!bCollapseEmptyCellPara)
         xProps->setPropertyValue("CollapseEmptyCellPara", makeAny(false));
 
commit 4be972520e040ab3403645a7e266ce7316dbe38a
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Mon Mar 4 17:15:34 2019 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon Mar 11 12:15:50 2019 +0100

    tdf#123772 Add test
    
    Reviewed-on: https://gerrit.libreoffice.org/68701
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit 9c2cf30333a3d1434c4184ed7a1e824c9fa3abb5)
    
    Change-Id: Id46bf2b293c4465f5c58f503c75904639d59f168
    Reviewed-on: https://gerrit.libreoffice.org/68900
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/toolkit/CppunitTest_toolkit.mk b/toolkit/CppunitTest_toolkit.mk
index c2c804b38a31..5afa7a616188 100644
--- a/toolkit/CppunitTest_toolkit.mk
+++ b/toolkit/CppunitTest_toolkit.mk
@@ -10,6 +10,7 @@
 $(eval $(call gb_CppunitTest_CppunitTest,toolkit))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,toolkit, \
+	toolkit/qa/cppunit/Dialog \
 	toolkit/qa/cppunit/UnitConversion \
 ))
 
@@ -32,6 +33,10 @@ $(eval $(call gb_CppunitTest_use_api,toolkit,\
 	udkapi \
 ))
 
+$(eval $(call gb_CppunitTest_use_externals,toolkit,\
+    boost_headers \
+))
+
 $(eval $(call gb_CppunitTest_use_ure,toolkit))
 
 $(eval $(call gb_CppunitTest_use_configuration,toolkit))
diff --git a/toolkit/qa/cppunit/Dialog.cxx b/toolkit/qa/cppunit/Dialog.cxx
new file mode 100644
index 000000000000..7689b886c333
--- /dev/null
+++ b/toolkit/qa/cppunit/Dialog.cxx
@@ -0,0 +1,82 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <cppuhelper/implbase.hxx>
+#include <test/bootstrapfixture.hxx>
+#include <unotest/macros_test.hxx>
+
+#include <com/sun/star/awt/UnoControlDialog.hpp>
+#include <com/sun/star/awt/XUnoControlDialog.hpp>
+#include <com/sun/star/awt/XControlModel.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
+#include <com/sun/star/lang/XMultiComponentFactory.hpp>
+
+#include <comphelper/processfactory.hxx>
+#include <toolkit/awt/vclxwindow.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+#include <vcl/vclptr.hxx>
+#include <vcl/window.hxx>
+
+using namespace css;
+
+namespace
+{
+/// Test dialogs constructed via UNO
+class DialogTest : public test::BootstrapFixture, public unotest::MacrosTest
+{
+protected:
+    uno::Reference<uno::XComponentContext> mxContext;
+
+public:
+    void testDialogSizeable();
+    virtual void setUp() override;
+
+    CPPUNIT_TEST_SUITE(DialogTest);
+    CPPUNIT_TEST(testDialogSizeable);
+    CPPUNIT_TEST_SUITE_END();
+};
+
+void DialogTest::setUp()
+{
+    test::BootstrapFixture::setUp();
+
+    mxContext.set(comphelper::getComponentContext(getMultiServiceFactory()));
+}
+
+void DialogTest::testDialogSizeable()
+{
+    uno::Reference<awt::XDialog> xDialog;
+    uno::Reference<lang::XMultiComponentFactory> xFactory(mxContext->getServiceManager(),
+                                                          uno::UNO_QUERY_THROW);
+    uno::Reference<awt::XControlModel> xControlModel(
+        xFactory->createInstanceWithContext("com.sun.star.awt.UnoControlDialogModel", mxContext),
+        uno::UNO_QUERY_THROW);
+
+    uno::Reference<beans::XPropertySet> xPropSet(xControlModel, uno::UNO_QUERY_THROW);
+    xPropSet->setPropertyValue("Sizeable", uno::Any(true));
+
+    uno::Reference<awt::XUnoControlDialog> xControl = awt::UnoControlDialog::create(mxContext);
+    xControl->setModel(xControlModel);
+    uno::Reference<awt::XWindow> xWindow(xControl, uno::UNO_QUERY);
+    xWindow->setVisible(true);
+    xDialog.set(xControl, uno::UNO_QUERY_THROW);
+    xDialog->execute();
+
+    VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(xControl->getPeer());
+    CPPUNIT_ASSERT(pWindow);
+    CPPUNIT_ASSERT(pWindow->GetStyle() & WB_SIZEABLE);
+
+    xDialog->endExecute();
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(DialogTest);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 983a20bd8888fbd51675e32946bb0c73a2a40ea4
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Mon Mar 4 09:38:02 2019 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Sun Mar 10 01:22:33 2019 +0100

    Check svg URLs before exporting
    
    Reviewed-on: https://gerrit.libreoffice.org/68668
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit 34ec46571701d639d9bc542b2d19f87a21a83648)
    
    Change-Id: I3b86b6b82318b0d201c3d7db516664520eb47bed
    Reviewed-on: https://gerrit.libreoffice.org/68733
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 16d43eb24eb3..822d50be0e4a 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -46,6 +46,7 @@
 #include <comphelper/sequenceashashmap.hxx>
 #include <i18nlangtag/lang.h>
 #include <svl/zforlist.hxx>
+#include <tools/urlobj.hxx>
 #include <unotools/ucbstreamhelper.hxx>
 #include <xmloff/unointerfacetouniqueidentifiermapper.hxx>
 #include <xmloff/nmspmap.hxx>
@@ -1809,13 +1810,18 @@ bool SVGFilter::implExportShape( const Reference< css::drawing::XShape >& rxShap
 
                         if( !aBookmark.isEmpty() )
                         {
-                            mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xlink:href", aBookmark);
-                            SvXMLElementExport alinkA( *mpSVGExport, XML_NAMESPACE_NONE, "a", true, true );
-                            mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf,
-                                                        0xffffffff,
-                                                        pElementId,
-                                                        &rxShape,
-                                                        pEmbeddedBitmapsMtf );
+                            INetURLObject aINetURLObject(aBookmark);
+                            if (!aINetURLObject.HasError()
+                                && aINetURLObject.GetProtocol() != INetProtocol::Javascript)
+                            {
+                                mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xlink:href", aBookmark);
+                                SvXMLElementExport alinkA( *mpSVGExport, XML_NAMESPACE_NONE, "a", true, true );
+                                mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf,
+                                                            0xffffffff,
+                                                            pElementId,
+                                                            &rxShape,
+                                                            pEmbeddedBitmapsMtf );
+                            }
                         }
                         else
                         {
diff --git a/sd/qa/unit/SVGExportTests.cxx b/sd/qa/unit/SVGExportTests.cxx
index 9afc5cb42a01..8c55bf45d48b 100644
--- a/sd/qa/unit/SVGExportTests.cxx
+++ b/sd/qa/unit/SVGExportTests.cxx
@@ -110,8 +110,23 @@ public:
         assertXPath(svgDoc, MAKE_PATH_STRING( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_G[2]/SVG_G/SVG_TEXT/SVG_TSPAN ), "text-decoration", "line-through");
     }
 
+    void testSVGExportJavascriptURL()
+    {
+        executeExport("textbox-link-javascript.odp");
+
+        xmlDocPtr svgDoc = parseXml(maTempFile);
+        CPPUNIT_ASSERT(svgDoc);
+
+        // There should be only one child (no link to javascript url)
+        assertXPathChildren(svgDoc,
+                            MAKE_PATH_STRING(/ SVG_SVG / SVG_G[2] / SVG_G / SVG_G / SVG_G / SVG_G
+                                             / SVG_G[3] / SVG_G),
+                            1);
+    }
+
     CPPUNIT_TEST_SUITE(SdSVGFilterTest);
     CPPUNIT_TEST(testSVGExportTextDecorations);
+    CPPUNIT_TEST(testSVGExportJavascriptURL);
     CPPUNIT_TEST_SUITE_END();
 };
 
diff --git a/sd/qa/unit/data/odp/textbox-link-javascript.odp b/sd/qa/unit/data/odp/textbox-link-javascript.odp
new file mode 100644
index 000000000000..c046cf0c7de5
Binary files /dev/null and b/sd/qa/unit/data/odp/textbox-link-javascript.odp differ
commit d4c6057486f9667e82d7d4810bb2d421071b0eb2
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Wed Mar 6 22:01:15 2019 +0100
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Fri Mar 8 10:54:36 2019 +0100

    tdf#121686: fix assert in SvxAutoCorrect::FnChgToEnEmDash (editeng)
    
    See https://bugs.documentfoundation.org/attachment.cgi?id=149773
    
    Change-Id: I1696984a8df1b38a359a8177a5f3670526d2696e
    Reviewed-on: https://gerrit.libreoffice.org/68832
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    (cherry picked from commit 67d170868401335434772f1be23d565d23c1fbea)
    Reviewed-on: https://gerrit.libreoffice.org/68882

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index b890b5cd0984..737225d31615 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -542,7 +542,8 @@ bool SvxAutoCorrect::FnChgToEnEmDash(
         sal_Unicode cCh = rTxt[ nSttPos ];
         if( '-' == cCh )
         {
-            if( ' ' == rTxt[ nSttPos-1 ] &&
+            if( 1 < nEndPos - nSttPos &&
+                ' ' == rTxt[ nSttPos-1 ] &&
                 '-' == rTxt[ nSttPos+1 ])
             {
                 sal_Int32 n;
commit 0c0cdc8e3fa4566e8f2aee77a584b4ee43faaa2d
Author:     Bartosz Kosiorek <gang65 at poczta.onet.pl>
AuthorDate: Mon Mar 4 23:46:52 2019 +0100
Commit:     Bartosz Kosiorek <gang65 at poczta.onet.pl>
CommitDate: Thu Mar 7 21:25:21 2019 +0100

    tdf#123452 EMF Re-enable compression for image/x-emf files
    
    Change-Id: I9fd801d5eef6c65f8e68e30723415da7b493d767
    Reviewed-on: https://gerrit.libreoffice.org/68716
    Tested-by: Jenkins
    Reviewed-by: László Németh <nemeth at numbertext.org>
    (cherry picked from commit df22e97db5b7608b6d53b15b86b5a83610f9c87b)
    Reviewed-on: https://gerrit.libreoffice.org/68729
    Reviewed-by: Bartosz Kosiorek <gang65 at poczta.onet.pl>
    (cherry picked from commit 36f027769ea6aaabb5e993a321d7a56775d4bee1)
    Reviewed-on: https://gerrit.libreoffice.org/68730

diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 3ebb6730b928..ebcf2334a3b6 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -742,6 +742,7 @@ OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::X
             static const char* aCompressiblePics[] =
             {
                 "image/svg+xml",
+                "image/x-emf",
                 "image/x-wmf",
                 "image/tiff",
                 "image/x-eps",
commit a1ec611ea740e56949cf9f80179a90591d4f9dfc
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Tue Mar 5 13:47:10 2019 +0100
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Wed Mar 6 12:32:12 2019 +0100

    tdf#123829 Respect CollapseEmptyCellPara setting when reading odf docs
    
    Commit 56b2cf0c10d9caa01ebae1d80465e342d046a85c introduced a "feature"
    which would hide an empty line after a table and only make it visible
    when the cursor is in it.
    
    So when loading an ODF doc, only enable this feature for which have the
    CollapseEmptyCellPara setting set.
    
    Change-Id: Ib4dfbbe8d45eb57547c51c7eee2f81331fc5300e
    Reviewed-on: https://gerrit.libreoffice.org/68742
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit 0d2da0acfaa610c690bce552c0ed5df62d4c35cb)
    Reviewed-on: https://gerrit.libreoffice.org/68790
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/sw/qa/extras/odfimport/data/tdf123829.odt b/sw/qa/extras/odfimport/data/tdf123829.odt
new file mode 100644
index 000000000000..3219b4156182
Binary files /dev/null and b/sw/qa/extras/odfimport/data/tdf123829.odt differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 88f3564e3be3..9ee4f206f5a5 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -22,6 +22,7 @@
 #include <com/sun/star/text/PageNumberType.hpp>
 #include <com/sun/star/text/VertOrientation.hpp>
 
+#include <IDocumentSettingAccess.hxx>
 #include <wrtsh.hxx>
 #include <ndtxt.hxx>
 #include <swdtflvr.hxx>
@@ -915,5 +916,15 @@ DECLARE_ODFIMPORT_TEST(testTdf120677, "tdf120677.fodt")
     // The document used to hang the layout, consuming memory until OOM
 }
 
+DECLARE_ODFIMPORT_TEST(testTdf123829, "tdf123829.odt")
+{
+    SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+    CPPUNIT_ASSERT(pTextDoc);
+    SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+    CPPUNIT_ASSERT_EQUAL_MESSAGE(
+        "Compatibility: collapse cell paras should not be set", false,
+        pDoc->getIDocumentSettingAccess().get(DocumentSettingId::COLLAPSE_EMPTY_CELL_PARA));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index e88f90e2c621..d838a8adb8a6 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1393,6 +1393,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
     bool bPropLineSpacingShrinksFirstLine = false;
     bool bSubtractFlysAnchoredAtFlys = false;
     bool bDisableOffPagePositioning = false;
+    bool bCollapseEmptyCellPara = false;
 
     const PropertyValue* currentDatabaseDataSource = nullptr;
     const PropertyValue* currentDatabaseCommand = nullptr;
@@ -1487,6 +1488,8 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
                     bSubtractFlysAnchoredAtFlys = true;
                 else if (pValues->Name == "DisableOffPagePositioning")
                     bDisableOffPagePositioning = true;
+                else if (pValues->Name == "CollapseEmptyCellPara")
+                    bCollapseEmptyCellPara = true;
             }
             catch( Exception& )
             {
@@ -1650,6 +1653,9 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
     if ( bDisableOffPagePositioning )
         xProps->setPropertyValue("DisableOffPagePositioning", makeAny(true));
 
+    if (!bCollapseEmptyCellPara)
+        xProps->setPropertyValue("CollapseEmptyCellPara", makeAny(false));
+
     SwDoc *pDoc = getDoc();
     SfxPrinter *pPrinter = pDoc->getIDocumentDeviceAccess().getPrinter( false );
     if( pPrinter )
commit cd376726cc8dad65d246493fee233c8018123bf1
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Mar 5 13:25:16 2019 +0000
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Wed Mar 6 11:31:36 2019 +0100

    Resolves: tdf#123815 null terminator included in string
    
    regression from...
    
    commit 18d636063fd7be165e7888af49372a6e2b851776
    Author: Caolán McNamara <caolanm at redhat.com>
    Date:   Mon Jun 19 09:46:31 2017 +0100
    
        ofz: use OString instead of bare char*
    
    this is no use to the reporter though, as the document format is
    10 and 11 is the oldest the filter will open
    
    Change-Id: I4cdfe92e37f047493a6eab95f0e8e9f5dced1a35
    Reviewed-on: https://gerrit.libreoffice.org/68747
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/lotuswordpro/source/filter/tocread.cxx b/lotuswordpro/source/filter/tocread.cxx
index e6af6f42e8f1..b64eec71676f 100644
--- a/lotuswordpro/source/filter/tocread.cxx
+++ b/lotuswordpro/source/filter/tocread.cxx
@@ -296,7 +296,9 @@ CBenTOCReader::ReadTOC()
                         return Err;
                     }
 
-                    OString sName(sBuffer, Length);
+                    OString sName;
+                    if (Length)
+                        sName = OString(sBuffer, Length - 1);
 
                     CUtListElmt * pPrevNamedObjectListElmt;
                     if (FindNamedObject(&cpContainer->GetNamedObjects(),
commit a02a160c8d5a70b30128c0880ba8853d0dbe0e7c
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Fri Feb 22 17:12:04 2019 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Mon Mar 4 19:11:51 2019 +0100

    Related: tdf#117761 oox smartart: backport fixes related to picture strip
    
    This is a combination of 7 commits.
    
    This is the 1st commit:
    
    oox smartart, picture strip: handle bitmap fill of pres nodes
    
    There were two problems here:
    
    1) We did not import bitmap fill from presentation nodes.
    
    2) Presentation nodes contained properties with reference semantics, so
    if you set a bitmap fill for a first and a second shape, then at the end
    both shapes contained the second bitmap.
    
    With this, both bitmaps are imported exactly once.
    
    (cherry picked from commit 333e9ea15bb57cf1c87ac2ea150de1e3fd79cfcb)
    
    This is the commit #2:
    
    oox smartart, picture strip: fetch # of children only once in snake algo
    
    No functional changes intended.
    
    (cherry picked from commit 90372d52fdcc378473b89f4e6f2de0e206c110ef)
    
    This is the commit #3:
    
    oox smartart, picture strip: expose aspect ratio of children for snake algo
    
    The aspect ratio request of the Shape is not yet used in
    AlgAtom::layoutShape(), though.
    
    The heavy-lifting is needed, because the number of cols/rows in the
    snake algorithm depends on the aspect ratio request from the child
    algorithm, so need to transfer the aspect ratio from child algorithm ->
    layout node -> shape -> parent algorithm.
    
    Still no functional changes intended.
    
    (cherry picked from commit a1e10b7968fbf4dba962349be8a6dfb0cb1d3176)
    
    This is the commit #4:
    
    oox smartart, picture strip: fix too many columns with aspect ratio request
    
    The bugdoc has 3 items in the picture strip and PowerPoint laid this out
    as a single column with 3 rows (as a snake algorithm). We used to put
    the first two items to the first row and the third item to the second
    row.
    
    Improve out layout by taking into account what aspect ratio the child
    algorithms request: this way it's obvious that we should use a single
    column in case we have a large enough aspect ratio and few enough items.
    
    (PowerPoint also uses multiple columns without the aspect ratio
    request.)
    
    (cherry picked from commit 159e33ec661b2ce038b2642b2f30600ce7901d1b)
    
    This is the commit #5:
    
    oox smartart, picture strip: fix lack of spacing around the picture list
    
    The snake algorithm in PowerPoint seem to interpret spacing as follows:
    if you have N elements, then there should be the requested amount of
    spacing between the elements, and also double amount of spacing around
    the actual list of elements.
    
    With this, the SmartArt and the title shape in the bugdoc no longer
    overlaps.
    
    (cherry picked from commit 0a29c928afa74123bca05dc089c751603d368467)
    
    This is the commit #6:
    
    oox smartart, picture strip: fix lack of margin in text shapes
    
    Shape text has two kind of spacing inside the shape's bounding box: the
    shape-level margin and the paragraph-level one. Only the second was
    handled in the tx algorithm so far, add support for the first.
    
    The margins taken from constraints were way large by default: the only
    explanation I found for that is that SmartArt layout sometimes
    calculates in MMs, sometimes in Points, and the ratio between the two is
    exactly the Impress / PowerPoint margin. So assume that indeed that unit
    difference is the reason for the smaller in-PowerPoint margin values and
    do the same on our side.
    
    (cherry picked from commit 279c7f83a57c4d3991930ee80e9d9c287c21270a)
    
    This is the commit #7:
    
    oox smartart, picture strip: fix too wide child shapes
    
    Once the constraints determine the size, the aspect ratio may shrink one
    dimension to achieve the requested ratio. Implement the case where a >1
    ratio shrinks the width, so the container of the image-text shape pair
    has correct aspect ratio.
    
    (cherry picked from commit f4fbb127897ea6afe27055d3b6cfcb0441080902)
    
    Change-Id: I7bac764c031e80bac532c4f97ebd5b5096401096
    Reviewed-on: https://gerrit.libreoffice.org/68687
    Tested-by: Jenkins
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/include/oox/drawingml/drawingmltypes.hxx b/include/oox/drawingml/drawingmltypes.hxx
index c4f05fcdd84e..2abe05767d6a 100644
--- a/include/oox/drawingml/drawingmltypes.hxx
+++ b/include/oox/drawingml/drawingmltypes.hxx
@@ -190,6 +190,13 @@ inline float convertEmuToPoints( sal_Int64 nValue )
     return static_cast<float>(nValue) / EMU_PER_PT;
 }
 
+/** Converts the passed double value from points to mm. */
+inline double convertPointToMms(double fValue)
+{
+    constexpr double fFactor = static_cast<double>(EMU_PER_PT) / (EMU_PER_HMM * 100);
+    return fValue * fFactor;
+}
+
 /** A structure for a point with 64-bit integer components. */
 struct EmuPoint
 {
diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx
index 4a571213a090..40a80ae113dc 100644
--- a/include/oox/drawingml/shape.hxx
+++ b/include/oox/drawingml/shape.hxx
@@ -226,6 +226,13 @@ public:
 
     sal_Int32 getDataNodeType() const { return mnDataNodeType; }
 
+    void setAspectRatio(double fAspectRatio) { mfAspectRatio = fAspectRatio; }
+
+    double getAspectRatio() const { return mfAspectRatio; }
+
+    /// Changes reference semantics to value semantics for fill properties.
+    void cloneFillProperties();
+
 protected:
 
     css::uno::Reference< css::drawing::XShape > const &
@@ -348,6 +355,9 @@ private:
 
     /// Type of data node for an in-diagram shape.
     sal_Int32 mnDataNodeType = 0;
+
+    /// Aspect ratio for an in-diagram shape.
+    double mfAspectRatio = 0;
 };
 
 } }
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 09edf0022259..247b99d0baad 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -65,6 +65,24 @@ bool isFontUnit(sal_Int32 nUnit)
     return nUnit == oox::XML_primFontSz || nUnit == oox::XML_secFontSz;
 }
 
+/// Determines which UNO property should be set for a given constraint type.
+sal_Int32 getPropertyFromConstraint(sal_Int32 nConstraint)
+{
+    switch (nConstraint)
+    {
+        case oox::XML_lMarg:
+            return oox::PROP_TextLeftDistance;
+        case oox::XML_rMarg:
+            return oox::PROP_TextRightDistance;
+        case oox::XML_tMarg:
+            return oox::PROP_TextUpperDistance;
+        case oox::XML_bMarg:
+            return oox::PROP_TextLowerDistance;
+    }
+
+    return 0;
+}
+
 /// Determines the connector shape type from a linear alg.
 sal_Int32 getConnectorType(const oox::drawingml::LayoutNode* pNode)
 {

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list