diff options
author | Thomas Benisch <tbe@openoffice.org> | 2010-08-12 19:29:48 +0200 |
---|---|---|
committer | Thomas Benisch <tbe@openoffice.org> | 2010-08-12 19:29:48 +0200 |
commit | c1f9b88295e633e250209f5082399a317b953fc7 (patch) | |
tree | 71db4a252cfc18d4dd172e73fe96a283d4aa9952 /sc/source/ui/unoobj | |
parent | d39b710e4f69940c68a6c3d24af00211f8f03aea (diff) |
chartextensibility: #i113841# API: provide bounding box of the Calc grid window
Diffstat (limited to 'sc/source/ui/unoobj')
-rw-r--r-- | sc/source/ui/unoobj/viewuno.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index d10d3ba54f86..cec72ae2fdaf 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -47,6 +47,7 @@ #include <sfx2/viewfrm.hxx> #include <rtl/uuid.h> #include <toolkit/helper/convert.hxx> +#include <toolkit/helper/vclunohelper.hxx> #include "drawsh.hxx" #include "drtxtob.hxx" @@ -112,6 +113,7 @@ const SfxItemPropertyMapEntry* lcl_GetViewOptPropertyMap() {MAP_CHAR_LEN(SC_UNO_VISAREA), 0, &getCppuType((awt::Rectangle*)0), 0, 0}, {MAP_CHAR_LEN(SC_UNO_ZOOMTYPE), 0, &getCppuType((sal_Int16*)0), 0, 0}, {MAP_CHAR_LEN(SC_UNO_ZOOMVALUE), 0, &getCppuType((sal_Int16*)0), 0, 0}, + {MAP_CHAR_LEN(SC_UNO_VISAREASCREEN),0, &getCppuType((awt::Rectangle*)0), 0, 0}, {0,0,0,0,0,0} }; return aViewOptPropertyMap_Impl; @@ -2004,6 +2006,16 @@ uno::Any SAL_CALL ScTabViewObj::getPropertyValue( const rtl::OUString& aProperty else if ( aString.EqualsAscii( SC_UNO_VISAREA ) ) aRet <<= GetVisArea(); else if ( aString.EqualsAscii( SC_UNO_ZOOMTYPE ) ) aRet <<= GetZoomType(); else if ( aString.EqualsAscii( SC_UNO_ZOOMVALUE ) ) aRet <<= GetZoom(); + else if ( aString.EqualsAscii( SC_UNO_VISAREASCREEN ) ) + { + ScViewData* pViewData = pViewSh->GetViewData(); + Window* pActiveWin = ( pViewData ? pViewData->GetActiveWin() : NULL ); + if ( pActiveWin ) + { + Rectangle aRect = pActiveWin->GetWindowExtentsRelative( NULL ); + aRet <<= AWTRectangle( aRect ); + } + } } return aRet; |