Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
2c1c6df2
Kaydet (Commit)
2c1c6df2
authored
Kas 30, 2015
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
number format keys are sal_uInt32, so use it
Change-Id: I0adf5f443ed3348ca0b975bd64bd4a293ff30f79
üst
111f34ac
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
xestyle.cxx
sc/source/filter/excel/xestyle.cxx
+4
-4
xetable.cxx
sc/source/filter/excel/xetable.cxx
+2
-2
xestyle.hxx
sc/source/filter/inc/xestyle.hxx
+6
-6
No files found.
sc/source/filter/excel/xestyle.cxx
Dosyayı görüntüle @
2c1c6df2
...
@@ -1373,7 +1373,7 @@ XclExpNumFmtBuffer::~XclExpNumFmtBuffer()
...
@@ -1373,7 +1373,7 @@ XclExpNumFmtBuffer::~XclExpNumFmtBuffer()
{
{
}
}
sal_uInt16
XclExpNumFmtBuffer
::
Insert
(
sal_u
Long
nScNumFmt
)
sal_uInt16
XclExpNumFmtBuffer
::
Insert
(
sal_u
Int32
nScNumFmt
)
{
{
XclExpNumFmtVec
::
const_iterator
aIt
=
XclExpNumFmtVec
::
const_iterator
aIt
=
::
std
::
find_if
(
maFormatMap
.
begin
(),
maFormatMap
.
end
(),
XclExpNumFmtPred
(
nScNumFmt
)
);
::
std
::
find_if
(
maFormatMap
.
begin
(),
maFormatMap
.
end
(),
XclExpNumFmtPred
(
nScNumFmt
)
);
...
@@ -1433,14 +1433,14 @@ void XclExpNumFmtBuffer::WriteFormatRecord( XclExpStream& rStrm, const XclExpNum
...
@@ -1433,14 +1433,14 @@ void XclExpNumFmtBuffer::WriteFormatRecord( XclExpStream& rStrm, const XclExpNum
namespace
{
namespace
{
OUString
GetNumberFormatCode
(
XclRoot
&
rRoot
,
const
sal_uInt
16
nScNumFmt
,
SvNumberFormatter
*
pFormatter
,
NfKeywordTable
*
pKeywordTable
)
OUString
GetNumberFormatCode
(
XclRoot
&
rRoot
,
const
sal_uInt
32
nScNumFmt
,
SvNumberFormatter
*
pFormatter
,
NfKeywordTable
*
pKeywordTable
)
{
{
return
rRoot
.
GetFormatter
().
GetFormatStringForExcel
(
nScNumFmt
,
*
pKeywordTable
,
*
pFormatter
);
return
rRoot
.
GetFormatter
().
GetFormatStringForExcel
(
nScNumFmt
,
*
pKeywordTable
,
*
pFormatter
);
}
}
}
}
OUString
XclExpNumFmtBuffer
::
GetFormatCode
(
sal_uInt
16
nScNumFmt
)
OUString
XclExpNumFmtBuffer
::
GetFormatCode
(
sal_uInt
32
nScNumFmt
)
{
{
return
GetNumberFormatCode
(
*
this
,
nScNumFmt
,
mxFormatter
.
get
(),
mpKeywordTable
.
get
()
);
return
GetNumberFormatCode
(
*
this
,
nScNumFmt
,
mxFormatter
.
get
(),
mpKeywordTable
.
get
()
);
}
}
...
@@ -3027,7 +3027,7 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot )
...
@@ -3027,7 +3027,7 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot )
const
SfxPoolItem
*
pPoolItem
=
nullptr
;
const
SfxPoolItem
*
pPoolItem
=
nullptr
;
if
(
rSet
.
GetItemState
(
ATTR_VALUE_FORMAT
,
true
,
&
pPoolItem
)
==
SfxItemState
::
SET
)
if
(
rSet
.
GetItemState
(
ATTR_VALUE_FORMAT
,
true
,
&
pPoolItem
)
==
SfxItemState
::
SET
)
{
{
sal_u
Long
nScNumFmt
=
static_cast
<
const
SfxUInt32Item
*
>
(
pPoolItem
)
->
GetValue
();
sal_u
Int32
nScNumFmt
=
static_cast
<
const
SfxUInt32Item
*
>
(
pPoolItem
)
->
GetValue
();
sal_Int32
nXclNumFmt
=
GetRoot
().
GetNumFmtBuffer
().
Insert
(
nScNumFmt
);
sal_Int32
nXclNumFmt
=
GetRoot
().
GetNumFmtBuffer
().
Insert
(
nScNumFmt
);
pNumFormat
=
new
XclExpNumFmt
(
nScNumFmt
,
nXclNumFmt
,
GetNumberFormatCode
(
*
this
,
nScNumFmt
,
mxFormatter
.
get
(),
mpKeywordTable
.
get
()
));
pNumFormat
=
new
XclExpNumFmt
(
nScNumFmt
,
nXclNumFmt
,
GetNumberFormatCode
(
*
this
,
nScNumFmt
,
mxFormatter
.
get
(),
mpKeywordTable
.
get
()
));
}
}
...
...
sc/source/filter/excel/xetable.cxx
Dosyayı görüntüle @
2c1c6df2
...
@@ -821,12 +821,12 @@ XclExpFormulaCell::XclExpFormulaCell(
...
@@ -821,12 +821,12 @@ XclExpFormulaCell::XclExpFormulaCell(
XclExpNumFmtBuffer
&
rNumFmtBfr
=
rRoot
.
GetNumFmtBuffer
();
XclExpNumFmtBuffer
&
rNumFmtBfr
=
rRoot
.
GetNumFmtBuffer
();
// current cell number format
// current cell number format
sal_u
Long
nScNumFmt
=
pPattern
?
sal_u
Int32
nScNumFmt
=
pPattern
?
GETITEMVALUE
(
pPattern
->
GetItemSet
(),
SfxUInt32Item
,
ATTR_VALUE_FORMAT
,
sal_uLong
)
:
GETITEMVALUE
(
pPattern
->
GetItemSet
(),
SfxUInt32Item
,
ATTR_VALUE_FORMAT
,
sal_uLong
)
:
rNumFmtBfr
.
GetStandardFormat
();
rNumFmtBfr
.
GetStandardFormat
();
// alternative number format passed to XF buffer
// alternative number format passed to XF buffer
sal_u
Long
nAltScNumFmt
=
NUMBERFORMAT_ENTRY_NOT_FOUND
;
sal_u
Int32
nAltScNumFmt
=
NUMBERFORMAT_ENTRY_NOT_FOUND
;
/* Xcl doesn't know Boolean number formats, we write
/* Xcl doesn't know Boolean number formats, we write
"TRUE";"FALSE" (language dependent). Don't do it for automatic
"TRUE";"FALSE" (language dependent). Don't do it for automatic
formula formats, because Excel gets them right. */
formula formats, because Excel gets them right. */
...
...
sc/source/filter/inc/xestyle.hxx
Dosyayı görüntüle @
2c1c6df2
...
@@ -268,11 +268,11 @@ private:
...
@@ -268,11 +268,11 @@ private:
/** Stores a core number format index with corresponding Excel format index. */
/** Stores a core number format index with corresponding Excel format index. */
struct
XclExpNumFmt
struct
XclExpNumFmt
{
{
sal_u
Long
mnScNumFmt
;
/// Core index of the number format.
sal_u
Int32
mnScNumFmt
;
/// Core index of the number format.
sal_uInt16
mnXclNumFmt
;
/// Resulting Excel format index.
sal_uInt16
mnXclNumFmt
;
/// Resulting Excel format index.
OUString
maNumFmtString
;
/// format string
OUString
maNumFmtString
;
/// format string
inline
explicit
XclExpNumFmt
(
sal_u
Long
nScNumFmt
,
sal_uInt16
nXclNumFmt
,
const
OUString
&
rFrmt
)
:
inline
explicit
XclExpNumFmt
(
sal_u
Int32
nScNumFmt
,
sal_uInt16
nXclNumFmt
,
const
OUString
&
rFrmt
)
:
mnScNumFmt
(
nScNumFmt
),
mnXclNumFmt
(
nXclNumFmt
),
maNumFmtString
(
rFrmt
)
{}
mnScNumFmt
(
nScNumFmt
),
mnXclNumFmt
(
nXclNumFmt
),
maNumFmtString
(
rFrmt
)
{}
void
SaveXml
(
XclExpXmlStream
&
rStrm
);
void
SaveXml
(
XclExpXmlStream
&
rStrm
);
...
@@ -289,12 +289,12 @@ public:
...
@@ -289,12 +289,12 @@ public:
virtual
~
XclExpNumFmtBuffer
();
virtual
~
XclExpNumFmtBuffer
();
/** Returns the core index of the current standard number format. */
/** Returns the core index of the current standard number format. */
inline
sal_u
Long
GetStandardFormat
()
const
{
return
mnStdFmt
;
}
inline
sal_u
Int32
GetStandardFormat
()
const
{
return
mnStdFmt
;
}
/** Inserts a number format into the format buffer.
/** Inserts a number format into the format buffer.
@param nScNumFmt The core index of the number format.
@param nScNumFmt The core index of the number format.
@return The resulting Excel format index. */
@return The resulting Excel format index. */
sal_uInt16
Insert
(
sal_u
Long
nScNumFmt
);
sal_uInt16
Insert
(
sal_u
Int32
nScNumFmt
);
/** Writes all FORMAT records contained in this buffer. */
/** Writes all FORMAT records contained in this buffer. */
virtual
void
Save
(
XclExpStream
&
rStrm
)
override
;
virtual
void
Save
(
XclExpStream
&
rStrm
)
override
;
...
@@ -306,7 +306,7 @@ private:
...
@@ -306,7 +306,7 @@ private:
/** Writes the FORMAT record represented by rFormat. */
/** Writes the FORMAT record represented by rFormat. */
void
WriteFormatRecord
(
XclExpStream
&
rStrm
,
const
XclExpNumFmt
&
rFormat
);
void
WriteFormatRecord
(
XclExpStream
&
rStrm
,
const
XclExpNumFmt
&
rFormat
);
OUString
GetFormatCode
(
sal_uInt
16
nScNumFmt
);
OUString
GetFormatCode
(
sal_uInt
32
nScNumFmt
);
private
:
private
:
typedef
::
std
::
vector
<
XclExpNumFmt
>
XclExpNumFmtVec
;
typedef
::
std
::
vector
<
XclExpNumFmt
>
XclExpNumFmtVec
;
...
@@ -314,7 +314,7 @@ private:
...
@@ -314,7 +314,7 @@ private:
SvNumberFormatterPtr
mxFormatter
;
/// Special number formatter for conversion.
SvNumberFormatterPtr
mxFormatter
;
/// Special number formatter for conversion.
XclExpNumFmtVec
maFormatMap
;
/// Maps core formats to Excel indexes.
XclExpNumFmtVec
maFormatMap
;
/// Maps core formats to Excel indexes.
std
::
unique_ptr
<
NfKeywordTable
>
mpKeywordTable
;
/// Replacement table.
std
::
unique_ptr
<
NfKeywordTable
>
mpKeywordTable
;
/// Replacement table.
sal_u
Long
mnStdFmt
;
/// Key for standard number format.
sal_u
Int32
mnStdFmt
;
/// Key for standard number format.
sal_uInt16
mnXclOffset
;
/// Offset to first user defined format.
sal_uInt16
mnXclOffset
;
/// Offset to first user defined format.
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment