sfx2/inc/SfxRedactionHelper.hxx        |    3 +--
 sfx2/source/doc/SfxRedactionHelper.cxx |   13 +++----------
 2 files changed, 4 insertions(+), 12 deletions(-)

New commits:
commit 21f017a95b56a86a73e2712903141b069f55d939
Author:     Karthik <[email protected]>
AuthorDate: Tue Aug 19 14:22:46 2025 +0530
Commit:     Michael Stahl <[email protected]>
CommitDate: Mon Oct 27 18:15:11 2025 +0100

    tdf#139331 Bug fix related to "Auto-Redact"
    
    Change-Id: I407239568fb7da948fe582f04673d4ef1b638b47
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189901
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Jenkins

diff --git a/sfx2/inc/SfxRedactionHelper.hxx b/sfx2/inc/SfxRedactionHelper.hxx
index a2d942f76628..c30593235014 100644
--- a/sfx2/inc/SfxRedactionHelper.hxx
+++ b/sfx2/inc/SfxRedactionHelper.hxx
@@ -110,8 +110,7 @@ public:
      * areas to be redacted.
      * */
     static void searchImagesInMetaFile(const GDIMetaFile& rMtf,
-                                       std::vector<tools::Rectangle>& 
aRedactionRectangles,
-                                       const uno::Reference<XComponent>& 
xComponent);
+                                       std::vector<tools::Rectangle>& 
aRedactionRectangles);
 
     /*
      * Draws a redaction rectangle on the draw page referenced with its page 
number (0-based)
diff --git a/sfx2/source/doc/SfxRedactionHelper.cxx 
b/sfx2/source/doc/SfxRedactionHelper.cxx
index 4b748bb55e95..92fca5eec366 100644
--- a/sfx2/source/doc/SfxRedactionHelper.cxx
+++ b/sfx2/source/doc/SfxRedactionHelper.cxx
@@ -419,7 +419,7 @@ void SfxRedactionHelper::searchInMetaFile(const 
RedactionTarget& rRedactionTarge
 {
     if (rRedactionTarget.sType == RedactionTargetType::REDACTION_TARGET_IMAGE)
     {
-        searchImagesInMetaFile(rMtf, aRedactionRectangles, xComponent);
+        searchImagesInMetaFile(rMtf, aRedactionRectangles);
         return;
     }
 
@@ -483,16 +483,9 @@ void SfxRedactionHelper::searchInMetaFile(const 
RedactionTarget& rRedactionTarge
 }
 
 void SfxRedactionHelper::searchImagesInMetaFile(
-    const GDIMetaFile& rMtf, std::vector<::tools::Rectangle>& 
aRedactionRectangles,
-    const uno::Reference<XComponent>& xComponent)
+    const GDIMetaFile& rMtf, std::vector<::tools::Rectangle>& 
aRedactionRectangles)
 {
-    OutputDevice* pOutputDevice
-        = 
SfxObjectShell::GetShellFromComponent(xComponent)->GetDocumentRefDev();
-    pOutputDevice->Push(::vcl::PushFlags::ALL);
-
-    MetaAction* pCurrAct;
-
-    for (pCurrAct = const_cast<GDIMetaFile&>(rMtf).FirstAction(); pCurrAct;
+    for (MetaAction* pCurrAct = const_cast<GDIMetaFile&>(rMtf).FirstAction(); 
pCurrAct;
          pCurrAct = const_cast<GDIMetaFile&>(rMtf).NextAction())
     {
         tools::Rectangle aImageRect;

Reply via email to