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
dd90d9b6
Kaydet (Commit)
dd90d9b6
authored
Haz 10, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
-Werror,-Wtautological-undefined-compare
Change-Id: Ibd738b91d35a1b82e1e7b078ef73c6f6076dc08a
üst
ed9d3290
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
113 deletions
+8
-113
ocomponentenumeration.hxx
framework/inc/helper/ocomponentenumeration.hxx
+0
-8
menudispatcher.cxx
framework/source/dispatch/menudispatcher.cxx
+3
-56
ocomponentenumeration.cxx
framework/source/helper/ocomponentenumeration.cxx
+2
-39
urltransformer.cxx
framework/source/services/urltransformer.cxx
+3
-10
No files found.
framework/inc/helper/ocomponentenumeration.hxx
Dosyayı görüntüle @
dd90d9b6
...
...
@@ -159,14 +159,6 @@ class OComponentEnumeration : public ::cppu::WeakImplHelper2< ::com::sun::star
sal_True otherway
*//*-*****************************************************************************************************/
private
:
static
bool
impldbg_checkParameter_OComponentEnumerationCtor
(
const
css
::
uno
::
Sequence
<
css
::
uno
::
Reference
<
css
::
lang
::
XComponent
>
>&
seqComponents
);
static
bool
impldbg_checkParameter_disposing
(
const
css
::
lang
::
EventObject
&
aEvent
);
// variables
// (should be private everyway!)
private
:
sal_uInt32
m_nPosition
;
/// current position in enumeration
...
...
framework/source/dispatch/menudispatcher.cxx
Dosyayı görüntüle @
dd90d9b6
...
...
@@ -58,13 +58,6 @@ using namespace ::cppu;
const
sal_uInt16
SLOTID_MDIWINDOWLIST
=
5610
;
static
bool
impldbg_checkParameter_MenuDispatcher
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
xContext
,
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
xOwner
);
static
bool
impldbg_checkParameter_addStatusListener
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XStatusListener
>&
xControl
,
const
css
::
util
::
URL
&
aURL
);
static
bool
impldbg_checkParameter_removeStatusListener
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XStatusListener
>&
xControl
,
const
css
::
util
::
URL
&
aURL
);
// constructor
MenuDispatcher
::
MenuDispatcher
(
const
uno
::
Reference
<
XComponentContext
>&
xContext
,
...
...
@@ -78,7 +71,7 @@ MenuDispatcher::MenuDispatcher( const uno::Reference< XComponentContext >&
{
// Safe impossible cases
// We need valid information about our owner for work.
SAL_WARN_IF
(
!
impldbg_checkParameter_MenuDispatcher
(
xContext
,
xOwner
),
"fwk"
,
"MenuDispatcher::MenuDispatcher()
\n
Invalid parameter detected!"
);
SAL_WARN_IF
(
!
(
xContext
.
is
()
&&
xOwner
.
is
()
),
"fwk"
,
"MenuDispatcher::MenuDispatcher()
\n
Invalid parameter detected!"
);
m_bActivateListener
=
true
;
xOwner
->
addFrameActionListener
(
uno
::
Reference
<
XFrameActionListener
>
(
(
OWeakObject
*
)
this
,
UNO_QUERY
));
...
...
@@ -108,7 +101,7 @@ void SAL_CALL MenuDispatcher::addStatusListener( const uno::Reference< XStat
SolarMutexGuard
g
;
// Safe impossible cases
// Method not defined for all incoming parameter
SAL_WARN_IF
(
!
impldbg_checkParameter_addStatusListener
(
xControl
,
aURL
),
"fwk"
,
"MenuDispatcher::addStatusListener(): Invalid parameter detected."
);
SAL_WARN_IF
(
!
xControl
.
is
()
||
aURL
.
Complete
.
isEmpty
(
),
"fwk"
,
"MenuDispatcher::addStatusListener(): Invalid parameter detected."
);
// Add listener to container.
m_aListenerContainer
.
addInterface
(
aURL
.
Complete
,
xControl
);
}
...
...
@@ -121,7 +114,7 @@ void SAL_CALL MenuDispatcher::removeStatusListener( const uno::Reference< X
SolarMutexGuard
g
;
// Safe impossible cases
// Method not defined for all incoming parameter
SAL_WARN_IF
(
!
impldbg_checkParameter_removeStatusListener
(
xControl
,
aURL
),
"fwk"
,
"MenuDispatcher::removeStatusListener(): Invalid parameter detected."
);
SAL_WARN_IF
(
!
xControl
.
is
()
||
aURL
.
Complete
.
isEmpty
(
),
"fwk"
,
"MenuDispatcher::removeStatusListener(): Invalid parameter detected."
);
// Add listener to container.
m_aListenerContainer
.
removeInterface
(
aURL
.
Complete
,
xControl
);
}
...
...
@@ -287,52 +280,6 @@ bool MenuDispatcher::impl_setMenuBar( MenuBar* pMenuBar, bool bMenuFromResource
return
false
;
}
static
bool
impldbg_checkParameter_MenuDispatcher
(
const
uno
::
Reference
<
XComponentContext
>&
xContext
,
const
uno
::
Reference
<
XFrame
>&
xOwner
)
{
return
xContext
.
is
()
&&
xOwner
.
is
();
}
// We need a valid URL. What is meaning with "register for nothing"?!
// xControl must correct to - nobody can advised otherwise!
static
bool
impldbg_checkParameter_addStatusListener
(
const
uno
::
Reference
<
XStatusListener
>&
xControl
,
const
URL
&
aURL
)
{
// Set default return value.
bool
bOK
=
true
;
// Check parameter.
if
(
(
&
xControl
==
NULL
)
||
(
&
aURL
==
NULL
)
||
(
aURL
.
Complete
.
isEmpty
()
)
)
{
bOK
=
false
;
}
// Return result of check.
return
bOK
;
}
// The same goes for these case! We have added valid listener for correct URL only.
// We can't remove invalid listener for nothing!
static
bool
impldbg_checkParameter_removeStatusListener
(
const
uno
::
Reference
<
XStatusListener
>&
xControl
,
const
URL
&
aURL
)
{
// Set default return value.
bool
bOK
=
true
;
// Check parameter.
if
(
(
&
xControl
==
NULL
)
||
(
&
aURL
==
NULL
)
||
(
aURL
.
Complete
.
isEmpty
()
)
)
{
bOK
=
false
;
}
// Return result of check.
return
bOK
;
}
}
// namespace framework
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
framework/source/helper/ocomponentenumeration.cxx
Dosyayı görüntüle @
dd90d9b6
...
...
@@ -35,11 +35,7 @@ using namespace ::rtl;
OComponentEnumeration
::
OComponentEnumeration
(
const
Sequence
<
css
::
uno
::
Reference
<
XComponent
>
>&
seqComponents
)
:
m_nPosition
(
0
)
// 0 is the first position for a valid list and the right value for an invalid list to!
,
m_seqComponents
(
seqComponents
)
{
// Safe impossible states
// "Method" not defined for ALL parameters!
SAL_WARN_IF
(
!
impldbg_checkParameter_OComponentEnumerationCtor
(
seqComponents
),
"fwk"
,
"OComponentEnumeration::OComponentEnumeration(): Invalid parameter detected!"
);
}
{}
// destructor
...
...
@@ -57,7 +53,7 @@ void SAL_CALL OComponentEnumeration::disposing( const EventObject& aEvent ) thro
// Safe impossible cases
// This method is not specified for all incoming parameters.
(
void
)
aEvent
;
SAL_WARN_IF
(
!
impldbg_checkParameter_disposing
(
aEvent
),
"fwk"
,
"OComponentEnumeration::disposing(): Invalid parameter detected!"
);
SAL_WARN_IF
(
!
aEvent
.
Source
.
is
(
),
"fwk"
,
"OComponentEnumeration::disposing(): Invalid parameter detected!"
);
// Reset instance to defaults, release references and free memory.
impl_resetObject
();
...
...
@@ -119,39 +115,6 @@ void OComponentEnumeration::impl_resetObject()
m_nPosition
=
0
;
}
// debug methods
/*-----------------------------------------------------------------------------------------------------------------
The follow methods checks the parameter for other functions. If a parameter or his value is non valid,
we return "sal_False". (else sal_True) This mechanism is used to throw an ASSERT!
ATTENTION
If you miss a test for one of this parameters, contact the author or add it himself !(?)
But ... look for right testing! See using of this methods!
-----------------------------------------------------------------------------------------------------------------*/
// An empty list is allowed ... hasMoreElements() will return false then!
bool
OComponentEnumeration
::
impldbg_checkParameter_OComponentEnumerationCtor
(
const
Sequence
<
css
::
uno
::
Reference
<
XComponent
>
>&
seqComponents
)
{
// Set default return value.
bool
bOK
=
true
;
// Check parameter.
if
(
(
&
seqComponents
==
NULL
)
)
{
bOK
=
false
;
}
// Return result of check.
return
bOK
;
}
bool
OComponentEnumeration
::
impldbg_checkParameter_disposing
(
const
EventObject
&
aEvent
)
{
return
aEvent
.
Source
.
is
();
}
}
// namespace framework
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
framework/source/services/urltransformer.cxx
Dosyayı görüntüle @
dd90d9b6
...
...
@@ -128,8 +128,7 @@ namespace
sal_Bool
SAL_CALL
URLTransformer
::
parseStrict
(
css
::
util
::
URL
&
aURL
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
// Safe impossible cases.
if
((
&
aURL
==
NULL
)
||
(
aURL
.
Complete
.
isEmpty
()
)
)
if
(
aURL
.
Complete
.
isEmpty
()
)
{
return
sal_False
;
}
...
...
@@ -181,8 +180,7 @@ sal_Bool SAL_CALL URLTransformer::parseSmart( css::util::URL& aURL,
const
OUString
&
sSmartProtocol
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
// Safe impossible cases.
if
((
&
aURL
==
NULL
)
||
(
aURL
.
Complete
.
isEmpty
()
)
)
if
(
aURL
.
Complete
.
isEmpty
()
)
{
return
sal_False
;
}
...
...
@@ -233,10 +231,6 @@ sal_Bool SAL_CALL URLTransformer::parseSmart( css::util::URL& aURL,
// XURLTransformer
sal_Bool
SAL_CALL
URLTransformer
::
assemble
(
css
::
util
::
URL
&
aURL
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
// Safe impossible cases.
if
(
&
aURL
==
NULL
)
return
sal_False
;
// Initialize parser.
INetURLObject
aParser
;
...
...
@@ -297,8 +291,7 @@ OUString SAL_CALL URLTransformer::getPresentation( const css::util::URL& aURL,
sal_Bool
bWithPassword
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
// Safe impossible cases.
if
((
&
aURL
==
NULL
)
||
(
aURL
.
Complete
.
isEmpty
()
)
||
if
((
aURL
.
Complete
.
isEmpty
()
)
||
((
bWithPassword
!=
sal_True
)
&&
(
bWithPassword
!=
sal_False
)
)
)
{
...
...
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