vcl/unx/generic/dtrans/X11_clipboard.cxx |    4 ++--
 vcl/unx/generic/dtrans/X11_clipboard.hxx |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 28bfc9ba5f64e2408b06e451c5ca7bbf23feeb19
Author: Noel Grandin <noel.gran...@collabora.co.uk>
Date:   Sat Apr 7 13:50:16 2018 +0200

    std::list->std::vector in X11Clipboard
    
    Change-Id: If63ba386c120579da1e85e9056a9cdc080c916fc
    Reviewed-on: https://gerrit.libreoffice.org/52541
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/vcl/unx/generic/dtrans/X11_clipboard.cxx 
b/vcl/unx/generic/dtrans/X11_clipboard.cxx
index c4173b138186..56d2a2217ea9 100644
--- a/vcl/unx/generic/dtrans/X11_clipboard.cxx
+++ b/vcl/unx/generic/dtrans/X11_clipboard.cxx
@@ -98,7 +98,7 @@ void X11Clipboard::fireChangedContentsEvent()
     fprintf( stderr, "X11Clipboard::fireChangedContentsEvent for %s (%" 
SAL_PRI_SIZET "u listeners)\n",
              OUStringToOString( m_xSelectionManager->getString( m_aSelection 
), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), m_aListeners.size() );
 #endif
-    ::std::list< Reference< XClipboardListener > > listeners( m_aListeners );
+    ::std::vector< Reference< XClipboardListener > > listeners( m_aListeners );
     aGuard.clear();
 
     ClipboardEvent aEvent( static_cast<OWeakObject*>(this), m_aContents);
@@ -190,7 +190,7 @@ void SAL_CALL X11Clipboard::addClipboardListener( const 
Reference< XClipboardLis
 void SAL_CALL X11Clipboard::removeClipboardListener( const Reference< 
XClipboardListener >& listener )
 {
     MutexGuard aGuard( m_xSelectionManager->getMutex() );
-    m_aListeners.remove( listener );
+    m_aListeners.erase( std::remove(m_aListeners.begin(), m_aListeners.end(), 
listener), m_aListeners.end() );
 }
 
 Reference< XTransferable > X11Clipboard::getTransferable()
diff --git a/vcl/unx/generic/dtrans/X11_clipboard.hxx 
b/vcl/unx/generic/dtrans/X11_clipboard.hxx
index 2f4e55b74773..beee3216bb51 100644
--- a/vcl/unx/generic/dtrans/X11_clipboard.hxx
+++ b/vcl/unx/generic/dtrans/X11_clipboard.hxx
@@ -42,7 +42,7 @@ namespace x11 {
         css::uno::Reference< css::datatransfer::clipboard::XClipboardOwner > 
m_aOwner;
 
         rtl::Reference<SelectionManager>                        
m_xSelectionManager;
-        ::std::list< css::uno::Reference< 
css::datatransfer::clipboard::XClipboardListener > > m_aListeners;
+        ::std::vector< css::uno::Reference< 
css::datatransfer::clipboard::XClipboardListener > > m_aListeners;
         Atom                                                    m_aSelection;
 
         X11Clipboard( SelectionManager& rManager, Atom aSelection );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to