summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-06-03 11:26:39 +0000
committerKurt Zenker <kz@openoffice.org>2009-06-03 11:26:39 +0000
commita8da772c4a21e7c9883823e3ae4dbee03c8c77fa (patch)
treed78ff4dbe4ab2916be487f8f921333877ae331a4
parenta55914808cc66c14c4fb139f229ee84c8284bb74 (diff)
CWS-TOOLING: integrate CWS os128
2009-04-22 12:58:26 +0200 b_michaelsen r271093 : #i101084# using the frames enumeration for other SwXFrames-queries; also added a complex test to ensure the behavior to be the same 2009-04-20 14:53:03 +0200 mav r270987 : #i101219# adjust the testcases to test memory cache and temporary file cache 2009-04-20 14:52:09 +0200 mav r270986 : #i101219#,#i99077# use memory to cache data; no precopying on commit 2009-04-20 14:39:21 +0200 mav r270984 : #i101219# use memory to cache data 2009-04-20 14:39:08 +0200 mav r270983 : #i101219# use memory to cache data 2009-04-20 14:38:45 +0200 mav r270982 : #i101219# use memory to cache data 2009-04-17 07:37:52 +0200 os r270912 : CWS-TOOLING: rebase CWS os128 to trunk@270723 (milestone: DEV300:m46) 2009-04-15 14:54:18 +0200 b_michaelsen r270845 : #i101084# using frame enumerations for paragraph export for better performance 2009-04-15 14:52:54 +0200 b_michaelsen r270843 : #i101084# implemented XEnumerationAccess interface on framesets 2009-04-03 17:08:10 +0200 mav r270504 : #i100722# do not compress streams of known compressed types per default 2009-04-03 13:49:50 +0200 os r270484 : resync error fixed 2009-04-03 12:55:32 +0200 mav r270470 : #i100722# do not compress streams of known compressed types per default 2009-04-03 10:00:58 +0200 os r270463 : resync error fixed 2009-04-03 09:52:53 +0200 os r270462 : resync error fixed 2009-04-03 09:10:14 +0200 os r270449 : #i99568# string compare operator of hash_map changed 2009-04-03 09:03:49 +0200 os r270446 : #i100683# normalize file URLs 2009-04-02 11:09:27 +0200 os r270381 : #i100683# making URLs relative without file access 2009-04-02 09:04:42 +0200 os r270366 : CWS-TOOLING: rebase CWS os128 to trunk@270033 (milestone: DEV300:m45) 2009-03-31 08:08:37 +0200 os r270258 : #i100683# reducing calls to URIHelper::simpleNormalizeMakeRelative() 2009-03-19 17:06:22 +0100 os r269756 : #i99568# XTolerantMultiPropertySet activated 2009-03-16 11:46:14 +0100 os r269517 : wrong commit to #i97471# removed 2009-03-16 11:36:50 +0100 os r269514 : #i97471# SwDrawTextShell::Init(): mouse double click and key input in group objects at the same time: prevent crash 2009-03-13 11:08:54 +0100 os r269464 : #i99568# static SfxItemPropertySet 2009-03-13 11:03:22 +0100 os r269463 : #i99568# static SfxItemPropertySet 2009-03-11 12:59:27 +0100 os r269320 : #i99568# WhichId of properties handled from ScDocOptionsObj added 2009-03-06 09:09:58 +0100 os r268972 : #i99568# SfxItemPropertySet improvements 2009-03-05 20:54:43 +0100 os r268942 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 20:19:52 +0100 os r268941 : #i99568# SfxItemPropertySet improvements 2009-03-05 20:05:03 +0100 os r268940 : #i99568# SfxItemPropertySet improvements 2009-03-05 18:54:47 +0100 os r268936 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 17:51:38 +0100 os r268931 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 17:33:03 +0100 os r268930 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 15:53:00 +0100 os r268920 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 15:52:50 +0100 os r268919 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 15:50:41 +0100 os r268918 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 15:41:04 +0100 os r268916 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 15:40:40 +0100 os r268915 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 10:16:20 +0100 os r268881 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 10:15:55 +0100 os r268880 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-03 08:40:09 +0100 os r268704 : ScTableSheetObj::GetItemPropertyMap fixed 2009-03-03 07:50:00 +0100 os r268703 : SfxItemProperty set as pointer 2009-03-03 07:49:46 +0100 os r268702 : SfxItemProperty set as pointer 2009-03-02 08:15:37 +0100 os r268631 : minor fix 2009-03-02 07:58:38 +0100 os r268630 : minor fix 2009-02-27 13:03:25 +0100 os r268584 : exports 2009-02-27 11:17:04 +0100 os r268567 : debug code removed 2009-02-27 11:04:07 +0100 os r268565 : duplicate return removed 2009-02-27 10:17:37 +0100 os r268558 : syntax fixed 2009-02-27 09:56:14 +0100 os r268554 : #i99568# type mix fixed 2009-02-27 09:40:56 +0100 os r268553 : #i99568# exports changes reverted 2009-02-25 12:50:54 +0100 os r268433 : #i99568# SfxItemPropertySet rework 2009-02-25 12:13:39 +0100 os r268432 : #i99568# SfxItemPropertySet rework 2009-02-25 12:12:47 +0100 os r268431 : #i99568# SfxItemPropertySet rework 2009-02-25 12:10:27 +0100 os r268430 : #i99568# SfxItemPropertySet rework 2009-02-25 12:09:36 +0100 os r268429 : #i99568# SfxItemPropertySet rework 2009-02-25 12:07:39 +0100 os r268428 : #i99568# SfxItemPropertySet rework 2009-02-25 11:59:35 +0100 os r268427 : #i99568# SfxItemPropertySet rework 2009-02-25 11:52:52 +0100 os r268425 : #i99568# SfxItemPropertySet rework 2009-02-25 11:49:17 +0100 os r268424 : #i99568# SfxItemPropertySet rework 2009-02-25 11:45:17 +0100 os r268423 : #i99568# SfxItemPropertySet rework 2009-02-11 11:39:04 +0100 os r267587 : #i57008# use registration of index marks at SwUnoCallback
-rw-r--r--linguistic/source/lngopt.cxx121
-rw-r--r--linguistic/source/lngopt.hxx2
-rw-r--r--sfx2/source/doc/applet.cxx149
-rw-r--r--sfx2/source/doc/iframe.cxx105
-rw-r--r--sfx2/source/doc/objuno.cxx128
-rw-r--r--sfx2/source/doc/plugin.cxx24
-rw-r--r--sfx2/source/inc/applet.hxx2
-rw-r--r--sfx2/source/inc/iframe.hxx2
-rw-r--r--sfx2/source/inc/plugin.hxx2
-rw-r--r--svx/inc/AccessibleSelectionBase.hxx76
-rw-r--r--svx/inc/AccessibleStaticTextBase.hxx279
-rw-r--r--svx/inc/ActionDescriptionProvider.hxx68
-rw-r--r--svx/inc/accessibility.hrc94
-rw-r--r--svx/inc/acorrcfg.hxx137
-rw-r--r--svx/inc/anchorid.hxx46
-rw-r--r--svx/inc/asiancfg.hxx73
-rw-r--r--svx/inc/bolnitem.hxx87
-rw-r--r--svx/inc/bulitem.hxx164
-rw-r--r--svx/inc/charhiddenitem.hxx66
-rw-r--r--svx/inc/svx/unofield.hxx2
-rw-r--r--svx/inc/svx/unoipset.hxx30
-rw-r--r--svx/inc/svx/unoprov.hxx13
-rw-r--r--svx/inc/svx/unoshape.hxx88
-rw-r--r--svx/inc/svx/unotext.hxx37
-rw-r--r--svx/inc/unoapi.hxx3
-rw-r--r--svx/source/accessibility/AccessibleEditableTextPara.cxx16
-rw-r--r--svx/source/inc/unopracc.hxx2
-rw-r--r--svx/source/table/cell.cxx29
-rw-r--r--svx/source/table/cell.hxx6
-rw-r--r--svx/source/unodraw/shapeimpl.hxx16
-rw-r--r--svx/source/unodraw/tableshape.cxx18
-rw-r--r--svx/source/unodraw/unoipset.cxx266
-rw-r--r--svx/source/unodraw/unopage.cxx6
-rw-r--r--svx/source/unodraw/unoprov.cxx147
-rw-r--r--svx/source/unodraw/unoshap2.cxx48
-rw-r--r--svx/source/unodraw/unoshap3.cxx60
-rw-r--r--svx/source/unodraw/unoshap4.cxx66
-rw-r--r--svx/source/unodraw/unoshape.cxx192
-rw-r--r--svx/source/unoedit/unofield.cxx46
-rw-r--r--svx/source/unoedit/unopracc.cxx4
-rw-r--r--svx/source/unoedit/unotext.cxx179
-rw-r--r--svx/source/xml/xmltxtexp.cxx5
-rw-r--r--svx/source/xml/xmltxtimp.cxx5
-rw-r--r--xmloff/inc/xmloff/txtparae.hxx61
-rw-r--r--xmloff/source/core/xmlexp.cxx27
-rw-r--r--xmloff/source/text/txtparae.cxx605
46 files changed, 2181 insertions, 1421 deletions
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index 53be907440..bb750b2eb7 100644
--- a/linguistic/source/lngopt.cxx
+++ b/linguistic/source/lngopt.cxx
@@ -318,55 +318,58 @@ OUString LinguOptions::GetName( INT32 nWID )
///////////////////////////////////////////////////////////////////////////
//! map must be sorted by first entry in alphabetical increasing order.
-static SfxItemPropertyMap aLinguProps[] =
-{
- { MAP_CHAR_LEN(UPN_DEFAULT_LANGUAGE), WID_DEFAULT_LANGUAGE,
- &::getCppuType( (sal_Int16*)0 ), 0, 0 },
- { MAP_CHAR_LEN(UPN_DEFAULT_LOCALE), WID_DEFAULT_LOCALE,
- &::getCppuType( (Locale* )0), 0, 0 },
- { MAP_CHAR_LEN(UPN_DEFAULT_LOCALE_CJK), WID_DEFAULT_LOCALE_CJK,
- &::getCppuType( (Locale* )0), 0, 0 },
- { MAP_CHAR_LEN(UPN_DEFAULT_LOCALE_CTL), WID_DEFAULT_LOCALE_CTL,
- &::getCppuType( (Locale* )0), 0, 0 },
- { MAP_CHAR_LEN(UPN_HYPH_MIN_LEADING), WID_HYPH_MIN_LEADING,
- &::getCppuType( (sal_Int16*)0 ), 0, 0 },
- { MAP_CHAR_LEN(UPN_HYPH_MIN_TRAILING), WID_HYPH_MIN_TRAILING,
- &::getCppuType( (sal_Int16*)0 ), 0, 0 },
- { MAP_CHAR_LEN(UPN_HYPH_MIN_WORD_LENGTH), WID_HYPH_MIN_WORD_LENGTH,
- &::getCppuType( (sal_Int16*)0 ), 0, 0 },
- { MAP_CHAR_LEN(UPN_IS_GERMAN_PRE_REFORM), WID_IS_GERMAN_PRE_REFORM, /*! deprecated !*/
- &::getBooleanCppuType(), 0, 0 },
- { MAP_CHAR_LEN(UPN_IS_HYPH_AUTO), WID_IS_HYPH_AUTO,
- &::getBooleanCppuType(), 0, 0 },
- { MAP_CHAR_LEN(UPN_IS_HYPH_SPECIAL), WID_IS_HYPH_SPECIAL,
- &::getBooleanCppuType(), 0, 0 },
- { MAP_CHAR_LEN(UPN_IS_IGNORE_CONTROL_CHARACTERS), WID_IS_IGNORE_CONTROL_CHARACTERS,
- &::getBooleanCppuType(), 0, 0 },
- { MAP_CHAR_LEN(UPN_IS_SPELL_AUTO), WID_IS_SPELL_AUTO,
- &::getBooleanCppuType(), 0, 0 },
- { MAP_CHAR_LEN(UPN_IS_SPELL_CAPITALIZATION), WID_IS_SPELL_CAPITALIZATION,
- &::getBooleanCppuType(), 0, 0 },
- { MAP_CHAR_LEN(UPN_IS_SPELL_HIDE), WID_IS_SPELL_HIDE, /*! deprecated !*/
- &::getBooleanCppuType(), 0, 0 },
- { MAP_CHAR_LEN(UPN_IS_SPELL_IN_ALL_LANGUAGES), WID_IS_SPELL_IN_ALL_LANGUAGES, /*! deprecated !*/
- &::getBooleanCppuType(), 0, 0 },
- { MAP_CHAR_LEN(UPN_IS_SPELL_SPECIAL), WID_IS_SPELL_SPECIAL,
- &::getBooleanCppuType(), 0, 0 },
- { MAP_CHAR_LEN(UPN_IS_SPELL_UPPER_CASE), WID_IS_SPELL_UPPER_CASE,
- &::getBooleanCppuType(), 0, 0 },
- { MAP_CHAR_LEN(UPN_IS_SPELL_WITH_DIGITS), WID_IS_SPELL_WITH_DIGITS,
- &::getBooleanCppuType(), 0, 0 },
- { MAP_CHAR_LEN(UPN_IS_USE_DICTIONARY_LIST), WID_IS_USE_DICTIONARY_LIST,
- &::getBooleanCppuType(), 0, 0 },
- { MAP_CHAR_LEN(UPN_IS_WRAP_REVERSE), WID_IS_WRAP_REVERSE,
- &::getBooleanCppuType(), 0, 0 },
- { 0,0,0,0,0,0 }
-};
-
+const SfxItemPropertyMapEntry* lcl_GetLinguProps()
+{
+ static const SfxItemPropertyMapEntry aLinguProps[] =
+ {
+ { MAP_CHAR_LEN(UPN_DEFAULT_LANGUAGE), WID_DEFAULT_LANGUAGE,
+ &::getCppuType( (sal_Int16*)0 ), 0, 0 },
+ { MAP_CHAR_LEN(UPN_DEFAULT_LOCALE), WID_DEFAULT_LOCALE,
+ &::getCppuType( (Locale* )0), 0, 0 },
+ { MAP_CHAR_LEN(UPN_DEFAULT_LOCALE_CJK), WID_DEFAULT_LOCALE_CJK,
+ &::getCppuType( (Locale* )0), 0, 0 },
+ { MAP_CHAR_LEN(UPN_DEFAULT_LOCALE_CTL), WID_DEFAULT_LOCALE_CTL,
+ &::getCppuType( (Locale* )0), 0, 0 },
+ { MAP_CHAR_LEN(UPN_HYPH_MIN_LEADING), WID_HYPH_MIN_LEADING,
+ &::getCppuType( (sal_Int16*)0 ), 0, 0 },
+ { MAP_CHAR_LEN(UPN_HYPH_MIN_TRAILING), WID_HYPH_MIN_TRAILING,
+ &::getCppuType( (sal_Int16*)0 ), 0, 0 },
+ { MAP_CHAR_LEN(UPN_HYPH_MIN_WORD_LENGTH), WID_HYPH_MIN_WORD_LENGTH,
+ &::getCppuType( (sal_Int16*)0 ), 0, 0 },
+ { MAP_CHAR_LEN(UPN_IS_GERMAN_PRE_REFORM), WID_IS_GERMAN_PRE_REFORM, /*! deprecated !*/
+ &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN(UPN_IS_HYPH_AUTO), WID_IS_HYPH_AUTO,
+ &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN(UPN_IS_HYPH_SPECIAL), WID_IS_HYPH_SPECIAL,
+ &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN(UPN_IS_IGNORE_CONTROL_CHARACTERS), WID_IS_IGNORE_CONTROL_CHARACTERS,
+ &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN(UPN_IS_SPELL_AUTO), WID_IS_SPELL_AUTO,
+ &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN(UPN_IS_SPELL_CAPITALIZATION), WID_IS_SPELL_CAPITALIZATION,
+ &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN(UPN_IS_SPELL_HIDE), WID_IS_SPELL_HIDE, /*! deprecated !*/
+ &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN(UPN_IS_SPELL_IN_ALL_LANGUAGES), WID_IS_SPELL_IN_ALL_LANGUAGES, /*! deprecated !*/
+ &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN(UPN_IS_SPELL_SPECIAL), WID_IS_SPELL_SPECIAL,
+ &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN(UPN_IS_SPELL_UPPER_CASE), WID_IS_SPELL_UPPER_CASE,
+ &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN(UPN_IS_SPELL_WITH_DIGITS), WID_IS_SPELL_WITH_DIGITS,
+ &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN(UPN_IS_USE_DICTIONARY_LIST), WID_IS_USE_DICTIONARY_LIST,
+ &::getBooleanCppuType(), 0, 0 },
+ { MAP_CHAR_LEN(UPN_IS_WRAP_REVERSE), WID_IS_WRAP_REVERSE,
+ &::getBooleanCppuType(), 0, 0 },
+ { 0,0,0,0,0,0 }
+ };
+ return aLinguProps;
+}
LinguProps::LinguProps() :
aEvtListeners (GetLinguMutex()),
aPropListeners (GetLinguMutex()),
- pMap (aLinguProps)
+ aPropertyMap(lcl_GetLinguProps())
{
bDisposing = FALSE;
}
@@ -401,7 +404,7 @@ Reference< XPropertySetInfo > SAL_CALL LinguProps::getPropertySetInfo()
MutexGuard aGuard( GetLinguMutex() );
static Reference< XPropertySetInfo > aRef =
- new SfxItemPropertySetInfo( pMap );
+ new SfxItemPropertySetInfo( &aPropertyMap );
return aRef;
}
@@ -412,8 +415,7 @@ void SAL_CALL LinguProps::setPropertyValue(
{
MutexGuard aGuard( GetLinguMutex() );
- const SfxItemPropertyMap* pCur =
- SfxItemPropertyMap::GetByName(pMap, rPropertyName);
+ const SfxItemPropertySimpleEntry* pCur = aPropertyMap.getByName( rPropertyName );
if (pCur)
{
Any aOld( aConfig.GetProperty( pCur->nWID ) );
@@ -439,7 +441,7 @@ Any SAL_CALL LinguProps::getPropertyValue( const OUString& rPropertyName )
Any aRet;
- const SfxItemPropertyMap* pCur = SfxItemPropertyMap::GetByName(pMap, rPropertyName);
+ const SfxItemPropertySimpleEntry* pCur = aPropertyMap.getByName( rPropertyName );
if(pCur)
{
aRet = aConfig.GetProperty( pCur->nWID );
@@ -463,8 +465,7 @@ void SAL_CALL LinguProps::addPropertyChangeListener(
if (!bDisposing && rxListener.is())
{
- const SfxItemPropertyMap* pCur =
- SfxItemPropertyMap::GetByName( pMap, rPropertyName );
+ const SfxItemPropertySimpleEntry* pCur = aPropertyMap.getByName( rPropertyName );
if(pCur)
aPropListeners.addInterface( pCur->nWID, rxListener );
#ifdef LINGU_EXCEPTIONS
@@ -485,8 +486,7 @@ void SAL_CALL LinguProps::removePropertyChangeListener(
if (!bDisposing && rxListener.is())
{
- const SfxItemPropertyMap* pCur =
- SfxItemPropertyMap::GetByName( pMap, rPropertyName );
+ const SfxItemPropertySimpleEntry* pCur = aPropertyMap.getByName( rPropertyName );
if(pCur)
aPropListeners.removeInterface( pCur->nWID, rxListener );
#ifdef LINGU_EXCEPTIONS
@@ -547,17 +547,18 @@ Sequence< PropertyValue > SAL_CALL
{
MutexGuard aGuard( GetLinguMutex() );
- INT32 nLen = sizeof (aLinguProps) / sizeof aLinguProps[0] - 1;
+ INT32 nLen = aPropertyMap.getSize();
Sequence< PropertyValue > aProps( nLen );
PropertyValue *pProp = aProps.getArray();
- for (INT32 i = 0; i < nLen; i++)
+ PropertyEntryVector_t aPropEntries = aPropertyMap.getPropertyEntries();
+ PropertyEntryVector_t::const_iterator aIt = aPropEntries.begin();
+ for (INT32 i = 0; i < nLen; ++i, ++aIt)
{
PropertyValue &rVal = pProp[i];
- SfxItemPropertyMap &rItem = aLinguProps[i];
- Any aAny( aConfig.GetProperty( rItem.nWID ) );
+ Any aAny( aConfig.GetProperty( aIt->nWID ) );
- rVal.Name = OUString( rItem.pName, rItem.nNameLen, RTL_TEXTENCODING_ASCII_US );
- rVal.Handle = rItem.nWID;
+ rVal.Name = aIt->sName;
+ rVal.Handle = aIt->nWID;
rVal.Value = aAny;
rVal.State = PropertyState_DIRECT_VALUE ;
}
diff --git a/linguistic/source/lngopt.hxx b/linguistic/source/lngopt.hxx
index 2c5ee719ae..d983088265 100644
--- a/linguistic/source/lngopt.hxx
+++ b/linguistic/source/lngopt.hxx
@@ -132,7 +132,7 @@ class LinguProps :
::cppu::OInterfaceContainerHelper aEvtListeners;
OPropertyListenerContainerHelper aPropListeners;
- SfxItemPropertyMap *pMap;
+ SfxItemPropertyMap aPropertyMap;
SvtLinguConfig aConfig;
BOOL bDisposing;
diff --git a/sfx2/source/doc/applet.cxx b/sfx2/source/doc/applet.cxx
index fa5ab7f449..a1354d2b0f 100644
--- a/sfx2/source/doc/applet.cxx
+++ b/sfx2/source/doc/applet.cxx
@@ -45,8 +45,10 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <svtools/javaoptions.hxx>
#include <svtools/miscopt.hxx>
+#include <comphelper/TypeGeneration.hxx>
using namespace ::com::sun::star;
+using namespace ::comphelper;
namespace sfx2
{
@@ -83,16 +85,26 @@ void AppletWrapper_Impl::showStatus( const XubString & ) {}
#define PROPERTY_UNBOUND 0
#define PROPERTY_MAYBEVOID ::com::sun::star::beans::PropertyAttribute::MAYBEVOID
-SfxItemPropertyMap aAppletPropertyMap_Impl[] =
+#define WID_APPLET_CODE 1
+#define WID_APPLET_CODEBASE 2
+#define WID_APPLET_COMMANDS 3
+#define WID_APPLET_DOCBASE 4
+#define WID_APPLET_ISSCRIPT 5
+#define WID_APPLET_NAME 6
+const SfxItemPropertyMapEntry* lcl_GetAppletPropertyMap_Impl()
{
- { "AppletCode" , 10, 1, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- { "AppletCodeBase", 14, 2, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- { "AppletCommands", 14, 3, &::getCppuType((::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >*)0), PROPERTY_UNBOUND, 0 },
- { "AppletDocBase", 13, 4, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- { "AppletIsScript", 14, 5, &::getBooleanCppuType(), PROPERTY_UNBOUND, 0 },
- { "AppletName" , 10, 6, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- {0,0,0,0,0,0}
-};
+ static SfxItemPropertyMapEntry aAppletPropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("AppletCode") , WID_APPLET_CODE , CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_UNBOUND, 0 },
+ { MAP_CHAR_LEN("AppletCodeBase"), WID_APPLET_CODEBASE , CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_UNBOUND, 0 },
+ { MAP_CHAR_LEN("AppletCommands"), WID_APPLET_COMMANDS , CPPU_E2T(CPPUTYPE_PROPERTYVALUE), PROPERTY_UNBOUND, 0 },
+ { MAP_CHAR_LEN("AppletDocBase"), WID_APPLET_DOCBASE , CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_UNBOUND, 0 },
+ { MAP_CHAR_LEN("AppletIsScript"), WID_APPLET_ISSCRIPT , CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_UNBOUND, 0 },
+ { MAP_CHAR_LEN("AppletName") , WID_APPLET_NAME , CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_UNBOUND, 0 },
+ {0,0,0,0,0,0}
+ };
+return aAppletPropertyMap_Impl;
+}
::rtl::OUString AppletObject::getImplementationName()
throw( ::com::sun::star::uno::RuntimeException )
@@ -161,7 +173,7 @@ AppletObject::impl_createFactory()
AppletObject::AppletObject(
const uno::Reference < uno::XComponentContext >& rContext )
: mxContext( rContext )
- , maPropSet( aAppletPropertyMap_Impl )
+ , maPropMap( lcl_GetAppletPropertyMap_Impl() )
, mpApplet( NULL )
, mbMayScript( FALSE )
{
@@ -259,76 +271,85 @@ void SAL_CALL AppletObject::disposing( const com::sun::star::lang::EventObject&
uno::Reference< beans::XPropertySetInfo > SAL_CALL AppletObject::getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException )
{
- return maPropSet.getPropertySetInfo();
+ static uno::Reference< beans::XPropertySetInfo > xInfo = new SfxItemPropertySetInfo( &maPropMap );
+ return xInfo;
}
void SAL_CALL AppletObject::setPropertyValue(const ::rtl::OUString& aPropertyName, const uno::Any& aAny)
throw ( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{
- if ( aPropertyName.equalsAscii("AppletCode") )
- {
- aAny >>= maClass;
- }
- else if ( aPropertyName.equalsAscii("AppletCodeBase") )
- {
- //pImpl->aCodeBase = rURL.GetMainURL( INetURLObject::NO_DECODE );
- //if( rURL.GetProtocol() == INET_PROT_FILE
- // && pImpl->aCodeBase.GetChar( 9 ) == INET_ENC_DELIM_TOKEN )
- // // Laufwerksbuchstabe auf ':' patchen
- // pImpl->aCodeBase.SetChar( 9, INET_DELIM_TOKEN );
-
- aAny >>= maCodeBase;
- }
- else if ( aPropertyName.equalsAscii("AppletCommands") )
- {
- maCmdList.Clear();
- uno::Sequence < beans::PropertyValue > aCommandSequence;
- if( aAny >>= aCommandSequence )
- maCmdList.FillFromSequence( aCommandSequence );
- }
- else if ( aPropertyName.equalsAscii("AppletIsScript") )
- {
- aAny >>= mbMayScript;
- }
- else if ( aPropertyName.equalsAscii("AppletName") )
- {
- aAny >>= maName;
- }
- else if ( aPropertyName.equalsAscii("AppletDocBase") )
+
+ const SfxItemPropertySimpleEntry* pEntry = maPropMap.getByName( aPropertyName );
+ if( !pEntry )
+ throw beans::UnknownPropertyException();
+ switch( pEntry->nWID )
{
- aAny >>= maDocBase;
+ case WID_APPLET_CODE :
+ aAny >>= maClass;
+ break;
+ case WID_APPLET_CODEBASE :
+ //pImpl->aCodeBase = rURL.GetMainURL( INetURLObject::NO_DECODE );
+ //if( rURL.GetProtocol() == INET_PROT_FILE
+ // && pImpl->aCodeBase.GetChar( 9 ) == INET_ENC_DELIM_TOKEN )
+ // // Laufwerksbuchstabe auf ':' patchen
+ // pImpl->aCodeBase.SetChar( 9, INET_DELIM_TOKEN );
+
+ aAny >>= maCodeBase;
+ break;
+ case WID_APPLET_COMMANDS :
+ {
+ maCmdList.Clear();
+ uno::Sequence < beans::PropertyValue > aCommandSequence;
+ if( aAny >>= aCommandSequence )
+ maCmdList.FillFromSequence( aCommandSequence );
+ }
+ break;
+ case WID_APPLET_DOCBASE :
+ aAny >>= maDocBase;
+ break;
+ case WID_APPLET_ISSCRIPT :
+ aAny >>= mbMayScript;
+ break;
+ case WID_APPLET_NAME :
+ aAny >>= maName;
+ break;
+ default:;
+
}
- else
- throw beans::UnknownPropertyException();
}
uno::Any SAL_CALL AppletObject::getPropertyValue(const ::rtl::OUString& aPropertyName) throw ( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
uno::Any aAny;
- if ( aPropertyName.equalsAscii("AppletCode") )
+ const SfxItemPropertySimpleEntry* pEntry = maPropMap.getByName( aPropertyName );
+ if( !pEntry )
+ throw beans::UnknownPropertyException();
+ switch( pEntry->nWID )
{
+ case WID_APPLET_CODE :
aAny <<= maClass;
- }
- else if ( aPropertyName.equalsAscii("AppletCodeBase") )
- {
+ break;
+ case WID_APPLET_CODEBASE :
aAny <<= maCodeBase;
+ break;
+ case WID_APPLET_COMMANDS :
+ {
+ uno::Sequence< beans::PropertyValue > aCommandSequence;
+ maCmdList.FillSequence( aCommandSequence );
+ aAny <<= aCommandSequence;
+ }
+ break;
+ case WID_APPLET_DOCBASE :
+ break;
+ case WID_APPLET_ISSCRIPT :
+ aAny <<= mbMayScript;
+ break;
+ case WID_APPLET_NAME :
+ aAny <<= maName;
+ break;
+ default:;
+
}
- else if ( aPropertyName.equalsAscii("AppletCommands") )
- {
- uno::Sequence< beans::PropertyValue > aCommandSequence;
- maCmdList.FillSequence( aCommandSequence );
- aAny <<= aCommandSequence;
- }
- else if ( aPropertyName.equalsAscii("AppletIsScript") )
- {
- aAny <<= mbMayScript;
- }
- else if ( aPropertyName.equalsAscii("AppletName") )
- {
- aAny <<= maName;
- }
- else
- throw beans::UnknownPropertyException();
return aAny;
}
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 9fa66d4464..071c69a77b 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -96,25 +96,38 @@ void IFrameWindow_Impl::SetBorder( sal_Bool bNewBorder )
#define PROPERTY_UNBOUND 0
-SfxItemPropertyMap aIFramePropertyMap_Impl[] =
+#define WID_FRAME_URL 1
+#define WID_FRAME_NAME 2
+#define WID_FRAME_IS_AUTO_SCROLL 3
+#define WID_FRAME_IS_SCROLLING_MODE 4
+#define WID_FRAME_IS_BORDER 5
+#define WID_FRAME_IS_AUTO_BORDER 6
+#define WID_FRAME_MARGIN_WIDTH 7
+#define WID_FRAME_MARGIN_HEIGHT 8
+
+const SfxItemPropertyMapEntry* lcl_GetIFramePropertyMap_Impl()
{
- { "FrameIsAutoBorder", 17, 1, &::getBooleanCppuType(), PROPERTY_UNBOUND, 0 },
- { "FrameIsAutoScroll", 17, 2, &::getBooleanCppuType(), PROPERTY_UNBOUND, 0 },
- { "FrameIsBorder", 13, 3, &::getBooleanCppuType(), PROPERTY_UNBOUND, 0 },
- { "FrameIsScrollingMode", 20, 4, &::getBooleanCppuType(), PROPERTY_UNBOUND, 0 },
- { "FrameMarginHeight", 17, 5, &::getCppuType( (sal_Int32*)0 ), PROPERTY_UNBOUND, 0 },
- { "FrameMarginWidth", 16, 6, &::getCppuType( (sal_Int32*)0 ), PROPERTY_UNBOUND, 0 },
- { "FrameName", 9, 7, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- { "FrameURL", 8, 8, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- {0,0,0,0,0,0}
-};
+ static SfxItemPropertyMapEntry aIFramePropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("FrameIsAutoBorder"), WID_FRAME_IS_AUTO_BORDER, &::getBooleanCppuType(), PROPERTY_UNBOUND, 0 },
+ { MAP_CHAR_LEN("FrameIsAutoScroll"), WID_FRAME_IS_AUTO_SCROLL, &::getBooleanCppuType(), PROPERTY_UNBOUND, 0 },
+ { MAP_CHAR_LEN("FrameIsBorder"), WID_FRAME_IS_BORDER, &::getBooleanCppuType(), PROPERTY_UNBOUND, 0 },
+ { MAP_CHAR_LEN("FrameIsScrollingMode"), WID_FRAME_IS_SCROLLING_MODE, &::getBooleanCppuType(), PROPERTY_UNBOUND, 0 },
+ { MAP_CHAR_LEN("FrameMarginHeight"), WID_FRAME_MARGIN_HEIGHT, &::getCppuType( (sal_Int32*)0 ), PROPERTY_UNBOUND, 0 },
+ { MAP_CHAR_LEN("FrameMarginWidth"), WID_FRAME_MARGIN_WIDTH, &::getCppuType( (sal_Int32*)0 ), PROPERTY_UNBOUND, 0 },
+ { MAP_CHAR_LEN("FrameName"), WID_FRAME_NAME, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { MAP_CHAR_LEN("FrameURL"), WID_FRAME_URL, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ {0,0,0,0,0,0}
+ };
+ return aIFramePropertyMap_Impl;
+}
SFX_IMPL_XSERVICEINFO( IFrameObject, "com.sun.star.embed.SpecialEmbeddedObject", "com.sun.star.comp.sfx2.IFrameObject" )
SFX_IMPL_SINGLEFACTORY( IFrameObject );
IFrameObject::IFrameObject( const uno::Reference < lang::XMultiServiceFactory >& rFact )
: mxFact( rFact )
- , maPropSet( aIFramePropertyMap_Impl )
+ , maPropMap( lcl_GetIFramePropertyMap_Impl() )
{
}
@@ -213,43 +226,54 @@ void SAL_CALL IFrameObject::disposing( const com::sun::star::lang::EventObject&
uno::Reference< beans::XPropertySetInfo > SAL_CALL IFrameObject::getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException )
{
- return maPropSet.getPropertySetInfo();
+ static uno::Reference< beans::XPropertySetInfo > xInfo = new SfxItemPropertySetInfo( &maPropMap );
+ return xInfo;
}
void SAL_CALL IFrameObject::setPropertyValue(const ::rtl::OUString& aPropertyName, const uno::Any& aAny)
throw ( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{
- if ( aPropertyName.equalsAscii("FrameURL") )
+ const SfxItemPropertySimpleEntry* pEntry = maPropMap.getByName( aPropertyName );
+ if( !pEntry )
+ throw beans::UnknownPropertyException();
+ switch( pEntry->nWID )
+ {
+ case WID_FRAME_URL:
{
::rtl::OUString aURL;
aAny >>= aURL;
maFrmDescr.SetURL( String(aURL) );
}
- else if ( aPropertyName.equalsAscii("FrameName") )
+ break;
+ case WID_FRAME_NAME:
{
::rtl::OUString aName;
if ( aAny >>= aName )
maFrmDescr.SetName( aName );
}
- else if ( aPropertyName.equalsAscii("FrameIsAutoScroll") )
+ break;
+ case WID_FRAME_IS_AUTO_SCROLL:
{
sal_Bool bIsAutoScroll = sal_Bool();
if ( (aAny >>= bIsAutoScroll) && bIsAutoScroll )
maFrmDescr.SetScrollingMode( ScrollingAuto );
}
- else if ( aPropertyName.equalsAscii("FrameIsScrollingMode") )
+ break;
+ case WID_FRAME_IS_SCROLLING_MODE:
{
sal_Bool bIsScroll = sal_Bool();
if ( aAny >>= bIsScroll )
maFrmDescr.SetScrollingMode( bIsScroll ? ScrollingYes : ScrollingNo );
}
- else if ( aPropertyName.equalsAscii("FrameIsBorder") )
+ break;
+ case WID_FRAME_IS_BORDER:
{
sal_Bool bIsBorder = sal_Bool();
if ( aAny >>= bIsBorder )
maFrmDescr.SetFrameBorder( bIsBorder );
}
- else if ( aPropertyName.equalsAscii("FrameIsAutoBorder") )
+ break;
+ case WID_FRAME_IS_AUTO_BORDER:
{
sal_Bool bIsAutoBorder = sal_Bool();
if ( (aAny >>= bIsAutoBorder) )
@@ -260,7 +284,8 @@ void SAL_CALL IFrameObject::setPropertyValue(const ::rtl::OUString& aPropertyNam
maFrmDescr.SetFrameBorder( bBorder );
}
}
- else if ( aPropertyName.equalsAscii("FrameMarginWidth") )
+ break;
+ case WID_FRAME_MARGIN_WIDTH:
{
sal_Int32 nMargin = 0;
Size aSize = maFrmDescr.GetMargin();
@@ -270,7 +295,8 @@ void SAL_CALL IFrameObject::setPropertyValue(const ::rtl::OUString& aPropertyNam
maFrmDescr.SetMargin( aSize );
}
}
- else if ( aPropertyName.equalsAscii("FrameMarginHeight") )
+ break;
+ case WID_FRAME_MARGIN_HEIGHT:
{
sal_Int32 nMargin = 0;
Size aSize = maFrmDescr.GetMargin();
@@ -280,52 +306,65 @@ void SAL_CALL IFrameObject::setPropertyValue(const ::rtl::OUString& aPropertyNam
maFrmDescr.SetMargin( aSize );
}
}
- else
- throw beans::UnknownPropertyException();
+ break;
+ default: ;
+ }
}
uno::Any SAL_CALL IFrameObject::getPropertyValue(const ::rtl::OUString& aPropertyName)
throw ( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
+ const SfxItemPropertySimpleEntry* pEntry = maPropMap.getByName( aPropertyName );
+ if( !pEntry )
+ throw beans::UnknownPropertyException();
uno::Any aAny;
- if ( aPropertyName.equalsAscii("FrameURL") )
+ switch( pEntry->nWID )
+ {
+ case WID_FRAME_URL:
{
aAny <<= ::rtl::OUString( maFrmDescr.GetURL().GetMainURL( INetURLObject::NO_DECODE ) );
}
- else if ( aPropertyName.equalsAscii("FrameName") )
+ break;
+ case WID_FRAME_NAME:
{
aAny <<= ::rtl::OUString( maFrmDescr.GetName() );
}
- else if ( aPropertyName.equalsAscii("FrameIsAutoScroll") )
+ break;
+ case WID_FRAME_IS_AUTO_SCROLL:
{
sal_Bool bIsAutoScroll = ( maFrmDescr.GetScrollingMode() == ScrollingAuto );
aAny <<= bIsAutoScroll;
}
- else if ( aPropertyName.equalsAscii("FrameIsScrollingMode") )
+ break;
+ case WID_FRAME_IS_SCROLLING_MODE:
{
sal_Bool bIsScroll = ( maFrmDescr.GetScrollingMode() == ScrollingYes );
aAny <<= bIsScroll;
}
- else if ( aPropertyName.equalsAscii("FrameIsBorder") )
+ break;
+ case WID_FRAME_IS_BORDER:
{
sal_Bool bIsBorder = maFrmDescr.IsFrameBorderOn();
aAny <<= bIsBorder;
}
- else if ( aPropertyName.equalsAscii("FrameIsAutoBorder") )
+ break;
+ case WID_FRAME_IS_AUTO_BORDER:
{
sal_Bool bIsAutoBorder = !maFrmDescr.IsFrameBorderSet();
aAny <<= bIsAutoBorder;
}
- else if ( aPropertyName.equalsAscii("FrameMarginWidth") )
+ break;
+ case WID_FRAME_MARGIN_WIDTH:
{
aAny <<= (sal_Int32 ) maFrmDescr.GetMargin().Width();
}
- else if ( aPropertyName.equalsAscii("FrameMarginHeight") )
+ break;
+ case WID_FRAME_MARGIN_HEIGHT:
{
aAny <<= (sal_Int32 ) maFrmDescr.GetMargin().Height();
}
- else
- throw beans::UnknownPropertyException();
+ default: ;
+ }
return aAny;
}
diff --git a/sfx2/source/doc/objuno.cxx b/sfx2/source/doc/objuno.cxx
index e3dcc286f9..e9e37a44c5 100644
--- a/sfx2/source/doc/objuno.cxx
+++ b/sfx2/source/doc/objuno.cxx
@@ -99,33 +99,37 @@ using namespace ::com::sun::star;
#define PROPERTY_UNBOUND 0
#define PROPERTY_MAYBEVOID ::com::sun::star::beans::PropertyAttribute::MAYBEVOID
-SfxItemPropertyMap aDocInfoPropertyMap_Impl[] =
+const SfxItemPropertyMapEntry* lcl_GetDocInfoPropertyMap()
{
- { "Author" , 6 , WID_FROM, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- { "AutoloadEnabled" , 15, MID_DOCINFO_AUTOLOADENABLED, &::getBooleanCppuType(), PROPERTY_UNBOUND, 0 },
- { "AutoloadSecs" , 12, MID_DOCINFO_AUTOLOADSECS, &::getCppuType((const sal_Int32*)0), PROPERTY_UNBOUND, 0 },
- { "AutoloadURL" , 11, MID_DOCINFO_AUTOLOADURL, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- { "CreationDate" , 12, WID_DATE_CREATED, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_MAYBEVOID, 0 },
- { "DefaultTarget" , 13, MID_DOCINFO_DEFAULTTARGET, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- { "Description" , 11, MID_DOCINFO_DESCRIPTION, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- { "DocumentStatistic", 17 , MID_DOCINFO_STATISTIC, &::getCppuType((const uno::Sequence< beans::NamedValue >*)0), PROPERTY_UNBOUND, 0 },
- { "EditingCycles" , 13, MID_DOCINFO_REVISION, &::getCppuType((const sal_Int16*)0), PROPERTY_UNBOUND, 0 },
- { "EditingDuration" , 15, MID_DOCINFO_EDITTIME, &::getCppuType((const sal_Int32*)0), PROPERTY_UNBOUND, 0 },
- { "Generator" , 9, SID_APPLICATION, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- { "Keywords" , 8 , WID_KEYWORDS, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- { "Language" , 8, MID_DOCINFO_CHARLOCALE, &::getCppuType((const lang::Locale*)0), PROPERTY_UNBOUND, 0 },
- { "MIMEType" , 8 , WID_CONTENT_TYPE, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND | ::com::sun::star::beans::PropertyAttribute::READONLY, 0 },
- { "ModifiedBy" , 10, MID_DOCINFO_MODIFICATIONAUTHOR, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- { "ModifyDate" , 10, WID_DATE_MODIFIED, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_MAYBEVOID, 0 },
- { "PrintDate" , 9 , MID_DOCINFO_PRINTDATE, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_MAYBEVOID, 0 },
- { "PrintedBy" , 9 , MID_DOCINFO_PRINTEDBY, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- { "Subject" , 7 , MID_DOCINFO_SUBJECT, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- { "Template" , 8 , MID_DOCINFO_TEMPLATE, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- { "TemplateFileName", 16, SID_TEMPLATE_NAME, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- { "TemplateDate" , 12, MID_DOCINFO_TEMPLATEDATE, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_MAYBEVOID, 0 },
- { "Title" , 5 , WID_TITLE, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- {0,0,0,0,0,0}
-};
+ static SfxItemPropertyMapEntry aDocInfoPropertyMap_Impl[] =
+ {
+ { "Author" , 6 , WID_FROM, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "AutoloadEnabled" , 15, MID_DOCINFO_AUTOLOADENABLED, &::getBooleanCppuType(), PROPERTY_UNBOUND, 0 },
+ { "AutoloadSecs" , 12, MID_DOCINFO_AUTOLOADSECS, &::getCppuType((const sal_Int32*)0), PROPERTY_UNBOUND, 0 },
+ { "AutoloadURL" , 11, MID_DOCINFO_AUTOLOADURL, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "CreationDate" , 12, WID_DATE_CREATED, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_MAYBEVOID, 0 },
+ { "DefaultTarget" , 13, MID_DOCINFO_DEFAULTTARGET, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "Description" , 11, MID_DOCINFO_DESCRIPTION, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "DocumentStatistic", 17 , MID_DOCINFO_STATISTIC, &::getCppuType((const uno::Sequence< beans::NamedValue >*)0), PROPERTY_UNBOUND, 0 },
+ { "EditingCycles" , 13, MID_DOCINFO_REVISION, &::getCppuType((const sal_Int16*)0), PROPERTY_UNBOUND, 0 },
+ { "EditingDuration" , 15, MID_DOCINFO_EDITTIME, &::getCppuType((const sal_Int32*)0), PROPERTY_UNBOUND, 0 },
+ { "Generator" , 9, SID_APPLICATION, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "Keywords" , 8 , WID_KEYWORDS, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "Language" , 8, MID_DOCINFO_CHARLOCALE, &::getCppuType((const lang::Locale*)0), PROPERTY_UNBOUND, 0 },
+ { "MIMEType" , 8 , WID_CONTENT_TYPE, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND | ::com::sun::star::beans::PropertyAttribute::READONLY, 0 },
+ { "ModifiedBy" , 10, MID_DOCINFO_MODIFICATIONAUTHOR, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "ModifyDate" , 10, WID_DATE_MODIFIED, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_MAYBEVOID, 0 },
+ { "PrintDate" , 9 , MID_DOCINFO_PRINTDATE, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_MAYBEVOID, 0 },
+ { "PrintedBy" , 9 , MID_DOCINFO_PRINTEDBY, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "Subject" , 7 , MID_DOCINFO_SUBJECT, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "Template" , 8 , MID_DOCINFO_TEMPLATE, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "TemplateFileName", 16, SID_TEMPLATE_NAME, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "TemplateDate" , 12, MID_DOCINFO_TEMPLATEDATE, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_MAYBEVOID, 0 },
+ { "Title" , 5 , WID_TITLE, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ {0,0,0,0,0,0}
+ };
+ return aDocInfoPropertyMap_Impl;
+}
static USHORT aDaysInMonth[12] = { 31, 28, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31 };
@@ -171,7 +175,7 @@ struct OUStringHashCode
}
};
-struct SfxExtendedItemPropertyMap : public SfxItemPropertyMap
+struct SfxExtendedItemPropertyMap : public SfxItemPropertyMapEntry
{
::com::sun::star::uno::Any aValue;
};
@@ -219,13 +223,13 @@ class MixedPropertySetInfo : public ::cppu::WeakImplHelper1< ::com::sun::star::b
{
private:
- SfxItemPropertyMap* _pFixProps;
+ SfxItemPropertyMap _aPropertyMap;
::rtl::OUString* _pUserKeys;
uno::Reference<beans::XPropertySet> _xUDProps;
public:
- MixedPropertySetInfo(SfxItemPropertyMap* pFixProps,
+ MixedPropertySetInfo( const SfxItemPropertyMapEntry* pFixProps,
::rtl::OUString* pUserKeys,
uno::Reference<beans::XPropertySet> xUDProps);
@@ -238,10 +242,10 @@ class MixedPropertySetInfo : public ::cppu::WeakImplHelper1< ::com::sun::star::b
//-----------------------------------------------------------------------------
-MixedPropertySetInfo::MixedPropertySetInfo(SfxItemPropertyMap* pFixProps ,
+MixedPropertySetInfo::MixedPropertySetInfo(const SfxItemPropertyMapEntry* pFixProps,
::rtl::OUString* pUserKeys,
uno::Reference<beans::XPropertySet> xUDProps)
- : _pFixProps (pFixProps )
+ : _aPropertyMap( pFixProps )
, _pUserKeys(pUserKeys)
, _xUDProps(xUDProps)
{
@@ -261,7 +265,9 @@ MixedPropertySetInfo::~MixedPropertySetInfo()
::comphelper::SequenceAsVector< ::com::sun::star::beans::Property > lProps;
// copy "fix" props
- SfxItemPropertyMap* pFixProp = _pFixProps;
+ //todo: os: this ugly thing should be replaced
+ const SfxItemPropertyMapEntry* pFixProp = lcl_GetDocInfoPropertyMap();
+
while(pFixProp && pFixProp->pName)
{
::com::sun::star::beans::Property aProp;
@@ -300,27 +306,17 @@ MixedPropertySetInfo::~MixedPropertySetInfo()
//-----------------------------------------------------------------------------
-::com::sun::star::beans::Property SAL_CALL MixedPropertySetInfo::getPropertyByName( const ::rtl::OUString& sName )
+::com::sun::star::beans::Property SAL_CALL MixedPropertySetInfo::getPropertyByName(
+ const ::rtl::OUString& sName )
throw(::com::sun::star::beans::UnknownPropertyException,
::com::sun::star::uno::RuntimeException )
{
::com::sun::star::beans::Property aProp;
// search it as "fix" prop
- SfxItemPropertyMap* pFixProp = _pFixProps;
- while(pFixProp && pFixProp->pName)
- {
- if (sName.equalsAscii(pFixProp->pName))
- {
- aProp.Name = sName;
- aProp.Handle = pFixProp->nWID;
- aProp.Type = *(pFixProp->pType);
- aProp.Attributes = (sal_Int16)(pFixProp->nFlags);
- return aProp;
- }
- ++pFixProp;
- }
-
+ if( _aPropertyMap.hasPropertyByName( sName ) )
+ return _aPropertyMap.getPropertyByName( sName );
+ else
// search it as "dynamic" prop
return _xUDProps->getPropertySetInfo()->getPropertyByName(sName);
}
@@ -330,17 +326,9 @@ MixedPropertySetInfo::~MixedPropertySetInfo()
::sal_Bool SAL_CALL MixedPropertySetInfo::hasPropertyByName(const ::rtl::OUString& sName)
throw(::com::sun::star::uno::RuntimeException)
{
- // "fix" prop?
- SfxItemPropertyMap* pFixProp = _pFixProps;
- while(pFixProp && pFixProp->pName)
- {
- if (sName.equalsAscii(pFixProp->pName))
- return sal_True;
- ++pFixProp;
- }
-
- // "dynamic" prop?
- return _xUDProps->getPropertySetInfo()->hasPropertyByName(sName);
+ return _aPropertyMap.hasPropertyByName( sName ) ? // "fix" prop?
+ sal_True :
+ _xUDProps->getPropertySetInfo()->hasPropertyByName(sName); // "dynamic" prop?
}
//-----------------------------------------------------------------------------
@@ -358,11 +346,13 @@ struct SfxDocumentInfoObject_Impl
// the actual contents
uno::Reference<document::XDocumentProperties> m_xDocProps;
+ SfxItemPropertyMap m_aPropertyMap;
SfxDocumentInfoObject_Impl()
: _aDisposeContainer( _aMutex )
, bDisposed(sal_False)
, m_xDocProps()
+ , m_aPropertyMap( lcl_GetDocInfoPropertyMap() )
{
// the number of user fields is not changeable from the outside
// we can't set it too high because every name/value pair will be written to the file (even if empty)
@@ -529,7 +519,7 @@ void SAL_CALL SfxDocumentInfoObject::removeEventListener(const ::com::sun::star
uno::Reference<beans::XPropertySet> xPropSet(
_pImp->m_xDocProps->getUserDefinedProperties(), uno::UNO_QUERY_THROW);
- MixedPropertySetInfo* pInfo = new MixedPropertySetInfo( aDocInfoPropertyMap_Impl, _pImp->m_UserDefined, xPropSet);
+ MixedPropertySetInfo* pInfo = new MixedPropertySetInfo( lcl_GetDocInfoPropertyMap(), _pImp->m_UserDefined, xPropSet);
uno::Reference< beans::XPropertySetInfo > xInfo(
static_cast< beans::XPropertySetInfo* >(pInfo), uno::UNO_QUERY_THROW);
return xInfo;
@@ -542,12 +532,10 @@ void SAL_CALL SfxDocumentInfoObject::setPropertyValue(const ::rtl::OUString& aP
beans::PropertyVetoException, lang::IllegalArgumentException,
lang::WrappedTargetException)
{
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(
- aDocInfoPropertyMap_Impl,
- aPropertyName );
+ const SfxItemPropertySimpleEntry* pEntry = _pImp->m_aPropertyMap.getByName( aPropertyName );
// fix prop!
- if ( pMap )
- setFastPropertyValue( pMap->nWID, aValue );
+ if ( pEntry )
+ setFastPropertyValue( pEntry->nWID, aValue );
else
// dynamic prop!
{
@@ -563,11 +551,10 @@ uno::Any SAL_CALL SfxDocumentInfoObject::getPropertyValue(const ::rtl::OUStrin
uno::RuntimeException, beans::UnknownPropertyException,
lang::WrappedTargetException)
{
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName( aDocInfoPropertyMap_Impl,
- aPropertyName );
+ const SfxItemPropertySimpleEntry* pEntry = _pImp->m_aPropertyMap.getByName( aPropertyName );
// fix prop!
- if ( pMap )
- return getFastPropertyValue( pMap->nWID );
+ if ( pEntry )
+ return getFastPropertyValue( pEntry->nWID );
else
// dynamic prop!
{
@@ -680,8 +667,7 @@ void SAL_CALL SfxDocumentInfoObject::addProperty(const ::rtl::OUString&
::com::sun::star::uno::RuntimeException )
{
// clash with "fix" properties ?
- sal_Bool bFixProp = (SfxItemPropertyMap::GetByName( aDocInfoPropertyMap_Impl, sName ) != 0);
-
+ sal_Bool bFixProp = _pImp->m_aPropertyMap.getByName( sName ) != 0;
if ( bFixProp )
{
::rtl::OUStringBuffer sMsg(256);
@@ -707,7 +693,7 @@ void SAL_CALL SfxDocumentInfoObject::removeProperty(const ::rtl::OUString& sName
::com::sun::star::uno::RuntimeException )
{
// clash with "fix" properties ?
- sal_Bool bFixProp = (SfxItemPropertyMap::GetByName( aDocInfoPropertyMap_Impl, sName ) != 0);
+ sal_Bool bFixProp = _pImp->m_aPropertyMap.getByName( sName ) != 0;
if ( bFixProp )
{
::rtl::OUStringBuffer sMsg(256);
diff --git a/sfx2/source/doc/plugin.cxx b/sfx2/source/doc/plugin.cxx
index c83070089d..6c98c6d197 100644
--- a/sfx2/source/doc/plugin.cxx
+++ b/sfx2/source/doc/plugin.cxx
@@ -67,20 +67,27 @@ void PluginWindow_Impl::Resize()
#define PROPERTY_UNBOUND 0
-SfxItemPropertyMap aPluginPropertyMap_Impl[] =
+#define WID_COMMANDS 1
+#define WID_MIMETYPE 2
+#define WID_URL 3
+const SfxItemPropertyMapEntry* lcl_GetPluginPropertyMap_Impl()
{
- { "PluginCommands", 14, 1, &::getCppuType((::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >*)0), PROPERTY_UNBOUND, 0},
- { "PluginMimeType", 14, 2, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- { "PluginURL", 9, 3, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
- {0,0,0,0,0,0}
-};
+ static SfxItemPropertyMapEntry aPluginPropertyMap_Impl[] =
+ {
+ { MAP_CHAR_LEN("PluginCommands"), WID_COMMANDS, &::getCppuType((::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >*)0), PROPERTY_UNBOUND, 0},
+ { MAP_CHAR_LEN("PluginMimeType"), WID_MIMETYPE, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { MAP_CHAR_LEN("PluginURL"), WID_URL , &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ {0,0,0,0,0,0}
+ };
+ return aPluginPropertyMap_Impl;
+}
SFX_IMPL_XSERVICEINFO( PluginObject, "com.sun.star.embed.SpecialEmbeddedObject", "com.sun.star.comp.sfx2.PluginObject" )
SFX_IMPL_SINGLEFACTORY( PluginObject );
PluginObject::PluginObject( const uno::Reference < lang::XMultiServiceFactory >& rFact )
: mxFact( rFact )
- , maPropSet( aPluginPropertyMap_Impl )
+ , maPropMap( lcl_GetPluginPropertyMap_Impl() )
{
}
@@ -194,7 +201,8 @@ void SAL_CALL PluginObject::disposing( const com::sun::star::lang::EventObject&
uno::Reference< beans::XPropertySetInfo > SAL_CALL PluginObject::getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException )
{
- return maPropSet.getPropertySetInfo();
+ static uno::Reference< beans::XPropertySetInfo > xInfo = new SfxItemPropertySetInfo( &maPropMap );
+ return xInfo;
}
void SAL_CALL PluginObject::setPropertyValue(const ::rtl::OUString& aPropertyName, const uno::Any& aAny)
diff --git a/sfx2/source/inc/applet.hxx b/sfx2/source/inc/applet.hxx
index 6af259b0a0..ee53c7dd66 100644
--- a/sfx2/source/inc/applet.hxx
+++ b/sfx2/source/inc/applet.hxx
@@ -66,7 +66,7 @@ class AppletObject : public ::cppu::WeakImplHelper6 <
com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext >
mxContext;
com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > mxObj;
- SfxItemPropertySet maPropSet;
+ SfxItemPropertyMap maPropMap;
SvCommandList maCmdList;
::rtl::OUString maClass;
::rtl::OUString maName;
diff --git a/sfx2/source/inc/iframe.hxx b/sfx2/source/inc/iframe.hxx
index 561f315fd9..332aaa171f 100644
--- a/sfx2/source/inc/iframe.hxx
+++ b/sfx2/source/inc/iframe.hxx
@@ -65,7 +65,7 @@ class IFrameObject : public ::cppu::WeakImplHelper6 <
com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > mxFact;
com::sun::star::uno::Reference < com::sun::star::frame::XFrame > mxFrame;
com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > mxObj;
- SfxItemPropertySet maPropSet;
+ SfxItemPropertyMap maPropMap;
SfxFrameDescriptor maFrmDescr;
IFrameObject( const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rFact );
diff --git a/sfx2/source/inc/plugin.hxx b/sfx2/source/inc/plugin.hxx
index 6b9835edd9..6c545e2fb2 100644
--- a/sfx2/source/inc/plugin.hxx
+++ b/sfx2/source/inc/plugin.hxx
@@ -63,7 +63,7 @@ class PluginObject : public ::cppu::WeakImplHelper5 <
com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > mxFact;
com::sun::star::uno::Reference< com::sun::star::plugin::XPlugin > mxPlugin;
com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > mxObj;
- SfxItemPropertySet maPropSet;
+ SfxItemPropertyMap maPropMap;
SvCommandList maCmdList;
::rtl::OUString maURL;
::rtl::OUString maMimeType;
diff --git a/svx/inc/AccessibleSelectionBase.hxx b/svx/inc/AccessibleSelectionBase.hxx
index d91ac79b3f..9fb01ce1e3 100644
--- a/svx/inc/AccessibleSelectionBase.hxx
+++ b/svx/inc/AccessibleSelectionBase.hxx
@@ -74,3 +74,79 @@ namespace accessibility
}
#endif // _SVX_ACCESSIBILITY_ACCESSIBLE_SELECTION_BASE_HXX
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: AccessibleSelectionBase.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_SELECTION_BASE_HXX
+#define _SVX_ACCESSIBILITY_ACCESSIBLE_SELECTION_BASE_HXX
+
+#include <comphelper/accessibleselectionhelper.hxx>
+#include "svx/svxdllapi.h"
+
+namespace accessibility
+{
+/** @descr
+ This base class provides a base implementation of the
+ <type>XAccessibleSelection</type> interface.
+ The following methods have to be implemented if this
+ class is used:
+
+ <method>implGetMutex</method>,
+ <method>implGetAccessibleContext</method>,
+ <method>implIsSelected</method>,
+ <method>implSelect</method>,
+*/
+ class SVX_DLLPUBLIC AccessibleSelectionBase : public ::comphelper::OCommonAccessibleSelection,
+ public ::com::sun::star::accessibility::XAccessibleSelection
+ {
+ protected:
+
+ virtual ::osl::Mutex& implGetMutex() = 0;
+
+ public:
+
+ // XAccessibleSelection - default implementations
+ virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL clearAccessibleSelection( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL selectAllAccessibleChildren( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ public:
+
+ AccessibleSelectionBase();
+ virtual ~AccessibleSelectionBase();
+ };
+
+}
+
+#endif // _SVX_ACCESSIBILITY_ACCESSIBLE_SELECTION_BASE_HXX
diff --git a/svx/inc/AccessibleStaticTextBase.hxx b/svx/inc/AccessibleStaticTextBase.hxx
index 0f3c70a228..bc204a3ff1 100644
--- a/svx/inc/AccessibleStaticTextBase.hxx
+++ b/svx/inc/AccessibleStaticTextBase.hxx
@@ -277,3 +277,282 @@ namespace accessibility
} // end of namespace accessibility
#endif /* _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_ */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: AccessibleStaticTextBase.hxx,v $
+ * $Revision: 1.14 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_
+#define _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_
+
+#include <memory>
+#include <tools/gen.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleText.hpp>
+#include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
+#include <com/sun/star/accessibility/TextSegment.hpp>
+#include "svx/svxdllapi.h"
+
+
+class SvxEditSource;
+
+namespace accessibility
+{
+
+ class AccessibleStaticTextBase_Impl;
+
+ typedef ::cppu::ImplHelper2<
+ ::com::sun::star::accessibility::XAccessibleText,
+ ::com::sun::star::accessibility::XAccessibleTextAttributes > AccessibleStaticTextBase_BASE;
+
+ /** Helper class for objects containing EditEngine/Outliner text
+
+ This class implements the XAccessibleText interface for static
+ text, somewhat similar to the children of the
+ AccessibleTextHelper class. Currently, there are no children,
+ i.e. the whole text is presented in one big chunk. This might
+ change in the future, if a need for image bullets should
+ arise. These, by convention, would be represented as children
+ of the text.
+
+ You have to implement the SvxEditSource, SvxTextForwarder,
+ SvxViewForwarder and SvxEditViewForwarder interfaces in order
+ to enable your object to cooperate with this
+ class. SvxTextForwarder encapsulates the fact that text
+ objects do not necessarily have an EditEngine at their
+ disposal, SvxViewForwarder and SvxEditViewForwarder do the
+ same for the document and the edit view. The three mentioned
+ forwarder objects are not stored by the AccessibleTextHelper,
+ but fetched every time from the SvxEditSource. So you are best
+ off making your SvxEditSource::Get*Forwarder methods cache the
+ current forwarder.
+
+ As this class is intended for static (i.e. non-changing) text
+ only, no event broadcasting is necessary. You must handle
+ visibility by yourself, the bounding boxes returned by
+ getCharacterBounds() are relative to your accessibility
+ object.
+
+ @attention All public non-UNO methods (those are the uppercase
+ ones) must not be called with any mutex hold, except when
+ calling from the main thread (with holds the solar mutex),
+ unless stated otherwise. This is because they themselves might
+ need the solar mutex in addition to the object mutex, and the
+ ordering of the locking must be: first solar mutex, then
+ object mutex. Furthermore, state change events might be fired
+ internally.
+
+ @derive Use this class as a base for objects containing static
+ edit engine text. To avoid overwriting every interface method
+ to intercept derived object defunc state, just set NULL as the
+ edit source. Every interface method will then properly throw
+ an exception.
+ */
+ class SVX_DLLPUBLIC AccessibleStaticTextBase : public AccessibleStaticTextBase_BASE
+ {
+
+ public:
+ /** Create accessible text object for given edit source
+
+ @param pEditSource
+ The edit source to use. Object ownership is transferred
+ from the caller to the callee. The object listens on the
+ SvxEditSource for object disposal, so no provisions have
+ to be taken if the caller destroys the data (e.g. the
+ model) contained in the given SvxEditSource.
+
+ */
+ explicit AccessibleStaticTextBase( ::std::auto_ptr< SvxEditSource > pEditSource );
+ virtual ~AccessibleStaticTextBase();
+
+ private:
+
+ // declared, but not defined
+ SVX_DLLPRIVATE AccessibleStaticTextBase( const AccessibleStaticTextBase& );
+ // declared, but not defined
+ SVX_DLLPRIVATE AccessibleStaticTextBase& operator= ( const AccessibleStaticTextBase& );
+
+ public:
+ /** Query the current edit source
+
+ @attention This method returns by reference, so you are
+ responsible for serialization (typically, you aquired the
+ solar mutex when calling this method). Thus, the method
+ should only be called from the main office thread.
+
+ */
+ virtual const SvxEditSource& GetEditSource() const SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /** Set the current edit source
+
+ @attention You are required to have the solar mutex
+ locked, when calling this method. Thus, the method should
+ only be called from the main office thread.
+
+ The EditSource set here is required to broadcast out the
+ following hints: EDITSOURCE_HINT_PARASMOVED,
+ EDITSOURCE_HINT_SELECTIONCHANGED, TEXT_HINT_MODIFIED,
+ TEXT_HINT_PARAINSERTED, TEXT_HINT_PARAREMOVED,
+ TEXT_HINT_TEXTHEIGHTCHANGED,
+ TEXT_HINT_VIEWSCROLLED. Otherwise, not all state changes
+ will get noticed by the accessibility object. Further
+ more, when the corresponding core object or the model is
+ dying, either the edit source must be set to NULL or it
+ has to broadcast a SFX_HINT_DYING hint.
+
+ This class does not have a dispose method, since it is not
+ a UNO component. Nevertheless, it holds C++ references to
+ several core objects, so you should issue a
+ SetEditSource(::std::auto_ptr<SvxEditSource>(NULL)) in
+ your dispose() method.
+
+ @param pEditSource
+ The new edit source to set. Object ownership is transferred
+ from the caller to the callee.
+ */
+ virtual void SetEditSource( ::std::auto_ptr< SvxEditSource > pEditSource ) SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /** Set the event source
+
+ @attention When setting a reference here, you should call
+ Dispose() when you as the owner are disposing, since until
+ then this object will hold that reference
+
+ @param rInterface
+ The interface that should be set as the source for
+ accessibility events sent by this object.
+ */
+ virtual void SetEventSource( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rInterface );
+
+ /** Get the event source
+
+ @return the interface that is set as the source for
+ accessibility events sent by this object.
+ */
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetEventSource() const;
+
+ /** Set offset of EditEngine from parent
+
+ @attention You are required to have the solar mutex
+ locked, when calling this method. Thus, the method should
+ only be called from the main office thread.
+
+ If the origin of the underlying EditEngine does
+ not correspond to the upper left corner of the object
+ using this class, you have to specify the offset.
+
+ @param rPoint
+ The offset in screen coordinates (i.e. pixel)
+ */
+ virtual void SetOffset( const Point& rPoint );
+
+ /** Query offset of EditEngine from parent
+
+ @return the offset in screen coordinates (i.e. pixel)
+ */
+ virtual Point GetOffset() const;
+
+ /** Update the visible children
+
+ As this class currently does not represent any content
+ using children, this does nothing at the moment.
+
+ @attention You are required to have the solar mutex
+ locked, when calling this method. Thus, the method should
+ only be called from the main office thread.
+
+ This method reevaluates the visibility of all
+ childrens. Call this method if your visibility state has
+ changed somehow, e.g. if the visible area has changed and
+ the AccessibleStaticTextHelper isn't notified
+ internally. Normally, there should not be a need to call
+ this method.
+ */
+ virtual void UpdateChildren() SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ /** Drop all references and enter disposed state
+
+ This method drops all references to external objects (also
+ the event source reference set via SetEventSource()) and
+ sets the object into the disposed state (i.e. the methods
+ return default values or throw a uno::DisposedException
+ exception).
+ */
+ virtual void Dispose();
+
+ // XAccessibleText interface implementation
+ virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getCharacterCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getIndexAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSelectedText() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionStart() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getSelectionEnd() throw (::com::sun::star::uno::RuntimeException);
+ /// This will only work with a functional SvxEditViewForwarder, i.e. an EditEngine/Outliner in edit mode
+ virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ /// Does not support AccessibleTextType::SENTENCE (missing feature in EditEngine)
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ /// This will only work with a functional SvxEditViewForwarder, i.e. an EditEngine/Outliner in edit mode
+ virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleTextAttributes
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getDefaultAttributes( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getRunAttributes( sal_Int32 Index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // child-related methods from XAccessibleContext
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // child-related methods from XAccessibleComponent
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
+
+ protected:
+ Rectangle GetParagraphBoundingBox() const;
+
+ private:
+
+ /// @dyn
+ const std::auto_ptr< AccessibleStaticTextBase_Impl > mpImpl;
+
+ };
+
+} // end of namespace accessibility
+
+#endif /* _SVX_ACCESSILE_STATIC_TEXT_BASE_HXX_ */
diff --git a/svx/inc/ActionDescriptionProvider.hxx b/svx/inc/ActionDescriptionProvider.hxx
index 68f48ca1b2..c638e7005d 100644
--- a/svx/inc/ActionDescriptionProvider.hxx
+++ b/svx/inc/ActionDescriptionProvider.hxx
@@ -66,3 +66,71 @@ public:
};
#endif
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ActionDescriptionProvider.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_ACTIONDESCRIPTIONPROVIDER_HXX
+#define _SVX_ACTIONDESCRIPTIONPROVIDER_HXX
+
+#include "svx/svxdllapi.h"
+
+// header for class OUString
+#include <rtl/ustring.hxx>
+
+//-----------------------------------------------------------------------------
+/** This class provides localized descriptions for some basic actions done with objects.
+The strings are intended to be provided to the user e.g. as description for undo actions in the menu.
+The name of the object acted on and the type of action needs to be given as input parameter.
+*/
+
+class SVX_DLLPUBLIC ActionDescriptionProvider
+{
+public:
+ enum ActionType
+ {
+ INSERT
+ , DELETE
+ , CUT
+ , MOVE
+ , RESIZE
+ , ROTATE
+ , TRANSFORM
+ , FORMAT
+ , MOVE_TOTOP
+ , MOVE_TOBOTTOM
+ , POS_SIZE
+ };
+
+public:
+ static ::rtl::OUString createDescription( ActionType eActionType
+ , const ::rtl::OUString& rObjectName );
+};
+
+#endif
diff --git a/svx/inc/accessibility.hrc b/svx/inc/accessibility.hrc
index 191641b238..018f12f327 100644
--- a/svx/inc/accessibility.hrc
+++ b/svx/inc/accessibility.hrc
@@ -92,3 +92,97 @@
#endif
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: accessibility.hrc,v $
+ * $Revision: 1.10 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_ACCESSIBILITY_HRC
+#define _SVX_ACCESSIBILITY_HRC
+
+#include <svx/dialogs.hrc>
+
+#define RID_SVXSTR_A11Y_3D_MATERIAL_COLOR (RID_SVXSTR_ACCESSIBILITY_START + 1)
+#define RID_SVXSTR_A11Y_TEXT_COLOR (RID_SVXSTR_ACCESSIBILITY_START + 2)
+#define RID_SVXSTR_A11Y_BACKGROUND_COLOR (RID_SVXSTR_ACCESSIBILITY_START + 3)
+#define RID_SVXSTR_A11Y_FILLSTYLE_NONE (RID_SVXSTR_ACCESSIBILITY_START + 4)
+#define RID_SVXSTR_A11Y_FILLSTYLE_SOLID (RID_SVXSTR_ACCESSIBILITY_START + 5)
+#define RID_SVXSTR_A11Y_FILLSTYLE_HATCH (RID_SVXSTR_ACCESSIBILITY_START + 6)
+#define RID_SVXSTR_A11Y_FILLSTYLE_GRADIENT (RID_SVXSTR_ACCESSIBILITY_START + 7)
+#define RID_SVXSTR_A11Y_FILLSTYLE_BITMAP (RID_SVXSTR_ACCESSIBILITY_START + 8)
+#define RID_SVXSTR_A11Y_WITH (RID_SVXSTR_ACCESSIBILITY_START + 9)
+#define RID_SVXSTR_A11Y_STYLE (RID_SVXSTR_ACCESSIBILITY_START + 10)
+#define RID_SVXSTR_A11Y_AND (RID_SVXSTR_ACCESSIBILITY_START + 11)
+
+
+// SvxRectCtl & childs
+#define RID_SVXSTR_RECTCTL_ACC_START (RID_SVXSTR_ACCESSIBILITY_START + 20)
+#define RID_SVXSTR_RECTCTL_ACC_CORN_NAME (RID_SVXSTR_RECTCTL_ACC_START + 0)
+#define RID_SVXSTR_RECTCTL_ACC_CORN_DESCR (RID_SVXSTR_RECTCTL_ACC_START + 1)
+#define RID_SVXSTR_RECTCTL_ACC_ANGL_NAME (RID_SVXSTR_RECTCTL_ACC_START + 2)
+#define RID_SVXSTR_RECTCTL_ACC_ANGL_DESCR (RID_SVXSTR_RECTCTL_ACC_START + 3)
+
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_LT (RID_SVXSTR_RECTCTL_ACC_START + 4)
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_MT (RID_SVXSTR_RECTCTL_ACC_START + 5)
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_RT (RID_SVXSTR_RECTCTL_ACC_START + 6)
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_LM (RID_SVXSTR_RECTCTL_ACC_START + 7)
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_MM (RID_SVXSTR_RECTCTL_ACC_START + 8)
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_RM (RID_SVXSTR_RECTCTL_ACC_START + 9)
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_LB (RID_SVXSTR_RECTCTL_ACC_START + 10)
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_MB (RID_SVXSTR_RECTCTL_ACC_START + 11)
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_RB (RID_SVXSTR_RECTCTL_ACC_START + 12)
+
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_A000 (RID_SVXSTR_RECTCTL_ACC_START + 13)
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_A045 (RID_SVXSTR_RECTCTL_ACC_START + 14)
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_A090 (RID_SVXSTR_RECTCTL_ACC_START + 15)
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_A135 (RID_SVXSTR_RECTCTL_ACC_START + 16)
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_A180 (RID_SVXSTR_RECTCTL_ACC_START + 17)
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_A225 (RID_SVXSTR_RECTCTL_ACC_START + 18)
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_A270 (RID_SVXSTR_RECTCTL_ACC_START + 19)
+#define RID_SVXSTR_RECTCTL_ACC_CHLD_A315 (RID_SVXSTR_RECTCTL_ACC_START + 20)
+#define RID_SVXSTR_RECTCTL_ACC_END (RID_SVXSTR_RECTCTL_ACC_START + 21)
+
+// SvxGraphCtrlAccessibleContext
+#define RID_SVXSTR_GRAPHCTRL_ACC_START (RID_SVXSTR_RECTCTL_ACC_END)
+#define RID_SVXSTR_GRAPHCTRL_ACC_NAME (RID_SVXSTR_GRAPHCTRL_ACC_START + 0)
+#define RID_SVXSTR_GRAPHCTRL_ACC_DESCRIPTION (RID_SVXSTR_GRAPHCTRL_ACC_START + 1)
+
+// text paragraphs and bullets
+#define RID_SVXSTR_A11Y_TEXTHELPER_START (RID_SVXSTR_ACCESSIBILITY_START + 70)
+#define RID_SVXSTR_A11Y_PARAGRAPH_DESCRIPTION (RID_SVXSTR_A11Y_TEXTHELPER_START + 0)
+#define RID_SVXSTR_A11Y_PARAGRAPH_NAME (RID_SVXSTR_A11Y_TEXTHELPER_START + 1)
+#define RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION (RID_SVXSTR_A11Y_TEXTHELPER_START + 2)
+#define RID_SVXSTR_A11Y_IMAGEBULLET_NAME (RID_SVXSTR_A11Y_TEXTHELPER_START + 3)
+
+// SvxShowCharSetAcc
+#define RID_SVXSTR_CHARACTER_SELECTION (RID_SVXSTR_ACCESSIBILITY_START + 80)
+#define RID_SVXSTR_CHARACTER_CODE (RID_SVXSTR_ACCESSIBILITY_START + 81)
+#define RID_SVXSTR_CHAR_SEL_DESC (RID_SVXSTR_ACCESSIBILITY_START + 82)
+
+#endif
+
diff --git a/svx/inc/acorrcfg.hxx b/svx/inc/acorrcfg.hxx
index 04a19cdb7a..18471483e2 100644
--- a/svx/inc/acorrcfg.hxx
+++ b/svx/inc/acorrcfg.hxx
@@ -135,3 +135,140 @@ public:
#endif
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: acorrcfg.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVXACCFG_HXX
+#define _SVXACCFG_HXX
+
+// include ---------------------------------------------------------------
+
+#include "svx/svxdllapi.h"
+#include <unotools/configitem.hxx>
+/* -----------------------------12.10.00 11:40--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SvxAutoCorrect;
+class SvxAutoCorrCfg;
+class SVX_DLLPUBLIC SvxBaseAutoCorrCfg : public utl::ConfigItem
+{
+ SvxAutoCorrCfg& rParent;
+ com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
+
+public:
+ SvxBaseAutoCorrCfg(SvxAutoCorrCfg& rParent);
+ ~SvxBaseAutoCorrCfg();
+
+ void Load(sal_Bool bInit);
+ virtual void Commit();
+ virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames);
+ void SetModified() {ConfigItem::SetModified();}
+};
+/* -----------------------------12.10.00 11:40--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SVX_DLLPUBLIC SvxSwAutoCorrCfg : public utl::ConfigItem
+{
+ SvxAutoCorrCfg& rParent;
+ com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
+
+public:
+ SvxSwAutoCorrCfg(SvxAutoCorrCfg& rParent);
+ ~SvxSwAutoCorrCfg();
+
+ void Load(sal_Bool bInit);
+ virtual void Commit();
+ virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames);
+ void SetModified() {ConfigItem::SetModified();}
+};
+/*--------------------------------------------------------------------
+ Beschreibung: Konfiguration fuer Auto Correction
+ --------------------------------------------------------------------*/
+class SVX_DLLPUBLIC SvxAutoCorrCfg
+{
+ friend class SvxBaseAutoCorrCfg;
+ friend class SvxSwAutoCorrCfg;
+
+ SvxAutoCorrect* pAutoCorrect;
+
+ SvxBaseAutoCorrCfg aBaseConfig;
+ SvxSwAutoCorrCfg aSwConfig;
+
+ // Flags f"ur Autotext:
+ sal_Bool bFileRel;
+ sal_Bool bNetRel;
+ // Tiphilfe f"ur Autotext w"ahrend der Eingabe
+ sal_Bool bAutoTextTip;
+ sal_Bool bAutoTextPreview;
+ sal_Bool bAutoFmtByInput;
+ sal_Bool bSearchInAllCategories;
+
+public:
+ void SetModified()
+ {
+ aBaseConfig.SetModified();
+ aSwConfig.SetModified();
+ }
+ void Commit()
+ {
+ aBaseConfig.Commit();
+ aSwConfig.Commit();
+ }
+
+ SvxAutoCorrect* GetAutoCorrect() { return pAutoCorrect; }
+ const SvxAutoCorrect* GetAutoCorrect() const { return pAutoCorrect; }
+ // der Pointer geht in den Besitz des ConfigItems!
+ void SetAutoCorrect( SvxAutoCorrect* );
+
+ sal_Bool IsAutoFmtByInput() const { return bAutoFmtByInput; }
+ void SetAutoFmtByInput( sal_Bool bSet ) { bAutoFmtByInput = bSet;aSwConfig.SetModified();}
+
+ sal_Bool IsSaveRelFile() const { return bFileRel; }
+ void SetSaveRelFile( sal_Bool bSet ) { bFileRel = bSet; aSwConfig.SetModified(); }
+
+ sal_Bool IsSaveRelNet() const { return bNetRel; }
+ void SetSaveRelNet( sal_Bool bSet ) { bNetRel = bSet; aSwConfig.SetModified();}
+
+ sal_Bool IsAutoTextPreview() const {return bAutoTextPreview;}
+ void SetAutoTextPreview(sal_Bool bSet) {bAutoTextPreview = bSet; aSwConfig.SetModified();}
+
+ sal_Bool IsAutoTextTip() const { return bAutoTextTip; }
+ void SetAutoTextTip(sal_Bool bSet ) { bAutoTextTip = bSet;aSwConfig.SetModified();}
+
+ sal_Bool IsSearchInAllCategories() const { return bSearchInAllCategories;}
+ void SetSearchInAllCategories(sal_Bool bSet ) { bSearchInAllCategories = bSet; aSwConfig.SetModified(); }
+
+ SvxAutoCorrCfg();
+ virtual ~SvxAutoCorrCfg();
+ static SvxAutoCorrCfg* Get();
+};
+
+
+#endif
+
diff --git a/svx/inc/anchorid.hxx b/svx/inc/anchorid.hxx
index 4d8343762f..b0cfa9b9d7 100644
--- a/svx/inc/anchorid.hxx
+++ b/svx/inc/anchorid.hxx
@@ -44,3 +44,49 @@ enum SvxAnchorIds
#endif
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: anchorid.hxx,v $
+ * $Revision: 1.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_ANCHORID_HXX
+#define _SVX_ANCHORID_HXX
+
+
+enum SvxAnchorIds
+{
+ SVX_OBJ_AT_CNTNT = 0x01, //Absatzgebundener Rahmen
+ SVX_OBJ_IN_CNTNT = 0x02, //Zeichengebundener Rahmen
+ SVX_OBJ_PAGE = 0x04, //Seitengebundener Rahmen
+ SVX_OBJ_AT_FLY = 0x08 //Rahmengebundener Rahmen
+// SVX_OBJ_AUTO_CNTNT = 0x10 //Automatisch positionierter, absatzgebundener Rahmen
+};
+
+
+
+#endif
+
diff --git a/svx/inc/asiancfg.hxx b/svx/inc/asiancfg.hxx
index 2a3a52c363..841b8f72db 100644
--- a/svx/inc/asiancfg.hxx
+++ b/svx/inc/asiancfg.hxx
@@ -71,3 +71,76 @@ public:
#endif
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: asiancfg.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_ASIANCFG_HXX
+#define _SVX_ASIANCFG_HXX
+
+#include <unotools/configitem.hxx>
+#include <com/sun/star/uno/Sequence.h>
+#include "svx/svxdllapi.h"
+
+namespace com{namespace sun{namespace star{
+namespace lang{
+ struct Locale;
+}}}}
+//-----------------------------------------------------------------------------
+struct SvxAsianConfig_Impl;
+class SVX_DLLPUBLIC SvxAsianConfig : public utl::ConfigItem
+{
+ SvxAsianConfig_Impl* pImpl;
+
+public:
+ SvxAsianConfig(sal_Bool bEnableNotify = sal_True);
+ virtual ~SvxAsianConfig();
+
+ void Load();
+ virtual void Commit();
+ virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames);
+
+ sal_Bool IsKerningWesternTextOnly() const;
+ void SetKerningWesternTextOnly(sal_Bool bSet);
+
+ sal_Int16 GetCharDistanceCompression() const;
+ void SetCharDistanceCompression(sal_Int16 nSet);
+
+ com::sun::star::uno::Sequence<com::sun::star::lang::Locale>
+ GetStartEndCharLocales();
+
+ sal_Bool GetStartEndChars( const com::sun::star::lang::Locale& rLocale,
+ rtl::OUString& rStartChars,
+ rtl::OUString& rEndChars );
+ void SetStartEndChars( const com::sun::star::lang::Locale& rLocale,
+ const rtl::OUString* pStartChars,
+ const rtl::OUString* pEndChars );
+};
+
+#endif
+
diff --git a/svx/inc/bolnitem.hxx b/svx/inc/bolnitem.hxx
index e8f8d287bf..d91ecf49c3 100644
--- a/svx/inc/bolnitem.hxx
+++ b/svx/inc/bolnitem.hxx
@@ -85,3 +85,90 @@ private:
#endif
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: bolnitem.hxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_BOLNITEM_HXX
+#define _SVX_BOLNITEM_HXX
+
+// include ---------------------------------------------------------------
+
+
+
+#include <svtools/poolitem.hxx>
+#include "svx/svxdllapi.h"
+
+
+
+// class SvxLineItem -----------------------------------------------------
+
+
+/*
+[Beschreibung]
+Dieses Item transportiert eine SvxBorderLine.
+*/
+
+class SvxBorderLine;
+
+class SVX_DLLPUBLIC SvxLineItem : public SfxPoolItem
+{
+public:
+ TYPEINFO();
+
+ SvxLineItem( const USHORT nId );
+ SvxLineItem( const SvxLineItem& rCpy );
+ ~SvxLineItem();
+ SvxLineItem &operator=( const SvxLineItem& rLine );
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+ virtual int ScaleMetrics( long nMult, long nDiv );
+ virtual int HasMetrics() const;
+
+ const SvxBorderLine* GetLine () const { return pLine; }
+ void SetLine ( const SvxBorderLine *pNew );
+
+private:
+ SvxBorderLine* pLine;
+};
+
+
+
+
+#endif
+
diff --git a/svx/inc/bulitem.hxx b/svx/inc/bulitem.hxx
index 29807e8a65..91faf19d88 100644
--- a/svx/inc/bulitem.hxx
+++ b/svx/inc/bulitem.hxx
@@ -162,3 +162,167 @@ public:
#endif
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: bulitem.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_BULITEM_HXX
+#define _SVX_BULITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include "svx/svxdllapi.h"
+
+
+// define ----------------------------------------------------------------
+
+// Styles
+#define BS_ABC_BIG 0
+#define BS_ABC_SMALL 1
+#define BS_ROMAN_BIG 2
+#define BS_ROMAN_SMALL 3
+#define BS_123 4
+#define BS_NONE 5
+#define BS_BULLET 6
+#define BS_BMP 128
+
+// Justification
+#define BJ_HLEFT 0x01
+#define BJ_HRIGHT 0x02
+#define BJ_HCENTER 0x04
+#define BJ_VTOP 0x08
+#define BJ_VBOTTOM 0x10
+#define BJ_VCENTER 0x20
+
+// Valid-Bits
+// Erstmal nur die Werte, die vom Dialog geaendert werden...
+#define VALID_FONTCOLOR 0x0001
+#define VALID_FONTNAME 0x0002
+#define VALID_SYMBOL 0x0004
+#define VALID_BITMAP 0x0008
+#define VALID_SCALE 0x0010
+#define VALID_START 0x0020
+#define VALID_STYLE 0x0040
+#define VALID_PREVTEXT 0x0080
+#define VALID_FOLLOWTEXT 0x0100
+#include <svtools/poolitem.hxx>
+#include <vcl/font.hxx>
+#include <goodies/grfmgr.hxx>
+
+// class SvxBulletItem ---------------------------------------------------
+
+class SVX_DLLPUBLIC SvxBulletItem : public SfxPoolItem
+{
+ Font aFont;
+ GraphicObject* pGraphicObject;
+ String aPrevText;
+ String aFollowText;
+ USHORT nStart;
+ USHORT nStyle;
+ long nWidth;
+ USHORT nScale;
+ sal_Unicode cSymbol;
+ BYTE nJustify;
+ USHORT nValidMask; // Nur temporaer fuer GetAttribs/SetAttribs, wegen des grossen Bullets
+
+#ifdef _SVX_BULITEM_CXX
+ void SetDefaultFont_Impl();
+ void SetDefaults_Impl();
+#endif
+
+public:
+ TYPEINFO();
+
+ SvxBulletItem( USHORT nWhich = 0 );
+ SvxBulletItem( BYTE nStyle, const Font& rFont, USHORT nStart = 0, USHORT nWhich = 0 );
+ SvxBulletItem( const Font& rFont, sal_Unicode cSymbol, USHORT nWhich=0 );
+ SvxBulletItem( const Bitmap&, USHORT nWhich = 0 );
+ SvxBulletItem( const GraphicObject&, USHORT nWhich = 0 );
+ SvxBulletItem( SvStream& rStrm, USHORT nWhich = 0 );
+ SvxBulletItem( const SvxBulletItem& );
+ ~SvxBulletItem();
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create( SvStream&, USHORT nVersion ) const;
+ virtual SvStream& Store( SvStream & , USHORT nItemVersion ) const;
+
+ String GetFullText() const;
+ sal_Unicode GetSymbol() const { return cSymbol; }
+ String GetPrevText() const { return aPrevText; }
+ String GetFollowText() const { return aFollowText; }
+
+ USHORT GetStart() const { return nStart; }
+ long GetWidth() const { return nWidth; }
+ USHORT GetStyle() const { return nStyle; }
+ BYTE GetJustification() const { return nJustify; }
+ Font GetFont() const { return aFont; }
+ USHORT GetScale() const { return nScale; }
+
+ Bitmap GetBitmap() const;
+ void SetBitmap( const Bitmap& rBmp );
+
+ const GraphicObject& GetGraphicObject() const;
+ void SetGraphicObject( const GraphicObject& rGraphicObject );
+
+ void SetSymbol( sal_Unicode c) { cSymbol = c; }
+ void SetPrevText( const String& rStr) { aPrevText = rStr;}
+ void SetFollowText(const String& rStr) { aFollowText=rStr;}
+
+ void SetStart( USHORT nNew ) { nStart = nNew; }
+ void SetWidth( long nNew ) { nWidth = nNew; }
+ void SetStyle( USHORT nNew ) { nStyle = nNew; }
+ void SetJustification( BYTE nNew ) { nJustify = nNew; }
+ void SetFont( const Font& rNew) { aFont = rNew; }
+ void SetScale( USHORT nNew ) { nScale = nNew; }
+
+ virtual USHORT GetVersion(USHORT nFileVersion) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ static void StoreFont( SvStream&, const Font& );
+ static Font CreateFont( SvStream&, USHORT nVer );
+
+ USHORT& GetValidMask() { return nValidMask; }
+ USHORT GetValidMask() const { return nValidMask; }
+ USHORT IsValid( USHORT nFlag ) const { return nValidMask & nFlag; }
+ void SetValid( USHORT nFlag, BOOL bValid )
+ {
+ if ( bValid )
+ nValidMask |= nFlag;
+ else
+ nValidMask &= ~nFlag;
+ }
+ void CopyValidProperties( const SvxBulletItem& rCopyFrom );
+};
+
+
+#endif
+
diff --git a/svx/inc/charhiddenitem.hxx b/svx/inc/charhiddenitem.hxx
index dbedf7baeb..c092990440 100644
--- a/svx/inc/charhiddenitem.hxx
+++ b/svx/inc/charhiddenitem.hxx
@@ -64,3 +64,69 @@ public:
#endif
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: charhiddenitem.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SVX_CHARHIDDENITEM_HXX
+#define _SVX_CHARHIDDENITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#include <svtools/poolitem.hxx>
+#include <svtools/eitem.hxx>
+#include "svx/svxdllapi.h"
+
+// class SvxCharHiddenItem -------------------------------------------------
+/*
+ [Description]
+ This item marks text as hidden
+*/
+
+class SVX_DLLPUBLIC SvxCharHiddenItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ SvxCharHiddenItem( const BOOL bHidden /*= FALSE*/, const USHORT nId );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ inline SvxCharHiddenItem& operator=(const SvxCharHiddenItem& rHidden) {
+ SetValue(rHidden.GetValue());
+ return *this;
+ }
+};
+
+#endif
+
+
diff --git a/svx/inc/svx/unofield.hxx b/svx/inc/svx/unofield.hxx
index ee8a8340c2..0ee6ebff3a 100644
--- a/svx/inc/svx/unofield.hxx
+++ b/svx/inc/svx/unofield.hxx
@@ -74,7 +74,7 @@ class SVX_DLLPUBLIC SvxUnoTextField : public SvxMutexHelper,
{
private:
::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > mxAnchor;
- SfxItemPropertySet* mpPropSet;
+ const SfxItemPropertySet* mpPropSet;
sal_Int32 mnServiceId;
SvxUnoFieldData_Impl* mpImpl;
diff --git a/svx/inc/svx/unoipset.hxx b/svx/inc/svx/unoipset.hxx
index 5f5506326f..d0985f2b66 100644
--- a/svx/inc/svx/unoipset.hxx
+++ b/svx/inc/svx/unoipset.hxx
@@ -34,44 +34,46 @@
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include "svx/svxdllapi.h"
+#include <svtools/itemprop.hxx>
class SvxIDPropertyCombineList;
class SdrItemPool;
-struct SfxItemPropertyMap;
class SfxItemSet;
class SvxShape;
class SVX_DLLPUBLIC SvxItemPropertySet
{
- const SfxItemPropertyMap* _pMap;
- const SfxItemPropertyMap* mpLastMap;
+ SfxItemPropertyMap m_aPropertyMap;
+ mutable com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo> m_xInfo;
+ const SfxItemPropertyMapEntry* _pMap;
SvxIDPropertyCombineList* pCombiList;
sal_Bool mbConvertTwips;
public:
- SvxItemPropertySet( const SfxItemPropertyMap *pMap, sal_Bool bConvertTwips = sal_False );
+ SvxItemPropertySet( const SfxItemPropertyMapEntry *pMap, sal_Bool bConvertTwips = sal_False );
~SvxItemPropertySet();
// Methoden, die direkt mit dem ItemSet arbeiten
- ::com::sun::star::uno::Any getPropertyValue( const SfxItemPropertyMap* pMap, const SfxItemSet& rSet ) const;
- void setPropertyValue( const SfxItemPropertyMap* pMap, const ::com::sun::star::uno::Any& rVal, SfxItemSet& rSet ) const;
+ ::com::sun::star::uno::Any getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet ) const;
+ void setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const ::com::sun::star::uno::Any& rVal, SfxItemSet& rSet ) const;
// Methoden, die stattdessen Any benutzen
- ::com::sun::star::uno::Any getPropertyValue( const SfxItemPropertyMap* pMap ) const;
- void setPropertyValue( const SfxItemPropertyMap* pMap, const ::com::sun::star::uno::Any& rVal ) const;
+ ::com::sun::star::uno::Any getPropertyValue( const SfxItemPropertySimpleEntry* pMap ) const;
+ void setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const ::com::sun::star::uno::Any& rVal ) const;
// Properties von einem anderen Set uebernehmen
- void ObtainSettingsFromPropertySet(SvxItemPropertySet& rPropSet, SfxItemSet& rSet, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet );
- sal_Bool AreThereOwnUsrAnys() { return (pCombiList ? sal_True : sal_False); }
+ void ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet, SfxItemSet& rSet, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xSet )const;
+ sal_Bool AreThereOwnUsrAnys() const { return (pCombiList ? sal_True : sal_False); }
::com::sun::star::uno::Any* GetUsrAnyForID(sal_uInt16 nWID) const;
void AddUsrAnyForID(const ::com::sun::star::uno::Any& rAny, sal_uInt16 nWID);
com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > getPropertySetInfo() const;
- const SfxItemPropertyMap* getPropertyMap() const {return _pMap;}
- void setPropertyMap( const SfxItemPropertyMap *pMap ) { _pMap = pMap; }
- const SfxItemPropertyMap* getPropertyMapEntry(const ::rtl::OUString &rName) const;
+ const SfxItemPropertyMapEntry* getPropertyMapEntries() const {return _pMap;}
+ //void setPropertyMap( const SfxItemPropertyMapEntry *pMap ) { _pMap = pMap; }
+ const SfxItemPropertyMap* getPropertyMap()const { return &m_aPropertyMap;}
+ const SfxItemPropertySimpleEntry* getPropertyMapEntry(const ::rtl::OUString &rName) const;
- static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > getPropertySetInfo( const SfxItemPropertyMap* pMap );
+ static com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > getPropertySetInfo( const SfxItemPropertyMapEntry* pMap );
};
#endif // _SVX_UNOIPSET_HXX_
diff --git a/svx/inc/svx/unoprov.hxx b/svx/inc/svx/unoprov.hxx
index e9828ca6d3..dac1f96f66 100644
--- a/svx/inc/svx/unoprov.hxx
+++ b/svx/inc/svx/unoprov.hxx
@@ -37,6 +37,7 @@
#include <tools/list.hxx>
#include "svx/svxdllapi.h"
+class SvxItemPropertySet;
/***********************************************************************
* class UHashMap *
***********************************************************************/
@@ -95,17 +96,21 @@ public:
#define SVXMAP_CUSTOMSHAPE 22
#define SVXMAP_MEDIA 23
#define SVXMAP_TABLE 24
-#define SVXMAP_END 25 // last+1 !
+#define SVXMAP_PAGE 25
+#define SVXMAP_END 26 // last+1 !
/***********************************************************************
* SvxUnoPropertyMapProvider *
***********************************************************************/
class SVX_DLLPUBLIC SvxUnoPropertyMapProvider
{
- SfxItemPropertyMap* aMapArr[SVXMAP_END];
- void Sort(USHORT nId);
+ SfxItemPropertyMapEntry* aMapArr[SVXMAP_END];
+ SvxItemPropertySet* aSetArr[SVXMAP_END];
+// void Sort(USHORT nId);
public:
SvxUnoPropertyMapProvider();
- SfxItemPropertyMap* GetMap(UINT16 nPropertyId);
+ ~SvxUnoPropertyMapProvider();
+ const SfxItemPropertyMapEntry* GetMap(UINT16 nPropertyId);
+ const SvxItemPropertySet* GetPropertySet(UINT16 nPropertyId);
};
/***********************************************************************
diff --git a/svx/inc/svx/unoshape.hxx b/svx/inc/svx/unoshape.hxx
index 9741878cb1..28107687c3 100644
--- a/svx/inc/svx/unoshape.hxx
+++ b/svx/inc/svx/unoshape.hxx
@@ -40,9 +40,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XAggregation.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
-#ifndef _COM_SUN_STAR_UNO_XUNOTUNNEL_HPP_
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#endif
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/drawing/PolygonKind.hpp>
#include <com/sun/star/container/XNamed.hpp>
@@ -127,7 +125,8 @@ protected:
friend class SvxShapeConnector;
friend class SdXShape;
- SvxItemPropertySet maPropSet;
+ const SvxItemPropertySet* mpPropSet;
+ const SfxItemPropertyMapEntry* maPropMapEntries;
// for xComponent
::cppu::OInterfaceContainerHelper maDisposeListeners;
@@ -143,7 +142,7 @@ protected:
void ForceMetricTo100th_mm(basegfx::B2DPolyPolygon& rPolyPolygon) const throw();
// <--
- ::com::sun::star::uno::Any GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertyMap* pMap ) const;
+ ::com::sun::star::uno::Any GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleEntry* pMap ) const;
sal_Bool tryQueryAggregation( const com::sun::star::uno::Type & rType, com::sun::star::uno::Any& rAny );
@@ -158,25 +157,25 @@ protected:
/** used from the XActionLockable interface */
sal_uInt16 mnLockCount;
- const SfxItemPropertyMap* getPropertyMap() const { return maPropSet.getPropertyMap(); }
+ const SfxItemPropertyMapEntry* getPropertyMapEntries() const { return maPropMapEntries; }
void updateShapeKind();
void endSetPropertyValues();
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyStateImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
- virtual bool setPropertyToDefaultImpl( const SfxItemPropertyMap* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyToDefaultImpl( const SfxItemPropertySimpleEntry* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
public:
SvxShape( SdrObject* pObj ) throw ();
- SvxShape( SdrObject* pObject, const SfxItemPropertyMap* pPropertySet ) throw ();
+ SvxShape( SdrObject* pObject, const SfxItemPropertyMapEntry* pEntries, const SvxItemPropertySet* pPropertySet ) throw ();
SvxShape() throw ();
virtual ~SvxShape() throw ();
// Internals
- void ObtainSettingsFromPropertySet(SvxItemPropertySet& rPropSet) throw ();
+ void ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet) throw ();
virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ) throw ();
/** takes the ownership of the SdrObject.
@@ -189,7 +188,7 @@ public:
void ChangeModel( SdrModel* pNewModel );
void InvalidateSdrObject() { mpObj.reset( NULL ); };
- SvxItemPropertySet& GetPropertySet() { return maPropSet; }
+ const SvxItemPropertySet& GetPropertySet() { return *mpPropSet; }
SdrObject* GetSdrObject() const {return mpObj.get();}
void SetShapeType( const ::rtl::OUString& ShapeType ) { maShapeType = ShapeType; }
::com::sun::star::uno::Any GetBitmap( BOOL bMetaFile = FALSE ) const throw ();
@@ -206,8 +205,9 @@ public:
and the property found is returned instead of set at the object
directly.
*/
- static ::com::sun::star::uno::Any SAL_CALL GetFillAttributeByName(
- const ::rtl::OUString& rPropertyName, const ::rtl::OUString& rName, SdrModel* pModel );
+// os: unused function
+// static ::com::sun::star::uno::Any SAL_CALL GetFillAttributeByName(
+// const ::rtl::OUString& rPropertyName, const ::rtl::OUString& rName, SdrModel* pModel );
UNO3_GETIMPLEMENTATION_DECL( SvxShape )
@@ -335,15 +335,15 @@ protected:
using SvxUnoTextRangeBase::getPropertyValue;
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyStateImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
- virtual bool setPropertyToDefaultImpl( const SfxItemPropertyMap* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyToDefaultImpl( const SfxItemPropertySimpleEntry* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
public:
SvxShapeText() throw ();
SvxShapeText( SdrObject* pObj ) throw ();
- SvxShapeText( SdrObject* pObject, const SfxItemPropertyMap* pPropertySet ) throw ();
+ SvxShapeText( SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet ) throw ();
virtual ~SvxShapeText() throw ();
virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ) throw ();
@@ -571,15 +571,15 @@ class SVX_DLLPUBLIC SvxOle2Shape : public SvxShape
{
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
void resetModifiedState();
const SvGlobalName GetClassName_Impl(rtl::OUString& rHexCLSID);
public:
SvxOle2Shape( SdrObject* pObj ) throw();
- SvxOle2Shape( SdrObject* pObject, const SfxItemPropertyMap* pPropertySet ) throw ();
+ SvxOle2Shape( SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet ) throw ();
virtual ~SvxOle2Shape() throw();
sal_Bool createObject( const SvGlobalName &aClassName );
@@ -606,8 +606,8 @@ protected:
using SvxUnoTextRangeBase::getPropertyValue;
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
public:
SvxShapePolyPolygon( SdrObject* pObj , ::com::sun::star::drawing::PolygonKind eNew = com::sun::star::drawing::PolygonKind_LINE ) throw(com::sun::star::lang::IllegalArgumentException, com::sun::star::beans::PropertyVetoException);
@@ -637,8 +637,8 @@ protected:
public:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
SvxShapePolyPolygonBezier( SdrObject* pObj , ::com::sun::star::drawing::PolygonKind eNew = com::sun::star::drawing::PolygonKind_PATHLINE) throw();
virtual ~SvxShapePolyPolygonBezier() throw();
@@ -662,8 +662,8 @@ protected:
using SvxUnoTextRangeBase::getPropertyValue;
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
public:
SvxGraphicObject( SdrObject* pObj ) throw();
@@ -685,8 +685,8 @@ protected:
public:
Svx3DSceneObject( SdrObject* pObj, SvxDrawPage* pDrawPage ) throw();
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual ~Svx3DSceneObject() throw();
@@ -725,8 +725,8 @@ class Svx3DCubeObject : public SvxShape
{
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
public:
Svx3DCubeObject( SdrObject* pObj ) throw();
@@ -745,8 +745,8 @@ public:
Svx3DSphereObject( SdrObject* pObj ) throw();
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual ~Svx3DSphereObject() throw();
@@ -761,8 +761,8 @@ class Svx3DLatheObject : public SvxShape
{
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
public:
Svx3DLatheObject( SdrObject* pObj ) throw();
@@ -781,8 +781,8 @@ public:
Svx3DExtrudeObject( SdrObject* pObj ) throw();
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual ~Svx3DExtrudeObject() throw();
@@ -797,8 +797,8 @@ class Svx3DPolygonObject : public SvxShape
{
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
public:
Svx3DPolygonObject( SdrObject* pObj ) throw();
@@ -827,8 +827,8 @@ protected:
public:
SvxCustomShape( SdrObject* pObj ) throw ();
// overide these for special property handling in subcasses. Return true if property is handled
- //virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ //virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertyMapEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual ~SvxCustomShape() throw ();
@@ -873,8 +873,8 @@ public:
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
};
#endif
diff --git a/svx/inc/svx/unotext.hxx b/svx/inc/svx/unotext.hxx
index 563f977329..0907f27182 100644
--- a/svx/inc/svx/unotext.hxx
+++ b/svx/inc/svx/unotext.hxx
@@ -268,7 +268,7 @@ class SVX_DLLPUBLIC SvxUnoTextRangeBase : public ::com::sun::star::text::XTextRa
protected:
SvxEditSource* mpEditSource;
ESelection maSelection;
- SvxItemPropertySet maPropSet;
+ const SvxItemPropertySet* mpPropSet;
virtual void SAL_CALL _setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Any SAL_CALL _getPropertyValue( const ::rtl::OUString& PropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
@@ -276,22 +276,22 @@ protected:
virtual void SAL_CALL _setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues, sal_Int32 nPara = -1 ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL _getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, sal_Int32 nPara = -1 ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::beans::PropertyState SAL_CALL _getPropertyState( const SfxItemPropertyMap* pMap, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL _getPropertyState( const SfxItemPropertySimpleEntry* pMap, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::beans::PropertyState SAL_CALL _getPropertyState( const ::rtl::OUString& PropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL _getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
// returns true if property found or false if unknown property
- virtual sal_Bool _getOnePropertyStates(const SfxItemSet* pSet, const SfxItemPropertyMap* pMap, ::com::sun::star::beans::PropertyState& rState);
+ virtual sal_Bool _getOnePropertyStates(const SfxItemSet* pSet, const SfxItemPropertySimpleEntry* pMap, ::com::sun::star::beans::PropertyState& rState);
virtual void SAL_CALL _setPropertyToDefault( const ::rtl::OUString& PropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
virtual void _setPropertyToDefault( SvxTextForwarder* pForwarder, const SfxItemPropertyMap* pMap, sal_Int32 nPara ) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException );
void SetEditSource( SvxEditSource* _pEditSource ) throw();
- virtual void getPropertyValue( const SfxItemPropertyMap* pMap, com::sun::star::uno::Any& rAny, const SfxItemSet& rSet ) throw(::com::sun::star::beans::UnknownPropertyException );
- virtual void setPropertyValue( const SfxItemPropertyMap* pMap, const com::sun::star::uno::Any& rValue, const ESelection& rSelection, const SfxItemSet& rOldSet, SfxItemSet& rNewSet ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::IllegalArgumentException );
+ virtual void getPropertyValue( const SfxItemPropertySimpleEntry* pMap, com::sun::star::uno::Any& rAny, const SfxItemSet& rSet ) throw(::com::sun::star::beans::UnknownPropertyException );
+ virtual void setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const com::sun::star::uno::Any& rValue, const ESelection& rSelection, const SfxItemSet& rOldSet, SfxItemSet& rNewSet ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::IllegalArgumentException );
public:
- SvxUnoTextRangeBase( const SfxItemPropertyMap* _pMap ) throw();
- SvxUnoTextRangeBase( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap ) throw();
+ SvxUnoTextRangeBase( const SvxItemPropertySet* _pSet ) throw();
+ SvxUnoTextRangeBase( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet ) throw();
SvxUnoTextRangeBase( const SvxUnoTextRangeBase& rRange ) throw();
virtual ~SvxUnoTextRangeBase() throw();
@@ -307,11 +307,12 @@ public:
virtual void GotoStart(sal_Bool Expand) throw();
virtual void GotoEnd(sal_Bool Expand) throw();
- const SfxItemPropertyMap* getPropertyMap() const throw() { return maPropSet.getPropertyMap(); }
+ //const SfxItemPropertyMapEntry* getPropertyMapEntries() const throw() { return maPropSet.getPropertyMapEntries(); }
+ const SvxItemPropertySet* getPropertySet() const throw() { return mpPropSet; }
SvxEditSource* GetEditSource() const throw() { return mpEditSource; }
- static sal_Bool SetPropertyValueHelper( const SfxItemSet& rOldSet, const SfxItemPropertyMap* pMap, const ::com::sun::star::uno::Any& aValue, SfxItemSet& rNewSet, const ESelection* pSelection = NULL, SvxTextEditSource* pEditSource = NULL ) throw( ::com::sun::star::uno::RuntimeException );
- static sal_Bool GetPropertyValueHelper( SfxItemSet& rSet, const SfxItemPropertyMap* pMap, ::com::sun::star::uno::Any& aAny, const ESelection* pSelection = NULL, SvxTextEditSource* pEditSource = NULL ) throw( ::com::sun::star::uno::RuntimeException );
+ static sal_Bool SetPropertyValueHelper( const SfxItemSet& rOldSet, const SfxItemPropertySimpleEntry* pMap, const ::com::sun::star::uno::Any& aValue, SfxItemSet& rNewSet, const ESelection* pSelection = NULL, SvxTextEditSource* pEditSource = NULL ) throw( ::com::sun::star::uno::RuntimeException );
+ static sal_Bool GetPropertyValueHelper( SfxItemSet& rSet, const SfxItemPropertySimpleEntry* pMap, ::com::sun::star::uno::Any& aAny, const ESelection* pSelection = NULL, SvxTextEditSource* pEditSource = NULL ) throw( ::com::sun::star::uno::RuntimeException );
void attachField( const SvxFieldData* pData ) throw();
@@ -410,9 +411,9 @@ protected:
public:
SvxUnoTextBase( ) throw();
- SvxUnoTextBase( const SfxItemPropertyMap* _pMap ) throw();
- SvxUnoTextBase( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap ) throw();
- SvxUnoTextBase( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap, ::com::sun::star::uno::Reference < ::com::sun::star::text::XText > xParent ) throw();
+ SvxUnoTextBase( const SvxItemPropertySet* _pSet ) throw();
+ SvxUnoTextBase( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet ) throw();
+ SvxUnoTextBase( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet, ::com::sun::star::uno::Reference < ::com::sun::star::text::XText > xParent ) throw();
SvxUnoTextBase( const SvxUnoTextBase& rText ) throw();
virtual ~SvxUnoTextBase() throw();
@@ -479,8 +480,8 @@ class SVX_DLLPUBLIC SvxUnoText : public SvxUnoTextBase,
{
public:
SvxUnoText( ) throw();
- SvxUnoText( const SfxItemPropertyMap* _pMap ) throw();
- SvxUnoText( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap, ::com::sun::star::uno::Reference < ::com::sun::star::text::XText > xParent ) throw();
+ SvxUnoText( const SvxItemPropertySet* _pSet ) throw();
+ SvxUnoText( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet, ::com::sun::star::uno::Reference < ::com::sun::star::text::XText > xParent ) throw();
SvxUnoText( const SvxUnoText& rText ) throw();
virtual ~SvxUnoText() throw();
@@ -672,7 +673,9 @@ public:
};
-const SfxItemPropertyMap* ImplGetSvxUnoOutlinerTextCursorPropertyMap();
-const SfxItemPropertyMap* ImplGetSvxTextPortionPropertyMap();
+const SvxItemPropertySet* ImplGetSvxUnoOutlinerTextCursorSvxPropertySet();
+const SfxItemPropertyMapEntry* ImplGetSvxUnoOutlinerTextCursorPropertyMap();
+const SvxItemPropertySet* ImplGetSvxTextPortionSvxPropertySet();
+const SfxItemPropertyMapEntry* ImplGetSvxTextPortionPropertyMap();
#endif
diff --git a/svx/inc/unoapi.hxx b/svx/inc/unoapi.hxx
index 4bafb466a1..f8c1352a1a 100644
--- a/svx/inc/unoapi.hxx
+++ b/svx/inc/unoapi.hxx
@@ -111,7 +111,8 @@ void SvxUnogetInternalNameForItem( const sal_Int16 nWhich, const rtl::OUString&
SfxItemPropertyMap, the search in the map is not done via bsearch, but by
linear search.
*/
-SVX_DLLPUBLIC sal_Int16 SvxUnoGetWhichIdForNamedProperty( const ::rtl::OUString & rPropName );
+// os: unused function
+//SVX_DLLPUBLIC sal_Int16 SvxUnoGetWhichIdForNamedProperty( const ::rtl::OUString & rPropName );
/** converts the given any with a metric to 100th/mm if needed */
void SvxUnoConvertToMM( const SfxMapUnit eSourceMapUnit, com::sun::star::uno::Any & rMetric ) throw();
diff --git a/svx/source/accessibility/AccessibleEditableTextPara.cxx b/svx/source/accessibility/AccessibleEditableTextPara.cxx
index 62bd798635..7f43f3d81a 100644
--- a/svx/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/svx/source/accessibility/AccessibleEditableTextPara.cxx
@@ -93,10 +93,10 @@ using namespace ::com::sun::star::accessibility;
namespace accessibility
{
- const SfxItemPropertyMap* ImplGetSvxCharAndParaPropertiesMap()
+ const SvxItemPropertySet* ImplGetSvxCharAndParaPropertiesSet()
{
// PropertyMap for character and paragraph properties
- static const SfxItemPropertyMap aPropMap[] =
+ static const SfxItemPropertyMapEntry aPropMap[] =
{
SVX_UNOEDIT_CHAR_PROPERTIES,
SVX_UNOEDIT_PARA_PROPERTIES,
@@ -105,8 +105,8 @@ namespace accessibility
{MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
{0,0,0,0,0,0}
};
-
- return aPropMap;
+ static SvxItemPropertySet aPropSet( aPropMap );
+ return &aPropSet;
}
@@ -1885,8 +1885,8 @@ namespace accessibility
SvxAccessibleTextPropertySet aPropSet( &GetEditSource(),
0 == nStartIndex &&
rCacheTF.GetTextLen(nPara) == nEndIndex ?
- ImplGetSvxUnoOutlinerTextCursorPropertyMap() :
- ImplGetSvxTextPortionPropertyMap() );
+ ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() :
+ ImplGetSvxTextPortionSvxPropertySet() );
aPropSet.SetSelection( MakeSelection(nStartIndex, nEndIndex) );
@@ -1950,7 +1950,7 @@ namespace accessibility
// get XPropertySetInfo for paragraph attributes and
// character attributes that span all the paragraphs text.
SvxAccessibleTextPropertySet aPropSet( &GetEditSource(),
- ImplGetSvxCharAndParaPropertiesMap() );
+ ImplGetSvxCharAndParaPropertiesSet() );
aPropSet.SetSelection( MakeSelection( 0, GetTextLen() ) );
uno::Reference< beans::XPropertySetInfo > xPropSetInfo = aPropSet.getPropertySetInfo();
if (!xPropSetInfo.is())
@@ -2049,7 +2049,7 @@ namespace accessibility
CheckIndex(nIndex);
SvxAccessibleTextPropertySet aPropSet( &GetEditSource(),
- ImplGetSvxCharAndParaPropertiesMap() );
+ ImplGetSvxCharAndParaPropertiesSet() );
aPropSet.SetSelection( MakeSelection( nIndex ) );
uno::Reference< beans::XPropertySetInfo > xPropSetInfo = aPropSet.getPropertySetInfo();
if (!xPropSetInfo.is())
diff --git a/svx/source/inc/unopracc.hxx b/svx/source/inc/unopracc.hxx
index 376628eb50..2cde80e068 100644
--- a/svx/source/inc/unopracc.hxx
+++ b/svx/source/inc/unopracc.hxx
@@ -48,7 +48,7 @@ class SvxAccessibleTextPropertySet : public SvxUnoTextRangeBase,
public ::cppu::OWeakObject
{
public:
- SvxAccessibleTextPropertySet( const SvxEditSource*, const SfxItemPropertyMap* );
+ SvxAccessibleTextPropertySet( const SvxEditSource*, const SvxItemPropertySet* );
virtual ~SvxAccessibleTextPropertySet() throw();
// XTextRange
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index dbfaa845dc..e9e6a60da7 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -81,10 +81,10 @@ extern BorderLine lcl_SvxLineToLine(const SvxBorderLine* pLine, sal_Bool bConver
// -----------------------------------------------------------------------------
-static const SfxItemPropertyMap* ImplGetSvxCellPropertyMap()
+static const SvxItemPropertySet* ImplGetSvxCellPropertySet()
{
// Propertymap fuer einen Outliner Text
- static const SfxItemPropertyMap aSvxCellPropertyMap[] =
+ static const SfxItemPropertyMapEntry aSvxCellPropertyMap[] =
{
FILL_PROPERTIES
// { MAP_CHAR_LEN("HasLevels"), OWN_ATTR_HASLEVELS, &::getBooleanCppuType(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
@@ -110,7 +110,8 @@ static const SfxItemPropertyMap* ImplGetSvxCellPropertyMap()
{0,0,0,0,0,0}
};
- return aSvxCellPropertyMap;
+ static SvxItemPropertySet aSvxCellPropertySet( aSvxCellPropertyMap );
+ return &aSvxCellPropertySet;
}
namespace sdr
@@ -315,8 +316,8 @@ rtl::Reference< Cell > Cell::create( SdrTableObj& rTableObj, OutlinerParaObject*
Cell::Cell( SdrTableObj& rTableObj, OutlinerParaObject* pOutlinerParaObject ) throw()
: SdrText( rTableObj, pOutlinerParaObject )
-, SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorPropertyMap() )
-, maPropSet( ImplGetSvxCellPropertyMap() )
+, SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() )
+, mpPropSet( ImplGetSvxCellPropertySet() )
, mpProperties( new sdr::properties::CellProperties( rTableObj, this ) )
, mnCellContentType( CellContentType_EMPTY )
, mfValue( 0.0 )
@@ -973,9 +974,9 @@ sal_Int32 SAL_CALL Cell::getError( ) throw (RuntimeException)
// XPropertySet
// -----------------------------------------------------------------------------
-Any Cell::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertyMap* pMap )
+Any Cell::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleEntry* pMap )
{
- Any aAny( maPropSet.getPropertyValue( pMap, aSet ) );
+ Any aAny( mpPropSet->getPropertyValue( pMap, aSet ) );
if( *pMap->pType != aAny.getValueType() )
{
@@ -997,7 +998,7 @@ Any Cell::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertyMap* pMap )
Reference< XPropertySetInfo > SAL_CALL Cell::getPropertySetInfo() throw(RuntimeException)
{
- return maPropSet.getPropertySetInfo();
+ return mpPropSet->getPropertySetInfo();
}
// -----------------------------------------------------------------------------
@@ -1009,7 +1010,7 @@ void SAL_CALL Cell::setPropertyValue( const OUString& rPropertyName, const Any&
if( (mpProperties == 0) || (GetModel() == 0) )
throw DisposedException();
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(rPropertyName);
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(rPropertyName);
if( pMap )
{
if( (pMap->nFlags & PropertyAttribute::READONLY ) != 0 )
@@ -1131,7 +1132,7 @@ void SAL_CALL Cell::setPropertyValue( const OUString& rPropertyName, const Any&
if( aSet.GetItemState( pMap->nWID ) == SFX_ITEM_SET )
{
- maPropSet.setPropertyValue( pMap, rValue, aSet );
+ mpPropSet->setPropertyValue( pMap, rValue, aSet );
}
}
}
@@ -1154,7 +1155,7 @@ Any SAL_CALL Cell::getPropertyValue( const OUString& PropertyName ) throw(Unknow
if( (mpProperties == 0) || (GetModel() == 0) )
throw DisposedException();
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName);
if( pMap )
{
switch( pMap->nWID )
@@ -1355,7 +1356,7 @@ PropertyState SAL_CALL Cell::getPropertyState( const OUString& PropertyName ) th
if( (mpProperties == 0) || (GetModel() == 0) )
throw DisposedException();
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName);
if( pMap )
{
@@ -1498,7 +1499,7 @@ void SAL_CALL Cell::setPropertyToDefault( const OUString& PropertyName ) throw(U
if( (mpProperties == 0) || (GetModel() == 0) )
throw DisposedException();
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName);
if( pMap )
{
switch( pMap->nWID )
@@ -1541,7 +1542,7 @@ Any SAL_CALL Cell::getPropertyDefault( const OUString& aPropertyName ) throw(Unk
if( (mpProperties == 0) || (GetModel() == 0) )
throw DisposedException();
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(aPropertyName);
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(aPropertyName);
if( pMap )
{
switch( pMap->nWID )
diff --git a/svx/source/table/cell.hxx b/svx/source/table/cell.hxx
index dc3b2ad300..7079471e84 100644
--- a/svx/source/table/cell.hxx
+++ b/svx/source/table/cell.hxx
@@ -47,7 +47,7 @@
class SfxItemSet;
class OutlinerParaObject;
-struct SfxItemPropertyMap;
+
namespace sdr { namespace properties {
class TextProperties;
} }
@@ -213,13 +213,13 @@ protected:
virtual const SfxItemSet& GetObjectItemSet();
virtual void SetObjectItem(const SfxPoolItem& rItem);
- ::com::sun::star::uno::Any GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertyMap* pMap );
+ ::com::sun::star::uno::Any GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleEntry* pMap );
private:
Cell( SdrTableObj& rTableObj, OutlinerParaObject* pOutlinerParaObject ) throw();
virtual ~Cell() throw();
- SvxItemPropertySet maPropSet;
+ const SvxItemPropertySet* mpPropSet;
sdr::properties::TextProperties* mpProperties;
diff --git a/svx/source/unodraw/shapeimpl.hxx b/svx/source/unodraw/shapeimpl.hxx
index 74450da94b..593cbaf6d4 100644
--- a/svx/source/unodraw/shapeimpl.hxx
+++ b/svx/source/unodraw/shapeimpl.hxx
@@ -53,8 +53,8 @@ class SvxPluginShape : public SvxOle2Shape
{
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
public:
SvxPluginShape( SdrObject* pObj ) throw();
@@ -74,8 +74,8 @@ class SvxAppletShape : public SvxOle2Shape
{
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
public:
SvxAppletShape( SdrObject* pObj ) throw();
@@ -95,8 +95,8 @@ class SvxFrameShape : public SvxOle2Shape
{
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
public:
SvxFrameShape( SdrObject* pObj ) throw();
@@ -115,8 +115,8 @@ class SvxTableShape : public SvxShape
{
protected:
// overide these for special property handling in subcasses. Return true if property is handled
- virtual bool setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual bool getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual void lock();
virtual void unlock();
diff --git a/svx/source/unodraw/tableshape.cxx b/svx/source/unodraw/tableshape.cxx
index 3efde7e2a2..f8b5bceec9 100644
--- a/svx/source/unodraw/tableshape.cxx
+++ b/svx/source/unodraw/tableshape.cxx
@@ -50,7 +50,7 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::beans;
SvxTableShape::SvxTableShape( SdrObject* pObj ) throw()
-: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_TABLE) )
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_TABLE), aSvxMapProvider.GetPropertySet(SVXMAP_TABLE) )
{
SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.TableShape" ) ) );
}
@@ -62,7 +62,11 @@ SvxTableShape::~SvxTableShape() throw()
//----------------------------------------------------------------------
-bool SvxTableShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxTableShape::setPropertyValueImpl(
+ const ::rtl::OUString& rName,
+ const SfxItemPropertySimpleEntry* pProperty,
+ const ::com::sun::star::uno::Any& rValue )
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -106,14 +110,18 @@ bool SvxTableShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, c
}
default:
{
- return SvxShape::setPropertyValueImpl( pProperty, rValue );
+ return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
}
}
}
extern Graphic SvxGetGraphicForShape( SdrObject& rShape, bool bVector );
-bool SvxTableShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxTableShape::getPropertyValueImpl(
+ const ::rtl::OUString& rName,
+ const SfxItemPropertySimpleEntry* pProperty,
+ ::com::sun::star::uno::Any& rValue )
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -168,7 +176,7 @@ bool SvxTableShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, :
}
default:
{
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
}
}
diff --git a/svx/source/unodraw/unoipset.cxx b/svx/source/unodraw/unoipset.cxx
index 352d65dd8e..25a72b0f8b 100644
--- a/svx/source/unodraw/unoipset.cxx
+++ b/svx/source/unodraw/unoipset.cxx
@@ -54,176 +54,11 @@ using namespace ::rtl;
//----------------------------------------------------------------------
-struct SfxItemPropertyMapHash
+struct SfxItemPropertyMapEntryHash
{
- size_t operator()(const SfxItemPropertyMap* pMap) const { return (size_t)pMap; }
+ size_t operator()(const SfxItemPropertyMapEntry* pMap) const { return (size_t)pMap; }
};
-class SvxInfoSetCache;
-
-class SvxCachedItemPropertySetInfo : public SfxItemPropertySetInfo
-{
-private:
- SvxInfoSetCache* mpCache;
-
-public:
- SvxCachedItemPropertySetInfo(const SfxItemPropertyMap *pMap, SvxInfoSetCache* pCache );
- virtual void SAL_CALL release() throw ();
-};
-
-/** this class caches the created XPropertySetInfo objects for each different
- SfxItemPropertyMap pointer. This class can't be used with dynamicly created
- SfxItemPropertyMaps!
-*/
-
-class SvxInfoSetCache
-{
-private:
- typedef std::hash_map< const SfxItemPropertyMap*, uno::Reference< beans::XPropertySetInfo >, SfxItemPropertyMapHash > InfoMap;
- typedef std::hash_map< const SfxItemPropertyMap*, const SfxItemPropertyMap*, SfxItemPropertyMapHash > PropertyMap;
-
- InfoMap maInfoMap;
- PropertyMap maPropertyMap;
-
- static ::osl::Mutex maMutex;
- static SvxInfoSetCache* mpGlobalCache;
-
- SvxInfoSetCache() {};
- ~SvxInfoSetCache() {};
-public:
- static uno::Reference< beans::XPropertySetInfo > getCachedPropertySetInfo( const SfxItemPropertyMap* pMap );
- static const SfxItemPropertyMap* getSortedPropertyMap( const SfxItemPropertyMap* pMap );
-
- void dispose( SvxCachedItemPropertySetInfo* pInfo );
-};
-
-SvxCachedItemPropertySetInfo::SvxCachedItemPropertySetInfo(const SfxItemPropertyMap *pMap, SvxInfoSetCache* pCache )
-: SfxItemPropertySetInfo( pMap ), mpCache( pCache )
-{
-}
-
-void SAL_CALL SvxCachedItemPropertySetInfo::release() throw ()
-{
- SvxInfoSetCache* pCache = mpCache;
- if( pCache && m_refCount == 2 )
- {
- mpCache = NULL;
- pCache->dispose( this );
- }
- SfxItemPropertySetInfo::release();
-}
-
-::osl::Mutex SvxInfoSetCache::maMutex;
-SvxInfoSetCache* SvxInfoSetCache::mpGlobalCache = NULL;
-
-uno::Reference< beans::XPropertySetInfo > SvxInfoSetCache::getCachedPropertySetInfo( const SfxItemPropertyMap* pMap )
-{
- ::osl::MutexGuard aGuard(maMutex);
-
- if( NULL == mpGlobalCache )
- mpGlobalCache = new SvxInfoSetCache();
-
- InfoMap::iterator aIt(mpGlobalCache->maInfoMap.find(pMap));
- if (aIt != mpGlobalCache->maInfoMap.end())
- return aIt->second.get();
-
- uno::Reference< beans::XPropertySetInfo > xInfo( new SvxCachedItemPropertySetInfo( pMap, mpGlobalCache ) );
- mpGlobalCache->maInfoMap.insert(InfoMap::value_type(pMap,xInfo));
-
- /* if this assertion is triggered this class is possible used with dynamicly created
- SfxItemPropertyMap pointers. This will cause a cache overflow as the current
- implementation is designed for a limited number of different SfxItemPropertyMap
- pointers */
- DBG_ASSERT( mpGlobalCache->maInfoMap.size() < 200, "WARNING: SvxInfoSetCache::get(), possible cache overflow!" );
-
- return xInfo;
-}
-
-/** removes a cached property set info from the cache. This is called by the property set
- info when its refcount goes to 1, meaning the cache holds the last reference to the
- info
-*/
-void SvxInfoSetCache::dispose( SvxCachedItemPropertySetInfo* pInfo )
-{
- if( pInfo )
- {
- ::osl::MutexGuard aGuard(maMutex);
-
- InfoMap::iterator aIt(mpGlobalCache->maInfoMap.find(pInfo->getMap()));
- if (aIt != mpGlobalCache->maInfoMap.end())
- {
- mpGlobalCache->maInfoMap.erase( aIt );
- }
- }
-}
-
-inline bool greater_size_pmap( const SfxItemPropertyMap* pFirst,
- const SfxItemPropertyMap* pSecond )
-{
- return strcmp( pFirst->pName, pSecond->pName ) < 0;
-}
-
-
-const SfxItemPropertyMap* SvxInfoSetCache::getSortedPropertyMap( const SfxItemPropertyMap* pMap )
-{
- ::osl::MutexGuard aGuard(maMutex);
-
- if( NULL == mpGlobalCache )
- mpGlobalCache = new SvxInfoSetCache();
-
- const SfxItemPropertyMap* pSortedMap = NULL;
- PropertyMap::iterator aIt( mpGlobalCache->maPropertyMap.find(pMap) );
- if (aIt != mpGlobalCache->maPropertyMap.end())
- pSortedMap = aIt->second;
-
- if( NULL == pSortedMap )
- {
- // count the entries in the map
- std::vector< const SfxItemPropertyMap * >::size_type nCount = 0;
- const SfxItemPropertyMap* pTempMap = pMap;
- while( pTempMap->pName )
- {
- pTempMap++;
- nCount++;
- }
-
- // fill a stl vector with the entry pointers
- std::vector< const SfxItemPropertyMap * > aMap( nCount );
- std::vector< const SfxItemPropertyMap * >::iterator aIter( aMap.begin() );
-
- pTempMap = pMap;
- while( pTempMap->pName )
- *aIter++ = pTempMap++;
-
- // sort the vector
- std::sort( aMap.begin(), aMap.end(), greater_size_pmap );
-
- // create a new map
- pSortedMap = new SfxItemPropertyMap[nCount+1];
- pTempMap = pSortedMap;
-
- // copy the sorted entries to a new map
- aIter = aMap.begin();
- while( aIter != aMap.end() )
- {
- memcpy( (void*)pTempMap, *aIter++, sizeof( SfxItemPropertyMap ) );
- pTempMap++;
- }
-
- ((SfxItemPropertyMap*)pTempMap)->pName = NULL;
-
- mpGlobalCache->maPropertyMap[pMap] = pSortedMap;
-
- /* if this assertion is triggered this class is possible used with dynamicly created
- SfxItemPropertyMap pointers. This will cause a cache overflow as the current
- implementation is designed for a limited number of different SfxItemPropertyMap
- pointers */
- DBG_ASSERT( mpGlobalCache->maPropertyMap.size() < 200, "WARNING: SvxInfoSetCache::get(), possible cache overflow!" );
- }
-
- return pSortedMap;
-}
-
//----------------------------------------------------------------------
struct SvxIDPropertyCombine
@@ -234,10 +69,10 @@ struct SvxIDPropertyCombine
DECLARE_LIST( SvxIDPropertyCombineList, SvxIDPropertyCombine * )
-SvxItemPropertySet::SvxItemPropertySet( const SfxItemPropertyMap* pMap, sal_Bool bConvertTwips )
-: _pMap(SvxInfoSetCache::getSortedPropertyMap(pMap)), mbConvertTwips(bConvertTwips)
+SvxItemPropertySet::SvxItemPropertySet( const SfxItemPropertyMapEntry* pMap, sal_Bool bConvertTwips )
+: m_aPropertyMap( pMap ),
+ _pMap(pMap), mbConvertTwips(bConvertTwips)
{
- mpLastMap = NULL;
pCombiList = NULL;
}
@@ -285,55 +120,46 @@ void SvxItemPropertySet::AddUsrAnyForID(const uno::Any& rAny, sal_uInt16 nWID)
}
//----------------------------------------------------------------------
-void SvxItemPropertySet::ObtainSettingsFromPropertySet(SvxItemPropertySet& rPropSet,
- SfxItemSet& rSet, uno::Reference< beans::XPropertySet > xSet )
+void SvxItemPropertySet::ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet,
+ SfxItemSet& rSet, uno::Reference< beans::XPropertySet > xSet ) const
{
if(rPropSet.AreThereOwnUsrAnys())
{
const SfxItemPropertyMap* pSrc = rPropSet.getPropertyMap();
- const SfxItemPropertyMap* pDst = _pMap;
- while(pSrc->pName)
+ PropertyEntryVector_t aSrcPropVector = pSrc->getPropertyEntries();
+ PropertyEntryVector_t::const_iterator aSrcIt = aSrcPropVector.begin();
+ while(aSrcIt != aSrcPropVector.end())
{
- if(pSrc->nWID)
+ if(aSrcIt->nWID)
{
- uno::Any* pUsrAny = rPropSet.GetUsrAnyForID(pSrc->nWID);
+ uno::Any* pUsrAny = rPropSet.GetUsrAnyForID(aSrcIt->nWID);
if(pUsrAny)
{
// Aequivalenten Eintrag in pDst suchen
- const SfxItemPropertyMap* pTmp = pDst;
- int nDiff = strcmp( pSrc->pName, pTmp->pName );
- while(nDiff > 0)
- {
- pTmp++;
- nDiff = strcmp( pSrc->pName, pTmp->pName );
- }
-
- if(nDiff == 0)
+ const SfxItemPropertySimpleEntry* pEntry = m_aPropertyMap.getByName( aSrcIt->sName );
+ if(pEntry)
{
- // Eintrag gefunden
- pDst = pTmp;
-
- if(pDst->nWID >= OWN_ATTR_VALUE_START && pDst->nWID <= OWN_ATTR_VALUE_END)
+ // entry found
+ if(pEntry->nWID >= OWN_ATTR_VALUE_START && pEntry->nWID <= OWN_ATTR_VALUE_END)
{
// Special ID im PropertySet, kann nur direkt am
// Objekt gesetzt werden+
- OUString aName( OUString::createFromAscii( pDst->pName ) );
- xSet->setPropertyValue( aName, *pUsrAny);
+ xSet->setPropertyValue( aSrcIt->sName, *pUsrAny);
}
else
{
- if(rSet.GetPool()->IsWhich(pDst->nWID))
- rSet.Put(rSet.GetPool()->GetDefaultItem(pDst->nWID));
+ if(rSet.GetPool()->IsWhich(pEntry->nWID))
+ rSet.Put(rSet.GetPool()->GetDefaultItem(pEntry->nWID));
// setzen
- setPropertyValue(pDst, *pUsrAny, rSet);
+ setPropertyValue(pEntry, *pUsrAny, rSet);
}
}
}
}
- // Naechster Eintrag
- pSrc++;
+ // next entry
+ ++aSrcIt;
}
}
}
@@ -363,7 +189,7 @@ sal_Bool SvxUnoCheckForConversion( const SfxItemSet&, sal_Int32 nWID, const uno:
}
//----------------------------------------------------------------------
-uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertyMap* pMap, const SfxItemSet& rSet ) const
+uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet ) const
{
uno::Any aVal;
if(!pMap || !pMap->nWID)
@@ -419,7 +245,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertyMap* pMap, c
}
//----------------------------------------------------------------------
-void SvxItemPropertySet::setPropertyValue( const SfxItemPropertyMap* pMap, const uno::Any& rVal, SfxItemSet& rSet ) const
+void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const uno::Any& rVal, SfxItemSet& rSet ) const
{
if(!pMap || !pMap->nWID)
return;
@@ -475,7 +301,7 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertyMap* pMap, const
}
//----------------------------------------------------------------------
-uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertyMap* pMap ) const
+uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* pMap ) const
{
// Schon ein Wert eingetragen? Dann schnell fertig
uno::Any* pUsrAny = GetUsrAnyForID(pMap->nWID);
@@ -535,7 +361,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertyMap* pMap )
//----------------------------------------------------------------------
-void SvxItemPropertySet::setPropertyValue( const SfxItemPropertyMap* pMap, const uno::Any& rVal ) const
+void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const uno::Any& rVal ) const
{
uno::Any* pUsrAny = GetUsrAnyForID(pMap->nWID);
if(!pUsrAny)
@@ -546,46 +372,18 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertyMap* pMap, const
//----------------------------------------------------------------------
-const SfxItemPropertyMap* SvxItemPropertySet::getPropertyMapEntry(const OUString &rName) const
+const SfxItemPropertySimpleEntry* SvxItemPropertySet::getPropertyMapEntry(const OUString &rName) const
{
- const SfxItemPropertyMap* pMap = mpLastMap ? mpLastMap : _pMap;
- while ( pMap->pName )
- {
- if( rName.equalsAsciiL( pMap->pName, pMap->nNameLen ) )
- {
- const_cast<SvxItemPropertySet*>(this)->mpLastMap = pMap + 1;
- if( NULL == mpLastMap->pName )
- const_cast<SvxItemPropertySet*>(this)->mpLastMap = NULL;
-
- return pMap;
- }
- ++pMap;
- }
-
- if( mpLastMap == NULL )
- return 0;
-
- pMap = _pMap;
- while ( pMap->pName && (_pMap != mpLastMap) )
- {
- if( rName.equalsAsciiL( pMap->pName, pMap->nNameLen ) )
- {
- const_cast<SvxItemPropertySet*>(this)->mpLastMap = pMap + 1;
- if( NULL == mpLastMap->pName )
- const_cast<SvxItemPropertySet*>(this)->mpLastMap = NULL;
- return pMap;
- }
- ++pMap;
- }
-
- return 0;
-}
+ return m_aPropertyMap.getByName( rName );
+ }
//----------------------------------------------------------------------
uno::Reference< beans::XPropertySetInfo > SvxItemPropertySet::getPropertySetInfo() const
{
- return SvxInfoSetCache::getCachedPropertySetInfo( _pMap );
+ if( !m_xInfo.is() )
+ m_xInfo = new SfxItemPropertySetInfo( &m_aPropertyMap );
+ return m_xInfo;
}
//----------------------------------------------------------------------
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index 0171d424ba..5bfeb3a3bf 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -79,8 +79,6 @@ using namespace ::com::sun::star::drawing;
DECLARE_LIST( SvxDrawPageList, SvxDrawPage * )
-extern SfxItemPropertyMap* ImplGetSvxOle2PropertyMap();
-extern SfxItemPropertyMap* ImplGetSvxPageShapePropertyMap();
/**********************************************************************
* class SvxDrawPage *
@@ -828,7 +826,7 @@ SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt3
}
if( pRet == NULL )
{
- pRet = new SvxOle2Shape( pObj, ImplGetSvxOle2PropertyMap() );
+ pRet = new SvxOle2Shape( pObj, aSvxMapProvider.GetMap(SVXMAP_OLE2), aSvxMapProvider.GetPropertySet(SVXMAP_OLE2) );
}
}
break;
@@ -842,7 +840,7 @@ SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt3
pRet = new SvxShapePolyPolygon( pObj , PolygonKind_PATHPLIN );
break;
case OBJ_PAGE:
- pRet = new SvxShape( pObj, ImplGetSvxPageShapePropertyMap() );
+ pRet = new SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_PAGE), aSvxMapProvider.GetPropertySet(SVXMAP_PAGE) );
break;
case OBJ_MEASURE:
pRet = new SvxShapeDimensioning( pObj );
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index 1cf5bda741..0ab785b391 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -64,9 +64,9 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::beans::PropertyAttribute;
using ::com::sun::star::drawing::TextVerticalAdjust;
-SfxItemPropertyMap* ImplGetSvxShapePropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxShapePropertyMap()
{
- static SfxItemPropertyMap aShapePropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aShapePropertyMap_Impl[] =
{
EDGERADIUS_PROPERTIES
FILL_PROPERTIES
@@ -89,9 +89,9 @@ SfxItemPropertyMap* ImplGetSvxShapePropertyMap()
return aShapePropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxTextShapePropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxTextShapePropertyMap()
{
- static SfxItemPropertyMap aTextShapePropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aTextShapePropertyMap_Impl[] =
{
EDGERADIUS_PROPERTIES
FILL_PROPERTIES
@@ -114,9 +114,9 @@ SfxItemPropertyMap* ImplGetSvxTextShapePropertyMap()
return aTextShapePropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxConnectorPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxConnectorPropertyMap()
{
- static SfxItemPropertyMap aConnectorPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aConnectorPropertyMap_Impl[] =
{
SPECIAL_CONNECTOR_PROPERTIES
EDGERADIUS_PROPERTIES
@@ -139,9 +139,9 @@ SfxItemPropertyMap* ImplGetSvxConnectorPropertyMap()
return aConnectorPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxDimensioningPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxDimensioningPropertyMap()
{
- static SfxItemPropertyMap aDimensioningPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aDimensioningPropertyMap_Impl[] =
{
SPECIAL_DIMENSIONING_PROPERTIES
EDGERADIUS_PROPERTIES
@@ -164,9 +164,9 @@ SfxItemPropertyMap* ImplGetSvxDimensioningPropertyMap()
return aDimensioningPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxCirclePropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxCirclePropertyMap()
{
- static SfxItemPropertyMap aCirclePropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aCirclePropertyMap_Impl[] =
{
SPECIAL_CIRCLE_PROPERTIES
EDGERADIUS_PROPERTIES
@@ -190,9 +190,9 @@ SfxItemPropertyMap* ImplGetSvxCirclePropertyMap()
return aCirclePropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxPolyPolygonPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxPolyPolygonPropertyMap()
{
- static SfxItemPropertyMap aPolyPolygonPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aPolyPolygonPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("Geometry"), OWN_ATTR_BASE_GEOMETRY, SEQTYPE(::getCppuType((const ::com::sun::star::drawing::PointSequenceSequence*)0)), 0, 0 },
SPECIAL_POLYGON_PROPERTIES
@@ -217,9 +217,9 @@ SfxItemPropertyMap* ImplGetSvxPolyPolygonPropertyMap()
return aPolyPolygonPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxPolyPolygonBezierPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxPolyPolygonBezierPropertyMap()
{
- static SfxItemPropertyMap aPolyPolygonBezierPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aPolyPolygonBezierPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("Geometry"), OWN_ATTR_BASE_GEOMETRY, &::getCppuType((const ::com::sun::star::drawing::PolyPolygonBezierCoords*)0), 0, 0 },
SPECIAL_POLYGON_PROPERTIES
@@ -244,9 +244,9 @@ SfxItemPropertyMap* ImplGetSvxPolyPolygonBezierPropertyMap()
return aPolyPolygonBezierPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxGraphicObjectPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxGraphicObjectPropertyMap()
{
- static SfxItemPropertyMap aGraphicObjectPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aGraphicObjectPropertyMap_Impl[] =
{
SPECIAL_GRAPHOBJ_PROPERTIES
@@ -273,9 +273,9 @@ SfxItemPropertyMap* ImplGetSvxGraphicObjectPropertyMap()
return aGraphicObjectPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvx3DSceneObjectPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvx3DSceneObjectPropertyMap()
{
- static SfxItemPropertyMap a3DSceneObjectPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry a3DSceneObjectPropertyMap_Impl[] =
{
SPECIAL_3DSCENEOBJECT_PROPERTIES
FILL_PROPERTIES
@@ -292,9 +292,9 @@ SfxItemPropertyMap* ImplGetSvx3DSceneObjectPropertyMap()
return a3DSceneObjectPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvx3DCubeObjectPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvx3DCubeObjectPropertyMap()
{
- static SfxItemPropertyMap a3DCubeObjectPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry a3DCubeObjectPropertyMap_Impl[] =
{
SPECIAL_3DCUBEOBJECT_PROPERTIES
MISC_3D_OBJ_PROPERTIES
@@ -314,9 +314,9 @@ SfxItemPropertyMap* ImplGetSvx3DCubeObjectPropertyMap()
return a3DCubeObjectPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvx3DSphereObjectPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvx3DSphereObjectPropertyMap()
{
- static SfxItemPropertyMap a3DSphereObjectPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry a3DSphereObjectPropertyMap_Impl[] =
{
SPECIAL_3DSPHEREOBJECT_PROPERTIES
MISC_3D_OBJ_PROPERTIES
@@ -335,9 +335,9 @@ SfxItemPropertyMap* ImplGetSvx3DSphereObjectPropertyMap()
return a3DSphereObjectPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvx3DLatheObjectPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvx3DLatheObjectPropertyMap()
{
- static SfxItemPropertyMap a3DLatheObjectPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry a3DLatheObjectPropertyMap_Impl[] =
{
SPECIAL_3DLATHEOBJECT_PROPERTIES
@@ -362,9 +362,9 @@ SfxItemPropertyMap* ImplGetSvx3DLatheObjectPropertyMap()
return a3DLatheObjectPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvx3DExtrudeObjectPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvx3DExtrudeObjectPropertyMap()
{
- static SfxItemPropertyMap a3DExtrudeObjectPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry a3DExtrudeObjectPropertyMap_Impl[] =
{
SPECIAL_3DEXTRUDEOBJECT_PROPERTIES
@@ -389,9 +389,9 @@ SfxItemPropertyMap* ImplGetSvx3DExtrudeObjectPropertyMap()
return a3DExtrudeObjectPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvx3DPolygonObjectPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvx3DPolygonObjectPropertyMap()
{
- static SfxItemPropertyMap a3DPolygonObjectPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry a3DPolygonObjectPropertyMap_Impl[] =
{
SPECIAL_3DPOLYGONOBJECT_PROPERTIES
MISC_3D_OBJ_PROPERTIES
@@ -411,9 +411,9 @@ SfxItemPropertyMap* ImplGetSvx3DPolygonObjectPropertyMap()
return a3DPolygonObjectPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxAllPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxAllPropertyMap()
{
- static SfxItemPropertyMap aAllPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aAllPropertyMap_Impl[] =
{
SHADOW_PROPERTIES
LINE_PROPERTIES
@@ -455,9 +455,9 @@ SfxItemPropertyMap* ImplGetSvxAllPropertyMap()
return aAllPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxGroupPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxGroupPropertyMap()
{
- static SfxItemPropertyMap aGroupPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aGroupPropertyMap_Impl[] =
{
SHAPE_DESCRIPTOR_PROPERTIES
MISC_OBJ_PROPERTIES
@@ -469,9 +469,9 @@ SfxItemPropertyMap* ImplGetSvxGroupPropertyMap()
return aGroupPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxOle2PropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxOle2PropertyMap()
{
- static SfxItemPropertyMap aOle2PropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aOle2PropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0},
@@ -504,9 +504,9 @@ SfxItemPropertyMap* ImplGetSvxOle2PropertyMap()
return aOle2PropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxPluginPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxPluginPropertyMap()
{
- static SfxItemPropertyMap aPluginPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aPluginPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("PluginMimeType"), OWN_ATTR_PLUGIN_MIMETYPE , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
{ MAP_CHAR_LEN("PluginURL"), OWN_ATTR_PLUGIN_URL , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
@@ -535,10 +535,10 @@ SfxItemPropertyMap* ImplGetSvxPluginPropertyMap()
return aPluginPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxFramePropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxFramePropertyMap()
{
//TODO/LATER: new properties for ScrollingMode and DefaultBorder
- static SfxItemPropertyMap aFramePropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aFramePropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("FrameURL"), OWN_ATTR_FRAME_URL , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
{ MAP_CHAR_LEN("FrameName"), OWN_ATTR_FRAME_NAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
@@ -570,9 +570,9 @@ SfxItemPropertyMap* ImplGetSvxFramePropertyMap()
return aFramePropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxAppletPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxAppletPropertyMap()
{
- static SfxItemPropertyMap aAppletPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aAppletPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("AppletCodeBase"), OWN_ATTR_APPLET_CODEBASE , &::getCppuType(( const ::rtl::OUString*)0), 0, 0},
{ MAP_CHAR_LEN("AppletName"), OWN_ATTR_APPLET_NAME , &::getCppuType(( const ::rtl::OUString*)0), 0, 0},
@@ -604,9 +604,9 @@ SfxItemPropertyMap* ImplGetSvxAppletPropertyMap()
return aAppletPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxControlShapePropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxControlShapePropertyMap()
{
- static SfxItemPropertyMap aControlPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aControlPropertyMap_Impl[] =
{
// the following properties are mapped to the XControl Model of this shape
{ MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTNAME), 0, &::getCppuType((const ::rtl::OUString*)0), 0, 0 },
@@ -655,9 +655,9 @@ SfxItemPropertyMap* ImplGetSvxControlShapePropertyMap()
return aControlPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxPageShapePropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxPageShapePropertyMap()
{
- static SfxItemPropertyMap aPageShapePropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aPageShapePropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("PageNumber"), OWN_ATTR_PAGE_NUMBER , &::getCppuType((const sal_Int32*)0), 0, 0},
{ MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \
@@ -679,9 +679,9 @@ SfxItemPropertyMap* ImplGetSvxPageShapePropertyMap()
return aPageShapePropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxCaptionPropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxCaptionPropertyMap()
{
- static SfxItemPropertyMap aCaptionPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aCaptionPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("CaptionPoint"), OWN_ATTR_CAPTION_POINT, &::getCppuType((const com::sun::star::awt::Point*)0), 0, 0 },
{ MAP_CHAR_LEN("CaptionType"), SDRATTR_CAPTIONTYPE, &::getCppuType((const sal_Int16*)0), 0, 0},
@@ -714,9 +714,9 @@ SfxItemPropertyMap* ImplGetSvxCaptionPropertyMap()
return aCaptionPropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxCustomShapePropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxCustomShapePropertyMap()
{
- static SfxItemPropertyMap aCustomShapePropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aCustomShapePropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("CustomShapeEngine"), SDRATTR_CUSTOMSHAPE_ENGINE, &::getCppuType((const ::rtl::OUString*)0), 0, 0 },
{ MAP_CHAR_LEN("CustomShapeData"), SDRATTR_CUSTOMSHAPE_DATA, &::getCppuType((const ::rtl::OUString*)0), 0, 0 },
@@ -739,9 +739,9 @@ SfxItemPropertyMap* ImplGetSvxCustomShapePropertyMap()
return aCustomShapePropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxMediaShapePropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxMediaShapePropertyMap()
{
- static SfxItemPropertyMap aMediaShapePropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aMediaShapePropertyMap_Impl[] =
{
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER, &::getCppuType((const sal_Int32*)0), 0, 0},
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID, &::getCppuType((const sal_Int16*)0), 0, 0},
@@ -768,9 +768,9 @@ SfxItemPropertyMap* ImplGetSvxMediaShapePropertyMap()
return aMediaShapePropertyMap_Impl;
}
-SfxItemPropertyMap* ImplGetSvxTableShapePropertyMap()
+SfxItemPropertyMapEntry* ImplGetSvxTableShapePropertyMap()
{
- static SfxItemPropertyMap aTableShapePropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aTableShapePropertyMap_Impl[] =
{
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER, &::getCppuType((const sal_Int32*)0), 0, 0},
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID, &::getCppuType((const sal_Int16*)0), 0, 0},
@@ -931,8 +931,8 @@ int
#endif
Svx_CompareMap(const void* pSmaller, const void* pBigger )
{
- int nDiff = strcmp( ((const SfxItemPropertyMap*)pSmaller)->pName,
- ((const SfxItemPropertyMap*)pBigger)->pName );
+ int nDiff = strcmp( ((const SfxItemPropertyMapEntry*)pSmaller)->pName,
+ ((const SfxItemPropertyMapEntry*)pBigger)->pName );
return nDiff;
}
@@ -940,22 +940,32 @@ Svx_CompareMap(const void* pSmaller, const void* pBigger )
SvxUnoPropertyMapProvider::SvxUnoPropertyMapProvider()
{
- for(UINT16 i=0;i<SVXMAP_END;aMapArr[i++]=NULL) ;
+ for(UINT16 i=0;i<SVXMAP_END; i++)
+ {
+ aSetArr[i] = 0;
+ aMapArr[i] = 0;
+ }
+}
+
+SvxUnoPropertyMapProvider::~SvxUnoPropertyMapProvider()
+{
+ for(UINT16 i=0;i<SVXMAP_END; i++)
+ delete aSetArr[i];
}
// ---------------------------------------------------------------------
-void SvxUnoPropertyMapProvider::Sort(USHORT nId)
+/*void SvxUnoPropertyMapProvider::Sort(USHORT nId)
{
- SfxItemPropertyMap* pTemp = aMapArr[nId];
+ SfxItemPropertyMapEntry* pTemp = aMapArr[nId];
UINT16 i = 0;
while(pTemp[i].pName) { i++; }
- qsort(aMapArr[nId], i, sizeof(SfxItemPropertyMap), Svx_CompareMap);
-}
+ qsort(aMapArr[nId], i, sizeof(SfxItemPropertyMapEntry), Svx_CompareMap);
+}*/
// ---------------------------------------------------------------------
-SfxItemPropertyMap* SvxUnoPropertyMapProvider::GetMap(UINT16 nPropertyId)
+const SfxItemPropertyMapEntry* SvxUnoPropertyMapProvider::GetMap(UINT16 nPropertyId)
{
DBG_ASSERT(nPropertyId < SVXMAP_END, "Id ?" );
if(!aMapArr[nPropertyId]) {
@@ -985,14 +995,21 @@ SfxItemPropertyMap* SvxUnoPropertyMapProvider::GetMap(UINT16 nPropertyId)
case SVXMAP_CUSTOMSHAPE: aMapArr[SVXMAP_CUSTOMSHAPE]=ImplGetSvxCustomShapePropertyMap(); break;
case SVXMAP_MEDIA: aMapArr[SVXMAP_MEDIA]=ImplGetSvxMediaShapePropertyMap(); break;
case SVXMAP_TABLE: aMapArr[SVXMAP_TABLE]=ImplGetSvxTableShapePropertyMap(); break;
+ case SVXMAP_PAGE: aMapArr[SVXMAP_PAGE] = ImplGetSvxPageShapePropertyMap(); break;
default:
DBG_ERROR( "Unknown property map for SvxUnoPropertyMapProvider!" );
}
- Sort(nPropertyId);
+// Sort(nPropertyId);
}
return aMapArr[nPropertyId];
}
+const SvxItemPropertySet* SvxUnoPropertyMapProvider::GetPropertySet(UINT16 nPropertyId)
+{
+ if( !aSetArr[nPropertyId] )
+ aSetArr[nPropertyId] = new SvxItemPropertySet( GetMap( nPropertyId ) );
+ return aSetArr[nPropertyId];
+}
// #####################################################################
@@ -1219,20 +1236,20 @@ bool SvxUnoGetResourceRanges( const short nWhich, int& nApiResIds, int& nIntResI
return TRUE;
}
-sal_Int16 SvxUnoGetWhichIdForNamedProperty( const ::rtl::OUString & rPropName )
+/*sal_Int16 SvxUnoGetWhichIdForNamedProperty( const ::rtl::OUString & rPropName )
{
sal_Int16 nWhich = 0;
- const SfxItemPropertyMap* pMap = aSvxMapProvider.GetMap( SVXMAP_SHAPE );
+ const SfxItemPropertyMapEntry* pMap = aSvxMapProvider.GetMap( SVXMAP_SHAPE );
if( pMap )
{
- const SfxItemPropertyMap* pFound = SfxItemPropertyMap::GetByName( pMap, rPropName );
+ const SfxItemPropertyMapEntry* pFound = SfxItemPropertyMapEntry::getByName( pMap, rPropName );
if( pFound )
nWhich = pFound->nWID;
}
return nWhich;
-}
+} */
bool SvxUnoConvertResourceString( int nSourceResIds, int nDestResIds, int nCount, String& rString ) throw()
{
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index 1b812fd25e..828c36bdc4 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -100,7 +100,7 @@ sal_Bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetSt
***********************************************************************/
SvxShapeGroup::SvxShapeGroup( SdrObject* pObj, SvxDrawPage* pDrawPage ) throw() :
- SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_GROUP) ),
+ SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_GROUP), aSvxMapProvider.GetPropertySet(SVXMAP_GROUP) ),
mxPage( pDrawPage )
{
}
@@ -383,7 +383,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapeGroup::getSupportedServiceNames()
***********************************************************************/
SvxShapeConnector::SvxShapeConnector( SdrObject* pObj ) throw() :
- SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CONNECTOR) )
+ SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CONNECTOR), aSvxMapProvider.GetPropertySet(SVXMAP_CONNECTOR) )
{
}
@@ -550,7 +550,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapeConnector::getSupportedServiceNames()
DBG_NAME(SvxShapeControl)
SvxShapeControl::SvxShapeControl( SdrObject* pObj ) throw() :
- SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CONTROL) )
+ SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CONTROL), aSvxMapProvider.GetPropertySet(SVXMAP_CONTROL) )
{
DBG_CTOR(SvxShapeControl,NULL);
setShapeKind( OBJ_UNO );
@@ -1013,7 +1013,7 @@ uno::Any SAL_CALL SvxShapeControl::getPropertyDefault( const ::rtl::OUString& aP
//----------------------------------------------------------------------
SvxShapeDimensioning::SvxShapeDimensioning( SdrObject* pObj ) throw()
-: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_DIMENSIONING) )
+: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_DIMENSIONING), aSvxMapProvider.GetPropertySet(SVXMAP_DIMENSIONING) )
{
}
@@ -1034,7 +1034,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapeDimensioning::getSupportedServiceName
//----------------------------------------------------------------------
SvxShapeCircle::SvxShapeCircle( SdrObject* pObj ) throw()
-: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CIRCLE) )
+: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CIRCLE), aSvxMapProvider.GetPropertySet(SVXMAP_CIRCLE) )
{
}
@@ -1059,7 +1059,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapeCircle::getSupportedServiceNames() th
//----------------------------------------------------------------------
SvxShapePolyPolygon::SvxShapePolyPolygon( SdrObject* pObj , drawing::PolygonKind eNew )
throw( com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException)
-: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_POLYPOLYGON) )
+: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_POLYPOLYGON), aSvxMapProvider.GetPropertySet(SVXMAP_POLYPOLYGON) )
, mePolygonKind( eNew )
{
}
@@ -1103,7 +1103,7 @@ basegfx::B2DPolyPolygon SAL_CALL ImplSvxPointSequenceSequenceToB2DPolyPolygon( c
//----------------------------------------------------------------------
-bool SvxShapePolyPolygon::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxShapePolyPolygon::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -1163,7 +1163,7 @@ bool SvxShapePolyPolygon::setPropertyValueImpl( const SfxItemPropertyMap* pPrope
break;
}
default:
- return SvxShapeText::setPropertyValueImpl( pProperty, rValue );
+ return SvxShapeText::setPropertyValueImpl( rName, pProperty, rValue );
}
throw lang::IllegalArgumentException();
@@ -1213,7 +1213,7 @@ void SAL_CALL B2DPolyPolygonToSvxPointSequenceSequence( const basegfx::B2DPolyPo
//----------------------------------------------------------------------
-bool SvxShapePolyPolygon::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxShapePolyPolygon::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -1277,7 +1277,7 @@ bool SvxShapePolyPolygon::getPropertyValueImpl( const SfxItemPropertyMap* pPrope
break;
}
default:
- return SvxShapeText::getPropertyValueImpl( pProperty, rValue );
+ return SvxShapeText::getPropertyValueImpl( rName, pProperty, rValue );
}
return true;
@@ -1326,7 +1326,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapePolyPolygon::getSupportedServiceNames
#include <com/sun/star/drawing/FlagSequence.hpp>
//----------------------------------------------------------------------
SvxShapePolyPolygonBezier::SvxShapePolyPolygonBezier( SdrObject* pObj , drawing::PolygonKind eNew ) throw()
-: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_POLYPOLYGONBEZIER) )
+: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_POLYPOLYGONBEZIER), aSvxMapProvider.GetPropertySet(SVXMAP_POLYPOLYGONBEZIER) )
, mePolygonKind( eNew )
{
}
@@ -1464,7 +1464,7 @@ basegfx::B2DPolyPolygon SvxConvertPolyPolygonBezierToB2DPolyPolygon(const drawin
//----------------------------------------------------------------------
-bool SvxShapePolyPolygonBezier::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxShapePolyPolygonBezier::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -1496,7 +1496,7 @@ bool SvxShapePolyPolygonBezier::setPropertyValueImpl( const SfxItemPropertyMap*
break;
}
default:
- return SvxShapeText::setPropertyValueImpl( pProperty, rValue );
+ return SvxShapeText::setPropertyValueImpl( rName, pProperty, rValue );
}
throw IllegalArgumentException();
@@ -1542,7 +1542,7 @@ void SvxConvertB2DPolyPolygonToPolyPolygonBezier( const basegfx::B2DPolyPolygon&
//----------------------------------------------------------------------
-bool SvxShapePolyPolygonBezier::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxShapePolyPolygonBezier::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -1574,7 +1574,7 @@ bool SvxShapePolyPolygonBezier::getPropertyValueImpl( const SfxItemPropertyMap*
break;
}
default:
- return SvxShapeText::getPropertyValueImpl( pProperty, rValue );
+ return SvxShapeText::getPropertyValueImpl( rName, pProperty, rValue );
}
return true;
}
@@ -1634,7 +1634,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapePolyPolygonBezier::getSupportedServic
//----------------------------------------------------------------------
SvxGraphicObject::SvxGraphicObject( SdrObject* pObj ) throw()
-: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_GRAPHICOBJECT) )
+: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_GRAPHICOBJECT), aSvxMapProvider.GetPropertySet(SVXMAP_GRAPHICOBJECT) )
{
}
@@ -1645,7 +1645,7 @@ SvxGraphicObject::~SvxGraphicObject() throw()
//----------------------------------------------------------------------
-bool SvxGraphicObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxGraphicObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
bool bOk = false;
switch( pProperty->nWID )
@@ -1786,7 +1786,7 @@ bool SvxGraphicObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty
break;
}
default:
- return SvxShapeText::setPropertyValueImpl( pProperty, rValue );
+ return SvxShapeText::setPropertyValueImpl( rName, pProperty, rValue );
}
if( !bOk )
@@ -1800,7 +1800,7 @@ bool SvxGraphicObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty
//----------------------------------------------------------------------
-bool SvxGraphicObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxGraphicObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -1862,7 +1862,7 @@ bool SvxGraphicObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty
break;
}
default:
- return SvxShapeText::getPropertyValueImpl(pProperty,rValue);
+ return SvxShapeText::getPropertyValueImpl(rName, pProperty,rValue);
}
return true;
@@ -1871,7 +1871,7 @@ bool SvxGraphicObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty
///////////////////////////////////////////////////////////////////////
SvxShapeCaption::SvxShapeCaption( SdrObject* pObj ) throw()
-: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CAPTION) )
+: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_CAPTION), aSvxMapProvider.GetPropertySet(SVXMAP_CAPTION) )
{
}
@@ -1884,7 +1884,7 @@ SvxShapeCaption::~SvxShapeCaption() throw()
***********************************************************************/
SvxCustomShape::SvxCustomShape( SdrObject* pObj ) throw() :
- SvxShapeText( pObj, aSvxMapProvider.GetMap( SVXMAP_CUSTOMSHAPE ) )
+ SvxShapeText( pObj, aSvxMapProvider.GetMap( SVXMAP_CUSTOMSHAPE ), aSvxMapProvider.GetPropertySet(SVXMAP_CUSTOMSHAPE) )
{
}
@@ -2125,7 +2125,7 @@ void SAL_CALL SvxCustomShape::setPropertyValue( const OUString& aPropertyName, c
}
}
-bool SvxCustomShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxCustomShape::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -2137,7 +2137,7 @@ bool SvxCustomShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty,
return true;
}
default:
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
}
//----------------------------------------------------------------------
diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx
index cefb0054b4..f2b588657a 100644
--- a/svx/source/unodraw/unoshap3.cxx
+++ b/svx/source/unodraw/unoshap3.cxx
@@ -81,7 +81,7 @@ using namespace ::com::sun::star::container;
//----------------------------------------------------------------------
Svx3DSceneObject::Svx3DSceneObject( SdrObject* pObj, SvxDrawPage* pDrawPage ) throw()
-: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DSCENEOBJECT) )
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DSCENEOBJECT), aSvxMapProvider.GetPropertySet(SVXMAP_3DSCENEOBJECT) )
, mxPage( pDrawPage )
{
}
@@ -334,7 +334,7 @@ struct ImpRememberTransAndRect
Rectangle maRect;
};
-bool Svx3DSceneObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DSceneObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -438,7 +438,7 @@ bool Svx3DSceneObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty
break;
}
default:
- return SvxShape::setPropertyValueImpl(pProperty, rValue);
+ return SvxShape::setPropertyValueImpl(rName, pProperty, rValue);
}
throw IllegalArgumentException();
@@ -446,7 +446,7 @@ bool Svx3DSceneObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty
//----------------------------------------------------------------------
-bool Svx3DSceneObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DSceneObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -483,7 +483,7 @@ bool Svx3DSceneObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty
break;
}
default:
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
return true;
@@ -504,7 +504,7 @@ uno::Sequence< OUString > SAL_CALL Svx3DSceneObject::getSupportedServiceNames()
//----------------------------------------------------------------------
Svx3DCubeObject::Svx3DCubeObject( SdrObject* pObj ) throw()
-: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DCUBEOBJEKT) )
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DCUBEOBJEKT), aSvxMapProvider.GetPropertySet(SVXMAP_3DCUBEOBJEKT) )
{
}
@@ -514,7 +514,7 @@ Svx3DCubeObject::~Svx3DCubeObject() throw()
}
//----------------------------------------------------------------------
-bool Svx3DCubeObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DCubeObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
OGuard aGuard( Application::GetSolarMutex() );
@@ -563,7 +563,7 @@ bool Svx3DCubeObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty,
break;
}
default:
- return SvxShape::setPropertyValueImpl( pProperty, rValue );
+ return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
}
throw IllegalArgumentException();
@@ -571,7 +571,7 @@ bool Svx3DCubeObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty,
//----------------------------------------------------------------------
-bool Svx3DCubeObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DCubeObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -613,7 +613,7 @@ bool Svx3DCubeObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty,
break;
}
default:
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
return true;
@@ -635,7 +635,7 @@ uno::Sequence< OUString > SAL_CALL Svx3DCubeObject::getSupportedServiceNames()
//----------------------------------------------------------------------
Svx3DSphereObject::Svx3DSphereObject( SdrObject* pObj ) throw()
-: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DSPHEREOBJECT) )
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DSPHEREOBJECT), aSvxMapProvider.GetPropertySet(SVXMAP_3DSPHEREOBJECT) )
{
}
@@ -646,7 +646,7 @@ Svx3DSphereObject::~Svx3DSphereObject() throw()
//----------------------------------------------------------------------
-bool Svx3DSphereObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DSphereObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -684,7 +684,7 @@ bool Svx3DSphereObject::setPropertyValueImpl( const SfxItemPropertyMap* pPropert
break;
}
default:
- return SvxShape::setPropertyValueImpl( pProperty, rValue );
+ return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
}
throw IllegalArgumentException();
@@ -692,7 +692,7 @@ bool Svx3DSphereObject::setPropertyValueImpl( const SfxItemPropertyMap* pPropert
//----------------------------------------------------------------------
-bool Svx3DSphereObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DSphereObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -729,7 +729,7 @@ bool Svx3DSphereObject::getPropertyValueImpl( const SfxItemPropertyMap* pPropert
break;
}
default:
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
return true;
@@ -751,7 +751,7 @@ uno::Sequence< OUString > SAL_CALL Svx3DSphereObject::getSupportedServiceNames()
//----------------------------------------------------------------------
Svx3DLatheObject::Svx3DLatheObject( SdrObject* pObj ) throw()
-: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DLATHEOBJECT) )
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DLATHEOBJECT), aSvxMapProvider.GetPropertySet(SVXMAP_3DLATHEOBJECT) )
{
}
@@ -840,7 +840,7 @@ static void B3dPolyPolygon_to_PolyPolygonShape3D( const basegfx::B3DPolyPolygon&
//----------------------------------------------------------------------
-bool Svx3DLatheObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DLatheObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -878,14 +878,14 @@ bool Svx3DLatheObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty
break;
}
default:
- return SvxShape::setPropertyValueImpl( pProperty, rValue );
+ return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
}
throw IllegalArgumentException();
}
//----------------------------------------------------------------------
-bool Svx3DLatheObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DLatheObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -925,7 +925,7 @@ bool Svx3DLatheObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty
break;
}
default:
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
return true;
@@ -946,7 +946,7 @@ uno::Sequence< OUString > SAL_CALL Svx3DLatheObject::getSupportedServiceNames()
***********************************************************************/
Svx3DExtrudeObject::Svx3DExtrudeObject( SdrObject* pObj ) throw()
-: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DEXTRUDEOBJECT) )
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DEXTRUDEOBJECT), aSvxMapProvider.GetPropertySet(SVXMAP_3DEXTRUDEOBJECT) )
{
}
@@ -957,7 +957,7 @@ Svx3DExtrudeObject::~Svx3DExtrudeObject() throw()
//----------------------------------------------------------------------
-bool Svx3DExtrudeObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DExtrudeObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -984,7 +984,7 @@ bool Svx3DExtrudeObject::setPropertyValueImpl( const SfxItemPropertyMap* pProper
break;
}
default:
- return SvxShape::setPropertyValueImpl( pProperty, rValue );
+ return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
}
throw IllegalArgumentException();
@@ -992,7 +992,7 @@ bool Svx3DExtrudeObject::setPropertyValueImpl( const SfxItemPropertyMap* pProper
//----------------------------------------------------------------------
-bool Svx3DExtrudeObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DExtrudeObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -1034,7 +1034,7 @@ bool Svx3DExtrudeObject::getPropertyValueImpl( const SfxItemPropertyMap* pProper
break;
}
default:
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
return true;
@@ -1056,7 +1056,7 @@ uno::Sequence< OUString > SAL_CALL Svx3DExtrudeObject::getSupportedServiceNames(
//----------------------------------------------------------------------
Svx3DPolygonObject::Svx3DPolygonObject( SdrObject* pObj ) throw()
-: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DPOLYGONOBJECT) )
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_3DPOLYGONOBJECT), aSvxMapProvider.GetPropertySet(SVXMAP_3DPOLYGONOBJECT) )
{
}
@@ -1066,7 +1066,7 @@ Svx3DPolygonObject::~Svx3DPolygonObject() throw()
}
//----------------------------------------------------------------------
-bool Svx3DPolygonObject::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DPolygonObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -1127,14 +1127,14 @@ bool Svx3DPolygonObject::setPropertyValueImpl( const SfxItemPropertyMap* pProper
break;
}
default:
- return SvxShape::setPropertyValueImpl( pProperty, rValue );
+ return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
}
throw IllegalArgumentException();
}
//----------------------------------------------------------------------
-bool Svx3DPolygonObject::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool Svx3DPolygonObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -1173,7 +1173,7 @@ bool Svx3DPolygonObject::getPropertyValueImpl( const SfxItemPropertyMap* pProper
}
default:
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
return true;
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 2ae0ed2973..189e0cb040 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -87,12 +87,12 @@ using namespace ::com::sun::star::beans;
///////////////////////////////////////////////////////////////////////
SvxOle2Shape::SvxOle2Shape( SdrObject* pObject ) throw()
-: SvxShape( pObject, aSvxMapProvider.GetMap(SVXMAP_OLE2) )
+: SvxShape( pObject, aSvxMapProvider.GetMap(SVXMAP_OLE2), aSvxMapProvider.GetPropertySet(SVXMAP_OLE2) )
{
}
-SvxOle2Shape::SvxOle2Shape( SdrObject* pObject, const SfxItemPropertyMap* pPropertySet ) throw ()
-: SvxShape( pObject, pPropertySet )
+SvxOle2Shape::SvxOle2Shape( SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet ) throw ()
+: SvxShape( pObject, pPropertyMap, pPropertySet )
{
}
@@ -106,7 +106,7 @@ SvxOle2Shape::~SvxOle2Shape() throw()
}
//XPropertySet
-bool SvxOle2Shape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxOle2Shape::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -255,13 +255,13 @@ bool SvxOle2Shape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, co
break;
}
default:
- return SvxShape::setPropertyValueImpl( pProperty, rValue );
+ return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
}
throw IllegalArgumentException();
}
-bool SvxOle2Shape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxOle2Shape::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -450,7 +450,7 @@ bool SvxOle2Shape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::
break;
}
default:
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
return true;
@@ -630,7 +630,7 @@ const SvGlobalName SvxOle2Shape::GetClassName_Impl(rtl::OUString& rHexCLSID)
///////////////////////////////////////////////////////////////////////
SvxAppletShape::SvxAppletShape( SdrObject* pObject ) throw()
-: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_APPLET) )
+: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_APPLET), aSvxMapProvider.GetPropertySet(SVXMAP_APPLET) )
{
SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.AppletShape" ) ) );
}
@@ -659,7 +659,7 @@ void SAL_CALL SvxAppletShape::setPropertyValues( const ::com::sun::star::uno::Se
resetModifiedState();
}
-bool SvxAppletShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxAppletShape::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
if( (pProperty->nWID >= OWN_ATTR_APPLET_DOCBASE) && (pProperty->nWID <= OWN_ATTR_APPLET_ISSCRIPT) )
{
@@ -669,18 +669,18 @@ bool SvxAppletShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty,
if( xSet.is() )
{
// allow exceptions to pass through
- xSet->setPropertyValue( OUString::createFromAscii( pProperty->pName ), rValue );
+ xSet->setPropertyValue( rName, rValue );
}
}
return true;
}
else
{
- return SvxOle2Shape::setPropertyValueImpl( pProperty, rValue );
+ return SvxOle2Shape::setPropertyValueImpl( rName, pProperty, rValue );
}
}
-bool SvxAppletShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxAppletShape::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
if( (pProperty->nWID >= OWN_ATTR_APPLET_DOCBASE) && (pProperty->nWID <= OWN_ATTR_APPLET_ISSCRIPT) )
{
@@ -689,21 +689,21 @@ bool SvxAppletShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty,
uno::Reference < beans::XPropertySet > xSet( static_cast<SdrOle2Obj*>(mpObj.get())->GetObjRef()->getComponent(), uno::UNO_QUERY );
if( xSet.is() )
{
- rValue = xSet->getPropertyValue( OUString::createFromAscii( pProperty->pName ) );
+ rValue = xSet->getPropertyValue( rName );
}
}
return true;
}
else
{
- return SvxOle2Shape::getPropertyValueImpl( pProperty, rValue );
+ return SvxOle2Shape::getPropertyValueImpl( rName, pProperty, rValue );
}
}
///////////////////////////////////////////////////////////////////////
SvxPluginShape::SvxPluginShape( SdrObject* pObject ) throw()
-: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_PLUGIN) )
+: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_PLUGIN), aSvxMapProvider.GetPropertySet(SVXMAP_PLUGIN) )
{
SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.PluginShape" ) ) );
}
@@ -732,7 +732,7 @@ void SAL_CALL SvxPluginShape::setPropertyValues( const ::com::sun::star::uno::Se
resetModifiedState();
}
-bool SvxPluginShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxPluginShape::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
if( (pProperty->nWID >= OWN_ATTR_PLUGIN_MIMETYPE) && (pProperty->nWID <= OWN_ATTR_PLUGIN_COMMANDS) )
{
@@ -742,18 +742,18 @@ bool SvxPluginShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty,
if( xSet.is() )
{
// allow exceptions to pass through
- xSet->setPropertyValue( OUString::createFromAscii( pProperty->pName ), rValue );
+ xSet->setPropertyValue( rName, rValue );
}
}
return true;
}
else
{
- return SvxOle2Shape::setPropertyValueImpl( pProperty, rValue );
+ return SvxOle2Shape::setPropertyValueImpl( rName, pProperty, rValue );
}
}
-bool SvxPluginShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxPluginShape::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
if( (pProperty->nWID >= OWN_ATTR_PLUGIN_MIMETYPE) && (pProperty->nWID <= OWN_ATTR_PLUGIN_COMMANDS) )
{
@@ -762,21 +762,21 @@ bool SvxPluginShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty,
uno::Reference < beans::XPropertySet > xSet( static_cast<SdrOle2Obj*>(mpObj.get())->GetObjRef()->getComponent(), uno::UNO_QUERY );
if( xSet.is() )
{
- rValue <<= xSet->getPropertyValue( OUString::createFromAscii( pProperty->pName ) );
+ rValue <<= xSet->getPropertyValue( rName );
}
}
return true;
}
else
{
- return SvxOle2Shape::getPropertyValueImpl( pProperty, rValue );
+ return SvxOle2Shape::getPropertyValueImpl( rName, pProperty, rValue );
}
}
///////////////////////////////////////////////////////////////////////
SvxFrameShape::SvxFrameShape( SdrObject* pObject ) throw()
-: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_FRAME) )
+: SvxOle2Shape( pObject, aSvxMapProvider.GetMap(SVXMAP_FRAME), aSvxMapProvider.GetPropertySet(SVXMAP_FRAME) )
{
SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.FrameShape" ) ) );
}
@@ -805,7 +805,7 @@ void SAL_CALL SvxFrameShape::setPropertyValues( const ::com::sun::star::uno::Seq
resetModifiedState();
}
-bool SvxFrameShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxFrameShape::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
if( (pProperty->nWID >= OWN_ATTR_FRAME_URL) && (pProperty->nWID <= OWN_ATTR_FRAME_MARGIN_HEIGHT) )
{
@@ -815,18 +815,18 @@ bool SvxFrameShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, c
if( xSet.is() )
{
// allow exceptions to pass through
- xSet->setPropertyValue( OUString::createFromAscii( pProperty->pName ), rValue );
+ xSet->setPropertyValue( rName, rValue );
}
}
return true;
}
else
{
- return SvxOle2Shape::setPropertyValueImpl( pProperty, rValue );
+ return SvxOle2Shape::setPropertyValueImpl( rName, pProperty, rValue );
}
}
-bool SvxFrameShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxFrameShape::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
if( (pProperty->nWID >= OWN_ATTR_FRAME_URL) && (pProperty->nWID <= OWN_ATTR_FRAME_MARGIN_HEIGHT) )
{
@@ -835,14 +835,14 @@ bool SvxFrameShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, :
uno::Reference < beans::XPropertySet > xSet( static_cast<SdrOle2Obj*>(mpObj.get())->GetObjRef()->getComponent(), uno::UNO_QUERY );
if( xSet.is() )
{
- rValue <<= xSet->getPropertyValue( OUString::createFromAscii( pProperty->pName ) );
+ rValue <<= xSet->getPropertyValue( rName );
}
}
return true;
}
else
{
- return SvxOle2Shape::getPropertyValueImpl( pProperty, rValue );
+ return SvxOle2Shape::getPropertyValueImpl( rName, pProperty, rValue );
}
}
@@ -851,7 +851,7 @@ bool SvxFrameShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, :
***********************************************************************/
SvxMediaShape::SvxMediaShape( SdrObject* pObj ) throw()
-: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_MEDIA) )
+: SvxShape( pObj, aSvxMapProvider.GetMap(SVXMAP_MEDIA), aSvxMapProvider.GetPropertySet(SVXMAP_MEDIA) )
{
SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.MediaShape" ) ) );
}
@@ -863,7 +863,7 @@ SvxMediaShape::~SvxMediaShape() throw()
//----------------------------------------------------------------------
-bool SvxMediaShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxMediaShape::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
if( (pProperty->nWID >= OWN_ATTR_MEDIA_URL) && (pProperty->nWID <= OWN_ATTR_MEDIA_ZOOM) )
{
@@ -944,7 +944,7 @@ bool SvxMediaShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, c
}
else
{
- return SvxShape::setPropertyValueImpl( pProperty, rValue );
+ return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
}
throw IllegalArgumentException();
@@ -952,7 +952,7 @@ bool SvxMediaShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, c
//----------------------------------------------------------------------
-bool SvxMediaShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxMediaShape::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
if( ( pProperty->nWID >= OWN_ATTR_MEDIA_URL ) && ( pProperty->nWID <= OWN_ATTR_MEDIA_ZOOM ) )
{
@@ -988,6 +988,6 @@ bool SvxMediaShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, :
}
else
{
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
}
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index edf2f81559..ee748d8514 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -121,10 +121,10 @@ using namespace ::com::sun::star::container;
if( rType == ::getCppuType((const uno::Reference< xint >*)0) ) \
aAny <<= uno::Reference< xint >(this)
-const SfxItemPropertyMap* ImplGetSvxUnoOutlinerTextCursorPropertyMap()
+const SfxItemPropertyMapEntry* ImplGetSvxUnoOutlinerTextCursorPropertyMap()
{
// Propertymap fuer einen Outliner Text
- static const SfxItemPropertyMap aSvxUnoOutlinerTextCursorPropertyMap[] =
+ static const SfxItemPropertyMapEntry aSvxUnoOutlinerTextCursorPropertyMap[] =
{
SVX_UNOEDIT_CHAR_PROPERTIES,
SVX_UNOEDIT_FONT_PROPERTIES,
@@ -137,24 +137,15 @@ const SfxItemPropertyMap* ImplGetSvxUnoOutlinerTextCursorPropertyMap()
return aSvxUnoOutlinerTextCursorPropertyMap;
}
-
-const SfxItemPropertyMap* ImplGetSvxTextPortionPropertyMap()
+const SfxItemPropertySet* ImplGetSvxUnoOutlinerTextCursorSfxPropertySet()
{
- // Propertymap fuer einen Outliner Text
- static const SfxItemPropertyMap aSvxTextPortionPropertyMap[] =
- {
- SVX_UNOEDIT_CHAR_PROPERTIES,
- SVX_UNOEDIT_FONT_PROPERTIES,
- SVX_UNOEDIT_OUTLINER_PROPERTIES,
- SVX_UNOEDIT_PARA_PROPERTIES,
- {MAP_CHAR_LEN("TextField"), EE_FEATURE_FIELD, &::getCppuType((const uno::Reference< text::XTextField >*)0), beans::PropertyAttribute::READONLY, 0 },
- {MAP_CHAR_LEN("TextPortionType"), WID_PORTIONTYPE, &::getCppuType((const ::rtl::OUString*)0), beans::PropertyAttribute::READONLY, 0 },
- {MAP_CHAR_LEN("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
- {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
- {0,0,0,0,0,0}
- };
-
- return aSvxTextPortionPropertyMap;
+ static SfxItemPropertySet aTextCursorSfxPropertySet( ImplGetSvxUnoOutlinerTextCursorPropertyMap() );
+ return &aTextCursorSfxPropertySet;
+}
+const SvxItemPropertySet* ImplGetSvxUnoOutlinerTextCursorSvxPropertySet()
+{
+ static SvxItemPropertySet aTextCursorSvxPropertySet( ImplGetSvxUnoOutlinerTextCursorPropertyMap() );
+ return &aTextCursorSvxPropertySet;
}
class GDIMetaFile;
@@ -189,7 +180,8 @@ SvxShape::SvxShape( SdrObject* pObject ) throw()
: maSize(100,100)
, mpImpl(NULL)
, mbIsMultiPropertyCall(false)
-, maPropSet(aSvxMapProvider.GetMap(SVXMAP_SHAPE))
+, mpPropSet(aSvxMapProvider.GetPropertySet(SVXMAP_SHAPE))
+, maPropMapEntries(aSvxMapProvider.GetMap(SVXMAP_SHAPE))
, maDisposeListeners( maMutex )
, mbDisposing( false )
, mpObj(pObject)
@@ -201,11 +193,12 @@ SvxShape::SvxShape( SdrObject* pObject ) throw()
}
//----------------------------------------------------------------------
-SvxShape::SvxShape( SdrObject* pObject, const SfxItemPropertyMap* pPropertyMap ) throw()
+SvxShape::SvxShape( SdrObject* pObject, const SfxItemPropertyMapEntry* pEntries, const SvxItemPropertySet* pPropertySet ) throw()
: maSize(100,100)
, mpImpl(NULL)
, mbIsMultiPropertyCall(false)
-, maPropSet(pPropertyMap)
+, mpPropSet(pPropertySet)
+, maPropMapEntries(pEntries)
, maDisposeListeners( maMutex )
, mbDisposing( false )
, mpObj(pObject)
@@ -221,7 +214,8 @@ SvxShape::SvxShape() throw()
: maSize(100,100)
, mpImpl(NULL)
, mbIsMultiPropertyCall(false)
-, maPropSet(aSvxMapProvider.GetMap(SVXMAP_SHAPE))
+, mpPropSet(aSvxMapProvider.GetPropertySet(SVXMAP_SHAPE))
+, maPropMapEntries(aSvxMapProvider.GetMap(SVXMAP_SHAPE))
, maDisposeListeners( maMutex )
, mbDisposing( false )
, mpObj(NULL)
@@ -467,7 +461,7 @@ void SvxShape::Create( SdrObject* pNewObj, SvxDrawPage* /*pNewPage*/ ) throw()
Init();
- ObtainSettingsFromPropertySet( maPropSet );
+ ObtainSettingsFromPropertySet( *mpPropSet );
// save user call
SdrObjUserCall* pUser = mpObj->GetUserCall();
@@ -551,37 +545,6 @@ void SvxShape::ForceMetricToItemPoolMetric(Pair& rPoint) const throw()
}
//----------------------------------------------------------------------
-// --> OD 2009-01-16 #i59051#
-void SvxShape::ForceMetricToItemPoolMetric(basegfx::B2DPolyPolygon& rPolyPolygon) const throw()
-{
- DBG_TESTSOLARMUTEX();
- if(mpModel)
- {
- SfxMapUnit eMapUnit = mpModel->GetItemPool().GetMetric(0);
- if(eMapUnit != SFX_MAPUNIT_100TH_MM)
- {
- switch(eMapUnit)
- {
- case SFX_MAPUNIT_TWIP :
- {
- basegfx::B2DHomMatrix aTransform;
- const double fMMToTWIPS(72.0 / 127.0);
-
- aTransform.scale(fMMToTWIPS, fMMToTWIPS);
- rPolyPolygon.transform(aTransform);
- break;
- }
- default:
- {
- DBG_ERROR("Missing unit translation to PoolMetric!");
- }
- }
- }
- }
-}
-// <--
-
-//----------------------------------------------------------------------
void SvxShape::ForceMetricTo100th_mm(Pair& rPoint) const throw()
{
DBG_TESTSOLARMUTEX();
@@ -609,45 +572,14 @@ void SvxShape::ForceMetricTo100th_mm(Pair& rPoint) const throw()
}
//----------------------------------------------------------------------
-// --> OD 2009-01-16 #i59051#
-void SvxShape::ForceMetricTo100th_mm(basegfx::B2DPolyPolygon& rPolyPolygon) const throw()
-{
- DBG_TESTSOLARMUTEX();
- SfxMapUnit eMapUnit = SFX_MAPUNIT_100TH_MM;
- if(mpModel)
- {
- eMapUnit = mpModel->GetItemPool().GetMetric(0);
- if(eMapUnit != SFX_MAPUNIT_100TH_MM)
- {
- switch(eMapUnit)
- {
- case SFX_MAPUNIT_TWIP :
- {
- basegfx::B2DHomMatrix aTransform;
- const double fTWIPSToMM(127.0 / 72.0);
-
- aTransform.scale(fTWIPSToMM, fTWIPSToMM);
- rPolyPolygon.transform(aTransform);
- break;
- }
- default:
- {
- DBG_ERROR("Missing unit translation to 100th mm!");
- }
- }
- }
- }
-}
-// <--
-//----------------------------------------------------------------------
-void SvxShape::ObtainSettingsFromPropertySet(SvxItemPropertySet& rPropSet) throw()
+void SvxShape::ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet) throw()
{
DBG_TESTSOLARMUTEX();
if(mpObj.is() && rPropSet.AreThereOwnUsrAnys() && mpModel)
{
SfxItemSet aSet( mpModel->GetItemPool(), SDRATTR_START, SDRATTR_END, 0);
Reference< beans::XPropertySet > xShape( (OWeakObject*)this, UNO_QUERY );
- maPropSet.ObtainSettingsFromPropertySet(rPropSet, aSet, xShape);
+ mpPropSet->ObtainSettingsFromPropertySet(rPropSet, aSet, xShape);
mpObj->SetMergedItemSetAndBroadcast(aSet);
@@ -1426,7 +1358,7 @@ Reference< beans::XPropertySetInfo > SAL_CALL
Reference< beans::XPropertySetInfo > SAL_CALL
SvxShape::_getPropertySetInfo() throw(uno::RuntimeException)
{
- return maPropSet.getPropertySetInfo();
+ return mpPropSet->getPropertySetInfo();
}
//----------------------------------------------------------------------
@@ -1656,7 +1588,8 @@ sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rN
//----------------------------------------------------------------------
// static
-uno::Any SAL_CALL SvxShape::GetFillAttributeByName(
+/* os: unused function
+ uno::Any SAL_CALL SvxShape::GetFillAttributeByName(
const ::rtl::OUString& rPropertyName, const ::rtl::OUString& rName, SdrModel* pModel )
{
uno::Any aResult;
@@ -1837,7 +1770,7 @@ uno::Any SAL_CALL SvxShape::GetFillAttributeByName(
}
return aResult;
-}
+} */
//----------------------------------------------------------------------
@@ -1859,7 +1792,7 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const
{
OGuard aGuard( Application::GetSolarMutex() );
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(rPropertyName);
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(rPropertyName);
if( mpObj.is() && mpModel )
{
@@ -1871,7 +1804,7 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const
mpModel->SetChanged();
- if(!setPropertyValueImpl( pMap, rVal ) )
+ if(!setPropertyValueImpl( rPropertyName, pMap, rVal ) )
{
DBG_ASSERT( pMap->nWID == SDRATTR_TEXTDIRECTION || pMap->nWID < SDRATTR_NOTPERSIST_FIRST || pMap->nWID > SDRATTR_NOTPERSIST_LAST, "Not persist item not handled!" );
DBG_ASSERT( pMap->nWID < OWN_ATTR_VALUE_START || pMap->nWID > OWN_ATTR_VALUE_END, "Not item property not handled!" );
@@ -1925,7 +1858,7 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const
if( pSet->GetItemState( pMap->nWID ) == SFX_ITEM_SET )
{
- maPropSet.setPropertyValue( pMap, rVal, *pSet );
+ mpPropSet->setPropertyValue( pMap, rVal, *pSet );
}
}
@@ -1963,7 +1896,7 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const
// that support additional properties that we don't
// know here we silently store *all* properties, even
// if they may be not supported after creation
- maPropSet.setPropertyValue( pMap, rVal );
+ mpPropSet->setPropertyValue( pMap, rVal );
}
}
@@ -1985,7 +1918,7 @@ uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName )
{
OGuard aGuard( Application::GetSolarMutex() );
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName);
uno::Any aAny;
if( mpObj.is() && mpModel )
@@ -1993,7 +1926,7 @@ uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName )
if(pMap == NULL )
throw beans::UnknownPropertyException();
- if( !getPropertyValueImpl( pMap, aAny ) )
+ if( !getPropertyValueImpl( PropertyName, pMap, aAny ) )
{
DBG_ASSERT( pMap->nWID == SDRATTR_TEXTDIRECTION || (pMap->nWID < SDRATTR_NOTPERSIST_FIRST || pMap->nWID > SDRATTR_NOTPERSIST_LAST), "Not persist item not handled!" );
DBG_ASSERT( pMap->nWID < OWN_ATTR_VALUE_START || pMap->nWID > OWN_ATTR_VALUE_END, "Not item property not handled!" );
@@ -2031,7 +1964,7 @@ uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName )
if(pMap && pMap->nWID)
// FixMe: see setPropertyValue
- aAny = maPropSet.getPropertyValue( pMap );
+ aAny = mpPropSet->getPropertyValue( pMap );
}
return aAny;
@@ -2170,7 +2103,7 @@ void SAL_CALL SvxShape::firePropertiesChangeEvent( const ::com::sun::star::uno::
//----------------------------------------------------------------------
-uno::Any SvxShape::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertyMap* pMap ) const
+uno::Any SvxShape::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleEntry* pMap ) const
{
DBG_TESTSOLARMUTEX();
uno::Any aAny;
@@ -2226,7 +2159,7 @@ uno::Any SvxShape::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertyMap* pM
default:
{
// Hole Wert aus ItemSet
- aAny = maPropSet.getPropertyValue( pMap, aSet );
+ aAny = mpPropSet->getPropertyValue( pMap, aSet );
if( *pMap->pType != aAny.getValueType() )
{
@@ -2270,7 +2203,7 @@ beans::PropertyState SAL_CALL SvxShape::_getPropertyState( const OUString& Prope
{
OGuard aGuard( Application::GetSolarMutex() );
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName);
if( !mpObj.is() || pMap == NULL )
throw beans::UnknownPropertyException();
@@ -2338,7 +2271,7 @@ beans::PropertyState SAL_CALL SvxShape::_getPropertyState( const OUString& Prope
//----------------------------------------------------------------------
-bool SvxShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxShape::setPropertyValueImpl( const ::rtl::OUString&, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -2482,15 +2415,10 @@ bool SvxShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const
if( rValue >>= aUnoPoint )
{
Point aPoint( aUnoPoint.X, aUnoPoint.Y );
- // --> OD 2009-01-16 #i59051#
- // perform metric change before applying anchor position,
- // because the anchor position is in pool metric.
- ForceMetricToItemPoolMetric( aPoint );
- // <--
if( mpModel->IsWriter() )
aPoint += mpObj->GetAnchorPos();
-// ForceMetricToItemPoolMetric( aPoint );
+ ForceMetricToItemPoolMetric( aPoint );
pEdgeObj->SetTailPoint( pProperty->nWID == OWN_ATTR_EDGE_START_POS, aPoint );
return true;
}
@@ -2514,9 +2442,6 @@ bool SvxShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const
if ( rValue >>= aPolyPoly )
{
basegfx::B2DPolyPolygon aNewPolyPolygon( SvxConvertPolyPolygonBezierToB2DPolyPolygon( &aPolyPoly ) );
- // --> OD 2009-01-16 #i59051#
- ForceMetricToItemPoolMetric( aNewPolyPolygon );
- // <--
if( mpModel->IsWriter() )
{
Point aPoint( mpObj->GetAnchorPos() );
@@ -2541,9 +2466,6 @@ bool SvxShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const
if(pMeasureObj && ( rValue >>= aUnoPoint ) )
{
Point aPoint( aUnoPoint.X, aUnoPoint.Y );
- // --> OD 2009-01-12 #i59051#
- ForceMetricToItemPoolMetric( aPoint );
- // <--
if( mpModel->IsWriter() )
aPoint += mpObj->GetAnchorPos();
@@ -2760,7 +2682,7 @@ bool SvxShape::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const
//----------------------------------------------------------------------
-bool SvxShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxShape::getPropertyValueImpl( const ::rtl::OUString&, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -2788,7 +2710,7 @@ bool SvxShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com:
basegfx::B2DPolyPolygon aNewPolyPolygon;
basegfx::B2DHomMatrix aNewHomogenMatrix;
mpObj->TRGetBaseGeometry(aNewHomogenMatrix, aNewPolyPolygon);
-
+
aVclPoint.X() -= basegfx::fround(aNewHomogenMatrix.get(0, 2));
aVclPoint.Y() -= basegfx::fround(aNewHomogenMatrix.get(1, 2));
@@ -2964,9 +2886,6 @@ bool SvxShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com:
aMatrix.translate( -aPoint.X(), -aPoint.Y() );
aPolyPoly.transform( aMatrix );
}
- // --> OD 2009-01-16 #i59051#
- ForceMetricTo100th_mm( aPolyPoly );
- // <--
drawing::PolyPolygonBezierCoords aRetval;
SvxConvertB2DPolyPolygonToPolyPolygonBezier( aPolyPoly, aRetval);
rValue <<= aRetval;
@@ -2987,9 +2906,6 @@ bool SvxShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com:
if( mpModel->IsWriter() )
aPoint -= mpObj->GetAnchorPos();
- // --> OD 2009-01-12 #i59051#
- ForceMetricTo100th_mm( aPoint );
- // <--
awt::Point aUnoPoint( aPoint.X(), aPoint.Y() );
rValue <<= aUnoPoint;
@@ -3161,7 +3077,7 @@ bool SvxShape::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com:
//----------------------------------------------------------------------
-bool SvxShape::getPropertyStateImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)
+bool SvxShape::getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)
{
if( pProperty->nWID == OWN_ATTR_FILLBMP_MODE )
{
@@ -3192,7 +3108,7 @@ bool SvxShape::getPropertyStateImpl( const SfxItemPropertyMap* pProperty, ::com:
//----------------------------------------------------------------------
-bool SvxShape::setPropertyToDefaultImpl( const SfxItemPropertyMap* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)
+bool SvxShape::setPropertyToDefaultImpl( const SfxItemPropertySimpleEntry* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)
{
if( pProperty->nWID == OWN_ATTR_FILLBMP_MODE )
{
@@ -3257,7 +3173,7 @@ void SAL_CALL SvxShape::_setPropertyToDefault( const OUString& PropertyName )
{
OGuard aGuard( Application::GetSolarMutex() );
- const SfxItemPropertyMap* pProperty = maPropSet.getPropertyMapEntry(PropertyName);
+ const SfxItemPropertySimpleEntry* pProperty = mpPropSet->getPropertyMapEntry(PropertyName);
if( !mpObj.is() || mpModel == NULL || pProperty == NULL )
throw beans::UnknownPropertyException();
@@ -3290,7 +3206,7 @@ uno::Any SAL_CALL SvxShape::_getPropertyDefault( const OUString& aPropertyName )
{
OGuard aGuard( Application::GetSolarMutex() );
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMapEntry(aPropertyName);
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(aPropertyName);
if( !mpObj.is() || pMap == NULL || mpModel == NULL )
throw beans::UnknownPropertyException();
@@ -4243,21 +4159,21 @@ void SvxShape::updateShapeKind()
* class SvxShapeText *
***********************************************************************/
SvxShapeText::SvxShapeText() throw ()
-: SvxShape(NULL, aSvxMapProvider.GetMap(SVXMAP_TEXT) ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorPropertyMap() )
+: SvxShape(NULL, aSvxMapProvider.GetMap(SVXMAP_TEXT), aSvxMapProvider.GetPropertySet(SVXMAP_TEXT) ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() )
{
}
//----------------------------------------------------------------------
SvxShapeText::SvxShapeText( SdrObject* pObject ) throw ()
-: SvxShape( pObject, aSvxMapProvider.GetMap(SVXMAP_TEXT) ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorPropertyMap() )
+: SvxShape( pObject, aSvxMapProvider.GetMap(SVXMAP_TEXT), aSvxMapProvider.GetPropertySet(SVXMAP_TEXT) ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() )
{
if( pObject && pObject->GetModel() )
SetEditSource( new SvxTextEditSource( pObject, 0, static_cast< uno::XWeak * >( this ) ) );
}
//----------------------------------------------------------------------
-SvxShapeText::SvxShapeText( SdrObject* pObject, const SfxItemPropertyMap* pPropertySet ) throw ()
-: SvxShape( pObject, pPropertySet ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorPropertyMap() )
+SvxShapeText::SvxShapeText( SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet ) throw ()
+: SvxShape( pObject, pPropertyMap, pPropertySet ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() )
{
if( pObject && pObject->GetModel() )
SetEditSource( new SvxTextEditSource( pObject, 0, static_cast< uno::XWeak * >( this ) ) );
@@ -4433,7 +4349,7 @@ void SAL_CALL SvxShapeText::setString( const OUString& aString ) throw(uno::Runt
}
// overide these for special property handling in subcasses. Return true if property is handled
-bool SvxShapeText::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxShapeText::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
// HACK-fix #99090#
// since SdrTextObj::SetVerticalWriting exchanges
@@ -4453,10 +4369,10 @@ bool SvxShapeText::setPropertyValueImpl( const SfxItemPropertyMap* pProperty, co
}
return true;
}
- return SvxShape::setPropertyValueImpl( pProperty, rValue );
+ return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
}
-bool SvxShapeText::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxShapeText::getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
if( pProperty->nWID == SDRATTR_TEXTDIRECTION )
{
@@ -4468,15 +4384,15 @@ bool SvxShapeText::getPropertyValueImpl( const SfxItemPropertyMap* pProperty, ::
return true;
}
- return SvxShape::getPropertyValueImpl( pProperty, rValue );
+ return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
}
-bool SvxShapeText::getPropertyStateImpl( const SfxItemPropertyMap* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)
+bool SvxShapeText::getPropertyStateImpl( const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::beans::PropertyState& rState ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)
{
return SvxShape::getPropertyStateImpl( pProperty, rState );
}
-bool SvxShapeText::setPropertyToDefaultImpl( const SfxItemPropertyMap* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)
+bool SvxShapeText::setPropertyToDefaultImpl( const SfxItemPropertySimpleEntry* pProperty ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)
{
return SvxShape::setPropertyToDefaultImpl( pProperty );
}
@@ -4486,7 +4402,7 @@ bool SvxShapeText::setPropertyToDefaultImpl( const SfxItemPropertyMap* pProperty
***********************************************************************/
DBG_NAME(SvxShapeRect)
SvxShapeRect::SvxShapeRect( SdrObject* pObj ) throw()
-: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_SHAPE) )
+: SvxShapeText( pObj, aSvxMapProvider.GetMap(SVXMAP_SHAPE), aSvxMapProvider.GetPropertySet(SVXMAP_SHAPE) )
{
DBG_CTOR(SvxShapeRect,NULL);
diff --git a/svx/source/unoedit/unofield.cxx b/svx/source/unoedit/unofield.cxx
index 0c38912610..e5c93af072 100644
--- a/svx/source/unoedit/unofield.cxx
+++ b/svx/source/unoedit/unofield.cxx
@@ -81,9 +81,9 @@ public:
OUString msPresentation;
};
-SfxItemPropertyMap* ImplGetFieldItemPropertyMap( sal_Int32 mnId )
+const SfxItemPropertySet* ImplGetFieldItemPropertySet( sal_Int32 mnId )
{
- static SfxItemPropertyMap aExDateTimeFieldPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aExDateTimeFieldPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("DateTime"), WID_DATE, &::getCppuType((const util::DateTime*)0), 0, 0 },
{ MAP_CHAR_LEN("IsFixed"), WID_BOOL1, &::getBooleanCppuType(), 0, 0 },
@@ -91,14 +91,16 @@ SfxItemPropertyMap* ImplGetFieldItemPropertyMap( sal_Int32 mnId )
{ MAP_CHAR_LEN("NumberFormat"), WID_INT32, &::getCppuType((const sal_Int16*)0), 0, 0 },
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aExDateTimeFieldPropertySet_Impl(aExDateTimeFieldPropertyMap_Impl);
- static SfxItemPropertyMap aDateTimeFieldPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aDateTimeFieldPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("IsDate"), WID_BOOL2, &::getBooleanCppuType(), 0, 0 },
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aDateTimeFieldPropertySet_Impl(aDateTimeFieldPropertyMap_Impl);
- static SfxItemPropertyMap aUrlFieldPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aUrlFieldPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("Format"), WID_INT16, &::getCppuType((const sal_Int16*)0), 0, 0 },
@@ -107,21 +109,24 @@ SfxItemPropertyMap* ImplGetFieldItemPropertyMap( sal_Int32 mnId )
{ MAP_CHAR_LEN("URL"), WID_STRING3, &::getCppuType((const OUString*)0), 0, 0 },
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aUrlFieldPropertySet_Impl(aUrlFieldPropertyMap_Impl);
- static SfxItemPropertyMap aEmptyPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aEmptyPropertyMap_Impl[] =
{
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aEmptyPropertySet_Impl(aEmptyPropertyMap_Impl);
- static SfxItemPropertyMap aExtFileFieldPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aExtFileFieldPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("IsFixed"), WID_BOOL1, &::getBooleanCppuType(), 0, 0 },
{ MAP_CHAR_LEN("FileFormat"), WID_INT16, &::getCppuType((const sal_Int16*)0), 0, 0 },
{ MAP_CHAR_LEN("CurrentPresentation"), WID_STRING1,&::getCppuType((const OUString*)0), 0, 0 },
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aExtFileFieldPropertySet_Impl(aExtFileFieldPropertyMap_Impl);
- static SfxItemPropertyMap aAuthorFieldPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aAuthorFieldPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("IsFixed"), WID_BOOL1, &::getBooleanCppuType(), 0, 0 },
{ MAP_CHAR_LEN("CurrentPresentation"), WID_STRING1,&::getCppuType((const OUString*)0), 0, 0 },
@@ -130,29 +135,31 @@ SfxItemPropertyMap* ImplGetFieldItemPropertyMap( sal_Int32 mnId )
{ MAP_CHAR_LEN("FullName"), WID_BOOL2, &::getBooleanCppuType(), 0, 0 },
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aAuthorFieldPropertySet_Impl(aAuthorFieldPropertyMap_Impl);
- static SfxItemPropertyMap aMeasureFieldPropertyMap_Impl[] =
+ static SfxItemPropertyMapEntry aMeasureFieldPropertyMap_Impl[] =
{
{ MAP_CHAR_LEN("Kind"), WID_INT16, &::getCppuType((const sal_Int16*)0), 0, 0 },
{0,0,0,0,0,0}
};
+ static SfxItemPropertySet aMeasureFieldPropertySet_Impl(aMeasureFieldPropertyMap_Impl);
switch( mnId )
{
case ID_EXT_DATEFIELD:
case ID_EXT_TIMEFIELD:
- return aExDateTimeFieldPropertyMap_Impl;
+ return &aExDateTimeFieldPropertySet_Impl;
case ID_URLFIELD:
- return aUrlFieldPropertyMap_Impl;
+ return &aUrlFieldPropertySet_Impl;
case ID_DATEFIELD:
case ID_TIMEFIELD:
- return aDateTimeFieldPropertyMap_Impl;
+ return &aDateTimeFieldPropertySet_Impl;
case ID_EXT_FILEFIELD:
- return aExtFileFieldPropertyMap_Impl;
+ return &aExtFileFieldPropertySet_Impl;
case ID_AUTHORFIELD:
- return aAuthorFieldPropertyMap_Impl;
+ return &aAuthorFieldPropertySet_Impl;
case ID_MEASUREFIELD:
- return aMeasureFieldPropertyMap_Impl;
+ return &aMeasureFieldPropertySet_Impl;
// case ID_PAGEFIELD:
// case ID_PAGESFIELD:
// case ID_FILEFIELD:
@@ -161,7 +168,7 @@ SfxItemPropertyMap* ImplGetFieldItemPropertyMap( sal_Int32 mnId )
// case ID_FOOTERFIELD:
// case ID_DATETIMEFIELD::
default:
- return aEmptyPropertyMap_Impl;
+ return &aEmptyPropertySet_Impl;
}
}
@@ -262,7 +269,7 @@ SvxUnoTextField::SvxUnoTextField( sal_Int32 nServiceId ) throw()
, mnServiceId(nServiceId)
, mpImpl( new SvxUnoFieldData_Impl )
{
- mpPropSet = new SfxItemPropertySet( ImplGetFieldItemPropertyMap(mnServiceId) );
+ mpPropSet = ImplGetFieldItemPropertySet(mnServiceId);
memset( &(mpImpl->maDateTime), 0, sizeof( util::DateTime ) );
@@ -388,12 +395,11 @@ SvxUnoTextField::SvxUnoTextField( uno::Reference< text::XTextRange > xAnchor, co
}
}
- mpPropSet = new SfxItemPropertySet( ImplGetFieldItemPropertyMap(mnServiceId) );
+ mpPropSet = ImplGetFieldItemPropertySet(mnServiceId);
}
SvxUnoTextField::~SvxUnoTextField() throw()
{
- delete mpPropSet;
delete mpImpl;
}
@@ -671,7 +677,7 @@ void SAL_CALL SvxUnoTextField::setPropertyValue( const OUString& aPropertyName,
if( mpImpl == NULL )
throw uno::RuntimeException();
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(mpPropSet->getPropertyMap(), aPropertyName );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMap()->getByName( aPropertyName );
if ( !pMap )
throw beans::UnknownPropertyException();
@@ -840,7 +846,7 @@ uno::Any SAL_CALL SvxUnoTextField::getPropertyValue( const OUString& PropertyNam
uno::Any aValue;
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(mpPropSet->getPropertyMap(), PropertyName );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMap()->getByName( PropertyName );
if ( !pMap )
throw beans::UnknownPropertyException();
diff --git a/svx/source/unoedit/unopracc.cxx b/svx/source/unoedit/unopracc.cxx
index ef259b094f..16656bba36 100644
--- a/svx/source/unoedit/unopracc.cxx
+++ b/svx/source/unoedit/unopracc.cxx
@@ -63,8 +63,8 @@ using namespace ::com::sun::star;
//
//------------------------------------------------------------------------
-SvxAccessibleTextPropertySet::SvxAccessibleTextPropertySet( const SvxEditSource* pEditSrc, const SfxItemPropertyMap* pPropMap )
- : SvxUnoTextRangeBase( pEditSrc, pPropMap )
+SvxAccessibleTextPropertySet::SvxAccessibleTextPropertySet( const SvxEditSource* pEditSrc, const SvxItemPropertySet* pPropSet )
+ : SvxUnoTextRangeBase( pEditSrc, pPropSet )
{
}
diff --git a/svx/source/unoedit/unotext.cxx b/svx/source/unoedit/unotext.cxx
index 5cee42f54a..41d4ea707f 100644
--- a/svx/source/unoedit/unotext.cxx
+++ b/svx/source/unoedit/unotext.cxx
@@ -37,9 +37,6 @@
#ifndef _COM_SUN_STAR_TEXT_XTEXTFIELD_HDL_
#include <com/sun/star/text/XTextField.hdl>
#endif
-//#ifndef _COM_SUN_STAR_BEANS_TOLERANTPROPERTYSETRESULTTYPE_HPP_
-//#include <com/sun/star/beans/TolerantPropertySetResultType.hpp>
-//#endif
#include <vos/mutex.hxx>
#include <svtools/itemset.hxx>
@@ -78,8 +75,36 @@ using namespace ::com::sun::star;
if( rType == ::getCppuType((const uno::Reference< xint >*)0) ) \
return uno::makeAny(uno::Reference< xint >(this))
-extern const SfxItemPropertyMap* ImplGetSvxTextPortionPropertyMap();
-extern const SfxItemPropertyMap* ImplGetSvxUnoOutlinerTextCursorPropertyMap();
+
+extern const SfxItemPropertySet* ImplGetSvxUnoOutlinerTextCursorSfxPropertySet();
+const SfxItemPropertyMapEntry* ImplGetSvxTextPortionPropertyMap()
+{
+ // Propertymap fuer einen Outliner Text
+ static const SfxItemPropertyMapEntry aSvxTextPortionPropertyMap[] =
+ {
+ SVX_UNOEDIT_CHAR_PROPERTIES,
+ SVX_UNOEDIT_FONT_PROPERTIES,
+ SVX_UNOEDIT_OUTLINER_PROPERTIES,
+ SVX_UNOEDIT_PARA_PROPERTIES,
+ {MAP_CHAR_LEN("TextField"), EE_FEATURE_FIELD, &::getCppuType((const uno::Reference< text::XTextField >*)0), beans::PropertyAttribute::READONLY, 0 },
+ {MAP_CHAR_LEN("TextPortionType"), WID_PORTIONTYPE, &::getCppuType((const ::rtl::OUString*)0), beans::PropertyAttribute::READONLY, 0 },
+ {MAP_CHAR_LEN("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {MAP_CHAR_LEN("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+ {0,0,0,0,0,0}
+ };
+ return aSvxTextPortionPropertyMap;
+}
+const SvxItemPropertySet* ImplGetSvxTextPortionSvxPropertySet()
+{
+ static SvxItemPropertySet aSvxTextPortionPropertySet( ImplGetSvxTextPortionPropertyMap() );
+ return &aSvxTextPortionPropertySet;
+}
+
+const SfxItemPropertySet* ImplGetSvxTextPortionSfxPropertySet()
+{
+ static SfxItemPropertySet aSvxTextPortionSfxPropertySet( ImplGetSvxTextPortionPropertyMap() );
+ return &aSvxTextPortionSfxPropertySet;
+}
// ====================================================================
// helper fuer Item/Property Konvertierung
@@ -204,16 +229,16 @@ static check_me gNumRanges;
UNO3_GETIMPLEMENTATION_IMPL( SvxUnoTextRangeBase );
-SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SfxItemPropertyMap* _pMap ) throw()
-: mpEditSource(NULL) , maPropSet(_pMap)
+SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxItemPropertySet* _pSet ) throw()
+: mpEditSource(NULL) , mpPropSet(_pSet)
{
#ifdef DEBUG
gNumRanges.add(this);
#endif
}
-SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap ) throw()
-: maPropSet(_pMap)
+SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet ) throw()
+: mpPropSet(_pSet)
{
OGuard aGuard( Application::GetSolarMutex() );
@@ -240,7 +265,7 @@ SvxUnoTextRangeBase::SvxUnoTextRangeBase( const SvxUnoTextRangeBase& rRange ) th
, lang::XServiceInfo()
, text::XTextRangeCompare()
, lang::XUnoTunnel()
-, maPropSet(rRange.getPropertyMap())
+, mpPropSet(rRange.getPropertySet())
{
OGuard aGuard( Application::GetSolarMutex() );
@@ -421,7 +446,7 @@ void SAL_CALL SvxUnoTextRangeBase::setString(const OUString& aString)
uno::Reference< beans::XPropertySetInfo > SAL_CALL SvxUnoTextRangeBase::getPropertySetInfo(void)
throw( uno::RuntimeException )
{
- return maPropSet.getPropertySetInfo();
+ return mpPropSet->getPropertySetInfo();
}
void SAL_CALL SvxUnoTextRangeBase::setPropertyValue(const OUString& PropertyName, const uno::Any& aValue)
@@ -441,7 +466,7 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValue( const OUString& PropertyNa
CheckSelection( maSelection, pForwarder );
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(maPropSet.getPropertyMap(), PropertyName );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName );
if ( pMap )
{
ESelection aSel( GetSelection() );
@@ -491,18 +516,18 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValue( const OUString& PropertyNa
throw beans::UnknownPropertyException();
}
-void SvxUnoTextRangeBase::setPropertyValue( const SfxItemPropertyMap* pMap, const uno::Any& rValue, const ESelection& rSelection, const SfxItemSet& rOldSet, SfxItemSet& rNewSet ) throw( beans::UnknownPropertyException, lang::IllegalArgumentException )
+void SvxUnoTextRangeBase::setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const uno::Any& rValue, const ESelection& rSelection, const SfxItemSet& rOldSet, SfxItemSet& rNewSet ) throw( beans::UnknownPropertyException, lang::IllegalArgumentException )
{
if(!SetPropertyValueHelper( rOldSet, pMap, rValue, rNewSet, &rSelection, (SvxTextEditSource*)GetEditSource() ))
{
// Fuer Teile von zusammengesetzten Items mit mehreren Properties (z.B. Hintergrund)
// muss vorher das alte Item aus dem Dokument geholt werden
rNewSet.Put(rOldSet.Get(pMap->nWID)); // altes Item in neuen Set
- maPropSet.setPropertyValue(pMap, rValue, rNewSet);
+ mpPropSet->setPropertyValue(pMap, rValue, rNewSet);
}
}
-sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const SfxItemPropertyMap* pMap, const uno::Any& aValue, SfxItemSet& rNewSet, const ESelection* pSelection /* = NULL */, SvxTextEditSource* pEditSource /* = NULL*/ ) throw( uno::RuntimeException )
+sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const SfxItemPropertySimpleEntry* pMap, const uno::Any& aValue, SfxItemSet& rNewSet, const ESelection* pSelection /* = NULL */, SvxTextEditSource* pEditSource /* = NULL*/ ) throw( uno::RuntimeException )
{
switch( pMap->nWID )
{
@@ -606,7 +631,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::_getPropertyValue(const OUString& Propert
SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL;
if( pForwarder )
{
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(maPropSet.getPropertyMap(), PropertyName );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName );
if( pMap )
{
SfxItemSet* pAttribs = NULL;
@@ -628,7 +653,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::_getPropertyValue(const OUString& Propert
throw beans::UnknownPropertyException();
}
-void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertyMap* pMap, uno::Any& rAny, const SfxItemSet& rSet ) throw( beans::UnknownPropertyException )
+void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertySimpleEntry* pMap, uno::Any& rAny, const SfxItemSet& rSet ) throw( beans::UnknownPropertyException )
{
switch( pMap->nWID )
{
@@ -669,11 +694,11 @@ void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertyMap* pMap, uno:
default:
if(!GetPropertyValueHelper( *((SfxItemSet*)(&rSet)), pMap, rAny, &maSelection, (SvxTextEditSource*)GetEditSource() ))
- rAny = maPropSet.getPropertyValue(pMap, rSet);
+ rAny = mpPropSet->getPropertyValue(pMap, rSet);
}
}
-sal_Bool SvxUnoTextRangeBase::GetPropertyValueHelper( SfxItemSet& rSet, const SfxItemPropertyMap* pMap, uno::Any& aAny, const ESelection* pSelection /* = NULL */, SvxTextEditSource* pEditSource /* = NULL */ )
+sal_Bool SvxUnoTextRangeBase::GetPropertyValueHelper( SfxItemSet& rSet, const SfxItemPropertySimpleEntry* pMap, uno::Any& aAny, const ESelection* pSelection /* = NULL */, SvxTextEditSource* pEditSource /* = NULL */ )
throw( uno::RuntimeException )
{
switch( pMap->nWID )
@@ -788,34 +813,9 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< ::rt
SfxItemSet* pOldParaSet = NULL;
SfxItemSet* pNewParaSet = NULL;
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMap();
-
- const OUString* pLastPropertyName = 0;
-
for( ; nCount; nCount--, pPropertyNames++, pValues++ )
{
- if( pLastPropertyName )
- {
- sal_Int32 nComp = pLastPropertyName->compareTo( *pPropertyNames );
- if( nComp < 0 )
- {
- if(pMap)
- pMap++;
- else
- pMap = maPropSet.getPropertyMap();
- }
- else if( nComp > 0 )
- {
- pMap = maPropSet.getPropertyMap();
- }
- else
- {
- DBG_ERROR( "svx::SvxUnoTextRangeBase::_setPropertyValues(), duplicate property in parameter sequence!" );
- }
- }
-
- pLastPropertyName = pPropertyNames;
- pMap = SfxItemPropertyMap::GetByName(pMap, *pPropertyNames );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry( *pPropertyNames );
if( pMap )
{
@@ -930,34 +930,9 @@ uno::Sequence< uno::Any > SAL_CALL SvxUnoTextRangeBase::_getPropertyValues( cons
const OUString* pPropertyNames = aPropertyNames.getConstArray();
uno::Any* pValues = aValues.getArray();
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMap();
-
- const OUString* pLastPropertyName = 0;
-
for( ; nCount; nCount--, pPropertyNames++, pValues++ )
{
- if( pLastPropertyName )
- {
- sal_Int32 nComp = pLastPropertyName->compareTo( *pPropertyNames );
- if( nComp < 0 )
- {
- if(pMap)
- pMap++;
- else
- pMap = maPropSet.getPropertyMap();
- }
- else if( nComp > 0 )
- {
- pMap = maPropSet.getPropertyMap();
- }
- else
- {
- DBG_ERROR( "svx::SvxUnoTextRangeBase::_getPropertyValues(), duplicate property in parameter sequence!" );
- }
- }
-
- pLastPropertyName = pPropertyNames;
- pMap = SfxItemPropertyMap::GetByName(pMap, *pPropertyNames );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry( *pPropertyNames );
if( pMap )
{
getPropertyValue( pMap, *pValues, *pAttribs );
@@ -994,7 +969,7 @@ static sal_uInt16 aSvxUnoFontDescriptorWhichMap[] = { EE_CHAR_FONTINFO, EE_CHAR_
EE_CHAR_UNDERLINE, EE_CHAR_WEIGHT, EE_CHAR_STRIKEOUT,
EE_CHAR_WLM, 0 };
-beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxItemPropertyMap* pMap, sal_Int32 nPara)
+beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxItemPropertySimpleEntry* pMap, sal_Int32 nPara)
throw( beans::UnknownPropertyException, uno::RuntimeException )
{
if ( pMap )
@@ -1090,7 +1065,7 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const OUStr
{
OGuard aGuard( Application::GetSolarMutex() );
- return _getPropertyState(SfxItemPropertyMap::GetByName(maPropSet.getPropertyMap(), PropertyName ), nPara);
+ return _getPropertyState( mpPropSet->getPropertyMapEntry( PropertyName ), nPara);
}
uno::Sequence< beans::PropertyState > SAL_CALL SvxUnoTextRangeBase::getPropertyStates( const uno::Sequence< OUString >& aPropertyName )
@@ -1124,22 +1099,15 @@ uno::Sequence< beans::PropertyState > SvxUnoTextRangeBase::_getPropertyStates(co
}
sal_Bool bUnknownPropertyFound = sal_False;
- const SfxItemPropertyMap* pMap = maPropSet.getPropertyMap();
for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++ )
{
- pMap = SfxItemPropertyMap::GetByName(pMap, *pNames++ );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry( *pNames++ );
if( NULL == pMap )
{
bUnknownPropertyFound = sal_True;
break;
}
-
bUnknownPropertyFound = !_getOnePropertyStates(pSet, pMap, *pState++);
-
- if (pMap)
- pMap++;
- else
- pMap = maPropSet.getPropertyMap();
}
delete pSet;
@@ -1151,7 +1119,7 @@ uno::Sequence< beans::PropertyState > SvxUnoTextRangeBase::_getPropertyStates(co
return aRet;
}
-sal_Bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const SfxItemPropertyMap* pMap, beans::PropertyState& rState)
+sal_Bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const SfxItemPropertySimpleEntry* pMap, beans::PropertyState& rState)
{
sal_Bool bUnknownPropertyFound = sal_False;
if(pSet && pMap)
@@ -1314,7 +1282,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyDefault( const OUString& aProp
SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL;
if( pForwarder )
{
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(maPropSet.getPropertyMap(), aPropertyName );
+ const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry( aPropertyName );
if( pMap )
{
SfxItemPool* pPool = pForwarder->GetPool();
@@ -1343,7 +1311,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyDefault( const OUString& aProp
{
SfxItemSet aSet( *pPool, pMap->nWID, pMap->nWID);
aSet.Put(pPool->GetDefaultItem(pMap->nWID));
- return maPropSet.getPropertyValue(pMap, aSet);
+ return mpPropSet->getPropertyValue(pMap, aSet);
}
}
}
@@ -1613,7 +1581,7 @@ uno::Reference< uno::XInterface > SvxUnoTextRange_NewInstance()
}
SvxUnoTextRange::SvxUnoTextRange( const SvxUnoTextBase& rParent, sal_Bool bPortion /* = sal_False */ ) throw()
-:SvxUnoTextRangeBase( rParent.GetEditSource(), bPortion ? ImplGetSvxTextPortionPropertyMap() : rParent.getPropertyMap() ),
+:SvxUnoTextRangeBase( rParent.GetEditSource(), bPortion ? ImplGetSvxTextPortionSvxPropertySet() : rParent.getPropertySet() ),
mbPortion( bPortion )
{
xParentText = (text::XText*)&rParent;
@@ -1723,21 +1691,21 @@ SvxUnoTextBase::SvxUnoTextBase() throw()
}
-SvxUnoTextBase::SvxUnoTextBase( const SfxItemPropertyMap* _pMap ) throw()
-: SvxUnoTextRangeBase( _pMap )
+SvxUnoTextBase::SvxUnoTextBase( const SvxItemPropertySet* _pSet ) throw()
+: SvxUnoTextRangeBase( _pSet )
{
}
-SvxUnoTextBase::SvxUnoTextBase( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap ) throw()
-: SvxUnoTextRangeBase( pSource, _pMap )
+SvxUnoTextBase::SvxUnoTextBase( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet ) throw()
+: SvxUnoTextRangeBase( pSource, _pSet )
{
ESelection aSelection;
::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
SetSelection( aSelection );
}
-SvxUnoTextBase::SvxUnoTextBase( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap, uno::Reference < text::XText > xParent ) throw()
-: SvxUnoTextRangeBase( pSource, _pMap )
+SvxUnoTextBase::SvxUnoTextBase( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet, uno::Reference < text::XText > xParent ) throw()
+: SvxUnoTextRangeBase( pSource, _pSet )
{
xParentText = xParent;
ESelection aSelection;
@@ -2131,17 +2099,16 @@ void SAL_CALL SvxUnoTextBase::moveTextRange( const uno::Reference< text::XTextRa
void SvxPropertyValuesToItemSet(
SfxItemSet &rItemSet,
const uno::Sequence< beans::PropertyValue > rPropertyVaules,
- const SfxItemPropertyMap &rMap,
+ const SfxItemPropertySet *pPropSet,
SvxTextForwarder *pForwarder /*needed for WID_NUMLEVEL*/,
USHORT nPara /*needed for WID_NUMLEVEL*/)
throw(lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException)
{
- SfxItemPropertySet aPropSet( &rMap );
sal_Int32 nProps = rPropertyVaules.getLength();
const beans::PropertyValue *pProps = rPropertyVaules.getConstArray();
for (sal_Int32 i = 0; i < nProps; ++i)
{
- const SfxItemPropertyMap *pEntry = SfxItemPropertyMap::GetByName( &rMap, pProps[i].Name );
+ const SfxItemPropertySimpleEntry *pEntry = pPropSet->getPropertyMap()->getByName( pProps[i].Name );
if (pEntry)
{
// Note: there is no need to take special care of the properties
@@ -2195,7 +2162,7 @@ void SvxPropertyValuesToItemSet(
}
}
else
- aPropSet.setPropertyValue( *pEntry, pProps[i].Value, rItemSet );
+ pPropSet->setPropertyValue( pProps[i].Name, pProps[i].Value, rItemSet );
}
else
throw beans::UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Unknown property: " ) ) + pProps[i].Name, static_cast < cppu::OWeakObject * > ( 0 ) );
@@ -2220,8 +2187,10 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::appendParagraph(
// set properties for new appended (now last) paragraph
ESelection aSel( nParaCount, 0, nParaCount, 0 );
SfxItemSet aItemSet( *pTextForwarder->GetEmptyItemSetPtr() );
- const SfxItemPropertyMap *pMap = ImplGetSvxUnoOutlinerTextCursorPropertyMap();
- SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps, *pMap, pTextForwarder, nParaCount );
+ SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps,
+ ImplGetSvxUnoOutlinerTextCursorSfxPropertySet(),
+ pTextForwarder,
+ nParaCount );
pTextForwarder->QuickSetAttribs( aItemSet, aSel );
pEditSource->UpdateData();
SvxUnoTextRange* pRange = new SvxUnoTextRange( *this );
@@ -2250,8 +2219,8 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::finishParagraph(
USHORT nPara = nParaCount - 1;
ESelection aSel( nPara, 0, nPara, 0 );
SfxItemSet aItemSet( *pTextForwarder->GetEmptyItemSetPtr() );
- const SfxItemPropertyMap *pMap = ImplGetSvxUnoOutlinerTextCursorPropertyMap();
- SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps, *pMap, pTextForwarder, nPara );
+ SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps,
+ ImplGetSvxUnoOutlinerTextCursorSfxPropertySet(), pTextForwarder, nPara );
pTextForwarder->QuickSetAttribs( aItemSet, aSel );
pEditSource->UpdateData();
SvxUnoTextRange* pRange = new SvxUnoTextRange( *this );
@@ -2288,8 +2257,8 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::appendTextPortion(
pEditSource->UpdateData();
SfxItemSet aItemSet( *pTextForwarder->GetEmptyItemSetPtr() );
- const SfxItemPropertyMap *pMap = ImplGetSvxTextPortionPropertyMap();
- SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps, *pMap, pTextForwarder, nPara );
+ SvxPropertyValuesToItemSet( aItemSet, rCharAndParaProps,
+ ImplGetSvxTextPortionSfxPropertySet(), pTextForwarder, nPara );
pTextForwarder->QuickSetAttribs( aItemSet, aSel );
SvxUnoTextRange* pRange = new SvxUnoTextRange( *this );
xRet = pRange;
@@ -2399,13 +2368,13 @@ SvxUnoText::SvxUnoText( ) throw()
{
}
-SvxUnoText::SvxUnoText( const SfxItemPropertyMap* _pMap ) throw()
-: SvxUnoTextBase( _pMap )
+SvxUnoText::SvxUnoText( const SvxItemPropertySet* _pSet ) throw()
+: SvxUnoTextBase( _pSet )
{
}
-SvxUnoText::SvxUnoText( const SvxEditSource* pSource, const SfxItemPropertyMap* _pMap, uno::Reference < text::XText > xParent ) throw()
-: SvxUnoTextBase( pSource, _pMap, xParent )
+SvxUnoText::SvxUnoText( const SvxEditSource* pSource, const SvxItemPropertySet* _pSet, uno::Reference < text::XText > xParent ) throw()
+: SvxUnoTextBase( pSource, _pSet, xParent )
{
}
diff --git a/svx/source/xml/xmltxtexp.cxx b/svx/source/xml/xmltxtexp.cxx
index 09f058856f..f8b01a727c 100644
--- a/svx/source/xml/xmltxtexp.cxx
+++ b/svx/source/xml/xmltxtexp.cxx
@@ -395,7 +395,7 @@ SvxXMLTextExportComponent::SvxXMLTextExportComponent(
{
SvxEditEngineSource aEditSource( pEditEngine );
- static const SfxItemPropertyMap SvxXMLTextExportComponentPropertyMap[] =
+ static const SfxItemPropertyMapEntry SvxXMLTextExportComponentPropertyMap[] =
{
SVX_UNOEDIT_CHAR_PROPERTIES,
SVX_UNOEDIT_FONT_PROPERTIES,
@@ -406,8 +406,9 @@ SvxXMLTextExportComponent::SvxXMLTextExportComponent(
SVX_UNOEDIT_PARA_PROPERTIES,
{0,0,0,0,0,0}
};
+ static SvxItemPropertySet aSvxXMLTextExportComponentPropertySet( SvxXMLTextExportComponentPropertyMap );
- SvxUnoText* pUnoText = new SvxUnoText( &aEditSource, SvxXMLTextExportComponentPropertyMap, mxText );
+ SvxUnoText* pUnoText = new SvxUnoText( &aEditSource, &aSvxXMLTextExportComponentPropertySet, mxText );
pUnoText->SetSelection( rSel );
mxText = pUnoText;
diff --git a/svx/source/xml/xmltxtimp.cxx b/svx/source/xml/xmltxtimp.cxx
index aae9ddcee5..092540886a 100644
--- a/svx/source/xml/xmltxtimp.cxx
+++ b/svx/source/xml/xmltxtimp.cxx
@@ -157,7 +157,7 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r
{
SvxEditEngineSource aEditSource( &rEditEngine );
- static const SfxItemPropertyMap SvxXMLTextImportComponentPropertyMap[] =
+ static const SfxItemPropertyMapEntry SvxXMLTextImportComponentPropertyMap[] =
{
SVX_UNOEDIT_CHAR_PROPERTIES,
SVX_UNOEDIT_FONT_PROPERTIES,
@@ -165,9 +165,10 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r
SVX_UNOEDIT_PARA_PROPERTIES,
{0,0,0,0,0,0}
};
+ static SvxItemPropertySet aSvxXMLTextImportComponentPropertySet( SvxXMLTextImportComponentPropertyMap );
uno::Reference<text::XText > xParent;
- SvxUnoText* pUnoText = new SvxUnoText( &aEditSource, SvxXMLTextImportComponentPropertyMap, xParent );
+ SvxUnoText* pUnoText = new SvxUnoText( &aEditSource, &aSvxXMLTextImportComponentPropertySet, xParent );
pUnoText->SetSelection( rSel );
uno::Reference<text::XText > xText( pUnoText );
diff --git a/xmloff/inc/xmloff/txtparae.hxx b/xmloff/inc/xmloff/txtparae.hxx
index 36026c9d16..2794f26991 100644
--- a/xmloff/inc/xmloff/txtparae.hxx
+++ b/xmloff/inc/xmloff/txtparae.hxx
@@ -68,12 +68,17 @@ namespace com { namespace sun { namespace star
{
namespace beans { class XPropertySet; class XPropertyState;
class XPropertySetInfo; }
- namespace container { class XEnumeration; class XIndexAccess; }
+ namespace container { class XEnumerationAccess; class XEnumeration; class XIndexAccess; }
namespace text { class XTextContent; class XTextRange; class XText;
class XFootnote; class XTextFrame; class XTextSection;
class XDocumentIndex; class XTextShapesSupplier; }
} } }
-namespace xmloff { class OFormLayerXMLExport; }
+
+namespace xmloff
+{
+ class OFormLayerXMLExport;
+ class BoundFrameSets;
+}
class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public XMLStyleExport
{
@@ -86,23 +91,8 @@ class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public XMLStyleExport
UniReference < SvXMLExportPropertyMapper > xAutoFramePropMapper;
UniReference < SvXMLExportPropertyMapper > xSectionPropMapper;
UniReference < SvXMLExportPropertyMapper > xRubyPropMapper;
- ::com::sun::star::uno::Reference <
- ::com::sun::star::container::XIndexAccess > xTextFrames;
- ::com::sun::star::uno::Reference <
- ::com::sun::star::container::XIndexAccess > xGraphics;
- ::com::sun::star::uno::Reference <
- ::com::sun::star::container::XIndexAccess > xEmbeddeds;
- ::com::sun::star::uno::Reference <
- ::com::sun::star::container::XIndexAccess > xShapes;
-
- SvLongs *pPageTextFrameIdxs;
- SvLongs *pPageGraphicIdxs;
- SvLongs *pPageEmbeddedIdxs;
- SvLongs *pPageShapeIdxs;
- SvLongs *pFrameTextFrameIdxs;
- SvLongs *pFrameGraphicIdxs;
- SvLongs *pFrameEmbeddedIdxs;
- SvLongs *pFrameShapeIdxs;
+
+ const ::std::auto_ptr< ::xmloff::BoundFrameSets > pBoundFrameSets;
XMLTextFieldExport *pFieldExport;
OUStrings_Impl *pListElements;
// --> OD 2008-05-07 #refactorlists# - no longer needed
@@ -286,8 +276,6 @@ protected:
const ::com::sun::star::uno::Reference<
::com::sun::star::style::XStyle > & rStyle );
- void collectFrames();
- void collectFrames( sal_Bool bBoundToFrameOnly );
void exportPageFrames( sal_Bool bAutoStyles, sal_Bool bProgress );
void exportFrameFrames( sal_Bool bAutoStyles, sal_Bool bProgress,
const ::com::sun::star::uno::Reference <
@@ -608,35 +596,6 @@ public:
bool collectTextAutoStylesOptimized(
sal_Bool bIsProgress = sal_False );
- // This method collects all automatic styles that are bound to a page
- void collectFrameBoundToPageAutoStyles( sal_Bool bIsProgress = sal_False )
- {
- collectFrames();
- exportPageFrames( sal_True, bIsProgress );
- exportFrameFrames( sal_True, bIsProgress );
- }
- // This method prepares the collection of auto styles for frames
- // that are bound to a frame.
- void collectFramesBoundToFrameAutoStyles()
- {
- collectFrames( sal_True );
- }
- // This method prepares the collection of auto styles for frames
- // that are bound to a frame and it collects auto styles
- // for frames bound to a page.
- void collectFramesBoundToPageOrFrameAutoStyles( sal_Bool bIsProgress = sal_False )
- {
- collectFrames( sal_False );
- exportPageFrames( sal_True, bIsProgress );
- }
- void collectFramesBoundToFrameAutoStyles(
- const ::com::sun::star::uno::Reference <
- ::com::sun::star::text::XTextFrame >& rParentTxtFrame,
- sal_Bool bIsProgress = sal_False )
- {
- exportFrameFrames( sal_True, bIsProgress, &rParentTxtFrame );
- }
-
// This method exports all automatic styles that have been collected.
virtual void exportTextAutoStyles();
@@ -712,6 +671,8 @@ public:
void PushNewTextListsHelper();
void PopTextListsHelper();
// <--
+ private:
+ XMLTextParagraphExport(XMLTextParagraphExport &); // private copy-ctor because of explicit copy-ctor of auto_ptr
};
inline const XMLTextListAutoStylePool&
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index dde9393c5a..83a9984140 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -208,6 +208,7 @@ public:
::comphelper::UnoInterfaceToUniqueIdentifierMapper maInterfaceToIdentifierMapper;
uno::Reference< uri::XUriReferenceFactory > mxUriReferenceFactory;
rtl::OUString msPackageURI;
+ rtl::OUString msPackageURIScheme;
// --> OD 2006-09-27 #i69627#
sal_Bool mbOutlineStyleAsNormalListStyle;
// <--
@@ -226,6 +227,13 @@ public:
sal_Bool mbExportTextNumberElement;
// <--
sal_Bool mbNullDateInitialized;
+
+ void SetSchemeOf( const ::rtl::OUString& rOrigFileName )
+ {
+ sal_Int32 nSep = rOrigFileName.indexOf(':');
+ if( nSep != -1 )
+ msPackageURIScheme = rOrigFileName.copy( 0, nSep );
+ }
};
SvXMLExport_Impl::SvXMLExport_Impl()
@@ -425,6 +433,7 @@ SvXMLExport::SvXMLExport(
msWS( GetXMLToken(XML_WS) ),
mbSaveLinkedSections(sal_True)
{
+ mpImpl->SetSchemeOf( msOrigFileName );
DBG_ASSERT( mxServiceFactory.is(), "got no service manager" );
_InitCtor();
@@ -464,6 +473,7 @@ SvXMLExport::SvXMLExport(
msWS( GetXMLToken(XML_WS) ),
mbSaveLinkedSections(sal_True)
{
+ mpImpl->SetSchemeOf( msOrigFileName );
DBG_ASSERT( mxServiceFactory.is(), "got no service manager" );
_InitCtor();
@@ -504,6 +514,7 @@ SvXMLExport::SvXMLExport(
msWS( GetXMLToken(XML_WS) ),
mbSaveLinkedSections(sal_True)
{
+ mpImpl->SetSchemeOf( msOrigFileName );
DBG_ASSERT( mxServiceFactory.is(), "got no service manager" );
_InitCtor();
@@ -727,6 +738,7 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen
uno::Any aAny = mxExportInfo->getPropertyValue(sPropName);
aAny >>= msOrigFileName;
mpImpl->msPackageURI = msOrigFileName;
+ mpImpl->SetSchemeOf( msOrigFileName );
}
OUString sRelPath;
sPropName = OUString( RTL_CONSTASCII_USTRINGPARAM("StreamRelPath" ) );
@@ -2112,11 +2124,12 @@ OUString SvXMLExport::GetRelativeReference(const OUString& rValue)
OUString sValue( rValue );
// #i65474# handling of fragment URLs ("#....") is undefined
// they are stored 'as is'
+ uno::Reference< uri::XUriReference > xUriRef;
if(sValue.getLength() && sValue.getStr()[0] != '#')
{
try
{
- uno::Reference< uri::XUriReference > xUriRef = mpImpl->mxUriReferenceFactory->parse( rValue );
+ xUriRef = mpImpl->mxUriReferenceFactory->parse( rValue );
if( xUriRef.is() && !xUriRef->isAbsolute() )
{
//#i61943# relative URLs need special handling
@@ -2129,7 +2142,17 @@ OUString SvXMLExport::GetRelativeReference(const OUString& rValue)
{
}
}
- return URIHelper::simpleNormalizedMakeRelative(msOrigFileName, sValue);
+ OUString sRet = sValue;
+ if( xUriRef.is() )//no conversion for empty values or for fragments
+ {
+ //conversion for matching schemes only
+ if( xUriRef->getScheme() == mpImpl->msPackageURIScheme )
+ {
+ sValue = INetURLObject::GetRelURL( msOrigFileName, sValue,
+ INetURLObject::WAS_ENCODED, INetURLObject::DECODE_TO_IURI, RTL_TEXTENCODING_UTF8, INetURLObject::FSYS_DETECT);
+ }
+ }
+ return sValue;
}
void SvXMLExport::StartElement(sal_uInt16 nPrefix,
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 3bd72cfef6..559a578d2d 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -40,7 +40,8 @@
#include <rtl/ustrbuf.hxx>
#include <vector>
-
+#include <list>
+#include <hash_map>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
@@ -147,8 +148,123 @@ using namespace ::com::sun::star::util;
using namespace ::com::sun::star::drawing;
using namespace ::com::sun::star::document;
using namespace ::com::sun::star::frame;
+using namespace ::xmloff;
using namespace ::xmloff::token;
+namespace
+{
+ class TextContentSet
+ {
+ public:
+ typedef Reference<XTextContent> text_content_ref_t;
+ typedef list<text_content_ref_t> contents_t;
+ typedef back_insert_iterator<contents_t> inserter_t;
+ typedef contents_t::const_iterator const_iterator_t;
+
+ inserter_t getInserter()
+ { return back_insert_iterator<contents_t>(m_vTextContents); };
+ const_iterator_t getBegin() const
+ { return m_vTextContents.begin(); };
+ const_iterator_t getEnd() const
+ { return m_vTextContents.end(); };
+
+ private:
+ contents_t m_vTextContents;
+ };
+
+ struct FrameRefHash
+ : public unary_function<Reference<XTextFrame>, size_t>
+ {
+ size_t operator()(const Reference<XTextFrame> xFrame) const
+ { return reinterpret_cast<sal_Int32>(xFrame.get()) & 0xffffffff; }
+ };
+
+ static bool lcl_TextContentsUnfiltered(const Reference<XTextContent>&)
+ { return true; };
+
+ static bool lcl_ShapeFilter(const Reference<XTextContent>& xTxtContent)
+ {
+ static const OUString sTextFrameService = OUString::createFromAscii("com.sun.star.text.TextFrame");
+ static const OUString sTextGraphicService = OUString::createFromAscii("com.sun.star.text.TextGraphicObject");
+ static const OUString sTextEmbeddedService = OUString::createFromAscii("com.sun.star.text.TextEmbeddedObject");
+ Reference<XShape> xShape(xTxtContent, UNO_QUERY);
+ if(!xShape.is())
+ return false;
+ Reference<XServiceInfo> xServiceInfo(xTxtContent, UNO_QUERY);
+ if(xServiceInfo->supportsService(sTextFrameService) ||
+ xServiceInfo->supportsService(sTextGraphicService) ||
+ xServiceInfo->supportsService(sTextEmbeddedService) )
+ return false;
+ return true;
+ };
+
+ class BoundFrames
+ {
+ public:
+ typedef bool (*filter_t)(const Reference<XTextContent>&);
+ BoundFrames(
+ const Reference<XEnumerationAccess> xEnumAccess,
+ const filter_t& rFilter)
+ : m_xEnumAccess(xEnumAccess)
+ {
+ Fill(rFilter);
+ };
+ BoundFrames()
+ {};
+ const TextContentSet* GetPageBoundContents() const
+ { return &m_vPageBounds; };
+ const TextContentSet* GetFrameBoundContents(const Reference<XTextFrame>& rParentFrame) const
+ {
+ framebound_map_t::const_iterator it = m_vFrameBoundsOf.find(rParentFrame);
+ if(it == m_vFrameBoundsOf.end())
+ return NULL;
+ return &(it->second);
+ };
+ Reference<XEnumeration> createEnumeration() const
+ {
+ if(!m_xEnumAccess.is())
+ return Reference<XEnumeration>();
+ return m_xEnumAccess->createEnumeration();
+ };
+
+ private:
+ typedef hash_map<
+ Reference<XTextFrame>,
+ TextContentSet,
+ FrameRefHash> framebound_map_t;
+ TextContentSet m_vPageBounds;
+ framebound_map_t m_vFrameBoundsOf;
+ const Reference<XEnumerationAccess> m_xEnumAccess;
+ void Fill(const filter_t& rFilter);
+ static const OUString our_sAnchorType;
+ static const OUString our_sAnchorFrame;
+ };
+ const OUString BoundFrames::our_sAnchorType = OUString::createFromAscii("AnchorType");
+ const OUString BoundFrames::our_sAnchorFrame = OUString::createFromAscii("AnchorFrame");
+
+}
+
+namespace xmloff
+{
+ class BoundFrameSets
+ {
+ public:
+ BoundFrameSets(const Reference<XInterface> xModel);
+ const BoundFrames* GetTexts() const
+ { return m_pTexts.get(); };
+ const BoundFrames* GetGraphics() const
+ { return m_pGraphics.get(); };
+ const BoundFrames* GetEmbeddeds() const
+ { return m_pEmbeddeds.get(); };
+ const BoundFrames* GetShapes() const
+ { return m_pShapes.get(); };
+ private:
+ auto_ptr<BoundFrames> m_pTexts;
+ auto_ptr<BoundFrames> m_pGraphics;
+ auto_ptr<BoundFrames> m_pEmbeddeds;
+ auto_ptr<BoundFrames> m_pShapes;
+ };
+}
typedef OUString *OUStringPtr;
SV_DECL_PTRARR_DEL( OUStrings_Impl, OUStringPtr, 20, 10 )
@@ -221,6 +337,66 @@ enum eParagraphPropertyNamesEnum
TEXT_SECTION = 5
};
+void BoundFrames::Fill(const filter_t& rFilter)
+{
+ if(!m_xEnumAccess.is())
+ return;
+ const Reference< XEnumeration > xEnum = m_xEnumAccess->createEnumeration();
+ if(!xEnum.is())
+ return;
+ while(xEnum->hasMoreElements())
+ {
+ Reference<XPropertySet> xPropSet(xEnum->nextElement(), UNO_QUERY);
+ Reference<XTextContent> xTextContent(xPropSet, UNO_QUERY);
+ if(!xPropSet.is() || !xTextContent.is())
+ continue;
+ TextContentAnchorType eAnchor;
+ xPropSet->getPropertyValue(our_sAnchorType) >>= eAnchor;
+ if(TextContentAnchorType_AT_PAGE != eAnchor && TextContentAnchorType_AT_FRAME != eAnchor)
+ continue;
+ if(!rFilter(xTextContent))
+ continue;
+
+ TextContentSet::inserter_t pInserter = m_vPageBounds.getInserter();
+ if(TextContentAnchorType_AT_FRAME == eAnchor)
+ {
+ Reference<XTextFrame> xAnchorTxtFrame(
+ xPropSet->getPropertyValue(our_sAnchorFrame),
+ uno::UNO_QUERY);
+ pInserter = m_vFrameBoundsOf[xAnchorTxtFrame].getInserter();
+ }
+ *pInserter++ = xTextContent;
+ }
+}
+
+BoundFrameSets::BoundFrameSets(const Reference<XInterface> xModel)
+ : m_pTexts(new BoundFrames())
+ , m_pGraphics(new BoundFrames())
+ , m_pEmbeddeds(new BoundFrames())
+ , m_pShapes(new BoundFrames())
+{
+ const Reference<XTextFramesSupplier> xTFS(xModel, UNO_QUERY);
+ const Reference<XTextGraphicObjectsSupplier> xGOS(xModel, UNO_QUERY);
+ const Reference<XTextEmbeddedObjectsSupplier> xEOS(xModel, UNO_QUERY);
+ const Reference<XDrawPageSupplier> xDPS(xModel, UNO_QUERY);
+ if(xTFS.is())
+ m_pTexts = auto_ptr<BoundFrames>(new BoundFrames(
+ Reference<XEnumerationAccess>(xTFS->getTextFrames(), UNO_QUERY),
+ &lcl_TextContentsUnfiltered));
+ if(xGOS.is())
+ m_pGraphics = auto_ptr<BoundFrames>(new BoundFrames(
+ Reference<XEnumerationAccess>(xGOS->getGraphicObjects(), UNO_QUERY),
+ &lcl_TextContentsUnfiltered));
+ if(xEOS.is())
+ m_pEmbeddeds = auto_ptr<BoundFrames>(new BoundFrames(
+ Reference<XEnumerationAccess>(xEOS->getEmbeddedObjects(), UNO_QUERY),
+ &lcl_TextContentsUnfiltered));
+ if(xDPS.is())
+ m_pShapes = auto_ptr<BoundFrames>(new BoundFrames(
+ Reference<XEnumerationAccess>(xDPS->getDrawPage(), UNO_QUERY),
+ &lcl_ShapeFilter));
+};
+
void XMLTextParagraphExport::Add( sal_uInt16 nFamily,
const Reference < XPropertySet > & rPropSet,
const XMLPropertyState** ppAddStates, bool bDontSeek )
@@ -931,15 +1107,7 @@ XMLTextParagraphExport::XMLTextParagraphExport(
) :
XMLStyleExport( rExp, OUString(), &rASP ),
rAutoStylePool( rASP ),
-
- pPageTextFrameIdxs( 0 ),
- pPageGraphicIdxs( 0 ),
- pPageEmbeddedIdxs( 0 ),
- pPageShapeIdxs( 0 ),
- pFrameTextFrameIdxs( 0 ),
- pFrameGraphicIdxs( 0 ),
- pFrameEmbeddedIdxs( 0 ),
- pFrameShapeIdxs( 0 ),
+ pBoundFrameSets(new BoundFrameSets(GetExport().GetModel())),
pFieldExport( 0 ),
pListElements( 0 ),
// --> OD 2008-05-07 #refactorlists# - no longer needed
@@ -1124,14 +1292,6 @@ XMLTextParagraphExport::~XMLTextParagraphExport()
// delete pExportedLists;
// <--
delete pListAutoPool;
- delete pPageTextFrameIdxs;
- delete pPageGraphicIdxs;
- delete pPageEmbeddedIdxs;
- delete pPageShapeIdxs;
- delete pFrameTextFrameIdxs;
- delete pFrameGraphicIdxs;
- delete pFrameEmbeddedIdxs;
- delete pFrameShapeIdxs;
#ifndef PRODUCT
txtparae_bContainsIllegalCharacters = sal_False;
#endif
@@ -1175,207 +1335,29 @@ SvXMLExportPropertyMapper *XMLTextParagraphExport::CreateParaDefaultExtPropMappe
return new XMLTextExportPropertySetMapper( pPropMapper, rExport );
}
-void XMLTextParagraphExport::collectFrames()
-{
- collectFrames( sal_False );
-}
-
-void XMLTextParagraphExport::collectFrames( sal_Bool bBoundToFrameOnly )
-{
- Reference < XTextFramesSupplier > xTFS( GetExport().GetModel(), UNO_QUERY );
- if( xTFS.is() )
- {
- xTextFrames.set( xTFS->getTextFrames(), uno::UNO_QUERY);
- sal_Int32 nCount = xTextFrames->getCount();
- for( sal_Int32 i = 0; i < nCount; i++ )
- {
- Reference < XPropertySet > xPropSet( xTextFrames->getByIndex( i ), UNO_QUERY );
-
- TextContentAnchorType eAnchor;
- xPropSet->getPropertyValue( sAnchorType ) >>= eAnchor;
-
- switch( eAnchor )
- {
- case TextContentAnchorType_AT_PAGE:
- if( !bBoundToFrameOnly )
- {
- if( !pPageTextFrameIdxs )
- pPageTextFrameIdxs = new SvLongs;
- pPageTextFrameIdxs->Insert( i, pPageTextFrameIdxs->Count() );
- }
- break;
- case TextContentAnchorType_AT_FRAME:
- if( !pFrameTextFrameIdxs )
- pFrameTextFrameIdxs = new SvLongs;
- pFrameTextFrameIdxs->Insert( i, pFrameTextFrameIdxs->Count() );
- break;
- default:
- break;
- }
- }
- }
-
- Reference < XTextGraphicObjectsSupplier > xTGOS( GetExport().GetModel(),
- UNO_QUERY );
- if( xTGOS.is() )
- {
- xGraphics.set( xTGOS->getGraphicObjects(),
- UNO_QUERY );
- sal_Int32 nCount = xGraphics->getCount();
- for( sal_Int32 i = 0; i < nCount; i++ )
- {
- Reference < XPropertySet > xPropSet( xGraphics->getByIndex( i ), UNO_QUERY );
-
- TextContentAnchorType eAnchor;
- xPropSet->getPropertyValue( sAnchorType ) >>= eAnchor;
-
- switch( eAnchor )
- {
- case TextContentAnchorType_AT_PAGE:
- if( !bBoundToFrameOnly )
- {
- if( !pPageGraphicIdxs )
- pPageGraphicIdxs = new SvLongs;
- pPageGraphicIdxs->Insert( i, pPageGraphicIdxs->Count() );
- }
- break;
- case TextContentAnchorType_AT_FRAME:
- if( !pFrameGraphicIdxs )
- pFrameGraphicIdxs = new SvLongs;
- pFrameGraphicIdxs->Insert( i, pFrameGraphicIdxs->Count() );
- break;
- default:
- break;
- }
- }
- }
-
- Reference < XTextEmbeddedObjectsSupplier > xTEOS( GetExport().GetModel(),
- UNO_QUERY );
- if( xTEOS.is() )
- {
- xEmbeddeds = Reference < XIndexAccess >( xTEOS->getEmbeddedObjects(),
- UNO_QUERY );
- sal_Int32 nCount = xEmbeddeds->getCount();
- for( sal_Int32 i = 0; i < nCount; i++ )
- {
- Reference < XPropertySet > xPropSet( xEmbeddeds->getByIndex( i ), UNO_QUERY );
-
- TextContentAnchorType eAnchor;
- xPropSet->getPropertyValue( sAnchorType ) >>= eAnchor;
-
- switch( eAnchor )
- {
- case TextContentAnchorType_AT_PAGE:
- if( !bBoundToFrameOnly )
- {
- if( !pPageEmbeddedIdxs )
- pPageEmbeddedIdxs = new SvLongs;
- pPageEmbeddedIdxs->Insert( i, pPageEmbeddedIdxs->Count() );
- }
- break;
- case TextContentAnchorType_AT_FRAME:
- if( !pFrameEmbeddedIdxs )
- pFrameEmbeddedIdxs = new SvLongs;
- pFrameEmbeddedIdxs->Insert( i, pFrameEmbeddedIdxs->Count() );
- break;
- default:
- break;
- }
- }
- }
-
- Reference < XDrawPageSupplier > xDPS( GetExport().GetModel(),
- UNO_QUERY );
- if( xDPS.is() )
- {
- xShapes = Reference < XIndexAccess >( xDPS->getDrawPage(),
- UNO_QUERY );
- sal_Int32 nCount = xShapes->getCount();
- for( sal_Int32 i = 0; i < nCount; i++ )
- {
- Reference < XShape > xShape(xShapes->getByIndex( i ), uno::UNO_QUERY);
- if( !xShape.is() )
- continue;
-
- Reference < XPropertySet > xPropSet( xShape, UNO_QUERY );
-
- TextContentAnchorType eAnchor;
- xPropSet->getPropertyValue( sAnchorType ) >>= eAnchor;
-
- if( (TextContentAnchorType_AT_PAGE != eAnchor &&
- TextContentAnchorType_AT_FRAME != eAnchor) ||
- (TextContentAnchorType_AT_PAGE == eAnchor &&
- bBoundToFrameOnly ) )
- continue;
-
- Reference<XServiceInfo> xServiceInfo( xShape,
- UNO_QUERY );
- if( xServiceInfo->supportsService( sTextFrameService ) ||
- xServiceInfo->supportsService( sTextGraphicService ) ||
- xServiceInfo->supportsService( sTextEmbeddedService ) )
- continue;
-
- if( TextContentAnchorType_AT_PAGE == eAnchor )
- {
- if( !pPageShapeIdxs )
- pPageShapeIdxs = new SvLongs;
- pPageShapeIdxs->Insert( i, pPageShapeIdxs->Count() );
- }
- else
- {
- if( !pFrameShapeIdxs )
- pFrameShapeIdxs = new SvLongs;
- pFrameShapeIdxs->Insert( i, pFrameShapeIdxs->Count() );
- }
- }
- }
-}
-
void XMLTextParagraphExport::exportPageFrames( sal_Bool bAutoStyles,
sal_Bool bIsProgress )
{
- if( pPageTextFrameIdxs )
- {
- for( sal_uInt16 i = 0; i < pPageTextFrameIdxs->Count(); i++ )
- {
- Reference < XTextContent > xTxtCntnt( xTextFrames->getByIndex( (*pPageTextFrameIdxs)[i] ), UNO_QUERY );
- exportTextFrame( xTxtCntnt, bAutoStyles, bIsProgress, sal_True );
- }
- }
- if( pPageGraphicIdxs )
- {
- for( sal_uInt16 i = 0; i < pPageGraphicIdxs->Count(); i++ )
- {
- Reference < XTextContent > xTxtCntnt(xGraphics->getByIndex( (*pPageGraphicIdxs)[i] ), uno::UNO_QUERY);
- exportTextGraphic( xTxtCntnt, bAutoStyles );
- }
- }
- if( pPageEmbeddedIdxs )
- {
- for( sal_uInt16 i = 0; i < pPageEmbeddedIdxs->Count(); i++ )
- {
- Reference < XTextContent > xTxtCntnt(xEmbeddeds->getByIndex( (*pPageEmbeddedIdxs)[i] ), uno::UNO_QUERY);
- exportTextEmbedded( xTxtCntnt, bAutoStyles );
- }
- }
- if( pPageShapeIdxs )
- {
- for( sal_uInt16 i = 0; i < pPageShapeIdxs->Count(); i++ )
- {
- Reference < XTextContent > xTxtCntnt( xShapes->getByIndex( (*pPageShapeIdxs)[i] ), UNO_QUERY );
- exportShape( xTxtCntnt, bAutoStyles );
- }
- }
-}
-
-sal_Bool lcl_txtpara_isFrameAnchor(
- const Reference < XPropertySet > rPropSet,
- const Reference < XTextFrame >& rParentTxtFrame )
-{
- Reference < XTextFrame > xAnchorTxtFrame(rPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("AnchorFrame") ) ), uno::UNO_QUERY);
-
- return xAnchorTxtFrame == rParentTxtFrame;
+ const TextContentSet* const pTexts = pBoundFrameSets->GetTexts()->GetPageBoundContents();
+ const TextContentSet* const pGraphics = pBoundFrameSets->GetGraphics()->GetPageBoundContents();
+ const TextContentSet* const pEmbeddeds = pBoundFrameSets->GetEmbeddeds()->GetPageBoundContents();
+ const TextContentSet* const pShapes = pBoundFrameSets->GetShapes()->GetPageBoundContents();
+ for(TextContentSet::const_iterator_t it = pTexts->getBegin();
+ it != pTexts->getEnd();
+ ++it)
+ exportTextFrame(*it, bAutoStyles, bIsProgress, sal_True);
+ for(TextContentSet::const_iterator_t it = pGraphics->getBegin();
+ it != pGraphics->getEnd();
+ ++it)
+ exportTextGraphic(*it, bAutoStyles);
+ for(TextContentSet::const_iterator_t it = pEmbeddeds->getBegin();
+ it != pEmbeddeds->getEnd();
+ ++it)
+ exportTextEmbedded(*it, bAutoStyles);
+ for(TextContentSet::const_iterator_t it = pShapes->getBegin();
+ it != pShapes->getEnd();
+ ++it)
+ exportShape(*it, bAutoStyles);
}
void XMLTextParagraphExport::exportFrameFrames(
@@ -1383,97 +1365,30 @@ void XMLTextParagraphExport::exportFrameFrames(
sal_Bool bIsProgress,
const Reference < XTextFrame > *pParentTxtFrame )
{
- if( pFrameTextFrameIdxs && pFrameTextFrameIdxs->Count() )
- {
- sal_uInt16 i = 0;
- while( i < pFrameTextFrameIdxs->Count() )
- {
- Reference < XPropertySet > xPropSet( xTextFrames->getByIndex( (*pFrameTextFrameIdxs)[i] ), UNO_QUERY );
- if( lcl_txtpara_isFrameAnchor( xPropSet, *pParentTxtFrame ) )
- {
- if( !bAutoStyles )
- pFrameTextFrameIdxs->Remove( i );
- sal_uInt16 nOldCount = pFrameTextFrameIdxs->Count();
- Reference < XTextContent > xTxtCntnt( xPropSet, UNO_QUERY );
- exportTextFrame( xTxtCntnt, bAutoStyles, bIsProgress, sal_True );
- if( bAutoStyles )
- i++;
- else if( pFrameTextFrameIdxs->Count() != nOldCount )
- i = 0;
- }
- else
- i++;
- }
- }
- if( pFrameGraphicIdxs && pFrameGraphicIdxs->Count() )
- {
- Any aAny;
- sal_uInt16 i = 0;
- while( i < pFrameGraphicIdxs->Count() )
- {
- Reference < XPropertySet > xPropSet( xGraphics->getByIndex( (*pFrameGraphicIdxs)[i] ), UNO_QUERY );
- if( lcl_txtpara_isFrameAnchor( xPropSet, *pParentTxtFrame ) )
- {
- if( !bAutoStyles )
- pFrameGraphicIdxs->Remove( i );
- sal_uInt16 nOldCount = pFrameGraphicIdxs->Count();
- Reference < XTextContent > xTxtCntnt(xPropSet, uno::UNO_QUERY);
- exportTextGraphic( xTxtCntnt, bAutoStyles );
- if( bAutoStyles )
- i++;
- else if( pFrameGraphicIdxs->Count() != nOldCount )
- i = 0;
- }
- else
- i++;
- }
- }
- if( pFrameEmbeddedIdxs && pFrameEmbeddedIdxs->Count() )
- {
- Any aAny;
- sal_uInt16 i = 0;
- while( i < pFrameEmbeddedIdxs->Count() )
- {
- Reference < XPropertySet > xPropSet( xEmbeddeds->getByIndex( (*pFrameEmbeddedIdxs)[i] ), UNO_QUERY );
- if( lcl_txtpara_isFrameAnchor( xPropSet, *pParentTxtFrame ) )
- {
- if( !bAutoStyles )
- pFrameEmbeddedIdxs->Remove( i );
- sal_uInt16 nOldCount = pFrameEmbeddedIdxs->Count();
- Reference < XTextContent > xTxtCntnt( xPropSet, UNO_QUERY );
- exportTextEmbedded( xTxtCntnt, bAutoStyles );
- if( bAutoStyles )
- i++;
- else if( pFrameEmbeddedIdxs->Count() != nOldCount )
- i = 0;
- }
- else
- i++;
- }
- }
- if( pFrameShapeIdxs && pFrameShapeIdxs->Count() )
- {
- Any aAny;
- sal_uInt16 i = 0;
- while( i < pFrameShapeIdxs->Count() )
- {
- Reference < XPropertySet > xPropSet( xShapes->getByIndex( (*pFrameShapeIdxs)[i] ), UNO_QUERY );
- if( lcl_txtpara_isFrameAnchor( xPropSet, *pParentTxtFrame ) )
- {
- if( !bAutoStyles )
- pFrameShapeIdxs->Remove( i );
- sal_uInt16 nOldCount = pFrameShapeIdxs->Count();
- Reference < XTextContent > xTxtCntnt( xPropSet, UNO_QUERY );
- exportShape( xTxtCntnt, bAutoStyles );
- if( bAutoStyles )
- i++;
- else if( pFrameShapeIdxs->Count() != nOldCount )
- i = 0;
- }
- else
- i++;
- }
- }
+ const TextContentSet* const pTexts = pBoundFrameSets->GetTexts()->GetFrameBoundContents(*pParentTxtFrame);
+ if(pTexts)
+ for(TextContentSet::const_iterator_t it = pTexts->getBegin();
+ it != pTexts->getEnd();
+ ++it)
+ exportTextFrame(*it, bAutoStyles, bIsProgress, sal_True);
+ const TextContentSet* const pGraphics = pBoundFrameSets->GetGraphics()->GetFrameBoundContents(*pParentTxtFrame);
+ if(pGraphics)
+ for(TextContentSet::const_iterator_t it = pGraphics->getBegin();
+ it != pGraphics->getEnd();
+ ++it)
+ exportTextGraphic(*it, bAutoStyles);
+ const TextContentSet* const pEmbeddeds = pBoundFrameSets->GetEmbeddeds()->GetFrameBoundContents(*pParentTxtFrame);
+ if(pEmbeddeds)
+ for(TextContentSet::const_iterator_t it = pEmbeddeds->getBegin();
+ it != pEmbeddeds->getEnd();
+ ++it)
+ exportTextEmbedded(*it, bAutoStyles);
+ const TextContentSet* const pShapes = pBoundFrameSets->GetShapes()->GetFrameBoundContents(*pParentTxtFrame);
+ if(pShapes)
+ for(TextContentSet::const_iterator_t it = pShapes->getBegin();
+ it != pShapes->getEnd();
+ ++it)
+ exportShape(*it, bAutoStyles);
}
// bookmarks, reference marks (and TOC marks) are the same except for the
@@ -1562,62 +1477,50 @@ bool XMLTextParagraphExport::collectTextAutoStylesOptimized( sal_Bool bIsProgres
}
// Export text frames:
- sal_Int32 nCount = 0;
- if ( xTextFrames.is() )
- {
- nCount = xTextFrames->getCount();
- for( sal_Int32 i = 0; i < nCount; ++i )
+ Reference<XEnumeration> xTextFramesEnum = pBoundFrameSets->GetTexts()->createEnumeration();
+ if(xTextFramesEnum.is())
+ while(xTextFramesEnum->hasMoreElements())
{
- Any aAny = xTextFrames->getByIndex( i );
- Reference < XTextContent > xTxtCntnt( aAny, UNO_QUERY );
- if ( xTxtCntnt.is() )
- exportTextFrame( xTxtCntnt, bAutoStyles, bIsProgress, bExportContent, 0 );
+ Reference<XTextContent> xTxtCntnt(xTextFramesEnum->nextElement(), UNO_QUERY);
+ if(xTxtCntnt.is())
+ exportTextFrame(xTxtCntnt, bAutoStyles, bIsProgress, bExportContent, 0);
}
- }
// Export graphic objects:
- if ( xGraphics.is() )
- {
- nCount = xGraphics->getCount();
- for( sal_Int32 i = 0; i < nCount; ++i )
+ Reference<XEnumeration> xGraphicsEnum = pBoundFrameSets->GetGraphics()->createEnumeration();
+ if(xGraphicsEnum.is())
+ while(xGraphicsEnum->hasMoreElements())
{
- Any aAny = xGraphics->getByIndex( i );
- Reference < XTextContent > xTxtCntnt( aAny, UNO_QUERY );
- if ( xTxtCntnt.is() )
- exportTextGraphic( xTxtCntnt, sal_True, 0 );
+ Reference<XTextContent> xTxtCntnt(xGraphicsEnum->nextElement(), UNO_QUERY);
+ if(xTxtCntnt.is())
+ exportTextGraphic(xTxtCntnt, true, 0);
}
- }
// Export embedded objects:
- if ( xEmbeddeds.is() )
- {
- nCount = xEmbeddeds->getCount();
- for( sal_Int32 i = 0; i < nCount; ++i )
+ Reference<XEnumeration> xEmbeddedsEnum = pBoundFrameSets->GetEmbeddeds()->createEnumeration();
+ if(xEmbeddedsEnum.is())
+ while(xEmbeddedsEnum->hasMoreElements())
{
- Any aAny = xEmbeddeds->getByIndex( i );
- Reference < XTextContent > xTxtCntnt( aAny, UNO_QUERY );
- if ( xTxtCntnt.is() )
- exportTextEmbedded( xTxtCntnt, sal_True, 0 );
+ Reference<XTextContent> xTxtCntnt(xEmbeddedsEnum->nextElement(), UNO_QUERY);
+ if(xTxtCntnt.is())
+ exportTextEmbedded(xTxtCntnt, true, 0);
}
- }
// Export shapes:
- if ( xShapes.is() )
- {
- nCount = xShapes->getCount();
- for( sal_Int32 i = 0; i < nCount; ++i )
+ Reference<XEnumeration> xShapesEnum = pBoundFrameSets->GetShapes()->createEnumeration();
+ if(xShapesEnum.is())
+ while(xShapesEnum->hasMoreElements())
{
- Any aAny( xShapes->getByIndex( i ) );
- Reference < XTextContent > xTxtCntnt( aAny, UNO_QUERY );
- if ( xTxtCntnt.is() )
+ Reference<XTextContent> xTxtCntnt(xShapesEnum->nextElement(), UNO_QUERY);
+ if(xTxtCntnt.is())
{
- Reference<XServiceInfo> xServiceInfo( xTxtCntnt, UNO_QUERY );
- if( xServiceInfo->supportsService( sShapeService ) )
- exportShape( xTxtCntnt, sal_True, 0 );
+ Reference<XServiceInfo> xServiceInfo(xTxtCntnt, UNO_QUERY);
+ if( xServiceInfo->supportsService(sShapeService))
+ exportShape(xTxtCntnt, true, 0);
}
}
- }
+ sal_Int32 nCount;
// AutoStyles for sections
Reference< XTextSectionsSupplier > xSectionsSupp( GetExport().GetModel(), UNO_QUERY );
if ( xSectionsSupp.is() )
@@ -2739,7 +2642,7 @@ void XMLTextParagraphExport::exportAnyTextFrame(
{
Reference < XTextFrame > xTxtFrame( rTxtCntnt, UNO_QUERY );
Reference < XText > xTxt(xTxtFrame->getText());
- collectFramesBoundToFrameAutoStyles( xTxtFrame, bIsProgress );
+ exportFrameFrames( sal_True, bIsProgress, &xTxtFrame );
exportText( xTxt, bAutoStyles, bIsProgress, sal_True );
}
}
@@ -3745,8 +3648,10 @@ void XMLTextParagraphExport::PreventExportOfControlsInMuteSections(
}
DBG_ASSERT( pSectionExport != NULL, "We need the section export." );
- sal_Int32 nShapes = xShapes->getCount();
- for( sal_Int32 i = 0; i < nShapes; i++ )
+ Reference<XEnumeration> xShapesEnum = pBoundFrameSets->GetShapes()->createEnumeration();
+ if(!xShapesEnum.is())
+ return;
+ while( xShapesEnum->hasMoreElements() )
{
// now we need to check
// 1) if this is a control shape, and
@@ -3754,7 +3659,7 @@ void XMLTextParagraphExport::PreventExportOfControlsInMuteSections(
// if both answers are 'yes', notify the form layer export
// we join accessing the shape and testing for control
- Reference<XControlShape> xControlShape(xShapes->getByIndex( i ), uno::UNO_QUERY);
+ Reference<XControlShape> xControlShape(xShapesEnum->nextElement(), UNO_QUERY);
if( xControlShape.is() )
{
// Reference<XPropertySet> xPropSet( xControlShape, UNO_QUERY );