Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 : #ifndef INCLUDED_SW_SOURCE_UI_VBA_VBATABLEHELPER_HXX
20 : #define INCLUDED_SW_SOURCE_UI_VBA_VBATABLEHELPER_HXX
21 :
22 : #include <com/sun/star/text/XTextTable.hpp>
23 : #include "wordvbahelper.hxx"
24 : #include <swtable.hxx>
25 : #include <tabcol.hxx>
26 :
27 : class SwVbaTableHelper
28 : {
29 : private:
30 : css::uno::Reference< css::text::XTextTable > mxTextTable;
31 : SwTable* pTable;
32 :
33 : private:
34 : SwTableBox* GetTabBox( sal_Int32 nCol, sal_Int32 nRow ) throw (css::uno::RuntimeException);
35 : void InitTabCols( SwTabCols& rCols, const SwTableBox *pStart, bool bCurRowOnly = false );
36 : static sal_Int32 GetRightSeparator( SwTabCols& rCols, sal_Int32 nNum);
37 : static sal_Int32 GetColCount( SwTabCols& rCols );
38 : static sal_Int32 GetColWidth( SwTabCols& rCols, sal_Int32 nNum ) throw (css::uno::RuntimeException);
39 :
40 : public:
41 : explicit SwVbaTableHelper( const css::uno::Reference< css::text::XTextTable >& xTextTable ) throw (css::uno::RuntimeException);
42 0 : ~SwVbaTableHelper() {}
43 : sal_Int32 getTabColumnsCount( sal_Int32 nRowIndex ) throw (css::uno::RuntimeException);
44 : sal_Int32 getTabColumnsMaxCount( ) throw (css::uno::RuntimeException);
45 : sal_Int32 getTabRowIndex( const OUString& sCellName ) throw (css::uno::RuntimeException);
46 : sal_Int32 getTabColIndex( const OUString& sCellName ) throw (css::uno::RuntimeException);
47 : sal_Int32 getTableWidth( ) throw (css::uno::RuntimeException);
48 :
49 : sal_Int32 GetColWidth( sal_Int32 nCol, sal_Int32 nRow = 0, bool bCurRowOnly = false ) throw (css::uno::RuntimeException);
50 : void SetColWidth( sal_Int32 _width, sal_Int32 nCol, sal_Int32 nRow = 0, bool bCurRowOnly = false ) throw (css::uno::RuntimeException, std::exception);
51 :
52 : static SwTable* GetSwTable( const css::uno::Reference< css::text::XTextTable >& xTextTable ) throw (css::uno::RuntimeException);
53 : static OUString getColumnStr( sal_Int32 nCol );
54 : };
55 :
56 : #endif
57 :
58 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|