Skip to main content

Метод Shape::setShapeProperties

Метод устанавливает свойства фигуры ShapeProperties.

Пример для текстового документа:​


CO::API::Document::Shapes shapes = document.getRange().getShapes();
std::shared_ptr<Enumerator<Shape>> enumerator = shapes.getEnumerator();
while (enumerator->isValid())
{
Shape shape = enumerator->getCurrent();

ShapeProperties shapeProperties = shape.getShapeProperties()
shapeProperties.textDirection = TextDirection::Vertical;
shape.setShapeProperties(shapeProperties);

enumerator->goToNext();
}

Пример для табличного документа:​


std::shared_ptr<Enumerator<Shape>> enumerator = table.getShapes().getEnumerator();
while (enumerator->isValid())
{
Shape shape = enumerator->getCurrent();

ShapeProperties shapeProperties = shape.getShapeProperties()
shapeProperties.textDirection = TextDirection::Vertical;
shape.setShapeProperties(shapeProperties);

enumerator->goToNext();
}