summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-16 10:41:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-21 12:44:55 +0100
commit2dbd02b576f28224204ac962f6ce20fde6687093 (patch)
tree28b3f8807d5909e7bcc3c5a629dadd6f475ad9d3
parent48314f25241e014a634dd5371543b90137ffd2bc (diff)
loplugin:redundantfcast improvements
check for calls to constructors, and extend the list of types we check for unnecessary temporary creation Change-Id: Ia2c1f202b41ed6866779fff5343c821128033eec Reviewed-on: https://gerrit.libreoffice.org/63472 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--basctl/source/basicide/breakpoint.cxx2
-rw-r--r--canvas/source/vcl/canvashelper.cxx2
-rw-r--r--canvas/source/vcl/spritehelper.cxx2
-rw-r--r--chart2/qa/extras/chart2export.cxx2
-rw-r--r--chart2/qa/extras/chart2import.cxx2
-rw-r--r--chart2/source/controller/main/PositionAndSizeHelper.cxx2
-rw-r--r--chart2/source/view/charttypes/AreaChart.cxx4
-rw-r--r--chart2/source/view/charttypes/NetChart.cxx8
-rw-r--r--chart2/source/view/diagram/VDiagram.cxx8
-rw-r--r--chart2/source/view/main/ChartView.cxx2
-rw-r--r--comphelper/qa/unit/base64_test.cxx6
-rw-r--r--compilerplugins/clang/redundantfcast.cxx89
-rw-r--r--compilerplugins/clang/test/redundantfcast.cxx23
-rw-r--r--cppcanvas/source/mtfrenderer/emfplus.cxx6
-rw-r--r--cui/source/dialogs/cuicharmap.cxx2
-rw-r--r--dbaccess/source/sdbtools/connection/connectiontools.cxx2
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx50
-rw-r--r--drawinglayer/source/primitive2d/controlprimitive2d.cxx2
-rw-r--r--drawinglayer/source/tools/emfphelperdata.cxx6
-rw-r--r--drawinglayer/source/tools/emfpregion.cxx3
-rw-r--r--drawinglayer/source/tools/wmfemfhelper.cxx11
-rw-r--r--editeng/inc/editdoc.hxx4
-rw-r--r--editeng/source/editeng/editdoc.cxx4
-rw-r--r--editeng/source/editeng/impedit2.cxx2
-rw-r--r--extensions/source/logging/csvformatter.cxx2
-rw-r--r--extensions/source/propctrlr/fontdialog.cxx2
-rw-r--r--filter/source/flash/swfwriter1.cxx4
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx2
-rw-r--r--filter/source/msfilter/msdffimp.cxx4
-rw-r--r--forms/source/xforms/model.cxx2
-rw-r--r--fpicker/source/office/iodlg.cxx2
-rw-r--r--oox/source/drawingml/diagram/diagramfragmenthandler.cxx2
-rw-r--r--reportdesign/source/ui/inspection/DataProviderHandler.cxx4
-rw-r--r--sc/source/ui/optdlg/tpformula.cxx5
-rw-r--r--sc/source/ui/styleui/styledlg.cxx2
-rw-r--r--sc/source/ui/view/printfun.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx6
-rw-r--r--sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx2
-rw-r--r--sd/source/ui/unoidl/unopage.cxx4
-rw-r--r--sd/source/ui/unoidl/unowcntr.cxx2
-rw-r--r--sd/source/ui/view/drtxtob1.cxx2
-rw-r--r--sdext/source/presenter/PresenterScreen.cxx3
-rw-r--r--sfx2/source/control/charwin.cxx4
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx4
-rw-r--r--svtools/source/brwbox/brwbox1.cxx7
-rw-r--r--svtools/source/brwbox/datwin.cxx2
-rw-r--r--svtools/source/misc/embedhlp.cxx2
-rw-r--r--svx/source/sdr/contact/viewcontactofgraphic.cxx3
-rw-r--r--svx/source/sdr/primitive2d/sdrattributecreator.cxx4
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx18
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx2
-rw-r--r--sw/source/core/access/accfrmobj.cxx2
-rw-r--r--sw/source/core/bastyp/calc.cxx2
-rw-r--r--sw/source/core/crsr/swcrsr.cxx4
-rw-r--r--sw/source/core/doc/docbm.cxx4
-rw-r--r--sw/source/core/doc/doctxm.cxx5
-rw-r--r--sw/source/core/layout/paintfrm.cxx6
-rw-r--r--sw/source/ui/chrdlg/tblnumfm.cxx2
-rw-r--r--sw/source/ui/config/optload.cxx2
-rw-r--r--sw/source/uibase/shells/grfsh.cxx2
-rw-r--r--sw/source/uibase/uiview/srcview.cxx2
-rw-r--r--sw/source/uibase/utlui/uitool.cxx4
-rw-r--r--test/source/screenshot_test.cxx2
-rw-r--r--tools/source/generic/poly2.cxx4
-rw-r--r--vcl/inc/opengl/RenderList.hxx2
-rw-r--r--vcl/opengl/gdiimpl.cxx2
-rw-r--r--vcl/source/app/salvtables.cxx2
-rw-r--r--vcl/source/font/FeatureCollector.cxx2
-rw-r--r--vcl/source/graphic/UnoGraphic.cxx2
-rw-r--r--vcl/source/window/brdwin.cxx2
-rw-r--r--vcl/source/window/builder.cxx2
-rw-r--r--vcl/workben/vcldemo.cxx2
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.cxx3
73 files changed, 242 insertions, 160 deletions
diff --git a/basctl/source/basicide/breakpoint.cxx b/basctl/source/basicide/breakpoint.cxx
index cc396f666b69..ff14d7087592 100644
--- a/basctl/source/basicide/breakpoint.cxx
+++ b/basctl/source/basicide/breakpoint.cxx
@@ -32,7 +32,7 @@ BreakPointList::BreakPointList()
BreakPointList::BreakPointList(BreakPointList const & rList)
{
for (size_t i = 0; i < rList.size(); ++i)
- maBreakPoints.push_back( BreakPoint(rList.at( i )) );
+ maBreakPoints.push_back( rList.at( i ) );
}
BreakPointList::~BreakPointList()
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index cdbf15cd6b88..282af010aa96 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -907,7 +907,7 @@ namespace vclcanvas
beFast ? BmpScaleFlag::Default : BmpScaleFlag::BestQuality );
return uno::Reference< rendering::XBitmap >(
- new CanvasBitmap( BitmapEx(aBitmap), *mpDevice, mpOutDevProvider ) );
+ new CanvasBitmap( aBitmap, *mpDevice, mpOutDevProvider ) );
}
uno::Sequence< sal_Int8 > CanvasHelper::getData( rendering::IntegerBitmapLayout& rLayout,
diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx
index 123a6b64b2e4..0fa11f3dd36a 100644
--- a/canvas/source/vcl/spritehelper.cxx
+++ b/canvas/source/vcl/spritehelper.cxx
@@ -141,7 +141,7 @@ namespace vclcanvas
// opaque. Note: since we retrieved aBmp directly
// from an OutDev, it's already a 'display bitmap'
// on windows.
- maContent = BitmapEx( aBmp );
+ maContent = aBmp;
}
else
{
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index fbbfdaa45277..e34f81a96daa 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -1858,7 +1858,7 @@ void Chart2ExportTest::testCustomDataLabelMultipleSeries()
CPPUNIT_ASSERT_EQUAL(OUString("Bars"), aFields[2]->getString());
// Second series
- xDataSeries = uno::Reference<chart2::XDataSeries>(getDataSeriesFromDoc(xChartDoc, 0, 1));
+ xDataSeries = getDataSeriesFromDoc(xChartDoc, 0, 1);
CPPUNIT_ASSERT(xDataSeries.is());
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_QUERY_THROW);
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index d0906b1c9164..e76090acd83d 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -1527,7 +1527,7 @@ void Chart2ImportTest::testTdf115107_2()
CPPUNIT_ASSERT_EQUAL(OUString("Bars"), aFields[2]->getString());
// Second series
- xDataSeries = uno::Reference<chart2::XDataSeries>(getDataSeriesFromDoc(xChartDoc, 0, 1));
+ xDataSeries = getDataSeriesFromDoc(xChartDoc, 0, 1);
CPPUNIT_ASSERT(xDataSeries.is());
xPropertySet.set(xDataSeries->getDataPointByIndex(0), uno::UNO_QUERY_THROW);
diff --git a/chart2/source/controller/main/PositionAndSizeHelper.cxx b/chart2/source/controller/main/PositionAndSizeHelper.cxx
index 7cc51f8e478a..ed7b615917dc 100644
--- a/chart2/source/controller/main/PositionAndSizeHelper.cxx
+++ b/chart2/source/controller/main/PositionAndSizeHelper.cxx
@@ -69,7 +69,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType
}
else if(eObjectType==OBJECTTYPE_LEGEND)
{
- xObjectProp->setPropertyValue( "AnchorPosition", uno::Any(LegendPosition(LegendPosition_CUSTOM)));
+ xObjectProp->setPropertyValue( "AnchorPosition", uno::Any(LegendPosition_CUSTOM));
xObjectProp->setPropertyValue( "Expansion", uno::Any(css::chart::ChartLegendExpansion_CUSTOM));
chart2::RelativePosition aRelativePosition;
chart2::RelativeSize aRelativeSize;
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index 02ea81e98232..238e4f21b514 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -930,8 +930,8 @@ void AreaChart::createShapes()
{
if(eAlignment==LABEL_ALIGN_CENTER || m_nDimension == 3 )
nOffset = 0;
- aScreenPosition2D = awt::Point( LabelPositionHelper(m_nDimension,m_xLogicTarget,m_pShapeFactory)
- .transformSceneToScreenPosition( aScenePosition3D ) );
+ aScreenPosition2D = LabelPositionHelper(m_nDimension,m_xLogicTarget,m_pShapeFactory)
+ .transformSceneToScreenPosition( aScenePosition3D );
}
createDataLabel( m_xTextTarget, *pSeries, nIndex
diff --git a/chart2/source/view/charttypes/NetChart.cxx b/chart2/source/view/charttypes/NetChart.cxx
index fb41194f0906..56bfb451e2b2 100644
--- a/chart2/source/view/charttypes/NetChart.cxx
+++ b/chart2/source/view/charttypes/NetChart.cxx
@@ -619,16 +619,16 @@ void NetChart::createShapes()
if( pPolarPosHelper )
{
PolarLabelPositionHelper aPolarLabelPositionHelper(pPolarPosHelper,m_nDimension,m_xLogicTarget,m_pShapeFactory);
- aScreenPosition2D = awt::Point( aPolarLabelPositionHelper.getLabelScreenPositionAndAlignmentForLogicValues(
- eAlignment, fLogicX, fLogicY, fLogicZ, nOffset ));
+ aScreenPosition2D = aPolarLabelPositionHelper.getLabelScreenPositionAndAlignmentForLogicValues(
+ eAlignment, fLogicX, fLogicY, fLogicZ, nOffset );
}
}
else
{
if(eAlignment==LABEL_ALIGN_CENTER )
nOffset = 0;
- aScreenPosition2D = awt::Point( LabelPositionHelper(m_nDimension,m_xLogicTarget,m_pShapeFactory)
- .transformSceneToScreenPosition( aScenePosition3D ) );
+ aScreenPosition2D = LabelPositionHelper(m_nDimension,m_xLogicTarget,m_pShapeFactory)
+ .transformSceneToScreenPosition( aScenePosition3D );
}
createDataLabel( m_xTextTarget, *pSeries, nIndex
diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx
index 2a72cfbd57dd..4f3c095a2afe 100644
--- a/chart2/source/view/diagram/VDiagram.cxx
+++ b/chart2/source/view/diagram/VDiagram.cxx
@@ -126,11 +126,11 @@ void VDiagram::createShapes( const awt::Point& rPos, const awt::Size& rSize )
//do not change aspect ratio
awt::Size aAspectRatio( static_cast<sal_Int32>(m_aPreferredAspectRatio.DirectionX*FIXED_SIZE_FOR_3D_CHART_VOLUME),
static_cast<sal_Int32>(m_aPreferredAspectRatio.DirectionY*FIXED_SIZE_FOR_3D_CHART_VOLUME ));
- m_aCurrentSizeWithoutAxes = awt::Size( ShapeFactory::calculateNewSizeRespectingAspectRatio(
- rAvailableSize, aAspectRatio ) );
+ m_aCurrentSizeWithoutAxes = ShapeFactory::calculateNewSizeRespectingAspectRatio(
+ rAvailableSize, aAspectRatio );
//center diagram position
- m_aCurrentPosWithoutAxes = awt::Point( ShapeFactory::calculateTopLeftPositionToCenterObject(
- rPos, rAvailableSize, m_aCurrentSizeWithoutAxes ) );
+ m_aCurrentPosWithoutAxes = ShapeFactory::calculateTopLeftPositionToCenterObject(
+ rPos, rAvailableSize, m_aCurrentSizeWithoutAxes );
}
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 02ad8a90720c..9a7a67c85881 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1621,7 +1621,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
{
m_bPointsWereSkipped = false;
- aConsumedOuterRect = ::basegfx::B2IRectangle( ShapeFactory::getRectangleOfShape(xBoundingShape) );
+ aConsumedOuterRect = ShapeFactory::getRectangleOfShape(xBoundingShape);
::basegfx::B2IRectangle aNewInnerRect( aVDiagram.getCurrentRectangle() );
if (!rParam.mbUseFixedInnerSize)
aNewInnerRect = aVDiagram.adjustInnerSize( aConsumedOuterRect );
diff --git a/comphelper/qa/unit/base64_test.cxx b/comphelper/qa/unit/base64_test.cxx
index 6a18682ca6bd..84f59dacbeff 100644
--- a/comphelper/qa/unit/base64_test.cxx
+++ b/comphelper/qa/unit/base64_test.cxx
@@ -98,15 +98,15 @@ void Base64Test::testBase64EncodeForOStringBuffer()
inputSequence = { 0, 0, 0, 0, 0, 1, 2, 3 };
comphelper::Base64::encode(aBuffer, inputSequence);
- CPPUNIT_ASSERT_EQUAL(OString("AAAAAAABAgM="), OString(aBuffer.makeStringAndClear()));
+ CPPUNIT_ASSERT_EQUAL(OString("AAAAAAABAgM="), aBuffer.makeStringAndClear());
inputSequence = { 5, 2, 3, 0, 0, 1, 2, 3 };
comphelper::Base64::encode(aBuffer, inputSequence);
- CPPUNIT_ASSERT_EQUAL(OString("BQIDAAABAgM="), OString(aBuffer.makeStringAndClear()));
+ CPPUNIT_ASSERT_EQUAL(OString("BQIDAAABAgM="), aBuffer.makeStringAndClear());
inputSequence = { sal_Int8(sal_uInt8(200)), 31, 77, 111, 0, 1, 2, 3 };
comphelper::Base64::encode(aBuffer, inputSequence);
- CPPUNIT_ASSERT_EQUAL(OString("yB9NbwABAgM="), OString(aBuffer.makeStringAndClear()));
+ CPPUNIT_ASSERT_EQUAL(OString("yB9NbwABAgM="), aBuffer.makeStringAndClear());
}
CPPUNIT_TEST_SUITE_REGISTRATION(Base64Test);
diff --git a/compilerplugins/clang/redundantfcast.cxx b/compilerplugins/clang/redundantfcast.cxx
index 3dc99d633626..43049700ee35 100644
--- a/compilerplugins/clang/redundantfcast.cxx
+++ b/compilerplugins/clang/redundantfcast.cxx
@@ -10,6 +10,8 @@
#include "check.hxx"
#include "compat.hxx"
#include "plugin.hxx"
+#include <iostream>
+#include <fstream>
namespace
{
@@ -118,35 +120,106 @@ public:
return true;
}
+ /* Check for the creation of unnecessary temporaries when calling a constructor that takes a param by const & */
+ bool VisitCXXConstructExpr(CXXConstructExpr const* callExpr)
+ {
+ if (ignoreLocation(callExpr))
+ return true;
+ const CXXConstructorDecl* functionDecl = callExpr->getConstructor();
+
+ unsigned len = std::min(callExpr->getNumArgs(), functionDecl->getNumParams());
+ for (unsigned i = 0; i < len; ++i)
+ {
+ // check if param is const&
+ auto param = functionDecl->getParamDecl(i);
+ auto lvalueType = param->getType()->getAs<LValueReferenceType>();
+ if (!lvalueType)
+ continue;
+ if (!lvalueType->getPointeeType().isConstQualified())
+ continue;
+ auto paramClassOrStructType = lvalueType->getPointeeType()->getAs<RecordType>();
+ if (!paramClassOrStructType)
+ continue;
+ // check for temporary and functional cast in argument expression
+ auto arg = callExpr->getArg(i)->IgnoreImplicit();
+ auto functionalCast = dyn_cast<CXXFunctionalCastExpr>(arg);
+ if (!functionalCast)
+ continue;
+ auto const t1 = functionalCast->getTypeAsWritten();
+ auto const t2 = compat::getSubExprAsWritten(functionalCast)->getType();
+ if (t1.getCanonicalType().getTypePtr() != t2.getCanonicalType().getTypePtr())
+ continue;
+ // Check that the underlying expression is of the same class/struct type as the param i.e. that we are not instantiating
+ // something useful
+ if (t1.getCanonicalType().getTypePtr() != paramClassOrStructType)
+ continue;
+
+ report(DiagnosticsEngine::Warning, "redundant functional cast from %0 to %1",
+ arg->getExprLoc())
+ << t2 << t1 << arg->getSourceRange();
+ report(DiagnosticsEngine::Note, "in call to method here", param->getLocation())
+ << param->getSourceRange();
+ }
+ return true;
+ }
+
bool VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr const* expr)
{
if (ignoreLocation(expr))
return true;
+ // specifying the name for an init-list is necessary sometimes
+ if (isa<InitListExpr>(expr->getSubExpr()->IgnoreImplicit()))
+ return true;
+ if (isa<CXXStdInitializerListExpr>(expr->getSubExpr()->IgnoreImplicit()))
+ return true;
auto const t1 = expr->getTypeAsWritten();
auto const t2 = compat::getSubExprAsWritten(expr)->getType();
if (t1.getCanonicalType().getTypePtr() != t2.getCanonicalType().getTypePtr())
{
return true;
}
- auto tc = loplugin::TypeCheck(t1);
- if (!(tc.Class("OUString").Namespace("rtl").GlobalNamespace()
- || tc.Class("Color").GlobalNamespace() || tc.Class("unique_ptr").StdNamespace()))
+ // (a) we do a lot of int/sal_Int32 kind of casts which might be platform necessary?
+ // (b) we do bool/bool casts in unit tests to avoid one of the other plugins
+ // so just ignore this kind of thing for now
+ if (const auto* BT = dyn_cast<BuiltinType>(t1->getUnqualifiedDesugaredType()))
{
- return true;
+ auto k = BT->getKind();
+ if (k == BuiltinType::Double || k == BuiltinType::Float
+ || (k >= BuiltinType::Bool && k <= BuiltinType::Int128))
+ return true;
+ }
+ if (const auto* BT = dyn_cast<BuiltinType>(t2->getUnqualifiedDesugaredType()))
+ {
+ auto k = BT->getKind();
+ if (k == BuiltinType::Double || k == BuiltinType::Float
+ || (k >= BuiltinType::Bool && k <= BuiltinType::Int128))
+ return true;
}
+ auto tc = loplugin::TypeCheck(t1);
+ if (tc.Typedef("sal_Int32").GlobalNamespace())
+ return true;
+
report(DiagnosticsEngine::Warning, "redundant functional cast from %0 to %1",
expr->getExprLoc())
<< t2 << t1 << expr->getSourceRange();
+ //getParentStmt(expr)->dump();
return true;
}
private:
void run() override
{
- if (compiler.getLangOpts().CPlusPlus)
- {
- TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
- }
+ if (!compiler.getLangOpts().CPlusPlus)
+ return;
+ std::string fn = handler.getMainFileName();
+ loplugin::normalizeDotDotInFilePath(fn);
+ // necessary on some other platforms
+ if (fn == SRCDIR "/sal/osl/unx/socket.cxx")
+ return;
+ // compile-time check of constant
+ if (fn == SRCDIR "/bridges/source/jni_uno/jni_bridge.cxx")
+ return;
+ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
}
FunctionDecl const* m_CurrentFunctionDecl;
};
diff --git a/compilerplugins/clang/test/redundantfcast.cxx b/compilerplugins/clang/test/redundantfcast.cxx
index da7e8be5a027..13e09b5e05b6 100644
--- a/compilerplugins/clang/test/redundantfcast.cxx
+++ b/compilerplugins/clang/test/redundantfcast.cxx
@@ -23,6 +23,21 @@ struct Foo
void func1(Foo const& f); // expected-note {{in call to method here [loplugin:redundantfcast]}}
+namespace tools
+{
+struct Polygon
+{
+ Polygon() = default;
+};
+struct PolyPolygon
+{
+ PolyPolygon(
+ Polygon const&); // expected-note {{in call to method here [loplugin:redundantfcast]}}
+};
+}
+
+void ImplWritePolyPolygonRecord(const tools::PolyPolygon& rPolyPoly);
+
int main()
{
OUString s;
@@ -53,7 +68,11 @@ int main()
Foo foo(1);
func1(Foo(
- foo)); // expected-error@-1 {{redundant functional cast from 'Foo' to 'Foo' [loplugin:redundantfcast]}}
+ foo)); // expected-error@-1 {{redundant functional cast from 'Foo' to 'Foo' [loplugin:redundantfcast]}} expected-error@-1 {{redundant functional cast from 'Foo' to 'Foo' [loplugin:redundantfcast]}}
+
+ const tools::Polygon aPolygon;
+ ImplWritePolyPolygonRecord(tools::PolyPolygon(tools::Polygon(
+ aPolygon))); // expected-error@-1 {{redundant functional cast from 'const tools::Polygon' to 'tools::Polygon' [loplugin:redundantfcast]}} expected-error@-1 {{redundant functional cast from 'const tools::Polygon' to 'tools::Polygon' [loplugin:redundantfcast]}}
}
class Class1
@@ -62,7 +81,7 @@ class Class1
Foo func2()
{
return Foo(
- foo); // expected-error@-1 {{redundant functional cast from 'Foo' to 'Foo' [loplugin:redundantfcast]}}
+ foo); // expected-error@-1 {{redundant functional cast from 'Foo' to 'Foo' [loplugin:redundantfcast]}} expected-error@-1 {{redundant functional cast from 'Foo' to 'Foo' [loplugin:redundantfcast]}}
}
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 46e2659aea62..a36d37b56d6b 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -1019,7 +1019,7 @@ namespace cppcanvas
B2DPoint mappedCenter (Map (dx + dw/2, dy + dh/2));
B2DSize mappedSize( MapSize (dw/2, dh/2));
- ::basegfx::B2DPolyPolygon polyPolygon( ::basegfx::B2DPolygon( ::basegfx::utils::createPolygonFromEllipse( mappedCenter, mappedSize.getX (), mappedSize.getY () ) ) );
+ ::basegfx::B2DPolyPolygon polyPolygon( ::basegfx::utils::createPolygonFromEllipse( mappedCenter, mappedSize.getX (), mappedSize.getY () ) );
if ( type == EmfPlusRecordTypeFillEllipse )
EMFPPlusFillPolygon( polyPolygon,
@@ -1516,9 +1516,9 @@ namespace cppcanvas
B2DPoint mappedPoint (Map (dx, dy));
B2DSize mappedSize( MapSize (dw, dh));
- ::basegfx::B2DPolyPolygon polyPolygon( ::basegfx::B2DPolygon( ::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle( mappedPoint.getX(), mappedPoint.getY(),
+ ::basegfx::B2DPolyPolygon polyPolygon( ::basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle( mappedPoint.getX(), mappedPoint.getY(),
mappedPoint.getX() + mappedSize.getX(),
- mappedPoint.getY() + mappedSize.getY() ) ) ) );
+ mappedPoint.getY() + mappedSize.getY() ) ) );
polyPolygon.transform(rState.mapModeTransform);
updateClipping (polyPolygon, rFactoryParms, combineMode == 1);
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index e83fdbe5c78e..c5e23eeed08d 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -1218,7 +1218,7 @@ void SvxShowText::SetFont( const vcl::Font& rFont )
{
long nWinHeight = GetOutputSizePixel().Height();
- m_aFont = vcl::Font(rFont);
+ m_aFont = rFont;
m_aFont.SetWeight(WEIGHT_NORMAL);
m_aFont.SetAlignment(ALIGN_TOP);
m_aFont.SetFontSize(m_xVirDev->PixelToLogic(Size(0, nWinHeight / 2)));
diff --git a/dbaccess/source/sdbtools/connection/connectiontools.cxx b/dbaccess/source/sdbtools/connection/connectiontools.cxx
index 02b3f04522ee..d1dc8f6d6d6d 100644
--- a/dbaccess/source/sdbtools/connection/connectiontools.cxx
+++ b/dbaccess/source/sdbtools/connection/connectiontools.cxx
@@ -119,7 +119,7 @@ namespace sdbtools
Reference< XInterface > ConnectionTools::Create(const Reference< XComponentContext >& _rxContext )
{
- return *( new ConnectionTools( Reference<XComponentContext>( _rxContext ) ) );
+ return *( new ConnectionTools( _rxContext ) );
}
void SAL_CALL ConnectionTools::initialize(const Sequence< Any > & _rArguments)
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 855bb398a570..e3d093feee85 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -1048,7 +1048,7 @@ namespace {
for (const auto& aItemPair: aRoot)
{
// This is an array, so no key
- CPPUNIT_ASSERT_EQUAL(std::string(aItemPair.first), std::string(""));
+ CPPUNIT_ASSERT_EQUAL(aItemPair.first, std::string(""));
boost::property_tree::ptree aItemValue = aItemPair.second;
boost::optional<boost::property_tree::ptree&> aText = aItemValue.get_child_optional("text");
@@ -1143,7 +1143,7 @@ void DesktopLOKTest::testContextMenuCalc()
boost::optional<boost::property_tree::ptree&> aEnabled = aMenuItem.get().get_child_optional("enabled");
CPPUNIT_ASSERT(aEnabled);
- CPPUNIT_ASSERT_EQUAL(std::string(aEnabled.get().data()), std::string("true"));
+ CPPUNIT_ASSERT_EQUAL(aEnabled.get().data(), std::string("true"));
}
// Copy is enabled
@@ -1153,7 +1153,7 @@ void DesktopLOKTest::testContextMenuCalc()
boost::optional<boost::property_tree::ptree&> aEnabled = aMenuItem.get().get_child_optional("enabled");
CPPUNIT_ASSERT(aEnabled);
- CPPUNIT_ASSERT_EQUAL(std::string(aEnabled.get().data()), std::string("true"));
+ CPPUNIT_ASSERT_EQUAL(aEnabled.get().data(), std::string("true"));
}
// Paste is enabled
@@ -1163,7 +1163,7 @@ void DesktopLOKTest::testContextMenuCalc()
boost::optional<boost::property_tree::ptree&> aEnabled = aMenuItem.get().get_child_optional("enabled");
CPPUNIT_ASSERT(aEnabled);
- CPPUNIT_ASSERT_EQUAL(std::string(aEnabled.get().data()), std::string("true"));
+ CPPUNIT_ASSERT_EQUAL(aEnabled.get().data(), std::string("true"));
}
// Remove hyperlink is disabled
@@ -1173,7 +1173,7 @@ void DesktopLOKTest::testContextMenuCalc()
boost::optional<boost::property_tree::ptree&> aEnabled = aMenuItem.get().get_child_optional("enabled");
CPPUNIT_ASSERT(aEnabled);
- CPPUNIT_ASSERT_EQUAL(std::string(aEnabled.get().data()), std::string("false"));
+ CPPUNIT_ASSERT_EQUAL(aEnabled.get().data(), std::string("false"));
}
// open hyperlink is disabled
@@ -1183,7 +1183,7 @@ void DesktopLOKTest::testContextMenuCalc()
boost::optional<boost::property_tree::ptree&> aEnabled = aMenuItem.get().get_child_optional("enabled");
CPPUNIT_ASSERT(aEnabled);
- CPPUNIT_ASSERT_EQUAL(std::string(aEnabled.get().data()), std::string("false"));
+ CPPUNIT_ASSERT_EQUAL(aEnabled.get().data(), std::string("false"));
}
// checkbutton tests
@@ -1203,21 +1203,21 @@ void DesktopLOKTest::testContextMenuCalc()
// these are radio buttons
boost::optional<boost::property_tree::ptree&> aChecktypeToPage = aMenuItemToPage.get().get_child_optional("checktype");
CPPUNIT_ASSERT(aChecktypeToPage);
- CPPUNIT_ASSERT_EQUAL(std::string(aChecktypeToPage.get().data()), std::string("radio"));
+ CPPUNIT_ASSERT_EQUAL(aChecktypeToPage.get().data(), std::string("radio"));
boost::optional<boost::property_tree::ptree&> aChecktypeToCell = aMenuItemToCell.get().get_child_optional("checktype");
CPPUNIT_ASSERT(aChecktypeToCell);
- CPPUNIT_ASSERT_EQUAL(std::string(aChecktypeToCell.get().data()), std::string("radio"));
+ CPPUNIT_ASSERT_EQUAL(aChecktypeToCell.get().data(), std::string("radio"));
// ToPage is checked
boost::optional<boost::property_tree::ptree&> aCheckedToPage = aMenuItemToPage.get().get_child_optional("checked");
CPPUNIT_ASSERT(aCheckedToPage);
- CPPUNIT_ASSERT_EQUAL(std::string(aCheckedToPage.get().data()), std::string("true"));
+ CPPUNIT_ASSERT_EQUAL(aCheckedToPage.get().data(), std::string("true"));
// ToCell is unchecked
boost::optional<boost::property_tree::ptree&> aCheckedToCell = aMenuItemToCell.get().get_child_optional("checked");
CPPUNIT_ASSERT(aCheckedToCell);
- CPPUNIT_ASSERT_EQUAL(std::string(aCheckedToCell.get().data()), std::string("false"));
+ CPPUNIT_ASSERT_EQUAL(aCheckedToCell.get().data(), std::string("false"));
}
comphelper::LibreOfficeKit::setActive(false);
@@ -1254,7 +1254,7 @@ void DesktopLOKTest::testContextMenuWriter()
boost::optional<boost::property_tree::ptree&> aEnabled = aMenuItem.get().get_child_optional("enabled");
CPPUNIT_ASSERT(aEnabled);
- CPPUNIT_ASSERT_EQUAL(std::string(aEnabled.get().data()), std::string("false"));
+ CPPUNIT_ASSERT_EQUAL(aEnabled.get().data(), std::string("false"));
}
// Copy is disabled
@@ -1264,7 +1264,7 @@ void DesktopLOKTest::testContextMenuWriter()
boost::optional<boost::property_tree::ptree&> aEnabled = aMenuItem.get().get_child_optional("enabled");
CPPUNIT_ASSERT(aEnabled);
- CPPUNIT_ASSERT_EQUAL(std::string(aEnabled.get().data()), std::string("false"));
+ CPPUNIT_ASSERT_EQUAL(aEnabled.get().data(), std::string("false"));
}
// Paste is enabled
@@ -1274,7 +1274,7 @@ void DesktopLOKTest::testContextMenuWriter()
boost::optional<boost::property_tree::ptree&> aEnabled = aMenuItem.get().get_child_optional("enabled");
CPPUNIT_ASSERT(aEnabled);
- CPPUNIT_ASSERT_EQUAL(std::string(aEnabled.get().data()), std::string("true"));
+ CPPUNIT_ASSERT_EQUAL(aEnabled.get().data(), std::string("true"));
}
comphelper::LibreOfficeKit::setActive(false);
@@ -1312,7 +1312,7 @@ void DesktopLOKTest::testContextMenuImpress()
boost::optional<boost::property_tree::ptree&> aEnabled = aMenuItem.get().get_child_optional("enabled");
CPPUNIT_ASSERT(aEnabled);
- CPPUNIT_ASSERT_EQUAL(std::string(aEnabled.get().data()), std::string("false"));
+ CPPUNIT_ASSERT_EQUAL(aEnabled.get().data(), std::string("false"));
}
// Copy is disabled
@@ -1322,7 +1322,7 @@ void DesktopLOKTest::testContextMenuImpress()
boost::optional<boost::property_tree::ptree&> aEnabled = aMenuItem.get().get_child_optional("enabled");
CPPUNIT_ASSERT(aEnabled);
- CPPUNIT_ASSERT_EQUAL(std::string(aEnabled.get().data()), std::string("false"));
+ CPPUNIT_ASSERT_EQUAL(aEnabled.get().data(), std::string("false"));
}
// Paste is enabled
@@ -1332,7 +1332,7 @@ void DesktopLOKTest::testContextMenuImpress()
boost::optional<boost::property_tree::ptree&> aEnabled = aMenuItem.get().get_child_optional("enabled");
CPPUNIT_ASSERT(aEnabled);
- CPPUNIT_ASSERT_EQUAL(std::string(aEnabled.get().data()), std::string("true"));
+ CPPUNIT_ASSERT_EQUAL(aEnabled.get().data(), std::string("true"));
}
// SaveBackground is disabled
@@ -1342,7 +1342,7 @@ void DesktopLOKTest::testContextMenuImpress()
boost::optional<boost::property_tree::ptree&> aEnabled = aMenuItem.get().get_child_optional("enabled");
CPPUNIT_ASSERT(aEnabled);
- CPPUNIT_ASSERT_EQUAL(std::string(aEnabled.get().data()), std::string("false"));
+ CPPUNIT_ASSERT_EQUAL(aEnabled.get().data(), std::string("false"));
}
// checkbutton tests
@@ -1352,11 +1352,11 @@ void DesktopLOKTest::testContextMenuImpress()
boost::optional<boost::property_tree::ptree&> aChecktype = aMenuItem.get().get_child_optional("checktype");
CPPUNIT_ASSERT(aChecktype);
- CPPUNIT_ASSERT_EQUAL(std::string(aChecktype.get().data()), std::string("checkmark"));
+ CPPUNIT_ASSERT_EQUAL(aChecktype.get().data(), std::string("checkmark"));
boost::optional<boost::property_tree::ptree&> aChecked = aMenuItem.get().get_child_optional("checked");
CPPUNIT_ASSERT(aChecked);
- CPPUNIT_ASSERT_EQUAL(std::string(aChecked.get().data()), std::string("false"));
+ CPPUNIT_ASSERT_EQUAL(aChecked.get().data(), std::string("false"));
}
// Checkbutton tests inside SnapLines submenu
@@ -1379,30 +1379,30 @@ void DesktopLOKTest::testContextMenuImpress()
// these are checkmarks
boost::optional<boost::property_tree::ptree&> aChecktypeHelpVis = aMenuItemHelpVis.get().get_child_optional("checktype");
CPPUNIT_ASSERT(aChecktypeHelpVis);
- CPPUNIT_ASSERT_EQUAL(std::string(aChecktypeHelpVis.get().data()), std::string("checkmark"));
+ CPPUNIT_ASSERT_EQUAL(aChecktypeHelpVis.get().data(), std::string("checkmark"));
boost::optional<boost::property_tree::ptree&> aChecktypeHelpUse = aMenuItemHelpUse.get().get_child_optional("checktype");
CPPUNIT_ASSERT(aChecktypeHelpUse);
- CPPUNIT_ASSERT_EQUAL(std::string(aChecktypeHelpUse.get().data()), std::string("checkmark"));
+ CPPUNIT_ASSERT_EQUAL(aChecktypeHelpUse.get().data(), std::string("checkmark"));
boost::optional<boost::property_tree::ptree&> aChecktypeHelpFront = aMenuItemHelpFront.get().get_child_optional("checktype");
CPPUNIT_ASSERT(aChecktypeHelpFront);
- CPPUNIT_ASSERT_EQUAL(std::string(aChecktypeHelpFront.get().data()), std::string("checkmark"));
+ CPPUNIT_ASSERT_EQUAL(aChecktypeHelpFront.get().data(), std::string("checkmark"));
// HelplineVisible is unchecked
boost::optional<boost::property_tree::ptree&> aCheckedHelpVis = aMenuItemHelpVis.get().get_child_optional("checked");
CPPUNIT_ASSERT(aCheckedHelpVis);
- CPPUNIT_ASSERT_EQUAL(std::string(aCheckedHelpVis.get().data()), std::string("false"));
+ CPPUNIT_ASSERT_EQUAL(aCheckedHelpVis.get().data(), std::string("false"));
// HelplineUse is checked
boost::optional<boost::property_tree::ptree&> aCheckedHelpUse = aMenuItemHelpUse.get().get_child_optional("checked");
CPPUNIT_ASSERT(aCheckedHelpUse);
- CPPUNIT_ASSERT_EQUAL(std::string(aCheckedHelpUse.get().data()), std::string("true"));
+ CPPUNIT_ASSERT_EQUAL(aCheckedHelpUse.get().data(), std::string("true"));
// HelplineFront is checked
boost::optional<boost::property_tree::ptree&> aCheckedHelpFront = aMenuItemHelpFront.get().get_child_optional("checked");
CPPUNIT_ASSERT(aCheckedHelpFront);
- CPPUNIT_ASSERT_EQUAL(std::string(aCheckedHelpFront.get().data()), std::string("true"));
+ CPPUNIT_ASSERT_EQUAL(aCheckedHelpFront.get().data(), std::string("true"));
}
comphelper::LibreOfficeKit::setActive(false);
diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
index 4de6279cb60d..921c9837a8c0 100644
--- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
@@ -207,7 +207,7 @@ namespace drawinglayer
aBitmapSizeLogic.getX(), aBitmapSizeLogic.getY(), aTranslate.getX(), aTranslate.getY()));
// create primitive
- xRetval = new BitmapPrimitive2D(BitmapEx(aContent), aBitmapTransform);
+ xRetval = new BitmapPrimitive2D(aContent, aBitmapTransform);
}
catch( const uno::Exception& )
{
diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx
index 06a2d0a814b2..d75db28a1902 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -1056,8 +1056,7 @@ namespace emfplushelper
::basegfx::B2DPoint mappedCenter(Map(dx + dw / 2, dy + dh / 2));
::basegfx::B2DSize mappedSize(MapSize(dw / 2, dh / 2));
::basegfx::B2DPolyPolygon polyPolygon(
- ::basegfx::B2DPolygon(
- ::basegfx::utils::createPolygonFromEllipse(mappedCenter, mappedSize.getX(), mappedSize.getY())));
+ ::basegfx::utils::createPolygonFromEllipse(mappedCenter, mappedSize.getX(), mappedSize.getY()));
if (type == EmfPlusRecordTypeFillEllipse)
EMFPPlusFillPolygon(polyPolygon, flags & 0x8000, brushIndexOrColor);
@@ -1663,13 +1662,12 @@ namespace emfplushelper
::basegfx::B2DSize mappedSize(MapSize(dw, dh));
::basegfx::B2DPolyPolygon polyPolygon(
- ::basegfx::B2DPolygon(
::basegfx::utils::createPolygonFromRect(
::basegfx::B2DRectangle(
mappedPoint.getX(),
mappedPoint.getY(),
mappedPoint.getX() + mappedSize.getX(),
- mappedPoint.getY() + mappedSize.getY()))));
+ mappedPoint.getY() + mappedSize.getY())));
HandleNewClipRegion(combineClip(mrPropertyHolders.Current().getClipPolyPolygon(), combineMode, polyPolygon), mrTargetHolders, mrPropertyHolders);
break;
diff --git a/drawinglayer/source/tools/emfpregion.cxx b/drawinglayer/source/tools/emfpregion.cxx
index ba78503c2826..559e77db6e08 100644
--- a/drawinglayer/source/tools/emfpregion.cxx
+++ b/drawinglayer/source/tools/emfpregion.cxx
@@ -74,13 +74,12 @@ namespace emfplushelper
::basegfx::B2DSize mappedSize(rR.MapSize(dw, dh));
::basegfx::B2DPolyPolygon polyPolygon(
- ::basegfx::B2DPolygon(
::basegfx::utils::createPolygonFromRect(
::basegfx::B2DRectangle(
mappedPoint.getX(),
mappedPoint.getY(),
mappedPoint.getX() + mappedSize.getX(),
- mappedPoint.getY() + mappedSize.getY()))));
+ mappedPoint.getY() + mappedSize.getY())));
polygon = polyPolygon;
break;
}
diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx b/drawinglayer/source/tools/wmfemfhelper.cxx
index 5081fbf9f236..3b5128f99255 100644
--- a/drawinglayer/source/tools/wmfemfhelper.cxx
+++ b/drawinglayer/source/tools/wmfemfhelper.cxx
@@ -1063,12 +1063,11 @@ namespace wmfemfhelper
const vcl::Font& rFont = rProperty.getFont();
basegfx::B2DVector aFontScaling;
- rFontAttribute = drawinglayer::attribute::FontAttribute(
- drawinglayer::primitive2d::getFontAttributeFromVclFont(
- aFontScaling,
- rFont,
- bool(rProperty.getLayoutMode() & ComplexTextLayoutFlags::BiDiRtl),
- bool(rProperty.getLayoutMode() & ComplexTextLayoutFlags::BiDiStrong)));
+ rFontAttribute = drawinglayer::primitive2d::getFontAttributeFromVclFont(
+ aFontScaling,
+ rFont,
+ bool(rProperty.getLayoutMode() & ComplexTextLayoutFlags::BiDiRtl),
+ bool(rProperty.getLayoutMode() & ComplexTextLayoutFlags::BiDiStrong));
// add FontScaling
rTextTransform.scale(aFontScaling.getX(), aFontScaling.getY());
diff --git a/editeng/inc/editdoc.hxx b/editeng/inc/editdoc.hxx
index 4e7efff897fa..31c15e201a5e 100644
--- a/editeng/inc/editdoc.hxx
+++ b/editeng/inc/editdoc.hxx
@@ -322,7 +322,7 @@ public:
sal_Int32 GetIndex() const { return nIndex; }
void SetIndex( sal_Int32 n ) { nIndex = n; }
- bool DbgIsBuggy( EditDoc const & rDoc );
+ bool DbgIsBuggy( EditDoc const & rDoc ) const;
friend bool operator == ( const EditPaM& r1, const EditPaM& r2 );
friend bool operator != ( const EditPaM& r1, const EditPaM& r2 );
@@ -697,7 +697,7 @@ public:
bool HasRange() const { return aStartPaM != aEndPaM; }
bool IsInvalid() const { return !aStartPaM || !aEndPaM; }
- bool DbgIsBuggy( EditDoc const & rDoc );
+ bool DbgIsBuggy( EditDoc const & rDoc ) const;
void Adjust( const EditDoc& rNodes );
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index cbe547d33dff..86e4b53fced9 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -1113,14 +1113,14 @@ void EditPaM::SetNode(ContentNode* p)
pNode = p;
}
-bool EditPaM::DbgIsBuggy( EditDoc const & rDoc )
+bool EditPaM::DbgIsBuggy( EditDoc const & rDoc ) const
{
return !pNode ||
rDoc.GetPos( pNode ) >= rDoc.Count() ||
nIndex > pNode->Len();
}
-bool EditSelection::DbgIsBuggy( EditDoc const & rDoc )
+bool EditSelection::DbgIsBuggy( EditDoc const & rDoc ) const
{
return aStartPaM.DbgIsBuggy( rDoc ) || aEndPaM.DbgIsBuggy( rDoc );
}
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 0511f68bec09..e8dab77f120f 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -2304,7 +2304,7 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pR
EditPaM ImpEditEngine::DeleteLeftOrRight( const EditSelection& rSel, sal_uInt8 nMode, DeleteMode nDelMode )
{
- OSL_ENSURE( !EditSelection( rSel ).DbgIsBuggy( aEditDoc ), "Index out of range in DeleteLeftOrRight" );
+ OSL_ENSURE( !rSel.DbgIsBuggy( aEditDoc ), "Index out of range in DeleteLeftOrRight" );
if ( rSel.HasRange() ) // only then Delete Selection
return ImpDeleteSelection( rSel );
diff --git a/extensions/source/logging/csvformatter.cxx b/extensions/source/logging/csvformatter.cxx
index 12ebce788433..e71c4d29edf8 100644
--- a/extensions/source/logging/csvformatter.cxx
+++ b/extensions/source/logging/csvformatter.cxx
@@ -184,7 +184,7 @@ namespace logging
void CsvFormatter::setColumnnames(const Sequence< OUString >& columnnames)
{
- m_Columnnames = Sequence< OUString>(columnnames);
+ m_Columnnames = columnnames;
m_MultiColumn = (m_Columnnames.getLength()>1);
}
diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx
index 76854b0439d0..f4c72b9d6b7a 100644
--- a/extensions/source/propctrlr/fontdialog.cxx
+++ b/extensions/source/propctrlr/fontdialog.cxx
@@ -559,7 +559,7 @@ namespace pcr
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
if (rId == "font")
{
- aSet.Put (SvxFontListItem(static_cast<const SvxFontListItem&>(GetInputSetImpl()->Get(CFID_FONTLIST))));
+ aSet.Put (static_cast<const SvxFontListItem&>(GetInputSetImpl()->Get(CFID_FONTLIST)));
aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_HIDE_LANGUAGE));
rPage.PageCreated(aSet);
}
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index 436c2783d63a..7f51c6ddc9db 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -593,7 +593,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
}
basegfx::B2DHomMatrix m(basegfx::utils::createRotateB2DHomMatrix(static_cast<double>(nOrientation) * F_PI1800));
- m.translate( double(aPt.X() / scale), double(aPt.Y()) );
+ m.translate( aPt.X() / scale, double(aPt.Y()) );
m.scale( scale, scale );
sal_Int16 nHeight = Int16_( map( Size( 0, aFont.GetFontHeight() ) ).Height() );
@@ -1266,7 +1266,7 @@ void Writer::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegf
for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++)
{
const tools::Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a));
- Impl_writePolyPolygon(tools::PolyPolygon(tools::Polygon(aPolygon)), true );
+ Impl_writePolyPolygon(tools::PolyPolygon(aPolygon), true );
}
mpVDev->SetLineColor(aOldLineColor);
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 59d61fcaffd9..b8568ede408d 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -1676,7 +1676,7 @@ void PSWriter::ImplBmp( Bitmap const * pBitmap, Bitmap const * pMaskBitmap, cons
if ( mnLevel == 1 && nHeight > 10 )
nHeight = 8;
aRect = tools::Rectangle( Point( 0, nHeightOrg - nHeightLeft ), Size( nWidth, nHeight ) );
- aRegion = vcl::Region( pMaskBitmap->CreateRegion( COL_BLACK, aRect ) );
+ aRegion = pMaskBitmap->CreateRegion( COL_BLACK, aRect );
if( mnLevel == 1 )
{
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 47360682cacd..0178c1af94ef 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -4538,7 +4538,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
aP.setY( nY );
aXP[ static_cast<sal_uInt16>(nPtNum) ] = aP;
}
- aPolyBoundRect = tools::Rectangle( aXP.GetBoundRect() );
+ aPolyBoundRect = aXP.GetBoundRect();
if ( nNumElemVert >= 3 )
{ // arc first command is always wr -- clockwise arc
// the parameters are : (left,top),(right,bottom),start(x,y),end(x,y)
@@ -6351,7 +6351,7 @@ bool SvxMSDffManager::GetBLIP( sal_uLong nIdx_, Graphic& rGraphic, tools::Rectan
if (iter != aEscherBlipCache.end())
{
/* if this entry is available */
- rGraphic = Graphic(iter->second);
+ rGraphic = iter->second;
if (rGraphic.GetType() != GraphicType::NONE)
bOk = true;
else
diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx
index 8566f60e4040..2d90be996619 100644
--- a/forms/source/xforms/model.cxx
+++ b/forms/source/xforms/model.cxx
@@ -345,7 +345,7 @@ void Model::loadInstance( sal_Int32 nInstance )
try
{
Reference<XInputStream> xInput =
- Reference<XSimpleFileAccess3>( SimpleFileAccess::create( ::comphelper::getProcessComponentContext() ) )->openFileRead( sURL );
+ SimpleFileAccess::create( ::comphelper::getProcessComponentContext() )->openFileRead( sURL );
if( xInput.is() )
{
Reference<XDocument> xInstance =
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 17cf1dc0d6d4..352425653604 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -2468,7 +2468,7 @@ void SvtFileDialog::AddControls_Impl( )
_pPrevWin->SetOutputSizePixel(Size(200, 300));
_pPrevWin->Show();
- _pPrevBmp = VclPtr<FixedBitmap>::Create( _pPrevWin, WinBits( WB_BORDER ) );
+ _pPrevBmp = VclPtr<FixedBitmap>::Create( _pPrevWin, WB_BORDER );
_pPrevBmp->SetBackground( Wallpaper( COL_WHITE ) );
_pPrevBmp->SetSizePixel(_pPrevWin->GetSizePixel());
_pPrevBmp->Show();
diff --git a/oox/source/drawingml/diagram/diagramfragmenthandler.cxx b/oox/source/drawingml/diagram/diagramfragmenthandler.cxx
index 836faa309eca..402c6cccea7b 100644
--- a/oox/source/drawingml/diagram/diagramfragmenthandler.cxx
+++ b/oox/source/drawingml/diagram/diagramfragmenthandler.cxx
@@ -89,7 +89,7 @@ DiagramLayoutFragmentHandler::onCreateContext( ::sal_Int32 aElement,
switch( aElement )
{
case DGM_TOKEN( layoutDef ):
- return new DiagramDefinitionContext( *this, AttributeList( rAttribs ), mpDataPtr );
+ return new DiagramDefinitionContext( *this, rAttribs, mpDataPtr );
default:
break;
}
diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
index 778e49120121..cc01968c9dbc 100644
--- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx
+++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
@@ -486,7 +486,7 @@ bool DataProviderHandler::impl_dialogLinkedFields_nothrow( ::osl::ClearableMutex
{
uno::Sequence<uno::Any> aSeq(comphelper::InitAnyPropertySequence(
{
- {"ParentWindow", uno::Any(m_xContext->getValueByName("DialogParentWindow"))},
+ {"ParentWindow", m_xContext->getValueByName("DialogParentWindow")},
{"Detail", uno::Any(m_xDataProvider)},
{"Master", uno::Any(m_xReportComponent->getSection()->getReportDefinition())},
{"Explanation", uno::Any(RptResId(RID_STR_EXPLANATION))},
@@ -507,7 +507,7 @@ bool DataProviderHandler::impl_dialogChartType_nothrow( ::osl::ClearableMutexGua
{
uno::Sequence<uno::Any> aSeq(comphelper::InitAnyPropertySequence(
{
- {"ParentWindow", uno::Any(m_xContext->getValueByName("DialogParentWindow"))},
+ {"ParentWindow", m_xContext->getValueByName("DialogParentWindow")},
{"ChartModel", uno::Any(m_xChartModel)}
}));
diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx
index 09797b051071..9ceb2ee71565 100644
--- a/sc/source/ui/optdlg/tpformula.cxx
+++ b/sc/source/ui/optdlg/tpformula.cxx
@@ -73,9 +73,8 @@ ScTpFormulaOptions::ScTpFormulaOptions(vcl::Window* pParent, const SfxItemSet& r
OUString aSep = ScGlobal::GetpLocaleData()->getNumDecimalSep();
mnDecSep = aSep.isEmpty() ? u'.' : aSep[0];
- maSavedDocOptions = ScDocOptions(
- static_cast<const ScTpCalcItem&>(rCoreAttrs.Get(
- GetWhich(SID_SCDOCOPTIONS))).GetDocOptions());
+ maSavedDocOptions = static_cast<const ScTpCalcItem&>(rCoreAttrs.Get(
+ GetWhich(SID_SCDOCOPTIONS))).GetDocOptions();
}
ScTpFormulaOptions::~ScTpFormulaOptions()
diff --git a/sc/source/ui/styleui/styledlg.cxx b/sc/source/ui/styleui/styledlg.cxx
index f0b261841650..0389a408c6a9 100644
--- a/sc/source/ui/styleui/styledlg.cxx
+++ b/sc/source/ui/styleui/styledlg.cxx
@@ -113,7 +113,7 @@ void ScStyleDlg::PageCreated(const OString& rPageId, SfxTabPage& rTabPage)
OSL_ENSURE( pInfoItem, "NumberInfoItem not found!" );
- aSet.Put (SvxNumberInfoItem( static_cast<const SvxNumberInfoItem&>(*pInfoItem) ) );
+ aSet.Put ( static_cast<const SvxNumberInfoItem&>(*pInfoItem) );
rTabPage.PageCreated(aSet);
}
else if (rPageId == "font")
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 42cb2fb3f90a..2ba69ecc79dc 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -3038,7 +3038,7 @@ bool PrintPageRanges::checkIfAlreadyCalculatedAndSet(
m_aInput.m_nStartCol = nStartCol;
m_aInput.m_nEndCol = nEndCol;
m_aInput.m_nPrintTab = nPrintTab;
- m_aInput.m_aDocSize = Size(rDocSize);
+ m_aInput.m_aDocSize = rDocSize;
return false;
}
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 7c72694a31f4..11c5b1eedbc4 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -666,9 +666,9 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
if( pReqArgs && pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET )
bFormulaMode = static_cast<const SfxBoolItem *>(pItem)->GetValue();
- ScViewOptions rSetOpts = ScViewOptions( rOpts );
- rSetOpts.SetOption( VOPT_FORMULAS, bFormulaMode );
- rViewData.SetOptions( rSetOpts );
+ ScViewOptions aSetOpts = rOpts;
+ aSetOpts.SetOption( VOPT_FORMULAS, bFormulaMode );
+ rViewData.SetOptions( aSetOpts );
rViewData.GetDocShell()->PostPaintGridAll();
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx
index 053604793e76..6043686a2d06 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx
@@ -162,7 +162,7 @@ public:
std::shared_ptr<BitmapReplacement> PngCompression::Compress (const BitmapEx& rBitmap) const
{
- vcl::PNGWriter aWriter ((BitmapEx(rBitmap)));
+ vcl::PNGWriter aWriter(rBitmap);
SvMemoryStream aStream (32768, 32768);
aWriter.Write(aStream);
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index b301c8bf1775..6ffa9cd930f8 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -1018,10 +1018,10 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
aAny <<= static_cast<sal_Int32>( GetPage()->GetSize().getHeight() );
break;
case WID_PAGE_ORIENT:
- aAny <<= view::PaperOrientation(
+ aAny <<=
GetPage()->GetOrientation() == Orientation::Portrait
? view::PaperOrientation_PORTRAIT
- : view::PaperOrientation_LANDSCAPE);
+ : view::PaperOrientation_LANDSCAPE;
break;
case WID_PAGE_EFFECT:
aAny <<= GetPage()->GetFadeEffect();
diff --git a/sd/source/ui/unoidl/unowcntr.cxx b/sd/source/ui/unoidl/unowcntr.cxx
index 7583b1f569d4..bff99b1b3530 100644
--- a/sd/source/ui/unoidl/unowcntr.cxx
+++ b/sd/source/ui/unoidl/unowcntr.cxx
@@ -49,7 +49,7 @@ void SvUnoWeakContainer::insert( const uno::WeakReference< uno::XInterface >& xR
++it;
}
}
- maVector.emplace_back( uno::WeakReference< uno::XInterface >( xRef ) );
+ maVector.emplace_back( xRef );
}
/** searches the container for a ref that returns true on the given
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index eb00b2d08ae6..898643cb79e3 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -487,7 +487,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
break;
case SID_ATTR_CHAR_CASEMAP:
{
- aNewAttr.Put( SvxCaseMapItem( aEditAttr.Get( EE_CHAR_CASEMAP ) ) );
+ aNewAttr.Put( aEditAttr.Get( EE_CHAR_CASEMAP ) );
}
break;
case SID_ATTR_CHAR_STRIKEOUT:
diff --git a/sdext/source/presenter/PresenterScreen.cxx b/sdext/source/presenter/PresenterScreen.cxx
index 55c9faaae693..a0333918736a 100644
--- a/sdext/source/presenter/PresenterScreen.cxx
+++ b/sdext/source/presenter/PresenterScreen.cxx
@@ -312,8 +312,7 @@ void PresenterScreen::InitializePresenterScreen()
try
{
Reference<XComponentContext> xContext (mxContextWeak);
- mpPaneContainer =
- new PresenterPaneContainer(Reference<XComponentContext>(xContext));
+ mpPaneContainer = new PresenterPaneContainer(xContext);
Reference<XPresentationSupplier> xPS ( mxModel, UNO_QUERY_THROW);
Reference<XPresentation2> xPresentation(xPS->getPresentation(), UNO_QUERY_THROW);
diff --git a/sfx2/source/control/charwin.cxx b/sfx2/source/control/charwin.cxx
index 1a1fac096ac2..ae03b958805d 100644
--- a/sfx2/source/control/charwin.cxx
+++ b/sfx2/source/control/charwin.cxx
@@ -236,7 +236,7 @@ void SvxCharView::setClearAllClickHdl(const Link<SvxCharView*,void> &rLink)
void SvxCharView::SetFont( const vcl::Font& rFont )
{
long nWinHeight = GetOutputSizePixel().Height();
- maFont = vcl::Font(rFont);
+ maFont = rFont;
maFont.SetWeight(WEIGHT_NORMAL);
maFont.SetAlignment(ALIGN_TOP);
maFont.SetFontSize(mxVirDev->PixelToLogic(Size(0, nWinHeight / 2)));
@@ -435,7 +435,7 @@ void SvxCharViewControl::setMouseClickHdl(const Link<SvxCharViewControl*,void> &
void SvxCharViewControl::SetFont( const vcl::Font& rFont )
{
long nWinHeight = GetOutputSizePixel().Height();
- maFont = vcl::Font(rFont);
+ maFont = rFont;
maFont.SetWeight(WEIGHT_NORMAL);
maFont.SetAlignment(ALIGN_TOP);
maFont.SetFontSize(PixelToLogic(Size(0, nWinHeight / 2)));
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index c6e336e0231b..77909e8f44f0 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -918,7 +918,7 @@ bool SfxDocumentPage::FillItemSet( SfxItemSet* rSet )
const SfxDocumentInfoItem* pInfoItem = static_cast<const SfxDocumentInfoItem*>(pItem);
bool bUseData = ( TRISTATE_TRUE == m_pUseUserDataCB->GetState() );
const_cast<SfxDocumentInfoItem*>(pInfoItem)->SetUseUserData( bUseData );
- rSet->Put( SfxDocumentInfoItem( *pInfoItem ) );
+ rSet->Put( *pInfoItem );
bRet = true;
}
}
@@ -955,7 +955,7 @@ bool SfxDocumentPage::FillItemSet( SfxItemSet* rSet )
const SfxDocumentInfoItem* pInfoItem = static_cast<const SfxDocumentInfoItem*>(pItem);
bool bUseThumbnail = ( TRISTATE_TRUE == m_pUseThumbnailSaveCB->GetState() );
const_cast<SfxDocumentInfoItem*>(pInfoItem)->SetUseThumbnailSave( bUseThumbnail );
- rSet->Put( SfxDocumentInfoItem( *pInfoItem ) );
+ rSet->Put( *pInfoItem );
bRet = true;
}
}
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index 561d1dbe1a30..ce1918b82209 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -111,7 +111,7 @@ BrowseBox::BrowseBox( vcl::Window* pParent, WinBits nBits, BrowserMode nMode )
:Control( pParent, nBits | WB_3DLOOK )
,DragSourceHelper( this )
,DropTargetHelper( this )
- ,aHScroll( VclPtr<ScrollBar>::Create(this, WinBits( WB_HSCROLL )) )
+ ,aHScroll( VclPtr<ScrollBar>::Create(this, WB_HSCROLL) )
{
ConstructImpl( nMode );
}
@@ -2146,10 +2146,9 @@ void BrowseBox::SetMode( BrowserMode nMode )
WinBits nVScrollWinBits =
WB_VSCROLL | ( ( nMode & BrowserMode::THUMBDRAGGING ) ? WB_DRAG : 0 );
- pVScroll = VclPtr<ScrollBar>(
- ( nMode & BrowserMode::TRACKING_TIPS ) == BrowserMode::TRACKING_TIPS
+ pVScroll = ( nMode & BrowserMode::TRACKING_TIPS ) == BrowserMode::TRACKING_TIPS
? VclPtr<BrowserScrollBar>::Create( this, nVScrollWinBits, pDataWin.get() )
- : VclPtr<ScrollBar>::Create( this, nVScrollWinBits ));
+ : VclPtr<ScrollBar>::Create( this, nVScrollWinBits );
pVScroll->SetLineSize( 1 );
pVScroll->SetPageSize(1);
pVScroll->SetScrollHdl( LINK( this, BrowseBox, ScrollHdl ) );
diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx
index 3e8ea365970b..d241e1b35913 100644
--- a/svtools/source/brwbox/datwin.cxx
+++ b/svtools/source/brwbox/datwin.cxx
@@ -174,7 +174,7 @@ void BrowserColumn::ZoomChanged(const Fraction& rNewZoom)
BrowserDataWin::BrowserDataWin( BrowseBox* pParent )
- :Control( pParent, WinBits(WB_CLIPCHILDREN) )
+ :Control( pParent, WB_CLIPCHILDREN )
,DragSourceHelper( this )
,DropTargetHelper( this )
,pHeaderBar( nullptr )
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index fa7f7b791b1d..2a247d2b9dac 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -404,7 +404,7 @@ void EmbeddedObjectRef::GetReplacement( bool bUpdate )
if ( bUpdate )
{
if (mpImpl->pGraphic)
- aOldGraphic = Graphic(*mpImpl->pGraphic);
+ aOldGraphic = *mpImpl->pGraphic;
mpImpl->pGraphic.reset();
mpImpl->aMediaType.clear();
diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx
index 7067627f47cb..15de4be75752 100644
--- a/svx/source/sdr/contact/viewcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx
@@ -210,8 +210,7 @@ namespace sdr
xRetval.push_back(
drawinglayer::primitive2d::Primitive2DReference(
new drawinglayer::primitive2d::BitmapPrimitive2D(
- BitmapEx(aDraftBitmap),
- aBitmapMatrix)));
+ aDraftBitmap, aBitmapMatrix)));
// consume bitmap size in X
aScale.setX(std::max(0.0, aScale.getX() - (fWidth + fDistance)));
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index 7dc13f36aa28..0d13c56091d5 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -293,7 +293,7 @@ namespace drawinglayer
if(0.0 != fStartWidth)
{
- aStartPolyPolygon = basegfx::B2DPolyPolygon(rSet.Get(XATTR_LINESTART).GetLineStartValue());
+ aStartPolyPolygon = rSet.Get(XATTR_LINESTART).GetLineStartValue();
if(aStartPolyPolygon.count() && aStartPolyPolygon.getB2DPolygon(0).count())
{
@@ -316,7 +316,7 @@ namespace drawinglayer
if(0.0 != fEndWidth)
{
- aEndPolyPolygon = basegfx::B2DPolyPolygon(rSet.Get(XATTR_LINEEND).GetLineEndValue());
+ aEndPolyPolygon = rSet.Get(XATTR_LINEEND).GetLineEndValue();
if(aEndPolyPolygon.count() && aEndPolyPolygon.getB2DPolygon(0).count())
{
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 0f60b411ede2..6bc9b8fa006b 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -1612,7 +1612,7 @@ DECLARE_ODFEXPORT_TEST(testTableStyles2, "table_styles_2.odt")
xCell1Style->getPropertyValue("CharWeight") >>= fFloat;
CPPUNIT_ASSERT_EQUAL(float(100.), fFloat);
xCell1Style->getPropertyValue("CharPosture") >>= eCharPosture;
- CPPUNIT_ASSERT_EQUAL(awt::FontSlant(awt::FontSlant_NONE), eCharPosture);
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, eCharPosture);
xCell1Style->getPropertyValue("CharFontName") >>= sString;
CPPUNIT_ASSERT_EQUAL(OUString("Courier"), sString);
xCell1Style->getPropertyValue("CharFontStyleName") >>= sString;
@@ -1627,7 +1627,7 @@ DECLARE_ODFEXPORT_TEST(testTableStyles2, "table_styles_2.odt")
xCell1Style->getPropertyValue("CharWeightAsian") >>= fFloat;
CPPUNIT_ASSERT_EQUAL(float(100.), fFloat);
xCell1Style->getPropertyValue("CharPostureAsian") >>= eCharPosture;
- CPPUNIT_ASSERT_EQUAL(awt::FontSlant(awt::FontSlant_NONE), eCharPosture);
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, eCharPosture);
xCell1Style->getPropertyValue("CharFontNameAsian") >>= sString;
CPPUNIT_ASSERT_EQUAL(OUString("Courier"), sString);
xCell1Style->getPropertyValue("CharFontStyleNameAsian") >>= sString;
@@ -1642,7 +1642,7 @@ DECLARE_ODFEXPORT_TEST(testTableStyles2, "table_styles_2.odt")
xCell1Style->getPropertyValue("CharWeightComplex") >>= fFloat;
CPPUNIT_ASSERT_EQUAL(float(100.), fFloat);
xCell1Style->getPropertyValue("CharPostureComplex") >>= eCharPosture;
- CPPUNIT_ASSERT_EQUAL(awt::FontSlant(awt::FontSlant_NONE), eCharPosture);
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, eCharPosture);
xCell1Style->getPropertyValue("CharFontNameComplex") >>= sString;
CPPUNIT_ASSERT_EQUAL(OUString("Courier"), sString);
xCell1Style->getPropertyValue("CharFontStyleNameComplex") >>= sString;
@@ -1673,7 +1673,7 @@ DECLARE_ODFEXPORT_TEST(testTableStyles2, "table_styles_2.odt")
xCell1Style->getPropertyValue("CharWeight") >>= fFloat;
CPPUNIT_ASSERT_EQUAL(float(150.), fFloat);
xCell1Style->getPropertyValue("CharPosture") >>= eCharPosture;
- CPPUNIT_ASSERT_EQUAL(awt::FontSlant(awt::FontSlant_NONE), eCharPosture);
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, eCharPosture);
xCell1Style->getPropertyValue("CharFontName") >>= sString;
CPPUNIT_ASSERT_EQUAL(OUString("Liberation Serif"), sString);
xCell1Style->getPropertyValue("CharFontStyleName") >>= sString;
@@ -1688,7 +1688,7 @@ DECLARE_ODFEXPORT_TEST(testTableStyles2, "table_styles_2.odt")
xCell1Style->getPropertyValue("CharWeightAsian") >>= fFloat;
CPPUNIT_ASSERT_EQUAL(float(150.), fFloat);
xCell1Style->getPropertyValue("CharPostureAsian") >>= eCharPosture;
- CPPUNIT_ASSERT_EQUAL(awt::FontSlant(awt::FontSlant_NONE), eCharPosture);
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, eCharPosture);
xCell1Style->getPropertyValue("CharFontNameAsian") >>= sString;
CPPUNIT_ASSERT_EQUAL(OUString("Liberation Serif"), sString);
xCell1Style->getPropertyValue("CharFontStyleNameAsian") >>= sString;
@@ -1703,7 +1703,7 @@ DECLARE_ODFEXPORT_TEST(testTableStyles2, "table_styles_2.odt")
xCell1Style->getPropertyValue("CharWeightComplex") >>= fFloat;
CPPUNIT_ASSERT_EQUAL(float(150.), fFloat);
xCell1Style->getPropertyValue("CharPostureComplex") >>= eCharPosture;
- CPPUNIT_ASSERT_EQUAL(awt::FontSlant(awt::FontSlant_NONE), eCharPosture);
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, eCharPosture);
xCell1Style->getPropertyValue("CharFontNameComplex") >>= sString;
CPPUNIT_ASSERT_EQUAL(OUString("Liberation Serif"), sString);
xCell1Style->getPropertyValue("CharFontStyleNameComplex") >>= sString;
@@ -1734,7 +1734,7 @@ DECLARE_ODFEXPORT_TEST(testTableStyles2, "table_styles_2.odt")
xCell1Style->getPropertyValue("CharWeight") >>= fFloat;
CPPUNIT_ASSERT_EQUAL(float(100.), fFloat);
xCell1Style->getPropertyValue("CharPosture") >>= eCharPosture;
- CPPUNIT_ASSERT_EQUAL(awt::FontSlant(awt::FontSlant_ITALIC), eCharPosture);
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, eCharPosture);
xCell1Style->getPropertyValue("CharFontName") >>= sString;
CPPUNIT_ASSERT_EQUAL(OUString("Open Sans"), sString);
xCell1Style->getPropertyValue("CharFontStyleName") >>= sString;
@@ -1749,7 +1749,7 @@ DECLARE_ODFEXPORT_TEST(testTableStyles2, "table_styles_2.odt")
xCell1Style->getPropertyValue("CharWeightAsian") >>= fFloat;
CPPUNIT_ASSERT_EQUAL(float(100.), fFloat);
xCell1Style->getPropertyValue("CharPostureAsian") >>= eCharPosture;
- CPPUNIT_ASSERT_EQUAL(awt::FontSlant(awt::FontSlant_ITALIC), eCharPosture);
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, eCharPosture);
xCell1Style->getPropertyValue("CharFontNameAsian") >>= sString;
CPPUNIT_ASSERT_EQUAL(OUString("Open Sans"), sString);
xCell1Style->getPropertyValue("CharFontStyleNameAsian") >>= sString;
@@ -1764,7 +1764,7 @@ DECLARE_ODFEXPORT_TEST(testTableStyles2, "table_styles_2.odt")
xCell1Style->getPropertyValue("CharWeightComplex") >>= fFloat;
CPPUNIT_ASSERT_EQUAL(float(100.), fFloat);
xCell1Style->getPropertyValue("CharPostureComplex") >>= eCharPosture;
- CPPUNIT_ASSERT_EQUAL(awt::FontSlant(awt::FontSlant_ITALIC), eCharPosture);
+ CPPUNIT_ASSERT_EQUAL(awt::FontSlant_ITALIC, eCharPosture);
xCell1Style->getPropertyValue("CharFontNameComplex") >>= sString;
CPPUNIT_ASSERT_EQUAL(OUString("Open Sans"), sString);
xCell1Style->getPropertyValue("CharFontStyleNameComplex") >>= sString;
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index b711a3cbbd90..a636718275a3 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -4562,7 +4562,7 @@ void SwUiWriterTest::testTdf96479()
CPPUNIT_ASSERT(!xCursorNew->isCollapsed());
xCursorNew->getText()->insertTextContent(xCursorNew, xTextField, true);
xBookmarkNew = uno::Reference<text::XTextContent>(xBookmarksSupplier->getBookmarks()->getByName("replacement"), uno::UNO_QUERY);
- xCursorNew = uno::Reference<text::XTextCursor>(xBookmarkNew->getAnchor()->getText()->createTextCursorByRange(xBookmarkNew->getAnchor()));
+ xCursorNew = xBookmarkNew->getAnchor()->getText()->createTextCursorByRange(xBookmarkNew->getAnchor());
CPPUNIT_ASSERT(!xCursorNew->isCollapsed());
// Can't check the actual content of the text node via UNO
diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx
index c617a62a4e22..3057d226957f 100644
--- a/sw/source/core/access/accfrmobj.cxx
+++ b/sw/source/core/access/accfrmobj.cxx
@@ -234,7 +234,7 @@ SwRect SwAccessibleChild::GetBox( const SwAccessibleMap& rAccMap ) const
}
else if ( mpFrame->IsTabFrame() )
{
- aBox = SwRect( mpFrame->getFrameArea() );
+ aBox = mpFrame->getFrameArea();
aBox.Intersection( mpFrame->GetUpper()->getFrameArea() );
}
else
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 4d80b9a2302e..f9665474a1a7 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -585,7 +585,7 @@ void SwCalc::VarChange( const OUString& rStr, const SwSbxValue& rValue )
if( !pFnd )
{
- pFnd = new SwCalcExp( aStr, SwSbxValue( rValue ), nullptr );
+ pFnd = new SwCalcExp( aStr, rValue, nullptr );
pFnd->pNext = std::move( m_aVarTable[ nPos ] );
m_aVarTable[ nPos ].reset( pFnd );
}
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 798ca463b69e..ad453fc2b8de 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1442,11 +1442,11 @@ bool SwCursor::SelectWordWT( SwViewShell const * pViewShell, sal_Int16 nWordType
--w.m_nPtIndex;
w.AssignBack(pTextNd, nPtPos);
- aBndry = Boundary( g_pBreakIt->GetBreakIter()->getWordBoundary(
+ aBndry = g_pBreakIt->GetBreakIter()->getWordBoundary(
*w.m_pText, w.m_nPtIndex,
g_pBreakIt->GetLocale( pTextNd->GetLang( nPtPos ) ),
nWordType,
- bForward ));
+ bForward );
}
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index aaa9731bba31..7710f4a2b8a7 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -141,13 +141,13 @@ namespace
bool bPosAtEndOfNode = false;
if ( pNode == nullptr)
{
- SwNodeIndex aEnd = SwNodeIndex(rEnd);
+ SwNodeIndex aEnd = rEnd;
pNode = rEnd.GetNodes().GoNext( &aEnd );
bPosAtEndOfNode = false;
}
if ( pNode == nullptr )
{
- SwNodeIndex aStt = SwNodeIndex(rStt);
+ SwNodeIndex aStt = rStt;
pNode = SwNodes::GoPrevious(&aStt);
bPosAtEndOfNode = true;
}
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 3d04e1eaff69..d39c33c2f5a5 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1664,8 +1664,7 @@ void SwTOXBaseSection::UpdatePageNum_( SwTextNode* pNd,
sal_uInt16 nOld = rNums[0],
nBeg = nOld,
nCount = 0;
- OUString aNumStr( SvxNumberType( rDescs[0]->GetNumType() ).
- GetNumStr( nBeg ) );
+ OUString aNumStr( rDescs[0]->GetNumType().GetNumStr( nBeg ) );
if( xCharStyleIdx && lcl_HasMainEntry( pMainEntryNums, nBeg ))
{
xCharStyleIdx->push_back( 0 );
@@ -1759,7 +1758,7 @@ void SwTOXBaseSection::UpdatePageNum_( SwTextNode* pNd,
aNumStr += S_PAGE_DELI;
//#58127# If nCount == 0, then the only PageNumber is already in aNumStr!
if(nCount)
- aNumStr += SvxNumberType( rDescs[i-1]->GetNumType() ).GetNumStr( nBeg+nCount );
+ aNumStr += rDescs[i-1]->GetNumType().GetNumStr( nBeg+nCount );
}
}
pNd->InsertText( aNumStr, aPos, SwInsertFlags::EMPTYEXPAND | SwInsertFlags::FORCEHINTEXPAND );
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index de8d04311d64..dfa37544339e 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -734,7 +734,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects, S
{
// get a copy instead of a reference, because an <insert> may destroy
// the object due to a necessary array resize.
- const SwLineRect aSubsLineRect = SwLineRect(aLineRects[i]);
+ const SwLineRect aSubsLineRect(aLineRects[i]);
// add condition <aSubsLineRect.IsLocked()> in order to consider only
// border lines, which are *not* locked.
@@ -3576,9 +3576,9 @@ void SwColumnFrame::PaintBreak( ) const
aRect.Left() + nTextOff, aRect.Top() ) );
if ( IsVertical() )
{
- aTextMatrix = basegfx::B2DHomMatrix( basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix (
+ aTextMatrix = basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix (
aFontSize.getX(), aFontSize.getY(), 0.0, M_PI_2,
- aRect.Right(), aRect.Top() + nTextOff ) );
+ aRect.Right(), aRect.Top() + nTextOff );
}
drawinglayer::primitive2d::TextSimplePortionPrimitive2D * pText =
diff --git a/sw/source/ui/chrdlg/tblnumfm.cxx b/sw/source/ui/chrdlg/tblnumfm.cxx
index 46fe5c8455e4..d790a7e7d03d 100644
--- a/sw/source/ui/chrdlg/tblnumfm.cxx
+++ b/sw/source/ui/chrdlg/tblnumfm.cxx
@@ -38,7 +38,7 @@ SwNumFormatDlg::SwNumFormatDlg(weld::Window* pParent, const SfxItemSet& rSet)
TabPageParent pPageParent(get_content_area(), this);
VclPtr<SfxTabPage> xNewPage = (*fnCreatePage)(pPageParent, &rSet);
SfxAllItemSet aSet(*(rSet.GetPool()));
- aSet.Put(SvxNumberInfoItem(xNewPage->GetItemSet().Get( SID_ATTR_NUMBERFORMAT_INFO)));
+ aSet.Put(xNewPage->GetItemSet().Get( SID_ATTR_NUMBERFORMAT_INFO));
xNewPage->PageCreated(aSet);
SetTabPage(xNewPage);
}
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 43ab57535bec..1b630df9b71f 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -418,7 +418,7 @@ void SwCaptionPreview::ApplySettings(vcl::RenderContext& rRenderContext)
if (!mbFontInitialized)
{
- maFont = vcl::Font(rRenderContext.GetFont());
+ maFont = rRenderContext.GetFont();
maFont.SetFontHeight(maFont.GetFontHeight() * 120 / 100);
mbFontInitialized = true;
}
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index f8fd3b7739a0..211b36959e83 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -213,7 +213,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
convertTwipToMm100(aCrop.GetRight()),
convertTwipToMm100(aCrop.GetBottom()) );
- Graphic aGraphic = Graphic( *pGraphic );
+ Graphic aGraphic = *pGraphic;
CompressGraphicsDialog aDialog(GetView().GetFrameWeld(), aGraphic, aSize, aCropRectangle, GetView().GetViewFrame()->GetBindings());
if (aDialog.run() == RET_OK)
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index 80d11e67ec02..a66e6f165bdf 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -829,7 +829,7 @@ void SwSrcView::Load(SwDocShell* pDocShell)
ErrCode nRes = aWriter.Write(xWriter, &sWriteName);
if(nRes)
{
- ErrorHandler::HandleError(ErrCode(nRes));
+ ErrorHandler::HandleError(nRes);
aEditWin->SetReadonly(true);
}
aMedium.Commit();
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx
index aa679eb392e9..c3d2c69780f7 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -453,7 +453,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
aHeaderSet.Put(aFirstShared);
// Size
- SvxSizeItem aSize(SID_ATTR_PAGE_SIZE, Size(rFrameSize.GetSize()));
+ SvxSizeItem aSize(SID_ATTR_PAGE_SIZE, rFrameSize.GetSize());
aHeaderSet.Put(aSize);
// Shifting frame attributes
@@ -503,7 +503,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
aFooterSet.Put(aFirstShared);
// Size
- SvxSizeItem aSize(SID_ATTR_PAGE_SIZE, Size(rFrameSize.GetSize()));
+ SvxSizeItem aSize(SID_ATTR_PAGE_SIZE, rFrameSize.GetSize());
aFooterSet.Put(aSize);
// Shifting Frame attributes
diff --git a/test/source/screenshot_test.cxx b/test/source/screenshot_test.cxx
index fc4bf5acf447..7028f1f88619 100644
--- a/test/source/screenshot_test.cxx
+++ b/test/source/screenshot_test.cxx
@@ -87,7 +87,7 @@ void ScreenshotTest::implSaveScreenshot(const BitmapEx& rScreenshot, const OStri
SvFileStream aNew(pngUrl, StreamMode::WRITE | StreamMode::TRUNC);
CPPUNIT_ASSERT_MESSAGE(OUStringToOString("Failed to open <" + pngUrl + ">: " + OUString::number(sal_uInt32(aNew.GetErrorCode())), RTL_TEXTENCODING_UTF8).getStr(), aNew.IsOpen());
- vcl::PNGWriter aPNGWriter((BitmapEx(rScreenshot)));
+ vcl::PNGWriter aPNGWriter(rScreenshot);
aPNGWriter.Write(aNew);
}
diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx
index 12d9cb96907d..82b996ed68db 100644
--- a/tools/source/generic/poly2.cxx
+++ b/tools/source/generic/poly2.cxx
@@ -58,7 +58,7 @@ void PolyPolygon::Insert( const tools::Polygon& rPoly, sal_uInt16 nPos )
if ( nPos > mpImplPolyPolygon->mvPolyAry.size() )
nPos = mpImplPolyPolygon->mvPolyAry.size();
- mpImplPolyPolygon->mvPolyAry.insert(mpImplPolyPolygon->mvPolyAry.begin() + nPos, tools::Polygon( rPoly ));
+ mpImplPolyPolygon->mvPolyAry.insert(mpImplPolyPolygon->mvPolyAry.begin() + nPos, rPoly);
}
void PolyPolygon::Remove( sal_uInt16 nPos )
@@ -72,7 +72,7 @@ void PolyPolygon::Replace( const tools::Polygon& rPoly, sal_uInt16 nPos )
{
assert(nPos < Count() && "PolyPolygon::Replace(): nPos >= nSize");
- mpImplPolyPolygon->mvPolyAry[nPos] = tools::Polygon( rPoly );
+ mpImplPolyPolygon->mvPolyAry[nPos] = rPoly;
}
const tools::Polygon& PolyPolygon::GetObject( sal_uInt16 nPos ) const
diff --git a/vcl/inc/opengl/RenderList.hxx b/vcl/inc/opengl/RenderList.hxx
index b8595921a46a..cd8787c824e1 100644
--- a/vcl/inc/opengl/RenderList.hxx
+++ b/vcl/inc/opengl/RenderList.hxx
@@ -120,7 +120,7 @@ private:
double area;
for (size_t i = 1; i < maRectangles.size(); ++i)
{
- aTempRectangle = basegfx::B2DRange(maRectangles[i]);
+ aTempRectangle = maRectangles[i];
aTempRectangle.expand(rDrawRectangle);
area = aTempRectangle.getWidth() * aTempRectangle.getHeight();
if (area < minArea)
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 6c9f9de494d2..7b34620983c2 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -2029,7 +2029,7 @@ bool OpenGLSalGraphicsImpl::drawAlphaRect(
sal_uInt8 nTransparency )
{
VCL_GL_INFO("::drawAlphaRect (" << nX << ", " << nY << ") [" << nWidth << ", " << nHeight << "]");
- mpRenderList->addDrawRectangle(nX, nY, nWidth, nHeight, double(nTransparency / 100.0), mnLineColor, mnFillColor);
+ mpRenderList->addDrawRectangle(nX, nY, nWidth, nHeight, nTransparency / 100.0, mnLineColor, mnFillColor);
PostBatchDraw();
return true;
}
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index b117e34f15d6..ea574dd322dc 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -526,7 +526,7 @@ namespace
Image createImage(VirtualDevice& rDevice)
{
- return Image(BitmapEx(rDevice.GetBitmapEx(Point(), rDevice.GetOutputSizePixel())));
+ return Image(rDevice.GetBitmapEx(Point(), rDevice.GetOutputSizePixel()));
}
void insert_to_menu(PopupMenu* pMenu, int pos, const OUString& rId, const OUString& rStr,
diff --git a/vcl/source/font/FeatureCollector.cxx b/vcl/source/font/FeatureCollector.cxx
index 4e1862388e9a..93cc9cdb1ebb 100644
--- a/vcl/source/font/FeatureCollector.cxx
+++ b/vcl/source/font/FeatureCollector.cxx
@@ -103,7 +103,7 @@ void FeatureCollector::collectForLanguage(hb_tag_t aTableTag, sal_uInt32 nScript
= OpenTypeFeatureDefinitonList::get().getDefinition(aFeatureTag);
if (aDefinition)
{
- rFeature.m_aDefinition = vcl::font::FeatureDefinition(aDefinition);
+ rFeature.m_aDefinition = aDefinition;
}
}
}
diff --git a/vcl/source/graphic/UnoGraphic.cxx b/vcl/source/graphic/UnoGraphic.cxx
index f6a3431a7068..45225261f836 100644
--- a/vcl/source/graphic/UnoGraphic.cxx
+++ b/vcl/source/graphic/UnoGraphic.cxx
@@ -43,7 +43,7 @@ Graphic::~Graphic() throw()
void Graphic::init( const ::Graphic& rGraphic )
throw()
{
- maGraphic = ::Graphic(rGraphic);
+ maGraphic = rGraphic;
unographic::GraphicDescriptor::init(maGraphic);
}
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 08121d571ac5..9428ee709599 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1400,7 +1400,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con
{
ImplBorderFrameData* pData = &maFrameData;
ImplBorderWindow* pBorderWindow = pData->mpBorderWindow;
- Point aTmpPoint = pOffset ? Point(*pOffset) : Point();
+ Point aTmpPoint = pOffset ? *pOffset : Point();
tools::Rectangle aInRect( aTmpPoint, Size( pData->mnWidth, pData->mnHeight ) );
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
DecorationView aDecoView(&rRenderContext);
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index edb7398b69a3..6e782336f75f 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -2470,7 +2470,7 @@ VclPtr<vcl::Window> VclBuilder::insertObject(vcl::Window *pParent, const OString
pCurrentChild->set_font_attribute(rKey, rValue);
}
- m_pParserState->m_aAtkInfo[VclPtr<vcl::Window>(pCurrentChild)] = rAtk;
+ m_pParserState->m_aAtkInfo[pCurrentChild] = rAtk;
}
rProps.clear();
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index eab50a288175..b14bc4d96c80 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -887,7 +887,7 @@ public:
// An offset background for alpha rendering
rDev.SetFillColor(COL_BLUE);
- tools::Rectangle aSurround(r.Center(), Size(aPageShadowMask.GetSizePixel()));
+ tools::Rectangle aSurround(r.Center(), aPageShadowMask.GetSizePixel());
rDev.DrawRect(aSurround);
rDev.DrawBitmapEx(aRenderPt, aWhole);
}
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index 9a7b980ba09d..67121203c7d8 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -1035,8 +1035,7 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
xPropertySet->setPropertyValue("VertOrientRelation",
uno::makeAny(rShape.nVertOrientRelation));
if (rShape.nWrap != text::WrapTextMode::WrapTextMode_MAKE_FIXED_SIZE)
- xPropertySet->setPropertyValue("Surround",
- uno::makeAny(text::WrapTextMode(rShape.nWrap)));
+ xPropertySet->setPropertyValue("Surround", uno::makeAny(rShape.nWrap));
oox::ModelObjectHelper aModelObjectHelper(m_rImport.getModelFactory());
if (aFillModel.moType.has())
{