LibreOffice Module sw (master) 1
vbatablehelper.hxx
Go to the documentation of this file.
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 <swtable.hxx>
24#include <tabcol.hxx>
25
27{
28private:
29 css::uno::Reference< css::text::XTextTable > mxTextTable;
31
32private:
34 SwTableBox* GetTabBox( sal_Int32 nCol, sal_Int32 nRow );
35 void InitTabCols( SwTabCols& rCols, const SwTableBox *pStart );
36 static sal_Int32 GetRightSeparator( SwTabCols const & rCols, sal_Int32 nNum);
37 static sal_Int32 GetColCount( SwTabCols const & rCols );
39 static sal_Int32 GetColWidth( SwTabCols& rCols, sal_Int32 nNum );
40
41public:
43 explicit SwVbaTableHelper( css::uno::Reference< css::text::XTextTable > xTextTable );
45 sal_Int32 getTabColumnsCount( sal_Int32 nRowIndex );
47 sal_Int32 getTabColumnsMaxCount( );
49 sal_Int32 getTabRowIndex( const OUString& sCellName );
51 sal_Int32 getTabColIndex( const OUString& sCellName );
53 sal_Int32 getTableWidth( ) const;
54
56 sal_Int32 GetColWidth( sal_Int32 nCol, sal_Int32 nRow = 0 );
58 void SetColWidth( sal_Int32 _width, sal_Int32 nCol, sal_Int32 nRow = 0, bool bCurRowOnly = false );
59
61 static SwTable* GetSwTable( const css::uno::Reference< css::text::XTextTable >& xTextTable );
62 static OUString getColumnStr( sal_Int32 nCol );
63};
64
65#endif
66
67/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SwTableBox is one table cell in the document model.
Definition: swtable.hxx:443
SwTable is one table in the document model, containing rows (which contain cells).
Definition: swtable.hxx:113
static sal_Int32 GetColCount(SwTabCols const &rCols)
sal_Int32 getTabColumnsCount(sal_Int32 nRowIndex)
sal_Int32 getTabColIndex(const OUString &sCellName)
css::uno::Reference< css::text::XTextTable > mxTextTable
sal_Int32 getTabRowIndex(const OUString &sCellName)
void SetColWidth(sal_Int32 _width, sal_Int32 nCol, sal_Int32 nRow=0, bool bCurRowOnly=false)
sal_Int32 getTableWidth() const
sal_Int32 getTabColumnsMaxCount()
static OUString getColumnStr(sal_Int32 nCol)
static sal_Int32 GetRightSeparator(SwTabCols const &rCols, sal_Int32 nNum)
static SwTable * GetSwTable(const css::uno::Reference< css::text::XTextTable > &xTextTable)
static sal_Int32 GetColWidth(SwTabCols &rCols, sal_Int32 nNum)
SwVbaTableHelper(css::uno::Reference< css::text::XTextTable > xTextTable)
SwTableBox * GetTabBox(sal_Int32 nCol, sal_Int32 nRow)
void InitTabCols(SwTabCols &rCols, const SwTableBox *pStart)