diff options
author | Noel Grandin <noel@peralex.com> | 2014-06-18 12:14:29 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-06-24 11:34:21 +0200 |
commit | e2080e70fe8b085f18e868e46340454720fa94ca (patch) | |
tree | 4038d1d57b41b68a47d5ebbbe6ad390648ec6303 /xmloff | |
parent | f910280b8704ed9c289150a4ca3c8d60e15d0d97 (diff) |
new compilerplugin returnbyref
Find places where we are returning a pointer to something, where we can
be returning a reference.
e.g.
class A {
struct X x;
public X* getX() { return &x; }
}
which can be:
public X& getX() { return x; }
Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 108fe8ea53f1..f02a6951092e 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -183,8 +183,8 @@ namespace }; BoundFrames() {}; - const TextContentSet* GetPageBoundContents() const - { return &m_vPageBounds; }; + const TextContentSet& GetPageBoundContents() const + { return m_vPageBounds; }; const TextContentSet* GetFrameBoundContents(const Reference<XTextFrame>& rParentFrame) const { framebound_map_t::const_iterator it = m_vFrameBoundsOf.find(rParentFrame); @@ -1387,24 +1387,24 @@ SvXMLExportPropertyMapper *XMLTextParagraphExport::CreateParaDefaultExtPropMappe void XMLTextParagraphExport::exportPageFrames( bool bAutoStyles, bool bIsProgress ) { - const TextContentSet* const pTexts = pBoundFrameSets->GetTexts()->GetPageBoundContents(); - const TextContentSet* const pGraphics = pBoundFrameSets->GetGraphics()->GetPageBoundContents(); - const TextContentSet* const pEmbeddeds = pBoundFrameSets->GetEmbeddeds()->GetPageBoundContents(); - const TextContentSet* const pShapes = pBoundFrameSets->GetShapes()->GetPageBoundContents(); - for(TextContentSet::const_iterator_t it = pTexts->getBegin(); - it != pTexts->getEnd(); + const TextContentSet& rTexts = pBoundFrameSets->GetTexts()->GetPageBoundContents(); + const TextContentSet& rGraphics = pBoundFrameSets->GetGraphics()->GetPageBoundContents(); + const TextContentSet& rEmbeddeds = pBoundFrameSets->GetEmbeddeds()->GetPageBoundContents(); + const TextContentSet& rShapes = pBoundFrameSets->GetShapes()->GetPageBoundContents(); + for(TextContentSet::const_iterator_t it = rTexts.getBegin(); + it != rTexts.getEnd(); ++it) exportTextFrame(*it, bAutoStyles, bIsProgress, true); - for(TextContentSet::const_iterator_t it = pGraphics->getBegin(); - it != pGraphics->getEnd(); + for(TextContentSet::const_iterator_t it = rGraphics.getBegin(); + it != rGraphics.getEnd(); ++it) exportTextGraphic(*it, bAutoStyles); - for(TextContentSet::const_iterator_t it = pEmbeddeds->getBegin(); - it != pEmbeddeds->getEnd(); + for(TextContentSet::const_iterator_t it = rEmbeddeds.getBegin(); + it != rEmbeddeds.getEnd(); ++it) exportTextEmbedded(*it, bAutoStyles); - for(TextContentSet::const_iterator_t it = pShapes->getBegin(); - it != pShapes->getEnd(); + for(TextContentSet::const_iterator_t it = rShapes.getBegin(); + it != rShapes.getEnd(); ++it) exportShape(*it, bAutoStyles); } |