From 61559a00790a0fc208eed5c8869e9d772cd50d441e24ff71711f72155cdb04e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 16 May 2014 19:58:40 +0000 Subject: [PATCH 01/27] Accepting request 234328 from home:timar:branches:LibreOffice:Factory build fix on openSUSE 12.3 OBS-URL: https://build.opensuse.org/request/show/234328 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=152 --- ...en-requires-cstring-include-to-build.patch | 44 +++++ libreoffice.changes | 187 +++++++++--------- libreoffice.spec | 7 +- 3 files changed, 145 insertions(+), 93 deletions(-) create mode 100644 0001-std-strlen-requires-cstring-include-to-build.patch diff --git a/0001-std-strlen-requires-cstring-include-to-build.patch b/0001-std-strlen-requires-cstring-include-to-build.patch new file mode 100644 index 0000000..8baf6db --- /dev/null +++ b/0001-std-strlen-requires-cstring-include-to-build.patch @@ -0,0 +1,44 @@ +From f12631e960a2b4123c96e96d2af7d43741d8e6a5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= +Date: Wed, 12 Mar 2014 13:44:29 +0100 +Subject: [PATCH] std::strlen requires cstring include to build + +Or, even simpler, don't bother with the needless namespacing. + +Change-Id: I4bbb115c1c2c89881a0bf88ccd54b0f5cb8b3518 +(cherry picked from commit da9bd301c6f62e829daadb2af6a6b9633d4f1cb9) +Signed-off-by: Andras Timar +--- + sc/source/filter/excel/xestream.cxx | 2 +- + sc/source/filter/qpro/qpro.cxx | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx +index 035a827..df08d2c 100644 +--- a/sc/source/filter/excel/xestream.cxx ++++ b/sc/source/filter/excel/xestream.cxx +@@ -985,7 +985,7 @@ sax_fastparser::FSHelperPtr& XclExpXmlStream::WriteAttributesInternal( sal_Int32 + rStream->write( " " ) + ->writeId( nAttribute ) + ->write( "=\"" ) +- ->writeEscaped( OUString(pValue, std::strlen(pValue), RTL_TEXTENCODING_UTF8) ) ++ ->writeEscaped( OUString(pValue, strlen(pValue), RTL_TEXTENCODING_UTF8) ) + ->write( "\"" ); + } + +diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx +index c370492..793412a 100644 +--- a/sc/source/filter/qpro/qpro.cxx ++++ b/sc/source/filter/qpro/qpro.cxx +@@ -229,7 +229,7 @@ void ScQProReader::readString( OUString &rString, sal_uInt16 nLength ) + sal_Char* pText = new sal_Char[ nLength + 1 ]; + mpStream->Read( pText, nLength ); + pText[ nLength ] = 0; +- rString = OUString( pText, std::strlen(pText), mpStream->GetStreamCharSet() ); ++ rString = OUString( pText, strlen(pText), mpStream->GetStreamCharSet() ); + delete [] pText; + } + +-- +1.8.4.5 + diff --git a/libreoffice.changes b/libreoffice.changes index bfeb6c5..315dda0 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri May 16 10:20:00 UTC 2014 - timar@fsf.hu + +- fix build on openSUSE 12.3 + ------------------------------------------------------------------- Tue May 6 19:58:50 UTC 2014 - tchvatal@suse.com @@ -284,7 +289,7 @@ Fri Jan 17 20:19:39 UTC 2014 - tchvatal@suse.com ------------------------------------------------------------------- Fri Jan 17 20:17:00 UTC 2014 - tchvatal@suse.com -- Updated patch install-with-hardlinks.diff to keep sane whitespace +- Updated patch install-with-hardlinks.diff to keep sane whitespace ------------------------------------------------------------------- Fri Jan 17 20:13:38 UTC 2014 - tchvatal@suse.com @@ -357,17 +362,17 @@ Tue Jan 7 15:09:22 UTC 2014 - tchvatal@suse.com ------------------------------------------------------------------- Mon Jan 6 19:04:53 UTC 2014 - tchvatal@suse.com -- Fix copy&paste +- Fix copy&paste ------------------------------------------------------------------- Mon Jan 6 18:59:34 UTC 2014 - tchvatal@suse.com -- Use bsh2 not bsh1 for dep. Thanks to mvyskocil. +- Use bsh2 not bsh1 for dep. Thanks to mvyskocil. ------------------------------------------------------------------- Mon Jan 6 18:59:09 UTC 2014 - tchvatal@suse.com -- More filelist moves for langpacks and extra files. +- More filelist moves for langpacks and extra files. ------------------------------------------------------------------- Sun Jan 5 20:07:46 UTC 2014 - tchvatal@suse.com @@ -575,7 +580,7 @@ Tue Aug 13 15:21:02 UTC 2013 - pmladek@suse.com ------------------------------------------------------------------- Mon Aug 12 12:30:27 UTC 2013 - dvaleev@suse.com -- disable jfreereport extension for powerpc64 +- disable jfreereport extension for powerpc64 ------------------------------------------------------------------- Thu Aug 1 14:46:22 UTC 2013 - pmladek@suse.com @@ -759,7 +764,7 @@ Tue Jul 30 13:06:00 UTC 2013 - pmladek@suse.com + --without-system-libodfgen on openSUSE < 13.1 + --without-system-harfbuzz on openSUSE < 12.3 - report builder is not longer an extension - + ------------------------------------------------------------------- Fri Jul 26 10:06:40 UTC 2013 - pmladek@suse.com @@ -873,7 +878,7 @@ Fri May 31 15:14:07 UTC 2013 - pmladek@suse.com + stability improvements - conflicts with older icon theme packages to make sure that all icon themes are up-to-date - + * May 17 2013 by pmladek@suse.com in LibreOffice:Unstable - really does not use hardlinks when the save_space feature is not enabled; @@ -1274,21 +1279,21 @@ Thu Feb 21 10:27:15 UTC 2013 - tchvatal@suse.com * fdups to reduce duplicities in the installed files * bluez-devel to support remore control using BlueTooth - add more system libraries into BuildRequires on openSUSE => 12.3: - * clucene-core-devel - * graphite2-devel - * hyphen-devel - * libcdr-devel - * libcmis-devel - * libexttextcat-devel - * liblangtag-devel - * libmspub-devel - * liborcus-devel - * libredland-devel - * libvisio-devel - * mdds-devel - * mysql-connector-c++-devel - * mythes-devel - * ucpp + * clucene-core-devel + * graphite2-devel + * hyphen-devel + * libcdr-devel + * libcmis-devel + * libexttextcat-devel + * liblangtag-devel + * libmspub-devel + * liborcus-devel + * libredland-devel + * libvisio-devel + * mdds-devel + * mysql-connector-c++-devel + * mythes-devel + * ucpp - remove unused build_module_in_parallel and remove obsolete test_build_binfilters defines - update extensions: @@ -1340,14 +1345,14 @@ Thu Feb 21 10:27:15 UTC 2013 - tchvatal@suse.com - system-python-ure-bootstrap.diff and pyuno-path.diff merged into system-pyuno.diff - remove obsolete configure switches: - * --disable-ldap \ - * --disable-mozilla \ - * --enable-xmlsec \ + * --disable-ldap \ + * --disable-mozilla \ + * --enable-xmlsec \ * --enable-binfilter * --disable-strip-solver - * --without-stlport \ - * --without-system-mozilla \ - * --with-openldap \ + * --without-stlport \ + * --without-system-mozilla \ + * --with-openldap \ * --with-java-target-version=1.5 - use configure switches: * --enable-release-build: use the "LibreOffice" name for the final product @@ -1370,11 +1375,11 @@ Thu Feb 21 10:27:15 UTC 2013 - tchvatal@suse.com * --without-system-libcmis * --without-system-libexttextcat * --without-system-liblangtag - * --without-system-libmspub + * --without-system-libmspub * --without-system-libvisio * --without-system-mythes * --without-system-mysql-cppconn - * --without-system-orcus + * --without-system-orcus * --without-system-redland * --without-system-servlet-api - reduce duplicities by fdupes @@ -1523,17 +1528,17 @@ Wed Nov 7 15:30:31 UTC 2012 - pmladek@suse.com * several RTF import/export fixes (fdo#48442, fdo#55526, fdo#52475, fdo#50539, fdo#55939, fdo#52389, fdo#55493, fdo#49655, fdo#52989) - update mdds to version 0.6.1: - * mixed_type_matrix: speed up + * mixed_type_matrix: speed up * flat_segment_tree, point_quad_tree: broken iterator implementation * multi_type_vector(new): efficient storage of data of different types * multi_type_matrix(new): eventually replace mixed_type_matrix - update libcdr to version 0.0.9: * better color import (fdo#54785, fdo#55522) * bin obsolete patches: - * mono-enable-climaker-stuff-in-unoil.diff - * mono-install-cli-when-mono-enabled.diff - * mono-install-mono-before-finalizing-filelits.diff -* pack-addressbook.diff: correctly pack KDE and TDE addressbook (bnc#779697) + * mono-enable-climaker-stuff-in-unoil.diff + * mono-install-cli-when-mono-enabled.diff + * mono-install-mono-before-finalizing-filelits.diff +* pack-addressbook.diff: correctly pack KDE and TDE addressbook (bnc#779697) - flat_logo.svg need to be modified by the branding packages - update mime, desktop files, and icon theme cache from the main package - update desktop files cache also from subpackages that install desktop @@ -1732,7 +1737,7 @@ Tue Oct 30 11:58:44 UTC 2012 - pmladek@suse.com * formula performance improvement for XLSX import (bnc#765942, bnc#763168) * make ctrl-8 and 9 increase/decrease font size in Swedish (fdo#36187) * undocked toolbars do not show all icons in special ratio (fdo#47071) - * lots different import fixes (bnc#758883, bnc#766481, bnc#766487, fdo#46966, + * lots different import fixes (bnc#758883, bnc#766481, bnc#766487, fdo#46966, bnc#693238, bnc#758883, bnc#758883, bnc#766487, bnc#758883, bnc#758883) - update libvisio to version 0.0.18: * Greek code page instead the Russian code page (fdo#48602) @@ -2053,7 +2058,7 @@ Thu Jun 14 15:38:44 UTC 2012 - pmladek@suse.com * more on borders handling (fdo#33634, fdo#38116, fdo#40874, fdo#43249, fdo#46112, fdo#48647, fdo#49438) * UI improvements: - * border window: design by Mirek M. + * border window: design by Mirek M. * layout status control: improved artwork by Mirek M. * calc input line: native rendering of the input line * start centre: solid color fits the new artwork better @@ -2122,7 +2127,7 @@ Thu May 17 19:06:15 UTC 2012 - pmladek@suse.com * add VBA support for BackColor, AutoSize, Locked attributes (bnc#749960) * border painting (fdo#45562, fdo#47717, fdo#42750, fdo#45562, fdo#48647, fdo#44010, fdo#38215) - * lots RTF import/export fixes (fdo#49692, fdo#38176, fdo#48023, fdo#48876, + * lots RTF import/export fixes (fdo#49692, fdo#38176, fdo#48023, fdo#48876, fdo#47764, fdo#48193, fdo#48037, fdo#48356, fdo#49692, fdo#49501, fdo#39053) - jvmfwk-disable-gcj.diff: do not detect GCJ; LO newer worked well @@ -2205,7 +2210,7 @@ Fri Apr 6 14:57:48 UTC 2012 - pmladek@suse.com redland, mythes * bin not longer existing options - use system libwpd, libwpg, libwps, librsvg, vigra on openSUSE >= 11.4 -- remove unused sablot-devel, xalan-j2, xerces-j2, xml-commons-apis +- remove unused sablot-devel, xalan-j2, xerces-j2, xml-commons-apis from BuildRequires and Requires - remove some %if sections for not longer supported openSUSE < 11.1 - update license tag: added BSD-4-Clause, SUSE-Public-Domain, W3C @@ -3568,7 +3573,7 @@ Wed Jun 16 19:17:34 CEST 2010 - pmladek@suse.cz * update translations from the openSUSE community * KDE4 bits: * non-Oxygen theme crashes (bnc#612491, i#112102) - + ------------------------------------------------------------------- Mon May 31 17:27:18 CEST 2010 - pmladek@suse.cz @@ -5132,52 +5137,52 @@ Thu Sep 11 22:44:35 CEST 2008 - pmladek@suse.cz - updated to the milestone ooo300-m5 (3.0rc1) - updated ooo-build to version 3.0.0.4: - * add two buttons to scale Impress text up/down - * right-click Approve/Reject with red lining (bnc#249775) - * enabled again WW-like input-fields and checkboxes - * layouted Find&Replace dialog - * new FadeThroughBlack transition - * search /usr/share/templates/ooo for templates - * more on the layout stuff - * more on the external range names - * annoying PDF permission checks - * various fixes of the 3D transitions - * wrong read-out of fontconfig flags (bnc#407958) - * more on skipping overlapped cells (n#362674, i#86943) - * more on chart subtitle export to XLS (bnc#411855, i#92357) + * add two buttons to scale Impress text up/down + * right-click Approve/Reject with red lining (bnc#249775) + * enabled again WW-like input-fields and checkboxes + * layouted Find&Replace dialog + * new FadeThroughBlack transition + * search /usr/share/templates/ooo for templates + * more on the layout stuff + * more on the external range names + * annoying PDF permission checks + * various fixes of the 3D transitions + * wrong read-out of fontconfig flags (bnc#407958) + * more on skipping overlapped cells (n#362674, i#86943) + * more on chart subtitle export to XLS (bnc#411855, i#92357) * disabled problematic fix for moving cell notes with anchored - cells (i#59745, bnc#422677) - * autohinting problem (bnc#407958) - * broken getRecentFunctionIds() (bnc#422206) - * Cyrillic text displayed with too much spacing (i#92072) - * broken logical size calculation on BMP export - * various uninitialised values - * use V2 format for types.rdb as well - * updated Hungarian translation fixes - * mono support to work again - * non-UTF8 dictionaries (bnc#418307) - * import the content of TOC (bnc#404254) - * bin obsolete hack for searching mozilla certificates - * saving with the external odf-converter (bnc#410982) - * 100% CPU usage while opening GNOME fpicker - * avoid extra tab in the task bar for GNOME fpicker + cells (i#59745, bnc#422677) + * autohinting problem (bnc#407958) + * broken getRecentFunctionIds() (bnc#422206) + * Cyrillic text displayed with too much spacing (i#92072) + * broken logical size calculation on BMP export + * various uninitialised values + * use V2 format for types.rdb as well + * updated Hungarian translation fixes + * mono support to work again + * non-UTF8 dictionaries (bnc#418307) + * import the content of TOC (bnc#404254) + * bin obsolete hack for searching mozilla certificates + * saving with the external odf-converter (bnc#410982) + * 100% CPU usage while opening GNOME fpicker + * avoid extra tab in the task bar for GNOME fpicker * VBA bits: - * more on the user forms and event handling - * various regressions - * sheet copying and associated modules (bnc#417320) - * lcl_ScRange_Parse_XL_Header and 3D flags (bnc#422569) - * ClassModule property with type Variant (bnc#417316, i#93214) - * Range with Listbox.value comparison (bnc#421939) - * number to string comparsion (bnc#422559) - * Application.Worksheetfunctions object issue (bnc#414248) - * more on friendly name for objectmodule tab - * worksheet calculate event - * UNO interface of VBA mode - * updated scsolver to the snapshot 2008-09-08 - * build xpdfwrapper only when necessary - * temporary globally disabled report builder - * allow to install dictionaries again - * set java target 1.5 by default + * more on the user forms and event handling + * various regressions + * sheet copying and associated modules (bnc#417320) + * lcl_ScRange_Parse_XL_Header and 3D flags (bnc#422569) + * ClassModule property with type Variant (bnc#417316, i#93214) + * Range with Listbox.value comparison (bnc#421939) + * number to string comparsion (bnc#422559) + * Application.Worksheetfunctions object issue (bnc#414248) + * more on friendly name for objectmodule tab + * worksheet calculate event + * UNO interface of VBA mode + * updated scsolver to the snapshot 2008-09-08 + * build xpdfwrapper only when necessary + * temporary globally disabled report builder + * allow to install dictionaries again + * set java target 1.5 by default - split build of the package (fate#304700) - the new packages were: * OpenOffice_org-base, OpenOffice_org-bootstrap, OpenOffice_org-calc, @@ -5550,7 +5555,7 @@ Mon Apr 14 14:55:05 CEST 2008 - pmladek@suse.cz - enabled system libwpd, libwps, libwpg, hunspell for openSUSE >= 11.0 - added libwpd-devel libwpg-devel libwps-devel hunspell-devel to BuildRequires for openSUSE >= 11.0 -- created a hacky icon-themes-prebuilt package to speed up the build of the +- created a hacky icon-themes-prebuilt package to speed up the build of the real architecture independent icon-themes package - added "hu ja" to the min language selection to support the split i18n-group2 package @@ -5998,7 +6003,7 @@ Fri Aug 31 18:10:10 CEST 2007 - pmladek@suse.cz * branched SUSE-10.3 configuration - updated libwpd to version 0.8.11 * crashes with tables where cells span more then 0x7f rows - * incorrect reading of font information + * incorrect reading of font information - added the tarball with OOX import filters; all these files were added by patches in the previous versions of ooo-build; it was ugly... - fixed dependency on java; any 64-bit JRE is enough on x86_64 @@ -6539,7 +6544,7 @@ Mon Oct 23 16:18:49 CEST 2006 - pmladek@suse.cz - fixed build with gcc (GCC) 4.1.2 20061018 - added /usr/share/templates to search path for templates; made sure that it was - added also for the existing user configuration + added also for the existing user configuration ------------------------------------------------------------------- Thu Oct 19 21:03:47 CEST 2006 - pmladek@suse.cz @@ -6958,7 +6963,7 @@ Thu Mar 2 20:20:10 CET 2006 - pmladek@suse.cz * bitmap surface drawing * arrows misplacing after sheet recalculation * parallel build of cli_ure fix - * build on ppc without java + * build on ppc without java * new wrappers for smoketest, qadevOOo, qatesttool - updated extra translation sources: Bulgarian, Estonian, Greek, Latvian, Slovak, Slovene @@ -7035,7 +7040,7 @@ Fri Feb 10 13:20:36 CET 2006 - pmladek@suse.cz * some fixes in Cairo stuff * reworked patch for d_type entry based speedup * testtool compatibility with our VBA stuff [#145906] - * too wide "Menu/Insert/Picture/From File..." dialog + * too wide "Menu/Insert/Picture/From File..." dialog * quickstarter argv[0] handling * Hebrew font configuration [#114495] * helpcontent configuration of some localizations @@ -7413,7 +7418,7 @@ Tue Aug 23 17:02:05 CEST 2005 - pmladek@suse.cz * target m125 * updated internal cairo to 0.9.2 * backported lots fixes that were approved for 2.0.1 - * case sensitive autoword completion + * case sensitive autoword completion * proper ms access tab page for creating msaccess db * crash in evo2, fix for new API [#10446] * insensitive menu items [#105864] @@ -7926,7 +7931,7 @@ Wed Jan 19 19:40:16 CET 2005 - pmladek@suse.cz * default optimal page wrap * calc / filter fixes * drop libart bits - * build fixes + * build fixes - renamed package to OpenOffice_org, set prefix to /usr/lib/ooo-2.0, removed the wrappers suffix 1.7, set the package version to 1.9.70 - added de, es, fr and it subpackages diff --git a/libreoffice.spec b/libreoffice.spec index 4abe1f1..b15fd5f 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -85,10 +85,12 @@ Patch11: nlpsolver-no-broken-help.diff Patch12: mediawiki-no-broken-help.diff # LO newer worked well with it Patch13: jvmfwk-disable-gcj.diff -# Fix running wizzards in py2 as the utf is not htere +# Fix running wizards in py2 as the utf is not there Patch16: wizards-create-temlates-with-python-2.6.diff # PATCH-FIX-UPSTREAM: fix kde hanging in 4.2.3.3 Patch18: kde4-4.2.3.3-timer-mutex.patch +# Fix build on openSUSE 12.3 +Patch19: 0001-std-strlen-requires-cstring-include-to-build.patch # try to save space by using hardlinks Patch990: install-with-hardlinks.diff BuildRequires: ImageMagick @@ -773,7 +775,7 @@ Provides additional %{langname} translations and resources for %{project}. \ %langpack -l cy -n Welsh %langpack -l da -n Danish -T -X -m da_DK %langpack -l de -n German -T -X -M -%langpack -l dz -n Dzongkha -s ctl -T +%langpack -l dz -n Dzongkha -s ctl -T %langpack -l el -n Greek -T -m el_GR %langpack -l en -n English -L en-US -T -X -p en-GB -p en-ZA -M %langpack -l es -n Spanish -M -T -X @@ -850,6 +852,7 @@ Provides additional %{langname} translations and resources for %{project}. \ %patch13 -p1 %patch16 -p1 %patch18 -p1 +%patch19 -p1 %patch990 -p1 # 256x256 icons tar -xjf %{SOURCE20} From 6265600c731c4e6dcec517ef61d2c6854eab99115d9201d13322b930805b437f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 19 May 2014 08:17:48 +0000 Subject: [PATCH 02/27] - fix build on openSUSE 12.3: * 0001-std-strlen-requires-cstring-include-to-build.patch OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=153 --- libreoffice.changes | 3 ++- libreoffice.spec | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libreoffice.changes b/libreoffice.changes index 315dda0..6ad4f55 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,7 +1,8 @@ ------------------------------------------------------------------- Fri May 16 10:20:00 UTC 2014 - timar@fsf.hu -- fix build on openSUSE 12.3 +- fix build on openSUSE 12.3: + * 0001-std-strlen-requires-cstring-include-to-build.patch ------------------------------------------------------------------- Tue May 6 19:58:50 UTC 2014 - tchvatal@suse.com diff --git a/libreoffice.spec b/libreoffice.spec index b15fd5f..3fb808c 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -83,7 +83,7 @@ Patch10: system-pyuno.diff # FIXME: the right fix is to compile the help and produce the .db_, .ht_, and other files Patch11: nlpsolver-no-broken-help.diff Patch12: mediawiki-no-broken-help.diff -# LO newer worked well with it +# LO never worked well with it Patch13: jvmfwk-disable-gcj.diff # Fix running wizards in py2 as the utf is not there Patch16: wizards-create-temlates-with-python-2.6.diff From 0a6b54b4d3ecbff50a202f66caed344f8d1d4b816f20cfcd00166301d94bc56a Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Tue, 20 May 2014 10:02:11 +0000 Subject: [PATCH 03/27] - bnc#875713 - LO-L3: DOCX import: picture brigtness/contrast not imported * docx-brightness-contrast-1.diff * docx-brightness-contrast-2.diff - bnc#875712 - LO-L3: DOC import: picture brigtness/contrast not imported * doc-brightness-contrast.diff - bnc#870240 - LO-L3: pptx import file has text rotated on slide * fix-text-rotation.diff - bnc#870234 - LO-L3: pptx file has text imported as black instead of white * import-gradfill-for-text-colors.diff - bnc#870228 - LO-L3: Text inside the circle is not centered * text-alignment-in-shape.diff - bnc#863021 - LO-L3: Allow setting language for slide or presentation entirely * set-language-in-impress.diff - fix build on openSUSE 12.3: * disable-firebird-unit-test.diff OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=154 --- disable-firebird-unit-test.diff | 17 ++ doc-brightness-contrast.diff | 249 +++++++++++++++++++++++++++ docx-brightness-contrast-1.diff | 30 ++++ docx-brightness-contrast-2.diff | 143 +++++++++++++++ fix-text-rotation.diff | 26 +++ import-gradfill-for-text-colors.diff | 75 ++++++++ libreoffice.changes | 45 ++++- libreoffice.spec | 23 +++ set-language-in-impress.diff | 245 ++++++++++++++++++++++++++ text-alignment-in-shape.diff | 58 +++++++ 10 files changed, 910 insertions(+), 1 deletion(-) create mode 100644 disable-firebird-unit-test.diff create mode 100644 doc-brightness-contrast.diff create mode 100644 docx-brightness-contrast-1.diff create mode 100644 docx-brightness-contrast-2.diff create mode 100644 fix-text-rotation.diff create mode 100644 import-gradfill-for-text-colors.diff create mode 100644 set-language-in-impress.diff create mode 100644 text-alignment-in-shape.diff diff --git a/disable-firebird-unit-test.diff b/disable-firebird-unit-test.diff new file mode 100644 index 0000000..60a6ff2 --- /dev/null +++ b/disable-firebird-unit-test.diff @@ -0,0 +1,17 @@ +diff --git a/dbaccess/Module_dbaccess.mk b/dbaccess/Module_dbaccess.mk +index b9d7d56..146c6ee 100644 +--- a/dbaccess/Module_dbaccess.mk ++++ b/dbaccess/Module_dbaccess.mk +@@ -34,12 +34,6 @@ $(eval $(call gb_Module_add_l10n_targets,dbaccess,\ + UIConfig_dbtdata \ + )) + +-ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE) +-$(eval $(call gb_Module_add_check_targets,dbaccess,\ +- CppunitTest_dbaccess_firebird_test \ +-)) +-endif +- + $(eval $(call gb_Module_add_check_targets,dbaccess,\ + CppunitTest_dbaccess_dialog_save \ + CppunitTest_dbaccess_macros_test \ diff --git a/doc-brightness-contrast.diff b/doc-brightness-contrast.diff new file mode 100644 index 0000000..c5a5fa3 --- /dev/null +++ b/doc-brightness-contrast.diff @@ -0,0 +1,249 @@ +From 85e088c70aa3cfdd638276a2555b35ed1275c352 Mon Sep 17 00:00:00 2001 +From: Luboš Luňák +Date: Fri, 18 Apr 2014 18:46:34 +0000 +Subject: handle strange brightness+contrast adjustment from msoffice (fdo#38410) + +LO uses basically the formula "newpixel=(oldpixel-128)*contrast+128+brightness", +i.e. contrast is applied first. It looks like there's no "oficial" formula for this, +so a formula that applies brightness first would be ok too. MSO for some weird reason +apparently uses a formula that applies half of brightness before contrast and +half afterwards (insert funny political correctness or compromise joke here). +While the result is the same like with the LO formula if only either brightness +or contrast is adjusted, the result is different if both are involved. Just modify +the image using the MSO algorithm if this is the case. + +Conflicts: + filter/source/msfilter/msdffimp.cxx + include/vcl/bitmap.hxx + include/vcl/bitmapex.hxx + include/vcl/gdimtf.hxx + vcl/source/gdi/bitmap3.cxx + vcl/source/gdi/bitmapex.cxx + vcl/source/gdi/gdimtf.cxx + +Change-Id: I55fe8f395832685b90f024cf2f58b0797c1ba588 +Reviewed-on: https://gerrit.libreoffice.org/9099 +Reviewed-by: Miklos Vajna +Tested-by: Miklos Vajna +--- +diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx +index 63847b3..472e1a5 100644 +--- a/filter/source/msfilter/msdffimp.cxx ++++ b/filter/source/msfilter/msdffimp.cxx +@@ -3817,7 +3817,12 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons + + if ( nContrast || nBrightness || ( nGamma != 0x10000 ) || ( eDrawMode != GRAPHICDRAWMODE_STANDARD ) ) + { +- if ( ( rObjData.nSpFlags & SP_FOLESHAPE ) == 0 ) ++ // MSO uses a different algorithm for contrast+brightness, LO applies contrast before brightness, ++ // while MSO apparently applies half of brightness before contrast and half after. So if only ++ // contrast or brightness need to be altered, the result is the same, but if both are involved, ++ // there's no way to map that, so just force a conversion of the image. ++ bool needsConversion = nContrast != 0 && nBrightness != 0; ++ if ( ( rObjData.nSpFlags & SP_FOLESHAPE ) == 0 && !needsConversion ) + { + if ( nBrightness ) + rSet.Put( SdrGrafLuminanceItem( nBrightness ) ); +@@ -3842,7 +3847,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons + { + BitmapEx aBitmapEx( aGraf.GetBitmapEx() ); + if ( nBrightness || nContrast || ( nGamma != 0x10000 ) ) +- aBitmapEx.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, sal_False ); ++ aBitmapEx.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, false, true ); + if ( eDrawMode == GRAPHICDRAWMODE_GREYS ) + aBitmapEx.Convert( BMP_CONVERSION_8BIT_GREYS ); + else if ( eDrawMode == GRAPHICDRAWMODE_MONO ) +@@ -3856,7 +3861,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons + { + GDIMetaFile aGdiMetaFile( aGraf.GetGDIMetaFile() ); + if ( nBrightness || nContrast || ( nGamma != 0x10000 ) ) +- aGdiMetaFile.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, sal_False ); ++ aGdiMetaFile.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, false, true ); + if ( eDrawMode == GRAPHICDRAWMODE_GREYS ) + aGdiMetaFile.Convert( MTF_CONVERSION_8BIT_GREYS ); + else if ( eDrawMode == GRAPHICDRAWMODE_MONO ) +diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx +index adf6b63..621fceb 100644 +--- a/include/vcl/bitmap.hxx ++++ b/include/vcl/bitmap.hxx +@@ -779,6 +779,9 @@ public: + If sal_True, invert the channel values with the logical 'not' operator + + @return sal_True, if the operation was completed successfully. ++ ++ @param msoBrightness ++ Use the same formula for brightness as used by MSOffice. + */ + sal_Bool Adjust( short nLuminancePercent = 0, + short nContrastPercent = 0, +@@ -786,7 +789,8 @@ public: + short nChannelGPercent = 0, + short nChannelBPercent = 0, + double fGamma = 1.0, +- sal_Bool bInvert = sal_False ); ++ bool bInvert = false, ++ bool msoBrightness = false ); + + /** Apply specified filter to the bitmap + +diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx +index da23547..8ac6325 100644 +--- a/include/vcl/bitmapex.hxx ++++ b/include/vcl/bitmapex.hxx +@@ -343,6 +343,10 @@ public: + If sal_True, invert the channel values with the logical 'not' operator + + @return sal_True, if the operation was completed successfully. ++ ++ @param msoFormula ++ Use the same formula for brightness as used by MSOffice. ++ + */ + sal_Bool Adjust( short nLuminancePercent = 0, + short nContrastPercent = 0, +@@ -350,7 +354,8 @@ public: + short nChannelGPercent = 0, + short nChannelBPercent = 0, + double fGamma = 1.0, +- sal_Bool bInvert = sal_False ); ++ bool bInvert = false, ++ bool msoBrightness = false ); + + /** Apply specified filter to the bitmap + +diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx +index 8afdc14..d38f863 100644 +--- a/include/vcl/gdimtf.hxx ++++ b/include/vcl/gdimtf.hxx +@@ -150,7 +150,7 @@ public: + void Adjust( short nLuminancePercent = 0, short nContrastPercent = 0, + short nChannelRPercent = 0, short nChannelGPercent = 0, + short nChannelBPercent = 0, double fGamma = 1.0, +- sal_Bool bInvert = sal_False ++ bool bInvert = false, bool msoBrightness = false + ); + + void Convert( MtfConversion eConversion ); +diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx +index 5c4905a..4fbe1b8 100644 +--- a/vcl/source/gdi/bitmap3.cxx ++++ b/vcl/source/gdi/bitmap3.cxx +@@ -3250,7 +3250,7 @@ sal_Bool Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, sal_uLong nFla + + sal_Bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent, + short nChannelRPercent, short nChannelGPercent, short nChannelBPercent, +- double fGamma, sal_Bool bInvert ) ++ double fGamma, bool bInvert, bool msoBrightness ) + { + sal_Bool bRet = sal_False; + +@@ -3282,8 +3282,11 @@ sal_Bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent, + else + fM = ( 128.0 + 1.27 * MinMax( nContrastPercent, -100L, 0L ) ) / 128.0; + +- // total offset = luminance offset + contrast offset +- fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55 + 128.0 - fM * 128.0; ++ if(!msoBrightness) ++ // total offset = luminance offset + contrast offset ++ fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55 + 128.0 - fM * 128.0; ++ else ++ fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55; + + // channel offset = channel offset + total offset + fROff = nChannelRPercent * 2.55 + fOff; +@@ -3297,10 +3300,21 @@ sal_Bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent, + // create mapping table + for( nX = 0L; nX < 256L; nX++ ) + { +- cMapR[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fROff ), 0L, 255L ); +- cMapG[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fGOff ), 0L, 255L ); +- cMapB[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fBOff ), 0L, 255L ); +- ++ if(!msoBrightness) ++ { ++ cMapR[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fROff ), 0L, 255L ); ++ cMapG[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fGOff ), 0L, 255L ); ++ cMapB[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fBOff ), 0L, 255L ); ++ } ++ else ++ { ++ // LO simply uses (in a somewhat optimized form) "newcolor = (oldcolor-128)*contrast+brightness+128" ++ // as the formula, i.e. contrast first, brightness afterwards. MSOffice, for whatever weird reason, ++ // use neither first, but apparently it applies half of brightness before contrast and half afterwards. ++ cMapR[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fROff/2-128) * fM + 128 + fROff/2 ), 0L, 255L ); ++ cMapG[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fGOff/2-128) * fM + 128 + fGOff/2 ), 0L, 255L ); ++ cMapB[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fBOff/2-128) * fM + 128 + fBOff/2 ), 0L, 255L ); ++ } + if( bGamma ) + { + cMapR[ nX ] = GAMMA( cMapR[ nX ], fGamma ); +diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx +index 6deb1db..98c6b24 100644 +--- a/vcl/source/gdi/bitmapex.cxx ++++ b/vcl/source/gdi/bitmapex.cxx +@@ -633,11 +633,11 @@ sal_Bool BitmapEx::Replace( const Color* pSearchColors, const Color* pReplaceCol + + sal_Bool BitmapEx::Adjust( short nLuminancePercent, short nContrastPercent, + short nChannelRPercent, short nChannelGPercent, short nChannelBPercent, +- double fGamma, sal_Bool bInvert ) ++ double fGamma, bool bInvert, bool msoBrightness ) + { + return( !!aBitmap ? aBitmap.Adjust( nLuminancePercent, nContrastPercent, + nChannelRPercent, nChannelGPercent, nChannelBPercent, +- fGamma, bInvert ) : sal_False ); ++ fGamma, bInvert, msoBrightness ) : false ); + } + + sal_Bool BitmapEx::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress ) +diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx +index 2e74172..12ad981 100644 +--- a/vcl/source/gdi/gdimtf.cxx ++++ b/vcl/source/gdi/gdimtf.cxx +@@ -2175,7 +2175,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol + + void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent, + short nChannelRPercent, short nChannelGPercent, +- short nChannelBPercent, double fGamma, sal_Bool bInvert ) ++ short nChannelBPercent, double fGamma, bool bInvert, bool msoBrightness ) + { + // nothing to do? => return quickly + if( nLuminancePercent || nContrastPercent || +@@ -2196,8 +2196,11 @@ void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent, + else + fM = ( 128.0 + 1.27 * MinMax( nContrastPercent, -100L, 0L ) ) / 128.0; + +- // total offset = luminance offset + contrast offset +- fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55 + 128.0 - fM * 128.0; ++ if(!msoBrightness) ++ // total offset = luminance offset + contrast offset ++ fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55 + 128.0 - fM * 128.0; ++ else ++ fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55; + + // channel offset = channel offset + total offset + fROff = nChannelRPercent * 2.55 + fOff; +@@ -2211,10 +2214,18 @@ void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent, + // create mapping table + for( long nX = 0L; nX < 256L; nX++ ) + { +- aColParam.pMapR[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fROff ), 0L, 255L ); +- aColParam.pMapG[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fGOff ), 0L, 255L ); +- aColParam.pMapB[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fBOff ), 0L, 255L ); +- ++ if(!msoBrightness) ++ { ++ aColParam.pMapR[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fROff ), 0L, 255L ); ++ aColParam.pMapG[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fGOff ), 0L, 255L ); ++ aColParam.pMapB[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fBOff ), 0L, 255L ); ++ } ++ else ++ { ++ aColParam.pMapR[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fROff/2-128) * fM + 128 + fROff/2 ), 0L, 255L ); ++ aColParam.pMapG[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fGOff/2-128) * fM + 128 + fGOff/2 ), 0L, 255L ); ++ aColParam.pMapB[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fBOff/2-128) * fM + 128 + fBOff/2 ), 0L, 255L ); ++ } + if( bGamma ) + { + aColParam.pMapR[ nX ] = GAMMA( aColParam.pMapR[ nX ], fGamma ); +-- +cgit v0.9.0.2-2-gbebe diff --git a/docx-brightness-contrast-1.diff b/docx-brightness-contrast-1.diff new file mode 100644 index 0000000..b14b5ba --- /dev/null +++ b/docx-brightness-contrast-1.diff @@ -0,0 +1,30 @@ +From 02dcf4a9b7387f6675324245ab2fa5b7eabf0d12 Mon Sep 17 00:00:00 2001 +From: Luboš Luňák +Date: Wed, 30 Apr 2014 19:52:28 +0000 +Subject: actually read brightness/contrast when reading docx (bnc#875713) + +It's read for the shape in oox/ , but it didn't make it any further apparently. + +Change-Id: I0885a675f72d63b3d262f1ef7e42f5d2e03588b6 +(cherry picked from commit 804da2a977989ba1f046847b9e00f00c83749e30) +Reviewed-on: https://gerrit.libreoffice.org/9216 +Reviewed-by: Caolán McNamara +Tested-by: Caolán McNamara +--- +diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx +index 304a3d2..607d92b 100644 +--- a/writerfilter/source/dmapper/GraphicImport.cxx ++++ b/writerfilter/source/dmapper/GraphicImport.cxx +@@ -924,6 +924,10 @@ void GraphicImport::lcl_attribute(Id nName, Value & val) + xShapeProps->getPropertyValue("ShadowTransparence") >>= m_pImpl->nShadowTransparence; + } + ++ xShapeProps->getPropertyValue("GraphicColorMode") >>= m_pImpl->eColorMode; ++ xShapeProps->getPropertyValue("AdjustLuminance") >>= m_pImpl->nBrightness; ++ xShapeProps->getPropertyValue("AdjustContrast") >>= m_pImpl->nContrast; ++ + // fdo#70457: transform XShape into a SwXTextGraphicObject only if there's no rotation + if ( nRotation == 0 ) + m_xGraphicObject = createGraphicObject( aMediaProperties ); +-- +cgit v0.9.0.2-2-gbebe diff --git a/docx-brightness-contrast-2.diff b/docx-brightness-contrast-2.diff new file mode 100644 index 0000000..0987b24 --- /dev/null +++ b/docx-brightness-contrast-2.diff @@ -0,0 +1,143 @@ +From 75a839188d1cac5f0ac602e59462b32879d2242a Mon Sep 17 00:00:00 2001 +From: Luboš Luňák +Date: Wed, 30 Apr 2014 20:19:08 +0000 +Subject: handle brightness+contrast from msoffice (bnc#875713) + +This is the same like 1139d618b8bc6ab823a96184bd0f0257980aad24, for docx. + +(cherry picked from commit 893fe88469dec5b727d96f8ea1b4edb9e88288a7) + +Conflicts: + oox/source/drawingml/fillproperties.cxx + +Change-Id: I1ef4e18444e8c60e9ae8f67249bcef1053f0d62d +Reviewed-on: https://gerrit.libreoffice.org/9217 +Reviewed-by: Caolán McNamara +Tested-by: Caolán McNamara +--- +diff --git a/offapi/com/sun/star/graphic/XGraphicTransformer.idl b/offapi/com/sun/star/graphic/XGraphicTransformer.idl +index d1a6ddf..dbd9c8d 100644 +--- a/offapi/com/sun/star/graphic/XGraphicTransformer.idl ++++ b/offapi/com/sun/star/graphic/XGraphicTransformer.idl +@@ -51,6 +51,16 @@ interface XGraphicTransformer : ::com::sun::star::uno::XInterface + com::sun::star::graphic::XGraphic applyDuotone( [ in ] com::sun::star::graphic::XGraphic In, + [ in ] long ColorOne, [ in ] long ColorTwo ) + raises( ::com::sun::star::lang::IllegalArgumentException ); ++ ++ /** changes brightness/contrast ++ ++ @param mso whether to use MSOffice brightness/contrast formula ++ @returns ++ The modified graphic ++ */ ++ com::sun::star::graphic::XGraphic applyBrightnessContrast( [ in ] com::sun::star::graphic::XGraphic In, ++ [ in ] long brightness, [ in ] long contrast, [ in ] boolean mso ) ++ raises( ::com::sun::star::lang::IllegalArgumentException ); + }; + + } ; } ; } ; } ; +diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx +index c96c77a..99026a9 100644 +--- a/oox/source/drawingml/fillproperties.cxx ++++ b/oox/source/drawingml/fillproperties.cxx +@@ -92,6 +92,18 @@ Reference< XGraphic > lclCheckAndApplyChangeColorTransform( const BlipFillProper + return xGraphic; + } + ++Reference< XGraphic > applyBrightnessContrast( Reference< XGraphic > xGraphic, sal_Int32 brightness, sal_Int32 contrast ) ++{ ++ try ++ { ++ Reference< XGraphicTransformer > xTransformer( xGraphic, UNO_QUERY_THROW ); ++ xGraphic = xTransformer->applyBrightnessContrast( xGraphic, brightness, contrast, true ); ++ } ++ catch( Exception& ) ++ { ++ } ++ return xGraphic; ++} + + + BitmapMode lclGetBitmapMode( sal_Int32 nToken ) +@@ -501,12 +513,24 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap, + + void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelper& rGraphicHelper, sal_Int32 nPhClr ) const + { ++ sal_Int16 nBrightness = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moBrightness.get( 0 ) / PER_PERCENT, -100, 100 ); ++ sal_Int16 nContrast = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moContrast.get( 0 ) / PER_PERCENT, -100, 100 ); + if( maBlipProps.mxGraphic.is() ) + { + // created transformed graphic + Reference< XGraphic > xGraphic = lclCheckAndApplyDuotoneTransform( maBlipProps, maBlipProps.mxGraphic, rGraphicHelper, nPhClr ); + xGraphic = lclCheckAndApplyChangeColorTransform( maBlipProps, xGraphic, rGraphicHelper, nPhClr ); + ++ // MSO uses a different algorithm for contrast+brightness, LO applies contrast before brightness, ++ // while MSO apparently applies half of brightness before contrast and half after. So if only ++ // contrast or brightness need to be altered, the result is the same, but if both are involved, ++ // there's no way to map that, so just force a conversion of the image. ++ if( nBrightness != 0 && nContrast != 0 ) ++ { ++ xGraphic = applyBrightnessContrast( xGraphic, nBrightness, nContrast ); ++ nBrightness = 0; ++ nContrast = 0; ++ } + rPropMap[ PROP_Graphic ] <<= xGraphic; + + // do we still need to set GraphicURL as well? (TODO) +@@ -545,10 +569,8 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe + rPropMap[ PROP_GraphicColorMode ] <<= eColorMode; + + // brightness and contrast +- sal_Int16 nBrightness = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moBrightness.get( 0 ) / PER_PERCENT, -100, 100 ); + if( nBrightness != 0 ) + rPropMap[ PROP_AdjustLuminance ] <<= nBrightness; +- sal_Int16 nContrast = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moContrast.get( 0 ) / PER_PERCENT, -100, 100 ); + if( nContrast != 0 ) + rPropMap[ PROP_AdjustContrast ] <<= nContrast; + +diff --git a/svtools/source/graphic/transformer.cxx b/svtools/source/graphic/transformer.cxx +index 30f07c7..bf63621 100644 +--- a/svtools/source/graphic/transformer.cxx ++++ b/svtools/source/graphic/transformer.cxx +@@ -159,6 +159,23 @@ uno::Reference< graphic::XGraphic > SAL_CALL GraphicTransformer::applyDuotone( + return xRet; + } + ++uno::Reference< graphic::XGraphic > SAL_CALL GraphicTransformer::applyBrightnessContrast( ++ const uno::Reference< graphic::XGraphic >& rxGraphic, sal_Int32 nBrightness, sal_Int32 nContrast, sal_Bool mso ) ++ throw ( lang::IllegalArgumentException, uno::RuntimeException, std::exception) ++{ ++ const uno::Reference< uno::XInterface > xIFace( rxGraphic, uno::UNO_QUERY ); ++ ::Graphic aGraphic( *::unographic::Graphic::getImplementation( xIFace ) ); ++ ++ BitmapEx aBitmapEx( aGraphic.GetBitmapEx() ); ++ aBitmapEx.Adjust( nBrightness, nContrast, 0, 0, 0, 0, false, mso ); ++ aGraphic = ::Graphic( aBitmapEx ); ++ ++ ::unographic::Graphic* pUnoGraphic = new ::unographic::Graphic(); ++ pUnoGraphic->init( aGraphic ); ++ uno::Reference< graphic::XGraphic > xRet( pUnoGraphic ); ++ return xRet; ++} ++ + } + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +diff --git a/svtools/source/graphic/transformer.hxx b/svtools/source/graphic/transformer.hxx +index e57b8fa..1707183 100644 +--- a/svtools/source/graphic/transformer.hxx ++++ b/svtools/source/graphic/transformer.hxx +@@ -51,6 +51,11 @@ class GraphicTransformer : public GraphicTransformer_UnoImplHelper1 + sal_Int32 nColorOne, sal_Int32 nColorTwo ) + throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + ++ virtual ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > SAL_CALL applyBrightnessContrast( ++ const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >& rxGraphic, ++ sal_Int32 nBrightness, sal_Int32 nContrast, sal_Bool mso ) ++ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; ++ + }; + + } +-- +cgit v0.9.0.2-2-gbebe diff --git a/fix-text-rotation.diff b/fix-text-rotation.diff new file mode 100644 index 0000000..b230221 --- /dev/null +++ b/fix-text-rotation.diff @@ -0,0 +1,26 @@ +From e3e12b1d1e36e1a0d4fc4c6423b584d677693897 Mon Sep 17 00:00:00 2001 +From: Muthu Subramanian +Date: Wed, 26 Mar 2014 10:35:44 +0000 +Subject: n#862510: Fix text rotation. + +Fix breaks document in n#783433 - the one there is +damaged - resaving it using mso 2010 should fix the problem there. + +Change-Id: Ib2ee7ab20489d716dc189ac6810d705763a16476 +--- +diff --git a/oox/source/drawingml/transform2dcontext.cxx b/oox/source/drawingml/transform2dcontext.cxx +index e232b4d..0a1bb59 100644 +--- a/oox/source/drawingml/transform2dcontext.cxx ++++ b/oox/source/drawingml/transform2dcontext.cxx +@@ -46,7 +46,8 @@ Transform2DContext::Transform2DContext( ContextHandler2Helper& rParent, const At + } + else + { +- mrShape.getTextBody()->getTextProperties().moRotation = rAttribs.getInteger( XML_rot ); ++ if( rAttribs.hasAttribute( XML_rot ) ) ++ mrShape.getTextBody()->getTextProperties().moRotation = -rAttribs.getInteger( XML_rot ).get(); + } + } + +-- +cgit v0.9.0.2-2-gbebe diff --git a/import-gradfill-for-text-colors.diff b/import-gradfill-for-text-colors.diff new file mode 100644 index 0000000..c23a9d4 --- /dev/null +++ b/import-gradfill-for-text-colors.diff @@ -0,0 +1,75 @@ +From ce609f477e488e9c701b2bfa893bcf01722d2a01 Mon Sep 17 00:00:00 2001 +From: Muthu Subramanian +Date: Fri, 28 Mar 2014 11:54:45 +0000 +Subject: n#870234: Import gradfill for text colors. + +Uses the first color from the gradfill list. +(Which is better than plain black!) + +(cherry picked from commit cfc76de83e3c0a56abd30a8f3bd7c69d3500d223) +Signed-off-by: Andras Timar + +Conflicts: + oox/source/drawingml/textcharacterproperties.cxx + oox/source/drawingml/textcharacterpropertiescontext.cxx + +Change-Id: I4c1c0c4b031f3681c95b75b3c0683eb4de95bffb +--- +diff --git a/include/oox/drawingml/textcharacterproperties.hxx b/include/oox/drawingml/textcharacterproperties.hxx +index c079015..d2335e1 100644 +--- a/include/oox/drawingml/textcharacterproperties.hxx ++++ b/include/oox/drawingml/textcharacterproperties.hxx +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + namespace oox { class PropertySet; } + +@@ -53,6 +54,7 @@ struct TextCharacterProperties + OptValue< bool > moItalic; + OptValue< bool > moUnderlineLineFollowText; + OptValue< bool > moUnderlineFillFollowText; ++ GradientFillProperties maGradientProps; /// Properties for gradient text colors + + /** Overwrites all members that are explicitly set in rSourceProps. */ + void assignUsed( const TextCharacterProperties& rSourceProps ); +diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx +index febb28c..a7be42b 100644 +--- a/oox/source/drawingml/textcharacterproperties.cxx ++++ b/oox/source/drawingml/textcharacterproperties.cxx +@@ -60,6 +60,7 @@ void TextCharacterProperties::assignUsed( const TextCharacterProperties& rSource + moItalic.assignIfUsed( rSourceProps.moItalic ); + moUnderlineLineFollowText.assignIfUsed( rSourceProps.moUnderlineLineFollowText ); + moUnderlineFillFollowText.assignIfUsed( rSourceProps.moUnderlineFillFollowText ); ++ maGradientProps.assignUsed( rSourceProps.maGradientProps ); + } + + void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFilterBase& rFilter, bool bUseOptional ) const +@@ -93,6 +94,8 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil + + if( maCharColor.isUsed() ) + rPropMap[ PROP_CharColor ] <<= maCharColor.getColor( rFilter.getGraphicHelper() ); ++ if( maGradientProps.maGradientStops.size() > 0 ) ++ rPropMap[ PROP_CharColor ] <<= maGradientProps.maGradientStops.begin()->second.getColor( rFilter.getGraphicHelper() ); + + if( moLang.has() && !moLang.get().isEmpty() ) + { +diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx b/oox/source/drawingml/textcharacterpropertiescontext.cxx +index e166e6d..6887cda 100644 +--- a/oox/source/drawingml/textcharacterpropertiescontext.cxx ++++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx +@@ -132,6 +132,10 @@ ContextHandlerRef TextCharacterPropertiesContext::onCreateContext( sal_Int32 aEl + case A_TOKEN( hlinkClick ): // CT_Hyperlink + case A_TOKEN( hlinkMouseOver ): // CT_Hyperlink + return new HyperLinkContext( *this, rAttribs, mrTextCharacterProperties.maHyperlinkPropertyMap ); ++ ++ case A_TOKEN( gradFill ): ++ return new GradientFillContext( *this, rAttribs, mrTextCharacterProperties.maGradientProps ); ++ + } + + return this; +-- +cgit v0.9.0.2-2-gbebe diff --git a/libreoffice.changes b/libreoffice.changes index 6ad4f55..7d0dfbd 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,5 +1,48 @@ ------------------------------------------------------------------- -Fri May 16 10:20:00 UTC 2014 - timar@fsf.hu +Tue May 20 08:17:29 UTC 2014 - andras.timar@collabora.com + +- bnc#875713 - LO-L3: DOCX import: picture brigtness/contrast not imported + * docx-brightness-contrast-1.diff + * docx-brightness-contrast-2.diff + +------------------------------------------------------------------- +Tue May 20 08:11:28 UTC 2014 - andras.timar@collabora.com + +- bnc#875712 - LO-L3: DOC import: picture brigtness/contrast not imported + * doc-brightness-contrast.diff + +------------------------------------------------------------------- +Tue May 20 08:05:13 UTC 2014 - andras.timar@collabora.com + +- bnc#870240 - LO-L3: pptx import file has text rotated on slide + * fix-text-rotation.diff + +------------------------------------------------------------------- +Tue May 20 07:55:57 UTC 2014 - andras.timar@collabora.com + +- bnc#870234 - LO-L3: pptx file has text imported as black instead of white + * import-gradfill-for-text-colors.diff + +------------------------------------------------------------------- +Tue May 20 07:51:16 UTC 2014 - andras.timar@collabora.com + +- bnc#870228 - LO-L3: Text inside the circle is not centered + * text-alignment-in-shape.diff + +------------------------------------------------------------------- +Tue May 20 07:38:00 UTC 2014 - andras.timar@collabora.com + +- bnc#863021 - LO-L3: Allow setting language for slide or presentation entirely + * set-language-in-impress.diff + +------------------------------------------------------------------- +Tue May 20 07:27:24 UTC 2014 - andras.timar@collabora.com + +- fix build on openSUSE 12.3: + * disable-firebird-unit-test.diff + +------------------------------------------------------------------- +Fri May 16 10:20:00 UTC 2014 - andras.timar@collabora.com - fix build on openSUSE 12.3: * 0001-std-strlen-requires-cstring-include-to-build.patch diff --git a/libreoffice.spec b/libreoffice.spec index 3fb808c..0df5fa9 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -91,6 +91,21 @@ Patch16: wizards-create-temlates-with-python-2.6.diff Patch18: kde4-4.2.3.3-timer-mutex.patch # Fix build on openSUSE 12.3 Patch19: 0001-std-strlen-requires-cstring-include-to-build.patch +# disable Firebird unit test which fails on openSUSE 12.3 (it's an experimental feature anyway) +Patch20: disable-firebird-unit-test.diff +# bnc#863021 - LO-L3: Allow setting language for slide or presentation entirely +Patch21: set-language-in-impress.diff +# bnc#870228 - LO-L3: Text inside the circle is not centered +Patch22: text-alignment-in-shape.diff +# bnc#870234 - LO-L3: pptx file has text imported as black instead of white +Patch23: import-gradfill-for-text-colors.diff +# bnc#870240 - LO-L3: pptx import file has text rotated on slide +Patch24: fix-text-rotation.diff +# bnc#875712 - LO-L3: DOC import: picture brigtness/contrast not imported +Patch25: doc-brightness-contrast.diff +# bnc#875713 - LO-L3: DOCX import: picture brigtness/contrast not imported +Patch26: docx-brightness-contrast-1.diff +Patch27: docx-brightness-contrast-2.diff # try to save space by using hardlinks Patch990: install-with-hardlinks.diff BuildRequires: ImageMagick @@ -853,6 +868,14 @@ Provides additional %{langname} translations and resources for %{project}. \ %patch16 -p1 %patch18 -p1 %patch19 -p1 +%patch20 -p1 +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 +%patch26 -p1 +%patch27 -p1 %patch990 -p1 # 256x256 icons tar -xjf %{SOURCE20} diff --git a/set-language-in-impress.diff b/set-language-in-impress.diff new file mode 100644 index 0000000..4060b1b --- /dev/null +++ b/set-language-in-impress.diff @@ -0,0 +1,245 @@ +From d5aedeef765d60c7420ada7eba8405cfe448c6a8 Mon Sep 17 00:00:00 2001 +From: Muthu Subramanian +Date: Wed, 23 Apr 2014 18:33:22 +0530 +Subject: [PATCH] fdo#64047: n#863021: Add set-all language menu. + +Problems: +* Doesn't reset the spell error markers +* Modifies only at object level +* Currently has only setting for 'all text' +* Maybe provide a current slide only option? + +Change-Id: I4695423fed3ed9422185b23803eedd12ef434bea +(cherry picked from commit 0833f4046a1afa77aeed97a131c5325c44be1bb3) +Signed-off-by: Andras Timar +--- + sd/sdi/_docsh.sdi | 15 ++-- + sd/source/ui/docshell/docshel3.cxx | 114 +++++++++++++++++++++++++++++++ + sd/source/ui/docshell/docshell.cxx | 6 ++ + sd/uiconfig/sdraw/menubar/menubar.xml | 2 + + sd/uiconfig/simpress/menubar/menubar.xml | 2 + + 5 files changed, 134 insertions(+), 5 deletions(-) + +diff --git a/sd/sdi/_docsh.sdi b/sd/sdi/_docsh.sdi +index 075b60a..b087723 100644 +--- a/sd/sdi/_docsh.sdi ++++ b/sd/sdi/_docsh.sdi +@@ -32,11 +32,16 @@ interface DrawDocument + ExecMethod = Execute ; + StateMethod = GetState ; + ] +- SID_CHINESE_CONVERSION // ole : ?, status : ? +- [ +- ExecMethod = Execute ; +- StateMethod = GetState ; +- ] ++ SID_CHINESE_CONVERSION // ole : ?, status : ? ++ [ ++ ExecMethod = Execute ; ++ StateMethod = GetState ; ++ ] ++ SID_LANGUAGE_STATUS ++ [ ++ ExecMethod = Execute ; ++ StateMethod = GetState ; ++ ] + // ? + FID_SEARCH_NOW // ole : ?, status : ? + [ +diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx +index d22f50a..cd45b39 100644 +--- a/sd/source/ui/docshell/docshel3.cxx ++++ b/sd/source/ui/docshell/docshel3.cxx +@@ -17,6 +17,7 @@ + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + ++#include "Window.hxx" + #include "DrawDocShell.hxx" + + #include "app.hrc" +@@ -28,11 +29,18 @@ + #include + #include + #include ++#include ++#include + #include + #include ++#include ++#include ++#include + #include + #include + #include ++#include ++#include + #include + + #include "strings.hrc" +@@ -55,6 +63,68 @@ using namespace ::com::sun::star::uno; + + namespace sd { + ++static void lcl_setLanguageForObj( SdrObject *pObj, LanguageType nLang, bool bLanguageNone = false ) ++{ ++ const sal_uInt16 aLangWhichId_EE[3] = ++ { ++ EE_CHAR_LANGUAGE, ++ EE_CHAR_LANGUAGE_CJK, ++ EE_CHAR_LANGUAGE_CTL ++ }; ++ ++ if( bLanguageNone ) ++ nLang = LANGUAGE_NONE; ++ ++ if( nLang != LANGUAGE_DONTKNOW ) ++ { ++ if( nLang == LANGUAGE_NONE ) ++ { ++ for(sal_Int32 n = 0; n < 3; n++ ) ++ pObj->SetMergedItem( SvxLanguageItem( nLang, aLangWhichId_EE[n] ) ); ++ } ++ else ++ { ++ sal_uInt16 nLangWhichId = 0; ++ sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLang ); ++ switch (nScriptType) ++ { ++ case SCRIPTTYPE_LATIN : nLangWhichId = EE_CHAR_LANGUAGE; break; ++ case SCRIPTTYPE_ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break; ++ case SCRIPTTYPE_COMPLEX : nLangWhichId = EE_CHAR_LANGUAGE_CTL; break; ++ default: ++ OSL_FAIL("unexpected case" ); ++ return; ++ } ++ pObj->SetMergedItem( SvxLanguageItem( nLang, nLangWhichId ) ); ++ } ++ } ++ else // Reset to default ++ { ++ for( sal_Int32 n = 0; n < 3; n++ ) ++ pObj->ClearMergedItem( aLangWhichId_EE[n] ); ++ } ++} ++ ++ ++static void lcl_setLanguage( const SdDrawDocument *pDoc, const OUString &rLanguage, bool bLanguageNone = false ) ++{ ++ LanguageType nLang = SvtLanguageTable().GetType( rLanguage ); ++ ++ // Do it for SdDrawDocument->SetLanguage as well? ++ ++ sal_uInt16 nPageCount = pDoc->GetPageCount(); // Pick All Pages ++ for( sal_uInt16 nPage = 0; nPage < nPageCount; nPage++ ) ++ { ++ const SdrPage *pPage = pDoc->GetPage( nPage ); ++ sal_uIntPtr nObjCount = pPage->GetObjCount(); ++ for( sal_uInt16 nObj = 0; nObj < nObjCount; nObj++ ) ++ { ++ SdrObject *pObj = pPage->GetObj( nObj ); ++ lcl_setLanguageForObj( pObj, nLang, bLanguageNone ); ++ } ++ } ++} ++ + /** + * Handles SFX-Requests + */ +@@ -201,6 +271,50 @@ void DrawDocShell::Execute( SfxRequest& rReq ) + } + } + break; ++ case SID_LANGUAGE_STATUS: ++ { ++ OUString aNewLangTxt; ++ SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, SID_LANGUAGE_STATUS , false ); ++ if (pItem) ++ aNewLangTxt = pItem->GetValue(); ++ if (aNewLangTxt == "*" ) ++ { ++ // open the dialog "Tools/Options/Language Settings - Language" ++ SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); ++ if (pFact && mpViewShell) ++ { ++ VclAbstractDialog* pDlg = pFact->CreateVclDialog( mpViewShell->GetActiveWindow(), SID_LANGUAGE_OPTIONS ); ++ pDlg->Execute(); ++ delete pDlg; ++ } ++ } ++ else ++ { ++ // setting the new language... ++ if (!aNewLangTxt.isEmpty()) ++ { ++ const OUString aDocumentLangPrefix("Default_"); ++ const OUString aStrNone("LANGUAGE_NONE"); ++ const OUString aStrResetLangs("RESET_LANGUAGES"); ++ sal_Int32 nPos = -1; ++ if (-1 != (nPos = aNewLangTxt.indexOf( aDocumentLangPrefix , 0 ))) ++ { ++ aNewLangTxt = aNewLangTxt.replaceAt( nPos, aDocumentLangPrefix.getLength(), "" ); ++ } ++ else ++ { ++ break; ++ } ++ if (aNewLangTxt == aStrNone) ++ lcl_setLanguage( mpViewShell->GetDoc(), OUString() ); ++ else if (aNewLangTxt == aStrResetLangs) ++ lcl_setLanguage( mpViewShell->GetDoc(), OUString(), true ); ++ else ++ lcl_setLanguage( mpViewShell->GetDoc(), aNewLangTxt ); ++ } ++ } ++ } ++ break; + + default: + break; +diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx +index 1553954..ee0fad0 100644 +--- a/sd/source/ui/docshell/docshell.cxx ++++ b/sd/source/ui/docshell/docshell.cxx +@@ -270,6 +270,12 @@ void DrawDocShell::GetState(SfxItemSet &rSet) + rSet.Put(SfxVisibilityItem(nWhich, SvtCJKOptions().IsAnyEnabled())); + } + break; ++ case SID_LANGUAGE_STATUS: ++ { ++ // Keeping this enabled for the time being ++ rSet.Put(SfxVisibilityItem(nWhich, true)); ++ } ++ break; + + default: + break; +diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml +index 6e8f9e4..289acf9 100644 +--- a/sd/uiconfig/sdraw/menubar/menubar.xml ++++ b/sd/uiconfig/sdraw/menubar/menubar.xml +@@ -245,6 +245,8 @@ + + + ++ ++ + + + +diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml +index b2d5ae6..e8b1a6d 100644 +--- a/sd/uiconfig/simpress/menubar/menubar.xml ++++ b/sd/uiconfig/simpress/menubar/menubar.xml +@@ -273,6 +273,8 @@ + + + ++ ++ + + + +-- +1.8.4.5 + diff --git a/text-alignment-in-shape.diff b/text-alignment-in-shape.diff new file mode 100644 index 0000000..0d5d5cd --- /dev/null +++ b/text-alignment-in-shape.diff @@ -0,0 +1,58 @@ +From 709f06eb261b3225cd4b56a7efb8e2d591909960 Mon Sep 17 00:00:00 2001 +From: Muthu Subramanian +Date: Wed, 26 Mar 2014 10:43:08 +0000 +Subject: n#862510: anchorCtr controls the anchoring as well. + +(cherry picked from commit c17eb67460293fbe72ffa8e80cd10743df493afa) +Signed-off-by: Andras Timar + +Conflicts: + oox/source/drawingml/textbodypropertiescontext.cxx + +Change-Id: Ib244d89a9f7d400b3891d477314cd5f0193552e0 +--- +diff --git a/include/oox/drawingml/textbodyproperties.hxx b/include/oox/drawingml/textbodyproperties.hxx +index 3fb0684..af68f20 100644 +--- a/include/oox/drawingml/textbodyproperties.hxx ++++ b/include/oox/drawingml/textbodyproperties.hxx +@@ -34,6 +34,7 @@ struct TextBodyProperties + { + PropertyMap maPropertyMap; + OptValue< sal_Int32 > moRotation; ++ bool mbAnchorCtr; + OptValue< sal_Int32 > moVert; + boost::optional< sal_Int32 > moInsets[4]; + boost::optional< sal_Int32 > moTextOffX; +diff --git a/oox/source/drawingml/textbodyproperties.cxx b/oox/source/drawingml/textbodyproperties.cxx +index 36f39d9..9e53897 100644 +--- a/oox/source/drawingml/textbodyproperties.cxx ++++ b/oox/source/drawingml/textbodyproperties.cxx +@@ -80,8 +80,8 @@ void TextBodyProperties::pushRotationAdjustments( sal_Int32 nRotation ) + // Hack for n#760986 + // TODO: Preferred method would be to have a textbox on top + // of the shape and the place it according to the (off,ext) +- if( nOff == 0 && moTextOffX ) nVal = *moTextOffX; +- if( nOff == 1 && moTextOffY ) nVal = *moTextOffY; ++ if( nOff == 0 && moTextOffX && mbAnchorCtr ) nVal = *moTextOffX; ++ if( nOff == 1 && moTextOffY && mbAnchorCtr ) nVal = *moTextOffY; + if( nVal < 0 ) nVal = 0; + + if( moInsets[i] ) +diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx +index 358db9f..b580be3 100644 +--- a/oox/source/drawingml/textbodypropertiescontext.cxx ++++ b/oox/source/drawingml/textbodypropertiescontext.cxx +@@ -56,9 +56,9 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler2Helper& rPa + mrTextBodyProp.moInsets[i] = GetCoordinate( sValue ); + } + +- bool bAnchorCenter = rAttribs.getBool( XML_anchorCtr, false ); ++ mrTextBodyProp.mbAnchorCtr = rAttribs.getBool( XML_anchorCtr, false ); + if( rAttribs.hasAttribute( XML_anchorCtr ) ) { +- if( bAnchorCenter ) ++ if( mrTextBodyProp.mbAnchorCtr ) + mrTextBodyProp.maPropertyMap[ PROP_TextHorizontalAdjust ] <<= + TextHorizontalAdjust_CENTER; + } +-- +cgit v0.9.0.2-2-gbebe From 987060c34d86096077b856c8d5b111d917c0eb6d26955af2de709cc038aa5906 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Thu, 22 May 2014 18:01:02 +0000 Subject: [PATCH 04/27] - bnc#467278: Introduce a warning that changes to VBA macros cannot be saved. * VBA-macro-modification-warning.diff OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=155 --- VBA-macro-modification-warning.diff | 97 +++++++++++++++++++++++++++++ libreoffice.changes | 6 ++ libreoffice.spec | 3 + 3 files changed, 106 insertions(+) create mode 100644 VBA-macro-modification-warning.diff diff --git a/VBA-macro-modification-warning.diff b/VBA-macro-modification-warning.diff new file mode 100644 index 0000000..9bb92a3 --- /dev/null +++ b/VBA-macro-modification-warning.diff @@ -0,0 +1,97 @@ +From cfc71b418d27bbfaec195238764078fd5881bab3 Mon Sep 17 00:00:00 2001 +From: Jan Holesovsky +Date: Thu, 22 May 2014 17:29:56 +0200 +Subject: [PATCH] bnc#467278: Introduce a warning that changes to VBA macros + cannot be saved. + +As an InfoBar, so hopefully not annoying... + +Conflicts: + basctl/source/basicide/basidesh.cxx + +Change-Id: I5d4e79273edc03829fdab2d6d5a291576c954e4b +--- + basctl/inc/basidesh.hrc | 1 + + basctl/source/basicide/basidesh.cxx | 9 +++++++++ + basctl/source/basicide/basidesh.src | 4 ++++ + include/sfx2/viewfrm.hxx | 2 +- + 4 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/basctl/inc/basidesh.hrc b/basctl/inc/basidesh.hrc +index 623cb0e..a40f788 100644 +--- a/basctl/inc/basidesh.hrc ++++ b/basctl/inc/basidesh.hrc +@@ -68,6 +68,7 @@ + #define RID_STR_OPEN ( RID_BASICIDE_START + 20 ) + #define RID_STR_SAVE ( RID_BASICIDE_START + 21 ) + #define RID_STR_RUNTIMEERROR ( RID_BASICIDE_START + 22 ) ++#define RID_STR_CANNOTSAVEVBA ( RID_BASICIDE_START + 23 ) + #define RID_STR_STDDIALOGNAME ( RID_BASICIDE_START + 24 ) + + #define RID_STR_STDMODULENAME ( RID_BASICIDE_START + 27 ) +diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx +index 674775b..f95e6f4 100644 +--- a/basctl/source/basicide/basidesh.cxx ++++ b/basctl/source/basicide/basidesh.cxx +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -137,6 +138,7 @@ SFX_IMPL_INTERFACE( basctl_Shell, SfxViewShell, IDEResId( RID_STR_IDENAME ) ) + { + SFX_CHILDWINDOW_REGISTRATION( SID_SEARCH_DLG ); + SFX_FEATURED_CHILDWINDOW_REGISTRATION(SID_SHOW_PROPERTYBROWSER, BASICIDE_UI_FEATURE_SHOW_BROWSER); ++ SFX_CHILDWINDOW_REGISTRATION(SfxInfoBarContainerChild::GetChildWindowId()); + SFX_POPUPMENU_REGISTRATION( IDEResId( RID_POPUP_DLGED ) ); + } + +@@ -250,7 +252,14 @@ Shell::~Shell() + void Shell::onDocumentCreated( const ScriptDocument& /*_rDocument*/ ) + { + if (pCurWin) ++ { + pCurWin->OnNewDocument(); ++ ++ // for VBA documents, show a warning that we can save them only in ODF ++ if (pCurWin->GetDocument().isInVBAMode()) ++ GetViewFrame()->AppendInfoBar("vba_save", IDE_RESSTR(RID_STR_CANNOTSAVEVBA)); ++ } ++ + UpdateWindows(); + } + +diff --git a/basctl/source/basicide/basidesh.src b/basctl/source/basicide/basidesh.src +index 6876130..5e019fd 100644 +--- a/basctl/source/basicide/basidesh.src ++++ b/basctl/source/basicide/basidesh.src +@@ -216,6 +216,10 @@ String RID_STR_CANNOTCLOSE + { + Text [ en-US ] = "The window cannot be closed while BASIC is running." ; + }; ++String RID_STR_CANNOTSAVEVBA ++{ ++ Text [ en-US ] = "You are editing a VBA macro. Changes can be saved only in OpenDocument Format." ; ++}; + String RID_STR_REPLACESTDLIB + { + Text [ en-US ] = "The default library cannot be replaced." ; +diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx +index cf316b7..8541397 100644 +--- a/include/sfx2/viewfrm.hxx ++++ b/include/sfx2/viewfrm.hxx +@@ -190,7 +190,7 @@ public: + The buttons will be added from Right to Left at the right of the info bar. The parent, size + and position of each button will be changed: only the width will remain unchanged. + */ +- void AppendInfoBar( const OUString& sId, const OUString& sMessage, std::vector< PushButton* > aButtons ); ++ void AppendInfoBar( const OUString& sId, const OUString& sMessage, std::vector< PushButton* > aButtons = std::vector< PushButton* >() ); + void RemoveInfoBar( const OUString& sId ); + + SAL_DLLPRIVATE void SetDowning_Impl(); +-- +1.8.4.5 + diff --git a/libreoffice.changes b/libreoffice.changes index 7d0dfbd..f298831 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu May 22 15:53:29 UTC 2014 - andras.timar@collabora.com + +- bnc#467278: Introduce a warning that changes to VBA macros cannot be saved. + * VBA-macro-modification-warning.diff + ------------------------------------------------------------------- Tue May 20 08:17:29 UTC 2014 - andras.timar@collabora.com diff --git a/libreoffice.spec b/libreoffice.spec index 0df5fa9..76cd01c 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -106,6 +106,8 @@ Patch25: doc-brightness-contrast.diff # bnc#875713 - LO-L3: DOCX import: picture brigtness/contrast not imported Patch26: docx-brightness-contrast-1.diff Patch27: docx-brightness-contrast-2.diff +# bnc#467278: Introduce a warning that changes to VBA macros cannot be saved. +Patch28: VBA-macro-modification-warning.diff # try to save space by using hardlinks Patch990: install-with-hardlinks.diff BuildRequires: ImageMagick @@ -876,6 +878,7 @@ Provides additional %{langname} translations and resources for %{project}. \ %patch25 -p1 %patch26 -p1 %patch27 -p1 +%patch28 -p1 %patch990 -p1 # 256x256 icons tar -xjf %{SOURCE20} From ada4f25d80e3762a8e17d4f81d6e9303984180c724a88630f443b7aa13be069d Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Fri, 23 May 2014 18:50:22 +0000 Subject: [PATCH 05/27] - bnc#467278: let the previous fix work under KDE4, too * VBA-macro-modification-warning.diff OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=156 --- VBA-macro-modification-warning.diff | 47 +++++++++++++++++++++++++++++ libreoffice.changes | 6 ++++ 2 files changed, 53 insertions(+) diff --git a/VBA-macro-modification-warning.diff b/VBA-macro-modification-warning.diff index 9bb92a3..00616d1 100644 --- a/VBA-macro-modification-warning.diff +++ b/VBA-macro-modification-warning.diff @@ -95,3 +95,50 @@ index cf316b7..8541397 100644 -- 1.8.4.5 +From 39a589e1cf9340e95d63602afd272faccbaac9a5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= +Date: Fri, 23 May 2014 18:48:53 +0200 +Subject: [PATCH] force posted events before timer timeouts in KDE4 event loop + (bnc#467278) + +In this particular case, basctl::Shell::onDocumentCreated() and pretty much +everything in basctl/ it seems operate on the current window. The "OnNew" +event that triggers this comes from a timeout generated who knows where +for whatever reason. However, the code "knows" what the current window +is by having basctl::Shell::SetCurWindow() react on events about the current +window changing ... which come from posted events. + +So, unless it's defined somewhere that an ordering here must exist, this +is inherently racy. At least generic and Gtk event loops appear to always +deliver the posted event first, so force the same ordering in the KDE +event loop handling. + +Change-Id: Ia098f6b45e6b5a5133a12a9172eb09069e6362f9 +--- + vcl/unx/kde4/KDEXLib.cxx | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx +index 2630c0c..9d2949e 100644 +--- a/vcl/unx/kde4/KDEXLib.cxx ++++ b/vcl/unx/kde4/KDEXLib.cxx +@@ -349,6 +349,16 @@ void KDEXLib::StopTimer() + + void KDEXLib::timeoutActivated() + { ++ // HACK? Always process posted events before timer timeouts. ++ // There are places that may watch both both (for example, there's a posted ++ // event about change of the current active window and there's a timeout ++ // event informing that a document has finished loading). This is of course ++ // racy, but both generic and gtk event loops manage to deliver posted events ++ // first, so it's at least consistent, and it probably kind of makes at least ++ // some sense (timeouts should be more ok to wait and be triggered somewhen). ++ while( SalKDEDisplay::self()->HasUserEvents() ) ++ SalKDEDisplay::self()->DispatchInternalEvent(); ++ + X11SalData *pData = (X11SalData*)ImplGetSVData()->mpSalData; + pData->Timeout(); + // QTimer is not single shot, so will be restarted immediatelly +-- +1.8.4.5 + diff --git a/libreoffice.changes b/libreoffice.changes index f298831..7bbce2c 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri May 23 18:49:38 UTC 2014 - andras.timar@collabora.com + +- bnc#467278: let the previous fix work under KDE4, too + * VBA-macro-modification-warning.diff + ------------------------------------------------------------------- Thu May 22 15:53:29 UTC 2014 - andras.timar@collabora.com From d07df498249d3902a48f6e5c95b377e28bba65f7bf584144271fe3c3045868e8 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Fri, 30 May 2014 12:25:11 +0000 Subject: [PATCH 06/27] - bnc#822625 - LO-L3: Table editing is a pain in Impress (performace issues) * impress-table-performance.patch - bnc#863018 - LO-L3: Missing text in imported .doc file * WW8-import-fix-upper-margin-of-multi-page.patch - bnc#875717 - LO-L3: DOCX import: font size of numbering is bigger * direct-format-numbering.patch - bnc#875718 - LO-L3: DOCX import: extra page numbers * discard-more-header-footer-stuff.patch - Security update CVE-2014-0247 * Use-varying-aElement-name.patch OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=157 --- Use-varying-aElement-name.patch | 26 ++ ...mport-fix-upper-margin-of-multi-page.patch | 171 +++++++++++++ direct-format-numbering.patch | 232 ++++++++++++++++++ discard-more-header-footer-stuff.patch | 80 ++++++ impress-table-performance.patch | 134 ++++++++++ libreoffice.changes | 30 +++ libreoffice.spec | 15 ++ 7 files changed, 688 insertions(+) create mode 100644 Use-varying-aElement-name.patch create mode 100644 WW8-import-fix-upper-margin-of-multi-page.patch create mode 100644 direct-format-numbering.patch create mode 100644 discard-more-header-footer-stuff.patch create mode 100644 impress-table-performance.patch diff --git a/Use-varying-aElement-name.patch b/Use-varying-aElement-name.patch new file mode 100644 index 0000000..37644b3 --- /dev/null +++ b/Use-varying-aElement-name.patch @@ -0,0 +1,26 @@ +From eeac58b5261e80ded0381e2be7f1fa3e6f0e9bb4 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Tue, 20 May 2014 14:55:40 +0200 +Subject: [PATCH] Use varying aElement name + +Change-Id: Idc135ef5031a01961cc18d897a734b598bc833f4 +--- + sfx2/source/doc/docmacromode.cxx | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx +index 39d2b6d..8f87197 100644 +--- a/sfx2/source/doc/docmacromode.cxx ++++ b/sfx2/source/doc/docmacromode.cxx +@@ -343,7 +343,7 @@ namespace sfx2 + if( aElement == aStdLibName || aElement == aVBAProject ) + { + Reference < XNameAccess > xLib; +- Any aAny = xContainer->getByName( aStdLibName ); ++ Any aAny = xContainer->getByName( aElement ); + aAny >>= xLib; + if ( xLib.is() && xLib->hasElements() ) + return sal_True; +-- +1.8.4.5 + diff --git a/WW8-import-fix-upper-margin-of-multi-page.patch b/WW8-import-fix-upper-margin-of-multi-page.patch new file mode 100644 index 0000000..a2d464f --- /dev/null +++ b/WW8-import-fix-upper-margin-of-multi-page.patch @@ -0,0 +1,171 @@ +From 9d981abc3f310adf9af3454dd515ea356b31d3c1 Mon Sep 17 00:00:00 2001 +From: Miklos Vajna +Date: Mon, 26 May 2014 12:04:39 +0200 +Subject: [PATCH] bnc#863018 WW8 import: fix upper margin of multi-page + floating table + +A vert orient position was already handled in case a floating table was +imported as a TextFrame, but in case we didn't do that, the vert orient +position was simply lost. + +Fix this by importing it as the upper margin of the table (assuming that +the position is relative from the anchor position). + +(cherry picked from commit 3755c87d0426a499d4755e82d8fbc77caa240764) + +Change-Id: I3e96f3068605fd6313dfb3e55483e1bce6c063a5 +Reviewed-on: https://gerrit.libreoffice.org/9487 +Reviewed-by: Andras Timar +Tested-by: Andras Timar +--- + +diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx +index 213e996..0725a9a 100644 +--- a/sw/source/filter/ww8/ww8par.cxx ++++ b/sw/source/filter/ww8/ww8par.cxx +@@ -2726,9 +2726,13 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp) + maApos[nInTable] = false; + } + ++ // So that SwWW8ImplReader::StartApo() can write into this, and ++ // WW8TabDesc::CreateSwTable() can read it, if necessary. ++ SvxULSpaceItem aULSpaceItem(RES_UL_SPACE); ++ + if (aApo.mbStartApo) + { +- maApos[nInTable] = StartApo(aApo, pTabPos); ++ maApos[nInTable] = StartApo(aApo, pTabPos, &aULSpaceItem); + // We need an ReSync after StartApo + // (actually only if the Apo extends past a FKP border) + rbReSync = true; +@@ -2744,7 +2748,7 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp) + + if(nInTable < nCellLevel) + { +- if (StartTable(nStartCp)) ++ if (StartTable(nStartCp, &aULSpaceItem)) + ++nInTable; + else + break; +diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx +index 28dca2e..772da4c 100644 +--- a/sw/source/filter/ww8/ww8par.hxx ++++ b/sw/source/filter/ww8/ww8par.hxx +@@ -1473,7 +1473,7 @@ private: + + WW8FlyPara *ConstructApo(const ApoTestResults &rApo, + const WW8_TablePos *pTabPos); +- bool StartApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos); ++ bool StartApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos, SvxULSpaceItem* pULSpaceItem = 0); + void StopApo(); + bool TestSameApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos); + ApoTestResults TestApo(int nCellLevel, bool bTableRowEnd, +@@ -1523,7 +1523,7 @@ private: + + void ReadDocVars(); + +- bool StartTable(WW8_CP nStartCp); ++ bool StartTable(WW8_CP nStartCp, SvxULSpaceItem* pULSpaceItem = 0); + bool InEqualApo(int nLvl) const; + bool InLocalApo() const { return InEqualApo(nInTable); } + bool InEqualOrHigherApo(int nLvl) const; +diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx +index f94e055..fcb5b50 100644 +--- a/sw/source/filter/ww8/ww8par2.cxx ++++ b/sw/source/filter/ww8/ww8par2.cxx +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -178,7 +179,7 @@ public: + + WW8TabDesc( SwWW8ImplReader* pIoClass, WW8_CP nStartCp ); + bool Ok() const { return bOk; } +- void CreateSwTable(); ++ void CreateSwTable(SvxULSpaceItem* pULSpaceItem = 0); + void UseSwTable(); + void SetSizePosition(SwFrmFmt* pFrmFmt); + void TableCellEnd(); +@@ -2324,7 +2325,7 @@ void wwSectionManager::PrependedInlineNode(const SwPosition &rPos, + maSegments.back().maStart = SwNodeIndex(rNode); + } + +-void WW8TabDesc::CreateSwTable() ++void WW8TabDesc::CreateSwTable(SvxULSpaceItem* pULSpaceItem) + { + ::SetProgressState(pIo->nProgress, pIo->mpDocShell); // Update + +@@ -2380,6 +2381,9 @@ void WW8TabDesc::CreateSwTable() + if (!pTable || !pTable->GetFrmFmt()) + return; + ++ if (pULSpaceItem && pULSpaceItem->GetUpper() != 0) ++ aItemSet.Put(*pULSpaceItem); ++ + SwTableNode* pTableNode = pTable->GetTableNode(); + OSL_ENSURE(pTableNode, "no table node!"); + if (pTableNode) +@@ -3319,7 +3323,7 @@ void WW8TabDesc::SetNumRuleName( const OUString& rName ) + aNumRuleNames[nCol] = rName; + } + +-bool SwWW8ImplReader::StartTable(WW8_CP nStartCp) ++bool SwWW8ImplReader::StartTable(WW8_CP nStartCp, SvxULSpaceItem* pULSpaceItem) + { + // Entering a table so make sure the FirstPara flag gets set + bFirstPara = true; +@@ -3395,7 +3399,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp) + "Not the anchor type requested!" ); + MoveInsideFly(pTableDesc->pFlyFmt); + } +- pTableDesc->CreateSwTable(); ++ pTableDesc->CreateSwTable(pULSpaceItem); + if (pTableDesc->pFlyFmt) + { + pTableDesc->SetSizePosition(pTableDesc->pFlyFmt); +diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx +index 43c93cd..066b8db 100644 +--- a/sw/source/filter/ww8/ww8par6.cxx ++++ b/sw/source/filter/ww8/ww8par6.cxx +@@ -2286,7 +2286,8 @@ bool SwWW8ImplReader::IsDropCap() + } + + bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo, +- const WW8_TablePos *pTabPos) ++ const WW8_TablePos *pTabPos, ++ SvxULSpaceItem* pULSpaceItem) + { + if (0 == (pWFlyPara = ConstructApo(rApo, pTabPos))) + return false; +@@ -2321,7 +2322,24 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo, + WW8FlySet aFlySet(*this, pWFlyPara, pSFlyPara, false); + + if (pTabPos && pTabPos->bNoFly) ++ { + pSFlyPara->pFlyFmt = 0; ++ if (pULSpaceItem) ++ { ++ // Word positioned tables can have a position (like a ++ // fly-frame), but they also support flowing accross multiple ++ // pages. If we decide to import this as a normal table (so it ++ // can flow accross multiple pages), then turn the vertical ++ // orientation position of the fly into a table upper margin. ++ const SfxPoolItem* pItem = 0; ++ if (aFlySet.HasItem(RES_VERT_ORIENT, &pItem)) ++ { ++ const SwFmtVertOrient* pOrient = static_cast(pItem); ++ if (pOrient->GetPos() != 0) ++ pULSpaceItem->SetUpper(pOrient->GetPos()); ++ } ++ } ++ } + else + { + pSFlyPara->pFlyFmt = rDoc.MakeFlySection( pSFlyPara->eAnchor, +-- +1.8.4.5 + diff --git a/direct-format-numbering.patch b/direct-format-numbering.patch new file mode 100644 index 0000000..dbadc96 --- /dev/null +++ b/direct-format-numbering.patch @@ -0,0 +1,232 @@ +From 2d89b1a029514935b60fbd3f7f7c5341a329bfc8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= +Date: Thu, 29 May 2014 14:31:20 +0200 +Subject: [PATCH] handle direct formatting for numbering in .docx (bnc#875717) + +Change-Id: I3ed0f926e79f3878c5702c2becae97d99d00e201 +(cherry picked from commit c2ac2ced0d51200a62f7436144f0d89cfcd15eed) +Signed-off-by: Andras Timar +--- + sw/inc/IDocumentSettingAccess.hxx | 3 ++- + sw/inc/doc.hxx | 1 + + sw/source/core/doc/doc.cxx | 4 ++++ + sw/source/core/doc/docnew.cxx | 1 + + sw/source/core/text/txtfld.cxx | 31 ++++++++++++++++++++++++++++ + sw/source/ui/uno/SwXDocumentSettings.cxx | 16 +++++++++++++- + writerfilter/source/dmapper/DomainMapper.cxx | 3 +++ + writerfilter/source/dmapper/PropertyIds.cxx | 1 + + writerfilter/source/dmapper/PropertyIds.hxx | 1 + + 9 files changed, 59 insertions(+), 2 deletions(-) + +diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx +index 6e66fd0..4e94a1e 100644 +--- a/sw/inc/IDocumentSettingAccess.hxx ++++ b/sw/inc/IDocumentSettingAccess.hxx +@@ -92,7 +92,8 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd + STYLES_NODEFAULT, + FLOATTABLE_NOMARGINS, + EMBED_FONTS, +- EMBED_SYSTEM_FONTS ++ EMBED_SYSTEM_FONTS, ++ APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING + }; + + public: +diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx +index 987d0ab..b872119 100644 +--- a/sw/inc/doc.hxx ++++ b/sw/inc/doc.hxx +@@ -581,6 +581,7 @@ private: + bool mbBackgroundParaOverDrawings; + bool mbTabOverMargin; + bool mbSurroundTextWrapSmall; ++ bool mApplyParagraphMarkFormatToNumbering; + + bool mbLastBrowseMode : 1; + +diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx +index e1d84f3..d3c74e9 100644 +--- a/sw/source/core/doc/doc.cxx ++++ b/sw/source/core/doc/doc.cxx +@@ -206,6 +206,7 @@ bool SwDoc::get(/*[in]*/ DocumentSettingId id) const + case FLOATTABLE_NOMARGINS: return mbFloattableNomargins; + case EMBED_FONTS: return mEmbedFonts; + case EMBED_SYSTEM_FONTS: return mEmbedSystemFonts; ++ case APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING: return mApplyParagraphMarkFormatToNumbering; + default: + OSL_FAIL("Invalid setting id"); + } +@@ -400,6 +401,9 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) + case EMBED_SYSTEM_FONTS: + mEmbedSystemFonts = value; + break; ++ case APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING: ++ mApplyParagraphMarkFormatToNumbering = value; ++ break; + default: + OSL_FAIL("Invalid setting id"); + } +diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx +index 5385509..a97e616 100644 +--- a/sw/source/core/doc/docnew.cxx ++++ b/sw/source/core/doc/docnew.cxx +@@ -313,6 +313,7 @@ SwDoc::SwDoc() + mbBackgroundParaOverDrawings(false), + mbTabOverMargin(false), + mbSurroundTextWrapSmall(false), ++ mApplyParagraphMarkFormatToNumbering(false), + mbLastBrowseMode( false ), + mn32DummyCompatabilityOptions1(0), + mn32DummyCompatabilityOptions2(0), +diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx +index 22058c3..35471f41 100644 +--- a/sw/source/core/text/txtfld.cxx ++++ b/sw/source/core/text/txtfld.cxx +@@ -48,6 +48,7 @@ + #include "pagedesc.hxx" + #include + #include "fmtmeta.hxx" ++#include "fmtautofmt.hxx" + + + /************************************************************************* +@@ -382,6 +383,32 @@ SwLinePortion *SwTxtFormatter::NewExtraPortion( SwTxtFormatInfo &rInf ) + *************************************************************************/ + + ++// OOXML spec says that w:rPr inside w:pPr specifies formatting for the paragraph mark symbol (i.e. the control ++// character than can be configured to be shown). However, in practice MSO also uses it as direct formatting ++// for numbering in that paragraph. I don't know if the problem is in the spec or in MSWord. ++static void checkApplyParagraphMarkFormatToNumbering( SwFont* pNumFnt, SwTxtFormatInfo& rInf, const IDocumentSettingAccess* pIDSA ) ++{ ++ SwTxtNode* node = rInf.GetTxtFrm()->GetTxtNode(); ++ if( !pIDSA->get(IDocumentSettingAccess::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING )) ++ return; ++ if( SwpHints* hints = node->GetpSwpHints()) ++ { ++ for( int i = 0; i < hints->Count(); ++i ) ++ { ++ SwTxtAttr* hint = hints->GetTextHint( i ); ++ // Formatting for the paragraph mark is set to apply only to the (non-existent) extra character ++ // the at end of the txt node. ++ if( hint->Which() == RES_TXTATR_AUTOFMT && hint->GetStart() != NULL && hint->GetEnd() != NULL ++ && *hint->GetStart() == *hint->GetEnd() && *hint->GetStart() == node->Len()) ++ { ++ boost::shared_ptr pSet(hint->GetAutoFmt().GetStyleHandle()); ++ pNumFnt->SetDiffFnt( pSet.get(), pIDSA ); ++ } ++ } ++ } ++} ++ ++ + SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const + { + if( rInf.IsNumDone() || rInf.GetTxtStart() != nStart +@@ -470,6 +497,8 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const + if( pFmt ) + pNumFnt->SetDiffFnt( pFmt, pIDSA ); + ++ checkApplyParagraphMarkFormatToNumbering( pNumFnt, rInf, pIDSA ); ++ + if ( pFmtFnt ) + { + const sal_uInt8 nAct = pNumFnt->GetActual(); +@@ -529,6 +558,8 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const + if( pFmt ) + pNumFnt->SetDiffFnt( pFmt, pIDSA ); + ++ checkApplyParagraphMarkFormatToNumbering( pNumFnt, rInf, pIDSA ); ++ + // we do not allow a vertical font + pNumFnt->SetVertical( pNumFnt->GetOrientation(), pFrm->IsVertical() ); + +diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx +index c10ddfd..8a218a1 100644 +--- a/sw/source/ui/uno/SwXDocumentSettings.cxx ++++ b/sw/source/ui/uno/SwXDocumentSettings.cxx +@@ -123,7 +123,8 @@ enum SwDocumentSettingsPropertyHandles + HANDLE_EMBED_FONTS, + HANDLE_EMBED_SYSTEM_FONTS, + HANDLE_TAB_OVER_MARGIN, +- HANDLE_SURROUND_TEXT_WRAP_SMALL ++ HANDLE_SURROUND_TEXT_WRAP_SMALL, ++ HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING + }; + + static MasterPropertySetInfo * lcl_createSettingsInfo() +@@ -194,6 +195,7 @@ static MasterPropertySetInfo * lcl_createSettingsInfo() + { RTL_CONSTASCII_STRINGPARAM("EmbedSystemFonts"), HANDLE_EMBED_SYSTEM_FONTS, CPPUTYPE_BOOLEAN, 0, 0}, + { RTL_CONSTASCII_STRINGPARAM("TabOverMargin"), HANDLE_TAB_OVER_MARGIN, CPPUTYPE_BOOLEAN, 0, 0}, + { RTL_CONSTASCII_STRINGPARAM("SurroundTextWrapSmall"), HANDLE_SURROUND_TEXT_WRAP_SMALL, CPPUTYPE_BOOLEAN, 0, 0}, ++ { RTL_CONSTASCII_STRINGPARAM("ApplyParagraphMarkFormatToNumbering"), HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING, CPPUTYPE_BOOLEAN, 0, 0}, + /* + * As OS said, we don't have a view when we need to set this, so I have to + * find another solution before adding them to this property set - MTG +@@ -797,6 +799,12 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf + mpDoc->set(IDocumentSettingAccess::SURROUND_TEXT_WRAP_SMALL, bTmp); + } + break; ++ case HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING: ++ { ++ bool bTmp = *(sal_Bool*)rValue.getValue(); ++ mpDoc->set(IDocumentSettingAccess::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING, bTmp); ++ } ++ break; + default: + throw UnknownPropertyException(); + } +@@ -1217,6 +1225,12 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf + rValue.setValue( &bTmp, ::getBooleanCppuType() ); + } + break; ++ case HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING: ++ { ++ sal_Bool bTmp = mpDoc->get( IDocumentSettingAccess::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING ); ++ rValue.setValue( &bTmp, ::getBooleanCppuType() ); ++ } ++ break; + default: + throw UnknownPropertyException(); + } +diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx +index 4a520c8..98b6f9e 100644 +--- a/writerfilter/source/dmapper/DomainMapper.cxx ++++ b/writerfilter/source/dmapper/DomainMapper.cxx +@@ -106,6 +106,9 @@ LoggedStream(dmapper_logger, "DomainMapper"), + m_pImpl->SetDocumentSettingsProperty( + PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_SURROUND_TEXT_WRAP_SMALL ), + uno::makeAny( true ) ); ++ m_pImpl->SetDocumentSettingsProperty( ++ PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING ), ++ uno::makeAny( true ) ); + + //import document properties + try +diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx +index 12f28aa..bacbcd3 100644 +--- a/writerfilter/source/dmapper/PropertyIds.cxx ++++ b/writerfilter/source/dmapper/PropertyIds.cxx +@@ -345,6 +345,7 @@ const OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const + case PROP_PARA_SHADOW_FORMAT: sName = "ParaShadowFormat"; break; + case PROP_FOOTNOTE_LINE_RELATIVE_WIDTH: sName = "FootnoteLineRelativeWidth"; break; + case PROP_HORIZONTAL_MERGE: sName = "HorizontalMerge"; break; ++ case PROP_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING : sName = "ApplyParagraphMarkFormatToNumbering"; break; + } + ::std::pair aInsertIt = + m_pImpl->aNameMap.insert( PropertyNameMap_t::value_type( eId, sName )); +diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx +index 9cdc085..a4e3621 100644 +--- a/writerfilter/source/dmapper/PropertyIds.hxx ++++ b/writerfilter/source/dmapper/PropertyIds.hxx +@@ -316,6 +316,7 @@ enum PropertyIds + ,PROP_PARA_TOP_MARGIN_BEFORE_AUTO_SPACING + ,PROP_PARA_BOTTOM_MARGIN_AFTER_AUTO_SPACING + ,PROP_HORIZONTAL_MERGE ++ ,PROP_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING + }; + struct PropertyNameSupplier_Impl; + class PropertyNameSupplier +-- +1.8.4.5 + diff --git a/discard-more-header-footer-stuff.patch b/discard-more-header-footer-stuff.patch new file mode 100644 index 0000000..625593e --- /dev/null +++ b/discard-more-header-footer-stuff.patch @@ -0,0 +1,80 @@ +From b6e5b90899f9adb62556538583763871999aa544 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= +Date: Sat, 24 May 2014 00:36:06 +0200 +Subject: [PATCH] discard more header/footer stuff when discarding + headers/footers (bnc#875718) + +782adba4d436c65cdf85d48f28486321873b15ed discards unneeded headers/footers, +but only the text, not e.g. frames or fields. The test document therefore +ends up with a frame with a page number inside the body text, because the text +in the footer it should be anchored to was discarded. This commit fixes +this by discarding more (although probably the whole header/footer +shouldn't even be parsed to begin with). + +The test from b349d2483e1fe64316d87b55d0b3b4c8f2293e2e actually checked +for this incorrect frame, so change that (the whole test is suspicious, as +the end result is quite far away from what the original doc looks like). + +(cherry picked from commit 5510f563502168defa4ccfc54214d781a7c92868) +Signed-off-by: Andras Timar + +Change-Id: I2e7192e00237db1f030d0524c5667fe92c9e496b +--- + +diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx +index 7f61328..2e6538a 100644 +--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx ++++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx +@@ -2293,6 +2293,8 @@ uno::Reference< beans::XPropertySet > DomainMapper_Impl::FindOrCreateFieldMaster + -----------------------------------------------------------------------*/ + void DomainMapper_Impl::PushFieldContext() + { ++ if(m_bDiscardHeaderFooter) ++ return; + #ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("pushFieldContext"); + #endif +@@ -2980,6 +2982,8 @@ void DomainMapper_Impl::handleToc + -----------------------------------------------------------------------*/ + void DomainMapper_Impl::CloseFieldCommand() + { ++ if(m_bDiscardHeaderFooter) ++ return; + #ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("closeFieldCommand"); + #endif +@@ -3660,6 +3664,8 @@ void DomainMapper_Impl::SetFieldFFData(FFDataHandler::Pointer_t pFFDataHandler) + -----------------------------------------------------------------------*/ + void DomainMapper_Impl::PopFieldContext() + { ++ if(m_bDiscardHeaderFooter) ++ return; + #ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("popFieldContext"); + #endif +@@ -3955,7 +3961,7 @@ void DomainMapper_Impl::RegisterFrameConversion( + bool DomainMapper_Impl::ExecuteFrameConversion() + { + bool bRet = false; +- if( m_xFrameStartRange.is() && m_xFrameEndRange.is() ) ++ if( m_xFrameStartRange.is() && m_xFrameEndRange.is() && !m_bDiscardHeaderFooter ) + { + bRet = true; + try +@@ -3971,10 +3977,10 @@ bool DomainMapper_Impl::ExecuteFrameConversion() + SAL_WARN( "writerfilter", "Exception caught when converting to frame: " + rEx.Message ); + bRet = false; + } +- m_xFrameStartRange = 0; +- m_xFrameEndRange = 0; +- m_aFrameProperties.realloc( 0 ); + } ++ m_xFrameStartRange = 0; ++ m_xFrameEndRange = 0; ++ m_aFrameProperties.realloc( 0 ); + return bRet; + } + +-- +1.8.4.5 + diff --git a/impress-table-performance.patch b/impress-table-performance.patch new file mode 100644 index 0000000..53b09d4 --- /dev/null +++ b/impress-table-performance.patch @@ -0,0 +1,134 @@ +From 894594c1ff0323f537270d1ca2dec33cdbb9b19c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Mat=C3=BA=C5=A1=20Kukan?= +Date: Tue, 27 May 2014 10:39:45 +0200 +Subject: [PATCH] Related bnc#822625: Cache minimum height for table cells. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change-Id: I35e295347a046376289f5d4fd5468860d0b8f0ae +(cherry picked from commit 5792e76cb5beb630c135f57b74f57d74dd2dc2b0) +Reviewed-on: https://gerrit.libreoffice.org/9519 +Reviewed-by: Caolán McNamara +Tested-by: Caolán McNamara +--- + svx/source/table/cell.cxx | 14 +++++++++----- + svx/source/table/cell.hxx | 1 + + 2 files changed, 10 insertions(+), 5 deletions(-) + +diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx +index d4f199b..7e04db7 100644 +--- a/svx/source/table/cell.cxx ++++ b/svx/source/table/cell.cxx +@@ -358,6 +358,7 @@ Cell::Cell( SdrTableObj& rTableObj, OutlinerParaObject* pOutlinerParaObject ) th + , mbMerged( sal_False ) + , mnRowSpan( 1 ) + , mnColSpan( 1 ) ++, mnCachedMinHeight( -1 ) + , mxTable( rTableObj.getTable() ) + { + if( rTableObj.GetModel() ) +@@ -524,6 +525,7 @@ void Cell::setMerged() + + void Cell::notifyModified() + { ++ mnCachedMinHeight = -1; + if( mxTable.is() ) + mxTable->setModified( sal_True ); + } +@@ -680,8 +682,10 @@ sal_Int32 Cell::getMinimumHeight() + if( !mpProperties ) + return 0; + ++ if( mnCachedMinHeight != -1 ) ++ return mnCachedMinHeight; ++ + SdrTableObj& rTableObj = dynamic_cast< SdrTableObj& >( GetObject() ); +- sal_Int32 nMinimumHeight = 0; + + Rectangle aTextRect; + TakeTextAnchorRect( aTextRect ); +@@ -692,7 +696,7 @@ sal_Int32 Cell::getMinimumHeight() + if(pEditOutliner) + { + pEditOutliner->SetMaxAutoPaperSize(aSize); +- nMinimumHeight = pEditOutliner->GetTextHeight()+1; ++ mnCachedMinHeight = pEditOutliner->GetTextHeight()+1; + } + else /*if ( hasText() )*/ + { +@@ -705,12 +709,12 @@ sal_Int32 Cell::getMinimumHeight() + { + rOutliner.SetText(*GetOutlinerParaObject()); + } +- nMinimumHeight=rOutliner.GetTextHeight()+1; ++ mnCachedMinHeight=rOutliner.GetTextHeight()+1; + rOutliner.Clear(); + } + +- nMinimumHeight += GetTextUpperDistance() + GetTextLowerDistance(); +- return nMinimumHeight; ++ mnCachedMinHeight += GetTextUpperDistance() + GetTextLowerDistance(); ++ return mnCachedMinHeight; + } + + // ----------------------------------------------------------------------------- +diff --git a/svx/source/table/cell.hxx b/svx/source/table/cell.hxx +index 1b26b1c..ba2c6f6 100644 +--- a/svx/source/table/cell.hxx ++++ b/svx/source/table/cell.hxx +@@ -222,6 +222,7 @@ private: + ::sal_Bool mbMerged; + ::sal_Int32 mnRowSpan; + ::sal_Int32 mnColSpan; ++ ::sal_Int32 mnCachedMinHeight; + + Rectangle maCellRect; + +-- +1.8.4.5 + +From 20fc8dfadada521bed3cb9db672edcdf35db3c39 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Mat=C3=BA=C5=A1=20Kukan?= +Date: Tue, 27 May 2014 16:37:30 +0200 +Subject: [PATCH] Related bnc#822625: Cache FontEntry with the original + FontSelectPattern. + +Otherwise we do not hit cache directly, only after expensive call to +ImplFindByFont. + +(cherry picked from commits a6b00d16eb27a5e7e31c721671001a909ecef960 +and 16a62079018aea0e72636bdb00576487b4e830b9) + +Change-Id: If15b368feeba94c8fff8ee7cbe049fc4a2069768 +--- + vcl/source/gdi/outdev3.cxx | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx +index 537f8aa..a36fc85 100644 +--- a/vcl/source/gdi/outdev3.cxx ++++ b/vcl/source/gdi/outdev3.cxx +@@ -2214,6 +2214,7 @@ ImplFontEntry* ImplFontCache::GetFontEntry( ImplDevFontList* pFontList, + ImplFontEntry* ImplFontCache::GetFontEntry( ImplDevFontList* pFontList, + FontSelectPattern& aFontSelData, ImplDirectFontSubstitution* pDevSpecific ) + { ++ FontSelectPattern aFontSelDataOrig(aFontSelData); + // check if a directly matching logical font instance is already cached, + // the most recently used font usually has a hit rate of >50% + ImplFontEntry *pEntry = NULL; +@@ -2300,8 +2301,9 @@ ImplFontEntry* ImplFontCache::GetFontEntry( ImplDevFontList* pFontList, + } + #endif + +- // add the new entry to the cache +- maFontInstanceList[ aFontSelData ] = pEntry; ++ // Add the new entry to the cache with the original FontSelectPattern, ++ // so that we can find it next time as a direct cache hit. ++ maFontInstanceList[ aFontSelDataOrig ] = pEntry; + } + + mpFirstEntry = pEntry; +-- +1.8.4.5 + diff --git a/libreoffice.changes b/libreoffice.changes index 7bbce2c..dd8febe 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,33 @@ +------------------------------------------------------------------- +Fri May 30 09:55:57 UTC 2014 - andras.timar@collabora.com + +- bnc#822625 - LO-L3: Table editing is a pain in Impress (performace issues) + * impress-table-performance.patch + +------------------------------------------------------------------- +Fri May 30 09:30:28 UTC 2014 - andras.timar@collabora.com + +- bnc#863018 - LO-L3: Missing text in imported .doc file + * WW8-import-fix-upper-margin-of-multi-page.patch + +------------------------------------------------------------------- +Fri May 30 09:25:45 UTC 2014 - andras.timar@collabora.com + +- bnc#875717 - LO-L3: DOCX import: font size of numbering is bigger + * direct-format-numbering.patch + +------------------------------------------------------------------- +Fri May 30 09:21:31 UTC 2014 - andras.timar@collabora.com + +- bnc#875718 - LO-L3: DOCX import: extra page numbers + * discard-more-header-footer-stuff.patch + +------------------------------------------------------------------- +Fri May 30 07:33:54 UTC 2014 - andras.timar@collabora.com + +- Security update CVE-2014-0247 + * Use-varying-aElement-name.patch + ------------------------------------------------------------------- Fri May 23 18:49:38 UTC 2014 - andras.timar@collabora.com diff --git a/libreoffice.spec b/libreoffice.spec index 76cd01c..30db29f 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -108,6 +108,16 @@ Patch26: docx-brightness-contrast-1.diff Patch27: docx-brightness-contrast-2.diff # bnc#467278: Introduce a warning that changes to VBA macros cannot be saved. Patch28: VBA-macro-modification-warning.diff +# CVE-2014-0247 +Patch29: Use-varying-aElement-name.patch +# bnc#875718 - LO-L3: DOCX import: extra page numbers +Patch30: discard-more-header-footer-stuff.patch +# bnc#875717 - LO-L3: DOCX import: font size of numbering is bigger +Patch31: direct-format-numbering.patch +# bnc#863018 - LO-L3: Missing text in imported .doc file +Patch32: WW8-import-fix-upper-margin-of-multi-page.patch +# bnc#822625 - LO-L3: Table editing is a pain in Impress (performace issues) +Patch33: impress-table-performance.patch # try to save space by using hardlinks Patch990: install-with-hardlinks.diff BuildRequires: ImageMagick @@ -879,6 +889,11 @@ Provides additional %{langname} translations and resources for %{project}. \ %patch26 -p1 %patch27 -p1 %patch28 -p1 +%patch29 -p1 +%patch30 -p1 +%patch31 -p1 +%patch32 -p1 +%patch33 -p1 %patch990 -p1 # 256x256 icons tar -xjf %{SOURCE20} From 74b3568e1acdbb046183ed0c9a093b380d909adfdb01841eae9e16fc49ddd621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 3 Jun 2014 07:12:37 +0000 Subject: [PATCH 07/27] - Typo in desc stating there is libreoffice-kde which is not anymore. OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=158 --- libreoffice.changes | 5 +++++ libreoffice.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libreoffice.changes b/libreoffice.changes index dd8febe..4bdf5ab 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 3 07:12:10 UTC 2014 - tchvatal@suse.com + +- Typo in desc stating there is libreoffice-kde which is not anymore. + ------------------------------------------------------------------- Fri May 30 09:55:57 UTC 2014 - andras.timar@collabora.com diff --git a/libreoffice.spec b/libreoffice.spec index 30db29f..4d79442 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -293,7 +293,7 @@ Some optional features are provided by extra packages, for example: - libreoffice-mailmerge - libreoffice-filters -- libreoffice-kde +- libreoffice-kde4 - libreoffice-gnome Non-English localizations are provided by extra packages as well, for From 3f4d87b018bdb84f220ff217b048fdcfe0d0942761aeb4a42b77ff087fe1bc23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 5 Jun 2014 14:08:35 +0000 Subject: [PATCH 08/27] - Add patch from upstream fix-python-wizzards.patch to fix crashing python wizzards ; bnc#881294 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=159 --- fix-python-wizzards.patch | 74 +++++++++++++++++++++++++++++++++++++++ libreoffice.changes | 6 ++++ libreoffice.spec | 3 ++ 3 files changed, 83 insertions(+) create mode 100644 fix-python-wizzards.patch diff --git a/fix-python-wizzards.patch b/fix-python-wizzards.patch new file mode 100644 index 0000000..44150b2 --- /dev/null +++ b/fix-python-wizzards.patch @@ -0,0 +1,74 @@ +From bf355f47f49eb352985c129544c60c27814f450b Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Mon, 03 Mar 2014 10:57:34 +0000 +Subject: Resolves: fdo#77899 fax etc wizards don't start + +Wizards should look for templates in Template_internal, not Template_user + +...as only the former reliably denotes the share/template tree where the +wizard templates are stored. (Presumably the latter defaulted to the former as +long as it wasn't explicitly set in the past, but is now always explicitly set +since 838b77f5f3d6d8fd98891e99a23ff78a6a357cb2 "Resolves: rhbz#1065807 use xdg +~/Templates for default Template location.") + +Change-Id: I7d1ac47d821c778fe342865465d0505a94b824bf +(cherry picked from commit 97822e3cbc63d3bd110bc3c654b3fbb4d4d1904c) + +actively search for wizards dir in all internal templates + +(cherry picked from commit 5fa18dc21644f2a719bf39ec948a586fa8837b6a) +Signed-off-by: Stephan Bergmann + +Conflicts: + wizards/com/sun/star/wizards/ui/WizardDialog.py + +Change-Id: I4ef6da4d9d1931917e0aaa6e110fd273bd917b26 +Signed-off-by: Stephan Bergmann +--- +diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py +index 1ff5f1c..76921d0 100644 +--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py ++++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py +@@ -773,7 +773,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): + return None + + def initializeTemplates(self, xMSF): +- sLetterPath = self.sTemplatePath + "/../common/wizard/letter" ++ sLetterPath = self.sTemplatePath + "/wizard/letter" + self.BusinessFiles = \ + FileAccess.getFolderTitles( + xMSF, "bus", sLetterPath, self.resources.dictBusinessTemplate) +diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py +index fc1ce41..08a8c2d 100644 +--- a/wizards/com/sun/star/wizards/ui/WizardDialog.py ++++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py +@@ -23,6 +23,7 @@ from .UnoDialog2 import UnoDialog2, Desktop, PropertyNames, UIConsts, \ + from .event.CommonListener import TerminateListenerProcAdapter + from ..common.Resource import Resource + from ..common.HelpIds import HelpIds ++from ..common.FileAccess import FileAccess + from ..document.OfficeDocument import OfficeDocument + from ..text.TextDocument import TextDocument + +@@ -114,10 +115,17 @@ class WizardDialog(UnoDialog2): + def initializePaths(self): + xPropertySet = \ + self.xMSF.createInstance("com.sun.star.util.PathSettings") +- self.sTemplatePath = \ +- xPropertySet.getPropertyValue("Template_user")[0] + self.sUserTemplatePath = \ + xPropertySet.getPropertyValue("Template_writable") ++ myFA = FileAccess(self.xMSF) ++ aInternalPaths = xPropertySet.getPropertyValue("Template_internal") ++ self.sTemplatePath = "" ++ for path in aInternalPaths: ++ if myFA.exists(path + "/wizard", False): ++ self.sTemplatePath = path ++ break ++ if self.sTemplatePath == "": ++ raise Exception("could not find wizard templates") + + def addRoadmap(self): + try: +-- +cgit v0.9.0.2-2-gbebe diff --git a/libreoffice.changes b/libreoffice.changes index 4bdf5ab..1bf292a 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jun 5 14:07:31 UTC 2014 - tchvatal@suse.com + +- Add patch from upstream fix-python-wizzards.patch to fix crashing + python wizzards ; bnc#881294 + ------------------------------------------------------------------- Tue Jun 3 07:12:10 UTC 2014 - tchvatal@suse.com diff --git a/libreoffice.spec b/libreoffice.spec index 4d79442..40c0d59 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -118,6 +118,8 @@ Patch31: direct-format-numbering.patch Patch32: WW8-import-fix-upper-margin-of-multi-page.patch # bnc#822625 - LO-L3: Table editing is a pain in Impress (performace issues) Patch33: impress-table-performance.patch +# bnc#881294 - libreoffice python wizzards crash +Patch34: fix-python-wizzards.patch # try to save space by using hardlinks Patch990: install-with-hardlinks.diff BuildRequires: ImageMagick @@ -894,6 +896,7 @@ Provides additional %{langname} translations and resources for %{project}. \ %patch31 -p1 %patch32 -p1 %patch33 -p1 +%patch34 -p1 %patch990 -p1 # 256x256 icons tar -xjf %{SOURCE20} From 3c133289746410373ce975b00746377d1fdcd3972826dbaecce7e433a518f3c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 16 Jun 2014 10:43:39 +0000 Subject: [PATCH 09/27] - Version bump to 4.3.0beta2: * major version bump with fixes all around everywhere - Added dependencies over glew and glm - Removed patches that were upstreamed: * set-language-in-impress.diff * text-alignment-in-shape.diff * kde4-4.2.3.3-timer-mutex.patch * impress-table-performance.patch * import-gradfill-for-text-colors.diff * fix-text-rotation.diff * fix-python-wizzards.patch * docx-brightness-contrast-2.diff * docx-brightness-contrast-1.diff * doc-brightness-contrast.diff * discard-more-header-footer-stuff.patch * disable-firebird-unit-test.diff * direct-format-numbering.patch * WW8-import-fix-upper-margin-of-multi-page.patch * VBA-macro-modification-warning.diff * Use-varying-aElement-name.patch * 0001-std-strlen-requires-cstring-include-to-build.patch Temporary switches until upstream allows system version: * --disable-gltf * --disable-coinmp OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=160 --- ...en-requires-cstring-include-to-build.patch | 44 ---- Use-varying-aElement-name.patch | 26 -- VBA-macro-modification-warning.diff | 144 ---------- ...mport-fix-upper-margin-of-multi-page.patch | 171 ------------ direct-format-numbering.patch | 232 ---------------- disable-firebird-unit-test.diff | 17 -- discard-more-header-footer-stuff.patch | 80 ------ doc-brightness-contrast.diff | 249 ------------------ docx-brightness-contrast-1.diff | 30 --- docx-brightness-contrast-2.diff | 143 ---------- fix-python-wizzards.patch | 74 ------ fix-text-rotation.diff | 26 -- import-gradfill-for-text-colors.diff | 75 ------ impress-table-performance.patch | 134 ---------- kde4-4.2.3.3-timer-mutex.patch | 71 ----- libreoffice-4.2.4.2.tar.xz | 3 - libreoffice-4.3.0.0.beta2-buildfix1.tar.xz | 3 + libreoffice-help-4.2.4.2.tar.xz | 3 - ...office-help-4.3.0.0.beta2-buildfix1.tar.xz | 3 + libreoffice-translations-4.2.4.2.tar.xz | 3 - ...ranslations-4.3.0.0.beta2-buildfix1.tar.xz | 3 + libreoffice.changes | 28 ++ libreoffice.spec | 74 ++---- set-language-in-impress.diff | 245 ----------------- text-alignment-in-shape.diff | 58 ---- 25 files changed, 52 insertions(+), 1887 deletions(-) delete mode 100644 0001-std-strlen-requires-cstring-include-to-build.patch delete mode 100644 Use-varying-aElement-name.patch delete mode 100644 VBA-macro-modification-warning.diff delete mode 100644 WW8-import-fix-upper-margin-of-multi-page.patch delete mode 100644 direct-format-numbering.patch delete mode 100644 disable-firebird-unit-test.diff delete mode 100644 discard-more-header-footer-stuff.patch delete mode 100644 doc-brightness-contrast.diff delete mode 100644 docx-brightness-contrast-1.diff delete mode 100644 docx-brightness-contrast-2.diff delete mode 100644 fix-python-wizzards.patch delete mode 100644 fix-text-rotation.diff delete mode 100644 import-gradfill-for-text-colors.diff delete mode 100644 impress-table-performance.patch delete mode 100644 kde4-4.2.3.3-timer-mutex.patch delete mode 100644 libreoffice-4.2.4.2.tar.xz create mode 100644 libreoffice-4.3.0.0.beta2-buildfix1.tar.xz delete mode 100644 libreoffice-help-4.2.4.2.tar.xz create mode 100644 libreoffice-help-4.3.0.0.beta2-buildfix1.tar.xz delete mode 100644 libreoffice-translations-4.2.4.2.tar.xz create mode 100644 libreoffice-translations-4.3.0.0.beta2-buildfix1.tar.xz delete mode 100644 set-language-in-impress.diff delete mode 100644 text-alignment-in-shape.diff diff --git a/0001-std-strlen-requires-cstring-include-to-build.patch b/0001-std-strlen-requires-cstring-include-to-build.patch deleted file mode 100644 index 8baf6db..0000000 --- a/0001-std-strlen-requires-cstring-include-to-build.patch +++ /dev/null @@ -1,44 +0,0 @@ -From f12631e960a2b4123c96e96d2af7d43741d8e6a5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= -Date: Wed, 12 Mar 2014 13:44:29 +0100 -Subject: [PATCH] std::strlen requires cstring include to build - -Or, even simpler, don't bother with the needless namespacing. - -Change-Id: I4bbb115c1c2c89881a0bf88ccd54b0f5cb8b3518 -(cherry picked from commit da9bd301c6f62e829daadb2af6a6b9633d4f1cb9) -Signed-off-by: Andras Timar ---- - sc/source/filter/excel/xestream.cxx | 2 +- - sc/source/filter/qpro/qpro.cxx | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx -index 035a827..df08d2c 100644 ---- a/sc/source/filter/excel/xestream.cxx -+++ b/sc/source/filter/excel/xestream.cxx -@@ -985,7 +985,7 @@ sax_fastparser::FSHelperPtr& XclExpXmlStream::WriteAttributesInternal( sal_Int32 - rStream->write( " " ) - ->writeId( nAttribute ) - ->write( "=\"" ) -- ->writeEscaped( OUString(pValue, std::strlen(pValue), RTL_TEXTENCODING_UTF8) ) -+ ->writeEscaped( OUString(pValue, strlen(pValue), RTL_TEXTENCODING_UTF8) ) - ->write( "\"" ); - } - -diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx -index c370492..793412a 100644 ---- a/sc/source/filter/qpro/qpro.cxx -+++ b/sc/source/filter/qpro/qpro.cxx -@@ -229,7 +229,7 @@ void ScQProReader::readString( OUString &rString, sal_uInt16 nLength ) - sal_Char* pText = new sal_Char[ nLength + 1 ]; - mpStream->Read( pText, nLength ); - pText[ nLength ] = 0; -- rString = OUString( pText, std::strlen(pText), mpStream->GetStreamCharSet() ); -+ rString = OUString( pText, strlen(pText), mpStream->GetStreamCharSet() ); - delete [] pText; - } - --- -1.8.4.5 - diff --git a/Use-varying-aElement-name.patch b/Use-varying-aElement-name.patch deleted file mode 100644 index 37644b3..0000000 --- a/Use-varying-aElement-name.patch +++ /dev/null @@ -1,26 +0,0 @@ -From eeac58b5261e80ded0381e2be7f1fa3e6f0e9bb4 Mon Sep 17 00:00:00 2001 -From: Stephan Bergmann -Date: Tue, 20 May 2014 14:55:40 +0200 -Subject: [PATCH] Use varying aElement name - -Change-Id: Idc135ef5031a01961cc18d897a734b598bc833f4 ---- - sfx2/source/doc/docmacromode.cxx | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx -index 39d2b6d..8f87197 100644 ---- a/sfx2/source/doc/docmacromode.cxx -+++ b/sfx2/source/doc/docmacromode.cxx -@@ -343,7 +343,7 @@ namespace sfx2 - if( aElement == aStdLibName || aElement == aVBAProject ) - { - Reference < XNameAccess > xLib; -- Any aAny = xContainer->getByName( aStdLibName ); -+ Any aAny = xContainer->getByName( aElement ); - aAny >>= xLib; - if ( xLib.is() && xLib->hasElements() ) - return sal_True; --- -1.8.4.5 - diff --git a/VBA-macro-modification-warning.diff b/VBA-macro-modification-warning.diff deleted file mode 100644 index 00616d1..0000000 --- a/VBA-macro-modification-warning.diff +++ /dev/null @@ -1,144 +0,0 @@ -From cfc71b418d27bbfaec195238764078fd5881bab3 Mon Sep 17 00:00:00 2001 -From: Jan Holesovsky -Date: Thu, 22 May 2014 17:29:56 +0200 -Subject: [PATCH] bnc#467278: Introduce a warning that changes to VBA macros - cannot be saved. - -As an InfoBar, so hopefully not annoying... - -Conflicts: - basctl/source/basicide/basidesh.cxx - -Change-Id: I5d4e79273edc03829fdab2d6d5a291576c954e4b ---- - basctl/inc/basidesh.hrc | 1 + - basctl/source/basicide/basidesh.cxx | 9 +++++++++ - basctl/source/basicide/basidesh.src | 4 ++++ - include/sfx2/viewfrm.hxx | 2 +- - 4 files changed, 15 insertions(+), 1 deletion(-) - -diff --git a/basctl/inc/basidesh.hrc b/basctl/inc/basidesh.hrc -index 623cb0e..a40f788 100644 ---- a/basctl/inc/basidesh.hrc -+++ b/basctl/inc/basidesh.hrc -@@ -68,6 +68,7 @@ - #define RID_STR_OPEN ( RID_BASICIDE_START + 20 ) - #define RID_STR_SAVE ( RID_BASICIDE_START + 21 ) - #define RID_STR_RUNTIMEERROR ( RID_BASICIDE_START + 22 ) -+#define RID_STR_CANNOTSAVEVBA ( RID_BASICIDE_START + 23 ) - #define RID_STR_STDDIALOGNAME ( RID_BASICIDE_START + 24 ) - - #define RID_STR_STDMODULENAME ( RID_BASICIDE_START + 27 ) -diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx -index 674775b..f95e6f4 100644 ---- a/basctl/source/basicide/basidesh.cxx -+++ b/basctl/source/basicide/basidesh.cxx -@@ -35,6 +35,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -137,6 +138,7 @@ SFX_IMPL_INTERFACE( basctl_Shell, SfxViewShell, IDEResId( RID_STR_IDENAME ) ) - { - SFX_CHILDWINDOW_REGISTRATION( SID_SEARCH_DLG ); - SFX_FEATURED_CHILDWINDOW_REGISTRATION(SID_SHOW_PROPERTYBROWSER, BASICIDE_UI_FEATURE_SHOW_BROWSER); -+ SFX_CHILDWINDOW_REGISTRATION(SfxInfoBarContainerChild::GetChildWindowId()); - SFX_POPUPMENU_REGISTRATION( IDEResId( RID_POPUP_DLGED ) ); - } - -@@ -250,7 +252,14 @@ Shell::~Shell() - void Shell::onDocumentCreated( const ScriptDocument& /*_rDocument*/ ) - { - if (pCurWin) -+ { - pCurWin->OnNewDocument(); -+ -+ // for VBA documents, show a warning that we can save them only in ODF -+ if (pCurWin->GetDocument().isInVBAMode()) -+ GetViewFrame()->AppendInfoBar("vba_save", IDE_RESSTR(RID_STR_CANNOTSAVEVBA)); -+ } -+ - UpdateWindows(); - } - -diff --git a/basctl/source/basicide/basidesh.src b/basctl/source/basicide/basidesh.src -index 6876130..5e019fd 100644 ---- a/basctl/source/basicide/basidesh.src -+++ b/basctl/source/basicide/basidesh.src -@@ -216,6 +216,10 @@ String RID_STR_CANNOTCLOSE - { - Text [ en-US ] = "The window cannot be closed while BASIC is running." ; - }; -+String RID_STR_CANNOTSAVEVBA -+{ -+ Text [ en-US ] = "You are editing a VBA macro. Changes can be saved only in OpenDocument Format." ; -+}; - String RID_STR_REPLACESTDLIB - { - Text [ en-US ] = "The default library cannot be replaced." ; -diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx -index cf316b7..8541397 100644 ---- a/include/sfx2/viewfrm.hxx -+++ b/include/sfx2/viewfrm.hxx -@@ -190,7 +190,7 @@ public: - The buttons will be added from Right to Left at the right of the info bar. The parent, size - and position of each button will be changed: only the width will remain unchanged. - */ -- void AppendInfoBar( const OUString& sId, const OUString& sMessage, std::vector< PushButton* > aButtons ); -+ void AppendInfoBar( const OUString& sId, const OUString& sMessage, std::vector< PushButton* > aButtons = std::vector< PushButton* >() ); - void RemoveInfoBar( const OUString& sId ); - - SAL_DLLPRIVATE void SetDowning_Impl(); --- -1.8.4.5 - -From 39a589e1cf9340e95d63602afd272faccbaac9a5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= -Date: Fri, 23 May 2014 18:48:53 +0200 -Subject: [PATCH] force posted events before timer timeouts in KDE4 event loop - (bnc#467278) - -In this particular case, basctl::Shell::onDocumentCreated() and pretty much -everything in basctl/ it seems operate on the current window. The "OnNew" -event that triggers this comes from a timeout generated who knows where -for whatever reason. However, the code "knows" what the current window -is by having basctl::Shell::SetCurWindow() react on events about the current -window changing ... which come from posted events. - -So, unless it's defined somewhere that an ordering here must exist, this -is inherently racy. At least generic and Gtk event loops appear to always -deliver the posted event first, so force the same ordering in the KDE -event loop handling. - -Change-Id: Ia098f6b45e6b5a5133a12a9172eb09069e6362f9 ---- - vcl/unx/kde4/KDEXLib.cxx | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx -index 2630c0c..9d2949e 100644 ---- a/vcl/unx/kde4/KDEXLib.cxx -+++ b/vcl/unx/kde4/KDEXLib.cxx -@@ -349,6 +349,16 @@ void KDEXLib::StopTimer() - - void KDEXLib::timeoutActivated() - { -+ // HACK? Always process posted events before timer timeouts. -+ // There are places that may watch both both (for example, there's a posted -+ // event about change of the current active window and there's a timeout -+ // event informing that a document has finished loading). This is of course -+ // racy, but both generic and gtk event loops manage to deliver posted events -+ // first, so it's at least consistent, and it probably kind of makes at least -+ // some sense (timeouts should be more ok to wait and be triggered somewhen). -+ while( SalKDEDisplay::self()->HasUserEvents() ) -+ SalKDEDisplay::self()->DispatchInternalEvent(); -+ - X11SalData *pData = (X11SalData*)ImplGetSVData()->mpSalData; - pData->Timeout(); - // QTimer is not single shot, so will be restarted immediatelly --- -1.8.4.5 - diff --git a/WW8-import-fix-upper-margin-of-multi-page.patch b/WW8-import-fix-upper-margin-of-multi-page.patch deleted file mode 100644 index a2d464f..0000000 --- a/WW8-import-fix-upper-margin-of-multi-page.patch +++ /dev/null @@ -1,171 +0,0 @@ -From 9d981abc3f310adf9af3454dd515ea356b31d3c1 Mon Sep 17 00:00:00 2001 -From: Miklos Vajna -Date: Mon, 26 May 2014 12:04:39 +0200 -Subject: [PATCH] bnc#863018 WW8 import: fix upper margin of multi-page - floating table - -A vert orient position was already handled in case a floating table was -imported as a TextFrame, but in case we didn't do that, the vert orient -position was simply lost. - -Fix this by importing it as the upper margin of the table (assuming that -the position is relative from the anchor position). - -(cherry picked from commit 3755c87d0426a499d4755e82d8fbc77caa240764) - -Change-Id: I3e96f3068605fd6313dfb3e55483e1bce6c063a5 -Reviewed-on: https://gerrit.libreoffice.org/9487 -Reviewed-by: Andras Timar -Tested-by: Andras Timar ---- - -diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx -index 213e996..0725a9a 100644 ---- a/sw/source/filter/ww8/ww8par.cxx -+++ b/sw/source/filter/ww8/ww8par.cxx -@@ -2726,9 +2726,13 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp) - maApos[nInTable] = false; - } - -+ // So that SwWW8ImplReader::StartApo() can write into this, and -+ // WW8TabDesc::CreateSwTable() can read it, if necessary. -+ SvxULSpaceItem aULSpaceItem(RES_UL_SPACE); -+ - if (aApo.mbStartApo) - { -- maApos[nInTable] = StartApo(aApo, pTabPos); -+ maApos[nInTable] = StartApo(aApo, pTabPos, &aULSpaceItem); - // We need an ReSync after StartApo - // (actually only if the Apo extends past a FKP border) - rbReSync = true; -@@ -2744,7 +2748,7 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp) - - if(nInTable < nCellLevel) - { -- if (StartTable(nStartCp)) -+ if (StartTable(nStartCp, &aULSpaceItem)) - ++nInTable; - else - break; -diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx -index 28dca2e..772da4c 100644 ---- a/sw/source/filter/ww8/ww8par.hxx -+++ b/sw/source/filter/ww8/ww8par.hxx -@@ -1473,7 +1473,7 @@ private: - - WW8FlyPara *ConstructApo(const ApoTestResults &rApo, - const WW8_TablePos *pTabPos); -- bool StartApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos); -+ bool StartApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos, SvxULSpaceItem* pULSpaceItem = 0); - void StopApo(); - bool TestSameApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos); - ApoTestResults TestApo(int nCellLevel, bool bTableRowEnd, -@@ -1523,7 +1523,7 @@ private: - - void ReadDocVars(); - -- bool StartTable(WW8_CP nStartCp); -+ bool StartTable(WW8_CP nStartCp, SvxULSpaceItem* pULSpaceItem = 0); - bool InEqualApo(int nLvl) const; - bool InLocalApo() const { return InEqualApo(nInTable); } - bool InEqualOrHigherApo(int nLvl) const; -diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx -index f94e055..fcb5b50 100644 ---- a/sw/source/filter/ww8/ww8par2.cxx -+++ b/sw/source/filter/ww8/ww8par2.cxx -@@ -29,6 +29,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -178,7 +179,7 @@ public: - - WW8TabDesc( SwWW8ImplReader* pIoClass, WW8_CP nStartCp ); - bool Ok() const { return bOk; } -- void CreateSwTable(); -+ void CreateSwTable(SvxULSpaceItem* pULSpaceItem = 0); - void UseSwTable(); - void SetSizePosition(SwFrmFmt* pFrmFmt); - void TableCellEnd(); -@@ -2324,7 +2325,7 @@ void wwSectionManager::PrependedInlineNode(const SwPosition &rPos, - maSegments.back().maStart = SwNodeIndex(rNode); - } - --void WW8TabDesc::CreateSwTable() -+void WW8TabDesc::CreateSwTable(SvxULSpaceItem* pULSpaceItem) - { - ::SetProgressState(pIo->nProgress, pIo->mpDocShell); // Update - -@@ -2380,6 +2381,9 @@ void WW8TabDesc::CreateSwTable() - if (!pTable || !pTable->GetFrmFmt()) - return; - -+ if (pULSpaceItem && pULSpaceItem->GetUpper() != 0) -+ aItemSet.Put(*pULSpaceItem); -+ - SwTableNode* pTableNode = pTable->GetTableNode(); - OSL_ENSURE(pTableNode, "no table node!"); - if (pTableNode) -@@ -3319,7 +3323,7 @@ void WW8TabDesc::SetNumRuleName( const OUString& rName ) - aNumRuleNames[nCol] = rName; - } - --bool SwWW8ImplReader::StartTable(WW8_CP nStartCp) -+bool SwWW8ImplReader::StartTable(WW8_CP nStartCp, SvxULSpaceItem* pULSpaceItem) - { - // Entering a table so make sure the FirstPara flag gets set - bFirstPara = true; -@@ -3395,7 +3399,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp) - "Not the anchor type requested!" ); - MoveInsideFly(pTableDesc->pFlyFmt); - } -- pTableDesc->CreateSwTable(); -+ pTableDesc->CreateSwTable(pULSpaceItem); - if (pTableDesc->pFlyFmt) - { - pTableDesc->SetSizePosition(pTableDesc->pFlyFmt); -diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx -index 43c93cd..066b8db 100644 ---- a/sw/source/filter/ww8/ww8par6.cxx -+++ b/sw/source/filter/ww8/ww8par6.cxx -@@ -2286,7 +2286,8 @@ bool SwWW8ImplReader::IsDropCap() - } - - bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo, -- const WW8_TablePos *pTabPos) -+ const WW8_TablePos *pTabPos, -+ SvxULSpaceItem* pULSpaceItem) - { - if (0 == (pWFlyPara = ConstructApo(rApo, pTabPos))) - return false; -@@ -2321,7 +2322,24 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo, - WW8FlySet aFlySet(*this, pWFlyPara, pSFlyPara, false); - - if (pTabPos && pTabPos->bNoFly) -+ { - pSFlyPara->pFlyFmt = 0; -+ if (pULSpaceItem) -+ { -+ // Word positioned tables can have a position (like a -+ // fly-frame), but they also support flowing accross multiple -+ // pages. If we decide to import this as a normal table (so it -+ // can flow accross multiple pages), then turn the vertical -+ // orientation position of the fly into a table upper margin. -+ const SfxPoolItem* pItem = 0; -+ if (aFlySet.HasItem(RES_VERT_ORIENT, &pItem)) -+ { -+ const SwFmtVertOrient* pOrient = static_cast(pItem); -+ if (pOrient->GetPos() != 0) -+ pULSpaceItem->SetUpper(pOrient->GetPos()); -+ } -+ } -+ } - else - { - pSFlyPara->pFlyFmt = rDoc.MakeFlySection( pSFlyPara->eAnchor, --- -1.8.4.5 - diff --git a/direct-format-numbering.patch b/direct-format-numbering.patch deleted file mode 100644 index dbadc96..0000000 --- a/direct-format-numbering.patch +++ /dev/null @@ -1,232 +0,0 @@ -From 2d89b1a029514935b60fbd3f7f7c5341a329bfc8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= -Date: Thu, 29 May 2014 14:31:20 +0200 -Subject: [PATCH] handle direct formatting for numbering in .docx (bnc#875717) - -Change-Id: I3ed0f926e79f3878c5702c2becae97d99d00e201 -(cherry picked from commit c2ac2ced0d51200a62f7436144f0d89cfcd15eed) -Signed-off-by: Andras Timar ---- - sw/inc/IDocumentSettingAccess.hxx | 3 ++- - sw/inc/doc.hxx | 1 + - sw/source/core/doc/doc.cxx | 4 ++++ - sw/source/core/doc/docnew.cxx | 1 + - sw/source/core/text/txtfld.cxx | 31 ++++++++++++++++++++++++++++ - sw/source/ui/uno/SwXDocumentSettings.cxx | 16 +++++++++++++- - writerfilter/source/dmapper/DomainMapper.cxx | 3 +++ - writerfilter/source/dmapper/PropertyIds.cxx | 1 + - writerfilter/source/dmapper/PropertyIds.hxx | 1 + - 9 files changed, 59 insertions(+), 2 deletions(-) - -diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx -index 6e66fd0..4e94a1e 100644 ---- a/sw/inc/IDocumentSettingAccess.hxx -+++ b/sw/inc/IDocumentSettingAccess.hxx -@@ -92,7 +92,8 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd - STYLES_NODEFAULT, - FLOATTABLE_NOMARGINS, - EMBED_FONTS, -- EMBED_SYSTEM_FONTS -+ EMBED_SYSTEM_FONTS, -+ APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING - }; - - public: -diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx -index 987d0ab..b872119 100644 ---- a/sw/inc/doc.hxx -+++ b/sw/inc/doc.hxx -@@ -581,6 +581,7 @@ private: - bool mbBackgroundParaOverDrawings; - bool mbTabOverMargin; - bool mbSurroundTextWrapSmall; -+ bool mApplyParagraphMarkFormatToNumbering; - - bool mbLastBrowseMode : 1; - -diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx -index e1d84f3..d3c74e9 100644 ---- a/sw/source/core/doc/doc.cxx -+++ b/sw/source/core/doc/doc.cxx -@@ -206,6 +206,7 @@ bool SwDoc::get(/*[in]*/ DocumentSettingId id) const - case FLOATTABLE_NOMARGINS: return mbFloattableNomargins; - case EMBED_FONTS: return mEmbedFonts; - case EMBED_SYSTEM_FONTS: return mEmbedSystemFonts; -+ case APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING: return mApplyParagraphMarkFormatToNumbering; - default: - OSL_FAIL("Invalid setting id"); - } -@@ -400,6 +401,9 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) - case EMBED_SYSTEM_FONTS: - mEmbedSystemFonts = value; - break; -+ case APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING: -+ mApplyParagraphMarkFormatToNumbering = value; -+ break; - default: - OSL_FAIL("Invalid setting id"); - } -diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx -index 5385509..a97e616 100644 ---- a/sw/source/core/doc/docnew.cxx -+++ b/sw/source/core/doc/docnew.cxx -@@ -313,6 +313,7 @@ SwDoc::SwDoc() - mbBackgroundParaOverDrawings(false), - mbTabOverMargin(false), - mbSurroundTextWrapSmall(false), -+ mApplyParagraphMarkFormatToNumbering(false), - mbLastBrowseMode( false ), - mn32DummyCompatabilityOptions1(0), - mn32DummyCompatabilityOptions2(0), -diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx -index 22058c3..35471f41 100644 ---- a/sw/source/core/text/txtfld.cxx -+++ b/sw/source/core/text/txtfld.cxx -@@ -48,6 +48,7 @@ - #include "pagedesc.hxx" - #include - #include "fmtmeta.hxx" -+#include "fmtautofmt.hxx" - - - /************************************************************************* -@@ -382,6 +383,32 @@ SwLinePortion *SwTxtFormatter::NewExtraPortion( SwTxtFormatInfo &rInf ) - *************************************************************************/ - - -+// OOXML spec says that w:rPr inside w:pPr specifies formatting for the paragraph mark symbol (i.e. the control -+// character than can be configured to be shown). However, in practice MSO also uses it as direct formatting -+// for numbering in that paragraph. I don't know if the problem is in the spec or in MSWord. -+static void checkApplyParagraphMarkFormatToNumbering( SwFont* pNumFnt, SwTxtFormatInfo& rInf, const IDocumentSettingAccess* pIDSA ) -+{ -+ SwTxtNode* node = rInf.GetTxtFrm()->GetTxtNode(); -+ if( !pIDSA->get(IDocumentSettingAccess::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING )) -+ return; -+ if( SwpHints* hints = node->GetpSwpHints()) -+ { -+ for( int i = 0; i < hints->Count(); ++i ) -+ { -+ SwTxtAttr* hint = hints->GetTextHint( i ); -+ // Formatting for the paragraph mark is set to apply only to the (non-existent) extra character -+ // the at end of the txt node. -+ if( hint->Which() == RES_TXTATR_AUTOFMT && hint->GetStart() != NULL && hint->GetEnd() != NULL -+ && *hint->GetStart() == *hint->GetEnd() && *hint->GetStart() == node->Len()) -+ { -+ boost::shared_ptr pSet(hint->GetAutoFmt().GetStyleHandle()); -+ pNumFnt->SetDiffFnt( pSet.get(), pIDSA ); -+ } -+ } -+ } -+} -+ -+ - SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const - { - if( rInf.IsNumDone() || rInf.GetTxtStart() != nStart -@@ -470,6 +497,8 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const - if( pFmt ) - pNumFnt->SetDiffFnt( pFmt, pIDSA ); - -+ checkApplyParagraphMarkFormatToNumbering( pNumFnt, rInf, pIDSA ); -+ - if ( pFmtFnt ) - { - const sal_uInt8 nAct = pNumFnt->GetActual(); -@@ -529,6 +558,8 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const - if( pFmt ) - pNumFnt->SetDiffFnt( pFmt, pIDSA ); - -+ checkApplyParagraphMarkFormatToNumbering( pNumFnt, rInf, pIDSA ); -+ - // we do not allow a vertical font - pNumFnt->SetVertical( pNumFnt->GetOrientation(), pFrm->IsVertical() ); - -diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx -index c10ddfd..8a218a1 100644 ---- a/sw/source/ui/uno/SwXDocumentSettings.cxx -+++ b/sw/source/ui/uno/SwXDocumentSettings.cxx -@@ -123,7 +123,8 @@ enum SwDocumentSettingsPropertyHandles - HANDLE_EMBED_FONTS, - HANDLE_EMBED_SYSTEM_FONTS, - HANDLE_TAB_OVER_MARGIN, -- HANDLE_SURROUND_TEXT_WRAP_SMALL -+ HANDLE_SURROUND_TEXT_WRAP_SMALL, -+ HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING - }; - - static MasterPropertySetInfo * lcl_createSettingsInfo() -@@ -194,6 +195,7 @@ static MasterPropertySetInfo * lcl_createSettingsInfo() - { RTL_CONSTASCII_STRINGPARAM("EmbedSystemFonts"), HANDLE_EMBED_SYSTEM_FONTS, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("TabOverMargin"), HANDLE_TAB_OVER_MARGIN, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("SurroundTextWrapSmall"), HANDLE_SURROUND_TEXT_WRAP_SMALL, CPPUTYPE_BOOLEAN, 0, 0}, -+ { RTL_CONSTASCII_STRINGPARAM("ApplyParagraphMarkFormatToNumbering"), HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING, CPPUTYPE_BOOLEAN, 0, 0}, - /* - * As OS said, we don't have a view when we need to set this, so I have to - * find another solution before adding them to this property set - MTG -@@ -797,6 +799,12 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf - mpDoc->set(IDocumentSettingAccess::SURROUND_TEXT_WRAP_SMALL, bTmp); - } - break; -+ case HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING: -+ { -+ bool bTmp = *(sal_Bool*)rValue.getValue(); -+ mpDoc->set(IDocumentSettingAccess::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING, bTmp); -+ } -+ break; - default: - throw UnknownPropertyException(); - } -@@ -1217,6 +1225,12 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf - rValue.setValue( &bTmp, ::getBooleanCppuType() ); - } - break; -+ case HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING: -+ { -+ sal_Bool bTmp = mpDoc->get( IDocumentSettingAccess::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING ); -+ rValue.setValue( &bTmp, ::getBooleanCppuType() ); -+ } -+ break; - default: - throw UnknownPropertyException(); - } -diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx -index 4a520c8..98b6f9e 100644 ---- a/writerfilter/source/dmapper/DomainMapper.cxx -+++ b/writerfilter/source/dmapper/DomainMapper.cxx -@@ -106,6 +106,9 @@ LoggedStream(dmapper_logger, "DomainMapper"), - m_pImpl->SetDocumentSettingsProperty( - PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_SURROUND_TEXT_WRAP_SMALL ), - uno::makeAny( true ) ); -+ m_pImpl->SetDocumentSettingsProperty( -+ PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING ), -+ uno::makeAny( true ) ); - - //import document properties - try -diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx -index 12f28aa..bacbcd3 100644 ---- a/writerfilter/source/dmapper/PropertyIds.cxx -+++ b/writerfilter/source/dmapper/PropertyIds.cxx -@@ -345,6 +345,7 @@ const OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const - case PROP_PARA_SHADOW_FORMAT: sName = "ParaShadowFormat"; break; - case PROP_FOOTNOTE_LINE_RELATIVE_WIDTH: sName = "FootnoteLineRelativeWidth"; break; - case PROP_HORIZONTAL_MERGE: sName = "HorizontalMerge"; break; -+ case PROP_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING : sName = "ApplyParagraphMarkFormatToNumbering"; break; - } - ::std::pair aInsertIt = - m_pImpl->aNameMap.insert( PropertyNameMap_t::value_type( eId, sName )); -diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx -index 9cdc085..a4e3621 100644 ---- a/writerfilter/source/dmapper/PropertyIds.hxx -+++ b/writerfilter/source/dmapper/PropertyIds.hxx -@@ -316,6 +316,7 @@ enum PropertyIds - ,PROP_PARA_TOP_MARGIN_BEFORE_AUTO_SPACING - ,PROP_PARA_BOTTOM_MARGIN_AFTER_AUTO_SPACING - ,PROP_HORIZONTAL_MERGE -+ ,PROP_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING - }; - struct PropertyNameSupplier_Impl; - class PropertyNameSupplier --- -1.8.4.5 - diff --git a/disable-firebird-unit-test.diff b/disable-firebird-unit-test.diff deleted file mode 100644 index 60a6ff2..0000000 --- a/disable-firebird-unit-test.diff +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/dbaccess/Module_dbaccess.mk b/dbaccess/Module_dbaccess.mk -index b9d7d56..146c6ee 100644 ---- a/dbaccess/Module_dbaccess.mk -+++ b/dbaccess/Module_dbaccess.mk -@@ -34,12 +34,6 @@ $(eval $(call gb_Module_add_l10n_targets,dbaccess,\ - UIConfig_dbtdata \ - )) - --ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE) --$(eval $(call gb_Module_add_check_targets,dbaccess,\ -- CppunitTest_dbaccess_firebird_test \ --)) --endif -- - $(eval $(call gb_Module_add_check_targets,dbaccess,\ - CppunitTest_dbaccess_dialog_save \ - CppunitTest_dbaccess_macros_test \ diff --git a/discard-more-header-footer-stuff.patch b/discard-more-header-footer-stuff.patch deleted file mode 100644 index 625593e..0000000 --- a/discard-more-header-footer-stuff.patch +++ /dev/null @@ -1,80 +0,0 @@ -From b6e5b90899f9adb62556538583763871999aa544 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= -Date: Sat, 24 May 2014 00:36:06 +0200 -Subject: [PATCH] discard more header/footer stuff when discarding - headers/footers (bnc#875718) - -782adba4d436c65cdf85d48f28486321873b15ed discards unneeded headers/footers, -but only the text, not e.g. frames or fields. The test document therefore -ends up with a frame with a page number inside the body text, because the text -in the footer it should be anchored to was discarded. This commit fixes -this by discarding more (although probably the whole header/footer -shouldn't even be parsed to begin with). - -The test from b349d2483e1fe64316d87b55d0b3b4c8f2293e2e actually checked -for this incorrect frame, so change that (the whole test is suspicious, as -the end result is quite far away from what the original doc looks like). - -(cherry picked from commit 5510f563502168defa4ccfc54214d781a7c92868) -Signed-off-by: Andras Timar - -Change-Id: I2e7192e00237db1f030d0524c5667fe92c9e496b ---- - -diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx -index 7f61328..2e6538a 100644 ---- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx -+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx -@@ -2293,6 +2293,8 @@ uno::Reference< beans::XPropertySet > DomainMapper_Impl::FindOrCreateFieldMaster - -----------------------------------------------------------------------*/ - void DomainMapper_Impl::PushFieldContext() - { -+ if(m_bDiscardHeaderFooter) -+ return; - #ifdef DEBUG_DOMAINMAPPER - dmapper_logger->element("pushFieldContext"); - #endif -@@ -2980,6 +2982,8 @@ void DomainMapper_Impl::handleToc - -----------------------------------------------------------------------*/ - void DomainMapper_Impl::CloseFieldCommand() - { -+ if(m_bDiscardHeaderFooter) -+ return; - #ifdef DEBUG_DOMAINMAPPER - dmapper_logger->element("closeFieldCommand"); - #endif -@@ -3660,6 +3664,8 @@ void DomainMapper_Impl::SetFieldFFData(FFDataHandler::Pointer_t pFFDataHandler) - -----------------------------------------------------------------------*/ - void DomainMapper_Impl::PopFieldContext() - { -+ if(m_bDiscardHeaderFooter) -+ return; - #ifdef DEBUG_DOMAINMAPPER - dmapper_logger->element("popFieldContext"); - #endif -@@ -3955,7 +3961,7 @@ void DomainMapper_Impl::RegisterFrameConversion( - bool DomainMapper_Impl::ExecuteFrameConversion() - { - bool bRet = false; -- if( m_xFrameStartRange.is() && m_xFrameEndRange.is() ) -+ if( m_xFrameStartRange.is() && m_xFrameEndRange.is() && !m_bDiscardHeaderFooter ) - { - bRet = true; - try -@@ -3971,10 +3977,10 @@ bool DomainMapper_Impl::ExecuteFrameConversion() - SAL_WARN( "writerfilter", "Exception caught when converting to frame: " + rEx.Message ); - bRet = false; - } -- m_xFrameStartRange = 0; -- m_xFrameEndRange = 0; -- m_aFrameProperties.realloc( 0 ); - } -+ m_xFrameStartRange = 0; -+ m_xFrameEndRange = 0; -+ m_aFrameProperties.realloc( 0 ); - return bRet; - } - --- -1.8.4.5 - diff --git a/doc-brightness-contrast.diff b/doc-brightness-contrast.diff deleted file mode 100644 index c5a5fa3..0000000 --- a/doc-brightness-contrast.diff +++ /dev/null @@ -1,249 +0,0 @@ -From 85e088c70aa3cfdd638276a2555b35ed1275c352 Mon Sep 17 00:00:00 2001 -From: Luboš Luňák -Date: Fri, 18 Apr 2014 18:46:34 +0000 -Subject: handle strange brightness+contrast adjustment from msoffice (fdo#38410) - -LO uses basically the formula "newpixel=(oldpixel-128)*contrast+128+brightness", -i.e. contrast is applied first. It looks like there's no "oficial" formula for this, -so a formula that applies brightness first would be ok too. MSO for some weird reason -apparently uses a formula that applies half of brightness before contrast and -half afterwards (insert funny political correctness or compromise joke here). -While the result is the same like with the LO formula if only either brightness -or contrast is adjusted, the result is different if both are involved. Just modify -the image using the MSO algorithm if this is the case. - -Conflicts: - filter/source/msfilter/msdffimp.cxx - include/vcl/bitmap.hxx - include/vcl/bitmapex.hxx - include/vcl/gdimtf.hxx - vcl/source/gdi/bitmap3.cxx - vcl/source/gdi/bitmapex.cxx - vcl/source/gdi/gdimtf.cxx - -Change-Id: I55fe8f395832685b90f024cf2f58b0797c1ba588 -Reviewed-on: https://gerrit.libreoffice.org/9099 -Reviewed-by: Miklos Vajna -Tested-by: Miklos Vajna ---- -diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx -index 63847b3..472e1a5 100644 ---- a/filter/source/msfilter/msdffimp.cxx -+++ b/filter/source/msfilter/msdffimp.cxx -@@ -3817,7 +3817,12 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons - - if ( nContrast || nBrightness || ( nGamma != 0x10000 ) || ( eDrawMode != GRAPHICDRAWMODE_STANDARD ) ) - { -- if ( ( rObjData.nSpFlags & SP_FOLESHAPE ) == 0 ) -+ // MSO uses a different algorithm for contrast+brightness, LO applies contrast before brightness, -+ // while MSO apparently applies half of brightness before contrast and half after. So if only -+ // contrast or brightness need to be altered, the result is the same, but if both are involved, -+ // there's no way to map that, so just force a conversion of the image. -+ bool needsConversion = nContrast != 0 && nBrightness != 0; -+ if ( ( rObjData.nSpFlags & SP_FOLESHAPE ) == 0 && !needsConversion ) - { - if ( nBrightness ) - rSet.Put( SdrGrafLuminanceItem( nBrightness ) ); -@@ -3842,7 +3847,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons - { - BitmapEx aBitmapEx( aGraf.GetBitmapEx() ); - if ( nBrightness || nContrast || ( nGamma != 0x10000 ) ) -- aBitmapEx.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, sal_False ); -+ aBitmapEx.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, false, true ); - if ( eDrawMode == GRAPHICDRAWMODE_GREYS ) - aBitmapEx.Convert( BMP_CONVERSION_8BIT_GREYS ); - else if ( eDrawMode == GRAPHICDRAWMODE_MONO ) -@@ -3856,7 +3861,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons - { - GDIMetaFile aGdiMetaFile( aGraf.GetGDIMetaFile() ); - if ( nBrightness || nContrast || ( nGamma != 0x10000 ) ) -- aGdiMetaFile.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, sal_False ); -+ aGdiMetaFile.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, false, true ); - if ( eDrawMode == GRAPHICDRAWMODE_GREYS ) - aGdiMetaFile.Convert( MTF_CONVERSION_8BIT_GREYS ); - else if ( eDrawMode == GRAPHICDRAWMODE_MONO ) -diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx -index adf6b63..621fceb 100644 ---- a/include/vcl/bitmap.hxx -+++ b/include/vcl/bitmap.hxx -@@ -779,6 +779,9 @@ public: - If sal_True, invert the channel values with the logical 'not' operator - - @return sal_True, if the operation was completed successfully. -+ -+ @param msoBrightness -+ Use the same formula for brightness as used by MSOffice. - */ - sal_Bool Adjust( short nLuminancePercent = 0, - short nContrastPercent = 0, -@@ -786,7 +789,8 @@ public: - short nChannelGPercent = 0, - short nChannelBPercent = 0, - double fGamma = 1.0, -- sal_Bool bInvert = sal_False ); -+ bool bInvert = false, -+ bool msoBrightness = false ); - - /** Apply specified filter to the bitmap - -diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx -index da23547..8ac6325 100644 ---- a/include/vcl/bitmapex.hxx -+++ b/include/vcl/bitmapex.hxx -@@ -343,6 +343,10 @@ public: - If sal_True, invert the channel values with the logical 'not' operator - - @return sal_True, if the operation was completed successfully. -+ -+ @param msoFormula -+ Use the same formula for brightness as used by MSOffice. -+ - */ - sal_Bool Adjust( short nLuminancePercent = 0, - short nContrastPercent = 0, -@@ -350,7 +354,8 @@ public: - short nChannelGPercent = 0, - short nChannelBPercent = 0, - double fGamma = 1.0, -- sal_Bool bInvert = sal_False ); -+ bool bInvert = false, -+ bool msoBrightness = false ); - - /** Apply specified filter to the bitmap - -diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx -index 8afdc14..d38f863 100644 ---- a/include/vcl/gdimtf.hxx -+++ b/include/vcl/gdimtf.hxx -@@ -150,7 +150,7 @@ public: - void Adjust( short nLuminancePercent = 0, short nContrastPercent = 0, - short nChannelRPercent = 0, short nChannelGPercent = 0, - short nChannelBPercent = 0, double fGamma = 1.0, -- sal_Bool bInvert = sal_False -+ bool bInvert = false, bool msoBrightness = false - ); - - void Convert( MtfConversion eConversion ); -diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx -index 5c4905a..4fbe1b8 100644 ---- a/vcl/source/gdi/bitmap3.cxx -+++ b/vcl/source/gdi/bitmap3.cxx -@@ -3250,7 +3250,7 @@ sal_Bool Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, sal_uLong nFla - - sal_Bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent, - short nChannelRPercent, short nChannelGPercent, short nChannelBPercent, -- double fGamma, sal_Bool bInvert ) -+ double fGamma, bool bInvert, bool msoBrightness ) - { - sal_Bool bRet = sal_False; - -@@ -3282,8 +3282,11 @@ sal_Bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent, - else - fM = ( 128.0 + 1.27 * MinMax( nContrastPercent, -100L, 0L ) ) / 128.0; - -- // total offset = luminance offset + contrast offset -- fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55 + 128.0 - fM * 128.0; -+ if(!msoBrightness) -+ // total offset = luminance offset + contrast offset -+ fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55 + 128.0 - fM * 128.0; -+ else -+ fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55; - - // channel offset = channel offset + total offset - fROff = nChannelRPercent * 2.55 + fOff; -@@ -3297,10 +3300,21 @@ sal_Bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent, - // create mapping table - for( nX = 0L; nX < 256L; nX++ ) - { -- cMapR[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fROff ), 0L, 255L ); -- cMapG[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fGOff ), 0L, 255L ); -- cMapB[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fBOff ), 0L, 255L ); -- -+ if(!msoBrightness) -+ { -+ cMapR[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fROff ), 0L, 255L ); -+ cMapG[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fGOff ), 0L, 255L ); -+ cMapB[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fBOff ), 0L, 255L ); -+ } -+ else -+ { -+ // LO simply uses (in a somewhat optimized form) "newcolor = (oldcolor-128)*contrast+brightness+128" -+ // as the formula, i.e. contrast first, brightness afterwards. MSOffice, for whatever weird reason, -+ // use neither first, but apparently it applies half of brightness before contrast and half afterwards. -+ cMapR[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fROff/2-128) * fM + 128 + fROff/2 ), 0L, 255L ); -+ cMapG[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fGOff/2-128) * fM + 128 + fGOff/2 ), 0L, 255L ); -+ cMapB[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fBOff/2-128) * fM + 128 + fBOff/2 ), 0L, 255L ); -+ } - if( bGamma ) - { - cMapR[ nX ] = GAMMA( cMapR[ nX ], fGamma ); -diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx -index 6deb1db..98c6b24 100644 ---- a/vcl/source/gdi/bitmapex.cxx -+++ b/vcl/source/gdi/bitmapex.cxx -@@ -633,11 +633,11 @@ sal_Bool BitmapEx::Replace( const Color* pSearchColors, const Color* pReplaceCol - - sal_Bool BitmapEx::Adjust( short nLuminancePercent, short nContrastPercent, - short nChannelRPercent, short nChannelGPercent, short nChannelBPercent, -- double fGamma, sal_Bool bInvert ) -+ double fGamma, bool bInvert, bool msoBrightness ) - { - return( !!aBitmap ? aBitmap.Adjust( nLuminancePercent, nContrastPercent, - nChannelRPercent, nChannelGPercent, nChannelBPercent, -- fGamma, bInvert ) : sal_False ); -+ fGamma, bInvert, msoBrightness ) : false ); - } - - sal_Bool BitmapEx::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress ) -diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx -index 2e74172..12ad981 100644 ---- a/vcl/source/gdi/gdimtf.cxx -+++ b/vcl/source/gdi/gdimtf.cxx -@@ -2175,7 +2175,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol - - void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent, - short nChannelRPercent, short nChannelGPercent, -- short nChannelBPercent, double fGamma, sal_Bool bInvert ) -+ short nChannelBPercent, double fGamma, bool bInvert, bool msoBrightness ) - { - // nothing to do? => return quickly - if( nLuminancePercent || nContrastPercent || -@@ -2196,8 +2196,11 @@ void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent, - else - fM = ( 128.0 + 1.27 * MinMax( nContrastPercent, -100L, 0L ) ) / 128.0; - -- // total offset = luminance offset + contrast offset -- fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55 + 128.0 - fM * 128.0; -+ if(!msoBrightness) -+ // total offset = luminance offset + contrast offset -+ fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55 + 128.0 - fM * 128.0; -+ else -+ fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55; - - // channel offset = channel offset + total offset - fROff = nChannelRPercent * 2.55 + fOff; -@@ -2211,10 +2214,18 @@ void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent, - // create mapping table - for( long nX = 0L; nX < 256L; nX++ ) - { -- aColParam.pMapR[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fROff ), 0L, 255L ); -- aColParam.pMapG[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fGOff ), 0L, 255L ); -- aColParam.pMapB[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fBOff ), 0L, 255L ); -- -+ if(!msoBrightness) -+ { -+ aColParam.pMapR[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fROff ), 0L, 255L ); -+ aColParam.pMapG[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fGOff ), 0L, 255L ); -+ aColParam.pMapB[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fBOff ), 0L, 255L ); -+ } -+ else -+ { -+ aColParam.pMapR[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fROff/2-128) * fM + 128 + fROff/2 ), 0L, 255L ); -+ aColParam.pMapG[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fGOff/2-128) * fM + 128 + fGOff/2 ), 0L, 255L ); -+ aColParam.pMapB[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fBOff/2-128) * fM + 128 + fBOff/2 ), 0L, 255L ); -+ } - if( bGamma ) - { - aColParam.pMapR[ nX ] = GAMMA( aColParam.pMapR[ nX ], fGamma ); --- -cgit v0.9.0.2-2-gbebe diff --git a/docx-brightness-contrast-1.diff b/docx-brightness-contrast-1.diff deleted file mode 100644 index b14b5ba..0000000 --- a/docx-brightness-contrast-1.diff +++ /dev/null @@ -1,30 +0,0 @@ -From 02dcf4a9b7387f6675324245ab2fa5b7eabf0d12 Mon Sep 17 00:00:00 2001 -From: Luboš Luňák -Date: Wed, 30 Apr 2014 19:52:28 +0000 -Subject: actually read brightness/contrast when reading docx (bnc#875713) - -It's read for the shape in oox/ , but it didn't make it any further apparently. - -Change-Id: I0885a675f72d63b3d262f1ef7e42f5d2e03588b6 -(cherry picked from commit 804da2a977989ba1f046847b9e00f00c83749e30) -Reviewed-on: https://gerrit.libreoffice.org/9216 -Reviewed-by: Caolán McNamara -Tested-by: Caolán McNamara ---- -diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx -index 304a3d2..607d92b 100644 ---- a/writerfilter/source/dmapper/GraphicImport.cxx -+++ b/writerfilter/source/dmapper/GraphicImport.cxx -@@ -924,6 +924,10 @@ void GraphicImport::lcl_attribute(Id nName, Value & val) - xShapeProps->getPropertyValue("ShadowTransparence") >>= m_pImpl->nShadowTransparence; - } - -+ xShapeProps->getPropertyValue("GraphicColorMode") >>= m_pImpl->eColorMode; -+ xShapeProps->getPropertyValue("AdjustLuminance") >>= m_pImpl->nBrightness; -+ xShapeProps->getPropertyValue("AdjustContrast") >>= m_pImpl->nContrast; -+ - // fdo#70457: transform XShape into a SwXTextGraphicObject only if there's no rotation - if ( nRotation == 0 ) - m_xGraphicObject = createGraphicObject( aMediaProperties ); --- -cgit v0.9.0.2-2-gbebe diff --git a/docx-brightness-contrast-2.diff b/docx-brightness-contrast-2.diff deleted file mode 100644 index 0987b24..0000000 --- a/docx-brightness-contrast-2.diff +++ /dev/null @@ -1,143 +0,0 @@ -From 75a839188d1cac5f0ac602e59462b32879d2242a Mon Sep 17 00:00:00 2001 -From: Luboš Luňák -Date: Wed, 30 Apr 2014 20:19:08 +0000 -Subject: handle brightness+contrast from msoffice (bnc#875713) - -This is the same like 1139d618b8bc6ab823a96184bd0f0257980aad24, for docx. - -(cherry picked from commit 893fe88469dec5b727d96f8ea1b4edb9e88288a7) - -Conflicts: - oox/source/drawingml/fillproperties.cxx - -Change-Id: I1ef4e18444e8c60e9ae8f67249bcef1053f0d62d -Reviewed-on: https://gerrit.libreoffice.org/9217 -Reviewed-by: Caolán McNamara -Tested-by: Caolán McNamara ---- -diff --git a/offapi/com/sun/star/graphic/XGraphicTransformer.idl b/offapi/com/sun/star/graphic/XGraphicTransformer.idl -index d1a6ddf..dbd9c8d 100644 ---- a/offapi/com/sun/star/graphic/XGraphicTransformer.idl -+++ b/offapi/com/sun/star/graphic/XGraphicTransformer.idl -@@ -51,6 +51,16 @@ interface XGraphicTransformer : ::com::sun::star::uno::XInterface - com::sun::star::graphic::XGraphic applyDuotone( [ in ] com::sun::star::graphic::XGraphic In, - [ in ] long ColorOne, [ in ] long ColorTwo ) - raises( ::com::sun::star::lang::IllegalArgumentException ); -+ -+ /** changes brightness/contrast -+ -+ @param mso whether to use MSOffice brightness/contrast formula -+ @returns -+ The modified graphic -+ */ -+ com::sun::star::graphic::XGraphic applyBrightnessContrast( [ in ] com::sun::star::graphic::XGraphic In, -+ [ in ] long brightness, [ in ] long contrast, [ in ] boolean mso ) -+ raises( ::com::sun::star::lang::IllegalArgumentException ); - }; - - } ; } ; } ; } ; -diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx -index c96c77a..99026a9 100644 ---- a/oox/source/drawingml/fillproperties.cxx -+++ b/oox/source/drawingml/fillproperties.cxx -@@ -92,6 +92,18 @@ Reference< XGraphic > lclCheckAndApplyChangeColorTransform( const BlipFillProper - return xGraphic; - } - -+Reference< XGraphic > applyBrightnessContrast( Reference< XGraphic > xGraphic, sal_Int32 brightness, sal_Int32 contrast ) -+{ -+ try -+ { -+ Reference< XGraphicTransformer > xTransformer( xGraphic, UNO_QUERY_THROW ); -+ xGraphic = xTransformer->applyBrightnessContrast( xGraphic, brightness, contrast, true ); -+ } -+ catch( Exception& ) -+ { -+ } -+ return xGraphic; -+} - - - BitmapMode lclGetBitmapMode( sal_Int32 nToken ) -@@ -501,12 +513,24 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap, - - void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelper& rGraphicHelper, sal_Int32 nPhClr ) const - { -+ sal_Int16 nBrightness = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moBrightness.get( 0 ) / PER_PERCENT, -100, 100 ); -+ sal_Int16 nContrast = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moContrast.get( 0 ) / PER_PERCENT, -100, 100 ); - if( maBlipProps.mxGraphic.is() ) - { - // created transformed graphic - Reference< XGraphic > xGraphic = lclCheckAndApplyDuotoneTransform( maBlipProps, maBlipProps.mxGraphic, rGraphicHelper, nPhClr ); - xGraphic = lclCheckAndApplyChangeColorTransform( maBlipProps, xGraphic, rGraphicHelper, nPhClr ); - -+ // MSO uses a different algorithm for contrast+brightness, LO applies contrast before brightness, -+ // while MSO apparently applies half of brightness before contrast and half after. So if only -+ // contrast or brightness need to be altered, the result is the same, but if both are involved, -+ // there's no way to map that, so just force a conversion of the image. -+ if( nBrightness != 0 && nContrast != 0 ) -+ { -+ xGraphic = applyBrightnessContrast( xGraphic, nBrightness, nContrast ); -+ nBrightness = 0; -+ nContrast = 0; -+ } - rPropMap[ PROP_Graphic ] <<= xGraphic; - - // do we still need to set GraphicURL as well? (TODO) -@@ -545,10 +569,8 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe - rPropMap[ PROP_GraphicColorMode ] <<= eColorMode; - - // brightness and contrast -- sal_Int16 nBrightness = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moBrightness.get( 0 ) / PER_PERCENT, -100, 100 ); - if( nBrightness != 0 ) - rPropMap[ PROP_AdjustLuminance ] <<= nBrightness; -- sal_Int16 nContrast = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moContrast.get( 0 ) / PER_PERCENT, -100, 100 ); - if( nContrast != 0 ) - rPropMap[ PROP_AdjustContrast ] <<= nContrast; - -diff --git a/svtools/source/graphic/transformer.cxx b/svtools/source/graphic/transformer.cxx -index 30f07c7..bf63621 100644 ---- a/svtools/source/graphic/transformer.cxx -+++ b/svtools/source/graphic/transformer.cxx -@@ -159,6 +159,23 @@ uno::Reference< graphic::XGraphic > SAL_CALL GraphicTransformer::applyDuotone( - return xRet; - } - -+uno::Reference< graphic::XGraphic > SAL_CALL GraphicTransformer::applyBrightnessContrast( -+ const uno::Reference< graphic::XGraphic >& rxGraphic, sal_Int32 nBrightness, sal_Int32 nContrast, sal_Bool mso ) -+ throw ( lang::IllegalArgumentException, uno::RuntimeException, std::exception) -+{ -+ const uno::Reference< uno::XInterface > xIFace( rxGraphic, uno::UNO_QUERY ); -+ ::Graphic aGraphic( *::unographic::Graphic::getImplementation( xIFace ) ); -+ -+ BitmapEx aBitmapEx( aGraphic.GetBitmapEx() ); -+ aBitmapEx.Adjust( nBrightness, nContrast, 0, 0, 0, 0, false, mso ); -+ aGraphic = ::Graphic( aBitmapEx ); -+ -+ ::unographic::Graphic* pUnoGraphic = new ::unographic::Graphic(); -+ pUnoGraphic->init( aGraphic ); -+ uno::Reference< graphic::XGraphic > xRet( pUnoGraphic ); -+ return xRet; -+} -+ - } - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -diff --git a/svtools/source/graphic/transformer.hxx b/svtools/source/graphic/transformer.hxx -index e57b8fa..1707183 100644 ---- a/svtools/source/graphic/transformer.hxx -+++ b/svtools/source/graphic/transformer.hxx -@@ -51,6 +51,11 @@ class GraphicTransformer : public GraphicTransformer_UnoImplHelper1 - sal_Int32 nColorOne, sal_Int32 nColorTwo ) - throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - -+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > SAL_CALL applyBrightnessContrast( -+ const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >& rxGraphic, -+ sal_Int32 nBrightness, sal_Int32 nContrast, sal_Bool mso ) -+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; -+ - }; - - } --- -cgit v0.9.0.2-2-gbebe diff --git a/fix-python-wizzards.patch b/fix-python-wizzards.patch deleted file mode 100644 index 44150b2..0000000 --- a/fix-python-wizzards.patch +++ /dev/null @@ -1,74 +0,0 @@ -From bf355f47f49eb352985c129544c60c27814f450b Mon Sep 17 00:00:00 2001 -From: Stephan Bergmann -Date: Mon, 03 Mar 2014 10:57:34 +0000 -Subject: Resolves: fdo#77899 fax etc wizards don't start - -Wizards should look for templates in Template_internal, not Template_user - -...as only the former reliably denotes the share/template tree where the -wizard templates are stored. (Presumably the latter defaulted to the former as -long as it wasn't explicitly set in the past, but is now always explicitly set -since 838b77f5f3d6d8fd98891e99a23ff78a6a357cb2 "Resolves: rhbz#1065807 use xdg -~/Templates for default Template location.") - -Change-Id: I7d1ac47d821c778fe342865465d0505a94b824bf -(cherry picked from commit 97822e3cbc63d3bd110bc3c654b3fbb4d4d1904c) - -actively search for wizards dir in all internal templates - -(cherry picked from commit 5fa18dc21644f2a719bf39ec948a586fa8837b6a) -Signed-off-by: Stephan Bergmann - -Conflicts: - wizards/com/sun/star/wizards/ui/WizardDialog.py - -Change-Id: I4ef6da4d9d1931917e0aaa6e110fd273bd917b26 -Signed-off-by: Stephan Bergmann ---- -diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py -index 1ff5f1c..76921d0 100644 ---- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py -+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py -@@ -773,7 +773,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): - return None - - def initializeTemplates(self, xMSF): -- sLetterPath = self.sTemplatePath + "/../common/wizard/letter" -+ sLetterPath = self.sTemplatePath + "/wizard/letter" - self.BusinessFiles = \ - FileAccess.getFolderTitles( - xMSF, "bus", sLetterPath, self.resources.dictBusinessTemplate) -diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py -index fc1ce41..08a8c2d 100644 ---- a/wizards/com/sun/star/wizards/ui/WizardDialog.py -+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py -@@ -23,6 +23,7 @@ from .UnoDialog2 import UnoDialog2, Desktop, PropertyNames, UIConsts, \ - from .event.CommonListener import TerminateListenerProcAdapter - from ..common.Resource import Resource - from ..common.HelpIds import HelpIds -+from ..common.FileAccess import FileAccess - from ..document.OfficeDocument import OfficeDocument - from ..text.TextDocument import TextDocument - -@@ -114,10 +115,17 @@ class WizardDialog(UnoDialog2): - def initializePaths(self): - xPropertySet = \ - self.xMSF.createInstance("com.sun.star.util.PathSettings") -- self.sTemplatePath = \ -- xPropertySet.getPropertyValue("Template_user")[0] - self.sUserTemplatePath = \ - xPropertySet.getPropertyValue("Template_writable") -+ myFA = FileAccess(self.xMSF) -+ aInternalPaths = xPropertySet.getPropertyValue("Template_internal") -+ self.sTemplatePath = "" -+ for path in aInternalPaths: -+ if myFA.exists(path + "/wizard", False): -+ self.sTemplatePath = path -+ break -+ if self.sTemplatePath == "": -+ raise Exception("could not find wizard templates") - - def addRoadmap(self): - try: --- -cgit v0.9.0.2-2-gbebe diff --git a/fix-text-rotation.diff b/fix-text-rotation.diff deleted file mode 100644 index b230221..0000000 --- a/fix-text-rotation.diff +++ /dev/null @@ -1,26 +0,0 @@ -From e3e12b1d1e36e1a0d4fc4c6423b584d677693897 Mon Sep 17 00:00:00 2001 -From: Muthu Subramanian -Date: Wed, 26 Mar 2014 10:35:44 +0000 -Subject: n#862510: Fix text rotation. - -Fix breaks document in n#783433 - the one there is -damaged - resaving it using mso 2010 should fix the problem there. - -Change-Id: Ib2ee7ab20489d716dc189ac6810d705763a16476 ---- -diff --git a/oox/source/drawingml/transform2dcontext.cxx b/oox/source/drawingml/transform2dcontext.cxx -index e232b4d..0a1bb59 100644 ---- a/oox/source/drawingml/transform2dcontext.cxx -+++ b/oox/source/drawingml/transform2dcontext.cxx -@@ -46,7 +46,8 @@ Transform2DContext::Transform2DContext( ContextHandler2Helper& rParent, const At - } - else - { -- mrShape.getTextBody()->getTextProperties().moRotation = rAttribs.getInteger( XML_rot ); -+ if( rAttribs.hasAttribute( XML_rot ) ) -+ mrShape.getTextBody()->getTextProperties().moRotation = -rAttribs.getInteger( XML_rot ).get(); - } - } - --- -cgit v0.9.0.2-2-gbebe diff --git a/import-gradfill-for-text-colors.diff b/import-gradfill-for-text-colors.diff deleted file mode 100644 index c23a9d4..0000000 --- a/import-gradfill-for-text-colors.diff +++ /dev/null @@ -1,75 +0,0 @@ -From ce609f477e488e9c701b2bfa893bcf01722d2a01 Mon Sep 17 00:00:00 2001 -From: Muthu Subramanian -Date: Fri, 28 Mar 2014 11:54:45 +0000 -Subject: n#870234: Import gradfill for text colors. - -Uses the first color from the gradfill list. -(Which is better than plain black!) - -(cherry picked from commit cfc76de83e3c0a56abd30a8f3bd7c69d3500d223) -Signed-off-by: Andras Timar - -Conflicts: - oox/source/drawingml/textcharacterproperties.cxx - oox/source/drawingml/textcharacterpropertiescontext.cxx - -Change-Id: I4c1c0c4b031f3681c95b75b3c0683eb4de95bffb ---- -diff --git a/include/oox/drawingml/textcharacterproperties.hxx b/include/oox/drawingml/textcharacterproperties.hxx -index c079015..d2335e1 100644 ---- a/include/oox/drawingml/textcharacterproperties.hxx -+++ b/include/oox/drawingml/textcharacterproperties.hxx -@@ -24,6 +24,7 @@ - #include - #include - #include -+#include - - namespace oox { class PropertySet; } - -@@ -53,6 +54,7 @@ struct TextCharacterProperties - OptValue< bool > moItalic; - OptValue< bool > moUnderlineLineFollowText; - OptValue< bool > moUnderlineFillFollowText; -+ GradientFillProperties maGradientProps; /// Properties for gradient text colors - - /** Overwrites all members that are explicitly set in rSourceProps. */ - void assignUsed( const TextCharacterProperties& rSourceProps ); -diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx -index febb28c..a7be42b 100644 ---- a/oox/source/drawingml/textcharacterproperties.cxx -+++ b/oox/source/drawingml/textcharacterproperties.cxx -@@ -60,6 +60,7 @@ void TextCharacterProperties::assignUsed( const TextCharacterProperties& rSource - moItalic.assignIfUsed( rSourceProps.moItalic ); - moUnderlineLineFollowText.assignIfUsed( rSourceProps.moUnderlineLineFollowText ); - moUnderlineFillFollowText.assignIfUsed( rSourceProps.moUnderlineFillFollowText ); -+ maGradientProps.assignUsed( rSourceProps.maGradientProps ); - } - - void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFilterBase& rFilter, bool bUseOptional ) const -@@ -93,6 +94,8 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil - - if( maCharColor.isUsed() ) - rPropMap[ PROP_CharColor ] <<= maCharColor.getColor( rFilter.getGraphicHelper() ); -+ if( maGradientProps.maGradientStops.size() > 0 ) -+ rPropMap[ PROP_CharColor ] <<= maGradientProps.maGradientStops.begin()->second.getColor( rFilter.getGraphicHelper() ); - - if( moLang.has() && !moLang.get().isEmpty() ) - { -diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx b/oox/source/drawingml/textcharacterpropertiescontext.cxx -index e166e6d..6887cda 100644 ---- a/oox/source/drawingml/textcharacterpropertiescontext.cxx -+++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx -@@ -132,6 +132,10 @@ ContextHandlerRef TextCharacterPropertiesContext::onCreateContext( sal_Int32 aEl - case A_TOKEN( hlinkClick ): // CT_Hyperlink - case A_TOKEN( hlinkMouseOver ): // CT_Hyperlink - return new HyperLinkContext( *this, rAttribs, mrTextCharacterProperties.maHyperlinkPropertyMap ); -+ -+ case A_TOKEN( gradFill ): -+ return new GradientFillContext( *this, rAttribs, mrTextCharacterProperties.maGradientProps ); -+ - } - - return this; --- -cgit v0.9.0.2-2-gbebe diff --git a/impress-table-performance.patch b/impress-table-performance.patch deleted file mode 100644 index 53b09d4..0000000 --- a/impress-table-performance.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 894594c1ff0323f537270d1ca2dec33cdbb9b19c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Mat=C3=BA=C5=A1=20Kukan?= -Date: Tue, 27 May 2014 10:39:45 +0200 -Subject: [PATCH] Related bnc#822625: Cache minimum height for table cells. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Change-Id: I35e295347a046376289f5d4fd5468860d0b8f0ae -(cherry picked from commit 5792e76cb5beb630c135f57b74f57d74dd2dc2b0) -Reviewed-on: https://gerrit.libreoffice.org/9519 -Reviewed-by: Caolán McNamara -Tested-by: Caolán McNamara ---- - svx/source/table/cell.cxx | 14 +++++++++----- - svx/source/table/cell.hxx | 1 + - 2 files changed, 10 insertions(+), 5 deletions(-) - -diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx -index d4f199b..7e04db7 100644 ---- a/svx/source/table/cell.cxx -+++ b/svx/source/table/cell.cxx -@@ -358,6 +358,7 @@ Cell::Cell( SdrTableObj& rTableObj, OutlinerParaObject* pOutlinerParaObject ) th - , mbMerged( sal_False ) - , mnRowSpan( 1 ) - , mnColSpan( 1 ) -+, mnCachedMinHeight( -1 ) - , mxTable( rTableObj.getTable() ) - { - if( rTableObj.GetModel() ) -@@ -524,6 +525,7 @@ void Cell::setMerged() - - void Cell::notifyModified() - { -+ mnCachedMinHeight = -1; - if( mxTable.is() ) - mxTable->setModified( sal_True ); - } -@@ -680,8 +682,10 @@ sal_Int32 Cell::getMinimumHeight() - if( !mpProperties ) - return 0; - -+ if( mnCachedMinHeight != -1 ) -+ return mnCachedMinHeight; -+ - SdrTableObj& rTableObj = dynamic_cast< SdrTableObj& >( GetObject() ); -- sal_Int32 nMinimumHeight = 0; - - Rectangle aTextRect; - TakeTextAnchorRect( aTextRect ); -@@ -692,7 +696,7 @@ sal_Int32 Cell::getMinimumHeight() - if(pEditOutliner) - { - pEditOutliner->SetMaxAutoPaperSize(aSize); -- nMinimumHeight = pEditOutliner->GetTextHeight()+1; -+ mnCachedMinHeight = pEditOutliner->GetTextHeight()+1; - } - else /*if ( hasText() )*/ - { -@@ -705,12 +709,12 @@ sal_Int32 Cell::getMinimumHeight() - { - rOutliner.SetText(*GetOutlinerParaObject()); - } -- nMinimumHeight=rOutliner.GetTextHeight()+1; -+ mnCachedMinHeight=rOutliner.GetTextHeight()+1; - rOutliner.Clear(); - } - -- nMinimumHeight += GetTextUpperDistance() + GetTextLowerDistance(); -- return nMinimumHeight; -+ mnCachedMinHeight += GetTextUpperDistance() + GetTextLowerDistance(); -+ return mnCachedMinHeight; - } - - // ----------------------------------------------------------------------------- -diff --git a/svx/source/table/cell.hxx b/svx/source/table/cell.hxx -index 1b26b1c..ba2c6f6 100644 ---- a/svx/source/table/cell.hxx -+++ b/svx/source/table/cell.hxx -@@ -222,6 +222,7 @@ private: - ::sal_Bool mbMerged; - ::sal_Int32 mnRowSpan; - ::sal_Int32 mnColSpan; -+ ::sal_Int32 mnCachedMinHeight; - - Rectangle maCellRect; - --- -1.8.4.5 - -From 20fc8dfadada521bed3cb9db672edcdf35db3c39 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Mat=C3=BA=C5=A1=20Kukan?= -Date: Tue, 27 May 2014 16:37:30 +0200 -Subject: [PATCH] Related bnc#822625: Cache FontEntry with the original - FontSelectPattern. - -Otherwise we do not hit cache directly, only after expensive call to -ImplFindByFont. - -(cherry picked from commits a6b00d16eb27a5e7e31c721671001a909ecef960 -and 16a62079018aea0e72636bdb00576487b4e830b9) - -Change-Id: If15b368feeba94c8fff8ee7cbe049fc4a2069768 ---- - vcl/source/gdi/outdev3.cxx | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx -index 537f8aa..a36fc85 100644 ---- a/vcl/source/gdi/outdev3.cxx -+++ b/vcl/source/gdi/outdev3.cxx -@@ -2214,6 +2214,7 @@ ImplFontEntry* ImplFontCache::GetFontEntry( ImplDevFontList* pFontList, - ImplFontEntry* ImplFontCache::GetFontEntry( ImplDevFontList* pFontList, - FontSelectPattern& aFontSelData, ImplDirectFontSubstitution* pDevSpecific ) - { -+ FontSelectPattern aFontSelDataOrig(aFontSelData); - // check if a directly matching logical font instance is already cached, - // the most recently used font usually has a hit rate of >50% - ImplFontEntry *pEntry = NULL; -@@ -2300,8 +2301,9 @@ ImplFontEntry* ImplFontCache::GetFontEntry( ImplDevFontList* pFontList, - } - #endif - -- // add the new entry to the cache -- maFontInstanceList[ aFontSelData ] = pEntry; -+ // Add the new entry to the cache with the original FontSelectPattern, -+ // so that we can find it next time as a direct cache hit. -+ maFontInstanceList[ aFontSelDataOrig ] = pEntry; - } - - mpFirstEntry = pEntry; --- -1.8.4.5 - diff --git a/kde4-4.2.3.3-timer-mutex.patch b/kde4-4.2.3.3-timer-mutex.patch deleted file mode 100644 index 0528e22..0000000 --- a/kde4-4.2.3.3-timer-mutex.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 71f2aff7a56cef4e133abad3c2e447c76c5ee1fe Mon Sep 17 00:00:00 2001 -From: Luboš Luňák -Date: Tue, 25 Mar 2014 11:20:16 +0000 -Subject: prevent KDE/Qt from interfering with the session manager - -I occassionally get lockups in IceProcessMessages() called from QtCore, -I'm actually not exactly sure why, as theoretically two connections -from one app shouldn't be a problem, but since LO does its own -session handling, there's no need to the KDE/Qt code to be involved, -so prevent it from connecting to the session manager altogether. - -Change-Id: Iebe20d4cb5403e5fea8bd5d8c1f69b62d1c2907b ---- -diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx -index 820d39a..e4900a7 100644 ---- a/vcl/unx/kde4/KDEXLib.cxx -+++ b/vcl/unx/kde4/KDEXLib.cxx -@@ -166,8 +166,23 @@ void KDEXLib::Init() - - KCmdLineArgs::init( m_nFakeCmdLineArgs, m_pAppCmdLineArgs, kAboutData ); - -+ // LO does its own session management, so prevent KDE/Qt from interfering -+ // (QApplication::disableSessionManagement(false) wouldn't quite do, -+ // since that still actually connects to the session manager, it just -+ // won't save the application data on session shutdown). -+ char* session_manager = NULL; -+ if( getenv( "SESSION_MANAGER" ) != NULL ) -+ { -+ session_manager = strdup( getenv( "SESSION_MANAGER" )); -+ unsetenv( "SESSION_MANAGER" ); -+ } - m_pApplication = new VCLKDEApplication(); -- kapp->disableSessionManagement(); -+ if( session_manager != NULL ) -+ { -+ setenv( "SESSION_MANAGER", session_manager, 1 ); -+ free( session_manager ); -+ } -+ - KApplication::setQuitOnLastWindowClosed(false); - - #if KDE_HAVE_GLIB -diff --git a/vcl/unx/kde4/VCLKDEApplication.hxx b/vcl/unx/kde4/VCLKDEApplication.hxx -index 412ee34..4ce0b2c 100644 ---- a/vcl/unx/kde4/VCLKDEApplication.hxx -+++ b/vcl/unx/kde4/VCLKDEApplication.hxx -@@ -21,22 +21,14 @@ - - #define Region QtXRegion - --#include -- - #include - - #undef Region - --/* #i59042# override KApplications method for session management -- * since it will interfere badly with our own. -- */ - class VCLKDEApplication : public KApplication - { - public: - VCLKDEApplication(); -- -- virtual void commitData(QSessionManager&) {}; -- - virtual bool x11EventFilter(XEvent* event); - }; - --- -cgit v0.9.0.2-2-gbebe diff --git a/libreoffice-4.2.4.2.tar.xz b/libreoffice-4.2.4.2.tar.xz deleted file mode 100644 index 87d537b..0000000 --- a/libreoffice-4.2.4.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d166ffa1f2cd336a2f668ea3a912aaf98873757c67e1bcde1ac6f57c6cc605a0 -size 123378868 diff --git a/libreoffice-4.3.0.0.beta2-buildfix1.tar.xz b/libreoffice-4.3.0.0.beta2-buildfix1.tar.xz new file mode 100644 index 0000000..d8a2bcb --- /dev/null +++ b/libreoffice-4.3.0.0.beta2-buildfix1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02bcc6d22b00a8d4cb594ea6f48c0267399f22cdef22f82584168b7a2ad50ace +size 151921492 diff --git a/libreoffice-help-4.2.4.2.tar.xz b/libreoffice-help-4.2.4.2.tar.xz deleted file mode 100644 index 8ab7836..0000000 --- a/libreoffice-help-4.2.4.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a372efb0f82eeed56b7232d15a2d80a522174c3127986f6210239bbbfc342a3d -size 1855080 diff --git a/libreoffice-help-4.3.0.0.beta2-buildfix1.tar.xz b/libreoffice-help-4.3.0.0.beta2-buildfix1.tar.xz new file mode 100644 index 0000000..272cdb4 --- /dev/null +++ b/libreoffice-help-4.3.0.0.beta2-buildfix1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9d9ee953c995a28c596e4ef2aa266274e7bb8e8e2c3c7e131cd4dedba66f0b8 +size 1856076 diff --git a/libreoffice-translations-4.2.4.2.tar.xz b/libreoffice-translations-4.2.4.2.tar.xz deleted file mode 100644 index c323847..0000000 --- a/libreoffice-translations-4.2.4.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c457dbf874c6f59da002288e3831cdba162f18aebf36d26f2d19f468af2c32f7 -size 127819696 diff --git a/libreoffice-translations-4.3.0.0.beta2-buildfix1.tar.xz b/libreoffice-translations-4.3.0.0.beta2-buildfix1.tar.xz new file mode 100644 index 0000000..25bb0fe --- /dev/null +++ b/libreoffice-translations-4.3.0.0.beta2-buildfix1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7ee83dc8e37e930d095dcf0be9b80b29728558b4e4bc5e933c14756242b3e512 +size 126491916 diff --git a/libreoffice.changes b/libreoffice.changes index 1bf292a..e2be23a 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Mon Jun 16 10:39:01 UTC 2014 - tchvatal@suse.com + +- Version bump to 4.3.0beta2: + * major version bump with fixes all around everywhere +- Added dependencies over glew and glm +- Removed patches that were upstreamed: + * set-language-in-impress.diff + * text-alignment-in-shape.diff + * kde4-4.2.3.3-timer-mutex.patch + * impress-table-performance.patch + * import-gradfill-for-text-colors.diff + * fix-text-rotation.diff + * fix-python-wizzards.patch + * docx-brightness-contrast-2.diff + * docx-brightness-contrast-1.diff + * doc-brightness-contrast.diff + * discard-more-header-footer-stuff.patch + * disable-firebird-unit-test.diff + * direct-format-numbering.patch + * WW8-import-fix-upper-margin-of-multi-page.patch + * VBA-macro-modification-warning.diff + * Use-varying-aElement-name.patch + * 0001-std-strlen-requires-cstring-include-to-build.patch +Temporary switches until upstream allows system version: + * --disable-gltf + * --disable-coinmp + ------------------------------------------------------------------- Thu Jun 5 14:07:31 UTC 2014 - tchvatal@suse.com diff --git a/libreoffice.spec b/libreoffice.spec index 40c0d59..4047290 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -29,17 +29,19 @@ %define numbertext_version 0.9.5 # Urls %define external_url http://dev-www.libreoffice.org/src/ -%define tarball_url http://download.documentfoundation.org/libreoffice/src/4.2.4/ +%define tarball_url http://download.documentfoundation.org/libreoffice/src/4.3.0/ +# This is used due to the need for beta releases +%define realver 4.3.0.0.beta2-buildfix1 Name: libreoffice -Version: 4.2.4.2 +Version: 4.3.0.0~beta2 Release: 0 Summary: A Free Office Suite (Framework) License: Apache-2.0 and Artistic-1.0 and BSD-3-Clause and BSD-4-Clause and GPL-2.0+ and LPPL-1.3c and LGPL-2.1+ and LGPL-3.0 and MPL-1.1 and MIT and SUSE-Public-Domain and W3C Group: Productivity/Office/Suite Url: http://www.documentfoundation.org/ -Source0: %{tarball_url}/libreoffice-%{version}.tar.xz -Source1: %{tarball_url}/libreoffice-help-%{version}.tar.xz -Source2: %{tarball_url}/libreoffice-translations-%{version}.tar.xz +Source0: %{tarball_url}/libreoffice-%{realver}.tar.xz +Source1: %{tarball_url}/libreoffice-help-%{realver}.tar.xz +Source2: %{tarball_url}/libreoffice-translations-%{realver}.tar.xz # 256x256 desktop icons (bnc#722644) Source20: libreoffice-desktop-icons-256x256.tar.bz2 # Prebuilt sofficerc for the noarch upstream branding package @@ -87,39 +89,6 @@ Patch12: mediawiki-no-broken-help.diff Patch13: jvmfwk-disable-gcj.diff # Fix running wizards in py2 as the utf is not there Patch16: wizards-create-temlates-with-python-2.6.diff -# PATCH-FIX-UPSTREAM: fix kde hanging in 4.2.3.3 -Patch18: kde4-4.2.3.3-timer-mutex.patch -# Fix build on openSUSE 12.3 -Patch19: 0001-std-strlen-requires-cstring-include-to-build.patch -# disable Firebird unit test which fails on openSUSE 12.3 (it's an experimental feature anyway) -Patch20: disable-firebird-unit-test.diff -# bnc#863021 - LO-L3: Allow setting language for slide or presentation entirely -Patch21: set-language-in-impress.diff -# bnc#870228 - LO-L3: Text inside the circle is not centered -Patch22: text-alignment-in-shape.diff -# bnc#870234 - LO-L3: pptx file has text imported as black instead of white -Patch23: import-gradfill-for-text-colors.diff -# bnc#870240 - LO-L3: pptx import file has text rotated on slide -Patch24: fix-text-rotation.diff -# bnc#875712 - LO-L3: DOC import: picture brigtness/contrast not imported -Patch25: doc-brightness-contrast.diff -# bnc#875713 - LO-L3: DOCX import: picture brigtness/contrast not imported -Patch26: docx-brightness-contrast-1.diff -Patch27: docx-brightness-contrast-2.diff -# bnc#467278: Introduce a warning that changes to VBA macros cannot be saved. -Patch28: VBA-macro-modification-warning.diff -# CVE-2014-0247 -Patch29: Use-varying-aElement-name.patch -# bnc#875718 - LO-L3: DOCX import: extra page numbers -Patch30: discard-more-header-footer-stuff.patch -# bnc#875717 - LO-L3: DOCX import: font size of numbering is bigger -Patch31: direct-format-numbering.patch -# bnc#863018 - LO-L3: Missing text in imported .doc file -Patch32: WW8-import-fix-upper-margin-of-multi-page.patch -# bnc#822625 - LO-L3: Table editing is a pain in Impress (performace issues) -Patch33: impress-table-performance.patch -# bnc#881294 - libreoffice python wizzards crash -Patch34: fix-python-wizzards.patch # try to save space by using hardlinks Patch990: install-with-hardlinks.diff BuildRequires: ImageMagick @@ -146,6 +115,8 @@ BuildRequires: flac-devel BuildRequires: flex BuildRequires: flute BuildRequires: gcc-c++ +BuildRequires: glew-devel +BuildRequires: glm-devel BuildRequires: glu-devel BuildRequires: gnome-vfs2-devel BuildRequires: gperf @@ -188,7 +159,7 @@ BuildRequires: libmwaw-devel BuildRequires: libmysqlclient-devel BuildRequires: libmysqlcppconn-devel >= 1.0.6 BuildRequires: libodfgen-devel -BuildRequires: liborcus-devel >= 0.5.0 +BuildRequires: liborcus-devel >= 0.7.0 BuildRequires: libpoppler-devel BuildRequires: libredland-devel BuildRequires: librepository @@ -870,7 +841,7 @@ Provides additional %{langname} translations and resources for %{project}. \ %undefine langpack_lang %prep -%setup -q -b1 -b2 -n libreoffice-%{version} +%setup -q -b1 -b2 -n libreoffice-%{realver} %patch3 -p1 %patch5 %patch6 -p1 @@ -880,23 +851,6 @@ Provides additional %{langname} translations and resources for %{project}. \ %patch12 %patch13 -p1 %patch16 -p1 -%patch18 -p1 -%patch19 -p1 -%patch20 -p1 -%patch21 -p1 -%patch22 -p1 -%patch23 -p1 -%patch24 -p1 -%patch25 -p1 -%patch26 -p1 -%patch27 -p1 -%patch28 -p1 -%patch29 -p1 -%patch30 -p1 -%patch31 -p1 -%patch32 -p1 -%patch33 -p1 -%patch34 -p1 %patch990 -p1 # 256x256 icons tar -xjf %{SOURCE20} @@ -994,7 +948,6 @@ export NOCONFIGURE=yes --enable-python=system \ --enable-randr \ --enable-randr-link \ - --without-afms \ --without-fonts \ --without-myspell-dicts \ --with-jdk-home=$JAVA_HOME \ @@ -1027,7 +980,10 @@ export NOCONFIGURE=yes %endif --enable-neon \ --with-system-ucpp \ - --disable-ccache + --disable-ccache \ + --disable-gltf \ + --disable-coinmp +# gltf and coinmp disabled until possible to use external pkgs # hack to correctly bootstrap python stuff with system python, (deb#501028, i#90701) sed -i -e "s|@INSTALLDIR@|%{_libdir}/%{name}|" pyuno/source/module/uno.py scripting/source/pyprov/officehelper.py diff --git a/set-language-in-impress.diff b/set-language-in-impress.diff deleted file mode 100644 index 4060b1b..0000000 --- a/set-language-in-impress.diff +++ /dev/null @@ -1,245 +0,0 @@ -From d5aedeef765d60c7420ada7eba8405cfe448c6a8 Mon Sep 17 00:00:00 2001 -From: Muthu Subramanian -Date: Wed, 23 Apr 2014 18:33:22 +0530 -Subject: [PATCH] fdo#64047: n#863021: Add set-all language menu. - -Problems: -* Doesn't reset the spell error markers -* Modifies only at object level -* Currently has only setting for 'all text' -* Maybe provide a current slide only option? - -Change-Id: I4695423fed3ed9422185b23803eedd12ef434bea -(cherry picked from commit 0833f4046a1afa77aeed97a131c5325c44be1bb3) -Signed-off-by: Andras Timar ---- - sd/sdi/_docsh.sdi | 15 ++-- - sd/source/ui/docshell/docshel3.cxx | 114 +++++++++++++++++++++++++++++++ - sd/source/ui/docshell/docshell.cxx | 6 ++ - sd/uiconfig/sdraw/menubar/menubar.xml | 2 + - sd/uiconfig/simpress/menubar/menubar.xml | 2 + - 5 files changed, 134 insertions(+), 5 deletions(-) - -diff --git a/sd/sdi/_docsh.sdi b/sd/sdi/_docsh.sdi -index 075b60a..b087723 100644 ---- a/sd/sdi/_docsh.sdi -+++ b/sd/sdi/_docsh.sdi -@@ -32,11 +32,16 @@ interface DrawDocument - ExecMethod = Execute ; - StateMethod = GetState ; - ] -- SID_CHINESE_CONVERSION // ole : ?, status : ? -- [ -- ExecMethod = Execute ; -- StateMethod = GetState ; -- ] -+ SID_CHINESE_CONVERSION // ole : ?, status : ? -+ [ -+ ExecMethod = Execute ; -+ StateMethod = GetState ; -+ ] -+ SID_LANGUAGE_STATUS -+ [ -+ ExecMethod = Execute ; -+ StateMethod = GetState ; -+ ] - // ? - FID_SEARCH_NOW // ole : ?, status : ? - [ -diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx -index d22f50a..cd45b39 100644 ---- a/sd/source/ui/docshell/docshel3.cxx -+++ b/sd/source/ui/docshell/docshel3.cxx -@@ -17,6 +17,7 @@ - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -+#include "Window.hxx" - #include "DrawDocShell.hxx" - - #include "app.hrc" -@@ -28,11 +29,18 @@ - #include - #include - #include -+#include -+#include - #include - #include -+#include -+#include -+#include - #include - #include - #include -+#include -+#include - #include - - #include "strings.hrc" -@@ -55,6 +63,68 @@ using namespace ::com::sun::star::uno; - - namespace sd { - -+static void lcl_setLanguageForObj( SdrObject *pObj, LanguageType nLang, bool bLanguageNone = false ) -+{ -+ const sal_uInt16 aLangWhichId_EE[3] = -+ { -+ EE_CHAR_LANGUAGE, -+ EE_CHAR_LANGUAGE_CJK, -+ EE_CHAR_LANGUAGE_CTL -+ }; -+ -+ if( bLanguageNone ) -+ nLang = LANGUAGE_NONE; -+ -+ if( nLang != LANGUAGE_DONTKNOW ) -+ { -+ if( nLang == LANGUAGE_NONE ) -+ { -+ for(sal_Int32 n = 0; n < 3; n++ ) -+ pObj->SetMergedItem( SvxLanguageItem( nLang, aLangWhichId_EE[n] ) ); -+ } -+ else -+ { -+ sal_uInt16 nLangWhichId = 0; -+ sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLang ); -+ switch (nScriptType) -+ { -+ case SCRIPTTYPE_LATIN : nLangWhichId = EE_CHAR_LANGUAGE; break; -+ case SCRIPTTYPE_ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break; -+ case SCRIPTTYPE_COMPLEX : nLangWhichId = EE_CHAR_LANGUAGE_CTL; break; -+ default: -+ OSL_FAIL("unexpected case" ); -+ return; -+ } -+ pObj->SetMergedItem( SvxLanguageItem( nLang, nLangWhichId ) ); -+ } -+ } -+ else // Reset to default -+ { -+ for( sal_Int32 n = 0; n < 3; n++ ) -+ pObj->ClearMergedItem( aLangWhichId_EE[n] ); -+ } -+} -+ -+ -+static void lcl_setLanguage( const SdDrawDocument *pDoc, const OUString &rLanguage, bool bLanguageNone = false ) -+{ -+ LanguageType nLang = SvtLanguageTable().GetType( rLanguage ); -+ -+ // Do it for SdDrawDocument->SetLanguage as well? -+ -+ sal_uInt16 nPageCount = pDoc->GetPageCount(); // Pick All Pages -+ for( sal_uInt16 nPage = 0; nPage < nPageCount; nPage++ ) -+ { -+ const SdrPage *pPage = pDoc->GetPage( nPage ); -+ sal_uIntPtr nObjCount = pPage->GetObjCount(); -+ for( sal_uInt16 nObj = 0; nObj < nObjCount; nObj++ ) -+ { -+ SdrObject *pObj = pPage->GetObj( nObj ); -+ lcl_setLanguageForObj( pObj, nLang, bLanguageNone ); -+ } -+ } -+} -+ - /** - * Handles SFX-Requests - */ -@@ -201,6 +271,50 @@ void DrawDocShell::Execute( SfxRequest& rReq ) - } - } - break; -+ case SID_LANGUAGE_STATUS: -+ { -+ OUString aNewLangTxt; -+ SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, SID_LANGUAGE_STATUS , false ); -+ if (pItem) -+ aNewLangTxt = pItem->GetValue(); -+ if (aNewLangTxt == "*" ) -+ { -+ // open the dialog "Tools/Options/Language Settings - Language" -+ SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); -+ if (pFact && mpViewShell) -+ { -+ VclAbstractDialog* pDlg = pFact->CreateVclDialog( mpViewShell->GetActiveWindow(), SID_LANGUAGE_OPTIONS ); -+ pDlg->Execute(); -+ delete pDlg; -+ } -+ } -+ else -+ { -+ // setting the new language... -+ if (!aNewLangTxt.isEmpty()) -+ { -+ const OUString aDocumentLangPrefix("Default_"); -+ const OUString aStrNone("LANGUAGE_NONE"); -+ const OUString aStrResetLangs("RESET_LANGUAGES"); -+ sal_Int32 nPos = -1; -+ if (-1 != (nPos = aNewLangTxt.indexOf( aDocumentLangPrefix , 0 ))) -+ { -+ aNewLangTxt = aNewLangTxt.replaceAt( nPos, aDocumentLangPrefix.getLength(), "" ); -+ } -+ else -+ { -+ break; -+ } -+ if (aNewLangTxt == aStrNone) -+ lcl_setLanguage( mpViewShell->GetDoc(), OUString() ); -+ else if (aNewLangTxt == aStrResetLangs) -+ lcl_setLanguage( mpViewShell->GetDoc(), OUString(), true ); -+ else -+ lcl_setLanguage( mpViewShell->GetDoc(), aNewLangTxt ); -+ } -+ } -+ } -+ break; - - default: - break; -diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx -index 1553954..ee0fad0 100644 ---- a/sd/source/ui/docshell/docshell.cxx -+++ b/sd/source/ui/docshell/docshell.cxx -@@ -270,6 +270,12 @@ void DrawDocShell::GetState(SfxItemSet &rSet) - rSet.Put(SfxVisibilityItem(nWhich, SvtCJKOptions().IsAnyEnabled())); - } - break; -+ case SID_LANGUAGE_STATUS: -+ { -+ // Keeping this enabled for the time being -+ rSet.Put(SfxVisibilityItem(nWhich, true)); -+ } -+ break; - - default: - break; -diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml -index 6e8f9e4..289acf9 100644 ---- a/sd/uiconfig/sdraw/menubar/menubar.xml -+++ b/sd/uiconfig/sdraw/menubar/menubar.xml -@@ -245,6 +245,8 @@ - - - -+ -+ - - - -diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml -index b2d5ae6..e8b1a6d 100644 ---- a/sd/uiconfig/simpress/menubar/menubar.xml -+++ b/sd/uiconfig/simpress/menubar/menubar.xml -@@ -273,6 +273,8 @@ - - - -+ -+ - - - --- -1.8.4.5 - diff --git a/text-alignment-in-shape.diff b/text-alignment-in-shape.diff deleted file mode 100644 index 0d5d5cd..0000000 --- a/text-alignment-in-shape.diff +++ /dev/null @@ -1,58 +0,0 @@ -From 709f06eb261b3225cd4b56a7efb8e2d591909960 Mon Sep 17 00:00:00 2001 -From: Muthu Subramanian -Date: Wed, 26 Mar 2014 10:43:08 +0000 -Subject: n#862510: anchorCtr controls the anchoring as well. - -(cherry picked from commit c17eb67460293fbe72ffa8e80cd10743df493afa) -Signed-off-by: Andras Timar - -Conflicts: - oox/source/drawingml/textbodypropertiescontext.cxx - -Change-Id: Ib244d89a9f7d400b3891d477314cd5f0193552e0 ---- -diff --git a/include/oox/drawingml/textbodyproperties.hxx b/include/oox/drawingml/textbodyproperties.hxx -index 3fb0684..af68f20 100644 ---- a/include/oox/drawingml/textbodyproperties.hxx -+++ b/include/oox/drawingml/textbodyproperties.hxx -@@ -34,6 +34,7 @@ struct TextBodyProperties - { - PropertyMap maPropertyMap; - OptValue< sal_Int32 > moRotation; -+ bool mbAnchorCtr; - OptValue< sal_Int32 > moVert; - boost::optional< sal_Int32 > moInsets[4]; - boost::optional< sal_Int32 > moTextOffX; -diff --git a/oox/source/drawingml/textbodyproperties.cxx b/oox/source/drawingml/textbodyproperties.cxx -index 36f39d9..9e53897 100644 ---- a/oox/source/drawingml/textbodyproperties.cxx -+++ b/oox/source/drawingml/textbodyproperties.cxx -@@ -80,8 +80,8 @@ void TextBodyProperties::pushRotationAdjustments( sal_Int32 nRotation ) - // Hack for n#760986 - // TODO: Preferred method would be to have a textbox on top - // of the shape and the place it according to the (off,ext) -- if( nOff == 0 && moTextOffX ) nVal = *moTextOffX; -- if( nOff == 1 && moTextOffY ) nVal = *moTextOffY; -+ if( nOff == 0 && moTextOffX && mbAnchorCtr ) nVal = *moTextOffX; -+ if( nOff == 1 && moTextOffY && mbAnchorCtr ) nVal = *moTextOffY; - if( nVal < 0 ) nVal = 0; - - if( moInsets[i] ) -diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx -index 358db9f..b580be3 100644 ---- a/oox/source/drawingml/textbodypropertiescontext.cxx -+++ b/oox/source/drawingml/textbodypropertiescontext.cxx -@@ -56,9 +56,9 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler2Helper& rPa - mrTextBodyProp.moInsets[i] = GetCoordinate( sValue ); - } - -- bool bAnchorCenter = rAttribs.getBool( XML_anchorCtr, false ); -+ mrTextBodyProp.mbAnchorCtr = rAttribs.getBool( XML_anchorCtr, false ); - if( rAttribs.hasAttribute( XML_anchorCtr ) ) { -- if( bAnchorCenter ) -+ if( mrTextBodyProp.mbAnchorCtr ) - mrTextBodyProp.maPropertyMap[ PROP_TextHorizontalAdjust ] <<= - TextHorizontalAdjust_CENTER; - } --- -cgit v0.9.0.2-2-gbebe From 1f41eb23b2245f19aefc95549643944b2e758ba84efc7ce59e24a6c96bafb2f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 17 Jun 2014 09:17:28 +0000 Subject: [PATCH 10/27] - Version the glew dependency. OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=161 --- libreoffice.changes | 5 +++++ libreoffice.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libreoffice.changes b/libreoffice.changes index e2be23a..8625b56 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 17 09:17:10 UTC 2014 - tchvatal@suse.com + +- Version the glew dependency. + ------------------------------------------------------------------- Mon Jun 16 10:39:01 UTC 2014 - tchvatal@suse.com diff --git a/libreoffice.spec b/libreoffice.spec index 4047290..969dfa8 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -115,7 +115,7 @@ BuildRequires: flac-devel BuildRequires: flex BuildRequires: flute BuildRequires: gcc-c++ -BuildRequires: glew-devel +BuildRequires: glew-devel >= 1.10.0 BuildRequires: glm-devel BuildRequires: glu-devel BuildRequires: gnome-vfs2-devel From 4f294f96c6bf2b926fd7f53fb58959df9d40f239406793afb4c83e15df2a46f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 20 Jun 2014 07:26:30 +0000 Subject: [PATCH 11/27] - Remove no longer provided files from list of artworky things. OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=162 --- libreoffice.changes | 5 +++++ libreoffice.spec | 7 +------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libreoffice.changes b/libreoffice.changes index 8625b56..82d5512 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jun 20 07:25:57 UTC 2014 - tchvatal@suse.com + +- Remove no longer provided files from list of artworky things. + ------------------------------------------------------------------- Tue Jun 17 09:17:10 UTC 2014 - tchvatal@suse.com diff --git a/libreoffice.spec b/libreoffice.spec index 969dfa8..831fc61 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -1089,12 +1089,7 @@ echo "%{_datadir}/%{name}/program/shell" >> file-lists/branding_upstream.txt for file in sofficerc \ intro.png \ flat_logo.svg \ - shell/about.svg \ - shell/backing_left.png \ - shell/backing_right.png \ - shell/backing_rtl_left.png \ - shell/backing_rtl_right.png \ - shell/backing_space.png ; do + shell/about.svg ; do mv "%{buildroot}%{_libdir}/%{name}/program/$file" "%{buildroot}%{_datadir}/%{name}/program/$file" ln -sf "%{_datadir}/%{name}/program/$file" "%{buildroot}/%{_libdir}/%{name}/program/$file" echo "%{_datadir}/%{name}/program/$file" >> file-lists/branding_upstream.txt From a6a7509b5351bb4a781a475bcf01bd48fe55b88177e25fea94970119195afefa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 20 Jun 2014 19:04:10 +0000 Subject: [PATCH 12/27] - More languages got autotext. Reflect that. OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=163 --- libreoffice.changes | 5 +++++ libreoffice.spec | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/libreoffice.changes b/libreoffice.changes index 82d5512..dd921aa 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jun 20 19:03:50 UTC 2014 - tchvatal@suse.com + +- More languages got autotext. Reflect that. + ------------------------------------------------------------------- Fri Jun 20 07:25:57 UTC 2014 - tchvatal@suse.com diff --git a/libreoffice.spec b/libreoffice.spec index 831fc61..d961365 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -770,7 +770,7 @@ Provides additional %{langname} translations and resources for %{project}. \ %langpack -l bg -n Bulgarian -T -X -m bg_BG %langpack -l bn -n Bengali -T -m bn_BD %langpack -l br -n Breton -m br_FR -%langpack -l ca -n Catalan -T -M +%langpack -l ca -n Catalan -T -M -X %langpack -l cs -n Czech -T -X -m cs_CZ %langpack -l cy -n Welsh %langpack -l da -n Danish -T -X -m da_DK @@ -781,22 +781,22 @@ Provides additional %{langname} translations and resources for %{project}. \ %langpack -l es -n Spanish -M -T -X %langpack -l et -n Estonian -T -m et_EE %langpack -l eu -n Basque -T -%langpack -l fa -n Farsi -s ctl -%langpack -l fi -n Finnish -r libreoffice-voikko -T +%langpack -l fa -n Farsi -s ctl -X +%langpack -l fi -n Finnish -r libreoffice-voikko -T -X %langpack -l fr -n French -T -X -m fr_FR %langpack -l ga -n Irish %langpack -l gl -n Galician -T -M %langpack -l gu -n Gujarati -s ctl -T -p gu-IN -m gu_IN %langpack -l he -n Hebrew -s ctl -T -m he_IL %langpack -l hi -n Hindi -s ctl -T -p hi-IN -m hi_IN -%langpack -l hr -n Croatian -T -m hr_HR +%langpack -l hr -n Croatian -T -m hr_HR -X %langpack -l hu -n Hungarian -T -X -m hu_HU %langpack -l it -n Italian -T -X -m it_IT %langpack -l ja -n Japanese -s cjk -T -X %langpack -l kk -n Kazakh %langpack -l kn -n Kannada %langpack -l ko -n Korean -s cjk -T -c korea -X -%langpack -l lt -n Lithuanian -m lt_LT +%langpack -l lt -n Lithuanian -m lt_LT -X %langpack -l lv -n Latvian -m lv_LV %langpack -l mai -n Maithili %langpack -l ml -n Malayalam @@ -814,7 +814,7 @@ Provides additional %{langname} translations and resources for %{project}. \ %define langpack_lang Brazilian Portuguese %langpack -l pt-BR -n %{langpack_lang} -m pt_BR -p pt_BR -T -X %langpack -l pt-PT -n Portuguese -m pt_PT -T -L pt -x pt -%langpack -l ro -n Romanian -M +%langpack -l ro -n Romanian -M -X %langpack -l ru -n Russian -T -X -m ru_RU %langpack -l si -n Sinhalese -S ctl -T -m si_LK %langpack -l sk -n Slovak -T -X -m sk_SK From a20086e56a7f3c493f059582bce36233016e68aced79e4c5e3bb91cdf534dd4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sat, 21 Jun 2014 10:47:49 +0000 Subject: [PATCH 13/27] OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=164 --- libreoffice.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/libreoffice.spec b/libreoffice.spec index d961365..1dd1f93 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -1222,7 +1222,6 @@ fi %exclude %{_datadir}/%{name}/program/sofficerc %exclude %{_datadir}/%{name}/program/flat_logo.svg %exclude %{_datadir}/%{name}/program/*.png -%exclude %{_datadir}/%{name}/program/shell/*.png %exclude %{_datadir}/%{name}/program/shell/*.svg # such a big icons are not provided by other packages # FIXME: last time checked on openSUSE-12.2 From b600154844fc6678ba777fc221cee4d0c999577aaac663d9958ddd62d46b7679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 23 Jun 2014 11:12:04 +0000 Subject: [PATCH 14/27] - Version bump to 4.3.0.1: * Buildfix with new glm * Various fixes. OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=165 --- libreoffice-4.3.0.0.beta2-buildfix1.tar.xz | 3 --- libreoffice-4.3.0.1.tar.xz | 3 +++ libreoffice-help-4.3.0.0.beta2-buildfix1.tar.xz | 3 --- libreoffice-help-4.3.0.1.tar.xz | 3 +++ ...office-translations-4.3.0.0.beta2-buildfix1.tar.xz | 3 --- libreoffice-translations-4.3.0.1.tar.xz | 3 +++ libreoffice.changes | 7 +++++++ libreoffice.spec | 11 +++++------ 8 files changed, 21 insertions(+), 15 deletions(-) delete mode 100644 libreoffice-4.3.0.0.beta2-buildfix1.tar.xz create mode 100644 libreoffice-4.3.0.1.tar.xz delete mode 100644 libreoffice-help-4.3.0.0.beta2-buildfix1.tar.xz create mode 100644 libreoffice-help-4.3.0.1.tar.xz delete mode 100644 libreoffice-translations-4.3.0.0.beta2-buildfix1.tar.xz create mode 100644 libreoffice-translations-4.3.0.1.tar.xz diff --git a/libreoffice-4.3.0.0.beta2-buildfix1.tar.xz b/libreoffice-4.3.0.0.beta2-buildfix1.tar.xz deleted file mode 100644 index d8a2bcb..0000000 --- a/libreoffice-4.3.0.0.beta2-buildfix1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:02bcc6d22b00a8d4cb594ea6f48c0267399f22cdef22f82584168b7a2ad50ace -size 151921492 diff --git a/libreoffice-4.3.0.1.tar.xz b/libreoffice-4.3.0.1.tar.xz new file mode 100644 index 0000000..48b376f --- /dev/null +++ b/libreoffice-4.3.0.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e87236ea3e70b1bd810807cc836741a2bde12a2eac654187b66987a4df5023b3 +size 151976276 diff --git a/libreoffice-help-4.3.0.0.beta2-buildfix1.tar.xz b/libreoffice-help-4.3.0.0.beta2-buildfix1.tar.xz deleted file mode 100644 index 272cdb4..0000000 --- a/libreoffice-help-4.3.0.0.beta2-buildfix1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c9d9ee953c995a28c596e4ef2aa266274e7bb8e8e2c3c7e131cd4dedba66f0b8 -size 1856076 diff --git a/libreoffice-help-4.3.0.1.tar.xz b/libreoffice-help-4.3.0.1.tar.xz new file mode 100644 index 0000000..71b102f --- /dev/null +++ b/libreoffice-help-4.3.0.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9da050efac3299835a322775923eaff1bdba4e929acb03f201e70653a0615820 +size 1854656 diff --git a/libreoffice-translations-4.3.0.0.beta2-buildfix1.tar.xz b/libreoffice-translations-4.3.0.0.beta2-buildfix1.tar.xz deleted file mode 100644 index 25bb0fe..0000000 --- a/libreoffice-translations-4.3.0.0.beta2-buildfix1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7ee83dc8e37e930d095dcf0be9b80b29728558b4e4bc5e933c14756242b3e512 -size 126491916 diff --git a/libreoffice-translations-4.3.0.1.tar.xz b/libreoffice-translations-4.3.0.1.tar.xz new file mode 100644 index 0000000..5171699 --- /dev/null +++ b/libreoffice-translations-4.3.0.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc7c9716484c5c6d80db31681cb77dbdec2a37a1788a8e75ad109739039ad3bc +size 126570768 diff --git a/libreoffice.changes b/libreoffice.changes index dd921aa..4b744ee 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Jun 23 11:11:03 UTC 2014 - tchvatal@suse.com + +- Version bump to 4.3.0.1: + * Buildfix with new glm + * Various fixes. + ------------------------------------------------------------------- Fri Jun 20 19:03:50 UTC 2014 - tchvatal@suse.com diff --git a/libreoffice.spec b/libreoffice.spec index 1dd1f93..d802b75 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -31,17 +31,16 @@ %define external_url http://dev-www.libreoffice.org/src/ %define tarball_url http://download.documentfoundation.org/libreoffice/src/4.3.0/ # This is used due to the need for beta releases -%define realver 4.3.0.0.beta2-buildfix1 Name: libreoffice -Version: 4.3.0.0~beta2 +Version: 4.3.0.1 Release: 0 Summary: A Free Office Suite (Framework) License: Apache-2.0 and Artistic-1.0 and BSD-3-Clause and BSD-4-Clause and GPL-2.0+ and LPPL-1.3c and LGPL-2.1+ and LGPL-3.0 and MPL-1.1 and MIT and SUSE-Public-Domain and W3C Group: Productivity/Office/Suite Url: http://www.documentfoundation.org/ -Source0: %{tarball_url}/libreoffice-%{realver}.tar.xz -Source1: %{tarball_url}/libreoffice-help-%{realver}.tar.xz -Source2: %{tarball_url}/libreoffice-translations-%{realver}.tar.xz +Source0: %{tarball_url}/libreoffice-%{version}.tar.xz +Source1: %{tarball_url}/libreoffice-help-%{version}.tar.xz +Source2: %{tarball_url}/libreoffice-translations-%{version}.tar.xz # 256x256 desktop icons (bnc#722644) Source20: libreoffice-desktop-icons-256x256.tar.bz2 # Prebuilt sofficerc for the noarch upstream branding package @@ -841,7 +840,7 @@ Provides additional %{langname} translations and resources for %{project}. \ %undefine langpack_lang %prep -%setup -q -b1 -b2 -n libreoffice-%{realver} +%setup -q -b1 -b2 %patch3 -p1 %patch5 %patch6 -p1 From 08a842f5dcbd7d434793aa5272a13e13f959b107af9e1e846388b7e7154ff73a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 24 Jun 2014 10:48:36 +0000 Subject: [PATCH 15/27] - Add patch to fix unfilelisted files: * 0001-Package-filter-in-common-pack.patch OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=166 --- 0001-Package-filter-in-common-pack.patch | 33 ++++++++++++++++++++++++ libreoffice.changes | 6 +++++ libreoffice.spec | 3 +++ 3 files changed, 42 insertions(+) create mode 100644 0001-Package-filter-in-common-pack.patch diff --git a/0001-Package-filter-in-common-pack.patch b/0001-Package-filter-in-common-pack.patch new file mode 100644 index 0000000..c25f37e --- /dev/null +++ b/0001-Package-filter-in-common-pack.patch @@ -0,0 +1,33 @@ +From 5deb84c3b45024dffa3db5b8aaf528be643634fc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= +Date: Tue, 24 Jun 2014 09:55:29 +0200 +Subject: [PATCH] Package filter in common pack + +Change-Id: I3728244712966cf2245a79f2630ac46cb63f1d21 +--- + bin/distro-install-file-lists | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/bin/distro-install-file-lists b/bin/distro-install-file-lists +index ada7295..87c2a09 100755 +--- a/bin/distro-install-file-lists ++++ b/bin/distro-install-file-lists +@@ -78,6 +78,7 @@ if test "z$OOO_VENDOR" != "zDebian" ; then + rm -f common_list.txt + for module in gid_Module_Root gid_Module_Root_Brand \ + gid_Module_Root_Files_[0-9] \ ++ gid_Module_Filter \ + gid_Module_Root_Hack \ + gid_Module_Oo_Linguistic \ + gid_Module_Root_Extension_Dictionary_* \ +@@ -405,6 +406,7 @@ else + create_package_directory gid_Module_Root_Files_Images pkg/libreoffice-common + create_package_directory gid_Module_Oo_Linguistic pkg/libreoffice-common + create_package_directory gid_Module_Optional_Xsltfiltersamples pkg/libreoffice-common ++ create_package_directory gid_Module_Filter pkg/libreoffice-common + create_package_directory gid_Module_Optional_Grfflt pkg/libreoffice-draw + create_package_directory gid_Module_Prg_Calc_Bin pkg/libreoffice-calc + create_package_directory gid_Module_Prg_Math_Bin pkg/libreoffice-math +-- +1.8.5.5 + diff --git a/libreoffice.changes b/libreoffice.changes index 4b744ee..424ffa2 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jun 24 10:47:32 UTC 2014 - tchvatal@suse.com + +- Add patch to fix unfilelisted files: + * 0001-Package-filter-in-common-pack.patch + ------------------------------------------------------------------- Mon Jun 23 11:11:03 UTC 2014 - tchvatal@suse.com diff --git a/libreoffice.spec b/libreoffice.spec index d802b75..74e8e8b 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -88,6 +88,8 @@ Patch12: mediawiki-no-broken-help.diff Patch13: jvmfwk-disable-gcj.diff # Fix running wizards in py2 as the utf is not there Patch16: wizards-create-temlates-with-python-2.6.diff +# PATCH-FIX-UPSTREAM: files missing from packagelist +Patch17: 0001-Package-filter-in-common-pack.patch # try to save space by using hardlinks Patch990: install-with-hardlinks.diff BuildRequires: ImageMagick @@ -850,6 +852,7 @@ Provides additional %{langname} translations and resources for %{project}. \ %patch12 %patch13 -p1 %patch16 -p1 +%patch17 -p1 %patch990 -p1 # 256x256 icons tar -xjf %{SOURCE20} From c8599017d0d632ca8996c3f0093408df33b2ad0398a0bf6b63b51d2b7542a9df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 25 Jun 2014 11:05:05 +0000 Subject: [PATCH 16/27] - Install missing libsaxlo. Hacked for now, upstream notified. OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=167 --- libreoffice.changes | 5 +++++ libreoffice.spec | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/libreoffice.changes b/libreoffice.changes index 424ffa2..6754ab0 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 25 11:04:41 UTC 2014 - tchvatal@suse.com + +- Install missing libsaxlo. Hacked for now, upstream notified. + ------------------------------------------------------------------- Tue Jun 24 10:47:32 UTC 2014 - tchvatal@suse.com diff --git a/libreoffice.spec b/libreoffice.spec index 74e8e8b..fa04277 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -1000,6 +1000,10 @@ make slowcheck %install make DESTDIR=%{buildroot} distro-pack-install +# FIXME: Hack add missing file +install -m755 instdir/program/libsaxlo.so %{buildroot}/%{_libdir}/%{name}/program/libsaxlo.so +echo "%{_libdir}/%{name}/program/libsaxlo.so" >>file-lists/common_list.txt + ################ # update desktop files builddir=`pwd` From 378c8863efd13188acccc1897139bfadf3ef85f8ce1ea59ff884ed1d2f7cc0d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 3 Jul 2014 11:32:24 +0000 Subject: [PATCH 17/27] - Version bump to 4.3.0.2: * Various small bugfixes - Drop upstreamed patches: * 0001-Package-filter-in-common-pack.patch OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=168 --- 0001-Package-filter-in-common-pack.patch | 33 ------------------------ libreoffice-4.3.0.1.tar.xz | 3 --- libreoffice-4.3.0.2.tar.xz | 3 +++ libreoffice-help-4.3.0.1.tar.xz | 3 --- libreoffice-help-4.3.0.2.tar.xz | 3 +++ libreoffice-translations-4.3.0.1.tar.xz | 3 --- libreoffice-translations-4.3.0.2.tar.xz | 3 +++ libreoffice.changes | 8 ++++++ libreoffice.spec | 5 +--- 9 files changed, 18 insertions(+), 46 deletions(-) delete mode 100644 0001-Package-filter-in-common-pack.patch delete mode 100644 libreoffice-4.3.0.1.tar.xz create mode 100644 libreoffice-4.3.0.2.tar.xz delete mode 100644 libreoffice-help-4.3.0.1.tar.xz create mode 100644 libreoffice-help-4.3.0.2.tar.xz delete mode 100644 libreoffice-translations-4.3.0.1.tar.xz create mode 100644 libreoffice-translations-4.3.0.2.tar.xz diff --git a/0001-Package-filter-in-common-pack.patch b/0001-Package-filter-in-common-pack.patch deleted file mode 100644 index c25f37e..0000000 --- a/0001-Package-filter-in-common-pack.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 5deb84c3b45024dffa3db5b8aaf528be643634fc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= -Date: Tue, 24 Jun 2014 09:55:29 +0200 -Subject: [PATCH] Package filter in common pack - -Change-Id: I3728244712966cf2245a79f2630ac46cb63f1d21 ---- - bin/distro-install-file-lists | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/bin/distro-install-file-lists b/bin/distro-install-file-lists -index ada7295..87c2a09 100755 ---- a/bin/distro-install-file-lists -+++ b/bin/distro-install-file-lists -@@ -78,6 +78,7 @@ if test "z$OOO_VENDOR" != "zDebian" ; then - rm -f common_list.txt - for module in gid_Module_Root gid_Module_Root_Brand \ - gid_Module_Root_Files_[0-9] \ -+ gid_Module_Filter \ - gid_Module_Root_Hack \ - gid_Module_Oo_Linguistic \ - gid_Module_Root_Extension_Dictionary_* \ -@@ -405,6 +406,7 @@ else - create_package_directory gid_Module_Root_Files_Images pkg/libreoffice-common - create_package_directory gid_Module_Oo_Linguistic pkg/libreoffice-common - create_package_directory gid_Module_Optional_Xsltfiltersamples pkg/libreoffice-common -+ create_package_directory gid_Module_Filter pkg/libreoffice-common - create_package_directory gid_Module_Optional_Grfflt pkg/libreoffice-draw - create_package_directory gid_Module_Prg_Calc_Bin pkg/libreoffice-calc - create_package_directory gid_Module_Prg_Math_Bin pkg/libreoffice-math --- -1.8.5.5 - diff --git a/libreoffice-4.3.0.1.tar.xz b/libreoffice-4.3.0.1.tar.xz deleted file mode 100644 index 48b376f..0000000 --- a/libreoffice-4.3.0.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e87236ea3e70b1bd810807cc836741a2bde12a2eac654187b66987a4df5023b3 -size 151976276 diff --git a/libreoffice-4.3.0.2.tar.xz b/libreoffice-4.3.0.2.tar.xz new file mode 100644 index 0000000..d08b5aa --- /dev/null +++ b/libreoffice-4.3.0.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4cfe173deeefe0b78606db3da6d3f00a8331cfcfdfc8ef55aaef48537ab3fd1f +size 152011220 diff --git a/libreoffice-help-4.3.0.1.tar.xz b/libreoffice-help-4.3.0.1.tar.xz deleted file mode 100644 index 71b102f..0000000 --- a/libreoffice-help-4.3.0.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9da050efac3299835a322775923eaff1bdba4e929acb03f201e70653a0615820 -size 1854656 diff --git a/libreoffice-help-4.3.0.2.tar.xz b/libreoffice-help-4.3.0.2.tar.xz new file mode 100644 index 0000000..7c95aa8 --- /dev/null +++ b/libreoffice-help-4.3.0.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:043ed6999e502497f700c82c0035addff480a9235deb455f5e5f5c4b859d45cc +size 1854852 diff --git a/libreoffice-translations-4.3.0.1.tar.xz b/libreoffice-translations-4.3.0.1.tar.xz deleted file mode 100644 index 5171699..0000000 --- a/libreoffice-translations-4.3.0.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cc7c9716484c5c6d80db31681cb77dbdec2a37a1788a8e75ad109739039ad3bc -size 126570768 diff --git a/libreoffice-translations-4.3.0.2.tar.xz b/libreoffice-translations-4.3.0.2.tar.xz new file mode 100644 index 0000000..135c17d --- /dev/null +++ b/libreoffice-translations-4.3.0.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:196b14b7c383d4c26a7ee7981d9ea850d3805c3cb3b5a0e0f397df8d217ddcae +size 126756520 diff --git a/libreoffice.changes b/libreoffice.changes index 6754ab0..66ea50e 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Jul 3 11:21:45 UTC 2014 - tchvatal@suse.com + +- Version bump to 4.3.0.2: + * Various small bugfixes +- Drop upstreamed patches: + * 0001-Package-filter-in-common-pack.patch + ------------------------------------------------------------------- Wed Jun 25 11:04:41 UTC 2014 - tchvatal@suse.com diff --git a/libreoffice.spec b/libreoffice.spec index fa04277..31c341c 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -32,7 +32,7 @@ %define tarball_url http://download.documentfoundation.org/libreoffice/src/4.3.0/ # This is used due to the need for beta releases Name: libreoffice -Version: 4.3.0.1 +Version: 4.3.0.2 Release: 0 Summary: A Free Office Suite (Framework) License: Apache-2.0 and Artistic-1.0 and BSD-3-Clause and BSD-4-Clause and GPL-2.0+ and LPPL-1.3c and LGPL-2.1+ and LGPL-3.0 and MPL-1.1 and MIT and SUSE-Public-Domain and W3C @@ -88,8 +88,6 @@ Patch12: mediawiki-no-broken-help.diff Patch13: jvmfwk-disable-gcj.diff # Fix running wizards in py2 as the utf is not there Patch16: wizards-create-temlates-with-python-2.6.diff -# PATCH-FIX-UPSTREAM: files missing from packagelist -Patch17: 0001-Package-filter-in-common-pack.patch # try to save space by using hardlinks Patch990: install-with-hardlinks.diff BuildRequires: ImageMagick @@ -852,7 +850,6 @@ Provides additional %{langname} translations and resources for %{project}. \ %patch12 %patch13 -p1 %patch16 -p1 -%patch17 -p1 %patch990 -p1 # 256x256 icons tar -xjf %{SOURCE20} From 7bb74ccf6e9bc703f80368d4e9563c6147426350aa06b1f11f8fe01074606f0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 11 Jul 2014 08:26:42 +0000 Subject: [PATCH 18/27] - Add rpmlintrc to sources. OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=169 --- libreoffice.changes | 5 +++++ libreoffice.spec | 1 + 2 files changed, 6 insertions(+) diff --git a/libreoffice.changes b/libreoffice.changes index 66ea50e..6c08467 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jul 11 08:26:26 UTC 2014 - tchvatal@suse.com + +- Add rpmlintrc to sources. + ------------------------------------------------------------------- Thu Jul 3 11:21:45 UTC 2014 - tchvatal@suse.com diff --git a/libreoffice.spec b/libreoffice.spec index 31c341c..82941ab 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -41,6 +41,7 @@ Url: http://www.documentfoundation.org/ Source0: %{tarball_url}/libreoffice-%{version}.tar.xz Source1: %{tarball_url}/libreoffice-help-%{version}.tar.xz Source2: %{tarball_url}/libreoffice-translations-%{version}.tar.xz +Source99: %{name}-rpmlintrc # 256x256 desktop icons (bnc#722644) Source20: libreoffice-desktop-icons-256x256.tar.bz2 # Prebuilt sofficerc for the noarch upstream branding package From cf16c6b0a1463085b3432a9fe3bc1d4b44acbe97a35cdfba6737182b626fac90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 21 Jul 2014 06:59:36 +0000 Subject: [PATCH 19/27] - Version bump to 4.3.0.3: * Various small bugfixes. OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=170 --- libreoffice-4.3.0.2.tar.xz | 3 --- libreoffice-4.3.0.3.tar.xz | 3 +++ libreoffice-help-4.3.0.2.tar.xz | 3 --- libreoffice-help-4.3.0.3.tar.xz | 3 +++ libreoffice-translations-4.3.0.2.tar.xz | 3 --- libreoffice-translations-4.3.0.3.tar.xz | 3 +++ libreoffice.changes | 6 ++++++ libreoffice.spec | 2 +- 8 files changed, 16 insertions(+), 10 deletions(-) delete mode 100644 libreoffice-4.3.0.2.tar.xz create mode 100644 libreoffice-4.3.0.3.tar.xz delete mode 100644 libreoffice-help-4.3.0.2.tar.xz create mode 100644 libreoffice-help-4.3.0.3.tar.xz delete mode 100644 libreoffice-translations-4.3.0.2.tar.xz create mode 100644 libreoffice-translations-4.3.0.3.tar.xz diff --git a/libreoffice-4.3.0.2.tar.xz b/libreoffice-4.3.0.2.tar.xz deleted file mode 100644 index d08b5aa..0000000 --- a/libreoffice-4.3.0.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4cfe173deeefe0b78606db3da6d3f00a8331cfcfdfc8ef55aaef48537ab3fd1f -size 152011220 diff --git a/libreoffice-4.3.0.3.tar.xz b/libreoffice-4.3.0.3.tar.xz new file mode 100644 index 0000000..09104ed --- /dev/null +++ b/libreoffice-4.3.0.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b11c64f6bdf3cc7a1f88929a8be1f7e840f145de252991692dc168b874a5e0f +size 152014908 diff --git a/libreoffice-help-4.3.0.2.tar.xz b/libreoffice-help-4.3.0.2.tar.xz deleted file mode 100644 index 7c95aa8..0000000 --- a/libreoffice-help-4.3.0.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:043ed6999e502497f700c82c0035addff480a9235deb455f5e5f5c4b859d45cc -size 1854852 diff --git a/libreoffice-help-4.3.0.3.tar.xz b/libreoffice-help-4.3.0.3.tar.xz new file mode 100644 index 0000000..1e767fa --- /dev/null +++ b/libreoffice-help-4.3.0.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5092d50b38b7acd53470b013be1ec78aedc327f9152f2b0e4e1628e0e58bcb20 +size 1855252 diff --git a/libreoffice-translations-4.3.0.2.tar.xz b/libreoffice-translations-4.3.0.2.tar.xz deleted file mode 100644 index 135c17d..0000000 --- a/libreoffice-translations-4.3.0.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:196b14b7c383d4c26a7ee7981d9ea850d3805c3cb3b5a0e0f397df8d217ddcae -size 126756520 diff --git a/libreoffice-translations-4.3.0.3.tar.xz b/libreoffice-translations-4.3.0.3.tar.xz new file mode 100644 index 0000000..70263aa --- /dev/null +++ b/libreoffice-translations-4.3.0.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5803e4749b76442f85715001b085629b6e831b1aaaa3bda38e6ae8165e02aaf7 +size 126781888 diff --git a/libreoffice.changes b/libreoffice.changes index 6c08467..5c4e181 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jul 21 06:58:44 UTC 2014 - tchvatal@suse.com + +- Version bump to 4.3.0.3: + * Various small bugfixes. + ------------------------------------------------------------------- Fri Jul 11 08:26:26 UTC 2014 - tchvatal@suse.com diff --git a/libreoffice.spec b/libreoffice.spec index 82941ab..3c3a7ac 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -32,7 +32,7 @@ %define tarball_url http://download.documentfoundation.org/libreoffice/src/4.3.0/ # This is used due to the need for beta releases Name: libreoffice -Version: 4.3.0.2 +Version: 4.3.0.3 Release: 0 Summary: A Free Office Suite (Framework) License: Apache-2.0 and Artistic-1.0 and BSD-3-Clause and BSD-4-Clause and GPL-2.0+ and LPPL-1.3c and LGPL-2.1+ and LGPL-3.0 and MPL-1.1 and MIT and SUSE-Public-Domain and W3C From d00091345e58ba30a1f6d9743f8ad1b46a1114a58e35732ab07d371a38bb9434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 21 Jul 2014 07:17:56 +0000 Subject: [PATCH 20/27] - Add patch to fix the themes/icons handling: * libreoffice-4.3.0.3-themes-symlinks.patch OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=171 --- libreoffice-4.3.0.3-themes-symlinks.patch | 167 ++++++++++++++++++++++ libreoffice.changes | 6 + libreoffice.spec | 2 + 3 files changed, 175 insertions(+) create mode 100644 libreoffice-4.3.0.3-themes-symlinks.patch diff --git a/libreoffice-4.3.0.3-themes-symlinks.patch b/libreoffice-4.3.0.3-themes-symlinks.patch new file mode 100644 index 0000000..238c412 --- /dev/null +++ b/libreoffice-4.3.0.3-themes-symlinks.patch @@ -0,0 +1,167 @@ +From c796db004d463cb60a5b4489a868ae8dd377d0df Mon Sep 17 00:00:00 2001 +From: Tobias Lippert +Date: Sat, 19 Jul 2014 13:39:21 +0200 +Subject: [PATCH] fdo#81532 Handle symlinks to icon themes correctly + +- added logging for icon theme scanning. + +Change-Id: I799c5fc09879411020142f7808da0d9f2f63dc17 +--- + vcl/source/app/IconThemeScanner.cxx | 68 ++++++++++++++++++++++------------- + 1 file changed, 43 insertions(+), 25 deletions(-) + +diff --git a/vcl/source/app/IconThemeScanner.cxx b/vcl/source/app/IconThemeScanner.cxx +index 9684bb6..29d3cd7 100644 +--- a/vcl/source/app/IconThemeScanner.cxx ++++ b/vcl/source/app/IconThemeScanner.cxx +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -20,24 +21,34 @@ namespace vcl { + + namespace { + +-bool +-search_path_is_valid(const OUString& dir) ++const char *LOG_AREA = "vcl.app"; ++ ++// set the status of a file. Returns false if the status could not be determined. ++bool set_file_status(osl::FileStatus& status, const OUString& file) + { + osl::DirectoryItem dirItem; +- osl::FileBase::RC retvalGet = osl::DirectoryItem::get(dir, dirItem); ++ osl::FileBase::RC retvalGet = osl::DirectoryItem::get(file, dirItem); + if (retvalGet != osl::FileBase::E_None) { ++ SAL_WARN(LOG_AREA, "Could not determine status for file '" << file << "'."); + return false; + } +- osl::FileStatus fileStatus(osl_FileStatus_Mask_Type); +- osl::FileBase::RC retvalStatus = dirItem.getFileStatus(fileStatus); ++ osl::FileBase::RC retvalStatus = dirItem.getFileStatus(status); + if (retvalStatus != osl::FileBase::E_None) { ++ SAL_WARN(LOG_AREA, "Could not determine status for file '" << file << "'."); + return false; + } ++ return true; ++} + +- if (!fileStatus.isDirectory()) { +- return false; ++OUString convert_to_absolute_path(const OUString& path) ++{ ++ salhelper::LinkResolver resolver(0); ++ osl::FileBase::RC rc = resolver.fetchFileStatus(path); ++ if (rc != osl::FileBase::E_None) { ++ SAL_WARN(LOG_AREA, "Could not resolve path '" << path << "' to search for icon themes."); ++ throw std::runtime_error("Provided a recursive symlink to a icon theme directory that could not be resolved."); + } +- return true; ++ return resolver.m_aStatus.getFileURL(); + } + + } +@@ -48,12 +59,20 @@ IconThemeScanner::IconThemeScanner() + bool + IconThemeScanner::ScanDirectoryForIconThemes(const OUString& path) + { +- bool pathIsValid = search_path_is_valid(path); +- if (!pathIsValid) { ++ osl::FileStatus fileStatus(osl_FileStatus_Mask_Type); ++ bool couldSetFileStatus = set_file_status(fileStatus, path); ++ if (!couldSetFileStatus) { ++ return false; ++ } ++ ++ if (!fileStatus.isDirectory()) { ++ SAL_INFO(LOG_AREA, "Cannot search for icon themes in '"<< path << "'. It is not a directory."); + return false; + } ++ + std::vector iconThemePaths = ReadIconThemesFromPath(path); + if (iconThemePaths.empty()) { ++ SAL_WARN(LOG_AREA, "Could not find any icon themes in the provided directory ('" < found; ++ SAL_INFO(LOG_AREA, "Scanning directory '" << dir << " for icon themes."); + + osl::Directory dirToScan(dir); + osl::FileBase::RC retvalOpen = dirToScan.open(); +@@ -93,15 +116,12 @@ IconThemeScanner::ReadIconThemesFromPath(const OUString& dir) + if (retvalStatus != osl::FileBase::E_None) { + continue; + } +- if (!status.isRegular()) { +- continue; +- } +- if (!FileIsValidIconTheme(status.getFileURL())) { ++ ++ OUString filename = convert_to_absolute_path(status.getFileURL()); ++ if (!FileIsValidIconTheme(filename)) { + continue; + } +- OUString entry; +- entry = status.getFileURL(); +- found.push_back(entry); ++ found.push_back(filename); + } + return found; + } +@@ -111,20 +131,16 @@ IconThemeScanner::FileIsValidIconTheme(const OUString& filename) + { + // check whether we can construct a IconThemeInfo from it + if (!IconThemeInfo::UrlCanBeParsed(filename)) { ++ SAL_INFO(LOG_AREA, "File '" << filename << "' does not seem to be an icon theme."); + return false; + } + +- // check whether the file is a regular file +- osl::DirectoryItem dirItem; +- osl::FileBase::RC retvalGet = osl::DirectoryItem::get(filename, dirItem); +- if (retvalGet != osl::FileBase::E_None) { +- return false; +- } + osl::FileStatus fileStatus(osl_FileStatus_Mask_Type); +- osl::FileBase::RC retvalStatus = dirItem.getFileStatus(fileStatus); +- if (retvalStatus != osl::FileBase::E_None) { ++ bool couldSetFileStatus = set_file_status(fileStatus, filename); ++ if (!couldSetFileStatus) { + return false; + } ++ + if (!fileStatus.isRegular()) { + return false; + } +@@ -178,6 +194,8 @@ IconThemeScanner::GetIconThemeInfo(const OUString& themeId) + std::vector::iterator info = std::find_if(mFoundIconThemes.begin(), mFoundIconThemes.end(), + SameTheme(themeId)); + if (info == mFoundIconThemes.end()) { ++ SAL_WARN(LOG_AREA, "Requested information for icon theme with id '" << themeId ++ << "' which does not exist."); + throw std::runtime_error("Requested information on not-installed icon theme"); + } + return *info; +-- +1.7.9.5 + diff --git a/libreoffice.changes b/libreoffice.changes index 5c4e181..51ff4b0 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jul 21 07:09:41 UTC 2014 - tchvatal@suse.com + +- Add patch to fix the themes/icons handling: + * libreoffice-4.3.0.3-themes-symlinks.patch + ------------------------------------------------------------------- Mon Jul 21 06:58:44 UTC 2014 - tchvatal@suse.com diff --git a/libreoffice.spec b/libreoffice.spec index 3c3a7ac..75ca881 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -87,6 +87,7 @@ Patch11: nlpsolver-no-broken-help.diff Patch12: mediawiki-no-broken-help.diff # LO never worked well with it Patch13: jvmfwk-disable-gcj.diff +Patch14: libreoffice-4.3.0.3-themes-symlinks.patch # Fix running wizards in py2 as the utf is not there Patch16: wizards-create-temlates-with-python-2.6.diff # try to save space by using hardlinks @@ -850,6 +851,7 @@ Provides additional %{langname} translations and resources for %{project}. \ %patch11 %patch12 %patch13 -p1 +%patch14 -p1 %patch16 -p1 %patch990 -p1 # 256x256 icons From b3920bc18294a155e5bfa96678ca86dc49d0b038c67ce37bcc360120fba1f3dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 21 Jul 2014 16:33:42 +0000 Subject: [PATCH 21/27] OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=172 --- libreoffice.spec | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libreoffice.spec b/libreoffice.spec index 75ca881..54acc90 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -1000,10 +1000,6 @@ make slowcheck %install make DESTDIR=%{buildroot} distro-pack-install -# FIXME: Hack add missing file -install -m755 instdir/program/libsaxlo.so %{buildroot}/%{_libdir}/%{name}/program/libsaxlo.so -echo "%{_libdir}/%{name}/program/libsaxlo.so" >>file-lists/common_list.txt - ################ # update desktop files builddir=`pwd` @@ -1308,7 +1304,7 @@ fi %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/share %dir %{_datadir}/%{name}/share/config -%{_datadir}/%{name}/share/config/images.zip +%{_datadir}/%{name}/share/config/images_galaxy.zip %files icon-theme-hicontrast %defattr(-,root,root) From 70508f10280b9463f80ed27e1cc3e85efa2ce03b2b3745ed5717d02017b936a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 22 Jul 2014 10:45:28 +0000 Subject: [PATCH 22/27] OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=173 --- libreoffice.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libreoffice.spec b/libreoffice.spec index 54acc90..a85b495 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -1305,6 +1305,8 @@ fi %dir %{_datadir}/%{name}/share %dir %{_datadir}/%{name}/share/config %{_datadir}/%{name}/share/config/images_galaxy.zip +# other is just images.zip which seems to be almost identical +%{_datadir}/%{name}/share/config/images.zip %files icon-theme-hicontrast %defattr(-,root,root) From 443f0aa28e9e690ebc94f4e92cd28cb99d24402059f0bfcfb17f016c7149b17e Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 22 Jul 2014 21:48:37 +0000 Subject: [PATCH 23/27] Accepting request 241933 from home:arnaudversini:branches:LibreOffice:Factory Use python 3 instead of python 2. OBS-URL: https://build.opensuse.org/request/show/241933 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=174 --- libreoffice.changes | 5 +++++ libreoffice.spec | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/libreoffice.changes b/libreoffice.changes index 51ff4b0..8f3ff29 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -10,6 +10,11 @@ Mon Jul 21 06:58:44 UTC 2014 - tchvatal@suse.com - Version bump to 4.3.0.3: * Various small bugfixes. +------------------------------------------------------------------- +Sun Jul 20 15:29:03 UTC 2014 - arnaud.versini@gmail.com + +- Use Python3 instead of Python 2 for pyuno. + ------------------------------------------------------------------- Fri Jul 11 08:26:26 UTC 2014 - tchvatal@suse.com diff --git a/libreoffice.spec b/libreoffice.spec index a85b495..457aaea 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -190,9 +190,9 @@ BuildRequires: perl-Archive-Zip BuildRequires: perl-Compress-Zlib BuildRequires: postgresql-devel BuildRequires: procps -BuildRequires: python-devel -BuildRequires: python-lxml -BuildRequires: python-xml +BuildRequires: python3-devel +BuildRequires: python3-lxml +BuildRequires: python3-xml BuildRequires: recode BuildRequires: rhino BuildRequires: sac @@ -910,11 +910,11 @@ CFLAGS="$ARCH_FLAGS" CXXFLAGS="$ARCH_FLAGS" export ARCH_FLAGS CFLAGS CXXFLAGS -# Whack in our python2 so we don't have to use internal one +# Whack in our python3 so we don't have to use internal one # which is quite nightmare. -export PYTHON=%{_bindir}/python2 -export PYTHON_CFLAGS=`pkg-config --cflags python2` -export PYTHON_LIBS=`pkg-config --libs python2` +export PYTHON=%{_bindir}/python3 +export PYTHON_CFLAGS=`pkg-config --cflags python3` +export PYTHON_LIBS=`pkg-config --libs python3` # do not run configure in autogen but use macro later export NOCONFIGURE=yes From 6fda0ef34d71196e35cf3d8a864393265f036d1893b255c73185f8a3dfca5a0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 23 Jul 2014 11:00:33 +0000 Subject: [PATCH 24/27] OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=175 --- libreoffice.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libreoffice.spec b/libreoffice.spec index 457aaea..5870ed6 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -1000,6 +1000,10 @@ make slowcheck %install make DESTDIR=%{buildroot} distro-pack-install +# FIXME: Hack add missing file +install -m755 instdir/program/libsaxlo.so %{buildroot}/%{_libdir}/%{name}/program/libsaxlo.so +echo "%{_libdir}/%{name}/program/libsaxlo.so" >>file-lists/common_list.txt + ################ # update desktop files builddir=`pwd` From b715a990ad70aeb7c7055999d739cf653b4516b7a639c1cc1ae35cdb89fdd2d7 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 24 Jul 2014 05:18:31 +0000 Subject: [PATCH 25/27] OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=176 --- libreoffice.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libreoffice.spec b/libreoffice.spec index 5870ed6..448433f 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -207,7 +207,7 @@ BuildRequires: xorg-x11 BuildRequires: xorg-x11-fonts BuildRequires: xz BuildRequires: zip -BuildRequires: pkgconfig(fbclient) +BuildRequires: pkgconfig(fbembed) Requires: libreoffice-branding >= 4.0 Requires: libreoffice-icon-themes = %{version} # We need at least english to launch ourselves. From 49e1ea7debc9391c4a0199e457d5f8e14d31fa6007bf25f3ca649ec1aa0298bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 24 Jul 2014 08:33:51 +0000 Subject: [PATCH 26/27] - Try to finish out the py3 migration. - Remove now not needed patch: * wizards-create-temlates-with-python-2.6.diff OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=177 --- libreoffice.changes | 7 +++ libreoffice.spec | 13 +++--- wizards-create-temlates-with-python-2.6.diff | 45 -------------------- 3 files changed, 13 insertions(+), 52 deletions(-) delete mode 100644 wizards-create-temlates-with-python-2.6.diff diff --git a/libreoffice.changes b/libreoffice.changes index 8f3ff29..504c738 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jul 24 08:33:07 UTC 2014 - tchvatal@suse.com + +- Try to finish out the py3 migration. +- Remove now not needed patch: + * wizards-create-temlates-with-python-2.6.diff + ------------------------------------------------------------------- Mon Jul 21 07:09:41 UTC 2014 - tchvatal@suse.com diff --git a/libreoffice.spec b/libreoffice.spec index 448433f..debc8ee 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -88,8 +88,6 @@ Patch12: mediawiki-no-broken-help.diff # LO never worked well with it Patch13: jvmfwk-disable-gcj.diff Patch14: libreoffice-4.3.0.3-themes-symlinks.patch -# Fix running wizards in py2 as the utf is not there -Patch16: wizards-create-temlates-with-python-2.6.diff # try to save space by using hardlinks Patch990: install-with-hardlinks.diff BuildRequires: ImageMagick @@ -212,6 +210,7 @@ Requires: libreoffice-branding >= 4.0 Requires: libreoffice-icon-themes = %{version} # We need at least english to launch ourselves. Requires: libreoffice-l10n-en = %{version} +Requires: python3 Requires(post): coreutils Requires(post): grep Requires(post): gtk2 @@ -1123,9 +1122,9 @@ for file in $files; do done # Symlink uno.py and unohelper.py so that python can find them -mkdir -p %{buildroot}%{python_sitelib} -ln -s %{_libdir}/libreoffice/program/uno.py %{buildroot}%{python_sitelib}/uno.py -ln -s %{_libdir}/libreoffice/program/unohelper.py %{buildroot}%{python_sitelib}/unohelper.py +mkdir -p %{buildroot}%{python3_sitelib} +ln -s %{_libdir}/libreoffice/program/uno.py %{buildroot}%{python3_sitelib}/uno.py +ln -s %{_libdir}/libreoffice/program/unohelper.py %{buildroot}%{python3_sitelib}/unohelper.py # Remove translations source as we need more space rm -rf translations/source/ @@ -1264,8 +1263,8 @@ fi %files -f file-lists/pyuno_list.txt pyuno %defattr(-,root,root) -%{python_sitelib}/uno.py -%{python_sitelib}/unohelper.py +%{python3_sitelib}/uno.py +%{python3_sitelib}/unohelper.py %files -f file-lists/gnome_list.txt gnome %defattr(-,root,root) diff --git a/wizards-create-temlates-with-python-2.6.diff b/wizards-create-temlates-with-python-2.6.diff deleted file mode 100644 index 5da2caa..0000000 --- a/wizards-create-temlates-with-python-2.6.diff +++ /dev/null @@ -1,45 +0,0 @@ -diff -urN libreoffice-4.2.0.1.old/wizards/com/sun/star/wizards/common/SystemDialog.py libreoffice-4.2.0.1/wizards/com/sun/star/wizards/common/SystemDialog.py ---- libreoffice-4.2.0.1.old/wizards/com/sun/star/wizards/common/SystemDialog.py 2013-12-30 11:24:14.200021127 +0100 -+++ libreoffice-4.2.0.1/wizards/com/sun/star/wizards/common/SystemDialog.py 2014-01-01 14:34:21.173943513 +0100 -@@ -15,6 +15,7 @@ - # except in compliance with the License. You may obtain a copy of - # the License at http://www.apache.org/licenses/LICENSE-2.0 . - # -+import locale - import traceback - from .Desktop import Desktop - -@@ -140,6 +141,24 @@ - traceback.print_exc() - - ''' -+ The original string is in the system encoding but str accepts only "ascii" in python 2.6 -+ This hack is not needed with python-3.0 -+ ''' -+ def createStr(self, sString): -+ try: -+ strString = str(sString) -+ -+ except: -+ try: -+ sCodeSet = locale.nl_langinfo(locale.CODESET) -+ except: -+ sCodeSet = "utf-8" -+ -+ strString = str(sString.encode(sCodeSet)) -+ -+ return strString -+ -+ ''' - note the result should go through conversion of the product name. - @param filterName - @return the UI localized name of the given filter name. -@@ -153,7 +172,7 @@ - xPropertyValue = list(oObject) - for i in xPropertyValue: - if i is not None and i.Name == "UIName": -- return str(i.Value).replace("%productname%", "LibreOffice") -+ return self.createStr(i.Value).replace("%productname%", "LibreOffice") - - raise NullPointerException( - "UIName property not found for Filter " + filterName); From ca7b479a56ef0ea73febc178020530a5dcfcfdf56ea700b9590eb5c5648073a5 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 24 Jul 2014 08:49:31 +0000 Subject: [PATCH 27/27] OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=178 --- libreoffice.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/libreoffice.spec b/libreoffice.spec index debc8ee..00e4d96 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -851,7 +851,6 @@ Provides additional %{langname} translations and resources for %{project}. \ %patch12 %patch13 -p1 %patch14 -p1 -%patch16 -p1 %patch990 -p1 # 256x256 icons tar -xjf %{SOURCE20}