summaryrefslogtreecommitdiff
path: root/sc/source/filter/inc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-05-18 10:33:16 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-05-18 10:51:21 +0200
commitd961b694348a0dd048761a6046de7393ac077f31 (patch)
tree1c18cdf513c5bc765fadefa1825d03e1be05dc83 /sc/source/filter/inc
parent862f56d19e1c57d3d648275877fc434fb119e80f (diff)
implement databar import from oox
Change-Id: Id510acbc7291b94610e0e2c769d8cee582baa9a7
Diffstat (limited to 'sc/source/filter/inc')
-rw-r--r--sc/source/filter/inc/condformatbuffer.hxx21
-rw-r--r--sc/source/filter/inc/condformatcontext.hxx13
2 files changed, 32 insertions, 2 deletions
diff --git a/sc/source/filter/inc/condformatbuffer.hxx b/sc/source/filter/inc/condformatbuffer.hxx
index b8b2d653fb41..de2c906166cc 100644
--- a/sc/source/filter/inc/condformatbuffer.hxx
+++ b/sc/source/filter/inc/condformatbuffer.hxx
@@ -39,6 +39,8 @@ namespace com { namespace sun { namespace star {
namespace sheet { class XSheetConditionalEntries; }
} } }
class ScColorScaleFormat;
+class ScDataBarFormat;
+struct ScDataBarFormatData;
namespace oox {
namespace xls {
@@ -112,6 +114,23 @@ private:
sal_uInt32 mnCol;
};
+class DataBarRule : public WorksheetHelper
+{
+public:
+ DataBarRule( const CondFormat& rFormat );
+ void importCfvo( const AttributeList& rAttribs );
+ void importColor( const AttributeList& rAttribs );
+
+ void SetData( ScDataBarFormat* pFormat, ScDocument* pDoc, const ScAddress& rAddr );
+
+private:
+ const CondFormat& mrCondFormat;
+ ScDataBarFormatData* mpFormat;
+
+ boost::scoped_ptr<ColorScaleRuleModelEntry> mpUpperLimit;
+ boost::scoped_ptr<ColorScaleRuleModelEntry> mpLowerLimit;
+};
+
// ============================================================================
@@ -138,11 +157,13 @@ public:
inline sal_Int32 getPriority() const { return maModel.mnPriority; }
ColorScaleRule* getColorScale();
+ DataBarRule* getDataBar();
private:
const CondFormat& mrCondFormat;
CondFormatRuleModel maModel;
boost::scoped_ptr<ColorScaleRule> mpColor;
+ boost::scoped_ptr<DataBarRule> mpDataBar;
};
typedef ::boost::shared_ptr< CondFormatRule > CondFormatRuleRef;
diff --git a/sc/source/filter/inc/condformatcontext.hxx b/sc/source/filter/inc/condformatcontext.hxx
index 7af625808bb4..08f53418fa59 100644
--- a/sc/source/filter/inc/condformatcontext.hxx
+++ b/sc/source/filter/inc/condformatcontext.hxx
@@ -48,8 +48,17 @@ public:
virtual void onStartElement( const AttributeList& rAttribs );
virtual void onCharacters( const ::rtl::OUString& rChars );
- virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm );
- virtual void onStartRecord( SequenceInputStream& rStrm );
+private:
+ CondFormatRuleRef mxRule;
+};
+
+class DataBarContext : public WorksheetContextBase
+{
+public:
+ explicit DataBarContext( CondFormatContext& rFormat, CondFormatRuleRef xRule );
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
+ virtual void onStartElement( const AttributeList& rAttribs );
private:
CondFormatRuleRef mxRule;