Issue 120300 - PreventHelpTips is not documented in com.sun.star.text.ViewSettings
PreventHelpTips is not documented in com.sun.star.text.ViewSettings
Status: RESOLVED FIXED
Product: App Dev
Classification: Unclassified
Component: api
OOo 3.3 or older
All All
: P3 normal
: 4.0.0
Assigned To: Ariel Constenla-Haile
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-17 17:33 UTC by Ariel Constenla-Haile
Modified: 2013-07-21 10:47 UTC (History)
1 user (show)

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


Attachments
Patch to add ShowContentTips property to Writer's ViewSettings (17.62 KB, patch)
2012-07-18 03:28 UTC, Ariel Constenla-Haile
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Ariel Constenla-Haile 2012-07-17 17:33:38 UTC
Property "PreventHelpTips" is not documented in com.sun.star.text.ViewSettings


Sub Main
	Dim oDoc as Object
	Dim oController as Object
	oDoc = ThisComponent	
	oController = oDoc.getCurrentController()
	
	Dim oViewSettings as Object
	oViewSettings = oController.getViewSettings()
	
	Dim oPropInfo as Object
	oPropInfo = oViewSettings.getPropertySetInfo()
	
	If oPropInfo.hasPropertyByName("PreventHelpTips") Then
		'Toggle it
		Dim bPropVal as Boolean
		bPropVal = oViewSettings.getPropertyValue("PreventHelpTips")
		oViewSettings.setPropertyValue("PreventHelpTips", NOT bPropVal)
	End If	
End Sub
Comment 1 Ariel Constenla-Haile 2012-07-17 17:41:30 UTC
While we are at it, it seems it would be better to rename it to "PreventContentTips".

When true, this property prevents Writer from displaying a help balloon when the mouse if over a text content on the edit window, see

void SwEditWin::RequestHelp(const HelpEvent &rEvt)
main/sw/source/ui/docvw/edtwin2.cxx
Comment 2 Ariel Constenla-Haile 2012-07-18 03:23:57 UTC
(In reply to comment #1)
> While we are at it, it seems it would be better to rename it to
> "PreventContentTips".
> 
> When true, this property prevents Writer from displaying a help balloon when
> the mouse if over a text content on the edit window, see
> 
> void SwEditWin::RequestHelp(const HelpEvent &rEvt)
> main/sw/source/ui/docvw/edtwin2.cxx

In order to be consistent with the other ViewSettings, it is better to rename it to "ShowContentTips". This is change is rather safe because:

a) it is hardly used in the source code (only one time)
b) this property is undocumented, so it's likely that there is no client code using it
Comment 3 Ariel Constenla-Haile 2012-07-18 03:28:41 UTC
Created attachment 78673 [details]
Patch to add ShowContentTips property to Writer's ViewSettings

The patch 
- renames PreventTips to ShowContentTips in officecfg/registry/schema/org/openoffice/Office/Writer.xcs

- documents the property in the IDL definition offapi/com/sun/star/text/ViewSettings.idl

- changes functions names, enums and constants to be consistent with the new naming (binfilter, sw)

- adapts the code that uses PreventTips (sfx2)
Comment 4 SVN Robot 2012-07-19 23:32:35 UTC
"arielch" committed SVN revision 1363583 into trunk:
#i120300# - Add new property "ShowContentTips" in com.sun.star.text.ViewSettings
Comment 5 Ariel Constenla-Haile 2012-07-20 21:26:10 UTC
Fixed in trunk