Kaydet (Commit) 4b6445db authored tarafından Miklos Vajna's avatar Miklos Vajna

fdo#37606 SwWrtShell: fix select all when doc starts with table and cursor ...

... is outside that table

Change-Id: Id61723a3b4c8265d822bccffe63b30038fcc5eab
üst ba511f80
......@@ -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
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment