sd/source/filter/html/htmlex.cxx       |   16 ++++++++--------
 sd/source/filter/html/htmlex.hxx       |    4 ++--
 sd/source/filter/html/sdhtmlfilter.cxx |    2 +-
 3 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 3f48ca0059e80ee71917973b9d71aa8867b6fdf5
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Thu May 15 12:20:00 2025 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu May 15 14:24:20 2025 +0200

    HtmlExport: pass SdDrawDocument by ref
    
    Change-Id: I9e6579cad6c0b4b72f1f4a20ce11b507299adee9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185355
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index fb9a276c58e7..d104cfd30a73 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -632,19 +632,19 @@ constexpr OUStringLiteral gaHTMLHeader(
 // constructor for the html export helper classes
 HtmlExport::HtmlExport(
     OUString aPath,
-    SdDrawDocument* pExpDoc,
+    SdDrawDocument& rExpDoc,
     sd::DrawDocShell* pDocShell )
     :   maPath(std::move( aPath )),
-        mpDoc(pExpDoc),
+        mrDoc(rExpDoc),
         mpDocSh( pDocShell )
 {
-    bool bChange = mpDoc->IsChanged();
+    bool bChange = mrDoc.IsChanged();
 
     Init();
 
     ExportSingleDocument();
 
-    mpDoc->SetChanged(bChange);
+    mrDoc.SetChanged(bChange);
 }
 
 HtmlExport::~HtmlExport()
@@ -653,7 +653,7 @@ HtmlExport::~HtmlExport()
 
 void HtmlExport::Init()
 {
-    SdPage* pPage = mpDoc->GetSdPage(0, PageKind::Standard);
+    SdPage* pPage = mrDoc.GetSdPage(0, PageKind::Standard);
 
     // we come up with a destination...
     INetURLObject aINetURLObj( maPath );
@@ -662,10 +662,10 @@ void HtmlExport::Init()
     maExportPath = aINetURLObj.GetPartBeforeLastName(); // with trailing '/'
     maIndex = aINetURLObj.GetLastName();
 
-    mnSdPageCount = mpDoc->GetSdPageCount( PageKind::Standard );
+    mnSdPageCount = mrDoc.GetSdPageCount( PageKind::Standard );
     for( sal_uInt16 nPage = 0; nPage < mnSdPageCount; nPage++ )
     {
-        pPage = mpDoc->GetSdPage( nPage, PageKind::Standard );
+        pPage = mrDoc.GetSdPage( nPage, PageKind::Standard );
 
         maPages.push_back( pPage );
     }
@@ -676,7 +676,7 @@ void HtmlExport::Init()
 
 void HtmlExport::ExportSingleDocument()
 {
-    SdrOutliner* pOutliner = mpDoc->GetInternalOutliner();
+    SdrOutliner* pOutliner = mrDoc.GetInternalOutliner();
 
     mnPagesWritten = 0;
     InitProgress(mnSdPageCount);
diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx
index 56737e86de66..b2251a1449eb 100644
--- a/sd/source/filter/html/htmlex.hxx
+++ b/sd/source/filter/html/htmlex.hxx
@@ -44,7 +44,7 @@ class HtmlExport final
 
     OUString maPath;
 
-    SdDrawDocument* mpDoc;
+    SdDrawDocument& mrDoc;
     ::sd::DrawDocShell* mpDocSh;
 
     std::unique_ptr<SfxProgress> mpProgress;
@@ -68,7 +68,7 @@ class HtmlExport final
 
  public:
     HtmlExport(OUString aPath,
-               SdDrawDocument* pExpDoc,
+               SdDrawDocument& rExpDoc,
                sd::DrawDocShell* pDocShell);
 
     ~HtmlExport();
diff --git a/sd/source/filter/html/sdhtmlfilter.cxx 
b/sd/source/filter/html/sdhtmlfilter.cxx
index 57053e6b8b23..5bdc4f9ee833 100644
--- a/sd/source/filter/html/sdhtmlfilter.cxx
+++ b/sd/source/filter/html/sdhtmlfilter.cxx
@@ -36,7 +36,7 @@ bool SdHTMLFilter::Export()
     mrMedium.Close();
     mrMedium.Commit();
 
-    HtmlExport aExport(mrMedium.GetName(), &mrDocument, &mrDocShell);
+    HtmlExport aExport(mrMedium.GetName(), mrDocument, &mrDocShell);
 
     return true;
 }

Reply via email to