Issue 110015

Summary: UserField property IsFieldDisplayed gives wrong values
Product: Writer Reporter: eberlein <pet.ebe>
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues
Version: OOo 3.2   
Target Milestone: ---   
Hardware: All   
OS: Windows XP   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
file to reproduce none

Description eberlein 2010-03-10 13:33:02 UTC
If hidden formatted text locates in the same paragraph as a userfield, the
XProperty "IsFieldDisplayed" always returns false.

This makes this property unusable for extensions.

To reproduce, see the attached doc.
Comment 1 eberlein 2010-03-10 13:33:39 UTC
Created attachment 68272 [details]
file to reproduce
Comment 2 eric.savary 2010-03-10 13:42:31 UTC
Reassigned to JSK
Comment 3 hans_werner67 2011-03-28 11:57:36 UTC
Assign to new default-assignee
Comment 4 eric.savary 2011-04-11 07:21:26 UTC
Reassigned to TBO.
Comment 5 b.osi.ooo 2011-04-11 15:08:22 UTC
I set default formating to make all visible on paragraph: result is true.
Then just setting the first test-characters to hidden, result is again false.
->confirmed; OS?
Code from Makro:
Sub Main

	xFieldMasters = ThisComponent.getTextFieldMasters()
	if (xFieldMasters.hasByName("com.sun.star.text.FieldMaster.User.A")) then
	
		xFieldMaster = xFieldMasters.getByName("com.sun.star.text.FieldMaster.User.A")
		xDependentTextFields =xFieldMaster.DependentTextFields
		
		For i = lBound(xDependentTextFields()) to uBound(xDependentTextFields())
			xField = xDependentTextFields(i)
			msgBox "Field is displayed: " & cBool( xField.isFieldDisplayed )
		next
		
	End If
	
	
End Sub
Comment 6 Oliver Specht 2011-04-12 06:40:19 UTC
The problem seems to be in SwScriptInfo::GetBoundsOfHiddenRange(...)
Comment 7 Marcus 2017-05-20 11:15:27 UTC
Reset assigne to the default "issues@openoffice.apache.org".