Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2008 by Sun Microsystems, Inc.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : : #ifndef SW_WORD_VBA_TABLEHELPER_HXX
29 : : #define SW_WORD_VBA_TABLEHELPER_HXX
30 : :
31 : : #include <com/sun/star/text/XTextTable.hpp>
32 : : #include "wordvbahelper.hxx"
33 : : #include <swtable.hxx>
34 : : #include <tabcol.hxx>
35 : : #include <doc.hxx>
36 : :
37 : : class SwVbaTableHelper
38 : : {
39 : : private:
40 : : css::uno::Reference< css::text::XTextTable > mxTextTable;
41 : : SwTable* pTable;
42 : : SwDoc* pDoc;
43 : :
44 : : private:
45 : : SwTableBox* GetTabBox( sal_Int32 nCol, sal_Int32 nRow ) throw (css::uno::RuntimeException);
46 : : void InitTabCols( SwTabCols& rCols, const SwTableBox *pStart, sal_Bool bCurRowOnly = sal_False );
47 : : sal_Int32 GetRightSeparator( SwTabCols& rCols, sal_Int32 nNum) const;
48 : : sal_Int32 GetColCount( SwTabCols& rCols ) const;
49 : : sal_Int32 GetColWidth( SwTabCols& rCols, sal_Int32 nNum ) throw (css::uno::RuntimeException);
50 : :
51 : : public:
52 : : SwVbaTableHelper( const css::uno::Reference< css::text::XTextTable >& xTextTable ) throw (css::uno::RuntimeException);
53 : 0 : ~SwVbaTableHelper() {}
54 : : sal_Int32 getTabColumnsCount( sal_Int32 nRowIndex ) throw (css::uno::RuntimeException);
55 : : sal_Int32 getTabColumnsMaxCount( ) throw (css::uno::RuntimeException);
56 : : sal_Int32 getTabRowIndex( const rtl::OUString& sCellName ) throw (css::uno::RuntimeException);
57 : : sal_Int32 getTabColIndex( const rtl::OUString& sCellName ) throw (css::uno::RuntimeException);
58 : : sal_Int32 getTableWidth( ) throw (css::uno::RuntimeException);
59 : :
60 : : sal_Int32 GetColWidth( sal_Int32 nCol, sal_Int32 nRow = 0, sal_Bool bCurRowOnly = sal_False ) throw (css::uno::RuntimeException);
61 : : void SetColWidth( sal_Int32 _width, sal_Int32 nCol, sal_Int32 nRow = 0, sal_Bool bCurRowOnly = sal_False ) throw (css::uno::RuntimeException);
62 : :
63 : : static SwTable* GetSwTable( const css::uno::Reference< css::text::XTextTable >& xTextTable ) throw (css::uno::RuntimeException);
64 : : static rtl::OUString getColumnStr( sal_Int32 nCol );
65 : : };
66 : :
67 : : #endif
68 : :
69 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|