https://issues.apache.org/ooo/show_bug.cgi?id=125613

--- Comment #12 from Regina Henschel <[email protected]> ---
Further investigations show, that pPickObj exists, when any empty outline text
is on the slide, whether it is selected or not. So in my previous comment "then
pPickObj would not exist" is not right.

Why?

The method InsertGraphic is called by FuInsertGraphic::DoExecute in
sd/source/ui/fuinsert.cxx

It gets the pPickObj from the call GetEmptyPresentationObject(PRESOBJ_GRAPHIC)
and in case that fails, from a single marked object if any.

View::GetEmptyPresentationObject resides in sd/source/ui/view/sdview5.cxx

GetEmptyPresentationObject first looks, whether a single object is marked and
IsEmptyPresObj() and whether it belongs to those PresObjKind listed in
implIsMultiPresObj. It does not test the kind given in the parameter (in our
case a PRESOBJ_GRAPHIC), but returns any marked object in that list, which
IsEmptyPresObj(). So it will return any marked empty outline text. For me this
looks erroneous, I expect that a marked object is only returned if it has the
in the parameter given kind.

In case no object is marked, GetEmptyPresentationObject iterates through all
objects of given kind (here PRESOBJ_GRAPHIC) and returns the first with
IsEmptyPresObj(). 

At last step GetEmptyPresentationObject iterates through all from
GetPresentationShapeList and returns the first one with meets IsEmptyPresObj()
&& implIsMultiPresObj(). Here too the kind given in the parameter is not
tested, but all kind listed in implIsMultiPresObj will meet. The first one
listed is the kind PRESOBJ_OUTLINE. This behavior looks erroneous too for me.

Do objects of kinds listed in implIsMultiPresObj() other than PRESOBJ_OUTLINE
can be an IsEmptyPresObj()? What it the purpose of method
GetEmptyPresentationObject?

The error has other manifestations too:
Take a slide with an empty outline text. Do not mark the outline text. Insert a
formula. The formula replaces the outline text.
Take a slide with an empty outline text and a formula. (To get the formula
insert it from clipboard.) Mark the formula. Insert picture from file. The
background of the formula should be filled, but the outline text is filled
instead.

-- 
You are receiving this mail because:
You are the assignee for the issue.
You are watching all issue changes.

Reply via email to