Kaydet (Commit) b7574264 authored tarafından Miklos Vajna's avatar Miklos Vajna

SwXTextField::getAnchor: avoid pointless dynamic_cast<>

Change-Id: I4cc96b8e1dee423216e528410953108c64ac5d63
üst 6fb943be
......@@ -2079,8 +2079,9 @@ SwXTextField::getAnchor() throw (uno::RuntimeException, std::exception)
return 0;
// If this is a postit field, then return the range of its annotation mark if it has one.
if (const SwPostItField* pPostItField = dynamic_cast<const SwPostItField*>(pField))
if (pField->Which() == RES_POSTITFLD)
{
const SwPostItField* pPostItField = static_cast<const SwPostItField*>(pField);
IDocumentMarkAccess* pMarkAccess = m_pImpl->m_pDoc->getIDocumentMarkAccess();
for (IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->getAnnotationMarksBegin(); ppMark != pMarkAccess->getAnnotationMarksEnd(); ++ppMark)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment