24 #include <oox/token/namespaces.hxx>
25 #include <oox/token/tokens.hxx>
40 case XLS_TOKEN( indexedColors ):
61 mxFont->importAttribs( nElement, rAttribs );
75 case XLS_TOKEN( border ):
76 mxBorder->importStyle( nElement, rAttribs );
80 if( nElement == XLS_TOKEN(
color ) )
90 case XLS_TOKEN( fill ):
93 case XLS_TOKEN( patternFill ):
mxFill->importPatternFill( rAttribs );
return this;
94 case XLS_TOKEN( gradientFill ):
mxFill->importGradientFill( rAttribs );
return this;
97 case XLS_TOKEN( patternFill ):
100 case XLS_TOKEN( fgColor ):
mxFill->importFgColor( rAttribs );
break;
101 case XLS_TOKEN( bgColor ):
mxFill->importBgColor( rAttribs );
break;
104 case XLS_TOKEN( gradientFill ):
105 if( nElement == XLS_TOKEN(
stop ) )
111 case XLS_TOKEN(
stop ):
112 if( nElement == XLS_TOKEN(
color ) )
129 case XLS_TOKEN( xf ):
132 case XLS_TOKEN( alignment ):
mxXf->importAlignment( rAttribs );
break;
133 case XLS_TOKEN( protection ):
mxXf->importProtection( rAttribs );
break;
144 case XLS_TOKEN( dxf ):
147 case XLS_TOKEN( font ):
return new FontContext( *
this,
mxDxf->createFont() );
149 case XLS_TOKEN( fill ):
return new FillContext( *
this,
mxDxf->createFill() );
151 case XLS_TOKEN( numFmt ):
mxDxf->importNumFmt( rAttribs );
break;
153 case XLS_TOKEN( alignment ):
mxDxf->importAlignment( rAttribs );
break;
154 case XLS_TOKEN( protection ):
mxDxf->importProtection( rAttribs );
break;
162 case XLS14_TOKEN( dxf ):
168 case XLS_TOKEN( numFmt ):
mxExtDxf->importNumFmt( rAttribs );
break;
185 if( nElement == XLS_TOKEN( styleSheet ) )
return this;
188 case XLS_TOKEN( styleSheet ):
191 case XLS_TOKEN( colors ):
192 case XLS_TOKEN( numFmts ):
193 case XLS_TOKEN(
fonts ):
194 case XLS_TOKEN( borders ):
195 case XLS_TOKEN( fills ):
196 case XLS_TOKEN( cellXfs ):
197 case XLS_TOKEN( cellStyleXfs ):
198 case XLS_TOKEN( dxfs ):
199 case XLS_TOKEN( cellStyles ):
return this;
203 case XLS_TOKEN( colors ):
206 case XLS_TOKEN( numFmts ):
209 case XLS_TOKEN(
fonts ):
212 case XLS_TOKEN( borders ):
215 case XLS_TOKEN( fills ):
218 case XLS_TOKEN( cellXfs ):
219 if( nElement == XLS_TOKEN( xf ) )
return new XfContext( *
this,
getStyles().createCellXf(),
true );
221 case XLS_TOKEN( cellStyleXfs ):
222 if( nElement == XLS_TOKEN( xf ) )
return new XfContext( *
this,
getStyles().createStyleXf(),
false );
224 case XLS_TOKEN( dxfs ):
225 if( nElement == XLS_TOKEN( dxf ) )
return new DxfContext( *
this,
getStyles().createDxf() );
227 case XLS_TOKEN( cellStyles ):
290 static const RecordInfo spRecInfos[] =
Helper class to provide access to global workbook data.
const sal_Int32 BIFF12_ID_FONTS
const sal_Int32 BIFF12_ID_FONT
CellStyleRef importCellStyle(const AttributeList &rAttribs)
Appends and returns a new named cell style object.
const sal_Int32 BIFF12_ID_FILL
FillRef createFill()
Creates a new empty fill object.
const sal_Int32 BIFF12_ID_DXF
const sal_Int32 BIFF12_ID_BORDER
const sal_Int32 BIFF12_ID_NUMFMTS
virtual ::oox::core::ContextHandlerRef onCreateRecordContext(sal_Int32 nRecId, SequenceInputStream &rStrm) override
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
const sal_Int32 BIFF12_ID_INDEXEDCOLORS
const sal_Int32 BIFF12_ID_XF
XfRef createCellXf()
Creates a new empty cell formatting object.
OptValue< double > getDouble(sal_Int32 nAttrToken) const
StylesBuffer & getStyles() const
Returns all cell formatting objects read from the styles substream.
void importPaletteColor(const AttributeList &rAttribs)
Appends a new color to the color palette.
const sal_Int32 BIFF12_ID_CELLSTYLES
const sal_Int32 BIFF12_ID_BORDERS
Fragment handler derived from the WorkbookHelper helper class.
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
const sal_Int32 BIFF12_ID_RGBCOLOR
virtual void finalizeImport() override
XfRef createStyleXf()
Creates a new empty style formatting object.
const sal_Int32 BIFF12_ID_COLORS
const sal_Int32 BIFF12_ID_CELLSTYLEXFS
const sal_Int32 BIFF12_ID_STYLESHEET
virtual const ::oox::core::RecordInfo * getRecordInfos() const override
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
const sal_Int32 BIFF12_ID_CELLSTYLE
virtual void onStartElement(const AttributeList &rAttribs) override
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
sal_Int32 getCurrentElement() const
void finalizeImport()
Final processing after import of all style settings.
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
virtual void onStartElement(const AttributeList &rAttribs) override
NumberFormatRef importNumFmt(const AttributeList &rAttribs)
Inserts a new number format code.
Context handler derived from the WorkbookHelper helper class.
const sal_Int32 BIFF12_ID_MRUCOLORS
const sal_Int32 BIFF12_ID_FILLS
const sal_Int32 BIFF12_ID_CELLXFS
const sal_Int32 BIFF12_ID_NUMFMT
virtual ::oox::core::ContextHandlerRef onCreateRecordContext(sal_Int32 nRecId, SequenceInputStream &rStrm) override
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
FontRef createFont()
Creates a new empty font object.
const sal_Int32 BIFF12_ID_TABLESTYLES
const sal_Int32 XML_ROOT_CONTEXT
const sal_Int32 BIFF12_ID_DXFS
DxfRef createDxf()
Creates a new empty differential formatting object.
BorderRef createBorder()
Creates a new empty border object.
IndexedColorsContext(WorkbookFragmentBase &rFragment)
StylesFragment(const WorkbookHelper &rHelper, const OUString &rFragmentPath)