Issue 110015 - UserField property IsFieldDisplayed gives wrong values
Summary: UserField property IsFieldDisplayed gives wrong values
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 3.2
Hardware: All Windows XP
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-10 13:33 UTC by eberlein
Modified: 2017-05-20 11:15 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
file to reproduce (10.42 KB, application/vnd.oasis.opendocument.text)
2010-03-10 13:33 UTC, eberlein
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
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".