summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toolkit/inc/toolkit/helper/vclunohelper.hxx4
-rw-r--r--toolkit/source/helper/vclunohelper.cxx8
2 files changed, 12 insertions, 0 deletions
diff --git a/toolkit/inc/toolkit/helper/vclunohelper.hxx b/toolkit/inc/toolkit/helper/vclunohelper.hxx
index 68583f99b447..1c5d89a3cc64 100644
--- a/toolkit/inc/toolkit/helper/vclunohelper.hxx
+++ b/toolkit/inc/toolkit/helper/vclunohelper.hxx
@@ -135,11 +135,15 @@ public:
static MapUnit /* MapModeUnit */ ConvertToMapModeUnit(sal_Int16 /* com.sun.star.util.MeasureUnit.* */ _nMeasureUnit) throw (::com::sun::star::lang::IllegalArgumentException);
static sal_Int16 /* com.sun.star.util.MeasureUnit.* */ ConvertToMeasurementUnit(MapUnit /* MapModeUnit */ _nMapModeUnit) throw (::com::sun::star::lang::IllegalArgumentException);
+
static ::Size /* VCLSize */ ConvertToVCLSize(::com::sun::star::awt::Size const& _aSize);
static ::com::sun::star::awt::Size ConvertToAWTSize(::Size /* VCLSize */ const& _aSize);
+
static ::Point /* VCLPoint */ ConvertToVCLPoint(::com::sun::star::awt::Point const& _aPoint);
static ::com::sun::star::awt::Point ConvertToAWTPoint(::Point /* VCLPoint */ const& _aPoint);
+ static ::Rectangle ConvertToVCLRect( ::com::sun::star::awt::Rectangle const & _rRect );
+ static ::com::sun::star::awt::Rectangle ConvertToAWTRect( ::Rectangle const & _rRect );
};
diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx
index d76b56a6a37d..029e520baca6 100644
--- a/toolkit/source/helper/vclunohelper.cxx
+++ b/toolkit/source/helper/vclunohelper.cxx
@@ -736,4 +736,12 @@ com::sun::star::awt::Point VCLUnoHelper::ConvertToAWTPoint(::Point /* VCLPoint *
return aAWTPoint;
}
+::Rectangle VCLUnoHelper::ConvertToVCLRect( ::com::sun::star::awt::Rectangle const & _rRect )
+{
+ return ::Rectangle( _rRect.X, _rRect.Y, _rRect.X + _rRect.Width - 1, _rRect.Y + _rRect.Height - 1 );
+}
+::com::sun::star::awt::Rectangle VCLUnoHelper::ConvertToAWTRect( ::Rectangle const & _rRect )
+{
+ return ::com::sun::star::awt::Rectangle( _rRect.Left(), _rRect.Top(), _rRect.GetWidth(), _rRect.GetHeight() );
+}