summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-26 15:29:01 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-26 15:33:30 +0100
commit0b1d8eff976c212dd7e1281fc6e0c79b0aa01c26 (patch)
tree92e345ce3ad23821502efbfd6d72112d9227ef87 /forms
parent0eea902d180b7e31119be4674ecb928eaff77593 (diff)
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: I4293d3e9244bb2ae3c6b8999c0d682e7f23138fb
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/imgprod.cxx4
-rw-r--r--forms/source/xforms/xpathlib/xpathlib.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx
index bf1cfe758430..3e53fdf6f4bd 100644
--- a/forms/source/component/imgprod.cxx
+++ b/forms/source/component/imgprod.cxx
@@ -98,9 +98,9 @@ ErrCode ImgProdLockBytes::ReadAt(sal_uInt64 const nPos,
{
if( GetStream() )
{
- ( (SvStream*) GetStream() )->ResetError();
+ const_cast<SvStream*>(GetStream())->ResetError();
const ErrCode nErr = SvLockBytes::ReadAt( nPos, pBuffer, nCount, pRead );
- ( (SvStream*) GetStream() )->ResetError();
+ const_cast<SvStream*>(GetStream())->ResetError();
return nErr;
}
else
diff --git a/forms/source/xforms/xpathlib/xpathlib.cxx b/forms/source/xforms/xpathlib/xpathlib.cxx
index 609b6faa3575..ae2a650b19e3 100644
--- a/forms/source/xforms/xpathlib/xpathlib.cxx
+++ b/forms/source/xforms/xpathlib/xpathlib.cxx
@@ -280,7 +280,7 @@ void xforms_nowFunction(xmlXPathParserContextPtr ctxt, int /*nargs*/)
DateTime aDateTime( DateTime::SYSTEM );
OString aDateTimeString = makeDateTimeString(aDateTime);
xmlChar *pString = static_cast<xmlChar*>(xmlMalloc(aDateTimeString.getLength()+1));
- strncpy(reinterpret_cast<char*>(pString), (char*)aDateTimeString.getStr(), aDateTimeString.getLength());
+ strncpy(reinterpret_cast<char*>(pString), aDateTimeString.getStr(), aDateTimeString.getLength());
pString[aDateTimeString.getLength()] = 0;
xmlXPathReturnString(ctxt, pString);
}