summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-08-06 21:25:50 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-08-12 19:46:25 -0400
commit492f0ad5347ed640c3a12b61e22d279b29becb88 (patch)
tree9eca668aa5745e147023d6f26d66096f4e29dc38
parent027f8cd9442aec9c432bfcfc69f7d6e81b760eb5 (diff)
Some cosmetic "fix"
Change-Id: I80baff3b1794619659e505622164e2582e762248
-rw-r--r--sc/source/filter/inc/formulabuffer.hxx77
-rw-r--r--sc/source/filter/oox/formulabuffer.cxx2
2 files changed, 39 insertions, 40 deletions
diff --git a/sc/source/filter/inc/formulabuffer.hxx b/sc/source/filter/inc/formulabuffer.hxx
index 984f9c89e2a8..1e98060b48aa 100644
--- a/sc/source/filter/inc/formulabuffer.hxx
+++ b/sc/source/filter/inc/formulabuffer.hxx
@@ -25,49 +25,46 @@
#include "sheetdatabuffer.hxx"
#include <com/sun/star/sheet/XFormulaTokens.hpp>
-namespace oox {
-namespace xls {
+namespace oox { namespace xls {
class FormulaBuffer : public WorkbookHelper
{
-private:
-struct SharedFormulaEntry
-{
- ::com::sun::star::table::CellAddress maAddress;
- OUString maTokenStr;
- sal_Int32 mnSharedId;
- ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XFormulaTokens > mxFormulaTokens;
- SharedFormulaEntry( const ::com::sun::star::table::CellAddress& rAddress, const OUString& rTokenStr, sal_Int32 nSharedId ) : maAddress( rAddress ), maTokenStr( rTokenStr ), mnSharedId( nSharedId ) {}
-};
-
+ struct SharedFormulaEntry
+ {
+ ::com::sun::star::table::CellAddress maAddress;
+ OUString maTokenStr;
+ sal_Int32 mnSharedId;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XFormulaTokens > mxFormulaTokens;
+ SharedFormulaEntry( const ::com::sun::star::table::CellAddress& rAddress, const OUString& rTokenStr, sal_Int32 nSharedId ) : maAddress( rAddress ), maTokenStr( rTokenStr ), mnSharedId( nSharedId ) {}
+ };
-struct TokenAddressItem
-{
- OUString maTokenStr;
- ::com::sun::star::table::CellAddress maCellAddress;
- TokenAddressItem( const OUString& rTokenStr, const ::com::sun::star::table::CellAddress& rCellAddress ) : maTokenStr( rTokenStr ), maCellAddress( rCellAddress ) {}
-};
+ struct TokenAddressItem
+ {
+ OUString maTokenStr;
+ ::com::sun::star::table::CellAddress maCellAddress;
+ TokenAddressItem( const OUString& rTokenStr, const ::com::sun::star::table::CellAddress& rCellAddress ) : maTokenStr( rTokenStr ), maCellAddress( rCellAddress ) {}
+ };
-struct TokenRangeAddressItem
-{
- TokenAddressItem maTokenAndAddress;
- ::com::sun::star::table::CellRangeAddress maCellRangeAddress;
- TokenRangeAddressItem( const TokenAddressItem& rTokenAndAddress, const ::com::sun::star::table::CellRangeAddress& rCellRangeAddress ) : maTokenAndAddress( rTokenAndAddress ), maCellRangeAddress( rCellRangeAddress ) {}
-};
+ struct TokenRangeAddressItem
+ {
+ TokenAddressItem maTokenAndAddress;
+ ::com::sun::star::table::CellRangeAddress maCellRangeAddress;
+ TokenRangeAddressItem( const TokenAddressItem& rTokenAndAddress, const ::com::sun::star::table::CellRangeAddress& rCellRangeAddress ) : maTokenAndAddress( rTokenAndAddress ), maCellRangeAddress( rCellRangeAddress ) {}
+ };
-typedef ::std::map< sal_Int32, std::vector< TokenAddressItem > > FormulaDataMap;
-typedef ::std::map< sal_Int32, std::vector< TokenRangeAddressItem > > ArrayFormulaDataMap;
-// shared formuala descriptions, the id and address the formula is at
-typedef std::pair< ::com::sun::star::table::CellAddress, sal_Int32 > SharedFormulaDesc;
-// sheet -> list of shared formula descriptions
-typedef ::std::map< sal_Int32, std::vector< SharedFormulaDesc > > SheetToSharedFormulaid;
-// sheet -> stuff needed to create shared formulae
-typedef ::std::map< sal_Int32, std::vector< SharedFormulaEntry > > SheetToFormulaEntryMap;
-// sharedId -> tokedId
-typedef ::std::map< sal_Int32, sal_Int32 > SharedIdToTokenIndex;
-typedef ::std::map< sal_Int32, SharedIdToTokenIndex > SheetToSharedIdToTokenIndex;
-typedef ::std::pair< ::com::sun::star::table::CellAddress, double > ValueAddressPair;
-typedef ::std::map< sal_Int32, std::vector< ValueAddressPair > > FormulaValueMap;
+ typedef ::std::map< sal_Int32, std::vector< TokenAddressItem > > FormulaDataMap;
+ typedef ::std::map< sal_Int32, std::vector< TokenRangeAddressItem > > ArrayFormulaDataMap;
+ // shared formuala descriptions, the id and address the formula is at
+ typedef std::pair< ::com::sun::star::table::CellAddress, sal_Int32 > SharedFormulaDesc;
+ // sheet -> list of shared formula descriptions
+ typedef ::std::map< sal_Int32, std::vector< SharedFormulaDesc > > SheetToSharedFormulaid;
+ // sheet -> stuff needed to create shared formulae
+ typedef ::std::map< sal_Int32, std::vector< SharedFormulaEntry > > SheetToFormulaEntryMap;
+ // sharedId -> tokedId
+ typedef ::std::map< sal_Int32, sal_Int32 > SharedIdToTokenIndex;
+ typedef ::std::map< sal_Int32, SharedIdToTokenIndex > SheetToSharedIdToTokenIndex;
+ typedef ::std::pair< ::com::sun::star::table::CellAddress, double > ValueAddressPair;
+ typedef ::std::map< sal_Int32, std::vector< ValueAddressPair > > FormulaValueMap;
void createSharedFormula( const ::com::sun::star::table::CellAddress& rAddress, sal_Int32 nSharedId, const OUString& rTokens );
::com::sun::star::uno::Reference< com::sun::star::table::XCellRange > getRange( const ::com::sun::star::table::CellRangeAddress& rRange);
@@ -93,7 +90,9 @@ public:
void setCellArrayFormula( const ::com::sun::star::table::CellRangeAddress& rRangeAddress, const ::com::sun::star::table::CellAddress& rTokenAddress, const OUString& );
void createSharedFormulaMapEntry( const ::com::sun::star::table::CellAddress& rAddress, sal_Int32 nSharedId, const OUString& rTokens );
};
-}
-}
+
+}}
+
#endif
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/oox/formulabuffer.cxx b/sc/source/filter/oox/formulabuffer.cxx
index 0c4432959511..3889b538fb5f 100644
--- a/sc/source/filter/oox/formulabuffer.cxx
+++ b/sc/source/filter/oox/formulabuffer.cxx
@@ -222,7 +222,7 @@ void FormulaBuffer::setCellFormulaValue( const ::com::sun::star::table::CellAddr
cellFormulaValues[ rAddress.Sheet ].push_back( ValueAddressPair( rAddress, fValue ) );
}
-void FormulaBuffer::createSharedFormula( const ::com::sun::star::table::CellAddress& rAddress, sal_Int32 nSharedId, const OUString& rTokenStr )
+void FormulaBuffer::createSharedFormula( const ::com::sun::star::table::CellAddress& rAddress, sal_Int32 nSharedId, const OUString& rTokenStr )
{
ApiTokenSequence aTokens = getFormulaParser().importFormula( rAddress, rTokenStr );
OUString aName = OUStringBuffer().appendAscii( RTL_CONSTASCII_STRINGPARAM( "__shared_" ) ).