Files
odfstudio/include
Mike Kaganski 4c9116ee9d tdf#166401: keep text in a picture placeholder
A slide's picture placeholder can hold text the author typed instead of an
image, which PowerPoint displays. Impress dropped that text on import and
wrote nothing at all for such a shape on save. To reproduce, type into a
picture placeholder in PowerPoint, save, open the file and save it again:
the text is gone from the shape, and the shape from the file.

What a placeholder is now lives in the page's presentation object list, and
what represents it follows what it holds: a graphic object for a picture, an
SdrObjKind::OutlineText object while it holds text, the placeholder itself
while it holds nothing. It changes over when a file states such text, when
that text is deleted again and the prompt comes back, and when an image is
put in. Text arriving another way, through the API, is caught by the new
SdrPage::onEmptyPresObjFilled and switched at the next idle, so that route
needs a spinning scheduler; what a save writes is right either way. An object
in text edit is left to that edit, which is where it changes over: the idle
pass walks every page, so it asks each object rather than trusting the one
that asked for the pass - in a shared document another view holds it. That
switch is the model's own and covered by no undo step - it answers for a
document the API changed, not for anything the user did.

What the file says about the shape travels with it both ways, the graphic
items included, so an outline a picture placeholder is clipped to is still
there when a picture arrives. It is not written while the placeholder holds
text: the file says text box, and a text box states no geometry to clip a
picture to.

PPTX writes it as the placeholder it is, with the text it holds. ODF states
the class of what represents it, so the placeholder's own class travels
beside it as coext:placeholder-class, and a reader that ignores the
extension sees an outline placeholder with the text.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I0f3353115e56d63a4158ebaeb5689689499894bb
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9441
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 7921401ae48188568e1016db00bd90256d666a6a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210329
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-01 19:52:06 +02:00
..
2026-08-25 14:45:31 +02:00
2026-08-28 16:33:11 +02:00
2026-04-30 08:54:45 +02:00
2026-08-25 11:17:36 +02:00
2026-08-25 14:45:31 +02:00
2026-08-21 14:19:46 +02:00
2026-08-27 13:59:07 +02:00
2026-06-04 10:00:29 +02:00
2026-08-21 14:19:46 +02:00
2026-08-25 11:57:36 +02:00
2026-08-21 14:19:46 +02:00
2026-08-28 16:33:11 +02:00
2026-08-25 11:57:36 +02:00
2026-08-21 14:19:46 +02:00
2026-08-25 14:31:09 +02:00
2026-08-21 14:19:46 +02:00
2026-08-21 14:19:46 +02:00
2026-08-27 20:39:06 +02:00
2026-08-21 14:19:46 +02:00
…
2026-08-29 16:20:13 +02:00
2026-08-21 09:31:35 +02:00
2026-08-20 19:06:29 +02:00
2026-08-21 14:19:46 +02:00
2026-08-29 16:20:13 +02:00
…
…