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 /sw | |
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 'sw')
-rw-r--r-- | sw/inc/editsh.hxx | 6 | ||||
-rw-r--r-- | sw/inc/ndnotxt.hxx | 14 | ||||
-rw-r--r-- | sw/source/core/doc/notxtfrm.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/docnode/ndnotxt.cxx | 18 | ||||
-rw-r--r-- | sw/source/core/edit/editsh.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/inc/flyfrm.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/inc/txtfly.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/fly.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/text/txtfly.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unoframe.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxsdrexport.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/writerhelper.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/writerhelper.hxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8graf.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/basesh.cxx | 2 |
18 files changed, 43 insertions, 43 deletions
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 86ea10ff7464..b869896b67de 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -40,7 +40,7 @@ #include <svtools/embedhlp.hxx> #include <boost/ptr_container/ptr_vector.hpp> -class PolyPolygon; +namespace tools { class PolyPolygon; } class SwDoc; class DateTime; class CommandExtTextInputData; @@ -593,8 +593,8 @@ public: bool IsGrfSwapOut( bool bOnlyLinked = false ) const; sal_uInt16 GetGraphicType() const; - const PolyPolygon *GetGraphicPolygon() const; - void SetGraphicPolygon( const PolyPolygon *pPoly ); + const tools::PolyPolygon *GetGraphicPolygon() const; + void SetGraphicPolygon( const tools::PolyPolygon *pPoly ); /** If there's an automatic, not manipulated polygon at the selected notxtnode, it has to be deleted, e.g. cause the object has changed. */ diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx index d66e55546118..875c75f0e1f0 100644 --- a/sw/inc/ndnotxt.hxx +++ b/sw/inc/ndnotxt.hxx @@ -21,7 +21,7 @@ #include "node.hxx" -class PolyPolygon; +namespace tools { class PolyPolygon; } // SwNoTxtNode @@ -30,7 +30,7 @@ class SW_DLLPUBLIC SwNoTxtNode : public SwCntntNode friend class SwNodes; friend class SwNoTxtFrm; - PolyPolygon *pContour; + tools::PolyPolygon *pContour; bool bAutomaticContour : 1; // automatic contour polygon, not manipulated bool bContourMapModeValid : 1; // contour map mode is not the graphics's // preferred map mode, but either @@ -65,21 +65,21 @@ public: OUString GetDescription() const; void SetDescription( const OUString& rDescription, bool bBroadcast = false ); - void SetContour( const PolyPolygon *pPoly, + void SetContour( const tools::PolyPolygon *pPoly, bool bAutomatic = false ); - const PolyPolygon *HasContour() const; + const tools::PolyPolygon *HasContour() const; bool _HasContour() const { return pContour!=0; }; - void GetContour( PolyPolygon &rPoly ) const; + void GetContour( tools::PolyPolygon &rPoly ) const; void CreateContour(); void SetAutomaticContour( bool bSet ) { bAutomaticContour = bSet; } bool HasAutomaticContour() const { return bAutomaticContour; } // set either a MM100 or pixel contour - void SetContourAPI( const PolyPolygon *pPoly ); + void SetContourAPI( const tools::PolyPolygon *pPoly ); // get either a MM100 or pixel contour, return sal_False if no contour is set. - bool GetContourAPI( PolyPolygon &rPoly ) const; + bool GetContourAPI( tools::PolyPolygon &rPoly ) const; void SetPixelContour( bool bSet ) { bPixelContour = bSet; } bool IsPixelContour() const; diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 4ba7002e59a1..83b8f8da9006 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -245,7 +245,7 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const OutputDevice *pOut = pSh->GetOut(); pOut->Push(); bool bClip = true; - PolyPolygon aPoly; + tools::PolyPolygon aPoly; SwNoTxtNode& rNoTNd = *(SwNoTxtNode*)GetNode(); SwGrfNode* pGrfNd = rNoTNd.GetGrfNode(); diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx index 940757bf7e7f..7a325c93cc94 100644 --- a/sw/source/core/docnode/ndnotxt.cxx +++ b/sw/source/core/docnode/ndnotxt.cxx @@ -85,11 +85,11 @@ bool SwNoTxtNode::SavePersistentData() return true; } -void SwNoTxtNode::SetContour( const PolyPolygon *pPoly, bool bAutomatic ) +void SwNoTxtNode::SetContour( const tools::PolyPolygon *pPoly, bool bAutomatic ) { delete pContour; if ( pPoly ) - pContour = new PolyPolygon( *pPoly ); + pContour = new tools::PolyPolygon( *pPoly ); else pContour = 0; bAutomaticContour = bAutomatic; @@ -100,13 +100,13 @@ void SwNoTxtNode::SetContour( const PolyPolygon *pPoly, bool bAutomatic ) void SwNoTxtNode::CreateContour() { OSL_ENSURE( !pContour, "Contour available." ); - pContour = new PolyPolygon(SvxContourDlg::CreateAutoContour(GetGraphic())); + pContour = new tools::PolyPolygon(SvxContourDlg::CreateAutoContour(GetGraphic())); bAutomaticContour = true; bContourMapModeValid = true; bPixelContour = false; } -const PolyPolygon *SwNoTxtNode::HasContour() const +const tools::PolyPolygon *SwNoTxtNode::HasContour() const { if( !bContourMapModeValid ) { @@ -178,23 +178,23 @@ const PolyPolygon *SwNoTxtNode::HasContour() const return pContour; } -void SwNoTxtNode::GetContour( PolyPolygon &rPoly ) const +void SwNoTxtNode::GetContour( tools::PolyPolygon &rPoly ) const { OSL_ENSURE( pContour, "Contour not available." ); rPoly = *HasContour(); } -void SwNoTxtNode::SetContourAPI( const PolyPolygon *pPoly ) +void SwNoTxtNode::SetContourAPI( const tools::PolyPolygon *pPoly ) { delete pContour; if ( pPoly ) - pContour = new PolyPolygon( *pPoly ); + pContour = new tools::PolyPolygon( *pPoly ); else pContour = 0; bContourMapModeValid = false; } -bool SwNoTxtNode::GetContourAPI( PolyPolygon &rContour ) const +bool SwNoTxtNode::GetContourAPI( tools::PolyPolygon &rContour ) const { if( !pContour ) return false; @@ -213,7 +213,7 @@ bool SwNoTxtNode::GetContourAPI( PolyPolygon &rContour ) const sal_uInt16 nPolyCount = rContour.Count(); for( sal_uInt16 j=0; j<nPolyCount; j++ ) { - // --> OD #i102238# - use the right <PolyPolygon> instance + // --> OD #i102238# - use the right <tools::PolyPolygon> instance Polygon& rPoly = rContour[j]; // <-- diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 620a98f42b5c..c59b59c697fd 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -328,13 +328,13 @@ void SwEditShell::GetGrfNms( OUString* pGrfName, OUString* pFltName, } } -const PolyPolygon *SwEditShell::GetGraphicPolygon() const +const tools::PolyPolygon *SwEditShell::GetGraphicPolygon() const { SwNoTxtNode *pNd = GetCrsr()->GetNode().GetNoTxtNode(); return pNd->HasContour(); } -void SwEditShell::SetGraphicPolygon( const PolyPolygon *pPoly ) +void SwEditShell::SetGraphicPolygon( const tools::PolyPolygon *pPoly ) { SwNoTxtNode *pNd = GetCrsr()->GetNode().GetNoTxtNode(); StartAllAction(); diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx index 9430d976693c..ac895fb8dc47 100644 --- a/sw/source/core/inc/flyfrm.hxx +++ b/sw/source/core/inc/flyfrm.hxx @@ -31,7 +31,7 @@ class SwBorderAttrs; class SwVirtFlyDrawObj; class SwFrmFmts; class SwAttrSetChg; -class PolyPolygon; +namespace tools { class PolyPolygon; } class SwFlyDrawContact; class SwFmt; @@ -226,7 +226,7 @@ public: // #i13147# - add parameter <_bForPaint> to avoid load of // the graphic during paint. Default value: sal_False - bool GetContour( PolyPolygon& rContour, + bool GetContour( tools::PolyPolygon& rContour, const bool _bForPaint = false ) const; // Paint on this shell (consider Preview, print flag, etc. recursively)? diff --git a/sw/source/core/inc/txtfly.hxx b/sw/source/core/inc/txtfly.hxx index a7500dfffc5a..ddb3de8269af 100644 --- a/sw/source/core/inc/txtfly.hxx +++ b/sw/source/core/inc/txtfly.hxx @@ -75,7 +75,7 @@ public: For _non_ contour-flow objects, this is simply the overlap area of BoundRect (including spacing), and the line, for contour-flow, - the PolyPolygon of the object gets traversed + the tools::PolyPolygon of the object gets traversed */ static const SwRect CalcBoundRect( const SwAnchoredObject* pAnchoredObj, const SwRect &rLine, diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index ec2be6bc1443..40131ecd2fe7 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -2425,7 +2425,7 @@ SwTwips SwFlyFrm::CalcAutoWidth() const /// OD 16.04.2003 #i13147# - If called for paint and the <SwNoTxtFrm> contains /// a graphic, load of intrinsic graphic has to be avoided. -bool SwFlyFrm::GetContour( PolyPolygon& rContour, +bool SwFlyFrm::GetContour( tools::PolyPolygon& rContour, const bool _bForPaint ) const { bool bRet = false; diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index a661fd5172a2..91583a6d0747 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1709,7 +1709,7 @@ static void lcl_implDrawGraphicBackgrd( const SvxBrushItem& _rBackgrdBrush, /// draw background transparent if( _pOut->GetFillColor() != aColor.GetRGBColor() ) _pOut->SetFillColor( aColor.GetRGBColor() ); - PolyPolygon aPoly( _rAlignedPaintRect.SVRect() ); + tools::PolyPolygon aPoly( _rAlignedPaintRect.SVRect() ); _pOut->DrawTransparent( aPoly, nTransparencyPercent ); } else @@ -2181,7 +2181,7 @@ void DrawGraphic( // background region have to be drawn transparent. // Thus, create a poly-polygon from the region and draw it with // the corresponding transparency precent. - PolyPolygon aDrawPoly( rOut.SVRect() ); + tools::PolyPolygon aDrawPoly( rOut.SVRect() ); if ( aGrf.HasArea() ) { if ( !bGrfIsTransparent ) @@ -4108,7 +4108,7 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const { bool bContour = GetFmt()->GetSurround().IsContour(); - PolyPolygon aPoly; + tools::PolyPolygon aPoly; if ( bContour ) { // OD 16.04.2003 #i13147# - add 2nd parameter with value <sal_True> diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index 8d3a903ed26d..3693e0892cf7 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -225,9 +225,9 @@ const SwRect SwContourCache::ContourRect( const SwFmt* pFmt, { // GetContour() causes the graphic to be loaded, which may cause // the graphic to change its size, call ClrObject() - PolyPolygon aPoly; + tools::PolyPolygon aPoly; if( !((SwVirtFlyDrawObj*)pObj)->GetFlyFrm()->GetContour( aPoly ) ) - aPoly = PolyPolygon( ((SwVirtFlyDrawObj*)pObj)-> + aPoly = tools::PolyPolygon( ((SwVirtFlyDrawObj*)pObj)-> GetFlyFrm()->Frm().SVRect() ); aPolyPolygon.clear(); aPolyPolygon.append(aPoly.getB2DPolyPolygon()); diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 5dee0e832309..b5c0de9a42b3 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -1439,7 +1439,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno:: pNoTxt->SetContour(0); else if(aValue >>= aParam) { - PolyPolygon aPoly((sal_uInt16)aParam.getLength()); + tools::PolyPolygon aPoly((sal_uInt16)aParam.getLength()); for(sal_Int32 i = 0; i < aParam.getLength(); i++) { const :: drawing::PointSequence* pPointSeq = aParam.getConstArray(); @@ -2004,7 +2004,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode(); if(pEntry->nWID == FN_PARAM_COUNTOUR_PP) { - PolyPolygon aContour; + tools::PolyPolygon aContour; if( pNoTxt->GetContourAPI( aContour ) ) { drawing::PointSequenceSequence aPtSeq(aContour.Count()); diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 94fdcc2b0135..e92a2c7347b4 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -683,7 +683,7 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rS { if (const SwNoTxtNode* pNd = sw::util::GetNoTxtNodeFromSwFrmFmt(*pFrmFmt)) { - const PolyPolygon* pPolyPoly = pNd->HasContour(); + const tools::PolyPolygon* pPolyPoly = pNd->HasContour(); if (pPolyPoly && pPolyPoly->Count()) { nWrapToken = XML_wrapTight; diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 7beef00019af..89ba42c0132f 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -3737,7 +3737,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const Sw { if (const SwNoTxtNode* pNd = sw::util::GetNoTxtNodeFromSwFrmFmt(*pFlyFrmFmt)) { - const PolyPolygon* pPolyPoly = pNd->HasContour(); + const tools::PolyPolygon* pPolyPoly = pNd->HasContour(); if (pPolyPoly && pPolyPoly->Count()) { Polygon aPoly = sw::util::CorrectWordWrapPolygonForExport(*pPolyPoly, pNd); diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index 40519c663a26..0fc558f546b1 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -619,7 +619,7 @@ namespace sw return false; } - Polygon PolygonFromPolyPolygon(const PolyPolygon &rPolyPoly) + Polygon PolygonFromPolyPolygon(const tools::PolyPolygon &rPolyPoly) { if(1 == rPolyPoly.Count()) { @@ -662,7 +662,7 @@ namespace sw } } - Polygon CorrectWordWrapPolygonForExport(const PolyPolygon& rPolyPoly, const SwNoTxtNode* pNd) + Polygon CorrectWordWrapPolygonForExport(const tools::PolyPolygon& rPolyPoly, const SwNoTxtNode* pNd) { Polygon aPoly(PolygonFromPolyPolygon(rPolyPoly)); const Size &rOrigSize = pNd->GetGraphic().GetPrefSize(); diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx index 592849963c4e..178d0c50bf0c 100644 --- a/sw/source/filter/ww8/writerhelper.hxx +++ b/sw/source/filter/ww8/writerhelper.hxx @@ -732,17 +732,17 @@ namespace sw a PolyPolygon @param rPolyPoly - The PolyPolygon to try and turn into a Polygon + The tools::PolyPolygon to try and turn into a Polygon @return best fit Polygon from rPolyPoly @author <a href="mailto:cmc@openoffice.org">Caolán McNamara</a> */ - Polygon PolygonFromPolyPolygon(const PolyPolygon &rPolyPoly); + Polygon PolygonFromPolyPolygon(const tools::PolyPolygon &rPolyPoly); /// Undo all scaling / move tricks of the wrap polygon done during import. - Polygon CorrectWordWrapPolygonForExport(const PolyPolygon& rPolyPoly, const SwNoTxtNode* pNd); + Polygon CorrectWordWrapPolygonForExport(const tools::PolyPolygon& rPolyPoly, const SwNoTxtNode* pNd); /** Make setting a drawing object's layer in a Writer document easy diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 92176583a05a..4d526502daa7 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -2103,7 +2103,7 @@ sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType { if (const SwNoTxtNode *pNd = GetNoTxtNodeFromSwFrmFmt(rFmt)) { - const PolyPolygon *pPolyPoly = pNd->HasContour(); + const tools::PolyPolygon *pPolyPoly = pNd->HasContour(); if (pPolyPoly && pPolyPoly->Count()) { Polygon aPoly = CorrectWordWrapPolygonForExport(*pPolyPoly, pNd); diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 1283d9a2caee..56324f571182 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -1943,7 +1943,7 @@ void SwWW8ImplReader::MapWrapIntoFlyFmt(SvxMSDffImportRec* pRecord, what I actually see in word */ - PolyPolygon aPoly(*pRecord->pWrapPolygon); + tools::PolyPolygon aPoly(*pRecord->pWrapPolygon); const Size &rSize = pNd->GetTwipSize(); /* Move to the left by 15twips, and rescale to diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index b6d0b1bfdfcb..2206bf5bc507 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -963,7 +963,7 @@ void SwBaseShell::Execute(SfxRequest &rReq) aSet.Put( aSur ); rSh.SetFlyFrmAttr( aSet ); } - const PolyPolygon aPoly( pDlg->GetPolyPolygon() ); + const tools::PolyPolygon aPoly( pDlg->GetPolyPolygon() ); rSh.SetGraphicPolygon( &aPoly ); if ( pDlg->IsGraphicChanged() ) rSh.ReRead( OUString(), OUString(), &pDlg->GetGraphic()); |