[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - 29 commits - download.lst editeng/source external/apr external/cairo external/mdnsresponder extras/source filter/source helpcontent2 include/com include/oox jurt/com lotuswordpro/source oox/source sc/qa sc/source sc/uiconfig sd/qa sfx2/source svx/source sw/CppunitTest_sw_ooxmlimport2.mk sw/qa sw/source toolkit/CppunitTest_toolkit.mk toolkit/qa toolkit/source uui/source writerfilter/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Mar 12 09:56:40 UTC 2019
dev/null |binary
download.lst | 18 -
editeng/source/misc/svxacorr.cxx | 3
external/apr/ExternalProject_apr.mk | 1
external/cairo/ExternalPackage_cairo.mk | 2
external/mdnsresponder/UnpackedTarball_mDNSResponder.mk | 5
external/mdnsresponder/mDNSResponder_Win32_SOCKET.patch.1 | 85 -----
external/mdnsresponder/mDNSResponder_Win32_buildfix.patch.1 | 16
extras/source/templates/presnt/Alizarin/styles.xml | 12
extras/source/templates/presnt/Classy_Red/styles.xml | 4
extras/source/templates/presnt/Midnightblue/styles.xml | 4
extras/source/templates/presnt/Vivid/styles.xml | 4
filter/source/svg/svgexport.cxx | 20 -
helpcontent2 | 2
include/com/sun/star/uno/Sequence.hxx | 4
include/oox/drawingml/drawingmltypes.hxx | 7
include/oox/drawingml/shape.hxx | 10
jurt/com/sun/star/lib/util/AsynchronousFinalizer.java | 4
lotuswordpro/source/filter/tocread.cxx | 4
oox/source/drawingml/diagram/diagram.cxx | 11
oox/source/drawingml/diagram/diagram.hxx | 8
oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 204 ++++++++++--
oox/source/drawingml/diagram/diagramlayoutatoms.hxx | 31 +
oox/source/drawingml/diagram/layoutatomvisitors.cxx | 7
oox/source/drawingml/diagram/layoutnodecontext.cxx | 17 -
oox/source/drawingml/shape.cxx | 7
oox/source/drawingml/table/tableproperties.cxx | 77 +++-
sc/qa/extras/anchor.cxx | 62 +++
sc/source/core/data/drwlayer.cxx | 15
sc/source/ui/docshell/docsh4.cxx | 2
sc/uiconfig/scalc/ui/changesourcedialog.ui | 2
sd/qa/unit/SVGExportTests.cxx | 15
sd/qa/unit/data/odp/textbox-link-javascript.odp |binary
sd/qa/unit/data/pptx/smartart-cycle-matrix.pptx |binary
sd/qa/unit/data/pptx/smartart-picture-strip.pptx |binary
sd/qa/unit/data/pptx/tdf123090.pptx |binary
sd/qa/unit/import-tests-smartart.cxx | 178 ++++++++++
sd/qa/unit/import-tests.cxx | 31 +
sfx2/source/doc/sfxbasemodel.cxx | 14
svx/source/dialog/hdft.cxx | 2
svx/source/table/cellcursor.cxx | 1
svx/source/table/tablecontroller.cxx | 1
svx/source/xml/xmlgrhlp.cxx | 1
sw/CppunitTest_sw_ooxmlimport2.mk | 1
sw/qa/extras/odfimport/data/tdf123829.odt |binary
sw/qa/extras/odfimport/odfimport.cxx | 11
sw/qa/extras/ooxmlimport/data/tdf121440.docx |binary
sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 17 +
sw/source/filter/xml/xmlimp.cxx | 11
sw/source/uibase/docvw/HeaderFooterWin.cxx | 52 ---
toolkit/CppunitTest_toolkit.mk | 5
toolkit/qa/cppunit/Dialog.cxx | 82 ++++
toolkit/source/controls/unocontrol.cxx | 10
uui/source/lockcorrupt.cxx | 2
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 6
55 files changed, 825 insertions(+), 263 deletions(-)
New commits:
commit f74e8862400b6dbb17063543f07e75b71dd3054e
Merge: aa773560eef3 f053400c3f8c
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Tue Mar 12 08:25:56 2019 +0100
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Tue Mar 12 08:25:56 2019 +0100
Merge branch 'libreoffice-6-1'
into distro/lhm/libreoffice-6-1+backports
Change-Id: If99b94efb048e5eb4d8b92832ff5ce59022da817
commit f053400c3f8c89ae122387dc64c63d2cfba86bbb
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Mar 6 12:03:32 2019 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Tue Mar 12 04:15:07 2019 +0100
tdf#116195 sw: remove DisableOffPagePositioning handling from ODF import
SwXMLImport::SetConfigurationSettings() needs to handle only those
settings for which the default is different vs. old OOo/LO versions;
DisableOffPagePositioning however defaults to false, so we can just rely
on that default. The inverted bDisableOffPagePositioning check is
wrong.
(regression from fe3d5766fa3c42f6cf8d1ea47af820e0b1c1cf48)
Change-Id: I300fa597f58b586b49089bb555a00a6923862abe
Reviewed-on: https://gerrit.libreoffice.org/68801
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit 8f3df3a5a1570eea4d931f737c474df8601377ec)
Reviewed-on: https://gerrit.libreoffice.org/69037
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index d838a8adb8a6..1f4d243f6c93 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1358,7 +1358,6 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
aExcludeWhenNotLoadingUserSettings.insert("TabOverMargin");
aExcludeWhenNotLoadingUserSettings.insert("PropLineSpacingShrinksFirstLine");
aExcludeWhenNotLoadingUserSettings.insert("SubtractFlysAnchoredAtFlys");
- aExcludeWhenNotLoadingUserSettings.insert("DisableOffPagePositioning");
sal_Int32 nCount = aConfigProps.getLength();
const PropertyValue* pValues = aConfigProps.getConstArray();
@@ -1392,7 +1391,6 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
bool bTabOverMargin = false;
bool bPropLineSpacingShrinksFirstLine = false;
bool bSubtractFlysAnchoredAtFlys = false;
- bool bDisableOffPagePositioning = false;
bool bCollapseEmptyCellPara = false;
const PropertyValue* currentDatabaseDataSource = nullptr;
@@ -1486,8 +1484,6 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
bPropLineSpacingShrinksFirstLine = true;
else if (pValues->Name == "SubtractFlysAnchoredAtFlys")
bSubtractFlysAnchoredAtFlys = true;
- else if (pValues->Name == "DisableOffPagePositioning")
- bDisableOffPagePositioning = true;
else if (pValues->Name == "CollapseEmptyCellPara")
bCollapseEmptyCellPara = true;
}
@@ -1650,9 +1646,6 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
if (!bSubtractFlysAnchoredAtFlys)
xProps->setPropertyValue("SubtractFlysAnchoredAtFlys", makeAny(true));
- if ( bDisableOffPagePositioning )
- xProps->setPropertyValue("DisableOffPagePositioning", makeAny(true));
-
if (!bCollapseEmptyCellPara)
xProps->setPropertyValue("CollapseEmptyCellPara", makeAny(false));
commit 4be972520e040ab3403645a7e266ce7316dbe38a
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Mon Mar 4 17:15:34 2019 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon Mar 11 12:15:50 2019 +0100
tdf#123772 Add test
Reviewed-on: https://gerrit.libreoffice.org/68701
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
(cherry picked from commit 9c2cf30333a3d1434c4184ed7a1e824c9fa3abb5)
Change-Id: Id46bf2b293c4465f5c58f503c75904639d59f168
Reviewed-on: https://gerrit.libreoffice.org/68900
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/toolkit/CppunitTest_toolkit.mk b/toolkit/CppunitTest_toolkit.mk
index c2c804b38a31..5afa7a616188 100644
--- a/toolkit/CppunitTest_toolkit.mk
+++ b/toolkit/CppunitTest_toolkit.mk
@@ -10,6 +10,7 @@
$(eval $(call gb_CppunitTest_CppunitTest,toolkit))
$(eval $(call gb_CppunitTest_add_exception_objects,toolkit, \
+ toolkit/qa/cppunit/Dialog \
toolkit/qa/cppunit/UnitConversion \
))
@@ -32,6 +33,10 @@ $(eval $(call gb_CppunitTest_use_api,toolkit,\
udkapi \
))
+$(eval $(call gb_CppunitTest_use_externals,toolkit,\
+ boost_headers \
+))
+
$(eval $(call gb_CppunitTest_use_ure,toolkit))
$(eval $(call gb_CppunitTest_use_configuration,toolkit))
diff --git a/toolkit/qa/cppunit/Dialog.cxx b/toolkit/qa/cppunit/Dialog.cxx
new file mode 100644
index 000000000000..7689b886c333
--- /dev/null
+++ b/toolkit/qa/cppunit/Dialog.cxx
@@ -0,0 +1,82 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <cppuhelper/implbase.hxx>
+#include <test/bootstrapfixture.hxx>
+#include <unotest/macros_test.hxx>
+
+#include <com/sun/star/awt/UnoControlDialog.hpp>
+#include <com/sun/star/awt/XUnoControlDialog.hpp>
+#include <com/sun/star/awt/XControlModel.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
+#include <com/sun/star/lang/XMultiComponentFactory.hpp>
+
+#include <comphelper/processfactory.hxx>
+#include <toolkit/awt/vclxwindow.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+#include <vcl/vclptr.hxx>
+#include <vcl/window.hxx>
+
+using namespace css;
+
+namespace
+{
+/// Test dialogs constructed via UNO
+class DialogTest : public test::BootstrapFixture, public unotest::MacrosTest
+{
+protected:
+ uno::Reference<uno::XComponentContext> mxContext;
+
+public:
+ void testDialogSizeable();
+ virtual void setUp() override;
+
+ CPPUNIT_TEST_SUITE(DialogTest);
+ CPPUNIT_TEST(testDialogSizeable);
+ CPPUNIT_TEST_SUITE_END();
+};
+
+void DialogTest::setUp()
+{
+ test::BootstrapFixture::setUp();
+
+ mxContext.set(comphelper::getComponentContext(getMultiServiceFactory()));
+}
+
+void DialogTest::testDialogSizeable()
+{
+ uno::Reference<awt::XDialog> xDialog;
+ uno::Reference<lang::XMultiComponentFactory> xFactory(mxContext->getServiceManager(),
+ uno::UNO_QUERY_THROW);
+ uno::Reference<awt::XControlModel> xControlModel(
+ xFactory->createInstanceWithContext("com.sun.star.awt.UnoControlDialogModel", mxContext),
+ uno::UNO_QUERY_THROW);
+
+ uno::Reference<beans::XPropertySet> xPropSet(xControlModel, uno::UNO_QUERY_THROW);
+ xPropSet->setPropertyValue("Sizeable", uno::Any(true));
+
+ uno::Reference<awt::XUnoControlDialog> xControl = awt::UnoControlDialog::create(mxContext);
+ xControl->setModel(xControlModel);
+ uno::Reference<awt::XWindow> xWindow(xControl, uno::UNO_QUERY);
+ xWindow->setVisible(true);
+ xDialog.set(xControl, uno::UNO_QUERY_THROW);
+ xDialog->execute();
+
+ VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(xControl->getPeer());
+ CPPUNIT_ASSERT(pWindow);
+ CPPUNIT_ASSERT(pWindow->GetStyle() & WB_SIZEABLE);
+
+ xDialog->endExecute();
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(DialogTest);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 983a20bd8888fbd51675e32946bb0c73a2a40ea4
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Mon Mar 4 09:38:02 2019 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Sun Mar 10 01:22:33 2019 +0100
Check svg URLs before exporting
Reviewed-on: https://gerrit.libreoffice.org/68668
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
(cherry picked from commit 34ec46571701d639d9bc542b2d19f87a21a83648)
Change-Id: I3b86b6b82318b0d201c3d7db516664520eb47bed
Reviewed-on: https://gerrit.libreoffice.org/68733
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 16d43eb24eb3..822d50be0e4a 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -46,6 +46,7 @@
#include <comphelper/sequenceashashmap.hxx>
#include <i18nlangtag/lang.h>
#include <svl/zforlist.hxx>
+#include <tools/urlobj.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <xmloff/unointerfacetouniqueidentifiermapper.hxx>
#include <xmloff/nmspmap.hxx>
@@ -1809,13 +1810,18 @@ bool SVGFilter::implExportShape( const Reference< css::drawing::XShape >& rxShap
if( !aBookmark.isEmpty() )
{
- mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xlink:href", aBookmark);
- SvXMLElementExport alinkA( *mpSVGExport, XML_NAMESPACE_NONE, "a", true, true );
- mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf,
- 0xffffffff,
- pElementId,
- &rxShape,
- pEmbeddedBitmapsMtf );
+ INetURLObject aINetURLObject(aBookmark);
+ if (!aINetURLObject.HasError()
+ && aINetURLObject.GetProtocol() != INetProtocol::Javascript)
+ {
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xlink:href", aBookmark);
+ SvXMLElementExport alinkA( *mpSVGExport, XML_NAMESPACE_NONE, "a", true, true );
+ mpSVGWriter->WriteMetaFile( aTopLeft, aSize, rMtf,
+ 0xffffffff,
+ pElementId,
+ &rxShape,
+ pEmbeddedBitmapsMtf );
+ }
}
else
{
diff --git a/sd/qa/unit/SVGExportTests.cxx b/sd/qa/unit/SVGExportTests.cxx
index 9afc5cb42a01..8c55bf45d48b 100644
--- a/sd/qa/unit/SVGExportTests.cxx
+++ b/sd/qa/unit/SVGExportTests.cxx
@@ -110,8 +110,23 @@ public:
assertXPath(svgDoc, MAKE_PATH_STRING( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_G[2]/SVG_G/SVG_TEXT/SVG_TSPAN ), "text-decoration", "line-through");
}
+ void testSVGExportJavascriptURL()
+ {
+ executeExport("textbox-link-javascript.odp");
+
+ xmlDocPtr svgDoc = parseXml(maTempFile);
+ CPPUNIT_ASSERT(svgDoc);
+
+ // There should be only one child (no link to javascript url)
+ assertXPathChildren(svgDoc,
+ MAKE_PATH_STRING(/ SVG_SVG / SVG_G[2] / SVG_G / SVG_G / SVG_G / SVG_G
+ / SVG_G[3] / SVG_G),
+ 1);
+ }
+
CPPUNIT_TEST_SUITE(SdSVGFilterTest);
CPPUNIT_TEST(testSVGExportTextDecorations);
+ CPPUNIT_TEST(testSVGExportJavascriptURL);
CPPUNIT_TEST_SUITE_END();
};
diff --git a/sd/qa/unit/data/odp/textbox-link-javascript.odp b/sd/qa/unit/data/odp/textbox-link-javascript.odp
new file mode 100644
index 000000000000..c046cf0c7de5
Binary files /dev/null and b/sd/qa/unit/data/odp/textbox-link-javascript.odp differ
commit d4c6057486f9667e82d7d4810bb2d421071b0eb2
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Wed Mar 6 22:01:15 2019 +0100
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Fri Mar 8 10:54:36 2019 +0100
tdf#121686: fix assert in SvxAutoCorrect::FnChgToEnEmDash (editeng)
See https://bugs.documentfoundation.org/attachment.cgi?id=149773
Change-Id: I1696984a8df1b38a359a8177a5f3670526d2696e
Reviewed-on: https://gerrit.libreoffice.org/68832
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit 67d170868401335434772f1be23d565d23c1fbea)
Reviewed-on: https://gerrit.libreoffice.org/68882
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index b890b5cd0984..737225d31615 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -542,7 +542,8 @@ bool SvxAutoCorrect::FnChgToEnEmDash(
sal_Unicode cCh = rTxt[ nSttPos ];
if( '-' == cCh )
{
- if( ' ' == rTxt[ nSttPos-1 ] &&
+ if( 1 < nEndPos - nSttPos &&
+ ' ' == rTxt[ nSttPos-1 ] &&
'-' == rTxt[ nSttPos+1 ])
{
sal_Int32 n;
commit 0c0cdc8e3fa4566e8f2aee77a584b4ee43faaa2d
Author: Bartosz Kosiorek <gang65 at poczta.onet.pl>
AuthorDate: Mon Mar 4 23:46:52 2019 +0100
Commit: Bartosz Kosiorek <gang65 at poczta.onet.pl>
CommitDate: Thu Mar 7 21:25:21 2019 +0100
tdf#123452 EMF Re-enable compression for image/x-emf files
Change-Id: I9fd801d5eef6c65f8e68e30723415da7b493d767
Reviewed-on: https://gerrit.libreoffice.org/68716
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth at numbertext.org>
(cherry picked from commit df22e97db5b7608b6d53b15b86b5a83610f9c87b)
Reviewed-on: https://gerrit.libreoffice.org/68729
Reviewed-by: Bartosz Kosiorek <gang65 at poczta.onet.pl>
(cherry picked from commit 36f027769ea6aaabb5e993a321d7a56775d4bee1)
Reviewed-on: https://gerrit.libreoffice.org/68730
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 3ebb6730b928..ebcf2334a3b6 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -742,6 +742,7 @@ OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::X
static const char* aCompressiblePics[] =
{
"image/svg+xml",
+ "image/x-emf",
"image/x-wmf",
"image/tiff",
"image/x-eps",
commit a1ec611ea740e56949cf9f80179a90591d4f9dfc
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Tue Mar 5 13:47:10 2019 +0100
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Wed Mar 6 12:32:12 2019 +0100
tdf#123829 Respect CollapseEmptyCellPara setting when reading odf docs
Commit 56b2cf0c10d9caa01ebae1d80465e342d046a85c introduced a "feature"
which would hide an empty line after a table and only make it visible
when the cursor is in it.
So when loading an ODF doc, only enable this feature for which have the
CollapseEmptyCellPara setting set.
Change-Id: Ib4dfbbe8d45eb57547c51c7eee2f81331fc5300e
Reviewed-on: https://gerrit.libreoffice.org/68742
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
(cherry picked from commit 0d2da0acfaa610c690bce552c0ed5df62d4c35cb)
Reviewed-on: https://gerrit.libreoffice.org/68790
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
diff --git a/sw/qa/extras/odfimport/data/tdf123829.odt b/sw/qa/extras/odfimport/data/tdf123829.odt
new file mode 100644
index 000000000000..3219b4156182
Binary files /dev/null and b/sw/qa/extras/odfimport/data/tdf123829.odt differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 88f3564e3be3..9ee4f206f5a5 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/text/PageNumberType.hpp>
#include <com/sun/star/text/VertOrientation.hpp>
+#include <IDocumentSettingAccess.hxx>
#include <wrtsh.hxx>
#include <ndtxt.hxx>
#include <swdtflvr.hxx>
@@ -915,5 +916,15 @@ DECLARE_ODFIMPORT_TEST(testTdf120677, "tdf120677.fodt")
// The document used to hang the layout, consuming memory until OOM
}
+DECLARE_ODFIMPORT_TEST(testTdf123829, "tdf123829.odt")
+{
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(
+ "Compatibility: collapse cell paras should not be set", false,
+ pDoc->getIDocumentSettingAccess().get(DocumentSettingId::COLLAPSE_EMPTY_CELL_PARA));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index e88f90e2c621..d838a8adb8a6 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1393,6 +1393,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
bool bPropLineSpacingShrinksFirstLine = false;
bool bSubtractFlysAnchoredAtFlys = false;
bool bDisableOffPagePositioning = false;
+ bool bCollapseEmptyCellPara = false;
const PropertyValue* currentDatabaseDataSource = nullptr;
const PropertyValue* currentDatabaseCommand = nullptr;
@@ -1487,6 +1488,8 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
bSubtractFlysAnchoredAtFlys = true;
else if (pValues->Name == "DisableOffPagePositioning")
bDisableOffPagePositioning = true;
+ else if (pValues->Name == "CollapseEmptyCellPara")
+ bCollapseEmptyCellPara = true;
}
catch( Exception& )
{
@@ -1650,6 +1653,9 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
if ( bDisableOffPagePositioning )
xProps->setPropertyValue("DisableOffPagePositioning", makeAny(true));
+ if (!bCollapseEmptyCellPara)
+ xProps->setPropertyValue("CollapseEmptyCellPara", makeAny(false));
+
SwDoc *pDoc = getDoc();
SfxPrinter *pPrinter = pDoc->getIDocumentDeviceAccess().getPrinter( false );
if( pPrinter )
commit cd376726cc8dad65d246493fee233c8018123bf1
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Mar 5 13:25:16 2019 +0000
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Wed Mar 6 11:31:36 2019 +0100
Resolves: tdf#123815 null terminator included in string
regression from...
commit 18d636063fd7be165e7888af49372a6e2b851776
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 19 09:46:31 2017 +0100
ofz: use OString instead of bare char*
this is no use to the reporter though, as the document format is
10 and 11 is the oldest the filter will open
Change-Id: I4cdfe92e37f047493a6eab95f0e8e9f5dced1a35
Reviewed-on: https://gerrit.libreoffice.org/68747
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
diff --git a/lotuswordpro/source/filter/tocread.cxx b/lotuswordpro/source/filter/tocread.cxx
index e6af6f42e8f1..b64eec71676f 100644
--- a/lotuswordpro/source/filter/tocread.cxx
+++ b/lotuswordpro/source/filter/tocread.cxx
@@ -296,7 +296,9 @@ CBenTOCReader::ReadTOC()
return Err;
}
- OString sName(sBuffer, Length);
+ OString sName;
+ if (Length)
+ sName = OString(sBuffer, Length - 1);
CUtListElmt * pPrevNamedObjectListElmt;
if (FindNamedObject(&cpContainer->GetNamedObjects(),
commit a02a160c8d5a70b30128c0880ba8853d0dbe0e7c
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Fri Feb 22 17:12:04 2019 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Mon Mar 4 19:11:51 2019 +0100
Related: tdf#117761 oox smartart: backport fixes related to picture strip
This is a combination of 7 commits.
This is the 1st commit:
oox smartart, picture strip: handle bitmap fill of pres nodes
There were two problems here:
1) We did not import bitmap fill from presentation nodes.
2) Presentation nodes contained properties with reference semantics, so
if you set a bitmap fill for a first and a second shape, then at the end
both shapes contained the second bitmap.
With this, both bitmaps are imported exactly once.
(cherry picked from commit 333e9ea15bb57cf1c87ac2ea150de1e3fd79cfcb)
This is the commit #2:
oox smartart, picture strip: fetch # of children only once in snake algo
No functional changes intended.
(cherry picked from commit 90372d52fdcc378473b89f4e6f2de0e206c110ef)
This is the commit #3:
oox smartart, picture strip: expose aspect ratio of children for snake algo
The aspect ratio request of the Shape is not yet used in
AlgAtom::layoutShape(), though.
The heavy-lifting is needed, because the number of cols/rows in the
snake algorithm depends on the aspect ratio request from the child
algorithm, so need to transfer the aspect ratio from child algorithm ->
layout node -> shape -> parent algorithm.
Still no functional changes intended.
(cherry picked from commit a1e10b7968fbf4dba962349be8a6dfb0cb1d3176)
This is the commit #4:
oox smartart, picture strip: fix too many columns with aspect ratio request
The bugdoc has 3 items in the picture strip and PowerPoint laid this out
as a single column with 3 rows (as a snake algorithm). We used to put
the first two items to the first row and the third item to the second
row.
Improve out layout by taking into account what aspect ratio the child
algorithms request: this way it's obvious that we should use a single
column in case we have a large enough aspect ratio and few enough items.
(PowerPoint also uses multiple columns without the aspect ratio
request.)
(cherry picked from commit 159e33ec661b2ce038b2642b2f30600ce7901d1b)
This is the commit #5:
oox smartart, picture strip: fix lack of spacing around the picture list
The snake algorithm in PowerPoint seem to interpret spacing as follows:
if you have N elements, then there should be the requested amount of
spacing between the elements, and also double amount of spacing around
the actual list of elements.
With this, the SmartArt and the title shape in the bugdoc no longer
overlaps.
(cherry picked from commit 0a29c928afa74123bca05dc089c751603d368467)
This is the commit #6:
oox smartart, picture strip: fix lack of margin in text shapes
Shape text has two kind of spacing inside the shape's bounding box: the
shape-level margin and the paragraph-level one. Only the second was
handled in the tx algorithm so far, add support for the first.
The margins taken from constraints were way large by default: the only
explanation I found for that is that SmartArt layout sometimes
calculates in MMs, sometimes in Points, and the ratio between the two is
exactly the Impress / PowerPoint margin. So assume that indeed that unit
difference is the reason for the smaller in-PowerPoint margin values and
do the same on our side.
(cherry picked from commit 279c7f83a57c4d3991930ee80e9d9c287c21270a)
This is the commit #7:
oox smartart, picture strip: fix too wide child shapes
Once the constraints determine the size, the aspect ratio may shrink one
dimension to achieve the requested ratio. Implement the case where a >1
ratio shrinks the width, so the container of the image-text shape pair
has correct aspect ratio.
(cherry picked from commit f4fbb127897ea6afe27055d3b6cfcb0441080902)
Change-Id: I7bac764c031e80bac532c4f97ebd5b5096401096
Reviewed-on: https://gerrit.libreoffice.org/68687
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/include/oox/drawingml/drawingmltypes.hxx b/include/oox/drawingml/drawingmltypes.hxx
index c4f05fcdd84e..2abe05767d6a 100644
--- a/include/oox/drawingml/drawingmltypes.hxx
+++ b/include/oox/drawingml/drawingmltypes.hxx
@@ -190,6 +190,13 @@ inline float convertEmuToPoints( sal_Int64 nValue )
return static_cast<float>(nValue) / EMU_PER_PT;
}
+/** Converts the passed double value from points to mm. */
+inline double convertPointToMms(double fValue)
+{
+ constexpr double fFactor = static_cast<double>(EMU_PER_PT) / (EMU_PER_HMM * 100);
+ return fValue * fFactor;
+}
+
/** A structure for a point with 64-bit integer components. */
struct EmuPoint
{
diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx
index 4a571213a090..40a80ae113dc 100644
--- a/include/oox/drawingml/shape.hxx
+++ b/include/oox/drawingml/shape.hxx
@@ -226,6 +226,13 @@ public:
sal_Int32 getDataNodeType() const { return mnDataNodeType; }
+ void setAspectRatio(double fAspectRatio) { mfAspectRatio = fAspectRatio; }
+
+ double getAspectRatio() const { return mfAspectRatio; }
+
+ /// Changes reference semantics to value semantics for fill properties.
+ void cloneFillProperties();
+
protected:
css::uno::Reference< css::drawing::XShape > const &
@@ -348,6 +355,9 @@ private:
/// Type of data node for an in-diagram shape.
sal_Int32 mnDataNodeType = 0;
+
+ /// Aspect ratio for an in-diagram shape.
+ double mfAspectRatio = 0;
};
} }
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 09edf0022259..247b99d0baad 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -65,6 +65,24 @@ bool isFontUnit(sal_Int32 nUnit)
return nUnit == oox::XML_primFontSz || nUnit == oox::XML_secFontSz;
}
+/// Determines which UNO property should be set for a given constraint type.
+sal_Int32 getPropertyFromConstraint(sal_Int32 nConstraint)
+{
+ switch (nConstraint)
+ {
+ case oox::XML_lMarg:
+ return oox::PROP_TextLeftDistance;
+ case oox::XML_rMarg:
+ return oox::PROP_TextRightDistance;
+ case oox::XML_tMarg:
+ return oox::PROP_TextUpperDistance;
+ case oox::XML_bMarg:
+ return oox::PROP_TextLowerDistance;
+ }
+
+ return 0;
+}
+
/// Determines the connector shape type from a linear alg.
sal_Int32 getConnectorType(const oox::drawingml::LayoutNode* pNode)
{
@@ -246,7 +264,7 @@ void LayoutAtom::dump(int level)
pAtom->dump(level + 1);
}
-ForEachAtom::ForEachAtom(const LayoutNode& rLayoutNode, const Reference< XFastAttributeList >& xAttributes) :
+ForEachAtom::ForEachAtom(LayoutNode& rLayoutNode, const Reference< XFastAttributeList >& xAttributes) :
LayoutAtom(rLayoutNode)
{
maIter.loadFromXAttr(xAttributes);
@@ -273,7 +291,7 @@ const std::vector<LayoutAtomPtr>& ChooseAtom::getChildren() const
return maEmptyChildren;
}
-ConditionAtom::ConditionAtom(const LayoutNode& rLayoutNode, bool isElse, const Reference< XFastAttributeList >& xAttributes) :
+ConditionAtom::ConditionAtom(LayoutNode& rLayoutNode, bool isElse, const Reference< XFastAttributeList >& xAttributes) :
LayoutAtom(rLayoutNode),
mIsElse(isElse)
{
@@ -447,6 +465,21 @@ void ConstraintAtom::accept( LayoutAtomVisitor& rVisitor )
void ConstraintAtom::parseConstraint(std::vector<Constraint>& rConstraints,
bool bRequireForName) const
{
+ // Whitelist for cases where empty forName is handled.
+ if (bRequireForName)
+ {
+ switch (maConstraint.mnType)
+ {
+ case XML_sp:
+ case XML_lMarg:
+ case XML_rMarg:
+ case XML_tMarg:
+ case XML_bMarg:
+ bRequireForName = false;
+ break;
+ }
+ }
+
if (bRequireForName && maConstraint.msForName.isEmpty())
return;
@@ -464,7 +497,7 @@ void AlgAtom::accept( LayoutAtomVisitor& rVisitor )
}
void AlgAtom::layoutShape( const ShapePtr& rShape,
- const std::vector<Constraint>& rOwnConstraints ) const
+ const std::vector<Constraint>& rOwnConstraints )
{
// Algorithm result may depend on the parent constraints as well.
std::vector<Constraint> aMergedConstraints;
@@ -860,6 +893,18 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
if (rShape->getChildren().empty() || rShape->getSize().Width == 0 || rShape->getSize().Height == 0)
break;
+ // Parse constraints, only self spacing from height as a start.
+ double fSpaceFromConstraint = 0;
+ for (const auto& rConstr : rConstraints)
+ {
+ if (rConstr.mnRefType == XML_h)
+ {
+ if (rConstr.mnType == XML_sp && rConstr.msForName.isEmpty())
+ fSpaceFromConstraint = rConstr.mfFactor;
+ }
+ }
+ bool bSpaceFromConstraints = fSpaceFromConstraint != 0;
+
const sal_Int32 nDir = maMap.count(XML_grDir) ? maMap.find(XML_grDir)->second : XML_tL;
sal_Int32 nIncX = 1;
sal_Int32 nIncY = 1;
@@ -871,38 +916,67 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
case XML_bR: nIncX = -1; nIncY = -1; break;
}
- // TODO: get values from constraints
sal_Int32 nCount = rShape->getChildren().size();
- double fSpace = 0.3;
+ // Defaults in case not provided by constraints.
+ double fSpace = bSpaceFromConstraints ? fSpaceFromConstraint : 0.3;
double fAspectRatio = 0.54; // diagram should not spill outside, earlier it was 0.6
sal_Int32 nCol = 1;
sal_Int32 nRow = 1;
- for ( ; nRow<nCount; nRow++)
+ double fChildAspectRatio = rShape->getChildren()[0]->getAspectRatio();
+ if (nCount <= fChildAspectRatio)
+ // Child aspect ratio request (width/height) is N, and we have at most N shapes.
+ // This means we don't need multiple columns.
+ nRow = nCount;
+ else
{
- nCol = (nCount+nRow-1) / nRow;
- const double fShapeHeight = rShape->getSize().Height;
- const double fShapeWidth = rShape->getSize().Width;
- if ((fShapeHeight / nCol) / (fShapeWidth / nRow) >= fAspectRatio)
- break;
+ for ( ; nRow<nCount; nRow++)
+ {
+ nCol = (nCount+nRow-1) / nRow;
+ const double fShapeHeight = rShape->getSize().Height;
+ const double fShapeWidth = rShape->getSize().Width;
+ if ((fShapeHeight / nCol) / (fShapeWidth / nRow) >= fAspectRatio)
+ break;
+ }
}
SAL_INFO("oox.drawingml", "Snake layout grid: " << nCol << "x" << nRow);
sal_Int32 nWidth = rShape->getSize().Width / (nCol + (nCol-1)*fSpace);
- const awt::Size aChildSize(nWidth, nWidth * fAspectRatio);
+ awt::Size aChildSize(nWidth, nWidth * fAspectRatio);
+ if (nCol == 1 && nRow > 1)
+ {
+ // We have a single column, so count the height based on the parent height, not
+ // based on width.
+ // Space occurs inside children; also double amount of space is needed outside (on
+ // both sides), if the factor comes from a constraint.
+ sal_Int32 nNumSpaces = -1;
+ if (bSpaceFromConstraints)
+ nNumSpaces += 4;
+ sal_Int32 nHeight
+ = rShape->getSize().Height / (nRow + (nRow + nNumSpaces) * fSpace);
+
+ if (fChildAspectRatio > 1)
+ {
+ // Shrink width if the aspect ratio requires it.
+ nWidth = std::min(rShape->getSize().Width,
+ static_cast<sal_Int32>(nHeight * fChildAspectRatio));
+ aChildSize = awt::Size(nWidth, nHeight);
+ }
+ }
awt::Point aCurrPos(0, 0);
if (nIncX == -1)
aCurrPos.X = rShape->getSize().Width - aChildSize.Width;
if (nIncY == -1)
aCurrPos.Y = rShape->getSize().Height - aChildSize.Height;
+ else if (bSpaceFromConstraints)
+ // Initial vertical offset to have upper spacing (outside, so double amount).
+ aCurrPos.Y = aChildSize.Height * fSpace * 2;
sal_Int32 nStartX = aCurrPos.X;
sal_Int32 nColIdx = 0,index = 0;
- sal_Int32 num = rShape->getChildren().size();
-
const sal_Int32 aContDir = maMap.count(XML_contDir) ? maMap.find(XML_contDir)->second : XML_sameDir;
switch(aContDir)
@@ -922,7 +996,7 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
if(++nColIdx == nCol) // condition for next row
{
// if last row, then position children according to number of shapes.
- if((index+1)%nCol!=0 && (index+1)>=3 && ((index+1)/nCol+1)==nRow && num!=nRow*nCol)
+ if((index+1)%nCol!=0 && (index+1)>=3 && ((index+1)/nCol+1)==nRow && nCount!=nRow*nCol)
// position first child of last row
aCurrPos.X = nStartX + (nIncX * (aChildSize.Width + fSpace*aChildSize.Width))/2;
else
@@ -961,10 +1035,10 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
if(++nColIdx == nCol) // condition for next row
{
// if last row, then position children according to number of shapes.
- if((index+1)%nCol!=0 && (index+1)>=4 && ((index+1)/nCol+1)==nRow && num!=nRow*nCol && ((index/nCol)+1)%2==0)
+ if((index+1)%nCol!=0 && (index+1)>=4 && ((index+1)/nCol+1)==nRow && nCount!=nRow*nCol && ((index/nCol)+1)%2==0)
// position first child of last row
aCurrPos.X -= aChildSize.Width*3/2;
- else if((index+1)%nCol!=0 && (index+1)>=4 && ((index+1)/nCol+1)==nRow && num!=nRow*nCol && ((index/nCol)+1)%2!=0)
+ else if((index+1)%nCol!=0 && (index+1)>=4 && ((index+1)/nCol+1)==nRow && nCount!=nRow*nCol && ((index/nCol)+1)%2!=0)
aCurrPos.X = nStartX + (nIncX * (aChildSize.Width + fSpace*aChildSize.Width))/2;
else if(((index/nCol)+1)%2!=0)
aCurrPos.X = nStartX;
@@ -997,6 +1071,29 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
case XML_tx:
{
// adjust text alignment
+
+ // Parse constraints, only self margins as a start.
+ for (const auto& rConstr : rConstraints)
+ {
+ if (rConstr.mnRefType == XML_w)
+ {
+ if (!rConstr.msForName.isEmpty())
+ continue;
+
+ sal_Int32 nProperty = getPropertyFromConstraint(rConstr.mnType);
+ if (!nProperty)
+ continue;
+
+ // PowerPoint takes size as points, but gives margin as MMs.
+ double fFactor = convertPointToMms(rConstr.mfFactor);
+
+ // DrawingML works in EMUs, UNO API works in MM100s.
+ sal_Int32 nValue = rShape->getSize().Width * fFactor / EMU_PER_HMM;
+
+ rShape->getShapeProperties().setProperty(nProperty, nValue);
+ }
+ }
+
// TODO: adjust text size to fit shape
TextBodyPtr pTextBody = rShape->getTextBody();
if (!pTextBody ||
@@ -1220,6 +1317,8 @@ bool LayoutNode::setupShape( const ShapePtr& rShape, const dgm::Point* pPresNode
" processing shape type "
<< rShape->getCustomShapeProperties()->getShapePresetType()
<< " for layout node named \"" << msName << "\"");
+ if (pPresNode->mpShape)
+ rShape->getFillProperties().assignUsed(pPresNode->mpShape->getFillProperties());
}
// TODO(Q1): apply styling & coloring - take presentation
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
index 75149a5cbecd..9b184f917f17 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
@@ -91,10 +91,10 @@ typedef std::shared_ptr< LayoutAtom > LayoutAtomPtr;
class LayoutAtom
{
public:
- LayoutAtom(const LayoutNode& rLayoutNode) : mrLayoutNode(rLayoutNode) {}
+ LayoutAtom(LayoutNode& rLayoutNode) : mrLayoutNode(rLayoutNode) {}
virtual ~LayoutAtom() { }
- const LayoutNode& getLayoutNode() const
+ LayoutNode& getLayoutNode()
{ return mrLayoutNode; }
/** visitor acceptance
@@ -127,7 +127,7 @@ public:
void dump(int level = 0);
protected:
- const LayoutNode& mrLayoutNode;
+ LayoutNode& mrLayoutNode;
std::vector< LayoutAtomPtr > mpChildNodes;
std::weak_ptr<LayoutAtom> mpParent;
OUString msName;
@@ -137,7 +137,7 @@ class ConstraintAtom
: public LayoutAtom
{
public:
- ConstraintAtom(const LayoutNode& rLayoutNode) : LayoutAtom(rLayoutNode) {}
+ ConstraintAtom(LayoutNode& rLayoutNode) : LayoutAtom(rLayoutNode) {}
virtual void accept( LayoutAtomVisitor& ) override;
Constraint& getConstraint()
{ return maConstraint; }
@@ -150,7 +150,7 @@ class AlgAtom
: public LayoutAtom
{
public:
- AlgAtom(const LayoutNode& rLayoutNode) : LayoutAtom(rLayoutNode), mnType(0), maMap() {}
+ AlgAtom(LayoutNode& rLayoutNode) : LayoutAtom(rLayoutNode), mnType(0), maMap() {}
typedef std::map<sal_Int32,sal_Int32> ParamMap;
@@ -161,7 +161,7 @@ public:
void addParam( sal_Int32 nType, sal_Int32 nVal )
{ maMap[nType]=nVal; }
void layoutShape( const ShapePtr& rShape,
- const std::vector<Constraint>& rConstraints ) const;
+ const std::vector<Constraint>& rConstraints );
/// Gives access to <dgm:alg type="..."/>.
sal_Int32 getType() const { return mnType; }
@@ -171,6 +171,8 @@ public:
void setAspectRatio(double fAspectRatio) { mfAspectRatio = fAspectRatio; }
+ double getAspectRatio() const { return mfAspectRatio; }
+
private:
sal_Int32 mnType;
ParamMap maMap;
@@ -184,7 +186,7 @@ class ForEachAtom
: public LayoutAtom
{
public:
- explicit ForEachAtom(const LayoutNode& rLayoutNode, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttributes);
+ explicit ForEachAtom(LayoutNode& rLayoutNode, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttributes);
IteratorAttr & iterator()
{ return maIter; }
@@ -200,7 +202,7 @@ class ConditionAtom
: public LayoutAtom
{
public:
- explicit ConditionAtom(const LayoutNode& rLayoutNode, bool isElse, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttributes);
+ explicit ConditionAtom(LayoutNode& rLayoutNode, bool isElse, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttributes);
virtual void accept( LayoutAtomVisitor& ) override;
bool getDecision() const;
private:
@@ -220,7 +222,7 @@ class ChooseAtom
: public LayoutAtom
{
public:
- ChooseAtom(const LayoutNode& rLayoutNode)
+ ChooseAtom(LayoutNode& rLayoutNode)
: LayoutAtom(rLayoutNode)
#if defined __clang__ && __clang_major__ == 3 && __clang_minor__ == 8
, maEmptyChildren()
@@ -264,6 +266,10 @@ public:
const LayoutNode* getParentLayoutNode() const;
+ void setAlgAtom(AlgAtomPtr pAlgAtom) { mpAlgAtom = pAlgAtom; }
+
+ AlgAtomPtr getAlgAtom() const { return mpAlgAtom.lock(); }
+
private:
const Diagram& mrDgm;
VarMap mVariables;
@@ -272,6 +278,7 @@ private:
ShapePtr mpExistingShape;
std::vector<ShapePtr> mpNodeShapes;
sal_Int32 mnChildOrder;
+ std::weak_ptr<AlgAtom> mpAlgAtom;
};
typedef std::shared_ptr< LayoutNode > LayoutNodePtr;
@@ -280,7 +287,7 @@ class ShapeAtom
: public LayoutAtom
{
public:
- ShapeAtom(const LayoutNode& rLayoutNode, const ShapePtr& pShape) : LayoutAtom(rLayoutNode), mpShapeTemplate(pShape) {}
+ ShapeAtom(LayoutNode& rLayoutNode, const ShapePtr& pShape) : LayoutAtom(rLayoutNode), mpShapeTemplate(pShape) {}
virtual void accept( LayoutAtomVisitor& ) override;
const ShapePtr& getShapeTemplate() const
{ return mpShapeTemplate; }
diff --git a/oox/source/drawingml/diagram/layoutatomvisitors.cxx b/oox/source/drawingml/diagram/layoutatomvisitors.cxx
index e2d6c4681b5c..4e69e8c8725b 100644
--- a/oox/source/drawingml/diagram/layoutatomvisitors.cxx
+++ b/oox/source/drawingml/diagram/layoutatomvisitors.cxx
@@ -131,6 +131,8 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom)
if (rAtom.setupShape(pShape, pNewNode))
{
pShape->setInternalName(rAtom.getName());
+ if (AlgAtomPtr pAlgAtom = rAtom.getAlgAtom())
+ pShape->setAspectRatio(pAlgAtom->getAspectRatio());
rAtom.addNodeShape(pShape);
}
}
@@ -151,6 +153,8 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom)
if (rAtom.setupShape(pShape, pNewNode))
{
pShape->setInternalName(rAtom.getName());
+ if (AlgAtomPtr pAlgAtom = rAtom.getAlgAtom())
+ pShape->setAspectRatio(pAlgAtom->getAspectRatio());
pCurrParent->addChild(pShape);
pCurrParent = pShape;
rAtom.addNodeShape(pShape);
@@ -270,6 +274,9 @@ void ShapeTemplateVisitor::visit(ShapeAtom& rAtom)
// TODO(F3): cloned shape shares all properties by reference,
// don't change them!
mpShape.reset(new Shape(pCurrShape));
+ // Fill properties have to be changed as sometimes only the presentation node contains the blip
+ // fill, unshare those.
+ mpShape->cloneFillProperties();
}
void ShapeLayoutingVisitor::defaultVisit(LayoutAtom const & rAtom)
diff --git a/oox/source/drawingml/diagram/layoutnodecontext.cxx b/oox/source/drawingml/diagram/layoutnodecontext.cxx
index 24264135478b..646ab5ecd3da 100644
--- a/oox/source/drawingml/diagram/layoutnodecontext.cxx
+++ b/oox/source/drawingml/diagram/layoutnodecontext.cxx
@@ -230,6 +230,7 @@ LayoutNodeContext::onCreateContext( ::sal_Int32 aElement,
// CT_Algorithm
AlgAtomPtr pAtom( new AlgAtom(mpNode->getLayoutNode()) );
LayoutAtom::connect(mpNode, pAtom);
+ mpNode->getLayoutNode().setAlgAtom(pAtom);
return new AlgorithmContext( *this, rAttribs, pAtom );
}
case DGM_TOKEN( choose ):
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 55d154642960..4c552194b08a 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -178,6 +178,7 @@ Shape::Shape( const ShapePtr& pSourceShape )
, mnZOrder(pSourceShape->mnZOrder)
, mnZOrderOff(pSourceShape->mnZOrderOff)
, mnDataNodeType(pSourceShape->mnDataNodeType)
+, mfAspectRatio(pSourceShape->mfAspectRatio)
{}
Shape::~Shape()
@@ -1806,6 +1807,12 @@ uno::Sequence< uno::Sequence< uno::Any > > Shape::resolveRelationshipsOfTypeFro
return xRelListTemp;
}
+void Shape::cloneFillProperties()
+{
+ auto pFillProperties = std::make_shared<FillProperties>();
+ pFillProperties->assignUsed(*mpFillPropertiesPtr);
+ mpFillPropertiesPtr = pFillProperties;
+}
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/qa/unit/data/pptx/smartart-picture-strip.pptx b/sd/qa/unit/data/pptx/smartart-picture-strip.pptx
new file mode 100644
index 000000000000..bfb8d4f2c1bd
Binary files /dev/null and b/sd/qa/unit/data/pptx/smartart-picture-strip.pptx differ
diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx
index 29f998ce6f43..b1ced877c00d 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -15,6 +15,7 @@
#include <com/sun/star/text/XText.hpp>
#include <comphelper/sequenceashashmap.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
using namespace ::com::sun::star;
@@ -52,6 +53,7 @@ public:
void testContinuousBlockProcess();
void testOrgChart();
void testCycleMatrix();
+ void testPictureStrip();
CPPUNIT_TEST_SUITE(SdImportTestSmartArt);
@@ -69,6 +71,7 @@ public:
CPPUNIT_TEST(testContinuousBlockProcess);
CPPUNIT_TEST(testOrgChart);
CPPUNIT_TEST(testCycleMatrix);
+ CPPUNIT_TEST(testPictureStrip);
CPPUNIT_TEST_SUITE_END();
};
@@ -640,6 +643,88 @@ void SdImportTestSmartArt::testCycleMatrix()
xDocShRef->DoClose();
}
+void SdImportTestSmartArt::testPictureStrip()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(
+ m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-picture-strip.pptx"), PPTX);
+ uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xGroup.is());
+
+ uno::Reference<beans::XPropertySet> xFirstImage(getChildShape(getChildShape(xGroup, 0), 1),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xFirstImage.is());
+ drawing::FillStyle eFillStyle = drawing::FillStyle_NONE;
+ xFirstImage->getPropertyValue("FillStyle") >>= eFillStyle;
+ // Without the accompanying fix in place, this test would have failed: fill style was solid, not
+ // bitmap.
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, eFillStyle);
+
+ uno::Reference<graphic::XGraphic> xGraphic;
+ xFirstImage->getPropertyValue("FillBitmap") >>= xGraphic;
+ Graphic aFirstGraphic(xGraphic);
+
+ uno::Reference<beans::XPropertySet> xSecondImage(getChildShape(getChildShape(xGroup, 1), 1),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xSecondImage.is());
+ eFillStyle = drawing::FillStyle_NONE;
+ xSecondImage->getPropertyValue("FillStyle") >>= eFillStyle;
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, eFillStyle);
+
+ xSecondImage->getPropertyValue("FillBitmap") >>= xGraphic;
+ Graphic aSecondGraphic(xGraphic);
+ // Without the accompanying fix in place, this test would have failed: both xFirstImage and
+ // xSecondImage had the bitmap fill from the second shape.
+ CPPUNIT_ASSERT(aFirstGraphic.GetChecksum() != aSecondGraphic.GetChecksum());
+
+ // Test that the 3 images are in a single column, in 3 rows.
+ uno::Reference<drawing::XShape> xFirstImageShape(xFirstImage, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xFirstImage.is());
+ uno::Reference<drawing::XShape> xSecondImageShape(xSecondImage, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xSecondImage.is());
+ uno::Reference<drawing::XShape> xThirdImageShape(getChildShape(getChildShape(xGroup, 2), 1),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xThirdImageShape.is());
+ // Without the accompanying fix in place, this test would have failed: the first and the second
+ // image were in the same row.
+ CPPUNIT_ASSERT_EQUAL(xFirstImageShape->getPosition().X, xSecondImageShape->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(xSecondImageShape->getPosition().X, xThirdImageShape->getPosition().X);
+ CPPUNIT_ASSERT_GREATER(xFirstImageShape->getPosition().Y, xSecondImageShape->getPosition().Y);
+ CPPUNIT_ASSERT_GREATER(xSecondImageShape->getPosition().Y, xThirdImageShape->getPosition().Y);
+
+ // Make sure that the title shape doesn't overlap with the diagram.
+ // Note that real "no overlap" is asserted here, though in fact what we want is a less strict
+ // condition: that no text part of the title shape and the diagram overlaps.
+ uno::Reference<drawing::XShape> xTitle(getShapeFromPage(1, 0, xDocShRef), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xTitle.is());
+ // Without the accompanying fix in place, this test would have failed with 'Expected greater
+ // than: 2873; Actual : 2320', i.e. the title shape and the diagram overlapped.
+ CPPUNIT_ASSERT_GREATER(xTitle->getPosition().Y + xTitle->getSize().Height,
+ xGroup->getPosition().Y);
+
+ // Make sure that left margin is 60% of width (if you count width in points and margin in mms).
+ uno::Reference<beans::XPropertySet> xFirstText(getChildShape(getChildShape(xGroup, 0), 0),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xFirstText.is());
+ sal_Int32 nTextLeftDistance = 0;
+ xFirstText->getPropertyValue("TextLeftDistance") >>= nTextLeftDistance;
+ uno::Reference<drawing::XShape> xFirstTextShape(xFirstText, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xFirstTextShape.is());
+ sal_Int32 nWidth = xFirstTextShape->getSize().Width;
+ double fFactor = oox::drawingml::convertPointToMms(0.6);
+ // Without the accompanying fix in place, this test would have failed with 'Expected: 3440,
+ // Actual : 263', i.e. the left margin was too small.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(nWidth * fFactor), nTextLeftDistance);
+
+ // Make sure that aspect ratio is not ignored, i.e. width is not larger than height 3 times.
+ uno::Reference<drawing::XShape> xFirstPair = getChildShape(xGroup, 0);
+ awt::Size aFirstPairSize = xFirstPair->getSize();
+ // Without the accompanying fix in place, this test would have failed: bad width was 16932, good
+ // width is 12540, but let's accept 12541 as well.
+ CPPUNIT_ASSERT_LESSEQUAL(aFirstPairSize.Height * 3 + 1, aFirstPairSize.Width);
+
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTestSmartArt);
CPPUNIT_PLUGIN_IMPLEMENT();
commit 3decaa3c549c854c2f59d00d930617c70f5e29db
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Thu Feb 28 21:24:54 2019 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon Mar 4 12:34:02 2019 +0100
tdf#123772 UnoControlDialogModel: Don't ignore property "Sizeable"
which is supposed to make the dialog resizable, but was silently ignored.
Change-Id: Ifa2d2ea70c769f7785ac044ab2b681802c54bc17
Reviewed-on: https://gerrit.libreoffice.org/68515
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
(cherry picked from commit e55c7ff6df82c597763d2eb551f7ccdaa95cd0a9)
Reviewed-on: https://gerrit.libreoffice.org/68529
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index 011aa72e08df..033780d296d4 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -1168,6 +1168,16 @@ void UnoControl::createPeer( const Reference< XToolkit >& rxToolkit, const Refer
aDescr.WindowAttributes |= WindowAttribute::MOVEABLE;
}
+ // Sizeable
+ aPropName = GetPropertyName( BASEPROPERTY_SIZEABLE );
+ if ( xInfo->hasPropertyByName( aPropName ) )
+ {
+ aVal = xPSet->getPropertyValue( aPropName );
+ bool b = bool();
+ if ( ( aVal >>= b ) && b)
+ aDescr.WindowAttributes |= WindowAttribute::SIZEABLE;
+ }
+
// Closeable
aPropName = GetPropertyName( BASEPROPERTY_CLOSEABLE );
if ( xInfo->hasPropertyByName( aPropName ) )
commit be6261d522d24bd574602fee43715d46ea2710b2
Author: Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Mon Feb 25 08:35:54 2019 +0300
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon Mar 4 12:32:45 2019 +0100
tdf#121440 writerfilter: do not use imported style for foot/endnotes
Extra style is causing editing problem near footnote/endnote
references. This behavior is a side effect of
eaa9cf6a3069fba3d82c046f0041bfb537d9e648, allowing emission
of these "technical" styles.
Change-Id: I1885b92814746e7b5cd19f3ddd7bc22eb691615e
Reviewed-on: https://gerrit.libreoffice.org/68304
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
(cherry picked from commit 691ca4e1a3e510d54894a1e7df7fa4ad9f9cba11)
Reviewed-on: https://gerrit.libreoffice.org/68583
diff --git a/sw/CppunitTest_sw_ooxmlimport2.mk b/sw/CppunitTest_sw_ooxmlimport2.mk
index d170cb822b2e..0b53d30b2999 100644
--- a/sw/CppunitTest_sw_ooxmlimport2.mk
+++ b/sw/CppunitTest_sw_ooxmlimport2.mk
@@ -39,6 +39,7 @@ $(eval $(call gb_CppunitTest_use_externals,sw_ooxmlimport2,\
$(eval $(call gb_CppunitTest_set_include,sw_ooxmlimport2,\
-I$(SRCDIR)/sw/inc \
-I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/source/uibase/inc \
-I$(SRCDIR)/sw/qa/extras/inc \
$$(INCLUDE) \
))
diff --git a/sw/qa/extras/ooxmlimport/data/tdf121440.docx b/sw/qa/extras/ooxmlimport/data/tdf121440.docx
new file mode 100644
index 000000000000..023599aec3ff
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf121440.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
index 45480023495f..a5271cd6332e 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
@@ -18,6 +18,7 @@
#endif
#include <swmodeltestbase.hxx>
+#include <wrtsh.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/document/XEmbeddedObjectSupplier2.hpp>
#include <com/sun/star/embed/Aspects.hpp>
@@ -251,6 +252,22 @@ DECLARE_OOXMLIMPORT_TEST(testTdf122224, "tdf122224.docx")
CPPUNIT_ASSERT_EQUAL(OUString("2000"), xCell->getString());
}
+DECLARE_OOXMLIMPORT_TEST(testTdf121440, "tdf121440.docx")
+{
+ // Insert some text in front of footnote
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
+ SwRootFrame* pLayout(pWrtShell->GetLayout());
+ CPPUNIT_ASSERT(!pLayout->IsHideRedlines());
+ pWrtShell->Insert("test");
+
+ // Ensure that inserted text is not superscripted
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(
+ "Inserted text should be not a superscript!", static_cast<sal_Int32>(0),
+ getProperty<sal_Int32>(getRun(getParagraph(1), 1), "CharEscapement"));
+}
+
// tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 82db1031bc88..1ee7cc8600de 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1839,6 +1839,12 @@ void DomainMapper_Impl::PushFootOrEndnote( bool bIsFootnote )
m_aRedlines.push(std::vector< RedlineParamsPtr >());
PropertyMapPtr pTopContext = GetTopContext();
+
+ // Remove style reference, if any. This reference did appear here as a side effect of tdf#43017
+ // Seems it is not required by LO, but causes side effects during editing. So remove it
+ // for footnotes/endnotes to restore original LO behavior here.
+ pTopContext->Erase(PROP_CHAR_STYLE_NAME);
+
uno::Reference< text::XText > xFootnoteText;
if (GetTextFactory().is())
xFootnoteText.set( GetTextFactory()->createInstance(
commit 188fe404ba3157f739ee3e3dd65b42f8013ce39e
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Fri Feb 15 11:31:04 2019 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Mar 4 10:43:53 2019 +0100
tdf#123481 jurt: Avoid thread deadlocking
Change-Id: I7b6454090aeb1046a814520166a5b8c39b716f6d
Reviewed-on: https://gerrit.libreoffice.org/67861
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
(cherry picked from commit ea3c25358e3136cf900bc4e7d1bd6387dcca7883)
Reviewed-on: https://gerrit.libreoffice.org/68660
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/jurt/com/sun/star/lib/util/AsynchronousFinalizer.java b/jurt/com/sun/star/lib/util/AsynchronousFinalizer.java
index 0e7ecc41ba4d..588b8fe388f6 100644
--- a/jurt/com/sun/star/lib/util/AsynchronousFinalizer.java
+++ b/jurt/com/sun/star/lib/util/AsynchronousFinalizer.java
@@ -92,7 +92,9 @@ public final class AsynchronousFinalizer {
done = true;
queue.notify();
}
- thread.join();
+ // tdf#123481 Only join if we are not in our own thread, else we have a deadlock
+ if (Thread.currentThread() != thread)
+ thread.join();
}
/**
commit 01d140e2205306159da57b9ec703e1a54802115c
Author: Aditya <adityasahu1511 at gmail.com>
AuthorDate: Sun Feb 24 21:17:14 2019 +0530
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Fri Mar 1 14:53:39 2019 +0100
tdf#116382 Replace old dialog in header and footer drop-down menu
Remove the Background tabpage in "Border/Background" dialog accessed
from Border and Background menu item in Header/Footer drop-down list
and replace it with the tabpages "Area" and "Transparency" of the dialog
accessed from Page Style > Header > "More.." button.
The old dialog does not have the tabpages "Area" and "Transparency".
In simpler words, the patch is to match both the dialogs
when accessed in two different ways.
Change-Id: Ib84435854389360eba41aecb8578a9a67a92ca1e
Reviewed-on: https://gerrit.libreoffice.org/67483
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj at gmail.com>
(cherry picked from commit 55042cb54fea5f7ad777c03af9bf8197127b6736)
Reviewed-on: https://gerrit.libreoffice.org/68546
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index d23ad52bc89e..661638412180 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -88,7 +88,7 @@ namespace svx {
{
bool bRes = false;
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxBorderBackgroundDlg( pParent, *pBBSet, false/*bEnableDrawingLayerFillStyles*/ ));
+ ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxBorderBackgroundDlg( pParent, *pBBSet, true/*bEnableDrawingLayerFillStyles*/ ));
if ( pDlg->Execute() == RET_OK && pDlg->GetOutputItemSet() )
{
SfxItemIter aIter( *pDlg->GetOutputItemSet() );
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index e1c157ee3afe..824abf938b79 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -11,6 +11,8 @@
#include <strings.hrc>
#include <globals.hrc>
+#include <doc.hxx>
+#include <drawdoc.hxx>
#include <cmdid.h>
#include <DashedLine.hxx>
#include <docsh.hxx>
@@ -414,47 +416,19 @@ void SwHeaderFooterWin::ExecuteCommand(const OString& rIdent)
SwFrameFormat* pHFFormat = const_cast< SwFrameFormat* >( rMaster.GetFooter().GetFooterFormat() );
if ( m_bIsHeader )
pHFFormat = const_cast< SwFrameFormat* >( rMaster.GetHeader().GetHeaderFormat() );
+ SfxItemSet aSet( pHFFormat->GetAttrSet() );
- SfxItemPool* pPool = pHFFormat->GetAttrSet().GetPool();
- SfxItemSet aSet(
- *pPool,
- svl::Items<
- RES_BACKGROUND, RES_SHADOW,
- SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>{});
-
- aSet.Put( pHFFormat->GetAttrSet() );
-
- // Create a box info item... needed by the dialog
- SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
- const SfxPoolItem *pBoxInfo;
- if ( SfxItemState::SET == pHFFormat->GetAttrSet().GetItemState( SID_ATTR_BORDER_INNER,
- true, &pBoxInfo) )
- aBoxInfo = *static_cast<const SvxBoxInfoItem*>(pBoxInfo);
-
- aBoxInfo.SetTable( false );
- aBoxInfo.SetDist( true);
- aBoxInfo.SetMinDist( false );
- aBoxInfo.SetDefDist( MIN_BORDER_DIST );
- aBoxInfo.SetValid( SvxBoxInfoItemValidFlags::DISABLE );
- aSet.Put( aBoxInfo );
-
- if ( svx::ShowBorderBackgroundDlg( this, &aSet ) )
+ // Items to hand over XPropertyList things like XColorList,
+ // XHatchList, XGradientList, and XBitmapList to the Area TabPage:
+ aSet.MergeRange( SID_COLOR_TABLE, SID_PATTERN_LIST );
+ // create needed items for XPropertyList entries from the DrawModel so that
+ // the Area TabPage can access them
+ rSh.GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->PutAreaListItems( aSet );
+
+ if (svx::ShowBorderBackgroundDlg( this, &aSet ))
{
- const SfxPoolItem* pItem;
- if ( SfxItemState::SET == aSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) {
- pHFFormat->SetFormatAttr( *pItem );
- rView.GetDocShell()->SetModified();
- }
-
- if ( SfxItemState::SET == aSet.GetItemState( RES_BOX, false, &pItem ) ) {
- pHFFormat->SetFormatAttr( *pItem );
- rView.GetDocShell()->SetModified();
- }
-
- if ( SfxItemState::SET == aSet.GetItemState( RES_SHADOW, false, &pItem ) ) {
- pHFFormat->SetFormatAttr( *pItem );
- rView.GetDocShell()->SetModified();
- }
+ pHFFormat->SetFormatAttr( aSet );
+ rView.GetDocShell()->SetModified();
}
}
else if (rIdent == "delete")
commit 6360449f8b4a08de114f802f84a15d23103a5f41
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed Feb 27 08:40:04 2019 +0100
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Fri Mar 1 11:11:20 2019 +0100
tdf#123728 Always print on main thread to avoid deadlocks
Using lambda doesn't work on this branch, thus code differs from master commit.
Reviewed-on: https://gerrit.libreoffice.org/68421
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
(cherry picked from commit 110803068b75ffd895a9b1139aee2248d30f085b)
Change-Id: Ia8c2600aee42c3063e18032d1e485ad417ec4639
Reviewed-on: https://gerrit.libreoffice.org/68483
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 752bec0ebc07..72066d250740 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -87,6 +87,7 @@
#include <framework/titlehelper.hxx>
#include <comphelper/numberedcollection.hxx>
#include <unotools/ucbhelper.hxx>
+#include <vcl/threadex.hxx>
#include <sfx2/sfxbasecontroller.hxx>
#include <sfx2/viewfac.hxx>
@@ -1410,15 +1411,24 @@ void SAL_CALL SfxBaseModel::setPrinter(const Sequence< beans::PropertyValue >& r
m_pData->m_xPrintable->setPrinter( rPrinter );
}
+static bool ImplPrintStatic(const Reference<view::XPrintable>& m_xPrintable,
+ const Sequence<beans::PropertyValue>& rOptions)
+{
+ m_xPrintable->print(rOptions);
+ return true;
+}
+
void SAL_CALL SfxBaseModel::print(const Sequence< beans::PropertyValue >& rOptions)
{
SfxModelGuard aGuard( *this );
if ( impl_getPrintHelper() )
- m_pData->m_xPrintable->print( rOptions );
+ {
+ // tdf#123728 Always print on main thread to avoid deadlocks
+ vcl::solarthread::syncExecute(std::bind(&ImplPrintStatic, m_pData->m_xPrintable, rOptions));
+ }
}
-
// XStorable
commit 8ca0c4f23e69a2aae19a9f6899d5c88b0da10b55
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Feb 28 10:55:01 2019 +0200
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Mar 1 00:59:09 2019 +0100
fix LockCorruptQueryBox title
regression from
commit 082e69fefb7439fd4f3d543f0c402039e94c1e9c
Date: Mon Feb 26 16:53:37 2018 +0000
convert various MessBox to weld::MessageDialog
Change-Id: Ia9cef4de4ae9c13201c838f20f0ba6b6cff7f35d
Reviewed-on: https://gerrit.libreoffice.org/68505
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/uui/source/lockcorrupt.cxx b/uui/source/lockcorrupt.cxx
index bba82db1db3f..008d4555a520 100644
--- a/uui/source/lockcorrupt.cxx
+++ b/uui/source/lockcorrupt.cxx
@@ -28,7 +28,7 @@ LockCorruptQueryBox::LockCorruptQueryBox(weld::Window* pParent, const std::local
: m_xQueryBox(Application::CreateMessageDialog(pParent, VclMessageType::Question,
VclButtonsType::NONE, Translate::get(STR_LOCKCORRUPT_MSG, rResLocale)))
{
- m_xQueryBox->set_title(Translate::get(STR_LOCKCORRUPT_MSG, rResLocale));
+ m_xQueryBox->set_title(Translate::get(STR_LOCKCORRUPT_TITLE, rResLocale));
m_xQueryBox->add_button(Translate::get(STR_LOCKCORRUPT_OPENREADONLY_BTN, rResLocale), RET_OK);
m_xQueryBox->add_button(Button::GetStandardText(StandardButtonType::Cancel), RET_CANCEL);
m_xQueryBox->set_default_response(RET_OK);
commit f596b5f923907aae99977fc240a890f11affd386
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Feb 28 11:41:01 2019 +0200
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Feb 28 18:03:51 2019 +0100
fix "doc will be saved" dialog message
looks like a copy/paste error in
commit 942f05996bc287923cdbcae12c64e57adf8ec975
Author: Caolán McNamara <caolanm at redhat.com>
convert remaining ErrorBox to weld::MessageDialog
Change-Id: I52d38311b1e276fd799128e058ea0b9c902aef06
Reviewed-on: https://gerrit.libreoffice.org/68491
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
(cherry picked from commit e76203f45a4c645447f8379ee2123f518a8aca77)
Reviewed-on: https://gerrit.libreoffice.org/68503
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 47992f8ea28d..1d4ad1830372 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -985,7 +985,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
vcl::Window* pWin = GetActiveDialogParent();
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
VclMessageType::Question, VclButtonsType::YesNo,
- ScResId(STR_REIMPORT_AFTER_LOAD)));
+ ScResId(STR_DOC_WILLBESAVED)));
xQueryBox->set_default_response(RET_YES);
if (xQueryBox->run() == RET_NO)
{
commit 405920c587c846ed39d8548ad094081cec0a59cc
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Feb 27 12:18:01 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Feb 28 17:44:40 2019 +0100
openssl: upgrade to release 1.0.2r
Fixes CVE-2019-1559, plus a couple low-severity CVEs.
Change-Id: Icb6849ca5f33cb1169ce303505b2e32636e3b25b
Reviewed-on: https://gerrit.libreoffice.org/68430
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit e3b6c3ec9fd795601b0749675903fb49c72718fd)
Reviewed-on: https://gerrit.libreoffice.org/68441
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/download.lst b/download.lst
index e2008d900008..e9941ccc1725 100644
--- a/download.lst
+++ b/download.lst
@@ -192,8 +192,8 @@ export OFFICEOTRON_SHA256SUM := f2443f27561af52324eee03a1892d9f569adc8db9e7bca55
export OFFICEOTRON_JAR := 8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar
export OPENLDAP_SHA256SUM := cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb897cd5626df3824
export OPENLDAP_TARBALL := openldap-2.4.45.tgz
-export OPENSSL_SHA256SUM := 50a98e07b1a89eb8f6a99477f262df71c6fa7bef77df4dc83025a2845c827d00
-export OPENSSL_TARBALL := openssl-1.0.2p.tar.gz
+export OPENSSL_SHA256SUM := ae51d08bba8a83958e894946f15303ff894d75c2b8bbd44a852b64e3fe11d0d6
+export OPENSSL_TARBALL := openssl-1.0.2r.tar.gz
export ORCUS_SHA256SUM := bc01b1b3e9091416f498840d3c19a1aa2704b448100e7f6b80eefe88aab06d5b
export ORCUS_TARBALL := liborcus-0.13.4.tar.gz
export OWNCLOUD_ANDROID_LIB_SHA256SUM := b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb
commit d8dc108ba083d8e3303a936c090c3e3692c63150
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Feb 13 14:17:46 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Feb 28 17:44:23 2019 +0100
fix Sequence ostream operator<< wrt. const
Change-Id: I0e9cf35b45b0bcd58ce9d987ffb0384afda4c5dd
Reviewed-on: https://gerrit.libreoffice.org/68021
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/com/sun/star/uno/Sequence.hxx b/include/com/sun/star/uno/Sequence.hxx
index 64f84ffc7bc3..e9f5cf73db35 100644
--- a/include/com/sun/star/uno/Sequence.hxx
+++ b/include/com/sun/star/uno/Sequence.hxx
@@ -257,7 +257,7 @@ struct negation : std::integral_constant<bool, !bool(B::value)> { };
@since LibreOffice 6.1
*/
template< typename value_t, typename charT, typename traits >
-inline typename std::enable_if<uno_detail::negation<std::is_same<sal_Int8, value_t>>::value, std::basic_ostream<charT, traits>>::type &operator<<(std::basic_ostream<charT, traits> &os, css::uno::Sequence < value_t > &v)
+inline typename std::enable_if<uno_detail::negation<std::is_same<sal_Int8, value_t>>::value, std::basic_ostream<charT, traits>>::type &operator<<(std::basic_ostream<charT, traits> &os, css::uno::Sequence<value_t> const& v)
{
const value_t *pAry = v.getConstArray();
sal_Int32 nLen = v.getLength();
@@ -266,7 +266,7 @@ inline typename std::enable_if<uno_detail::negation<std::is_same<sal_Int8, value
}
template< typename value_t, typename charT, typename traits >
-inline typename std::enable_if<std::is_same<sal_Int8, value_t>::value, std::basic_ostream<charT, traits>>::type &operator<<(std::basic_ostream<charT, traits> &os, css::uno::Sequence < value_t > &v)
+inline typename std::enable_if<std::is_same<sal_Int8, value_t>::value, std::basic_ostream<charT, traits>>::type &operator<<(std::basic_ostream<charT, traits> &os, css::uno::Sequence<value_t> const& v)
{
// specialisation for signed bytes
const sal_Int8 *pAry = v.getConstArray();
commit 96f039b85ab89159eb1213c44964518ba912f58e
Author: Olivier Hallot <olivier.hallot at libreoffice.org>
AuthorDate: Tue Feb 26 10:49:04 2019 -0300
Commit: Gerrit Code Review <gerrit at gerrit.libreoffice.org>
CommitDate: Thu Feb 28 03:38:55 2019 +0100
Update git submodules
* Update helpcontent2 from branch 'libreoffice-6-1'
- tdf#117890 Remove unhelpful screenshots (1/2)
Change-Id: I8a96220ae688f78fe43d66ab205323f3d4605140
Reviewed-on: https://gerrit.libreoffice.org/68392
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>
(cherry picked from commit c74a4653f50aedfd99ee83a1a841ad5b7886b9be)
Reviewed-on: https://gerrit.libreoffice.org/68481
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/helpcontent2 b/helpcontent2
index f91032998da2..295d7dc808b2 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit f91032998da2655119521039f56984acf4f42ffa
+Subproject commit 295d7dc808b2a22709586cf9c86fb4219a494496
commit f88e42aff3b55fd5b523b10b24fc07714df8879a
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Feb 27 16:56:08 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Feb 27 22:16:59 2019 +0100
add missing responses
Change-Id: I2c24ea46b6e81ed02ae53da5e9ae1b7df85e44a1
Reviewed-on: https://gerrit.libreoffice.org/68456
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
diff --git a/sc/uiconfig/scalc/ui/changesourcedialog.ui b/sc/uiconfig/scalc/ui/changesourcedialog.ui
index f492fe5d1b64..9f2e4c3c2dbc 100644
--- a/sc/uiconfig/scalc/ui/changesourcedialog.ui
+++ b/sc/uiconfig/scalc/ui/changesourcedialog.ui
@@ -147,6 +147,8 @@
</object>
</child>
<action-widgets>
+ <action-widget response="-5">ok</action-widget>
+ <action-widget response="-6">cancel</action-widget>
<action-widget response="-11">help</action-widget>
</action-widgets>
</object>
commit 691f908eb4df8c5a978e85f51218a0edece57ec1
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Feb 20 13:31:44 2019 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Tue Feb 26 09:42:03 2019 +0100
cairo: upgrade to release 1.16.0
This fixes some minor CVEs.
Not including the fix for CVE-2018-18064, which does not affect LO
because we use the default implementation of FT_Memory which uses
free/malloc.
Change-Id: Ic047ed52cff3fdeba068f1b8d303c6c96c69addd
Reviewed-on: https://gerrit.libreoffice.org/68088
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit caeaa7b90e42c60ec407e1f0cd5b5db2b30f55d2)
Reviewed-on: https://gerrit.libreoffice.org/68217
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/download.lst b/download.lst
index 362234fecc16..e2008d900008 100644
--- a/download.lst
+++ b/download.lst
@@ -14,9 +14,9 @@ export BSH_SHA256SUM := 9e93c73e23aff644b17dfff656444474c14150e7f3b38b19635e6222
export BSH_TARBALL := beeca87be45ec87d241ddd0e1bad80c1-bsh-2.0b6-src.zip
export BZIP2_SHA256SUM := a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd
export BZIP2_TARBALL := 00b516f4704d4a7cb50a1d97e6e8e15b-bzip2-1.0.6.tar.gz
-export CAIRO_SHA256SUM := 7623081b94548a47ee6839a7312af34e9322997806948b6eec421a8c6d0594c9
-export CAIRO_VERSION_MICRO := 12
-export CAIRO_TARBALL := cairo-1.15.$(CAIRO_VERSION_MICRO).tar.xz
+export CAIRO_SHA256SUM := 5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331
+export CAIRO_VERSION_MICRO := 0
+export CAIRO_TARBALL := cairo-1.16.$(CAIRO_VERSION_MICRO).tar.xz
export CDR_SHA256SUM := e7a7e8b00a3df5798110024d7061fe9d1c3330277d2e4fa9213294f966a4a66d
export CDR_TARBALL := libcdr-0.1.4.tar.xz
export CLUCENE_SHA256SUM := ddfdc433dd8ad31b5c5819cc4404a8d2127472a3b720d3e744e8c51d79732eab
diff --git a/external/cairo/ExternalPackage_cairo.mk b/external/cairo/ExternalPackage_cairo.mk
index 154c84919a03..3b78a52fed76 100644
--- a/external/cairo/ExternalPackage_cairo.mk
+++ b/external/cairo/ExternalPackage_cairo.mk
@@ -14,7 +14,7 @@ $(eval $(call gb_ExternalPackage_use_external_project,cairo,cairo))
ifneq ($(DISABLE_DYNLOADING),TRUE)
ifneq ($(OS),ANDROID)
-$(eval $(call gb_ExternalPackage_add_file,cairo,$(LIBO_LIB_FOLDER)/libcairo.so.2,src/.libs/libcairo.so.2.115$(CAIRO_VERSION_MICRO).0))
+$(eval $(call gb_ExternalPackage_add_file,cairo,$(LIBO_LIB_FOLDER)/libcairo.so.2,src/.libs/libcairo.so.2.1160$(CAIRO_VERSION_MICRO).0))
endif
endif
commit 7b1eacbac5d104f34b6e35db4430b03a7caf8125
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jul 26 16:04:06 2018 +0100
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Feb 25 10:57:42 2019 +0100
bump to latest cairo
Reviewed-on: https://gerrit.libreoffice.org/58134
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 00f6bec6b70130327313b9e203625272ef05ae93)
fix own-cairo edge case build
Reviewed-on: https://gerrit.libreoffice.org/59663
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 30020423bd76c6770db1627cfec684708ab3427c)
Change-Id: I001da359569d37afe482cdbb50e9c8b3ced24aff
Reviewed-on: https://gerrit.libreoffice.org/68216
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
Tested-by: Jenkins
diff --git a/download.lst b/download.lst
index 2524c42f8cde..362234fecc16 100644
--- a/download.lst
+++ b/download.lst
@@ -14,9 +14,9 @@ export BSH_SHA256SUM := 9e93c73e23aff644b17dfff656444474c14150e7f3b38b19635e6222
export BSH_TARBALL := beeca87be45ec87d241ddd0e1bad80c1-bsh-2.0b6-src.zip
export BZIP2_SHA256SUM := a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd
export BZIP2_TARBALL := 00b516f4704d4a7cb50a1d97e6e8e15b-bzip2-1.0.6.tar.gz
-export CAIRO_SHA256SUM := 7e87878658f2c9951a14fc64114d4958c0e65ac47530b8ac3078b2ce41b66a09
-export CAIRO_VERSION_MICRO := 10
-export CAIRO_TARBALL := cairo-1.14.$(CAIRO_VERSION_MICRO).tar.xz
+export CAIRO_SHA256SUM := 7623081b94548a47ee6839a7312af34e9322997806948b6eec421a8c6d0594c9
+export CAIRO_VERSION_MICRO := 12
+export CAIRO_TARBALL := cairo-1.15.$(CAIRO_VERSION_MICRO).tar.xz
export CDR_SHA256SUM := e7a7e8b00a3df5798110024d7061fe9d1c3330277d2e4fa9213294f966a4a66d
export CDR_TARBALL := libcdr-0.1.4.tar.xz
export CLUCENE_SHA256SUM := ddfdc433dd8ad31b5c5819cc4404a8d2127472a3b720d3e744e8c51d79732eab
diff --git a/external/cairo/ExternalPackage_cairo.mk b/external/cairo/ExternalPackage_cairo.mk
index 3d0f1a9d4e54..154c84919a03 100644
--- a/external/cairo/ExternalPackage_cairo.mk
+++ b/external/cairo/ExternalPackage_cairo.mk
@@ -14,7 +14,7 @@ $(eval $(call gb_ExternalPackage_use_external_project,cairo,cairo))
ifneq ($(DISABLE_DYNLOADING),TRUE)
ifneq ($(OS),ANDROID)
-$(eval $(call gb_ExternalPackage_add_file,cairo,$(LIBO_LIB_FOLDER)/libcairo.so.2,src/.libs/libcairo.so.2.11400.$(CAIRO_VERSION_MICRO)))
+$(eval $(call gb_ExternalPackage_add_file,cairo,$(LIBO_LIB_FOLDER)/libcairo.so.2,src/.libs/libcairo.so.2.115$(CAIRO_VERSION_MICRO).0))
endif
endif
commit a48ca23f18ba450a55515cd93fc4fdc184f3853f
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Feb 20 15:23:11 2019 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Fri Feb 22 12:53:06 2019 +0100
mDNSResponder: upgrade to release 878.200.35
Apple can't afford the costly GPG licenses to sign releases apparently,
but the sha256 matches some OpenWRT and FreshPorts repos...
Fixes CVE-2015-7988.
Removing windows build patches, fixed upstream (except for the last hunk
of the SOCKET patch, but that is in code that is only used on MacOSX).
Change-Id: I9fdba5929badb75f995c66da0850d188780e7beb
Reviewed-on: https://gerrit.libreoffice.org/68092
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit 3a85c2db176db708c0ff9401c40858eb60e80f1e)
Reviewed-on: https://gerrit.libreoffice.org/68139
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/download.lst b/download.lst
index 09e420097c38..2524c42f8cde 100644
--- a/download.lst
+++ b/download.lst
@@ -168,8 +168,8 @@ export MARIADB_CONNECTOR_C_SHA256SUM := fd2f751dea049c1907735eb236aeace1d811d6a8
export MARIADB_CONNECTOR_C_TARBALL := a233181e03d3c307668b4c722d881661-mariadb_client-2.0.0-src.tar.gz
export MDDS_SHA256SUM := dcb8cd2425567a5a5ec164afea475bce57784bca3e352ad4cbdd3d1a7e08e5a1
export MDDS_TARBALL := mdds-1.3.1.tar.bz2
-export MDNSRESPONDER_SHA256SUM := 4737cb51378377e11d0edb7bcdd1bec79cbdaa7b27ea09c13e3006e58f8d92c0
-export MDNSRESPONDER_TARBALL := mDNSResponder-576.30.4.tar.gz
+export MDNSRESPONDER_SHA256SUM := e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e3990d68aabf6e8b3f5a0
+export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
export MSPUB_SHA256SUM := ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba
export MSPUB_TARBALL := libmspub-0.1.4.tar.xz
export MWAW_SHA256SUM := aca8bf1ce55ed83adbea82c70d4c8bebe8139f334b3481bf5a6e407f91f33ce9
diff --git a/external/mdnsresponder/UnpackedTarball_mDNSResponder.mk b/external/mdnsresponder/UnpackedTarball_mDNSResponder.mk
index 5b0140e4c149..9b436b2f077c 100644
--- a/external/mdnsresponder/UnpackedTarball_mDNSResponder.mk
+++ b/external/mdnsresponder/UnpackedTarball_mDNSResponder.mk
@@ -11,9 +11,4 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,mDNSResponder))
$(eval $(call gb_UnpackedTarball_set_tarball,mDNSResponder,$(MDNSRESPONDER_TARBALL)))
-$(eval $(call gb_UnpackedTarball_add_patches,mDNSResponder,\
- external/mdnsresponder/mDNSResponder_Win32_SOCKET.patch.1 \
- external/mdnsresponder/mDNSResponder_Win32_buildfix.patch.1 \
-))
-
# vim: set noet sw=4 ts=4:
diff --git a/external/mdnsresponder/mDNSResponder_Win32_SOCKET.patch.1 b/external/mdnsresponder/mDNSResponder_Win32_SOCKET.patch.1
deleted file mode 100644
index 9952f86e88ec..000000000000
--- a/external/mdnsresponder/mDNSResponder_Win32_SOCKET.patch.1
+++ /dev/null
@@ -1,85 +0,0 @@
-commit 77838efb0748689ee77007a92d9a01e03e6dbdb7
-Author: Stephan Bergmann <sbergman at redhat.com>
-AuthorDate: Fri Nov 27 22:40:23 2015 +0100
-Commit: Stephan Bergmann <sbergman at redhat.com>
-CommitDate: Sat Nov 28 14:00:07 2015 +0100
-
- Use proper return type for DNSServiceRefSockFD
-
- ...which is e.g. unsigned long long for Windows 64-bit (and declaring the
- function in dns_sd.h is not necessary, and the dnssd_sock_t typedef is not known
- there)
-
- Change-Id: Iaa0eb03a83b76200204ba905313bcc27b5007b39
-
-diff --git a/mDNSShared/dns_sd.h b/mDNSShared/dns_sd.h
-index 31daaeb..faaa741 100644
---- a/mDNSShared/dns_sd.h
-+++ b/mDNSShared/dns_sd.h
-@@ -741,35 +741,6 @@ DNSServiceErrorType DNSSD_API DNSServiceGetProperty
- *
- *********************************************************************************************/
-
--/* DNSServiceRefSockFD()
-- *
-- * Access underlying Unix domain socket for an initialized DNSServiceRef.
-- * The DNS Service Discovery implementation uses this socket to communicate between the client and
-- * the daemon. The application MUST NOT directly read from or write to this socket.
-- * Access to the socket is provided so that it can be used as a kqueue event source, a CFRunLoop
-- * event source, in a select() loop, etc. When the underlying event management subsystem (kqueue/
-- * select/CFRunLoop etc.) indicates to the client that data is available for reading on the
-- * socket, the client should call DNSServiceProcessResult(), which will extract the daemon's
-- * reply from the socket, and pass it to the appropriate application callback. By using a run
-- * loop or select(), results from the daemon can be processed asynchronously. Alternatively,
-- * a client can choose to fork a thread and have it loop calling "DNSServiceProcessResult(ref);"
-- * If DNSServiceProcessResult() is called when no data is available for reading on the socket, it
-- * will block until data does become available, and then process the data and return to the caller.
-- * The application is reponsible for checking the return value of DNSServiceProcessResult() to determine
-- * if the socket is valid and if it should continue to process data on the socket.
-- * When data arrives on the socket, the client is responsible for calling DNSServiceProcessResult(ref)
-- * in a timely fashion -- if the client allows a large backlog of data to build up the daemon
-- * may terminate the connection.
-- *
-- * sdRef: A DNSServiceRef initialized by any of the DNSService calls.
-- *
-- * return value: The DNSServiceRef's underlying socket descriptor, or -1 on
-- * error.
-- */
--
--int DNSSD_API DNSServiceRefSockFD(DNSServiceRef sdRef);
--
--
- /* DNSServiceProcessResult()
- *
- * Read a reply from the daemon, calling the appropriate application callback. This call will
-diff --git a/mDNSShared/dnssd_clientstub.c b/mDNSShared/dnssd_clientstub.c
-index c38197c..c6b50a2 100644
---- a/mDNSShared/dnssd_clientstub.c
-+++ b/mDNSShared/dnssd_clientstub.c
-@@ -799,7 +799,7 @@ cleanup:
- return err;
- }
-
--int DNSSD_API DNSServiceRefSockFD(DNSServiceRef sdRef)
-+dnssd_sock_t DNSSD_API DNSServiceRefSockFD(DNSServiceRef sdRef)
- {
- if (!sdRef) { syslog(LOG_WARNING, "dnssd_clientstub DNSServiceRefSockFD called with NULL DNSServiceRef"); return dnssd_InvalidSocket; }
-
-@@ -816,7 +816,7 @@ int DNSSD_API DNSServiceRefSockFD(DNSServiceRef sdRef)
- return dnssd_InvalidSocket;
- }
-
-- return (int) sdRef->sockfd;
-+ return sdRef->sockfd;
- }
-
- #if _DNS_SD_LIBDISPATCH
-@@ -2025,7 +2025,7 @@ DNSServiceErrorType DNSSD_API DNSServiceSetDispatchQueue
- dispatch_queue_t queue
- )
- {
-- int dnssd_fd = DNSServiceRefSockFD(service);
-+ dnssd_sock_t dnssd_fd = DNSServiceRefSockFD(service);
- if (dnssd_fd == dnssd_InvalidSocket) return kDNSServiceErr_BadParam;
- if (!queue)
- {
diff --git a/external/mdnsresponder/mDNSResponder_Win32_buildfix.patch.1 b/external/mdnsresponder/mDNSResponder_Win32_buildfix.patch.1
deleted file mode 100644
index 9f5c06260b12..000000000000
--- a/external/mdnsresponder/mDNSResponder_Win32_buildfix.patch.1
+++ /dev/null
@@ -1,16 +0,0 @@
---- mDNSResponder/mDNSShared/dnssd_clientstub.c.orig 2015-11-30 16:36:08.081554188 +0100
-+++ mDNSResponder/mDNSShared/dnssd_clientstub.c 2015-11-30 16:38:35.749542735 +0100
-@@ -579,7 +579,12 @@
- else
- {
- syslog(LOG_WARNING, "dnssd_clientstub ConnectToServer: connect() failed path:%s Socket:%d Err:%d Errno:%d %s",
-- uds_serverpath, sdr->sockfd, err, dnssd_errno, dnssd_strerror(dnssd_errno));
-+#if defined(USE_TCP_LOOPBACK)
-+ MDNS_TCP_SERVERADDR,
-+#else
-+ uds_serverpath,
-+#endif
-+ sdr->sockfd, err, dnssd_errno, dnssd_strerror(dnssd_errno));
- dnssd_close(sdr->sockfd);
- FreeDNSServiceOp(sdr);
- return kDNSServiceErr_ServiceNotRunning;
commit 56ab1d406aa9f18db9218ad520ccc6cc86ee40bb
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Feb 20 14:31:23 2019 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Fri Feb 22 12:52:45 2019 +0100
libjpeg-turbo: upgrade to release 1.5.3
Fixes CVE-2017-15232, which looks rather minor.
Change-Id: Icffb0c5160bef79577431a02eb10ed9492e01d11
Reviewed-on: https://gerrit.libreoffice.org/68091
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit e0b96b9863ebe52c4e35c21b3084da9e53ebee1f)
Reviewed-on: https://gerrit.libreoffice.org/68109
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/download.lst b/download.lst
index b8b5d8fd5fce..09e420097c38 100644
--- a/download.lst
+++ b/download.lst
@@ -128,8 +128,8 @@ export JFREEREPORT_LIBXML_SHA256SUM := 7d2797fe9f79a77009721e3f14fa4a1dec17a6d70
export JFREEREPORT_LIBXML_TARBALL := ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip
export JFREEREPORT_SAC_SHA256SUM := 085f2112c51fa8c1783fac12fbd452650596415121348393bb51f0f7e85a9045
export JFREEREPORT_SAC_TARBALL := 39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip
-export LIBJPEG_TURBO_SHA256SUM := 9098943b270388727ae61de82adec73cf9f0dbb240b3bc8b172595ebf405b528
-export LIBJPEG_TURBO_TARBALL := libjpeg-turbo-1.5.2.tar.gz
+export LIBJPEG_TURBO_SHA256SUM := b24890e2bb46e12e72a79f7e965f409f4e16466d00e1dd15d93d73ee6b592523
+export LIBJPEG_TURBO_TARBALL := libjpeg-turbo-1.5.3.tar.gz
export LANGTAGREG_SHA256SUM := 14c21f4533ca74e3af9e09184d6756a750d0cd46099015ba8c595e48499aa878
export LANGTAGREG_TARBALL := language-subtag-registry-2018-04-23.tar.bz2
export LANGUAGETOOL_SHA256SUM := 48c87e41636783bba438b65fd895821e369ed139e1465fac654323ad93c5a82d
commit abab6e096839838e60222c635cf51629d7ce48d5
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Thu Feb 7 16:26:31 2019 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Feb 21 22:32:23 2019 +0100
Related: tdf#117761 oox smartart: backport fixes related to cycle matrix
This is a combination of 6 commits.
This is the 1st commit:
oox smartart, cycle matrix: fix counting presentation children
The markup is:
<dgm:if name="Name6" axis="ch ch" ptType="node node" st="1 1" cnt="1 0" func="cnt" op="gte" val="1">
Where PowerPoint evaluated the condition to true, but Impress evaluated
to false. This means that the undocumented relation between the child
lists is "OR" (not "AND").
Also, our code assumed that "node" has to be a data node (not
presentation node), but it seems the only way this condition can be true
if presentation children is also counted. (The presentation node in
question is not a presentation of anything.)
(cherry picked from commit e3c6f249c10f7f1bcc528e643f5723288c514b29)
This is the commit #2:
oox smartart, cycle matrix: handle left/bottom constraint in composite algo
The bugdoc has 3 shapes in the "outer" circle which have a position
where either x or y is not 0. But these are defined using constraints
talking about the right or bottom edge of the shape.
Map that to top/left, given that we already know the shape size.
(cherry picked from commit b9b4e9223b6c0d6e0b48b694c9aabbe54a250660)
This is the commit #3:
oox smartart, cycle matrix: fix too large height in composite algo
The user-level problem was that the height of the entire smartart was
too large. The reason for this was that:
- composite algorithm gets the constraint height should be 77% of width,
this means 6096000 -> 4693920 EMUs
- at the same time the parent container is already smaller, 4064000 EMUs
- a few lines later we already limit the max height with std::min(), but
in the meantime an incorrect y position is calculated, exactly due to
the lack of early limited height
Solve the problem by making sure composite algorithm never works with a
height (even when using it to calculate vertical center) that exceeds
the height of the parent.
(cherry picked from commit 5b2e38e0cfc7006d6982f741cf158a8a98dc8630)
This is the commit #4:
oox smartart, cycle matrix: handle aspect ratio in composite algo
This way the 4 quadrant shapes in the center of the SmartArt form a
circle, as width is shrinking.
It's not height growing, as OOXML spec clearly says "ar" always just
shrinks one axis.
(>1 and <1 "ar" is to be handled when they are seen in action in an
actual document.)
(cherry picked from commit 34383064ac061497b0c46c449313877c6b6a2087)
This is the commit #5:
oox smartart, cycle matrix: handle destination order in connections
It is possible to have connections from multiple data nodes to the same
presentation node with a presOf type. We use to order these based on as
they appear in the data XML, but we need to order them according to the
destOrd attribute.
Introduce an std::map for that, so get ordering automatically as we
iterate. Turn the std::pair into a struct to make the code a bit more
readable.
(cherry picked from commit ecb733da58b74714eb66d2063a2835ce5c471870)
Conflicts:
oox/source/drawingml/diagram/diagramlayoutatoms.cxx
This is the commit #6:
oox smartart, cycle matrix: fix fill and line props of shape
The topmost shape may not have 0 depth, but something larger.
In that case at least it's safe to still use fill & line properties. The
B1 quadrant of the test file now has the proper orange background, and
B2's border is also properly orange.
(cherry picked from commit 8193e697d286595aa62859011761adeb002244e3)
Conflicts:
oox/source/drawingml/diagram/diagramlayoutatoms.cxx
Change-Id: Iccc5f6993693a0f1cf8f50d163003c24d3ad690e
Reviewed-on: https://gerrit.libreoffice.org/68149
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx
index 4664a55e594c..daddf1fa6991 100644
--- a/oox/source/drawingml/diagram/diagram.cxx
+++ b/oox/source/drawingml/diagram/diagram.cxx
@@ -270,8 +270,10 @@ void Diagram::build( )
if( connection.mnType == XML_presOf )
{
DiagramData::StringMap::value_type::second_type& rVec=getData()->getPresOfNameMap()[connection.msDestId];
- rVec.emplace_back(
- connection.msSourceId,sal_Int32(0));
+ DiagramData::SourceIdAndDepth aSourceIdAndDepth;
+ aSourceIdAndDepth.msSourceId = connection.msSourceId;
+ aSourceIdAndDepth.mnDepth = 0;
+ rVec[connection.mnDestOrder] = aSourceIdAndDepth;
}
}
@@ -281,9 +283,8 @@ void Diagram::build( )
{
for (auto & elem : elemPresOf.second)
{
- const sal_Int32 nDepth=calcDepth(elem.first,
- getData()->getConnections());
- elem.second = nDepth != 0 ? nDepth : -1;
+ const sal_Int32 nDepth = calcDepth(elem.second.msSourceId, getData()->getConnections());
+ elem.second.mnDepth = nDepth != 0 ? nDepth : -1;
if (nDepth > getData()->getMaxDepth())
getData()->setMaxDepth(nDepth);
}
diff --git a/oox/source/drawingml/diagram/diagram.hxx b/oox/source/drawingml/diagram/diagram.hxx
index 242ff09fa152..a0955b124230 100644
--- a/oox/source/drawingml/diagram/diagram.hxx
+++ b/oox/source/drawingml/diagram/diagram.hxx
@@ -160,8 +160,14 @@ public:
typedef std::map< OUString,
std::vector<dgm::Point*> > PointsNameMap;
typedef std::map< OUString, const dgm::Connection* > ConnectionNameMap;
+ struct SourceIdAndDepth
+ {
+ OUString msSourceId;
+ sal_Int32 mnDepth = 0;
+ };
+ /// Tracks connections: destination id -> {destination order, details} map.
typedef std::map< OUString,
- std::vector<std::pair<OUString,sal_Int32> > > StringMap;
+ std::map<sal_Int32, SourceIdAndDepth > > StringMap;
DiagramData();
FillPropertiesPtr & getFillProperties()
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 513dc9926e82..09edf0022259 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -369,6 +369,14 @@ sal_Int32 ConditionAtom::getNodeCount() const
if (aCxn.mnType == XML_parOf && aCxn.msSourceId == sNodeId)
nCount++;
}
+ else
+ {
+ // No presentation child is a presentation of a model node: just
+ // count presentation children.
+ for (const auto& aCxn : mrLayoutNode.getDiagram().getData()->getConnections())
+ if (aCxn.mnType == XML_presParOf && aCxn.msSourceId == pPoint->msModelId)
+ nCount++;
+ }
}
return nCount;
}
@@ -482,12 +490,29 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
LayoutPropertyMap aProperties;
LayoutProperty& rParent = aProperties[""];
- rParent[XML_w] = rShape->getSize().Width;
- rParent[XML_h] = rShape->getSize().Height;
- rParent[XML_l] = 0;
- rParent[XML_t] = 0;
- rParent[XML_r] = rShape->getSize().Width;
- rParent[XML_b] = rShape->getSize().Height;
+
+ sal_Int32 nParentXOffset = 0;
+ if (mfAspectRatio != 1.0)
+ {
+ rParent[XML_w] = rShape->getSize().Width;
+ rParent[XML_h] = rShape->getSize().Height;
+ rParent[XML_l] = 0;
+ rParent[XML_t] = 0;
+ rParent[XML_r] = rShape->getSize().Width;
+ rParent[XML_b] = rShape->getSize().Height;
+ }
+ else
+ {
+ // Shrink width to be only as large as height.
+ rParent[XML_w] = std::min(rShape->getSize().Width, rShape->getSize().Height);
+ rParent[XML_h] = rShape->getSize().Height;
+ if (rParent[XML_w] < rShape->getSize().Width)
+ nParentXOffset = (rShape->getSize().Width - rParent[XML_w]) / 2;
+ rParent[XML_l] = nParentXOffset;
+ rParent[XML_t] = 0;
+ rParent[XML_r] = rShape->getSize().Width - rParent[XML_l];
+ rParent[XML_b] = rShape->getSize().Height;
+ }
for (const auto & rConstr : rConstraints)
{
@@ -526,25 +551,30 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
LayoutProperty::const_iterator it, it2;
if ( (it = rProp.find(XML_w)) != rProp.end() )
- aSize.Width = it->second;
+ aSize.Width = std::min(it->second, rShape->getSize().Width);
if ( (it = rProp.find(XML_h)) != rProp.end() )
- aSize.Height = it->second;
+ aSize.Height = std::min(it->second, rShape->getSize().Height);
if ( (it = rProp.find(XML_l)) != rProp.end() )
aPos.X = it->second;
else if ( (it = rProp.find(XML_ctrX)) != rProp.end() )
aPos.X = it->second - aSize.Width/2;
+ else if ((it = rProp.find(XML_r)) != rProp.end())
+ aPos.X = it->second - aSize.Width;
if ( (it = rProp.find(XML_t)) != rProp.end())
aPos.Y = it->second;
else if ( (it = rProp.find(XML_ctrY)) != rProp.end() )
aPos.Y = it->second - aSize.Height/2;
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list