sheetdatabuffer.cxx (79aad27f) | sheetdatabuffer.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 --- 14 unchanged lines hidden (view full) --- 23 24#include "oox/xls/sheetdatabuffer.hxx" 25 26#include <algorithm> 27#include <com/sun/star/sheet/XArrayFormulaTokens.hpp> 28#include <com/sun/star/sheet/XCellRangeData.hpp> 29#include <com/sun/star/sheet/XFormulaTokens.hpp> 30#include <com/sun/star/sheet/XMultipleOperation.hpp> | 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 --- 14 unchanged lines hidden (view full) --- 23 24#include "oox/xls/sheetdatabuffer.hxx" 25 26#include <algorithm> 27#include <com/sun/star/sheet/XArrayFormulaTokens.hpp> 28#include <com/sun/star/sheet/XCellRangeData.hpp> 29#include <com/sun/star/sheet/XFormulaTokens.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/text/XText.hpp> 33#include <com/sun/star/util/DateTime.hpp> 34#include <com/sun/star/util/NumberFormat.hpp> 35#include <com/sun/star/util/XMergeable.hpp> 36#include <com/sun/star/util/XNumberFormatTypes.hpp> 37#include <com/sun/star/util/XNumberFormatsSupplier.hpp> 38#include <rtl/ustrbuf.hxx> --- 627 unchanged lines hidden (view full) --- 666 667void SheetDataBuffer::createSharedFormula( const BinAddress& rMapKey, const ApiTokenSequence& rTokens ) 668{ 669 // create the defined name that will represent the shared formula 670 OUString aName = OUStringBuffer().appendAscii( RTL_CONSTASCII_STRINGPARAM( "__shared_" ) ). 671 append( static_cast< sal_Int32 >( getSheetIndex() + 1 ) ). 672 append( sal_Unicode( '_' ) ).append( rMapKey.mnRow ). 673 append( sal_Unicode( '_' ) ).append( rMapKey.mnCol ).makeStringAndClear(); | 32#include <com/sun/star/table/XCell.hpp> 33#include <com/sun/star/text/XText.hpp> 34#include <com/sun/star/util/DateTime.hpp> 35#include <com/sun/star/util/NumberFormat.hpp> 36#include <com/sun/star/util/XMergeable.hpp> 37#include <com/sun/star/util/XNumberFormatTypes.hpp> 38#include <com/sun/star/util/XNumberFormatsSupplier.hpp> 39#include <rtl/ustrbuf.hxx> --- 627 unchanged lines hidden (view full) --- 667 668void SheetDataBuffer::createSharedFormula( const BinAddress& rMapKey, const ApiTokenSequence& rTokens ) 669{ 670 // create the defined name that will represent the shared formula 671 OUString aName = OUStringBuffer().appendAscii( RTL_CONSTASCII_STRINGPARAM( "__shared_" ) ). 672 append( static_cast< sal_Int32 >( getSheetIndex() + 1 ) ). 673 append( sal_Unicode( '_' ) ).append( rMapKey.mnRow ). 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 PropertySet aNameProps( xNamedRange ); 677 aNameProps.setProperty( PROP_IsSharedFormula, true ); 678 679 // get and store the token index of the defined name 680 OSL_ENSURE( maSharedFormulas.count( rMapKey ) == 0, "SheetDataBuffer::createSharedFormula - shared formula exists already" ); 681 sal_Int32 nTokenIndex = 0; 682 if( aNameProps.getProperty( nTokenIndex, PROP_TokenIndex ) && (nTokenIndex >= 0) ) try --- 249 unchanged lines hidden --- | 676 OSL_ENSURE( xNamedRange.is(), "SheetDataBuffer::createSharedFormula - cannot create shared formula" ); 677 PropertySet aNameProps( xNamedRange ); 678 aNameProps.setProperty( PROP_IsSharedFormula, true ); 679 680 // get and store the token index of the defined name 681 OSL_ENSURE( maSharedFormulas.count( rMapKey ) == 0, "SheetDataBuffer::createSharedFormula - shared formula exists already" ); 682 sal_Int32 nTokenIndex = 0; 683 if( aNameProps.getProperty( nTokenIndex, PROP_TokenIndex ) && (nTokenIndex >= 0) ) try --- 249 unchanged lines hidden --- |