Kaydet (Commit) 569d5dc0 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Add Move() to ooo.vba.word.XApplication

Change-Id: Ib230e730f68a30b82915ed6d7898bf1c02690b70
üst 5abf9d26
......@@ -44,6 +44,7 @@ interface XApplication : XConnectable
float CentimetersToPoints([in] float Centimeters );
void ShowMe();
void Resize( [in] long Width, [in] long Height );
void Move( [in] long Left, [in] long Top );
};
}; }; };
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column:100 -*- */
/*
* This file is part of the LibreOffice project.
*
......@@ -233,11 +233,22 @@ void SAL_CALL SwVbaApplication::ShowMe()
void SAL_CALL SwVbaApplication::Resize( sal_Int32 Width, sal_Int32 Height )
{
// Have to do it like this as the Width and Height are hidden away in the ooo::vba::XWindowBase
// which ooo::vba::word::XApplication does not inherit from. SwVbaWindow, however, does inherit
// from XWindowBase. Ugh.
auto pWindow = getActiveSwVbaWindow();
pWindow->setWidth( Width );
pWindow->setHeight( Height );
}
void SAL_CALL SwVbaApplication::Move( sal_Int32 Left, sal_Int32 Top )
{
// See comment in Resize().
auto pWindow = getActiveSwVbaWindow();
pWindow->setLeft( Left );
pWindow->setTop( Top );
}
// XInterfaceWithIID
OUString SAL_CALL
......
......@@ -79,6 +79,7 @@ public:
virtual float SAL_CALL CentimetersToPoints( float Centimeters ) override;
virtual void SAL_CALL ShowMe() override;
virtual void SAL_CALL Resize( sal_Int32 Width, sal_Int32 Height ) override;
virtual void SAL_CALL Move( sal_Int32 Left, sal_Int32 Top ) override;
// XInterfaceWithIID
virtual OUString SAL_CALL getIID() override;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment