diff options
author | Noel Grandin <noel@peralex.com> | 2013-04-25 11:02:24 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-04-25 11:03:15 +0200 |
commit | 746784e16f31133e4dc4e062fa5b7f1620e8cda6 (patch) | |
tree | a5cd6a24db5fbc390d50c1ab502c81f05fc388aa | |
parent | e894e57aabceb0b2ccd69d129b5223e2a28596fa (diff) |
fdo#46808 Convert awt::Pointer to new style
Change-Id: Ic2ff491e656ab7bcf0bd5994b601818a26478243
-rw-r--r-- | forms/source/inc/services.hxx | 1 | ||||
-rw-r--r-- | offapi/UnoApi_offapi.mk | 1 | ||||
-rw-r--r-- | offapi/com/sun/star/awt/Pointer.idl | 38 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowviewimpl.cxx | 5 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterPaneBorderManager.cxx | 6 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterSlideShowView.cxx | 8 |
6 files changed, 44 insertions, 15 deletions
diff --git a/forms/source/inc/services.hxx b/forms/source/inc/services.hxx index dc5d4c3789d9..446ae2435747 100644 --- a/forms/source/inc/services.hxx +++ b/forms/source/inc/services.hxx @@ -206,7 +206,6 @@ namespace frm // ----------------------- // misc // ----------------------- - #define SRV_AWT_POINTER "com.sun.star.awt.Pointer" #define SRV_AWT_IMAGEPRODUCER "com.sun.star.awt.ImageProducer" #define SRV_SDB_ROWSET "com.sun.star.sdb.RowSet" diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index ed72206f6da9..4b6492d24017 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -50,6 +50,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/awt,\ DialogProvider \ DialogProvider2 \ MenuBar \ + Pointer \ PopupMenu \ TabController \ Toolkit \ diff --git a/offapi/com/sun/star/awt/Pointer.idl b/offapi/com/sun/star/awt/Pointer.idl new file mode 100644 index 000000000000..04e96ddb3769 --- /dev/null +++ b/offapi/com/sun/star/awt/Pointer.idl @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_awt_Pointer_idl__ +#define __com_sun_star_awt_Pointer_idl__ + +#include <com/sun/star/awt/XPointer.idl> + + +module com { module sun { module star { module awt { + + +/** + @since LibreOffice 4.1 + */ +service Pointer : XPointer; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/slideshow/slideshowviewimpl.cxx b/sd/source/ui/slideshow/slideshowviewimpl.cxx index 032345b5491c..5a1cffb12ae7 100644 --- a/sd/source/ui/slideshow/slideshowviewimpl.cxx +++ b/sd/source/ui/slideshow/slideshowviewimpl.cxx @@ -21,6 +21,7 @@ #include <slideshowimpl.hxx> #include <osl/mutex.hxx> +#include <com/sun/star/awt/Pointer.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <basegfx/polygon/b2dpolygon.hxx> @@ -657,9 +658,7 @@ void SlideShowView::init() Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW ); - if( xFactory.is() ) - mxPointer.set( xFactory->createInstance( "com.sun.star.awt.Pointer" ), - uno::UNO_QUERY ); + mxPointer = awt::Pointer::create( ::comphelper::getProcessComponentContext() ); getTransformation(); diff --git a/sdext/source/presenter/PresenterPaneBorderManager.cxx b/sdext/source/presenter/PresenterPaneBorderManager.cxx index 5cb992a6d1de..0e63720c040a 100644 --- a/sdext/source/presenter/PresenterPaneBorderManager.cxx +++ b/sdext/source/presenter/PresenterPaneBorderManager.cxx @@ -83,11 +83,7 @@ PresenterPaneBorderManager::PresenterPaneBorderManager ( Reference<lang::XMultiComponentFactory> xFactory (rxContext->getServiceManager()); if (xFactory.is()) { - mxPointer = Reference<awt::XPointer>( - xFactory->createInstanceWithContext( - OUString("com.sun.star.awt.Pointer"), - rxContext), - UNO_QUERY_THROW); + mxPointer = awt::Pointer::create(rxContext); mxPresenterHelper = Reference<drawing::XPresenterHelper>( xFactory->createInstanceWithContext( diff --git a/sdext/source/presenter/PresenterSlideShowView.cxx b/sdext/source/presenter/PresenterSlideShowView.cxx index 34457f18d9d8..1a663fcf036a 100644 --- a/sdext/source/presenter/PresenterSlideShowView.cxx +++ b/sdext/source/presenter/PresenterSlideShowView.cxx @@ -26,6 +26,7 @@ #include "PresenterPaneContainer.hxx" #include <com/sun/star/awt/InvalidateStyle.hpp> #include <com/sun/star/awt/PosSize.hpp> +#include <com/sun/star/awt/Pointer.hpp> #include <com/sun/star/awt/Toolkit.hpp> #include <com/sun/star/awt/WindowAttribute.hpp> #include <com/sun/star/awt/XWindow.hpp> @@ -465,12 +466,7 @@ void SAL_CALL PresenterSlideShowView::setMouseCursor(::sal_Int16 nPointerShape) // Create a pointer when it does not yet exist. if ( ! mxPointer.is()) { - Reference<lang::XMultiServiceFactory> xFactory ( - mxComponentContext, UNO_QUERY); - if (xFactory.is()) - mxPointer = Reference<awt::XPointer>( - xFactory->createInstance(OUString("com.sun.star.awt.Pointer")), - UNO_QUERY); + mxPointer = awt::Pointer::create(mxComponentContext); } // Set the pointer to the given shape and the window(peer) to the |