sw/source/core/crsr/crsrsh.cxx | 1 + sw/source/ui/wrtsh/select.cxx | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-)
New commits: commit 4b6445dba6bb5b2aed3edb4878ecb327446286e9 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Mon Sep 16 16:25:15 2013 +0200 fdo#37606 SwWrtShell: fix select all when doc starts with table and cursor ... ... is outside that table Change-Id: Id61723a3b4c8265d822bccffe63b30038fcc5eab diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 89698a9..e64b63d 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1158,6 +1158,7 @@ sal_Bool SwCrsrShell::GoPrevCrsr() void SwCrsrShell::Paint( const Rectangle &rRect) { + comphelper::FlagRestorationGuard g(mbSelectAll, StartsWithTable() && ExtendedSelectedAll()); SET_CURR_SHELL( this ); // always switch off all cursors when painting diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx index 4ad3f6a..149d299 100644 --- a/sw/source/ui/wrtsh/select.cxx +++ b/sw/source/ui/wrtsh/select.cxx @@ -160,7 +160,8 @@ long SwWrtShell::SelAll() SttSelect(); GoEnd(sal_True, &bMoveTable); - if (StartsWithTable()) + bool bStartsWithTable = StartsWithTable(); + if (bStartsWithTable) ExtendedSelectAll(); if( pStartPos ) @@ -173,9 +174,9 @@ long SwWrtShell::SelAll() // if the last selection was behind the first section or // if the last selection was already the first section // In this both cases we select to the end of document - if( *pTmpCrsr->GetPoint() < *pEndPos || + if( ( *pTmpCrsr->GetPoint() < *pEndPos || ( *pStartPos == *pTmpCrsr->GetMark() && - *pEndPos == *pTmpCrsr->GetPoint() ) ) + *pEndPos == *pTmpCrsr->GetPoint() ) ) && !bStartsWithTable) SwCrsrShell::SttEndDoc(sal_False); } delete pStartPos; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits