summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-08-19 13:45:01 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-08-19 14:48:27 +0200
commitd0f18382c59a54fcbbe8419b43e264a0c48fa6ec (patch)
treead6d215d7e5d14e2ed7d9e61964d9374c28fba1a
parent7a57765241b8e9b57273f7548445ea57a1f44401 (diff)
comphelper::isA(Any... -> Any::has
Change-Id: I4fdc77c6fde93d9d1ee814f7614a1c4c81e18247
-rw-r--r--forms/source/component/FormattedField.cxx6
-rw-r--r--forms/source/component/clickableimage.cxx2
-rw-r--r--include/comphelper/types.hxx12
3 files changed, 4 insertions, 16 deletions
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index 5a91466a6561..036605d0df7d 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -208,7 +208,7 @@ void OFormattedControl::keyPressed(const ::com::sun::star::awt::KeyEvent& e) thr
if( !xFormSet.is() )
return;
Any aTmp(xFormSet->getPropertyValue( PROPERTY_TARGET_URL ));
- if (!isA(aTmp, static_cast< OUString* >(NULL)) ||
+ if (!aTmp.has<OUString>() ||
getString(aTmp).isEmpty() )
return;
Reference<XIndexAccess> xElements(xParent, UNO_QUERY);
@@ -690,8 +690,8 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
if (hasProperty(s_aLocaleProp, xFormat))
{
Any aLocale = xFormat->getPropertyValue(s_aLocaleProp);
- DBG_ASSERT(isA(aLocale, static_cast<Locale*>(NULL)), "OFormattedModel::write : invalid language property !");
- if (isA(aLocale, static_cast<Locale*>(NULL)))
+ DBG_ASSERT(aLocale.has<Locale>(), "OFormattedModel::write : invalid language property !");
+ if (aLocale.has<Locale>())
{
Locale const * pLocale = static_cast<Locale const *>(aLocale.getValue());
eFormatLanguage = LanguageTag::convertToLanguageType( *pLocale, false);
diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx
index 0001bf6836d5..7490d3953755 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -628,7 +628,7 @@ namespace frm
switch (nHandle)
{
case PROPERTY_ID_BUTTONTYPE :
- DBG_ASSERT(isA(rValue, static_cast<FormButtonType*>(NULL)), "OClickableImageBaseModel::setFastPropertyValue_NoBroadcast : invalid type !" );
+ DBG_ASSERT(rValue.has<FormButtonType>(), "OClickableImageBaseModel::setFastPropertyValue_NoBroadcast : invalid type !" );
rValue >>= m_eButtonType;
break;
diff --git a/include/comphelper/types.hxx b/include/comphelper/types.hxx
index feeb522c284c..561144601091 100644
--- a/include/comphelper/types.hxx
+++ b/include/comphelper/types.hxx
@@ -69,18 +69,6 @@ namespace comphelper
return _rType.equals(cppu::getTypeFavourUnsigned(pDummy));
}
-
- /** check if a type you have at hand at runtime is equal to another type you have at compile time
- same comment as for the other isA ....
- */
- template <class TYPE>
- bool isA(const css::uno::Any& _rVal, TYPE* pDummy)
- {
- return _rVal.getValueType().equals(
- cppu::getTypeFavourUnsigned(pDummy));
- }
-
-
/** check if a type you have at hand at runtime is equal to another type you have at compile time
*/
template <class TYPE>