[Libreoffice-commits] .: 2 commits - sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Dec 20 03:12:30 PST 2012
sw/source/ui/docvw/edtwin.cxx | 9 +++++----
sw/source/ui/wrtsh/wrtsh2.cxx | 5 ++++-
2 files changed, 9 insertions(+), 5 deletions(-)
New commits:
commit 4241ef2325d803914e9c29d8d6ec0e7c49f6996c
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Wed Dec 19 19:33:18 2012 +0100
when clicking at a text placeholder, put the cursor at the start
Rather than at the end. There is still some flicker, because
SwEditWin::MouseButtonDown() selects it first too and puts the cursor
at the end, but I've wasted already way too much time and trying
to avoid that or the flicker.
Change-Id: Ib0f00f3f955e64427dba8dd1c6ae7123afc17b34
diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx
index 72d4cbd..01e4e31 100644
--- a/sw/source/ui/wrtsh/wrtsh2.cxx
+++ b/sw/source/ui/wrtsh/wrtsh2.cxx
@@ -257,7 +257,10 @@ void SwWrtShell::ClickToField( const SwField& rFld )
}
- Right( CRSR_SKIP_CHARS, sal_True, 1, sal_False ); // Feld selektieren
+ StartAllAction();
+ Right( CRSR_SKIP_CHARS, true, 0, false ); // Select the field.
+ NormalizePam(); // Cursor at the beginning of it.
+ EndAllAction();
if( nSlotId )
{
commit bdd9d06c129344f8a10cbb691c129dc914600862
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Wed Dec 19 19:03:11 2012 +0100
incorrect if body alignment
Change-Id: Ic5076bc7be30e72686840c06f1f9b441b774f3ba
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index e47b404..3ceee26 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -3237,12 +3237,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
bFrmDrag = sal_False;
if ( !bHandledFlyClick && !bIsDocReadOnly && rSh.IsInsideSelectedObj(aDocPos) &&
0 == rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) )
-
+ {
/* this is no good, on the one hand GetSelectionType is used as flag field (take a look into the GetSelectionType method)
on the other hand the return value is used in a switch without proper masking (very nice), this must lead to trouble
*/
- switch ( rSh.GetSelectionType() &~ ( nsSelectionType::SEL_FONTWORK | nsSelectionType::SEL_EXTRUDED_CUSTOMSHAPE ) )
- {
+ switch ( rSh.GetSelectionType() &~ ( nsSelectionType::SEL_FONTWORK | nsSelectionType::SEL_EXTRUDED_CUSTOMSHAPE ) )
+ {
case nsSelectionType::SEL_GRF:
RstMBDownFlags();
GetView().GetViewFrame()->GetBindings().Execute(
@@ -3271,6 +3271,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if ( rView.GetCurShell()->ISA(SwDrawTextShell) )
((SwDrawTextShell*)rView.GetCurShell())->Init();
return;
+ }
}
// if the cursor position was corrected or if a Fly
@@ -5328,7 +5329,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
xub_StrLen nMarkIdx = pCrsr->GetMark()->nContent.GetIndex();
if( !rSh.GetCrsr()->HasMark() )
- rSh.GetCrsr()->SetMark();
+ rSh.GetCrsr()->SetMark();
rSh.SttCrsrMove();
More information about the Libreoffice-commits
mailing list