Description
Six properties of a text box never reach the file, and none of them is read back.
getInsetLeft(), getInsetRight(), getInsetTop() and getInsetBottom() have no counterpart written. OpenDocument states them as the padding of the frame, fo:padding-left and the three beside it.
getWrap() is not written either. fo:wrap-option is written as the literal wrap whatever the shape says, so a shape told not to wrap its text still wraps.
getVerticalAlignCenter() is not written. draw:textarea-vertical-align is the attribute for it.
The PowerPoint2007 Writer writes all six.
Steps to reproduce
$shape = $presentation->getActiveSlide()->createRichTextShape();
$shape->createTextRun('Sample');
$shape->setWrap(RichText::WRAP_NONE);
$shape->setVerticalAlignCenter(RichText::VALIGN_CENTER);
$shape->setInsetBottom(3)->setInsetLeft(12)->setInsetRight(24)->setInsetTop(6);
Expected behavior
The text sits 12 pixels from the left of its box and is centred between its top and bottom, and does not wrap; reading the file back gives the six values that were set.
Actual behavior
content.xml carries no fo:padding-* and no draw:textarea-vertical-align, and fo:wrap-option="wrap". Read back, the shape returns the defaults it was born with: insets 9.6, 9.6, 4.8, 4.8, WRAP_SQUARE, VALIGN_NOTCENTER.
Notes
Found while walking every property of a shape through each Writer/Reader pair and diffing what came back.
getName() is missing from the same frame and is not part of this: loadShapeDescription() falls back to draw:name for files written by older versions, so writing a text box's name there would come back as its description. That one needs deciding separately.
Description
Six properties of a text box never reach the file, and none of them is read back.
getInsetLeft(),getInsetRight(),getInsetTop()andgetInsetBottom()have no counterpart written. OpenDocument states them as the padding of the frame,fo:padding-leftand the three beside it.getWrap()is not written either.fo:wrap-optionis written as the literalwrapwhatever the shape says, so a shape told not to wrap its text still wraps.getVerticalAlignCenter()is not written.draw:textarea-vertical-alignis the attribute for it.The PowerPoint2007 Writer writes all six.
Steps to reproduce
Expected behavior
The text sits 12 pixels from the left of its box and is centred between its top and bottom, and does not wrap; reading the file back gives the six values that were set.
Actual behavior
content.xmlcarries nofo:padding-*and nodraw:textarea-vertical-align, andfo:wrap-option="wrap". Read back, the shape returns the defaults it was born with: insets 9.6, 9.6, 4.8, 4.8,WRAP_SQUARE,VALIGN_NOTCENTER.Notes
Found while walking every property of a shape through each Writer/Reader pair and diffing what came back.
getName()is missing from the same frame and is not part of this:loadShapeDescription()falls back todraw:namefor files written by older versions, so writing a text box's name there would come back as its description. That one needs deciding separately.