[Libreoffice-commits] core.git: sw/qa writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Sat Jul 19 01:30:00 PDT 2014


 sw/qa/extras/rtfimport/rtfimport.cxx           |    9 +---
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |    2 
 writerfilter/source/rtftok/rtfsdrimport.cxx    |   55 +++++++++++++------------
 writerfilter/source/rtftok/rtfsdrimport.hxx    |   14 +++---
 4 files changed, 41 insertions(+), 39 deletions(-)

New commits:
commit 90d2ebf7a74fa703db5b080ab54181319696a54a
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sat Jul 19 10:17:20 2014 +0200

    indentation fixes
    
    Change-Id: I2c1f99128698778233b0bd46256b571d3f794713

diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 06b6593..9784736 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -889,17 +889,14 @@ DECLARE_RTFIMPORT_TEST(testFdo79319, "fdo79319.rtf")
 {
     // the thin horizontal rule was imported as a big fat rectangle
     uno::Reference<drawing::XShape> xShape(getShape(1), uno::UNO_QUERY);
-    CPPUNIT_ASSERT_EQUAL(sal_Int16(100),
-            getProperty<sal_Int16>(xShape, "RelativeWidth"));
+    CPPUNIT_ASSERT_EQUAL(sal_Int16(100), getProperty<sal_Int16>(xShape, "RelativeWidth"));
     // FIXME the width/height numbers here are bogus; they should be 15238 / 53
     // (as they are when opening the file in a full soffice)
 #if 0
     CPPUNIT_ASSERT_EQUAL(sal_Int32(15238), xShape->getSize().Width);
     CPPUNIT_ASSERT_EQUAL(sal_Int32(53), xShape->getSize().Height);
-    CPPUNIT_ASSERT_EQUAL(text::VertOrientation::CENTER,
-            getProperty<sal_Int16>(xShape, "VertOrient"));
-    CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::CENTER,
-            getProperty<sal_Int16>(xShape, "HoriOrient"));
+    CPPUNIT_ASSERT_EQUAL(text::VertOrientation::CENTER, getProperty<sal_Int16>(xShape, "VertOrient"));
+    CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::CENTER, getProperty<sal_Int16>(xShape, "HoriOrient"));
 #endif
 }
 
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 5946642..879bc22 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -5572,7 +5572,7 @@ int RTFDocumentImpl::popState()
     }
     break;
     case DESTINATION_LISTNAME:
-    break;
+        break;
     case DESTINATION_LISTLEVEL:
     {
         RTFValue::Pointer_t pInnerValue(new RTFValue(m_aStates.top().nListLevelNum++));
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index 399c008..d8aa4a3 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -217,11 +217,10 @@ void RTFSdrImport::applyProperty(uno::Reference<drawing::XShape> xShape, const O
     }
 }
 
-int RTFSdrImport::initShape(
-    uno::Reference<drawing::XShape> & o_xShape,
-    uno::Reference<beans::XPropertySet> & o_xPropSet,
-    bool & o_rIsCustomShape,
-    RTFShape const& rShape, bool const bClose, ShapeOrPict const shapeOrPict)
+int RTFSdrImport::initShape(uno::Reference<drawing::XShape>& o_xShape,
+                            uno::Reference<beans::XPropertySet>& o_xPropSet,
+                            bool& o_rIsCustomShape,
+                            RTFShape const& rShape, bool const bClose, ShapeOrPict const shapeOrPict)
 {
     assert(!o_xShape.is());
     assert(!o_xPropSet.is());
@@ -234,8 +233,8 @@ int RTFSdrImport::initShape(
         std::find_if(rShape.aProperties.begin(),
                      rShape.aProperties.end(),
                      boost::bind(&OUString::equals,
-                         boost::bind(&std::pair<OUString, OUString>::first, _1),
-                         OUString("shapeType"))));
+                                 boost::bind(&std::pair<OUString, OUString>::first, _1),
+                                 OUString("shapeType"))));
 
     if (iter == rShape.aProperties.end())
     {
@@ -246,7 +245,8 @@ int RTFSdrImport::initShape(
             nType = ESCHER_ShpInst_Rectangle;
         }
         else
-        {   // pict is picture by default but can be a rectangle too fdo#79319
+        {
+            // pict is picture by default but can be a rectangle too fdo#79319
             nType = ESCHER_ShpInst_PictureFrame;
         }
     }
@@ -289,8 +289,7 @@ int RTFSdrImport::initShape(
     // Defaults
     if (o_xPropSet.is() && !m_bTextFrame)
     {
-        o_xPropSet->setPropertyValue("FillColor", uno::makeAny(sal_uInt32(
-                        0xffffff))); // White in Word, kind of blue in Writer.
+        o_xPropSet->setPropertyValue("FillColor", uno::makeAny(sal_uInt32(0xffffff))); // White in Word, kind of blue in Writer.
     }
 
     return nType;
@@ -327,8 +326,7 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
     sal_Int16 nRelativeHeightRelation = text::RelOrientation::PAGE_FRAME;
 
     bool bCustom(false);
-    int const nType =
-        initShape(xShape, xPropertySet, bCustom, rShape, bClose, shapeOrPict);
+    int const nType = initShape(xShape, xPropertySet, bCustom, rShape, bClose, shapeOrPict);
 
     for (std::vector< std::pair<OUString, OUString> >::iterator i = rShape.aProperties.begin();
             i != rShape.aProperties.end(); ++i)
@@ -660,7 +658,8 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
             }
         }
         else if (i->first == "fHorizRule") // TODO: what does "fStandardHR" do?
-        {   // horizontal rule: relative width defaults to 100% of paragraph
+        {
+            // horizontal rule: relative width defaults to 100% of paragraph
             // TODO: does it have a default height?
             if (!oRelativeWidth)
             {
@@ -674,33 +673,37 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
             }
         }
         else if (i->first == "pctHR")
-        {   // horizontal rule relative width in permille
+        {
+            // horizontal rule relative width in permille
             oRelativeWidth = i->second.toInt32() / 10;
         }
         else if (i->first == "dxHeightHR")
-        {   // horizontal rule height
+        {
+            // horizontal rule height
             sal_uInt32 const nHeight(convertTwipToMm100(i->second.toInt32()));
             rShape.nBottom = rShape.nTop + nHeight;
         }
         else if (i->first == "dxWidthHR")
-        {   // horizontal rule width
+        {
+            // horizontal rule width
             sal_uInt32 const nWidth(convertTwipToMm100(i->second.toInt32()));
             rShape.nRight = rShape.nLeft + nWidth;
         }
         else if (i->first == "alignHR")
-        {   // horizontal orientation *for horizontal rule*
+        {
+            // horizontal orientation *for horizontal rule*
             sal_Int16 nHoriOrient = text::HoriOrientation::NONE;
             switch (i->second.toInt32())
             {
-                case 0:
-                    nHoriOrient = text::HoriOrientation::LEFT;
-                    break;
-                case 1:
-                    nHoriOrient = text::HoriOrientation::CENTER;
-                    break;
-                case 2:
-                    nHoriOrient = text::HoriOrientation::RIGHT;
-                    break;
+            case 0:
+                nHoriOrient = text::HoriOrientation::LEFT;
+                break;
+            case 1:
+                nHoriOrient = text::HoriOrientation::CENTER;
+                break;
+            case 2:
+                nHoriOrient = text::HoriOrientation::RIGHT;
+                break;
             }
             if (xPropertySet.is() && text::HoriOrientation::NONE != nHoriOrient)
             {
diff --git a/writerfilter/source/rtftok/rtfsdrimport.hxx b/writerfilter/source/rtftok/rtfsdrimport.hxx
index 1c5ebe7..5b1ddd8 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.hxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.hxx
@@ -47,15 +47,17 @@ public:
     {
         return m_xShape;
     }
-    bool isFakePict() { return m_bFakePict; }
+    bool isFakePict()
+    {
+        return m_bFakePict;
+    }
 private:
     void createShape(const OUString& aService, css::uno::Reference<css::drawing::XShape>& xShape, css::uno::Reference<css::beans::XPropertySet>& xPropertySet);
     void applyProperty(css::uno::Reference<css::drawing::XShape> xShape, const OUString& aKey, const OUString& aValue);
-    int initShape(
-        css::uno::Reference<css::drawing::XShape> & o_xShape,
-        css::uno::Reference<css::beans::XPropertySet> & o_xPropSet,
-        bool & o_rIsCustomShape,
-        RTFShape const& rShape, bool bClose, ShapeOrPict const shapeOrPict);
+    int initShape(css::uno::Reference<css::drawing::XShape>& o_xShape,
+                  css::uno::Reference<css::beans::XPropertySet>& o_xPropSet,
+                  bool& o_rIsCustomShape,
+                  RTFShape const& rShape, bool bClose, ShapeOrPict const shapeOrPict);
 
     RTFDocumentImpl& m_rImport;
     std::stack< css::uno::Reference<css::drawing::XShapes> > m_aParents;


More information about the Libreoffice-commits mailing list