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 .
19 #ifndef INCLUDED_CHART2_SOURCE_INC_INTERNALDATA_HXX
20 #define INCLUDED_CHART2_SOURCE_INC_INTERNALDATA_HXX
22 #include <com/sun/star/uno/Sequence.hxx>
35 void createDefaultData();
37 void setData( const css::uno::Sequence
< css::uno::Sequence
< double > > & rDataInRows
);
38 css::uno::Sequence
< css::uno::Sequence
< double > > getData() const;
40 css::uno::Sequence
< double > getColumnValues( sal_Int32 nColumnIndex
) const;
41 css::uno::Sequence
< double > getRowValues( sal_Int32 nRowIndex
) const;
43 void setColumnValues( sal_Int32 nColumnIndex
, const std::vector
< double > & rNewData
);
44 void setRowValues( sal_Int32 nRowIndex
, const std::vector
< double > & rNewData
);
46 void setComplexColumnLabel( sal_Int32 nColumnIndex
, const std::vector
< css::uno::Any
>& rComplexLabel
);
47 void setComplexRowLabel( sal_Int32 nRowIndex
, const std::vector
< css::uno::Any
>& rComplexLabel
);
49 std::vector
< css::uno::Any
> getComplexColumnLabel( sal_Int32 nColumnIndex
) const;
50 std::vector
< css::uno::Any
> getComplexRowLabel( sal_Int32 nRowIndex
) const;
52 void swapRowWithNext( sal_Int32 nRowIndex
);
53 void swapColumnWithNext( sal_Int32 nColumnIndex
);
55 void insertColumn( sal_Int32 nAfterIndex
);
56 void insertRow( sal_Int32 nAfterIndex
);
57 void deleteColumn( sal_Int32 nAtIndex
);
58 void deleteRow( sal_Int32 nAtIndex
);
60 /// @return the index of the newly appended column
61 sal_Int32
appendColumn();
62 /// @return the index of the newly appended row
63 sal_Int32
appendRow();
65 sal_Int32
getRowCount() const;
66 sal_Int32
getColumnCount() const;
68 typedef std::vector
< std::vector
< css::uno::Any
> > tVecVecAny
; //inner index is hierarchical level
70 void setComplexRowLabels( const tVecVecAny
& rNewRowLabels
);
71 const tVecVecAny
& getComplexRowLabels() const;
72 void setComplexColumnLabels( const tVecVecAny
& rNewColumnLabels
);
73 const tVecVecAny
& getComplexColumnLabels() const;
78 /** resizes the data if at least one of the given dimensions is larger than
79 before. The data is never becoming smaller only larger.
81 @return </true>, if the data was enlarged
83 bool enlargeData( sal_Int32 nColumnCount
, sal_Int32 nRowCount
);
86 sal_Int32 m_nColumnCount
;
87 sal_Int32 m_nRowCount
;
89 typedef std::valarray
< double > tDataType
;
91 tVecVecAny m_aRowLabels
;//outer index is row index, inner index is category level
92 tVecVecAny m_aColumnLabels
;//outer index is column index
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */