From ce96c5957c38384f8911d6307605c502eca0c644 Mon Sep 17 00:00:00 2001 From: Pranav Kant Date: Wed, 15 Feb 2017 14:27:08 +0530 Subject: SvxPostItIdItem is now string type Change-Id: Id44bf5dd623749b6e9a46f121f035aa5ce617557 --- sw/source/uibase/shells/textfld.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sw') 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(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(SID_ATTR_POSTIT_ID); - if (pIdItem && pIdItem->GetValue()) + if (pIdItem && !pIdItem->GetValue().isEmpty()) { SwFieldType* pType = rSh.GetDoc()->getIDocumentFieldsAccess().GetFieldType(RES_POSTITFLD, OUString(), false); SwIterator aIter( *pType ); SwFormatField* pSwFormatField = aIter.First(); while( pSwFormatField ) { - if ( static_cast(pSwFormatField->GetField())->GetPostItId() == pIdItem->GetValue()) + if ( static_cast(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(SID_ATTR_POSTIT_TEXT); @@ -479,14 +479,14 @@ void SwTextShell::ExecField(SfxRequest &rReq) case SID_EDIT_POSTIT: { const SvxPostItIdItem* pIdItem = rReq.GetArg(SID_ATTR_POSTIT_ID); - if (pIdItem && pIdItem->GetValue()) + if (pIdItem && !pIdItem->GetValue().isEmpty()) { const SvxPostItTextItem* pTextItem = rReq.GetArg(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); } -- cgit