Index: binfilter/bf_sc/source/ui/unoobj/sc_nameuno.cxx =================================================================== --- binfilter/bf_sc/source/ui/unoobj/sc_nameuno.cxx (revision 1381537) +++ binfilter/bf_sc/source/ui/unoobj/sc_nameuno.cxx (working copy) @@ -270,21 +270,6 @@ Modify_Impl( NULL, NULL, NULL, &nNewType ); } - -::rtl::OUString SAL_CALL ScNamedRangeObj::getScopeName( ) - throw (::com::sun::star::uno::RuntimeException) -{ - return rtl::OUString(); -} - -void SAL_CALL ScNamedRangeObj::setScopeAndRangeName( - const ::rtl::OUString& /*aScopeName*/, - const ::rtl::OUString& /*aRangeName*/ ) - throw (::com::sun::star::uno::RuntimeException) -{ -} - - // XCellRangeSource uno::Reference SAL_CALL ScNamedRangeObj::getReferredCells() @@ -535,48 +520,6 @@ } } - -void SAL_CALL ScNamedRangesObj::addNewByScopeName( - const ::rtl::OUString& /*aScopeName*/, - const ::rtl::OUString& /*aRangeName*/, - const ::rtl::OUString& /*aContent*/, - const ::com::sun::star::table::CellAddress& aPosition, ::sal_Int32 /*nType*/ ) - throw (::com::sun::star::uno::RuntimeException) -{ -} - -void SAL_CALL ScNamedRangesObj::removeByScopeName( - const ::rtl::OUString& /*aScopeName*/, - const ::rtl::OUString& /*aRangeName*/ ) - throw (::com::sun::star::uno::RuntimeException) -{ - -} - -::sal_Bool SAL_CALL ScNamedRangesObj::hasByScopeName( - const ::rtl::OUString& /*aScopeName*/, - const ::rtl::OUString& /*aRangeName*/ ) - throw (::com::sun::star::uno::RuntimeException) -{ - return sal_False; -} - -::com::sun::star::uno::Any SAL_CALL ScNamedRangesObj::getByScopeName( - const ::rtl::OUString& /*aScopeName*/, - const ::rtl::OUString& /*aRangeName*/ ) - throw (::com::sun::star::container::NoSuchElementException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException) -{ - return ::com::sun::star::uno::Any(); -} - -::com::sun::star::uno::Sequence< ::com::sun::star::sheet::RangeScopeName > SAL_CALL ScNamedRangesObj::getElementScopeNames( ) - throw (::com::sun::star::uno::RuntimeException) -{ - return ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::RangeScopeName >(); -} - // container::XEnumerationAccess uno::Reference SAL_CALL ScNamedRangesObj::createEnumeration() Index: binfilter/inc/bf_sc/nameuno.hxx =================================================================== --- binfilter/inc/bf_sc/nameuno.hxx (revision 1381537) +++ binfilter/inc/bf_sc/nameuno.hxx (working copy) @@ -106,11 +106,6 @@ virtual sal_Int32 SAL_CALL getType() throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setType( sal_Int32 nType ) throw(::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getScopeName( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setScopeAndRangeName( const ::rtl::OUString& aScopeName, - const ::rtl::OUString& aRangeName ) - throw (::com::sun::star::uno::RuntimeException); - // XNamed virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setName( const ::rtl::OUString& aName ) @@ -202,25 +197,6 @@ virtual void SAL_CALL outputList( const ::com::sun::star::table::CellAddress& aOutputPosition ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addNewByScopeName( const ::rtl::OUString& aScopeName, - const ::rtl::OUString& aRangeName, - const ::rtl::OUString& aContent, - const ::com::sun::star::table::CellAddress& aPosition, ::sal_Int32 nType ) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeByScopeName( const ::rtl::OUString& aScopeName, - const ::rtl::OUString& aRangeName ) - throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL hasByScopeName( const ::rtl::OUString& aScopeName, - const ::rtl::OUString& aRangeName ) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getByScopeName( const ::rtl::OUString& aScopeName, - const ::rtl::OUString& aRangeName ) - throw (::com::sun::star::container::NoSuchElementException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::RangeScopeName > SAL_CALL getElementScopeNames( ) - throw (::com::sun::star::uno::RuntimeException); - // XNameAccess virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw(::com::sun::star::container::NoSuchElementException, Index: offapi/com/sun/star/sheet/makefile.mk =================================================================== --- offapi/com/sun/star/sheet/makefile.mk (revision 1380975) +++ offapi/com/sun/star/sheet/makefile.mk (working copy) @@ -288,8 +288,11 @@ XMembersSupplier.idl\ XMultiFormulaTokens.idl\ XMultipleOperation.idl\ + RangeScopeName.idl\ XNamedRange.idl\ XNamedRanges.idl\ + XNamedRange2.idl\ + XNamedRanges2.idl\ XPrintAreas.idl\ XRangeSelection.idl\ XRangeSelectionChangeListener.idl\ Index: offapi/com/sun/star/sheet/RangeScopeName.idl =================================================================== --- offapi/com/sun/star/sheet/RangeScopeName.idl (revision 0) +++ offapi/com/sun/star/sheet/RangeScopeName.idl (working copy) @@ -0,0 +1,41 @@ +/************************************************************** + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + *************************************************************/ +#ifndef __com_sun_star_sheet_RangeScopeName_idl__ +#define __com_sun_star_sheet_RangeScopeName_idl__ + +module com { module sun { module star { module sheet { +/* provides a structure to store the user defined name ranges with duplicate names + */ +published struct RangeScopeName +{ + /** the scope name + */ + string ScopeName; + + + /** the range name + */ + string RangeName; +}; + +}; }; }; }; + +#endif Index: offapi/com/sun/star/sheet/XNamedRange.idl =================================================================== --- offapi/com/sun/star/sheet/XNamedRange.idl (revision 1380975) +++ offapi/com/sun/star/sheet/XNamedRange.idl (working copy) @@ -97,10 +97,8 @@ */ void setType( [in] long nType ); - string getScopeName(); - - void setScopeAndRangeName( [in] string aScopeName, [in] string aRangeName ); + }; //============================================================================= Index: offapi/com/sun/star/sheet/XNamedRange2.idl =================================================================== --- offapi/com/sun/star/sheet/XNamedRange2.idl (revision 0) +++ offapi/com/sun/star/sheet/XNamedRange2.idl (working copy) @@ -0,0 +1,59 @@ +/************************************************************** + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + *************************************************************/ + + + +#ifndef __com_sun_star_sheet_XNamedRange2_idl__ +#define __com_sun_star_sheet_XNamedRange2_idl__ + +#ifndef __com_sun_star_sheet_XNamedRange_idl__ +#include +#endif +//============================================================================= + +module com { module sun { module star { module sheet { + +//============================================================================= + +/** provides access to the settings of a named ranges with duplicate names in a spreadsheet + document. + + @see com::sun::star::sheet::NamedRange2 + */ +published interface XNamedRange2: com::sun::star::sheet::XNamedRange +{ + //------------------------------------------------------------------------- + + //get the name of a scope + string getScopeName(); + + //set the scope nanme and it's using name + + void setScopeAndRangeName( [in] string aScopeName, [in] string aRangeName ); + +}; + +//============================================================================= + +}; }; }; }; + +#endif + Index: offapi/com/sun/star/sheet/XNamedRanges.idl =================================================================== --- offapi/com/sun/star/sheet/XNamedRanges.idl (revision 1380975) +++ offapi/com/sun/star/sheet/XNamedRanges.idl (working copy) @@ -45,25 +45,6 @@ module com { module sun { module star { module sheet { -published struct RangeScopeName -{ - //------------------------------------------------------------------------- - - /** is the OpCode of the token. - - @see com::sun::star::sheet::XFormulaOpCodeMapper - */ - string ScopeName; - - //------------------------------------------------------------------------- - - /** is additional data in the token, depending on the OpCode. - - @see com::sun::star::sheet::NamedRange::TokenIndex - @see com::sun::star::sheet::DatabaseRange::TokenIndex - */ - string RangeName; -}; //============================================================================= /** provides access to the members in a collection of named ranges and to @@ -148,22 +129,6 @@ */ void outputList( [in] com::sun::star::table::CellAddress aOutputPosition ); - void addNewByScopeName( - [in] string aScopeName, - [in] string aRangeName, - [in] string aContent, - [in] com::sun::star::table::CellAddress aPosition, - [in] long nType ); - - void removeByScopeName( [in] string aScopeName, [in] string aRangeName ); - - boolean hasByScopeName( [in] string aScopeName, [in] string aRangeName ); - - any getByScopeName( [in] string aScopeName, [in] string aRangeName ) - raises( com::sun::star::container::NoSuchElementException, - com::sun::star::lang::WrappedTargetException ); - - sequence getElementScopeNames(); }; Index: offapi/com/sun/star/sheet/XNamedRanges2.idl =================================================================== --- offapi/com/sun/star/sheet/XNamedRanges2.idl (revision 0) +++ offapi/com/sun/star/sheet/XNamedRanges2.idl (working copy) @@ -0,0 +1,76 @@ +/************************************************************** + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + *************************************************************/ + + + +#ifndef __com_sun_star_sheet_XNamedRanges2_idl__ +#define __com_sun_star_sheet_XNamedRanges2_idl__ + +//============================================================================= +#ifndef __com_sun_star_sheet_XNamedRanges_idl__ +#include +#endif + +#ifndef __com_sun_star_sheet_RangeScopeName_idl__ +#include +#endif + +module com { module sun { module star { module sheet { + + + +//============================================================================= + +/** provides access to the members in a collection user defined named ranges with duplicate names and to + insert and remove them. + + @see com::sun::star::sheet::NamedRanges2 + @see com::sun::star::sheet::NamedRange2 + */ +published interface XNamedRanges2: com::sun::star::sheet::XNamedRanges +{ + //------------------------------------------------------------------------- + + void addNewByScopeName( + [in] string aScopeName, + [in] string aRangeName, + [in] string aContent, + [in] com::sun::star::table::CellAddress aPosition, + [in] long nType ); + + void removeByScopeName( [in] string aScopeName, [in] string aRangeName ); + + boolean hasByScopeName( [in] string aScopeName, [in] string aRangeName ); + + any getByScopeName( [in] string aScopeName, [in] string aRangeName ) + raises( com::sun::star::container::NoSuchElementException, + com::sun::star::lang::WrappedTargetException ); + + sequence getElementScopeNames(); + +}; + +//============================================================================= + +}; }; }; }; + +#endif + Index: oox/inc/oox/xls/defnamesbuffer.hxx =================================================================== --- oox/inc/oox/xls/defnamesbuffer.hxx (revision 1380974) +++ oox/inc/oox/xls/defnamesbuffer.hxx (working copy) @@ -155,7 +155,7 @@ typedef ::std::auto_ptr< StreamDataSequence > StreamDataSeqPtr; typedef ::std::auto_ptr< BiffInputStreamPos > BiffStreamPosPtr; - ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XNamedRange > + ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XNamedRange2 > mxNamedRange; /// XNamedRange interface of the defined name. sal_Int32 mnTokenIndex; /// Name index used in API token array. sal_Int16 mnCalcSheet; /// Calc sheet index for sheet-local names. Index: oox/inc/oox/xls/workbookhelper.hxx =================================================================== --- oox/inc/oox/xls/workbookhelper.hxx (revision 1380974) +++ oox/inc/oox/xls/workbookhelper.hxx (working copy) @@ -34,7 +34,7 @@ namespace container { class XNameContainer; } namespace lang { class XMultiServiceFactory; } namespace sheet { class XDatabaseRange; } - namespace sheet { class XNamedRange; } + namespace sheet { class XNamedRange2; } namespace sheet { class XSpreadsheet; } namespace sheet { class XSpreadsheetDocument; } namespace style { class XStyle; } @@ -182,7 +182,7 @@ /** Creates and returns a defined name on-the-fly in the Calc document. The name will not be buffered in the global defined names buffer. @param orName (in/out-parameter) Returns the resulting used name. */ - ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XNamedRange > + ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XNamedRange2 > createNamedRangeObject( ::rtl::OUString& orName, sal_Int32 nSheetId = -1, //Add scope for name range Index: oox/source/token/properties.txt =================================================================== --- oox/source/token/properties.txt (revision 1380974) +++ oox/source/token/properties.txt (working copy) @@ -284,6 +284,7 @@ MultiSelection Name NamedRanges +NamedRanges2 NegativeError NullDate NumberFormat Index: oox/source/xls/sheetdatabuffer.cxx =================================================================== --- oox/source/xls/sheetdatabuffer.cxx (revision 1380974) +++ oox/source/xls/sheetdatabuffer.cxx (working copy) @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -671,7 +672,7 @@ append( static_cast< sal_Int32 >( getSheetIndex() + 1 ) ). append( sal_Unicode( '_' ) ).append( rMapKey.mnRow ). append( sal_Unicode( '_' ) ).append( rMapKey.mnCol ).makeStringAndClear(); - Reference< XNamedRange > xNamedRange = createNamedRangeObject( aName ); + Reference< XNamedRange2 > xNamedRange = createNamedRangeObject( aName ); OSL_ENSURE( xNamedRange.is(), "SheetDataBuffer::createSharedFormula - cannot create shared formula" ); PropertySet aNameProps( xNamedRange ); aNameProps.setProperty( PROP_IsSharedFormula, true ); Index: oox/source/xls/workbookhelper.cxx =================================================================== --- oox/source/xls/workbookhelper.cxx (revision 1380974) +++ oox/source/xls/workbookhelper.cxx (working copy) @@ -28,8 +28,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -133,7 +133,7 @@ /** Returns the specified cell or page style from the Calc document. */ Reference< XStyle > getStyleObject( const OUString& rStyleName, bool bPageStyle ) const; /** Creates and returns a defined name on-the-fly in the Calc document. */ - Reference< XNamedRange > createNamedRangeObject( OUString& orScope, OUString& orName, sal_Int32 nNameFlags ) const; + Reference< XNamedRange2 > createNamedRangeObject( OUString& orScope, OUString& orName, sal_Int32 nNameFlags ) const; /** Creates and returns a database range on-the-fly in the Calc document. */ Reference< XDatabaseRange > createDatabaseRangeObject( OUString& orName, const CellRangeAddress& rRangeAddr ) const; /** Creates and returns a com.sun.star.style.Style object for cells or pages. */ @@ -348,15 +348,15 @@ return xStyle; } -Reference< XNamedRange > WorkbookGlobals::createNamedRangeObject( OUString& orScope, OUString& orName, sal_Int32 nNameFlags ) const +Reference< XNamedRange2 > WorkbookGlobals::createNamedRangeObject( OUString& orScope, OUString& orName, sal_Int32 nNameFlags ) const { // create the name and insert it into the Calc document - Reference< XNamedRange > xNamedRange; + Reference< XNamedRange2 > xNamedRange; if( orName.getLength() > 0 ) try { // find an unused name PropertySet aDocProps( mxDoc ); - Reference< XNamedRanges > xNamedRanges( aDocProps.getAnyProperty( PROP_NamedRanges ), UNO_QUERY_THROW ); + Reference< XNamedRanges2 > xNamedRanges( aDocProps.getAnyProperty( PROP_NamedRanges2 ), UNO_QUERY_THROW ); Reference< XNameAccess > xNameAccess( xNamedRanges, UNO_QUERY_THROW ); orName = ContainerHelper::getUnusedName( xNameAccess, orName, '_' ); // create the named range @@ -738,7 +738,7 @@ return mrBookGlob.getStyleObject( rStyleName, bPageStyle ); } -Reference< XNamedRange > WorkbookHelper::createNamedRangeObject( OUString& orName, sal_Int32 nSheetId, sal_Int32 nNameFlags ) const +Reference< XNamedRange2 > WorkbookHelper::createNamedRangeObject( OUString& orName, sal_Int32 nSheetId, sal_Int32 nNameFlags ) const { OUString orScope = nSheetId >= 0? getWorksheets().getCalcSheetName(nSheetId) : OUString(); return mrBookGlob.createNamedRangeObject( orScope, orName, nNameFlags ); Index: sc/inc/nameuno.hxx =================================================================== --- sc/inc/nameuno.hxx (revision 1380968) +++ sc/inc/nameuno.hxx (working copy) @@ -30,10 +30,11 @@ #include #include #include -#include +#include #include -#include +#include #include +#include #include #include #include @@ -52,7 +53,7 @@ class ScNamedRangeObj : public ::cppu::WeakImplHelper6< - ::com::sun::star::sheet::XNamedRange, + ::com::sun::star::sheet::XNamedRange2, ::com::sun::star::sheet::XFormulaTokens, ::com::sun::star::sheet::XCellRangeReferrer, ::com::sun::star::beans::XPropertySet, @@ -174,7 +175,7 @@ class ScNamedRangesObj : public ::cppu::WeakImplHelper5< - ::com::sun::star::sheet::XNamedRanges, + ::com::sun::star::sheet::XNamedRanges2, ::com::sun::star::container::XEnumerationAccess, ::com::sun::star::container::XIndexAccess, ::com::sun::star::document::XActionLockable, Index: sc/inc/unonames.hxx =================================================================== --- sc/inc/unonames.hxx (revision 1380968) +++ sc/inc/unonames.hxx (working copy) @@ -44,6 +44,7 @@ #define SC_UNO_COLLABELRNG "ColumnLabelRanges" #define SC_UNO_DATABASERNG "DatabaseRanges" #define SC_UNO_NAMEDRANGES "NamedRanges" +#define SC_UNO_NAMEDRANGES2 "NamedRanges2" #define SC_UNO_ROWLABELRNG "RowLabelRanges" #define SC_UNO_SHEETLINKS "SheetLinks" #define SC_UNO_FORBIDDEN "ForbiddenCharacters" Index: sc/source/filter/xml/xmlexprt.cxx =================================================================== --- sc/source/filter/xml/xmlexprt.cxx (revision 1380968) +++ sc/source/filter/xml/xmlexprt.cxx (working copy) @@ -113,8 +113,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -3894,7 +3894,7 @@ uno::Reference xPropertySet (xSpreadDoc, uno::UNO_QUERY); if (xPropertySet.is()) { - uno::Reference xNamedRanges(xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_NAMEDRANGES))), uno::UNO_QUERY); + uno::Reference xNamedRanges(xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_NAMEDRANGES))), uno::UNO_QUERY); CheckAttrList(); if (xNamedRanges.is()) { @@ -3922,7 +3922,7 @@ } else if( nWhichTable !=MAXTABCOUNT) continue; - uno::Reference xNamedRange(xNamedRanges->getByScopeName(sRangeScope,sNamedRange), uno::UNO_QUERY); + uno::Reference xNamedRange(xNamedRanges->getByScopeName(sRangeScope,sNamedRange), uno::UNO_QUERY); //range scope name support if (xNamedRange.is()) { Index: sc/source/filter/xml/xmlimprt.cxx =================================================================== --- sc/source/filter/xml/xmlimprt.cxx (revision 1380968) +++ sc/source/filter/xml/xmlimprt.cxx (working copy) @@ -84,9 +84,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include @@ -2733,7 +2733,7 @@ uno::Reference xPropertySet (GetModel(), uno::UNO_QUERY); if (xPropertySet.is()) { - uno::Reference xNamedRanges(xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_NAMEDRANGES))), uno::UNO_QUERY); + uno::Reference xNamedRanges(xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_NAMEDRANGES))), uno::UNO_QUERY); if (xNamedRanges.is()) { ScMyNamedExpressions::iterator aItr(pNamedExpressions->begin()); @@ -2795,7 +2795,7 @@ rtl::OUString sRangeScope( sTableName); //uno::Reference xNamedRange(xNamedRanges->getByName((*aItr)->sName), uno::UNO_QUERY); //getByScopeName - uno::Reference xNamedRange(xNamedRanges->getByScopeName( sRangeScope,(*aItr)->sName), uno::UNO_QUERY); + uno::Reference xNamedRange(xNamedRanges->getByScopeName( sRangeScope,(*aItr)->sName), uno::UNO_QUERY); if (xNamedRange.is()) { LockSolarMutex(); Index: sc/source/ui/unoobj/docuno.cxx =================================================================== --- sc/source/ui/unoobj/docuno.cxx (revision 1380968) +++ sc/source/ui/unoobj/docuno.cxx (working copy) @@ -50,6 +50,7 @@ #include #include +#include #include #include #include @@ -135,6 +136,7 @@ {MAP_CHAR_LEN(SC_UNO_LOOKUPLABELS), PROP_UNO_LOOKUPLABELS, &getBooleanCppuType(), 0, 0}, {MAP_CHAR_LEN(SC_UNO_MATCHWHOLE), PROP_UNO_MATCHWHOLE, &getBooleanCppuType(), 0, 0}, {MAP_CHAR_LEN(SC_UNO_NAMEDRANGES), 0, &getCppuType((uno::Reference*)0), 0, 0}, + {MAP_CHAR_LEN(SC_UNO_NAMEDRANGES2), 0, &getCppuType((uno::Reference*)0), 0, 0}, {MAP_CHAR_LEN(SC_UNO_DATABASERNG), 0, &getCppuType((uno::Reference*)0), 0, 0}, {MAP_CHAR_LEN(SC_UNO_NULLDATE), PROP_UNO_NULLDATE, &getCppuType((util::Date*)0), 0, 0}, {MAP_CHAR_LEN(SC_UNO_ROWLABELRNG), 0, &getCppuType((uno::Reference*)0), 0, 0}, @@ -1846,6 +1848,10 @@ ScUnoConversion::FillLocale( aLocale, eCtl ); aRet <<= aLocale; } + else if ( aString.EqualsAscii( SC_UNO_NAMEDRANGES2 ) ) + { + aRet <<= uno::Reference(new ScNamedRangesObj( pDocShell )); + } else if ( aString.EqualsAscii( SC_UNO_NAMEDRANGES ) ) { aRet <<= uno::Reference(new ScNamedRangesObj( pDocShell )); Index: sc/source/ui/unoobj/nameuno.cxx =================================================================== --- sc/source/ui/unoobj/nameuno.cxx (revision 1380968) +++ sc/source/ui/unoobj/nameuno.cxx (working copy) @@ -763,7 +763,7 @@ lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - uno::Reference< sheet::XNamedRange > xRange(GetObjectByIndex_Impl((sal_uInt16)nIndex)); + uno::Reference< sheet::XNamedRange2 > xRange(GetObjectByIndex_Impl((sal_uInt16)nIndex)); if ( xRange.is() ) return uno::makeAny(xRange); else @@ -774,7 +774,7 @@ uno::Type SAL_CALL ScNamedRangesObj::getElementType() throw(uno::RuntimeException) { ScUnoGuard aGuard; - return ::getCppuType((const uno::Reference< sheet::XNamedRange >*)0); // muss zu getByIndex passen + return ::getCppuType((const uno::Reference< sheet::XNamedRange2 >*)0); // muss zu getByIndex passen } sal_Bool SAL_CALL ScNamedRangesObj::hasElements() throw(uno::RuntimeException) @@ -788,7 +788,7 @@ lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - uno::Reference< sheet::XNamedRange > xRange(GetObjectByName_Impl(aName)); + uno::Reference< sheet::XNamedRange2 > xRange(GetObjectByName_Impl(aName)); if ( xRange.is() ) return uno::makeAny(xRange); else @@ -801,7 +801,7 @@ lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - uno::Reference< sheet::XNamedRange > xRange(GetObjectByScopeName_Impl(aScopeName, aRangeName)); + uno::Reference< sheet::XNamedRange2 > xRange(GetObjectByScopeName_Impl(aScopeName, aRangeName)); if ( xRange.is() ) return uno::makeAny(xRange); else