Issue 99166 - In RTL Office, notes shadow is painted in wrong position
Summary: In RTL Office, notes shadow is painted in wrong position
Status: CLOSED FIXED
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: OOo 3.0
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 3.1
Assignee: stefan.baltzer
QA Contact: issues@gsl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-12 17:55 UTC by max.odendahl
Modified: 2009-04-16 09:31 UTC (History)
3 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 max.odendahl 2009-02-12 17:55:22 UTC
- use an RTL office, e.g arabic
- create a new note
- press enter until the note is resized

the note shadow should still be below the note, but it appears in a wrong x
location, seems like some wrong rtl mirroring is going on

mod->aw: probably drawing layer, would you have a look?

The position of the shadow is set here:

http://svn.services.openoffice.org/opengrok/xref/DEV300_m40/sw/source/ui/docvw/postit.cxx#1030

As you can see in the code, it should be always just below the note window
Comment 1 max.odendahl 2009-02-12 17:56:45 UTC
pl on cc
Comment 2 Armin Le Grand 2009-02-12 18:11:55 UTC
AW->mod: First comment: Your SwMarginWin::SwMarginWin is pretty risky in casting
(SwEditWin* aWin = static_cast<SwEditWin*>(GetParent())), please use at least a
dynamic_cast and be prepared to fail (!) This would not be the first case where
someone else from external changes winows hierarchies...
In SwMarginWin::SetSizePixel, i guess EditWin() is the SwEditWin* aWin casted in
the constructor...? Whatever. It's probably a mix-up of coordinate systems. As
You might have heared in the meantime VCL-Windows have this RTL-Mode where X is
mirrored. This is done by default when RTL is on and as long as You do not
switch it off for a window. RTL is definitely switched off for all VCL-Windows
where DrawingLayer is doing visualisations, so the OverlayManager You are using
is on a VCL-Window without RTL enabled, but i guess Your edit window will be a
RTL-Enabled one.
I am not sure how You create the shadow offset in X, but it seems to be
calculated in the wrong coordinate system then, means in an RTL-Enabled window.
As i see, PL already added himself to CC, he can tell You more about RTL mode.

HTH for the moment!
Comment 3 max.odendahl 2009-02-12 18:18:23 UTC
mod->aw: 

- rtl is always disabled for SwEditWin
- it is not set for the note window, so it gets the value from its parent SwEditWin

--> so for everyone involved, rtl should be disabled

see also issue 98525 for other vcl RTL issues, but this one could be drawing
layer according to pl

( I'll take care about your other remarks, thanks)
Comment 4 max.odendahl 2009-02-14 10:54:46 UTC
mod->aw: I guess you missed my comment, I added you on CC
Comment 5 philipp.lohmann 2009-02-16 17:36:17 UTC
Some weird positioning was going on when SetSizePixel() was called on an LTR
window in RTL UI. Should be better now.

fixed in CWS ooo31gsl2
Comment 6 philipp.lohmann 2009-02-18 17:09:25 UTC
please verify in CWS ooo31gsl2
Comment 7 stefan.baltzer 2009-02-23 07:07:50 UTC
Adjusting summary.
Verified in CWS ooo31gsl2.
Comment 8 stefan.baltzer 2009-04-16 09:31:06 UTC
OK in OOO310_m9. Closed.