summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-12-08 16:48:18 +0900
committerTomaž Vajngerl <quikee@gmail.com>2023-12-28 08:08:16 +0100
commit8530c6a25a9ce258e58eb657a9cdd200ba1a30d2 (patch)
treee8a58c843bdb1488bbcb8ccd3fddfed42ed58e50 /editeng
parenta26ff6a061ca2ec8fb51123b732288d44a536bf5 (diff)
editeng: prefix ImpEditEngine pVirtDev, pRefDev
Change-Id: I4e215b374178314a836cfddb0107b8cdbe6c1f82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161346 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editdbg.cxx2
-rw-r--r--editeng/source/editeng/impedit.hxx34
-rw-r--r--editeng/source/editeng/impedit2.cxx20
-rw-r--r--editeng/source/editeng/impedit3.cxx18
-rw-r--r--editeng/source/editeng/impedit4.cxx2
5 files changed, 38 insertions, 38 deletions
diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx
index 31ec9d09306d..74cd266d8bb8 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -464,7 +464,7 @@ void EditEngine::DumpData(const EditEngine* pEE, bool bInfoBox)
fprintf( fp, "\n================== EditEngine & Views ======================================" );
fprintf( fp, "\n================================================================================" );
fprintf( fp, "\nControl: %x", unsigned( pEE->GetControlWord() ) );
- fprintf( fp, "\nRefMapMode: %i", int( pEE->pImpEditEngine->pRefDev->GetMapMode().GetMapUnit() ) );
+ fprintf( fp, "\nRefMapMode: %i", int( pEE->pImpEditEngine->mpRefDev->GetMapMode().GetMapUnit() ) );
fprintf( fp, "\nPaperSize: %" SAL_PRIdINT64 " x %" SAL_PRIdINT64, sal_Int64(pEE->GetPaperSize().Width()), sal_Int64(pEE->GetPaperSize().Height()) );
fprintf( fp, "\nMaxAutoPaperSize: %" SAL_PRIdINT64 " x %" SAL_PRIdINT64, sal_Int64(pEE->GetMaxAutoPaperSize().Width()), sal_Int64(pEE->GetMaxAutoPaperSize().Height()) );
fprintf( fp, "\nMinAutoPaperSize: %" SAL_PRIdINT64 " x %" SAL_PRIdINT64 , sal_Int64(pEE->GetMinAutoPaperSize().Width()), sal_Int64(pEE->GetMinAutoPaperSize().Height()) );
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 57fe8ca0c7eb..89339b11dc3e 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -534,8 +534,8 @@ private:
SfxStyleSheetPool* pStylePool;
SfxItemPool* pTextObjectPool;
- VclPtr< VirtualDevice> pVirtDev;
- VclPtr< OutputDevice > pRefDev;
+ VclPtr<VirtualDevice> mpVirtDev;
+ VclPtr<OutputDevice> mpRefDev;
VclPtr<VirtualDevice> mpOwnDev;
svtools::ColorConfig maColorConfig;
@@ -814,24 +814,24 @@ private:
VirtualDevice* GetVirtualDevice(const MapMode& rMapMode, DrawModeFlags nDrawMode)
{
- if ( !pVirtDev )
- pVirtDev = VclPtr<VirtualDevice>::Create();
+ if (!mpVirtDev)
+ mpVirtDev = VclPtr<VirtualDevice>::Create();
- if ( ( pVirtDev->GetMapMode().GetMapUnit() != rMapMode.GetMapUnit() ) ||
- ( pVirtDev->GetMapMode().GetScaleX() != rMapMode.GetScaleX() ) ||
- ( pVirtDev->GetMapMode().GetScaleY() != rMapMode.GetScaleY() ) )
+ if ((mpVirtDev->GetMapMode().GetMapUnit() != rMapMode.GetMapUnit()) ||
+ (mpVirtDev->GetMapMode().GetScaleX() != rMapMode.GetScaleX()) ||
+ (mpVirtDev->GetMapMode().GetScaleY() != rMapMode.GetScaleY()) )
{
- MapMode aMapMode( rMapMode );
- aMapMode.SetOrigin( Point( 0, 0 ) );
- pVirtDev->SetMapMode( aMapMode );
+ MapMode aMapMode(rMapMode);
+ aMapMode.SetOrigin(Point(0, 0));
+ mpVirtDev->SetMapMode(aMapMode);
}
- pVirtDev->SetDrawMode( nDrawMode );
+ mpVirtDev->SetDrawMode(nDrawMode);
- return pVirtDev;
+ return mpVirtDev;
}
- void EraseVirtualDevice() { pVirtDev.disposeAndClear(); }
+ void EraseVirtualDevice() { mpVirtDev.disposeAndClear(); }
DECL_LINK( StatusTimerHdl, Timer *, void);
DECL_LINK( IdleFormatHdl, Timer *, void);
@@ -1131,11 +1131,11 @@ public:
bool isUsedByModel() const override { return true; }
- OutputDevice* GetRefDevice() const { return pRefDev.get(); }
- void SetRefDevice( OutputDevice* pRefDef );
+ OutputDevice* GetRefDevice() const { return mpRefDev.get(); }
+ void SetRefDevice(OutputDevice* mpRefDef);
- const MapMode& GetRefMapMode() const { return pRefDev->GetMapMode(); }
- void SetRefMapMode( const MapMode& rMapMode );
+ const MapMode& GetRefMapMode() const { return mpRefDev->GetMapMode(); }
+ void SetRefMapMode(const MapMode& rMapMode);
InternalEditStatus& GetStatus() { return maStatus; }
void CallStatusHdl();
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 4b8f0a63799a..1f481259cafd 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -165,7 +165,7 @@ void ImpEditEngine::Dispose()
auto pApp = SfxApplication::Get();
if(pApp)
EndListening(*pApp);
- pVirtDev.disposeAndClear();
+ mpVirtDev.disposeAndClear();
mpOwnDev.disposeAndClear();
pSharedVCL.reset();
}
@@ -193,14 +193,14 @@ ImpEditEngine::~ImpEditEngine()
pSpellInfo.reset();
}
-void ImpEditEngine::SetRefDevice( OutputDevice* pRef )
+void ImpEditEngine::SetRefDevice(OutputDevice* pRef)
{
if (pRef)
- pRefDev = pRef;
+ mpRefDev = pRef;
else
- pRefDev = pSharedVCL->GetVirtualDevice();
+ mpRefDev = pSharedVCL->GetVirtualDevice();
- nOnePixelInRef = static_cast<sal_uInt16>(pRefDev->PixelToLogic( Size( 1, 0 ) ).Width());
+ nOnePixelInRef = static_cast<sal_uInt16>(mpRefDev->PixelToLogic( Size( 1, 0 ) ).Width());
if ( IsFormatted() )
{
@@ -216,12 +216,12 @@ void ImpEditEngine::SetRefMapMode( const MapMode& rMapMode )
mpOwnDev.disposeAndClear();
mpOwnDev = VclPtr<VirtualDevice>::Create();
- pRefDev = mpOwnDev;
- pRefDev->SetMapMode(MapMode(MapUnit::MapTwip));
- SetRefDevice( pRefDev );
+ mpRefDev = mpOwnDev;
+ mpRefDev->SetMapMode(MapMode(MapUnit::MapTwip));
+ SetRefDevice(mpRefDev);
- pRefDev->SetMapMode( rMapMode );
- nOnePixelInRef = static_cast<sal_uInt16>(pRefDev->PixelToLogic( Size( 1, 0 ) ).Width());
+ mpRefDev->SetMapMode( rMapMode );
+ nOnePixelInRef = static_cast<sal_uInt16>(mpRefDev->PixelToLogic(Size(1, 0)).Width());
if ( IsFormatted() )
{
FormatFullDoc();
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index b24cc004011c..01b2d52b3fa7 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -1418,13 +1418,13 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
if ( aTextSize.Height() == 0 )
{
SeekCursor( pNode, pLine->GetStart()+1, aTmpFont );
- aTmpFont.SetPhysFont(*pRefDev);
- ImplInitDigitMode(*pRefDev, aTmpFont.GetLanguage());
+ aTmpFont.SetPhysFont(*mpRefDev);
+ ImplInitDigitMode(*mpRefDev, aTmpFont.GetLanguage());
if ( IsFixedCellHeight() )
aTextSize.setHeight( ImplCalculateFontIndependentLineSpacing( aTmpFont.GetFontHeight() ) );
else
- aTextSize.setHeight( aTmpFont.GetPhysTxtSize( pRefDev ).Height() );
+ aTextSize.setHeight( aTmpFont.GetPhysTxtSize(mpRefDev).Height() );
pLine->SetHeight( static_cast<sal_uInt16>(aTextSize.Height()) );
}
@@ -1790,10 +1790,10 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion )
SvxFont aTmpFont;
SeekCursor( pParaPortion->GetNode(), bLineBreak ? pParaPortion->GetNode()->Len() : 0, aTmpFont );
- aTmpFont.SetPhysFont(*pRefDev);
+ aTmpFont.SetPhysFont(*mpRefDev);
TextPortion* pDummyPortion = new TextPortion( 0 );
- pDummyPortion->SetSize(aTmpFont.GetPhysTxtSize(pRefDev));
+ pDummyPortion->SetSize(aTmpFont.GetPhysTxtSize(mpRefDev));
if ( IsFixedCellHeight() )
pDummyPortion->setHeight( ImplCalculateFontIndependentLineSpacing( aTmpFont.GetFontHeight() ) );
pParaPortion->GetTextPortions().Append(pDummyPortion);
@@ -3105,11 +3105,11 @@ void ImpEditEngine::RecalcFormatterFontMetrics( FormatterFontMetric& rCurMetrics
if ( nPropr != 100 )
{
rFont.SetPropr( 100 );
- rFont.SetPhysFont(*pRefDev);
+ rFont.SetPhysFont(*mpRefDev);
}
sal_uInt16 nAscent, nDescent;
- FontMetric aMetric( pRefDev->GetFontMetric() );
+ FontMetric aMetric(mpRefDev->GetFontMetric());
nAscent = static_cast<sal_uInt16>(aMetric.GetAscent());
if ( IsAddExtLeading() )
nAscent = sal::static_int_cast< sal_uInt16 >(
@@ -3125,10 +3125,10 @@ void ImpEditEngine::RecalcFormatterFontMetrics( FormatterFontMetric& rCurMetrics
{
sal_uInt16 nIntLeading = ( aMetric.GetInternalLeading() > 0 ) ? static_cast<sal_uInt16>(aMetric.GetInternalLeading()) : 0;
// Fonts without leading cause problems
- if ( ( nIntLeading == 0 ) && ( pRefDev->GetOutDevType() == OUTDEV_PRINTER ) )
+ if ( ( nIntLeading == 0 ) && (mpRefDev->GetOutDevType() == OUTDEV_PRINTER))
{
// Lets see what Leading one gets on the screen
- VclPtr<VirtualDevice> pVDev = GetVirtualDevice( pRefDev->GetMapMode(), pRefDev->GetDrawMode() );
+ VclPtr<VirtualDevice> pVDev = GetVirtualDevice(mpRefDev->GetMapMode(), mpRefDev->GetDrawMode());
rFont.SetPhysFont(*pVDev);
aMetric = pVDev->GetFontMetric();
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 57b3d65c54b4..1a74266d270a 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -3120,7 +3120,7 @@ sal_Int32 ImpEditEngine::LogicToTwips(sal_Int32 n)
{
Size aSz(n, 0);
MapMode aTwipsMode( MapUnit::MapTwip );
- aSz = pRefDev->LogicToLogic( aSz, nullptr, &aTwipsMode );
+ aSz = mpRefDev->LogicToLogic( aSz, nullptr, &aTwipsMode );
return aSz.Width();
}