include/xmloff/txtparae.hxx     |    2 +-
 xmloff/source/text/txtparae.cxx |   14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 7d6e1eccf742664fc7487f1b73ac233e1d2674d3
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Apr 14 17:00:27 2023 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sat Apr 15 20:52:24 2023 +0200

    just use a reference instead of an always dereferenced pointer
    
    Change-Id: I105873fc890d67b39b796864f8eae4bd12aecd26
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150425
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx
index 5314a85c0cb2..36d554be2a20 100644
--- a/include/xmloff/txtparae.hxx
+++ b/include/xmloff/txtparae.hxx
@@ -206,7 +206,7 @@ protected:
 
     void exportPageFrames( bool bProgress );
     void exportFrameFrames( bool bAutoStyles, bool bProgress,
-            const css::uno::Reference< css::text::XTextFrame > 
*pParentTxtFrame );
+            const css::uno::Reference< css::text::XTextFrame >& 
rParentTxtFrame );
 
     void exportNumStyles( bool bUsed );
 
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 5ae853b239ab..aaf47ddd4b71 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -1498,27 +1498,27 @@ void XMLTextParagraphExport::exportPageFrames( bool 
bIsProgress )
 void XMLTextParagraphExport::exportFrameFrames(
         bool bAutoStyles,
         bool bIsProgress,
-        const Reference < XTextFrame > *pParentTxtFrame )
+        const Reference < XTextFrame >& rParentTxtFrame )
 {
-    const TextContentSet* const pTexts = 
m_pBoundFrameSets->GetTexts()->GetFrameBoundContents(*pParentTxtFrame);
+    const TextContentSet* const pTexts = 
m_pBoundFrameSets->GetTexts()->GetFrameBoundContents(rParentTxtFrame);
     if(pTexts)
         for(TextContentSet::const_iterator_t it = pTexts->getBegin();
             it != pTexts->getEnd();
             ++it)
             exportTextFrame(*it, bAutoStyles, bIsProgress, true);
-    const TextContentSet* const pGraphics = 
m_pBoundFrameSets->GetGraphics()->GetFrameBoundContents(*pParentTxtFrame);
+    const TextContentSet* const pGraphics = 
m_pBoundFrameSets->GetGraphics()->GetFrameBoundContents(rParentTxtFrame);
     if(pGraphics)
         for(TextContentSet::const_iterator_t it = pGraphics->getBegin();
             it != pGraphics->getEnd();
             ++it)
             exportTextGraphic(*it, bAutoStyles);
-    const TextContentSet* const pEmbeddeds = 
m_pBoundFrameSets->GetEmbeddeds()->GetFrameBoundContents(*pParentTxtFrame);
+    const TextContentSet* const pEmbeddeds = 
m_pBoundFrameSets->GetEmbeddeds()->GetFrameBoundContents(rParentTxtFrame);
     if(pEmbeddeds)
         for(TextContentSet::const_iterator_t it = pEmbeddeds->getBegin();
             it != pEmbeddeds->getEnd();
             ++it)
             exportTextEmbedded(*it, bAutoStyles);
-    const TextContentSet* const pShapes = 
m_pBoundFrameSets->GetShapes()->GetFrameBoundContents(*pParentTxtFrame);
+    const TextContentSet* const pShapes = 
m_pBoundFrameSets->GetShapes()->GetFrameBoundContents(rParentTxtFrame);
     if(pShapes)
         for(TextContentSet::const_iterator_t it = pShapes->getBegin();
             it != pShapes->getEnd();
@@ -3055,7 +3055,7 @@ void XMLTextParagraphExport::exportAnyTextFrame(
                 {
                     Reference < XTextFrame > xTxtFrame( rTxtCntnt, UNO_QUERY );
                     Reference < XText > xTxt(xTxtFrame->getText());
-                    exportFrameFrames( true, bIsProgress, &xTxtFrame );
+                    exportFrameFrames( true, bIsProgress, xTxtFrame );
                     exportText( xTxt, bAutoStyles, bIsProgress, true );
                 }
             }
@@ -3185,7 +3185,7 @@ void XMLTextParagraphExport::_exportTextFrame(
                                   XML_TEXT_BOX, true, true );
 
         // frames bound to frame
-        exportFrameFrames( false, bIsProgress, &xTxtFrame );
+        exportFrameFrames( false, bIsProgress, xTxtFrame );
 
         exportText( xTxt, false, bIsProgress, true );
     }

Reply via email to