summaryrefslogtreecommitdiff
path: root/sw/source/ui/misc/bookmark.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-19 10:52:20 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-02-19 11:23:57 +0000
commit778e9a65bf5af07c4caeff969a0324e43a78e66b (patch)
treea5204f0d3eaf2f512a627eeb9e74d42e7e80b54f /sw/source/ui/misc/bookmark.cxx
parent541c4c4509863beb7babe361b31e27f7295e3069 (diff)
new loplugin: find write-only fields
Change-Id: I0f83939babacf92485420ee63f290a297d7cb717 Reviewed-on: https://gerrit.libreoffice.org/22498 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw/source/ui/misc/bookmark.cxx')
-rw-r--r--sw/source/ui/misc/bookmark.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 3dd6d2e4c3e5..c12da8dcbdce 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -94,7 +94,7 @@ void SwInsertBookmarkDlg::Apply()
}
// insert text mark
- SwBoxEntry aTmpEntry(m_pBookmarkBox->GetText(), 0 );
+ SwBoxEntry aTmpEntry(m_pBookmarkBox->GetText() );
if (!m_pBookmarkBox->GetText().isEmpty() &&
(m_pBookmarkBox->GetSwEntryPos(aTmpEntry) == COMBOBOX_ENTRY_NOTFOUND))
@@ -129,7 +129,6 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg( vcl::Window *pParent, SwWrtShell &rS,
// fill Combobox with existing bookmarks
IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
- sal_Int32 nId = 0;
for( IDocumentMarkAccess::const_iterator_t ppBookmark = pMarkAccess->getBookmarksBegin();
ppBookmark != pMarkAccess->getBookmarksEnd();
++ppBookmark)
@@ -137,7 +136,7 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg( vcl::Window *pParent, SwWrtShell &rS,
if(IDocumentMarkAccess::MarkType::BOOKMARK == IDocumentMarkAccess::GetType(**ppBookmark))
{
m_pBookmarkBox->InsertSwEntry(
- SwBoxEntry(ppBookmark->get()->GetName(), nId++));
+ SwBoxEntry(ppBookmark->get()->GetName()));
}
}