[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2020-02-07 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit b6a0dd44e5862471ef7804951b01570700d2e33c
Author: Caolán McNamara 
AuthorDate: Fri Feb 7 09:39:29 2020 +
Commit: Michael Weghorn 
CommitDate: Sat Feb 8 03:44:57 2020 +0100

tdf#129809 take a reference in case m_aContents is replaced

Change-Id: I36ae74b6b3424bd2f0b71bc54838ec39e504b6d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88180
Reviewed-by: Michael Weghorn 
Tested-by: Jenkins

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 9d992eb81c4f..844a9f5a493b 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -367,7 +367,10 @@ void VclGtkClipboard::ClipboardGet(GtkSelectionData 
*selection_data, guint info)
 {
 if (!m_aContents.is())
 return;
-m_aConversionHelper.setSelectionData(m_aContents, selection_data, info);
+// tdf#129809 take a reference in case m_aContents is replaced during this
+// call
+Reference xCurrentContents(m_aContents);
+m_aConversionHelper.setSelectionData(xCurrentContents, selection_data, 
info);
 }
 
 namespace
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2020-01-02 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit bb69e410c48e68be127a3842740d588e8a537395
Author: Caolán McNamara 
AuthorDate: Thu Dec 19 09:33:31 2019 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Jan 2 11:13:09 2020 +0100

focus-in/out should return a value

Change-Id: I82df9b24a5f08830eda1e511d6a7d45a1edcc08e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85499
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index e0bbf6dd4cdc..9d992eb81c4f 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -9249,10 +9249,11 @@ private:
 }
 }
 
-static void signalEntryFocusIn(GtkWidget*, GdkEvent*, gpointer widget)
+static gboolean signalEntryFocusIn(GtkWidget*, GdkEvent*, gpointer widget)
 {
 GtkInstanceComboBox* pThis = static_cast(widget);
 pThis->signal_entry_focus_in();
+return false;
 }
 
 void signal_entry_focus_in()
@@ -9260,10 +9261,11 @@ private:
 signal_focus_in();
 }
 
-static void signalEntryFocusOut(GtkWidget*, GdkEvent*, gpointer widget)
+static gboolean signalEntryFocusOut(GtkWidget*, GdkEvent*, gpointer widget)
 {
 GtkInstanceComboBox* pThis = static_cast(widget);
 pThis->signal_entry_focus_out();
+return false;
 }
 
 void signal_entry_focus_out()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-12-23 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |   13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

New commits:
commit 60f469f585899e97f3dbc9b98b12d36d9b665eff
Author: Caolán McNamara 
AuthorDate: Thu Dec 19 10:24:42 2019 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Dec 23 12:30:56 2019 +0100

Resolves: tdf#129484 just install decimal key handler for spinbuttons

as a simple interim fix

Change-Id: I7e393fe20f4fb7ea277c423f9fc9789d658b1e18
Reviewed-on: https://gerrit.libreoffice.org/85507
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 186b3f2bb2a0..e0bbf6dd4cdc 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1402,6 +1402,14 @@ protected:
 return pThis->signal_popup_menu(aCEvt);
 }
 
+void localizeDecimalSeparator()
+{
+// tdf#128867 if localize decimal separator is active we will always
+// need to be able to change the output of the decimal key press
+if (!m_nKeyPressSignalId && 
Application::GetSettings().GetMiscSettings().GetEnableLocalizedDecimalSep())
+m_nKeyPressSignalId = g_signal_connect(m_pWidget, 
"key-press-event", G_CALLBACK(signalKey), this);
+}
+
 private:
 bool m_bTakeOwnership;
 bool m_bFrozen;
@@ -1627,10 +1635,6 @@ public:
 , m_nDragDropReceivedSignalId(0)
 , m_nDragLeaveSignalId(0)
 {
-// tdf#128867 if localize decimal separator is active we will always
-// need to be able to change the output of the decimal key press
-if 
(Application::GetSettings().GetMiscSettings().GetEnableLocalizedDecimalSep())
-m_nKeyPressSignalId = g_signal_connect(m_pWidget, 
"key-press-event", G_CALLBACK(signalKey), this);
 }
 
 virtual void connect_key_press(const Link& rLink) 
override
@@ -8344,6 +8348,7 @@ public:
 , m_bBlockOutput(false)
 , m_bBlank(false)
 {
+localizeDecimalSeparator();
 }
 
 virtual int get_value() const override
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-12-11 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 6f1f1af8b7abb1597c7a83249658fe977729ddcf
Author: Caolán McNamara 
AuthorDate: Wed Dec 11 14:22:30 2019 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Dec 12 04:13:13 2019 +0100

Resolves: tdf#128867 support LocalizedDecimalSep for native gtk dialogs

Change-Id: Idb883707fb89d1f76b24ea592c51e28fffd2322f
Reviewed-on: https://gerrit.libreoffice.org/84954
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 090275da6e97..186b3f2bb2a0 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1627,6 +1627,10 @@ public:
 , m_nDragDropReceivedSignalId(0)
 , m_nDragLeaveSignalId(0)
 {
+// tdf#128867 if localize decimal separator is active we will always
+// need to be able to change the output of the decimal key press
+if 
(Application::GetSettings().GetMiscSettings().GetEnableLocalizedDecimalSep())
+m_nKeyPressSignalId = g_signal_connect(m_pWidget, 
"key-press-event", G_CALLBACK(signalKey), this);
 }
 
 virtual void connect_key_press(const Link& rLink) 
override
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-11-25 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |   36 +++-
 1 file changed, 19 insertions(+), 17 deletions(-)

New commits:
commit e0f63fdebc6181bea39dad163566da5afe61b88a
Author: Caolán McNamara 
AuthorDate: Fri Nov 1 11:39:13 2019 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 25 17:43:03 2019 +0100

the label sync button will relaunch itself from its close handler

so rearrange things so that runAsync can survive that

Reviewed-on: https://gerrit.libreoffice.org/81884
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 60692ba238c6c5c003722ccaa52702e9ef3ade13)

Change-Id: I7d40637fb861ceb64ce32f0e9ecb3451c0d17bad
Reviewed-on: https://gerrit.libreoffice.org/83523
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 194d669cdedf..090275da6e97 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -3242,7 +3242,7 @@ public:
 if (gtk_widget_get_visible(m_pWidget))
 return;
 
sort_native_button_order(GTK_BOX(gtk_dialog_get_action_area(m_pDialog)));
-gtk_widget_show(m_pWidget);
+GtkInstanceWindow::show();
 }
 
 virtual void set_modal(bool bModal) override
@@ -4854,24 +4854,26 @@ void GtkInstanceDialog::asyncresponse(gint ret)
 }
 
 hide();
-m_aFunc(GtkToVcl(ret));
-
-if (m_nResponseSignalId)
-{
-g_signal_handler_disconnect(m_pDialog, m_nResponseSignalId);
-m_nResponseSignalId = 0;
-}
-if (m_nSignalDeleteId)
-{
-g_signal_handler_disconnect(m_pDialog, m_nSignalDeleteId);
-m_nSignalDeleteId = 0;
-}
 
-m_aFunc = nullptr;
 // move the self pointer, otherwise it might be de-allocated by time we 
try to reset it
-std::shared_ptr me = std::move(m_xRunAsyncSelf);
-m_xDialogController.reset();
-me.reset();
+auto xRunAsyncSelf = std::move(m_xRunAsyncSelf);
+auto xDialogController = std::move(m_xDialogController);
+auto aFunc = std::move(m_aFunc);
+
+auto nResponseSignalId = m_nResponseSignalId;
+auto nSignalDeleteId = m_nSignalDeleteId;
+m_nResponseSignalId = 0;
+m_nSignalDeleteId = 0;
+
+aFunc(GtkToVcl(ret));
+
+if (nResponseSignalId)
+g_signal_handler_disconnect(m_pDialog, nResponseSignalId);
+if (nSignalDeleteId)
+g_signal_handler_disconnect(m_pDialog, nSignalDeleteId);
+
+xDialogController.reset();
+xRunAsyncSelf.reset();
 }
 
 int GtkInstanceDialog::run()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-11-25 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |   24 +---
 1 file changed, 17 insertions(+), 7 deletions(-)

New commits:
commit b5c76e38dab228180210faa479d2a5ac8b451173
Author: Caolán McNamara 
AuthorDate: Mon Oct 14 13:03:15 2019 +0100
Commit: Michael Stahl 
CommitDate: Mon Nov 25 11:38:54 2019 +0100

assert fires after help hides find & replace dialog

Reviewed-on: https://gerrit.libreoffice.org/80769
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit de2cb96d5f9bb3c831fd136062582b4c11a003d1)

Change-Id: I72db53711322de9420fdb097ac60dda35f1ec5d8
Reviewed-on: https://gerrit.libreoffice.org/83522
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index ae958cbe985e..194d669cdedf 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -3202,7 +3202,7 @@ public:
 
 virtual bool runAsync(std::shared_ptr 
rDialogController, const std::function& func) override
 {
-assert(!m_nResponseSignalId);
+assert(!m_nResponseSignalId && !m_nSignalDeleteId);
 
 m_xDialogController = rDialogController;
 m_aFunc = func;
@@ -3218,7 +3218,7 @@ public:
 virtual bool runAsync(std::shared_ptr const & rxSelf, const 
std::function& func) override
 {
 assert( rxSelf.get() == this );
-assert(!m_nResponseSignalId);
+assert(!m_nResponseSignalId && !m_nSignalDeleteId);
 
 // In order to store a shared_ptr to ourself, we have to have been 
constructed by make_shared,
 // which is that rxSelf enforces.
@@ -3404,11 +3404,9 @@ public:
 m_aHiddenWidgets.clear();
 }
 
-g_signal_handler_disconnect(m_pDialog, m_nCloseSignalId);
-if (m_nResponseSignalId)
-g_signal_handler_disconnect(m_pDialog, m_nResponseSignalId);
-if (m_nSignalDeleteId)
-g_signal_handler_disconnect(m_pDialog, m_nSignalDeleteId);
+if (m_nCloseSignalId)
+g_signal_handler_disconnect(m_pDialog, m_nCloseSignalId);
+assert(!m_nResponseSignalId && !m_nSignalDeleteId);
 }
 };
 
@@ -4857,6 +4855,18 @@ void GtkInstanceDialog::asyncresponse(gint ret)
 
 hide();
 m_aFunc(GtkToVcl(ret));
+
+if (m_nResponseSignalId)
+{
+g_signal_handler_disconnect(m_pDialog, m_nResponseSignalId);
+m_nResponseSignalId = 0;
+}
+if (m_nSignalDeleteId)
+{
+g_signal_handler_disconnect(m_pDialog, m_nSignalDeleteId);
+m_nSignalDeleteId = 0;
+}
+
 m_aFunc = nullptr;
 // move the self pointer, otherwise it might be de-allocated by time we 
try to reset it
 std::shared_ptr me = std::move(m_xRunAsyncSelf);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-11-14 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |   34 +++---
 1 file changed, 23 insertions(+), 11 deletions(-)

New commits:
commit a735c2d51bd9a73e5b9aae29d5dd224bf76cb99a
Author: Caolán McNamara 
AuthorDate: Wed Nov 13 14:32:42 2019 +
Commit: Michael Stahl 
CommitDate: Thu Nov 14 16:50:30 2019 +0100

ensure we connect just once

Change-Id: Icd403eac948f0ead1f08a5a2e3a46e9b6bf33792
Reviewed-on: https://gerrit.libreoffice.org/82626
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 572dee1f08b9..2262e52179fe 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1631,13 +1631,15 @@ public:
 
 virtual void connect_key_press(const Link& rLink) 
override
 {
-m_nKeyPressSignalId = g_signal_connect(m_pWidget, "key-press-event", 
G_CALLBACK(signalKey), this);
+if (!m_nKeyPressSignalId)
+m_nKeyPressSignalId = g_signal_connect(m_pWidget, 
"key-press-event", G_CALLBACK(signalKey), this);
 weld::Widget::connect_key_press(rLink);
 }
 
 virtual void connect_key_release(const Link& rLink) 
override
 {
-m_nKeyReleaseSignalId = g_signal_connect(m_pWidget, 
"key-release-event", G_CALLBACK(signalKey), this);
+if (!m_nKeyReleaseSignalId)
+m_nKeyReleaseSignalId = g_signal_connect(m_pWidget, 
"key-release-event", G_CALLBACK(signalKey), this);
 weld::Widget::connect_key_release(rLink);
 }
 
@@ -1650,14 +1652,16 @@ public:
 virtual void connect_mouse_move(const Link& 
rLink) override
 {
 ensureEventWidget();
-m_nMotionSignalId = g_signal_connect(m_pMouseEventBox, 
"motion-notify-event", G_CALLBACK(signalMotion), this);
+if (!m_nMotionSignalId)
+m_nMotionSignalId = g_signal_connect(m_pMouseEventBox, 
"motion-notify-event", G_CALLBACK(signalMotion), this);
 weld::Widget::connect_mouse_move(rLink);
 }
 
 virtual void connect_mouse_release(const Link& 
rLink) override
 {
 ensureEventWidget();
-m_nButtonReleaseSignalId = g_signal_connect(m_pMouseEventBox, 
"button-release-event", G_CALLBACK(signalButton), this);
+if (!m_nButtonReleaseSignalId)
+m_nButtonReleaseSignalId = g_signal_connect(m_pMouseEventBox, 
"button-release-event", G_CALLBACK(signalButton), this);
 weld::Widget::connect_mouse_release(rLink);
 }
 
@@ -2009,19 +2013,22 @@ public:
 
 virtual void connect_focus_in(const Link& rLink) override
 {
-m_nFocusInSignalId = g_signal_connect(m_pWidget, "focus-in-event", 
G_CALLBACK(signalFocusIn), this);
+if (!m_nFocusInSignalId)
+m_nFocusInSignalId = g_signal_connect(m_pWidget, "focus-in-event", 
G_CALLBACK(signalFocusIn), this);
 weld::Widget::connect_focus_in(rLink);
 }
 
 virtual void connect_mnemonic_activate(const Link& rLink) 
override
 {
-m_nMnemonicActivateSignalId = g_signal_connect(m_pWidget, 
"mnemonic-activate", G_CALLBACK(signalMnemonicActivate), this);
+if (!m_nMnemonicActivateSignalId)
+m_nMnemonicActivateSignalId = g_signal_connect(m_pWidget, 
"mnemonic-activate", G_CALLBACK(signalMnemonicActivate), this);
 weld::Widget::connect_mnemonic_activate(rLink);
 }
 
 virtual void connect_focus_out(const Link& rLink) override
 {
-m_nFocusOutSignalId = g_signal_connect(m_pWidget, "focus-out-event", 
G_CALLBACK(signalFocusOut), this);
+if (!m_nFocusOutSignalId)
+m_nFocusOutSignalId = g_signal_connect(m_pWidget, 
"focus-out-event", G_CALLBACK(signalFocusOut), this);
 weld::Widget::connect_focus_out(rLink);
 }
 
@@ -7340,8 +7347,11 @@ public:
 virtual void connect_visible_range_changed(const Link& rLink) override
 {
 weld::TreeView::connect_visible_range_changed(rLink);
-GtkAdjustment* pVAdjustment = 
gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(m_pTreeView));
-m_nVAdjustmentChangedSignalId = g_signal_connect(pVAdjustment, 
"value-changed", G_CALLBACK(signalVAdjustmentChanged), this);
+if (!m_nVAdjustmentChangedSignalId)
+{
+GtkAdjustment* pVAdjustment = 
gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(m_pTreeView));
+m_nVAdjustmentChangedSignalId = g_signal_connect(pVAdjustment, 
"value-changed", G_CALLBACK(signalVAdjustmentChanged), this);
+}
 }
 
 virtual bool is_selected(const weld::TreeIter& rIter) const override
@@ -9905,13 +9915,15 @@ public:
 
 virtual void connect_focus_in(const Link& rLink) override
 {
-m_nToggleFocusInSignalId = g_signal_connect(m_pToggleButton, 
"focus-in-event", G_CALLBACK(signalFocusIn), this);
+if (!m_nToggleFocusInSignalId)
+m_nToggleFocusInSignalId = g_signal_connect(m_pToggleButton, 
"focus-in-event", G_CALLBACK(signalFocusIn), this);
 weld::Widget::connect_focus_in(rLin

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-11-12 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk/a11y/atkwrapper.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit a14036275e3fb1f9ef688b256b94bb9793e6558f
Author: Caolán McNamara 
AuthorDate: Mon Nov 4 09:40:35 2019 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Nov 13 06:53:13 2019 +0100

survive missing atk_object_set_accessible_id symbol

Change-Id: If18380dfe3ab17a4584602869928b3ff50fc15d6
Reviewed-on: https://gerrit.libreoffice.org/81988
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index 63b4cfa04430..d373b580447a 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -66,6 +66,7 @@
 #include "atklistener.hxx"
 #include "atktextattributes.hxx"
 
+#include 
 #include 
 #include 
 
@@ -881,16 +882,16 @@ atk_object_wrapper_new( const css::uno::Reference< 
css::accessibility::XAccessib
 OSL_ASSERT( false );
 }
 
-#if ATK_CHECK_VERSION(2,33,1)
+static auto func = reinterpret_cast(dlsym(nullptr, "atk_object_set_accessible_id"));
+if (func)
 {
 css::uno::Reference 
xContext2(xContext, css::uno::UNO_QUERY);
 if( xContext2.is() )
 {
 OString aId = OUStringToOString( xContext2->getAccessibleId(), 
RTL_TEXTENCODING_UTF8);
-atk_object_set_accessible_id(atk_obj, aId.getStr());
+(*func)(atk_obj, aId.getStr());
 }
 }
-#endif
 
 return ATK_OBJECT( pWrap );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-11-12 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |   15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

New commits:
commit 881d176ec8baa2f00aa78236912db5fe346445f7
Author: Caolán McNamara 
AuthorDate: Mon Nov 4 11:28:51 2019 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Nov 13 06:52:43 2019 +0100

improve pivot table dnd highlighting

if we're dropping into a treeview that is in list mode then use
GTK_TREE_VIEW_DROP_AFTER instead when GTK_TREE_VIEW_DROP_INTO_OR_AFTER is
suggested.

Change-Id: I446e70a1e10a2e6e50bd7a098c54a91bcfa6abb9

improve pivot table dnd highlighting

unhighlight row when widget is unhighlighted and only
highlight a row if the widget is highlighted

Change-Id: I415207b4b263c5125f52abd57efe3543e2411b36
Reviewed-on: https://gerrit.libreoffice.org/82001
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 4162fc263a62..572dee1f08b9 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -6469,6 +6469,7 @@ private:
 std::vector m_aViewColToModelCol;
 std::vector m_aModelColToViewCol;
 bool m_bWorkAroundBadDragRegion;
+bool m_bInDrag;
 gint m_nTextCol;
 gint m_nImageCol;
 gint m_nExpanderImageCol;
@@ -6855,6 +6856,7 @@ public:
 , m_pTreeView(pTreeView)
 , m_pTreeStore(GTK_TREE_STORE(gtk_tree_view_get_model(m_pTreeView)))
 , m_bWorkAroundBadDragRegion(false)
+, m_bInDrag(false)
 , m_nTextCol(-1)
 , m_nImageCol(-1)
 , m_nExpanderImageCol(-1)
@@ -8114,7 +8116,7 @@ public:
 gtkpos == GTK_TREE_VIEW_DROP_INTO_OR_AFTER)
 {
 ret = false;
-pos = gtkpos;
+pos = bAsTree ? gtkpos : GTK_TREE_VIEW_DROP_AFTER;
 }
 }
 
@@ -8124,8 +8126,11 @@ public:
 gtk_tree_model_get_iter(pModel, &rGtkIter.iter, path);
 }
 
-// highlight the row
-gtk_tree_view_set_drag_dest_row(m_pTreeView, path, pos);
+if (m_bInDrag)
+{
+// highlight the row
+gtk_tree_view_set_drag_dest_row(m_pTreeView, path, pos);
+}
 
 assert(path);
 gtk_tree_path_free(path);
@@ -8170,6 +8175,7 @@ public:
 // of the treeview's highlight effort
 virtual void drag_started() override
 {
+m_bInDrag = true;
 GtkWidget* pWidget = GTK_WIDGET(m_pTreeView);
 GtkWidget* pParent = gtk_widget_get_parent(pWidget);
 if (GTK_IS_SCROLLED_WINDOW(pParent))
@@ -8182,6 +8188,7 @@ public:
 
 virtual void drag_ended() override
 {
+m_bInDrag = false;
 if (m_bWorkAroundBadDragRegion)
 {
 GtkWidget* pWidget = GTK_WIDGET(m_pTreeView);
@@ -8189,6 +8196,8 @@ public:
 gtk_drag_unhighlight(pParent);
 m_bWorkAroundBadDragRegion = false;
 }
+// unhighlight the row
+gtk_tree_view_set_drag_dest_row(m_pTreeView, nullptr, 
GTK_TREE_VIEW_DROP_BEFORE);
 }
 
 virtual ~GtkInstanceTreeView() override
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-11-08 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk/gtksalmenu.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 04db96d9f18daa1dcc2d2be0fed766e009f8f194
Author: Caolán McNamara 
AuthorDate: Wed Nov 6 10:32:15 2019 +
Commit: Michael Weghorn 
CommitDate: Fri Nov 8 17:29:39 2019 +0100

set mpCloseButton to null after it is destroyed

Change-Id: If1a0bec30d2bcfdf6846712a67efbe2dcfbbec5c
Reviewed-on: https://gerrit.libreoffice.org/82134
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx
index 91946e09fd1c..785e4457026e 100644
--- a/vcl/unx/gtk/gtksalmenu.cxx
+++ b/vcl/unx/gtk/gtksalmenu.cxx
@@ -662,7 +662,10 @@ void GtkSalMenu::ShowCloseButton(bool bShow)
 if (!bShow)
 {
 if (mpCloseButton)
+{
 gtk_widget_destroy(mpCloseButton);
+mpCloseButton = nullptr;
+}
 return;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-10-15 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 223b64a79b6fad317c5b1e7cfba080544376ee07
Author: Caolán McNamara 
AuthorDate: Tue Oct 15 14:06:51 2019 +0100
Commit: Michael Weghorn 
CommitDate: Wed Oct 16 08:16:26 2019 +0200

Related: tdf#124729 check for gtk_gl_area_get_error before continuing

Change-Id: Ib87f32c2fa8c561981920ea688ea723c8e59bead
Reviewed-on: https://gerrit.libreoffice.org/80839
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 5161c4dd9b89..4162fc263a62 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1065,6 +1065,10 @@ private:
 gtk_widget_show_all(pParent);
 
 gtk_gl_area_make_current(GTK_GL_AREA(m_pGLArea));
+
+if (gtk_gl_area_get_error(GTK_GL_AREA(m_pGLArea)))
+return false;
+
 gtk_gl_area_attach_buffers(GTK_GL_AREA(m_pGLArea));
 glGenFramebuffersEXT(1, &m_nAreaFrameBuffer);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-10-14 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit bfba5d9e98a4160e53eb07e806c19e30cc8e6947
Author: Caolán McNamara 
AuthorDate: Sun Oct 13 20:48:14 2019 +0100
Commit: Caolán McNamara 
CommitDate: Mon Oct 14 14:40:15 2019 +0200

Related: tdf#124729 check error status before continuing

Change-Id: Ic39e569121b2646995b8dec50c3941db65fdd500
Reviewed-on: https://gerrit.libreoffice.org/80745
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit fb098c51e731ab92198db9822d4de757469ee804)
Reviewed-on: https://gerrit.libreoffice.org/80753
Reviewed-by: Michael Stahl 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 7c423fb4a272..5161c4dd9b89 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1070,7 +1070,12 @@ private:
 
 GdkWindow *pWindow = gtk_widget_get_window(pParent);
 m_pContext = gdk_window_create_gl_context(pWindow, nullptr);
-gdk_gl_context_realize(m_pContext, nullptr);
+if (!m_pContext)
+return false;
+
+if (!gdk_gl_context_realize(m_pContext, nullptr))
+return false;
+
 gdk_gl_context_make_current(m_pContext);
 glGenFramebuffersEXT(1, &m_nFrameBuffer);
 glGenRenderbuffersEXT(1, &m_nRenderBuffer);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-10-09 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit a5d32a59252c51c589d4ec223ba68eee5c9649f9
Author: Caolán McNamara 
AuthorDate: Wed Oct 9 09:25:00 2019 +0100
Commit: Michael Stahl 
CommitDate: Wed Oct 9 16:04:51 2019 +0200

remove still pending timeout in dtor

Change-Id: I8ec8c62a9cd5349fa6e58c2d0515bd57edede97a
Reviewed-on: https://gerrit.libreoffice.org/80524
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 5bd596bb4c09..7c423fb4a272 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -4706,6 +4706,8 @@ public:
 
 virtual ~GtkInstanceNotebook() override
 {
+if (m_nLaunchSplitTimeoutId)
+g_source_remove(m_nLaunchSplitTimeoutId);
 if (m_nSizeAllocateSignalId)
 g_signal_handler_disconnect(m_pNotebook, m_nSizeAllocateSignalId);
 g_signal_handler_disconnect(m_pNotebook, m_nSwitchPageSignalId);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-10-08 Thread Samuel Mehrbrodt (via logerrit)
 vcl/unx/gtk/gtksalmenu.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit eccf0193885d1e46a207966eb52a408dc60e8109
Author: Samuel Mehrbrodt 
AuthorDate: Tue Oct 8 15:45:45 2019 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Oct 9 05:09:16 2019 +0200

tdf#124391 Fix doubled menu in global menu

Regression from 3bedbfd9b3cee5a8d2da6ee0486859bd725979ba

Change-Id: I56473a2b0620f90f23b1bcde3ae1290801021038
Reviewed-on: https://gerrit.libreoffice.org/80464
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx
index 8dbd8817b1ff..91946e09fd1c 100644
--- a/vcl/unx/gtk/gtksalmenu.cxx
+++ b/vcl/unx/gtk/gtksalmenu.cxx
@@ -229,8 +229,12 @@ void GtkSalMenu::ImplUpdate(bool bRecurse, bool 
bRemoveDisabledEntries)
 if (mbMenuBar && maUpdateMenuBarIdle.IsActive())
 {
 maUpdateMenuBarIdle.Stop();
-maUpdateMenuBarIdle.Invoke();
-return;
+// tdf#124391 Prevent doubled menus in global menu
+if (!bUnityMode)
+{
+maUpdateMenuBarIdle.Invoke();
+return;
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-10-03 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |   51 ---
 1 file changed, 34 insertions(+), 17 deletions(-)

New commits:
commit af0c51990e6d0f578f75b72383ce129f52bea859
Author: Caolán McNamara 
AuthorDate: Thu Sep 26 13:05:27 2019 +0100
Commit: Xisco Faulí 
CommitDate: Thu Oct 3 11:07:40 2019 +0200

Resolves: tdf#127262 validity out of order focus in and out problem

Resolves: tdf#127904 modal depth dips below 0

when validation dialog is run modally, but changed itself to unmodal
during execution.

only NotifyModalHierarchy on modal<->unmodal transition and not on
modality depth

Change-Id: I06f5fd0ce32a9f2d799f6003b7d22b13e865b8c6
Reviewed-on: https://gerrit.libreoffice.org/79612
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 05f0a341b9fd..5b7efd8ce43a 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1259,15 +1259,16 @@ protected:
 GtkInstanceBuilder* m_pBuilder;
 
 DECL_LINK(async_signal_focus_in, void*, void);
+DECL_LINK(async_signal_focus_out, void*, void);
 
 void launch_signal_focus_in()
 {
 // in e.g. function wizard RefEdits we want to select all when we get 
focus
 // but there are pending gtk handlers which change selection after our 
handler
 // post our focus in event to happen after those finish
-if (m_pFocusEvent)
-Application::RemoveUserEvent(m_pFocusEvent);
-m_pFocusEvent = Application::PostUserEvent(LINK(this, 
GtkInstanceWidget, async_signal_focus_in));
+if (m_pFocusInEvent)
+Application::RemoveUserEvent(m_pFocusInEvent);
+m_pFocusInEvent = Application::PostUserEvent(LINK(this, 
GtkInstanceWidget, async_signal_focus_in));
 }
 
 static gboolean signalFocusIn(GtkWidget*, GdkEvent*, gpointer widget)
@@ -1294,11 +1295,20 @@ protected:
 return m_aMnemonicActivateHdl.Call(*this);
 }
 
+void launch_signal_focus_out()
+{
+// tdf#127262 because focus in is async, focus out must not appear out
+// of sequence to focus in
+if (m_pFocusOutEvent)
+Application::RemoveUserEvent(m_pFocusOutEvent);
+m_pFocusOutEvent = Application::PostUserEvent(LINK(this, 
GtkInstanceWidget, async_signal_focus_out));
+}
+
 static gboolean signalFocusOut(GtkWidget*, GdkEvent*, gpointer widget)
 {
 GtkInstanceWidget* pThis = static_cast(widget);
 SolarMutexGuard aGuard;
-pThis->signal_focus_out();
+pThis->launch_signal_focus_out();
 return false;
 }
 
@@ -1389,7 +1399,8 @@ private:
 bool m_bDraggedOver;
 sal_uInt16 m_nLastMouseButton;
 sal_uInt16 m_nLastMouseClicks;
-ImplSVEvent* m_pFocusEvent;
+ImplSVEvent* m_pFocusInEvent;
+ImplSVEvent* m_pFocusOutEvent;
 gulong m_nFocusInSignalId;
 gulong m_nMnemonicActivateSignalId;
 gulong m_nFocusOutSignalId;
@@ -1591,7 +1602,8 @@ public:
 , m_bDraggedOver(false)
 , m_nLastMouseButton(0)
 , m_nLastMouseClicks(0)
-, m_pFocusEvent(nullptr)
+, m_pFocusInEvent(nullptr)
+, m_pFocusOutEvent(nullptr)
 , m_nFocusInSignalId(0)
 , m_nMnemonicActivateSignalId(0)
 , m_nFocusOutSignalId(0)
@@ -2095,8 +2107,10 @@ public:
 
 virtual ~GtkInstanceWidget() override
 {
-if (m_pFocusEvent)
-Application::RemoveUserEvent(m_pFocusEvent);
+if (m_pFocusInEvent)
+Application::RemoveUserEvent(m_pFocusInEvent);
+if (m_pFocusOutEvent)
+Application::RemoveUserEvent(m_pFocusOutEvent);
 if (m_nDragMotionSignalId)
 g_signal_handler_disconnect(m_pWidget, m_nDragMotionSignalId);
 if (m_nDragDropSignalId)
@@ -2184,10 +2198,16 @@ public:
 
 IMPL_LINK_NOARG(GtkInstanceWidget, async_signal_focus_in, void*, void)
 {
-m_pFocusEvent = nullptr;
+m_pFocusInEvent = nullptr;
 signal_focus_in();
 }
 
+IMPL_LINK_NOARG(GtkInstanceWidget, async_signal_focus_out, void*, void)
+{
+m_pFocusOutEvent = nullptr;
+signal_focus_out();
+}
+
 namespace
 {
 OString MapToGtkAccelerator(const OUString &rStr)
@@ -2983,8 +3003,9 @@ struct DialogRunner
 if (m_xFrameWindow)
 {
 m_xFrameWindow->IncModalCount();
+if (m_nModalDepth == 0)
+m_xFrameWindow->ImplGetFrame()->NotifyModalHierarchy(true);
 ++m_nModalDepth;
-m_xFrameWindow->ImplGetFrame()->NotifyModalHierarchy(true);
 }
 }
 
@@ -2994,7 +3015,8 @@ struct DialogRunner
 {
 m_xFrameWindow->DecModalCount();
 --m_nModalDepth;
-m_xFrameWindow->ImplGetFrame()->NotifyModalHierarchy(false);
+if (m_nModalDepth == 0)
+m_xFrameWindow->ImplGetFrame()->NotifyModalHierarchy(false);
 }
 }
 
@@ -3

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-09-23 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |   18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)

New commits:
commit 5cc194d452c8e52ebd7f5132912e97eabdb07595
Author: Caolán McNamara 
AuthorDate: Thu Sep 19 20:43:27 2019 +0100
Commit: Michael Stahl 
CommitDate: Mon Sep 23 11:57:27 2019 +0200

Resolves: tdf#127646 remove undispatched events in dtor

Change-Id: I8d18b0b667a905131fd0edee1f73ebab144e6307
Reviewed-on: https://gerrit.libreoffice.org/79257
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 0a2cb9d011b2..05f0a341b9fd 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -6453,19 +6453,27 @@ private:
 gulong m_nPopupMenuSignalId;
 gulong m_nDragBeginSignalId;
 gulong m_nDragEndSignalId;
+ImplSVEvent* m_pChangeEvent;
 
 DECL_LINK(async_signal_changed, void*, void);
 
-static void signalChanged(GtkTreeView*, gpointer widget)
+void launch_signal_changed()
 {
-GtkInstanceTreeView* pThis = static_cast(widget);
 //tdf#117991 selection change is sent before the focus change, and 
focus change
 //is what will cause a spinbutton that currently has the focus to set 
its contents
 //as the spin button value. So any LibreOffice callbacks on
 //signal-change would happen before the spinbutton value-change occurs.
 //To avoid this, send the signal-change to LibreOffice to occur after 
focus-change
 //has been processed
-Application::PostUserEvent(LINK(pThis, GtkInstanceTreeView, 
async_signal_changed));
+if (m_pChangeEvent)
+Application::RemoveUserEvent(m_pChangeEvent);
+m_pChangeEvent = Application::PostUserEvent(LINK(this, 
GtkInstanceTreeView, async_signal_changed));
+}
+
+static void signalChanged(GtkTreeView*, gpointer widget)
+{
+GtkInstanceTreeView* pThis = static_cast(widget);
+pThis->launch_signal_changed();
 }
 
 static void signalRowActivated(GtkTreeView*, GtkTreePath*, 
GtkTreeViewColumn*, gpointer widget)
@@ -6829,6 +6837,7 @@ public:
 , m_nPopupMenuSignalId(g_signal_connect(pTreeView, "popup-menu", 
G_CALLBACK(signalPopupMenu), this))
 , m_nDragBeginSignalId(g_signal_connect(pTreeView, "drag-begin", 
G_CALLBACK(signalDragBegin), this))
 , m_nDragEndSignalId(g_signal_connect(pTreeView, "drag-end", 
G_CALLBACK(signalDragEnd), this))
+, m_pChangeEvent(nullptr)
 {
 m_pColumns = gtk_tree_view_get_columns(m_pTreeView);
 int nIndex(0);
@@ -8155,6 +8164,8 @@ public:
 
 virtual ~GtkInstanceTreeView() override
 {
+if (m_pChangeEvent)
+Application::RemoveUserEvent(m_pChangeEvent);
 g_signal_handler_disconnect(m_pTreeView, m_nDragEndSignalId);
 g_signal_handler_disconnect(m_pTreeView, m_nDragBeginSignalId);
 g_signal_handler_disconnect(m_pTreeView, m_nPopupMenuSignalId);
@@ -8184,6 +8195,7 @@ public:
 
 IMPL_LINK_NOARG(GtkInstanceTreeView, async_signal_changed, void*, void)
 {
+m_pChangeEvent = nullptr;
 signal_changed();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-09-17 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkframe.cxx |   87 +-
 1 file changed, 45 insertions(+), 42 deletions(-)

New commits:
commit 16a99aaeba40f1fb8b576ca81852a88b37d8e1b3
Author: Caolán McNamara 
AuthorDate: Fri Sep 13 15:37:33 2019 +0100
Commit: Michael Stahl 
CommitDate: Tue Sep 17 11:54:52 2019 +0200

rework IM underline impl wrt mix of UTF-8/16/32 units

e.g. ctrl+shift+e type boy then space twice in writer. The UTF-32 units
are 0x65 0x1f466 0x1f3fb. The underline should encompass the whole range,
prior to this the trailing Emoji Modifier Fitzpatrick was separated from
the boy base emoji by an incomplete underline

Change-Id: I2e846e8eeedf96f341ed7f50d504883768e9eff0
Reviewed-on: https://gerrit.libreoffice.org/78896
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 742e0097def7..43ff3835c0cb 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -3970,34 +3970,59 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( 
GtkIMContext*, gpointer im_
 pThis->m_bPreeditJustChanged = true;
 
 bool bEndPreedit = (!pText || !*pText) && pThis->m_aInputEvent.mpTextAttr 
!= nullptr;
-pThis->m_aInputEvent.maText = pText ? OUString( pText, 
strlen(pText), RTL_TEXTENCODING_UTF8 ) : OUString();
-pThis->m_aInputEvent.mnCursorPos= nCursorPos;
-pThis->m_aInputEvent.mnCursorFlags  = 0;
+gint nUtf8Len = pText ? strlen(pText) : 0;
+pThis->m_aInputEvent.maText = pText ? OUString(pText, 
nUtf8Len, RTL_TEXTENCODING_UTF8) : OUString();
+const OUString& rText = pThis->m_aInputEvent.maText;
 
-pThis->m_aInputFlags = std::vector( std::max( 1, 
static_cast(pThis->m_aInputEvent.maText.getLength()) ), 
ExtTextInputAttr::NONE );
+std::vector aUtf16Offsets;
+for (sal_Int32 nUtf16Offset = 0; nUtf16Offset < rText.getLength(); 
rText.iterateCodePoints(&nUtf16Offset))
+aUtf16Offsets.push_back(nUtf16Offset);
+
+sal_Int32 nUtf32Len = aUtf16Offsets.size();
+aUtf16Offsets.push_back(rText.getLength());
+
+// sanitize the CurPos which is in utf-32
+if (nCursorPos < 0)
+nCursorPos = 0;
+else if (nCursorPos > nUtf32Len)
+nCursorPos = nUtf32Len;
+
+pThis->m_aInputEvent.mnCursorPos = aUtf16Offsets[nCursorPos];
+pThis->m_aInputEvent.mnCursorFlags = 0;
+
+pThis->m_aInputFlags = std::vector( std::max( 1, 
static_cast(rText.getLength()) ), ExtTextInputAttr::NONE );
 
 PangoAttrIterator *iter = pango_attr_list_get_iterator(pAttrs);
 do
 {
 GSList *attr_list = nullptr;
 GSList *tmp_list = nullptr;
-gint start, end;
+gint nUtf8Start, nUtf8End;
 ExtTextInputAttr sal_attr = ExtTextInputAttr::NONE;
 
-pango_attr_iterator_range (iter, &start, &end);
-if (start == G_MAXINT || end == G_MAXINT)
-{
-auto len = pText ? g_utf8_strlen(pText, -1) : 0;
-if (end == G_MAXINT)
-end = len;
-if (start == G_MAXINT)
-start = len;
-}
-if (end == start)
+// docs say... "Get the range of the current segment ... the stored
+// return values are signed, not unsigned like the values in
+// PangoAttribute", which implies that the units are otherwise the same
+// as that of PangoAttribute whose docs state these units are "in
+// bytes"
+// so this is the utf8 range
+pango_attr_iterator_range(iter, &nUtf8Start, &nUtf8End);
+
+// sanitize the utf8 range
+nUtf8Start = std::min(nUtf8Start, nUtf8Len);
+nUtf8End = std::min(nUtf8End, nUtf8Len);
+if (nUtf8Start >= nUtf8End)
 continue;
 
-start = g_utf8_pointer_to_offset (pText, pText + start);
-end = g_utf8_pointer_to_offset (pText, pText + end);
+// get the utf32 range
+sal_Int32 nUtf32Start = g_utf8_pointer_to_offset(pText, pText + 
nUtf8Start);
+sal_Int32 nUtf32End = g_utf8_pointer_to_offset(pText, pText + 
nUtf8End);
+
+// sanitize the utf32 range
+nUtf32Start = std::min(nUtf32Start, nUtf32Len);
+nUtf32End = std::min(nUtf32End, nUtf32Len);
+if (nUtf32Start >= nUtf32End)
+continue;
 
 tmp_list = attr_list = pango_attr_iterator_get_attrs (iter);
 while (tmp_list)
@@ -4026,35 +4051,13 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( 
GtkIMContext*, gpointer im_
 sal_attr |= ExtTextInputAttr::Underline;
 g_slist_free (attr_list);
 
-// rhbz#1648281 make underline work with the UCS-4 positions we're 
given
-if (!pThis->m_aInputEvent.maText.isEmpty())
-{
-sal_Int32 i(0), nLen = pThis->m_aInputEvent.maText.getLength();
-
-sal_Int32 nUTF16Start(0);
-while (i < start && nUTF16Start < nLen)
- 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-09-13 Thread Tomáš Chvátal (via logerrit)
 vcl/unx/generic/fontmanager/fontconfig.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 30312e66acb030b24fa4cf327a96fe19c5c571f7
Author: Tomáš Chvátal 
AuthorDate: Wed Sep 11 09:58:43 2019 +0200
Commit: Caolán McNamara 
CommitDate: Fri Sep 13 09:38:10 2019 +0200

Check for EMOJI content only on ICU 57 and newer

The older ICU does not have the logic to work with there as it is
feature of the new icu only:
  http://bugs.icu-project.org/trac/ticket/11802

Change-Id: Icd21be1e20b7cb988e94d107406a4f81d00116a7
Reviewed-on: https://gerrit.libreoffice.org/78812
Reviewed-by: Tomáš Chvátal 
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx 
b/vcl/unx/generic/fontmanager/fontconfig.cxx
index c7bfbb47e9bd..a36dfc868329 100644
--- a/vcl/unx/generic/fontmanager/fontconfig.cxx
+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx
@@ -798,7 +798,11 @@ namespace
 
 bool isEmoji(sal_uInt32 nCurrentChar)
 {
+#if U_ICU_VERSION_MAJOR_NUM >= 57
 return u_hasBinaryProperty(nCurrentChar, UCHAR_EMOJI);
+#else
+   return false;
+#endif
 }
 
 //returns true if the given code-point couldn't possibly be in rLangTag.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-09-06 Thread Caolán McNamara (via logerrit)
 vcl/unx/generic/fontmanager/fontconfig.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit bd216254af4bb695afbd1e957d02a2a162a08106
Author: Caolán McNamara 
AuthorDate: Wed Sep 4 14:52:31 2019 +0100
Commit: Michael Stahl 
CommitDate: Fri Sep 6 11:01:05 2019 +0200

Related: rhbz#1648281 improve fontconfig fallback for emojis

disregard text language for emoji and tag with und-zsye to
get fontconfig to give us the default emoji font

Change-Id: I8f94b0c41dea3204c9db77b96ad8f0d98bae2239
Reviewed-on: https://gerrit.libreoffice.org/78609
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx 
b/vcl/unx/generic/fontmanager/fontconfig.cxx
index 8e3e9163d1ce..c7bfbb47e9bd 100644
--- a/vcl/unx/generic/fontmanager/fontconfig.cxx
+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx
@@ -796,6 +796,11 @@ namespace
 #endif
 }
 
+bool isEmoji(sal_uInt32 nCurrentChar)
+{
+return u_hasBinaryProperty(nCurrentChar, UCHAR_EMOJI);
+}
+
 //returns true if the given code-point couldn't possibly be in rLangTag.
 bool isImpossibleCodePointForLang(const LanguageTag &rLangTag, sal_uInt32 
currentChar)
 {
@@ -844,6 +849,8 @@ namespace
 
 OUString getExemplarLangTagForCodePoint(sal_uInt32 currentChar)
 {
+if (isEmoji(currentChar))
+return "und-zsye";
 int32_t script = u_getIntPropertyValue(currentChar, UCHAR_SCRIPT);
 UScriptCode eScript = static_cast(script);
 OStringBuffer 
aBuf(unicode::getExemplarLanguageForUScriptCode(eScript));
@@ -902,7 +909,7 @@ void PrintFontManager::Substitute(FontSelectPattern 
&rPattern, OUString& rMissin
 FcCharSetAddChar( codePoints, nCode );
 //if the codepoint is impossible for this lang tag, then clear it
 //and autodetect something useful
-if (!aLangAttrib.isEmpty() && 
isImpossibleCodePointForLang(aLangTag, nCode))
+if (!aLangAttrib.isEmpty() && 
(isImpossibleCodePointForLang(aLangTag, nCode) || isEmoji(nCode)))
 aLangAttrib.clear();
 //#i105784#/rhbz#527719  improve selection of fallback font
 if (aLangAttrib.isEmpty())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-09-05 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkframe.cxx |   23 +++
 1 file changed, 23 insertions(+)

New commits:
commit add68a1a3f5466ecf567df79119a1cade4058401
Author: Caolán McNamara 
AuthorDate: Wed Sep 4 19:57:26 2019 +0100
Commit: Michael Stahl 
CommitDate: Thu Sep 5 11:09:20 2019 +0200

ctrl+shift+e emoji ibus engine problems converting UCS-4 positions to UTF-16

e.g. ctrl+shift+e type rabbit then space in writer and the len of underline
is 2 which should encompass the displayed e + 2 UTF-16 units

Change-Id: I424db7dd6cbcc5845922ac17208fed643e672dbd
Reviewed-on: https://gerrit.libreoffice.org/78616
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 994fb356eb53..742e0097def7 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -4026,6 +4026,29 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( 
GtkIMContext*, gpointer im_
 sal_attr |= ExtTextInputAttr::Underline;
 g_slist_free (attr_list);
 
+// rhbz#1648281 make underline work with the UCS-4 positions we're 
given
+if (!pThis->m_aInputEvent.maText.isEmpty())
+{
+sal_Int32 i(0), nLen = pThis->m_aInputEvent.maText.getLength();
+
+sal_Int32 nUTF16Start(0);
+while (i < start && nUTF16Start < nLen)
+{
+pThis->m_aInputEvent.maText.iterateCodePoints(&nUTF16Start);
+++i;
+}
+
+sal_Int32 nUTF16End(nUTF16Start);
+while (i < end && nUTF16End < nLen)
+{
+pThis->m_aInputEvent.maText.iterateCodePoints(&nUTF16End);
+++i;
+}
+
+start = nUTF16Start;
+end = nUTF16End;
+}
+
 // Set the sal attributes on our text
 for (int i = start; i < end; ++i)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-08-29 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |   17 -
 1 file changed, 16 insertions(+), 1 deletion(-)

New commits:
commit b29764bab932d1a5a2912c87342b743968360206
Author: Caolán McNamara 
AuthorDate: Mon Aug 19 16:36:51 2019 +0100
Commit: Miklos Vajna 
CommitDate: Thu Aug 29 09:40:55 2019 +0200

Resolves: tdf#127029 keep spinbuttons blank if explicit set_text("")

and the value isn't changed by the user

Change-Id: Ib45360c0a1b057c4a31fe399aada143d758615d1
Reviewed-on: https://gerrit.libreoffice.org/77744
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index ded420efe39d..b044152e9355 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -8198,11 +8198,13 @@ private:
 gulong m_nInputSignalId;
 bool m_bFormatting;
 bool m_bBlockOutput;
+bool m_bBlank;
 
 static void signalValueChanged(GtkSpinButton*, gpointer widget)
 {
 GtkInstanceSpinButton* pThis = 
static_cast(widget);
 SolarMutexGuard aGuard;
+pThis->m_bBlank = false;
 pThis->signal_value_changed();
 }
 
@@ -8258,6 +8260,7 @@ public:
 , m_nInputSignalId(g_signal_connect(pButton, "input", 
G_CALLBACK(signalInput), this))
 , m_bFormatting(false)
 , m_bBlockOutput(false)
+, m_bBlank(false)
 {
 }
 
@@ -8269,6 +8272,7 @@ public:
 virtual void set_value(int value) override
 {
 disable_notify_events();
+m_bBlank = false;
 gtk_spin_button_set_value(m_pButton, toGtk(value));
 enable_notify_events();
 }
@@ -8276,16 +8280,27 @@ public:
 virtual void set_text(const OUString& rText) override
 {
 disable_notify_events();
-gtk_entry_set_text(GTK_ENTRY(m_pButton), OUStringToOString(rText, 
RTL_TEXTENCODING_UTF8).getStr());
 // tdf#122786 if we're just formatting a value, then we're done,
 // however if set_text has been called directly we want to update our
 // value from this new text, but don't want to reformat with that value
 if (!m_bFormatting)
 {
+gtk_entry_set_text(GTK_ENTRY(m_pButton), OUStringToOString(rText, 
RTL_TEXTENCODING_UTF8).getStr());
+
 m_bBlockOutput = true;
 gtk_spin_button_update(m_pButton);
+m_bBlank = rText.isEmpty();
 m_bBlockOutput = false;
 }
+else
+{
+bool bKeepBlank = m_bBlank && get_value() == 0;
+if (!bKeepBlank)
+{
+gtk_entry_set_text(GTK_ENTRY(m_pButton), 
OUStringToOString(rText, RTL_TEXTENCODING_UTF8).getStr());
+m_bBlank = false;
+}
+}
 enable_notify_events();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-08-28 Thread Caolán McNamara (via logerrit)
 vcl/unx/generic/printer/cupsmgr.cxx |   12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit eacbfea0e97be9f0897f102518d97368bb51256c
Author: Caolán McNamara 
AuthorDate: Sat Aug 17 17:15:40 2019 +0100
Commit: Michael Stahl 
CommitDate: Wed Aug 28 18:33:34 2019 +0200

Related: rhbz#1691287 fill in default domain and username

and grab focus to first entry entry

Change-Id: Icb50766948c77072eaab9faf89436c6ecbb49ecc
Reviewed-on: https://gerrit.libreoffice.org/77676
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/vcl/unx/generic/printer/cupsmgr.cxx 
b/vcl/unx/generic/printer/cupsmgr.cxx
index 503ca6c4b224..3c910f3b39df 100644
--- a/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
@@ -717,7 +717,14 @@ namespace
 OUString aText(m_xText->get_label());
 aText = aText.replaceFirst("%s", OStringToOUString(rServer, 
osl_getThreadTextEncoding()));
 m_xText->set_label(aText);
-m_xUserEdit->set_text(OStringToOUString(rUserName, 
osl_getThreadTextEncoding()));
+m_xDomainEdit->set_text("WORKGROUP");
+if (rUserName.isEmpty())
+m_xUserEdit->grab_focus();
+else
+{
+m_xUserEdit->set_text(OStringToOUString(rUserName, 
osl_getThreadTextEncoding()));
+m_xPassEdit->grab_focus();
+}
 }
 
 bool AuthenticateQuery(const OString& rServer, OString& rUserName, 
OString& rPassword)
@@ -785,8 +792,9 @@ bool CUPSManager::endSpool( const OUString& rPrintername, 
const OUString& rJobTi
 if (bDomain || bUser || bPass)
 {
 OString sPrinterName(OUStringToOString(rPrintername, 
RTL_TEXTENCODING_UTF8));
+OString sUser = cupsUser();
 vcl::Window* pWin = Application::GetDefDialogParent();
-RTSPWDialog aDialog(pWin ? pWin->GetFrameWeld() : nullptr, 
sPrinterName, "");
+RTSPWDialog aDialog(pWin ? pWin->GetFrameWeld() : nullptr, 
sPrinterName, sUser);
 aDialog.SetDomainVisible(bDomain);
 aDialog.SetUserVisible(bUser);
 aDialog.SetPassVisible(bPass);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-08-20 Thread Noel Grandin (via logerrit)
 vcl/unx/gtk/gtksalmenu.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 97fefe2e0870c7e62d39ba1e82e1c276c8f64ced
Author: Noel Grandin 
AuthorDate: Mon Aug 19 10:35:44 2019 +0200
Commit: Xisco Faulí 
CommitDate: Tue Aug 20 11:44:48 2019 +0200

tdf#126830 Icons not showing in menus

regression from
commit 9eae42ce01cb289b9e736454abcf835b8394
Date:   Sun Apr 28 09:54:42 2019 +0200
speed up gtk menu construction at startup

Change-Id: I12327c0c62aa283c8b04a03933704082fd13463a
Reviewed-on: https://gerrit.libreoffice.org/77702
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 35b41150e84940e87b9d961b6b402e3e060d6b8b)
Reviewed-on: https://gerrit.libreoffice.org/77783
Reviewed-by: Xisco Faulí 

diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx
index 0d149bf4b30c..8dbd8817b1ff 100644
--- a/vcl/unx/gtk/gtksalmenu.cxx
+++ b/vcl/unx/gtk/gtksalmenu.cxx
@@ -1063,7 +1063,7 @@ namespace
 void GtkSalMenu::NativeSetItemIcon( unsigned nSection, unsigned nItemPos, 
const Image& rImage )
 {
 #if GLIB_CHECK_VERSION(2,38,0)
-if (!!rImage && mbHasNullItemIcon)
+if (!rImage && mbHasNullItemIcon)
 return;
 
 SolarMutexGuard aGuard;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-08-14 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |   18 ++
 1 file changed, 18 insertions(+)

New commits:
commit afe2e8d7323d2be6388056400ee053d401d36888
Author: Caolán McNamara 
AuthorDate: Tue Aug 13 12:43:35 2019 +0100
Commit: Xisco Faulí 
CommitDate: Wed Aug 14 12:52:46 2019 +0200

Resolves: tdf#126844 focus in to combobox with entries not seen in parent

there isn't a focus-in on the combobox, only the entry. So use
entry focus-in as focus-in (we already do this for the combobox dropdown)

Change-Id: I09cf6eb896acbbea5aed2d3b2aa238593ddcb793
Reviewed-on: https://gerrit.libreoffice.org/77410
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 384011f8c191..507ec779312b 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -9044,6 +9044,7 @@ private:
 gulong m_nKeyPressEventSignalId;
 gulong m_nEntryInsertTextSignalId;
 gulong m_nEntryActivateSignalId;
+gulong m_nEntryFocusInSignalId;
 gulong m_nEntryFocusOutSignalId;
 guint m_nAutoCompleteIdleId;
 
@@ -9166,6 +9167,17 @@ private:
 }
 }
 
+static void signalEntryFocusIn(GtkWidget*, GdkEvent*, gpointer widget)
+{
+GtkInstanceComboBox* pThis = static_cast(widget);
+pThis->signal_entry_focus_in();
+}
+
+void signal_entry_focus_in()
+{
+signal_focus_in();
+}
+
 static void signalEntryFocusOut(GtkWidget*, GdkEvent*, gpointer widget)
 {
 GtkInstanceComboBox* pThis = static_cast(widget);
@@ -9183,6 +9195,7 @@ private:
 if (nMin != 0 || nMax != get_active_text().getLength())
 select_entry_region(0, 0);
 }
+signal_focus_out();
 }
 
 static void signalEntryActivate(GtkEntry*, gpointer widget)
@@ -9469,6 +9482,7 @@ public:
 m_bAutoComplete = true;
 m_nEntryInsertTextSignalId = g_signal_connect(pEntry, 
"insert-text", G_CALLBACK(signalEntryInsertText), this);
 m_nEntryActivateSignalId = g_signal_connect(pEntry, "activate", 
G_CALLBACK(signalEntryActivate), this);
+m_nEntryFocusInSignalId = g_signal_connect(pEntry, 
"focus-in-event", G_CALLBACK(signalEntryFocusIn), this);
 m_nEntryFocusOutSignalId = g_signal_connect(pEntry, 
"focus-out-event", G_CALLBACK(signalEntryFocusOut), this);
 m_nKeyPressEventSignalId = 0;
 }
@@ -9476,6 +9490,7 @@ public:
 {
 m_nEntryInsertTextSignalId = 0;
 m_nEntryActivateSignalId = 0;
+m_nEntryFocusInSignalId = 0;
 m_nEntryFocusOutSignalId = 0;
 m_nKeyPressEventSignalId = g_signal_connect(m_pWidget, 
"key-press-event", G_CALLBACK(signalKeyPress), this);
 }
@@ -9767,6 +9782,7 @@ public:
 {
 g_signal_handler_block(pEntry, m_nEntryInsertTextSignalId);
 g_signal_handler_block(pEntry, m_nEntryActivateSignalId);
+g_signal_handler_block(pEntry, m_nEntryFocusInSignalId);
 g_signal_handler_block(pEntry, m_nEntryFocusOutSignalId);
 }
 else
@@ -9792,6 +9808,7 @@ public:
 if (GtkEntry* pEntry = get_entry())
 {
 g_signal_handler_unblock(pEntry, m_nEntryActivateSignalId);
+g_signal_handler_unblock(pEntry, m_nEntryFocusInSignalId);
 g_signal_handler_unblock(pEntry, m_nEntryFocusOutSignalId);
 g_signal_handler_unblock(pEntry, m_nEntryInsertTextSignalId);
 }
@@ -9860,6 +9877,7 @@ public:
 {
 g_signal_handler_disconnect(pEntry, m_nEntryInsertTextSignalId);
 g_signal_handler_disconnect(pEntry, m_nEntryActivateSignalId);
+g_signal_handler_disconnect(pEntry, m_nEntryFocusInSignalId);
 g_signal_handler_disconnect(pEntry, m_nEntryFocusOutSignalId);
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-06-27 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 876580c3f99e12239018e5c60571a989314d7b6a
Author: Caolán McNamara 
AuthorDate: Thu Jun 27 12:17:37 2019 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jun 27 16:33:21 2019 +0200

protect against never gettting a size set

Change-Id: Ie7f40abaa5893bee46d64b85404ee733c0c11f85
Reviewed-on: https://gerrit.libreoffice.org/74799
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 4ea1c172178a..384011f8c191 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -8813,7 +8813,7 @@ private:
 void signal_draw(cairo_t* cr)
 {
 GdkRectangle rect;
-if (!gdk_cairo_get_clip_rectangle(cr, &rect))
+if (!m_pSurface || !gdk_cairo_get_clip_rectangle(cr, &rect))
 return;
 tools::Rectangle aRect(Point(rect.x, rect.y), Size(rect.width, 
rect.height));
 aRect = m_xDevice->PixelToLogic(aRect);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-06-27 Thread Noel Grandin (via logerrit)
 vcl/unx/generic/fontmanager/fontsubst.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 73f0c21801a3b549236edb04f6e9c4f92e2b8e4e
Author: Noel Grandin 
AuthorDate: Wed Jun 26 11:48:27 2019 +0200
Commit: Xisco Faulí 
CommitDate: Thu Jun 27 13:08:50 2019 +0200

tdf#97925 writer, slow scrolling large RTF document

this document appears to have just enough fallback fonts on each page to
make the cache useless, so just bump up the size of the cache
considerably, since the cache key/values are really small

Change-Id: I4983de92f66410fee3f04e1e126b2ddb4ec2cbf9
Reviewed-on: https://gerrit.libreoffice.org/74735
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 573d3bbb7e836216dae6f684f4de77d0e46c50e3)
Reviewed-on: https://gerrit.libreoffice.org/74788
Reviewed-by: Xisco Faulí 

diff --git a/vcl/unx/generic/fontmanager/fontsubst.cxx 
b/vcl/unx/generic/fontmanager/fontsubst.cxx
index 034f77bc7be5..3bc44314115d 100644
--- a/vcl/unx/generic/fontmanager/fontsubst.cxx
+++ b/vcl/unx/generic/fontmanager/fontsubst.cxx
@@ -145,9 +145,10 @@ bool 
FcPreMatchSubstitution::FindFontSubstitute(FontSelectPattern &rFontSelData)
 if( bHaveSubstitute )
 {
 rCachedFontMap.push_front(value_type(rFontSelData, aOut));
-//fairly arbitrary limit in this case, but I recall measuring max 8
-//fonts as the typical max amount of fonts in medium sized documents
-if (rCachedFontMap.size() > 8)
+// Fairly arbitrary limit in this case, but I recall measuring max 8
+// fonts as the typical max amount of fonts in medium sized documents, 
so make it
+// a fair chunk larger to accomodate weird documents./
+if (rCachedFontMap.size() > 256)
 rCachedFontMap.pop_back();
 rFontSelData = aOut;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-06-27 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 5fe6c3b432ceb79de49ca2ac5caae0b9f7e9bffd
Author: Caolán McNamara 
AuthorDate: Wed Jun 26 21:00:02 2019 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jun 27 09:58:18 2019 +0200

infinite focus changing in toc biblio page

Change-Id: Ic2e36b8921d329d6f9cd2eb68524ed111f6fda75
Reviewed-on: https://gerrit.libreoffice.org/74755
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index caa1510af7e6..4ea1c172178a 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1667,7 +1667,9 @@ public:
 
 virtual void grab_focus() override
 {
+disable_notify_events();
 gtk_widget_grab_focus(m_pWidget);
+enable_notify_events();
 }
 
 virtual bool has_focus() const override
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-06-13 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 7adfdb8132b0a944cb67d4e465cb61e487b59a67
Author: Caolán McNamara 
AuthorDate: Wed Jun 12 09:56:24 2019 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jun 13 09:58:48 2019 +0200

setting cursor needs widget to be realized

Change-Id: I56b1bb83dc221c87ec7aac72b406d67c85f74f43
Reviewed-on: https://gerrit.libreoffice.org/73881
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index aafdf7e425d8..ec1f6d4e28bd 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -8823,6 +8823,8 @@ public:
 virtual void set_cursor(PointerStyle ePointerStyle) override
 {
 GdkCursor *pCursor = 
GtkSalFrame::getDisplay()->getCursor(ePointerStyle);
+if (!gtk_widget_get_realized(GTK_WIDGET(m_pDrawingArea)))
+gtk_widget_realize(GTK_WIDGET(m_pDrawingArea));
 
gdk_window_set_cursor(gtk_widget_get_window(GTK_WIDGET(m_pDrawingArea)), 
pCursor);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

2019-06-13 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 276f08d2753b294340fe6b65163aff93715b8016
Author: Caolán McNamara 
AuthorDate: Wed Jun 12 21:28:24 2019 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jun 13 09:55:02 2019 +0200

menu_item...with_label -> menu_item...with_mnemonic

Change-Id: I9d5165a486e8806f41122e72803000ab3e7b3b46
Reviewed-on: https://gerrit.libreoffice.org/73913
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index eb1511d5f53a..ddc23b5c2054 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -2447,8 +2447,8 @@ public:
 }
 else
 {
-pItem = bCheck ? 
gtk_check_menu_item_new_with_label(MapToGtkAccelerator(rStr).getStr())
-   : 
gtk_menu_item_new_with_label(MapToGtkAccelerator(rStr).getStr());
+pItem = bCheck ? 
gtk_check_menu_item_new_with_mnemonic(MapToGtkAccelerator(rStr).getStr())
+   : 
gtk_menu_item_new_with_mnemonic(MapToGtkAccelerator(rStr).getStr());
 }
 gtk_buildable_set_name(GTK_BUILDABLE(pItem), OUStringToOString(rId, 
RTL_TEXTENCODING_UTF8).getStr());
 gtk_menu_shell_append(GTK_MENU_SHELL(m_pMenu), pItem);
@@ -5488,8 +5488,8 @@ public:
 }
 else
 {
-pItem = bCheck ? 
gtk_check_menu_item_new_with_label(MapToGtkAccelerator(rStr).getStr())
-   : 
gtk_menu_item_new_with_label(MapToGtkAccelerator(rStr).getStr());
+pItem = bCheck ? 
gtk_check_menu_item_new_with_mnemonic(MapToGtkAccelerator(rStr).getStr())
+   : 
gtk_menu_item_new_with_mnemonic(MapToGtkAccelerator(rStr).getStr());
 }
 gtk_buildable_set_name(GTK_BUILDABLE(pItem), OUStringToOString(rId, 
RTL_TEXTENCODING_UTF8).getStr());
 gtk_menu_shell_append(GTK_MENU_SHELL(m_pMenu), pItem);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits