Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool PP_AttrProp::getNthProperty(int ndx, const gchar *& szName, const gchar *& szValue) const
- {
- if (!m_pProperties)
- return false;
- if (static_cast<UT_uint32>(ndx) >= m_pProperties->size())
- {
- // UT_ASSERT_HARMLESS( UT_SHOULD_NOT_HAPPEN ); -- do not assert, some code in
- // while loops relies on this
- return false;
- }
- int i = 0;
- UT_GenericStringMap<PropertyPair*>::UT_Cursor c(m_pProperties);
- const PropertyPair * val = NULL;
- for (val = c.first(); (c.is_valid() && (i < ndx)); val = c.next(), i++)
- {
- // noop
- }
- if ( (i == ndx) && c.is_valid())
- {
- szName = c.key().c_str();
- szValue = val->first;
- return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement