// get the cell
uno::Reference<sheet::XSpreadsheet> xSpreadSheet;
CPPUNIT_ASSERT(aAny >>= xSpreadSheet);
uno::Reference<uno::XInterface> oObj = xSpreadSheet->getCellByPosition(2, 3);
m_xCell = uno::Reference<sheet::XCellRangesQuery>(oObj, uno::UNO_QUERY_THROW);
// set one value for comparison.
xSpreadSheet->getCellByPosition(1, 1)->setValue(15);
xSpreadSheet->getCellByPosition(1, 3)->setValue(5);
xSpreadSheet->getCellByPosition(2, 1)->setFormula(u"=B2+B4"_ustr);
return xSpreadSheet;
}
/** *Performsometestsonanemptycell: *<ol> *<li>compareanemptycellwithacellwithavalueinthesamecolumn</li> *<li>compareanemptycellwithacellwithavalueinthesamerow</li> *<li>queryforemptycells</li> *<ol>
*/ void CheckXCellRangesQuery::checkEmptyCell()
{ // compare an empty cell with a cell with a value
_queryColumnDifferences(sSheetName + ".C4"); // compare an empty cell with a cell with a value
_queryRowDifferences(sSheetName + ".C4");
}
void CheckXCellRangesQuery::checkFilledCell()
{
uno::Reference<sheet::XSpreadsheet> xSpreadSheet(init(), uno::UNO_QUERY_THROW); // fill the cell with a value
xSpreadSheet->getCellByPosition(2, 3)->setValue(15);
// compare a cell with value 5 with a cell with value 15
_queryColumnDifferences(sSheetName + ".C4"); // compare a cell with value 5 with a cell with value 15
_queryRowDifferences(sSheetName + ".C4"); // try to get nothing
_queryEmptyCells(u""_ustr);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.