sw/inc/crsrsh.hxx              |    3 --
 sw/source/core/crsr/crsrsh.cxx |   58 ++++++++++++++++-------------------------
 2 files changed, 25 insertions(+), 36 deletions(-)

New commits:
commit a874d2a9f66d69aa69f36393de94c803ffa3eaa7
Author: Michael Stahl <mst...@redhat.com>
Date:   Mon Jun 8 23:30:33 2015 +0200

    sw: remove unused CrsrFlag::NOCALRECT
    
    Change-Id: I985ac3eea9ebb780821ab4fffd460935be5e536d

diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index b513fc1..17cf27b 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -156,8 +156,7 @@ public:
         UPDOWN      = (1 << 0),     ///< keep Up/Down on columns
         SCROLLWIN   = (1 << 1),     ///< scroll window
         CHKRANGE    = (1 << 2),     ///< check overlapping PaMs
-        NOCALRECT   = (1 << 3),     ///< don't recalculate CharRect
-        READONLY    = (1 << 4)      ///< make visible in spite of Readonly
+        READONLY    = (1 << 3)      ///< make visible in spite of Readonly
     };
 
 private:
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index e6b6680..c01966b 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1724,44 +1724,36 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool 
bIdleEnd )
             }
         } while( bAgainst );
 
-        if( !( eFlags & SwCrsrShell::NOCALRECT ))
-        {
-            SwCrsrMoveState aTmpState( m_eMvState );
-            aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
-            aTmpState.bRealHeight = true;
-            aTmpState.bRealWidth = IsOverwriteCrsr();
-            aTmpState.nCursorBidiLevel = pShellCrsr->GetCrsrBidiLevel();
-
-            // #i27615#,#i30453#
-            SwSpecialPos aSpecialPos;
-            aSpecialPos.nExtendRange = SwSPExtendRange::BEFORE;
-            if (pShellCrsr->IsInFrontOfLabel())
-            {
-                aTmpState.pSpecialPos = &aSpecialPos;
-            }
+        SwCrsrMoveState aTmpState( m_eMvState );
+        aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
+        aTmpState.bRealHeight = true;
+        aTmpState.bRealWidth = IsOverwriteCrsr();
+        aTmpState.nCursorBidiLevel = pShellCrsr->GetCrsrBidiLevel();
 
-            ++mnStartAction; // tdf#91602 prevent recursive Action!
-            if( !pFrm->GetCharRect( m_aCharRect, *pShellCrsr->GetPoint(), 
&aTmpState ) )
-            {
-                Point& rPt = pShellCrsr->GetPtPos();
-                rPt = m_aCharRect.Center();
-                pFrm->GetCrsrOfst( pShellCrsr->GetPoint(), rPt, &aTmpState );
-            }
-            --mnStartAction;
+        // #i27615#,#i30453#
+        SwSpecialPos aSpecialPos;
+        aSpecialPos.nExtendRange = SwSPExtendRange::BEFORE;
+        if (pShellCrsr->IsInFrontOfLabel())
+        {
+            aTmpState.pSpecialPos = &aSpecialPos;
+        }
 
-            if( !pShellCrsr->HasMark() )
-                m_aCrsrHeight = aTmpState.aRealHeight;
-            else
-            {
-                m_aCrsrHeight.setX(0);
-                m_aCrsrHeight.setY(aTmpState.aRealHeight.getY() < 0 ?
-                                  -m_aCharRect.Width() : m_aCharRect.Height());
-            }
+        ++mnStartAction; // tdf#91602 prevent recursive Action!
+        if( !pFrm->GetCharRect( m_aCharRect, *pShellCrsr->GetPoint(), 
&aTmpState ) )
+        {
+            Point& rPt = pShellCrsr->GetPtPos();
+            rPt = m_aCharRect.Center();
+            pFrm->GetCrsrOfst( pShellCrsr->GetPoint(), rPt, &aTmpState );
         }
+        --mnStartAction;
+
+        if( !pShellCrsr->HasMark() )
+            m_aCrsrHeight = aTmpState.aRealHeight;
         else
         {
             m_aCrsrHeight.setX(0);
-            m_aCrsrHeight.setY(m_aCharRect.Height());
+            m_aCrsrHeight.setY(aTmpState.aRealHeight.getY() < 0 ?
+                              -m_aCharRect.Width() : m_aCharRect.Height());
         }
 
         if( !bFirst && aOld == m_aCharRect )
commit 238e07ddca879e0951bef6391fdc5c3fc26bded5
Author: Michael Stahl <mst...@redhat.com>
Date:   Mon Jun 8 23:28:11 2015 +0200

    tdf#91917 tdf#91602: avoid layout recursion differently
    
    (regression from 587006cac508616f486aea45e265a170bcccdc87)
    
    Change-Id: I38e00a7469243088e25aa1a91e3581240b3bbdea

diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 0b8aba3..e6b6680 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -284,10 +284,6 @@ void SwCrsrShell::EndAction( const bool bIdleEnd, const 
bool DoSetPosX )
         }
         return;
     }
-    else
-    {
-        eFlags |= SwCrsrShell::NOCALRECT; // tdf#91602 prevent recursive 
Action!
-    }
 
     if ( !bIdleEnd )
         eFlags |= SwCrsrShell::SCROLLWIN;
@@ -1744,12 +1740,14 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool 
bIdleEnd )
                 aTmpState.pSpecialPos = &aSpecialPos;
             }
 
+            ++mnStartAction; // tdf#91602 prevent recursive Action!
             if( !pFrm->GetCharRect( m_aCharRect, *pShellCrsr->GetPoint(), 
&aTmpState ) )
             {
                 Point& rPt = pShellCrsr->GetPtPos();
                 rPt = m_aCharRect.Center();
                 pFrm->GetCrsrOfst( pShellCrsr->GetPoint(), rPt, &aTmpState );
             }
+            --mnStartAction;
 
             if( !pShellCrsr->HasMark() )
                 m_aCrsrHeight = aTmpState.aRealHeight;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to