Need help for clearing document metadata

Java, C++, C#, Delphi... - Using the UNO bridges
Post Reply
User avatar
neo_ankit
Posts: 6
Joined: Fri Sep 26, 2008 3:31 pm

Need help for clearing document metadata

Post 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

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
User avatar
Hagar Delest
Moderator
Posts: 32627
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Need help for clearing document metadata.

Post 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.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
neo_ankit
Posts: 6
Joined: Fri Sep 26, 2008 3:31 pm

Re: Need help for clearing document metadata.

Post by neo_ankit »

All the mighty programmers of the world...please respond...........
OOo 2.4.X on Ms Windows XP
User avatar
neo_ankit
Posts: 6
Joined: Fri Sep 26, 2008 3:31 pm

Re: Need help for clearing document metadata.

Post 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.
OOo 2.4.X on Ms Windows XP
User avatar
Hagar Delest
Moderator
Posts: 32627
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Need help for clearing document metadata.

Post 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).
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
neo_ankit
Posts: 6
Joined: Fri Sep 26, 2008 3:31 pm

Re: Need help for clearing document metadata.

Post 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...
User avatar
Hagar Delest
Moderator
Posts: 32627
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Need help for clearing document metadata.

Post 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.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Need help for clearing document metadata.

Post 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
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
neo_ankit
Posts: 6
Joined: Fri Sep 26, 2008 3:31 pm

Re: Need help for clearing document metadata.

Post by neo_ankit »

Thank you Villeroy,

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

Regards,
Ankit
OOo 2.4.X on Ms Windows XP
Post Reply