[Libreoffice-commits] core.git: 3 commits - sc/source vcl/source

Stephan Bergmann sbergman at redhat.com
Tue Dec 3 00:34:00 PST 2013


 sc/source/ui/Accessibility/AccessibleCellBase.cxx  |    3 +--
 sc/source/ui/Accessibility/AccessibleTableBase.cxx |    6 +-----
 vcl/source/gdi/outdev3.cxx                         |    6 ++++--
 3 files changed, 6 insertions(+), 9 deletions(-)

New commits:
commit 2fbf95f5efb0e7e2781fa8546845a084721ee4e7
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Dec 3 09:32:57 2013 +0100

    warning C4702: unreachable code
    
    ...and simplification
    
    Change-Id: I652da35312522f452276116df11e548ba9231b53

diff --git a/sc/source/ui/Accessibility/AccessibleTableBase.cxx b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
index 5a74dcf..9ce33be 100644
--- a/sc/source/ui/Accessibility/AccessibleTableBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
@@ -65,19 +65,15 @@ void SAL_CALL ScAccessibleTableBase::disposing()
 uno::Any SAL_CALL ScAccessibleTableBase::queryInterface( uno::Type const & rType )
     throw (uno::RuntimeException)
 {
-    uno::Any aRet;
     if ( rType == ::getCppuType((uno::Reference<XAccessibleTableSelection> *)0) )
     {
-        uno::Reference<XAccessibleTableSelection> xThis( this );
-        aRet <<= xThis;
-        return aRet;
+        return uno::Any(uno::Reference<XAccessibleTableSelection>(this));
     }
     else
     {
         uno::Any aAny (ScAccessibleTableBaseImpl::queryInterface(rType));
         return aAny.hasValue() ? aAny : ScAccessibleContextBase::queryInterface(rType);
     }
-    return aRet;
 }
 
 void SAL_CALL ScAccessibleTableBase::acquire()
commit e40bae2dc347ae6c7e3a9133fcdd78c62192a016
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Dec 3 09:30:25 2013 +0100

    Revert ScAccessibleCellBase::getCurrentValue to reutnr a numeric value again
    
    b41332475783c31136673fb44cf4c411bb0148f8 "Integrate branch of IAccessible2" had
    changed it to return a string, but that neither matched the documentation of
    css.accessibility.XAccessibleValue nor did it satisfy JunitTest_sc_unoapi.  This
    is the same underlying issue as 1cb1dca1260da2cea5b6800483e86a6d6b251844 "Revert
    SwAccessibleCell::getCurrentValue to return a numeric value again" and needs
    further clarification apparently.
    
    Change-Id: Idb725724842ffa1aff811d66066912a22b2f2f6e

diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
index d021dbd..d1817b3 100644
--- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
@@ -233,8 +233,7 @@ uno::Any SAL_CALL
     uno::Any aAny;
     if (mpDoc)
     {
-        OUString valStr(mpDoc->GetString(maCellAddress.Col(),maCellAddress.Row(),maCellAddress.Tab()));
-        aAny <<= valStr;
+        aAny <<= mpDoc->GetValue(maCellAddress);
     }
     return aAny;
 }
commit 44a6eee8e0b7c62685ebabea1fd9baee17cf62a6
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Dec 3 09:23:43 2013 +0100

    Call getLineBreak with null XHyphenator unless TEXT_DRAW_WORDBREAK_HYPHENATION
    
    So no longer instantiate XLinguServiceManager (which might e.g. bootstrap
    Python) unless explicitly requested, which e.g. removes a noticable delay when
    switching to the Options dialog's "Security" page (which causes size
    calculations of FixedText controls that use TEXT_DRAW_WORDBREAK but not
    TEXT_DRAW_WORDBREAK_HYPHENATION).
    
    Change-Id: Ib0a28d3d7d7718faf6df7a138f5a86b8b2fd7713

diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index afe06f7..0543eb5 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -4679,8 +4679,10 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
         // get service provider
         uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() );
 
+        bool bHyphenate = (nStyle & TEXT_DRAW_WORDBREAK_HYPHENATION)
+            == TEXT_DRAW_WORDBREAK_HYPHENATION;
         uno::Reference< linguistic2::XHyphenator > xHyph;
-        if ( nStyle & TEXT_DRAW_WORDBREAK )
+        if ( bHyphenate )
         {
             uno::Reference< linguistic2::XLinguServiceManager2> xLinguMgr = linguistic2::LinguServiceManager::create(xContext);
             xHyph = xLinguMgr->getHyphenator();
@@ -4712,7 +4714,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
                     nBreakPos = (xub_StrLen)aLBR.breakIndex;
                     if ( nBreakPos <= nPos )
                         nBreakPos = nSoftBreak;
-                    if ( (nStyle & TEXT_DRAW_WORDBREAK_HYPHENATION) == TEXT_DRAW_WORDBREAK_HYPHENATION )
+                    if ( bHyphenate )
                     {
                         // Whether hyphen or not: Put the word after the hyphen through
                         // word boundary.


More information about the Libreoffice-commits mailing list