Метод Comment::getReplies
Метод предоставляет доступ к ответам на комментарии. Ответы находятся в таком же классе Comments, как и сами комментарии документа.
Пример
Comments comments = document.getRange().getComments();
std::shared_ptr<Enumerator<Comment>> enumerator = comments.getEnumerator();
if (enumerator)
{
while (enumerator->isValid())
{
Comment comment = enumerator->getCurrent();
std::shared_ptr<Enumerator<Comment>> replies = comment.getReplies().getEnumerator();
if (replies)
{
while (replies->isValid())
{
boost::optional<std::string> replyTextOpt = replies.get()->getCurrent().getText();
std::printf("%s", replyTextOpt.get().c_str());
replies->goToNext();
}
}
enumerator->goToNext();
}
}