configure.ac | 2 +- libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx | 2 -- libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx | 8 -------- sw/source/core/inc/UndoCore.hxx | 5 +++-- sw/source/core/inc/UndoTable.hxx | 3 ++- sw/source/core/inc/rolbck.hxx | 3 ++- sw/source/core/undo/undobj.cxx | 4 ++-- sw/source/core/undo/untbl.cxx | 2 +- vcl/unx/gtk3/gtk3gtkdata.cxx | 6 ------ vcl/unx/gtk3/gtk3gtkframe.cxx | 15 +-------------- 10 files changed, 12 insertions(+), 38 deletions(-)
New commits: commit e90f86db77476f16a28c44c96771c925c6172d6d Author: Caolán McNamara <[email protected]> Date: Fri Dec 1 14:14:36 2017 +0000 require at least gtk3 3.10.0 to build gtk vclplug Change-Id: I4ca34184237d05b999c92648494c306a1f1371cd Reviewed-on: https://gerrit.libreoffice.org/45668 Tested-by: Jenkins <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/configure.ac b/configure.ac index e904fe3c29cc..505aaa768948 100644 --- a/configure.ac +++ b/configure.ac @@ -9724,7 +9724,7 @@ if test "x$enable_gtk3" = "xyes"; then AC_MSG_ERROR([System cairo required for gtk3 support, do not combine --enable-gtk3 with --without-system-cairo]) fi : ${with_system_cairo:=yes} - PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.8 gtk+-unix-print-3.0 gmodule-no-export-2.0 glib-2.0 >= 2.38 cairo, ENABLE_GTK3="TRUE", ENABLE_GTK3="") + PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.10 gtk+-unix-print-3.0 gmodule-no-export-2.0 glib-2.0 >= 2.38 cairo, ENABLE_GTK3="TRUE", ENABLE_GTK3="") if test "x$ENABLE_GTK3" = "xTRUE"; then R="gtk3" dnl Avoid installed by unpackaged files for now. diff --git a/libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx b/libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx index 9dee02a0ac45..3c4457b38215 100644 --- a/libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx +++ b/libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx @@ -30,9 +30,7 @@ void GtvHelpers::userPromptDialog(GtkWindow* pWindow, const std::string& aTitle, for (const auto& entry : aEntries) { GtkWidget* pEntry = gtk_entry_new(); -#if GTK_CHECK_VERSION(3,2,0) gtk_entry_set_placeholder_text(GTK_ENTRY(pEntry), entry.first.c_str()); -#endif gtk_container_add(GTK_CONTAINER(pEntryArea), pEntry); } diff --git a/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx b/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx index fe7d33210ce1..9c075f571170 100644 --- a/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx +++ b/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx @@ -159,21 +159,15 @@ static void addMoreUnoParam(GtkWidget* /*pWidget*/, gpointer userdata) GtkWidget* pTypeEntry = gtk_entry_new(); gtk_box_pack_start(GTK_BOX(pParamContainer), pTypeEntry, TRUE, TRUE, 2); -#if GTK_CHECK_VERSION(3,2,0) gtk_entry_set_placeholder_text(GTK_ENTRY(pTypeEntry), "Param type (Eg. boolean, string etc.)"); -#endif GtkWidget* pNameEntry = gtk_entry_new(); gtk_box_pack_start(GTK_BOX(pParamContainer), pNameEntry, TRUE, TRUE, 2); -#if GTK_CHECK_VERSION(3,2,0) gtk_entry_set_placeholder_text(GTK_ENTRY(pNameEntry), "Param name"); -#endif GtkWidget* pValueEntry = gtk_entry_new(); gtk_box_pack_start(GTK_BOX(pParamContainer), pValueEntry, TRUE, TRUE, 2); -#if GTK_CHECK_VERSION(3,2,0) gtk_entry_set_placeholder_text(GTK_ENTRY(pValueEntry), "Param value"); -#endif GtkWidget* pRemoveButton = gtk_button_new_from_icon_name("list-remove-symbolic", GTK_ICON_SIZE_BUTTON); g_signal_connect(pRemoveButton, "clicked", G_CALLBACK(removeUnoParam), pUnoParamAreaBox); @@ -220,9 +214,7 @@ void unoCommandDebugger(GtkWidget* pButton, gpointer /* pItem */) GtkWidget* pUnoCmdEntry = gtk_entry_new (); gtk_box_pack_start(GTK_BOX(pUnoCmdAreaBox), pUnoCmdEntry, TRUE, TRUE, 2); -#if GTK_CHECK_VERSION(3,2,0) gtk_entry_set_placeholder_text(GTK_ENTRY(pUnoCmdEntry), "UNO command (Eg. Bold, Italic etc.)"); -#endif GtkWidget* pUnoParamAreaBox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); gtk_box_pack_start(GTK_BOX(pDialogMessageArea), pUnoParamAreaBox, TRUE, TRUE, 2); diff --git a/vcl/unx/gtk3/gtk3gtkdata.cxx b/vcl/unx/gtk3/gtk3gtkdata.cxx index ee95314c350e..1c6e8e2c5e11 100644 --- a/vcl/unx/gtk3/gtk3gtkdata.cxx +++ b/vcl/unx/gtk3/gtk3gtkdata.cxx @@ -200,13 +200,7 @@ GdkCursor* GtkSalDisplay::getFromXBM( const unsigned char *pBitmap, cairo_surface_destroy(source); cairo_destroy(cr); -#if GTK_CHECK_VERSION(3,10,0) GdkCursor *cursor = gdk_cursor_new_from_surface(m_pGdkDisplay, s, nXHot, nYHot); -#else - GdkPixbuf *pixbuf = gdk_pixbuf_get_from_surface(s, 0, 0, nWidth, nHeight); - GdkCursor *cursor = gdk_cursor_new_from_pixbuf(m_pGdkDisplay, pixbuf, nXHot, nYHot); - g_object_unref(pixbuf); -#endif cairo_surface_destroy(s); diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 725c64594d92..25be18c60384 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -1386,11 +1386,9 @@ void GtkSalFrame::Center() Size GtkSalFrame::calcDefaultSize() { Size aScreenSize(getDisplay()->GetScreenSize(GetDisplayScreen())); -#if GTK_CHECK_VERSION(3,10,0) int scale = gtk_widget_get_scale_factor(m_pWindow); aScreenSize.Width() /= scale; aScreenSize.Height() /= scale; -#endif return bestmaxFrameSizeForScreenSize(aScreenSize); } @@ -1895,10 +1893,9 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, tools::Rect gtk_window_move(GTK_WINDOW(m_pWindow), nX, nY); -#if GTK_CHECK_VERSION(3,8,0) gdk_window_set_fullscreen_mode( widget_get_window(m_pWindow), m_bSpanMonitorsWhenFullscreen ? GDK_FULLSCREEN_ON_ALL_MONITORS : GDK_FULLSCREEN_ON_CURRENT_MONITOR ); -#endif + GtkWidget* pMenuBarContainerWidget = m_pSalMenu ? m_pSalMenu->GetMenuBarContainerWidget() : nullptr; if( eType == SetType::Fullscreen ) { @@ -4250,7 +4247,6 @@ void GtkSalFrame::startDrag(gint nButton, gint nDragOriginX, gint nDragOriginY, GdkDeviceManager* pDeviceManager = gdk_display_get_device_manager(getGdkDisplay()); aFakeEvent.button.device = gdk_device_manager_get_client_pointer(pDeviceManager); -#if GTK_CHECK_VERSION(3,10,0) GdkDragContext *pContext = gtk_drag_begin_with_coordinates(getMouseEventWidget(), pTargetList, sourceActions, @@ -4258,15 +4254,6 @@ void GtkSalFrame::startDrag(gint nButton, gint nDragOriginX, gint nDragOriginY, &aFakeEvent, nDragOriginX, nDragOriginY); -#else - GdkDragContext *pContext = gtk_drag_begin(getMouseEventWidget(), - pTargetList, - sourceActions, - nButton, - &aFakeEvent); - (void)nDragOriginX; - (void)nDragOriginY; -#endif if (!pContext) m_pDragSource->dragFailed(); commit 1cbee4822ab3b018c22111e6314f23add02b5521 Author: Caolán McNamara <[email protected]> Date: Fri Dec 1 10:59:53 2017 +0000 silence some coverity warnings Change-Id: Ibd8cd13ef037b57d7eccea3fb3a5668c8ded5662 Reviewed-on: https://gerrit.libreoffice.org/45654 Tested-by: Jenkins <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sw/source/core/inc/UndoCore.hxx b/sw/source/core/inc/UndoCore.hxx index b1866dc3ad77..3d8f0c8df38f 100644 --- a/sw/source/core/inc/UndoCore.hxx +++ b/sw/source/core/inc/UndoCore.hxx @@ -22,6 +22,7 @@ #include <undobj.hxx> #include <calbck.hxx> +#include <o3tl/deleter.hxx> #include <rtl/ustring.hxx> #include <redline.hxx> @@ -66,7 +67,7 @@ public: class SwRedlineSaveDatas { private: - std::vector<std::unique_ptr<SwRedlineSaveData>> m_Data; + std::vector<std::unique_ptr<SwRedlineSaveData, o3tl::default_delete<SwRedlineSaveData>>> m_Data; public: SwRedlineSaveDatas() : m_Data() {} @@ -74,7 +75,7 @@ public: void clear() { m_Data.clear(); } bool empty() const { return m_Data.empty(); } size_t size() const { return m_Data.size(); } - void push_back(std::unique_ptr<SwRedlineSaveData> pNew) { m_Data.push_back(std::move(pNew)); } + void push_back(std::unique_ptr<SwRedlineSaveData, o3tl::default_delete<SwRedlineSaveData>> pNew) { m_Data.push_back(std::move(pNew)); } const SwRedlineSaveData& operator[](size_t const nIdx) const { return *m_Data[ nIdx ]; } SwRedlineSaveData& operator[](size_t const nIdx) { return *m_Data[ nIdx ]; } }; diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx index 6b2fc68e4648..d678c996f8c1 100644 --- a/sw/source/core/inc/UndoTable.hxx +++ b/sw/source/core/inc/UndoTable.hxx @@ -20,6 +20,7 @@ #ifndef INCLUDED_SW_SOURCE_CORE_INC_UNDOTABLE_HXX #define INCLUDED_SW_SOURCE_CORE_INC_UNDOTABLE_HXX +#include <o3tl/deleter.hxx> #include <ndarr.hxx> #include <undobj.hxx> #include <set> @@ -161,7 +162,7 @@ public: void SaveBoxContent( const SwTableBox& rBox ); }; -using SwUndoSaveSections = std::vector<std::unique_ptr<SwUndoSaveSection>>; +using SwUndoSaveSections = std::vector<std::unique_ptr<SwUndoSaveSection, o3tl::default_delete<SwUndoSaveSection>>>; class SwUndoTableNdsChg : public SwUndo { diff --git a/sw/source/core/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx index 88b629cfed5d..ef6642719a72 100644 --- a/sw/source/core/inc/rolbck.hxx +++ b/sw/source/core/inc/rolbck.hxx @@ -19,6 +19,7 @@ #ifndef INCLUDED_SW_SOURCE_CORE_INC_ROLBCK_HXX #define INCLUDED_SW_SOURCE_CORE_INC_ROLBCK_HXX +#include <o3tl/deleter.hxx> #include <svl/itemset.hxx> #include <tools/solar.h> #include <vcl/keycod.hxx> @@ -194,7 +195,7 @@ public: class SwHistorySetFootnote : public SwHistoryHint { - const std::unique_ptr<SwUndoSaveSection> m_pUndo; + const std::unique_ptr<SwUndoSaveSection, o3tl::default_delete<SwUndoSaveSection>> m_pUndo; const OUString m_FootnoteNumber; sal_uLong m_nNodeIndex; const sal_Int32 m_nStart; diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 65717add205e..40c7131895eb 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -1398,7 +1398,7 @@ bool SwUndo::FillSaveData( && eCmpPos != SwComparePosition::CollideStart ) { - rSData.push_back(o3tl::make_unique<SwRedlineSaveData>(eCmpPos, *pStt, *pEnd, *pRedl, bCopyNext)); + rSData.push_back(std::unique_ptr<SwRedlineSaveData, o3tl::default_delete<SwRedlineSaveData>>(new SwRedlineSaveData(eCmpPos, *pStt, *pEnd, *pRedl, bCopyNext))); } } if( !rSData.empty() && bDelRange ) @@ -1429,7 +1429,7 @@ bool SwUndo::FillSaveDataForFormat( && eCmpPos != SwComparePosition::CollideEnd && eCmpPos != SwComparePosition::CollideStart ) { - rSData.push_back(o3tl::make_unique<SwRedlineSaveData>(eCmpPos, *pStt, *pEnd, *pRedl, true)); + rSData.push_back(std::unique_ptr<SwRedlineSaveData, o3tl::default_delete<SwRedlineSaveData>>(new SwRedlineSaveData(eCmpPos, *pStt, *pEnd, *pRedl, true))); } } diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 6383a0b251c6..250dde4d6c03 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -1657,7 +1657,7 @@ void SwUndoTableNdsChg::SaveSection( SwStartNode* pSttNd ) m_pDelSects.reset(new SwUndoSaveSections); SwTableNode* pTableNd = pSttNd->FindTableNode(); - std::unique_ptr<SwUndoSaveSection> pSave(new SwUndoSaveSection); + std::unique_ptr<SwUndoSaveSection, o3tl::default_delete<SwUndoSaveSection>> pSave(new SwUndoSaveSection); pSave->SaveSection( SwNodeIndex( *pSttNd )); m_pDelSects->push_back(std::move(pSave));
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
