Bug 149632

Summary: fileopen missing image on docx
Product: LibreOffice Reporter: vis_qa <visqajin>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: aron.budea, kelemeng, michael.stahl, olegshtch, vmiklos, xiscofauli
Priority: medium Keywords: bibisected, bisected, regression
Version: 7.3.4.2 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=137469
https://bugs.documentfoundation.org/show_bug.cgi?id=104260
Whiteboard:
Crash report or crash signature: Regression By: Oleg Shchelykalnov
Bug Depends on:    
Bug Blocks: 104468    
Attachments: screenshot image 128646
strace log 128646 104260
simplifier document

Description vis_qa 2022-06-20 05:15:06 UTC
Created attachment 180842 [details]
screenshot image 128646

str:
open file: badge_kor_sablon.docx on bug #104260

observe:
missing image similar to file: Screenshot of the original document side by side in Word and Writer. on bug #128646

actual:
images appear

Version: 7.3.4.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 3.18; UI render: default; VCL: x11
Locale: en-US (C); UI: en-US
Debian package version: 1:7.3.4~rc2-1
Calc: threaded
Comment 1 vis_qa 2022-06-20 05:17:21 UTC
Created attachment 180843 [details]
strace log 128646 104260
Comment 2 Xisco Faulí 2022-06-20 09:30:28 UTC
I can't reproduce it in

Version: 7.4.0.0.beta1+ / LibreOffice Community
Build ID: cdf48e57da6b8a6a5eb4131340fa2c14be135714
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

Could you please explain where the missing image is? I can't see it in your screenshot
Comment 3 vis_qa 2022-06-20 09:51:14 UTC
hello  Xisco Faulí,

the missing image or logo is "MAGYARY PROGRAM" in all boxes and inverted half circles in box (top right corner box). the screenshot on bug #128646 contains logo/image.
Comment 4 Xisco Faulí 2022-06-20 10:25:01 UTC
(In reply to vis_qa from comment #3)
> hello  Xisco Faulí,
> 
> the missing image or logo is "MAGYARY PROGRAM" in all boxes and inverted
> half circles in box (top right corner box). the screenshot on bug #128646
> contains logo/image.

Indeed.
Regression introduced by

author	Oleg Shchelykalnov <olegshtch@yandex.ru>	2021-05-26 22:11:49 +0300
committer	Michael Stahl <michael.stahl@allotropia.de>	2021-06-09 11:10:01 +0200
commit b5e07b1339f73841664b28c65639f1638bd7edf4 (patch)
tree 05bf42cab6d53bfbbeda1eb54a04dcf85bb0cf1a
parent c96b61f86ef3f4cdc34f84043fed2724b6d9732b (diff)
tdf#137469 Implement and test excluding hidden text in text filter

Bisected with: bibisect-linux64-7.2
Comment 5 Xisco Faulí 2022-06-20 11:20:54 UTC
This is an interesting issue. In b5e07b1339f73841664b28c65639f1638bd7edf4 the condition

else if (!pNd->IsHidden() || bIncludeHidden)

was added, However, the issue is not reproduced if the condition is changed to

else if (bIncludeHidden || !pNd->IsHidden())

because pNd->IsHidden() is not called.

IsHidden() calls HasHiddenCharAttribute( true ), which calls CalcHiddenCharFlagsm which calls SwScriptInfo::GetBoundsOfHiddenRange with the comment "Update of the flags is done inside GetBoundsOfHiddenRange()"

@Miklos, @Michael S., is it expected that IsHidden() which returns a bool hides images?
Comment 6 Xisco Faulí 2022-06-20 11:44:37 UTC
Created attachment 180847 [details]
simplifier document
Comment 7 Miklos Vajna 2022-06-24 07:43:41 UTC
SwTextNode::IsHidden() calls HasHiddenCharAttribute(), which does some some caching behind the scenes, perhaps that goes wrong here?