From 6e8448cdf0541f017e8b54734dd0928e935c73fa Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Fri, 31 May 2019 16:34:37 +0000 Subject: Qt5 remove header using namespaces and Vcl prefix This is mainly about the using namespace in the Qt5Clipboard header. While at it get rid of the Vcl prefix. Change-Id: I62a804a83afe2feb4bf130eb5475790bc52365c4 Reviewed-on: https://gerrit.libreoffice.org/73287 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski --- vcl/qt5/Qt5DragAndDrop.cxx | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'vcl/qt5/Qt5DragAndDrop.cxx') diff --git a/vcl/qt5/Qt5DragAndDrop.cxx b/vcl/qt5/Qt5DragAndDrop.cxx index 42e61074a824..d22d35610ae7 100644 --- a/vcl/qt5/Qt5DragAndDrop.cxx +++ b/vcl/qt5/Qt5DragAndDrop.cxx @@ -22,8 +22,6 @@ #include using namespace com::sun::star; -using namespace com::sun::star::uno; -using namespace com::sun::star::lang; Qt5DnDTransferable::Qt5DnDTransferable(const QMimeData* pMimeData) : Qt5Transferable(QClipboard::Clipboard) @@ -56,7 +54,8 @@ css::uno::Any Qt5DnDTransferable::getTransferData(const css::datatransfer::DataF aStr += "\n"; } - Sequence aSeq(reinterpret_cast(aStr.c_str()), aStr.length()); + uno::Sequence aSeq(reinterpret_cast(aStr.c_str()), + aStr.length()); aAny <<= aSeq; } } @@ -85,7 +84,7 @@ std::vector Qt5DnDTransferable::getTransferDataFl else { aFlavor.MimeType = toOUString(rMimeType); - aFlavor.DataType = cppu::UnoType>::get(); + aFlavor.DataType = cppu::UnoType>::get(); aVector.push_back(aFlavor); } } @@ -113,8 +112,8 @@ void Qt5DragSource::initialize(const css::uno::Sequence& rArgumen { if (rArguments.getLength() < 2) { - throw RuntimeException("DragSource::initialize: Cannot install window event handler", - static_cast(this)); + throw uno::RuntimeException("DragSource::initialize: Cannot install window event handler", + static_cast(this)); } sal_IntPtr nFrame = 0; @@ -122,8 +121,8 @@ void Qt5DragSource::initialize(const css::uno::Sequence& rArgumen if (!nFrame) { - throw RuntimeException("DragSource::initialize: missing SalFrame", - static_cast(this)); + throw uno::RuntimeException("DragSource::initialize: missing SalFrame", + static_cast(this)); } m_pFrame = reinterpret_cast(nFrame); @@ -197,7 +196,7 @@ sal_Bool SAL_CALL Qt5DragSource::supportsService(OUString const& ServiceName) css::uno::Sequence SAL_CALL Qt5DragSource::getSupportedServiceNames() { - Sequence aRet{ "com.sun.star.datatransfer.dnd.Qt5DragSource" }; + uno::Sequence aRet{ "com.sun.star.datatransfer.dnd.Qt5DragSource" }; return aRet; } @@ -221,7 +220,7 @@ sal_Bool SAL_CALL Qt5DropTarget::supportsService(OUString const& ServiceName) css::uno::Sequence SAL_CALL Qt5DropTarget::getSupportedServiceNames() { - Sequence aRet{ "com.sun.star.datatransfer.dnd.Qt5DropTarget" }; + uno::Sequence aRet{ "com.sun.star.datatransfer.dnd.Qt5DropTarget" }; return aRet; } @@ -237,12 +236,12 @@ void Qt5DropTarget::deinitialize() m_bActive = false; } -void Qt5DropTarget::initialize(const Sequence& rArguments) +void Qt5DropTarget::initialize(const uno::Sequence& rArguments) { if (rArguments.getLength() < 2) { - throw RuntimeException("DropTarget::initialize: Cannot install window event handler", - static_cast(this)); + throw uno::RuntimeException("DropTarget::initialize: Cannot install window event handler", + static_cast(this)); } sal_IntPtr nFrame = 0; @@ -250,8 +249,8 @@ void Qt5DropTarget::initialize(const Sequence& rArguments) if (!nFrame) { - throw RuntimeException("DropTarget::initialize: missing SalFrame", - static_cast(this)); + throw uno::RuntimeException("DropTarget::initialize: missing SalFrame", + static_cast(this)); } mnDragAction = datatransfer::dnd::DNDConstants::ACTION_NONE; @@ -263,7 +262,7 @@ void Qt5DropTarget::initialize(const Sequence& rArguments) } void Qt5DropTarget::addDropTargetListener( - const Reference& xListener) + const uno::Reference& xListener) { ::osl::Guard<::osl::Mutex> aGuard(m_aMutex); @@ -271,7 +270,7 @@ void Qt5DropTarget::addDropTargetListener( } void Qt5DropTarget::removeDropTargetListener( - const Reference& xListener) + const uno::Reference& xListener) { ::osl::Guard<::osl::Mutex> aGuard(m_aMutex); -- cgit v1.2.3