summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svx/svxids.hrc8
-rw-r--r--sw/sdi/swriter.sdi2
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx13
3 files changed, 20 insertions, 3 deletions
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 7ab0eb4bab45..ba043ae4752c 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -200,7 +200,6 @@ class SfxStringItem;
#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 (!)
@@ -241,7 +240,7 @@ class SfxStringItem;
#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 )
@@ -422,6 +421,11 @@ class SfxStringItem;
//#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 fc7b2903512b..ea8a885d1f16 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -2503,7 +2503,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 a3b61a8a3d20..677dafaa30d1 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1882,6 +1882,19 @@ void SwWrtShell::InsertPostIt(SwFieldMgr& rFieldMgr, 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() )
{