diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-04-01 21:32:15 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-04-02 12:36:29 +0200 |
commit | ff1bafa9755a1099f12cdf7c89dd62ec328dd223 (patch) | |
tree | 29261d3166a017332f073c9f882dd5ed53529146 /vcl | |
parent | b8485778b3acbca8db44d4cb1576de4ecee02de2 (diff) |
weld CrashReportDialog
Change-Id: Ifc4b606596db1469af03748da2d04659b8fa443a
Reviewed-on: https://gerrit.libreoffice.org/70124
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 1a1713568e9b..3a3864398f48 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -8927,6 +8927,25 @@ private: if (gtk_label_get_use_underline(pLabel)) m_aMnemonicLabels.push_back(pLabel); } + else if (GTK_IS_TEXT_VIEW(pWidget)) + { + GtkTextView* pTextView = GTK_TEXT_VIEW(pWidget); + if (m_pStringReplace != nullptr) + { + GtkTextBuffer* pBuffer = gtk_text_view_get_buffer(pTextView); + GtkTextIter start, end; + gtk_text_buffer_get_bounds(pBuffer, &start, &end); + char* pTextStr = gtk_text_buffer_get_text(pBuffer, &start, &end, true); + int nTextLen = pTextStr ? strlen(pTextStr) : 0; + if (nTextLen) + { + OUString sOldText = OUString(pTextStr, nTextLen, RTL_TEXTENCODING_UTF8); + OString sText(OUStringToOString((*m_pStringReplace)(sOldText), RTL_TEXTENCODING_UTF8)); + gtk_text_buffer_set_text(pBuffer, sText.getStr(), sText.getLength()); + } + g_free(pTextStr); + } + } else if (GTK_IS_WINDOW(pWidget)) { if (m_pStringReplace != nullptr) { |