NamedPropertyValuesContainer.cxx (dde7d3fa) | NamedPropertyValuesContainer.cxx (e2530cf9) |
---|---|
1/************************************************************** | 1/************************************************************** |
2 * | 2 * |
3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at | 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at |
10 * | 10 * |
11 * http://www.apache.org/licenses/LICENSE-2.0 | 11 * http://www.apache.org/licenses/LICENSE-2.0 |
12 * | 12 * |
13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. | 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. |
19 * | 19 * |
20 *************************************************************/ 21 22 23 24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_comphelper.hxx" 26 27#include "comphelper_module.hxx" --- 23 unchanged lines hidden (view full) --- 51 // XNameContainer 52 virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) 53 throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, 54 ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 55 virtual void SAL_CALL removeByName( const ::rtl::OUString& Name ) 56 throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, 57 ::com::sun::star::uno::RuntimeException); 58 | 20 *************************************************************/ 21 22 23 24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_comphelper.hxx" 26 27#include "comphelper_module.hxx" --- 23 unchanged lines hidden (view full) --- 51 // XNameContainer 52 virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) 53 throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, 54 ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 55 virtual void SAL_CALL removeByName( const ::rtl::OUString& Name ) 56 throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, 57 ::com::sun::star::uno::RuntimeException); 58 |
59 // XNameReplace | 59 // XNameReplace |
60 virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) 61 throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, 62 ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 63 | 60 virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) 61 throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, 62 ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 63 |
64 // XNameAccess | 64 // XNameAccess |
65 virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) 66 throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, 67 ::com::sun::star::uno::RuntimeException); 68 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) 69 throw(::com::sun::star::uno::RuntimeException); 70 virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) 71 throw(::com::sun::star::uno::RuntimeException); 72 73 // XElementAccess 74 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) 75 throw(::com::sun::star::uno::RuntimeException); 76 virtual sal_Bool SAL_CALL hasElements( ) 77 throw(::com::sun::star::uno::RuntimeException); 78 79 //XServiceInfo 80 virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); 81 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); 82 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); 83 | 65 virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) 66 throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, 67 ::com::sun::star::uno::RuntimeException); 68 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) 69 throw(::com::sun::star::uno::RuntimeException); 70 virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) 71 throw(::com::sun::star::uno::RuntimeException); 72 73 // XElementAccess 74 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) 75 throw(::com::sun::star::uno::RuntimeException); 76 virtual sal_Bool SAL_CALL hasElements( ) 77 throw(::com::sun::star::uno::RuntimeException); 78 79 //XServiceInfo 80 virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); 81 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); 82 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); 83 |
84 // XServiceInfo - static versions (used for component registration) 85 static ::rtl::OUString SAL_CALL getImplementationName_static(); 86 static uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_static(); 87 static uno::Reference< uno::XInterface > SAL_CALL Create( const uno::Reference< uno::XComponentContext >& ); | 84 // XServiceInfo - static versions (used for component registration) 85 static ::rtl::OUString SAL_CALL getImplementationName_static(); 86 static uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_static(); 87 static uno::Reference< uno::XInterface > SAL_CALL Create( const uno::Reference< uno::XComponentContext >& ); |
88 89private: 90 NamedPropertyValues maProperties; 91}; 92 93NamedPropertyValuesContainer::NamedPropertyValuesContainer() throw() 94{ 95} --- 9 unchanged lines hidden (view full) --- 105{ 106 if( maProperties.find( aName ) != maProperties.end() ) 107 throw container::ElementExistException(); 108 109 uno::Sequence<beans::PropertyValue> aProps; 110 if( !(aElement >>= aProps ) ) 111 throw lang::IllegalArgumentException(); 112 | 88 89private: 90 NamedPropertyValues maProperties; 91}; 92 93NamedPropertyValuesContainer::NamedPropertyValuesContainer() throw() 94{ 95} --- 9 unchanged lines hidden (view full) --- 105{ 106 if( maProperties.find( aName ) != maProperties.end() ) 107 throw container::ElementExistException(); 108 109 uno::Sequence<beans::PropertyValue> aProps; 110 if( !(aElement >>= aProps ) ) 111 throw lang::IllegalArgumentException(); 112 |
113 maProperties.insert( NamedPropertyValues::value_type(aName ,aProps) ); | 113 maProperties.insert( NamedPropertyValues::value_type(aName ,aProps) ); |
114} 115 116void SAL_CALL NamedPropertyValuesContainer::removeByName( const ::rtl::OUString& Name ) 117 throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, 118 ::com::sun::star::uno::RuntimeException) 119{ 120 NamedPropertyValues::iterator aIter = maProperties.find( Name ); 121 if( aIter == maProperties.end() ) --- 97 unchanged lines hidden (view full) --- 219::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL NamedPropertyValuesContainer::getSupportedServiceNames_static( ) 220{ 221 const rtl::OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.NamedPropertyValues" ) ); 222 const uno::Sequence< rtl::OUString > aSeq( &aServiceName, 1 ); 223 return aSeq; 224} 225 226uno::Reference< uno::XInterface > SAL_CALL NamedPropertyValuesContainer::Create( | 114} 115 116void SAL_CALL NamedPropertyValuesContainer::removeByName( const ::rtl::OUString& Name ) 117 throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, 118 ::com::sun::star::uno::RuntimeException) 119{ 120 NamedPropertyValues::iterator aIter = maProperties.find( Name ); 121 if( aIter == maProperties.end() ) --- 97 unchanged lines hidden (view full) --- 219::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL NamedPropertyValuesContainer::getSupportedServiceNames_static( ) 220{ 221 const rtl::OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.NamedPropertyValues" ) ); 222 const uno::Sequence< rtl::OUString > aSeq( &aServiceName, 1 ); 223 return aSeq; 224} 225 226uno::Reference< uno::XInterface > SAL_CALL NamedPropertyValuesContainer::Create( |
227 const uno::Reference< uno::XComponentContext >&) | 227 const uno::Reference< uno::XComponentContext >&) |
228{ 229 return (cppu::OWeakObject*)new NamedPropertyValuesContainer(); 230} 231 232void createRegistryInfo_NamedPropertyValuesContainer() 233{ | 228{ 229 return (cppu::OWeakObject*)new NamedPropertyValuesContainer(); 230} 231 232void createRegistryInfo_NamedPropertyValuesContainer() 233{ |
234 static ::comphelper::module::OAutoRegistration< NamedPropertyValuesContainer > aAutoRegistration; | 234 static ::comphelper::module::OAutoRegistration< NamedPropertyValuesContainer > aAutoRegistration; |
235} | 235} |