Kaydet (Commit) 7f3628e5 authored tarafından Michael Stahl's avatar Michael Stahl

sw: prefix members of SwSelPaintRects

Change-Id: I527151198635ced3d1be917bc0396f7f062ed868
üst be500fc6
...@@ -66,21 +66,21 @@ class SwSelPaintRects : public SwRects ...@@ -66,21 +66,21 @@ class SwSelPaintRects : public SwRects
friend void _InitCore(); friend void _InitCore();
friend void _FinitCore(); friend void _FinitCore();
static long nPixPtX, nPixPtY; static long s_nPixPtX, s_nPixPtY;
static MapMode *pMapMode; static MapMode *s_pMapMode;
const SwCrsrShell* pCShell; const SwCrsrShell* m_pCursorShell;
#if HAVE_FEATURE_DESKTOP || defined(ANDROID) #if HAVE_FEATURE_DESKTOP || defined(ANDROID)
sdr::overlay::OverlayObject* mpCursorOverlay; sdr::overlay::OverlayObject* m_pCursorOverlay;
// access to mpCursorOverlay for swapContent // access to m_pCursorOverlay for swapContent
sdr::overlay::OverlayObject* getCursorOverlay() const { return mpCursorOverlay; } sdr::overlay::OverlayObject* getCursorOverlay() const { return m_pCursorOverlay; }
void setCursorOverlay(sdr::overlay::OverlayObject* pNew) { mpCursorOverlay = pNew; } void setCursorOverlay(sdr::overlay::OverlayObject* pNew) { m_pCursorOverlay = pNew; }
#endif #endif
bool mbShowTxtInputFldOverlay; bool m_bShowTxtInputFldOverlay;
sw::overlay::OverlayRangesOutline* mpTxtInputFldOverlay; sw::overlay::OverlayRangesOutline* m_pTxtInputFldOverlay;
void HighlightInputFld(); void HighlightInputFld();
...@@ -93,7 +93,7 @@ public: ...@@ -93,7 +93,7 @@ public:
virtual void FillStartEnd(SwRect& rStart, SwRect& rEnd) const = 0; virtual void FillStartEnd(SwRect& rStart, SwRect& rEnd) const = 0;
// #i75172# in SwCrsrShell::CreateCrsr() the content of SwSelPaintRects is exchanged. To // #i75172# in SwCrsrShell::CreateCrsr() the content of SwSelPaintRects is exchanged. To
// make a complete swap access to mpCursorOverlay is needed there // make a complete swap access to m_pCursorOverlay is needed there
void swapContent(SwSelPaintRects& rSwap); void swapContent(SwSelPaintRects& rSwap);
void Show(); void Show();
...@@ -102,10 +102,10 @@ public: ...@@ -102,10 +102,10 @@ public:
inline void SetShowTxtInputFldOverlay( const bool bShow ) inline void SetShowTxtInputFldOverlay( const bool bShow )
{ {
mbShowTxtInputFldOverlay = bShow; m_bShowTxtInputFldOverlay = bShow;
} }
const SwCrsrShell* GetShell() const { return pCShell; } const SwCrsrShell* GetShell() const { return m_pCursorShell; }
// check current MapMode of the shell and set possibly the static members. // check current MapMode of the shell and set possibly the static members.
// Optional set the parameters pX, pY // Optional set the parameters pX, pY
static void Get1PixelInLogic( const SwViewShell& rSh, static void Get1PixelInLogic( const SwViewShell& rSh,
......
...@@ -734,7 +734,7 @@ void _InitCore() ...@@ -734,7 +734,7 @@ void _InitCore()
_FrmInit(); _FrmInit();
_TextInit(); _TextInit();
SwSelPaintRects::pMapMode = new MapMode; SwSelPaintRects::s_pMapMode = new MapMode;
SwFntObj::pPixMap = new MapMode; SwFntObj::pPixMap = new MapMode;
pGlobalOLEExcludeList = new std::vector<SvGlobalName*>; pGlobalOLEExcludeList = new std::vector<SvGlobalName*>;
...@@ -758,7 +758,7 @@ void _FinitCore() ...@@ -758,7 +758,7 @@ void _FinitCore()
// destroy default TableAutoFormat // destroy default TableAutoFormat
delete SwTableAutoFmt::pDfltBoxAutoFmt; delete SwTableAutoFmt::pDfltBoxAutoFmt;
delete SwSelPaintRects::pMapMode; delete SwSelPaintRects::s_pMapMode;
delete SwFntObj::pPixMap; delete SwFntObj::pPixMap;
delete SwEditShell::pAutoFmtFlags; delete SwEditShell::pAutoFmtFlags;
......
...@@ -61,9 +61,9 @@ ...@@ -61,9 +61,9 @@
// MapMode. This is done so that on ShowCrsr the same size does not have to be // MapMode. This is done so that on ShowCrsr the same size does not have to be
// expensively determined again and again. // expensively determined again and again.
long SwSelPaintRects::nPixPtX = 0; long SwSelPaintRects::s_nPixPtX = 0;
long SwSelPaintRects::nPixPtY = 0; long SwSelPaintRects::s_nPixPtY = 0;
MapMode* SwSelPaintRects::pMapMode = 0; MapMode* SwSelPaintRects::s_pMapMode = 0;
// Starting from here: classes / methods for the non-text-cursor // Starting from here: classes / methods for the non-text-cursor
SwVisCrsr::SwVisCrsr( const SwCrsrShell * pCShell ) SwVisCrsr::SwVisCrsr( const SwCrsrShell * pCShell )
...@@ -204,11 +204,11 @@ void SwVisCrsr::_SetPosAndShow() ...@@ -204,11 +204,11 @@ void SwVisCrsr::_SetPosAndShow()
SwSelPaintRects::SwSelPaintRects( const SwCrsrShell& rCSh ) SwSelPaintRects::SwSelPaintRects( const SwCrsrShell& rCSh )
: SwRects() : SwRects()
, pCShell( &rCSh ) , m_pCursorShell( &rCSh )
#if HAVE_FEATURE_DESKTOP #if HAVE_FEATURE_DESKTOP
, mpCursorOverlay( 0 ) , m_pCursorOverlay(nullptr)
, mbShowTxtInputFldOverlay( true ) , m_bShowTxtInputFldOverlay(true)
, mpTxtInputFldOverlay( NULL ) , m_pTxtInputFldOverlay(nullptr)
#endif #endif
{ {
} }
...@@ -223,34 +223,34 @@ void SwSelPaintRects::swapContent(SwSelPaintRects& rSwap) ...@@ -223,34 +223,34 @@ void SwSelPaintRects::swapContent(SwSelPaintRects& rSwap)
SwRects::swap(rSwap); SwRects::swap(rSwap);
#if HAVE_FEATURE_DESKTOP #if HAVE_FEATURE_DESKTOP
// #i75172# also swap mpCursorOverlay // #i75172# also swap m_pCursorOverlay
sdr::overlay::OverlayObject* pTempOverlay = getCursorOverlay(); sdr::overlay::OverlayObject* pTempOverlay = getCursorOverlay();
setCursorOverlay(rSwap.getCursorOverlay()); setCursorOverlay(rSwap.getCursorOverlay());
rSwap.setCursorOverlay(pTempOverlay); rSwap.setCursorOverlay(pTempOverlay);
const bool bTempShowTxtInputFldOverlay = mbShowTxtInputFldOverlay; const bool bTempShowTxtInputFldOverlay = m_bShowTxtInputFldOverlay;
mbShowTxtInputFldOverlay = rSwap.mbShowTxtInputFldOverlay; m_bShowTxtInputFldOverlay = rSwap.m_bShowTxtInputFldOverlay;
rSwap.mbShowTxtInputFldOverlay = bTempShowTxtInputFldOverlay; rSwap.m_bShowTxtInputFldOverlay = bTempShowTxtInputFldOverlay;
sw::overlay::OverlayRangesOutline* pTempTxtInputFldOverlay = mpTxtInputFldOverlay; sw::overlay::OverlayRangesOutline* pTempTxtInputFldOverlay = m_pTxtInputFldOverlay;
mpTxtInputFldOverlay = rSwap.mpTxtInputFldOverlay; m_pTxtInputFldOverlay = rSwap.m_pTxtInputFldOverlay;
rSwap.mpTxtInputFldOverlay = pTempTxtInputFldOverlay; rSwap.m_pTxtInputFldOverlay = pTempTxtInputFldOverlay;
#endif #endif
} }
void SwSelPaintRects::Hide() void SwSelPaintRects::Hide()
{ {
#if HAVE_FEATURE_DESKTOP #if HAVE_FEATURE_DESKTOP
if(mpCursorOverlay) if (m_pCursorOverlay)
{ {
delete mpCursorOverlay; delete m_pCursorOverlay;
mpCursorOverlay = 0; m_pCursorOverlay = nullptr;
} }
if ( mpTxtInputFldOverlay != NULL ) if (m_pTxtInputFldOverlay != nullptr)
{ {
delete mpTxtInputFldOverlay; delete m_pTxtInputFldOverlay;
mpTxtInputFldOverlay = NULL; m_pTxtInputFldOverlay = nullptr;
} }
#endif #endif
...@@ -283,7 +283,7 @@ void SwShellCrsr::FillStartEnd(SwRect& rStart, SwRect& rEnd) const ...@@ -283,7 +283,7 @@ void SwShellCrsr::FillStartEnd(SwRect& rStart, SwRect& rEnd) const
void SwSelPaintRects::Show() void SwSelPaintRects::Show()
{ {
SdrView* pView = (SdrView*)pCShell->GetDrawView(); SdrView *const pView = const_cast<SdrView*>(m_pCursorShell->GetDrawView());
if(pView && pView->PaintWindowCount()) if(pView && pView->PaintWindowCount())
{ {
...@@ -305,16 +305,16 @@ void SwSelPaintRects::Show() ...@@ -305,16 +305,16 @@ void SwSelPaintRects::Show()
aPntRect.Right() + 1, aPntRect.Bottom() + 1)); aPntRect.Right() + 1, aPntRect.Bottom() + 1));
} }
if(mpCursorOverlay) if (m_pCursorOverlay)
{ {
if(!aNewRanges.empty()) if(!aNewRanges.empty())
{ {
static_cast< sdr::overlay::OverlaySelection* >(mpCursorOverlay)->setRanges(aNewRanges); static_cast<sdr::overlay::OverlaySelection*>(m_pCursorOverlay)->setRanges(aNewRanges);
} }
else else
{ {
delete mpCursorOverlay; delete m_pCursorOverlay;
mpCursorOverlay = 0; m_pCursorOverlay = nullptr;
} }
} }
else if(!empty()) else if(!empty())
...@@ -329,13 +329,13 @@ void SwSelPaintRects::Show() ...@@ -329,13 +329,13 @@ void SwSelPaintRects::Show()
const Color aHighlight(aSvtOptionsDrawinglayer.getHilightColor()); const Color aHighlight(aSvtOptionsDrawinglayer.getHilightColor());
// create correct selection // create correct selection
mpCursorOverlay = new sdr::overlay::OverlaySelection( m_pCursorOverlay = new sdr::overlay::OverlaySelection(
sdr::overlay::OVERLAY_TRANSPARENT, sdr::overlay::OVERLAY_TRANSPARENT,
aHighlight, aHighlight,
aNewRanges, aNewRanges,
true); true);
xTargetOverlay->add(*mpCursorOverlay); xTargetOverlay->add(*m_pCursorOverlay);
} }
} }
...@@ -395,7 +395,7 @@ void SwSelPaintRects::HighlightInputFld() ...@@ -395,7 +395,7 @@ void SwSelPaintRects::HighlightInputFld()
{ {
std::vector< basegfx::B2DRange > aInputFldRanges; std::vector< basegfx::B2DRange > aInputFldRanges;
if ( mbShowTxtInputFldOverlay ) if (m_bShowTxtInputFldOverlay)
{ {
SwTxtInputFld* pCurTxtInputFldAtCrsr = SwTxtInputFld* pCurTxtInputFldAtCrsr =
dynamic_cast<SwTxtInputFld*>(GetShell()->GetTxtFldAtPos( GetShell()->GetCrsr()->Start(), false )); dynamic_cast<SwTxtInputFld*>(GetShell()->GetTxtFldAtPos( GetShell()->GetCrsr()->Start(), false ));
...@@ -424,9 +424,9 @@ void SwSelPaintRects::HighlightInputFld() ...@@ -424,9 +424,9 @@ void SwSelPaintRects::HighlightInputFld()
if ( aInputFldRanges.size() > 0 ) if ( aInputFldRanges.size() > 0 )
{ {
if ( mpTxtInputFldOverlay != NULL ) if (m_pTxtInputFldOverlay != nullptr)
{ {
mpTxtInputFldOverlay->setRanges( aInputFldRanges ); m_pTxtInputFldOverlay->setRanges( aInputFldRanges );
} }
else else
{ {
...@@ -441,17 +441,18 @@ void SwSelPaintRects::HighlightInputFld() ...@@ -441,17 +441,18 @@ void SwSelPaintRects::HighlightInputFld()
Color aHighlight(aSvtOptionsDrawinglayer.getHilightColor()); Color aHighlight(aSvtOptionsDrawinglayer.getHilightColor());
aHighlight.DecreaseLuminance( 128 ); aHighlight.DecreaseLuminance( 128 );
mpTxtInputFldOverlay = new sw::overlay::OverlayRangesOutline( aHighlight, aInputFldRanges ); m_pTxtInputFldOverlay = new sw::overlay::OverlayRangesOutline(
xTargetOverlay->add( *mpTxtInputFldOverlay ); aHighlight, aInputFldRanges );
xTargetOverlay->add( *m_pTxtInputFldOverlay );
} }
} }
} }
else else
{ {
if ( mpTxtInputFldOverlay != NULL ) if (m_pTxtInputFldOverlay != nullptr)
{ {
delete mpTxtInputFldOverlay; delete m_pTxtInputFldOverlay;
mpTxtInputFldOverlay = NULL; m_pTxtInputFldOverlay = nullptr;
} }
} }
} }
...@@ -480,9 +481,9 @@ void SwSelPaintRects::Invalidate( const SwRect& rRect ) ...@@ -480,9 +481,9 @@ void SwSelPaintRects::Invalidate( const SwRect& rRect )
{ {
SwRect& rRectIt = *it; SwRect& rRectIt = *it;
if( rRectIt.Right() == GetShell()->m_aOldRBPos.X() ) if( rRectIt.Right() == GetShell()->m_aOldRBPos.X() )
rRectIt.Right( rRectIt.Right() + nPixPtX ); rRectIt.Right( rRectIt.Right() + s_nPixPtX );
if( rRectIt.Bottom() == GetShell()->m_aOldRBPos.Y() ) if( rRectIt.Bottom() == GetShell()->m_aOldRBPos.Y() )
rRectIt.Bottom( rRectIt.Bottom() + nPixPtY ); rRectIt.Bottom( rRectIt.Bottom() + s_nPixPtY );
} }
} }
} }
...@@ -497,20 +498,20 @@ void SwSelPaintRects::Get1PixelInLogic( const SwViewShell& rSh, ...@@ -497,20 +498,20 @@ void SwSelPaintRects::Get1PixelInLogic( const SwViewShell& rSh,
pOut = rSh.GetOut(); pOut = rSh.GetOut();
const MapMode& rMM = pOut->GetMapMode(); const MapMode& rMM = pOut->GetMapMode();
if( pMapMode->GetMapUnit() != rMM.GetMapUnit() || if (s_pMapMode->GetMapUnit() != rMM.GetMapUnit() ||
pMapMode->GetScaleX() != rMM.GetScaleX() || s_pMapMode->GetScaleX() != rMM.GetScaleX() ||
pMapMode->GetScaleY() != rMM.GetScaleY() ) s_pMapMode->GetScaleY() != rMM.GetScaleY())
{ {
*pMapMode = rMM; *s_pMapMode = rMM;
Size aTmp( 1, 1 ); Size aTmp( 1, 1 );
aTmp = pOut->PixelToLogic( aTmp ); aTmp = pOut->PixelToLogic( aTmp );
nPixPtX = aTmp.Width(); s_nPixPtX = aTmp.Width();
nPixPtY = aTmp.Height(); s_nPixPtY = aTmp.Height();
} }
if( pX ) if( pX )
*pX = nPixPtX; *pX = s_nPixPtX;
if( pY ) if( pY )
*pY = nPixPtY; *pY = s_nPixPtY;
} }
SwShellCrsr::SwShellCrsr( SwShellCrsr::SwShellCrsr(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment