Предостережение ... Хотя у меня есть опыт работы с C ++, я использую Java для программирования на LO API, поэтому следующее может быть немного не так. Вам, вероятно, придется немного подправить, чтобы все пошло на лад. * XCell xCell = xTextTable.getCellByName(cellname);
XText xText = UnoRuntime.queryInterface(XText.class, xCell);
XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xText.getStart());
xPropertySet.setPropertyValue("ParaAdjust", com.sun.star.style.ParagraphAdjust.RIGHT);
В C ++ и с использованием положения ячейки, чтобы получить ячейку, я думаю, что грубый перевод будет выглядеть так:
Reference<XCell> rCell = rRange->getCellByPosition(x, y);
Reference<XText> rText(rCell, UNO_QUERY);
Reference< XPropertySet > xPropSet( rText->getStart(), UNO_QUERY );
xPropSet->getPropertyValue("ParaAdjust") >>= com::sun::star::style::ParagraphAdjust.RIGHT;
Учитывая то, что вы уже получили, это выглядит Вы можете заменить ????
на что-то вроде этого:
Reference< XPropertySet > xPropSet( rTextRange, UNO_QUERY );
xPropSet->getPropertyValue("ParaAdjust") >>= com::sun::star::style::ParagraphAdjust.RIGHT;