import dxf number format record, related fdo#76209
Thanks to Morten Welinder for pointing to the missing pieces. Change-Id: I5eb447161ac5d79257a64acaa01e56374ba81587
This commit is contained in:
committed by
Markus Mohrhard
parent
7cc6de1cc2
commit
ac6773e1e3
@@ -514,9 +514,9 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm )
|
||||
sal_uInt8 nType(0), nOperator(0);
|
||||
sal_uInt16 nFmlaSize1(0), nFmlaSize2(0);
|
||||
sal_uInt32 nFlags(0);
|
||||
sal_uInt16 nFlagsExtended(0);
|
||||
|
||||
rStrm >> nType >> nOperator >> nFmlaSize1 >> nFmlaSize2 >> nFlags;
|
||||
rStrm.Ignore( 2 );
|
||||
rStrm >> nType >> nOperator >> nFmlaSize1 >> nFmlaSize2 >> nFlags >> nFlagsExtended;
|
||||
|
||||
// *** mode and comparison operator ***
|
||||
|
||||
@@ -557,6 +557,16 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm )
|
||||
|
||||
const XclImpPalette& rPalette = GetPalette();
|
||||
|
||||
// number format
|
||||
|
||||
if( get_flag( nFlags, EXC_CF_BLOCK_NUMFMT ) )
|
||||
{
|
||||
XclImpNumFmtBuffer& rNumFmtBuffer = GetRoot().GetNumFmtBuffer();
|
||||
bool bIFmt = get_flag( nFlags, EXC_CF_IFMT_USER );
|
||||
sal_uInt16 nFormat = rNumFmtBuffer.ReadCFFormat( rStrm, bIFmt );
|
||||
rNumFmtBuffer.FillToItemSet( rStyleItemSet, nFormat );
|
||||
}
|
||||
|
||||
// *** font block ***
|
||||
|
||||
if( ::get_flag( nFlags, EXC_CF_BLOCK_FONT ) )
|
||||
|
@@ -650,6 +650,25 @@ void XclImpNumFmtBuffer::ReadFormat( XclImpStream& rStrm )
|
||||
}
|
||||
}
|
||||
|
||||
sal_uInt16 XclImpNumFmtBuffer::ReadCFFormat( XclImpStream& rStrm, bool bIFmt )
|
||||
{
|
||||
// internal number format ?
|
||||
if(bIFmt)
|
||||
{
|
||||
rStrm.Ignore(1);
|
||||
sal_uInt8 nIndex;
|
||||
rStrm >> nIndex;
|
||||
return nIndex;
|
||||
}
|
||||
else
|
||||
{
|
||||
OUString aFormat = rStrm.ReadUniString();
|
||||
InsertFormat( mnNextXclIdx, aFormat );
|
||||
++mnNextXclIdx;
|
||||
return mnNextXclIdx - 1;
|
||||
}
|
||||
}
|
||||
|
||||
void XclImpNumFmtBuffer::CreateScFormats()
|
||||
{
|
||||
OSL_ENSURE( maIndexMap.empty(), "XclImpNumFmtBuffer::CreateScFormats - already created" );
|
||||
|
@@ -216,6 +216,10 @@ public:
|
||||
|
||||
/** Reads a FORMAT record. */
|
||||
void ReadFormat( XclImpStream& rStrm );
|
||||
|
||||
/** Read NumFmt from conditional format record */
|
||||
sal_uInt16 ReadCFFormat( XclImpStream& rStrm, bool bIFmt );
|
||||
|
||||
/** Creates the number formats in the Calc document. */
|
||||
void CreateScFormats();
|
||||
|
||||
|
@@ -80,10 +80,12 @@ const sal_uInt32 EXC_CF_AREA_FGCOLOR = 0x00020000; /// Foreground color
|
||||
const sal_uInt32 EXC_CF_AREA_BGCOLOR = 0x00040000; /// Background color modified?
|
||||
const sal_uInt32 EXC_CF_AREA_ALL = 0x00070000; /// Any area attribute modified?
|
||||
const sal_uInt32 EXC_CF_ALLDEFAULT = 0x003FFFFF; /// Default flags.
|
||||
const sal_uInt32 EXC_CF_BLOCK_NUMFMT = 0x02000000; /// Font block present?
|
||||
const sal_uInt32 EXC_CF_BLOCK_FONT = 0x04000000; /// Font block present?
|
||||
const sal_uInt32 EXC_CF_BLOCK_ALIGNMENT = 0x08000000; /// Alignment block present?
|
||||
const sal_uInt32 EXC_CF_BLOCK_BORDER = 0x10000000; /// Border block present?
|
||||
const sal_uInt32 EXC_CF_BLOCK_AREA = 0x20000000; /// Pattern block present?
|
||||
const sal_uInt32 EXC_CF_IFMT_USER = 0x1; /// NumberFormat String or Id?
|
||||
|
||||
const sal_uInt32 EXC_CF_FONT_STYLE = 0x00000002; /// Font posture or weight modified?
|
||||
const sal_uInt32 EXC_CF_FONT_STRIKEOUT = 0x00000080; /// Font cancellation modified?
|
||||
|
Reference in New Issue
Block a user