[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/svx sw/sdi sw/source
gokaysatir (via logerrit)
logerrit at kemper.freedesktop.org
Tue Oct 13 12:57:18 UTC 2020
include/svx/svxids.hrc | 8 ++++++--
sw/sdi/swriter.sdi | 2 +-
sw/source/uibase/wrtsh/wrtsh1.cxx | 13 +++++++++++++
3 files changed, 20 insertions(+), 3 deletions(-)
New commits:
commit 037b3c3cdb069600d5b97cf221682c144cf5b533
Author: gokaysatir <gokaysatir at collabora.com>
AuthorDate: Thu Sep 10 15:23:26 2020 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Tue Oct 13 14:56:44 2020 +0200
leaflet: User may continue writing a comment after it loses focus/core part.
This path enables Online users to continue writing their comment after they click somewhere else in the document.
Online side will remember original position of comment and it will send the cursor position when needed.
When there is no cursor position, default behaviour will work.
Change-Id: Ided951481af6e0ec6c930e125bec7fdf687614d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102377
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Henry Castro <hcastro at collabora.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 7ca9859f544f..6b15d0087926 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -199,7 +199,6 @@ class SvxSetItem;
#define SID_ATTR_POSTIT_DATE TypedWhichId<SvxPostItDateItem>( SID_SVX_START + 45 )
#define SID_ATTR_POSTIT_TEXT TypedWhichId<SvxPostItTextItem>( SID_SVX_START + 46 )
#define SID_ATTR_POSTIT_ID TypedWhichId<SvxPostItIdItem>( SID_SVX_START + 47 )
-// free
// CAUTION! Range <48 .. 49> used by EditEngine (!)
@@ -243,7 +242,7 @@ class SvxSetItem;
#define SID_ATTR_TRANSFORM_ROT_Y TypedWhichId<SfxInt32Item>( SID_SVX_START + 94 )
#define SID_ATTR_TRANSFORM_ANGLE TypedWhichId<SfxInt32Item>( SID_SVX_START + 95 )
#define SID_ATTR_TRANSFORM_DELTA_ANGLE TypedWhichId<SfxInt32Item>( SID_SVX_START + 96 )
-// CAUTION! Range <96..100> used by SFX2 (!)
+// CAUTION! Range <96..100> used by SFX2 (!) // 96 is used above?
#define SID_SIZE_ALL ( SID_SVX_START + 101 )
#define SID_DRAW_LINE ( SID_SVX_START + 102 )
#define SID_DRAW_XLINE ( SID_SVX_START + 103 )
@@ -425,6 +424,11 @@ class SvxSetItem;
//#define SID_SIDEBAR ( SID_SVX_START + 336 ) -> sfxsids.hrc
+#define SID_ATTR_POSTIT_X TypedWhichId<SvxPostItTextItem>( SID_SVX_START + 337 )
+#define SID_ATTR_POSTIT_Y TypedWhichId<SvxPostItTextItem>( SID_SVX_START + 338 )
+
+// free?
+
#define SID_SB_CONNECTIONPOOLING ( SID_SVX_START + 348 )
#define SID_SB_DBREGISTEROPTIONS ( SID_SVX_START + 349 )
#define SID_BMPMASK ( SID_SVX_START + 350 )
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 6a394660c04f..199dc6dba55f 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -2485,7 +2485,7 @@ SfxVoidItem IndexMarkToIndex FN_IDX_MARK_TO_IDX
]
SfxVoidItem InsertAnnotation FN_POSTIT
-(SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT,SvxPostItAuthorItem Author SID_ATTR_POSTIT_AUTHOR,SvxPostItDateItem Date SID_ATTR_POSTIT_DATE)
+(SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT,SvxPostItAuthorItem Author SID_ATTR_POSTIT_AUTHOR,SvxPostItDateItem Date SID_ATTR_POSTIT_DATE,SvxPostItTextItem pointX SID_ATTR_POSTIT_X, SvxPostItTextItem pointY SID_ATTR_POSTIT_Y)
[
AutoUpdate = FALSE,
FastCall = FALSE,
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 9eb00d361b9a..045ea5ceed7b 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1927,6 +1927,19 @@ void SwWrtShell::InsertPostIt(SwFieldMgr& rFieldMgr, const SfxRequest& rReq)
sText = GetView().GetPostItMgr()->GetAnswerText();
GetView().GetPostItMgr()->RegisterAnswerText(OUString());
}
+ else
+ {
+ const SvxPostItTextItem* pXItem = rReq.GetArg<SvxPostItTextItem>(SID_ATTR_POSTIT_X);
+ const SvxPostItTextItem* pYItem = rReq.GetArg<SvxPostItTextItem>(SID_ATTR_POSTIT_Y);
+ // We allow Online users to begin a comment, click somewhere else and save comment. When comment is saved, its initial position is sent.
+ if (pXItem && pYItem)
+ {
+ sal_Int32 pointX = (*pXItem).GetValue().toInt32();
+ sal_Int32 pointY = (*pYItem).GetValue().toInt32();
+ Point point(pointX, pointY);
+ SwCursorShell::SetCursor(point);
+ }
+ }
if ( HasSelection() && !IsTableMode() )
{
More information about the Libreoffice-commits
mailing list