summaryrefslogtreecommitdiff
path: root/forms/source/xforms
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-12 20:23:58 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-12 20:23:58 +0100
commit1099ae1c16cd8323d877e894d8ce213ef8e1c349 (patch)
treef5eb610a9a27de258415a9ae1d14b2972c7a84cb /forms/source/xforms
parent11e93c64c33ed17e2286bf3be7a473df43425012 (diff)
More loplugin:cstylecast: forms
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I91065e9ff1c160e5becda1ffa033de7c1b48b7f3
Diffstat (limited to 'forms/source/xforms')
-rw-r--r--forms/source/xforms/datatypes.cxx2
-rw-r--r--forms/source/xforms/xpathlib/extension.cxx4
-rw-r--r--forms/source/xforms/xpathlib/xpathlib.cxx14
3 files changed, 10 insertions, 10 deletions
diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx
index da3460edb5ea..c0b1a978a3e9 100644
--- a/forms/source/xforms/datatypes.cxx
+++ b/forms/source/xforms/datatypes.cxx
@@ -868,7 +868,7 @@ namespace xforms
bool OShortIntegerType::_getValue( const OUString& value, double& fValue )
{
- fValue = (double)(sal_Int16)value.toInt32();
+ fValue = static_cast<double>(static_cast<sal_Int16>(value.toInt32()));
// TODO/eforms
// this does not care for values which do not fit into a sal_Int16, but simply
// cuts them down. A better implementation here should probably return <FALSE/>
diff --git a/forms/source/xforms/xpathlib/extension.cxx b/forms/source/xforms/xpathlib/extension.cxx
index 576d8d957e9e..e2d29e00b948 100644
--- a/forms/source/xforms/xpathlib/extension.cxx
+++ b/forms/source/xforms/xpathlib/extension.cxx
@@ -35,8 +35,8 @@ Libxml2ExtensionHandle SAL_CALL CLibxml2XFormsExtension::getLibxml2ExtensionHand
Libxml2ExtensionHandle aHandle;
aHandle.functionLookupFunction = reinterpret_cast< sal_Int64 >( &xforms_lookupFunc );
aHandle.functionData = reinterpret_cast< sal_Int64 >( this );
- aHandle.variableLookupFunction = (sal_Int64)0;
- aHandle.variableData = (sal_Int64)0;
+ aHandle.variableLookupFunction = sal_Int64(0);
+ aHandle.variableData = sal_Int64(0);
return aHandle;
}
diff --git a/forms/source/xforms/xpathlib/xpathlib.cxx b/forms/source/xforms/xpathlib/xpathlib.cxx
index c60f5bdd10e5..d0d7dba791fc 100644
--- a/forms/source/xforms/xpathlib/xpathlib.cxx
+++ b/forms/source/xforms/xpathlib/xpathlib.cxx
@@ -232,22 +232,22 @@ void xforms_propertyFunction(xmlXPathParserContextPtr ctxt, int nargs)
static OString makeDateTimeString (const DateTime& aDateTime)
{
OStringBuffer aDateTimeString;
- aDateTimeString.append((sal_Int32)aDateTime.GetYear());
+ aDateTimeString.append(static_cast<sal_Int32>(aDateTime.GetYear()));
aDateTimeString.append("-");
if (aDateTime.GetMonth()<10) aDateTimeString.append("0");
- aDateTimeString.append((sal_Int32)aDateTime.GetMonth());
+ aDateTimeString.append(static_cast<sal_Int32>(aDateTime.GetMonth()));
aDateTimeString.append("-");
if (aDateTime.GetDay()<10) aDateTimeString.append("0");
- aDateTimeString.append((sal_Int32)aDateTime.GetDay());
+ aDateTimeString.append(static_cast<sal_Int32>(aDateTime.GetDay()));
aDateTimeString.append("T");
if (aDateTime.GetHour()<10) aDateTimeString.append("0");
- aDateTimeString.append((sal_Int32)aDateTime.GetHour());
+ aDateTimeString.append(static_cast<sal_Int32>(aDateTime.GetHour()));
aDateTimeString.append(":");
if (aDateTime.GetMin()<10) aDateTimeString.append("0");
- aDateTimeString.append((sal_Int32)aDateTime.GetMin());
+ aDateTimeString.append(static_cast<sal_Int32>(aDateTime.GetMin()));
aDateTimeString.append(":");
if (aDateTime.GetSec()<10) aDateTimeString.append("0");
- aDateTimeString.append((sal_Int32)aDateTime.GetSec());
+ aDateTimeString.append(static_cast<sal_Int32>(aDateTime.GetSec()));
aDateTimeString.append("Z");
return aDateTimeString.makeStringAndClear();
@@ -308,7 +308,7 @@ static bool parseDateTime(const OUString& aString, DateTime& aDateTime)
sal_Int32 nMinute = aTimeString.getToken(0, ':', nIndex).toInt32();
sal_Int32 nSecond = aTimeString.getToken(0, ':', nIndex).toInt32();
- Date tmpDate((sal_uInt16)nDay, (sal_uInt16)nMonth, (sal_uInt16)nYear);
+ Date tmpDate(static_cast<sal_uInt16>(nDay), static_cast<sal_uInt16>(nMonth), static_cast<sal_uInt16>(nYear));
tools::Time tmpTime(nHour, nMinute, nSecond);
DateTime tmpDateTime(tmpDate, tmpTime);
if (aString.indexOf("Z") < 0)