Import/export RTF_REVISIONS
File -> Properties -> Security -> Record Changes on the UI. Change-Id: I96d321f407abd33e15a4a133e6723d48efa5bc53
This commit is contained in:
3
sw/qa/extras/rtfexport/data/record-changes.rtf
Normal file
3
sw/qa/extras/rtfexport/data/record-changes.rtf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{\rtf1\revisions
|
||||||
|
hello
|
||||||
|
\par }
|
@@ -64,6 +64,7 @@ public:
|
|||||||
void testHyperlink();
|
void testHyperlink();
|
||||||
void testTextFrameBorders();
|
void testTextFrameBorders();
|
||||||
void testTextframeGradient();
|
void testTextframeGradient();
|
||||||
|
void testRecordChanges();
|
||||||
|
|
||||||
CPPUNIT_TEST_SUITE(Test);
|
CPPUNIT_TEST_SUITE(Test);
|
||||||
#if !defined(MACOSX) && !defined(WNT)
|
#if !defined(MACOSX) && !defined(WNT)
|
||||||
@@ -117,6 +118,7 @@ void Test::run()
|
|||||||
{"hyperlink.rtf", &Test::testHyperlink},
|
{"hyperlink.rtf", &Test::testHyperlink},
|
||||||
{"textframe-borders.rtf", &Test::testTextFrameBorders},
|
{"textframe-borders.rtf", &Test::testTextFrameBorders},
|
||||||
{"textframe-gradient.rtf", &Test::testTextframeGradient},
|
{"textframe-gradient.rtf", &Test::testTextframeGradient},
|
||||||
|
{"record-changes.rtf", &Test::testRecordChanges},
|
||||||
};
|
};
|
||||||
// Don't test the first import of these, for some reason those tests fail
|
// Don't test the first import of these, for some reason those tests fail
|
||||||
const char* aBlacklist[] = {
|
const char* aBlacklist[] = {
|
||||||
@@ -584,6 +586,12 @@ void Test::testTextframeGradient()
|
|||||||
CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_AXIAL, aGradient.Style);
|
CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_AXIAL, aGradient.Style);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Test::testRecordChanges()
|
||||||
|
{
|
||||||
|
// \revisions wasn't imported/exported.
|
||||||
|
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(mxComponent, "RecordChanges"));
|
||||||
|
}
|
||||||
|
|
||||||
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
|
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
|
||||||
|
|
||||||
CPPUNIT_PLUGIN_IMPLEMENT();
|
CPPUNIT_PLUGIN_IMPLEMENT();
|
||||||
|
@@ -515,6 +515,9 @@ void RtfExport::ExportDocument_Impl()
|
|||||||
Strm() << OOO_STRING_SVTOOLS_RTF_VIEWSCALE;
|
Strm() << OOO_STRING_SVTOOLS_RTF_VIEWSCALE;
|
||||||
OutULong(pViewShell->GetViewOptions()->GetZoom());
|
OutULong(pViewShell->GetViewOptions()->GetZoom());
|
||||||
}
|
}
|
||||||
|
// Record changes?
|
||||||
|
if (nsRedlineMode_t::REDLINE_ON & mnRedlineMode)
|
||||||
|
Strm() << OOO_STRING_SVTOOLS_RTF_REVISIONS;
|
||||||
// Page description
|
// Page description
|
||||||
WritePageDescTable();
|
WritePageDescTable();
|
||||||
|
|
||||||
|
@@ -2655,6 +2655,9 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
|
|||||||
case RTF_MNOR:
|
case RTF_MNOR:
|
||||||
m_bMathNor = true;
|
m_bMathNor = true;
|
||||||
break;
|
break;
|
||||||
|
case RTF_REVISIONS:
|
||||||
|
m_aSettingsTableSprms.set(NS_ooxml::LN_CT_Settings_trackRevisions, RTFValue::Pointer_t(new RTFValue(1)));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
SAL_INFO("writerfilter", "TODO handle flag '" << lcl_RtfToString(nKeyword) << "'");
|
SAL_INFO("writerfilter", "TODO handle flag '" << lcl_RtfToString(nKeyword) << "'");
|
||||||
|
Reference in New Issue
Block a user