Created attachment 153668 [details] Input ODT - Open the attached simple document. - Open Tools -> Auto-Redact (you might have to add via Tools -> Customize before bug 127163's fix). - Add a Target with type Text and Content "lorem". - Add a Target with type Text and Content "ipsum". - Press OK to start redaction. => Note how the title ("Lorem ipsum") isn't completely covered. Observed using LO 6.4.0.0.alpha0+ (d3d13140f0036c53aa74820b41acfeffa3572168 ) / Windows 7.
Created attachment 153669 [details] PDF output from redaction Here's the PDF output from redaction (not the white/black one).
Hi Muhammet, are you still working on this issue ?
(In reply to Xisco Faulí from comment #2) > Hi Muhammet, > are you still working on this issue ? Busy with other work at the moment. Changing to new until I get the time to do it. If someone likes to take it in the meantime, here are some dev notes / code pointers: SfxRedactionHelper::searchInMetaFile() is the source of this issue. Especially this part: // If found the string, add the corresponding rectangle to the collection while (bFound) { OutputDevice* pOutputDevice = SfxObjectShell::GetShellFromComponent(xComponent)->GetDocumentRefDev(); tools::Rectangle aNewRect( ImplCalcActionBounds(*pMetaTextArrayAction, *pOutputDevice, nStart, nEnd)); if (!aNewRect.IsEmpty()) aRedactionRectangles.push_back(aNewRect); // Search for the next occurence nStart = nEnd; nEnd = sText.getLength(); bFound = textSearch.SearchForward(sText, &nStart, &nEnd); } The problem is aNewRect, created by ImplCalcActionBounds does have the correct width, but incorrect height. So looking the ImplCalcActionBounds() method is what you actually need to fix. The source file: sfx2/source/doc/SfxRedactionHelper.cxx Header file: sfx2/inc/SfxRedactionHelper.hxx
Onur Yilmaz committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/0025b74e8099ed79e7824a8d22335e882e0c635c tdf#127169: Auto-redaction doesn't cover the title completely It will be available in 6.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.