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
3b9e0676
Kaydet (Commit)
3b9e0676
authored
Mar 26, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Iefbf64608dba0c0ae01e79e5b679a9b42748b73a
üst
23ab1493
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
14 deletions
+14
-14
itemset.cxx
svl/source/items/itemset.cxx
+4
-4
poolcach.cxx
svl/source/items/poolcach.cxx
+1
-1
zforlist.cxx
svl/source/numbers/zforlist.cxx
+2
-2
zforscan.cxx
svl/source/numbers/zforscan.cxx
+6
-6
ddedummy.cxx
svl/unx/source/svdde/ddedummy.cxx
+1
-1
No files found.
svl/source/items/itemset.cxx
Dosyayı görüntüle @
3b9e0676
...
@@ -99,7 +99,7 @@ SfxItemSet::SfxItemSet
...
@@ -99,7 +99,7 @@ SfxItemSet::SfxItemSet
(
void
)
bTotalRanges
;
// avoid warnings
(
void
)
bTotalRanges
;
// avoid warnings
#endif
#endif
_pWhichRanges
=
(
sal_uInt16
*
)
_pPool
->
GetFrozenIdRanges
(
);
_pWhichRanges
=
const_cast
<
sal_uInt16
*>
(
_pPool
->
GetFrozenIdRanges
()
);
assert
(
_pWhichRanges
&&
"don't create ItemSets with full range before FreezeIdRanges()"
);
assert
(
_pWhichRanges
&&
"don't create ItemSets with full range before FreezeIdRanges()"
);
if
(
!
_pWhichRanges
)
if
(
!
_pWhichRanges
)
_pPool
->
FillItemIdRanges_Impl
(
_pWhichRanges
);
_pPool
->
FillItemIdRanges_Impl
(
_pWhichRanges
);
...
@@ -232,7 +232,7 @@ SfxItemSet::SfxItemSet( const SfxItemSet& rASet ):
...
@@ -232,7 +232,7 @@ SfxItemSet::SfxItemSet( const SfxItemSet& rASet ):
{
{
// Just copy the pointer and increase RefCount
// Just copy the pointer and increase RefCount
*
ppDst
=
*
ppSrc
;
*
ppDst
=
*
ppSrc
;
(
(
SfxPoolItem
*
)
(
*
ppDst
)
)
->
AddRef
();
(
*
ppDst
)
->
AddRef
();
}
}
else
if
(
!
(
*
ppSrc
)
->
Which
()
)
else
if
(
!
(
*
ppSrc
)
->
Which
()
)
*
ppDst
=
(
*
ppSrc
)
->
Clone
();
*
ppDst
=
(
*
ppSrc
)
->
Clone
();
...
@@ -258,7 +258,7 @@ SfxItemSet::~SfxItemSet()
...
@@ -258,7 +258,7 @@ SfxItemSet::~SfxItemSet()
if
(
*
ppFnd
&&
!
IsInvalidItem
(
*
ppFnd
)
)
if
(
*
ppFnd
&&
!
IsInvalidItem
(
*
ppFnd
)
)
{
{
if
(
!
(
*
ppFnd
)
->
Which
()
)
if
(
!
(
*
ppFnd
)
->
Which
()
)
delete
(
SfxPoolItem
*
)
*
ppFnd
;
delete
*
ppFnd
;
else
{
else
{
// Still multiple references present, so just alter the RefCount
// Still multiple references present, so just alter the RefCount
if
(
1
<
(
*
ppFnd
)
->
GetRefCount
()
&&
!
IsDefaultItem
(
*
ppFnd
)
)
if
(
1
<
(
*
ppFnd
)
->
GetRefCount
()
&&
!
IsDefaultItem
(
*
ppFnd
)
)
...
@@ -770,7 +770,7 @@ void SfxItemSet::SetRanges( const sal_uInt16 *pNewRanges )
...
@@ -770,7 +770,7 @@ void SfxItemSet::SetRanges( const sal_uInt16 *pNewRanges )
if
(
pNewRanges
==
GetPool
()
->
GetFrozenIdRanges
()
)
if
(
pNewRanges
==
GetPool
()
->
GetFrozenIdRanges
()
)
{
{
delete
[]
_pWhichRanges
;
delete
[]
_pWhichRanges
;
_pWhichRanges
=
(
sal_uInt16
*
)
pNewRanges
;
_pWhichRanges
=
const_cast
<
sal_uInt16
*>
(
pNewRanges
)
;
}
}
else
else
{
{
...
...
svl/source/items/poolcach.cxx
Dosyayı görüntüle @
3b9e0676
...
@@ -104,7 +104,7 @@ const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem, bool b
...
@@ -104,7 +104,7 @@ const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem, bool b
// Add the transformation to the cache
// Add the transformation to the cache
SfxItemModifyImpl
aModify
;
SfxItemModifyImpl
aModify
;
aModify
.
pOrigItem
=
&
rOrigItem
;
aModify
.
pOrigItem
=
&
rOrigItem
;
aModify
.
pPoolItem
=
(
SfxSetItem
*
)
pNewPoolItem
;
aModify
.
pPoolItem
=
const_cast
<
SfxSetItem
*>
(
pNewPoolItem
)
;
pCache
->
push_back
(
aModify
);
pCache
->
push_back
(
aModify
);
DBG_ASSERT
(
!
pItemToPut
||
DBG_ASSERT
(
!
pItemToPut
||
...
...
svl/source/numbers/zforlist.cxx
Dosyayı görüntüle @
3b9e0676
...
@@ -1815,9 +1815,9 @@ OUString SvNumberFormatter::GetFormatDecimalSep( sal_uInt32 nFormat ) const
...
@@ -1815,9 +1815,9 @@ OUString SvNumberFormatter::GetFormatDecimalSep( sal_uInt32 nFormat ) const
else
else
{
{
LanguageTag
aSaveLocale
(
xLocaleData
->
getLanguageTag
()
);
LanguageTag
aSaveLocale
(
xLocaleData
->
getLanguageTag
()
);
((
SvNumberFormatter
*
)
this
)
->
xLocaleData
.
changeLocale
(
LanguageTag
(
pFormat
->
GetLanguage
())
);
const_cast
<
SvNumberFormatter
*>
(
this
)
->
xLocaleData
.
changeLocale
(
LanguageTag
(
pFormat
->
GetLanguage
())
);
aRet
=
xLocaleData
->
getNumDecimalSep
();
aRet
=
xLocaleData
->
getNumDecimalSep
();
((
SvNumberFormatter
*
)
this
)
->
xLocaleData
.
changeLocale
(
aSaveLocale
);
const_cast
<
SvNumberFormatter
*>
(
this
)
->
xLocaleData
.
changeLocale
(
aSaveLocale
);
}
}
return
aRet
;
return
aRet
;
}
}
...
...
svl/source/numbers/zforscan.cxx
Dosyayı görüntüle @
3b9e0676
...
@@ -131,21 +131,21 @@ void ImpSvNumberformatScan::InitSpecialKeyword( NfKeywordIndex eIdx ) const
...
@@ -131,21 +131,21 @@ void ImpSvNumberformatScan::InitSpecialKeyword( NfKeywordIndex eIdx ) const
switch
(
eIdx
)
switch
(
eIdx
)
{
{
case
NF_KEY_TRUE
:
case
NF_KEY_TRUE
:
((
ImpSvNumberformatScan
*
)
this
)
->
sKeyword
[
NF_KEY_TRUE
]
=
const_cast
<
ImpSvNumberformatScan
*>
(
this
)
->
sKeyword
[
NF_KEY_TRUE
]
=
pFormatter
->
GetCharClass
()
->
uppercase
(
pFormatter
->
GetLocaleData
()
->
getTrueWord
()
);
pFormatter
->
GetCharClass
()
->
uppercase
(
pFormatter
->
GetLocaleData
()
->
getTrueWord
()
);
if
(
sKeyword
[
NF_KEY_TRUE
].
isEmpty
()
)
if
(
sKeyword
[
NF_KEY_TRUE
].
isEmpty
()
)
{
{
SAL_WARN
(
"svl.numbers"
,
"InitSpecialKeyword: TRUE_WORD?"
);
SAL_WARN
(
"svl.numbers"
,
"InitSpecialKeyword: TRUE_WORD?"
);
((
ImpSvNumberformatScan
*
)
this
)
->
sKeyword
[
NF_KEY_TRUE
]
=
"TRUE"
;
const_cast
<
ImpSvNumberformatScan
*>
(
this
)
->
sKeyword
[
NF_KEY_TRUE
]
=
"TRUE"
;
}
}
break
;
break
;
case
NF_KEY_FALSE
:
case
NF_KEY_FALSE
:
((
ImpSvNumberformatScan
*
)
this
)
->
sKeyword
[
NF_KEY_FALSE
]
=
const_cast
<
ImpSvNumberformatScan
*>
(
this
)
->
sKeyword
[
NF_KEY_FALSE
]
=
pFormatter
->
GetCharClass
()
->
uppercase
(
pFormatter
->
GetLocaleData
()
->
getFalseWord
()
);
pFormatter
->
GetCharClass
()
->
uppercase
(
pFormatter
->
GetLocaleData
()
->
getFalseWord
()
);
if
(
sKeyword
[
NF_KEY_FALSE
].
isEmpty
()
)
if
(
sKeyword
[
NF_KEY_FALSE
].
isEmpty
()
)
{
{
SAL_WARN
(
"svl.numbers"
,
"InitSpecialKeyword: FALSE_WORD?"
);
SAL_WARN
(
"svl.numbers"
,
"InitSpecialKeyword: FALSE_WORD?"
);
((
ImpSvNumberformatScan
*
)
this
)
->
sKeyword
[
NF_KEY_FALSE
]
=
"FALSE"
;
const_cast
<
ImpSvNumberformatScan
*>
(
this
)
->
sKeyword
[
NF_KEY_FALSE
]
=
"FALSE"
;
}
}
break
;
break
;
default
:
default
:
...
@@ -155,7 +155,7 @@ void ImpSvNumberformatScan::InitSpecialKeyword( NfKeywordIndex eIdx ) const
...
@@ -155,7 +155,7 @@ void ImpSvNumberformatScan::InitSpecialKeyword( NfKeywordIndex eIdx ) const
void
ImpSvNumberformatScan
::
InitCompatCur
()
const
void
ImpSvNumberformatScan
::
InitCompatCur
()
const
{
{
ImpSvNumberformatScan
*
pThis
=
(
ImpSvNumberformatScan
*
)
this
;
ImpSvNumberformatScan
*
pThis
=
const_cast
<
ImpSvNumberformatScan
*>
(
this
)
;
// currency symbol for old style ("automatic") compatibility format codes
// currency symbol for old style ("automatic") compatibility format codes
pFormatter
->
GetCompatibilityCurrency
(
pThis
->
sCurSymbol
,
pThis
->
sCurAbbrev
);
pFormatter
->
GetCompatibilityCurrency
(
pThis
->
sCurSymbol
,
pThis
->
sCurAbbrev
);
// currency symbol upper case
// currency symbol upper case
...
@@ -167,7 +167,7 @@ void ImpSvNumberformatScan::InitKeywords() const
...
@@ -167,7 +167,7 @@ void ImpSvNumberformatScan::InitKeywords() const
{
{
if
(
!
bKeywordsNeedInit
)
if
(
!
bKeywordsNeedInit
)
return
;
return
;
((
ImpSvNumberformatScan
*
)
this
)
->
SetDependentKeywords
();
const_cast
<
ImpSvNumberformatScan
*>
(
this
)
->
SetDependentKeywords
();
bKeywordsNeedInit
=
false
;
bKeywordsNeedInit
=
false
;
}
}
...
...
svl/unx/source/svdde/ddedummy.cxx
Dosyayı görüntüle @
3b9e0676
...
@@ -159,7 +159,7 @@ void DdeTopic::InsertItem( SAL_UNUSED_PARAMETER DdeItem* )
...
@@ -159,7 +159,7 @@ void DdeTopic::InsertItem( SAL_UNUSED_PARAMETER DdeItem* )
DdeItem
*
DdeTopic
::
AddItem
(
const
DdeItem
&
rDdeItem
)
DdeItem
*
DdeTopic
::
AddItem
(
const
DdeItem
&
rDdeItem
)
{
{
return
(
DdeItem
*
)
&
rDdeItem
;
return
const_cast
<
DdeItem
*>
(
&
rDdeItem
)
;
}
}
void
DdeTopic
::
RemoveItem
(
SAL_UNUSED_PARAMETER
const
DdeItem
&
)
void
DdeTopic
::
RemoveItem
(
SAL_UNUSED_PARAMETER
const
DdeItem
&
)
...
...
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