diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-28 07:51:19 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-30 11:47:41 +0200 |
commit | c9d4a2887c13a5df244022276dd79a5bef8af0ea (patch) | |
tree | fb849270affd5fca01fa26094c89595d18c6f588 /svx/source/dialog | |
parent | d17d4d48b5dc3332fd03f6ef186ed2bda4665e7c (diff) |
fdo#82577: Handle PolyPolygon
Put the TOOLS PolyPolygon class in the tools namespace. Avoids clash with the Windows
PolyPolygon typedef.
Change-Id: I811ecbb3d55ba4ce66e4555a8586f60fcd57fb66
Diffstat (limited to 'svx/source/dialog')
-rw-r--r-- | svx/source/dialog/_contdlg.cxx | 22 | ||||
-rw-r--r-- | svx/source/dialog/contimp.hxx | 8 | ||||
-rw-r--r-- | svx/source/dialog/contwnd.cxx | 14 | ||||
-rw-r--r-- | svx/source/dialog/contwnd.hxx | 6 | ||||
-rw-r--r-- | svx/source/dialog/frmsel.cxx | 10 |
5 files changed, 30 insertions, 30 deletions
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index c47922d47629..688ed456081c 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -90,7 +90,7 @@ SvxContourDlg::~SvxContourDlg() { } -PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic, +tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic, const Rectangle* pRect, const sal_uIntPtr nFlags ) { @@ -166,7 +166,7 @@ PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic, aBmp.SetPrefSize( rGraphic.GetPrefSize() ); aBmp.SetPrefMapMode( rGraphic.GetPrefMapMode() ); - return PolyPolygon( XOutBitmap::GetCountour( aBmp, nContourFlags, 128, pRect ) ); + return tools::PolyPolygon( XOutBitmap::GetCountour( aBmp, nContourFlags, 128, pRect ) ); } // Loop through to super class, no virtual Methods to not become incompatible @@ -182,7 +182,7 @@ bool SvxContourDlg::IsGraphicChanged() const return pSuperClass->IsGraphicChanged(); } -PolyPolygon SvxContourDlg::GetPolyPolygon() +tools::PolyPolygon SvxContourDlg::GetPolyPolygon() { return pSuperClass->GetPolyPolygon( true ); } @@ -193,7 +193,7 @@ const void* SvxContourDlg::GetEditingObject() const } void SvxContourDlg::Update( const Graphic& rGraphic, bool bGraphicLinked, - const PolyPolygon* pPolyPoly, void* pEditingObj ) + const tools::PolyPolygon* pPolyPoly, void* pEditingObj ) { pSuperClass->UpdateGraphic( rGraphic, bGraphicLinked, pPolyPoly, pEditingObj ); } @@ -315,11 +315,11 @@ void SvxSuperContourDlg::SetGraphic( const Graphic& rGraphic ) m_pContourWnd->SetGraphic( aGraphic ); } -void SvxSuperContourDlg::SetPolyPolygon( const PolyPolygon& rPolyPoly ) +void SvxSuperContourDlg::SetPolyPolygon( const tools::PolyPolygon& rPolyPoly ) { DBG_ASSERT( m_pContourWnd->GetGraphic().GetType() != GRAPHIC_NONE, "Graphic must've been set first!" ); - PolyPolygon aPolyPoly( rPolyPoly ); + tools::PolyPolygon aPolyPoly( rPolyPoly ); const MapMode aMap100( MAP_100TH_MM ); const MapMode aGrfMap( aGraphic.GetPrefMapMode() ); OutputDevice* pOutDev = Application::GetDefaultDevice(); @@ -344,9 +344,9 @@ void SvxSuperContourDlg::SetPolyPolygon( const PolyPolygon& rPolyPoly ) m_pContourWnd->GetSdrModel()->SetChanged( true ); } -PolyPolygon SvxSuperContourDlg::GetPolyPolygon( bool bRescaleToGraphic ) +tools::PolyPolygon SvxSuperContourDlg::GetPolyPolygon( bool bRescaleToGraphic ) { - PolyPolygon aRetPolyPoly( m_pContourWnd->GetPolyPolygon() ); + tools::PolyPolygon aRetPolyPoly( m_pContourWnd->GetPolyPolygon() ); if ( bRescaleToGraphic ) { @@ -375,7 +375,7 @@ PolyPolygon SvxSuperContourDlg::GetPolyPolygon( bool bRescaleToGraphic ) } void SvxSuperContourDlg::UpdateGraphic( const Graphic& rGraphic, bool _bGraphicLinked, - const PolyPolygon* pPolyPoly, void* pEditingObj ) + const tools::PolyPolygon* pPolyPoly, void* pEditingObj ) { aUpdateGraphic = rGraphic; bUpdateGraphicLinked = _bGraphicLinked; @@ -384,7 +384,7 @@ void SvxSuperContourDlg::UpdateGraphic( const Graphic& rGraphic, bool _bGraphicL if ( pPolyPoly ) aUpdatePolyPoly = *pPolyPoly; else - aUpdatePolyPoly = PolyPolygon(); + aUpdatePolyPoly = tools::PolyPolygon(); aUpdateTimer.Start(); } @@ -556,7 +556,7 @@ IMPL_LINK_NOARG(SvxSuperContourDlg, UpdateHdl) bGraphicLinked = bUpdateGraphicLinked; aUpdateGraphic = Graphic(); - aUpdatePolyPoly = PolyPolygon(); + aUpdatePolyPoly = tools::PolyPolygon(); bUpdateGraphicLinked = false; m_pContourWnd->GetSdrModel()->SetChanged( false ); diff --git a/svx/source/dialog/contimp.hxx b/svx/source/dialog/contimp.hxx index 96a99d3a534b..407dd2fd4df1 100644 --- a/svx/source/dialog/contimp.hxx +++ b/svx/source/dialog/contimp.hxx @@ -34,7 +34,7 @@ class SvxSuperContourDlg : public SvxContourDlg Graphic aUndoGraphic; Graphic aRedoGraphic; Graphic aUpdateGraphic; - PolyPolygon aUpdatePolyPoly; + tools::PolyPolygon aUpdatePolyPoly; Timer aUpdateTimer; Timer aCreateTimer; Size aLastSize; @@ -91,8 +91,8 @@ public: const Graphic& GetGraphic() const { return aGraphic; } bool IsGraphicChanged() const { return nGrfChanged > 0UL; } - void SetPolyPolygon( const PolyPolygon& rPolyPoly ); - PolyPolygon GetPolyPolygon( bool bRescaleToGraphic = true ); + void SetPolyPolygon( const tools::PolyPolygon& rPolyPoly ); + tools::PolyPolygon GetPolyPolygon( bool bRescaleToGraphic = true ); void SetEditingObject( void* pObj ) { pCheckObj = pObj; } const void* GetEditingObject() const { return pCheckObj; } @@ -101,7 +101,7 @@ public: bool IsRedoPossible() const; void UpdateGraphic( const Graphic& rGraphic, bool bGraphicLinked, - const PolyPolygon* pPolyPoly = NULL, + const tools::PolyPolygon* pPolyPoly = NULL, void* pEditingObj = NULL ); }; diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx index 64a8ae3b2e15..15fc238b438d 100644 --- a/svx/source/dialog/contwnd.cxx +++ b/svx/source/dialog/contwnd.cxx @@ -47,7 +47,7 @@ ContourWindow::~ContourWindow() { } -void ContourWindow::SetPolyPolygon( const PolyPolygon& rPolyPoly ) +void ContourWindow::SetPolyPolygon( const tools::PolyPolygon& rPolyPoly ) { SdrPage* pPage = (SdrPage*) pModel->GetPage( 0 ); const sal_uInt16 nPolyCount = rPolyPoly.Count(); @@ -90,13 +90,13 @@ void ContourWindow::SetPolyPolygon( const PolyPolygon& rPolyPoly ) pModel->SetChanged( false ); } -const PolyPolygon& ContourWindow::GetPolyPolygon() +const tools::PolyPolygon& ContourWindow::GetPolyPolygon() { if ( pModel->IsChanged() ) { SdrPage* pPage = (SdrPage*) pModel->GetPage( 0 ); - aPolyPoly = PolyPolygon(); + aPolyPoly = tools::PolyPolygon(); if ( pPage && pPage->GetObjCount() ) { @@ -104,7 +104,7 @@ const PolyPolygon& ContourWindow::GetPolyPolygon() // Not sure if subdivision is needed for ContourWindow, but maybe it cannot handle // curves at all. Keeping subdivision here for security const basegfx::B2DPolyPolygon aB2DPolyPolygon(basegfx::tools::adaptiveSubdivideByAngle(pPathObj->GetPathPoly())); - aPolyPoly = PolyPolygon(aB2DPolyPolygon); + aPolyPoly = tools::PolyPolygon(aB2DPolyPolygon); } pModel->SetChanged( false ); @@ -148,7 +148,7 @@ void ContourWindow::MouseButtonDown( const MouseEvent& rMEvt ) { const Point aLogPt( PixelToLogic( rMEvt.GetPosPixel() ) ); - SetPolyPolygon( PolyPolygon() ); + SetPolyPolygon( tools::PolyPolygon() ); aWorkRect = Rectangle( aLogPt, aLogPt ); Paint( Rectangle( Point(), GetGraphicSize() ) ); SetEditMode( true ); @@ -206,7 +206,7 @@ void ContourWindow::MouseButtonUp(const MouseEvent& rMEvt) if ( aWorkRect.Left() != aWorkRect.Right() && aWorkRect.Top() != aWorkRect.Bottom() ) { - PolyPolygon _aPolyPoly( GetPolyPolygon() ); + tools::PolyPolygon _aPolyPoly( GetPolyPolygon() ); _aPolyPoly.Clip( aWorkRect ); SetPolyPolygon( _aPolyPoly ); @@ -249,7 +249,7 @@ void ContourWindow::Paint( const Rectangle& rRect ) if ( aWorkRect.Left() != aWorkRect.Right() && aWorkRect.Top() != aWorkRect.Bottom() ) { - PolyPolygon _aPolyPoly( 2, 2 ); + tools::PolyPolygon _aPolyPoly( 2, 2 ); const Color aOldFillColor( GetFillColor() ); _aPolyPoly.Insert( Rectangle( Point(), GetGraphicSize() ) ); diff --git a/svx/source/dialog/contwnd.hxx b/svx/source/dialog/contwnd.hxx index 63d68ff82543..2bbf9a6f2feb 100644 --- a/svx/source/dialog/contwnd.hxx +++ b/svx/source/dialog/contwnd.hxx @@ -25,7 +25,7 @@ class ContourWindow : public GraphCtrl { - PolyPolygon aPolyPoly; + tools::PolyPolygon aPolyPoly; Color aPipetteColor; Rectangle aWorkRect; Link aPipetteLink; @@ -52,8 +52,8 @@ public: ContourWindow(vcl::Window* pParent, WinBits nBits); virtual ~ContourWindow(); - void SetPolyPolygon( const PolyPolygon& rPolyPoly ); - const PolyPolygon& GetPolyPolygon(); + void SetPolyPolygon( const tools::PolyPolygon& rPolyPoly ); + const tools::PolyPolygon& GetPolyPolygon(); void SetPipetteMode( const bool bPipette ) { bPipetteMode = bPipette; } bool IsPipetteMode() const { return bPipetteMode; } diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx index aa7f8ca434d2..86772cefb6db 100644 --- a/svx/source/dialog/frmsel.cxx +++ b/svx/source/dialog/frmsel.cxx @@ -100,9 +100,9 @@ FrameSelFlags lclGetFlagFromType( FrameBorderType eBorder ) } /** Merges the rSource polypolygon into the rDest polypolygon. */ -inline void lclPolyPolyUnion( PolyPolygon& rDest, const PolyPolygon& rSource ) +inline void lclPolyPolyUnion( tools::PolyPolygon& rDest, const tools::PolyPolygon& rSource ) { - const PolyPolygon aTmp( rDest ); + const tools::PolyPolygon aTmp( rDest ); aTmp.GetUnion( rSource, rDest ); } @@ -163,7 +163,7 @@ void FrameBorder::AddFocusPolygon( const Polygon& rFocus ) lclPolyPolyUnion( maFocusArea, rFocus ); } -void FrameBorder::MergeFocusToPolyPolygon( PolyPolygon& rPPoly ) const +void FrameBorder::MergeFocusToPolyPolygon( tools::PolyPolygon& rPPoly ) const { lclPolyPolyUnion( rPPoly, maFocusArea ); } @@ -528,7 +528,7 @@ void FrameSelectorImpl::DrawBackground() mnLine1 - mnFocusOffs, mnLine1 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine3 + mnFocusOffs ) ); // draw the white space for enabled frame borders - PolyPolygon aPPoly; + tools::PolyPolygon aPPoly; for( FrameBorderCIter aIt( maEnabBorders ); aIt.Is(); ++aIt ) (*aIt)->MergeFocusToPolyPolygon( aPPoly ); aPPoly.Optimize( POLY_OPTIMIZE_CLOSE ); @@ -676,7 +676,7 @@ void FrameSelectorImpl::CopyVirDevToControl() void FrameSelectorImpl::DrawAllTrackingRects() { - PolyPolygon aPPoly; + tools::PolyPolygon aPPoly; if( mrFrameSel.IsAnyBorderSelected() ) { for( SelFrameBorderCIter aIt( maEnabBorders ); aIt.Is(); ++aIt ) |