summaryrefslogtreecommitdiff
path: root/svx/source/unoedit
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-06-03 11:26:39 +0000
committerKurt Zenker <kz@openoffice.org>2009-06-03 11:26:39 +0000
commit9bd99c08e8662becdd5ac8b47ef6f953c14e65fc (patch)
tree6e24471a44aa535e5b8658b3dc3989437efd525c /svx/source/unoedit
parent5fedf27a120ae92b6474e0d489f3018e8e317f8d (diff)
CWS-TOOLING: integrate CWS os128
2009-04-22 12:58:26 +0200 b_michaelsen r271093 : #i101084# using the frames enumeration for other SwXFrames-queries; also added a complex test to ensure the behavior to be the same 2009-04-20 14:53:03 +0200 mav r270987 : #i101219# adjust the testcases to test memory cache and temporary file cache 2009-04-20 14:52:09 +0200 mav r270986 : #i101219#,#i99077# use memory to cache data; no precopying on commit 2009-04-20 14:39:21 +0200 mav r270984 : #i101219# use memory to cache data 2009-04-20 14:39:08 +0200 mav r270983 : #i101219# use memory to cache data 2009-04-20 14:38:45 +0200 mav r270982 : #i101219# use memory to cache data 2009-04-17 07:37:52 +0200 os r270912 : CWS-TOOLING: rebase CWS os128 to trunk@270723 (milestone: DEV300:m46) 2009-04-15 14:54:18 +0200 b_michaelsen r270845 : #i101084# using frame enumerations for paragraph export for better performance 2009-04-15 14:52:54 +0200 b_michaelsen r270843 : #i101084# implemented XEnumerationAccess interface on framesets 2009-04-03 17:08:10 +0200 mav r270504 : #i100722# do not compress streams of known compressed types per default 2009-04-03 13:49:50 +0200 os r270484 : resync error fixed 2009-04-03 12:55:32 +0200 mav r270470 : #i100722# do not compress streams of known compressed types per default 2009-04-03 10:00:58 +0200 os r270463 : resync error fixed 2009-04-03 09:52:53 +0200 os r270462 : resync error fixed 2009-04-03 09:10:14 +0200 os r270449 : #i99568# string compare operator of hash_map changed 2009-04-03 09:03:49 +0200 os r270446 : #i100683# normalize file URLs 2009-04-02 11:09:27 +0200 os r270381 : #i100683# making URLs relative without file access 2009-04-02 09:04:42 +0200 os r270366 : CWS-TOOLING: rebase CWS os128 to trunk@270033 (milestone: DEV300:m45) 2009-03-31 08:08:37 +0200 os r270258 : #i100683# reducing calls to URIHelper::simpleNormalizeMakeRelative() 2009-03-19 17:06:22 +0100 os r269756 : #i99568# XTolerantMultiPropertySet activated 2009-03-16 11:46:14 +0100 os r269517 : wrong commit to #i97471# removed 2009-03-16 11:36:50 +0100 os r269514 : #i97471# SwDrawTextShell::Init(): mouse double click and key input in group objects at the same time: prevent crash 2009-03-13 11:08:54 +0100 os r269464 : #i99568# static SfxItemPropertySet 2009-03-13 11:03:22 +0100 os r269463 : #i99568# static SfxItemPropertySet 2009-03-11 12:59:27 +0100 os r269320 : #i99568# WhichId of properties handled from ScDocOptionsObj added 2009-03-06 09:09:58 +0100 os r268972 : #i99568# SfxItemPropertySet improvements 2009-03-05 20:54:43 +0100 os r268942 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 20:19:52 +0100 os r268941 : #i99568# SfxItemPropertySet improvements 2009-03-05 20:05:03 +0100 os r268940 : #i99568# SfxItemPropertySet improvements 2009-03-05 18:54:47 +0100 os r268936 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 17:51:38 +0100 os r268931 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 17:33:03 +0100 os r268930 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 15:53:00 +0100 os r268920 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 15:52:50 +0100 os r268919 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 15:50:41 +0100 os r268918 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 15:41:04 +0100 os r268916 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 15:40:40 +0100 os r268915 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 10:16:20 +0100 os r268881 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 10:15:55 +0100 os r268880 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-03 08:40:09 +0100 os r268704 : ScTableSheetObj::GetItemPropertyMap fixed 2009-03-03 07:50:00 +0100 os r268703 : SfxItemProperty set as pointer 2009-03-03 07:49:46 +0100 os r268702 : SfxItemProperty set as pointer 2009-03-02 08:15:37 +0100 os r268631 : minor fix 2009-03-02 07:58:38 +0100 os r268630 : minor fix 2009-02-27 13:03:25 +0100 os r268584 : exports 2009-02-27 11:17:04 +0100 os r268567 : debug code removed 2009-02-27 11:04:07 +0100 os r268565 : duplicate return removed 2009-02-27 10:17:37 +0100 os r268558 : syntax fixed 2009-02-27 09:56:14 +0100 os r268554 : #i99568# type mix fixed 2009-02-27 09:40:56 +0100 os r268553 : #i99568# exports changes reverted 2009-02-25 12:50:54 +0100 os r268433 : #i99568# SfxItemPropertySet rework 2009-02-25 12:13:39 +0100 os r268432 : #i99568# SfxItemPropertySet rework 2009-02-25 12:12:47 +0100 os r268431 : #i99568# SfxItemPropertySet rework 2009-02-25 12:10:27 +0100 os r268430 : #i99568# SfxItemPropertySet rework 2009-02-25 12:09:36 +0100 os r268429 : #i99568# SfxItemPropertySet rework 2009-02-25 12:07:39 +0100 os r268428 : #i99568# SfxItemPropertySet rework 2009-02-25 11:59:35 +0100 os r268427 : #i99568# SfxItemPropertySet rework 2009-02-25 11:52:52 +0100 os r268425 : #i99568# SfxItemPropertySet rework 2009-02-25 11:49:17 +0100 os r268424 : #i99568# SfxItemPropertySet rework 2009-02-25 11:45:17 +0100 os r268423 : #i99568# SfxItemPropertySet rework 2009-02-11 11:39:04 +0100 os r267587 : #i57008# use registration of index marks at SwUnoCallback
Diffstat (limited to 'svx/source/unoedit')
-rw-r--r--svx/source/unoedit/unofield.cxx46
-rw-r--r--svx/source/unoedit/unopracc.cxx4
-rw-r--r--svx/source/unoedit/unotext.cxx179
3 files changed, 102 insertions, 127 deletions
diff --git a/svx/source/unoedit/unofield.cxx b/svx/source/unoedit/unofield.cxx
index 6c6ad758fb91..efb4226f9c12 100644
--- a/svx/source/unoedit/unofield.cxx
+++ b/svx/source/unoedit/unofield.cxx
@@ -81,9 +81,9 @@ public:
OUString msPresentation;
};
-SfxItemPropertyMap* ImplGetFieldItemPropertyMap( sal_Int32 mnId )
+const SfxItemPropertySet* ImplGetFieldItemPropertySet( sal_Int32 mnId )
{
- static SfxItemPropertyMap aExDateTimeFieldPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aExDateTimeFieldPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("DateTime"), WID_DATE, &::getCppuType((const util::DateTime*)0), 0, 0 },
{ MAP_CHAR_LEN("IsFixed"), WID_BOOL1, &::getBooleanCppuType(), 0, 0 },
@@ -91,14 +91,16 @@ SfxItemPropertyMap* ImplGetFieldItemPropertyMap( sal_Int32 mnId )
{ MAP_CHAR_LEN("NumberFormat"), WID_INT32, &::getCppuType((const sal_Int16*)0), 0, 0 },
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aExDateTimeFieldPropertySet_Impl(aExDateTimeFieldPropertyMap_Impl);
- static SfxItemPropertyMap aDateTimeFieldPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aDateTimeFieldPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("IsDate"), WID_BOOL2, &::getBooleanCppuType(), 0, 0 },
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aDateTimeFieldPropertySet_Impl(aDateTimeFieldPropertyMap_Impl);
- static SfxItemPropertyMap aUrlFieldPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aUrlFieldPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("Format"), WID_INT16, &::getCppuType((const sal_Int16*)0), 0, 0 },
@@ -107,21 +109,24 @@ SfxItemPropertyMap* ImplGetFieldItemPropertyMap( sal_Int32 mnId )
{ MAP_CHAR_LEN("URL"), WID_STRING3, &::getCppuType((const OUString*)0), 0, 0 },
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aUrlFieldPropertySet_Impl(aUrlFieldPropertyMap_Impl);
- static SfxItemPropertyMap aEmptyPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aEmptyPropertyMap_Impl[] =
{
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aEmptyPropertySet_Impl(aEmptyPropertyMap_Impl);
- static SfxItemPropertyMap aExtFileFieldPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aExtFileFieldPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("IsFixed"), WID_BOOL1, &::getBooleanCppuType(), 0, 0 },
{ MAP_CHAR_LEN("FileFormat"), WID_INT16, &::getCppuType((const sal_Int16*)0), 0, 0 },
{ MAP_CHAR_LEN("CurrentPresentation"), WID_STRING1,&::getCppuType((const OUString*)0), 0, 0 },
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aExtFileFieldPropertySet_Impl(aExtFileFieldPropertyMap_Impl);
- static SfxItemPropertyMap aAuthorFieldPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aAuthorFieldPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("IsFixed"), WID_BOOL1, &::getBooleanCppuType(), 0, 0 },
{ MAP_CHAR_LEN("CurrentPresentation"), WID_STRING1,&::getCppuType((const OUString*)0), 0, 0 },
@@ -130,29 +135,31 @@ SfxItemPropertyMap* ImplGetFieldItemPropertyMap( sal_Int32 mnId )
{ MAP_CHAR_LEN("FullName"), WID_BOOL2, &::getBooleanCppuType(), 0, 0 },
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aAuthorFieldPropertySet_Impl(aAuthorFieldPropertyMap_Impl);
- static SfxItemPropertyMap aMeasureFieldPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aMeasureFieldPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("Kind"), WID_INT16, &::getCppuType((const sal_Int16*)0), 0, 0 },
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aMeasureFieldPropertySet_Impl(aMeasureFieldPropertyMap_Impl);
switch( mnId )
{
case ID_EXT_DATEFIELD:
case ID_EXT_TIMEFIELD:
- return aExDateTimeFieldPropertyMap_Impl;
+ return &aExDateTimeFieldPropertySet_Impl;
case ID_URLFIELD:
- return aUrlFieldPropertyMap_Impl;
+ return &aUrlFieldPropertySet_Impl;
case ID_DATEFIELD:
case ID_TIMEFIELD:
- return aDateTimeFieldPropertyMap_Impl;
+ return &aDateTimeFieldPropertySet_Impl;
case ID_EXT_FILEFIELD:
- return aExtFileFieldPropertyMap_Impl;
+ return &aExtFileFieldPropertySet_Impl;
case ID_AUTHORFIELD:
- return aAuthorFieldPropertyMap_Impl;
+ return &aAuthorFieldPropertySet_Impl;
case ID_MEASUREFIELD:
- return aMeasureFieldPropertyMap_Impl;
+ return &aMeasureFieldPropertySet_Impl;
// case ID_PAGEFIELD:
// case ID_PAGESFIELD:
// case ID_FILEFIELD:
@@ -161,7 +168,7 @@ SfxItemPropertyMap* ImplGetFieldItemPropertyMap( sal_Int32 mnId )
// case ID_FOOTERFIELD:
// case ID_DATETIMEFIELD::
default:
- return aEmptyPropertyMap_Impl;
+ return &aEmptyPropertySet_Impl;
}
}
@@ -262,7 +269,7 @@ SvxUnoTextField::SvxUnoTextField( sal_Int32 nServiceId ) throw()
, mnServiceId(nServiceId)
, mpImpl( new SvxUnoFieldData_Impl )
{
- mpPropSet = new SfxItemPropertySet( ImplGetFieldItemPropertyMap(mnServiceId) );
+ mpPropSet = ImplGetFieldItemPropertySet(mnServiceId);
memset( &(mpImpl->maDateTime), 0, sizeof( util::DateTime ) );
@@ -388,12 +395,11 @@ SvxUnoTextField::SvxUnoTextField( uno::Reference< text::XTextRange > xAnchor, co
}
}
- mpPropSet = new SfxItemPropertySet( ImplGetFieldItemPropertyMap(mnServiceId) );
+ mpPropSet = ImplGetFieldItemPropertySet(mnServiceId);
}
SvxUnoTextField::~SvxUnoTextField() throw()
{
- delete mpPropSet;
delete mpImpl;
}
@@ -671,7 +677,7 @@ void SAL_CALL SvxUnoTextField::setPropertyValue( const OUString& aPropertyName,
if( mpImpl == NULL )
throw uno::RuntimeException();
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(mpPropSet->getPropertyMap(), aPropertyName );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMap()->getByName( aPropertyName );
if ( !pMap )
throw beans::UnknownPropertyException();
@@ -840,7 +846,7 @@ uno::Any SAL_CALL SvxUnoTextField::getPropertyValue( const OUString& PropertyNam
uno::Any aValue;
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(mpPropSet->getPropertyMap(), PropertyName );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMap()->getByName( PropertyName );
if ( !pMap )
throw beans::UnknownPropertyException();
diff --git a/svx/source/unoedit/unopracc.cxx b/svx/source/unoedit/unopracc.cxx
index 49d117db55ab..bb2547ebc832 100644
--- a/svx/source/unoedit/unopracc.cxx
+++ b/svx/source/unoedit/unopracc.cxx
@@ -63,8 +63,8 @@ using namespace ::com::sun::star;
//
//------------------------------------------------------------------------
-SvxAccessibleTextPropertySet::SvxAccessibleTextPropertySet( const SvxEditSource* pEditSrc, const SfxItemPropertyMap* pPropMap )
- : SvxUnoTextRangeBase( pEditSrc, pPropMap )
+SvxAccessibleTextPropertySet::SvxAccessibleTextPropertySet( const SvxEditSource* pEditSrc, const SvxItemPropertySet* pPropSet )
+ : SvxUnoTextRangeBase( pEditSrc, pPropSet )
{
}
diff --git a/svx/source/unoedit/unotext.cxx b/svx/source/unoedit/unotext.cxx
index b1acb8518786..06c7b5ba55ae 100644
--- a/svx/source/unoedit/unotext.cxx
+++ b/svx/source/unoedit/unotext.cxx
@@ -37,9 +37,6 @@
#ifndef _COM_SUN_STAR_TEXT_XTEXTFIELD_HDL_
#include <com/sun/star/text/XTextField.hdl>
#endif
-//#ifndef _COM_SUN_STAR_BEANS_TOLERANTPROPERTYSETRESULTTYPE_HPP_
-//#include <com/sun/star/beans/TolerantPropertySetResultType.hpp>
-//#endif
#include <vos/mutex.hxx>
#include <svtools/itemset.hxx>
@@ -78,8 +75,36 @@ using namespace ::com::sun::star;
if( rType == ::getCppuType((const uno::Reference< xint >*)0) ) \
return uno::makeAny(uno::Reference< xint >(this))
-extern const SfxItemPropertyMap* ImplGetSvxTextPortionPropertyMap();
-extern const SfxItemPropertyMap* ImplGetSvxUnoOutlinerTextCursorPropertyMap();
+
+extern const SfxItemPropertySet* ImplGetSvxUnoOutlinerTextCursorSfxPropertySet();
+const SfxItemPropertyMapEntry* ImplGetSvxTextPortionPropertyMap()
+{
+ // Propertymap fuer einen Outliner Text
+ static const SfxItemPropertyMapEntry aSvxTextPortionPropertyMap[] =
+ {
+ SVX_UNOEDIT_CHAR_PROPERTIES,
+ SVX_UNOEDIT_FONT_PROPERTIES,
+ SVX_UNOEDIT_OUTLINER_PROPERTIES,
+ SVX_UNOEDIT_PARA_PROPERTIES,
+ {MAP_CHAR_LEN("TextField"), EE_FEATURE_FIELD, &::getCppuType((const uno::Reference< text::XTextField >*)0), beans::PropertyAttribute::READONLY, 0 },
+ {MAP_CHAR_LEN("TextPortionType"), WID_PORTIONTYPE, &::getCppuType((const ::rtl::OUString*)0), beans::PropertyAttribute::READONLY, 0 },
+ {MAP_CHAR_LEN("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {0,0,0,0,0,0}
+ };
+ return aSvxTextPortionPropertyMap;
+}
+const SvxItemPropertySet* ImplGetSvxTextPortionSvxPropertySet()
+{
+ static SvxItemPropertySet aSvxTextPortionPropertySet( ImplGetSvxTextPortionPropertyMap() );
+ return &aSvxTextPortionPropertySet;
+}
+
+const SfxItemPropertySet* ImplGetSvxTextPortionSfxPropertySet()
+{
+ static SfxItemPropertySet aSvxTextPortionSfxPropertySet( ImplGetSvxTextPortionPropertyMap() );
+ return &aSvxTextPortionSfxPropertySet;
+}
// ====================================================================
// helper fuer Item/Property Konvertierung
@@ -204,16 +229,16 @@ static check_me gNumRanges;
UNO3_GETIMPLEMENTATION_IMPL( SvxUnoTextRangeBase );
-SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SfxItemPropertyMap* _pMap ) throw()
-: mpEditSource(NULL) , maPropSet(_pMap)
+SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxItemPropertySet* _pSet ) throw()
+: mpEditSource(NULL) , mpPropSet(_pSet)
{
#ifdef DEBUG
gNumRanges.add(this);
#endif
}
-SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap ) throw()
-: maPropSet(_pMap)
+SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet ) throw()
+: mpPropSet(_pSet)
{
OGuard aGuard( Application::GetSolarMutex() );
@@ -240,7 +265,7 @@ SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxUnoTextRangeBase& rRange ) th
, lang::XServiceInfo()
, text::XTextRangeCompare()
, lang::XUnoTunnel()
-, maPropSet(rRange.getPropertyMap())
+, mpPropSet(rRange.getPropertySet())
{
OGuard aGuard( Application::GetSolarMutex() );
@@ -421,7 +446,7 @@ void SAL_CALL SvxUnoTextRangeBase::setString(const OUString& aString)
uno::Reference< beans::XPropertySetInfo > SAL_CALL SvxUnoTextRangeBase::getPropertySetInfo(void)
throw( uno::RuntimeException )
{
- return maPropSet.getPropertySetInfo();
+ return mpPropSet->getPropertySetInfo();
}
void SAL_CALL SvxUnoTextRangeBase::setPropertyValue(const OUString& PropertyName, const uno::Any& aValue)
@@ -441,7 +466,7 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValue( const OUString& PropertyNa
CheckSelection( maSelection, pForwarder );
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(maPropSet.getPropertyMap(), PropertyName );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName );
if ( pMap )
{
ESelection aSel( GetSelection() );
@@ -491,18 +516,18 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValue( const OUString& PropertyNa
throw beans::UnknownPropertyException();
}
-void SvxUnoTextRangeBase::setPropertyValue( const SfxItemPropertyMap* pMap, const uno::Any& rValue, const ESelection& rSelection, const SfxItemSet& rOldSet, SfxItemSet& rNewSet ) throw( beans::UnknownPropertyException, lang::IllegalArgumentException )
+void SvxUnoTextRangeBase::setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const uno::Any& rValue, const ESelection& rSelection, const SfxItemSet& rOldSet, SfxItemSet& rNewSet ) throw( beans::UnknownPropertyException, lang::IllegalArgumentException )
{
if(!SetPropertyValueHelper( rOldSet, pMap, rValue, rNewSet, &rSelection, (SvxTextEditSource*)GetEditSource() ))
{
// Fuer Teile von zusammengesetzten Items mit mehreren Properties (z.B. Hintergrund)
// muss vorher das alte Item aus dem Dokument geholt werden
rNewSet.Put(rOldSet.Get(pMap->nWID)); // altes Item in neuen Set
- maPropSet.setPropertyValue(pMap, rValue, rNewSet);
+ mpPropSet->setPropertyValue(pMap, rValue, rNewSet);
}
}
-sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const SfxItemPropertyMap* pMap, const uno::Any& aValue, SfxItemSet& rNewSet, const ESelection* pSelection /* = NULL */, SvxTextEditSource* pEditSource /* = NULL*/ ) throw( uno::RuntimeException )
+sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const SfxItemPropertySimpleEntry* pMap, const uno::Any& aValue, SfxItemSet& rNewSet, const ESelection* pSelection /* = NULL */, SvxTextEditSource* pEditSource /* = NULL*/ ) throw( uno::RuntimeException )
{
switch( pMap->nWID )
{
@@ -606,7 +631,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::_getPropertyValue(const OUString& Propert
SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL;
if( pForwarder )
{
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(maPropSet.getPropertyMap(), PropertyName );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName );
if( pMap )
{
SfxItemSet* pAttribs = NULL;
@@ -628,7 +653,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::_getPropertyValue(const OUString& Propert
throw beans::UnknownPropertyException();
}
-void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertyMap* pMap, uno::Any& rAny, const SfxItemSet& rSet ) throw( beans::UnknownPropertyException )
+void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertySimpleEntry* pMap, uno::Any& rAny, const SfxItemSet& rSet ) throw( beans::UnknownPropertyException )
{
switch( pMap->nWID )
{
@@ -669,11 +694,11 @@ void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertyMap* pMap, uno:
default:
if(!GetPropertyValueHelper( *((SfxItemSet*)(&rSet)), pMap, rAny, &maSelection, (SvxTextEditSource*)GetEditSource() ))
- rAny = maPropSet.getPropertyValue(pMap, rSet);
+ rAny = mpPropSet->getPropertyValue(pMap, rSet);
}
}
-sal_Bool SvxUnoTextRangeBase::GetPropertyValueHelper( SfxItemSet& rSet, const SfxItemPropertyMap* pMap, uno::Any& aAny, const ESelection* pSelection /* = NULL */, SvxTextEditSource* pEditSource /* = NULL */ )
+sal_Bool SvxUnoTextRangeBase::GetPropertyValueHelper( SfxItemSet& rSet, const SfxItemPropertySimpleEntry* pMap, uno::Any& aAny, const ESelection* pSelection /* = NULL */, SvxTextEditSource* pEditSource /* = NULL */ )
throw( uno::RuntimeException )
{
switch( pMap->nWID )
@@ -788,34 +813,9 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< ::rt
SfxItemSet* pOldParaSet = NULL;
SfxItemSet* pNewParaSet = NULL;
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMap();
-
- const OUString* pLastPropertyName = 0;
-
for( ; nCount; nCount--, pPropertyNames++, pValues++ )
{
- if( pLastPropertyName )
- {
- sal_Int32 nComp = pLastPropertyName->compareTo( *pPropertyNames );
- if( nComp < 0 )
- {
- if(pMap)
- pMap++;
- else
- pMap = maPropSet.getPropertyMap();
- }
- else if( nComp > 0 )
- {
- pMap = maPropSet.getPropertyMap();
- }
- else
- {
- DBG_ERROR( "svx::SvxUnoTextRangeBase::_setPropertyValues(), duplicate property in parameter sequence!" );
- }
- }
-
- pLastPropertyName = pPropertyNames;
- pMap = SfxItemPropertyMap::GetByName(pMap, *pPropertyNames );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry( *pPropertyNames );
if( pMap )
{
@@ -930,34 +930,9 @@ uno::Sequence< uno::Any > SAL_CALL SvxUnoTextRangeBase::_getPropertyValues( cons
const OUString* pPropertyNames = aPropertyNames.getConstArray();
uno::Any* pValues = aValues.getArray();
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMap();
-
- const OUString* pLastPropertyName = 0;
-
for( ; nCount; nCount--, pPropertyNames++, pValues++ )
{
- if( pLastPropertyName )
- {
- sal_Int32 nComp = pLastPropertyName->compareTo( *pPropertyNames );
- if( nComp < 0 )
- {
- if(pMap)
- pMap++;
- else
- pMap = maPropSet.getPropertyMap();
- }
- else if( nComp > 0 )
- {
- pMap = maPropSet.getPropertyMap();
- }
- else
- {
- DBG_ERROR( "svx::SvxUnoTextRangeBase::_getPropertyValues(), duplicate property in parameter sequence!" );
- }
- }
-
- pLastPropertyName = pPropertyNames;
- pMap = SfxItemPropertyMap::GetByName(pMap, *pPropertyNames );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry( *pPropertyNames );
if( pMap )
{
getPropertyValue( pMap, *pValues, *pAttribs );
@@ -994,7 +969,7 @@ static sal_uInt16 aSvxUnoFontDescriptorWhichMap[] = { EE_CHAR_FONTINFO, EE_CHAR_
EE_CHAR_UNDERLINE, EE_CHAR_WEIGHT, EE_CHAR_STRIKEOUT,
EE_CHAR_WLM, 0 };
-beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxItemPropertyMap* pMap, sal_Int32 nPara)
+beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxItemPropertySimpleEntry* pMap, sal_Int32 nPara)
throw( beans::UnknownPropertyException, uno::RuntimeException )
{
if ( pMap )
@@ -1090,7 +1065,7 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const OUStr
{
OGuard aGuard( Application::GetSolarMutex() );
- return _getPropertyState(SfxItemPropertyMap::GetByName(maPropSet.getPropertyMap(), PropertyName ), nPara);
+ return _getPropertyState( mpPropSet->getPropertyMapEntry( PropertyName ), nPara);
}
uno::Sequence< beans::PropertyState > SAL_CALL SvxUnoTextRangeBase::getPropertyStates( const uno::Sequence< OUString >& aPropertyName )
@@ -1124,22 +1099,15 @@ uno::Sequence< beans::PropertyState > SvxUnoTextRangeBase::_getPropertyStates(co
}
sal_Bool bUnknownPropertyFound = sal_False;
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMap();
for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++ )
{
- pMap = SfxItemPropertyMap::GetByName(pMap, *pNames++ );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry( *pNames++ );
if( NULL == pMap )
{
bUnknownPropertyFound = sal_True;
break;
}
-
bUnknownPropertyFound = !_getOnePropertyStates(pSet, pMap, *pState++);
-
- if (pMap)
- pMap++;
- else
- pMap = maPropSet.getPropertyMap();
}
delete pSet;
@@ -1151,7 +1119,7 @@ uno::Sequence< beans::PropertyState > SvxUnoTextRangeBase::_getPropertyStates(co
return aRet;
}
-sal_Bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const SfxItemPropertyMap* pMap, beans::PropertyState& rState)
+sal_Bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const SfxItemPropertySimpleEntry* pMap, beans::PropertyState& rState)
{
sal_Bool bUnknownPropertyFound = sal_False;
if(pSet && pMap)
@@ -1314,7 +1282,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyDefault( const OUString& aProp
SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL;
if( pForwarder )
{
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(maPropSet.getPropertyMap(), aPropertyName );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry( aPropertyName );
if( pMap )
{
SfxItemPool* pPool = pForwarder->GetPool();
@@ -1343,7 +1311,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyDefault( const OUString& aProp
{
SfxItemSet aSet( *pPool, pMap->nWID, pMap->nWID);
aSet.Put(pPool->GetDefaultItem(pMap->nWID));
- return maPropSet.getPropertyValue(pMap, aSet);
+ return mpPropSet->getPropertyValue(pMap, aSet);
}
}
}
@@ -1613,7 +1581,7 @@ uno::Reference< uno::XInterface > SvxUnoTextRange_NewInstance()
}
SvxUnoTextRange::SvxUnoTextRange( const SvxUnoTextBase& rParent, sal_Bool bPortion /* = sal_False */ ) throw()
-:SvxUnoTextRangeBase( rParent.GetEditSource(), bPortion ? ImplGetSvxTextPortionPropertyMap() : rParent.getPropertyMap() ),
+:SvxUnoTextRangeBase( rParent.GetEditSource(), bPortion ? ImplGetSvxTextPortionSvxPropertySet() : rParent.getPropertySet() ),
mbPortion( bPortion )
{
xParentText = (text::XText*)&rParent;
@@ -1723,21 +1691,21 @@ SvxUnoTextBase::SvxUnoTextBase() throw()
}
-SvxUnoTextBase::SvxUnoTextBase( const SfxItemPropertyMap* _pMap ) throw()
-: SvxUnoTextRangeBase( _pMap )
+SvxUnoTextBase::SvxUnoTextBase( const SvxItemPropertySet* _pSet ) throw()
+: SvxUnoTextRangeBase( _pSet )
{
}
-SvxUnoTextBase::SvxUnoTextBase( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap ) throw()
-: SvxUnoTextRangeBase( pSource, _pMap )
+SvxUnoTextBase::SvxUnoTextBase( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet ) throw()
+: SvxUnoTextRangeBase( pSource, _pSet )
{
ESelection aSelection;
::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
SetSelection( aSelection );
}
-SvxUnoTextBase::SvxUnoTextBase( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap, uno::Reference < text::XText > xParent ) throw()
-: SvxUnoTextRangeBase( pSource, _pMap )
+SvxUnoTextBase::SvxUnoTextBase( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet, uno::Reference < text::XText > xParent ) throw()
+: SvxUnoTextRangeBase( pSource, _pSet )
{
xParentText = xParent;
ESelection aSelection;
@@ -2131,17 +2099,16 @@ void SAL_CALL SvxUnoTextBase::moveTextRange( const uno::Reference< text::XTextRa
void SvxPropertyValuesToItemSet(
SfxItemSet &rItemSet,
const uno::Sequence< beans::PropertyValue > rPropertyVaules,
- const SfxItemPropertyMap &rMap,
+ const SfxItemPropertySet *pPropSet,
SvxTextForwarder *pForwarder /*needed for WID_NUMLEVEL*/,
USHORT nPara /*needed for WID_NUMLEVEL*/)
throw(lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException)
{
- SfxItemPropertySet aPropSet( &rMap );
sal_Int32 nProps = rPropertyVaules.getLength();
const beans::PropertyValue *pProps = rPropertyVaules.getConstArray();
for (sal_Int32 i = 0; i < nProps; ++i)
{
- const SfxItemPropertyMap *pEntry = SfxItemPropertyMap::GetByName( &rMap, pProps[i].Name );
+ const SfxItemPropertySimpleEntry *pEntry = pPropSet->getPropertyMap()->getByName( pProps[i].Name );
if (pEntry)
{
// Note: there is no need to take special care of the properties
@@ -2195,7 +2162,7 @@ void SvxPropertyValuesToItemSet(
}
}
else
- aPropSet.setPropertyValue( *pEntry, pProps[i].Value, rItemSet );
+ pPropSet->setPropertyValue( pProps[i].Name, pProps[i].Value, rItemSet );
}
else
throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pProps[i].Name, static_cast < cppu::OWeakObject * > ( 0 ) );
@@ -2220,8 +2187,10 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::appendParagraph(
// set properties for new appended (now last) paragraph
ESelection aSel( nParaCount, 0, nParaCount, 0 );
SfxItemSet aItemSet( *pTextForwarder->GetEmptyItemSetPtr() );
- const SfxItemPropertyMap *pMap = ImplGetSvxUnoOutlinerTextCursorPropertyMap();
- SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps, *pMap, pTextForwarder, nParaCount );
+ SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps,
+ ImplGetSvxUnoOutlinerTextCursorSfxPropertySet(),
+ pTextForwarder,
+ nParaCount );
pTextForwarder->QuickSetAttribs( aItemSet, aSel );
pEditSource->UpdateData();
SvxUnoTextRange* pRange = new SvxUnoTextRange( *this );
@@ -2250,8 +2219,8 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::finishParagraph(
USHORT nPara = nParaCount - 1;
ESelection aSel( nPara, 0, nPara, 0 );
SfxItemSet aItemSet( *pTextForwarder->GetEmptyItemSetPtr() );
- const SfxItemPropertyMap *pMap = ImplGetSvxUnoOutlinerTextCursorPropertyMap();
- SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps, *pMap, pTextForwarder, nPara );
+ SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps,
+ ImplGetSvxUnoOutlinerTextCursorSfxPropertySet(), pTextForwarder, nPara );
pTextForwarder->QuickSetAttribs( aItemSet, aSel );
pEditSource->UpdateData();
SvxUnoTextRange* pRange = new SvxUnoTextRange( *this );
@@ -2288,8 +2257,8 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::appendTextPortion(
pEditSource->UpdateData();
SfxItemSet aItemSet( *pTextForwarder->GetEmptyItemSetPtr() );
- const SfxItemPropertyMap *pMap = ImplGetSvxTextPortionPropertyMap();
- SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps, *pMap, pTextForwarder, nPara );
+ SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps,
+ ImplGetSvxTextPortionSfxPropertySet(), pTextForwarder, nPara );
pTextForwarder->QuickSetAttribs( aItemSet, aSel );
SvxUnoTextRange* pRange = new SvxUnoTextRange( *this );
xRet = pRange;
@@ -2399,13 +2368,13 @@ SvxUnoText::SvxUnoText( ) throw()
{
}
-SvxUnoText::SvxUnoText( const SfxItemPropertyMap* _pMap ) throw()
-: SvxUnoTextBase( _pMap )
+SvxUnoText::SvxUnoText( const SvxItemPropertySet* _pSet ) throw()
+: SvxUnoTextBase( _pSet )
{
}
-SvxUnoText::SvxUnoText( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap, uno::Reference < text::XText > xParent ) throw()
-: SvxUnoTextBase( pSource, _pMap, xParent )
+SvxUnoText::SvxUnoText( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet, uno::Reference < text::XText > xParent ) throw()
+: SvxUnoTextBase( pSource, _pSet, xParent )
{
}