diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-03-30 20:27:55 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-03-31 06:27:11 +0000 |
commit | a5a571307fb3306b74ab46b085cde6388270a770 (patch) | |
tree | 66d4ce12bb5236c50ab6a5d253bc8c6d8b5d292d /vcl/unx | |
parent | 17d821af6bb9df93569836a92f6bed975587fc6c (diff) |
tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using
make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle"
Except some modules have their own foo::tools namespace, so there have
to use ::tools::Rectangle. This commit just moves the class from the
global namespace, it does not update pre/postwin.h yet.
Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2
Reviewed-on: https://gerrit.libreoffice.org/35923
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/app/saldisp.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/app/wmadaptor.cxx | 42 | ||||
-rw-r--r-- | vcl/unx/generic/fontmanager/fontmanager.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/cairotextrender.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/font.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/openglx11cairotextrender.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/glyphs/glyphcache.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/print/bitmap_gfx.cxx | 14 | ||||
-rw-r--r-- | vcl/unx/generic/print/common_gfx.cxx | 14 | ||||
-rw-r--r-- | vcl/unx/generic/print/genpspgraphics.cxx | 10 | ||||
-rw-r--r-- | vcl/unx/generic/window/salframe.cxx | 46 | ||||
-rw-r--r-- | vcl/unx/gtk/gtksalframe.cxx | 14 | ||||
-rw-r--r-- | vcl/unx/gtk/gtksalmenu.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/gtksys.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/gtk/salnativewidgets-gtk.cxx | 320 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkframe.cxx | 26 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 124 | ||||
-rw-r--r-- | vcl/unx/x11/x11sys.cxx | 8 |
19 files changed, 324 insertions, 324 deletions
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index 0a586297083e..8fa71a19a9da 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -2251,7 +2251,7 @@ void SalDisplay::addXineramaScreenUnique( int i, long i_nX, long i_nY, long i_nW } } m_aXineramaScreenIndexMap[i] = m_aXineramaScreens.size(); - m_aXineramaScreens.push_back( Rectangle( Point( i_nX, i_nY ), Size( i_nWidth, i_nHeight ) ) ); + m_aXineramaScreens.push_back( tools::Rectangle( Point( i_nX, i_nY ), Size( i_nWidth, i_nHeight ) ) ); } void SalDisplay::InitXinerama() @@ -2270,7 +2270,7 @@ void SalDisplay::InitXinerama() { if( nFramebuffers > 1 ) { - m_aXineramaScreens = std::vector<Rectangle>(); + m_aXineramaScreens = std::vector<tools::Rectangle>(); m_aXineramaScreenIndexMap = std::vector<int>(nFramebuffers); for( int i = 0; i < nFramebuffers; i++ ) { diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx index 559bc1cf3770..7b4cc062f854 100644 --- a/vcl/unx/generic/app/wmadaptor.cxx +++ b/vcl/unx/generic/app/wmadaptor.cxx @@ -234,8 +234,8 @@ WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) : // default desktops m_nDesktops = 1; - m_aWMWorkAreas = ::std::vector< Rectangle > - ( 1, Rectangle( Point(), m_pSalDisplay->GetScreenSize( m_pSalDisplay->GetDefaultXScreen() ) ) ); + m_aWMWorkAreas = ::std::vector< tools::Rectangle > + ( 1, tools::Rectangle( Point(), m_pSalDisplay->GetScreenSize( m_pSalDisplay->GetDefaultXScreen() ) ) ); m_bEqualWorkAreas = true; memset( m_aWMAtoms, 0, sizeof( m_aWMAtoms ) ); @@ -457,7 +457,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) : && nItems == 4*(unsigned)m_nDesktops ) { - m_aWMWorkAreas = ::std::vector< Rectangle > ( m_nDesktops ); + m_aWMWorkAreas = ::std::vector< tools::Rectangle > ( m_nDesktops ); long* pValues = reinterpret_cast<long*>(pProperty); for( int i = 0; i < m_nDesktops; i++ ) { @@ -465,7 +465,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) : pValues[4*i+1] ); Size aSize( pValues[4*i+2], pValues[4*i+3] ); - Rectangle aWorkArea( aPoint, aSize ); + tools::Rectangle aWorkArea( aPoint, aSize ); m_aWMWorkAreas[i] = aWorkArea; if( aWorkArea != m_aWMWorkAreas[0] ) m_bEqualWorkAreas = false; @@ -1134,9 +1134,9 @@ void NetWMAdaptor::setNetWMState( X11SalFrame* pFrame ) const if( nCurrent < 0 ) nCurrent = 0; } - Rectangle aPosSize = m_aWMWorkAreas[nCurrent]; + tools::Rectangle aPosSize = m_aWMWorkAreas[nCurrent]; const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() ); - aPosSize = Rectangle( Point( aPosSize.Left() + rGeom.nLeftDecoration, + aPosSize = tools::Rectangle( Point( aPosSize.Left() + rGeom.nLeftDecoration, aPosSize.Top() + rGeom.nTopDecoration ), Size( aPosSize.GetWidth() - rGeom.nLeftDecoration @@ -1224,9 +1224,9 @@ void GnomeWMAdaptor::setGnomeWMState( X11SalFrame* pFrame ) const if( nCurrent < 0 ) nCurrent = 0; } - Rectangle aPosSize = m_aWMWorkAreas[nCurrent]; + tools::Rectangle aPosSize = m_aWMWorkAreas[nCurrent]; const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() ); - aPosSize = Rectangle( Point( aPosSize.Left() + rGeom.nLeftDecoration, + aPosSize = tools::Rectangle( Point( aPosSize.Left() + rGeom.nLeftDecoration, aPosSize.Top() + rGeom.nTopDecoration ), Size( aPosSize.GetWidth() - rGeom.nLeftDecoration @@ -1448,7 +1448,7 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert if( m_pSalDisplay->IsXinerama() ) { Point aMed( aTL.X() + rGeom.nWidth/2, aTL.Y() + rGeom.nHeight/2 ); - const std::vector< Rectangle >& rScreens = m_pSalDisplay->GetXineramaScreens(); + const std::vector< tools::Rectangle >& rScreens = m_pSalDisplay->GetXineramaScreens(); for(const auto & rScreen : rScreens) if( rScreen.IsInside( aMed ) ) { @@ -1457,7 +1457,7 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert break; } } - Rectangle aTarget( aTL, + tools::Rectangle aTarget( aTL, Size( aScreenSize.Width() - rGeom.nLeftDecoration - rGeom.nTopDecoration, aScreenSize.Height() - rGeom.nTopDecoration - rGeom.nBottomDecoration ) ); @@ -1488,7 +1488,7 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert rGeom.nY : pFrame->maRestorePosSize.Top(); } - Rectangle aRestore( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); + tools::Rectangle aRestore( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); if( pFrame->bMapped_ ) { XSetInputFocus( m_pDisplay, @@ -1516,7 +1516,7 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert else { pFrame->SetPosSize( pFrame->maRestorePosSize ); - pFrame->maRestorePosSize = Rectangle(); + pFrame->maRestorePosSize = tools::Rectangle(); pFrame->nWidth_ = rGeom.nWidth; pFrame->nHeight_ = rGeom.nHeight; } @@ -1577,12 +1577,12 @@ void NetWMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bV setNetWMState( pFrame ); } if( !bHorizontal && !bVertical ) - pFrame->maRestorePosSize = Rectangle(); + pFrame->maRestorePosSize = tools::Rectangle(); else if( pFrame->maRestorePosSize.IsEmpty() ) { const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() ); pFrame->maRestorePosSize = - Rectangle( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); + tools::Rectangle( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); } } else @@ -1631,12 +1631,12 @@ void GnomeWMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool setGnomeWMState( pFrame ); if( !bHorizontal && !bVertical ) - pFrame->maRestorePosSize = Rectangle(); + pFrame->maRestorePosSize = tools::Rectangle(); else if( pFrame->maRestorePosSize.IsEmpty() ) { const SalFrameGeometry& rGeom( pFrame->GetUnmirroredGeometry() ); pFrame->maRestorePosSize = - Rectangle( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); + tools::Rectangle( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); } } else @@ -1815,14 +1815,14 @@ int NetWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEv } if( ! (pFrame->mbMaximizedHorz || pFrame->mbMaximizedVert ) ) - pFrame->maRestorePosSize = Rectangle(); + pFrame->maRestorePosSize = tools::Rectangle(); else { const SalFrameGeometry& rGeom = pFrame->GetUnmirroredGeometry(); // the current geometry may already be changed by the corresponding // ConfigureNotify, but this cannot be helped pFrame->maRestorePosSize = - Rectangle( Point( rGeom.nX, rGeom.nY ), + tools::Rectangle( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); } } @@ -1881,14 +1881,14 @@ int GnomeWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* p } if( ! (pFrame->mbMaximizedHorz || pFrame->mbMaximizedVert ) ) - pFrame->maRestorePosSize = Rectangle(); + pFrame->maRestorePosSize = tools::Rectangle(); else { const SalFrameGeometry& rGeom = pFrame->GetUnmirroredGeometry(); // the current geometry may already be changed by the corresponding // ConfigureNotify, but this cannot be helped pFrame->maRestorePosSize = - Rectangle( Point( rGeom.nX, rGeom.nY ), + tools::Rectangle( Point( rGeom.nX, rGeom.nY ), Size( rGeom.nWidth, rGeom.nHeight ) ); } } @@ -2047,7 +2047,7 @@ void NetWMAdaptor::showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), &aRoot, &aChild, &root_x, &root_y, &lx, &ly, &mask ); - const std::vector< Rectangle >& rScreens = m_pSalDisplay->GetXineramaScreens(); + const std::vector< tools::Rectangle >& rScreens = m_pSalDisplay->GetXineramaScreens(); Point aMousePoint( root_x, root_y ); for(const auto & rScreen : rScreens) { diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx index 5efceb8bec49..012876db03a3 100644 --- a/vcl/unx/generic/fontmanager/fontmanager.cxx +++ b/vcl/unx/generic/fontmanager/fontmanager.cxx @@ -1090,7 +1090,7 @@ bool PrintFontManager::createFontSubset( int xMin, yMin, xMax, yMax; getFontBoundingBox( nFont, xMin, yMin, xMax, yMax ); - rInfo.m_aFontBBox = Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) ); + rInfo.m_aFontBBox = tools::Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) ); rInfo.m_nCapHeight = yMax; // Well ... // fill in glyph advance widths diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx index 11cedcc66701..6321f64e1c64 100644 --- a/vcl/unx/generic/gdi/cairotextrender.cxx +++ b/vcl/unx/generic/gdi/cairotextrender.cxx @@ -425,7 +425,7 @@ void CairoTextRender::GetFontMetric( ImplFontMetricDataRef& rxFontMetric, int nF mpFreetypeFont[nFallbackLevel]->GetFontMetric(rxFontMetric); } -bool CairoTextRender::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect) +bool CairoTextRender::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect) { const int nLevel = rGlyph.mnFallbackLevel; if( nLevel >= MAX_FALLBACK ) @@ -435,7 +435,7 @@ bool CairoTextRender::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRec if( !pSF ) return false; - Rectangle aRect = pSF->GetGlyphBoundRect(rGlyph); + tools::Rectangle aRect = pSF->GetGlyphBoundRect(rGlyph); if ( pSF->mnCos != 0x10000 && pSF->mnSin != 0 ) { diff --git a/vcl/unx/generic/gdi/font.cxx b/vcl/unx/generic/gdi/font.cxx index b4141e07efad..2e8dd081cf35 100644 --- a/vcl/unx/generic/gdi/font.cxx +++ b/vcl/unx/generic/gdi/font.cxx @@ -106,7 +106,7 @@ X11SalGraphics::GetFontMetric( ImplFontMetricDataRef &rxFontMetric, int nFallbac mxTextRenderImpl->GetFontMetric(rxFontMetric, nFallbackLevel); } -bool X11SalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect) +bool X11SalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect) { return mxTextRenderImpl->GetGlyphBoundRect(rGlyph, rRect); } diff --git a/vcl/unx/generic/gdi/openglx11cairotextrender.cxx b/vcl/unx/generic/gdi/openglx11cairotextrender.cxx index 2710b6a0ed10..08618195a036 100644 --- a/vcl/unx/generic/gdi/openglx11cairotextrender.cxx +++ b/vcl/unx/generic/gdi/openglx11cairotextrender.cxx @@ -26,7 +26,7 @@ cairo_t* OpenGLX11CairoTextRender::getCairoContext() OpenGLSalGraphicsImpl *pImpl = dynamic_cast< OpenGLSalGraphicsImpl* >(mrParent.GetImpl()); if( pImpl ) { - Rectangle aClipRect = pImpl->getClipRegion().GetBoundRect(); + tools::Rectangle aClipRect = pImpl->getClipRegion().GetBoundRect(); if( aClipRect.GetWidth() == 0 || aClipRect.GetHeight() == 0 ) { aClipRect.setWidth( GetWidth() ); @@ -46,7 +46,7 @@ void OpenGLX11CairoTextRender::getSurfaceOffset( double& nDX, double& nDY ) OpenGLSalGraphicsImpl *pImpl = dynamic_cast< OpenGLSalGraphicsImpl* >(mrParent.GetImpl()); if( pImpl ) { - Rectangle aClipRect = pImpl->getClipRegion().GetBoundRect(); + tools::Rectangle aClipRect = pImpl->getClipRegion().GetBoundRect(); nDX = -aClipRect.Left(); nDY = -aClipRect.Top(); } @@ -69,7 +69,7 @@ void OpenGLX11CairoTextRender::releaseCairoContext(cairo_t* cr) unsigned char *pSrc = cairo_image_surface_get_data( pSurface ); // XXX: lfrb: GLES 2.0 doesn't support GL_UNSIGNED_INT_8_8_8_8_REV - Rectangle aClipRect = pImpl->getClipRegion().GetBoundRect(); + tools::Rectangle aClipRect = pImpl->getClipRegion().GetBoundRect(); SalTwoRect aRect(0, 0, nWidth, nHeight, aClipRect.Left(), aClipRect.Top(), nWidth, nHeight); diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index c24dd5f3e050..c4341fe27176 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -650,7 +650,7 @@ void FreetypeFont::InitGlyphData(const GlyphItem& rGlyph, GlyphData& rGD ) const FT_BBox aBbox; FT_Glyph_Get_CBox( pGlyphFT, FT_GLYPH_BBOX_PIXELS, &aBbox ); - rGD.SetBoundRect(Rectangle(aBbox.xMin, -aBbox.yMax, aBbox.xMax, -aBbox.yMin)); + rGD.SetBoundRect(tools::Rectangle(aBbox.xMin, -aBbox.yMax, aBbox.xMax, -aBbox.yMin)); FT_Done_Glyph( pGlyphFT ); } diff --git a/vcl/unx/generic/glyphs/glyphcache.cxx b/vcl/unx/generic/glyphs/glyphcache.cxx index b72a0a0cd4a1..f5978ba35c2f 100644 --- a/vcl/unx/generic/glyphs/glyphcache.cxx +++ b/vcl/unx/generic/glyphs/glyphcache.cxx @@ -314,7 +314,7 @@ long FreetypeFont::Release() const return --mnRefCount; } -const Rectangle& FreetypeFont::GetGlyphBoundRect(const GlyphItem& rGlyph) +const tools::Rectangle& FreetypeFont::GetGlyphBoundRect(const GlyphItem& rGlyph) { // usually the GlyphData is cached GlyphList::iterator it = maGlyphList.find(rGlyph.maGlyphId); diff --git a/vcl/unx/generic/print/bitmap_gfx.cxx b/vcl/unx/generic/print/bitmap_gfx.cxx index e28064d6f543..0573001edb06 100644 --- a/vcl/unx/generic/print/bitmap_gfx.cxx +++ b/vcl/unx/generic/print/bitmap_gfx.cxx @@ -407,7 +407,7 @@ LZWEncoder::EncodeByte (sal_uInt8 nByte ) */ void -PrinterGfx::DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc, +PrinterGfx::DrawBitmap (const tools::Rectangle& rDest, const tools::Rectangle& rSrc, const PrinterBmp& rBitmap) { double fScaleX = (double)rDest.GetWidth(); @@ -468,7 +468,7 @@ PrinterGfx::DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc, */ void -PrinterGfx::DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea) +PrinterGfx::DrawPS1GrayImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea) { sal_uInt32 nWidth = rArea.GetWidth(); sal_uInt32 nHeight = rArea.GetHeight(); @@ -515,7 +515,7 @@ PrinterGfx::DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea) */ void -PrinterGfx::writePS2ImageHeader (const Rectangle& rArea, psp::ImageType nType) +PrinterGfx::writePS2ImageHeader (const tools::Rectangle& rArea, psp::ImageType nType) { sal_Int32 nChar = 0; sal_Char pImage [512]; @@ -591,7 +591,7 @@ PrinterGfx::writePS2Colorspace(const PrinterBmp& rBitmap, psp::ImageType nType) } void -PrinterGfx::DrawPS2GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea) +PrinterGfx::DrawPS2GrayImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea) { writePS2Colorspace(rBitmap, psp::ImageType::GrayScaleImage); writePS2ImageHeader(rArea, psp::ImageType::GrayScaleImage); @@ -609,7 +609,7 @@ PrinterGfx::DrawPS2GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea) } void -PrinterGfx::DrawPS2MonoImage (const PrinterBmp& rBitmap, const Rectangle& rArea) +PrinterGfx::DrawPS2MonoImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea) { writePS2Colorspace(rBitmap, psp::ImageType::MonochromeImage); writePS2ImageHeader(rArea, psp::ImageType::MonochromeImage); @@ -640,7 +640,7 @@ PrinterGfx::DrawPS2MonoImage (const PrinterBmp& rBitmap, const Rectangle& rArea) } void -PrinterGfx::DrawPS2PaletteImage (const PrinterBmp& rBitmap, const Rectangle& rArea) +PrinterGfx::DrawPS2PaletteImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea) { writePS2Colorspace(rBitmap, psp::ImageType::PaletteImage); writePS2ImageHeader(rArea, psp::ImageType::PaletteImage); @@ -658,7 +658,7 @@ PrinterGfx::DrawPS2PaletteImage (const PrinterBmp& rBitmap, const Rectangle& rAr } void -PrinterGfx::DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const Rectangle& rArea) +PrinterGfx::DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const tools::Rectangle& rArea) { writePS2Colorspace(rBitmap, psp::ImageType::TrueColorImage); writePS2ImageHeader(rArea, psp::ImageType::TrueColorImage); diff --git a/vcl/unx/generic/print/common_gfx.cxx b/vcl/unx/generic/print/common_gfx.cxx index df32ef2a2ebb..1d9a1ca9b659 100644 --- a/vcl/unx/generic/print/common_gfx.cxx +++ b/vcl/unx/generic/print/common_gfx.cxx @@ -160,21 +160,21 @@ void PrinterGfx::UnionClipRegion (sal_Int32 nX,sal_Int32 nY,sal_Int32 nDX,sal_Int32 nDY) { if( nDX && nDY ) - maClipRegion.push_back (Rectangle(Point(nX,nY ), Size(nDX,nDY))); + maClipRegion.push_back (tools::Rectangle(Point(nX,nY ), Size(nDX,nDY))); } bool -PrinterGfx::JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it, +PrinterGfx::JoinVerticalClipRectangles( std::list< tools::Rectangle >::iterator& it, Point& rOldPoint, sal_Int32& rColumn ) { bool bSuccess = false; - std::list< Rectangle >::iterator tempit, nextit; + std::list< tools::Rectangle >::iterator tempit, nextit; nextit = it; ++nextit; std::list< Point > leftside, rightside; - Rectangle aLastRect( *it ); + tools::Rectangle aLastRect( *it ); leftside.push_back( Point( it->Left(), it->Top() ) ); rightside.push_back( Point( it->Right()+1, it->Top() ) ); while( nextit != maClipRegion.end() ) @@ -274,7 +274,7 @@ PrinterGfx::EndSetClipRegion() Point aOldPoint (0, 0); sal_Int32 nColumn = 0; - std::list< Rectangle >::iterator it = maClipRegion.begin(); + std::list< tools::Rectangle >::iterator it = maClipRegion.begin(); while( it != maClipRegion.end() ) { // try to concatenate adjacent rectangles @@ -301,7 +301,7 @@ PrinterGfx::EndSetClipRegion() */ void -PrinterGfx::DrawRect (const Rectangle& rRectangle ) +PrinterGfx::DrawRect (const tools::Rectangle& rRectangle ) { char pRect [128]; sal_Int32 nChar = 0; @@ -1053,7 +1053,7 @@ PrinterGfx::PSShowGlyph (const unsigned char nGlyphId) } bool -PrinterGfx::DrawEPS( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize ) +PrinterGfx::DrawEPS( const tools::Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize ) { if( nSize == 0 ) return true; diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx index 9c20ac6d1fb2..be31508dc179 100644 --- a/vcl/unx/generic/print/genpspgraphics.cxx +++ b/vcl/unx/generic/print/genpspgraphics.cxx @@ -398,7 +398,7 @@ void GenPspGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 ) void GenPspGraphics::drawRect( long nX, long nY, long nDX, long nDY ) { - m_pPrinterGfx->DrawRect (Rectangle(Point(nX, nY), Size(nDX, nDY))); + m_pPrinterGfx->DrawRect (tools::Rectangle(Point(nX, nY), Size(nDX, nDY))); } void GenPspGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint *pPtAry ) @@ -468,7 +468,7 @@ void GenPspGraphics::invert( sal_uInt32, bool GenPspGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize ) { - return m_pPrinterGfx->DrawEPS( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ), pPtr, nSize ); + return m_pPrinterGfx->DrawEPS( tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ), pPtr, nSize ); } void GenPspGraphics::copyBits( const SalTwoRect&, @@ -484,9 +484,9 @@ void GenPspGraphics::copyArea ( long,long,long,long,long,long,bool ) void GenPspGraphics::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap ) { - Rectangle aSrc (Point(rPosAry.mnSrcX, rPosAry.mnSrcY), + tools::Rectangle aSrc (Point(rPosAry.mnSrcX, rPosAry.mnSrcY), Size(rPosAry.mnSrcWidth, rPosAry.mnSrcHeight)); - Rectangle aDst (Point(rPosAry.mnDestX, rPosAry.mnDestY), + tools::Rectangle aDst (Point(rPosAry.mnDestX, rPosAry.mnDestY), Size(rPosAry.mnDestWidth, rPosAry.mnDestHeight)); BitmapBuffer* pBuffer= const_cast<SalBitmap&>(rSalBitmap).AcquireBuffer(BitmapAccessMode::Read); @@ -756,7 +756,7 @@ void GenPspGraphics::GetFontMetric(ImplFontMetricDataRef& rxFontMetric, int nFal m_pFreetypeFont[nFallbackLevel]->GetFontMetric(rxFontMetric); } -bool GenPspGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect) +bool GenPspGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect) { const int nLevel = rGlyph.mnFallbackLevel; if( nLevel >= MAX_FALLBACK ) diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index af37168137bb..0828f68c3587 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -514,7 +514,7 @@ void X11SalFrame::Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nXScreen GetDisplay()->GetRootWindow( m_nXScreen ), &aRoot, &aChild, &root_x, &root_y, &lx, &ly, &mask ); - const std::vector< Rectangle >& rScreens = GetDisplay()->GetXineramaScreens(); + const std::vector< tools::Rectangle >& rScreens = GetDisplay()->GetXineramaScreens(); for(const auto & rScreen : rScreens) if( rScreen.IsInside( Point( root_x, root_y ) ) ) { @@ -1390,7 +1390,7 @@ void X11SalFrame::ToTop( SalFrameToTop nFlags ) } } -void X11SalFrame::GetWorkArea( Rectangle& rWorkArea ) +void X11SalFrame::GetWorkArea( tools::Rectangle& rWorkArea ) { rWorkArea = pDisplay_->getWMAdaptor()->getWorkArea( 0 ); } @@ -1449,7 +1449,7 @@ void X11SalFrame::Center( ) &root_x, &root_y, &x, &y, &mask ); - const std::vector< Rectangle >& rScreens = GetDisplay()->GetXineramaScreens(); + const std::vector< tools::Rectangle >& rScreens = GetDisplay()->GetXineramaScreens(); for(const auto & rScreen : rScreens) if( rScreen.IsInside( Point( root_x, root_y ) ) ) { @@ -1468,7 +1468,7 @@ void X11SalFrame::Center( ) pFrame = pFrame->mpParent; if( pFrame->maGeometry.nWidth < 1 || pFrame->maGeometry.nHeight < 1 ) { - Rectangle aRect; + tools::Rectangle aRect; pFrame->GetPosSize( aRect ); pFrame->maGeometry.nX = aRect.Left(); pFrame->maGeometry.nY = aRect.Top(); @@ -1529,7 +1529,7 @@ void X11SalFrame::Center( ) } Point aPoint(nX, nY); - SetPosSize( Rectangle( aPoint, Size( maGeometry.nWidth, maGeometry.nHeight ) ) ); + SetPosSize( tools::Rectangle( aPoint, Size( maGeometry.nWidth, maGeometry.nHeight ) ) ); } void X11SalFrame::updateScreenNumber() @@ -1537,7 +1537,7 @@ void X11SalFrame::updateScreenNumber() if( GetDisplay()->IsXinerama() && GetDisplay()->GetXineramaScreens().size() > 1 ) { Point aPoint( maGeometry.nX, maGeometry.nY ); - const std::vector<Rectangle>& rScreenRects( GetDisplay()->GetXineramaScreens() ); + const std::vector<tools::Rectangle>& rScreenRects( GetDisplay()->GetXineramaScreens() ); size_t nScreens = rScreenRects.size(); for( size_t i = 0; i < nScreens; i++ ) { @@ -1558,7 +1558,7 @@ void X11SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u return; // relative positioning in X11SalFrame::SetPosSize - Rectangle aPosSize( Point( maGeometry.nX, maGeometry.nY ), Size( maGeometry.nWidth, maGeometry.nHeight ) ); + tools::Rectangle aPosSize( Point( maGeometry.nX, maGeometry.nY ), Size( maGeometry.nWidth, maGeometry.nHeight ) ); aPosSize.Justify(); if( ! ( nFlags & SAL_FRAME_POSSIZE_X ) ) @@ -1578,7 +1578,7 @@ void X11SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u if( ! ( nFlags & SAL_FRAME_POSSIZE_HEIGHT ) ) nHeight = aPosSize.GetHeight(); - aPosSize = Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ); + aPosSize = tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ); if( ! ( nFlags & ( SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y ) ) ) { @@ -1621,7 +1621,7 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState ) // Request for position or size change if (pState->mnMask & FRAMESTATE_MASK_GEOMETRY) { - Rectangle aPosSize; + tools::Rectangle aPosSize; /* #i44325# * if maximized, set restore size and guess maximized size from last time @@ -1771,7 +1771,7 @@ bool X11SalFrame::GetWindowState( SalFrameState* pState ) else pState->mnState = WindowStateState::Normal; - Rectangle aPosSize; + tools::Rectangle aPosSize; if( maRestorePosSize.IsEmpty() ) GetPosSize( aPosSize ); else @@ -1814,7 +1814,7 @@ void X11SalFrame::SetMenu( SalMenu* ) { } -void X11SalFrame::GetPosSize( Rectangle &rPosSize ) +void X11SalFrame::GetPosSize( tools::Rectangle &rPosSize ) { if( maGeometry.nWidth < 1 || maGeometry.nHeight < 1 ) { @@ -1822,10 +1822,10 @@ void X11SalFrame::GetPosSize( Rectangle &rPosSize ) long w = aScreenSize.Width() - maGeometry.nLeftDecoration - maGeometry.nRightDecoration; long h = aScreenSize.Height() - maGeometry.nTopDecoration - maGeometry.nBottomDecoration; - rPosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ), Size( w, h ) ); + rPosSize = tools::Rectangle( Point( maGeometry.nX, maGeometry.nY ), Size( w, h ) ); } else - rPosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ), + rPosSize = tools::Rectangle( Point( maGeometry.nX, maGeometry.nY ), Size( maGeometry.nWidth, maGeometry.nHeight ) ); } @@ -1872,7 +1872,7 @@ void X11SalFrame::SetSize( const Size &rSize ) } } -void X11SalFrame::SetPosSize( const Rectangle &rPosSize ) +void X11SalFrame::SetPosSize( const tools::Rectangle &rPosSize ) { XWindowChanges values; values.x = rPosSize.Left(); @@ -2049,8 +2049,8 @@ void X11SalFrame::SetScreenNumber( unsigned int nNewScreen ) if( nNewScreen >= GetDisplay()->GetXineramaScreens().size() ) return; - Rectangle aOldScreenRect( GetDisplay()->GetXineramaScreens()[maGeometry.nDisplayScreenNumber] ); - Rectangle aNewScreenRect( GetDisplay()->GetXineramaScreens()[nNewScreen] ); + tools::Rectangle aOldScreenRect( GetDisplay()->GetXineramaScreens()[maGeometry.nDisplayScreenNumber] ); + tools::Rectangle aNewScreenRect( GetDisplay()->GetXineramaScreens()[nNewScreen] ); bool bVisible = bMapped_; if( bVisible ) Show( false ); @@ -2108,11 +2108,11 @@ void X11SalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen ) return; if( bFullScreen ) { - maRestorePosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ), + maRestorePosSize = tools::Rectangle( Point( maGeometry.nX, maGeometry.nY ), Size( maGeometry.nWidth, maGeometry.nHeight ) ); - Rectangle aRect; + tools::Rectangle aRect; if( nScreen < 0 || nScreen >= static_cast<int>(GetDisplay()->GetXineramaScreens().size()) ) - aRect = Rectangle( Point(0,0), GetDisplay()->GetScreenSize( m_nXScreen ) ); + aRect = tools::Rectangle( Point(0,0), GetDisplay()->GetScreenSize( m_nXScreen ) ); else aRect = GetDisplay()->GetXineramaScreens()[nScreen]; nStyle_ |= SalFrameStyleFlags::PARTIAL_FULLSCREEN; @@ -2139,8 +2139,8 @@ void X11SalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen ) mbFullScreen = false; nStyle_ &= ~SalFrameStyleFlags::PARTIAL_FULLSCREEN; bool bVisible = bMapped_; - Rectangle aRect = maRestorePosSize; - maRestorePosSize = Rectangle(); + tools::Rectangle aRect = maRestorePosSize; + maRestorePosSize = tools::Rectangle(); if( bVisible ) Show( false ); createNewWindow( None, m_nXScreen ); @@ -3368,7 +3368,7 @@ long X11SalFrame::HandleExposeEvent( XEvent *pEvent ) XSetInputFocus( GetXDisplay(), GetShellWindow(), RevertToNone, CurrentTime ); // width and height are extents, so they are of by one for rectangle - maPaintRegion.Union( Rectangle( Point(aRect.x, aRect.y), Size(aRect.width+1, aRect.height+1) ) ); + maPaintRegion.Union( tools::Rectangle( Point(aRect.x, aRect.y), Size(aRect.width+1, aRect.height+1) ) ); if( nCount ) // wait for last expose rectangle, do not wait for resize timer @@ -3378,7 +3378,7 @@ long X11SalFrame::HandleExposeEvent( XEvent *pEvent ) SalPaintEvent aPEvt( maPaintRegion.Left(), maPaintRegion.Top(), maPaintRegion.GetWidth(), maPaintRegion.GetHeight() ); CallCallback( SalEvent::Paint, &aPEvt ); - maPaintRegion = Rectangle(); + maPaintRegion = tools::Rectangle(); return 1; } diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index 371f9be54f16..07d81cd39751 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -1771,7 +1771,7 @@ void GtkSalFrame::GetClientSize( long& rWidth, long& rHeight ) rWidth = rHeight = 0; } -void GtkSalFrame::GetWorkArea( Rectangle& rRect ) +void GtkSalFrame::GetWorkArea( tools::Rectangle& rRect ) { rRect = GetGtkSalData()->GetGtkDisplay()->getWMAdaptor()->getWorkArea( 0 ); } @@ -1808,7 +1808,7 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState ) updateScreenNumber(); m_nState = GdkWindowState( m_nState | GDK_WINDOW_STATE_MAXIMIZED ); - m_aRestorePosSize = Rectangle( Point( pState->mnX, pState->mnY ), + m_aRestorePosSize = tools::Rectangle( Point( pState->mnX, pState->mnY ), Size( pState->mnWidth, pState->mnHeight ) ); CallCallback( SalEvent::Resize, nullptr ); } @@ -1893,7 +1893,7 @@ bool GtkSalFrame::GetWindowState( SalFrameState* pState ) return true; } -void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, Rectangle *pSize ) +void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, tools::Rectangle *pSize ) { if( !m_pWindow ) return; @@ -2081,7 +2081,7 @@ void GtkSalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen ) if( bFullScreen ) { - m_aRestorePosSize = Rectangle( Point( maGeometry.nX, maGeometry.nY ), + m_aRestorePosSize = tools::Rectangle( Point( maGeometry.nX, maGeometry.nY ), Size( maGeometry.nWidth, maGeometry.nHeight ) ); SetScreen( nScreen, SetType::Fullscreen ); } @@ -2089,7 +2089,7 @@ void GtkSalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen ) { SetScreen( nScreen, SetType::UnFullscreen, !m_aRestorePosSize.IsEmpty() ? &m_aRestorePosSize : nullptr ); - m_aRestorePosSize = Rectangle(); + m_aRestorePosSize = tools::Rectangle(); } } @@ -3268,7 +3268,7 @@ gboolean GtkSalFrame::signalWindowState( GtkWidget*, GdkEvent* pEvent, gpointer ! (pThis->m_nState & GDK_WINDOW_STATE_MAXIMIZED) ) { pThis->m_aRestorePosSize = - Rectangle( Point( pThis->maGeometry.nX, pThis->maGeometry.nY ), + tools::Rectangle( Point( pThis->maGeometry.nX, pThis->maGeometry.nY ), Size( pThis->maGeometry.nWidth, pThis->maGeometry.nHeight ) ); } pThis->m_nState = pEvent->window_state.new_window_state; @@ -3870,7 +3870,7 @@ gboolean GtkSalFrame::IMHandler::signalIMDeleteSurrounding( GtkIMContext*, gint Size GtkSalDisplay::GetScreenSize( int nDisplayScreen ) { - Rectangle aRect = m_pSys->GetDisplayScreenPosSizePixel( nDisplayScreen ); + tools::Rectangle aRect = m_pSys->GetDisplayScreenPosSizePixel( nDisplayScreen ); return Size( aRect.GetWidth(), aRect.GetHeight() ); } diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx index d2067719ff2b..f004a055d544 100644 --- a/vcl/unx/gtk/gtksalmenu.cxx +++ b/vcl/unx/gtk/gtksalmenu.cxx @@ -405,7 +405,7 @@ static void MenuPositionFunc(GtkMenu* menu, gint* x, gint* y, gboolean* push_in, } #endif -bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const Rectangle& rRect, +bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags) { #if GTK_CHECK_VERSION(3,0,0) diff --git a/vcl/unx/gtk/gtksys.cxx b/vcl/unx/gtk/gtksys.cxx index 80831d68737b..5c047e4453a8 100644 --- a/vcl/unx/gtk/gtksys.cxx +++ b/vcl/unx/gtk/gtksys.cxx @@ -250,16 +250,16 @@ unsigned int GtkSalSystem::GetDisplayBuiltInScreen() return idx + _get_primary_monitor (pDefault); } -Rectangle GtkSalSystem::GetDisplayScreenPosSizePixel (unsigned int nScreen) +tools::Rectangle GtkSalSystem::GetDisplayScreenPosSizePixel (unsigned int nScreen) { gint nMonitor; GdkScreen *pScreen; GdkRectangle aRect; pScreen = getScreenMonitorFromIdx (nScreen, nMonitor); if (!pScreen) - return Rectangle(); + return tools::Rectangle(); gdk_screen_get_monitor_geometry (pScreen, nMonitor, &aRect); - return Rectangle (Point(aRect.x, aRect.y), Size(aRect.width, aRect.height)); + return tools::Rectangle (Point(aRect.x, aRect.y), Size(aRect.width, aRect.height)); } // convert ~ to indicate mnemonic to '_' diff --git a/vcl/unx/gtk/salnativewidgets-gtk.cxx b/vcl/unx/gtk/salnativewidgets-gtk.cxx index 162b48535dcb..46ebe46c7e84 100644 --- a/vcl/unx/gtk/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/salnativewidgets-gtk.cxx @@ -214,53 +214,53 @@ static void NWConvertVCLStateToGTKState( ControlState nVCLState, GtkStateType* n static void NWAddWidgetToCacheWindow( GtkWidget* widget, SalX11Screen nScreen ); static void NWSetWidgetState( GtkWidget* widget, ControlState nState, GtkStateType nGtkState ); -static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow ); +static void NWCalcArrowRect( const tools::Rectangle& rButton, tools::Rectangle& rArrow ); /* * Individual helper functions * */ -static Rectangle NWGetButtonArea( SalX11Screen nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState, +static tools::Rectangle NWGetButtonArea( SalX11Screen nScreen, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); -static Rectangle NWGetTabItemRect( SalX11Screen nScreen, Rectangle aAreaRect ); +static tools::Rectangle NWGetTabItemRect( SalX11Screen nScreen, tools::Rectangle aAreaRect ); -static Rectangle NWGetEditBoxPixmapRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState, +static tools::Rectangle NWGetEditBoxPixmapRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); static void NWPaintOneEditBox( SalX11Screen nScreen, GdkDrawable * gdkDrawable, GdkRectangle *gdkRect, - ControlType nType, ControlPart nPart, Rectangle aEditBoxRect, + ControlType nType, ControlPart nPart, tools::Rectangle aEditBoxRect, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); -static Rectangle NWGetSpinButtonRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState, +static tools::Rectangle NWGetSpinButtonRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); -static void NWPaintOneSpinButton( SalX11Screen nScreen, GdkPixmap * pixmap, ControlType nType, ControlPart nPart, Rectangle aAreaRect, +static void NWPaintOneSpinButton( SalX11Screen nScreen, GdkPixmap * pixmap, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); -static Rectangle NWGetComboBoxButtonRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState, +static tools::Rectangle NWGetComboBoxButtonRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); -static Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState, +static tools::Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); -static Rectangle NWGetListBoxIndicatorRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, Rectangle aAreaRect, ControlState nState, +static tools::Rectangle NWGetListBoxIndicatorRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, tools::Rectangle aAreaRect, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); -static Rectangle NWGetToolbarRect( SalX11Screen nScreen, +static tools::Rectangle NWGetToolbarRect( SalX11Screen nScreen, ControlType nType, ControlPart nPart, - Rectangle aAreaRect, + tools::Rectangle aAreaRect, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); static int getFrameWidth(GtkWidget* widget); -static Rectangle NWGetScrollButtonRect( SalX11Screen nScreen, ControlPart nPart, Rectangle aAreaRect ); +static tools::Rectangle NWGetScrollButtonRect( SalX11Screen nScreen, ControlPart nPart, tools::Rectangle aAreaRect ); /************************************************************************ @@ -339,7 +339,7 @@ class NWPixmapCacheData public: ControlType m_nType; ControlState m_nState; - Rectangle m_pixmapRect; + tools::Rectangle m_pixmapRect; GdkX11Pixmap* m_pixmap; GdkX11Pixmap* m_mask; @@ -363,8 +363,8 @@ public: { delete [] pData; m_idx = 0; m_size = n; pData = new NWPixmapCacheData[m_size]; } int GetSize() const { return m_size; } - bool Find( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkX11Pixmap** pPixmap, GdkX11Pixmap** pMask ); - void Fill( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask ); + bool Find( ControlType aType, ControlState aState, const tools::Rectangle& r_pixmapRect, GdkX11Pixmap** pPixmap, GdkX11Pixmap** pMask ); + void Fill( ControlType aType, ControlState aState, const tools::Rectangle& r_pixmapRect, GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask ); void ThemeChanged(); }; @@ -413,7 +413,7 @@ void NWPixmapCache::ThemeChanged() pData[i].SetPixmap( nullptr, nullptr ); } -bool NWPixmapCache::Find( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkX11Pixmap** pPixmap, GdkX11Pixmap** pMask ) +bool NWPixmapCache::Find( ControlType aType, ControlState aState, const tools::Rectangle& r_pixmapRect, GdkX11Pixmap** pPixmap, GdkX11Pixmap** pMask ) { aState &= ~ControlState::CACHING_ALLOWED; // mask clipping flag int i; @@ -433,7 +433,7 @@ bool NWPixmapCache::Find( ControlType aType, ControlState aState, const Rectang return false; } -void NWPixmapCache::Fill( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask ) +void NWPixmapCache::Fill( ControlType aType, ControlState aState, const tools::Rectangle& r_pixmapRect, GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask ) { if( !(aState & ControlState::CACHING_ALLOWED) ) return; @@ -738,7 +738,7 @@ bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP bool GtkSalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, const Point& aPos, bool& rIsInside ) { @@ -762,8 +762,8 @@ bool GtkSalGraphics::hitTestNativeControl( ControlType nType, "has-backward-stepper", &has_backward, "has-secondary-backward-stepper", &has_backward2, nullptr ); - Rectangle aForward; - Rectangle aBackward; + tools::Rectangle aForward; + tools::Rectangle aBackward; rIsInside = false; @@ -839,7 +839,7 @@ bool GtkSalGraphics::hitTestNativeControl( ControlType nType, } bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart, - const Rectangle& rControlRegion, ControlState nState, + const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption) { // get a GC with current clipping region set @@ -855,16 +855,16 @@ bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart, GtkSalGraphics::bThemeChanged = false; } - Rectangle aCtrlRect( rControlRegion ); + tools::Rectangle aCtrlRect( rControlRegion ); vcl::Region aClipRegion( m_aClipRegion ); if( aClipRegion.IsNull() ) aClipRegion = aCtrlRect; - Rectangle aPixmapRect; + tools::Rectangle aPixmapRect; // make pixmap a little larger since some themes draw decoration // outside the rectangle, see e.g. checkbox - aPixmapRect = Rectangle(Point( aCtrlRect.Left()-1, aCtrlRect.Top()-1 ), + aPixmapRect = tools::Rectangle(Point( aCtrlRect.Left()-1, aCtrlRect.Top()-1 ), Size( aCtrlRect.GetWidth()+2, aCtrlRect.GetHeight()+2) ); ControlCacheKey aControlCacheKey(nType, nPart, nState, aPixmapRect.GetSize()); @@ -874,7 +874,7 @@ bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart, return true; } - std::list< Rectangle > aClip; + std::list< tools::Rectangle > aClip; int nPasses = 0; GdkDrawable* gdkDrawable[2]; std::unique_ptr<GdkX11Pixmap> xPixmap; @@ -908,7 +908,7 @@ bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart, gdkDrawable[0] = xPixmap->GetGdkDrawable(); } - aCtrlRect = Rectangle( Point(1,1), aCtrlRect.GetSize() ); + aCtrlRect = tools::Rectangle( Point(1,1), aCtrlRect.GetSize() ); aClip.push_back( aCtrlRect ); } else @@ -920,7 +920,7 @@ bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart, for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter) { - Rectangle aPaintRect = aCtrlRect.GetIntersection(*aRectIter); + tools::Rectangle aPaintRect = aCtrlRect.GetIntersection(*aRectIter); if( aPaintRect.IsEmpty() ) continue; aClip.push_back( aPaintRect ); @@ -954,8 +954,8 @@ bool GtkSalGraphics::DoDrawNativeControl( GdkDrawable* pDrawable, ControlType nType, ControlPart nPart, - const Rectangle& aCtrlRect, - const std::list< Rectangle >& aClip, + const tools::Rectangle& aCtrlRect, + const std::list< tools::Rectangle >& aClip, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption, @@ -1077,12 +1077,12 @@ bool GtkSalGraphics::DoDrawNativeControl( bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption, - Rectangle &rNativeBoundingRegion, - Rectangle &rNativeContentRegion ) + tools::Rectangle &rNativeBoundingRegion, + tools::Rectangle &rNativeContentRegion ) { bool returnVal = false; @@ -1157,8 +1157,8 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, NWEnsureGTKMenubar( m_nXScreen ); GtkRequisition aReq; gtk_widget_size_request( gWidgetData[m_nXScreen].gMenubarWidget, &aReq ); - Rectangle aMenuBarRect = rControlRegion; - aMenuBarRect = Rectangle( aMenuBarRect.TopLeft(), + tools::Rectangle aMenuBarRect = rControlRegion; + aMenuBarRect = tools::Rectangle( aMenuBarRect.TopLeft(), Size( aMenuBarRect.GetWidth(), aReq.height+1 ) ); rNativeBoundingRegion = aMenuBarRect; rNativeContentRegion = rNativeBoundingRegion; @@ -1178,7 +1178,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, "indicator_size", &indicator_size, nullptr ); rNativeBoundingRegion = rControlRegion; - Rectangle aIndicatorRect( Point( 0, + tools::Rectangle aIndicatorRect( Point( 0, (rControlRegion.GetHeight()-indicator_size)/2), Size( indicator_size, indicator_size ) ); rNativeContentRegion = aIndicatorRect; @@ -1222,9 +1222,9 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, arrow_extent = static_cast<gint>(arrow_size * arrow_scaling); - rNativeContentRegion = Rectangle( Point( 0, 0 ), + rNativeContentRegion = tools::Rectangle( Point( 0, 0 ), Size( arrow_extent, arrow_extent )); - rNativeBoundingRegion = Rectangle( Point( 0, 0 ), + rNativeBoundingRegion = tools::Rectangle( Point( 0, 0 ), Size( arrow_extent + horizontal_padding, arrow_extent )); returnVal = true; } @@ -1243,7 +1243,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, nullptr); indicator_size += 2*indicator_spacing + 2*(focusWidth + focusWidth); rNativeBoundingRegion = rControlRegion; - Rectangle aIndicatorRect( Point( 0, + tools::Rectangle aIndicatorRect( Point( 0, (rControlRegion.GetHeight()-indicator_size)/2), Size( indicator_size, indicator_size ) ); rNativeContentRegion = aIndicatorRect; @@ -1255,9 +1255,9 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, GtkWidget* widget = gWidgetData[m_nXScreen].gEditBoxWidget; GtkRequisition aReq; gtk_widget_size_request( widget, &aReq ); - Rectangle aEditRect = rControlRegion; + tools::Rectangle aEditRect = rControlRegion; long nHeight = (aEditRect.GetHeight() > aReq.height) ? aEditRect.GetHeight() : aReq.height; - aEditRect = Rectangle( aEditRect.TopLeft(), + aEditRect = tools::Rectangle( aEditRect.TopLeft(), Size( aEditRect.GetWidth(), nHeight ) ); rNativeBoundingRegion = aEditRect; rNativeContentRegion = rNativeBoundingRegion; @@ -1273,7 +1273,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, "slider-width", &slider_width, "slider-length", &slider_length, nullptr); - Rectangle aRect( rControlRegion ); + tools::Rectangle aRect( rControlRegion ); if( nPart == ControlPart::ThumbHorz ) { aRect.Right() = aRect.Left() + slider_length - 1; @@ -1299,7 +1299,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, if( nStyle & DrawFrameFlags::NoDraw ) { - rNativeContentRegion = Rectangle(x1+frameWidth, + rNativeContentRegion = tools::Rectangle(x1+frameWidth, y1+frameWidth, x2-frameWidth, y2-frameWidth); @@ -1379,8 +1379,8 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, bool GtkSalGraphics::NWPaintGTKArrow( GdkDrawable* gdkDrawable, ControlType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& ) { @@ -1388,7 +1388,7 @@ bool GtkSalGraphics::NWPaintGTKArrow( GtkStateType stateType(nState&ControlState::PRESSED?GTK_STATE_ACTIVE:GTK_STATE_NORMAL); GdkRectangle clipRect; - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -1408,8 +1408,8 @@ bool GtkSalGraphics::NWPaintGTKArrow( bool GtkSalGraphics::NWPaintGTKListHeader( GdkDrawable* gdkDrawable, ControlType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue&, const OUString& ) { @@ -1429,7 +1429,7 @@ bool GtkSalGraphics::NWPaintGTKListHeader( NWSetWidgetState( button, nState, stateType ); GdkRectangle clipRect; - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -1449,8 +1449,8 @@ bool GtkSalGraphics::NWPaintGTKListHeader( bool GtkSalGraphics::NWPaintGTKFixedLine( GdkDrawable* gdkDrawable, ControlType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >&, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >&, ControlState, const ImplControlValue&, const OUString& ) { @@ -1465,8 +1465,8 @@ bool GtkSalGraphics::NWPaintGTKFixedLine( bool GtkSalGraphics::NWPaintGTKFrame( GdkDrawable* gdkDrawable, ControlType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState /* nState */, const ImplControlValue& aValue, const OUString& ) { @@ -1479,7 +1479,7 @@ bool GtkSalGraphics::NWPaintGTKFrame( if( nStyle == DrawFrameStyle::Out ) shadowType=GTK_SHADOW_IN; - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -1532,13 +1532,13 @@ bool GtkSalGraphics::NWPaintGTKFrame( bool GtkSalGraphics::NWPaintGTKWindowBackground( GdkDrawable* gdkDrawable, ControlType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState /* nState */, const ImplControlValue&, const OUString& ) { GdkRectangle clipRect; - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -1560,8 +1560,8 @@ bool GtkSalGraphics::NWPaintGTKButtonReal( GtkWidget* button, GdkDrawable* gdkDrawable, ControlType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue&, const OUString& ) { @@ -1657,7 +1657,7 @@ bool GtkSalGraphics::NWPaintGTKButtonReal( wi -= 2 * (focusWidth + focusPad); hi -= 2 * (focusWidth + focusPad); } - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -1696,8 +1696,8 @@ bool GtkSalGraphics::NWPaintGTKButtonReal( bool GtkSalGraphics::NWPaintGTKButton( GdkDrawable* gdkDrawable, ControlType type, ControlPart part, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& value, const OUString& string) { @@ -1711,8 +1711,8 @@ bool GtkSalGraphics::NWPaintGTKButton( string ); } -static Rectangle NWGetButtonArea( SalX11Screen nScreen, - ControlType, ControlPart, Rectangle aAreaRect, ControlState nState, +static tools::Rectangle NWGetButtonArea( SalX11Screen nScreen, + ControlType, ControlPart, tools::Rectangle aAreaRect, ControlState nState, const ImplControlValue&, const OUString& ) { gboolean interiorFocus; @@ -1721,7 +1721,7 @@ static Rectangle NWGetButtonArea( SalX11Screen nScreen, GtkBorder aDefBorder; GtkBorder * pBorder; bool bDrawFocus = true; - Rectangle aRect; + tools::Rectangle aRect; gint x, y, w, h; NWEnsureGTKButton( nScreen ); @@ -1757,12 +1757,12 @@ static Rectangle NWGetButtonArea( SalX11Screen nScreen, h += aDefBorder.top + aDefBorder.bottom; } - aRect = Rectangle( Point( x, y ), Size( w, h ) ); + aRect = tools::Rectangle( Point( x, y ), Size( w, h ) ); return aRect; } -static Rectangle NWGetTabItemRect( SalX11Screen nScreen, Rectangle aAreaRect ) +static tools::Rectangle NWGetTabItemRect( SalX11Screen nScreen, tools::Rectangle aAreaRect ) { NWEnsureGTKNotebook( nScreen ); @@ -1781,13 +1781,13 @@ static Rectangle NWGetTabItemRect( SalX11Screen nScreen, Rectangle aAreaRect ) w += xthickness*2; h += ythickness*2; - return Rectangle( Point( x, y ), Size( w, h ) ); + return tools::Rectangle( Point( x, y ), Size( w, h ) ); } bool GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable, ControlType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& ) @@ -1825,7 +1825,7 @@ bool GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable, GTK_TOGGLE_BUTTON(gWidgetData[m_nXScreen].gRadioWidgetSibling)->active = true; GTK_TOGGLE_BUTTON(gWidgetData[m_nXScreen].gRadioWidget)->active = isChecked; - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -1842,8 +1842,8 @@ bool GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable, bool GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable, ControlType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& ) @@ -1870,7 +1870,7 @@ bool GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable, NWSetWidgetState( gWidgetData[m_nXScreen].gCheckWidget, nState, stateType ); GTK_TOGGLE_BUTTON(gWidgetData[m_nXScreen].gCheckWidget)->active = isChecked; - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -1885,7 +1885,7 @@ bool GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable, return true; } -static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow ) +static void NWCalcArrowRect( const tools::Rectangle& rButton, tools::Rectangle& rArrow ) { // Size the arrow appropriately Size aSize( rButton.GetWidth()/2, rButton.GetHeight()/2 ); @@ -1898,8 +1898,8 @@ static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow ) } bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >&, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >&, ControlState nState, const ImplControlValue& aValue, const OUString& ) @@ -1907,24 +1907,24 @@ bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart, assert(aValue.getType() == ControlType::Scrollbar); const ScrollbarValue& rScrollbarVal = static_cast<const ScrollbarValue&>(aValue); GdkX11Pixmap* pixmap = nullptr; - Rectangle pixmapRect, scrollbarRect; + tools::Rectangle pixmapRect, scrollbarRect; GtkStateType stateType; GtkShadowType shadowType; GtkScrollbar * scrollbarWidget; GtkStyle * style; GtkAdjustment* scrollbarValues = nullptr; GtkOrientation scrollbarOrientation; - Rectangle thumbRect = rScrollbarVal.maThumbRect; - Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward - Rectangle button22BoundRect = rScrollbarVal.maButton2Rect; // forward - Rectangle button12BoundRect = rScrollbarVal.maButton1Rect; // secondary forward - Rectangle button21BoundRect = rScrollbarVal.maButton2Rect; // secondary backward + tools::Rectangle thumbRect = rScrollbarVal.maThumbRect; + tools::Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward + tools::Rectangle button22BoundRect = rScrollbarVal.maButton2Rect; // forward + tools::Rectangle button12BoundRect = rScrollbarVal.maButton1Rect; // secondary forward + tools::Rectangle button21BoundRect = rScrollbarVal.maButton2Rect; // secondary backward GtkArrowType button1Type; // backward GtkArrowType button2Type; // forward gchar * scrollbarTagH = const_cast<gchar *>("hscrollbar"); gchar * scrollbarTagV = const_cast<gchar *>("vscrollbar"); gchar * scrollbarTag = nullptr; - Rectangle arrowRect; + tools::Rectangle arrowRect; gint slider_width = 0; gint stepper_size = 0; gint stepper_spacing = 0; @@ -2217,7 +2217,7 @@ bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart, return bRet; } -static Rectangle NWGetScrollButtonRect( SalX11Screen nScreen, ControlPart nPart, Rectangle aAreaRect ) +static tools::Rectangle NWGetScrollButtonRect( SalX11Screen nScreen, ControlPart nPart, tools::Rectangle aAreaRect ) { gint slider_width; gint stepper_size; @@ -2245,7 +2245,7 @@ static Rectangle NWGetScrollButtonRect( SalX11Screen nScreen, ControlPart nPa "has-secondary-backward-stepper", &has_backward2, nullptr ); gint buttonWidth; gint buttonHeight; - Rectangle buttonRect; + tools::Rectangle buttonRect; gint nFirst = 0; gint nSecond = 0; @@ -2300,20 +2300,20 @@ static Rectangle NWGetScrollButtonRect( SalX11Screen nScreen, ControlPart nPa bool GtkSalGraphics::NWPaintGTKEditBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ) { - Rectangle pixmapRect; + tools::Rectangle pixmapRect; GdkRectangle clipRect; // Find the overall bounding rect of the buttons's drawing area, // plus its actual draw rect excluding adornment pixmapRect = NWGetEditBoxPixmapRect( m_nXScreen, nType, nPart, rControlRectangle, nState, aValue, rCaption ); - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -2330,15 +2330,15 @@ bool GtkSalGraphics::NWPaintGTKEditBox( GdkDrawable* gdkDrawable, * the bounding rectangle of the edit box including * any focus requirements. */ -static Rectangle NWGetEditBoxPixmapRect(SalX11Screen nScreen, +static tools::Rectangle NWGetEditBoxPixmapRect(SalX11Screen nScreen, ControlType, ControlPart, - Rectangle aAreaRect, + tools::Rectangle aAreaRect, ControlState, const ImplControlValue&, const OUString& ) { - Rectangle pixmapRect = aAreaRect; + tools::Rectangle pixmapRect = aAreaRect; gboolean interiorFocus; gint focusWidth; @@ -2368,7 +2368,7 @@ static void NWPaintOneEditBox( SalX11Screen nScreen, GdkRectangle * gdkRect, ControlType nType, ControlPart, - Rectangle aEditBoxRect, + tools::Rectangle aEditBoxRect, ControlState nState, const ImplControlValue&, const OUString& ) @@ -2432,21 +2432,21 @@ static void NWPaintOneEditBox( SalX11Screen nScreen, } bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >&, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >&, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption, ControlCacheKey& rControlCacheKey) { - Rectangle pixmapRect; + tools::Rectangle pixmapRect; GtkStateType stateType; GtkShadowType shadowType; const SpinbuttonValue * pSpinVal = (aValue.getType() == ControlType::SpinButtons) ? static_cast<const SpinbuttonValue *>(&aValue) : nullptr; - Rectangle upBtnRect; + tools::Rectangle upBtnRect; ControlPart upBtnPart = ControlPart::ButtonUp; ControlState upBtnState = ControlState::ENABLED; - Rectangle downBtnRect; + tools::Rectangle downBtnRect; ControlPart downBtnPart = ControlPart::ButtonDown; ControlState downBtnState = ControlState::ENABLED; @@ -2482,7 +2482,7 @@ bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart, if ( (nType==ControlType::Spinbox) && (nPart!=ControlPart::AllButtons) ) { // Draw an edit field for SpinBoxes and ComboBoxes - Rectangle aEditBoxRect( pixmapRect ); + tools::Rectangle aEditBoxRect( pixmapRect ); aEditBoxRect.SetSize( Size( pixmapRect.GetWidth() - upBtnRect.GetWidth(), aEditBoxRect.GetHeight() ) ); if( AllSettings::GetLayoutRTL() ) aEditBoxRect.setX( upBtnRect.GetWidth() ); @@ -2498,7 +2498,7 @@ bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart, if ( shadowType != GTK_SHADOW_NONE ) { - Rectangle shadowRect( upBtnRect ); + tools::Rectangle shadowRect( upBtnRect ); shadowRect.Union( downBtnRect ); gtk_paint_box( gWidgetData[m_nXScreen].gSpinButtonWidget->style, gdkPixmap, GTK_STATE_NORMAL, shadowType, nullptr, @@ -2515,16 +2515,16 @@ bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart, return true; } -static Rectangle NWGetSpinButtonRect( SalX11Screen nScreen, +static tools::Rectangle NWGetSpinButtonRect( SalX11Screen nScreen, ControlType, ControlPart nPart, - Rectangle aAreaRect, + tools::Rectangle aAreaRect, ControlState, const ImplControlValue&, const OUString& ) { gint buttonSize; - Rectangle buttonRect; + tools::Rectangle buttonRect; NWEnsureGTKSpinButton( nScreen ); @@ -2567,15 +2567,15 @@ static void NWPaintOneSpinButton( SalX11Screen nScreen, GdkPixmap* pixmap, ControlType nType, ControlPart nPart, - Rectangle aAreaRect, + tools::Rectangle aAreaRect, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ) { - Rectangle buttonRect; + tools::Rectangle buttonRect; GtkStateType stateType; GtkShadowType shadowType; - Rectangle arrowRect; + tools::Rectangle arrowRect; gint arrowSize; NWEnsureGTKSpinButton( nScreen ); @@ -2606,17 +2606,17 @@ static void NWPaintOneSpinButton( SalX11Screen nScreen, bool GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ) { - Rectangle pixmapRect; - Rectangle buttonRect; + tools::Rectangle pixmapRect; + tools::Rectangle buttonRect; GtkStateType stateType; GtkShadowType shadowType; - Rectangle arrowRect; + tools::Rectangle arrowRect; gint x,y; GdkRectangle clipRect; @@ -2639,7 +2639,7 @@ bool GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable, if( nPart == ControlPart::ButtonDown ) buttonRect.Left() += 1; - Rectangle aEditBoxRect( pixmapRect ); + tools::Rectangle aEditBoxRect( pixmapRect ); aEditBoxRect.SetSize( Size( pixmapRect.GetWidth() - buttonRect.GetWidth(), aEditBoxRect.GetHeight() ) ); if( AllSettings::GetLayoutRTL() ) aEditBoxRect.SetPos( Point( x + buttonRect.GetWidth() , y ) ); @@ -2650,7 +2650,7 @@ bool GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable, arrowRect.SetPos( Point( buttonRect.Left() + (gint)((buttonRect.GetWidth() - arrowRect.GetWidth()) / 2), buttonRect.Top() + (gint)((buttonRect.GetHeight() - arrowRect.GetHeight()) / 2) ) ); - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -2682,15 +2682,15 @@ bool GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable, return true; } -static Rectangle NWGetComboBoxButtonRect( SalX11Screen nScreen, +static tools::Rectangle NWGetComboBoxButtonRect( SalX11Screen nScreen, ControlType, ControlPart nPart, - Rectangle aAreaRect, + tools::Rectangle aAreaRect, ControlState, const ImplControlValue&, const OUString& ) { - Rectangle aButtonRect; + tools::Rectangle aButtonRect; gint nArrowWidth; gint nButtonWidth; gint nFocusWidth; @@ -2739,8 +2739,8 @@ static Rectangle NWGetComboBoxButtonRect( SalX11Screen nScreen, } bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >&, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >&, ControlState nState, const ImplControlValue& aValue, const OUString& ) @@ -2748,8 +2748,8 @@ bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart, OSL_ASSERT( nType != ControlType::TabItem || aValue.getType() == ControlType::TabItem ); GdkX11Pixmap * pixmap; GdkX11Pixmap * mask; - Rectangle pixmapRect; - Rectangle tabRect; + tools::Rectangle pixmapRect; + tools::Rectangle tabRect; GtkStateType stateType; GtkShadowType shadowType; if( ! gWidgetData[ m_nXScreen ].gCacheTabItems ) @@ -2892,13 +2892,13 @@ bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart, bool GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ) { - Rectangle aIndicatorRect; + tools::Rectangle aIndicatorRect; GtkStateType stateType; GtkShadowType shadowType; gint bInteriorFocus; @@ -2931,7 +2931,7 @@ bool GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable, nullptr); } - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -2969,8 +2969,8 @@ bool GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable, bool GtkSalGraphics::NWPaintGTKToolbar( GdkDrawable* gdkDrawable, ControlType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& string) { @@ -3047,7 +3047,7 @@ bool GtkSalGraphics::NWPaintGTKToolbar( if( nPart != ControlPart::Button ) { - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -3138,7 +3138,7 @@ bool GtkSalGraphics::NWPaintGTKToolbar( } /// Converts a VCL Rectangle to a GdkRectangle. -static void lcl_rectangleToGdkRectangle(const Rectangle& rRectangle, GdkRectangle& rGdkRectangle) +static void lcl_rectangleToGdkRectangle(const tools::Rectangle& rRectangle, GdkRectangle& rGdkRectangle) { rGdkRectangle.x = rRectangle.Left(); rGdkRectangle.y = rRectangle.Top(); @@ -3149,8 +3149,8 @@ static void lcl_rectangleToGdkRectangle(const Rectangle& rRectangle, GdkRectangl bool GtkSalGraphics::NWPaintGTKMenubar( GdkDrawable* gdkDrawable, ControlType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue&, const OUString& ) { @@ -3178,7 +3178,7 @@ bool GtkSalGraphics::NWPaintGTKMenubar( } } - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { lcl_rectangleToGdkRectangle(*it, clipRect); @@ -3236,8 +3236,8 @@ bool GtkSalGraphics::NWPaintGTKMenubar( bool GtkSalGraphics::NWPaintGTKPopupMenu( GdkDrawable* gdkDrawable, ControlType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState nState, const ImplControlValue&, const OUString& ) { @@ -3275,7 +3275,7 @@ bool GtkSalGraphics::NWPaintGTKPopupMenu( if ( nState & ControlState::ENABLED ) GTK_WIDGET_SET_FLAGS( gWidgetData[m_nXScreen].gMenuWidget, GTK_SENSITIVE ); - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -3401,8 +3401,8 @@ bool GtkSalGraphics::NWPaintGTKPopupMenu( bool GtkSalGraphics::NWPaintGTKTooltip( GdkDrawable* gdkDrawable, ControlType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >& rClipList, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >& rClipList, ControlState, const ImplControlValue&, const OUString& ) { @@ -3416,7 +3416,7 @@ bool GtkSalGraphics::NWPaintGTKTooltip( w = rControlRectangle.GetWidth(); h = rControlRectangle.GetHeight(); - for( std::list< Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) + for( std::list< tools::Rectangle >::const_iterator it = rClipList.begin(); it != rClipList.end(); ++it ) { clipRect.x = it->Left(); clipRect.y = it->Top(); @@ -3439,14 +3439,14 @@ bool GtkSalGraphics::NWPaintGTKTooltip( bool GtkSalGraphics::NWPaintGTKListNode( GdkDrawable*, ControlType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >&, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >&, ControlState nState, const ImplControlValue& rValue, const OUString& ) { NWEnsureGTKTreeView( m_nXScreen ); - Rectangle aRect( rControlRectangle ); + tools::Rectangle aRect( rControlRectangle ); aRect.Left() -= 2; aRect.Right() += 2; aRect.Top() -= 2; @@ -3489,8 +3489,8 @@ bool GtkSalGraphics::NWPaintGTKListNode( bool GtkSalGraphics::NWPaintGTKProgress( GdkDrawable*, ControlType, ControlPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >&, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >&, ControlState, const ImplControlValue& rValue, const OUString& ) { @@ -3499,7 +3499,7 @@ bool GtkSalGraphics::NWPaintGTKProgress( gint w, h; w = rControlRectangle.GetWidth(); h = rControlRectangle.GetHeight(); - Rectangle aRect( Point( 0, 0 ), Size( w, h ) ); + tools::Rectangle aRect( Point( 0, 0 ), Size( w, h ) ); long nProgressWidth = rValue.getNumericVal(); @@ -3554,8 +3554,8 @@ bool GtkSalGraphics::NWPaintGTKProgress( bool GtkSalGraphics::NWPaintGTKSlider( GdkDrawable*, ControlType, ControlPart nPart, - const Rectangle& rControlRectangle, - const std::list< Rectangle >&, + const tools::Rectangle& rControlRectangle, + const std::list< tools::Rectangle >&, ControlState nState, const ImplControlValue& rValue, const OUString& ) { @@ -3640,15 +3640,15 @@ static int getFrameWidth(GtkWidget* widget) return widget->style->xthickness; } -static Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen, +static tools::Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen, ControlType, ControlPart nPart, - Rectangle aAreaRect, + tools::Rectangle aAreaRect, ControlState, const ImplControlValue&, const OUString& ) { - Rectangle aPartRect; + tools::Rectangle aPartRect; GtkRequisition *pIndicatorSize = nullptr; GtkBorder *pIndicatorSpacing = nullptr; gint width = 13; // GTK+ default @@ -3693,7 +3693,7 @@ static Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen, aPartPos.X() = aAreaRect.Left(); break; } - aPartRect = Rectangle( aPartPos, aPartSize ); + aPartRect = tools::Rectangle( aPartPos, aPartSize ); if ( pIndicatorSize ) gtk_requisition_free( pIndicatorSize ); @@ -3703,15 +3703,15 @@ static Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen, return aPartRect; } -static Rectangle NWGetListBoxIndicatorRect( SalX11Screen nScreen, +static tools::Rectangle NWGetListBoxIndicatorRect( SalX11Screen nScreen, ControlType, ControlPart, - Rectangle aAreaRect, + tools::Rectangle aAreaRect, ControlState, const ImplControlValue&, const OUString& ) { - Rectangle aIndicatorRect; + tools::Rectangle aIndicatorRect; GtkRequisition *pIndicatorSize = nullptr; GtkBorder *pIndicatorSpacing = nullptr; gint width = 13; // GTK+ default @@ -3753,23 +3753,23 @@ static Rectangle NWGetListBoxIndicatorRect( SalX11Screen nScreen, return aIndicatorRect; } -static Rectangle NWGetToolbarRect( SalX11Screen nScreen, +static tools::Rectangle NWGetToolbarRect( SalX11Screen nScreen, ControlType, ControlPart nPart, - Rectangle aAreaRect, + tools::Rectangle aAreaRect, ControlState, const ImplControlValue&, const OUString& ) { - Rectangle aRet; + tools::Rectangle aRet; if( nPart == ControlPart::DrawBackgroundHorz || nPart == ControlPart::DrawBackgroundVert ) aRet = aAreaRect; else if( nPart == ControlPart::ThumbHorz ) - aRet = Rectangle( Point( 0, 0 ), Size( aAreaRect.GetWidth(), 10 ) ); + aRet = tools::Rectangle( Point( 0, 0 ), Size( aAreaRect.GetWidth(), 10 ) ); else if( nPart == ControlPart::ThumbVert ) - aRet = Rectangle( Point( 0, 0 ), Size( 10, aAreaRect.GetHeight() ) ); + aRet = tools::Rectangle( Point( 0, 0 ), Size( 10, aAreaRect.GetHeight() ) ); else if( nPart == ControlPart::Button ) { aRet = aAreaRect; @@ -4191,7 +4191,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) * Create a GdkPixmap filled with the contents of an area of an Xlib window ************************************************************************/ -GdkX11Pixmap* GtkSalGraphics::NWGetPixmapFromScreen( Rectangle srcRect, int nBgColor ) +GdkX11Pixmap* GtkSalGraphics::NWGetPixmapFromScreen( tools::Rectangle srcRect, int nBgColor ) { GdkX11Pixmap* pPixmap; int nDepth = vcl_sal::getSalDisplay(GetGenericData())->GetVisual( m_nXScreen ).GetDepth(); @@ -4221,7 +4221,7 @@ GdkX11Pixmap* GtkSalGraphics::NWGetPixmapFromScreen( Rectangle srcRect, int nBgC * Copy an alpha pixmap to screen using a gc with clipping ************************************************************************/ -bool GtkSalGraphics::NWRenderPixmapToScreen( GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask, Rectangle dstRect ) +bool GtkSalGraphics::NWRenderPixmapToScreen( GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask, tools::Rectangle dstRect ) { return RenderPixmapToScreen( pPixmap, pMask, dstRect.Left(), dstRect.Top() ); } diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 7ae0b9c0915b..1459f669fcca 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -1663,16 +1663,16 @@ void GtkSalFrame::GetClientSize( long& rWidth, long& rHeight ) rWidth = rHeight = 0; } -void GtkSalFrame::GetWorkArea( Rectangle& rRect ) +void GtkSalFrame::GetWorkArea( tools::Rectangle& rRect ) { GdkScreen *pScreen = gtk_window_get_screen(GTK_WINDOW(m_pWindow)); - Rectangle aRetRect; + tools::Rectangle aRetRect; int max = gdk_screen_get_n_monitors (pScreen); for (int i = 0; i < max; ++i) { GdkRectangle aRect; gdk_screen_get_monitor_workarea(pScreen, i, &aRect); - Rectangle aMonitorRect(aRect.x, aRect.y, aRect.x+aRect.width, aRect.y+aRect.height); + tools::Rectangle aMonitorRect(aRect.x, aRect.y, aRect.x+aRect.width, aRect.y+aRect.height); aRetRect.Union(aMonitorRect); } rRect = aRetRect; @@ -1706,7 +1706,7 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState ) updateScreenNumber(); m_nState = GdkWindowState( m_nState | GDK_WINDOW_STATE_MAXIMIZED ); - m_aRestorePosSize = Rectangle( Point( pState->mnX, pState->mnY ), + m_aRestorePosSize = tools::Rectangle( Point( pState->mnX, pState->mnY ), Size( pState->mnWidth, pState->mnHeight ) ); } else if( pState->mnMask & (WindowStateMask::X | WindowStateMask::Y | @@ -1766,11 +1766,11 @@ namespace rHeight = height; } - Rectangle GetPosAndSize(GtkWindow *pWindow) + tools::Rectangle GetPosAndSize(GtkWindow *pWindow) { long nX, nY, nWidth, nHeight; GetPosAndSize(pWindow, nX, nY, nWidth, nHeight); - return Rectangle(nX, nY, nX + nWidth, nY + nHeight); + return tools::Rectangle(nX, nY, nX + nWidth, nY + nHeight); } } @@ -1808,7 +1808,7 @@ bool GtkSalFrame::GetWindowState( SalFrameState* pState ) return true; } -void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, Rectangle *pSize ) +void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, tools::Rectangle *pSize ) { if( !m_pWindow ) return; @@ -2011,7 +2011,7 @@ void GtkSalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen ) { SetScreen( nScreen, SetType::UnFullscreen, !m_aRestorePosSize.IsEmpty() ? &m_aRestorePosSize : nullptr ); - m_aRestorePosSize = Rectangle(); + m_aRestorePosSize = tools::Rectangle(); } } @@ -2460,7 +2460,7 @@ gboolean GtkSalFrame::signalTooltipQuery(GtkWidget*, gint /*x*/, gint /*y*/, return true; } -bool GtkSalFrame::ShowTooltip(const OUString& rHelpText, const Rectangle& rHelpArea) +bool GtkSalFrame::ShowTooltip(const OUString& rHelpText, const tools::Rectangle& rHelpArea) { m_aTooltip = rHelpText; m_aHelpArea = rHelpArea; @@ -2471,7 +2471,7 @@ bool GtkSalFrame::ShowTooltip(const OUString& rHelpText, const Rectangle& rHelpA #if GTK_CHECK_VERSION(3,12,0) namespace { - void set_pointing_to(GtkPopover *pPopOver, const Rectangle& rHelpArea) + void set_pointing_to(GtkPopover *pPopOver, const tools::Rectangle& rHelpArea) { GdkRectangle aRect; aRect.x = rHelpArea.Left(); @@ -2497,7 +2497,7 @@ namespace } #endif -sal_uIntPtr GtkSalFrame::ShowPopover(const OUString& rHelpText, const Rectangle& rHelpArea, QuickHelpFlags nFlags) +sal_uIntPtr GtkSalFrame::ShowPopover(const OUString& rHelpText, const tools::Rectangle& rHelpArea, QuickHelpFlags nFlags) { #if GTK_CHECK_VERSION(3,12,0) GtkWidget *pWidget = gtk_popover_new(getMouseEventWidget()); @@ -2529,7 +2529,7 @@ sal_uIntPtr GtkSalFrame::ShowPopover(const OUString& rHelpText, const Rectangle& #endif } -bool GtkSalFrame::UpdatePopover(sal_uIntPtr nId, const OUString& rHelpText, const Rectangle& rHelpArea) +bool GtkSalFrame::UpdatePopover(sal_uIntPtr nId, const OUString& rHelpText, const tools::Rectangle& rHelpArea) { #if GTK_CHECK_VERSION(3,12,0) GtkWidget *pWidget = reinterpret_cast<GtkWidget*>(nId); @@ -4097,7 +4097,7 @@ gboolean GtkSalFrame::IMHandler::signalIMDeleteSurrounding( GtkIMContext*, gint Size GtkSalDisplay::GetScreenSize( int nDisplayScreen ) { - Rectangle aRect = m_pSys->GetDisplayScreenPosSizePixel( nDisplayScreen ); + tools::Rectangle aRect = m_pSys->GetDisplayScreenPosSizePixel( nDisplayScreen ); return Size( aRect.GetWidth(), aRect.GetHeight() ); } diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index 731f5a83b8a8..fc0e94149545 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -152,7 +152,7 @@ enum class RenderType { Focus }; -static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow ) +static void NWCalcArrowRect( const tools::Rectangle& rButton, tools::Rectangle& rArrow ) { // Size the arrow appropriately Size aSize( rButton.GetWidth()/2, rButton.GetHeight()/2 ); @@ -164,7 +164,7 @@ static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow ) ) ); } -Rectangle GtkSalGraphics::NWGetSpinButtonRect( ControlPart nPart, Rectangle aAreaRect) +tools::Rectangle GtkSalGraphics::NWGetSpinButtonRect( ControlPart nPart, tools::Rectangle aAreaRect) { gint w, h; gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &w, &h); @@ -180,11 +180,11 @@ Rectangle GtkSalGraphics::NWGetSpinButtonRect( ControlPart nPart, Rectangle aAre gint buttonHeight = icon_size + padding.top + padding.bottom + border.top + border.bottom; - Rectangle buttonRect; + tools::Rectangle buttonRect; buttonRect.SetSize(Size(buttonWidth, buttonHeight)); buttonRect.setY(aAreaRect.Top()); buttonRect.Bottom() = buttonRect.Top() + aAreaRect.GetHeight(); - Rectangle partRect(buttonRect); + tools::Rectangle partRect(buttonRect); if ( nPart == ControlPart::ButtonUp ) { if (AllSettings::GetLayoutRTL()) @@ -239,9 +239,9 @@ namespace } } -Rectangle GtkSalGraphics::NWGetScrollButtonRect( ControlPart nPart, Rectangle aAreaRect ) +tools::Rectangle GtkSalGraphics::NWGetScrollButtonRect( ControlPart nPart, tools::Rectangle aAreaRect ) { - Rectangle buttonRect; + tools::Rectangle buttonRect; gboolean has_forward; gboolean has_forward2; @@ -398,14 +398,14 @@ namespace parent_styles_context_set_state(context, flags); } - Rectangle render_common(GtkStyleContext *pContext, cairo_t *cr, const Rectangle &rIn, GtkStateFlags flags) + tools::Rectangle render_common(GtkStyleContext *pContext, cairo_t *cr, const tools::Rectangle &rIn, GtkStateFlags flags) { if (!pContext) return rIn; gtk_style_context_set_state(pContext, flags); - Rectangle aRect(rIn); + tools::Rectangle aRect(rIn); GtkBorder margin; gtk_style_context_get_margin(pContext, gtk_style_context_get_state(pContext), &margin); @@ -434,7 +434,7 @@ namespace void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context, cairo_t *cr, - const Rectangle& rControlRectangle, + const tools::Rectangle& rControlRectangle, ControlType nType, ControlPart nPart, const ImplControlValue& rValue ) @@ -443,17 +443,17 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context, { assert(rValue.getType() == ControlType::Scrollbar); const ScrollbarValue& rScrollbarVal = static_cast<const ScrollbarValue&>(rValue); - Rectangle scrollbarRect; + tools::Rectangle scrollbarRect; GtkStateFlags stateFlags; GtkOrientation scrollbarOrientation; - Rectangle thumbRect = rScrollbarVal.maThumbRect; - Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward - Rectangle button22BoundRect = rScrollbarVal.maButton2Rect; // forward - Rectangle button12BoundRect = rScrollbarVal.maButton1Rect; // secondary forward - Rectangle button21BoundRect = rScrollbarVal.maButton2Rect; // secondary backward + tools::Rectangle thumbRect = rScrollbarVal.maThumbRect; + tools::Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward + tools::Rectangle button22BoundRect = rScrollbarVal.maButton2Rect; // forward + tools::Rectangle button12BoundRect = rScrollbarVal.maButton1Rect; // secondary forward + tools::Rectangle button21BoundRect = rScrollbarVal.maButton2Rect; // secondary backward gdouble arrow1Angle; // backward gdouble arrow2Angle; // forward - Rectangle arrowRect; + tools::Rectangle arrowRect; gint slider_width = 0; gint stepper_size = 0; @@ -708,18 +708,18 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context, // ----------------- TROUGH // trackrect matches that of ScrollBar::ImplCalc - Rectangle aTrackRect(Point(0, 0), scrollbarRect.GetSize()); + tools::Rectangle aTrackRect(Point(0, 0), scrollbarRect.GetSize()); if (nPart == ControlPart::DrawBackgroundHorz) { - Rectangle aBtn1Rect = NWGetScrollButtonRect(ControlPart::ButtonLeft, aTrackRect); - Rectangle aBtn2Rect = NWGetScrollButtonRect(ControlPart::ButtonRight, aTrackRect); + tools::Rectangle aBtn1Rect = NWGetScrollButtonRect(ControlPart::ButtonLeft, aTrackRect); + tools::Rectangle aBtn2Rect = NWGetScrollButtonRect(ControlPart::ButtonRight, aTrackRect); aTrackRect.Left() = aBtn1Rect.Right(); aTrackRect.Right() = aBtn2Rect.Left(); } else { - Rectangle aBtn1Rect = NWGetScrollButtonRect(ControlPart::ButtonUp, aTrackRect); - Rectangle aBtn2Rect = NWGetScrollButtonRect(ControlPart::ButtonDown, aTrackRect); + tools::Rectangle aBtn1Rect = NWGetScrollButtonRect(ControlPart::ButtonUp, aTrackRect); + tools::Rectangle aBtn2Rect = NWGetScrollButtonRect(ControlPart::ButtonDown, aTrackRect); aTrackRect.Top() = aBtn1Rect.Bottom() + 1; aTrackRect.Bottom() = aBtn2Rect.Top(); } @@ -763,17 +763,17 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context, (void)nType; OSL_ASSERT( rValue.getType() == ControlType::Scrollbar ); const ScrollbarValue& rScrollbarVal = static_cast<const ScrollbarValue&>(rValue); - Rectangle scrollbarRect; + tools::Rectangle scrollbarRect; GtkStateFlags stateFlags; GtkOrientation scrollbarOrientation; - Rectangle thumbRect = rScrollbarVal.maThumbRect; - Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward - Rectangle button22BoundRect = rScrollbarVal.maButton2Rect; // forward - Rectangle button12BoundRect = rScrollbarVal.maButton1Rect; // secondary forward - Rectangle button21BoundRect = rScrollbarVal.maButton2Rect; // secondary backward + tools::Rectangle thumbRect = rScrollbarVal.maThumbRect; + tools::Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward + tools::Rectangle button22BoundRect = rScrollbarVal.maButton2Rect; // forward + tools::Rectangle button12BoundRect = rScrollbarVal.maButton1Rect; // secondary forward + tools::Rectangle button21BoundRect = rScrollbarVal.maButton2Rect; // secondary backward gdouble arrow1Angle; // backward gdouble arrow2Angle; // forward - Rectangle arrowRect; + tools::Rectangle arrowRect; gint slider_width = 0; gint stepper_size = 0; gint trough_border = 0; @@ -1055,14 +1055,14 @@ void GtkSalGraphics::PaintOneSpinButton( GtkStyleContext *context, cairo_t *cr, ControlType nType, ControlPart nPart, - Rectangle aAreaRect, + tools::Rectangle aAreaRect, ControlState nState ) { (void)nType; GtkBorder padding, border; GtkStateFlags stateFlags = NWConvertVCLStateToGTKState(nState); - Rectangle buttonRect = NWGetSpinButtonRect( nPart, aAreaRect ); + tools::Rectangle buttonRect = NWGetSpinButtonRect( nPart, aAreaRect ); gtk_style_context_set_state(context, stateFlags); @@ -1087,7 +1087,7 @@ void GtkSalGraphics::PaintOneSpinButton( GtkStyleContext *context, iconWidth = gdk_pixbuf_get_width(pixbuf); iconHeight = gdk_pixbuf_get_height(pixbuf); - Rectangle arrowRect; + tools::Rectangle arrowRect; arrowRect.SetSize(Size(iconWidth, iconHeight)); arrowRect.setX( buttonRect.Left() + (buttonRect.GetWidth() - arrowRect.GetWidth()) / 2 ); arrowRect.setY( buttonRect.Top() + (buttonRect.GetHeight() - arrowRect.GetHeight()) / 2 ); @@ -1102,7 +1102,7 @@ void GtkSalGraphics::PaintOneSpinButton( GtkStyleContext *context, void GtkSalGraphics::PaintSpinButton(GtkStateFlags flags, cairo_t *cr, - const Rectangle& rControlRectangle, + const tools::Rectangle& rControlRectangle, ControlType nType, ControlPart nPart, const ImplControlValue& rValue ) @@ -1146,13 +1146,13 @@ void GtkSalGraphics::PaintSpinButton(GtkStateFlags flags, #define FALLBACK_ARROW_SIZE 11 * 0.85 -Rectangle GtkSalGraphics::NWGetComboBoxButtonRect( ControlType nType, +tools::Rectangle GtkSalGraphics::NWGetComboBoxButtonRect( ControlType nType, ControlPart nPart, - Rectangle aAreaRect ) + tools::Rectangle aAreaRect ) { (void)nType; (void)nPart; - Rectangle aButtonRect; + tools::Rectangle aButtonRect; GtkBorder padding; gtk_style_context_get_padding( mpButtonStyle, gtk_style_context_get_state(mpButtonStyle), &padding); @@ -1196,14 +1196,14 @@ Rectangle GtkSalGraphics::NWGetComboBoxButtonRect( ControlType nType, } void GtkSalGraphics::PaintCombobox( GtkStateFlags flags, cairo_t *cr, - const Rectangle& rControlRectangle, + const tools::Rectangle& rControlRectangle, ControlType nType, ControlPart nPart, const ImplControlValue& /*rValue*/ ) { - Rectangle areaRect; - Rectangle buttonRect; - Rectangle arrowRect; + tools::Rectangle areaRect; + tools::Rectangle buttonRect; + tools::Rectangle arrowRect; // Find the overall bounding rect of the buttons's drawing area, // plus its actual draw rect excluding adornment @@ -1211,7 +1211,7 @@ void GtkSalGraphics::PaintCombobox( GtkStateFlags flags, cairo_t *cr, buttonRect = NWGetComboBoxButtonRect( nType, ControlPart::ButtonDown, areaRect ); - Rectangle aEditBoxRect( areaRect ); + tools::Rectangle aEditBoxRect( areaRect ); aEditBoxRect.SetSize( Size( areaRect.GetWidth() - buttonRect.GetWidth(), aEditBoxRect.GetHeight() ) ); if (AllSettings::GetLayoutRTL()) aEditBoxRect.SetPos( Point( areaRect.Left() + buttonRect.GetWidth(), areaRect.Top() ) ); @@ -1238,7 +1238,7 @@ void GtkSalGraphics::PaintCombobox( GtkStateFlags flags, cairo_t *cr, buttonRect.Top() + (gint)((buttonRect.GetHeight() - arrowRect.GetHeight()) / 2) ) ); - Rectangle aRect(Point(0, 0), Size(areaRect.GetWidth(), areaRect.GetHeight())); + tools::Rectangle aRect(Point(0, 0), Size(areaRect.GetWidth(), areaRect.GetHeight())); if (nType == ControlType::Combobox) { @@ -1246,7 +1246,7 @@ void GtkSalGraphics::PaintCombobox( GtkStateFlags flags, cairo_t *cr, { render_common(mpComboboxStyle, cr, aRect, flags); render_common(mpComboboxBoxStyle, cr, aRect, flags); - Rectangle aEntryRect(Point(aEditBoxRect.Left() - areaRect.Left(), + tools::Rectangle aEntryRect(Point(aEditBoxRect.Left() - areaRect.Left(), aEditBoxRect.Top() - areaRect.Top()), Size(aEditBoxRect.GetWidth(), aEditBoxRect.GetHeight())); @@ -1259,7 +1259,7 @@ void GtkSalGraphics::PaintCombobox( GtkStateFlags flags, cairo_t *cr, gtk_style_context_set_junction_sides(mpComboboxEntryStyle, eJuncSides); } - Rectangle aButtonRect(Point(buttonRect.Left() - areaRect.Left(), buttonRect.Top() - areaRect.Top()), + tools::Rectangle aButtonRect(Point(buttonRect.Left() - areaRect.Left(), buttonRect.Top() - areaRect.Top()), Size(buttonRect.GetWidth(), buttonRect.GetHeight())); GtkJunctionSides eJuncSides = gtk_style_context_get_junction_sides(mpComboboxButtonStyle); if (AllSettings::GetLayoutRTL()) @@ -2121,7 +2121,7 @@ namespace } void GtkSalGraphics::PaintCheckOrRadio(cairo_t *cr, GtkStyleContext *context, - const Rectangle& rControlRectangle, bool bIsCheck, bool bInMenu) + const tools::Rectangle& rControlRectangle, bool bIsCheck, bool bInMenu) { gint indicator_size; gtk_style_context_get_style(context, "indicator-size", &indicator_size, nullptr); @@ -2141,13 +2141,13 @@ void GtkSalGraphics::PaintCheckOrRadio(cairo_t *cr, GtkStyleContext *context, } void GtkSalGraphics::PaintCheck(cairo_t *cr, GtkStyleContext *context, - const Rectangle& rControlRectangle, bool bInMenu) + const tools::Rectangle& rControlRectangle, bool bInMenu) { PaintCheckOrRadio(cr, context, rControlRectangle, true, bInMenu); } void GtkSalGraphics::PaintRadio(cairo_t *cr, GtkStyleContext *context, - const Rectangle& rControlRectangle, bool bInMenu) + const tools::Rectangle& rControlRectangle, bool bInMenu) { PaintCheckOrRadio(cr, context, rControlRectangle, false, bInMenu); } @@ -2160,7 +2160,7 @@ static gfloat getArrowSize(GtkStyleContext* context) return arrow_size; } -bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, +bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& rValue, const OUString& ) { @@ -2547,7 +2547,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co nX += initial_gap/2; nWidth -= initial_gap; } - Rectangle aRect(Point(nX, nY), Size(nWidth, nHeight)); + tools::Rectangle aRect(Point(nX, nY), Size(nWidth, nHeight)); render_common(mpNotebookHeaderTabsTabStyle, cr, aRect, flags); break; } @@ -2568,15 +2568,15 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co return true; } -Rectangle GetWidgetSize(const Rectangle& rControlRegion, GtkWidget* widget) +tools::Rectangle GetWidgetSize(const tools::Rectangle& rControlRegion, GtkWidget* widget) { GtkRequisition aReq; gtk_widget_get_preferred_size(widget, nullptr, &aReq); long nHeight = (rControlRegion.GetHeight() > aReq.height) ? rControlRegion.GetHeight() : aReq.height; - return Rectangle(rControlRegion.TopLeft(), Size(rControlRegion.GetWidth(), nHeight)); + return tools::Rectangle(rControlRegion.TopLeft(), Size(rControlRegion.GetWidth(), nHeight)); } -Rectangle AdjustRectForTextBordersPadding(GtkStyleContext* pStyle, long nContentWidth, long nContentHeight, const Rectangle& rControlRegion) +tools::Rectangle AdjustRectForTextBordersPadding(GtkStyleContext* pStyle, long nContentWidth, long nContentHeight, const tools::Rectangle& rControlRegion) { GtkBorder border; gtk_style_context_get_border(pStyle, gtk_style_context_get_state(pStyle), &border); @@ -2590,17 +2590,17 @@ Rectangle AdjustRectForTextBordersPadding(GtkStyleContext* pStyle, long nContent gint nWidgetWidth = nContentWidth + padding.left + padding.right + border.left + border.right; nWidgetWidth = std::max<gint>(nWidgetWidth, rControlRegion.GetWidth()); - Rectangle aEditRect(rControlRegion.TopLeft(), Size(nWidgetWidth, nWidgetHeight)); + tools::Rectangle aEditRect(rControlRegion.TopLeft(), Size(nWidgetWidth, nWidgetHeight)); return aEditRect; } -bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState, +bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState, const ImplControlValue& rValue, const OUString&, - Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ) + tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion ) { /* TODO: all this functions needs improvements */ - Rectangle aEditRect = rControlRegion; + tools::Rectangle aEditRect = rControlRegion; gint indicator_size, indicator_spacing, point; if(((nType == ControlType::Checkbox) || (nType == ControlType::Radiobutton)) && @@ -2624,7 +2624,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar indicator_size += 2*indicator_spacing + border.left + padding.left + border.right + padding.right; - Rectangle aIndicatorRect( Point( 0, + tools::Rectangle aIndicatorRect( Point( 0, (rControlRegion.GetHeight()-indicator_size)/2), Size( indicator_size, indicator_size ) ); rNativeContentRegion = aIndicatorRect; @@ -2646,7 +2646,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar nullptr ); point = MAX(0, rControlRegion.GetHeight() - indicator_size); - aEditRect = Rectangle( Point( 0, point / 2), + aEditRect = tools::Rectangle( Point( 0, point / 2), Size( indicator_size, indicator_size ) ); } else if (nPart == ControlPart::Separator) @@ -2659,13 +2659,13 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar "separator-height", &separator_height, nullptr); - aEditRect = Rectangle( aEditRect.TopLeft(), + aEditRect = tools::Rectangle( aEditRect.TopLeft(), Size( aEditRect.GetWidth(), wide_separators ? separator_height : 1 ) ); } else if (nPart == ControlPart::SubmenuArrow) { gfloat arrow_size = getArrowSize(mpMenuItemArrowStyle); - aEditRect = Rectangle( aEditRect.TopLeft(), + aEditRect = tools::Rectangle( aEditRect.TopLeft(), Size( arrow_size, arrow_size ) ); } } @@ -2687,7 +2687,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar ((nPart==ControlPart::ButtonUp) || (nPart==ControlPart::ButtonDown) || (nPart==ControlPart::SubEdit)) ) { - Rectangle aControlRegion(GetWidgetSize(rControlRegion, gSpinBox)); + tools::Rectangle aControlRegion(GetWidgetSize(rControlRegion, gSpinBox)); aEditRect = NWGetSpinButtonRect(nPart, aControlRegion); } else if ( (nType==ControlType::Combobox) && @@ -2719,7 +2719,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar else if (nType == ControlType::TabItem && nPart == ControlPart::Entire) { const TabitemValue& rTabitemValue = static_cast<const TabitemValue&>(rValue); - const Rectangle& rTabitemRect = rTabitemValue.getContentRect(); + const tools::Rectangle& rTabitemRect = rTabitemValue.getContentRect(); aEditRect = AdjustRectForTextBordersPadding(mpNotebookHeaderTabsTabStyle, rTabitemRect.GetWidth(), rTabitemRect.GetHeight(), rControlRegion); @@ -2742,7 +2742,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar int y2 = aEditRect.Bottom(); rNativeBoundingRegion = aEditRect; - rNativeContentRegion = Rectangle(x1 + (padding.left + border.left), + rNativeContentRegion = tools::Rectangle(x1 + (padding.left + border.left), y1 + (padding.top + border.top), x2 - (padding.right + border.right), y2 - (padding.bottom + border.bottom)); diff --git a/vcl/unx/x11/x11sys.cxx b/vcl/unx/x11/x11sys.cxx index e4f4b2955726..69a626274a0c 100644 --- a/vcl/unx/x11/x11sys.cxx +++ b/vcl/unx/x11/x11sys.cxx @@ -60,13 +60,13 @@ unsigned int X11SalSystem::GetDisplayBuiltInScreen() return pSalDisp->GetDefaultXScreen().getXScreen(); } -Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) +tools::Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) { - Rectangle aRet; + tools::Rectangle aRet; SalDisplay* pSalDisp = vcl_sal::getSalDisplay(GetGenericData()); if( pSalDisp->IsXinerama() ) { - const std::vector< Rectangle >& rScreens = pSalDisp->GetXineramaScreens(); + const std::vector< tools::Rectangle >& rScreens = pSalDisp->GetXineramaScreens(); // we shouldn't be able to pick a screen > number of screens available assert(nScreen < rScreens.size() ); @@ -78,7 +78,7 @@ Rectangle X11SalSystem::GetDisplayScreenPosSizePixel( unsigned int nScreen ) { const SalDisplay::ScreenData& rScreen = pSalDisp->getDataForScreen( SalX11Screen( nScreen ) ); - aRet = Rectangle( Point( 0, 0 ), rScreen.m_aSize ); + aRet = tools::Rectangle( Point( 0, 0 ), rScreen.m_aSize ); } return aRet; |