Re: [Libreoffice] [PATCH] vcl: Printing UI "page range" autofocus

2011-10-24 Thread Maxim Iorsh
Hi Michael, Christophe,

The accessibility issue is important indeed. I think a solution could be to
automatically move the focus only in response to mouse click, and not keys
(either tab or up/down arrow). This could solve the problem of keyboard /
screen reader users.

>From the technical point of view, maybe a global solution would be most
appropriate here. I mean, the function GrabFocus() could be modified to work
only for mouse clicks. I think it is mostly responsible for such focus
movements.

Thank you,
 -- Maxim.

On Mon, Oct 24, 2011 at 3:24 PM, Michael Meeks wrote:

> Hi Maxime,
>
> On Mon, 2011-10-24 at 14:52 +0200, Christophe Strobbe wrote:
> > At 06:50 22-10-2011, Maxim Iorsh wrote:
> > >When the user selects "Pages" radio button in the Range section, it is
> very
> > >reasonable to expect that she would now want to specify the range. Thus
> moving
> > >the focus automatically to the page range edit box would save the user a
> mouse
> > >click.
>
> Which looks nice ! :-)
>
> > Unrequested focus changes that are not announced in advance are not
> > good practice for accessibility reasons.
>
>Unfortunately, I suspect Christophe is right, so - presumably we
> need
> to do this in a slightly more cunning fashion (ditto for the PDF case).
> I wonder what ways those could be - personally I love the easier to use,
> more ergonomic UI change you suggest - and surely it'd help improve life
> for impaired people too if they could find out about it.
>
>The tab navigation ordering is already somewhat strange in the print
> dialog with the "Print in reverse page order" appearing in the chain
> before the radio buttons above it - which might be worth fixing too.
>
> On Mon, 2011-10-24 at 14:52 +0200, Christophe Strobbe wrote:
> > 1. When a screen reader user (typically a blind user) encounters a
> > set of radio buttons, the only way to find out what the buttons are,
> > is going through them with the up/down arrow.
>
>Surely the screen reader knows these are part of a radio button
> group
> and has relations it can use to read out the options ?
>
> > 2. Keyboard users (not only blind users) move through dialogs like
> > the Print dialog with the Tab key and the Shift+Tab key. The latter
> > is for navigating backwards. With this patch, what happens when the
> > user presses Shift+Tab from the Page Range field in order to move
> > back to the radio buttons ?
>
>It works fine; you go from the entry back to the Pages button (which
> is
> already selected so we don't get a new selection event) and then you can
> use up and down arrows.
>
> > Does the focus immediately get pushed back
> > to the edit field, making backwards navigation impossible?
>
>So no, this is fine, but good to check.
>
>For what it is worth the current situation for a blind user tabbing
> through that dialog is pretty horrible too - the 'tab' goes from 'All
> Pages' to the 'Pages' entry field (which is not insensitive when the
> Page range thing is unselected), and so on.
>
> So - IMHO, if the Pages entry (which we auto-focus) has a suitable
> label (saying 'Page range') that a screen reader can read, and we handle
> insensitivity better there - we already made the UI rather better for
> the impaired. More ideally, if we can clobber the up/down arrow on the
> keyboard to move to previous / next radio button in the group we improve
> things all around - right ? [ and fixing the tab chain looks like it
> would be nice too - but I'm not clear on the APIs for doing that - is it
> really just the order of instantiation of the widgets in
> vcl/source/window/printdlg.cxx eg. ? ].
>
>How does that sound ? and thanks Maxim for caring enough to improve
> these rough edges ! :-)
>
>All the best,
>
>Michael.
>
> --
> michael.me...@suse.com  <><, Pseudo Engineer, itinerant idiot
>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [PATCH] vcl: Printing UI "page range" autofocus

2011-10-21 Thread Maxim Iorsh

When the user selects "Pages" radio button in the Range section, it is very
reasonable to expect that she would now want to specify the range. Thus moving
the focus automatically to the page range edit box would save the user a mouse
click.

Code is contributed under the LGPLv3+ / MPL.

Signed-off-by: Maxim Iorsh 
---
 vcl/source/window/printdlg.cxx |   21 +
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 969030c..5a59281 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -2300,6 +2300,27 @@ IMPL_LINK( PrintDialog, UIOption_RadioHdl, RadioButton*, i_pBtn )
 sal_Int32 nVal = it->second;
 pVal->Value <<= nVal;
 
+// when page range option is selected, focus on range input.
+if (pVal->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PrintContent" ) ) &&
+nVal == 1)
+{
+std::map< rtl::OUString, std::vector< Window* > >::const_iterator pit = maPropertyToWindowMap.find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ) );
+if( pit != maPropertyToWindowMap.end() )
+{
+const std::vector< Window* >& rWindows( pit->second );
+if( ! rWindows.empty() )
+{
+// we should have an Edit for this one
+Edit* pRange = dynamic_cast< Edit* >( rWindows.front() );
+if( pRange )
+{
+pRange->SetSelection( Selection( 0, 0x ) ); // select all
+pRange->GrabFocus();
+}
+}
+}
+}
+
 checkOptionalControlDependencies();
 
 // update preview and page settings
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [PATCH] vcl: Incomplete font substitution when FontConfig matches italic font

2011-10-07 Thread Maxim Iorsh

Bug URL: https://bugassistant.libreoffice.org/show_bug.cgi?id=41556

This patch fixes the issue by properly initializing ImplFontMetricData from
ImplFontSelectData.

Code is contributed under the LGPLv3+ / MPL.

Signed-off-by: Maxim Iorsh 
---
 vcl/source/gdi/outdev3.cxx |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index b0f59cd..4d21f5d 100755
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -3304,6 +3304,7 @@ ImplFontMetricData::ImplFontMetricData( const ImplFontSelectData& rFontSelData )
 {
 // initialize the members provided by the font request
 mnWidth= rFontSelData.mnWidth;
+mnSlant= rFontSelData.GetSlant();
 mnOrientation  = sal::static_int_cast(rFontSelData.mnOrientation);
 
 // intialize the used font name
@@ -3328,7 +3329,6 @@ ImplFontMetricData::ImplFontMetricData( const ImplFontSelectData& rFontSelData )
 mnDescent  = 0;
 mnIntLeading   = 0;
 mnExtLeading   = 0;
-mnSlant= 0;
 mnMinKashida   = 0;
 
 // reset metrics that are usually derived from the measurements
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [PATCH] filter: PDF Export UI "page range" autofocus

2011-10-05 Thread Maxim Iorsh
When the user selects "Pages" radio button in the Range section, it is very
reasonable to expect that she would now want to specify the range. Thus moving
the focus automatically to the page range edit box would save the user a mouse
click.a

Code is contributed under the LGPLv3+ / MPL.

Signed-off-by: Maxim Iorsh 
---
 filter/source/pdf/impdialog.cxx |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 67ba921..b774586 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -651,6 +651,8 @@ IMPL_LINK( ImpPDFTabGeneralPage, TogglePagesHdl, void*, 
EMPTYARG )
 maEdPages.Enable( maRbRange.IsChecked() );
 //Sym2_5805, When the control is disabled, it is also readonly. So here, 
it is not necessary to set it as readonly.
 //maEdPages.SetReadOnly( !maRbRange.IsChecked() );
+if ( maRbRange.IsChecked() )
+   maEdPages.GrabFocus();
 return 0;
 }
 
-- 
1.7.3.4

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [REVIEW] patch for openoffice Bug 89286 - RTL characters kerning broken

2011-09-21 Thread Maxim Iorsh
Don't bother, Libre Office already has a better patch by Khaled Hosny.

On Wed, Sep 21, 2011 at 4:41 PM, Lior Kaplan  wrote:

> Hi,
>
> Apache accepted a patch today to deal with font kerning in RTL scripts (
> https://issues.apache.org/ooo/show_bug.cgi?id=89286)
>
>
> http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/source/glyphs/gcach_layout.cxx?r1=1173604&r2=1173603&pathrev=1173604
>
> (patch by Maxim Iorsh)
>
> I would be happy if someone could review this for LibO, as we have two
> different lines comparing to oo.org.
>
> Thanks,
>
> Kaplan
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice