List Info

Thread: Text Direction in formula dialog




Text Direction in formula dialog
user name
2006-12-18 08:29:39
Hi list-members,

In RTL OOo, function names are still English. I therefore
want to change 
the function wizard dialog so that :
1) the names in the function list are left aligned, and
2) the multi-line edit in the dialog has textdirection LTR,
and 
left-alignment

I have two questions:

Question 1:
To align the names in the function list, I added following
to  
ScFuncPage::UpdateFunctionList() :

if (ScGlobal::IsSystemRTL())
                aLbFunction.EnableMirroring( );

Is this the best way to do it?

Question 2:
How can I change the text direction and alignment of the
multi-line 
edit? In the ScEditBox contructors, I tried:

  pMEdit->EnableRTL(FALSE);

but that didn't work. How do I set the direction and
alignment of this 
Edit Box?

Thanks,
Alan

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesc.openoffice.org
For additional commands, e-mail: dev-helpsc.openoffice.org

Text Direction in formula dialog
user name
2006-12-18 11:47:14
Hi list-members,

I found the functionSetRightToLeft() in
svtools/inc/svmedit.hxx, so that 
answers my second question.

My first question still remains, though. Is Using
EnableMirroring the 
best way to left-align the strings in the list box?

Alan

Alan Yaniger wrote:

> Hi list-members,
>
> In RTL OOo, function names are still English. I
therefore want to 
> change the function wizard dialog so that :
> 1) the names in the function list are left aligned, and
> 2) the multi-line edit in the dialog has textdirection
LTR, and 
> left-alignment
>
> I have two questions:
>
> Question 1:
> To align the names in the function list, I added
following to  
> ScFuncPage::UpdateFunctionList() :
>
> if (ScGlobal::IsSystemRTL())
>                aLbFunction.EnableMirroring( );
>
> Is this the best way to do it?
>
> Question 2:
> How can I change the text direction and alignment of
the multi-line 
> edit? In the ScEditBox contructors, I tried:
>
>  pMEdit->EnableRTL(FALSE);
>
> but that didn't work. How do I set the direction and
alignment of this 
> Edit Box?
>
> Thanks,
> Alan
>

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesc.openoffice.org
For additional commands, e-mail: dev-helpsc.openoffice.org

Text Direction in formula dialog
user name
2006-12-20 11:04:59
Alan Yaniger wrote:
> Question 1:
> To align the names in the function list, I added
following to  
> ScFuncPage::UpdateFunctionList() :
> 
> if (ScGlobal::IsSystemRTL())
>                aLbFunction.EnableMirroring( );
> 
> Is this the best way to do it?

That would mean double mirroring, the flag wasn't intended
to be used 
that way. The intended way to prevent mirroring is
EnableRTL, but it 
would have to be called for the children of the list box, so
maybe the 
ListBox should have an extra method.

If you do use EnableMirroring, you should use 
GetSettings().GetLayoutRTL() instead of
ScGlobal::IsSystemRTL(), to 
match VCL's configuration handling.

But above all: Is there general consensus about mirroring a
single 
control, including its scroll bar? What would you do with
other list 
boxes that can contain English entries, or even mixed ones?
Somehow, 
this doesn't seem right.

Niklas

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesc.openoffice.org
For additional commands, e-mail: dev-helpsc.openoffice.org

Text Direction in formula dialog
user name
2006-12-20 12:32:47
Hi Niklas,

Thanks for your helpful reply.

Regarding your last point:
In general, Hebrew users (most of whom are used to Microsoft
Office) 
expect that controls containing primarily English text will
be 
left-aligned. An example is the font list in Hebrew
Microsoft Word. For 
that reason, we disabled RTL in the OOo formula editor edit
box, as 
described in Issue 62413. If a control's contents are
primarily RTL but 
it includes some LTR entries, users expect right-aligned.
This is the 
case with Word's toolbar list, which is mostly Hebrew, but
contains a 
couple of English entries, such as "WordArt".

Alan

Niklas Nebel wrote:

> Alan Yaniger wrote:
>
>> Question 1:
>> To align the names in the function list, I added
following to  
>> ScFuncPage::UpdateFunctionList() :
>>
>> if (ScGlobal::IsSystemRTL())
>>                aLbFunction.EnableMirroring( );
>>
>> Is this the best way to do it?
>
>
> That would mean double mirroring, the flag wasn't
intended to be used 
> that way. The intended way to prevent mirroring is
EnableRTL, but it 
> would have to be called for the children of the list
box, so maybe the 
> ListBox should have an extra method.
>
> If you do use EnableMirroring, you should use 
> GetSettings().GetLayoutRTL() instead of
ScGlobal::IsSystemRTL(), to 
> match VCL's configuration handling.
>
> But above all: Is there general consensus about
mirroring a single 
> control, including its scroll bar? What would you do
with other list 
> boxes that can contain English entries, or even mixed
ones? Somehow, 
> this doesn't seem right.
>
> Niklas
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribesc.openoffice.org
> For additional commands, e-mail: dev-helpsc.openoffice.org
>

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesc.openoffice.org
For additional commands, e-mail: dev-helpsc.openoffice.org

Text Direction in formula dialog
user name
2006-12-20 15:26:26
On Wed, Dec 20, 2006 at 02:32:47PM +0200, Alan Yaniger
wrote:
> Hi Niklas,
> 
> Thanks for your helpful reply.
> 
> Regarding your last point:
> In general, Hebrew users (most of whom are used to
Microsoft Office) 
> expect that controls containing primarily English text
will be 
> left-aligned. An example is the font list in Hebrew
Microsoft Word. For 
> that reason, we disabled RTL in the OOo formula editor
edit box, as 
> described in Issue 62413. If a control's contents are
primarily RTL but 
> it includes some LTR entries, users expect
right-aligned. This is the 
> case with Word's toolbar list, which is mostly Hebrew,
but contains a 
> couple of English entries, such as "WordArt".

I'm seeing something slightly different in MS XL controls. 
An in
sheet list control with plain ascii, toggles it's alignment
to match
the table's direction.
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesc.openoffice.org
For additional commands, e-mail: dev-helpsc.openoffice.org
Text Direction in formula dialog
user name
2006-12-21 10:09:01
Hi Jody,

Yes, this is the case in an Excel sheet list control.
However, in OO's 
function wizard, we're dealing with controls that are not
part of a 
sheet, but are part of the UI.
Here I think it's reasonable to do what Hebrew Excel does in
its 
equivalent of the function wizard:
the function list is aligned to the left since the strings
are in 
English, and the category list to the right, since its
strings are in 
Hebrew.

Alan

Jody Goldberg wrote:

>I'm seeing something slightly different in MS XL
controls.  An in
>sheet list control with plain ascii, toggles it's
alignment to match
>the table's direction.
>  
>
>--------------------------------------------------------
----------------
>
>--------------------------------------------------------
-------------
>To unsubscribe, e-mail: dev-unsubscribesc.openoffice.org
>For additional commands, e-mail: dev-helpsc.openoffice.org
>

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribesc.openoffice.org
For additional commands, e-mail: dev-helpsc.openoffice.org

[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )