improve loplugin passparamsbyref
I think I managed to disable this when I converted it to use the shared plugin infrastructure. So fix that, and then make it much smarter to avoid various false positives. Change-Id: I0a4657cff3b40a00434924bf764d024dbfd7d5b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176646 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
b4b3949da1
commit
193207c5ab
103 changed files with 292 additions and 186 deletions
|
@ -1609,7 +1609,7 @@ void ModulWindowLayout::SyntaxColors::ConfigurationChanged (utl::ConfigurationBr
|
|||
|
||||
// Applies an entire new color scheme; when bFirst is true, then the checks to see if the color scheme
|
||||
// has changed are ignored to make sure the color scheme is applied
|
||||
void ModulWindowLayout::SyntaxColors::ApplyColorScheme(OUString aSchemeId, bool bFirst)
|
||||
void ModulWindowLayout::SyntaxColors::ApplyColorScheme(const OUString& aSchemeId, bool bFirst)
|
||||
{
|
||||
const TokenType vTokenTypes[] =
|
||||
{
|
||||
|
|
|
@ -460,7 +460,7 @@ private:
|
|||
Color const & GetBackgroundColor () const { return m_aBackgroundColor; };
|
||||
Color const & GetFontColor () const { return m_aFontColor; }
|
||||
Color const & GetColor(TokenType eType) const { return aColors[eType]; }
|
||||
void ApplyColorScheme(OUString aSchemeId, bool bFirst);
|
||||
void ApplyColorScheme(const OUString& aSchemeId, bool bFirst);
|
||||
|
||||
private:
|
||||
virtual void ConfigurationChanged (utl::ConfigurationBroadcaster*, ConfigurationHints) override;
|
||||
|
|
|
@ -88,7 +88,7 @@ class DemoRenderer
|
|||
uno::Reference< rendering::XGraphicDevice > mxDevice;
|
||||
|
||||
DemoRenderer( uno::Reference< rendering::XGraphicDevice > xDevice,
|
||||
uno::Reference< rendering::XCanvas > xCanvas,
|
||||
const uno::Reference< rendering::XCanvas > & xCanvas,
|
||||
Size aSize ) :
|
||||
maSize(aSize),
|
||||
maColorBlack( vcl::unotools::colorToStdColorSpaceSequence( COL_BLACK) ),
|
||||
|
@ -139,7 +139,7 @@ class DemoRenderer
|
|||
maViewState, maRenderState );
|
||||
}
|
||||
|
||||
void drawStringAt( OString aString, double x, double y )
|
||||
void drawStringAt( const OString & aString, double x, double y )
|
||||
{
|
||||
rendering::StringContext aText;
|
||||
aText.Text = OStringToOUString( aString, RTL_TEXTENCODING_UTF8 );
|
||||
|
@ -261,7 +261,7 @@ class DemoRenderer
|
|||
//mxCanvas->drawPolyPolygon( xPoly, maViewState, aRenderState );
|
||||
}
|
||||
|
||||
void drawTitle( OString aTitle )
|
||||
void drawTitle( const OString & aTitle )
|
||||
{
|
||||
// FIXME: text anchoring to be done
|
||||
double nStringWidth = aTitle.getLength() * 8.0;
|
||||
|
|
|
@ -62,7 +62,7 @@ using namespace css::uno;
|
|||
class ChartTest : public UnoApiXmlTest
|
||||
{
|
||||
public:
|
||||
ChartTest(OUString path)
|
||||
ChartTest(const OUString& path)
|
||||
: UnoApiXmlTest(path)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -21,13 +21,13 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
void testCopyPasteToNewSheet(uno::Reference<chart::XChartDocument> xChartDoc,
|
||||
void testCopyPasteToNewSheet(const uno::Reference<chart::XChartDocument>& xChartDoc,
|
||||
OUString aObjectName, sal_Int32 nColumns, sal_Int32 nRows);
|
||||
};
|
||||
|
||||
void Chart2UiChartTest::testCopyPasteToNewSheet(uno::Reference<chart::XChartDocument> xChartDoc,
|
||||
OUString aObjectName, sal_Int32 nColumns,
|
||||
sal_Int32 nRows)
|
||||
void Chart2UiChartTest::testCopyPasteToNewSheet(
|
||||
const uno::Reference<chart::XChartDocument>& xChartDoc, OUString aObjectName,
|
||||
sal_Int32 nColumns, sal_Int32 nRows)
|
||||
{
|
||||
CPPUNIT_ASSERT(xChartDoc.is());
|
||||
uno::Reference<chart::XChartDataArray> xChartData(xChartDoc->getData(), uno::UNO_QUERY_THROW);
|
||||
|
|
|
@ -52,8 +52,8 @@ private:
|
|||
const css::uno::Reference<css::chart2::XScaling>& xScalingY,
|
||||
sal_Bool bMaySkipPointsInCalculation ) override;
|
||||
|
||||
void calculateValues(RegressionCalculationHelper::tDoubleVectorPair aValues, bool bUseXAvg);
|
||||
void calculateValuesCentral(RegressionCalculationHelper::tDoubleVectorPair aValues);
|
||||
void calculateValues(const RegressionCalculationHelper::tDoubleVectorPair& aValues, bool bUseXAvg);
|
||||
void calculateValuesCentral(const RegressionCalculationHelper::tDoubleVectorPair& aValues);
|
||||
std::vector<double> aYList;
|
||||
std::vector<double> aXList;
|
||||
};
|
||||
|
|
|
@ -81,7 +81,7 @@ void SAL_CALL MovingAverageRegressionCurveCalculator::recalculateRegression(
|
|||
}
|
||||
|
||||
void MovingAverageRegressionCurveCalculator::calculateValuesCentral(
|
||||
RegressionCalculationHelper::tDoubleVectorPair aValues)
|
||||
const RegressionCalculationHelper::tDoubleVectorPair& aValues)
|
||||
{
|
||||
const size_t aSize = aValues.first.size();
|
||||
if (aSize == 0)
|
||||
|
@ -106,7 +106,7 @@ void MovingAverageRegressionCurveCalculator::calculateValuesCentral(
|
|||
}
|
||||
|
||||
void MovingAverageRegressionCurveCalculator::calculateValues(
|
||||
RegressionCalculationHelper::tDoubleVectorPair aValues, bool bUseXAvg)
|
||||
const RegressionCalculationHelper::tDoubleVectorPair& aValues, bool bUseXAvg)
|
||||
{
|
||||
const size_t aSize = aValues.first.size();
|
||||
for (size_t i = mPeriod - 1; i < aSize; ++i)
|
||||
|
|
|
@ -2308,7 +2308,7 @@ namespace {
|
|||
// charts).
|
||||
struct ROrderPair
|
||||
{
|
||||
ROrderPair(OUString n, sal_Int32 r) : chartName(n), renderOrder(r) {}
|
||||
ROrderPair(OUString n, sal_Int32 r) : chartName(std::move(n)), renderOrder(r) {}
|
||||
|
||||
OUString chartName;
|
||||
sal_Int32 renderOrder;
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace comphelper
|
|||
|
||||
OEnumerationByName::OEnumerationByName(css::uno::Reference<css::container::XNameAccess> _xAccess)
|
||||
:m_aNames(_xAccess->getElementNames())
|
||||
,m_xAccess(_xAccess)
|
||||
,m_xAccess(std::move(_xAccess))
|
||||
,m_nPos(0)
|
||||
,m_bListening(false)
|
||||
{
|
||||
|
|
|
@ -46,11 +46,19 @@ public:
|
|||
bool PreTraverseFunctionDecl(FunctionDecl *);
|
||||
bool PostTraverseFunctionDecl(FunctionDecl *, bool);
|
||||
bool TraverseFunctionDecl(FunctionDecl *);
|
||||
bool PreTraverseCXXMethodDecl(CXXMethodDecl *);
|
||||
bool PostTraverseCXXMethodDecl(CXXMethodDecl *, bool);
|
||||
bool TraverseCXXMethodDecl(CXXMethodDecl *);
|
||||
bool PreTraverseCXXConstructorDecl(CXXConstructorDecl *);
|
||||
bool PostTraverseCXXConstructorDecl(CXXConstructorDecl *, bool);
|
||||
bool TraverseCXXConstructorDecl(CXXConstructorDecl *);
|
||||
bool PreTraverseImplicitCastExpr(ImplicitCastExpr *);
|
||||
bool TraverseImplicitCastExpr(ImplicitCastExpr *);
|
||||
|
||||
bool VisitBinaryOperator(BinaryOperator const *);
|
||||
bool VisitCXXOperatorCallExpr(const CXXOperatorCallExpr *);
|
||||
bool VisitCallExpr(const CallExpr *);
|
||||
bool VisitCXXMemberCallExpr(const CXXMemberCallExpr *);
|
||||
|
||||
private:
|
||||
bool isFat(QualType type);
|
||||
|
@ -68,10 +76,10 @@ bool PassParamsByRef::PreTraverseFunctionDecl(FunctionDecl* functionDecl)
|
|||
{
|
||||
return false;
|
||||
}
|
||||
// only consider base declarations, not overridden ones, or we warn on methods that
|
||||
// are overriding stuff from external libraries
|
||||
// Ignore virtual methods, sometimes we want to pass by value, and we cannot tell from
|
||||
// the limited info available at an individual site.
|
||||
const CXXMethodDecl * methodDecl = dyn_cast<CXXMethodDecl>(functionDecl);
|
||||
if (methodDecl && methodDecl->size_overridden_methods() > 0)
|
||||
if (methodDecl && methodDecl->isVirtual())
|
||||
return false;
|
||||
|
||||
// Only warn on the definition of the function:
|
||||
|
@ -87,7 +95,6 @@ bool PassParamsByRef::PostTraverseFunctionDecl(FunctionDecl* functionDecl, bool)
|
|||
{
|
||||
mbInsideFunctionDecl = false;
|
||||
|
||||
auto cxxConstructorDecl = dyn_cast<CXXConstructorDecl>(functionDecl);
|
||||
unsigned n = functionDecl->getNumParams();
|
||||
for (unsigned i = 0; i != n; ++i) {
|
||||
const ParmVarDecl * pvDecl = functionDecl->getParamDecl(i);
|
||||
|
@ -96,29 +103,6 @@ bool PassParamsByRef::PostTraverseFunctionDecl(FunctionDecl* functionDecl, bool)
|
|||
continue;
|
||||
if (mParamExclusions.find(pvDecl) != mParamExclusions.end())
|
||||
continue;
|
||||
// Ignore cases where the parameter is std::move'd.
|
||||
// This is a fairly simple check, might need some more complexity if the parameter is std::move'd
|
||||
// somewhere else in the constructor.
|
||||
bool bFoundMove = false;
|
||||
if (cxxConstructorDecl) {
|
||||
for (CXXCtorInitializer const * cxxCtorInitializer : cxxConstructorDecl->inits()) {
|
||||
if (cxxCtorInitializer->isMemberInitializer())
|
||||
{
|
||||
auto cxxConstructExpr = dyn_cast<CXXConstructExpr>(cxxCtorInitializer->getInit()->IgnoreParenImpCasts());
|
||||
if (cxxConstructExpr && cxxConstructExpr->getNumArgs() == 1)
|
||||
{
|
||||
if (auto callExpr = dyn_cast<CallExpr>(cxxConstructExpr->getArg(0)->IgnoreParenImpCasts())) {
|
||||
if (loplugin::DeclCheck(callExpr->getCalleeDecl()).Function("move").StdNamespace()) {
|
||||
bFoundMove = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (bFoundMove)
|
||||
continue;
|
||||
report(
|
||||
DiagnosticsEngine::Warning,
|
||||
("passing %0 by value, rather pass by const lvalue reference"),
|
||||
|
@ -146,6 +130,48 @@ bool PassParamsByRef::TraverseFunctionDecl(FunctionDecl* functionDecl)
|
|||
return ret;
|
||||
}
|
||||
|
||||
bool PassParamsByRef::PreTraverseCXXMethodDecl(CXXMethodDecl* functionDecl)
|
||||
{
|
||||
return PreTraverseFunctionDecl(functionDecl);
|
||||
}
|
||||
|
||||
bool PassParamsByRef::PostTraverseCXXMethodDecl(CXXMethodDecl* functionDecl, bool b)
|
||||
{
|
||||
return PostTraverseFunctionDecl(functionDecl, b);
|
||||
}
|
||||
|
||||
bool PassParamsByRef::TraverseCXXMethodDecl(CXXMethodDecl* functionDecl)
|
||||
{
|
||||
bool ret = true;
|
||||
if (PreTraverseCXXMethodDecl(functionDecl))
|
||||
{
|
||||
ret = RecursiveASTVisitor::TraverseCXXMethodDecl(functionDecl);
|
||||
PostTraverseCXXMethodDecl(functionDecl, ret);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool PassParamsByRef::PreTraverseCXXConstructorDecl(CXXConstructorDecl* functionDecl)
|
||||
{
|
||||
return PreTraverseFunctionDecl(functionDecl);
|
||||
}
|
||||
|
||||
bool PassParamsByRef::PostTraverseCXXConstructorDecl(CXXConstructorDecl* functionDecl, bool b)
|
||||
{
|
||||
return PostTraverseFunctionDecl(functionDecl, b);
|
||||
}
|
||||
|
||||
bool PassParamsByRef::TraverseCXXConstructorDecl(CXXConstructorDecl* functionDecl)
|
||||
{
|
||||
bool ret = true;
|
||||
if (PreTraverseCXXConstructorDecl(functionDecl))
|
||||
{
|
||||
ret = RecursiveASTVisitor::TraverseCXXConstructorDecl(functionDecl);
|
||||
PostTraverseCXXConstructorDecl(functionDecl, ret);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool PassParamsByRef::PreTraverseImplicitCastExpr(ImplicitCastExpr * expr)
|
||||
{
|
||||
if (ignoreLocation(expr))
|
||||
|
@ -202,6 +228,50 @@ bool PassParamsByRef::VisitCXXOperatorCallExpr(const CXXOperatorCallExpr * cxxOp
|
|||
return true;
|
||||
}
|
||||
|
||||
bool PassParamsByRef::VisitCallExpr(const CallExpr * callExpr )
|
||||
{
|
||||
if (!mbInsideFunctionDecl)
|
||||
return true;
|
||||
if (loplugin::DeclCheck(callExpr->getCalleeDecl()).Function("move").StdNamespace())
|
||||
if (auto declRefExpr = dyn_cast<DeclRefExpr>(callExpr->getArg(0)))
|
||||
{
|
||||
if (auto parmVarDecl = dyn_cast<ParmVarDecl>(declRefExpr->getDecl()))
|
||||
mParamExclusions.emplace(parmVarDecl);
|
||||
}
|
||||
if (auto const fun = callExpr->getDirectCallee())
|
||||
{
|
||||
unsigned const n = std::min(fun->getNumParams(), callExpr->getNumArgs());
|
||||
for (unsigned i = 0; i != n; ++i)
|
||||
{
|
||||
if (!loplugin::TypeCheck(fun->getParamDecl(i)->getType())
|
||||
.LvalueReference()
|
||||
.NonConstVolatile())
|
||||
continue;
|
||||
auto a = callExpr->getArg(i)->IgnoreParenImpCasts();
|
||||
if (auto declRefExpr = dyn_cast<DeclRefExpr>(a))
|
||||
if (auto parmVarDecl = dyn_cast<ParmVarDecl>(declRefExpr->getDecl()))
|
||||
mParamExclusions.emplace(parmVarDecl);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PassParamsByRef::VisitCXXMemberCallExpr(const CXXMemberCallExpr * callExpr )
|
||||
{
|
||||
if (!mbInsideFunctionDecl)
|
||||
return true;
|
||||
// exclude cases where we call a non-const method on the parameter i.e. potentially mutating it
|
||||
if (auto const e1 = callExpr->getMethodDecl())
|
||||
if (!e1->isConst())
|
||||
{
|
||||
auto a = callExpr->getImplicitObjectArgument()->IgnoreParenImpCasts();
|
||||
if (auto declRefExpr = dyn_cast<DeclRefExpr>(a))
|
||||
if (auto parmVarDecl = dyn_cast<ParmVarDecl>(declRefExpr->getDecl()))
|
||||
mParamExclusions.emplace(parmVarDecl);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PassParamsByRef::isFat(QualType type) {
|
||||
if (!type->isRecordType()) {
|
||||
return false;
|
||||
|
|
|
@ -48,6 +48,8 @@ public:
|
|||
bool TraverseCXXCatchStmt( CXXCatchStmt* ) { return complain(); }
|
||||
bool TraverseCXXDestructorDecl( CXXDestructorDecl* ) { return complain(); }
|
||||
bool TraverseFunctionDecl( FunctionDecl* ) { return complain(); }
|
||||
bool TraverseCXXMethodDecl( CXXMethodDecl* ) { return complain(); }
|
||||
bool TraverseCXXConstructorDecl( CXXConstructorDecl* ) { return complain(); }
|
||||
bool TraverseSwitchStmt( SwitchStmt* ) { return complain(); }
|
||||
bool TraverseImplicitCastExpr( ImplicitCastExpr* ) { return complain(); }
|
||||
bool TraverseCStyleCastExpr( CStyleCastExpr* ) { return complain(); }
|
||||
|
|
|
@ -19,8 +19,36 @@ struct S {
|
|||
// make sure we ignore cases where the passed in parameter is std::move'd
|
||||
S(OUString v1, OUString v2)
|
||||
: mv1(std::move(v1)), mv2((std::move(v2))) {}
|
||||
|
||||
// expected-error-re@+1 {{passing '{{(rtl::)?}}OUString' by value, rather pass by const lvalue reference [loplugin:passparamsbyref]}}
|
||||
S(OUString v1)
|
||||
: mv1(v1) {}
|
||||
|
||||
// expected-error-re@+1 {{passing '{{(rtl::)?}}OUString' by value, rather pass by const lvalue reference [loplugin:passparamsbyref]}}
|
||||
void foo(OUString v1) { (void) v1; }
|
||||
|
||||
// no warning expected
|
||||
void foo2(OUString v1) { mv1 = std::move(v1); }
|
||||
|
||||
void takeByNonConstRef(OUString&);
|
||||
|
||||
// no warning expected
|
||||
void foo3(OUString v)
|
||||
{
|
||||
takeByNonConstRef(v);
|
||||
}
|
||||
};
|
||||
|
||||
namespace test2
|
||||
{
|
||||
struct TestObject { OUString s[64]; void nonConstMethod(); };
|
||||
|
||||
// no warning expected
|
||||
void f1(TestObject to)
|
||||
{
|
||||
to.nonConstMethod();
|
||||
}
|
||||
}
|
||||
|
||||
void f()
|
||||
{
|
||||
|
@ -37,6 +65,4 @@ OUString trim_string(OUString aString)
|
|||
return aString;
|
||||
}
|
||||
|
||||
// expected-no-diagnostics
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||
|
|
|
@ -252,7 +252,8 @@ void CustomNotebookbarGenerator::createCustomizedUIFile()
|
|||
"Cannot copy the file or file was present :" << sCustomizedUIPath);
|
||||
}
|
||||
|
||||
Sequence<OUString> CustomNotebookbarGenerator::getCustomizedUIItem(OUString sNotebookbarConfigType)
|
||||
Sequence<OUString>
|
||||
CustomNotebookbarGenerator::getCustomizedUIItem(const OUString& sNotebookbarConfigType)
|
||||
{
|
||||
OUString aPath = getAppNameRegistryPath();
|
||||
const utl::OConfigurationTreeRoot aAppNode(::comphelper::getProcessComponentContext(), aPath,
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
#include <ImageViewerDialog.hxx>
|
||||
|
||||
GraphicTestEntry::GraphicTestEntry(weld::Container* pParent, weld::Dialog* pDialog,
|
||||
OUString aTestName, OUString aTestStatus, Bitmap aTestBitmap)
|
||||
const OUString& aTestName, const OUString& aTestStatus,
|
||||
Bitmap aTestBitmap)
|
||||
: m_xBuilder(Application::CreateBuilder(pParent, u"cui/ui/graphictestentry.ui"_ustr))
|
||||
, m_xContainer(m_xBuilder->weld_container(u"gptestbox"_ustr))
|
||||
, m_xTestLabel(m_xBuilder->weld_label(u"gptestlabel"_ustr))
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
#include <vcl/virdev.hxx>
|
||||
#include <ImageViewerDialog.hxx>
|
||||
|
||||
ImageViewerDialog::ImageViewerDialog(weld::Dialog* pParent, BitmapEx aBitmap, OUString atitle)
|
||||
ImageViewerDialog::ImageViewerDialog(weld::Dialog* pParent, BitmapEx aBitmap,
|
||||
const OUString& atitle)
|
||||
: GenericDialogController(pParent, u"cui/ui/imageviewer.ui"_ustr, u"ImageViewerDialog"_ustr)
|
||||
, m_xDisplayImage(m_xBuilder->weld_image(u"ImgVW_mainImage"_ustr))
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
static OUString getCustomizedUIPath();
|
||||
static OUString getOriginalUIPath();
|
||||
static OString getSystemPath(OUString const& sURL);
|
||||
static Sequence<OUString> getCustomizedUIItem(OUString sNotebookbarConfigType);
|
||||
static Sequence<OUString> getCustomizedUIItem(const OUString& sNotebookbarConfigType);
|
||||
static void getFileNameAndAppName(OUString& sAppName, OUString& sNotebookbarUIFileName);
|
||||
static void modifyCustomizedUIFile(const Sequence<OUString>& sUIItemProperties);
|
||||
static void createCustomizedUIFile();
|
||||
|
|
|
@ -28,8 +28,8 @@ private:
|
|||
|
||||
public:
|
||||
DECL_LINK(HandleResultViewRequest, weld::Button&, void);
|
||||
GraphicTestEntry(weld::Container* pParent, weld::Dialog* pDialog, OUString aTestName,
|
||||
OUString aTestStatus, Bitmap aTestBitmap);
|
||||
GraphicTestEntry(weld::Container* pParent, weld::Dialog* pDialog, const OUString& aTestName,
|
||||
const OUString& aTestStatus, Bitmap aTestBitmap);
|
||||
weld::Widget* get_widget() const { return m_xContainer.get(); }
|
||||
};
|
||||
|
||||
|
|
|
@ -16,5 +16,5 @@ class ImageViewerDialog : public weld::GenericDialogController
|
|||
std::unique_ptr<weld::Image> m_xDisplayImage;
|
||||
|
||||
public:
|
||||
ImageViewerDialog(weld::Dialog* pParent, BitmapEx aBitmap, OUString atitle);
|
||||
ImageViewerDialog(weld::Dialog* pParent, BitmapEx aBitmap, const OUString& atitle);
|
||||
};
|
||||
|
|
|
@ -42,10 +42,10 @@ public:
|
|||
uno::Reference< XOfficeDatabaseDocument > const & xDocument);
|
||||
|
||||
void createDBDocument(const OUString& rDriverURL);
|
||||
void createTables(Reference< XConnection > xConnection);
|
||||
void createQueries(Reference< XDataSource > xDataSource);
|
||||
void createQuery(OUString sQuery, bool bEscapeProcessing,
|
||||
OUString sQueryName, Reference<XDataSource> xDataSource);
|
||||
void createTables(const Reference< XConnection >& xConnection);
|
||||
void createQueries(const Reference< XDataSource >& xDataSource);
|
||||
void createQuery(const OUString& sQuery, bool bEscapeProcessing,
|
||||
const OUString& sQueryName, const Reference<XDataSource> & xDataSource);
|
||||
|
||||
virtual void tearDown() override;
|
||||
};
|
||||
|
@ -84,7 +84,7 @@ void DBTestBase::createDBDocument(const OUString& rDriverURL)
|
|||
loadFromURL(maTempFile.GetURL());
|
||||
}
|
||||
|
||||
void DBTestBase::createTables(Reference<XConnection> xConnection)
|
||||
void DBTestBase::createTables(const Reference<XConnection>& xConnection)
|
||||
{
|
||||
uno::Reference<XStatement> xStatement = xConnection->createStatement();
|
||||
|
||||
|
@ -137,7 +137,7 @@ void DBTestBase::createTables(Reference<XConnection> xConnection)
|
|||
xConnection->commit();
|
||||
}
|
||||
|
||||
void DBTestBase::createQueries(Reference<XDataSource> xDataSource)
|
||||
void DBTestBase::createQueries(const Reference<XDataSource>& xDataSource)
|
||||
{
|
||||
createQuery(
|
||||
u"SELECT \"ORDERS\".\"ID\" AS \"Order No.\", "
|
||||
|
@ -164,7 +164,7 @@ void DBTestBase::createQueries(Reference<XDataSource> xDataSource)
|
|||
createQuery(u"SELECT * FROM INFORMATION_SCHEMA.SYSTEM_VIEWS"_ustr, false, u"parseable native"_ustr, xDataSource);
|
||||
}
|
||||
|
||||
void DBTestBase::createQuery(OUString sQuery, bool bEscapeProcessing, OUString sQueryName, Reference<XDataSource> xDataSource)
|
||||
void DBTestBase::createQuery(const OUString& sQuery, bool bEscapeProcessing, const OUString& sQueryName, const Reference<XDataSource> & xDataSource)
|
||||
{
|
||||
Reference<XQueryDefinitionsSupplier> xQuerySupplier(xDataSource, UNO_QUERY_THROW);
|
||||
Reference<container::XNameAccess> xQueryAccess = xQuerySupplier->getQueryDefinitions();
|
||||
|
|
|
@ -90,7 +90,7 @@ friend class SfxHintPoster;
|
|||
|
||||
|
||||
bool FindServer_( sal_uInt16 nId, SfxSlotServer &rServer );
|
||||
static bool IsCommandAllowedInLokReadOnlyViewMode (OUString commandName);
|
||||
static bool IsCommandAllowedInLokReadOnlyViewMode(const OUString & commandName);
|
||||
bool FillState_( const SfxSlotServer &rServer,
|
||||
SfxItemSet &rState, const SfxSlot *pRealSlot );
|
||||
void Execute_( SfxShell &rShell, const SfxSlot &rSlot,
|
||||
|
|
|
@ -229,7 +229,7 @@ public:
|
|||
SAL_DLLPRIVATE void SetStorage_Impl( const css::uno::Reference< css::embed::XStorage >& xNewStorage );
|
||||
SAL_DLLPRIVATE void SetInnerStorage_Impl(const css::uno::Reference<css::embed::XStorage>& xStorage);
|
||||
SAL_DLLPRIVATE css::uno::Reference<css::embed::XStorage>
|
||||
TryEncryptedInnerPackage(css::uno::Reference<css::embed::XStorage> xStorage);
|
||||
TryEncryptedInnerPackage(const css::uno::Reference<css::embed::XStorage> & xStorage);
|
||||
|
||||
SAL_DLLPRIVATE void CloseAndReleaseStreams_Impl();
|
||||
SAL_DLLPRIVATE void AddVersion_Impl( css::util::RevisionTag& rVersion );
|
||||
|
|
|
@ -487,7 +487,7 @@ public:
|
|||
|
||||
// Blocked Command view settings
|
||||
void setBlockedCommandList(const char* blockedCommandList);
|
||||
bool isBlockedCommand(OUString command) const;
|
||||
bool isBlockedCommand(const OUString & command) const;
|
||||
|
||||
void SetStoringHelper(const std::shared_ptr<SfxStoringHelper>& xHelper) { m_xHelper = xHelper; }
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ class SVT_DLLPUBLIC AcceleratorExecute final
|
|||
static css::uno::Reference< css::ui::XAcceleratorConfiguration > st_openModuleConfig(const css::uno::Reference< css::uno::XComponentContext >& rxContext ,
|
||||
const css::uno::Reference< css::frame::XFrame >& xFrame);
|
||||
|
||||
static css::uno::Reference<css::ui::XAcceleratorConfiguration> lok_createNewAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext >& rxContext, OUString sModule);
|
||||
static css::uno::Reference<css::ui::XAcceleratorConfiguration> lok_createNewAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext >& rxContext, const OUString& sModule);
|
||||
void lok_setModuleConfig(const css::uno::Reference<css::ui::XAcceleratorConfiguration>& acceleratorConfig);
|
||||
|
||||
/** TODO document me */
|
||||
|
|
|
@ -19,5 +19,5 @@ private:
|
|||
DECL_DLLPRIVATE_LINK(OpenHdl, weld::Button&, void);
|
||||
|
||||
public:
|
||||
explicit FileExportedDialog(weld::Window* pParent, OUString atitle);
|
||||
explicit FileExportedDialog(weld::Window* pParent, const OUString& atitle);
|
||||
};
|
||||
|
|
|
@ -295,7 +295,7 @@ private:
|
|||
protected:
|
||||
bool ImpCanConvTextToCurve() const;
|
||||
rtl::Reference<SdrPathObj> ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPolygon, bool bClosed, bool bBezier) const;
|
||||
rtl::Reference<SdrObject> ImpConvertAddText(rtl::Reference<SdrObject> pObj, bool bBezier) const;
|
||||
rtl::Reference<SdrObject> ImpConvertAddText(const rtl::Reference<SdrObject> & pObj, bool bBezier) const;
|
||||
void ImpSetTextStyleSheetListeners();
|
||||
static void ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, Fraction& rFitXCorrection);
|
||||
static void ImpJustifyRect(tools::Rectangle& rRect);
|
||||
|
|
|
@ -236,7 +236,7 @@ protected:
|
|||
// Interface to SdrPaintWindow
|
||||
void DeletePaintWindow(const SdrPaintWindow& rOld);
|
||||
void ConfigurationChanged( ::utl::ConfigurationBroadcaster*, ConfigurationHints ) override;
|
||||
static void InitOverlayManager(rtl::Reference<sdr::overlay::OverlayManager> xOverlayManager);
|
||||
static void InitOverlayManager(const rtl::Reference<sdr::overlay::OverlayManager> & xOverlayManager);
|
||||
|
||||
public:
|
||||
sal_uInt32 PaintWindowCount() const { return maPaintWindows.size(); }
|
||||
|
|
|
@ -110,7 +110,7 @@ public:
|
|||
: EventPosterHelper()
|
||||
{
|
||||
}
|
||||
AccessibleEventPosterHelper(const css::uno::Reference<css::accessibility::XAccessible> xAcc)
|
||||
AccessibleEventPosterHelper(const css::uno::Reference<css::accessibility::XAccessible>& xAcc)
|
||||
{
|
||||
setWindow(xAcc);
|
||||
}
|
||||
|
|
|
@ -27,8 +27,8 @@ class OOO_DLLPUBLIC_TEST XPropertySet
|
|||
public:
|
||||
XPropertySet() {}
|
||||
|
||||
XPropertySet(const std::set<OUString> rIgnoreValue)
|
||||
: m_IgnoreValue(rIgnoreValue)
|
||||
XPropertySet(std::set<OUString> rIgnoreValue)
|
||||
: m_IgnoreValue(std::move(rIgnoreValue))
|
||||
{
|
||||
}
|
||||
virtual css::uno::Reference<css::uno::XInterface> init() = 0;
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
|
||||
virtual css::uno::Reference<css::uno::XInterface> init() = 0;
|
||||
virtual css::uno::Reference<css::uno::XInterface> getXSpreadsheet() = 0;
|
||||
void setXCell(css::uno::Reference<css::table::XCell> xCell) { m_xCell = xCell; }
|
||||
void setXCell(css::uno::Reference<css::table::XCell> xCell) { m_xCell = std::move(xCell); }
|
||||
css::uno::Reference<css::table::XCell> const& getXCell() const { return m_xCell; }
|
||||
|
||||
void testQueryDependents();
|
||||
|
|
|
@ -157,7 +157,7 @@ class UNOTOOLS_DLLPUBLIC SvtSecurityMapPersonalInfo
|
|||
{
|
||||
std::unordered_map< OUString, size_t > aInfoIDs;
|
||||
public:
|
||||
size_t GetInfoID( const OUString sPersonalInfo );
|
||||
size_t GetInfoID( const OUString& sPersonalInfo );
|
||||
};
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
|
|
@ -41,11 +41,11 @@ namespace utl
|
|||
public:
|
||||
static std::unique_ptr<SvStream>
|
||||
CreateStream(const OUString& rFileName, StreamMode eOpenMode,
|
||||
css::uno::Reference<css::awt::XWindow> xParentWin = nullptr,
|
||||
const css::uno::Reference<css::awt::XWindow> & xParentWin = nullptr,
|
||||
bool bUseSimpleFileAccessInteraction = true);
|
||||
static std::unique_ptr<SvStream>
|
||||
CreateStream(const OUString& rFileName, StreamMode eOpenMode, bool bFileExists,
|
||||
css::uno::Reference<css::awt::XWindow> xParentWin = nullptr,
|
||||
const css::uno::Reference<css::awt::XWindow> & xParentWin = nullptr,
|
||||
bool bUseSimpleFileAccessInteraction = true);
|
||||
static std::unique_ptr<SvStream> CreateStream( const css::uno::Reference < css::io::XInputStream >& xStream );
|
||||
static std::unique_ptr<SvStream> CreateStream( const css::uno::Reference < css::io::XStream >& xStream );
|
||||
|
|
|
@ -114,7 +114,7 @@ struct Feature
|
|||
// headers here, so the member types should remain compatible.
|
||||
struct FeatureSetting
|
||||
{
|
||||
FeatureSetting(OString feature);
|
||||
FeatureSetting(const OString& feature);
|
||||
|
||||
uint32_t m_nTag;
|
||||
uint32_t m_nValue;
|
||||
|
|
|
@ -810,7 +810,7 @@ public:
|
|||
|
||||
const BitmapEx& GetBitmapEx() const { return maBmpEx; }
|
||||
const Point& GetPoint() const { return maPt; }
|
||||
void SetBitmapEx(BitmapEx rBmpEx) { maBmpEx = rBmpEx; }
|
||||
void SetBitmapEx(const BitmapEx& rBmpEx) { maBmpEx = rBmpEx; }
|
||||
void SetPoint(const Point& rPt) { maPt = rPt; }
|
||||
bool IsTransparent() const override { return GetBitmapEx().IsAlpha(); }
|
||||
};
|
||||
|
|
|
@ -388,7 +388,7 @@ public:
|
|||
const SvXMLNamespaceMap& GetNamespaceMap() const { return *mpNamespaceMap; }
|
||||
|
||||
// Get author id to remove personal info
|
||||
size_t GetInfoID( const OUString sPersonalInfo ) const { return mpAuthorIDs->GetInfoID(sPersonalInfo); }
|
||||
size_t GetInfoID( const OUString& sPersonalInfo ) const { return mpAuthorIDs->GetInfoID(sPersonalInfo); }
|
||||
|
||||
// Get unit converter
|
||||
const SvXMLUnitConverter& GetMM100UnitConverter() const { return maUnitConv; }
|
||||
|
|
|
@ -184,7 +184,7 @@ private:
|
|||
|
||||
// Used to create or get a single constraint part
|
||||
bool ReadConstraintPart(ConstraintPart ePart, tools::Long nIndex, OUString& rValue);
|
||||
void WriteConstraintPart(ConstraintPart ePart, tools::Long nIndex, OUString sValue);
|
||||
void WriteConstraintPart(ConstraintPart ePart, tools::Long nIndex, const OUString& sValue);
|
||||
|
||||
// Creates or reads all named ranges associated with solver engine options
|
||||
void ReadEngine();
|
||||
|
@ -289,7 +289,7 @@ public:
|
|||
SolverSettings(ScTable& pTable);
|
||||
|
||||
SC_DLLPUBLIC OUString GetParameter(SolverParameter eParam);
|
||||
SC_DLLPUBLIC void SetParameter(SolverParameter eParam, OUString sValue);
|
||||
SC_DLLPUBLIC void SetParameter(SolverParameter eParam, const OUString& sValue);
|
||||
SC_DLLPUBLIC ObjectiveType GetObjectiveType() { return m_eObjType; }
|
||||
SC_DLLPUBLIC void SetObjectiveType(ObjectiveType eType);
|
||||
SC_DLLPUBLIC void GetEngineOptions(css::uno::Sequence<css::beans::PropertyValue>& aOptions);
|
||||
|
|
|
@ -79,7 +79,7 @@ private:
|
|||
public:
|
||||
ScDocumentLoader(const OUString& rFileName, OUString& rFilterName, OUString& rOptions,
|
||||
sal_uInt32 nRekCnt = 0, weld::Window* pInteractionParent = nullptr,
|
||||
css::uno::Reference<css::io::XInputStream> xInputStream
|
||||
const css::uno::Reference<css::io::XInputStream>& xInputStream
|
||||
= css::uno::Reference<css::io::XInputStream>());
|
||||
~ScDocumentLoader();
|
||||
ScDocument* GetDocument();
|
||||
|
|
|
@ -149,7 +149,7 @@ protected:
|
|||
class SCQAHELPER_DLLPUBLIC ScModelTestBase : public UnoApiXmlTest
|
||||
{
|
||||
public:
|
||||
ScModelTestBase(OUString path)
|
||||
ScModelTestBase(const OUString& path)
|
||||
: UnoApiXmlTest(path)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ protected:
|
|||
void printValuesAndFormulasInRange(ScDocument* pDoc, const ScRange& rRange,
|
||||
const OString& rCaption);
|
||||
OUString getRangeByName(const OUString& aRangeName);
|
||||
ScAddress setNote(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString noteText);
|
||||
ScAddress setNote(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& noteText);
|
||||
OUString getNote(SCCOL nCol, SCROW nRow, SCTAB nTab);
|
||||
};
|
||||
|
||||
|
@ -137,7 +137,7 @@ OUString TestCopyPaste::getRangeByName(const OUString& aRangeName)
|
|||
return ScUcalcTestBase::getRangeByName(m_pDoc, aRangeName);
|
||||
}
|
||||
|
||||
ScAddress TestCopyPaste::setNote(SCCOL nCol, SCROW nRow, SCTAB nTab, OUString noteText)
|
||||
ScAddress TestCopyPaste::setNote(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& noteText)
|
||||
{
|
||||
ScAddress aAdr(nCol, nRow, nTab);
|
||||
ScPostIt* pNote = m_pDoc->GetOrCreateNote(aAdr);
|
||||
|
|
|
@ -207,7 +207,7 @@ OUString SolverSettings::GetParameter(SolverParameter eParam)
|
|||
}
|
||||
|
||||
// Sets the value of a single solver parameter in the object
|
||||
void SolverSettings::SetParameter(SolverParameter eParam, OUString sValue)
|
||||
void SolverSettings::SetParameter(SolverParameter eParam, const OUString& sValue)
|
||||
{
|
||||
switch (eParam)
|
||||
{
|
||||
|
@ -393,7 +393,8 @@ void SolverSettings::WriteConstraints()
|
|||
}
|
||||
|
||||
// Write a single constraint part to the file
|
||||
void SolverSettings::WriteConstraintPart(ConstraintPart ePart, tools::Long nIndex, OUString sValue)
|
||||
void SolverSettings::WriteConstraintPart(ConstraintPart ePart, tools::Long nIndex,
|
||||
const OUString& sValue)
|
||||
{
|
||||
// Empty named ranges cannot be written to the file (this corrupts MS files)
|
||||
if (sValue.isEmpty())
|
||||
|
|
|
@ -162,7 +162,7 @@ private:
|
|||
*
|
||||
* @return excel's name index.
|
||||
*/
|
||||
sal_uInt16 FindNamedExp( SCTAB nTab, OUString sName );
|
||||
sal_uInt16 FindNamedExp( SCTAB nTab, const OUString& sName );
|
||||
|
||||
/** Returns the index of an existing built-in NAME record with the passed definition, otherwise 0. */
|
||||
sal_uInt16 FindBuiltInNameIdx( const OUString& rName,
|
||||
|
@ -548,7 +548,7 @@ void XclExpNameManagerImpl::SaveXml( XclExpXmlStream& rStrm )
|
|||
|
||||
// private --------------------------------------------------------------------
|
||||
|
||||
sal_uInt16 XclExpNameManagerImpl::FindNamedExp( SCTAB nTab, OUString sName )
|
||||
sal_uInt16 XclExpNameManagerImpl::FindNamedExp( SCTAB nTab, const OUString& sName )
|
||||
{
|
||||
NamedExpMap::key_type key(nTab, sName);
|
||||
NamedExpMap::const_iterator itr = maNamedExpMap.find(key);
|
||||
|
|
|
@ -1267,7 +1267,7 @@ void XclExpXmlStream::restoreTabNames(const std::vector<OUString>& aOriginalTabN
|
|||
}
|
||||
}
|
||||
|
||||
void XclExpXmlStream::renameTab(SCTAB aTab, OUString aNewName)
|
||||
void XclExpXmlStream::renameTab(SCTAB aTab, const OUString& aNewName)
|
||||
{
|
||||
ScDocShell* pShell = getDocShell();
|
||||
ScDocument& rDoc = pShell->GetDocument();
|
||||
|
|
|
@ -342,7 +342,7 @@ private:
|
|||
|
||||
void validateTabNames(std::vector<OUString>& aOriginalTabNames);
|
||||
void restoreTabNames(const std::vector<OUString>& aOriginalTabNames);
|
||||
void renameTab(SCTAB aTab, OUString aNewName);
|
||||
void renameTab(SCTAB aTab, const OUString& aNewName);
|
||||
|
||||
typedef std::map< OUString,
|
||||
std::pair< OUString,
|
||||
|
|
|
@ -489,7 +489,7 @@ SfxMedium* ScDocumentLoader::CreateMedium( const OUString& rFileName, std::share
|
|||
ScDocumentLoader::ScDocumentLoader(const OUString& rFileName,
|
||||
OUString& rFilterName, OUString& rOptions,
|
||||
sal_uInt32 nRekCnt, weld::Window* pInteractionParent,
|
||||
css::uno::Reference<css::io::XInputStream> xInputStream)
|
||||
const css::uno::Reference<css::io::XInputStream>& xInputStream)
|
||||
: pMedium(nullptr)
|
||||
{
|
||||
if ( rFilterName.isEmpty() )
|
||||
|
|
|
@ -37,7 +37,7 @@ private:
|
|||
void GetSelectedMemberList(ScDPUniqueStringSet& rEntries, tools::Long& rDimension);
|
||||
static void ModifiedAutoFilter(ScDocShell* pDocSh);
|
||||
static void ApplyAutoFilter(ScDocShell* pDocSh, ScViewData* pViewData, ScDBData* pDBData,
|
||||
SCROW nRow, SCTAB nTab, ScQueryParam aParam);
|
||||
SCROW nRow, SCTAB nTab, const ScQueryParam& aParam);
|
||||
|
||||
DECL_STATIC_LINK(ScDBFunc, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*);
|
||||
|
||||
|
|
|
@ -381,7 +381,7 @@ IMPL_STATIC_LINK_NOARG(ScDBFunc, InstallLOKNotifierHdl, void*, vcl::ILibreOffice
|
|||
}
|
||||
|
||||
void ScDBFunc::ApplyAutoFilter(ScDocShell* pDocSh, ScViewData* pViewData, ScDBData* pDBData,
|
||||
SCROW nRow, SCTAB nTab, ScQueryParam aParam)
|
||||
SCROW nRow, SCTAB nTab, const ScQueryParam& aParam)
|
||||
{
|
||||
ScDocument& rDoc = pViewData->GetDocument();
|
||||
ScRange aRange;
|
||||
|
|
|
@ -41,7 +41,7 @@ using namespace ::com::sun::star;
|
|||
class SdModelTestBase : public UnoApiXmlTest
|
||||
{
|
||||
public:
|
||||
SdModelTestBase(OUString path)
|
||||
SdModelTestBase(const OUString& path)
|
||||
: UnoApiXmlTest(path)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -161,7 +161,7 @@ private:
|
|||
std::unordered_map< css::uno::Reference<css::drawing::XShape>, sal_Int32 > maPlaceholderShapeToIndexMap;
|
||||
|
||||
// Get author id to remove personal info
|
||||
size_t GetInfoID( const OUString sPersonalInfo ) const { return mpAuthorIDs->GetInfoID(sPersonalInfo); }
|
||||
size_t GetInfoID( const OUString& sPersonalInfo ) const { return mpAuthorIDs->GetInfoID(sPersonalInfo); }
|
||||
struct AuthorComments {
|
||||
sal_Int32 nId;
|
||||
sal_Int32 nLastIndex;
|
||||
|
@ -175,7 +175,7 @@ private:
|
|||
AuthorComments(sal_Int32 nId_, sal_Int32 nLastIndex_, OUString sInitials_)
|
||||
: nId(nId_)
|
||||
, nLastIndex(nLastIndex_)
|
||||
, sInitials(sInitials_)
|
||||
, sInitials(std::move(sInitials_))
|
||||
{
|
||||
}
|
||||
};
|
||||
|
|
|
@ -137,7 +137,7 @@ public:
|
|||
ShapeExport& WritePlaceholderReferenceShape(PlaceholderType ePlaceholder, sal_Int32 nReferencedPlaceholderIdx, PageType ePageType, const Reference<XPropertySet>& rXPagePropSet);
|
||||
ShapeExport& WritePageShape(const Reference< XShape >& xShape, PageType ePageType, bool bPresObj);
|
||||
/** Writes textbody of a placeholder that references the placeholder on the master slide */
|
||||
ShapeExport& WritePlaceholderReferenceTextBody(PlaceholderType ePlaceholder, PageType ePageType, const Reference<XPropertySet> xPagePropSet);
|
||||
ShapeExport& WritePlaceholderReferenceTextBody(PlaceholderType ePlaceholder, PageType ePageType, const Reference<XPropertySet>& xPagePropSet);
|
||||
|
||||
// helper parts
|
||||
bool WritePlaceholder(const Reference< XShape >& xShape, PlaceholderType ePlaceholder, bool bMaster);
|
||||
|
@ -1884,7 +1884,7 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderReferenceShape(
|
|||
}
|
||||
|
||||
ShapeExport& PowerPointShapeExport::WritePlaceholderReferenceTextBody(
|
||||
PlaceholderType ePlaceholder, PageType ePageType, const Reference<XPropertySet> xPagePropSet)
|
||||
PlaceholderType ePlaceholder, PageType ePageType, const Reference<XPropertySet>& xPagePropSet)
|
||||
{
|
||||
mpFS->startElementNS(XML_p, XML_txBody);
|
||||
mpFS->singleElementNS(XML_a, XML_bodyPr);
|
||||
|
|
|
@ -45,7 +45,7 @@ public:
|
|||
void CompleteRedraw(OutputDevice* pOutDev, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = nullptr) override;
|
||||
|
||||
virtual bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll = false, bool bSlide = false, bool bMaster = false) override;
|
||||
void SetMasterAttributes(SdrObject* pObject, const SdPage& rPage, SfxItemSet rSet, SfxStyleSheetBasePool* pStShPool, bool& bOk, bool bMaster, bool bSlide);
|
||||
void SetMasterAttributes(SdrObject* pObject, const SdPage& rPage, const SfxItemSet& rSet, SfxStyleSheetBasePool* pStShPool, bool& bOk, bool bMaster, bool bSlide);
|
||||
|
||||
virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet,
|
|||
return bOk;
|
||||
}
|
||||
|
||||
void DrawView::SetMasterAttributes( SdrObject* pObject, const SdPage& rPage, SfxItemSet rSet, SfxStyleSheetBasePool* pStShPool, bool& bOk, bool bMaster, bool bSlide )
|
||||
void DrawView::SetMasterAttributes( SdrObject* pObject, const SdPage& rPage, const SfxItemSet& rSet, SfxStyleSheetBasePool* pStShPool, bool& bOk, bool bMaster, bool bSlide )
|
||||
{
|
||||
SdrInventor nInv = pObject->GetObjInventor();
|
||||
|
||||
|
|
|
@ -1523,7 +1523,7 @@ SfxSlotFilterState SfxDispatcher::IsSlotEnabledByFilter_Impl( sal_uInt16 nSID )
|
|||
return bFound ? SfxSlotFilterState::DISABLED : SfxSlotFilterState::ENABLED;
|
||||
}
|
||||
|
||||
bool SfxDispatcher::IsCommandAllowedInLokReadOnlyViewMode (OUString commandName) {
|
||||
bool SfxDispatcher::IsCommandAllowedInLokReadOnlyViewMode (const OUString & commandName) {
|
||||
static constexpr OUString allowedList[] = {
|
||||
u".uno:InsertAnnotation"_ustr,
|
||||
u".uno:ReplyComment"_ustr,
|
||||
|
|
|
@ -137,7 +137,7 @@ std::optional<OUString> sDefaultCharStyleUIName;
|
|||
|
||||
StyleList::StyleList(weld::Builder* pBuilder, SfxBindings* pBindings,
|
||||
SfxCommonTemplateDialog_Impl* Parent, weld::Container* pC,
|
||||
OUString treeviewname, OUString flatviewname)
|
||||
const OUString& treeviewname, const OUString& flatviewname)
|
||||
: m_bHierarchical(false)
|
||||
, m_bAllowReParentDrop(false)
|
||||
, m_bNewByExampleDisabled(false)
|
||||
|
|
|
@ -1745,7 +1745,7 @@ SfxMedium::LockFileResult SfxMedium::LockOrigFileOnDemand(bool bLoading, bool bN
|
|||
|
||||
// this either returns non-null or throws exception
|
||||
uno::Reference<embed::XStorage>
|
||||
SfxMedium::TryEncryptedInnerPackage(uno::Reference<embed::XStorage> const xStorage)
|
||||
SfxMedium::TryEncryptedInnerPackage(uno::Reference<embed::XStorage> const & xStorage)
|
||||
{
|
||||
uno::Reference<embed::XStorage> xRet;
|
||||
if (xStorage->hasByName(u"encrypted-package"_ustr))
|
||||
|
|
|
@ -63,7 +63,7 @@ class StyleList final : public SfxListener
|
|||
public:
|
||||
// Constructor
|
||||
StyleList(weld::Builder* pBuilder, SfxBindings* pBindings, SfxCommonTemplateDialog_Impl* Parent,
|
||||
weld::Container* pC, OUString treeviewname, OUString flatviewname);
|
||||
weld::Container* pC, const OUString& treeviewname, const OUString& flatviewname);
|
||||
|
||||
// Destructor
|
||||
~StyleList();
|
||||
|
|
|
@ -3942,7 +3942,7 @@ void SfxViewShell::setBlockedCommandList(const char* blockedCommandList)
|
|||
}
|
||||
}
|
||||
|
||||
bool SfxViewShell::isBlockedCommand(OUString command) const
|
||||
bool SfxViewShell::isBlockedCommand(const OUString & command) const
|
||||
{
|
||||
return mvLOKBlockedCommandList.find(command) != mvLOKBlockedCommandList.end();
|
||||
}
|
||||
|
|
|
@ -267,7 +267,7 @@ void box2DWorld::createStaticFrameAroundSlide(const ::basegfx::B2DVector& rSlide
|
|||
pStaticBody->CreateFixture(&aFixtureDef);
|
||||
}
|
||||
|
||||
void box2DWorld::setShapePosition(const css::uno::Reference<css::drawing::XShape> xShape,
|
||||
void box2DWorld::setShapePosition(const css::uno::Reference<css::drawing::XShape>& xShape,
|
||||
const basegfx::B2DPoint& rOutPos)
|
||||
{
|
||||
const auto iter = mpXShapeToBodyMap.find(xShape);
|
||||
|
@ -277,7 +277,7 @@ void box2DWorld::setShapePosition(const css::uno::Reference<css::drawing::XShape
|
|||
}
|
||||
|
||||
void box2DWorld::setShapePositionByLinearVelocity(
|
||||
const css::uno::Reference<css::drawing::XShape> xShape, const basegfx::B2DPoint& rOutPos,
|
||||
const css::uno::Reference<css::drawing::XShape>& xShape, const basegfx::B2DPoint& rOutPos,
|
||||
const double fPassedTime)
|
||||
{
|
||||
assert(mpBox2DWorld);
|
||||
|
@ -290,7 +290,7 @@ void box2DWorld::setShapePositionByLinearVelocity(
|
|||
}
|
||||
}
|
||||
|
||||
void box2DWorld::setShapeLinearVelocity(const css::uno::Reference<css::drawing::XShape> xShape,
|
||||
void box2DWorld::setShapeLinearVelocity(const css::uno::Reference<css::drawing::XShape>& xShape,
|
||||
const basegfx::B2DVector& rVelocity)
|
||||
{
|
||||
assert(mpBox2DWorld);
|
||||
|
@ -300,7 +300,7 @@ void box2DWorld::setShapeLinearVelocity(const css::uno::Reference<css::drawing::
|
|||
pBox2DBody->setLinearVelocity(rVelocity);
|
||||
}
|
||||
|
||||
void box2DWorld::setShapeAngle(const css::uno::Reference<css::drawing::XShape> xShape,
|
||||
void box2DWorld::setShapeAngle(const css::uno::Reference<css::drawing::XShape>& xShape,
|
||||
const double fAngle)
|
||||
{
|
||||
const auto iter = mpXShapeToBodyMap.find(xShape);
|
||||
|
@ -310,7 +310,7 @@ void box2DWorld::setShapeAngle(const css::uno::Reference<css::drawing::XShape> x
|
|||
}
|
||||
|
||||
void box2DWorld::setShapeAngleByAngularVelocity(
|
||||
const css::uno::Reference<css::drawing::XShape> xShape, const double fAngle,
|
||||
const css::uno::Reference<css::drawing::XShape>& xShape, const double fAngle,
|
||||
const double fPassedTime)
|
||||
{
|
||||
assert(mpBox2DWorld);
|
||||
|
@ -323,7 +323,7 @@ void box2DWorld::setShapeAngleByAngularVelocity(
|
|||
}
|
||||
}
|
||||
|
||||
void box2DWorld::setShapeAngularVelocity(const css::uno::Reference<css::drawing::XShape> xShape,
|
||||
void box2DWorld::setShapeAngularVelocity(const css::uno::Reference<css::drawing::XShape>& xShape,
|
||||
const double fAngularVelocity)
|
||||
{
|
||||
assert(mpBox2DWorld);
|
||||
|
@ -333,7 +333,7 @@ void box2DWorld::setShapeAngularVelocity(const css::uno::Reference<css::drawing:
|
|||
pBox2DBody->setAngularVelocity(fAngularVelocity);
|
||||
}
|
||||
|
||||
void box2DWorld::setShapeCollision(const css::uno::Reference<css::drawing::XShape> xShape,
|
||||
void box2DWorld::setShapeCollision(const css::uno::Reference<css::drawing::XShape>& xShape,
|
||||
bool bCanCollide)
|
||||
{
|
||||
assert(mpBox2DWorld);
|
||||
|
|
|
@ -113,7 +113,7 @@ private:
|
|||
@param rOutPos
|
||||
Position in LO user space coordinates
|
||||
*/
|
||||
void setShapePosition(const css::uno::Reference<css::drawing::XShape> xShape,
|
||||
void setShapePosition(const css::uno::Reference<css::drawing::XShape>& xShape,
|
||||
const ::basegfx::B2DPoint& rOutPos);
|
||||
|
||||
/** Moves shape's corresponding Box2D body to specified position
|
||||
|
@ -130,7 +130,7 @@ private:
|
|||
@param fPassedTime
|
||||
Time frame which the Box2D body should move to the specified position.
|
||||
*/
|
||||
void setShapePositionByLinearVelocity(const css::uno::Reference<css::drawing::XShape> xShape,
|
||||
void setShapePositionByLinearVelocity(const css::uno::Reference<css::drawing::XShape>& xShape,
|
||||
const ::basegfx::B2DPoint& rOutPos,
|
||||
const double fPassedTime);
|
||||
|
||||
|
@ -145,7 +145,7 @@ private:
|
|||
@param rVelocity
|
||||
Velocity vector in LO user space coordinates.
|
||||
*/
|
||||
void setShapeLinearVelocity(const css::uno::Reference<css::drawing::XShape> xShape,
|
||||
void setShapeLinearVelocity(const css::uno::Reference<css::drawing::XShape>& xShape,
|
||||
const basegfx::B2DVector& rVelocity);
|
||||
|
||||
/** Sets rotation angle of the shape's corresponding Box2D body
|
||||
|
@ -156,7 +156,8 @@ private:
|
|||
@param fAngle
|
||||
Angle of rotation in degrees.
|
||||
*/
|
||||
void setShapeAngle(const css::uno::Reference<css::drawing::XShape> xShape, const double fAngle);
|
||||
void setShapeAngle(const css::uno::Reference<css::drawing::XShape>& xShape,
|
||||
const double fAngle);
|
||||
|
||||
/** Rotates shape's corresponding Box2D body to specified angle
|
||||
|
||||
|
@ -173,7 +174,7 @@ private:
|
|||
@param fPassedTime
|
||||
Time frame which the Box2D body should rotate to the specified angle.
|
||||
*/
|
||||
void setShapeAngleByAngularVelocity(const css::uno::Reference<css::drawing::XShape> xShape,
|
||||
void setShapeAngleByAngularVelocity(const css::uno::Reference<css::drawing::XShape>& xShape,
|
||||
const double fAngle, const double fPassedTime);
|
||||
|
||||
/** Sets angular velocity of the shape's corresponding Box2D body.
|
||||
|
@ -184,7 +185,7 @@ private:
|
|||
@param fAngularVelocity
|
||||
Angular velocity in degrees per second.
|
||||
*/
|
||||
void setShapeAngularVelocity(const css::uno::Reference<css::drawing::XShape> xShape,
|
||||
void setShapeAngularVelocity(const css::uno::Reference<css::drawing::XShape>& xShape,
|
||||
const double fAngularVelocity);
|
||||
|
||||
/** Sets whether a shape's corresponding Box2D body has collision in the Box2D World or not
|
||||
|
@ -198,7 +199,7 @@ private:
|
|||
true if collisions should be enabled for the corresponding Box2D body of this shape
|
||||
and false if it should be disabled.
|
||||
*/
|
||||
void setShapeCollision(const css::uno::Reference<css::drawing::XShape> xShape,
|
||||
void setShapeCollision(const css::uno::Reference<css::drawing::XShape>& xShape,
|
||||
const bool bCanCollide);
|
||||
|
||||
/** Process the updates queued in the maShapeParallelUpdateQueue
|
||||
|
|
|
@ -23,7 +23,7 @@ struct StringWithHash
|
|||
OUString str;
|
||||
sal_Int32 hashCode;
|
||||
StringWithHash(OUString s)
|
||||
: str(s)
|
||||
: str(std::move(s))
|
||||
, hashCode(s.hashCode())
|
||||
{
|
||||
}
|
||||
|
|
|
@ -411,7 +411,7 @@ css::uno::Reference< css::ui::XAcceleratorConfiguration > AcceleratorExecute::st
|
|||
return xAccCfg;
|
||||
}
|
||||
|
||||
css::uno::Reference<css::ui::XAcceleratorConfiguration> AcceleratorExecute::lok_createNewAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext >& rxContext, OUString sModule)
|
||||
css::uno::Reference<css::ui::XAcceleratorConfiguration> AcceleratorExecute::lok_createNewAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext >& rxContext, const OUString& sModule)
|
||||
{
|
||||
css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xUISupplier(css::ui::theModuleUIConfigurationManagerSupplier::get(rxContext));
|
||||
|
||||
|
|
|
@ -60,7 +60,8 @@ protected:
|
|||
sal_uInt8 countShapes();
|
||||
// fX and fY are positions relative to the size of the bitmap of the shape
|
||||
// Thus the position is independent from DPI
|
||||
Color getColor(uno::Reference<drawing::XShape> xShape, const double& fX, const double& fY);
|
||||
Color getColor(const uno::Reference<drawing::XShape>& xShape, const double& fX,
|
||||
const double& fY);
|
||||
};
|
||||
|
||||
uno::Reference<drawing::XShape> CustomshapesTest::getShape(sal_uInt8 nShapeIndex)
|
||||
|
@ -87,7 +88,7 @@ sal_uInt8 CustomshapesTest::countShapes()
|
|||
return xDrawPage->getCount();
|
||||
}
|
||||
|
||||
Color CustomshapesTest::getColor(uno::Reference<drawing::XShape> xShape, const double& fX,
|
||||
Color CustomshapesTest::getColor(const uno::Reference<drawing::XShape>& xShape, const double& fX,
|
||||
const double& fY)
|
||||
{
|
||||
GraphicHelper::SaveShapeAsGraphicToPath(mxComponent, xShape, u"image/png"_ustr,
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
|
||||
#include <com/sun/star/system/SystemShellExecute.hpp>
|
||||
|
||||
FileExportedDialog::FileExportedDialog(weld::Window* pParent, OUString atitle)
|
||||
FileExportedDialog::FileExportedDialog(weld::Window* pParent, const OUString& atitle)
|
||||
: GenericDialogController(pParent, u"svx/ui/fileexporteddialog.ui"_ustr,
|
||||
u"FileExportedDialog"_ustr)
|
||||
, m_xFileLabel(m_xBuilder->weld_label(u"Filelabel"_ustr))
|
||||
|
@ -40,4 +40,4 @@ IMPL_LINK_NOARG(FileExportedDialog, OpenHdl, weld::Button&, void)
|
|||
TOOLS_WARN_EXCEPTION("svx.dialog", "opening <" << uri << "> failed:");
|
||||
}
|
||||
m_xDialog->response(RET_OK);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3436,7 +3436,7 @@ sal_Bool SAL_CALL FormController::supportsMode(const OUString& Mode)
|
|||
return comphelper::findValue(aModes, Mode) != -1;
|
||||
}
|
||||
|
||||
css::uno::Reference<css::awt::XWindow> FormController::getDialogParentWindow(css::uno::Reference<css::form::runtime::XFormController> xFormController)
|
||||
css::uno::Reference<css::awt::XWindow> FormController::getDialogParentWindow(const css::uno::Reference<css::form::runtime::XFormController> & xFormController)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
@ -203,7 +203,7 @@ namespace svxform
|
|||
FormController( const css::uno::Reference< css::uno::XComponentContext > & _rxORB );
|
||||
|
||||
// returns the window which should be used as parent window for dialogs
|
||||
static css::uno::Reference<css::awt::XWindow> getDialogParentWindow(css::uno::Reference<css::form::runtime::XFormController> xFormController);
|
||||
static css::uno::Reference<css::awt::XWindow> getDialogParentWindow(const css::uno::Reference<css::form::runtime::XFormController> & xFormController);
|
||||
|
||||
private:
|
||||
virtual ~FormController() override;
|
||||
|
|
|
@ -175,7 +175,7 @@ void SdrPreRenderDevice::OutputPreRenderDevice(const vcl::Region& rExpandedRegio
|
|||
mpPreRenderDevice->EnableMapMode(bMapModeWasEnabledSource);
|
||||
}
|
||||
|
||||
void SdrPaintView::InitOverlayManager(rtl::Reference<sdr::overlay::OverlayManager> xOverlayManager)
|
||||
void SdrPaintView::InitOverlayManager(const rtl::Reference<sdr::overlay::OverlayManager> & xOverlayManager)
|
||||
{
|
||||
Color aColA(SvtOptionsDrawinglayer::GetStripeColorA());
|
||||
Color aColB(SvtOptionsDrawinglayer::GetStripeColorB());
|
||||
|
|
|
@ -457,7 +457,7 @@ rtl::Reference<SdrPathObj> SdrTextObj::ImpConvertMakeObj(const basegfx::B2DPolyP
|
|||
return pPathObj;
|
||||
}
|
||||
|
||||
rtl::Reference<SdrObject> SdrTextObj::ImpConvertAddText(rtl::Reference<SdrObject> pObj, bool bBezier) const
|
||||
rtl::Reference<SdrObject> SdrTextObj::ImpConvertAddText(const rtl::Reference<SdrObject> & pObj, bool bBezier) const
|
||||
{
|
||||
if(!ImpCanConvTextToCurve())
|
||||
{
|
||||
|
|
|
@ -366,7 +366,7 @@ public:
|
|||
void SwitchFormulasToInternalRepresentation()
|
||||
{ UpdateFields(TBL_BOXPTR); }
|
||||
void Merge(SwTable& rTable, SwHistory* pHistory);
|
||||
void Split(OUString sNewTableName, sal_uInt16 nSplitLine, SwHistory* pHistory);
|
||||
void Split(const OUString& sNewTableName, sal_uInt16 nSplitLine, SwHistory* pHistory);
|
||||
|
||||
static void GatherFormulas(SwDoc& rDoc, std::vector<SwTableBoxFormula*>& rvFormulas);
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ public:
|
|||
static void create(SwFrameFormat* pShape, SdrObject* pObject, bool bCopyText = false);
|
||||
/// Sets the given textframe as textbox for the given (group member) shape.
|
||||
static void set(SwFrameFormat* pShape, SdrObject* pObject,
|
||||
css::uno::Reference<css::text::XTextFrame> xNew);
|
||||
const css::uno::Reference<css::text::XTextFrame>& xNew);
|
||||
/// Destroy a TextBox for a shape. If the format has more textboxes
|
||||
/// like group shapes, it will destroy only that textbox what belongs
|
||||
/// to the given pObject shape.
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
|
||||
virtual const sal_Int32* GetEnd() const override; // SwTextAttr
|
||||
virtual void SetEnd(sal_Int32) override; // SwTextAttr
|
||||
void UpdateFieldContent(SwDoc* pDoc, SwWrtShell& rWrtSh, OUString aContent);
|
||||
void UpdateFieldContent(SwDoc* pDoc, SwWrtShell& rWrtSh, const OUString& aContent);
|
||||
|
||||
// get and set TextNode pointer
|
||||
inline const SwTextNode& GetTextNode() const;
|
||||
|
|
|
@ -142,7 +142,7 @@ namespace sw
|
|||
{ return get(); }
|
||||
SwUnoCursor& operator*() const
|
||||
{ return *get(); }
|
||||
UnoCursorPointer& operator=(UnoCursorPointer aOther)
|
||||
UnoCursorPointer& operator=(const UnoCursorPointer& aOther)
|
||||
{
|
||||
if (m_pCursor)
|
||||
{
|
||||
|
|
|
@ -647,7 +647,7 @@ public:
|
|||
std::shared_ptr<SwMailMergeConfigItem> EnsureMailMergeConfigItem(const SfxItemSet* pArgs = nullptr);
|
||||
|
||||
OUString GetDataSourceName() const;
|
||||
static bool IsDataSourceAvailable(const OUString sDataSourceName);
|
||||
static bool IsDataSourceAvailable(const OUString& sDataSourceName);
|
||||
|
||||
void ExecFormatPaintbrush(SfxRequest const &);
|
||||
void StateFormatPaintbrush(SfxItemSet &);
|
||||
|
|
|
@ -78,7 +78,7 @@ protected:
|
|||
OUString mpFilter;
|
||||
|
||||
/// Copy&paste helper.
|
||||
void paste(std::u16string_view aFilename, OUString aInstance, css::uno::Reference<css::text::XTextRange> const& xTextRange);
|
||||
void paste(std::u16string_view aFilename, const OUString& aInstance, css::uno::Reference<css::text::XTextRange> const& xTextRange);
|
||||
|
||||
public:
|
||||
SwModelTestBase(const OUString& pTestDocumentPath = OUString(), const OUString& pFilter = {});
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
using namespace css;
|
||||
|
||||
void SwModelTestBase::paste(std::u16string_view aFilename, OUString aInstance,
|
||||
void SwModelTestBase::paste(std::u16string_view aFilename, const OUString& aInstance,
|
||||
uno::Reference<text::XTextRange> const& xTextRange)
|
||||
{
|
||||
uno::Reference<document::XFilter> xFilter(m_xSFactory->createInstance(aInstance),
|
||||
|
|
|
@ -232,7 +232,7 @@ void SwTextBoxHelper::create(SwFrameFormat* pShape, SdrObject* pObject, bool bCo
|
|||
}
|
||||
|
||||
void SwTextBoxHelper::set(SwFrameFormat* pShapeFormat, SdrObject* pObj,
|
||||
uno::Reference<text::XTextFrame> xNew)
|
||||
const uno::Reference<text::XTextFrame>& xNew)
|
||||
{
|
||||
// Do not set invalid data
|
||||
assert(pShapeFormat && pObj && xNew);
|
||||
|
|
|
@ -1754,7 +1754,7 @@ SwPostItField::SwPostItField( SwPostItFieldType* pT,
|
|||
const sal_uInt32 nParentId,
|
||||
const sal_uInt32 nParaId,
|
||||
const sal_uInt32 nParentPostItId,
|
||||
const OUString aParentName
|
||||
OUString aParentName
|
||||
)
|
||||
: SwField( pT )
|
||||
, m_sText( std::move(aText) )
|
||||
|
@ -1766,7 +1766,7 @@ SwPostItField::SwPostItField( SwPostItFieldType* pT,
|
|||
, m_nParentId( nParentId )
|
||||
, m_nParaId( nParaId )
|
||||
, m_nParentPostItId ( nParentPostItId )
|
||||
, m_sParentName( aParentName )
|
||||
, m_sParentName( std::move(aParentName) )
|
||||
{
|
||||
m_nPostItId = nPostItId == 0 ? s_nLastPostItId++ : nPostItId;
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ public:
|
|||
static rtl::Reference<SwXMeta>
|
||||
CreateXMeta(
|
||||
::sw::Meta & rMeta,
|
||||
css::uno::Reference<SwXText> xParentText,
|
||||
const css::uno::Reference<SwXText>& xParentText,
|
||||
std::unique_ptr<TextRangeList_t const> && pPortions);
|
||||
|
||||
static rtl::Reference<SwXMeta>
|
||||
|
@ -194,7 +194,7 @@ private:
|
|||
|
||||
friend rtl::Reference<SwXMeta>
|
||||
SwXMeta::CreateXMeta(::sw::Meta &,
|
||||
css::uno::Reference<SwXText>,
|
||||
const css::uno::Reference<SwXText>&,
|
||||
std::unique_ptr<TextRangeList_t const> && pPortions);
|
||||
|
||||
SwXMetaField(SwDoc *const pDoc, ::sw::Meta *const pMeta,
|
||||
|
|
|
@ -1653,7 +1653,7 @@ void SwTable::GatherFormulas(SwDoc& rDoc, std::vector<SwTableBoxFormula*>& rvFor
|
|||
}
|
||||
}
|
||||
|
||||
void SwTable::Split(OUString sNewTableName, sal_uInt16 nSplitLine, SwHistory* pHistory)
|
||||
void SwTable::Split(const OUString& sNewTableName, sal_uInt16 nSplitLine, SwHistory* pHistory)
|
||||
{
|
||||
SwTableFormulaUpdate aHint(this);
|
||||
aHint.m_eFlags = TBL_SPLITTBL;
|
||||
|
|
|
@ -171,7 +171,7 @@ void SwTextRefMark::SetEnd(sal_Int32 n)
|
|||
}
|
||||
}
|
||||
|
||||
void SwTextRefMark::UpdateFieldContent(SwDoc* pDoc, SwWrtShell& rWrtSh, OUString aContent)
|
||||
void SwTextRefMark::UpdateFieldContent(SwDoc* pDoc, SwWrtShell& rWrtSh, const OUString& aContent)
|
||||
{
|
||||
if (!this->End())
|
||||
{
|
||||
|
|
|
@ -672,7 +672,7 @@ SwXMeta::CreateXMeta(SwDoc & rDoc, bool const isField)
|
|||
|
||||
rtl::Reference<SwXMeta>
|
||||
SwXMeta::CreateXMeta(::sw::Meta & rMeta,
|
||||
css::uno::Reference<SwXText> i_xParent,
|
||||
const css::uno::Reference<SwXText>& i_xParent,
|
||||
std::unique_ptr<TextRangeList_t const> && pPortions)
|
||||
{
|
||||
// re-use existing SwXMeta
|
||||
|
|
|
@ -182,7 +182,7 @@ constexpr ParagraphStyleCategoryEntry sParagraphStyleCategoryEntries[]
|
|||
class StyleFamilyEntry
|
||||
{
|
||||
public:
|
||||
template <SfxStyleFamily f> static StyleFamilyEntry Create(sal_uInt16 nPropMapType, SwGetPoolIdFromName aPoolId, OUString sName, TranslateId pResId)
|
||||
template <SfxStyleFamily f> static StyleFamilyEntry Create(sal_uInt16 nPropMapType, SwGetPoolIdFromName aPoolId, const OUString& sName, TranslateId pResId)
|
||||
{
|
||||
return StyleFamilyEntry(f, nPropMapType, aPoolId, sName, pResId, GetCountOrName<f>, TranslateIndex<f>);
|
||||
}
|
||||
|
|
|
@ -317,7 +317,7 @@ public:
|
|||
void SetFloatingTableFrame(const ww8::Frame* pF) { m_pFloatingTableFrame = pF; }
|
||||
|
||||
// Get author id to remove personal info
|
||||
size_t GetInfoID( const OUString sPersonalInfo ) const { return m_pAuthorIDs->GetInfoID(sPersonalInfo); }
|
||||
size_t GetInfoID( const OUString& sPersonalInfo ) const { return m_pAuthorIDs->GetInfoID(sPersonalInfo); }
|
||||
|
||||
// needed in docxsdrexport.cxx and docxattributeoutput.cxx
|
||||
sal_Int32 getWordCompatibilityModeFromGrabBag() const;
|
||||
|
|
|
@ -205,7 +205,7 @@ public:
|
|||
const SfxItemSet* GetFirstPageItemSet() const { return m_pFirstPageItemSet; }
|
||||
|
||||
// Get author id to remove personal info
|
||||
size_t GetInfoID(const OUString sPersonalInfo) const
|
||||
size_t GetInfoID(const OUString& sPersonalInfo) const
|
||||
{
|
||||
return mpAuthorIDs->GetInfoID(sPersonalInfo);
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ public:
|
|||
bool mbResolved;
|
||||
|
||||
void InitControls(const SwPostItField* pPostItField);
|
||||
void SetCommentText(OUString sText) { msText = sText; }
|
||||
void SetCommentText(OUString sText) { msText = std::move(sText); }
|
||||
const OUString& GetAuthor() { return msAuthor; }
|
||||
const Date& GetDate() { return maDate; }
|
||||
};
|
||||
|
|
|
@ -2026,7 +2026,7 @@ OUString SwView::GetDataSourceName() const
|
|||
return sDataSourceName;
|
||||
}
|
||||
|
||||
bool SwView::IsDataSourceAvailable(const OUString sDataSourceName)
|
||||
bool SwView::IsDataSourceAvailable(const OUString& sDataSourceName)
|
||||
{
|
||||
const uno::Reference< uno::XComponentContext >& xContext( ::comphelper::getProcessComponentContext() );
|
||||
Reference< XDatabaseContext> xDatabaseContext = DatabaseContext::create(xContext);
|
||||
|
|
|
@ -190,7 +190,7 @@ private:
|
|||
public:
|
||||
SwNumberInputDlg(weld::Window* pParent, const OUString& rTitle,
|
||||
const OUString& rLabel1, const sal_Int64 nValue, const sal_Int64 min, const sal_Int64 max,
|
||||
OUString rLabel2 = OUString())
|
||||
const OUString& rLabel2 = OUString())
|
||||
: SfxDialogController(pParent, u"modules/swriter/ui/numberinput.ui"_ustr, u"NumberInputDialog"_ustr)
|
||||
, m_xLabel1(m_xBuilder->weld_label(u"label1"_ustr))
|
||||
, m_xSpinButton(m_xBuilder->weld_spin_button(u"spinbutton"_ustr))
|
||||
|
|
|
@ -1079,7 +1079,7 @@ static bool isAbsent(const std::vector<beans::PropertyValue>& propvals, const OU
|
|||
|
||||
// table style has got bigger precedence than docDefault style,
|
||||
// but lower precedence than the paragraph styles and direct paragraph formatting
|
||||
void DomainMapperTableHandler::ApplyParagraphPropertiesFromTableStyle(TableParagraph rParaProp, std::vector< PropertyIds > aAllTableParaProperties, const css::beans::PropertyValues rCellProperties)
|
||||
void DomainMapperTableHandler::ApplyParagraphPropertiesFromTableStyle(TableParagraph rParaProp, std::vector< PropertyIds > aAllTableParaProperties, const css::beans::PropertyValues& rCellProperties)
|
||||
{
|
||||
// Setting paragraph or character properties using setPropertyValue may have unwanted
|
||||
// side effects; e.g., setting a paragraph's font size can reset font size in a runs
|
||||
|
|
|
@ -87,7 +87,7 @@ public:
|
|||
*/
|
||||
void startTable(const TablePropertyMapPtr& pProps);
|
||||
|
||||
void ApplyParagraphPropertiesFromTableStyle(TableParagraph rParaProp, std::vector< PropertyIds > aAllTableProperties, const css::beans::PropertyValues rCellProperties);
|
||||
void ApplyParagraphPropertiesFromTableStyle(TableParagraph rParaProp, std::vector< PropertyIds > aAllTableProperties, const css::beans::PropertyValues & rCellProperties);
|
||||
|
||||
/// Handle end of table.
|
||||
void endTable(unsigned int nestedTableLevel);
|
||||
|
|
|
@ -141,7 +141,7 @@ public:
|
|||
// setMoved() writes the first level from these two levels
|
||||
// i.e. second startLevel() hasn't been called, yet.)
|
||||
// TODO: check drag & drop of only a part of the tables.
|
||||
void setMoved(OUString sMoved)
|
||||
void setMoved(const OUString& sMoved)
|
||||
{
|
||||
if ( m_aMoved.empty() )
|
||||
return;
|
||||
|
|
|
@ -4415,8 +4415,8 @@ static void lcl_PasteRedlines(
|
|||
}
|
||||
|
||||
bool DomainMapper_Impl::CopyTemporaryNotes(
|
||||
rtl::Reference< SwXFootnote > xNoteSrc,
|
||||
rtl::Reference< SwXFootnote > xNoteDest )
|
||||
const rtl::Reference< SwXFootnote > & xNoteSrc,
|
||||
const rtl::Reference< SwXFootnote > & xNoteDest )
|
||||
{
|
||||
if (!m_bSaxError && xNoteSrc != xNoteDest)
|
||||
{
|
||||
|
@ -6000,7 +6000,7 @@ void DomainMapper_Impl::PopTextBoxContent()
|
|||
}
|
||||
}
|
||||
|
||||
void DomainMapper_Impl::AttachTextBoxContentToShape(css::uno::Reference<css::drawing::XShape> xShape)
|
||||
void DomainMapper_Impl::AttachTextBoxContentToShape(const css::uno::Reference<css::drawing::XShape> & xShape)
|
||||
{
|
||||
// Without textbox or shape pointless to continue
|
||||
if (m_xPendingTextBoxFrames.empty() || !xShape)
|
||||
|
@ -7510,8 +7510,8 @@ void DomainMapper_Impl::handleToc
|
|||
}
|
||||
|
||||
rtl::Reference<SwXSection> DomainMapper_Impl::createSectionForRange(
|
||||
uno::Reference< css::text::XTextRange > xStart,
|
||||
uno::Reference< css::text::XTextRange > xEnd,
|
||||
const uno::Reference< css::text::XTextRange > & xStart,
|
||||
const uno::Reference< css::text::XTextRange > & xEnd,
|
||||
std::u16string_view sObjectType,
|
||||
bool stepLeft)
|
||||
{
|
||||
|
|
|
@ -761,7 +761,7 @@ public:
|
|||
|
||||
void PushTextBoxContent();
|
||||
void PopTextBoxContent();
|
||||
void AttachTextBoxContentToShape(css::uno::Reference<css::drawing::XShape> xShape);
|
||||
void AttachTextBoxContentToShape(const css::uno::Reference<css::drawing::XShape> & xShape);
|
||||
|
||||
void RemoveDummyParaForTableInSection();
|
||||
void AddDummyParaForTableInSection();
|
||||
|
@ -968,8 +968,8 @@ public:
|
|||
sal_Int32 GetEndnoteCount() const { return m_nEndnotes; }
|
||||
void IncrementEndnoteCount() { ++m_nEndnotes; }
|
||||
bool CopyTemporaryNotes(
|
||||
rtl::Reference< SwXFootnote > xNoteSrc,
|
||||
rtl::Reference< SwXFootnote > xNoteDest );
|
||||
const rtl::Reference< SwXFootnote > & xNoteSrc,
|
||||
const rtl::Reference< SwXFootnote > & xNoteDest );
|
||||
void RemoveTemporaryFootOrEndnotes();
|
||||
|
||||
void PushAnnotation();
|
||||
|
@ -1032,8 +1032,8 @@ public:
|
|||
/// Returns title of the TOC placed in paragraph(s) before TOC field inside STD-frame
|
||||
OUString extractTocTitle();
|
||||
rtl::Reference<SwXSection> createSectionForRange(
|
||||
css::uno::Reference< css::text::XTextRange > xStart,
|
||||
css::uno::Reference< css::text::XTextRange > xEnd,
|
||||
const css::uno::Reference< css::text::XTextRange > & xStart,
|
||||
const css::uno::Reference< css::text::XTextRange > & xEnd,
|
||||
std::u16string_view sObjectType, bool stepLeft);
|
||||
|
||||
void SetBookmarkName( const OUString& rBookmarkName );
|
||||
|
|
|
@ -414,7 +414,7 @@ public:
|
|||
|
||||
void SetPaperSource(sal_Int32 first, sal_Int32 other) { m_nPaperSourceFirst = first; m_nPaperSourceOther = other;}
|
||||
|
||||
void addRelativeWidthShape( css::uno::Reference<css::drawing::XShape> xShape ) { m_xRelativeWidthShapes.push_back( xShape ); }
|
||||
void addRelativeWidthShape( const css::uno::Reference<css::drawing::XShape>& xShape ) { m_xRelativeWidthShapes.push_back( xShape ); }
|
||||
|
||||
// determine which style gets the borders
|
||||
void ApplyBorderToPageStyles( DomainMapper_Impl &rDM_Impl,
|
||||
|
|
|
@ -83,14 +83,14 @@ XAccessibleEventBroadcasterTester::XAccessibleEventBroadcasterTester(
|
|||
}
|
||||
|
||||
bool XAccessibleEventBroadcasterTester::isTransient(
|
||||
const uno::Reference<accessibility::XAccessibleEventBroadcaster> xBroadcaster)
|
||||
const uno::Reference<accessibility::XAccessibleEventBroadcaster>& xBroadcaster)
|
||||
{
|
||||
uno::Reference<accessibility::XAccessibleContext> xCtx(xBroadcaster, uno::UNO_QUERY_THROW);
|
||||
return isTransient(xCtx);
|
||||
}
|
||||
|
||||
bool XAccessibleEventBroadcasterTester::isTransient(
|
||||
const uno::Reference<accessibility::XAccessibleContext> xCtx)
|
||||
const uno::Reference<accessibility::XAccessibleContext>& xCtx)
|
||||
{
|
||||
return ((xCtx->getAccessibleStateSet() & accessibility::AccessibleStateType::TRANSIENT)
|
||||
&& (xCtx->getAccessibleParent()->getAccessibleContext()->getAccessibleStateSet()
|
||||
|
|
|
@ -31,8 +31,9 @@ private:
|
|||
const css::uno::Reference<css::awt::XWindow> mxWindow;
|
||||
|
||||
static bool isTransient(
|
||||
const css::uno::Reference<css::accessibility::XAccessibleEventBroadcaster> xBroadcaster);
|
||||
static bool isTransient(const css::uno::Reference<css::accessibility::XAccessibleContext> xCtx);
|
||||
const css::uno::Reference<css::accessibility::XAccessibleEventBroadcaster>& xBroadcaster);
|
||||
static bool
|
||||
isTransient(const css::uno::Reference<css::accessibility::XAccessibleContext>& xCtx);
|
||||
|
||||
void fireEvent();
|
||||
|
||||
|
|
|
@ -413,7 +413,7 @@ void SetOption( EOption eOption, bool bValue )
|
|||
|
||||
|
||||
// map personal info strings to 1, 2, ... to remove personal info
|
||||
size_t SvtSecurityMapPersonalInfo::GetInfoID( const OUString sPersonalInfo )
|
||||
size_t SvtSecurityMapPersonalInfo::GetInfoID( const OUString& sPersonalInfo )
|
||||
{
|
||||
auto aIter = aInfoIDs.find( sPersonalInfo );
|
||||
if ( aIter == aInfoIDs.end() )
|
||||
|
|
|
@ -139,7 +139,7 @@ static std::unique_ptr<SvStream> lcl_CreateStream( const OUString& rFileName, St
|
|||
|
||||
std::unique_ptr<SvStream>
|
||||
UcbStreamHelper::CreateStream(const OUString& rFileName, StreamMode eOpenMode,
|
||||
css::uno::Reference<css::awt::XWindow> xParentWin,
|
||||
const css::uno::Reference<css::awt::XWindow>& xParentWin,
|
||||
bool bUseSimpleFileAccessInteraction)
|
||||
{
|
||||
// related tdf#99312
|
||||
|
@ -157,7 +157,7 @@ UcbStreamHelper::CreateStream(const OUString& rFileName, StreamMode eOpenMode,
|
|||
|
||||
std::unique_ptr<SvStream>
|
||||
UcbStreamHelper::CreateStream(const OUString& rFileName, StreamMode eOpenMode, bool bFileExists,
|
||||
css::uno::Reference<css::awt::XWindow> xParentWin,
|
||||
const css::uno::Reference<css::awt::XWindow> & xParentWin,
|
||||
bool bUseSimpleFileAccessInteraction)
|
||||
{
|
||||
// related tdf#99312
|
||||
|
|
|
@ -132,9 +132,9 @@ private:
|
|||
OString generateCloseMessage() const;
|
||||
OString generateActionMessage(VclPtr<vcl::Window> pWindow,
|
||||
std::unique_ptr<jsdialog::ActionDataMap> pData) const;
|
||||
OString generatePopupMessage(VclPtr<vcl::Window> pWindow, OUString sParentId,
|
||||
OUString sCloseId) const;
|
||||
OString generateClosePopupMessage(OUString sWindowId) const;
|
||||
OString generatePopupMessage(VclPtr<vcl::Window> pWindow, const OUString& sParentId,
|
||||
const OUString& sCloseId) const;
|
||||
OString generateClosePopupMessage(const OUString& sWindowId) const;
|
||||
};
|
||||
|
||||
class JSDialogSender
|
||||
|
|
|
@ -852,7 +852,7 @@ private:
|
|||
/* the buffer where the data are encrypted, dynamically allocated */
|
||||
std::vector<sal_uInt8> m_vEncryptionBuffer;
|
||||
|
||||
void addRoleMap(OString aAlias, PDFWriter::StructElement eType);
|
||||
void addRoleMap(const OString& aAlias, PDFWriter::StructElement eType);
|
||||
|
||||
/* this function implements part of the PDF spec algorithm 3.1 in encryption, the rest (the actual encryption) is in PDFWriterImpl::writeBuffer */
|
||||
void checkAndEnableStreamEncryption( sal_Int32 nObject ) override;
|
||||
|
|
|
@ -32,10 +32,10 @@ private:
|
|||
|
||||
public:
|
||||
/** Returns the related QObject* for the XAccessible. Creates a new one if none exists yet. */
|
||||
static QObject* getQObject(css::uno::Reference<XAccessible> xAcc);
|
||||
static void insert(css::uno::Reference<XAccessible> xAcc, QObject* pQObject);
|
||||
static QObject* getQObject(const css::uno::Reference<XAccessible>& xAcc);
|
||||
static void insert(const css::uno::Reference<XAccessible>& xAcc, QObject* pQObject);
|
||||
/** Removes the entry for the given XAccessible. */
|
||||
static void remove(css::uno::Reference<XAccessible> xAcc);
|
||||
static void remove(const css::uno::Reference<XAccessible>& xAcc);
|
||||
};
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||
|
|
|
@ -51,7 +51,7 @@ class QtAccessibleWidget final : public QAccessibleInterface,
|
|||
public QAccessibleValueInterface
|
||||
{
|
||||
public:
|
||||
QtAccessibleWidget(const css::uno::Reference<css::accessibility::XAccessible> xAccessible,
|
||||
QtAccessibleWidget(const css::uno::Reference<css::accessibility::XAccessible>& xAccessible,
|
||||
QObject* pObject);
|
||||
|
||||
void invalidate();
|
||||
|
|
|
@ -193,8 +193,9 @@ JSDialogNotifyIdle::generateActionMessage(VclPtr<vcl::Window> pWindow,
|
|||
return aJsonWriter.finishAndGetAsOString();
|
||||
}
|
||||
|
||||
OString JSDialogNotifyIdle::generatePopupMessage(VclPtr<vcl::Window> pWindow, OUString sParentId,
|
||||
OUString sCloseId) const
|
||||
OString JSDialogNotifyIdle::generatePopupMessage(VclPtr<vcl::Window> pWindow,
|
||||
const OUString& sParentId,
|
||||
const OUString& sCloseId) const
|
||||
{
|
||||
if (!pWindow || !m_aNotifierWindow)
|
||||
return OString();
|
||||
|
@ -242,7 +243,7 @@ OString JSDialogNotifyIdle::generatePopupMessage(VclPtr<vcl::Window> pWindow, OU
|
|||
return aJsonWriter.finishAndGetAsOString();
|
||||
}
|
||||
|
||||
OString JSDialogNotifyIdle::generateClosePopupMessage(OUString sWindowId) const
|
||||
OString JSDialogNotifyIdle::generateClosePopupMessage(const OUString& sWindowId) const
|
||||
{
|
||||
if (!m_aNotifierWindow)
|
||||
return OString();
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
std::map<XAccessible*, QObject*> QtAccessibleRegistry::m_aMapping = {};
|
||||
|
||||
QObject* QtAccessibleRegistry::getQObject(css::uno::Reference<XAccessible> xAcc)
|
||||
QObject* QtAccessibleRegistry::getQObject(const css::uno::Reference<XAccessible>& xAcc)
|
||||
{
|
||||
if (!xAcc.is())
|
||||
return nullptr;
|
||||
|
@ -30,13 +30,13 @@ QObject* QtAccessibleRegistry::getQObject(css::uno::Reference<XAccessible> xAcc)
|
|||
return pQtAcc;
|
||||
}
|
||||
|
||||
void QtAccessibleRegistry::insert(css::uno::Reference<XAccessible> xAcc, QObject* pQObject)
|
||||
void QtAccessibleRegistry::insert(const css::uno::Reference<XAccessible>& xAcc, QObject* pQObject)
|
||||
{
|
||||
assert(pQObject);
|
||||
m_aMapping.emplace(xAcc.get(), pQObject);
|
||||
}
|
||||
|
||||
void QtAccessibleRegistry::remove(css::uno::Reference<XAccessible> xAcc)
|
||||
void QtAccessibleRegistry::remove(const css::uno::Reference<XAccessible>& xAcc)
|
||||
{
|
||||
assert(xAcc.is());
|
||||
m_aMapping.erase(xAcc.get());
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue