diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-06-14 11:24:39 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-06-14 11:38:32 +0200 |
commit | b577c99adca2e4c2f506cb9107a6d4489f5a2744 (patch) | |
tree | 5b80ba9e195f360c6ea09bb77da306d4c139ee75 /writerfilter | |
parent | 57b563273351c5d3eb176ba8768b173853b7e362 (diff) |
sw, writerfilter: identation fixes
Change-Id: I1f1db08447006515e7e6842792241aca992984c0
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/SdtHelper.hxx | 5 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 20 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.hxx | 5 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtflookahead.hxx | 5 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfsdrimport.cxx | 19 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfsdrimport.hxx | 4 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtftokenizer.hxx | 10 |
7 files changed, 40 insertions, 28 deletions
diff --git a/writerfilter/source/dmapper/SdtHelper.hxx b/writerfilter/source/dmapper/SdtHelper.hxx index 9472c714d845..b9d9cdf2462a 100644 --- a/writerfilter/source/dmapper/SdtHelper.hxx +++ b/writerfilter/source/dmapper/SdtHelper.hxx @@ -75,7 +75,10 @@ public: OUStringBuffer& getDateFormat(); OUStringBuffer& getLocale(); /// If createControlShape() was ever called. - bool hasElements() { return m_bHasElements;} + bool hasElements() + { + return m_bHasElements; + } /// Create drop-down control from w:sdt's w:dropDownList. void createDropDownControl(); diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 5f6743277c31..d8ccd492ed82 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -780,14 +780,11 @@ int RTFDocumentImpl::resolvePict(bool bInline) else { if (m_xModelFactory.is()) - xShape.set(m_xModelFactory->createInstance( - "com.sun.star.drawing.GraphicObjectShape"), uno::UNO_QUERY); - uno::Reference<drawing::XDrawPageSupplier> const xDrawSupplier( - m_xDstDoc, uno::UNO_QUERY); + xShape.set(m_xModelFactory->createInstance("com.sun.star.drawing.GraphicObjectShape"), uno::UNO_QUERY); + uno::Reference<drawing::XDrawPageSupplier> const xDrawSupplier(m_xDstDoc, uno::UNO_QUERY); if (xDrawSupplier.is()) { - uno::Reference<drawing::XShapes> xShapes( - xDrawSupplier->getDrawPage(), uno::UNO_QUERY); + uno::Reference<drawing::XShapes> xShapes(xDrawSupplier->getDrawPage(), uno::UNO_QUERY); if (xShapes.is()) xShapes->add(xShape); } @@ -1427,8 +1424,7 @@ void RTFDocumentImpl::replayBuffer(RTFBuffer_t& rBuffer, else if (boost::get<0>(aTuple) == BUFFER_PAR) parBreak(); else if (boost::get<0>(aTuple) == BUFFER_STARTSHAPE) - m_pSdrImport->resolve(boost::get<1>(aTuple)->getShape(), false, - RTFSdrImport::SHAPE); + m_pSdrImport->resolve(boost::get<1>(aTuple)->getShape(), false, RTFSdrImport::SHAPE); else if (boost::get<0>(aTuple) == BUFFER_ENDSHAPE) m_pSdrImport->close(); else @@ -1714,8 +1710,7 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword) if (nKeyword == RTF_SHPTXT) { if (!m_aStates.top().pCurrentBuffer) - m_pSdrImport->resolve(m_aStates.top().aShape, false, - RTFSdrImport::SHAPE); + m_pSdrImport->resolve(m_aStates.top().aShape, false, RTFSdrImport::SHAPE); else { RTFValue::Pointer_t pValue(new RTFValue(m_aStates.top().aShape)); @@ -4853,9 +4848,8 @@ int RTFDocumentImpl::popState() // Don't trigger a shape import in case we're only leaving the \shpinst of the groupshape itself. if (!m_bObject && !aState.bInListpicture && !aState.bHadShapeText && !(aState.bInShapeGroup && !aState.bInShape)) { - m_pSdrImport->resolve(m_aStates.top().aShape, true, - (aState.nDestinationState == DESTINATION_SHAPEINSTRUCTION) - ? RTFSdrImport::SHAPE : RTFSdrImport::PICT); + RTFSdrImport::ShapeOrPict eType = (aState.nDestinationState == DESTINATION_SHAPEINSTRUCTION) ? RTFSdrImport::SHAPE : RTFSdrImport::PICT; + m_pSdrImport->resolve(m_aStates.top().aShape, true, eType); } else if (aState.bInShapeGroup && !aState.bInShape) { diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index 2f73a8fa288d..d4007421c621 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -361,7 +361,10 @@ public: /// If this is the first run of the document, starts the initial paragraph. void checkFirstRun(); /// If the initial paragraph is started. - bool getFirstRun() { return m_bFirstRun;} + bool getFirstRun() + { + return m_bFirstRun; + } /// If we need to add a dummy paragraph before a section break. void setNeedPar(bool bNeedPar); /// Return the dmapper index of an RTF index for fonts. diff --git a/writerfilter/source/rtftok/rtflookahead.hxx b/writerfilter/source/rtftok/rtflookahead.hxx index 682878cba506..2f5fed1bcab8 100644 --- a/writerfilter/source/rtftok/rtflookahead.hxx +++ b/writerfilter/source/rtftok/rtflookahead.hxx @@ -44,7 +44,10 @@ public: virtual void setSkipUnknown(bool bSkipUnknown) SAL_OVERRIDE; virtual void finishSubstream() SAL_OVERRIDE; virtual bool isSubstream() const SAL_OVERRIDE; - bool hasTable() { return m_bHasTable;} + bool hasTable() + { + return m_bHasTable; + } private: boost::shared_ptr<RTFTokenizer> m_pTokenizer; SvStream& m_rStream; diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx index a47731d9c7a0..05c4e12a95c0 100644 --- a/writerfilter/source/rtftok/rtfsdrimport.cxx +++ b/writerfilter/source/rtftok/rtfsdrimport.cxx @@ -215,8 +215,7 @@ void RTFSdrImport::applyProperty(uno::Reference<drawing::XShape> xShape, const O } } -void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, - ShapeOrPict const shapeOrPict) +void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shapeOrPict) { int nType = -1; bool bPib = false; @@ -253,13 +252,15 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, sal_Int16 nRelativeWidthRelation = text::RelOrientation::PAGE_FRAME; sal_Int16 nRelativeHeightRelation = text::RelOrientation::PAGE_FRAME; - // The spec doesn't state what is the default for shapeType, Word seems to implement it as a rectangle. - if (SHAPE == shapeOrPict && - std::find_if(rShape.aProperties.begin(), - rShape.aProperties.end(), - boost::bind(&OUString::equals, boost::bind(&std::pair<OUString, OUString>::first, _1), OUString("shapeType"))) - == rShape.aProperties.end()) - rShape.aProperties.insert(rShape.aProperties.begin(), std::pair<OUString, OUString>("shapeType", OUString::number(ESCHER_ShpInst_Rectangle))); + if (SHAPE == shapeOrPict) + { + // The spec doesn't state what is the default for shapeType, Word seems to implement it as a rectangle. + if (std::find_if(rShape.aProperties.begin(), + rShape.aProperties.end(), + boost::bind(&OUString::equals, boost::bind(&std::pair<OUString, OUString>::first, _1), OUString("shapeType"))) + == rShape.aProperties.end()) + rShape.aProperties.insert(rShape.aProperties.begin(), std::pair<OUString, OUString>("shapeType", OUString::number(ESCHER_ShpInst_Rectangle))); + } for (std::vector< std::pair<OUString, OUString> >::iterator i = rShape.aProperties.begin(); i != rShape.aProperties.end(); ++i) diff --git a/writerfilter/source/rtftok/rtfsdrimport.hxx b/writerfilter/source/rtftok/rtfsdrimport.hxx index 0b6958993bb2..5cf8fa4dff60 100644 --- a/writerfilter/source/rtftok/rtfsdrimport.hxx +++ b/writerfilter/source/rtftok/rtfsdrimport.hxx @@ -44,7 +44,9 @@ public: /// Pop the current group shape from the parent stack. void popParent(); css::uno::Reference<css::drawing::XShape> const& getCurrentShape() - { return m_xShape; } + { + return m_xShape; + } 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); diff --git a/writerfilter/source/rtftok/rtftokenizer.hxx b/writerfilter/source/rtftok/rtftokenizer.hxx index 36be2b526854..b2ce73b77646 100644 --- a/writerfilter/source/rtftok/rtftokenizer.hxx +++ b/writerfilter/source/rtftok/rtftokenizer.hxx @@ -29,13 +29,19 @@ public: int resolveParse(); int asHex(char ch); /// Number of states on the stack. - int getGroup() const { return m_nGroup;} + int getGroup() const + { + return m_nGroup; + } /// To be invoked by the pushState() callback to signal when the importer enters a group. void pushGroup(); /// To be invoked by the popState() callback to single when the importer leaves a group. void popGroup(); OUString getPosition(); - sal_Size getGroupStart() { return m_nGroupStart;} + sal_Size getGroupStart() + { + return m_nGroupStart; + } /// To look up additional properties of a math symbol. static bool lookupMathKeyword(RTFMathSymbol& rSymbol); private: |