summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-09-18 15:10:54 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-09-23 17:27:47 +0200
commit23e1fc277d5651babce17bb74408ef6505f101d2 (patch)
treeedf64a973766400f870095f4ecd25784bfea6ba5 /svtools
parent7f895dfbf5fb084d747e52db678d75e3273cd825 (diff)
loplugin: cstylecast, update PTR_CAST macro to use static_cast
I introduce a template method into the PTR_CAST machinery to maintain constness. There is now a FIXME in sd/../docshell.cxx because I needed to use a dynamic_cast there to work around the games it appears to be playing with OLE in-place activation. Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, dropping the GCC-extension, unnecessary use of typeof from tools/rtti.hxx Change-Id: Iba5ace1aa27e02b34fcc91af1e658c43371afd03
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/misc/ehdl.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx
index 4a6afd53e55e..1be2f4e05f26 100644
--- a/svtools/source/misc/ehdl.cxx
+++ b/svtools/source/misc/ehdl.cxx
@@ -176,7 +176,7 @@ bool SfxErrorHandler::CreateString(
sal_uLong nErrCode = pErr->GetErrorCode() & ERRCODE_ERROR_MASK;
if( nErrCode>=lEnd || nErrCode<=lStart )
return false;
- MessageInfo *pMsgInfo=PTR_CAST(MessageInfo,pErr);
+ const MessageInfo *pMsgInfo = PTR_CAST(MessageInfo,pErr);
if(pMsgInfo)
{
if(GetMessageString(nErrCode, rStr, nFlags))
@@ -187,7 +187,7 @@ bool SfxErrorHandler::CreateString(
}
else if(GetErrorString(nErrCode, rStr, nFlags))
{
- StringErrorInfo *pStringInfo=PTR_CAST(StringErrorInfo,pErr);
+ const StringErrorInfo *pStringInfo = PTR_CAST(StringErrorInfo,pErr);
if(pStringInfo)
{
rStr = rStr.replaceAll(OUString("$(ARG1)"),
@@ -195,7 +195,7 @@ bool SfxErrorHandler::CreateString(
}
else
{
- TwoStringErrorInfo * pTwoStringInfo = PTR_CAST(TwoStringErrorInfo,
+ const TwoStringErrorInfo * pTwoStringInfo = PTR_CAST(TwoStringErrorInfo,
pErr);
if (pTwoStringInfo)
{