Page 1 of 1

Need help for clearing document metadata.

PostPosted: Mon Sep 29, 2008 11:07 am
by neo_ankit
Hi,

I am writing a scrubber tool for open office document. The tool will clear all the crucial meta data from the file( Meta data may include Templates, editing time, user created, user modified, track changes etc).

I have reached till here:-
Code: Select all   Expand viewCollapse view
private void DeleteAllProperties(XFrame document)
{
//Get Local Context Object
XComponentContext localContext = uno.util.Bootstrap.bootstrap();

//Create service factory object used to create objects and to access
//different Services
XMultiServiceFactory multiServiceFactory = (XMultiServiceFactory)localContext.getServiceManager();

XDispatchHelper disp = (XDispatchHelper)multiServiceFactory.createInstance("com.sun.star.frame.DispatchHelper");

PropertyValue[] properties = new PropertyValue[10];
properties[2] = new PropertyValue();
properties[2].Name = "Properties.Title";
properties[2].Value = new Any("");

properties[3] = new PropertyValue();
properties[3].Name = "Properties.Subject";
properties[3].Value = new Any("");

disp.executeDispatch((XDispatchProvider)document, ".uno:SetDocumentProperties", "", 0, properties);
}

What I need now is a list of all the supported properties by Open office 2.4( Like we have Properties.Title and Properties.Subject in the code above).

Please help.

Thanks in advance.

Regards,
Ankit

Re: Need help for clearing document metadata.

PostPosted: Mon Sep 29, 2008 11:11 am
by Hagar Delest
Since you've created a new thread, I've deleted your last post in your first thread and tagged it as solved.
I've moved this one in the UNO API and ODF forum.

Re: Need help for clearing document metadata.

PostPosted: Tue Sep 30, 2008 7:57 am
by neo_ankit
All the mighty programmers of the world...please respond...........

Re: Need help for clearing document metadata.

PostPosted: Wed Oct 01, 2008 10:19 am
by neo_ankit
Ok..If nobody is supoosed to programming related queries here..this forum should be closed forever.

I regret even thinking of posting here.

Re: Need help for clearing document metadata.

PostPosted: Wed Oct 01, 2008 10:26 am
by Hagar Delest
neo_ankit wrote:Ok..If nobody is supoosed to programming related queries here..this forum should be closed forever.

I regret even thinking of posting here.

This is a user to user forum (see the Survival Guide for the forum). And very few users do such coding (should be clear according to the number of threads in this forum sub-section).

Re: Need help for clearing document metadata.

PostPosted: Wed Oct 01, 2008 10:32 am
by neo_ankit
Now this is really irritating...

My post was first moved from one forum to another and now I am getting no proper response.

If possible just point me to a proper place where my query can be resolved...

Re: Need help for clearing document metadata.

PostPosted: Wed Oct 01, 2008 10:49 am
by Hagar Delest
neo_ankit wrote:My post was first moved from one forum to another and now I am getting no proper response.

Your post was in the Writer forum, do you think there are many devs looking at this forum? And BTW, I left a shadow of your thread so that if that happens, he will see your thread (as a link).

neo_ankit wrote:If possible just point me to a proper place where my query can be resolved...

Why not try yourself to look for a more coding dedicated forum?

neo_ankit wrote:Now this is really irritating...

Indeed. For both of us. But remember that we are volunteers, we help other users on our free time, we are not paid. I took time to improve the visibility of your question but the forum is not responsible for lack of answer in your needed timing. If you're not satisfied, just hire a developer to do it. There is a sub-forum section (Paid support) where you can get some contacts. If you want to get that for free, then, just wait or get some documentation (SDK for example).

Last post in this thread.
Good luck.

Re: Need help for clearing document metadata.

PostPosted: Wed Oct 01, 2008 11:28 am
by Villeroy
I added the code tags for better readability. The code looks like Java. You may want to install Object Inspector
Normally I stopped answering API related questions if they require nothing more than looking up the right interface.
http://api.openoffice.org/docs/common/r ... plier.html

Re: Need help for clearing document metadata.

PostPosted: Wed Oct 01, 2008 11:32 am
by neo_ankit
Thank you Villeroy,

The code is actually in C#..but hope I will reach somewhere now.

Regards,
Ankit