diff options
author | Noel Grandin <noel@peralex.com> | 2013-03-20 09:16:19 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-04-08 13:53:02 +0200 |
commit | 3cfecf8427c529c7c1d32be2b361934b63fa6933 (patch) | |
tree | 0eed4fbb77434a558dd48234a95b099a9ada534b /dbaccess | |
parent | fdo#46808, convert sdb::tools::ConnectionTools to new style (diff) | |
download | core-3cfecf8427c529c7c1d32be2b361934b63fa6933.tar.gz core-3cfecf8427c529c7c1d32be2b361934b63fa6933.zip |
fdo#46808, Convert beans::PropertyBag to new style
Change-Id: Ibb2466af4c9289cba93b8330d10db033d296bfc1
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/dataaccess/ModelImpl.cxx | 13 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/ModelImpl.hxx | 4 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/datasource.cxx | 2 |
3 files changed, 8 insertions, 11 deletions
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx index 882f7863da7c..95af6b73e65b 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.cxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx @@ -30,17 +30,18 @@ #include "userinformation.hxx" #include "sdbcoretools.hxx" +#include <com/sun/star/beans/PropertyBag.hpp> #include <com/sun/star/container/XSet.hpp> #include <com/sun/star/document/MacroExecMode.hpp> -#include <com/sun/star/frame/GlobalEventBroadcaster.hpp> #include <com/sun/star/embed/XTransactedObject.hpp> #include <com/sun/star/embed/XTransactionBroadcaster.hpp> #include <com/sun/star/embed/StorageFactory.hpp> +#include <com/sun/star/form/XLoadable.hpp> +#include <com/sun/star/frame/GlobalEventBroadcaster.hpp> +#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <com/sun/star/sdb/BooleanComparisonMode.hpp> #include <com/sun/star/script/DocumentScriptLibraryContainer.hpp> #include <com/sun/star/script/DocumentDialogLibraryContainer.hpp> -#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> -#include <com/sun/star/form/XLoadable.hpp> #include <com/sun/star/util/NumberFormatsSupplier.hpp> #include <comphelper/interaction.hxx> @@ -488,11 +489,7 @@ void ODatabaseModelImpl::impl_construct_nothrow() *pAllowedType++ = ::getCppuType( static_cast< sal_Int16* >( NULL ) ); *pAllowedType++ = ::getCppuType( static_cast< Sequence< Any >* >( NULL ) ); - Sequence< Any > aInitArgs( 2 ); - aInitArgs[0] <<= NamedValue("AutomaticAddition", makeAny( (sal_Bool)sal_True )); - aInitArgs[1] <<= NamedValue("AllowedTypes", makeAny( aAllowedTypes )); - - m_xSettings.set( m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.beans.PropertyBag", aInitArgs, m_aContext), UNO_QUERY_THROW ); + m_xSettings = PropertyBag::createWithTypes( m_aContext, aAllowedTypes, sal_False/*AllowEmptyPropertyName*/, sal_True/*AutomaticAddition*/ ); // insert the default settings Reference< XPropertyContainer > xContainer( m_xSettings, UNO_QUERY_THROW ); diff --git a/dbaccess/source/core/dataaccess/ModelImpl.hxx b/dbaccess/source/core/dataaccess/ModelImpl.hxx index 49f6a10efdc6..fa595648336c 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.hxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.hxx @@ -28,7 +28,7 @@ #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/beans/XPropertyAccess.hpp> +#include <com/sun/star/beans/XPropertyBag.hpp> #include <com/sun/star/container/XContainerListener.hpp> #include <com/sun/star/document/XDocumentSubStorageSupplier.hpp> #include <com/sun/star/document/XEventListener.hpp> @@ -245,7 +245,7 @@ public: sal_Bool m_bSuppressVersionColumns : 1; sal_Bool m_bModified : 1; sal_Bool m_bDocumentReadOnly : 1; - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyAccess > + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyBag > m_xSettings; ::com::sun::star::uno::Sequence< OUString > m_aTableFilter; ::com::sun::star::uno::Sequence< OUString > m_aTableTypeFilter; diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index 9e9d4fee411d..2b3147b82120 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -880,7 +880,7 @@ namespace @param _rAllNewPropertyValues the new property values to set for the bag */ - void lcl_setPropertyValues_resetOrRemoveOther( const Reference< XPropertyAccess >& _rxPropertyBag, const Sequence< PropertyValue >& _rAllNewPropertyValues ) + void lcl_setPropertyValues_resetOrRemoveOther( const Reference< XPropertyBag >& _rxPropertyBag, const Sequence< PropertyValue >& _rAllNewPropertyValues ) { // sequences are ugly to operate on typedef ::std::set< OUString > StringSet; |