summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-05 18:03:25 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-03-07 05:57:17 +0000
commit70f87284c6ce77a49b1fac1431cea206f4b1dfa9 (patch)
treef979810ab0761169d094385940612aa1477056d6
parent37a6bafea8416541d7d250d66a9e951400b197a3 (diff)
improve defaultparams loplugin
to catch calling params with defaults like "= OUSString()" Change-Id: Iad060e318ed492c22f8be44e326174fe6d28fff9 Reviewed-on: https://gerrit.libreoffice.org/22932 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--chart2/source/view/charttypes/AreaChart.cxx8
-rw-r--r--chart2/source/view/charttypes/BarChart.cxx8
-rw-r--r--chart2/source/view/charttypes/BubbleChart.cxx4
-rw-r--r--chart2/source/view/charttypes/CandleStickChart.cxx4
-rw-r--r--chart2/source/view/charttypes/NetChart.cxx4
-rw-r--r--chart2/source/view/charttypes/PieChart.cxx4
-rw-r--r--chart2/source/view/diagram/VDiagram.cxx2
-rw-r--r--chart2/source/view/main/ShapeFactory.cxx2
-rw-r--r--compilerplugins/clang/defaultparams.cxx41
-rw-r--r--connectivity/source/drivers/odbc/OStatement.cxx2
-rw-r--r--cppuhelper/source/defaultbootstrap.cxx4
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx4
-rw-r--r--editeng/source/accessibility/AccessibleParaManager.cxx2
-rw-r--r--filter/qa/cppunit/filters-dxf-test.cxx3
-rw-r--r--filter/qa/cppunit/filters-eps-test.cxx3
-rw-r--r--filter/qa/cppunit/filters-met-test.cxx3
-rw-r--r--filter/qa/cppunit/filters-pcd-test.cxx3
-rw-r--r--filter/qa/cppunit/filters-pcx-test.cxx3
-rw-r--r--filter/qa/cppunit/filters-pict-test.cxx3
-rw-r--r--filter/qa/cppunit/filters-ppm-test.cxx6
-rw-r--r--filter/qa/cppunit/filters-psd-test.cxx3
-rw-r--r--filter/qa/cppunit/filters-ras-test.cxx3
-rw-r--r--filter/qa/cppunit/filters-tga-test.cxx3
-rw-r--r--filter/qa/cppunit/filters-tiff-test.cxx3
-rw-r--r--framework/source/uielement/menubarmerger.cxx2
-rw-r--r--hwpfilter/qa/cppunit/test_hwpfilter.cxx3
-rw-r--r--lotuswordpro/qa/cppunit/test_lotuswordpro.cxx3
-rw-r--r--package/qa/cppunit/test_package.cxx3
-rw-r--r--sc/qa/unit/filters-test.cxx10
-rw-r--r--sot/qa/cppunit/test_sot.cxx3
-rw-r--r--sw/source/core/doc/doc.cxx4
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx2
-rw-r--r--ucb/source/ucp/cmis/cmis_content.cxx6
-rw-r--r--ucb/source/ucp/cmis/cmis_repo_content.cxx6
-rw-r--r--vcl/qa/cppunit/graphicfilter/filters-test.cxx27
-rw-r--r--vcl/source/window/menu.cxx10
-rw-r--r--vcl/source/window/toolbox2.cxx4
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx4
-rw-r--r--writerfilter/qa/cppunittests/rtftok/testrtftok.cxx3
-rw-r--r--writerperfect/qa/unit/WpftImportTestBase.cxx4
-rw-r--r--xmloff/source/text/XMLTextMarkImportContext.cxx3
42 files changed, 107 insertions, 119 deletions
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index 3fe22b70c283..8618f269d062 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -651,13 +651,13 @@ void AreaChart::createShapes()
//therefore create an own group for the texts and the error bars to move them to front
//(because the text group is created after the series group the texts are displayed on top)
- m_xSeriesTarget = createGroupShape( m_xLogicTarget,OUString() );
+ m_xSeriesTarget = createGroupShape( m_xLogicTarget );
if( m_bArea )
- m_xErrorBarTarget = createGroupShape( m_xLogicTarget,OUString() );
+ m_xErrorBarTarget = createGroupShape( m_xLogicTarget );
else
m_xErrorBarTarget = m_xSeriesTarget;
- m_xTextTarget = m_pShapeFactory->createGroup2D( m_xFinalTarget,OUString() );
- m_xRegressionCurveEquationTarget = m_pShapeFactory->createGroup2D( m_xFinalTarget,OUString() );
+ m_xTextTarget = m_pShapeFactory->createGroup2D( m_xFinalTarget );
+ m_xRegressionCurveEquationTarget = m_pShapeFactory->createGroup2D( m_xFinalTarget );
//check necessary here that different Y axis can not be stacked in the same group? ... hm?
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx
index cd2019ed024d..10759c3dad4d 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -423,14 +423,14 @@ void BarChart::createShapes()
//to achieve this the regression curve target is created after the series target and before the text target
uno::Reference< drawing::XShapes > xSeriesTarget(
- createGroupShape( m_xLogicTarget,OUString() ));
+ createGroupShape( m_xLogicTarget ));
uno::Reference< drawing::XShapes > xRegressionCurveTarget(
- createGroupShape( m_xLogicTarget,OUString() ));
+ createGroupShape( m_xLogicTarget ));
uno::Reference< drawing::XShapes > xTextTarget(
- m_pShapeFactory->createGroup2D( m_xFinalTarget,OUString() ));
+ m_pShapeFactory->createGroup2D( m_xFinalTarget ));
uno::Reference< drawing::XShapes > xRegressionCurveEquationTarget(
- m_pShapeFactory->createGroup2D( m_xFinalTarget,OUString() ));
+ m_pShapeFactory->createGroup2D( m_xFinalTarget ));
//check necessary here that different Y axis can not be stacked in the same group? ... hm?
double fLogicZ = 1.0;//as defined
diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx
index 11004bb1e54f..2f8356044454 100644
--- a/chart2/source/view/charttypes/BubbleChart.cxx
+++ b/chart2/source/view/charttypes/BubbleChart.cxx
@@ -200,9 +200,9 @@ void BubbleChart::createShapes()
//therefore create an own group for the texts and the error bars to move them to front
//(because the text group is created after the series group the texts are displayed on top)
uno::Reference< drawing::XShapes > xSeriesTarget(
- createGroupShape( m_xLogicTarget,OUString() ));
+ createGroupShape( m_xLogicTarget ));
uno::Reference< drawing::XShapes > xTextTarget(
- m_pShapeFactory->createGroup2D( m_xFinalTarget,OUString() ));
+ m_pShapeFactory->createGroup2D( m_xFinalTarget ));
//update/create information for current group
double fLogicZ = 1.0;//as defined
diff --git a/chart2/source/view/charttypes/CandleStickChart.cxx b/chart2/source/view/charttypes/CandleStickChart.cxx
index d8af62579d0c..892e9e1a5ea4 100644
--- a/chart2/source/view/charttypes/CandleStickChart.cxx
+++ b/chart2/source/view/charttypes/CandleStickChart.cxx
@@ -92,7 +92,7 @@ void CandleStickChart::createShapes()
//(because the text group is created after the series group the texts are displayed on top)
uno::Reference< drawing::XShapes > xSeriesTarget(
- createGroupShape( m_xLogicTarget,OUString() ));
+ createGroupShape( m_xLogicTarget ));
uno::Reference< drawing::XShapes > xLossTarget(
createGroupShape( m_xLogicTarget, ObjectIdentifier::createClassifiedIdentifier(
OBJECTTYPE_DATA_STOCK_LOSS, OUString() )));
@@ -100,7 +100,7 @@ void CandleStickChart::createShapes()
createGroupShape( m_xLogicTarget, ObjectIdentifier::createClassifiedIdentifier(
OBJECTTYPE_DATA_STOCK_GAIN, OUString() )));
uno::Reference< drawing::XShapes > xTextTarget(
- m_pShapeFactory->createGroup2D( m_xFinalTarget,OUString() ));
+ m_pShapeFactory->createGroup2D( m_xFinalTarget ));
//check necessary here that different Y axis can not be stacked in the same group? ... hm?
diff --git a/chart2/source/view/charttypes/NetChart.cxx b/chart2/source/view/charttypes/NetChart.cxx
index 3f971b26719d..a922b54a7b6c 100644
--- a/chart2/source/view/charttypes/NetChart.cxx
+++ b/chart2/source/view/charttypes/NetChart.cxx
@@ -356,8 +356,8 @@ void NetChart::createShapes()
//therefore create an own group for the texts and the error bars to move them to front
//(because the text group is created after the series group the texts are displayed on top)
- m_xSeriesTarget = createGroupShape( m_xLogicTarget,OUString() );
- m_xTextTarget = m_pShapeFactory->createGroup2D( m_xFinalTarget,OUString() );
+ m_xSeriesTarget = createGroupShape( m_xLogicTarget );
+ m_xTextTarget = m_pShapeFactory->createGroup2D( m_xFinalTarget );
//check necessary here that different Y axis can not be stacked in the same group? ... hm?
diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx
index b083f246ac98..9d0458330036 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -506,9 +506,9 @@ void PieChart::createShapes()
///(because the text group is created after the series group the texts are
///displayed on top)
uno::Reference< drawing::XShapes > xSeriesTarget(
- createGroupShape( m_xLogicTarget,OUString() ));
+ createGroupShape( m_xLogicTarget ));
uno::Reference< drawing::XShapes > xTextTarget(
- m_pShapeFactory->createGroup2D( m_xFinalTarget,OUString() ));
+ m_pShapeFactory->createGroup2D( m_xFinalTarget ));
//check necessary here that different Y axis can not be stacked in the same group? ... hm?
///pay attention that the `m_bSwapXAndY` parameter used by the polar
diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx
index 656f0aa1947f..85915f4e350f 100644
--- a/chart2/source/view/diagram/VDiagram.cxx
+++ b/chart2/source/view/diagram/VDiagram.cxx
@@ -479,7 +479,7 @@ void VDiagram::createShapes_3d()
uno::Reference<drawing::XShapes>( m_xOuterGroupShape, uno::UNO_QUERY );
//create additional group to manipulate the aspect ratio of the whole diagram:
- xOuterGroup_Shapes = m_pShapeFactory->createGroup3D( xOuterGroup_Shapes, OUString() );
+ xOuterGroup_Shapes = m_pShapeFactory->createGroup3D( xOuterGroup_Shapes );
m_xAspectRatio3D.set( xOuterGroup_Shapes, uno::UNO_QUERY );
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx
index 5e5ad546ef79..821d77422ec9 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -455,7 +455,7 @@ uno::Reference<drawing::XShape>
if( !xTarget.is() )
return nullptr;
- Reference< drawing::XShapes > xGroup( ShapeFactory::createGroup3D( xTarget, OUString() ) );
+ Reference< drawing::XShapes > xGroup( ShapeFactory::createGroup3D( xTarget ) );
bool bDoubleSided = false;
short nRotatedTexture = 0;
diff --git a/compilerplugins/clang/defaultparams.cxx b/compilerplugins/clang/defaultparams.cxx
index 3e5d5f826349..de030870a7f9 100644
--- a/compilerplugins/clang/defaultparams.cxx
+++ b/compilerplugins/clang/defaultparams.cxx
@@ -60,17 +60,40 @@ bool DefaultParams::VisitCallExpr(CallExpr * callExpr) {
if (!defaultArgExpr) {
break;
}
- APSInt x1, x2;
- if (!((defaultArgExpr->isNullPointerConstant(
- compiler.getASTContext(), Expr::NPC_NeverValueDependent)
- && arg->isNullPointerConstant(
- compiler.getASTContext(), Expr::NPC_NeverValueDependent))
- || (defaultArgExpr->EvaluateAsInt(x1, compiler.getASTContext())
- && arg->EvaluateAsInt(x2, compiler.getASTContext())
- && x1 == x2)))
+ bool found = false;
+ if (defaultArgExpr->isNullPointerConstant(compiler.getASTContext(), Expr::NPC_NeverValueDependent)
+ && arg->isNullPointerConstant(compiler.getASTContext(), Expr::NPC_NeverValueDependent))
{
- break;
+ found = true;
+ }
+ if (!found)
+ {
+ APSInt x1, x2;
+ if (defaultArgExpr->EvaluateAsInt(x1, compiler.getASTContext())
+ && arg->EvaluateAsInt(x2, compiler.getASTContext())
+ && x1 == x2)
+ {
+ found = true;
+ }
}
+ // catch params with defaults like "= OUString()"
+ if (!found
+ && isa<MaterializeTemporaryExpr>(arg)
+ && isa<MaterializeTemporaryExpr>(defaultArgExpr))
+ {
+ const CXXBindTemporaryExpr* strippedArg = dyn_cast_or_null<CXXBindTemporaryExpr>(arg->IgnoreParenCasts());
+ if (strippedArg && isa<CXXTemporaryObjectExpr>(strippedArg->getSubExpr())
+ && dyn_cast<CXXTemporaryObjectExpr>(strippedArg->getSubExpr())->getNumArgs() == 0)
+ {
+ found = true;
+ }
+ }
+ if (!found)
+ break;
+ // Ignore CPPUNIT, it's macros contain some stuff that triggers us
+ StringRef aFileName = compiler.getSourceManager().getFilename(compiler.getSourceManager().getSpellingLoc(parmVarDecl->getLocStart()));
+ if (aFileName.find("include/cppunit") != std::string::npos)
+ break;
report(
DiagnosticsEngine::Warning,
"not necessary to pass this argument, it defaults to the same value",
diff --git a/connectivity/source/drivers/odbc/OStatement.cxx b/connectivity/source/drivers/odbc/OStatement.cxx
index f114b8fc2c64..19d4ad73cdb3 100644
--- a/connectivity/source/drivers/odbc/OStatement.cxx
+++ b/connectivity/source/drivers/odbc/OStatement.cxx
@@ -385,7 +385,7 @@ Reference< XResultSet > OStatement_Base::getResultSet(bool checkCount)
if (m_xResultSet.get().is()) // if resultset already retrieved,
{
// throw exception to avoid sequence error
- ::dbtools::throwFunctionSequenceException(*this,Any());
+ ::dbtools::throwFunctionSequenceException(*this);
}
OResultSet* pRs = nullptr;
diff --git a/cppuhelper/source/defaultbootstrap.cxx b/cppuhelper/source/defaultbootstrap.cxx
index bede6b518af0..037a5897f10d 100644
--- a/cppuhelper/source/defaultbootstrap.cxx
+++ b/cppuhelper/source/defaultbootstrap.cxx
@@ -93,9 +93,7 @@ cppu::defaultBootstrap_InitialComponentContext(rtl::OUString const & iniUri)
true));
assert(!context_values.empty());
css::uno::Reference< css::uno::XComponentContext > context(
- createComponentContext(
- &context_values[0], context_values.size(),
- css::uno::Reference< css::uno::XComponentContext >()));
+ createComponentContext(&context_values[0], context_values.size()));
smgr->setContext(context);
cppu::installTypeDescriptionManager(tmgr.get());
return context;
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index a19442d3200f..43e1a35dd3fa 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1261,7 +1261,7 @@ SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const svx::ODataAccessDesc
bool bEscapeProcessing = true;
extractDescriptorProps(_rDescriptor, sDataSource, sCommand, nCommandType, bEscapeProcessing);
- return getObjectEntry( sDataSource, sCommand, nCommandType, _ppDataSourceEntry, _ppContainerEntry, _bExpandAncestors, SharedConnection() );
+ return getObjectEntry( sDataSource, sCommand, nCommandType, _ppDataSourceEntry, _ppContainerEntry, _bExpandAncestors );
}
void SbaTableQueryBrowser::connectExternalDispatches()
@@ -3678,7 +3678,7 @@ bool SbaTableQueryBrowser::preReloadForm()
{
SvTreeListEntry* pDataSource = nullptr;
SvTreeListEntry* pCommandType = nullptr;
- m_pCurrentlyDisplayed = getObjectEntry( sDataSource, sCommand, nCommandType, &pDataSource, &pCommandType, true, SharedConnection() );
+ m_pCurrentlyDisplayed = getObjectEntry( sDataSource, sCommand, nCommandType, &pDataSource, &pCommandType );
bIni = true;
}
}
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index c5b0dcd74276..fcdbde14192a 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -1603,9 +1603,7 @@ void UpdateRequiredDialogService::setTitle( OUString const & ) throw ( uno::Runt
sal_Int16 UpdateRequiredDialogService::execute() throw ( uno::RuntimeException, std::exception )
{
::rtl::Reference< ::dp_gui::TheExtensionManager > xManager( TheExtensionManager::get(
- m_xComponentContext,
- uno::Reference< awt::XWindow >(),
- OUString() ) );
+ m_xComponentContext) );
xManager->createDialog( true );
sal_Int16 nRet = xManager->execute();
diff --git a/editeng/source/accessibility/AccessibleParaManager.cxx b/editeng/source/accessibility/AccessibleParaManager.cxx
index 907536153e0d..b2a031d2831c 100644
--- a/editeng/source/accessibility/AccessibleParaManager.cxx
+++ b/editeng/source/accessibility/AccessibleParaManager.cxx
@@ -104,7 +104,7 @@ namespace accessibility
{
auto maChild( GetChild( nPara ).first.get() );
if( maChild.is() )
- maChild->FireEvent( nEventId, css::uno::Any(), css::uno::Any() );
+ maChild->FireEvent( nEventId );
}
}
diff --git a/filter/qa/cppunit/filters-dxf-test.cxx b/filter/qa/cppunit/filters-dxf-test.cxx
index c2ebdb96c915..2b1aa3d3e891 100644
--- a/filter/qa/cppunit/filters-dxf-test.cxx
+++ b/filter/qa/cppunit/filters-dxf-test.cxx
@@ -60,8 +60,7 @@ bool DxfFilterTest::load(const OUString &,
void DxfFilterTest::testCVEs()
{
testDir(OUString(),
- getURLFromSrc("/filter/qa/cppunit/data/dxf/"),
- OUString());
+ getURLFromSrc("/filter/qa/cppunit/data/dxf/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(DxfFilterTest);
diff --git a/filter/qa/cppunit/filters-eps-test.cxx b/filter/qa/cppunit/filters-eps-test.cxx
index 984a30d81c7b..830503853d6a 100644
--- a/filter/qa/cppunit/filters-eps-test.cxx
+++ b/filter/qa/cppunit/filters-eps-test.cxx
@@ -60,8 +60,7 @@ bool EpsFilterTest::load(const OUString &,
void EpsFilterTest::testCVEs()
{
testDir(OUString(),
- getURLFromSrc("/filter/qa/cppunit/data/eps/"),
- OUString());
+ getURLFromSrc("/filter/qa/cppunit/data/eps/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(EpsFilterTest);
diff --git a/filter/qa/cppunit/filters-met-test.cxx b/filter/qa/cppunit/filters-met-test.cxx
index ee990d38379d..6bde13af92eb 100644
--- a/filter/qa/cppunit/filters-met-test.cxx
+++ b/filter/qa/cppunit/filters-met-test.cxx
@@ -60,8 +60,7 @@ bool MetFilterTest::load(const OUString &,
void MetFilterTest::testCVEs()
{
testDir(OUString(),
- getURLFromSrc("/filter/qa/cppunit/data/met/"),
- OUString());
+ getURLFromSrc("/filter/qa/cppunit/data/met/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(MetFilterTest);
diff --git a/filter/qa/cppunit/filters-pcd-test.cxx b/filter/qa/cppunit/filters-pcd-test.cxx
index c7f3e7cab583..1ed47487fcdb 100644
--- a/filter/qa/cppunit/filters-pcd-test.cxx
+++ b/filter/qa/cppunit/filters-pcd-test.cxx
@@ -60,8 +60,7 @@ bool PcdFilterTest::load(const OUString &,
void PcdFilterTest::testCVEs()
{
testDir(OUString(),
- getURLFromSrc("/filter/qa/cppunit/data/pcd/"),
- OUString());
+ getURLFromSrc("/filter/qa/cppunit/data/pcd/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(PcdFilterTest);
diff --git a/filter/qa/cppunit/filters-pcx-test.cxx b/filter/qa/cppunit/filters-pcx-test.cxx
index bc7ef55d5691..83d996f15a53 100644
--- a/filter/qa/cppunit/filters-pcx-test.cxx
+++ b/filter/qa/cppunit/filters-pcx-test.cxx
@@ -60,8 +60,7 @@ bool PcxFilterTest::load(const OUString &,
void PcxFilterTest::testCVEs()
{
testDir(OUString(),
- getURLFromSrc("/filter/qa/cppunit/data/pcx/"),
- OUString());
+ getURLFromSrc("/filter/qa/cppunit/data/pcx/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(PcxFilterTest);
diff --git a/filter/qa/cppunit/filters-pict-test.cxx b/filter/qa/cppunit/filters-pict-test.cxx
index ab4170a32fcf..14ba6b8c379c 100644
--- a/filter/qa/cppunit/filters-pict-test.cxx
+++ b/filter/qa/cppunit/filters-pict-test.cxx
@@ -74,8 +74,7 @@ bool PictFilterTest::load(const OUString &,
void PictFilterTest::testCVEs()
{
testDir(OUString(),
- pictURL(),
- OUString());
+ pictURL());
}
void PictFilterTest::testDontClipTooMuch()
diff --git a/filter/qa/cppunit/filters-ppm-test.cxx b/filter/qa/cppunit/filters-ppm-test.cxx
index 349f09d155bc..71b3fc435edb 100644
--- a/filter/qa/cppunit/filters-ppm-test.cxx
+++ b/filter/qa/cppunit/filters-ppm-test.cxx
@@ -60,12 +60,10 @@ bool PpmFilterTest::load(const OUString &,
void PpmFilterTest::testCVEs()
{
testDir(OUString(),
- getURLFromSrc("/filter/qa/cppunit/data/ppm/"),
- OUString());
+ getURLFromSrc("/filter/qa/cppunit/data/ppm/"));
testDir(OUString(),
- getURLFromSrc("/filter/qa/cppunit/data/pbm/"),
- OUString());
+ getURLFromSrc("/filter/qa/cppunit/data/pbm/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(PpmFilterTest);
diff --git a/filter/qa/cppunit/filters-psd-test.cxx b/filter/qa/cppunit/filters-psd-test.cxx
index 27a696a18b18..8c49a238ec18 100644
--- a/filter/qa/cppunit/filters-psd-test.cxx
+++ b/filter/qa/cppunit/filters-psd-test.cxx
@@ -60,8 +60,7 @@ bool PsdFilterTest::load(const OUString &,
void PsdFilterTest::testCVEs()
{
testDir(OUString(),
- getURLFromSrc("/filter/qa/cppunit/data/psd/"),
- OUString());
+ getURLFromSrc("/filter/qa/cppunit/data/psd/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(PsdFilterTest);
diff --git a/filter/qa/cppunit/filters-ras-test.cxx b/filter/qa/cppunit/filters-ras-test.cxx
index 8af8660ea695..a61e0f2ec132 100644
--- a/filter/qa/cppunit/filters-ras-test.cxx
+++ b/filter/qa/cppunit/filters-ras-test.cxx
@@ -60,8 +60,7 @@ bool RasFilterTest::load(const OUString &,
void RasFilterTest::testCVEs()
{
testDir(OUString(),
- getURLFromSrc("/filter/qa/cppunit/data/ras/"),
- OUString());
+ getURLFromSrc("/filter/qa/cppunit/data/ras/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(RasFilterTest);
diff --git a/filter/qa/cppunit/filters-tga-test.cxx b/filter/qa/cppunit/filters-tga-test.cxx
index 91697181fdf3..e105863959e9 100644
--- a/filter/qa/cppunit/filters-tga-test.cxx
+++ b/filter/qa/cppunit/filters-tga-test.cxx
@@ -60,8 +60,7 @@ bool TgaFilterTest::load(const OUString &,
void TgaFilterTest::testCVEs()
{
testDir(OUString(),
- getURLFromSrc("/filter/qa/cppunit/data/tga/"),
- OUString());
+ getURLFromSrc("/filter/qa/cppunit/data/tga/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(TgaFilterTest);
diff --git a/filter/qa/cppunit/filters-tiff-test.cxx b/filter/qa/cppunit/filters-tiff-test.cxx
index e2c6d5e36c5f..6a3e12293dfc 100644
--- a/filter/qa/cppunit/filters-tiff-test.cxx
+++ b/filter/qa/cppunit/filters-tiff-test.cxx
@@ -60,8 +60,7 @@ bool TiffFilterTest::load(const OUString &,
void TiffFilterTest::testCVEs()
{
testDir(OUString(),
- getURLFromSrc("/filter/qa/cppunit/data/tiff/"),
- OUString());
+ getURLFromSrc("/filter/qa/cppunit/data/tiff/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(TiffFilterTest);
diff --git a/framework/source/uielement/menubarmerger.cxx b/framework/source/uielement/menubarmerger.cxx
index 1a95812a87fa..47514143a0dd 100644
--- a/framework/source/uielement/menubarmerger.cxx
+++ b/framework/source/uielement/menubarmerger.cxx
@@ -337,7 +337,7 @@ bool MenuBarMerger::ProcessFallbackOperation(
if ( IsCorrectContext( rMenuItem.aContext, rModuleIdentifier ))
{
if ( rMenuItem.aURL == SEPARATOR_STRING )
- pCurrMenu->InsertSeparator(OString());
+ pCurrMenu->InsertSeparator();
else
{
pCurrMenu->InsertItem(rItemId, rMenuItem.aTitle);
diff --git a/hwpfilter/qa/cppunit/test_hwpfilter.cxx b/hwpfilter/qa/cppunit/test_hwpfilter.cxx
index 6fde479409fb..900d255dc2ee 100644
--- a/hwpfilter/qa/cppunit/test_hwpfilter.cxx
+++ b/hwpfilter/qa/cppunit/test_hwpfilter.cxx
@@ -60,8 +60,7 @@ namespace
void HwpFilterTest::test()
{
testDir(OUString(),
- getURLFromSrc("/hwpfilter/qa/cppunit/data/"),
- OUString());
+ getURLFromSrc("/hwpfilter/qa/cppunit/data/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(HwpFilterTest);
diff --git a/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx b/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx
index d4fe7795e89f..7b4767ff43ac 100644
--- a/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx
+++ b/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx
@@ -62,8 +62,7 @@ namespace
void LotusWordProTest::test()
{
testDir(OUString(),
- getURLFromSrc("/lotuswordpro/qa/cppunit/data/"),
- OUString());
+ getURLFromSrc("/lotuswordpro/qa/cppunit/data/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(LotusWordProTest);
diff --git a/package/qa/cppunit/test_package.cxx b/package/qa/cppunit/test_package.cxx
index d5bf6705db48..c4ae317993e3 100644
--- a/package/qa/cppunit/test_package.cxx
+++ b/package/qa/cppunit/test_package.cxx
@@ -53,8 +53,7 @@ namespace
void PackageTest::test()
{
testDir(OUString(),
- getURLFromSrc("/package/qa/cppunit/data/"),
- OUString());
+ getURLFromSrc("/package/qa/cppunit/data/"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(PackageTest);
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 096d3fb0b82b..cec53a7920ad 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -129,22 +129,22 @@ void ScFiltersTest::testCVEs()
{
#ifndef DISABLE_CVE_TESTS
testDir("Quattro Pro 6.0",
- getURLFromSrc("/sc/qa/unit/data/qpro/"), OUString());
+ getURLFromSrc("/sc/qa/unit/data/qpro/"));
//warning, the current "sylk filter" in sc (docsh.cxx) automatically
//chains on failure on trying as csv, rtf, etc. so "success" may
//not indicate that it imported as .slk.
testDir("SYLK",
- getURLFromSrc("/sc/qa/unit/data/slk/"), OUString());
+ getURLFromSrc("/sc/qa/unit/data/slk/"));
testDir("MS Excel 97",
- getURLFromSrc("/sc/qa/unit/data/xls/"), OUString());
+ getURLFromSrc("/sc/qa/unit/data/xls/"));
testDir("dBase",
- getURLFromSrc("/sc/qa/unit/data/dbf/"), OUString());
+ getURLFromSrc("/sc/qa/unit/data/dbf/"));
testDir("Lotus",
- getURLFromSrc("/sc/qa/unit/data/wks/"), OUString());
+ getURLFromSrc("/sc/qa/unit/data/wks/"));
#endif
}
diff --git a/sot/qa/cppunit/test_sot.cxx b/sot/qa/cppunit/test_sot.cxx
index 52ed35046cf9..50841ad2f9f2 100644
--- a/sot/qa/cppunit/test_sot.cxx
+++ b/sot/qa/cppunit/test_sot.cxx
@@ -118,8 +118,7 @@ namespace
void SotTest::test()
{
testDir(OUString(),
- getURLFromSrc("/sot/qa/cppunit/data/"),
- OUString());
+ getURLFromSrc("/sot/qa/cppunit/data/"));
}
void SotTest::testSize()
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 873df0de487b..1e15fe7a9c38 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -703,7 +703,7 @@ void SwDoc::CalculatePagesForPrinting(
// 1 -> print range according to PageRange
// 2 -> print selection
if (1 == nContent)
- aPageRange = rOptions.getStringValue( "PageRange", OUString() );
+ aPageRange = rOptions.getStringValue( "PageRange" );
if (2 == nContent)
{
// note that printing selections is actually implemented by copying
@@ -930,7 +930,7 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
// 2 -> print selection
const sal_Int64 nContent = rOptions.getIntValue( "PrintContent", 0 );
if (nContent == 1)
- aPageRange = rOptions.getStringValue( "PageRange", OUString() );
+ aPageRange = rOptions.getStringValue( "PageRange" );
if (aPageRange.isEmpty()) // empty string -> print all
{
// set page range to print to 'all pages'
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 853001f2cd08..c0896262989d 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -2979,7 +2979,7 @@ void SAL_CALL SwXTextDocument::render(
if(pVwSh && pOut && m_pRenderData->HasSwPrtOptions())
{
- const OUString aPageRange = m_pPrintUIOptions->getStringValue( "PageRange", OUString() );
+ const OUString aPageRange = m_pPrintUIOptions->getStringValue( "PageRange" );
const bool bFirstPage = m_pPrintUIOptions->getBoolValue( "IsFirstPage" );
bool bIsSkipEmptyPages = !m_pPrintUIOptions->IsPrintEmptyPages( bIsPDFExport );
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 1e7aa847b97f..0fe69368d696 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -397,8 +397,7 @@ namespace cmis
ucbhelper::cancelCommandExecution(
ucb::IOErrorCode_INVALID_DEVICE,
generateErrorArguments(m_aURL),
- xEnv,
- OUString());
+ xEnv);
}
else if ( m_pSession->getRepository() == nullptr )
{
@@ -420,8 +419,7 @@ namespace cmis
ucbhelper::cancelCommandExecution(
ucb::IOErrorCode_ABORT,
uno::Sequence< uno::Any >( 0 ),
- xEnv,
- OUString( ) );
+ xEnv );
throw uno::RuntimeException( );
}
}
diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx b/ucb/source/ucp/cmis/cmis_repo_content.cxx
index 0073108bc2a6..1e4747b97851 100644
--- a/ucb/source/ucp/cmis/cmis_repo_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx
@@ -195,8 +195,7 @@ namespace cmis
ucbhelper::cancelCommandExecution(
ucb::IOErrorCode_INVALID_DEVICE,
uno::Sequence< uno::Any >( 0 ),
- xEnv,
- OUString( ) );
+ xEnv );
m_aRepositories = session->getRepositories( );
}
catch (const libcmis::Exception& e)
@@ -205,8 +204,7 @@ namespace cmis
ucbhelper::cancelCommandExecution(
ucb::IOErrorCode_INVALID_DEVICE,
uno::Sequence< uno::Any >( 0 ),
- xEnv,
- OUString( ) );
+ xEnv );
}
}
else
diff --git a/vcl/qa/cppunit/graphicfilter/filters-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-test.cxx
index ab0e1221ad67..76dfcf07121c 100644
--- a/vcl/qa/cppunit/graphicfilter/filters-test.cxx
+++ b/vcl/qa/cppunit/graphicfilter/filters-test.cxx
@@ -123,40 +123,31 @@ void VclFiltersTest::testCVEs()
{
#ifndef DISABLE_CVE_TESTS
testDir(OUString(),
- getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/wmf/"),
- OUString());
+ getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/wmf/"));
testDir(OUString(),
- getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/emf/"),
- OUString());
+ getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/emf/"));
testDir(OUString(),
- getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/sgv/"),
- OUString());
+ getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/sgv/"));
testDir(OUString(),
- getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/png/"),
- OUString());
+ getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/png/"));
testDir(OUString(),
- getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/jpg/"),
- OUString());
+ getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/jpg/"));
testDir(OUString(),
- getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/gif/"),
- OUString());
+ getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/gif/"));
testDir(OUString(),
- getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/bmp/"),
- OUString());
+ getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/bmp/"));
testDir(OUString(),
- getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/xbm/"),
- OUString());
+ getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/xbm/"));
testDir(OUString(),
- getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/xpm/"),
- OUString());
+ getURLFromSrc("/vcl/qa/cppunit/graphicfilter/data/xpm/"));
#endif
}
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 8d5bb2aa6760..489638bdf9b9 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -456,16 +456,16 @@ void Menu::InsertItem( const ResId& rResId )
Bitmap aBmp( ResId( static_cast<RSHEADER_TYPE*>(GetClassRes()), *pMgr ) );
Image const aImg(aBmp);
if ( !aText.isEmpty() )
- InsertItem( nItemId, aText, aImg, nStatus, OString() );
+ InsertItem( nItemId, aText, aImg, nStatus );
else
- InsertItem( nItemId, aImg, nStatus, OString() );
+ InsertItem( nItemId, aImg, nStatus );
}
IncrementRes( GetObjSizeRes( static_cast<RSHEADER_TYPE*>(GetClassRes()) ) );
}
else if ( !bSep )
- InsertItem(nItemId, aText, nStatus, OString());
+ InsertItem(nItemId, aText, nStatus);
if ( bSep )
- InsertSeparator(OString());
+ InsertSeparator();
OUString aHelpText;
if ( nObjMask & RSC_MENUITEM_HELPTEXT )
@@ -535,7 +535,7 @@ void Menu::InsertItem(const OUString& rCommand, const css::uno::Reference<css::f
sal_uInt16 nItemId = GetItemCount() + 1;
- InsertItem(nItemId, aLabel, aImage, MenuItemBits::NONE, OString());
+ InsertItem(nItemId, aLabel, aImage);
SetItemCommand(nItemId, rCommand);
SetHelpText(nItemId, aTooltip);
}
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 7f904ffd0faa..f52211f0f613 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1836,7 +1836,7 @@ void ToolBox::UpdateCustomMenu()
{
sal_uInt16 id = it->mnId + TOOLBOX_MENUITEM_START;
MenuItemBits nMenuItemBits = ConvertBitsFromToolBoxToMenu(it->mnBits);
- pMenu->InsertItem( id, it->maText, it->maImageOriginal, nMenuItemBits, OString());
+ pMenu->InsertItem( id, it->maText, it->maImageOriginal, nMenuItemBits);
pMenu->SetItemCommand( id, it->maCommandStr );
pMenu->EnableItem( id, it->mbEnabled );
pMenu->CheckItem ( id, it->meState == TRISTATE_TRUE );
@@ -1854,7 +1854,7 @@ void ToolBox::UpdateCustomMenu()
{
sal_uInt16 id = it->mnId + TOOLBOX_MENUITEM_START;
MenuItemBits nMenuItemBits = ConvertBitsFromToolBoxToMenu(it->mnBits);
- pMenu->InsertItem( id, it->maText, it->maImageOriginal, nMenuItemBits, OString() );
+ pMenu->InsertItem( id, it->maText, it->maImageOriginal, nMenuItemBits );
pMenu->SetItemCommand( id, it->maCommandStr );
pMenu->EnableItem( id, it->mbEnabled );
pMenu->CheckItem( id, it->meState == TRISTATE_TRUE );
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 408d52cb5ad6..bb7db4a0622d 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -1482,7 +1482,7 @@ void PPDParser::getDefaultResolution( int& rXRes, int& rYRes ) const
OUString PPDParser::translateKey( const OUString& i_rKey ) const
{
- OUString aResult( m_pTranslator->translateKey( i_rKey, css::lang::Locale() ) );
+ OUString aResult( m_pTranslator->translateKey( i_rKey ) );
if( aResult.isEmpty() )
aResult = i_rKey;
return aResult;
@@ -1491,7 +1491,7 @@ OUString PPDParser::translateKey( const OUString& i_rKey ) const
OUString PPDParser::translateOption( const OUString& i_rKey,
const OUString& i_rOption ) const
{
- OUString aResult( m_pTranslator->translateOption( i_rKey, i_rOption, css::lang::Locale() ) );
+ OUString aResult( m_pTranslator->translateOption( i_rKey, i_rOption ) );
if( aResult.isEmpty() )
aResult = i_rOption;
return aResult;
diff --git a/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx b/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx
index 8c31f92abe9a..775550f2c060 100644
--- a/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx
+++ b/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx
@@ -80,8 +80,7 @@ void RtfTest::test()
{
#ifndef DISABLE_CVE_TESTS
testDir(OUString(),
- getURLFromSrc("/writerfilter/qa/cppunittests/rtftok/data/"),
- OUString());
+ getURLFromSrc("/writerfilter/qa/cppunittests/rtftok/data/"));
#endif
}
diff --git a/writerperfect/qa/unit/WpftImportTestBase.cxx b/writerperfect/qa/unit/WpftImportTestBase.cxx
index 8b66c3b64f5a..ac785038b60c 100644
--- a/writerperfect/qa/unit/WpftImportTestBase.cxx
+++ b/writerperfect/qa/unit/WpftImportTestBase.cxx
@@ -172,14 +172,14 @@ bool WpftImportTestBase::load(const OUString &, const OUString &rURL, const OUSt
void WpftImportTestBase::doTest(const rtl::OUString &rFilter, const rtl::OUString &rPath)
{
m_xFilter.set(m_xFactory->createInstanceWithContext(rFilter, m_xContext), uno::UNO_QUERY_THROW);
- testDir(OUString(), getURLFromSrc(rPath), OUString());
+ testDir(OUString(), getURLFromSrc(rPath));
}
void WpftImportTestBase::doTest(const rtl::OUString &rFilter, const rtl::OUString &rPath, const WpftOptionalMap_t &rOptionalMap)
{
m_xFilter.set(m_xFactory->createInstanceWithContext(rFilter, m_xContext), uno::UNO_QUERY_THROW);
m_pOptionalMap = &rOptionalMap;
- testDir(OUString(), getURLFromSrc(rPath), OUString());
+ testDir(OUString(), getURLFromSrc(rPath));
m_pOptionalMap = nullptr;
}
diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx
index 464aa2935fb0..8774c47f6aa7 100644
--- a/xmloff/source/text/XMLTextMarkImportContext.cxx
+++ b/xmloff/source/text/XMLTextMarkImportContext.cxx
@@ -197,8 +197,7 @@ void XMLTextMarkImportContext::EndElement()
CreateAndInsertMark(GetImport(),
sAPI_reference_mark,
m_sBookmarkName,
- m_rHelper.GetCursorAsRange()->getStart(),
- OUString());
+ m_rHelper.GetCursorAsRange()->getStart());
break;
case TypeBookmark: