summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-03-02 11:14:16 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-03-02 11:21:12 +0000
commit142094e78b82b4b4417ed0ef6d6698a40ee5f96f (patch)
tree7cc5ea8dbdde84e3eca37026d2bc5106056f41da /starmath
parentaaaa7953f59a7caed35cda14300ddb1654d4efe4 (diff)
cppcheck: cstyleCast
Change-Id: Iad1307f5362606bf911caed73aea2fd09bf7b004
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/accessibility.cxx4
-rw-r--r--starmath/source/cfgitem.cxx26
-rw-r--r--starmath/source/cfgitem.hxx2
3 files changed, 15 insertions, 17 deletions
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index ad4f6116dfa7..1604ceefef71 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -850,11 +850,9 @@ void SmEditSource::UpdateData()
SfxBroadcaster & SmEditSource::GetBroadcaster() const
{
- return ((SmEditSource *) this)->aBroadCaster;
+ return const_cast<SmEditSource*>(this)->aBroadCaster;
}
-
-
SmViewForwarder::SmViewForwarder( SmEditAccessible &rAcc ) :
rEditAcc(rAcc)
{
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index 648f1b0fdcb5..f2e9b8175441 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -387,7 +387,7 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
rName += aTmp;
}
- const Sequence< Any > aValues = ((SmMathConfig*) this)->GetProperties( aNames );
+ const Sequence< Any > aValues = const_cast<SmMathConfig*>(this)->GetProperties(aNames);
if (nProps && aValues.getLength() == nProps)
{
@@ -484,7 +484,7 @@ void SmMathConfig::Save()
void SmMathConfig::GetSymbols( std::vector< SmSym > &rSymbols ) const
{
- Sequence< OUString > aNodes( ((SmMathConfig*) this)->GetNodeNames( SYMBOL_LIST ) );
+ Sequence< OUString > aNodes(const_cast<SmMathConfig*>(this)->GetNodeNames(SYMBOL_LIST));
const OUString *pNode = aNodes.getConstArray();
sal_Int32 nNodes = aNodes.getLength();
@@ -613,7 +613,7 @@ void SmMathConfig::ReadFontFormat( SmFontFormat &rFontFormat,
rName += aTmp;
}
- const Sequence< Any > aValues = ((SmMathConfig*) this)->GetProperties( aNames );
+ const Sequence< Any > aValues = const_cast<SmMathConfig*>(this)->GetProperties(aNames);
if (nProps && aValues.getLength() == nProps)
{
@@ -955,7 +955,7 @@ void SmMathConfig::SaveFormat()
const SmFormat & SmMathConfig::GetStandardFormat() const
{
if (!pFormat)
- ((SmMathConfig *) this)->LoadFormat();
+ const_cast<SmMathConfig*>(this)->LoadFormat();
return *pFormat;
}
@@ -983,7 +983,7 @@ void SmMathConfig::SetStandardFormat( const SmFormat &rFormat, bool bSaveFontFor
SmPrintSize SmMathConfig::GetPrintSize() const
{
if (!pOther)
- ((SmMathConfig *) this)->LoadOther();
+ const_cast<SmMathConfig*>(this)->LoadOther();
return pOther->ePrintSize;
}
@@ -1003,7 +1003,7 @@ void SmMathConfig::SetPrintSize( SmPrintSize eSize )
sal_uInt16 SmMathConfig::GetPrintZoomFactor() const
{
if (!pOther)
- ((SmMathConfig *) this)->LoadOther();
+ const_cast<SmMathConfig*>(this)->LoadOther();
return pOther->nPrintZoomFactor;
}
@@ -1033,7 +1033,7 @@ void SmMathConfig::SetOtherIfNotEqual( bool &rbItem, bool bNewVal )
bool SmMathConfig::IsPrintTitle() const
{
if (!pOther)
- ((SmMathConfig *) this)->LoadOther();
+ const_cast<SmMathConfig*>(this)->LoadOther();
return pOther->bPrintTitle;
}
@@ -1049,7 +1049,7 @@ void SmMathConfig::SetPrintTitle( bool bVal )
bool SmMathConfig::IsPrintFormulaText() const
{
if (!pOther)
- ((SmMathConfig *) this)->LoadOther();
+ const_cast<SmMathConfig*>(this)->LoadOther();
return pOther->bPrintFormulaText;
}
@@ -1064,14 +1064,14 @@ void SmMathConfig::SetPrintFormulaText( bool bVal )
bool SmMathConfig::IsSaveOnlyUsedSymbols() const
{
if (!pOther)
- ((SmMathConfig *) this)->LoadOther();
+ const_cast<SmMathConfig*>(this)->LoadOther();
return pOther->bIsSaveOnlyUsedSymbols;
}
bool SmMathConfig::IsPrintFrame() const
{
if (!pOther)
- ((SmMathConfig *) this)->LoadOther();
+ const_cast<SmMathConfig*>(this)->LoadOther();
return pOther->bPrintFrame;
}
@@ -1095,7 +1095,7 @@ void SmMathConfig::SetSaveOnlyUsedSymbols( bool bVal )
bool SmMathConfig::IsIgnoreSpacesRight() const
{
if (!pOther)
- ((SmMathConfig *) this)->LoadOther();
+ const_cast<SmMathConfig*>(this)->LoadOther();
return pOther->bIgnoreSpacesRight;
}
@@ -1111,7 +1111,7 @@ void SmMathConfig::SetIgnoreSpacesRight( bool bVal )
bool SmMathConfig::IsAutoRedraw() const
{
if (!pOther)
- ((SmMathConfig *) this)->LoadOther();
+ const_cast<SmMathConfig*>(this)->LoadOther();
return pOther->bAutoRedraw;
}
@@ -1127,7 +1127,7 @@ void SmMathConfig::SetAutoRedraw( bool bVal )
bool SmMathConfig::IsShowFormulaCursor() const
{
if (!pOther)
- ((SmMathConfig *) this)->LoadOther();
+ const_cast<SmMathConfig*>(this)->LoadOther();
return pOther->bFormulaCursor;
}
diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx
index 37151e268aab..269a857af56d 100644
--- a/starmath/source/cfgitem.hxx
+++ b/starmath/source/cfgitem.hxx
@@ -129,7 +129,7 @@ protected:
SmFontFormatList & GetFontFormatList();
const SmFontFormatList & GetFontFormatList() const
{
- return ((SmMathConfig *) this)->GetFontFormatList();
+ return const_cast<SmMathConfig*>(this)->GetFontFormatList();
}
public: