summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2008-10-16 06:57:26 +0000
committerOliver Bolte <obo@openoffice.org>2008-10-16 06:57:26 +0000
commit52a7bbb9c5d88ee817b4e484696846adbc7b305e (patch)
treeadde4c342f768de61ddcf08959edb7cad3524f5b
parent647d8c8ead7db5860dc8207332e49fc4c912f4da (diff)
CWS-TOOLING: integrate CWS odbmacros3
-rw-r--r--comphelper/inc/comphelper/namedvaluecollection.hxx12
-rw-r--r--comphelper/source/misc/namedvaluecollection.cxx4
-rw-r--r--svtools/inc/svtools/wizardmachine.hxx2
-rw-r--r--svtools/source/config/eventcfg.cxx33
-rw-r--r--svtools/source/dialogs/roadmapwizard.cxx2
-rw-r--r--svtools/source/dialogs/wizardmachine.cxx2
6 files changed, 33 insertions, 22 deletions
diff --git a/comphelper/inc/comphelper/namedvaluecollection.hxx b/comphelper/inc/comphelper/namedvaluecollection.hxx
index 4b6c779ef3bc..e84f29f02580 100644
--- a/comphelper/inc/comphelper/namedvaluecollection.hxx
+++ b/comphelper/inc/comphelper/namedvaluecollection.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: namedvaluecollection.hxx,v $
- * $Revision: 1.11 $
+ * $Revision: 1.11.20.1 $
*
* This file is part of OpenOffice.org.
*
@@ -281,7 +281,7 @@ namespace comphelper
return aValues;
}
- /** returns a Sequence< Any >, as to be used for i.e. XInitialization::initialize
+ /** returns a Sequence< Any >, containing PropertyValues
*/
inline ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
getWrappedPropertyValues() const
@@ -289,6 +289,14 @@ namespace comphelper
return impl_wrap< ::com::sun::star::beans::PropertyValue >();
}
+ /** returns a Sequence< Any >, containing NamedValues
+ */
+ inline ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
+ getWrappedNamedValues() const
+ {
+ return impl_wrap< ::com::sun::star::beans::NamedValue >();
+ }
+
/** transforms the collection into a sequence of NamedValues
*/
inline ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >
diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx
index ca182a04e691..a644b072d303 100644
--- a/comphelper/source/misc/namedvaluecollection.cxx
+++ b/comphelper/source/misc/namedvaluecollection.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: namedvaluecollection.cxx,v $
- * $Revision: 1.12 $
+ * $Revision: 1.11.30.2 $
*
* This file is part of OpenOffice.org.
*
@@ -109,7 +109,7 @@ namespace comphelper
else if ( _rElements >>= aPropertyValue )
impl_assign( Sequence< PropertyValue >( &aPropertyValue, 1 ) );
else
- OSL_ENSURE( false, "NamedValueCollection::NamedValueCollection(Any): unsupported type!" );
+ OSL_ENSURE( !_rElements.hasValue(), "NamedValueCollection::NamedValueCollection(Any): unsupported type!" );
}
//--------------------------------------------------------------------
diff --git a/svtools/inc/svtools/wizardmachine.hxx b/svtools/inc/svtools/wizardmachine.hxx
index a4376cd21e3a..0e46215a978e 100644
--- a/svtools/inc/svtools/wizardmachine.hxx
+++ b/svtools/inc/svtools/wizardmachine.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: wizardmachine.hxx,v $
- * $Revision: 1.6 $
+ * $Revision: 1.4.10.2 $
*
* This file is part of OpenOffice.org.
*
diff --git a/svtools/source/config/eventcfg.cxx b/svtools/source/config/eventcfg.cxx
index 05c33b94e06f..ae2041356fd3 100644
--- a/svtools/source/config/eventcfg.cxx
+++ b/svtools/source/config/eventcfg.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: eventcfg.cxx,v $
- * $Revision: 1.8 $
+ * $Revision: 1.8.24.1 $
*
* This file is part of OpenOffice.org.
*
@@ -250,19 +250,13 @@ Any SAL_CALL GlobalEventConfig_Impl::getByName( const OUString& aName ) throw (c
}
else
{
- SupportedEventsVector::const_iterator vit = m_supportedEvents.begin();
- SupportedEventsVector::const_iterator vit_end = m_supportedEvents.end();
- for(;vit!=vit_end;++vit)
- {
- if(vit->equals(aName))
- {
- props[1].Value <<= OUString();
- break;
- }
- }
- if(vit==vit_end)
- throw container::NoSuchElementException( OUString::createFromAscii("No such element in event configuration"),
- Reference< XInterface > () );
+ // not yet accessed - is it a supported name?
+ SupportedEventsVector::const_iterator pos = ::std::find(
+ m_supportedEvents.begin(), m_supportedEvents.end(), aName );
+ if ( pos == m_supportedEvents.end() )
+ throw container::NoSuchElementException( aName, NULL );
+
+ props[1].Value <<= OUString();
}
aRet <<= props;
return aRet;
@@ -276,7 +270,16 @@ Sequence< OUString > SAL_CALL GlobalEventConfig_Impl::getElementNames( ) throw
sal_Bool SAL_CALL GlobalEventConfig_Impl::hasByName( const OUString& aName ) throw (RuntimeException)
{
- return ( m_eventBindingHash.find( aName ) != m_eventBindingHash.end() );
+ if ( m_eventBindingHash.find( aName ) != m_eventBindingHash.end() )
+ return sal_True;
+
+ // never accessed before - is it supported in general?
+ SupportedEventsVector::const_iterator pos = ::std::find(
+ m_supportedEvents.begin(), m_supportedEvents.end(), aName );
+ if ( pos != m_supportedEvents.end() )
+ return sal_True;
+
+ return sal_False;
}
Type SAL_CALL GlobalEventConfig_Impl::getElementType( ) throw (RuntimeException)
diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx
index 34b37455c3ea..a3654832814b 100644
--- a/svtools/source/dialogs/roadmapwizard.cxx
+++ b/svtools/source/dialogs/roadmapwizard.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: roadmapwizard.cxx,v $
- * $Revision: 1.21 $
+ * $Revision: 1.19.10.2 $
*
* This file is part of OpenOffice.org.
*
diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx
index 34231eebcbab..c436256a31c4 100644
--- a/svtools/source/dialogs/wizardmachine.cxx
+++ b/svtools/source/dialogs/wizardmachine.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: wizardmachine.cxx,v $
- * $Revision: 1.23 $
+ * $Revision: 1.21.10.2 $
*
* This file is part of OpenOffice.org.
*