[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-5-0' - 43 commits - basegfx/source basic/source download.lst drawinglayer/source embeddedobj/source external/expat external/lcms2 external/libxml2 framework/source i18npool/qa i18npool/source icon-themes/galaxy include/basegfx include/drawinglayer instsetoo_native/inc_common instsetoo_native/util lotuswordpro/qa lotuswordpro/source officecfg/registry postprocess/CustomTarget_registry.mk sfx2/source starmath/source svgio/source svtools/source svx/source sw/inc sw/qa sw/source vcl/inc vcl/Library_vclplug_kde4.mk vcl/unx vcl/win wizards/com writerfilter/qa writerfilter/source xmloff/source

Katarina Behrens Katarina.Behrens at cib.de
Tue Sep 27 00:34:36 UTC 2016


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

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

diff --git a/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp b/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp
index e267d49..471eea4 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 b824ddf..2703670 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 d62d3c89b94bb69f4680732b8f69f2016d5f14ba
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Tue Feb 9 11:09:30 2016 +0100

    Branded application icons
    
    sadly, this doesn't replace Windows taskbar icon, that must be living somewhere
    else. It works on Linux though.
    
    Change-Id: I028fc68d96f02113622c5e1ec3ed830ac797be0b

diff --git a/icon-themes/galaxy/res/main128.png b/icon-themes/galaxy/res/main128.png
index 21fc555..818b733 100644
Binary files a/icon-themes/galaxy/res/main128.png and b/icon-themes/galaxy/res/main128.png differ
diff --git a/icon-themes/galaxy/res/mainapp_16.png b/icon-themes/galaxy/res/mainapp_16.png
index 7f43996..13945ee 100644
Binary files a/icon-themes/galaxy/res/mainapp_16.png and b/icon-themes/galaxy/res/mainapp_16.png differ
diff --git a/icon-themes/galaxy/res/mainapp_16_8.png b/icon-themes/galaxy/res/mainapp_16_8.png
index 7f43996..13945ee 100644
Binary files a/icon-themes/galaxy/res/mainapp_16_8.png and b/icon-themes/galaxy/res/mainapp_16_8.png differ
diff --git a/icon-themes/galaxy/res/mainapp_32.png b/icon-themes/galaxy/res/mainapp_32.png
index af9d79a..c653935 100644
Binary files a/icon-themes/galaxy/res/mainapp_32.png and b/icon-themes/galaxy/res/mainapp_32.png differ
diff --git a/icon-themes/galaxy/res/mainapp_32_8.png b/icon-themes/galaxy/res/mainapp_32_8.png
index af9d79a..c653935 100644
Binary files a/icon-themes/galaxy/res/mainapp_32_8.png and b/icon-themes/galaxy/res/mainapp_32_8.png differ
diff --git a/icon-themes/galaxy/res/mainapp_48_8.png b/icon-themes/galaxy/res/mainapp_48_8.png
index 394fce0..562ea23 100644
Binary files a/icon-themes/galaxy/res/mainapp_48_8.png and b/icon-themes/galaxy/res/mainapp_48_8.png differ
commit d90157d7c02b255ce0aabc18bf342b5dc1ab0543
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Tue Feb 9 10:38:29 2016 +0100

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

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 7ff0da2..eb84bd4 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -440,8 +440,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
         case SID_SEND_FEEDBACK:
         {
             OUString module = SfxHelp::GetCurrentModuleIdentifier();
-            OUString sURL("http://hub.libreoffice.org/send-feedback/?LOversion=" + utl::ConfigManager::getAboutBoxProductVersion() +
-                "&LOlocale=" + utl::ConfigManager::getLocale() + "&LOmodule=" + module.copy(module.lastIndexOf('.') + 1 )  );
+            OUString sURL("http://libreoffice.cib.de/support");
             try
             {
                 uno::Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute(
commit dd93ff412937a6fb940b01f20c66deddb7ab9510
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Tue Feb 9 10:00:30 2016 +0100

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

diff --git a/instsetoo_native/util/openoffice.lst.in b/instsetoo_native/util/openoffice.lst.in
index 8cf38a2..dc6107c 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 http://extensions.libreoffice.org/
-            STARTCENTER_INFO_URL https://www.libreoffice.org/
+            STARTCENTER_INFO_URL http://libreoffice.cib.de/
             STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
             DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
             STARTCENTER_HIDE_EXTERNAL_LINKS 0
@@ -122,7 +122,7 @@ LibreOffice_Dev
             CODEFILENAME codes_ooodev.txt
             LOCALUSERDIR $ORIGIN/..
             STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/
-            STARTCENTER_INFO_URL https://www.libreoffice.org/
+            STARTCENTER_INFO_URL http://libreoffice.cib.de/
             STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
             DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
             STARTCENTER_HIDE_EXTERNAL_LINKS 0
@@ -164,7 +164,7 @@ LibreOffice_SDK
             CHANGETARGETDIR 1
             DONTUSESTARTMENUFOLDER 1
             STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/
-            STARTCENTER_INFO_URL https://www.libreoffice.org/
+            STARTCENTER_INFO_URL http://libreoffice.cib.de/
             STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
             DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
             STARTCENTER_HIDE_EXTERNAL_LINKS 0
@@ -210,7 +210,7 @@ LibreOffice_Dev_SDK
             CHANGETARGETDIR 1
             DONTUSESTARTMENUFOLDER 1
             STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/
-            STARTCENTER_INFO_URL https://www.libreoffice.org/
+            STARTCENTER_INFO_URL http://libreoffice.cib.de/
             STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
             DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
             STARTCENTER_HIDE_EXTERNAL_LINKS 0
diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk
index 2502011..5de7947 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -563,7 +563,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' \
 
diff --git a/svtools/source/misc/langhelp.cxx b/svtools/source/misc/langhelp.cxx
index 16a3a1d..24b066a 100644
--- a/svtools/source/misc/langhelp.cxx
+++ b/svtools/source/misc/langhelp.cxx
@@ -16,6 +16,7 @@
 
 void localizeWebserviceURI( OUString& rURI )
 {
+    const OUString aPrefix = "?lang=";
     OUString aLang = Application::GetSettings().GetUILanguageTag().getLanguage();
     if ( aLang.equalsIgnoreAsciiCase("pt")
          && Application::GetSettings().GetUILanguageTag().getCountry().equalsIgnoreAsciiCase("br") )
@@ -30,6 +31,7 @@ void localizeWebserviceURI( OUString& rURI )
             aLang = "zh-tw";
     }
 
+    rURI += aPrefix;
     rURI += aLang;
 }
 
commit ce75982a12ea00d35af36777733e0758e0117f1b
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Mon Sep 21 13:47:57 2015 +0200

    CIB branding for start center
    
    Change-Id: I9887fded72131c7888d6e1b1165a778c8da2952d

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

    Added changes for KDE4
    
    Change-Id: I5941fa97848fa3b0129d01c2b6f554f5b8c4019f

diff --git a/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx b/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx
index dc00487..744987e 100644
--- a/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx
@@ -84,7 +84,7 @@ namespace drawinglayer
             virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
 
             /// overload to react on evtl. buffered content
-            virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+            virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
 
             /// provide unique ID
             DeclPrimitive2DIDBlock()
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 00819be..bdff533 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -748,7 +748,7 @@ public:
     }
 
 private:
-    virtual void doWork() override
+    virtual void doWork() SAL_OVERRIDE
     {
         try
         {
diff --git a/vcl/Library_vclplug_kde4.mk b/vcl/Library_vclplug_kde4.mk
index 645d6c9..099b39b 100644
--- a/vcl/Library_vclplug_kde4.mk
+++ b/vcl/Library_vclplug_kde4.mk
@@ -55,6 +55,7 @@ $(eval $(call gb_Library_use_externals,vclplug_kde4,\
 	icuuc \
 	kde4 \
 	glew \
+	cairo \
 ))
 
 $(eval $(call gb_Library_add_libs,vclplug_kde4,\
commit 68427a581a12d0b4d00399be443b59400a0c0df3
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date:   Fri Jul 8 18:01:21 2016 +0200

    Adaptions for Linux build, mostly Cairo
    
    Change-Id: I7721308f6af5d9e3af7dfe7787f6234b0c1eeeb2

diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index a21fe78..dfab461 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -27,6 +27,11 @@
 #include <vcl/salgtype.hxx>
 #include <vcl/vclenum.hxx>
 #include <vcl/metric.hxx>
+#include <config_cairo_canvas.h>
+
+#if ENABLE_CAIRO_CANVAS
+#include <cairo.h>
+#endif // ENABLE_CAIRO_CANVAS
 
 #include "salgdi.hxx"
 #include "salgeom.hxx"
@@ -297,6 +302,11 @@ public:
      */
     void                            YieldGraphicsExpose();
 
+#if ENABLE_CAIRO_CANVAS
+    cairo_t* getCairoContext();
+    static void releaseCairoContext(cairo_t* cr);
+#endif // ENABLE_CAIRO_CANVAS
+
     // do XCopyArea or XGet/PutImage depending on screen numbers
     // signature is like XCopyArea with screen numbers added
     static void                     CopyScreenArea(
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index 522c354..13697fa 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -66,6 +66,10 @@
 #include "cairo_cairo.hxx"
 #include "cairo_xlib_cairo.hxx"
 
+#if ENABLE_CAIRO_CANVAS
+#include "cairo-xlib.h"
+#endif
+
 #include <vcl/opengl/OpenGLHelper.hxx>
 
 X11SalGraphics::X11SalGraphics():
@@ -711,16 +715,18 @@ bool X11SalGraphics::drawPolyLine(
 
         switch(eLineJoin)
         {
-            case basegfx::B2DLineJoin::Bevel:
+            case basegfx::B2DLineJoin::B2DLINEJOIN_BEVEL:
                 eCairoLineJoin = CAIRO_LINE_JOIN_BEVEL;
                 break;
-            case basegfx::B2DLineJoin::Round:
+            case basegfx::B2DLineJoin::B2DLINEJOIN_ROUND:
                 eCairoLineJoin = CAIRO_LINE_JOIN_ROUND;
                 break;
-            case basegfx::B2DLineJoin::NONE:
+            case basegfx::B2DLineJoin::B2DLINEJOIN_MIDDLE:
+            case basegfx::B2DLineJoin::B2DLINEJOIN_NONE:
+                eCairoLineJoin = CAIRO_LINE_JOIN_MITER;
                 bNoJoin = true;
-                SAL_FALLTHROUGH;
-            case basegfx::B2DLineJoin::Miter:
+                break;
+            case basegfx::B2DLineJoin::B2DLINEJOIN_MITER:
                 eCairoLineJoin = CAIRO_LINE_JOIN_MITER;
                 break;
         }
@@ -855,4 +861,22 @@ SalGeometryProvider *X11SalGraphics::GetGeometryProvider() const
         return static_cast< SalGeometryProvider * >(m_pVDev);
 }
 
+#if ENABLE_CAIRO_CANVAS
+cairo_t* X11SalGraphics::getCairoContext()
+{
+    cairo_surface_t* surface = cairo_xlib_surface_create(GetXDisplay(), hDrawable_,
+            GetVisual().visual, SAL_MAX_INT16, SAL_MAX_INT16);
+
+    cairo_t *cr = cairo_create(surface);
+    cairo_surface_destroy(surface);
+
+    return cr;
+}
+
+void X11SalGraphics::releaseCairoContext(cairo_t* cr)
+{
+   cairo_destroy(cr);
+}
+#endif // ENABLE_CAIRO_CANVAS
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit c7ee3b67a3b4c1e2ae9290a4dc8caed9ab41bd8d
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date:   Fri Jul 8 13:14:24 2016 +0200

    Adaptions for packport to libreoffice-5-0
    
    Change-Id: I36899154cacc334920b25fba39cc641d04600fbc

diff --git a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
index 225cb2f..e82a7c8 100644
--- a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
@@ -133,7 +133,7 @@ namespace drawinglayer
                 }
             }
 
-            if(aContent.empty())
+            if (0 == aContent.getLength())
             {
                 // buffering was not tried or did fail - reset remembered buffered size
                 // in any case
@@ -145,7 +145,7 @@ namespace drawinglayer
 
                 // check if content needs to be clipped
                 const basegfx::B2DRange aUnitRange(0.0, 0.0, 1.0, 1.0);
-                const basegfx::B2DRange aContentRange(getChildren().getB2DRange(rViewInformation));
+                const basegfx::B2DRange aContentRange(getB2DRangeFromPrimitive2DSequence(getChildren(), rViewInformation));
 
                 if(!aUnitRange.isInside(aContentRange))
                 {
@@ -309,7 +309,7 @@ namespace drawinglayer
                 PatternFillPrimitive2D* pThat = const_cast< PatternFillPrimitive2D* >(this);
                 pThat->mnDiscreteWidth = nW;
                 pThat->mnDiscreteHeight = nH;
-                pThat->setBuffered2DDecomposition(Primitive2DContainer());
+                pThat->setBuffered2DDecomposition(Primitive2DSequence());
             }
 
             // call parent
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index fc373da..0a01778 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -701,18 +701,6 @@ namespace svgio
                                 aDashArray = solveSvgNumberVector(getStrokeDasharray(), mrOwner);
                             }
 
-                            // convert svg:stroke-miterlimit to LineAttrute:mfMiterMinimumAngle
-                            // The default needs to be set explicitely, because svg default <> Draw default
-                            double fMiterMinimumAngle;
-                            if (getStrokeMiterLimit().isSet())
-                            {
-                                fMiterMinimumAngle = 2.0 * asin(1.0/getStrokeMiterLimit().getNumber());
-                            }
-                            else
-                            {
-                                fMiterMinimumAngle = 2.0 * asin(0.25); // 1.0/default 4.0
-                            }
-
                             // todo: Handle getStrokeDashOffset()
 
                             // prepare line attribute
@@ -720,8 +708,7 @@ namespace svgio
                                 pStroke ? *pStroke : basegfx::BColor(0.0, 0.0, 0.0),
                                 fStrokeWidth,
                                 aB2DLineJoin,
-                                aLineCap,
-                                fMiterMinimumAngle);
+                                aLineCap);
 
                             if(aDashArray.empty())
                             {
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
index 785cde7..2f34af1 100644
--- a/sw/inc/ndole.hxx
+++ b/sw/inc/ndole.hxx
@@ -43,7 +43,7 @@ class SW_DLLPUBLIC SwOLEObj
     OUString aName;
 
     // eventually buffered data if it is a chart OLE
-    drawinglayer::primitive2d::Primitive2DContainer     m_aPrimitive2DSequence;
+    drawinglayer::primitive2d::Primitive2DSequence      m_aPrimitive2DSequence;
     basegfx::B2DRange                                   m_aRange;
     class DeflateData*                                  m_pDeflateData;
 
@@ -71,7 +71,7 @@ public:
 
     // try to get OLE visualization in form of a Primitive2DSequence
     // and the corresponding B2DRange. This data may be locally buffered
-    drawinglayer::primitive2d::Primitive2DContainer tryToGetChartContentAsPrimitive2DSequence(
+    drawinglayer::primitive2d::Primitive2DSequence tryToGetChartContentAsPrimitive2DSequence(
         basegfx::B2DRange& rRange,
         bool bSynchron);
     void resetBufferedData();
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 6d6f394..bc3b330 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -999,12 +999,12 @@ void SwNoTextFrm::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfArea
         if(bIsChart)
         {
             basegfx::B2DRange aSourceRange;
-            const drawinglayer::primitive2d::Primitive2DContainer aSequence(
+            const drawinglayer::primitive2d::Primitive2DSequence aSequence(
                 pOLENd->GetOLEObj().tryToGetChartContentAsPrimitive2DSequence(
                     aSourceRange,
                     bPrn));
 
-            if(!aSequence.empty() && !aSourceRange.isEmpty())
+            if (0 != aSequence.getLength() && !aSourceRange.isEmpty())
             {
                 const basegfx::B2DRange aTargetRange(
                     aAlignedGrfArea.Left(), aAlignedGrfArea.Top(),
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 2538036..00819be 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -683,7 +683,7 @@ private:
     friend class SwOLEObj;
 
     uno::Reference< frame::XModel >                     maXModel;
-    drawinglayer::primitive2d::Primitive2DContainer     maPrimitive2DSequence;
+    drawinglayer::primitive2d::Primitive2DSequence      maPrimitive2DSequence;
     basegfx::B2DRange                                   maRange;
 
     // set from the WorkerThread when done
@@ -704,7 +704,7 @@ public:
     {
     }
 
-    const drawinglayer::primitive2d::Primitive2DContainer& getSequence() const
+    const drawinglayer::primitive2d::Primitive2DSequence& getSequence() const
     {
         return maPrimitive2DSequence;
     }
@@ -778,7 +778,7 @@ private:
 SwOLEObj::SwOLEObj( const svt::EmbeddedObjectRef& xObj ) :
     pOLENd( 0 ),
     pListener( 0 ),
-    xOLERef( xObj )
+    xOLERef( xObj ),
     m_aPrimitive2DSequence(),
     m_aRange(),
     m_pDeflateData(nullptr)
@@ -795,7 +795,7 @@ SwOLEObj::SwOLEObj( const svt::EmbeddedObjectRef& xObj ) :
 SwOLEObj::SwOLEObj( const OUString &rString, sal_Int64 nAspect ) :
     pOLENd( 0 ),
     pListener( 0 ),
-    aName( rString )
+    aName( rString ),
     m_aPrimitive2DSequence(),
     m_aRange(),
     m_pDeflateData(nullptr)
@@ -1053,7 +1053,7 @@ OUString SwOLEObj::GetDescription()
     return SW_RESSTR(STR_OLE);
 }
 
-drawinglayer::primitive2d::Primitive2DContainer SwOLEObj::tryToGetChartContentAsPrimitive2DSequence(
+drawinglayer::primitive2d::Primitive2DSequence SwOLEObj::tryToGetChartContentAsPrimitive2DSequence(
     basegfx::B2DRange& rRange,
     bool bSynchron)
 {
@@ -1076,7 +1076,7 @@ drawinglayer::primitive2d::Primitive2DContainer SwOLEObj::tryToGetChartContentAs
         }
     }
 
-    if(m_aPrimitive2DSequence.empty() && m_aRange.isEmpty() && xOLERef.is() && xOLERef.IsChart())
+    if (0 == m_aPrimitive2DSequence.getLength() && m_aRange.isEmpty() && xOLERef.is() && xOLERef.IsChart())
     {
         const uno::Reference< frame::XModel > aXModel(xOLERef->getComponent(), uno::UNO_QUERY);
 
@@ -1113,7 +1113,7 @@ drawinglayer::primitive2d::Primitive2DContainer SwOLEObj::tryToGetChartContentAs
         }
     }
 
-    if(!m_aPrimitive2DSequence.empty() && !m_aRange.isEmpty())
+    if (0 != m_aPrimitive2DSequence.getLength() && !m_aRange.isEmpty())
     {
         // when we have data, also copy the buffered Range data as output
         rRange = m_aRange;
@@ -1124,7 +1124,7 @@ drawinglayer::primitive2d::Primitive2DContainer SwOLEObj::tryToGetChartContentAs
 
 void SwOLEObj::resetBufferedData()
 {
-    m_aPrimitive2DSequence = drawinglayer::primitive2d::Primitive2DContainer();
+    m_aPrimitive2DSequence = drawinglayer::primitive2d::Primitive2DSequence();
     m_aRange.reset();
 
     if(m_pDeflateData)
diff --git a/vcl/win/source/gdi/gdiimpl.cxx b/vcl/win/source/gdi/gdiimpl.cxx
index 621b900..a36420c 100644
--- a/vcl/win/source/gdi/gdiimpl.cxx
+++ b/vcl/win/source/gdi/gdiimpl.cxx
@@ -1921,7 +1921,7 @@ bool WinSalGraphicsImpl::drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt
 }
 
 void impAddB2DPolygonToGDIPlusGraphicsPathReal(
-    Gdiplus::GpPath *pPath,
+    Gdiplus::GraphicsPath& rGraphicsPath,
     const basegfx::B2DPolygon& rPolygon,
     bool bNoLineJoin,
     const basegfx::B2DVector* pLineWidths)
@@ -1966,12 +1966,11 @@ void impAddB2DPolygonToGDIPlusGraphicsPathReal(
                         aCb = aNext + ((aCa - aNext) * 0.3);
                     }
 
-                    Gdiplus::DllExports::GdipAddPathBezier(
-                        pPath,
-                        aCurr.getX(), aCurr.getY(),
-                        aCa.getX(), aCa.getY(),
-                        aCb.getX(), aCb.getY(),
-                        aNext.getX(), aNext.getY());
+                    rGraphicsPath.AddBezier(
+                        static_cast< Gdiplus::REAL >(aCurr.getX()), static_cast< Gdiplus::REAL >(aCurr.getY()),
+                        static_cast< Gdiplus::REAL >(aCa.getX()), static_cast< Gdiplus::REAL >(aCa.getY()),
+                        static_cast< Gdiplus::REAL >(aCb.getX()), static_cast< Gdiplus::REAL >(aCb.getY()),
+                        static_cast< Gdiplus::REAL >(aNext.getX()), static_cast< Gdiplus::REAL >(aNext.getY()));
                 }
                 else
                 {
@@ -1983,25 +1982,22 @@ void impAddB2DPolygonToGDIPlusGraphicsPathReal(
                         // based on line width to have something relative to current metrics
                         if (!basegfx::fTools::equalZero(pLineWidths->getX()))
                         {
-                            Gdiplus::DllExports::GdipAddPathLine(
-                                pPath,
-                                aCurr.getX(), aCurr.getY(),
-                                aNext.getX() + (pLineWidths->getX() * 0.1), aNext.getY());
+                            rGraphicsPath.AddLine(
+                                static_cast< Gdiplus::REAL >(aCurr.getX()), static_cast< Gdiplus::REAL >(aCurr.getY()),
+                                static_cast< Gdiplus::REAL >(aNext.getX() + (pLineWidths->getX() * 0.1)), static_cast< Gdiplus::REAL >(aNext.getY()));
                         }
                         else
                         {
-                            Gdiplus::DllExports::GdipAddPathLine(
-                                pPath,
-                                aCurr.getX(), aCurr.getY(),
-                                aNext.getX(), aNext.getY() + (pLineWidths->getY() * 0.1));
+                            rGraphicsPath.AddLine(
+                                static_cast< Gdiplus::REAL >(aCurr.getX()), static_cast< Gdiplus::REAL >(aCurr.getY()),
+                                static_cast< Gdiplus::REAL >(aNext.getX()), static_cast< Gdiplus::REAL >(aNext.getY() + (pLineWidths->getY() * 0.1)));
                         }
                     }
                     else
                     {
-                        Gdiplus::DllExports::GdipAddPathLine(
-                            pPath,
-                            aCurr.getX(), aCurr.getY(),
-                            aNext.getX(), aNext.getY());
+                        rGraphicsPath.AddLine(
+                            static_cast< Gdiplus::REAL >(aCurr.getX()), static_cast< Gdiplus::REAL >(aCurr.getY()),
+                            static_cast< Gdiplus::REAL >(aNext.getX()), static_cast< Gdiplus::REAL >(aNext.getY()));
                     }
                 }
 
@@ -2011,7 +2007,7 @@ void impAddB2DPolygonToGDIPlusGraphicsPathReal(
 
                     if (bNoLineJoin)
                     {
-                        Gdiplus::DllExports::GdipStartPathFigure(pPath);
+                        rGraphicsPath.StartFigure();
                     }
                 }
             }
@@ -2039,8 +2035,8 @@ bool WinSalGraphicsImpl::drawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPol
                 aGraphicsPath.StartFigure();
             }
 
-            impAddB2DPolygonToGDIPlusGraphicsPathReal(pPath, rPolyPolygon.getB2DPolygon(a), false, 0);
-            Gdiplus::DllExports::GdipClosePathFigure(pPath);
+            impAddB2DPolygonToGDIPlusGraphicsPathReal(aGraphicsPath, rPolyPolygon.getB2DPolygon(a), false, 0);
+            aGraphicsPath.CloseFigure();
         }
 
         if (mrParent.getAntiAliasB2DDraw())
@@ -2098,60 +2094,60 @@ bool WinSalGraphicsImpl::drawPolyLine(
 
         switch (eLineJoin)
         {
-        case basegfx::B2DLineJoin::NONE:
-        {
-            if (basegfx::fTools::more(rLineWidths.getX(), 0.0))
+            case basegfx::B2DLineJoin::B2DLINEJOIN_NONE:
             {
-                bNoLineJoin = true;
+                if (basegfx::fTools::more(rLineWidths.getX(), 0.0))
+                {
+                    bNoLineJoin = true;
+                }
+                break;
+            }
+            case basegfx::B2DLineJoin::B2DLINEJOIN_BEVEL:
+            {
+                aPen.SetLineJoin(Gdiplus::LineJoinBevel);
+                break;
+            }
+            case basegfx::B2DLineJoin::B2DLINEJOIN_MITER:
+            {
+                const Gdiplus::REAL aMiterLimit(15.0);
+
+                aPen.SetMiterLimit(aMiterLimit);
+                // tdf#99165 MS's LineJoinMiter creates non standard conform miter additional
+                // graphics, somewhere clipped in some distance from the edge point, dependent
+                // of MiterLimit. The more default-like option is LineJoinMiterClipped, so use
+                // that instead
+                aPen.SetLineJoin(Gdiplus::LineJoinMiterClipped);
+                break;
+            }
+            case basegfx::B2DLineJoin::B2DLINEJOIN_ROUND:
+            {
+                aPen.SetLineJoin(Gdiplus::LineJoinRound);
+                break;
             }
-            break;
-        }
-        case basegfx::B2DLineJoin::Bevel:
-        {
-            aPen.SetLineJoin(Gdiplus::LineJoinBevel);
-            break;
-        }
-        case basegfx::B2DLineJoin::Miter:
-        {
-            const Gdiplus::REAL aMiterLimit(15.0);
-
-            aPen.SetMiterLimit(aMiterLimit);
-            // tdf#99165 MS's LineJoinMiter creates non standard conform miter additional
-            // graphics, somewhere clipped in some distance from the edge point, dependent
-            // of MiterLimit. The more default-like option is LineJoinMiterClipped, so use
-            // that instead
-            aPen.SetLineJoin(Gdiplus::LineJoinMiterClipped);
-            break;
-        }
-        case basegfx::B2DLineJoin::Round:
-        {
-            aPen.SetLineJoin(Gdiplus::LineJoinRound);
-            break;
-        }
         }
 
         switch (eLineCap)
         {
-        default: /*css::drawing::LineCap_BUTT*/
-        {
-            // nothing to do
-            break;
-        }
-        case css::drawing::LineCap_ROUND:
-        {
-            aPen.SetStartCap(Gdiplus::LineCapRound);
-            aPen.SetEndCap(Gdiplus::LineCapRound);
-            break;
-        }
-        case css::drawing::LineCap_SQUARE:
-        {
-            aPen.SetStartCap(Gdiplus::LineCapSquare);
-            aPen.SetEndCap(Gdiplus::LineCapSquare);
-            break;
-        }
+            default: /*css::drawing::LineCap_BUTT*/
+            {
+                // nothing to do
+                break;
+            }
+            case css::drawing::LineCap_ROUND:
+            {
+                aPen.SetStartCap(Gdiplus::LineCapRound);
+                aPen.SetEndCap(Gdiplus::LineCapRound);
+                break;
+            }
+            case css::drawing::LineCap_SQUARE:
+            {
+                aPen.SetStartCap(Gdiplus::LineCapSquare);
+                aPen.SetEndCap(Gdiplus::LineCapSquare);
+                break;
+            }
         }
 
-        impAddB2DPolygonToGDIPlusGraphicsPathReal(pPath, rPolygon, bNoLineJoin, &rLineWidths);
+        impAddB2DPolygonToGDIPlusGraphicsPathReal(aGraphicsPath, rPolygon, bNoLineJoin, &rLineWidths);
 
         if (rPolygon.isClosed() && !bNoLineJoin)
         {
commit 3bf7693ec0a0ee252ce40d43d11993286a30bd08
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date:   Thu Jul 7 10:16:02 2016 +0200

    Added using an own instance of ThreadPool
    
    Using the global ThreadPool (getSharedOptimalPool()) can lead to
    problems when more than one usage executes and one of them
    already calls waitUntilEmpty() what of course influences the
    other usage. Thus I added an own instance of ThreadPool for
    async loading of chart models in writer
    
    Change-Id: I4bea64af0d36e87081abec95c75574966d0fe5b9

diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index d8b6cec..2538036 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -643,6 +643,38 @@ bool SwOLENode::IsChart() const
 }
 
 //////////////////////////////////////////////////////////////////////////////
+// due to some problems in test cases with the SharedOptimalPool, I have to
+// use an own iinstance of comphelper::ThreadPool. Prtoblem is that other
+// usages of getSharedOptimalPool() may interfere when more than one pool
+// user calls waitUntilEmpty().
+//
+// It gets created on-demand and will be available during LO's lifetime for
+// loading chart models used in writer in parallel.
+// It would be possible to add a usage count, then trigger
+// a timer and clean it up (due to lifetime issues), but that's unnecessarily
+// complicated. It gets created on demand, is ready for global reuse and makes
+// no harm (not much ressources needed)
+
+static comphelper::ThreadPool* pLocalPool = 0;
+
+comphelper::ThreadPool* getLocalThreadPool()
+{
+    if (pLocalPool)
+    {
+        return pLocalPool;
+    }
+
+    if (0 == comphelper::ThreadPool::getSharedOptimalPool().getWorkerCount())
+    {
+        return nullptr;
+    }
+
+    pLocalPool = new comphelper::ThreadPool(comphelper::ThreadPool::getSharedOptimalPool().getWorkerCount());
+    return pLocalPool;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// class holding local data for a parellel executed task to load a chart model
 
 class DeflateData
 {
@@ -702,6 +734,7 @@ public:
 };
 
 //////////////////////////////////////////////////////////////////////////////
+// class defining a parellel executed task to load a chart model
 
 class DeflateThread : public comphelper::ThreadTask
 {
@@ -1049,13 +1082,16 @@ drawinglayer::primitive2d::Primitive2DContainer SwOLEObj::tryToGetChartContentAs
 
         if(aXModel.is())
         {
-            // due to some problems in test cases with the SharedOptimalPool,
-            // I need to deactivate this for now
-            static bool bAnynchronousLoadingAllowed = false;
+            // added using own instance of comphelper::ThreadPool, see
+            // getLocalThreadPool(). I ran the UnitTests and the problems from
+            // before seem solved, so I optionally allow asynchronous loading
+            // for now. The static bool below is an anchor point to allow
+            // deactivating this feature quickly if trouble surfaces somewhere
+            static bool bAnynchronousLoadingAllowed = true;
 
             if(bSynchron ||
                 !bAnynchronousLoadingAllowed ||
-                0 == comphelper::ThreadPool::getSharedOptimalPool().getWorkerCount())
+                nullptr == getLocalThreadPool())
             {
                 // load chart synchron in this Thread
                 m_aPrimitive2DSequence = ChartHelper::tryToGetChartContentAsPrimitive2DSequence(
@@ -1071,7 +1107,7 @@ drawinglayer::primitive2d::Primitive2DContainer SwOLEObj::tryToGetChartContentAs
                 {
                     m_pDeflateData = new DeflateData(aXModel);
                     DeflateThread* pNew = new DeflateThread(*m_pDeflateData);
-                    comphelper::ThreadPool::getSharedOptimalPool().pushTask(pNew);
+                    getLocalThreadPool()->pushTask(pNew);
                 }
             }
         }
commit 1ecddf68ffde162a3ac672d600be8993e6528f62
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date:   Fri Jul 1 15:50:00 2016 +0200

    tdf#82214 optimize PatternFillPrimitive and SVG
    
    Use buffering in the drawinglayer, and don't do slow stuff in the
    windows gdi renderer.
    
    Conflicts:
    	svgio/source/svgreader/svgstyleattributes.cxx
    
    Change-Id: Id955ee6a3b03e568c2678f02d77af35d2e5ba1d4

diff --git a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
index b84a577..225cb2f 100644
--- a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
@@ -32,8 +32,8 @@
 
 using namespace com::sun::star;
 
-#define MAXIMUM_SQUARE_LENGTH (164.0)
-#define MINIMUM_SQUARE_LENGTH (32.0)
+#define MAXIMUM_SQUARE_LENGTH (186.0)
+#define MINIMUM_SQUARE_LENGTH (16.0)
 #define MINIMUM_TILES_LENGTH (3)
 
 
@@ -259,57 +259,58 @@ namespace drawinglayer
 
         Primitive2DSequence PatternFillPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
         {
-            if(0 == mnDiscreteWidth || 0 == mnDiscreteHeight)
+            // The existing bufferd decomposition uses a buffer in the remembered
+            // size or none if sizes are zero. Get new needed sizes which depend on
+            // the given ViewInformation
+            bool bResetBuffering = false;
+            sal_uInt32 nW(0);
+            sal_uInt32 nH(0);
+            calculateNeededDiscreteBufferSize(nW, nH, rViewInformation);
+            const bool bBufferingCurrentlyUsed(0 != mnDiscreteWidth && 0 != mnDiscreteHeight);
+            const bool bBufferingNextUsed(0 != nW && 0 != nH);
+
+            if(bBufferingNextUsed)
             {
-                // Currently no buffering is used. Check if the resulting discrete sizes
-                // in the current situation would be good for buffering from now on
-                PatternFillPrimitive2D* pThat = const_cast< PatternFillPrimitive2D* >(this);
-
-                calculateNeededDiscreteBufferSize(pThat->mnDiscreteWidth, pThat->mnDiscreteHeight, rViewInformation);
-            }
-            else
-            {
-                // The existing bufferd decomposition uses a buffer in the remembered
-                // size. Get new needed sizes which depend on the given ViewInformation
-                sal_uInt32 nW(0);
-                sal_uInt32 nH(0);
-                calculateNeededDiscreteBufferSize(nW, nH, rViewInformation);
-
-                if(0 != nW && 0 != nH)
+                // buffering is now possible
+                if(bBufferingCurrentlyUsed)
                 {
-                    // buffering is possible - check if reset is needed
-                    bool bResetBuffering = false;
-
                     if(nW > mnDiscreteWidth || nH > mnDiscreteHeight)
                     {
                         // Higher resolution is needed than used in the existing buffered
-                        // decomposition
+                        // decomposition - create new one
                         bResetBuffering = true;
                     }
                     else if(double(nW * nH) / double(mnDiscreteWidth * mnDiscreteHeight) <= 0.5)
                     {
                         // Size has shrunk for 50% or more - it's worth to refresh the buffering
+                        // to spare some ressources
                         bResetBuffering = true;
                     }
-
-                    if(bResetBuffering)
-                    {
-                        PatternFillPrimitive2D* pThat = const_cast< PatternFillPrimitive2D* >(this);
-                        pThat->mnDiscreteWidth = nW;
-                        pThat->mnDiscreteHeight = nH;
-                        pThat->setBuffered2DDecomposition(Primitive2DSequence());
-                    }
                 }
                 else
                 {
-                    // no buffering wanted or possible - clear decomposition to create a
-                    // new, unbuffered one
-                    PatternFillPrimitive2D* pThat = const_cast< PatternFillPrimitive2D* >(this);
-                    pThat->mnDiscreteWidth = 0;
-                    pThat->mnDiscreteHeight = 0;
-                    pThat->setBuffered2DDecomposition(Primitive2DSequence());
+                    // currently no buffering used - reset evtl. unbuffered
+                    // decomposition to start buffering
+                    bResetBuffering = true;
                 }
             }
+            else
+            {
+                // buffering is no longer possible
+                if(bBufferingCurrentlyUsed)
+                {
+                    // reset decomposition to allow creation of unbuffered one
+                    bResetBuffering = true;
+                }
+            }
+
+            if(bResetBuffering)
+            {
+                PatternFillPrimitive2D* pThat = const_cast< PatternFillPrimitive2D* >(this);
+                pThat->mnDiscreteWidth = nW;
+                pThat->mnDiscreteHeight = nH;
+                pThat->setBuffered2DDecomposition(Primitive2DContainer());
+            }
 
             // call parent
             return BufferedDecompositionPrimitive2D::get2DDecomposition(rViewInformation);
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index 4735887..fc373da 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -669,40 +669,75 @@ namespace svgio
 
                     if(basegfx::fTools::more(fStrokeWidth, 0.0))
                     {
-                        // get LineJoin, LineCap and stroke array
-                        const basegfx::B2DLineJoin aB2DLineJoin(StrokeLinejoinToB2DLineJoin(getStrokeLinejoin()));
-                        const com::sun::star::drawing::LineCap aLineCap(StrokeLinecapToDrawingLineCap(getStrokeLinecap()));
-                        ::std::vector< double > aDashArray;
+                        drawinglayer::primitive2d::Primitive2DReference aNewLinePrimitive;
 
-                        if(!getStrokeDasharray().empty())
+                        // if we have a line with two identical points it is not really a line,
+                        // but used by SVG sometimes to paint a single dot.In that case, create
+                        // the geometry for a single dot
+                        if(1 == rPath.count())
                         {
-                            aDashArray = solveSvgNumberVector(getStrokeDasharray(), mrOwner, length);
+                            const basegfx::B2DPolygon aSingle(rPath.getB2DPolygon(0));
+
+                            if(2 == aSingle.count() && aSingle.getB2DPoint(0).equal(aSingle.getB2DPoint(1)))
+                            {
+                                aNewLinePrimitive = new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(
+                                    basegfx::B2DPolyPolygon(
+                                        basegfx::tools::createPolygonFromCircle(
+                                            aSingle.getB2DPoint(0),
+                                            fStrokeWidth * (1.44 * 0.5))),
+                                    pStroke ? *pStroke : basegfx::BColor(0.0, 0.0, 0.0));
+                            }
                         }
 
-                        // todo: Handle getStrokeDashOffset()
+                        if(!aNewLinePrimitive.is())
+                        {
+                            // get LineJoin, LineCap and stroke array
+                            const basegfx::B2DLineJoin aB2DLineJoin(StrokeLinejoinToB2DLineJoin(getStrokeLinejoin()));
+                            const css::drawing::LineCap aLineCap(StrokeLinecapToDrawingLineCap(getStrokeLinecap()));
+                            ::std::vector< double > aDashArray;
 
-                        // prepare line attribute
-                        drawinglayer::primitive2d::Primitive2DReference aNewLinePrimitive;
-                        const drawinglayer::attribute::LineAttribute aLineAttribute(
-                            pStroke ? *pStroke : basegfx::BColor(0.0, 0.0, 0.0),
-                            fStrokeWidth,
-                            aB2DLineJoin,
-                            aLineCap);
+                            if(!getStrokeDasharray().empty())
+                            {
+                                aDashArray = solveSvgNumberVector(getStrokeDasharray(), mrOwner);
+                            }
 
-                        if(aDashArray.empty())
-                        {
-                            aNewLinePrimitive = new drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D(
-                                rPath,
-                                aLineAttribute);
-                        }
-                        else
-                        {
-                            const drawinglayer::attribute::StrokeAttribute aStrokeAttribute(aDashArray);
+                            // convert svg:stroke-miterlimit to LineAttrute:mfMiterMinimumAngle
+                            // The default needs to be set explicitely, because svg default <> Draw default
+                            double fMiterMinimumAngle;
+                            if (getStrokeMiterLimit().isSet())
+                            {
+                                fMiterMinimumAngle = 2.0 * asin(1.0/getStrokeMiterLimit().getNumber());
+                            }
+                            else
+                            {
+                                fMiterMinimumAngle = 2.0 * asin(0.25); // 1.0/default 4.0
+                            }
 
-                            aNewLinePrimitive = new drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D(
-                                rPath,
-                                aLineAttribute,
-                                aStrokeAttribute);
+                            // todo: Handle getStrokeDashOffset()
+
+                            // prepare line attribute
+                            const drawinglayer::attribute::LineAttribute aLineAttribute(
+                                pStroke ? *pStroke : basegfx::BColor(0.0, 0.0, 0.0),
+                                fStrokeWidth,
+                                aB2DLineJoin,
+                                aLineCap,
+                                fMiterMinimumAngle);
+
+                            if(aDashArray.empty())
+                            {
+                                aNewLinePrimitive = new drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D(
+                                    rPath,
+                                    aLineAttribute);
+                            }
+                            else
+                            {
+                                const drawinglayer::attribute::StrokeAttribute aStrokeAttribute(aDashArray);
+
+                                aNewLinePrimitive = new drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D(
+                                    rPath,
+                                    aLineAttribute,
+                                    aStrokeAttribute);
+                            }
                         }
 
                         if(pStrokeGradient || pStrokePattern)
commit 05afb87cc30ae0e51d87bbc0c7b3443b9acba357
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date:   Fri Jul 1 15:40:00 2016 +0200

    tdf#82214 optimize performance for primitives
    
    See svg bug doc, which is processed quite slowly. Beyond needing faster
    renderers, there is also demand to improve the handling of primitives
    created by SVG import.
    
    Conflicts:
    	drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
    	vcl/win/gdi/gdiimpl.cxx
    
    Change-Id: I10992a5746b8b2d6b50e3ee3fe415a035685c9ba

diff --git a/basegfx/source/polygon/b2dlinegeometry.cxx b/basegfx/source/polygon/b2dlinegeometry.cxx
index 860161d..8663f71 100644
--- a/basegfx/source/polygon/b2dlinegeometry.cxx
+++ b/basegfx/source/polygon/b2dlinegeometry.cxx
@@ -955,6 +955,14 @@ namespace basegfx
                         }
                     }
                 }
+                else
+                {
+                    // point count, but no edge count -> single point
+                    aRetval.append(
+                        createPolygonFromCircle(
+                            aCandidate.getB2DPoint(0),
+                            fHalfLineWidth));
+                }
 
                 return aRetval;
             }
diff --git a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
index 6476c6d..b84a577 100644
--- a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
@@ -21,21 +21,146 @@
 #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
 #include <drawinglayer/primitive2d/transformprimitive2d.hxx>
 #include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
+#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
 #include <basegfx/polygon/b2dpolygontools.hxx>
 #include <basegfx/matrix/b2dhommatrixtools.hxx>
 #include <drawinglayer/texture/texture.hxx>
 #include <drawinglayer/primitive2d/maskprimitive2d.hxx>
-
+#include <drawinglayer/tools/converters.hxx>
+#include <drawinglayer/geometry/viewinformation2d.hxx>
 
 
 using namespace com::sun::star;
 
+#define MAXIMUM_SQUARE_LENGTH (164.0)
+#define MINIMUM_SQUARE_LENGTH (32.0)
+#define MINIMUM_TILES_LENGTH (3)
 
 
 namespace drawinglayer
 {
     namespace primitive2d
     {
+        void PatternFillPrimitive2D::calculateNeededDiscreteBufferSize(
+            sal_uInt32& rWidth,
+            sal_uInt32& rHeight,
+            const geometry::ViewInformation2D& rViewInformation) const
+        {
+            // reset parameters
+            rWidth = rHeight = 0;
+
+            // check if resolution is in the range which may be buffered
+            const basegfx::B2DPolyPolygon& rMaskPolygon = getMask();
+            const basegfx::B2DRange aMaskRange(rMaskPolygon.getB2DRange());
+
+            // get discrete rounded up square size of a single tile
+            const basegfx::B2DHomMatrix aMaskRangeTransformation(
+                basegfx::tools::createScaleTranslateB2DHomMatrix(
+                    aMaskRange.getRange(),
+                    aMaskRange.getMinimum()));
+            const basegfx::B2DHomMatrix aTransform(
+                rViewInformation.getObjectToViewTransformation() * aMaskRangeTransformation);
+            const basegfx::B2DPoint aTopLeft(aTransform * getReferenceRange().getMinimum());
+            const basegfx::B2DPoint aX(aTransform * basegfx::B2DPoint(getReferenceRange().getMaxX(), getReferenceRange().getMinY()));
+            const basegfx::B2DPoint aY(aTransform * basegfx::B2DPoint(getReferenceRange().getMinX(), getReferenceRange().getMaxY()));
+            const double fW(basegfx::B2DVector(aX - aTopLeft).getLength());
+            const double fH(basegfx::B2DVector(aY - aTopLeft).getLength());
+            const double fSquare(fW * fH);
+
+            if(fSquare > 0.0)
+            {
+                // check if less than a maximum square pixels is used
+                static sal_uInt32 fMaximumSquare(MAXIMUM_SQUARE_LENGTH * MAXIMUM_SQUARE_LENGTH);
+
+                if(fSquare < fMaximumSquare)
+                {
+                    // calculate needed number of tiles and check if used more than a minimum count
+                    const texture::GeoTexSvxTiled aTiling(getReferenceRange());
+                    const sal_uInt32 nTiles(aTiling.getNumberOfTiles());
+                    static sal_uInt32 nMinimumTiles(MINIMUM_TILES_LENGTH * MINIMUM_TILES_LENGTH);
+
+                    if(nTiles >= nMinimumTiles)
+                    {
+                        rWidth = basegfx::fround(ceil(fW));
+                        rHeight = basegfx::fround(ceil(fH));
+                        static sal_uInt32 fMinimumSquare(MINIMUM_SQUARE_LENGTH * MINIMUM_SQUARE_LENGTH);
+
+                        if(fSquare < fMinimumSquare)
+                        {
+                            const double fRel(fW/fH);
+                            rWidth = basegfx::fround(sqrt(fMinimumSquare * fRel));
+                            rHeight = basegfx::fround(sqrt(fMinimumSquare / fRel));
+                        }
+                    }
+                }
+            }
+        }
+
+        Primitive2DSequence PatternFillPrimitive2D::createContent(const geometry::ViewInformation2D& rViewInformation) const
+        {
+            Primitive2DSequence aContent;
+
+            // see if buffering is wanted. it is wanted, create buffered content in given resolution
+            if(0 != mnDiscreteWidth && 0 != mnDiscreteHeight)
+            {
+                const geometry::ViewInformation2D aViewInformation2D;
+                const primitive2d::Primitive2DReference xEmbedRef(
+                    new primitive2d::TransformPrimitive2D(
+                        basegfx::tools::createScaleB2DHomMatrix(mnDiscreteWidth, mnDiscreteHeight),
+                        getChildren()));
+                const primitive2d::Primitive2DSequence xEmbedSeq{ xEmbedRef };
+
+                const BitmapEx aBitmapEx(
+                    tools::convertToBitmapEx(
+                        xEmbedSeq,
+                        aViewInformation2D,
+                        mnDiscreteWidth,
+                        mnDiscreteHeight,
+                        mnDiscreteWidth * mnDiscreteHeight));
+
+                if(!aBitmapEx.IsEmpty())
+                {
+                    const Size& rBmpPix = aBitmapEx.GetSizePixel();
+
+                    if(rBmpPix.Width() > 0 && rBmpPix.Height() > 0)
+                    {
+                        const primitive2d::Primitive2DReference xEmbedRefBitmap(
+                            new primitive2d::BitmapPrimitive2D(
+                                aBitmapEx,
+                                basegfx::B2DHomMatrix()));
+                        aContent = primitive2d::Primitive2DSequence{ xEmbedRefBitmap };
+                    }
+                }
+            }
+
+            if(aContent.empty())
+            {
+                // buffering was not tried or did fail - reset remembered buffered size
+                // in any case
+                PatternFillPrimitive2D* pThat = const_cast< PatternFillPrimitive2D* >(this);
+                pThat->mnDiscreteWidth = pThat->mnDiscreteHeight = 0;
+
+                // use children as default context
+                aContent = getChildren();
+
+                // check if content needs to be clipped
+                const basegfx::B2DRange aUnitRange(0.0, 0.0, 1.0, 1.0);
+                const basegfx::B2DRange aContentRange(getChildren().getB2DRange(rViewInformation));
+
+                if(!aUnitRange.isInside(aContentRange))
+                {
+                    const Primitive2DReference xRef(
+                        new MaskPrimitive2D(
+                            basegfx::B2DPolyPolygon(basegfx::tools::createPolygonFromRect(aUnitRange)),
+                            aContent));
+
+                    aContent = Primitive2DSequence{ xRef };
+                }
+            }
+
+            return aContent;
+        }
+
         Primitive2DSequence PatternFillPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
         {
             Primitive2DSequence aRetval;
@@ -54,20 +179,8 @@ namespace drawinglayer
 
                         aTiling.appendTransformations(aMatrices);
 
-                        // check if content needs to be clipped
-                        const basegfx::B2DRange aUnitRange(0.0, 0.0, 1.0, 1.0);
-                        const basegfx::B2DRange aContentRange(getB2DRangeFromPrimitive2DSequence(getChildren(), rViewInformation));
-                        Primitive2DSequence aContent(getChildren());
-
-                        if(!aUnitRange.isInside(aContentRange))
-                        {
-                            const Primitive2DReference xRef(
-                                new MaskPrimitive2D(
-                                    basegfx::B2DPolyPolygon(basegfx::tools::createPolygonFromRect(aUnitRange)),
-                                    aContent));
-
-                            aContent = Primitive2DSequence(&xRef, 1);
-                        }
+                        // create content
+                        const Primitive2DSequence aContent(createContent(rViewInformation));
 
                         // resize result
                         aRetval.realloc(aMatrices.size());
@@ -119,7 +232,9 @@ namespace drawinglayer
         :   BufferedDecompositionPrimitive2D(),
             maMask(rMask),
             maChildren(rChildren),
-            maReferenceRange(rReferenceRange)
+            maReferenceRange(rReferenceRange),
+            mnDiscreteWidth(0),
+            mnDiscreteHeight(0)
         {
         }
 
@@ -142,6 +257,64 @@ namespace drawinglayer
             return getMask().getB2DRange();
         }
 
+        Primitive2DSequence PatternFillPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+        {
+            if(0 == mnDiscreteWidth || 0 == mnDiscreteHeight)
+            {
+                // Currently no buffering is used. Check if the resulting discrete sizes
+                // in the current situation would be good for buffering from now on
+                PatternFillPrimitive2D* pThat = const_cast< PatternFillPrimitive2D* >(this);
+
+                calculateNeededDiscreteBufferSize(pThat->mnDiscreteWidth, pThat->mnDiscreteHeight, rViewInformation);
+            }
+            else
+            {
+                // The existing bufferd decomposition uses a buffer in the remembered
+                // size. Get new needed sizes which depend on the given ViewInformation
+                sal_uInt32 nW(0);
+                sal_uInt32 nH(0);
+                calculateNeededDiscreteBufferSize(nW, nH, rViewInformation);
+
+                if(0 != nW && 0 != nH)
+                {
+                    // buffering is possible - check if reset is needed
+                    bool bResetBuffering = false;
+
+                    if(nW > mnDiscreteWidth || nH > mnDiscreteHeight)
+                    {
+                        // Higher resolution is needed than used in the existing buffered
+                        // decomposition
+                        bResetBuffering = true;
+                    }
+                    else if(double(nW * nH) / double(mnDiscreteWidth * mnDiscreteHeight) <= 0.5)
+                    {
+                        // Size has shrunk for 50% or more - it's worth to refresh the buffering
+                        bResetBuffering = true;
+                    }
+
+                    if(bResetBuffering)
+                    {
+                        PatternFillPrimitive2D* pThat = const_cast< PatternFillPrimitive2D* >(this);
+                        pThat->mnDiscreteWidth = nW;
+                        pThat->mnDiscreteHeight = nH;
+                        pThat->setBuffered2DDecomposition(Primitive2DSequence());
+                    }
+                }
+                else
+                {
+                    // no buffering wanted or possible - clear decomposition to create a
+                    // new, unbuffered one
+                    PatternFillPrimitive2D* pThat = const_cast< PatternFillPrimitive2D* >(this);
+                    pThat->mnDiscreteWidth = 0;
+                    pThat->mnDiscreteHeight = 0;
+                    pThat->setBuffered2DDecomposition(Primitive2DSequence());
+                }
+            }
+
+            // call parent
+            return BufferedDecompositionPrimitive2D::get2DDecomposition(rViewInformation);
+        }
+
         // provide unique ID
         ImplPrimitive2DIDBlock(PatternFillPrimitive2D, PRIMITIVE2D_ID_PATTERNFILLPRIMITIVE2D)
 
diff --git a/drawinglayer/source/processor2d/objectinfoextractor2d.cxx b/drawinglayer/source/processor2d/objectinfoextractor2d.cxx
index 7fe006a..c3b35a8 100644
--- a/drawinglayer/source/processor2d/objectinfoextractor2d.cxx
+++ b/drawinglayer/source/processor2d/objectinfoextractor2d.cxx
@@ -40,8 +40,24 @@ namespace drawinglayer
                     }
                     default :
                     {
-                        // process recursively
-                        process(rCandidate.get2DDecomposition(getViewInformation2D()));
+                        // we look for an encapsulated primitive, so do not decompose primitives
+                        // based on GroupPrimitive2D, just visit their children. It may be that more
+                        // group-like primitives need to be added here, but all primitives with
+                        // grouping functionality should be implemented based on the GroupPrimitive2D
+                        // class and have their main content accessible as children
+                        const primitive2d::GroupPrimitive2D* pGroupPrimitive2D = dynamic_cast< const primitive2d::GroupPrimitive2D* >(&rCandidate);
+
+                        if(pGroupPrimitive2D)
+                        {
+                            // process group children recursively
+                            process(pGroupPrimitive2D->getChildren());
+                        }
+                        else
+                        {
+                            // do not process recursively, we *only* want to find existing
+                            // ObjectInfoPrimitive2D entries
+                        }
+
                         break;
                     }
                 }
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 1240437..ef11df4 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -183,17 +183,19 @@ namespace drawinglayer
 
         bool VclPixelProcessor2D::tryDrawPolygonStrokePrimitive2DDirect(const drawinglayer::primitive2d::PolygonStrokePrimitive2D& rSource, double fTransparency)
         {
-            basegfx::B2DPolygon aLocalPolygon(rSource.getB2DPolygon());
-
-            if(!aLocalPolygon.count())
+            if(!rSource.getB2DPolygon().count())
             {
                 // no geometry, done
                 return true;
             }
 
-            aLocalPolygon = basegfx::tools::simplifyCurveSegments(aLocalPolygon);
+            // get geometry data, prepare hairline data
+            basegfx::B2DPolygon aLocalPolygon(rSource.getB2DPolygon());
             basegfx::B2DPolyPolygon aHairLinePolyPolygon;
 
+            // simplify curve segments
+            aLocalPolygon = basegfx::tools::simplifyCurveSegments(aLocalPolygon);
+
             if(rSource.getStrokeAttribute().isDefault() || 0.0 == rSource.getStrokeAttribute().getFullDotDashLen())
             {
                 // no line dashing, just copy
diff --git a/drawinglayer/source/texture/texture.cxx b/drawinglayer/source/texture/texture.cxx
index 89953e6..b8358d8 100644
--- a/drawinglayer/source/texture/texture.cxx
+++ b/drawinglayer/source/texture/texture.cxx
@@ -729,9 +729,20 @@ namespace drawinglayer
                 && mfOffsetY == pCompare->mfOffsetY);
         }
 
-        void GeoTexSvxTiled::appendTransformations(::std::vector< basegfx::B2DHomMatrix >& rMatrices)
+        sal_uInt32 GeoTexSvxTiled::getNumberOfTiles() const
+        {
+            return iterateTiles(nullptr);
+        }
+
+        void GeoTexSvxTiled::appendTransformations(::std::vector< basegfx::B2DHomMatrix >& rMatrices) const
+        {
+            iterateTiles(&rMatrices);
+        }
+
+        sal_Int32 GeoTexSvxTiled::iterateTiles(::std::vector< basegfx::B2DHomMatrix >* pMatrices) const
         {
             const double fWidth(maRange.getWidth());
+            sal_Int32 nTiles = 0;
 
             if(!basegfx::fTools::equalZero(fWidth))
             {
@@ -783,12 +794,19 @@ namespace drawinglayer
                             for(double fPosY(nPosX % 2 ? fStartY - fHeight + (mfOffsetY * fHeight) : fStartY);
                                 basegfx::fTools::less(fPosY, 1.0); fPosY += fHeight)
                             {
-                                rMatrices.push_back(
-                                    basegfx::tools::createScaleTranslateB2DHomMatrix(
-                                        fWidth,
-                                        fHeight,
-                                        fPosX,
-                                        fPosY));
+                                if(pMatrices)
+                                {
+                                    pMatrices->push_back(
+                                        basegfx::tools::createScaleTranslateB2DHomMatrix(
+                                            fWidth,
+                                            fHeight,
+                                            fPosX,
+                                            fPosY));
+                                }
+                                else
+                                {
+                                    nTiles++;
+                                }
                             }
                         }
                     }
@@ -799,17 +817,26 @@ namespace drawinglayer
                             for(double fPosX(nPosY % 2 ? fStartX - fWidth + (mfOffsetX * fWidth) : fStartX);
                                 basegfx::fTools::less(fPosX, 1.0); fPosX += fWidth)
                             {
-                                rMatrices.push_back(
-                                    basegfx::tools::createScaleTranslateB2DHomMatrix(
-                                        fWidth,
-                                        fHeight,
-                                        fPosX,
-                                        fPosY));
+                                if(pMatrices)
+                                {
+                                    pMatrices->push_back(
+                                        basegfx::tools::createScaleTranslateB2DHomMatrix(
+                                            fWidth,
+                                            fHeight,
+                                            fPosX,
+                                            fPosY));
+                                }
+                                else
+                                {
+                                    nTiles++;
+                                }
                             }
                         }
                     }
                 }
             }
+
+            return nTiles;
         }
     } // end of namespace texture
 } // end of namespace drawinglayer
diff --git a/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx b/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx
index 9776978..dc00487 100644
--- a/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx
@@ -46,6 +46,21 @@ namespace drawinglayer
             const Primitive2DSequence           maChildren;
             const basegfx::B2DRange             maReferenceRange;
 
+            /// values holding the discrete buffer size
+            sal_uInt32                          mnDiscreteWidth;
+            sal_uInt32                          mnDiscreteHeight;
+
+            /// helper that is capable to calculate the needed discrete buffer size for
+            /// eventually buffered content
+            void calculateNeededDiscreteBufferSize(
+                sal_uInt32& rWidth,
+                sal_uInt32& rHeight,
+                const geometry::ViewInformation2D& rViewInformation) const;
+
+            /// helper which creates the content - checks if clipping is needed and eventually
+            /// creates buffered content to speed up rendering
+            Primitive2DSequence createContent(const geometry::ViewInformation2D& rViewInformation) const;
+
         protected:
             /// create local decomposition
             virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
@@ -68,6 +83,9 @@ namespace drawinglayer
             /// get range
             virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
 
+            /// overload to react on evtl. buffered content
+            virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
+
             /// provide unique ID
             DeclPrimitive2DIDBlock()
         };
diff --git a/include/drawinglayer/texture/texture.hxx b/include/drawinglayer/texture/texture.hxx
index daa0348..da4bdb4 100644
--- a/include/drawinglayer/texture/texture.hxx
+++ b/include/drawinglayer/texture/texture.hxx
@@ -338,6 +338,9 @@ namespace drawinglayer
             double                          mfOffsetX;
             double                          mfOffsetY;
 
+        private:
+            sal_Int32 iterateTiles(::std::vector< basegfx::B2DHomMatrix >* pMatrices) const;
+
         public:
             GeoTexSvxTiled(
                 const basegfx::B2DRange& rRange,
@@ -348,7 +351,8 @@ namespace drawinglayer
             // compare operator
             virtual bool operator==(const GeoTexSvx& rGeoTexSvx) const SAL_OVERRIDE;
 
-            void appendTransformations(::std::vector< basegfx::B2DHomMatrix >& rMatrices);
+            void appendTransformations(::std::vector< basegfx::B2DHomMatrix >& rMatrices) const;
+            sal_uInt32 getNumberOfTiles() const;
         };
     } // end of namespace texture
 } // end of namespace drawinglayer
diff --git a/vcl/win/source/gdi/gdiimpl.cxx b/vcl/win/source/gdi/gdiimpl.cxx
index b429086..621b900 100644
--- a/vcl/win/source/gdi/gdiimpl.cxx
+++ b/vcl/win/source/gdi/gdiimpl.cxx
@@ -1920,131 +1920,139 @@ bool WinSalGraphicsImpl::drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt
 #endif
 }
 
-void impAddB2DPolygonToGDIPlusGraphicsPathReal(Gdiplus::GpPath *pPath, const basegfx::B2DPolygon& rPolygon, bool bNoLineJoin)
+void impAddB2DPolygonToGDIPlusGraphicsPathReal(
+    Gdiplus::GpPath *pPath,
+    const basegfx::B2DPolygon& rPolygon,
+    bool bNoLineJoin,
+    const basegfx::B2DVector* pLineWidths)
 {
     sal_uInt32 nCount(rPolygon.count());
 
-    if(nCount)
+    if (nCount)
     {
         const sal_uInt32 nEdgeCount(rPolygon.isClosed() ? nCount : nCount - 1);
         const bool bControls(rPolygon.areControlPointsUsed());
         basegfx::B2DPoint aCurr(rPolygon.getB2DPoint(0));
 
-        for(sal_uInt32 a(0); a < nEdgeCount; a++)
+        if (nEdgeCount)
         {
-            const sal_uInt32 nNextIndex((a + 1) % nCount);
-            const basegfx::B2DPoint aNext(rPolygon.getB2DPoint(nNextIndex));
-
-            if(bControls && (rPolygon.isNextControlPointUsed(a) || rPolygon.isPrevControlPointUsed(nNextIndex)))
-            {
-                const basegfx::B2DPoint aCa(rPolygon.getNextControlPoint(a));
-                const basegfx::B2DPoint aCb(rPolygon.getPrevControlPoint(nNextIndex));
-
-                Gdiplus::DllExports::GdipAddPathBezier(pPath,
-                    aCurr.getX(), aCurr.getY(),
-                    aCa.getX(), aCa.getY(),
-                    aCb.getX(), aCb.getY(),
-                    aNext.getX(), aNext.getY());
-            }
-            else
+            for (sal_uInt32 a(0); a < nEdgeCount; a++)
             {
-                Gdiplus::DllExports::GdipAddPathLine(pPath, aCurr.getX(), aCurr.getY(), aNext.getX(), aNext.getY());
-            }
+                const sal_uInt32 nNextIndex((a + 1) % nCount);
+                const basegfx::B2DPoint aNext(rPolygon.getB2DPoint(nNextIndex));
+                const bool b1stControlPointUsed(bControls && rPolygon.isNextControlPointUsed(a));
+                const bool b2ndControlPointUsed(bControls && rPolygon.isPrevControlPointUsed(nNextIndex));
 
-            if(a + 1 < nEdgeCount)
-            {
-                aCurr = aNext;
+                if (b1stControlPointUsed || b2ndControlPointUsed)
+                {
+                    basegfx::B2DPoint aCa(rPolygon.getNextControlPoint(a));
+                    basegfx::B2DPoint aCb(rPolygon.getPrevControlPoint(nNextIndex));
+
+                    // tdf#99165 MS Gdiplus cannot handle creating correct extra geometry for fat lines
+                    // with LineCap or LineJoin when a bezier segment starts or ends trivial, e.g. has
+                    // no 1st or 2nd control point, despite that these are mathematicaly correct definitions
+                    // (basegfx can handle that). To solve, create replacement vectors to thre resp. next
+                    // control point with 1/3rd of length (the default control vector for these cases).
+                    // Only one of this can happen here, else the is(Next|Prev)ControlPointUsed wopuld have
+                    // both been false.
+                    // Caution: This error (and it's correction) might be necessary for other graphical
+                    // sub-systems in a similar way
+                    if (!b1stControlPointUsed)
+                    {
+                        aCa = aCurr + ((aCb - aCurr) * 0.3);
+                    }
+                    else if (!b2ndControlPointUsed)
+                    {
+                        aCb = aNext + ((aCa - aNext) * 0.3);
+                    }
 
-                if(bNoLineJoin)
+                    Gdiplus::DllExports::GdipAddPathBezier(
+                        pPath,
+                        aCurr.getX(), aCurr.getY(),
+                        aCa.getX(), aCa.getY(),
+                        aCb.getX(), aCb.getY(),
+                        aNext.getX(), aNext.getY());
+                }
+                else
                 {
-                    Gdiplus::DllExports::GdipStartPathFigure(pPath);
+                    if (pLineWidths && aCurr.equal(aNext))
+                    {
+                        // For lines with no length Gdiplus unfortunately paints nothing,
+                        // independent of LineCaps being set. This differs from e.g. SVG
+                        // and other systems. To get geometry created, add some offset,
+                        // based on line width to have something relative to current metrics
+                        if (!basegfx::fTools::equalZero(pLineWidths->getX()))
+                        {
+                            Gdiplus::DllExports::GdipAddPathLine(
+                                pPath,
+                                aCurr.getX(), aCurr.getY(),
+                                aNext.getX() + (pLineWidths->getX() * 0.1), aNext.getY());
+                        }
+                        else
+                        {
+                            Gdiplus::DllExports::GdipAddPathLine(
+                                pPath,
+                                aCurr.getX(), aCurr.getY(),
+                                aNext.getX(), aNext.getY() + (pLineWidths->getY() * 0.1));
+                        }
+                    }
+                    else
+                    {
+                        Gdiplus::DllExports::GdipAddPathLine(
+                            pPath,
+                            aCurr.getX(), aCurr.getY(),
+                            aNext.getX(), aNext.getY());
+                    }
                 }
-            }
-        }
-    }
-}
 
-void impAddB2DPolygonToGDIPlusGraphicsPathInteger(Gdiplus::GpPath *pPath, const basegfx::B2DPolygon& rPolygon, bool bNoLineJoin)
-{
-    sal_uInt32 nCount(rPolygon.count());
-
-    if(nCount)
-    {
-        const sal_uInt32 nEdgeCount(rPolygon.isClosed() ? nCount : nCount - 1);
-        const bool bControls(rPolygon.areControlPointsUsed());
-        basegfx::B2DPoint aCurr(rPolygon.getB2DPoint(0));
-
-        for(sal_uInt32 a(0); a < nEdgeCount; a++)
-        {
-            const sal_uInt32 nNextIndex((a + 1) % nCount);
-            const basegfx::B2DPoint aNext(rPolygon.getB2DPoint(nNextIndex));
-
-            if(bControls && (rPolygon.isNextControlPointUsed(a) || rPolygon.isPrevControlPointUsed(nNextIndex)))
-            {
-                const basegfx::B2DPoint aCa(rPolygon.getNextControlPoint(a));
-                const basegfx::B2DPoint aCb(rPolygon.getPrevControlPoint(nNextIndex));
-
-                Gdiplus::DllExports::GdipAddPathBezier(
-                    pPath,
-                    aCurr.getX(), aCurr.getY(),
-                    aCa.getX(), aCa.getY(),
-                    aCb.getX(), aCb.getY(),
-                    aNext.getX(), aNext.getY());
-            }
-            else
-            {
-                Gdiplus::DllExports::GdipAddPathLine(pPath, aCurr.getX(), aCurr.getY(), aNext.getX(), aNext.getY());
-            }
-
-            if(a + 1 < nEdgeCount)
-            {
-                aCurr = aNext;
-
-                if(bNoLineJoin)
+                if (a + 1 < nEdgeCount)
                 {
-                    Gdiplus::DllExports::GdipStartPathFigure(pPath);
+                    aCurr = aNext;
+
+                    if (bNoLineJoin)
+                    {
+                        Gdiplus::DllExports::GdipStartPathFigure(pPath);
+                    }
                 }
             }
         }
     }
 }
 
-bool WinSalGraphicsImpl::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPolygon, double fTransparency)
+bool WinSalGraphicsImpl::drawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon, double fTransparency)
 {
     const sal_uInt32 nCount(rPolyPolygon.count());
 
-    if(mbBrush && nCount && (fTransparency >= 0.0 && fTransparency < 1.0))
+    if (mbBrush && nCount && (fTransparency >= 0.0 && fTransparency < 1.0))
     {
-        Gdiplus::GpGraphics *pGraphics = NULL;
-        Gdiplus::DllExports::GdipCreateFromHDC(mrParent.getHDC(), &pGraphics);
+        Gdiplus::Graphics aGraphics(mrParent.getHDC());
         const sal_uInt8 aTrans((sal_uInt8)255 - (sal_uInt8)basegfx::fround(fTransparency * 255.0));
-        Gdiplus::Color aTestColor(aTrans, SALCOLOR_RED(maFillColor), SALCOLOR_GREEN(maFillColor), SALCOLOR_BLUE(maFillColor));
-        Gdiplus::GpSolidFill *pTestBrush;
-        Gdiplus::DllExports::GdipCreateSolidFill(aTestColor.GetValue(), &pTestBrush);
-        Gdiplus::GpPath *pPath = NULL;
-        Gdiplus::DllExports::GdipCreatePath(Gdiplus::FillModeAlternate, &pPath);
+        const Gdiplus::Color aTestColor(aTrans, SALCOLOR_RED(maFillColor), SALCOLOR_GREEN(maFillColor), SALCOLOR_BLUE(maFillColor));
+        const Gdiplus::SolidBrush aSolidBrush(aTestColor.GetValue());
+        Gdiplus::GraphicsPath aGraphicsPath(Gdiplus::FillModeAlternate);
 
-        for(sal_uInt32 a(0); a < nCount; a++)
+        for (sal_uInt32 a(0); a < nCount; a++)
         {
-            if(0 != a)
+            if (0 != a)
             {
-                Gdiplus::DllExports::GdipStartPathFigure(pPath); // #i101491# not needed for first run
+                // #i101491# not needed for first run
+                aGraphicsPath.StartFigure();
             }
 
-            impAddB2DPolygonToGDIPlusGraphicsPathReal(pPath, rPolyPolygon.getB2DPolygon(a), false);
+            impAddB2DPolygonToGDIPlusGraphicsPathReal(pPath, rPolyPolygon.getB2DPolygon(a), false, 0);
             Gdiplus::DllExports::GdipClosePathFigure(pPath);
         }
 
-        if(mrParent.getAntiAliasB2DDraw())
+        if (mrParent.getAntiAliasB2DDraw())
         {
-            Gdiplus::DllExports::GdipSetSmoothingMode(pGraphics, Gdiplus::SmoothingModeAntiAlias);
+            aGraphics.SetSmoothingMode(Gdiplus::SmoothingModeAntiAlias);
         }
         else
         {
-            Gdiplus::DllExports::GdipSetSmoothingMode(pGraphics, Gdiplus::SmoothingModeNone);
+            aGraphics.SetSmoothingMode(Gdiplus::SmoothingModeNone);
         }
 
-        if(mrParent.isPrinter())
+        if (mrParent.isPrinter())
         {
             // #i121591#
             // Normally GdiPlus should not be used for printing at all since printers cannot
@@ -2057,22 +2065,17 @@ bool WinSalGraphicsImpl::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly
             // checked that there is *no* transformation set and estimated that a stable factor
             // dependent of the printer's DPI is used. Create and set a transformation here to
             // correct this.
-            Gdiplus::REAL aDpiX;
-            Gdiplus::DllExports::GdipGetDpiX(pGraphics, &aDpiX);
-            Gdiplus::REAL aDpiY;
-            Gdiplus::DllExports::GdipGetDpiY(pGraphics, &aDpiY);
+            const Gdiplus::REAL aDpiX(aGraphics.GetDpiX());
+            const Gdiplus::REAL aDpiY(aGraphics.GetDpiY());
 
-            Gdiplus::DllExports::GdipResetWorldTransform(pGraphics);
-            Gdiplus::DllExports::GdipScaleWorldTransform(pGraphics, Gdiplus::REAL(100.0) / aDpiX, Gdiplus::REAL(100.0) / aDpiY, Gdiplus::MatrixOrderAppend);
+            aGraphics.ResetTransform();
+            aGraphics.ScaleTransform(Gdiplus::REAL(100.0) / aDpiX, Gdiplus::REAL(100.0) / aDpiY, Gdiplus::MatrixOrderAppend);
         }
 
-        Gdiplus::DllExports::GdipFillPath(pGraphics, pTestBrush, pPath);
-
-        Gdiplus::DllExports::GdipDeletePath(pPath);
-        Gdiplus::DllExports::GdipDeleteGraphics(pGraphics);
+        aGraphics.FillPath(&aSolidBrush, &aGraphicsPath);
     }
 
-     return true;
+    return true;
 }
 
 bool WinSalGraphicsImpl::drawPolyLine(
@@ -2080,102 +2083,92 @@ bool WinSalGraphicsImpl::drawPolyLine(
     double fTransparency,
     const basegfx::B2DVector& rLineWidths,
     basegfx::B2DLineJoin eLineJoin,
-    com::sun::star::drawing::LineCap eLineCap)
+    css::drawing::LineCap eLineCap)
 {
     const sal_uInt32 nCount(rPolygon.count());
 
-    if(mbPen && nCount)
+    if (mbPen && nCount)
     {
-        Gdiplus::GpGraphics *pGraphics = NULL;
-        Gdiplus::DllExports::GdipCreateFromHDC(mrParent.getHDC(), &pGraphics);
-        const sal_uInt8 aTrans = (sal_uInt8)basegfx::fround( 255 * (1.0 - fTransparency) );
-        Gdiplus::Color aTestColor(aTrans, SALCOLOR_RED(maLineColor), SALCOLOR_GREEN(maLineColor), SALCOLOR_BLUE(maLineColor));
-        Gdiplus::GpPen *pTestPen = NULL;
-        Gdiplus::DllExports::GdipCreatePen1(aTestColor.GetValue(), Gdiplus::REAL(rLineWidths.getX()), Gdiplus::UnitWorld, &pTestPen);
-        Gdiplus::GpPath *pPath;
-        Gdiplus::DllExports::GdipCreatePath(Gdiplus::FillModeAlternate, &pPath);
+        Gdiplus::Graphics aGraphics(mrParent.getHDC());
+        const sal_uInt8 aTrans = (sal_uInt8)basegfx::fround(255 * (1.0 - fTransparency));
+        const Gdiplus::Color aTestColor(aTrans, SALCOLOR_RED(maLineColor), SALCOLOR_GREEN(maLineColor), SALCOLOR_BLUE(maLineColor));
+        Gdiplus::Pen aPen(aTestColor.GetValue(), Gdiplus::REAL(rLineWidths.getX()));
+        Gdiplus::GraphicsPath aGraphicsPath(Gdiplus::FillModeAlternate);
         bool bNoLineJoin(false);
 
-        switch(eLineJoin)
+        switch (eLineJoin)
         {
-            default : // basegfx::B2DLINEJOIN_NONE :
-            {
-                if(basegfx::fTools::more(rLineWidths.getX(), 0.0))
-                {
-                    bNoLineJoin = true;
-                }
-                break;
-            }
-            case basegfx::B2DLINEJOIN_BEVEL :
-            {
-                Gdiplus::DllExports::GdipSetPenLineJoin(pTestPen, Gdiplus::LineJoinBevel);
-                break;
-            }
-            case basegfx::B2DLINEJOIN_MIDDLE :
-            case basegfx::B2DLINEJOIN_MITER :
-            {
-                const Gdiplus::REAL aMiterLimit(15.0);
-                Gdiplus::DllExports::GdipSetPenMiterLimit(pTestPen, aMiterLimit);
-                Gdiplus::DllExports::GdipSetPenLineJoin(pTestPen, Gdiplus::LineJoinMiter);
-                break;
-            }
-            case basegfx::B2DLINEJOIN_ROUND :
+        case basegfx::B2DLineJoin::NONE:
+        {
+            if (basegfx::fTools::more(rLineWidths.getX(), 0.0))
             {
-                Gdiplus::DllExports::GdipSetPenLineJoin(pTestPen, Gdiplus::LineJoinRound);
-                break;
+                bNoLineJoin = true;
             }
+            break;
         }
-
-        switch(eLineCap)
+        case basegfx::B2DLineJoin::Bevel:
         {
-            default: /*com::sun::star::drawing::LineCap_BUTT*/
-            {
-                // nothing to do
-                break;
-            }
-            case com::sun::star::drawing::LineCap_ROUND:
-            {
-                Gdiplus::DllExports::GdipSetPenStartCap(pTestPen, Gdiplus::LineCapRound);
-                Gdiplus::DllExports::GdipSetPenEndCap(pTestPen, Gdiplus::LineCapRound);
-                break;
-            }
-            case com::sun::star::drawing::LineCap_SQUARE:
-            {
-                Gdiplus::DllExports::GdipSetPenStartCap(pTestPen, Gdiplus::LineCapSquare);
-                Gdiplus::DllExports::GdipSetPenEndCap(pTestPen, Gdiplus::LineCapSquare);
-                break;
-            }
+            aPen.SetLineJoin(Gdiplus::LineJoinBevel);
+            break;
+        }
+        case basegfx::B2DLineJoin::Miter:
+        {
+            const Gdiplus::REAL aMiterLimit(15.0);
+
+            aPen.SetMiterLimit(aMiterLimit);
+            // tdf#99165 MS's LineJoinMiter creates non standard conform miter additional
+            // graphics, somewhere clipped in some distance from the edge point, dependent
+            // of MiterLimit. The more default-like option is LineJoinMiterClipped, so use
+            // that instead
+            aPen.SetLineJoin(Gdiplus::LineJoinMiterClipped);
+            break;
+        }
+        case basegfx::B2DLineJoin::Round:
+        {
+            aPen.SetLineJoin(Gdiplus::LineJoinRound);
+            break;
+        }
         }
 
-        if(nCount > 250 && basegfx::fTools::more(rLineWidths.getX(), 1.5))
+        switch (eLineCap)
+        {
+        default: /*css::drawing::LineCap_BUTT*/
         {
-            impAddB2DPolygonToGDIPlusGraphicsPathInteger(pPath, rPolygon, bNoLineJoin);
+            // nothing to do
+            break;
         }
-        else
+        case css::drawing::LineCap_ROUND:
+        {
+            aPen.SetStartCap(Gdiplus::LineCapRound);
+            aPen.SetEndCap(Gdiplus::LineCapRound);
+            break;
+        }
+        case css::drawing::LineCap_SQUARE:
         {
-            impAddB2DPolygonToGDIPlusGraphicsPathReal(pPath, rPolygon, bNoLineJoin);
+            aPen.SetStartCap(Gdiplus::LineCapSquare);
+            aPen.SetEndCap(Gdiplus::LineCapSquare);
+            break;
+        }
         }
 
-        if(rPolygon.isClosed() && !bNoLineJoin)
+        impAddB2DPolygonToGDIPlusGraphicsPathReal(pPath, rPolygon, bNoLineJoin, &rLineWidths);
+
+        if (rPolygon.isClosed() && !bNoLineJoin)
         {
             // #i101491# needed to create the correct line joins
-            Gdiplus::DllExports::GdipClosePathFigure(pPath);
+            aGraphicsPath.CloseFigure();
         }
 
-        if(mrParent.getAntiAliasB2DDraw())
+        if (mrParent.getAntiAliasB2DDraw())
         {
-            Gdiplus::DllExports::GdipSetSmoothingMode(pGraphics, Gdiplus::SmoothingModeAntiAlias);
+            aGraphics.SetSmoothingMode(Gdiplus::SmoothingModeAntiAlias);
         }
         else
         {
-            Gdiplus::DllExports::GdipSetSmoothingMode(pGraphics, Gdiplus::SmoothingModeNone);
+            aGraphics.SetSmoothingMode(Gdiplus::SmoothingModeNone);
         }
 
-        Gdiplus::DllExports::GdipDrawPath(pGraphics, pTestPen, pPath);
-
-        Gdiplus::DllExports::GdipDeletePath(pPath);
-        Gdiplus::DllExports::GdipDeletePen(pTestPen);
-        Gdiplus::DllExports::GdipDeleteGraphics(pGraphics);
+        aGraphics.DrawPath(&aPen, &aGraphicsPath);
     }
 
     return true;
commit c3b6721bffbe3016ad5059142d124e972195bc18
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date:   Fri Jul 1 15:20:00 2016 +0200

    tdf#99165 avoid passing empty control points for beziers
    
    Some graphic sub systems have problems to create correct
    geometry for fat line drawing when 'empty' control points
    are handed over for bezier curves. Avoid this by offering the
    mathematical correct default in that cases.
    
    Change-Id: I20f484ef4537076889d832d83581844690514acc

diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index b145032..d8b6cec 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -1049,7 +1049,9 @@ drawinglayer::primitive2d::Primitive2DContainer SwOLEObj::tryToGetChartContentAs
 
         if(aXModel.is())
         {
-            static bool bAnynchronousLoadingAllowed = true;
+            // due to some problems in test cases with the SharedOptimalPool,
+            // I need to deactivate this for now
+            static bool bAnynchronousLoadingAllowed = false;
 
             if(bSynchron ||
                 !bAnynchronousLoadingAllowed ||
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index a92ffd0..522c354 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -767,6 +767,7 @@ bool X11SalGraphics::drawPolyLine(
             const bool bSnapPoints(!getAntiAliasB2DDraw());
             static basegfx::B2DHomMatrix aHalfPointTransform(basegfx::tools::createTranslateB2DHomMatrix(0.5, 0.5));
             basegfx::B2DCubicBezier aEdge;
+            basegfx::B2DPoint aStart;
 
             for(sal_uInt32 i = 0; i < nEdgeCount; ++i)
             {
@@ -781,7 +782,7 @@ bool X11SalGraphics::drawPolyLine(
 
                 if(!i || bNoJoin)
                 {
-                    const basegfx::B2DPoint aStart(aEdge.getStartPoint());
+                    aStart = aEdge.getStartPoint();
                     cairo_move_to(cr, aStart.getX(), aStart.getY());
                 }
 
@@ -789,8 +790,23 @@ bool X11SalGraphics::drawPolyLine(
 
                 if(aEdge.isBezier())
                 {
-                    const basegfx::B2DPoint aCP1(aEdge.getControlPointA());
-                    const basegfx::B2DPoint aCP2(aEdge.getControlPointB());
+                    basegfx::B2DPoint aCP1(aEdge.getControlPointA());
+                    basegfx::B2DPoint aCP2(aEdge.getControlPointB());
+
+                    // tdf#99165 cairo has problems in creating the evtl. needed
+                    // miter graphics (and maybe others) when empty control points
+                    // are used, so fallback to the mathematical 'default' control
+                    // points in that case
+                    if(aStart.equal(aCP1))
+                    {
+                        aCP1 = aStart + ((aCP2 - aStart) * 0.3);
+                    }
+
+                    if(aEnd.equal(aCP2))
+                    {
+                        aCP2 = aEnd + ((aCP1 - aEnd) * 0.3);
+                    }
+
                     cairo_curve_to(cr,
                         aCP1.getX(), aCP1.getY(),
                         aCP2.getX(), aCP2.getY(),
@@ -800,6 +816,8 @@ bool X11SalGraphics::drawPolyLine(
                 {
                     cairo_line_to(cr, aEnd.getX(), aEnd.getY());
                 }
+
+                aStart = aEnd;
             }
 
             if(rPolygon.isClosed() && !bNoJoin)
commit c0b2c1d9c4da825eb1162879870f84400b2a75a1
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date:   Fri Jul 1 15:10:00 2016 +0200

    sw: tdf#50613 fix async chart load handling
    
    Especially if synchronous loading is requested, an async worker is on the way
    and we would need to 'wait' for the data.
    
    Change-Id: I20f9938738c1b46bda6b9a7f5a761e82153aed3b

diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
index 59ed831..785cde7 100644
--- a/sw/inc/ndole.hxx
+++ b/sw/inc/ndole.hxx
@@ -45,7 +45,7 @@ class SW_DLLPUBLIC SwOLEObj
     // eventually buffered data if it is a chart OLE
     drawinglayer::primitive2d::Primitive2DContainer     m_aPrimitive2DSequence;
     basegfx::B2DRange                                   m_aRange;
-    class DeflateData*                                  m_aDeflateData;
+    class DeflateData*                                  m_pDeflateData;
 
     SwOLEObj( const SwOLEObj& rObj ) SAL_DELETED_FUNCTION;
 
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index d194f13..b145032 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -648,18 +648,27 @@ class DeflateData
 {
 private:
     friend class DeflateThread;
+    friend class SwOLEObj;
 

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list