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

Add window geometry attributes, too, to ooo.vba.word.XApplication

Like the other similar attributes and methods added lately, they just
forward to the corresponding attributes of the "active
window". Whether setting and retrieving such then actually does
something useful or not I don't know. My main concern is that
Automation and COM clients at least won't complain and abort because
of unimplemented APIs.

Change-Id: Ia8d22e3137d314268ac6771bb355e9f0686f52dc
üst 569d5dc0
......@@ -35,6 +35,10 @@ interface XApplication : XConnectable
[attribute] boolean DisplayAutoCompleteTips;
[attribute] long EnableCancelKey;
[attribute] long WindowState;
[attribute] long Width;
[attribute] long Height;
[attribute] long Left;
[attribute] long Top;
any CommandBars( [in] any Index );
any Documents( [in] any Index );
......
......@@ -221,6 +221,54 @@ void SAL_CALL SwVbaApplication::setWindowState( sal_Int32 _windowstate )
}
}
sal_Int32 SAL_CALL SwVbaApplication::getWidth()
{
auto pWindow = getActiveSwVbaWindow();
return pWindow->getWidth();
}
void SAL_CALL SwVbaApplication::setWidth( sal_Int32 _width )
{
auto pWindow = getActiveSwVbaWindow();
pWindow->setWidth( _width );
}
sal_Int32 SAL_CALL SwVbaApplication::getHeight()
{
auto pWindow = getActiveSwVbaWindow();
return pWindow->getHeight();
}
void SAL_CALL SwVbaApplication::setHeight( sal_Int32 _height )
{
auto pWindow = getActiveSwVbaWindow();
pWindow->setHeight( _height );
}
sal_Int32 SAL_CALL SwVbaApplication::getLeft()
{
auto pWindow = getActiveSwVbaWindow();
return pWindow->getLeft();
}
void SAL_CALL SwVbaApplication::setLeft( sal_Int32 _left )
{
auto pWindow = getActiveSwVbaWindow();
pWindow->setLeft( _left );
}
sal_Int32 SAL_CALL SwVbaApplication::getTop()
{
auto pWindow = getActiveSwVbaWindow();
return pWindow->getTop();
}
void SAL_CALL SwVbaApplication::setTop( sal_Int32 _top )
{
auto pWindow = getActiveSwVbaWindow();
pWindow->setTop( _top );
}
float SAL_CALL SwVbaApplication::CentimetersToPoints( float Centimeters )
{
return VbaApplicationBase::CentimetersToPoints( Centimeters );
......
......@@ -76,6 +76,14 @@ public:
virtual void SAL_CALL setEnableCancelKey( sal_Int32 _enableCancelKey ) override;
virtual sal_Int32 SAL_CALL getWindowState() override;
virtual void SAL_CALL setWindowState( sal_Int32 _windowstate ) override;
virtual sal_Int32 SAL_CALL getWidth() override;
virtual void SAL_CALL setWidth( sal_Int32 _width ) override;
virtual sal_Int32 SAL_CALL getHeight() override;
virtual void SAL_CALL setHeight( sal_Int32 _height ) override;
virtual sal_Int32 SAL_CALL getLeft() override;
virtual void SAL_CALL setLeft( sal_Int32 _left ) override;
virtual sal_Int32 SAL_CALL getTop() override;
virtual void SAL_CALL setTop( sal_Int32 _top ) override;
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;
......
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