View | Details | Raw Unified | Return to issue 120478
Collapse All | Expand All

(-)binfilter/inc/bf_sc/nameuno.hxx (+3 lines)
Lines 66-71 Link Here
66
#ifndef _CPPUHELPER_IMPLBASE4_HXX_
66
#ifndef _CPPUHELPER_IMPLBASE4_HXX_
67
#include <cppuhelper/implbase4.hxx>
67
#include <cppuhelper/implbase4.hxx>
68
#endif
68
#endif
69
70
#include <com/sun/star/sheet/RangeScopeName.hpp>
71
69
namespace binfilter {
72
namespace binfilter {
70
73
71
class ScDocShell;
74
class ScDocShell;
(-)offapi/com/sun/star/sheet/makefile.mk (+3 lines)
Lines 288-295 Link Here
288
	XMembersSupplier.idl\
288
	XMembersSupplier.idl\
289
	XMultiFormulaTokens.idl\
289
	XMultiFormulaTokens.idl\
290
	XMultipleOperation.idl\
290
	XMultipleOperation.idl\
291
	RangeScopeName.idl\
291
	XNamedRange.idl\
292
	XNamedRange.idl\
292
	XNamedRanges.idl\
293
	XNamedRanges.idl\
294
	XNamedRange2.idl\
295
	XNamedRanges2.idl\
293
	XPrintAreas.idl\
296
	XPrintAreas.idl\
294
	XRangeSelection.idl\
297
	XRangeSelection.idl\
295
	XRangeSelectionChangeListener.idl\
298
	XRangeSelectionChangeListener.idl\
(-)offapi/com/sun/star/sheet/RangeScopeName.idl (+41 lines)
Line 0 Link Here
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
9
 * with the License.  You may obtain a copy of the License at
10
 * 
11
 *   http://www.apache.org/licenses/LICENSE-2.0
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.
19
 * 
20
 *************************************************************/
21
#ifndef __com_sun_star_sheet_RangeScopeName_idl__
22
#define __com_sun_star_sheet_RangeScopeName_idl__
23
24
module com {  module sun {  module star {  module sheet {
25
/* provides a structure to store the user defined name ranges with duplicate names
26
	*/
27
published struct RangeScopeName
28
{
29
    /** the scope name
30
     */
31
    string ScopeName;
32
33
34
    /** the range name
35
     */
36
    string RangeName;
37
};
38
39
}; }; }; };
40
41
#endif
(-)offapi/com/sun/star/sheet/XNamedRange.idl (-3 / +1 lines)
Lines 97-106 Link Here
97
	 */
97
	 */
98
	void setType( [in] long nType );
98
	void setType( [in] long nType );
99
	
99
	
100
	string getScopeName();
101
	
102
	void setScopeAndRangeName( [in] string aScopeName, [in] string aRangeName );
103
100
101
104
};
102
};
105
103
106
//=============================================================================
104
//=============================================================================
(-)offapi/com/sun/star/sheet/XNamedRange2.idl (+59 lines)
Line 0 Link Here
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
9
 * with the License.  You may obtain a copy of the License at
10
 * 
11
 *   http://www.apache.org/licenses/LICENSE-2.0
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.
19
 * 
20
 *************************************************************/
21
22
23
24
#ifndef __com_sun_star_sheet_XNamedRange2_idl__
25
#define __com_sun_star_sheet_XNamedRange2_idl__
26
27
#ifndef __com_sun_star_sheet_XNamedRange_idl__
28
#include <com/sun/star/sheet/XNamedRange.idl>
29
#endif
30
//=============================================================================
31
32
module com {  module sun {  module star {  module sheet {
33
34
//=============================================================================
35
36
/** provides access to the settings of a named ranges with duplicate names in a spreadsheet
37
	document.
38
39
	@see com::sun::star::sheet::NamedRange2
40
 */
41
published interface XNamedRange2: com::sun::star::sheet::XNamedRange
42
{
43
	//-------------------------------------------------------------------------
44
45
	//get the name of a scope
46
	string getScopeName();
47
	
48
	//set the scope nanme and it's using name
49
	
50
	void setScopeAndRangeName( [in] string aScopeName, [in] string aRangeName );
51
52
};
53
54
//=============================================================================
55
56
}; }; }; };
57
58
#endif
59
(-)offapi/com/sun/star/sheet/XNamedRanges.idl (-35 lines)
Lines 45-69 Link Here
45
module com {  module sun {  module star {  module sheet {
45
module com {  module sun {  module star {  module sheet {
46
46
47
47
48
published struct RangeScopeName
49
{
50
    //-------------------------------------------------------------------------
51
52
    /** is the OpCode of the token.
53
54
        @see com::sun::star::sheet::XFormulaOpCodeMapper
55
     */
56
    string ScopeName;
57
58
	//-------------------------------------------------------------------------
59
60
    /** is additional data in the token, depending on the OpCode.
61
62
        @see com::sun::star::sheet::NamedRange::TokenIndex
63
        @see com::sun::star::sheet::DatabaseRange::TokenIndex
64
     */
65
    string RangeName;
66
};
67
//=============================================================================
48
//=============================================================================
68
49
69
/** provides access to the members in a collection of named ranges and to
50
/** provides access to the members in a collection of named ranges and to
Lines 148-169 Link Here
148
	 */
129
	 */
149
	void outputList( [in] com::sun::star::table::CellAddress aOutputPosition );
130
	void outputList( [in] com::sun::star::table::CellAddress aOutputPosition );
150
	
131
	
151
	void addNewByScopeName(
152
			[in] string aScopeName,
153
			[in] string aRangeName,
154
			[in] string aContent,
155
			[in] com::sun::star::table::CellAddress aPosition,
156
			[in] long nType );
157
	
158
	void removeByScopeName( [in] string aScopeName, [in] string aRangeName );
159
	
160
	boolean hasByScopeName( [in] string aScopeName, [in] string aRangeName );
161
	
162
	any getByScopeName( [in] string aScopeName, [in] string aRangeName )
163
			raises( com::sun::star::container::NoSuchElementException, 
164
					com::sun::star::lang::WrappedTargetException ); 
165
					
166
        sequence<RangeScopeName> getElementScopeNames(); 
167
132
168
};
133
};
169
134
(-)offapi/com/sun/star/sheet/XNamedRanges2.idl (+76 lines)
Line 0 Link Here
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
9
 * with the License.  You may obtain a copy of the License at
10
 * 
11
 *   http://www.apache.org/licenses/LICENSE-2.0
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.
19
 * 
20
 *************************************************************/
21
22
23
24
#ifndef __com_sun_star_sheet_XNamedRanges2_idl__
25
#define __com_sun_star_sheet_XNamedRanges2_idl__
26
27
//=============================================================================
28
#ifndef __com_sun_star_sheet_XNamedRanges_idl__
29
#include <com/sun/star/sheet/XNamedRanges.idl>
30
#endif
31
32
#ifndef __com_sun_star_sheet_RangeScopeName_idl__
33
#include <com/sun/star/sheet/RangeScopeName.idl>
34
#endif
35
36
module com {  module sun {  module star {  module sheet {
37
38
39
40
//=============================================================================
41
42
/** provides access to the members in a collection user defined named ranges with duplicate names and to
43
	insert and remove them.
44
45
	@see com::sun::star::sheet::NamedRanges2
46
	@see com::sun::star::sheet::NamedRange2
47
 */
48
published interface XNamedRanges2: com::sun::star::sheet::XNamedRanges
49
{
50
	//-------------------------------------------------------------------------
51
52
	void addNewByScopeName(
53
			[in] string aScopeName,
54
			[in] string aRangeName,
55
			[in] string aContent,
56
			[in] com::sun::star::table::CellAddress aPosition,
57
			[in] long nType );
58
	
59
	void removeByScopeName( [in] string aScopeName, [in] string aRangeName );
60
	
61
	boolean hasByScopeName( [in] string aScopeName, [in] string aRangeName );
62
	
63
	any getByScopeName( [in] string aScopeName, [in] string aRangeName )
64
			raises( com::sun::star::container::NoSuchElementException, 
65
					com::sun::star::lang::WrappedTargetException ); 
66
					
67
        sequence<com::sun::star::sheet::RangeScopeName> getElementScopeNames(); 
68
69
};
70
71
//=============================================================================
72
73
}; }; }; };
74
75
#endif
76
(-)oox/inc/oox/xls/defnamesbuffer.hxx (-1 / +1 lines)
Lines 155-161 Link Here
155
    typedef ::std::auto_ptr< StreamDataSequence >   StreamDataSeqPtr;
155
    typedef ::std::auto_ptr< StreamDataSequence >   StreamDataSeqPtr;
156
    typedef ::std::auto_ptr< BiffInputStreamPos >   BiffStreamPosPtr;
156
    typedef ::std::auto_ptr< BiffInputStreamPos >   BiffStreamPosPtr;
157
157
158
    ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XNamedRange >
158
    ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XNamedRange2 >
159
                        mxNamedRange;       /// XNamedRange interface of the defined name.
159
                        mxNamedRange;       /// XNamedRange interface of the defined name.
160
    sal_Int32           mnTokenIndex;       /// Name index used in API token array.
160
    sal_Int32           mnTokenIndex;       /// Name index used in API token array.
161
    sal_Int16           mnCalcSheet;        /// Calc sheet index for sheet-local names.
161
    sal_Int16           mnCalcSheet;        /// Calc sheet index for sheet-local names.
(-)oox/inc/oox/xls/workbookhelper.hxx (-2 / +2 lines)
Lines 34-40 Link Here
34
    namespace container { class XNameContainer; }
34
    namespace container { class XNameContainer; }
35
    namespace lang { class XMultiServiceFactory; }
35
    namespace lang { class XMultiServiceFactory; }
36
    namespace sheet { class XDatabaseRange; }
36
    namespace sheet { class XDatabaseRange; }
37
    namespace sheet { class XNamedRange; }
37
    namespace sheet { class XNamedRange2; }
38
    namespace sheet { class XSpreadsheet; }
38
    namespace sheet { class XSpreadsheet; }
39
    namespace sheet { class XSpreadsheetDocument; }
39
    namespace sheet { class XSpreadsheetDocument; }
40
    namespace style { class XStyle; }
40
    namespace style { class XStyle; }
Lines 182-188 Link Here
182
    /** Creates and returns a defined name on-the-fly in the Calc document.
182
    /** Creates and returns a defined name on-the-fly in the Calc document.
183
        The name will not be buffered in the global defined names buffer.
183
        The name will not be buffered in the global defined names buffer.
184
        @param orName  (in/out-parameter) Returns the resulting used name. */
184
        @param orName  (in/out-parameter) Returns the resulting used name. */
185
    ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XNamedRange >
185
    ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XNamedRange2 >
186
                        createNamedRangeObject(
186
                        createNamedRangeObject(
187
                            ::rtl::OUString& orName,
187
                            ::rtl::OUString& orName,
188
							sal_Int32 nSheetId = -1, //Add scope for name range
188
							sal_Int32 nSheetId = -1, //Add scope for name range
(-)oox/source/xls/sheetdatabuffer.cxx (-1 / +2 lines)
Lines 28-33 Link Here
28
#include <com/sun/star/sheet/XCellRangeData.hpp>
28
#include <com/sun/star/sheet/XCellRangeData.hpp>
29
#include <com/sun/star/sheet/XFormulaTokens.hpp>
29
#include <com/sun/star/sheet/XFormulaTokens.hpp>
30
#include <com/sun/star/sheet/XMultipleOperation.hpp>
30
#include <com/sun/star/sheet/XMultipleOperation.hpp>
31
#include <com/sun/star/sheet/XNamedRange2.hpp>
31
#include <com/sun/star/table/XCell.hpp>
32
#include <com/sun/star/table/XCell.hpp>
32
#include <com/sun/star/text/XText.hpp>
33
#include <com/sun/star/text/XText.hpp>
33
#include <com/sun/star/util/DateTime.hpp>
34
#include <com/sun/star/util/DateTime.hpp>
Lines 671-677 Link Here
671
        append( static_cast< sal_Int32 >( getSheetIndex() + 1 ) ).
672
        append( static_cast< sal_Int32 >( getSheetIndex() + 1 ) ).
672
        append( sal_Unicode( '_' ) ).append( rMapKey.mnRow ).
673
        append( sal_Unicode( '_' ) ).append( rMapKey.mnRow ).
673
        append( sal_Unicode( '_' ) ).append( rMapKey.mnCol ).makeStringAndClear();
674
        append( sal_Unicode( '_' ) ).append( rMapKey.mnCol ).makeStringAndClear();
674
    Reference< XNamedRange > xNamedRange = createNamedRangeObject( aName );
675
    Reference< XNamedRange2 > xNamedRange = createNamedRangeObject( aName );
675
    OSL_ENSURE( xNamedRange.is(), "SheetDataBuffer::createSharedFormula - cannot create shared formula" );
676
    OSL_ENSURE( xNamedRange.is(), "SheetDataBuffer::createSharedFormula - cannot create shared formula" );
676
    PropertySet aNameProps( xNamedRange );
677
    PropertySet aNameProps( xNamedRange );
677
    aNameProps.setProperty( PROP_IsSharedFormula, true );
678
    aNameProps.setProperty( PROP_IsSharedFormula, true );
(-)oox/source/xls/workbookhelper.cxx (-7 / +7 lines)
Lines 28-35 Link Here
28
#include <com/sun/star/document/XActionLockable.hpp>
28
#include <com/sun/star/document/XActionLockable.hpp>
29
#include <com/sun/star/sheet/XDatabaseRange.hpp>
29
#include <com/sun/star/sheet/XDatabaseRange.hpp>
30
#include <com/sun/star/sheet/XDatabaseRanges.hpp>
30
#include <com/sun/star/sheet/XDatabaseRanges.hpp>
31
#include <com/sun/star/sheet/XNamedRange.hpp>
31
#include <com/sun/star/sheet/XNamedRange2.hpp>
32
#include <com/sun/star/sheet/XNamedRanges.hpp>
32
#include <com/sun/star/sheet/XNamedRanges2.hpp>
33
#include <com/sun/star/sheet/XSpreadsheet.hpp>
33
#include <com/sun/star/sheet/XSpreadsheet.hpp>
34
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
34
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
35
#include <com/sun/star/style/XStyle.hpp>
35
#include <com/sun/star/style/XStyle.hpp>
Lines 133-139 Link Here
133
    /** Returns the specified cell or page style from the Calc document. */
133
    /** Returns the specified cell or page style from the Calc document. */
134
    Reference< XStyle > getStyleObject( const OUString& rStyleName, bool bPageStyle ) const;
134
    Reference< XStyle > getStyleObject( const OUString& rStyleName, bool bPageStyle ) const;
135
    /** Creates and returns a defined name on-the-fly in the Calc document. */
135
    /** Creates and returns a defined name on-the-fly in the Calc document. */
136
    Reference< XNamedRange > createNamedRangeObject( OUString& orScope, OUString& orName, sal_Int32 nNameFlags ) const;
136
    Reference< XNamedRange2 > createNamedRangeObject( OUString& orScope, OUString& orName, sal_Int32 nNameFlags ) const;
137
    /** Creates and returns a database range on-the-fly in the Calc document. */
137
    /** Creates and returns a database range on-the-fly in the Calc document. */
138
    Reference< XDatabaseRange > createDatabaseRangeObject( OUString& orName, const CellRangeAddress& rRangeAddr ) const;
138
    Reference< XDatabaseRange > createDatabaseRangeObject( OUString& orName, const CellRangeAddress& rRangeAddr ) const;
139
    /** Creates and returns a com.sun.star.style.Style object for cells or pages. */
139
    /** Creates and returns a com.sun.star.style.Style object for cells or pages. */
Lines 348-362 Link Here
348
    return xStyle;
348
    return xStyle;
349
}
349
}
350
350
351
Reference< XNamedRange > WorkbookGlobals::createNamedRangeObject( OUString& orScope, OUString& orName, sal_Int32 nNameFlags ) const
351
Reference< XNamedRange2 > WorkbookGlobals::createNamedRangeObject( OUString& orScope, OUString& orName, sal_Int32 nNameFlags ) const
352
{
352
{
353
    // create the name and insert it into the Calc document
353
    // create the name and insert it into the Calc document
354
    Reference< XNamedRange > xNamedRange;
354
    Reference< XNamedRange2 > xNamedRange;
355
    if( orName.getLength() > 0 ) try
355
    if( orName.getLength() > 0 ) try
356
    {
356
    {
357
        // find an unused name
357
        // find an unused name
358
        PropertySet aDocProps( mxDoc );
358
        PropertySet aDocProps( mxDoc );
359
        Reference< XNamedRanges > xNamedRanges( aDocProps.getAnyProperty( PROP_NamedRanges ), UNO_QUERY_THROW );
359
        Reference< XNamedRanges2 > xNamedRanges( aDocProps.getAnyProperty( PROP_NamedRanges ), UNO_QUERY_THROW );
360
        Reference< XNameAccess > xNameAccess( xNamedRanges, UNO_QUERY_THROW );
360
        Reference< XNameAccess > xNameAccess( xNamedRanges, UNO_QUERY_THROW );
361
        orName = ContainerHelper::getUnusedName( xNameAccess, orName, '_' );
361
        orName = ContainerHelper::getUnusedName( xNameAccess, orName, '_' );
362
        // create the named range
362
        // create the named range
Lines 738-744 Link Here
738
    return mrBookGlob.getStyleObject( rStyleName, bPageStyle );
738
    return mrBookGlob.getStyleObject( rStyleName, bPageStyle );
739
}
739
}
740
740
741
Reference< XNamedRange > WorkbookHelper::createNamedRangeObject( OUString& orName, sal_Int32 nSheetId, sal_Int32 nNameFlags ) const
741
Reference< XNamedRange2 > WorkbookHelper::createNamedRangeObject( OUString& orName, sal_Int32 nSheetId, sal_Int32 nNameFlags ) const
742
{
742
{
743
	OUString orScope = nSheetId >= 0? getWorksheets().getCalcSheetName(nSheetId) : OUString();
743
	OUString orScope = nSheetId >= 0? getWorksheets().getCalcSheetName(nSheetId) : OUString();
744
    return mrBookGlob.createNamedRangeObject( orScope, orName, nNameFlags );
744
    return mrBookGlob.createNamedRangeObject( orScope, orName, nNameFlags );
(-)sc/inc/nameuno.hxx (-4 / +5 lines)
Lines 30-39 Link Here
30
#include <com/sun/star/sheet/XLabelRange.hpp>
30
#include <com/sun/star/sheet/XLabelRange.hpp>
31
#include <com/sun/star/sheet/XLabelRanges.hpp>
31
#include <com/sun/star/sheet/XLabelRanges.hpp>
32
#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
32
#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
33
#include <com/sun/star/sheet/XNamedRange.hpp>
33
#include <com/sun/star/sheet/XNamedRange2.hpp>
34
#include <com/sun/star/sheet/XFormulaTokens.hpp>
34
#include <com/sun/star/sheet/XFormulaTokens.hpp>
35
#include <com/sun/star/sheet/XNamedRanges.hpp>
35
#include <com/sun/star/sheet/XNamedRanges2.hpp>
36
#include <com/sun/star/container/XEnumerationAccess.hpp>
36
#include <com/sun/star/container/XEnumerationAccess.hpp>
37
#include <com/sun/star/sheet/RangeScopeName.hpp>
37
#include <com/sun/star/lang/XServiceName.hpp>
38
#include <com/sun/star/lang/XServiceName.hpp>
38
#include <com/sun/star/lang/XServiceInfo.hpp>
39
#include <com/sun/star/lang/XServiceInfo.hpp>
39
#include <com/sun/star/lang/XUnoTunnel.hpp>
40
#include <com/sun/star/lang/XUnoTunnel.hpp>
Lines 52-58 Link Here
52
53
53
54
54
class ScNamedRangeObj : public ::cppu::WeakImplHelper6<
55
class ScNamedRangeObj : public ::cppu::WeakImplHelper6<
55
							::com::sun::star::sheet::XNamedRange,
56
							::com::sun::star::sheet::XNamedRange2,
56
                            ::com::sun::star::sheet::XFormulaTokens,
57
                            ::com::sun::star::sheet::XFormulaTokens,
57
							::com::sun::star::sheet::XCellRangeReferrer,
58
							::com::sun::star::sheet::XCellRangeReferrer,
58
							::com::sun::star::beans::XPropertySet,
59
							::com::sun::star::beans::XPropertySet,
Lines 174-180 Link Here
174
175
175
176
176
class ScNamedRangesObj : public ::cppu::WeakImplHelper5<
177
class ScNamedRangesObj : public ::cppu::WeakImplHelper5<
177
							::com::sun::star::sheet::XNamedRanges,
178
							::com::sun::star::sheet::XNamedRanges2,
178
							::com::sun::star::container::XEnumerationAccess,
179
							::com::sun::star::container::XEnumerationAccess,
179
							::com::sun::star::container::XIndexAccess,
180
							::com::sun::star::container::XIndexAccess,
180
                            ::com::sun::star::document::XActionLockable,
181
                            ::com::sun::star::document::XActionLockable,
(-)sc/source/filter/xml/xmlexprt.cxx (-4 / +4 lines)
Lines 113-120 Link Here
113
#include <com/sun/star/text/XText.hpp>
113
#include <com/sun/star/text/XText.hpp>
114
#include <com/sun/star/sheet/XLabelRanges.hpp>
114
#include <com/sun/star/sheet/XLabelRanges.hpp>
115
#include <com/sun/star/sheet/XLabelRange.hpp>
115
#include <com/sun/star/sheet/XLabelRange.hpp>
116
#include <com/sun/star/sheet/XNamedRanges.hpp>
116
#include <com/sun/star/sheet/XNamedRanges2.hpp>
117
#include <com/sun/star/sheet/XNamedRange.hpp>
117
#include <com/sun/star/sheet/XNamedRange2.hpp>
118
#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
118
#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
119
#include <com/sun/star/sheet/NamedRangeFlag.hpp>
119
#include <com/sun/star/sheet/NamedRangeFlag.hpp>
120
#include <com/sun/star/container/XNamed.hpp>
120
#include <com/sun/star/container/XNamed.hpp>
Lines 3894-3900 Link Here
3894
	uno::Reference <beans::XPropertySet> xPropertySet (xSpreadDoc, uno::UNO_QUERY);
3894
	uno::Reference <beans::XPropertySet> xPropertySet (xSpreadDoc, uno::UNO_QUERY);
3895
	if (xPropertySet.is())
3895
	if (xPropertySet.is())
3896
	{
3896
	{
3897
        uno::Reference <sheet::XNamedRanges> xNamedRanges(xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_NAMEDRANGES))), uno::UNO_QUERY);
3897
        uno::Reference <sheet::XNamedRanges2> xNamedRanges(xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_NAMEDRANGES))), uno::UNO_QUERY);
3898
		CheckAttrList();
3898
		CheckAttrList();
3899
		if (xNamedRanges.is())
3899
		if (xNamedRanges.is())
3900
		{
3900
		{
Lines 3922-3928 Link Here
3922
						}
3922
						}
3923
						else if( nWhichTable !=MAXTABCOUNT)
3923
						else if( nWhichTable !=MAXTABCOUNT)
3924
							continue;
3924
							continue;
3925
                        uno::Reference <sheet::XNamedRange> xNamedRange(xNamedRanges->getByScopeName(sRangeScope,sNamedRange), uno::UNO_QUERY);
3925
                        uno::Reference <sheet::XNamedRange2> xNamedRange(xNamedRanges->getByScopeName(sRangeScope,sNamedRange), uno::UNO_QUERY);
3926
						//range scope name support 
3926
						//range scope name support 
3927
						if (xNamedRange.is())
3927
						if (xNamedRange.is())
3928
						{
3928
						{
(-)sc/source/filter/xml/xmlimprt.cxx (-4 / +4 lines)
Lines 84-92 Link Here
84
#include <com/sun/star/util/NumberFormat.hpp>
84
#include <com/sun/star/util/NumberFormat.hpp>
85
#include <com/sun/star/util/XNumberFormatTypes.hpp>
85
#include <com/sun/star/util/XNumberFormatTypes.hpp>
86
#include <tools/urlobj.hxx>
86
#include <tools/urlobj.hxx>
87
#include <com/sun/star/sheet/XNamedRanges.hpp>
87
#include <com/sun/star/sheet/XNamedRanges2.hpp>
88
#include <com/sun/star/sheet/NamedRangeFlag.hpp>
88
#include <com/sun/star/sheet/NamedRangeFlag.hpp>
89
#include <com/sun/star/sheet/XNamedRange.hpp>
89
#include <com/sun/star/sheet/XNamedRange2.hpp>
90
#include <com/sun/star/sheet/XLabelRanges.hpp>
90
#include <com/sun/star/sheet/XLabelRanges.hpp>
91
#include <com/sun/star/io/XSeekable.hpp>
91
#include <com/sun/star/io/XSeekable.hpp>
92
92
Lines 2733-2739 Link Here
2733
        uno::Reference <beans::XPropertySet> xPropertySet (GetModel(), uno::UNO_QUERY);
2733
        uno::Reference <beans::XPropertySet> xPropertySet (GetModel(), uno::UNO_QUERY);
2734
        if (xPropertySet.is())
2734
        if (xPropertySet.is())
2735
        {
2735
        {
2736
            uno::Reference <sheet::XNamedRanges> xNamedRanges(xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_NAMEDRANGES))), uno::UNO_QUERY);
2736
            uno::Reference <sheet::XNamedRanges2> xNamedRanges(xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_NAMEDRANGES))), uno::UNO_QUERY);
2737
            if (xNamedRanges.is())
2737
            if (xNamedRanges.is())
2738
            {
2738
            {
2739
                ScMyNamedExpressions::iterator aItr(pNamedExpressions->begin());
2739
                ScMyNamedExpressions::iterator aItr(pNamedExpressions->begin());
Lines 2795-2801 Link Here
2795
						rtl::OUString sRangeScope( sTableName);
2795
						rtl::OUString sRangeScope( sTableName);
2796
                        //uno::Reference <sheet::XNamedRange> xNamedRange(xNamedRanges->getByName((*aItr)->sName), uno::UNO_QUERY);
2796
                        //uno::Reference <sheet::XNamedRange> xNamedRange(xNamedRanges->getByName((*aItr)->sName), uno::UNO_QUERY);
2797
						//getByScopeName
2797
						//getByScopeName
2798
						uno::Reference <sheet::XNamedRange> xNamedRange(xNamedRanges->getByScopeName( sRangeScope,(*aItr)->sName), uno::UNO_QUERY);
2798
						uno::Reference <sheet::XNamedRange2> xNamedRange(xNamedRanges->getByScopeName( sRangeScope,(*aItr)->sName), uno::UNO_QUERY);
2799
                        if (xNamedRange.is())
2799
                        if (xNamedRange.is())
2800
                        {
2800
                        {
2801
                            LockSolarMutex();
2801
                            LockSolarMutex();
(-)sc/source/ui/unoobj/docuno.cxx (-3 / +3 lines)
Lines 49-55 Link Here
49
#include <float.h>	// DBL_MAX
49
#include <float.h>	// DBL_MAX
50
50
51
#include <com/sun/star/util/Date.hpp>
51
#include <com/sun/star/util/Date.hpp>
52
#include <com/sun/star/sheet/XNamedRanges.hpp>
52
#include <com/sun/star/sheet/XNamedRanges2.hpp>
53
#include <com/sun/star/sheet/XLabelRanges.hpp>
53
#include <com/sun/star/sheet/XLabelRanges.hpp>
54
#include <com/sun/star/i18n/XForbiddenCharacters.hpp>
54
#include <com/sun/star/i18n/XForbiddenCharacters.hpp>
55
#include <com/sun/star/script/XLibraryContainer.hpp>
55
#include <com/sun/star/script/XLibraryContainer.hpp>
Lines 134-140 Link Here
134
        {MAP_CHAR_LEN(SC_UNO_ITEREPSILON),       PROP_UNO_ITEREPSILON, &getCppuType((double*)0),                                 0, 0},
134
        {MAP_CHAR_LEN(SC_UNO_ITEREPSILON),       PROP_UNO_ITEREPSILON, &getCppuType((double*)0),                                 0, 0},
135
        {MAP_CHAR_LEN(SC_UNO_LOOKUPLABELS),      PROP_UNO_LOOKUPLABELS, &getBooleanCppuType(),                                    0, 0},
135
        {MAP_CHAR_LEN(SC_UNO_LOOKUPLABELS),      PROP_UNO_LOOKUPLABELS, &getBooleanCppuType(),                                    0, 0},
136
        {MAP_CHAR_LEN(SC_UNO_MATCHWHOLE),        PROP_UNO_MATCHWHOLE, &getBooleanCppuType(),                                    0, 0},
136
        {MAP_CHAR_LEN(SC_UNO_MATCHWHOLE),        PROP_UNO_MATCHWHOLE, &getBooleanCppuType(),                                    0, 0},
137
        {MAP_CHAR_LEN(SC_UNO_NAMEDRANGES),       0, &getCppuType((uno::Reference<sheet::XNamedRanges>*)0),    0, 0},
137
        {MAP_CHAR_LEN(SC_UNO_NAMEDRANGES),       0, &getCppuType((uno::Reference<sheet::XNamedRanges2>*)0),    0, 0},
138
        {MAP_CHAR_LEN(SC_UNO_DATABASERNG),       0, &getCppuType((uno::Reference<sheet::XDatabaseRanges>*)0), 0, 0},
138
        {MAP_CHAR_LEN(SC_UNO_DATABASERNG),       0, &getCppuType((uno::Reference<sheet::XDatabaseRanges>*)0), 0, 0},
139
        {MAP_CHAR_LEN(SC_UNO_NULLDATE),          PROP_UNO_NULLDATE, &getCppuType((util::Date*)0),                             0, 0},
139
        {MAP_CHAR_LEN(SC_UNO_NULLDATE),          PROP_UNO_NULLDATE, &getCppuType((util::Date*)0),                             0, 0},
140
        {MAP_CHAR_LEN(SC_UNO_ROWLABELRNG),       0, &getCppuType((uno::Reference<sheet::XLabelRanges>*)0),    0, 0},
140
        {MAP_CHAR_LEN(SC_UNO_ROWLABELRNG),       0, &getCppuType((uno::Reference<sheet::XLabelRanges>*)0),    0, 0},
Lines 1848-1854 Link Here
1848
		}
1848
		}
1849
		else if ( aString.EqualsAscii( SC_UNO_NAMEDRANGES ) )
1849
		else if ( aString.EqualsAscii( SC_UNO_NAMEDRANGES ) )
1850
		{
1850
		{
1851
			aRet <<= uno::Reference<sheet::XNamedRanges>(new ScNamedRangesObj( pDocShell ));
1851
			aRet <<= uno::Reference<sheet::XNamedRanges2>(new ScNamedRangesObj( pDocShell ));
1852
		}
1852
		}
1853
		else if ( aString.EqualsAscii( SC_UNO_DATABASERNG ) )
1853
		else if ( aString.EqualsAscii( SC_UNO_DATABASERNG ) )
1854
		{
1854
		{
(-)sc/source/ui/unoobj/nameuno.cxx (-4 / +4 lines)
Lines 763-769 Link Here
763
									lang::WrappedTargetException, uno::RuntimeException)
763
									lang::WrappedTargetException, uno::RuntimeException)
764
{
764
{
765
	ScUnoGuard aGuard;
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() )
767
	if ( xRange.is() )
768
        return uno::makeAny(xRange);
768
        return uno::makeAny(xRange);
769
	else
769
	else
Lines 774-780 Link Here
774
uno::Type SAL_CALL ScNamedRangesObj::getElementType() throw(uno::RuntimeException)
774
uno::Type SAL_CALL ScNamedRangesObj::getElementType() throw(uno::RuntimeException)
775
{
775
{
776
	ScUnoGuard aGuard;
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
}
778
}
779
779
780
sal_Bool SAL_CALL ScNamedRangesObj::hasElements() throw(uno::RuntimeException)
780
sal_Bool SAL_CALL ScNamedRangesObj::hasElements() throw(uno::RuntimeException)
Lines 788-794 Link Here
788
					lang::WrappedTargetException, uno::RuntimeException)
788
					lang::WrappedTargetException, uno::RuntimeException)
789
{
789
{
790
	ScUnoGuard aGuard;
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() )
792
	if ( xRange.is() )
793
        return uno::makeAny(xRange);
793
        return uno::makeAny(xRange);
794
	else
794
	else
Lines 801-807 Link Here
801
					lang::WrappedTargetException, uno::RuntimeException)
801
					lang::WrappedTargetException, uno::RuntimeException)
802
{
802
{
803
	ScUnoGuard aGuard;
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() )
805
	if ( xRange.is() )
806
        return uno::makeAny(xRange);
806
        return uno::makeAny(xRange);
807
	else
807
	else
(-)sc/source/ui/vba/vbaapplication.cxx (-2 / +2 lines)
Lines 34-40 Link Here
34
#include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
34
#include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
35
#include <com/sun/star/task/XStatusIndicator.hpp>
35
#include <com/sun/star/task/XStatusIndicator.hpp>
36
#include <ooo/vba/excel/XlMousePointer.hpp>
36
#include <ooo/vba/excel/XlMousePointer.hpp>
37
#include <com/sun/star/sheet/XNamedRanges.hpp>
37
#include <com/sun/star/sheet/XNamedRanges2.hpp>
38
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
38
#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
39
#include <ooo/vba/XExecutableDialog.hpp>
39
#include <ooo/vba/XExecutableDialog.hpp>
40
40
Lines 459-465 Link Here
459
{
459
{
460
    uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
460
    uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
461
    uno::Reference< beans::XPropertySet > xPropertySet( xModel, uno::UNO_QUERY_THROW );
461
    uno::Reference< beans::XPropertySet > xPropertySet( xModel, uno::UNO_QUERY_THROW );
462
    uno::Reference< sheet::XNamedRanges > xNamedRanges( xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("NamedRanges")) , uno::UNO_QUERY_THROW );
462
    uno::Reference< sheet::XNamedRanges2 > xNamedRanges( xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("NamedRanges")) , uno::UNO_QUERY_THROW );
463
    css::uno::Reference< excel::XNames > xNames ( new ScVbaNames( this , mxContext , xNamedRanges , xModel ) );
463
    css::uno::Reference< excel::XNames > xNames ( new ScVbaNames( this , mxContext , xNamedRanges , xModel ) );
464
    if (  aIndex.getValueTypeClass() == uno::TypeClass_VOID )
464
    if (  aIndex.getValueTypeClass() == uno::TypeClass_VOID )
465
    {
465
    {
(-)sc/source/ui/vba/vbaname.cxx (-2 / +2 lines)
Lines 40-47 Link Here
40
40
41
ScVbaName::ScVbaName(const css::uno::Reference< ov::XHelperInterface >& xParent, 
41
ScVbaName::ScVbaName(const css::uno::Reference< ov::XHelperInterface >& xParent, 
42
			const css::uno::Reference< css::uno::XComponentContext >& xContext,
42
			const css::uno::Reference< css::uno::XComponentContext >& xContext,
43
			const css::uno::Reference< css::sheet::XNamedRange >& xName,
43
			const css::uno::Reference< css::sheet::XNamedRange2 >& xName,
44
			const css::uno::Reference< css::sheet::XNamedRanges >& xNames,
44
			const css::uno::Reference< css::sheet::XNamedRanges2 >& xNames,
45
			const css::uno::Reference< css::frame::XModel >& xModel ):
45
			const css::uno::Reference< css::frame::XModel >& xModel ):
46
			NameImpl_BASE(  xParent , xContext ), 
46
			NameImpl_BASE(  xParent , xContext ), 
47
			mxModel( xModel ),
47
			mxModel( xModel ),
(-)sc/source/ui/vba/vbaname.hxx (-5 / +5 lines)
Lines 24-31 Link Here
24
#define SC_VBA_NAME_HXX
24
#define SC_VBA_NAME_HXX
25
25
26
#include <ooo/vba/excel/XName.hpp>
26
#include <ooo/vba/excel/XName.hpp>
27
#include <com/sun/star/sheet/XNamedRange.hpp>
27
#include <com/sun/star/sheet/XNamedRange2.hpp>
28
#include <com/sun/star/sheet/XNamedRanges.hpp>
28
#include <com/sun/star/sheet/XNamedRanges2.hpp>
29
29
30
#include <vbahelper/vbahelperinterface.hxx>
30
#include <vbahelper/vbahelperinterface.hxx>
31
31
Lines 36-43 Link Here
36
class ScVbaName : public NameImpl_BASE 
36
class ScVbaName : public NameImpl_BASE 
37
{
37
{
38
	css::uno::Reference< css::frame::XModel > mxModel;
38
	css::uno::Reference< css::frame::XModel > mxModel;
39
	css::uno::Reference< css::sheet::XNamedRange > mxNamedRange;
39
	css::uno::Reference< css::sheet::XNamedRange2 > mxNamedRange;
40
	css::uno::Reference< css::sheet::XNamedRanges > mxNames;
40
	css::uno::Reference< css::sheet::XNamedRanges2 > mxNames;
41
41
42
	ScDocument * m_pDoc;
42
	ScDocument * m_pDoc;
43
43
Lines 46-52 Link Here
46
	virtual css::uno::Reference< ov::excel::XWorksheet > getWorkSheet() throw (css::uno::RuntimeException);
46
	virtual css::uno::Reference< ov::excel::XWorksheet > getWorkSheet() throw (css::uno::RuntimeException);
47
47
48
public:
48
public:
49
	ScVbaName( const css::uno::Reference< ov::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRange >& xName , const css::uno::Reference< css::sheet::XNamedRanges >& xNames , const css::uno::Reference< css::frame::XModel >& xModel );
49
	ScVbaName( const css::uno::Reference< ov::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRange2 >& xName , const css::uno::Reference< css::sheet::XNamedRanges2 >& xNames , const css::uno::Reference< css::frame::XModel >& xModel );
50
	virtual ~ScVbaName();
50
	virtual ~ScVbaName();
51
51
52
	// Attributes
52
	// Attributes
(-)sc/source/ui/vba/vbanames.cxx (-6 / +6 lines)
Lines 42-54 Link Here
42
{
42
{
43
	uno::Reference< frame::XModel > m_xModel;
43
	uno::Reference< frame::XModel > m_xModel;
44
	uno::WeakReference< XHelperInterface > m_xParent;
44
	uno::WeakReference< XHelperInterface > m_xParent;
45
	uno::Reference< sheet::XNamedRanges > m_xNames;
45
	uno::Reference< sheet::XNamedRanges2 > m_xNames;
46
public:
46
public:
47
    NamesEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration,  const uno::Reference< frame::XModel >& xModel , const uno::Reference< sheet::XNamedRanges >& xNames ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_xModel( xModel ), m_xParent( xParent ), m_xNames( xNames ) {}
47
    NamesEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration,  const uno::Reference< frame::XModel >& xModel , const uno::Reference< sheet::XNamedRanges2 >& xNames ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_xModel( xModel ), m_xParent( xParent ), m_xNames( xNames ) {}
48
48
49
	virtual uno::Any SAL_CALL nextElement(  ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
49
	virtual uno::Any SAL_CALL nextElement(  ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
50
	{
50
	{
51
		uno::Reference< sheet::XNamedRange > xNamed( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
51
		uno::Reference< sheet::XNamedRange2 > xNamed( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW );
52
		return uno::makeAny( uno::Reference< excel::XName > ( new ScVbaName( m_xParent, m_xContext, xNamed ,m_xNames , m_xModel ) ) );
52
		return uno::makeAny( uno::Reference< excel::XName > ( new ScVbaName( m_xParent, m_xContext, xNamed ,m_xNames , m_xModel ) ) );
53
	}
53
	}
54
54
Lines 57-63 Link Here
57
57
58
ScVbaNames::ScVbaNames(const css::uno::Reference< ov::XHelperInterface >& xParent, 
58
ScVbaNames::ScVbaNames(const css::uno::Reference< ov::XHelperInterface >& xParent, 
59
			const css::uno::Reference< css::uno::XComponentContext >& xContext,
59
			const css::uno::Reference< css::uno::XComponentContext >& xContext,
60
			const css::uno::Reference< css::sheet::XNamedRanges >& xNames,
60
			const css::uno::Reference< css::sheet::XNamedRanges2 >& xNames,
61
			const css::uno::Reference< css::frame::XModel >& xModel ):
61
			const css::uno::Reference< css::frame::XModel >& xModel ):
62
			ScVbaNames_BASE(  xParent , xContext , uno::Reference< container::XIndexAccess >( xNames, uno::UNO_QUERY ) ), 
62
			ScVbaNames_BASE(  xParent , xContext , uno::Reference< container::XIndexAccess >( xNames, uno::UNO_QUERY ) ), 
63
			mxModel( xModel ),
63
			mxModel( xModel ),
Lines 153-159 Link Here
153
			if ( mxNames->hasByName( sName ) )
153
			if ( mxNames->hasByName( sName ) )
154
				mxNames->removeByName(sName);
154
				mxNames->removeByName(sName);
155
			mxNames->addNewByName( sName , rtl::OUString(sTmp) , aCellAddr , (sal_Int32)nType);
155
			mxNames->addNewByName( sName , rtl::OUString(sTmp) , aCellAddr , (sal_Int32)nType);
156
			uno::Reference< sheet::XNamedRange > xName( mxNames->getByName( sName ), uno::UNO_QUERY_THROW );
156
			uno::Reference< sheet::XNamedRange2 > xName( mxNames->getByName( sName ), uno::UNO_QUERY_THROW );
157
            return uno::Any( uno::Reference< excel::XName >( new ScVbaName( getParent(), mxContext, xName, mxNames, mxModel ) ) );
157
            return uno::Any( uno::Reference< excel::XName >( new ScVbaName( getParent(), mxContext, xName, mxNames, mxModel ) ) );
158
		}
158
		}
159
	}
159
	}
Lines 177-183 Link Here
177
uno::Any
177
uno::Any
178
ScVbaNames::createCollectionObject( const uno::Any& aSource )
178
ScVbaNames::createCollectionObject( const uno::Any& aSource )
179
{
179
{
180
	uno::Reference< sheet::XNamedRange > xName( aSource, uno::UNO_QUERY );
180
	uno::Reference< sheet::XNamedRange2 > xName( aSource, uno::UNO_QUERY );
181
	return uno::makeAny( uno::Reference< excel::XName > ( new ScVbaName( getParent(), mxContext, xName, mxNames , mxModel ) ) );
181
	return uno::makeAny( uno::Reference< excel::XName > ( new ScVbaName( getParent(), mxContext, xName, mxNames , mxModel ) ) );
182
}
182
}
183
183
(-)sc/source/ui/vba/vbanames.hxx (-3 / +3 lines)
Lines 26-32 Link Here
26
#include <ooo/vba/excel/XNames.hpp>
26
#include <ooo/vba/excel/XNames.hpp>
27
#include <ooo/vba/XCollection.hpp>
27
#include <ooo/vba/XCollection.hpp>
28
#include <com/sun/star/container/XEnumerationAccess.hpp>
28
#include <com/sun/star/container/XEnumerationAccess.hpp>
29
#include <com/sun/star/sheet/XNamedRanges.hpp>
29
#include <com/sun/star/sheet/XNamedRanges2.hpp>
30
#include <vbahelper/vbacollectionimpl.hxx>
30
#include <vbahelper/vbacollectionimpl.hxx>
31
31
32
class ScDocument;
32
class ScDocument;
Lines 37-49 Link Here
37
class ScVbaNames : public ScVbaNames_BASE
37
class ScVbaNames : public ScVbaNames_BASE
38
{
38
{
39
	css::uno::Reference< css::frame::XModel > mxModel;
39
	css::uno::Reference< css::frame::XModel > mxModel;
40
	css::uno::Reference< css::sheet::XNamedRanges > mxNames;
40
	css::uno::Reference< css::sheet::XNamedRanges2 > mxNames;
41
	
41
	
42
protected:
42
protected:
43
	virtual css::uno::Reference< css::frame::XModel >  getModel() { return mxModel; }
43
	virtual css::uno::Reference< css::frame::XModel >  getModel() { return mxModel; }
44
44
45
public:
45
public:
46
	ScVbaNames( const css::uno::Reference< ov::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRanges >& xNames , const css::uno::Reference< css::frame::XModel >& xModel );
46
	ScVbaNames( const css::uno::Reference< ov::XHelperInterface >& xParent,  const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRanges2 >& xNames , const css::uno::Reference< css::frame::XModel >& xModel );
47
	
47
	
48
	ScDocument* getScDocument();
48
	ScDocument* getScDocument();
49
	ScDocShell* getScDocShell();
49
	ScDocShell* getScDocShell();
(-)sc/source/ui/vba/vbarange.cxx (-2 / +2 lines)
Lines 51-57 Link Here
51
#include <com/sun/star/sheet/XSpreadsheet.hpp>
51
#include <com/sun/star/sheet/XSpreadsheet.hpp>
52
#include <com/sun/star/sheet/XSheetCellCursor.hpp>
52
#include <com/sun/star/sheet/XSheetCellCursor.hpp>
53
#include <com/sun/star/sheet/XArrayFormulaRange.hpp>
53
#include <com/sun/star/sheet/XArrayFormulaRange.hpp>
54
#include <com/sun/star/sheet/XNamedRange.hpp>
54
#include <com/sun/star/sheet/XNamedRange2.hpp>
55
#include <com/sun/star/sheet/XPrintAreas.hpp>
55
#include <com/sun/star/sheet/XPrintAreas.hpp>
56
#include <com/sun/star/sheet/XCellRangesQuery.hpp>
56
#include <com/sun/star/sheet/XCellRangesQuery.hpp>
57
#include <com/sun/star/beans/XPropertySet.hpp>
57
#include <com/sun/star/beans/XPropertySet.hpp>
Lines 1196-1202 Link Here
1196
		rtl::OUString sAddress = (*it).trim();
1196
		rtl::OUString sAddress = (*it).trim();
1197
		if ( xNameAccess->hasByName( sAddress ) )
1197
		if ( xNameAccess->hasByName( sAddress ) )
1198
		{
1198
		{
1199
			uno::Reference< sheet::XNamedRange > xNamed( xNameAccess->getByName( sAddress ), uno::UNO_QUERY_THROW );
1199
			uno::Reference< sheet::XNamedRange2 > xNamed( xNameAccess->getByName( sAddress ), uno::UNO_QUERY_THROW );
1200
			sAddress = xNamed->getContent();
1200
			sAddress = xNamed->getContent();
1201
			// As the address comes from OOO, the addressing
1201
			// As the address comes from OOO, the addressing
1202
			// style is may not be XL_A1
1202
			// style is may not be XL_A1
(-)sc/source/ui/vba/vbaworkbook.cxx (-1 / +1 lines)
Lines 311-317 Link Here
311
{
311
{
312
	uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_SET_THROW );
312
	uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_SET_THROW );
313
	uno::Reference< beans::XPropertySet > xProps( xModel, uno::UNO_QUERY_THROW );
313
	uno::Reference< beans::XPropertySet > xProps( xModel, uno::UNO_QUERY_THROW );
314
	uno::Reference< sheet::XNamedRanges > xNamedRanges(  xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NamedRanges") ) ), uno::UNO_QUERY_THROW );
314
	uno::Reference< sheet::XNamedRanges2 > xNamedRanges(  xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NamedRanges") ) ), uno::UNO_QUERY_THROW );
315
	uno::Reference< XCollection > xNames( new ScVbaNames( this, mxContext, xNamedRanges, xModel ) );
315
	uno::Reference< XCollection > xNames( new ScVbaNames( this, mxContext, xNamedRanges, xModel ) );
316
    if ( aIndex.hasValue() )
316
    if ( aIndex.hasValue() )
317
        return uno::Any( xNames->Item( aIndex, uno::Any() ) );
317
        return uno::Any( xNames->Item( aIndex, uno::Any() ) );
(-)sc/source/ui/vba/vbaworksheet.cxx (-2 / +2 lines)
Lines 47-53 Link Here
47
#include <com/sun/star/sheet/XSheetOutline.hpp>
47
#include <com/sun/star/sheet/XSheetOutline.hpp>
48
#include <com/sun/star/sheet/XSheetPageBreak.hpp>
48
#include <com/sun/star/sheet/XSheetPageBreak.hpp>
49
#include <com/sun/star/sheet/XDataPilotTablesSupplier.hpp>
49
#include <com/sun/star/sheet/XDataPilotTablesSupplier.hpp>
50
#include <com/sun/star/sheet/XNamedRanges.hpp>
50
#include <com/sun/star/sheet/XNamedRanges2.hpp>
51
#include <com/sun/star/util/XURLTransformer.hpp>
51
#include <com/sun/star/util/XURLTransformer.hpp>
52
#include <com/sun/star/frame/XDispatchProvider.hpp>
52
#include <com/sun/star/frame/XDispatchProvider.hpp>
53
#include <com/sun/star/frame/XComponentLoader.hpp>
53
#include <com/sun/star/frame/XComponentLoader.hpp>
Lines 738-744 Link Here
738
    // #163498# initialize Names object with correct parent (this worksheet)
738
    // #163498# initialize Names object with correct parent (this worksheet)
739
    // TODO: real sheet-local names...
739
    // TODO: real sheet-local names...
740
	uno::Reference< beans::XPropertySet > xProps( mxModel, uno::UNO_QUERY_THROW );
740
	uno::Reference< beans::XPropertySet > xProps( mxModel, uno::UNO_QUERY_THROW );
741
	uno::Reference< sheet::XNamedRanges > xNamedRanges(  xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NamedRanges") ) ), uno::UNO_QUERY_THROW );
741
	uno::Reference< sheet::XNamedRanges2 > xNamedRanges(  xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NamedRanges") ) ), uno::UNO_QUERY_THROW );
742
	uno::Reference< XCollection > xNames( new ScVbaNames( this, mxContext, xNamedRanges, mxModel ) );
742
	uno::Reference< XCollection > xNames( new ScVbaNames( this, mxContext, xNamedRanges, mxModel ) );
743
    if ( aIndex.hasValue() )
743
    if ( aIndex.hasValue() )
744
        return uno::Any( xNames->Item( aIndex, uno::Any() ) );
744
        return uno::Any( xNames->Item( aIndex, uno::Any() ) );

Return to issue 120478