1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef OOX_DRAWINGML_CHART_DATASOURCECONTEXT_HXX 25 #define OOX_DRAWINGML_CHART_DATASOURCECONTEXT_HXX 26 27 #include "oox/drawingml/chart/chartcontextbase.hxx" 28 29 namespace oox { 30 namespace drawingml { 31 namespace chart { 32 33 // ============================================================================ 34 35 struct DataSequenceModel; 36 37 typedef ContextBase< DataSequenceModel > DataSequenceContextBase; 38 39 // ============================================================================ 40 41 /** Handler for a double sequence context (c:numLit, c:numRef elements). 42 */ 43 class DoubleSequenceContext : public DataSequenceContextBase 44 { 45 public: 46 explicit DoubleSequenceContext( ::oox::core::ContextHandler2Helper& rParent, DataSequenceModel& rModel ); 47 virtual ~DoubleSequenceContext(); 48 49 virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ); 50 virtual void onCharacters( const ::rtl::OUString& rChars ); 51 52 private: 53 sal_Int32 mnPtIndex; /// Current data point index. 54 }; 55 56 // ============================================================================ 57 58 /** Handler for a string sequence context (c:multiLvlStrRef, c:strLit, 59 c:strRef elements). 60 */ 61 class StringSequenceContext : public DataSequenceContextBase 62 { 63 public: 64 explicit StringSequenceContext( ::oox::core::ContextHandler2Helper& rParent, DataSequenceModel& rModel ); 65 virtual ~StringSequenceContext(); 66 67 virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ); 68 virtual void onCharacters( const ::rtl::OUString& rChars ); 69 70 private: 71 sal_Int32 mnPtIndex; /// Current data point index. 72 }; 73 74 // ============================================================================ 75 76 struct DataSourceModel; 77 78 /** Handler for a data source context (c:bubbleSize, c:cat, c:minus, c:plus, 79 c:val, c:xVal, c:yVal elements). 80 */ 81 class DataSourceContext : public ContextBase< DataSourceModel > 82 { 83 public: 84 explicit DataSourceContext( ::oox::core::ContextHandler2Helper& rParent, DataSourceModel& rModel ); 85 virtual ~DataSourceContext(); 86 87 virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ); 88 }; 89 90 // ============================================================================ 91 92 } // namespace chart 93 } // namespace drawingml 94 } // namespace oox 95 96 #endif 97