summaryrefslogtreecommitdiff
path: root/toolkit
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 /toolkit
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 'toolkit')
-rw-r--r--toolkit/source/awt/vclxcontainer.cxx2
-rw-r--r--toolkit/source/awt/vclxwindow.cxx2
-rw-r--r--toolkit/source/awt/vclxwindows.cxx42
-rw-r--r--toolkit/source/controls/unocontrolmodel.cxx10
4 files changed, 28 insertions, 28 deletions
diff --git a/toolkit/source/awt/vclxcontainer.cxx b/toolkit/source/awt/vclxcontainer.cxx
index ba0a62c716eb..e7be48ed2894 100644
--- a/toolkit/source/awt/vclxcontainer.cxx
+++ b/toolkit/source/awt/vclxcontainer.cxx
@@ -126,7 +126,7 @@ void VCLXContainer::setTabOrder( const css::uno::Sequence< css::uno::Reference<
WinBits nStyle = pWin->GetStyle();
nStyle &= ~(WB_TABSTOP|WB_NOTABSTOP|WB_GROUP);
- if ( pTabs[n].getValueType().getTypeClass() == css::uno::TypeClass_BOOLEAN )
+ if ( pTabs[n].getValueTypeClass() == css::uno::TypeClass_BOOLEAN )
{
bool bTab = false;
pTabs[n] >>= bTab;
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 20ddba055804..79b21ebfa4d3 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -1403,7 +1403,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
if ( !pWindow )
return;
- bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
+ bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
WindowType eWinType = pWindow->GetType();
sal_uInt16 nPropType = GetPropertyId( PropertyName );
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index f1162b68cf56..c5f4ededd2e6 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -1865,7 +1865,7 @@ void VCLXListBox::setProperty( const OUString& PropertyName, const css::uno::Any
case BASEPROPERTY_HIGHLIGHT_COLOR:
{
Color nColor = 0;
- bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
+ bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
if (bVoid)
{
nColor = Application::GetSettings().GetStyleSettings().GetHighlightColor();
@@ -1881,7 +1881,7 @@ void VCLXListBox::setProperty( const OUString& PropertyName, const css::uno::Any
case BASEPROPERTY_HIGHLIGHT_TEXT_COLOR:
{
Color nColor = 0;
- bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
+ bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
if (bVoid)
{
nColor = Application::GetSettings().GetStyleSettings().GetHighlightTextColor();
@@ -2335,7 +2335,7 @@ void SAL_CALL VCLXDialog::setProperty(
if ( !pDialog )
return;
- bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
+ bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
sal_uInt16 nPropType = GetPropertyId( PropertyName );
switch ( nPropType )
@@ -2459,7 +2459,7 @@ void SAL_CALL VCLXMultiPage::setProperty(
if ( !pTabControl )
return;
- bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
+ bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
sal_uInt16 nPropType = GetPropertyId( PropertyName );
switch ( nPropType )
@@ -2680,7 +2680,7 @@ void SAL_CALL VCLXTabPage::setProperty(
if ( !pTabPage )
return;
- bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
+ bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
sal_uInt16 nPropType = GetPropertyId( PropertyName );
switch ( nPropType )
@@ -3344,7 +3344,7 @@ void VCLXScrollBar::setProperty( const OUString& PropertyName, const css::uno::A
if ( !pScrollBar )
return;
- bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
+ bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
sal_uInt16 nPropType = GetPropertyId( PropertyName );
switch ( nPropType )
@@ -4141,7 +4141,7 @@ void VCLXComboBox::setProperty( const OUString& PropertyName, const css::uno::An
if ( !pComboBox )
return;
- bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
+ bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
sal_uInt16 nPropType = GetPropertyId( PropertyName );
switch ( nPropType )
{
@@ -4639,7 +4639,7 @@ void VCLXDateField::setProperty( const OUString& PropertyName, const css::uno::A
if ( !(GetWindow()) )
return;
- bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
+ bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
sal_uInt16 nPropType = GetPropertyId( PropertyName );
switch ( nPropType )
@@ -5109,7 +5109,7 @@ void VCLXTimeField::setProperty( const OUString& PropertyName, const css::uno::A
if ( !(GetWindow()) )
return;
- bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
+ bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
sal_uInt16 nPropType = GetPropertyId( PropertyName );
switch ( nPropType )
@@ -5425,7 +5425,7 @@ void VCLXNumericField::setProperty( const OUString& PropertyName, const css::uno
if ( !(GetWindow()) )
return;
- bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
+ bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
sal_uInt16 nPropType = GetPropertyId( PropertyName );
switch ( nPropType )
@@ -6183,7 +6183,7 @@ void VCLXProgressBar::setProperty( const OUString& PropertyName, const css::uno:
VclPtr<vcl::Window> pWindow = GetWindow();
if ( pWindow )
{
- bool bVoid = Value.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
+ bool bVoid = Value.getValueTypeClass() == css::uno::TypeClass_VOID;
if ( bVoid )
{
@@ -6596,7 +6596,7 @@ void SVTXFormattedField::setProperty( const OUString& PropertyName, const css::u
case BASEPROPERTY_EFFECTIVE_VALUE:
case BASEPROPERTY_VALUE_DOUBLE:
{
- const css::uno::TypeClass rTC = Value.getValueType().getTypeClass();
+ const css::uno::TypeClass rTC = Value.getValueTypeClass();
if (rTC != css::uno::TypeClass_STRING)
// no string
if (rTC != css::uno::TypeClass_DOUBLE)
@@ -6733,7 +6733,7 @@ css::uno::Any SVTXFormattedField::convertEffectiveValue(const css::uno::Any& rVa
return aReturn;
Formatter& rFieldFormatter = pField->GetFormatter();
- switch (rValue.getValueType().getTypeClass())
+ switch (rValue.getValueTypeClass())
{
case css::uno::TypeClass_DOUBLE:
if (rFieldFormatter.TreatingAsNumber())
@@ -6791,7 +6791,7 @@ void SVTXFormattedField::SetMinValue(const css::uno::Any& rValue)
return;
Formatter& rFormatter = pField->GetFormatter();
- switch (rValue.getValueType().getTypeClass())
+ switch (rValue.getValueTypeClass())
{
case css::uno::TypeClass_DOUBLE:
@@ -6802,8 +6802,8 @@ void SVTXFormattedField::SetMinValue(const css::uno::Any& rValue)
break;
}
default:
- DBG_ASSERT(rValue.getValueType().getTypeClass() == css::uno::TypeClass_VOID, "SVTXFormattedField::SetMinValue : invalid argument (an exception will be thrown) !");
- if ( rValue.getValueType().getTypeClass() != css::uno::TypeClass_VOID )
+ DBG_ASSERT(rValue.getValueTypeClass() == css::uno::TypeClass_VOID, "SVTXFormattedField::SetMinValue : invalid argument (an exception will be thrown) !");
+ if ( rValue.getValueTypeClass() != css::uno::TypeClass_VOID )
{
throw css::lang::IllegalArgumentException();
@@ -6834,7 +6834,7 @@ void SVTXFormattedField::SetMaxValue(const css::uno::Any& rValue)
return;
Formatter& rFormatter = pField->GetFormatter();
- switch (rValue.getValueType().getTypeClass())
+ switch (rValue.getValueTypeClass())
{
case css::uno::TypeClass_DOUBLE:
{
@@ -6844,7 +6844,7 @@ void SVTXFormattedField::SetMaxValue(const css::uno::Any& rValue)
break;
}
default:
- if (rValue.getValueType().getTypeClass() != css::uno::TypeClass_VOID)
+ if (rValue.getValueTypeClass() != css::uno::TypeClass_VOID)
{
throw css::lang::IllegalArgumentException();
@@ -6877,7 +6877,7 @@ void SVTXFormattedField::SetDefaultValue(const css::uno::Any& rValue)
css::uno::Any aConverted = convertEffectiveValue(rValue);
Formatter& rFormatter = pField->GetFormatter();
- switch (aConverted.getValueType().getTypeClass())
+ switch (aConverted.getValueTypeClass())
{
case css::uno::TypeClass_DOUBLE:
{
@@ -6968,7 +6968,7 @@ void SVTXFormattedField::SetValue(const css::uno::Any& rValue)
else
{
Formatter& rFormatter = pField->GetFormatter();
- if (rValue.getValueType().getTypeClass() == css::uno::TypeClass_DOUBLE )
+ if (rValue.getValueTypeClass() == css::uno::TypeClass_DOUBLE )
{
double d = 0.0;
rValue >>= d;
@@ -6976,7 +6976,7 @@ void SVTXFormattedField::SetValue(const css::uno::Any& rValue)
}
else
{
- DBG_ASSERT(rValue.getValueType().getTypeClass() == css::uno::TypeClass_STRING, "SVTXFormattedField::SetValue : invalid argument !");
+ DBG_ASSERT(rValue.getValueTypeClass() == css::uno::TypeClass_STRING, "SVTXFormattedField::SetValue : invalid argument !");
OUString sText;
rValue >>= sText;
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index 5a5fdfa05b11..08207a61ae64 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -549,7 +549,7 @@ void UnoControlModel::write( const css::uno::Reference< css::io::XObjectOutputSt
const css::uno::Any* pProp = &(maData[rProp]);
OutStream->writeShort( rProp );
- bool bVoid = pProp->getValueType().getTypeClass() == css::uno::TypeClass_VOID;
+ bool bVoid = pProp->getValueTypeClass() == css::uno::TypeClass_VOID;
OutStream->writeBoolean( bVoid );
@@ -1030,7 +1030,7 @@ css::uno::Sequence< OUString > UnoControlModel::getSupportedServiceNames( )
bool UnoControlModel::convertFastPropertyValue( std::unique_lock<std::mutex>& rGuard, Any & rConvertedValue, Any & rOldValue, sal_Int32 nPropId, const Any& rValue )
{
- bool bVoid = rValue.getValueType().getTypeClass() == css::uno::TypeClass_VOID;
+ bool bVoid = rValue.getValueTypeClass() == css::uno::TypeClass_VOID;
if ( bVoid )
{
rConvertedValue.clear();
@@ -1105,7 +1105,7 @@ bool UnoControlModel::convertFastPropertyValue( std::unique_lock<std::mutex>& rG
break;
case TypeClass_INTERFACE:
{
- if ( rValue.getValueType().getTypeClass() == TypeClass_INTERFACE )
+ if ( rValue.getValueTypeClass() == TypeClass_INTERFACE )
{
Reference< XInterface > xPure( rValue, UNO_QUERY );
if ( xPure.is() )
@@ -1133,7 +1133,7 @@ bool UnoControlModel::convertFastPropertyValue( std::unique_lock<std::mutex>& rG
"Unable to convert the given value for the property "
+ GetPropertyName( static_cast<sal_uInt16>(nPropId) )
+ ".\nExpected type: " + pDestType->getTypeName()
- + "\nFound type: " + rValue.getValueType().getTypeName(),
+ + "\nFound type: " + rValue.getValueTypeName(),
static_cast< css::beans::XPropertySet* >(this),
1);
}
@@ -1154,7 +1154,7 @@ void UnoControlModel::setFastPropertyValue_NoBroadcast( std::unique_lock<std::mu
const css::uno::Any* pProp = it == maData.end() ? nullptr : &(it->second);
ENSURE_OR_RETURN_VOID( pProp, "UnoControlModel::setFastPropertyValue_NoBroadcast: invalid property id!" );
- DBG_ASSERT( ( rValue.getValueType().getTypeClass() != css::uno::TypeClass_VOID ) || ( GetPropertyAttribs( static_cast<sal_uInt16>(nPropId) ) & css::beans::PropertyAttribute::MAYBEVOID ), "Property should not be VOID!" );
+ DBG_ASSERT( ( rValue.getValueTypeClass() != css::uno::TypeClass_VOID ) || ( GetPropertyAttribs( static_cast<sal_uInt16>(nPropId) ) & css::beans::PropertyAttribute::MAYBEVOID ), "Property should not be VOID!" );
maData[ nPropId ] = rValue;
}