svx/source/accessibility/AccessibleShape.cxx |    2 ++
 sw/source/core/text/itrpaint.cxx             |   19 ++++++++++++++++++-
 sw/source/core/text/porlin.hxx               |    1 +
 3 files changed, 21 insertions(+), 1 deletion(-)

New commits:
commit 3b14cdf7386f41395d1b089c3b9dde7d4429cf38
Author: Justin Luth <justin_l...@sil.org>
Date:   Tue Dec 29 16:15:56 2015 +0300

    tdf#96685 - set initial focus of accessible editeng objects
    
    signalIMDeleteSurrounding searches for the focused accessible object.
    Since newly created accessible objects were not inheriting
    the focus setting of their peer, the search returned nothing
    until some event triggered the focus to be adjusted.
    
    Change-Id: I92f980b4bbe741d8ce9196165eff51059c807a2b
    Reviewed-on: https://gerrit.libreoffice.org/21002
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Justin Luth <justin_l...@sil.org>

diff --git a/svx/source/accessibility/AccessibleShape.cxx 
b/svx/source/accessibility/AccessibleShape.cxx
index 67f8800..a352e2b 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -179,6 +179,8 @@ void AccessibleShape::Init()
                     // non-empty text -> use full-fledged edit source right 
away
                     mpText = new AccessibleTextHelper( 
o3tl::make_unique<SvxTextEditSource >(*pSdrObject, nullptr, *pView, *pWindow) );
                 }
+                if( pWindow->HasFocus() )
+                    mpText->SetFocus();
 
                 if( bOwnParaObj )
                     delete pOutlinerParaObject;
commit d1bd4465be649a4078c3a2f85a64c8a6300dd65d
Author: Justin Luth <justin_l...@sil.org>
Date:   Wed Oct 28 11:12:17 2015 +0300

    tdf#93637 TAB_OVER_MARGIN support for a few more cases
    
    Extending nMaxRight when TAB_OVER_MARGIN compatibility is set and
    the right tabstop goes beyond the right margin fixes PDF output
    as well as certain cases of screen display.
    
    Change-Id: Ida4b4f399f06670d9bdefdc21978adf19a81d53a
    Reviewed-on: https://gerrit.libreoffice.org/19635
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Justin Luth <justin_l...@sil.org>

diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 79d3c5d..c5eba01 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -37,6 +37,7 @@
 #include <tgrditem.hxx>
 
 #include <EnhancedPDFExportHelper.hxx>
+#include <IDocumentSettingAccess.hxx>
 
 #include "flyfrms.hxx"
 #include "viewsh.hxx"
@@ -161,8 +162,24 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, 
SwSaveClip &rClip,
     SwLinePortion *pPor = bEndPor ? m_pCurr->GetFirstPortion() : 
CalcPaintOfst( rPaint );
 
     // Optimization!
-    const SwTwips nMaxRight = std::min( rPaint.Right(), Right() );
+    SwTwips nMaxRight = std::min( rPaint.Right(), Right() );
     const SwTwips nTmpLeft = GetInfo().X();
+    //compatibility setting: allow tabstop text to exceed right margin
+    if( 
GetInfo().GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN)
 )
+    {
+        SwLinePortion* pPorIter = pPor;
+        while( pPorIter )
+        {
+            if( pPorIter->IsTabRightPortion() )
+            {
+               const SwTabRightPortion *pRightTabPor = 
static_cast<SwTabRightPortion*>(pPorIter);
+               const SwTwips nTabPos = nTmpLeft + pRightTabPor->GetTabPos();
+                if( nMaxRight < nTabPos )
+                    nMaxRight = std::min( rPaint.Right(), nTabPos );
+            }
+            pPorIter = pPorIter->GetPortion();
+        }
+    }
     if( !bEndPor && nTmpLeft >= nMaxRight )
         return;
 
diff --git a/sw/source/core/text/porlin.hxx b/sw/source/core/text/porlin.hxx
index 486827d..cf46070 100644
--- a/sw/source/core/text/porlin.hxx
+++ b/sw/source/core/text/porlin.hxx
@@ -125,6 +125,7 @@ public:
     inline bool IsErgoSumPortion() const { return nWhichPor == POR_ERGOSUM; }
     inline bool IsQuoVadisPortion() const { return nWhichPor == POR_QUOVADIS; }
     inline bool IsTabLeftPortion() const { return nWhichPor == POR_TABLEFT; }
+    inline bool IsTabRightPortion() const { return nWhichPor == POR_TABRIGHT; }
     inline bool IsFootnoteNumPortion() const { return nWhichPor == POR_FTNNUM; 
}
     inline bool IsFootnotePortion() const { return nWhichPor == POR_FTN; }
     inline bool IsDropPortion() const { return nWhichPor == POR_DROP; }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to