summaryrefslogtreecommitdiff
path: root/canvas/source/opengl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-11-08 11:32:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-11-08 13:23:57 +0100
commitb61e0f2b53448debace84083550be228da06c1a6 (patch)
tree43fedc1a5da43aa1a1d19e5f5c8e8e467d3d6e50 /canvas/source/opengl
parentdf439565c81967872366c40a0d6a17361efea6ec (diff)
loplugin:reftotemp in canvas
Change-Id: I0a038cf32e05dab59b1cedcf06ecd38b48d76feb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176257 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'canvas/source/opengl')
-rw-r--r--canvas/source/opengl/ogl_canvashelper.cxx36
-rw-r--r--canvas/source/opengl/ogl_canvastools.cxx6
-rw-r--r--canvas/source/opengl/ogl_spritedevicehelper.cxx8
-rw-r--r--canvas/source/opengl/ogl_textlayout.cxx6
4 files changed, 28 insertions, 28 deletions
diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx
index a4ab0738e65d..114f98be1903 100644
--- a/canvas/source/opengl/ogl_canvashelper.cxx
+++ b/canvas/source/opengl/ogl_canvashelper.cxx
@@ -559,12 +559,12 @@ namespace oglcanvas
{
// copy state from Gradient polypoly locally
// (given object might change!)
- const ::canvas::ParametricPolyPolygon::Values& rValues(
+ const ::canvas::ParametricPolyPolygon::Values aValues(
pGradient->getValues() );
rAct.maFunction = std::bind(&lcl_fillGradientPolyPolygon,
std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4,
- rValues,
+ aValues,
textures[0],
std::placeholders::_6);
}
@@ -681,22 +681,22 @@ namespace oglcanvas
auto pLayoutFont = xLayoutetText->getFont();
CanvasFont* pFont=dynamic_cast<CanvasFont*>(pLayoutFont.get());
- const rendering::StringContext& rTxt=xLayoutetText->getText();
- if( pFont && rTxt.Length )
+ const rendering::StringContext aTxt=xLayoutetText->getText();
+ if( pFont && aTxt.Length )
{
// create the font
- const rendering::FontRequest& rFontRequest = pFont->getFontRequest();
+ const rendering::FontRequest aFontRequest = pFont->getFontRequest();
const geometry::Matrix2D& rFontMatrix = pFont->getFontMatrix();
vcl::Font aFont(
- rFontRequest.FontDescription.FamilyName,
- rFontRequest.FontDescription.StyleName,
- Size( 0, ::basegfx::fround<tools::Long>(rFontRequest.CellSize)));
+ aFontRequest.FontDescription.FamilyName,
+ aFontRequest.FontDescription.StyleName,
+ Size( 0, ::basegfx::fround<tools::Long>(aFontRequest.CellSize)));
aFont.SetAlignment( ALIGN_BASELINE );
- aFont.SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
- aFont.SetVertical( rFontRequest.FontDescription.IsVertical==util::TriState_YES );
- aFont.SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
- aFont.SetItalic( (rFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL );
+ aFont.SetCharSet( (aFontRequest.FontDescription.IsSymbolFont==util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
+ aFont.SetVertical( aFontRequest.FontDescription.IsVertical==util::TriState_YES );
+ aFont.SetWeight( static_cast<FontWeight>(aFontRequest.FontDescription.FontDescription.Weight) );
+ aFont.SetItalic( (aFontRequest.FontDescription.FontDescription.Letterform<=8) ? ITALIC_NONE : ITALIC_NORMAL );
if (pFont->getEmphasisMark())
aFont.SetEmphasisMark(FontEmphasisMark(pFont->getEmphasisMark()));
@@ -735,10 +735,10 @@ namespace oglcanvas
// get the glyphs
pVDev->GetTextOutlines(rAct.maPolyPolys,
- rTxt.Text,
+ aTxt.Text,
0,
- rTxt.StartPosition,
- rTxt.Length,
+ aTxt.StartPosition,
+ aTxt.Length,
0,
aDXArray,
aKashidaArray);
@@ -747,10 +747,10 @@ namespace oglcanvas
{
// get the glyphs
pVDev->GetTextOutlines(rAct.maPolyPolys,
- rTxt.Text,
+ aTxt.Text,
0,
- rTxt.StartPosition,
- rTxt.Length );
+ aTxt.StartPosition,
+ aTxt.Length );
}
// own copy, for thread safety
diff --git a/canvas/source/opengl/ogl_canvastools.cxx b/canvas/source/opengl/ogl_canvastools.cxx
index 97e7377c0a60..57aa686072b0 100644
--- a/canvas/source/opengl/ogl_canvastools.cxx
+++ b/canvas/source/opengl/ogl_canvastools.cxx
@@ -29,9 +29,9 @@ namespace oglcanvas
::basegfx::B2DPolyPolygon aPolyPoly(rPolyPoly);
if( aPolyPoly.areControlPointsUsed() )
aPolyPoly = rPolyPoly.getDefaultAdaptiveSubdivision();
- const ::basegfx::B2DRange& rBounds(aPolyPoly.getB2DRange());
- const double nWidth=rBounds.getWidth();
- const double nHeight=rBounds.getHeight();
+ const ::basegfx::B2DRange aBounds(aPolyPoly.getB2DRange());
+ const double nWidth=aBounds.getWidth();
+ const double nHeight=aBounds.getHeight();
const ::basegfx::triangulator::B2DTriangleVector rTriangulatedPolygon(
::basegfx::triangulator::triangulate(aPolyPoly));
diff --git a/canvas/source/opengl/ogl_spritedevicehelper.cxx b/canvas/source/opengl/ogl_spritedevicehelper.cxx
index 7c0088e5b992..571764986fca 100644
--- a/canvas/source/opengl/ogl_spritedevicehelper.cxx
+++ b/canvas/source/opengl/ogl_spritedevicehelper.cxx
@@ -270,8 +270,8 @@ namespace oglcanvas
mxContext->makeCurrent();
SystemChildWindow* pChildWindow = mxContext->getChildWindow();
- const ::Size& rOutputSize = pChildWindow->GetSizePixel();
- initTransformation(rOutputSize);
+ const ::Size aOutputSize = pChildWindow->GetSizePixel();
+ initTransformation(aOutputSize);
// render the actual spritecanvas content
mpSpriteCanvas->renderRecordedActions();
@@ -291,8 +291,8 @@ namespace oglcanvas
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslated(-1.0, 1.0, 0.0);
- glScaled( 2.0 / rOutputSize.Width(),
- -2.0 / rOutputSize.Height(),
+ glScaled( 2.0 / aOutputSize.Width(),
+ -2.0 / aOutputSize.Height(),
1.0 );
const double denominator( maLastUpdate.getElapsedTime() );
diff --git a/canvas/source/opengl/ogl_textlayout.cxx b/canvas/source/opengl/ogl_textlayout.cxx
index 5baf7eb794cb..1bcf1a9fbaf7 100644
--- a/canvas/source/opengl/ogl_textlayout.cxx
+++ b/canvas/source/opengl/ogl_textlayout.cxx
@@ -102,9 +102,9 @@ namespace oglcanvas
// fake text bounds by either taking the advancement values,
// or assuming square glyph boxes (width similar to height)
- const rendering::FontRequest& rFontRequest( mpFont->getFontRequest() );
- const double nFontSize( std::max( rFontRequest.CellSize,
- rFontRequest.ReferenceAdvancement ) );
+ const rendering::FontRequest aFontRequest( mpFont->getFontRequest() );
+ const double nFontSize( std::max( aFontRequest.CellSize,
+ aFontRequest.ReferenceAdvancement ) );
if( maLogicalAdvancements.hasElements() )
{
return geometry::RealRectangle2D( 0, -nFontSize/2,