parent
b1e073e624
commit
84d23d6932
@ -1,56 +0,0 @@
|
|||||||
From 872c5e0c807ae248387ee425615e4c8080d01221 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jaskaran Singh <jvsg1303@gmail.com>
|
|
||||||
Date: Thu, 28 Jul 2016 14:00:46 +0530
|
|
||||||
Subject: [PATCH] Add odf strikeout to orcus interface
|
|
||||||
|
|
||||||
Change-Id: Ibf8d1e7b0272fe4112fda0249eafef1aa5438d9a
|
|
||||||
---
|
|
||||||
sc/source/filter/inc/orcusinterface.hxx | 7 +++
|
|
||||||
sc/source/filter/orcus/interface.cxx | 88 +++++++++++++++++++++++++++++----
|
|
||||||
2 files changed, 85 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
|
|
||||||
index 9754ea4..9afc218 100644
|
|
||||||
--- a/sc/source/filter/inc/orcusinterface.hxx
|
|
||||||
+++ b/sc/source/filter/inc/orcusinterface.hxx
|
|
||||||
@@ -390,6 +393,10 @@ public:
|
|
||||||
orcus::spreadsheet::color_elem_t red,
|
|
||||||
orcus::spreadsheet::color_elem_t green,
|
|
||||||
orcus::spreadsheet::color_elem_t blue) override;
|
|
||||||
+ virtual void set_strikethrough_style(orcus::spreadsheet::strikethrough_style_t s) override;
|
|
||||||
+ virtual void set_strikethrough_type(orcus::spreadsheet::strikethrough_type_t s) override;
|
|
||||||
+ virtual void set_strikethrough_width(orcus::spreadsheet::strikethrough_width_t s) override;
|
|
||||||
+ virtual void set_strikethrough_text(orcus::spreadsheet::strikethrough_text_t s) override;
|
|
||||||
virtual size_t commit_font() override;
|
|
||||||
|
|
||||||
// fill
|
|
||||||
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
|
|
||||||
index 1be81262..5f30120 100644
|
|
||||||
--- a/sc/source/filter/orcus/interface.cxx
|
|
||||||
+++ b/sc/source/filter/orcus/interface.cxx
|
|
||||||
@@ -1141,6 +1149,22 @@ void ScOrcusStyles::set_font_color(orcus::spreadsheet::color_elem_t alpha,
|
|
||||||
maCurrentFont.maColor = Color(alpha, red, green, blue);
|
|
||||||
}
|
|
||||||
|
|
||||||
+void ScOrcusStyles::set_strikethrough_style(orcus::spreadsheet::strikethrough_style_t /*s*/)
|
|
||||||
+{
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void ScOrcusStyles::set_strikethrough_type(orcus::spreadsheet::strikethrough_type_t /*s*/)
|
|
||||||
+{
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void ScOrcusStyles::set_strikethrough_width(orcus::spreadsheet::strikethrough_width_t /*s*/)
|
|
||||||
+{
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void ScOrcusStyles::set_strikethrough_text(orcus::spreadsheet::strikethrough_text_t /*s*/)
|
|
||||||
+{
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
size_t ScOrcusStyles::commit_font()
|
|
||||||
{
|
|
||||||
SAL_INFO("sc.orcus.style", "commit font");
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
@ -1,110 +0,0 @@
|
|||||||
From 5a2b92977df1ce28f99b1a391fdfd3a37bd727f9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jaskaran Singh <jvsg1303@gmail.com>
|
|
||||||
Date: Sun, 26 Jun 2016 13:13:42 +0530
|
|
||||||
Subject: [PATCH] Declare font, border, protection orcus interface methods
|
|
||||||
|
|
||||||
Change-Id: I486d861ba3c2c763964cdc3af2312661ef1a533d
|
|
||||||
---
|
|
||||||
sc/source/filter/inc/orcusinterface.hxx | 10 +++++++++
|
|
||||||
sc/source/filter/orcus/interface.cxx | 38 +++++++++++++++++++++++++++++++++
|
|
||||||
2 files changed, 48 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
|
|
||||||
index 3046b44..521b388 100644
|
|
||||||
--- a/sc/source/filter/inc/orcusinterface.hxx
|
|
||||||
+++ b/sc/source/filter/inc/orcusinterface.hxx
|
|
||||||
@@ -357,6 +357,13 @@ public:
|
|
||||||
virtual void set_font_name(const char* s, size_t n) override;
|
|
||||||
virtual void set_font_size(double point) override;
|
|
||||||
virtual void set_font_underline(orcus::spreadsheet::underline_t e) override;
|
|
||||||
+ virtual void set_font_underline_width(orcus::spreadsheet::underline_width_t e) override;
|
|
||||||
+ virtual void set_font_underline_mode(orcus::spreadsheet::underline_mode_t e) override;
|
|
||||||
+ virtual void set_font_underline_type(orcus::spreadsheet::underline_type_t e) override;
|
|
||||||
+ virtual void set_font_underline_color(orcus::spreadsheet::color_elem_t alpha,
|
|
||||||
+ orcus::spreadsheet::color_elem_t red,
|
|
||||||
+ orcus::spreadsheet::color_elem_t green,
|
|
||||||
+ orcus::spreadsheet::color_elem_t blue) override;
|
|
||||||
virtual void set_font_color( orcus::spreadsheet::color_elem_t alpha,
|
|
||||||
orcus::spreadsheet::color_elem_t red,
|
|
||||||
orcus::spreadsheet::color_elem_t green,
|
|
||||||
@@ -381,11 +388,14 @@ public:
|
|
||||||
orcus::spreadsheet::color_elem_t red,
|
|
||||||
orcus::spreadsheet::color_elem_t green,
|
|
||||||
orcus::spreadsheet::color_elem_t blue) override;
|
|
||||||
+ virtual void set_border_width(orcus::spreadsheet::border_direction_t dir, orcus::length_t width) override;
|
|
||||||
virtual size_t commit_border() override;
|
|
||||||
|
|
||||||
// cell protection
|
|
||||||
virtual void set_cell_hidden(bool b) override;
|
|
||||||
virtual void set_cell_locked(bool b) override;
|
|
||||||
+ virtual void set_cell_print_content(bool b) override;
|
|
||||||
+ virtual void set_cell_formula_hidden(bool b) override;
|
|
||||||
virtual size_t commit_cell_protection() override;
|
|
||||||
|
|
||||||
// number format
|
|
||||||
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
|
|
||||||
index e8a2dba..dbeb6aa 100644
|
|
||||||
--- a/sc/source/filter/orcus/interface.cxx
|
|
||||||
+++ b/sc/source/filter/orcus/interface.cxx
|
|
||||||
@@ -961,6 +961,29 @@ void ScOrcusStyles::set_font_underline(orcus::spreadsheet::underline_t e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+void ScOrcusStyles::set_font_underline_width(orcus::spreadsheet::underline_width_t /* e */)
|
|
||||||
+{
|
|
||||||
+
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void ScOrcusStyles::set_font_underline_mode(orcus::spreadsheet::underline_mode_t /* e */)
|
|
||||||
+{
|
|
||||||
+
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void ScOrcusStyles::set_font_underline_type(orcus::spreadsheet::underline_type_t /* e */)
|
|
||||||
+{
|
|
||||||
+
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void ScOrcusStyles::set_font_underline_color(orcus::spreadsheet::color_elem_t /*alpha*/,
|
|
||||||
+ orcus::spreadsheet::color_elem_t /*red*/,
|
|
||||||
+ orcus::spreadsheet::color_elem_t /*green*/,
|
|
||||||
+ orcus::spreadsheet::color_elem_t /*blue*/)
|
|
||||||
+{
|
|
||||||
+
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void ScOrcusStyles::set_font_color(orcus::spreadsheet::color_elem_t alpha,
|
|
||||||
orcus::spreadsheet::color_elem_t red,
|
|
||||||
orcus::spreadsheet::color_elem_t green,
|
|
||||||
@@ -1035,6 +1058,11 @@ void ScOrcusStyles::set_border_color(orcus::spreadsheet::border_direction_t dir,
|
|
||||||
current_line.maColor = Color(alpha, red, green, blue);
|
|
||||||
}
|
|
||||||
|
|
||||||
+void ScOrcusStyles::set_border_width(orcus::spreadsheet::border_direction_t /* dir */, orcus::length_t /* width */)
|
|
||||||
+{
|
|
||||||
+
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
size_t ScOrcusStyles::commit_border()
|
|
||||||
{
|
|
||||||
SAL_INFO("sc.orcus.style", "commit border");
|
|
||||||
@@ -1054,6 +1082,16 @@ void ScOrcusStyles::set_cell_locked(bool b)
|
|
||||||
maCurrentProtection.mbLocked = b;
|
|
||||||
}
|
|
||||||
|
|
||||||
+void ScOrcusStyles::set_cell_print_content(bool /* b */)
|
|
||||||
+{
|
|
||||||
+
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void ScOrcusStyles::set_cell_formula_hidden(bool /* b */)
|
|
||||||
+{
|
|
||||||
+
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
size_t ScOrcusStyles::commit_cell_protection()
|
|
||||||
{
|
|
||||||
SAL_INFO("sc.orcus.style", "commit cell protection");
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
|||||||
From 933ae1905617a2e2cc177a34a7060a2b26e5827c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jaskaran Singh <jvsg1303@gmail.com>
|
|
||||||
Date: Thu, 28 Jul 2016 15:40:22 +0530
|
|
||||||
Subject: [PATCH] Reform orcus interface to set border width
|
|
||||||
|
|
||||||
Change-Id: Ic93b334205221548e4bd7920551034b1ccee4fa8
|
|
||||||
---
|
|
||||||
sc/source/filter/inc/orcusinterface.hxx | 2 +-
|
|
||||||
sc/source/filter/orcus/interface.cxx | 4 ++--
|
|
||||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
|
|
||||||
index 9afc218..f3520b4 100644
|
|
||||||
--- a/sc/source/filter/inc/orcusinterface.hxx
|
|
||||||
+++ b/sc/source/filter/inc/orcusinterface.hxx
|
|
||||||
@@ -417,7 +417,7 @@ public:
|
|
||||||
orcus::spreadsheet::color_elem_t red,
|
|
||||||
orcus::spreadsheet::color_elem_t green,
|
|
||||||
orcus::spreadsheet::color_elem_t blue) override;
|
|
||||||
- virtual void set_border_width(orcus::spreadsheet::border_direction_t dir, orcus::length_t width) override;
|
|
||||||
+ virtual void set_border_width(orcus::spreadsheet::border_direction_t dir, double val, orcus::length_unit_t unit) override;
|
|
||||||
virtual size_t commit_border() override;
|
|
||||||
|
|
||||||
// cell protection
|
|
||||||
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
|
|
||||||
index 5f30120..ff8c7465 100644
|
|
||||||
--- a/sc/source/filter/orcus/interface.cxx
|
|
||||||
+++ b/sc/source/filter/orcus/interface.cxx
|
|
||||||
@@ -1318,8 +1318,8 @@ void ScOrcusStyles::set_border_color(orcus::spreadsheet::border_direction_t dir,
|
|
||||||
current_line.maColor = Color(alpha, red, green, blue);
|
|
||||||
}
|
|
||||||
|
|
||||||
-void ScOrcusStyles::set_border_width(orcus::spreadsheet::border_direction_t /* dir */, orcus::length_t /* width */)
|
|
||||||
+void ScOrcusStyles::set_border_width(orcus::spreadsheet::border_direction_t /* dir */, double /* val */, orcus::length_unit_t /* unit */)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t ScOrcusStyles::commit_border()
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
@ -1,93 +0,0 @@
|
|||||||
From 962e0bb4b31265b046fe4fb57d3087e20f5fe4ef Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
||||||
Date: Tue, 12 Jul 2016 20:31:52 +0100
|
|
||||||
Subject: [PATCH] Related: rhbz#1351369 gtk3 clipboards have to live to end
|
|
||||||
once created
|
|
||||||
|
|
||||||
like the other platforms do
|
|
||||||
|
|
||||||
Change-Id: I31340254573d13dc808d1e3038e3a36ae97f6c22
|
|
||||||
---
|
|
||||||
vcl/inc/unx/gtk/gtkinst.hxx | 3 +++
|
|
||||||
vcl/unx/gtk3/gtk3gtkinst.cxx | 22 +++++++++++++++++-----
|
|
||||||
2 files changed, 20 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
|
|
||||||
index 6212d5d..01e8ca6 100644
|
|
||||||
--- a/vcl/inc/unx/gtk/gtkinst.hxx
|
|
||||||
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
|
|
||||||
@@ -246,6 +246,9 @@ public:
|
|
||||||
|
|
||||||
private:
|
|
||||||
std::vector<GtkSalTimer *> m_aTimers;
|
|
||||||
+#if GTK_CHECK_VERSION(3,0,0)
|
|
||||||
+ std::unordered_map< GdkAtom, css::uno::Reference<css::uno::XInterface> > m_aClipboards;
|
|
||||||
+#endif
|
|
||||||
bool IsTimerExpired();
|
|
||||||
bool bNeedsInit;
|
|
||||||
cairo_font_options_t* m_pLastCairoFontOptions;
|
|
||||||
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
|
|
||||||
index b5db25d..3cc4046 100644
|
|
||||||
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
|
|
||||||
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
|
|
||||||
@@ -536,7 +536,11 @@ VclGtkClipboard::~VclGtkClipboard()
|
|
||||||
{
|
|
||||||
GtkClipboard* clipboard = gtk_clipboard_get(m_nSelection);
|
|
||||||
g_signal_handler_disconnect(clipboard, m_nOwnerChangedSignalId);
|
|
||||||
- ClipboardClear(nullptr);
|
|
||||||
+ if (!m_aGtkTargets.empty())
|
|
||||||
+ {
|
|
||||||
+ gtk_clipboard_clear(clipboard);
|
|
||||||
+ }
|
|
||||||
+ assert(m_aGtkTargets.empty());
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<GtkTargetEntry> VclToGtkHelper::FormatsToGtk(const css::uno::Sequence<css::datatransfer::DataFlavor> &rFormats)
|
|
||||||
@@ -587,7 +591,6 @@ void VclGtkClipboard::setContents(
|
|
||||||
{
|
|
||||||
osl::ClearableMutexGuard aGuard( m_aMutex );
|
|
||||||
Reference< datatransfer::clipboard::XClipboardOwner > xOldOwner( m_aOwner );
|
|
||||||
- bool bOwnerChange = (xOldOwner.is() && xOldOwner != xClipboardOwner);
|
|
||||||
Reference< datatransfer::XTransferable > xOldContents( m_aContents );
|
|
||||||
m_aContents = xTrans;
|
|
||||||
m_aOwner = xClipboardOwner;
|
|
||||||
@@ -596,8 +599,10 @@ void VclGtkClipboard::setContents(
|
|
||||||
datatransfer::clipboard::ClipboardEvent aEv;
|
|
||||||
|
|
||||||
GtkClipboard* clipboard = gtk_clipboard_get(m_nSelection);
|
|
||||||
- if (bOwnerChange)
|
|
||||||
+ if (!m_aGtkTargets.empty())
|
|
||||||
+ {
|
|
||||||
gtk_clipboard_clear(clipboard);
|
|
||||||
+ }
|
|
||||||
assert(m_aGtkTargets.empty());
|
|
||||||
if (m_aContents.is())
|
|
||||||
{
|
|
||||||
@@ -624,7 +629,7 @@ void VclGtkClipboard::setContents(
|
|
||||||
|
|
||||||
aGuard.clear();
|
|
||||||
|
|
||||||
- if (bOwnerChange)
|
|
||||||
+ if (xOldOwner.is() && xOldOwner != xClipboardOwner)
|
|
||||||
xOldOwner->lostOwnership( this, xOldContents );
|
|
||||||
for( std::list< Reference< datatransfer::clipboard::XClipboardListener > >::iterator it =
|
|
||||||
aListeners.begin(); it != aListeners.end() ; ++it )
|
|
||||||
@@ -672,7 +677,14 @@ Reference< XInterface > GtkInstance::CreateClipboard(const Sequence< Any >& argu
|
|
||||||
|
|
||||||
GdkAtom nSelection = (sel == "CLIPBOARD") ? GDK_SELECTION_CLIPBOARD : GDK_SELECTION_PRIMARY;
|
|
||||||
|
|
||||||
- return Reference< XInterface >( static_cast<cppu::OWeakObject *>(new VclGtkClipboard(nSelection)) );
|
|
||||||
+ auto it = m_aClipboards.find(nSelection);
|
|
||||||
+ if (it != m_aClipboards.end())
|
|
||||||
+ return it->second;
|
|
||||||
+
|
|
||||||
+ Reference<XInterface> xClipboard(static_cast<cppu::OWeakObject *>(new VclGtkClipboard(nSelection)));
|
|
||||||
+ m_aClipboards[nSelection] = xClipboard;
|
|
||||||
+
|
|
||||||
+ return xClipboard;
|
|
||||||
}
|
|
||||||
|
|
||||||
GtkDropTarget::GtkDropTarget()
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,115 +0,0 @@
|
|||||||
From a0e049ba62adc036f42973807d528ce27c8647cf Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
||||||
Date: Thu, 1 Sep 2016 15:50:20 +0100
|
|
||||||
Subject: [PATCH] Related: rhbz#1362451 avoid recursive ownerchanged handling
|
|
||||||
during ownerchange
|
|
||||||
|
|
||||||
Change-Id: Id9c12b7ce6458348890d7c7ff7fdb2cd37c4601c
|
|
||||||
---
|
|
||||||
vcl/unx/gtk3/gtk3gtkinst.cxx | 55 ++++++++++++++++++++++++++------------------
|
|
||||||
1 file changed, 32 insertions(+), 23 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
|
|
||||||
index 10c5c7f..7202b46 100644
|
|
||||||
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
|
|
||||||
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
|
|
||||||
@@ -364,6 +364,29 @@ namespace
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+namespace
|
|
||||||
+{
|
|
||||||
+ void ClipboardGetFunc(GtkClipboard *clipboard, GtkSelectionData *selection_data,
|
|
||||||
+ guint info,
|
|
||||||
+ gpointer user_data_or_owner)
|
|
||||||
+ {
|
|
||||||
+ VclGtkClipboard* pThis = static_cast<VclGtkClipboard*>(user_data_or_owner);
|
|
||||||
+ pThis->ClipboardGet(clipboard, selection_data, info);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ void ClipboardClearFunc(GtkClipboard *clipboard, gpointer user_data_or_owner)
|
|
||||||
+ {
|
|
||||||
+ VclGtkClipboard* pThis = static_cast<VclGtkClipboard*>(user_data_or_owner);
|
|
||||||
+ pThis->ClipboardClear(clipboard);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ void handle_owner_change(GtkClipboard *clipboard, GdkEvent *event, gpointer user_data)
|
|
||||||
+ {
|
|
||||||
+ VclGtkClipboard* pThis = static_cast<VclGtkClipboard*>(user_data);
|
|
||||||
+ pThis->OwnerPossiblyChanged(clipboard, event);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void VclGtkClipboard::OwnerPossiblyChanged(GtkClipboard* clipboard, GdkEvent* /*event*/)
|
|
||||||
{
|
|
||||||
if (!m_aContents.is())
|
|
||||||
@@ -376,6 +399,10 @@ void VclGtkClipboard::OwnerPossiblyChanged(GtkClipboard* clipboard, GdkEvent* /*
|
|
||||||
//our pid, in which case it's us.
|
|
||||||
bool bSelf = false;
|
|
||||||
|
|
||||||
+ //disconnect and reconnect after gtk_clipboard_wait_for_targets to
|
|
||||||
+ //avoid possible recursion
|
|
||||||
+ g_signal_handler_disconnect(clipboard, m_nOwnerChangedSignalId);
|
|
||||||
+
|
|
||||||
OString sTunnel = "application/x-libreoffice-internal-id-" + getPID();
|
|
||||||
GdkAtom *targets;
|
|
||||||
gint n_targets;
|
|
||||||
@@ -394,6 +421,9 @@ void VclGtkClipboard::OwnerPossiblyChanged(GtkClipboard* clipboard, GdkEvent* /*
|
|
||||||
g_free(targets);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ m_nOwnerChangedSignalId = g_signal_connect(clipboard, "owner-change",
|
|
||||||
+ G_CALLBACK(handle_owner_change), this);
|
|
||||||
+
|
|
||||||
if (!bSelf)
|
|
||||||
{
|
|
||||||
//null out m_aContents to return control to the system-one which
|
|
||||||
@@ -486,29 +516,6 @@ void VclToGtkHelper::setSelectionData(const Reference<css::datatransfer::XTransf
|
|
||||||
aData.getLength());
|
|
||||||
}
|
|
||||||
|
|
||||||
-namespace
|
|
||||||
-{
|
|
||||||
- void ClipboardGetFunc(GtkClipboard *clipboard, GtkSelectionData *selection_data,
|
|
||||||
- guint info,
|
|
||||||
- gpointer user_data_or_owner)
|
|
||||||
- {
|
|
||||||
- VclGtkClipboard* pThis = reinterpret_cast<VclGtkClipboard*>(user_data_or_owner);
|
|
||||||
- pThis->ClipboardGet(clipboard, selection_data, info);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- void ClipboardClearFunc(GtkClipboard *clipboard, gpointer user_data_or_owner)
|
|
||||||
- {
|
|
||||||
- VclGtkClipboard* pThis = reinterpret_cast<VclGtkClipboard*>(user_data_or_owner);
|
|
||||||
- pThis->ClipboardClear(clipboard);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- void handle_owner_change(GtkClipboard *clipboard, GdkEvent *event, gpointer user_data)
|
|
||||||
- {
|
|
||||||
- VclGtkClipboard* pThis = static_cast<VclGtkClipboard*>(user_data);
|
|
||||||
- pThis->OwnerPossiblyChanged(clipboard, event);
|
|
||||||
- }
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
VclGtkClipboard::VclGtkClipboard(GdkAtom nSelection)
|
|
||||||
: cppu::WeakComponentImplHelper<datatransfer::clipboard::XSystemClipboard,
|
|
||||||
datatransfer::clipboard::XFlushableClipboard, XServiceInfo>
|
|
||||||
@@ -539,6 +546,7 @@ VclGtkClipboard::~VclGtkClipboard()
|
|
||||||
if (!m_aGtkTargets.empty())
|
|
||||||
{
|
|
||||||
gtk_clipboard_clear(clipboard);
|
|
||||||
+ ClipboardClear(clipboard);
|
|
||||||
}
|
|
||||||
assert(m_aGtkTargets.empty());
|
|
||||||
}
|
|
||||||
@@ -602,6 +610,7 @@ void VclGtkClipboard::setContents(
|
|
||||||
if (!m_aGtkTargets.empty())
|
|
||||||
{
|
|
||||||
gtk_clipboard_clear(clipboard);
|
|
||||||
+ ClipboardClear(clipboard);
|
|
||||||
}
|
|
||||||
assert(m_aGtkTargets.empty());
|
|
||||||
if (m_aContents.is())
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,262 +0,0 @@
|
|||||||
From 3af38da4f0cb6b6341efad280c73a7733de42bea Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
||||||
Date: Fri, 24 Jun 2016 15:06:36 +0100
|
|
||||||
Subject: [PATCH] Resolves: rhbz#1326304 cannot detect loss of wayland
|
|
||||||
clipboard ownership
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
gtk_clipboard_get_owner always returns what you set with
|
|
||||||
gtk_clipboard_set_with_owner and that doesn't change if some other
|
|
||||||
application takes over the clipboard
|
|
||||||
|
|
||||||
The "owner-change" signal doesn't contain any useful data under wayland,
|
|
||||||
and doesn't fire when you'd expect either, just when the app becomes
|
|
||||||
active or gets focus or something like that. So you get it when you
|
|
||||||
do have the clipboard and when you don't, so that's no use either to
|
|
||||||
detect loss of clipboard ownership
|
|
||||||
|
|
||||||
So, forget about clipboard ownership, and always take the data to
|
|
||||||
be pasted from the system clipboard, so when we are pasting from ourselves
|
|
||||||
its "paste"->m_aSystemContents->gtk->"copy"->m_aOurContents
|
|
||||||
|
|
||||||
Undoubtedly something else will break now
|
|
||||||
|
|
||||||
Change-Id: I32f2e1a2cc3310687f61a094fdfa940fa0cfcc39
|
|
||||||
|
|
||||||
Resolves: rhbz#1350478 identify that we own the selection with a unique target
|
|
||||||
|
|
||||||
so we can tell that we own the selection in the absence of reliable selection
|
|
||||||
ownership notifications under wayland
|
|
||||||
|
|
||||||
Note that gnome#768177 means that requests for CLIPBOARD targets after
|
|
||||||
requests for PRIMARY targets can time out, which is why my attempts at
|
|
||||||
doing this before giving up with
|
|
||||||
|
|
||||||
commit 88cd9dd591d7921e5bce33c170b457ae5aa871bb
|
|
||||||
Author: Caolán McNamara <caolanm@redhat.com>
|
|
||||||
Date: Fri Jun 24 15:06:36 2016 +0100
|
|
||||||
|
|
||||||
Resolves: rhbz#1326304 cannot detect loss of wayland clipboard ownership
|
|
||||||
|
|
||||||
didn't work.
|
|
||||||
|
|
||||||
Change-Id: I1154899e478b6e0cc6f70aa0c90c26663299072c
|
|
||||||
(cherry picked from commit 88f7aae022bedd61588424a11bbc033217ba4e43)
|
|
||||||
---
|
|
||||||
vcl/unx/gtk3/gtk3gtkinst.cxx | 124 ++++++++++++++++++++++---------------------
|
|
||||||
1 file changed, 63 insertions(+), 61 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
|
|
||||||
index ed64ded..8b01166 100644
|
|
||||||
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
|
|
||||||
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
|
|
||||||
@@ -238,47 +238,6 @@ public:
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
-//We want to use gtk_clipboard_get_owner own owner-change to distinguish between
|
|
||||||
-//us gaining the clipboard ownership vs losing it. To do that we need to use
|
|
||||||
-//gtk_clipboard_set_with_owner and to do that we need a GObject, so define
|
|
||||||
-//one here for that purpose and just give it a VclGtkClipboard* member
|
|
||||||
-class VclGtkClipboard;
|
|
||||||
-
|
|
||||||
-struct ClipboardOwner
|
|
||||||
-{
|
|
||||||
- GObject parent_instance;
|
|
||||||
-
|
|
||||||
- /* instance members */
|
|
||||||
- VclGtkClipboard* m_pThis;
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-struct ClipboardOwnerClass
|
|
||||||
-{
|
|
||||||
- GObjectClass parent_class;
|
|
||||||
-
|
|
||||||
- /* class members */
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-#define CLIPBOARD_OWNER_OBJECT (clipboard_owner_get_type ())
|
|
||||||
-#define CLIPBOARD_OWNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLIPBOARD_OWNER_OBJECT, ClipboardOwner))
|
|
||||||
-
|
|
||||||
-#ifdef __GNUC__
|
|
||||||
-#pragma GCC diagnostic push
|
|
||||||
-#pragma GCC diagnostic ignored "-Wunused-function"
|
|
||||||
-#endif
|
|
||||||
-G_DEFINE_TYPE(ClipboardOwner, clipboard_owner, G_TYPE_OBJECT);
|
|
||||||
-#ifdef __GNUC__
|
|
||||||
-#pragma GCC diagnostic pop
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
-static void clipboard_owner_class_init (ClipboardOwnerClass *)
|
|
||||||
-{
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-static void clipboard_owner_init(ClipboardOwner *)
|
|
||||||
-{
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
class VclGtkClipboard :
|
|
||||||
public cppu::WeakComponentImplHelper<
|
|
||||||
datatransfer::clipboard::XSystemClipboard,
|
|
||||||
@@ -287,7 +246,6 @@ class VclGtkClipboard :
|
|
||||||
{
|
|
||||||
GdkAtom m_nSelection;
|
|
||||||
osl::Mutex m_aMutex;
|
|
||||||
- ClipboardOwner* m_pOwner;
|
|
||||||
gulong m_nOwnerChangedSignalId;
|
|
||||||
Reference<css::datatransfer::XTransferable> m_aContents;
|
|
||||||
Reference<css::datatransfer::clipboard::XClipboardOwner> m_aOwner;
|
|
||||||
@@ -349,7 +307,7 @@ public:
|
|
||||||
|
|
||||||
void ClipboardGet(GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info);
|
|
||||||
void ClipboardClear(GtkClipboard *clipboard);
|
|
||||||
- void OwnerChanged(GtkClipboard *clipboard, GdkEvent *event);
|
|
||||||
+ void OwnerPossiblyChanged(GtkClipboard *clipboard, GdkEvent *event);
|
|
||||||
};
|
|
||||||
|
|
||||||
OUString VclGtkClipboard::getImplementationName() throw( RuntimeException, std::exception )
|
|
||||||
@@ -370,13 +328,13 @@ sal_Bool VclGtkClipboard::supportsService( const OUString& ServiceName ) throw(
|
|
||||||
|
|
||||||
Reference< css::datatransfer::XTransferable > VclGtkClipboard::getContents() throw( RuntimeException, std::exception )
|
|
||||||
{
|
|
||||||
- if (G_OBJECT(m_pOwner) != gtk_clipboard_get_owner(gtk_clipboard_get(m_nSelection)) &&
|
|
||||||
- !m_aContents.is())
|
|
||||||
+ if (!m_aContents.is())
|
|
||||||
{
|
|
||||||
//tdf#93887 This is the system clipboard/selection. We fetch it when we are not
|
|
||||||
//the owner of the clipboard and have not already fetched it.
|
|
||||||
m_aContents = new GtkClipboardTransferable(m_nSelection);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
return m_aContents;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -388,9 +346,55 @@ void VclGtkClipboard::ClipboardGet(GtkClipboard* /*clipboard*/, GtkSelectionData
|
|
||||||
m_aConversionHelper.setSelectionData(m_aContents, selection_data, info);
|
|
||||||
}
|
|
||||||
|
|
||||||
-void VclGtkClipboard::OwnerChanged(GtkClipboard* clipboard, GdkEvent* /*event*/)
|
|
||||||
+namespace
|
|
||||||
+{
|
|
||||||
+ const OString& getPID()
|
|
||||||
+ {
|
|
||||||
+ static OString sPID;
|
|
||||||
+ if (!sPID.getLength())
|
|
||||||
+ {
|
|
||||||
+ oslProcessIdentifier aProcessId = 0;
|
|
||||||
+ oslProcessInfo info;
|
|
||||||
+ info.Size = sizeof (oslProcessInfo);
|
|
||||||
+ if (osl_getProcessInfo(nullptr, osl_Process_IDENTIFIER, &info) == osl_Process_E_None)
|
|
||||||
+ aProcessId = info.Ident;
|
|
||||||
+ sPID = OString::number(aProcessId);
|
|
||||||
+ }
|
|
||||||
+ return sPID;
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void VclGtkClipboard::OwnerPossiblyChanged(GtkClipboard* clipboard, GdkEvent* /*event*/)
|
|
||||||
{
|
|
||||||
- if (G_OBJECT(m_pOwner) != gtk_clipboard_get_owner(clipboard))
|
|
||||||
+ if (!m_aContents.is())
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ //if gdk_display_supports_selection_notification is not supported, e.g. like
|
|
||||||
+ //right now under wayland, then you only get owner-changed nofications at
|
|
||||||
+ //opportune times when the selection might have changed. So here
|
|
||||||
+ //we see if the selection supports a dummy selection type identifying
|
|
||||||
+ //our pid, in which case it's us.
|
|
||||||
+ bool bSelf = false;
|
|
||||||
+
|
|
||||||
+ OString sTunnel = "application/x-libreoffice-internal-id-" + getPID();
|
|
||||||
+ GdkAtom *targets;
|
|
||||||
+ gint n_targets;
|
|
||||||
+ if (gtk_clipboard_wait_for_targets(clipboard, &targets, &n_targets))
|
|
||||||
+ {
|
|
||||||
+ for (gint i = 0; i < n_targets && !bSelf; ++i)
|
|
||||||
+ {
|
|
||||||
+ gchar* pName = gdk_atom_name(targets[i]);
|
|
||||||
+ if (strcmp(pName, sTunnel.getStr()) == 0)
|
|
||||||
+ {
|
|
||||||
+ bSelf = true;
|
|
||||||
+ }
|
|
||||||
+ g_free(pName);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ g_free(targets);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (!bSelf)
|
|
||||||
{
|
|
||||||
//null out m_aContents to return control to the system-one which
|
|
||||||
//will be retrieved if getContents is called again
|
|
||||||
@@ -488,20 +492,20 @@ namespace
|
|
||||||
guint info,
|
|
||||||
gpointer user_data_or_owner)
|
|
||||||
{
|
|
||||||
- VclGtkClipboard* pThis = CLIPBOARD_OWNER(user_data_or_owner)->m_pThis;
|
|
||||||
+ VclGtkClipboard* pThis = reinterpret_cast<VclGtkClipboard*>(user_data_or_owner);
|
|
||||||
pThis->ClipboardGet(clipboard, selection_data, info);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ClipboardClearFunc(GtkClipboard *clipboard, gpointer user_data_or_owner)
|
|
||||||
{
|
|
||||||
- VclGtkClipboard* pThis = CLIPBOARD_OWNER(user_data_or_owner)->m_pThis;
|
|
||||||
+ VclGtkClipboard* pThis = reinterpret_cast<VclGtkClipboard*>(user_data_or_owner);
|
|
||||||
pThis->ClipboardClear(clipboard);
|
|
||||||
}
|
|
||||||
|
|
||||||
void handle_owner_change(GtkClipboard *clipboard, GdkEvent *event, gpointer user_data)
|
|
||||||
{
|
|
||||||
VclGtkClipboard* pThis = static_cast<VclGtkClipboard*>(user_data);
|
|
||||||
- pThis->OwnerChanged(clipboard, event);
|
|
||||||
+ pThis->OwnerPossiblyChanged(clipboard, event);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -514,8 +518,6 @@ VclGtkClipboard::VclGtkClipboard(GdkAtom nSelection)
|
|
||||||
GtkClipboard* clipboard = gtk_clipboard_get(m_nSelection);
|
|
||||||
m_nOwnerChangedSignalId = g_signal_connect(clipboard, "owner-change",
|
|
||||||
G_CALLBACK(handle_owner_change), this);
|
|
||||||
- m_pOwner = CLIPBOARD_OWNER(g_object_new(CLIPBOARD_OWNER_OBJECT, nullptr));
|
|
||||||
- m_pOwner->m_pThis = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
void VclGtkClipboard::flushClipboard()
|
|
||||||
@@ -534,7 +536,6 @@ VclGtkClipboard::~VclGtkClipboard()
|
|
||||||
{
|
|
||||||
GtkClipboard* clipboard = gtk_clipboard_get(m_nSelection);
|
|
||||||
g_signal_handler_disconnect(clipboard, m_nOwnerChangedSignalId);
|
|
||||||
- g_object_unref(m_pOwner);
|
|
||||||
ClipboardClear(nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -599,15 +600,16 @@ void VclGtkClipboard::setContents(
|
|
||||||
std::vector<GtkTargetEntry> aGtkTargets(m_aConversionHelper.FormatsToGtk(aFormats));
|
|
||||||
if (!aGtkTargets.empty())
|
|
||||||
{
|
|
||||||
- //if there was a previous gtk_clipboard_set_with_data call then
|
|
||||||
- //ClipboardClearFunc will be called now
|
|
||||||
+ GtkTargetEntry aEntry;
|
|
||||||
+ OString sTunnel = "application/x-libreoffice-internal-id-" + getPID();
|
|
||||||
+ aEntry.target = g_strdup(sTunnel.getStr());
|
|
||||||
+ aEntry.flags = 0;
|
|
||||||
+ aEntry.info = 0;
|
|
||||||
+ aGtkTargets.push_back(aEntry);
|
|
||||||
+
|
|
||||||
GtkClipboard* clipboard = gtk_clipboard_get(m_nSelection);
|
|
||||||
- if(G_OBJECT(m_pOwner) == gtk_clipboard_get_owner(clipboard))
|
|
||||||
- gtk_clipboard_clear(clipboard);
|
|
||||||
- //use with_owner with m_pOwner so we can distinguish in handle_owner_change
|
|
||||||
- //if we have gained or lost ownership of the clipboard
|
|
||||||
- gtk_clipboard_set_with_owner(clipboard, aGtkTargets.data(), aGtkTargets.size(),
|
|
||||||
- ClipboardGetFunc, ClipboardClearFunc, G_OBJECT(m_pOwner));
|
|
||||||
+ gtk_clipboard_set_with_data(clipboard, aGtkTargets.data(), aGtkTargets.size(),
|
|
||||||
+ ClipboardGetFunc, ClipboardClearFunc, this);
|
|
||||||
gtk_clipboard_set_can_store(clipboard, aGtkTargets.data(), aGtkTargets.size());
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,378 +0,0 @@
|
|||||||
From 5c9d1063505335ea9734936c5549bc68acf7f5f9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
||||||
Date: Fri, 1 Jul 2016 15:42:34 +0100
|
|
||||||
Subject: [PATCH] Resolves: rhbz#1351224 wayland grab related crashes
|
|
||||||
|
|
||||||
only one popup active at a time. Try and find the right path through the
|
|
||||||
uncanny valley which allows popups to appear, to get all mouse input that
|
|
||||||
happens to them, forward keyboard input to their parents, dismiss when the
|
|
||||||
mouse is clicked outside them and not crash if another popup wants to appear
|
|
||||||
to replace it
|
|
||||||
|
|
||||||
gtk3: XEmbed isn't going to happen
|
|
||||||
|
|
||||||
Change-Id: I7a7589a159a7fccdc224262bf5f91f8d98f5f619
|
|
||||||
(cherry picked from commit fe7b8bc9fdb57087ba9daa22cdec77d735eb71cd)
|
|
||||||
|
|
||||||
gtk3: if a popup is withdrawn close the popup
|
|
||||||
|
|
||||||
we don't always get the click that causes the popup
|
|
||||||
to be withdrawn when the mouse is clicked outside
|
|
||||||
the application during a grab
|
|
||||||
|
|
||||||
Change-Id: I2dbef23813972ebd75c8899711a2d1309110f968
|
|
||||||
(cherry picked from commit 1190e7385291fb0e6cd3505e88e589c80b02db00)
|
|
||||||
|
|
||||||
Change-Id: If4b39df41ca3dccde1e506d5328b06731a8c80eb
|
|
||||||
---
|
|
||||||
vcl/inc/unx/gtk/gtkframe.hxx | 9 ++-
|
|
||||||
vcl/unx/gtk3/gtk3gtkframe.cxx | 173 +++++++++++++++++++-----------------------
|
|
||||||
2 files changed, 85 insertions(+), 97 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
|
|
||||||
index 4677923..a660567 100644
|
|
||||||
--- a/vcl/inc/unx/gtk/gtkframe.hxx
|
|
||||||
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
|
|
||||||
@@ -269,6 +269,8 @@ class GtkSalFrame : public SalFrame
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
static gboolean signalExpose( GtkWidget*, GdkEventExpose*, gpointer );
|
|
||||||
+ void askForXEmbedFocus( sal_Int32 nTimecode );
|
|
||||||
+ void grabKeyboard(bool bGrab);
|
|
||||||
#endif
|
|
||||||
static gboolean signalFocus( GtkWidget*, GdkEventFocus*, gpointer );
|
|
||||||
static gboolean signalMap( GtkWidget*, GdkEvent*, gpointer );
|
|
||||||
@@ -299,7 +301,6 @@ class GtkSalFrame : public SalFrame
|
|
||||||
static GdkNativeWindow findTopLevelSystemWindow( GdkNativeWindow aWindow );
|
|
||||||
|
|
||||||
static int m_nFloats;
|
|
||||||
- static std::vector<GtkWidget*> m_aGrabWidgetsBeforeShowFloat;
|
|
||||||
|
|
||||||
bool isFloatGrabWindow() const
|
|
||||||
{
|
|
||||||
@@ -335,7 +336,6 @@ class GtkSalFrame : public SalFrame
|
|
||||||
|
|
||||||
void setMinMaxSize();
|
|
||||||
void createNewWindow( ::Window aParent, bool bXEmbed, SalX11Screen nXScreen );
|
|
||||||
- void askForXEmbedFocus( sal_Int32 nTimecode );
|
|
||||||
|
|
||||||
void AllocateFrame();
|
|
||||||
void TriggerPaintEvent();
|
|
||||||
@@ -366,7 +366,6 @@ public:
|
|
||||||
// be swallowed
|
|
||||||
bool Dispatch( const XEvent* pEvent );
|
|
||||||
void grabPointer(bool bGrab, bool bOwnerEvents = false);
|
|
||||||
- void grabKeyboard(bool bGrab);
|
|
||||||
|
|
||||||
static GtkSalDisplay* getDisplay();
|
|
||||||
static GdkDisplay* getGdkDisplay();
|
|
||||||
@@ -424,6 +423,10 @@ public:
|
|
||||||
void startDrag(gint nButton, gint nDragOriginX, gint nDragOriginY,
|
|
||||||
GdkDragAction sourceActions, GtkTargetList* pTargetList);
|
|
||||||
|
|
||||||
+ void WithDrawn();
|
|
||||||
+
|
|
||||||
+ static void closePopup();
|
|
||||||
+
|
|
||||||
#endif
|
|
||||||
virtual ~GtkSalFrame();
|
|
||||||
|
|
||||||
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
|
|
||||||
index 2320356..04af596 100644
|
|
||||||
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
|
|
||||||
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
|
|
||||||
@@ -107,7 +107,6 @@
|
|
||||||
using namespace com::sun::star;
|
|
||||||
|
|
||||||
int GtkSalFrame::m_nFloats = 0;
|
|
||||||
-std::vector<GtkWidget*> GtkSalFrame::m_aGrabWidgetsBeforeShowFloat;
|
|
||||||
|
|
||||||
#if defined ENABLE_GMENU_INTEGRATION
|
|
||||||
static GDBusConnection* pSessionBus = nullptr;
|
|
||||||
@@ -1292,13 +1291,6 @@ void GtkSalFrame::Init( SystemParentData* pSysData )
|
|
||||||
//FIXME: Handling embedded windows, is going to be fun ...
|
|
||||||
}
|
|
||||||
|
|
||||||
-void GtkSalFrame::askForXEmbedFocus( sal_Int32 i_nTimeCode )
|
|
||||||
-{
|
|
||||||
- (void) this; // loplugin:staticmethods
|
|
||||||
- (void)i_nTimeCode;
|
|
||||||
- //FIXME: no askForXEmbedFocus for gtk3 yet
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
void GtkSalFrame::SetExtendedFrameStyle( SalExtStyle nStyle )
|
|
||||||
{
|
|
||||||
if( nStyle != m_nExtStyle && ! isChild() )
|
|
||||||
@@ -1433,30 +1425,26 @@ void GtkSalFrame::Show( bool bVisible, bool bNoActivate )
|
|
||||||
if( ! bNoActivate && (m_nStyle & SalFrameStyleFlags::TOOLWINDOW) )
|
|
||||||
m_bSetFocusOnMap = true;
|
|
||||||
|
|
||||||
- gtk_widget_show( m_pWindow );
|
|
||||||
+ if (isFloatGrabWindow() && !getDisplay()->GetCaptureFrame() && m_nFloats == 0)
|
|
||||||
+ {
|
|
||||||
+ m_pParent->grabPointer(true, true);
|
|
||||||
+ gtk_grab_add(m_pParent->getMouseEventWidget());
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ gtk_widget_show(m_pWindow);
|
|
||||||
|
|
||||||
if( isFloatGrabWindow() )
|
|
||||||
{
|
|
||||||
m_nFloats++;
|
|
||||||
if( ! getDisplay()->GetCaptureFrame() && m_nFloats == 1 )
|
|
||||||
{
|
|
||||||
- GtkWindowGroup *pWindowGroup = gtk_window_get_group(GTK_WINDOW(m_pWindow));
|
|
||||||
- GtkWidget* pGrabWidgetBeforeShowFloat;
|
|
||||||
- while ((pGrabWidgetBeforeShowFloat = gtk_window_group_get_current_grab(pWindowGroup)))
|
|
||||||
- {
|
|
||||||
- m_aGrabWidgetsBeforeShowFloat.push_back(pGrabWidgetBeforeShowFloat);
|
|
||||||
- gtk_grab_remove(pGrabWidgetBeforeShowFloat);
|
|
||||||
- }
|
|
||||||
grabPointer(true, true);
|
|
||||||
- GtkSalFrame *pKeyboardFrame = m_pParent ? m_pParent : this;
|
|
||||||
- pKeyboardFrame->grabKeyboard(true);
|
|
||||||
+ gtk_grab_add(getMouseEventWidget());
|
|
||||||
}
|
|
||||||
// #i44068# reset parent's IM context
|
|
||||||
if( m_pParent )
|
|
||||||
m_pParent->EndExtTextInput(EndExtTextInputFlags::NONE);
|
|
||||||
}
|
|
||||||
- if( m_bWindowIsGtkPlug )
|
|
||||||
- askForXEmbedFocus( 0 );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@@ -1465,12 +1453,10 @@ void GtkSalFrame::Show( bool bVisible, bool bNoActivate )
|
|
||||||
m_nFloats--;
|
|
||||||
if( ! getDisplay()->GetCaptureFrame() && m_nFloats == 0)
|
|
||||||
{
|
|
||||||
- GtkSalFrame *pKeyboardFrame = m_pParent ? m_pParent : this;
|
|
||||||
- pKeyboardFrame->grabKeyboard(false);
|
|
||||||
+ gtk_grab_remove(getMouseEventWidget());
|
|
||||||
grabPointer(false);
|
|
||||||
- for (auto i = m_aGrabWidgetsBeforeShowFloat.rbegin(); i != m_aGrabWidgetsBeforeShowFloat.rend(); ++i)
|
|
||||||
- gtk_grab_add(*i);
|
|
||||||
- m_aGrabWidgetsBeforeShowFloat.clear();
|
|
||||||
+ gtk_grab_remove(m_pParent->getMouseEventWidget());
|
|
||||||
+ m_pParent->grabPointer(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
gtk_widget_hide( m_pWindow );
|
|
||||||
@@ -2070,37 +2056,32 @@ void GtkSalFrame::grabPointer( bool bGrab, bool bOwnerEvents )
|
|
||||||
if (!m_pWindow)
|
|
||||||
return;
|
|
||||||
|
|
||||||
- const int nMask = (GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK);
|
|
||||||
-
|
|
||||||
- GdkDeviceManager* pDeviceManager = gdk_display_get_device_manager(getGdkDisplay());
|
|
||||||
- GdkDevice* pPointer = gdk_device_manager_get_client_pointer(pDeviceManager);
|
|
||||||
+#if GTK_CHECK_VERSION(3, 19, 2)
|
|
||||||
+ GdkSeat* pSeat = gdk_display_get_default_seat(getGdkDisplay());
|
|
||||||
if (bGrab)
|
|
||||||
- gdk_device_grab(pPointer, widget_get_window(getMouseEventWidget()), GDK_OWNERSHIP_NONE, bOwnerEvents, (GdkEventMask) nMask, m_pCurrentCursor, gtk_get_current_event_time());
|
|
||||||
+ {
|
|
||||||
+ gdk_seat_grab(pSeat, widget_get_window(getMouseEventWidget()), GDK_SEAT_CAPABILITY_ALL_POINTING,
|
|
||||||
+ bOwnerEvents, NULL, NULL, NULL, NULL);
|
|
||||||
+ }
|
|
||||||
else
|
|
||||||
- gdk_device_ungrab(pPointer, gtk_get_current_event_time());
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-void GtkSalFrame::grabKeyboard( bool bGrab )
|
|
||||||
-{
|
|
||||||
- static const char* pEnv = getenv("SAL_NO_MOUSEGRABS"); // let's not introduce a special var for this
|
|
||||||
- if (pEnv && *pEnv)
|
|
||||||
- return;
|
|
||||||
-
|
|
||||||
- if (!m_pWindow)
|
|
||||||
- return;
|
|
||||||
+ {
|
|
||||||
+ gdk_seat_ungrab(pSeat);
|
|
||||||
+ }
|
|
||||||
+#else
|
|
||||||
+ const int nMask = (GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK);
|
|
||||||
|
|
||||||
GdkDeviceManager* pDeviceManager = gdk_display_get_device_manager(getGdkDisplay());
|
|
||||||
GdkDevice* pPointer = gdk_device_manager_get_client_pointer(pDeviceManager);
|
|
||||||
- GdkDevice* pKeyboard = gdk_device_get_associated_device(pPointer);
|
|
||||||
if (bGrab)
|
|
||||||
{
|
|
||||||
- gdk_device_grab(pKeyboard, widget_get_window(m_pWindow), GDK_OWNERSHIP_NONE,
|
|
||||||
- true, (GdkEventMask)(GDK_KEY_PRESS | GDK_KEY_RELEASE), nullptr, gtk_get_current_event_time());
|
|
||||||
+ gdk_device_grab(pPointer, widget_get_window(getMouseEventWidget()), GDK_OWNERSHIP_NONE,
|
|
||||||
+ bOwnerEvents, (GdkEventMask) nMask, m_pCurrentCursor, gtk_get_current_event_time());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
- gdk_device_ungrab(pKeyboard, gtk_get_current_event_time());
|
|
||||||
+ gdk_device_ungrab(pPointer, gtk_get_current_event_time());
|
|
||||||
}
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void GtkSalFrame::CaptureMouse( bool bCapture )
|
|
||||||
@@ -2562,6 +2543,22 @@ void GtkSalFrame::StartToolKitMoveBy()
|
|
||||||
pEvent->button.time);
|
|
||||||
}
|
|
||||||
|
|
||||||
+void GtkSalFrame::WithDrawn()
|
|
||||||
+{
|
|
||||||
+ if (isFloatGrabWindow())
|
|
||||||
+ closePopup();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void GtkSalFrame::closePopup()
|
|
||||||
+{
|
|
||||||
+ if (!m_nFloats)
|
|
||||||
+ return;
|
|
||||||
+ ImplSVData* pSVData = ImplGetSVData();
|
|
||||||
+ if (!pSVData->maWinData.mpFirstFloat)
|
|
||||||
+ return;
|
|
||||||
+ pSVData->maWinData.mpFirstFloat->EndPopupMode(FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer frame )
|
|
||||||
{
|
|
||||||
UpdateLastInputEventTime(pEvent->time);
|
|
||||||
@@ -2593,69 +2590,40 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer
|
|
||||||
aEvent.mnY = (long)pEvent->y_root - pThis->maGeometry.nY;
|
|
||||||
aEvent.mnCode = GetMouseModCode( pEvent->state );
|
|
||||||
|
|
||||||
- bool bClosePopups = false;
|
|
||||||
- if( pEvent->type == GDK_BUTTON_PRESS &&
|
|
||||||
- !(pThis->m_nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION)
|
|
||||||
- )
|
|
||||||
- {
|
|
||||||
- if( m_nFloats > 0 )
|
|
||||||
- {
|
|
||||||
- // close popups if user clicks outside our application
|
|
||||||
- gint x, y;
|
|
||||||
- bClosePopups = (gdk_display_get_window_at_pointer( GtkSalFrame::getGdkDisplay(), &x, &y ) == nullptr);
|
|
||||||
- }
|
|
||||||
- /* #i30306# release implicit pointer grab if no popups are open; else
|
|
||||||
- * Drag cannot grab the pointer and will fail.
|
|
||||||
- */
|
|
||||||
- if( m_nFloats < 1 || bClosePopups )
|
|
||||||
- gdk_display_pointer_ungrab( GtkSalFrame::getGdkDisplay(), GDK_CURRENT_TIME );
|
|
||||||
- }
|
|
||||||
+ vcl::DeletionListener aDel( pThis );
|
|
||||||
|
|
||||||
- if( pThis->m_bWindowIsGtkPlug &&
|
|
||||||
- pEvent->type == GDK_BUTTON_PRESS &&
|
|
||||||
- pEvent->button == 1 )
|
|
||||||
+ if (pEvent->type == GDK_BUTTON_PRESS && pThis->isFloatGrabWindow())
|
|
||||||
{
|
|
||||||
- pThis->askForXEmbedFocus( pEvent->time );
|
|
||||||
+ bool bClosePopups = (pEvent->window != widget_get_window(pThis->getMouseEventWidget()));
|
|
||||||
+ if (bClosePopups)
|
|
||||||
+ closePopup();
|
|
||||||
}
|
|
||||||
|
|
||||||
// --- RTL --- (mirror mouse pos)
|
|
||||||
if( AllSettings::GetLayoutRTL() )
|
|
||||||
aEvent.mnX = pThis->maGeometry.nWidth-1-aEvent.mnX;
|
|
||||||
|
|
||||||
- vcl::DeletionListener aDel( pThis );
|
|
||||||
-
|
|
||||||
- pThis->CallCallback( nEventType, &aEvent );
|
|
||||||
-
|
|
||||||
- if( ! aDel.isDeleted() )
|
|
||||||
+ if (!aDel.isDeleted())
|
|
||||||
{
|
|
||||||
- if( bClosePopups )
|
|
||||||
- {
|
|
||||||
- ImplSVData* pSVData = ImplGetSVData();
|
|
||||||
- if ( pSVData->maWinData.mpFirstFloat )
|
|
||||||
- {
|
|
||||||
- static const char* pEnv = getenv( "SAL_FLOATWIN_NOAPPFOCUSCLOSE" );
|
|
||||||
- if ( !(pSVData->maWinData.mpFirstFloat->GetPopupModeFlags() & FloatWinPopupFlags::NoAppFocusClose) && !(pEnv && *pEnv) )
|
|
||||||
- pSVData->maWinData.mpFirstFloat->EndPopupMode( FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll );
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+ pThis->CallCallback( nEventType, &aEvent );
|
|
||||||
+ }
|
|
||||||
|
|
||||||
- if( ! aDel.isDeleted() )
|
|
||||||
+ if (!aDel.isDeleted())
|
|
||||||
+ {
|
|
||||||
+ int frame_x = (int)(pEvent->x_root - pEvent->x);
|
|
||||||
+ int frame_y = (int)(pEvent->y_root - pEvent->y);
|
|
||||||
+ if( frame_x != pThis->maGeometry.nX || frame_y != pThis->maGeometry.nY )
|
|
||||||
{
|
|
||||||
- int frame_x = (int)(pEvent->x_root - pEvent->x);
|
|
||||||
- int frame_y = (int)(pEvent->y_root - pEvent->y);
|
|
||||||
- if( frame_x != pThis->maGeometry.nX || frame_y != pThis->maGeometry.nY )
|
|
||||||
- {
|
|
||||||
- pThis->maGeometry.nX = frame_x;
|
|
||||||
- pThis->maGeometry.nY = frame_y;
|
|
||||||
- pThis->CallCallback( SalEvent::Move, nullptr );
|
|
||||||
- }
|
|
||||||
+ pThis->maGeometry.nX = frame_x;
|
|
||||||
+ pThis->maGeometry.nY = frame_y;
|
|
||||||
+ pThis->CallCallback( SalEvent::Move, nullptr );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
-gboolean GtkSalFrame::signalScroll( GtkWidget*, GdkEventScroll* pEvent, gpointer frame )
|
|
||||||
+gboolean GtkSalFrame::signalScroll(GtkWidget*, GdkEventScroll* pEvent, gpointer frame)
|
|
||||||
{
|
|
||||||
UpdateLastInputEventTime(pEvent->time);
|
|
||||||
|
|
||||||
@@ -2757,6 +2725,13 @@ gboolean GtkSalFrame::signalMotion( GtkWidget*, GdkEventMotion* pEvent, gpointer
|
|
||||||
|
|
||||||
GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
|
|
||||||
|
|
||||||
+ //If a menu, e.g. font name dropdown, is open, then under wayland moving the
|
|
||||||
+ //mouse in the top left corner of the toplevel window in a
|
|
||||||
+ //0,0,float-width,float-height area generates motion events which are
|
|
||||||
+ //delivered to the dropdown
|
|
||||||
+ if (pThis->isFloatGrabWindow() && pEvent->window != widget_get_window(pThis->getMouseEventWidget()))
|
|
||||||
+ return true;
|
|
||||||
+
|
|
||||||
SalMouseEvent aEvent;
|
|
||||||
aEvent.mnTime = pEvent->time;
|
|
||||||
aEvent.mnX = (long)pEvent->x_root - pThis->maGeometry.nX;
|
|
||||||
@@ -2972,12 +2947,15 @@ gboolean GtkSalFrame::signalUnmap( GtkWidget*, GdkEvent*, gpointer frame )
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
-gboolean GtkSalFrame::signalKey( GtkWidget*, GdkEventKey* pEvent, gpointer frame )
|
|
||||||
+gboolean GtkSalFrame::signalKey(GtkWidget* pWidget, GdkEventKey* pEvent, gpointer frame)
|
|
||||||
{
|
|
||||||
UpdateLastInputEventTime(pEvent->time);
|
|
||||||
|
|
||||||
GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
|
|
||||||
|
|
||||||
+ if (pThis->isFloatGrabWindow())
|
|
||||||
+ return signalKey(pWidget, pEvent, pThis->m_pParent);
|
|
||||||
+
|
|
||||||
vcl::DeletionListener aDel( pThis );
|
|
||||||
|
|
||||||
if( pThis->m_pIMHandler )
|
|
||||||
@@ -3132,11 +3110,18 @@ gboolean GtkSalFrame::signalWindowState( GtkWidget*, GdkEvent* pEvent, gpointer
|
|
||||||
pThis->TriggerPaintEvent();
|
|
||||||
}
|
|
||||||
|
|
||||||
- if( (pEvent->window_state.new_window_state & GDK_WINDOW_STATE_MAXIMIZED) &&
|
|
||||||
- ! (pThis->m_nState & GDK_WINDOW_STATE_MAXIMIZED) )
|
|
||||||
+ if ((pEvent->window_state.new_window_state & GDK_WINDOW_STATE_MAXIMIZED) &&
|
|
||||||
+ !(pThis->m_nState & GDK_WINDOW_STATE_MAXIMIZED))
|
|
||||||
{
|
|
||||||
pThis->m_aRestorePosSize = GetPosAndSize(GTK_WINDOW(pThis->m_pWindow));
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ if ((pEvent->window_state.new_window_state & GDK_WINDOW_STATE_WITHDRAWN) &&
|
|
||||||
+ !(pThis->m_nState & GDK_WINDOW_STATE_WITHDRAWN))
|
|
||||||
+ {
|
|
||||||
+ pThis->WithDrawn();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
pThis->m_nState = pEvent->window_state.new_window_state;
|
|
||||||
|
|
||||||
#if OSL_DEBUG_LEVEL > 1
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
|||||||
From 25477cb518a464fb052e55c2b7c250af606ba42d Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
||||||
Date: Fri, 8 Jul 2016 14:50:56 +0100
|
|
||||||
Subject: [PATCH] Resolves: rhbz#1352965 gtk3 infinite clipboard recursion with
|
|
||||||
clipit installed
|
|
||||||
|
|
||||||
Change-Id: Ib67afaf532b8409e05fffbf1b8312d664460567d
|
|
||||||
---
|
|
||||||
vcl/unx/gtk3/gtk3gtkinst.cxx | 11 ++++++-----
|
|
||||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
|
|
||||||
index 8b01166..c92bf43 100644
|
|
||||||
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
|
|
||||||
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
|
|
||||||
@@ -587,6 +587,7 @@ void VclGtkClipboard::setContents(
|
|
||||||
{
|
|
||||||
osl::ClearableMutexGuard aGuard( m_aMutex );
|
|
||||||
Reference< datatransfer::clipboard::XClipboardOwner > xOldOwner( m_aOwner );
|
|
||||||
+ bool bOwnerChange = (xOldOwner.is() && xOldOwner != xClipboardOwner);
|
|
||||||
Reference< datatransfer::XTransferable > xOldContents( m_aContents );
|
|
||||||
m_aContents = xTrans;
|
|
||||||
m_aOwner = xClipboardOwner;
|
|
||||||
@@ -594,6 +595,10 @@ void VclGtkClipboard::setContents(
|
|
||||||
std::list< Reference< datatransfer::clipboard::XClipboardListener > > aListeners( m_aListeners );
|
|
||||||
datatransfer::clipboard::ClipboardEvent aEv;
|
|
||||||
|
|
||||||
+ GtkClipboard* clipboard = gtk_clipboard_get(m_nSelection);
|
|
||||||
+ if (bOwnerChange)
|
|
||||||
+ gtk_clipboard_clear(clipboard);
|
|
||||||
+ assert(m_aGtkTargets.empty());
|
|
||||||
if (m_aContents.is())
|
|
||||||
{
|
|
||||||
css::uno::Sequence<css::datatransfer::DataFlavor> aFormats = xTrans->getTransferDataFlavors();
|
|
||||||
@@ -607,15 +612,11 @@ void VclGtkClipboard::setContents(
|
|
||||||
aEntry.info = 0;
|
|
||||||
aGtkTargets.push_back(aEntry);
|
|
||||||
|
|
||||||
- GtkClipboard* clipboard = gtk_clipboard_get(m_nSelection);
|
|
||||||
gtk_clipboard_set_with_data(clipboard, aGtkTargets.data(), aGtkTargets.size(),
|
|
||||||
ClipboardGetFunc, ClipboardClearFunc, this);
|
|
||||||
gtk_clipboard_set_can_store(clipboard, aGtkTargets.data(), aGtkTargets.size());
|
|
||||||
}
|
|
||||||
|
|
||||||
- for (auto &a : m_aGtkTargets)
|
|
||||||
- g_free(a.target);
|
|
||||||
-
|
|
||||||
m_aGtkTargets = aGtkTargets;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -623,7 +624,7 @@ void VclGtkClipboard::setContents(
|
|
||||||
|
|
||||||
aGuard.clear();
|
|
||||||
|
|
||||||
- if( xOldOwner.is() && xOldOwner != xClipboardOwner )
|
|
||||||
+ if (bOwnerChange)
|
|
||||||
xOldOwner->lostOwnership( this, xOldContents );
|
|
||||||
for( std::list< Reference< datatransfer::clipboard::XClipboardListener > >::iterator it =
|
|
||||||
aListeners.begin(); it != aListeners.end() ; ++it )
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,160 +0,0 @@
|
|||||||
From 08f105a770ac20641cd287f9e999dc70eaafa343 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jaskaran Singh <jvsg1303@gmail.com>
|
|
||||||
Date: Fri, 24 Jun 2016 19:53:11 +0530
|
|
||||||
Subject: [PATCH] Switch from orcus-0.11 to orcus-0.12
|
|
||||||
|
|
||||||
Change-Id: I837ed3a30fae6fbe6cb658f1feecce1e88279ae0
|
|
||||||
(cherry picked from commit 92be10ca0669fc05565507c4e62c674c5224e49f)
|
|
||||||
---
|
|
||||||
RepositoryExternal.mk | 4 ++--
|
|
||||||
configure.ac | 2 +-
|
|
||||||
download.lst | 4 ++--
|
|
||||||
.../liborcus/0001-workaround-a-linking-problem-on-windows.patch | 4 ++--
|
|
||||||
external/liborcus/ExternalPackage_liborcus.mk | 8 ++++----
|
|
||||||
external/liborcus/ExternalProject_liborcus.mk | 4 ++--
|
|
||||||
external/liborcus/Library_orcus-parser.mk | 3 +++
|
|
||||||
external/liborcus/Library_orcus.mk | 1 +
|
|
||||||
8 files changed, 17 insertions(+), 13 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
|
|
||||||
index 0fc7d25..6094333 100644
|
|
||||||
--- a/RepositoryExternal.mk
|
|
||||||
+++ b/RepositoryExternal.mk
|
|
||||||
@@ -3108,7 +3108,7 @@ $(call gb_LinkTarget_set_include,$(1),\
|
|
||||||
)
|
|
||||||
|
|
||||||
$(call gb_LinkTarget_add_libs,$(1),\
|
|
||||||
- -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.11 \
|
|
||||||
+ -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.12 \
|
|
||||||
)
|
|
||||||
|
|
||||||
$(if $(SYSTEM_BOOST), \
|
|
||||||
@@ -3127,7 +3127,7 @@ $(call gb_LinkTarget_set_include,$(1),\
|
|
||||||
)
|
|
||||||
|
|
||||||
$(call gb_LinkTarget_add_libs,$(1),\
|
|
||||||
- -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.11 \
|
|
||||||
+ -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.12 \
|
|
||||||
)
|
|
||||||
|
|
||||||
endef
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index d271db2..8421640 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -9173,7 +9173,7 @@ if test -z "$enable_orcus" -o "$enable_orcus" != no; then
|
|
||||||
ENABLE_ORCUS="TRUE"
|
|
||||||
AC_DEFINE(ENABLE_ORCUS)
|
|
||||||
|
|
||||||
- libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.11 >= 0.11.2])
|
|
||||||
+ libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.12 >= 0.12.0])
|
|
||||||
if test "$with_system_orcus" != "yes"; then
|
|
||||||
if test "$SYSTEM_BOOST" = "TRUE"; then
|
|
||||||
# ===========================================================
|
|
||||||
diff --git a/download.lst b/download.lst
|
|
||||||
index 7632f99..19e4752 100644
|
|
||||||
--- a/download.lst
|
|
||||||
+++ b/download.lst
|
|
||||||
@@ -118,8 +118,8 @@ export OPENCOLLADA_TARBALL := OpenCOLLADA-master-6509aa13af.tar.bz2
|
|
||||||
export OPENLDAP_TARBALL := 804c6cb5698db30b75ad0ff1c25baefd-openldap-2.4.31.tgz
|
|
||||||
export OPENSSL_MD5SUM := 9392e65072ce4b614c1392eefc1f23d0
|
|
||||||
export OPENSSL_TARBALL := openssl-1.0.2h.tar.gz
|
|
||||||
-export ORCUS_MD5SUM := 205badaee72adf99422add8c4c49d669
|
|
||||||
-export ORCUS_TARBALL := liborcus-0.11.2.tar.gz
|
|
||||||
+export ORCUS_MD5SUM := b3b3efc8d6c92bb8016464e42cab3d06
|
|
||||||
+export ORCUS_TARBALL := b3b3efc8d6c92bb8016464e42cab3d06-liborcus-0.12.0.tar.gz
|
|
||||||
export OWNCLOUD_ANDROID_LIB_MD5SUM := 593f0aa47bf2efc0efda2d28fae063b2
|
|
||||||
export OWNCLOUD_ANDROID_LIB_TARBALL := owncloud-android-library-0.9.4-no-binary-deps.tar.gz
|
|
||||||
export PAGEMAKER_MD5SUM := 5c4985a68be0b79d3f809da5e12b143c
|
|
||||||
diff --git a/external/liborcus/0001-workaround-a-linking-problem-on-windows.patch b/external/liborcus/0001-workaround-a-linking-problem-on-windows.patch
|
|
||||||
index 5710877..308e51c 100644
|
|
||||||
--- a/external/liborcus/0001-workaround-a-linking-problem-on-windows.patch
|
|
||||||
+++ b/external/liborcus/0001-workaround-a-linking-problem-on-windows.patch
|
|
||||||
@@ -24,7 +24,7 @@ index b6e3f83..8027f25 100644
|
|
||||||
typedef const char* xmlns_id_t;
|
|
||||||
|
|
||||||
-ORCUS_PSR_DLLPUBLIC extern const xmlns_id_t XMLNS_UNKNOWN_ID;
|
|
||||||
-+const xmlns_id_t XMLNS_UNKNOWN_ID = NULL;
|
|
||||||
++const xmlns_id_t XMLNS_UNKNOWN_ID = nullptr;
|
|
||||||
ORCUS_PSR_DLLPUBLIC extern const xml_token_t XML_UNKNOWN_TOKEN;
|
|
||||||
ORCUS_PSR_DLLPUBLIC extern const size_t index_not_found;
|
|
||||||
ORCUS_PSR_DLLPUBLIC extern const size_t unspecified;
|
|
||||||
@@ -36,7 +36,7 @@ index be4e304..0a1b4a7 100644
|
|
||||||
|
|
||||||
namespace orcus {
|
|
||||||
|
|
||||||
--const xmlns_id_t XMLNS_UNKNOWN_ID = NULL;
|
|
||||||
+-const xmlns_id_t XMLNS_UNKNOWN_ID = nullptr;
|
|
||||||
const xml_token_t XML_UNKNOWN_TOKEN = 0;
|
|
||||||
|
|
||||||
const size_t index_not_found = std::numeric_limits<size_t>::max();
|
|
||||||
diff --git a/external/liborcus/ExternalPackage_liborcus.mk b/external/liborcus/ExternalPackage_liborcus.mk
|
|
||||||
index 56debe9..4a8b5f8 100644
|
|
||||||
--- a/external/liborcus/ExternalPackage_liborcus.mk
|
|
||||||
+++ b/external/liborcus/ExternalPackage_liborcus.mk
|
|
||||||
@@ -12,11 +12,11 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,liborcus,liborcus))
|
|
||||||
$(eval $(call gb_ExternalPackage_use_external_project,liborcus,liborcus))
|
|
||||||
|
|
||||||
ifeq ($(OS),MACOSX)
|
|
||||||
-$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.11.0.dylib,src/liborcus/.libs/liborcus-0.11.0.dylib))
|
|
||||||
-$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.11.0.dylib,src/parser/.libs/liborcus-parser-0.11.0.dylib))
|
|
||||||
+$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.12.0.dylib,src/liborcus/.libs/liborcus-0.12.0.dylib))
|
|
||||||
+$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.12.0.dylib,src/parser/.libs/liborcus-parser-0.12.0.dylib))
|
|
||||||
else ifeq ($(DISABLE_DYNLOADING),)
|
|
||||||
-$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.11.so.0,src/liborcus/.libs/liborcus-0.11.so.0.0.0))
|
|
||||||
-$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.11.so.0,src/parser/.libs/liborcus-parser-0.11.so.0.0.0))
|
|
||||||
+$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.12.so.0,src/liborcus/.libs/liborcus-0.12.so.0.0.0))
|
|
||||||
+$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.12.so.0,src/parser/.libs/liborcus-parser-0.12.so.0.0.0))
|
|
||||||
endif
|
|
||||||
|
|
||||||
# vim: set noet sw=4 ts=4:
|
|
||||||
diff --git a/external/liborcus/ExternalProject_liborcus.mk b/external/liborcus/ExternalProject_liborcus.mk
|
|
||||||
index 580ef847..dce7d63 100644
|
|
||||||
--- a/external/liborcus/ExternalProject_liborcus.mk
|
|
||||||
+++ b/external/liborcus/ExternalProject_liborcus.mk
|
|
||||||
@@ -113,8 +113,8 @@ $(call gb_ExternalProject_get_state_target,liborcus,build) :
|
|
||||||
$(MAKE) \
|
|
||||||
$(if $(filter MACOSX,$(OS)),\
|
|
||||||
&& $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \
|
|
||||||
- $(gb_Package_SOURCEDIR_liborcus)/src/liborcus/.libs/liborcus-0.11.0.dylib \
|
|
||||||
- $(gb_Package_SOURCEDIR_liborcus)/src/parser/.libs/liborcus-parser-0.11.0.dylib \
|
|
||||||
+ $(gb_Package_SOURCEDIR_liborcus)/src/liborcus/.libs/liborcus-0.12.0.dylib \
|
|
||||||
+ $(gb_Package_SOURCEDIR_liborcus)/src/parser/.libs/liborcus-parser-0.12.0.dylib \
|
|
||||||
) \
|
|
||||||
)
|
|
||||||
|
|
||||||
diff --git a/external/liborcus/Library_orcus-parser.mk b/external/liborcus/Library_orcus-parser.mk
|
|
||||||
index 28af14e..4c2ca7f 100644
|
|
||||||
--- a/external/liborcus/Library_orcus-parser.mk
|
|
||||||
+++ b/external/liborcus/Library_orcus-parser.mk
|
|
||||||
@@ -39,12 +39,15 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus-parser,\
|
|
||||||
UnpackedTarball/liborcus/src/parser/css_types \
|
|
||||||
UnpackedTarball/liborcus/src/parser/csv_parser_base \
|
|
||||||
UnpackedTarball/liborcus/src/parser/exception \
|
|
||||||
+ UnpackedTarball/liborcus/src/parser/json_global \
|
|
||||||
UnpackedTarball/liborcus/src/parser/json_parser_base \
|
|
||||||
+ UnpackedTarball/liborcus/src/parser/json_parser_thread \
|
|
||||||
UnpackedTarball/liborcus/src/parser/parser_base \
|
|
||||||
UnpackedTarball/liborcus/src/parser/parser_global \
|
|
||||||
UnpackedTarball/liborcus/src/parser/pstring \
|
|
||||||
UnpackedTarball/liborcus/src/parser/sax_parser_base \
|
|
||||||
UnpackedTarball/liborcus/src/parser/sax_token_parser \
|
|
||||||
+ UnpackedTarball/liborcus/src/parser/sax_token_parser_thread \
|
|
||||||
UnpackedTarball/liborcus/src/parser/stream \
|
|
||||||
UnpackedTarball/liborcus/src/parser/string_pool \
|
|
||||||
UnpackedTarball/liborcus/src/parser/tokens \
|
|
||||||
diff --git a/external/liborcus/Library_orcus.mk b/external/liborcus/Library_orcus.mk
|
|
||||||
index e49adca..adc43cb 100644
|
|
||||||
--- a/external/liborcus/Library_orcus.mk
|
|
||||||
+++ b/external/liborcus/Library_orcus.mk
|
|
||||||
@@ -65,6 +65,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus,\
|
|
||||||
UnpackedTarball/liborcus/src/liborcus/measurement \
|
|
||||||
UnpackedTarball/liborcus/src/liborcus/odf_helper \
|
|
||||||
UnpackedTarball/liborcus/src/liborcus/odf_namespace_types \
|
|
||||||
+ UnpackedTarball/liborcus/src/liborcus/odf_number_formatting_context \
|
|
||||||
UnpackedTarball/liborcus/src/liborcus/odf_para_context \
|
|
||||||
UnpackedTarball/liborcus/src/liborcus/odf_styles_context \
|
|
||||||
UnpackedTarball/liborcus/src/liborcus/odf_styles \
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
@ -1,531 +0,0 @@
|
|||||||
From 538096616926587d2d81c8d258d4a5b57862f644 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
||||||
Date: Thu, 30 Jun 2016 15:33:14 +0100
|
|
||||||
Subject: [PATCH] a11y crash on deleting certain frame in certain document
|
|
||||||
|
|
||||||
I've an internal RH document which crashes in a11y when a paragraph with a
|
|
||||||
graphic and a drawing frame in it is deleted.
|
|
||||||
|
|
||||||
The SdrObject is removed and deleted, but when
|
|
||||||
SwAccessibleContext::DisposeChild is called the object does not pass IsShowing
|
|
||||||
so its not removed from the accessibility map. Leaving an entry in the map
|
|
||||||
pointing to a deleted SdrObject
|
|
||||||
|
|
||||||
So here take the route-one approach of always removing from the map
|
|
||||||
accessibility children which depend on a SdrObject which is getting deleted,
|
|
||||||
whether or not it is inside the visible area at the moment.
|
|
||||||
|
|
||||||
The real change here is to SwAccessibleContext::DisposeChild and to
|
|
||||||
SwFrame::RemoveDrawObj
|
|
||||||
|
|
||||||
everything is called Dispose, hard to find anything
|
|
||||||
|
|
||||||
Change-Id: I473ed39c975886a6be30860cb61f6fe59c5508a4
|
|
||||||
(cherry picked from commit ad59dcf7dad19540403f5812677901e6fad30257)
|
|
||||||
|
|
||||||
Change-Id: I764cd54d6216d233756f52b5be66c80737b5e38d
|
|
||||||
Reviewed-on: https://gerrit.libreoffice.org/26824
|
|
||||||
Tested-by: Jenkins <ci@libreoffice.org>
|
|
||||||
Reviewed-by: Michael Stahl <mstahl@redhat.com>
|
|
||||||
(cherry picked from commit 04081b6907132c867041dd492408b5349f26cd42)
|
|
||||||
---
|
|
||||||
sw/inc/accmap.hxx | 9 +++++----
|
|
||||||
sw/source/core/access/acccell.cxx | 4 ++--
|
|
||||||
sw/source/core/access/acccell.hxx | 2 +-
|
|
||||||
sw/source/core/access/acccontext.cxx | 20 +++++++++++---------
|
|
||||||
sw/source/core/access/acccontext.hxx | 8 ++++----
|
|
||||||
sw/source/core/access/accdoc.cxx | 4 ++--
|
|
||||||
sw/source/core/access/accdoc.hxx | 2 +-
|
|
||||||
sw/source/core/access/accframebase.cxx | 4 ++--
|
|
||||||
sw/source/core/access/accframebase.hxx | 2 +-
|
|
||||||
sw/source/core/access/accmap.cxx | 13 +++++++------
|
|
||||||
sw/source/core/access/accnotextframe.cxx | 4 ++--
|
|
||||||
sw/source/core/access/accnotextframe.hxx | 2 +-
|
|
||||||
sw/source/core/access/acctable.cxx | 8 ++++----
|
|
||||||
sw/source/core/access/acctable.hxx | 4 ++--
|
|
||||||
sw/source/core/draw/dview.cxx | 8 ++++----
|
|
||||||
sw/source/core/inc/viewimp.hxx | 10 +++++-----
|
|
||||||
sw/source/core/layout/fly.cxx | 4 ++--
|
|
||||||
sw/source/core/view/viewimp.cxx | 9 +++++----
|
|
||||||
sw/source/uibase/docvw/PostItMgr.cxx | 2 +-
|
|
||||||
19 files changed, 62 insertions(+), 57 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
|
|
||||||
index 2178a72..25c9696 100644
|
|
||||||
--- a/sw/inc/accmap.hxx
|
|
||||||
+++ b/sw/inc/accmap.hxx
|
|
||||||
@@ -182,10 +182,11 @@ public:
|
|
||||||
void RemoveContext( const SdrObject *pObj );
|
|
||||||
|
|
||||||
// Dispose frame and its children if bRecursive is set
|
|
||||||
- void Dispose( const SwFrame* pFrame,
|
|
||||||
- const SdrObject* pObj,
|
|
||||||
- vcl::Window* pWindow,
|
|
||||||
- bool bRecursive = false );
|
|
||||||
+ void A11yDispose( const SwFrame* pFrame,
|
|
||||||
+ const SdrObject* pObj,
|
|
||||||
+ vcl::Window* pWindow,
|
|
||||||
+ bool bRecursive = false,
|
|
||||||
+ bool bCanSkipInvisible = true );
|
|
||||||
|
|
||||||
void InvalidatePosOrSize( const SwFrame* pFrame,
|
|
||||||
const SdrObject* pObj,
|
|
||||||
diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx
|
|
||||||
index d448a7f..ca4ce14 100644
|
|
||||||
--- a/sw/source/core/access/acccell.cxx
|
|
||||||
+++ b/sw/source/core/access/acccell.cxx
|
|
||||||
@@ -263,13 +263,13 @@ uno::Sequence< OUString > SAL_CALL SwAccessibleCell::getSupportedServiceNames()
|
|
||||||
return aRet;
|
|
||||||
}
|
|
||||||
|
|
||||||
-void SwAccessibleCell::Dispose( bool bRecursive )
|
|
||||||
+void SwAccessibleCell::Dispose(bool bRecursive, bool bCanSkipInvisible)
|
|
||||||
{
|
|
||||||
const SwFrame *pParent = GetParent( SwAccessibleChild(GetFrame()), IsInPagePreview() );
|
|
||||||
::rtl::Reference< SwAccessibleContext > xAccImpl(
|
|
||||||
GetMap()->GetContextImpl( pParent, false ) );
|
|
||||||
if( xAccImpl.is() )
|
|
||||||
- xAccImpl->DisposeChild( SwAccessibleChild(GetFrame()), bRecursive );
|
|
||||||
+ xAccImpl->DisposeChild(SwAccessibleChild(GetFrame()), bRecursive, bCanSkipInvisible);
|
|
||||||
SwAccessibleContext::Dispose( bRecursive );
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/sw/source/core/access/acccell.hxx b/sw/source/core/access/acccell.hxx
|
|
||||||
index 594dc73..9d543c6 100644
|
|
||||||
--- a/sw/source/core/access/acccell.hxx
|
|
||||||
+++ b/sw/source/core/access/acccell.hxx
|
|
||||||
@@ -83,7 +83,7 @@ public:
|
|
||||||
getSupportedServiceNames()
|
|
||||||
throw (css::uno::RuntimeException, std::exception) override;
|
|
||||||
|
|
||||||
- virtual void Dispose( bool bRecursive = false ) override;
|
|
||||||
+ virtual void Dispose(bool bRecursive = false, bool bCanSkipInvisible = true) override;
|
|
||||||
|
|
||||||
virtual void InvalidatePosOrSize( const SwRect& rFrame ) override;
|
|
||||||
|
|
||||||
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
|
|
||||||
index b74ed70..8fb2e30 100644
|
|
||||||
--- a/sw/source/core/access/acccontext.cxx
|
|
||||||
+++ b/sw/source/core/access/acccontext.cxx
|
|
||||||
@@ -393,8 +393,9 @@ void SwAccessibleContext::InvalidateChildrenStates( const SwFrame* _pFrame,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-void SwAccessibleContext::DisposeChildren( const SwFrame *pFrame,
|
|
||||||
- bool bRecursive )
|
|
||||||
+void SwAccessibleContext::DisposeChildren(const SwFrame *pFrame,
|
|
||||||
+ bool bRecursive,
|
|
||||||
+ bool bCanSkipInvisible)
|
|
||||||
{
|
|
||||||
const SwAccessibleChildSList aVisList( GetVisArea(), *pFrame, *(GetMap()) );
|
|
||||||
SwAccessibleChildSList::const_iterator aIter( aVisList.begin() );
|
|
||||||
@@ -410,7 +411,7 @@ void SwAccessibleContext::DisposeChildren( const SwFrame *pFrame,
|
|
||||||
if( xAccImpl.is() )
|
|
||||||
xAccImpl->Dispose( bRecursive );
|
|
||||||
else if( bRecursive )
|
|
||||||
- DisposeChildren( pLower, bRecursive );
|
|
||||||
+ DisposeChildren(pLower, bRecursive, bCanSkipInvisible);
|
|
||||||
}
|
|
||||||
else if ( rLower.GetDrawObject() )
|
|
||||||
{
|
|
||||||
@@ -422,7 +423,7 @@ void SwAccessibleContext::DisposeChildren( const SwFrame *pFrame,
|
|
||||||
}
|
|
||||||
else if ( rLower.GetWindow() )
|
|
||||||
{
|
|
||||||
- DisposeChild( rLower, false );
|
|
||||||
+ DisposeChild(rLower, false, bCanSkipInvisible);
|
|
||||||
}
|
|
||||||
++aIter;
|
|
||||||
}
|
|
||||||
@@ -1032,7 +1033,7 @@ void SwAccessibleContext::ScrolledInShape( const SdrObject* ,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-void SwAccessibleContext::Dispose( bool bRecursive )
|
|
||||||
+void SwAccessibleContext::Dispose(bool bRecursive, bool bCanSkipInvisible)
|
|
||||||
{
|
|
||||||
SolarMutexGuard aGuard;
|
|
||||||
|
|
||||||
@@ -1044,7 +1045,7 @@ void SwAccessibleContext::Dispose( bool bRecursive )
|
|
||||||
|
|
||||||
// dispose children
|
|
||||||
if( bRecursive )
|
|
||||||
- DisposeChildren( GetFrame(), bRecursive );
|
|
||||||
+ DisposeChildren(GetFrame(), bRecursive, bCanSkipInvisible);
|
|
||||||
|
|
||||||
// get parent
|
|
||||||
uno::Reference< XAccessible > xParent( GetWeakParent() );
|
|
||||||
@@ -1083,12 +1084,13 @@ void SwAccessibleContext::Dispose( bool bRecursive )
|
|
||||||
}
|
|
||||||
|
|
||||||
void SwAccessibleContext::DisposeChild( const SwAccessibleChild& rChildFrameOrObj,
|
|
||||||
- bool bRecursive )
|
|
||||||
+ bool bRecursive, bool bCanSkipInvisible )
|
|
||||||
{
|
|
||||||
SolarMutexGuard aGuard;
|
|
||||||
|
|
||||||
- if ( IsShowing( *(GetMap()), rChildFrameOrObj ) ||
|
|
||||||
+ if ( !bCanSkipInvisible ||
|
|
||||||
rChildFrameOrObj.AlwaysIncludeAsChild() ||
|
|
||||||
+ IsShowing( *(GetMap()), rChildFrameOrObj ) ||
|
|
||||||
!SwAccessibleChild( GetFrame() ).IsVisibleChildrenOnly() )
|
|
||||||
{
|
|
||||||
// If the object could have existed before, than there is nothing to do,
|
|
||||||
@@ -1119,7 +1121,7 @@ void SwAccessibleContext::DisposeChild( const SwAccessibleChild& rChildFrameOrOb
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if( bRecursive && rChildFrameOrObj.GetSwFrame() )
|
|
||||||
- DisposeChildren( rChildFrameOrObj.GetSwFrame(), bRecursive );
|
|
||||||
+ DisposeChildren(rChildFrameOrObj.GetSwFrame(), bRecursive, bCanSkipInvisible);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SwAccessibleContext::InvalidatePosOrSize( const SwRect& )
|
|
||||||
diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx
|
|
||||||
index 3adcbbd..6c6ae83 100644
|
|
||||||
--- a/sw/source/core/access/acccontext.hxx
|
|
||||||
+++ b/sw/source/core/access/acccontext.hxx
|
|
||||||
@@ -147,8 +147,8 @@ protected:
|
|
||||||
|
|
||||||
// Dispose children of the specified SwFrame. The SwFrame might belong to
|
|
||||||
// the current object or to any other child or grandchild.
|
|
||||||
- void DisposeChildren( const SwFrame *pFrame,
|
|
||||||
- bool bRecursive );
|
|
||||||
+ void DisposeChildren(const SwFrame *pFrame,
|
|
||||||
+ bool bRecursive, bool bCanSkipInvisible);
|
|
||||||
|
|
||||||
void DisposeShape( const SdrObject *pObj,
|
|
||||||
::accessibility::AccessibleShape *pAccImpl );
|
|
||||||
@@ -315,10 +315,10 @@ public:
|
|
||||||
// thread safe C++ interface
|
|
||||||
|
|
||||||
// The object is not visible an longer and should be destroyed
|
|
||||||
- virtual void Dispose( bool bRecursive = false );
|
|
||||||
+ virtual void Dispose(bool bRecursive = false, bool bCanSkipInvisible = true);
|
|
||||||
|
|
||||||
// The child object is not visible an longer and should be destroyed
|
|
||||||
- virtual void DisposeChild( const sw::access::SwAccessibleChild& rFrameOrObj, bool bRecursive );
|
|
||||||
+ virtual void DisposeChild(const sw::access::SwAccessibleChild& rFrameOrObj, bool bRecursive, bool bCanSkipInvisible);
|
|
||||||
|
|
||||||
// The object has been moved by the layout
|
|
||||||
virtual void InvalidatePosOrSize( const SwRect& rFrame );
|
|
||||||
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
|
|
||||||
index bed5158..d01c612 100644
|
|
||||||
--- a/sw/source/core/access/accdoc.cxx
|
|
||||||
+++ b/sw/source/core/access/accdoc.cxx
|
|
||||||
@@ -380,14 +380,14 @@ SwAccessibleDocument::~SwAccessibleDocument()
|
|
||||||
pWin->RemoveChildEventListener( LINK( this, SwAccessibleDocument, WindowChildEventListener ));
|
|
||||||
}
|
|
||||||
|
|
||||||
-void SwAccessibleDocument::Dispose( bool bRecursive )
|
|
||||||
+void SwAccessibleDocument::Dispose(bool bRecursive, bool bCanSkipInvisible)
|
|
||||||
{
|
|
||||||
OSL_ENSURE( GetFrame() && GetMap(), "already disposed" );
|
|
||||||
|
|
||||||
vcl::Window *pWin = GetMap() ? GetMap()->GetShell()->GetWin() : nullptr;
|
|
||||||
if( pWin )
|
|
||||||
pWin->RemoveChildEventListener( LINK( this, SwAccessibleDocument, WindowChildEventListener ));
|
|
||||||
- SwAccessibleContext::Dispose( bRecursive );
|
|
||||||
+ SwAccessibleContext::Dispose(bRecursive, bCanSkipInvisible);
|
|
||||||
}
|
|
||||||
|
|
||||||
IMPL_LINK_TYPED( SwAccessibleDocument, WindowChildEventListener, VclWindowEvent&, rEvent, void )
|
|
||||||
diff --git a/sw/source/core/access/accdoc.hxx b/sw/source/core/access/accdoc.hxx
|
|
||||||
index 5fdb656..e11f068 100644
|
|
||||||
--- a/sw/source/core/access/accdoc.hxx
|
|
||||||
+++ b/sw/source/core/access/accdoc.hxx
|
|
||||||
@@ -198,7 +198,7 @@ public:
|
|
||||||
// thread safe C++ interface
|
|
||||||
|
|
||||||
// The object is not visible an longer and should be destroyed
|
|
||||||
- virtual void Dispose( bool bRecursive = false ) override;
|
|
||||||
+ virtual void Dispose(bool bRecursive = false, bool bCanSkipInvisible = true) override;
|
|
||||||
|
|
||||||
// XAccessibleComponent
|
|
||||||
sal_Int32 SAL_CALL getBackground()
|
|
||||||
diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx
|
|
||||||
index 9cf0253..1382315 100644
|
|
||||||
--- a/sw/source/core/access/accframebase.cxx
|
|
||||||
+++ b/sw/source/core/access/accframebase.cxx
|
|
||||||
@@ -263,14 +263,14 @@ void SwAccessibleFrameBase::Modify( const SfxPoolItem* pOld, const SfxPoolItem *
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-void SwAccessibleFrameBase::Dispose( bool bRecursive )
|
|
||||||
+void SwAccessibleFrameBase::Dispose(bool bRecursive, bool bCanSkipInvisible)
|
|
||||||
{
|
|
||||||
SolarMutexGuard aGuard;
|
|
||||||
|
|
||||||
if( GetRegisteredIn() )
|
|
||||||
GetRegisteredInNonConst()->Remove( this );
|
|
||||||
|
|
||||||
- SwAccessibleContext::Dispose( bRecursive );
|
|
||||||
+ SwAccessibleContext::Dispose(bRecursive, bCanSkipInvisible);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Get the selection cursor of the document.
|
|
||||||
diff --git a/sw/source/core/access/accframebase.hxx b/sw/source/core/access/accframebase.hxx
|
|
||||||
index 7d1ac0c..6df342a 100644
|
|
||||||
--- a/sw/source/core/access/accframebase.hxx
|
|
||||||
+++ b/sw/source/core/access/accframebase.hxx
|
|
||||||
@@ -57,7 +57,7 @@ public:
|
|
||||||
static sal_uInt8 GetNodeType( const SwFlyFrame *pFlyFrame );
|
|
||||||
|
|
||||||
// The object is not visible an longer and should be destroyed
|
|
||||||
- virtual void Dispose( bool bRecursive = false ) override;
|
|
||||||
+ virtual void Dispose(bool bRecursive = false, bool bCanSkipInvisible = true) override;
|
|
||||||
virtual bool SetSelectedState( bool bSeleted ) override;
|
|
||||||
};
|
|
||||||
|
|
||||||
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
|
|
||||||
index 4c2aaae..2a6a3c3 100644
|
|
||||||
--- a/sw/source/core/access/accmap.cxx
|
|
||||||
+++ b/sw/source/core/access/accmap.cxx
|
|
||||||
@@ -2241,10 +2241,11 @@ void SwAccessibleMap::RemoveContext( const SdrObject *pObj )
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-void SwAccessibleMap::Dispose( const SwFrame *pFrame,
|
|
||||||
- const SdrObject *pObj,
|
|
||||||
- vcl::Window* pWindow,
|
|
||||||
- bool bRecursive )
|
|
||||||
+void SwAccessibleMap::A11yDispose( const SwFrame *pFrame,
|
|
||||||
+ const SdrObject *pObj,
|
|
||||||
+ vcl::Window* pWindow,
|
|
||||||
+ bool bRecursive,
|
|
||||||
+ bool bCanSkipInvisible )
|
|
||||||
{
|
|
||||||
SwAccessibleChild aFrameOrObj( pFrame, pObj, pWindow );
|
|
||||||
|
|
||||||
@@ -2355,7 +2356,7 @@ void SwAccessibleMap::Dispose( const SwFrame *pFrame,
|
|
||||||
// be broadcasted at the end of the action to give the table
|
|
||||||
// a chance to generate a single table change event.
|
|
||||||
|
|
||||||
- xParentAccImpl->DisposeChild( aFrameOrObj, bRecursive );
|
|
||||||
+ xParentAccImpl->DisposeChild( aFrameOrObj, bRecursive, bCanSkipInvisible );
|
|
||||||
}
|
|
||||||
else if( xShapeAccImpl.is() )
|
|
||||||
{
|
|
||||||
@@ -3189,7 +3190,7 @@ bool SwAccessibleMap::ReplaceChild (
|
|
||||||
// Also get keep parent.
|
|
||||||
uno::Reference < XAccessible > xParent( pCurrentChild->getAccessibleParent() );
|
|
||||||
pCurrentChild = nullptr; // will be released by dispose
|
|
||||||
- Dispose( nullptr, pObj, nullptr );
|
|
||||||
+ A11yDispose( nullptr, pObj, nullptr );
|
|
||||||
|
|
||||||
{
|
|
||||||
osl::MutexGuard aGuard( maMutex );
|
|
||||||
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
|
|
||||||
index 3af6558..5a007f0 100644
|
|
||||||
--- a/sw/source/core/access/accnotextframe.cxx
|
|
||||||
+++ b/sw/source/core/access/accnotextframe.cxx
|
|
||||||
@@ -164,14 +164,14 @@ void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-void SwAccessibleNoTextFrame::Dispose( bool bRecursive )
|
|
||||||
+void SwAccessibleNoTextFrame::Dispose(bool bRecursive, bool bCanSkipInvisible)
|
|
||||||
{
|
|
||||||
SolarMutexGuard aGuard;
|
|
||||||
|
|
||||||
if( aDepend.GetRegisteredIn() )
|
|
||||||
aDepend.GetRegisteredIn()->Remove( &aDepend );
|
|
||||||
|
|
||||||
- SwAccessibleFrameBase::Dispose( bRecursive );
|
|
||||||
+ SwAccessibleFrameBase::Dispose(bRecursive, bCanSkipInvisible);
|
|
||||||
}
|
|
||||||
|
|
||||||
// #i73249#
|
|
||||||
diff --git a/sw/source/core/access/accnotextframe.hxx b/sw/source/core/access/accnotextframe.hxx
|
|
||||||
index d11dd25..6be3005 100644
|
|
||||||
--- a/sw/source/core/access/accnotextframe.hxx
|
|
||||||
+++ b/sw/source/core/access/accnotextframe.hxx
|
|
||||||
@@ -98,7 +98,7 @@ public:
|
|
||||||
throw ( css::uno::RuntimeException, std::exception ) override;
|
|
||||||
|
|
||||||
// The object is not visible an longer and should be destroyed
|
|
||||||
- virtual void Dispose( bool bRecursive = false ) override;
|
|
||||||
+ virtual void Dispose(bool bRecursive = false, bool bCanSkipInvisible = true) override;
|
|
||||||
|
|
||||||
virtual sal_Int32 SAL_CALL getCaretPosition( ) throw (css::uno::RuntimeException, std::exception) override;
|
|
||||||
virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override;
|
|
||||||
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
|
|
||||||
index 0831419..8706683 100644
|
|
||||||
--- a/sw/source/core/access/acctable.cxx
|
|
||||||
+++ b/sw/source/core/access/acctable.cxx
|
|
||||||
@@ -1391,18 +1391,18 @@ void SwAccessibleTable::InvalidatePosOrSize( const SwRect& rOldBox )
|
|
||||||
SwAccessibleContext::InvalidatePosOrSize( rOldBox );
|
|
||||||
}
|
|
||||||
|
|
||||||
-void SwAccessibleTable::Dispose( bool bRecursive )
|
|
||||||
+void SwAccessibleTable::Dispose(bool bRecursive, bool bCanSkipInvisible)
|
|
||||||
{
|
|
||||||
SolarMutexGuard aGuard;
|
|
||||||
|
|
||||||
if( GetRegisteredIn() )
|
|
||||||
GetRegisteredInNonConst()->Remove( this );
|
|
||||||
|
|
||||||
- SwAccessibleContext::Dispose( bRecursive );
|
|
||||||
+ SwAccessibleContext::Dispose(bRecursive, bCanSkipInvisible);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SwAccessibleTable::DisposeChild( const SwAccessibleChild& rChildFrameOrObj,
|
|
||||||
- bool bRecursive )
|
|
||||||
+ bool bRecursive, bool bCanSkipInvisible )
|
|
||||||
{
|
|
||||||
SolarMutexGuard aGuard;
|
|
||||||
|
|
||||||
@@ -1421,7 +1421,7 @@ void SwAccessibleTable::DisposeChild( const SwAccessibleChild& rChildFrameOrObj,
|
|
||||||
// about its change. We then must not call the superclass
|
|
||||||
uno::Reference< XAccessible > xAcc( GetMap()->GetContext( pFrame, false ) );
|
|
||||||
if( !xAcc.is() )
|
|
||||||
- SwAccessibleContext::DisposeChild( rChildFrameOrObj, bRecursive );
|
|
||||||
+ SwAccessibleContext::DisposeChild( rChildFrameOrObj, bRecursive, bCanSkipInvisible );
|
|
||||||
}
|
|
||||||
|
|
||||||
void SwAccessibleTable::InvalidateChildPosOrSize( const SwAccessibleChild& rChildFrameOrObj,
|
|
||||||
diff --git a/sw/source/core/access/acctable.hxx b/sw/source/core/access/acctable.hxx
|
|
||||||
index 8afd565..9f3c385 100644
|
|
||||||
--- a/sw/source/core/access/acctable.hxx
|
|
||||||
+++ b/sw/source/core/access/acctable.hxx
|
|
||||||
@@ -224,10 +224,10 @@ public:
|
|
||||||
virtual void InvalidatePosOrSize( const SwRect& rOldBox ) override;
|
|
||||||
|
|
||||||
// The object is not visible an longer and should be destroyed
|
|
||||||
- virtual void Dispose( bool bRecursive = false ) override;
|
|
||||||
+ virtual void Dispose(bool bRecursive = false, bool bCanSkipInvisible = true) override;
|
|
||||||
|
|
||||||
virtual void DisposeChild( const sw::access::SwAccessibleChild& rFrameOrObj,
|
|
||||||
- bool bRecursive ) override;
|
|
||||||
+ bool bRecursive, bool bCanSkipInvisible ) override;
|
|
||||||
virtual void InvalidateChildPosOrSize( const sw::access::SwAccessibleChild& rFrameOrObj,
|
|
||||||
const SwRect& rFrame ) override;
|
|
||||||
|
|
||||||
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
|
|
||||||
index 495485c..5105092 100644
|
|
||||||
--- a/sw/source/core/draw/dview.cxx
|
|
||||||
+++ b/sw/source/core/draw/dview.cxx
|
|
||||||
@@ -375,7 +375,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
- rImp.DisposeAccessibleObj( pAnchoredObj->GetDrawObj() );
|
|
||||||
+ rImp.DisposeAccessibleObj(pAnchoredObj->GetDrawObj(), true);
|
|
||||||
rImp.AddAccessibleObj( pAnchoredObj->GetDrawObj() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -411,7 +411,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
- rImp.DisposeAccessibleObj( pAnchoredObj->GetDrawObj() );
|
|
||||||
+ rImp.DisposeAccessibleObj(pAnchoredObj->GetDrawObj(), true);
|
|
||||||
rImp.AddAccessibleObj( pAnchoredObj->GetDrawObj() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -621,7 +621,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
- rImp.DisposeAccessibleObj( pTmpObj );
|
|
||||||
+ rImp.DisposeAccessibleObj(pTmpObj, true);
|
|
||||||
rImp.AddAccessibleObj( pTmpObj );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -640,7 +640,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// adjustments for accessibility API
|
|
||||||
- rImp.DisposeAccessibleObj( pObj );
|
|
||||||
+ rImp.DisposeAccessibleObj(pObj, true);
|
|
||||||
rImp.AddAccessibleObj( pObj );
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx
|
|
||||||
index 4ebe489..be88ca9 100644
|
|
||||||
--- a/sw/source/core/inc/viewimp.hxx
|
|
||||||
+++ b/sw/source/core/inc/viewimp.hxx
|
|
||||||
@@ -225,10 +225,10 @@ public:
|
|
||||||
|
|
||||||
/// Remove a frame from the accessible view
|
|
||||||
void DisposeAccessible( const SwFrame *pFrame, const SdrObject *pObj,
|
|
||||||
- bool bRecursive );
|
|
||||||
+ bool bRecursive, bool bCanSkipInvisible );
|
|
||||||
inline void DisposeAccessibleFrame( const SwFrame *pFrame,
|
|
||||||
bool bRecursive = false );
|
|
||||||
- inline void DisposeAccessibleObj( const SdrObject *pObj );
|
|
||||||
+ inline void DisposeAccessibleObj( const SdrObject *pObj, bool bCanSkipInvisible );
|
|
||||||
|
|
||||||
/// Move a frame's position in the accessible view
|
|
||||||
void MoveAccessible( const SwFrame *pFrame, const SdrObject *pObj,
|
|
||||||
@@ -278,12 +278,12 @@ inline SwAccessibleMap& SwViewShellImp::GetAccessibleMap()
|
|
||||||
inline void SwViewShellImp::DisposeAccessibleFrame( const SwFrame *pFrame,
|
|
||||||
bool bRecursive )
|
|
||||||
{
|
|
||||||
- DisposeAccessible( pFrame, nullptr, bRecursive );
|
|
||||||
+ DisposeAccessible( pFrame, nullptr, bRecursive, true );
|
|
||||||
}
|
|
||||||
|
|
||||||
-inline void SwViewShellImp::DisposeAccessibleObj( const SdrObject *pObj )
|
|
||||||
+inline void SwViewShellImp::DisposeAccessibleObj( const SdrObject *pObj, bool bCanSkipInvisible )
|
|
||||||
{
|
|
||||||
- DisposeAccessible( nullptr, pObj, false );
|
|
||||||
+ DisposeAccessible( nullptr, pObj, false, bCanSkipInvisible );
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void SwViewShellImp::MoveAccessibleFrame( const SwFrame *pFrame,
|
|
||||||
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
|
|
||||||
index 66c131d..5ad9f40 100644
|
|
||||||
--- a/sw/source/core/layout/fly.cxx
|
|
||||||
+++ b/sw/source/core/layout/fly.cxx
|
|
||||||
@@ -2160,8 +2160,8 @@ void SwFrame::RemoveDrawObj( SwAnchoredObject& _rToRemoveObj )
|
|
||||||
if( pSh )
|
|
||||||
{
|
|
||||||
SwRootFrame* pLayout = getRootFrame();
|
|
||||||
- if( pLayout && pLayout->IsAnyShellAccessible() )
|
|
||||||
- pSh->Imp()->DisposeAccessibleObj( _rToRemoveObj.GetDrawObj() );
|
|
||||||
+ if (pLayout && pLayout->IsAnyShellAccessible())
|
|
||||||
+ pSh->Imp()->DisposeAccessibleObj(_rToRemoveObj.GetDrawObj(), false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// deregister from page frame
|
|
||||||
diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
|
|
||||||
index 254a5b7..e403be9 100644
|
|
||||||
--- a/sw/source/core/view/viewimp.cxx
|
|
||||||
+++ b/sw/source/core/view/viewimp.cxx
|
|
||||||
@@ -300,15 +300,16 @@ void SwViewShellImp::UpdateAccessible()
|
|
||||||
GetAccessibleMap().GetDocumentView();
|
|
||||||
}
|
|
||||||
|
|
||||||
-void SwViewShellImp::DisposeAccessible( const SwFrame *pFrame,
|
|
||||||
- const SdrObject *pObj,
|
|
||||||
- bool bRecursive )
|
|
||||||
+void SwViewShellImp::DisposeAccessible(const SwFrame *pFrame,
|
|
||||||
+ const SdrObject *pObj,
|
|
||||||
+ bool bRecursive,
|
|
||||||
+ bool bCanSkipInvisible)
|
|
||||||
{
|
|
||||||
OSL_ENSURE( !pFrame || pFrame->IsAccessibleFrame(), "frame is not accessible" );
|
|
||||||
for(SwViewShell& rTmp : GetShell()->GetRingContainer())
|
|
||||||
{
|
|
||||||
if( rTmp.Imp()->IsAccessible() )
|
|
||||||
- rTmp.Imp()->GetAccessibleMap().Dispose( pFrame, pObj, nullptr, bRecursive );
|
|
||||||
+ rTmp.Imp()->GetAccessibleMap().A11yDispose( pFrame, pObj, nullptr, bRecursive, bCanSkipInvisible );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
|
|
||||||
index 1ef3524..f6f4361 100644
|
|
||||||
--- a/sw/source/uibase/docvw/PostItMgr.cxx
|
|
||||||
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
|
|
||||||
@@ -2194,7 +2194,7 @@ void SwPostItMgr::DisconnectSidebarWinFromFrame( const SwFrame& rFrame,
|
|
||||||
if ( bRemoved &&
|
|
||||||
mpWrtShell->GetAccessibleMap() )
|
|
||||||
{
|
|
||||||
- mpWrtShell->GetAccessibleMap()->Dispose( nullptr, nullptr, &rSidebarWin );
|
|
||||||
+ mpWrtShell->GetAccessibleMap()->A11yDispose( nullptr, nullptr, &rSidebarWin );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
|||||||
From 5f58670b43e5284d9460b561e774175c7a2dd7ab Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
||||||
Date: Tue, 13 Sep 2016 10:42:16 +0100
|
|
||||||
Subject: [PATCH] add xdg-email as the default email route
|
|
||||||
|
|
||||||
because xdg-email is apparently the only route
|
|
||||||
that knows how to support adding an attachment
|
|
||||||
to thunderbird
|
|
||||||
|
|
||||||
Change-Id: Ife1b56ccfe2434eb31ad67bef00f55197e96151e
|
|
||||||
---
|
|
||||||
shell/source/unix/misc/senddoc.sh | 10 ++++++++--
|
|
||||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh
|
|
||||||
index 169af25..4519e01 100755
|
|
||||||
--- a/shell/source/unix/misc/senddoc.sh
|
|
||||||
+++ b/shell/source/unix/misc/senddoc.sh
|
|
||||||
@@ -384,7 +384,9 @@ case `basename "$MAILER" | sed 's/-.*$//'` in
|
|
||||||
# Try to be smart, and send the mail anyway, if we have the
|
|
||||||
# possibility to do so.
|
|
||||||
|
|
||||||
- if [ -n "$DESKTOP_LAUNCH" ]; then
|
|
||||||
+ if [ -x /usr/bin/xdg-email ] ; then
|
|
||||||
+ MAILER=/usr/bin/xdg-email
|
|
||||||
+ elif [ -n "$DESKTOP_LAUNCH" ]; then
|
|
||||||
# http://lists.freedesktop.org/pipermail/xdg/2004-August/002873.html
|
|
||||||
MAILER=${DESKTOP_LAUNCH}
|
|
||||||
elif [ -n "$KDE_FULL_SESSION" -a -x /usr/bin/kde-open ] ; then
|
|
||||||
@@ -423,7 +425,11 @@ case `basename "$MAILER" | sed 's/-.*$//'` in
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--attach)
|
|
||||||
- MAILTO="${MAILTO:-}${MAILTO:+&}attachment="`echo "file://$2" | "${URI_ENCODE}"`
|
|
||||||
+ if [ "$MAILER" = "/usr/bin/xdg-email" ]; then
|
|
||||||
+ MAILTO="${MAILTO:-}${MAILTO:+&}attach="`echo "file://$2" | "${URI_ENCODE}"`
|
|
||||||
+ else
|
|
||||||
+ MAILTO="${MAILTO:-}${MAILTO:+&}attachment="`echo "file://$2" | "${URI_ENCODE}"`
|
|
||||||
+ fi
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,112 +0,0 @@
|
|||||||
From f276ca939deb3ee19d171b8541cd18baa4eec3d1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
||||||
Date: Fri, 1 Jul 2016 14:38:54 +0100
|
|
||||||
Subject: [PATCH] don't autocapitalize words that follow a field mark
|
|
||||||
|
|
||||||
Change-Id: Ia8efa88aaf47edba9a590c858d0ea30d7bfe2977
|
|
||||||
---
|
|
||||||
editeng/qa/unit/core-test.cxx | 22 ++++++++++++++++++++++
|
|
||||||
editeng/source/misc/svxacorr.cxx | 18 ++++++++++++------
|
|
||||||
2 files changed, 34 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
|
|
||||||
index d303805..14f06fe 100644
|
|
||||||
--- a/editeng/qa/unit/core-test.cxx
|
|
||||||
+++ b/editeng/qa/unit/core-test.cxx
|
|
||||||
@@ -340,6 +340,28 @@ void Test::testAutocorrect()
|
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(sExpected, aFoo.getResult());
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ {
|
|
||||||
+ OUString sInput("Test. test");
|
|
||||||
+ sal_Unicode cNextChar(' ');
|
|
||||||
+ OUString sExpected("Test. Test ");
|
|
||||||
+
|
|
||||||
+ TestAutoCorrDoc aFoo(sInput, LANGUAGE_ENGLISH_US);
|
|
||||||
+ aAutoCorrect.DoAutoCorrect(aFoo, sInput, sInput.getLength(), cNextChar, true);
|
|
||||||
+
|
|
||||||
+ CPPUNIT_ASSERT_MESSAGE("autocorrect", aFoo.getResult() == sExpected);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ {
|
|
||||||
+ OUString sInput("Test. \x01 test");
|
|
||||||
+ sal_Unicode cNextChar(' ');
|
|
||||||
+ OUString sExpected("Test. \x01 test ");
|
|
||||||
+
|
|
||||||
+ TestAutoCorrDoc aFoo(sInput, LANGUAGE_ENGLISH_US);
|
|
||||||
+ aAutoCorrect.DoAutoCorrect(aFoo, sInput, sInput.getLength(), cNextChar, true);
|
|
||||||
+
|
|
||||||
+ CPPUNIT_ASSERT_MESSAGE("autocorrect", aFoo.getResult() == sExpected);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
|
|
||||||
index d736d94..11e56ef 100644
|
|
||||||
--- a/editeng/source/misc/svxacorr.cxx
|
|
||||||
+++ b/editeng/source/misc/svxacorr.cxx
|
|
||||||
@@ -102,6 +102,12 @@ static inline bool IsWordDelim( const sal_Unicode c )
|
|
||||||
cNonBreakingSpace == c || 0x2011 == c || 0x1 == c;
|
|
||||||
}
|
|
||||||
|
|
||||||
+static inline bool IsAutoCapitalizeWordDelim( const sal_Unicode c )
|
|
||||||
+{
|
|
||||||
+ return ' ' == c || '\t' == c || 0x0a == c ||
|
|
||||||
+ cNonBreakingSpace == c || 0x2011 == c;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static inline bool IsLowerLetter( sal_Int32 nCharType )
|
|
||||||
{
|
|
||||||
return CharClass::isLetterType( nCharType ) &&
|
|
||||||
@@ -855,9 +861,9 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
|
|
||||||
|
|
||||||
if( !bAtStart ) // Still no beginning of a paragraph?
|
|
||||||
{
|
|
||||||
- if ( IsWordDelim( *pStr ) )
|
|
||||||
+ if (IsAutoCapitalizeWordDelim(*pStr))
|
|
||||||
{
|
|
||||||
- while( ! ( bAtStart = (pStart == pStr--) ) && IsWordDelim( *pStr ) )
|
|
||||||
+ while (!(bAtStart = (pStart == pStr--)) && IsAutoCapitalizeWordDelim(*pStr))
|
|
||||||
;
|
|
||||||
}
|
|
||||||
// Asian full stop, full width full stop, full width exclamation mark
|
|
||||||
@@ -888,7 +894,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
|
|
||||||
|
|
||||||
do { // overwrite all blanks
|
|
||||||
--pStr;
|
|
||||||
- if( !IsWordDelim( *pStr ))
|
|
||||||
+ if (!IsAutoCapitalizeWordDelim(*pStr))
|
|
||||||
break;
|
|
||||||
} while( ! ( bAtStart = (pStart == pStr) ) );
|
|
||||||
|
|
||||||
@@ -983,7 +989,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
|
|
||||||
else
|
|
||||||
bAlphaFnd = true;
|
|
||||||
}
|
|
||||||
- else if( bAlphaFnd || IsWordDelim( *pTmpStr ) )
|
|
||||||
+ else if (bAlphaFnd || IsAutoCapitalizeWordDelim(*pTmpStr))
|
|
||||||
break;
|
|
||||||
|
|
||||||
if( pTmpStr == pStart )
|
|
||||||
@@ -999,7 +1005,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
|
|
||||||
bool bNumericOnly = '0' <= *(pStr+1) && *(pStr+1) <= '9';
|
|
||||||
|
|
||||||
// Search for the beginning of the word
|
|
||||||
- while( !IsWordDelim( *pStr ))
|
|
||||||
+ while (!IsAutoCapitalizeWordDelim(*pStr))
|
|
||||||
{
|
|
||||||
if( bNumericOnly && rCC.isLetter( aText, pStr - pStart ) )
|
|
||||||
bNumericOnly = false;
|
|
||||||
@@ -1013,7 +1019,7 @@ bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
|
|
||||||
if( bNumericOnly ) // consists of only numbers, then not
|
|
||||||
return false;
|
|
||||||
|
|
||||||
- if( IsWordDelim( *pStr ))
|
|
||||||
+ if (IsAutoCapitalizeWordDelim(*pStr))
|
|
||||||
++pStr;
|
|
||||||
|
|
||||||
OUString sWord;
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,82 +0,0 @@
|
|||||||
From 17f749afd75c407bf7adae9b8e15276de14ef5d5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
||||||
Date: Thu, 29 Sep 2016 10:09:02 +0100
|
|
||||||
Subject: [PATCH] only date autofilter menus need the space for the tree
|
|
||||||
expanders
|
|
||||||
|
|
||||||
so for lists that don't include dates then drop the tree view bits
|
|
||||||
to save space to the left of the entries
|
|
||||||
|
|
||||||
Change-Id: I44f624d8a06d578674806813239a408466c87d70
|
|
||||||
---
|
|
||||||
sc/source/ui/cctrl/checklistmenu.cxx | 14 ++++++++++----
|
|
||||||
sc/source/ui/inc/checklistmenu.hxx | 1 +
|
|
||||||
sc/source/ui/view/gridwin.cxx | 1 +
|
|
||||||
3 files changed, 12 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
|
|
||||||
index a017cda..0b5174e 100644
|
|
||||||
--- a/sc/source/ui/cctrl/checklistmenu.cxx
|
|
||||||
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
|
|
||||||
@@ -877,7 +877,7 @@ void ScCheckListMenuWindow::CancelButton::Click()
|
|
||||||
ScCheckListMenuWindow::ScCheckListMenuWindow(vcl::Window* pParent, ScDocument* pDoc) :
|
|
||||||
ScMenuFloatingWindow(pParent, pDoc),
|
|
||||||
maEdSearch(VclPtr<ScSearchEdit>::Create(this)),
|
|
||||||
- maChecks(VclPtr<ScCheckListBox>::Create(this, WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT) ),
|
|
||||||
+ maChecks(VclPtr<ScCheckListBox>::Create(this)),
|
|
||||||
maChkToggleAll(VclPtr<TriStateBox>::Create(this, 0)),
|
|
||||||
maBtnSelectSingle(VclPtr<ImageButton>::Create(this, 0)),
|
|
||||||
maBtnUnselectSingle(VclPtr<ImageButton>::Create(this, 0)),
|
|
||||||
@@ -905,9 +905,6 @@ ScCheckListMenuWindow::ScCheckListMenuWindow(vcl::Window* pParent, ScDocument* p
|
|
||||||
|
|
||||||
maEdSearch->SetTabStopsContainer( &maTabStops );
|
|
||||||
maChecks->SetTabStopsContainer( &maTabStops );
|
|
||||||
-
|
|
||||||
- // Enable type-ahead search in the check list box.
|
|
||||||
- maChecks->SetStyle(maChecks->GetStyle() | WB_QUICK_SEARCH);
|
|
||||||
}
|
|
||||||
|
|
||||||
ScCheckListMenuWindow::~ScCheckListMenuWindow()
|
|
||||||
@@ -1831,6 +1828,15 @@ void ScSearchEdit::MouseButtonDown(const MouseEvent& rMEvt)
|
|
||||||
mpTabStops->SetTabStop( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
+void ScCheckListMenuWindow::setHasDates(bool bHasDates)
|
|
||||||
+{
|
|
||||||
+ // WB_QUICK_SEARCH Enables type-ahead search in the check list box.
|
|
||||||
+ if (bHasDates)
|
|
||||||
+ maChecks->SetStyle(WB_QUICK_SEARCH | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT);
|
|
||||||
+ else
|
|
||||||
+ maChecks->SetStyle(WB_QUICK_SEARCH | WB_HASBUTTONS);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void ScCheckListMenuWindow::initMembers()
|
|
||||||
{
|
|
||||||
size_t n = maMembers.size();
|
|
||||||
diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx
|
|
||||||
index 6994bc1..856a607 100644
|
|
||||||
--- a/sc/source/ui/inc/checklistmenu.hxx
|
|
||||||
+++ b/sc/source/ui/inc/checklistmenu.hxx
|
|
||||||
@@ -325,6 +325,7 @@ public:
|
|
||||||
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
|
|
||||||
|
|
||||||
void setMemberSize(size_t n);
|
|
||||||
+ void setHasDates(bool bHasDates);
|
|
||||||
void addDateMember(const OUString& rName, double nVal, bool bVisible);
|
|
||||||
void addMember(const OUString& rName, bool bVisible);
|
|
||||||
void initMembers();
|
|
||||||
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
|
|
||||||
index 6e4338c..34a4914 100644
|
|
||||||
--- a/sc/source/ui/view/gridwin.cxx
|
|
||||||
+++ b/sc/source/ui/view/gridwin.cxx
|
|
||||||
@@ -714,6 +714,7 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow)
|
|
||||||
std::vector<ScTypedStrData> aStrings;
|
|
||||||
pDoc->GetFilterEntries(nCol, nRow, nTab, aStrings, bHasDates);
|
|
||||||
|
|
||||||
+ mpAutoFilterPopup->setHasDates(bHasDates);
|
|
||||||
mpAutoFilterPopup->setMemberSize(aStrings.size());
|
|
||||||
std::vector<ScTypedStrData>::const_iterator it = aStrings.begin(), itEnd = aStrings.end();
|
|
||||||
for (; it != itEnd; ++it)
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
Loading…
Reference in new issue