diff options
author | Eike Rathke <erack@redhat.com> | 2015-11-30 16:07:46 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-11-30 16:10:11 +0100 |
commit | 2c1c6df24060a08f7b6c49874c0e8a86a32e1dfd (patch) | |
tree | be9dc7d442eb0da5f929396345b335aabbf0bb6b | |
parent | 111f34acca8520e8d6ec6115ca59bb06cf8b4a91 (diff) |
number format keys are sal_uInt32, so use it
Change-Id: I0adf5f443ed3348ca0b975bd64bd4a293ff30f79
-rw-r--r-- | sc/source/filter/excel/xestyle.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/excel/xetable.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/inc/xestyle.hxx | 12 |
3 files changed, 12 insertions, 12 deletions
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 55ebdcf7975b..3f826554411e 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -1373,7 +1373,7 @@ XclExpNumFmtBuffer::~XclExpNumFmtBuffer() { } -sal_uInt16 XclExpNumFmtBuffer::Insert( sal_uLong nScNumFmt ) +sal_uInt16 XclExpNumFmtBuffer::Insert( sal_uInt32 nScNumFmt ) { XclExpNumFmtVec::const_iterator aIt = ::std::find_if( maFormatMap.begin(), maFormatMap.end(), XclExpNumFmtPred( nScNumFmt ) ); @@ -1433,14 +1433,14 @@ void XclExpNumFmtBuffer::WriteFormatRecord( XclExpStream& rStrm, const XclExpNum namespace { -OUString GetNumberFormatCode(XclRoot& rRoot, const sal_uInt16 nScNumFmt, SvNumberFormatter* pFormatter, NfKeywordTable* pKeywordTable) +OUString GetNumberFormatCode(XclRoot& rRoot, const sal_uInt32 nScNumFmt, SvNumberFormatter* pFormatter, NfKeywordTable* pKeywordTable) { return rRoot.GetFormatter().GetFormatStringForExcel( nScNumFmt, *pKeywordTable, *pFormatter); } } -OUString XclExpNumFmtBuffer::GetFormatCode( sal_uInt16 nScNumFmt ) +OUString XclExpNumFmtBuffer::GetFormatCode( sal_uInt32 nScNumFmt ) { return GetNumberFormatCode( *this, nScNumFmt, mxFormatter.get(), mpKeywordTable.get() ); } @@ -3027,7 +3027,7 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot ) const SfxPoolItem *pPoolItem = nullptr; if( rSet.GetItemState( ATTR_VALUE_FORMAT, true, &pPoolItem ) == SfxItemState::SET ) { - sal_uLong nScNumFmt = static_cast< const SfxUInt32Item* >(pPoolItem)->GetValue(); + sal_uInt32 nScNumFmt = static_cast< const SfxUInt32Item* >(pPoolItem)->GetValue(); sal_Int32 nXclNumFmt = GetRoot().GetNumFmtBuffer().Insert(nScNumFmt); pNumFormat = new XclExpNumFmt( nScNumFmt, nXclNumFmt, GetNumberFormatCode( *this, nScNumFmt, mxFormatter.get(), mpKeywordTable.get() )); } diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx index 3c85323a24d7..866c9ab13cbf 100644 --- a/sc/source/filter/excel/xetable.cxx +++ b/sc/source/filter/excel/xetable.cxx @@ -821,12 +821,12 @@ XclExpFormulaCell::XclExpFormulaCell( XclExpNumFmtBuffer& rNumFmtBfr = rRoot.GetNumFmtBuffer(); // current cell number format - sal_uLong nScNumFmt = pPattern ? + sal_uInt32 nScNumFmt = pPattern ? GETITEMVALUE( pPattern->GetItemSet(), SfxUInt32Item, ATTR_VALUE_FORMAT, sal_uLong ) : rNumFmtBfr.GetStandardFormat(); // alternative number format passed to XF buffer - sal_uLong nAltScNumFmt = NUMBERFORMAT_ENTRY_NOT_FOUND; + sal_uInt32 nAltScNumFmt = NUMBERFORMAT_ENTRY_NOT_FOUND; /* Xcl doesn't know Boolean number formats, we write "TRUE";"FALSE" (language dependent). Don't do it for automatic formula formats, because Excel gets them right. */ diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx index 41e4d00b107e..f2c446142197 100644 --- a/sc/source/filter/inc/xestyle.hxx +++ b/sc/source/filter/inc/xestyle.hxx @@ -268,11 +268,11 @@ private: /** Stores a core number format index with corresponding Excel format index. */ struct XclExpNumFmt { - sal_uLong mnScNumFmt; /// Core index of the number format. + sal_uInt32 mnScNumFmt; /// Core index of the number format. sal_uInt16 mnXclNumFmt; /// Resulting Excel format index. OUString maNumFmtString; /// format string - inline explicit XclExpNumFmt( sal_uLong nScNumFmt, sal_uInt16 nXclNumFmt, const OUString& rFrmt ) : + inline explicit XclExpNumFmt( sal_uInt32 nScNumFmt, sal_uInt16 nXclNumFmt, const OUString& rFrmt ) : mnScNumFmt( nScNumFmt ), mnXclNumFmt( nXclNumFmt ), maNumFmtString( rFrmt ) {} void SaveXml( XclExpXmlStream& rStrm ); @@ -289,12 +289,12 @@ public: virtual ~XclExpNumFmtBuffer(); /** Returns the core index of the current standard number format. */ - inline sal_uLong GetStandardFormat() const { return mnStdFmt; } + inline sal_uInt32 GetStandardFormat() const { return mnStdFmt; } /** Inserts a number format into the format buffer. @param nScNumFmt The core index of the number format. @return The resulting Excel format index. */ - sal_uInt16 Insert( sal_uLong nScNumFmt ); + sal_uInt16 Insert( sal_uInt32 nScNumFmt ); /** Writes all FORMAT records contained in this buffer. */ virtual void Save( XclExpStream& rStrm ) override; @@ -306,7 +306,7 @@ private: /** Writes the FORMAT record represented by rFormat. */ void WriteFormatRecord( XclExpStream& rStrm, const XclExpNumFmt& rFormat ); - OUString GetFormatCode ( sal_uInt16 nScNumFmt ); + OUString GetFormatCode ( sal_uInt32 nScNumFmt ); private: typedef ::std::vector< XclExpNumFmt > XclExpNumFmtVec; @@ -314,7 +314,7 @@ private: SvNumberFormatterPtr mxFormatter; /// Special number formatter for conversion. XclExpNumFmtVec maFormatMap; /// Maps core formats to Excel indexes. std::unique_ptr<NfKeywordTable> mpKeywordTable; /// Replacement table. - sal_uLong mnStdFmt; /// Key for standard number format. + sal_uInt32 mnStdFmt; /// Key for standard number format. sal_uInt16 mnXclOffset; /// Offset to first user defined format. }; |