1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include "excelhandlers.hxx"
23 #include "stylesbuffer.hxx"
27 class IndexedColorsContext
: public WorkbookContextBase
30 explicit IndexedColorsContext( WorkbookFragmentBase
& rFragment
);
33 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
34 virtual ::oox::core::ContextHandlerRef
onCreateRecordContext( sal_Int32 nRecId
, SequenceInputStream
& rStrm
) override
;
37 class FontContext
: public WorkbookContextBase
40 template< typename ParentType
>
41 explicit FontContext( ParentType
& rParent
, const FontRef
& rxFont
) :
42 WorkbookContextBase( rParent
), mxFont( rxFont
) {}
45 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
51 class BorderContext
: public WorkbookContextBase
54 template< typename ParentType
>
55 explicit BorderContext( ParentType
& rParent
, const BorderRef
& rxBorder
) :
56 WorkbookContextBase( rParent
), mxBorder( rxBorder
) {}
59 virtual void onStartElement( const AttributeList
& rAttribs
) override
;
60 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
66 class FillContext
: public WorkbookContextBase
69 template< typename ParentType
>
70 explicit FillContext( ParentType
& rParent
, const FillRef
& rxFill
) :
71 WorkbookContextBase( rParent
), mxFill( rxFill
), mfGradPos( -1.0 ) {}
74 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
78 double mfGradPos
; /// Gradient color position.
81 class XfContext
: public WorkbookContextBase
84 template< typename ParentType
>
85 explicit XfContext( ParentType
& rParent
, const XfRef
& rxXf
, bool bCellXf
) :
86 WorkbookContextBase( rParent
), mxXf( rxXf
), mbCellXf( bCellXf
) {}
89 virtual void onStartElement( const AttributeList
& rAttribs
) override
;
90 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
94 bool mbCellXf
; /// True = cell XF, false = style XF.
97 class DxfContext
: public WorkbookContextBase
100 template< typename ParentType
>
101 explicit DxfContext( ParentType
& rParent
, const DxfRef
& rxDxf
) :
102 WorkbookContextBase( rParent
), mxDxf( rxDxf
), mxExtDxf( rxDxf
) {}
105 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
112 class StylesFragment
: public WorkbookFragmentBase
115 explicit StylesFragment(
116 const WorkbookHelper
& rHelper
,
117 const OUString
& rFragmentPath
);
120 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
121 virtual ::oox::core::ContextHandlerRef
onCreateRecordContext( sal_Int32 nRecId
, SequenceInputStream
& rStrm
) override
;
123 virtual const ::oox::core::RecordInfo
* getRecordInfos() const override
;
124 virtual void finalizeImport() override
;
127 } // namespace oox::xls
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */