summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------dictionaries0
m---------helpcontent20
-rw-r--r--offapi/com/sun/star/awt/XToolkit.idl6
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx11
4 files changed, 13 insertions, 4 deletions
diff --git a/dictionaries b/dictionaries
-Subproject 43d24786db9947f0aababb1228379b0b3ece265
+Subproject 92a907ab17814a8e08ab787745fefb85ed00d3f
diff --git a/helpcontent2 b/helpcontent2
-Subproject d87de0c383537470900fcd7dc78d534e1f9c3f7
+Subproject a14b0defe8aec0eb8e80827e5c9cc76ebe742fd
diff --git a/offapi/com/sun/star/awt/XToolkit.idl b/offapi/com/sun/star/awt/XToolkit.idl
index 9c10b9f75013..1cff0b181597 100644
--- a/offapi/com/sun/star/awt/XToolkit.idl
+++ b/offapi/com/sun/star/awt/XToolkit.idl
@@ -50,7 +50,11 @@ published interface XToolkit: com::sun::star::uno::XInterface
com::sun::star::awt::XWindowPeer getDesktopWindow();
- /** returns the complete work area for this toolkit.
+ /**
+ * For LibreOffice versions < 4.1, this method just returned an empty rectangle.
+ * After that, it started returning a valid value.
+ *
+ * @returns the size and position of the primary display
*/
com::sun::star::awt::Rectangle getWorkArea();
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index f04e9f8da9d2..662906e86ff3 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -560,9 +560,14 @@ void SAL_CALL VCLXToolkit::disposing()
::com::sun::star::awt::Rectangle VCLXToolkit::getWorkArea( ) throw(::com::sun::star::uno::RuntimeException)
{
- ::com::sun::star::awt::Rectangle aRect;
- // 07/00: AppWindow doesn't exist anymore...
- return aRect;
+ sal_Int32 nDisplay = Application::GetDisplayBuiltInScreen();
+ Rectangle aWorkRect = Application::GetScreenPosSizePixel( nDisplay );
+ com::sun::star::awt::Rectangle aNotherRect;
+ aNotherRect.X = aWorkRect.getX();
+ aNotherRect.Y = aWorkRect.getY();
+ aNotherRect.Width = aWorkRect.getWidth();
+ aNotherRect.Height = aWorkRect.getHeight();
+ return aNotherRect;
}
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > VCLXToolkit::createWindow( const ::com::sun::star::awt::WindowDescriptor& rDescriptor ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)