summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editeng.cxx52
-rw-r--r--editeng/source/editeng/impedit.hxx2
-rw-r--r--editeng/source/editeng/impedit3.cxx118
-rw-r--r--editeng/source/outliner/outleeng.cxx6
-rw-r--r--editeng/source/outliner/outleeng.hxx2
-rw-r--r--editeng/source/outliner/outlin2.cxx8
-rw-r--r--editeng/source/outliner/outliner.cxx36
7 files changed, 112 insertions, 112 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index f42b494ab139..60165977fc32 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -200,35 +200,35 @@ const SfxItemSet& EditEngine::GetEmptyItemSet() const
return pImpEditEngine->GetEmptyItemSet();
}
-void EditEngine::Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect )
+void EditEngine::Draw( OutputDevice& rOutDev, const tools::Rectangle& rOutRect )
{
- Draw( pOutDev, rOutRect, Point( 0, 0 ) );
+ Draw( rOutDev, rOutRect, Point( 0, 0 ) );
}
-void EditEngine::Draw( OutputDevice* pOutDev, const Point& rStartPos, Degree10 nOrientation )
+void EditEngine::Draw( OutputDevice& rOutDev, const Point& rStartPos, Degree10 nOrientation )
{
// Create with 2 points, as with positive points it will end up with
// LONGMAX as Size, Bottom and Right in the range > LONGMAX.
tools::Rectangle aBigRect( -0x3FFFFFFF, -0x3FFFFFFF, 0x3FFFFFFF, 0x3FFFFFFF );
- if( pOutDev->GetConnectMetaFile() )
- pOutDev->Push();
+ if( rOutDev.GetConnectMetaFile() )
+ rOutDev.Push();
Point aStartPos( rStartPos );
if ( IsVertical() )
{
aStartPos.AdjustX(GetPaperSize().Width() );
aStartPos = Rotate( aStartPos, nOrientation, rStartPos );
}
- pImpEditEngine->Paint( pOutDev, aBigRect, aStartPos, false, nOrientation );
- if( pOutDev->GetConnectMetaFile() )
- pOutDev->Pop();
+ pImpEditEngine->Paint(rOutDev, aBigRect, aStartPos, false, nOrientation);
+ if( rOutDev.GetConnectMetaFile() )
+ rOutDev.Pop();
}
-void EditEngine::Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect, const Point& rStartDocPos )
+void EditEngine::Draw( OutputDevice& rOutDev, const tools::Rectangle& rOutRect, const Point& rStartDocPos )
{
- Draw( pOutDev, rOutRect, rStartDocPos, true );
+ Draw( rOutDev, rOutRect, rStartDocPos, true );
}
-void EditEngine::Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect, const Point& rStartDocPos, bool bClip )
+void EditEngine::Draw( OutputDevice& rOutDev, const tools::Rectangle& rOutRect, const Point& rStartDocPos, bool bClip )
{
#if defined( DBG_UTIL ) || (OSL_DEBUG_LEVEL > 1)
if ( bDebugPaint )
@@ -237,8 +237,8 @@ void EditEngine::Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect,
// Align to the pixel boundary, so that it becomes exactly the same
// as Paint ()
- tools::Rectangle aOutRect( pOutDev->LogicToPixel( rOutRect ) );
- aOutRect = pOutDev->PixelToLogic( aOutRect );
+ tools::Rectangle aOutRect( rOutDev.LogicToPixel( rOutRect ) );
+ aOutRect = rOutDev.PixelToLogic( aOutRect );
Point aStartPos;
if ( !IsVertical() )
@@ -252,14 +252,14 @@ void EditEngine::Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect,
aStartPos.setY( aOutRect.Top() - rStartDocPos.X() );
}
- bool bClipRegion = pOutDev->IsClipRegion();
- bool bMetafile = pOutDev->GetConnectMetaFile();
- vcl::Region aOldRegion = pOutDev->GetClipRegion();
+ bool bClipRegion = rOutDev.IsClipRegion();
+ bool bMetafile = rOutDev.GetConnectMetaFile();
+ vcl::Region aOldRegion = rOutDev.GetClipRegion();
// If one existed => intersection!
// Use Push/pop for creating the Meta file
if ( bMetafile )
- pOutDev->Push();
+ rOutDev.Push();
// Always use the Intersect method, it is a must for Metafile!
if ( bClip )
@@ -272,25 +272,25 @@ void EditEngine::Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect,
// Some printer drivers cause problems if characters graze the
// ClipRegion, therefore rather add a pixel more ...
tools::Rectangle aClipRect( aOutRect );
- if ( pOutDev->GetOutDevType() == OUTDEV_PRINTER )
+ if ( rOutDev.GetOutDevType() == OUTDEV_PRINTER )
{
Size aPixSz( 1, 0 );
- aPixSz = pOutDev->PixelToLogic( aPixSz );
+ aPixSz = rOutDev.PixelToLogic( aPixSz );
aClipRect.AdjustRight(aPixSz.Width() );
aClipRect.AdjustBottom(aPixSz.Width() );
}
- pOutDev->IntersectClipRegion( aClipRect );
+ rOutDev.IntersectClipRegion( aClipRect );
}
}
- pImpEditEngine->Paint( pOutDev, aOutRect, aStartPos );
+ pImpEditEngine->Paint( rOutDev, aOutRect, aStartPos );
if ( bMetafile )
- pOutDev->Pop();
+ rOutDev.Pop();
else if ( bClipRegion )
- pOutDev->SetClipRegion( aOldRegion );
+ rOutDev.SetClipRegion( aOldRegion );
else
- pOutDev->SetClipRegion();
+ rOutDev.SetClipRegion();
}
void EditEngine::InsertView(EditView* pEditView, size_t nIndex)
@@ -1820,7 +1820,7 @@ void EditEngine::StripPortions()
aBigRect.SetBottom( 0 );
}
}
- pImpEditEngine->Paint( aTmpDev.get(), aBigRect, Point(), true );
+ pImpEditEngine->Paint(*aTmpDev, aBigRect, Point(), true);
}
void EditEngine::GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList )
@@ -2475,7 +2475,7 @@ void EditEngine::DrawingTab( const Point& /*rStartPos*/, tools::Long /*nWidth*/,
{
}
-void EditEngine::PaintingFirstLine( sal_Int32, const Point&, tools::Long, const Point&, Degree10, OutputDevice* )
+void EditEngine::PaintingFirstLine(sal_Int32, const Point&, tools::Long, const Point&, Degree10, OutputDevice&)
{
}
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 473856281e3c..284c55bc029c 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -844,7 +844,7 @@ public:
void FormatFullDoc();
void UpdateViews( EditView* pCurView = nullptr );
void Paint( ImpEditView* pView, const tools::Rectangle& rRect, OutputDevice* pTargetDevice );
- void Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Point aStartPos, bool bStripOnly = false, Degree10 nOrientation = 0_deg10 );
+ void Paint(OutputDevice& rOutDev, tools::Rectangle aClipRect, Point aStartPos, bool bStripOnly = false, Degree10 nOrientation = 0_deg10);
bool MouseButtonUp( const MouseEvent& rMouseEvent, EditView* pView );
bool MouseButtonDown( const MouseEvent& rMouseEvent, EditView* pView );
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index ee9c0bb1a202..efc0e30ea90b 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -150,7 +150,7 @@ AsianCompressionFlags GetCharTypeForCompression( sal_Unicode cChar )
}
}
-static void lcl_DrawRedLines( OutputDevice* pOutDev,
+static void lcl_DrawRedLines( OutputDevice& rOutDev,
tools::Long nFontHeight,
const Point& rPoint,
size_t nIndex,
@@ -163,7 +163,7 @@ static void lcl_DrawRedLines( OutputDevice* pOutDev,
bool bIsRightToLeft )
{
// But only if font is not too small...
- tools::Long nHeight = pOutDev->LogicToPixel(Size(0, nFontHeight)).Height();
+ tools::Long nHeight = rOutDev.LogicToPixel(Size(0, nFontHeight)).Height();
if (WRONG_SHOW_MIN >= nHeight)
return;
@@ -186,7 +186,7 @@ static void lcl_DrawRedLines( OutputDevice* pOutDev,
{
// VCL doesn't know that the text is vertical, and is manipulating
// the positions a little bit in y direction...
- tools::Long nOnePixel = pOutDev->PixelToLogic(Size(0, 1)).Height();
+ tools::Long nOnePixel = rOutDev.PixelToLogic(Size(0, 1)).Height();
tools::Long nCorrect = 2 * nOnePixel;
aPoint1.AdjustY(-nCorrect);
aPoint1.AdjustX(-nCorrect);
@@ -224,8 +224,8 @@ static void lcl_DrawRedLines( OutputDevice* pOutDev,
}
{
- vcl::ScopedAntialiasing a(*pOutDev, true);
- pOutDev->DrawWaveLine(aPoint1, aPoint2);
+ vcl::ScopedAntialiasing a(rOutDev, true);
+ rOutDev.DrawWaveLine(aPoint1, aPoint2);
}
nStart = nEnd + 1;
@@ -3029,7 +3029,7 @@ bool ImpEditEngine::isXOverflowDirectionAware(const Point& pt, const tools::Rect
return pt.Y() < rectMax.Top();
}
-void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Point aStartPos, bool bStripOnly, Degree10 nOrientation )
+void ImpEditEngine::Paint( OutputDevice& rOutDev, tools::Rectangle aClipRect, Point aStartPos, bool bStripOnly, Degree10 nOrientation )
{
if ( !GetUpdateMode() && !bStripOnly )
return;
@@ -3037,12 +3037,12 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
if ( !IsFormatted() )
FormatDoc();
- tools::Long nFirstVisXPos = - pOutDev->GetMapMode().GetOrigin().X();
- tools::Long nFirstVisYPos = - pOutDev->GetMapMode().GetOrigin().Y();
+ tools::Long nFirstVisXPos = - rOutDev.GetMapMode().GetOrigin().X();
+ tools::Long nFirstVisYPos = - rOutDev.GetMapMode().GetOrigin().Y();
DBG_ASSERT( GetParaPortions().Count(), "No ParaPortion?!" );
SvxFont aTmpFont( GetParaPortions()[0].GetNode()->GetCharAttribs().GetDefFont() );
- vcl::PDFExtOutDevData* const pPDFExtOutDevData = dynamic_cast< vcl::PDFExtOutDevData* >( pOutDev->GetExtOutDevData() );
+ vcl::PDFExtOutDevData* const pPDFExtOutDevData = dynamic_cast< vcl::PDFExtOutDevData* >( rOutDev.GetExtOutDevData() );
// In the case of rotated text is aStartPos considered TopLeft because
// other information is missing, and since the whole object is shown anyway
@@ -3059,7 +3059,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
// #110496# Added some more optional metafile comments. This
// change: factored out some duplicated code.
- GDIMetaFile* pMtf = pOutDev->GetConnectMetaFile();
+ GDIMetaFile* pMtf = rOutDev.GetConnectMetaFile();
const bool bMetafileValid( pMtf != nullptr );
const tools::Long nVertLineSpacing = CalcVertLineSpacing(aStartPos);
@@ -3127,7 +3127,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
// does, too. No change for not-layouting (painting).
if(0 == nLine) // && !bStripOnly)
{
- GetEditEnginePtr()->PaintingFirstLine( n, aParaStart, aTmpPos.Y(), aOrigin, nOrientation, pOutDev );
+ GetEditEnginePtr()->PaintingFirstLine(n, aParaStart, aTmpPos.Y(), aOrigin, nOrientation, rOutDev);
// Remember whether a bullet was painted.
const SfxBoolItem& rBulletState = pEditEngine->GetParaAttrib(n, EE_PARA_BULLETSTATE);
@@ -3157,17 +3157,17 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
case PortionKind::FIELD:
case PortionKind::HYPHENATOR:
{
- SeekCursor( rPortion.GetNode(), nIndex+1, aTmpFont, pOutDev );
+ SeekCursor( rPortion.GetNode(), nIndex+1, aTmpFont, &rOutDev );
bool bDrawFrame = false;
if ( ( rTextPortion.GetKind() == PortionKind::FIELD ) && !aTmpFont.IsTransparent() &&
( GetBackgroundColor() != COL_AUTO ) && GetBackgroundColor().IsDark() &&
- ( IsAutoColorEnabled() && ( pOutDev->GetOutDevType() != OUTDEV_PRINTER ) ) )
+ ( IsAutoColorEnabled() && ( rOutDev.GetOutDevType() != OUTDEV_PRINTER ) ) )
{
aTmpFont.SetTransparent( true );
- pOutDev->SetFillColor();
- pOutDev->SetLineColor( GetAutoColor() );
+ rOutDev.SetFillColor();
+ rOutDev.SetLineColor( GetAutoColor() );
bDrawFrame = true;
}
@@ -3189,13 +3189,13 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
aTmpFont.SetTransparent( sal_False );
}
#endif
- aTmpFont.SetPhysFont( pOutDev );
+ aTmpFont.SetPhysFont( &rOutDev );
// #114278# Saving both layout mode and language (since I'm
// potentially changing both)
- pOutDev->Push( PushFlags::TEXTLAYOUTMODE|PushFlags::TEXTLANGUAGE );
- ImplInitLayoutMode( pOutDev, n, nIndex );
- ImplInitDigitMode(pOutDev, aTmpFont.GetLanguage());
+ rOutDev.Push( PushFlags::TEXTLAYOUTMODE|PushFlags::TEXTLANGUAGE );
+ ImplInitLayoutMode( &rOutDev, n, nIndex );
+ ImplInitDigitMode(&rOutDev, aTmpFont.GetLanguage());
OUString aText;
sal_Int32 nTextStart = 0;
@@ -3229,7 +3229,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
if ( 0x200B == cChar || 0x2060 == cChar )
{
- tools::Long nHalfBlankWidth = aTmpFont.QuickGetTextSize( pOutDev, " ", 0, 1 ).Width() / 2;
+ tools::Long nHalfBlankWidth = aTmpFont.QuickGetTextSize( &rOutDev, " ", 0, 1 ).Width() / 2;
const tools::Long nAdvanceX = ( nTmpIdx == nTmpEnd ?
rTextPortion.GetSize().Width() :
@@ -3244,16 +3244,16 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
adjustXDirectionAware(aBottomRightRectPos, 2 * nHalfBlankWidth);
adjustYDirectionAware(aBottomRightRectPos, pLine->GetHeight());
- pOutDev->Push( PushFlags::FILLCOLOR );
- pOutDev->Push( PushFlags::LINECOLOR );
- pOutDev->SetFillColor( COL_LIGHTGRAY );
- pOutDev->SetLineColor( COL_LIGHTGRAY );
+ rOutDev.Push( PushFlags::FILLCOLOR );
+ rOutDev.Push( PushFlags::LINECOLOR );
+ rOutDev.SetFillColor( COL_LIGHTGRAY );
+ rOutDev.SetLineColor( COL_LIGHTGRAY );
const tools::Rectangle aBackRect( aTopLeftRectPos, aBottomRightRectPos );
- pOutDev->DrawRect( aBackRect );
+ rOutDev.DrawRect( aBackRect );
- pOutDev->Pop();
- pOutDev->Pop();
+ rOutDev.Pop();
+ rOutDev.Pop();
if ( 0x200B == cChar )
{
@@ -3263,19 +3263,19 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
aTmpFont.SetEscapement( -20 );
aTmpFont.SetPropr( 25 );
- aTmpFont.SetPhysFont( pOutDev );
+ aTmpFont.SetPhysFont( &rOutDev );
- const Size aSlashSize = aTmpFont.QuickGetTextSize( pOutDev, aSlash, 0, 1 );
+ const Size aSlashSize = aTmpFont.QuickGetTextSize( &rOutDev, aSlash, 0, 1 );
Point aSlashPos( aTmpPos );
const tools::Long nAddX = nHalfBlankWidth - aSlashSize.Width() / 2;
setXDirectionAware(aSlashPos, getXDirectionAware(aTopLeftRectPos));
adjustXDirectionAware(aSlashPos, nAddX);
- aTmpFont.QuickDrawText( pOutDev, aSlashPos, aSlash, 0, 1 );
+ aTmpFont.QuickDrawText( &rOutDev, aSlashPos, aSlash, 0, 1 );
aTmpFont.SetEscapement( nOldEscapement );
aTmpFont.SetPropr( nOldPropr );
- aTmpFont.SetPhysFont( pOutDev );
+ aTmpFont.SetPhysFont( &rOutDev );
}
}
}
@@ -3445,12 +3445,12 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
const bool bEndOfParagraph(bEndOfLine && nLine + 1 == nLines);
// get Overline color (from ((const SvxOverlineItem*)GetItem())->GetColor() in
- // consequence, but also already set at pOutDev)
- const Color aOverlineColor(pOutDev->GetOverlineColor());
+ // consequence, but also already set at rOutDev)
+ const Color aOverlineColor(rOutDev.GetOverlineColor());
// get TextLine color (from ((const SvxUnderlineItem*)GetItem())->GetColor() in
- // consequence, but also already set at pOutDev)
- const Color aTextLineColor(pOutDev->GetTextLineColor());
+ // consequence, but also already set at rOutDev)
+ const Color aTextLineColor(rOutDev.GetTextLineColor());
// Unicode code points conversion according to ctl text numeral setting
aText = convertDigits(aText, nTextStart, nTextLen,
@@ -3488,7 +3488,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
aOutPos = lcl_ImplCalcRotatedPos( aOutPos, aOrigin, nSin, nCos );
aTmpFont.SetOrientation( aTmpFont.GetOrientation()+nOrientation );
- aTmpFont.SetPhysFont( pOutDev );
+ aTmpFont.SetPhysFont( &rOutDev );
}
@@ -3525,23 +3525,23 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
}
if ( bSpecialUnderline )
{
- Size aSz = aTmpFont.GetPhysTxtSize( pOutDev, aText, nTextStart, nTextLen );
+ Size aSz = aTmpFont.GetPhysTxtSize( &rOutDev, aText, nTextStart, nTextLen );
sal_uInt8 nProp = aTmpFont.GetPropr();
aTmpFont.SetEscapement( 0 );
aTmpFont.SetPropr( 100 );
- aTmpFont.SetPhysFont( pOutDev );
+ aTmpFont.SetPhysFont( &rOutDev );
OUStringBuffer aBlanks;
comphelper::string::padToLength( aBlanks, nTextLen, ' ' );
Point aUnderlinePos( aOutPos );
if ( nOrientation )
aUnderlinePos = lcl_ImplCalcRotatedPos( aTmpPos, aOrigin, nSin, nCos );
- pOutDev->DrawStretchText( aUnderlinePos, aSz.Width(), aBlanks.makeStringAndClear(), 0, nTextLen );
+ rOutDev.DrawStretchText( aUnderlinePos, aSz.Width(), aBlanks.makeStringAndClear(), 0, nTextLen );
aTmpFont.SetUnderline( LINESTYLE_NONE );
if ( !nOrientation )
aTmpFont.SetEscapement( nEsc );
aTmpFont.SetPropr( nProp );
- aTmpFont.SetPhysFont( pOutDev );
+ aTmpFont.SetPhysFont( &rOutDev );
}
}
Point aRealOutPos( aOutPos );
@@ -3561,7 +3561,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
--nTextLen;
// output directly
- aTmpFont.QuickDrawText( pOutDev, aRealOutPos, aText, nTextStart, nTextLen, pDXArray );
+ aTmpFont.QuickDrawText( &rOutDev, aRealOutPos, aText, nTextStart, nTextLen, pDXArray );
if ( bDrawFrame )
{
@@ -3570,7 +3570,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
if ( nOrientation )
aTopLeft = lcl_ImplCalcRotatedPos( aTopLeft, aOrigin, nSin, nCos );
tools::Rectangle aRect( aTopLeft, rTextPortion.GetSize() );
- pOutDev->DrawRect( aRect );
+ rOutDev.DrawRect( aRect );
}
// PDF export:
@@ -3611,14 +3611,14 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
adjustYDirectionAware(aRedLineTmpPos, -nShift);
}
}
- Color aOldColor( pOutDev->GetLineColor() );
- pOutDev->SetLineColor( GetColorConfig().GetColorValue( svtools::SPELL ).nColor );
- lcl_DrawRedLines( pOutDev, aTmpFont.GetFontSize().Height(), aRedLineTmpPos, static_cast<size_t>(nIndex), static_cast<size_t>(nIndex) + rTextPortion.GetLen(), pDXArray, rPortion.GetNode()->GetWrongList(), nOrientation, aOrigin, IsVertical(), rTextPortion.IsRightToLeft() );
- pOutDev->SetLineColor( aOldColor );
+ Color aOldColor( rOutDev.GetLineColor() );
+ rOutDev.SetLineColor( GetColorConfig().GetColorValue( svtools::SPELL ).nColor );
+ lcl_DrawRedLines( rOutDev, aTmpFont.GetFontSize().Height(), aRedLineTmpPos, static_cast<size_t>(nIndex), static_cast<size_t>(nIndex) + rTextPortion.GetLen(), pDXArray, rPortion.GetNode()->GetWrongList(), nOrientation, aOrigin, IsVertical(), rTextPortion.IsRightToLeft() );
+ rOutDev.SetLineColor( aOldColor );
}
}
- pOutDev->Pop();
+ rOutDev.Pop();
pTmpDXArray.reset();
@@ -3649,11 +3649,11 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
{
if ( rTextPortion.GetExtraValue() && ( rTextPortion.GetExtraValue() != ' ' ) )
{
- SeekCursor( rPortion.GetNode(), nIndex+1, aTmpFont, pOutDev );
+ SeekCursor( rPortion.GetNode(), nIndex+1, aTmpFont, &rOutDev );
aTmpFont.SetTransparent( false );
aTmpFont.SetEscapement( 0 );
- aTmpFont.SetPhysFont( pOutDev );
- tools::Long nCharWidth = aTmpFont.QuickGetTextSize( pOutDev,
+ aTmpFont.SetPhysFont( &rOutDev );
+ tools::Long nCharWidth = aTmpFont.QuickGetTextSize( &rOutDev,
OUString(rTextPortion.GetExtraValue()), 0, 1 ).Width();
sal_Int32 nChars = 2;
if( nCharWidth )
@@ -3666,8 +3666,8 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
OUStringBuffer aBuf;
comphelper::string::padToLength(aBuf, nChars, rTextPortion.GetExtraValue());
OUString aText(aBuf.makeStringAndClear());
- aTmpFont.QuickDrawText( pOutDev, aTmpPos, aText, 0, aText.getLength() );
- pOutDev->DrawStretchText( aTmpPos, rTextPortion.GetSize().Width(), aText );
+ aTmpFont.QuickDrawText( &rOutDev, aTmpPos, aText, 0, aText.getLength() );
+ rOutDev.DrawStretchText( aTmpPos, rTextPortion.GetSize().Width(), aText );
if ( bStripOnly )
{
@@ -3675,8 +3675,8 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
const bool bEndOfLine(nPortion == pLine->GetEndPortion());
const bool bEndOfParagraph(bEndOfLine && nLine + 1 == nLines);
- const Color aOverlineColor(pOutDev->GetOverlineColor());
- const Color aTextLineColor(pOutDev->GetTextLineColor());
+ const Color aOverlineColor(rOutDev.GetOverlineColor());
+ const Color aTextLineColor(rOutDev.GetTextLineColor());
// StripPortions() data callback
GetEditEnginePtr()->DrawingTab( aTmpPos,
@@ -3695,8 +3695,8 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
const bool bEndOfLine(nPortion == pLine->GetEndPortion());
const bool bEndOfParagraph(bEndOfLine && nLine + 1 == nLines);
- const Color aOverlineColor(pOutDev->GetOverlineColor());
- const Color aTextLineColor(pOutDev->GetTextLineColor());
+ const Color aOverlineColor(rOutDev.GetOverlineColor());
+ const Color aTextLineColor(rOutDev.GetTextLineColor());
GetEditEnginePtr()->DrawingText(
aTmpPos, OUString(), 0, 0, nullptr,
@@ -3744,8 +3744,8 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
// changes in EditEngine behaviour.
if(!bEndOfParagraphWritten && !bPaintBullet && bStripOnly)
{
- const Color aOverlineColor(pOutDev->GetOverlineColor());
- const Color aTextLineColor(pOutDev->GetTextLineColor());
+ const Color aOverlineColor(rOutDev.GetOverlineColor());
+ const Color aTextLineColor(rOutDev.GetTextLineColor());
GetEditEnginePtr()->DrawingText(
aTmpPos, OUString(), 0, 0, nullptr,
@@ -3815,7 +3815,7 @@ void ImpEditEngine::Paint( ImpEditView* pView, const tools::Rectangle& rRect, Ou
vcl::Region aOldRegion = rTarget.GetClipRegion();
rTarget.IntersectClipRegion( aClipRect );
- Paint( &rTarget, aClipRect, aStartPos );
+ Paint(rTarget, aClipRect, aStartPos);
if ( bClipRegion )
rTarget.SetClipRegion( aOldRegion );
diff --git a/editeng/source/outliner/outleeng.cxx b/editeng/source/outliner/outleeng.cxx
index 116fec186fc3..b166c71831ba 100644
--- a/editeng/source/outliner/outleeng.cxx
+++ b/editeng/source/outliner/outleeng.cxx
@@ -38,15 +38,15 @@ OutlinerEditEng::~OutlinerEditEng()
{
}
-void OutlinerEditEng::PaintingFirstLine( sal_Int32 nPara, const Point& rStartPos, tools::Long /*nBaseLineY*/, const Point& rOrigin, Degree10 nOrientation, OutputDevice* pOutDev )
+void OutlinerEditEng::PaintingFirstLine(sal_Int32 nPara, const Point& rStartPos, tools::Long /*nBaseLineY*/, const Point& rOrigin, Degree10 nOrientation, OutputDevice& rOutDev)
{
if( GetControlWord() & EEControlBits::OUTLINER )
{
- PaintFirstLineInfo aInfo( nPara, rStartPos, pOutDev );
+ PaintFirstLineInfo aInfo(nPara, rStartPos, &rOutDev);
pOwner->maPaintFirstLineHdl.Call( &aInfo );
}
- pOwner->PaintBullet( nPara, rStartPos, rOrigin, nOrientation, pOutDev );
+ pOwner->PaintBullet(nPara, rStartPos, rOrigin, nOrientation, rOutDev);
}
const SvxNumberFormat* OutlinerEditEng::GetNumberFormat( sal_Int32 nPara ) const
diff --git a/editeng/source/outliner/outleeng.hxx b/editeng/source/outliner/outleeng.hxx
index fa6ae0da381b..9759ce851f12 100644
--- a/editeng/source/outliner/outleeng.hxx
+++ b/editeng/source/outliner/outleeng.hxx
@@ -37,7 +37,7 @@ public:
OutlinerEditEng( Outliner* pOwner, SfxItemPool* pPool );
virtual ~OutlinerEditEng() override;
- virtual void PaintingFirstLine( sal_Int32 nPara, const Point& rStartPos, tools::Long nBaseLineY, const Point& rOrigin, Degree10 nOrientation, OutputDevice* pOutDev ) override;
+ virtual void PaintingFirstLine(sal_Int32 nPara, const Point& rStartPos, tools::Long nBaseLineY, const Point& rOrigin, Degree10 nOrientation, OutputDevice& rOutDev) override;
virtual void ParagraphInserted( sal_Int32 nNewParagraph ) override;
virtual void ParagraphDeleted( sal_Int32 nDeletedParagraph ) override;
diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx
index b00878c874a0..1acab5ba4d48 100644
--- a/editeng/source/outliner/outlin2.cxx
+++ b/editeng/source/outliner/outlin2.cxx
@@ -168,14 +168,14 @@ OUString Outliner::GetWord( sal_Int32 nPara, sal_Int32 nIndex )
return pEditEngine->GetWord( nPara, nIndex );
}
-void Outliner::Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect )
+void Outliner::Draw( OutputDevice& rOutDev, const tools::Rectangle& rOutRect )
{
- pEditEngine->Draw( pOutDev, rOutRect );
+ pEditEngine->Draw( rOutDev, rOutRect );
}
-void Outliner::Draw( OutputDevice* pOutDev, const Point& rStartPos )
+void Outliner::Draw( OutputDevice& rOutDev, const Point& rStartPos )
{
- pEditEngine->Draw( pOutDev, rStartPos );
+ pEditEngine->Draw( rOutDev, rStartPos );
}
void Outliner::SetPaperSize( const Size& rSize )
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index de072f8c96c0..8c74fe883345 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -879,8 +879,8 @@ vcl::Font Outliner::ImpCalcBulletFont( sal_Int32 nPara ) const
return aBulletFont;
}
-void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
- const Point& rOrigin, Degree10 nOrientation, OutputDevice* pOutDev )
+void Outliner::PaintBullet(sal_Int32 nPara, const Point& rStartPos, const Point& rOrigin,
+ Degree10 nOrientation, OutputDevice& rOutDev)
{
bool bDrawBullet = false;
@@ -916,8 +916,8 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
// Use baseline
bool bSymbol = pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL;
aBulletFont.SetAlignment( bSymbol ? ALIGN_BOTTOM : ALIGN_BASELINE );
- vcl::Font aOldFont = pOutDev->GetFont();
- pOutDev->SetFont( aBulletFont );
+ vcl::Font aOldFont = rOutDev.GetFont();
+ rOutDev.SetFont( aBulletFont );
ParagraphInfos aParaInfos = pEditEngine->GetParagraphInfos( nPara );
Point aTextPos;
@@ -963,26 +963,26 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
aTextPos += rOrigin;
vcl::Font aRotatedFont( aBulletFont );
aRotatedFont.SetOrientation( nOrientation );
- pOutDev->SetFont( aRotatedFont );
+ rOutDev.SetFont( aRotatedFont );
}
// VCL will take care of brackets and so on...
- ComplexTextLayoutFlags nLayoutMode = pOutDev->GetLayoutMode();
+ ComplexTextLayoutFlags nLayoutMode = rOutDev.GetLayoutMode();
nLayoutMode &= ~ComplexTextLayoutFlags(ComplexTextLayoutFlags::BiDiRtl|ComplexTextLayoutFlags::BiDiStrong);
if ( bRightToLeftPara )
nLayoutMode |= ComplexTextLayoutFlags::BiDiRtl | ComplexTextLayoutFlags::TextOriginLeft | ComplexTextLayoutFlags::BiDiStrong;
- pOutDev->SetLayoutMode( nLayoutMode );
+ rOutDev.SetLayoutMode( nLayoutMode );
if(bStrippingPortions)
{
- const vcl::Font& aSvxFont(pOutDev->GetFont());
+ const vcl::Font& aSvxFont(rOutDev.GetFont());
std::unique_ptr<tools::Long[]> pBuf(new tools::Long[ pPara->GetText().getLength() ]);
- pOutDev->GetTextArray( pPara->GetText(), pBuf.get() );
+ rOutDev.GetTextArray( pPara->GetText(), pBuf.get() );
if(bSymbol)
{
// aTextPos is Bottom, go to Baseline
- FontMetric aMetric(pOutDev->GetFontMetric());
+ FontMetric aMetric(rOutDev.GetFontMetric());
aTextPos.AdjustY( -(aMetric.GetDescent()) );
}
@@ -991,10 +991,10 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
}
else
{
- pOutDev->DrawText( aTextPos, pPara->GetText() );
+ rOutDev.DrawText( aTextPos, pPara->GetText() );
}
- pOutDev->SetFont( aOldFont );
+ rOutDev.SetFont( aOldFont );
}
else
{
@@ -1042,7 +1042,7 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
else
{
// Remove CAST when KA made the Draw-Method const
- const_cast<GraphicObject*>(pFmt->GetBrush()->GetGraphicObject())->Draw( pOutDev, aBulletPos, pPara->aBulSize );
+ const_cast<GraphicObject*>(pFmt->GetBrush()->GetGraphicObject())->Draw(rOutDev, aBulletPos, pPara->aBulSize);
}
}
}
@@ -1053,7 +1053,7 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
bStrippingPortions || nOrientation )
return;
- tools::Long nWidth = pOutDev->PixelToLogic( Size( 10, 0 ) ).Width();
+ tools::Long nWidth = rOutDev.PixelToLogic( Size( 10, 0 ) ).Width();
Point aStartPos, aEndPos;
if ( !bVertical )
@@ -1074,10 +1074,10 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
aEndPos.AdjustY(nWidth );
}
- const Color& rOldLineColor = pOutDev->GetLineColor();
- pOutDev->SetLineColor( COL_BLACK );
- pOutDev->DrawLine( aStartPos, aEndPos );
- pOutDev->SetLineColor( rOldLineColor );
+ const Color& rOldLineColor = rOutDev.GetLineColor();
+ rOutDev.SetLineColor( COL_BLACK );
+ rOutDev.DrawLine( aStartPos, aEndPos );
+ rOutDev.SetLineColor( rOldLineColor );
}
void Outliner::InvalidateBullet(sal_Int32 nPara)