[Libreoffice-commits] core.git: basctl/source
Julien Nabet
serval2412 at yahoo.fr
Sat May 27 03:58:05 UTC 2017
basctl/source/basicide/baside2.cxx | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
New commits:
commit 95b9b46cca1da5f452af5e322af447fd27f82ea5
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri May 26 15:30:17 2017 +0200
Revert "deleted variable bAdd because it does not make sense"
This reverts commit d0c0ebbcabb67b8dfd130cf4e9e666bba229f846.
+ fix bAdd logic
Change-Id: Iefa70e31c5747db1a881b1036e3d8a8995785603
Reviewed-on: https://gerrit.libreoffice.org/38072
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index c85863afdd2f..d54141ffe7ab 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -669,6 +669,7 @@ BasicDebugFlags ModulWindow::BasicBreakHdl( StarBASIC* pBasic )
void ModulWindow::BasicAddWatch()
{
AssertValidEditEngine();
+ bool bAdd = true;
if ( !GetEditView()->HasSelection() )
{
TextPaM aWordStart;
@@ -679,11 +680,15 @@ void ModulWindow::BasicAddWatch()
aSel.GetEnd().GetIndex() += aWord.getLength();
GetEditView()->SetSelection( aSel );
}
+ else
+ bAdd = false;
+ }
+ if ( bAdd )
+ {
+ TextSelection aSel = GetEditView()->GetSelection();
+ if ( aSel.GetStart().GetPara() == aSel.GetEnd().GetPara() ) // single line selection
+ m_rLayout.BasicAddWatch(GetEditView()->GetSelected());
}
-
- TextSelection aSel = GetEditView()->GetSelection();
- if ( aSel.GetStart().GetPara() == aSel.GetEnd().GetPara() ) // single line selection
- m_rLayout.BasicAddWatch(GetEditView()->GetSelected());
}
More information about the Libreoffice-commits
mailing list