Issue 101648 - Inserting a frame via toolbar results in wrong position of frame
Summary: Inserting a frame via toolbar results in wrong position of frame
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: OOo 3.1 RC2
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: michael.ruess
QA Contact: issues@sw
URL:
Keywords: regression
: 102250 (view as issue list)
Depends on:
Blocks:
 
Reported: 2009-05-07 16:24 UTC by jolatt
Modified: 2013-08-07 14:44 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description jolatt 2009-05-07 16:24:17 UTC
Open the 'Insert' toolbar and click 'Insert Frame Manually'.
Try to draw a frame on a page whatever you want. The frame is always created top
left on the first page and has always the same size.

Found in OOo 3.1 final.
Comment 1 jolatt 2009-05-07 16:46:39 UTC
Set keyword regression. Behaviour was o.k. in OOo 3.0.1
Comment 2 Stefan Weigel 2009-05-07 16:56:55 UTC
confirmed
 - OOO310m11 on W2K SP4
 - OOO310m11 on Ubuntu Linux 8.10

setting Priority to P3
Comment 3 michael.ruess 2009-05-08 15:45:10 UTC
MRU->OS: when trying to draw a frame with the mouse, only a yellow bordered
rectangle will be shown in the upper left during drawing process and then the
frame will be placed there.
Comment 4 Oliver Specht 2009-05-10 16:49:37 UTC
->aw: A lot of assertion pop up when inserting the frame. od told me the reason
is the integration of some awxx-cws.
Comment 5 michael.ruess 2009-05-26 12:05:58 UTC
Adding MRU and OD to cc.
Comment 6 michael.ruess 2009-05-26 12:07:29 UTC
*** Issue 102250 has been marked as a duplicate of this issue. ***
Comment 7 Armin Le Grand 2009-06-03 17:36:52 UTC
AW: This is the root to #i102250#, need to check (see there). Adding to CWS aw073...
Comment 8 Armin Le Grand 2009-06-12 13:03:09 UTC
AW: Okay, done.
Comment 9 Armin Le Grand 2009-06-12 13:17:34 UTC
AW: Reopening: Closed the wrong task.
AW: Preparing SW with some debug...
Comment 10 Armin Le Grand 2009-06-12 13:18:54 UTC
AW: SW prepared, taking a look...
Comment 11 Armin Le Grand 2009-06-12 15:33:42 UTC
AW: The method SW is using to create frames interactively is pretty weird. It
uses the standard SdrCreateView::BegCreateObj call, but it uses
GetDrawView()->SetCurrentObj( eSdrObjectKind ) in SwFEShell::BeginCreate to use
a eSdrObjectKind of OBJ_NONE (== 0). This creates and manipulates a naked
(non-derived) SdrObject.
A naked SdrObject is not a good idea to use, it has by definition no SfxItemSet
(no properties) and only a rectangle (the aOutRect member is 're-used' for this,
normally holding the BoundRect).
But it must have worked, so i will make it work again. The base implementations
for interactive create
(SdrObject::BegCreate/MovCreate/EndCreate/BrkCreate/BckCreate/TakeCreatePoly/GetCreatePointer)
manipulate aOutRect directly. This is disturbed by also clearing this rectangle
by using SetBoundRectDirty()/SetRectsDirty(). This again was changed by me;
before, there was an extra bool to mark the rectangles (including aOutRect) as
invalid withut resetting them, i use aOutRect.IsEmpty() instead now. The old
base-impl of rect recalculations simply resetted the flag, so aOutRect survived
(by chance...?).
To make the interactive create work again i have to remove the
SetBoundRectDirty()/SetRectsDirty() calls and the bSnapRectDirty=TRUE (makes no
sense here). This makes the positioning work again.
The visualisation needs some hint that no FullDrag shall be used for this mode
(else a naked SdrObject will be asked for it's visualisation which gives the
yellow fallback rectangle that can be seen). To do so, i will use the OBJ_NONE
type identification in SdrCreateView::ShowCreateObj to switch off FullDrag.
These steps together make the interactive frame creation work again.

Doing some more checks...
Comment 12 Armin Le Grand 2009-06-12 15:36:57 UTC
AW: Added changes, no more problems found (the derivated implementations of the
create methods, e.g. BegCreate, etc., do never call the base implementations).
Committed, done.
Comment 13 Armin Le Grand 2009-06-24 11:58:07 UTC
AW: Checked on installed Win32 install set, works as expected.
Comment 14 Armin Le Grand 2009-07-01 11:27:50 UTC
AW->WG: Please verify as descibed; i or OD may also show/demonstrate if needed
Comment 15 michael.ruess 2009-07-02 11:15:05 UTC
Reassigning Writer issue to MRU.
Comment 16 michael.ruess 2009-07-02 11:15:51 UTC
.
Comment 17 Stefan Weigel 2009-08-31 18:27:51 UTC
Verified in DEV300m56 on Ubuntu Linux 9.04
Comment 18 Stefan Weigel 2009-08-31 18:28:11 UTC
Closing.