[Libreoffice-commits] core.git: Branch 'feature/cib_contract57c' - 3 commits - connectivity/Library_postgresql-sdbc-impl.mk desktop/CppunitTest_desktop_app.mk desktop/Library_crashreport.mk desktop/Library_sofficeapp.mk external/clucene external/libmspub external/pdfium jurt/Library_jpipe.mk libreofficekit/CppunitTest_libreofficekit_tiledrendering.mk libreofficekit/Executable_gtktiledviewer.mk libreofficekit/Executable_tilebench.mk onlineupdate/Executable_test_updater_dialog.mk onlineupdate/Executable_updater.mk sal/Library_sal.mk sc/CppunitTest_sc_ucalc.mk sc/Library_sc.mk smoketest/Executable_libtest.mk solenv/gbuild svx/Executable_gengal.mk sw/inc sw/qa sw/source vcl/Executable_icontest.mk vcl/Executable_lo_kde5filepicker.mk vcl/Executable_mtfdemo.mk vcl/Executable_ui-previewer.mk vcl/Executable_vcldemo.mk vcl/Executable_visualbackendtest.mk vcl/Library_desktop_detector.mk vcl/Library_vcl.mk vcl/Library_vclplug_gen.mk vcl/Library_vclplug_gtk3_kde5.mk vcl/Library_vclplug_gtk3.mk vcl/Library_vcl plug_gtk.mk vcl/Library_vclplug_kde5.mk vcl/Library_vclplug_qt5.mk vcl/StaticLibrary_glxtest.mk
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jan 27 14:29:07 UTC 2021
connectivity/Library_postgresql-sdbc-impl.mk | 1
desktop/CppunitTest_desktop_app.mk | 1
desktop/Library_crashreport.mk | 1
desktop/Library_sofficeapp.mk | 3
external/clucene/Library_clucene.mk | 1
external/libmspub/UnpackedTarball_libmspub.mk | 1
external/libmspub/stdint.patch | 10 ++
external/pdfium/Library_pdfium.mk | 1
jurt/Library_jpipe.mk | 4 -
libreofficekit/CppunitTest_libreofficekit_tiledrendering.mk | 1
libreofficekit/Executable_gtktiledviewer.mk | 1
libreofficekit/Executable_tilebench.mk | 1
onlineupdate/Executable_test_updater_dialog.mk | 1
onlineupdate/Executable_updater.mk | 1
sal/Library_sal.mk | 3
sc/CppunitTest_sc_ucalc.mk | 6 -
sc/Library_sc.mk | 6 -
smoketest/Executable_libtest.mk | 1
solenv/gbuild/platform/linux.mk | 2
solenv/gbuild/platform/unxgcc.mk | 10 ++
svx/Executable_gengal.mk | 2
sw/inc/crsrsh.hxx | 1
sw/inc/viewsh.hxx | 2
sw/inc/viscrs.hxx | 4 -
sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 2
sw/qa/extras/uiwriter/data2/tdf105330.odt |binary
sw/qa/extras/uiwriter/uiwriter2.cxx | 44 ++++++++++++
sw/qa/extras/ww8import/ww8import.cxx | 8 ++
sw/source/core/crsr/callnk.cxx | 15 ----
sw/source/core/crsr/crsrsh.cxx | 5 +
sw/source/core/crsr/viscrs.cxx | 5 +
vcl/Executable_icontest.mk | 1
vcl/Executable_lo_kde5filepicker.mk | 1
vcl/Executable_mtfdemo.mk | 1
vcl/Executable_ui-previewer.mk | 1
vcl/Executable_vcldemo.mk | 1
vcl/Executable_visualbackendtest.mk | 1
vcl/Library_desktop_detector.mk | 1
vcl/Library_vcl.mk | 6 -
vcl/Library_vclplug_gen.mk | 1
vcl/Library_vclplug_gtk.mk | 1
vcl/Library_vclplug_gtk3.mk | 1
vcl/Library_vclplug_gtk3_kde5.mk | 1
vcl/Library_vclplug_kde5.mk | 1
vcl/Library_vclplug_qt5.mk | 1
vcl/StaticLibrary_glxtest.mk | 1
46 files changed, 90 insertions(+), 74 deletions(-)
New commits:
commit df88d5a3647d243ef12b66cf93500d6ec281e831
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Sep 16 21:15:28 2019 +0200
Commit: Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
CommitDate: Wed Jan 27 14:59:32 2021 +0100
tdf#105330 sw: fix lost cursor on undoing nested table insert
This is a regression from commit
e4509eea8fc7c07ddff48edf0d4c015c2663d896 (n#751313 SwCallLink: avoid
redrawing complete rows without nested tables, 2012-04-20), though
manual testing shows that the underlying problem has been addressed in
the meantime, so this can be reverted.
Over time, some poor tests started to depend on the new behavior so
adapt them as necessary:
1) Change back test added in commit
075fc0c0a34875adf2833e5933b4982b9443a373 (testcase for fdo#38414,
2014-03-18) to its original form, that was changed to an export test in
commit 086550313260d9fa45b91dc705b21bb9b51ce0b8 (move round-tripables to
ooxmlexport, 2016-10-07), as the export of that document still results
in data loss of cell content, just happened to pass so far.
2) Explicitly calculate content of text frames in two more tests, which
just hoped that by the time they assert, the layout is ready already
(but now that the missing notification is restored, it happens that the
first pass of the layout doesn't create them; only a later pass, invoked
by Idle, which doesn't run during cppunit tests).
(cherry picked from commit c56bf1479cc71d1a2b0639f6383e90c1f7e3655b)
Conflicts:
sw/qa/extras/uiwriter/uiwriter2.cxx
Change-Id: Ie13d17266cd552f3850848ae980bcfe8776997ac
Reviewed-on: https://gerrit.libreoffice.org/79043
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
(cherry picked from commit d5b50e74ee822e1c8402e3044e14799e47907ff8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107679
Tested-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
(cherry picked from commit 1c240ab7350b9be6fa26b274d682ee2ce8775250)
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 531452561fe9..c2f7d2c99c77 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -668,6 +668,7 @@ public:
// (This is needed for displaying the Drag&Drop/Copy-Cursor.)
bool SetVisibleCursor( const Point &rPt );
inline void UnSetVisibleCursor();
+ SwVisibleCursor* GetVisibleCursor() const;
// jump to the next or previous field of the corresponding type
bool MoveFieldType(
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index da9146bf12ea..2c0d6fc2f8cc 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -152,8 +152,6 @@ class SW_DLLPUBLIC SwViewShell : public sw::Ring<SwViewShell>
inline void ResetInvalidRect();
-
-
SAL_DLLPRIVATE void PaintDesktop(vcl::RenderContext& rRenderContext, const SwRect&); // Collect values for painting of desktop
// and calling.
// PaintDesktop split. This pars is also used by PreviewPage.
diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx
index e30fd59283f3..a04a63c67091 100644
--- a/sw/inc/viscrs.hxx
+++ b/sw/inc/viscrs.hxx
@@ -25,13 +25,14 @@
#include "swcrsr.hxx"
#include "swrect.hxx"
#include "swregion.hxx"
+#include "swdllapi.h"
class SwCursorShell;
class SfxViewShell;
// From here classes/methods for non-text cursor.
-class SwVisibleCursor
+class SW_DLLPUBLIC SwVisibleCursor
{
friend void InitCore();
friend void FinitCore();
@@ -55,6 +56,7 @@ public:
bool IsVisible() const { return m_bIsVisible; }
void SetDragCursor( bool bFlag = true ) { m_bIsDragCursor = bFlag; }
void SetPosAndShow(SfxViewShell const * pViewShell);
+ const vcl::Cursor& GetTextCursor() const;
};
// From here classes/methods for selections.
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index 2c12311ac0e7..b2bd2f6235fa 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -480,7 +480,7 @@ DECLARE_OOXMLEXPORT_TEST(testNegativeCellMarginTwips, "negative-cell-margin-twip
CPPUNIT_ASSERT( width.toInt32() > 0 );
}
-DECLARE_OOXMLEXPORT_TEST(testFdo38414, "fdo38414.docx" )
+DECLARE_OOXMLIMPORT_TEST(testFdo38414, "fdo38414.docx" )
{
// The cells in the last (4th) column were merged properly and so the result didn't have the same height.
// (Since w:gridBefore is worked around by faking another cell in the row, so column count is thus 5
diff --git a/sw/qa/extras/uiwriter/data2/tdf105330.odt b/sw/qa/extras/uiwriter/data2/tdf105330.odt
new file mode 100644
index 000000000000..bb1a088c38cc
Binary files /dev/null and b/sw/qa/extras/uiwriter/data2/tdf105330.odt differ
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 239700294b71..e270ee8a8bfa 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -9,8 +9,11 @@
#include <swmodeltestbase.hxx>
#include <com/sun/star/awt/FontSlant.hpp>
+#include <com/sun/star/frame/DispatchHelper.hpp>
#include <swdtflvr.hxx>
#include <wrtsh.hxx>
+#include <UndoManager.hxx>
+#include <comphelper/propertyvalue.hxx>
namespace
{
@@ -22,9 +25,11 @@ class SwUiWriterTest2 : public SwModelTestBase
{
public:
void testTdf101534();
+ void testTdf105330();
CPPUNIT_TEST_SUITE(SwUiWriterTest2);
CPPUNIT_TEST(testTdf101534);
+ CPPUNIT_TEST(testTdf105330);
CPPUNIT_TEST_SUITE_END();
};
@@ -55,6 +60,45 @@ void SwUiWriterTest2::testTdf101534()
CPPUNIT_ASSERT(aSet.HasItem(RES_LR_SPACE));
}
+static void lcl_dispatchCommand(const uno::Reference<lang::XComponent>& xComponent,
+ const OUString& rCommand,
+ const uno::Sequence<beans::PropertyValue>& rPropertyValues)
+{
+ uno::Reference<frame::XController> xController
+ = uno::Reference<frame::XModel>(xComponent, uno::UNO_QUERY_THROW)->getCurrentController();
+ CPPUNIT_ASSERT(xController.is());
+ uno::Reference<frame::XDispatchProvider> xFrame(xController->getFrame(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xFrame.is());
+ uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext();
+ uno::Reference<frame::XDispatchHelper> xDispatchHelper(frame::DispatchHelper::create(xContext));
+ CPPUNIT_ASSERT(xDispatchHelper.is());
+ xDispatchHelper->executeDispatch(xFrame, rCommand, OUString(), 0, rPropertyValues);
+}
+
+void SwUiWriterTest2::testTdf105330()
+{
+ load(DATA_DIRECTORY, "tdf105330.odt");
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+
+ SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Down(/*bSelect=*/false);
+ uno::Sequence<beans::PropertyValue> aTableArgs = {
+ comphelper::makePropertyValue("Rows", static_cast<sal_uInt16>(1)),
+ comphelper::makePropertyValue("Columns", static_cast<sal_uInt16>(1)),
+ };
+ lcl_dispatchCommand(mxComponent, ".uno:InsertTable", aTableArgs);
+
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ rUndoManager.Undo();
+
+ // Without the accompanying fix in place, height was only 1 twips (practically invisible).
+ CPPUNIT_ASSERT_EQUAL(static_cast<long>(276),
+ pWrtShell->GetVisibleCursor()->GetTextCursor().GetSize().getHeight());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest2);
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx
index de16cfe253e6..0457d7335ea4 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -126,6 +126,14 @@ DECLARE_OOXMLIMPORT_TEST(testImageLazyRead, "image-lazy-read.doc")
DECLARE_WW8IMPORT_TEST(testTdf106799, "tdf106799.doc")
{
+ // Ensure that all text portions are calculated before testing.
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwViewShell* pViewShell
+ = pTextDoc->GetDocShell()->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell();
+ CPPUNIT_ASSERT(pViewShell);
+ pViewShell->Reformat();
+
sal_Int32 const nCellWidths[3][4] = { { 9530, 0, 0, 0 },{ 2382, 2382, 2382, 2384 },{ 2382, 2382, 2382, 2384 } };
sal_Int32 const nCellTxtLns[3][4] = { { 1, 0, 0, 0 },{ 1, 0, 0, 0},{ 1, 1, 1, 1 } };
// Table was distorted because of missing sprmPFInnerTableCell at paragraph marks (0x0D) with sprmPFInnerTtp
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index f1f7a3f200ef..81240340376f 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -81,19 +81,8 @@ static void lcl_notifyRow(const SwContentNode* pNode, SwCursorShell const & rShe
return;
const SwTableLine* pLine = pRow->GetTabLine( );
- // Avoid redrawing the complete row if there are no nested tables
- for (SwFrame *pCell = pRow->GetLower(); pCell; pCell = pCell->GetNext())
- {
- for (SwFrame *pContent = pCell->GetLower(); pContent; pContent = pContent->GetNext())
- {
- if (pContent->GetType() == SwFrameType::Tab)
- {
- SwFormatFrameSize aSize = pLine->GetFrameFormat()->GetFrameSize();
- pRow->ModifyNotification(nullptr, &aSize);
- return;
- }
- }
- }
+ SwFormatFrameSize aSize = pLine->GetFrameFormat()->GetFrameSize();
+ pRow->ModifyNotification(nullptr, &aSize);
}
SwCallLink::~SwCallLink() COVERITY_NOEXCEPT_FALSE
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 02ecd2e0033f..00cff9684483 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -2450,6 +2450,11 @@ bool SwCursorShell::SetVisibleCursor( const Point &rPt )
return bRet;
}
+SwVisibleCursor* SwCursorShell::GetVisibleCursor() const
+{
+ return m_pVisibleCursor;
+}
+
bool SwCursorShell::IsOverReadOnlyPos( const Point& rPt ) const
{
Point aPt( rPt );
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index b11db04d393f..f06a149c34a0 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -243,6 +243,11 @@ void SwVisibleCursor::SetPosAndShow(SfxViewShell const * pViewShell)
}
}
+const vcl::Cursor& SwVisibleCursor::GetTextCursor() const
+{
+ return m_aTextCursor;
+}
+
SwSelPaintRects::SwSelPaintRects( const SwCursorShell& rCSh )
: SwRects()
, m_pCursorShell( &rCSh )
commit 0d44cebc2e66df070444dd7cdc7b00014141b07a
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Apr 25 11:48:39 2019 +0200
Commit: Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
CommitDate: Tue Jan 19 16:08:54 2021 +0100
Cut down on -pthread/-lpthread proliferation
Building against libstdc++ effectively always requires -pthread anyway (as
various standard C++ headers require it, see the comment added to
solenv/gbuild/platform/unxgcc.mk), so many explicit uses of -pthread/-lpthread
can be removed.
Doing a (partial) test build on Linux with Clang -stdlib=libc++ suggests that
libc++ indeed doesn't need -pthread as libstdc++ does.
The remaining uses of -pthread/-lpthread are mostly in configure.ac for the
various BSDs (which somebody else might want to clean up now), and related to
external projects. I tried to be careful to remove -pthread/-lpthread from
makefiles only when C++ object files are involved (so -pthread will now be
included on the link command line by default).
Reviewed-on: https://gerrit.libreoffice.org/71291
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit b1141fa61073b3f24e1a3574afa55a954e5a153d)
Change-Id: I936e082839cb9a434bd273ce5a1f187a4245dfa1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95130
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
(cherry picked from commit fda7f14cb5e4d5f93b2ee706b7ec6ad35a988ae5)
diff --git a/connectivity/Library_postgresql-sdbc-impl.mk b/connectivity/Library_postgresql-sdbc-impl.mk
index 53cebd01a242..80c746f802dc 100644
--- a/connectivity/Library_postgresql-sdbc-impl.mk
+++ b/connectivity/Library_postgresql-sdbc-impl.mk
@@ -61,7 +61,6 @@ $(eval $(call gb_Library_add_libs,postgresql-sdbc-impl,\
$(if $(WITH_GSSAPI),$(GSSAPI_LIBS)) \
$(if $(WITH_KRB5),$(KRB5_LIBS)) \
$(if $(filter-out MACOSX,$(OS)),-ldl) \
- $(if $(filter-out MACOSX,$(OS)),-lpthread) \
))
endif
diff --git a/desktop/CppunitTest_desktop_app.mk b/desktop/CppunitTest_desktop_app.mk
index cd698aceee5e..adb57add6e7a 100644
--- a/desktop/CppunitTest_desktop_app.mk
+++ b/desktop/CppunitTest_desktop_app.mk
@@ -66,7 +66,6 @@ endif
$(eval $(call gb_CppunitTest_add_libs,desktop_app,\
-lm $(DLOPEN_LIBS) \
- -lpthread \
-lX11 \
))
endif
diff --git a/desktop/Library_crashreport.mk b/desktop/Library_crashreport.mk
index 3b9d6dd34fdc..a2cef785f370 100644
--- a/desktop/Library_crashreport.mk
+++ b/desktop/Library_crashreport.mk
@@ -26,7 +26,6 @@ $(eval $(call gb_Library_add_defs,crashreport,\
$(eval $(call gb_Library_add_libs,crashreport,\
$(if $(filter LINUX %BSD SOLARIS, $(OS)), \
$(DLOPEN_LIBS) \
- -lpthread \
) \
))
diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk
index 288e26d47726..29deeb707e3a 100644
--- a/desktop/Library_sofficeapp.mk
+++ b/desktop/Library_sofficeapp.mk
@@ -19,7 +19,6 @@ $(eval $(call gb_Library_set_include,sofficeapp,\
$(eval $(call gb_Library_add_libs,sofficeapp,\
$(if $(filter LINUX %BSD SOLARIS, $(OS)), \
$(DLOPEN_LIBS) \
- -lpthread \
) \
))
@@ -126,7 +125,6 @@ $(eval $(call gb_Library_add_exception_objects,sofficeapp,\
ifeq ($(ENABLE_HEADLESS),TRUE)
$(eval $(call gb_Library_add_libs,sofficeapp,\
-lm $(DLOPEN_LIBS) \
- -lpthread \
))
else
ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
@@ -138,7 +136,6 @@ endif
$(eval $(call gb_Library_add_libs,sofficeapp,\
-lm $(DLOPEN_LIBS) \
- -lpthread \
-lX11 \
))
endif
diff --git a/external/clucene/Library_clucene.mk b/external/clucene/Library_clucene.mk
index abc14d903f46..f04961398797 100644
--- a/external/clucene/Library_clucene.mk
+++ b/external/clucene/Library_clucene.mk
@@ -48,7 +48,6 @@ ifeq ($(OS),LINUX)
$(eval $(call gb_Library_add_libs,clucene,\
-lm \
-ldl \
- -lpthread \
))
endif
diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk
index 0019535857a6..1f90b2b3b415 100644
--- a/external/pdfium/Library_pdfium.mk
+++ b/external/pdfium/Library_pdfium.mk
@@ -559,7 +559,6 @@ ifneq (,$(filter LINUX ANDROID,$(OS)))
$(eval $(call gb_Library_add_libs,pdfium,\
-ldl \
-lrt \
- -lpthread \
))
$(eval $(call gb_Library_use_external,pdfium,freetype))
diff --git a/jurt/Library_jpipe.mk b/jurt/Library_jpipe.mk
index 5759baed5175..204da654c553 100644
--- a/jurt/Library_jpipe.mk
+++ b/jurt/Library_jpipe.mk
@@ -74,10 +74,6 @@ $(eval $(call gb_Library_use_system_darwin_frameworks,jpipe, \
))
endif
-$(eval $(call gb_Library_add_libs,jpipe, \
- $(if $(filter-out $(OS),ANDROID),-lpthread) \
-))
-
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,jpipe)): \
gb_CC := $(filter-out -fsanitize%,$(gb_CC))
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,jpipe)): \
diff --git a/libreofficekit/CppunitTest_libreofficekit_tiledrendering.mk b/libreofficekit/CppunitTest_libreofficekit_tiledrendering.mk
index d58923f45194..da3be044e853 100644
--- a/libreofficekit/CppunitTest_libreofficekit_tiledrendering.mk
+++ b/libreofficekit/CppunitTest_libreofficekit_tiledrendering.mk
@@ -28,7 +28,6 @@ ifeq ($(OS),LINUX)
$(eval $(call gb_CppunitTest_add_libs,libreofficekit_tiledrendering,\
-lm \
-ldl \
- -lpthread \
))
endif
diff --git a/libreofficekit/Executable_gtktiledviewer.mk b/libreofficekit/Executable_gtktiledviewer.mk
index 5dd89e6065f6..99ef51af8975 100644
--- a/libreofficekit/Executable_gtktiledviewer.mk
+++ b/libreofficekit/Executable_gtktiledviewer.mk
@@ -43,7 +43,6 @@ $(eval $(call gb_Executable_use_libraries,gtktiledviewer,\
ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
$(eval $(call gb_Executable_add_libs,gtktiledviewer,\
-lm $(DLOPEN_LIBS) \
- -lpthread \
))
endif
diff --git a/libreofficekit/Executable_tilebench.mk b/libreofficekit/Executable_tilebench.mk
index 9d8b2a134f99..0b512a83e466 100644
--- a/libreofficekit/Executable_tilebench.mk
+++ b/libreofficekit/Executable_tilebench.mk
@@ -20,7 +20,6 @@ $(eval $(call gb_Executable_use_libraries,tilebench,\
$(eval $(call gb_Executable_add_libs,tilebench,\
-lm $(DLOPEN_LIBS) \
- -lpthread \
))
$(eval $(call gb_Executable_add_exception_objects,tilebench,\
diff --git a/onlineupdate/Executable_test_updater_dialog.mk b/onlineupdate/Executable_test_updater_dialog.mk
index 92e70dfae337..cae8e02df141 100644
--- a/onlineupdate/Executable_test_updater_dialog.mk
+++ b/onlineupdate/Executable_test_updater_dialog.mk
@@ -61,7 +61,6 @@ $(eval $(call gb_Executable_add_libs,test_updater_dialog,\
-lXrender \
-lSM \
-lICE \
- -lpthread \
))
endif
diff --git a/onlineupdate/Executable_updater.mk b/onlineupdate/Executable_updater.mk
index a4ceacee6bc1..5f83c13eb9ec 100644
--- a/onlineupdate/Executable_updater.mk
+++ b/onlineupdate/Executable_updater.mk
@@ -71,7 +71,6 @@ $(eval $(call gb_Executable_add_libs,updater,\
-lXrender \
-lSM \
-lICE \
- -lpthread \
))
endif
diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk
index 42e9287f30ac..33ba836d6066 100644
--- a/sal/Library_sal.mk
+++ b/sal/Library_sal.mk
@@ -57,9 +57,6 @@ $(eval $(call gb_Library_use_system_win32_libs,sal,\
))
$(eval $(call gb_Library_add_libs,sal,\
- $(if $(filter-out ANDROID HAIKU WNT,$(OS)), \
- -lpthread \
- ) \
$(if $(filter LINUX,$(OS)), \
-ldl \
-lrt \
diff --git a/sc/CppunitTest_sc_ucalc.mk b/sc/CppunitTest_sc_ucalc.mk
index 48fb912c4335..4cad9547f3e6 100644
--- a/sc/CppunitTest_sc_ucalc.mk
+++ b/sc/CppunitTest_sc_ucalc.mk
@@ -114,12 +114,6 @@ $(eval $(call gb_CppunitTest_add_libs,sc_ucalc,\
))
endif
-ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
-$(eval $(call gb_CppunitTest_add_libs,sc_ucalc,\
- -lpthread \
-))
-endif
-
$(eval $(call gb_CppunitTest_use_configuration,sc_ucalc))
# vim: set noet sw=4 ts=4:
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 00db6e4a44c0..0ce26b5ba699 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -710,12 +710,6 @@ $(eval $(call gb_Library_add_libs,sc,\
))
endif
-ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
-$(eval $(call gb_Library_add_libs,sc,\
- -lpthread \
-))
-endif
-
$(eval $(call gb_SdiTarget_SdiTarget,sc/sdi/scslots,sc/sdi/scalc))
$(eval $(call gb_SdiTarget_set_include,sc/sdi/scslots,\
diff --git a/smoketest/Executable_libtest.mk b/smoketest/Executable_libtest.mk
index e16c95073976..c1e33d35e10e 100644
--- a/smoketest/Executable_libtest.mk
+++ b/smoketest/Executable_libtest.mk
@@ -16,7 +16,6 @@ $(eval $(call gb_Executable_set_include,libtest,\
ifeq ($(OS),LINUX)
$(eval $(call gb_Executable_add_libs,libtest,\
-ldl \
- -pthread \
))
endif
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index 727418b8ea61..77d4dbe679e8 100644
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -18,7 +18,7 @@ gb_LinkTarget_LDFLAGS += $(gb__LinkTarget_LDFLAGS_zdefs)
include $(GBUILDDIR)/platform/unxgcc.mk
ifeq ($(DISABLE_DYNLOADING),TRUE)
-gb_STDLIBS := -lpthread -ldl
+gb_STDLIBS := -ldl
endif
# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 8505f9638a19..a6a361e6ee53 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -42,12 +42,20 @@ gb_CFLAGS := \
-Wdeclaration-after-statement \
-Wshadow \
+# At least libstdc++ (which is approximated here with !HAVE_LIBCXX) needs -pthread when including
+# various C++ headers like <thread>, see <https://gcc.gnu.org/onlinedocs/gcc-8.3.0/libstdc++/manual/
+# manual/using.html#manual.intro.using.flags>:
+ifeq ($(HAVE_LIBCXX),)
+gb_CXX_LINKFLAGS := -pthread
+endif
+
gb_CXXFLAGS := \
$(gb_CXXFLAGS_COMMON) \
-fPIC \
-Wshadow \
-Woverloaded-virtual \
$(CXXFLAGS_CXX11) \
+ $(gb_CXX_LINKFLAGS) \
# enable debug STL
@@ -120,7 +128,7 @@ gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)
# contains .c sources:
define gb_LinkTarget__command_dynamiclink
$(call gb_Helper_abbreviate_dirs,\
- $(if $(CXXOBJECTS)$(GENCXXOBJECTS)$(EXTRAOBJECTLISTS)$(filter-out XTRUE,X$(ENABLE_RUNTIME_OPTIMIZATIONS)),$(gb_CXX),$(gb_CC)) \
+ $(if $(CXXOBJECTS)$(GENCXXOBJECTS)$(EXTRAOBJECTLISTS)$(filter-out XTRUE,X$(ENABLE_RUNTIME_OPTIMIZATIONS)),$(gb_CXX) $(gb_CXX_LINKFLAGS),$(gb_CC)) \
$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
$(gb_LTOFLAGS) \
$(if $(SOVERSIONSCRIPT),-Wl$(COMMA)--soname=$(notdir $(1)) \
diff --git a/svx/Executable_gengal.mk b/svx/Executable_gengal.mk
index 844ab0b45e16..7316f6de2a20 100644
--- a/svx/Executable_gengal.mk
+++ b/svx/Executable_gengal.mk
@@ -64,13 +64,11 @@ endif
ifeq ($(ENABLE_HEADLESS),TRUE)
$(eval $(call gb_Executable_add_libs,gengal,\
$(DLOPEN_LIBS) \
- -lpthread \
))
else
ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
$(eval $(call gb_Executable_add_libs,gengal,\
$(DLOPEN_LIBS) \
- -lpthread \
-lX11 \
))
diff --git a/vcl/Executable_icontest.mk b/vcl/Executable_icontest.mk
index 8c917b71cd0e..223cfa840f9b 100644
--- a/vcl/Executable_icontest.mk
+++ b/vcl/Executable_icontest.mk
@@ -37,7 +37,6 @@ $(eval $(call gb_Executable_use_static_libraries,icontest,\
ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
$(eval $(call gb_Executable_add_libs,icontest,\
-lm $(DLOPEN_LIBS) \
- -lpthread \
-lX11 \
))
diff --git a/vcl/Executable_lo_kde5filepicker.mk b/vcl/Executable_lo_kde5filepicker.mk
index 2eee2cd8711b..f3e940953601 100644
--- a/vcl/Executable_lo_kde5filepicker.mk
+++ b/vcl/Executable_lo_kde5filepicker.mk
@@ -92,7 +92,6 @@ ifeq ($(OS),LINUX)
$(eval $(call gb_Executable_add_libs,lo_kde5filepicker,\
-lm \
-ldl \
- -lpthread \
))
endif
diff --git a/vcl/Executable_mtfdemo.mk b/vcl/Executable_mtfdemo.mk
index d637439a17ba..5c4c45165535 100644
--- a/vcl/Executable_mtfdemo.mk
+++ b/vcl/Executable_mtfdemo.mk
@@ -43,7 +43,6 @@ $(eval $(call gb_Executable_use_static_libraries,mtfdemo,\
ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
$(eval $(call gb_Executable_add_libs,mtfdemo,\
-lm $(DLOPEN_LIBS) \
- -lpthread \
-lX11 \
))
diff --git a/vcl/Executable_ui-previewer.mk b/vcl/Executable_ui-previewer.mk
index 0925e575ee67..cf6a2d3de6c7 100644
--- a/vcl/Executable_ui-previewer.mk
+++ b/vcl/Executable_ui-previewer.mk
@@ -37,7 +37,6 @@ $(eval $(call gb_Executable_add_exception_objects,ui-previewer,\
ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
$(eval $(call gb_Executable_add_libs,ui-previewer,\
-lm $(DLOPEN_LIBS) \
- -lpthread \
-lX11 \
))
diff --git a/vcl/Executable_vcldemo.mk b/vcl/Executable_vcldemo.mk
index c06725c297cf..35fcd27ffd51 100644
--- a/vcl/Executable_vcldemo.mk
+++ b/vcl/Executable_vcldemo.mk
@@ -53,7 +53,6 @@ $(eval $(call gb_Executable_use_static_libraries,vcldemo,\
ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
$(eval $(call gb_Executable_add_libs,vcldemo,\
-lm $(DLOPEN_LIBS) \
- -lpthread \
-lX11 \
))
diff --git a/vcl/Executable_visualbackendtest.mk b/vcl/Executable_visualbackendtest.mk
index 87044535f03e..41c641a5ff14 100644
--- a/vcl/Executable_visualbackendtest.mk
+++ b/vcl/Executable_visualbackendtest.mk
@@ -45,7 +45,6 @@ ifeq ($(OS),LINUX)
$(eval $(call gb_Executable_add_libs,visualbackendtest,\
-lm \
-ldl \
- -lpthread \
-lX11 \
))
diff --git a/vcl/Library_desktop_detector.mk b/vcl/Library_desktop_detector.mk
index 3edd0015e243..f28ff9078e64 100644
--- a/vcl/Library_desktop_detector.mk
+++ b/vcl/Library_desktop_detector.mk
@@ -66,7 +66,6 @@ $(eval $(call gb_Library_add_exception_objects,desktop_detector,\
ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
$(eval $(call gb_Library_add_libs,desktop_detector,\
-lm $(DLOPEN_LIBS) \
- -lpthread \
))
endif
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index ae7622dacae3..5f8bcd3af059 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -624,11 +624,6 @@ $(eval $(call gb_Library_use_externals,vcl,\
freetype \
fontconfig \
))
-ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
-$(eval $(call gb_Library_add_libs,vcl,\
- -lpthread \
-))
-endif
else
$(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/opengl/DeviceInfo \
@@ -649,7 +644,6 @@ else
ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
$(eval $(call gb_Library_add_libs,vcl,\
-lm $(DLOPEN_LIBS) \
- -lpthread \
-lX11 \
-lXext \
))
diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk
index 0e1c39c15766..ba02a3f57ba7 100644
--- a/vcl/Library_vclplug_gen.mk
+++ b/vcl/Library_vclplug_gen.mk
@@ -147,7 +147,6 @@ ifeq ($(OS),LINUX)
$(eval $(call gb_Library_add_libs,vclplug_gen,\
-lm \
-ldl \
- -lpthread \
))
endif
diff --git a/vcl/Library_vclplug_gtk.mk b/vcl/Library_vclplug_gtk.mk
index 67d405d4c8fa..360eabf46020 100644
--- a/vcl/Library_vclplug_gtk.mk
+++ b/vcl/Library_vclplug_gtk.mk
@@ -126,7 +126,6 @@ ifeq ($(OS),LINUX)
$(eval $(call gb_Library_add_libs,vclplug_gtk,\
-lm \
-ldl \
- -lpthread \
))
endif
diff --git a/vcl/Library_vclplug_gtk3.mk b/vcl/Library_vclplug_gtk3.mk
index 5ecf70bb4d0f..867903fd4f8e 100644
--- a/vcl/Library_vclplug_gtk3.mk
+++ b/vcl/Library_vclplug_gtk3.mk
@@ -119,7 +119,6 @@ ifeq ($(OS),LINUX)
$(eval $(call gb_Library_add_libs,vclplug_gtk3,\
-lm \
-ldl \
- -lpthread \
))
endif
diff --git a/vcl/Library_vclplug_gtk3_kde5.mk b/vcl/Library_vclplug_gtk3_kde5.mk
index e2e7bf8a9616..c96cb672db2d 100644
--- a/vcl/Library_vclplug_gtk3_kde5.mk
+++ b/vcl/Library_vclplug_gtk3_kde5.mk
@@ -123,7 +123,6 @@ ifeq ($(OS),LINUX)
$(eval $(call gb_Library_add_libs,vclplug_gtk3_kde5,\
-lm \
-ldl \
- -lpthread \
))
endif
diff --git a/vcl/Library_vclplug_kde5.mk b/vcl/Library_vclplug_kde5.mk
index a1816c6ec143..e08d8fadae75 100644
--- a/vcl/Library_vclplug_kde5.mk
+++ b/vcl/Library_vclplug_kde5.mk
@@ -99,7 +99,6 @@ ifeq ($(OS),LINUX)
$(eval $(call gb_Library_add_libs,vclplug_kde5,\
-lm \
-ldl \
- -lpthread \
))
endif
diff --git a/vcl/Library_vclplug_qt5.mk b/vcl/Library_vclplug_qt5.mk
index 5245d8a0149b..c4bc311fbcaf 100644
--- a/vcl/Library_vclplug_qt5.mk
+++ b/vcl/Library_vclplug_qt5.mk
@@ -102,7 +102,6 @@ ifeq ($(OS),LINUX)
$(eval $(call gb_Library_add_libs,vclplug_qt5,\
-lm \
-ldl \
- -lpthread \
))
endif
diff --git a/vcl/StaticLibrary_glxtest.mk b/vcl/StaticLibrary_glxtest.mk
index 227cbaa574c1..1a285875c828 100644
--- a/vcl/StaticLibrary_glxtest.mk
+++ b/vcl/StaticLibrary_glxtest.mk
@@ -31,7 +31,6 @@ $(eval $(call gb_StaticLibrary_use_api,glxtest,\
$(eval $(call gb_StaticLibrary_add_libs,glxtest,\
-lm $(DLOPEN_LIBS) \
- -lpthread \
-lX11 \
))
commit 2a46c3cb25e802d9a50865c0ea21baee1d2c5bbf
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Jun 11 11:56:33 2019 +0200
Commit: Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
CommitDate: Tue Jan 19 15:48:19 2021 +0100
external/libmspub: missing include
Change-Id: I446b26b3c0ffd0d62178f374b570c9fbd1885dd4
Reviewed-on: https://gerrit.libreoffice.org/73813
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit d0e38b8f1efc6a0b2b519ce1f82a83c5766f5633)
diff --git a/external/libmspub/UnpackedTarball_libmspub.mk b/external/libmspub/UnpackedTarball_libmspub.mk
index 5e5bedb27d83..89b06437a399 100644
--- a/external/libmspub/UnpackedTarball_libmspub.mk
+++ b/external/libmspub/UnpackedTarball_libmspub.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libmspub,0))
$(eval $(call gb_UnpackedTarball_add_patches,libmspub,\
external/libmspub/ubsan.patch \
+ external/libmspub/stdint.patch \
))
$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libmspub))
diff --git a/external/libmspub/stdint.patch b/external/libmspub/stdint.patch
new file mode 100644
index 000000000000..61f1dd122904
--- /dev/null
+++ b/external/libmspub/stdint.patch
@@ -0,0 +1,10 @@
+--- src/lib/MSPUBMetaData.h
++++ src/lib/MSPUBMetaData.h
+@@ -13,6 +13,7 @@
+ #include <map>
+ #include <utility>
+ #include <vector>
++#include <stdint.h>
+
+ #include <librevenge/librevenge.h>
+
More information about the Libreoffice-commits
mailing list