summaryrefslogtreecommitdiff
path: root/forms/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-11-07 01:07:51 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-11-08 05:34:20 +0100
commit56f3dbffdf5b3264c1c71201733e3ff6bb5e48cb (patch)
treee00509b726c470c3e97de33feb8545c5bca12041 /forms/source
parent27f7770e3e9be60b0caef8469666474151a753fb (diff)
Simplify a bit
Change-Id: I618b0f8bcb2e8032ee12367c73e1136685f66b3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176183 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'forms/source')
-rw-r--r--forms/source/component/Columns.cxx4
-rw-r--r--forms/source/component/ComboBox.cxx8
-rw-r--r--forms/source/component/Currency.cxx4
-rw-r--r--forms/source/component/DatabaseForm.cxx4
-rw-r--r--forms/source/component/Edit.cxx2
-rw-r--r--forms/source/component/EditBase.cxx10
-rw-r--r--forms/source/component/File.cxx2
-rw-r--r--forms/source/component/FormattedField.cxx12
-rw-r--r--forms/source/component/Grid.cxx8
-rw-r--r--forms/source/component/Hidden.cxx2
-rw-r--r--forms/source/component/ImageControl.cxx2
-rw-r--r--forms/source/component/ListBox.cxx6
-rw-r--r--forms/source/component/Numeric.cxx2
-rw-r--r--forms/source/component/clickableimage.cxx6
-rw-r--r--forms/source/misc/InterfaceContainer.cxx2
15 files changed, 37 insertions, 37 deletions
diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx
index f6fa631003a9..930cb356ed97 100644
--- a/forms/source/component/Columns.cxx
+++ b/forms/source/component/Columns.cxx
@@ -413,7 +413,7 @@ void OGridColumn::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any
switch (nHandle)
{
case PROPERTY_ID_LABEL:
- DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_STRING, "invalid type" );
+ DBG_ASSERT(rValue.getValueTypeClass() == TypeClass_STRING, "invalid type" );
rValue >>= m_aLabel;
break;
case PROPERTY_ID_WIDTH:
@@ -477,7 +477,7 @@ void OGridColumn::write(const Reference<XObjectOutputStream>& _rxOutStream)
_rxOutStream->writeShort(0x0002);
sal_uInt16 nAnyMask = 0;
- if (m_aWidth.getValueType().getTypeClass() == TypeClass_LONG)
+ if (m_aWidth.getValueTypeClass() == TypeClass_LONG)
nAnyMask |= WIDTH;
if (m_aAlign.getValueTypeClass() == TypeClass_SHORT)
diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx
index 9e2d60a7d75b..1e5c327539a0 100644
--- a/forms/source/component/ComboBox.cxx
+++ b/forms/source/component/ComboBox.cxx
@@ -203,7 +203,7 @@ void OComboBoxModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const
break;
case PROPERTY_ID_LISTSOURCE :
- DBG_ASSERT(_rValue.getValueType().getTypeClass() == TypeClass_STRING,
+ DBG_ASSERT(_rValue.getValueTypeClass() == TypeClass_STRING,
"OComboBoxModel::setFastPropertyValue_NoBroadcast : invalid type !" );
_rValue >>= m_aListSource;
// The ListSource has changed -> reload
@@ -217,13 +217,13 @@ void OComboBoxModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const
break;
case PROPERTY_ID_EMPTY_IS_NULL :
- DBG_ASSERT(_rValue.getValueType().getTypeClass() == TypeClass_BOOLEAN,
+ DBG_ASSERT(_rValue.getValueTypeClass() == TypeClass_BOOLEAN,
"OComboBoxModel::setFastPropertyValue_NoBroadcast : invalid type !" );
_rValue >>= m_bEmptyIsNull;
break;
case PROPERTY_ID_DEFAULT_TEXT :
- DBG_ASSERT(_rValue.getValueType().getTypeClass() == TypeClass_STRING,
+ DBG_ASSERT(_rValue.getValueTypeClass() == TypeClass_STRING,
"OComboBoxModel::setFastPropertyValue_NoBroadcast : invalid type !" );
_rValue >>= m_aDefaultText;
resetNoBroadcast();
@@ -339,7 +339,7 @@ void SAL_CALL OComboBoxModel::write(const Reference<css::io::XObjectOutputStream
// Mask for Any
sal_uInt16 nAnyMask = 0;
- if (m_aBoundColumn.getValueType().getTypeClass() == TypeClass_SHORT)
+ if (m_aBoundColumn.getValueTypeClass() == TypeClass_SHORT)
nAnyMask |= BOUNDCOLUMN;
_rxOutStream << nAnyMask;
diff --git a/forms/source/component/Currency.cxx b/forms/source/component/Currency.cxx
index edd86eeabd8a..fa106da8483e 100644
--- a/forms/source/component/Currency.cxx
+++ b/forms/source/component/Currency.cxx
@@ -184,7 +184,7 @@ bool OCurrencyModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
Any aControlValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) );
if ( aControlValue != m_aSaveValue )
{
- if ( aControlValue.getValueType().getTypeClass() == TypeClass_VOID )
+ if ( aControlValue.getValueTypeClass() == TypeClass_VOID )
m_xColumnUpdate->updateNull();
else
{
@@ -216,7 +216,7 @@ Any OCurrencyModel::translateDbColumnToControlValue()
Any OCurrencyModel::getDefaultForReset() const
{
Any aValue;
- if ( m_aDefault.getValueType().getTypeClass() == TypeClass_DOUBLE )
+ if ( m_aDefault.getValueTypeClass() == TypeClass_DOUBLE )
aValue = m_aDefault;
return aValue;
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index ce12e1c4f184..e68551c9fd5b 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -622,7 +622,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
// Special treatment for multiline edit only if we have a control for it
Any aTmp = xComponentSet->getPropertyValue( PROPERTY_MULTILINE );
bool bMulti = rxSubmitButton.is()
- && (aTmp.getValueType().getTypeClass() == TypeClass_BOOLEAN)
+ && (aTmp.getValueTypeClass() == TypeClass_BOOLEAN)
&& getBOOL(aTmp);
OUString sText;
if ( bMulti ) // For multiline edit, get the text at the control
@@ -1398,7 +1398,7 @@ void ODatabaseForm::fire( sal_Int32* pnHandles, const Any* pNewValues, const Any
if (pnHandles[nPos] == PROPERTY_ID_ISMODIFIED)
break;
- if ((nPos < nCount) && (pNewValues[nPos].getValueType().getTypeClass() == TypeClass_BOOLEAN) && getBOOL(pNewValues[nPos]))
+ if ((nPos < nCount) && (pNewValues[nPos].getValueTypeClass() == TypeClass_BOOLEAN) && getBOOL(pNewValues[nPos]))
{ // yeah, we found it, and it changed to TRUE
if (nPos == 0)
{ // just cut the first element
diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx
index e4d477bdd020..c474c168fed0 100644
--- a/forms/source/component/Edit.cxx
+++ b/forms/source/component/Edit.cxx
@@ -541,7 +541,7 @@ void OEditModel::read(const Reference<XObjectInputStream>& _rxInStream)
if (m_xAggregateSet.is())
{
Any aDefaultControl = m_xAggregateSet->getPropertyValue(PROPERTY_DEFAULTCONTROL);
- if ( (aDefaultControl.getValueType().getTypeClass() == TypeClass_STRING)
+ if ( (aDefaultControl.getValueTypeClass() == TypeClass_STRING)
&& (getString(aDefaultControl) == STARDIV_ONE_FORM_CONTROL_TEXTFIELD )
)
{
diff --git a/forms/source/component/EditBase.cxx b/forms/source/component/EditBase.cxx
index 251c54b147c3..41c256e9c120 100644
--- a/forms/source/component/EditBase.cxx
+++ b/forms/source/component/EditBase.cxx
@@ -96,9 +96,9 @@ void OEditBaseModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
// Masking for any
sal_uInt16 nAnyMask = 0;
- if (m_aDefault.getValueType().getTypeClass() == TypeClass_LONG)
+ if (m_aDefault.getValueTypeClass() == TypeClass_LONG)
nAnyMask |= DEFAULT_LONG;
- else if (m_aDefault.getValueType().getTypeClass() == TypeClass_DOUBLE)
+ else if (m_aDefault.getValueTypeClass() == TypeClass_DOUBLE)
nAnyMask |= DEFAULT_DOUBLE;
else if (m_aDefault.getValueType() == cppu::UnoType<util::Time>::get())
nAnyMask |= DEFAULT_TIME;
@@ -322,16 +322,16 @@ void OEditBaseModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const
switch (nHandle)
{
case PROPERTY_ID_EMPTY_IS_NULL:
- DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_BOOLEAN, "invalid type" );
+ DBG_ASSERT(rValue.getValueTypeClass() == TypeClass_BOOLEAN, "invalid type" );
m_bEmptyIsNull = getBOOL(rValue);
break;
case PROPERTY_ID_FILTERPROPOSAL:
- DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_BOOLEAN, "invalid type" );
+ DBG_ASSERT(rValue.getValueTypeClass() == TypeClass_BOOLEAN, "invalid type" );
m_bFilterProposal = getBOOL(rValue);
break;
// Changing the default values causes a reset
case PROPERTY_ID_DEFAULT_TEXT:
- DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_STRING, "invalid type" );
+ DBG_ASSERT(rValue.getValueTypeClass() == TypeClass_STRING, "invalid type" );
rValue >>= m_aDefaultText;
resetNoBroadcast();
break;
diff --git a/forms/source/component/File.cxx b/forms/source/component/File.cxx
index 51e1ac47e970..a4533403c129 100644
--- a/forms/source/component/File.cxx
+++ b/forms/source/component/File.cxx
@@ -151,7 +151,7 @@ void OFileControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, cons
switch (nHandle)
{
case PROPERTY_ID_DEFAULT_TEXT :
- DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_STRING, "OFileControlModel::setFastPropertyValue_NoBroadcast : invalid type !" );
+ DBG_ASSERT(rValue.getValueTypeClass() == TypeClass_STRING, "OFileControlModel::setFastPropertyValue_NoBroadcast : invalid type !" );
rValue >>= m_sDefaultValue;
break;
default:
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index 33d698c6de26..520bdffc7799 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -420,7 +420,7 @@ void OFormattedModel::_propertyChanged( const css::beans::PropertyChangeEvent& e
if ( evt.PropertyName == PROPERTY_FORMATKEY )
{
- if ( evt.NewValue.getValueType().getTypeClass() == TypeClass_LONG )
+ if ( evt.NewValue.getValueTypeClass() == TypeClass_LONG )
{
try
{
@@ -634,7 +634,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
if (m_xAggregateSet.is())
{
Any aSupplier = m_xAggregateSet->getPropertyValue(PROPERTY_FORMATSSUPPLIER);
- if (aSupplier.getValueType().getTypeClass() != TypeClass_VOID)
+ if (aSupplier.getValueTypeClass() != TypeClass_VOID)
{
OSL_VERIFY( aSupplier >>= xSupplier );
}
@@ -687,7 +687,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
}
{
OStreamSection aDownCompat2(_rxOutStream);
- switch (aEffectiveValue.getValueType().getTypeClass())
+ switch (aEffectiveValue.getValueTypeClass())
{
case TypeClass_STRING:
_rxOutStream->writeShort(0x0000);
@@ -809,7 +809,7 @@ bool OFormattedModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
// empty string + EmptyIsNull = void
if ( !aControlValue.hasValue()
- || ( ( aControlValue.getValueType().getTypeClass() == TypeClass_STRING )
+ || ( ( aControlValue.getValueTypeClass() == TypeClass_STRING )
&& getString( aControlValue ).isEmpty()
&& m_bEmptyIsNull
)
@@ -820,13 +820,13 @@ bool OFormattedModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
try
{
double f = 0.0;
- if ( aControlValue.getValueType().getTypeClass() == TypeClass_DOUBLE || (aControlValue >>= f)) // #i110323
+ if ( aControlValue.getValueTypeClass() == TypeClass_DOUBLE || (aControlValue >>= f)) // #i110323
{
DBTypeConversion::setValue( m_xColumnUpdate, m_aNullDate, getDouble( aControlValue ), m_nKeyType );
}
else
{
- DBG_ASSERT( aControlValue.getValueType().getTypeClass() == TypeClass_STRING, "OFormattedModel::commitControlValueToDbColumn: invalid value type!" );
+ DBG_ASSERT( aControlValue.getValueTypeClass() == TypeClass_STRING, "OFormattedModel::commitControlValueToDbColumn: invalid value type!" );
m_xColumnUpdate->updateString( getString( aControlValue ) );
}
}
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index 6040549af736..18e52ff7eb9d 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -512,7 +512,7 @@ sal_Bool OGridControlModel::convertFastPropertyValue( Any& rConvertedValue, Any&
case PROPERTY_ID_CURSORCOLOR:
if (!rValue.hasValue() || !m_aCursorColor.hasValue())
{
- if (rValue.hasValue() && (TypeClass_LONG != rValue.getValueType().getTypeClass()))
+ if (rValue.hasValue() && (TypeClass_LONG != rValue.getValueTypeClass()))
{
throw IllegalArgumentException();
}
@@ -790,15 +790,15 @@ void OGridControlModel::write(const Reference<XObjectOutputStream>& _rxOutStream
// 4. Attributes
// Masking for all 'any' types
sal_uInt16 nAnyMask = 0;
- if (m_aRowHeight.getValueType().getTypeClass() == TypeClass_LONG)
+ if (m_aRowHeight.getValueTypeClass() == TypeClass_LONG)
nAnyMask |= ROWHEIGHT;
if ( getFont() != getDefaultFont() )
nAnyMask |= FONTATTRIBS | FONTSIZE | FONTTYPE | FONTDESCRIPTOR;
- if (m_aTabStop.getValueType().getTypeClass() == TypeClass_BOOLEAN)
+ if (m_aTabStop.getValueTypeClass() == TypeClass_BOOLEAN)
nAnyMask |= TABSTOP;
if ( hasTextColor() )
nAnyMask |= TEXTCOLOR;
- if (m_aBackgroundColor.getValueType().getTypeClass() == TypeClass_LONG)
+ if (m_aBackgroundColor.getValueTypeClass() == TypeClass_LONG)
nAnyMask |= BACKGROUNDCOLOR;
if (!m_bRecordMarker)
nAnyMask |= RECORDMARKER;
diff --git a/forms/source/component/Hidden.cxx b/forms/source/component/Hidden.cxx
index 1f9ab4fcf6d3..3891bbe9d31a 100644
--- a/forms/source/component/Hidden.cxx
+++ b/forms/source/component/Hidden.cxx
@@ -81,7 +81,7 @@ void OHiddenModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const An
switch (_nHandle)
{
case PROPERTY_ID_HIDDEN_VALUE :
- DBG_ASSERT(_rValue.getValueType().getTypeClass() == TypeClass_STRING, "OHiddenModel::setFastPropertyValue_NoBroadcast : invalid type !" );
+ DBG_ASSERT(_rValue.getValueTypeClass() == TypeClass_STRING, "OHiddenModel::setFastPropertyValue_NoBroadcast : invalid type !" );
_rValue >>= m_sHiddenValue;
break;
default:
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index ba999944a2d1..fc879ed06450 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -248,7 +248,7 @@ void OImageControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, con
switch (nHandle)
{
case PROPERTY_ID_READONLY :
- DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_BOOLEAN, "OImageControlModel::setFastPropertyValue_NoBroadcast : invalid type !" );
+ DBG_ASSERT(rValue.getValueTypeClass() == TypeClass_BOOLEAN, "OImageControlModel::setFastPropertyValue_NoBroadcast : invalid type !" );
m_bReadOnly = getBOOL(rValue);
break;
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index d2371e4e5a18..1b54c674ef99 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -299,7 +299,7 @@ namespace frm
switch (_nHandle)
{
case PROPERTY_ID_BOUNDCOLUMN :
- DBG_ASSERT((_rValue.getValueType().getTypeClass() == TypeClass_SHORT) || (_rValue.getValueType().getTypeClass() == TypeClass_VOID),
+ DBG_ASSERT((_rValue.getValueTypeClass() == TypeClass_SHORT) || (_rValue.getValueTypeClass() == TypeClass_VOID),
"OListBoxModel::setFastPropertyValue_NoBroadcast : invalid type !" );
m_aBoundColumn = _rValue;
break;
@@ -570,7 +570,7 @@ namespace frm
// Masking for any
sal_uInt16 nAnyMask = 0;
- if (m_aBoundColumn.getValueType().getTypeClass() != TypeClass_VOID)
+ if (m_aBoundColumn.getValueTypeClass() != TypeClass_VOID)
nAnyMask |= BOUNDCOLUMN;
_rxOutStream << nAnyMask;
@@ -745,7 +745,7 @@ namespace frm
}
::std::optional< sal_Int16 > aBoundColumn(std::nullopt);
- if ( m_aBoundColumn.getValueType().getTypeClass() == TypeClass_SHORT )
+ if ( m_aBoundColumn.getValueTypeClass() == TypeClass_SHORT )
{
sal_Int16 nBoundColumn( 0 );
m_aBoundColumn >>= nBoundColumn;
diff --git a/forms/source/component/Numeric.cxx b/forms/source/component/Numeric.cxx
index b3465d7c940c..fd1697c296b0 100644
--- a/forms/source/component/Numeric.cxx
+++ b/forms/source/component/Numeric.cxx
@@ -165,7 +165,7 @@ Any ONumericModel::translateDbColumnToControlValue()
Any ONumericModel::getDefaultForReset() const
{
Any aValue;
- if (m_aDefault.getValueType().getTypeClass() == TypeClass_DOUBLE)
+ if (m_aDefault.getValueTypeClass() == TypeClass_DOUBLE)
aValue = m_aDefault;
return aValue;
diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx
index 8c16660c731d..5c95ef6be5fe 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -606,17 +606,17 @@ namespace frm
break;
case PROPERTY_ID_TARGET_URL :
- DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_STRING, "OClickableImageBaseModel::setFastPropertyValue_NoBroadcast : invalid type !" );
+ DBG_ASSERT(rValue.getValueTypeClass() == TypeClass_STRING, "OClickableImageBaseModel::setFastPropertyValue_NoBroadcast : invalid type !" );
rValue >>= m_sTargetURL;
break;
case PROPERTY_ID_TARGET_FRAME :
- DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_STRING, "OClickableImageBaseModel::setFastPropertyValue_NoBroadcast : invalid type !" );
+ DBG_ASSERT(rValue.getValueTypeClass() == TypeClass_STRING, "OClickableImageBaseModel::setFastPropertyValue_NoBroadcast : invalid type !" );
rValue >>= m_sTargetFrame;
break;
case PROPERTY_ID_DISPATCHURLINTERNAL:
- DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_BOOLEAN, "OClickableImageBaseModel::setFastPropertyValue_NoBroadcast : invalid type !" );
+ DBG_ASSERT(rValue.getValueTypeClass() == TypeClass_BOOLEAN, "OClickableImageBaseModel::setFastPropertyValue_NoBroadcast : invalid type !" );
rValue >>= m_bDispatchUrlInternal;
break;
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx
index 758cae8a1de4..67ef5bfec6e2 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -1097,7 +1097,7 @@ void SAL_CALL OInterfaceContainer::replaceByName(const OUString& Name, const Any
if (aPair.first == aPair.second)
throw NoSuchElementException();
- if (Element.getValueType().getTypeClass() != TypeClass_INTERFACE)
+ if (Element.getValueTypeClass() != TypeClass_INTERFACE)
throw IllegalArgumentException();
Reference<XPropertySet> xSet;