summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sfx2/sfxbasemodel.hxx5
-rw-r--r--offapi/com/sun/star/document/OfficeDocument.idl11
-rw-r--r--qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv1
-rw-r--r--qadevOOo/objdsc/sd/com.sun.star.comp.office.SdXImpressDocument.csv1
-rw-r--r--qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextDocument.csv1
-rw-r--r--sc/inc/unonames.hxx1
-rw-r--r--sc/source/ui/unoobj/docuno.cxx17
-rw-r--r--sd/source/ui/inc/unokywds.hxx1
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx8
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx22
-rw-r--r--starmath/source/unomodel.cxx18
-rw-r--r--sw/inc/unomap.hxx1
-rw-r--r--sw/inc/unoprnms.hxx2
-rw-r--r--sw/source/core/unocore/unomap.cxx1
-rw-r--r--sw/source/core/unocore/unoprnms.cxx5
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx6
16 files changed, 98 insertions, 3 deletions
diff --git a/include/sfx2/sfxbasemodel.hxx b/include/sfx2/sfxbasemodel.hxx
index 1ddedc8cc63b..084a0f3c3c36 100644
--- a/include/sfx2/sfxbasemodel.hxx
+++ b/include/sfx2/sfxbasemodel.hxx
@@ -1411,6 +1411,11 @@ protected:
/* returns true if the document signatures are valid, otherwise false */
sal_Bool hasValidSignatures() const;
+ /* GrabBagItem for interim interop purposes */
+ void getGrabBagItem(com::sun::star::uno::Any& rVal) const;
+
+ void setGrabBagItem(const com::sun::star::uno::Any& rVal);
+
//________________________________________________________________________________________________________
// private methods
//________________________________________________________________________________________________________
diff --git a/offapi/com/sun/star/document/OfficeDocument.idl b/offapi/com/sun/star/document/OfficeDocument.idl
index 5303ae7cafa8..60937f09aa78 100644
--- a/offapi/com/sun/star/document/OfficeDocument.idl
+++ b/offapi/com/sun/star/document/OfficeDocument.idl
@@ -155,6 +155,17 @@ published service OfficeDocument
may get a different id every time it gets loaded.</p>
*/
[property, optional, readonly] string RuntimeUID;
+
+ /** Grab bag of document properties, used as a string-any map for
+ interim interop purposes.
+
+ @since LibreOffice 4.2
+
+ <p>This property is intentionally not handled by the ODF
+ filter. Any member that should be handled there should be
+ first moved out from this grab bag to a separate property.</p>
+ */
+ [optional, property] sequence<com::sun::star::beans::PropertyValue> InteropGrabBag;
};
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv
index cb7c6d1de96b..2e78dcfe50cf 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScModelObj.csv
@@ -76,6 +76,7 @@
"ScModelObj";"com::sun::star::document::OfficeDocument";"AutomaticControlFocus#optional"
"ScModelObj";"com::sun::star::document::OfficeDocument";"ApplyFormDesignMode#optional"
"ScModelObj";"com::sun::star::document::OfficeDocument";"RuntimeUID#optional"
+"ScModelObj";"com::sun::star::document::OfficeDocument";"InteropGrabBag#optional"
"ScModelObj";"com::sun::star::frame::XModel";"attachResource()"
"ScModelObj";"com::sun::star::frame::XModel";"getURL()"
"ScModelObj";"com::sun::star::frame::XModel";"getArgs()"
diff --git a/qadevOOo/objdsc/sd/com.sun.star.comp.office.SdXImpressDocument.csv b/qadevOOo/objdsc/sd/com.sun.star.comp.office.SdXImpressDocument.csv
index fd2b76673ca2..6eb60af3bfd7 100644
--- a/qadevOOo/objdsc/sd/com.sun.star.comp.office.SdXImpressDocument.csv
+++ b/qadevOOo/objdsc/sd/com.sun.star.comp.office.SdXImpressDocument.csv
@@ -43,6 +43,7 @@
"SdXImpressDocument";"com::sun::star::document::OfficeDocument";"AutomaticControlFocus#optional"
"SdXImpressDocument";"com::sun::star::document::OfficeDocument";"ApplyFormDesignMode#optional"
"SdXImpressDocument";"com::sun::star::document::OfficeDocument";"RuntimeUID#optional"
+"SdXImpressDocument";"com::sun::star::document::OfficeDocument";"InteropGrabBag#optional"
"SdXImpressDocument";"com::sun::star::frame::XModel";"attachResource()"
"SdXImpressDocument";"com::sun::star::frame::XModel";"getURL()"
"SdXImpressDocument";"com::sun::star::frame::XModel";"getArgs()"
diff --git a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextDocument.csv b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextDocument.csv
index e7e989da76d7..93c870b9a716 100644
--- a/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextDocument.csv
+++ b/qadevOOo/objdsc/sw/com.sun.star.comp.office.SwXTextDocument.csv
@@ -67,6 +67,7 @@
"SwXTextDocument";"com::sun::star::document::OfficeDocument";"AutomaticControlFocus#optional"
"SwXTextDocument";"com::sun::star::document::OfficeDocument";"ApplyFormDesignMode#optional"
"SwXTextDocument";"com::sun::star::document::OfficeDocument";"RuntimeUID#optional"
+"SwXTextDocument";"com::sun::star::document::OfficeDocument";"InteropGrabBag#optional"
"SwXTextDocument";"com::sun::star::frame::XModel";"attachResource()"
"SwXTextDocument";"com::sun::star::frame::XModel";"getURL()"
"SwXTextDocument";"com::sun::star::frame::XModel";"getArgs()"
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;
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();
}
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 1fc65d2279af..c7d7dcb5a90c 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -60,6 +60,7 @@
#include <svl/stritem.hxx>
#include <svl/eitem.hxx>
#include <svl/intitem.hxx>
+#include <svl/grabbagitem.hxx>
#include <basic/sbx.hxx>
#include <basic/sbuno.hxx>
#include <tools/urlobj.hxx>
@@ -213,6 +214,7 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument
Reference< rdf::XDocumentMetadataAccess> m_xDocumentMetadata;
::rtl::Reference< ::sfx2::DocumentUndoManager > m_pDocumentUndoManager;
Sequence< document::CmisProperty> m_cmisProperties;
+ SfxGrabBagItem* m_pGrabBagItem ;
IMPL_SfxBaseModel_DataContainer( ::osl::Mutex& rMutex, SfxObjectShell* pObjectShell )
: m_pObjectShell ( pObjectShell )
@@ -231,6 +233,7 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument
, m_xDocumentMetadata () // lazy
, m_pDocumentUndoManager ()
, m_cmisProperties ()
+ , m_pGrabBagItem ( NULL )
{
// increase global instance counter.
++g_nInstanceCounter;
@@ -240,6 +243,7 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument
virtual ~IMPL_SfxBaseModel_DataContainer()
{
+ delete m_pGrabBagItem;
}
// ::sfx2::IModifiableDocument
@@ -3460,6 +3464,24 @@ sal_Bool SfxBaseModel::hasValidSignatures() const
return sal_False;
}
+void SfxBaseModel::getGrabBagItem(com::sun::star::uno::Any& rVal) const
+{
+ if (m_pData->m_pGrabBagItem != NULL)
+ m_pData->m_pGrabBagItem->QueryValue(rVal);
+ else {
+ uno::Sequence<beans::PropertyValue> aValue(0);
+ rVal = uno::makeAny(aValue);
+ }
+}
+
+void SfxBaseModel::setGrabBagItem(const com::sun::star::uno::Any& rVal)
+{
+ if (m_pData->m_pGrabBagItem == NULL)
+ m_pData->m_pGrabBagItem = new SfxGrabBagItem;
+
+ m_pData->m_pGrabBagItem->PutValue(rVal);
+}
+
static void GetCommandFromSequence( OUString& rCommand, sal_Int32& nIndex, const Sequence< beans::PropertyValue >& rSeqPropValue )
{
nIndex = -1;
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;
}
}
diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx
index 128570c3b1ee..1b938bc6b8d8 100644
--- a/sw/inc/unomap.hxx
+++ b/sw/inc/unomap.hxx
@@ -236,6 +236,7 @@
#define WID_DOC_RUNTIME_UID 1015
#define WID_DOC_LOCK_UPDATES 1016
#define WID_DOC_HAS_VALID_SIGNATURES 1017
+#define WID_DOC_INTEROP_GRAB_BAG 1018
#define WID_DOC_BUILDID 1024
#define WID_DOC_ISTEMPLATEID 1025
#define WID_DOC_DEFAULT_PAGE_MODE 1069
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 51680fcf76ee..704d595505a6 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -838,6 +838,8 @@ enum SwPropNameIds
/* 0772 */ UNO_NAME_CHAR_SHADOW_FORMAT,
/* 0773 */ UNO_NAME_SHADOW_TRANSPARENCE,
+/* 0774 */ UNO_NAME_DOC_INTEROP_GRAB_BAG,
+
SW_PROPNAME_END
// new items in this array must match SwPropNameTab aPropNameTab
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index 9377b5f3a607..9658b52835f1 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -1606,6 +1606,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_LOCK_UPDATES), WID_DOC_LOCK_UPDATES, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{ SW_PROP_NMID(UNO_NAME_HAS_VALID_SIGNATURES), WID_DOC_HAS_VALID_SIGNATURES, CPPU_E2T(CPPUTYPE_BOOLEAN), PropertyAttribute::READONLY, 0},
{ SW_PROP_NMID(UNO_NAME_BUILDID), WID_DOC_BUILDID, CPPU_E2T(CPPUTYPE_OUSTRING), 0, 0},
+ { SW_PROP_NMID(UNO_NAME_DOC_INTEROP_GRAB_BAG), WID_DOC_INTEROP_GRAB_BAG, CPPU_E2T(CPPUTYPE_PROPERTYVALUE), PROPERTY_NONE, 0 }, \
{ SW_PROP_NMID(UNO_NAME_DEFAULT_PAGE_MODE), WID_DOC_DEFAULT_PAGE_MODE, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
{0,0,0,0,0,0}
};
diff --git a/sw/source/core/unocore/unoprnms.cxx b/sw/source/core/unocore/unoprnms.cxx
index ff3a48f3e75f..fc55addbc5a5 100644
--- a/sw/source/core/unocore/unoprnms.cxx
+++ b/sw/source/core/unocore/unoprnms.cxx
@@ -801,8 +801,9 @@ const SwPropNameTab aPropNameTab = {
/* 0769 UNO_NAME_CHAR_RIGHT_BORDER_DISTANCE */ {MAP_CHAR_LEN("CharRightBorderDistance")},
/* 0770 UNO_NAME_CHAR_TOP_BORDER_DISTANCE */ {MAP_CHAR_LEN("CharTopBorderDistance")},
/* 0771 UNO_NAME_CHAR_BOTTOM_BORDER_DISTANCE */ {MAP_CHAR_LEN("CharBottomBorderDistance")},
-/* 0771 UNO_NAME_CHAR_SHADOW_FORMAT */ {MAP_CHAR_LEN("CharShadowFormat")},
-/* 0772 UNO_NAME_SHADOW_TRANSPARENCE */ {MAP_CHAR_LEN("ShadowTransparence")},
+/* 0772 UNO_NAME_CHAR_SHADOW_FORMAT */ {MAP_CHAR_LEN("CharShadowFormat")},
+/* 0773 UNO_NAME_SHADOW_TRANSPARENCE */ {MAP_CHAR_LEN("ShadowTransparence")},
+/* 0774 UNO_NAME_DOC_INTEROP_GRAB_BAG */ {MAP_CHAR_LEN("InteropGrabBag")},
// new items in this array must match enum SwPropNameIds
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 65735a588c06..67af90221b6d 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -1998,6 +1998,9 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName,
pDocShell->GetDoc()->SetDefaultPageMode( bDefaultPageMode );
}
break;
+ case WID_DOC_INTEROP_GRAB_BAG:
+ setGrabBagItem(aValue);
+ break;
default:
{
@@ -2152,6 +2155,9 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
case WID_DOC_HAS_VALID_SIGNATURES:
aAny <<= hasValidSignatures();
break;
+ case WID_DOC_INTEROP_GRAB_BAG:
+ getGrabBagItem(aAny);
+ break;
default:
{