More loplugin:cstylecast: forms
Change-Id: Ide91ff51ef5c048272d742547597d6c66fc3abea
This commit is contained in:
@@ -143,7 +143,7 @@ void OButtonModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
|
||||
OStreamSection aSection( _rxOutStream.get() );
|
||||
// this will allow readers to skip unknown bytes in their dtor
|
||||
|
||||
_rxOutStream->writeShort( (sal_uInt16)m_eButtonType );
|
||||
_rxOutStream->writeShort( static_cast<sal_uInt16>(m_eButtonType) );
|
||||
|
||||
OUString sTmp = INetURLObject::decode( m_sTargetURL, INetURLObject::DecodeMechanism::Unambiguous);
|
||||
_rxOutStream << sTmp;
|
||||
@@ -163,7 +163,7 @@ void OButtonModel::read(const Reference<XObjectInputStream>& _rxInStream)
|
||||
{
|
||||
case 0x0001:
|
||||
{
|
||||
m_eButtonType = (FormButtonType)_rxInStream->readShort();
|
||||
m_eButtonType = static_cast<FormButtonType>(_rxInStream->readShort());
|
||||
|
||||
_rxInStream >> m_sTargetURL;
|
||||
_rxInStream >> m_sTargetFrame;
|
||||
@@ -172,7 +172,7 @@ void OButtonModel::read(const Reference<XObjectInputStream>& _rxInStream)
|
||||
|
||||
case 0x0002:
|
||||
{
|
||||
m_eButtonType = (FormButtonType)_rxInStream->readShort();
|
||||
m_eButtonType = static_cast<FormButtonType>(_rxInStream->readShort());
|
||||
|
||||
_rxInStream >> m_sTargetURL;
|
||||
_rxInStream >> m_sTargetFrame;
|
||||
@@ -186,7 +186,7 @@ void OButtonModel::read(const Reference<XObjectInputStream>& _rxInStream)
|
||||
// this will skip any unknown bytes in its dtor
|
||||
|
||||
// button type
|
||||
m_eButtonType = (FormButtonType)_rxInStream->readShort();
|
||||
m_eButtonType = static_cast<FormButtonType>(_rxInStream->readShort());
|
||||
|
||||
// URL
|
||||
_rxInStream >> m_sTargetURL;
|
||||
@@ -267,7 +267,7 @@ void SAL_CALL OButtonModel::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle
|
||||
{
|
||||
sal_Int16 nDefaultState = sal_Int16(TRISTATE_FALSE);
|
||||
OSL_VERIFY( _rValue >>= nDefaultState );
|
||||
m_eDefaultState = (ToggleState)nDefaultState;
|
||||
m_eDefaultState = static_cast<ToggleState>(nDefaultState);
|
||||
impl_resetNoBroadcast_nothrow();
|
||||
}
|
||||
break;
|
||||
|
@@ -351,7 +351,7 @@ void SAL_CALL OComboBoxModel::write(const Reference<css::io::XObjectOutputStream
|
||||
|
||||
css::uno::Sequence<OUString> aListSourceSeq(&m_aListSource, 1);
|
||||
_rxOutStream << aListSourceSeq;
|
||||
_rxOutStream << (sal_Int16)m_eListSourceType;
|
||||
_rxOutStream << static_cast<sal_Int16>(m_eListSourceType);
|
||||
|
||||
if ((nAnyMask & BOUNDCOLUMN) == BOUNDCOLUMN)
|
||||
{
|
||||
@@ -423,7 +423,7 @@ void SAL_CALL OComboBoxModel::read(const Reference<css::io::XObjectInputStream>&
|
||||
|
||||
sal_Int16 nListSourceType;
|
||||
_rxInStream >> nListSourceType;
|
||||
m_eListSourceType = (ListSourceType)nListSourceType;
|
||||
m_eListSourceType = static_cast<ListSourceType>(nListSourceType);
|
||||
|
||||
if ((nAnyMask & BOUNDCOLUMN) == BOUNDCOLUMN)
|
||||
{
|
||||
|
@@ -2391,7 +2391,7 @@ sal_Bool SAL_CALL ODatabaseForm::getGroupControl()
|
||||
{
|
||||
sal_Int32 nCycle = 0;
|
||||
::cppu::enum2int(nCycle, m_aCycle);
|
||||
return (TabulatorCycle)nCycle != TabulatorCycle_PAGE;
|
||||
return static_cast<TabulatorCycle>(nCycle) != TabulatorCycle_PAGE;
|
||||
}
|
||||
|
||||
if (isLoaded() && getConnection().is())
|
||||
@@ -3801,7 +3801,7 @@ void SAL_CALL ODatabaseForm::write(const Reference<XObjectOutputStream>& _rxOutS
|
||||
default : OSL_FAIL("ODatabaseForm::write : wrong CommandType !");
|
||||
}
|
||||
}
|
||||
_rxOutStream->writeShort((sal_Int16)eTranslated); // former DataSelectionType
|
||||
_rxOutStream->writeShort(static_cast<sal_Int16>(eTranslated)); // former DataSelectionType
|
||||
|
||||
// very old versions expect a CursorType here
|
||||
_rxOutStream->writeShort(2); // DatabaseCursorType_KEYSET
|
||||
@@ -3821,22 +3821,22 @@ void SAL_CALL ODatabaseForm::write(const Reference<XObjectOutputStream>& _rxOutS
|
||||
// html form stuff
|
||||
OUString sTmp = INetURLObject::decode( m_aTargetURL, INetURLObject::DecodeMechanism::Unambiguous);
|
||||
_rxOutStream << sTmp;
|
||||
_rxOutStream->writeShort( (sal_Int16)m_eSubmitMethod );
|
||||
_rxOutStream->writeShort( (sal_Int16)m_eSubmitEncoding );
|
||||
_rxOutStream->writeShort( static_cast<sal_Int16>(m_eSubmitMethod) );
|
||||
_rxOutStream->writeShort( static_cast<sal_Int16>(m_eSubmitEncoding) );
|
||||
_rxOutStream << m_aTargetFrame;
|
||||
|
||||
// version 2 didn't know some options and the "default" state
|
||||
sal_Int32 nCycle = (sal_Int32)TabulatorCycle_RECORDS;
|
||||
sal_Int32 nCycle = sal_Int32(TabulatorCycle_RECORDS);
|
||||
if (m_aCycle.hasValue())
|
||||
{
|
||||
::cppu::enum2int(nCycle, m_aCycle);
|
||||
if (m_aCycle == TabulatorCycle_PAGE)
|
||||
// unknown in earlier versions
|
||||
nCycle = (sal_Int32)TabulatorCycle_RECORDS;
|
||||
nCycle = sal_Int32(TabulatorCycle_RECORDS);
|
||||
}
|
||||
_rxOutStream->writeShort(static_cast<sal_Int16>(nCycle));
|
||||
|
||||
_rxOutStream->writeShort((sal_Int16)m_eNavigation);
|
||||
_rxOutStream->writeShort(static_cast<sal_Int16>(m_eNavigation));
|
||||
|
||||
OUString sFilter;
|
||||
OUString sHaving;
|
||||
@@ -3895,7 +3895,7 @@ void SAL_CALL ODatabaseForm::read(const Reference<XObjectInputStream>& _rxInStre
|
||||
|
||||
sal_Int16 nCursorSourceType = _rxInStream->readShort();
|
||||
sal_Int32 nCommandType = 0;
|
||||
switch ((DataSelectionType)nCursorSourceType)
|
||||
switch (static_cast<DataSelectionType>(nCursorSourceType))
|
||||
{
|
||||
case DataSelectionType_TABLE : nCommandType = CommandType::TABLE; break;
|
||||
case DataSelectionType_QUERY : nCommandType = CommandType::QUERY; break;
|
||||
@@ -3903,7 +3903,7 @@ void SAL_CALL ODatabaseForm::read(const Reference<XObjectInputStream>& _rxInStre
|
||||
case DataSelectionType_SQLPASSTHROUGH:
|
||||
{
|
||||
nCommandType = CommandType::COMMAND;
|
||||
bool bEscapeProcessing = ((DataSelectionType)nCursorSourceType) != DataSelectionType_SQLPASSTHROUGH;
|
||||
bool bEscapeProcessing = static_cast<DataSelectionType>(nCursorSourceType) != DataSelectionType_SQLPASSTHROUGH;
|
||||
m_xAggregateSet->setPropertyValue(PROPERTY_ESCAPE_PROCESSING, makeAny(bEscapeProcessing));
|
||||
}
|
||||
break;
|
||||
@@ -3933,15 +3933,15 @@ void SAL_CALL ODatabaseForm::read(const Reference<XObjectInputStream>& _rxInStre
|
||||
OUString sTmp;
|
||||
_rxInStream >> sTmp;
|
||||
m_aTargetURL = INetURLObject::decode( sTmp, INetURLObject::DecodeMechanism::Unambiguous);
|
||||
m_eSubmitMethod = (FormSubmitMethod)_rxInStream->readShort();
|
||||
m_eSubmitEncoding = (FormSubmitEncoding)_rxInStream->readShort();
|
||||
m_eSubmitMethod = static_cast<FormSubmitMethod>(_rxInStream->readShort());
|
||||
m_eSubmitEncoding = static_cast<FormSubmitEncoding>(_rxInStream->readShort());
|
||||
_rxInStream >> m_aTargetFrame;
|
||||
|
||||
if (nVersion > 1)
|
||||
{
|
||||
sal_Int32 nCycle = _rxInStream->readShort();
|
||||
m_aCycle <<= TabulatorCycle(nCycle);
|
||||
m_eNavigation = (NavigationBarMode)_rxInStream->readShort();
|
||||
m_eNavigation = static_cast<NavigationBarMode>(_rxInStream->readShort());
|
||||
|
||||
_rxInStream >> sAggregateProp;
|
||||
setPropertyValue(PROPERTY_FILTER, makeAny(sAggregateProp));
|
||||
|
@@ -929,7 +929,7 @@ void OGridControlModel::read(const Reference<XObjectInputStream>& _rxInStream)
|
||||
if ( nAnyMask & FONTATTRIBS )
|
||||
{
|
||||
aFont.Weight = static_cast<float>(vcl::unohelper::ConvertFontWeight( _rxInStream->readShort() ));
|
||||
aFont.Slant = (FontSlant)_rxInStream->readShort();
|
||||
aFont.Slant = static_cast<FontSlant>(_rxInStream->readShort());
|
||||
aFont.Underline = _rxInStream->readShort();
|
||||
aFont.Strikeout = _rxInStream->readShort();
|
||||
aFont.Orientation = static_cast<float>(_rxInStream->readShort()) / 10;
|
||||
|
@@ -94,7 +94,7 @@ void OImageButtonModel::write(const Reference<XObjectOutputStream>& _rxOutStream
|
||||
|
||||
// Version
|
||||
_rxOutStream->writeShort(0x0003);
|
||||
_rxOutStream->writeShort((sal_uInt16)m_eButtonType);
|
||||
_rxOutStream->writeShort(static_cast<sal_uInt16>(m_eButtonType));
|
||||
|
||||
OUString sTmp(INetURLObject::decode( m_sTargetURL, INetURLObject::DecodeMechanism::Unambiguous));
|
||||
_rxOutStream << sTmp;
|
||||
@@ -113,19 +113,19 @@ void OImageButtonModel::read(const Reference<XObjectInputStream>& _rxInStream)
|
||||
{
|
||||
case 0x0001:
|
||||
{
|
||||
m_eButtonType = (FormButtonType)_rxInStream->readShort();
|
||||
m_eButtonType = static_cast<FormButtonType>(_rxInStream->readShort());
|
||||
}
|
||||
break;
|
||||
case 0x0002:
|
||||
{
|
||||
m_eButtonType = (FormButtonType)_rxInStream->readShort();
|
||||
m_eButtonType = static_cast<FormButtonType>(_rxInStream->readShort());
|
||||
_rxInStream >> m_sTargetURL;
|
||||
_rxInStream >> m_sTargetFrame;
|
||||
}
|
||||
break;
|
||||
case 0x0003:
|
||||
{
|
||||
m_eButtonType = (FormButtonType)_rxInStream->readShort();
|
||||
m_eButtonType = static_cast<FormButtonType>(_rxInStream->readShort());
|
||||
_rxInStream >> m_sTargetURL;
|
||||
_rxInStream >> m_sTargetFrame;
|
||||
readHelpTextCompatibly(_rxInStream);
|
||||
|
@@ -571,7 +571,7 @@ namespace frm
|
||||
_rxOutStream << nAnyMask;
|
||||
|
||||
_rxOutStream << lcl_convertToStringSequence( m_aListSourceValues );
|
||||
_rxOutStream << (sal_Int16)m_eListSourceType;
|
||||
_rxOutStream << static_cast<sal_Int16>(m_eListSourceType);
|
||||
_rxOutStream << aDummySeq;
|
||||
_rxOutStream << m_aDefaultSelectSeq;
|
||||
|
||||
@@ -657,7 +657,7 @@ namespace frm
|
||||
|
||||
sal_Int16 nListSourceType;
|
||||
_rxInStream >> nListSourceType;
|
||||
m_eListSourceType = (ListSourceType)nListSourceType;
|
||||
m_eListSourceType = static_cast<ListSourceType>(nListSourceType);
|
||||
Any aListSourceSeqAny;
|
||||
aListSourceSeqAny <<= aListSourceSeq;
|
||||
|
||||
|
@@ -304,7 +304,7 @@ void SAL_CALL ORadioButtonModel::read(const Reference<XObjectInputStream>& _rxIn
|
||||
}
|
||||
|
||||
setReferenceValue( sReferenceValue );
|
||||
setDefaultChecked( (ToggleState)nDefaultChecked );
|
||||
setDefaultChecked( static_cast<ToggleState>(nDefaultChecked) );
|
||||
|
||||
// Display default values after read
|
||||
if ( !getControlSource().isEmpty() )
|
||||
|
@@ -108,7 +108,7 @@ namespace frm
|
||||
" 0--2"),
|
||||
css::uno::Reference<css::uno::XInterface>(), -1);
|
||||
}
|
||||
m_eDefaultChecked = (ToggleState)nDefaultChecked;
|
||||
m_eDefaultChecked = static_cast<ToggleState>(nDefaultChecked);
|
||||
resetNoBroadcast();
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user