23#include <com/sun/star/awt/FontDescriptor.hpp>
24#include <com/sun/star/awt/FontFamily.hpp>
25#include <com/sun/star/awt/FontPitch.hpp>
26#include <com/sun/star/awt/FontSlant.hpp>
27#include <com/sun/star/awt/FontStrikeout.hpp>
28#include <com/sun/star/awt/FontType.hpp>
29#include <com/sun/star/awt/FontWeight.hpp>
30#include <com/sun/star/awt/FontUnderline.hpp>
31#include <com/sun/star/awt/XDevice.hpp>
32#include <com/sun/star/awt/XFont2.hpp>
33#include <com/sun/star/container/XIndexAccess.hpp>
34#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
35#include <com/sun/star/style/XStyle.hpp>
36#include <com/sun/star/text/WritingMode2.hpp>
37#include <com/sun/star/table/BorderLineStyle.hpp>
38#include <com/sun/star/table/CellVertJustify2.hpp>
39#include <com/sun/star/table/CellJustifyMethod.hpp>
62#include <rtl/tencinfo.h>
63#include <rtl/ustrbuf.hxx>
65#include <osl/diagnose.h>
72#include <oox/token/namespaces.hxx>
73#include <oox/token/properties.hxx>
74#include <oox/token/tokens.hxx>
77#include <document.hxx>
87#include <stlsheet.hxx>
105const sal_Int32 OOX_COLOR_USEROFFSET = 0;
108const sal_Int32 OOX_FONTFAMILY_NONE = 0;
109const sal_Int32 OOX_FONTFAMILY_ROMAN = 1;
110const sal_Int32 OOX_FONTFAMILY_SWISS = 2;
111const sal_Int32 OOX_FONTFAMILY_MODERN = 3;
112const sal_Int32 OOX_FONTFAMILY_SCRIPT = 4;
113const sal_Int32 OOX_FONTFAMILY_DECORATIVE = 5;
116const sal_Int32 OOX_XF_TEXTDIR_CONTEXT = 0;
117const sal_Int32 OOX_XF_TEXTDIR_LTR = 1;
118const sal_Int32 OOX_XF_TEXTDIR_RTL = 2;
121const sal_Int32 OOX_XF_ROTATION_NONE = 0;
122const sal_Int32 OOX_XF_ROTATION_STACKED = 255;
125const sal_Int32 OOX_XF_INDENT_NONE = 0;
128const sal_Int32 OOX_STYLE_NORMAL = 0;
129const sal_Int32 OOX_STYLE_ROWLEVEL = 1;
130const sal_Int32 OOX_STYLE_COLLEVEL = 2;
141const sal_uInt8 BIFF12_BORDER_DIAG_TLBR = 0x01;
142const sal_uInt8 BIFF12_BORDER_DIAG_BLTR = 0x02;
145const sal_Int32 BIFF12_FILL_GRADIENT = 40;
148const sal_uInt32 BIFF12_XF_WRAPTEXT = 0x00400000;
149const sal_uInt32 BIFF12_XF_JUSTLASTLINE = 0x00800000;
150const sal_uInt32 BIFF12_XF_SHRINK = 0x01000000;
151const sal_uInt32 BIFF12_XF_LOCKED = 0x10000000;
152const sal_uInt32 BIFF12_XF_HIDDEN = 0x20000000;
155const sal_uInt16 BIFF12_XF_NUMFMT_USED = 0x0001;
156const sal_uInt16 BIFF12_XF_FONT_USED = 0x0002;
157const sal_uInt16 BIFF12_XF_ALIGN_USED = 0x0004;
158const sal_uInt16 BIFF12_XF_BORDER_USED = 0x0008;
159const sal_uInt16 BIFF12_XF_AREA_USED = 0x0010;
160const sal_uInt16 BIFF12_XF_PROT_USED = 0x0020;
163const sal_uInt16 BIFF12_DXF_FILL_PATTERN = 0;
164const sal_uInt16 BIFF12_DXF_FILL_FGCOLOR = 1;
165const sal_uInt16 BIFF12_DXF_FILL_BGCOLOR = 2;
166const sal_uInt16 BIFF12_DXF_FILL_GRADIENT = 3;
167const sal_uInt16 BIFF12_DXF_FILL_STOP = 4;
168const sal_uInt16 BIFF12_DXF_FONT_COLOR = 5;
169const sal_uInt16 BIFF12_DXF_BORDER_TOP = 6;
170const sal_uInt16 BIFF12_DXF_BORDER_BOTTOM = 7;
171const sal_uInt16 BIFF12_DXF_BORDER_LEFT = 8;
172const sal_uInt16 BIFF12_DXF_BORDER_RIGHT = 9;
173const sal_uInt16 BIFF12_DXF_FONT_NAME = 24;
174const sal_uInt16 BIFF12_DXF_FONT_WEIGHT = 25;
175const sal_uInt16 BIFF12_DXF_FONT_UNDERLINE = 26;
176const sal_uInt16 BIFF12_DXF_FONT_ESCAPEMENT = 27;
177const sal_uInt16 BIFF12_DXF_FONT_ITALIC = 28;
178const sal_uInt16 BIFF12_DXF_FONT_STRIKE = 29;
179const sal_uInt16 BIFF12_DXF_FONT_OUTLINE = 30;
180const sal_uInt16 BIFF12_DXF_FONT_SHADOW = 31;
181const sal_uInt16 BIFF12_DXF_FONT_HEIGHT = 36;
182const sal_uInt16 BIFF12_DXF_FONT_SCHEME = 37;
183const sal_uInt16 BIFF12_DXF_NUMFMT_CODE = 38;
184const sal_uInt16 BIFF12_DXF_NUMFMT_ID = 41;
187const sal_uInt16 BIFF12_CELLSTYLE_BUILTIN = 0x0001;
188const sal_uInt16 BIFF12_CELLSTYLE_HIDDEN = 0x0002;
189const sal_uInt16 BIFF12_CELLSTYLE_CUSTOM = 0x0004;
194const sal_uInt16 BIFF_FONTFLAG_ITALIC = 0x0002;
195const sal_uInt16 BIFF_FONTFLAG_STRIKEOUT = 0x0008;
196const sal_uInt16 BIFF_FONTFLAG_OUTLINE = 0x0010;
197const sal_uInt16 BIFF_FONTFLAG_SHADOW = 0x0020;
200const sal_uInt16 BIFF_FONTWEIGHT_BOLD = 450;
204const sal_uInt8 BIFF_FONTUNDERL_SINGLE = 1;
205const sal_uInt8 BIFF_FONTUNDERL_DOUBLE = 2;
206const sal_uInt8 BIFF_FONTUNDERL_SINGLE_ACC = 33;
207const sal_uInt8 BIFF_FONTUNDERL_DOUBLE_ACC = 34;
209::Color lclReadRgbColor( BinaryInputStream& rStrm )
212 nR =
rStrm.readuChar();
213 nG =
rStrm.readuChar();
214 nB =
rStrm.readuChar();
215 nA =
rStrm.readuChar();
223 return ::Color(ColorTransparency, nValue);
253 setSrgbClr( sal_uInt32(nRgbValue) & 0xFFFFFF );
260 static const sal_Int32 spnColorTokens[] = {
261 XML_lt1, XML_dk1, XML_lt2, XML_dk2, XML_accent1, XML_accent2,
262 XML_accent3, XML_accent4, XML_accent5, XML_accent6, XML_hlink, XML_folHlink };
280 sal_Int32 nTheme = rAttribs.
getInteger(XML_theme, -1);
281 double fTint = rAttribs.
getDouble(XML_tint, 0.0);
288 else if( rAttribs.
getBool( XML_auto,
false ) )
292 OSL_FAIL(
"Color::importColor - unknown color type" );
301 nFlags =
rStrm.readuChar();
303 nTint =
rStrm.readInt16();
306 double fTint = nTint;
312 switch( extractValue< sal_uInt8 >( nFlags, 1, 7 ) )
314 case BIFF12_COLOR_AUTO:
318 case BIFF12_COLOR_INDEXED:
322 case BIFF12_COLOR_RGB:
325 case BIFF12_COLOR_THEME:
330 OSL_FAIL(
"Color::importColor - unknown color type" );
350#define PALETTE_EGA_COLORS_LIGHT \
351 ::Color(0x000000), ::Color(0xFFFFFF), ::Color(0xFF0000), ::Color(0x00FF00), ::Color(0x0000FF), ::Color(0xFFFF00), ::Color(0xFF00FF), ::Color(0x00FFFF)
353#define PALETTE_EGA_COLORS_DARK \
354 ::Color(0x800000), ::Color(0x008000), ::Color(0x000080), ::Color(0x808000), ::Color(0x800080), ::Color(0x008080), ::Color(0xC0C0C0), ::Color(0x808080)
357const ::Color spnDefColors8[] =
369#undef PALETTE_EGA_COLORS_LIGHT
370#undef PALETTE_EGA_COLORS_DARK
399 nColor = *pnPaletteColor;
401 else switch( nPaletteIdx )
414 default: OSL_FAIL(
"ColorPalette::getColor - unknown color index" );
430void lclSetFontName(
ApiScriptFontName& rFontName,
const FontDescriptor& rFontDesc,
bool bHasGlyphs )
434 rFontName.
maName = rFontDesc.Name;
435 rFontName.
mnFamily = rFontDesc.Family;
441 rFontName = ApiScriptFontName();
449 mnFamily( OOX_FONTFAMILY_NONE ),
453 mnEscapement( XML_baseline ),
456 mbStrikeout( false ),
464 static const sal_Int32 spnSchemes[] = {
XML_none, XML_major, XML_minor };
475 mbBold = nWeight >= BIFF_FONTWEIGHT_BOLD;
483 case BIFF_FONTUNDERL_SINGLE:
mnUnderline = XML_single;
break;
484 case BIFF_FONTUNDERL_DOUBLE:
mnUnderline = XML_double;
break;
485 case BIFF_FONTUNDERL_SINGLE_ACC:
mnUnderline = XML_singleAccounting;
break;
486 case BIFF_FONTUNDERL_DOUBLE_ACC:
mnUnderline = XML_doubleAccounting;
break;
493 static const sal_Int32 spnEscapes[] = { XML_baseline, XML_superscript, XML_subscript };
498 mbNameUsed( bAllUsed ),
499 mbColorUsed( bAllUsed ),
500 mbSchemeUsed( bAllUsed ),
501 mbHeightUsed( bAllUsed ),
502 mbUnderlineUsed( bAllUsed ),
503 mbEscapementUsed( bAllUsed ),
504 mbWeightUsed( bAllUsed ),
505 mbPostureUsed( bAllUsed ),
506 mbStrikeoutUsed( bAllUsed ),
507 mbOutlineUsed( bAllUsed ),
508 mbShadowUsed( bAllUsed )
514 mnTextEnc( RTL_TEXTENCODING_DONTKNOW )
525 RTL_TEXTENCODING_DONTKNOW,
529 css::awt::FontSlant_NONE,
530 css::awt::FontUnderline::
NONE,
547 maModel( rHelper.getTheme().getDefaultFontModel() ),
548 maUsedFlags( !bDxf ),
555 maModel(
std::move( aModel )),
566 case XLS_TOKEN(
name ):
567 case XLS_TOKEN( rFont ):
574 case XLS_TOKEN( scheme ):
577 case XLS_TOKEN( family ):
580 case XLS_TOKEN( charset ):
583 case XLS_TOKEN( sz ):
587 case XLS_TOKEN(
color ):
595 case XLS_TOKEN( vertAlign ):
607 case XLS_TOKEN( strike ):
611 case XLS_TOKEN( outline ):
615 case XLS_TOKEN( shadow ):
624 SAL_WARN_IF(
mbDxf,
"sc",
"Font::importFont - unexpected conditional formatting flag" );
626 sal_uInt16 nHeight, nFlags, nWeight, nEscapement;
627 sal_uInt8 nUnderline, nFamily, nCharSet, nScheme;
628 nHeight =
rStrm.readuInt16();
629 nFlags =
rStrm.readuInt16();
630 nWeight =
rStrm.readuInt16();
631 nEscapement =
rStrm.readuInt16();
632 nUnderline =
rStrm.readuChar();
633 nFamily =
rStrm.readuChar();
634 nCharSet =
rStrm.readuChar();
637 nScheme =
rStrm.readuChar();
657 SAL_WARN_IF( !
mbDxf,
"sc",
"Font::importDxfName - missing conditional formatting flag" );
664 SAL_WARN_IF( !
mbDxf,
"sc",
"Font::importDxfColor - missing conditional formatting flag" );
671 SAL_WARN_IF( !
mbDxf,
"sc",
"Font::importDxfScheme - missing conditional formatting flag" );
678 SAL_WARN_IF( !
mbDxf,
"sc",
"Font::importDxfHeight - missing conditional formatting flag" );
685 SAL_WARN_IF( !
mbDxf,
"sc",
"Font::importDxfWeight - missing conditional formatting flag" );
692 SAL_WARN_IF( !
mbDxf,
"sc",
"Font::importDxfUnderline - missing conditional formatting flag" );
699 SAL_WARN_IF( !
mbDxf,
"sc",
"Font::importDxfEscapement - missing conditional formatting flag" );
706 SAL_WARN_IF( !
mbDxf,
"sc",
"Font::importDxfFlag - missing conditional formatting flag" );
707 bool bFlag =
rStrm.readuInt8() != 0;
727 OSL_FAIL(
"Font::importDxfFlag - unexpected element identifier" );
739 case OOX_FONTFAMILY_NONE:
maApiData.
maDesc.Family = css::awt::FontFamily::DONTKNOW;
break;
740 case OOX_FONTFAMILY_ROMAN:
maApiData.
maDesc.Family = css::awt::FontFamily::ROMAN;
break;
741 case OOX_FONTFAMILY_SWISS:
maApiData.
maDesc.Family = css::awt::FontFamily::SWISS;
break;
742 case OOX_FONTFAMILY_MODERN:
maApiData.
maDesc.Family = css::awt::FontFamily::MODERN;
break;
743 case OOX_FONTFAMILY_SCRIPT:
maApiData.
maDesc.Family = css::awt::FontFamily::SCRIPT;
break;
744 case OOX_FONTFAMILY_DECORATIVE:
maApiData.
maDesc.Family = css::awt::FontFamily::DECORATIVE;
break;
765 case XML_double:
maApiData.
maDesc.Underline = css::awt::FontUnderline::DOUBLE;
break;
766 case XML_doubleAccounting:
maApiData.
maDesc.Underline = css::awt::FontUnderline::DOUBLE;
break;
768 case XML_single:
maApiData.
maDesc.Underline = css::awt::FontUnderline::SINGLE;
break;
769 case XML_singleAccounting:
maApiData.
maDesc.Underline = css::awt::FontUnderline::SINGLE;
break;
779 case XML_superscript:
794 Reference< XDevice > xDevice( aDocProps.
getAnyProperty( PROP_ReferenceDevice ), UNO_QUERY );
798 Reference< XFont2 > xFont( xDevice->getFont(
maApiData.
maDesc ), UNO_QUERY );
804 xFont->hasGlyphs( OUString(
u'\x3041' ) ) ||
805 xFont->hasGlyphs( OUString(
u'\x30A1' ) ) ||
806 xFont->hasGlyphs( OUString(
u'\x3111' ) ) ||
807 xFont->hasGlyphs( OUString(
u'\x3131' ) ) ||
808 xFont->hasGlyphs( OUString(
u'\x3301' ) ) ||
809 xFont->hasGlyphs( OUString(
u'\x3401' ) ) ||
810 xFont->hasGlyphs( OUString(
u'\x4E01' ) ) ||
811 xFont->hasGlyphs( OUString(
u'\x7E01' ) ) ||
812 xFont->hasGlyphs( OUString(
u'\xA001' ) ) ||
813 xFont->hasGlyphs( OUString(
u'\xAC01' ) ) ||
814 xFont->hasGlyphs( OUString(
u'\xCC01' ) ) ||
815 xFont->hasGlyphs( OUString(
u'\xF901' ) ) ||
816 xFont->hasGlyphs( OUString(
u'\xFF71' ) );
819 xFont->hasGlyphs( OUString(
u'\x05D1' ) ) ||
820 xFont->hasGlyphs( OUString(
u'\x0631' ) ) ||
821 xFont->hasGlyphs( OUString(
u'\x0721' ) ) ||
822 xFont->hasGlyphs( OUString(
u'\x0911' ) ) ||
823 xFont->hasGlyphs( OUString(
u'\x0E01' ) ) ||
824 xFont->hasGlyphs( OUString(
u'\xFB21' ) ) ||
825 xFont->hasGlyphs( OUString(
u'\xFB51' ) ) ||
826 xFont->hasGlyphs( OUString(
u'\xFE71' ) );
829 (!bHasAsian && !bHasCmplx) ||
830 xFont->hasGlyphs( OUString(
'A' ) );
847 case css::awt::FontFamily::DONTKNOW:
850 case css::awt::FontFamily::ROMAN:
853 case css::awt::FontFamily::SWISS:
856 case css::awt::FontFamily::MODERN:
859 case css::awt::FontFamily::SCRIPT:
862 case css::awt::FontFamily::DECORATIVE:
877 rtl_TextEncoding eTempTextEnc = (bEditEngineText && (eFontEnc ==
getTextEncoding())) ?
888 rtl_TextEncoding eTempTextEnc = (bEditEngineText && (eFontEnc ==
getTextEncoding())) ?
898 rtl_TextEncoding eTempTextEnc = (bEditEngineText && (eFontEnc ==
getTextEncoding())) ?
945 else if (
maApiData.
maDesc.Underline == css::awt::FontUnderline::SINGLE )
974 eScEscapem = SvxEscapement::Superscript;
976 eScEscapem = SvxEscapement::Subscript;
977 if( bEditEngineText )
1011 float fHeight =
static_cast< float >(
maApiData.
maDesc.Height / 20.0 );
1062 mnHorAlign( XML_general ),
1063 mnVerAlign( XML_bottom ),
1064 mnTextDir( OOX_XF_TEXTDIR_CONTEXT ),
1065 mnRotation( OOX_XF_ROTATION_NONE ),
1066 mnIndent( OOX_XF_INDENT_NONE ),
1067 mbWrapText( false ),
1069 mbJustLastLine( false )
1075 static const sal_Int32 spnHorAligns[] = {
1076 XML_general, XML_left, XML_center, XML_right,
1077 XML_fill, XML_justify, XML_centerContinuous, XML_distributed };
1083 static const sal_Int32 spnVerAligns[] = {
1084 XML_top, XML_center, XML_bottom, XML_justify, XML_distributed };
1089 meHorJustify( css::
table::CellHoriJustify_STANDARD ),
1090 mnHorJustifyMethod( css::
table::CellJustifyMethod::
AUTO ),
1092 mnVerJustifyMethod( css::
table::CellJustifyMethod::
AUTO ),
1093 meOrientation( css::
table::CellOrientation_STANDARD ),
1095 mnWritingMode( css::
text::WritingMode2::
PAGE ),
1097 mbWrapText( false ),
1127 sal_Int32 nDefaultHorAlign = XML_general;
1132 nDefaultHorAlign = XML_left;
1136 nDefaultHorAlign = XML_right;
1209 (((91 <= nOoxRot) && (nOoxRot <= 180)) ? (100 * (450 - nOoxRot)) : 0));
1213 css::table::CellOrientation_STACKED : css::table::CellOrientation_STANDARD;
1226 case css::table::CellVertJustify2::BOTTOM:
1227 nVert = ::SvxCellVerJustify::Bottom;
1229 case css::table::CellVertJustify2::CENTER:
1230 nVert = ::SvxCellVerJustify::Center;
1232 case css::table::CellVertJustify2::TOP:
1233 nVert = ::SvxCellVerJustify::Top;
1235 case css::table::CellVertJustify2::BLOCK:
1236 nVert = ::SvxCellVerJustify::Block;
1238 case css::table::CellVertJustify2::STANDARD:
1240 nVert = ::SvxCellVerJustify::Standard;
1251 case css::table::CellHoriJustify_LEFT:
1252 nHori = ::SvxCellHorJustify::Left;
1254 case css::table::CellHoriJustify_CENTER:
1255 nHori = ::SvxCellHorJustify::Center;
1257 case css::table::CellHoriJustify_RIGHT:
1258 nHori = ::SvxCellHorJustify::Right;
1260 case css::table::CellHoriJustify_BLOCK:
1261 nHori = ::SvxCellHorJustify::Block;
1263 case css::table::CellHoriJustify_REPEAT:
1264 nHori = ::SvxCellHorJustify::Repeat;
1266 case css::table::CellHoriJustify_STANDARD:
1268 nHori = ::SvxCellHorJustify::Standard;
1279 case css::text::WritingMode2::PAGE:
1280 eFrameDir = SvxFrameDirection::Environment;
1282 case css::text::WritingMode2::LR_TB:
1283 eFrameDir = SvxFrameDirection::Horizontal_LR_TB;
1285 case css::text::WritingMode2::RL_TB:
1286 eFrameDir = SvxFrameDirection::Horizontal_RL_TB;
1289 OSL_FAIL(
"GetScFrameDir - unknown CTL text direction" );
1323 maCellProt( true, false, false, false )
1366bool lcl_isBorder(
const css::table::BorderLine& rBorder)
1368 return (rBorder.InnerLineWidth > 0) || (rBorder.OuterLineWidth > 0);
1382 static const sal_Int32 spnStyleIds[] = {
1383 XML_none, XML_thin, XML_medium, XML_dashed,
1384 XML_dotted, XML_thick, XML_double, XML_hair,
1385 XML_mediumDashed, XML_dashDot, XML_mediumDashDot, XML_dashDotDot,
1386 XML_mediumDashDotDot, XML_slantDashDot };
1396 mbDiagTLtoBR( false ),
1397 mbDiagBLtoTR( false )
1402 mbBorderUsed( false ),
1410 ( lcl_isBorder(
maTop ) &&
maTop.OuterLineWidth > 0 ) ||
1412 ( lcl_isBorder(
maLeft ) &&
maLeft.OuterLineWidth > 0 ) ||
1418void lclSetBorderLineWidth( BorderLine& rBorderLine,
1421 rBorderLine.OuterLineWidth = nOuter;
1422 rBorderLine.LineDistance = nDist;
1423 rBorderLine.InnerLineWidth = nInner;
1446 pBorderLine->mbUsed =
true;
1453 pBorderLine->maColor.importColor( rAttribs );
1475 SAL_WARN_IF( !
mbDxf,
"sc",
"Border::importDxfBorder - missing conditional formatting flag" );
1479 rStrm >> pBorderLine->maColor;
1480 nStyle =
rStrm.readuInt16();
1481 pBorderLine->setBiffStyle( nStyle );
1482 pBorderLine->mbUsed =
true;
1523 aBoxItem.
SetLine( &aLine, SvxBoxItemLine::LEFT );
1528 aBoxItem.
SetLine( &aLine, SvxBoxItemLine::RIGHT );
1533 aBoxItem.
SetLine( &aLine, SvxBoxItemLine::TOP );
1538 aBoxItem.
SetLine( &aLine, SvxBoxItemLine::BOTTOM );
1584 rBorderLine.LineStyle = BorderLineStyle::DASH_DOT;
1586 case XML_dashDotDot:
1588 rBorderLine.LineStyle = BorderLineStyle::DASH_DOT_DOT;
1592 rBorderLine.LineStyle = BorderLineStyle::FINE_DASHED;
1596 rBorderLine.LineStyle = BorderLineStyle::DOTTED;
1599 lclSetBorderLineWidth( rBorderLine, 10, 15, 10 );
1600 rBorderLine.LineStyle = BorderLineStyle::DOUBLE_THIN;
1602 case XML_hair: lclSetBorderLineWidth( rBorderLine,
API_LINE_HAIR );
break;
1603 case XML_medium: lclSetBorderLineWidth( rBorderLine,
API_LINE_MEDIUM );
break;
1604 case XML_mediumDashDot:
1606 rBorderLine.LineStyle = BorderLineStyle::DASH_DOT;
1608 case XML_mediumDashDotDot:
1610 rBorderLine.LineStyle = BorderLineStyle::DASH_DOT_DOT;
1612 case XML_mediumDashed:
1614 rBorderLine.LineStyle = BorderLineStyle::DASHED;
1617 case XML_slantDashDot:
1619 rBorderLine.LineStyle = BorderLineStyle::FINE_DASHED;
1621 case XML_thick: lclSetBorderLineWidth( rBorderLine,
API_LINE_THICK );
break;
1622 case XML_thin: lclSetBorderLineWidth( rBorderLine,
API_LINE_THIN );
break;
1623 default: lclSetBorderLineWidth( rBorderLine,
API_LINE_NONE );
break;
1630 mbPattColorUsed( !bDxf ),
1631 mbFillColorUsed( !bDxf ),
1632 mbPatternUsed( !bDxf )
1641 static const sal_Int32 spnPatternIds[] = {
1642 XML_none, XML_solid, XML_mediumGray, XML_darkGray,
1643 XML_lightGray, XML_darkHorizontal, XML_darkVertical, XML_darkDown,
1644 XML_darkUp, XML_darkGrid, XML_darkTrellis, XML_lightHorizontal,
1645 XML_lightVertical, XML_lightDown, XML_lightUp, XML_lightGrid,
1646 XML_lightTrellis, XML_gray125, XML_gray0625 };
1669 static const sal_Int32 spnTypes[] = { XML_linear, XML_path };
1680 fPosition =
rStrm.readDouble();
1686 fPosition =
rStrm.readDouble();
1688 if( !
rStrm.isEof() && (fPosition >= 0.0) )
1695 mbTransparent( true ),
1702sal_Int32 lclGetMixedColorComp( sal_Int32 nPatt, sal_Int32 nFill, sal_Int32 nAlpha )
1704 return ((nPatt - nFill) * nAlpha) / 0x80 + nFill;
1710 lclGetMixedColorComp( nPattColor.
GetRed(), nFillColor.
GetRed(), nAlpha ),
1711 lclGetMixedColorComp( nPattColor.
GetGreen(), nFillColor.
GetGreen(), nAlpha ),
1712 lclGetMixedColorComp( nPattColor.
GetBlue(), nFillColor.
GetBlue(), nAlpha ) );
1733 OSL_ENSURE(
mxPatternModel,
"Fill::importFgColor - missing pattern data" );
1743 OSL_ENSURE(
mxPatternModel,
"Fill::importBgColor - missing pattern data" );
1764 OSL_ENSURE(
mxGradientModel,
"Fill::importColor - missing gradient data" );
1771 SAL_WARN_IF(
mbDxf,
"sc",
"Fill::importFill - unexpected conditional formatting flag" );
1772 sal_Int32 nPattern =
rStrm.readInt32();
1773 if( nPattern == BIFF12_FILL_GRADIENT )
1776 sal_Int32 nStopCount;
1779 nStopCount =
rStrm.readInt32();
1780 for( sal_Int32 nStop = 0; (nStop < nStopCount) && !
rStrm.isEof(); ++nStop )
1793 SAL_WARN_IF( !
mbDxf,
"sc",
"Fill::importDxfPattern - missing conditional formatting flag" );
1802 SAL_WARN_IF( !
mbDxf,
"sc",
"Fill::importDxfFgColor - missing conditional formatting flag" );
1811 SAL_WARN_IF( !
mbDxf,
"sc",
"Fill::importDxfBgColor - missing conditional formatting flag" );
1820 SAL_WARN_IF( !
mbDxf,
"sc",
"Fill::importDxfGradient - missing conditional formatting flag" );
1828 SAL_WARN_IF( !
mbDxf,
"sc",
"Fill::importDxfStop - missing conditional formatting flag" );
1870 sal_Int32 nAlpha = 0x80;
1873 case XML_darkDown: nAlpha = 0x40;
break;
1874 case XML_darkGray: nAlpha = 0x60;
break;
1875 case XML_darkGrid: nAlpha = 0x40;
break;
1876 case XML_darkHorizontal: nAlpha = 0x40;
break;
1877 case XML_darkTrellis: nAlpha = 0x60;
break;
1878 case XML_darkUp: nAlpha = 0x40;
break;
1879 case XML_darkVertical: nAlpha = 0x40;
break;
1880 case XML_gray0625: nAlpha = 0x08;
break;
1881 case XML_gray125: nAlpha = 0x10;
break;
1882 case XML_lightDown: nAlpha = 0x20;
break;
1883 case XML_lightGray: nAlpha = 0x20;
break;
1884 case XML_lightGrid: nAlpha = 0x38;
break;
1885 case XML_lightHorizontal: nAlpha = 0x20;
break;
1886 case XML_lightTrellis: nAlpha = 0x30;
break;
1887 case XML_lightUp: nAlpha = 0x20;
break;
1888 case XML_lightVertical: nAlpha = 0x20;
break;
1889 case XML_mediumGray: nAlpha = 0x40;
break;
1890 case XML_solid: nAlpha = 0x80;
break;
1918 GradientFillModel::ColorMap::const_iterator aIt = rModel.
maColors.begin();
1919 OSL_ENSURE( !aIt->second.isAuto(),
"Fill::finalizeImport - automatic gradient color" );
1921 if( ++aIt != rModel.
maColors.end() )
1923 OSL_ENSURE( !aIt->second.isAuto(),
"Fill::finalizeImport - automatic gradient color" );
1958 mbFontUsed( false ),
1959 mbNumFmtUsed( false ),
1960 mbAlignUsed( false ),
1961 mbProtUsed( false ),
1962 mbBorderUsed( false ),
1968 mbLatinNumFmtOnly(true),
1969 mpDefPattern(pDefPattern)
1995 const sal_Int32 xfId = rAttribs.
getInteger( XML_xfId, -1 );
1998 bApplyDefault = (xfId < 0);
2004 bApplyDefault =
true;
2060 sal_uInt32 nFlags =
rStrm.readuInt32();
2064 sal_uInt16 nUsedFlags =
rStrm.readuInt16();
2088 if (!pCachedPattern)
2094 if ( !pCachedPattern &&
isCellXf() )
2112 ScResId(STR_STYLENAME_STANDARD), SfxStyleFamily::Para));
2119 if ( !pCachedPattern && nNumFmtId >= 0 )
2134 bool bHasGap =
false;
2135 if (rAttrs.
maAttrs.empty() && nRow1 > 0)
2139 if (!rAttrs.
maAttrs.empty() && rAttrs.
maAttrs.back().nEndRow + 1 < nRow1)
2148 rAttrs.
maAttrs.push_back(aEntry);
2159 if (!pCachedPattern)
2162 rAttrs.
maAttrs.push_back(aEntry);
2194const ::ScPatternAttr&
2213 OSL_ENSURE(
mpStyleSheet,
"Xf::createPattern - no parentStyle created" );
2274 if( (pAlignment->getApiData().mnRotation) && pBorder->getApiData().hasAnyOuterBorder() )
2293 if( bAlwaysNew || !
mxFont )
2294 mxFont = std::make_shared<Font>( *
this,
true );
2301 mxBorder = std::make_shared<Border>( *
this,
true );
2307 if( bAlwaysNew || !
mxFill )
2308 mxFill = std::make_shared<Fill>( *
this,
true );
2320 OUString aFmtCode = rAttribs.
getXString( XML_formatCode, OUString() );
2326 sal_Int32 nNumFmtId = -1;
2328 sal_uInt16 nRecCount;
2330 nRecCount =
rStrm.readuInt16();
2331 for( sal_uInt16 nRec = 0; !
rStrm.isEof() && (nRec < nRecCount); ++nRec )
2333 sal_uInt16 nSubRecId, nSubRecSize;
2334 sal_Int64 nRecEnd =
rStrm.tell();
2335 nSubRecId =
rStrm.readuInt16();
2336 nSubRecSize =
rStrm.readuInt16();
2337 nRecEnd += nSubRecSize;
2340 case BIFF12_DXF_FILL_PATTERN:
createFill(
false )->importDxfPattern(
rStrm );
break;
2341 case BIFF12_DXF_FILL_FGCOLOR:
createFill(
false )->importDxfFgColor(
rStrm );
break;
2342 case BIFF12_DXF_FILL_BGCOLOR:
createFill(
false )->importDxfBgColor(
rStrm );
break;
2343 case BIFF12_DXF_FILL_GRADIENT:
createFill(
false )->importDxfGradient(
rStrm );
break;
2344 case BIFF12_DXF_FILL_STOP:
createFill(
false )->importDxfStop(
rStrm );
break;
2345 case BIFF12_DXF_FONT_COLOR:
createFont(
false )->importDxfColor(
rStrm );
break;
2346 case BIFF12_DXF_BORDER_TOP:
createBorder(
false )->importDxfBorder( XLS_TOKEN(
top ),
rStrm );
break;
2348 case BIFF12_DXF_BORDER_LEFT:
createBorder(
false )->importDxfBorder( XLS_TOKEN(
left ),
rStrm );
break;
2349 case BIFF12_DXF_BORDER_RIGHT:
createBorder(
false )->importDxfBorder( XLS_TOKEN(
right ),
rStrm );
break;
2350 case BIFF12_DXF_FONT_NAME:
createFont(
false )->importDxfName(
rStrm );
break;
2351 case BIFF12_DXF_FONT_WEIGHT:
createFont(
false )->importDxfWeight(
rStrm );
break;
2352 case BIFF12_DXF_FONT_UNDERLINE:
createFont(
false )->importDxfUnderline(
rStrm );
break;
2353 case BIFF12_DXF_FONT_ESCAPEMENT:
createFont(
false )->importDxfEscapement(
rStrm );
break;
2354 case BIFF12_DXF_FONT_ITALIC:
createFont(
false )->importDxfFlag( XML_i,
rStrm );
break;
2355 case BIFF12_DXF_FONT_STRIKE:
createFont(
false )->importDxfFlag( XML_strike,
rStrm );
break;
2356 case BIFF12_DXF_FONT_OUTLINE:
createFont(
false )->importDxfFlag( XML_outline,
rStrm );
break;
2357 case BIFF12_DXF_FONT_SHADOW:
createFont(
false )->importDxfFlag( XML_shadow,
rStrm );
break;
2358 case BIFF12_DXF_FONT_HEIGHT:
createFont(
false )->importDxfHeight(
rStrm );
break;
2359 case BIFF12_DXF_FONT_SCHEME:
createFont(
false )->importDxfScheme(
rStrm );
break;
2361 case BIFF12_DXF_NUMFMT_ID: nNumFmtId =
rStrm.readuInt16();
break;
2363 rStrm.seek( nRecEnd );
2365 OSL_ENSURE( !
rStrm.isEof() && (
rStrm.getRemaining() == 0),
"Dxf::importDxf - unexpected remaining data" );
2372 mxFont->finalizeImport();
2380 if (
mxAlignment->getModel().mnTextDir == OOX_XF_TEXTDIR_RTL )
2390 mxFill->finalizeImport();
2411const char*
const sppcStyleNames[] =
2422 "Followed Hyperlink",
2468const sal_Int32 snStyleNamesCount =
static_cast< sal_Int32
>(
SAL_N_ELEMENTS( sppcStyleNames ) );
2470OUString lclGetBuiltinStyleName( sal_Int32 nBuiltinId, std::u16string_view rName, sal_Int32 nLevel = 0 )
2472 OSL_ENSURE( (0 <= nBuiltinId) && (nBuiltinId < snStyleNamesCount),
"lclGetBuiltinStyleName - unknown built-in style" );
2473 OUStringBuffer aStyleName(
"Excel Built-in ");
2474 if( (0 <= nBuiltinId) && (nBuiltinId < snStyleNamesCount) && (sppcStyleNames[ nBuiltinId ] !=
nullptr) )
2475 aStyleName.appendAscii( sppcStyleNames[ nBuiltinId ] );
2476 else if( !rName.empty() )
2477 aStyleName.append( rName );
2479 aStyleName.append( nBuiltinId );
2480 if( (nBuiltinId == OOX_STYLE_ROWLEVEL) || (nBuiltinId == OOX_STYLE_COLLEVEL) )
2481 aStyleName.append( nLevel );
2482 return aStyleName.makeStringAndClear();
2485OUString lclCreateStyleName(
const CellStyleModel& rModel )
2487 return rModel.mbBuiltin ? lclGetBuiltinStyleName( rModel.mnBuiltinId, rModel.maName, rModel.mnLevel ) : rModel.
maName;
2515 mpStyleSheet( nullptr )
2534 nFlags =
rStrm.readuInt16();
2558 bool bCreatePattern =
false;
2566 ScResId( STR_STYLENAME_STANDARD ), SfxStyleFamily::Para ) );
2567 OSL_ENSURE(
mpStyleSheet,
"CellStyle::createStyle - Default style not found" );
2568 bCreatePattern =
true;
2576 bCreatePattern =
true;
2599 CellStyleRef xCellStyle = std::make_shared<CellStyle>( *
this );
2600 xCellStyle->importCellStyle( rAttribs );
2607 CellStyleRef xCellStyle = std::make_shared<CellStyle>( *
this );
2608 xCellStyle->importCellStyle(
rStrm );
2629 Reference< XStyle > xStyle( xStyleFamilyIA->getByIndex(
nIndex ), UNO_QUERY_THROW );
2630 if( !xStyle->isUserDefined() )
2633 aCellStyles[ xStyle->getName() ];
2649 OUString aStyleName = lclCreateStyleName( rModel );
2653 aCellStyles[ aStyleName ] = rxStyle;
2661 OUString aStyleName = lclCreateStyleName( rModel );
2663 if( aStyleName.getLength() > 0 )
2665 if( aCellStyles.find( aStyleName ) != aCellStyles.end() )
2666 aConflictNameStyles.push_back( rxStyle );
2668 aCellStyles[ aStyleName ] = rxStyle;
2675 for(
const auto& rxStyle : aConflictNameStyles )
2678 OUString aStyleName = lclCreateStyleName( rModel );
2679 OUString aUnusedName;
2682 aUnusedName = aStyleName + OUStringChar(
' ') + OUString::number( ++
nIndex );
2684 while( !aCellStyles.try_emplace( aUnusedName, rxStyle ).second );
2723 OSL_ENSURE(
maStylesByXf.count( rModel.
mnXfId ) == 0,
"CellStyleBuffer::insertCellStyle - multiple styles with equal XF identifier" );
2735 pStyleSheet = rxCellStyle->getStyleSheet();
2743 rxCellStyle->createCellStyle();
2744 const OUString& rStyleName = rxCellStyle->getFinalStyleName();
2745 if( !rStyleName.isEmpty() )
2749 return lclGetBuiltinStyleName( OOX_STYLE_NORMAL,
u"" );
2753 mnAutoFormatId( 0 ),
2754 mbApplyNumFmt( false ),
2755 mbApplyFont( false ),
2756 mbApplyAlignment( false ),
2757 mbApplyBorder( false ),
2758 mbApplyFill( false ),
2759 mbApplyProtection( false )
2765 maPalette( rHelper ),
2766 maNumFmts( rHelper ),
2773 FontRef xFont = std::make_shared<Font>( *
this,
false );
2790 BorderRef xBorder = std::make_shared<Border>( *
this,
false );
2797 FillRef xFill = std::make_shared<Fill>( *
this,
false );
2804 XfRef xXf = std::make_shared<Xf>( *
this );
2811 XfRef xXf = std::make_shared<Xf>( *
this );
2818 DxfRef xDxf = std::make_shared<Dxf>( *
this );
2819 maDxfs.push_back( xDxf );
2825 DxfRef xDxf = std::make_shared<Dxf>( *
this );
2911 xFont = pXf->getFont();
2919 xDefFont = pXf->getFont();
2923 OSL_ENSURE( xDefFont,
"StylesBuffer::getDefaultFont - no default font found" );
2936 return nBorderId1 == nBorderId2;
2942 return nFillId1 == nFillId2;
2963 if (!rStyleName.isEmpty())
2971 rStyleName =
"ConditionalStyle_" + OUString::number(nDxfId + 1);
2982 pDxf->fillToItemSet(rStyleItemSet);
2987 if (rStyleName.isEmpty())
2995 OUString rStyleName;
2999 rStyleName =
"ExtConditionalStyle_" + OUString::number(nDxfId + 1);
3010 pDxf->fillToItemSet(rStyleItemSet);
3014 if (rStyleName.isEmpty())
3023 pFont->fillToItemSet( rItemSet,
false, bSkipPoolDefs );
3034 pBorder->fillToItemSet( rItemSet, bSkipPoolDefs );
3040 pFill->fillToItemSet( rItemSet, bSkipPoolDefs );
LineDescriptorList maRight
LineDescriptorList maLeft
constexpr auto convertTwipToMm100(N n)
sal_uInt8 GetBlue() const
sal_uInt8 GetGreen() const
Accessor class to ScDocument.
bool isLatinScript(sal_uInt32 nFormat)
small cache for hot call during import
SC_DLLPUBLIC ScDocumentPool * GetPool()
SC_DLLPUBLIC void ApplyPatternAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScPatternAttr &rAttr)
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
SC_DLLPUBLIC void ApplyStyleAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScStyleSheet &rStyle)
const OUString * GetStyleName() const
void SetStyleSheet(ScStyleSheet *pNewStyle, bool bClearDirectFormat=true)
SfxItemSet & GetItemSet()
ScPatternAttr * query(sal_Int32 nXfId, sal_Int32 nNumFmtId) const
void add(sal_Int32 nXfId, sal_Int32 nNumFmtId, ScPatternAttr *pPattern)
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits nMask=SfxStyleSearchBits::All) override
virtual SC_DLLPUBLIC SfxItemSet & GetItemSet() override
SC_DLLPUBLIC void ResetParent()
const T & Put(std::unique_ptr< T > xItem, sal_uInt16 nWhich=0)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
static bool LineToSvxLine(const css::table::BorderLine &rLine, editeng::SvxBorderLine &rSvxLine, bool bConvert)
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxItemLine nLine)
void setComplexColor(model::ComplexColor const &rComplexColor)
void SetColor(const Color &rCol)
void SetFiltColor(const Color &rCol)
void SetLine(const editeng::SvxBorderLine *pNew)
void setComplexColor(model::ComplexColor const &rComplexColor)
bool hasAttribute(sal_Int32 nAttrToken) const
std::optional< OUString > getXString(sal_Int32 nAttrToken) const
std::optional< sal_Int32 > getIntegerHex(sal_Int32 nAttrToken) const
std::optional< sal_Int32 > getInteger(sal_Int32 nAttrToken) const
std::optional< bool > getBool(sal_Int32 nAttrToken) const
std::optional< sal_Int32 > getToken(sal_Int32 nAttrToken) const
std::optional< double > getDouble(sal_Int32 nAttrToken) const
static const VectorType::value_type * getVectorElement(const VectorType &rVector, sal_Int32 nIndex)
::Color getSystemColor(sal_Int32 nToken, ::Color nDefaultRgb=API_RGB_TRANSPARENT) const
bool setProperty(sal_Int32 nPropId, Type &&rValue)
css::uno::Any getAnyProperty(sal_Int32 nPropId) const
void setProperties(const css::uno::Sequence< OUString > &rPropNames, const css::uno::Sequence< css::uno::Any > &rValues)
mapped_type get(key_type nKey) const
value_type get(sal_Int32 nIndex) const
void forEachMem(FuncType pFunc) const
GraphicHelper & getGraphicHelper() const
void addExcelTintTransformation(double fTint)
::Color getColor(const GraphicHelper &rGraphicHelper, ::Color nPhClr=API_RGB_TRANSPARENT) const
model::ComplexColor createComplexColor(const GraphicHelper &rGraphicHelper, sal_Int16 nPhClrTheme) const
void setSchemeClr(sal_Int32 nToken)
void clearTransformations()
void setSrgbClr(sal_Int32 nRgb)
void setPaletteClr(sal_Int32 nPaletteIdx)
ApiAlignmentData maApiData
Alignment model data.
::SvxCellVerJustify GetScVerAlign() const
::SvxFrameDirection GetScFrameDir() const
::SvxCellHorJustify GetScHorAlign() const
void finalizeImport()
Final processing after import of all style settings.
void setBiff12Data(sal_uInt32 nFlags)
Sets the alignment attributes from the passed BIFF12 XF record data.
Alignment(const WorkbookHelper &rHelper)
const ApiAlignmentData & getApiData() const
Returns the converted API alignment data struct.
void fillToItemSet(SfxItemSet &rItemSet, bool bSkipPoolDefs=false) const
void importAlignment(const AttributeList &rAttribs)
Sets all attributes from the alignment element.
static OUString readString(SequenceInputStream &rStrm, bool b32BitLen=true)
Reads a BIFF12 string with leading 16-bit or 32-bit length field.
void finalizeImport(bool bRTL)
Final processing after import of all style settings.
void importDxfBorder(sal_Int32 nElement, SequenceInputStream &rStrm)
Imports a border from a DXF record from the passed stream.
BorderLineModel * getBorderLine(sal_Int32 nElement)
Returns the border line struct specified by the passed XML token identifier.
Border(const WorkbookHelper &rHelper, bool bDxf)
void importStyle(sal_Int32 nElement, const AttributeList &rAttribs)
Sets border attributes for the border line with the passed element identifier.
void importBorder(const AttributeList &rAttribs)
Sets global border attributes from the border element.
bool convertBorderLine(css::table::BorderLine2 &rBorderLine, const BorderLineModel &rModel)
Converts border line data to an API struct, returns true, if the line is marked as used.
void importColor(sal_Int32 nElement, const AttributeList &rAttribs)
Sets color attributes for the border line with the passed element identifier.
void fillToItemSet(SfxItemSet &rItemSet, bool bSkipPoolDefs=false) const
void finalizeImport()
Final processing after import of all style settings.
CellStyleRef importCellStyle(const AttributeList &rAttribs)
Appends and returns a new named cell style object.
OUString getDefaultStyleName() const
Returns the default style sheet for unused cells.
void insertCellStyle(CellStyleRef const &xCellStyle)
Inserts the passed cell style object into the internal maps.
CellStyleBuffer(const WorkbookHelper &rHelper)
CellStyleVector maUserStyles
All built-in cell styles.
CellStyleRef mxDefStyle
All cell styles, mapped by XF identifier.
sal_Int32 getDefaultXfId() const
Returns the XF identifier associated to the default cell style.
OUString createCellStyle(sal_Int32 nXfId) const
Creates the style sheet described by the style XF with the passed identifier.
CellStyleXfIdMap maStylesByXf
All user defined cell styles.
::ScStyleSheet * getCellStyleSheet(sal_Int32 nXfId) const
CellStyleVector maBuiltinStyles
bool mbCreated
Final style name used in API.
CellStyle(const WorkbookHelper &rHelper)
void createCellStyle()
Creates the style sheet in the document described by this cell style object.
void finalizeImport(const OUString &rFinalName)
Stores the passed final style name and creates the cell style, if it is user-defined or modified buil...
void importCellStyle(const AttributeList &rAttribs)
Imports passed attributes from the cellStyle element.
::ScStyleSheet * mpStyleSheet
True = style sheet created.
::Color getColor(sal_Int32 nPaletteIdx) const
Returns the RGB value of the color with the passed index.
::std::vector< ::Color > maColors
size_t mnAppendIndex
List of RGB values.
ColorPalette(const WorkbookHelper &rHelper)
Constructs the color palette with predefined color values.
void importPaletteColor(const AttributeList &rAttribs)
Appends a new color from the passed attributes.
void appendColor(::Color nRGBValue)
Appends the passed color.
void setRgb(::Color nRgbValue, double fTint=0.0)
Sets the color to the passed RGB value.
void setTheme(sal_Int32 nThemeIdx, double fTint=0.0)
Sets the color to the passed theme index.
void importColorId(SequenceInputStream &rStrm)
Imports a 32-bit palette color identifier from the passed BIFF12 stream.
void setIndexed(sal_Int32 nPaletteIdx, double fTint=0.0)
Sets the color to the passed palette index.
void setAuto()
Sets the color to automatic.
void importColor(const AttributeList &rAttribs)
Imports the color from the passed attribute list.
BorderRef mxBorder
Protection data.
Dxf(const WorkbookHelper &rHelper)
FillRef mxFill
Border data.
FontRef const & createFont(bool bAlwaysNew=true)
Creates a new empty font object.
std::shared_ptr< Protection > mxProtection
Alignment data.
BorderRef const & createBorder(bool bAlwaysNew=true)
Creates a new empty border object.
std::shared_ptr< Alignment > mxAlignment
Number format data.
void fillToItemSet(SfxItemSet &rSet) const
void finalizeImport()
Final processing after import of all style settings.
NumberFormatRef mxNumFmt
Font data.
void importNumFmt(const AttributeList &rAttribs)
Inserts a new number format code.
FillRef const & createFill(bool bAlwaysNew=true)
Creates a new empty fill object.
void importDxf(SequenceInputStream &rStrm)
Imports the DXF record from the passed stream.
ExcelGraphicHelper(const WorkbookHelper &rHelper)
virtual ::Color getPaletteColor(sal_Int32 nPaletteIdx) const override
Derived classes may implement to resolve a palette index to an RGB color.
virtual ::Color getSchemeColor(sal_Int32 nToken) const override
Derived classes may implement to resolve a scheme color from the passed XML token identifier.
Contains cell fill attributes, either a pattern fill or a gradient fill.
void importFgColor(const AttributeList &rAttribs)
Sets the pattern color from the fgColor element.
void finalizeImport()
Final processing after import of all style settings.
void fillToItemSet(SfxItemSet &rItemSet, bool bSkipPoolDefs=false) const
ApiSolidFillData maApiData
void importDxfGradient(SequenceInputStream &rStrm)
Imports gradient settings from a DXF record.
GradientModelRef mxGradientModel
void importColor(const AttributeList &rAttribs, double fPosition)
Sets a color from the color element in a gradient fill.
PatternModelRef mxPatternModel
void importDxfFgColor(SequenceInputStream &rStrm)
Imports the pattern color from a DXF record.
Fill(const WorkbookHelper &rHelper, bool bDxf)
void importPatternFill(const AttributeList &rAttribs)
Sets attributes of a patternFill element.
void importBgColor(const AttributeList &rAttribs)
Sets the background color from the bgColor element.
void importFill(SequenceInputStream &rStrm)
Imports the FILL record from the passed stream.
void importDxfStop(SequenceInputStream &rStrm)
Imports gradient stop settings from a DXF record.
void importDxfPattern(SequenceInputStream &rStrm)
Imports the fill pattern from a DXF record.
void importDxfBgColor(SequenceInputStream &rStrm)
Imports the background color from a DXF record.
void importGradientFill(const AttributeList &rAttribs)
Sets attributes of a gradientFill element.
ApiFontUsedFlags maUsedFlags
void importDxfHeight(SequenceInputStream &rStrm)
Imports the font height from a DXF record.
void importDxfColor(SequenceInputStream &rStrm)
Imports the font color from a DXF record.
void importAttribs(sal_Int32 nElement, const AttributeList &rAttribs)
Sets font formatting attributes for the passed element.
void importDxfName(SequenceInputStream &rStrm)
Imports the font name from a DXF record.
void fillToItemSet(SfxItemSet &rItemSet, bool bEditEngineText, bool bSkipPoolDefs=false) const
void importDxfWeight(SequenceInputStream &rStrm)
Imports the font weight from a DXF record.
void writeToPropertySet(PropertySet &rPropSet) const
Writes all font attributes to the passed property set.
bool needsRichTextFormat() const
Returns true, if the font requires rich text formatting in Calc.
void importDxfFlag(sal_Int32 nElement, SequenceInputStream &rStrm)
Imports a font style flag from a DXF record.
void importDxfScheme(SequenceInputStream &rStrm)
Imports the font scheme from a DXF record.
Font(const WorkbookHelper &rHelper, bool bDxf)
void writeToPropertyMap(PropertyMap &rPropMap) const
Writes all font attributes to the passed property map.
void finalizeImport()
Final processing after import of all style settings.
void importDxfEscapement(SequenceInputStream &rStrm)
Imports the font escapement style from a DXF record.
void importFont(SequenceInputStream &rStrm)
Imports the FONT record from the passed stream.
void importDxfUnderline(SequenceInputStream &rStrm)
Imports the font underline style from a DXF record.
void setBiff12Data(sal_uInt32 nFlags)
Sets the protection attributes from the passed BIFF12 XF record data.
void importProtection(const AttributeList &rAttribs)
Sets all attributes from the protection element.
Protection(const WorkbookHelper &rHelper)
void finalizeImport()
Final processing after import of all style settings.
const ApiProtectionData & getApiData() const
Returns the converted API protection data struct.
ApiProtectionData maApiData
Protection model data.
void fillToItemSet(SfxItemSet &rItemSet, bool bSkipPoolDefs=false) const
NumberFormatsBuffer maNumFmts
List of font objects.
CellStyleRef importCellStyle(const AttributeList &rAttribs)
Appends and returns a new named cell style object.
XfRef getStyleXf(sal_Int32 nXfId) const
Returns the specified style format object.
const FontModel & getDefaultFontModel() const
Returns the model of the default application font (used in the "Normal" cell style).
FontRef createFont()
Creates a new empty font object.
::ScStyleSheet * getCellStyleSheet(sal_Int32 nXfId) const
static bool equalFills(sal_Int32 nFillId1, sal_Int32 nFillId2)
Returns true, if the specified fills are equal.
XfVector maCellXfs
List of cell area fill objects.
void writeFillToItemSet(SfxItemSet &rItemSet, sal_Int32 nFillId, bool bSkipPoolDefs) const
Writes the fill attributes of the specified fill data to the passed property map.
void writeCellXfToDoc(ScDocumentImport &rDoc, const ScRange &rRange, sal_Int32 nXfId) const
Writes the cell formatting attributes of the specified XF to the passed property set.
FontRef getFontFromCellXf(sal_Int32 nXfId) const
Returns the font object of the specified cell XF.
FontRef getFont(sal_Int32 nFontId) const
Returns the specified font object.
BorderRef createBorder()
Creates a new empty border object.
static bool equalBorders(sal_Int32 nBorderId1, sal_Int32 nBorderId2)
Returns true, if the specified borders are equal.
OUString createDxfStyle(sal_Int32 nDxfId) const
Creates the style sheet described by the DXF with the passed identifier.
BorderRef getBorder(sal_Int32 nBorderId) const
Returns the specified border object.
XfRef createCellXf()
Creates a new empty cell formatting object.
StylesBuffer(const WorkbookHelper &rHelper)
void writeFontToItemSet(SfxItemSet &rItemSet, sal_Int32 nFontId, bool bSkipPoolDefs) const
DxfStyleMap maDxfStyles
List of differential extlst cell styles.
NumberFormatRef importNumFmt(const AttributeList &rAttribs)
Inserts a new number format code.
BorderVector maBorders
List of all number format codes.
FontVector maFonts
Color palette.
::Color getPaletteColor(sal_Int32 nIndex) const
Returns the palette color with the specified index.
DxfVector maExtDxfs
List of differential cell styles.
FillRef createFill()
Creates a new empty fill object.
sal_uInt32 writeNumFmtToItemSet(SfxItemSet &rItemSet, sal_uInt32 nNumFmtId, bool bSkipPoolDefs) const
XfVector maStyleXfs
List of cell formats.
XfRef createStyleXf()
Creates a new empty style formatting object.
FontRef getDefaultFont() const
Returns the default application font (used in the "Normal" cell style).
DxfVector maDxfs
All built-in and user defined cell styles.
FillVector maFills
List of cell border objects.
OUString getDefaultStyleName() const
Returns the default style sheet for unused cells.
DxfRef createDxf()
Creates a new empty differential formatting object.
void finalizeImport()
Final processing after import of all style settings.
void importPaletteColor(const AttributeList &rAttribs)
Appends a new color to the color palette.
OUString createExtDxfStyle(sal_Int32 nDxfId) const
NumberFormatRef createNumFmt(sal_Int32 nNumFmtId, std::u16string_view aFmtCode)
Creates a number format.
OUString createCellStyle(sal_Int32 nXfId) const
Creates the style sheet described by the style XF with the passed identifier.
CellStyleBuffer maCellStyles
List of cell styles.
XfRef getCellXf(sal_Int32 nXfId) const
Returns the specified cell format object.
sal_Int32 nextFreeNumFmtId()
void writeBorderToItemSet(SfxItemSet &rItemSet, sal_Int32 nBorderId, bool bSkipPoolDefs) const
Writes the specified number format to the passed property map.
::Color getColorByToken(sal_Int32 nToken) const
Returns the theme color with the specified token identifier.
const FontModel & getDefaultFontModel() const
Returns the default font data for the current file type.
Helper class that provides functions to convert values from and to different units.
void finalizeImport()
Final processing after import of all style settings.
double scaleValue(double fValue, Unit eFromUnit, Unit eToUnit) const
Converts the passed value between the passed units.
Helper class to provide access to global workbook data.
rtl_TextEncoding getTextEncoding() const
Returns the text encoding used to import/export byte strings.
css::uno::Reference< css::container::XNameContainer > getCellStyleFamily() const
Returns the cell styles container from the Calc document.
StylesBuffer & getStyles() const
Returns all cell formatting objects read from the styles substream.
ScDocument & getScDocument()
ScDocumentImport & getDocImport()
ThemeBuffer & getTheme() const
Returns the office theme object read from the theme substorage.
UnitConverter & getUnitConverter() const
Returns the measurement unit converter.
::oox::core::FilterBase & getBaseFilter() const
Returns the base filter object (base class of all filters).
const css::uno::Reference< css::sheet::XSpreadsheetDocument > & getDocument() const
Returns a reference to the source/target spreadsheet document model.
Represents a cell format or a cell style (called XF, extended format).
FontRef getFont() const
Returns the referred font object.
XfModel maModel
Calc number format.
const ::ScPatternAttr & createPattern(bool bSkipPoolDefs=false)
void importXf(const AttributeList &rAttribs, bool bCellXf)
Sets all attributes from the xf element.
void importAlignment(const AttributeList &rAttribs)
Sets all attributes from the alignment element.
void importProtection(const AttributeList &rAttribs)
Sets all attributes from the protection element.
sal_uInt32 mnScNumFmt
Calc item set.
::ScStyleSheet * mpStyleSheet
Rotation reference dependent on border.
void finalizeImport()
Final processing after import of all style settings.
void applyPatternToAttrList(AttrList &rAttrs, SCROW nRow1, SCROW nRow2, sal_Int32 nXfId, sal_Int32 nForceScNumFmt, ScPatternCache &rCache)
Xf(const WorkbookHelper &rHelper)
void writeToDoc(ScDocumentImport &rDoc, const ScRange &rRange)
sal_Int32 meRotationRef
Cell protection data.
Alignment maAlignment
Cell XF or style XF model data.
Protection maProtection
Cell alignment data.
bool isCellXf() const
Returns true, if the XF is a cell XF, and false, if it is a style XF.
ScPatternAttrPtr mpPattern
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
constexpr TypedWhichId< SvxContourItem > EE_CHAR_OUTLINE(EE_CHAR_START+8)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO_CJK(EE_CHAR_START+17)
constexpr TypedWhichId< SvxUnderlineItem > EE_CHAR_UNDERLINE(EE_CHAR_START+5)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT(EE_CHAR_START+2)
constexpr TypedWhichId< SvxShadowedItem > EE_CHAR_SHADOW(EE_CHAR_START+9)
constexpr TypedWhichId< SvxWeightItem > EE_CHAR_WEIGHT(EE_CHAR_START+4)
constexpr TypedWhichId< SvxColorItem > EE_CHAR_COLOR(EE_CHAR_START+0)
constexpr TypedWhichId< SvxWeightItem > EE_CHAR_WEIGHT_CTL(EE_CHAR_START+22)
constexpr TypedWhichId< SvxCrossedOutItem > EE_CHAR_STRIKEOUT(EE_CHAR_START+6)
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC(EE_CHAR_START+7)
constexpr TypedWhichId< SvxEscapementItem > EE_CHAR_ESCAPEMENT(EE_CHAR_START+10)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT_CTL(EE_CHAR_START+20)
constexpr TypedWhichId< SvxWeightItem > EE_CHAR_WEIGHT_CJK(EE_CHAR_START+21)
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC_CJK(EE_CHAR_START+23)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO_CTL(EE_CHAR_START+18)
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC_CTL(EE_CHAR_START+24)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT_CJK(EE_CHAR_START+19)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO(EE_CHAR_START+1)
#define STATIC_ARRAY_SELECT(array, index, def)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_N_ELEMENTS(arr)
Reference< XComponentContext > getComponentContext(Reference< XMultiServiceFactory > const &factory)
const sal_Int8 API_ESCAPEHEIGHT_NONE
Subscript: lower characters automatically (magic value -101).
::FontFamily lcl_getFontFamily(sal_Int32 nFamily)
const sal_Int16 API_ESCAPE_SUPERSCRIPT
No escapement.
const sal_Int32 OOX_COLOR_NOTETEXT
Note background color.
const sal_Int16 API_LINE_THICK
const sal_Int32 OOX_COLOR_WINDOWTEXT
System window background color (BIFF3-BIFF4).
std::shared_ptr< NumberFormat > NumberFormatRef
bool operator==(const ApiAlignmentData &rLeft, const ApiAlignmentData &rRight)
std::shared_ptr< Font > FontRef
const sal_Int32 OOX_COLOR_WINDOWBACK3
System window text color (BIFF3-BIFF4).
SequenceInputStream & operator>>(SequenceInputStream &rStrm, BinAddress &orPos)
const sal_Int16 API_LINE_MEDIUM
const sal_Int16 API_LINE_THIN
const sal_Int16 API_ESCAPE_SUBSCRIPT
Superscript: raise characters automatically (magic value 101).
const sal_Int32 OOX_COLOR_WINDOWTEXT3
std::shared_ptr< Border > BorderRef
std::shared_ptr< Dxf > DxfRef
const sal_Int16 API_LINE_NONE
Font auto color (system window text color).
std::shared_ptr< Fill > FillRef
const sal_Int32 OOX_COLOR_BUTTONBACK
System window background color (BIFF5+).
const sal_Int32 OOX_COLOR_FONTAUTO
Note text color.
const sal_Int32 OOX_COLOR_WINDOWBACK
System window text color (BIFF5+).
const sal_Int32 OOX_COLOR_NOTEBACK
Automatic frame border (BIFF8 charts).
const sal_Int8 API_ESCAPEHEIGHT_DEFAULT
Relative character height if not escaped.
std::shared_ptr< CellStyle > CellStyleRef
const sal_Int16 API_ESCAPE_NONE
const sal_Int32 OOX_COLOR_CHBORDERAUTO
System window background color (BIFF8 charts).
@ Space
Digit width of document default font.
const sal_Int32 OOX_COLOR_CHWINDOWBACK
System window text color (BIFF8 charts).
const sal_Int16 API_LINE_HAIR
std::shared_ptr< Xf > XfRef
const sal_Int32 OOX_COLOR_CHWINDOWTEXT
System button background color (face color).
const ::Color API_RGB_BLACK(0x000000)
const ::Color API_RGB_TRANSPARENT(ColorTransparency, 0xffffffff)
const sal_uInt8 WINDOWS_CHARSET_DEFAULT
bool getFlag(Type nBitField, Type nMask)
const ::Color API_RGB_WHITE(0xFFFFFF)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
VCL_DLLPUBLIC float ConvertFontWeight(FontWeight eWeight)
OUString ScResId(TranslateId aId)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_FONT_HEIGHT(101)
constexpr TypedWhichId< SvxFontItem > ATTR_CJK_FONT(111)
constexpr TypedWhichId< SvxPostureItem > ATTR_CTL_FONT_POSTURE(119)
constexpr TypedWhichId< SvxFontItem > ATTR_CTL_FONT(116)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CJK_FONT_HEIGHT(112)
constexpr TypedWhichId< SvxPostureItem > ATTR_FONT_POSTURE(103)
constexpr TypedWhichId< SvxWeightItem > ATTR_FONT_WEIGHT(102)
constexpr TypedWhichId< SvxColorItem > ATTR_FONT_COLOR(109)
constexpr TypedWhichId< SvxWeightItem > ATTR_CJK_FONT_WEIGHT(113)
constexpr TypedWhichId< SvxLineItem > ATTR_BORDER_TLBR(141)
constexpr TypedWhichId< SvxShadowedItem > ATTR_FONT_SHADOWED(108)
constexpr TypedWhichId< SvxContourItem > ATTR_FONT_CONTOUR(107)
constexpr TypedWhichId< SvxBrushItem > ATTR_BACKGROUND(148)
constexpr TypedWhichId< SvxJustifyMethodItem > ATTR_VER_JUSTIFY_METHOD(133)
constexpr TypedWhichId< SvxHorJustifyItem > ATTR_HOR_JUSTIFY(129)
constexpr TypedWhichId< SvxRotateModeItem > ATTR_ROTATE_MODE(136)
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
constexpr TypedWhichId< SvxJustifyMethodItem > ATTR_HOR_JUSTIFY_METHOD(130)
constexpr TypedWhichId< SvxFrameDirectionItem > ATTR_WRITINGDIR(138)
constexpr TypedWhichId< SvxCrossedOutItem > ATTR_FONT_CROSSEDOUT(106)
constexpr TypedWhichId< SvxLineItem > ATTR_BORDER_BLTR(142)
constexpr TypedWhichId< SvxVerJustifyItem > ATTR_VER_JUSTIFY(132)
constexpr TypedWhichId< SvxFontItem > ATTR_FONT(100)
constexpr TypedWhichId< SvxWeightItem > ATTR_CTL_FONT_WEIGHT(118)
constexpr TypedWhichId< SvxPostureItem > ATTR_CJK_FONT_POSTURE(114)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CTL_FONT_HEIGHT(117)
constexpr TypedWhichId< SvxUnderlineItem > ATTR_FONT_UNDERLINE(104)
const ScPatternAttr * pPattern
sal_Int32 mnIndent
Text rotation angle.
void setBiffVerAlign(sal_uInt8 nVerAlign)
Sets vertical alignment from the passed BIFF data.
bool mbWrapText
Indentation.
AlignmentModel()
True = justify last line in block text.
sal_Int32 mnTextDir
Vertical alignment.
bool mbShrink
True = multi-line text.
bool mbJustLastLine
True = shrink to fit cell size.
sal_Int32 mnVerAlign
Horizontal alignment.
sal_Int32 mnRotation
CTL text direction.
void setBiffHorAlign(sal_uInt8 nHorAlign)
Sets horizontal alignment from the passed BIFF data.
Contains all API cell alignment attributes.
sal_Int32 mnHorJustifyMethod
Horizontal alignment.
Degree100 mnRotation
Normal or stacked text.
css::table::CellOrientation meOrientation
sal_Int16 mnIndent
CTL text direction.
bool mbShrink
True = multi-line text.
css::table::CellHoriJustify meHorJustify
bool mbWrapText
Indentation.
ApiAlignmentData()
True = shrink to fit cell size.
sal_Int32 mnVerJustifyMethod
Vertical alignment.
sal_Int16 mnWritingMode
Text rotation angle.
ApiBorderLine maRight
Left line format.
model::ComplexColor maComplexColorBottom
model::ComplexColor maComplexColorLeft
Bottom line format.
bool mbBorderUsed
Diagonal bottom-left to top-right line format.
ApiBorderLine maBLtoTR
Diagonal top-left to bottom-right line format.
ApiBorderData()
True = diagonal line format used.
ApiBorderLine maTop
Right line format.
model::ComplexColor maComplexColorTop
bool hasAnyOuterBorder() const
Returns true, if any of the outer border lines is visible.
bool mbDiagUsed
True = left/right/top/bottom line format used.
model::ComplexColor maComplexColorRight
ApiBorderLine maBottom
Top line format.
::Color mnColor
Font descriptor (height in twips, weight in %).
ApiScriptFontName maLatinFont
sal_Int16 mnEscapement
Font complex color.
ApiFontData()
True = shadowed chgaracters.
css::awt::FontDescriptor maDesc
Font name for complex scripts.
model::ComplexColor maComplexColor
Font color.
sal_Int8 mnEscapeHeight
Escapement style.
ApiScriptFontName maAsianFont
Font name for latin scripts.
bool mbShadow
True = outlined characters.
bool mbOutline
Escapement font height.
ApiScriptFontName maCmplxFont
Font name for east-asian scripts.
bool mbShadowUsed
True = outline style is used.
bool mbSchemeUsed
True = font color is used.
bool mbOutlineUsed
True = strike out style is used.
ApiFontUsedFlags(bool bAllUsed)
True = shadow style is used.
bool mbColorUsed
True = font name/family/char set are used.
bool mbStrikeoutUsed
True = font posture (italic) is used.
bool mbEscapementUsed
True = underline style is used.
bool mbHeightUsed
True = font scheme is used.
bool mbPostureUsed
True = font weight (boldness) is used.
bool mbWeightUsed
True = escapement style is used.
bool mbUnderlineUsed
True = font height is used.
Contains all API cell protection attributes.
ApiCellProtection maCellProt
Contains API font name, family, and charset for a script type.
sal_Int16 mnFamily
Font name.
sal_Int16 mnTextEnc
Font family.
ApiScriptFontName()
Font text encoding.
bool mbTransparent
Fill color filtering.
ApiSolidFillData()
True = fill data is valid.
bool mbUsed
True = transparent area.
model::ComplexColor maComplexColor
Fill color.
Contains XML attributes of a single border line.
bool mbUsed
Border line style.
sal_Int32 mnStyle
Borderline color.
void setBiffStyle(sal_Int32 nLineStyle)
Sets the passed BIFF line style.
BorderLineModel(bool bDxf)
True = line format used.
bool mbDiagBLtoTR
True = top-left to bottom-right on.
BorderLineModel maBottom
Top line format.
bool mbDiagTLtoBR
Diagonal line format.
BorderModel(bool bDxf)
True = bottom-left to top-right on.
BorderLineModel maDiagonal
Bottom line format.
BorderLineModel maRight
Left line format.
BorderLineModel maTop
Right line format.
Contains attributes of a cell style, e.g.
bool mbHidden
True = customized builtin style.
bool isDefaultStyle() const
Returns true, if this style represents the default document cell style.
sal_Int32 mnXfId
Cell style name.
sal_Int32 mnLevel
Identifier for builtin styles.
CellStyleModel()
True = style not visible in GUI.
bool isBuiltin() const
Returns true, if this style is a builtin style.
bool mbCustom
True = builtin style.
sal_Int32 mnBuiltinId
Formatting for this cell style.
bool mbBuiltin
Level for builtin column/row styles.
Contains all XML font attributes, e.g.
bool mbShadow
True = outlined characters.
FontModel()
True = shadowed chgaracters.
bool mbItalic
True = bold characters.
sal_Int32 mnFamily
Major/minor scheme font.
void setBiff12Scheme(sal_uInt8 nScheme)
bool mbOutline
True = Strike out characters.
void setBiffEscapement(sal_uInt16 nEscapement)
sal_Int32 mnEscapement
Underline style.
sal_Int32 mnCharSet
Font family.
sal_Int32 mnScheme
Font color.
void setBiffUnderline(sal_uInt16 nUnderline)
sal_Int32 mnUnderline
Font height in points.
void setBiffHeight(sal_uInt16 nHeight)
bool mbBold
Escapement style.
double mfHeight
Windows font character set.
void setBiffWeight(sal_uInt16 nWeight)
bool mbStrikeout
True = italic characters.
Contains XML gradient fill attributes from the gradientFill element.
double mfRight
Left convergence for type path.
double mfBottom
Top convergence for type path.
double mfLeft
Rotation angle for type linear.
double mfTop
Right convergence for type path.
void readGradient(SequenceInputStream &rStrm)
Reads BIFF12 gradient settings from a FILL or DXF record.
GradientFillModel()
Gradient colors.
ColorMap maColors
Bottom convergence for type path.
double mfAngle
Gradient type, linear or path.
void readGradientStop(SequenceInputStream &rStrm, bool bDxf)
Reads BIFF12 gradient stop settings from a FILL or DXF record.
Contains XML pattern fill attributes from the patternFill element.
PatternFillModel(bool bDxf)
True = pattern used.
void setBiffPattern(sal_Int32 nPattern)
Sets the passed BIFF pattern identifier.
Color maFilterPatternColor
Pattern foreground color.
Color maFillColor
Pattern foreground for color filter.
bool mbFillColorUsed
True = pattern foreground color used.
sal_Int32 mnPattern
Background fill color.
bool mbPattColorUsed
Pattern identifier (e.g. solid).
bool mbPatternUsed
True = background fill color used.
ProtectionModel()
True = formula is hidden.
bool mbHidden
True = locked against editing.
Contains all data for a cell format or cell style.
bool mbFontUsed
True = cell XF, false = style XF.
sal_Int32 mnBorderId
Index to number format list.
XfModel()
True = area data used.
bool mbAreaUsed
True = border data used.
sal_Int32 mnNumFmtId
Index to font data list.
bool mbNumFmtUsed
True = font index used.
sal_Int32 mnFillId
Index to list of cell borders.
bool mbAlignUsed
True = number format used.
bool mbCellXf
Index to list of cell areas.
bool mbProtUsed
True = alignment used.
sal_Int32 mnFontId
Index to parent style XF.
bool mbBorderUsed
True = cell protection used.
AttrList(const ScPatternAttr *pDefPatternAttr)
std::vector< ScAttrEntry > maAttrs
const ScPatternAttr * mpDefPattern
#define PALETTE_EGA_COLORS_DARK
Standard EGA colors), dark.
#define PALETTE_EGA_COLORS_LIGHT
Standard EGA colors, bright.
Reference< XStyle > maCellStyles[style_count]
std::map< OUString, sal_Int32 > CellStyleNameMap
constexpr OUStringLiteral PROP_CharFontCharSetComplex
constexpr OUStringLiteral PROP_CharShadowed
constexpr OUStringLiteral PROP_CharHeightComplex
constexpr OUStringLiteral PROP_CharHeight
constexpr OUStringLiteral PROP_CharPostureComplex
constexpr OUStringLiteral PROP_CharContoured
constexpr OUStringLiteral PROP_CharPosture
constexpr OUStringLiteral PROP_CharWeight
constexpr OUStringLiteral PROP_CharFontNameComplex
constexpr OUStringLiteral PROP_CharUnderline
constexpr OUStringLiteral PROP_CharColor
constexpr OUStringLiteral PROP_CharWeightComplex
constexpr OUStringLiteral PROP_CharEscapement
constexpr OUStringLiteral PROP_CharStrikeout
constexpr OUStringLiteral PROP_CharHeightAsian
constexpr OUStringLiteral PROP_CharFontFamilyAsian
constexpr OUStringLiteral PROP_CharWeightAsian
constexpr OUStringLiteral PROP_CharFontCharSet
constexpr OUStringLiteral PROP_CharFontNameAsian
constexpr OUStringLiteral PROP_CharFontFamilyComplex
constexpr OUStringLiteral PROP_CharEscapementHeight
constexpr OUStringLiteral PROP_CharFontName
constexpr OUStringLiteral PROP_CharFontCharSetAsian
constexpr OUStringLiteral PROP_CharPostureAsian
constexpr OUStringLiteral PROP_CharFontFamily