use more XVclWindowPeer
Rather than using it's superclass XWindowPeer and implicitly relying on it being XVclWindowPeer and casting it everywhere. Change-Id: Icfb46f3b920d00f4a167a31803a71bbb0368d05c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149894 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
cd013e6671
commit
bfdf5d290b
@@ -24,7 +24,7 @@
|
||||
#include <com/sun/star/accessibility/AccessibleRole.hpp>
|
||||
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
|
||||
#include <com/sun/star/awt/XDevice.hpp>
|
||||
#include <com/sun/star/awt/XWindowPeer.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
|
||||
#include <comphelper/accessiblecontexthelper.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <com/sun/star/accessibility/AccessibleRole.hpp>
|
||||
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
|
||||
#include <com/sun/star/awt/XDevice.hpp>
|
||||
#include <com/sun/star/awt/XWindowPeer.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
|
||||
#include <comphelper/accessiblecontexthelper.hxx>
|
||||
#include <unotools/accessiblerelationsethelper.hxx>
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <dlgeddef.hxx>
|
||||
#include <dlgedview.hxx>
|
||||
#include <dlgedobj.hxx>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
|
||||
#include <com/sun/star/accessibility/AccessibleRole.hpp>
|
||||
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <dlgedpage.hxx>
|
||||
#include <dlgedview.hxx>
|
||||
#include <dlgedobj.hxx>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
|
||||
#include <com/sun/star/accessibility/AccessibleRole.hpp>
|
||||
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
|
||||
|
||||
@@ -103,7 +103,7 @@ private:
|
||||
bool bDoSyntaxHighlight;
|
||||
bool bDelayHighlight;
|
||||
|
||||
virtual css::uno::Reference< css::awt::XWindowPeer > GetComponentInterface(bool bCreate = true) override;
|
||||
virtual css::uno::Reference< css::awt::XVclWindowPeer > GetComponentInterface(bool bCreate = true) override;
|
||||
CodeCompleteDataCache aCodeCompleteCache;
|
||||
VclPtr<CodeCompleteWindow> pCodeCompleteWnd;
|
||||
OUString GetActualSubName( sal_uInt32 nLine ); // gets the actual subroutine name according to line number
|
||||
|
||||
@@ -2091,10 +2091,10 @@ void ComplexEditorWindow::SetLineNumberDisplay(bool b)
|
||||
Resize();
|
||||
}
|
||||
|
||||
uno::Reference< awt::XWindowPeer >
|
||||
uno::Reference< awt::XVclWindowPeer >
|
||||
EditorWindow::GetComponentInterface(bool bCreate)
|
||||
{
|
||||
uno::Reference< awt::XWindowPeer > xPeer(
|
||||
uno::Reference< awt::XVclWindowPeer > xPeer(
|
||||
Window::GetComponentInterface(false));
|
||||
if (!xPeer.is() && bCreate)
|
||||
{
|
||||
|
||||
@@ -62,7 +62,7 @@ TextWindowPeer::CreateAccessibleContext() {
|
||||
|
||||
}
|
||||
|
||||
css::uno::Reference<css::awt::XWindowPeer> basctl::createTextWindowPeer(
|
||||
css::uno::Reference<css::awt::XVclWindowPeer> basctl::createTextWindowPeer(
|
||||
TextView & view)
|
||||
{
|
||||
return new TextWindowPeer(view);
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
|
||||
namespace com::sun::star::awt
|
||||
{
|
||||
class XWindowPeer;
|
||||
class XVclWindowPeer;
|
||||
}
|
||||
class TextView;
|
||||
|
||||
namespace basctl
|
||||
{
|
||||
css::uno::Reference<css::awt::XWindowPeer> createTextWindowPeer(TextView& view);
|
||||
css::uno::Reference<css::awt::XVclWindowPeer> createTextWindowPeer(TextView& view);
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#include <com/sun/star/awt/Toolkit.hpp>
|
||||
#include <com/sun/star/awt/UnoControlDialog.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/resource/StringResource.hpp>
|
||||
#include <com/sun/star/util/XCloneable.hpp>
|
||||
#include <com/sun/star/util/NumberFormatsSupplier.hpp>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
#include <comphelper/servicehelper.hxx>
|
||||
#include <BaseCoordinateSystem.hxx>
|
||||
|
||||
#include <com/sun/star/awt/XWindowPeer.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/frame/XController2.hpp>
|
||||
#include <com/sun/star/util/CloseVetoException.hpp>
|
||||
#include <com/sun/star/util/XModeChangeBroadcaster.hpp>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <svl/itemprop.hxx>
|
||||
#include <toolkit/helper/vclunohelper.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/sdbc/ResultSetType.hpp>
|
||||
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
|
||||
#include <com/sun/star/sdbc/SQLException.hpp>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <vcl/svapp.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <com/sun/star/awt/XTextComponent.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/form/XConfirmDeleteListener.hpp>
|
||||
#include <com/sun/star/form/runtime/XFormController.hpp>
|
||||
#include <com/sun/star/beans/PropertyValue.hpp>
|
||||
|
||||
@@ -154,7 +154,7 @@ bool lcl_checkUIElement(const uno::Reference< ui::XUIElement >& xUIElement, awt:
|
||||
return bRet;
|
||||
}
|
||||
|
||||
uno::Reference< awt::XWindowPeer > createToolkitWindow( const uno::Reference< uno::XComponentContext >& rxContext, const uno::Reference< awt::XWindowPeer >& rParent, const char* pService )
|
||||
uno::Reference< awt::XVclWindowPeer > createToolkitWindow( const uno::Reference< uno::XComponentContext >& rxContext, const uno::Reference< awt::XVclWindowPeer >& rParent, const char* pService )
|
||||
{
|
||||
uno::Reference< awt::XToolkit2 > xToolkit = awt::Toolkit::create( rxContext );
|
||||
|
||||
@@ -169,8 +169,9 @@ uno::Reference< awt::XWindowPeer > createToolkitWindow( const uno::Reference< un
|
||||
|
||||
// create an awt window
|
||||
uno::Reference< awt::XWindowPeer > xPeer = xToolkit->createWindow( aDescriptor );
|
||||
|
||||
return xPeer;
|
||||
uno::Reference< awt::XVclWindowPeer > xVclPeer(xPeer, uno::UNO_QUERY);
|
||||
assert(xVclPeer || !xPeer);
|
||||
return xVclPeer;
|
||||
}
|
||||
|
||||
// convert alignment constant to vcl's WindowAlign type
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <com/sun/star/awt/XWindowPeer.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||
#include <com/sun/star/frame/XFrame.hpp>
|
||||
#include <com/sun/star/ui/XUIElement.hpp>
|
||||
@@ -50,7 +50,7 @@ vcl::Window* getWindowFromXUIElement( const css::uno::Reference< css::ui::XUIEle
|
||||
SystemWindow* getTopSystemWindow( const css::uno::Reference< css::awt::XWindow >& xWindow );
|
||||
bool equalRectangles( const css::awt::Rectangle& rRect1, const css::awt::Rectangle& rRect2 );
|
||||
bool lcl_checkUIElement(const css::uno::Reference< css::ui::XUIElement >& xUIElement,css::awt::Rectangle& _rPosSize, css::uno::Reference< css::awt::XWindow >& _xWindow);
|
||||
css::uno::Reference< css::awt::XWindowPeer > createToolkitWindow( const css::uno::Reference< css::uno::XComponentContext >& rxContext, const css::uno::Reference< css::awt::XWindowPeer >& rParent, const char* pService );
|
||||
css::uno::Reference< css::awt::XVclWindowPeer > createToolkitWindow( const css::uno::Reference< css::uno::XComponentContext >& rxContext, const css::uno::Reference< css::awt::XVclWindowPeer >& rParent, const char* pService );
|
||||
WindowAlign ImplConvertAlignment( css::ui::DockingArea aAlignment );
|
||||
std::u16string_view getElementTypeFromResourceURL( std::u16string_view aResourceURL );
|
||||
void parseResourceURL( std::u16string_view aResourceURL, OUString& aElementType, OUString& aElementName );
|
||||
|
||||
@@ -431,7 +431,7 @@ void LayoutManager::implts_reset( bool bAttached )
|
||||
if ( bAttached )
|
||||
{
|
||||
xToolbarManager->attach( xFrame, xModCfgMgr, xDokCfgMgr, xPersistentWindowState );
|
||||
uno::Reference< awt::XWindowPeer > xParent( xContainerWindow, UNO_QUERY );
|
||||
uno::Reference< awt::XVclWindowPeer > xParent( xContainerWindow, UNO_QUERY );
|
||||
xToolbarManager->setParentWindow( xParent );
|
||||
if ( bAutomaticToolbars )
|
||||
xToolbarManager->createStaticToolbars();
|
||||
@@ -1373,7 +1373,7 @@ void LayoutManager::implts_reparentChildWindows()
|
||||
aWriteLock.reset();
|
||||
ToolbarLayoutManager* pToolbarManager = m_xToolbarManager.get();
|
||||
if ( pToolbarManager )
|
||||
pToolbarManager->setParentWindow( uno::Reference< awt::XWindowPeer >( xContainerWindow, uno::UNO_QUERY ));
|
||||
pToolbarManager->setParentWindow( uno::Reference< awt::XVclWindowPeer >( xContainerWindow, uno::UNO_QUERY ));
|
||||
aWriteLock.clear();
|
||||
}
|
||||
|
||||
@@ -2788,7 +2788,7 @@ void SAL_CALL LayoutManager::disposing( const lang::EventObject& rEvent )
|
||||
ToolbarLayoutManager* pToolbarManager = m_xToolbarManager.get();
|
||||
if (pToolbarManager)
|
||||
{
|
||||
uno::Reference<awt::XWindowPeer> aEmptyWindowPeer;
|
||||
uno::Reference<awt::XVclWindowPeer> aEmptyWindowPeer;
|
||||
pToolbarManager->setParentWindow(aEmptyWindowPeer);
|
||||
}
|
||||
impl_clearUpMenuBar();
|
||||
|
||||
@@ -1002,7 +1002,7 @@ void ToolbarLayoutManager::resetDockingArea()
|
||||
}
|
||||
|
||||
void ToolbarLayoutManager::setParentWindow(
|
||||
const uno::Reference< awt::XWindowPeer >& xParentWindow )
|
||||
const uno::Reference< awt::XVclWindowPeer >& xParentWindow )
|
||||
{
|
||||
static const char DOCKINGAREASTRING[] = "dockingarea";
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper< css::awt::XDockableW
|
||||
const css::uno::Reference< css::ui::XUIConfigurationManager >& xDocCfgMgr,
|
||||
const css::uno::Reference< css::container::XNameAccess >& xPersistentWindowState );
|
||||
|
||||
void setParentWindow( const css::uno::Reference< css::awt::XWindowPeer >& xParentWindow );
|
||||
void setParentWindow( const css::uno::Reference< css::awt::XVclWindowPeer >& xParentWindow );
|
||||
void setDockingAreaOffsets(const ::tools::Rectangle& rOffsets);
|
||||
|
||||
void resetDockingArea();
|
||||
|
||||
@@ -77,8 +77,7 @@ class TOOLKIT_DLLPUBLIC UnoControl : public UnoControl_Base
|
||||
private:
|
||||
::osl::Mutex maMutex;
|
||||
|
||||
css::uno::Reference< css::awt::XWindowPeer > mxPeer;
|
||||
css::uno::Reference< css::awt::XVclWindowPeer > mxVclWindowPeer; // just to avoid the query_interface thing
|
||||
css::uno::Reference< css::awt::XVclWindowPeer > mxVclWindowPeer;
|
||||
|
||||
protected:
|
||||
EventListenerMultiplexer maDisposeListeners;
|
||||
@@ -112,7 +111,7 @@ protected:
|
||||
virtual void updateFromModel();
|
||||
void peerCreated();
|
||||
bool ImplCheckLocalize( OUString& _rPossiblyLocalizable );
|
||||
css::uno::Reference< css::awt::XWindowPeer > ImplGetCompatiblePeer();
|
||||
css::uno::Reference< css::awt::XVclWindowPeer > ImplGetCompatiblePeer();
|
||||
virtual void ImplSetPeerProperty( const OUString& rPropName, const css::uno::Any& rVal );
|
||||
virtual void PrepareWindowDescriptor( css::awt::WindowDescriptor& rDesc );
|
||||
virtual void ImplModelPropertiesChanged( const css::uno::Sequence< css::beans::PropertyChangeEvent >& rEvents );
|
||||
@@ -123,10 +122,9 @@ protected:
|
||||
void DisposeAccessibleContext(css::uno::Reference<
|
||||
css::lang::XComponent> const& xContext);
|
||||
|
||||
void setPeer( const css::uno::Reference< css::awt::XWindowPeer >& _xPeer)
|
||||
void setPeer( const css::uno::Reference< css::awt::XVclWindowPeer >& _xPeer)
|
||||
{
|
||||
mxPeer = _xPeer;
|
||||
mxVclWindowPeer = css::uno::Reference< css::awt::XVclWindowPeer >(mxPeer,css::uno::UNO_QUERY); // just to avoid the query_interface thing
|
||||
mxVclWindowPeer = _xPeer;
|
||||
}
|
||||
|
||||
virtual bool requiresNewPeer( const OUString& _rPropertyName ) const;
|
||||
@@ -220,6 +218,8 @@ public:
|
||||
// XStyleSettingsSupplier
|
||||
virtual css::uno::Reference< css::awt::XStyleSettings > SAL_CALL getStyleSettings() override;
|
||||
|
||||
css::uno::Reference< css::awt::XVclWindowPeer > getVclWindowPeer();
|
||||
|
||||
protected:
|
||||
// css::beans::XPropertiesChangeListener
|
||||
void SAL_CALL propertiesChange( const css::uno::Sequence< css::beans::PropertyChangeEvent >& evt ) override;
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace com::sun::star::awt {
|
||||
class XPopupMenu;
|
||||
class XToolkit;
|
||||
class XWindow;
|
||||
class XWindowPeer;
|
||||
class XVclWindowPeer;
|
||||
}
|
||||
namespace com::sun::star::accessibility {
|
||||
class XAccessible;
|
||||
@@ -56,8 +56,8 @@ public:
|
||||
virtual void ReleaseAllGraphics( OutputDevice* pOutDev ) = 0;
|
||||
|
||||
// Window
|
||||
virtual css::uno::Reference<css::awt::XWindowPeer> GetWindowInterface( vcl::Window* pWindow ) = 0;
|
||||
virtual void SetWindowInterface( vcl::Window* pWindow, const css::uno::Reference< css::awt::XWindowPeer > & xIFace ) = 0;
|
||||
virtual css::uno::Reference<css::awt::XVclWindowPeer> GetWindowInterface( vcl::Window* pWindow ) = 0;
|
||||
virtual void SetWindowInterface( vcl::Window* pWindow, const css::uno::Reference< css::awt::XVclWindowPeer > & xIFace ) = 0;
|
||||
virtual VclPtr<vcl::Window> GetWindow(const css::uno::Reference<css::awt::XWindow>& rxWindow) = 0;
|
||||
|
||||
// PopupMenu
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace com::sun::star {
|
||||
class XSpriteCanvas;
|
||||
}
|
||||
namespace awt {
|
||||
class XWindowPeer;
|
||||
class XVclWindowPeer;
|
||||
}
|
||||
namespace uno {
|
||||
class Any;
|
||||
@@ -1093,10 +1093,10 @@ public:
|
||||
virtual const SystemEnvData* GetSystemData() const;
|
||||
|
||||
// API to set/query the component interfaces
|
||||
virtual css::uno::Reference< css::awt::XWindowPeer >
|
||||
virtual css::uno::Reference< css::awt::XVclWindowPeer >
|
||||
GetComponentInterface( bool bCreate = true );
|
||||
|
||||
void SetComponentInterface( css::uno::Reference< css::awt::XWindowPeer > const & xIFace );
|
||||
void SetComponentInterface( css::uno::Reference< css::awt::XVclWindowPeer > const & xIFace );
|
||||
|
||||
void SetUseFrameData(bool bUseFrameData);
|
||||
|
||||
@@ -1216,7 +1216,7 @@ public:
|
||||
|
||||
// set and retrieve for Toolkit
|
||||
VCLXWindow* GetWindowPeer() const;
|
||||
void SetWindowPeer( css::uno::Reference< css::awt::XWindowPeer > const & xPeer, VCLXWindow* pVCLXWindow );
|
||||
void SetWindowPeer( css::uno::Reference< css::awt::XVclWindowPeer > const & xPeer, VCLXWindow* pVCLXWindow );
|
||||
|
||||
// remember if it was generated by Toolkit
|
||||
bool IsCreatedWithToolkit() const;
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
#include <com/sun/star/sheet/TableValidationVisibility.hpp>
|
||||
#include <com/sun/star/awt/KeyModifier.hpp>
|
||||
#include <com/sun/star/awt/MouseButton.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/script/vba/VBAEventId.hpp>
|
||||
#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
|
||||
#include <com/sun/star/text/textfield/Type.hpp>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "PresenterHelper.hxx"
|
||||
#include "PresenterCanvas.hxx"
|
||||
#include <cppcanvas/vclfactory.hxx>
|
||||
#include <com/sun/star/awt/XWindowPeer.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||
#include <toolkit/helper/vclunohelper.hxx>
|
||||
#include <vcl/window.hxx>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <com/sun/star/awt/XWindowPeer.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/frame/XDispatch.hpp>
|
||||
#include <com/sun/star/frame/Frame.hpp>
|
||||
#include <com/sun/star/frame/XFrame2.hpp>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <com/sun/star/frame/XFrame.hpp>
|
||||
#include <com/sun/star/uno/Reference.h>
|
||||
#include <com/sun/star/awt/PopupMenuDirection.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/frame/XPopupMenuController.hpp>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <comphelper/propertyvalue.hxx>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <com/sun/star/awt/XWindowPeer.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/embed/Aspects.hpp>
|
||||
#include <com/sun/star/embed/EmbedStates.hpp>
|
||||
#include <com/sun/star/embed/UnreachableStateException.hpp>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <time.h>
|
||||
#include <sfx2/sfxbasecontroller.hxx>
|
||||
#include <com/sun/star/awt/XWindowPeer.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/beans/XPropertySet.hpp>
|
||||
#include <com/sun/star/util/XCloseable.hpp>
|
||||
#include <com/sun/star/util/XCloseBroadcaster.hpp>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <com/sun/star/awt/KeyModifier.hpp>
|
||||
#include <com/sun/star/awt/XKeyHandler.hpp>
|
||||
#include <com/sun/star/awt/XMouseClickHandler.hpp>
|
||||
#include <com/sun/star/awt/XWindowPeer.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/uno/XInterface.hpp>
|
||||
|
||||
#include <comphelper/interfacecontainer3.hxx>
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
#include <com/sun/star/frame/XFrame.hpp>
|
||||
#include <com/sun/star/frame/XPopupMenuController.hpp>
|
||||
#include <com/sun/star/awt/PopupMenuDirection.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/util/URL.hpp>
|
||||
#include <com/sun/star/beans/PropertyValue.hpp>
|
||||
#include <com/sun/star/beans/XPropertySet.hpp>
|
||||
|
||||
@@ -26,7 +26,7 @@ class MultiLineEdit final : public VclMultiLineEdit
|
||||
public:
|
||||
MultiLineEdit( vcl::Window* pParent, WinBits nWinStyle );
|
||||
|
||||
virtual css::uno::Reference< css::awt::XWindowPeer > GetComponentInterface(bool bCreate = true) override;
|
||||
virtual css::uno::Reference< css::awt::XVclWindowPeer > GetComponentInterface(bool bCreate = true) override;
|
||||
};
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
||||
@@ -53,7 +53,7 @@ protected:
|
||||
|
||||
public:
|
||||
UnoControlContainer();
|
||||
UnoControlContainer( const css::uno::Reference< css::awt::XWindowPeer >& xPeer );
|
||||
UnoControlContainer( const css::uno::Reference< css::awt::XVclWindowPeer >& xPeer );
|
||||
virtual ~UnoControlContainer() override;
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include <com/sun/star/awt/XToolkit.hpp>
|
||||
#include <com/sun/star/awt/XGraphics.hpp>
|
||||
#include <com/sun/star/awt/XWindowPeer.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/accessibility/XAccessible.hpp>
|
||||
|
||||
#include <vcl/toolkit/unowrap.hxx>
|
||||
@@ -51,8 +51,8 @@ public:
|
||||
virtual void ReleaseAllGraphics( OutputDevice* pOutDev ) override;
|
||||
|
||||
// Window
|
||||
virtual css::uno::Reference< css::awt::XWindowPeer> GetWindowInterface( vcl::Window* pWindow ) override;
|
||||
virtual void SetWindowInterface( vcl::Window* pWindow, const css::uno::Reference< css::awt::XWindowPeer> & xIFace ) override;
|
||||
virtual css::uno::Reference< css::awt::XVclWindowPeer> GetWindowInterface( vcl::Window* pWindow ) override;
|
||||
virtual void SetWindowInterface( vcl::Window* pWindow, const css::uno::Reference< css::awt::XVclWindowPeer> & xIFace ) override;
|
||||
virtual VclPtr<vcl::Window> GetWindow(const css::uno::Reference<css::awt::XWindow>& rxWindow) override;
|
||||
|
||||
// Menu
|
||||
|
||||
@@ -1843,7 +1843,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow(
|
||||
|
||||
SolarMutexGuard aSolarGuard;
|
||||
|
||||
css::uno::Reference< css::awt::XWindowPeer > xRef;
|
||||
css::uno::Reference< css::awt::XVclWindowPeer > xRef;
|
||||
|
||||
VclPtr<vcl::Window> pParent;
|
||||
if ( rDescriptor.Parent.is() )
|
||||
@@ -1991,7 +1991,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::createSystemChild( con
|
||||
pChildWindow.reset(VclPtr<WorkWindow>::Create(nullptr, Parent));
|
||||
}
|
||||
|
||||
css::uno::Reference< css::awt::XWindowPeer > xPeer;
|
||||
css::uno::Reference< css::awt::XVclWindowPeer > xPeer;
|
||||
if ( pChildWindow )
|
||||
{
|
||||
rtl::Reference<VCLXTopWindow> pPeer = new VCLXTopWindow;
|
||||
|
||||
@@ -26,9 +26,9 @@ MultiLineEdit::MultiLineEdit(vcl::Window* pParent, WinBits nWinStyle)
|
||||
}
|
||||
|
||||
// virtual
|
||||
css::uno::Reference<css::awt::XWindowPeer> MultiLineEdit::GetComponentInterface(bool bCreate)
|
||||
css::uno::Reference<css::awt::XVclWindowPeer> MultiLineEdit::GetComponentInterface(bool bCreate)
|
||||
{
|
||||
css::uno::Reference<css::awt::XWindowPeer> xPeer(
|
||||
css::uno::Reference<css::awt::XVclWindowPeer> xPeer(
|
||||
VclMultiLineEdit::GetComponentInterface(false));
|
||||
if (!xPeer.is() && bCreate)
|
||||
{
|
||||
|
||||
@@ -157,13 +157,13 @@ OUString UnoControl::GetComponentServiceName() const
|
||||
return OUString();
|
||||
}
|
||||
|
||||
Reference< XWindowPeer > UnoControl::ImplGetCompatiblePeer()
|
||||
Reference< XVclWindowPeer > UnoControl::ImplGetCompatiblePeer()
|
||||
{
|
||||
DBG_ASSERT( !mbCreatingCompatiblePeer, "ImplGetCompatiblePeer - recursive?" );
|
||||
|
||||
mbCreatingCompatiblePeer = true;
|
||||
|
||||
Reference< XWindowPeer > xCompatiblePeer = getPeer();
|
||||
Reference< XVclWindowPeer > xCompatiblePeer = getVclWindowPeer();
|
||||
|
||||
if ( !xCompatiblePeer.is() )
|
||||
{
|
||||
@@ -172,7 +172,7 @@ Reference< XWindowPeer > UnoControl::ImplGetCompatiblePeer()
|
||||
if( bVis )
|
||||
maComponentInfos.bVisible = false;
|
||||
|
||||
Reference< XWindowPeer > xCurrentPeer = getPeer();
|
||||
Reference< XVclWindowPeer > xCurrentPeer = getVclWindowPeer();
|
||||
setPeer( nullptr );
|
||||
|
||||
// queryInterface ourself, to allow aggregation
|
||||
@@ -196,7 +196,7 @@ Reference< XWindowPeer > UnoControl::ImplGetCompatiblePeer()
|
||||
mbCreatingCompatiblePeer = false;
|
||||
throw;
|
||||
}
|
||||
xCompatiblePeer = getPeer();
|
||||
xCompatiblePeer = getVclWindowPeer();
|
||||
setPeer( xCurrentPeer );
|
||||
|
||||
if ( xCompatiblePeer.is() && mxGraphics.is() )
|
||||
@@ -345,13 +345,13 @@ UnoControl::DisposeAccessibleContext(Reference<XComponent> const& xContextComp)
|
||||
|
||||
void UnoControl::dispose( )
|
||||
{
|
||||
Reference< XWindowPeer > xPeer;
|
||||
Reference< XVclWindowPeer > xPeer;
|
||||
Reference<XComponent> xAccessibleComp;
|
||||
{
|
||||
::osl::MutexGuard aGuard( GetMutex() );
|
||||
if( mbDisposePeer )
|
||||
{
|
||||
xPeer = mxPeer;
|
||||
xPeer = mxVclWindowPeer;
|
||||
}
|
||||
setPeer( nullptr );
|
||||
xAccessibleComp.set(maAccessibleContext, UNO_QUERY);
|
||||
@@ -619,8 +619,7 @@ void UnoControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent
|
||||
|
||||
// Doesn't work for Container!
|
||||
getPeer()->dispose();
|
||||
mxPeer.clear();
|
||||
mxVclWindowPeer = nullptr;
|
||||
mxVclWindowPeer.clear();
|
||||
mbRefreshingPeer = true;
|
||||
Reference< XWindowPeer > xP( xParent, UNO_QUERY );
|
||||
xThis->createPeer( Reference< XToolkit > (), xP );
|
||||
@@ -1278,7 +1277,9 @@ void UnoControl::createPeer( const Reference< XToolkit >& rxToolkit, const Refer
|
||||
PrepareWindowDescriptor(aDescr);
|
||||
|
||||
// create the peer
|
||||
setPeer( xToolkit->createWindow( aDescr ) );
|
||||
Reference<XWindowPeer> xTemp = xToolkit->createWindow( aDescr );
|
||||
mxVclWindowPeer.set(xTemp, UNO_QUERY);
|
||||
assert(mxVclWindowPeer);
|
||||
|
||||
// release the mutex guard (and work with copies of our members)
|
||||
// this is necessary as our peer may lock the SolarMutex (actually, all currently known peers do), so calling
|
||||
@@ -1344,7 +1345,13 @@ void UnoControl::createPeer( const Reference< XToolkit >& rxToolkit, const Refer
|
||||
Reference< XWindowPeer > UnoControl::getPeer()
|
||||
{
|
||||
::osl::MutexGuard aGuard( GetMutex() );
|
||||
return mxPeer;
|
||||
return mxVclWindowPeer;
|
||||
}
|
||||
|
||||
Reference< XVclWindowPeer > UnoControl::getVclWindowPeer()
|
||||
{
|
||||
::osl::MutexGuard aGuard( GetMutex() );
|
||||
return mxVclWindowPeer;
|
||||
}
|
||||
|
||||
sal_Bool UnoControl::setModel( const Reference< XControlModel >& rxModel )
|
||||
|
||||
@@ -369,7 +369,7 @@ UnoControlContainer::UnoControlContainer()
|
||||
mpControls.reset(new UnoControlHolderList);
|
||||
}
|
||||
|
||||
UnoControlContainer::UnoControlContainer(const uno::Reference< awt::XWindowPeer >& xP )
|
||||
UnoControlContainer::UnoControlContainer(const uno::Reference< awt::XVclWindowPeer >& xP )
|
||||
:maCListeners( *this )
|
||||
{
|
||||
setPeer( xP );
|
||||
|
||||
@@ -144,9 +144,9 @@ css::uno::Reference< css::awt::XToolkit> UnoWrapper::GetVCLToolkit()
|
||||
return mxToolkit;
|
||||
}
|
||||
|
||||
css::uno::Reference< css::awt::XWindowPeer> UnoWrapper::GetWindowInterface( vcl::Window* pWindow )
|
||||
css::uno::Reference< css::awt::XVclWindowPeer> UnoWrapper::GetWindowInterface( vcl::Window* pWindow )
|
||||
{
|
||||
css::uno::Reference< css::awt::XWindowPeer> xPeer = pWindow->GetWindowPeer();
|
||||
css::uno::Reference< css::awt::XVclWindowPeer> xPeer = pWindow->GetWindowPeer();
|
||||
if ( xPeer )
|
||||
return xPeer;
|
||||
|
||||
@@ -161,7 +161,7 @@ VclPtr<vcl::Window> UnoWrapper::GetWindow(const css::uno::Reference<css::awt::XW
|
||||
return VCLUnoHelper::GetWindow(rWindow);
|
||||
}
|
||||
|
||||
void UnoWrapper::SetWindowInterface( vcl::Window* pWindow, const css::uno::Reference< css::awt::XWindowPeer> & xIFace )
|
||||
void UnoWrapper::SetWindowInterface( vcl::Window* pWindow, const css::uno::Reference< css::awt::XVclWindowPeer> & xIFace )
|
||||
{
|
||||
VCLXWindow* pVCLXWindow = dynamic_cast<VCLXWindow*>( xIFace.get() );
|
||||
|
||||
@@ -176,7 +176,7 @@ void UnoWrapper::SetWindowInterface( vcl::Window* pWindow, const css::uno::Refer
|
||||
}
|
||||
else
|
||||
{
|
||||
css::uno::Reference< css::awt::XWindowPeer> xPeer = pWindow->GetWindowPeer();
|
||||
css::uno::Reference< css::awt::XVclWindowPeer> xPeer = pWindow->GetWindowPeer();
|
||||
if( xPeer.is() )
|
||||
{
|
||||
bool bSameInstance( pVCLXWindow == dynamic_cast< VCLXWindow* >( xPeer.get() ));
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
using namespace com::sun::star;
|
||||
using namespace ooo::vba;
|
||||
|
||||
uno::Reference< css::awt::XWindowPeer >
|
||||
uno::Reference< css::awt::XVclWindowPeer >
|
||||
ScVbaControl::getWindowPeer()
|
||||
{
|
||||
uno::Reference< drawing::XControlShape > xControlShape( m_xControl, uno::UNO_QUERY );
|
||||
@@ -76,23 +76,27 @@ ScVbaControl::getWindowPeer()
|
||||
{
|
||||
// would seem to be a Userform control
|
||||
uno::Reference< awt::XControl > xControl( m_xControl, uno::UNO_QUERY_THROW );
|
||||
xWinPeer = xControl->getPeer();
|
||||
return xWinPeer;
|
||||
xWinPeer = xControl->getPeer();
|
||||
}
|
||||
// form control
|
||||
xControlModel.set( xControlShape->getControl(), uno::UNO_SET_THROW );
|
||||
else
|
||||
{
|
||||
// form control
|
||||
xControlModel.set( xControlShape->getControl(), uno::UNO_SET_THROW );
|
||||
|
||||
uno::Reference< view::XControlAccess > xControlAccess( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW );
|
||||
try
|
||||
{
|
||||
uno::Reference< awt::XControl > xControl = xControlAccess->getControl( xControlModel );
|
||||
xWinPeer = xControl->getPeer();
|
||||
uno::Reference< view::XControlAccess > xControlAccess( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW );
|
||||
try
|
||||
{
|
||||
uno::Reference< awt::XControl > xControl = xControlAccess->getControl( xControlModel );
|
||||
xWinPeer = xControl->getPeer();
|
||||
}
|
||||
catch(const uno::Exception&)
|
||||
{
|
||||
throw uno::RuntimeException( "The Control does not exist" );
|
||||
}
|
||||
}
|
||||
catch(const uno::Exception&)
|
||||
{
|
||||
throw uno::RuntimeException( "The Control does not exist" );
|
||||
}
|
||||
return xWinPeer;
|
||||
uno::Reference< css::awt::XVclWindowPeer > xVclWinPeer(xWinPeer, uno::UNO_QUERY);
|
||||
assert(xVclWinPeer || !xWinPeer);
|
||||
return xVclWinPeer;
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||
#include <com/sun/star/drawing/XControlShape.hpp>
|
||||
#include <com/sun/star/awt/XControl.hpp>
|
||||
#include <com/sun/star/awt/XWindowPeer.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/script/ScriptEvent.hpp>
|
||||
#include <ooo/vba/msforms/XControl.hpp>
|
||||
|
||||
@@ -50,7 +50,7 @@ protected:
|
||||
css::uno::Reference< css::frame::XModel > m_xModel;
|
||||
|
||||
/// @throws css::uno::RuntimeException
|
||||
css::uno::Reference< css::awt::XWindowPeer > getWindowPeer();
|
||||
css::uno::Reference< css::awt::XVclWindowPeer > getWindowPeer();
|
||||
void fireChangeEvent();
|
||||
void fireClickEvent();
|
||||
public:
|
||||
|
||||
+2
-2
@@ -64,7 +64,7 @@ namespace com::sun::star {
|
||||
}
|
||||
|
||||
namespace awt {
|
||||
class XWindowPeer;
|
||||
class XVclWindowPeer;
|
||||
class XWindow;
|
||||
}
|
||||
namespace uno {
|
||||
@@ -280,7 +280,7 @@ public:
|
||||
OUString maQuickHelpText;
|
||||
OUString maID;
|
||||
InputContext maInputContext;
|
||||
css::uno::Reference< css::awt::XWindowPeer > mxWindowPeer;
|
||||
css::uno::Reference< css::awt::XVclWindowPeer > mxWindowPeer;
|
||||
css::uno::Reference< css::accessibility::XAccessible > mxAccessible;
|
||||
std::shared_ptr< VclSizeGroup > m_xSizeGroup;
|
||||
std::vector<VclPtr<FixedText>> m_aMnemonicLabels;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <vcl/layout.hxx>
|
||||
#include <vcl/scheduler.hxx>
|
||||
#include <com/sun/star/awt/XWindow.hpp>
|
||||
#include <com/sun/star/awt/XWindowPeer.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/lang/XComponent.hpp>
|
||||
|
||||
class LifecycleTest : public test::BootstrapFixture
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
|
||||
#include <com/sun/star/awt/XWindow.hpp>
|
||||
#include <com/sun/star/awt/XWindowPeer.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <o3tl/safeint.hxx>
|
||||
#include <o3tl/sorted_vector.hxx>
|
||||
#include <o3tl/string_view.hxx>
|
||||
|
||||
@@ -421,7 +421,7 @@ css::uno::Reference< XAccessible > SvtIconChoiceCtrl::CreateAccessible()
|
||||
css::uno::Reference< XAccessible > xAccParent = pParent->GetAccessible();
|
||||
if ( xAccParent.is() )
|
||||
{
|
||||
css::uno::Reference< css::awt::XWindowPeer > xHoldAlive(GetComponentInterface());
|
||||
css::uno::Reference< css::awt::XVclWindowPeer > xHoldAlive(GetComponentInterface());
|
||||
xAccessible = _pImpl->GetAccessibleFactory().createAccessibleIconChoiceCtrl( *this, xAccParent );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ css::uno::Reference<css::accessibility::XAccessible> IconView::CreateAccessible(
|
||||
if (auto xAccParent = pParent->GetAccessible())
|
||||
{
|
||||
// need to be done here to get the vclxwindow later on in the accessible
|
||||
css::uno::Reference<css::awt::XWindowPeer> xHoldAlive(GetComponentInterface());
|
||||
css::uno::Reference<css::awt::XVclWindowPeer> xHoldAlive(GetComponentInterface());
|
||||
return pImpl->m_aFactoryAccess.getFactory().createAccessibleIconView(*this, xAccParent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3443,7 +3443,7 @@ css::uno::Reference< XAccessible > SvTreeListBox::CreateAccessible()
|
||||
if ( xAccParent.is() )
|
||||
{
|
||||
// need to be done here to get the vclxwindow later on in the accessible
|
||||
css::uno::Reference< css::awt::XWindowPeer > xHoldAlive(GetComponentInterface());
|
||||
css::uno::Reference< css::awt::XVclWindowPeer > xHoldAlive(GetComponentInterface());
|
||||
xAccessible = pImpl->m_aFactoryAccess.getFactory().createAccessibleTreeListBox( *this, xAccParent );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <com/sun/star/accessibility/AccessibleRole.hpp>
|
||||
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
|
||||
#include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
|
||||
#include <com/sun/star/awt/XWindowPeer.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
|
||||
#include <sal/log.hxx>
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <brdwin.hxx>
|
||||
|
||||
#include <com/sun/star/awt/XTopWindow.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
|
||||
using namespace ::com::sun::star::uno;
|
||||
using namespace ::com::sun::star::lang;
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
#include <com/sun/star/accessibility/AccessibleRelation.hpp>
|
||||
#include <com/sun/star/accessibility/XAccessible.hpp>
|
||||
#include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
|
||||
#include <com/sun/star/awt/XWindowPeer.hpp>
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
|
||||
#include <com/sun/star/datatransfer/dnd/XDragGestureRecognizer.hpp>
|
||||
#include <com/sun/star/datatransfer/dnd/XDropTarget.hpp>
|
||||
@@ -3128,7 +3128,7 @@ const OUString& Window::GetHelpText() const
|
||||
return mpWindowImpl->maHelpText;
|
||||
}
|
||||
|
||||
void Window::SetWindowPeer( Reference< css::awt::XWindowPeer > const & xPeer, VCLXWindow* pVCLXWindow )
|
||||
void Window::SetWindowPeer( Reference< css::awt::XVclWindowPeer > const & xPeer, VCLXWindow* pVCLXWindow )
|
||||
{
|
||||
if (!mpWindowImpl || mpWindowImpl->mbInDispose)
|
||||
return;
|
||||
@@ -3149,7 +3149,7 @@ void Window::SetWindowPeer( Reference< css::awt::XWindowPeer > const & xPeer, VC
|
||||
mpWindowImpl->mpVCLXWindow = pVCLXWindow;
|
||||
}
|
||||
|
||||
Reference< css::awt::XWindowPeer > Window::GetComponentInterface( bool bCreate )
|
||||
Reference< css::awt::XVclWindowPeer > Window::GetComponentInterface( bool bCreate )
|
||||
{
|
||||
if ( !mpWindowImpl->mxWindowPeer.is() && bCreate )
|
||||
{
|
||||
@@ -3160,7 +3160,7 @@ Reference< css::awt::XWindowPeer > Window::GetComponentInterface( bool bCreate )
|
||||
return mpWindowImpl->mxWindowPeer;
|
||||
}
|
||||
|
||||
void Window::SetComponentInterface( Reference< css::awt::XWindowPeer > const & xIFace )
|
||||
void Window::SetComponentInterface( Reference< css::awt::XVclWindowPeer > const & xIFace )
|
||||
{
|
||||
UnoWrapperBase* pWrapper = UnoWrapperBase::GetUnoWrapper();
|
||||
SAL_WARN_IF( !pWrapper, "vcl.window", "SetComponentInterface: No Wrapper!" );
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#if !GTK_CHECK_VERSION(4, 0, 0)
|
||||
#include "a11y/atkwrapper.hxx"
|
||||
#endif
|
||||
#include <com/sun/star/awt/XVclWindowPeer.hpp>
|
||||
#include <com/sun/star/datatransfer/XTransferable.hpp>
|
||||
#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
|
||||
#include <com/sun/star/datatransfer/clipboard/XClipboardEx.hpp>
|
||||
|
||||
Reference in New Issue
Block a user