Aspose::Words::RevisionsView enum
Contents
[
Hide
]RevisionsView enum
Allows to specify whether to work with the original or revised version of a document.
enum class RevisionsView : int
Values
| Name | Value | Description |
|---|---|---|
| Final | 1 | Specifies revised version of a document. |
| Original | 0 | Specifies original version of a document. |
Examples
Shows how to switch between the revised and the original view of a document.
auto doc = System::MakeObject<Aspose::Words::Document>(System::String(get_MyDir() + u"Revisions at list levels.docx"));
doc->UpdateListLabels();
System::SharedPtr<Aspose::Words::ParagraphCollection> paragraphs = doc->get_FirstSection()->get_Body()->get_Paragraphs();
ASSERT_EQ(paragraphs->idx_get(0)->get_ListLabel()->get_LabelString(), u"1.");
ASSERT_EQ(paragraphs->idx_get(1)->get_ListLabel()->get_LabelString(), u"a.");
ASSERT_EQ(paragraphs->idx_get(2)->get_ListLabel()->get_LabelString(), System::String::Empty);
// View the document object as if all the revisions are accepted. Currently supports list labels.
doc->set_RevisionsView(RevisionsView::Final);
ASSERT_EQ(paragraphs->idx_get(0)->get_ListLabel()->get_LabelString(), System::String::Empty);
ASSERT_EQ(paragraphs->idx_get(1)->get_ListLabel()->get_LabelString(), u"1.");
ASSERT_EQ(paragraphs->idx_get(2)->get_ListLabel()->get_LabelString(), u"a.");
See Also
- Namespace Aspose::Words
- Library Aspose.Words for C++