24#include <com/sun/star/table/CellAddress.hpp>
25#include <com/sun/star/table/CellRangeAddress.hpp>
39 const css::table::CellAddress& rApiAddress );
42 css::table::CellAddress& rApiAddress,
47 const css::table::CellRangeAddress& rApiRange );
50 css::table::CellRangeAddress& rApiRange,
55 const css::table::CellRangeAddress& rApiARange1,
56 const css::table::CellRangeAddress& rApiARange2 );
59 const css::table::CellRangeAddress& rApiOuter,
60 const css::table::CellRangeAddress& rApiInner );
65 const css::table::CellAddress& rApiAddress )
67 rScAddress.
Set(
static_cast<SCCOL>(rApiAddress.Column),
static_cast<SCROW>(rApiAddress.Row),
static_cast<SCTAB>(rApiAddress.Sheet) );
71 css::table::CellAddress& rApiAddress,
74 rApiAddress.Column = rScAddress.
Col();
75 rApiAddress.Row = rScAddress.
Row();
76 rApiAddress.Sheet = rScAddress.
Tab();
81 const css::table::CellRangeAddress& rApiRange )
83 rScRange.
aStart.
Set(
static_cast<SCCOL>(rApiRange.StartColumn),
static_cast<SCROW>(rApiRange.StartRow),
static_cast<SCTAB>(rApiRange.Sheet) );
84 rScRange.
aEnd.
Set(
static_cast<SCCOL>(rApiRange.EndColumn),
static_cast<SCROW>(rApiRange.EndRow),
static_cast<SCTAB>(rApiRange.Sheet) );
88 css::table::CellRangeAddress& rApiRange,
91 rApiRange.StartColumn = rScRange.
aStart.
Col();
92 rApiRange.StartRow = rScRange.
aStart.
Row();
94 rApiRange.EndColumn = rScRange.
aEnd.
Col();
95 rApiRange.EndRow = rScRange.
aEnd.
Row();
99 const css::table::CellRangeAddress& rApiRange1,
100 const css::table::CellRangeAddress& rApiRange2 )
102 return (rApiRange1.Sheet == rApiRange2.Sheet) &&
103 (::std::max( rApiRange1.StartColumn, rApiRange2.StartColumn ) <= ::std::min( rApiRange1.EndColumn, rApiRange2.EndColumn )) &&
104 (::std::max( rApiRange1.StartRow, rApiRange2.StartRow ) <= ::std::min( rApiRange1.EndRow, rApiRange2.EndRow ));
108 const css::table::CellRangeAddress& rApiOuter,
109 const css::table::CellRangeAddress& rApiInner )
111 return (rApiOuter.Sheet == rApiInner.Sheet) &&
112 (rApiOuter.StartColumn <= rApiInner.StartColumn) && (rApiInner.EndColumn <= rApiOuter.EndColumn) &&
113 (rApiOuter.StartRow <= rApiInner.StartRow) && (rApiInner.EndRow <= rApiOuter.EndRow);
void Set(SCCOL nCol, SCROW nRow, SCTAB nTab)
static void FillScAddress(ScAddress &rScAddress, const css::table::CellAddress &rApiAddress)
static bool Intersects(const css::table::CellRangeAddress &rApiARange1, const css::table::CellRangeAddress &rApiARange2)
Returns true, if the passed ranges have at least one common cell.
static bool Contains(const css::table::CellRangeAddress &rApiOuter, const css::table::CellRangeAddress &rApiInner)
Returns true, if the passed range rApiInner is completely inside the passed range rApiOuter.
static void FillLocale(css::lang::Locale &rLocale, LanguageType eLang)
static void FillScRange(ScRange &rScRange, const css::table::CellRangeAddress &rApiRange)
static LanguageType GetLanguage(const css::lang::Locale &rLocale)
static void FillApiAddress(css::table::CellAddress &rApiAddress, const ScAddress &rScAddress)
static void FillApiRange(css::table::CellRangeAddress &rApiRange, const ScRange &rScRange)