diff options
-rw-r--r-- | desktop/qa/desktop_lib/test_desktop_lib.cxx | 8 | ||||
-rw-r--r-- | include/svx/postattr.hxx | 4 | ||||
-rw-r--r-- | svx/source/items/postattr.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/shells/textfld.cxx | 14 |
4 files changed, 15 insertions, 15 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 0574fec91e03..4e4ba10a5f19 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -1918,7 +1918,7 @@ void DesktopLOKTest::testCommentsCallbacks() int nCommentId1 = aView1.m_aCommentCallbackResult.get<int>("id"); // Reply to a comment just added - aCommandArgs = "{ \"Id\": { \"type\": \"long\", \"value\": \"" + OString::number(nCommentId1) + "\" }, \"Text\": { \"type\": \"string\", \"value\": \"Reply comment\" } }"; + aCommandArgs = "{ \"Id\": { \"type\": \"string\", \"value\": \"" + OString::number(nCommentId1) + "\" }, \"Text\": { \"type\": \"string\", \"value\": \"Reply comment\" } }"; pDocument->pClass->postUnoCommand(pDocument, ".uno:ReplyComment", aCommandArgs.getStr(), false); Scheduler::ProcessEventsToIdle(); @@ -1932,7 +1932,7 @@ void DesktopLOKTest::testCommentsCallbacks() int nCommentId2 = aView1.m_aCommentCallbackResult.get<int>("id"); // Edit the previously added comment - aCommandArgs = "{ \"Id\": { \"type\": \"long\", \"value\": \"" + OString::number(nCommentId2) + "\" }, \"Text\": { \"type\": \"string\", \"value\": \"Edited comment\" } }"; + aCommandArgs = "{ \"Id\": { \"type\": \"string\", \"value\": \"" + OString::number(nCommentId2) + "\" }, \"Text\": { \"type\": \"string\", \"value\": \"Edited comment\" } }"; pDocument->pClass->postUnoCommand(pDocument, ".uno:EditAnnotation", aCommandArgs.getStr(), false); Scheduler::ProcessEventsToIdle(); @@ -1946,7 +1946,7 @@ void DesktopLOKTest::testCommentsCallbacks() CPPUNIT_ASSERT_EQUAL(std::string("Edited comment"), aView2.m_aCommentCallbackResult.get<std::string>("text")); // Delete the reply comment just added - aCommandArgs = "{ \"Id\": { \"type\": \"long\", \"value\": \"" + OString::number(nCommentId2) + "\" } }"; + aCommandArgs = "{ \"Id\": { \"type\": \"string\", \"value\": \"" + OString::number(nCommentId2) + "\" } }"; pDocument->pClass->postUnoCommand(pDocument, ".uno:DeleteComment", aCommandArgs.getStr(), false); Scheduler::ProcessEventsToIdle(); @@ -1957,7 +1957,7 @@ void DesktopLOKTest::testCommentsCallbacks() CPPUNIT_ASSERT_EQUAL(nCommentId2, aView2.m_aCommentCallbackResult.get<int>("id")); // Reply to nCommentId1 again - aCommandArgs = "{ \"Id\": { \"type\": \"long\", \"value\": \"" + OString::number(nCommentId1) + "\" }, \"Text\": { \"type\": \"string\", \"value\": \"Reply comment again\" } }"; + aCommandArgs = "{ \"Id\": { \"type\": \"string\", \"value\": \"" + OString::number(nCommentId1) + "\" }, \"Text\": { \"type\": \"string\", \"value\": \"Reply comment again\" } }"; pDocument->pClass->postUnoCommand(pDocument, ".uno:ReplyComment", aCommandArgs.getStr(), false); Scheduler::ProcessEventsToIdle(); diff --git a/include/svx/postattr.hxx b/include/svx/postattr.hxx index dbe378fcdf27..19477acbd267 100644 --- a/include/svx/postattr.hxx +++ b/include/svx/postattr.hxx @@ -120,14 +120,14 @@ public: The internal id of a note */ -class SVX_DLLPUBLIC SvxPostItIdItem: public SfxUInt32Item +class SVX_DLLPUBLIC SvxPostItIdItem: public SfxStringItem { public: static SfxPoolItem* CreateDefault(); SvxPostItIdItem( sal_uInt16 nWhich ); - SvxPostItIdItem( sal_uInt32 rId, sal_uInt16 nWhich ); + SvxPostItIdItem( const OUString& rId, sal_uInt16 nWhich ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; diff --git a/svx/source/items/postattr.cxx b/svx/source/items/postattr.cxx index 1426a1be1b05..52d98a312d74 100644 --- a/svx/source/items/postattr.cxx +++ b/svx/source/items/postattr.cxx @@ -151,8 +151,8 @@ SvxPostItIdItem::SvxPostItIdItem( sal_uInt16 _nWhich ) SetWhich( _nWhich ); } -SvxPostItIdItem::SvxPostItIdItem( sal_uInt32 rId, sal_uInt16 _nWhich ) : - SfxUInt32Item( _nWhich, rId ) +SvxPostItIdItem::SvxPostItIdItem( const OUString& rId, sal_uInt16 _nWhich ) : + SfxStringItem( _nWhich, rId ) { } diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index a8fab5bf90b5..bf94094dce97 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -330,9 +330,9 @@ void SwTextShell::ExecField(SfxRequest &rReq) case FN_DELETE_COMMENT: { const SvxPostItIdItem* pIdItem = rReq.GetArg<SvxPostItIdItem>(SID_ATTR_POSTIT_ID); - if (pIdItem && pIdItem->GetValue() && GetView().GetPostItMgr()) + if (pIdItem && !pIdItem->GetValue().isEmpty() && GetView().GetPostItMgr()) { - GetView().GetPostItMgr()->Delete(pIdItem->GetValue()); + GetView().GetPostItMgr()->Delete(pIdItem->GetValue().toUInt32()); } else if ( GetView().GetPostItMgr() && GetView().GetPostItMgr()->HasActiveSidebarWin() ) @@ -380,16 +380,16 @@ void SwTextShell::ExecField(SfxRequest &rReq) case FN_REPLY: { const SvxPostItIdItem* pIdItem = rReq.GetArg<SvxPostItIdItem>(SID_ATTR_POSTIT_ID); - if (pIdItem && pIdItem->GetValue()) + if (pIdItem && !pIdItem->GetValue().isEmpty()) { SwFieldType* pType = rSh.GetDoc()->getIDocumentFieldsAccess().GetFieldType(RES_POSTITFLD, OUString(), false); SwIterator<SwFormatField,SwFieldType> aIter( *pType ); SwFormatField* pSwFormatField = aIter.First(); while( pSwFormatField ) { - if ( static_cast<SwPostItField*>(pSwFormatField->GetField())->GetPostItId() == pIdItem->GetValue()) + if ( static_cast<SwPostItField*>(pSwFormatField->GetField())->GetPostItId() == pIdItem->GetValue().toUInt32() ) { - sw::annotation::SwAnnotationWin* pWin = GetView().GetPostItMgr()->GetAnnotationWin(pIdItem->GetValue()); + sw::annotation::SwAnnotationWin* pWin = GetView().GetPostItMgr()->GetAnnotationWin(pIdItem->GetValue().toUInt32()); if (pWin) { const SvxPostItTextItem* pTextItem = rReq.GetArg<SvxPostItTextItem>(SID_ATTR_POSTIT_TEXT); @@ -479,14 +479,14 @@ void SwTextShell::ExecField(SfxRequest &rReq) case SID_EDIT_POSTIT: { const SvxPostItIdItem* pIdItem = rReq.GetArg<SvxPostItIdItem>(SID_ATTR_POSTIT_ID); - if (pIdItem && pIdItem->GetValue()) + if (pIdItem && !pIdItem->GetValue().isEmpty()) { const SvxPostItTextItem* pTextItem = rReq.GetArg<SvxPostItTextItem>(SID_ATTR_POSTIT_TEXT); OUString sText; if ( pTextItem ) sText = pTextItem->GetValue(); - sw::annotation::SwAnnotationWin* pAnnotationWin = GetView().GetPostItMgr()->GetAnnotationWin(pIdItem->GetValue()); + sw::annotation::SwAnnotationWin* pAnnotationWin = GetView().GetPostItMgr()->GetAnnotationWin(pIdItem->GetValue().toUInt32()); if (pAnnotationWin) pAnnotationWin->UpdateText(sText); } |