OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

How to set/unset view "hidden text " in OOo 2.0

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
ecastro
Newbie
Newbie


Joined: 21 Mar 2005
Posts: 3

PostPosted: Mon Mar 28, 2005 10:21 am    Post subject: How to set/unset view "hidden text " in OOo 2.0 Reply with quote

Hi,
I am trying to use programmatically teh setting to view or hide "hidden text" in OO0 (NOT textfields).

I have used
Settings:ThisComponent.getCurrentController().ViewSettings
Settings.ShowHiddenText=false
Settings.ShowHiddenParagraphs=false

But those properties control the "Fields" hidden property

Alternatively, using
nodeArgs(0).Name = "nodePath"
nodeArgs(0).Value = "org.openoffice.Office.Writer/Content/NonprintingCharacter"
'nodeArgs(0).State = com.sun.star.beans.PropertyState.DEFAULT_VALUE
'nodeArgs(0).Handle = -1 'no handle!
Provider = createUnoService("com.sun.star.comp.configuration.ConfigurationProvider")
Service = "com.sun.star.configuration.ConfigurationUpdateAccess"
SettingAccess = Provider.createInstanceWithArguments(Service, nodeArgs())
's=SettingAccess.HiddenCharacter ' This is the treu setting
SettingAccess.HiddenCharacter=false
SettingAccess.commitChanges()

But SettingAccess.HiddenCharacter is readable, but commitChanges does NOT write it.

Is this my fault or a but in this development version?

TIA
- Enrique -
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Mon Mar 28, 2005 11:35 am    Post subject: Reply with quote

I am not that much into Writer, so I don't know if this is what you are looking for....

Over in this post
http://www.oooforum.org/forum/viewtopic.phtml?p=55947#55947

Does the "ShowHiddenText" property help you any?
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
ecastro
Newbie
Newbie


Joined: 21 Mar 2005
Posts: 3

PostPosted: Mon Mar 28, 2005 2:29 pm    Post subject: Reply with quote

Hi Danny,
thanks for answering. Unfortunately, that property do not control teh setting I need.

In OOo 1.1.x ther are two "hidden text" properties in ViewSettings.
oViewSettings.ShowHiddenParagraphs
oViewSettings.ShowHiddenText

Both contro the hiden/viisibel status for text in texfields.

But in OOo 2.0 ther is a new property fos teh text fon attributes: hidden text. That property is missing from ViewSettings

A HiiddenCharacter properti can be read from NonprintringCharacter ConfigurationProvider, but It seems that cannot be written.

I am beggining to think it is a bug in teh new release: just forgotten to update those properties.
Back to top
View user's profile Send private message
padrino121
General User
General User


Joined: 24 Feb 2005
Posts: 14

PostPosted: Thu May 05, 2005 6:28 pm    Post subject: Reply with quote

ecastro wrote:
Hi Danny,
thanks for answering. Unfortunately, that property do not control teh setting I need.

In OOo 1.1.x ther are two "hidden text" properties in ViewSettings.
oViewSettings.ShowHiddenParagraphs
oViewSettings.ShowHiddenText

Both contro the hiden/viisibel status for text in texfields.

But in OOo 2.0 ther is a new property fos teh text fon attributes: hidden text. That property is missing from ViewSettings

A HiiddenCharacter properti can be read from NonprintringCharacter ConfigurationProvider, but It seems that cannot be written.

I am beggining to think it is a bug in teh new release: just forgotten to update those properties.


DId you by chance get any further with this? I'm trying to have my Java component remove all hidden text from the document however I haven't been able to get anything working.
Back to top
View user's profile Send private message
ezequielv
General User
General User


Joined: 29 Jul 2004
Posts: 11

PostPosted: Mon May 23, 2005 8:14 am    Post subject: Reply with quote

padrino121 wrote:
DId you by chance get any further with this? I'm trying to have my Java component remove all hidden text from the document however I haven't been able to get anything working.


Hi. I have the same problem to solve than you do (see in Finding out text attributes in the current view (hidden) for more information), but I couldn't find a way to know if a paragraph is hidden in the current view. This means that I want to know if, for whatever reason (that is, letting OOo determine that and not trying to calculate the expressions myself to know if a paragraph is hidden or not) OOo has the current paragraph hidden or not. That way I could delete all the paragraphs for which that condition holds.

I can understand that I probably have to iterate through the content's paragraphs and then find out some "view"-related paragraph pointer, but I just cannot find the way to find out about the shown/hidden status for the current view for each paragraph.

It seems that I cannot explain my problem without tengling myself in repetitive expressions, but I want to make sure that the problem is not misinterpreted Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group