diff options
-rw-r--r-- | starmath/inc/dialog.hxx | 2 | ||||
-rw-r--r-- | starmath/inc/format.hxx | 2 | ||||
-rw-r--r-- | starmath/inc/node.hxx | 4 | ||||
-rw-r--r-- | starmath/inc/symbol.hxx | 2 | ||||
-rw-r--r-- | starmath/source/rect.cxx | 2 | ||||
-rw-r--r-- | starmath/source/smmod.cxx | 6 |
6 files changed, 9 insertions, 9 deletions
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index bddec2d746e8..9c3987bb91fe 100644 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -445,7 +445,7 @@ class SmSymDefineDialog : public ModalDialog SmSym * GetSymbol(const ComboBox &rComboBox); const SmSym * GetSymbol(const ComboBox &rComboBox) const { - return ((SmSymDefineDialog *) this)->GetSymbol(rComboBox); + return const_cast<SmSymDefineDialog *>(this)->GetSymbol(rComboBox); } void InitColor_Impl(); diff --git a/starmath/inc/format.hxx b/starmath/inc/format.hxx index fb1287acbdb2..15bdd5527134 100644 --- a/starmath/inc/format.hxx +++ b/starmath/inc/format.hxx @@ -149,7 +149,7 @@ public: void RequestApplyChanges() const { - ((SmFormat *) this)->Broadcast(SfxSimpleHint(HINT_FORMATCHANGED)); + const_cast<SmFormat *>(this)->Broadcast(SfxSimpleHint(HINT_FORMATCHANGED)); } }; diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index 9a3516c57837..a6aae542d0aa 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -1029,7 +1029,7 @@ public: /** Get body (Not NULL) */ const SmNode * GetBody() const { - return ((SmSubSupNode *) this)->GetBody(); + return const_cast<SmSubSupNode *>(this)->GetBody(); } void SetUseLimits(bool bVal) { bUseLimits = bVal; } @@ -1183,7 +1183,7 @@ public: SmNode * GetSymbol(); const SmNode * GetSymbol() const { - return ((SmOperNode *) this)->GetSymbol(); + return const_cast<SmOperNode *>(this)->GetSymbol(); } long CalcSymbolHeight(const SmNode &rSymbol, const SmFormat &rFormat) const; diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx index 2b6df4ff97da..51515406cec8 100644 --- a/starmath/inc/symbol.hxx +++ b/starmath/inc/symbol.hxx @@ -144,7 +144,7 @@ public: SmSym * GetSymbolByName(const OUString& rSymbolName); const SmSym * GetSymbolByName(const OUString& rSymbolName) const { - return ((SmSymbolManager *) this)->GetSymbolByName(rSymbolName); + return const_cast<SmSymbolManager *>(this)->GetSymbolByName(rSymbolName); } bool IsModified() const { return m_bModified; } diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx index 53775b128a01..f0f5a750cb3e 100644 --- a/starmath/source/rect.cxx +++ b/starmath/source/rect.cxx @@ -608,7 +608,7 @@ bool SmGetGlyphBoundRect(const OutputDevice &rDev, // get a device where 'OutputDevice::GetTextBoundRect' will be successful OutputDevice *pGlyphDev; if (rDev.GetOutDevType() != OUTDEV_PRINTER) - pGlyphDev = (OutputDevice *) &rDev; + pGlyphDev = const_cast<OutputDevice *>(&rDev); else { // since we format for the printer (where GetTextBoundRect will fail) diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx index 8f0ef42657a0..e6b12c44401e 100644 --- a/starmath/source/smmod.cxx +++ b/starmath/source/smmod.cxx @@ -188,13 +188,13 @@ SmModule::~SmModule() void SmModule::_CreateSysLocale() const { - SmModule* pThis = (SmModule*)this; + SmModule* pThis = const_cast<SmModule*>(this); pThis->pSysLocale = new SvtSysLocale; } void SmModule::_CreateVirtualDev() const { - SmModule* pThis = (SmModule*)this; + SmModule* pThis = const_cast<SmModule*>(this); pThis->pVirtualDev = new VirtualDevice; pThis->pVirtualDev->SetReferenceDevice( VirtualDevice::REFDEV_MODE_MSO1 ); } @@ -249,7 +249,7 @@ SmSymbolManager & SmModule::GetSymbolManager() SmLocalizedSymbolData & SmModule::GetLocSymbolData() const { if (!pLocSymbolData) - ((SmModule *) this)->pLocSymbolData = new SmLocalizedSymbolData; + const_cast<SmModule *>(this)->pLocSymbolData = new SmLocalizedSymbolData; return *pLocSymbolData; } |