summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel/xistyle.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter/excel/xistyle.cxx')
-rw-r--r--sc/source/filter/excel/xistyle.cxx24
1 files changed, 23 insertions, 1 deletions
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index 0a57a5970800..e7efb6c096e9 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -846,7 +846,7 @@ bool lclConvertBorderLine( SvxBorderLine& rLine, const XclImpPalette& rPalette,
if( nXclLine == EXC_LINE_NONE )
return false;
- if( nXclLine >= STATIC_TABLE_SIZE( ppnLineParam ) )
+ if( nXclLine >= STATIC_ARRAY_SIZE( ppnLineParam ) )
nXclLine = EXC_LINE_THIN;
rLine.SetColor( rPalette.GetColor( nXclColor ) );
@@ -1217,6 +1217,28 @@ void XclImpXF::ApplyPattern(
}
}
+/*static*/ void XclImpXF::ApplyPatternForBiff2CellFormat( const XclImpRoot& rRoot,
+ const ScAddress& rScPos, sal_uInt8 nFlags1, sal_uInt8 nFlags2, sal_uInt8 nFlags3 )
+{
+ /* Create an XF object and let it do the work. We will have access to its
+ private members here. */
+ XclImpXF aXF( rRoot );
+
+ // no used flags available in BIFF2 (always true)
+ aXF.SetAllUsedFlags( true );
+
+ // set the attributes
+ aXF.maProtection.FillFromXF2( nFlags1 );
+ aXF.maAlignment.FillFromXF2( nFlags3 );
+ aXF.maBorder.FillFromXF2( nFlags3 );
+ aXF.maArea.FillFromXF2( nFlags3 );
+ aXF.mnXclNumFmt = ::extract_value< sal_uInt16 >( nFlags2, 0, 6 );
+ aXF.mnXclFont = ::extract_value< sal_uInt16 >( nFlags2, 6, 2 );
+
+ // write the attributes to the cell
+ aXF.ApplyPattern( rScPos.Col(), rScPos.Row(), rScPos.Col(), rScPos.Row(), rScPos.Tab() );
+}
+
void XclImpXF::SetUsedFlags( sal_uInt8 nUsedFlags )
{
/* Notes about finding the mb***Used flags: