summaryrefslogtreecommitdiff
path: root/starmath
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 /starmath
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 'starmath')
-rw-r--r--starmath/source/unomodel.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 26f9ce788333..c4edfd7ecb6b 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -228,9 +228,18 @@ enum SmModelPropertyHandles
HANDLE_RUNTIME_UID,
HANDLE_LOAD_READONLY, // Security Options
HANDLE_DIALOG_LIBRARIES, // #i73329#
- HANDLE_BASELINE
+ HANDLE_BASELINE,
+ HANDLE_INTEROP_GRAB_BAG,
};
+#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
+
static PropertySetInfo * lcl_createModelPropertyInfo ()
{
static PropertyMapEntry aModelPropertyInfoMap[] =
@@ -302,6 +311,7 @@ static PropertySetInfo * lcl_createModelPropertyInfo ()
{ RTL_CONSTASCII_STRINGPARAM( "LoadReadonly" ), HANDLE_LOAD_READONLY, &::getBooleanCppuType(), PROPERTY_NONE, 0 },
// #i972#
{ RTL_CONSTASCII_STRINGPARAM( "BaseLine"), HANDLE_BASELINE, &::getCppuType((const sal_Int16*)0), PROPERTY_NONE, 0},
+ { RTL_CONSTASCII_STRINGPARAM( "InteropGrabBag" ), HANDLE_INTEROP_GRAB_BAG , SEQTYPE(::getCppuType((uno::Sequence< beans::PropertyValue >*)0)), PROPERTY_NONE, 0 },
{ NULL, 0, 0, NULL, 0, 0 }
};
PropertySetInfo *pInfo = new PropertySetInfo ( aModelPropertyInfoMap );
@@ -707,6 +717,9 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
pDocSh->SetLoadReadonly( bReadonly );
break;
}
+ case HANDLE_INTEROP_GRAB_BAG:
+ setGrabBagItem(*pValues);
+ break;
}
}
@@ -933,6 +946,9 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
*pValue <<= static_cast<sal_Int32>( pDocSh->pTree->GetFormulaBaseline() );
}
}
+ case HANDLE_INTEROP_GRAB_BAG:
+ getGrabBagItem(*pValue);
+ break;
break;
}
}