[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - 52 commits - bin/check-elf-dynamic-objects connectivity/Library_mysqlc.mk desktop/source download.lst external/mariadb-connector-c external/nss external/pdfium external/postgresql external/redland filter/source include/vcl libreofficekit/qa lotuswordpro/qa lotuswordpro/source RepositoryExternal.mk sc/source sfx2/source shell/source solenv/flatpak-manifest.in sw/inc sw/Module_sw.mk sw/qa sw/source vcl/CppunitTest_vcl_filter_ipdf.mk vcl/Module_vcl.mk vcl/qa vcl/source vcl/unx writerfilter/source xmlsecurity/inc xmlsecurity/qa xmlsecurity/source xmlsecurity/workben
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jan 25 14:44:11 UTC 2021
RepositoryExternal.mk | 24
bin/check-elf-dynamic-objects | 2
connectivity/Library_mysqlc.mk | 1
desktop/source/lib/init.cxx | 6
download.lst | 8
external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk | 16
external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk | 22
external/nss/ExternalProject_nss.mk | 8
external/nss/UnpackedTarball_nss.mk | 1
external/nss/nsinstall.py | 12
external/nss/nss-restore-manual-pre-dependencies.patch.1 | 83 +++
external/pdfium/Library_pdfium.mk | 40 +
external/pdfium/UnpackedTarball_pdfium.mk | 4
external/pdfium/build.patch.1 | 13
external/pdfium/configs/build_config.h | 6
external/pdfium/inc/pch/precompiled_pdfium.hxx | 26 -
external/postgresql/ExternalPackage_postgresql.mk | 16
external/postgresql/ExternalProject_postgresql.mk | 16
external/postgresql/Module_postgresql.mk | 6
external/postgresql/UnpackedTarball_postgresql.mk | 11
external/postgresql/config.pl | 1
external/postgresql/internal-zlib.patch.1 | 29 -
external/postgresql/postgres-msvc-build.patch.1 | 110 ++++
external/postgresql/postgresql-9.2.1-libreoffice.patch | 74 ---
external/postgresql/postgresql-libs-leak.patch | 40 -
external/redland/UnpackedTarball_raptor.mk | 1
external/redland/raptor/0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch.1 | 33 +
filter/source/graphicfilter/icgm/bitmap.cxx | 10
filter/source/msfilter/msdffimp.cxx | 15
include/vcl/BitmapTools.hxx | 3
include/vcl/filter/PDFiumLibrary.hxx | 4
include/vcl/filter/pdfdocument.hxx | 6
libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx | 5
lotuswordpro/qa/cppunit/data/pass/ofz20517-1.lwp |binary
lotuswordpro/source/filter/lwprowlayout.cxx | 12
lotuswordpro/source/filter/lwptablelayout.cxx | 9
sc/source/filter/oox/workbookhelper.cxx | 7
sfx2/source/doc/sfxbasemodel.cxx | 60 +-
sfx2/source/sidebar/SidebarController.cxx | 23
sfx2/source/sidebar/SidebarPanelBase.cxx | 14
sfx2/source/sidebar/Theme.cxx | 20
shell/source/unix/exec/shellexec.cxx | 4
shell/source/win32/SysShExec.cxx | 3
solenv/flatpak-manifest.in | 12
sw/Module_sw.mk | 1
sw/inc/SwNumberTree.hxx | 14
sw/inc/doc.hxx | 2
sw/inc/list.hxx | 2
sw/qa/extras/uiwriter/data/tdf132911.odt |binary
sw/qa/extras/uiwriter/data/tdf133990.odt |binary
sw/qa/extras/uiwriter/data/tdf134931.odt |binary
sw/qa/extras/uiwriter/data/tdf135056.odt |binary
sw/qa/extras/uiwriter/data/tdf136453.fodt | 66 ++
sw/qa/extras/uiwriter/uiwriter.cxx | 244 ++++++++++
sw/qa/uitest/writer_tests/data/tdf135018.odt |binary
sw/qa/uitest/writer_tests/trackedChanges.py | 36 +
sw/source/core/doc/DocumentRedlineManager.cxx | 2
sw/source/core/doc/list.cxx | 19
sw/source/core/doc/poolfmt.cxx | 9
sw/source/core/edit/autofmt.cxx | 11
sw/source/core/layout/fly.cxx | 49 +-
sw/source/core/text/txtfrm.cxx | 2
sw/source/core/undo/undel.cxx | 3
sw/source/filter/basflt/fltshell.cxx | 32 +
sw/source/filter/html/htmlgrin.cxx | 2
sw/source/filter/html/htmltab.cxx | 35 -
sw/source/filter/html/swhtml.cxx | 21
sw/source/filter/html/swhtml.hxx | 11
sw/source/filter/inc/fltshell.hxx | 22
sw/source/filter/writer/writer.cxx | 10
sw/source/filter/ww8/docxexport.cxx | 4
sw/source/filter/ww8/rtfexport.cxx | 2
sw/source/filter/ww8/wrtw8num.cxx | 4
sw/source/filter/ww8/ww8par.cxx | 3
sw/source/filter/ww8/ww8par.hxx | 2
sw/source/filter/ww8/ww8par2.cxx | 12
sw/source/filter/ww8/ww8par6.cxx | 2
sw/source/filter/ww8/ww8scan.cxx | 37 +
sw/source/filter/ww8/ww8scan.hxx | 6
sw/source/uibase/app/docst.cxx | 19
sw/source/uibase/app/docstyle.cxx | 6
vcl/CppunitTest_vcl_filter_ipdf.mk | 49 ++
vcl/Module_vcl.mk | 1
vcl/qa/cppunit/filter/ipdf/data/dict-array-dict.pdf | 55 ++
vcl/qa/cppunit/filter/ipdf/ipdf.cxx | 73 ++
vcl/source/filter/ipdf/pdfdocument.cxx | 95 +++
vcl/source/filter/ipdf/pdfread.cxx | 2
vcl/source/font/fontcharmap.cxx | 18
vcl/source/pdf/PDFiumLibrary.cxx | 12
vcl/unx/generic/app/i18n_cb.cxx | 4
writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 2
writerfilter/source/rtftok/rtfdocumentimpl.hxx | 7
xmlsecurity/inc/pdfio/pdfdocument.hxx | 2
xmlsecurity/qa/unit/pdfsigning/data/bad-cert-p1.pdf |binary
xmlsecurity/qa/unit/pdfsigning/data/bad-cert-p3-stamp.pdf |binary
xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx | 41 +
xmlsecurity/source/helper/pdfsignaturehelper.cxx | 5
xmlsecurity/source/pdfio/pdfdocument.cxx | 89 +++
xmlsecurity/workben/pdfverify.cxx | 3
99 files changed, 1562 insertions(+), 402 deletions(-)
New commits:
commit 258fe9d266e27a8211274ed5d11ec7558cdf7ace
Author: Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Thu Jan 14 20:10:24 2021 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:25:28 2021 +0100
tdf#135014 sw_redlinehide: fix missing frames when removing fieldmark
A fieldmark was deleted. UpdateFramesForRemoveDeleteRedline() deleted
the MergedPara but its start node was before the start node of the
fieldmark, and then MakeFrames() didn't find a frame on the preceding
node and did nothing.
Similar problem likely possible with redline.
Change-Id: I532f9a67c0268f3287736a61da4cc9fefec7b8e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109307
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
(cherry picked from commit 32e104c1d6be0ffe6ed6c4e08af868c87b3c258c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109347
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index ff9b05743d10..8ae32f266bdb 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -301,6 +301,8 @@ void UpdateFramesForRemoveDeleteRedline(SwDoc & rDoc, SwPaM const& rPam)
pFrame->SetMergedPara(sw::CheckParaRedlineMerge(
*pFrame, rFirstNode, eMode));
eMode = sw::FrameMode::New; // Existing is not idempotent!
+ // update pNode so MakeFrames starts on 2nd node
+ pNode = &rFirstNode;
}
}
if (pLast != pNode)
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index f6927730edc6..46957b4448f8 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1292,6 +1292,8 @@ void SwTextFrame::SetMergedPara(std::unique_ptr<sw::MergedPara> p)
pFirst->Add(this); // must register at node again
}
}
+ // postcondition: frame must be listening somewhere
+ assert(m_pMergedPara || GetDep());
}
const OUString& SwTextFrame::GetText() const
commit c103a6d732ca315119c897c04ea3e9b01adcb5e7
Author: Justin Luth <justin_luth at sil.org>
AuthorDate: Fri Jan 15 20:32:43 2021 +0300
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:25:27 2021 +0100
tdf#136704 sw autofmt: prevent crash if no nextNode
The second GetNextNode() was a nullptr
that was being dereferenced.
Now, when enter is pressed after some text followed by a colon,
that line is made into a heading3, and the new blank line is
properly using the text body paragraph style.
Change-Id: If10dc85e490ac57fc150b3d541f5033dfd5293bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109413
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth at sil.org>
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
(cherry picked from commit fea7b531a4c9e8326a644cccc26325b16585675a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109520
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 591c4a988d20..a3925246f32f 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -1895,11 +1895,14 @@ void SwAutoFormat::BuildHeadLine( sal_uInt16 nLvl )
JoinPrevPara();
DeleteLeadingTrailingBlanks( true, false );
- const SwTextFrame *const pNextFrame = GetNextNode(false);
- (void)DeleteJoinCurNextPara(pNextFrame, true);
-
+ const SwTextFrame* pNextFrame = GetNextNode(false);
+ if (pNextFrame->GetNext())
+ {
+ (void)DeleteJoinCurNextPara(pNextFrame, true);
+ pNextFrame = GetNextNode(false);
+ }
m_aDelPam.DeleteMark();
- m_aDelPam.GetPoint()->nNode = *GetNextNode(false)->GetTextNodeForParaProps();
+ m_aDelPam.GetPoint()->nNode = *pNextFrame->GetTextNodeForParaProps();
m_aDelPam.GetPoint()->nContent.Assign( m_aDelPam.GetContentNode(), 0 );
m_pDoc->SetTextFormatColl( m_aDelPam, &rNxtColl );
}
commit 26d9514400fbb5e6e9d76c27b6a05f77469b8e3a
Author: Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Fri Jan 22 21:08:45 2021 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:25:27 2021 +0100
fix -Wmaybe-uninitialized
Change-Id: I0dc16e51ea45069ae207c6440db879143d89cf2c
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 19dc3bb917e0..70d0e7a6a816 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -1674,7 +1674,7 @@ void OOXMLFastContextHandlerShape::sendShape( Token_t Element )
if (mnTableDepth > 0 && mbLayoutInCell) //if we had a table
{
uno::Reference<beans::XPropertySet> xShapePropSet(xShape, uno::UNO_QUERY);
- sal_Int16 nCurrentHorOriRel; //A temp variable for storaging the current setting
+ sal_Int16 nCurrentHorOriRel = {}; // spurious -Werror=maybe-uninitialized
xShapePropSet->getPropertyValue("HoriOrientRelation") >>= nCurrentHorOriRel;
//and the correction:
if (nCurrentHorOriRel == com::sun::star::text::RelOrientation::PAGE_FRAME)
commit 520585fba9ac591147d42fc4416d46a5dae8697d
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Dec 9 15:18:06 2019 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:25:27 2021 +0100
Use o3tl::doAccess, prevent -Werror=maybe-uninitialized
Change-Id: Id30119c03dbbe0b3befe17cdb0bdb5f2943097ce
Reviewed-on: https://gerrit.libreoffice.org/84753
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit 7ba2d77dc2b920978f6084ae6223b6828f32bcd3)
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 88e82c0ee3f1..39f7b9e89b79 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -40,6 +40,7 @@
#include <sal/log.hxx>
#include <vcl/errinf.hxx>
#include <vcl/lok.hxx>
+#include <o3tl/any.hxx>
#include <osl/file.hxx>
#include <osl/process.h>
#include <osl/thread.h>
@@ -3485,17 +3486,16 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma
int nLeft = OutputDevice::LogicToLogic(aChartBB.Left(), MapUnit::MapTwip, MapUnit::Map100thMM);
int nTop = OutputDevice::LogicToLogic(aChartBB.Top(), MapUnit::MapTwip, MapUnit::Map100thMM);
- sal_Int32 value;
for (beans::PropertyValue& rPropValue: aPropertyValuesVector)
{
if (rPropValue.Name == "TransformPosX" || rPropValue.Name == "TransformRotationX")
{
- rPropValue.Value >>= value;
+ auto const value = *o3tl::doAccess<sal_Int32>(rPropValue.Value);
rPropValue.Value <<= value - nLeft;
}
else if (rPropValue.Name == "TransformPosY" || rPropValue.Name == "TransformRotationY")
{
- rPropValue.Value >>= value;
+ auto const value = *o3tl::doAccess<sal_Int32>(rPropValue.Value);
rPropValue.Value <<= value - nTop;
}
}
commit 4f7a21395ebe5179f61ea07f40ebf1972994886b
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Dec 3 13:35:49 2019 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:25:26 2021 +0100
Use o3tl::doAccess, prevent -Werror=maybe-uninitialized
Change-Id: Id40ebafeb227c432af8689b7db246a3615bc482b
Reviewed-on: https://gerrit.libreoffice.org/84344
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit 1bfd91e1b319012b93fca144b9133d816150c27e)
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index 4925c7841ee2..dd74d30523bc 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/document/XViewDataSupplier.hpp>
+#include <o3tl/any.hxx>
#include <osl/thread.h>
#include <osl/diagnose.h>
#include <oox/helper/progressbar.hxx>
@@ -761,14 +762,12 @@ void WorkbookHelper::finalizeWorkbookImport()
OUString sName(rProp.Name);
if (sName == SC_POSITIONLEFT)
{
- SCCOL nPosLeft;
- rProp.Value >>= nPosLeft;
+ SCCOL nPosLeft = *o3tl::doAccess<SCCOL>(rProp.Value);
getScDocument().SetPosLeft(nPosLeft);
}
else if (sName == SC_POSITIONTOP)
{
- SCROW nPosTop;
- rProp.Value >>= nPosTop;
+ SCROW nPosTop = *o3tl::doAccess<SCROW>(rProp.Value);
getScDocument().SetPosTop(nPosTop);
}
}
commit c92a072ff415931355800f90d4cc0234de661c5f
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Dec 3 13:26:52 2019 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:25:26 2021 +0100
Use o3tl::doAccess, prevent -Werror=maybe-uninitialized
Change-Id: I6a86db428dcf92083ee13298417b3d3027e45822
Reviewed-on: https://gerrit.libreoffice.org/84338
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit 4e62db5876bac758904bb9fcc669f943a03d4c7a)
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 7fed578100d1..f372cb8bcdfe 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -85,6 +85,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/storagehelper.hxx>
+#include <o3tl/any.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include <vcl/font.hxx>
@@ -1153,8 +1154,7 @@ void DocxExport::WriteSettings()
}
else if (rProp.Name == "HyphenationZone")
{
- sal_Int16 nHyphenationZone;
- rProp.Value >>= nHyphenationZone;
+ sal_Int16 nHyphenationZone = *o3tl::doAccess<sal_Int16>(rProp.Value);
if (nHyphenationZone > 0)
pFS->singleElementNS(XML_w, XML_hyphenationZone, FSNS(XML_w, XML_val),
OString::number(nHyphenationZone));
commit 4e23f386a9eb56dfdc91c79163dd4fc5d0ff125b
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Dec 3 13:25:39 2019 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:25:26 2021 +0100
Use o3tl::doAccess, prevent -Werror=maybe-uninitialized
(and do not unbox Any where it is not necessary anyway)
Change-Id: Ic5461fb8b62157e9116cd2d557ee38fface28fb7
Reviewed-on: https://gerrit.libreoffice.org/84337
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit 941d53eee9a186e790bb3203b37eeb5fa285d2c4)
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index cb580785e8a8..45f732ff4b4d 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -24,7 +24,7 @@
#include <com/sun/star/container/XNameAccess.hpp>
#include <comphelper/flagguard.hxx>
-
+#include <o3tl/any.hxx>
#include <sal/log.hxx>
#include <hintids.hxx>
#include <sfx2/app.hxx>
@@ -693,21 +693,20 @@ void syncEndnoteOrientation(const uno::Reference< style::XStyleFamiliesSupplier
return;
}
- sal_Int32 nWidth, nHeight;
- bool bIsDefLandScape, bIsEndLandScape;
-
- xDefaultPagePropSet->getPropertyValue("IsLandscape") >>= bIsDefLandScape;
- xEndnotePagePropSet->getPropertyValue("IsLandscape") >>= bIsEndLandScape;
+ auto const bIsDefLandScape = *o3tl::doAccess<bool>(
+ xDefaultPagePropSet->getPropertyValue("IsLandscape"));
+ auto const bIsEndLandScape = *o3tl::doAccess<bool>(
+ xEndnotePagePropSet->getPropertyValue("IsLandscape"));
if (bIsDefLandScape == bIsEndLandScape)
return;
- xEndnotePagePropSet->getPropertyValue("Width") >>= nWidth;
- xEndnotePagePropSet->getPropertyValue("Height") >>= nHeight;
+ auto const nWidth = xEndnotePagePropSet->getPropertyValue("Width");
+ auto const nHeight = xEndnotePagePropSet->getPropertyValue("Height");
xEndnotePagePropSet->setPropertyValue("IsLandscape", css::uno::toAny(bIsDefLandScape));
- xEndnotePagePropSet->setPropertyValue("Width", css::uno::toAny(nHeight));
- xEndnotePagePropSet->setPropertyValue("Height", css::uno::toAny(nWidth));
+ xEndnotePagePropSet->setPropertyValue("Width", nHeight);
+ xEndnotePagePropSet->setPropertyValue("Height", nWidth);
}
}
commit e06324342f8cf93da687503c558957077c3b56a0
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Dec 4 16:33:54 2019 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:25:25 2021 +0100
Use o3tl::doAccess, prevent -Werror=maybe-uninitialized
Change-Id: Iff932423bfd1964fa5fa2dfa74de9b7c9b6701f3
Reviewed-on: https://gerrit.libreoffice.org/84423
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit be3a818301a3ed1871bf6d7f57db39ddb6b67ab9)
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 29fd41a9879c..fc53af3685a4 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -23,6 +23,8 @@
#include <math.h>
#include <limits.h>
#include <vector>
+
+#include <o3tl/any.hxx>
#include <osl/endian.h>
#include <osl/file.hxx>
#include <tools/solar.h>
@@ -4631,11 +4633,14 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
pAny = aGeometryItem.GetPropertyValueByName( sPath, sCoordinates );
if (pAny && (*pAny >>= seqCoordinates) && (seqCoordinates.getLength() >= 2))
{
- sal_Int32 nL, nT, nR, nB;
- seqCoordinates[0].First.Value >>= nL;
- seqCoordinates[0].Second.Value >>= nT;
- seqCoordinates[1].First.Value >>= nR;
- seqCoordinates[1].Second.Value >>= nB;
+ auto const nL
+ = *o3tl::doAccess<sal_Int32>(seqCoordinates[0].First.Value);
+ auto const nT
+ = *o3tl::doAccess<sal_Int32>(seqCoordinates[0].Second.Value);
+ auto const nR
+ = *o3tl::doAccess<sal_Int32>(seqCoordinates[1].First.Value);
+ auto const nB
+ = *o3tl::doAccess<sal_Int32>(seqCoordinates[1].Second.Value);
aEllipseRect_MS = basegfx::B2DRectangle(nL, nT, nR, nB);
}
commit c8c17a07bdb4799fb5a2ec56aaf7440f237ca5c0
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Dec 3 13:56:57 2019 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:25:25 2021 +0100
Also throw IllegalArgumentException for arguments of wrong type
Change-Id: I1b52accc3f0eec3e6232b8211bf7bcbf65ed18f8
Reviewed-on: https://gerrit.libreoffice.org/84350
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit ebd70d476c392b2c5a87295e01b8ea9c2e8de258)
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 9849ac86d642..cf27e3493bf0 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1063,48 +1063,72 @@ void SAL_CALL SfxBaseModel::setArgs(const Sequence<beans::PropertyValue>& aArgs)
{
OUString sValue;
bool bValue;
-
+ bool ok = false;
if (rArg.Name == "SuggestedSaveAsName")
{
- rArg.Value >>= sValue;
- pMedium->GetItemSet()->Put(SfxStringItem(SID_SUGGESTEDSAVEASNAME, sValue));
+ if (rArg.Value >>= sValue)
+ {
+ pMedium->GetItemSet()->Put(SfxStringItem(SID_SUGGESTEDSAVEASNAME, sValue));
+ ok = true;
+ }
}
else if (rArg.Name == "SuggestedSaveAsDir")
{
- rArg.Value >>= sValue;
- pMedium->GetItemSet()->Put(SfxStringItem(SID_SUGGESTEDSAVEASDIR, sValue));
+ if (rArg.Value >>= sValue)
+ {
+ pMedium->GetItemSet()->Put(SfxStringItem(SID_SUGGESTEDSAVEASDIR, sValue));
+ ok = true;
+ }
}
else if (rArg.Name == "LockContentExtraction")
{
- rArg.Value >>= bValue;
- pMedium->GetItemSet()->Put(SfxBoolItem(SID_LOCK_CONTENT_EXTRACTION, bValue));
+ if (rArg.Value >>= bValue)
+ {
+ pMedium->GetItemSet()->Put(SfxBoolItem(SID_LOCK_CONTENT_EXTRACTION, bValue));
+ ok = true;
+ }
}
else if (rArg.Name == "LockExport")
{
- rArg.Value >>= bValue;
- pMedium->GetItemSet()->Put(SfxBoolItem(SID_LOCK_EXPORT, bValue));
+ if (rArg.Value >>= bValue)
+ {
+ pMedium->GetItemSet()->Put(SfxBoolItem(SID_LOCK_EXPORT, bValue));
+ ok = true;
+ }
}
else if (rArg.Name == "LockPrint")
{
- rArg.Value >>= bValue;
- pMedium->GetItemSet()->Put(SfxBoolItem(SID_LOCK_PRINT, bValue));
+ if (rArg.Value >>= bValue)
+ {
+ pMedium->GetItemSet()->Put(SfxBoolItem(SID_LOCK_PRINT, bValue));
+ ok = true;
+ }
}
else if (rArg.Name == "LockSave")
{
- rArg.Value >>= bValue;
- pMedium->GetItemSet()->Put(SfxBoolItem(SID_LOCK_SAVE, bValue));
+ if (rArg.Value >>= bValue)
+ {
+ pMedium->GetItemSet()->Put(SfxBoolItem(SID_LOCK_SAVE, bValue));
+ ok = true;
+ }
}
else if (rArg.Name == "LockEditDoc")
{
- rArg.Value >>= bValue;
- pMedium->GetItemSet()->Put(SfxBoolItem(SID_LOCK_EDITDOC, bValue));
+ if (rArg.Value >>= bValue)
+ {
+ pMedium->GetItemSet()->Put(SfxBoolItem(SID_LOCK_EDITDOC, bValue));
+ ok = true;
+ }
}
else if (rArg.Name == "Replaceable")
{
- rArg.Value >>= bValue;
- pMedium->GetItemSet()->Put(SfxBoolItem(SID_REPLACEABLE, bValue));
+ if (rArg.Value >>= bValue)
+ {
+ pMedium->GetItemSet()->Put(SfxBoolItem(SID_REPLACEABLE, bValue));
+ ok = true;
+ }
}
- else
+ if (!ok)
{
throw lang::IllegalArgumentException("Setting property not supported: " + rArg.Name,
comphelper::getProcessComponentContext(), 0);
commit ca1c9578b70adb2d22891e930fb4621649e62373
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sat Sep 26 11:38:51 2020 +0200
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:25:25 2021 +0100
Avoid -Werror=nonnull with glibc-headers-x86-2.32-1.fc33.noarch
...on Fedora 33:
> ~/lo/core/vcl/unx/generic/app/i18n_cb.cxx: In function ‘void Preedit_InsertText(preedit_text_t*, XIMText*, int)’:
> ~/lo/core/vcl/unx/generic/app/i18n_cb.cxx:149:34: error: argument 1 is null but the corresponding size argument 3 value is 1024 [-Werror=nonnull]
> 149 | size_t nBytes = wcstombs ( nullptr, pWCString, 1024 /* don't care */);
> | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from ~/gcc/trunk/inst/include/c++/11.0.0/cstdlib:75,
> from ~/lo/core/include/sal/log.hxx:15,
> from ~/lo/core/vcl/unx/generic/app/i18n_cb.cxx:25:
> /usr/include/stdlib.h:937:15: note: in a call to function ‘size_t wcstombs(char*, const wchar_t*, size_t)’ declared with attribute ‘access (write_only, 1, 3)’
> 937 | extern size_t wcstombs (char *__restrict __s,
> | ^~~~~~~~
(Allowing the first argument to wcstombs to be null, and in which case the third
argument is ignored, is a POSIX extension.)
Change-Id: Ic078623643010b7539bc5bc1b498f18977ae77ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103473
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit 782d160458d319c6c77fffa4c003c519afffaa17)
diff --git a/vcl/unx/generic/app/i18n_cb.cxx b/vcl/unx/generic/app/i18n_cb.cxx
index e9861dca51d8..4f05e11a5845 100644
--- a/vcl/unx/generic/app/i18n_cb.cxx
+++ b/vcl/unx/generic/app/i18n_cb.cxx
@@ -142,7 +142,7 @@ Preedit_InsertText(preedit_text_t *pText, XIMText *pInsertText, int where)
if (pInsertText->encoding_is_wchar)
{
wchar_t *pWCString = pInsertText->string.wide_char;
- size_t nBytes = wcstombs ( nullptr, pWCString, 1024 /* don't care */);
+ size_t nBytes = wcstombs ( nullptr, pWCString, 0 /* don't care */);
pMBString = static_cast<char*>(alloca( nBytes + 1 ));
nMBLength = wcstombs ( pMBString, pWCString, nBytes + 1);
}
@@ -476,7 +476,7 @@ StatusDrawCallback (XIC, XPointer, XIMStatusDrawCallbackStruct *call_data)
if( call_data->data.text->string.wide_char )
{
wchar_t* pWString = call_data->data.text->string.wide_char;
- size_t nBytes = wcstombs( nullptr, pWString, 1024 );
+ size_t nBytes = wcstombs( nullptr, pWString, 0 /*don't care*/ );
pMBString = static_cast<sal_Char*>(alloca( nBytes+1 ));
nLength = wcstombs( pMBString, pWString, nBytes+1 );
}
commit 15f99a83facc0d8fb4b7b74c98da78964d5b7379
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Dec 4 16:51:28 2019 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:18:01 2021 +0100
Silence -Werror=maybe-uninitialized
...where the members of aRectangle passed into gtv_calc_header_bar_draw_text
(and unconditionally used there, see the definition further up in this file) are
only set for ROW and COLUMN types. Lets assume that no other types can happen
here? (This is part of libreofficekit/Executable_gtktiledviewer.mk, see
libreofficekit/README for how to execute it.)
Change-Id: I487be241e564127183751758710140ab24941f63
Reviewed-on: https://gerrit.libreoffice.org/84424
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit 281f3d5c418e50a2858619633ebca290bd626c03)
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx b/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
index 68c3e881caa4..9117cee8f501 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
@@ -9,6 +9,7 @@
#include <gtk/gtk.h>
+#include <cassert>
#include <cmath>
#include <iostream>
@@ -143,6 +144,10 @@ static bool gtv_calc_header_bar_draw_impl(GtkWidget* pWidget, cairo_t* pCairo)
cairo_rectangle(pCairo, aRectangle.x, aRectangle.height, aRectangle.width, 1);
cairo_fill(pCairo);
}
+ else
+ {
+ assert(false); // should never happen
+ }
gtv_calc_header_bar_draw_text(pCairo, aRectangle, rHeader.m_aText);
nPrevious = rHeader.m_nSize;
commit a14824b59b22704711697b55e6d2932b41048ba1
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Nov 24 13:06:13 2020 +0000
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:18:01 2021 +0100
ofz#27817 null deref
Change-Id: I16da6f6f78dfd0a4bc17017275a6644d6e4340c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106533
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 48d052a9f1bdbd34e1819b45ab83f51b84911702)
diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx
index 5daa1310d810..7d96867acb00 100644
--- a/sw/source/filter/basflt/fltshell.cxx
+++ b/sw/source/filter/basflt/fltshell.cxx
@@ -659,9 +659,8 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
{
SwTextNode const*const pTextNode(
aRegion.End()->nNode.GetNode().GetTextNode());
- assert(pTextNode);
- SwTextField const*const pField(pTextNode->GetFieldTextAttrAt(
- aRegion.End()->nContent.GetIndex() - 1, true));
+ SwTextField const*const pField = pTextNode ? pTextNode->GetFieldTextAttrAt(
+ aRegion.End()->nContent.GetIndex() - 1, true) : nullptr;
if (pField)
{
SwPostItField const*const pPostIt(
commit 71f9ab6537e09a1d893c31dc3fe0f6c5618aa9dd
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Nov 3 16:53:55 2020 +0000
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:18:00 2021 +0100
ofz#26943 detect if FormatOfJustInsertedApo was deleted
move FrameDeleteWatch for reuse in the doc filter
Change-Id: I6e53549a837968cb738b5188e8670dd3e38a9c0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105264
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 2a7a62c09582ec24247022a94e929610d141a4c9)
diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx
index e6e0517a0489..5daa1310d810 100644
--- a/sw/source/filter/basflt/fltshell.cxx
+++ b/sw/source/filter/basflt/fltshell.cxx
@@ -1126,4 +1126,31 @@ void UpdatePageDescs(SwDoc &rDoc, size_t nInPageDescOffset)
rDoc.ChgPageDesc(i, rDoc.GetPageDesc(i));
}
+FrameDeleteWatch::FrameDeleteWatch(SwFrameFormat* pFormat)
+ : m_pFormat(pFormat)
+{
+ if(m_pFormat)
+ StartListening(pFormat->GetNotifier());
+}
+
+void FrameDeleteWatch::Notify(const SfxHint& rHint)
+{
+ bool bDying = false;
+ if (rHint.GetId() == SfxHintId::Dying)
+ bDying = true;
+ else if (auto pDrawFrameFormatHint = dynamic_cast<const sw::DrawFrameFormatHint*>(&rHint))
+ bDying = pDrawFrameFormatHint->m_eId == sw::DrawFrameFormatHintId::DYING;
+ if (bDying)
+ {
+ m_pFormat = nullptr;
+ EndListeningAll();
+ }
+}
+
+FrameDeleteWatch::~FrameDeleteWatch()
+{
+ m_pFormat = nullptr;
+ EndListeningAll();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 0d659d7dfd65..ce689df01b9d 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -4860,41 +4860,6 @@ HTMLTableOptions::HTMLTableOptions( const HTMLOptions& rOptions,
namespace
{
- class FrameDeleteWatch final: public SvtListener
- {
- SwFrameFormat* m_pFormat;
- public:
- FrameDeleteWatch(SwFrameFormat* pFormat)
- : m_pFormat(pFormat)
- {
- if(m_pFormat)
- StartListening(pFormat->GetNotifier());
- }
-
- virtual void Notify(const SfxHint& rHint) override
- {
- if (auto pDrawFrameFormatHint = dynamic_cast<const sw::DrawFrameFormatHint*>(&rHint))
- {
- if (pDrawFrameFormatHint->m_eId == sw::DrawFrameFormatHintId::DYING)
- {
- m_pFormat = nullptr;
- EndListeningAll();
- }
- }
- }
-
- bool WasDeleted() const
- {
- return !m_pFormat;
- }
-
- virtual ~FrameDeleteWatch() override
- {
- m_pFormat = nullptr;
- EndListeningAll();
- }
- };
-
class IndexInRange
{
private:
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
index 2f8450556d39..1e6bf6c8a735 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -330,6 +330,28 @@ public:
}
};
+// detect if the SwFrameFormat it is watching was deleted
+class SW_DLLPUBLIC FrameDeleteWatch final: public SvtListener
+{
+ SwFrameFormat* m_pFormat;
+public:
+ FrameDeleteWatch(SwFrameFormat* pFormat);
+
+ virtual void Notify(const SfxHint& rHint) override;
+
+ SwFrameFormat* GetFormat()
+ {
+ return m_pFormat;
+ }
+
+ bool WasDeleted() const
+ {
+ return !m_pFormat;
+ }
+
+ virtual ~FrameDeleteWatch() override;
+};
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 44812a67ad1f..f5bdacffe32d 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2170,7 +2170,7 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes)
std::unique_ptr<OutlinerParaObject> pOutliner = ImportAsOutliner( sText, pRes->nCp2OrIdx,
pRes->nCp2OrIdx + pRes->nMemLen, MAN_AND );
- m_pFormatOfJustInsertedApo = nullptr;
+ m_xFormatOfJustInsertedApo.reset();
SwPostItField aPostIt(
static_cast<SwPostItFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFieldType(SwFieldIds::Postit)), sAuthor,
sText, sInitials, OUString(), aDate );
@@ -4260,7 +4260,6 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SotStorage* pStorage,
, m_aParaStyleMapper(rD)
, m_aCharStyleMapper(rD)
, m_pFlyFormatOfJustInsertedGraphic(nullptr)
- , m_pFormatOfJustInsertedApo(nullptr)
, m_pPreviousNumPaM(nullptr)
, m_pPrevNumRule(nullptr)
, m_aTextNodesHavingFirstLineOfstSet()
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 61e30e6618ed..74953aa2016c 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1196,7 +1196,7 @@ private:
std::unique_ptr<SwMSConvertControls> m_xFormImpl; // implementation of control
SwFlyFrameFormat* m_pFlyFormatOfJustInsertedGraphic;
- SwFrameFormat* m_pFormatOfJustInsertedApo;
+ std::unique_ptr<FrameDeleteWatch> m_xFormatOfJustInsertedApo;
SwPaM* m_pPreviousNumPaM;
const SwNumRule* m_pPrevNumRule;
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index f0a12ad3005e..6edc842e48ee 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -2399,18 +2399,20 @@ void WW8TabDesc::CreateSwTable()
Set fly anchor to its anchor pos, so that if a table starts immediately
at this position a new node will be inserted before inserting the table.
*/
- if (!bInsNode && m_pIo->m_pFormatOfJustInsertedApo)
+ SwFrameFormat* pFormat = (!bInsNode && m_pIo->m_xFormatOfJustInsertedApo)
+ ? m_pIo->m_xFormatOfJustInsertedApo->GetFormat() : nullptr;
+ if (pFormat)
{
const SwPosition* pAPos =
- m_pIo->m_pFormatOfJustInsertedApo->GetAnchor().GetContentAnchor();
+ pFormat->GetAnchor().GetContentAnchor();
if (pAPos && &pAPos->nNode.GetNode() == &pPoint->nNode.GetNode())
{
bInsNode = true;
bSetMinHeight = true;
- SwFormatSurround aSur(m_pIo->m_pFormatOfJustInsertedApo->GetSurround());
+ SwFormatSurround aSur(pFormat->GetSurround());
aSur.SetAnchorOnly(true);
- m_pIo->m_pFormatOfJustInsertedApo->SetFormatAttr(aSur);
+ pFormat->SetFormatAttr(aSur);
}
}
@@ -2797,7 +2799,7 @@ void WW8TabDesc::FinishSwTable()
}
}
}
- m_pIo->m_pFormatOfJustInsertedApo = nullptr;
+ m_pIo->m_xFormatOfJustInsertedApo.reset();
m_MergeGroups.clear();
}
}
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 499fdc8e223e..1e68d7a592b4 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2716,7 +2716,7 @@ void SwWW8ImplReader::StopApo()
//#i8062#
if (m_xSFlyPara && m_xSFlyPara->pFlyFormat)
- m_pFormatOfJustInsertedApo = m_xSFlyPara->pFlyFormat;
+ m_xFormatOfJustInsertedApo.reset(new FrameDeleteWatch(m_xSFlyPara->pFlyFormat));
m_xSFlyPara.reset();
m_xWFlyPara.reset();
commit 0b20580a4ad36ad3557d1b0d2af8dd3d193f6d79
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Oct 27 10:12:37 2020 +0000
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:18:00 2021 +0100
ofz#26676 null deref
Change-Id: Ic2bd8b49762266ad48263bd68a143b46fb5fd66f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104863
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 9bf58fd45814f10ecf6131aeeec86123a383723f)
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx
index b4805ae6d9af..6357bcc83862 100644
--- a/lotuswordpro/source/filter/lwptablelayout.cxx
+++ b/lotuswordpro/source/filter/lwptablelayout.cxx
@@ -879,7 +879,14 @@ sal_uInt16 LwpTableLayout::ConvertHeadingRow(
XFRow* pXFRow = pTmpTable->GetRow(1);
pXFTable->AddHeaderRow(pXFRow);
pTmpTable->RemoveRow(1);
- nContentRow = m_RowsMap[0]->GetCurMaxSpannedRows(0,nCol);
+ auto iter = m_RowsMap.find(0);
+ if (iter == m_RowsMap.end())
+ {
+ SAL_WARN("lwp", "row 0 is unknown");
+ nContentRow = 0;
+ }
+ else
+ nContentRow = iter->second->GetCurMaxSpannedRows(0,nCol);
}
}
return nContentRow;
commit b65593de9773a9ac339d631caaa7e28868f1864d
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Oct 26 20:38:03 2020 +0000
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:18:00 2021 +0100
ofz#26619 detect if SwFrameFormat deleted during import
Change-Id: I5dc778e44dcb670353e83037a5a5d469fa437186
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104853
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 7ae9e8b6ba35dec2c556f6fac4034cd9bb1111a1)
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 488edb6dce06..a390ffc0368e 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -284,7 +284,7 @@ void SwHTMLParser::RegisterFlyFrame( SwFrameFormat *pFlyFormat )
(RndStdIds::FLY_AT_PARA == pFlyFormat->GetAnchor().GetAnchorId()) &&
css::text::WrapTextMode_THROUGH == pFlyFormat->GetSurround().GetSurround() )
{
- m_aMoveFlyFrames.push_back( pFlyFormat );
+ m_aMoveFlyFrames.emplace_back(std::make_unique<SwHTMLFrameFormatListener>(pFlyFormat));
m_aMoveFlyCnts.push_back( m_pPam->GetPoint()->nContent.GetIndex() );
}
}
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index aaa6c2e7dd35..3f72a8a044e3 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -2679,6 +2679,18 @@ SwViewShell *SwHTMLParser::CheckActionViewShell()
return m_pActionViewShell;
}
+SwHTMLFrameFormatListener::SwHTMLFrameFormatListener(SwFrameFormat* pFrameFormat)
+ : m_pFrameFormat(pFrameFormat)
+{
+ StartListening(m_pFrameFormat->GetNotifier());
+}
+
+void SwHTMLFrameFormatListener::Notify(const SfxHint& rHint)
+{
+ if (rHint.GetId() == SfxHintId::Dying)
+ m_pFrameFormat = nullptr;
+}
+
void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
std::deque<std::unique_ptr<HTMLAttr>> *pPostIts )
{
@@ -2938,7 +2950,14 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable,
for( auto n = m_aMoveFlyFrames.size(); n; )
{
- SwFrameFormat *pFrameFormat = m_aMoveFlyFrames[ --n ];
+ SwFrameFormat *pFrameFormat = m_aMoveFlyFrames[--n]->GetFrameFormat();
+ if (!pFrameFormat)
+ {
+ SAL_WARN("sw.html", "SwFrameFormat deleted during import");
+ m_aMoveFlyFrames.erase( m_aMoveFlyFrames.begin() + n );
+ m_aMoveFlyCnts.erase( m_aMoveFlyCnts.begin() + n );
+ continue;
+ }
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
OSL_ENSURE( RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId(),
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 58eaaaab715e..b3dc2b12ee5c 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -325,6 +325,15 @@ namespace o3tl
template<> struct typed_flags<HtmlFrameFormatFlags> : is_typed_flags<HtmlFrameFormatFlags, 0x0f> {};
}
+class SwHTMLFrameFormatListener : public SvtListener
+{
+ SwFrameFormat* m_pFrameFormat;
+public:
+ SwHTMLFrameFormatListener(SwFrameFormat* pFrameFormat);
+ SwFrameFormat* GetFrameFormat() { return m_pFrameFormat; }
+ virtual void Notify(const SfxHint&) override;
+};
+
class SwHTMLParser : public SfxHTMLParser, public SvtListener
{
friend class SectionSaveStruct;
@@ -360,7 +369,7 @@ class SwHTMLParser : public SfxHTMLParser, public SvtListener
HTMLAttrs m_aParaAttrs; // temporary paragraph attributes
std::shared_ptr<HTMLAttrTable> m_xAttrTab; // "open" attributes
HTMLAttrContexts m_aContexts;// the current context of attribute/token
- std::vector<SwFrameFormat *> m_aMoveFlyFrames;// Fly-Frames, the anchor is moved
+ std::vector<std::unique_ptr<SwHTMLFrameFormatListener>> m_aMoveFlyFrames;// Fly-Frames, the anchor is moved
std::deque<sal_Int32> m_aMoveFlyCnts;// and the Content-Positions
//stray SwTableBoxes which need to be deleted to avoid leaking, but hold
//onto them until parsing is done
commit 4fb8fe698448d27560d43d29a7df1cd1abeed1bb
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Oct 18 20:36:16 2020 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:17:59 2021 +0100
ofz#26480 validate WW8PLCFpcd is sorted like WW8PLCF does
Change-Id: I11393c730986585aeea229ebeec6417e4a0578d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104510
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 7f55db80c6fe42c162bbf51404e638a66b6ae9ab)
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index f64859171dc6..2d5ba97d105f 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -2334,26 +2334,40 @@ void WW8PLCF::ReadPLCF(SvStream& rSt, WW8_FC nFilePos, sal_uInt32 nPLCF)
void WW8PLCF::MakeFailedPLCF()
{
nIMax = 0;
- pPLCF_PosArray.reset( new sal_Int32[2] );
+ pPLCF_PosArray.reset( new WW8_CP[2] );
pPLCF_PosArray[0] = pPLCF_PosArray[1] = WW8_CP_MAX;
pPLCF_Contents = reinterpret_cast<sal_uInt8*>(&pPLCF_PosArray[nIMax + 1]);
}
-void WW8PLCF::TruncToSortedRange()
+namespace
{
- //Docs state that: ... all Plcs ... are sorted in ascending order.
- //So ensure that here for broken documents.
- for (auto nI = 0; nI < nIMax; ++nI)
+ sal_Int32 TruncToSortedRange(const sal_Int32* pPLCF_PosArray, sal_Int32 nIMax)
{
- if (pPLCF_PosArray[nI] > pPLCF_PosArray[nI+1])
+ //Docs state that: ... all Plcs ... are sorted in ascending order.
+ //So ensure that here for broken documents.
+ for (auto nI = 0; nI < nIMax; ++nI)
{
- SAL_WARN("sw.ww8", "Document has unsorted PLCF, truncated to sorted portion");
- nIMax = nI;
- break;
+ if (pPLCF_PosArray[nI] > pPLCF_PosArray[nI+1])
+ {
+ SAL_WARN("sw.ww8", "Document has unsorted PLCF, truncated to sorted portion");
+ nIMax = nI;
+ break;
+ }
}
+ return nIMax;
}
}
+void WW8PLCFpcd::TruncToSortedRange()
+{
+ nIMax = ::TruncToSortedRange(pPLCF_PosArray.get(), nIMax);
+}
+
+void WW8PLCF::TruncToSortedRange()
+{
+ nIMax = ::TruncToSortedRange(pPLCF_PosArray.get(), nIMax);
+}
+
void WW8PLCF::GeneratePLCF(SvStream& rSt, sal_Int32 nPN, sal_Int32 ncpN)
{
OSL_ENSURE( nIMax < ncpN, "Pcl.Fkp: Why is PLCF too big?" );
@@ -2375,7 +2389,7 @@ void WW8PLCF::GeneratePLCF(SvStream& rSt, sal_Int32 nPN, sal_Int32 ncpN)
{
size_t nSiz = (4 + nStru) * nIMax + 4;
size_t nElems = ( nSiz + 3 ) / 4;
- pPLCF_PosArray.reset( new sal_Int32[ nElems ] ); // Pointer to Pos-array
+ pPLCF_PosArray.reset( new WW8_CP[ nElems ] ); // Pointer to Pos-array
for (sal_Int32 i = 0; i < ncpN && !failure; ++i)
{
@@ -2509,7 +2523,7 @@ WW8PLCFpcd::WW8PLCFpcd(SvStream* pSt, sal_uInt32 nFilePos,
bValid = false;
nPLCF = bValid ? std::min(nRemainingSize, static_cast<std::size_t>(nPLCF)) : nValidMin;
- pPLCF_PosArray.reset( new sal_Int32[ ( nPLCF + 3 ) / 4 ] ); // Pointer to Pos-array
+ pPLCF_PosArray.reset( new WW8_CP[ ( nPLCF + 3 ) / 4 ] ); // Pointer to Pos-array
pPLCF_PosArray[0] = 0;
nPLCF = bValid ? pSt->ReadBytes(pPLCF_PosArray.get(), nPLCF) : nValidMin;
@@ -2523,6 +2537,7 @@ WW8PLCFpcd::WW8PLCFpcd(SvStream* pSt, sal_uInt32 nFilePos,
// Pointer to content array
pPLCF_Contents = reinterpret_cast<sal_uInt8*>(&pPLCF_PosArray[nIMax + 1]);
+ TruncToSortedRange();
pSt->Seek( nOldPos );
}
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 1a5b024c12fb..6d01af87316e 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -339,14 +339,16 @@ class WW8PLCFpcd
{
friend class WW8PLCFpcd_Iter;
- std::unique_ptr<sal_Int32[]> pPLCF_PosArray; // pointer to Pos-array and the whole structure
+ std::unique_ptr<WW8_CP[]> pPLCF_PosArray; // pointer to Pos-array and the whole structure
sal_uInt8* pPLCF_Contents; // pointer to content-array-part of Pos-array
- long nIMax;
+ sal_Int32 nIMax;
sal_uInt32 nStru;
WW8PLCFpcd(const WW8PLCFpcd&) = delete;
WW8PLCFpcd& operator=(const WW8PLCFpcd&) = delete;
+ void TruncToSortedRange();
+
public:
WW8PLCFpcd(SvStream* pSt, sal_uInt32 nFilePos, sal_uInt32 nPLCF,
sal_uInt32 nStruct);
commit 758828d1137190e8ff6fc99c77d4c05cbda6434d
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Oct 3 21:56:19 2020 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:17:59 2021 +0100
ofz#26122 allow NINSIZE input full elements
Change-Id: Ifbde8fc055a91e23db08508a34ce4664d2f1f96f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103906
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit fb0c3f9d8964f8c0f40238559c32d9d73cba6b55)
diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx
index 17f9065261ab..11a6a366e208 100644
--- a/vcl/source/font/fontcharmap.cxx
+++ b/vcl/source/font/fontcharmap.cxx
@@ -333,7 +333,8 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
static const int NINSIZE = 64;
static const int NOUTSIZE = 64;
- sal_Char cCharsInp[ NINSIZE ];
+ std::vector<char> cCharsInp;
+ cCharsInp.reserve(NINSIZE);
sal_Unicode cCharsOut[ NOUTSIZE ];
sal_UCS4* pCP = pCodePairs;
for( int i = 0; i < nRangeCount; ++i )
@@ -344,25 +345,26 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
// input codepoints in 0..SAL_MAX_UINT16 range
while (cMin < cEnd && cMin <= SAL_MAX_UINT16)
{
- int j = 0;
- for(; (cMin < cEnd) && (j < NINSIZE); ++cMin )
+ for (int j = 0; (cMin < cEnd) && (j < NINSIZE); ++cMin, ++j)
{
if( cMin >= 0x0100 )
- cCharsInp[ j++ ] = static_cast<sal_Char>(cMin >> 8);
+ cCharsInp.push_back(static_cast<char>(cMin >> 8));
if( (cMin >= 0x0100) || (cMin < 0x00A0) )
- cCharsInp[ j++ ] = static_cast<sal_Char>(cMin);
+ cCharsInp.push_back(static_cast<char>(cMin));
}
sal_uInt32 nCvtInfo;
sal_Size nSrcCvtBytes;
int nOutLen = rtl_convertTextToUnicode(
aConverter, aCvtContext,
- cCharsInp, j, cCharsOut, NOUTSIZE,
+ cCharsInp.data(), cCharsInp.size(), cCharsOut, NOUTSIZE,
RTL_TEXTTOUNICODE_FLAGS_INVALID_IGNORE
| RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_IGNORE,
&nCvtInfo, &nSrcCvtBytes );
- for( j = 0; j < nOutLen; ++j )
+ cCharsInp.clear();
+
+ for (int j = 0; j < nOutLen; ++j)
aSupportedCodePoints.insert( cCharsOut[j] );
}
}
commit 45b98d0a1ec8f80d3e7ff198f2886a8942faa67f
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Sep 29 20:59:40 2020 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:17:59 2021 +0100
ofz#25989 cmap parsing
Change-Id: I048e5d88d5926a4afa75afab18db5ca6354e2454
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103641
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 9a1202edab0cfe95572f12a8c49ef756ead49bf2)
diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx
index 92760875b647..17f9065261ab 100644
--- a/vcl/source/font/fontcharmap.cxx
+++ b/vcl/source/font/fontcharmap.cxx
@@ -229,7 +229,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
// update the glyphid-array with the glyphs in this range
pStartGlyphs[i] = -static_cast<int>(aGlyphIdArray.size());
const unsigned char* pGlyphIdPtr = pOffsetBase + 2*i + nRangeOffset;
- const size_t nRemainingSize = pEndValidArea - pGlyphIdPtr;
+ const size_t nRemainingSize = pEndValidArea >= pGlyphIdPtr ? pEndValidArea - pGlyphIdPtr : 0;
const size_t nMaxPossibleRecords = nRemainingSize/2;
if (nMaxPossibleRecords == 0) { // no sane font should trigger this
SAL_WARN("vcl.gdi", "More indexes claimed that space available in font!");
commit b61b06cd645aec5e97e855ff5813356b0b073ecc
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Mar 7 19:24:42 2020 +0000
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:17:58 2021 +0100
ofz#20622 oom
Change-Id: Id77d90197e98d29787a40966f248dd769c9dac28
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90175
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 1e95c2c17a49349caba1e62b4de3752c5f767f01)
diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx
index 1cf13d4c7de8..3652bb849bf4 100644
--- a/include/vcl/BitmapTools.hxx
+++ b/include/vcl/BitmapTools.hxx
@@ -53,7 +53,8 @@ public:
assert(nBitCount == 24 || nBitCount == 32);
sal_Int32 nRowSize, nDataSize;
if (o3tl::checked_multiply<sal_Int32>(rSize.getWidth(), nBitCount/8, nRowSize) ||
- o3tl::checked_multiply<sal_Int32>(nRowSize, rSize.getHeight(), nDataSize))
+ o3tl::checked_multiply<sal_Int32>(nRowSize, rSize.getHeight(), nDataSize) ||
+ nDataSize < 0)
{
throw std::bad_alloc();
}
commit 1be792cc4532ca5efb76f41989ae2a0e87a46b9b
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Feb 7 14:09:57 2020 +0000
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:17:58 2021 +0100
ofz#20517 null-dereference
Change-Id: I443869f848925911ed46e2f547f0dc652b1ff290
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88214
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 08695569fd4fccc1722e7e3c7e0a234699199196)
diff --git a/lotuswordpro/qa/cppunit/data/pass/ofz20517-1.lwp b/lotuswordpro/qa/cppunit/data/pass/ofz20517-1.lwp
new file mode 100644
index 000000000000..de6dcbf1c5d5
Binary files /dev/null and b/lotuswordpro/qa/cppunit/data/pass/ofz20517-1.lwp differ
diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx b/lotuswordpro/source/filter/lwprowlayout.cxx
index d958486e3553..98acf39085d4 100644
--- a/lotuswordpro/source/filter/lwprowlayout.cxx
+++ b/lotuswordpro/source/filter/lwprowlayout.cxx
@@ -379,11 +379,13 @@ void LwpRowLayout::ConvertCommonRow(rtl::Reference<XFTable> const & pXFTable, sa
LwpTableLayout* pTableLayout = GetParentTableLayout();
if (!pTableLayout)
return;
+ LwpTable* pTable = pTableLayout->GetTable();
+ if (!pTable)
+ return;
rtl::Reference<XFRow> xRow(new XFRow);
xRow->SetStyleName(m_StyleName);
- LwpTable* pTable = pTableLayout->GetTable();
sal_uInt8 nCellStartCol,nCellEndCol;
for (sal_uInt8 i = nStartCol; i < nEndCol ; i++)
commit 4ad9ed49ec5bf9697c6ba6db946d54cccc48c6a3
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Feb 1 11:21:10 2020 +0000
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:17:57 2021 +0100
ofz#20447 Null-dereference READ
Change-Id: I76c1c815ab5aaf4548c886a69989fcabe3de5248
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87802
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit fec7e3422f4d1c5b9382518a11d0bb99b12e41c9)
diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx b/lotuswordpro/source/filter/lwprowlayout.cxx
index 10eed55d0499..d958486e3553 100644
--- a/lotuswordpro/source/filter/lwprowlayout.cxx
+++ b/lotuswordpro/source/filter/lwprowlayout.cxx
@@ -191,7 +191,8 @@ void LwpRowLayout::Read()
void LwpRowLayout::ConvertRow(rtl::Reference<XFTable> const & pXFTable,sal_uInt8 nStartCol,sal_uInt8 nEndCol)
{
LwpTableLayout* pTableLayout = GetParentTableLayout();
- assert(pTableLayout);
+ if (!pTableLayout)
+ throw std::runtime_error("missing TableLayout");
LwpTable* pTable = pTableLayout->GetTable();
//calculate the connected cell position
commit 6bd7aa50b3741e949f2138274ad2f74eea6b17a7
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jan 28 16:43:28 2020 +0000
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:17:57 2021 +0100
ofz#20366 OOM
Change-Id: If658720502739e6ad88c3cf73ac6674e0313a48b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87648
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 090cf1e3bbe0ffaf56f22b152b73578483be2f42)
diff --git a/filter/source/graphicfilter/icgm/bitmap.cxx b/filter/source/graphicfilter/icgm/bitmap.cxx
index 825c90243e0a..025ab1fc588a 100644
--- a/filter/source/graphicfilter/icgm/bitmap.cxx
+++ b/filter/source/graphicfilter/icgm/bitmap.cxx
@@ -316,7 +316,15 @@ bool CGMBitmap::ImplGetDimensions( CGMBitmapDescriptor& rDesc )
rDesc.mbStatus = false;
sal_uInt32 nHeaderSize = 2 + 3 * nPrecision + 3 * mpCGM->ImplGetPointSize();
- rDesc.mnScanSize = ( ( rDesc.mnX * rDesc.mnDstBitsPerPixel + 7 ) >> 3 );
+
+ sal_uInt32 nWidthBits;
+ if (o3tl::checked_multiply(rDesc.mnX, rDesc.mnDstBitsPerPixel, nWidthBits))
+ {
+ rDesc.mbStatus = false;
+ return false;
+ }
+
+ rDesc.mnScanSize = (nWidthBits + 7) >> 3;
sal_uInt32 nScanSize;
nScanSize = rDesc.mnScanSize;
commit aeb75386098879d05385c6e31c01822a2c177ffa
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Feb 1 12:04:26 2020 +0000
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:17:57 2021 +0100
ofz#20456 Null-dereference READ
this is the first honggfuzz (honggfuzz_asan_libreoffice) report I've seen to date
Change-Id: Iac733aa63c7c94d9454b9c8596340dc2286393c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87803
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 0754e581b0d8569dd08cf26f88678754f249face)
diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx b/lotuswordpro/source/filter/lwprowlayout.cxx
index 287f8de65434..10eed55d0499 100644
--- a/lotuswordpro/source/filter/lwprowlayout.cxx
+++ b/lotuswordpro/source/filter/lwprowlayout.cxx
@@ -282,14 +282,15 @@ void LwpRowLayout::RegisterCurRowStyle(XFRow* pXFRow,sal_uInt16 nRowMark)
{
pRowStyle = static_cast<XFRowStyle*>(
pXFStyleManager->FindStyle(pTableLayout->GetDefaultRowStyleName()));
- fHeight += pRowStyle->GetRowHeight();
}
else
{
pRowStyle = static_cast<XFRowStyle*>(
pXFStyleManager->FindStyle(iter->second->GetStyleName()));
- fHeight+=pRowStyle->GetRowHeight();
}
+ if (!pRowStyle)
+ throw std::runtime_error("missing RowStyle");
+ fHeight += pRowStyle->GetRowHeight();
}
if (m_nDirection & 0x0030)
commit 370ae4709620c7f57c0901d878d0fef90507cd1a
Author: Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Tue Jan 19 15:38:05 2021 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:17:56 2021 +0100
postgresql: upgrade to release 13.1
Fixes CVE-2020-25694, plus a bunch more CVE that don't look relevant.
* --with-krb5 no longer exists, neither does --disable-shared
* remove internal-zlib.patch.1:
zlib is only used by pg_* tools / contrib/pgcrypto
* remove postgresql-libs-leak.patch:
some relic from pre-gbuild times, not clear what the point is for
static libs
* remove postgresql-9.2.1-libreoffice.patch:
another dmake .mk file relic, and the win32 nmake build system was
removed
* add postgres-msvc-build.patch.1 to fix Cygwin perl and openssl
* on WNT, libpq.dll is now built, no longer static lib
postgresql: fix mistake in RepositoryExternal.mk
Change-Id: Ic0232a28801b2f604d9f4e33d5621ae3362defaa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109640
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
(cherry picked from commit 234833f7823a1424b62c93e145f0cfe2c6b6efd5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109698
Reviewed-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
(cherry picked from commit 1362bf7fa2957d34a7cef18dd95ede22cc42787f)
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index c5c888f143c3..3d2d61dfc2b4 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3027,9 +3027,15 @@ endef
else # !SYSTEM_POSTGRESQL
+ifeq ($(OS),WNT)
+$(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
+ postgresql \
+))
+endif # WNT
+
define gb_LinkTarget__use_postgresql
-$(call gb_LinkTarget_use_external_project,$(1),postgresql)
+$(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
$(call gb_LinkTarget_set_include,$(1),\
-I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
@@ -3037,19 +3043,21 @@ $(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
)
+ifeq ($(OS),WNT)
+
$(call gb_LinkTarget_add_libs,$(1),\
- $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
+ $(call gb_UnpackedTarball_get_dir,postgresql)/$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/libpq/libpq.lib \
)
-ifeq ($(OS),WNT)
-$(call gb_LinkTarget_use_external,$(1),openssl)
+else # WNT
-$(call gb_LinkTarget_use_system_win32_libs,$(1),\
- secur32 \
- ws2_32 \
+$(call gb_LinkTarget_add_libs,$(1),\
+ $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
+ $(call gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT) \
+ $(call gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT) \
)
-endif
+endif # WNT
endef
diff --git a/download.lst b/download.lst
index 815ac5b1195a..bdbed280f3e0 100644
--- a/download.lst
+++ b/download.lst
@@ -210,8 +210,8 @@ export LIBPNG_SHA256SUM := 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201f
export LIBPNG_TARBALL := libpng-1.6.37.tar.xz
export POPPLER_SHA256SUM := 016dde34e5f868ea98a32ca99b643325a9682281500942b7113f4ec88d20e2f3
export POPPLER_TARBALL := poppler-21.01.0.tar.xz
-export POSTGRESQL_SHA256SUM := a754c02f7051c2f21e52f8669a421b50485afcde9a581674d6106326b189d126
-export POSTGRESQL_TARBALL := postgresql-9.2.24.tar.bz2
+export POSTGRESQL_SHA256SUM := 12345c83b89aa29808568977f5200d6da00f88a035517f925293355432ffe61f
+export POSTGRESQL_TARBALL := postgresql-13.1.tar.bz2
export PYTHON_SHA256SUM := 06a0a9f1bf0d8cd1e4121194d666c4e28ddae4dd54346de6c343206599f02136
export PYTHON_TARBALL := Python-3.7.7.tar.xz
export QRCODEGEN_SHA256SUM := fcdf9fd69fde07ae4dca2351d84271a9de8093002f733b77c70f52f1630f6e4a
diff --git a/external/postgresql/ExternalPackage_postgresql.mk b/external/postgresql/ExternalPackage_postgresql.mk
new file mode 100644
index 000000000000..f6c9a9bb6deb
--- /dev/null
+++ b/external/postgresql/ExternalPackage_postgresql.mk
@@ -0,0 +1,16 @@
+# -*- 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_ExternalPackage_ExternalPackage,postgresql,postgresql))
+
+$(eval $(call gb_ExternalPackage_use_external_project,postgresql,postgresql))
+
+$(eval $(call gb_ExternalPackage_add_file,postgresql,$(LIBO_LIB_FOLDER)/libpq.dll,$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/libpq/libpq.dll))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/postgresql/ExternalProject_postgresql.mk b/external/postgresql/ExternalProject_postgresql.mk
index ba462a34a1a1..001c3f961ac8 100644
--- a/external/postgresql/ExternalProject_postgresql.mk
+++ b/external/postgresql/ExternalProject_postgresql.mk
@@ -12,7 +12,6 @@ $(eval $(call gb_ExternalProject_ExternalProject,postgresql))
$(eval $(call gb_ExternalProject_use_externals,postgresql,\
$(if $(ENABLE_LDAP),openldap) \
openssl \
- zlib \
))
$(eval $(call gb_ExternalProject_register_targets,postgresql,\
@@ -25,8 +24,9 @@ $(eval $(call gb_ExternalProject_use_nmake,postgresql,build))
$(call gb_ExternalProject_get_state_target,postgresql,build) :
$(call gb_ExternalProject_run,build,\
- nmake -f win32.mak USE_SSL=1 USE_LDAP=1 \
- ,src)
+ MSBFLAGS=/p:Platform=$(if $(filter X86_64,$(CPUNAME)),x64,Win32) \
+ $(PERL) build.pl $(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) libpq \
+ ,src/tools/msvc)
else
@@ -55,21 +55,25 @@ postgresql_LDFLAGS += \
endif
+# note: as of 13.1, zlib is not needed by libpq
+# passing MAKELEVEL=0 is required to find internal headers
$(call gb_ExternalProject_get_state_target,postgresql,build) :
$(call gb_ExternalProject_run,build,\
./configure \
- --without-readline --disable-shared --with-ldap \
+ --without-readline \
+ --without-zlib \
+ --with-ldap \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
$(if $(DISABLE_OPENSSL),,--with-openssl \
- $(if $(WITH_KRB5), --with-krb5) \
$(if $(WITH_GSSAPI),--with-gssapi)) \
$(if $(ENABLE_LDAP),,--with-ldap=no) \
+ CFLAGS="-fPIC" \
CPPFLAGS="$(postgresql_CPPFLAGS)" \
LDFLAGS="$(postgresql_LDFLAGS)" \
$(if $(ENABLE_LDAP),EXTRA_LDAP_LIBS="-llber -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4") \
&& cd src/interfaces/libpq \
- && MAKEFLAGS= && $(MAKE) all-static-lib)
+ && MAKEFLAGS= && $(MAKE) MAKELEVEL=0 all-static-lib)
endif
diff --git a/external/postgresql/Module_postgresql.mk b/external/postgresql/Module_postgresql.mk
index 1f655c6e5034..7ea89dad3b39 100644
--- a/external/postgresql/Module_postgresql.mk
+++ b/external/postgresql/Module_postgresql.mk
@@ -14,4 +14,10 @@ $(eval $(call gb_Module_add_targets,postgresql,\
UnpackedTarball_postgresql \
))
+ifeq ($(OS),WNT)
+$(eval $(call gb_Module_add_targets,postgresql,\
+ ExternalPackage_postgresql \
+))
+endif # WNT
+
# vim: set noet sw=4 ts=4:
diff --git a/external/postgresql/UnpackedTarball_postgresql.mk b/external/postgresql/UnpackedTarball_postgresql.mk
index a7e57ab93301..6c941f1e9b22 100644
--- a/external/postgresql/UnpackedTarball_postgresql.mk
+++ b/external/postgresql/UnpackedTarball_postgresql.mk
@@ -11,19 +11,12 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,postgresql))
$(eval $(call gb_UnpackedTarball_set_tarball,postgresql,$(POSTGRESQL_TARBALL),,postgresql))
-$(eval $(call gb_UnpackedTarball_set_patchlevel,postgresql,3))
-
$(eval $(call gb_UnpackedTarball_add_patches,postgresql, \
- external/postgresql/postgresql-libs-leak.patch \
- external/postgresql/postgresql-9.2.1-libreoffice.patch \
external/postgresql/windows.patch.0 \
+ external/postgresql/postgres-msvc-build.patch.1 \
))
-ifeq ($(SYSTEM_ZLIB),)
-$(eval $(call gb_UnpackedTarball_add_patches,postgresql, \
- external/postgresql/internal-zlib.patch.1 \
-))
-endif
+$(eval $(call gb_UnpackedTarball_add_file,postgresql,src/tools/msvc/config.pl,external/postgresql/config.pl))
$(eval $(call gb_UnpackedTarball_update_autoconf_configs,postgresql))
diff --git a/external/postgresql/config.pl b/external/postgresql/config.pl
new file mode 100644
index 000000000000..ae163ebbd166
--- /dev/null
+++ b/external/postgresql/config.pl
@@ -0,0 +1 @@
+$config->{openssl} = "$ENV{WORKDIR}/UnpackedTarball/openssl";
diff --git a/external/postgresql/internal-zlib.patch.1 b/external/postgresql/internal-zlib.patch.1
deleted file mode 100644
index ac2b728e1314..000000000000
--- a/external/postgresql/internal-zlib.patch.1
+++ /dev/null
@@ -1,29 +0,0 @@
-diff -up postgresql/configure.dt postgresql/configure
---- postgresql/configure.dt 2016-11-03 17:34:17.282388226 +0100
-+++ postgresql/configure 2016-11-03 17:34:35.004202484 +0100
-@@ -8566,13 +8566,13 @@ fi
-
- if test "$with_zlib" = yes; then
-
--{ $as_echo "$as_me:$LINENO: checking for inflate in -lz" >&5
--$as_echo_n "checking for inflate in -lz... " >&6; }
-+{ $as_echo "$as_me:$LINENO: checking for inflate in -lzlib" >&5
-+$as_echo_n "checking for inflate in -lzlib... " >&6; }
- if test "${ac_cv_lib_z_inflate+set}" = set; then
- $as_echo_n "(cached) " >&6
- else
- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lz $LIBS"
-+LIBS="-lzlib $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
-@@ -8636,7 +8636,7 @@ if test "x$ac_cv_lib_z_inflate" = x""yes
- #define HAVE_LIBZ 1
- _ACEOF
-
-- LIBS="-lz $LIBS"
-+ LIBS="-lzlib $LIBS"
-
- else
- { { $as_echo "$as_me:$LINENO: error: zlib library not found
diff --git a/external/postgresql/postgres-msvc-build.patch.1 b/external/postgresql/postgres-msvc-build.patch.1
new file mode 100644
index 000000000000..4ccd82aa28fb
--- /dev/null
+++ b/external/postgresql/postgres-msvc-build.patch.1
@@ -0,0 +1,110 @@
+Cygwin perl calls /bin/sh which can't resolve to .exe
+
+Also Cygwin perl has $Config{osname} different from MSWin32, and why even check that?
+
+--- postgresql/src/tools/msvc/build.pl.orig 2021-01-19 17:36:09.801463500 +0100
++++ postgresql/src/tools/msvc/build.pl 2021-01-19 17:36:20.426821300 +0100
+@@ -55,13 +55,13 @@
+ if ($buildwhat)
+ {
+ system(
+- "msbuild $buildwhat.vcxproj /verbosity:normal $msbflags /p:Configuration=$bconf"
++ "msbuild.exe $buildwhat.vcxproj /verbosity:normal $msbflags /p:Configuration=$bconf"
+ );
+ }
+ else
+ {
+ system(
+- "msbuild pgsql.sln /verbosity:normal $msbflags /p:Configuration=$bconf"
++ "msbuild.exe pgsql.sln /verbosity:normal $msbflags /p:Configuration=$bconf"
+ );
+ }
+
+--- postgresql/src/tools/msvc/Project.pm.orig 2021-01-19 17:59:18.799237700 +0100
++++ postgresql/src/tools/msvc/Project.pm 2021-01-19 17:59:48.487711700 +0100
+@@ -22,7 +22,7 @@
+ my $self = {
+ name => $name,
+ type => $type,
+- guid => $^O eq "MSWin32" ? Win32::GuidGen() : 'FAKE',
++ guid => Win32::GuidGen(),
+ files => {},
+ references => [],
+ libraries => [],
+--- postgresql/src/tools/msvc/Solution.pm.orig 2021-01-19 18:03:04.594229100 +0100
++++ postgresql/src/tools/msvc/Solution.pm 2021-01-19 18:04:13.677610100 +0100
+@@ -59,7 +59,7 @@
+ {
+ my $self = shift;
+
+- if ($^O eq "MSWin32")
++ if (1) #($^O eq "MSWin32")
+ {
+ # Examine CL help output to determine if we are in 32 or 64-bit mode.
+ my $output = `cl /? 2>&1`;
+@@ -1081,7 +1081,7 @@
+ }
+ if ($fld ne "")
+ {
+- $flduid{$fld} = $^O eq "MSWin32" ? Win32::GuidGen() : 'FAKE';
++ $flduid{$fld} = Win32::GuidGen();
+ print $sln <<EOF;
+ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "$fld", "$fld", "$flduid{$fld}"
+ EndProject
+--- postgresql/src/tools/msvc/VSObjectFactory.pm.orig 2021-01-19 18:06:42.633421700 +0100
++++ postgresql/src/tools/msvc/VSObjectFactory.pm 2021-01-19 18:06:28.663523200 +0100
+@@ -111,7 +111,7 @@
+
+ sub DetermineVisualStudioVersion
+ {
+- if ($^O eq "MSWin32")
++ if (1) # ($^O eq "MSWin32")
+ {
+ # To determine version of Visual Studio we use nmake as it has
+ # existed for a long time and still exists in current Visual
+--- postgresql/src/tools/msvc/Mkvcbuild.pm.orig 2021-01-19 18:23:59.830153900 +0100
++++ postgresql/src/tools/msvc/Mkvcbuild.pm 2021-01-19 18:24:04.095411300 +0100
+@@ -9,7 +9,7 @@
+ use warnings;
+
+ use Carp;
+-use if ($^O eq "MSWin32"), 'Win32';
++use Win32;
+ use Project;
+ use Solution;
+ use Cwd;
+--- postgresql/src/tools/msvc/Solution.pm.orig 2021-01-19 20:27:21.366237600 +0100
++++ postgresql/src/tools/msvc/Solution.pm 2021-01-19 20:28:17.773662900 +0100
+@@ -126,7 +126,8 @@
+ # openssl.exe is in the specified directory.
+ # Quote the .exe name in case it has spaces
+ my $opensslcmd =
+- qq("$self->{options}->{openssl}\\bin\\openssl.exe" version 2>&1);
++ qq("$self->{options}->{openssl}\\out32dll\\openssl.exe" version 2>&1);
++ print "$opensslcmd";
+ my $sslout = `$opensslcmd`;
+
+ $? >> 8 == 0
+@@ -964,8 +964,8 @@
+ # On both Win32 and Win64 the same library
+ # names are used without a debugging context.
+ $dbgsuffix = 0;
+- $libsslpath = '\lib\libssl.lib';
+- $libcryptopath = '\lib\libcrypto.lib';
++ $libsslpath = '\libssl.lib';
++ $libcryptopath = '\libcrypto.lib';
+ }
+
+ $proj->AddLibrary($self->{options}->{openssl} . $libsslpath,
+@@ -990,9 +990,9 @@
+ # to be here, so don't ask for it in last
+ # parameter.
+ $proj->AddLibrary(
+- $self->{options}->{openssl} . '\lib\ssleay32.lib', 0);
++ $self->{options}->{openssl} . '\out32dll\ssleay32.lib', 0);
+ $proj->AddLibrary(
+- $self->{options}->{openssl} . '\lib\libeay32.lib', 0);
++ $self->{options}->{openssl} . '\out32dll\libeay32.lib', 0);
+ }
+ }
+ }
diff --git a/external/postgresql/postgresql-9.2.1-libreoffice.patch b/external/postgresql/postgresql-9.2.1-libreoffice.patch
deleted file mode 100644
index 174ee8551a78..000000000000
--- a/external/postgresql/postgresql-9.2.1-libreoffice.patch
+++ /dev/null
@@ -1,74 +0,0 @@
---- misc/build/postgresql-9.1.1/src/interfaces/libpq/Makefile 2011-09-22 23:57:57.000000000 +0200
-+++ misc/build/postgresql-9.1.1.patched/src/interfaces/libpq/Makefile 2011-12-15 09:02:18.000000000 +0100
-@@ -148,3 +148,6 @@
- maintainer-clean: distclean maintainer-clean-lib
- $(MAKE) -C test $@
- rm -f libpq-dist.rc
-+
-+libpq-flags.mk:
-+ @printf '%s\n' 'LIBPQ_DEP_LIBS+=$(SHLIB_LINK)' > '$@'
---- misc/build/postgresql-9.1.1/src/interfaces/libpq/win32.mak 2011-12-14 14:28:59.000000000 +0100
-+++ misc/build/postgresql-9.1.1.patched/src/interfaces/libpq/win32.mak 2011-12-15 09:11:37.000000000 +0100
-@@ -11,14 +11,12 @@
- !ENDIF
-
- !IFDEF DEBUG
--OPT=/Od /Zi /MDd
-+OPT=/Od /Zi
- LOPT=/DEBUG
--DEBUGDEF=/D _DEBUG
--OUTFILENAME=libpqd
-+OUTFILENAME=libpq
- !ELSE
- OPT=/O2 /MD
- LOPT=
--DEBUGDEF=/D NDEBUG
- OUTFILENAME=libpq
- !ENDIF
-
-@@ -67,18 +66,11 @@
- CPP=cl.exe
- RSC=rc.exe
-
--!IFDEF DEBUG
--OUTDIR=.\Debug
--INTDIR=.\Debug
--CPP_OBJS=.\Debug/
--!ELSE
--OUTDIR=.\Release
--INTDIR=.\Release
--CPP_OBJS=.\Release/
--!ENDIF
--
-+OUTDIR=.
-+INTDIR=.
-+CPP_OBJS=./
-
--ALL : config "$(OUTDIR)\$(OUTFILENAME).lib" "$(OUTDIR)\$(OUTFILENAME).dll"
-+ALL : config "$(OUTDIR)\$(OUTFILENAME).lib"
-
- CLEAN :
- - at erase "$(INTDIR)\getaddrinfo.obj"
-@@ -178,10 +170,11 @@
- "$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
--CPP_PROJ=/nologo /W3 /EHsc $(OPT) /I "..\..\include" /I "..\..\include\port\win32" /I "..\..\include\port\win32_msvc" /I "..\..\port" /I. /I "$(SSL_INC)" \
-+CPP_PROJ=/nologo /W3 /EHsc $(OPT) /I "..\..\include" /I "..\..\include\port\win32" /I "..\..\include\port\win32_msvc" /I "..\..\port" /I. $(SOLARINC) /I $(WORKDIR)/UnpackedTarball/openssl/include \
- /D "FRONTEND" $(DEBUGDEF) \
- /D "WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\libpq.pch" \
- /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c \
-+ /D "_CRT_NONSTDC_NO_DEPRECATE" \
- /D "_CRT_SECURE_NO_DEPRECATE" $(ADD_DEFINES)
-
- !IFDEF USE_SSL
-@@ -222,7 +215,7 @@
- <<
-
- "$(INTDIR)\libpq.res" : "$(INTDIR)" libpq-dist.rc
-- $(RSC) $(RSC_PROJ) libpq-dist.rc
-+ $(RSC) $(SOLARINC) $(RSC_PROJ) libpq-dist.rc
-
-
- "$(OUTDIR)\$(OUTFILENAME).dll" : "$(OUTDIR)" "$(INTDIR)\libpq.res"
-
diff --git a/external/postgresql/postgresql-libs-leak.patch b/external/postgresql/postgresql-libs-leak.patch
deleted file mode 100644
index 8224137f1f97..000000000000
--- a/external/postgresql/postgresql-libs-leak.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --recursive -u misc/build/postgresql-9.1.1/configure.in misc/build/postgresql-9.1.1.patched/configure.in
---- misc/build/postgresql-9.1.1/configure.in 2011-09-22 23:57:57.000000000 +0200
-+++ misc/build/postgresql-9.1.1.patched/configure.in 2012-02-03 11:42:45.000000000 +0100
-@@ -903,18 +903,9 @@
- *** Not using spinlocks will cause poor performance.])
- fi
-
--if test "$with_gssapi" = yes ; then
-- if test "$PORTNAME" != "win32"; then
-- AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
-- [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
-- else
-- LIBS="$LIBS -lgssapi32"
-- fi
--fi
--
- if test "$with_krb5" = yes ; then
- if test "$PORTNAME" != "win32"; then
-- AC_SEARCH_LIBS(com_err, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err 'com_err -lssl -lcrypto'], [],
-+ AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
- [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
- AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
- [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
-@@ -924,6 +915,15 @@
- fi
- fi
-
-+if test "$with_gssapi" = yes ; then
-+ if test "$PORTNAME" != "win32"; then
-+ AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
-+ [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
-+ else
-+ LIBS="$LIBS -lgssapi32"
-+ fi
-+fi
-+
- if test "$with_openssl" = yes ; then
- dnl Order matters!
- if test "$PORTNAME" != "win32"; then
-
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index b624ffcb512e..c5f7d8f4ae16 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -381,10 +381,10 @@
"dest-filename": "external/tarballs/poppler-0.82.0.tar.xz"
},
{
- "url": "https://dev-www.libreoffice.org/src/postgresql-9.2.24.tar.bz2",
- "sha256": "a754c02f7051c2f21e52f8669a421b50485afcde9a581674d6106326b189d126",
+ "url": "https://dev-www.libreoffice.org/src/postgresql-13.1.tar.bz2",
+ "sha256": "12345c83b89aa29808568977f5200d6da00f88a035517f925293355432ffe61f",
"type": "file",
- "dest-filename": "external/tarballs/postgresql-9.2.24.tar.bz2"
+ "dest-filename": "external/tarballs/postgresql-13.1.tar.bz2"
},
{
"url": "https://dev-www.libreoffice.org/src/QR-Code-generator-1.4.0.tar.gz",
commit 8e3be4dd604660f1cf0b348900ece9a32d0d3075
Author: Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Wed Jan 13 11:03:17 2021 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:17:56 2021 +0100
tdf#135014 sw: fix crash exporting numbering to DOCX
It can happen that the default SwNumRule of a SwList isn't used by
anything directly, but there are other SwNumRule associated with that
SwList and then the DOCX export needs to export it as an abstract
numbering definition.
(regression from 632ee9aae6d5f3cf08b6d6b2789310c20db713b7)
Change-Id: I6b1851980464aaa95bf731a60b7d11ab91cec7b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109303
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
(cherry picked from commit cd1c9f5167e797807d6726219f06190657f58372)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109335
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit e0be320cc790856df4d9a102d15de08aa16217fa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109336
Tested-by: Michael Stahl <michael.stahl at allotropia.de>
diff --git a/sw/inc/SwNumberTree.hxx b/sw/inc/SwNumberTree.hxx
index ad3ffe845110..e3d93a27766f 100644
--- a/sw/inc/SwNumberTree.hxx
+++ b/sw/inc/SwNumberTree.hxx
@@ -334,6 +334,13 @@ public:
void IsSane(bool bRecursive) const;
#endif // DBG_UTIL
+ /**
+ Returns how many children this node has got.
+
+ @return number of children
+ */
+ tSwNumberTreeChildren::size_type GetChildCount() const;
+
protected:
/** the children */
tSwNumberTreeChildren mChildren;
@@ -355,13 +362,6 @@ protected:
*/
virtual bool IsNotificationEnabled() const = 0;
- /**
- Returns how many children this node has got.
-
- @return number of children
- */
- tSwNumberTreeChildren::size_type GetChildCount() const;
-
// #i64010# - made pure virtual
virtual bool HasCountedChildren() const = 0;
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index b80e1157a7c9..83651fc8fcb2 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -851,7 +851,7 @@ public:
bool IsUsed( const SwModify& ) const;
/// Query if table style is used.
bool IsUsed( const SwTableAutoFormat& ) const;
- static bool IsUsed( const SwNumRule& );
+ bool IsUsed( const SwNumRule& );
// Set name of newly loaded document template.
size_t SetDocPattern(const OUString& rPatternName);
diff --git a/sw/inc/list.hxx b/sw/inc/list.hxx
index d8b3e16943ea..64d62faa9c93 100644
--- a/sw/inc/list.hxx
+++ b/sw/inc/list.hxx
@@ -58,6 +58,8 @@ class SwList
bool IsListLevelMarked( const int nListLevel ) const;
+ bool HasNodes() const;
+
private:
SwList( const SwList& ) = delete;
SwList& operator=( const SwList& ) = delete;
diff --git a/sw/source/core/doc/list.cxx b/sw/source/core/doc/list.cxx
index c81eef636ff1..3651e706f4b7 100644
--- a/sw/source/core/doc/list.cxx
+++ b/sw/source/core/doc/list.cxx
@@ -39,6 +39,8 @@ class SwListImpl
const OUString& GetDefaultListStyleName() const { return msDefaultListStyleName;}
+ bool HasNodes() const;
+
void InsertListItem( SwNodeNum& rNodeNum, bool isHiddenRedlines,
const int nLevel );
static void RemoveListItem( SwNodeNum& rNodeNum );
@@ -122,6 +124,18 @@ SwListImpl::~SwListImpl() COVERITY_NOEXCEPT_FALSE
}
}
+bool SwListImpl::HasNodes() const
+{
+ for (auto const& rNumberTree : maListTrees)
+ {
+ if (rNumberTree.pRoot->GetChildCount() != 0)
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
void SwListImpl::InsertListItem( SwNodeNum& rNodeNum, bool const isHiddenRedlines,
const int nLevel )
{
@@ -225,6 +239,11 @@ SwList::~SwList()
{
}
+bool SwList::HasNodes() const
+{
+ return mpListImpl->HasNodes();
+}
+
const OUString & SwList::GetListId() const
{
return mpListImpl->GetListId();
diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx
index be521cfdccd7..b32dcab95c1c 100644
--- a/sw/source/core/doc/poolfmt.cxx
+++ b/sw/source/core/doc/poolfmt.cxx
@@ -25,6 +25,8 @@
#include <doc.hxx>
#include <IDocumentState.hxx>
#include <IDocumentStylePoolAccess.hxx>
+#include <IDocumentListsAccess.hxx>
+#include <list.hxx>
#include <poolfmt.hxx>
#include <pagedesc.hxx>
#include <fmtcol.hxx>
@@ -106,9 +108,14 @@ bool SwDoc::IsUsed( const SwTableAutoFormat& rTableAutoFormat) const
// See if the NumRule is used
bool SwDoc::IsUsed( const SwNumRule& rRule )
{
+ SwList const*const pList(getIDocumentListsAccess().getListByName(rRule.GetDefaultListId()));
bool bUsed = rRule.GetTextNodeListSize() > 0 ||
rRule.GetParagraphStyleListSize() > 0 ||
- rRule.IsUsedByRedline();
+ rRule.IsUsedByRedline()
+ // tdf#135014 default num rule is used if any associated num rule is used
+ || (pList
+ && pList->GetDefaultListStyleName() == rRule.GetName()
+ && pList->HasNodes());
return bUsed;
}
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index fa56eb08f519..cd59f2f445e5 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -359,15 +359,18 @@ void Writer::PutNumFormatFontsInAttrPool()
// it can be removed - it is already in the Pool
SfxItemPool& rPool = m_pDoc->GetAttrPool();
const SwNumRuleTable& rListTable = m_pDoc->GetNumRuleTable();
- const SwNumRule* pRule;
const SwNumFormat* pFormat;
const vcl::Font* pFont;
const vcl::Font* pDefFont = &numfunc::GetDefBulletFont();
bool bCheck = false;
for( size_t nGet = rListTable.size(); nGet; )
- if( SwDoc::IsUsed( *(pRule = rListTable[ --nGet ] )))
+ {
+ SwNumRule const*const pRule = rListTable[ --nGet ];
+ if (m_pDoc->IsUsed(*pRule))
+ {
for( sal_uInt8 nLvl = 0; nLvl < MAXLEVEL; ++nLvl )
+ {
if( SVX_NUM_CHAR_SPECIAL == (pFormat = &pRule->Get( nLvl ))->GetNumberingType() ||
SVX_NUM_BITMAP == pFormat->GetNumberingType() )
{
@@ -386,6 +389,9 @@ void Writer::PutNumFormatFontsInAttrPool()
pFont->GetFamilyName(), pFont->GetStyleName(),
pFont->GetPitch(), pFont->GetCharSet(), RES_CHRATR_FONT ));
}
+ }
+ }
+ }
}
void Writer::PutEditEngFontsInAttrPool()
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 366cc18b3b0c..3072798aed37 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -214,7 +214,7 @@ void RtfExport::BuildNumbering()
for (auto n = rListTable.size(); n;)
{
SwNumRule* pRule = rListTable[--n];
- if (!SwDoc::IsUsed(*pRule))
+ if (!m_pDoc->IsUsed(*pRule))
continue;
if (IsExportNumRule(*pRule))
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index 088f5d445996..d0514482e5e1 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -96,6 +96,8 @@ sal_uInt16 MSWordExportBase::OverrideNumRule(
const sal_uInt16 absnumdef = rListId == rAbstractRule.GetDefaultListId()
? GetNumberingId(rAbstractRule)
: DuplicateAbsNum(rListId, rAbstractRule);
+ assert(numdef != USHRT_MAX);
+ assert(absnumdef != USHRT_MAX);
auto const mapping = std::make_pair(numdef, absnumdef);
auto it = m_OverridingNums.insert(std::make_pair(m_pUsedNumTable->size(), mapping));
@@ -125,7 +127,7 @@ sal_uInt16 MSWordExportBase::GetNumberingId( const SwNumRule& rNumRule )
for ( sal_uInt16 n = m_pUsedNumTable->size(); n; )
{
const SwNumRule& rRule = *(*m_pUsedNumTable)[ --n ];
- if ( !SwDoc::IsUsed( rRule ) )
+ if (!m_pDoc->IsUsed(rRule))
{
m_pUsedNumTable->erase( m_pUsedNumTable->begin() + n );
}
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index 4326445cd8ec..d1a08912ae56 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -2247,7 +2247,7 @@ bool SwDocStyleSheet::IsUsed() const
case SfxStyleFamily::Page : pMod = pDesc; break;
case SfxStyleFamily::Pseudo:
- return pNumRule && SwDoc::IsUsed( *pNumRule );
+ return pNumRule && rDoc.IsUsed(*pNumRule);
case SfxStyleFamily::Table:
return pTableFormat && rDoc.IsUsed( *pTableFormat );
@@ -3014,7 +3014,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if ( nSrchMask == SfxStyleSearchBits::Hidden && !rRule.IsHidden( ) )
continue;
- bool bUsed = bIsSearchUsed && ( bOrganizer || SwDoc::IsUsed(rRule) );
+ bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.IsUsed(rRule));
if( !bUsed )
{
if( ( !bSearchHidden && rRule.IsHidden() ) ||
@@ -3176,7 +3176,7 @@ void SwStyleSheetIterator::AppendStyleList(const std::vector<OUString>& rList,
case SwGetPoolIdFromName::NumRule:
{
SwNumRule* pRule = rDoc.FindNumRulePtr( i );
- bUsed = pRule && SwDoc::IsUsed( *pRule );
+ bUsed = pRule && rDoc.IsUsed(*pRule);
bHidden = pRule && pRule->IsHidden( );
}
break;
commit 8fa443db908dfe7cce5622a43131440375150d33
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Sun Nov 1 15:34:52 2020 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:17:56 2021 +0100
check-elf-dynamic-objects: allow libgsttag-1.0.so.0
It's linked in Fedora 33 and apparently exists in gst-plugins-base
since 1.0.0.
Change-Id: Ifc5d6a6b06e05ef4e250ac26a8588a242f21a034
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105140
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
(cherry picked from commit 4ebb3eae7b4abb7ecc37df73c6f80e3fd2069ed7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109766
Tested-by: Michael Stahl <michael.stahl at allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
diff --git a/bin/check-elf-dynamic-objects b/bin/check-elf-dynamic-objects
index c619fc0cdfc5..87c141409b1a 100755
--- a/bin/check-elf-dynamic-objects
+++ b/bin/check-elf-dynamic-objects
@@ -92,7 +92,7 @@ globalwhitelist="ld-linux-x86-64.so.2 ld-linux.so.2 libc.so.6 libm.so.6 libdl.so
x11whitelist="libX11.so.6 libXext.so.6 libSM.so.6 libICE.so.6 libXinerama.so.1 libXrender.so.1 libXrandr.so.2 libcairo.so.2"
openglwhitelist="libGL.so.1"
giowhitelist="libgio-2.0.so.0 libgobject-2.0.so.0 libgmodule-2.0.so.0 libgthread-2.0.so.0 libglib-2.0.so.0 libdbus-glib-1.so.2 libdbus-1.so.3"
-gstreamerwhitelist="libgstaudio-1.0.so.0 libgstpbutils-1.0.so.0 libgstvideo-1.0.so.0 libgstbase-1.0.so.0 libgstreamer-1.0.so.0"
+gstreamerwhitelist="libgsttag-1.0.so.0 libgstaudio-1.0.so.0 libgstpbutils-1.0.so.0 libgstvideo-1.0.so.0 libgstbase-1.0.so.0 libgstreamer-1.0.so.0"
gtk3whitelist="libgtk-3.so.0 libgdk-3.so.0 libcairo-gobject.so.2 libpangocairo-1.0.so.0 libfribidi.so.0 libatk-1.0.so.0 libcairo.so.2 libgio-2.0.so.0 libpangoft2-1.0.so.0 libpango-1.0.so.0 libfontconfig.so.1 libfreetype.so.6 libgdk_pixbuf-2.0.so.0 libgobject-2.0.so.0 libglib-2.0.so.0 libgmodule-2.0.so.0 libgthread-2.0.so.0 libdbus-glib-1.so.2 libdbus-1.so.3 libharfbuzz.so.0"
qt5whitelist="libQt5Core.so.5 libQt5Gui.so.5 libQt5Network.so.5 libQt5Widgets.so.5 libQt5X11Extras.so.5 libcairo.so.2 libglib-2.0.so.0 libgobject-2.0.so.0 libxcb.so.1 libxcb-icccm.so.4"
kf5whitelist="libKF5ConfigCore.so.5 libKF5CoreAddons.so.5 libKF5I18n.so.5 libKF5KIOCore.so.5 libKF5KIOFileWidgets.so.5 libKF5KIOWidgets.so.5 libKF5WindowSystem.so.5"
commit be895d588f20f5e9b93bb44a78aebc7239566266
Author: Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Tue Jan 19 11:28:41 2021 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:17:55 2021 +0100
nss: fix parallel build race in nsinstall.py
File "/home/tdf/lode/jenkins/workspace/android_aarch64/external/nss/nsinstall.py", line 112, in nsinstall
os.makedirs(args[0])
File "/opt/rh/rh-python38/root/usr/lib64/python3.8/os.py", line 223, in makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '../../../../dist/public/dbm'
../../../coreconf/rules.mk:119: recipe for target '../../../../dist/public/dbm/d' failed
Change-Id: I4273e6d3d5fa520353fff8738823ef281fe237ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109619
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
(cherry picked from commit 6f5186a94dcd1989cdd819e35163af0542912559)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109587
Reviewed-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
(cherry picked from commit 01fffa977e28b2a671f195daa3a1aaa4cbe3b258)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109765
Tested-by: Michael Stahl <michael.stahl at allotropia.de>
diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk
index ff8dd4c18975..41e9ad8de6fa 100644
--- a/external/nss/ExternalProject_nss.mk
+++ b/external/nss/ExternalProject_nss.mk
@@ -16,7 +16,9 @@ $(eval $(call gb_ExternalProject_register_targets,nss,\
))
ifeq ($(OS),WNT)
-$(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalExecutable_get_dependencies,python)
+$(call gb_ExternalProject_get_state_target,nss,build): \
+ $(call gb_ExternalExecutable_get_dependencies,python) \
+ $(SRCDIR)/external/nss/nsinstall.py
$(call gb_ExternalProject_run,build,\
$(if $(MSVC_USE_DEBUG_RUNTIME),USE_DEBUG_RTL=1,BUILD_OPT=1) \
$(if $(gb_Module_CURRENTMODULE_SYMBOLS_ENABLED), \
@@ -35,7 +37,9 @@ $(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalExecuta
else # OS!=WNT
# make sure to specify NSPR_CONFIGURE_OPTS as env (before make command), so nss can append it's own defaults
# OTOH specify e.g. CC and NSINSTALL as arguments (after make command), so they will overrule nss makefile values
-$(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalExecutable_get_dependencies,python)
+$(call gb_ExternalProject_get_state_target,nss,build): \
+ $(call gb_ExternalExecutable_get_dependencies,python) \
+ $(SRCDIR)/external/nss/nsinstall.py
$(call gb_ExternalProject_run,build,\
$(if $(filter ANDROID FREEBSD LINUX MACOSX,$(OS)),$(if $(filter X86_64,$(CPUNAME)),USE_64=1)) \
$(if $(filter iOS,$(OS)),\
diff --git a/external/nss/nsinstall.py b/external/nss/nsinstall.py
index 80e9c1679373..d90a85e6c540 100644
--- a/external/nss/nsinstall.py
+++ b/external/nss/nsinstall.py
@@ -99,17 +99,17 @@ def nsinstall(argv):
if options.D:
if len(args) != 1:
return 1
- if os.path.exists(args[0]):
+ try:
+ if options.m:
+ os.makedirs(args[0], options.m)
+ else:
+ os.makedirs(args[0])
+ except FileExistsError:
if not os.path.isdir(args[0]):
sys.stderr.write('nsinstall: ' + args[0] + ' is not a directory\n')
sys.exit(1)
if options.m:
os.chmod(args[0], options.m)
- sys.exit()
- if options.m:
- os.makedirs(args[0], options.m)
- else:
- os.makedirs(args[0])
return 0
# nsinstall arg1 [...] directory
commit 1a088792ed72d09d9b7d695d8bd597d2133f4eaa
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Dec 1 20:05:32 2020 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:17:55 2021 +0100
mariadb-connector-c: enable WNT-only pvio_npipe/pvio_shmem plugins
They were already compiled in some way.
Change-Id: Ic1b8563a53bad5be03bce2c0d3d2cf841e303f02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107007
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
(cherry picked from commit d350af4e0cf697e2f8ac97ffbf12243e72e1b89a)
diff --git a/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk b/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
index a93e353afaa0..3a7647b937ed 100644
--- a/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
+++ b/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
@@ -73,9 +73,9 @@ $(eval $(call gb_StaticLibrary_add_generated_cobjects,mariadb-connector-c,\
UnpackedTarball/mariadb-connector-c/libmariadb/win32_errmsg \
UnpackedTarball/mariadb-connector-c/libmariadb/secure/win_crypt \
UnpackedTarball/mariadb-connector-c/win-iconv/win_iconv \
- , \
UnpackedTarball/mariadb-connector-c/plugins/pvio/pvio_npipe \
UnpackedTarball/mariadb-connector-c/plugins/pvio/pvio_shmem \
+ , \
UnpackedTarball/mariadb-connector-c/libmariadb/secure/openssl_crypt \
) \
))
diff --git a/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk b/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk
index b34c3490661c..241e12db6581 100644
--- a/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk
+++ b/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk
@@ -36,11 +36,19 @@ $(eval $(call gb_UnpackedTarball_set_post_action,mariadb-connector-c, \
extern struct st_mysql_client_plugin pvio_socket_client_plugin\; \
extern struct st_mysql_client_plugin caching_sha2_password_client_plugin\; \
extern struct st_mysql_client_plugin mysql_native_password_client_plugin\; \
+ $(if $(filter WNT,$(OS)), \
+ extern struct st_mysql_client_plugin pvio_shmem_client_plugin\; \
+ extern struct st_mysql_client_plugin pvio_npipe_client_plugin\; \
+ ) \
/' \
-e 's/@BUILTIN_PLUGINS@/ \
(struct st_mysql_client_plugin *)\&pvio_socket_client_plugin$(COMMA) \
(struct st_mysql_client_plugin *)\&caching_sha2_password_client_plugin$(COMMA) \
(struct st_mysql_client_plugin *)\&mysql_native_password_client_plugin$(COMMA) \
+ $(if $(filter WNT,$(OS)), \
+ (struct st_mysql_client_plugin *)\&pvio_shmem_client_plugin$(COMMA) \
+ (struct st_mysql_client_plugin *)\&pvio_npipe_client_plugin$(COMMA) \
+ ) \
/' \
> libmariadb/ma_client_plugin.c \
))
commit 98e4de5bad01178e8fd9d5cdffb32ba11e76a0e6
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Dec 1 19:58:23 2020 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:17:55 2021 +0100
tdf#135202 mariadb-connector-c: enable native_password plugin
... and remove dialog authentication plugin; it quite uselessly defaults
to asking for a password on stdin, unless a function symbol is defined
by the library that links the connector static library.
There are more authentication plugins but no idea if those are needed.
Change-Id: I88ee9629e4763fb548c3f294b552cff3d739e6cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107006
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
(cherry picked from commit b746633b2b251695134e7f8c268a75e45cf97c82)
diff --git a/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk b/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
index 664d58b03e5e..a93e353afaa0 100644
--- a/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
+++ b/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
@@ -67,7 +67,6 @@ $(eval $(call gb_StaticLibrary_add_generated_cobjects,mariadb-connector-c,\
UnpackedTarball/mariadb-connector-c/libmariadb/mariadb_stmt \
UnpackedTarball/mariadb-connector-c/libmariadb/ma_client_plugin \
UnpackedTarball/mariadb-connector-c/plugins/auth/my_auth \
- UnpackedTarball/mariadb-connector-c/plugins/auth/dialog \
UnpackedTarball/mariadb-connector-c/plugins/auth/caching_sha2_pw \
UnpackedTarball/mariadb-connector-c/plugins/pvio/pvio_socket \
$(if $(filter $(OS),WNT), \
diff --git a/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk b/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk
index 2f679294f7c6..b34c3490661c 100644
--- a/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk
+++ b/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk
@@ -35,10 +35,12 @@ $(eval $(call gb_UnpackedTarball_set_post_action,mariadb-connector-c, \
-e 's/@EXTERNAL_PLUGINS@/ \
extern struct st_mysql_client_plugin pvio_socket_client_plugin\; \
extern struct st_mysql_client_plugin caching_sha2_password_client_plugin\; \
+ extern struct st_mysql_client_plugin mysql_native_password_client_plugin\; \
/' \
-e 's/@BUILTIN_PLUGINS@/ \
(struct st_mysql_client_plugin *)\&pvio_socket_client_plugin$(COMMA) \
(struct st_mysql_client_plugin *)\&caching_sha2_password_client_plugin$(COMMA) \
+ (struct st_mysql_client_plugin *)\&mysql_native_password_client_plugin$(COMMA) \
/' \
> libmariadb/ma_client_plugin.c \
))
commit 630d4660d4da5b6ece8b288f88056c28200d0133
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Fri Nov 13 19:00:53 2020 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:17:54 2021 +0100
tdf#135202: Mysql declare more plugins for native password
Add pvio_npipe + pvio_shmem + dialog
Change-Id: I48d828e5cdf8d269aef3a40d75235a9519af8dc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105804
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
(cherry picked from commit 51a7985f539b7760c22b19521ed2bf5c2df4b1c1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106235
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 5de977a4ca344c4c3f288951504f58937fe64124)
diff --git a/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk b/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
index 768a43794432..664d58b03e5e 100644
--- a/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
+++ b/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
@@ -67,6 +67,7 @@ $(eval $(call gb_StaticLibrary_add_generated_cobjects,mariadb-connector-c,\
UnpackedTarball/mariadb-connector-c/libmariadb/mariadb_stmt \
UnpackedTarball/mariadb-connector-c/libmariadb/ma_client_plugin \
UnpackedTarball/mariadb-connector-c/plugins/auth/my_auth \
+ UnpackedTarball/mariadb-connector-c/plugins/auth/dialog \
UnpackedTarball/mariadb-connector-c/plugins/auth/caching_sha2_pw \
UnpackedTarball/mariadb-connector-c/plugins/pvio/pvio_socket \
$(if $(filter $(OS),WNT), \
@@ -74,6 +75,8 @@ $(eval $(call gb_StaticLibrary_add_generated_cobjects,mariadb-connector-c,\
UnpackedTarball/mariadb-connector-c/libmariadb/secure/win_crypt \
UnpackedTarball/mariadb-connector-c/win-iconv/win_iconv \
, \
+ UnpackedTarball/mariadb-connector-c/plugins/pvio/pvio_npipe \
+ UnpackedTarball/mariadb-connector-c/plugins/pvio/pvio_shmem \
UnpackedTarball/mariadb-connector-c/libmariadb/secure/openssl_crypt \
) \
))
commit e580b468d62d0942f5dd844721b436da9a572b8d
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Thu Nov 5 18:22:08 2020 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 25 13:17:54 2021 +0100
tdf#135202: Mysql use openssl libs to be able to use caching_sha2_pw
Change-Id: I7552b65022b725c6e87fef61478dc6e9c4322559
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105376
(cherry picked from commit 8c9b8c5970a08c2ef0ccddb7a691f3731d39175a)
mariadb-connector-c: fix makefile for GNU make 3.82
Old make thinks that ; terminates the recipe, have to escape it.
(other changes are just cosmetic)
(regression from 8c9b8c5970a08c2ef0ccddb7a691f3731d39175a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105516
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
(cherry picked from commit ed564a411beb13a75a8f06d7cd040acad3e93dcb)
Change-Id: Ifd86ef3f17257139a078d23cb5471b9599ab6556
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105359
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 482e5f8c2d2979b5d6c3b58194b8e37e7df7480e)
diff --git a/connectivity/Library_mysqlc.mk b/connectivity/Library_mysqlc.mk
index 0999b46d3eec..f765fb1e305f 100644
--- a/connectivity/Library_mysqlc.mk
+++ b/connectivity/Library_mysqlc.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_Library_Library,mysqlc))
$(eval $(call gb_Library_use_externals,mysqlc,\
boost_headers \
mariadb-connector-c \
+ openssl \
))
$(eval $(call gb_Library_set_include,mysqlc,\
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list