summaryrefslogtreecommitdiff
path: root/sc
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 /sc
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 'sc')
-rw-r--r--sc/inc/unonames.hxx1
-rw-r--r--sc/source/ui/unoobj/docuno.cxx17
2 files changed, 18 insertions, 0 deletions
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index 1a34e6d1cf2c..ff4cf9347945 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -507,6 +507,7 @@
#define SC_UNO_ISCHANGEREADONLYENABLED "IsChangeReadOnlyEnabled"
#define SC_UNO_REFERENCEDEVICE "ReferenceDevice"
#define SC_UNO_CODENAME "CodeName"
+#define SC_UNO_INTEROPGRABBAG "InteropGrabBag"
// document properties from FormModel
#define SC_UNO_APPLYFMDES "ApplyFormDesignMode"
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index ed622056bcfd..59b07491e8cb 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -100,6 +100,14 @@ using namespace com::sun::star;
//------------------------------------------------------------------------
+#ifndef SEQTYPE
+ #if defined(__SUNPRO_CC) && (__SUNPRO_CC == 0x500)
+ #define SEQTYPE(x) (new ::com::sun::star::uno::Type( x ))
+ #else
+ #define SEQTYPE(x) &(x)
+ #endif
+#endif
+
// alles ohne Which-ID, Map nur fuer PropertySetInfo
//! umbenennen, sind nicht mehr nur Options
@@ -147,6 +155,7 @@ static const SfxItemPropertyMapEntry* lcl_GetDocOptPropertyMap()
{MAP_CHAR_LEN(SC_UNO_REFERENCEDEVICE), 0, &getCppuType((uno::Reference<awt::XDevice>*)0), beans::PropertyAttribute::READONLY, 0},
{MAP_CHAR_LEN("BuildId"), 0, &::getCppuType(static_cast< const OUString * >(0)), 0, 0},
{MAP_CHAR_LEN(SC_UNO_CODENAME), 0, &getCppuType(static_cast< const OUString * >(0)), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_INTEROPGRABBAG), 0, SEQTYPE(::getCppuType((uno::Sequence< beans::PropertyValue >*)0)), 0, 0},
{0,0,0,0,0,0}
};
@@ -1704,6 +1713,10 @@ void SAL_CALL ScModelObj::setPropertyValue(
if ( !aObjName.isEmpty() )
pDoc->RestoreChartListener( aObjName );
}
+ else if ( aString.EqualsAscii( SC_UNO_INTEROPGRABBAG ) )
+ {
+ setGrabBagItem(aValue);
+ }
if ( aNewOpt != rOldOpt )
{
@@ -1883,6 +1896,10 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const OUString& aPropertyName )
{
ScUnoHelpFunctions::SetBoolInAny( aRet, (pDocShell->GetCreateMode() == SFX_CREATE_MODE_INTERNAL) );
}
+ else if ( aString.EqualsAscii( SC_UNO_INTEROPGRABBAG ) )
+ {
+ getGrabBagItem(aRet);
+ }
}
return aRet;