namespace sc_apitest
{ class ScAnnontationObj : public UnoApiTest, public apitest::XChild, public apitest::XServiceInfo, public apitest::XSheetAnnotation, public apitest::XSheetAnnotationShapeSupplier, public apitest::XSimpleText, public apitest::XTextRange
{ public:
ScAnnontationObj();
uno::Reference<sheet::XSheetAnnotation>
ScAnnontationObj::getAnnotation(table::CellAddress& xCellAddress)
{ // get the sheet
uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<container::XIndexAccess> xIndex(xDoc->getSheets(), uno::UNO_QUERY_THROW);
uno::Reference<sheet::XSpreadsheet> xSheet(xIndex->getByIndex(xCellAddress.Sheet),
uno::UNO_QUERY_THROW);
// get the cell
uno::Reference<table::XCell> xCell(
xSheet->getCellByPosition(xCellAddress.Column, xCellAddress.Row), uno::UNO_SET_THROW);
// get the annotation from cell
uno::Reference<sheet::XSheetAnnotationAnchor> xAnnotationAnchor(xCell, uno::UNO_QUERY_THROW);
uno::Reference<sheet::XSheetAnnotation> xSheetAnnotation(xAnnotationAnchor->getAnnotation(),
uno::UNO_SET_THROW);
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.