configmgr/source/components.cxx | 8 configure.ac | 2 connectivity/source/commontools/DateConversion.cxx | 2 cui/uiconfig/ui/optappearancepage.ui | 3 dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 73 + dbaccess/source/core/api/preparedstatement.cxx | 7 dbaccess/source/core/inc/SingleSelectQueryComposer.hxx | 2 distro-configs/LibreOfficeFlatpak.conf | 1 drawinglayer/source/tools/emfphelperdata.cxx | 163 ++- drawinglayer/source/tools/emfphelperdata.hxx | 4 editeng/qa/unit/core-test.cxx | 2 editeng/source/editeng/impedit3.cxx | 11 editeng/source/rtf/svxrtf.cxx | 6 emfio/qa/cppunit/emf/EmfImportTest.cxx | 26 emfio/qa/cppunit/emf/data/TestDrawStringTransparent.emf |binary filter/source/config/fragments/types/generic_HTML.xcu | 3 framework/source/inc/loadenv/loadenv.hxx | 5 framework/source/loadenv/loadenv.cxx | 36 icon-themes/sifr/cmd/lc_defineprintarea.png |binary icon-themes/sifr_dark/cmd/lc_defineprintarea.png |binary icon-themes/sifr_svg/cmd/lc_defineprintarea.svg | 142 ++ include/svtools/svparser.hxx | 1 include/svx/sdr/animation/scheduler.hxx | 13 include/svx/sdr/overlay/overlaymanager.hxx | 2 include/vcl/gdimtf.hxx | 9 include/vcl/metaact.hxx | 6 lotuswordpro/inc/lwpbookmarkmgr.hxx | 4 lotuswordpro/qa/cppunit/data/fail/recurse-4.lwp |binary lotuswordpro/qa/cppunit/data/fail/registered-1.lwp |binary lotuswordpro/source/filter/lwpbookmarkmgr.cxx | 29 lotuswordpro/source/filter/lwpfrib.cxx | 2 lotuswordpro/source/filter/lwplayout.cxx | 5 lotuswordpro/source/filter/lwplayout.hxx | 14 lotuswordpro/source/filter/lwppagelayout.cxx | 4 oox/source/drawingml/chart/axisconverter.cxx | 7 oox/source/export/chartexport.cxx | 41 oox/source/ole/vbacontrol.cxx | 10 package/source/xstor/xstorage.cxx | 2 sax/source/fastparser/fastparser.cxx | 12 sc/qa/unit/data/functions/mathematical/fods/aggregate.fods | 40 sc/qa/unit/data/xls/fail/forcepoint-group-range-1.xls |binary sc/qa/unit/data/xls/pass/forcepoint-selfseriesadd.xls |binary sc/source/core/data/column3.cxx | 4 sc/source/core/tool/interpr6.cxx | 6 sc/source/filter/excel/xechart.cxx | 13 sc/source/filter/excel/xichart.cxx | 41 sc/source/filter/xml/xmlcelli.cxx | 2 sc/source/ui/view/overlayobject.cxx | 2 sd/qa/unit/data/odp/tdf116266.odp |binary sd/qa/unit/data/odp/tdf116266_chart.svg | 99 + sd/qa/unit/data/pptx/tdf84205.pptx |binary sd/qa/unit/export-tests-ooxml2.cxx | 14 sd/qa/unit/import-tests.cxx | 11 sd/source/filter/eppt/pptx-epptooxml.cxx | 8 sd/source/ui/animations/SlideTransitionPane.cxx | 8 sd/source/ui/dlg/PhotoAlbumDialog.cxx | 76 + solenv/bin/assemble-flatpak.sh | 35 solenv/bin/modules/installer/windows/file.pm | 8 solenv/flatpak-manifest.in | 35 svgio/source/svgreader/svganode.cxx | 2 svgio/source/svgreader/svggnode.cxx | 2 svtools/source/svrtf/parrtf.cxx | 8 svtools/source/svrtf/svparser.cxx | 5 svx/source/dialog/searchcharmap.cxx | 3 svx/source/sdr/animation/animationstate.cxx | 2 svx/source/sdr/animation/scheduler.cxx | 37 svx/source/sdr/overlay/overlayanimatedbitmapex.cxx | 2 svx/source/sdr/overlay/overlayrectangle.cxx | 2 sw/CppunitTest_sw_layoutwriter.mk | 72 + sw/Module_sw.mk | 1 sw/qa/core/data/odt/fail/forcepoint-dtor-1.odt |binary sw/qa/core/data/odt/fail/forcepoint-xstor-1.odt |binary sw/qa/extras/layout/data/tdf116830.odt |binary sw/qa/extras/layout/layout.cxx | 68 + sw/qa/extras/ooxmlexport/data/tdf116410.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 6 sw/qa/extras/ooxmlimport/data/tdf115719b.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 6 sw/qa/extras/uiwriter/data/flowframe_null_ptr_deref.sample | 654 +++++++++++++ sw/qa/extras/uiwriter/uiwriter.cxx | 51 + sw/source/core/doc/DocumentContentOperationsManager.cxx | 2 sw/source/core/frmedt/fews.cxx | 3 sw/source/core/layout/paintfrm.cxx | 4 sw/source/core/layout/sectfrm.cxx | 4 sw/source/core/tox/tox.cxx | 33 sw/source/filter/xml/xmlimp.cxx | 5 sw/source/filter/xml/xmltbli.cxx | 7 sw/source/ui/frmdlg/frmpage.cxx | 2 sw/source/ui/index/cnttab.cxx | 2 sw/source/uibase/uno/unodispatch.cxx | 15 sw/source/uibase/utlui/navipi.cxx | 3 vcl/qa/cppunit/graphicfilter/data/svm/fail/ofz7165-1.svm |binary vcl/source/gdi/gdimtf.cxx | 40 vcl/source/gdi/metaact.cxx | 4 vcl/source/window/window.cxx | 15 writerfilter/source/dmapper/PropertyMap.cxx | 4 xmloff/source/core/xmlmultiimagehelper.cxx | 7 xmloff/source/draw/ximpcustomshape.cxx | 2 98 files changed, 1866 insertions(+), 266 deletions(-)
New commits: commit e98e28f645fee0d3f7eea2056b2ed6af4f2e7b4f Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Thu Apr 5 18:04:25 2018 +0200 tdf#116830 sw: handle cell background for BACKGROUND_PARA_OVER_DRAWINGS Commit 18b3feb8bef06bf7b126fd0bc743e19479cb8026 (n#778133 sw: add BackgroundParaOverDrawings compat flag, 2012-09-12) added a layout compat flag that is meant to make Writer behave the same as Word when it comes to the order of various backgrounds. The original fix was that in case there are background shapes and also paragraph backgrounds, then this flag can opt in to have the paragraph backgrounds on top of background shapes. Cell backgrounds behave the same way in Word, so extend the behavior of the compat flag to cover not only the background of text frames but also of cell frames. (The test could be hacked into CppunitTest_sw_uiwriter, but 1) this is layout, not UI and 2) that one started to get rather large.) (cherry picked from commit 09954c381895f340c9b73af64b0833d8b4689c06) Change-Id: Ifca1851217000f6daac50e6c9562c042aca6ff7d Reviewed-on: https://gerrit.libreoffice.org/52668 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <michael.st...@cib.de> (cherry picked from commit c8357e261be6715dd6c23219778362126d4a9844) diff --git a/sw/CppunitTest_sw_layoutwriter.mk b/sw/CppunitTest_sw_layoutwriter.mk new file mode 100644 index 000000000000..675299180e44 --- /dev/null +++ b/sw/CppunitTest_sw_layoutwriter.mk @@ -0,0 +1,72 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +#************************************************************************* +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +#************************************************************************* + +$(eval $(call gb_CppunitTest_CppunitTest,sw_layoutwriter)) + +$(eval $(call gb_CppunitTest_add_exception_objects,sw_layoutwriter, \ + sw/qa/extras/layout/layout \ +)) + +# note: this links msword only for the reason to have a order dependency, +# because "make sw.check" will not see the dependency through services.rdb +$(eval $(call gb_CppunitTest_use_libraries,sw_layoutwriter, \ + comphelper \ + cppu \ + cppuhelper \ + editeng \ + msword \ + sal \ + sfx \ + svl \ + svt \ + svxcore \ + sw \ + test \ + unotest \ + vcl \ + tl \ + utl \ +)) + +$(eval $(call gb_CppunitTest_use_externals,sw_layoutwriter,\ + boost_headers \ + libxml2 \ +)) + +$(eval $(call gb_CppunitTest_set_include,sw_layoutwriter,\ + -I$(SRCDIR)/sw/inc \ + -I$(SRCDIR)/sw/source/core/inc \ + -I$(SRCDIR)/sw/qa/extras/inc \ + $$(INCLUDE) \ +)) + +$(eval $(call gb_CppunitTest_use_sdk_api,sw_layoutwriter)) + +$(eval $(call gb_CppunitTest_use_ure,sw_layoutwriter)) +$(eval $(call gb_CppunitTest_use_vcl,sw_layoutwriter)) + +$(eval $(call gb_CppunitTest_use_rdb,sw_layoutwriter,services)) + +$(eval $(call gb_CppunitTest_use_configuration,sw_layoutwriter)) + +$(eval $(call gb_CppunitTest_use_uiconfigs,sw_layoutwriter, \ + modules/swriter \ +)) + +$(call gb_CppunitTest_get_target,sw_layoutwriter): \ + $(call gb_Library_get_target,textconv_dict) + +ifneq ($(filter MORE_FONTS,$(BUILD_TYPE)),) +$(call gb_CppunitTest_get_target,sw_layoutwriter): \ + $(call gb_ExternalPackage_get_target,fonts_liberation) +endif + +# vim: set noet sw=4 ts=4: diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk index 91e04e86f3a1..cdc0b315b050 100644 --- a/sw/Module_sw.mk +++ b/sw/Module_sw.mk @@ -87,6 +87,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\ CppunitTest_sw_odfimport \ CppunitTest_sw_txtexport \ CppunitTest_sw_uiwriter \ + CppunitTest_sw_layoutwriter \ CppunitTest_sw_mailmerge \ CppunitTest_sw_globalfilter \ )) diff --git a/sw/qa/extras/layout/data/tdf116830.odt b/sw/qa/extras/layout/data/tdf116830.odt new file mode 100644 index 000000000000..8faacc3ddaec Binary files /dev/null and b/sw/qa/extras/layout/data/tdf116830.odt differ diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx new file mode 100644 index 000000000000..16efa14c5875 --- /dev/null +++ b/sw/qa/extras/layout/layout.cxx @@ -0,0 +1,68 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <swmodeltestbase.hxx> +#include <test/mtfxmldump.hxx> + +static char const DATA_DIRECTORY[] = "/sw/qa/extras/layout/data/"; + +/// Test to assert layout / rendering result of Writer. +class SwLayoutWriter : public SwModelTestBase +{ +public: + void testTdf116830(); + + CPPUNIT_TEST_SUITE(SwLayoutWriter); + CPPUNIT_TEST(testTdf116830); + CPPUNIT_TEST_SUITE_END(); + +private: + SwDoc* createDoc(const char* pName = nullptr); +}; + +SwDoc* SwLayoutWriter::createDoc(const char* pName) +{ + load(DATA_DIRECTORY, pName); + + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + return pTextDoc->GetDocShell()->GetDoc(); +} + +void SwLayoutWriter::testTdf116830() +{ + SwDoc* pDoc = createDoc("tdf116830.odt"); + SwDocShell* pShell = pDoc->GetDocShell(); + + // Dump the rendering of the first page as an XML file. + std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile(); + MetafileXmlDump dumper; + xmlDocPtr pXmlDoc = dumper.dumpAndParse(*xMetaFile); + CPPUNIT_ASSERT(pXmlDoc); + + // Assert that the yellow rectangle (cell background) is painted after the + // polypolygon (background shape). + // Background shape: 1.1.1.2 + // Cell background: 1.1.1.3 + assertXPath( + pXmlDoc, + "/metafile/push[1]/push[1]/push[1]/push[2]/push[1]/push[1]/fillcolor[@color='#729fcf']", 1); + assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[2]/push[1]/push[1]/polypolygon", + 1); + + // This failed: cell background was painted before the background shape. + assertXPath(pXmlDoc, + "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/fillcolor[@color='#ffff00']", 1); + assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/rect", 1); +} + +CPPUNIT_TEST_SUITE_REGISTRATION(SwLayoutWriter); +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 9ace67161ffc..80d12a53f873 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -6412,7 +6412,9 @@ void SwFrame::PaintBackground( const SwRect &rRect, const SwPageFrame *pPage, if( IsTextFrame() || IsSctFrame() ) aPaintRect = UnionFrame( true ); - if ( (!bOnlyTextBackground || IsTextFrame()) && aPaintRect.IsOver( rRect ) ) + // bOnlyTextBackground means background that's on top of background shapes, + // this includes both text and cell frames. + if ( (!bOnlyTextBackground || IsTextFrame() || IsCellFrame()) && aPaintRect.IsOver( rRect ) ) { if ( bBack || bPageFrame || !bLowerMode ) { commit c2b387d98c2895ab3865ca39a2ad0541220ab451 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Tue Apr 10 08:57:09 2018 +0200 tdf#116555 filter: make sure default extension for HTML is not .xhtml Since by default we don't write XHTML markup in the sw HTML export. (cherry picked from commit 87e7fd163bc587b5c7cbb59ba40a9856f8bb225d) Change-Id: Ifbf9850652d7838582725be391b2fd1a062495e5 Reviewed-on: https://gerrit.libreoffice.org/52709 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <michael.st...@cib.de> (cherry picked from commit a3925ee114d551567a106161d9e747318ab60c6f) diff --git a/filter/source/config/fragments/types/generic_HTML.xcu b/filter/source/config/fragments/types/generic_HTML.xcu index b29ba333aded..92ac87ffbf3e 100644 --- a/filter/source/config/fragments/types/generic_HTML.xcu +++ b/filter/source/config/fragments/types/generic_HTML.xcu @@ -18,7 +18,8 @@ <node oor:name="generic_HTML" oor:op="replace" > <prop oor:name="DetectService"><value>com.sun.star.comp.filters.PlainTextFilterDetect</value></prop> <prop oor:name="URLPattern"><value>private:factory/swriter/web*</value></prop> - <prop oor:name="Extensions"><value>html htm xhtml</value></prop> + <!-- the last extension is used when the code wants to know the extension of this type --> + <prop oor:name="Extensions"><value>html xhtml htm</value></prop> <prop oor:name="MediaType"><value>text/html</value></prop> <prop oor:name="Preferred"><value>false</value></prop> <prop oor:name="PreferredFilter"><value>HTML</value></prop> commit 124d6a73850d4a6f90774ca48aea40f040c1832b Author: Julien Nabet <serval2...@yahoo.fr> Date: Tue Apr 10 07:30:38 2018 +0200 tdf#116890: make unique column names in prepared statement ...like we do resultset. Thanks to Lionel for this solution Reviewed-on: https://gerrit.libreoffice.org/52662 (cherry picked from commit dc823f5fa4a5d2eca56297b9045e5962536c00f9) Change-Id: I44f307cd6bddf76716d7c73b8783070abe43bdf3 Reviewed-on: https://gerrit.libreoffice.org/52698 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Lionel Elie Mamane <lio...@mamane.lu> (cherry picked from commit 0d78d17249a58d95b4aa2e8fe09f08e22f20c407) diff --git a/dbaccess/source/core/api/preparedstatement.cxx b/dbaccess/source/core/api/preparedstatement.cxx index 74a8edbf1cd8..3eeb339a5a4c 100644 --- a/dbaccess/source/core/api/preparedstatement.cxx +++ b/dbaccess/source/core/api/preparedstatement.cxx @@ -26,6 +26,7 @@ #include <comphelper/property.hxx> #include <comphelper/sequence.hxx> +#include <connectivity/dbtools.hxx> #include <cppuhelper/supportsservice.hxx> #include <cppuhelper/queryinterface.hxx> #include <cppuhelper/typeprovider.hxx> @@ -160,6 +161,12 @@ Reference< css::container::XNameAccess > OPreparedStatement::getColumns() // retrieve the name of the column OUString aName = xMetaData->getColumnName(i + 1); OResultColumn* pColumn = new OResultColumn(xMetaData, i + 1, xDBMeta); + // don't silently assume that the name is unique - preparedStatement implementations + // are allowed to return duplicate names, but we are required to have + // unique column names + if ( m_pColumns->hasByName( aName ) ) + aName = ::dbtools::createUniqueName( m_pColumns, aName ); + m_pColumns->append(aName, pColumn); } } commit d2bb956830cbe3f95de821affb81b3f3a36949db Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Sun Apr 8 08:14:52 2018 +0200 tdf#116772 adapt handling of LIKE conditions to cleaned up StructuredFilter Change-Id: Ifc60da9a95833ee7820a0e03354fa1a8c006e136 Reviewed-on: https://gerrit.libreoffice.org/52576 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> (cherry picked from commit 060e43da66c759de2c4799131e13c5156f01d492) diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 61859ffd1cca..17d4bd6806ee 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -1015,8 +1015,11 @@ bool OSingleSelectQueryComposer::setANDCriteria( OSQLParseNode const * pConditio { return setComparsionPredicate(pCondition,_rIterator,rFilter,xFormatter); } - else if (SQL_ISRULE(pCondition,like_predicate) || - SQL_ISRULE(pCondition,test_for_null) || + else if (SQL_ISRULE(pCondition,like_predicate)) + { + return setLikePredicate(pCondition,_rIterator,rFilter,xFormatter); + } + else if (SQL_ISRULE(pCondition,test_for_null) || SQL_ISRULE(pCondition,in_predicate) || SQL_ISRULE(pCondition,all_or_any_predicate) || SQL_ISRULE(pCondition,between_predicate)) @@ -1111,6 +1114,72 @@ sal_Int32 OSingleSelectQueryComposer::getPredicateType(OSQLParseNode const * _pP return nPredicate; } +bool OSingleSelectQueryComposer::setLikePredicate(OSQLParseNode const * pCondition, OSQLParseTreeIterator const & _rIterator, + std::vector < PropertyValue >& rFilter, const Reference< css::util::XNumberFormatter > & xFormatter) const +{ + OSL_ENSURE(SQL_ISRULE(pCondition, like_predicate),"setLikePredicate: pCondition is not a LikePredicate"); + + assert(pCondition->count() == 2); + OSQLParseNode const *pRowValue = pCondition->getChild(0); + OSQLParseNode const *pPart2 = pCondition->getChild(1); + + PropertyValue aItem; + if ( SQL_ISTOKEN(pPart2->getChild(0),NOT) ) + aItem.Handle = SQLFilterOperator::NOT_LIKE; + else + aItem.Handle = SQLFilterOperator::LIKE; + + if (SQL_ISRULE(pRowValue, column_ref)) + { + OUString aValue; + + // skip (optional "NOT") and "LIKE" + for (size_t i=2; i < pPart2->count(); i++) + { + pPart2->getChild(i)->parseNodeToPredicateStr( + aValue, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>(m_sDecimalSep.toChar() ) ); + } + + aItem.Name = getColumnName(pRowValue,_rIterator); + aItem.Value <<= aValue; + rFilter.push_back(aItem); + } + else if (SQL_ISRULE(pRowValue, set_fct_spec ) || + SQL_ISRULE(pRowValue, general_set_fct)) + { + OUString aValue; + OUString aColumnName; + + pPart2->getChild(2)->parseNodeToPredicateStr(aValue, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) ); + pPart2->getChild(3)->parseNodeToPredicateStr(aValue, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) ); + pRowValue->parseNodeToPredicateStr( aColumnName, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep .toChar() ) ); + + aItem.Name = getColumnName(pRowValue,_rIterator); + aItem.Value <<= aValue; + rFilter.push_back(aItem); + } + else // Can only be an expression + { + OUString aName, aValue; + + OSQLParseNode const *pValue = pPart2->getChild(2); + + // Field names + for (size_t i=0;i< pRowValue->count();i++) + pRowValue->getChild(i)->parseNodeToPredicateStr( aName, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) ); + + // Criterion + for(size_t i=0;i< pValue->count();i++) + pValue->getChild(i)->parseNodeToPredicateStr(aValue, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) ); + pPart2->getChild(3)->parseNodeToPredicateStr(aValue, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) ); + + aItem.Name = aName; + aItem.Value <<= aValue; + rFilter.push_back(aItem); + } + return true; +} + bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode const * pCondition, OSQLParseTreeIterator const & _rIterator, std::vector < PropertyValue >& rFilter, const Reference< css::util::XNumberFormatter > & xFormatter) const { diff --git a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx index ef1d2df8903d..3ebd555b11d7 100644 --- a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx +++ b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx @@ -112,6 +112,8 @@ namespace dbaccess std::vector< std::vector < css::beans::PropertyValue > >& rFilters, const css::uno::Reference< css::util::XNumberFormatter > & xFormatter) const; bool setANDCriteria(::connectivity::OSQLParseNode const * pCondition, ::connectivity::OSQLParseTreeIterator& _rIterator, std::vector < css::beans::PropertyValue > & rFilters, const css::uno::Reference< css::util::XNumberFormatter > & xFormatter) const; + bool setLikePredicate(::connectivity::OSQLParseNode const * pCondition, ::connectivity::OSQLParseTreeIterator const & _rIterator, + std::vector < css::beans::PropertyValue > & rFilters, const css::uno::Reference< css::util::XNumberFormatter > & xFormatter) const; bool setComparsionPredicate(::connectivity::OSQLParseNode const * pCondition, ::connectivity::OSQLParseTreeIterator const & _rIterator, std::vector < css::beans::PropertyValue > & rFilters, const css::uno::Reference< css::util::XNumberFormatter > & xFormatter) const; commit 46dbe801ddcbe74bc58dd8030274ef200d2ca53a Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Sun Apr 8 08:26:55 2018 +0200 SQL string quoting: escape "'" character also at beginning of string Change-Id: I51db43c1a3b6d3c93a04a3419238ea286cab987e Reviewed-on: https://gerrit.libreoffice.org/52577 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> (cherry picked from commit 1ddb065adcd0c2f5666e86bdf841d818ab7a215e) diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx index 39acab5c1092..765937fe39c0 100644 --- a/connectivity/source/commontools/DateConversion.cxx +++ b/connectivity/source/commontools/DateConversion.cxx @@ -80,7 +80,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, { OUString aTemp; _rxTypeConverter->convertToSimpleType(_rVal, TypeClass_STRING) >>= aTemp; - sal_Int32 nIndex = (sal_Int32)-1; + sal_Int32 nIndex = (sal_Int32)-2; const OUString sQuot("\'"); do { commit 6b7c32ea74f7e0e8aebd0aa51b990c79bd83cb12 Author: Szymon Kłos <szymon.k...@collabora.com> Date: Fri Mar 23 19:51:37 2018 +0100 tdf#116536 Fix bullet position with linespacing > 100 Change-Id: I862246d9c69e754bdd883787fe42c7d61a1a53d3 Reviewed-on: https://gerrit.libreoffice.org/51790 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> (cherry picked from commit 596fd41b9b19e28bab0c84e3821f79cb5d468f24) Reviewed-on: https://gerrit.libreoffice.org/52148 Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> (cherry picked from commit e3bcaf133db6c78b0a7baeada6f7692a12e07cb2) diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx index a54434a59635..6e27de1fd649 100644 --- a/editeng/qa/unit/core-test.cxx +++ b/editeng/qa/unit/core-test.cxx @@ -223,7 +223,7 @@ void Test::testLineSpacing() // Check the first line ParagraphInfos aInfo2 = aEditEngine.GetParagraphInfos(0); - CPPUNIT_ASSERT_EQUAL(sal_uInt16(311), aInfo2.nFirstLineMaxAscent); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(337), aInfo2.nFirstLineMaxAscent); CPPUNIT_ASSERT_EQUAL(sal_uInt16(382), static_cast<sal_uInt16>(aEditEngine.GetLineHeight(0))); } diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 011525fbab94..c7557a47375e 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -1460,14 +1460,11 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) else if ( rLSItem.GetPropLineSpace() && ( rLSItem.GetPropLineSpace() != 100 ) ) { sal_uInt16 nTxtHeight = pLine->GetHeight(); - sal_Int32 nTxtHeightProp = nTxtHeight * rLSItem.GetPropLineSpace() / 100; - sal_Int32 nHeightProp = pLine->GetHeight() * rLSItem.GetPropLineSpace() / 100; + sal_Int32 nPropTextHeight = nTxtHeight * rLSItem.GetPropLineSpace() / 100; // The Ascent has to be adjusted for the difference: - long nDiff = ( pLine->GetHeight() - nTxtHeightProp ) * 4 / 5; - if ( nDiff > pLine->GetMaxAscent() ) - nDiff = pLine->GetMaxAscent() * 4 / 5; - pLine->SetMaxAscent( static_cast<sal_uInt16>( pLine->GetMaxAscent() - nDiff ) ); // 80% - pLine->SetHeight( static_cast<sal_uInt16>( nHeightProp ), nTxtHeightProp ); + long nDiff = pLine->GetHeight() - nPropTextHeight; + pLine->SetMaxAscent( static_cast<sal_uInt16>( pLine->GetMaxAscent() - nDiff ) ); + pLine->SetHeight( static_cast<sal_uInt16>( nPropTextHeight ), nTxtHeight ); } } } commit 1c7ff7be4595d488325f3228e425780901971956 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Mon Mar 26 21:52:05 2018 +0200 tdf#116410 DOCX import: restrict increased object spacing to multiple shapes This anchored object handling is just there to be bug-compatible with Word, it's not needed for the case when there is a single shape in the paragraph. (cherry picked from commit 2c4d84e93901571ead79c85aa3894ef4e10bf5af) Also: Related: tdf#115719 DOCX import: fix ignore of increased anchored obj spacing If there is only a single anchored object, then ignore only the current paragraph, not all paragraphs of the section. (cherry picked from commit 599ff05300599d4e4ce818092f18e76e738b921e) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport11.cxx Change-Id: I5e3dc4ba9a4a6f459ec6217e8974ebc2d7303bcc Reviewed-on: https://gerrit.libreoffice.org/52022 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit da01b17379fcb3cb89eddf718c922d1676aa482a) diff --git a/sw/qa/extras/ooxmlexport/data/tdf116410.docx b/sw/qa/extras/ooxmlexport/data/tdf116410.docx new file mode 100644 index 000000000000..5352a233ed70 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf116410.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index 7ce8b025bd5a..44d30d687e94 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -134,6 +134,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf115719, "tdf115719.docx") CPPUNIT_ASSERT_EQUAL(2, getPages()); } +DECLARE_OOXMLEXPORT_TEST(testTdf116410, "tdf116410.docx") +{ + // Opposite of the above, was 2 pages, should be 1 page. + CPPUNIT_ASSERT_EQUAL(1, getPages()); +} + DECLARE_OOXMLEXPORT_TEST(testTdf113183, "tdf113183.docx") { // This was 2096, the horizontal positioning of the star shape affected the diff --git a/sw/qa/extras/ooxmlimport/data/tdf115719b.docx b/sw/qa/extras/ooxmlimport/data/tdf115719b.docx new file mode 100644 index 000000000000..551b9871fe60 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf115719b.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index e3cdc19701ab..3af5a063c002 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -276,6 +276,12 @@ xray ThisComponent.StyleFamilies.PageStyles.Default.Width CPPUNIT_ASSERT( pos.X > width / 2 ); } +DECLARE_OOXMLIMPORT_TEST(testTdf115719b, "tdf115719b.docx") +{ + // This was 0, 4th (last) paragraph had no increased spacing. + CPPUNIT_ASSERT(getProperty<sal_Int32>(getParagraph(4), "ParaTopMargin") > 0); +} + DECLARE_OOXMLIMPORT_TEST(testN766477, "n766477.docx") { /* diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index 708b80a55c4f..af4133a7625e 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -1148,6 +1148,10 @@ void SectionPropertyMap::HandleIncreasedAnchoredObjectSpacing(DomainMapper_Impl& std::vector<AnchoredObjectInfo>& rAnchoredObjectAnchors = rDM_Impl.m_aAnchoredObjectAnchors; for (auto& rAnchor : rAnchoredObjectAnchors) { + // Ignore this paragraph when there is a single shape only. + if (rAnchor.m_aAnchoredObjects.size() < 2) + continue; + // Analyze the anchored objects of this paragraph, now that we know the // page width. sal_Int32 nShapesWidth = 0; commit e8e170fdab0a4c6aa377228d0e3af2332dba29f9 Author: Julien Nabet <serval2...@yahoo.fr> Date: Thu Apr 5 21:45:20 2018 +0200 tdf#115407: preselect sound file saved To display the sound in the dropbox, the complete filename (eg: file:///home/julien/lo/libreoffice/instdir/share/gallery/sounds/pluck.wav) was compared with items of the sound list formed like this: file:///home/julien/lo/libreoffice/instdir/program/../share/gallery/sounds/pluck.wav See https://bugs.documentfoundation.org/show_bug.cgi?id=115407#c1 Since listbox displays only basename, let's just compare basenames Change-Id: I5fb49990322423fa7818e5d6e1cafd828e3500ec Reviewed-on: https://gerrit.libreoffice.org/52476 (cherry picked from commit 23c82e1a377ea6fce65d71277ec59b3ca150b98a) Reviewed-on: https://gerrit.libreoffice.org/52489 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit 1576908dd0b5b275f90b50c0794559547aa0a25e) diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx index fc01f7b7547e..5ca0ea8227c9 100644 --- a/sd/source/ui/animations/SlideTransitionPane.cxx +++ b/sd/source/ui/animations/SlideTransitionPane.cxx @@ -269,10 +269,11 @@ struct lcl_EqualsSoundFileName { // note: formerly this was a case insensitive search for all // platforms. It seems more sensible to do this platform-dependent + INetURLObject aURL(rStr); #if defined(_WIN32) - return maStr.equalsIgnoreAsciiCase( rStr ); + return maStr.equalsIgnoreAsciiCase( aURL.GetBase() ); #else - return maStr == rStr; + return maStr == aURL.GetBase(); #endif } @@ -285,9 +286,10 @@ bool lcl_findSoundInList( const ::std::vector< OUString > & rSoundList, const OUString & rFileName, ::std::vector< OUString >::size_type & rOutPosition ) { + INetURLObject aURL(rFileName); ::std::vector< OUString >::const_iterator aIt = ::std::find_if( rSoundList.begin(), rSoundList.end(), - lcl_EqualsSoundFileName( rFileName )); + lcl_EqualsSoundFileName( aURL.GetBase())); if( aIt != rSoundList.end()) { rOutPosition = ::std::distance( rSoundList.begin(), aIt ); commit c2ff2cbfd329b23584bacbde85264dca3d4816a3 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Apr 9 14:41:47 2018 +0200 Merge in Flatpak improvements ...from <https://github.com/flathub/org.libreoffice.LibreOffice/>: commit 7a2393f5fcab8c6938180c4718f2c61acd495528 Author: Robert McQueen <r...@endlessm.com> Date: Tue Apr 3 10:41:22 2018 +0100 port to freedesktop.org 1.6 runtime Gtk+3/GIO/etc dependencies used by LO in "GNOME" mode are actually included in the freedesktop.org runtime. Try to build against fd.o by downgrading gst-libav (fd.o has gst 1.10 rather than gnome's 1.12), bundling dbus-glib and disable Gtk+ 2. commit 42650da01f270e86bfb40035a9194b23ccf24c4c Author: Robert McQueen <r...@endlessm.com> Date: Tue Apr 3 11:23:27 2018 +0100 fix up LD_LIBRARY_PATH with gcc7 Append to library path rather than resetting it (causes build failures due to overriding /app/lib). commit 3e4c655294c8124cb54e1c651ec4dc1230b8151e Author: Robert McQueen <r...@endlessm.com> Date: Tue Apr 3 11:25:02 2018 +0100 fixup solenv/bin/assemble_flatpak.sh Use mkdir -p to be robust to other modules (ie dbus-glib) creating some of the paths before we do. commit d1d449ffa837b1de876f524494dbce09ec92ce73 Author: Robert McQueen <r...@endlessm.com> Date: Wed Apr 4 15:50:49 2018 +0100 split resource/registry data into Locales extension Move the language-specific data into the /app/share/runtime path which flatpak-builder splits into the Locale extension if we re-enable separate-locales. We symlink the original locations back to these paths, which means we have dangling symlinks depending on which Locale sutpaths are installed. Include Stephan Bergmann's patch from https://gerrit.libreoffice.org/#/c/52381/ to make the configmgr robust to such dangling links. commit ad6674f166c68fb79e19d80950a104a0a33f81dc Author: Robert McQueen <r...@endlessm.com> Date: Wed Apr 4 16:05:28 2018 +0100 make locale split glob more specific This loop will fail if the share/registry/res folder gains any .xcd files which are not named fcfg_langpack_* or registry_* so just to be safe, only glob these files. Change-Id: Icd41d7077b9f308dbb196927715b210328709662 Reviewed-on: https://gerrit.libreoffice.org/52642 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Stephan Bergmann <sberg...@redhat.com> (cherry picked from commit 727bfa2c87db170483c1e4ae895174295b070c77) Reviewed-on: https://gerrit.libreoffice.org/52653 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit 14d68eedb534d55cf2df60de38822c9b1678f9d7) diff --git a/distro-configs/LibreOfficeFlatpak.conf b/distro-configs/LibreOfficeFlatpak.conf index 60312c31c8f5..1f3e865eba14 100644 --- a/distro-configs/LibreOfficeFlatpak.conf +++ b/distro-configs/LibreOfficeFlatpak.conf @@ -1,3 +1,4 @@ +--disable-gtk --disable-odk --enable-release-build --enable-symbols diff --git a/solenv/bin/assemble-flatpak.sh b/solenv/bin/assemble-flatpak.sh index 67cf47bad33d..b0f718a5091f 100755 --- a/solenv/bin/assemble-flatpak.sh +++ b/solenv/bin/assemble-flatpak.sh @@ -16,8 +16,7 @@ set -e cp -r "${PREFIXDIR?}"/lib/libreoffice /app/ ## libreoffice-*.desktop -> org.libreoffice.LibreOffice-*.desktop: -mkdir /app/share -mkdir /app/share/applications +mkdir -p /app/share/applications for i in "${PREFIXDIR?}"/share/applications/libreoffice-*.desktop do sed -e 's,^Exec=libreoffice,Exec=/app/libreoffice/program/soffice,' \ @@ -29,7 +28,7 @@ mv /app/share/applications/org.libreoffice.LibreOffice-startcenter.desktop \ ## icons/hicolor/*/apps/libreoffice-* -> ## icons/hicolor/*/apps/org.libreoffice.LibreOffice-*: -mkdir /app/share/icons +mkdir -p /app/share/icons for i in "${PREFIXDIR?}"/share/icons/hicolor/*/apps/libreoffice-* do mkdir -p \ @@ -38,11 +37,39 @@ do "$(dirname /app/share/icons/hicolor/"${i#"${PREFIXDIR?}"/share/icons/hicolor/}")"/org.libreoffice.LibreOffice-"${i##*/apps/libreoffice-}" done +mkdir -p /app/share/runtime/locale +for i in $(ls /app/libreoffice/program/resource) +do + lang="${i%[_@]*}" + mkdir -p /app/share/runtime/locale/"${lang}"/resource + mv /app/libreoffice/program/resource/"${i}" /app/share/runtime/locale/"${lang}"/resource + ln -s ../../../share/runtime/locale/"${lang}"/resource/"${i}" /app/libreoffice/program/resource +done + +for i in /app/libreoffice/share/registry/Langpack-*.xcd /app/libreoffice/share/registry/res/{fcfg_langpack,registry}_*.xcd +do + basename="$(basename "${i}" .xcd)" + lang="${basename#Langpack-}" + lang="${lang#fcfg_langpack_}" + lang="${lang#registry_}" + + # ship the base app with at least one Langpack/fcfg_langpack + if [ "${lang}" = "en-US" ] + then + continue + fi + + lang="${lang%-*}" + mkdir -p /app/share/runtime/locale/"${lang}"/registry + mv "${i}" /app/share/runtime/locale/"${lang}"/registry + ln -rs /app/share/runtime/locale/"${lang}"/registry/"${basename}".xcd "${i}" +done + ## org.libreoffice.LibreOffice.appdata.xml is manually derived from the various ## inst/share/appdata/libreoffice-*.appdata.xml (at least recent GNOME Software ## doesn't show more than five screenshots anyway, so restrict to one each from ## the five libreoffice-*.appdata.xml: Writer, Calc, Impress, Draw, Base): -mkdir /app/share/appdata +mkdir -p /app/share/appdata cat <<EOF >/app/share/appdata/org.libreoffice.LibreOffice.appdata.xml <?xml version="1.0" encoding="UTF-8"?> <component type="desktop"> diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in index 99936a700749..679ffa773872 100644 --- a/solenv/flatpak-manifest.in +++ b/solenv/flatpak-manifest.in @@ -1,21 +1,20 @@ { "id": "org.libreoffice.LibreOffice", - "runtime": "org.gnome.Platform", - "runtime-version": "3.26", - "sdk": "org.gnome.Sdk", + "runtime": "org.freedesktop.Platform", + "runtime-version": "1.6", + "sdk": "org.freedesktop.Sdk", "sdk-extensions": [ "org.freedesktop.Sdk.Extension.gcc7", "org.freedesktop.Sdk.Extension.openjdk9" ], "build-options": { + "append-ld-library-path": "/usr/lib/sdk/gcc7/lib", "env": { "CC": "/usr/lib/sdk/gcc7/bin/gcc", - "CXX": "/usr/lib/sdk/gcc7/bin/g++", - "LD_LIBRARY_PATH": "/usr/lib/sdk/gcc7/lib" + "CXX": "/usr/lib/sdk/gcc7/bin/g++" } }, "command": "/app/libreoffice/program/soffice", - "separate-locales": false, "modules": [ { "name": "gcc7", @@ -34,14 +33,28 @@ }, { "name": "gst-libav", - "buildsystem": "meson", - "builddir": true, - "config-opts": ["-Ddisable_gtkdoc=true"], + "config-opts": [ "--disable-gtk-doc", "--with-system-libav" ], + "cleanup": [ "*.la", "/share/gtk-doc" ], + "sources": [ + { + "type" : "archive", + "url" : "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.10.5.tar.xz", + "sha256" : "e4d2f315f478d47281fbfdfbd590a63d23704ca37911d7142d5992616f4b28d3" + } + ] + }, + { + "name": "dbus-glib", + "cleanup": [ "*.la", "/bin", "/etc", "/include", "/libexec", "/share/gtk-doc", "/share/man" ], + "config-opts": [ + "--disable-static", + "--disable-gtk-doc" + ], "sources": [ { "type": "archive", - "url": "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.12.4.tar.xz", - "sha256": "2a56aa5d2d8cd912f2bce17f174713d2c417ca298f1f9c28ee66d4aa1e1d9e62" + "url": "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.108.tar.gz", + "sha256": "9f340c7e2352e9cdf113893ca77ca9075d9f8d5e81476bf2bf361099383c602c" } ] }, commit d0349c2e0248b87fcc8d8db8466b14902cf6b644 Author: Caolán McNamara <caol...@redhat.com> Date: Sat Apr 7 20:24:40 2018 +0100 forcepoint#37 revert tdf#108572 let remove storage element reverts commit 26957fc325c27cf61e8ef5555b380d627def4931 Date: Wed Sep 6 10:54:50 2017 +0200 tdf#108572 let remove storage element void OStorage_Impl::RemoveElement( SotElement_Impl* pElement ) expects that m_pAntiImpl will be nullptr, if not throws an exception. This caused that in case of deleting embedded database used for mail merge it wasn't fully removed and The problem is that by allowing the removal of the element, existing readonly accessors are left pointing to the deleted element which causes quite some problems as seen in this sample document Change-Id: Ie6ac36e6dea771b02637d77b78eb8026e3bb7ae8 Reviewed-on: https://gerrit.libreoffice.org/52600 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <michael.st...@cib.de> (cherry picked from commit 8182037871daf1d94f4beff63afeb56b20055480) diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 5c494a586197..48bc0d6aeb04 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -2813,8 +2813,6 @@ void SAL_CALL OStorage::removeElement( const OUString& aElementName ) if ( !pElement ) throw container::NoSuchElementException( THROW_WHERE ); //??? - if ( pElement->m_xStorage ) - pElement->m_xStorage->m_pAntiImpl = nullptr; m_pImpl->RemoveElement( pElement ); m_pImpl->m_bIsModified = true; diff --git a/sw/qa/core/data/odt/fail/forcepoint-xstor-1.odt b/sw/qa/core/data/odt/fail/forcepoint-xstor-1.odt new file mode 100755 index 000000000000..1844d7882ba9 Binary files /dev/null and b/sw/qa/core/data/odt/fail/forcepoint-xstor-1.odt differ commit 06fc11cc7ccb2eb93811419113ad30097bfa1730 Author: Caolán McNamara <caol...@redhat.com> Date: Sun Mar 25 14:01:25 2018 +0100 ofz#7109 infinite regress Change-Id: Iac0bd81c9b0e3ac6b005bb0065895ca1b4ca4233 Reviewed-on: https://gerrit.libreoffice.org/51827 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <michael.st...@cib.de> (cherry picked from commit d7608726fbdc42749c35a3a49d094cd0c5c3476d) diff --git a/lotuswordpro/qa/cppunit/data/fail/recurse-4.lwp b/lotuswordpro/qa/cppunit/data/fail/recurse-4.lwp new file mode 100644 index 000000000000..f48c5bb718a4 Binary files /dev/null and b/lotuswordpro/qa/cppunit/data/fail/recurse-4.lwp differ diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx index 7fd1060afaf2..7a1dddda5954 100644 --- a/lotuswordpro/source/filter/lwplayout.cxx +++ b/lotuswordpro/source/filter/lwplayout.cxx @@ -79,6 +79,7 @@ LwpVirtualLayout::LwpVirtualLayout(LwpObjectHeader const &objHdr, LwpSvStream* p , m_bGettingMarginsSameAsParent(false) , m_bGettingHasProtection(false) , m_bGettingIsProtected(false) + , m_bGettingIsAutoGrowDown(false) , m_bGettingMarginsValue(false) , m_bGettingExtMarginsValue(false) , m_bGettingUsePrinterSettings(false) @@ -399,7 +400,7 @@ LwpVirtualLayout* LwpVirtualLayout::FindChildByType(LWP_LAYOUT_TYPE eType) */ bool LwpVirtualLayout::IsFitGraphic() { - return IsAutoGrowRight() && !IsAutoGrowLeft() && IsAutoGrowDown(); + return IsAutoGrowRight() && !IsAutoGrowLeft() && GetIsAutoGrowDown(); } /** @@ -1164,7 +1165,7 @@ bool LwpMiddleLayout::IsAutoGrowDown() rtl::Reference<LwpObject> xBase(GetBasedOnStyle()); if (LwpMiddleLayout* pLay = dynamic_cast<LwpMiddleLayout*>(xBase.get())) { - return pLay->IsAutoGrowDown(); + return pLay->GetIsAutoGrowDown(); } } return LwpVirtualLayout::IsAutoGrowDown(); diff --git a/lotuswordpro/source/filter/lwplayout.hxx b/lotuswordpro/source/filter/lwplayout.hxx index aba59615360b..560822c858c6 100644 --- a/lotuswordpro/source/filter/lwplayout.hxx +++ b/lotuswordpro/source/filter/lwplayout.hxx @@ -103,7 +103,6 @@ public: virtual double GetColGap(sal_uInt16 nIndex); virtual bool IsAutoGrow(){ return false;} virtual bool IsAutoGrowUp(){ return false;} - virtual bool IsAutoGrowDown(){ return false;} virtual bool IsAutoGrowLeft(){ return false;} virtual bool IsAutoGrowRight(){ return false;} bool IsFitGraphic(); @@ -137,6 +136,15 @@ public: m_bGettingIsProtected = false; return bRet; } + bool GetIsAutoGrowDown() + { + if (m_bGettingIsAutoGrowDown) + throw std::runtime_error("recursion in layout"); + m_bGettingIsAutoGrowDown = true; + bool bRet = IsAutoGrowDown(); + m_bGettingIsAutoGrowDown = false; + return bRet; + } bool GetHasProtection() { if (m_bGettingHasProtection) @@ -216,6 +224,7 @@ protected: bool HasProtection(); virtual bool HonorProtection(); virtual bool IsProtected(); + virtual bool IsAutoGrowDown(){ return false;} virtual double MarginsValue(sal_uInt8 /*nWhichSide*/){return 0;} virtual double ExtMarginsValue(sal_uInt8 /*nWhichSide*/){return 0;} virtual bool MarginsSameAsParent(); @@ -224,6 +233,7 @@ protected: bool m_bGettingMarginsSameAsParent; bool m_bGettingHasProtection; bool m_bGettingIsProtected; + bool m_bGettingIsAutoGrowDown; bool m_bGettingMarginsValue; bool m_bGettingExtMarginsValue; bool m_bGettingUsePrinterSettings; @@ -351,7 +361,6 @@ public: LwpColor* GetBackColor(); virtual bool IsAutoGrow() override; virtual bool IsAutoGrowUp() override; - virtual bool IsAutoGrowDown() override; virtual bool IsAutoGrowLeft() override; virtual bool IsAutoGrowRight() override; virtual sal_uInt8 GetContentOrientation() override; @@ -389,6 +398,7 @@ protected: virtual bool MarginsSameAsParent() override; virtual double MarginsValue(sal_uInt8 nWhichSide) override; virtual double ExtMarginsValue(sal_uInt8 nWhichSide) override; + virtual bool IsAutoGrowDown() override; private: LwpObjectID m_BasedOnStyle; LwpLayoutGeometry* Geometry(); diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx b/lotuswordpro/source/filter/lwppagelayout.cxx index fc5d77ab90de..cb78e32d5136 100644 --- a/lotuswordpro/source/filter/lwppagelayout.cxx +++ b/lotuswordpro/source/filter/lwppagelayout.cxx @@ -467,7 +467,7 @@ void LwpPageLayout::ConvertFillerPageText(XFContentContainer* pCont) //get fillerpage story from division info LwpDocument* pDoc = m_pFoundry->GetDocument(); LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*>(pDoc->GetDivInfoID().obj().get()); - LwpStory* pStory = dynamic_cast<LwpStory*>(pDivInfo->GetFillerPageTextID().obj().get()); + LwpStory* pStory = pDivInfo ? dynamic_cast<LwpStory*>(pDivInfo->GetFillerPageTextID().obj().get()) : nullptr; //parse fillerpage story if(pStory) @@ -772,7 +772,7 @@ void LwpHeaderLayout::ParseMargins(XFHeaderStyle* ph1) { //Set height: from top of header to top of body, including the spacing between header and body double height = GetGeometryHeight()- GetMarginsValue(MARGIN_TOP); - if( IsAutoGrowDown() ) + if (GetIsAutoGrowDown()) { ph1->SetMinHeight(height); } commit fcc963133d63f7be6d3f2035f7e8e9620c57e893 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Sun Apr 8 12:43:13 2018 +0200 fix global-buffer-overflow found through UI testing on UBSAN jenkins job Change-Id: Ie4d81561057bb4d67fe050ca7fb82861d5d207a2 Reviewed-on: https://gerrit.libreoffice.org/52587 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> (cherry picked from commit c442ac8c20cfceb8c87e96c494dcd8372dc6e206) Reviewed-on: https://gerrit.libreoffice.org/52609 Reviewed-by: Michael Stahl <michael.st...@cib.de> (cherry picked from commit 9d3444ffe5b0ec37ad99d6969179184abea21385) diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index d2ab2ce96c8d..a69f8c59d6d8 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -782,7 +782,7 @@ void SwFramePage::setOptimalFrameWidth() { aHFrameMap, SAL_N_ELEMENTS(aHFrameMap) }, { aHFlyHtmlMap, SAL_N_ELEMENTS(aHFlyHtmlMap) }, { aVFrameMap, SAL_N_ELEMENTS(aVFrameMap) }, - { aVFlyHtmlMap, SAL_N_ELEMENTS(aVFrameMap) }, + { aVFlyHtmlMap, SAL_N_ELEMENTS(aVFlyHtmlMap) }, { aHParaMap, SAL_N_ELEMENTS(aHParaMap) }, { aHParaHtmlMap, SAL_N_ELEMENTS(aHParaHtmlMap) }, { aHParaHtmlAbsMap, SAL_N_ELEMENTS(aHParaHtmlAbsMap) }, commit 29c568ea325bca25d35a10d7a1e0ad745853e637 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Apr 9 14:16:40 2018 +0100 Related: tdf#77919 GetPosPixel() is relative to parent, not grandparent so the tooltip rectangle is wrong and doesn't shown under mutter we could use pCtrl->OutputToScreenPixel(Point(0, 0)) here too Change-Id: I75a717127ad75a4aac2cb9c22e526419f798ea99 Reviewed-on: https://gerrit.libreoffice.org/52654 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <michael.st...@cib.de> (cherry picked from commit 7d95ef515c604bf67e68fd4824aa0073d8a76d07) diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index ac3b7fc411d0..bd3693404b76 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -3477,7 +3477,7 @@ bool SwTokenWindow::CreateQuickHelp(Control const * pCtrl, (ToxAuthorityField) rToken.nAuthorityField); } - Point aPos = OutputToScreenPixel(pCtrl->GetPosPixel()); + Point aPos = m_pCtrlParentWin->OutputToScreenPixel(pCtrl->GetPosPixel()); tools::Rectangle aItemRect( aPos, pCtrl->GetSizePixel() ); if ( rToken.eTokenType != TOKEN_TAB_STOP ) { commit 902c259b320ab4decf3be8131873cbe01ffebf0b Author: Winfried Donkers <winfrieddonk...@libreoffice.org> Date: Fri Apr 6 19:55:12 2018 +0200 tdf#116706 fix for AGGREGATE with hidden rows and single references. Change-Id: I6ac88f26b46a17e1857b7b40d2034fb321973625 Reviewed-on: https://gerrit.libreoffice.org/52522 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Jenkins <c...@libreoffice.org> (cherry picked from commit 0a4c1fb68c3619e61099a7c548f550b0d3fd7a53) Reviewed-on: https://gerrit.libreoffice.org/52651 (cherry picked from commit 2c51260d91490a6fc512875d8befb38367bf3227) diff --git a/sc/qa/unit/data/functions/mathematical/fods/aggregate.fods b/sc/qa/unit/data/functions/mathematical/fods/aggregate.fods index 66162e697742..62e72ca08da6 100644 --- a/sc/qa/unit/data/functions/mathematical/fods/aggregate.fods +++ b/sc/qa/unit/data/functions/mathematical/fods/aggregate.fods @@ -5881,7 +5881,43 @@ </table:table-cell> <table:table-cell table:number-columns-repeated="1020"/> </table:table-row> - <table:table-row table:style-name="ro2" table:number-rows-repeated="1048392"> + <table:table-row table:style-name="ro2"> + <table:table-cell table:formula="of:=COM.MICROSOFT.AGGREGATE(3;5;[.$C$6])" office:value-type="float" office:value="0" calcext:value-type="float"> + <text:p>0</text:p> + </table:table-cell> + <table:table-cell office:value-type="float" office:value="0" calcext:value-type="float"> + <text:p>0</text:p> + </table:table-cell> + <table:table-cell table:style-name="ce18" table:formula="of:=[.A184]=[.B184]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean"> + <text:p>TRUE</text:p> + </table:table-cell> + <table:table-cell table:style-name="Default" table:formula="of:=FORMULA([.A184])" office:value-type="string" office:string-value="=AGGREGATE(3,5,$C$6)" calcext:value-type="string"> + <text:p>=AGGREGATE(3,5,$C$6)</text:p> + </table:table-cell> + <table:table-cell office:value-type="string" calcext:value-type="string"> + <text:p>tdf116706</text:p> + </table:table-cell> + <table:table-cell table:number-columns-repeated="1019"/> + </table:table-row> + <table:table-row table:style-name="ro2"> + <table:table-cell table:formula="of:=COM.MICROSOFT.AGGREGATE(3;5;[.$C$6:.$C$6])" office:value-type="float" office:value="0" calcext:value-type="float"> + <text:p>0</text:p> + </table:table-cell> + <table:table-cell office:value-type="float" office:value="0" calcext:value-type="float"> + <text:p>0</text:p> + </table:table-cell> + <table:table-cell table:style-name="ce18" table:formula="of:=[.A185]=[.B185]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean"> + <text:p>TRUE</text:p> + </table:table-cell> + <table:table-cell table:style-name="Default" table:formula="of:=FORMULA([.A185])" office:value-type="string" office:string-value="=AGGREGATE(3,5,$C$6:$C$6)" calcext:value-type="string"> + <text:p>=AGGREGATE(3,5,$C$6:$C$6)</text:p> + </table:table-cell> + <table:table-cell office:value-type="string" calcext:value-type="string"> + <text:p>tdf116706</text:p> + </table:table-cell> + <table:table-cell table:number-columns-repeated="1019"/> + </table:table-row> + <table:table-row table:style-name="ro2" table:number-rows-repeated="1048390"> <table:table-cell table:number-columns-repeated="1024"/> </table:table-row> <table:table-row table:style-name="ro2"> @@ -5920,4 +5956,4 @@ </table:named-expressions> </office:spreadsheet> </office:body> -</office:document> \ No newline at end of file +</office:document> diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx index 62c96376c664..449375638cb5 100644 --- a/sc/source/core/tool/interpr6.cxx +++ b/sc/source/core/tool/interpr6.cxx @@ -678,8 +678,10 @@ void ScInterpreter::IterateParameters( ScIterFunc eFunc, bool bTextAsZero ) ++nCount; break; } - if ( ( mnSubTotalFlags & SubtotalFlags::IgnoreFiltered ) && - pDok->RowFiltered( aAdr.Row(), aAdr.Tab() ) ) + if ( ( ( mnSubTotalFlags & SubtotalFlags::IgnoreFiltered ) && + pDok->RowFiltered( aAdr.Row(), aAdr.Tab() ) ) || + ( ( mnSubTotalFlags & SubtotalFlags::IgnoreHidden ) && + pDok->RowHidden( aAdr.Row(), aAdr.Tab() ) ) ) { break; } commit 18b92e4bdbe416a53e46df55ecceba6f4ffa7681 Author: Matteo Casalin <matteo.casa...@yahoo.com> Date: Sun Jan 14 19:12:30 2018 +0100 Return correct length for Authority token Regression from f4fd558ac9d61fe06aa0f56d829916ef9e5ee7b9 Take the chance to calculate token prefix just once. Change-Id: I19ce5cb037198cb918e79c760a92b285f9b725f1 (cherry picked from commit 34b98af8e5a4e568d8316700bea1ce604d825ce8) Reviewed-on: https://gerrit.libreoffice.org/52621 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <michael.st...@cib.de> (cherry picked from commit c6e8460a5b47fa6fa971dde2a89e80662b6e97ae) diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx index ed4716579063..c86b4c9efc50 100644 --- a/sw/source/core/tox/tox.cxx +++ b/sw/source/core/tox/tox.cxx @@ -745,30 +745,29 @@ static FormTokenType lcl_GetTokenType(const OUString & sToken, { static struct { - OUString sNm; - sal_uInt16 nOffset; - FormTokenType eToken; + OUString sTokenStart; + sal_Int16 nTokenLength; + FormTokenType eTokenType; } const aTokenArr[] = { - { SwForm::GetFormTab(), 1, TOKEN_TAB_STOP }, - { SwForm::GetFormPageNums(), 1, TOKEN_PAGE_NUMS }, - { SwForm::GetFormLinkStt(), 1, TOKEN_LINK_START }, - { SwForm::GetFormLinkEnd(), 1, TOKEN_LINK_END }, - { SwForm::GetFormEntryNum(), 1, TOKEN_ENTRY_NO }, - { SwForm::GetFormEntryText(), 1, TOKEN_ENTRY_TEXT }, - { SwForm::GetFormChapterMark(), 1, TOKEN_CHAPTER_INFO }, - { SwForm::GetFormText(), 1, TOKEN_TEXT }, - { SwForm::GetFormEntry(), 1, TOKEN_ENTRY }, - { SwForm::GetFormAuth(), 3, TOKEN_AUTHORITY } + { SwForm::GetFormTab().copy(0, 2), 3, TOKEN_TAB_STOP }, + { SwForm::GetFormPageNums().copy(0, 2), 3, TOKEN_PAGE_NUMS }, + { SwForm::GetFormLinkStt().copy(0, 3), 4, TOKEN_LINK_START }, + { SwForm::GetFormLinkEnd().copy(0, 3), 4, TOKEN_LINK_END }, + { SwForm::GetFormEntryNum().copy(0, 3), 4, TOKEN_ENTRY_NO }, + { SwForm::GetFormEntryText().copy(0, 3), 4, TOKEN_ENTRY_TEXT }, + { SwForm::GetFormChapterMark().copy(0, 2), 3, TOKEN_CHAPTER_INFO }, + { SwForm::GetFormText().copy(0, 2), 3, TOKEN_TEXT }, + { SwForm::GetFormEntry().copy(0, 2), 3, TOKEN_ENTRY }, + { SwForm::GetFormAuth().copy(0, 2), 5, TOKEN_AUTHORITY } }; for(const auto & i : aTokenArr) { - const sal_Int32 nLen(i.sNm.getLength()); - if( sToken.startsWith( i.sNm.copy(0, nLen - i.nOffset) )) + if( sToken.startsWith( i.sTokenStart ) ) { if (pTokenLen) - *pTokenLen = nLen; - return i.eToken; + *pTokenLen = i.nTokenLength; + return i.eTokenType; } } commit ec58b30529c33e5190244c06feb200c6a6510ed3 Author: Julien Nabet <serval2...@yahoo.fr> Date: Sun Apr 8 09:58:11 2018 +0200 Fix regressions from d727476cff29382a34103b137542e15e1aeeb4b9 Calls to statusChanged may call addStatusListener or removeStatusListener so copy m_aStatusListenerVector on stack and iterate on the copy Thank you Michael for having pointed these Change-Id: I8399db84874d7f68e24c57891a9ab408e7ebef78 Reviewed-on: https://gerrit.libreoffice.org/52579 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> (cherry picked from commit 8fced3ec9ff6f55a6e0b939183cf33b6c3c4a1db) Reviewed-on: https://gerrit.libreoffice.org/52584 Reviewed-by: Michael Stahl <michael.st...@cib.de> (cherry picked from commit 1e80227ff76896a2bb6243acff19a49567bb2387) diff --git a/sw/source/uibase/uno/unodispatch.cxx b/sw/source/uibase/uno/unodispatch.cxx index fb6c66b38442..acb2496b4b81 100644 --- a/sw/source/uibase/uno/unodispatch.cxx +++ b/sw/source/uibase/uno/unodispatch.cxx @@ -257,7 +257,10 @@ void SwXDispatch::dispatch(const util::URL& aURL, aEvent.State <<= aDescriptor.createPropertyValueSequence(); aEvent.IsEnabled = !rData.sDataSource.isEmpty(); - for ( auto & status : m_aStatusListenerVector ) + // calls to statusChanged may call addStatusListener or removeStatusListener + // so copy m_aStatusListenerVector on stack + auto copyStatusListenerVector = m_aStatusListenerVector; + for (auto & status : copyStatusListenerVector) { if(status.aURL.Complete == cURLDocumentDataSource) { @@ -348,7 +351,10 @@ void SwXDispatch::selectionChanged( const lang::EventObject& ) aEvent.IsEnabled = bEnable; aEvent.Source = *static_cast<cppu::OWeakObject*>(this); - for ( auto & status : m_aStatusListenerVector ) + // calls to statusChanged may call addStatusListener or removeStatusListener + // so copy m_aStatusListenerVector on stack + auto copyStatusListenerVector = m_aStatusListenerVector; + for (auto & status : copyStatusListenerVector) { aEvent.FeatureURL = status.aURL; if (status.aURL.Complete != cURLDocumentDataSource) @@ -367,7 +373,10 @@ void SwXDispatch::disposing( const lang::EventObject& rSource ) lang::EventObject aObject; aObject.Source = static_cast<cppu::OWeakObject*>(this); - for ( auto & status : m_aStatusListenerVector ) + // calls to statusChanged may call addStatusListener or removeStatusListener + // so copy m_aStatusListenerVector on stack + auto copyStatusListenerVector = m_aStatusListenerVector; + for (auto & status : copyStatusListenerVector) { status.xListener->disposing(aObject); } commit d8c6730472a002483740bc794febe1323b474ceb Author: Bartosz Kosiorek <gan...@poczta.onet.pl> Date: Sun Feb 18 22:12:29 2018 +0100 Add export of the side wall for 3D chart, during .xlsx export LibreOffice doens't distinguish between sideWall and backWall. It is controlled by the same Wall property. Change-Id: If1919cf0a9bad3e80544cc5b2ae0f40f606febeb Reviewed-on: https://gerrit.libreoffice.org/49429 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gan...@poczta.onet.pl> (cherry picked from commit ff63bae0133e3b90b32af88a4307fb4f5dafd95f) Reviewed-on: https://gerrit.libreoffice.org/50679 Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> (cherry picked from commit 49c0d98cb2bec7d171f9847b1335874c05042187) diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 86e7c7c6afb1..d3ff150d47b5 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -735,15 +735,21 @@ void ChartExport::exportChart( const Reference< css::chart::XChartDocument >& xC pFS->endElement( FSNS( XML_c, XML_floor ) ); } - // sideWall - - // backWall - Reference< beans::XPropertySet > xBackWall( mxNewDiagram->getWall(), uno::UNO_QUERY ); - if( xBackWall.is() ) + // LibreOffice doens't distinguish between sideWall and backWall (both are using the same color). + // It is controlled by the same Wall property. + Reference< beans::XPropertySet > xWall( mxNewDiagram->getWall(), uno::UNO_QUERY ); + if( xWall.is() ) { + // sideWall + pFS->startElement( FSNS( XML_c, XML_sideWall ), + FSEND ); + exportShapeProps( xWall ); + pFS->endElement( FSNS( XML_c, XML_sideWall ) ); + + // backWall pFS->startElement( FSNS( XML_c, XML_backWall ), FSEND ); - exportShapeProps( xBackWall ); + exportShapeProps( xWall ); pFS->endElement( FSNS( XML_c, XML_backWall ) ); } commit 0125d4b72f346d248b10c03c75c70fcb5c5b3fe8 Author: Bartosz Kosiorek <bartosz.kosio...@tomtom.com> Date: Wed Feb 7 02:57:30 2018 +0100 tdf#114168 If minor axis unit is automatic, then set it to 5 Based on OOXML implementation in MS Excel, if Minor axis Unit is set to automatic, then during chart import, LibreOffice should set Interval Count to 5, to mimic behaviour of MS Excel. Becaues default Interval Count for LibreOffice is 2, we need to override it to 5. With that solution, the Minor axis unit is preserved also after saving to .ods file format. During .xlsx export, if Interval Count is set to 5, then treat is as automatic axis unit. Change-Id: Iab9209fb3950ef73e79229329606363b528d35fe Reviewed-on: https://gerrit.libreoffice.org/49327 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gan...@poczta.onet.pl> (cherry picked from commit 274825b4180c81540cd0d1b22c5243f1b39fe4db) Reviewed-on: https://gerrit.libreoffice.org/50676 Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> (cherry picked from commit 40e722fd44e3cf026e1aee2b2c2c97eb57b53468) diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx index 76f3585e04d2..40f770626777 100644 --- a/oox/source/drawingml/chart/axisconverter.cxx +++ b/oox/source/drawingml/chart/axisconverter.cxx @@ -273,7 +273,7 @@ void AxisConverter::convertFromModel( case cssc2::AxisType::PERCENT: { // scaling algorithm - bool bLogScale = lclIsLogarithmicScale( mrModel ); + const bool bLogScale = lclIsLogarithmicScale( mrModel ); if( bLogScale ) aScaleData.Scaling = LogarithmicScaling::create( comphelper::getProcessComponentContext() ); else @@ -303,6 +303,11 @@ void AxisConverter::convertFromModel( if( (1.0 <= fCount) && (fCount < 1001.0) ) rIntervalCount <<= static_cast< sal_Int32 >( fCount ); } + else if( !mrModel.mofMinorUnit.has() ) + { + // tdf#114168 If minor unit is not set then set interval to 5, as MS Excel do. + rIntervalCount <<= static_cast< sal_Int32 >( 5 ); + } } break; default: diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 657ae8ea98e2..86e7c7c6afb1 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -2802,9 +2802,20 @@ void ChartExport::_exportAxis( { double dMinorUnit = 0; mAny >>= dMinorUnit; - pFS->singleElement( FSNS( XML_c, XML_minorUnit ), - XML_val, IS( dMinorUnit ), - FSEND ); + if( GetProperty( xAxisProp, "StepHelpCount" ) ) + { + sal_Int32 dMinorUnitCount = 0; + mAny >>= dMinorUnitCount; + // tdf#114168 Don't save minor unit if number of step help count is 5 (which is default for MS Excel), + // to allow proper .xlsx import. If minorUnit is set and majorUnit not, then it is impossible + // to calculate StepHelpCount. + if( dMinorUnitCount != 5 ) + { + pFS->singleElement( FSNS( XML_c, XML_minorUnit ), + XML_val, IS( dMinorUnit ), + FSEND ); + } + } } if( nAxisType == XML_valAx && GetProperty( xAxisProp, "DisplayUnits" ) ) diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index d45e694bb557..15e6f2e9441d 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -2748,14 +2748,19 @@ void XclExpChValueRange::Convert( const ScaleData& rScaleData ) // major increment const IncrementData& rIncrementData = rScaleData.IncrementData; - bool bAutoMajor = lclIsAutoAnyOrGetValue( maData.mfMajorStep, rIncrementData.Distance ) || (maData.mfMajorStep <= 0.0); + const bool bAutoMajor = lclIsAutoAnyOrGetValue( maData.mfMajorStep, rIncrementData.Distance ) || (maData.mfMajorStep <= 0.0); ::set_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMAJOR, bAutoMajor ); // minor increment const Sequence< SubIncrement >& rSubIncrementSeq = rIncrementData.SubIncrements; sal_Int32 nCount = 0; - bool bAutoMinor = bLogScale || bAutoMajor || (rSubIncrementSeq.getLength() < 1) || - lclIsAutoAnyOrGetValue( nCount, rSubIncrementSeq[ 0 ].IntervalCount ) || (nCount < 1); - if( !bAutoMinor ) + + // tdf#114168 If IntervalCount is 5, then enable automatic minor calculation. + // During import, if minorUnit is set and majorUnit not, then it is impossible + // to calculate IntervalCount. + const bool bAutoMinor = bLogScale || bAutoMajor || (rSubIncrementSeq.getLength() < 1) || + lclIsAutoAnyOrGetValue( nCount, rSubIncrementSeq[ 0 ].IntervalCount ) || (nCount < 1) || (nCount == 5); + + if( maData.mfMajorStep && !bAutoMinor ) maData.mfMinorStep = maData.mfMajorStep / nCount; ::set_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMINOR, bAutoMinor ); diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 895a9caa5e7c..82e06201ad67 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -3071,7 +3071,7 @@ void XclImpChValueRange::ReadChValueRange( XclImpStream& rStrm ) void XclImpChValueRange::Convert( ScaleData& rScaleData, bool bMirrorOrient ) const { // scaling algorithm - bool bLogScale = ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_LOGSCALE ); + const bool bLogScale = ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_LOGSCALE ); if( bLogScale ) rScaleData.Scaling = css::chart2::LogarithmicScaling::create( comphelper::getProcessComponentContext() ); else @@ -3097,14 +3097,16 @@ void XclImpChValueRange::Convert( ScaleData& rScaleData, bool bMirrorOrient ) co if( !bAutoMinor ) rIntervalCount <<= sal_Int32( 9 ); } - else + else if( !bAutoMajor && !bAutoMinor && (0.0 < maData.mfMinorStep) && (maData.mfMinorStep <= maData.mfMajorStep) ) { - if( !bAutoMajor && !bAutoMinor && (0.0 < maData.mfMinorStep) && (maData.mfMinorStep <= maData.mfMajorStep) ) - { - double fCount = maData.mfMajorStep / maData.mfMinorStep + 0.5; - if( (1.0 <= fCount) && (fCount < 1001.0) ) - rIntervalCount <<= static_cast< sal_Int32 >( fCount ); - } + double fCount = maData.mfMajorStep / maData.mfMinorStep + 0.5; + if( (1.0 <= fCount) && (fCount < 1001.0) ) + rIntervalCount <<= static_cast< sal_Int32 >( fCount ); + } + else if( bAutoMinor ) + { + // tdf#114168 If minor unit is not set then set interval to 5, as MS Excel do. + rIntervalCount <<= static_cast< sal_Int32 >( 5 ); } // reverse order commit 5c6b3f8a7a7061068f1534a455ba7a92bdf04763 Author: Bartosz Kosiorek <bartosz.kosio...@tomtom.com> Date: Thu Feb 8 14:15:48 2018 +0100 tdf#114139 Don't export Plot Area shape property fot 3D charts For 2D charts Plot Area equivalent is Chart Wall. Unfortunately LibreOffice doesn't have Plot Area equivalent for 3D chart. It means that Plot Area couldn't be displayed and changed for 3D chars in LibreOffice. We cannot write Wall attributes into Plot Area for 3D charts, because Wall us used as background wall. Change-Id: I16d3b326571c1e411a094ec799e20c7aeeb2c1d4 Reviewed-on: https://gerrit.libreoffice.org/49428 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> (cherry picked from commit 5b9e76557d2b5c835a5873de1ce530f36ea98d2d) Reviewed-on: https://gerrit.libreoffice.org/50678 (cherry picked from commit dfd19459a336a6cd9a67a0d3dc3cf305de567be1) diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 2456b6c0dca0..657ae8ea98e2 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -1153,7 +1153,11 @@ void ChartExport::exportPlotArea( const Reference< css::chart::XChartDocument >& * eg: Fill and Outline */ Reference< css::chart::X3DDisplay > xWallFloorSupplier( mxDiagram, uno::UNO_QUERY ); - if( xWallFloorSupplier.is() ) + // tdf#114139 For 2D charts Plot Area equivalent is Chart Wall. + // Unfortunately LibreOffice doesn't have Plot Area equivalent for 3D charts. + // It means that Plot Area couldn't be displayed and changed for 3D chars in LibreOffice. + // We cannot write Wall attributes into Plot Area for 3D charts, because Wall us used as background wall. + if( !mbIs3DChart && xWallFloorSupplier.is() ) { Reference< beans::XPropertySet > xWallPropSet( xWallFloorSupplier->getWall(), uno::UNO_QUERY ); if( xWallPropSet.is() ) commit 96076ab37f365eae9a9ddfa21327d48d73847a20 Author: Michael Meeks <michael.me...@collabora.com> Date: Thu Mar 29 17:18:42 2018 +0100 Avoid crash-reporter crash. http://crashreport.libreoffice.org/stats/crash_details/f5086a7d-3c67-46e4-945e-e0882a604eee Change-Id: Ic9ceed2e736a4ad1c155a31d3b2dc453e6a562aa Reviewed-on: https://gerrit.libreoffice.org/52119 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Meeks <michael.me...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/52516 Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> (cherry picked from commit f4082279078b59f0960d6683d0d039756354eccd) diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 47d261547c6e..d45454b5bec3 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -938,6 +938,9 @@ IMPL_LINK( SwNavigationPI, MenuSelectHdl, Menu *, pMenu, bool ) void SwNavigationPI::UpdateListBox() { + if (isDisposed()) + return; + m_aDocListBox->SetUpdateMode(false); m_aDocListBox->Clear(); SwView *pActView = GetCreateView(); diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 1ce2972b48e9..07ff4a87c29b 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3015,15 +3015,20 @@ void Window::Scroll( long nHorzScroll, long nVertScroll, void Window::Flush() { - - const tools::Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); - mpWindowImpl->mpFrame->Flush( aWinRect ); + if (mpWindowImpl) + { + const tools::Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); + mpWindowImpl->mpFrame->Flush( aWinRect ); + } } void Window::SetUpdateMode( bool bUpdate ) { - mpWindowImpl->mbNoUpdate = !bUpdate; - CompatStateChanged( StateChangedType::UpdateMode ); + if (mpWindowImpl) + { + mpWindowImpl->mbNoUpdate = !bUpdate; + CompatStateChanged( StateChangedType::UpdateMode ); + } } void Window::GrabFocus() commit 09670859c352dd360c39e1b1061f8fad3fe133f6 Author: Michael Stahl <michael.st...@cib.de> Date: Tue Apr 3 13:16:53 2018 +0200 configure: check for EGL header if EGL is required Change-Id: Id7501b9adcd817ce84bfde3a928fe8b4c7e7e01f Reviewed-on: https://gerrit.libreoffice.org/52330 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> (cherry picked from commit e2e3118465411448a3b1f5e56c3456384c009f99) Reviewed-on: https://gerrit.libreoffice.org/52382 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> (cherry picked from commit e336b70550a5615a9b6fd1848c5785fe54c3156a) diff --git a/configure.ac b/configure.ac index bbcc18c77b92..9130c00a1728 100644 --- a/configure.ac +++ b/configure.ac @@ -9712,6 +9712,8 @@ if test "x$enable_gtk3" = "xyes"; then dnl We require egl only for the gtk3 plugin. Otherwise we use glx. if test "$with_system_epoxy" != "yes"; then AC_CHECK_LIB(EGL, eglMakeCurrent, [:], AC_MSG_ERROR([libEGL required.])) + AC_CHECK_HEADER(EGL/eglplatform.h, [], + [AC_MSG_ERROR(EGL headers not found. install mesa-libEGL-devel)], []) fi fi AC_SUBST(GTK3_LIBS) commit f6f1076a6906b6518775e76f282deb9e34b537ee Author: Bartosz Kosiorek <gan...@poczta.onet.pl> Date: Fri Mar 2 01:07:57 2018 +0100 tdf#114738 Add support for transparency for EMF+ records With current EMF+ implementation all filled figures, does not support transparency. This patch add transparency support for following EMF+ records: - DrawDriverString - DrawString - FillEllipse - FillRects - FillPolygon - FillPie - FillPath - FillRegion Change-Id: I1e59ea90bdf5fafc07ff9417fccace44872bbecd Reviewed-on: https://gerrit.libreoffice.org/52021 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gan...@poczta.onet.pl> (cherry picked from commit aee1904446cd0508cdf06fd23155373b5018dfed) diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx index 679a47c1a7f3..0afabe77302d 100644 --- a/drawinglayer/source/tools/emfphelperdata.cxx +++ b/drawinglayer/source/tools/emfphelperdata.cxx @@ -27,8 +27,8 @@ #include "emfpstringformat.hxx" #include <basegfx/curve/b2dcubicbezier.hxx> #include <wmfemfhelper.hxx> +#include <drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx> #include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx> -#include <drawinglayer/primitive2d/fillgradientprimitive2d.hxx> #include <drawinglayer/primitive2d/svggradientprimitive2d.hxx> #include <drawinglayer/primitive2d/textprimitive2d.hxx> #include <drawinglayer/primitive2d/bitmapprimitive2d.hxx> @@ -300,19 +300,19 @@ namespace emfplushelper return maMapTransform * ::basegfx::B2DSize(iwidth, iheight); } - ::basegfx::BColor EmfPlusHelperData::EMFPGetBrushColorOrARGBColor(sal_uInt16 flags, sal_uInt32 brushIndexOrColor) const { - basegfx::BColor color; + Color EmfPlusHelperData::EMFPGetBrushColorOrARGBColor(const sal_uInt16 flags, const sal_uInt32 brushIndexOrColor) const { + Color color; if (flags & 0x8000) // we use a color { color = Color(0xff - (brushIndexOrColor >> 24), (brushIndexOrColor >> 16) & 0xff, - (brushIndexOrColor >> 8) & 0xff, brushIndexOrColor & 0xff).getBColor(); + (brushIndexOrColor >> 8) & 0xff, brushIndexOrColor & 0xff); } else // we use a pen { const EMFPPen* pen = static_cast<EMFPPen*>(maEMFPObjects[brushIndexOrColor & 0xff].get()); if (pen) { - color = pen->GetColor().getBColor(); + color = pen->GetColor(); } } return color; @@ -452,7 +452,7 @@ namespace emfplushelper } } - void EmfPlusHelperData::EMFPPlusFillPolygon(const ::basegfx::B2DPolyPolygon& polygon, bool isColor, sal_uInt32 brushIndexOrColor) + void EmfPlusHelperData::EMFPPlusFillPolygon(const ::basegfx::B2DPolyPolygon& polygon, const bool isColor, const sal_uInt32 brushIndexOrColor) { if (!polygon.count()) return; @@ -460,12 +460,35 @@ namespace emfplushelper if (isColor) // use Color { SAL_INFO("drawinglayer", "EMF+\t Fill polygon, ARGB color: 0x" << std::hex << brushIndexOrColor << std::dec); - mrTargetHolders.Current().append( - o3tl::make_unique<drawinglayer::primitive2d::PolyPolygonColorPrimitive2D>( - polygon, - ::Color(0xff - (brushIndexOrColor >> 24), (brushIndexOrColor >> 16) & 0xff, (brushIndexOrColor >> 8) & 0xff, brushIndexOrColor & 0xff).getBColor())); - mrPropertyHolders.Current().setFillColor(::Color(0xff - (brushIndexOrColor >> 24), (brushIndexOrColor >> 16) & 0xff, (brushIndexOrColor >> 8) & 0xff, brushIndexOrColor & 0xff).getBColor()); + // EMF Alpha (1 byte): An 8-bit unsigned integer that specifies the transparency of the background, + // ranging from 0 for completely transparent to 0xFF for completely opaque. + const Color color = Color(0xff - (brushIndexOrColor >> 24), (brushIndexOrColor >> 16) & 0xff, (brushIndexOrColor >> 8) & 0xff, brushIndexOrColor & 0xff); + if (color.GetTransparency() < 255) + { + if (color.GetTransparency() == 0) + { + // not transparent + mrTargetHolders.Current().append( + o3tl::make_unique<drawinglayer::primitive2d::PolyPolygonColorPrimitive2D>( + polygon, + color.getBColor())); + } + else + { + const drawinglayer::primitive2d::Primitive2DReference aPrimitive( + new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( + polygon, + color.getBColor())); + + mrTargetHolders.Current().append( + o3tl::make_unique<drawinglayer::primitive2d::UnifiedTransparencePrimitive2D>( + drawinglayer::primitive2d::Primitive2DContainer { aPrimitive }, + color.GetTransparency() / 255.0)); + } + } + + mrPropertyHolders.Current().setFillColor(color.getBColor()); mrPropertyHolders.Current().setFillColorActive(true); mrPropertyHolders.Current().setLineColorActive(false); } @@ -507,7 +530,7 @@ namespace emfplushelper isHatchBlend = false; break; } - ::Color fillColor; + Color fillColor; if (isHatchBlend) { fillColor = brush->solidColor; @@ -1267,27 +1290,52 @@ namespace emfplushelper else { // use system default - locale = Application::GetSettings().GetLanguageTag().getLocale(); + locale = Application::GetSettings().GetLanguageTag().getLocale(); } basegfx::B2DHomMatrix transformMatrix = basegfx::utils::createScaleTranslateB2DHomMatrix(MapSize(font->emSize,font->emSize),Map(lx,ly+font->emSize)); - basegfx::BColor color = EMFPGetBrushColorOrARGBColor(flags,brushId); + const Color color = EMFPGetBrushColorOrARGBColor(flags, brushId); - mrPropertyHolders.Current().setTextColor(color); + mrPropertyHolders.Current().setTextColor(color.getBColor()); mrPropertyHolders.Current().setTextColorActive(true); - std::vector<double> emptyVector; - mrTargetHolders.Current().append( - o3tl::make_unique<drawinglayer::primitive2d::TextSimplePortionPrimitive2D>( - transformMatrix, - text, - 0, // text always starts at 0 - stringLength, - emptyVector, // EMF-PLUS has no DX-array - fontAttribute, - locale, - color)); + if (color.GetTransparency() < 255) + { + std::vector<double> emptyVector; + if (color.GetTransparency() == 0) + { + // not transparent + mrTargetHolders.Current().append( + o3tl::make_unique<drawinglayer::primitive2d::TextSimplePortionPrimitive2D>( + transformMatrix, + text, + 0, // text always starts at 0 + stringLength, + emptyVector, // EMF-PLUS has no DX-array + fontAttribute, + locale, + color.getBColor())); + } + else + { + const drawinglayer::primitive2d::Primitive2DReference aPrimitive( + new drawinglayer::primitive2d::TextSimplePortionPrimitive2D( + transformMatrix, + text, + 0, // text always starts at 0 + stringLength, + emptyVector, // EMF-PLUS has no DX-array + fontAttribute, + locale, + color.getBColor())); + + mrTargetHolders.Current().append( + o3tl::make_unique<drawinglayer::primitive2d::UnifiedTransparencePrimitive2D>( + drawinglayer::primitive2d::Primitive2DContainer { aPrimitive }, + color.GetTransparency() / 255.0)); + } + } } else { @@ -1641,7 +1689,7 @@ namespace emfplushelper false, // right-to-left false); // BiDiStrong - basegfx::BColor color = EMFPGetBrushColorOrARGBColor(flags,brushIndexOrColor); + const Color color = EMFPGetBrushColorOrARGBColor(flags, brushIndexOrColor); std::vector<double> aDXArray; // dummy for DX array (not used) // generate TextSimplePortionPrimitive2Ds for all portions of text with @@ -1669,18 +1717,41 @@ namespace emfplushelper MapSize(font->emSize,font->emSize),Map(charsPosX[pos],charsPosY[pos])); if (hasMatrix) transformMatrix *= transform; - - //generate TextSimplePortionPrimitive2D - mrTargetHolders.Current().append( - o3tl::make_unique<drawinglayer::primitive2d::TextSimplePortionPrimitive2D>( - transformMatrix, - text, - pos, // take character at current pos - aLength, // use determined length - aDXArray, // generated DXArray - fontAttribute, - Application::GetSettings().GetLanguageTag().getLocale(), - color)); + if (color.GetTransparency() < 255) + { + if (color.GetTransparency() == 0) + { + // not transparent + mrTargetHolders.Current().append( + o3tl::make_unique<drawinglayer::primitive2d::TextSimplePortionPrimitive2D>( + transformMatrix, + text, + pos, // take character at current pos + aLength, // use determined length + aDXArray, // generated DXArray + fontAttribute, + Application::GetSettings().GetLanguageTag().getLocale(), + color.getBColor())); + } + else + { + const drawinglayer::primitive2d::Primitive2DReference aPrimitive( + new drawinglayer::primitive2d::TextSimplePortionPrimitive2D( + transformMatrix, + text, + pos, // take character at current pos + aLength, // use determined length + aDXArray, // generated DXArray + fontAttribute, + Application::GetSettings().GetLanguageTag().getLocale(), + color.getBColor())); + + mrTargetHolders.Current().append( + o3tl::make_unique<drawinglayer::primitive2d::UnifiedTransparencePrimitive2D>( + drawinglayer::primitive2d::Primitive2DContainer { aPrimitive }, + color.GetTransparency() / 255.0)); + } + } // update pos pos += aLength; diff --git a/drawinglayer/source/tools/emfphelperdata.hxx b/drawinglayer/source/tools/emfphelperdata.hxx index 729835307633..ba58686088f9 100644 --- a/drawinglayer/source/tools/emfphelperdata.hxx +++ b/drawinglayer/source/tools/emfphelperdata.hxx @@ -237,10 +237,10 @@ namespace emfplushelper // primitive creators void EMFPPlusDrawPolygon(const ::basegfx::B2DPolyPolygon& polygon, sal_uInt32 penIndex); - void EMFPPlusFillPolygon(const ::basegfx::B2DPolyPolygon& polygon, bool isColor, sal_uInt32 brushIndexOrColor); + void EMFPPlusFillPolygon(const ::basegfx::B2DPolyPolygon& polygon, const bool isColor, const sal_uInt32 brushIndexOrColor); // helper functions - ::basegfx::BColor EMFPGetBrushColorOrARGBColor(sal_uInt16 flags, sal_uInt32 brushIndexOrColor) const; + Color EMFPGetBrushColorOrARGBColor(const sal_uInt16 flags, const sal_uInt32 brushIndexOrColor) const; public: EmfPlusHelperData( diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx b/emfio/qa/cppunit/emf/EmfImportTest.cxx index bc14c4bd3062..1aae38f3bd5f 100644 --- a/emfio/qa/cppunit/emf/EmfImportTest.cxx +++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx @@ -40,6 +40,7 @@ class Test : public test::BootstrapFixture, public XmlTestTools void testWorking(); void TestDrawString(); + void TestDrawStringTransparent(); void TestDrawLine(); Primitive2DSequence parseEmf(const OUString& aSource); @@ -48,6 +49,7 @@ public: CPPUNIT_TEST_SUITE(Test); CPPUNIT_TEST(testWorking); CPPUNIT_TEST(TestDrawString); + CPPUNIT_TEST(TestDrawStringTransparent); CPPUNIT_TEST(TestDrawLine); CPPUNIT_TEST_SUITE_END(); }; @@ -113,6 +115,30 @@ void Test::TestDrawString() assertXPath(pDocument, "/primitive2D/metafile/transform/textsimpleportion", "familyname", "CALIBRI"); } +void Test::TestDrawStringTransparent() +{ + // This unit checks for a correct import of an EMF+ file with one DrawString Record with transparency + + // first, get the sequence of primitives and dump it + Primitive2DSequence aSequence = parseEmf("/emfio/qa/cppunit/emf/data/TestDrawStringTransparent.emf"); + CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence.getLength())); + Primitive2dXmlDump dumper; + xmlDocPtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequence)); + CPPUNIT_ASSERT (pDocument); + + //TODO Strange that transparency is set to 0 even if it is not fully transparent + // check correct import of the DrawString: transparency, height, position, text, color and font + assertXPath(pDocument, "/primitive2D/metafile/transform/unifiedtransparence", "transparence", "0"); + + //TODO Where was textsimpleportion gone? + //assertXPath(pDocument, "/primitive2D/metafile/transform/textsimpleportion", "height", "276"); + //assertXPath(pDocument, "/primitive2D/metafile/transform/textsimpleportion", "x", "25"); + //assertXPath(pDocument, "/primitive2D/metafile/transform/textsimpleportion", "y", "323"); + //assertXPath(pDocument, "/primitive2D/metafile/transform/textsimpleportion", "text", "Transparent Text"); + //assertXPath(pDocument, "/primitive2D/metafile/transform/textsimpleportion", "fontcolor", "#000000"); + //assertXPath(pDocument, "/primitive2D/metafile/transform/textsimpleportion", "familyname", "CALIBRI"); +} + void Test::TestDrawLine() { // This unit checks for a correct import of an EMF+ file with only one DrawLine Record diff --git a/emfio/qa/cppunit/emf/data/TestDrawStringTransparent.emf b/emfio/qa/cppunit/emf/data/TestDrawStringTransparent.emf new file mode 100644 index 000000000000..73954c4902c7 Binary files /dev/null and b/emfio/qa/cppunit/emf/data/TestDrawStringTransparent.emf differ diff --git a/svgio/source/svgreader/svganode.cxx b/svgio/source/svgreader/svganode.cxx index 8c53d8d660bb..46dd237ca637 100644 --- a/svgio/source/svgreader/svganode.cxx +++ b/svgio/source/svgreader/svganode.cxx @@ -18,8 +18,6 @@ */ #include <svganode.hxx> -#include <drawinglayer/primitive2d/transformprimitive2d.hxx> -#include <drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx> namespace svgio { diff --git a/svgio/source/svgreader/svggnode.cxx b/svgio/source/svgreader/svggnode.cxx index 28a4ece8607b..d7e0ebcee5f2 100644 --- a/svgio/source/svgreader/svggnode.cxx +++ b/svgio/source/svgreader/svggnode.cxx @@ -18,8 +18,6 @@ */ #include <svggnode.hxx> -#include <drawinglayer/primitive2d/transformprimitive2d.hxx> -#include <drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx> namespace svgio { commit d0e5163d9f587a7fc4a6df5d3661f3baafa8c314 Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Apr 4 15:44:40 2018 +0200 Ignore dangling symlink configuration files This will be used by the Flatpak build, to offload per-locale data to a Locale extension (which expects all per-locale files to be in one place, so we need to add---potentially dangling, if a given locale is not installed---symlinks from the original places to the location where that Locale extension stores the actual files). Change-Id: Id13b8c53fbc9e0763e53fd09c0c059c9e638c13d Reviewed-on: https://gerrit.libreoffice.org/52381 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Stephan Bergmann <sberg...@redhat.com> (cherry picked from commit 8bd827c976037381be963d4ef99bfb9a2d720889) Reviewed-on: https://gerrit.libreoffice.org/52397 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit d5d9e64cd65ca0f9fbd07cea27bd7b17dffd8c76) diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx index 5354763b0c95..dc4374d60ec6 100644 --- a/configmgr/source/components.cxx +++ b/configmgr/source/components.cxx @@ -705,6 +705,10 @@ void Components::parseFiles( parseFileLeniently( parseFile, stat.getFileURL(), layer, nullptr, nullptr, nullptr); } catch (css::container::NoSuchElementException & e) { + if (stat.getFileType() == osl::FileStatus::Link) { + SAL_WARN("configmgr", "dangling link <" << stat.getFileURL() << ">"); + continue; + } throw css::uno::RuntimeException( "stat'ed file does not exist: " + e.Message); } @@ -781,6 +785,10 @@ void Components::parseXcdFiles(int layer, OUString const & url) { stat.getFileURL(), new XcdParser(layer, processedDeps, data_)); } catch (css::container::NoSuchElementException & e) { + if (stat.getFileType() == osl::FileStatus::Link) { + SAL_WARN("configmgr", "dangling link <" << stat.getFileURL() << ">"); + continue; + } throw css::uno::RuntimeException( "stat'ed file does not exist: " + e.Message); } commit 869d3c31f62220b4ebf0a3870ed0793a4f8bebf8 Author: Michael Stahl <mst...@redhat.com> Date: Thu Mar 22 21:18:56 2018 +0100 forcepoint #3: sw: don't do section-in-table splits when this is table The problem with the bugdoc is that SwFrame::GetNextSctLeaf() creates a follow frame for a section in a table, and puts it outside the table, below the page's body frame, while moving text frames that have the mbInfTab flag set into the follow frame. The situation is different from forcepoint #18 though: the frame "this" is a SwTabFrame here, and GetNextCellLeaf() *does* return a plausible looking follow cell frame, however it's ignored later because CanContainSplitSection(this) is false since it's a SwTabFrame. IIRC table-in-section-in-table should not be split anyway, so just add a check here and return early. (regression f8a76d218305a56d15b82b9dac4fafa558872780) Revert "forcepoint #3" This reverts commit 34627ad7d03f93b89689b2e48a3985574d10f965 because it was just a work-around not to crash with the invalid table frames. Change-Id: I54692a67edade23c6b8e0a9be806728b0012a3fd Reviewed-on: https://gerrit.libreoffice.org/51751 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> (cherry picked from commit 5e18136a01208f5df7c5f554bbcdab2ef661e136) Reviewed-on: https://gerrit.libreoffice.org/52383 (cherry picked from commit 20e1544a3f84e784df65750d62eea42090d79a48) diff --git a/sw/qa/extras/uiwriter/data/flowframe_null_ptr_deref.sample b/sw/qa/extras/uiwriter/data/flowframe_null_ptr_deref.sample new file mode 100644 index 000000000000..ec4e8423a08a --- /dev/null +++ b/sw/qa/extras/uiwriter/data/flowframe_null_ptr_deref.sample @@ -0,0 +1,654 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> + +<head> + <head> + <head> + <head> + <title>KDE::Enterprise Homepage - Business Directory</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <meta http-equiv="Content-Style-Type" content="text/css" /> + + <meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" comment "ICRAonline DE v2.0" l gen true for "http://www.kde.org" r (nz 1 vz 1 lz 1 oz 1 cb 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.kde.org" r (n 0 s 0 v 0 l 0))' /> + + <meta name="trademark" content="KDE e.V." /> + <meta name="description" content="K Desktop Environment Homepage, KDE.org" /> + <meta name="MSSmartTagsPreventParsing" content="true" /> + <meta name="robots" content="all" /> + + <link rel="shortcut icon" href="favicon.ico" /> + +<link rel="stylesheet" media="screen" type="text/css" title="Default: KDE Window Colors" href="/media/styles/standard.css" /> +<link rel="alternate stylesheet" media="screen" type="text/css" title="Black and white" href="/media/styles/blackwhite.css" /> +<link rel="alternate stylesheet" media="screen" type="text/css" title="Blue, mellow" href="/media/styles/bluemellow.css" /><head> + <title>KDE::Enterprise Homepage - Business Directory</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <meta http-equiv="Content-Style-Type" content="text/css" /> + + <meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" comment "ICRAonline DE v2.0" l gen true for "http://www.kde.org" r (nz 1 vz 1 lz 1 oz 1 cb 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.kde.org" r (n 0 s 0 v 0 l 0))' /> + + <meta name="trademark" content="KDE e.V." /> + <meta name="description" content="K Desktop Environment Homepage, KDE.org" /> + <meta name="MSSmartTagsPreventParsing" content="true" /> + <meta name="robots" content="all" /> + + <link rel="shortcut icon" href="favicon.ico" /> + +<link rel="stylesheet" media="screen" type="text/css" title="Default: KDE Window Colors" href="/media/styles/standard.css" /> +<link rel="alternate stylesheet" media="screen" type="text/css" title="Black and white" href="/media/styles/blackwhite.css" /> +<link rel="alternate stylesheet" media="screen" type="text/css" title="Blue, mellow" href="/media/styles/bluemellow.css" /><head> + <title>KDE::Enterprise Homepage - Business Directory</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <meta http-equiv="Content-Style-Type" content="text/css" /> + + <meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" comment "ICRAonline DE v2.0" l gen true for "http://www.kde.org" r (nz 1 vz 1 lz 1 oz 1 cb 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.kde.org" r (n 0 s 0 v 0 l 0))' /> + + <meta name="trademark" content="KDE e.V." /> + <meta name="description" content="K Desktop Environment Homepage, KDE.org" /> + <meta name="MSSmartTagsPreventParsing" content="true" /> + <meta name="robots" content="all" /> + + <link rel="shortcut icon" href="favicon.ico" /> + +<link rel="stylesheet" media="screen" type="text/css" title="Default: KDE Window Colors" href="/media/styles/standard.css" /> +<link rel="alternate stylesheet" media="screen" type="text/css" title="Black and white" href="/media/styles/blackwhite.css" /> +<link rel="alternate stylesheet" media="screen" type="text/css" title="Blue, mellow" href="/media/styles/bluemellow.css" /><head> + <title>KDE::Enterprise Homepage - Business Directory</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + + <meta http-equiv="Content-Style-Type" content="text/css" /> + + <meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" comment "ICRAonline DE v2.0" l gen true for "http://www.kde.org" r (nz 1 vz 1 lz 1 oz 1 cb 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.kde.org" r (n 0 s 0 v 0 l 0))' /> + + <meta name="trademark" content="KDE e.V." /> + <meta name="description" content="K Desktop Environment Homepage, KDE.org" /> + <meta name="MSSmartTagsPreventParsing" content="true" /> + <meta name="robots" content="all" /> + + <link rel="shortcut icon" href="favicon.ico" /> + +<link rel="stylesheet" media="screen" type="text/css" title="Default: KDE Window Colors" href="/media/styles/standard.css" /> +<link rel="alternate stylesheet" media="screen" type="text/css" title="Black and white" href="/media/styles/blackwhite.css" /> +<link rel="alternate stylesheet" media="screen" type="text/css" title="Blue, mellow" href="/media/styles/bluemellow.css" /> +<link rel="alternate stylesheet" media="screen" type="text/css" title="Classic Blue" href="/media/styles/classic.css" /> ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits