Apache OpenOffice (AOO) Bugzilla – Issue 99166
In RTL Office, notes shadow is painted in wrong position
Last modified: 2009-04-16 09:31:06 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
pl on cc
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!
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)
mod->aw: I guess you missed my comment, I added you on CC
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
please verify in CWS ooo31gsl2
Adjusting summary. Verified in CWS ooo31gsl2.
OK in OOO310_m9. Closed.