Kaydet (Commit) d9c4aa38 authored tarafından Michael Stahl's avatar Michael Stahl

writerfilter: pass uno::Reference by reference in RTFSdrImport

Change-Id: I3a0821caccc37beb37f4ad8ecb4b0fdb5d2d5a58
üst 2354d22b
...@@ -114,7 +114,7 @@ std::vector<beans::PropertyValue> RTFSdrImport::getTextFrameDefaults(bool bNew) ...@@ -114,7 +114,7 @@ std::vector<beans::PropertyValue> RTFSdrImport::getTextFrameDefaults(bool bNew)
return aRet; return aRet;
} }
void RTFSdrImport::pushParent(uno::Reference<drawing::XShapes> xParent) void RTFSdrImport::pushParent(uno::Reference<drawing::XShapes> const& xParent)
{ {
m_aParents.push(xParent); m_aParents.push(xParent);
} }
...@@ -124,7 +124,8 @@ void RTFSdrImport::popParent() ...@@ -124,7 +124,8 @@ void RTFSdrImport::popParent()
m_aParents.pop(); m_aParents.pop();
} }
void RTFSdrImport::resolveDhgt(uno::Reference<beans::XPropertySet> xPropertySet, sal_Int32 nZOrder, bool bOldStyle) void RTFSdrImport::resolveDhgt(uno::Reference<beans::XPropertySet> const& xPropertySet,
sal_Int32 const nZOrder, bool const bOldStyle)
{ {
writerfilter::dmapper::DomainMapper& rMapper = writerfilter::dmapper::DomainMapper& rMapper =
dynamic_cast<writerfilter::dmapper::DomainMapper&>(m_rImport.Mapper()); dynamic_cast<writerfilter::dmapper::DomainMapper&>(m_rImport.Mapper());
...@@ -133,13 +134,15 @@ void RTFSdrImport::resolveDhgt(uno::Reference<beans::XPropertySet> xPropertySet, ...@@ -133,13 +134,15 @@ void RTFSdrImport::resolveDhgt(uno::Reference<beans::XPropertySet> xPropertySet,
pHelper->addItem(xPropertySet, nZOrder); pHelper->addItem(xPropertySet, nZOrder);
} }
void RTFSdrImport::resolveFLine(uno::Reference<beans::XPropertySet> xPropertySet, sal_Int32 nFLine) void RTFSdrImport::resolveFLine(uno::Reference<beans::XPropertySet> const& xPropertySet,
sal_Int32 const nFLine)
{ {
if (nFLine == 0) if (nFLine == 0)
xPropertySet->setPropertyValue("LineStyle", uno::makeAny(drawing::LineStyle_NONE)); xPropertySet->setPropertyValue("LineStyle", uno::makeAny(drawing::LineStyle_NONE));
} }
void RTFSdrImport::applyProperty(uno::Reference<drawing::XShape> xShape, const OUString& aKey, const OUString& aValue) void RTFSdrImport::applyProperty(uno::Reference<drawing::XShape> const& xShape,
const OUString& aKey, const OUString& aValue)
{ {
uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
sal_Int16 nHoriOrient = 0; sal_Int16 nHoriOrient = 0;
......
...@@ -31,8 +31,8 @@ public: ...@@ -31,8 +31,8 @@ public:
void append(const OUString& aKey, const OUString& aValue); void append(const OUString& aKey, const OUString& aValue);
/// Append property on the current parent. /// Append property on the current parent.
void appendGroupProperty(const OUString& aKey, const OUString& aValue); void appendGroupProperty(const OUString& aKey, const OUString& aValue);
void resolveDhgt(css::uno::Reference<css::beans::XPropertySet> xPropertySet, sal_Int32 nZOrder, bool bOldStyle); void resolveDhgt(css::uno::Reference<css::beans::XPropertySet> const& xPropertySet, sal_Int32 nZOrder, bool bOldStyle);
void resolveFLine(css::uno::Reference<css::beans::XPropertySet> xPropertySet, sal_Int32 nFLine); void resolveFLine(css::uno::Reference<css::beans::XPropertySet> const& xPropertySet, sal_Int32 nFLine);
/** /**
* These are the default in Word, but not in Writer. * These are the default in Word, but not in Writer.
* *
...@@ -40,7 +40,7 @@ public: ...@@ -40,7 +40,7 @@ public:
*/ */
std::vector<css::beans::PropertyValue> getTextFrameDefaults(bool bNew); std::vector<css::beans::PropertyValue> getTextFrameDefaults(bool bNew);
/// Push a new group shape to the parent stack. /// Push a new group shape to the parent stack.
void pushParent(css::uno::Reference<css::drawing::XShapes> xParent); void pushParent(css::uno::Reference<css::drawing::XShapes> const& xParent);
/// Pop the current group shape from the parent stack. /// Pop the current group shape from the parent stack.
void popParent(); void popParent();
css::uno::Reference<css::drawing::XShape> const& getCurrentShape() css::uno::Reference<css::drawing::XShape> const& getCurrentShape()
...@@ -53,7 +53,7 @@ public: ...@@ -53,7 +53,7 @@ public:
} }
private: private:
void createShape(const OUString& aService, css::uno::Reference<css::drawing::XShape>& xShape, css::uno::Reference<css::beans::XPropertySet>& xPropertySet); 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); void applyProperty(css::uno::Reference<css::drawing::XShape> const& xShape, const OUString& aKey, const OUString& aValue);
int initShape(css::uno::Reference<css::drawing::XShape>& o_xShape, int initShape(css::uno::Reference<css::drawing::XShape>& o_xShape,
css::uno::Reference<css::beans::XPropertySet>& o_xPropSet, css::uno::Reference<css::beans::XPropertySet>& o_xPropSet,
bool& o_rIsCustomShape, bool& o_rIsCustomShape,
...@@ -70,6 +70,6 @@ private: ...@@ -70,6 +70,6 @@ private:
} // namespace rtftok } // namespace rtftok
} // namespace writerfilter } // namespace writerfilter
#endif // _RTFSDRIPORT_HXX_ #endif // INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFSDRIMPORT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment