include/svx/charmap.hxx | 2 +- svx/source/dialog/charmap.cxx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-)
New commits: commit a53c360a82b27b39e6e604024cd3015ab1ca92cc Author: Michael Weghorn <[email protected]> AuthorDate: Fri Feb 27 18:55:59 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Sat Feb 28 09:41:14 2026 +0100 cui: Don't use SystemClipboard service ctor in SvxShowCharSet Instead, simply use weld::Widget::get_clipboard to get the clipboard instance. Change-Id: I3f22a8b43103eaf43ed66e17f902800896a1e053 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200652 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx index e414c9d8b0ee..6c0be4bce165 100644 --- a/include/svx/charmap.hxx +++ b/include/svx/charmap.hxx @@ -91,7 +91,7 @@ public: virtual void SelectIndex( int index, bool bFocus = false ); void OutputIndex( int index ); void DeSelect(); - static void CopyToClipboard(const OUString& str); + void CopyToClipboard(const OUString& str); bool IsSelected(sal_uInt16 _nPos) const { return _nPos == mnSelectedIndex; } sal_uInt16 GetSelectIndexId() const { return sal::static_int_cast<sal_uInt16>(mnSelectedIndex); } static sal_uInt16 GetRowPos(sal_uInt16 _nPos); diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index fec4800f1599..9858f910c04e 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -43,7 +43,6 @@ #include <com/sun/star/accessibility/AccessibleEventId.hpp> #include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp> -#include <com/sun/star/datatransfer/clipboard/SystemClipboard.hpp> #include <officecfg/Office/Common.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequence.hxx> @@ -265,7 +264,7 @@ void SvxShowCharSet::createContextMenu(const Point& rPosition) void SvxShowCharSet::CopyToClipboard(const OUString& rOUStr) { css::uno::Reference<css::datatransfer::clipboard::XClipboard> xClipboard = - css::datatransfer::clipboard::SystemClipboard::create(comphelper::getProcessComponentContext()); + GetDrawingArea()->get_clipboard(); if (!xClipboard.is()) return;
