xref: /AOO41X/main/sw/source/core/unocore/XMLRangeHelper.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 //!!
29 //!! This file is an exact copy of the same file in chart2 project
30 //!!
31 
32 #ifndef XMLRANGEHELPER_HXX
33 #define XMLRANGEHELPER_HXX
34 
35 #include <sal/types.h>
36 #include <rtl/ustring.hxx>
37 
38 //namespace chart
39 //{
40 namespace XMLRangeHelper
41 {
42 
43 struct Cell
44 {
45     sal_Int32 nColumn;
46     sal_Int32 nRow;
47     bool bRelativeColumn;
48     bool bRelativeRow;
49     bool bIsEmpty;
50 
51     Cell() :
52             nColumn(0),
53             nRow(0),
54             bRelativeColumn(false),
55             bRelativeRow(false),
56             bIsEmpty(true)
57     {}
58 
59     inline bool empty() const { return bIsEmpty; }
60 };
61 
62 struct CellRange
63 {
64     Cell aUpperLeft;
65     Cell aLowerRight;
66     ::rtl::OUString aTableName;
67 };
68 
69 CellRange getCellRangeFromXMLString( const ::rtl::OUString & rXMLString );
70 
71 ::rtl::OUString getXMLStringFromCellRange( const CellRange & rRange );
72 
73 
74 } //  namespace XMLRangeHelper
75 //} //  namespace chart
76 
77 // XMLRANGEHELPER_HXX
78 #endif
79