summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/source/controller/inc/ItemConverter.hxx2
-rw-r--r--sc/inc/cellsuno.hxx42
-rw-r--r--sc/inc/collect.hxx30
-rw-r--r--sc/inc/defltuno.hxx2
-rw-r--r--sc/inc/docoptio.hxx1
-rw-r--r--sc/inc/docuno.hxx2
-rw-r--r--sc/inc/fielduno.hxx4
-rw-r--r--sc/inc/funcuno.hxx1
-rw-r--r--sc/inc/optuno.hxx17
-rw-r--r--sc/inc/styleuno.hxx7
-rw-r--r--sc/source/core/data/dptabsrc.cxx8
-rw-r--r--sc/source/ui/unoobj/addruno.cxx4
-rw-r--r--sc/source/ui/unoobj/afmtuno.cxx42
-rw-r--r--sc/source/ui/unoobj/appluno.cxx4
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx590
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx8
-rw-r--r--sc/source/ui/unoobj/confuno.cxx4
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx12
-rw-r--r--sc/source/ui/unoobj/datauno.cxx12
-rw-r--r--sc/source/ui/unoobj/defltuno.cxx70
-rw-r--r--sc/source/ui/unoobj/docuno.cxx42
-rw-r--r--sc/source/ui/unoobj/fielduno.cxx34
-rw-r--r--sc/source/ui/unoobj/fmtuno.cxx4
-rw-r--r--sc/source/ui/unoobj/funcuno.cxx9
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx4
-rw-r--r--sc/source/ui/unoobj/nameuno.cxx4
-rw-r--r--sc/source/ui/unoobj/notesuno.cxx14
-rw-r--r--sc/source/ui/unoobj/optuno.cxx227
-rw-r--r--sc/source/ui/unoobj/shapeuno.cxx4
-rw-r--r--sc/source/ui/unoobj/srchuno.cxx6
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx196
-rw-r--r--sc/source/ui/unoobj/targuno.cxx4
-rw-r--r--sc/source/ui/unoobj/textuno.cxx16
-rw-r--r--sc/source/ui/unoobj/tokenuno.cxx4
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx4
-rw-r--r--sc/source/ui/view/viewfunc.cxx14
36 files changed, 700 insertions, 748 deletions
diff --git a/chart2/source/controller/inc/ItemConverter.hxx b/chart2/source/controller/inc/ItemConverter.hxx
index 9f21d00dd0a1..e55456519cd1 100644
--- a/chart2/source/controller/inc/ItemConverter.hxx
+++ b/chart2/source/controller/inc/ItemConverter.hxx
@@ -38,8 +38,6 @@
// for pair
#include <utility>
-struct SfxItemPropertyMap;
-
namespace comphelper
{
diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
index 07789d47f363..e73869489ebc 100644
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -112,7 +112,7 @@ class ScPatternAttr;
class SvxBorderLine;
class SvxBoxItem;
class SvxBoxInfoItem;
-
+class SvxItemPropertySet;
class ScLinkListener : public SvtListener
{
@@ -178,7 +178,7 @@ class SC_DLLPUBLIC ScCellRangesBase : public com::sun::star::beans::XPropertySet
friend class ooo::vba::ScVbaCellRangeAccess;
private:
- SfxItemPropertySet aPropSet;
+ const SfxItemPropertySet* pPropSet;
ScDocShell* pDocShell;
ScLinkListener* pValueListener;
ScPatternAttr* pCurrentFlat;
@@ -221,11 +221,11 @@ protected:
// GetItemPropertyMap for derived classes must contain all entries, including base class
virtual const SfxItemPropertyMap* GetItemPropertyMap();
virtual ::com::sun::star::beans::PropertyState GetOnePropertyState(
- USHORT nItemWhich, const SfxItemPropertyMap* pMap );
- virtual void GetOnePropertyValue( const SfxItemPropertyMap* pMap,
+ USHORT nItemWhich, const SfxItemPropertySimpleEntry* pEntry );
+ virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
::com::sun::star::uno::Any& )
throw(::com::sun::star::uno::RuntimeException);
- virtual void SetOnePropertyValue( const SfxItemPropertyMap* pMap,
+ virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
const ::com::sun::star::uno::Any& aValue )
throw(::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException);
@@ -610,16 +610,16 @@ class SC_DLLPUBLIC ScCellRangeObj : public ScCellRangesBase,
public com::sun::star::table::XColumnRowRange
{
private:
- SfxItemPropertySet aRangePropSet;
+ const SfxItemPropertySet* pRangePropSet;
ScRange aRange;
protected:
const ScRange& GetRange() const { return aRange; }
virtual const SfxItemPropertyMap* GetItemPropertyMap();
- virtual void GetOnePropertyValue( const SfxItemPropertyMap* pMap,
+ virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
::com::sun::star::uno::Any& )
throw(::com::sun::star::uno::RuntimeException);
- virtual void SetOnePropertyValue( const SfxItemPropertyMap* pMap,
+ virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
const ::com::sun::star::uno::Any& aValue )
throw(::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException);
@@ -825,7 +825,7 @@ class ScCellObj : public ScCellRangeObj,
{
private:
SvxUnoText* pUnoText;
- SfxItemPropertySet aCellPropSet;
+ const SfxItemPropertySet* pCellPropSet;
ScAddress aCellPos;
sal_Int16 nActionLockCount;
@@ -839,16 +839,16 @@ private:
protected:
virtual const SfxItemPropertyMap* GetItemPropertyMap();
- virtual void GetOnePropertyValue( const SfxItemPropertyMap* pMap,
+ virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
::com::sun::star::uno::Any& )
throw(::com::sun::star::uno::RuntimeException);
- virtual void SetOnePropertyValue( const SfxItemPropertyMap* pMap,
+ virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
const ::com::sun::star::uno::Any& aValue )
throw(::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException);
public:
- static const SfxItemPropertyMap* GetEditPropertyMap();
+ static const SvxItemPropertySet* GetEditPropertySet();
static const SfxItemPropertyMap* GetCellPropertyMap();
ScCellObj(ScDocShell* pDocSh, const ScAddress& rP);
@@ -1006,17 +1006,17 @@ class ScTableSheetObj : public ScCellRangeObj,
friend class ScTableSheetsObj; // fuer insertByName()
private:
- SfxItemPropertySet aSheetPropSet;
+ const SfxItemPropertySet* pSheetPropSet;
SCTAB GetTab_Impl() const;
void PrintAreaUndo_Impl( ScPrintRangeSaver* pOldRanges );
protected:
virtual const SfxItemPropertyMap* GetItemPropertyMap();
- virtual void GetOnePropertyValue( const SfxItemPropertyMap* pMap,
+ virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
::com::sun::star::uno::Any& )
throw(::com::sun::star::uno::RuntimeException);
- virtual void SetOnePropertyValue( const SfxItemPropertyMap* pMap,
+ virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
const ::com::sun::star::uno::Any& aValue )
throw(::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException);
@@ -1240,14 +1240,14 @@ class ScTableColumnObj : public ScCellRangeObj,
public com::sun::star::container::XNamed
{
private:
- SfxItemPropertySet aColPropSet;
+ const SfxItemPropertySet* pColPropSet;
protected:
virtual const SfxItemPropertyMap* GetItemPropertyMap();
- virtual void GetOnePropertyValue( const SfxItemPropertyMap* pMap,
+ virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
::com::sun::star::uno::Any& )
throw(::com::sun::star::uno::RuntimeException);
- virtual void SetOnePropertyValue( const SfxItemPropertyMap* pMap,
+ virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
const ::com::sun::star::uno::Any& aValue )
throw(::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException);
@@ -1291,14 +1291,14 @@ public:
class ScTableRowObj : public ScCellRangeObj
{
private:
- SfxItemPropertySet aRowPropSet;
+ const SfxItemPropertySet* pRowPropSet;
protected:
virtual const SfxItemPropertyMap* GetItemPropertyMap();
- virtual void GetOnePropertyValue( const SfxItemPropertyMap* pMap,
+ virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
::com::sun::star::uno::Any& )
throw(::com::sun::star::uno::RuntimeException);
- virtual void SetOnePropertyValue( const SfxItemPropertyMap* pMap,
+ virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
const ::com::sun::star::uno::Any& aValue )
throw(::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException);
diff --git a/sc/inc/collect.hxx b/sc/inc/collect.hxx
index 855d436f2ff9..de6539b08311 100644
--- a/sc/inc/collect.hxx
+++ b/sc/inc/collect.hxx
@@ -53,8 +53,8 @@ class SC_DLLPUBLIC ScDataObject
{
public:
ScDataObject() {}
- virtual ~ScDataObject();
- virtual ScDataObject* Clone() const = 0;
+ virtual ~ScDataObject();
+ virtual ScDataObject* Clone() const = 0;
};
class SC_DLLPUBLIC ScCollection : public ScDataObject
@@ -65,29 +65,29 @@ protected:
USHORT nDelta;
ScDataObject** pItems;
public:
- ScCollection(USHORT nLim = 4, USHORT nDel = 4);
- ScCollection(const ScCollection& rCollection);
+ ScCollection(USHORT nLim = 4, USHORT nDel = 4);
+ ScCollection(const ScCollection& rCollection);
virtual ~ScCollection();
virtual ScDataObject* Clone() const;
- void AtFree(USHORT nIndex);
- void Free(ScDataObject* pScDataObject);
- void FreeAll();
+ void AtFree(USHORT nIndex);
+ void Free(ScDataObject* pScDataObject);
+ void FreeAll();
- BOOL AtInsert(USHORT nIndex, ScDataObject* pScDataObject);
+ BOOL AtInsert(USHORT nIndex, ScDataObject* pScDataObject);
virtual BOOL Insert(ScDataObject* pScDataObject);
- ScDataObject* At(USHORT nIndex) const;
+ ScDataObject* At(USHORT nIndex) const;
virtual USHORT IndexOf(ScDataObject* pScDataObject) const;
- USHORT GetCount() const { return nCount; }
+ USHORT GetCount() const { return nCount; }
ScDataObject* operator[]( const USHORT nIndex) const {return At(nIndex);}
ScCollection& operator=( const ScCollection& rCol );
};
-class SC_DLLPUBLIC ScSortedCollection : public ScCollection
+class SC_DLLPUBLIC ScSortedCollection : public ScCollection
{
private:
BOOL bDuplicates;
@@ -96,19 +96,19 @@ protected:
void SetDups( BOOL bVal ) { bDuplicates = bVal; }
BOOL IsDups() const { return bDuplicates; }
public:
- ScSortedCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE);
- ScSortedCollection(const ScSortedCollection& rScSortedCollection) :
+ ScSortedCollection(USHORT nLim = 4, USHORT nDel = 4, BOOL bDup = FALSE);
+ ScSortedCollection(const ScSortedCollection& rScSortedCollection) :
ScCollection(rScSortedCollection),
bDuplicates(rScSortedCollection.bDuplicates) {}
virtual USHORT IndexOf(ScDataObject* pScDataObject) const;
virtual short Compare(ScDataObject* pKey1, ScDataObject* pKey2) const = 0;
virtual BOOL IsEqual(ScDataObject* pKey1, ScDataObject* pKey2) const;
- BOOL Search(ScDataObject* pScDataObject, USHORT& rIndex) const;
+ BOOL Search(ScDataObject* pScDataObject, USHORT& rIndex) const;
virtual BOOL Insert(ScDataObject* pScDataObject);
virtual BOOL InsertPos(ScDataObject* pScDataObject, USHORT& nIndex);
- BOOL operator==(const ScSortedCollection& rCmp) const;
+ BOOL operator==(const ScSortedCollection& rCmp) const;
};
diff --git a/sc/inc/defltuno.hxx b/sc/inc/defltuno.hxx
index 676f9f7b8a00..2f33dcdb3f48 100644
--- a/sc/inc/defltuno.hxx
+++ b/sc/inc/defltuno.hxx
@@ -36,6 +36,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <cppuhelper/implbase3.hxx>
+#include <svtools/itemprop.hxx>
class ScDocShell;
@@ -48,6 +49,7 @@ class ScDocDefaultsObj : public ::cppu::WeakImplHelper3<
{
private:
ScDocShell* pDocShell;
+ SfxItemPropertyMap aPropertyMap;
void ItemsChanged();
diff --git a/sc/inc/docoptio.hxx b/sc/inc/docoptio.hxx
index e161e3e02428..325060f0c05a 100644
--- a/sc/inc/docoptio.hxx
+++ b/sc/inc/docoptio.hxx
@@ -33,6 +33,7 @@
#include <unotools/configitem.hxx>
#include <svtools/poolitem.hxx>
+#include <svtools/itemprop.hxx>
#include "scdllapi.h"
#include "optutil.hxx"
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index 36a152943782..3f960e446611 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -112,6 +112,8 @@ private:
ScMarkData& rMark, ScPrintSelectionStatus& rStatus ) const;
rtl::OUString maBuildId;
+protected:
+ const SfxItemPropertySet& GetPropertySet() const { return aPropSet; }
public:
ScModelObj(ScDocShell* pDocSh);
diff --git a/sc/inc/fielduno.hxx b/sc/inc/fielduno.hxx
index d716e857188d..d4319bcba50e 100644
--- a/sc/inc/fielduno.hxx
+++ b/sc/inc/fielduno.hxx
@@ -138,7 +138,7 @@ class ScCellFieldObj : public ScMutexHelper,
public SfxListener
{
private:
- SfxItemPropertySet aPropSet;
+ const SfxItemPropertySet* pPropSet;
ScDocShell* pDocShell;
ScAddress aCellPos;
SvxEditSource* pEditSource;
@@ -337,7 +337,7 @@ class ScHeaderFieldObj : public ScMutexHelper,
public ::com::sun::star::lang::XServiceInfo
{
private:
- SfxItemPropertySet aPropSet;
+ const SfxItemPropertySet* pPropSet;
ScHeaderFooterContentObj* pContentObj;
USHORT nPart;
UINT16 nType;
diff --git a/sc/inc/funcuno.hxx b/sc/inc/funcuno.hxx
index 1ffcdb214ad2..2e5e167bc988 100644
--- a/sc/inc/funcuno.hxx
+++ b/sc/inc/funcuno.hxx
@@ -74,6 +74,7 @@ class ScFunctionAccess : public cppu::WeakImplHelper3<
private:
ScTempDocCache aDocCache;
ScDocOptions* pOptions;
+ SfxItemPropertyMap aPropertyMap;
BOOL bInvalid;
public:
diff --git a/sc/inc/optuno.hxx b/sc/inc/optuno.hxx
index b454770ee450..648fc182a6a2 100644
--- a/sc/inc/optuno.hxx
+++ b/sc/inc/optuno.hxx
@@ -34,17 +34,32 @@
#include "docuno.hxx"
#include "docoptio.hxx"
+#define PROP_UNO_CALCASSHOWN 1
+#define PROP_UNO_DEFTABSTOP 2
+#define PROP_UNO_IGNORECASE 3
+#define PROP_UNO_ITERENABLED 4
+#define PROP_UNO_ITERCOUNT 5
+#define PROP_UNO_ITEREPSILON 6
+#define PROP_UNO_LOOKUPLABELS 7
+#define PROP_UNO_MATCHWHOLE 8
+#define PROP_UNO_NULLDATE 9
+#define PROP_UNO_SPELLONLINE 10
+#define PROP_UNO_STANDARDDEC 11
+#define PROP_UNO_REGEXENABLED 12
+
class ScDocOptionsHelper
{
public:
- static const SfxItemPropertyMap* GetPropertyMap();
+ static const SfxItemPropertyMapEntry* GetPropertyMap();
static sal_Bool setPropertyValue( ScDocOptions& rOptions,
+ const SfxItemPropertyMap& rPropMap,
const ::rtl::OUString& aPropertyName,
const ::com::sun::star::uno::Any& aValue );
static ::com::sun::star::uno::Any getPropertyValue(
const ScDocOptions& rOptions,
+ const SfxItemPropertyMap& rPropMap,
const ::rtl::OUString& PropertyName );
};
diff --git a/sc/inc/styleuno.hxx b/sc/inc/styleuno.hxx
index 7c5da1d82f8f..5fb28db3239a 100644
--- a/sc/inc/styleuno.hxx
+++ b/sc/inc/styleuno.hxx
@@ -224,14 +224,15 @@ class ScStyleObj : public ::cppu::WeakImplHelper7<
public SfxListener
{
private:
- SfxItemPropertySet aPropSet;
+ const SfxItemPropertySet* pPropSet;
ScDocShell* pDocShell;
SfxStyleFamily eFamily; // Familie
String aStyleName;
SfxStyleSheetBase* GetStyle_Impl();
- const SfxItemSet* GetStyleItemSet_Impl( const String& rPropName, const SfxItemPropertyMap*& rpMapEntry );
- void SetOnePropertyValue( const SfxItemPropertyMap* pMap,
+ const SfxItemSet* GetStyleItemSet_Impl( const ::rtl::OUString& rPropName, const SfxItemPropertySimpleEntry*& rpEntry );
+ void SetOnePropertyValue( const ::rtl::OUString& rPropertyName,
+ const SfxItemPropertySimpleEntry* pEntry,
const ::com::sun::star::uno::Any* pValue )
throw(::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException);
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index 83c90a4bd946..5fa5c393df37 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -1133,7 +1133,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDPSource::getPropertySetInfo(
{
ScUnoGuard aGuard;
- static SfxItemPropertyMap aDPSourceMap_Impl[] =
+ static SfxItemPropertyMapEntry aDPSourceMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNO_COLGRAND), 0, &getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_DATADESC), 0, &getCppuType((rtl::OUString*)0), beans::PropertyAttribute::READONLY, 0 },
@@ -1512,7 +1512,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDPDimension::getPropertySetIn
{
ScUnoGuard aGuard;
- static SfxItemPropertyMap aDPDimensionMap_Impl[] =
+ static SfxItemPropertyMapEntry aDPDimensionMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNO_FILTER), 0, &getCppuType((uno::Sequence<sheet::TableFilterField>*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_FUNCTION), 0, &getCppuType((sheet::GeneralFunction*)0), 0, 0 },
@@ -2197,7 +2197,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDPLevel::getPropertySetInfo()
{
ScUnoGuard aGuard;
- static SfxItemPropertyMap aDPLevelMap_Impl[] =
+ static SfxItemPropertyMapEntry aDPLevelMap_Impl[] =
{
//! change type of AutoShow/Layout/Sorting to API struct when available
{MAP_CHAR_LEN(SC_UNO_AUTOSHOW), 0, &getCppuType((sheet::DataPilotFieldAutoShowInfo*)0), 0, 0 },
@@ -2664,7 +2664,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDPMember::getPropertySetInfo(
{
ScUnoGuard aGuard;
- static SfxItemPropertyMap aDPMemberMap_Impl[] =
+ static SfxItemPropertyMapEntry aDPMemberMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNO_ISVISIBL), 0, &getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_POSITION), 0, &getCppuType((sal_Int32*)0), 0, 0 },
diff --git a/sc/source/ui/unoobj/addruno.cxx b/sc/source/ui/unoobj/addruno.cxx
index 996ec359048c..a3b026396942 100644
--- a/sc/source/ui/unoobj/addruno.cxx
+++ b/sc/source/ui/unoobj/addruno.cxx
@@ -115,7 +115,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAddressConversionObj::getProp
if ( bIsRange )
{
- static SfxItemPropertyMap aPropertyMap[] =
+ static SfxItemPropertyMapEntry aPropertyMap[] =
{
{MAP_CHAR_LEN(SC_UNONAME_ADDRESS), 0, &getCppuType((table::CellRangeAddress*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_PERSREPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
@@ -128,7 +128,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAddressConversionObj::getProp
}
else
{
- static SfxItemPropertyMap aPropertyMap[] =
+ static SfxItemPropertyMapEntry aPropertyMap[] =
{
{MAP_CHAR_LEN(SC_UNONAME_ADDRESS), 0, &getCppuType((table::CellAddress*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_PERSREPR), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx
index 7acaf77729ca..d7f1eb13c1b2 100644
--- a/sc/source/ui/unoobj/afmtuno.cxx
+++ b/sc/source/ui/unoobj/afmtuno.cxx
@@ -85,9 +85,9 @@ using namespace ::com::sun::star;
// AutoFormat-Map nur fuer PropertySetInfo, ohne Which-IDs
-const SfxItemPropertyMap* lcl_GetAutoFormatMap()
+const SfxItemPropertyMapEntry* lcl_GetAutoFormatMap()
{
- static SfxItemPropertyMap aAutoFormatMap_Impl[] =
+ static SfxItemPropertyMapEntry aAutoFormatMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_INCBACK), 0, &::getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_INCBORD), 0, &::getBooleanCppuType(), 0, 0 },
@@ -103,9 +103,9 @@ const SfxItemPropertyMap* lcl_GetAutoFormatMap()
//! Zahlformat (String/Language) ??? (in XNumberFormat nur ReadOnly)
//! table::TableBorder ??!?
-const SfxItemPropertyMap* lcl_GetAutoFieldMap()
+const SfxItemPropertyMapEntry* lcl_GetAutoFieldMap()
{
- static SfxItemPropertyMap aAutoFieldMap_Impl[] =
+ static SfxItemPropertyMapEntry aAutoFieldMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_CELLBACK), ATTR_BACKGROUND, &::getCppuType((const sal_Int32*)0), 0, MID_BACK_COLOR },
{MAP_CHAR_LEN(SC_UNONAME_CCOLOR), ATTR_FONT_COLOR, &::getCppuType((const sal_Int32*)0), 0, 0 },
@@ -735,21 +735,20 @@ void SAL_CALL ScAutoFormatFieldObj::setPropertyValue(
{
ScUnoGuard aGuard;
ScAutoFormat* pFormats = ScGlobal::GetAutoFormat();
- String aPropString(aPropertyName);
- const SfxItemPropertyMap* pMap =
- SfxItemPropertyMap::GetByName( lcl_GetAutoFieldMap(), aPropString );
+ const SfxItemPropertySimpleEntry* pEntry =
+ aPropSet.getPropertyMap()->getByName( aPropertyName );
- if ( pMap && pMap->nWID && pFormats && nFormatIndex < pFormats->GetCount() )
+ if ( pEntry && pEntry->nWID && pFormats && nFormatIndex < pFormats->GetCount() )
{
ScAutoFormatData* pData = (*pFormats)[nFormatIndex];
- if ( IsScItemWid( pMap->nWID ) )
+ if ( IsScItemWid( pEntry->nWID ) )
{
- if( const SfxPoolItem* pItem = pData->GetItem( nFieldIndex, pMap->nWID ) )
+ if( const SfxPoolItem* pItem = pData->GetItem( nFieldIndex, pEntry->nWID ) )
{
sal_Bool bDone = sal_False;
- switch( pMap->nWID )
+ switch( pEntry->nWID )
{
case ATTR_STACKED:
{
@@ -783,7 +782,7 @@ void SAL_CALL ScAutoFormatFieldObj::setPropertyValue(
break;
default:
SfxPoolItem* pNewItem = pItem->Clone();
- bDone = pNewItem->PutValue( aValue, pMap->nMemberId );
+ bDone = pNewItem->PutValue( aValue, pEntry->nMemberId );
if (bDone)
pData->PutItem( nFieldIndex, *pNewItem );
delete pNewItem;
@@ -796,7 +795,7 @@ void SAL_CALL ScAutoFormatFieldObj::setPropertyValue(
}
else
{
- switch (pMap->nWID)
+ switch (pEntry->nWID)
{
case SC_WID_UNO_TBLBORD:
{
@@ -826,19 +825,18 @@ uno::Any SAL_CALL ScAutoFormatFieldObj::getPropertyValue( const rtl::OUString& a
uno::Any aVal;
ScAutoFormat* pFormats = ScGlobal::GetAutoFormat();
- String aPropString(aPropertyName);
- const SfxItemPropertyMap* pMap =
- SfxItemPropertyMap::GetByName( lcl_GetAutoFieldMap(), aPropString );
+ const SfxItemPropertySimpleEntry* pEntry =
+ aPropSet.getPropertyMap()->getByName( aPropertyName );
- if ( pMap && pMap->nWID && pFormats && nFormatIndex < pFormats->GetCount() )
+ if ( pEntry && pEntry->nWID && pFormats && nFormatIndex < pFormats->GetCount() )
{
const ScAutoFormatData* pData = (*pFormats)[nFormatIndex];
- if ( IsScItemWid( pMap->nWID ) )
+ if ( IsScItemWid( pEntry->nWID ) )
{
- if( const SfxPoolItem* pItem = pData->GetItem( nFieldIndex, pMap->nWID ) )
+ if( const SfxPoolItem* pItem = pData->GetItem( nFieldIndex, pEntry->nWID ) )
{
- switch( pMap->nWID )
+ switch( pEntry->nWID )
{
case ATTR_STACKED:
{
@@ -849,13 +847,13 @@ uno::Any SAL_CALL ScAutoFormatFieldObj::getPropertyValue( const rtl::OUString& a
}
break;
default:
- pItem->QueryValue( aVal, pMap->nMemberId );
+ pItem->QueryValue( aVal, pEntry->nMemberId );
}
}
}
else
{
- switch (pMap->nWID)
+ switch (pEntry->nWID)
{
case SC_WID_UNO_TBLBORD:
{
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index 1c97f7d72078..a8944c427a99 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -148,9 +148,9 @@ extern uno::Reference< uno::XInterface > SAL_CALL ScXMLOasisExport_Settings_crea
// alles ohne Which-ID, Map nur fuer PropertySetInfo
-static const SfxItemPropertyMap* lcl_GetSettingsPropertyMap()
+static const SfxItemPropertyMapEntry* lcl_GetSettingsPropertyMap()
{
- static SfxItemPropertyMap aSettingsPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aSettingsPropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_DOAUTOCP), 0, &getBooleanCppuType(), 0, 0},
{MAP_CHAR_LEN(SC_UNONAME_ENTERED), 0, &getBooleanCppuType(), 0, 0},
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index c4f51d0eb65f..17c10f63319e 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -155,9 +155,9 @@ public:
// Left/Right/Top/BottomBorder are mapped directly to the core items,
// not collected/applied to the borders of a range -> ATTR_BORDER can be used directly
-const SfxItemPropertyMap* lcl_GetCellsPropertyMap()
+const SfxItemPropertySet* lcl_GetCellsPropertySet()
{
- static SfxItemPropertyMap aCellsPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aCellsPropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_ABSNAME), SC_WID_UNO_ABSNAME, &getCppuType((rtl::OUString*)0), 0 | beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNONAME_ASIANVERT),ATTR_VERTICAL_ASIAN,&getBooleanCppuType(), 0, 0 },
@@ -247,15 +247,16 @@ const SfxItemPropertyMap* lcl_GetCellsPropertyMap()
{MAP_CHAR_LEN(SC_UNONAME_WRITING), ATTR_WRITINGDIR, &getCppuType((sal_Int16*)0), 0, 0 },
{0,0,0,0,0,0}
};
- return aCellsPropertyMap_Impl;
+ static SfxItemPropertySet aCellsPropertySet( aCellsPropertyMap_Impl );
+ return &aCellsPropertySet;
}
// CellRange enthaelt alle Eintraege von Cells, zusaetzlich eigene Eintraege
// mit Which-ID 0 (werden nur fuer getPropertySetInfo benoetigt).
-const SfxItemPropertyMap* lcl_GetRangePropertyMap()
+const SfxItemPropertySet* lcl_GetRangePropertySet()
{
- static SfxItemPropertyMap aRangePropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aRangePropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_ABSNAME), SC_WID_UNO_ABSNAME, &getCppuType((rtl::OUString*)0), 0 | beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNONAME_ASIANVERT),ATTR_VERTICAL_ASIAN,&getBooleanCppuType(), 0, 0 },
@@ -347,15 +348,16 @@ const SfxItemPropertyMap* lcl_GetRangePropertyMap()
{MAP_CHAR_LEN(SC_UNONAME_WRITING), ATTR_WRITINGDIR, &getCppuType((sal_Int16*)0), 0, 0 },
{0,0,0,0,0,0}
};
- return aRangePropertyMap_Impl;
+ static SfxItemPropertySet aRangePropertySet( aRangePropertyMap_Impl );
+ return &aRangePropertySet;
}
// Cell enthaelt alle Eintraege von CellRange, zusaetzlich eigene Eintraege
// mit Which-ID 0 (werden nur fuer getPropertySetInfo benoetigt).
-const SfxItemPropertyMap* lcl_GetCellPropertyMap()
+const SfxItemPropertySet* lcl_GetCellPropertySet()
{
- static SfxItemPropertyMap aCellPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aCellPropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_ABSNAME), SC_WID_UNO_ABSNAME, &getCppuType((rtl::OUString*)0), 0 | beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNONAME_ASIANVERT),ATTR_VERTICAL_ASIAN,&getBooleanCppuType(), 0, 0 },
@@ -449,15 +451,16 @@ const SfxItemPropertyMap* lcl_GetCellPropertyMap()
{MAP_CHAR_LEN(SC_UNONAME_WRITING), ATTR_WRITINGDIR, &getCppuType((sal_Int16*)0), 0, 0 },
{0,0,0,0,0,0}
};
- return aCellPropertyMap_Impl;
+ static SfxItemPropertySet aCellPropertySet( aCellPropertyMap_Impl );
+ return &aCellPropertySet;
}
// Column und Row enthalten alle Eintraege von CellRange, zusaetzlich eigene Eintraege
// mit Which-ID 0 (werden nur fuer getPropertySetInfo benoetigt).
-const SfxItemPropertyMap* lcl_GetColumnPropertyMap()
+const SfxItemPropertySet* lcl_GetColumnPropertySet()
{
- static SfxItemPropertyMap aColumnPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aColumnPropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_ABSNAME), SC_WID_UNO_ABSNAME, &getCppuType((rtl::OUString*)0), 0 | beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNONAME_ASIANVERT),ATTR_VERTICAL_ASIAN,&getBooleanCppuType(), 0, 0 },
@@ -555,12 +558,13 @@ const SfxItemPropertyMap* lcl_GetColumnPropertyMap()
{MAP_CHAR_LEN(SC_UNONAME_WRITING), ATTR_WRITINGDIR, &getCppuType((sal_Int16*)0), 0, 0 },
{0,0,0,0,0,0}
};
- return aColumnPropertyMap_Impl;
+ static SfxItemPropertySet aColumnPropertySet( aColumnPropertyMap_Impl );
+ return &aColumnPropertySet;
}
-const SfxItemPropertyMap* lcl_GetRowPropertyMap()
+const SfxItemPropertySet* lcl_GetRowPropertySet()
{
- static SfxItemPropertyMap aRowPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aRowPropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_ABSNAME), SC_WID_UNO_ABSNAME, &getCppuType((rtl::OUString*)0), 0 | beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNONAME_ASIANVERT),ATTR_VERTICAL_ASIAN,&getBooleanCppuType(), 0, 0 },
@@ -658,12 +662,13 @@ const SfxItemPropertyMap* lcl_GetRowPropertyMap()
{MAP_CHAR_LEN(SC_UNONAME_WRITING), ATTR_WRITINGDIR, &getCppuType((sal_Int16*)0), 0, 0 },
{0,0,0,0,0,0}
};
- return aRowPropertyMap_Impl;
+ static SfxItemPropertySet aRowPropertySet( aRowPropertyMap_Impl );
+ return &aRowPropertySet;
}
-const SfxItemPropertyMap* lcl_GetSheetPropertyMap()
+const SfxItemPropertySet* lcl_GetSheetPropertySet()
{
- static SfxItemPropertyMap aSheetPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aSheetPropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_ABSNAME), SC_WID_UNO_ABSNAME, &getCppuType((rtl::OUString*)0), 0 | beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNONAME_ASIANVERT),ATTR_VERTICAL_ASIAN,&getBooleanCppuType(), 0, 0 },
@@ -769,12 +774,13 @@ const SfxItemPropertyMap* lcl_GetSheetPropertyMap()
{MAP_CHAR_LEN(SC_UNONAME_WRITING), ATTR_WRITINGDIR, &getCppuType((sal_Int16*)0), 0, 0 },
{0,0,0,0,0,0}
};
- return aSheetPropertyMap_Impl;
+ static SfxItemPropertySet aSheetPropertySet( aSheetPropertyMap_Impl );
+ return &aSheetPropertySet;
}
-const SfxItemPropertyMap* lcl_GetEditPropertyMap()
+const SfxItemPropertyMapEntry* lcl_GetEditPropertyMap()
{
- static SfxItemPropertyMap aEditPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aEditPropertyMap_Impl[] =
{
SVX_UNOEDIT_CHAR_PROPERTIES,
SVX_UNOEDIT_FONT_PROPERTIES,
@@ -786,6 +792,11 @@ const SfxItemPropertyMap* lcl_GetEditPropertyMap()
};
return aEditPropertyMap_Impl;
}
+const SvxItemPropertySet* lcl_GetEditPropertySet()
+{
+ static SvxItemPropertySet aEditPropertySet( lcl_GetEditPropertyMap() );
+ return &aEditPropertySet;
+}
//------------------------------------------------------------------------
@@ -823,64 +834,6 @@ SV_IMPL_PTRARR( ScNamedEntryArr_Impl, ScNamedEntryPtr );
//------------------------------------------------------------------------
-#ifdef DBG_UTIL
-#define TEST_PROPERTY_MAPS
-#endif
-
-#ifdef TEST_PROPERTY_MAPS
-
-void lcl_TestMap( const SfxItemPropertyMap* pMap )
-{
- while ( pMap->pName )
- {
- const SfxItemPropertyMap* pNext = pMap + 1;
- if ( pNext->pName )
- {
- int nDiff = strcmp( pMap->pName, pNext->pName );
- if ( nDiff >= 0 )
- {
- ByteString aErr("Reihenfolge: ");
- aErr += pMap->pName;
- aErr += '/';
- aErr += pNext->pName;
- DBG_ERROR( aErr.GetBuffer() );
- }
- }
- pMap = pNext;
- }
-}
-
-struct ScPropertyTester
-{
- ScPropertyTester();
-};
-
-//extern const SfxItemPropertyMap* lcl_GetCellStyleMap();
-//extern const SfxItemPropertyMap* lcl_GetPageStyleMap();
-//extern const SfxItemPropertyMap* lcl_GetHeaderStyleMap();
-//extern const SfxItemPropertyMap* lcl_GetFooterStyleMap();
-
-ScPropertyTester::ScPropertyTester()
-{
- lcl_TestMap( lcl_GetCellsPropertyMap() );
- lcl_TestMap( lcl_GetRangePropertyMap() );
- lcl_TestMap( lcl_GetCellPropertyMap() );
- lcl_TestMap( lcl_GetColumnPropertyMap() );
- lcl_TestMap( lcl_GetRowPropertyMap() );
- lcl_TestMap( lcl_GetSheetPropertyMap() );
-
-// lcl_TestMap( lcl_GetCellStyleMap() );
-// lcl_TestMap( lcl_GetPageStyleMap() );
-// lcl_TestMap( lcl_GetHeaderStyleMap() );
-// lcl_TestMap( lcl_GetFooterStyleMap() );
-}
-
-ScPropertyTester aPropertyTester;
-
-#endif
-
-//------------------------------------------------------------------------
-
//! ScLinkListener in anderes File verschieben !!!
ScLinkListener::~ScLinkListener()
@@ -1372,7 +1325,7 @@ String lcl_GetInputString( ScDocument* pDoc, const ScAddress& rPosition, BOOL bE
// Default-ctor fuer SMART_REFLECTION Krempel
ScCellRangesBase::ScCellRangesBase() :
- aPropSet(lcl_GetCellsPropertyMap()),
+ pPropSet(lcl_GetCellsPropertySet()),
pDocShell( NULL ),
pValueListener( NULL ),
pCurrentFlat( NULL ),
@@ -1390,7 +1343,7 @@ ScCellRangesBase::ScCellRangesBase() :
}
ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRange& rR) :
- aPropSet(lcl_GetCellsPropertyMap()),
+ pPropSet(lcl_GetCellsPropertySet()),
pDocShell( pDocSh ),
pValueListener( NULL ),
pCurrentFlat( NULL ),
@@ -1418,7 +1371,7 @@ ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRange& rR) :
}
ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRangeList& rR) :
- aPropSet(lcl_GetCellsPropertyMap()),
+ pPropSet(lcl_GetCellsPropertySet()),
pDocShell( pDocSh ),
pValueListener( NULL ),
pCurrentFlat( NULL ),
@@ -1833,27 +1786,20 @@ void SAL_CALL ScCellRangesBase::clearContents( sal_Int32 nContentFlags ) throw(u
const SfxItemPropertyMap* ScCellRangesBase::GetItemPropertyMap()
{
- return lcl_GetCellsPropertyMap();
+ return pPropSet->getPropertyMap();
}
-const SfxItemPropertyMap* lcl_GetPropertyWhich( const SfxItemPropertyMap* pMap, const rtl::OUString& rName,
- USHORT& rItemWhich, sal_Bool bSearch )
+void lcl_GetPropertyWhich( const SfxItemPropertySimpleEntry* pEntry,
+ USHORT& rItemWhich )
{
// Which-ID des betroffenen Items, auch wenn das Item die Property
// nicht alleine behandeln kann
-
-
- const SfxItemPropertyMap* pRetMap;
- if (bSearch)
- pRetMap = SfxItemPropertyMap::GetByName( pMap, rName );
- else
- pRetMap = pMap;
- if ( pRetMap )
+ if ( pEntry )
{
- if ( IsScItemWid( pRetMap->nWID ) )
- rItemWhich = pRetMap->nWID;
+ if ( IsScItemWid( pEntry->nWID ) )
+ rItemWhich = pEntry->nWID;
else
- switch ( pRetMap->nWID )
+ switch ( pEntry->nWID )
{
case SC_WID_UNO_TBLBORD:
rItemWhich = ATTR_BORDER;
@@ -1871,10 +1817,9 @@ const SfxItemPropertyMap* lcl_GetPropertyWhich( const SfxItemPropertyMap* pMap,
}
}
- return pRetMap;
}
-beans::PropertyState ScCellRangesBase::GetOnePropertyState( USHORT nItemWhich, const SfxItemPropertyMap* pMap )
+beans::PropertyState ScCellRangesBase::GetOnePropertyState( USHORT nItemWhich, const SfxItemPropertySimpleEntry* pEntry )
{
beans::PropertyState eRet = beans::PropertyState_DIRECT_VALUE;
if ( nItemWhich ) // item wid (from map or special case)
@@ -1908,11 +1853,11 @@ beans::PropertyState ScCellRangesBase::GetOnePropertyState( USHORT nItemWhich, c
}
}
}
- else if ( pMap )
+ else if ( pEntry )
{
- if ( pMap->nWID == SC_WID_UNO_CHCOLHDR || pMap->nWID == SC_WID_UNO_CHROWHDR || pMap->nWID == SC_WID_UNO_ABSNAME )
+ if ( pEntry->nWID == SC_WID_UNO_CHCOLHDR || pEntry->nWID == SC_WID_UNO_CHROWHDR || pEntry->nWID == SC_WID_UNO_ABSNAME )
eRet = beans::PropertyState_DIRECT_VALUE;
- else if ( pMap->nWID == SC_WID_UNO_CELLSTYL )
+ else if ( pEntry->nWID == SC_WID_UNO_CELLSTYL )
{
// a style is always set, there's no default state
const ScStyleSheet* pStyle = pDocShell->GetDocument()->GetSelectionStyle(*GetMarkData());
@@ -1921,7 +1866,7 @@ beans::PropertyState ScCellRangesBase::GetOnePropertyState( USHORT nItemWhich, c
else
eRet = beans::PropertyState_AMBIGUOUS_VALUE;
}
- else if ( pMap->nWID == SC_WID_UNO_NUMRULES )
+ else if ( pEntry->nWID == SC_WID_UNO_NUMRULES )
eRet = beans::PropertyState_DEFAULT_VALUE; // numbering rules are always default
}
return eRet;
@@ -1934,10 +1879,11 @@ beans::PropertyState SAL_CALL ScCellRangesBase::getPropertyState( const rtl::OUS
if ( aRanges.Count() == 0 )
throw uno::RuntimeException();
- const SfxItemPropertyMap* pMap = GetItemPropertyMap(); // from derived class
+ const SfxItemPropertyMap* pMap = GetItemPropertyMap(); // from derived class
USHORT nItemWhich = 0;
- pMap = lcl_GetPropertyWhich( pMap, aPropertyName, nItemWhich, sal_True );
- return GetOnePropertyState( nItemWhich, pMap );
+ const SfxItemPropertySimpleEntry* pEntry = pMap->getByName( aPropertyName );
+ lcl_GetPropertyWhich( pEntry, nItemWhich );
+ return GetOnePropertyState( nItemWhich, pEntry );
}
uno::Sequence<beans::PropertyState> SAL_CALL ScCellRangesBase::getPropertyStates(
@@ -1946,20 +1892,16 @@ uno::Sequence<beans::PropertyState> SAL_CALL ScCellRangesBase::getPropertyStates
{
ScUnoGuard aGuard;
- const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
+ const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
uno::Sequence<beans::PropertyState> aRet(aPropertyNames.getLength());
beans::PropertyState* pStates = aRet.getArray();
- const SfxItemPropertyMap* pMap = pPropertyMap;
for(INT32 i = 0; i < aPropertyNames.getLength(); i++)
{
USHORT nItemWhich = 0;
- pMap = lcl_GetPropertyWhich(pMap, aPropertyNames[i], nItemWhich, sal_True);
- pStates[i] = GetOnePropertyState(nItemWhich, pMap);
- if (!pMap)
- pMap = pPropertyMap;
- else
- pMap++;
+ const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyNames[i] );
+ lcl_GetPropertyWhich( pEntry, nItemWhich );
+ pStates[i] = GetOnePropertyState(nItemWhich, pEntry);
}
return aRet;
}
@@ -1970,10 +1912,10 @@ void SAL_CALL ScCellRangesBase::setPropertyToDefault( const rtl::OUString& aProp
ScUnoGuard aGuard;
if ( pDocShell )
{
- const SfxItemPropertyMap* pMap = lcl_GetCellsPropertyMap();
+ const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
USHORT nItemWhich = 0;
- pMap = lcl_GetPropertyWhich(pMap, aPropertyName, nItemWhich, sal_True);
-
+ const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyName );
+ lcl_GetPropertyWhich( pEntry, nItemWhich );
if ( nItemWhich ) // item wid (from map or special case)
{
if ( aRanges.Count() ) // leer = nichts zu tun
@@ -1997,13 +1939,13 @@ void SAL_CALL ScCellRangesBase::setPropertyToDefault( const rtl::OUString& aProp
aFunc.ClearItems( *GetMarkData(), aWIDs, TRUE );
}
}
- else if ( pMap )
+ else if ( pEntry )
{
- if ( pMap->nWID == SC_WID_UNO_CHCOLHDR )
+ if ( pEntry->nWID == SC_WID_UNO_CHCOLHDR )
bChartColAsHdr = FALSE;
- else if ( pMap->nWID == SC_WID_UNO_CHROWHDR )
+ else if ( pEntry->nWID == SC_WID_UNO_CHROWHDR )
bChartRowAsHdr = FALSE;
- else if ( pMap->nWID == SC_WID_UNO_CELLSTYL )
+ else if ( pEntry->nWID == SC_WID_UNO_CELLSTYL )
{
ScDocFunc aFunc(*pDocShell);
aFunc.ApplyStyle( *GetMarkData(), ScGlobal::GetRscString(STR_STYLENAME_STANDARD), TRUE, TRUE );
@@ -2024,34 +1966,34 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const rtl::OUString& aPr
if ( pDocShell )
{
ScDocument* pDoc = pDocShell->GetDocument();
- const SfxItemPropertyMap* pMap =
- SfxItemPropertyMap::GetByName( lcl_GetCellsPropertyMap(), aPropertyName );
- if ( pMap )
+ const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
+ const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyName );
+ if ( pEntry )
{
- if ( IsScItemWid( pMap->nWID ) )
+ if ( IsScItemWid( pEntry->nWID ) )
{
const ScPatternAttr* pPattern = pDoc->GetDefPattern();
if ( pPattern )
{
const SfxItemSet& rSet = pPattern->GetItemSet();
- switch ( pMap->nWID ) // fuer Item-Spezial-Behandlungen
+ switch ( pEntry->nWID ) // fuer Item-Spezial-Behandlungen
{
case ATTR_VALUE_FORMAT:
// default has no language set
- aAny <<= (sal_Int32)( ((const SfxUInt32Item&)rSet.Get(pMap->nWID)).GetValue() );
+ aAny <<= (sal_Int32)( ((const SfxUInt32Item&)rSet.Get(pEntry->nWID)).GetValue() );
break;
case ATTR_INDENT:
aAny <<= (sal_Int16)( TwipsToHMM(((const SfxUInt16Item&)
- rSet.Get(pMap->nWID)).GetValue()) );
+ rSet.Get(pEntry->nWID)).GetValue()) );
break;
default:
- aPropSet.getPropertyValue(aPropertyName, rSet, aAny);
+ pPropSet->getPropertyValue(aPropertyName, rSet, aAny);
}
}
}
else
- switch ( pMap->nWID )
+ switch ( pEntry->nWID )
{
case SC_WID_UNO_CHCOLHDR:
case SC_WID_UNO_CHROWHDR:
@@ -2078,8 +2020,8 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const rtl::OUString& aPr
case SC_WID_UNO_CONDLOC:
case SC_WID_UNO_CONDXML:
{
- BOOL bEnglish = ( pMap->nWID != SC_WID_UNO_CONDLOC );
- BOOL bXML = ( pMap->nWID == SC_WID_UNO_CONDXML );
+ BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC );
+ BOOL bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML );
formula::FormulaGrammar::Grammar eGrammar = (bXML ?
pDoc->GetStorageGrammar() :
formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML));
@@ -2092,8 +2034,8 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const rtl::OUString& aPr
case SC_WID_UNO_VALILOC:
case SC_WID_UNO_VALIXML:
{
- BOOL bEnglish = ( pMap->nWID != SC_WID_UNO_VALILOC );
- BOOL bXML = ( pMap->nWID == SC_WID_UNO_VALIXML );
+ BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC );
+ BOOL bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML );
formula::FormulaGrammar::Grammar eGrammar = (bXML ?
pDoc->GetStorageGrammar() :
formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML));
@@ -2121,20 +2063,20 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScCellRangesBase::getPropertySe
{
ScUnoGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
- new SfxItemPropertySetInfo( aPropSet.getPropertyMap() ));
+ new SfxItemPropertySetInfo( pPropSet->getPropertyMap() ));
return aRef;
}
-void lcl_SetCellProperty( const SfxItemPropertyMap& rMap, const uno::Any& rValue,
+void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::Any& rValue,
ScPatternAttr& rPattern, ScDocument* pDoc,
USHORT& rFirstItemId, USHORT& rSecondItemId )
{
- rFirstItemId = rMap.nWID;
+ rFirstItemId = rEntry.nWID;
rSecondItemId = 0;
SfxItemSet& rSet = rPattern.GetItemSet();
- switch ( rMap.nWID )
+ switch ( rEntry.nWID )
{
case ATTR_VALUE_FORMAT:
{
@@ -2177,7 +2119,7 @@ void lcl_SetCellProperty( const SfxItemPropertyMap& rMap, const uno::Any& rValue
{
sal_Int16 nIntVal = 0;
if ( rValue >>= nIntVal )
- rSet.Put( SfxUInt16Item( rMap.nWID, (USHORT)HMMToTwips(nIntVal) ) );
+ rSet.Put( SfxUInt16Item( rEntry.nWID, (USHORT)HMMToTwips(nIntVal) ) );
else
throw lang::IllegalArgumentException();
}
@@ -2231,8 +2173,7 @@ void lcl_SetCellProperty( const SfxItemPropertyMap& rMap, const uno::Any& rValue
break;
default:
{
- SfxItemPropertySet aPropSet( lcl_GetCellsPropertyMap() );
- aPropSet.setPropertyValue(rMap, rValue, rSet);
+ lcl_GetCellsPropertySet()->setPropertyValue(rEntry, rValue, rSet);
}
}
}
@@ -2248,20 +2189,20 @@ void SAL_CALL ScCellRangesBase::setPropertyValue(
if ( !pDocShell || aRanges.Count() == 0 )
throw uno::RuntimeException();
- const SfxItemPropertyMap* pMap = GetItemPropertyMap(); // from derived class
- pMap = SfxItemPropertyMap::GetByName( pMap, aPropertyName );
- if ( !pMap )
+ const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
+ const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyName );
+ if ( !pEntry )
throw beans::UnknownPropertyException();
- SetOnePropertyValue( pMap, aValue );
+ SetOnePropertyValue( pEntry, aValue );
}
-void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const uno::Any& aValue )
+void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, const uno::Any& aValue )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- if ( pMap )
+ if ( pEntry )
{
- if ( IsScItemWid( pMap->nWID ) )
+ if ( IsScItemWid( pEntry->nWID ) )
{
if ( aRanges.Count() ) // leer = nichts zu tun
{
@@ -2280,7 +2221,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertyMap* pMap, cons
rSet.ClearInvalidItems();
USHORT nFirstItem, nSecondItem;
- lcl_SetCellProperty( *pMap, aValue, aPattern, pDoc, nFirstItem, nSecondItem );
+ lcl_SetCellProperty( *pEntry, aValue, aPattern, pDoc, nFirstItem, nSecondItem );
for (USHORT nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; nWhich++)
if ( nWhich != nFirstItem && nWhich != nSecondItem )
@@ -2290,7 +2231,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertyMap* pMap, cons
}
}
else // implemented here
- switch ( pMap->nWID )
+ switch ( pEntry->nWID )
{
case SC_WID_UNO_CHCOLHDR:
// chart header flags are set for this object, not stored with document
@@ -2334,8 +2275,8 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertyMap* pMap, cons
if (pFormat)
{
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bEnglish = ( pMap->nWID != SC_WID_UNO_CONDLOC );
- BOOL bXML = ( pMap->nWID == SC_WID_UNO_CONDXML );
+ BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC );
+ BOOL bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML );
formula::FormulaGrammar::Grammar eGrammar = (bXML ?
formula::FormulaGrammar::GRAM_UNSPECIFIED :
formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML));
@@ -2365,8 +2306,8 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertyMap* pMap, cons
if (pValidObj)
{
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bEnglish = ( pMap->nWID != SC_WID_UNO_VALILOC );
- BOOL bXML = ( pMap->nWID == SC_WID_UNO_VALIXML );
+ BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC );
+ BOOL bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML );
formula::FormulaGrammar::Grammar eGrammar = (bXML ?
formula::FormulaGrammar::GRAM_UNSPECIFIED :
formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML));
@@ -2399,28 +2340,28 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyValue( const rtl::OUString& aProp
if ( !pDocShell || aRanges.Count() == 0 )
throw uno::RuntimeException();
- const SfxItemPropertyMap* pMap = GetItemPropertyMap(); // from derived class
- pMap = SfxItemPropertyMap::GetByName( pMap, aPropertyName );
- if ( !pMap )
+ const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
+ const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyName );
+ if ( !pEntry )
throw beans::UnknownPropertyException();
uno::Any aAny;
- GetOnePropertyValue( pMap, aAny );
+ GetOnePropertyValue( pEntry, aAny );
return aAny;
}
-void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
+void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
uno::Any& rAny )
throw(uno::RuntimeException)
{
- if ( pMap )
+ if ( pEntry )
{
- if ( IsScItemWid( pMap->nWID ) )
+ if ( IsScItemWid( pEntry->nWID ) )
{
SfxItemSet* pDataSet = GetCurrentDataSet();
if ( pDataSet )
{
- switch ( pMap->nWID ) // fuer Item-Spezial-Behandlungen
+ switch ( pEntry->nWID ) // fuer Item-Spezial-Behandlungen
{
case ATTR_VALUE_FORMAT:
{
@@ -2437,22 +2378,22 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
break;
case ATTR_INDENT:
rAny <<= (sal_Int16)( TwipsToHMM(((const SfxUInt16Item&)
- pDataSet->Get(pMap->nWID)).GetValue()) );
+ pDataSet->Get(pEntry->nWID)).GetValue()) );
break;
case ATTR_STACKED:
{
sal_Int32 nRot = ((const SfxInt32Item&)pDataSet->Get(ATTR_ROTATE_VALUE)).GetValue();
- BOOL bStacked = ((const SfxBoolItem&)pDataSet->Get(pMap->nWID)).GetValue();
+ BOOL bStacked = ((const SfxBoolItem&)pDataSet->Get(pEntry->nWID)).GetValue();
SvxOrientationItem( nRot, bStacked, 0 ).QueryValue( rAny );
}
break;
default:
- aPropSet.getPropertyValue(*pMap, *pDataSet, rAny);
+ pPropSet->getPropertyValue(*pEntry, *pDataSet, rAny);
}
}
}
else // implemented here
- switch ( pMap->nWID )
+ switch ( pEntry->nWID )
{
case SC_WID_UNO_CHCOLHDR:
ScUnoHelpFunctions::SetBoolInAny( rAny, bChartColAsHdr );
@@ -2499,8 +2440,8 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
if ( pPattern )
{
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bEnglish = ( pMap->nWID != SC_WID_UNO_CONDLOC );
- BOOL bXML = ( pMap->nWID == SC_WID_UNO_CONDXML );
+ BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC );
+ BOOL bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML );
formula::FormulaGrammar::Grammar eGrammar = (bXML ?
pDoc->GetStorageGrammar() :
formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML));
@@ -2519,8 +2460,8 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
if ( pPattern )
{
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bEnglish = ( pMap->nWID != SC_WID_UNO_VALILOC );
- BOOL bXML = ( pMap->nWID == SC_WID_UNO_VALIXML );
+ BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC );
+ BOOL bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML );
formula::FormulaGrammar::Grammar eGrammar = (bXML ?
pDoc->GetStorageGrammar() :
formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML));
@@ -2609,7 +2550,7 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< rtl::OUS
const rtl::OUString* pNames = aPropertyNames.getConstArray();
const uno::Any* pValues = aValues.getConstArray();
- const SfxItemPropertyMap** pMapArray = new const SfxItemPropertyMap*[nCount];
+ const SfxItemPropertySimpleEntry** pEntryArray = new const SfxItemPropertySimpleEntry*[nCount];
sal_Int32 i;
for(i = 0; i < nCount; i++)
@@ -2617,17 +2558,15 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< rtl::OUS
// first loop: find all properties in map, but handle only CellStyle
// (CellStyle must be set before any other cell properties)
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName( pPropertyMap, pNames[i] );
- pMapArray[i] = pMap;
- if (pMap)
+ const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( pNames[i] );
+ pEntryArray[i] = pEntry;
+ if (pEntry)
{
- pPropertyMap = pMap + 1; // continue searching at the next entry
-
- if ( pMap->nWID == SC_WID_UNO_CELLSTYL )
+ if ( pEntry->nWID == SC_WID_UNO_CELLSTYL )
{
try
{
- SetOnePropertyValue( pMap, pValues[i] );
+ SetOnePropertyValue( pEntry, pValues[i] );
}
catch ( lang::IllegalArgumentException& )
{
@@ -2645,10 +2584,10 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< rtl::OUS
{
// second loop: handle other properties
- const SfxItemPropertyMap* pMap = pMapArray[i];
- if ( pMap )
+ const SfxItemPropertySimpleEntry* pEntry = pEntryArray[i];
+ if ( pEntry )
{
- if ( IsScItemWid( pMap->nWID ) ) // can be handled by SfxItemPropertySet
+ if ( IsScItemWid( pEntry->nWID ) ) // can be handled by SfxItemPropertySet
{
if ( !pOldPattern )
{
@@ -2660,7 +2599,7 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< rtl::OUS
// collect items in pNewPattern, apply with one call after the loop
USHORT nFirstItem, nSecondItem;
- lcl_SetCellProperty( *pMap, pValues[i], *pOldPattern, pDoc, nFirstItem, nSecondItem );
+ lcl_SetCellProperty( *pEntry, pValues[i], *pOldPattern, pDoc, nFirstItem, nSecondItem );
// put only affected items into new set
if ( nFirstItem )
@@ -2668,10 +2607,10 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< rtl::OUS
if ( nSecondItem )
pNewPattern->GetItemSet().Put( pOldPattern->GetItemSet().Get( nSecondItem ) );
}
- else if ( pMap->nWID != SC_WID_UNO_CELLSTYL ) // CellStyle is handled above
+ else if ( pEntry->nWID != SC_WID_UNO_CELLSTYL ) // CellStyle is handled above
{
// call virtual method to set a single property
- SetOnePropertyValue( pMap, pValues[i] );
+ SetOnePropertyValue( pEntry, pValues[i] );
}
}
}
@@ -2684,7 +2623,7 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< rtl::OUS
delete pNewPattern;
delete pOldPattern;
- delete[] pMapArray;
+ delete[] pEntryArray;
}
}
@@ -2694,19 +2633,14 @@ uno::Sequence<uno::Any> SAL_CALL ScCellRangesBase::getPropertyValues(
{
ScUnoGuard aGuard;
- const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
+ const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
uno::Sequence<uno::Any> aRet(aPropertyNames.getLength());
uno::Any* pProperties = aRet.getArray();
- const SfxItemPropertyMap* pMap = pPropertyMap;
for(INT32 i = 0; i < aPropertyNames.getLength(); i++)
{
- pMap = SfxItemPropertyMap::GetByName( pMap, aPropertyNames[i] );
- GetOnePropertyValue( pMap, pProperties[i] );
- if (!pMap)
- pMap = pPropertyMap;
- else
- pMap++;
+ const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyNames[i] );
+ GetOnePropertyValue( pEntry, pProperties[i] );
}
return aRet;
}
@@ -2762,11 +2696,11 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set
uno::Sequence < beans::SetPropertyTolerantFailed > aReturns(nCount);
beans::SetPropertyTolerantFailed* pReturns = aReturns.getArray();
- const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
+ const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
const rtl::OUString* pNames = aPropertyNames.getConstArray();
const uno::Any* pValues = aValues.getConstArray();
- const SfxItemPropertyMap** pMapArray = new const SfxItemPropertyMap*[nCount];
+ const SfxItemPropertySimpleEntry** pMapArray = new const SfxItemPropertySimpleEntry*[nCount];
sal_Int32 i;
for(i = 0; i < nCount; i++)
@@ -2774,17 +2708,15 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set
// first loop: find all properties in map, but handle only CellStyle
// (CellStyle must be set before any other cell properties)
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetTolerantByName( pPropertyMap, pNames[i] );
- pMapArray[i] = pMap;
- if (pMap)
+ const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( pNames[i] );
+ pMapArray[i] = pEntry;
+ if (pEntry)
{
- pPropertyMap = pMap + 1; // continue searching at the next entry
-
- if ( pMap->nWID == SC_WID_UNO_CELLSTYL )
+ if ( pEntry->nWID == SC_WID_UNO_CELLSTYL )
{
try
{
- SetOnePropertyValue( pMap, pValues[i] );
+ SetOnePropertyValue( pEntry, pValues[i] );
}
catch ( lang::IllegalArgumentException& )
{
@@ -2803,10 +2735,10 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set
{
// second loop: handle other properties
- const SfxItemPropertyMap* pMap = pMapArray[i];
- if ( pMap && ((pMap->nFlags & beans::PropertyAttribute::READONLY) == 0))
+ const SfxItemPropertySimpleEntry* pEntry = pMapArray[i];
+ if ( pEntry && ((pEntry->nFlags & beans::PropertyAttribute::READONLY) == 0))
{
- if ( IsScItemWid( pMap->nWID ) ) // can be handled by SfxItemPropertySet
+ if ( IsScItemWid( pEntry->nWID ) ) // can be handled by SfxItemPropertySet
{
if ( !pOldPattern )
{
@@ -2820,7 +2752,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set
USHORT nFirstItem, nSecondItem;
try
{
- lcl_SetCellProperty( *pMap, pValues[i], *pOldPattern, pDoc, nFirstItem, nSecondItem );
+ lcl_SetCellProperty( *pEntry, pValues[i], *pOldPattern, pDoc, nFirstItem, nSecondItem );
// put only affected items into new set
if ( nFirstItem )
@@ -2834,12 +2766,12 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set
pReturns[nFailed++].Result = beans::TolerantPropertySetResultType::ILLEGAL_ARGUMENT;
}
}
- else if ( pMap->nWID != SC_WID_UNO_CELLSTYL ) // CellStyle is handled above
+ else if ( pEntry->nWID != SC_WID_UNO_CELLSTYL ) // CellStyle is handled above
{
// call virtual method to set a single property
try
{
- SetOnePropertyValue( pMap, pValues[i] );
+ SetOnePropertyValue( pEntry, pValues[i] );
}
catch ( lang::IllegalArgumentException& )
{
@@ -2851,7 +2783,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set
else
{
pReturns[nFailed].Name = pNames[i];
- if (pMap)
+ if (pEntry)
pReturns[nFailed++].Result = beans::TolerantPropertySetResultType::PROPERTY_VETO;
else
pReturns[nFailed++].Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
@@ -2884,27 +2816,22 @@ uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL ScCellRangesBase::get
uno::Sequence < beans::GetPropertyTolerantResult > aReturns(nCount);
beans::GetPropertyTolerantResult* pReturns = aReturns.getArray();
- const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
+ const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
- const SfxItemPropertyMap* pMap = pPropertyMap;
for(INT32 i = 0; i < nCount; i++)
{
- pPropertyMap = pMap;
- pMap = SfxItemPropertyMap::GetTolerantByName( pMap, aPropertyNames[i] );
- if (!pMap)
+ const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyNames[i] );
+ if (!pEntry)
{
- pMap = pPropertyMap;
pReturns[i].Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
}
else
{
USHORT nItemWhich = 0;
- lcl_GetPropertyWhich( pMap, aPropertyNames[i], nItemWhich, sal_False );
- pReturns[i].State = GetOnePropertyState( nItemWhich, pMap );
- GetOnePropertyValue( pMap, pReturns[i].Value );
+ lcl_GetPropertyWhich( pEntry, nItemWhich );
+ pReturns[i].State = GetOnePropertyState( nItemWhich, pEntry );
+ GetOnePropertyValue( pEntry, pReturns[i].Value );
pReturns[i].Result = beans::TolerantPropertySetResultType::SUCCESS;
-
- ++pMap;
}
}
return aReturns;
@@ -2919,32 +2846,28 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL ScCellRangesBas
uno::Sequence < beans::GetDirectPropertyTolerantResult > aReturns(nCount);
beans::GetDirectPropertyTolerantResult* pReturns = aReturns.getArray();
- const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
+ const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class
- const SfxItemPropertyMap* pMap = pPropertyMap;
INT32 j = 0;
for(INT32 i = 0; i < nCount; i++)
{
- pPropertyMap = pMap;
- pMap = SfxItemPropertyMap::GetTolerantByName( pMap, aPropertyNames[i] );
- if (!pMap)
+ const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyNames[i] );
+ if (!pEntry)
{
- pMap = pPropertyMap;
pReturns[i].Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
}
else
{
USHORT nItemWhich = 0;
- lcl_GetPropertyWhich( pMap, aPropertyNames[i], nItemWhich, sal_False );
- pReturns[j].State = GetOnePropertyState( nItemWhich, pMap );
+ lcl_GetPropertyWhich( pEntry, nItemWhich );
+ pReturns[j].State = GetOnePropertyState( nItemWhich, pEntry );
if (pReturns[j].State == beans::PropertyState_DIRECT_VALUE)
{
- GetOnePropertyValue( pMap, pReturns[j].Value );
+ GetOnePropertyValue( pEntry, pReturns[j].Value );
pReturns[j].Result = beans::TolerantPropertySetResultType::SUCCESS;
pReturns[j].Name = aPropertyNames[i];
++j;
}
- ++pMap;
}
}
if (j < nCount)
@@ -4802,7 +4725,7 @@ uno::Reference<table::XCellRange> ScCellRangeObj::CreateRangeFromDoc( ScDocument
ScCellRangeObj::ScCellRangeObj(ScDocShell* pDocSh, const ScRange& rR) :
ScCellRangesBase( pDocSh, rR ),
- aRangePropSet( lcl_GetRangePropertyMap() ),
+ pRangePropSet( lcl_GetRangePropertySet() ),
aRange( rR )
{
aRange.Justify(); // Anfang / Ende richtig
@@ -6000,26 +5923,26 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScCellRangeObj::getPropertySetI
{
ScUnoGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
- new SfxItemPropertySetInfo( aRangePropSet.getPropertyMap() ));
+ new SfxItemPropertySetInfo( pRangePropSet->getPropertyMap() ));
return aRef;
}
-void ScCellRangeObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const uno::Any& aValue )
+void ScCellRangeObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, const uno::Any& aValue )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
// Range has only Position and Size in addition to ScCellRangesBase, both are ReadOnly
// -> nothing to do here
- ScCellRangesBase::SetOnePropertyValue( pMap, aValue );
+ ScCellRangesBase::SetOnePropertyValue( pEntry, aValue );
}
-void ScCellRangeObj::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
+void ScCellRangeObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
uno::Any& rAny )
throw(uno::RuntimeException)
{
- if ( pMap )
+ if ( pEntry )
{
- if ( pMap->nWID == SC_WID_UNO_POS )
+ if ( pEntry->nWID == SC_WID_UNO_POS )
{
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
@@ -6032,7 +5955,7 @@ void ScCellRangeObj::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
rAny <<= aPos;
}
}
- else if ( pMap->nWID == SC_WID_UNO_SIZE )
+ else if ( pEntry->nWID == SC_WID_UNO_SIZE )
{
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
@@ -6047,14 +5970,14 @@ void ScCellRangeObj::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
}
}
else
- ScCellRangesBase::GetOnePropertyValue( pMap, rAny );
+ ScCellRangesBase::GetOnePropertyValue( pEntry, rAny );
}
}
const SfxItemPropertyMap* ScCellRangeObj::GetItemPropertyMap()
{
- return lcl_GetRangePropertyMap();
+ return pRangePropSet->getPropertyMap();
}
// XServiceInfo
@@ -6090,20 +6013,19 @@ uno::Sequence<rtl::OUString> SAL_CALL ScCellRangeObj::getSupportedServiceNames()
//------------------------------------------------------------------------
-const SfxItemPropertyMap* ScCellObj::GetEditPropertyMap() // static
+const SvxItemPropertySet* ScCellObj::GetEditPropertySet() // static
{
- return lcl_GetEditPropertyMap();
+ return lcl_GetEditPropertySet();
}
-
const SfxItemPropertyMap* ScCellObj::GetCellPropertyMap()
{
- return lcl_GetCellPropertyMap();
+ return lcl_GetCellPropertySet()->getPropertyMap();
}
ScCellObj::ScCellObj(ScDocShell* pDocSh, const ScAddress& rP) :
ScCellRangeObj( pDocSh, ScRange(rP,rP) ),
pUnoText( NULL ),
- aCellPropSet( lcl_GetCellPropertyMap() ),
+ pCellPropSet( lcl_GetCellPropertySet() ),
aCellPos( rP ),
nActionLockCount( 0 )
{
@@ -6690,56 +6612,56 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScCellObj::getPropertySetInfo()
{
ScUnoGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
- new SfxItemPropertySetInfo( aCellPropSet.getPropertyMap() ));
+ new SfxItemPropertySetInfo( pCellPropSet->getPropertyMap() ));
return aRef;
}
-void ScCellObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const uno::Any& aValue )
+void ScCellObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, const uno::Any& aValue )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- if ( pMap )
+ if ( pEntry )
{
- if ( pMap->nWID == SC_WID_UNO_FORMLOC )
+ if ( pEntry->nWID == SC_WID_UNO_FORMLOC )
{
rtl::OUString aStrVal;
aValue >>= aStrVal;
String aString(aStrVal);
SetString_Impl(aString, TRUE, FALSE); // lokal interpretieren
}
- else if ( pMap->nWID == SC_WID_UNO_FORMRT )
+ else if ( pEntry->nWID == SC_WID_UNO_FORMRT )
{
// Read-Only
//! Exception oder so...
}
else
- ScCellRangeObj::SetOnePropertyValue( pMap, aValue );
+ ScCellRangeObj::SetOnePropertyValue( pEntry, aValue );
}
}
-void ScCellObj::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
+void ScCellObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
uno::Any& rAny )
throw(uno::RuntimeException)
{
- if ( pMap )
+ if ( pEntry )
{
- if ( pMap->nWID == SC_WID_UNO_FORMLOC )
+ if ( pEntry->nWID == SC_WID_UNO_FORMLOC )
{
// FALSE = lokal
rAny <<= rtl::OUString( GetInputString_Impl(FALSE) );
}
- else if ( pMap->nWID == SC_WID_UNO_FORMRT )
+ else if ( pEntry->nWID == SC_WID_UNO_FORMRT )
{
table::CellContentType eType = GetResultType_Impl();
rAny <<= eType;
}
else
- ScCellRangeObj::GetOnePropertyValue(pMap, rAny);
+ ScCellRangeObj::GetOnePropertyValue(pEntry, rAny);
}
}
const SfxItemPropertyMap* ScCellObj::GetItemPropertyMap()
{
- return lcl_GetCellPropertyMap();
+ return pCellPropSet->getPropertyMap();
}
// XServiceInfo
@@ -6868,7 +6790,7 @@ sal_Int16 SAL_CALL ScCellObj::resetActionLocks() throw(uno::RuntimeException)
ScTableSheetObj::ScTableSheetObj( ScDocShell* pDocSh, SCTAB nTab ) :
ScCellRangeObj( pDocSh, ScRange(0,0,nTab, MAXCOL,MAXROW,nTab) ),
- aSheetPropSet(lcl_GetSheetPropertyMap())
+ pSheetPropSet(lcl_GetSheetPropertySet())
{
}
@@ -8229,19 +8151,19 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScTableSheetObj::getPropertySet
{
ScUnoGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
- new SfxItemPropertySetInfo( aSheetPropSet.getPropertyMap() ));
+ new SfxItemPropertySetInfo( pSheetPropSet->getPropertyMap() ));
return aRef;
}
-void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const uno::Any& aValue )
+void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, const uno::Any& aValue )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- if ( pMap )
+ if ( pEntry )
{
- if ( IsScItemWid( pMap->nWID ) )
+ if ( IsScItemWid( pEntry->nWID ) )
{
// for Item WIDs, call ScCellRangesBase directly
- ScCellRangesBase::SetOnePropertyValue(pMap, aValue);
+ ScCellRangesBase::SetOnePropertyValue(pEntry, aValue);
return;
}
@@ -8254,7 +8176,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const
SCTAB nTab = GetTab_Impl();
ScDocFunc aFunc(*pDocSh);
- if ( pMap->nWID == SC_WID_UNO_PAGESTL )
+ if ( pEntry->nWID == SC_WID_UNO_PAGESTL )
{
rtl::OUString aStrVal;
aValue >>= aStrVal;
@@ -8283,17 +8205,17 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const
pDocSh->SetDocumentModified();
}
}
- else if ( pMap->nWID == SC_WID_UNO_CELLVIS )
+ else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
{
BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
aFunc.SetTableVisible( nTab, bVis, TRUE );
}
- else if ( pMap->nWID == SC_WID_UNO_ISACTIVE )
+ else if ( pEntry->nWID == SC_WID_UNO_ISACTIVE )
{
if (pDoc->IsScenario(nTab))
pDoc->SetActiveScenario( nTab, ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
}
- else if ( pMap->nWID == SC_WID_UNO_BORDCOL )
+ else if ( pEntry->nWID == SC_WID_UNO_BORDCOL )
{
if (pDoc->IsScenario(nTab))
{
@@ -8313,7 +8235,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const
}
}
}
- else if ( pMap->nWID == SC_WID_UNO_PROTECT )
+ else if ( pEntry->nWID == SC_WID_UNO_PROTECT )
{
if (pDoc->IsScenario(nTab))
{
@@ -8346,7 +8268,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const
pDocSh->ModifyScenario( nTab, aName, aComment, aColor, nFlags );
}
}
- else if ( pMap->nWID == SC_WID_UNO_SHOWBORD )
+ else if ( pEntry->nWID == SC_WID_UNO_SHOWBORD )
{
if (pDoc->IsScenario(nTab))
{
@@ -8379,7 +8301,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const
pDocSh->ModifyScenario( nTab, aName, aComment, aColor, nFlags );
}
}
- else if ( pMap->nWID == SC_WID_UNO_PRINTBORD )
+ else if ( pEntry->nWID == SC_WID_UNO_PRINTBORD )
{
if (pDoc->IsScenario(nTab))
{
@@ -8412,7 +8334,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const
pDocSh->ModifyScenario( nTab, aName, aComment, aColor, nFlags );
}
}
- else if ( pMap->nWID == SC_WID_UNO_COPYBACK )
+ else if ( pEntry->nWID == SC_WID_UNO_COPYBACK )
{
if (pDoc->IsScenario(nTab))
{
@@ -8445,7 +8367,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const
pDocSh->ModifyScenario( nTab, aName, aComment, aColor, nFlags );
}
}
- else if ( pMap->nWID == SC_WID_UNO_COPYSTYL )
+ else if ( pEntry->nWID == SC_WID_UNO_COPYSTYL )
{
if (pDoc->IsScenario(nTab))
{
@@ -8478,7 +8400,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const
pDocSh->ModifyScenario( nTab, aName, aComment, aColor, nFlags );
}
}
- else if ( pMap->nWID == SC_WID_UNO_COPYFORM )
+ else if ( pEntry->nWID == SC_WID_UNO_COPYFORM )
{
if (pDoc->IsScenario(nTab))
{
@@ -8511,7 +8433,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const
pDocSh->ModifyScenario( nTab, aName, aComment, aColor, nFlags );
}
}
- else if ( pMap->nWID == SC_WID_UNO_TABLAYOUT )
+ else if ( pEntry->nWID == SC_WID_UNO_TABLAYOUT )
{
sal_Int16 nValue = 0;
if (aValue >>= nValue)
@@ -8522,7 +8444,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const
aFunc.SetLayoutRTL(nTab, sal_False, sal_True);
}
}
- else if ( pMap->nWID == SC_WID_UNO_AUTOPRINT )
+ else if ( pEntry->nWID == SC_WID_UNO_AUTOPRINT )
{
BOOL bAutoPrint = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if (bAutoPrint)
@@ -8534,15 +8456,15 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const
}
}
else
- ScCellRangeObj::SetOnePropertyValue(pMap, aValue); // base class, no Item WID
+ ScCellRangeObj::SetOnePropertyValue(pEntry, aValue); // base class, no Item WID
}
}
-void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
+void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
uno::Any& rAny )
throw(uno::RuntimeException)
{
- if ( pMap )
+ if ( pEntry )
{
ScDocShell* pDocSh = GetDocShell();
if (!pDocSh)
@@ -8550,32 +8472,32 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
ScDocument* pDoc = pDocSh->GetDocument();
SCTAB nTab = GetTab_Impl();
- if ( pMap->nWID == SC_WID_UNO_PAGESTL )
+ if ( pEntry->nWID == SC_WID_UNO_PAGESTL )
{
rAny <<= rtl::OUString( ScStyleNameConversion::DisplayToProgrammaticName(
pDoc->GetPageStyle( nTab ), SFX_STYLE_FAMILY_PAGE ) );
}
- else if ( pMap->nWID == SC_WID_UNO_CELLVIS )
+ else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
{
BOOL bVis = pDoc->IsVisible( nTab );
ScUnoHelpFunctions::SetBoolInAny( rAny, bVis );
}
- else if ( pMap->nWID == SC_WID_UNO_LINKDISPBIT )
+ else if ( pEntry->nWID == SC_WID_UNO_LINKDISPBIT )
{
// no target bitmaps for individual entries (would be all equal)
// ScLinkTargetTypeObj::SetLinkTargetBitmap( aAny, SC_LINKTARGETTYPE_SHEET );
}
- else if ( pMap->nWID == SC_WID_UNO_LINKDISPNAME )
+ else if ( pEntry->nWID == SC_WID_UNO_LINKDISPNAME )
{
// LinkDisplayName for hyperlink dialog
rAny <<= getName(); // sheet name
}
- else if ( pMap->nWID == SC_WID_UNO_ISACTIVE )
+ else if ( pEntry->nWID == SC_WID_UNO_ISACTIVE )
{
if (pDoc->IsScenario(nTab))
ScUnoHelpFunctions::SetBoolInAny( rAny, pDoc->IsActiveScenario( nTab ));
}
- else if ( pMap->nWID == SC_WID_UNO_BORDCOL )
+ else if ( pEntry->nWID == SC_WID_UNO_BORDCOL )
{
if (pDoc->IsScenario(nTab))
{
@@ -8587,7 +8509,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
rAny <<= static_cast<sal_Int32>(aColor.GetColor());
}
}
- else if ( pMap->nWID == SC_WID_UNO_PROTECT )
+ else if ( pEntry->nWID == SC_WID_UNO_PROTECT )
{
if (pDoc->IsScenario(nTab))
{
@@ -8599,7 +8521,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_PROTECT) != 0 );
}
}
- else if ( pMap->nWID == SC_WID_UNO_SHOWBORD )
+ else if ( pEntry->nWID == SC_WID_UNO_SHOWBORD )
{
if (pDoc->IsScenario(nTab))
{
@@ -8611,7 +8533,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_SHOWFRAME) != 0 );
}
}
- else if ( pMap->nWID == SC_WID_UNO_PRINTBORD )
+ else if ( pEntry->nWID == SC_WID_UNO_PRINTBORD )
{
if (pDoc->IsScenario(nTab))
{
@@ -8623,7 +8545,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_PRINTFRAME) != 0 );
}
}
- else if ( pMap->nWID == SC_WID_UNO_COPYBACK )
+ else if ( pEntry->nWID == SC_WID_UNO_COPYBACK )
{
if (pDoc->IsScenario(nTab))
{
@@ -8635,7 +8557,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_TWOWAY) != 0 );
}
}
- else if ( pMap->nWID == SC_WID_UNO_COPYSTYL )
+ else if ( pEntry->nWID == SC_WID_UNO_COPYSTYL )
{
if (pDoc->IsScenario(nTab))
{
@@ -8647,7 +8569,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_ATTRIB) != 0 );
}
}
- else if ( pMap->nWID == SC_WID_UNO_COPYFORM )
+ else if ( pEntry->nWID == SC_WID_UNO_COPYFORM )
{
if (pDoc->IsScenario(nTab))
{
@@ -8659,26 +8581,26 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
ScUnoHelpFunctions::SetBoolInAny( rAny, !(nFlags & SC_SCENARIO_VALUE));
}
}
- else if ( pMap->nWID == SC_WID_UNO_TABLAYOUT )
+ else if ( pEntry->nWID == SC_WID_UNO_TABLAYOUT )
{
if (pDoc->IsLayoutRTL(nTab))
rAny <<= sal_Int16(com::sun::star::text::WritingMode2::RL_TB);
else
rAny <<= sal_Int16(com::sun::star::text::WritingMode2::LR_TB);
}
- else if ( pMap->nWID == SC_WID_UNO_AUTOPRINT )
+ else if ( pEntry->nWID == SC_WID_UNO_AUTOPRINT )
{
BOOL bAutoPrint = pDoc->IsPrintEntireSheet( nTab );
ScUnoHelpFunctions::SetBoolInAny( rAny, bAutoPrint );
}
else
- ScCellRangeObj::GetOnePropertyValue(pMap, rAny);
+ ScCellRangeObj::GetOnePropertyValue(pEntry, rAny);
}
}
const SfxItemPropertyMap* ScTableSheetObj::GetItemPropertyMap()
{
- return lcl_GetSheetPropertyMap();
+ return pSheetPropSet->getPropertyMap();
}
// XServiceInfo
@@ -8762,7 +8684,7 @@ ScTableSheetObj* ScTableSheetObj::getImplementation( const uno::Reference<uno::X
ScTableColumnObj::ScTableColumnObj( ScDocShell* pDocSh, SCCOL nCol, SCTAB nTab ) :
ScCellRangeObj( pDocSh, ScRange(nCol,0,nTab, nCol,MAXROW,nTab) ),
- aColPropSet(lcl_GetColumnPropertyMap())
+ pColPropSet(lcl_GetColumnPropertySet())
{
}
@@ -8844,19 +8766,19 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScTableColumnObj::getPropertySe
{
ScUnoGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
- new SfxItemPropertySetInfo( aColPropSet.getPropertyMap() ));
+ new SfxItemPropertySetInfo( pColPropSet->getPropertyMap() ));
return aRef;
}
-void ScTableColumnObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const uno::Any& aValue )
+void ScTableColumnObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, const uno::Any& aValue )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- if ( pMap )
+ if ( pEntry )
{
- if ( IsScItemWid( pMap->nWID ) )
+ if ( IsScItemWid( pEntry->nWID ) )
{
// for Item WIDs, call ScCellRangesBase directly
- ScCellRangesBase::SetOnePropertyValue(pMap, aValue);
+ ScCellRangesBase::SetOnePropertyValue(pEntry, aValue);
return;
}
@@ -8874,7 +8796,7 @@ void ScTableColumnObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, cons
SCCOLROW nColArr[2];
nColArr[0] = nColArr[1] = nCol;
- if ( pMap->nWID == SC_WID_UNO_CELLWID )
+ if ( pEntry->nWID == SC_WID_UNO_CELLWID )
{
sal_Int32 nNewWidth = 0;
if ( aValue >>= nNewWidth )
@@ -8885,14 +8807,14 @@ void ScTableColumnObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, cons
(USHORT)nNewWidth, TRUE, TRUE );
}
}
- else if ( pMap->nWID == SC_WID_UNO_CELLVIS )
+ else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
{
BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT;
aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, eMode, 0, TRUE, TRUE );
// SC_SIZE_DIRECT mit Groesse 0 blendet aus
}
- else if ( pMap->nWID == SC_WID_UNO_OWIDTH )
+ else if ( pEntry->nWID == SC_WID_UNO_OWIDTH )
{
BOOL bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if (bOpt)
@@ -8900,7 +8822,7 @@ void ScTableColumnObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, cons
SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, TRUE, TRUE );
// FALSE bei Spalten momentan ohne Auswirkung
}
- else if ( pMap->nWID == SC_WID_UNO_NEWPAGE || pMap->nWID == SC_WID_UNO_MANPAGE )
+ else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE || pEntry->nWID == SC_WID_UNO_MANPAGE )
{
BOOL bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if (bSet)
@@ -8909,15 +8831,15 @@ void ScTableColumnObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, cons
aFunc.RemovePageBreak( TRUE, rRange.aStart, TRUE, TRUE, TRUE );
}
else
- ScCellRangeObj::SetOnePropertyValue(pMap, aValue); // base class, no Item WID
+ ScCellRangeObj::SetOnePropertyValue(pEntry, aValue); // base class, no Item WID
}
}
-void ScTableColumnObj::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
+void ScTableColumnObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
uno::Any& rAny )
throw(uno::RuntimeException)
{
- if ( pMap )
+ if ( pEntry )
{
ScDocShell* pDocSh = GetDocShell();
if (!pDocSh)
@@ -8929,7 +8851,7 @@ void ScTableColumnObj::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
SCCOL nCol = rRange.aStart.Col();
SCTAB nTab = rRange.aStart.Tab();
- if ( pMap->nWID == SC_WID_UNO_CELLWID )
+ if ( pEntry->nWID == SC_WID_UNO_CELLWID )
{
// for hidden column, return original height
USHORT nWidth = pDoc->GetOriginalWidth( nCol, nTab );
@@ -8937,42 +8859,42 @@ void ScTableColumnObj::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
nWidth = (USHORT) TwipsToHMM(nWidth);
rAny <<= (sal_Int32)( nWidth );
}
- else if ( pMap->nWID == SC_WID_UNO_CELLVIS )
+ else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
{
BOOL bVis = !(pDoc->GetColFlags( nCol, nTab ) & CR_HIDDEN);
ScUnoHelpFunctions::SetBoolInAny( rAny, bVis );
}
- else if ( pMap->nWID == SC_WID_UNO_OWIDTH )
+ else if ( pEntry->nWID == SC_WID_UNO_OWIDTH )
{
//! momentan immer gesetzt ??!?!
BOOL bOpt = !(pDoc->GetColFlags( nCol, nTab ) & CR_MANUALSIZE);
ScUnoHelpFunctions::SetBoolInAny( rAny, bOpt );
}
- else if ( pMap->nWID == SC_WID_UNO_NEWPAGE )
+ else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE )
{
BOOL bBreak = ( 0 != (pDoc->GetColFlags( nCol, nTab ) & (CR_PAGEBREAK|CR_MANUALBREAK)) );
ScUnoHelpFunctions::SetBoolInAny( rAny, bBreak );
}
- else if ( pMap->nWID == SC_WID_UNO_MANPAGE )
+ else if ( pEntry->nWID == SC_WID_UNO_MANPAGE )
{
BOOL bBreak = ( 0 != (pDoc->GetColFlags( nCol, nTab ) & (CR_MANUALBREAK)) );
ScUnoHelpFunctions::SetBoolInAny( rAny, bBreak );
}
else
- ScCellRangeObj::GetOnePropertyValue(pMap, rAny);
+ ScCellRangeObj::GetOnePropertyValue(pEntry, rAny);
}
}
const SfxItemPropertyMap* ScTableColumnObj::GetItemPropertyMap()
{
- return lcl_GetColumnPropertyMap();
+ return pColPropSet->getPropertyMap();
}
//------------------------------------------------------------------------
ScTableRowObj::ScTableRowObj(ScDocShell* pDocSh, SCROW nRow, SCTAB nTab) :
ScCellRangeObj( pDocSh, ScRange(0,nRow,nTab, MAXCOL,nRow,nTab) ),
- aRowPropSet(lcl_GetRowPropertyMap())
+ pRowPropSet(lcl_GetRowPropertySet())
{
}
@@ -8987,19 +8909,19 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScTableRowObj::getPropertySetIn
{
ScUnoGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
- new SfxItemPropertySetInfo( aRowPropSet.getPropertyMap() ));
+ new SfxItemPropertySetInfo( pRowPropSet->getPropertyMap() ));
return aRef;
}
-void ScTableRowObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const uno::Any& aValue )
+void ScTableRowObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, const uno::Any& aValue )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
- if ( pMap )
+ if ( pEntry )
{
- if ( IsScItemWid( pMap->nWID ) )
+ if ( IsScItemWid( pEntry->nWID ) )
{
// for Item WIDs, call ScCellRangesBase directly
- ScCellRangesBase::SetOnePropertyValue(pMap, aValue);
+ ScCellRangesBase::SetOnePropertyValue(pEntry, aValue);
return;
}
@@ -9018,7 +8940,7 @@ void ScTableRowObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const u
SCCOLROW nRowArr[2];
nRowArr[0] = nRowArr[1] = nRow;
- if ( pMap->nWID == SC_WID_UNO_CELLHGT )
+ if ( pEntry->nWID == SC_WID_UNO_CELLHGT )
{
sal_Int32 nNewHeight = 0;
if ( aValue >>= nNewHeight )
@@ -9029,14 +8951,14 @@ void ScTableRowObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const u
(USHORT)nNewHeight, TRUE, TRUE );
}
}
- else if ( pMap->nWID == SC_WID_UNO_CELLVIS )
+ else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
{
BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT;
aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, eMode, 0, TRUE, TRUE );
// SC_SIZE_DIRECT mit Groesse 0 blendet aus
}
- else if ( pMap->nWID == SC_WID_UNO_CELLFILT )
+ else if ( pEntry->nWID == SC_WID_UNO_CELLFILT )
{
BOOL bFil = ScUnoHelpFunctions::GetBoolFromAny( aValue );
// ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT;
@@ -9049,7 +8971,7 @@ void ScTableRowObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const u
nFlags &= ~CR_FILTERED;
pDoc->SetRowFlags(nRow, nTab, nFlags);
}
- else if ( pMap->nWID == SC_WID_UNO_OHEIGHT )
+ else if ( pEntry->nWID == SC_WID_UNO_OHEIGHT )
{
BOOL bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if (bOpt)
@@ -9061,7 +8983,7 @@ void ScTableRowObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const u
aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, nHeight, TRUE, TRUE );
}
}
- else if ( pMap->nWID == SC_WID_UNO_NEWPAGE || pMap->nWID == SC_WID_UNO_MANPAGE )
+ else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE || pEntry->nWID == SC_WID_UNO_MANPAGE )
{
BOOL bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue );
if (bSet)
@@ -9070,15 +8992,15 @@ void ScTableRowObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const u
aFunc.RemovePageBreak( FALSE, rRange.aStart, TRUE, TRUE, TRUE );
}
else
- ScCellRangeObj::SetOnePropertyValue(pMap, aValue); // base class, no Item WID
+ ScCellRangeObj::SetOnePropertyValue(pEntry, aValue); // base class, no Item WID
}
}
-void ScTableRowObj::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
+void ScTableRowObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
uno::Any& rAny )
throw(uno::RuntimeException)
{
- if ( pMap )
+ if ( pEntry )
{
ScDocShell* pDocSh = GetDocShell();
if (!pDocSh)
@@ -9089,7 +9011,7 @@ void ScTableRowObj::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
SCROW nRow = rRange.aStart.Row();
SCTAB nTab = rRange.aStart.Tab();
- if ( pMap->nWID == SC_WID_UNO_CELLHGT )
+ if ( pEntry->nWID == SC_WID_UNO_CELLHGT )
{
// for hidden row, return original height
USHORT nHeight = pDoc->GetOriginalHeight( nRow, nTab );
@@ -9097,39 +9019,39 @@ void ScTableRowObj::GetOnePropertyValue( const SfxItemPropertyMap* pMap,
nHeight = (USHORT) TwipsToHMM(nHeight);
rAny <<= (sal_Int32)( nHeight );
}
- else if ( pMap->nWID == SC_WID_UNO_CELLVIS )
+ else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
{
BOOL bVis = !(pDoc->GetRowFlags( nRow, nTab ) & CR_HIDDEN);
ScUnoHelpFunctions::SetBoolInAny( rAny, bVis );
}
- else if ( pMap->nWID == SC_WID_UNO_CELLFILT )
+ else if ( pEntry->nWID == SC_WID_UNO_CELLFILT )
{
BOOL bVis = ((pDoc->GetRowFlags( nRow, nTab ) & CR_FILTERED) != 0);
ScUnoHelpFunctions::SetBoolInAny( rAny, bVis );
}
- else if ( pMap->nWID == SC_WID_UNO_OHEIGHT )
+ else if ( pEntry->nWID == SC_WID_UNO_OHEIGHT )
{
BOOL bOpt = !(pDoc->GetRowFlags( nRow, nTab ) & CR_MANUALSIZE);
ScUnoHelpFunctions::SetBoolInAny( rAny, bOpt );
}
- else if ( pMap->nWID == SC_WID_UNO_NEWPAGE )
+ else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE )
{
BOOL bBreak = ( 0 != (pDoc->GetRowFlags( nRow, nTab ) & (CR_PAGEBREAK|CR_MANUALBREAK)) );
ScUnoHelpFunctions::SetBoolInAny( rAny, bBreak );
}
- else if ( pMap->nWID == SC_WID_UNO_MANPAGE )
+ else if ( pEntry->nWID == SC_WID_UNO_MANPAGE )
{
BOOL bBreak = ( 0 != (pDoc->GetRowFlags( nRow, nTab ) & (CR_MANUALBREAK)) );
ScUnoHelpFunctions::SetBoolInAny( rAny, bBreak );
}
else
- ScCellRangeObj::GetOnePropertyValue(pMap, rAny);
+ ScCellRangeObj::GetOnePropertyValue(pEntry, rAny);
}
}
const SfxItemPropertyMap* ScTableRowObj::GetItemPropertyMap()
{
- return lcl_GetRowPropertyMap();
+ return pRowPropSet->getPropertyMap();
}
//------------------------------------------------------------------------
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index d7fe90b6685b..fbdf0706bf78 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -90,9 +90,9 @@ using ::boost::shared_ptr;
namespace
{
-const SfxItemPropertyMap* lcl_GetDataProviderPropertyMap()
+const SfxItemPropertyMapEntry* lcl_GetDataProviderPropertyMap()
{
- static SfxItemPropertyMap aDataProviderPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aDataProviderPropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_INCLUDEHIDDENCELLS), 0, &getBooleanCppuType(), 0, 0 },
{0,0,0,0,0,0}
@@ -100,9 +100,9 @@ const SfxItemPropertyMap* lcl_GetDataProviderPropertyMap()
return aDataProviderPropertyMap_Impl;
}
-const SfxItemPropertyMap* lcl_GetDataSequencePropertyMap()
+const SfxItemPropertyMapEntry* lcl_GetDataSequencePropertyMap()
{
- static SfxItemPropertyMap aDataSequencePropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aDataSequencePropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_HIDDENVALUES), 0, &getCppuType((uno::Sequence<sal_Int32>*)0 ), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_ROLE), 0, &getCppuType((::com::sun::star::chart2::data::DataSequenceRole*)0), 0, 0 },
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index c5d9540ef00c..87045ff5c053 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -56,9 +56,9 @@ using namespace com::sun::star;
#define SCSAVEVERSION "SaveVersionOnClose"
-const SfxItemPropertyMap* lcl_GetConfigPropertyMap()
+const SfxItemPropertyMapEntry* lcl_GetConfigPropertyMap()
{
- static SfxItemPropertyMap aConfigPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aConfigPropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNO_SHOWZERO), 0, &getBooleanCppuType(), 0, 0},
{MAP_CHAR_LEN(SC_UNO_SHOWNOTES), 0, &getBooleanCppuType(), 0, 0},
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index fb3f0637dd8f..c68baf36ba2b 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -101,9 +101,9 @@ using ::com::sun::star::table::CellRangeAddress;
namespace {
-const SfxItemPropertyMap* lcl_GetDataPilotDescriptorBaseMap()
+const SfxItemPropertyMapEntry* lcl_GetDataPilotDescriptorBaseMap()
{
- static SfxItemPropertyMap aDataPilotDescriptorBaseMap_Impl[] =
+ static SfxItemPropertyMapEntry aDataPilotDescriptorBaseMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNO_COLGRAND), 0, &getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_DRILLDOWN), 0, &getBooleanCppuType(), 0, 0 },
@@ -118,10 +118,10 @@ const SfxItemPropertyMap* lcl_GetDataPilotDescriptorBaseMap()
// ----------------------------------------------------------------------------
-const SfxItemPropertyMap* lcl_GetDataPilotFieldMap()
+const SfxItemPropertyMapEntry* lcl_GetDataPilotFieldMap()
{
using namespace ::com::sun::star::beans::PropertyAttribute;
- static SfxItemPropertyMap aDataPilotFieldMap_Impl[] =
+ static SfxItemPropertyMapEntry aDataPilotFieldMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_AUTOSHOW), 0, &getCppuType((DataPilotFieldAutoShowInfo*)0), MAYBEVOID, 0 },
{MAP_CHAR_LEN(SC_UNONAME_FUNCTION), 0, &getCppuType((GeneralFunction*)0), 0, 0 },
@@ -146,9 +146,9 @@ const SfxItemPropertyMap* lcl_GetDataPilotFieldMap()
// ----------------------------------------------------------------------------
-const SfxItemPropertyMap* lcl_GetDataPilotItemMap()
+const SfxItemPropertyMapEntry* lcl_GetDataPilotItemMap()
{
- static SfxItemPropertyMap aDataPilotItemMap_Impl[] =
+ static SfxItemPropertyMapEntry aDataPilotItemMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_ISHIDDEN), 0, &getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_POS), 0, &getCppuType((sal_Int32*)0), 0, 0 },
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index 5183ea104721..98a8a8551d6c 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -75,11 +75,11 @@ SV_IMPL_PTRARR( XDBRefreshListenerArr_Impl, XDBRefreshListenerPtr );
// alles ohne Which-ID, Map nur fuer PropertySetInfo
-const SfxItemPropertyMap* lcl_GetSubTotalPropertyMap()
+const SfxItemPropertyMapEntry* lcl_GetSubTotalPropertyMap()
{
// some old property names are for 5.2 compatibility
- static SfxItemPropertyMap aSubTotalPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aSubTotalPropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_BINDFMT), 0, &getBooleanCppuType(), 0, 0},
{MAP_CHAR_LEN(SC_UNONAME_CASE), 0, &getBooleanCppuType(), 0, 0},
@@ -98,9 +98,9 @@ const SfxItemPropertyMap* lcl_GetSubTotalPropertyMap()
return aSubTotalPropertyMap_Impl;
}
-const SfxItemPropertyMap* lcl_GetFilterPropertyMap()
+const SfxItemPropertyMapEntry* lcl_GetFilterPropertyMap()
{
- static SfxItemPropertyMap aFilterPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aFilterPropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_CONTHDR), 0, &getBooleanCppuType(), 0, 0},
{MAP_CHAR_LEN(SC_UNONAME_COPYOUT), 0, &getBooleanCppuType(), 0, 0},
@@ -116,9 +116,9 @@ const SfxItemPropertyMap* lcl_GetFilterPropertyMap()
return aFilterPropertyMap_Impl;
}
-const SfxItemPropertyMap* lcl_GetDBRangePropertyMap()
+const SfxItemPropertyMapEntry* lcl_GetDBRangePropertyMap()
{
- static SfxItemPropertyMap aDBRangePropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aDBRangePropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_AUTOFLT), 0, &getBooleanCppuType(), 0, 0},
{MAP_CHAR_LEN(SC_UNONAME_FLTCRT), 0, &getCppuType((table::CellRangeAddress*)0), 0, 0},
diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx
index f329db1569ce..bc6f135ce174 100644
--- a/sc/source/ui/unoobj/defltuno.cxx
+++ b/sc/source/ui/unoobj/defltuno.cxx
@@ -53,9 +53,9 @@ using namespace ::com::sun::star;
//------------------------------------------------------------------------
-const SfxItemPropertyMap* lcl_GetDocDefaultsMap()
+const SfxItemPropertyMapEntry* lcl_GetDocDefaultsMap()
{
- static SfxItemPropertyMap aDocDefaultsMap_Impl[] =
+ static SfxItemPropertyMapEntry aDocDefaultsMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_CFCHARS), ATTR_FONT, &getCppuType((sal_Int16*)0), 0, MID_FONT_CHAR_SET },
{MAP_CHAR_LEN(SC_UNO_CJK_CFCHARS), ATTR_CJK_FONT, &getCppuType((sal_Int16*)0), 0, MID_FONT_CHAR_SET },
@@ -93,7 +93,8 @@ SC_SIMPLE_SERVICE_INFO( ScDocDefaultsObj, "ScDocDefaultsObj", "com.sun.star.shee
//------------------------------------------------------------------------
ScDocDefaultsObj::ScDocDefaultsObj(ScDocShell* pDocSh) :
- pDocShell( pDocSh )
+ pDocShell( pDocSh ),
+ aPropertyMap(lcl_GetDocDefaultsMap())
{
pDocShell->GetDocument()->AddUnoObject(*this);
}
@@ -129,8 +130,8 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDocDefaultsObj::getPropertySe
throw(uno::RuntimeException)
{
ScUnoGuard aGuard;
- static uno::Reference<beans::XPropertySetInfo> aRef(
- new SfxItemPropertySetInfo( lcl_GetDocDefaultsMap() ));
+ static uno::Reference<beans::XPropertySetInfo> aRef = new SfxItemPropertySetInfo(
+ &aPropertyMap );
return aRef;
}
@@ -145,11 +146,10 @@ void SAL_CALL ScDocDefaultsObj::setPropertyValue(
if ( !pDocShell )
throw uno::RuntimeException();
- const SfxItemPropertyMap* pMap =
- SfxItemPropertyMap::GetByName( lcl_GetDocDefaultsMap(), aPropertyName );
- if ( !pMap )
+ const SfxItemPropertySimpleEntry* pEntry = aPropertyMap.getByName( aPropertyName );
+ if ( !pEntry )
throw beans::UnknownPropertyException();
- if(!pMap->nWID)
+ if(!pEntry->nWID)
{
if(aPropertyName.compareToAscii(SC_UNO_STANDARDDEC) == 0)
{
@@ -184,9 +184,9 @@ void SAL_CALL ScDocDefaultsObj::setPropertyValue(
throw uno::RuntimeException();
}
}
- else if ( pMap->nWID == ATTR_FONT_LANGUAGE ||
- pMap->nWID == ATTR_CJK_FONT_LANGUAGE ||
- pMap->nWID == ATTR_CTL_FONT_LANGUAGE )
+ else if ( pEntry->nWID == ATTR_FONT_LANGUAGE ||
+ pEntry->nWID == ATTR_CJK_FONT_LANGUAGE ||
+ pEntry->nWID == ATTR_CTL_FONT_LANGUAGE )
{
// for getPropertyValue the PoolDefaults are sufficient,
// but setPropertyValue has to be handled differently
@@ -204,9 +204,9 @@ void SAL_CALL ScDocDefaultsObj::setPropertyValue(
LanguageType eLatin, eCjk, eCtl;
pDoc->GetLanguage( eLatin, eCjk, eCtl );
- if ( pMap->nWID == ATTR_CJK_FONT_LANGUAGE )
+ if ( pEntry->nWID == ATTR_CJK_FONT_LANGUAGE )
eCjk = eNew;
- else if ( pMap->nWID == ATTR_CTL_FONT_LANGUAGE )
+ else if ( pEntry->nWID == ATTR_CTL_FONT_LANGUAGE )
eCtl = eNew;
else
eLatin = eNew;
@@ -217,9 +217,9 @@ void SAL_CALL ScDocDefaultsObj::setPropertyValue(
else
{
ScDocumentPool* pPool = pDocShell->GetDocument()->GetPool();
- SfxPoolItem* pNewItem = pPool->GetDefaultItem(pMap->nWID).Clone();
+ SfxPoolItem* pNewItem = pPool->GetDefaultItem(pEntry->nWID).Clone();
- if( !pNewItem->PutValue( aValue, pMap->nMemberId ) )
+ if( !pNewItem->PutValue( aValue, pEntry->nMemberId ) )
throw lang::IllegalArgumentException();
pPool->SetPoolDefaultItem( *pNewItem );
@@ -241,12 +241,11 @@ uno::Any SAL_CALL ScDocDefaultsObj::getPropertyValue( const rtl::OUString& aProp
throw uno::RuntimeException();
uno::Any aRet;
- const SfxItemPropertyMap* pMap =
- SfxItemPropertyMap::GetByName( lcl_GetDocDefaultsMap(), aPropertyName );
- if ( !pMap )
+ const SfxItemPropertySimpleEntry* pEntry = aPropertyMap.getByName( aPropertyName );
+ if ( !pEntry )
throw beans::UnknownPropertyException();
- if (!pMap->nWID)
+ if (!pEntry->nWID)
{
if(aPropertyName.compareToAscii(SC_UNO_STANDARDDEC) == 0)
{
@@ -275,8 +274,8 @@ uno::Any SAL_CALL ScDocDefaultsObj::getPropertyValue( const rtl::OUString& aProp
else
{
ScDocumentPool* pPool = pDocShell->GetDocument()->GetPool();
- const SfxPoolItem& rItem = pPool->GetDefaultItem( pMap->nWID );
- rItem.QueryValue( aRet, pMap->nMemberId );
+ const SfxPoolItem& rItem = pPool->GetDefaultItem( pEntry->nWID );
+ rItem.QueryValue( aRet, pEntry->nMemberId );
}
return aRet;
}
@@ -293,14 +292,13 @@ beans::PropertyState SAL_CALL ScDocDefaultsObj::getPropertyState( const rtl::OUS
if ( !pDocShell )
throw uno::RuntimeException();
- const SfxItemPropertyMap* pMap =
- SfxItemPropertyMap::GetByName( lcl_GetDocDefaultsMap(), aPropertyName );
- if ( !pMap )
+ const SfxItemPropertySimpleEntry* pEntry = aPropertyMap.getByName( aPropertyName );
+ if ( !pEntry )
throw beans::UnknownPropertyException();
beans::PropertyState eRet = beans::PropertyState_DEFAULT_VALUE;
- USHORT nWID = pMap->nWID;
+ USHORT nWID = pEntry->nWID;
if ( nWID == ATTR_FONT || nWID == ATTR_CJK_FONT || nWID == ATTR_CTL_FONT || !nWID )
{
// static default for font is system-dependent,
@@ -343,15 +341,14 @@ void SAL_CALL ScDocDefaultsObj::setPropertyToDefault( const rtl::OUString& aProp
if ( !pDocShell )
throw uno::RuntimeException();
- const SfxItemPropertyMap* pMap =
- SfxItemPropertyMap::GetByName( lcl_GetDocDefaultsMap(), aPropertyName );
- if ( !pMap )
+ const SfxItemPropertySimpleEntry* pEntry = aPropertyMap.getByName( aPropertyName );
+ if ( !pEntry )
throw beans::UnknownPropertyException();
- if (pMap->nWID)
+ if (pEntry->nWID)
{
ScDocumentPool* pPool = pDocShell->GetDocument()->GetPool();
- pPool->ResetPoolDefaultItem( pMap->nWID );
+ pPool->ResetPoolDefaultItem( pEntry->nWID );
ItemsChanged();
}
@@ -368,18 +365,17 @@ uno::Any SAL_CALL ScDocDefaultsObj::getPropertyDefault( const rtl::OUString& aPr
if ( !pDocShell )
throw uno::RuntimeException();
- const SfxItemPropertyMap* pMap =
- SfxItemPropertyMap::GetByName( lcl_GetDocDefaultsMap(), aPropertyName );
- if ( !pMap )
+ const SfxItemPropertySimpleEntry* pEntry = aPropertyMap.getByName( aPropertyName );
+ if ( !pEntry )
throw beans::UnknownPropertyException();
uno::Any aRet;
- if (pMap->nWID)
+ if (pEntry->nWID)
{
ScDocumentPool* pPool = pDocShell->GetDocument()->GetPool();
- const SfxPoolItem* pItem = pPool->GetItem( pMap->nWID, SFX_ITEMS_STATICDEFAULT );
+ const SfxPoolItem* pItem = pPool->GetItem( pEntry->nWID, SFX_ITEMS_STATICDEFAULT );
if (pItem)
- pItem->QueryValue( aRet, pMap->nMemberId );
+ pItem->QueryValue( aRet, pEntry->nMemberId );
}
return aRet;
}
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index a327675fe0ee..f25d4a41980a 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -104,39 +104,39 @@ using namespace com::sun::star;
// alles ohne Which-ID, Map nur fuer PropertySetInfo
//! umbenennen, sind nicht mehr nur Options
-const SfxItemPropertyMap* lcl_GetDocOptPropertyMap()
+const SfxItemPropertyMapEntry* lcl_GetDocOptPropertyMap()
{
- static SfxItemPropertyMap aDocOptPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aDocOptPropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNO_APPLYFMDES), 0, &getBooleanCppuType(), 0, 0},
{MAP_CHAR_LEN(SC_UNO_AREALINKS), 0, &getCppuType((uno::Reference<sheet::XAreaLinks>*)0), 0, 0},
{MAP_CHAR_LEN(SC_UNO_AUTOCONTFOC), 0, &getBooleanCppuType(), 0, 0},
{MAP_CHAR_LEN(SC_UNO_BASICLIBRARIES), 0, &getCppuType((uno::Reference< script::XLibraryContainer >*)0), beans::PropertyAttribute::READONLY, 0},
{MAP_CHAR_LEN(SC_UNO_DIALOGLIBRARIES), 0, &getCppuType((uno::Reference< script::XLibraryContainer >*)0), beans::PropertyAttribute::READONLY, 0},
- {MAP_CHAR_LEN(SC_UNO_CALCASSHOWN), 0, &getBooleanCppuType(), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_CALCASSHOWN), PROP_UNO_CALCASSHOWN, &getBooleanCppuType(), 0, 0},
{MAP_CHAR_LEN(SC_UNONAME_CLOCAL), 0, &getCppuType((lang::Locale*)0), 0, 0},
{MAP_CHAR_LEN(SC_UNO_CJK_CLOCAL), 0, &getCppuType((lang::Locale*)0), 0, 0},
{MAP_CHAR_LEN(SC_UNO_CTL_CLOCAL), 0, &getCppuType((lang::Locale*)0), 0, 0},
{MAP_CHAR_LEN(SC_UNO_COLLABELRNG), 0, &getCppuType((uno::Reference<sheet::XLabelRanges>*)0), 0, 0},
{MAP_CHAR_LEN(SC_UNO_DDELINKS), 0, &getCppuType((uno::Reference<container::XNameAccess>*)0), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_DEFTABSTOP), 0, &getCppuType((sal_Int16*)0), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_DEFTABSTOP), PROP_UNO_DEFTABSTOP, &getCppuType((sal_Int16*)0), 0, 0},
{MAP_CHAR_LEN(SC_UNO_EXTERNALDOCLINKS), 0, &getCppuType((uno::Reference<sheet::XExternalDocLinks>*)0), 0, 0},
{MAP_CHAR_LEN(SC_UNO_FORBIDDEN), 0, &getCppuType((uno::Reference<i18n::XForbiddenCharacters>*)0), beans::PropertyAttribute::READONLY, 0},
{MAP_CHAR_LEN(SC_UNO_HASDRAWPAGES), 0, &getBooleanCppuType(), beans::PropertyAttribute::READONLY, 0},
- {MAP_CHAR_LEN(SC_UNO_IGNORECASE), 0, &getBooleanCppuType(), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_ITERENABLED), 0, &getBooleanCppuType(), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_ITERCOUNT), 0, &getCppuType((sal_Int32*)0), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_ITEREPSILON), 0, &getCppuType((double*)0), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_LOOKUPLABELS), 0, &getBooleanCppuType(), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_MATCHWHOLE), 0, &getBooleanCppuType(), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_IGNORECASE), PROP_UNO_IGNORECASE, &getBooleanCppuType(), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_ITERENABLED), PROP_UNO_ITERENABLED, &getBooleanCppuType(), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_ITERCOUNT), PROP_UNO_ITERCOUNT, &getCppuType((sal_Int32*)0), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_ITEREPSILON), PROP_UNO_ITEREPSILON, &getCppuType((double*)0), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_LOOKUPLABELS), PROP_UNO_LOOKUPLABELS, &getBooleanCppuType(), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_MATCHWHOLE), PROP_UNO_MATCHWHOLE, &getBooleanCppuType(), 0, 0},
{MAP_CHAR_LEN(SC_UNO_NAMEDRANGES), 0, &getCppuType((uno::Reference<sheet::XNamedRanges>*)0), 0, 0},
{MAP_CHAR_LEN(SC_UNO_DATABASERNG), 0, &getCppuType((uno::Reference<sheet::XDatabaseRanges>*)0), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_NULLDATE), 0, &getCppuType((util::Date*)0), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_NULLDATE), PROP_UNO_NULLDATE, &getCppuType((util::Date*)0), 0, 0},
{MAP_CHAR_LEN(SC_UNO_ROWLABELRNG), 0, &getCppuType((uno::Reference<sheet::XLabelRanges>*)0), 0, 0},
{MAP_CHAR_LEN(SC_UNO_SHEETLINKS), 0, &getCppuType((uno::Reference<container::XNameAccess>*)0), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_SPELLONLINE), 0, &getBooleanCppuType(), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_STANDARDDEC), 0, &getCppuType((sal_Int16*)0), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_REGEXENABLED), 0, &getBooleanCppuType(), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_SPELLONLINE), PROP_UNO_SPELLONLINE, &getBooleanCppuType(), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_STANDARDDEC), PROP_UNO_STANDARDDEC, &getCppuType((sal_Int16*)0), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_REGEXENABLED), PROP_UNO_REGEXENABLED, &getBooleanCppuType(), 0, 0},
{MAP_CHAR_LEN(SC_UNO_RUNTIMEUID), 0, &getCppuType(static_cast< const rtl::OUString * >(0)), beans::PropertyAttribute::READONLY, 0},
{MAP_CHAR_LEN(SC_UNO_HASVALIDSIGNATURES),0, &getBooleanCppuType(), beans::PropertyAttribute::READONLY, 0},
{MAP_CHAR_LEN(SC_UNO_ISLOADED), 0, &getBooleanCppuType(), 0, 0},
@@ -154,9 +154,9 @@ const SfxItemPropertyMap* lcl_GetDocOptPropertyMap()
//! StandardDecimals als Property und vom NumberFormatter ????????
-const SfxItemPropertyMap* lcl_GetColumnsPropertyMap()
+const SfxItemPropertyMapEntry* lcl_GetColumnsPropertyMap()
{
- static SfxItemPropertyMap aColumnsPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aColumnsPropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_MANPAGE), 0, &getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_NEWPAGE), 0, &getBooleanCppuType(), 0, 0 },
@@ -168,9 +168,9 @@ const SfxItemPropertyMap* lcl_GetColumnsPropertyMap()
return aColumnsPropertyMap_Impl;
}
-const SfxItemPropertyMap* lcl_GetRowsPropertyMap()
+const SfxItemPropertyMapEntry* lcl_GetRowsPropertyMap()
{
- static SfxItemPropertyMap aRowsPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aRowsPropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_CELLHGT), 0, &getCppuType((sal_Int32*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_CELLFILT), 0, &getBooleanCppuType(), 0, 0 },
@@ -180,7 +180,7 @@ const SfxItemPropertyMap* lcl_GetRowsPropertyMap()
{MAP_CHAR_LEN(SC_UNONAME_CELLVIS), 0, &getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_CELLBACK), ATTR_BACKGROUND, &::getCppuType((const sal_Int32*)0), 0, MID_BACK_COLOR },
{MAP_CHAR_LEN(SC_UNONAME_CELLTRAN), ATTR_BACKGROUND, &::getBooleanCppuType(), 0, MID_GRAPHIC_TRANSPARENT },
- // not sorted, not used with SfxItemPropertyMap::GetByName
+ // not sorted, not used with SfxItemPropertyMapEntry::GetByName
{0,0,0,0,0,0}
};
return aRowsPropertyMap_Impl;
@@ -1330,7 +1330,7 @@ void SAL_CALL ScModelObj::setPropertyValue(
const ScDocOptions& rOldOpt = pDoc->GetDocOptions();
ScDocOptions aNewOpt = rOldOpt;
- BOOL bOpt = ScDocOptionsHelper::setPropertyValue( aNewOpt, aPropertyName, aValue );
+ BOOL bOpt = ScDocOptionsHelper::setPropertyValue( aNewOpt, *aPropSet.getPropertyMap(), aPropertyName, aValue );
if (bOpt)
{
// done...
@@ -1456,7 +1456,7 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const rtl::OUString& aPropertyNa
{
ScDocument* pDoc = pDocShell->GetDocument();
const ScDocOptions& rOpt = pDoc->GetDocOptions();
- aRet = ScDocOptionsHelper::getPropertyValue( rOpt, aPropertyName );
+ aRet = ScDocOptionsHelper::getPropertyValue( rOpt, *aPropSet.getPropertyMap(), aPropertyName );
if ( aRet.hasValue() )
{
// done...
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index 9127de05316e..94078ff91af4 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -63,9 +63,9 @@ using namespace com::sun::star;
// alles ohne Which-ID, Map nur fuer PropertySetInfo
-const SfxItemPropertyMap* lcl_GetURLPropertyMap()
+const SfxItemPropertySet* lcl_GetURLPropertySet()
{
- static SfxItemPropertyMap aURLPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aURLPropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_ANCTYPE), 0, &getCppuType((text::TextContentAnchorType*)0), beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNONAME_ANCTYPES), 0, &getCppuType((uno::Sequence<text::TextContentAnchorType>*)0), beans::PropertyAttribute::READONLY, 0 },
@@ -75,24 +75,26 @@ const SfxItemPropertyMap* lcl_GetURLPropertyMap()
{MAP_CHAR_LEN(SC_UNONAME_URL), 0, &getCppuType((rtl::OUString*)0), 0, 0},
{0,0,0,0,0,0}
};
- return aURLPropertyMap_Impl;
+ static SfxItemPropertySet aURLPropertySet_Impl( aURLPropertyMap_Impl );
+ return &aURLPropertySet_Impl;
}
-const SfxItemPropertyMap* lcl_GetHeaderFieldPropertyMap()
+const SfxItemPropertySet* lcl_GetHeaderFieldPropertySet()
{
- static SfxItemPropertyMap aHeaderFieldPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aHeaderFieldPropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_ANCTYPE), 0, &getCppuType((text::TextContentAnchorType*)0), beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNONAME_ANCTYPES), 0, &getCppuType((uno::Sequence<text::TextContentAnchorType>*)0), beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNONAME_TEXTWRAP), 0, &getCppuType((text::WrapTextMode*)0), beans::PropertyAttribute::READONLY, 0 },
{0,0,0,0,0,0}
};
- return aHeaderFieldPropertyMap_Impl;
+ static SfxItemPropertySet aHeaderFieldPropertySet_Impl( aHeaderFieldPropertyMap_Impl );
+ return &aHeaderFieldPropertySet_Impl;
}
-const SfxItemPropertyMap* lcl_GetFileFieldPropertyMap()
+const SfxItemPropertySet* lcl_GetFileFieldPropertySet()
{
- static SfxItemPropertyMap aFileFieldPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aFileFieldPropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_ANCTYPE), 0, &getCppuType((text::TextContentAnchorType*)0), beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNONAME_ANCTYPES), 0, &getCppuType((uno::Sequence<text::TextContentAnchorType>*)0), beans::PropertyAttribute::READONLY, 0 },
@@ -100,7 +102,8 @@ const SfxItemPropertyMap* lcl_GetFileFieldPropertyMap()
{MAP_CHAR_LEN(SC_UNONAME_TEXTWRAP), 0, &getCppuType((text::WrapTextMode*)0), beans::PropertyAttribute::READONLY, 0 },
{0,0,0,0,0,0}
};
- return aFileFieldPropertyMap_Impl;
+ static SfxItemPropertySet aFileFieldPropertySet_Impl( aFileFieldPropertyMap_Impl );
+ return &aFileFieldPropertySet_Impl;
}
//------------------------------------------------------------------------
@@ -443,7 +446,7 @@ void SAL_CALL ScCellFieldsObj::removeRefreshListener( const uno::Reference<util:
ScCellFieldObj::ScCellFieldObj(ScDocShell* pDocSh, const ScAddress& rPos,
const ESelection& rSel) :
OComponentHelper( getMutex() ),
- aPropSet( lcl_GetURLPropertyMap() ),
+ pPropSet( lcl_GetURLPropertySet() ),
pDocShell( pDocSh ),
aCellPos( rPos ),
aSelection( rSel )
@@ -674,8 +677,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScCellFieldObj::getPropertySetI
throw(uno::RuntimeException)
{
ScUnoGuard aGuard;
- static uno::Reference<beans::XPropertySetInfo> aRef(
- new SfxItemPropertySetInfo( aPropSet.getPropertyMap() ));
+ static uno::Reference<beans::XPropertySetInfo> aRef = pPropSet->getPropertySetInfo();
return aRef;
}
@@ -1129,7 +1131,7 @@ sal_Int16 lcl_SvxToUnoFileFormat( SvxFileFormat nSvxValue )
ScHeaderFieldObj::ScHeaderFieldObj(ScHeaderFooterContentObj* pContent, USHORT nP,
USHORT nT, const ESelection& rSel) :
OComponentHelper( getMutex() ),
- aPropSet( (nT == SC_SERVICE_FILEFIELD) ? lcl_GetFileFieldPropertyMap() : lcl_GetHeaderFieldPropertyMap() ),
+ pPropSet( (nT == SC_SERVICE_FILEFIELD) ? lcl_GetFileFieldPropertySet() : lcl_GetHeaderFieldPropertySet() ),
pContentObj( pContent ),
nPart( nP ),
nType( nT ),
@@ -1381,14 +1383,12 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScHeaderFieldObj::getPropertySe
if (nType == SC_SERVICE_FILEFIELD)
{
// file field has different properties
- static uno::Reference<beans::XPropertySetInfo> aFileFieldInfo(
- new SfxItemPropertySetInfo( aPropSet.getPropertyMap() ));
+ static uno::Reference<beans::XPropertySetInfo> aFileFieldInfo = pPropSet->getPropertySetInfo();
return aFileFieldInfo;
}
else
{
- static uno::Reference<beans::XPropertySetInfo> aRef(
- new SfxItemPropertySetInfo( aPropSet.getPropertyMap() ));
+ static uno::Reference<beans::XPropertySetInfo> aRef = pPropSet->getPropertySetInfo();
return aRef;
}
}
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index 79221cb153a0..14fdb958a180 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -57,9 +57,9 @@ using namespace com::sun::star;
// Map nur fuer PropertySetInfo
-const SfxItemPropertyMap* lcl_GetValidatePropertyMap()
+const SfxItemPropertyMapEntry* lcl_GetValidatePropertyMap()
{
- static SfxItemPropertyMap aValidatePropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aValidatePropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_ERRALSTY), 0, &getCppuType((sheet::ValidationAlertStyle*)0), 0, 0},
{MAP_CHAR_LEN(SC_UNONAME_ERRMESS), 0, &getCppuType((rtl::OUString*)0), 0, 0},
diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx
index 8e56ceedf616..1d9f3a1d9213 100644
--- a/sc/source/ui/unoobj/funcuno.cxx
+++ b/sc/source/ui/unoobj/funcuno.cxx
@@ -51,7 +51,7 @@
#include "cell.hxx"
#include "docoptio.hxx"
#include "optuno.hxx"
-
+#include <docuno.hxx>
// for lcl_CopyData:
#include "markdata.hxx"
#include "patattr.hxx"
@@ -201,6 +201,7 @@ BOOL lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange,
ScFunctionAccess::ScFunctionAccess() :
pOptions( NULL ),
+ aPropertyMap( ScDocOptionsHelper::GetPropertyMap() ),
bInvalid( FALSE )
{
StartListening( *SFX_APP() ); // for SFX_HINT_DEINITIALIZING
@@ -278,7 +279,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScFunctionAccess::getPropertySe
{
ScUnoGuard aGuard;
static uno::Reference<beans::XPropertySetInfo> aRef(
- new SfxItemPropertySetInfo( ScDocOptionsHelper::GetPropertyMap() ));
+ new SfxItemPropertySetInfo( &aPropertyMap ));
return aRef;
}
@@ -295,7 +296,7 @@ void SAL_CALL ScFunctionAccess::setPropertyValue(
// options aren't initialized from configuration - always get the same default behaviour
- BOOL bDone = ScDocOptionsHelper::setPropertyValue( *pOptions, aPropertyName, aValue );
+ BOOL bDone = ScDocOptionsHelper::setPropertyValue( *pOptions, aPropertyMap, aPropertyName, aValue );
if (!bDone)
throw beans::UnknownPropertyException();
}
@@ -311,7 +312,7 @@ uno::Any SAL_CALL ScFunctionAccess::getPropertyValue( const rtl::OUString& aProp
// options aren't initialized from configuration - always get the same default behaviour
- return ScDocOptionsHelper::getPropertyValue( *pOptions, aPropertyName );
+ return ScDocOptionsHelper::getPropertyValue( *pOptions, aPropertyMap, aPropertyName );
}
SC_IMPL_DUMMY_PROPERTY_LISTENER( ScFunctionAccess )
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index d4573d408397..0a07b057740b 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -68,9 +68,9 @@ using ::std::vector;
//------------------------------------------------------------------------
// fuer Sheet- und Area-Links benutzt:
-const SfxItemPropertyMap* lcl_GetSheetLinkMap()
+const SfxItemPropertyMapEntry* lcl_GetSheetLinkMap()
{
- static SfxItemPropertyMap aSheetLinkMap_Impl[] =
+ static SfxItemPropertyMapEntry aSheetLinkMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_FILTER), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_FILTOPT), 0, &getCppuType((rtl::OUString*)0), 0, 0 },
diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx
index 823a088ba3d3..536e1f2a1a65 100644
--- a/sc/source/ui/unoobj/nameuno.cxx
+++ b/sc/source/ui/unoobj/nameuno.cxx
@@ -60,9 +60,9 @@ using namespace ::com::sun::star;
//------------------------------------------------------------------------
-const SfxItemPropertyMap* lcl_GetNamedRangeMap()
+const SfxItemPropertyMapEntry* lcl_GetNamedRangeMap()
{
- static SfxItemPropertyMap aNamedRangeMap_Impl[] =
+ static SfxItemPropertyMapEntry aNamedRangeMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNO_LINKDISPBIT), 0, &getCppuType((uno::Reference<awt::XBitmap>*)0), beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNO_LINKDISPNAME), 0, &getCppuType((rtl::OUString*)0), beans::PropertyAttribute::READONLY, 0 },
diff --git a/sc/source/ui/unoobj/notesuno.cxx b/sc/source/ui/unoobj/notesuno.cxx
index b7d836007935..4a9cd420f5de 100644
--- a/sc/source/ui/unoobj/notesuno.cxx
+++ b/sc/source/ui/unoobj/notesuno.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: notesuno.cxx,v $
- * $Revision: 1.11.128.4 $
+ * $Revision: 1.11 $
*
* This file is part of OpenOffice.org.
*
@@ -64,13 +64,14 @@ using namespace com::sun::star;
//------------------------------------------------------------------------
// keine Properties fuer Text in Notizen
-const SfxItemPropertyMap* lcl_GetAnnotationPropertyMap()
+const SvxItemPropertySet* lcl_GetAnnotationPropertySet()
{
- static SfxItemPropertyMap aAnnotationPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aAnnotationPropertyMap_Impl[] =
{
{0,0,0,0,0,0}
};
- return aAnnotationPropertyMap_Impl;
+ static SvxItemPropertySet aAnnotationPropertySet_Impl( aAnnotationPropertyMap_Impl );
+ return &aAnnotationPropertySet_Impl;
}
//------------------------------------------------------------------------
@@ -257,7 +258,7 @@ SvxUnoText& ScAnnotationObj::GetUnoText()
if (!pUnoText)
{
ScAnnotationEditSource aEditSource( pDocShell, aCellPos );
- pUnoText = new SvxUnoText( &aEditSource, lcl_GetAnnotationPropertyMap(),
+ pUnoText = new SvxUnoText( &aEditSource, lcl_GetAnnotationPropertySet(),
uno::Reference<text::XText>() );
pUnoText->acquire();
}
@@ -268,7 +269,6 @@ const ScPostIt* ScAnnotationObj::ImplGetNote() const
{
return pDocShell ? pDocShell->GetDocument()->GetNote( aCellPos ) : 0;
}
-
//------------------------------------------------------------------------
ScAnnotationShapeObj::ScAnnotationShapeObj(ScDocShell* pDocSh, const ScAddress& rPos) :
@@ -287,7 +287,7 @@ SvxUnoText& ScAnnotationShapeObj::GetUnoText()
if (!pUnoText)
{
ScAnnotationEditSource aEditSource( pDocShell, aCellPos );
- pUnoText = new SvxUnoText( &aEditSource, lcl_GetAnnotationPropertyMap(),
+ pUnoText = new SvxUnoText( &aEditSource, lcl_GetAnnotationPropertySet(),
uno::Reference<text::XText>() );
pUnoText->acquire();
}
diff --git a/sc/source/ui/unoobj/optuno.cxx b/sc/source/ui/unoobj/optuno.cxx
index bc2a11f0105d..8c3deefba6d5 100644
--- a/sc/source/ui/unoobj/optuno.cxx
+++ b/sc/source/ui/unoobj/optuno.cxx
@@ -46,24 +46,23 @@
using namespace com::sun::star;
//------------------------------------------------------------------------
-
// static
-const SfxItemPropertyMap* ScDocOptionsHelper::GetPropertyMap()
+const SfxItemPropertyMapEntry* ScDocOptionsHelper::GetPropertyMap()
{
- static SfxItemPropertyMap aMap[] =
+ static SfxItemPropertyMapEntry aMap[] =
{
- {MAP_CHAR_LEN(SC_UNO_CALCASSHOWN), 0, &getBooleanCppuType(), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_DEFTABSTOP), 0, &getCppuType((sal_Int16*)0), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_IGNORECASE), 0, &getBooleanCppuType(), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_ITERENABLED), 0, &getBooleanCppuType(), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_ITERCOUNT), 0, &getCppuType((sal_Int32*)0), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_ITEREPSILON), 0, &getCppuType((double*)0), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_LOOKUPLABELS), 0, &getBooleanCppuType(), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_MATCHWHOLE), 0, &getBooleanCppuType(), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_NULLDATE), 0, &getCppuType((util::Date*)0), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_SPELLONLINE), 0, &getBooleanCppuType(), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_STANDARDDEC), 0, &getCppuType((sal_Int16*)0), 0, 0},
- {MAP_CHAR_LEN(SC_UNO_REGEXENABLED), 0, &getBooleanCppuType(), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_CALCASSHOWN), PROP_UNO_CALCASSHOWN , &getBooleanCppuType(), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_DEFTABSTOP), PROP_UNO_DEFTABSTOP , &getCppuType((sal_Int16*)0), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_IGNORECASE), PROP_UNO_IGNORECASE , &getBooleanCppuType(), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_ITERENABLED), PROP_UNO_ITERENABLED , &getBooleanCppuType(), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_ITERCOUNT), PROP_UNO_ITERCOUNT , &getCppuType((sal_Int32*)0), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_ITEREPSILON), PROP_UNO_ITEREPSILON , &getCppuType((double*)0), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_LOOKUPLABELS), PROP_UNO_LOOKUPLABELS, &getBooleanCppuType(), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_MATCHWHOLE), PROP_UNO_MATCHWHOLE , &getBooleanCppuType(), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_NULLDATE), PROP_UNO_NULLDATE , &getCppuType((util::Date*)0), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_SPELLONLINE), PROP_UNO_SPELLONLINE , &getBooleanCppuType(), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_STANDARDDEC), PROP_UNO_STANDARDDEC , &getCppuType((sal_Int16*)0), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_REGEXENABLED), PROP_UNO_REGEXENABLED, &getBooleanCppuType(), 0, 0},
{0,0,0,0,0,0}
};
return aMap;
@@ -71,102 +70,132 @@ const SfxItemPropertyMap* ScDocOptionsHelper::GetPropertyMap()
// static
sal_Bool ScDocOptionsHelper::setPropertyValue( ScDocOptions& rOptions,
+ const SfxItemPropertyMap& rPropMap,
const rtl::OUString& aPropertyName, const uno::Any& aValue )
{
//! use map (with new identifiers)
- sal_Bool bKnown = sal_True;
- String aString(aPropertyName);
-
- if ( aString.EqualsAscii( SC_UNO_CALCASSHOWN ) )
- rOptions.SetCalcAsShown( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.EqualsAscii( SC_UNO_IGNORECASE ) )
- rOptions.SetIgnoreCase( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.EqualsAscii( SC_UNO_ITERENABLED ) )
- rOptions.SetIter( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.EqualsAscii( SC_UNO_REGEXENABLED ) )
- rOptions.SetFormulaRegexEnabled( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.EqualsAscii( SC_UNO_LOOKUPLABELS ) )
- rOptions.SetLookUpColRowNames( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.EqualsAscii( SC_UNO_MATCHWHOLE ) )
- rOptions.SetMatchWholeCell( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.EqualsAscii( SC_UNO_SPELLONLINE ) )
- rOptions.SetAutoSpell( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
- else if ( aString.EqualsAscii( SC_UNO_DEFTABSTOP ) )
- {
- sal_Int16 nIntVal = 0;
- if ( aValue >>= nIntVal )
- rOptions.SetTabDistance( nIntVal );
- }
- else if ( aString.EqualsAscii( SC_UNO_ITERCOUNT ) )
- {
- sal_Int32 nIntVal = 0;
- if ( aValue >>= nIntVal )
- rOptions.SetIterCount( (USHORT)nIntVal );
- }
- else if ( aString.EqualsAscii( SC_UNO_STANDARDDEC ) )
- {
- sal_Int16 nIntVal = 0;
- if ( aValue >>= nIntVal )
- rOptions.SetStdPrecision( nIntVal );
- }
- else if ( aString.EqualsAscii( SC_UNO_ITEREPSILON ) )
- {
- double fDoubleVal = 0;
- if ( aValue >>= fDoubleVal )
- rOptions.SetIterEps( fDoubleVal );
- }
- else if ( aString.EqualsAscii( SC_UNO_NULLDATE ) )
+ const SfxItemPropertySimpleEntry* pEntry = rPropMap.getByName(aPropertyName );
+ if( !pEntry || !pEntry->nWID )
+ return sal_False;
+ switch( pEntry->nWID )
{
- util::Date aDate;
- if ( aValue >>= aDate )
- rOptions.SetDate( aDate.Day, aDate.Month, aDate.Year );
+ case PROP_UNO_CALCASSHOWN :
+ rOptions.SetCalcAsShown( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
+ break;
+ case PROP_UNO_DEFTABSTOP :
+ {
+ sal_Int16 nIntVal = 0;
+ if ( aValue >>= nIntVal )
+ rOptions.SetTabDistance( nIntVal );
+ }
+ break;
+ case PROP_UNO_IGNORECASE :
+ rOptions.SetIgnoreCase( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
+ break;
+ case PROP_UNO_ITERENABLED:
+ rOptions.SetIter( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
+ break;
+ case PROP_UNO_ITERCOUNT :
+ {
+ sal_Int32 nIntVal = 0;
+ if ( aValue >>= nIntVal )
+ rOptions.SetIterCount( (USHORT)nIntVal );
+ }
+ break;
+ case PROP_UNO_ITEREPSILON :
+ {
+ double fDoubleVal = 0;
+ if ( aValue >>= fDoubleVal )
+ rOptions.SetIterEps( fDoubleVal );
+ }
+ break;
+ case PROP_UNO_LOOKUPLABELS :
+ rOptions.SetLookUpColRowNames( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
+ break;
+ case PROP_UNO_MATCHWHOLE :
+ rOptions.SetMatchWholeCell( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
+ break;
+ case PROP_UNO_NULLDATE:
+ {
+ util::Date aDate;
+ if ( aValue >>= aDate )
+ rOptions.SetDate( aDate.Day, aDate.Month, aDate.Year );
+ }
+ break;
+ case PROP_UNO_SPELLONLINE:
+ rOptions.SetAutoSpell( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
+ break;
+ case PROP_UNO_STANDARDDEC:
+ {
+ sal_Int16 nIntVal = 0;
+ if ( aValue >>= nIntVal )
+ rOptions.SetStdPrecision( nIntVal );
+ }
+ break;
+ case PROP_UNO_REGEXENABLED:
+ rOptions.SetFormulaRegexEnabled( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
+ break;
+ default:;
}
- else
- bKnown = sal_False;
-
- return bKnown;
+ return sal_True;
}
// static
uno::Any ScDocOptionsHelper::getPropertyValue(
- const ScDocOptions& rOptions, const rtl::OUString& aPropertyName )
+ const ScDocOptions& rOptions,
+ const SfxItemPropertyMap& rPropMap,
+ const rtl::OUString& aPropertyName )
{
- //! use map (with new identifiers)
-
- String aString(aPropertyName);
uno::Any aRet;
-
- if ( aString.EqualsAscii( SC_UNO_CALCASSHOWN ) )
- ScUnoHelpFunctions::SetBoolInAny( aRet, rOptions.IsCalcAsShown() );
- else if ( aString.EqualsAscii( SC_UNO_IGNORECASE ) )
- ScUnoHelpFunctions::SetBoolInAny( aRet, rOptions.IsIgnoreCase() );
- else if ( aString.EqualsAscii( SC_UNO_ITERENABLED ) )
- ScUnoHelpFunctions::SetBoolInAny( aRet, rOptions.IsIter() );
- else if ( aString.EqualsAscii( SC_UNO_REGEXENABLED ) )
- ScUnoHelpFunctions::SetBoolInAny( aRet, rOptions.IsFormulaRegexEnabled() );
- else if ( aString.EqualsAscii( SC_UNO_LOOKUPLABELS ) )
- ScUnoHelpFunctions::SetBoolInAny( aRet, rOptions.IsLookUpColRowNames() );
- else if ( aString.EqualsAscii( SC_UNO_MATCHWHOLE ) )
- ScUnoHelpFunctions::SetBoolInAny( aRet, rOptions.IsMatchWholeCell() );
- else if ( aString.EqualsAscii( SC_UNO_SPELLONLINE ) )
- ScUnoHelpFunctions::SetBoolInAny( aRet, rOptions.IsAutoSpell() );
- else if ( aString.EqualsAscii( SC_UNO_DEFTABSTOP ) )
- aRet <<= (sal_Int16)( rOptions.GetTabDistance() );
- else if ( aString.EqualsAscii( SC_UNO_ITERCOUNT ) )
- aRet <<= (sal_Int32)( rOptions.GetIterCount() );
- else if ( aString.EqualsAscii( SC_UNO_STANDARDDEC ) )
- aRet <<= (sal_Int16)( rOptions.GetStdPrecision() );
- else if ( aString.EqualsAscii( SC_UNO_ITEREPSILON ) )
- aRet <<= (double)( rOptions.GetIterEps() );
- else if ( aString.EqualsAscii( SC_UNO_NULLDATE ) )
+ const SfxItemPropertySimpleEntry* pEntry = rPropMap.getByName( aPropertyName );
+ if( !pEntry || !pEntry->nWID )
+ return aRet;
+ switch( pEntry->nWID )
{
- USHORT nD, nM, nY;
- rOptions.GetDate( nD, nM, nY );
- util::Date aDate( nD, nM, nY );
- aRet <<= aDate;
+ case PROP_UNO_CALCASSHOWN :
+ ScUnoHelpFunctions::SetBoolInAny( aRet, rOptions.IsCalcAsShown() );
+ break;
+ case PROP_UNO_DEFTABSTOP :
+ aRet <<= (sal_Int16)( rOptions.GetTabDistance() );
+ break;
+ case PROP_UNO_IGNORECASE :
+ ScUnoHelpFunctions::SetBoolInAny( aRet, rOptions.IsIgnoreCase() );
+ break;
+ case PROP_UNO_ITERENABLED:
+ ScUnoHelpFunctions::SetBoolInAny( aRet, rOptions.IsIter() );
+ break;
+ case PROP_UNO_ITERCOUNT:
+ aRet <<= (sal_Int32)( rOptions.GetIterCount() );
+ break;
+ case PROP_UNO_ITEREPSILON:
+ aRet <<= (double)( rOptions.GetIterEps() );
+ break;
+ case PROP_UNO_LOOKUPLABELS:
+ ScUnoHelpFunctions::SetBoolInAny( aRet, rOptions.IsLookUpColRowNames() );
+ break;
+ case PROP_UNO_MATCHWHOLE:
+ ScUnoHelpFunctions::SetBoolInAny( aRet, rOptions.IsMatchWholeCell() );
+ break;
+ case PROP_UNO_NULLDATE:
+ {
+ USHORT nD, nM, nY;
+ rOptions.GetDate( nD, nM, nY );
+ util::Date aDate( nD, nM, nY );
+ aRet <<= aDate;
+ }
+ break;
+ case PROP_UNO_SPELLONLINE:
+ ScUnoHelpFunctions::SetBoolInAny( aRet, rOptions.IsAutoSpell() );
+ break;
+ case PROP_UNO_STANDARDDEC :
+ aRet <<= (sal_Int16)( rOptions.GetStdPrecision() );
+ break;
+ case PROP_UNO_REGEXENABLED:
+ ScUnoHelpFunctions::SetBoolInAny( aRet, rOptions.IsFormulaRegexEnabled() );
+ break;
+ default:;
}
-
return aRet;
}
@@ -190,7 +219,7 @@ void SAL_CALL ScDocOptionsObj::setPropertyValue(
{
ScUnoGuard aGuard;
- BOOL bDone = ScDocOptionsHelper::setPropertyValue( aOptions, aPropertyName, aValue );
+ BOOL bDone = ScDocOptionsHelper::setPropertyValue( aOptions, *GetPropertySet().getPropertyMap(), aPropertyName, aValue );
if (!bDone)
ScModelObj::setPropertyValue( aPropertyName, aValue );
@@ -202,7 +231,7 @@ uno::Any SAL_CALL ScDocOptionsObj::getPropertyValue( const rtl::OUString& aPrope
{
ScUnoGuard aGuard;
- uno::Any aRet(ScDocOptionsHelper::getPropertyValue( aOptions, aPropertyName ));
+ uno::Any aRet(ScDocOptionsHelper::getPropertyValue( aOptions, *GetPropertySet().getPropertyMap(), aPropertyName ));
if ( !aRet.hasValue() )
aRet = ScModelObj::getPropertyValue( aPropertyName );
diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx
index eaca5a308236..3d3944860564 100644
--- a/sc/source/ui/unoobj/shapeuno.cxx
+++ b/sc/source/ui/unoobj/shapeuno.cxx
@@ -64,9 +64,9 @@ DECLARE_STL_USTRINGACCESS_MAP( uno::Sequence< sal_Int8 > *, ScShapeImplementati
static ScShapeImplementationIdMap aImplementationIdMap;
-const SfxItemPropertyMap* lcl_GetShapeMap()
+const SfxItemPropertyMapEntry* lcl_GetShapeMap()
{
- static SfxItemPropertyMap aShapeMap_Impl[] =
+ static SfxItemPropertyMapEntry aShapeMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_ANCHOR), 0, &getCppuType((uno::Reference<uno::XInterface>*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_HORIPOS), 0, &getCppuType((sal_Int32*)0), 0, 0 },
diff --git a/sc/source/ui/unoobj/srchuno.cxx b/sc/source/ui/unoobj/srchuno.cxx
index c3988128bbb7..14b271c16cb7 100644
--- a/sc/source/ui/unoobj/srchuno.cxx
+++ b/sc/source/ui/unoobj/srchuno.cxx
@@ -53,11 +53,11 @@ using namespace com::sun::star;
//! SearchWords sucht in ganzen Zellen - umbenennen ???
-// SfxItemPropertyMap nur fuer GetPropertySetInfo
+// SfxItemPropertyMapEntry nur fuer GetPropertySetInfo
-const SfxItemPropertyMap* lcl_GetSearchPropertyMap()
+const SfxItemPropertyMapEntry* lcl_GetSearchPropertyMap()
{
- static SfxItemPropertyMap aSearchPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aSearchPropertyMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNO_SRCHBACK), 0, &getBooleanCppuType(), 0, 0},
{MAP_CHAR_LEN(SC_UNO_SRCHBYROW), 0, &getBooleanCppuType(), 0, 0},
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index ae8331ffa5fe..12cbdbdde1a1 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -83,9 +83,9 @@ using namespace ::com::sun::star;
//------------------------------------------------------------------------
-const SfxItemPropertyMap* lcl_GetCellStyleMap()
+const SfxItemPropertySet* lcl_GetCellStyleSet()
{
- static SfxItemPropertyMap aCellStyleMap_Impl[] =
+ static SfxItemPropertyMapEntry aCellStyleMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNONAME_ASIANVERT),ATTR_VERTICAL_ASIAN,&getBooleanCppuType(), 0, 0 },
{MAP_CHAR_LEN(SC_UNONAME_BOTTBORDER),ATTR_BORDER, &::getCppuType((const table::BorderLine*)0), 0, BOTTOM_BORDER | CONVERT_TWIPS },
@@ -166,14 +166,15 @@ const SfxItemPropertyMap* lcl_GetCellStyleMap()
{MAP_CHAR_LEN(SC_UNONAME_WRITING), ATTR_WRITINGDIR, &getCppuType((sal_Int16*)0), 0, 0 },
{0,0,0,0,0,0}
};
- return aCellStyleMap_Impl;
+ static SfxItemPropertySet aCellStyleSet_Impl( aCellStyleMap_Impl );
+ return &aCellStyleSet_Impl;
}
// Map mit allen Seitenattributen, incl. Kopf-/Fusszeilenattribute
-const SfxItemPropertyMap* lcl_GetPageStyleMap()
+const SfxItemPropertySet * lcl_GetPageStyleSet()
{
- static SfxItemPropertyMap aPageStyleMap_Impl[] =
+ static SfxItemPropertyMapEntry aPageStyleMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNO_PAGE_BACKCOLOR), ATTR_BACKGROUND, &::getCppuType((const sal_Int32*)0), 0, MID_BACK_COLOR },
{MAP_CHAR_LEN(SC_UNO_PAGE_GRAPHICFILT), ATTR_BACKGROUND, &::getCppuType((const ::rtl::OUString*)0), 0, MID_GRAPHIC_FILTER },
@@ -285,14 +286,15 @@ const SfxItemPropertyMap* lcl_GetPageStyleMap()
{MAP_CHAR_LEN(SC_UNONAME_WRITING), ATTR_WRITINGDIR, &getCppuType((sal_Int16*)0), 0, 0 },
{0,0,0,0,0,0}
};
- return aPageStyleMap_Impl;
+ static SfxItemPropertySet aPageStyleSet_Impl( aPageStyleMap_Impl );
+ return &aPageStyleSet_Impl;
}
// Map mit Inhalten des Header-Item-Sets
const SfxItemPropertyMap* lcl_GetHeaderStyleMap()
{
- static SfxItemPropertyMap aHeaderStyleMap_Impl[] =
+ static SfxItemPropertyMapEntry aHeaderStyleMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNO_PAGE_HDRBACKCOL), ATTR_BACKGROUND, &::getCppuType((const sal_Int32*)0), 0, MID_BACK_COLOR },
{MAP_CHAR_LEN(SC_UNO_PAGE_HDRGRFFILT), ATTR_BACKGROUND, &::getCppuType((const ::rtl::OUString*)0), 0, MID_GRAPHIC_FILTER },
@@ -323,14 +325,15 @@ const SfxItemPropertyMap* lcl_GetHeaderStyleMap()
{MAP_CHAR_LEN(OLD_UNO_PAGE_HDRBACKTRAN),ATTR_BACKGROUND, &::getBooleanCppuType(), 0, MID_GRAPHIC_TRANSPARENT },
{0,0,0,0,0,0}
};
- return aHeaderStyleMap_Impl;
+ static SfxItemPropertyMap aHeaderStyleMap( aHeaderStyleMap_Impl );
+ return &aHeaderStyleMap;
}
// Map mit Inhalten des Footer-Item-Sets
const SfxItemPropertyMap* lcl_GetFooterStyleMap()
{
- static SfxItemPropertyMap aFooterStyleMap_Impl[] =
+ static SfxItemPropertyMapEntry aFooterStyleMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNO_PAGE_FTRBACKCOL), ATTR_BACKGROUND, &::getCppuType((const sal_Int32*)0), 0, MID_BACK_COLOR },
{MAP_CHAR_LEN(SC_UNO_PAGE_FTRGRFFILT), ATTR_BACKGROUND, &::getCppuType((const ::rtl::OUString*)0), 0, MID_GRAPHIC_FILTER },
@@ -361,7 +364,8 @@ const SfxItemPropertyMap* lcl_GetFooterStyleMap()
{MAP_CHAR_LEN(OLD_UNO_PAGE_FTRBACKTRAN),ATTR_BACKGROUND, &::getBooleanCppuType(), 0, MID_GRAPHIC_TRANSPARENT },
{0,0,0,0,0,0}
};
- return aFooterStyleMap_Impl;
+ static SfxItemPropertyMap aFooterStyleMap( aFooterStyleMap_Impl );
+ return &aFooterStyleMap;
}
@@ -1089,7 +1093,7 @@ void SAL_CALL ScStyleFamilyObj::removeVetoableChangeListener( const ::rtl::OUStr
//UNUSED2008-05 }
ScStyleObj::ScStyleObj(ScDocShell* pDocSh, SfxStyleFamily eFam, const String& rName) :
- aPropSet( (eFam == SFX_STYLE_FAMILY_PARA) ? lcl_GetCellStyleMap() : lcl_GetPageStyleMap() ),
+ pPropSet( (eFam == SFX_STYLE_FAMILY_PARA) ? lcl_GetCellStyleSet() : lcl_GetPageStyleSet() ),
pDocShell( pDocSh ),
eFamily( eFam ),
aStyleName( rName )
@@ -1307,34 +1311,34 @@ uno::Reference<container::XIndexReplace> ScStyleObj::CreateEmptyNumberingRules()
// beans::XPropertyState
-const SfxItemSet* ScStyleObj::GetStyleItemSet_Impl( const String& rPropName,
- const SfxItemPropertyMap*& rpResultEntry )
+const SfxItemSet* ScStyleObj::GetStyleItemSet_Impl( const ::rtl::OUString& rPropName,
+ const SfxItemPropertySimpleEntry*& rpResultEntry )
{
//! OUString as argument?
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
{
- const SfxItemPropertyMap* pMap = NULL;
+ const SfxItemPropertySimpleEntry* pEntry = NULL;
if ( eFamily == SFX_STYLE_FAMILY_PAGE )
{
- pMap = SfxItemPropertyMap::GetByName( lcl_GetHeaderStyleMap(), rPropName );
- if ( pMap ) // only item-wids in header/footer map
+ pEntry = lcl_GetHeaderStyleMap()->getByName( rPropName );
+ if ( pEntry ) // only item-wids in header/footer map
{
- rpResultEntry = pMap;
+ rpResultEntry = pEntry;
return &((const SvxSetItem&)pStyle->GetItemSet().Get(ATTR_PAGE_HEADERSET)).GetItemSet();
}
- pMap = SfxItemPropertyMap::GetByName( lcl_GetFooterStyleMap(), rPropName );
- if ( pMap ) // only item-wids in header/footer map
+ pEntry = lcl_GetFooterStyleMap()->getByName( rPropName );
+ if ( pEntry ) // only item-wids in header/footer map
{
- rpResultEntry = pMap;
+ rpResultEntry = pEntry;
return &((const SvxSetItem&)pStyle->GetItemSet().Get(ATTR_PAGE_FOOTERSET)).GetItemSet();
}
}
- pMap = SfxItemPropertyMap::GetByName( aPropSet.getPropertyMap(), rPropName );
- if ( pMap )
+ pEntry = pPropSet->getPropertyMap()->getByName( rPropName );
+ if ( pEntry )
{
- rpResultEntry = pMap;
+ rpResultEntry = pEntry;
return &pStyle->GetItemSet();
}
}
@@ -1348,10 +1352,9 @@ beans::PropertyState SAL_CALL ScStyleObj::getPropertyState( const rtl::OUString&
{
ScUnoGuard aGuard;
beans::PropertyState eRet = beans::PropertyState_DIRECT_VALUE;
- String aString(aPropertyName);
- const SfxItemPropertyMap* pResultEntry = NULL;
- const SfxItemSet* pItemSet = GetStyleItemSet_Impl( aString, pResultEntry );
+ const SfxItemPropertySimpleEntry* pResultEntry = NULL;
+ const SfxItemSet* pItemSet = GetStyleItemSet_Impl( aPropertyName, pResultEntry );
if ( pItemSet && pResultEntry )
{
@@ -1405,12 +1408,12 @@ void SAL_CALL ScStyleObj::setPropertyToDefault( const rtl::OUString& aPropertyNa
{
ScUnoGuard aGuard;
- const SfxItemPropertyMap* pMap = aPropSet.getPropertyMap();
- pMap = SfxItemPropertyMap::GetByName( pMap, aPropertyName );
- if ( !pMap )
+ const SfxItemPropertyMap* pMap = pPropSet->getPropertyMap();
+ const SfxItemPropertySimpleEntry* pEntry = pMap->getByName( aPropertyName );
+ if ( !pEntry )
throw beans::UnknownPropertyException();
- SetOnePropertyValue( pMap, NULL );
+ SetOnePropertyValue( aPropertyName, pEntry, NULL );
}
uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const rtl::OUString& aPropertyName )
@@ -1418,11 +1421,10 @@ uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const rtl::OUString& aProperty
uno::RuntimeException)
{
ScUnoGuard aGuard;
- String aString(aPropertyName);
uno::Any aAny;
- const SfxItemPropertyMap* pResultEntry = NULL;
- const SfxItemSet* pStyleSet = GetStyleItemSet_Impl( aString, pResultEntry );
+ const SfxItemPropertySimpleEntry* pResultEntry = NULL;
+ const SfxItemSet* pStyleSet = GetStyleItemSet_Impl( aPropertyName, pResultEntry );
if ( pStyleSet && pResultEntry )
{
@@ -1467,14 +1469,14 @@ uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const rtl::OUString& aProperty
case ATTR_PAGE_SCALETO:
{
const ScPageScaleToItem aItem((const ScPageScaleToItem&)pItemSet->Get(nWhich));
- if (aString.EqualsAscii( SC_UNO_PAGE_SCALETOX ))
+ if (aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SC_UNO_PAGE_SCALETOX )))
aAny = uno::makeAny(static_cast<sal_Int16>(aItem.GetWidth()));
else
aAny = uno::makeAny(static_cast<sal_Int16>(aItem.GetHeight()));
}
break;
default:
- aAny = aPropSet.getPropertyValue( *pResultEntry, *pItemSet );
+ pPropSet->getPropertyValue( *pResultEntry, *pItemSet, aAny );
}
}
else if ( IsScUnoWid( nWhich ) )
@@ -1523,17 +1525,11 @@ void SAL_CALL ScStyleObj::setPropertyValues( const uno::Sequence< rtl::OUString
const rtl::OUString* pNames = aPropertyNames.getConstArray();
const uno::Any* pValues = aValues.getConstArray();
- const SfxItemPropertyMap* pPropertyMap = aPropSet.getPropertyMap();
- const SfxItemPropertyMap* pMap = pPropertyMap;
+ const SfxItemPropertyMap* pPropertyMap = pPropSet->getPropertyMap();
for (sal_Int32 i = 0; i < nCount; i++)
{
- String aNameString = pNames[i];
- pMap = SfxItemPropertyMap::GetByName( pMap, aNameString );
- SetOnePropertyValue( pMap, &pValues[i] );
- if (!pMap)
- pMap = pPropertyMap;
- else
- pMap++;
+ const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( pNames[i] );
+ SetOnePropertyValue( pNames[i], pEntry, &pValues[i] );
}
}
}
@@ -1637,17 +1633,11 @@ void SAL_CALL ScStyleObj::setPropertiesToDefault( const uno::Sequence<rtl::OUStr
{
const rtl::OUString* pNames = aPropertyNames.getConstArray();
- const SfxItemPropertyMap* pPropertyMap = aPropSet.getPropertyMap();
- const SfxItemPropertyMap* pMap = pPropertyMap;
+ const SfxItemPropertyMap* pPropertyMap = pPropSet->getPropertyMap();
for (sal_Int32 i = 0; i < nCount; i++)
{
- String aNameString(pNames[i]);
- pMap = SfxItemPropertyMap::GetByName( pMap, aNameString );
- SetOnePropertyValue( pMap, NULL );
- if (!pMap)
- pMap = pPropertyMap;
- else
- pMap++;
+ const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( pNames[i] );
+ SetOnePropertyValue( pNames[i], pEntry, NULL );
}
}
}
@@ -1678,7 +1668,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScStyleObj::getPropertySetInfo(
throw(uno::RuntimeException)
{
ScUnoGuard aGuard;
- return aPropSet.getPropertySetInfo();
+ return pPropSet->getPropertySetInfo();
}
void SAL_CALL ScStyleObj::setPropertyValue(
@@ -1689,53 +1679,51 @@ void SAL_CALL ScStyleObj::setPropertyValue(
{
ScUnoGuard aGuard;
- const SfxItemPropertyMap* pMap = aPropSet.getPropertyMap();
- pMap = SfxItemPropertyMap::GetByName( pMap, aPropertyName );
- if ( !pMap )
+ const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap()->getByName( aPropertyName );
+ if ( !pEntry )
throw beans::UnknownPropertyException();
- SetOnePropertyValue( pMap, &aValue );
+ SetOnePropertyValue( aPropertyName, pEntry, &aValue );
}
-void ScStyleObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const uno::Any* pValue )
+void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, const SfxItemPropertySimpleEntry* pEntry, const uno::Any* pValue )
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
SfxStyleSheetBase* pStyle = GetStyle_Impl();
- if ( pStyle && pMap )
+ if ( pStyle && pEntry )
{
// #70909# cell styles cannot be modified if any sheet is protected
if ( eFamily == SFX_STYLE_FAMILY_PARA && lcl_AnyTabProtected( *pDocShell->GetDocument() ) )
throw uno::RuntimeException();
- String aString(String::CreateFromAscii( pMap->pName ));
-
SfxItemSet& rSet = pStyle->GetItemSet(); // direkt im lebenden Style aendern...
sal_Bool bDone = sal_False;
if ( eFamily == SFX_STYLE_FAMILY_PAGE )
{
- const SfxItemPropertyMap* pHeaderMap =
- SfxItemPropertyMap::GetByName( lcl_GetHeaderStyleMap(), aString );
- if ( pHeaderMap ) // only item-wids in header/footer map
+ if(pEntry->nWID == SC_WID_UNO_HEADERSET)
{
- SvxSetItem aNewHeader( (const SvxSetItem&)rSet.Get(ATTR_PAGE_HEADERSET) );
- if (pValue)
- aPropSet.setPropertyValue( *pHeaderMap, *pValue, aNewHeader.GetItemSet() );
- else
- aNewHeader.GetItemSet().ClearItem( pHeaderMap->nWID );
- rSet.Put( aNewHeader );
- bDone = sal_True;
+ const SfxItemPropertySimpleEntry* pHeaderEntry = lcl_GetHeaderStyleMap()->getByName( rPropertyName );
+ if ( pHeaderEntry ) // only item-wids in header/footer map
+ {
+ SvxSetItem aNewHeader( (const SvxSetItem&)rSet.Get(ATTR_PAGE_HEADERSET) );
+ if (pValue)
+ pPropSet->setPropertyValue( *pHeaderEntry, *pValue, aNewHeader.GetItemSet() );
+ else
+ aNewHeader.GetItemSet().ClearItem( pHeaderEntry->nWID );
+ rSet.Put( aNewHeader );
+ bDone = sal_True;
+ }
}
- else
+ else if(pEntry->nWID == SC_WID_UNO_FOOTERSET)
{
- const SfxItemPropertyMap* pFooterMap =
- SfxItemPropertyMap::GetByName( lcl_GetFooterStyleMap(), aString );
- if ( pFooterMap ) // only item-wids in header/footer map
+ const SfxItemPropertySimpleEntry* pFooterEntry = lcl_GetFooterStyleMap()->getByName( rPropertyName );
+ if ( pFooterEntry ) // only item-wids in header/footer map
{
SvxSetItem aNewFooter( (const SvxSetItem&)rSet.Get(ATTR_PAGE_FOOTERSET) );
if (pValue)
- aPropSet.setPropertyValue( *pFooterMap, *pValue, aNewFooter.GetItemSet() );
+ pPropSet->setPropertyValue( *pFooterEntry, *pValue, aNewFooter.GetItemSet() );
else
- aNewFooter.GetItemSet().ClearItem( pFooterMap->nWID );
+ aNewFooter.GetItemSet().ClearItem( pFooterEntry->nWID );
rSet.Put( aNewFooter );
bDone = sal_True;
}
@@ -1743,15 +1731,13 @@ void ScStyleObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const uno:
}
if (!bDone)
{
- const SfxItemPropertyMap* pOwnMap =
- SfxItemPropertyMap::GetByName( aPropSet.getPropertyMap(), aString );
- if ( pOwnMap )
+ if ( pEntry )
{
- if ( IsScItemWid( pOwnMap->nWID ) )
+ if ( IsScItemWid( pEntry->nWID ) )
{
if (pValue)
{
- switch ( pOwnMap->nWID ) // fuer Item-Spezial-Behandlungen
+ switch ( pEntry->nWID ) // fuer Item-Spezial-Behandlungen
{
case ATTR_VALUE_FORMAT:
{
@@ -1782,7 +1768,7 @@ void ScStyleObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const uno:
{
sal_Int16 nVal = 0;
*pValue >>= nVal;
- rSet.Put( SfxUInt16Item( pOwnMap->nWID, (USHORT)HMMToTwips(nVal) ) );
+ rSet.Put( SfxUInt16Item( pEntry->nWID, (USHORT)HMMToTwips(nVal) ) );
}
break;
case ATTR_ROTATE_VALUE:
@@ -1835,7 +1821,7 @@ void ScStyleObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const uno:
rSet.ClearItem(ATTR_PAGE_SCALETO);
sal_Int16 nVal = 0;
*pValue >>= nVal;
- rSet.Put( SfxUInt16Item( pOwnMap->nWID, nVal ) );
+ rSet.Put( SfxUInt16Item( pEntry->nWID, nVal ) );
}
break;
case ATTR_PAGE_FIRSTPAGENO:
@@ -1852,7 +1838,7 @@ void ScStyleObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const uno:
sal_Bool bBool = sal_False;
*pValue >>= bBool;
//! sal_Bool-MID fuer ScViewObjectModeItem definieren?
- rSet.Put( ScViewObjectModeItem( pOwnMap->nWID,
+ rSet.Put( ScViewObjectModeItem( pEntry->nWID,
bBool ? VOBJ_MODE_SHOW : VOBJ_MODE_HIDE ) );
}
break;
@@ -1895,7 +1881,7 @@ void ScStyleObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const uno:
if (*pValue >>= nPages)
{
ScPageScaleToItem aItem = ((const ScPageScaleToItem&)rSet.Get(ATTR_PAGE_SCALETO));
- if ( aString.EqualsAscii(SC_UNO_PAGE_SCALETOX))
+ if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SC_UNO_PAGE_SCALETOX)))
aItem.SetWidth(static_cast<sal_uInt16>(nPages));
else
aItem.SetHeight(static_cast<sal_uInt16>(nPages));
@@ -1909,27 +1895,27 @@ void ScStyleObj::SetOnePropertyValue( const SfxItemPropertyMap* pMap, const uno:
// #65253# Default-Items mit falscher Slot-ID
// funktionieren im SfxItemPropertySet3 nicht
//! Slot-IDs aendern...
- if ( rSet.GetPool()->GetSlotId(pOwnMap->nWID) == pOwnMap->nWID &&
- rSet.GetItemState(pOwnMap->nWID, sal_False) == SFX_ITEM_DEFAULT )
+ if ( rSet.GetPool()->GetSlotId(pEntry->nWID) == pEntry->nWID &&
+ rSet.GetItemState(pEntry->nWID, sal_False) == SFX_ITEM_DEFAULT )
{
- rSet.Put( rSet.Get(pOwnMap->nWID) );
+ rSet.Put( rSet.Get(pEntry->nWID) );
}
- aPropSet.setPropertyValue( *pOwnMap, *pValue, rSet );
+ pPropSet->setPropertyValue( *pEntry, *pValue, rSet );
}
}
else
{
- rSet.ClearItem( pOwnMap->nWID );
+ rSet.ClearItem( pEntry->nWID );
// #67847# language for number formats
- if ( pOwnMap->nWID == ATTR_VALUE_FORMAT )
+ if ( pEntry->nWID == ATTR_VALUE_FORMAT )
rSet.ClearItem( ATTR_LANGUAGE_FORMAT );
//! for ATTR_ROTATE_VALUE, also reset ATTR_ORIENTATION?
}
}
- else if ( IsScUnoWid( pOwnMap->nWID ) )
+ else if ( IsScUnoWid( pEntry->nWID ) )
{
- switch ( pOwnMap->nWID )
+ switch ( pEntry->nWID )
{
case SC_WID_UNO_TBLBORD:
{
@@ -1987,10 +1973,9 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa
uno::RuntimeException)
{
ScUnoGuard aGuard;
- String aString(aPropertyName);
uno::Any aAny;
- if ( aString.EqualsAscii( SC_UNONAME_DISPNAME ) ) // read-only
+ if ( aPropertyName.equalsAscii( SC_UNONAME_DISPNAME ) ) // read-only
{
// core always has the display name
SfxStyleSheetBase* pStyle = GetStyle_Impl();
@@ -1999,8 +1984,8 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa
}
else
{
- const SfxItemPropertyMap* pResultEntry = NULL;
- const SfxItemSet* pItemSet = GetStyleItemSet_Impl( aString, pResultEntry );
+ const SfxItemPropertySimpleEntry* pResultEntry = NULL;
+ const SfxItemSet* pItemSet = GetStyleItemSet_Impl( aPropertyName, pResultEntry );
if ( pItemSet && pResultEntry )
{
@@ -2065,7 +2050,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa
case ATTR_PAGE_SCALETO:
{
ScPageScaleToItem aItem((const ScPageScaleToItem&)pItemSet->Get(ATTR_PAGE_SCALETO));
- if (aString.EqualsAscii(SC_UNO_PAGE_SCALETOX))
+ if (aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SC_UNO_PAGE_SCALETOX)))
aAny = uno::makeAny(static_cast<sal_Int16>(aItem.GetWidth()));
else
aAny = uno::makeAny(static_cast<sal_Int16>(aItem.GetHeight()));
@@ -2080,10 +2065,10 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa
{
SfxItemSet aNoEmptySet( *pItemSet );
aNoEmptySet.Put( aNoEmptySet.Get( nWhich ) );
- aAny = aPropSet.getPropertyValue( *pResultEntry, aNoEmptySet );
+ pPropSet->getPropertyValue( *pResultEntry, aNoEmptySet, aAny );
}
else
- aAny = aPropSet.getPropertyValue( *pResultEntry, *pItemSet );
+ pPropSet->getPropertyValue( *pResultEntry, *pItemSet, aAny );
}
}
else if ( IsScUnoWid( nWhich ) )
@@ -2127,10 +2112,9 @@ sal_Bool SAL_CALL ScStyleObj::supportsService( const rtl::OUString& rServiceName
throw(uno::RuntimeException)
{
BOOL bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE );
- String aServiceStr( rServiceName );
- return aServiceStr.EqualsAscii( SCSTYLE_SERVICE ) ||
- aServiceStr.EqualsAscii( bPage ? SCPAGESTYLE_SERVICE
- : SCCELLSTYLE_SERVICE );
+ return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SCSTYLE_SERVICE ) )||
+ rServiceName.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM ( bPage ? SCPAGESTYLE_SERVICE : SCCELLSTYLE_SERVICE ));
}
uno::Sequence<rtl::OUString> SAL_CALL ScStyleObj::getSupportedServiceNames()
diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx
index 4f4dfc94e55d..0fed003b751b 100644
--- a/sc/source/ui/unoobj/targuno.cxx
+++ b/sc/source/ui/unoobj/targuno.cxx
@@ -66,9 +66,9 @@ sal_uInt16 nTypeResIds[SC_LINKTARGETTYPE_COUNT] =
SCSTR_CONTENT_DBAREA // SC_LINKTARGETTYPE_DBAREA
};
-const SfxItemPropertyMap* lcl_GetLinkTargetMap()
+const SfxItemPropertyMapEntry* lcl_GetLinkTargetMap()
{
- static SfxItemPropertyMap aLinkTargetMap_Impl[] =
+ static SfxItemPropertyMapEntry aLinkTargetMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNO_LINKDISPBIT), 0, &getCppuType((const uno::Reference<awt::XBitmap>*)0), beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNO_LINKDISPNAME), 0, &getCppuType((const ::rtl::OUString*)0), beans::PropertyAttribute::READONLY, 0 },
diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx
index 97e10e4e973e..bd481dfc49f0 100644
--- a/sc/source/ui/unoobj/textuno.cxx
+++ b/sc/source/ui/unoobj/textuno.cxx
@@ -68,9 +68,9 @@ using namespace com::sun::star;
//------------------------------------------------------------------------
-const SfxItemPropertyMap* lcl_GetHdFtPropertyMap()
+const SvxItemPropertySet * lcl_GetHdFtPropertySet()
{
- static SfxItemPropertyMap aHdFtPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aHdFtPropertyMap_Impl[] =
{
SVX_UNOEDIT_CHAR_PROPERTIES,
SVX_UNOEDIT_FONT_PROPERTIES,
@@ -85,7 +85,7 @@ const SfxItemPropertyMap* lcl_GetHdFtPropertyMap()
// modify PropertyMap to include CONVERT_TWIPS flag for font height
// (headers/footers are in twips)
- SfxItemPropertyMap* pEntry = aHdFtPropertyMap_Impl;
+ SfxItemPropertyMapEntry* pEntry = aHdFtPropertyMap_Impl;
while (pEntry->pName)
{
if ( ( pEntry->nWID == EE_CHAR_FONTHEIGHT ||
@@ -100,8 +100,8 @@ const SfxItemPropertyMap* lcl_GetHdFtPropertyMap()
}
bTwipsSet = TRUE;
}
-
- return aHdFtPropertyMap_Impl;
+ static SvxItemPropertySet aHdFtPropertySet_Impl( aHdFtPropertyMap_Impl );
+ return &aHdFtPropertySet_Impl;
}
//------------------------------------------------------------------------
@@ -349,7 +349,7 @@ void ScHeaderFooterTextObj::CreateUnoText_Impl()
{
// can't be aggregated because getString/setString is handled here
ScSharedHeaderFooterEditSource aEditSource( &aTextData );
- pUnoText = new SvxUnoText( &aEditSource, lcl_GetHdFtPropertyMap(), uno::Reference<text::XText>() );
+ pUnoText = new SvxUnoText( &aEditSource, lcl_GetHdFtPropertySet(), uno::Reference<text::XText>() );
pUnoText->acquire();
}
}
@@ -920,7 +920,7 @@ ScSimpleEditSourceHelper::~ScSimpleEditSourceHelper()
}
ScEditEngineTextObj::ScEditEngineTextObj() :
- SvxUnoText( GetOriginalSource(), ScCellObj::GetEditPropertyMap(), uno::Reference<text::XText>() )
+ SvxUnoText( GetOriginalSource(), ScCellObj::GetEditPropertySet(), uno::Reference<text::XText>() )
{
}
@@ -1104,7 +1104,7 @@ void ScCellTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
ScCellTextObj::ScCellTextObj(ScDocShell* pDocSh, const ScAddress& rP) :
ScCellTextData( pDocSh, rP ),
- SvxUnoText( GetOriginalSource(), ScCellObj::GetEditPropertyMap(), uno::Reference<text::XText>() )
+ SvxUnoText( GetOriginalSource(), ScCellObj::GetEditPropertySet(), uno::Reference<text::XText>() )
{
}
diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx
index d2ce4615fc65..dfb0f42702a8 100644
--- a/sc/source/ui/unoobj/tokenuno.cxx
+++ b/sc/source/ui/unoobj/tokenuno.cxx
@@ -57,9 +57,9 @@ using namespace com::sun::star;
//------------------------------------------------------------------------
-const SfxItemPropertyMap* lcl_GetFormulaParserMap()
+const SfxItemPropertyMapEntry* lcl_GetFormulaParserMap()
{
- static SfxItemPropertyMap aFormulaParserMap_Impl[] =
+ static SfxItemPropertyMapEntry aFormulaParserMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNO_REFERENCEPOS), 0, &getCppuType((table::CellAddress*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_COMPILEFAP), 0, &getBooleanCppuType(), 0, 0 },
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index 21910e719d60..fa27b94a9956 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -80,9 +80,9 @@ using namespace com::sun::star;
// alles ohne Which-ID, Map nur fuer PropertySetInfo
-const SfxItemPropertyMap* lcl_GetViewOptPropertyMap()
+const SfxItemPropertyMapEntry* lcl_GetViewOptPropertyMap()
{
- static SfxItemPropertyMap aViewOptPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aViewOptPropertyMap_Impl[] =
{
{MAP_CHAR_LEN(OLD_UNO_COLROWHDR), 0, &getBooleanCppuType(), 0, 0},
{MAP_CHAR_LEN(SC_UNO_GRIDCOLOR), 0, &getCppuType((sal_Int32*)0), 0, 0},
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 41682a0c5211..9df9dc5f5246 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1414,24 +1414,26 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
{
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aProperties;
sal_Int32 nCount = 0;
+ const SfxItemPropertyMap* pMap = ScCellObj::GetCellPropertyMap();
+ PropertyEntryVector_t aPropVector = pMap->getPropertyEntries();
for ( USHORT nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; ++nWhich )
{
const SfxPoolItem* pItem = 0;
if ( rNewSet.GetItemState( nWhich, TRUE, &pItem ) == SFX_ITEM_SET && pItem )
{
- const SfxItemPropertyMap* pMap = ScCellObj::GetCellPropertyMap();
- while ( pMap->pName )
+ PropertyEntryVector_t::const_iterator aIt = aPropVector.begin();
+ while ( aIt != aPropVector.end())
{
- if ( pMap->nWID == nWhich )
+ if ( aIt->nWID == nWhich )
{
::com::sun::star::uno::Any aVal;
- pItem->QueryValue( aVal, pMap->nMemberId );
+ pItem->QueryValue( aVal, aIt->nMemberId );
aProperties.realloc( nCount + 1 );
- aProperties[ nCount ].Name = ::rtl::OUString::createFromAscii( pMap->pName );
+ aProperties[ nCount ].Name = aIt->sName;
aProperties[ nCount ].Value <<= aVal;
++nCount;
}
- ++pMap;
+ ++aIt;
}
}
}