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
ca8a4a7a
Kaydet (Commit)
ca8a4a7a
authored
Haz 06, 2017
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Eliminate dynamic_cast<const SfxVoidItem*>, use SfxPoolItem::IsVoidItem()
Change-Id: I09dafffd64dd107e802d016494d884f32363521a
üst
f300a627
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
17 additions
and
17 deletions
+17
-17
tbzoomsliderctrl.cxx
sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+1
-1
tmplctrl.cxx
sd/source/ui/app/tmplctrl.cxx
+1
-1
ctrlitem.cxx
sfx2/source/control/ctrlitem.cxx
+1
-1
dispatch.cxx
sfx2/source/control/dispatch.cxx
+2
-2
unoctitm.cxx
sfx2/source/control/unoctitm.cxx
+3
-3
objxtor.cxx
sfx2/source/doc/objxtor.cxx
+1
-1
stbitem.cxx
sfx2/source/statbar/stbitem.cxx
+1
-1
tbxitem.cxx
sfx2/source/toolbox/tbxitem.cxx
+1
-1
itemset.cxx
svl/source/items/itemset.cxx
+1
-1
zoomsliderctrl.cxx
svx/source/stbctrls/zoomsliderctrl.cxx
+1
-1
svdibrow.cxx
svx/source/svdraw/svdibrow.cxx
+1
-1
romenu.cxx
sw/source/uibase/docvw/romenu.cxx
+1
-1
bookctrl.cxx
sw/source/uibase/utlui/bookctrl.cxx
+1
-1
viewlayoutctrl.cxx
sw/source/uibase/utlui/viewlayoutctrl.cxx
+1
-1
No files found.
sc/source/ui/cctrl/tbzoomsliderctrl.cxx
Dosyayı görüntüle @
ca8a4a7a
...
@@ -62,7 +62,7 @@ void ScZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState
...
@@ -62,7 +62,7 @@ void ScZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState
ScZoomSliderWnd
*
pBox
=
static_cast
<
ScZoomSliderWnd
*>
(
rTbx
.
GetItemWindow
(
nId
));
ScZoomSliderWnd
*
pBox
=
static_cast
<
ScZoomSliderWnd
*>
(
rTbx
.
GetItemWindow
(
nId
));
OSL_ENSURE
(
pBox
,
"Control not found!"
);
OSL_ENSURE
(
pBox
,
"Control not found!"
);
if
(
SfxItemState
::
DEFAULT
!=
eState
||
dynamic_cast
<
const
SfxVoidItem
*>
(
pState
)
!=
nullptr
)
if
(
SfxItemState
::
DEFAULT
!=
eState
||
pState
->
IsVoidItem
()
)
{
{
SvxZoomSliderItem
aZoomSliderItem
(
100
);
SvxZoomSliderItem
aZoomSliderItem
(
100
);
pBox
->
Disable
();
pBox
->
Disable
();
...
...
sd/source/ui/app/tmplctrl.cxx
Dosyayı görüntüle @
ca8a4a7a
...
@@ -76,7 +76,7 @@ SdTemplateControl::~SdTemplateControl()
...
@@ -76,7 +76,7 @@ SdTemplateControl::~SdTemplateControl()
void
SdTemplateControl
::
StateChanged
(
void
SdTemplateControl
::
StateChanged
(
sal_uInt16
/*nSID*/
,
SfxItemState
eState
,
const
SfxPoolItem
*
pState
)
sal_uInt16
/*nSID*/
,
SfxItemState
eState
,
const
SfxPoolItem
*
pState
)
{
{
if
(
eState
!=
SfxItemState
::
DEFAULT
||
dynamic_cast
<
const
SfxVoidItem
*>
(
pState
)
!=
nullptr
)
if
(
eState
!=
SfxItemState
::
DEFAULT
||
pState
->
IsVoidItem
()
)
GetStatusBar
().
SetItemText
(
GetId
(),
OUString
()
);
GetStatusBar
().
SetItemText
(
GetId
(),
OUString
()
);
else
if
(
dynamic_cast
<
const
SfxStringItem
*>
(
pState
)
!=
nullptr
)
else
if
(
dynamic_cast
<
const
SfxStringItem
*>
(
pState
)
!=
nullptr
)
{
{
...
...
sfx2/source/control/ctrlitem.cxx
Dosyayı görüntüle @
ca8a4a7a
...
@@ -293,7 +293,7 @@ SfxItemState SfxControllerItem::GetItemState
...
@@ -293,7 +293,7 @@ SfxItemState SfxControllerItem::GetItemState
?
SfxItemState
::
DISABLED
?
SfxItemState
::
DISABLED
:
IsInvalidItem
(
pState
)
:
IsInvalidItem
(
pState
)
?
SfxItemState
::
DONTCARE
?
SfxItemState
::
DONTCARE
:
dynamic_cast
<
const
SfxVoidItem
*>
(
pState
)
!=
nullptr
&&
!
pState
->
Which
()
:
pState
->
IsVoidItem
()
&&
!
pState
->
Which
()
?
SfxItemState
::
UNKNOWN
?
SfxItemState
::
UNKNOWN
:
SfxItemState
::
DEFAULT
;
:
SfxItemState
::
DEFAULT
;
}
}
...
...
sfx2/source/control/dispatch.cxx
Dosyayı görüntüle @
ca8a4a7a
...
@@ -1882,7 +1882,7 @@ bool SfxDispatcher::FillState_(const SfxSlotServer& rSvr, SfxItemSet& rState,
...
@@ -1882,7 +1882,7 @@ bool SfxDispatcher::FillState_(const SfxSlotServer& rSvr, SfxItemSet& rState,
pItem
;
pItem
;
pItem
=
aIter
.
NextItem
()
)
pItem
=
aIter
.
NextItem
()
)
{
{
if
(
!
IsInvalidItem
(
pItem
)
&&
dynamic_cast
<
const
SfxVoidItem
*>
(
pItem
)
==
nullptr
)
if
(
!
IsInvalidItem
(
pItem
)
&&
!
pItem
->
IsVoidItem
()
)
{
{
sal_uInt16
nSlotId
=
rState
.
GetPool
()
->
GetSlotId
(
pItem
->
Which
());
sal_uInt16
nSlotId
=
rState
.
GetPool
()
->
GetSlotId
(
pItem
->
Which
());
SAL_INFO_IF
(
SAL_INFO_IF
(
...
@@ -2084,7 +2084,7 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSID, css::uno::Any& rAny )
...
@@ -2084,7 +2084,7 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSID, css::uno::Any& rAny )
else
else
{
{
css
::
uno
::
Any
aState
;
css
::
uno
::
Any
aState
;
if
(
dynamic_cast
<
const
SfxVoidItem
*>
(
pItem
)
==
nullptr
)
if
(
!
pItem
->
IsVoidItem
()
)
{
{
sal_uInt16
nSubId
(
0
);
sal_uInt16
nSubId
(
0
);
SfxItemPool
&
rPool
=
pShell
->
GetPool
();
SfxItemPool
&
rPool
=
pShell
->
GetPool
();
...
...
sfx2/source/control/unoctitm.cxx
Dosyayı görüntüle @
ca8a4a7a
...
@@ -746,7 +746,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const css::util::URL& aURL,
...
@@ -746,7 +746,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const css::util::URL& aURL,
{
{
if
(
const
SfxBoolItem
*
pBoolItem
=
dynamic_cast
<
const
SfxBoolItem
*>
(
pItem
))
if
(
const
SfxBoolItem
*
pBoolItem
=
dynamic_cast
<
const
SfxBoolItem
*>
(
pItem
))
bSuccess
=
pBoolItem
->
GetValue
();
bSuccess
=
pBoolItem
->
GetValue
();
else
if
(
dynamic_cast
<
const
SfxVoidItem
*>
(
pItem
)
==
nullptr
)
else
if
(
!
pItem
->
IsVoidItem
()
)
bSuccess
=
true
;
// all other types are true
bSuccess
=
true
;
// all other types are true
}
}
// else bSuccess = false look to line 664 it is false
// else bSuccess = false look to line 664 it is false
...
@@ -808,7 +808,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const css::util::URL& aURL,
...
@@ -808,7 +808,7 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const css::util::URL& aURL,
aEvent
.
State
=
css
::
frame
::
DispatchResultState
::
FAILURE
;
aEvent
.
State
=
css
::
frame
::
DispatchResultState
::
FAILURE
;
aEvent
.
Source
=
static_cast
<
css
::
frame
::
XDispatch
*>
(
pDispatch
);
aEvent
.
Source
=
static_cast
<
css
::
frame
::
XDispatch
*>
(
pDispatch
);
if
(
bSuccess
&&
pItem
&&
dynamic_cast
<
const
SfxVoidItem
*>
(
pItem
)
==
nullptr
)
if
(
bSuccess
&&
pItem
&&
!
pItem
->
IsVoidItem
()
)
{
{
sal_uInt16
nSubId
(
0
);
sal_uInt16
nSubId
(
0
);
if
(
eMapUnit
==
MapUnit
::
MapTwip
)
if
(
eMapUnit
==
MapUnit
::
MapTwip
)
...
@@ -924,7 +924,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt
...
@@ -924,7 +924,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt
if
(
bNotify
)
if
(
bNotify
)
{
{
css
::
uno
::
Any
aState
;
css
::
uno
::
Any
aState
;
if
(
(
eState
>=
SfxItemState
::
DEFAULT
)
&&
pState
&&
!
IsInvalidItem
(
pState
)
&&
dynamic_cast
<
const
SfxVoidItem
*>
(
pState
)
==
nullptr
)
if
(
(
eState
>=
SfxItemState
::
DEFAULT
)
&&
pState
&&
!
IsInvalidItem
(
pState
)
&&
!
pState
->
IsVoidItem
()
)
{
{
// Retrieve metric from pool to have correct sub ID when calling QueryValue
// Retrieve metric from pool to have correct sub ID when calling QueryValue
sal_uInt16
nSubId
(
0
);
sal_uInt16
nSubId
(
0
);
...
...
sfx2/source/doc/objxtor.cxx
Dosyayı görüntüle @
ca8a4a7a
...
@@ -610,7 +610,7 @@ bool SfxObjectShell::PrepareClose
...
@@ -610,7 +610,7 @@ bool SfxObjectShell::PrepareClose
pPoolItem
=
pFrame
->
GetBindings
().
ExecuteSynchron
(
SID_SAVEDOC
,
ppArgs
);
pPoolItem
=
pFrame
->
GetBindings
().
ExecuteSynchron
(
SID_SAVEDOC
,
ppArgs
);
}
}
if
(
!
pPoolItem
||
dynamic_cast
<
const
SfxVoidItem
*>
(
pPoolItem
)
!=
nullptr
||
(
dynamic_cast
<
const
SfxBoolItem
*>
(
pPoolItem
)
!=
nullptr
&&
!
static_cast
<
const
SfxBoolItem
*>
(
pPoolItem
)
->
GetValue
()
)
)
if
(
!
pPoolItem
||
pPoolItem
->
IsVoidItem
()
||
(
dynamic_cast
<
const
SfxBoolItem
*>
(
pPoolItem
)
!=
nullptr
&&
!
static_cast
<
const
SfxBoolItem
*>
(
pPoolItem
)
->
GetValue
()
)
)
return
false
;
return
false
;
}
}
else
if
(
RET_CANCEL
==
nRet
)
else
if
(
RET_CANCEL
==
nRet
)
...
...
sfx2/source/statbar/stbitem.cxx
Dosyayı görüntüle @
ca8a4a7a
...
@@ -410,7 +410,7 @@ void SfxStatusBarControl::StateChanged
...
@@ -410,7 +410,7 @@ void SfxStatusBarControl::StateChanged
pBar
->
SetItemText
(
nSID
,
pStr
->
GetValue
()
);
pBar
->
SetItemText
(
nSID
,
pStr
->
GetValue
()
);
else
else
{
{
DBG_ASSERT
(
eState
!=
SfxItemState
::
DEFAULT
||
dynamic_cast
<
const
SfxVoidItem
*>
(
pState
)
!=
nullptr
,
DBG_ASSERT
(
eState
!=
SfxItemState
::
DEFAULT
||
pState
->
IsVoidItem
()
,
"wrong SfxPoolItem subclass in SfxStatusBarControl"
);
"wrong SfxPoolItem subclass in SfxStatusBarControl"
);
pBar
->
SetItemText
(
nSID
,
OUString
()
);
pBar
->
SetItemText
(
nSID
,
OUString
()
);
}
}
...
...
sfx2/source/toolbox/tbxitem.cxx
Dosyayı görüntüle @
ca8a4a7a
...
@@ -374,7 +374,7 @@ SfxItemState SfxToolBoxControl::GetItemState(
...
@@ -374,7 +374,7 @@ SfxItemState SfxToolBoxControl::GetItemState(
?
SfxItemState
::
DISABLED
?
SfxItemState
::
DISABLED
:
IsInvalidItem
(
pState
)
:
IsInvalidItem
(
pState
)
?
SfxItemState
::
DONTCARE
?
SfxItemState
::
DONTCARE
:
dynamic_cast
<
const
SfxVoidItem
*>
(
pState
)
!=
nullptr
&&
!
pState
->
Which
()
:
pState
->
IsVoidItem
()
&&
!
pState
->
Which
()
?
SfxItemState
::
UNKNOWN
?
SfxItemState
::
UNKNOWN
:
SfxItemState
::
DEFAULT
;
:
SfxItemState
::
DEFAULT
;
}
}
...
...
svl/source/items/itemset.cxx
Dosyayı görüntüle @
ca8a4a7a
...
@@ -917,7 +917,7 @@ const SfxPoolItem& SfxItemSet::Get( sal_uInt16 nWhich, bool bSrchInParent) const
...
@@ -917,7 +917,7 @@ const SfxPoolItem& SfxItemSet::Get( sal_uInt16 nWhich, bool bSrchInParent) const
}
}
#ifdef DBG_UTIL
#ifdef DBG_UTIL
const
SfxPoolItem
*
pItem
=
*
ppFnd
;
const
SfxPoolItem
*
pItem
=
*
ppFnd
;
if
(
dynamic_cast
<
const
SfxVoidItem
*>
(
pItem
)
!=
nullptr
||
!
pItem
->
Which
()
)
if
(
pItem
->
IsVoidItem
()
||
!
pItem
->
Which
()
)
SAL_INFO
(
"svl.items"
,
"SFX_WARNING: Getting disabled Item"
);
SAL_INFO
(
"svl.items"
,
"SFX_WARNING: Getting disabled Item"
);
#endif
#endif
return
**
ppFnd
;
return
**
ppFnd
;
...
...
svx/source/stbctrls/zoomsliderctrl.cxx
Dosyayı görüntüle @
ca8a4a7a
...
@@ -168,7 +168,7 @@ SvxZoomSliderControl::~SvxZoomSliderControl()
...
@@ -168,7 +168,7 @@ SvxZoomSliderControl::~SvxZoomSliderControl()
void
SvxZoomSliderControl
::
StateChanged
(
sal_uInt16
/*nSID*/
,
SfxItemState
eState
,
const
SfxPoolItem
*
pState
)
void
SvxZoomSliderControl
::
StateChanged
(
sal_uInt16
/*nSID*/
,
SfxItemState
eState
,
const
SfxPoolItem
*
pState
)
{
{
if
(
(
SfxItemState
::
DEFAULT
!=
eState
)
||
dynamic_cast
<
const
SfxVoidItem
*>
(
pState
)
!=
nullptr
)
if
(
(
SfxItemState
::
DEFAULT
!=
eState
)
||
pState
->
IsVoidItem
()
)
{
{
GetStatusBar
().
SetItemText
(
GetId
(),
""
);
GetStatusBar
().
SetItemText
(
GetId
(),
""
);
mxImpl
->
mbValuesSet
=
false
;
mxImpl
->
mbValuesSet
=
false
;
...
...
svx/source/svdraw/svdibrow.cxx
Dosyayı görüntüle @
ca8a4a7a
...
@@ -920,7 +920,7 @@ void SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItemS
...
@@ -920,7 +920,7 @@ void SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItemS
if
(
eState
!=
SfxItemState
::
DISABLED
)
{
if
(
eState
!=
SfxItemState
::
DISABLED
)
{
const
SfxPoolItem
&
rItem
=
pSet
->
Get
(
nWhich
);
const
SfxPoolItem
&
rItem
=
pSet
->
Get
(
nWhich
);
sal_uInt16
nIndent
=
0
;
sal_uInt16
nIndent
=
0
;
if
(
dynamic_cast
<
const
SfxVoidItem
*>
(
&
rItem
)
==
nullptr
&&
dynamic_cast
<
const
SfxSetItem
*>
(
&
rItem
)
==
nullptr
if
(
!
rItem
.
IsVoidItem
()
&&
dynamic_cast
<
const
SfxSetItem
*>
(
&
rItem
)
==
nullptr
&&
(
!
IsItemIneffective
(
nWhich
,
pSet
,
nIndent
)
||
bDontHideIneffectiveItems
))
{
&&
(
!
IsItemIneffective
(
nWhich
,
pSet
,
nIndent
)
||
bDontHideIneffectiveItems
))
{
OUString
aCommentStr
;
OUString
aCommentStr
;
...
...
sw/source/uibase/docvw/romenu.cxx
Dosyayı görüntüle @
ca8a4a7a
...
@@ -68,7 +68,7 @@ void SwReadOnlyPopup::Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher &rD
...
@@ -68,7 +68,7 @@ void SwReadOnlyPopup::Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher &rD
xMenu
->
EnableItem
(
nMID
);
xMenu
->
EnableItem
(
nMID
);
if
(
_pItem
)
if
(
_pItem
)
{
{
xMenu
->
CheckItem
(
nMID
,
dynamic_cast
<
const
SfxVoidItem
*>
(
_pItem
.
get
()
)
==
nullptr
&&
xMenu
->
CheckItem
(
nMID
,
!
_pItem
->
IsVoidItem
()
&&
dynamic_cast
<
const
SfxBoolItem
*>
(
_pItem
.
get
()
)
!=
nullptr
&&
dynamic_cast
<
const
SfxBoolItem
*>
(
_pItem
.
get
()
)
!=
nullptr
&&
static_cast
<
SfxBoolItem
*>
(
_pItem
.
get
())
->
GetValue
());
static_cast
<
SfxBoolItem
*>
(
_pItem
.
get
())
->
GetValue
());
//remove full screen entry when not in full screen mode
//remove full screen entry when not in full screen mode
...
...
sw/source/uibase/utlui/bookctrl.cxx
Dosyayı görüntüle @
ca8a4a7a
...
@@ -74,7 +74,7 @@ SwBookmarkControl::~SwBookmarkControl()
...
@@ -74,7 +74,7 @@ SwBookmarkControl::~SwBookmarkControl()
void
SwBookmarkControl
::
StateChanged
(
void
SwBookmarkControl
::
StateChanged
(
sal_uInt16
/*nSID*/
,
SfxItemState
eState
,
const
SfxPoolItem
*
pState
)
sal_uInt16
/*nSID*/
,
SfxItemState
eState
,
const
SfxPoolItem
*
pState
)
{
{
if
(
eState
!=
SfxItemState
::
DEFAULT
||
dynamic_cast
<
const
SfxVoidItem
*>
(
pState
)
!=
nullptr
)
if
(
eState
!=
SfxItemState
::
DEFAULT
||
pState
->
IsVoidItem
()
)
GetStatusBar
().
SetItemText
(
GetId
(),
OUString
()
);
GetStatusBar
().
SetItemText
(
GetId
(),
OUString
()
);
else
if
(
const
SfxStringItem
*
pStringItem
=
dynamic_cast
<
const
SfxStringItem
*>
(
pState
))
else
if
(
const
SfxStringItem
*
pStringItem
=
dynamic_cast
<
const
SfxStringItem
*>
(
pState
))
{
{
...
...
sw/source/uibase/utlui/viewlayoutctrl.cxx
Dosyayı görüntüle @
ca8a4a7a
...
@@ -60,7 +60,7 @@ SwViewLayoutControl::~SwViewLayoutControl()
...
@@ -60,7 +60,7 @@ SwViewLayoutControl::~SwViewLayoutControl()
void
SwViewLayoutControl
::
StateChanged
(
sal_uInt16
/*nSID*/
,
SfxItemState
eState
,
const
SfxPoolItem
*
pState
)
void
SwViewLayoutControl
::
StateChanged
(
sal_uInt16
/*nSID*/
,
SfxItemState
eState
,
const
SfxPoolItem
*
pState
)
{
{
if
(
SfxItemState
::
DEFAULT
!=
eState
||
dynamic_cast
<
const
SfxVoidItem
*>
(
pState
)
!=
nullptr
)
if
(
SfxItemState
::
DEFAULT
!=
eState
||
pState
->
IsVoidItem
()
)
GetStatusBar
().
SetItemText
(
GetId
(),
OUString
()
);
GetStatusBar
().
SetItemText
(
GetId
(),
OUString
()
);
else
else
{
{
...
...
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