summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-06-03 11:26:39 +0000
committerKurt Zenker <kz@openoffice.org>2009-06-03 11:26:39 +0000
commit9bd99c08e8662becdd5ac8b47ef6f953c14e65fc (patch)
tree6e24471a44aa535e5b8658b3dc3989437efd525c /linguistic
parent5fedf27a120ae92b6474e0d489f3018e8e317f8d (diff)
CWS-TOOLING: integrate CWS os128
2009-04-22 12:58:26 +0200 b_michaelsen r271093 : #i101084# using the frames enumeration for other SwXFrames-queries; also added a complex test to ensure the behavior to be the same 2009-04-20 14:53:03 +0200 mav r270987 : #i101219# adjust the testcases to test memory cache and temporary file cache 2009-04-20 14:52:09 +0200 mav r270986 : #i101219#,#i99077# use memory to cache data; no precopying on commit 2009-04-20 14:39:21 +0200 mav r270984 : #i101219# use memory to cache data 2009-04-20 14:39:08 +0200 mav r270983 : #i101219# use memory to cache data 2009-04-20 14:38:45 +0200 mav r270982 : #i101219# use memory to cache data 2009-04-17 07:37:52 +0200 os r270912 : CWS-TOOLING: rebase CWS os128 to trunk@270723 (milestone: DEV300:m46) 2009-04-15 14:54:18 +0200 b_michaelsen r270845 : #i101084# using frame enumerations for paragraph export for better performance 2009-04-15 14:52:54 +0200 b_michaelsen r270843 : #i101084# implemented XEnumerationAccess interface on framesets 2009-04-03 17:08:10 +0200 mav r270504 : #i100722# do not compress streams of known compressed types per default 2009-04-03 13:49:50 +0200 os r270484 : resync error fixed 2009-04-03 12:55:32 +0200 mav r270470 : #i100722# do not compress streams of known compressed types per default 2009-04-03 10:00:58 +0200 os r270463 : resync error fixed 2009-04-03 09:52:53 +0200 os r270462 : resync error fixed 2009-04-03 09:10:14 +0200 os r270449 : #i99568# string compare operator of hash_map changed 2009-04-03 09:03:49 +0200 os r270446 : #i100683# normalize file URLs 2009-04-02 11:09:27 +0200 os r270381 : #i100683# making URLs relative without file access 2009-04-02 09:04:42 +0200 os r270366 : CWS-TOOLING: rebase CWS os128 to trunk@270033 (milestone: DEV300:m45) 2009-03-31 08:08:37 +0200 os r270258 : #i100683# reducing calls to URIHelper::simpleNormalizeMakeRelative() 2009-03-19 17:06:22 +0100 os r269756 : #i99568# XTolerantMultiPropertySet activated 2009-03-16 11:46:14 +0100 os r269517 : wrong commit to #i97471# removed 2009-03-16 11:36:50 +0100 os r269514 : #i97471# SwDrawTextShell::Init(): mouse double click and key input in group objects at the same time: prevent crash 2009-03-13 11:08:54 +0100 os r269464 : #i99568# static SfxItemPropertySet 2009-03-13 11:03:22 +0100 os r269463 : #i99568# static SfxItemPropertySet 2009-03-11 12:59:27 +0100 os r269320 : #i99568# WhichId of properties handled from ScDocOptionsObj added 2009-03-06 09:09:58 +0100 os r268972 : #i99568# SfxItemPropertySet improvements 2009-03-05 20:54:43 +0100 os r268942 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 20:19:52 +0100 os r268941 : #i99568# SfxItemPropertySet improvements 2009-03-05 20:05:03 +0100 os r268940 : #i99568# SfxItemPropertySet improvements 2009-03-05 18:54:47 +0100 os r268936 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 17:51:38 +0100 os r268931 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 17:33:03 +0100 os r268930 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 15:53:00 +0100 os r268920 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 15:52:50 +0100 os r268919 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 15:50:41 +0100 os r268918 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 15:41:04 +0100 os r268916 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 15:40:40 +0100 os r268915 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 10:16:20 +0100 os r268881 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 10:15:55 +0100 os r268880 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-03 08:40:09 +0100 os r268704 : ScTableSheetObj::GetItemPropertyMap fixed 2009-03-03 07:50:00 +0100 os r268703 : SfxItemProperty set as pointer 2009-03-03 07:49:46 +0100 os r268702 : SfxItemProperty set as pointer 2009-03-02 08:15:37 +0100 os r268631 : minor fix 2009-03-02 07:58:38 +0100 os r268630 : minor fix 2009-02-27 13:03:25 +0100 os r268584 : exports 2009-02-27 11:17:04 +0100 os r268567 : debug code removed 2009-02-27 11:04:07 +0100 os r268565 : duplicate return removed 2009-02-27 10:17:37 +0100 os r268558 : syntax fixed 2009-02-27 09:56:14 +0100 os r268554 : #i99568# type mix fixed 2009-02-27 09:40:56 +0100 os r268553 : #i99568# exports changes reverted 2009-02-25 12:50:54 +0100 os r268433 : #i99568# SfxItemPropertySet rework 2009-02-25 12:13:39 +0100 os r268432 : #i99568# SfxItemPropertySet rework 2009-02-25 12:12:47 +0100 os r268431 : #i99568# SfxItemPropertySet rework 2009-02-25 12:10:27 +0100 os r268430 : #i99568# SfxItemPropertySet rework 2009-02-25 12:09:36 +0100 os r268429 : #i99568# SfxItemPropertySet rework 2009-02-25 12:07:39 +0100 os r268428 : #i99568# SfxItemPropertySet rework 2009-02-25 11:59:35 +0100 os r268427 : #i99568# SfxItemPropertySet rework 2009-02-25 11:52:52 +0100 os r268425 : #i99568# SfxItemPropertySet rework 2009-02-25 11:49:17 +0100 os r268424 : #i99568# SfxItemPropertySet rework 2009-02-25 11:45:17 +0100 os r268423 : #i99568# SfxItemPropertySet rework 2009-02-11 11:39:04 +0100 os r267587 : #i57008# use registration of index marks at SwUnoCallback
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/lngopt.cxx121
-rw-r--r--linguistic/source/lngopt.hxx2
2 files changed, 62 insertions, 61 deletions
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index 84055d97eaf1..bd2473528d81 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 f6144b7f117d..3a92baa32faf 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;