summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/objuno.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc/objuno.cxx')
-rw-r--r--sfx2/source/doc/objuno.cxx37
1 files changed, 37 insertions, 0 deletions
diff --git a/sfx2/source/doc/objuno.cxx b/sfx2/source/doc/objuno.cxx
index ac45ef594d..ef49f5d9b5 100644
--- a/sfx2/source/doc/objuno.cxx
+++ b/sfx2/source/doc/objuno.cxx
@@ -45,6 +45,7 @@
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/util/XModifiable.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
+#include <com/sun/star/document/XCompatWriterDocProperties.hpp>
#include <unotools/configmgr.hxx>
#include <tools/inetdef.hxx>
@@ -104,6 +105,9 @@ const SfxItemPropertyMapEntry* lcl_GetDocInfoPropertyMap()
{ "AutoloadEnabled" , 15, MID_DOCINFO_AUTOLOADENABLED, &::getBooleanCppuType(), PROPERTY_UNBOUND, 0 },
{ "AutoloadSecs" , 12, MID_DOCINFO_AUTOLOADSECS, &::getCppuType((const sal_Int32*)0), PROPERTY_UNBOUND, 0 },
{ "AutoloadURL" , 11, MID_DOCINFO_AUTOLOADURL, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "Category" , 8 , MID_CATEGORY, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "Company" , 7 , MID_COMPANY, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "Manager" , 7 , MID_MANAGER, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
{ "CreationDate" , 12, WID_DATE_CREATED, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_MAYBEVOID, 0 },
{ "DefaultTarget" , 13, MID_DOCINFO_DEFAULTTARGET, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
{ "Description" , 11, MID_DOCINFO_DESCRIPTION, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
@@ -807,6 +811,22 @@ void SAL_CALL SfxDocumentInfoObject::setFastPropertyValue(sal_Int32 nHandle, co
_pImp->m_xDocProps->setDefaultTarget(sTemp);
break;
// case WID_CONTENT_TYPE : // this is readonly!
+ case MID_CATEGORY:
+ case MID_MANAGER:
+ case MID_COMPANY:
+ {
+ uno::Reference< document::XCompatWriterDocProperties > xWriterProps( _pImp->m_xDocProps, uno::UNO_QUERY );
+ if ( xWriterProps.is() )
+ {
+ if ( nHandle == MID_CATEGORY )
+ xWriterProps->setCategory( sTemp );
+ else if ( nHandle == MID_MANAGER )
+ xWriterProps->setManager( sTemp );
+ else
+ xWriterProps->setCompany( sTemp );
+ break;
+ }
+ }
default:
break;
}
@@ -1024,6 +1044,23 @@ void SAL_CALL SfxDocumentInfoObject::setFastPropertyValue(sal_Int32 nHandle, co
case MID_DOCINFO_CHARLOCALE:
aValue <<= _pImp->m_xDocProps->getLanguage();
break;
+ case MID_CATEGORY:
+ case MID_MANAGER:
+ case MID_COMPANY:
+ {
+ uno::Reference< document::XCompatWriterDocProperties > xWriterProps( _pImp->m_xDocProps, uno::UNO_QUERY );
+ if ( xWriterProps.is() )
+ {
+ if ( nHandle == MID_CATEGORY )
+ aValue <<= xWriterProps->getCategory();
+ else if ( nHandle == MID_MANAGER )
+ aValue <<= xWriterProps->getManager();
+ else
+ aValue <<= xWriterProps->getCompany();
+ break;
+ }
+ }
+
default:
aValue <<= ::rtl::OUString();
break;