embeddedobj/source/general/docholder.cxx | 2 +- framework/source/layoutmanager/layoutmanager.cxx | 2 +- include/vcl/svapp.hxx | 1 - include/vcl/syswin.hxx | 2 -- vcl/aqua/source/app/salsys.cxx | 19 ------------------- vcl/headless/svpdummies.cxx | 5 ----- vcl/inc/aqua/salsys.h | 1 - vcl/inc/headless/svpdummies.hxx | 1 - vcl/inc/salsys.hxx | 8 -------- vcl/inc/unx/gtk/gtksys.hxx | 1 - vcl/inc/unx/x11/x11sys.hxx | 1 - vcl/inc/win/salsys.h | 4 ---- vcl/source/app/svapp.cxx | 6 ------ vcl/source/window/menu.cxx | 2 +- vcl/unx/gtk/app/gtksys.cxx | 8 -------- vcl/unx/x11/x11sys.cxx | 6 ------ vcl/win/source/app/salinfo.cxx | 16 ---------------- 17 files changed, 3 insertions(+), 82 deletions(-)
New commits: commit ab5eaec0984d562140a61e1320c39fdb82ec1b3b Author: Noel Grandin <n...@peralex.com> Date: Fri Jul 19 08:20:14 2013 +0200 remove Application::GetWorkAreaPosSizePixel This internal API has always been problematic because we cannot support it under the Linux toolkits, where it has in fact always just returned the size of the screen. Change-Id: I406bcbca8a4161b4261ef46940823bb07c6ad18b Reviewed-on: https://gerrit.libreoffice.org/4976 Tested-by: LibreOffice gerrit bot <ger...@libreoffice.org> Reviewed-by: Michael Meeks <michael.me...@suse.com> Tested-by: Michael Meeks <michael.me...@suse.com> diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index 44b4c59..c34cb82 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -892,7 +892,7 @@ uno::Reference< frame::XFrame > DocumentHolder::GetDocFrame() { sal_Int32 nDisplay = Application::GetDisplayBuiltInScreen(); - Rectangle aWorkRect = Application::GetWorkAreaPosSizePixel( nDisplay ); + Rectangle aWorkRect = Application::GetScreenPosSizePixel( nDisplay ); awt::Rectangle aWindowRect = xHWindow->getPosSize(); if (( aWindowRect.Width < aWorkRect.GetWidth()) && ( aWindowRect.Height < aWorkRect.GetHeight() )) diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index e9fa7cb..97629d2 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -2454,7 +2454,7 @@ sal_Bool LayoutManager::implts_resizeContainerWindow( const awt::Size& rContaine // calculate the maximum size we have for the container window sal_Int32 nDisplay = xContainerTopWindow->getDisplay(); - Rectangle aWorkArea = Application::GetWorkAreaPosSizePixel( nDisplay ); + Rectangle aWorkArea = Application::GetScreenPosSizePixel( nDisplay ); if (( aWorkArea.GetWidth() > 0 ) && ( aWorkArea.GetHeight() > 0 )) { diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx index 20a8b74..c5a6707 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -256,7 +256,6 @@ public: // in case of IsUnifiedDisplay() == false the return value // will always be GetDisplayDefaultScreen() SAL_DLLPRIVATE static unsigned int GetBestScreen( const Rectangle& ); - static Rectangle GetWorkAreaPosSizePixel( unsigned int nScreen ); // This returns the LCD screen number for a laptop, or the primary // external VGA display for a desktop machine - it is where a presenter // console should be rendered if there are other (non-built-in) screens diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx index 0766143..f92198e 100644 --- a/include/vcl/syswin.hxx +++ b/include/vcl/syswin.hxx @@ -228,7 +228,6 @@ public: The Display Screen number is counted the same way that <code>Application::GetScreenPosSizePixel</code>, - <code>Application::GetWorkAreaPosSizePixel</code>, <code>Application::GetDisplayScreenName</code> and of course <code>SystemWindow::SetScreenNumber</code> are counted in. @@ -250,7 +249,6 @@ public: The Display Screen number is counted the same way that <code>Application::GetScreenPosSizePixel</code>, - <code>Application::GetWorkAreaPosSizePixel</code>, <code>Application::GetDisplayScreenName</code> and of course <code>SystemWindow::GetScreenNumber</code> are counted in. diff --git a/vcl/aqua/source/app/salsys.cxx b/vcl/aqua/source/app/salsys.cxx index d1c553a..6914865 100644 --- a/vcl/aqua/source/app/salsys.cxx +++ b/vcl/aqua/source/app/salsys.cxx @@ -61,25 +61,6 @@ Rectangle AquaSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) return aRet; } -Rectangle AquaSalSystem::GetDisplayScreenWorkAreaPosSizePixel( unsigned int nScreen ) -{ - NSArray* pScreens = [NSScreen screens]; - Rectangle aRet; - NSScreen* pScreen = nil; - if( pScreens && nScreen < [pScreens count] ) - pScreen = [pScreens objectAtIndex: nScreen]; - else - pScreen = [NSScreen mainScreen]; - - if( pScreen ) - { - NSRect aFrame = [pScreen visibleFrame]; - aRet = Rectangle( Point( static_cast<long int>(aFrame.origin.x), static_cast<long int>(aFrame.origin.y) ), - Size( static_cast<long int>(aFrame.size.width), static_cast<long int>(aFrame.size.height) ) ); - } - return aRet; -} - OUString AquaSalSystem::GetDisplayScreenName( unsigned int nScreen ) { NSArray* pScreens = [NSScreen screens]; diff --git a/vcl/headless/svpdummies.cxx b/vcl/headless/svpdummies.cxx index 68cace8..321438a 100644 --- a/vcl/headless/svpdummies.cxx +++ b/vcl/headless/svpdummies.cxx @@ -64,11 +64,6 @@ Rectangle SvpSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) return aRect; } -Rectangle SvpSalSystem::GetDisplayScreenWorkAreaPosSizePixel( unsigned int nScreen ) -{ - return GetDisplayScreenPosSizePixel( nScreen ); -} - OUString SvpSalSystem::GetDisplayScreenName( unsigned int nScreen ) { return "VirtualScreen " + OUString::valueOf(sal_Int32(nScreen)); diff --git a/vcl/inc/aqua/salsys.h b/vcl/inc/aqua/salsys.h index 38bbe8a..dc5c6b2 100644 --- a/vcl/inc/aqua/salsys.h +++ b/vcl/inc/aqua/salsys.h @@ -37,7 +37,6 @@ public: // get info about the display virtual unsigned int GetDisplayScreenCount(); virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ); - virtual Rectangle GetDisplayScreenWorkAreaPosSizePixel( unsigned int nScreen ); virtual OUString GetDisplayScreenName( unsigned int nScreen ); virtual int ShowNativeMessageBox( const OUString& rTitle, diff --git a/vcl/inc/headless/svpdummies.hxx b/vcl/inc/headless/svpdummies.hxx index 147811d..01fc5f7 100644 --- a/vcl/inc/headless/svpdummies.hxx +++ b/vcl/inc/headless/svpdummies.hxx @@ -66,7 +66,6 @@ public: // get info about the display virtual unsigned int GetDisplayScreenCount(); virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ); - virtual Rectangle GetDisplayScreenWorkAreaPosSizePixel( unsigned int nScreen ); virtual OUString GetDisplayScreenName( unsigned int nScreen ); virtual int ShowNativeDialog( const OUString& rTitle, diff --git a/vcl/inc/salsys.hxx b/vcl/inc/salsys.hxx index da1928f..3d453b5 100644 --- a/vcl/inc/salsys.hxx +++ b/vcl/inc/salsys.hxx @@ -78,14 +78,6 @@ public: size: size of the screen */ virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) = 0; - /* Gets position and size of the work area of a screen attached to the display - - @param nScreen - The screen number to be queried - - @returns position and size relative to the scree - */ - virtual Rectangle GetDisplayScreenWorkAreaPosSizePixel( unsigned int nScreen ) = 0; /* Gets the name of a screen @param nScreen diff --git a/vcl/inc/unx/gtk/gtksys.hxx b/vcl/inc/unx/gtk/gtksys.hxx index 88cb6da..d787476 100644 --- a/vcl/inc/unx/gtk/gtksys.hxx +++ b/vcl/inc/unx/gtk/gtksys.hxx @@ -31,7 +31,6 @@ public: virtual unsigned int GetDisplayBuiltInScreen(); virtual OUString GetDisplayScreenName (unsigned int nScreen); virtual Rectangle GetDisplayScreenPosSizePixel (unsigned int nScreen); - virtual Rectangle GetDisplayScreenWorkAreaPosSizePixel (unsigned int nScreen); virtual int ShowNativeDialog (const OUString& rTitle, const OUString& rMessage, const std::list< OUString >& rButtons, diff --git a/vcl/inc/unx/x11/x11sys.hxx b/vcl/inc/unx/x11/x11sys.hxx index d327464..b5edfa9 100644 --- a/vcl/inc/unx/x11/x11sys.hxx +++ b/vcl/inc/unx/x11/x11sys.hxx @@ -37,7 +37,6 @@ public: virtual bool IsUnifiedDisplay(); virtual unsigned int GetDisplayBuiltInScreen(); virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ); - virtual Rectangle GetDisplayScreenWorkAreaPosSizePixel( unsigned int nScreen ); virtual OUString GetDisplayScreenName( unsigned int nScreen ); virtual int ShowNativeDialog( const OUString& rTitle, const OUString& rMessage, diff --git a/vcl/inc/win/salsys.h b/vcl/inc/win/salsys.h index 9c80b06..9056ed0 100644 --- a/vcl/inc/win/salsys.h +++ b/vcl/inc/win/salsys.h @@ -33,19 +33,16 @@ class WinSalSystem : public SalSystem OUString m_aName; OUString m_aDeviceName; Rectangle m_aArea; - Rectangle m_aWorkArea; sal_Int32 m_nStateFlags; DisplayMonitor() : m_nStateFlags( 0 ) {} DisplayMonitor( const OUString& rName, const OUString& rDevName, const Rectangle& rArea, - const Rectangle& rWorkArea, DWORD nStateFlags ) : m_aName( rName ), m_aDeviceName( rDevName ), m_aArea( rArea ), - m_aWorkArea( rWorkArea ), m_nStateFlags( nStateFlags ) { } @@ -62,7 +59,6 @@ public: virtual unsigned int GetDisplayScreenCount(); virtual unsigned int GetDisplayBuiltInScreen(); virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ); - virtual Rectangle GetDisplayScreenWorkAreaPosSizePixel( unsigned int nScreen ); virtual OUString GetDisplayScreenName( unsigned int nScreen ); virtual int ShowNativeMessageBox( const OUString& rTitle, const OUString& rMessage, diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index d8d193d..8fd30f4 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1322,12 +1322,6 @@ Rectangle Application::GetScreenPosSizePixel( unsigned int nScreen ) return pSys ? pSys->GetDisplayScreenPosSizePixel( nScreen ) : Rectangle(); } -Rectangle Application::GetWorkAreaPosSizePixel( unsigned int nScreen ) -{ - SalSystem* pSys = ImplGetSalSystem(); - return pSys ? pSys->GetDisplayScreenWorkAreaPosSizePixel( nScreen ) : Rectangle(); -} - namespace { unsigned long calcDistSquare( const Point& i_rPoint, const Rectangle& i_rRect ) { diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 7bf3c16..dfbbd93 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -3710,7 +3710,7 @@ sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong if( ! pDeskW ) pDeskW = pWindow; Point aDesktopTL( pDeskW->OutputToAbsoluteScreenPixel( aRect.TopLeft() ) ); - nMaxHeight = Application::GetWorkAreaPosSizePixel( + nMaxHeight = Application::GetScreenPosSizePixel( Application::GetBestScreen( Rectangle( aDesktopTL, aRect.GetSize() ) ) ).GetHeight(); } diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx index 1d2d731..0a72054 100644 --- a/vcl/unx/gtk/app/gtksys.cxx +++ b/vcl/unx/gtk/app/gtksys.cxx @@ -246,14 +246,6 @@ Rectangle GtkSalSystem::GetDisplayScreenPosSizePixel (unsigned int nScreen) return Rectangle (Point(aRect.x, aRect.y), Size(aRect.width, aRect.height)); } -Rectangle GtkSalSystem::GetDisplayScreenWorkAreaPosSizePixel (unsigned int nScreen) -{ - // FIXME: in theory we need extra code here to collect - // the work area, ignoring fixed panels etc. on the screen. - // surely gtk+ should have API to get this for us (?) - return GetDisplayScreenPosSizePixel( nScreen ); -} - OUString GtkSalSystem::GetDisplayScreenName(unsigned int nScreen) { gchar *pStr; diff --git a/vcl/unx/x11/x11sys.cxx b/vcl/unx/x11/x11sys.cxx index 66a0775..e1d8be6 100644 --- a/vcl/unx/x11/x11sys.cxx +++ b/vcl/unx/x11/x11sys.cxx @@ -84,12 +84,6 @@ Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) return aRet; } -Rectangle X11SalSystem::GetDisplayScreenWorkAreaPosSizePixel( unsigned int nScreen ) -{ - // FIXME: workareas - return GetDisplayScreenPosSizePixel( nScreen ); -} - OUString X11SalSystem::GetDisplayScreenName( unsigned int nScreen ) { OUString aScreenName; diff --git a/vcl/win/source/app/salinfo.cxx b/vcl/win/source/app/salinfo.cxx index 3262ce3..7d9579b 100644 --- a/vcl/win/source/app/salinfo.cxx +++ b/vcl/win/source/app/salinfo.cxx @@ -73,10 +73,6 @@ sal_Bool WinSalSystem::handleMonitorCallback( sal_IntPtr hMonitor, sal_IntPtr, s aInfo.rcMonitor.top ), Size( aInfo.rcMonitor.right - aInfo.rcMonitor.left, aInfo.rcMonitor.bottom - aInfo.rcMonitor.top ) ); - rMon.m_aWorkArea = Rectangle( Point( aInfo.rcWork.left, - aInfo.rcWork.top ), - Size( aInfo.rcWork.right - aInfo.rcWork.left, - aInfo.rcWork.bottom - aInfo.rcWork.top ) ); if( (aInfo.dwFlags & MONITORINFOF_PRIMARY) != 0 ) m_nPrimary = it->second; } @@ -103,14 +99,9 @@ bool WinSalSystem::initMonitors() m_aMonitors.push_back( DisplayMonitor( OUString(), OUString(), Rectangle( Point(), Size( w, h ) ), - Rectangle( Point(), Size( w, h ) ), 0 ) ); m_aDeviceNameToMonitor[ OUString() ] = 0; m_nPrimary = 0; - RECT aWorkRect; - if( SystemParametersInfo( SPI_GETWORKAREA, 0, &aWorkRect, 0 ) ) - m_aMonitors.back().m_aWorkArea = Rectangle( aWorkRect.left, aWorkRect.top, - aWorkRect.right, aWorkRect.bottom ); } else { @@ -135,7 +126,6 @@ bool WinSalSystem::initMonitors() m_aMonitors.push_back( DisplayMonitor( aDeviceString, aDeviceName, Rectangle(), - Rectangle(), aDev.StateFlags ) ); } } @@ -182,12 +172,6 @@ Rectangle WinSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) return (nScreen < m_aMonitors.size()) ? m_aMonitors[nScreen].m_aArea : Rectangle(); } -Rectangle WinSalSystem::GetDisplayScreenWorkAreaPosSizePixel( unsigned int nScreen ) -{ - initMonitors(); - return (nScreen < m_aMonitors.size()) ? m_aMonitors[nScreen].m_aWorkArea : Rectangle(); -} - OUString WinSalSystem::GetDisplayScreenName( unsigned int nScreen ) { initMonitors(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits