[Libreoffice-commits] core.git: sw/qa sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed Oct 14 00:25:30 PDT 2015
sw/qa/extras/ooxmlexport/ooxmlexport3.cxx | 146 +++++++++++++++---------------
sw/source/filter/ww8/rtfexport.hxx | 5 -
sw/source/filter/ww8/rtfexportfilter.hxx | 5 -
3 files changed, 81 insertions(+), 75 deletions(-)
New commits:
commit 73ceffe5c247dcffa7653e043530e58e4eb73fdf
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Oct 14 09:24:30 2015 +0200
sw: indentation fixes
Change-Id: I93a6cfafbf42b30f2b6e3834594912750fd7764d
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index d600b86..4e4427c 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -501,87 +501,87 @@ DECLARE_OOXMLEXPORT_TEST(testMultiColumnLineSeparator, "multi-column-line-separa
DECLARE_OOXMLEXPORT_TEST(testCustomXmlGrabBag, "customxml.docx")
{
- // The problem was that item[n].xml and itemProps[n].xml and .rels files for item[n].xml
- // files were missing from docx file after saving file.
- // This test case tests whether customxml files grabbagged properly in correct object.
-
- uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
- uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY);
- uno::Sequence<beans::PropertyValue> aGrabBag(0);
- xTextDocumentPropertySet->getPropertyValue(OUString("InteropGrabBag")) >>= aGrabBag;
- CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty
- bool CustomXml = false;
- for(int i = 0; i < aGrabBag.getLength(); ++i)
- {
- if (aGrabBag[i].Name == "OOXCustomXml" || aGrabBag[i].Name == "OOXCustomXmlProps")
- {
- CustomXml = true;
- uno::Reference<xml::dom::XDocument> aCustomXmlDom;
- uno::Sequence<uno::Reference<xml::dom::XDocument> > aCustomXmlDomList;
- CPPUNIT_ASSERT(aGrabBag[i].Value >>= aCustomXmlDomList); // PropertyValue of proper type
- sal_Int32 length = aCustomXmlDomList.getLength();
- CPPUNIT_ASSERT_EQUAL(sal_Int32(1), length);
- aCustomXmlDom = aCustomXmlDomList[0];
- CPPUNIT_ASSERT(aCustomXmlDom.get()); // Reference not empty
- }
- }
- CPPUNIT_ASSERT(CustomXml); // Grab Bag has all the expected elements
+ // The problem was that item[n].xml and itemProps[n].xml and .rels files for item[n].xml
+ // files were missing from docx file after saving file.
+ // This test case tests whether customxml files grabbagged properly in correct object.
+
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aGrabBag(0);
+ xTextDocumentPropertySet->getPropertyValue(OUString("InteropGrabBag")) >>= aGrabBag;
+ CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty
+ bool CustomXml = false;
+ for(int i = 0; i < aGrabBag.getLength(); ++i)
+ {
+ if (aGrabBag[i].Name == "OOXCustomXml" || aGrabBag[i].Name == "OOXCustomXmlProps")
+ {
+ CustomXml = true;
+ uno::Reference<xml::dom::XDocument> aCustomXmlDom;
+ uno::Sequence<uno::Reference<xml::dom::XDocument> > aCustomXmlDomList;
+ CPPUNIT_ASSERT(aGrabBag[i].Value >>= aCustomXmlDomList); // PropertyValue of proper type
+ sal_Int32 length = aCustomXmlDomList.getLength();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), length);
+ aCustomXmlDom = aCustomXmlDomList[0];
+ CPPUNIT_ASSERT(aCustomXmlDom.get()); // Reference not empty
+ }
+ }
+ CPPUNIT_ASSERT(CustomXml); // Grab Bag has all the expected elements
}
DECLARE_OOXMLEXPORT_TEST(testActiveXGrabBag, "activex.docx")
{
- // The problem was that activeX.xml files were missing from docx file after saving file.
- // This test case tests whether activex files grabbagged properly in correct object.
-
- uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
- uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY);
- uno::Sequence<beans::PropertyValue> aGrabBag(0);
- xTextDocumentPropertySet->getPropertyValue(OUString("InteropGrabBag")) >>= aGrabBag;
- CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty
- bool bActiveX = false;
- for(int i = 0; i < aGrabBag.getLength(); ++i)
- {
- if (aGrabBag[i].Name == "OOXActiveX")
- {
- bActiveX = true;
- uno::Reference<xml::dom::XDocument> aActiveXDom;
- uno::Sequence<uno::Reference<xml::dom::XDocument> > aActiveXDomList;
- CPPUNIT_ASSERT(aGrabBag[i].Value >>= aActiveXDomList); // PropertyValue of proper type
- sal_Int32 length = aActiveXDomList.getLength();
- CPPUNIT_ASSERT_EQUAL(sal_Int32(5), length);
- aActiveXDom = aActiveXDomList[0];
- CPPUNIT_ASSERT(aActiveXDom.get()); // Reference not empty
- }
- }
- CPPUNIT_ASSERT(bActiveX); // Grab Bag has all the expected elements
+ // The problem was that activeX.xml files were missing from docx file after saving file.
+ // This test case tests whether activex files grabbagged properly in correct object.
+
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aGrabBag(0);
+ xTextDocumentPropertySet->getPropertyValue(OUString("InteropGrabBag")) >>= aGrabBag;
+ CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty
+ bool bActiveX = false;
+ for(int i = 0; i < aGrabBag.getLength(); ++i)
+ {
+ if (aGrabBag[i].Name == "OOXActiveX")
+ {
+ bActiveX = true;
+ uno::Reference<xml::dom::XDocument> aActiveXDom;
+ uno::Sequence<uno::Reference<xml::dom::XDocument> > aActiveXDomList;
+ CPPUNIT_ASSERT(aGrabBag[i].Value >>= aActiveXDomList); // PropertyValue of proper type
+ sal_Int32 length = aActiveXDomList.getLength();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), length);
+ aActiveXDom = aActiveXDomList[0];
+ CPPUNIT_ASSERT(aActiveXDom.get()); // Reference not empty
+ }
+ }
+ CPPUNIT_ASSERT(bActiveX); // Grab Bag has all the expected elements
}
DECLARE_OOXMLEXPORT_TEST(testActiveXBinGrabBag, "activexbin.docx")
{
- // The problem was that activeX.bin files were missing from docx file after saving file.
- // This test case tests whether activex bin files grabbagged properly in correct object.
-
- uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
- uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY);
- uno::Sequence<beans::PropertyValue> aGrabBag(0);
- xTextDocumentPropertySet->getPropertyValue(OUString("InteropGrabBag")) >>= aGrabBag;
- CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty
- bool bActiveX = false;
- for(int i = 0; i < aGrabBag.getLength(); ++i)
- {
- if (aGrabBag[i].Name == "OOXActiveXBin")
- {
- bActiveX = true;
- uno::Reference<io::XInputStream> aActiveXBin;
- uno::Sequence<uno::Reference<io::XInputStream> > aActiveXBinList;
- CPPUNIT_ASSERT(aGrabBag[i].Value >>= aActiveXBinList); // PropertyValue of proper type
- sal_Int32 length = aActiveXBinList.getLength();
- CPPUNIT_ASSERT_EQUAL(sal_Int32(5), length);
- aActiveXBin = aActiveXBinList[0];
- CPPUNIT_ASSERT(aActiveXBin.get()); // Reference not empty
- }
- }
- CPPUNIT_ASSERT(bActiveX); // Grab Bag has all the expected elements
+ // The problem was that activeX.bin files were missing from docx file after saving file.
+ // This test case tests whether activex bin files grabbagged properly in correct object.
+
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aGrabBag(0);
+ xTextDocumentPropertySet->getPropertyValue(OUString("InteropGrabBag")) >>= aGrabBag;
+ CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty
+ bool bActiveX = false;
+ for(int i = 0; i < aGrabBag.getLength(); ++i)
+ {
+ if (aGrabBag[i].Name == "OOXActiveXBin")
+ {
+ bActiveX = true;
+ uno::Reference<io::XInputStream> aActiveXBin;
+ uno::Sequence<uno::Reference<io::XInputStream> > aActiveXBinList;
+ CPPUNIT_ASSERT(aGrabBag[i].Value >>= aActiveXBinList); // PropertyValue of proper type
+ sal_Int32 length = aActiveXBinList.getLength();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), length);
+ aActiveXBin = aActiveXBinList[0];
+ CPPUNIT_ASSERT(aActiveXBin.get()); // Reference not empty
+ }
+ }
+ CPPUNIT_ASSERT(bActiveX); // Grab Bag has all the expected elements
}
DECLARE_OOXMLEXPORT_TEST(testFdo69644, "fdo69644.docx")
diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx
index f632513..c4c3f86 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -90,7 +90,10 @@ public:
//For i120928,add an interface to export graphic of bullet
virtual void ExportGrfBullet(const SwTextNode& rNd) override;
- virtual void WriteCR(ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t()*/) override { /* no-op for rtf, most probably should not even be in MSWordExportBase */ }
+ virtual void WriteCR(ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t()*/) override
+ {
+ /* no-op for rtf, most probably should not even be in MSWordExportBase */
+ }
virtual void WriteChar(sal_Unicode) override;
/// Write the numbering table.
diff --git a/sw/source/filter/ww8/rtfexportfilter.hxx b/sw/source/filter/ww8/rtfexportfilter.hxx
index ba59f3b..81c6a25 100644
--- a/sw/source/filter/ww8/rtfexportfilter.hxx
+++ b/sw/source/filter/ww8/rtfexportfilter.hxx
@@ -30,7 +30,10 @@
class RtfWriter : public Writer
{
protected:
- sal_uLong WriteStream() override { return 0; }
+ sal_uLong WriteStream() override
+ {
+ return 0;
+ }
};
/// The physical access to the RTF document (for writing).
More information about the Libreoffice-commits
mailing list