Yuri Dario wrote:
Hi,


to improve OOo integration with OS/2 desktop, I want to store some
properties like author, comment, keywords in the file extended
attribute: this is a special file area with predefined tags, where
users can inspect data without opening files (or store more
informations).
I want to store such tags so they can be searched also on systems
without OOo installed.

I see that SfxObjectShell::SaveTo_Impl() is the function doing the real
save of the current document, and near the end of the functions there
is some code like

            ::ucb::Content aContent( pMedium->GetName(),
com::sun::star::uno::Reference < XCommandEnvironment >() );
            com::sun::star::uno::Reference < XPropertySetInfo > xProps
= aContent.getProperties();
...
                if ( xProps->hasPropertyByName( aAuthor ) )
                {
                    aAny = aContent.getPropertyValue( aAuthor );
                    if ( ( aAny >>= aValue ) )
                        rInfo.SetCreated( SfxStamp( String( aValue ) )
);
                }


I think this is the correct place where to store data, since file
operations have been committed, but I don't see where I should add my
specific OS/2 code.
It seems I should do it somewhere inside ucb code, but it is not clear
to me how (and where).

Could you help?

Hm, doing it in UCB would have the advantage that UCB internally can potentially have knowledge about specifics of various file systems. But UCB internally has no knowledge about OOo file formats (so it would not know what to write into the "author" property field, for example). The only clean solution, I think, would be to extend the interface of UCB so that SfxObjectShell can specify the additional properties for the file, and UCB decides what to do with them for the given file system.

In any case, I would suggest you move this discussion to either the general [EMAIL PROTECTED] or the UCB-specific [EMAIL PROTECTED]

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to