[Libreoffice-commits] core.git: basic/source chart2/source toolkit/source tools/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Wed Apr 17 16:57:13 UTC 2019
basic/source/classes/sbunoobj.cxx | 2 +-
chart2/source/controller/main/ChartController_Tools.cxx | 2 +-
toolkit/source/controls/dialogcontrol.cxx | 2 +-
tools/source/generic/b3dtrans.cxx | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 0e335af4d3f044511551fa2ede20911beaee9b41
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Apr 17 14:00:30 2019 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Apr 17 18:56:04 2019 +0200
Fix uses of variables before their lifetimes begin
All of those have been broken with recent loplugin:sequentialassign changes (and
have been found with a new plugin to be commited).
The code in SbUnoClass::Find (basic/source/classes/sbunoobj.cxx) looks
suspicious, but has been effectively like that ever since at least
c25ec0608a167bcf1d891043f02273761c351701 "initial import", so just marked it
with a TODO comment for now.
Change-Id: I0d691cb55ef317cf2b16b0490169de7ec97375cf
Reviewed-on: https://gerrit.libreoffice.org/70874
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 3e150ebf0307..0ece9c2d24ea 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -3328,7 +3328,7 @@ SbxVariable* SbUnoClass::Find( const OUString& rName, SbxClassType )
{
try
{
- Any aAny = xField->get( aAny );
+ Any aAny = xField->get( {} ); //TODO: does this make sense?
// Convert to Sbx
pRes = new SbxVariable( SbxVARIANT );
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index ff44fc36f224..f22a24f66cbf 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -255,7 +255,7 @@ void ChartController::executeDispatch_Paste()
{
Graphic aGraphic;
// paste location: center of window
- Point aPos = pChartWindow->PixelToLogic( tools::Rectangle( aPos, pChartWindow->GetSizePixel()).Center());
+ Point aPos = pChartWindow->PixelToLogic( tools::Rectangle( {}, pChartWindow->GetSizePixel()).Center());
// handle different formats
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pChartWindow ));
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index cb8b45afda8d..a2fc60f9c8e0 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -1054,7 +1054,7 @@ void UnoFrameControl::ImplSetPosSize( Reference< XControl >& rxCtrl )
if ( pOutDev )
{
// Adjust Y based on height of Title
- ::tools::Rectangle aRect = pOutDev->GetTextRect( aRect, sTitle );
+ ::tools::Rectangle aRect = pOutDev->GetTextRect( {}, sTitle );
nY = nY + ( aRect.GetHeight() / 2 );
}
else
diff --git a/tools/source/generic/b3dtrans.cxx b/tools/source/generic/b3dtrans.cxx
index 1c3a420cbaf7..a896e9f1b7df 100644
--- a/tools/source/generic/b3dtrans.cxx
+++ b/tools/source/generic/b3dtrans.cxx
@@ -449,7 +449,7 @@ void B3dCamera::CalcFocalLength()
double fWidth = GetDeviceRectangleWidth();
// Adjust focal length based on given position
- basegfx::B3DPoint aOldPosition = WorldToEyeCoor(aOldPosition);
+ basegfx::B3DPoint aOldPosition = WorldToEyeCoor({});
if(fWidth != 0.0)
fFocalLength = aOldPosition.getZ() / fWidth * 35.0;
if(fFocalLength < 5.0)
More information about the Libreoffice-commits
mailing list