diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-10-28 11:15:43 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2013-11-05 12:34:48 +0100 |
commit | 28761942f8f281bd6787e8ad9b042bbcedbcfd83 (patch) | |
tree | 03c891c953e858940891074227e3c8c3a082a588 | |
parent | 4a66e3c54194e850a97c8875e99bb571bada3d82 (diff) |
bnc#825891 fdo#69893 fix SwWrtShell::SelAll() to work with empty table at doc start
In theory, it was a problem to have the table cursor around when having
the selection outside the table; but it didn't cause a problem so far.
However, when the table has one or more empty cells, we really need to
leave table mode, otherwise only the table gets selected.
Change-Id: I766903ed624b9338f0612697b4c03f44de1d2e41
(cherry picked from commit d1eb536c7e410d40fd94c76b157bbd4ed7944d4c)
Conflicts:
sw/qa/extras/uiwriter/uiwriter.cxx
-rw-r--r-- | sw/source/ui/wrtsh/select.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx index 3923fe3d0395..feb47e3ea454 100644 --- a/sw/source/ui/wrtsh/select.cxx +++ b/sw/source/ui/wrtsh/select.cxx @@ -162,7 +162,13 @@ long SwWrtShell::SelAll() bool bStartsWithTable = StartsWithTable(); if (bStartsWithTable) + { + // Disable table cursor to make sure getShellCrsr() returns m_pCurCrsr, not m_pTblCrsr. + if (IsTableMode()) + TblCrsrToCursor(); + // Do the extended select all on m_pCurCrsr. ExtendedSelectAll(/*bFootnotes =*/ false); + } if( pStartPos ) { |