Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
e50ef195
Kaydet (Commit)
e50ef195
authored
Tem 01, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
New loplugin:stringconcat
Change-Id: Id7c517fb37bc28797c45fc0dde83e866f2aa4aac
üst
363e39d6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
61 changed files
with
323 additions
and
250 deletions
+323
-250
DummyXShape.cxx
chart2/source/view/main/DummyXShape.cxx
+1
-1
GL3DRenderer.cxx
chart2/source/view/main/GL3DRenderer.cxx
+2
-2
OpenGLRender.cxx
chart2/source/view/main/OpenGLRender.cxx
+2
-2
cpputype.cxx
codemaker/source/cppumaker/cpputype.cxx
+3
-4
stringconcat.cxx
compilerplugins/clang/stringconcat.cxx
+82
-0
ZPoolCollection.cxx
connectivity/source/cpool/ZPoolCollection.cxx
+1
-1
ETable.cxx
connectivity/source/drivers/flat/ETable.cxx
+1
-1
emfplus.cxx
cppcanvas/source/mtfrenderer/emfplus.cxx
+3
-4
shlib.cxx
cppuhelper/source/shlib.cxx
+2
-2
SingleSelectQueryComposer.cxx
dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+1
-1
directsql.hxx
dbaccess/source/ui/inc/directsql.hxx
+1
-1
init.cxx
desktop/source/lib/init.cxx
+1
-1
jvmfwk.cxx
desktop/source/migration/services/jvmfwk.cxx
+5
-5
unopkg_app.cxx
desktop/source/pkgchk/unopkg/unopkg_app.cxx
+3
-5
unopkg_misc.cxx
desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+3
-3
gridwizard.cxx
extensions/source/dbpilots/gridwizard.cxx
+1
-1
svgwriter.cxx
filter/source/svg/svgwriter.cxx
+8
-12
FormComponent.cxx
forms/source/component/FormComponent.cxx
+1
-1
loadenv.cxx
framework/source/loadenv/loadenv.cxx
+1
-2
HelpLinker.cxx
helpcompiler/source/HelpLinker.cxx
+1
-2
languagetag.cxx
i18nlangtag/source/languagetag/languagetag.cxx
+3
-6
calendar_gregorian.cxx
i18npool/source/calendar/calendar_gregorian.cxx
+1
-1
util.cxx
jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+5
-8
common.cxx
l10ntools/source/common.cxx
+6
-6
helpex.cxx
l10ntools/source/helpex.cxx
+8
-8
localize.cxx
l10ntools/source/localize.cxx
+18
-6
pocheck.cxx
l10ntools/source/pocheck.cxx
+20
-14
propmerge.cxx
l10ntools/source/propmerge.cxx
+2
-2
treemerge.cxx
l10ntools/source/treemerge.cxx
+2
-2
treex.cxx
l10ntools/source/treex.cxx
+8
-8
uimerge.cxx
l10ntools/source/uimerge.cxx
+2
-3
xfimagestyle.cxx
lotuswordpro/source/filter/xfilter/xfimagestyle.cxx
+1
-1
xfshadow.cxx
lotuswordpro/source/filter/xfilter/xfshadow.cxx
+4
-4
rtl_textcvt.cxx
sal/qa/rtl/textenc/rtl_textcvt.cxx
+5
-10
ucalc.cxx
sc/qa/unit/ucalc.cxx
+1
-1
formulacell.cxx
sc/source/core/data/formulacell.cxx
+2
-3
op_addin.cxx
sc/source/core/opencl/op_addin.cxx
+3
-3
op_financial.cxx
sc/source/core/opencl/op_financial.cxx
+8
-8
op_math.cxx
sc/source/core/opencl/op_math.cxx
+1
-1
op_spreadsheet.cxx
sc/source/core/opencl/op_spreadsheet.cxx
+2
-2
op_statistical.cxx
sc/source/core/opencl/op_statistical.cxx
+17
-17
xmlexprt.cxx
sc/source/filter/xml/xmlexprt.cxx
+1
-1
viewdata.cxx
sc/source/ui/view/viewdata.cxx
+1
-1
BluetoothServer.cxx
sd/source/ui/remotecontrol/BluetoothServer.cxx
+1
-1
whassert.hxx
svl/source/items/whassert.hxx
+1
-1
recoveryui.cxx
svx/source/unodraw/recoveryui.cxx
+1
-1
poolfmt.cxx
sw/source/core/doc/poolfmt.cxx
+2
-2
tblafmt.cxx
sw/source/core/doc/tblafmt.cxx
+1
-1
css1atr.cxx
sw/source/filter/html/css1atr.cxx
+1
-1
htmlcss1.cxx
sw/source/filter/html/htmlcss1.cxx
+2
-2
WW8Sttbf.cxx
sw/source/filter/ww8/WW8Sttbf.cxx
+2
-2
cppcompskeleton.cxx
unodevtools/source/skeletonmaker/cppcompskeleton.cxx
+33
-33
cpptypemaker.cxx
unodevtools/source/skeletonmaker/cpptypemaker.cxx
+1
-2
javacompskeleton.cxx
unodevtools/source/skeletonmaker/javacompskeleton.cxx
+8
-8
javatypemaker.cxx
unodevtools/source/skeletonmaker/javatypemaker.cxx
+2
-3
skeletonmaker.cxx
unodevtools/source/skeletonmaker/skeletonmaker.cxx
+9
-9
helper.cxx
vcl/generic/fontmanager/helper.cxx
+1
-1
enhwmf.cxx
vcl/source/filter/wmf/enhwmf.cxx
+0
-0
winwmf.cxx
vcl/source/filter/wmf/winwmf.cxx
+8
-10
debugevent.cxx
vcl/source/window/debugevent.cxx
+3
-3
sm.cxx
vcl/unx/generic/app/sm.cxx
+3
-3
No files found.
chart2/source/view/main/DummyXShape.cxx
Dosyayı görüntüle @
e50ef195
...
...
@@ -221,7 +221,7 @@ void SAL_CALL DummyXShape::setPropertyValue( const OUString& rName, const uno::A
lang
::
IllegalArgumentException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
,
std
::
exception
)
{
SAL_INFO
(
"chart2"
,
"DummyXShape::setProperty: "
<<
rName
<<
"
"
<<
"
Any"
);
SAL_INFO
(
"chart2"
,
"DummyXShape::setProperty: "
<<
rName
<<
" Any"
);
maProperties
[
rName
]
=
rValue
;
if
(
rName
==
"Transformation"
)
{
...
...
chart2/source/view/main/GL3DRenderer.cxx
Dosyayı görüntüle @
e50ef195
...
...
@@ -43,9 +43,9 @@ int static checkGLError(const char *file, int line)
{
const
char
*
sError
=
OpenGLHelper
::
GLErrorString
(
glErr
);
if
(
sError
)
SAL_WARN
(
"chart2.opengl"
,
"GL Error #"
<<
glErr
<<
"("
<<
sError
<<
")
"
<<
"
in File "
<<
file
<<
" at line: "
<<
line
);
SAL_WARN
(
"chart2.opengl"
,
"GL Error #"
<<
glErr
<<
"("
<<
sError
<<
") in File "
<<
file
<<
" at line: "
<<
line
);
else
SAL_WARN
(
"chart2.opengl"
,
"GL Error #"
<<
glErr
<<
" (no message available)
"
<<
"
in File "
<<
file
<<
" at line: "
<<
line
);
SAL_WARN
(
"chart2.opengl"
,
"GL Error #"
<<
glErr
<<
" (no message available) in File "
<<
file
<<
" at line: "
<<
line
);
retCode
=
-
1
;
return
retCode
;
}
...
...
chart2/source/view/main/OpenGLRender.cxx
Dosyayı görüntüle @
e50ef195
...
...
@@ -84,9 +84,9 @@ int static checkGLError(const char *file, int line)
const
char
*
sError
=
OpenGLHelper
::
GLErrorString
(
glErr
);
if
(
sError
)
SAL_WARN
(
"chart2.opengl"
,
"GL Error #"
<<
glErr
<<
"("
<<
sError
<<
")
"
<<
"
in File "
<<
file
<<
" at line: "
<<
line
);
SAL_WARN
(
"chart2.opengl"
,
"GL Error #"
<<
glErr
<<
"("
<<
sError
<<
") in File "
<<
file
<<
" at line: "
<<
line
);
else
SAL_WARN
(
"chart2.opengl"
,
"GL Error #"
<<
glErr
<<
" (no message available)
"
<<
"
in File "
<<
file
<<
" at line: "
<<
line
);
SAL_WARN
(
"chart2.opengl"
,
"GL Error #"
<<
glErr
<<
" (no message available) in File "
<<
file
<<
" at line: "
<<
line
);
retCode
=
-
1
;
return
retCode
;
...
...
codemaker/source/cppumaker/cpputype.cxx
Dosyayı görüntüle @
e50ef195
...
...
@@ -2562,7 +2562,7 @@ void PolyStructType::dumpComprehensiveGetCppuType(FileStream & out) {
dec
();
out
<<
indent
()
<<
"}
\n
"
;
dec
();
out
<<
indent
()
<<
"};
\n
"
<<
" }"
<<
"
}
\n\n
"
;
out
<<
indent
()
<<
"};
\n
}
}
\n\n
"
;
dumpGetCppuTypePreamble
(
out
);
out
<<
indent
()
<<
"return *detail::"
<<
staticTypeClass
;
dumpTemplateParameters
(
out
);
...
...
@@ -3785,8 +3785,7 @@ void SingletonType::dumpHxxFile(
inc
();
o
<<
indent
()
<<
"assert(the_context.is());
\n
"
<<
indent
()
<<
"::css::uno::Reference< "
<<
scopedBaseName
<<
" > instance;
\n
"
<<
(
"#if defined LO_URE_CURRENT_ENV && defined "
<<
(
" > instance;
\n
#if defined LO_URE_CURRENT_ENV && defined "
"LO_URE_CTOR_ENV_"
)
<<
name_
.
replaceAll
(
"."
,
"_dot_"
)
<<
" && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_"
...
...
@@ -3803,7 +3802,7 @@ void SingletonType::dumpHxxFile(
" ::css::uno::UNO_QUERY);
\n
#else
\n
"
)
<<
indent
()
<<
(
"the_context->getValueByName("
"::rtl::OUString(
\"
/singletons/"
)
<<
name_
<<
"
\"
)) >>= instance;
\n
"
<<
"
#endif
\n
"
<<
name_
<<
"
\"
)) >>= instance;
\n
#endif
\n
"
<<
indent
()
<<
"if (!instance.is()) {
\n
"
;
inc
();
o
<<
indent
()
...
...
compilerplugins/clang/stringconcat.cxx
0 → 100644
Dosyayı görüntüle @
e50ef195
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "plugin.hxx"
namespace
{
class
StringConcat
:
public
RecursiveASTVisitor
<
StringConcat
>
,
public
loplugin
::
Plugin
{
public
:
explicit
StringConcat
(
InstantiationData
const
&
data
)
:
Plugin
(
data
)
{}
void
run
()
override
{
TraverseDecl
(
compiler
.
getASTContext
().
getTranslationUnitDecl
());
}
bool
VisitCallExpr
(
CallExpr
const
*
expr
);
};
bool
StringConcat
::
VisitCallExpr
(
CallExpr
const
*
expr
)
{
if
(
ignoreLocation
(
expr
))
{
return
true
;
}
FunctionDecl
const
*
fdecl
=
expr
->
getDirectCallee
();
if
(
fdecl
==
nullptr
)
{
return
true
;
}
OverloadedOperatorKind
oo
=
fdecl
->
getOverloadedOperator
();
if
((
oo
!=
OverloadedOperatorKind
::
OO_Plus
&&
oo
!=
OverloadedOperatorKind
::
OO_LessLess
)
||
fdecl
->
getNumParams
()
!=
2
||
expr
->
getNumArgs
()
!=
2
||
!
isa
<
StringLiteral
>
(
expr
->
getArg
(
1
)
->
IgnoreParenImpCasts
()))
{
return
true
;
}
CallExpr
const
*
left
=
dyn_cast
<
CallExpr
>
(
expr
->
getArg
(
0
)
->
IgnoreParenImpCasts
());
if
(
left
==
nullptr
)
{
return
true
;
}
FunctionDecl
const
*
ldecl
=
left
->
getDirectCallee
();
if
(
ldecl
==
nullptr
)
{
return
true
;
}
OverloadedOperatorKind
loo
=
ldecl
->
getOverloadedOperator
();
if
((
loo
!=
OverloadedOperatorKind
::
OO_Plus
&&
loo
!=
OverloadedOperatorKind
::
OO_LessLess
)
||
ldecl
->
getNumParams
()
!=
2
||
left
->
getNumArgs
()
!=
2
||
!
isa
<
StringLiteral
>
(
left
->
getArg
(
1
)
->
IgnoreParenImpCasts
()))
{
return
true
;
}
StringRef
name
{
compiler
.
getSourceManager
().
getFilename
(
compiler
.
getSourceManager
().
getSpellingLoc
(
expr
->
getLocStart
()))
};
if
(
name
==
SRCDIR
"/sal/qa/rtl/strings/test_ostring_concat.cxx"
||
name
==
SRCDIR
"/sal/qa/rtl/strings/test_oustring_concat.cxx"
)
{
return
true
;
}
CXXOperatorCallExpr
const
*
op
=
dyn_cast
<
CXXOperatorCallExpr
>
(
expr
);
report
(
DiagnosticsEngine
::
Warning
,
"replace '%0' between string literals with juxtaposition"
,
op
==
nullptr
?
expr
->
getExprLoc
()
:
op
->
getOperatorLoc
())
<<
(
oo
==
OverloadedOperatorKind
::
OO_Plus
?
"+"
:
"<<"
)
<<
SourceRange
(
left
->
getArg
(
1
)
->
getLocStart
(),
expr
->
getArg
(
1
)
->
getLocEnd
());
return
true
;
}
loplugin
::
Plugin
::
Registration
<
StringConcat
>
X
(
"stringconcat"
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
connectivity/source/cpool/ZPoolCollection.cxx
Dosyayı görüntüle @
e50ef195
...
...
@@ -404,7 +404,7 @@ Any OPoolCollection::getNodeValue(const OUString& _rPath,const Reference<XInterf
}
catch
(
NoSuchElementException
&
e
)
{
SAL_WARN
(
"connectivity.cpool"
,
"::getNodeValue: caught a "
<<
SAL_WARN
(
"connectivity.cpool"
,
"::getNodeValue: caught a "
"NoSuchElementException while trying to open "
<<
e
.
Message
<<
"!"
);
}
...
...
connectivity/source/drivers/flat/ETable.cxx
Dosyayı görüntüle @
e50ef195
...
...
@@ -951,7 +951,7 @@ void OFlatTable::setRowPos(const vector<TRowPositionInFile>::size_type rowNum, c
{
SAL_WARN_IF
(
m_aRowPosToFilePos
[
rowNum
]
!=
rowPos
,
"connectivity.flat"
,
"Setting position for row "
<<
rowNum
<<
" to ("
<<
rowPos
.
first
<<
", "
<<
rowPos
.
second
<<
"), "
<<
"Setting position for row "
<<
rowNum
<<
" to ("
<<
rowPos
.
first
<<
", "
<<
rowPos
.
second
<<
"), "
"but already had different position ("
<<
m_aRowPosToFilePos
[
rowNum
].
first
<<
", "
<<
m_aRowPosToFilePos
[
rowNum
].
second
<<
")"
);
m_aRowPosToFilePos
[
rowNum
]
=
rowPos
;
}
...
...
cppcanvas/source/mtfrenderer/emfplus.cxx
Dosyayı görüntüle @
e50ef195
...
...
@@ -1053,8 +1053,7 @@ namespace cppcanvas
OSL_ASSERT
(
(
header
>>
12
)
==
0xdbc01
);
SAL_INFO
(
"cppcanvas.emf"
,
"EMF+
\t
font
\n
"
<<
"EMF+
\t
header: 0x"
<<
std
::
hex
<<
(
header
>>
12
)
<<
" version: 0x"
<<
(
header
&
0x1fff
)
<<
" size: "
<<
std
::
dec
<<
emSize
<<
" unit: 0x"
<<
std
::
hex
<<
sizeUnit
<<
std
::
dec
);
SAL_INFO
(
"cppcanvas.emf"
,
"EMF+
\t
font
\n
EMF+
\t
header: 0x"
<<
std
::
hex
<<
(
header
>>
12
)
<<
" version: 0x"
<<
(
header
&
0x1fff
)
<<
" size: "
<<
std
::
dec
<<
emSize
<<
" unit: 0x"
<<
std
::
hex
<<
sizeUnit
<<
std
::
dec
);
SAL_INFO
(
"cppcanvas.emf"
,
"EMF+
\t
flags: 0x"
<<
std
::
hex
<<
fontFlags
<<
" reserved: 0x"
<<
reserved
<<
" length: 0x"
<<
std
::
hex
<<
length
<<
std
::
dec
);
if
(
length
>
0
&&
length
<
0x4000
)
{
...
...
@@ -1804,7 +1803,7 @@ namespace cppcanvas
polygon
.
append
(
Map
(
x
+
width
,
y
+
height
));
polygon
.
append
(
Map
(
x
,
y
+
height
));
SAL_INFO
(
"cppcanvas.emf"
,
"EMF+
\t
rectangle: "
<<
x
<<
",
"
<<
"
"
<<
width
<<
"x"
<<
height
);
SAL_INFO
(
"cppcanvas.emf"
,
"EMF+
\t
rectangle: "
<<
x
<<
", "
<<
width
<<
"x"
<<
height
);
}
else
{
/* Single's */