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
9263b101
Kaydet (Commit)
9263b101
authored
Tem 01, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Activate the "suspicious cast to sal_Bool" parts of loplugin:salbool
Change-Id: I78a368ef2899b2462251b45a327fc7b1f31fe764
üst
485a7c88
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
17 deletions
+28
-17
oglplayer.cxx
avmedia/source/opengl/oglplayer.cxx
+1
-1
salbool.cxx
compilerplugins/clang/salbool.cxx
+18
-7
KResultSet.cxx
connectivity/source/drivers/kab/KResultSet.cxx
+1
-1
unogridcolumnfacade.cxx
svtools/source/uno/unogridcolumnfacade.cxx
+4
-4
pagectrl.cxx
svx/source/dialog/pagectrl.cxx
+2
-2
rtfimport.cxx
sw/qa/extras/rtfimport/rtfimport.cxx
+2
-2
No files found.
avmedia/source/opengl/oglplayer.cxx
Dosyayı görüntüle @
9263b101
...
@@ -205,7 +205,7 @@ sal_Bool SAL_CALL OGLPlayer::isPlaybackLoop() throw ( uno::RuntimeException, std
...
@@ -205,7 +205,7 @@ sal_Bool SAL_CALL OGLPlayer::isPlaybackLoop() throw ( uno::RuntimeException, std
{
{
osl
::
MutexGuard
aGuard
(
m_aMutex
);
osl
::
MutexGuard
aGuard
(
m_aMutex
);
assert
(
m_pHandle
);
assert
(
m_pHandle
);
return
(
sal_Bool
)
gltf_animation_get_looping
(
m_pHandle
)
;
return
gltf_animation_get_looping
(
m_pHandle
)
!=
0
;
}
}
void
SAL_CALL
OGLPlayer
::
setVolumeDB
(
sal_Int16
/*nVolumDB*/
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
void
SAL_CALL
OGLPlayer
::
setVolumeDB
(
sal_Int16
/*nVolumDB*/
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
...
...
compilerplugins/clang/s
tore/s
albool.cxx
→
compilerplugins/clang/salbool.cxx
Dosyayı görüntüle @
9263b101
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include <algorithm>
#include <algorithm>
#include <cassert>
#include <cassert>
#include <cstdlib>
#include <set>
#include <set>
#include <string>
#include <string>
...
@@ -106,7 +107,10 @@ class SalBool:
...
@@ -106,7 +107,10 @@ class SalBool:
public
RecursiveASTVisitor
<
SalBool
>
,
public
loplugin
::
RewritePlugin
public
RecursiveASTVisitor
<
SalBool
>
,
public
loplugin
::
RewritePlugin
{
{
public
:
public
:
explicit
SalBool
(
InstantiationData
const
&
data
)
:
RewritePlugin
(
data
)
{}
explicit
SalBool
(
InstantiationData
const
&
data
)
:
RewritePlugin
(
data
),
fullMode_
(
std
::
getenv
(
"loplugin:salbool"
)
!=
nullptr
)
{}
virtual
void
run
()
override
;
virtual
void
run
()
override
;
...
@@ -139,6 +143,7 @@ private:
...
@@ -139,6 +143,7 @@ private:
bool
rewrite
(
SourceLocation
location
);
bool
rewrite
(
SourceLocation
location
);
bool
fullMode_
;
std
::
set
<
VarDecl
const
*>
varDecls_
;
std
::
set
<
VarDecl
const
*>
varDecls_
;
};
};
...
@@ -178,7 +183,7 @@ void SalBool::run() {
...
@@ -178,7 +183,7 @@ void SalBool::run() {
}
}
}
}
}
}
if
(
!
rewrite
(
loc
))
{
if
(
fullMode_
&&
!
rewrite
(
loc
))
{
report
(
report
(
DiagnosticsEngine
::
Warning
,
DiagnosticsEngine
::
Warning
,
"VarDecl, use
\"
bool
\"
instead of
\"
sal_Bool
\"
"
,
loc
)
"VarDecl, use
\"
bool
\"
instead of
\"
sal_Bool
\"
"
,
loc
)
...
@@ -322,7 +327,9 @@ bool SalBool::VisitParmVarDecl(ParmVarDecl const * decl) {
...
@@ -322,7 +327,9 @@ bool SalBool::VisitParmVarDecl(ParmVarDecl const * decl) {
// with a "mismatch" error before the rewriter had a chance
// with a "mismatch" error before the rewriter had a chance
// to act upon the definition (but use the heuristic of
// to act upon the definition (but use the heuristic of
// assuming pure virtual functions do not have definitions):
// assuming pure virtual functions do not have definitions):
if
(
!
((
isInMainFile
(
if
(
fullMode_
&&
!
((
compat
::
isInMainFile
(
compiler
.
getSourceManager
(),
compiler
.
getSourceManager
().
getSpellingLoc
(
compiler
.
getSourceManager
().
getSpellingLoc
(
dyn_cast
<
FunctionDecl
>
(
dyn_cast
<
FunctionDecl
>
(
decl
->
getDeclContext
())
decl
->
getDeclContext
())
...
@@ -409,7 +416,7 @@ bool SalBool::VisitFieldDecl(FieldDecl const * decl) {
...
@@ -409,7 +416,7 @@ bool SalBool::VisitFieldDecl(FieldDecl const * decl) {
}
}
}
}
}
}
if
(
!
rewrite
(
loc
))
{
if
(
fullMode_
&&
!
rewrite
(
loc
))
{
report
(
report
(
DiagnosticsEngine
::
Warning
,
DiagnosticsEngine
::
Warning
,
"FieldDecl, use
\"
bool
\"
instead of
\"
sal_Bool
\"
"
,
loc
)
"FieldDecl, use
\"
bool
\"
instead of
\"
sal_Bool
\"
"
,
loc
)
...
@@ -467,7 +474,9 @@ bool SalBool::VisitFunctionDecl(FunctionDecl const * decl) {
...
@@ -467,7 +474,9 @@ bool SalBool::VisitFunctionDecl(FunctionDecl const * decl) {
// rewriter had a chance to act upon the definition (but use the
// rewriter had a chance to act upon the definition (but use the
// heuristic of assuming pure virtual functions do not have
// heuristic of assuming pure virtual functions do not have
// definitions):
// definitions):
if
(
!
((
isInMainFile
(
if
(
fullMode_
&&
!
((
compat
::
isInMainFile
(
compiler
.
getSourceManager
(),
compiler
.
getSourceManager
().
getSpellingLoc
(
compiler
.
getSourceManager
().
getSpellingLoc
(
decl
->
getNameInfo
().
getLoc
()))
decl
->
getNameInfo
().
getLoc
()))
||
f
->
isDefined
()
||
f
->
isPure
())
||
f
->
isDefined
()
||
f
->
isPure
())
...
@@ -487,7 +496,9 @@ bool SalBool::VisitValueDecl(ValueDecl const * decl) {
...
@@ -487,7 +496,9 @@ bool SalBool::VisitValueDecl(ValueDecl const * decl) {
if
(
ignoreLocation
(
decl
))
{
if
(
ignoreLocation
(
decl
))
{
return
true
;
return
true
;
}
}
if
(
isSalBool
(
decl
->
getType
())
&&
!
rewrite
(
decl
->
getLocStart
()))
{
if
(
fullMode_
&&
isSalBool
(
decl
->
getType
())
&&
!
rewrite
(
decl
->
getLocStart
()))
{
report
(
report
(
DiagnosticsEngine
::
Warning
,
DiagnosticsEngine
::
Warning
,
"ValueDecl, use
\"
bool
\"
instead of
\"
sal_Bool
\"
"
,
"ValueDecl, use
\"
bool
\"
instead of
\"
sal_Bool
\"
"
,
...
@@ -498,7 +509,7 @@ bool SalBool::VisitValueDecl(ValueDecl const * decl) {
...
@@ -498,7 +509,7 @@ bool SalBool::VisitValueDecl(ValueDecl const * decl) {
}
}
bool
SalBool
::
isInSpecialMainFile
(
SourceLocation
spellingLocation
)
const
{
bool
SalBool
::
isInSpecialMainFile
(
SourceLocation
spellingLocation
)
const
{
return
compat
::
isInMainFile
(
spellingLocation
)
return
compat
::
isInMainFile
(
compiler
.
getSourceManager
(),
spellingLocation
)
&&
(
compiler
.
getSourceManager
().
getFilename
(
spellingLocation
)
&&
(
compiler
.
getSourceManager
().
getFilename
(
spellingLocation
)
==
SRCDIR
"/cppu/qa/test_any.cxx"
);
==
SRCDIR
"/cppu/qa/test_any.cxx"
);
}
}
...
...
connectivity/source/drivers/kab/KResultSet.cxx
Dosyayı görüntüle @
9263b101
...
@@ -968,7 +968,7 @@ void KabResultSet::getFastPropertyValue(
...
@@ -968,7 +968,7 @@ void KabResultSet::getFastPropertyValue(
switch
(
nHandle
)
switch
(
nHandle
)
{
{
case
PROPERTY_ID_ISBOOKMARKABLE
:
case
PROPERTY_ID_ISBOOKMARKABLE
:
_rValue
<<=
(
sal_Bool
)
sal_F
alse
;
_rValue
<<=
f
alse
;
break
;
break
;
case
PROPERTY_ID_CURSORNAME
:
case
PROPERTY_ID_CURSORNAME
:
case
PROPERTY_ID_RESULTSETCONCURRENCY
:
case
PROPERTY_ID_RESULTSETCONCURRENCY
:
...
...
svtools/source/uno/unogridcolumnfacade.cxx
Dosyayı görüntüle @
9263b101
...
@@ -56,9 +56,9 @@ namespace svt { namespace table
...
@@ -56,9 +56,9 @@ namespace svt { namespace table
namespace
namespace
{
{
template
<
class
ATTRIBUTE_TYPE
>
template
<
class
T1
,
class
T2
>
void
lcl_set
(
Reference
<
XGridColumn
>
const
&
i_column
,
void
(
SAL_CALL
XGridColumn
::*
i_setter
)(
ATTRIBUTE_TYPE
),
void
lcl_set
(
Reference
<
XGridColumn
>
const
&
i_column
,
void
(
SAL_CALL
XGridColumn
::*
i_setter
)(
T1
),
ATTRIBUTE_TYPE
i_value
)
T2
i_value
)
{
{
try
try
{
{
...
@@ -334,7 +334,7 @@ namespace svt { namespace table
...
@@ -334,7 +334,7 @@ namespace svt { namespace table
void
UnoGridColumnFacade
::
setResizable
(
bool
i_resizable
)
void
UnoGridColumnFacade
::
setResizable
(
bool
i_resizable
)
{
{
ENSURE_OR_RETURN_VOID
(
m_xGridColumn
.
is
(),
"UnoGridColumnFacade: already disposed!"
);
ENSURE_OR_RETURN_VOID
(
m_xGridColumn
.
is
(),
"UnoGridColumnFacade: already disposed!"
);
lcl_set
(
m_xGridColumn
,
&
XGridColumn
::
setResizeable
,
sal_Bool
(
i_resizable
)
);
lcl_set
(
m_xGridColumn
,
&
XGridColumn
::
setResizeable
,
i_resizable
);
}
}
...
...
svx/source/dialog/pagectrl.cxx
Dosyayı görüntüle @
9263b101
...
@@ -152,9 +152,9 @@ void SvxPageWindow::Paint(const Rectangle&)
...
@@ -152,9 +152,9 @@ void SvxPageWindow::Paint(const Rectangle&)
else
else
{
{
// Left and right page are different -> draw two pages if possible
// Left and right page are different -> draw two pages if possible
DrawPage
(
Point
(
0
,
nYPos
),
false
,(
sal_Bool
)(
eUsage
&
SVX_PAGE_LEFT
)
);
DrawPage
(
Point
(
0
,
nYPos
),
false
,(
eUsage
&
SVX_PAGE_LEFT
)
!=
0
);
DrawPage
(
Point
(
aSize
.
Width
()
+
aSize
.
Width
()
/
8
,
nYPos
),
true
,
DrawPage
(
Point
(
aSize
.
Width
()
+
aSize
.
Width
()
/
8
,
nYPos
),
true
,
(
sal_Bool
)(
eUsage
&
SVX_PAGE_RIGHT
)
);
(
eUsage
&
SVX_PAGE_RIGHT
)
!=
0
);
}
}
}
}
...
...
sw/qa/extras/rtfimport/rtfimport.cxx
Dosyayı görüntüle @
9263b101
...
@@ -243,8 +243,8 @@ DECLARE_RTFIMPORT_TEST(testN750757, "n750757.rtf")
...
@@ -243,8 +243,8 @@ DECLARE_RTFIMPORT_TEST(testN750757, "n750757.rtf")
uno
::
Reference
<
container
::
XEnumerationAccess
>
xParaEnumAccess
(
xTextDocument
->
getText
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XEnumerationAccess
>
xParaEnumAccess
(
xTextDocument
->
getText
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XEnumeration
>
xParaEnum
=
xParaEnumAccess
->
createEnumeration
();
uno
::
Reference
<
container
::
XEnumeration
>
xParaEnum
=
xParaEnumAccess
->
createEnumeration
();
CPPUNIT_ASSERT_EQUAL
(
sal_Bool
(
false
),
getProperty
<
sal_Bool
>
(
xParaEnum
->
nextElement
(),
"ParaContextMargin"
));
CPPUNIT_ASSERT_EQUAL
(
false
,
bool
(
getProperty
<
sal_Bool
>
(
xParaEnum
->
nextElement
(),
"ParaContextMargin"
)
));
CPPUNIT_ASSERT_EQUAL
(
sal_Bool
(
true
),
getProperty
<
sal_Bool
>
(
xParaEnum
->
nextElement
(),
"ParaContextMargin"
));
CPPUNIT_ASSERT_EQUAL
(
true
,
bool
(
getProperty
<
sal_Bool
>
(
xParaEnum
->
nextElement
(),
"ParaContextMargin"
)
));
}
}
DECLARE_RTFIMPORT_TEST
(
testFdo45563
,
"fdo45563.rtf"
)
DECLARE_RTFIMPORT_TEST
(
testFdo45563
,
"fdo45563.rtf"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment