dbtools.cxx (9b5730f6) dbtools.cxx (b597708b)
1/**************************************************************
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

--- 1752 unchanged lines hidden (view full) ---

1761 virtual Type SAL_CALL getElementType() throw(RuntimeException)
1762 {
1763 return m_xSource->getElementType();
1764 }
1765 virtual sal_Bool SAL_CALL hasElements( ) throw(RuntimeException)
1766 {
1767 if ( m_aSet.empty() )
1768 return m_xSource->hasElements();
1/**************************************************************
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

--- 1752 unchanged lines hidden (view full) ---

1761 virtual Type SAL_CALL getElementType() throw(RuntimeException)
1762 {
1763 return m_xSource->getElementType();
1764 }
1765 virtual sal_Bool SAL_CALL hasElements( ) throw(RuntimeException)
1766 {
1767 if ( m_aSet.empty() )
1768 return m_xSource->hasElements();
1769 return ::std::count(m_aSet.begin(),m_aSet.end(),false) != 0;
1769 return (::std::find(m_aSet.begin(),m_aSet.end(),false) != m_aSet.end());
1770 }
1771 // ::com::sun::star::container::XIndexAccess
1772 virtual sal_Int32 SAL_CALL getCount( ) throw(RuntimeException)
1773 {
1774 if ( m_aSet.empty() )
1775 return m_xSource->getCount();
1770 }
1771 // ::com::sun::star::container::XIndexAccess
1772 virtual sal_Int32 SAL_CALL getCount( ) throw(RuntimeException)
1773 {
1774 if ( m_aSet.empty() )
1775 return m_xSource->getCount();
1776 return ::std::count(m_aSet.begin(),m_aSet.end(),false);
1776 return std_bitset_count(m_aSet.begin(),m_aSet.end(),false);
1777 }
1778 virtual Any SAL_CALL getByIndex( sal_Int32 Index ) throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException)
1779 {
1780 if ( m_aSet.empty() )
1781 return m_xSource->getByIndex(Index);
1782 if ( m_aSet.size() < (size_t)Index )
1783 throw IndexOutOfBoundsException();
1784

--- 28 unchanged lines hidden (view full) ---

1813
1814 // we have to set this here again because getCurrentSettingsComposer can force a setpropertyvalue
1815 Reference<XParametersSupplier> xParameters = Reference<XParametersSupplier> (_xComposer, UNO_QUERY);
1816
1817 Reference<XIndexAccess> xParamsAsIndicies = xParameters.is() ? xParameters->getParameters() : Reference<XIndexAccess>();
1818 Reference<XNameAccess> xParamsAsNames(xParamsAsIndicies, UNO_QUERY);
1819 sal_Int32 nParamCount = xParamsAsIndicies.is() ? xParamsAsIndicies->getCount() : 0;
1820 ::std::bit_vector aNewParameterSet( _aParametersSet );
1777 }
1778 virtual Any SAL_CALL getByIndex( sal_Int32 Index ) throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException)
1779 {
1780 if ( m_aSet.empty() )
1781 return m_xSource->getByIndex(Index);
1782 if ( m_aSet.size() < (size_t)Index )
1783 throw IndexOutOfBoundsException();
1784

--- 28 unchanged lines hidden (view full) ---

1813
1814 // we have to set this here again because getCurrentSettingsComposer can force a setpropertyvalue
1815 Reference<XParametersSupplier> xParameters = Reference<XParametersSupplier> (_xComposer, UNO_QUERY);
1816
1817 Reference<XIndexAccess> xParamsAsIndicies = xParameters.is() ? xParameters->getParameters() : Reference<XIndexAccess>();
1818 Reference<XNameAccess> xParamsAsNames(xParamsAsIndicies, UNO_QUERY);
1819 sal_Int32 nParamCount = xParamsAsIndicies.is() ? xParamsAsIndicies->getCount() : 0;
1820 ::std::bit_vector aNewParameterSet( _aParametersSet );
1821 if ( nParamCount || ::std::count(aNewParameterSet.begin(),aNewParameterSet.end(),true) != nParamCount )
1821 if ( nParamCount || std_bitset_count(aNewParameterSet.begin(),aNewParameterSet.end(),true) != nParamCount )
1822 {
1823 static const ::rtl::OUString PROPERTY_NAME(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME));
1824 aNewParameterSet.resize(nParamCount ,false);
1825 typedef ::std::map< ::rtl::OUString, ::std::vector<sal_Int32> > TParameterPositions;
1826 TParameterPositions aParameterNames;
1827 for(sal_Int32 i = 0; i < nParamCount; ++i)
1828 {
1829 Reference<XPropertySet> xParam(xParamsAsIndicies->getByIndex(i),UNO_QUERY);

--- 341 unchanged lines hidden ---
1822 {
1823 static const ::rtl::OUString PROPERTY_NAME(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME));
1824 aNewParameterSet.resize(nParamCount ,false);
1825 typedef ::std::map< ::rtl::OUString, ::std::vector<sal_Int32> > TParameterPositions;
1826 TParameterPositions aParameterNames;
1827 for(sal_Int32 i = 0; i < nParamCount; ++i)
1828 {
1829 Reference<XPropertySet> xParam(xParamsAsIndicies->getByIndex(i),UNO_QUERY);

--- 341 unchanged lines hidden ---