[Libreoffice-commits] core.git: sw/inc sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Mon Aug 7 08:10:05 UTC 2017
sw/inc/ndnotxt.hxx | 18 +++++-----
sw/source/core/docnode/ndnotxt.cxx | 66 ++++++++++++++++++-------------------
2 files changed, 42 insertions(+), 42 deletions(-)
New commits:
commit 57ea9f81ed3553ad71207db9e433774b165732a2
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Aug 7 09:16:40 2017 +0200
sw: prefix members of SwNoTextNode
Change-Id: I6a272d1c83c58e1b6ef610eed7964309d1622a7e
Reviewed-on: https://gerrit.libreoffice.org/40820
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx
index 0e1a094e5764..e302123e2f0c 100644
--- a/sw/inc/ndnotxt.hxx
+++ b/sw/inc/ndnotxt.hxx
@@ -31,12 +31,12 @@ class SW_DLLPUBLIC SwNoTextNode : public SwContentNode
friend class SwNodes;
friend class SwNoTextFrame;
- std::unique_ptr<tools::PolyPolygon> pContour;
- bool bAutomaticContour : 1; // automatic contour polygon, not manipulated
- bool bContourMapModeValid : 1; // contour map mode is not the graphics's
+ std::unique_ptr<tools::PolyPolygon> m_pContour;
+ bool m_bAutomaticContour : 1; // automatic contour polygon, not manipulated
+ bool m_bContourMapModeValid : 1; // contour map mode is not the graphics's
// preferred map mode, but either
// MM100 or pixel
- bool bPixelContour : 1; // contour map mode is invalid and pixel.
+ bool m_bPixelContour : 1; // contour map mode is invalid and pixel.
// Creates for all derivations an AttrSet with ranges for frame- and
// graphics-attributes (only called by SwContentNode).
@@ -69,12 +69,12 @@ public:
void SetContour( const tools::PolyPolygon *pPoly,
bool bAutomatic = false );
const tools::PolyPolygon *HasContour() const;
- bool HasContour_() const { return pContour!=nullptr; };
+ bool HasContour_() const { return m_pContour!=nullptr; };
void GetContour( tools::PolyPolygon &rPoly ) const;
void CreateContour();
- void SetAutomaticContour( bool bSet ) { bAutomaticContour = bSet; }
- bool HasAutomaticContour() const { return bAutomaticContour; }
+ void SetAutomaticContour( bool bSet ) { m_bAutomaticContour = bSet; }
+ bool HasAutomaticContour() const { return m_bAutomaticContour; }
// set either a MM100 or pixel contour
void SetContourAPI( const tools::PolyPolygon *pPoly );
@@ -82,10 +82,10 @@ public:
// get either a MM100 or pixel contour, return false if no contour is set.
bool GetContourAPI( tools::PolyPolygon &rPoly ) const;
- void SetPixelContour( bool bSet ) { bPixelContour = bSet; }
+ void SetPixelContour( bool bSet ) { m_bPixelContour = bSet; }
bool IsPixelContour() const;
- bool IsContourMapModeValid() const { return bContourMapModeValid; }
+ bool IsContourMapModeValid() const { return m_bContourMapModeValid; }
// Obtains the graphic with SwapIn for GrfNode via GetData for OLE.
Graphic GetGraphic() const;
diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx
index ccb1533cf59e..3d33fda5cd5d 100644
--- a/sw/source/core/docnode/ndnotxt.cxx
+++ b/sw/source/core/docnode/ndnotxt.cxx
@@ -41,10 +41,10 @@ SwNoTextNode::SwNoTextNode( const SwNodeIndex & rWhere,
SwGrfFormatColl *pGrfColl,
SwAttrSet const * pAutoAttr ) :
SwContentNode( rWhere, nNdType, pGrfColl ),
- pContour( nullptr ),
- bAutomaticContour( false ),
- bContourMapModeValid( true ),
- bPixelContour( false )
+ m_pContour( nullptr ),
+ m_bAutomaticContour( false ),
+ m_bContourMapModeValid( true ),
+ m_bPixelContour( false )
{
// Should this set a hard attribute?
if( pAutoAttr )
@@ -88,36 +88,36 @@ bool SwNoTextNode::SavePersistentData()
void SwNoTextNode::SetContour( const tools::PolyPolygon *pPoly, bool bAutomatic )
{
if ( pPoly )
- pContour.reset( new tools::PolyPolygon( *pPoly ) );
+ m_pContour.reset( new tools::PolyPolygon( *pPoly ) );
else
- pContour.reset();
- bAutomaticContour = bAutomatic;
- bContourMapModeValid = true;
- bPixelContour = false;
+ m_pContour.reset();
+ m_bAutomaticContour = bAutomatic;
+ m_bContourMapModeValid = true;
+ m_bPixelContour = false;
}
void SwNoTextNode::CreateContour()
{
- OSL_ENSURE( !pContour, "Contour available." );
- pContour.reset( new tools::PolyPolygon(SvxContourDlg::CreateAutoContour(GetGraphic())) );
- bAutomaticContour = true;
- bContourMapModeValid = true;
- bPixelContour = false;
+ OSL_ENSURE( !m_pContour, "Contour available." );
+ m_pContour.reset( new tools::PolyPolygon(SvxContourDlg::CreateAutoContour(GetGraphic())) );
+ m_bAutomaticContour = true;
+ m_bContourMapModeValid = true;
+ m_bPixelContour = false;
}
const tools::PolyPolygon *SwNoTextNode::HasContour() const
{
- if( !bContourMapModeValid )
+ if( !m_bContourMapModeValid )
{
const MapMode aGrfMap( GetGraphic().GetPrefMapMode() );
bool bPixelGrf = aGrfMap.GetMapUnit() == MapUnit::MapPixel;
const MapMode aContourMap( bPixelGrf ? MapUnit::MapPixel : MapUnit::Map100thMM );
- if( bPixelGrf ? !bPixelContour : aGrfMap != aContourMap )
+ if( bPixelGrf ? !m_bPixelContour : aGrfMap != aContourMap )
{
double nGrfDPIx = 0.0;
double nGrfDPIy = 0.0;
{
- if ( !bPixelGrf && bPixelContour )
+ if ( !bPixelGrf && m_bPixelContour )
{
const Size aGrfPixelSize( GetGraphic().GetSizePixel() );
const Size aGrfPrefMapModeSize( GetGraphic().GetPrefSize() );
@@ -139,12 +139,12 @@ const tools::PolyPolygon *SwNoTextNode::HasContour() const
OSL_ENSURE( !bPixelGrf || aGrfMap == aContourMap,
"scale factor for pixel unsupported" );
OutputDevice* pOutDev =
- (bPixelGrf || bPixelContour) ? Application::GetDefaultDevice()
+ (bPixelGrf || m_bPixelContour) ? Application::GetDefaultDevice()
: nullptr;
- sal_uInt16 nPolyCount = pContour->Count();
+ sal_uInt16 nPolyCount = m_pContour->Count();
for( sal_uInt16 j=0; j<nPolyCount; j++ )
{
- tools::Polygon& rPoly = (*pContour)[j];
+ tools::Polygon& rPoly = (*m_pContour)[j];
sal_uInt16 nCount = rPoly.GetSize();
for( sal_uInt16 i=0 ; i<nCount; i++ )
@@ -152,7 +152,7 @@ const tools::PolyPolygon *SwNoTextNode::HasContour() const
if( bPixelGrf )
rPoly[i] = pOutDev->LogicToPixel( rPoly[i],
aContourMap );
- else if( bPixelContour )
+ else if( m_bPixelContour )
{
rPoly[i] = pOutDev->PixelToLogic( rPoly[i], aGrfMap );
@@ -169,35 +169,35 @@ const tools::PolyPolygon *SwNoTextNode::HasContour() const
}
}
}
- const_cast<SwNoTextNode *>(this)->bContourMapModeValid = true;
- const_cast<SwNoTextNode *>(this)->bPixelContour = false;
+ const_cast<SwNoTextNode *>(this)->m_bContourMapModeValid = true;
+ const_cast<SwNoTextNode *>(this)->m_bPixelContour = false;
}
- return pContour.get();
+ return m_pContour.get();
}
void SwNoTextNode::GetContour( tools::PolyPolygon &rPoly ) const
{
- OSL_ENSURE( pContour, "Contour not available." );
+ OSL_ENSURE( m_pContour, "Contour not available." );
rPoly = *HasContour();
}
void SwNoTextNode::SetContourAPI( const tools::PolyPolygon *pPoly )
{
if ( pPoly )
- pContour.reset( new tools::PolyPolygon( *pPoly ) );
+ m_pContour.reset( new tools::PolyPolygon( *pPoly ) );
else
- pContour.reset();
- bContourMapModeValid = false;
+ m_pContour.reset();
+ m_bContourMapModeValid = false;
}
bool SwNoTextNode::GetContourAPI( tools::PolyPolygon &rContour ) const
{
- if( !pContour )
+ if( !m_pContour )
return false;
- rContour = *pContour;
- if( bContourMapModeValid )
+ rContour = *m_pContour;
+ if( m_bContourMapModeValid )
{
const MapMode aGrfMap( GetGraphic().GetPrefMapMode() );
const MapMode aContourMap( MapUnit::Map100thMM );
@@ -228,14 +228,14 @@ bool SwNoTextNode::GetContourAPI( tools::PolyPolygon &rContour ) const
bool SwNoTextNode::IsPixelContour() const
{
bool bRet;
- if( bContourMapModeValid )
+ if( m_bContourMapModeValid )
{
const MapMode aGrfMap( GetGraphic().GetPrefMapMode() );
bRet = aGrfMap.GetMapUnit() == MapUnit::MapPixel;
}
else
{
- bRet = bPixelContour;
+ bRet = m_bPixelContour;
}
return bRet;
More information about the Libreoffice-commits
mailing list