You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Keith Player <kr...@hotmail.com> on 2011/06/29 07:06:21 UTC

Document metadata (Track changes, vanish, color)

Is there a way to access Track Changes" info about a doc file through HWPF?  I have tried the following, but it doesn't always return true.  (e.g. If you perform track changes in newer office and save as a doc).

HWPFDocument document = getDocument();
boolean hasTrackChanges =  document.getDocProperties().isFRevMarking(); // sometimes matches track changes state.

and so that I don't spam the list, I'll also add my other queries about retrieving metadata.

How would you identify whether the "vanish" style has been set on some text?
How would you identify whether any text has a white color style?


 		 	   		  

RE: Document metadata (Track changes, vanish, color)

Posted by Keith Player <kr...@hotmail.com>.
Hello Sergey,

Thanks for your help showing how to get all that information out, it was very useful.  I need to iterate over the character runs to check other things anyway, 
so checking for the isMarkedDeleted/Inserted is a valid work-around for 
me.  However, having isFRevMarking matching any track changes, would be a good thing for the API.  

All the best,

Keith

From: krazedsun@hotmail.com
To: user@poi.apache.org
Subject: RE: Document metadata (Track changes, vanish, color)
Date: Thu, 30 Jun 2011 14:15:21 +1000








Hello Sergey,

The testChanges document returns true for isFRevMarking, but fastsave.doc returns false.

Keith.

> From: vlsergey@gmail.com
> Date: Wed, 29 Jun 2011 14:03:20 +0400
> Subject: Re: Document metadata (Track changes, vanish, color)
> To: user@poi.apache.org
> 
> Keith,
> 
> There are methods of CharacterRun like isMarkedDeleted() and
> isMarkedInserted() that helps to check if specific portion of text
> were removed or inserted. As well isFldVanished() helps to check if
> text marked as vanished.
> 
> If you have texts with track changes enabled, but don't have
> isFRevMarking() flag set, could you please provide some examples?
> 
> Also there is getColor() method (also of CharacterRun). "8" means "white".
> 
> Best regards,
> Sergey.
> 
> On Wed, Jun 29, 2011 at 9:06 AM, Keith Player <kr...@hotmail.com> wrote:
> >
> > Is there a way to access Track Changes" info about a doc file through HWPF?  I have tried the following, but it doesn't always return true.  (e.g. If you perform track changes in newer office and save as a doc).
> >
> > HWPFDocument document = getDocument();
> > boolean hasTrackChanges =  document.getDocProperties().isFRevMarking(); // sometimes matches track changes state.
> >
> > and so that I don't spam the list, I'll also add my other queries about retrieving metadata.
> >
> > How would you identify whether the "vanish" style has been set on some text?
> > How would you identify whether any text has a white color style?
> >
> >
> >
> 
> 
> 
> -- 
> Sergey Vladimirov
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
> 
 		 	   		  

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org 		 	   		  

RE: Document metadata (Track changes, vanish, color)

Posted by Keith Player <kr...@hotmail.com>.
Hello Sergey,

The testChanges document returns true for isFRevMarking, but fastsave.doc returns false.

Keith.

> From: vlsergey@gmail.com
> Date: Wed, 29 Jun 2011 14:03:20 +0400
> Subject: Re: Document metadata (Track changes, vanish, color)
> To: user@poi.apache.org
> 
> Keith,
> 
> There are methods of CharacterRun like isMarkedDeleted() and
> isMarkedInserted() that helps to check if specific portion of text
> were removed or inserted. As well isFldVanished() helps to check if
> text marked as vanished.
> 
> If you have texts with track changes enabled, but don't have
> isFRevMarking() flag set, could you please provide some examples?
> 
> Also there is getColor() method (also of CharacterRun). "8" means "white".
> 
> Best regards,
> Sergey.
> 
> On Wed, Jun 29, 2011 at 9:06 AM, Keith Player <kr...@hotmail.com> wrote:
> >
> > Is there a way to access Track Changes" info about a doc file through HWPF?  I have tried the following, but it doesn't always return true.  (e.g. If you perform track changes in newer office and save as a doc).
> >
> > HWPFDocument document = getDocument();
> > boolean hasTrackChanges =  document.getDocProperties().isFRevMarking(); // sometimes matches track changes state.
> >
> > and so that I don't spam the list, I'll also add my other queries about retrieving metadata.
> >
> > How would you identify whether the "vanish" style has been set on some text?
> > How would you identify whether any text has a white color style?
> >
> >
> >
> 
> 
> 
> -- 
> Sergey Vladimirov
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
> 
 		 	   		  

Re: Document metadata (Track changes, vanish, color)

Posted by Sergey Vladimirov <vl...@gmail.com>.
Keith,

There are methods of CharacterRun like isMarkedDeleted() and
isMarkedInserted() that helps to check if specific portion of text
were removed or inserted. As well isFldVanished() helps to check if
text marked as vanished.

If you have texts with track changes enabled, but don't have
isFRevMarking() flag set, could you please provide some examples?

Also there is getColor() method (also of CharacterRun). "8" means "white".

Best regards,
Sergey.

On Wed, Jun 29, 2011 at 9:06 AM, Keith Player <kr...@hotmail.com> wrote:
>
> Is there a way to access Track Changes" info about a doc file through HWPF?  I have tried the following, but it doesn't always return true.  (e.g. If you perform track changes in newer office and save as a doc).
>
> HWPFDocument document = getDocument();
> boolean hasTrackChanges =  document.getDocProperties().isFRevMarking(); // sometimes matches track changes state.
>
> and so that I don't spam the list, I'll also add my other queries about retrieving metadata.
>
> How would you identify whether the "vanish" style has been set on some text?
> How would you identify whether any text has a white color style?
>
>
>



-- 
Sergey Vladimirov

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org