30#define UNO_TABLE_COLUMN_SUM 10000
41 throw uno::RuntimeException();
45 throw uno::RuntimeException();
70 if( nRet < nColCount )
81 throw uno::RuntimeException();
86 nRet = pLines->
GetPos( pLine );
94 throw uno::RuntimeException();
100 const sal_Int32 coDiff = 52;
105 nCalc = nCol % coDiff;
107 sRet = OUStringChar(
sal_Unicode(
'a' - 26 + nCalc) ) + sRet;
109 sRet = OUStringChar(
sal_Unicode(
'A' + nCalc) ) + sRet;
122 sal_Int32 nWidth = 0;
123 bool isWidthRelatvie =
false;
124 uno::Reference< beans::XPropertySet > xTableProps(
mxTextTable, uno::UNO_QUERY_THROW );
125 xTableProps->getPropertyValue(
"IsWidthRelative") >>= isWidthRelatvie;
126 if( isWidthRelatvie )
128 xTableProps->getPropertyValue(
"RelativeWidth") >>= nWidth;
132 xTableProps->getPropertyValue(
"Width") >>= nWidth;
140 sal_Int32 nRowCount = rLines.
size();
141 if (nRow < 0 || nRow >= nRowCount)
142 throw uno::RuntimeException();
146 if (nCol < 0 || nCol >= nColCount)
147 throw uno::RuntimeException();
152 throw uno::RuntimeException();
169 for(
size_t i = 0;
i < rCols.
Count(); ++
i )
177 OSL_ENSURE( nNum <
GetColCount( rCols ) ,
"Index out of range");
196 double dAbsWidth = (
static_cast<double>(nWidth) /
UNO_TABLE_COLUMN_SUM ) *
static_cast<double>(nTableWidth);
197 return static_cast<sal_Int32
>(Millimeter::getInPoints(
static_cast<int>(dAbsWidth) ));
204 if( rCols.
Count() > 0 )
208 if(
static_cast<size_t>(nNum) == rCols.
Count())
209 nWidth = rCols.
GetRight() - rCols[nNum-1];
212 nWidth = rCols[nNum];
216 nWidth -= rCols[nNum-1];
227 nWidth = nRValid - nLValid;
238 double dAbsWidth = Millimeter::getInHundredthsOfOneMillimeter( _width );
241 throw uno::RuntimeException();
249 if ( aCols.
Count() > 0 )
253 int nDiff = nNewWidth - nWidth;
262 int nDiffLeft = nDiff -
static_cast<int>(
GetColWidth( aCols, nCol + 1)) +
int(
MINLAY);
void SetRight(tools::Long nNew)
tools::Long GetLeft() const
void SetLeft(tools::Long nNew)
void SetRightMax(tools::Long nNew)
void SetLeftMin(tools::Long nNew)
tools::Long GetRight() const
tools::Long GetRightMax() const
bool IsHidden(size_t nPos) const
SwTableBox is one table cell in the document model.
SwTableLines & GetTabLines()
SwTableLine is one table row in the document model.
SwTableBoxes & GetTabBoxes()
sal_uInt16 GetBoxPos(const SwTableBox *pBox) const
sal_uInt16 GetPos(const SwTableLine *pBox) const
SwTable is one table in the document model, containing rows (which contain cells).
void SetTabCols(const SwTabCols &rNew, const SwTabCols &rOld, const SwTableBox *pStart, bool bCurRowOnly)
SwTableLines & GetTabLines()
bool IsTableComplex() const
const SwTableBox * GetTableBox(const OUString &rName, const bool bPerformValidCheck=false) const
static SwTable * FindTable(SwFrameFormat const *const pFormat)
void GetTabCols(SwTabCols &rToFill, const SwTableBox *pStart, bool bHidden=false, bool bCurRowOnly=false) const
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)
SwFrameFormat * GetFrameFormat()
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
#define UNO_TABLE_COLUMN_SUM