nameuno.cxx (dffa72de) nameuno.cxx (102b8ff7)
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

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

758 return nRet;
759}
760
761uno::Any SAL_CALL ScNamedRangesObj::getByIndex( sal_Int32 nIndex )
762 throw(lang::IndexOutOfBoundsException,
763 lang::WrappedTargetException, uno::RuntimeException)
764{
765 ScUnoGuard aGuard;
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

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

758 return nRet;
759}
760
761uno::Any SAL_CALL ScNamedRangesObj::getByIndex( sal_Int32 nIndex )
762 throw(lang::IndexOutOfBoundsException,
763 lang::WrappedTargetException, uno::RuntimeException)
764{
765 ScUnoGuard aGuard;
766 uno::Reference< sheet::XNamedRange > xRange(GetObjectByIndex_Impl((sal_uInt16)nIndex));
766 uno::Reference< sheet::XNamedRange2 > xRange(GetObjectByIndex_Impl((sal_uInt16)nIndex));
767 if ( xRange.is() )
768 return uno::makeAny(xRange);
769 else
770 throw lang::IndexOutOfBoundsException();
771// return uno::Any();
772}
773
774uno::Type SAL_CALL ScNamedRangesObj::getElementType() throw(uno::RuntimeException)
775{
776 ScUnoGuard aGuard;
767 if ( xRange.is() )
768 return uno::makeAny(xRange);
769 else
770 throw lang::IndexOutOfBoundsException();
771// return uno::Any();
772}
773
774uno::Type SAL_CALL ScNamedRangesObj::getElementType() throw(uno::RuntimeException)
775{
776 ScUnoGuard aGuard;
777 return ::getCppuType((const uno::Reference< sheet::XNamedRange >*)0); // muss zu getByIndex passen
777 return ::getCppuType((const uno::Reference< sheet::XNamedRange2 >*)0); // muss zu getByIndex passen
778}
779
780sal_Bool SAL_CALL ScNamedRangesObj::hasElements() throw(uno::RuntimeException)
781{
782 ScUnoGuard aGuard;
783 return ( getCount() != 0 );
784}
785
786uno::Any SAL_CALL ScNamedRangesObj::getByName( const rtl::OUString& aName )
787 throw(container::NoSuchElementException,
788 lang::WrappedTargetException, uno::RuntimeException)
789{
790 ScUnoGuard aGuard;
778}
779
780sal_Bool SAL_CALL ScNamedRangesObj::hasElements() throw(uno::RuntimeException)
781{
782 ScUnoGuard aGuard;
783 return ( getCount() != 0 );
784}
785
786uno::Any SAL_CALL ScNamedRangesObj::getByName( const rtl::OUString& aName )
787 throw(container::NoSuchElementException,
788 lang::WrappedTargetException, uno::RuntimeException)
789{
790 ScUnoGuard aGuard;
791 uno::Reference< sheet::XNamedRange > xRange(GetObjectByName_Impl(aName));
791 uno::Reference< sheet::XNamedRange2 > xRange(GetObjectByName_Impl(aName));
792 if ( xRange.is() )
793 return uno::makeAny(xRange);
794 else
795 throw container::NoSuchElementException();
796// return uno::Any();
797}
798
799uno::Any SAL_CALL ScNamedRangesObj::getByScopeName( const rtl::OUString& aScopeName, const rtl::OUString& aRangeName )
800 throw(container::NoSuchElementException,
801 lang::WrappedTargetException, uno::RuntimeException)
802{
803 ScUnoGuard aGuard;
792 if ( xRange.is() )
793 return uno::makeAny(xRange);
794 else
795 throw container::NoSuchElementException();
796// return uno::Any();
797}
798
799uno::Any SAL_CALL ScNamedRangesObj::getByScopeName( const rtl::OUString& aScopeName, const rtl::OUString& aRangeName )
800 throw(container::NoSuchElementException,
801 lang::WrappedTargetException, uno::RuntimeException)
802{
803 ScUnoGuard aGuard;
804 uno::Reference< sheet::XNamedRange > xRange(GetObjectByScopeName_Impl(aScopeName, aRangeName));
804 uno::Reference< sheet::XNamedRange2 > xRange(GetObjectByScopeName_Impl(aScopeName, aRangeName));
805 if ( xRange.is() )
806 return uno::makeAny(xRange);
807 else
808 throw container::NoSuchElementException();
809// return uno::Any();
810}
811uno::Sequence<rtl::OUString> SAL_CALL ScNamedRangesObj::getElementNames()
812 throw(uno::RuntimeException)

--- 466 unchanged lines hidden ---
805 if ( xRange.is() )
806 return uno::makeAny(xRange);
807 else
808 throw container::NoSuchElementException();
809// return uno::Any();
810}
811uno::Sequence<rtl::OUString> SAL_CALL ScNamedRangesObj::getElementNames()
812 throw(uno::RuntimeException)

--- 466 unchanged lines hidden ---