Hi Mikhail,
Thanks very much for your comments, the patch( with the empty "else"
block removed ) has been attached to the issue. I'm looking forward to
the next task. :-)
As for the too-big-WorkArea problem, I totally agree to submit a new
issue, but I'm not sure if I can make a clear enough summary since this
is an internal service, and the phenomenon can only be observed by
hacking the code, could you help me to file it please?
Best Regards,
Felix.
Mikhail Voitenko 写道:
Hi Felix,
The patch looks good, please attach it to the issue and send the issue
to me.
Please see my comments for the questions inline.
Zhang Xiaofei wrote:
Hi Mikhail,
Thanks for your suggestions, I am sorry for ignoring the cases you
mentioned in the last patch, and I am looking forward to further
suggestions from you on this new patch.
This time I have some questions:
- Could you give me some explanations on XWindow::setPosSize()
method, and the position of it's implementation please? There are
something I don't quite understand about it, like:
- Are all parameters not covered by the flag, e.g. WIDTH and HEIGHT
for POS, totally ignored by the method?
Exactly, in this case only position is set.
- I tried to test the method by giving it fixed numbers as
parameters, when a size bigger than the working area is given in the
parameters, the method acts as if it just ignores the parameter and
defaultedly sets the window's position and size to the same as
WorkArea , is that true the method is designed this way?
That seems to be an implementation detail. That means that the
specification does not strictly specify how should it be, so the
implementation has freedom to decide how to behave. When an
implementation detail becomes problematic the related specification
might be changed to specify the behavior strictly, and the
implementation is adjusted accordingly.
- Should we handle the case when the container window reference IS
empty?
No, the probability that it happens is very small, and it would be
definitely an error. Nothing can be done in this case, but we have to
check the reference to avoid crash. Even if an error has happened the
office should not crash.
So the empty "else" block can be just removed. :)
- What is the difference between ScreenArea and WorkArea?
As I understand WorkArea is a part of ScreenArea that is free from
system toolbars and etc.
And there is a little problem with the implementation, even after the
window is adjusted according to WorkArea, e.g. in 1024x768 or a lower
resolution in Windows XP, as in the patch:
=======================================
xHWindow->setPosSize( aWorkRect.X, aWorkRect.Y, aWorkRect.Width,
aWorkRect.Height, awt::PosSize::POSSIZE );
---------------------------------------
it is still slightly bigger than WorkArea, the bottom and right
borders are out of the screen, and part of the toolbar and the
statusbar to the bottom are not visible in WorkArea.
I tried to set it to a smaller rectangle, but keeping the bottom and
right borders at the same postions:
=======================================
const long nIncre;
xHWindow->setPosSize( aWorkRect.X + nIncre, aWorkRect.Y + nIncre,
aWorkRect.Width - nIncre, aWorkRect.Height - nIncre,
awt::PosSize::POSSIZE );
---------------------------------------
to my surprise when nIncre is big enough(say, 200), the problem above
disappears, however, when it is small(say, 10, or worse, 0), the
problem appears. I'm confused about the phenomenon, could you help me
to analyze it please?
Please correct me if I misunderstood the description. The problem is
that the bottom and right borders are out of the screen. And the
solution leaves the bottom and the right border on the same position,
this is why the solution does not help. But I do not understand why
does it work in case the "nIncre" is set to 200, it looks like a small
enough window is automatically moved.
Anyway, I think it makes sense to submit a new issue regarding too big
WorkArea provided by the service.
Best Regards,
Mikhail.
Best Regards,
Felix.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]