[Libreoffice] [PATCH] Fix for fdo43460, Part I, getLength to isEmpty

Stephan Bergmann sbergman at redhat.com
Fri Dec 9 10:07:17 PST 2011


On 12/09/2011 05:14 PM, Olivier Hallot wrote:
> diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx
> index e868403..82a7677 100644
> --- a/accessibility/source/standard/vclxaccessiblebox.cxx
> +++ b/accessibility/source/standard/vclxaccessiblebox.cxx
> @@ -156,7 +156,7 @@ void VCLXAccessibleBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEven
>                  if ( xText.is() )
>                  {
>                      ::rtl::OUString sText = xText->getSelectedText();
> -                    if ( !sText.getLength() )
> +                    if ( !sText.isEmpty() )
>                          sText = xText->getText();
>                      pList->UpdateSelection (sText);
>                  }

This and a few more that follow invert the logic -- !sText.getLength() 
<=> sText.getLength() == 0 <=> sText.isEmpty().  I'll fix those and push 
later today.

Thanks a lot,
Stephan


More information about the LibreOffice mailing list