summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Specht <os@openoffice.org>2000-12-09 14:37:44 +0000
committerOliver Specht <os@openoffice.org>2000-12-09 14:37:44 +0000
commit791dbea86bba526a13e358e898c1f3ca7ceef203 (patch)
tree8177240ef087c6c726058ceb8a320a669238e519
parent9ccdc1394ffe810b1e47d51b9aac3416710ca607 (diff)
#80717# text content properties added to SwXTextSection
-rw-r--r--sw/source/core/unocore/unomap.cxx24
-rw-r--r--sw/source/core/unocore/unosect.cxx11
2 files changed, 23 insertions, 12 deletions
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index d5f3346be124..f9e8bd34132f 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unomap.cxx,v $
*
- * $Revision: 1.30 $
+ * $Revision: 1.31 $
*
- * last change: $Author: os $ $Date: 2000-12-09 14:24:09 $
+ * last change: $Author: os $ $Date: 2000-12-09 15:37:44 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -593,6 +593,17 @@ void SwUnoPropertyMapProvider::Sort(sal_uInt16 nId)
{ SW_PROP_NAME(UNO_NAME_CONTENT_SECTION), WID_IDX_CONTENT_SECTION, &::getCppuType((uno::Reference<text::XTextSection>*)0) , PropertyAttribute::READONLY, 0},\
{ SW_PROP_NAME(UNO_NAME_HEADER_SECTION), WID_IDX_HEADER_SECTION, &::getCppuType((uno::Reference<text::XTextSection>*)0) , PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0},\
+#if (defined(__SUNPRO_CC) && (__SUNPRO_CC == 0x500)) || (defined(__GNUC__) && defined(__APPLE__))
+#define ANCHOR_TYPES_PROPERTY { SW_PROP_NAME(UNO_NAME_ANCHOR_TYPES ), FN_UNO_ANCHOR_TYPES, new uno::Type(::getCppuType((uno::Sequence<text::TextContentAnchorType>*)0)),PropertyAttribute::READONLY, 0xff},
+#else
+#define ANCHOR_TYPES_PROPERTY { SW_PROP_NAME(UNO_NAME_ANCHOR_TYPES ), FN_UNO_ANCHOR_TYPES, &::getCppuType((const uno::Sequence<text::TextContentAnchorType>*)0),PropertyAttribute::READONLY, 0xff},
+#endif
+
+#define COMMON_TEXT_CONTENT_PROPERTIES \
+ { SW_PROP_NAME(UNO_NAME_ANCHOR_TYPE ), FN_UNO_ANCHOR_TYPE, &::getCppuType((const sal_Int16*)0), PropertyAttribute::READONLY, MID_ANCHOR_ANCHORTYPE},\
+ ANCHOR_TYPES_PROPERTY\
+ { SW_PROP_NAME(UNO_NAME_TEXT_WRAP), FN_UNO_TEXT_WRAP, &::getCppuType((const sal_Int16*)0), PropertyAttribute::READONLY, MID_SURROUND_SURROUNDTYPE },
+
const SfxItemPropertyMap* SwUnoPropertyMapProvider::GetPropertyMap(sal_uInt16 nPropertyId)
{
@@ -631,13 +642,7 @@ const SfxItemPropertyMap* SwUnoPropertyMapProvider::GetPropertyMap(sal_uInt16
#else
{ SW_PROP_NAME(UNO_NAME_TABSTOPS), RES_PARATR_TABSTOP, &::getCppuType((const uno::Sequence<style::TabStop>*)0), PropertyAttribute::MAYBEVOID, CONVERT_TWIPS},
#endif
- { SW_PROP_NAME(UNO_NAME_ANCHOR_TYPE ), FN_UNO_ANCHOR_TYPE, &::getCppuType((const sal_Int16*)0), PropertyAttribute::READONLY, MID_ANCHOR_ANCHORTYPE},
-#if (defined(__SUNPRO_CC) && (__SUNPRO_CC == 0x500)) || (defined(__GNUC__) && defined(__APPLE__))
- { SW_PROP_NAME(UNO_NAME_ANCHOR_TYPES ), FN_UNO_ANCHOR_TYPES, new uno::Type(::getCppuType((uno::Sequence<text::TextContentAnchorType>*)0)),PropertyAttribute::READONLY, 0xff},
-#else
- { SW_PROP_NAME(UNO_NAME_ANCHOR_TYPES ), FN_UNO_ANCHOR_TYPES, &::getCppuType((const uno::Sequence<text::TextContentAnchorType>*)0),PropertyAttribute::READONLY, 0xff},
-#endif
- { SW_PROP_NAME(UNO_NAME_TEXT_WRAP), FN_UNO_TEXT_WRAP, &::getCppuType((const sal_Int16*)0), PropertyAttribute::READONLY, MID_SURROUND_SURROUNDTYPE },
+ COMMON_TEXT_CONTENT_PROPERTIES
{0,0,0,0}
};
aMapArr[nPropertyId] = aParagraphMap_Impl;
@@ -1150,6 +1155,7 @@ const SfxItemPropertyMap* SwUnoPropertyMapProvider::GetPropertyMap(sal_uInt16
{ SW_PROP_NAME(UNO_NAME_ENDNOTE_NUMBERING_PREFIX) ,RES_END_AT_TXTEND, &::getCppuType((const OUString*)0) , PROPERTY_NONE, MID_PREFIX },
{ SW_PROP_NAME(UNO_NAME_ENDNOTE_NUMBERING_SUFFIX) ,RES_END_AT_TXTEND, &::getCppuType((const OUString*)0) , PROPERTY_NONE, MID_SUFFIX },
{ SW_PROP_NAME(UNO_NAME_DOCUMENT_INDEX), WID_SECT_DOCUMENT_INDEX, &::getCppuType((uno::Reference<text::XDocumentIndex>*)0), PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID, 0 },
+ COMMON_TEXT_CONTENT_PROPERTIES
{0,0,0,0}
};
aMapArr[nPropertyId] = aSectionPropertyMap_Impl;
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 903a4288dd13..907fd9144585 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unosect.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: dvo $ $Date: 2000-12-02 20:26:32 $
+ * last change: $Author: os $ $Date: 2000-12-09 15:37:44 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -213,7 +213,7 @@ SwXTextSection::SwXTextSection(SwSectionFmt* pFmt, BOOL bIndexHeader) :
// _pMap(aSwMapProvider.getPropertyMap(PROPERTY_MAP_SECTION)),
m_bIsDescriptor(pFmt == 0),
m_bIndexHeader(bIndexHeader),
- pProps(pFmt ? 0 : new SwTextSectionProperties_Impl)
+ pProps(pFmt ? 0 : new SwTextSectionProperties_Impl())
{
}
@@ -788,6 +788,11 @@ uno::Any SwXTextSection::getPropertyValue(const OUString& rPropertyName)
// else: no enclosing index found -> empty return value
}
break;
+ case FN_UNO_ANCHOR_TYPES:
+ case FN_UNO_TEXT_WRAP:
+ case FN_UNO_ANCHOR_TYPE:
+ SwXParagraph::getDefaultTextContentValue(aRet, OUString(), pMap->nWID);
+ break;
default:
if(pFmt)
aRet = aPropSet.getPropertyValue(*pMap, pFmt->GetAttrSet());