summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorAndres Gomez <agomez@igalia.com>2013-09-17 18:30:17 +0300
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-09-20 10:35:51 +0200
commitbee6b8f2ba4ea04135bb47e24c520015129aca27 (patch)
tree032922998c6b69099055f81416bc16d9ceb8a4d0 /sd
parent652b0b6d189b4c0925ab859e81c6005a4a348a55 (diff)
uno: new InteropGrabBag UNO prop in OfficeDocument
Added the new InteropGrabBag property to the OfficeDocument service and modified the JUnit UNO unit tests for it. Added specific implementation in the sfx2 module for the SfxBaseModel class. Added specific inherited implementations in the sc, sd, starmath and sw modules for the ScModelObj, SdXImpressDocument, SmModel, and SwXTextDocument classes. This new property is intended by now for its usage on preserving OOX's theming although the aim is to be able to re-create the theming in the future from saved properties. It could also be used for preserving other attributes for interoperability among document formats. Change-Id: Ia822856293c70ae22911afa794e3e38bcaa31f86 Reviewed-on: https://gerrit.libreoffice.org/6000 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/inc/unokywds.hxx1
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx8
2 files changed, 9 insertions, 0 deletions
diff --git a/sd/source/ui/inc/unokywds.hxx b/sd/source/ui/inc/unokywds.hxx
index 52ef5d786f04..e47c4bd86818 100644
--- a/sd/source/ui/inc/unokywds.hxx
+++ b/sd/source/ui/inc/unokywds.hxx
@@ -127,6 +127,7 @@ const char sUNO_Prop_UserDefinedAttributes[] = "UserDefinedAttributes";
const char sUNO_Prop_BookmarkURL[] = "BookmarkURL";
const char sUNO_Prop_RuntimeUID[] = "RuntimeUID";
const char sUNO_Prop_HasValidSignatures[] = "HasValidSignatures";
+const char sUNO_Prop_InteropGrabBag[] = "InteropGrabBag";
// view settings
const char sUNO_View_ViewId[] = "ViewId";
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 055fb00f22bb..e4683aac461c 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -173,6 +173,7 @@ const sal_Int32 WID_MODEL_BUILDID = 10;
const sal_Int32 WID_MODEL_HASVALIDSIGNATURES = 11;
const sal_Int32 WID_MODEL_DIALOGLIBS = 12;
const sal_Int32 WID_MODEL_FONTS = 13;
+const sal_Int32 WID_MODEL_INTEROPGRABBAG = 14;
#ifndef SEQTYPE
#if defined(__SUNPRO_CC) && (__SUNPRO_CC == 0x500)
@@ -200,6 +201,7 @@ const SvxItemPropertySet* ImplGetDrawModelPropertySet()
{ MAP_CHAR_LEN(sUNO_Prop_RuntimeUID), WID_MODEL_RUNTIMEUID, &::getCppuType(static_cast< const OUString * >(0)), beans::PropertyAttribute::READONLY, 0 },
{ MAP_CHAR_LEN(sUNO_Prop_HasValidSignatures), WID_MODEL_HASVALIDSIGNATURES, &::getCppuType(static_cast< const sal_Bool * >(0)), beans::PropertyAttribute::READONLY, 0 },
{ MAP_CHAR_LEN("Fonts"), WID_MODEL_FONTS, SEQTYPE(::getCppuType((uno::Sequence<uno::Any>*)0)), beans::PropertyAttribute::READONLY, 0},
+ { MAP_CHAR_LEN(sUNO_Prop_InteropGrabBag), WID_MODEL_INTEROPGRABBAG, SEQTYPE(::getCppuType((uno::Sequence< beans::PropertyValue >*)0)), 0, 0},
{ 0,0,0,0,0,0 }
};
static SvxItemPropertySet aDrawModelPropertySet_Impl( aDrawModelPropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() );
@@ -1264,6 +1266,9 @@ void SAL_CALL SdXImpressDocument::setPropertyValue( const OUString& aPropertyNam
case WID_MODEL_DIALOGLIBS:
case WID_MODEL_FONTS:
throw beans::PropertyVetoException();
+ case WID_MODEL_INTEROPGRABBAG:
+ setGrabBagItem(aValue);
+ break;
default:
throw beans::UnknownPropertyException();
}
@@ -1386,6 +1391,9 @@ uno::Any SAL_CALL SdXImpressDocument::getPropertyValue( const OUString& Property
aAny <<= aSeq;
break;
}
+ case WID_MODEL_INTEROPGRABBAG:
+ getGrabBagItem(aAny);
+ break;
default:
throw beans::UnknownPropertyException();
}