stlport/systemstl/list         |   17 +++++++++--------
 sw/source/core/crsr/swcrsr.cxx |   40 ++++++++++++++++++++++++++--------------
 2 files changed, 35 insertions(+), 22 deletions(-)

New commits:
commit c739861cc38b09a1f99c3d91f879bfd8ee1ea43a
Author: Andre Fischer <a...@apache.org>
Date:   Wed Mar 5 13:52:22 2014 +0000

    124361: Avoid MSVC warning 4555 while including list.

diff --git a/stlport/systemstl/list b/stlport/systemstl/list
index 283880b..1fa1dc5 100644
--- a/stlport/systemstl/list
+++ b/stlport/systemstl/list
@@ -23,16 +23,17 @@
 #define SYSTEM_STL_LIST
 
 #ifdef HAVE_STL_INCLUDE_PATH
-       // TODO: use computed include file name
-       #include_next <list>
+    // TODO: use computed include file name
+    #include_next <list>
 #elif defined(_MSC_VER)
-       #include <../../VC/include/list>
-       // MSVC's list would cause a lot of expression-result-unused warnings
-       // unless it is compiled in iterator-debugging mode. Silence this noise
-       #pragma warning(disable:4555)
+    // MSVC's list would cause a lot of expression-result-unused warnings
+    // unless it is compiled in iterator-debugging mode. Silence this noise 
temporarily.
+    #pragma warning(push)
+    #pragma warning(disable:4555)
+    #include <../../VC/include/list>
+    #pragma warning(pop)
 #else // fall back to boost/tr1
-       #include <boost/tr1/tr1/list>
+    #include <boost/tr1/tr1/list>
 #endif
 
 #endif
-
commit 83510855eff12832682adfb0c1093ccb5cfc7b13
Author: Oliver-Rainer Wittmann <o...@apache.org>
Date:   Wed Mar 5 13:24:23 2014 +0000

    123979: method <SwCursor::IsSelOvr(..)> - treat application of new position 
due to content frame without height to next/previous content frame as restore 
to saved position, if new position equals the saved one.
    
    This avoid cursor traveling loops due to hidden content at the 
beginning/end of the text document.

diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 6922b16..b81ea04 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -343,7 +343,8 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
     if( pNd->IsCntntNode() && !dynamic_cast<SwUnoCrsr*>(this) )
     {
         const SwCntntFrm* pFrm = ((SwCntntNode*)pNd)->getLayoutFrm( 
pDoc->GetCurrentLayout() );
-        if( pFrm && pFrm->IsValid()
+        if( pFrm != NULL
+            && pFrm->IsValid()
             && 0 == pFrm->Frm().Height()
             && 0 != ( nsSwCursorSelOverFlags::SELOVER_CHANGEPOS & eFlags ) )
         {
@@ -356,40 +357,51 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
 
             // --> LIJIAN/FME 2007-11-27 #i72394# skip to prev /next valid 
paragraph
             // with a layout in case the first search did not succeed:
-            if( !pFrm )
+            if ( pFrm == NULL )
             {
                 bGoNxt = !bGoNxt;
                 pFrm = ((SwCntntNode*)pNd)->getLayoutFrm( 
pDoc->GetCurrentLayout() );
-                while ( pFrm && 0 == pFrm->Frm().Height() )
+                while ( pFrm != NULL
+                        && 0 == pFrm->Frm().Height() )
                 {
-                    pFrm = bGoNxt ? pFrm->GetNextCntntFrm()
-                        :   pFrm->GetPrevCntntFrm();
+                    pFrm = bGoNxt ? pFrm->GetNextCntntFrm() : 
pFrm->GetPrevCntntFrm();
                 }
             }
             // <--
 
-            SwCntntNode* pCNd;
-            if( pFrm && 0 != (pCNd = (SwCntntNode*)pFrm->GetNode()) )
+            SwCntntNode* pCNd = (pFrm != NULL) ? (SwCntntNode*)pFrm->GetNode() 
: NULL;
+            if ( pCNd != NULL )
             {
                 // set this cntntNode as new position
                 rPtIdx = *pCNd;
                 pNd = pCNd;
 
-                // ContentIndex noch anmelden:
-                xub_StrLen nTmpPos = bGoNxt ? 0 : pCNd->Len();
+                // assign corresponding ContentIndex
+                const xub_StrLen nTmpPos = bGoNxt ? 0 : pCNd->Len();
                 GetPoint()->nContent.Assign( pCNd, nTmpPos );
 
-                // sollten wir in einer Tabelle gelandet sein?
-                if( IsInProtectTable( sal_True ) )
-                    pFrm = 0;
+                if ( rPtIdx.GetIndex() == pSavePos->nNode
+                     && nTmpPos == pSavePos->nCntnt )
+                {
+                    // new position equals saved one
+                    // --> trigger restore of saved pos by setting <pFrm> to 
NULL - see below
+                    pFrm = NULL;
+                }
+
+                if ( IsInProtectTable( sal_True ) )
+                {
+                    // new position in protected table
+                    // --> trigger restore of saved pos by setting <pFrm> to 
NULL - see below
+                    pFrm = NULL;
+                }
             }
         }
 
-        if( !pFrm )
+        if( pFrm == NULL )
         {
             DeleteMark();
             RestoreSavePos();
-            return sal_True;        // ohne Frames geht gar nichts!
+            return sal_True;
         }
     }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to