Rebased ref, commits from common ancestor: commit 95e60df984c6706b19412a9ed4a5f17e77c96be4 Author: Katarina Behrens <katarina.behr...@cib.de> Date: Wed Feb 10 14:42:18 2016 +0100
Branded images for msi installer The sizes are 122 x 234, 374 x 44 installed units respectively, according to http://msdn.microsoft.com/de-de/library/windows/desktop/aa369490%28v=vs.85%29.aspx it is 163x312, 499x58 pixels at 96 dpi. I bumped dpi to 120 and it still looks pixelated, but it's as good as it gets. For better results, we need different graphics, with less fine details given the very limited space Change-Id: I4a7eafed16fd79f377d27afa8151cfab614b464b diff --git a/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp b/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp index e267d49ab73e..471eea4c22e6 100644 Binary files a/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp and b/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp differ diff --git a/instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp b/instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp index b824ddf35d9d..2703670952bd 100644 Binary files a/instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp and b/instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp differ commit 1b7db997c47f8dfe1b5cd02a41b647748e8df15a Author: Katarina Behrens <katarina.behr...@cib.de> Date: Tue Feb 9 11:09:30 2016 +0100 Branded application icons sadly, this doesn't replace Windows taskbar icon, that must be living somewhere else. It works on Linux though. Conflicts: icon-themes/galaxy/res/main128.png icon-themes/galaxy/res/mainapp_16.png icon-themes/galaxy/res/mainapp_16_8.png icon-themes/galaxy/res/mainapp_32.png icon-themes/galaxy/res/mainapp_32_8.png icon-themes/galaxy/res/mainapp_48_8.png Change-Id: I028fc68d96f02113622c5e1ec3ed830ac797be0b diff --git a/icon-themes/galaxy/res/main128.png b/icon-themes/galaxy/res/main128.png index 2779337e7b0a..818b7330c25b 100644 Binary files a/icon-themes/galaxy/res/main128.png and b/icon-themes/galaxy/res/main128.png differ diff --git a/icon-themes/galaxy/res/mainapp_16.png b/icon-themes/galaxy/res/mainapp_16.png old mode 100755 new mode 100644 index 4a96735b6bb6..13945eeadfd4 Binary files a/icon-themes/galaxy/res/mainapp_16.png and b/icon-themes/galaxy/res/mainapp_16.png differ diff --git a/icon-themes/galaxy/res/mainapp_16_8.png b/icon-themes/galaxy/res/mainapp_16_8.png index 94abb952996b..13945eeadfd4 100644 Binary files a/icon-themes/galaxy/res/mainapp_16_8.png and b/icon-themes/galaxy/res/mainapp_16_8.png differ diff --git a/icon-themes/galaxy/res/mainapp_32.png b/icon-themes/galaxy/res/mainapp_32.png index 88e4e1c8f18f..c653935c0c6b 100755 Binary files a/icon-themes/galaxy/res/mainapp_32.png and b/icon-themes/galaxy/res/mainapp_32.png differ diff --git a/icon-themes/galaxy/res/mainapp_32_8.png b/icon-themes/galaxy/res/mainapp_32_8.png index 2c8a21fbcf3b..c653935c0c6b 100644 Binary files a/icon-themes/galaxy/res/mainapp_32_8.png and b/icon-themes/galaxy/res/mainapp_32_8.png differ diff --git a/icon-themes/galaxy/res/mainapp_48_8.png b/icon-themes/galaxy/res/mainapp_48_8.png index cdebedf6a051..562ea23e89c2 100644 Binary files a/icon-themes/galaxy/res/mainapp_48_8.png and b/icon-themes/galaxy/res/mainapp_48_8.png differ commit 4546867fad84e26d7d2a0d443a6283e3910ced13 Author: Katarina Behrens <katarina.behr...@cib.de> Date: Tue Feb 9 10:38:29 2016 +0100 Point to CIB helpdesk it's pretty mean, b/c German translation (which I can't change) says the site is in English, while CIB site is in German only and can't be switched to other lang Conflicts: sfx2/source/appl/appserv.cxx Change-Id: Ifbbb9e9d2bbee40998c07d1c68b61cd20d77dbc3 diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index d6424c2d06ef..9d2ff11b0b4f 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -498,8 +498,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) case SID_SEND_FEEDBACK: { OUString module = SfxHelp::GetCurrentModuleIdentifier(); - OUString sURL("http://hub.libreoffice.org/send-feedback/?LOversion=" + utl::ConfigManager::getAboutBoxProductVersion() + - "&LOlocale=" + utl::ConfigManager::getLocale() + "&LOmodule=" + module.copy(module.lastIndexOf('.') + 1 ) ); + OUString sURL("http://libreoffice.cib.de/support"); sfx2::openUriExternally(sURL, false); break; } commit c2892e52006973cd3785ab170679d5e0491e17fb Author: Katarina Behrens <katarina.behr...@cib.de> Date: Tue Feb 9 10:00:30 2016 +0100 Point to CIB website this idiotic postprocess script hard-codes libreoffice.org for some reason, grr Change-Id: Ide1f19d4da9a437e01118e8baf74c0d1a8ca2e10 diff --git a/instsetoo_native/util/openoffice.lst.in b/instsetoo_native/util/openoffice.lst.in index 06bd10a2004e..134c9143bd61 100644 --- a/instsetoo_native/util/openoffice.lst.in +++ b/instsetoo_native/util/openoffice.lst.in @@ -67,7 +67,7 @@ LibreOffice CHANGETARGETDIR 1 PATCHCODEFILE ooo_patchcodes.txt STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/ - STARTCENTER_INFO_URL https://www.libreoffice.org/ + STARTCENTER_INFO_URL http://libreoffice.cib.de/ STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/ DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/ STARTCENTER_HIDE_EXTERNAL_LINKS 0 @@ -120,7 +120,7 @@ LibreOfficeDev CODEFILENAME codes_ooodev.txt LOCALUSERDIR $ORIGIN/.. STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/ - STARTCENTER_INFO_URL https://www.libreoffice.org/ + STARTCENTER_INFO_URL http://libreoffice.cib.de/ STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/ DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/ STARTCENTER_HIDE_EXTERNAL_LINKS 0 @@ -162,7 +162,7 @@ LibreOffice_SDK CHANGETARGETDIR 1 DONTUSESTARTMENUFOLDER 1 STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/ - STARTCENTER_INFO_URL https://www.libreoffice.org/ + STARTCENTER_INFO_URL http://libreoffice.cib.de/ STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/ DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/ STARTCENTER_HIDE_EXTERNAL_LINKS 0 @@ -208,7 +208,7 @@ LibreOfficeDev_SDK CHANGETARGETDIR 1 DONTUSESTARTMENUFOLDER 1 STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/ - STARTCENTER_INFO_URL https://www.libreoffice.org/ + STARTCENTER_INFO_URL http://libreoffice.cib.de/ STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/ DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/ STARTCENTER_HIDE_EXTERNAL_LINKS 0 diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk index cc12759f676b..584d90b46414 100644 --- a/postprocess/CustomTarget_registry.mk +++ b/postprocess/CustomTarget_registry.mk @@ -547,7 +547,7 @@ postprocess_main_SED := \ -e 's,$${PRODUCTVERSION},$(PRODUCTVERSION),g' \ -e 's,$${PRODUCTEXTENSION},.$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX),g' \ -e 's,$${STARTCENTER_ADDFEATURE_URL},http://extensions.libreoffice.org/,g' \ - -e 's,$${STARTCENTER_INFO_URL},https://www.libreoffice.org/,g' \ + -e 's,$${STARTCENTER_INFO_URL},http://libreoffice.cib.de/,g' \ -e 's,$${STARTCENTER_HIDE_EXTERNAL_LINKS},0,g' \ -e 's,$${STARTCENTER_TEMPLREP_URL},http://templates.libreoffice.org/,g' \ -e 's,$${SYSTEM_LIBEXTTEXTCAT_DATA},$(SYSTEM_LIBEXTTEXTCAT_DATA),g' \ diff --git a/svtools/source/misc/langhelp.cxx b/svtools/source/misc/langhelp.cxx index 16a3a1d8191c..24b066a9dac3 100644 --- a/svtools/source/misc/langhelp.cxx +++ b/svtools/source/misc/langhelp.cxx @@ -16,6 +16,7 @@ void localizeWebserviceURI( OUString& rURI ) { + const OUString aPrefix = "?lang="; OUString aLang = Application::GetSettings().GetUILanguageTag().getLanguage(); if ( aLang.equalsIgnoreAsciiCase("pt") && Application::GetSettings().GetUILanguageTag().getCountry().equalsIgnoreAsciiCase("br") ) @@ -30,6 +31,7 @@ void localizeWebserviceURI( OUString& rURI ) aLang = "zh-tw"; } + rURI += aPrefix; rURI += aLang; } commit b94b268093e5f27e5edcc0075250d2d15aa25e28 Author: Katarina Behrens <katarina.behr...@cib.de> Date: Mon Sep 21 13:47:57 2015 +0200 CIB branding for start center Conflicts: icon-themes/galaxy/sfx2/res/startcenter-logo.png Change-Id: I9887fded72131c7888d6e1b1165a778c8da2952d diff --git a/icon-themes/galaxy/sfx2/res/logo.png b/icon-themes/galaxy/sfx2/res/logo.png index 5d7e59c8d549..1f215d3ba8d0 100644 Binary files a/icon-themes/galaxy/sfx2/res/logo.png and b/icon-themes/galaxy/sfx2/res/logo.png differ diff --git a/icon-themes/galaxy/sfx2/res/startcenter-logo.png b/icon-themes/galaxy/sfx2/res/startcenter-logo.png index 78bc4ebd9e20..ef903fb008a0 100644 Binary files a/icon-themes/galaxy/sfx2/res/startcenter-logo.png and b/icon-themes/galaxy/sfx2/res/startcenter-logo.png differ diff --git a/icon-themes/galaxy/sfx2/res/startcenter-logo.svg b/icon-themes/galaxy/sfx2/res/startcenter-logo.svg new file mode 100644 index 000000000000..e1c80e595d6a --- /dev/null +++ b/icon-themes/galaxy/sfx2/res/startcenter-logo.svg @@ -0,0 +1,144 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + id="svg3360" + version="1.1" + inkscape:version="0.91 r13725" + width="368.00235" + height="116.34795" + viewBox="0 0 368.00235 116.34795" + sodipodi:docname="startcenter-logo.svg"> + <metadata + id="metadata3366"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <defs + id="defs3364"> + <clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath3372"> + <rect + style="fill:#ffd5d5" + id="rect3374" + width="368.00235" + height="116.34795" + x="2.077642" + y="105.41204" /> + </clipPath> + </defs> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1173" + id="namedview3362" + showgrid="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:zoom="0.96262974" + inkscape:cx="182.96235" + inkscape:cy="110.88" + inkscape:window-x="1911" + inkscape:window-y="-9" + inkscape:window-maximized="1" + inkscape:current-layer="svg3360" /> + <image + width="370.07999" + height="221.75999" + preserveAspectRatio="none" + xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgIAAAE0CAYAAABejlvhAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz +AAATOQAAEzkBj8JWAQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAA2VSURB +VHic7d17tJV1mcDx58ABEVkKjnhhLaTERhGJCW+V5n2p43U0Fa8BXijzlrryMs6k2aRLTYs0zBjN +0WLQaTIgkTFRtPKaISZKyk1BFLnfDwcOzB/qck7vFhTOfvdxns/nz9+zOe/DX+e79tnvfuuGdu+1 +LgCAlNrUegEAoHaEAAAkJgQAIDEhAACJCQEASEwIAEBiQgAAEhMCAJCYEACAxIQAACQmBAAgMSEA +AIkJAQBITAgAQGJCAAASEwIAkJgQAIDEhAAAJCYEACAxIQAAiQkBAEhMCABAYkIAABITAgCQmBAA +gMSEAAAkJgQAIDEhAACJCQEASEwIAEBiQgAAEhMCAJCYEACAxIQAACQmBAAgMSEAAIkJAQBITAgA +QGJCAAASEwIAkJgQAIDEhAAAJCYEACAxIQAAiQkBAEhMCABAYkIAABITAgCQmBAAgMSEAAAkJgQA +IDEhAACJCQEASEwIAEBiQgAAEhMCAJCYEACAxIQAACQmBAAgMSEAAIkJAQBITAgAQGJCAAASEwIA +kJgQAIDEhAAAJCYEACAxIQAAiQkBAEhMCABAYkIAABITAgCQmBAAgMSEAAAkJgQAIDEhAACJCQEA +SEwIAEBiQgAAEhMCAJCYEACAxIQAACQmBAAgMSEAAIkJAQBITAgAQGJCAAASEwIAkJgQAIDEhAAA +JCYEACAxIQAAiQkBAEhMCABAYkIAABITAgCQmBAAgMSEAAAkJgQAIDEhAACJCQEASEwIAEBiQgAA +EhMCAJCYEACAxIQAACQmBAAgMSEAAIkJAQBITAgAQGJCAAASEwIAkJgQAIDEhAAAJCYEACAxIQAA +iQkBAEhMCABAYkIAABITAgCQmBAAgMSEAAAkJgQAIDEhAACJCQEASEwIAEBiQgAAEhMCAJCYEACA +xIQAACQmBAAgMSEAAIkJAQBITAgAQGJCAAASEwIAkJgQAIDEhAAAJCYEACAxIQAAiQkBAEhMCABA +YkIAABITAgCQmBAAgMSEAAAkJgQAIDEhAACJCQEASEwIAEBiQgAAEhMCAJCYEACAxIQAACQmBAAg +MSEAAIkJAQBITAgAQGJCAAASEwIAkJgQAIDEhAAAJCYEACAxIQAAiQkBAEhMCABAYkIAABITAgCQ +mBAAgMSEAAAkJgQAIDEhAACJCQEASEwIAEBiQgAAEhMCAJCYEACAxIQAACQmBAAgMSEAAIkJAQBI +TAgAQGJCAAASEwIAkJgQAIDEhAAAJCYEACAxIQAAiQkBAEhMCABAYkIAABITAgCQWH2tFwDg/7ft +9+wXu5x4XGy21Za1XuVjWb1iRcz4n3Ex/ZHHNvjabvvsGbucdHy026Jji+6waNqMmDjsnli1aHGL +/txK6oZ277Wu6lcBIKWufXrHCSNHRJv6trVe5RN7Ycgd8dwtt33kfNt/6BMnPDg86tpW5/82b9Kr +8aujTop1a9dW5ed/wJ8GAKiazx528KcyAiIi9rj4vNjn8m995HzHg/avWgRERGzTu1d03ukzVfv5 +HxACAFRNfcfNa73CJul3weD48r98u+Js7kuTqn79+o4t+yeHSoQAAKxH38GD4sv/ennh/I1x42Pi +sHvKX6iF+bAgAKUacfDRsXDKtFqvUdE2vXeNY4bfHR26dG523vfcgVG/+ebx5NXXRaz78KN1T33v +pljTsCr2uPDrZa/aYrwjAADvmzdpcow+7axoWLCwMOt9Rv844PprIurqmp0/d/OQeGHIHWWt2OKE +AAD8H/MmTY7fnHhmrJg7rzDb7fST44Abro26Ns1/fT53y23xpx/+pKwVW5QQAIC/sXDKtBh58sBY +8e7cwmy3006qGAPP//An8cwNt5a1YosRAgBQwaKp02Jk/4GxfM67hVmvU0+MA2+8rhADE+7493jm +hlvKWrFFCAEA+AiLpk6PUacMqhgDu/Y/IQ4ZcmPhuwQm3HFXPP39m8tacZMJAQBYj0VTp8eo/gNj ++TtzCrPPHXdUHDrkxsKXJr1458/jqe/dVNaKm0QIAMAGLJo2Ix484YxYOuutwmznY4+MQ398cyEG +Jg67J5785+82u92wNRICAPAxLJ31Vow8aUAsmTmrMOt59BFx6G0/KMTApF/cH0+08hgQAgDwMS19 +a3aMPHlALHlzZmHW86jD49Dbb4k29c2/q++VXz4QT1x1bdUfHrSxhAAAfALL3no7RvYfGEveqBAD +Rx4WRwz7cbRt377Z+SvD/yueuPKaVhkDQgAAPqH3YmBALJ7xZmHW45AD4/CfDSnEwKsj/jvGX/Gd +VhcDQgAANsKy2e/Eb756RsXnJvQ4+IA4Ytht0XazzZqdT77/1zHu4iti7ZqmstbcICEAABtpxdx5 +Mar/wFj4+tTCbMeDvlIxBl4f+VCMu/jyVhMDQgAANsGKufNiZP+BseC1KYXZjgfuF/941+1R36FD +s/Mpox+ORy/6dquIASEAAJto5bz5Mar/wFjw19cLs+777xtH3XtntNuiY7Pzqb8dG49ecFmsXbOm +rDUrEgIA0AJWzl8Qo04ZFPMnv1aYdfviXnHkPT8txsCYR2LsuRdFU2NjWWsWCAEAaCEr5y+I0aee +FfNf/Wth1m2fPeOo/7gz2nXaotn5G+PGx+++eWmsXb268G+aGhqqtusHhAAAtKCV8xfEyJMHxNyX +Xi7Mdth7j4oxMP2Rx2Ls4IubvTMwb9LkWDh1etX3FQIA0MJWLV4So087O9598S+F2Q579Yuj7/tZ +tO/Uqdn5G+PGx6+POyVeuvu++NOPhsbo08+OdU3V/zChEACAKli1ZGn89oxzYs6Elwqz7ff4Qhw7 +4u7YbKstm53PmzQ5/njtDfH8rbdHw4KFpewpBACgSt6LgXNjzp8nFmZdP797HDP8rtis81Y12OxD +QgAAqqhx6fsx8MKLhVnXPr3jmOF3RYcunWuw2XuEAABUWeOyZTH69LNj9tPPFWZdd98tjhl+d81i +QAgAQAlWr1gZYwadF2899Wxhtk3vXd+Lga27lL6XEACAkmwoBv7pV/dFx67blLqTEACAEq1Z2RBj +Bp0Xs/7wdGHWZeed4rgH7omO23YtbR8hAAAlW7OyIR4+6/yY9funCrPOPXeK4+7/eWyx3bal7CIE +AKAG1jQ0xMNnXxAzn/hDYda5505x+J1Doq5N9X9NCwEAqJE1DQ3x8DkXxpuP/74w265f39jqMztW +fQchAAA11LRqVYw998KY/czzhVm7v/ka4moQAgBQY02NjRUfUlQGIQAAiQkBAEhMCABAYkIAABIT +AgCQmBAAgNagrq4mlxUCAJCYEACAxIQAACQmBAAgMSEAAIkJAQBoDdw1AACUTQgAQGJCAAASEwIA +kJgQAIDEhAAAJCYEAKAVqHP7IABQNiEAAIkJAQBITAgAQGJCAAASEwIAkJgQAIDWwO2DAEDZhAAA +JCYEACAxIQAAiQkBAEhMCABAK+ChQwCQWIetu9TkukIAAFqBbT+/e+Fs7ZrVVb+uEACAGuvap3ds +9dkehfPlb8+p+rWFAADUWN/BAwtnS2bOioaFi6p+bSEAADX0d7vtEjsffUThfMbvHi/l+kIAAGql +ri72++7VUde2bfPzdevilV8+UMoKQgAAaqTv2V+LbvvsWTifMW58LHx9aik7CAEAqIGufXrHF6+6 +tHC+rqkpnrtpSGl7CAEAKFn7Tp3isKG3Rpt27Qqzl+8dEfMnv1baLkIAAEpU16ZNHPSDf4ste3Qv +zJa8OTOevflHpe4jBACgRPtec1XsdORhhfN1TU3x2CVXxeply0vdRwgAQEn2uOgb0WfQ6RVnz940 +JN5+/s8lbyQEAKAUvU75aux92YUVZ9PHPhoTfnpXyRu9RwgAQJXtevLxsf/110ZUeMLgnAkvxbhL +roxYt678xSKiviZXBYAkvnDeORVvE4yIWPDalHhowNdj9fIVJW/1ISEAAFVQ17ZtfOW6q6P3madU +nC+b/U489LXBsWrR4pI3a04IAEAL67B1lzj4lu9Hj0MOrDhfOW9+jDp1UCyb/U65i1UgBACgBXX7 +0t5x6JAbY4vtt6s4XzJzVjx05uBYPP2NkjerTAgAQAtoU9829vzW+dHv/HOLDxF637sTX44xA78R +K+cvKHm7jyYEAGATdT9gv9j3O1dEl8/1/MjXvPnYk/HINy+J1StWlrjZhgkBANgI9Zt3iB6HHBh9 +zxkQ2/Xru97Xvnzvf8Yfr70+1q5pKmm7j08IAFCqvS69IFYtWVLrNTZa2/bto1O3HWK7fn2jvkOH +9b529bLlMf7Ka2LKqDElbffJCQEAStXz6CNqvUIp3nlhQjx+2dWxaNqMWq+yXkIAgOqp0bfl1VLD +wkXx/K23x6T7RsS6tWtrvc4GCQEAqmb+5NdrvUJpGpcujUm/eCAmDB0WqxZ/ev70IQQAqJrXHhwd +3b60V/z98cdGm/rKt9R9mq1atDjenfiXmDb20Zgyckw0LltW65U+sbqh3Xvle98GgFK1bd8+6jdf +/wfrPm3Wrl7d6m4F3BjeEQCg6poaG6OpsbHWa1CBxxADQGJCAAASEwIAkJgQAIDEhAAAJCYEACAx +IQAAiQkBAEhMCABAYkIAABITAgCQmBAAgMSEAAAkJgQAIDEhAACJCQEASEwIAEBiQgAAEvtfFz6z +i6MwXbQAAAAASUVORK5CYII= +" + id="image3368" + x="0" + y="0" + clip-path="url(#clipPath3372)" + transform="translate(-2.077642,-105.41204)" /> +</svg> diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index b3998b6eb52d..0b8b304fe691 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -3565,14 +3565,14 @@ <info> <desc>Specifies the background color of the start center.</desc> </info> - <value>14540253</value> + <value>9903402</value> </prop> <prop oor:name="StartCenterTextColor" oor:type="xs:int" oor:nillable="false"> <!-- Default 3355443 = 0x333333 as specified in tdf#90452, comment 45 --> <info> <desc>Specifies the text color of the buttons in the start center.</desc> </info> - <value>3355443</value> + <value>15658734</value> </prop> <prop oor:name="StartCenterThumbnailsBackgroundColor" oor:type="xs:int" oor:nillable="false"> <!-- Default 6710886 = 0x666666 as specified in tdf#90452, comment 45 --> commit bc5bf595c1c8fe61ecf461786d0b7ebba7a74f1b Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Fri Feb 16 18:08:46 2018 +0100 tdf#115783 sd: fix lost char attributes during in-table copy&paste The SvxFontHeightItem (12pt) is originally a character-level property on the table cell (covering the whole cell text) but when the user sets the font height of the cell, sdr::properties::CellProperties::ItemSetChanged() will turn that into a paragraph-level property. This is fine, except that this way the property has unclear semantics when the user pastes single-paragraph content into an existing paragraph. (Keep the old paragraph properties? Use the new ones?) The current behavior is that sd::View::OnEndPasteOrDrop() calls into ContentAttribs::SetStyleSheet() at the end of the paste, which removes paragraph-level formatting (giving visibility to the from-style 18pt font height this way for the existing content), so both the old and the new paragraph formatting is lost. Improve the situation by copying these paragraph-level character properties back to character-level before paste at the paste position (so doc model is back to the state after load), that way font height and similar properties are not removed by the on-end-paste handler. (cherry picked from commit f0c25c751cf8e166a84b289746bce6202a40391d) Conflicts: editeng/source/outliner/outliner.cxx sd/qa/unit/tiledrendering/tiledrendering.cxx sd/source/ui/view/sdview.cxx Change-Id: I43d321dedcda6c0df9b009b9d99c3544f783473c Reviewed-on: https://gerrit.libreoffice.org/49977 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index e52377d85596..2509b05f6a41 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -1738,6 +1738,13 @@ const SfxPoolItem& EditEngine::GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich return pImpEditEngine->GetParaAttrib( nPara, nWhich ); } +void EditEngine::SetCharAttribs(sal_Int32 nPara, const SfxItemSet& rSet) +{ + EditSelection aSel(pImpEditEngine->ConvertSelection(nPara, 0, nPara, GetTextLen(nPara))); + pImpEditEngine->SetAttribs(aSel, rSet); + pImpEditEngine->FormatAndUpdate(); +} + void EditEngine::GetCharAttribs( sal_Int32 nPara, std::vector<EECharAttrib>& rLst ) const { pImpEditEngine->GetCharAttribs( nPara, rLst ); diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 0a63ff17fbb3..3e0116868b37 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -758,6 +758,11 @@ void Outliner::SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) pEditEngine->SetParaAttribs( nPara, rSet ); } +void Outliner::SetCharAttribs(sal_Int32 nPara, const SfxItemSet& rSet) +{ + pEditEngine->SetCharAttribs(nPara, rSet); +} + bool Outliner::Expand( Paragraph* pPara ) { if ( pParaList->HasHiddenChildren( pPara ) ) diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index ff9bed37e27c..8190648e66e0 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -311,6 +311,8 @@ public: virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ); const SfxItemSet& GetParaAttribs( sal_Int32 nPara ) const; + /// Set attributes from rSet an all characters of nPara. + void SetCharAttribs(sal_Int32 nPara, const SfxItemSet& rSet); void GetCharAttribs( sal_Int32 nPara, std::vector<EECharAttrib>& rLst ) const; SfxItemSet GetAttribs( sal_Int32 nPara, sal_Int32 nStart, sal_Int32 nEnd, GetAttribsFlags nFlags = GetAttribsFlags::ALL ) const; diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index dd83ed03c9cd..febc2abe1069 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -904,6 +904,8 @@ public: // Only for EditEngine mode void QuickInsertText( const OUString& rText, const ESelection& rSel ); void QuickDelete( const ESelection& rSel ); + /// Set attributes from rSet an all characters of nPara. + void SetCharAttribs(sal_Int32 nPara, const SfxItemSet& rSet); void RemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich = 0 ); void QuickFormatDoc(); diff --git a/sd/qa/unit/tiledrendering/data/tdf115783.fodp b/sd/qa/unit/tiledrendering/data/tdf115783.fodp new file mode 100644 index 000000000000..d9ada63ad15e --- /dev/null +++ b/sd/qa/unit/tiledrendering/data/tdf115783.fodp @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> +<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xml ns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.presentation"> + <office:font-face-decls> + <style:font-face style:name="Arial" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/> + </office:font-face-decls> + <office:automatic-styles> + <style:style style:name="co1" style:family="table-column"> + <style:table-column-properties style:column-width="4.3cm" style:use-optimal-column-width="false"/> + </style:style> + <style:style style:name="co2" style:family="table-column"> + <style:table-column-properties style:column-width="6.241cm" style:use-optimal-column-width="false"/> + </style:style> + <style:style style:name="co3" style:family="table-column"> + <style:table-column-properties style:column-width="4.909cm" style:use-optimal-column-width="false"/> + </style:style> + <style:style style:name="ro1" style:family="table-row"> + <style:table-row-properties style:row-height="1.364cm"/> + </style:style> + <style:style style:name="ce1" style:family="table-cell"> + <loext:graphic-properties draw:fill="none" style:repeat="repeat"/> + <style:paragraph-properties fo:border="0.03pt solid #000000"/> + <style:text-properties style:font-name="Arial" fo:font-size="12pt"/> + </style:style> + <style:style style:name="T1" style:family="text"> + <style:text-properties style:font-name="Arial" fo:font-size="12pt"/> + </style:style> + </office:automatic-styles> + <office:body> + <office:presentation> + <draw:page draw:name="page1"> + <draw:frame draw:style-name="standard" draw:layer="layout" svg:width="15.449cm" svg:height="1.363cm" svg:x="2.179cm" svg:y="3.302cm"> + <table:table table:template-name="default"> + <table:table-column table:style-name="co1"/> + <table:table-column table:style-name="co2"/> + <table:table-column table:style-name="co3"/> + <table:table-row table:style-name="ro1" table:default-cell-style-name="ce1"> + <table:table-cell> + <text:p><text:span text:style-name="T1">before</text:span></text:p> + </table:table-cell> + <table:table-cell> + <text:p><text:span text:style-name="T1">hello</text:span></text:p> + </table:table-cell> + <table:table-cell> + <text:p><text:span text:style-name="T1">after</text:span></text:p> + </table:table-cell> + </table:table-row> + </table:table> + </draw:frame> + </draw:page> + </office:presentation> + </office:body> +</office:document> diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index 0a2a2c9e7e2f..721efa9be498 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -100,6 +100,7 @@ public: void testTdf105502(); void testCommentCallbacks(); void testMultiViewInsertDeletePage(); + void testTdf115783(); CPPUNIT_TEST_SUITE(SdTiledRenderingTest); CPPUNIT_TEST(testRegisterCallback); @@ -136,6 +137,7 @@ public: CPPUNIT_TEST(testTdf105502); CPPUNIT_TEST(testCommentCallbacks); CPPUNIT_TEST(testMultiViewInsertDeletePage); + CPPUNIT_TEST(testTdf115783); CPPUNIT_TEST_SUITE_END(); @@ -1762,6 +1764,81 @@ void SdTiledRenderingTest::testMultiViewInsertDeletePage() comphelper::LibreOfficeKit::setActive(false); } +void SdTiledRenderingTest::testTdf115783() +{ + // Load the document. + comphelper::LibreOfficeKit::setActive(); + SdXImpressDocument* pXImpressDocument = createDoc("tdf115783.fodp"); + sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell(); + SdPage* pActualPage = pViewShell->GetActualPage(); + SdrObject* pObject = pActualPage->GetObj(0); + auto pTableObject = dynamic_cast<sdr::table::SdrTableObj*>(pObject); + CPPUNIT_ASSERT(pTableObject); + SdrView* pView = pViewShell->GetView(); + pView->MarkObj(pTableObject, pView->GetSdrPageView()); + + // Create a cell selection and set font height. + // Go to the end of the B1 cell. + pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_LEFT); + pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_LEFT); + // Create a B1->C1 cell selection. + const int nShiftRight = KEY_SHIFT + KEY_RIGHT; + pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, nShiftRight); + pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, nShiftRight); + uno::Sequence<beans::PropertyValue> aArgs = comphelper::InitPropertySequence({ + { "FontHeight.Height", uno::makeAny(static_cast<float>(12)) }, + }); + comphelper::dispatchCommand(".uno:FontHeight", aArgs); + Scheduler::ProcessEventsToIdle(); + + // Create a text selection on the B1 cell. + pTableObject->setActiveCell(sdr::table::CellPos(1, 0)); + pView->SdrBeginTextEdit(pTableObject); + EditView& rEditView = pView->GetTextEditOutlinerView()->GetEditView(); + // Start para, start char, end para, end char. + rEditView.SetSelection(ESelection(0, 0, 0, 5)); + CPPUNIT_ASSERT_EQUAL(OUString("hello"), rEditView.GetSelected()); + + // Copy selection, paste at the start of the cell. + aArgs = {}; + comphelper::dispatchCommand(".uno:Copy", aArgs); + Scheduler::ProcessEventsToIdle(); + rEditView.SetSelection(ESelection(0, 0, 0, 0)); + aArgs = {}; + comphelper::dispatchCommand(".uno:Paste", aArgs); + Scheduler::ProcessEventsToIdle(); + pView->SdrEndTextEdit(); + + // And now verify that the cell has the correct font size. + uno::Reference<table::XCellRange> xTable(pTableObject->getTable(), uno::UNO_QUERY); + CPPUNIT_ASSERT(xTable.is()); + uno::Reference<text::XTextRange> xCell(xTable->getCellByPosition(1, 0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xCell.is()); + uno::Reference<container::XEnumerationAccess> xText(xCell->getText(), uno::UNO_QUERY); + CPPUNIT_ASSERT(xText.is()); + uno::Reference<container::XEnumerationAccess> xParagraph( + xText->createEnumeration()->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT(xParagraph.is()); + uno::Reference<text::XTextRange> xPortion(xParagraph->createEnumeration()->nextElement(), + uno::UNO_QUERY); + CPPUNIT_ASSERT(xPortion.is()); + CPPUNIT_ASSERT_EQUAL(OUString("hello"), xPortion->getString()); + uno::Reference<beans::XPropertySet> xPropertySet(xPortion, uno::UNO_QUERY); + int nHeight = xPropertySet->getPropertyValue("CharHeight").get<float>(); + // This was 18. + CPPUNIT_ASSERT_EQUAL(12, nHeight); + + xPortion.set(xParagraph->createEnumeration()->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT(xPortion.is()); + CPPUNIT_ASSERT_EQUAL(OUString("hello"), xPortion->getString()); + xPropertySet.set(xPortion, uno::UNO_QUERY); + nHeight = xPropertySet->getPropertyValue("CharHeight").get<float>(); + // This was also 18. + CPPUNIT_ASSERT_EQUAL(12, nHeight); + + comphelper::LibreOfficeKit::setActive(false); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdTiledRenderingTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 8d6543a45744..bd59235bf8bb 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -95,6 +95,8 @@ #include <sfx2/lokhelper.hxx> #include <LibreOfficeKit/LibreOfficeKitEnums.h> #include "DrawController.hxx" +#include <svl/itemiter.hxx> +#include <editeng/editeng.hxx> #include <memory> #include <numeric> @@ -1191,8 +1193,17 @@ void View::CheckPossibilities() maSmartTags.CheckPossibilities(); } -void View::OnBeginPasteOrDrop( PasteOrDropInfos* /*pInfo*/ ) +void View::OnBeginPasteOrDrop( PasteOrDropInfos* pInfo ) { + SdrOutliner* pOutliner = GetTextEditOutliner(); + if (!pOutliner) + return; + + // Turn character attributes of the paragraph of the insert position into + // character-level attributes, so they are not lost when OnEndPasteOrDrop() + // sets the paragraph stylesheet. + SfxItemSet aSet(pOutliner->GetParaAttribs(pInfo->nStartPara)); + pOutliner->SetCharAttribs(pInfo->nStartPara, aSet); } /** this is called after a paste or drop operation, make sure that the newly inserted paragraphs commit 744c267f8f6de0ba4a829874992c1404b5b79e28 Author: Caolán McNamara <caol...@redhat.com> Date: Sun Feb 18 21:16:06 2018 +0000 ofz#6450 use the rule name, not the rule itself Change-Id: I62541dc48b7e9d5a906f32791437a86a8283a7bf Reviewed-on: https://gerrit.libreoffice.org/49954 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <mst...@redhat.com> diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 9f6b1fef2c22..005d73d53b9b 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -976,7 +976,7 @@ struct ANLDRuleMap OUString msOutlineNumRule; // WinWord 6 numbering, variant 1 OUString msNumberingNumRule; // WinWord 6 numbering, variant 2 SwNumRule* GetNumRule(SwDoc& rDoc, sal_uInt8 nNumType); - void SetNumRule(SwNumRule*, sal_uInt8 nNumType); + void SetNumRule(const OUString& rNumRule, sal_uInt8 nNumType); }; struct SprmReadInfo; diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index a1239d2f8e4f..e72f71c39412 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -1024,13 +1024,12 @@ SwNumRule *ANLDRuleMap::GetNumRule(SwDoc& rDoc, sal_uInt8 nNumType) return rDoc.FindNumRulePtr(rNumRule); } -void ANLDRuleMap::SetNumRule(SwNumRule *pRule, sal_uInt8 nNumType) +void ANLDRuleMap::SetNumRule(const OUString& rNumRule, sal_uInt8 nNumType) { - OUString sNumRule = pRule ? pRule->GetName() : OUString(); if (WW8_Numbering == nNumType) - msNumberingNumRule = sNumRule; + msNumberingNumRule = rNumRule; else - msOutlineNumRule = sNumRule; + msOutlineNumRule = rNumRule; } // StartAnl is called at the beginning of a row area that contains @@ -1102,7 +1101,7 @@ void SwWW8ImplReader::StartAnl(const sal_uInt8* pSprm13) m_pCtrlStck->NewAttr(*m_pPaM->GetPoint(), SfxStringItem(RES_FLTR_NUMRULE, sNumRule)); - m_aANLDRules.SetNumRule(pNumRule, m_nWwNumType); + m_aANLDRules.SetNumRule(sNumRule, m_nWwNumType); } // NextAnlLine() is called once for every row of a commit 082773aa308c854d91b824e414903c296e110d85 Author: Stephan Bergmann <sberg...@redhat.com> Date: Fri Feb 16 23:15:56 2018 +0100 DocumentSettingsSerializer must be SAL_DLLPUBLIC_RTTI for dynamic_cast ...in SdXMLImport::SetConfigurationSettings (xmloff/source/draw/sdxmlimp.cxx) to work with instances of sd::DocumentSettings (defined in sd/source/ui/unoidl/UnoDocumentSettings.cxx, derived from DocumentSettingsSerializer), at least on platforms using the strict by-address RTTI equality check form (e.g., macOS). (Cross-casts like this are not detected by loplugin:dyncastvisibility.) Change-Id: I3f8712f9c64852cc8cb17c0c25211963360f117c Reviewed-on: https://gerrit.libreoffice.org/49884 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Stephan Bergmann <sberg...@redhat.com> (cherry picked from commit ff570b4b58dbf274d3094d21d974f18b613e9b4b) Reviewed-on: https://gerrit.libreoffice.org/49929 Reviewed-by: Michael Stahl <mst...@redhat.com> diff --git a/include/xmloff/settingsstore.hxx b/include/xmloff/settingsstore.hxx index e78ae0a82ca3..0878a5ec288f 100644 --- a/include/xmloff/settingsstore.hxx +++ b/include/xmloff/settingsstore.hxx @@ -18,7 +18,7 @@ // Scans list of properties for certain URL properties that could refer // to internal objects, and initializes from these. -class DocumentSettingsSerializer { +class SAL_DLLPUBLIC_RTTI DocumentSettingsSerializer { public: // Import objects and update properties (eliding URLs) virtual css::uno::Sequence<css::beans::PropertyValue> commit 54fac33e16550c1dd95c89362130229ba2b54270 Author: Eike Rathke <er...@redhat.com> Date: Thu Feb 15 12:50:40 2018 +0100 Resolves: tdf#115046 don't restore a sheet-local DBData from temporary And don't clear AutoFilter button flags in the new temporary range. Change-Id: I273de1e04632ac99c267523b2843665d257fd361 (cherry picked from commit 74d30155c5067271fb98bacbcb895c215e61678d) Reviewed-on: https://gerrit.libreoffice.org/49810 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx index 9412f23b7c65..ca1a19f10263 100644 --- a/sc/inc/dbdata.hxx +++ b/sc/inc/dbdata.hxx @@ -122,6 +122,7 @@ public: const OUString& GetName() const { return aName; } const OUString& GetUpperName() const { return aUpper; } + SCTAB GetTab() const { return nTable; } void GetArea(SCTAB& rTab, SCCOL& rCol1, SCROW& rRow1, SCCOL& rCol2, SCROW& rRow2) const; SC_DLLPUBLIC void GetArea(ScRange& rRange) const; void SetArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2); diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx index d247d39ab25d..4599c2da6065 100644 --- a/sc/source/ui/docshell/docsh5.cxx +++ b/sc/source/ui/docshell/docsh5.cxx @@ -222,8 +222,10 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe // other ranges, use the document global temporary anonymous range // instead. But, if AutoFilter is to be toggled then do use the // sheet-local DB range. + bool bSheetLocal = true; if (eMode != SC_DB_AUTOFILTER && pNoNameData->HasAutoFilter()) { + bSheetLocal = false; pNoNameData = aDocument.GetAnonymousDBData(); if (!pNoNameData) { @@ -231,14 +233,24 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe nTab, nStartCol, nStartRow, nEndCol, nEndRow, true, bHasHeader); aDocument.SetAnonymousDBData( pNoNameData); } + // ScDocShell::CancelAutoDBRange() would restore the + // sheet-local anonymous DBData from pOldAutoDBRange, unset so + // that won't happen with data of a previous sheet-local + // DBData. + delete pOldAutoDBRange; + pOldAutoDBRange = nullptr; } - - if ( !pOldAutoDBRange ) + else if (!pOldAutoDBRange) { // store the old unnamed database range with its settings for undo // (store at the first change, get the state before all changes) pOldAutoDBRange = new ScDBData( *pNoNameData ); } + else if (pOldAutoDBRange->GetTab() != pNoNameData->GetTab()) + { + // Different sheet-local unnamed DB range than the previous one. + *pOldAutoDBRange = *pNoNameData; + } SCCOL nOldX1; // take old range away cleanly SCROW nOldY1; //! (UNDO ???) @@ -255,7 +267,10 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe nStartCol <= nOldY2 && nOldY1 <= nEndCol) bHasHeader = true; - DBAreaDeleted( nOldTab, nOldX1, nOldY1, nOldX2 ); + // Remove AutoFilter button flags only for sheet-local DB range, + // not if a temporary is used. + if (bSheetLocal) + DBAreaDeleted( nOldTab, nOldX1, nOldY1, nOldX2 ); pNoNameData->SetSortParam( ScSortParam() ); // reset parameter pNoNameData->SetQueryParam( ScQueryParam() ); commit 8ce3110540804112efb530878517ab51147b7c66 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Wed Feb 14 15:31:35 2018 +0100 tdf#115719 DOCX import: increase paragraph spacing for anchored objects ... like Word 2013 does, when the version string indicates that the new layout is wanted. An alternative to this change would be to add a new sw layout compatibility flag and handle this at a layout level (somewhere in SwAnchoredObject::GetObjRectWithSpaces()). The downside of that approach is that once a layout flag is added, it's not preferred to tweak its behavior, while doing the same at import time is not a problem. Also it's better to have a flag for something which has clear behavior in some spec / implementer notes, which is not the case for this problem. (I've mailed dochelp@microsoft, no answer so far.) (cherry picked from commit 8b73bafbc18acb4dd8911d2f2de8158d98eb6144) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport11.cxx Change-Id: Ibad28d27e4bcbe1991a3be1c686064e18e9ffa4d Reviewed-on: https://gerrit.libreoffice.org/49803 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/sw/qa/extras/ooxmlexport/data/tdf115719.docx b/sw/qa/extras/ooxmlexport/data/tdf115719.docx new file mode 100644 index 000000000000..9519a2a14524 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf115719.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx index 74cb6c7143e8..f5553c5b7d1d 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx @@ -703,6 +703,13 @@ DECLARE_OOXMLEXPORT_TEST(testGraphicObjectFliph, "graphic-object-fliph.docx") CPPUNIT_ASSERT(getProperty<bool>(getShape(1), "HoriMirroredOnOddPages")); } +DECLARE_OOXMLEXPORT_TEST(testTdf115719, "tdf115719.docx") +{ + // This was a single page, instead of pushing the textboxes to the second + // page. + CPPUNIT_ASSERT_EQUAL(2, getPages()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index db2c4fa4d5c9..0015a90eb39a 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -312,34 +312,6 @@ void lcl_DecrementHoriOrientPosition(std::vector<beans::PropertyValue>& rFramePr } } -sal_Int32 lcl_getWordCompatibilityMode( const css::uno::Sequence< css::beans::PropertyValue >& rCompatSettings ) -{ - for ( int i = 0; i < rCompatSettings.getLength(); ++i ) - { - const css::beans::PropertyValue& rProp = rCompatSettings[i]; - if ( rProp.Name == "compatSetting" ) - { - css::uno::Sequence< css::beans::PropertyValue > aCurrentCompatSettings; - rProp.Value >>= aCurrentCompatSettings; - - OUString sName; - OUString sUri; - OUString sVal; - - aCurrentCompatSettings[0].Value >>= sName; - aCurrentCompatSettings[1].Value >>= sUri; - aCurrentCompatSettings[2].Value >>= sVal; - - if ( sName == "compatibilityMode" && sUri == "http://schemas.microsoft.com/office/word" ) - { - return sVal.toInt32(); - } - } - } - - return -1; // Word compatibility mode not found -} - TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo & rInfo, std::vector<beans::PropertyValue>& rFrameProperties) { // will receive the table style if any @@ -576,7 +548,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo // tdf#106742: since MS Word 2013 (compatibilityMode >= 15), top-level tables are handled the same as nested tables; // this is also the default behavior in LO when DOCX doesn't define "compatibilityMode" option - sal_Int32 nMode = lcl_getWordCompatibilityMode( m_rDMapper_Impl.GetSettingsTable()->GetCompatSettings() ); + sal_Int32 nMode = m_rDMapper_Impl.GetSettingsTable()->GetWordCompatibilityMode(); if ( nMode > 0 && nMode <= 14 && rInfo.nNestLevel == 1 ) { diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 3ad6fb7e8fa7..0eef1be53d00 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1258,6 +1258,17 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap ) xTextRange = xTextAppend->finishParagraph( comphelper::containerToSequence(aProperties) ); m_xPreviousParagraph.set(xTextRange, uno::UNO_QUERY); + + if (!rAppendContext.m_aAnchoredObjects.empty()) + { + // Remember what objects are anchored to this paragraph. + AnchoredObjectInfo aInfo; + aInfo.m_xParagraph = xTextRange; + aInfo.m_aAnchoredObjects = rAppendContext.m_aAnchoredObjects; + m_aAnchoredObjectAnchors.push_back(aInfo); + rAppendContext.m_aAnchoredObjects.clear(); + } + // We're no longer right after a table conversion. m_bConvertedTable = false; @@ -5014,8 +5025,14 @@ void DomainMapper_Impl::ImportGraphic(const writerfilter::Reference< Properties //insert it into the document at the current cursor position OSL_ENSURE( xTextContent.is(), "DomainMapper_Impl::ImportGraphic"); if( xTextContent.is()) + { appendTextContent( xTextContent, uno::Sequence< beans::PropertyValue >() ); + if (eGraphicImportType == IMPORT_AS_DETECTED_ANCHOR && !m_aTextAppendStack.empty()) + // Remember this object is anchored to the current paragraph. + m_aTextAppendStack.top().m_aAnchoredObjects.push_back(xTextContent); + } + // Clear the reference, so in case the embedded object is inside a // TextFrame, we won't try to resize it (to match the size of the // TextFrame) here. diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 65274fcc7d46..247a7875778f 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -206,6 +206,12 @@ struct TextAppendContext css::uno::Reference<css::text::XParagraphCursor> xCursor; ParagraphPropertiesPtr pLastParagraphProperties; + /** + * Objects anchored to the current paragraph, may affect the paragraph + * spacing. + */ + std::vector<css::uno::Reference<css::text::XTextContent>> m_aAnchoredObjects; + TextAppendContext(const css::uno::Reference<css::text::XTextAppend>& xAppend, const css::uno::Reference<css::text::XTextCursor>& xCur) : xTextAppend(xAppend) { @@ -324,6 +330,13 @@ struct FloatingTableInfo css::uno::Any getPropertyValue(const OUString &propertyName); }; +/// Stores info about objects anchored to a given paragraph. +struct AnchoredObjectInfo +{ + css::uno::Reference<css::text::XTextRange> m_xParagraph; + std::vector<css::uno::Reference<css::text::XTextContent>> m_aAnchoredObjects; +}; + struct SymbolData { sal_Unicode cSymbol; @@ -859,6 +872,9 @@ public: /// Pending floating tables: they may be converted to text frames at the section end. std::vector<FloatingTableInfo> m_aPendingFloatingTables; + /// Paragraphs with anchored objects in the current section. + std::vector<AnchoredObjectInfo> m_aAnchoredObjectAnchors; + /// Append a property to a sub-grabbag if necessary (e.g. 'lineRule', 'auto') void appendGrabBag(std::vector<css::beans::PropertyValue>& rInteropGrabBag, const OUString& aKey, const OUString& aValue); void appendGrabBag(std::vector<css::beans::PropertyValue>& rInteropGrabBag, const OUString& aKey, std::vector<css::beans::PropertyValue>& rValue); diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index 41a023cffc45..96799cb2cbc7 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -1123,6 +1123,72 @@ void SectionPropertyMap::InheritOrFinalizePageStyles( DomainMapper_Impl& rDM_Imp } } +void SectionPropertyMap::HandleIncreasedAnchoredObjectSpacing(DomainMapper_Impl& rDM_Impl) +{ + // Ignore Word 2010 and older. + if (rDM_Impl.GetSettingsTable()->GetWordCompatibilityMode() < 15) + return; + + sal_Int32 nPageWidth = GetPageWidth(); + sal_Int32 nTextAreaWidth = nPageWidth - GetLeftMargin() - GetRightMargin(); + + std::vector<AnchoredObjectInfo>& rAnchoredObjectAnchors = rDM_Impl.m_aAnchoredObjectAnchors; + for (auto& rAnchor : rAnchoredObjectAnchors) + { + // Analyze the anchored objects of this paragraph, now that we know the + // page width. + sal_Int32 nShapesWidth = 0; + for (const auto& rAnchored : rAnchor.m_aAnchoredObjects) + { + uno::Reference<drawing::XShape> xShape(rAnchored, uno::UNO_QUERY); + if (!xShape.is()) + continue; + + uno::Reference<beans::XPropertySet> xPropertySet(rAnchored, uno::UNO_QUERY); + if (!xPropertySet.is()) + continue; + + // Ignore objects with no wrapping. + text::WrapTextMode eWrap = text::WrapTextMode_THROUGH; + xPropertySet->getPropertyValue("Surround") >>= eWrap; + if (eWrap == text::WrapTextMode_THROUGH) + continue; + + sal_Int32 nLeftMargin = 0; + xPropertySet->getPropertyValue("LeftMargin") >>= nLeftMargin; + sal_Int32 nRightMargin = 0; + xPropertySet->getPropertyValue("RightMargin") >>= nRightMargin; + nShapesWidth += xShape->getSize().Width + nLeftMargin + nRightMargin; + } + + // Ignore cases when we have enough horizontal space for the shapes. + if (nTextAreaWidth > nShapesWidth) + continue; + + sal_Int32 nHeight = 0; + for (const auto& rAnchored : rAnchor.m_aAnchoredObjects) + { + uno::Reference<drawing::XShape> xShape(rAnchored, uno::UNO_QUERY); + if (!xShape.is()) + continue; + + nHeight += xShape->getSize().Height; + } + + uno::Reference<beans::XPropertySet> xParagraph(rAnchor.m_xParagraph, uno::UNO_QUERY); + if (xParagraph.is()) + { + sal_Int32 nTopMargin = 0; + xParagraph->getPropertyValue("ParaTopMargin") >>= nTopMargin; + // Increase top spacing of the paragraph to match Word layout + // behavior. + nTopMargin = std::max(nTopMargin, nHeight); + xParagraph->setPropertyValue("ParaTopMargin", uno::makeAny(nTopMargin)); + } + } + rAnchoredObjectAnchors.clear(); +} + void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl ) { // The default section type is nextPage. @@ -1140,6 +1206,8 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl ) } rPendingFloatingTables.clear(); + HandleIncreasedAnchoredObjectSpacing(rDM_Impl); + if ( m_nLnnMod ) { bool bFirst = rDM_Impl.IsLineNumberingSet(); diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx index 96883755159f..14ef8cd6fe81 100644 --- a/writerfilter/source/dmapper/PropertyMap.hxx +++ b/writerfilter/source/dmapper/PropertyMap.hxx @@ -59,6 +59,7 @@ namespace dmapper { class DomainMapper_Impl; struct FloatingTableInfo; +struct AnchoredObjectInfo; enum BorderPosition { @@ -286,6 +287,9 @@ private: // Determines if conversion of a given floating table is wanted or not. bool FloatingTableConversion( DomainMapper_Impl& rDM_Impl, FloatingTableInfo& rInfo ); + /// Increases paragraph spacing according to Word 2013+ needs if necessary. + void HandleIncreasedAnchoredObjectSpacing(DomainMapper_Impl& rDM_Impl); + public: enum PageType { diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx index 6693accb2b9a..0da30f52ad6e 100644 --- a/writerfilter/source/dmapper/SettingsTable.cxx +++ b/writerfilter/source/dmapper/SettingsTable.cxx @@ -426,6 +426,33 @@ void SettingsTable::ApplyProperties(uno::Reference<text::XTextDocument> const& x } } +sal_Int32 SettingsTable::GetWordCompatibilityMode() const +{ + for (const auto& rProp : m_pImpl->m_aCompatSettings) + { + if (rProp.Name == "compatSetting") + { + css::uno::Sequence<css::beans::PropertyValue> aCurrentCompatSettings; + rProp.Value >>= aCurrentCompatSettings; + + OUString sName; + OUString sUri; + OUString sVal; + + aCurrentCompatSettings[0].Value >>= sName; + aCurrentCompatSettings[1].Value >>= sUri; + aCurrentCompatSettings[2].Value >>= sVal; + + if (sName == "compatibilityMode" && sUri == "http://schemas.microsoft.com/office/word") + { + return sVal.toInt32(); + } + } + } + + return -1; // Word compatibility mode not found +} + }//namespace dmapper } //namespace writerfilter diff --git a/writerfilter/source/dmapper/SettingsTable.hxx b/writerfilter/source/dmapper/SettingsTable.hxx index 28db5c26fb73..5c7de7ae618d 100644 --- a/writerfilter/source/dmapper/SettingsTable.hxx +++ b/writerfilter/source/dmapper/SettingsTable.hxx @@ -81,6 +81,8 @@ class SettingsTable : public LoggedProperties, public LoggedTable void ApplyProperties(css::uno::Reference<css::text::XTextDocument> const& xDoc); + sal_Int32 GetWordCompatibilityMode() const; + private: // Properties virtual void lcl_attribute(Id Name, Value & val) override; commit ea3111651ee4e88f7abc359ce8f8eb390bbe7d45 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Tue Feb 13 11:44:36 2018 +0100 sw: work around what seems to be a gcc-4.8 compiler bug Thread 1 "soffice.bin" received signal SIGSEGV, Segmentation fault. (anonymous namespace)::print_type<15> (ctx=..., info=0x7fffffff7f90, unknown_name=...) at ../../../../../libstdc++-v3/src/c++11/debug.cc:641 641 ../../../../../libstdc++-v3/src/c++11/debug.cc: No such file or directory. (gdb) up #1 0x00007ffff6abb008 in (anonymous namespace)::print_description (ctx=..., inst=...) at ../../../../../libstdc++-v3/src/c++11/debug.cc:817 817 in ../../../../../libstdc++-v3/src/c++11/debug.cc (gdb) #2 0x00007ffff6abc7aa in (anonymous namespace)::print_description (param=..., ctx=...) at ../../../../../libstdc++-v3/src/c++11/debug.cc:835 835 in ../../../../../libstdc++-v3/src/c++11/debug.cc (gdb) #3 __gnu_debug::_Error_formatter::_M_error (this=0x7fffffff7af0) at ../../../../../libstdc++-v3/src/c++11/debug.cc:1061 1061 in ../../../../../libstdc++-v3/src/c++11/debug.cc (gdb) #4 0x00007fffca2b6313 in __gnu_debug::operator!=<__gnu_cxx::__normal_iterator<SwAnchoredObject* const*, std::__cxx1998::vector<SwAnchoredObject*, std::allocator<SwAnchoredObject*> > >, std::__debug::vector<SwAnchoredObject*, std::allocator<SwAnchoredObject*> > > (__lhs=0x0, __rhs=invalid iterator) at /usr/include/c++/4.8/debug/safe_iterator.h:535 535 _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(), (gdb) #5 0x00007fffca7f3de2 in SwAnchoredObject::UpdateObjInSortedList (this=0x1fa6fd8) at /git/libreoffice/master/sw/source/core/layout/anchoredobject.cxx:629 629 for (SwAnchoredObject* pAnchoredObj : *pObjs) Given that valgrind doesn't point out anything and the old and the new code is meant to be the same, my only guess is that the baseline gcc has some codegen bug. This happens reasonably frequently, current bugdoc was a DOCX file with 4 shapes anchored to the same paragraph, affecting only dbgutil builds, it seems. The tdf#115719 bugdoc is a reproducer for the crash. (cherry picked from commit d34dcde1d0ccee2d78eea08185f12949f53ceae3) Change-Id: I2316e25eea87f2aa5736576d5168e113480f80e4 Reviewed-on: https://gerrit.libreoffice.org/49835 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <mst...@redhat.com> diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx index 4b79a357771f..dc85d1d235a0 100644 --- a/sw/source/core/layout/anchoredobject.cxx +++ b/sw/source/core/layout/anchoredobject.cxx @@ -625,8 +625,9 @@ void SwAnchoredObject::UpdateObjInSortedList() { const SwSortedObjs* pObjs = GetAnchorFrame()->GetDrawObjs(); // determine start index - for (SwAnchoredObject* pAnchoredObj : *pObjs) + for (auto it = pObjs->begin(); it != pObjs->end(); ++it) { + SwAnchoredObject* pAnchoredObj = *it; if ( pAnchoredObj->ConsiderObjWrapInfluenceOnObjPos() ) pAnchoredObj->InvalidateObjPosForConsiderWrapInfluence(); else commit 831c4f1874f01bcd7282cdf08b1446acc5c4760e Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Feb 14 13:21:40 2018 +0100 tdf#108005: Problems with progress bar while saving document ...as StatusIndicatorFactory::m_pWakeUp is still non-null after it has already been used while loading the document. Regression introduced with 017f250764ec7b4ecb82ac19f5b3f68cadf1bf56 "Ensure WakeUpThread is joined before exit". (Also, WakeUpThread::stop could take up to 25 msec longer than necessary, as it failed to set condition_, so would always have waited for WakeUpThread::execute to finish its next 25 msec condition_.wait call.) Change-Id: Ic7fe15f1b90f3b8292cd2ceccdc2719a00743d44 Reviewed-on: https://gerrit.libreoffice.org/49718 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Stephan Bergmann <sberg...@redhat.com> (cherry picked from commit 57574c2bcc60d37620288c403267c34d960f5863) Reviewed-on: https://gerrit.libreoffice.org/49781 Reviewed-by: Michael Stahl <mst...@redhat.com> diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx index 577cabf82ac3..649145d95833 100644 --- a/framework/source/helper/statusindicatorfactory.cxx +++ b/framework/source/helper/statusindicatorfactory.cxx @@ -18,6 +18,7 @@ */ #include <algorithm> +#include <utility> #include <helper/statusindicatorfactory.hxx> #include <helper/statusindicator.hxx> #include <helper/vclstatusindicator.hxx> @@ -547,7 +548,7 @@ void StatusIndicatorFactory::impl_stopWakeUpThread() rtl::Reference<WakeUpThread> wakeUp; { osl::MutexGuard g(m_mutex); - wakeUp = m_pWakeUp; + std::swap(wakeUp, m_pWakeUp); } if (wakeUp.is()) { diff --git a/framework/source/helper/wakeupthread.cxx b/framework/source/helper/wakeupthread.cxx index b13621225d21..503f6707a010 100644 --- a/framework/source/helper/wakeupthread.cxx +++ b/framework/source/helper/wakeupthread.cxx @@ -53,6 +53,7 @@ void framework::WakeUpThread::stop() { osl::MutexGuard g(mutex_); terminate_ = true; } + condition_.set(); join(); } commit 0963c34dd38bec8c1105c20edecee831ca88fe2d Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Feb 15 08:31:49 2018 +0100 Find Java 9 with the new registry keys on Windows See <https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-EEED398E-AE37- 4D12-AB10-49F82F720027> section "Windows Registry Key Changes". Reviewed-on: https://gerrit.libreoffice.org/49792 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Stephan Bergmann <sberg...@redhat.com> (cherry picked from commit cc8e8215c8d7583f36feca20f0a1235edc05a6d7) Conflicts: jvmfwk/plugins/sunmajor/pluginlib/util.cxx Change-Id: Ic30ce430663cc1608c6268fa937142f73c55f138 Reviewed-on: https://gerrit.libreoffice.org/49812 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <mst...@redhat.com> diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index 3c31e60c63e6..f124d6a29dc8 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -576,35 +576,6 @@ bool decodeOutput(const OString& s, OUString* out) #if defined(_WIN32) -void addJavaInfoFromWinReg( - std::vector<rtl::Reference<VendorBase> > & allInfos, - std::vector<rtl::Reference<VendorBase> > & addedInfos) -{ - // Get Java s from registry - std::vector<OUString> vecJavaHome; - if(getSDKInfoFromRegistry(vecJavaHome)) - { - // create impl objects - typedef std::vector<OUString>::iterator ItHome; - for(ItHome it_home= vecJavaHome.begin(); it_home != vecJavaHome.end(); - ++it_home) - { - getAndAddJREInfoByPath(*it_home, allInfos, addedInfos); - } - } - - vecJavaHome.clear(); - if(getJREInfoFromRegistry(vecJavaHome)) - { - typedef std::vector<OUString>::iterator ItHome; - for(ItHome it_home= vecJavaHome.begin(); it_home != vecJavaHome.end(); - ++it_home) - { - getAndAddJREInfoByPath(*it_home, allInfos, addedInfos); - } - } -} - bool getJavaInfoFromRegistry(const wchar_t* szRegKey, vector<OUString>& vecJavaHome) @@ -686,6 +657,49 @@ bool getJREInfoFromRegistry(vector<OUString>& vecJavaHome) return getJavaInfoFromRegistry(HKEY_SUN_JRE, vecJavaHome); } +void addJavaInfoFromWinReg( + std::vector<rtl::Reference<VendorBase> > & allInfos, + std::vector<rtl::Reference<VendorBase> > & addedInfos) +{ + // Get Java s from registry + std::vector<OUString> vecJavaHome; + if(getSDKInfoFromRegistry(vecJavaHome)) + { + // create impl objects + typedef std::vector<OUString>::iterator ItHome; + for(ItHome it_home= vecJavaHome.begin(); it_home != vecJavaHome.end(); + ++it_home) + { + getAndAddJREInfoByPath(*it_home, allInfos, addedInfos); + } + } + + vecJavaHome.clear(); + if(getJREInfoFromRegistry(vecJavaHome)) + { + typedef std::vector<OUString>::iterator ItHome; + for(ItHome it_home= vecJavaHome.begin(); it_home != vecJavaHome.end(); + ++it_home) + { + getAndAddJREInfoByPath(*it_home, allInfos, addedInfos); + } + } + + vecJavaHome.clear(); + if (getJavaInfoFromRegistry(L"Software\\JavaSoft\\JDK", vecJavaHome)) { + for (auto const & javaHome: vecJavaHome) { + getAndAddJREInfoByPath(javaHome, allInfos, addedInfos); + } + } + + vecJavaHome.clear(); + if (getJavaInfoFromRegistry(L"Software\\JavaSoft\\JRE", vecJavaHome)) { + for (auto const & javaHome: vecJavaHome) { + getAndAddJREInfoByPath(javaHome, allInfos, addedInfos); + } + } +} + #endif // WNT void bubbleSortVersion(vector<rtl::Reference<VendorBase> >& vec) commit 1a1fc4ad83539b63d4dace3ddd3e24a54bf44791 Author: Eike Rathke <er...@redhat.com> Date: Tue Feb 13 17:10:21 2018 +0100 ScSetStringParam::mbCheckLinkFormula for HTML and RTF import This is a combination of 3 commits. Introduce ScSetStringParam::mbCheckLinkFormula (cherry picked from commit 5a93c51e3b7f455ff5d4cfc9e8b6e510fc126b75) Handle ScSetStringParam::mbCheckLinkFormula in ScColumn::ParseString() (cherry picked from commit 271d9ebfe0c4fc57ea6f01a9c048021e5429dd15) Conflicts: sc/source/core/data/column3.cxx ScSetStringParam::mbCheckLinkFormula for HTML and RTF import (cherry picked from commit 98c0bd7ffd008015623b2c5eb8630649394d76f6) d6b0705140baacdb872560f7031efaf0c03f0e00 7cf7cf12142322cbffd5160e9a8dce55efd36be5 Change-Id: I2028fc53f9778606778cd8629611752acd3f1a1c Reviewed-on: https://gerrit.libreoffice.org/49709 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/sc/inc/stringutil.hxx b/sc/inc/stringutil.hxx index c208332b48f6..219a80cd452a 100644 --- a/sc/inc/stringutil.hxx +++ b/sc/inc/stringutil.hxx @@ -88,6 +88,13 @@ struct SAL_WARN_UNUSED SC_DLLPUBLIC ScSetStringParam sc::StartListeningType meStartListening; + /** When true and the string results in a compiled formula, check the + formula tokens for presence of functions that could trigger access to + external resources. This is to be set to true in import filter code, + but not for user input. + */ + bool mbCheckLinkFormula; + ScSetStringParam(); /** diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 28445f7c469a..8e36534e8461 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -1721,11 +1721,15 @@ bool ScColumn::ParseString( rCell.set(rPool.intern(rString)); } else // = Formula - rCell.set( - new ScFormulaCell( + { + ScFormulaCell* pFormulaCell = new ScFormulaCell( pDocument, ScAddress(nCol, nRow, nTabP), rString, formula::FormulaGrammar::mergeToGrammar(formula::FormulaGrammar::GRAM_DEFAULT, eConv), - ScMatrixMode::NONE)); + ScMatrixMode::NONE); + if (aParam.mbCheckLinkFormula) + pDocument->CheckLinkFormulaNeedingCheck( *pFormulaCell->GetCode()); + rCell.set( pFormulaCell); + } } else if ( cFirstChar == '\'') // 'Text { diff --git a/sc/source/core/tool/stringutil.cxx b/sc/source/core/tool/stringutil.cxx index afcbe7412474..f52646c980af 100644 --- a/sc/source/core/tool/stringutil.cxx +++ b/sc/source/core/tool/stringutil.cxx @@ -30,7 +30,8 @@ ScSetStringParam::ScSetStringParam() : mbDetectNumberFormat(true), meSetTextNumFormat(Never), mbHandleApostrophe(true), - meStartListening(sc::SingleCellListening) + meStartListening(sc::SingleCellListening), + mbCheckLinkFormula(false) { } diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx index 0e6eab3bc56c..e0202ce7e6fe 100644 --- a/sc/source/filter/rtf/eeimpars.cxx +++ b/sc/source/filter/rtf/eeimpars.cxx @@ -330,6 +330,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu aParam.mbDetectNumberFormat = true; aParam.meSetTextNumFormat = ScSetStringParam::SpecialNumberOnly; aParam.mbHandleApostrophe = false; + aParam.mbCheckLinkFormula = true; if (!aValStr.isEmpty()) mpDoc->SetValue( nCol, nRow, nTab, fVal ); commit c9cfcd5f56fb2395a281df7466e5a2d9a2cf309e Author: Eike Rathke <er...@redhat.com> Date: Tue Feb 13 18:08:28 2018 +0100 CheckLinkFormulaNeedingCheck() for ScDocumentImport::setFormulaCell() and ScDocumentImport::setMatrixCells() This is a combination of 2 commits. CheckLinkFormulaNeedingCheck() for ScDocumentImport::setFormulaCell() (cherry picked from commit bcd62f2050336951ad56892d6e0a42f63c59a674) Conflicts: sc/source/core/data/documentimport.cxx More CheckLinkFormulaNeedingCheck() for ScDocumentImport::setFormulaCell() and ScDocumentImport::setMatrixCells() (cherry picked from commit f41c14706c6bf8aa5c3df220c706669f1ec6e1f6) Conflicts: sc/source/core/data/documentimport.cxx d3303fb71889c760424459daa79feca0f2510a3c Change-Id: I1587be914b390b2597185dd5af870d1d785010a4 Reviewed-on: https://gerrit.libreoffice.org/49735 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/sc/source/core/data/documentimport.cxx b/sc/source/core/data/documentimport.cxx index 95d38ee08f51..c0e4d3c9e60f 100644 --- a/sc/source/core/data/documentimport.cxx +++ b/sc/source/core/data/documentimport.cxx @@ -25,6 +25,7 @@ #include <svl/sharedstringpool.hxx> #include <svl/languageoptions.hxx> +#include <o3tl/make_unique.hxx> #include <memory> #include <vector> @@ -276,9 +277,14 @@ void ScDocumentImport::setFormulaCell( if (!pBlockPos) return; + std::unique_ptr<ScFormulaCell> pFC = + o3tl::make_unique<ScFormulaCell>(&mpImpl->mrDoc, rPos, rFormula, eGrammar); + + mpImpl->mrDoc.CheckLinkFormulaNeedingCheck( *pFC->GetCode()); + sc::CellStoreType& rCells = pTab->aCol[rPos.Col()].maCells; pBlockPos->miCellPos = - rCells.set(pBlockPos->miCellPos, rPos.Row(), new ScFormulaCell(&mpImpl->mrDoc, rPos, rFormula, eGrammar)); + rCells.set(pBlockPos->miCellPos, rPos.Row(), pFC.release()); } void ScDocumentImport::setFormulaCell(const ScAddress& rPos, ScTokenArray* pArray) @@ -292,9 +298,14 @@ void ScDocumentImport::setFormulaCell(const ScAddress& rPos, ScTokenArray* pArra if (!pBlockPos) return; + std::unique_ptr<ScFormulaCell> pFC = + o3tl::make_unique<ScFormulaCell>(&mpImpl->mrDoc, rPos, pArray); + + mpImpl->mrDoc.CheckLinkFormulaNeedingCheck( *pFC->GetCode()); + sc::CellStoreType& rCells = pTab->aCol[rPos.Col()].maCells; pBlockPos->miCellPos = - rCells.set(pBlockPos->miCellPos, rPos.Row(), new ScFormulaCell(&mpImpl->mrDoc, rPos, pArray)); + rCells.set(pBlockPos->miCellPos, rPos.Row(), pFC.release()); } void ScDocumentImport::setFormulaCell(const ScAddress& rPos, ScFormulaCell* pCell) @@ -308,6 +319,9 @@ void ScDocumentImport::setFormulaCell(const ScAddress& rPos, ScFormulaCell* pCel if (!pBlockPos) return; + if (pCell) + mpImpl->mrDoc.CheckLinkFormulaNeedingCheck( *pCell->GetCode()); + sc::CellStoreType& rCells = pTab->aCol[rPos.Col()].maCells; pBlockPos->miCellPos = rCells.set(pBlockPos->miCellPos, rPos.Row(), pCell); @@ -332,6 +346,8 @@ void ScDocumentImport::setMatrixCells( // Set the master cell. ScFormulaCell* pCell = new ScFormulaCell(&mpImpl->mrDoc, rBasePos, rArray, eGram, ScMatrixMode::Formula); + mpImpl->mrDoc.CheckLinkFormulaNeedingCheck( *pCell->GetCode()); + pBlockPos->miCellPos = rCells.set(pBlockPos->miCellPos, rBasePos.Row(), pCell); commit 6be2c684effd6732c92df7ef75581772adb6dac3 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 13 21:16:56 2018 +0000 ofz#6300 Abrt Change-Id: I814b0e4255894d909d29a9a301488a23acf418a0 Reviewed-on: https://gerrit.libreoffice.org/49688 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Michael Stahl <mst...@redhat.com> diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index eadbf3afcc9a..b0f715f4bd4d 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -1114,7 +1114,8 @@ void ApplyRectangularGradientAsBitmap( const SvxMSDffManager& rManager, SvStream { Size aBitmapSizePixel( static_cast< sal_Int32 >( ( rObjData.aBoundRect.GetWidth() / 2540.0 ) * 90.0 ), // we will create a bitmap with 90 dpi static_cast< sal_Int32 >( ( rObjData.aBoundRect.GetHeight() / 2540.0 ) * 90.0 ) ); - if ( aBitmapSizePixel.Width() && aBitmapSizePixel.Height() && ( aBitmapSizePixel.Width() <= 1024 ) && ( aBitmapSizePixel.Height() <= 1024 ) ) + if (aBitmapSizePixel.Width() > 0 && aBitmapSizePixel.Height() > 0 && + aBitmapSizePixel.Width() <= 1024 && aBitmapSizePixel.Height() <= 1024) { double fFocusX = rManager.GetPropertyValue( DFF_Prop_fillToRight, 0 ) / 65536.0; double fFocusY = rManager.GetPropertyValue( DFF_Prop_fillToBottom, 0 ) / 65536.0; commit 326c9766281e6f80abc042420f1d4be3a27b8aa9 Author: Szymon Kłos <szymon.k...@collabora.com> Date: Wed Jan 3 13:24:32 2018 +0100 tdf#114821 calculate better label position Positioning hack was improved. It calculates position depending on direct chart size factor. Preffered label positions are: top - vertical, and center - horizontal Change-Id: Ic25f08cd0bc3105fe34841dbc3f8aacacb694d43 Reviewed-on: https://gerrit.libreoffice.org/48909 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/48928 Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index a1f2cb737c7f..c2a183363a21 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -54,13 +54,30 @@ using namespace ::com::sun::star::uno; namespace { -/** nested-up sgn function - employs some gratuity around 0 - values - smaller than 0.33 are clamped to 0 +/** Function to get vertical position of label from chart height factor. + Value can be negative, prefer top placement. */ -int lclSgn( double nVal ) +int lclGetPositionY( double nVal ) { - const int intVal=nVal*3; - return intVal == 0 ? 0 : (intVal < 0 ? -1 : 1); + if( nVal <= 0.1 ) + return -1; + else if( nVal <= 0.6 ) + return 0; + else + return 1; +} + +/** Function to get horizontal position of label from chart width factor. + Value can be negative, prefer center placement. +*/ +int lclGetPositionX( double nVal ) +{ + if( nVal <= -0.2 ) + return -1; + else if( nVal <= 0.2 ) + return 0; + else + return 1; } Reference< XLabeledDataSequence > lclCreateLabeledDataSequence( @@ -236,11 +253,8 @@ void DataLabelConverter::convertFromModel( const Reference< XDataSeries >& rxDat csscd::LEFT, csscd::CENTER, csscd::RIGHT, csscd::BOTTOM_LEFT, csscd::BOTTOM, csscd::BOTTOM_RIGHT }; - const double nMax=std::max( - fabs(mrModel.mxLayout->mfX), - fabs(mrModel.mxLayout->mfY)); - const int simplifiedX=lclSgn(mrModel.mxLayout->mfX/nMax); - const int simplifiedY=lclSgn(mrModel.mxLayout->mfY/nMax); + const int simplifiedX = lclGetPositionX(mrModel.mxLayout->mfX); + const int simplifiedY = lclGetPositionY(mrModel.mxLayout->mfY); aPropSet.setProperty( PROP_LabelPlacement, aPositionsLookupTable[ simplifiedX+1 + 3*(simplifiedY+1) ] ); } diff --git a/sd/qa/unit/data/pptx/tdf114821.pptx b/sd/qa/unit/data/pptx/tdf114821.pptx new file mode 100644 index 000000000000..3813b0607903 Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf114821.pptx differ diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index fd3b5721af27..2ab15a7763eb 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -56,6 +56,7 @@ #include <com/sun/star/animations/XAnimationNode.hpp> #include <com/sun/star/animations/XAnimate.hpp> #include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/chart/DataLabelPlacement.hpp> #include <com/sun/star/chart/XChartDocument.hpp> #include <com/sun/star/chart2/XChartDocument.hpp> #include <com/sun/star/chart2/XDataSeriesContainer.hpp> @@ -165,6 +166,7 @@ public: void testTdf109223(); void testActiveXCheckbox(); void testTdf108926(); + void testTdf114821(); bool checkPattern(sd::DrawDocShellRef& rDocRef, int nShapeNumber, std::vector<sal_uInt8>& rExpected); void testPatternImport(); @@ -237,6 +239,7 @@ public: CPPUNIT_TEST(testTdf109223); CPPUNIT_TEST(testActiveXCheckbox); CPPUNIT_TEST(testTdf108926); + CPPUNIT_TEST(testTdf114821); CPPUNIT_TEST_SUITE_END(); }; @@ -2313,6 +2316,52 @@ void SdImportTest::testTdf108926() xDocShRef->DoClose(); } +void SdImportTest::testTdf114821() +{ + css::uno::Any aAny; + sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc( "/sd/qa/unit/data/pptx/tdf114821.pptx" ), PPTX ); + + uno::Reference< beans::XPropertySet > xPropSet( getShapeFromPage( 0, 0, xDocShRef ) ); + aAny = xPropSet->getPropertyValue( "Model" ); + CPPUNIT_ASSERT_MESSAGE( "The shape doesn't have the property", aAny.hasValue() ); + + uno::Reference< chart::XChartDocument > xChartDoc; + aAny >>= xChartDoc; + CPPUNIT_ASSERT_MESSAGE( "failed to load chart", xChartDoc.is() ); + uno::Reference< chart2::XChartDocument > xChart2Doc( xChartDoc, uno::UNO_QUERY ); + CPPUNIT_ASSERT_MESSAGE( "failed to load chart", xChart2Doc.is() ); + + uno::Reference< chart2::XCoordinateSystemContainer > xBCooSysCnt( xChart2Doc->getFirstDiagram(), uno::UNO_QUERY ); + uno::Sequence< uno::Reference< chart2::XCoordinateSystem > > aCooSysSeq( xBCooSysCnt->getCoordinateSystems() ); + uno::Reference< chart2::XChartTypeContainer > xCTCnt( aCooSysSeq[0], uno::UNO_QUERY ); + + uno::Reference< chart2::XDataSeriesContainer > xDSCnt( xCTCnt->getChartTypes()[0], uno::UNO_QUERY ); + CPPUNIT_ASSERT_MESSAGE( "failed to load data series", xDSCnt.is() ); + uno::Sequence< uno::Reference< chart2::XDataSeries > > aSeriesSeq( xDSCnt->getDataSeries() ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Invalid Series count", static_cast<sal_Int32>( 1 ), aSeriesSeq.getLength() ); + + // Check the first label + const css::uno::Reference< css::beans::XPropertySet >& rPropSet0( aSeriesSeq[0]->getDataPointByIndex( 0 ) ); + CPPUNIT_ASSERT( rPropSet0.is() ); + sal_Int32 aPlacement; + rPropSet0->getPropertyValue( "LabelPlacement" ) >>= aPlacement; + CPPUNIT_ASSERT_EQUAL( css::chart::DataLabelPlacement::TOP, aPlacement ); + + // Check the second label + const css::uno::Reference< css::beans::XPropertySet >& rPropSet1( aSeriesSeq[0]->getDataPointByIndex( 1 ) ); + CPPUNIT_ASSERT( rPropSet1.is() ); + rPropSet1->getPropertyValue( "LabelPlacement" ) >>= aPlacement; + CPPUNIT_ASSERT_EQUAL( css::chart::DataLabelPlacement::CENTER, aPlacement ); + + // Check the third label + const css::uno::Reference< css::beans::XPropertySet >& rPropSet2( aSeriesSeq[0]->getDataPointByIndex( 2 ) ); + CPPUNIT_ASSERT( rPropSet2.is() ); + rPropSet2->getPropertyValue( "LabelPlacement") >>= aPlacement; + CPPUNIT_ASSERT_EQUAL( css::chart::DataLabelPlacement::TOP, aPlacement ); + + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); commit 615f4846751fb669ea28cc092eadfd3842ab3220 Author: Michael Meeks <michael.me...@collabora.com> Date: Tue Jan 16 13:31:37 2018 +0000 tdf#113755 - avoid null ptr de-reference during shutdown. Why the PostUserEvent's that should do the XTDataObject async destroy are not completed by here, is rather unclear; but - de-referencing NULL is not a great thing to do during shutdown. http://crashreport.libreoffice.org/stats/crash_details/a7d8fd19-0512-4292-b3a0-140dcff204c8 Change-Id: I3f294379f07f4cfc0106c1b5fc5e705c41e78b03 Reviewed-on: https://gerrit.libreoffice.org/48007 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Meeks <michael.me...@collabora.com> (cherry picked from commit ad7e6339e5e5cf465a2ef25442099eb59f1a0deb) Reviewed-on: https://gerrit.libreoffice.org/49103 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 7430b1a02b9d..997f581c7fba 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -941,6 +941,13 @@ OUString SAL_CALL SfxBaseModel::getURL() Sequence< beans::PropertyValue > SAL_CALL SfxBaseModel::getArgs() { SfxModelGuard aGuard( *this ); + + if (!SfxApplication::Get()) // tdf#113755 + { + SAL_WARN("sfx.appl", "Unexpected operations on model"); + return m_pData->m_seqArguments; + } + if ( m_pData->m_pObjectShell.is() ) { Sequence< beans::PropertyValue > seqArgsNew; commit 9d751166f3cf785b8b350fcff86c2d6864f5633f Author: Eike Rathke <er...@redhat.com> Date: Fri Feb 9 15:17:35 2018 +0100 CheckLinkFormulaNeedingCheck() for .csv import Change-Id: I89be713531436f10b38d38f9e0fa527db1e036cd (cherry picked from commit c7dd72b2bd6a7988e4e1074e9a85222b53ba84ac) Reviewed-on: https://gerrit.libreoffice.org/49501 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/sc/source/core/data/documentimport.cxx b/sc/source/core/data/documentimport.cxx index dd061648e485..95d38ee08f51 100644 --- a/sc/source/core/data/documentimport.cxx +++ b/sc/source/core/data/documentimport.cxx @@ -204,6 +204,7 @@ void ScDocumentImport::setAutoInput(const ScAddress& rPos, const OUString& rStr, pBlockPos->miCellPos = rCells.set(pBlockPos->miCellPos, rPos.Row(), aCell.mfValue); break; case CELLTYPE_FORMULA: + mpImpl->mrDoc.CheckLinkFormulaNeedingCheck( *aCell.mpFormula->GetCode()); // This formula cell instance is directly placed in the document without copying. pBlockPos->miCellPos = rCells.set(pBlockPos->miCellPos, rPos.Row(), aCell.mpFormula); aCell.mpFormula = nullptr; diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 2aa9e57559ac..e48096dc39ec 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -1203,7 +1203,18 @@ static bool lcl_PutString( if ( bUseDocImport ) rDocImport.setAutoInput(ScAddress(nCol, nRow, nTab), rStr, &aParam); else + { pDoc->SetString( nCol, nRow, nTab, rStr, &aParam ); + // ScColumn::ParseString() is strict about the first character + // having to be '=' for formula, so we can use that here and don't + // need to obtain the created cell for each and every value. + if (rStr.getLength() > 1 && rStr[0] == '=') + { + const ScFormulaCell* pFC = pDoc->GetFormulaCell( ScAddress( nCol, nRow, nTab)); + if (pFC) + pDoc->CheckLinkFormulaNeedingCheck( *pFC->GetCode()); + } + } } else { commit 6e41a2980bc8216b72d75c0d972d93a13b89fd0a Author: Eike Rathke <er...@redhat.com> Date: Mon Feb 12 17:02:29 2018 +0100 CheckLinkFormulaNeedingCheck() for .slk import Change-Id: I79953cf4fd6e9e00351a3b1f1687b6024085e395 (cherry picked from commit 664c2902a6672be51c4a3163a5bf44aa2145d408) Reviewed-on: https://gerrit.libreoffice.org/49611 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 1496e66deffd..2aa9e57559ac 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -1857,6 +1857,7 @@ bool ScImportExport::Sylk2Doc( SvStream& rStrm ) const formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_PODF_A1; ScCompiler aComp( pDoc, aPos, eGrammar); ScTokenArray* pCode = aComp.CompileString( aText ); + pDoc->CheckLinkFormulaNeedingCheck( *pCode); if ( ch == 'M' ) { ScMarkData aMark; commit d43502a51d5ea1ef81fb4fdb4c5bfb68017eecbe Author: Tamás Zolnai <tamas.zol...@collabora.com> Date: Wed Feb 7 15:54:41 2018 +0100 tdf#115506: Crash when trying to set pattern fill for tables in Impress Setting pattern list was missed in this specific dialog. Change-Id: I9f47e9e0dd4f99bf5403c70685508b0f14a5bd61 Reviewed-on: https://gerrit.libreoffice.org/49361 Reviewed-by: Julien Nabet <serval2...@yahoo.fr> Tested-by: Jenkins <c...@libreoffice.org> (cherry picked from commit de8a1b4f6c8fcca9fc9cc5ad83c393ecd7292f76) Reviewed-on: https://gerrit.libreoffice.org/49406 Reviewed-by: Michael Stahl <mst...@redhat.com> diff --git a/cui/source/dialogs/sdrcelldlg.cxx b/cui/source/dialogs/sdrcelldlg.cxx index d6e9244cb738..160477c157b9 100644 --- a/cui/source/dialogs/sdrcelldlg.cxx +++ b/cui/source/dialogs/sdrcelldlg.cxx @@ -34,6 +34,7 @@ SvxFormatCellsDialog::SvxFormatCellsDialog( vcl::Window* pParent, const SfxItemS , mpGradientList(pModel->GetGradientList()) , mpHatchingList(pModel->GetHatchList()) , mpBitmapList(pModel->GetBitmapList()) + , mpPatternList(pModel->GetPatternList()) , m_nAreaPageId(0) { AddTabPage("name", RID_SVXPAGE_CHAR_NAME); @@ -51,6 +52,7 @@ void SvxFormatCellsDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) rAreaPage.SetGradientList( mpGradientList ); rAreaPage.SetHatchingList( mpHatchingList ); rAreaPage.SetBitmapList( mpBitmapList ); + rAreaPage.SetPatternList( mpPatternList );; rAreaPage.ActivatePage( mrOutAttrs ); } else if (nId == m_nBorderPageId) diff --git a/cui/source/inc/sdrcelldlg.hxx b/cui/source/inc/sdrcelldlg.hxx index f5939979b96d..6b41e69fc8b3 100644 --- a/cui/source/inc/sdrcelldlg.hxx +++ b/cui/source/inc/sdrcelldlg.hxx @@ -34,6 +34,7 @@ private: XGradientListRef mpGradientList; XHatchListRef mpHatchingList; XBitmapListRef mpBitmapList; + XPatternListRef mpPatternList; sal_uInt16 m_nAreaPageId; sal_uInt16 m_nBorderPageId; commit 505832b92e0e2a395ef22424de33168a76bcc2c3 Author: Laurent BP <laurent.balland-poir...@laposte.net> Date: Sat Feb 10 20:54:25 2018 +0100 tdf#72440 Abs sheet ref must be given When resolving tdf#90799, sheet ref was forced abs But its value must be changed. It worked only if initial sheet = Sheet1 Change-Id: I715f93dce93beb78d767e00dd45fb9634cb173a8 Reviewed-on: https://gerrit.libreoffice.org/49548 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Jenkins <c...@libreoffice.org> (cherry picked from commit d69017c8a17be21657ea7ab9d37023ee59116799) Reviewed-on: https://gerrit.libreoffice.org/49609 diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx index 308b206537d0..8d44d7bc987b 100644 --- a/sc/source/ui/formdlg/formula.cxx +++ b/sc/source/ui/formdlg/formula.cxx @@ -431,8 +431,9 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, ScDocument* pRefDoc ) bool bSingle = aRefData.Ref1 == aRefData.Ref2; if (m_CursorPos.Tab() != rRef.aStart.Tab()) { + // pointer-selected => absolute sheet reference + aRefData.Ref1.SetAbsTab( rRef.aStart.Tab() ); aRefData.Ref1.SetFlag3D(true); - aRefData.Ref1.SetTabRel(false); // pointer-selected => absolute sheet reference } if (bSingle) aArray.AddSingleReference(aRefData.Ref1); commit 8edb74677050ca96fa189b0c27484ba0cd89b37c Author: László Németh <nem...@numbertext.org> Date: Thu Feb 1 16:54:14 2018 +0100 tdf#115382 Hungarian autocorrect: help apostrophe usage Reviewed-on: https://gerrit.libreoffice.org/49111 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: László Németh <nem...@numbertext.org> (cherry-picked from 0d0c13bfbdff85a18433aee6e94558689f0cb722) Change-Id: I1d3368c9acb7ddc90d84bde6db9940b76c3ad8d8 Reviewed-on: https://gerrit.libreoffice.org/49410 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: László Németh <nem...@numbertext.org> Tested-by: László Németh <nem...@numbertext.org> Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/extras/source/autocorr/lang/hu/DocumentList.xml b/extras/source/autocorr/lang/hu/DocumentList.xml index cabf78bf3f67..0ba8796a563c 100644 --- a/extras/source/autocorr/lang/hu/DocumentList.xml +++ b/extras/source/autocorr/lang/hu/DocumentList.xml @@ -14,6 +14,15 @@ <block-list:block block-list:abbreviated-name=".*(r)" block-list:name="®"/> <block-list:block block-list:abbreviated-name=".*(tm)" block-list:name="™"/> <block-list:block block-list:abbreviated-name=".*%-al" block-list:name="%-kal"/> + <block-list:block block-list:abbreviated-name="»" block-list:name="’"/> + <block-list:block block-list:abbreviated-name="»«.*" block-list:name="’"/> + <block-list:block block-list:abbreviated-name=".*«d" block-list:name="’d"/> + <block-list:block block-list:abbreviated-name=".*«ll" block-list:name="’ll"/> + <block-list:block block-list:abbreviated-name=".*«m" block-list:name="’m"/> + <block-list:block block-list:abbreviated-name=".*«re" block-list:name="’re"/> + <block-list:block block-list:abbreviated-name=".*«s" block-list:name="’s"/> + <block-list:block block-list:abbreviated-name=".*«ve" block-list:name="’ve"/> + <block-list:block block-list:abbreviated-name=".*««.*" block-list:name="’"/> <block-list:block block-list:abbreviated-name="°C-szal" block-list:name="°C-kal"/> <block-list:block block-list:abbreviated-name=".*<-.*" block-list:name="←"/> <block-list:block block-list:abbreviated-name="<--" block-list:name="←"/> @@ -28,6 +37,8 @@ <block-list:block block-list:abbreviated-name="abbéli" block-list:name="abbeli"/> <block-list:block block-list:abbreviated-name="abszolut.*" block-list:name="abszolút"/> <block-list:block block-list:abbreviated-name="adatbáziskezelő.*" block-list:name="adatbázis-kezelő"/> + <block-list:block block-list:abbreviated-name="Adj«" block-list:name="Adj’"/> + <block-list:block block-list:abbreviated-name="adj«" block-list:name="adj’"/> <block-list:block block-list:abbreviated-name="Adriennel" block-list:name="Adrienn-nel"/> <block-list:block block-list:abbreviated-name="Adriennél" block-list:name="Adrienn-nél"/> <block-list:block block-list:abbreviated-name="affelett" block-list:name="afelett"/> @@ -76,6 +87,10 @@ <block-list:block block-list:abbreviated-name="billentyü.*" block-list:name="billentyű"/> <block-list:block block-list:abbreviated-name="billiárd asztal.*" block-list:name="biliárdasztal"/> <block-list:block block-list:abbreviated-name="bisztos" block-list:name="biztos"/> + <block-list:block block-list:abbreviated-name="Bizisten" block-list:name="Biz’ isten"/> + <block-list:block block-list:abbreviated-name="bizisten" block-list:name="biz’ isten"/> + <block-list:block block-list:abbreviated-name="Biz«" block-list:name="Biz’"/> + <block-list:block block-list:abbreviated-name="biz«" block-list:name="biz’"/> <block-list:block block-list:abbreviated-name="bíztatás.*" block-list:name="biztatás"/> <block-list:block block-list:abbreviated-name="box" block-list:name="boksz"/> <block-list:block block-list:abbreviated-name="boyler" block-list:name="bojler"/> @@ -211,6 +226,12 @@ <block-list:block block-list:abbreviated-name="gyengénlátók.*" block-list:name="gyengén látók"/> <block-list:block block-list:abbreviated-name="gyepp" block-list:name="gyep"/> <block-list:block block-list:abbreviated-name="had legyek" block-list:name="hadd legyek"/> + <block-list:block block-list:abbreviated-name="Hálaisten" block-list:name="Hála isten"/> + <block-list:block block-list:abbreviated-name="hálaisten" block-list:name="hála isten"/> + <block-list:block block-list:abbreviated-name="Hálisten" block-list:name="Hál’ isten"/> + <block-list:block block-list:abbreviated-name="hálisten" block-list:name="hál’ isten"/> + <block-list:block block-list:abbreviated-name="Hál«" block-list:name="Hál’"/> + <block-list:block block-list:abbreviated-name="hál«" block-list:name="hál’"/> <block-list:block block-list:abbreviated-name="Handel" block-list:name="Händel"/> <block-list:block block-list:abbreviated-name="harcbavetés.*" block-list:name="harcba vetés"/> <block-list:block block-list:abbreviated-name="harmónikus.*" block-list:name="harmonikus"/> @@ -350,6 +371,8 @@ <block-list:block block-list:abbreviated-name="kultúrált.*" block-list:name="kulturált"/> <block-list:block block-list:abbreviated-name="kúpalakú.*" block-list:name="kúp alakú"/> <block-list:block block-list:abbreviated-name="L-alakú.*" block-list:name="L alakú"/> + <block-list:block block-list:abbreviated-name="L«.*" block-list:name="L’"/> + <block-list:block block-list:abbreviated-name="l«.*" block-list:name="l’"/> <block-list:block block-list:abbreviated-name="lámpabura" block-list:name="lámpabúra"/> <block-list:block block-list:abbreviated-name="lámpaburá.*" block-list:name="lámpabúrá"/> <block-list:block block-list:abbreviated-name="ld." block-list:name="l."/> @@ -479,6 +502,8 @@ <block-list:block block-list:abbreviated-name="nagyvonalakban" block-list:name="nagy vonalakban"/> <block-list:block block-list:abbreviated-name="naív.*" block-list:name="naiv"/> <block-list:block block-list:abbreviated-name="napéjegyenlőség.*" block-list:name="nap-éj egyenlőség"/> + <block-list:block block-list:abbreviated-name="Neadjisten" block-list:name="Ne adj’ isten"/> + <block-list:block block-list:abbreviated-name="neadjisten" block-list:name="ne adj’ isten"/> <block-list:block block-list:abbreviated-name="négz" block-list:name="négy"/> <block-list:block block-list:abbreviated-name="négyhónapos.*" block-list:name="négy hónapos"/> <block-list:block block-list:abbreviated-name="négyzetalakú.*" block-list:name="négyzet alakú"/> @@ -511,6 +536,8 @@ <block-list:block block-list:abbreviated-name="nyomonkövetésé.*" block-list:name="nyomon követésé"/> <block-list:block block-list:abbreviated-name="nyujt" block-list:name="nyújt"/> <block-list:block block-list:abbreviated-name="nyul" block-list:name="nyúl"/> + <block-list:block block-list:abbreviated-name="O«.*" block-list:name="O’"/> + <block-list:block block-list:abbreviated-name="o«.*" block-list:name="o’"/> <block-list:block block-list:abbreviated-name="oda-visszaút.*" block-list:name="oda-vissza út"/> <block-list:block block-list:abbreviated-name="oda-visszautazás.*" block-list:name="oda-vissza utazás"/> <block-list:block block-list:abbreviated-name="odf" block-list:name="ODF"/> commit 9826e506a64260d577d463fe49fe46d1e10848e6 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Feb 9 10:35:33 2018 +0000 various sft fixes backport removing unneeded code use ptr diff rather than int (cherry picked from commit 5b426038a7befcaf0d05824ffb20200ff8833ad3) fix mem leak (cherry picked from commit 603cb6cf31a5212d03736a552770e5734b0e8066) check more table sizes (cherry picked from commit 1828490bb22f1c8273c4a9f5b1db819b173ca70d) check cmap offset (cherry picked from commit 683d9883ad8fd6568e6a7832e5bb347c1d043e4b) check tableoffset against size (cherry picked from commit ae73c3ff112e1ed38eb4678ac5745990661a2e66) check ntables offset (cherry picked from commit 75a171a405afd6eac236af93aa9d29a9c3ec9c64) use safeint on calculations (cherry picked from commit 139b6c6cf898467098f3a6f29fa84013a182285f) simplify returns (cherry picked from commit e8b2aad1cb2107304761e68aa380b5c29d8ef22f) extend to cover the last byte needed (cherry picked from commit c7b0117f26a386c98a721ff3897479c268103d74) bounds check (cherry picked from commit bb32616bdd6e3b327654bab0e1d790d8d50b893d) move largest bounds check to start (cherry picked from commit f832198e6a33052c7cc86b25843badfb962a2ae8) android:update safeint header to use the else implementation with clang Clang toolchain does not defines the __builtin_mul_overflow for 32-bit ARM. So, fallback to else implementation of checked_multiply when building Android with Clang Reviewed-on: https://gerrit.libreoffice.org/39005 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> (cherry picked from commit 2149d4a88e9dc88c30e7475f8ea317e5c7b78529) add checked_add Reviewed-on: https://gerrit.libreoffice.org/43779 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit 9cfb27ae6cb94f0a853ff70e9ad9f3109d305a94) Change-Id: I0b59f1b93d31a7cb5b8db2a21736db11aed46536 a174fd94c57cc3c899c10e1c0dc5968965a50427 0d329357ac282d4652b0f7ebc401cbd51963461b 004a6d322f60d916cc4635b362ce948e8a10d7c7 5aae26c38f3645020f0e1d6d7b6877c2727af1b4 a79be052dd3f6b6ed38fb326558924c853af5fff d75f5f4b578fd176c17e5763569f1403260c6594 c063786ba41aa9a985f505e62b43d3d543a0d48f 1a67cb2f1c686032438852fec1267a59fbd04d7f 5177d42b47a4bca614878dce4a69ab16b5cfe163 6d32a6b6f1dd91db42a3f154700ea55603f0e4dd 03fe80f9568759b829fac4e9bcfd496efebe6a26 6120606f521ce121541a5b7f1150229258012d55 10cba898bba528f5f1bfbd583e27a6821c789ab9 Reviewed-on: https://gerrit.libreoffice.org/49485 Reviewed-by: Michael Stahl <mst...@redhat.com> Tested-by: Jenkins <c...@libreoffice.org> diff --git a/include/o3tl/safeint.hxx b/include/o3tl/safeint.hxx index ce144d22d9ea..5ebf353b6bd6 100644 --- a/include/o3tl/safeint.hxx +++ b/include/o3tl/safeint.hxx ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits