diff options
Diffstat (limited to 'svl/source')
124 files changed, 2069 insertions, 2069 deletions
diff --git a/svl/source/config/asiancfg.cxx b/svl/source/config/asiancfg.cxx index 02da1db70d63..e7829e49b3ae 100644 --- a/svl/source/config/asiancfg.cxx +++ b/svl/source/config/asiancfg.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -52,9 +52,9 @@ const sal_Char sEndCharacters[] = "EndCharacters"; //----------------------------------------------------------------------------- struct SvxForbiddenStruct_Impl { - Locale aLocale; - OUString sStartChars; - OUString sEndChars; + Locale aLocale; + OUString sStartChars; + OUString sEndChars; }; //----------------------------------------------------------------------------- typedef SvxForbiddenStruct_Impl* SvxForbiddenStruct_ImplPtr; @@ -63,10 +63,10 @@ SV_IMPL_PTRARR(SvxForbiddenStructArr, SvxForbiddenStruct_ImplPtr); //----------------------------------------------------------------------------- struct SvxAsianConfig_Impl { - sal_Bool bKerningWesternTextOnly; - sal_Int16 nCharDistanceCompression; + sal_Bool bKerningWesternTextOnly; + sal_Int16 nCharDistanceCompression; - SvxForbiddenStructArr aForbiddenArr; + SvxForbiddenStructArr aForbiddenArr; SvxAsianConfig_Impl() : bKerningWesternTextOnly(sal_True), @@ -125,8 +125,8 @@ void SvxAsianConfig::Load() OUString sStart(sPropPrefix); sStart += pNodes[nNode]; sStart += C2U("/"); - pNames[nName] = sStart; pNames[nName++] += C2U("StartCharacters"); - pNames[nName] = sStart; pNames[nName++] += C2U("EndCharacters"); + pNames[nName] = sStart; pNames[nName++] += C2U("StartCharacters"); + pNames[nName] = sStart; pNames[nName++] += C2U("EndCharacters"); } Sequence<Any> aNodeValues = GetProperties(aPropNames); const Any* pNodeValues = aNodeValues.getConstArray(); @@ -146,7 +146,7 @@ void SvxAsianConfig::Load() /* -----------------------------17.01.01 09:57-------------------------------- ---------------------------------------------------------------------------*/ -void SvxAsianConfig::Notify( const Sequence<OUString>& ) +void SvxAsianConfig::Notify( const Sequence<OUString>& ) { Load(); } @@ -192,14 +192,14 @@ void SvxAsianConfig::Commit() /* -----------------------------16.01.01 15:36-------------------------------- ---------------------------------------------------------------------------*/ -sal_Bool SvxAsianConfig::IsKerningWesternTextOnly() const +sal_Bool SvxAsianConfig::IsKerningWesternTextOnly() const { return pImpl->bKerningWesternTextOnly; } /* -----------------------------16.01.01 15:36-------------------------------- ---------------------------------------------------------------------------*/ -void SvxAsianConfig::SetKerningWesternTextOnly(sal_Bool bSet) +void SvxAsianConfig::SetKerningWesternTextOnly(sal_Bool bSet) { pImpl->bKerningWesternTextOnly = bSet; SetModified(); @@ -207,14 +207,14 @@ void SvxAsianConfig::SetKerningWesternTextOnly(sal_Bool bSet) /* -----------------------------16.01.01 15:36-------------------------------- ---------------------------------------------------------------------------*/ -sal_Int16 SvxAsianConfig::GetCharDistanceCompression() const +sal_Int16 SvxAsianConfig::GetCharDistanceCompression() const { return pImpl->nCharDistanceCompression; } /* -----------------------------16.01.01 15:36-------------------------------- ---------------------------------------------------------------------------*/ -void SvxAsianConfig::SetCharDistanceCompression(sal_Int16 nSet) +void SvxAsianConfig::SetCharDistanceCompression(sal_Int16 nSet) { DBG_ASSERT(nSet >= 0 && nSet < 3, "compression value illegal"); SetModified(); @@ -236,7 +236,7 @@ uno::Sequence<lang::Locale> SvxAsianConfig::GetStartEndCharLocales() /* -----------------------------16.01.01 15:36-------------------------------- ---------------------------------------------------------------------------*/ -sal_Bool SvxAsianConfig::GetStartEndChars( const Locale& rLocale, +sal_Bool SvxAsianConfig::GetStartEndChars( const Locale& rLocale, OUString& rStartChars, OUString& rEndChars ) { diff --git a/svl/source/config/cjkoptions.cxx b/svl/source/config/cjkoptions.cxx index cb332ac579f1..bcaf4d801016 100644 --- a/svl/source/config/cjkoptions.cxx +++ b/svl/source/config/cjkoptions.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -76,8 +76,8 @@ public: SvtCJKOptions_Impl(); ~SvtCJKOptions_Impl(); - virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames ); - virtual void Commit(); + virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames ); + virtual void Commit(); void Load(); sal_Bool IsLoaded() { return bIsLoaded; } @@ -102,9 +102,9 @@ public: -----------------------------------------------------------------------*/ namespace -{ - struct PropertyNames - : public rtl::Static< Sequence<OUString>, PropertyNames > {}; +{ + struct PropertyNames + : public rtl::Static< Sequence<OUString>, PropertyNames > {}; } SvtCJKOptions_Impl::SvtCJKOptions_Impl() : @@ -223,7 +223,7 @@ void SvtCJKOptions_Impl::Load() SvtSystemLanguageOptions aSystemLocaleSettings; LanguageType eSystemLanguage = aSystemLocaleSettings.GetWin16SystemLanguage(); sal_uInt16 nWinScript = SvtLanguageOptions::GetScriptTypeOfLanguage( eSystemLanguage ); - + sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage(LANGUAGE_SYSTEM); if ( !bCJKFont && (( nScriptType & SCRIPTTYPE_ASIAN )|| ((eSystemLanguage != LANGUAGE_SYSTEM) && ( nWinScript & SCRIPTTYPE_ASIAN )))) diff --git a/svl/source/config/ctloptions.cxx b/svl/source/config/ctloptions.cxx index 983c202cb709..a293bbda3f8d 100644 --- a/svl/source/config/ctloptions.cxx +++ b/svl/source/config/ctloptions.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -46,7 +46,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -#define ASCII_STR(s) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(s) ) +#define ASCII_STR(s) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(s) ) #define CFG_READONLY_DEFAULT sal_False // SvtCJKOptions_Impl ---------------------------------------------------------- @@ -54,17 +54,17 @@ using namespace ::com::sun::star::uno; class SvtCTLOptions_Impl : public utl::ConfigItem { private: - sal_Bool m_bIsLoaded; - sal_Bool m_bCTLFontEnabled; - sal_Bool m_bCTLSequenceChecking; - sal_Bool m_bCTLRestricted; + sal_Bool m_bIsLoaded; + sal_Bool m_bCTLFontEnabled; + sal_Bool m_bCTLSequenceChecking; + sal_Bool m_bCTLRestricted; sal_Bool m_bCTLTypeAndReplace; SvtCTLOptions::CursorMovement m_eCTLCursorMovement; - SvtCTLOptions::TextNumerals m_eCTLTextNumerals; + SvtCTLOptions::TextNumerals m_eCTLTextNumerals; sal_Bool m_bROCTLFontEnabled; sal_Bool m_bROCTLSequenceChecking; - sal_Bool m_bROCTLRestricted; + sal_Bool m_bROCTLRestricted; sal_Bool m_bROCTLTypeAndReplace; sal_Bool m_bROCTLCursorMovement; sal_Bool m_bROCTLTextNumerals; @@ -73,19 +73,19 @@ public: SvtCTLOptions_Impl(); ~SvtCTLOptions_Impl(); - virtual void Notify( const Sequence< rtl::OUString >& _aPropertyNames ); - virtual void Commit(); + virtual void Notify( const Sequence< rtl::OUString >& _aPropertyNames ); + virtual void Commit(); void Load(); - sal_Bool IsLoaded() { return m_bIsLoaded; } - void SetCTLFontEnabled( sal_Bool _bEnabled ); - sal_Bool IsCTLFontEnabled() const { return m_bCTLFontEnabled; } + sal_Bool IsLoaded() { return m_bIsLoaded; } + void SetCTLFontEnabled( sal_Bool _bEnabled ); + sal_Bool IsCTLFontEnabled() const { return m_bCTLFontEnabled; } void SetCTLSequenceChecking( sal_Bool _bEnabled ); sal_Bool IsCTLSequenceChecking() const { return m_bCTLSequenceChecking;} - void SetCTLSequenceCheckingRestricted( sal_Bool _bEnable ); - sal_Bool IsCTLSequenceCheckingRestricted( void ) const { return m_bCTLRestricted; } + void SetCTLSequenceCheckingRestricted( sal_Bool _bEnable ); + sal_Bool IsCTLSequenceCheckingRestricted( void ) const { return m_bCTLRestricted; } void SetCTLSequenceCheckingTypeAndReplace( sal_Bool _bEnable ); sal_Bool IsCTLSequenceCheckingTypeAndReplace() const { return m_bCTLTypeAndReplace; } @@ -94,7 +94,7 @@ public: SvtCTLOptions::CursorMovement GetCTLCursorMovement() const { return m_eCTLCursorMovement; } - void SetCTLTextNumerals( SvtCTLOptions::TextNumerals _eNumerals ); + void SetCTLTextNumerals( SvtCTLOptions::TextNumerals _eNumerals ); SvtCTLOptions::TextNumerals GetCTLTextNumerals() const { return m_eCTLTextNumerals; } @@ -103,8 +103,8 @@ public: //------------------------------------------------------------------------------ namespace { - struct PropertyNames - : public rtl::Static< Sequence< rtl::OUString >, PropertyNames > {}; + struct PropertyNames + : public rtl::Static< Sequence< rtl::OUString >, PropertyNames > {}; } //------------------------------------------------------------------------------ sal_Bool SvtCTLOptions_Impl::IsReadOnly(SvtCTLOptions::EOption eOption) const @@ -127,16 +127,16 @@ SvtCTLOptions_Impl::SvtCTLOptions_Impl() : utl::ConfigItem( ASCII_STR("Office.Common/I18N/CTL") ), - m_bIsLoaded ( sal_False ), - m_bCTLFontEnabled ( sal_False ), - m_bCTLSequenceChecking ( sal_False ), - m_bCTLRestricted ( sal_False ), - m_eCTLCursorMovement ( SvtCTLOptions::MOVEMENT_LOGICAL ), + m_bIsLoaded ( sal_False ), + m_bCTLFontEnabled ( sal_False ), + m_bCTLSequenceChecking ( sal_False ), + m_bCTLRestricted ( sal_False ), + m_eCTLCursorMovement ( SvtCTLOptions::MOVEMENT_LOGICAL ), m_eCTLTextNumerals ( SvtCTLOptions::NUMERALS_ARABIC ), m_bROCTLFontEnabled ( CFG_READONLY_DEFAULT ), m_bROCTLSequenceChecking( CFG_READONLY_DEFAULT ), - m_bROCTLRestricted ( CFG_READONLY_DEFAULT ), + m_bROCTLRestricted ( CFG_READONLY_DEFAULT ), m_bROCTLCursorMovement ( CFG_READONLY_DEFAULT ), m_bROCTLTextNumerals ( CFG_READONLY_DEFAULT ) { @@ -234,9 +234,9 @@ void SvtCTLOptions_Impl::Commit() pNames[nRealCount] = pOrgNames[nProp]; pValues[nRealCount].setValue( &m_bCTLTypeAndReplace, rType ); ++nRealCount; - } + } } - break; + break; } } aNames.realloc(nRealCount); @@ -376,8 +376,8 @@ void SvtCTLOptions_Impl::SetCTLTextNumerals( SvtCTLOptions::TextNumerals _eNumer } // global ---------------------------------------------------------------- -static SvtCTLOptions_Impl* pCTLOptions = NULL; -static sal_Int32 nCTLRefCount = 0; +static SvtCTLOptions_Impl* pCTLOptions = NULL; +static sal_Int32 nCTLRefCount = 0; namespace { struct CTLMutex : public rtl::Static< osl::Mutex, CTLMutex > {}; } // class SvtCTLOptions -------------------------------------------------- diff --git a/svl/source/config/itemholder2.cxx b/svl/source/config/itemholder2.cxx index b0ec824f2b17..b485a334eb2c 100644 --- a/svl/source/config/itemholder2.cxx +++ b/svl/source/config/itemholder2.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/config/itemholder2.hxx b/svl/source/config/itemholder2.hxx index 9314021b5750..3008cc78b9cd 100644 --- a/svl/source/config/itemholder2.hxx +++ b/svl/source/config/itemholder2.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx index 8f9aabd59500..8414b3181fb2 100644 --- a/svl/source/config/languageoptions.cxx +++ b/svl/source/config/languageoptions.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -63,7 +63,7 @@ SvtLanguageOptions::~SvtLanguageOptions() m_pCTLOptions->RemoveListener(this); m_pCJKOptions->RemoveListener(this); - + delete m_pCJKOptions; delete m_pCTLOptions; } @@ -231,7 +231,7 @@ sal_uInt16 SvtLanguageOptions::GetScriptTypeOfLanguage( sal_uInt16 nLang ) /*-- 27.10.2005 08:18:01--------------------------------------------------- -----------------------------------------------------------------------*/ -SvtSystemLanguageOptions::SvtSystemLanguageOptions() : +SvtSystemLanguageOptions::SvtSystemLanguageOptions() : utl::ConfigItem( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("System/L10N") )) { uno::Sequence< rtl::OUString > aPropertyNames(1); diff --git a/svl/source/config/srchcfg.cxx b/svl/source/config/srchcfg.cxx index cf9fd1799650..3fabd161a72b 100644 --- a/svl/source/config/srchcfg.cxx +++ b/svl/source/config/srchcfg.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -104,9 +104,9 @@ SvxSearchConfig::SvxSearchConfig(sal_Bool bEnableNotify) : pImpl(new SvxSearchConfig_Impl) { if(bEnableNotify) - { + { //request notifications from the node - Sequence<OUString> aEnable(1); + Sequence<OUString> aEnable(1); EnableNotification(aEnable); } Load(); diff --git a/svl/source/filepicker/pickerhelper.cxx b/svl/source/filepicker/pickerhelper.cxx index 72096c1bc56a..992f2540e472 100644 --- a/svl/source/filepicker/pickerhelper.cxx +++ b/svl/source/filepicker/pickerhelper.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,16 +50,16 @@ namespace svt try { // does the dialog haver a help URL property? - Reference< css::beans::XPropertySet > xDialogProps( _mxFileDlg, css::uno::UNO_QUERY ); - Reference< css::beans::XPropertySetInfo > xInfo; + Reference< css::beans::XPropertySet > xDialogProps( _mxFileDlg, css::uno::UNO_QUERY ); + Reference< css::beans::XPropertySetInfo > xInfo; if( xDialogProps.is() ) xInfo = xDialogProps->getPropertySetInfo( ); - const OUString sHelpURLPropertyName( RTL_CONSTASCII_USTRINGPARAM( "HelpURL" ) ); + const OUString sHelpURLPropertyName( RTL_CONSTASCII_USTRINGPARAM( "HelpURL" ) ); if( xInfo.is() && xInfo->hasPropertyByName( sHelpURLPropertyName ) ) - { // yep - OUString sId( RTL_CONSTASCII_USTRINGPARAM( "HID:" ) ); + { // yep + OUString sId( RTL_CONSTASCII_USTRINGPARAM( "HID:" ) ); sId += OUString::valueOf( _nHelpId ); xDialogProps->setPropertyValue( sHelpURLPropertyName, css::uno::makeAny( sId ) ); } @@ -76,16 +76,16 @@ namespace svt try { // does the dialog haver a help URL property? - Reference< css::beans::XPropertySet > xDialogProps( _mxFileDlg, css::uno::UNO_QUERY ); - Reference< css::beans::XPropertySetInfo > xInfo; + Reference< css::beans::XPropertySet > xDialogProps( _mxFileDlg, css::uno::UNO_QUERY ); + Reference< css::beans::XPropertySetInfo > xInfo; if( xDialogProps.is() ) xInfo = xDialogProps->getPropertySetInfo( ); - const OUString sHelpURLPropertyName( RTL_CONSTASCII_USTRINGPARAM( "HelpURL" ) ); + const OUString sHelpURLPropertyName( RTL_CONSTASCII_USTRINGPARAM( "HelpURL" ) ); if( xInfo.is() && xInfo->hasPropertyByName( sHelpURLPropertyName ) ) - { // yep - OUString sId( RTL_CONSTASCII_USTRINGPARAM( "HID:" ) ); + { // yep + OUString sId( RTL_CONSTASCII_USTRINGPARAM( "HID:" ) ); sId += OUString::valueOf( _nHelpId ); xDialogProps->setPropertyValue( sHelpURLPropertyName, css::uno::makeAny( sId ) ); } diff --git a/svl/source/filepicker/pickerhistory.cxx b/svl/source/filepicker/pickerhistory.cxx index 4c372c48163d..3c29e598439f 100644 --- a/svl/source/filepicker/pickerhistory.cxx +++ b/svl/source/filepicker/pickerhistory.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,8 +40,8 @@ namespace svt namespace { - typedef ::com::sun::star::uno::WeakReference< XInterface > InterfaceAdapter; - typedef ::std::vector< InterfaceAdapter > InterfaceArray; + typedef ::com::sun::star::uno::WeakReference< XInterface > InterfaceAdapter; + typedef ::std::vector< InterfaceAdapter > InterfaceArray; // ---------------------------------------------------------------- InterfaceArray& getFolderPickerHistory() @@ -67,7 +67,7 @@ namespace svt // first, check which of the objects we hold in s_aHistory can be removed { InterfaceArray aCleanedHistory; - for ( InterfaceArray::const_iterator aLoop = _rHistory.begin(); + for ( InterfaceArray::const_iterator aLoop = _rHistory.begin(); aLoop != _rHistory.end(); ++aLoop ) @@ -96,7 +96,7 @@ namespace svt //============================================================= // search the first picker which is still alive ... - for ( InterfaceArray::const_reverse_iterator aLoop = _rHistory.rbegin(); + for ( InterfaceArray::const_reverse_iterator aLoop = _rHistory.rbegin(); ( aLoop != _rHistory.rend() ) && !xTopMostAlive.is(); ++aLoop ) @@ -133,6 +133,6 @@ namespace svt } //......................................................................... -} // namespace svt +} // namespace svt //......................................................................... diff --git a/svl/source/filerec/filerec.cxx b/svl/source/filerec/filerec.cxx index 0d1b06be5d11..4315dad7d033 100644 --- a/svl/source/filerec/filerec.cxx +++ b/svl/source/filerec/filerec.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,7 +36,7 @@ SV_IMPL_VARARR( SfxUINT32s, UINT32 ); //======================================================================== -/* Die folgenden Makros extrahieren Teilbereiche aus einem UINT32 Wert. +/* Die folgenden Makros extrahieren Teilbereiche aus einem UINT32 Wert. Diese UINT32-Werte werden anstelle der einzelnen Werte gestreamt, um Calls zu sparen. */ @@ -52,7 +52,7 @@ SV_IMPL_VARARR( SfxUINT32s, UINT32 ); //------------------------------------------------------------------------- -/* Die folgenden Makros setzen Teilbereiche zu einem UINT32 Wert zusammen. +/* Die folgenden Makros setzen Teilbereiche zu einem UINT32 Wert zusammen. Diese UINT32-Werte werden anstelle der einzelnen Werte gestreamt, um Calls zu sparen. */ @@ -74,7 +74,7 @@ SV_IMPL_VARARR( SfxUINT32s, UINT32 ); UINT32 SfxMiniRecordWriter::Close ( - FASTBOOL bSeekToEndOfRec /* TRUE (default) + FASTBOOL bSeekToEndOfRec /* TRUE (default) Der Stream wird an das Ende des Records positioniert. @@ -85,7 +85,7 @@ UINT32 SfxMiniRecordWriter::Close */ ) -/* [Beschreibung] +/* [Beschreibung] Diese Methode schlie\st den Record. Dabei wird haupts"achlich der Header geschrieben. @@ -95,7 +95,7 @@ UINT32 SfxMiniRecordWriter::Close [R"uckgabewert] - UINT32 != 0 + UINT32 != 0 Position im Stream, die direkt hinter dem Record liegt. 'bSeekToEndOfRecord==TRUE' => R"uckgabewert == aktuelle Stream-Position nach Aufruf @@ -147,13 +147,13 @@ UINT32 SfxMiniRecordWriter::Close USHORT SfxMiniRecordReader::ScanRecordType ( - SvStream* pStream /* <SvStream> an dessen aktueller Position + SvStream* pStream /* <SvStream> an dessen aktueller Position ein Record liegt, dessen Typ erkannt werden soll. */ ) -/* [Beschreibung] +/* [Beschreibung] Mit dieser statischen Methode kann ermittelt werden, ob sich an der aktuellen Position in einem Stream ein Record befindet, und der Typ @@ -175,7 +175,7 @@ USHORT SfxMiniRecordReader::ScanRecordType [R"uckgabewert] - USHORT SFX_REC_TYPE_EOR + USHORT SFX_REC_TYPE_EOR An der aktuellen Position des Streams steht eine End-Of-Records-Kennung. @@ -262,7 +262,7 @@ USHORT SfxMiniRecordReader::ScanRecordType FASTBOOL SfxMiniRecordReader::SetHeader_Impl( UINT32 nHeader ) -/* [Beschreibung] +/* [Beschreibung] Interne Methode zum nachtr"aglichen Verarbeiten eines extern gelesenen Headers. Falls der Header eine End-Of-Records-Kennung darstellt, @@ -291,13 +291,13 @@ FASTBOOL SfxMiniRecordReader::SetHeader_Impl( UINT32 nHeader ) SfxMiniRecordReader::SfxMiniRecordReader ( - SvStream* pStream /* <SvStream>, an dessen aktueller + SvStream* pStream /* <SvStream>, an dessen aktueller Position sich ein <SfxMiniRecord> befindet. */ ) -/* [Beschreibung] +/* [Beschreibung] Dieser Ctor liest den Header eines <SfxMiniRecord> ab der aktuellen Position von 'pStream'. Da grunds"atzlich fast 4-Byte Kombination ein @@ -308,7 +308,7 @@ SfxMiniRecordReader::SfxMiniRecordReader dann au\serdem unver"andert ist. */ -: _pStream( pStream ), +: _pStream( pStream ), _bSkipped( FALSE ) { // Header einlesen @@ -333,14 +333,14 @@ SfxMiniRecordReader::SfxMiniRecordReader SfxMiniRecordReader::SfxMiniRecordReader ( - SvStream* pStream, /* <SvStream>, an dessen aktueller + SvStream* pStream, /* <SvStream>, an dessen aktueller Position sich ein <SfxMiniRecord> befindet. */ - BYTE nTag // Pre-Tag des gew"unschten Records + BYTE nTag // Pre-Tag des gew"unschten Records ) -/* [Beschreibung] +/* [Beschreibung] Dieser Ctor interpretiert 'pStream' ab der aktuellen Position als eine l"uckenlose Folge von, von dieser Klassen-Gruppe interpretierbaren, @@ -423,18 +423,18 @@ SfxMiniRecordReader::SfxMiniRecordReader SfxSingleRecordWriter::SfxSingleRecordWriter ( - BYTE nRecordType, // f"ur Subklassen - SvStream* pStream, // Stream, in dem der Record angelegt wird - UINT16 nContentTag, // Inhalts-Art-Kennung - BYTE nContentVer // Inhalts-Versions-Kennung + BYTE nRecordType, // f"ur Subklassen + SvStream* pStream, // Stream, in dem der Record angelegt wird + UINT16 nContentTag, // Inhalts-Art-Kennung + BYTE nContentVer // Inhalts-Versions-Kennung ) -/* [Beschreibung] +/* [Beschreibung] Interner Ctor f"ur Subklassen. */ -: SfxMiniRecordWriter( pStream, SFX_REC_PRETAG_EXT ) +: SfxMiniRecordWriter( pStream, SFX_REC_PRETAG_EXT ) { // Erweiterten Header hiner den des SfxMiniRec schreiben *pStream << SFX_REC_HEADER(nRecordType, nContentTag, nContentVer); @@ -444,19 +444,19 @@ SfxSingleRecordWriter::SfxSingleRecordWriter SfxSingleRecordWriter::SfxSingleRecordWriter ( - SvStream* pStream, // Stream, in dem der Record angelegt wird - UINT16 nContentTag, // Inhalts-Art-Kennung - BYTE nContentVer // Inhalts-Versions-Kennung + SvStream* pStream, // Stream, in dem der Record angelegt wird + UINT16 nContentTag, // Inhalts-Art-Kennung + BYTE nContentVer // Inhalts-Versions-Kennung ) -/* [Beschreibung] +/* [Beschreibung] Legt in 'pStream' einen 'SfxSingleRecord' an, dessen Content-Gr"o\se nicht bekannt ist, sondern nach dam Streamen des Contents errechnet werden soll. */ -: SfxMiniRecordWriter( pStream, SFX_REC_PRETAG_EXT ) +: SfxMiniRecordWriter( pStream, SFX_REC_PRETAG_EXT ) { // Erweiterten Header hiner den des SfxMiniRec schreiben *pStream << SFX_REC_HEADER( SFX_REC_TYPE_SINGLE, nContentTag, nContentVer); @@ -466,10 +466,10 @@ SfxSingleRecordWriter::SfxSingleRecordWriter SfxSingleRecordWriter::SfxSingleRecordWriter ( - SvStream* pStream, // Stream, in dem der Record angelegt wird - UINT16 nContentTag, // Inhalts-Art-Kennung - BYTE nContentVer, // Inhalts-Versions-Kennung - UINT32 nContentSize // Gr"o\se des Inhalts in Bytes + SvStream* pStream, // Stream, in dem der Record angelegt wird + UINT16 nContentTag, // Inhalts-Art-Kennung + BYTE nContentVer, // Inhalts-Versions-Kennung + UINT32 nContentSize // Gr"o\se des Inhalts in Bytes ) /* [Beschreibung] @@ -478,7 +478,7 @@ SfxSingleRecordWriter::SfxSingleRecordWriter von vornherein bekannt ist. */ -: SfxMiniRecordWriter( pStream, SFX_REC_PRETAG_EXT, +: SfxMiniRecordWriter( pStream, SFX_REC_PRETAG_EXT, nContentSize + SFX_REC_HEADERSIZE_SINGLE ) { // Erweiterten Header hinter den des SfxMiniRec schreiben @@ -522,7 +522,7 @@ inline FASTBOOL SfxSingleRecordReader::ReadHeader_Impl( USHORT nTypes ) //------------------------------------------------------------------------- SfxSingleRecordReader::SfxSingleRecordReader( SvStream *pStream ) -: SfxMiniRecordReader() +: SfxMiniRecordReader() { // Startposition merken, um im Fehlerfall zur"uck-seeken zu k"onnen #ifdef DBG_UTIL @@ -563,11 +563,11 @@ SfxSingleRecordReader::SfxSingleRecordReader( SvStream *pStream, USHORT nTag ) FASTBOOL SfxSingleRecordReader::FindHeader_Impl ( - UINT16 nTypes, // arithm. Veroderung erlaubter Record-Typen - UINT16 nTag // zu findende Record-Art-Kennung + UINT16 nTypes, // arithm. Veroderung erlaubter Record-Typen + UINT16 nTag // zu findende Record-Art-Kennung ) -/* [Beschreibung] +/* [Beschreibung] Interne Methode zum lesen des Headers des ersten Record, der einem der Typen in 'nTypes' entspricht und mit der Art-Kennung 'nTag' @@ -629,11 +629,11 @@ FASTBOOL SfxSingleRecordReader::FindHeader_Impl SfxMultiFixRecordWriter::SfxMultiFixRecordWriter ( - BYTE nRecordType, // Subklassen Record-Kennung - SvStream* pStream, // Stream, in dem der Record angelegt wird - UINT16 nContentTag, // Content-Art-Kennung - BYTE nContentVer, // Content-Versions-Kennung - UINT32 // Gr"o\se jedes einzelnen Contents in Bytes + BYTE nRecordType, // Subklassen Record-Kennung + SvStream* pStream, // Stream, in dem der Record angelegt wird + UINT16 nContentTag, // Content-Art-Kennung + BYTE nContentVer, // Content-Versions-Kennung + UINT32 // Gr"o\se jedes einzelnen Contents in Bytes ) /* [Beschreibung] @@ -652,10 +652,10 @@ SfxMultiFixRecordWriter::SfxMultiFixRecordWriter SfxMultiFixRecordWriter::SfxMultiFixRecordWriter ( - SvStream* pStream, // Stream, in dem der Record angelegt wird - UINT16 nContentTag, // Content-Art-Kennung - BYTE nContentVer, // Content-Versions-Kennung - UINT32 // Gr"o\se jedes einzelnen Contents in Bytes + SvStream* pStream, // Stream, in dem der Record angelegt wird + UINT16 nContentTag, // Content-Art-Kennung + BYTE nContentVer, // Content-Versions-Kennung + UINT32 // Gr"o\se jedes einzelnen Contents in Bytes ) /* [Beschreibung] @@ -676,7 +676,7 @@ SfxMultiFixRecordWriter::SfxMultiFixRecordWriter UINT32 SfxMultiFixRecordWriter::Close( FASTBOOL bSeekToEndOfRec ) -// siehe <SfxMiniRecordWriter> +// siehe <SfxMiniRecordWriter> { // Header noch nicht geschrieben? @@ -703,10 +703,10 @@ UINT32 SfxMultiFixRecordWriter::Close( FASTBOOL bSeekToEndOfRec ) SfxMultiVarRecordWriter::SfxMultiVarRecordWriter ( - BYTE nRecordType, // Record-Kennung der Subklasse + BYTE nRecordType, // Record-Kennung der Subklasse SvStream* pStream, // Stream, in dem der Record angelegt wird - UINT16 nRecordTag, // Gesamt-Art-Kennung - BYTE nRecordVer // Gesamt-Versions-Kennung + UINT16 nRecordTag, // Gesamt-Art-Kennung + BYTE nRecordVer // Gesamt-Versions-Kennung ) /* [Beschreibung] @@ -724,8 +724,8 @@ SfxMultiVarRecordWriter::SfxMultiVarRecordWriter SfxMultiVarRecordWriter::SfxMultiVarRecordWriter ( SvStream* pStream, // Stream, in dem der Record angelegt wird - UINT16 nRecordTag, // Gesamt-Art-Kennung - BYTE nRecordVer // Gesamt-Versions-Kennung + UINT16 nRecordTag, // Gesamt-Art-Kennung + BYTE nRecordVer // Gesamt-Versions-Kennung ) /* [Beschreibung] @@ -751,7 +751,7 @@ SfxMultiVarRecordWriter::SfxMultiVarRecordWriter SfxMultiVarRecordWriter::~SfxMultiVarRecordWriter() -/* [Beschreibung] +/* [Beschreibung] Der Dtor der Klasse <SfxMultiVarRecordWriter> schlie\st den Record automatisch, falls <SfxMultiVarRecordWriter::Close()> nicht bereits @@ -768,7 +768,7 @@ SfxMultiVarRecordWriter::~SfxMultiVarRecordWriter() void SfxMultiVarRecordWriter::FlushContent_Impl() -/* [Beschreibung] +/* [Beschreibung] Interne Methode zum Abschlie\sen eines einzelnen Contents. */ @@ -847,11 +847,11 @@ UINT32 SfxMultiVarRecordWriter::Close( FASTBOOL bSeekToEndOfRec ) void SfxMultiMixRecordWriter::NewContent ( - UINT16 nContentTag, // Kennung f"ur die Art des Contents - BYTE nContentVer // Kennung f"ur die Version des Contents + UINT16 nContentTag, // Kennung f"ur die Art des Contents + BYTE nContentVer // Kennung f"ur die Version des Contents ) -/* [Beschreibung] +/* [Beschreibung] Mit dieser Methode wird in den Record ein neuer Content eingef"ugt und dessen Content-Tag sowie dessen Content-Version angegeben. Jeder, @@ -915,7 +915,7 @@ FASTBOOL SfxMultiRecordReader::ReadHeader_Impl() //------------------------------------------------------------------------- SfxMultiRecordReader::SfxMultiRecordReader( SvStream *pStream ) -: _pContentOfs( NULL ), _nContentNo(0) +: _pContentOfs( NULL ), _nContentNo(0) { // Position im Stream merken, um im Fehlerfall zur"uck-seeken zu k"onnen _nStartPos = pStream->Tell(); @@ -935,7 +935,7 @@ SfxMultiRecordReader::SfxMultiRecordReader( SvStream *pStream ) //------------------------------------------------------------------------- SfxMultiRecordReader::SfxMultiRecordReader( SvStream *pStream, UINT16 nTag ) -: _nContentNo(0) +: _nContentNo(0) { // Position im Stream merken, um im Fehlerfall zur"uck-seeken zu k"onnen _nStartPos = pStream->Tell(); @@ -965,7 +965,7 @@ SfxMultiRecordReader::~SfxMultiRecordReader() FASTBOOL SfxMultiRecordReader::GetContent() -/* [Beschreibung] +/* [Beschreibung] Positioniert den Stream an den Anfang des n"chsten bzw. beim 1. Aufruf auf den Anfang des ersten Contents im Record und liest ggf. dessen @@ -990,7 +990,7 @@ FASTBOOL SfxMultiRecordReader::GetContent() // #99366#: correct stream pos in every case; // the if clause was added by MT a long time ago, - // maybe to 'repair' other corrupt documents; but this + // maybe to 'repair' other corrupt documents; but this // gives errors when writing with 5.1 and reading with current // versions, so we decided to remove the if clause (KA-05/17/2002) // if ( nNewPos > _pStream->Tell() ) diff --git a/svl/source/fsstor/fsfactory.cxx b/svl/source/fsstor/fsfactory.cxx index 298b6f555e2a..886e1cef5049 100644 --- a/svl/source/fsstor/fsfactory.cxx +++ b/svl/source/fsstor/fsfactory.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -82,12 +82,12 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstance() if ( !aTempURL.getLength() ) throw uno::RuntimeException(); // TODO: can not create tempfile - ::ucbhelper::Content aResultContent( + ::ucbhelper::Content aResultContent( aTempURL, uno::Reference< ucb::XCommandEnvironment >() ); - return uno::Reference< uno::XInterface >( - static_cast< OWeakObject* >( - new FSStorage( aResultContent, + return uno::Reference< uno::XInterface >( + static_cast< OWeakObject* >( + new FSStorage( aResultContent, embed::ElementModes::READWRITE, uno::Sequence< beans::PropertyValue >(), m_xFactory ) ), @@ -147,7 +147,7 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstanceWithA // retrieve mediadescriptor and set storage properties uno::Sequence< beans::PropertyValue > aDescr; uno::Sequence< beans::PropertyValue > aPropsToSet; - + if ( nArgNum >= 3 ) { if( aArguments[2] >>= aDescr ) @@ -191,14 +191,14 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstanceWithA else if ( !::utl::UCBContentHelper::IsFolder( aURL ) ) throw io::IOException(); // there is no such folder - ::ucbhelper::Content aResultContent( + ::ucbhelper::Content aResultContent( aURL, uno::Reference< ucb::XCommandEnvironment >() ); // create storage based on source - return uno::Reference< uno::XInterface >( - static_cast< OWeakObject* >( new FSStorage( aResultContent, - nStorageMode, - aPropsToSet, + return uno::Reference< uno::XInterface >( + static_cast< OWeakObject* >( new FSStorage( aResultContent, + nStorageMode, + aPropsToSet, m_xFactory ) ), uno::UNO_QUERY ); } @@ -250,7 +250,7 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo ( uno::Reference< registry::XRegistryKey > xNewKey; xNewKey = xRegistryKey->createKey( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + FSStorageFactory::impl_staticGetImplementationName() + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES"))); diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx index 73460ef3d277..f5daf0a4bc5c 100644 --- a/svl/source/fsstor/fsstorage.cxx +++ b/svl/source/fsstor/fsstorage.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -103,16 +103,16 @@ sal_Bool isLocalFile_Impl( ::rtl::OUString aURL ) struct FSStorage_Impl { ::rtl::OUString m_aURL; - + ::ucbhelper::Content* m_pContent; sal_Int32 m_nMode; - + ::cppu::OInterfaceContainerHelper* m_pListenersContainer; // list of listeners ::cppu::OTypeCollection* m_pTypeCollection; uno::Reference< lang::XMultiServiceFactory > m_xFactory; - + FSStorage_Impl( const ::rtl::OUString& aURL, sal_Int32 nMode, uno::Reference< lang::XMultiServiceFactory > xFactory ) : m_aURL( aURL ) , m_pContent( NULL ) @@ -195,7 +195,7 @@ sal_Bool FSStorage::MakeFolderNoUI( const String& rFolder, sal_Bool ) uno::Reference< ucb::XCommandEnvironment >(), aParent ) ) return ::utl::UCBContentHelper::MakeFolder( aParent, aTitle, aResultContent, sal_False ); - + return sal_False; } @@ -239,7 +239,7 @@ void FSStorage::CopyStreamToSubStream( const ::rtl::OUString& aSourceURL, embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE ); if ( !xSubStream.is() ) throw uno::RuntimeException(); - + uno::Reference< io::XOutputStream > xDestOutput = xSubStream->getOutputStream(); if ( !xDestOutput.is() ) throw uno::RuntimeException(); @@ -274,7 +274,7 @@ void FSStorage::CopyContentToStorage_Impl( ::ucbhelper::Content* pContent, const { ::rtl::OUString aSourceURL( xRow->getString( 1 ) ); sal_Bool bIsFolder( xRow->getBoolean(2) ); - + // TODO/LATER: not sure whether the entry name must be encoded ::rtl::OUString aNewEntryName( INetURLObject( aSourceURL ).getName( INetURLObject::LAST_SEGMENT, true, @@ -285,7 +285,7 @@ void FSStorage::CopyContentToStorage_Impl( ::ucbhelper::Content* pContent, const embed::ElementModes::READWRITE ); if ( !xSubStorage.is() ) throw uno::RuntimeException(); - + uno::Reference< ucb::XCommandEnvironment > xDummyEnv; ::ucbhelper::Content aSourceContent( aSourceURL, xDummyEnv ); CopyContentToStorage_Impl( &aSourceContent, xSubStorage ); @@ -311,7 +311,7 @@ void FSStorage::CopyContentToStorage_Impl( ::ucbhelper::Content* pContent, const } //____________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________ //----------------------------------------------- @@ -320,14 +320,14 @@ uno::Any SAL_CALL FSStorage::queryInterface( const uno::Type& rType ) { uno::Any aReturn; aReturn <<= ::cppu::queryInterface - ( rType - , static_cast<lang::XTypeProvider*> ( this ) - , static_cast<embed::XStorage*> ( this ) - , static_cast<embed::XHierarchicalStorageAccess*> ( this ) - , static_cast<container::XNameAccess*> ( this ) - , static_cast<container::XElementAccess*> ( this ) - , static_cast<lang::XComponent*> ( this ) - , static_cast<beans::XPropertySet*> ( this ) ); + ( rType + , static_cast<lang::XTypeProvider*> ( this ) + , static_cast<embed::XStorage*> ( this ) + , static_cast<embed::XHierarchicalStorageAccess*> ( this ) + , static_cast<container::XNameAccess*> ( this ) + , static_cast<container::XElementAccess*> ( this ) + , static_cast<lang::XComponent*> ( this ) + , static_cast<beans::XPropertySet*> ( this ) ); if ( aReturn.hasValue() == sal_True ) return aReturn ; @@ -348,7 +348,7 @@ void SAL_CALL FSStorage::release() throw() } //____________________________________________________________________________________________________ -// XTypeProvider +// XTypeProvider //____________________________________________________________________________________________________ //----------------------------------------------- @@ -362,10 +362,10 @@ uno::Sequence< uno::Type > SAL_CALL FSStorage::getTypes() if ( m_pImpl->m_pTypeCollection == NULL ) { m_pImpl->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XStorage >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XHierarchicalStorageAccess >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XStorage >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XHierarchicalStorageAccess >* )NULL ) + , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); } } @@ -394,7 +394,7 @@ uno::Sequence< sal_Int8 > SAL_CALL FSStorage::getImplementationId() } //____________________________________________________________________________________________________ -// XStorage +// XStorage //____________________________________________________________________________________________________ //----------------------------------------------- @@ -487,7 +487,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::openStreamElement( if ( isLocalFile_Impl( aFileURL.GetMainURL( INetURLObject::NO_DECODE ) ) ) { uno::Reference< ucb::XSimpleFileAccess > xSimpleFileAccess( - m_pImpl->m_xFactory->createInstance( + m_pImpl->m_xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" ) ) ), uno::UNO_QUERY_THROW ); xResult = xSimpleFileAccess->openFileReadWrite( aFileURL.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -505,10 +505,10 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::openStreamElement( delete pStream; } } - + if ( !xResult.is() ) throw io::IOException(); - + if ( ( nOpenMode & embed::ElementModes::TRUNCATE ) ) { uno::Reference< io::XTruncate > xTrunc( xResult->getOutputStream(), uno::UNO_QUERY_THROW ); @@ -520,7 +520,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::openStreamElement( if ( ( nOpenMode & embed::ElementModes::TRUNCATE ) || !::utl::UCBContentHelper::IsDocument( aFileURL.GetMainURL( INetURLObject::NO_DECODE ) ) ) throw io::IOException(); // TODO: access denied - + ::ucbhelper::Content aResultContent( aFileURL.GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv ); uno::Reference< io::XInputStream > xInStream = aResultContent.openStream(); xResult = static_cast< io::XStream* >( new OFSInputStreamContainer( xInStream ) ); @@ -562,7 +562,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::openStreamElement( } //----------------------------------------------- -uno::Reference< io::XStream > SAL_CALL FSStorage::openEncryptedStreamElement( +uno::Reference< io::XStream > SAL_CALL FSStorage::openEncryptedStreamElement( const ::rtl::OUString&, sal_Int32, const ::rtl::OUString& ) throw ( embed::InvalidStorageException, lang::IllegalArgumentException, @@ -632,8 +632,8 @@ uno::Reference< embed::XStorage > SAL_CALL FSStorage::openStorageElement( throw io::IOException(); // there is no such folder ::ucbhelper::Content aResultContent( aFolderURL.GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv ); - xResult = uno::Reference< embed::XStorage >( - static_cast< OWeakObject* >( new FSStorage( aResultContent, + xResult = uno::Reference< embed::XStorage >( + static_cast< OWeakObject* >( new FSStorage( aResultContent, nStorageMode, uno::Sequence< beans::PropertyValue >(), m_pImpl->m_xFactory ) ), @@ -942,7 +942,7 @@ void SAL_CALL FSStorage::renameElement( const ::rtl::OUString& aElementName, con } //----------------------------------------------- -void SAL_CALL FSStorage::copyElementTo( const ::rtl::OUString& aElementName, +void SAL_CALL FSStorage::copyElementTo( const ::rtl::OUString& aElementName, const uno::Reference< embed::XStorage >& xDest, const ::rtl::OUString& aNewName ) throw ( embed::InvalidStorageException, @@ -979,7 +979,7 @@ void SAL_CALL FSStorage::copyElementTo( const ::rtl::OUString& aElementName, uno::Reference< embed::XStorage > xDestSubStor( xDest->openStorageElement( aNewName, embed::ElementModes::READWRITE ), uno::UNO_QUERY_THROW ); - + CopyContentToStorage_Impl( &aSourceContent, xDestSubStor ); } else if ( ::utl::UCBContentHelper::IsDocument( aOwnURL.GetMainURL( INetURLObject::NO_DECODE ) ) ) @@ -1027,7 +1027,7 @@ void SAL_CALL FSStorage::copyElementTo( const ::rtl::OUString& aElementName, } //----------------------------------------------- -void SAL_CALL FSStorage::moveElementTo( const ::rtl::OUString& aElementName, +void SAL_CALL FSStorage::moveElementTo( const ::rtl::OUString& aElementName, const uno::Reference< embed::XStorage >& xDest, const ::rtl::OUString& aNewName ) throw ( embed::InvalidStorageException, @@ -1048,7 +1048,7 @@ void SAL_CALL FSStorage::moveElementTo( const ::rtl::OUString& aElementName, } //____________________________________________________________________________________________________ -// XNameAccess +// XNameAccess //____________________________________________________________________________________________________ //----------------------------------------------- @@ -1237,7 +1237,7 @@ sal_Bool SAL_CALL FSStorage::hasElements() if ( !GetContent() ) throw io::IOException(); // TODO: error handling - + uno::Sequence< ::rtl::OUString > aProps( 1 ); aProps[0] = ::rtl::OUString::createFromAscii( "TargetURL" ); ::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS; @@ -1255,7 +1255,7 @@ sal_Bool SAL_CALL FSStorage::hasElements() //____________________________________________________________________________________________________ -// XDisposable +// XDisposable //____________________________________________________________________________________________________ //----------------------------------------------- @@ -1308,7 +1308,7 @@ void SAL_CALL FSStorage::removeEventListener( } //____________________________________________________________________________________________________ -// XPropertySet +// XPropertySet //____________________________________________________________________________________________________ //----------------------------------------------- @@ -1433,7 +1433,7 @@ void SAL_CALL FSStorage::removeVetoableChangeListener( } //____________________________________________________________________________________________________ -// XHierarchicalStorageAccess +// XHierarchicalStorageAccess //____________________________________________________________________________________________________ //----------------------------------------------- uno::Reference< embed::XExtendedStorageStream > SAL_CALL FSStorage::openStreamElementByHierarchicalName( const ::rtl::OUString& sStreamPath, ::sal_Int32 nOpenMode ) @@ -1479,7 +1479,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL FSStorage::openStreamEl if ( isLocalFile_Impl( aFileURL.GetMainURL( INetURLObject::NO_DECODE ) ) ) { uno::Reference< ucb::XSimpleFileAccess > xSimpleFileAccess( - m_pImpl->m_xFactory->createInstance( + m_pImpl->m_xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" ) ) ), uno::UNO_QUERY_THROW ); uno::Reference< io::XStream > xStream = @@ -1504,10 +1504,10 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL FSStorage::openStreamEl delete pStream; } } - + if ( !xResult.is() ) throw io::IOException(); - + if ( ( nOpenMode & embed::ElementModes::TRUNCATE ) ) { uno::Reference< io::XTruncate > xTrunc( xResult->getOutputStream(), uno::UNO_QUERY_THROW ); @@ -1519,7 +1519,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL FSStorage::openStreamEl if ( ( nOpenMode & embed::ElementModes::TRUNCATE ) || !::utl::UCBContentHelper::IsDocument( aFileURL.GetMainURL( INetURLObject::NO_DECODE ) ) ) throw io::IOException(); // TODO: access denied - + ::ucbhelper::Content aResultContent( aFileURL.GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv ); uno::Reference< io::XInputStream > xInStream = aResultContent.openStream(); xResult = static_cast< io::XStream* >( new OFSInputStreamContainer( xInStream ) ); diff --git a/svl/source/fsstor/fsstorage.hxx b/svl/source/fsstor/fsstorage.hxx index 04bd3dead578..2ae22b804e0a 100644 --- a/svl/source/fsstor/fsstorage.hxx +++ b/svl/source/fsstor/fsstorage.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,7 +45,7 @@ #include <ucbhelper/content.hxx> struct FSStorage_Impl; -class FSStorage : public ::com::sun::star::lang::XTypeProvider +class FSStorage : public ::com::sun::star::lang::XTypeProvider , public ::com::sun::star::embed::XStorage , public ::com::sun::star::embed::XHierarchicalStorageAccess , public ::com::sun::star::beans::XPropertySet @@ -58,7 +58,7 @@ protected: public: - FSStorage( const ::ucbhelper::Content& aContent, + FSStorage( const ::ucbhelper::Content& aContent, sal_Int32 nMode, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > xProperties, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory ); @@ -77,10 +77,10 @@ public: static sal_Bool MakeFolderNoUI( const String& rFolder, sal_Bool bNewOnly ); //____________________________________________________________________________________________________ - // XInterface + // XInterface //____________________________________________________________________________________________________ - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType ) + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType ) throw( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL acquire() throw(); @@ -88,7 +88,7 @@ public: virtual void SAL_CALL release() throw(); //____________________________________________________________________________________________________ - // XTypeProvider + // XTypeProvider //____________________________________________________________________________________________________ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() @@ -98,7 +98,7 @@ public: throw( ::com::sun::star::uno::RuntimeException ); //____________________________________________________________________________________________________ - // XStorage + // XStorage //____________________________________________________________________________________________________ virtual void SAL_CALL copyToStorage( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xDest ) @@ -108,7 +108,7 @@ public: ::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL openStreamElement( + virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL openStreamElement( const ::rtl::OUString& aStreamName, sal_Int32 nOpenMode ) throw ( ::com::sun::star::embed::InvalidStorageException, ::com::sun::star::lang::IllegalArgumentException, @@ -117,7 +117,7 @@ public: ::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL openEncryptedStreamElement( + virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL openEncryptedStreamElement( const ::rtl::OUString& aStreamName, sal_Int32 nOpenMode, const ::rtl::OUString& aPass ) throw ( ::com::sun::star::embed::InvalidStorageException, ::com::sun::star::lang::IllegalArgumentException, @@ -127,7 +127,7 @@ public: ::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > SAL_CALL openStorageElement( + virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > SAL_CALL openStorageElement( const ::rtl::OUString& aStorName, sal_Int32 nStorageMode ) throw ( ::com::sun::star::embed::InvalidStorageException, ::com::sun::star::lang::IllegalArgumentException, @@ -135,7 +135,7 @@ public: ::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL cloneStreamElement( + virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL cloneStreamElement( const ::rtl::OUString& aStreamName ) throw ( ::com::sun::star::embed::InvalidStorageException, ::com::sun::star::lang::IllegalArgumentException, @@ -144,7 +144,7 @@ public: ::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL cloneEncryptedStreamElement( + virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > SAL_CALL cloneEncryptedStreamElement( const ::rtl::OUString& aStreamName, const ::rtl::OUString& aPass ) throw ( ::com::sun::star::embed::InvalidStorageException, ::com::sun::star::lang::IllegalArgumentException, @@ -200,7 +200,7 @@ public: ::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL copyElementTo( const ::rtl::OUString& aElementName, + virtual void SAL_CALL copyElementTo( const ::rtl::OUString& aElementName, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xDest, const ::rtl::OUString& aNewName ) throw ( ::com::sun::star::embed::InvalidStorageException, @@ -211,7 +211,7 @@ public: ::com::sun::star::embed::StorageWrappedTargetException, ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL moveElementTo( const ::rtl::OUString& aElementName, + virtual void SAL_CALL moveElementTo( const ::rtl::OUString& aElementName, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xDest, const ::rtl::OUString& rNewName ) throw ( ::com::sun::star::embed::InvalidStorageException, @@ -223,7 +223,7 @@ public: ::com::sun::star::uno::RuntimeException ); //____________________________________________________________________________________________________ - // XNameAccess + // XNameAccess //____________________________________________________________________________________________________ virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) @@ -244,7 +244,7 @@ public: throw ( ::com::sun::star::uno::RuntimeException ); //____________________________________________________________________________________________________ - // XComponent + // XComponent //____________________________________________________________________________________________________ virtual void SAL_CALL dispose() @@ -259,7 +259,7 @@ public: throw ( ::com::sun::star::uno::RuntimeException ); //____________________________________________________________________________________________________ - // XPropertySet + // XPropertySet //____________________________________________________________________________________________________ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() @@ -277,7 +277,7 @@ public: ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL addPropertyChangeListener( + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw ( ::com::sun::star::beans::UnknownPropertyException, @@ -304,7 +304,7 @@ public: ::com::sun::star::uno::RuntimeException ); //____________________________________________________________________________________________________ - // XHierarchicalStorageAccess + // XHierarchicalStorageAccess //____________________________________________________________________________________________________ virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XExtendedStorageStream > SAL_CALL openStreamElementByHierarchicalName( const ::rtl::OUString& sStreamPath, ::sal_Int32 nOpenMode ) diff --git a/svl/source/fsstor/oinputstreamcontainer.cxx b/svl/source/fsstor/oinputstreamcontainer.cxx index ffa86cdb981d..985d61ddcfa2 100644 --- a/svl/source/fsstor/oinputstreamcontainer.cxx +++ b/svl/source/fsstor/oinputstreamcontainer.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -95,7 +95,7 @@ uno::Any SAL_CALL OFSInputStreamContainer::queryInterface( const uno::Type& rTyp throw( uno::RuntimeException ) { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. uno::Any aReturn; if ( m_bSeekable ) @@ -129,7 +129,7 @@ void SAL_CALL OFSInputStreamContainer::release() } //----------------------------------------------- -sal_Int32 SAL_CALL OFSInputStreamContainer::readBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) +sal_Int32 SAL_CALL OFSInputStreamContainer::readBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw ( io::NotConnectedException, io::BufferSizeExceededException, io::IOException, @@ -147,7 +147,7 @@ sal_Int32 SAL_CALL OFSInputStreamContainer::readBytes( uno::Sequence< sal_Int8 > } //----------------------------------------------- -sal_Int32 SAL_CALL OFSInputStreamContainer::readSomeBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) +sal_Int32 SAL_CALL OFSInputStreamContainer::readSomeBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) throw ( io::NotConnectedException, io::BufferSizeExceededException, io::IOException, @@ -165,7 +165,7 @@ sal_Int32 SAL_CALL OFSInputStreamContainer::readSomeBytes( uno::Sequence< sal_In } //----------------------------------------------- -void SAL_CALL OFSInputStreamContainer::skipBytes( sal_Int32 nBytesToSkip ) +void SAL_CALL OFSInputStreamContainer::skipBytes( sal_Int32 nBytesToSkip ) throw ( io::NotConnectedException, io::BufferSizeExceededException, io::IOException, @@ -183,7 +183,7 @@ void SAL_CALL OFSInputStreamContainer::skipBytes( sal_Int32 nBytesToSkip ) } //----------------------------------------------- -sal_Int32 SAL_CALL OFSInputStreamContainer::available( ) +sal_Int32 SAL_CALL OFSInputStreamContainer::available( ) throw ( io::NotConnectedException, io::IOException, uno::RuntimeException ) @@ -200,7 +200,7 @@ sal_Int32 SAL_CALL OFSInputStreamContainer::available( ) } //----------------------------------------------- -void SAL_CALL OFSInputStreamContainer::closeInput( ) +void SAL_CALL OFSInputStreamContainer::closeInput( ) throw ( io::NotConnectedException, io::IOException, uno::RuntimeException ) @@ -262,7 +262,7 @@ void SAL_CALL OFSInputStreamContainer::seek( sal_Int64 location ) //----------------------------------------------- sal_Int64 SAL_CALL OFSInputStreamContainer::getPosition() - throw ( io::IOException, + throw ( io::IOException, uno::RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); diff --git a/svl/source/fsstor/oinputstreamcontainer.hxx b/svl/source/fsstor/oinputstreamcontainer.hxx index 939eb16c05af..1179b846f526 100644 --- a/svl/source/fsstor/oinputstreamcontainer.hxx +++ b/svl/source/fsstor/oinputstreamcontainer.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -65,15 +65,15 @@ public: virtual void SAL_CALL release() throw(); // XInputStream - virtual sal_Int32 SAL_CALL readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) + virtual sal_Int32 SAL_CALL readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL readSomeBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) + virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual sal_Int32 SAL_CALL available( ) + virtual sal_Int32 SAL_CALL available( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL closeInput( ) + virtual void SAL_CALL closeInput( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); //XStream diff --git a/svl/source/fsstor/ostreamcontainer.cxx b/svl/source/fsstor/ostreamcontainer.cxx index b9210f685014..893790d394a2 100644 --- a/svl/source/fsstor/ostreamcontainer.cxx +++ b/svl/source/fsstor/ostreamcontainer.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -82,11 +82,11 @@ uno::Any SAL_CALL OFSStreamContainer::queryInterface( const uno::Type& rType ) uno::Any aReturn; aReturn <<= ::cppu::queryInterface - ( rType - , static_cast<lang::XTypeProvider*> ( this ) - , static_cast<io::XStream*> ( this ) - , static_cast<embed::XExtendedStorageStream*> ( this ) - , static_cast<lang::XComponent*> ( this ) ); + ( rType + , static_cast<lang::XTypeProvider*> ( this ) + , static_cast<io::XStream*> ( this ) + , static_cast<embed::XExtendedStorageStream*> ( this ) + , static_cast<lang::XComponent*> ( this ) ); if ( aReturn.hasValue() == sal_True ) return aReturn ; @@ -94,8 +94,8 @@ uno::Any SAL_CALL OFSStreamContainer::queryInterface( const uno::Type& rType ) if ( m_xSeekable.is() ) { aReturn <<= ::cppu::queryInterface - ( rType - , static_cast<io::XSeekable*> ( this ) ); + ( rType + , static_cast<io::XSeekable*> ( this ) ); if ( aReturn.hasValue() == sal_True ) return aReturn ; @@ -104,8 +104,8 @@ uno::Any SAL_CALL OFSStreamContainer::queryInterface( const uno::Type& rType ) if ( m_xInputStream.is() ) { aReturn <<= ::cppu::queryInterface - ( rType - , static_cast<io::XInputStream*> ( this ) ); + ( rType + , static_cast<io::XInputStream*> ( this ) ); if ( aReturn.hasValue() == sal_True ) return aReturn ; @@ -113,8 +113,8 @@ uno::Any SAL_CALL OFSStreamContainer::queryInterface( const uno::Type& rType ) if ( m_xOutputStream.is() ) { aReturn <<= ::cppu::queryInterface - ( rType - , static_cast<io::XOutputStream*> ( this ) ); + ( rType + , static_cast<io::XOutputStream*> ( this ) ); if ( aReturn.hasValue() == sal_True ) return aReturn ; @@ -122,8 +122,8 @@ uno::Any SAL_CALL OFSStreamContainer::queryInterface( const uno::Type& rType ) if ( m_xTruncate.is() ) { aReturn <<= ::cppu::queryInterface - ( rType - , static_cast<io::XTruncate*> ( this ) ); + ( rType + , static_cast<io::XTruncate*> ( this ) ); if ( aReturn.hasValue() == sal_True ) return aReturn ; @@ -131,8 +131,8 @@ uno::Any SAL_CALL OFSStreamContainer::queryInterface( const uno::Type& rType ) if ( m_xAsyncOutputMonitor.is() ) { aReturn <<= ::cppu::queryInterface - ( rType - , static_cast<io::XAsyncOutputMonitor*> ( this ) ); + ( rType + , static_cast<io::XAsyncOutputMonitor*> ( this ) ); if ( aReturn.hasValue() == sal_True ) return aReturn ; @@ -155,7 +155,7 @@ void SAL_CALL OFSStreamContainer::release() OWeakObject::release(); } -// XTypeProvider +// XTypeProvider //----------------------------------------------- uno::Sequence< uno::Type > SAL_CALL OFSStreamContainer::getTypes() throw( uno::RuntimeException ) @@ -167,29 +167,29 @@ uno::Sequence< uno::Type > SAL_CALL OFSStreamContainer::getTypes() if ( m_pTypeCollection == NULL ) { ::cppu::OTypeCollection aTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XExtendedStorageStream >* )NULL ) ); + ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) + , ::getCppuType( ( const uno::Reference< embed::XExtendedStorageStream >* )NULL ) ); if ( m_xSeekable.is() ) aTypeCollection = ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ), + ( ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ), aTypeCollection.getTypes() ); if ( m_xInputStream.is() ) aTypeCollection = ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ), + ( ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ), aTypeCollection.getTypes() ); if ( m_xOutputStream.is() ) aTypeCollection = ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ), + ( ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ), aTypeCollection.getTypes() ); if ( m_xTruncate.is() ) aTypeCollection = ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ), + ( ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ), aTypeCollection.getTypes() ); if ( m_xAsyncOutputMonitor.is() ) aTypeCollection = ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< io::XAsyncOutputMonitor >* )NULL ), + ( ::getCppuType( ( const uno::Reference< io::XAsyncOutputMonitor >* )NULL ), aTypeCollection.getTypes() ); m_pTypeCollection = new ::cppu::OTypeCollection( aTypeCollection ); diff --git a/svl/source/fsstor/ostreamcontainer.hxx b/svl/source/fsstor/ostreamcontainer.hxx index 67fbf88b64c6..15107a0377d9 100644 --- a/svl/source/fsstor/ostreamcontainer.hxx +++ b/svl/source/fsstor/ostreamcontainer.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -53,12 +53,12 @@ class OFSStreamContainer : public cppu::OWeakObject, { ::osl::Mutex m_aMutex; - ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > m_xStream; - ::com::sun::star::uno::Reference< ::com::sun::star::io::XSeekable > m_xSeekable; - ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xInputStream; - ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > m_xOutputStream; - ::com::sun::star::uno::Reference< ::com::sun::star::io::XTruncate > m_xTruncate; - ::com::sun::star::uno::Reference< ::com::sun::star::io::XAsyncOutputMonitor > m_xAsyncOutputMonitor; + ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > m_xStream; + ::com::sun::star::uno::Reference< ::com::sun::star::io::XSeekable > m_xSeekable; + ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xInputStream; + ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > m_xOutputStream; + ::com::sun::star::uno::Reference< ::com::sun::star::io::XTruncate > m_xTruncate; + ::com::sun::star::uno::Reference< ::com::sun::star::io::XAsyncOutputMonitor > m_xAsyncOutputMonitor; sal_Bool m_bDisposed; sal_Bool m_bInputClosed; @@ -72,12 +72,12 @@ public: virtual ~OFSStreamContainer(); // XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType ) + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType ) throw( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL acquire() throw(); virtual void SAL_CALL release() throw(); - // XTypeProvider + // XTypeProvider virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw( ::com::sun::star::uno::RuntimeException ); virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() @@ -98,14 +98,14 @@ public: virtual sal_Int64 SAL_CALL getLength() throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); // XInputStream - virtual sal_Int32 SAL_CALL readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) + virtual sal_Int32 SAL_CALL readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL readSomeBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) + virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual sal_Int32 SAL_CALL available( ) + virtual sal_Int32 SAL_CALL available( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL closeInput( ) + virtual void SAL_CALL closeInput( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); // XOutputStream diff --git a/svl/source/inc/fsfactory.hxx b/svl/source/inc/fsfactory.hxx index d5e4e1d56373..2ea33e6a28b0 100644 --- a/svl/source/inc/fsfactory.hxx +++ b/svl/source/inc/fsfactory.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -53,7 +53,7 @@ public: static ::rtl::OUString SAL_CALL impl_staticGetImplementationName(); static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL - impl_staticCreateSelfInstance( + impl_staticCreateSelfInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); diff --git a/svl/source/inc/passwordcontainer.hxx b/svl/source/inc/passwordcontainer.hxx index 375632801368..9aea602fe000 100644 --- a/svl/source/inc/passwordcontainer.hxx +++ b/svl/source/inc/passwordcontainer.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -27,8 +27,8 @@ #ifndef INCLUDED_COMPHELPER_PASSWORDCONTAINER_HXX #define INCLUDED_COMPHELPER_PASSWORDCONTAINER_HXX -#include <list> -#include <vector> +#include <list> +#include <vector> #include <map> #include <com/sun/star/task/XPasswordContainer.hpp> #include <com/sun/star/task/XUrlContainer.hpp> @@ -42,7 +42,7 @@ #include <cppuhelper/typeprovider.hxx> #include <cppuhelper/queryinterface.hxx> #include <cppuhelper/factory.hxx> - + #include <tools/stream.hxx> #include <unotools/configitem.hxx> #include <ucbhelper/interactionrequest.hxx> @@ -56,18 +56,18 @@ #define PERSISTENT_RECORD 1 //---------------------------------------------------------------------------------- - -class NamePassRecord + +class NamePassRecord { ::rtl::OUString m_aName; // there are two lists of passwords, memory passwords and persistent passwords sal_Bool m_bHasMemPass; - ::std::vector< ::rtl::OUString > m_aMemPass; + ::std::vector< ::rtl::OUString > m_aMemPass; // persistent passwords are encrypted in one string sal_Bool m_bHasPersPass; - ::rtl::OUString m_aPersPass; + ::rtl::OUString m_aPersPass; void InitArrays( sal_Bool bHasMemoryList, const ::std::vector< ::rtl::OUString >& aMemoryList, sal_Bool bHasPersistentList, const ::rtl::OUString& aPersistentList ) @@ -115,7 +115,7 @@ public: { InitArrays( bHasMemoryList, aMemoryList, bHasPersistentList, aPersistentList ); } - + NamePassRecord( const NamePassRecord& aRecord ) : m_aName( aRecord.m_aName ) , m_bHasMemPass( sal_False ) @@ -123,7 +123,7 @@ public: { InitArrays( aRecord.m_bHasMemPass, aRecord.m_aMemPass, aRecord.m_bHasPersPass, aRecord.m_aPersPass ); } - + NamePassRecord& operator=( const NamePassRecord& aRecord ) { m_aName = aRecord.m_aName; @@ -139,7 +139,7 @@ public: { return m_aName; } - + sal_Bool HasPasswords( sal_Int8 nStatus ) const { if ( nStatus == MEMORY_RECORD ) @@ -208,7 +208,7 @@ class StorageItem : public ::utl::ConfigItem { sal_Bool hasEncoded; ::rtl::OUString mEncoded; public: - StorageItem( PasswordContainer* point, const ::rtl::OUString& path ) : + StorageItem( PasswordContainer* point, const ::rtl::OUString& path ) : ConfigItem( path, CONFIG_MODE_IMMEDIATE_UPDATE ), mainCont( point ), hasEncoded( sal_False ) @@ -218,7 +218,7 @@ public: *aNode.getArray() += ::rtl::OUString::createFromAscii( "/Store" ); EnableNotification( aNode ); } - + PassMap getInfo(); void update( const ::rtl::OUString& url, const NamePassRecord& rec ); void remove( const ::rtl::OUString& url, const ::rtl::OUString& rec ); @@ -228,7 +228,7 @@ public: void setEncodedMP( const ::rtl::OUString& aResult, sal_Bool bAcceptEnmpty = sal_False ); void setUseStorage( sal_Bool bUse ); sal_Bool useStorage(); - + virtual void Notify( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ); virtual void Commit(); }; @@ -256,33 +256,33 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > mComponent; SysCredentialsConfig mUrlContainer; - ::com::sun::star::uno::Sequence< ::com::sun::star::task::UserRecord > CopyToUserRecordSequence( - const ::std::list< NamePassRecord >& original, - const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) + ::com::sun::star::uno::Sequence< ::com::sun::star::task::UserRecord > CopyToUserRecordSequence( + const ::std::list< NamePassRecord >& original, + const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) throw(::com::sun::star::uno::RuntimeException); - ::com::sun::star::task::UserRecord CopyToUserRecord( + ::com::sun::star::task::UserRecord CopyToUserRecord( const NamePassRecord& aRecord, sal_Bool& io_bTryToDecode, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& aHandler ); - ::com::sun::star::uno::Sequence< ::com::sun::star::task::UserRecord > FindUsr( - const ::std::list< NamePassRecord >& userlist, - const ::rtl::OUString& name, + ::com::sun::star::uno::Sequence< ::com::sun::star::task::UserRecord > FindUsr( + const ::std::list< NamePassRecord >& userlist, + const ::rtl::OUString& name, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) throw(::com::sun::star::uno::RuntimeException); -bool createUrlRecord( - const PassMap::iterator & rIter, +bool createUrlRecord( + const PassMap::iterator & rIter, bool bName, const ::rtl::OUString & aName, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& aHandler, - ::com::sun::star::task::UrlRecord & rRec ) + ::com::sun::star::task::UrlRecord & rRec ) throw( ::com::sun::star::uno::RuntimeException ); -::com::sun::star::task::UrlRecord find( - const ::rtl::OUString& aURL, +::com::sun::star::task::UrlRecord find( + const ::rtl::OUString& aURL, const ::rtl::OUString& aName, - bool bName, // only needed to support empty user names + bool bName, // only needed to support empty user names const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& aHandler ) throw(::com::sun::star::uno::RuntimeException); ::rtl::OUString GetDefaultMasterPassword(); @@ -296,9 +296,9 @@ bool createUrlRecord( void UpdateVector( const ::rtl::OUString& url, ::std::list< NamePassRecord >& toUpdate, NamePassRecord& rec, sal_Bool writeFile ) throw(::com::sun::star::uno::RuntimeException); - - void PrivateAdd( const ::rtl::OUString& aUrl, - const ::rtl::OUString& aUserName, + + void PrivateAdd( const ::rtl::OUString& aUrl, + const ::rtl::OUString& aUserName, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPasswords, char aMode, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) @@ -306,51 +306,51 @@ bool createUrlRecord( ::std::vector< ::rtl::OUString > DecodePasswords( const ::rtl::OUString& aLine, const ::rtl::OUString& aMasterPassword ) throw(::com::sun::star::uno::RuntimeException); - + ::rtl::OUString EncodePasswords( ::std::vector< ::rtl::OUString > lines, const ::rtl::OUString& aMasterPassword ) throw(::com::sun::star::uno::RuntimeException); - + public: PasswordContainer( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ); ~PasswordContainer(); - virtual void SAL_CALL add( const ::rtl::OUString& aUrl, - const ::rtl::OUString& aUserName, + virtual void SAL_CALL add( const ::rtl::OUString& aUrl, + const ::rtl::OUString& aUserName, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPasswords, - const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) + const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) throw(::com::sun::star::uno::RuntimeException); - - virtual void SAL_CALL addPersistent( const ::rtl::OUString& aUrl, - const ::rtl::OUString& aUserName, + + virtual void SAL_CALL addPersistent( const ::rtl::OUString& aUrl, + const ::rtl::OUString& aUserName, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPasswords, - const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) + const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) throw(::com::sun::star::uno::RuntimeException); - - virtual ::com::sun::star::task::UrlRecord SAL_CALL + + virtual ::com::sun::star::task::UrlRecord SAL_CALL find( const ::rtl::OUString& aUrl, - const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) + const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) throw(::com::sun::star::uno::RuntimeException); - - virtual ::com::sun::star::task::UrlRecord SAL_CALL - findForName( const ::rtl::OUString& aUrl, + + virtual ::com::sun::star::task::UrlRecord SAL_CALL + findForName( const ::rtl::OUString& aUrl, const ::rtl::OUString& aUserName, - const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) + const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL remove( const ::rtl::OUString& aUrl, - const ::rtl::OUString& aUserName ) + virtual void SAL_CALL remove( const ::rtl::OUString& aUrl, + const ::rtl::OUString& aUserName ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePersistent( const ::rtl::OUString& aUrl, - const ::rtl::OUString& aUserName ) + virtual void SAL_CALL removePersistent( const ::rtl::OUString& aUrl, + const ::rtl::OUString& aUserName ) throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeAllPersistent() throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::task::UrlRecord > SAL_CALL + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::task::UrlRecord > SAL_CALL getAllPersistent( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ) throw(::com::sun::star::uno::RuntimeException); - + // provide factory static ::rtl::OUString SAL_CALL impl_getStaticImplementationName( ) throw(::com::sun::star::uno::RuntimeException); static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL @@ -359,7 +359,7 @@ public: impl_createFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ServiceManager ) throw(::com::sun::star::uno::RuntimeException); static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL impl_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) throw( ::com::sun::star::uno::RuntimeException ); - + // XServiceInfo virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); @@ -370,7 +370,7 @@ public: // XEventListener virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException); - + // XMasterPasswordHandling virtual ::sal_Bool SAL_CALL authorizateWithMasterPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException); @@ -404,7 +404,7 @@ public: const ::rtl::Reference< ucbhelper::InteractionSupplyAuthentication > & getAuthenticationSupplier() const { return m_xAuthSupplier; } - + }; //---------------------------------------------------------------------------------- diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx index 70122a5b1998..41b07acac7b8 100644 --- a/svl/source/inc/poolio.hxx +++ b/svl/source/inc/poolio.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,19 +34,19 @@ struct SfxPoolVersion_Impl { - USHORT _nVer; - USHORT _nStart, _nEnd; - USHORT* _pMap; + USHORT _nVer; + USHORT _nStart, _nEnd; + USHORT* _pMap; SfxPoolVersion_Impl( USHORT nVer, USHORT nStart, USHORT nEnd, USHORT *pMap ) - : _nVer( nVer ), + : _nVer( nVer ), _nStart( nStart ), _nEnd( nEnd ), _pMap( pMap ) {} SfxPoolVersion_Impl( const SfxPoolVersion_Impl &rOrig ) - : _nVer( rOrig._nVer ), + : _nVer( rOrig._nVer ), _nStart( rOrig._nStart ), _nEnd( rOrig._nEnd ), _pMap( rOrig._pMap ) @@ -58,7 +58,7 @@ SV_DECL_PTRARR_DEL( SfxPoolVersionArr_Impl, SfxPoolVersion_Impl*, 0, 2 ) struct SfxPoolItemArray_Impl: public SfxPoolItemArrayBase_Impl { - USHORT nFirstFree; + USHORT nFirstFree; SfxPoolItemArray_Impl (USHORT nInitSize = 0) : SfxPoolItemArrayBase_Impl( nInitSize ), @@ -70,18 +70,18 @@ class SfxStyleSheetIterator; struct SfxItemPool_Impl { - SfxBroadcaster aBC; - SfxPoolItemArray_Impl** ppPoolItems; - SfxPoolVersionArr_Impl aVersions; - USHORT nVersion; - USHORT nLoadingVersion; - USHORT nInitRefCount; // 1, beim Laden ggf. 2 - USHORT nVerStart, nVerEnd; // WhichRange in Versions - USHORT nStoringStart, nStoringEnd; // zu speichernder Range - BYTE nMajorVer, nMinorVer; // Pool selbst + SfxBroadcaster aBC; + SfxPoolItemArray_Impl** ppPoolItems; + SfxPoolVersionArr_Impl aVersions; + USHORT nVersion; + USHORT nLoadingVersion; + USHORT nInitRefCount; // 1, beim Laden ggf. 2 + USHORT nVerStart, nVerEnd; // WhichRange in Versions + USHORT nStoringStart, nStoringEnd; // zu speichernder Range + BYTE nMajorVer, nMinorVer; // Pool selbst SfxMapUnit eDefMetric; - FASTBOOL bInSetItem; - FASTBOOL bStreaming; // in Load() bzw. Store() + FASTBOOL bInSetItem; + FASTBOOL bStreaming; // in Load() bzw. Store() SfxItemPool_Impl( USHORT nStart, USHORT nEnd ) : ppPoolItems (new SfxPoolItemArray_Impl*[ nEnd - nStart + 1]) @@ -162,33 +162,33 @@ struct SfxItemPool_Impl } \ } -#define SFX_ITEMPOOL_VER_MAJOR BYTE(2) -#define SFX_ITEMPOOL_VER_MINOR BYTE(0) - -#define SFX_ITEMPOOL_TAG_STARTPOOL_4 USHORT(0x1111) -#define SFX_ITEMPOOL_TAG_STARTPOOL_5 USHORT(0xBBBB) -#define SFX_ITEMPOOL_TAG_ITEMPOOL USHORT(0xAAAA) -#define SFX_ITEMPOOL_TAG_ITEMS USHORT(0x2222) -#define SFX_ITEMPOOL_TAG_ITEM USHORT(0x7777) -#define SFX_ITEMPOOL_TAG_SIZES USHORT(0x3333) -#define SFX_ITEMPOOL_TAG_DEFAULTS USHORT(0x4444) -#define SFX_ITEMPOOL_TAG_VERSIONMAP USHORT(0x5555) -#define SFX_ITEMPOOL_TAG_HEADER USHORT(0x6666) -#define SFX_ITEMPOOL_TAG_ENDPOOL USHORT(0xEEEE) -#define SFX_ITEMPOOL_TAG_TRICK4OLD USHORT(0xFFFF) - -#define SFX_ITEMPOOL_REC BYTE(0x01) -#define SFX_ITEMPOOL_REC_HEADER BYTE(0x10) -#define SFX_ITEMPOOL_REC_VERSIONMAP USHORT(0x0020) -#define SFX_ITEMPOOL_REC_WHICHIDS USHORT(0x0030) -#define SFX_ITEMPOOL_REC_ITEMS USHORT(0x0040) -#define SFX_ITEMPOOL_REC_DEFAULTS USHORT(0x0050) - -#define SFX_ITEMSET_REC BYTE(0x02) +#define SFX_ITEMPOOL_VER_MAJOR BYTE(2) +#define SFX_ITEMPOOL_VER_MINOR BYTE(0) + +#define SFX_ITEMPOOL_TAG_STARTPOOL_4 USHORT(0x1111) +#define SFX_ITEMPOOL_TAG_STARTPOOL_5 USHORT(0xBBBB) +#define SFX_ITEMPOOL_TAG_ITEMPOOL USHORT(0xAAAA) +#define SFX_ITEMPOOL_TAG_ITEMS USHORT(0x2222) +#define SFX_ITEMPOOL_TAG_ITEM USHORT(0x7777) +#define SFX_ITEMPOOL_TAG_SIZES USHORT(0x3333) +#define SFX_ITEMPOOL_TAG_DEFAULTS USHORT(0x4444) +#define SFX_ITEMPOOL_TAG_VERSIONMAP USHORT(0x5555) +#define SFX_ITEMPOOL_TAG_HEADER USHORT(0x6666) +#define SFX_ITEMPOOL_TAG_ENDPOOL USHORT(0xEEEE) +#define SFX_ITEMPOOL_TAG_TRICK4OLD USHORT(0xFFFF) + +#define SFX_ITEMPOOL_REC BYTE(0x01) +#define SFX_ITEMPOOL_REC_HEADER BYTE(0x10) +#define SFX_ITEMPOOL_REC_VERSIONMAP USHORT(0x0020) +#define SFX_ITEMPOOL_REC_WHICHIDS USHORT(0x0030) +#define SFX_ITEMPOOL_REC_ITEMS USHORT(0x0040) +#define SFX_ITEMPOOL_REC_DEFAULTS USHORT(0x0050) + +#define SFX_ITEMSET_REC BYTE(0x02) #define SFX_STYLES_REC BYTE(0x03) -#define SFX_STYLES_REC_HEADER USHORT(0x0010) -#define SFX_STYLES_REC_STYLES USHORT(0x0020) +#define SFX_STYLES_REC_HEADER USHORT(0x0010) +#define SFX_STYLES_REC_STYLES USHORT(0x0020) //======================================================================== diff --git a/svl/source/items/aeitem.cxx b/svl/source/items/aeitem.cxx index 36445162424b..2095cf630684 100644 --- a/svl/source/items/aeitem.cxx +++ b/svl/source/items/aeitem.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -195,7 +195,7 @@ SfxPoolItem* SfxAllEnumItem::Create( SvStream & rStream, USHORT ) const USHORT SfxAllEnumItem::_GetPosByValue( USHORT nVal ) const -/* [Beschreibung] +/* [Beschreibung] Im Ggs. zu <SfxEnumItemInterface::GetPosByValue(USHORT)const> liefert diese interne Methode bei nicht vorhandenen Values die Position, diff --git a/svl/source/items/cenumitm.cxx b/svl/source/items/cenumitm.cxx index c5e1a09ec324..a3d1090b6aaf 100644 --- a/svl/source/items/cenumitm.cxx +++ b/svl/source/items/cenumitm.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/items/cintitem.cxx b/svl/source/items/cintitem.cxx index dd22ab757fe7..ad78496f3662 100644 --- a/svl/source/items/cintitem.cxx +++ b/svl/source/items/cintitem.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/items/cntwall.cxx b/svl/source/items/cntwall.cxx index 56632c675d01..4031ed8f24f3 100644 --- a/svl/source/items/cntwall.cxx +++ b/svl/source/items/cntwall.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/items/cstitem.src b/svl/source/items/cstitem.src index 009fcb19e3c6..87f77ec273de 100644 --- a/svl/source/items/cstitem.src +++ b/svl/source/items/cstitem.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/items/ctypeitm.cxx b/svl/source/items/ctypeitm.cxx index 576071b56e1c..d76357b6b4d3 100644 --- a/svl/source/items/ctypeitm.cxx +++ b/svl/source/items/ctypeitm.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -56,14 +56,14 @@ CntContentTypeItem::CntContentTypeItem() } //---------------------------------------------------------------------------- -CntContentTypeItem::CntContentTypeItem( USHORT which, const XubString& rType ) +CntContentTypeItem::CntContentTypeItem( USHORT which, const XubString& rType ) : CntUnencodedStringItem( which, rType ), _eType( CONTENT_TYPE_NOT_INIT ) { } //---------------------------------------------------------------------------- -CntContentTypeItem::CntContentTypeItem( USHORT which, +CntContentTypeItem::CntContentTypeItem( USHORT which, const INetContentType eType ) : CntUnencodedStringItem( which, INetContentTypes::GetContentType( eType ) ), _eType( eType ) diff --git a/svl/source/items/custritm.cxx b/svl/source/items/custritm.cxx index 9d192cc7e7b8..580b674b4dd1 100644 --- a/svl/source/items/custritm.cxx +++ b/svl/source/items/custritm.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/items/dateitem.cxx b/svl/source/items/dateitem.cxx index 27170c1d4f6e..08436fcbe3d7 100644 --- a/svl/source/items/dateitem.cxx +++ b/svl/source/items/dateitem.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -142,12 +142,12 @@ SfxPoolItem* SfxDateTimeItem::Clone( SfxItemPool* ) const SfxItemPresentation SfxDateTimeItem::GetPresentation ( - SfxItemPresentation /*ePresentation*/, - SfxMapUnit /*eCoreMetric*/, - SfxMapUnit /*ePresentationMetric*/, - XubString& rText, + SfxItemPresentation /*ePresentation*/, + SfxMapUnit /*eCoreMetric*/, + SfxMapUnit /*ePresentationMetric*/, + XubString& rText, const IntlWrapper * pIntlWrapper -) const +) const { DBG_CHKTHIS(SfxDateTimeItem, 0); if (aDateTime.IsValid()) @@ -238,12 +238,12 @@ SfxPoolItem* SfxColumnDateTimeItem::Clone( SfxItemPool* ) const SfxItemPresentation SfxColumnDateTimeItem::GetPresentation ( - SfxItemPresentation /*ePresentation*/, - SfxMapUnit /*eCoreMetric*/, - SfxMapUnit /*ePresentationMetric*/, - XubString& rText, + SfxItemPresentation /*ePresentation*/, + SfxMapUnit /*eCoreMetric*/, + SfxMapUnit /*ePresentationMetric*/, + XubString& rText, const IntlWrapper * pIntlWrapper -) const +) const { DBG_ASSERT(pIntlWrapper, "SfxColumnDateTimeItem::GetPresentation():" diff --git a/svl/source/items/eitem.cxx b/svl/source/items/eitem.cxx index c8b7f3db287f..aa1fede5d3c8 100644 --- a/svl/source/items/eitem.cxx +++ b/svl/source/items/eitem.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/items/flagitem.cxx b/svl/source/items/flagitem.cxx index 93d88889daef..262144b25799 100644 --- a/svl/source/items/flagitem.cxx +++ b/svl/source/items/flagitem.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -89,12 +89,12 @@ SvStream& SfxFlagItem::Store(SvStream &rStream, USHORT) const SfxItemPresentation SfxFlagItem::GetPresentation ( - SfxItemPresentation /*ePresentation*/, - SfxMapUnit /*eCoreMetric*/, - SfxMapUnit /*ePresentationMetric*/, - XubString& rText, + SfxItemPresentation /*ePresentation*/, + SfxMapUnit /*eCoreMetric*/, + SfxMapUnit /*ePresentationMetric*/, + XubString& rText, const IntlWrapper * -) const +) const { DBG_CHKTHIS(SfxFlagItem, 0); rText.Erase(); diff --git a/svl/source/items/globalnameitem.cxx b/svl/source/items/globalnameitem.cxx index a0ebd97c89b6..06eee5c8e293 100644 --- a/svl/source/items/globalnameitem.cxx +++ b/svl/source/items/globalnameitem.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -53,7 +53,7 @@ SfxGlobalNameItem::SfxGlobalNameItem() // ----------------------------------------------------------------------- SfxGlobalNameItem::SfxGlobalNameItem( USHORT nW, const SvGlobalName& rName ) -: SfxPoolItem( nW ), +: SfxPoolItem( nW ), m_aName( rName ) { } diff --git a/svl/source/items/ilstitem.cxx b/svl/source/items/ilstitem.cxx index 691fa7d131be..6396d2f78ea1 100644 --- a/svl/source/items/ilstitem.cxx +++ b/svl/source/items/ilstitem.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/items/imageitm.cxx b/svl/source/items/imageitm.cxx index 88c3daa137dc..6cca5521e764 100644 --- a/svl/source/items/imageitm.cxx +++ b/svl/source/items/imageitm.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -105,7 +105,7 @@ BOOL SfxImageItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE ) if (( rVal >>= aSeq ) && ( aSeq.getLength() == 4 )) { sal_Int16 nVal = sal_Int16(); - rtl::OUString aURL; + rtl::OUString aURL; if ( aSeq[0] >>= nVal ) SetValue( nVal ); aSeq[1] >>= pImp->nAngle; diff --git a/svl/source/items/intitem.cxx b/svl/source/items/intitem.cxx index 0342af15e8cb..a1c107a9e1a4 100644 --- a/svl/source/items/intitem.cxx +++ b/svl/source/items/intitem.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/items/itemiter.cxx b/svl/source/items/itemiter.cxx index 57b5dc8e727c..ae508221939c 100644 --- a/svl/source/items/itemiter.cxx +++ b/svl/source/items/itemiter.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -62,7 +62,7 @@ SfxItemIter::SfxItemIter( const SfxItemSet& rItemSet ) for ( _nStt = 0; !*(ppFnd + _nStt ); ++_nStt ) ; // empty loop if ( 1 < _rSet.Count() ) - for( _nEnd = _rSet.TotalCount(); !*( ppFnd + --_nEnd); ) + for( _nEnd = _rSet.TotalCount(); !*( ppFnd + --_nEnd); ) ; // empty loop else _nEnd = _nStt; diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx index 5c5f106a1c36..4c9d77479778 100644 --- a/svl/source/items/itempool.cxx +++ b/svl/source/items/itempool.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -113,7 +113,7 @@ SfxBroadcaster& SfxItemPool::BC() SfxItemPool::SfxItemPool ( - UniString const & rName, /* Name des Pools zur Idetifikation + UniString const & rName, /* Name des Pools zur Idetifikation im File-Format */ USHORT nStartWhich, /* erste Which-Id des Pools */ USHORT nEndWhich, /* letzte Which-Id des Pools */ @@ -970,7 +970,7 @@ const SfxPoolItem& SfxItemPool::GetDefaultItem( USHORT nWhich ) const void SfxItemPool::FreezeIdRanges() -/* [Beschreibung] +/* [Beschreibung] This method should be called at the master pool, when all secondary pools are appended to it. diff --git a/svl/source/items/itemprop.cxx b/svl/source/items/itemprop.cxx index b3be80bc3d0b..16d17ed9fbfa 100644 --- a/svl/source/items/itemprop.cxx +++ b/svl/source/items/itemprop.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -52,7 +52,7 @@ struct equalOUString return r1.equals( r2 ); } }; - + typedef ::std::hash_map< ::rtl::OUString, SfxItemPropertySimpleEntry, ::rtl::OUStringHash, @@ -60,7 +60,7 @@ typedef ::std::hash_map< ::rtl::OUString, class SfxItemPropertyMap_Impl : public SfxItemPropertyHashMap_t { -public: +public: mutable uno::Sequence< beans::Property > m_aPropSeq; SfxItemPropertyMap_Impl(){} @@ -70,7 +70,7 @@ SfxItemPropertyMap_Impl::SfxItemPropertyMap_Impl( const SfxItemPropertyMap_Impl* { this->SfxItemPropertyHashMap_t::operator=( *pSource ); m_aPropSeq = pSource->m_aPropSeq; -} +} /*-- 16.02.2009 10:03:51--------------------------------------------------- @@ -83,7 +83,7 @@ SfxItemPropertyMap::SfxItemPropertyMap( const SfxItemPropertyMapEntry* pEntries ::rtl::OUString sEntry(pEntries->pName, pEntries->nNameLen, RTL_TEXTENCODING_ASCII_US ); (*m_pImpl) [ sEntry ] = pEntries; ++pEntries; - } + } } /*-- 16.02.2009 12:46:41--------------------------------------------------- @@ -139,14 +139,14 @@ uno::Sequence<beans::Property> SfxItemPropertyMap::getProperties() const return m_pImpl->m_aPropSeq; } /*-- 16.02.2009 11:04:31--------------------------------------------------- - + -----------------------------------------------------------------------*/ -beans::Property SfxItemPropertyMap::getPropertyByName( const ::rtl::OUString rName ) const +beans::Property SfxItemPropertyMap::getPropertyByName( const ::rtl::OUString rName ) const throw( beans::UnknownPropertyException ) { SfxItemPropertyHashMap_t::const_iterator aIter = m_pImpl->find(rName); if( aIter == m_pImpl->end() ) - throw UnknownPropertyException(); + throw UnknownPropertyException(); const SfxItemPropertySimpleEntry* pEntry = &aIter->second; beans::Property aProp; aProp.Name = rName; @@ -159,7 +159,7 @@ beans::Property SfxItemPropertyMap::getPropertyByName( const ::rtl::OUString rNa /*-- 16.02.2009 11:09:16--------------------------------------------------- -----------------------------------------------------------------------*/ -sal_Bool SfxItemPropertyMap::hasPropertyByName( const ::rtl::OUString& rName ) const +sal_Bool SfxItemPropertyMap::hasPropertyByName( const ::rtl::OUString& rName ) const { SfxItemPropertyHashMap_t::const_iterator aIter = m_pImpl->find(rName); return aIter != m_pImpl->end(); @@ -188,7 +188,7 @@ PropertyEntryVector_t SfxItemPropertyMap::getPropertyEntries() const { PropertyEntryVector_t aRet; aRet.reserve(m_pImpl->size()); - + SfxItemPropertyHashMap_t::const_iterator aIt = m_pImpl->begin(); while( aIt != m_pImpl->end() ) { @@ -197,14 +197,14 @@ PropertyEntryVector_t SfxItemPropertyMap::getPropertyEntries() const ++aIt; } return aRet; -} +} /*-- 18.02.2009 15:11:06--------------------------------------------------- -----------------------------------------------------------------------*/ sal_uInt32 SfxItemPropertyMap::getSize() const { return m_pImpl->size(); -} +} /*-- 16.02.2009 13:44:54--------------------------------------------------- -----------------------------------------------------------------------*/ @@ -263,7 +263,7 @@ void SfxItemPropertySet::getPropertyValue( const rtl::OUString &rName, const SfxItemSet& rSet, Any& rAny ) const throw(RuntimeException, UnknownPropertyException) { - // detect which-id + // detect which-id const SfxItemPropertySimpleEntry* pEntry = m_aMap.getByName( rName ); if ( !pEntry ) throw UnknownPropertyException(); @@ -316,7 +316,7 @@ void SfxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry& rEn DELETEZ(pNewItem); throw IllegalArgumentException(); } - // apply new item + // apply new item rSet.Put( *pNewItem, rEntry.nWID ); delete pNewItem; } @@ -358,7 +358,7 @@ PropertyState SfxItemPropertySet::getPropertyState(const SfxItemPropertySimpleEn } PropertyState SfxItemPropertySet::getPropertyState( const rtl::OUString& rName, const SfxItemSet& rSet) const - throw(UnknownPropertyException) + throw(UnknownPropertyException) { PropertyState eRet = PropertyState_DIRECT_VALUE; @@ -427,7 +427,7 @@ Sequence< Property > SAL_CALL /*-- 16.02.2009 13:49:27--------------------------------------------------- -----------------------------------------------------------------------*/ -const SfxItemPropertyMap* SfxItemPropertySetInfo::getMap() const +const SfxItemPropertyMap* SfxItemPropertySetInfo::getMap() const { return m_pImpl->m_pOwnMap; } @@ -467,7 +467,7 @@ SfxExtItemPropertySetInfo::SfxExtItemPropertySetInfo( aExtMap( pMap ) { aExtMap.mergeProperties( rPropSeq ); -} +} /*-- 16.02.2009 12:06:49--------------------------------------------------- -----------------------------------------------------------------------*/ diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index a79e5195187a..2a46c24b6d17 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -55,23 +55,23 @@ static const USHORT nInitCount = 10; // einzelne USHORTs => 5 Paare ohne '0' #ifdef DBG_UTIL -static ULONG nRangesCopyCount = 0; // wie oft wurden Ranges kopiert +static ULONG nRangesCopyCount = 0; // wie oft wurden Ranges kopiert #endif DBG_NAME(SfxItemSet) //======================================================================== -#define NUMTYPE USHORT -#define SvNums SvUShorts +#define NUMTYPE USHORT +#define SvNums SvUShorts #define SfxNumRanges SfxUShortRanges #include "nranges.cxx" #undef NUMTYPE #undef SvNums #undef SfxNumRanges -#define NUMTYPE ULONG -#define SvNums SvULongs +#define NUMTYPE ULONG +#define SvNums SvULongs #define SfxNumRanges SfxULongRanges #include "nranges.cxx" #undef NUMTYPE @@ -115,19 +115,19 @@ const sal_Char *DbgCheckItemSet( const void* pVoid ) SfxItemSet::SfxItemSet ( - SfxItemPool& rPool, /* der Pool, in dem die SfxPoolItems, + SfxItemPool& rPool, /* der Pool, in dem die SfxPoolItems, welche in dieses SfxItemSet gelangen, aufgenommen werden sollen */ BOOL #ifdef DBG_UTIL #ifdef SFX_ITEMSET_NO_DEFAULT_CTOR - bTotalRanges /* komplette Pool-Ranges uebernehmen, + bTotalRanges /* komplette Pool-Ranges uebernehmen, muss auf TRUE gesetzt werden */ #endif #endif ) -/* [Beschreibung] +/* [Beschreibung] Konstruktor fuer ein SfxItemSet mit genau den Which-Bereichen, welche dem angegebenen <SfxItemPool> bekannt sind. @@ -139,15 +139,15 @@ SfxItemSet::SfxItemSet keinerlei Items mit Slot-Ids als Which-Werte aufnehmen! */ -: _pPool( &rPool ), +: _pPool( &rPool ), _pParent( 0 ), _nCount( 0 ) { DBG_CTOR(SfxItemSet, DbgCheckItemSet); DBG_ASSERTWARNING( _pPool == _pPool->GetMasterPool(), "kein Master-Pool" ); DBG( _pChildCountCtor; *_pChildCount(this) = 0 ); -// DBG_ASSERT( bTotalRanges || abs( &bTotalRanges - this ) < 1000, -// "please use suitable ranges" ); +// DBG_ASSERT( bTotalRanges || abs( &bTotalRanges - this ) < 1000, +// "please use suitable ranges" ); #ifdef DBG_UTIL #ifdef SFX_ITEMSET_NO_DEFAULT_CTOR if ( !bTotalRanges ) @@ -300,9 +300,9 @@ SfxItemSet::SfxItemSet( const SfxItemSet& rASet ): // Attribute kopieren SfxItemArray ppDst = _aItems, ppSrc = rASet._aItems; for( USHORT n = nCnt; n; --n, ++ppDst, ++ppSrc ) - if ( 0 == *ppSrc || // aktueller Default? - IsInvalidItem(*ppSrc) || // Dont Care? - IsStaticDefaultItem(*ppSrc) ) // nicht zu poolende Defaults + if ( 0 == *ppSrc || // aktueller Default? + IsInvalidItem(*ppSrc) || // Dont Care? + IsStaticDefaultItem(*ppSrc) ) // nicht zu poolende Defaults // einfach Pointer kopieren *ppDst = *ppSrc; else if ( _pPool->IsItemFlag( **ppSrc, SFX_ITEM_POOLABLE ) ) @@ -579,7 +579,7 @@ const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, USHORT nWhich ) { // in diesem Bereich ppFnd += nWhich - *pPtr; - if( *ppFnd ) // schon einer vorhanden + if( *ppFnd ) // schon einer vorhanden { // selbes Item bereits vorhanden? if ( *ppFnd == &rItem ) @@ -678,12 +678,12 @@ int SfxItemSet::Put( const SfxItemSet& rSet, BOOL bInvalidAsDefault ) void SfxItemSet::PutExtended ( - const SfxItemSet& rSet, // Quelle der zu puttenden Items - SfxItemState eDontCareAs, // was mit DontCare-Items passiert - SfxItemState eDefaultAs // was mit Default-Items passiert + const SfxItemSet& rSet, // Quelle der zu puttenden Items + SfxItemState eDontCareAs, // was mit DontCare-Items passiert + SfxItemState eDefaultAs // was mit Default-Items passiert ) -/* [Beschreibung] +/* [Beschreibung] Diese Methode "ubernimmt die Items aus 'rSet' in '*this'. Die Which-Bereiche in '*this', die in 'rSet' nicht vorkommen bleiben unver- @@ -693,9 +693,9 @@ void SfxItemSet::PutExtended (0 Pointer) und Invalid- (-1 Pointer) Items werden je nach Parameter ('eDontCareAs' und 'eDefaultAs' behandelt: - SFX_ITEM_SET: hart auf Default des Pools gesetzt - SFX_ITEM_DEFAULT: gel"oscht (0 Pointer) - SFX_ITEM_DONTCARE: invalidiert (-1 Pointer) + SFX_ITEM_SET: hart auf Default des Pools gesetzt + SFX_ITEM_DEFAULT: gel"oscht (0 Pointer) + SFX_ITEM_DONTCARE: invalidiert (-1 Pointer) Alle anderen Werte f"ur 'eDontCareAs' und 'eDefaultAs' sind ung"ultig. */ @@ -764,7 +764,7 @@ void SfxItemSet::PutExtended // ----------------------------------------------------------------------- void SfxItemSet::MergeRange( USHORT nFrom, USHORT nTo ) -/** <H3>Description</H3> +/** <H3>Description</H3> Expands the ranges of settable items by 'nFrom' to 'nTo'. Keeps state of items which are new ranges too. @@ -785,7 +785,7 @@ void SfxItemSet::MergeRange( USHORT nFrom, USHORT nTo ) void SfxItemSet::SetRanges( const USHORT *pNewRanges ) -/** <H3>Description</H3> +/** <H3>Description</H3> Modifies the ranges of settable items. Keeps state of items which are new ranges too. @@ -805,9 +805,9 @@ void SfxItemSet::SetRanges( const USHORT *pNewRanges ) } // create new item-array (by iterating through all new ranges) - ULONG nSize = Capacity_Impl(pNewRanges); + ULONG nSize = Capacity_Impl(pNewRanges); SfxItemArray aNewItems = new const SfxPoolItem* [ nSize ]; - USHORT n = 0, nNewCount = 0; + USHORT n = 0, nNewCount = 0; if ( _nCount == 0 ) memset( aNewItems, 0, nSize * sizeof( SfxPoolItem* ) ); else @@ -877,10 +877,10 @@ void SfxItemSet::SetRanges( const USHORT *pNewRanges ) int SfxItemSet::Set ( - const SfxItemSet& rSet, /* das SfxItemSet, dessen SfxPoolItems + const SfxItemSet& rSet, /* das SfxItemSet, dessen SfxPoolItems "ubernommen werden sollen */ - BOOL bDeep /* TRUE (default) + BOOL bDeep /* TRUE (default) auch die SfxPoolItems aus den ggf. an rSet vorhandenen Parents werden direkt in das SfxItemSet "ubernommen @@ -890,7 +890,7 @@ int SfxItemSet::Set rSet werden nicht ber"ucksichtigt */ ) -/* [Beschreibung] +/* [Beschreibung] Das SfxItemSet nimmt genau die SfxPoolItems an, die auch in rSet gesetzt sind und im eigenen <Which-Bereich> liegen. Alle @@ -904,7 +904,7 @@ int SfxItemSet::Set [R"uckgabewert] - int TRUE + int TRUE es wurden SfxPoolItems "ubernommen FALSE @@ -943,12 +943,12 @@ int SfxItemSet::Set const SfxPoolItem* SfxItemSet::GetItem ( - USHORT nId, // Slot-Id oder Which-Id des Items - BOOL bSrchInParent, // TRUE: auch in Parent-ItemSets suchen - TypeId aItemType // != 0 => RTTI Pruefung mit Assertion -) const + USHORT nId, // Slot-Id oder Which-Id des Items + BOOL bSrchInParent, // TRUE: auch in Parent-ItemSets suchen + TypeId aItemType // != 0 => RTTI Pruefung mit Assertion +) const -/* [Beschreibung] +/* [Beschreibung] Mit dieser Methode wird der Zugriff auf einzelne Items im SfxItemSet wesentlich vereinfacht. Insbesondere wird die Typpr"ufung @@ -1023,15 +1023,15 @@ const SfxPoolItem& SfxItemSet::Get( USHORT nWhich, BOOL bSrchInParent) const #endif return **ppFnd; } - break; // dann beim Parent suchen + break; // dann beim Parent suchen } ppFnd += *(pPtr+1) - *pPtr + 1; pPtr += 2; } } // bis zum Ende vom Such-Bereich: was nun ? zum Parent, oder Default ?? -// if( !*pPtr ) // bis zum Ende vom Such-Bereich ? -// break; +// if( !*pPtr ) // bis zum Ende vom Such-Bereich ? +// break; } while( bSrchInParent && 0 != ( pAktSet = pAktSet->_pParent )); // dann das Default vom Pool holen und returnen @@ -1073,13 +1073,13 @@ void SfxItemSet::Intersect( const SfxItemSet& rSet ) { DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet); DBG_ASSERT(_pPool, "nicht implementiert ohne Pool"); - if( !Count() ) // gar keine gesetzt ? + if( !Count() ) // gar keine gesetzt ? return; // loesche alle Items, die im rSet nicht mehr vorhanden sind if( !rSet.Count() ) { - ClearItem(); // alles loeschen + ClearItem(); // alles loeschen return; } @@ -1099,7 +1099,7 @@ void SfxItemSet::Intersect( const SfxItemSet& rSet ) if( n & 1 ) nSize += ( *(pWh1) - *(pWh1-1) ) + 1; } - bEqual = *pWh1 == *pWh2; // auch die 0 abpruefen + bEqual = *pWh1 == *pWh2; // auch die 0 abpruefen // sind die Bereiche identisch, ist es einfacher zu handhaben ! if( bEqual ) @@ -1138,7 +1138,7 @@ void SfxItemSet::Intersect( const SfxItemSet& rSet ) ? GetWhichByPos( aIter.GetCurPos() ) : pItem->Which(); if( 0 == rSet.GetItemState( nWhich, FALSE ) ) - ClearItem( nWhich ); // loeschen + ClearItem( nWhich ); // loeschen if( aIter.IsAtEnd() ) break; pItem = aIter.NextItem(); @@ -1170,7 +1170,7 @@ void SfxItemSet::Differentiate( const SfxItemSet& rSet ) if( n & 1 ) nSize += ( *(pWh1) - *(pWh1-1) ) + 1; } - bEqual = *pWh1 == *pWh2; // auch die 0 abpruefen + bEqual = *pWh1 == *pWh2; // auch die 0 abpruefen // sind die Bereiche identisch, ist es einfacher zu handhaben ! if( bEqual ) @@ -1209,7 +1209,7 @@ void SfxItemSet::Differentiate( const SfxItemSet& rSet ) ? GetWhichByPos( aIter.GetCurPos() ) : pItem->Which(); if( SFX_ITEM_SET == rSet.GetItemState( nWhich, FALSE ) ) - ClearItem( nWhich ); // loeschen + ClearItem( nWhich ); // loeschen if( aIter.IsAtEnd() ) break; pItem = aIter.NextItem(); @@ -1237,7 +1237,7 @@ default default == FALSE - - - dontcare default == FALSE - - - unknown default == FALSE - - - set dontcare == FALSE 1.-Item -1 - -default dontcare == FALSE - -1 - +default dontcare == FALSE - -1 - dontcare dontcare == FALSE - - - unknown dontcare == FALSE - - - set unknown == FALSE 1.-Item -1 - @@ -1263,7 +1263,7 @@ dontcare unknown != FALSE - - - unknown unknown != FALSE - - - set set == TRUE - - - -default set == TRUE - 2.-Item 2.-Item +default set == TRUE - 2.-Item 2.-Item dontcare set == TRUE - - - unknown set == TRUE - - - set default == TRUE - - - @@ -1271,7 +1271,7 @@ default default == TRUE - - - dontcare default == TRUE - - - unknown default == TRUE - - - set dontcare == TRUE - - - -default dontcare == TRUE - -1 - +default dontcare == TRUE - -1 - dontcare dontcare == TRUE - - - unknown dontcare == TRUE - - - set unknown == TRUE - - - @@ -1281,7 +1281,7 @@ unknown unknown == TRUE - - - set set != TRUE 1.-Item -1 - default set != TRUE - 2.-Item 2.-Item -dontcare set != TRUE - - - +dontcare set != TRUE - - - unknown set != TRUE - - - set default != TRUE - - - default default != TRUE - - - @@ -1345,7 +1345,7 @@ static void MergeItem_Impl( SfxItemPool *_pPool, USHORT &rCount, **ppFnd1 != _pPool->GetDefaultItem( (*ppFnd1)->Which()) ) { // Entscheidungstabelle: set, dontcare, egal, FALSE - // oder: set, dontcare, !=, TRUE + // oder: set, dontcare, !=, TRUE _pPool->Remove( **ppFnd1 ); *ppFnd1 = (SfxPoolItem*) -1; } @@ -1457,9 +1457,9 @@ void SfxItemSet::InvalidateItem( USHORT nWhich ) // in diesem Bereich ppFnd += nWhich - *pPtr; - if( *ppFnd ) // bei mir gesetzt + if( *ppFnd ) // bei mir gesetzt { - if( (SfxPoolItem*)-1 != *ppFnd ) // noch nicht dontcare ! + if( (SfxPoolItem*)-1 != *ppFnd ) // noch nicht dontcare ! { _pPool->Remove( **ppFnd ); *ppFnd = (SfxPoolItem*)-1; @@ -1500,18 +1500,18 @@ USHORT SfxItemSet::GetWhichByPos( USHORT nPos ) const SvStream &SfxItemSet::Store ( - SvStream& rStream, // Zielstream f"ur normale Items - FASTBOOL bDirect // TRUE: Items direkt speicher, FALSE: Surrogate -) const + SvStream& rStream, // Zielstream f"ur normale Items + FASTBOOL bDirect // TRUE: Items direkt speicher, FALSE: Surrogate +) const -/* [Beschreibung] +/* [Beschreibung] Speichert die <SfxItemSet>-Instanz in den angegebenen Stream. Dabei werden die Surrorage der gesetzten <SfxPoolItem>s bzw. ('bDirect==TRUE') die gesetzten Items selbst wie folgt im Stream abgelegt: - USHORT (Count) Anzahl der gesetzten Items - Count* _pPool->StoreItem() siehe <SfxItemPool::StoreItem()const> + USHORT (Count) Anzahl der gesetzten Items + Count* _pPool->StoreItem() siehe <SfxItemPool::StoreItem()const> [Querverweise] @@ -1566,20 +1566,20 @@ SvStream &SfxItemSet::Store SvStream &SfxItemSet::Load ( - SvStream& rStream, // Stream, aus dem geladen werden soll + SvStream& rStream, // Stream, aus dem geladen werden soll - FASTBOOL bDirect, /* TRUE + FASTBOOL bDirect, /* TRUE Items werden direkt aus dem Stream gelesen, nicht "uber Surrogate FALSE (default) Items werden "uber Surrogate gelesen */ - const SfxItemPool* pRefPool /* Pool, der die Surrogate aufl"osen kann + const SfxItemPool* pRefPool /* Pool, der die Surrogate aufl"osen kann (z.B. zum Einf"ugen von Dokumenten) */ ) -/* [Beschreibung] +/* [Beschreibung] Diese Methode l"adt ein <SfxItemSet> aus einem Stream. Falls der <SfxItemPool> ohne Ref-Counts geladen wurde, werden die geladenen @@ -1641,7 +1641,7 @@ SvStream &SfxItemSet::Load // ----------------------------------------------------------------------- -int SfxItemSet::operator==(const SfxItemSet &rCmp) const +int SfxItemSet::operator==(const SfxItemSet &rCmp) const { DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet); DBG_CHKOBJ(&rCmp, SfxItemSet, DbgCheckItemSet); @@ -1739,7 +1739,7 @@ SfxItemSet *SfxItemSet::Clone(BOOL bItems, SfxItemPool *pToPool ) const // ----------------------------------------------------------------------- -int SfxItemSet::PutDirect(const SfxPoolItem &rItem) +int SfxItemSet::PutDirect(const SfxPoolItem &rItem) { DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet); SfxItemArray ppFnd = _aItems; @@ -1756,10 +1756,10 @@ int SfxItemSet::PutDirect(const SfxPoolItem &rItem) // in diesem Bereich ppFnd += nWhich - *pPtr; const SfxPoolItem* pOld = *ppFnd; - if( pOld ) // schon einer vorhanden + if( pOld ) // schon einer vorhanden { if( rItem == **ppFnd ) - return FALSE; // schon vorhanden ! + return FALSE; // schon vorhanden ! _pPool->Remove( *pOld ); } else @@ -1786,7 +1786,7 @@ int SfxItemSet::PutDirect(const SfxPoolItem &rItem) // ----------------------------------------------------------------------- SfxAllItemSet::SfxAllItemSet( SfxItemPool &rPool ) -: SfxItemSet(rPool, (const USHORT*) 0), +: SfxItemSet(rPool, (const USHORT*) 0), aDefault(0), nFree(nInitCount) { @@ -1817,7 +1817,7 @@ SfxAllItemSet::SfxAllItemSet(const SfxAllItemSet &rCopy) : SfxItemSet(rCopy), aDefault(0), nFree(0) -/* [Anmerkung] +/* [Anmerkung] Der mu\s sein, da sonst vom Compiler einer generiert wird, er nimmt nicht den Ctor mit der 'const SfxItemSet&'! @@ -1830,7 +1830,7 @@ SfxAllItemSet::SfxAllItemSet(const SfxAllItemSet &rCopy) static USHORT *AddRanges_Impl( USHORT *pUS, std::ptrdiff_t nOldSize, USHORT nIncr) -/* Diese interne Funktion erzeugt ein neues Which-Range-Array, welches von +/* Diese interne Funktion erzeugt ein neues Which-Range-Array, welches von dem 'nOldSize'-USHORTs langen 'pUS' kopiert wird und hinten an Platz f"ur 'nIncr' neue USHORTs hat. Das terminierende USHORT mit der '0' wird weder in 'nOldSize' noch in 'nIncr' mitgez"ahlt, sondern implizit @@ -2021,7 +2021,7 @@ const SfxPoolItem* SfxAllItemSet::Put( const SfxPoolItem& rItem, USHORT nWhich ) // ----------------------------------------------------------------------- -/* Diese Methode wird forwarded, damit sie nicht durch die anderen +/* Diese Methode wird forwarded, damit sie nicht durch die anderen Put-Methoden dieser SubClass gehided wird. */ @@ -2098,7 +2098,7 @@ BOOL SfxAllItemSet::Remove(USHORT nWhich) } memmove(_aItems + nPos +1, _aItems + nPos, sizeof(SfxPoolItem *) * (nRest - 1)); - break; // dann beim Parent suchen + break; // dann beim Parent suchen } nPos += *(pPtr+1) - *pPtr + 1; pPtr += 2; diff --git a/svl/source/items/lckbitem.cxx b/svl/source/items/lckbitem.cxx index f1845fc251ee..5bfddc6c10f8 100644 --- a/svl/source/items/lckbitem.cxx +++ b/svl/source/items/lckbitem.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -51,7 +51,7 @@ SfxLockBytesItem::SfxLockBytesItem() // ----------------------------------------------------------------------- SfxLockBytesItem::SfxLockBytesItem( USHORT nW, SvLockBytes *pLockBytes ) -: SfxPoolItem( nW ), +: SfxPoolItem( nW ), _xVal( pLockBytes ) { } @@ -59,7 +59,7 @@ SfxLockBytesItem::SfxLockBytesItem( USHORT nW, SvLockBytes *pLockBytes ) // ----------------------------------------------------------------------- SfxLockBytesItem::SfxLockBytesItem( USHORT nW, SvStream &rStream ) -: SfxPoolItem( nW ) +: SfxPoolItem( nW ) { rStream.Seek( 0L ); _xVal = new SvLockBytes( new SvCacheStream(), TRUE ); @@ -71,7 +71,7 @@ SfxLockBytesItem::SfxLockBytesItem( USHORT nW, SvStream &rStream ) // ----------------------------------------------------------------------- SfxLockBytesItem::SfxLockBytesItem( const SfxLockBytesItem& rItem ) -: SfxPoolItem( rItem ), +: SfxPoolItem( rItem ), _xVal( rItem._xVal ) { } @@ -98,7 +98,7 @@ SfxPoolItem* SfxLockBytesItem::Clone(SfxItemPool *) const // ----------------------------------------------------------------------- -#define MAX_BUF 32000 +#define MAX_BUF 32000 SfxPoolItem* SfxLockBytesItem::Create( SvStream &rStream, USHORT ) const { diff --git a/svl/source/items/macitem.cxx b/svl/source/items/macitem.cxx index acaa66839981..fa177502021c 100644 --- a/svl/source/items/macitem.cxx +++ b/svl/source/items/macitem.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -210,7 +210,7 @@ int SvxMacroItem::operator==( const SfxPoolItem& rAttr ) const { const SvxMacro *pOwnMac = rOwn.GetObject(nNo); const SvxMacro *pOtherMac = rOther.GetObject(nNo); - if ( rOwn.GetKey(pOwnMac) != rOther.GetKey(pOtherMac) || + if ( rOwn.GetKey(pOwnMac) != rOther.GetKey(pOtherMac) || pOwnMac->GetLibName() != pOtherMac->GetLibName() || pOwnMac->GetMacName() != pOtherMac->GetMacName() ) return FALSE; @@ -231,11 +231,11 @@ SfxPoolItem* SvxMacroItem::Clone( SfxItemPool* ) const SfxItemPresentation SvxMacroItem::GetPresentation ( SfxItemPresentation /*ePres*/, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, - XubString& rText, + SfxMapUnit /*eCoreUnit*/, + SfxMapUnit /*ePresUnit*/, + XubString& rText, const IntlWrapper * -) const +) const { /*!!! SvxMacroTableDtor& rTbl = (SvxMacroTableDtor&)GetMacroTable(); diff --git a/svl/source/items/nranges.cxx b/svl/source/items/nranges.cxx index 813c1fec8ebd..8e3b20332fd1 100644 --- a/svl/source/items/nranges.cxx +++ b/svl/source/items/nranges.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,7 +34,7 @@ #ifdef DBG_UTIL -#define DBG_CHECK_RANGES(NUMTYPE, pArr) \ +#define DBG_CHECK_RANGES(NUMTYPE, pArr) \ for ( const NUMTYPE *pRange = pArr; *pRange; pRange += 2 ) \ { \ DBG_ASSERT( pRange[0] <= pRange[1], "ranges must be sorted" ); \ @@ -61,7 +61,7 @@ inline void Swap_Impl(const NUMTYPE *& rp1, const NUMTYPE *& rp2) NUMTYPE InitializeRanges_Impl( NUMTYPE *&rpRanges, va_list pArgs, NUMTYPE nWh1, NUMTYPE nWh2, NUMTYPE nNull ) -/** <H3>Description</H3> +/** <H3>Description</H3> Creates an USHORT-ranges-array in 'rpRanges' using 'nWh1' and 'nWh2' as first range, 'nNull' as terminator or start of 2nd range and 'pArgs' as @@ -86,7 +86,7 @@ NUMTYPE InitializeRanges_Impl( NUMTYPE *&rpRanges, va_list pArgs, va_arg( pArgs, NUMTYPE_ARG ) ) ) ) { aNumArr.Insert( nIns, nCnt++ ); - if ( 0 == (nCnt & 1) ) // 4,6,8, usw. + if ( 0 == (nCnt & 1) ) // 4,6,8, usw. { DBG_ASSERT( aNumArr[ nCnt-2 ] <= nIns, "Ungueltiger Bereich" ); nSize += nIns - aNumArr[ nCnt-2 ] + 1; @@ -108,7 +108,7 @@ NUMTYPE InitializeRanges_Impl( NUMTYPE *&rpRanges, va_list pArgs, NUMTYPE Count_Impl( const NUMTYPE *pRanges ) -/** <H3>Description</H3> +/** <H3>Description</H3> Determines the number of NUMTYPEs in an 0-terminated array of pairs of NUMTYPEs. The terminating 0 is not included in the count. @@ -128,7 +128,7 @@ NUMTYPE Count_Impl( const NUMTYPE *pRanges ) NUMTYPE Capacity_Impl( const NUMTYPE *pRanges ) -/** <H3>Description</H3> +/** <H3>Description</H3> Determines the total number of NUMTYPEs described in an 0-terminated array of pairs of NUMTYPEs, each representing an range of NUMTYPEs. @@ -152,7 +152,7 @@ NUMTYPE Capacity_Impl( const NUMTYPE *pRanges ) SfxNumRanges::SfxNumRanges( const SfxNumRanges &rOrig ) -/** <H3>Description</H3> +/** <H3>Description</H3> Copy-Ctor. */ @@ -172,7 +172,7 @@ SfxNumRanges::SfxNumRanges( const SfxNumRanges &rOrig ) SfxNumRanges::SfxNumRanges( NUMTYPE nWhich1, NUMTYPE nWhich2 ) -/** <H3>Description</H3> +/** <H3>Description</H3> Constructs an SfxNumRanges-instance from one range of NUMTYPEs. @@ -191,7 +191,7 @@ SfxNumRanges::SfxNumRanges( NUMTYPE nWhich1, NUMTYPE nWhich2 ) SfxNumRanges::SfxNumRanges( NUMTYPE_ARG nWh0, NUMTYPE_ARG nWh1, NUMTYPE_ARG nNull, ... ) -/** <H3>Description</H3> +/** <H3>Description</H3> Constructs an SfxNumRanges-instance from more than one sorted ranges of NUMTYPEs terminated with one 0. @@ -214,7 +214,7 @@ SfxNumRanges::SfxNumRanges( NUMTYPE_ARG nWh0, NUMTYPE_ARG nWh1, NUMTYPE_ARG nNul SfxNumRanges::SfxNumRanges( const NUMTYPE* pArr ) -/** <H3>Description</H3> +/** <H3>Description</H3> Constcurts an SfxNumRanges-instance from an sorted ranges of NUMTYPEs, terminates with on 0. @@ -268,7 +268,7 @@ SfxNumRanges& SfxNumRanges::operator = const SfxNumRanges &rRanges ) -/** <H3>Description</H3> +/** <H3>Description</H3> Assigns ranges from 'rRanges' to '*this'. */ @@ -300,7 +300,7 @@ SfxNumRanges& SfxNumRanges::operator += const SfxNumRanges &rRanges ) -/** <H3>Description</H3> +/** <H3>Description</H3> Merges *this with 'rRanges'. @@ -460,7 +460,7 @@ SfxNumRanges& SfxNumRanges::operator -= const SfxNumRanges &rRanges ) -/** <H3>Description</H3> +/** <H3>Description</H3> Removes 'rRanges' from '*this'. @@ -486,10 +486,10 @@ SfxNumRanges& SfxNumRanges::operator -= NUMTYPE nPos1 = 0, nPos2 = 0, nTargetPos = 0; while( _pRanges[ nPos1 ] ) { - NUMTYPE l1 = _pRanges[ nPos1 ]; // lower bound of interval 1 - NUMTYPE u1 = _pRanges[ nPos1+1 ]; // upper bound of interval 1 - NUMTYPE l2 = rRanges._pRanges[ nPos2 ]; // lower bound of interval 2 - NUMTYPE u2 = rRanges._pRanges[ nPos2+1 ]; // upper bound of interval 2 + NUMTYPE l1 = _pRanges[ nPos1 ]; // lower bound of interval 1 + NUMTYPE u1 = _pRanges[ nPos1+1 ]; // upper bound of interval 1 + NUMTYPE l2 = rRanges._pRanges[ nPos2 ]; // lower bound of interval 2 + NUMTYPE u2 = rRanges._pRanges[ nPos2+1 ]; // upper bound of interval 2 // boundary cases // * subtrahend is empty -> copy the minuend @@ -661,7 +661,7 @@ SfxNumRanges& SfxNumRanges::operator /= const SfxNumRanges &rRanges ) -/** <H3>Description</H3> +/** <H3>Description</H3> Determines intersection of '*this' with 'rRanges'. @@ -696,10 +696,10 @@ SfxNumRanges& SfxNumRanges::operator /= NUMTYPE nPos1 = 0, nPos2 = 0, nTargetPos = 0; while( _pRanges[ nPos1 ] != 0 && rRanges._pRanges[ nPos2 ] != 0 ) { - NUMTYPE l1 = _pRanges[ nPos1 ]; // lower bound of interval 1 - NUMTYPE u1 = _pRanges[ nPos1+1 ]; // upper bound of interval 1 - NUMTYPE l2 = rRanges._pRanges[ nPos2 ]; // lower bound of interval 2 - NUMTYPE u2 = rRanges._pRanges[ nPos2+1 ]; // upper bound of interval 2 + NUMTYPE l1 = _pRanges[ nPos1 ]; // lower bound of interval 1 + NUMTYPE u1 = _pRanges[ nPos1+1 ]; // upper bound of interval 1 + NUMTYPE l2 = rRanges._pRanges[ nPos2 ]; // lower bound of interval 2 + NUMTYPE u2 = rRanges._pRanges[ nPos2+1 ]; // upper bound of interval 2 if( u1 < l2 ) { @@ -778,7 +778,7 @@ SfxNumRanges& SfxNumRanges::operator /= BOOL SfxNumRanges::Intersects( const SfxNumRanges &rRanges ) const -/** <H3>Description</H3> +/** <H3>Description</H3> Determines if at least one range in 'rRanges' intersects with one range in '*this'. @@ -822,7 +822,7 @@ BOOL SfxNumRanges::Intersects( const SfxNumRanges &rRanges ) const NUMTYPE SfxNumRanges::Count() const -/** <H3>Description</H3> +/** <H3>Description</H3> Determines the number of USHORTs in the set described by the ranges of USHORTs in '*this'. @@ -836,7 +836,7 @@ NUMTYPE SfxNumRanges::Count() const BOOL SfxNumRanges::Contains( NUMTYPE n ) const -/** <H3>Description</H3> +/** <H3>Description</H3> Determines if '*this' contains 'n'. */ diff --git a/svl/source/items/poolcach.cxx b/svl/source/items/poolcach.cxx index b918add10f0f..74172eaa08f3 100644 --- a/svl/source/items/poolcach.cxx +++ b/svl/source/items/poolcach.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,7 +47,7 @@ DBG_NAME(SfxItemPoolCache) struct SfxItemModifyImpl { const SfxSetItem *pOrigItem; - SfxSetItem *pPoolItem; + SfxSetItem *pPoolItem; }; SV_DECL_VARARR( SfxItemModifyArr_Impl, SfxItemModifyImpl, 8, 8 ) @@ -114,7 +114,7 @@ const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem, BOOL b { rMapEntry.pPoolItem->AddRef(2); // einen davon fuer den Cache if ( bNew ) - pPool->Put( rOrigItem ); //! AddRef?? + pPool->Put( rOrigItem ); //! AddRef?? } return *rMapEntry.pPoolItem; } @@ -137,7 +137,7 @@ const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem, BOOL b // Refernzzaehler anpassen, je einen davon fuer den Cache pNewPoolItem->AddRef( pNewPoolItem != &rOrigItem ? 2 : 1 ); if ( bNew ) - pPool->Put( rOrigItem ); //! AddRef?? + pPool->Put( rOrigItem ); //! AddRef?? // die Transformation im Cache eintragen SfxItemModifyImpl aModify; diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx index 6aeb64d76d1a..ac437ff082f5 100644 --- a/svl/source/items/poolio.cxx +++ b/svl/source/items/poolio.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,7 +50,7 @@ DBG_NAME(SfxItemPool); void SfxItemPool::SetStoringPool( const SfxItemPool *pStoringPool ) -/* [Beschreibung] +/* [Beschreibung] Diese Methode setzt den <SfxItemPool>, der gerade gespeichert wird. Sie sollte nur in Notf"allen verwendet werden, um z.B. File-Format- @@ -71,7 +71,7 @@ void SfxItemPool::SetStoringPool( const SfxItemPool *pStoringPool ) const SfxItemPool* SfxItemPool::GetStoringPool() -/* [Beschreibung] +/* [Beschreibung] Diese Methode liefert den <SfxItemPool>, der gerade gespeichert wird. Sie sollte nur in Notf"allen verwendet werden, um z.B. File-Format- @@ -88,7 +88,7 @@ const SfxItemPool* SfxItemPool::GetStoringPool() SvStream &SfxItemPool::Store(SvStream &rStream) const -/* [Beschreibung] +/* [Beschreibung] Der SfxItemPool wird inklusive aller seiner Sekund"arpools mit Pool-Defaults und gepoolten Items in dem angegebenen Stream gespeichert. @@ -98,45 +98,45 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const [Fileformat] ;zun"achst ein Kompatiblit"ats-Header-Block - Start: 0x1111 SFX_ITEMPOOL_TAG_STARTPOOLS(_4/_5) - BYTE MAJOR_VER ;SfxItemPool-Version - BYTE MINOR_VER ;" - 0xFFFF SFX_ITEMPOOL_TAG_TRICK4OLD ;ex. GetVersion() - USHORT 0x0000 ;Pseudo-StyleSheetPool - USHORT 0x0000 ;Pseudo-StyleSheetPool + Start: 0x1111 SFX_ITEMPOOL_TAG_STARTPOOLS(_4/_5) + BYTE MAJOR_VER ;SfxItemPool-Version + BYTE MINOR_VER ;" + 0xFFFF SFX_ITEMPOOL_TAG_TRICK4OLD ;ex. GetVersion() + USHORT 0x0000 ;Pseudo-StyleSheetPool + USHORT 0x0000 ;Pseudo-StyleSheetPool ;den ganzen Pool in einen Record - record SfxMiniRecod(SFX_ITEMPOOL_REC) + record SfxMiniRecod(SFX_ITEMPOOL_REC) ;je ein Header vorweg - Header: record SfxMiniRecord(SFX_ITEMPOOL_REC_HEADER) - USHORT GetVersion() ;Which-Ranges etc. - String GetName() ;Pool-Name + Header: record SfxMiniRecord(SFX_ITEMPOOL_REC_HEADER) + USHORT GetVersion() ;Which-Ranges etc. + String GetName() ;Pool-Name ;die Versions-Map, um WhichIds neuer File-Versionen mappen zu k"onnen - Versions: record SfxMultiRecord(SFX_ITEMPOOL_REC_VERSIONS, 0) - USHORT OldVersion - USHORT OldStartWhich - USHORT OldEndWhich + Versions: record SfxMultiRecord(SFX_ITEMPOOL_REC_VERSIONS, 0) + USHORT OldVersion + USHORT OldStartWhich + USHORT OldEndWhich USHORT[] NewWhich (OldEndWhich-OldStartWhich+1) ;jetzt die gepoolten Items (zuerst nicht-SfxSetItems) - Items: record SfxMultiRecord(SFX_ITEMPOOL_REC_WHICHIDS, 0) - content SlotId, 0 - USHORT WhichId - USHORT pItem->GetVersion() - USHORT Array-Size - record SfxMultiRecord(SFX_, 0) - content Surrogate - USHORT RefCount - unknown pItem->Store() + Items: record SfxMultiRecord(SFX_ITEMPOOL_REC_WHICHIDS, 0) + content SlotId, 0 + USHORT WhichId + USHORT pItem->GetVersion() + USHORT Array-Size + record SfxMultiRecord(SFX_, 0) + content Surrogate + USHORT RefCount + unknown pItem->Store() ;jetzt die gesetzten Pool-Defaults - Defaults: record SfxMultiRecord(SFX_ITEMPOOL_REC_DEFAULTS, 0) - content SlotId, 0 - USHORT WhichId - USHORT pPoolDef->GetVersion() - unknown pPoolDef->Store(); + Defaults: record SfxMultiRecord(SFX_ITEMPOOL_REC_DEFAULTS, 0) + content SlotId, 0 + USHORT WhichId + USHORT pPoolDef->GetVersion() + unknown pPoolDef->Store(); ;dahinter folgt ggf. der Secondary ohne Kompatiblit"ats-Header-Block */ @@ -319,7 +319,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const void SfxItemPool::LoadCompleted() -/* [Beschreibung] +/* [Beschreibung] Wurde der SfxItemPool mit 'bRefCounts' == FALSE geladen, mu\s das Laden der Dokumentinhalte mit einem Aufruf dieser Methode beendet @@ -646,9 +646,9 @@ SvStream &SfxItemPool::Load(SvStream &rStream) rStream >> nVersion; rStream >> nCount; //!SFX_ASSERTWARNING( !nSlotId || !HasMap() || - //! ( nSlotId == GetSlotId( nWhich, FALSE ) ) || - //! !GetSlotId( nWhich, FALSE ), - //! nWhich, "Slot/Which mismatch" ); + //! ( nSlotId == GetSlotId( nWhich, FALSE ) ) || + //! !GetSlotId( nWhich, FALSE ), + //! nWhich, "Slot/Which mismatch" ); USHORT nIndex = GetIndex_Impl(nWhich); SfxPoolItemArray_Impl **ppArr = pImp->ppPoolItems + nIndex; @@ -698,7 +698,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream) rStream >> nVersion; //!SFX_ASSERTWARNING( !HasMap() || ( nSlotId == GetSlotId( nWhich, FALSE ) ), - //! nWhich, "Slot/Which mismatch" ); + //! nWhich, "Slot/Which mismatch" ); // Pool-Default-Item selbst laden SfxPoolItem *pItem = @@ -843,9 +843,9 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream) nWhich = nMappedWhich; //!SFX_ASSERTWARNING( !nSlot || !HasMap() || - //! ( nSlot == GetSlotId( nWhich, FALSE ) ) || - //! !GetSlotId( nWhich, FALSE ), - //! nWhich, "Slot/Which mismatch" ); + //! ( nSlot == GetSlotId( nWhich, FALSE ) ) || + //! !GetSlotId( nWhich, FALSE ), + //! nWhich, "Slot/Which mismatch" ); USHORT nIndex = GetIndex_Impl(nWhich); ppArr = pImp->ppPoolItems + nIndex; @@ -1028,13 +1028,13 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream) const SfxPoolItem* SfxItemPool::LoadSurrogate ( - SvStream& rStream, // vor einem Surrogat positionierter Stream - USHORT& rWhich, // Which-Id des zu ladenden <SfxPoolItem>s - USHORT nSlotId, // Slot-Id des zu ladenden <SfxPoolItem>s - const SfxItemPool* pRefPool // <SfxItemPool> in dem das Surrogat gilt + SvStream& rStream, // vor einem Surrogat positionierter Stream + USHORT& rWhich, // Which-Id des zu ladenden <SfxPoolItem>s + USHORT nSlotId, // Slot-Id des zu ladenden <SfxPoolItem>s + const SfxItemPool* pRefPool // <SfxItemPool> in dem das Surrogat gilt ) -/* [Beschreibung] +/* [Beschreibung] L"adt Surrogat aus 'rStream' und liefert das dadurch in 'rRefPool' repr"asentierte SfxPoolItem zu"ruck. Ist das im Stream befindliche @@ -1051,14 +1051,14 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate nicht in eine Which-Id dieses Pools gemappt werden, wird ebenfalls 0 zur"uckgeliefert. - Preconditions: - Pool mu\s geladen sein + Preconditions: - Pool mu\s geladen sein - LoadCompleted darf noch nicht gerufen worden sein - 'rStream' steht genau an der Position, an der ein Surrogat f"ur ein Item mit der SlotId 'nSlotId' und der WhichId 'rWhichId' mit StoreSurrogate gepeichert wurde - Postconditions: - 'rStream' ist so positioniert, wie auch StoreSurrogate + Postconditions: - 'rStream' ist so positioniert, wie auch StoreSurrogate sein speichern beendet hatte - konnte ein Item geladen werden, befindet es sich in diesem SfxItemPool @@ -1155,18 +1155,18 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate FASTBOOL SfxItemPool::StoreSurrogate ( - SvStream& rStream, - const SfxPoolItem* pItem -) const + SvStream& rStream, + const SfxPoolItem* pItem +) const -/* [Beschreibung] +/* [Beschreibung] Speichert ein Surrogat f"ur '*pItem' in 'rStream'. [R"uckgabewert] - FASTBOOL TRUE + FASTBOOL TRUE es wurde ein echtes Surrogat gespeichert, auch SFX_ITEMS_NULL bei 'pItem==0', SFX_ITEMS_STATICDEFAULT und SFX_ITEMS_POOLDEFAULT @@ -1237,7 +1237,7 @@ FASTBOOL SfxItemPool::IsInStoringRange( USHORT nWhich ) const void SfxItemPool::SetStoringRange( USHORT nFrom, USHORT nTo ) -/* [Beschreibung] +/* [Beschreibung] Mit dieser Methode kann der Which-Bereich eingeengt werden, der von ItemSets dieses Pool (und dem Pool selbst) gespeichert wird. @@ -1262,15 +1262,15 @@ void SfxItemPool::SetStoringRange( USHORT nFrom, USHORT nTo ) void SfxItemPool::SetVersionMap ( - USHORT nVer, /* neue Versionsnummer */ + USHORT nVer, /* neue Versionsnummer */ USHORT nOldStart, /* alte erste Which-Id */ USHORT nOldEnd, /* alte letzte Which-Id */ - USHORT* pOldWhichIdTab /* Array mit genau dem Aufbau der Which-Ids + USHORT* pOldWhichIdTab /* Array mit genau dem Aufbau der Which-Ids der vorhergehenden Version, in denen die jeweils neue Which-Id steht. */ ) -/* [Beschreibung] +/* [Beschreibung] Mit dieser Methode k"onnen neue, inkompatible Which-Id-Folgen oder Verteilungen realisiert werden. Pools, die noch mit alten Versionen @@ -1279,8 +1279,8 @@ void SfxItemPool::SetVersionMap unter Verlust neuer Attribute geladen werden, da die Map mit dem Pool gespeichert wird. - Precondition: Pool darf noch nicht geladen sein - Postcondition: Which-Ids aus fr"uheren Versionen k"onnen bei Laden auf + Precondition: Pool darf noch nicht geladen sein + Postcondition: Which-Ids aus fr"uheren Versionen k"onnen bei Laden auf Version 'nVer' gemappt werden Laufzeit: 1.5 * new + 10 @@ -1353,10 +1353,10 @@ void SfxItemPool::SetVersionMap USHORT SfxItemPool::GetNewWhich ( - USHORT nFileWhich // die aus dem Stream geladene Which-Id -) const + USHORT nFileWhich // die aus dem Stream geladene Which-Id +) const -/* [Beschreibung] +/* [Beschreibung] Diese Methoden rechnet Which-Ids aus einem File-Format in die der aktuellen Pool-Version um. Ist das File-Format "alter, werden die vom @@ -1368,9 +1368,9 @@ USHORT SfxItemPool::GetNewWhich Die Berechnung ist nur f"ur Which-Ids definiert, die in der betreffenden File-Version unterst"utzt wurden. Dies ist per Assertion abgesichert. - Precondition: Pool mu\s geladen sein - Postcondition: unver"andert - Laufzeit: linear(Anzahl der Sekund"arpools) + + Precondition: Pool mu\s geladen sein + Postcondition: unver"andert + Laufzeit: linear(Anzahl der Sekund"arpools) + linear(Differenz zwischen alter und neuer Version) @@ -1402,7 +1402,7 @@ USHORT SfxItemPool::GetNewWhich { SfxPoolVersion_Impl *pVerInfo = pImp->aVersions[nMap-1]; if ( pVerInfo->_nVer > pImp->nVersion ) - { USHORT nOfs; + { USHORT nOfs; USHORT nCount = pVerInfo->_nEnd - pVerInfo->_nStart + 1; for ( nOfs = 0; nOfs <= nCount && @@ -1453,14 +1453,14 @@ FASTBOOL SfxItemPool::IsInVersionsRange( USHORT nWhich ) const FASTBOOL SfxItemPool::IsCurrentVersionLoading() const -/* [Beschreibung] +/* [Beschreibung] Mit dieser Methode kann festgestellt werden, ob die geladene Pool-Version dem aktuellen Pool-Aufbau entspricht. - Precondition: Pool mu\s geladen sein - Postcondition: unver"andert - Laufzeit: linear(Anzahl der Sekund"arpools) + Precondition: Pool mu\s geladen sein + Postcondition: unver"andert + Laufzeit: linear(Anzahl der Sekund"arpools) [Querverweise] @@ -1480,13 +1480,13 @@ FASTBOOL SfxItemPool::IsCurrentVersionLoading() const USHORT SfxItemPool::GetVersion() const -/* [Beschreibung] +/* [Beschreibung] Diese Methode liefert die aktuelle Versionsnummer des SfxItemPool-Aufbaus (also des Which-Bereichs). - Precondition: keine - Postcondition: unver"andert + Precondition: keine + Postcondition: unver"andert Laufzeit: 2 @@ -1512,13 +1512,13 @@ USHORT SfxItemPool::GetVersion() const USHORT SfxItemPool::GetLoadingVersion() const -/* [Beschreibung] +/* [Beschreibung] Diese Methode liefert die Versionsnummer des SfxItemPool-Aufbaus (also des Which-Bereichs), die bei Laden vorgefunden wurde. - Precondition: Pool mu\s geladen sein - Postcondition: unver"andert + Precondition: Pool mu\s geladen sein + Postcondition: unver"andert Laufzeit: 2 @@ -1553,7 +1553,7 @@ FASTBOOL SfxItemPool::IsVer2_Impl() const FASTBOOL SfxItemPool::StoreItem( SvStream &rStream, const SfxPoolItem &rItem, FASTBOOL bDirect ) const -/* [Beschreibung] +/* [Beschreibung] Speichert das <SfxPoolItem> 'rItem' in den <SvStream> 'rStream' entweder als Surrogat ('bDirect == FALSE') oder direkt mit 'rItem.Store()'. @@ -1563,14 +1563,14 @@ FASTBOOL SfxItemPool::StoreItem( SvStream &rStream, const SfxPoolItem &rItem, Das Item wird im Stream wie folgt abgelegt: - USHORT rItem.Which() - USHORT GetSlotId( rItem.Which() ) bzw. 0 falls nicht verf"urbar - USHORT GetSurrogate( &rItem ) bzw. SFX_ITEM_DIRECT bei '!SFX_ITEM_POOLBLE' + USHORT rItem.Which() + USHORT GetSlotId( rItem.Which() ) bzw. 0 falls nicht verf"urbar + USHORT GetSurrogate( &rItem ) bzw. SFX_ITEM_DIRECT bei '!SFX_ITEM_POOLBLE' optional (falls 'bDirect == TRUE' oder '!rItem.IsPoolable()': USHORT rItem.GetVersion() - ULONG Size + ULONG Size Size rItem.Store() @@ -1601,7 +1601,7 @@ FASTBOOL SfxItemPool::StoreItem( SvStream &rStream, const SfxPoolItem &rItem, if ( bDirect || !pPool->StoreSurrogate( rStream, &rItem ) ) { rStream << nItemVersion; - rStream << (UINT32) 0L; // Platz fuer Laenge in Bytes + rStream << (UINT32) 0L; // Platz fuer Laenge in Bytes ULONG nIStart = rStream.Tell(); rItem.Store(rStream, nItemVersion); ULONG nIEnd = rStream.Tell(); diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx index 77cf3dfff014..c8d7962fa180 100644 --- a/svl/source/items/poolitem.cxx +++ b/svl/source/items/poolitem.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -122,8 +122,8 @@ SfxPoolItem::SfxPoolItem( USHORT nW ) // ----------------------------------------------------------------------- SfxPoolItem::SfxPoolItem( const SfxPoolItem& rCpy ) - : nRefCount( 0 ), // wird ja ein neues Object! - nWhich( rCpy.Which() ) // Funktion rufen wg. ChkThis() + : nRefCount( 0 ), // wird ja ein neues Object! + nWhich( rCpy.Which() ) // Funktion rufen wg. ChkThis() , nKind( 0 ) { DBG_CTOR(SfxPoolItem, 0); @@ -255,14 +255,14 @@ void SfxPoolItem::writeUnicodeString(SvStream & rStream, // ------------------------------------------------------------------------ SfxItemPresentation SfxPoolItem::GetPresentation ( - SfxItemPresentation /*ePresentation*/, // IN: wie formatiert werden soll - SfxMapUnit /*eCoreMetric*/, // IN: Ma\seinheit des SfxPoolItems - SfxMapUnit /*ePresentationMetric*/, // IN: Wunsch-Ma\einheit der Darstellung - XubString& /*rText*/, // OUT: textuelle Darstellung + SfxItemPresentation /*ePresentation*/, // IN: wie formatiert werden soll + SfxMapUnit /*eCoreMetric*/, // IN: Ma\seinheit des SfxPoolItems + SfxMapUnit /*ePresentationMetric*/, // IN: Wunsch-Ma\einheit der Darstellung + XubString& /*rText*/, // OUT: textuelle Darstellung const IntlWrapper * -) const +) const -/* [Beschreibung] +/* [Beschreibung] "Uber diese virtuelle Methode kann von den SfxPoolItem-Subklassen eine textuelle Datstellung des Wertes erhalten werden. Sie sollte @@ -279,7 +279,7 @@ SfxItemPresentation SfxPoolItem::GetPresentation [R"uckgabewert] - SfxItemPresentation SFX_ITEM_PRESENTATION_NONE + SfxItemPresentation SFX_ITEM_PRESENTATION_NONE es konnte keine Text-Darstellung erzeugt werden SFX_ITEM_PRESENTATION_NAMELESS @@ -340,12 +340,12 @@ rCmp // ------------------------------------------------------------------------ SfxItemPresentation SfxVoidItem::GetPresentation ( - SfxItemPresentation /*ePresentation*/, - SfxMapUnit /*eCoreMetric*/, - SfxMapUnit /*ePresentationMetric*/, - XubString& rText, + SfxItemPresentation /*ePresentation*/, + SfxMapUnit /*eCoreMetric*/, + SfxMapUnit /*ePresentationMetric*/, + XubString& rText, const IntlWrapper * -) const +) const { DBG_CHKTHIS(SfxVoidItem, 0); rText.AssignAscii(RTL_CONSTASCII_STRINGPARAM("Void")); @@ -394,12 +394,12 @@ int SfxInvalidItem::operator==( const SfxPoolItem& rCmp) const // ------------------------------------------------------------------------ SfxItemPresentation SfxInvalidItem::GetPresentation ( - SfxItemPresentation ePresentation, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresentationMetric, - XubString& rText, + SfxItemPresentation ePresentation, + SfxMapUnit eCoreMetric, + SfxMapUnit ePresentationMetric, + XubString& rText, const IntlWrapper * -) const +) const { DBG_CHKTHIS(SfxInvalidItem, 0); rText.AssignAscii(RTL_CONSTASCII_STRINGPARAM("Invalid")); diff --git a/svl/source/items/ptitem.cxx b/svl/source/items/ptitem.cxx index 3c12745e5967..93f7e179001d 100644 --- a/svl/source/items/ptitem.cxx +++ b/svl/source/items/ptitem.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -86,12 +86,12 @@ SfxPointItem::SfxPointItem( const SfxPointItem& rItem ) : SfxItemPresentation SfxPointItem::GetPresentation ( - SfxItemPresentation /*ePresentation*/, - SfxMapUnit /*eCoreMetric*/, - SfxMapUnit /*ePresentationMetric*/, - XubString& rText, + SfxItemPresentation /*ePresentation*/, + SfxMapUnit /*eCoreMetric*/, + SfxMapUnit /*ePresentationMetric*/, + XubString& rText, const IntlWrapper * -) const +) const { DBG_CHKTHIS(SfxPointItem, 0); rText = UniString::CreateFromInt32(aVal.X()); @@ -172,16 +172,16 @@ BOOL SfxPointItem::PutValue( const uno::Any& rVal, awt::Point aValue; sal_Int32 nVal = 0; if ( !nMemberId ) - { + { bRet = ( rVal >>= aValue ); if( bConvert ) { aValue.X = MM100_TO_TWIP(aValue.X); aValue.Y = MM100_TO_TWIP(aValue.Y); - } + } } else - { + { bRet = ( rVal >>= nVal ); if( bConvert ) nVal = MM100_TO_TWIP( nVal ); diff --git a/svl/source/items/rectitem.cxx b/svl/source/items/rectitem.cxx index 893ac3c125b0..146caa170f6c 100644 --- a/svl/source/items/rectitem.cxx +++ b/svl/source/items/rectitem.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -83,12 +83,12 @@ SfxRectangleItem::SfxRectangleItem( const SfxRectangleItem& rItem ) : SfxItemPresentation SfxRectangleItem::GetPresentation ( - SfxItemPresentation /*ePresentation*/, - SfxMapUnit /*eCoreMetric*/, - SfxMapUnit /*ePresentationMetric*/, - XubString& rText, + SfxItemPresentation /*ePresentation*/, + SfxMapUnit /*eCoreMetric*/, + SfxMapUnit /*ePresentationMetric*/, + XubString& rText, const IntlWrapper * -) const +) const { DBG_CHKTHIS(SfxRectangleItem, 0); rText = UniString::CreateFromInt32(aVal.Top()); diff --git a/svl/source/items/rngitem.cxx b/svl/source/items/rngitem.cxx index 2f9c58a362f6..0af99e1cd5af 100644 --- a/svl/source/items/rngitem.cxx +++ b/svl/source/items/rngitem.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,7 +37,7 @@ #include <svl/rngitem.hxx> #include "rngitem_inc.cxx" -#define NUMTYPE sal_uInt32 +#define NUMTYPE sal_uInt32 #define SfxXRangeItem SfxULongRangeItem #define SfxXRangesItem SfxULongRangesItem #include <svl/rngitem.hxx> diff --git a/svl/source/items/rngitem_inc.cxx b/svl/source/items/rngitem_inc.cxx index ab8852756f7d..2d9d6614f875 100644 --- a/svl/source/items/rngitem_inc.cxx +++ b/svl/source/items/rngitem_inc.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -82,12 +82,12 @@ SfxXRangeItem::SfxXRangeItem( const SfxXRangeItem& rItem ) : SfxItemPresentation SfxXRangeItem::GetPresentation ( - SfxItemPresentation /*ePresentation*/, - SfxMapUnit /*eCoreMetric*/, - SfxMapUnit /*ePresentationMetric*/, - XubString& rText, + SfxItemPresentation /*ePresentation*/, + SfxMapUnit /*eCoreMetric*/, + SfxMapUnit /*ePresentationMetric*/, + XubString& rText, const IntlWrapper * -) const +) const { rText = UniString::CreateFromInt64(nFrom); rText += ':'; @@ -117,7 +117,7 @@ SfxPoolItem* SfxXRangeItem::Clone(SfxItemPool *) const SfxPoolItem* SfxXRangeItem::Create(SvStream &rStream, USHORT) const { - NUMTYPE nVon, nBis; + NUMTYPE nVon, nBis; rStream >> nVon; rStream >> nBis; return new SfxXRangeItem( Which(), nVon, nBis ); @@ -135,14 +135,14 @@ SvStream& SfxXRangeItem::Store(SvStream &rStream, USHORT) const //========================================================================= SfxXRangesItem::SfxXRangesItem() -: _pRanges(0) +: _pRanges(0) { } //------------------------------------------------------------------------- SfxXRangesItem::SfxXRangesItem( USHORT nWID, const NUMTYPE *pRanges ) -: SfxPoolItem( nWID ) +: SfxPoolItem( nWID ) { NUMTYPE nCount = Count_Impl(pRanges) + 1; _pRanges = new NUMTYPE[nCount]; @@ -152,7 +152,7 @@ SfxXRangesItem::SfxXRangesItem( USHORT nWID, const NUMTYPE *pRanges ) //------------------------------------------------------------------------- SfxXRangesItem::SfxXRangesItem( USHORT nWID, SvStream &rStream ) -: SfxPoolItem( nWID ) +: SfxPoolItem( nWID ) { NUMTYPE nCount; rStream >> nCount; @@ -165,7 +165,7 @@ SfxXRangesItem::SfxXRangesItem( USHORT nWID, SvStream &rStream ) //------------------------------------------------------------------------- SfxXRangesItem::SfxXRangesItem( const SfxXRangesItem& rItem ) -: SfxPoolItem( rItem ) +: SfxPoolItem( rItem ) { NUMTYPE nCount = Count_Impl(rItem._pRanges) + 1; _pRanges = new NUMTYPE[nCount]; diff --git a/svl/source/items/sfontitm.cxx b/svl/source/items/sfontitm.cxx index e76b3854c6be..bc532319c6d2 100644 --- a/svl/source/items/sfontitm.cxx +++ b/svl/source/items/sfontitm.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/items/sitem.cxx b/svl/source/items/sitem.cxx index 4a9c0af096ea..1c4bb2e0e1bd 100644 --- a/svl/source/items/sitem.cxx +++ b/svl/source/items/sitem.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx index ec9757e278a8..eb1d22f1e00d 100644 --- a/svl/source/items/slstitm.cxx +++ b/svl/source/items/slstitm.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,12 +45,12 @@ TYPEINIT1_AUTOFACTORY(SfxStringListItem, SfxPoolItem); class SfxImpStringList { public: - USHORT nRefCount; - List aList; + USHORT nRefCount; + List aList; SfxImpStringList() { nRefCount = 1; } ~SfxImpStringList(); - void Sort( BOOL bAscending, List* ); + void Sort( BOOL bAscending, List* ); }; //------------------------------------------------------------------------ @@ -223,12 +223,12 @@ int SfxStringListItem::operator==( const SfxPoolItem& rItem ) const SfxItemPresentation SfxStringListItem::GetPresentation ( - SfxItemPresentation /*ePresentation*/, - SfxMapUnit /*eCoreMetric*/, - SfxMapUnit /*ePresentationMetric*/, - XubString& rText, + SfxItemPresentation /*ePresentation*/, + SfxMapUnit /*eCoreMetric*/, + SfxMapUnit /*ePresentationMetric*/, + XubString& rText, const IntlWrapper * -) const +) const { rText.AssignAscii(RTL_CONSTASCII_STRINGPARAM("(List)")); return SFX_ITEM_PRESENTATION_NONE; @@ -311,7 +311,7 @@ void SfxStringListItem::SetString( const XubString& rStr ) // String gehoert der Liste pImp->aList.Insert( pStr, LIST_APPEND ); - nStart += nLen + 1 ; // delimiter ueberspringen + nStart += nLen + 1 ; // delimiter ueberspringen } while( nDelimPos != STRING_NOTFOUND ); // Kein Leerstring am Ende diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx index cc033bc6905e..c2e89d06c8dc 100644 --- a/svl/source/items/srchitem.cxx +++ b/svl/source/items/srchitem.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -75,25 +75,25 @@ static Sequence< ::rtl::OUString > lcl_GetNotifyNames() // names of transliteration relevant properties static const char* aTranslitNames[] = { - "IsMatchCase", // 0 - "Japanese/IsMatchFullHalfWidthForms", // 1 - "Japanese/IsMatchHiraganaKatakana", // 2 - "Japanese/IsMatchContractions", // 3 - "Japanese/IsMatchMinusDashCho-on", // 4 - "Japanese/IsMatchRepeatCharMarks", // 5 - "Japanese/IsMatchVariantFormKanji", // 6 - "Japanese/IsMatchOldKanaForms", // 7 - "Japanese/IsMatch_DiZi_DuZu", // 8 - "Japanese/IsMatch_BaVa_HaFa", // 9 - "Japanese/IsMatch_TsiThiChi_DhiZi", // 10 - "Japanese/IsMatch_HyuIyu_ByuVyu", // 11 - "Japanese/IsMatch_SeShe_ZeJe", // 12 - "Japanese/IsMatch_IaIya", // 13 - "Japanese/IsMatch_KiKu", // 14 - "Japanese/IsIgnorePunctuation", // 15 - "Japanese/IsIgnoreWhitespace", // 16 - "Japanese/IsIgnoreProlongedSoundMark", // 17 - "Japanese/IsIgnoreMiddleDot" // 18 + "IsMatchCase", // 0 + "Japanese/IsMatchFullHalfWidthForms", // 1 + "Japanese/IsMatchHiraganaKatakana", // 2 + "Japanese/IsMatchContractions", // 3 + "Japanese/IsMatchMinusDashCho-on", // 4 + "Japanese/IsMatchRepeatCharMarks", // 5 + "Japanese/IsMatchVariantFormKanji", // 6 + "Japanese/IsMatchOldKanaForms", // 7 + "Japanese/IsMatch_DiZi_DuZu", // 8 + "Japanese/IsMatch_BaVa_HaFa", // 9 + "Japanese/IsMatch_TsiThiChi_DhiZi", // 10 + "Japanese/IsMatch_HyuIyu_ByuVyu", // 11 + "Japanese/IsMatch_SeShe_ZeJe", // 12 + "Japanese/IsMatch_IaIya", // 13 + "Japanese/IsMatch_KiKu", // 14 + "Japanese/IsIgnorePunctuation", // 15 + "Japanese/IsIgnoreWhitespace", // 16 + "Japanese/IsIgnoreProlongedSoundMark", // 17 + "Japanese/IsIgnoreMiddleDot" // 18 }; const int nCount = sizeof( aTranslitNames ) / sizeof( aTranslitNames[0] ); @@ -118,24 +118,24 @@ SvxSearchItem::SvxSearchItem( const sal_uInt16 nId ) : Locale(), 2, 2, 2, TransliterationModules_IGNORE_CASE ), - eFamily ( SFX_STYLE_FAMILY_PARA ), - nCommand ( 0 ), - nCellType ( SVX_SEARCHIN_FORMULA ), - nAppFlag ( SVX_SEARCHAPP_WRITER ), - bRowDirection ( sal_True ), - bAllTables ( sal_False ), - bNotes ( sal_False), - bBackward ( sal_False ), - bPattern ( sal_False ), - bContent ( sal_False ), - bAsianOptions ( FALSE ) + eFamily ( SFX_STYLE_FAMILY_PARA ), + nCommand ( 0 ), + nCellType ( SVX_SEARCHIN_FORMULA ), + nAppFlag ( SVX_SEARCHAPP_WRITER ), + bRowDirection ( sal_True ), + bAllTables ( sal_False ), + bNotes ( sal_False), + bBackward ( sal_False ), + bPattern ( sal_False ), + bContent ( sal_False ), + bAsianOptions ( FALSE ) { EnableNotification( lcl_GetNotifyNames() ); SvtSearchOptions aOpt; - bBackward = aOpt.IsBackwards(); - bAsianOptions = aOpt.IsUseAsianOptions(); + bBackward = aOpt.IsBackwards(); + bAsianOptions = aOpt.IsUseAsianOptions(); bNotes = aOpt.IsNotes(); if (aOpt.IsUseRegularExpression()) @@ -195,21 +195,21 @@ SvxSearchItem::SvxSearchItem( const sal_uInt16 nId ) : SvxSearchItem::SvxSearchItem( const SvxSearchItem& rItem ) : - SfxPoolItem ( rItem ), + SfxPoolItem ( rItem ), ConfigItem( ::rtl::OUString::createFromAscii( CFG_ROOT_NODE ) ), - aSearchOpt ( rItem.aSearchOpt ), - eFamily ( rItem.eFamily ), - nCommand ( rItem.nCommand ), - nCellType ( rItem.nCellType ), - nAppFlag ( rItem.nAppFlag ), - bRowDirection ( rItem.bRowDirection ), - bAllTables ( rItem.bAllTables ), - bNotes ( rItem.bNotes), - bBackward ( rItem.bBackward ), - bPattern ( rItem.bPattern ), - bContent ( rItem.bContent ), - bAsianOptions ( rItem.bAsianOptions ) + aSearchOpt ( rItem.aSearchOpt ), + eFamily ( rItem.eFamily ), + nCommand ( rItem.nCommand ), + nCellType ( rItem.nCellType ), + nAppFlag ( rItem.nAppFlag ), + bRowDirection ( rItem.bRowDirection ), + bAllTables ( rItem.bAllTables ), + bNotes ( rItem.bNotes), + bBackward ( rItem.bBackward ), + bPattern ( rItem.bPattern ), + bContent ( rItem.bContent ), + bAsianOptions ( rItem.bAsianOptions ) { EnableNotification( lcl_GetNotifyNames() ); } @@ -231,15 +231,15 @@ SfxPoolItem* SvxSearchItem::Clone( SfxItemPool *) const //! used below static BOOL operator == ( const SearchOptions& rItem1, const SearchOptions& rItem2 ) { - return rItem1.algorithmType == rItem2.algorithmType && - rItem1.searchFlag == rItem2.searchFlag && - rItem1.searchString == rItem2.searchString && - rItem1.replaceString == rItem2.replaceString && - //rItem1.Locale == rItem2.Locale && - rItem1.changedChars == rItem2.changedChars && - rItem1.deletedChars == rItem2.deletedChars && - rItem1.insertedChars == rItem2.insertedChars && - rItem1.transliterateFlags == rItem2.transliterateFlags; + return rItem1.algorithmType == rItem2.algorithmType && + rItem1.searchFlag == rItem2.searchFlag && + rItem1.searchString == rItem2.searchString && + rItem1.replaceString == rItem2.replaceString && + //rItem1.Locale == rItem2.Locale && + rItem1.changedChars == rItem2.changedChars && + rItem1.deletedChars == rItem2.deletedChars && + rItem1.insertedChars == rItem2.insertedChars && + rItem1.transliterateFlags == rItem2.transliterateFlags; } @@ -247,18 +247,18 @@ int SvxSearchItem::operator==( const SfxPoolItem& rItem ) const { DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal which or type" ); const SvxSearchItem &rSItem = (SvxSearchItem &) rItem; - return ( nCommand == rSItem.nCommand ) && - ( bBackward == rSItem.bBackward ) && - ( bPattern == rSItem.bPattern ) && - ( bContent == rSItem.bContent ) && - ( eFamily == rSItem.eFamily ) && - ( bRowDirection == rSItem.bRowDirection ) && - ( bAllTables == rSItem.bAllTables ) && - ( nCellType == rSItem.nCellType ) && - ( nAppFlag == rSItem.nAppFlag ) && - ( bAsianOptions == rSItem.bAsianOptions ) && - ( aSearchOpt == rSItem.aSearchOpt ) && - ( bNotes == rSItem.bNotes ); + return ( nCommand == rSItem.nCommand ) && + ( bBackward == rSItem.bBackward ) && + ( bPattern == rSItem.bPattern ) && + ( bContent == rSItem.bContent ) && + ( eFamily == rSItem.eFamily ) && + ( bRowDirection == rSItem.bRowDirection ) && + ( bAllTables == rSItem.bAllTables ) && + ( nCellType == rSItem.nCellType ) && + ( nAppFlag == rSItem.nAppFlag ) && + ( bAsianOptions == rSItem.bAsianOptions ) && + ( aSearchOpt == rSItem.aSearchOpt ) && + ( bNotes == rSItem.bNotes ); } @@ -267,11 +267,11 @@ int SvxSearchItem::operator==( const SfxPoolItem& rItem ) const SfxItemPresentation SvxSearchItem::GetPresentation ( SfxItemPresentation , - SfxMapUnit , - SfxMapUnit , - XubString& , + SfxMapUnit , + SfxMapUnit , + XubString& , const IntlWrapper * -) const +) const { return SFX_ITEM_PRESENTATION_NONE; } diff --git a/svl/source/items/stritem.cxx b/svl/source/items/stritem.cxx index 6568dc3a99f5..71b2eda031b7 100644 --- a/svl/source/items/stritem.cxx +++ b/svl/source/items/stritem.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index 60c622208d53..0501174c8363 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -53,8 +53,8 @@ #include <unotools/syslocale.hxx> #include <algorithm> -#define STYLESTREAM "SfxStyleSheets" -#define STYLESTREAM_VERSION USHORT(50) +#define STYLESTREAM "SfxStyleSheets" +#define STYLESTREAM_VERSION USHORT(50) #ifdef DBG_UTIL class DbgStyleSheetReferences @@ -86,19 +86,19 @@ TYPEINIT1(SfxStyleSheetPoolHint, SfxHint); SfxStyleSheetHintExtended::SfxStyleSheetHintExtended ( - USHORT nAction, // SFX_STYLESHEET_... (s.o.) + USHORT nAction, // SFX_STYLESHEET_... (s.o.) const String& rOldName ) -: SfxStyleSheetHint( nAction ), +: SfxStyleSheetHint( nAction ), aName( rOldName ) {} SfxStyleSheetHintExtended::SfxStyleSheetHintExtended ( - USHORT nAction, // SFX_STYLESHEET_... (s.o.) + USHORT nAction, // SFX_STYLESHEET_... (s.o.) const String& rOldName, - SfxStyleSheetBase& rStyleSheet // geh"ort weiterhin dem Aufrufer + SfxStyleSheetBase& rStyleSheet // geh"ort weiterhin dem Aufrufer ) -: SfxStyleSheetHint( nAction, rStyleSheet ), +: SfxStyleSheetHint( nAction, rStyleSheet ), aName( rOldName ) {} @@ -106,18 +106,18 @@ SfxStyleSheetHintExtended::SfxStyleSheetHintExtended SfxStyleSheetHint::SfxStyleSheetHint ( - USHORT nAction, // SFX_STYLESHEET_... (s.o.) - SfxStyleSheetBase& rStyleSheet // geh"ort weiterhin dem Aufrufer + USHORT nAction, // SFX_STYLESHEET_... (s.o.) + SfxStyleSheetBase& rStyleSheet // geh"ort weiterhin dem Aufrufer ) -: pStyleSh( &rStyleSheet ), +: pStyleSh( &rStyleSheet ), nHint( nAction ) {} SfxStyleSheetHint::SfxStyleSheetHint ( - USHORT nAction // SFX_STYLESHEET_... (s.o.) + USHORT nAction // SFX_STYLESHEET_... (s.o.) ) -: pStyleSh( NULL ), +: pStyleSh( NULL ), nHint( nAction ) {} @@ -961,7 +961,7 @@ BOOL SfxStyleSheetBasePool::Load( SvStream& rStream ) // damit eigene ItemSets untergeschoben werden koennen SfxItemSet& rSet = rSheet.GetItemSet(); rSet.ClearItem(); - //! SfxItemSet aTmpSet( *pTmpPool ); + //! SfxItemSet aTmpSet( *pTmpPool ); /*!aTmpSet*/ rSet.Load( rStream ); //! rSet.Put( aTmpSet ); } @@ -974,7 +974,7 @@ BOOL SfxStyleSheetBasePool::Load( SvStream& rStream ) rStream.Seek( nPos ); } - // #72939# only loop through the styles that were really inserted + // #72939# only loop through the styles that were really inserted ULONG n = aStyles.size(); //! delete pTmpPool; @@ -1061,7 +1061,7 @@ BOOL SfxStyleSheetBasePool::Load1_Impl( SvStream& rStream ) // damit eigene ItemSets untergeschoben werden koennen SfxItemSet& rSet = rSheet.GetItemSet(); rSet.ClearItem(); -//! SfxItemSet aTmpSet( *pTmpPool ); +//! SfxItemSet aTmpSet( *pTmpPool ); /*!aTmpSet*/ rSet.Load( rStream ); //! rSet.Put( aTmpSet ); } diff --git a/svl/source/items/stylepool.cxx b/svl/source/items/stylepool.cxx index 8a9f16052a8a..fde27a785c6e 100644 --- a/svl/source/items/stylepool.cxx +++ b/svl/source/items/stylepool.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/items/szitem.cxx b/svl/source/items/szitem.cxx index 6c5ab66b8422..775b60484140 100644 --- a/svl/source/items/szitem.cxx +++ b/svl/source/items/szitem.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -83,12 +83,12 @@ SfxSizeItem::SfxSizeItem( const SfxSizeItem& rItem ) : SfxItemPresentation SfxSizeItem::GetPresentation ( - SfxItemPresentation /*ePresentation*/, - SfxMapUnit /*eCoreMetric*/, - SfxMapUnit /*ePresentationMetric*/, - XubString& rText, + SfxItemPresentation /*ePresentation*/, + SfxMapUnit /*eCoreMetric*/, + SfxMapUnit /*ePresentationMetric*/, + XubString& rText, const IntlWrapper * -) const +) const { DBG_CHKTHIS(SfxSizeItem, 0); rText = UniString::CreateFromInt32(aVal.Width()); diff --git a/svl/source/items/visitem.cxx b/svl/source/items/visitem.cxx index 94fdf167496e..1ff01a3ed20d 100644 --- a/svl/source/items/visitem.cxx +++ b/svl/source/items/visitem.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/items/whassert.hxx b/svl/source/items/whassert.hxx index 9933294b4d86..ae59b9c5781f 100644 --- a/svl/source/items/whassert.hxx +++ b/svl/source/items/whassert.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,18 +33,18 @@ //------------------------------------------------------------------------ #ifdef DBG_UTIL -#define SFX_ASSERT( bCondition, nId, sMessage ) \ -{ \ - if ( DbgIsAssert() ) \ - { \ - if ( !(bCondition) ) \ - { \ - ByteString aMsg( sMessage ); \ +#define SFX_ASSERT( bCondition, nId, sMessage ) \ +{ \ + if ( DbgIsAssert() ) \ + { \ + if ( !(bCondition) ) \ + { \ + ByteString aMsg( sMessage ); \ aMsg.Append(RTL_CONSTASCII_STRINGPARAM("\nwith Id/Pos: ")); \ - aMsg += ByteString::CreateFromInt32( nId ); \ - DbgOut( aMsg.GetBuffer(), DBG_OUT_ERROR, __FILE__, __LINE__); \ - } \ - } \ + aMsg += ByteString::CreateFromInt32( nId ); \ + DbgOut( aMsg.GetBuffer(), DBG_OUT_ERROR, __FILE__, __LINE__); \ + } \ + } \ } #else #define SFX_ASSERT( bCondition, nId, sMessage ) diff --git a/svl/source/items/whiter.cxx b/svl/source/items/whiter.cxx index ec0e10d8e3d7..fc4d3c8aade3 100644 --- a/svl/source/items/whiter.cxx +++ b/svl/source/items/whiter.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/memtools/svarray.cxx b/svl/source/memtools/svarray.cxx index b2184442ea0e..cfc7f8be118c 100644 --- a/svl/source/memtools/svarray.cxx +++ b/svl/source/memtools/svarray.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -64,13 +64,13 @@ SV_IMPL_VARARR(SvPtrarr,VoidPtr) SV_IMPL_VARARR_PLAIN(SvPtrarrPlain,VoidPtr) USHORT SvPtrarr::GetPos( const VoidPtr& aElement ) const -{ USHORT n; +{ USHORT n; for( n=0; n < nA && *(GetData()+n) != aElement; ) n++; return ( n >= nA ? USHRT_MAX : n ); } USHORT SvPtrarrPlain::GetPos( const VoidPtr aElement ) const -{ USHORT n; +{ USHORT n; for( n=0; n < nA && *(GetData()+n) != aElement; ) n++; return ( n >= nA ? USHRT_MAX : n ); } diff --git a/svl/source/misc/PasswordHelper.cxx b/svl/source/misc/PasswordHelper.cxx index 05e9e8a65897..fb53b104990c 100644 --- a/svl/source/misc/PasswordHelper.cxx +++ b/svl/source/misc/PasswordHelper.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/misc/adrparse.cxx b/svl/source/misc/adrparse.cxx index fc230856ef7d..6bf4e793e840 100644 --- a/svl/source/misc/adrparse.cxx +++ b/svl/source/misc/adrparse.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/misc/documentlockfile.cxx b/svl/source/misc/documentlockfile.cxx index 0e04a3fd7ae0..d1f3e9158b4e 100644 --- a/svl/source/misc/documentlockfile.cxx +++ b/svl/source/misc/documentlockfile.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/misc/filenotation.cxx b/svl/source/misc/filenotation.cxx index abec6bb310fc..9c8901844c56 100644 --- a/svl/source/misc/filenotation.cxx +++ b/svl/source/misc/filenotation.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -139,6 +139,6 @@ namespace svt } //......................................................................... -} // namespace svt +} // namespace svt //......................................................................... diff --git a/svl/source/misc/folderrestriction.cxx b/svl/source/misc/folderrestriction.cxx index ae50ed3cd55a..fedafbaff26a 100644 --- a/svl/source/misc/folderrestriction.cxx +++ b/svl/source/misc/folderrestriction.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/misc/fstathelper.cxx b/svl/source/misc/fstathelper.cxx index 329912f9d997..117624d53e64 100644 --- a/svl/source/misc/fstathelper.cxx +++ b/svl/source/misc/fstathelper.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx index 28986aca1194..6377a724fd0f 100644 --- a/svl/source/misc/inethist.cxx +++ b/svl/source/misc/inethist.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx index 0b9efdf22afd..466ce754dbc5 100644 --- a/svl/source/misc/inettype.cxx +++ b/svl/source/misc/inettype.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,7 +50,7 @@ namespace unnamed_svl_inettype { struct MediaTypeEntry { sal_Char const * m_pTypeName; - INetContentType m_eTypeID; + INetContentType m_eTypeID; sal_Char const * m_pExtension; }; @@ -75,7 +75,7 @@ struct TypeNameMapEntry: public UniString //============================================================================ struct ExtensionMapEntry: public UniString { - INetContentType m_eTypeID; + INetContentType m_eTypeID; ExtensionMapEntry(const UniString & rExt): UniString(rExt), m_eTypeID(CONTENT_TYPE_UNKNOWN) {} @@ -338,7 +338,7 @@ MediaTypeEntry const aStaticTypeNameMap[CONTENT_TYPE_LAST + 1] /** A mapping from type IDs to presentation resource IDs. Sorted by type ID. */ USHORT const aStaticResourceIDMap[CONTENT_TYPE_LAST + 1] - = { STR_SVT_MIMETYPE_APP_OCTSTREAM, // CONTENT_TYPE_UNKNOWN + = { STR_SVT_MIMETYPE_APP_OCTSTREAM, // CONTENT_TYPE_UNKNOWN STR_SVT_MIMETYPE_APP_OCTSTREAM, // CONTENT_TYPE_APP_OCTSTREAM STR_SVT_MIMETYPE_APP_PDF, // CONTENT_TYPE_APP_PDF STR_SVT_MIMETYPE_APP_RTF, // CONTENT_TYPE_APP_RTF diff --git a/svl/source/misc/lngmisc.cxx b/svl/source/misc/lngmisc.cxx index 2203cc08458e..6f482277fdc3 100644 --- a/svl/source/misc/lngmisc.cxx +++ b/svl/source/misc/lngmisc.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -76,7 +76,7 @@ BOOL RemoveControlChars( OUString &rTxt ) INT32 nCtrlChars = GetNumControlChars( rTxt ); if (nCtrlChars) { - INT32 nLen = rTxt.getLength(); + INT32 nLen = rTxt.getLength(); INT32 nSize = nLen - nCtrlChars; OUStringBuffer aBuf( nSize ); aBuf.setLength( nSize ); diff --git a/svl/source/misc/lockfilecommon.cxx b/svl/source/misc/lockfilecommon.cxx index aed62ce30737..10d03799db2b 100644 --- a/svl/source/misc/lockfilecommon.cxx +++ b/svl/source/misc/lockfilecommon.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/misc/mediatyp.src b/svl/source/misc/mediatyp.src index 333963c1d2d9..0bd3381a1581 100644 --- a/svl/source/misc/mediatyp.src +++ b/svl/source/misc/mediatyp.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/misc/ownlist.cxx b/svl/source/misc/ownlist.cxx index 9fd767c2253f..04d382b17d44 100644 --- a/svl/source/misc/ownlist.cxx +++ b/svl/source/misc/ownlist.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -78,17 +78,17 @@ static void eatSpace(const String & rCmd, USHORT * pIndex) //========================================================================= BOOL SvCommandList::AppendCommands ( - const String & rCmd, /* Dieser Text wird in Kommandos umgesetzt */ - USHORT * pEaten /* Anzahl der Zeichen, die gelesen wurden */ + const String & rCmd, /* Dieser Text wird in Kommandos umgesetzt */ + USHORT * pEaten /* Anzahl der Zeichen, die gelesen wurden */ ) -/* [Beschreibung] +/* [Beschreibung] Es wird eine Text geparsed und die einzelnen Kommandos werden an die Liste angeh"angt. [R"uckgabewert] - BOOL TRUE, der Text wurde korrekt geparsed. + BOOL TRUE, der Text wurde korrekt geparsed. FALSE, der Text wurde nicht korrekt geparsed. */ { @@ -115,78 +115,78 @@ BOOL SvCommandList::AppendCommands *pEaten = index; -// USHORT nPos = 0; -// while( nPos < rCmd.Len() ) -// { -// // ein Zeichen ? Dann faengt hier eine Option an -// if( isalpha( rCmd[nPos] ) ) -// { -// String aValue; -// USHORT nStt = nPos; -// register char c; - -// while( nPos < rCmd.Len() && -// ( isalnum(c=rCmd[nPos]) || '-'==c || '.'==c ) ) -// nPos++; - -// String aToken( rCmd.Copy( nStt, nPos-nStt ) ); - -// while( nPos < rCmd.Len() && -// ( !String::IsPrintable( (c=rCmd[nPos]), -// RTL_TEXTENCODING_MS_1252 ) || isspace(c) ) ) -// nPos++; - -// // hat die Option auch einen Wert? -// if( nPos!=rCmd.Len() && '='==c ) -// { -// nPos++; - -// while( nPos < rCmd.Len() && -// ( !String::IsPrintable( (c=rCmd[nPos]), -// RTL_TEXTENCODING_MS_1252 ) || isspace(c) ) ) -// nPos++; - -// if( nPos != rCmd.Len() ) -// { -// USHORT nLen = 0; -// nStt = nPos; -// if( '"' == c ) -// { -// nPos++; nStt++; -// while( nPos < rCmd.Len() && -// '"' != rCmd[nPos] ) -// nPos++, nLen++; -// if( nPos!=rCmd.Len() ) -// nPos++; -// } -// else -// // hier sind wir etwas laxer als der -// // Standard und erlauben alles druckbare -// while( nPos < rCmd.Len() && -// String::IsPrintable( (c=rCmd[nPos]), -// RTL_TEXTENCODING_MS_1252 ) && -// !isspace( c ) ) -// nPos++, nLen++; - -// if( nLen ) -// aValue = rCmd( nStt, nLen ); -// } -// } - -// SvCommand * pCmd = new SvCommand( aToken, aValue ); -// aTypes.Insert( pCmd, LIST_APPEND ); -// } -// else -// // white space un unerwartete Zeichen ignorieren wie -// nPos++; -// } -// *pEaten = nPos; +// USHORT nPos = 0; +// while( nPos < rCmd.Len() ) +// { +// // ein Zeichen ? Dann faengt hier eine Option an +// if( isalpha( rCmd[nPos] ) ) +// { +// String aValue; +// USHORT nStt = nPos; +// register char c; + +// while( nPos < rCmd.Len() && +// ( isalnum(c=rCmd[nPos]) || '-'==c || '.'==c ) ) +// nPos++; + +// String aToken( rCmd.Copy( nStt, nPos-nStt ) ); + +// while( nPos < rCmd.Len() && +// ( !String::IsPrintable( (c=rCmd[nPos]), +// RTL_TEXTENCODING_MS_1252 ) || isspace(c) ) ) +// nPos++; + +// // hat die Option auch einen Wert? +// if( nPos!=rCmd.Len() && '='==c ) +// { +// nPos++; + +// while( nPos < rCmd.Len() && +// ( !String::IsPrintable( (c=rCmd[nPos]), +// RTL_TEXTENCODING_MS_1252 ) || isspace(c) ) ) +// nPos++; + +// if( nPos != rCmd.Len() ) +// { +// USHORT nLen = 0; +// nStt = nPos; +// if( '"' == c ) +// { +// nPos++; nStt++; +// while( nPos < rCmd.Len() && +// '"' != rCmd[nPos] ) +// nPos++, nLen++; +// if( nPos!=rCmd.Len() ) +// nPos++; +// } +// else +// // hier sind wir etwas laxer als der +// // Standard und erlauben alles druckbare +// while( nPos < rCmd.Len() && +// String::IsPrintable( (c=rCmd[nPos]), +// RTL_TEXTENCODING_MS_1252 ) && +// !isspace( c ) ) +// nPos++, nLen++; + +// if( nLen ) +// aValue = rCmd( nStt, nLen ); +// } +// } + +// SvCommand * pCmd = new SvCommand( aToken, aValue ); +// aTypes.Insert( pCmd, LIST_APPEND ); +// } +// else +// // white space un unerwartete Zeichen ignorieren wie +// nPos++; +// } +// *pEaten = nPos; return TRUE; } //========================================================================= String SvCommandList::GetCommands() const -/* [Beschreibung] +/* [Beschreibung] Die Kommandos in der Liste werden als Text hintereinander, durch ein Leerzeichen getrennt geschrieben. Der Text muss nicht genauso @@ -194,7 +194,7 @@ String SvCommandList::GetCommands() const [R"uckgabewert] - String Die Kommandos werden zur"uckgegeben. + String Die Kommandos werden zur"uckgegeben. */ { String aRet; @@ -217,17 +217,17 @@ String SvCommandList::GetCommands() const //========================================================================= SvCommand & SvCommandList::Append ( - const String & rCommand, /* das Kommando */ - const String & rArg /* dasArgument des Kommandos */ + const String & rCommand, /* das Kommando */ + const String & rArg /* dasArgument des Kommandos */ ) -/* [Beschreibung] +/* [Beschreibung] Es wird eine Objekt vom Typ SvCommand erzeugt und an die Liste angeh"angt. [R"uckgabewert] - SvCommand & Das erteugte Objekt wird zur"uckgegeben. + SvCommand & Das erteugte Objekt wird zur"uckgegeben. */ { SvCommand * pCmd = new SvCommand( rCommand, rArg ); @@ -238,10 +238,10 @@ SvCommand & SvCommandList::Append //========================================================================= SvStream & operator >> ( - SvStream & rStm, /* Stream aus dem gelesen wird */ - SvCommandList & rThis /* Die zu f"ullende Liste */ + SvStream & rStm, /* Stream aus dem gelesen wird */ + SvCommandList & rThis /* Die zu f"ullende Liste */ ) -/* [Beschreibung] +/* [Beschreibung] Die Liste mit ihren Elementen wird gelesen. Das Format ist: 1. Anzahl der Elemente @@ -249,7 +249,7 @@ SvStream & operator >> [R"uckgabewert] - SvStream & Der "ubergebene Stream. + SvStream & Der "ubergebene Stream. */ { UINT32 nCount = 0; @@ -269,10 +269,10 @@ SvStream & operator >> //========================================================================= SvStream & operator << ( - SvStream & rStm, /* Stream in den geschrieben wird */ - const SvCommandList & rThis /* Die zu schreibende Liste */ + SvStream & rStm, /* Stream in den geschrieben wird */ + const SvCommandList & rThis /* Die zu schreibende Liste */ ) -/* [Beschreibung] +/* [Beschreibung] Die Liste mit ihren Elementen wir geschrieben. Das Format ist: 1. Anzahl der Elemente @@ -280,7 +280,7 @@ SvStream & operator << [R"uckgabewert] - SvStream & Der "ubergebene Stream. + SvStream & Der "ubergebene Stream. */ { UINT32 nCount = rThis.aTypes.Count(); diff --git a/svl/source/misc/restrictedpaths.cxx b/svl/source/misc/restrictedpaths.cxx index 8c6f136f3eee..ac215a140bb8 100644 --- a/svl/source/misc/restrictedpaths.cxx +++ b/svl/source/misc/restrictedpaths.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -125,7 +125,7 @@ namespace svt xub_StrLen nLenApproved = sApprovedURL.Len(); xub_StrLen nLenChecked = m_sCheckURL.Len(); - + if ( nLenApproved > nLenChecked ) { if ( m_bAllowParent ) diff --git a/svl/source/misc/sharecontrolfile.cxx b/svl/source/misc/sharecontrolfile.cxx index b7b4f24141dd..0be0a9c3270d 100644 --- a/svl/source/misc/sharecontrolfile.cxx +++ b/svl/source/misc/sharecontrolfile.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx index 9811618eb571..97f4869a569f 100644 --- a/svl/source/misc/strmadpt.cxx +++ b/svl/source/misc/strmadpt.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -279,7 +279,7 @@ uno::Any SAL_CALL SvLockBytesInputStream::queryInterface(uno::Type const & //============================================================================ // virtual -void SAL_CALL SvLockBytesInputStream::acquire() throw () +void SAL_CALL SvLockBytesInputStream::acquire() throw () { OWeakObject::acquire(); } @@ -804,10 +804,10 @@ USHORT SvOutputStream::IsA() const bool SvDataPipe_Impl::remove(Page * pPage) { if ( - pPage != m_pFirstPage || + pPage != m_pFirstPage || m_pReadPage == m_pFirstPage || ( - !m_aMarks.empty() && + !m_aMarks.empty() && *m_aMarks.begin() < m_pFirstPage->m_nOffset + m_nPageSize ) ) diff --git a/svl/source/misc/svldata.cxx b/svl/source/misc/svldata.cxx index 35c9fca3aef2..25ac6c6520f3 100644 --- a/svl/source/misc/svldata.cxx +++ b/svl/source/misc/svldata.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx index 46063564193d..e9fe98bcff3b 100644 --- a/svl/source/misc/urihelper.cxx +++ b/svl/source/misc/urihelper.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/notify/brdcst.cxx b/svl/source/notify/brdcst.cxx index 29983ecedc17..da762d60aea4 100644 --- a/svl/source/notify/brdcst.cxx +++ b/svl/source/notify/brdcst.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/notify/broadcast.cxx b/svl/source/notify/broadcast.cxx index 0179ceaebc34..5a4dc46d5451 100644 --- a/svl/source/notify/broadcast.cxx +++ b/svl/source/notify/broadcast.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -78,7 +78,7 @@ SvtBroadcaster::~SvtBroadcaster() if( pLast ) do { pLast->EndListening( *this ); - if( !HasListeners() ) // all gone ?? + if( !HasListeners() ) // all gone ?? break; } while( 0 != ( pLast = aIter.GoNext() )); } @@ -92,20 +92,20 @@ void SvtBroadcaster::Broadcast( const SfxHint &rHint ) // is anybody to notify? if( HasListeners() /* && !IsModifyLocked()*/ ) { -// LockModify(); -// bInModify = TRUE; +// LockModify(); +// bInModify = TRUE; SvtListenerIter aIter( *this ); SvtListener* pLast = aIter.GoStart(); if( pLast ) do { pLast->Notify( *this, rHint ); - if( !HasListeners() ) // all gone ?? + if( !HasListeners() ) // all gone ?? break; } while( 0 != ( pLast = aIter.GoNext() )); -// bInModify = FALSE; -// UnlockModify(); +// bInModify = FALSE; +// UnlockModify(); } } @@ -127,20 +127,20 @@ void SvtBroadcaster::Forward( SvtBroadcaster& rBC, const SfxHint& rHint ) // is anybody to notify? if( rBC.HasListeners() /* && !IsModifyLocked()*/ ) { -// LockModify(); -// bInModify = TRUE; +// LockModify(); +// bInModify = TRUE; SvtListenerIter aIter( rBC ); SvtListener* pLast = aIter.GoStart(); if( pLast ) do { pLast->Notify( rBC, rHint ); - if( !rBC.HasListeners() ) // all gone ?? + if( !rBC.HasListeners() ) // all gone ?? break; } while( 0 != ( pLast = aIter.GoNext() )); -// bInModify = FALSE; -// UnlockModify(); +// bInModify = FALSE; +// UnlockModify(); } } diff --git a/svl/source/notify/cancel.cxx b/svl/source/notify/cancel.cxx index ffa5c87a26be..358707f04643 100644 --- a/svl/source/notify/cancel.cxx +++ b/svl/source/notify/cancel.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ namespace { struct lclMutex : public rtl::Static< ::vos::OMutex, lclMutex >{}; } //========================================================================= SfxCancelManager::SfxCancelManager( SfxCancelManager *pParent ) -: _pParent( pParent ) +: _pParent( pParent ) { } @@ -59,7 +59,7 @@ SfxCancelManager::~SfxCancelManager() BOOL SfxCancelManager::CanCancel() const -/* [Beschreibung] +/* [Beschreibung] Liefert TRUE wenn an diesem CancelManager oder an einem Parent ein Job l"auft. @@ -74,7 +74,7 @@ BOOL SfxCancelManager::CanCancel() const void SfxCancelManager::Cancel( BOOL bDeep ) -/* [Beschreibung] +/* [Beschreibung] Diese Methode markiert alle angemeldeten <SfxCancellable>-Instanzen als suspendiert. @@ -94,7 +94,7 @@ void SfxCancelManager::Cancel( BOOL bDeep ) void SfxCancelManager::InsertCancellable( SfxCancellable *pJob ) -/* [Beschreibung] +/* [Beschreibung] Diese interne Methode tr"agt 'pJob' in die Liste der unterbrechbaren Jobs ein und Broadcastet dies. Jeder <SfxCancellable> darf nur @@ -122,7 +122,7 @@ void SfxCancelManager::InsertCancellable( SfxCancellable *pJob ) void SfxCancelManager::RemoveCancellable( SfxCancellable *pJob ) -/* [Beschreibung] +/* [Beschreibung] Diese interne Methode tr"agt 'pJob' aus die Liste der unterbrechbaren Jobs aus und Broadcastet dies. Dieser Aufruf mu\s paarig nach einem @@ -156,7 +156,7 @@ SfxCancellable::~SfxCancellable() void SfxCancellable::Cancel() -/* [Description] +/* [Description] This virtual function is called when the user hits the cancel-button. If you overload it, you can stop your activities. Please always call diff --git a/svl/source/notify/hint.cxx b/svl/source/notify/hint.cxx index fd596d7663d8..e36f44620d39 100644 --- a/svl/source/notify/hint.cxx +++ b/svl/source/notify/hint.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/notify/isethint.cxx b/svl/source/notify/isethint.cxx index 23ae3f19b154..1fa38a989de4 100644 --- a/svl/source/notify/isethint.cxx +++ b/svl/source/notify/isethint.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,13 +42,13 @@ TYPEINIT1(SfxItemSetHint, SfxHint); SfxItemSetHint::SfxItemSetHint( SfxItemSet *pItemSet ) -/* [Beschreibung] +/* [Beschreibung] Dieser Ctor "ubernimmt das als Parameter "ubergeben <SfxItemSet>, das im Dtor gel"oscht wird. */ -: _pItemSet( pItemSet ) +: _pItemSet( pItemSet ) { } @@ -56,12 +56,12 @@ SfxItemSetHint::SfxItemSetHint( SfxItemSet *pItemSet ) SfxItemSetHint::SfxItemSetHint( const SfxItemSet &rItemSet ) -/* [Beschreibung] +/* [Beschreibung] Dieser Ctor kopiert das als Parameter "ubergeben <SfxItemSet>. */ -: _pItemSet( rItemSet.Clone() ) +: _pItemSet( rItemSet.Clone() ) { } diff --git a/svl/source/notify/listener.cxx b/svl/source/notify/listener.cxx index 0269894bff81..a0107cf43f60 100644 --- a/svl/source/notify/listener.cxx +++ b/svl/source/notify/listener.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/notify/listenerbase.cxx b/svl/source/notify/listenerbase.cxx index ec899ee9d70b..f470b0083893 100644 --- a/svl/source/notify/listenerbase.cxx +++ b/svl/source/notify/listenerbase.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/notify/listenerbase.hxx b/svl/source/notify/listenerbase.hxx index 677cffe9b4bd..83b2dbbc7137 100644 --- a/svl/source/notify/listenerbase.hxx +++ b/svl/source/notify/listenerbase.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,14 +42,14 @@ public: SvtListenerBase( SvtListener& rLst, SvtBroadcaster& rBroadcaster ); ~SvtListenerBase(); - SvtListenerBase* GetNext() const { return pNext; } - void SetNext( SvtListenerBase* p ) { pNext = p; } + SvtListenerBase* GetNext() const { return pNext; } + void SetNext( SvtListenerBase* p ) { pNext = p; } - SvtBroadcaster* GetBroadcaster() const { return pBroadcaster; } - SvtListener* GetListener() const { return pListener; } + SvtBroadcaster* GetBroadcaster() const { return pBroadcaster; } + SvtListener* GetListener() const { return pListener; } - SvtListenerBase* GetLeft() const { return pLeft; } - SvtListenerBase* GetRight() const { return pRight; } + SvtListenerBase* GetLeft() const { return pLeft; } + SvtListenerBase* GetRight() const { return pRight; } }; diff --git a/svl/source/notify/listeneriter.cxx b/svl/source/notify/listeneriter.cxx index 5dda8d0433b4..a0c29f812bcf 100644 --- a/svl/source/notify/listeneriter.cxx +++ b/svl/source/notify/listeneriter.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -113,7 +113,7 @@ SvtListener* SvtListenerIter::GoPrev() } -SvtListener* SvtListenerIter::GoStart() // zum Anfang des Baums +SvtListener* SvtListenerIter::GoStart() // zum Anfang des Baums { pAkt = rRoot.pRoot; if( pAkt ) @@ -124,7 +124,7 @@ SvtListener* SvtListenerIter::GoStart() // zum Anfang des Baums } -SvtListener* SvtListenerIter::GoEnd() // zum End des Baums +SvtListener* SvtListenerIter::GoEnd() // zum End des Baums { pAkt = pDelNext; if( !pAkt ) @@ -179,13 +179,13 @@ SvtListener* SvtListenerIter::Next() } -SvtListener* SvtListenerIter::GoRoot() // wieder ab Root anfangen +SvtListener* SvtListenerIter::GoRoot() // wieder ab Root anfangen { pDelNext = pAkt = rRoot.pRoot; return pAkt ? pAkt->GetListener() : 0; } -SvtListener* SvtListenerIter::GetCurr() const // returns the current +SvtListener* SvtListenerIter::GetCurr() const // returns the current { return pDelNext ? pDelNext->GetListener() : 0; } diff --git a/svl/source/notify/lstner.cxx b/svl/source/notify/lstner.cxx index 3f003e6dde8f..c8316759314a 100644 --- a/svl/source/notify/lstner.cxx +++ b/svl/source/notify/lstner.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/notify/smplhint.cxx b/svl/source/notify/smplhint.cxx index 98eecb91cfe2..9eb0461a0dab 100644 --- a/svl/source/notify/smplhint.cxx +++ b/svl/source/notify/smplhint.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/numbers/nbdll.cxx b/svl/source/numbers/nbdll.cxx index b93eda3e7f37..0a443b9d1d4d 100644 --- a/svl/source/numbers/nbdll.cxx +++ b/svl/source/numbers/nbdll.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx index f40b367ae2af..ffc735a3df72 100644 --- a/svl/source/numbers/numfmuno.cxx +++ b/svl/source/numbers/numfmuno.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,52 +49,52 @@ using namespace com::sun::star; //------------------------------------------------------------------------ -#define SERVICENAME_NUMBERFORMATTER "com.sun.star.util.NumberFormatter" -#define SERVICENAME_NUMBERSETTINGS "com.sun.star.util.NumberFormatSettings" -#define SERVICENAME_NUMBERFORMATS "com.sun.star.util.NumberFormats" -#define SERVICENAME_NUMBERFORMAT "com.sun.star.util.NumberFormatProperties" +#define SERVICENAME_NUMBERFORMATTER "com.sun.star.util.NumberFormatter" +#define SERVICENAME_NUMBERSETTINGS "com.sun.star.util.NumberFormatSettings" +#define SERVICENAME_NUMBERFORMATS "com.sun.star.util.NumberFormats" +#define SERVICENAME_NUMBERFORMAT "com.sun.star.util.NumberFormatProperties" //------------------------------------------------------------------------ -#define PROPERTYNAME_FMTSTR "FormatString" -#define PROPERTYNAME_LOCALE "Locale" -#define PROPERTYNAME_TYPE "Type" -#define PROPERTYNAME_COMMENT "Comment" -#define PROPERTYNAME_CURREXT "CurrencyExtension" -#define PROPERTYNAME_CURRSYM "CurrencySymbol" -#define PROPERTYNAME_CURRABB "CurrencyAbbreviation" -#define PROPERTYNAME_DECIMALS "Decimals" -#define PROPERTYNAME_LEADING "LeadingZeros" -#define PROPERTYNAME_NEGRED "NegativeRed" -#define PROPERTYNAME_STDFORM "StandardFormat" -#define PROPERTYNAME_THOUS "ThousandsSeparator" -#define PROPERTYNAME_USERDEF "UserDefined" - -#define PROPERTYNAME_NOZERO "NoZero" -#define PROPERTYNAME_NULLDATE "NullDate" -#define PROPERTYNAME_STDDEC "StandardDecimals" -#define PROPERTYNAME_TWODIGIT "TwoDigitDateStart" +#define PROPERTYNAME_FMTSTR "FormatString" +#define PROPERTYNAME_LOCALE "Locale" +#define PROPERTYNAME_TYPE "Type" +#define PROPERTYNAME_COMMENT "Comment" +#define PROPERTYNAME_CURREXT "CurrencyExtension" +#define PROPERTYNAME_CURRSYM "CurrencySymbol" +#define PROPERTYNAME_CURRABB "CurrencyAbbreviation" +#define PROPERTYNAME_DECIMALS "Decimals" +#define PROPERTYNAME_LEADING "LeadingZeros" +#define PROPERTYNAME_NEGRED "NegativeRed" +#define PROPERTYNAME_STDFORM "StandardFormat" +#define PROPERTYNAME_THOUS "ThousandsSeparator" +#define PROPERTYNAME_USERDEF "UserDefined" + +#define PROPERTYNAME_NOZERO "NoZero" +#define PROPERTYNAME_NULLDATE "NullDate" +#define PROPERTYNAME_STDDEC "StandardDecimals" +#define PROPERTYNAME_TWODIGIT "TwoDigitDateStart" //------------------------------------------------------------------------ -// alles ohne Which-ID, Map nur fuer PropertySetInfo +// alles ohne Which-ID, Map nur fuer PropertySetInfo const SfxItemPropertyMapEntry* lcl_GetNumberFormatPropertyMap() { static SfxItemPropertyMapEntry aNumberFormatPropertyMap_Impl[] = { - {MAP_CHAR_LEN(PROPERTYNAME_FMTSTR), 0, &getCppuType((rtl::OUString*)0),beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, - {MAP_CHAR_LEN(PROPERTYNAME_LOCALE), 0, &getCppuType((lang::Locale*)0),beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, - {MAP_CHAR_LEN(PROPERTYNAME_TYPE), 0, &getCppuType((sal_Int16*)0), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, + {MAP_CHAR_LEN(PROPERTYNAME_FMTSTR), 0, &getCppuType((rtl::OUString*)0),beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, + {MAP_CHAR_LEN(PROPERTYNAME_LOCALE), 0, &getCppuType((lang::Locale*)0),beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, + {MAP_CHAR_LEN(PROPERTYNAME_TYPE), 0, &getCppuType((sal_Int16*)0), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, {MAP_CHAR_LEN(PROPERTYNAME_COMMENT), 0, &getCppuType((rtl::OUString*)0),beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, {MAP_CHAR_LEN(PROPERTYNAME_CURREXT), 0, &getCppuType((rtl::OUString*)0),beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, {MAP_CHAR_LEN(PROPERTYNAME_CURRSYM), 0, &getCppuType((rtl::OUString*)0),beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, - {MAP_CHAR_LEN(PROPERTYNAME_DECIMALS), 0, &getCppuType((sal_Int16*)0), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, - {MAP_CHAR_LEN(PROPERTYNAME_LEADING), 0, &getCppuType((sal_Int16*)0), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, - {MAP_CHAR_LEN(PROPERTYNAME_NEGRED), 0, &getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, - {MAP_CHAR_LEN(PROPERTYNAME_STDFORM), 0, &getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, - {MAP_CHAR_LEN(PROPERTYNAME_THOUS), 0, &getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, - {MAP_CHAR_LEN(PROPERTYNAME_USERDEF), 0, &getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, + {MAP_CHAR_LEN(PROPERTYNAME_DECIMALS), 0, &getCppuType((sal_Int16*)0), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, + {MAP_CHAR_LEN(PROPERTYNAME_LEADING), 0, &getCppuType((sal_Int16*)0), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, + {MAP_CHAR_LEN(PROPERTYNAME_NEGRED), 0, &getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, + {MAP_CHAR_LEN(PROPERTYNAME_STDFORM), 0, &getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, + {MAP_CHAR_LEN(PROPERTYNAME_THOUS), 0, &getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, + {MAP_CHAR_LEN(PROPERTYNAME_USERDEF), 0, &getBooleanCppuType(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, {MAP_CHAR_LEN(PROPERTYNAME_CURRABB), 0, &getCppuType((rtl::OUString*)0),beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY, 0}, {0,0,0,0,0,0} }; @@ -105,10 +105,10 @@ const SfxItemPropertyMapEntry* lcl_GetNumberSettingsPropertyMap() { static SfxItemPropertyMapEntry aNumberSettingsPropertyMap_Impl[] = { - {MAP_CHAR_LEN(PROPERTYNAME_NOZERO), 0, &getBooleanCppuType(), beans::PropertyAttribute::BOUND, 0}, - {MAP_CHAR_LEN(PROPERTYNAME_NULLDATE), 0, &getCppuType((util::Date*)0), beans::PropertyAttribute::BOUND, 0}, - {MAP_CHAR_LEN(PROPERTYNAME_STDDEC), 0, &getCppuType((sal_Int16*)0), beans::PropertyAttribute::BOUND, 0}, - {MAP_CHAR_LEN(PROPERTYNAME_TWODIGIT), 0, &getCppuType((sal_Int16*)0), beans::PropertyAttribute::BOUND, 0}, + {MAP_CHAR_LEN(PROPERTYNAME_NOZERO), 0, &getBooleanCppuType(), beans::PropertyAttribute::BOUND, 0}, + {MAP_CHAR_LEN(PROPERTYNAME_NULLDATE), 0, &getCppuType((util::Date*)0), beans::PropertyAttribute::BOUND, 0}, + {MAP_CHAR_LEN(PROPERTYNAME_STDDEC), 0, &getCppuType((sal_Int16*)0), beans::PropertyAttribute::BOUND, 0}, + {MAP_CHAR_LEN(PROPERTYNAME_TWODIGIT), 0, &getCppuType((sal_Int16*)0), beans::PropertyAttribute::BOUND, 0}, {0,0,0,0,0,0} }; return aNumberSettingsPropertyMap_Impl; @@ -118,13 +118,13 @@ const SfxItemPropertyMapEntry* lcl_GetNumberSettingsPropertyMap() LanguageType lcl_GetLanguage( const lang::Locale& rLocale ) { - // empty language -> LANGUAGE_SYSTEM + // empty language -> LANGUAGE_SYSTEM if ( rLocale.Language.getLength() == 0 ) return LANGUAGE_SYSTEM; LanguageType eRet = MsLangId::convertLocaleToLanguage( rLocale ); if ( eRet == LANGUAGE_NONE ) - eRet = LANGUAGE_SYSTEM; //! or throw an exception? + eRet = LANGUAGE_SYSTEM; //! or throw an exception? return eRet; } @@ -157,9 +157,9 @@ void SAL_CALL SvNumberFormatterServiceObj::attachNumberFormatsSupplier( { ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - SvNumberFormatsSupplierObj* pNew = SvNumberFormatsSupplierObj::getImplementation( _xSupplier ); + SvNumberFormatsSupplierObj* pNew = SvNumberFormatsSupplierObj::getImplementation( _xSupplier ); if (!pNew) - throw uno::RuntimeException(); // wrong object + throw uno::RuntimeException(); // wrong object xAutoReleaseOld = xSupplier; @@ -249,7 +249,7 @@ util::Color SAL_CALL SvNumberFormatterServiceObj::queryColorForNumber( sal_Int32 { ::osl::MutexGuard aGuard( m_aMutex ); - util::Color nRet = aDefaultColor; // color = INT32 + util::Color nRet = aDefaultColor; // color = INT32 SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL; if (pFormatter) { @@ -291,7 +291,7 @@ util::Color SAL_CALL SvNumberFormatterServiceObj::queryColorForString( sal_Int32 { ::osl::MutexGuard aGuard( m_aMutex ); - util::Color nRet = aDefaultColor; // color = INT32 + util::Color nRet = aDefaultColor; // color = INT32 SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL; if (pFormatter) { @@ -369,7 +369,7 @@ util::Color SAL_CALL SvNumberFormatterServiceObj::queryPreviewColorForNumber( { ::osl::MutexGuard aGuard( m_aMutex ); - util::Color nRet = aDefaultColor; // color = INT32 + util::Color nRet = aDefaultColor; // color = INT32 SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL; if (pFormatter) { @@ -493,7 +493,7 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::queryKey( const rtl::OUString& aFormat, LanguageType eLang = lcl_GetLanguage( nLocale ); if (bScan) { - //! irgendwas muss hier noch passieren... + //! irgendwas muss hier noch passieren... } nRet = pFormatter->GetEntryKey( aFormat, eLang ); } @@ -523,10 +523,10 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::addNew( const rtl::OUString& aFormat, nRet = nKey; else if (nCheckPos) { - throw util::MalformedNumberFormatException(); // ungueltiges Format + throw util::MalformedNumberFormatException(); // ungueltiges Format } else - throw uno::RuntimeException(); // anderer Fehler (z.B. schon vorhanden) + throw uno::RuntimeException(); // anderer Fehler (z.B. schon vorhanden) } else throw uno::RuntimeException(); @@ -555,10 +555,10 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::addNewConverted( const rtl::OUString& aFo nRet = nKey; else if (nCheckPos) { - throw util::MalformedNumberFormatException(); // ungueltiges Format + throw util::MalformedNumberFormatException(); // ungueltiges Format } else - throw uno::RuntimeException(); // anderer Fehler (z.B. schon vorhanden) + throw uno::RuntimeException(); // anderer Fehler (z.B. schon vorhanden) } else throw uno::RuntimeException(); @@ -574,7 +574,7 @@ void SAL_CALL SvNumberFormatsObj::removeByKey( sal_Int32 nKey ) throw(uno::Runti if (pFormatter) { pFormatter->DeleteEntry(nKey); - rSupplier.NumberFormatDeleted(nKey); // Benachrichtigung fuers Dokument + rSupplier.NumberFormatDeleted(nKey); // Benachrichtigung fuers Dokument } } @@ -628,8 +628,8 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::getStandardFormat( sal_Int16 nType, const if (pFormatter) { LanguageType eLang = lcl_GetLanguage( nLocale ); - // mask out "defined" bit, so type from an existing number format - // can directly be used for getStandardFormat + // mask out "defined" bit, so type from an existing number format + // can directly be used for getStandardFormat nType &= ~NUMBERFORMAT_DEFINED; nRet = pFormatter->GetStandardFormat(nType, eLang); } @@ -745,7 +745,7 @@ void SAL_CALL SvNumberFormatObj::setPropertyValue( const rtl::OUString&, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) { - throw beans::UnknownPropertyException(); // everything is read-only + throw beans::UnknownPropertyException(); // everything is read-only } uno::Any SAL_CALL SvNumberFormatObj::getPropertyValue( const rtl::OUString& aPropertyName ) @@ -783,7 +783,7 @@ uno::Any SAL_CALL SvNumberFormatObj::getPropertyValue( const rtl::OUString& aPro } else if (aString.EqualsAscii( PROPERTYNAME_STDFORM )) { - //! SvNumberformat Member bStandard rausreichen? + //! SvNumberformat Member bStandard rausreichen? BOOL bStandard = ( ( nKey % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 ); aRet.setValue( &bStandard, getBooleanCppuType() ); } @@ -899,7 +899,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL SvNumberFormatObj::getPropertyValue String aFmtStr = pFormat->GetFormatstring(); String aComment = pFormat->GetComment(); BOOL bStandard = ( ( nKey % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 ); - //! SvNumberformat Member bStandard rausreichen? + //! SvNumberformat Member bStandard rausreichen? BOOL bUserDef = ( ( pFormat->GetType() & NUMBERFORMAT_DEFINED ) != 0 ); BOOL bThousand, bRed; USHORT nDecimals, nLeading; @@ -948,7 +948,7 @@ void SAL_CALL SvNumberFormatObj::setPropertyValues( const uno::Sequence<beans::P lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) { - throw beans::UnknownPropertyException(); // everything is read-only + throw beans::UnknownPropertyException(); // everything is read-only } // XServiceInfo @@ -1013,7 +1013,7 @@ void SAL_CALL SvNumberFormatSettingsObj::setPropertyValue( const rtl::OUString& String aString = aPropertyName; if (aString.EqualsAscii( PROPERTYNAME_NOZERO )) { - // operator >>= shouldn't be used for bool (?) + // operator >>= shouldn't be used for bool (?) if ( aValue.getValueTypeClass() == uno::TypeClass_BOOLEAN ) pFormatter->SetNoZero( *(sal_Bool*)aValue.getValue() ); } diff --git a/svl/source/numbers/numfmuno.hxx b/svl/source/numbers/numfmuno.hxx index 09bc58a0b6ee..9c5f2b26f06e 100644 --- a/svl/source/numbers/numfmuno.hxx +++ b/svl/source/numbers/numfmuno.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,7 +44,7 @@ class SvNumberFormatter; class SvNumberFormatsSupplierObj; -// SvNumberFormatterServiceObj wird global als Service angemeldet +// SvNumberFormatterServiceObj wird global als Service angemeldet class SvNumberFormatterServiceObj : public cppu::WeakImplHelper3< com::sun::star::util::XNumberFormatter, @@ -57,7 +57,7 @@ private: public: SvNumberFormatterServiceObj(); - virtual ~SvNumberFormatterServiceObj(); + virtual ~SvNumberFormatterServiceObj(); // XNumberFormatter virtual void SAL_CALL attachNumberFormatsSupplier( @@ -121,7 +121,7 @@ private: public: SvNumberFormatsObj(SvNumberFormatsSupplierObj& pParent, ::comphelper::SharedMutex& _rMutex); - virtual ~SvNumberFormatsObj(); + virtual ~SvNumberFormatsObj(); // XNumberFormats @@ -182,19 +182,19 @@ class SvNumberFormatObj : public cppu::WeakImplHelper3< com::sun::star::lang::XServiceInfo> { private: - SvNumberFormatsSupplierObj& rSupplier; - ULONG nKey; + SvNumberFormatsSupplierObj& rSupplier; + ULONG nKey; mutable ::comphelper::SharedMutex m_aMutex; public: SvNumberFormatObj( SvNumberFormatsSupplierObj& rParent, ULONG nK, const ::comphelper::SharedMutex& _rMutex ); - virtual ~SvNumberFormatObj(); + virtual ~SvNumberFormatObj(); // XPropertySet virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, @@ -206,25 +206,25 @@ public: throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, @@ -234,7 +234,7 @@ public: // XPropertyAccess virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getPropertyValues() throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< + virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aProps ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, @@ -262,14 +262,14 @@ private: public: SvNumberFormatSettingsObj( SvNumberFormatsSupplierObj& rParent, const ::comphelper::SharedMutex& _rMutex); - virtual ~SvNumberFormatSettingsObj(); + virtual ~SvNumberFormatSettingsObj(); // XPropertySet virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, @@ -281,25 +281,25 @@ public: throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, diff --git a/svl/source/numbers/numhead.cxx b/svl/source/numbers/numhead.cxx index adf42fe26f8f..e95a581b76a4 100644 --- a/svl/source/numbers/numhead.cxx +++ b/svl/source/numbers/numhead.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,15 +33,15 @@ #include "numhead.hxx" -// ID's fuer Dateien: -#define SV_NUMID_SIZES 0x4200 +// ID's fuer Dateien: +#define SV_NUMID_SIZES 0x4200 // STATIC DATA ----------------------------------------------------------- //SEG_EOFGLOBALS() // ======================================================================= -/* wird fuer SvNumberformatter nicht gebraucht +/* wird fuer SvNumberformatter nicht gebraucht //#pragma SEG_FUNCDEF(numhead_01) SvNumReadHeader::SvNumReadHeader(SvStream& rNewStream) : @@ -59,7 +59,7 @@ SvNumReadHeader::~SvNumReadHeader() ULONG nReadEnd = rStream.Tell(); DBG_ASSERT( nReadEnd <= nDataEnd, "zuviele Bytes gelesen" ); if ( nReadEnd != nDataEnd ) - rStream.Seek(nDataEnd); // Rest ueberspringen + rStream.Seek(nDataEnd); // Rest ueberspringen } //#pragma SEG_FUNCDEF(numhead_03) @@ -92,11 +92,11 @@ SvNumWriteHeader::~SvNumWriteHeader() { ULONG nPos = rStream.Tell(); - if ( nPos - nDataPos != nDataSize ) // Default getroffen? + if ( nPos - nDataPos != nDataSize ) // Default getroffen? { nDataSize = nPos - nDataPos; rStream.Seek(nDataPos - sizeof(sal_uInt32)); - rStream << nDataSize; // Groesse am Anfang eintragen + rStream << nDataSize; // Groesse am Anfang eintragen rStream.Seek(nPos); } } @@ -169,7 +169,7 @@ void ImpSvNumMultipleReadHeader::EndEntry() ULONG nPos = rStream.Tell(); DBG_ASSERT( nPos <= nEntryEnd, "zuviel gelesen" ); if ( nPos != nEntryEnd ) - rStream.Seek( nEntryEnd ); // Rest ueberspringen + rStream.Seek( nEntryEnd ); // Rest ueberspringen } //#pragma SEG_FUNCDEF(numhead_0d) @@ -221,12 +221,12 @@ ImpSvNumMultipleWriteHeader::~ImpSvNumMultipleWriteHeader() rStream << static_cast<sal_uInt32>(aMemStream.Tell()); rStream.Write( aMemStream.GetData(), aMemStream.Tell() ); - if ( nDataEnd - nDataPos != nDataSize ) // Default getroffen? + if ( nDataEnd - nDataPos != nDataSize ) // Default getroffen? { nDataSize = nDataEnd - nDataPos; ULONG nPos = rStream.Tell(); rStream.Seek(nDataPos-sizeof(sal_uInt32)); - rStream << nDataSize; // Groesse am Anfang eintragen + rStream << nDataSize; // Groesse am Anfang eintragen rStream.Seek(nPos); } } diff --git a/svl/source/numbers/numhead.hxx b/svl/source/numbers/numhead.hxx index 7df06033e0d7..20b1f5398363 100644 --- a/svl/source/numbers/numhead.hxx +++ b/svl/source/numbers/numhead.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,28 +32,28 @@ // ----------------------------------------------------------------------- - // "Automatischer" Record-Header mit Groessenangabe + // "Automatischer" Record-Header mit Groessenangabe -/* wird fuer SvNumberFormatter nicht gebraucht +/* wird fuer SvNumberFormatter nicht gebraucht class SvNumReadHeader { private: - SvStream& rStream; - ULONG nDataEnd; + SvStream& rStream; + ULONG nDataEnd; public: SvNumReadHeader(SvStream& rNewStream); ~SvNumReadHeader(); - ULONG BytesLeft() const; + ULONG BytesLeft() const; }; class SvNumWriteHeader { private: - SvStream& rStream; - ULONG nDataPos; - ULONG nDataSize; + SvStream& rStream; + ULONG nDataPos; + ULONG nDataSize; public: SvNumWriteHeader(SvStream& rNewStream, ULONG nDefault = 0); @@ -62,43 +62,43 @@ public: */ - // Header mit Groessenangaben fuer mehrere Objekte + // Header mit Groessenangaben fuer mehrere Objekte class ImpSvNumMultipleReadHeader { private: - SvStream& rStream; - char* pBuf; - SvMemoryStream* pMemStream; - ULONG nEndPos; - ULONG nEntryEnd; + SvStream& rStream; + char* pBuf; + SvMemoryStream* pMemStream; + ULONG nEndPos; + ULONG nEntryEnd; public: ImpSvNumMultipleReadHeader(SvStream& rNewStream); ~ImpSvNumMultipleReadHeader(); - void StartEntry(); - void EndEntry(); - ULONG BytesLeft() const; + void StartEntry(); + void EndEntry(); + ULONG BytesLeft() const; - static void Skip( SvStream& ); // komplett ueberspringen + static void Skip( SvStream& ); // komplett ueberspringen }; class ImpSvNumMultipleWriteHeader { private: - SvStream& rStream; - SvMemoryStream aMemStream; - ULONG nDataPos; - sal_uInt32 nDataSize; - ULONG nEntryStart; + SvStream& rStream; + SvMemoryStream aMemStream; + ULONG nDataPos; + sal_uInt32 nDataSize; + ULONG nEntryStart; public: ImpSvNumMultipleWriteHeader(SvStream& rNewStream, ULONG nDefault = 0); ~ImpSvNumMultipleWriteHeader(); - void StartEntry(); - void EndEntry(); + void StartEntry(); + void EndEntry(); }; #endif diff --git a/svl/source/numbers/numuno.cxx b/svl/source/numbers/numuno.cxx index a6208657406e..4d53eccd0e1a 100644 --- a/svl/source/numbers/numuno.cxx +++ b/svl/source/numbers/numuno.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -86,18 +86,18 @@ SvNumberFormatter* SvNumberFormatsSupplierObj::GetNumberFormatter() const void SvNumberFormatsSupplierObj::SetNumberFormatter(SvNumberFormatter* pNew) { - // der alte Numberformatter ist ungueltig geworden, nicht mehr darauf zugreifen! + // der alte Numberformatter ist ungueltig geworden, nicht mehr darauf zugreifen! pImpl->pFormatter = pNew; } void SvNumberFormatsSupplierObj::NumberFormatDeleted(sal_uInt32) { - // Basis-Implementierung tut nix... + // Basis-Implementierung tut nix... } void SvNumberFormatsSupplierObj::SettingsChanged() { - // Basis-Implementierung tut nix... + // Basis-Implementierung tut nix... } // XNumberFormatsSupplier @@ -123,8 +123,8 @@ uno::Reference<util::XNumberFormats> SAL_CALL SvNumberFormatsSupplierObj::getNum sal_Int64 SAL_CALL SvNumberFormatsSupplierObj::getSomething( const uno::Sequence<sal_Int8 >& rId ) throw(uno::RuntimeException) { - if ( rId.getLength() == 16 && - 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), + if ( rId.getLength() == 16 && + 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); diff --git a/svl/source/numbers/supservs.cxx b/svl/source/numbers/supservs.cxx index 90d41977e974..53c5446f9748 100644 --- a/svl/source/numbers/supservs.cxx +++ b/svl/source/numbers/supservs.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,7 +45,7 @@ using namespace ::com::sun::star::util; using namespace ::vos; using namespace ::utl; -#define PERSISTENT_SERVICE_NAME ::rtl::OUString::createFromAscii("com.sun.star.util.NumberFormatsSupplier"); +#define PERSISTENT_SERVICE_NAME ::rtl::OUString::createFromAscii("com.sun.star.util.NumberFormatsSupplier"); //------------------------------------------------------------------------- Reference< XInterface > SAL_CALL SvNumberFormatsSupplierServiceObject_CreateInstance(const Reference< XMultiServiceFactory >& _rxFactory) @@ -95,7 +95,7 @@ void SAL_CALL SvNumberFormatsSupplierServiceObject::initialize( const Sequence< // maybe you already called a method which needed the formatter // you should use XMultiServiceFactory::createInstanceWithArguments to avoid that if (m_pOwnFormatter) - { // !!! this is only a emergency handling, normally this should not occur !!! + { // !!! this is only a emergency handling, normally this should not occur !!! delete m_pOwnFormatter; m_pOwnFormatter = NULL; SetNumberFormatter(m_pOwnFormatter); diff --git a/svl/source/numbers/supservs.hxx b/svl/source/numbers/supservs.hxx index 45f6b3a8e285..126fbdd56803 100644 --- a/svl/source/numbers/supservs.hxx +++ b/svl/source/numbers/supservs.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,25 +36,25 @@ //========================================================================= //= SvNumberFormatsSupplierServiceObject - a number formats supplier which -//= - can be instantiated as an service -//= - supports the ::com::sun::star::io::XPersistObject interface -//= - works with it's own SvNumberFormatter instance -//= - can be initialized (::com::sun::star::lang::XInitialization) -//= with a specific language (i.e. ::com::sun::star::lang::Locale) +//= - can be instantiated as an service +//= - supports the ::com::sun::star::io::XPersistObject interface +//= - works with it's own SvNumberFormatter instance +//= - can be initialized (::com::sun::star::lang::XInitialization) +//= with a specific language (i.e. ::com::sun::star::lang::Locale) //========================================================================= class SvNumberFormatsSupplierServiceObject :protected SvNumberFormatsSupplierObj ,public ::com::sun::star::lang::XInitialization ,public ::com::sun::star::io::XPersistObject ,public ::com::sun::star::lang::XServiceInfo -{ // don't want the Set-/GetNumberFormatter to be accessable from outside +{ // don't want the Set-/GetNumberFormatter to be accessable from outside friend ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvNumberFormatsSupplierServiceObject_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&); protected: - SvNumberFormatter* m_pOwnFormatter; + SvNumberFormatter* m_pOwnFormatter; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB; diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index 8c63ed903825..1152d54f0783 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/numbers/zforfind.hxx b/svl/source/numbers/zforfind.hxx index 42571f56dd92..51842e26b553 100644 --- a/svl/source/numbers/zforfind.hxx +++ b/svl/source/numbers/zforfind.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 7343a0a9c0e6..17662ae26603 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -78,15 +78,15 @@ using namespace ::com::sun::star::lang; #define ZF_STANDARD_DATETIME 50 #define ZF_STANDARD_SCIENTIFIC 60 #define ZF_STANDARD_FRACTION 70 -#define ZF_STANDARD_NEWEXTENDED 75 -#define ZF_STANDARD_NEWEXTENDEDMAX SV_MAX_ANZ_STANDARD_FORMATE-2 // 98 +#define ZF_STANDARD_NEWEXTENDED 75 +#define ZF_STANDARD_NEWEXTENDEDMAX SV_MAX_ANZ_STANDARD_FORMATE-2 // 98 #define ZF_STANDARD_LOGICAL SV_MAX_ANZ_STANDARD_FORMATE-1 // 99 #define ZF_STANDARD_TEXT SV_MAX_ANZ_STANDARD_FORMATE // 100 /* Locale that is set if an unknown locale (from another system) is loaded of * legacy documents. Can not be SYSTEM because else, for example, a German "DM" * (old currency) is recognized as a date (#53155#). */ -#define UNKNOWN_SUBSTITUTE LANGUAGE_ENGLISH_US +#define UNKNOWN_SUBSTITUTE LANGUAGE_ENGLISH_US static BOOL bIndexTableInitialized = FALSE; static sal_uInt32 __FAR_DATA theIndexTable[NF_INDEX_TABLE_ENTRIES]; @@ -161,13 +161,13 @@ void SvNumberFormatterRegistry_Impl::ConfigurationChanged( utl::ConfigurationBro SvNumberFormatterRegistry_Impl* SvNumberFormatter::pFormatterRegistry = NULL; BOOL SvNumberFormatter::bCurrencyTableInitialized = FALSE; -namespace +namespace { - struct theCurrencyTable : - public rtl::Static< NfCurrencyTable, theCurrencyTable > {}; + struct theCurrencyTable : + public rtl::Static< NfCurrencyTable, theCurrencyTable > {}; - struct theLegacyOnlyCurrencyTable : - public rtl::Static< NfCurrencyTable, theLegacyOnlyCurrencyTable > {}; + struct theLegacyOnlyCurrencyTable : + public rtl::Static< NfCurrencyTable, theLegacyOnlyCurrencyTable > {}; } USHORT SvNumberFormatter::nSystemCurrencyPosition = 0; SV_IMPL_PTRARR( NfCurrencyTable, NfCurrencyEntry* ); @@ -356,16 +356,16 @@ void SvNumberFormatter::ImpChangeSysCL( LanguageType eLnge, BOOL bLoadingSO5 ) IniLnge = eLnge; ChangeIntl(eLnge); SvNumberformat* pEntry = aFTable.First(); - while (pEntry) // delete old formats + while (pEntry) // delete old formats { pEntry = (SvNumberformat*) aFTable.Remove(aFTable.GetCurKey()); delete pEntry; pEntry = (SvNumberformat*) aFTable.First(); } - ImpGenerateFormats( 0, bLoadingSO5 ); // new standard formats + ImpGenerateFormats( 0, bLoadingSO5 ); // new standard formats } else if ( bLoadingSO5 ) - { // delete additional standard formats + { // delete additional standard formats sal_uInt32 nKey; aFTable.Seek( SV_MAX_ANZ_STANDARD_FORMATE + 1 ); while ( (nKey = aFTable.GetCurKey()) > SV_MAX_ANZ_STANDARD_FORMATE && @@ -480,19 +480,19 @@ BOOL SvNumberFormatter::HasTextFormat(sal_uInt32 F_Index) const BOOL SvNumberFormatter::PutEntry(String& rString, xub_StrLen& nCheckPos, short& nType, - sal_uInt32& nKey, // Formatnummer + sal_uInt32& nKey, // Formatnummer LanguageType eLnge) { nKey = 0; - if (rString.Len() == 0) // keinen Leerstring + if (rString.Len() == 0) // keinen Leerstring { - nCheckPos = 1; // -> Fehler + nCheckPos = 1; // -> Fehler return FALSE; } if (eLnge == LANGUAGE_DONTKNOW) eLnge = IniLnge; - ChangeIntl(eLnge); // ggfs. austauschen + ChangeIntl(eLnge); // ggfs. austauschen LanguageType eLge = eLnge; // Umgehung const fuer ConvertMode BOOL bCheck = FALSE; SvNumberformat* p_Entry = new SvNumberformat(rString, @@ -500,8 +500,8 @@ BOOL SvNumberFormatter::PutEntry(String& rString, pStringScanner, nCheckPos, eLge); - if (nCheckPos == 0) // Format ok - { // Typvergleich: + if (nCheckPos == 0) // Format ok + { // Typvergleich: short eCheckType = p_Entry->GetType(); if ( eCheckType != NUMBERFORMAT_UNDEFINED) { @@ -513,10 +513,10 @@ BOOL SvNumberFormatter::PutEntry(String& rString, p_Entry->SetType(NUMBERFORMAT_DEFINED); nType = NUMBERFORMAT_DEFINED; } - sal_uInt32 CLOffset = ImpGenerateCL(eLge); // ggfs. neu Standard- + sal_uInt32 CLOffset = ImpGenerateCL(eLge); // ggfs. neu Standard- // formate anlegen nKey = ImpIsEntry(p_Entry->GetFormatstring(),CLOffset, eLge); - if (nKey != NUMBERFORMAT_ENTRY_NOT_FOUND) // schon vorhanden + if (nKey != NUMBERFORMAT_ENTRY_NOT_FOUND) // schon vorhanden delete p_Entry; else { @@ -597,13 +597,13 @@ sal_uInt32 SvNumberFormatter::GetIndexPuttingAndConverting( String & rString, nKey = nOrig; // none avaliable, maybe user-defined else nKey = GetFormatForLanguageIfBuiltIn( nOrig, SvtSysLocale().GetLanguage() ); - + if (nKey == nOrig) { // Not a builtin format, convert. // The format code string may get modified and adapted to the real // language and wouldn't match eSysLnge anymore, do that on a copy. - String aTmp( rString); + String aTmp( rString); rNewInserted = PutandConvertEntrySystem( aTmp, rCheckPos, rType, nKey, eLnge, SvtSysLocale().GetLanguage()); if (rCheckPos > 0) @@ -682,8 +682,8 @@ BOOL SvNumberFormatter::Load( SvStream& rStream ) SvNumberformat* pEntry; sal_uInt32 nPos; LanguageType eSaveSysLang, eLoadSysLang; - USHORT nSysOnStore, eLge, eDummy; // Dummy fuer kompatibles Format - rStream >> nSysOnStore >> eLge; // Systemeinstellung aus + USHORT nSysOnStore, eLge, eDummy; // Dummy fuer kompatibles Format + rStream >> nSysOnStore >> eLge; // Systemeinstellung aus // Dokument eSaveSysLang = (nVersion < SV_NUMBERFORMATTER_VERSION_SYSTORE ? LANGUAGE_SYSTEM : (LanguageType) nSysOnStore); @@ -695,9 +695,9 @@ BOOL SvNumberFormatter::Load( SvStream& rStream ) { rStream >> eDummy >> eLge; eLnge = (LanguageType) eLge; - ImpGenerateCL( eLnge, TRUE ); // ggfs. neue Standardformate anlegen + ImpGenerateCL( eLnge, TRUE ); // ggfs. neue Standardformate anlegen - sal_uInt32 nOffset = nPos % SV_COUNTRY_LANGUAGE_OFFSET; // relativIndex + sal_uInt32 nOffset = nPos % SV_COUNTRY_LANGUAGE_OFFSET; // relativIndex BOOL bUserDefined = (nOffset > SV_MAX_ANZ_STANDARD_FORMATE); //! HACK! ER 29.07.97 15:15 // SaveLang wurde bei SYSTEM nicht gespeichert sondern war auch SYSTEM, @@ -724,7 +724,7 @@ BOOL SvNumberFormatter::Load( SvStream& rStream ) pEntry = new SvNumberformat(*pFormatScanner, eLnge); if ( bConversionHack ) - { // SYSTEM + { // SYSTEM // nVersion < SV_NUMBERFORMATTER_VERSION_SYSTORE // nVersion < SV_NUMBERFORMATTER_VERSION_KEYWORDS if ( !pConverter ) @@ -765,7 +765,7 @@ BOOL SvNumberFormatter::Load( SvStream& rStream ) if ( bUserDefined ) { if ( eSaveSysLang != eLoadSysLang ) - { // SYSTEM verschieden + { // SYSTEM verschieden if ( !pConverter ) pConverter = new SvNumberFormatter( xServiceManager, eSysLang ); if ( nVersion < SV_NUMBERFORMATTER_VERSION_KEYWORDS ) @@ -792,7 +792,7 @@ BOOL SvNumberFormatter::Load( SvStream& rStream ) eSaveSysLang, eLoadSysLang, TRUE ); } else - { // nicht SYSTEM oder gleiches SYSTEM + { // nicht SYSTEM oder gleiches SYSTEM if ( nVersion < SV_NUMBERFORMATTER_VERSION_KEYWORDS ) { LanguageType eLoadLang; @@ -827,7 +827,7 @@ BOOL SvNumberFormatter::Load( SvStream& rStream ) } } } - if ( nOffset == 0 ) // StandardFormat + if ( nOffset == 0 ) // StandardFormat { SvNumberformat* pEnt = aFTable.Get(nPos); if (pEnt) @@ -847,7 +847,7 @@ BOOL SvNumberFormatter::Load( SvStream& rStream ) UINT16 nY2k; rStream >> nY2k; if ( nVersion < SV_NUMBERFORMATTER_VERSION_TWODIGITYEAR && nY2k < 100 ) - nY2k += 1901; // war vor src513e: 29, jetzt: 1930 + nY2k += 1901; // war vor src513e: 29, jetzt: 1930 SetYear2000( nY2k ); } aHdr.EndEntry(); @@ -901,7 +901,7 @@ BOOL SvNumberFormatter::Save( SvStream& rStream ) const } pEntry = (SvNumberformat*) pTable->Next(); } - rStream << NUMBERFORMAT_ENTRY_NOT_FOUND; // EndeKennung + rStream << NUMBERFORMAT_ENTRY_NOT_FOUND; // EndeKennung // ab SV_NUMBERFORMATTER_VERSION_YEAR2000 aHdr.StartEntry(); @@ -1031,14 +1031,14 @@ SvNumberFormatTable& SvNumberFormatter::GetFirstEntryTable( LanguageType& rLnge) { short eTypetmp = eType; - if (eType == NUMBERFORMAT_ALL) // Leere Zelle oder don't care + if (eType == NUMBERFORMAT_ALL) // Leere Zelle oder don't care rLnge = IniLnge; else { SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get(FIndex); if (!pFormat) { -// DBG_ERROR("SvNumberFormatter:: Unbekanntes altes Zahlformat (1)"); +// DBG_ERROR("SvNumberFormatter:: Unbekanntes altes Zahlformat (1)"); rLnge = IniLnge; eType = NUMBERFORMAT_ALL; eTypetmp = eType; @@ -1070,7 +1070,7 @@ sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge, BOOL bLoadingSO ChangeIntl(eLnge); sal_uInt32 CLOffset = ImpGetCLOffset(ActLnge); if (CLOffset > MaxCLOffset) - { // new CL combination + { // new CL combination if (LocaleDataWrapper::areChecksEnabled()) { Locale aLoadedLocale = xLocaleData->getLoadedLocale(); @@ -1195,7 +1195,7 @@ BOOL SvNumberFormatter::IsNumberFormat(const String& sString, const SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get(F_Index); if (!pFormat) { -// DBG_ERROR("SvNumberFormatter:: Unbekanntes altes Zahlformat (2)"); +// DBG_ERROR("SvNumberFormatter:: Unbekanntes altes Zahlformat (2)"); ChangeIntl(IniLnge); FType = NUMBERFORMAT_NUMBER; } @@ -1210,19 +1210,19 @@ BOOL SvNumberFormatter::IsNumberFormat(const String& sString, short RType = FType; // Ergebnistyp // ohne def-Kennung - if (RType == NUMBERFORMAT_TEXT) // Zahlzelle ->Stringz. + if (RType == NUMBERFORMAT_TEXT) // Zahlzelle ->Stringz. res = FALSE; else res = pStringScanner->IsNumberFormat(sString, RType, fOutNumber, pFormat); - if (res && !IsCompatible(FType, RType)) // unpassender Typ + if (res && !IsCompatible(FType, RType)) // unpassender Typ { switch ( RType ) { case NUMBERFORMAT_TIME : { if ( pStringScanner->GetDecPos() ) - { // 100stel Sekunden + { // 100stel Sekunden if ( pStringScanner->GetAnzNums() > 3 || fOutNumber < 0.0 ) F_Index = GetFormatIndex( NF_TIME_HH_MMSS00, ActLnge ); else @@ -1260,7 +1260,7 @@ BOOL SvNumberFormatter::IsCompatible(short eOldType, case NUMBERFORMAT_CURRENCY: case NUMBERFORMAT_SCIENTIFIC: case NUMBERFORMAT_FRACTION: -// case NUMBERFORMAT_LOGICAL: +// case NUMBERFORMAT_LOGICAL: case NUMBERFORMAT_DEFINED: return TRUE; default: @@ -1316,7 +1316,7 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultFormat( short nType ) sal_uInt32 nSearch; switch( nType ) { - case NUMBERFORMAT_DATE : + case NUMBERFORMAT_DATE : nSearch = CLOffset + ZF_STANDARD_DATE; break; case NUMBERFORMAT_TIME : @@ -1338,7 +1338,7 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultFormat( short nType ) if ( !nDefaultFormat ) nDefaultFormat = NUMBERFORMAT_ENTRY_NOT_FOUND; if ( nDefaultFormat == NUMBERFORMAT_ENTRY_NOT_FOUND ) - { // look for a defined standard + { // look for a defined standard sal_uInt32 nStopKey = CLOffset + SV_COUNTRY_LANGUAGE_OFFSET; sal_uInt32 nKey; aFTable.Seek( CLOffset ); @@ -1350,16 +1350,16 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultFormat( short nType ) ~NUMBERFORMAT_DEFINED) == nType) ) { nDefaultFormat = nKey; - break; // while + break; // while } aFTable.Next(); } if ( nDefaultFormat == NUMBERFORMAT_ENTRY_NOT_FOUND ) - { // none found, use old fixed standards + { // none found, use old fixed standards switch( nType ) { - case NUMBERFORMAT_DATE : + case NUMBERFORMAT_DATE : nDefaultFormat = CLOffset + ZF_STANDARD_DATE; break; case NUMBERFORMAT_TIME : @@ -1396,7 +1396,7 @@ sal_uInt32 SvNumberFormatter::GetStandardFormat( short eType, LanguageType eLnge else return ImpGetDefaultCurrencyFormat(); } - case NUMBERFORMAT_DATE : + case NUMBERFORMAT_DATE : case NUMBERFORMAT_TIME : case NUMBERFORMAT_DATETIME : case NUMBERFORMAT_PERCENT : @@ -1405,7 +1405,7 @@ sal_uInt32 SvNumberFormatter::GetStandardFormat( short eType, LanguageType eLnge case NUMBERFORMAT_FRACTION : return CLOffset + ZF_STANDARD_FRACTION; case NUMBERFORMAT_LOGICAL : return CLOffset + ZF_STANDARD_LOGICAL; - case NUMBERFORMAT_TEXT : return CLOffset + ZF_STANDARD_TEXT; + case NUMBERFORMAT_TEXT : return CLOffset + ZF_STANDARD_TEXT; case NUMBERFORMAT_ALL : case NUMBERFORMAT_DEFINED : case NUMBERFORMAT_NUMBER : @@ -1453,7 +1453,7 @@ sal_uInt32 SvNumberFormatter::GetStandardFormat( double fNumber, sal_uInt32 nFIn bSign = FALSE; double fSeconds = fNumber * 86400; if ( floor( fSeconds + 0.5 ) * 100 != floor( fSeconds * 100 + 0.5 ) ) - { // mit 100stel Sekunden + { // mit 100stel Sekunden if ( bSign || fSeconds >= 3600 ) return GetFormatIndex( NF_TIME_HH_MMSS00, eLnge ); else @@ -1493,14 +1493,14 @@ void SvNumberFormatter::GetInputLineString(const double& fOutNumber, || eType == NUMBERFORMAT_SCIENTIFIC || eType == NUMBERFORMAT_FRACTION) { - if (eType != NUMBERFORMAT_PERCENT) // spaeter Sonderbehandlung % + if (eType != NUMBERFORMAT_PERCENT) // spaeter Sonderbehandlung % eType = NUMBERFORMAT_NUMBER; ChangeStandardPrec(INPUTSTRING_PRECISION); bPrecChanged = true; } sal_uInt32 nKey = nFIndex; switch ( eType ) - { // #61619# immer vierstelliges Jahr editieren + { // #61619# immer vierstelliges Jahr editieren case NUMBERFORMAT_DATE : nKey = GetFormatIndex( NF_DATE_SYS_DDMMYYYY, eLang ); break; @@ -1568,14 +1568,14 @@ BOOL SvNumberFormatter::GetPreviewString(const String& sFormatString, Color** ppColor, LanguageType eLnge) { - if (sFormatString.Len() == 0) // keinen Leerstring + if (sFormatString.Len() == 0) // keinen Leerstring return FALSE; xub_StrLen nCheckPos = STRING_NOTFOUND; sal_uInt32 nKey; if (eLnge == LANGUAGE_DONTKNOW) eLnge = IniLnge; - ChangeIntl(eLnge); // ggfs. austauschen + ChangeIntl(eLnge); // ggfs. austauschen eLnge = ActLnge; String sTmpString = sFormatString; SvNumberformat* p_Entry = new SvNumberformat(sTmpString, @@ -1583,12 +1583,12 @@ BOOL SvNumberFormatter::GetPreviewString(const String& sFormatString, pStringScanner, nCheckPos, eLnge); - if (nCheckPos == 0) // String ok + if (nCheckPos == 0) // String ok { - sal_uInt32 CLOffset = ImpGenerateCL(eLnge); // ggfs. neu Standard- + sal_uInt32 CLOffset = ImpGenerateCL(eLnge); // ggfs. neu Standard- // formate anlegen nKey = ImpIsEntry(p_Entry->GetFormatstring(),CLOffset, eLnge); - if (nKey != NUMBERFORMAT_ENTRY_NOT_FOUND) // schon vorhanden + if (nKey != NUMBERFORMAT_ENTRY_NOT_FOUND) // schon vorhanden GetOutputString(fPreviewNumber,nKey,sOutString,ppColor); else p_Entry->GetOutputString(fPreviewNumber,sOutString, ppColor); @@ -1608,7 +1608,7 @@ BOOL SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString, Color** ppColor, LanguageType eLnge ) { - if (sFormatString.Len() == 0) // keinen Leerstring + if (sFormatString.Len() == 0) // keinen Leerstring return FALSE; if (eLnge == LANGUAGE_DONTKNOW) @@ -1622,7 +1622,7 @@ BOOL SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString, sal_uInt32 nCLOffset = ImpGenerateCL( eLnge ); sal_uInt32 nKey = ImpIsEntry( aFormatStringUpper, nCLOffset, eLnge ); if ( nKey != NUMBERFORMAT_ENTRY_NOT_FOUND ) - { // Zielformat vorhanden + { // Zielformat vorhanden GetOutputString( fPreviewNumber, nKey, sOutString, ppColor ); return TRUE; } @@ -1656,14 +1656,14 @@ BOOL SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString, { if ( nCheckPos > 0 || xTransliteration->isEqual( sFormatString, pEntry->GetFormatstring() ) ) - { // other Format + { // other Format delete pEntry; sTmpString = sFormatString; pEntry = new SvNumberformat( sTmpString, pFormatScanner, pStringScanner, nCheckPos, eLnge ); } else - { // verify english + { // verify english xub_StrLen nCheckPos2 = STRING_NOTFOUND; // try other --> english eFormatLang = eLnge; @@ -1675,7 +1675,7 @@ BOOL SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString, ChangeIntl( eLnge ); if ( nCheckPos2 == 0 && !xTransliteration->isEqual( sFormatString, pEntry2->GetFormatstring() ) ) - { // other Format + { // other Format delete pEntry; sTmpString = sFormatString; pEntry = new SvNumberformat( sTmpString, pFormatScanner, @@ -1686,9 +1686,9 @@ BOOL SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString, } } - if (nCheckPos == 0) // String ok + if (nCheckPos == 0) // String ok { - ImpGenerateCL( eLnge ); // ggfs. neu Standardformate anlegen + ImpGenerateCL( eLnge ); // ggfs. neu Standardformate anlegen pEntry->GetOutputString( fPreviewNumber, sOutString, ppColor ); delete pEntry; return TRUE; @@ -1728,8 +1728,8 @@ BOOL SvNumberFormatter::GetPreviewString( const String& sFormatString, GetOutputString( aNonConstPreview, nKey, sOutString, ppColor); else { - // If the format is valid but not a text format and does not - // include a text subformat, an empty string would result. Same as + // If the format is valid but not a text format and does not + // include a text subformat, an empty string would result. Same as // in SvNumberFormatter::GetOutputString() if (p_Entry->IsTextFormat() || p_Entry->HasTextFormat()) p_Entry->GetOutputString( aNonConstPreview, sOutString, ppColor); @@ -1752,13 +1752,13 @@ BOOL SvNumberFormatter::GetPreviewString( const String& sFormatString, sal_uInt32 SvNumberFormatter::TestNewString(const String& sFormatString, LanguageType eLnge) { - if (sFormatString.Len() == 0) // keinen Leerstring + if (sFormatString.Len() == 0) // keinen Leerstring return NUMBERFORMAT_ENTRY_NOT_FOUND; xub_StrLen nCheckPos = STRING_NOTFOUND; if (eLnge == LANGUAGE_DONTKNOW) eLnge = IniLnge; - ChangeIntl(eLnge); // ggfs. austauschen + ChangeIntl(eLnge); // ggfs. austauschen eLnge = ActLnge; sal_uInt32 nRes; String sTmpString = sFormatString; @@ -1767,9 +1767,9 @@ sal_uInt32 SvNumberFormatter::TestNewString(const String& sFormatString, pStringScanner, nCheckPos, eLnge); - if (nCheckPos == 0) // String ok + if (nCheckPos == 0) // String ok { - sal_uInt32 CLOffset = ImpGenerateCL(eLnge); // ggfs. neu Standard- + sal_uInt32 CLOffset = ImpGenerateCL(eLnge); // ggfs. neu Standard- // formate anlegen nRes = ImpIsEntry(pEntry->GetFormatstring(),CLOffset, eLnge); // schon vorhanden ? @@ -1788,7 +1788,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( if ( rCode.Index < NF_INDEX_TABLE_ENTRIES && rCode.Usage == ::com::sun::star::i18n::KNumberFormatUsage::CURRENCY && rCode.Index != NF_CURRENCY_1000DEC2_CCC ) - { // strip surrounding [$...] on automatic currency + { // strip surrounding [$...] on automatic currency if ( aCodeStr.SearchAscii( "[$" ) != STRING_NOTFOUND ) aCodeStr = SvNumberformat::StripNewCurrencyDelimiters( aCodeStr, FALSE ); else @@ -1839,13 +1839,13 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( { // These may be dupes of integer versions for locales where // currencies have no decimals like Italian Lira. - case NF_CURRENCY_1000DEC2 : // NF_CURRENCY_1000INT - case NF_CURRENCY_1000DEC2_RED : // NF_CURRENCY_1000INT_RED - case NF_CURRENCY_1000DEC2_DASHED : // NF_CURRENCY_1000INT_RED + case NF_CURRENCY_1000DEC2 : // NF_CURRENCY_1000INT + case NF_CURRENCY_1000DEC2_RED : // NF_CURRENCY_1000INT_RED + case NF_CURRENCY_1000DEC2_DASHED : // NF_CURRENCY_1000INT_RED break; default: if ( !bAfterLoadingSO5 ) - { // If bAfterLoadingSO5 there will definitely be some dupes, + { // If bAfterLoadingSO5 there will definitely be some dupes, // don't cry. But we need this test for verification of locale // data if not loading old SO5 documents. String aMsg( RTL_CONSTASCII_USTRINGPARAM( @@ -1974,7 +1974,7 @@ sal_uInt32 SvNumberFormatter::GetFormatSpecialInfo( const String& rFormatString, xub_StrLen nCheckPos = 0; if (eLnge == LANGUAGE_DONTKNOW) eLnge = IniLnge; - ChangeIntl(eLnge); // ggfs. austauschen + ChangeIntl(eLnge); // ggfs. austauschen eLnge = ActLnge; String aTmpStr( rFormatString ); SvNumberformat* pFormat = new SvNumberformat( aTmpStr, @@ -2019,7 +2019,7 @@ sal_Int32 SvNumberFormatter::ImpGetFormatCodeIndex( || NF_CURRENCY_END < nTabOff || nTabOff == NF_CURRENCY_1000INT || nTabOff == NF_CURRENCY_1000INT_RED || nTabOff == NF_CURRENCY_1000DEC2_CCC)) - { // currency entries with decimals might not exist, e.g. Italian Lira + { // currency entries with decimals might not exist, e.g. Italian Lira String aMsg( RTL_CONSTASCII_USTRINGPARAM( "SvNumberFormatter::ImpGetFormatCodeIndex: not found: ")); aMsg += String::CreateFromInt32( nTabOff ); @@ -2054,7 +2054,7 @@ sal_Int32 SvNumberFormatter::ImpGetFormatCodeIndex( } } else - { // we need at least _some_ format + { // we need at least _some_ format rSeq.realloc(1); rSeq[0] = ::com::sun::star::i18n::NumberFormatCode(); String aTmp( '0' ); @@ -2187,7 +2187,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO } BOOL bOldConvertMode = pFormatScanner->GetConvertMode(); if (bOldConvertMode) - pFormatScanner->SetConvertMode(FALSE); // switch off for this function + pFormatScanner->SetConvertMode(FALSE); // switch off for this function NumberFormatCodeWrapper aNumberFormatCode( xServiceManager, GetLocale() ); @@ -2241,7 +2241,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO // Boolean aFormatCode = pFormatScanner->GetBooleanString(); pNewFormat = new SvNumberformat( aFormatCode, - pFormatScanner, pStringScanner, nCheckPos, ActLnge ); + pFormatScanner, pStringScanner, nCheckPos, ActLnge ); pNewFormat->SetType(NUMBERFORMAT_LOGICAL); pNewFormat->SetStandard(); if ( !aFTable.Insert( @@ -2353,7 +2353,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO pNewFormat = ImpInsertFormat( aFormatSeq[nIdx], CLOffset + SetIndexTable( NF_CURRENCY_1000DEC2_CCC, ZF_STANDARD_CURRENCY+4 )); if ( pNewFormat ) - pNewFormat->SetUsed(TRUE); // must be saved for older versions + pNewFormat->SetUsed(TRUE); // must be saved for older versions aFormatSeq[nIdx].Default = bDefault; // #.##0,-- since number formatter version 6 @@ -2406,7 +2406,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO pNewFormat = ImpInsertFormat( aFormatSeq[nIdx], CLOffset + SetIndexTable( NF_DATE_SYS_DDMMYYYY, ZF_STANDARD_DATE+6 )); if ( pNewFormat ) - pNewFormat->SetUsed(TRUE); // must be saved for older versions + pNewFormat->SetUsed(TRUE); // must be saved for older versions // DD.MM.YY def/System, since number formatter version 6 nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_SYS_DDMMYY ); @@ -2578,7 +2578,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO // # ?/? aSingleFormatCode.Code = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "# ?/?" ) ); - String s25( RTL_CONSTASCII_USTRINGPARAM( "# ?/?" ) ); // # ?/? + String s25( RTL_CONSTASCII_USTRINGPARAM( "# ?/?" ) ); // # ?/? ImpInsertFormat( aSingleFormatCode, CLOffset + SetIndexTable( NF_FRACTION_1, ZF_STANDARD_FRACTION )); @@ -2639,11 +2639,11 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset, if ( nPos - CLOffset >= SV_COUNTRY_LANGUAGE_OFFSET ) { DBG_ERRORFILE( "ImpGenerateAdditionalFormats: too many formats" ); - break; // for + break; // for } if ( pFormatArr[j].Index < NF_INDEX_TABLE_ENTRIES && pFormatArr[j].Index != NF_CURRENCY_1000DEC2_CCC ) - { // Insert only if not already inserted, but internal index must be + { // Insert only if not already inserted, but internal index must be // above so ImpInsertFormat can distinguish it. sal_Int16 nOrgIndex = pFormatArr[j].Index; pFormatArr[j].Index = sal::static_int_cast< sal_Int16 >( @@ -2713,7 +2713,7 @@ void SvNumberFormatter::GenerateFormat(String& sString, eLnge = IniLnge; short eType = GetType(nIndex); USHORT i; - ImpGenerateCL(eLnge); // ggfs. neu Standard- + ImpGenerateCL(eLnge); // ggfs. neu Standard- // formate anlegen sString.Erase(); @@ -2830,7 +2830,7 @@ BOOL SvNumberFormatter::IsUserDefined(const String& sStr, { if (eLnge == LANGUAGE_DONTKNOW) eLnge = IniLnge; - sal_uInt32 CLOffset = ImpGenerateCL(eLnge); // ggfs. neu Standard- + sal_uInt32 CLOffset = ImpGenerateCL(eLnge); // ggfs. neu Standard- // formate anlegen eLnge = ActLnge; sal_uInt32 nKey = ImpIsEntry(sStr, CLOffset, eLnge); @@ -2847,7 +2847,7 @@ sal_uInt32 SvNumberFormatter::GetEntryKey(const String& sStr, { if (eLnge == LANGUAGE_DONTKNOW) eLnge = IniLnge; - sal_uInt32 CLOffset = ImpGenerateCL(eLnge); // ggfs. neu Standard- + sal_uInt32 CLOffset = ImpGenerateCL(eLnge); // ggfs. neu Standard- // formate anlegen return ImpIsEntry(sStr, CLOffset, eLnge); } @@ -2902,30 +2902,30 @@ SvNumberFormatterIndexTable* SvNumberFormatter::MergeFormatter(SvNumberFormatter while (pFormat) { nOldKey = rTable.aFTable.GetCurKey(); - nOffset = nOldKey % SV_COUNTRY_LANGUAGE_OFFSET; // relativIndex - if (nOffset == 0) // 1. Format von CL + nOffset = nOldKey % SV_COUNTRY_LANGUAGE_OFFSET; // relativIndex + if (nOffset == 0) // 1. Format von CL nCLOffset = ImpGenerateCL(pFormat->GetLanguage()); - if (nOffset <= SV_MAX_ANZ_STANDARD_FORMATE) // Std.form. + if (nOffset <= SV_MAX_ANZ_STANDARD_FORMATE) // Std.form. { nNewKey = nCLOffset + nOffset; - if (!aFTable.Get(nNewKey)) // noch nicht da + if (!aFTable.Get(nNewKey)) // noch nicht da { -// pNewEntry = new SvNumberformat(*pFormat); // Copy reicht nicht !!! +// pNewEntry = new SvNumberformat(*pFormat); // Copy reicht nicht !!! pNewEntry = new SvNumberformat( *pFormat, *pFormatScanner ); if (!aFTable.Insert(nNewKey, pNewEntry)) delete pNewEntry; } - if (nNewKey != nOldKey) // neuer Index + if (nNewKey != nOldKey) // neuer Index { pNewIndex = new sal_uInt32(nNewKey); if (!pMergeTable->Insert(nOldKey,pNewIndex)) delete pNewIndex; } } - else // benutzerdef. + else // benutzerdef. { -// pNewEntry = new SvNumberformat(*pFormat); // Copy reicht nicht !!! +// pNewEntry = new SvNumberformat(*pFormat); // Copy reicht nicht !!! pNewEntry = new SvNumberformat( *pFormat, *pFormatScanner ); nNewKey = ImpIsEntry(pNewEntry->GetFormatstring(), nCLOffset, @@ -2949,7 +2949,7 @@ SvNumberFormatterIndexTable* SvNumberFormatter::MergeFormatter(SvNumberFormatter else pStdFormat->SetLastInsertKey((USHORT) (nNewKey - nCLOffset)); } - if (nNewKey != nOldKey) // neuer Index + if (nNewKey != nOldKey) // neuer Index { pNewIndex = new sal_uInt32(nNewKey); if (!pMergeTable->Insert(nOldKey,pNewIndex)) @@ -2984,11 +2984,11 @@ sal_uInt32 SvNumberFormatter::GetFormatForLanguageIfBuiltIn( sal_uInt32 nFormat, if ( eLnge == LANGUAGE_DONTKNOW ) eLnge = IniLnge; if ( nFormat < SV_COUNTRY_LANGUAGE_OFFSET && eLnge == IniLnge ) - return nFormat; // es bleibt wie es ist - sal_uInt32 nOffset = nFormat % SV_COUNTRY_LANGUAGE_OFFSET; // relativIndex + return nFormat; // es bleibt wie es ist + sal_uInt32 nOffset = nFormat % SV_COUNTRY_LANGUAGE_OFFSET; // relativIndex if ( nOffset > SV_MAX_ANZ_STANDARD_FORMATE ) - return nFormat; // kein eingebautes Format - sal_uInt32 nCLOffset = ImpGenerateCL(eLnge); // ggbf. generieren + return nFormat; // kein eingebautes Format + sal_uInt32 nCLOffset = ImpGenerateCL(eLnge); // ggbf. generieren return nCLOffset + nOffset; } @@ -3001,22 +3001,22 @@ sal_uInt32 SvNumberFormatter::GetFormatIndex( NfIndexTableOffset nTabOff, return NUMBERFORMAT_ENTRY_NOT_FOUND; if ( eLnge == LANGUAGE_DONTKNOW ) eLnge = IniLnge; - sal_uInt32 nCLOffset = ImpGenerateCL(eLnge); // ggbf. generieren + sal_uInt32 nCLOffset = ImpGenerateCL(eLnge); // ggbf. generieren return nCLOffset + theIndexTable[nTabOff]; } NfIndexTableOffset SvNumberFormatter::GetIndexTableOffset( sal_uInt32 nFormat ) const { - sal_uInt32 nOffset = nFormat % SV_COUNTRY_LANGUAGE_OFFSET; // relativIndex + sal_uInt32 nOffset = nFormat % SV_COUNTRY_LANGUAGE_OFFSET; // relativIndex if ( nOffset > SV_MAX_ANZ_STANDARD_FORMATE ) - return NF_INDEX_TABLE_ENTRIES; // kein eingebautes Format + return NF_INDEX_TABLE_ENTRIES; // kein eingebautes Format for ( USHORT j = 0; j < NF_INDEX_TABLE_ENTRIES; j++ ) { if ( theIndexTable[j] == nOffset ) return (NfIndexTableOffset) j; } - return NF_INDEX_TABLE_ENTRIES; // bad luck + return NF_INDEX_TABLE_ENTRIES; // bad luck } @@ -3223,13 +3223,13 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultCurrencyFormat() if ( pEntry->IsStandard() && (pEntry->GetType() & NUMBERFORMAT_CURRENCY) ) { nDefaultCurrencyFormat = nKey; - break; // while + break; // while } aFTable.Next(); } if ( nDefaultCurrencyFormat == NUMBERFORMAT_ENTRY_NOT_FOUND ) - { // none found, create one + { // none found, create one xub_StrLen nCheck; short nType; NfWSStringsDtor aCurrList; @@ -3250,7 +3250,7 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultCurrencyFormat() if ( nDefaultCurrencyFormat == NUMBERFORMAT_ENTRY_NOT_FOUND ) nDefaultCurrencyFormat = CLOffset + ZF_STANDARD_CURRENCY+3; else - { // mark as standard so that it is found next time + { // mark as standard so that it is found next time SvNumberformat* pEntry = aFTable.Get( nDefaultCurrencyFormat ); if ( pEntry ) pEntry->SetStandard(); @@ -3291,13 +3291,13 @@ inline if ( pFoundEntry && pFoundEntry != pData ) { pFoundEntry = NULL; - return FALSE; // break loop, not unique + return FALSE; // break loop, not unique } if ( nPos == 0 ) - { // first entry is SYSTEM + { // first entry is SYSTEM pFoundEntry = MatchSystemCurrency(); if ( pFoundEntry ) - return FALSE; // break loop + return FALSE; // break loop // even if there are more matching entries // this one is propably the one we are looking for else @@ -3341,7 +3341,7 @@ BOOL SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat, } } if ( !rStr.Len() ) - { // analog zu BuildSymbolString + { // analog zu BuildSymbolString rStr = '['; rStr += '$'; if ( aSymbol.Search( '-' ) != STRING_NOTFOUND || @@ -3478,20 +3478,20 @@ void SvNumberFormatter::GetCompatibilityCurrency( String& rSymbol, String& rAbbr void lcl_CheckCurrencySymbolPosition( const NfCurrencyEntry& rCurr ) { - short nPos = -1; // -1:=unknown, 0:=vorne, 1:=hinten + short nPos = -1; // -1:=unknown, 0:=vorne, 1:=hinten short nNeg = -1; switch ( rCurr.GetPositiveFormat() ) { - case 0: // $1 + case 0: // $1 nPos = 0; break; - case 1: // 1$ + case 1: // 1$ nPos = 1; break; - case 2: // $ 1 + case 2: // $ 1 nPos = 0; break; - case 3: // 1 $ + case 3: // 1 $ nPos = 1; break; default: @@ -3501,34 +3501,34 @@ void lcl_CheckCurrencySymbolPosition( const NfCurrencyEntry& rCurr ) } switch ( rCurr.GetNegativeFormat() ) { - case 0: // ($1) + case 0: // ($1) nNeg = 0; break; - case 1: // -$1 + case 1: // -$1 nNeg = 0; break; - case 2: // $-1 + case 2: // $-1 nNeg = 0; break; - case 3: // $1- + case 3: // $1- nNeg = 0; break; - case 4: // (1$) + case 4: // (1$) nNeg = 1; break; - case 5: // -1$ + case 5: // -1$ nNeg = 1; break; - case 6: // 1-$ + case 6: // 1-$ nNeg = 1; break; - case 7: // 1$- + case 7: // 1$- nNeg = 1; break; - case 8: // -1 $ + case 8: // -1 $ nNeg = 1; break; - case 9: // -$ 1 + case 9: // -$ 1 nNeg = 0; break; case 10: // 1 $- @@ -3537,16 +3537,16 @@ void lcl_CheckCurrencySymbolPosition( const NfCurrencyEntry& rCurr ) case 11: // $ -1 nNeg = 0; break; - case 12 : // $ 1- + case 12 : // $ 1- nNeg = 0; break; - case 13 : // 1- $ + case 13 : // 1- $ nNeg = 1; break; - case 14 : // ($ 1) + case 14 : // ($ 1) nNeg = 0; break; - case 15 : // (1 $) + case 15 : // (1 $) nNeg = 1; break; default: @@ -3580,7 +3580,7 @@ void SvNumberFormatter::ImpInitCurrencyTable() // racing condition possible: // ::osl::MutexGuard aGuard( GetMutex() ); // while ( !bCurrencyTableInitialized ) - // ImpInitCurrencyTable(); + // ImpInitCurrencyTable(); static BOOL bInitializing = FALSE; if ( bCurrencyTableInitialized || bInitializing ) return ; @@ -3725,7 +3725,7 @@ USHORT SvNumberFormatter::GetCurrencyFormatStrings( NfWSStringsDtor& rStrArr, { USHORT nDefault = 0; if ( bBank ) - { // nur Bankensymbole + { // nur Bankensymbole String aPositiveBank, aNegativeBank; rCurr.BuildPositiveFormatString( aPositiveBank, TRUE, *xLocaleData, 1 ); rCurr.BuildNegativeFormatString( aNegativeBank, TRUE, *xLocaleData, 1 ); @@ -3748,7 +3748,7 @@ USHORT SvNumberFormatter::GetCurrencyFormatStrings( NfWSStringsDtor& rStrArr, nDefault = rStrArr.Count() - 1; } else - { // gemischte Formate wie in SvNumberFormatter::ImpGenerateFormats + { // gemischte Formate wie in SvNumberFormatter::ImpGenerateFormats // aber keine doppelten, wenn keine Nachkommastellen in Waehrung String aPositive, aNegative, aPositiveNoDec, aNegativeNoDec, aPositiveDashed, aNegativeDashed; @@ -3814,7 +3814,7 @@ USHORT SvNumberFormatter::GetCurrencyFormatStrings( NfWSStringsDtor& rStrArr, //--- NfCurrencyEntry ---------------------------------------------------- NfCurrencyEntry::NfCurrencyEntry() - : eLanguage( LANGUAGE_DONTKNOW ), + : eLanguage( LANGUAGE_DONTKNOW ), nPositiveFormat(3), nNegativeFormat(8), nDigits(2), @@ -3825,34 +3825,34 @@ NfCurrencyEntry::NfCurrencyEntry() NfCurrencyEntry::NfCurrencyEntry( const LocaleDataWrapper& rLocaleData, LanguageType eLang ) { - aSymbol = rLocaleData.getCurrSymbol(); - aBankSymbol = rLocaleData.getCurrBankSymbol(); - eLanguage = eLang; - nPositiveFormat = rLocaleData.getCurrPositiveFormat(); - nNegativeFormat = rLocaleData.getCurrNegativeFormat(); - nDigits = rLocaleData.getCurrDigits(); - cZeroChar = rLocaleData.getCurrZeroChar(); + aSymbol = rLocaleData.getCurrSymbol(); + aBankSymbol = rLocaleData.getCurrBankSymbol(); + eLanguage = eLang; + nPositiveFormat = rLocaleData.getCurrPositiveFormat(); + nNegativeFormat = rLocaleData.getCurrNegativeFormat(); + nDigits = rLocaleData.getCurrDigits(); + cZeroChar = rLocaleData.getCurrZeroChar(); } NfCurrencyEntry::NfCurrencyEntry( const ::com::sun::star::i18n::Currency & rCurr, const LocaleDataWrapper& rLocaleData, LanguageType eLang ) { - aSymbol = rCurr.Symbol; - aBankSymbol = rCurr.BankSymbol; - eLanguage = eLang; - nPositiveFormat = rLocaleData.getCurrPositiveFormat(); - nNegativeFormat = rLocaleData.getCurrNegativeFormat(); + aSymbol = rCurr.Symbol; + aBankSymbol = rCurr.BankSymbol; + eLanguage = eLang; + nPositiveFormat = rLocaleData.getCurrPositiveFormat(); + nNegativeFormat = rLocaleData.getCurrNegativeFormat(); nDigits = rCurr.DecimalPlaces; - cZeroChar = rLocaleData.getCurrZeroChar(); + cZeroChar = rLocaleData.getCurrZeroChar(); } BOOL NfCurrencyEntry::operator==( const NfCurrencyEntry& r ) const { - return aSymbol == r.aSymbol - && aBankSymbol == r.aBankSymbol - && eLanguage == r.eLanguage + return aSymbol == r.aSymbol + && aBankSymbol == r.aBankSymbol + && eLanguage == r.eLanguage ; } @@ -3861,11 +3861,11 @@ void NfCurrencyEntry::SetEuro() { aSymbol = NfCurrencyEntry::GetEuroSymbol(); aBankSymbol.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "EUR" ) ); - eLanguage = LANGUAGE_DONTKNOW; - nPositiveFormat = 3; - nNegativeFormat = 8; - nDigits = 2; - cZeroChar = '0'; + eLanguage = LANGUAGE_DONTKNOW; + nPositiveFormat = 3; + nNegativeFormat = 8; + nDigits = 2; + cZeroChar = '0'; } @@ -3880,9 +3880,9 @@ BOOL NfCurrencyEntry::IsEuro() const void NfCurrencyEntry::ApplyVariableInformation( const NfCurrencyEntry& r ) { - nPositiveFormat = r.nPositiveFormat; - nNegativeFormat = r.nNegativeFormat; - cZeroChar = r.cZeroChar; + nPositiveFormat = r.nPositiveFormat; + nNegativeFormat = r.nNegativeFormat; + cZeroChar = r.cZeroChar; } @@ -3970,13 +3970,13 @@ void NfCurrencyEntry::CompletePositiveFormatString( String& rStr, { switch( nPositiveFormat ) { - case 0: // $1 + case 0: // $1 rStr.Insert( rSymStr , 0 ); break; - case 1: // 1$ + case 1: // 1$ rStr += rSymStr; break; - case 2: // $ 1 + case 2: // $ 1 { rStr.Insert( ' ', 0 ); rStr.Insert( rSymStr, 0 ); @@ -4001,64 +4001,64 @@ void NfCurrencyEntry::CompleteNegativeFormatString( String& rStr, { switch( nNegativeFormat ) { - case 0: // ($1) + case 0: // ($1) { rStr.Insert( rSymStr, 0); rStr.Insert('(',0); rStr += ')'; } break; - case 1: // -$1 + case 1: // -$1 { rStr.Insert( rSymStr, 0); rStr.Insert('-',0); } break; - case 2: // $-1 + case 2: // $-1 { rStr.Insert('-',0); rStr.Insert( rSymStr, 0); } break; - case 3: // $1- + case 3: // $1- { rStr.Insert( rSymStr, 0); rStr += '-'; } break; - case 4: // (1$) + case 4: // (1$) { rStr.Insert('(',0); rStr += rSymStr; rStr += ')'; } break; - case 5: // -1$ + case 5: // -1$ { rStr += rSymStr; rStr.Insert('-',0); } break; - case 6: // 1-$ + case 6: // 1-$ { rStr += '-'; rStr += rSymStr; } break; - case 7: // 1$- + case 7: // 1$- { rStr += rSymStr; rStr += '-'; } break; - case 8: // -1 $ + case 8: // -1 $ { rStr += ' '; rStr += rSymStr; rStr.Insert('-',0); } break; - case 9: // -$ 1 + case 9: // -$ 1 { rStr.Insert(' ',0); rStr.Insert( rSymStr, 0); @@ -4080,21 +4080,21 @@ void NfCurrencyEntry::CompleteNegativeFormatString( String& rStr, rStr.Insert( aTmp, 0 ); } break; - case 12 : // $ 1- + case 12 : // $ 1- { rStr.Insert(' ', 0); rStr.Insert( rSymStr, 0); rStr += '-'; } break; - case 13 : // 1- $ + case 13 : // 1- $ { rStr += '-'; rStr += ' '; rStr += rSymStr; } break; - case 14 : // ($ 1) + case 14 : // ($ 1) { rStr.Insert(' ',0); rStr.Insert( rSymStr, 0); @@ -4102,7 +4102,7 @@ void NfCurrencyEntry::CompleteNegativeFormatString( String& rStr, rStr += ')'; } break; - case 15 : // (1 $) + case 15 : // (1 $) { rStr.Insert('(',0); rStr += ' '; @@ -4131,13 +4131,13 @@ USHORT NfCurrencyEntry::GetEffectivePositiveFormat( USHORT #else switch ( nIntlFormat ) { - case 0: // $1 + case 0: // $1 nIntlFormat = 2; // $ 1 break; - case 1: // 1$ + case 1: // 1$ nIntlFormat = 3; // 1 $ break; - case 2: // $ 1 + case 2: // $ 1 break; case 3: // 1 $ break; @@ -4156,30 +4156,30 @@ USHORT NfCurrencyEntry::GetEffectivePositiveFormat( USHORT // nur aufrufen, wenn nCurrFormat wirklich mit Klammern ist USHORT lcl_MergeNegativeParenthesisFormat( USHORT nIntlFormat, USHORT nCurrFormat ) { - short nSign = 0; // -1:=Klammer 0:=links, 1:=mitte, 2:=rechts + short nSign = 0; // -1:=Klammer 0:=links, 1:=mitte, 2:=rechts switch ( nIntlFormat ) { - case 0: // ($1) - case 4: // (1$) - case 14 : // ($ 1) - case 15 : // (1 $) + case 0: // ($1) + case 4: // (1$) + case 14 : // ($ 1) + case 15 : // (1 $) return nCurrFormat; - case 1: // -$1 - case 5: // -1$ - case 8: // -1 $ - case 9: // -$ 1 + case 1: // -$1 + case 5: // -1$ + case 8: // -1 $ + case 9: // -$ 1 nSign = 0; break; - case 2: // $-1 - case 6: // 1-$ - case 11 : // $ -1 - case 13 : // 1- $ + case 2: // $-1 + case 6: // 1-$ + case 11 : // $ -1 + case 13 : // 1- $ nSign = 1; break; - case 3: // $1- - case 7: // 1$- + case 3: // $1- + case 7: // 1$- case 10: // 1 $- - case 12 : // $ 1- + case 12 : // $ 1- nSign = 2; break; default: @@ -4189,7 +4189,7 @@ USHORT lcl_MergeNegativeParenthesisFormat( USHORT nIntlFormat, USHORT nCurrForma switch ( nCurrFormat ) { - case 0: // ($1) + case 0: // ($1) switch ( nSign ) { case 0: @@ -4200,7 +4200,7 @@ USHORT lcl_MergeNegativeParenthesisFormat( USHORT nIntlFormat, USHORT nCurrForma return 3; // $1- } break; - case 4: // (1$) + case 4: // (1$) switch ( nSign ) { case 0: @@ -4211,7 +4211,7 @@ USHORT lcl_MergeNegativeParenthesisFormat( USHORT nIntlFormat, USHORT nCurrForma return 7; // 1$- } break; - case 14 : // ($ 1) + case 14 : // ($ 1) switch ( nSign ) { case 0: @@ -4222,7 +4222,7 @@ USHORT lcl_MergeNegativeParenthesisFormat( USHORT nIntlFormat, USHORT nCurrForma return 12; // $ 1- } break; - case 15 : // (1 $) + case 15 : // (1 $) switch ( nSign ) { case 0: @@ -4249,50 +4249,50 @@ USHORT NfCurrencyEntry::GetEffectiveNegativeFormat( USHORT nIntlFormat, #else switch ( nIntlFormat ) { - case 0: // ($1) -// nIntlFormat = 14; // ($ 1) + case 0: // ($1) +// nIntlFormat = 14; // ($ 1) nIntlFormat = 9; // -$ 1 break; - case 1: // -$1 + case 1: // -$1 nIntlFormat = 9; // -$ 1 break; - case 2: // $-1 + case 2: // $-1 nIntlFormat = 11; // $ -1 break; - case 3: // $1- + case 3: // $1- nIntlFormat = 12; // $ 1- break; - case 4: // (1$) -// nIntlFormat = 15; // (1 $) + case 4: // (1$) +// nIntlFormat = 15; // (1 $) nIntlFormat = 8; // -1 $ break; - case 5: // -1$ + case 5: // -1$ nIntlFormat = 8; // -1 $ break; - case 6: // 1-$ + case 6: // 1-$ nIntlFormat = 13; // 1- $ break; - case 7: // 1$- + case 7: // 1$- nIntlFormat = 10; // 1 $- break; - case 8: // -1 $ + case 8: // -1 $ break; - case 9: // -$ 1 + case 9: // -$ 1 break; case 10: // 1 $- break; case 11: // $ -1 break; - case 12 : // $ 1- + case 12 : // $ 1- break; - case 13 : // 1- $ + case 13 : // 1- $ break; - case 14 : // ($ 1) -// nIntlFormat = 14; // ($ 1) + case 14 : // ($ 1) +// nIntlFormat = 14; // ($ 1) nIntlFormat = 9; // -$ 1 break; - case 15 : // (1 $) -// nIntlFormat = 15; // (1 $) + case 15 : // (1 $) +// nIntlFormat = 15; // (1 $) nIntlFormat = 8; // -1 $ break; default: @@ -4305,36 +4305,36 @@ USHORT NfCurrencyEntry::GetEffectiveNegativeFormat( USHORT nIntlFormat, { switch ( nCurrFormat ) { - case 0: // ($1) + case 0: // ($1) nIntlFormat = lcl_MergeNegativeParenthesisFormat( nIntlFormat, nCurrFormat ); break; - case 1: // -$1 + case 1: // -$1 nIntlFormat = nCurrFormat; break; - case 2: // $-1 + case 2: // $-1 nIntlFormat = nCurrFormat; break; - case 3: // $1- + case 3: // $1- nIntlFormat = nCurrFormat; break; - case 4: // (1$) + case 4: // (1$) nIntlFormat = lcl_MergeNegativeParenthesisFormat( nIntlFormat, nCurrFormat ); break; - case 5: // -1$ + case 5: // -1$ nIntlFormat = nCurrFormat; break; - case 6: // 1-$ + case 6: // 1-$ nIntlFormat = nCurrFormat; break; - case 7: // 1$- + case 7: // 1$- nIntlFormat = nCurrFormat; break; - case 8: // -1 $ + case 8: // -1 $ nIntlFormat = nCurrFormat; break; - case 9: // -$ 1 + case 9: // -$ 1 nIntlFormat = nCurrFormat; break; case 10: // 1 $- @@ -4343,17 +4343,17 @@ USHORT NfCurrencyEntry::GetEffectiveNegativeFormat( USHORT nIntlFormat, case 11: // $ -1 nIntlFormat = nCurrFormat; break; - case 12 : // $ 1- + case 12 : // $ 1- nIntlFormat = nCurrFormat; break; - case 13 : // 1- $ + case 13 : // 1- $ nIntlFormat = nCurrFormat; break; - case 14 : // ($ 1) + case 14 : // ($ 1) nIntlFormat = lcl_MergeNegativeParenthesisFormat( nIntlFormat, nCurrFormat ); break; - case 15 : // (1 $) + case 15 : // (1 $) nIntlFormat = lcl_MergeNegativeParenthesisFormat( nIntlFormat, nCurrFormat ); break; @@ -4372,23 +4372,23 @@ sal_Char NfCurrencyEntry::GetEuroSymbol( rtl_TextEncoding eTextEncoding ) { switch ( eTextEncoding ) { - case RTL_TEXTENCODING_MS_1252 : // WNT Ansi - case RTL_TEXTENCODING_ISO_8859_1 : // UNX for use with TrueType fonts + case RTL_TEXTENCODING_MS_1252 : // WNT Ansi + case RTL_TEXTENCODING_ISO_8859_1 : // UNX for use with TrueType fonts return '\x80'; - case RTL_TEXTENCODING_ISO_8859_15 : // UNX real + case RTL_TEXTENCODING_ISO_8859_15 : // UNX real return '\xA4'; - case RTL_TEXTENCODING_IBM_850 : // OS2 + case RTL_TEXTENCODING_IBM_850 : // OS2 return '\xD5'; - case RTL_TEXTENCODING_APPLE_ROMAN : // MAC + case RTL_TEXTENCODING_APPLE_ROMAN : // MAC return '\xDB'; - default: // default system + default: // default system #if WNT return '\x80'; #elif OS2 return '\xD5'; #elif UNX -// return '\xA4'; // #56121# 0xA4 waere korrekt fuer iso-8859-15 - return '\x80'; // aber Windoze-Code fuer die konvertierten TrueType-Fonts +// return '\xA4'; // #56121# 0xA4 waere korrekt fuer iso-8859-15 + return '\x80'; // aber Windoze-Code fuer die konvertierten TrueType-Fonts #else #error EuroSymbol is what? return '\x80'; diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 97f06171a4fc..492702ba885a 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -1823,8 +1823,8 @@ void SvNumberformat::ImpGetOutputStdToPrecision(double& rNumber, String& rOutStr rtl_math_StringFormat_G, -3, '.', sal_True ); } #endif - - // We decided to strip trailing zeros unconditionally, since binary + + // We decided to strip trailing zeros unconditionally, since binary // double-precision rounding error makes it impossible to determine e.g. // whether 844.10000000000002273737 is what the user has typed, or the // user has typed 844.1 but IEEE 754 represents it that way internally. @@ -2085,7 +2085,7 @@ BOOL SvNumberformat::GetOutputString(double fNumber, xub_StrLen nLen = OutString.Len(); if (!nLen) return false; - + // #i112250# With the 10-decimal limit, small numbers are formatted as "0". // Switch to scientific in that case, too: if (nLen > 11 || (OutString.EqualsAscii("0") && fNumber != 0.0)) diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx index fb59e4289ad1..c88c6c2ae3cf 100644 --- a/svl/source/numbers/zforscan.cxx +++ b/svl/source/numbers/zforscan.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,7 +50,7 @@ using namespace svt; const sal_Unicode cNonBreakingSpace = 0xA0; -namespace +namespace { struct ImplEnglishColors { @@ -83,20 +83,20 @@ ImpSvNumberformatScan::ImpSvNumberformatScan( SvNumberFormatter* pFormatterP ) pFormatter = pFormatterP; bConvertMode = FALSE; //! All keywords MUST be UPPERCASE! - sKeyword[NF_KEY_E].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "E" ) ); // Exponent - sKeyword[NF_KEY_AMPM].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "AM/PM" ) ); // AM/PM - sKeyword[NF_KEY_AP].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "A/P" ) ); // AM/PM short - sKeyword[NF_KEY_MI].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "M" ) ); // Minute - sKeyword[NF_KEY_MMI].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "MM" ) ); // Minute 02 - sKeyword[NF_KEY_S].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "S" ) ); // Second - sKeyword[NF_KEY_SS].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "SS" ) ); // Second 02 - sKeyword[NF_KEY_Q].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "Q" ) ); // Quarter short 'Q' - sKeyword[NF_KEY_QQ].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "QQ" ) ); // Quarter long - sKeyword[NF_KEY_NN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "NN" ) ); // Day of week short - sKeyword[NF_KEY_NNN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "NNN" ) ); // Day of week long - sKeyword[NF_KEY_NNNN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "NNNN" ) ); // Day of week long incl. separator - sKeyword[NF_KEY_WW].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "WW" ) ); // Week of year - sKeyword[NF_KEY_CCC].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "CCC" ) ); // Currency abbreviation + sKeyword[NF_KEY_E].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "E" ) ); // Exponent + sKeyword[NF_KEY_AMPM].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "AM/PM" ) ); // AM/PM + sKeyword[NF_KEY_AP].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "A/P" ) ); // AM/PM short + sKeyword[NF_KEY_MI].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "M" ) ); // Minute + sKeyword[NF_KEY_MMI].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "MM" ) ); // Minute 02 + sKeyword[NF_KEY_S].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "S" ) ); // Second + sKeyword[NF_KEY_SS].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "SS" ) ); // Second 02 + sKeyword[NF_KEY_Q].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "Q" ) ); // Quarter short 'Q' + sKeyword[NF_KEY_QQ].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "QQ" ) ); // Quarter long + sKeyword[NF_KEY_NN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "NN" ) ); // Day of week short + sKeyword[NF_KEY_NNN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "NNN" ) ); // Day of week long + sKeyword[NF_KEY_NNNN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "NNNN" ) ); // Day of week long incl. separator + sKeyword[NF_KEY_WW].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "WW" ) ); // Week of year + sKeyword[NF_KEY_CCC].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "CCC" ) ); // Currency abbreviation bKeywordsNeedInit = TRUE; // locale dependent keywords bCompatCurNeedInit = TRUE; // locale dependent compatibility currency strings @@ -247,15 +247,15 @@ void ImpSvNumberformatScan::SetDependentKeywords() sKeyword[NF_KEY_GENERAL] = pCharClass->upper( sNameStandardFormat ); // preset new calendar keywords - sKeyword[NF_KEY_AAA].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "AAA" ) ); - sKeyword[NF_KEY_AAAA].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "AAAA" ) ); - sKeyword[NF_KEY_EC].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "E" ) ); - sKeyword[NF_KEY_EEC].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "EE" ) ); - sKeyword[NF_KEY_G].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "G" ) ); - sKeyword[NF_KEY_GG].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "GG" ) ); - sKeyword[NF_KEY_GGG].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "GGG" ) ); - sKeyword[NF_KEY_R].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "R" ) ); - sKeyword[NF_KEY_RR].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "RR" ) ); + sKeyword[NF_KEY_AAA].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "AAA" ) ); + sKeyword[NF_KEY_AAAA].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "AAAA" ) ); + sKeyword[NF_KEY_EC].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "E" ) ); + sKeyword[NF_KEY_EEC].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "EE" ) ); + sKeyword[NF_KEY_G].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "G" ) ); + sKeyword[NF_KEY_GG].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "GG" ) ); + sKeyword[NF_KEY_GGG].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "GGG" ) ); + sKeyword[NF_KEY_R].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "R" ) ); + sKeyword[NF_KEY_RR].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "RR" ) ); // Thai T NatNum special. Other locale's small letter 't' results in upper // case comparison not matching but length does in conversion mode. Ugly. @@ -273,31 +273,31 @@ void ImpSvNumberformatScan::SetDependentKeywords() case LANGUAGE_GERMAN_LIECHTENSTEIN: { //! all capital letters - sKeyword[NF_KEY_M].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "M" ) ); // month 1 - sKeyword[NF_KEY_MM].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "MM" ) ); // month 01 - sKeyword[NF_KEY_MMM].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "MMM" ) ); // month Jan - sKeyword[NF_KEY_MMMM].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "MMMM" ) ); // month Januar - sKeyword[NF_KEY_MMMMM].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "MMMMM" ) );// month J - sKeyword[NF_KEY_H].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "H" ) ); // hour 2 - sKeyword[NF_KEY_HH].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "HH" ) ); // hour 02 - sKeyword[NF_KEY_D].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "T" ) ); - sKeyword[NF_KEY_DD].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "TT" ) ); - sKeyword[NF_KEY_DDD].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "TTT" ) ); - sKeyword[NF_KEY_DDDD].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "TTTT" ) ); - sKeyword[NF_KEY_YY].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "JJ" ) ); - sKeyword[NF_KEY_YYYY].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "JJJJ" ) ); - sKeyword[NF_KEY_BOOLEAN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "LOGISCH" ) ); - sKeyword[NF_KEY_COLOR].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "FARBE" ) ); - sKeyword[NF_KEY_BLACK].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "SCHWARZ" ) ); - sKeyword[NF_KEY_BLUE].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "BLAU" ) ); + sKeyword[NF_KEY_M].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "M" ) ); // month 1 + sKeyword[NF_KEY_MM].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "MM" ) ); // month 01 + sKeyword[NF_KEY_MMM].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "MMM" ) ); // month Jan + sKeyword[NF_KEY_MMMM].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "MMMM" ) ); // month Januar + sKeyword[NF_KEY_MMMMM].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "MMMMM" ) );// month J + sKeyword[NF_KEY_H].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "H" ) ); // hour 2 + sKeyword[NF_KEY_HH].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "HH" ) ); // hour 02 + sKeyword[NF_KEY_D].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "T" ) ); + sKeyword[NF_KEY_DD].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "TT" ) ); + sKeyword[NF_KEY_DDD].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "TTT" ) ); + sKeyword[NF_KEY_DDDD].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "TTTT" ) ); + sKeyword[NF_KEY_YY].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "JJ" ) ); + sKeyword[NF_KEY_YYYY].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "JJJJ" ) ); + sKeyword[NF_KEY_BOOLEAN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "LOGISCH" ) ); + sKeyword[NF_KEY_COLOR].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "FARBE" ) ); + sKeyword[NF_KEY_BLACK].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "SCHWARZ" ) ); + sKeyword[NF_KEY_BLUE].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "BLAU" ) ); sKeyword[NF_KEY_GREEN] = UniString( "GR" "\xDC" "N", RTL_TEXTENCODING_ISO_8859_1 ); - sKeyword[NF_KEY_CYAN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "CYAN" ) ); - sKeyword[NF_KEY_RED].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "ROT" ) ); - sKeyword[NF_KEY_MAGENTA].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "MAGENTA" ) ); - sKeyword[NF_KEY_BROWN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "BRAUN" ) ); - sKeyword[NF_KEY_GREY].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "GRAU" ) ); - sKeyword[NF_KEY_YELLOW].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "GELB" ) ); - sKeyword[NF_KEY_WHITE].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "WEISS" ) ); + sKeyword[NF_KEY_CYAN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "CYAN" ) ); + sKeyword[NF_KEY_RED].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "ROT" ) ); + sKeyword[NF_KEY_MAGENTA].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "MAGENTA" ) ); + sKeyword[NF_KEY_BROWN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "BRAUN" ) ); + sKeyword[NF_KEY_GREY].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "GRAU" ) ); + sKeyword[NF_KEY_YELLOW].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "GELB" ) ); + sKeyword[NF_KEY_WHITE].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "WEISS" ) ); } break; default: @@ -321,7 +321,7 @@ void ImpSvNumberformatScan::SetDependentKeywords() case LANGUAGE_FRENCH_CANADIAN : case LANGUAGE_FRENCH_SWISS : case LANGUAGE_FRENCH_LUXEMBOURG : - case LANGUAGE_FRENCH_MONACO : + case LANGUAGE_FRENCH_MONACO : sKeyword[NF_KEY_D].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "J" ) ); sKeyword[NF_KEY_DD].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "JJ" ) ); sKeyword[NF_KEY_DDD].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "JJJ" ) ); @@ -366,7 +366,7 @@ void ImpSvNumberformatScan::SetDependentKeywords() case LANGUAGE_FRENCH_CANADIAN : case LANGUAGE_FRENCH_SWISS : case LANGUAGE_FRENCH_LUXEMBOURG : - case LANGUAGE_FRENCH_MONACO : + case LANGUAGE_FRENCH_MONACO : case LANGUAGE_PORTUGUESE : case LANGUAGE_PORTUGUESE_BRAZILIAN : case LANGUAGE_SPANISH_MODERN : @@ -392,8 +392,8 @@ void ImpSvNumberformatScan::SetDependentKeywords() sKeyword[NF_KEY_YY].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "AA" ) ); sKeyword[NF_KEY_YYYY].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "AAAA" ) ); // must exchange the day of week name code, same as Xcl - sKeyword[NF_KEY_AAA].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "OOO" ) ); - sKeyword[NF_KEY_AAAA].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "OOOO" ) ); + sKeyword[NF_KEY_AAA].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "OOO" ) ); + sKeyword[NF_KEY_AAAA].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "OOOO" ) ); break; case LANGUAGE_DUTCH : case LANGUAGE_DUTCH_BELGIAN : @@ -433,17 +433,17 @@ void ImpSvNumberformatScan::SetDependentKeywords() // boolean sKeyword[NF_KEY_BOOLEAN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "BOOLEAN" ) ); // colours - sKeyword[NF_KEY_COLOR].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "COLOR" ) ); - sKeyword[NF_KEY_BLACK].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "BLACK" ) ); - sKeyword[NF_KEY_BLUE].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "BLUE" ) ); - sKeyword[NF_KEY_GREEN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "GREEN" ) ); - sKeyword[NF_KEY_CYAN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "CYAN" ) ); - sKeyword[NF_KEY_RED].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "RED" ) ); - sKeyword[NF_KEY_MAGENTA].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "MAGENTA" ) ); - sKeyword[NF_KEY_BROWN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "BROWN" ) ); - sKeyword[NF_KEY_GREY].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "GREY" ) ); - sKeyword[NF_KEY_YELLOW].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "YELLOW" ) ); - sKeyword[NF_KEY_WHITE].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "WHITE" ) ); + sKeyword[NF_KEY_COLOR].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "COLOR" ) ); + sKeyword[NF_KEY_BLACK].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "BLACK" ) ); + sKeyword[NF_KEY_BLUE].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "BLUE" ) ); + sKeyword[NF_KEY_GREEN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "GREEN" ) ); + sKeyword[NF_KEY_CYAN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "CYAN" ) ); + sKeyword[NF_KEY_RED].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "RED" ) ); + sKeyword[NF_KEY_MAGENTA].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "MAGENTA" ) ); + sKeyword[NF_KEY_BROWN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "BROWN" ) ); + sKeyword[NF_KEY_GREY].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "GREY" ) ); + sKeyword[NF_KEY_YELLOW].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "YELLOW" ) ); + sKeyword[NF_KEY_WHITE].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "WHITE" ) ); } break; } @@ -488,7 +488,7 @@ Color* ImpSvNumberformatScan::GetColor(String& sStr) if ( j < NF_MAX_DEFAULT_COLORS ) i = j; } - + Color* pResult = NULL; if (i >= NF_MAX_DEFAULT_COLORS) { @@ -557,12 +557,12 @@ short ImpSvNumberformatScan::GetKeyWord( const String& sSymbol, xub_StrLen nPos } // new keywords take precedence over old keywords if ( !bFound ) - { // skip the gap of colors et al between new and old keywords and search on + { // skip the gap of colors et al between new and old keywords and search on i = NF_KEY_LASTKEYWORD; while ( i > 0 && sString.Search(pKeyword[i]) != 0 ) i--; if ( i > NF_KEY_LASTOLDKEYWORD && sString != pKeyword[i] ) - { // found something, but maybe it's something else? + { // found something, but maybe it's something else? // e.g. new NNN is found in NNNN, for NNNN we must search on short j = i - 1; while ( j > 0 && sString.Search(pKeyword[j]) != 0 ) @@ -576,7 +576,7 @@ short ImpSvNumberformatScan::GetKeyWord( const String& sSymbol, xub_StrLen nPos LANGUAGE_ENGLISH_US && MsLangId::getRealLanguage( eNewLnge) == LANGUAGE_THAI) i = NF_KEY_THAI_T; - return i; // 0 => not found + return i; // 0 => not found } //--------------------------------------------------------------------------- @@ -778,13 +778,13 @@ short ImpSvNumberformatScan::Next_Symbol( const String& rStr, switch ( cNext ) { case '+' : - case '-' : // E+ E- combine to one symbol + case '-' : // E+ E- combine to one symbol sSymbol += cNext; eType = NF_KEY_E; nPos++; break; case '0' : - case '#' : // scientific E without sign + case '#' : // scientific E without sign eType = NF_KEY_E; break; } @@ -830,7 +830,7 @@ short ImpSvNumberformatScan::Next_Symbol( const String& rStr, { short nTmpType = GetKeyWord( rStr, nPos-1 ); if ( nTmpType ) - { // beginning of keyword, stop scan and put back + { // beginning of keyword, stop scan and put back eType = NF_SYMBOLTYPE_STRING; eState = SsStop; nPos--; @@ -843,7 +843,7 @@ short ImpSvNumberformatScan::Next_Symbol( const String& rStr, BOOL bDontStop = FALSE; switch (cToken) { - case '/': // AM/PM, A/P + case '/': // AM/PM, A/P { sal_Unicode cNext = rStr.GetChar(nPos); if ( cNext == 'P' || cNext == 'p' ) @@ -876,7 +876,7 @@ short ImpSvNumberformatScan::Next_Symbol( const String& rStr, { eState = SsStop; sSymbol += cToken; - nRepPos = (nPos - nStart) - 1; // everytime > 0!! + nRepPos = (nPos - nStart) - 1; // everytime > 0!! } break; case SsGetBlank: @@ -887,8 +887,8 @@ short ImpSvNumberformatScan::Next_Symbol( const String& rStr, break; default: break; - } // of switch - } // of while + } // of switch + } // of while if (eState == SsGetWord) eType = NF_SYMBOLTYPE_STRING; return eType; @@ -912,20 +912,20 @@ xub_StrLen ImpSvNumberformatScan::Symbol_Division(const String& rString) sal_Unicode c; if ( nCPos == 0 || ((c = sString.GetChar(xub_StrLen(nCPos-1))) != '"' - && c != '\\') ) // dm kann durch "dm - { // \d geschuetzt werden + && c != '\\') ) // dm kann durch "dm + { // \d geschuetzt werden nCurrPos = nCPos; - nCPos = STRING_NOTFOUND; // Abbruch + nCPos = STRING_NOTFOUND; // Abbruch } else - nCPos++; // weitersuchen + nCPos++; // weitersuchen } else - nCPos = nQ + 1; // weitersuchen + nCPos = nQ + 1; // weitersuchen } } nAnzStrings = 0; - BOOL bStar = FALSE; // wird bei '*'Detektion gesetzt + BOOL bStar = FALSE; // wird bei '*'Detektion gesetzt Reset(); xub_StrLen nPos = 0; @@ -934,16 +934,16 @@ xub_StrLen ImpSvNumberformatScan::Symbol_Division(const String& rString) { nTypeArray[nAnzStrings] = Next_Symbol(rString, nPos, sStrArray[nAnzStrings]); if (nTypeArray[nAnzStrings] == NF_SYMBOLTYPE_STAR) - { // Ueberwachung des '*' + { // Ueberwachung des '*' if (bStar) - return nPos; // Fehler: doppelter '*' + return nPos; // Fehler: doppelter '*' else bStar = TRUE; } nAnzStrings++; } - return 0; // 0 => ok + return 0; // 0 => ok } void ImpSvNumberformatScan::SkipStrings(USHORT& i, xub_StrLen& nPos) @@ -1005,7 +1005,7 @@ sal_Unicode ImpSvNumberformatScan::PreviousChar(USHORT i) if (i > 0 && i < nAnzStrings) { i--; - while (i > 0 && ( nTypeArray[i] == NF_SYMBOLTYPE_EMPTY + while (i > 0 && ( nTypeArray[i] == NF_SYMBOLTYPE_EMPTY || nTypeArray[i] == NF_SYMBOLTYPE_STRING || nTypeArray[i] == NF_SYMBOLTYPE_STAR || nTypeArray[i] == NF_SYMBOLTYPE_BLANK ) ) @@ -1051,11 +1051,11 @@ BOOL ImpSvNumberformatScan::IsLastBlankBeforeFrac(USHORT i) sStrArray[i].GetChar(0) == ' ') res = FALSE; } - if (!bStop) // kein '/' + if (!bStop) // kein '/' res = FALSE; } else - res = FALSE; // kein '/' mehr + res = FALSE; // kein '/' mehr return res; } @@ -1117,66 +1117,66 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&) { // keyword switch (nTypeArray[i]) { - case NF_KEY_E: // E + case NF_KEY_E: // E eNewType = NUMBERFORMAT_SCIENTIFIC; break; - case NF_KEY_AMPM: // AM,A,PM,P + case NF_KEY_AMPM: // AM,A,PM,P case NF_KEY_AP: - case NF_KEY_H: // H - case NF_KEY_HH: // HH - case NF_KEY_S: // S - case NF_KEY_SS: // SS + case NF_KEY_H: // H + case NF_KEY_HH: // HH + case NF_KEY_S: // S + case NF_KEY_SS: // SS eNewType = NUMBERFORMAT_TIME; break; - case NF_KEY_M: // M - case NF_KEY_MM: // MM + case NF_KEY_M: // M + case NF_KEY_MM: // MM { // minute or month USHORT nIndexPre = PreviousKeyword(i); USHORT nIndexNex = NextKeyword(i); sal_Unicode cChar = PreviousChar(i); - if (nIndexPre == NF_KEY_H || // H - nIndexPre == NF_KEY_HH || // HH - nIndexNex == NF_KEY_S || // S - nIndexNex == NF_KEY_SS || // SS + if (nIndexPre == NF_KEY_H || // H + nIndexPre == NF_KEY_HH || // HH + nIndexNex == NF_KEY_S || // S + nIndexNex == NF_KEY_SS || // SS cChar == '[' ) // [M { eNewType = NUMBERFORMAT_TIME; - nTypeArray[i] -= 2; // 6 -> 4, 7 -> 5 + nTypeArray[i] -= 2; // 6 -> 4, 7 -> 5 } else eNewType = NUMBERFORMAT_DATE; } break; - case NF_KEY_MMM: // MMM - case NF_KEY_MMMM: // MMMM - case NF_KEY_MMMMM: // MMMMM - case NF_KEY_Q: // Q - case NF_KEY_QQ: // QQ - case NF_KEY_D: // D - case NF_KEY_DD: // DD - case NF_KEY_DDD: // DDD - case NF_KEY_DDDD: // DDDD - case NF_KEY_YY: // YY - case NF_KEY_YYYY: // YYYY - case NF_KEY_NN: // NN - case NF_KEY_NNN: // NNN - case NF_KEY_NNNN: // NNNN - case NF_KEY_WW : // WW - case NF_KEY_AAA : // AAA - case NF_KEY_AAAA : // AAAA - case NF_KEY_EC : // E - case NF_KEY_EEC : // EE - case NF_KEY_G : // G - case NF_KEY_GG : // GG - case NF_KEY_GGG : // GGG - case NF_KEY_R : // R - case NF_KEY_RR : // RR + case NF_KEY_MMM: // MMM + case NF_KEY_MMMM: // MMMM + case NF_KEY_MMMMM: // MMMMM + case NF_KEY_Q: // Q + case NF_KEY_QQ: // QQ + case NF_KEY_D: // D + case NF_KEY_DD: // DD + case NF_KEY_DDD: // DDD + case NF_KEY_DDDD: // DDDD + case NF_KEY_YY: // YY + case NF_KEY_YYYY: // YYYY + case NF_KEY_NN: // NN + case NF_KEY_NNN: // NNN + case NF_KEY_NNNN: // NNNN + case NF_KEY_WW : // WW + case NF_KEY_AAA : // AAA + case NF_KEY_AAAA : // AAAA + case NF_KEY_EC : // E + case NF_KEY_EEC : // EE + case NF_KEY_G : // G + case NF_KEY_GG : // GG + case NF_KEY_GGG : // GGG + case NF_KEY_R : // R + case NF_KEY_RR : // RR eNewType = NUMBERFORMAT_DATE; break; - case NF_KEY_CCC: // CCC + case NF_KEY_CCC: // CCC eNewType = NUMBERFORMAT_CURRENCY; break; - case NF_KEY_GENERAL: // Standard + case NF_KEY_GENERAL: // Standard eNewType = NUMBERFORMAT_NUMBER; bHaveGeneral = true; break; @@ -1220,26 +1220,26 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&) if ( i < nAnzStrings-1 && nTypeArray[i+1] == NF_SYMBOLTYPE_STRING && sStrArray[i+1].GetChar(0) == '$' ) - { // as of SV_NUMBERFORMATTER_VERSION_NEW_CURR + { // as of SV_NUMBERFORMATTER_VERSION_NEW_CURR eNewType = NUMBERFORMAT_CURRENCY; bMatchBracket = TRUE; } else if ( i < nAnzStrings-1 && nTypeArray[i+1] == NF_SYMBOLTYPE_STRING && sStrArray[i+1].GetChar(0) == '~' ) - { // as of SV_NUMBERFORMATTER_VERSION_CALENDAR + { // as of SV_NUMBERFORMATTER_VERSION_CALENDAR eNewType = NUMBERFORMAT_DATE; bMatchBracket = TRUE; } else { USHORT nIndexNex = NextKeyword(i); - if (nIndexNex == NF_KEY_H || // H - nIndexNex == NF_KEY_HH || // HH - nIndexNex == NF_KEY_M || // M - nIndexNex == NF_KEY_MM || // MM - nIndexNex == NF_KEY_S || // S - nIndexNex == NF_KEY_SS ) // SS + if (nIndexNex == NF_KEY_H || // H + nIndexNex == NF_KEY_HH || // HH + nIndexNex == NF_KEY_M || // M + nIndexNex == NF_KEY_MM || // MM + nIndexNex == NF_KEY_S || // S + nIndexNex == NF_KEY_SS ) // SS eNewType = NUMBERFORMAT_TIME; else return nPos; // Error @@ -1259,9 +1259,9 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&) if (eScannedType == NUMBERFORMAT_UNDEFINED) eScannedType = eNewType; else if (eScannedType == NUMBERFORMAT_TEXT || eNewType == NUMBERFORMAT_TEXT) - eScannedType = NUMBERFORMAT_TEXT; // Text bleibt immer Text + eScannedType = NUMBERFORMAT_TEXT; // Text bleibt immer Text else if (eNewType == NUMBERFORMAT_UNDEFINED) - { // bleibt wie bisher + { // bleibt wie bisher } else if (eScannedType != eNewType) { @@ -1274,7 +1274,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&) case NUMBERFORMAT_TIME: eScannedType = NUMBERFORMAT_DATETIME; break; - case NUMBERFORMAT_FRACTION: // DD/MM + case NUMBERFORMAT_FRACTION: // DD/MM break; default: { @@ -1293,7 +1293,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&) case NUMBERFORMAT_DATE: eScannedType = NUMBERFORMAT_DATETIME; break; - case NUMBERFORMAT_FRACTION: // MM/SS + case NUMBERFORMAT_FRACTION: // MM/SS break; default: { @@ -1312,7 +1312,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&) case NUMBERFORMAT_TIME: case NUMBERFORMAT_DATE: break; - case NUMBERFORMAT_FRACTION: // DD/MM + case NUMBERFORMAT_FRACTION: // DD/MM break; default: { @@ -1329,7 +1329,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&) { switch (eNewType) { - case NUMBERFORMAT_NUMBER: // nur Zahl nach Prozent + case NUMBERFORMAT_NUMBER: // nur Zahl nach Prozent break; default: return nPos; @@ -1340,7 +1340,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&) { switch (eNewType) { - case NUMBERFORMAT_NUMBER: // nur Zahl nach E + case NUMBERFORMAT_NUMBER: // nur Zahl nach E break; default: return nPos; @@ -1369,7 +1369,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&) { switch (eNewType) { - case NUMBERFORMAT_NUMBER: // nur Zahl nach Bruch + case NUMBERFORMAT_NUMBER: // nur Zahl nach Bruch break; default: return nPos; @@ -1380,7 +1380,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&) break; } } - nPos = nPos + sStrArray[i].Len(); // Korrekturposition + nPos = nPos + sStrArray[i].Len(); // Korrekturposition i++; if ( bMatchBracket ) { // no type detection inside of matching brackets if [$...], [~...] @@ -1402,10 +1402,10 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&) if ((eScannedType == NUMBERFORMAT_NUMBER || eScannedType == NUMBERFORMAT_UNDEFINED) && nCurrPos != STRING_NOTFOUND && !bHaveGeneral) - eScannedType = NUMBERFORMAT_CURRENCY; // old "automatic" currency + eScannedType = NUMBERFORMAT_CURRENCY; // old "automatic" currency if (eScannedType == NUMBERFORMAT_UNDEFINED) eScannedType = NUMBERFORMAT_DEFINED; - return 0; // Alles ok + return 0; // Alles ok } @@ -1438,19 +1438,19 @@ int ImpSvNumberformatScan::FinalScanGetCalendar( xub_StrLen& nPos, USHORT& i, i < nAnzStrings-1 && nTypeArray[i+1] == NF_SYMBOLTYPE_STRING && sStrArray[i+1].GetChar(0) == '~' ) - { // [~calendarID] + { // [~calendarID] // as of SV_NUMBERFORMATTER_VERSION_CALENDAR - nPos = nPos + sStrArray[i].Len(); // [ + nPos = nPos + sStrArray[i].Len(); // [ nTypeArray[i] = NF_SYMBOLTYPE_CALDEL; - nPos = nPos + sStrArray[++i].Len(); // ~ - sStrArray[i-1] += sStrArray[i]; // [~ + nPos = nPos + sStrArray[++i].Len(); // ~ + sStrArray[i-1] += sStrArray[i]; // [~ nTypeArray[i] = NF_SYMBOLTYPE_EMPTY; rAnzResStrings--; if ( ++i >= nAnzStrings ) - return -1; // error - nPos = nPos + sStrArray[i].Len(); // calendarID + return -1; // error + nPos = nPos + sStrArray[i].Len(); // calendarID String& rStr = sStrArray[i]; - nTypeArray[i] = NF_SYMBOLTYPE_CALENDAR; // convert + nTypeArray[i] = NF_SYMBOLTYPE_CALENDAR; // convert i++; while ( i < nAnzStrings && sStrArray[i].GetChar(0) != ']' ) @@ -1469,7 +1469,7 @@ int ImpSvNumberformatScan::FinalScanGetCalendar( xub_StrLen& nPos, USHORT& i, i++; } else - return -1; // error + return -1; // error return 1; } return 0; @@ -1483,7 +1483,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) String sOldDecSep = pFormatter->GetNumDecimalSep(); String sOldThousandSep = pFormatter->GetNumThousandSep(); String sOldDateSep = pFormatter->GetDateSep(); - String sOldTimeSep = pLoc->getTimeSep(); + String sOldTimeSep = pLoc->getTimeSep(); String sOldTime100SecSep= pLoc->getTime100SecSep(); String sOldCurSymbol = GetCurSymbol(); String sOldCurString = GetCurString(); @@ -1538,7 +1538,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) nAnzResStrings--; } break; - case NF_KEY_GENERAL : // #77026# "General" is the same as "@" + case NF_KEY_GENERAL : // #77026# "General" is the same as "@" break; default: { @@ -1550,7 +1550,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) } nPos = nPos + sStrArray[i].Len(); i++; - } // of while + } // of while } break; case NUMBERFORMAT_NUMBER: @@ -1562,21 +1562,21 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) sal_Unicode cThousandFill = ' '; while (i < nAnzStrings) { - if (eScannedType == NUMBERFORMAT_FRACTION && // special case - nTypeArray[i] == NF_SYMBOLTYPE_DEL && // # ### #/# + if (eScannedType == NUMBERFORMAT_FRACTION && // special case + nTypeArray[i] == NF_SYMBOLTYPE_DEL && // # ### #/# StringEqualsChar( sOldThousandSep, ' ' ) && // e.g. France or Sweden StringEqualsChar( sStrArray[i], ' ' ) && !bFrac && IsLastBlankBeforeFrac(i) ) { - nTypeArray[i] = NF_SYMBOLTYPE_STRING; // del->string + nTypeArray[i] = NF_SYMBOLTYPE_STRING; // del->string } // kein Taus.p. - if (nTypeArray[i] == NF_SYMBOLTYPE_BLANK || - nTypeArray[i] == NF_SYMBOLTYPE_STAR || - nTypeArray[i] == NF_KEY_CCC || // CCC - nTypeArray[i] == NF_KEY_GENERAL ) // Standard + if (nTypeArray[i] == NF_SYMBOLTYPE_BLANK || + nTypeArray[i] == NF_SYMBOLTYPE_STAR || + nTypeArray[i] == NF_KEY_CCC || // CCC + nTypeArray[i] == NF_KEY_GENERAL ) // Standard { if (nTypeArray[i] == NF_KEY_GENERAL) { @@ -1588,12 +1588,12 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) i++; } else if (nTypeArray[i] == NF_SYMBOLTYPE_STRING || // Strings oder - nTypeArray[i] > 0) // Keywords + nTypeArray[i] > 0) // Keywords { if (eScannedType == NUMBERFORMAT_SCIENTIFIC && - nTypeArray[i] == NF_KEY_E) // E+ + nTypeArray[i] == NF_KEY_E) // E+ { - if (bExp) // doppelt + if (bExp) // doppelt return nPos; bExp = TRUE; nExpPos = i; @@ -1607,10 +1607,10 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) else if (eScannedType == NUMBERFORMAT_FRACTION && sStrArray[i].GetChar(0) == ' ') { - if (!bBlank && !bFrac) // nicht doppelt oder hinter / + if (!bBlank && !bFrac) // nicht doppelt oder hinter / { - if (bDecSep && nCounter > 0) // Nachkommastellen - return nPos; // Fehler + if (bDecSep && nCounter > 0) // Nachkommastellen + return nPos; // Fehler bBlank = TRUE; nBlankPos = i; nCntPre = nCounter; @@ -1645,10 +1645,10 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) case '0': case '?': { - if (nThousand > 0) // #... # - return nPos; // Fehler + if (nThousand > 0) // #... # + return nPos; // Fehler else if (bFrac && cHere == '0') - return nPos; // 0 im Nenner + return nPos; // 0 im Nenner nTypeArray[i] = NF_SYMBOLTYPE_DIGIT; String& rStr = sStrArray[i]; nPos = nPos + rStr.Len(); @@ -1710,20 +1710,20 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) case '\'': case ' ': { - sal_Unicode cSep = cHere; // remember + sal_Unicode cSep = cHere; // remember if ( StringEqualsChar( sOldThousandSep, cSep ) ) { // previous char with skip empty sal_Unicode cPre = PreviousChar(i); sal_Unicode cNext; if (bExp || bBlank || bFrac) - { // after E, / or ' ' + { // after E, / or ' ' if ( !StringEqualsChar( sOldThousandSep, ' ' ) ) { nPos = nPos + sStrArray[i].Len(); nTypeArray[i] = NF_SYMBOLTYPE_EMPTY; nAnzResStrings--; - i++; // eat it + i++; // eat it } else nTypeArray[i] = NF_SYMBOLTYPE_STRING; @@ -1731,10 +1731,10 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) else if (i > 0 && i < nAnzStrings-1 && (cPre == '#' || cPre == '0') && ((cNext = NextChar(i)) == '#' || cNext == '0') - ) // #,# + ) // #,# { nPos = nPos + sStrArray[i].Len(); - if (!bThousand) // only once + if (!bThousand) // only once { bThousand = TRUE; cThousandFill = sStrArray[i+1].GetChar(0); @@ -1748,9 +1748,9 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) else if (i > 0 && (cPre == '#' || cPre == '0') && PreviousType(i) == NF_SYMBOLTYPE_DIGIT && nThousand < FLAG_STANDARD_IN_FORMAT ) - { // #,,,, + { // #,,,, if ( StringEqualsChar( sOldThousandSep, ' ' ) ) - { // strange, those French.. + { // strange, those French.. BOOL bFirst = TRUE; String& rStr = sStrArray[i]; // set a hard Non-Breaking Space or ConvertMode @@ -1758,7 +1758,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) while ( i < nAnzStrings && sStrArray[i] == sOldThousandSep && StringEqualsChar( sOldThousandSep, NextChar(i) ) ) - { // last was a space or another space + { // last was a space or another space // is following => separator nPos = nPos + sStrArray[i].Len(); if ( bFirst ) @@ -1778,7 +1778,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) } if ( i < nAnzStrings-1 && sStrArray[i] == sOldThousandSep ) - { // something following last space + { // something following last space // => space if currency contained, // else separator nPos = nPos + sStrArray[i].Len(); @@ -1823,7 +1823,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) sStrArray[i] == sOldThousandSep); } } - else // any grsep + else // any grsep { nTypeArray[i] = NF_SYMBOLTYPE_STRING; String& rStr = sStrArray[i]; @@ -1843,15 +1843,15 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) else if ( StringEqualsChar( sOldDecSep, cSep ) ) { if (bBlank || bFrac) // . behind / or ' ' - return nPos; // error - else if (bExp) // behind E + return nPos; // error + else if (bExp) // behind E { nPos = nPos + sStrArray[i].Len(); nTypeArray[i] = NF_SYMBOLTYPE_EMPTY; nAnzResStrings--; - i++; // eat it + i++; // eat it } - else if (bDecSep) // any . + else if (bDecSep) // any . { nTypeArray[i] = NF_SYMBOLTYPE_STRING; String& rStr = sStrArray[i]; @@ -1879,17 +1879,17 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) i++; } - } // of else = DecSep - else // . without meaning + } // of else = DecSep + else // . without meaning { if (cSep == ' ' && eScannedType == NUMBERFORMAT_FRACTION && StringEqualsChar( sStrArray[i], ' ' ) ) { - if (!bBlank && !bFrac) // no dups - { // or behind / + if (!bBlank && !bFrac) // no dups + { // or behind / if (bDecSep && nCounter > 0)// dec. - return nPos; // error + return nPos; // error bBlank = TRUE; nBlankPos = i; nCntPre = nCounter; @@ -1924,7 +1924,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) if ( i == 0 || (nTypeArray[i-1] != NF_SYMBOLTYPE_DIGIT && nTypeArray[i-1] != NF_SYMBOLTYPE_EMPTY) ) - return nPos ? nPos : 1; // /? not allowed + return nPos ? nPos : 1; // /? not allowed else if (!bFrac || (bDecSep && nCounter > 0)) { bFrac = TRUE; @@ -1934,8 +1934,8 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) nPos = nPos + sStrArray[i].Len(); i++; } - else // / doppelt od. , imZaehl - return nPos; // Fehler + else // / doppelt od. , imZaehl + return nPos; // Fehler } else { @@ -1951,20 +1951,20 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) i < nAnzStrings-1 && nTypeArray[i+1] == NF_SYMBOLTYPE_STRING && sStrArray[i+1].GetChar(0) == '$' ) - { // [$DM-xxx] + { // [$DM-xxx] // ab SV_NUMBERFORMATTER_VERSION_NEW_CURR - nPos = nPos + sStrArray[i].Len(); // [ + nPos = nPos + sStrArray[i].Len(); // [ nTypeArray[i] = NF_SYMBOLTYPE_CURRDEL; - nPos = nPos + sStrArray[++i].Len(); // $ - sStrArray[i-1] += sStrArray[i]; // [$ + nPos = nPos + sStrArray[++i].Len(); // $ + sStrArray[i-1] += sStrArray[i]; // [$ nTypeArray[i] = NF_SYMBOLTYPE_EMPTY; nAnzResStrings--; if ( ++i >= nAnzStrings ) - return nPos; // Fehler - nPos = nPos + sStrArray[i].Len(); // DM + return nPos; // Fehler + nPos = nPos + sStrArray[i].Len(); // DM String& rStr = sStrArray[i]; String* pStr = &sStrArray[i]; - nTypeArray[i] = NF_SYMBOLTYPE_CURRENCY; // wandeln + nTypeArray[i] = NF_SYMBOLTYPE_CURRENCY; // wandeln BOOL bHadDash = FALSE; i++; while ( i < nAnzStrings && @@ -2002,7 +2002,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) i++; } else - return nPos; // Fehler + return nPos; // Fehler } else { @@ -2012,7 +2012,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) } } break; - default: // andere Dels + default: // andere Dels { if (eScannedType == NUMBERFORMAT_PERCENT && cHere == '%') @@ -2023,8 +2023,8 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) i++; } break; - } // of switch (Del) - } // of else Del + } // of switch (Del) + } // of else Del else if ( nTypeArray[i] == NF_SYMBOLTYPE_COMMENT ) { String& rStr = sStrArray[i]; @@ -2041,7 +2041,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) nPos = nPos + sStrArray[i].Len(); i++; } - } // of while + } // of while if (eScannedType == NUMBERFORMAT_FRACTION) { if (bFrac) @@ -2068,13 +2068,13 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) if (bBlank) nMaxPos = nBlankPos; else - nMaxPos = 0; // no grouping + nMaxPos = 0; // no grouping } - else if (bDecSep) // decimal separator present + else if (bDecSep) // decimal separator present nMaxPos = nDecPos; - else if (bExp) // 'E' exponent present + else if (bExp) // 'E' exponent present nMaxPos = nExpPos; - else // up to end + else // up to end nMaxPos = i; // Insert separators at proper positions. xub_StrLen nCount = 0; @@ -2128,7 +2128,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) } } } - break; // of NUMBERFORMAT_NUMBER + break; // of NUMBERFORMAT_NUMBER case NUMBERFORMAT_DATE: { while (i < nAnzStrings) @@ -2166,7 +2166,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) else if ( (nCalRet = FinalScanGetCalendar( nPos, i, nAnzResStrings )) != 0 ) { if ( nCalRet < 0 ) - return nPos; // error + return nPos; // error } else { @@ -2179,45 +2179,45 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) case NF_KEY_THAI_T : bThaiT = true; // fall thru - case NF_KEY_M: // M - case NF_KEY_MM: // MM - case NF_KEY_MMM: // MMM - case NF_KEY_MMMM: // MMMM - case NF_KEY_MMMMM: // MMMMM - case NF_KEY_Q: // Q - case NF_KEY_QQ: // QQ - case NF_KEY_D: // D - case NF_KEY_DD: // DD - case NF_KEY_DDD: // DDD - case NF_KEY_DDDD: // DDDD - case NF_KEY_YY: // YY - case NF_KEY_YYYY: // YYYY - case NF_KEY_NN: // NN - case NF_KEY_NNN: // NNN - case NF_KEY_NNNN: // NNNN - case NF_KEY_WW : // WW - case NF_KEY_AAA : // AAA - case NF_KEY_AAAA : // AAAA - case NF_KEY_EC : // E - case NF_KEY_EEC : // EE - case NF_KEY_G : // G - case NF_KEY_GG : // GG - case NF_KEY_GGG : // GGG - case NF_KEY_R : // R - case NF_KEY_RR : // RR - sStrArray[i] = sKeyword[nTypeArray[i]]; // tTtT -> TTTT + case NF_KEY_M: // M + case NF_KEY_MM: // MM + case NF_KEY_MMM: // MMM + case NF_KEY_MMMM: // MMMM + case NF_KEY_MMMMM: // MMMMM + case NF_KEY_Q: // Q + case NF_KEY_QQ: // QQ + case NF_KEY_D: // D + case NF_KEY_DD: // DD + case NF_KEY_DDD: // DDD + case NF_KEY_DDDD: // DDDD + case NF_KEY_YY: // YY + case NF_KEY_YYYY: // YYYY + case NF_KEY_NN: // NN + case NF_KEY_NNN: // NNN + case NF_KEY_NNNN: // NNNN + case NF_KEY_WW : // WW + case NF_KEY_AAA : // AAA + case NF_KEY_AAAA : // AAAA + case NF_KEY_EC : // E + case NF_KEY_EEC : // EE + case NF_KEY_G : // G + case NF_KEY_GG : // GG + case NF_KEY_GGG : // GGG + case NF_KEY_R : // R + case NF_KEY_RR : // RR + sStrArray[i] = sKeyword[nTypeArray[i]]; // tTtT -> TTTT nPos = nPos + sStrArray[i].Len(); i++; break; - default: // andere Keywords + default: // andere Keywords nTypeArray[i] = NF_SYMBOLTYPE_STRING; nPos = nPos + sStrArray[i].Len(); i++; break; } - } // of while + } // of while } - break; // of NUMBERFORMAT_DATE + break; // of NUMBERFORMAT_DATE case NUMBERFORMAT_TIME: { while (i < nAnzStrings) @@ -2265,16 +2265,16 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) return nPos; case '[': { - if (bThousand) // doppelt + if (bThousand) // doppelt return nPos; - bThousand = TRUE; // bei Time frei + bThousand = TRUE; // bei Time frei sal_Unicode cChar = pChrCls->upper( NextChar(i) ).GetChar(0); if ( cChar == cOldKeyH ) - nThousand = 1; // H + nThousand = 1; // H else if ( cChar == cOldKeyMI ) - nThousand = 2; // M + nThousand = 2; // M else if ( cChar == cOldKeyS ) - nThousand = 3; // S + nThousand = 3; // S else return nPos; nPos = nPos + sStrArray[i].Len(); @@ -2283,7 +2283,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) break; case ']': { - if (!bThousand) // kein [ vorher + if (!bThousand) // kein [ vorher return nPos; nPos = nPos + sStrArray[i].Len(); i++; @@ -2330,11 +2330,11 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) i++; } break; - case NF_KEY_AMPM: // AM/PM - case NF_KEY_AP: // A/P + case NF_KEY_AMPM: // AM/PM + case NF_KEY_AP: // A/P { - bExp = TRUE; // missbraucht fuer A/P - sStrArray[i] = sKeyword[nTypeArray[i]]; // tTtT -> TTTT + bExp = TRUE; // missbraucht fuer A/P + sStrArray[i] = sKeyword[nTypeArray[i]]; // tTtT -> TTTT nPos = nPos + sStrArray[i].Len(); i++; } @@ -2342,19 +2342,19 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) case NF_KEY_THAI_T : bThaiT = true; // fall thru - case NF_KEY_MI: // M - case NF_KEY_MMI: // MM - case NF_KEY_H: // H - case NF_KEY_HH: // HH - case NF_KEY_S: // S - case NF_KEY_SS: // SS + case NF_KEY_MI: // M + case NF_KEY_MMI: // MM + case NF_KEY_H: // H + case NF_KEY_HH: // HH + case NF_KEY_S: // S + case NF_KEY_SS: // SS { - sStrArray[i] = sKeyword[nTypeArray[i]]; // tTtT -> TTTT + sStrArray[i] = sKeyword[nTypeArray[i]]; // tTtT -> TTTT nPos = nPos + sStrArray[i].Len(); i++; } break; - default: // andere Keywords + default: // andere Keywords { nTypeArray[i] = NF_SYMBOLTYPE_STRING; nPos = nPos + sStrArray[i].Len(); @@ -2362,12 +2362,12 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) } break; } - } // of while - nCntPost = nCounter; // Zaehler der Nullen + } // of while + nCntPost = nCounter; // Zaehler der Nullen if (bExp) - nCntExp = 1; // merkt AM/PM + nCntExp = 1; // merkt AM/PM } - break; // of NUMBERFORMAT_TIME + break; // of NUMBERFORMAT_TIME case NUMBERFORMAT_DATETIME: { BOOL bTimePart = FALSE; @@ -2398,7 +2398,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) if ( (nCalRet = FinalScanGetCalendar( nPos, i, nAnzResStrings )) != 0 ) { if ( nCalRet < 0 ) - return nPos; // error + return nPos; // error } else { @@ -2470,55 +2470,55 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) } } break; - case NF_KEY_AMPM: // AM/PM - case NF_KEY_AP: // A/P + case NF_KEY_AMPM: // AM/PM + case NF_KEY_AP: // A/P { bTimePart = TRUE; - bExp = TRUE; // missbraucht fuer A/P - sStrArray[i] = sKeyword[nTypeArray[i]]; // tTtT -> TTTT + bExp = TRUE; // missbraucht fuer A/P + sStrArray[i] = sKeyword[nTypeArray[i]]; // tTtT -> TTTT nPos = nPos + sStrArray[i].Len(); i++; } break; - case NF_KEY_MI: // M - case NF_KEY_MMI: // MM - case NF_KEY_H: // H - case NF_KEY_HH: // HH - case NF_KEY_S: // S - case NF_KEY_SS: // SS + case NF_KEY_MI: // M + case NF_KEY_MMI: // MM + case NF_KEY_H: // H + case NF_KEY_HH: // HH + case NF_KEY_S: // S + case NF_KEY_SS: // SS bTimePart = TRUE; - sStrArray[i] = sKeyword[nTypeArray[i]]; // tTtT -> TTTT + sStrArray[i] = sKeyword[nTypeArray[i]]; // tTtT -> TTTT nPos = nPos + sStrArray[i].Len(); i++; break; - case NF_KEY_M: // M - case NF_KEY_MM: // MM - case NF_KEY_MMM: // MMM - case NF_KEY_MMMM: // MMMM - case NF_KEY_MMMMM: // MMMMM - case NF_KEY_Q: // Q - case NF_KEY_QQ: // QQ - case NF_KEY_D: // D - case NF_KEY_DD: // DD - case NF_KEY_DDD: // DDD - case NF_KEY_DDDD: // DDDD - case NF_KEY_YY: // YY - case NF_KEY_YYYY: // YYYY - case NF_KEY_NN: // NN - case NF_KEY_NNN: // NNN - case NF_KEY_NNNN: // NNNN - case NF_KEY_WW : // WW - case NF_KEY_AAA : // AAA - case NF_KEY_AAAA : // AAAA - case NF_KEY_EC : // E - case NF_KEY_EEC : // EE - case NF_KEY_G : // G - case NF_KEY_GG : // GG - case NF_KEY_GGG : // GGG - case NF_KEY_R : // R - case NF_KEY_RR : // RR + case NF_KEY_M: // M + case NF_KEY_MM: // MM + case NF_KEY_MMM: // MMM + case NF_KEY_MMMM: // MMMM + case NF_KEY_MMMMM: // MMMMM + case NF_KEY_Q: // Q + case NF_KEY_QQ: // QQ + case NF_KEY_D: // D + case NF_KEY_DD: // DD + case NF_KEY_DDD: // DDD + case NF_KEY_DDDD: // DDDD + case NF_KEY_YY: // YY + case NF_KEY_YYYY: // YYYY + case NF_KEY_NN: // NN + case NF_KEY_NNN: // NNN + case NF_KEY_NNNN: // NNNN + case NF_KEY_WW : // WW + case NF_KEY_AAA : // AAA + case NF_KEY_AAAA : // AAAA + case NF_KEY_EC : // E + case NF_KEY_EEC : // EE + case NF_KEY_G : // G + case NF_KEY_GG : // GG + case NF_KEY_GGG : // GGG + case NF_KEY_R : // R + case NF_KEY_RR : // RR bTimePart = FALSE; - sStrArray[i] = sKeyword[nTypeArray[i]]; // tTtT -> TTTT + sStrArray[i] = sKeyword[nTypeArray[i]]; // tTtT -> TTTT nPos = nPos + sStrArray[i].Len(); i++; break; @@ -2528,18 +2528,18 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) nPos = nPos + sStrArray[i].Len(); i++; break; - default: // andere Keywords + default: // andere Keywords nTypeArray[i] = NF_SYMBOLTYPE_STRING; nPos = nPos + sStrArray[i].Len(); i++; break; } - } // of while + } // of while nCntPost = nCounter; // decimals (100th seconds) if (bExp) - nCntExp = 1; // merkt AM/PM + nCntExp = 1; // merkt AM/PM } - break; // of NUMBERFORMAT_DATETIME + break; // of NUMBERFORMAT_DATETIME default: break; } @@ -2553,7 +2553,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) SetNatNumModifier(1); if ( bConvertMode ) - { // strings containing keywords of the target locale must be quoted, so + { // strings containing keywords of the target locale must be quoted, so // the user sees the difference and is able to edit the format string for ( i=0; i < nAnzStrings; i++ ) { @@ -2561,9 +2561,9 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) sStrArray[i].GetChar(0) != '\"' ) { if ( bConvertSystemToSystem && eScannedType == NUMBERFORMAT_CURRENCY ) - { // don't stringize automatic currency, will be converted + { // don't stringize automatic currency, will be converted if ( sStrArray[i] == sOldCurSymbol ) - continue; // for + continue; // for // DM might be splitted into D and M if ( sStrArray[i].Len() < sOldCurSymbol.Len() && pChrCls->toUpper( sStrArray[i], 0, 1 ).GetChar(0) == @@ -2586,7 +2586,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) nAnzResStrings--; } i = j - 1; - continue; // for + continue; // for } } } @@ -2598,7 +2598,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) { rStr.Insert( '\"', 0 ); rStr += '\"'; - break; // for + break; // for } } } @@ -2668,9 +2668,9 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) else rString += sStrArray[i]; if ( RemoveQuotes( sStrArray[i] ) > 0 ) - { // update currency up to quoted string + { // update currency up to quoted string if ( eScannedType == NUMBERFORMAT_CURRENCY ) - { // dM -> DM or DM -> $ in old automatic + { // dM -> DM or DM -> $ in old automatic // currency formats, oh my ..., why did we ever // introduce them? String aTmp( pChrCls->toUpper( @@ -2703,9 +2703,9 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment ) i++; } while ( i < nAnzStrings && nTypeArray[i] == NF_SYMBOLTYPE_STRING ); if ( i < nAnzStrings ) - i--; // enter switch on next symbol again + i--; // enter switch on next symbol again if ( eScannedType == NUMBERFORMAT_CURRENCY && nStringPos < rString.Len() ) - { // same as above, since last RemoveQuotes + { // same as above, since last RemoveQuotes String aTmp( pChrCls->toUpper( sStrArray[iPos], nArrPos, sStrArray[iPos].Len()-nArrPos ) ); @@ -2774,12 +2774,12 @@ xub_StrLen ImpSvNumberformatScan::RemoveQuotes( String& rStr ) xub_StrLen ImpSvNumberformatScan::ScanFormat( String& rString, String& rComment ) { - xub_StrLen res = Symbol_Division(rString); //lexikalische Analyse + xub_StrLen res = Symbol_Division(rString); //lexikalische Analyse if (!res) res = ScanType(rString); // Erkennung des Formattyps if (!res) - res = FinalScan( rString, rComment ); // Typabhaengige Endanalyse - return res; // res = Kontrollposition + res = FinalScan( rString, rComment ); // Typabhaengige Endanalyse + return res; // res = Kontrollposition // res = 0 => Format ok } diff --git a/svl/source/numbers/zforscan.hxx b/svl/source/numbers/zforscan.hxx index d623a3f50026..18cb8e06da1b 100644 --- a/svl/source/numbers/zforscan.hxx +++ b/svl/source/numbers/zforscan.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,21 +50,21 @@ public: ImpSvNumberformatScan( SvNumberFormatter* pFormatter ); ~ImpSvNumberformatScan(); - void ChangeIntl(); // tauscht Keywords aus + void ChangeIntl(); // tauscht Keywords aus void ChangeNullDate(USHORT nDay, USHORT nMonth, USHORT nYear); // tauscht Referenzdatum aus void ChangeStandardPrec(sal_uInt16 nPrec); // tauscht Standardprecision aus - xub_StrLen ScanFormat( String& rString, String& rComment ); // Aufruf der Scan-Analyse + xub_StrLen ScanFormat( String& rString, String& rComment ); // Aufruf der Scan-Analyse void CopyInfo(ImpSvNumberformatInfo* pInfo, - USHORT nAnz); // Kopiert die FormatInfo - USHORT GetAnzResStrings() const { return nAnzResStrings; } + USHORT nAnz); // Kopiert die FormatInfo + USHORT GetAnzResStrings() const { return nAnzResStrings; } - const CharClass& GetChrCls() const { return *pFormatter->GetCharClass(); } - const LocaleDataWrapper& GetLoc() const { return *pFormatter->GetLocaleData(); } - CalendarWrapper& GetCal() const { return *pFormatter->GetCalendar(); } + const CharClass& GetChrCls() const { return *pFormatter->GetCharClass(); } + const LocaleDataWrapper& GetLoc() const { return *pFormatter->GetLocaleData(); } + CalendarWrapper& GetCal() const { return *pFormatter->GetCalendar(); } const String* GetKeywords() const { @@ -84,9 +84,9 @@ public: const String& GetColorString() const { return GetKeywords()[NF_KEY_COLOR]; } const String& GetRedString() const { return GetKeywords()[NF_KEY_RED]; } const String& GetBooleanString() const { return GetKeywords()[NF_KEY_BOOLEAN]; } - const String& GetErrorString() const { return sErrStr; } + const String& GetErrorString() const { return sErrStr; } - Date* GetNullDate() const { return pNullDate; } + Date* GetNullDate() const { return pNullDate; } const String& GetStandardName() const { if ( bKeywordsNeedInit ) @@ -94,8 +94,8 @@ public: return sNameStandardFormat; } sal_uInt16 GetStandardPrec() const { return nStandardPrec; } - const Color& GetRedColor() const { return StandardColor[4]; } - Color* GetColor(String& sStr); // Setzt Hauptfarben oder + const Color& GetRedColor() const { return StandardColor[4]; } + Color* GetColor(String& sStr); // Setzt Hauptfarben oder // definierte Farben // the compatibility currency symbol for old automatic currency formats @@ -152,39 +152,39 @@ public: // (fuer zformat.cxx) -private: // ---- privater Teil - NfKeywordTable sKeyword; // Schluesselworte der Syntax +private: // ---- privater Teil + NfKeywordTable sKeyword; // Schluesselworte der Syntax Color StandardColor[NF_MAX_DEFAULT_COLORS]; // Array der Standardfarben - Date* pNullDate; // 30Dec1899 - String sNameStandardFormat; // "Standard" + Date* pNullDate; // 30Dec1899 + String sNameStandardFormat; // "Standard" sal_uInt16 nStandardPrec; // default Precision for Standardformat - SvNumberFormatter* pFormatter; // Pointer auf die Formatliste + SvNumberFormatter* pFormatter; // Pointer auf die Formatliste String sStrArray[NF_MAX_FORMAT_SYMBOLS]; // Array der Symbole short nTypeArray[NF_MAX_FORMAT_SYMBOLS]; // Array der Infos // externe Infos: - USHORT nAnzResStrings; // Anzahl der Ergebnissymbole + USHORT nAnzResStrings; // Anzahl der Ergebnissymbole #if !(defined SOLARIS && defined X86) - short eScannedType; // Typ gemaess Scan + short eScannedType; // Typ gemaess Scan #else - int eScannedType; // wg. Optimierung + int eScannedType; // wg. Optimierung #endif - BOOL bThousand; // Mit Tausenderpunkt - USHORT nThousand; // Zaehlt ....-Folgen - USHORT nCntPre; // Zaehlt Vorkommastellen - USHORT nCntPost; // Zaehlt Nachkommastellen - USHORT nCntExp; // Zaehlt Exp.Stellen, AM/PM + BOOL bThousand; // Mit Tausenderpunkt + USHORT nThousand; // Zaehlt ....-Folgen + USHORT nCntPre; // Zaehlt Vorkommastellen + USHORT nCntPost; // Zaehlt Nachkommastellen + USHORT nCntExp; // Zaehlt Exp.Stellen, AM/PM // interne Infos: - USHORT nAnzStrings; // Anzahl der Symbole - USHORT nRepPos; // Position eines '*' - USHORT nExpPos; // interne Position des E - USHORT nBlankPos; // interne Position des Blank - short nDecPos; // interne Pos. des , - BOOL bExp; // wird bei Lesen des E gesetzt - BOOL bFrac; // wird bei Lesen des / gesetzt - BOOL bBlank; // wird bei ' '(Fraction) ges. - BOOL bDecSep; // Wird beim ersten , gesetzt + USHORT nAnzStrings; // Anzahl der Symbole + USHORT nRepPos; // Position eines '*' + USHORT nExpPos; // interne Position des E + USHORT nBlankPos; // interne Position des Blank + short nDecPos; // interne Pos. des , + BOOL bExp; // wird bei Lesen des E gesetzt + BOOL bFrac; // wird bei Lesen des / gesetzt + BOOL bBlank; // wird bei ' '(Fraction) ges. + BOOL bDecSep; // Wird beim ersten , gesetzt mutable BOOL bKeywordsNeedInit; // Locale dependent keywords need to be initialized mutable BOOL bCompatCurNeedInit; // Locale dependent compatibility currency need to be initialized String sCurSymbol; // Currency symbol for compatibility format codes @@ -192,21 +192,21 @@ private: // ---- privater Teil String sCurAbbrev; // Currency abbreviation String sErrStr; // String fuer Fehlerausgaben - BOOL bConvertMode; // Wird im Convert-Mode gesetzt + BOOL bConvertMode; // Wird im Convert-Mode gesetzt // Land/Sprache, in die der - LanguageType eNewLnge; // gescannte String konvertiert + LanguageType eNewLnge; // gescannte String konvertiert // wird (fuer Excel Filter) // Land/Sprache, aus der der - LanguageType eTmpLnge; // gescannte String konvertiert + LanguageType eTmpLnge; // gescannte String konvertiert // wird (fuer Excel Filter) - BOOL bConvertSystemToSystem; // Whether the conversion is + BOOL bConvertSystemToSystem; // Whether the conversion is // from one system locale to // another system locale (in // this case the automatic // currency symbol is converted // too). - xub_StrLen nCurrPos; // Position des Waehrungssymbols + xub_StrLen nCurrPos; // Position des Waehrungssymbols BYTE nNatNumModifier; // Thai T speciality @@ -214,28 +214,28 @@ private: // ---- privater Teil void InitSpecialKeyword( NfKeywordIndex eIdx ) const; void InitCompatCur() const; -#ifdef _ZFORSCAN_CXX // ----- private Methoden ----- +#ifdef _ZFORSCAN_CXX // ----- private Methoden ----- void SetDependentKeywords(); // Setzt die Sprachabh. Keyw. void SkipStrings(USHORT& i,xub_StrLen& nPos);// Ueberspringt StringSymbole - USHORT PreviousKeyword(USHORT i); // Gibt Index des vorangeh. + USHORT PreviousKeyword(USHORT i); // Gibt Index des vorangeh. // Schluesselworts oder 0 - USHORT NextKeyword(USHORT i); // Gibt Index des naechsten + USHORT NextKeyword(USHORT i); // Gibt Index des naechsten // Schluesselworts oder 0 - sal_Unicode PreviousChar(USHORT i); // Gibt letzten Buchstaben + sal_Unicode PreviousChar(USHORT i); // Gibt letzten Buchstaben // vor der Position, // skipt EMPTY, STRING, STAR, BLANK - sal_Unicode NextChar(USHORT i); // Gibt ersten Buchst. danach - short PreviousType( USHORT i ); // Gibt Typ vor Position, + sal_Unicode NextChar(USHORT i); // Gibt ersten Buchst. danach + short PreviousType( USHORT i ); // Gibt Typ vor Position, // skipt EMPTY - BOOL IsLastBlankBeforeFrac(USHORT i); // True <=> es kommt kein ' ' + BOOL IsLastBlankBeforeFrac(USHORT i); // True <=> es kommt kein ' ' // mehr bis zum '/' - void Reset(); // Reset aller Variablen + void Reset(); // Reset aller Variablen // vor Analysestart - short GetKeyWord( const String& sSymbol, // determine keyword at nPos + short GetKeyWord( const String& sSymbol, // determine keyword at nPos xub_StrLen nPos ); // return 0 <=> not found - inline BOOL IsAmbiguousE( short nKey ) // whether nKey is ambiguous E of NF_KEY_E/NF_KEY_EC + inline BOOL IsAmbiguousE( short nKey ) // whether nKey is ambiguous E of NF_KEY_E/NF_KEY_EC { return (nKey == NF_KEY_EC || nKey == NF_KEY_E) && (GetKeywords()[NF_KEY_EC] == GetKeywords()[NF_KEY_E]); @@ -248,8 +248,8 @@ private: // ---- privater Teil xub_StrLen& nPos, String& sSymbol); // Naechstes Symbol xub_StrLen Symbol_Division(const String& rString);// lexikalische Voranalyse - xub_StrLen ScanType(const String& rString); // Analyse des Formattyps - xub_StrLen FinalScan( String& rString, String& rComment ); // Endanalyse mit Vorgabe + xub_StrLen ScanType(const String& rString); // Analyse des Formattyps + xub_StrLen FinalScan( String& rString, String& rComment ); // Endanalyse mit Vorgabe // des Typs // -1:= error, return nPos in FinalScan; 0:= no calendar, 1:= calendar found int FinalScanGetCalendar( xub_StrLen& nPos, USHORT& i, USHORT& nAnzResStrings ); @@ -272,4 +272,4 @@ private: // ---- privater Teil -#endif // _ZFORSCAN_HXX +#endif // _ZFORSCAN_HXX diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index 7db18c65db1f..fd87873c6556 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/passwordcontainer/syscreds.cxx b/svl/source/passwordcontainer/syscreds.cxx index fc70088bf371..b90b88dd7d16 100644 --- a/svl/source/passwordcontainer/syscreds.cxx +++ b/svl/source/passwordcontainer/syscreds.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -30,9 +30,9 @@ using namespace com::sun::star; -SysCredentialsConfigItem::SysCredentialsConfigItem( - SysCredentialsConfig * pOwner ) -: utl::ConfigItem( rtl::OUString::createFromAscii( "Office.Common/Passwords" ), +SysCredentialsConfigItem::SysCredentialsConfigItem( + SysCredentialsConfig * pOwner ) +: utl::ConfigItem( rtl::OUString::createFromAscii( "Office.Common/Passwords" ), CONFIG_MODE_IMMEDIATE_UPDATE ), m_bInited( false ), m_pOwner( pOwner ) @@ -43,8 +43,8 @@ SysCredentialsConfigItem::SysCredentialsConfigItem( EnableNotification( aNode ); } -//virtual -void SysCredentialsConfigItem::Notify( +//virtual +void SysCredentialsConfigItem::Notify( const uno::Sequence< rtl::OUString > & /*seqPropertyNames*/ ) { { @@ -61,7 +61,7 @@ void SysCredentialsConfigItem::Commit() // does nothing } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SysCredentialsConfigItem::getSystemCredentialsURLs() { ::osl::MutexGuard aGuard( m_aMutex ); @@ -69,18 +69,18 @@ SysCredentialsConfigItem::getSystemCredentialsURLs() { // read config item uno::Sequence< ::rtl::OUString > aPropNames( 1 ); - aPropNames[ 0 ] = rtl::OUString::createFromAscii( + aPropNames[ 0 ] = rtl::OUString::createFromAscii( "AuthenticateUsingSystemCredentials" ); - uno::Sequence< uno::Any > aAnyValues( + uno::Sequence< uno::Any > aAnyValues( utl::ConfigItem::GetProperties( aPropNames ) ); - OSL_ENSURE( - aAnyValues.getLength() == 1, + OSL_ENSURE( + aAnyValues.getLength() == 1, "SysCredentialsConfigItem::getSystemCredentialsURLs: " "Error reading config item!" ); uno::Sequence< rtl::OUString > aValues; - if ( ( aAnyValues[ 0 ] >>= aValues ) || + if ( ( aAnyValues[ 0 ] >>= aValues ) || ( !aAnyValues[ 0 ].hasValue() ) ) { m_seqURLs = aValues; @@ -90,7 +90,7 @@ SysCredentialsConfigItem::getSystemCredentialsURLs() return m_seqURLs; } -void SysCredentialsConfigItem::setSystemCredentialsURLs( +void SysCredentialsConfigItem::setSystemCredentialsURLs( const uno::Sequence< rtl::OUString > & seqURLList ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -98,8 +98,8 @@ void SysCredentialsConfigItem::setSystemCredentialsURLs( // write config item. uno::Sequence< rtl::OUString > aPropNames( 1 ); uno::Sequence< uno::Any > aPropValues( 1 ); - aPropNames[ 0 ] - = ::rtl::OUString::createFromAscii( + aPropNames[ 0 ] + = ::rtl::OUString::createFromAscii( "AuthenticateUsingSystemCredentials" ); aPropValues[ 0 ] <<= seqURLList; @@ -112,17 +112,17 @@ void SysCredentialsConfigItem::setSystemCredentialsURLs( //============================================================================ -namespace +namespace { // TODO: This code is actually copied from svl/source/passwordcontainer.cxx bool removeLastSegment( ::rtl::OUString & aURL ) { sal_Int32 aInd = aURL.lastIndexOf( sal_Unicode( '/' ) ); - + if( aInd > 0 ) { sal_Int32 aPrevInd = aURL.lastIndexOf( sal_Unicode( '/' ), aInd ); - if ( aURL.indexOf( ::rtl::OUString::createFromAscii( "://" ) ) + if ( aURL.indexOf( ::rtl::OUString::createFromAscii( "://" ) ) != aPrevInd - 2 || aInd != aURL.getLength() - 1 ) { @@ -141,8 +141,8 @@ namespace { ::rtl::OUString aUrl( aURL ); - // each iteration remove last '/...' section from the aUrl - // while it's possible, up to the most left '://' + // each iteration remove last '/...' section from the aUrl + // while it's possible, up to the most left '://' do { // first look for <url>/somename and then look for <url>/somename/... @@ -185,7 +185,7 @@ void SysCredentialsConfig::initCfg() osl::MutexGuard aGuard( m_aMutex ); if ( !m_bCfgInited ) { - uno::Sequence< rtl::OUString > aURLs( + uno::Sequence< rtl::OUString > aURLs( m_aConfigItem.getSystemCredentialsURLs() ); for ( sal_Int32 n = 0; n < aURLs.getLength(); ++n ) m_aCfgContainer.insert( aURLs[ n ] ); @@ -228,7 +228,7 @@ rtl::OUString SysCredentialsConfig::find( rtl::OUString const & aURL ) return rtl::OUString(); } - + void SysCredentialsConfig::add( rtl::OUString const & rURL, bool bPersistent ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -263,7 +263,7 @@ void SysCredentialsConfig::remove( rtl::OUString const & rURL ) uno::Sequence< rtl::OUString > SysCredentialsConfig::list( bool bOnlyPersistent ) { initCfg(); - sal_Int32 nCount = m_aCfgContainer.size() + sal_Int32 nCount = m_aCfgContainer.size() + ( bOnlyPersistent ? 0 : m_aMemContainer.size() ); uno::Sequence< rtl::OUString > aResult( nCount ); diff --git a/svl/source/passwordcontainer/syscreds.hxx b/svl/source/passwordcontainer/syscreds.hxx index 247ad31a00e5..caa98075ab04 100644 --- a/svl/source/passwordcontainer/syscreds.hxx +++ b/svl/source/passwordcontainer/syscreds.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,16 +43,16 @@ class SysCredentialsConfigItem : public utl::ConfigItem SysCredentialsConfigItem( SysCredentialsConfig * pOwner ); //virtual ~SysCredentialsConfigItem(); - virtual void Notify( - const com::sun::star::uno::Sequence< rtl::OUString > & + virtual void Notify( + const com::sun::star::uno::Sequence< rtl::OUString > & seqPropertyNames ); virtual void Commit(); - com::sun::star::uno::Sequence< rtl::OUString > + com::sun::star::uno::Sequence< rtl::OUString > getSystemCredentialsURLs(); - - void setSystemCredentialsURLs( - const com::sun::star::uno::Sequence< rtl::OUString > & + + void setSystemCredentialsURLs( + const com::sun::star::uno::Sequence< rtl::OUString > & seqURLList ); //bool isSystemCredentialsURL( const rtl::OUString & rURL ) const; diff --git a/svl/source/svdde/ddecli.cxx b/svl/source/svdde/ddecli.cxx index 236f57824da2..fca50dfffa88 100644 --- a/svl/source/svdde/ddecli.cxx +++ b/svl/source/svdde/ddecli.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -306,7 +306,7 @@ void DdeTransaction::Execute() HSZ hItem = *pName; void* pData = (void*)(const void *)aDdeData; DWORD nData = (DWORD)(long)aDdeData; - ULONG nIntFmt = aDdeData.pImp->nFmt; + ULONG nIntFmt = aDdeData.pImp->nFmt; UINT nExtFmt = DdeData::GetExternalFormat( nIntFmt ); DdeInstData* pInst = ImpGetInstData(); @@ -440,7 +440,7 @@ DdePoke::DdePoke( DdeConnection& d, const String& i, const String& rData, long n ) : DdeTransaction( d, i, n ) { -// ByteString aByteStr( rData, osl_getThreadTextEncoding() ); +// ByteString aByteStr( rData, osl_getThreadTextEncoding() ); aDdeData = DdeData( (void*) rData.GetBuffer(), sizeof(sal_Unicode) * (rData.Len()), CF_TEXT ); nType = XTYP_POKE; } @@ -460,7 +460,7 @@ DdePoke::DdePoke( DdeConnection& d, const String& i, const DdeData& rData, DdeExecute::DdeExecute( DdeConnection& d, const String& rData, long n ) : DdeTransaction( d, String(), n ) { -// ByteString aByteStr( rData, osl_getThreadTextEncoding() ); +// ByteString aByteStr( rData, osl_getThreadTextEncoding() ); aDdeData = DdeData( (void*)rData.GetBuffer(), sizeof(sal_Unicode) * (rData.Len() + 1), CF_TEXT ); nType = XTYP_EXECUTE; } diff --git a/svl/source/svdde/ddedata.cxx b/svl/source/svdde/ddedata.cxx index ba67d451be34..6f097611d826 100644 --- a/svl/source/svdde/ddedata.cxx +++ b/svl/source/svdde/ddedata.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/svdde/ddedll.cxx b/svl/source/svdde/ddedll.cxx index a71662dd5e63..39212ea10721 100644 --- a/svl/source/svdde/ddedll.cxx +++ b/svl/source/svdde/ddedll.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -30,7 +30,7 @@ #ifdef WIN -#include <sysdep.hxx> // included svwin.h +#include <sysdep.hxx> // included svwin.h // Statische DLL-Verwaltungs-Variablen static HINSTANCE hDLLInst = 0; // HANDLE der DLL diff --git a/svl/source/svdde/ddeimp.hxx b/svl/source/svdde/ddeimp.hxx index 708b2736f9cf..41a9130db978 100644 --- a/svl/source/svdde/ddeimp.hxx +++ b/svl/source/svdde/ddeimp.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -140,10 +140,10 @@ public: struct DdeDataImp { - HDDEDATA hData; - LPBYTE pData; - long nData; - ULONG nFmt; + HDDEDATA hData; + LPBYTE pData; + long nData; + ULONG nFmt; }; class DdeConnections; @@ -151,20 +151,20 @@ class DdeServices; struct DdeInstData { - USHORT nRefCount; - DdeConnections* pConnections; + USHORT nRefCount; + DdeConnections* pConnections; // Server - long hCurConvSvr; - ULONG hDdeInstSvr; - short nInstanceSvr; - DdeServices* pServicesSvr; + long hCurConvSvr; + ULONG hDdeInstSvr; + short nInstanceSvr; + DdeServices* pServicesSvr; // Client - ULONG hDdeInstCli; - short nInstanceCli; + ULONG hDdeInstCli; + short nInstanceCli; }; #ifndef SHL_SVDDE -#define SHL_SVDDE SHL_SHL2 +#define SHL_SVDDE SHL_SHL2 #endif inline DdeInstData* ImpGetInstData() diff --git a/svl/source/svdde/ddeinf.cxx b/svl/source/svdde/ddeinf.cxx index c8c015071a9b..57122aad1c6b 100644 --- a/svl/source/svdde/ddeinf.cxx +++ b/svl/source/svdde/ddeinf.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/svdde/ddeml1.cxx b/svl/source/svdde/ddeml1.cxx index dd9cc2abdaa7..c6764116cd0d 100644 --- a/svl/source/svdde/ddeml1.cxx +++ b/svl/source/svdde/ddeml1.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -124,16 +124,16 @@ inline HDDEDATA ImpDdeMgr::Callback( USHORT nTransactionType, ImpDdeMgr::ImpDdeMgr() { - nLastErrInstance = DMLERR_NO_ERROR; - pCallback = 0; - nTransactFilter = 0; - nServiceCount = 0; - pServices = 0; - pAppTable = 0; - pConvTable = 0; - pTransTable = 0; - bServFilterOn = TRUE; - bInSyncTrans = FALSE; + nLastErrInstance = DMLERR_NO_ERROR; + pCallback = 0; + nTransactFilter = 0; + nServiceCount = 0; + pServices = 0; + pAppTable = 0; + pConvTable = 0; + pTransTable = 0; + bServFilterOn = TRUE; + bInSyncTrans = FALSE; CreateServerWnd(); pData = InitAll(); @@ -150,8 +150,8 @@ ImpDdeMgr::~ImpDdeMgr() // Named Shared Mem vom BS loeschen lassen, da nicht bekannt ist, // wieviele DDEML-Instanzen die App erzeugt hat, und OS/2 // keinen App-Referenzzaehler fuer shared mem fuehrt. -// if ( pData ) -// DosFreeMem( pData ); +// if ( pData ) +// DosFreeMem( pData ); } @@ -313,7 +313,7 @@ HWND ImpDdeMgr::NextFrameWin( HENUM hEnum ) { WinQueryClassName( hWnd, sizeof(aBuf)-1, (PCH)aBuf ); // Frame-Window ? - if( !strcmp( aBuf, "#1" ) ) // #define WC_FRAME ((PSZ)0xffff0001L) + if( !strcmp( aBuf, "#1" ) ) // #define WC_FRAME ((PSZ)0xffff0001L) break; hWnd = WinGetNextWindow( hEnum ); } @@ -419,9 +419,9 @@ HCONVLIST ImpDdeMgr::DdeConnectList( HSZ hszService, HSZ hszTopic, { HCONV hLastConvInList; - hCurListId = hConvList; + hCurListId = hConvList; ImpHCONV* pConv = pConvTable; - pConv += (USHORT)hConvList; + pConv += (USHORT)hConvList; if( (USHORT)hConvList >= pData->nMaxConvCount ||pConv->hWndThis==0 ) { nLastErrInstance = DMLERR_INVALIDPARAMETER; @@ -500,7 +500,7 @@ DDEINIT* ImpDdeMgr::CreateDDEInitData( HWND hWndDestination, HSZ hszService, void ImpDdeMgr::MyInitiateDde( HWND hWndSrv, HWND hWndClient, HSZ hszService, HSZ hszTopic, CONVCONTEXT* pCC ) { - DDEINIT* pBuf = CreateDDEInitData( hWndSrv, hszService, hszTopic, pCC ); + DDEINIT* pBuf = CreateDDEInitData( hWndSrv, hszService, hszTopic, pCC ); if( pBuf ) { PID pid; TID tid; @@ -527,7 +527,7 @@ ImpHCONV* ImpDdeMgr::GetFirstServer(ImpDdeMgrData* pData, HCONVLIST hConvList, // Startposition pPtr += (USHORT)rhConv; hConv = rhConv; - pPtr++; hConv++; // auf den naechsten + pPtr++; hConv++; // auf den naechsten } while( hConv < pData->nMaxConvCount ) { @@ -569,12 +569,12 @@ ImpHCONV* ImpDdeMgr::GetLastServer(ImpDdeMgrData* pData, HCONVLIST hConvList, // static BOOL ImpDdeMgr::CheckConvListId( HCONVLIST hConvListId ) { - HAB hAB = WinQueryAnchorBlock( (HWND)hConvListId ); + HAB hAB = WinQueryAnchorBlock( (HWND)hConvListId ); if( hAB ) return WinIsWindow( hAB, (HWND)hConvListId ); return FALSE; /* - HAB hAB = WinQueryAnchorBlock( (HWND)hConvListId ); + HAB hAB = WinQueryAnchorBlock( (HWND)hConvListId ); if( hAB ) { char aBuf[ 16 ]; @@ -649,7 +649,7 @@ BOOL ImpDdeMgr::DdeDisconnect( HCONV hConv ) pConv->nStatus |= ST_TERMINATED; - HAB hAB = WinQueryAnchorBlock( pConv->hWndThis ); + HAB hAB = WinQueryAnchorBlock( pConv->hWndThis ); // um die MessageQueue inne Gaenge zu halten ULONG nTimerId = WinStartTimer( hAB, 0, 0, 50 ); @@ -781,21 +781,21 @@ USHORT ImpDdeMgr::DdeQueryConvInfo(HCONV hConv, ULONG nTransId, CONVINFO* pCI) nSize = sizeof(CONVINFO); CONVINFO aTempInfo; memset( &aTempInfo, 0, sizeof(CONVINFO) ); - aTempInfo.nSize = pCI->nSize; - aTempInfo.hConvPartner = pConv->hConvPartner; - aTempInfo.hszPartner = pConv->hszPartner; - aTempInfo.hszServiceReq = pConv->hszServiceReq; - aTempInfo.hszTopic = pConv->hszTopic; - aTempInfo.nStatus = pConv->nStatus; - aTempInfo.hConvList = pConv->hConvList; - aTempInfo.aConvCtxt = pConv->aConvContext; + aTempInfo.nSize = pCI->nSize; + aTempInfo.hConvPartner = pConv->hConvPartner; + aTempInfo.hszPartner = pConv->hszPartner; + aTempInfo.hszServiceReq = pConv->hszServiceReq; + aTempInfo.hszTopic = pConv->hszTopic; + aTempInfo.nStatus = pConv->nStatus; + aTempInfo.hConvList = pConv->hConvList; + aTempInfo.aConvCtxt = pConv->aConvContext; if( pTrans ) { - aTempInfo.nUser = pTrans->nUser; - aTempInfo.hszItem = pTrans->hszItem; - aTempInfo.nFormat = pTrans->nFormat; - aTempInfo.nType = pTrans->nType; - aTempInfo.nConvst = pTrans->nConvst; + aTempInfo.nUser = pTrans->nUser; + aTempInfo.hszItem = pTrans->hszItem; + aTempInfo.nFormat = pTrans->nFormat; + aTempInfo.nType = pTrans->nType; + aTempInfo.nConvst = pTrans->nConvst; aTempInfo.nLastError= pTrans->nLastError; } memcpy( pCI, &aTempInfo, nSize ); @@ -984,7 +984,7 @@ BOOL ImpDdeMgr::DdePostAdvise( HSZ hszTopic, HSZ hszItem) { // todo: FACK_REQ in Out-Data setzen, wenn pTrans->nType & XTYPF_ACKREQ ////WRITELOG("DdePostAdvise:Sending data/notification") - BOOL bSuccess = MyWinDdePostMsg( hWndClient, + BOOL bSuccess = MyWinDdePostMsg( hWndClient, hWndServer,WM_DDE_DATA, pOutDDEData, DDEPM_RETRY); if( bSuccess ) { @@ -1373,9 +1373,9 @@ HDDEDATA ImpDdeMgr::DdeClientTransaction(void* pDdeData, ULONG cbData, // WRITELOG("DdeClientTransaction:Starting sync. trans.") pThis->hSyncResponseData = (HDDEDATA)0; - pThis->nSyncResponseMsg = 0; - pThis->bInSyncTrans = TRUE; - pThis->nSyncTransId = nTransId; + pThis->nSyncResponseMsg = 0; + pThis->bInSyncTrans = TRUE; + pThis->nSyncTransId = nTransId; pThis->bSyncAbandonTrans = FALSE; if ( !MyWinDdePostMsg( hWndServer, hWndClient, nMsg, pOutDDEData, @@ -1392,7 +1392,7 @@ HDDEDATA ImpDdeMgr::DdeClientTransaction(void* pDdeData, ULONG cbData, } return FALSE; } - HAB hAB = WinQueryAnchorBlock( hWndClient ); + HAB hAB = WinQueryAnchorBlock( hWndClient ); ULONG nDummyTimer = WinStartTimer( hAB, 0, 0, 50 ); ULONG nTimeoutId = TID_USERMAX - nTransId; WinStartTimer( hAB, hWndClient, nTimeoutId, nTimeout ); @@ -1431,8 +1431,8 @@ HDDEDATA ImpDdeMgr::DdeClientTransaction(void* pDdeData, ULONG cbData, nMsg = pThis->nSyncResponseMsg; pThis->hSyncResponseData= 0; pThis->nSyncResponseMsg = 0; - pThis->bInSyncTrans = FALSE; - pThis->nSyncTransId = 0; + pThis->bInSyncTrans = FALSE; + pThis->nSyncTransId = 0; if( !pDDEInData && nMsg != WM_TIMER ) { DBG_ASSERT(0,"Dde:No data!"); @@ -1725,14 +1725,14 @@ MRESULT ImpDdeMgr::DdeTerminate( ImpWndProcParams* pParams ) Client: GetConvHandle( HWNDClient, HWNDSender ) */ -MRESULT ImpDdeMgr::ConvWndProc( HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2 ) +MRESULT ImpDdeMgr::ConvWndProc( HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2 ) { - ImpWndProcParams aParams; + ImpWndProcParams aParams; - MRESULT nRet = (MRESULT)0; + MRESULT nRet = (MRESULT)0; aParams.hWndReceiver= hWnd; - aParams.nPar1 = nPar1; - aParams.nPar2 = nPar2; + aParams.nPar1 = nPar1; + aParams.nPar2 = nPar2; switch( nMsg ) { @@ -1744,40 +1744,40 @@ MRESULT ImpDdeMgr::ConvWndProc( HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2 ) break; #endif - case WM_DDE_INITIATEACK : nRet = DdeInitiateAck(&aParams); break; - case WM_DDE_ACK : nRet = DdeAck( &aParams ); break; - case WM_DDE_ADVISE : nRet = DdeAdvise( &aParams ); break; - case WM_DDE_DATA : nRet = DdeData( &aParams ); break; - case WM_DDE_EXECUTE : nRet = DdeExecute( &aParams ); break; - case WM_DDE_POKE : nRet = DdePoke( &aParams ); break; - case WM_DDE_REQUEST : nRet = DdeRequest( &aParams ); break; - case WM_DDE_TERMINATE : nRet = DdeTerminate( &aParams ); break; - case WM_DDE_UNADVISE : nRet = DdeUnadvise( &aParams ); break; - case WM_TIMER : nRet = DdeTimeout( &aParams ); break; + case WM_DDE_INITIATEACK : nRet = DdeInitiateAck(&aParams); break; + case WM_DDE_ACK : nRet = DdeAck( &aParams ); break; + case WM_DDE_ADVISE : nRet = DdeAdvise( &aParams ); break; + case WM_DDE_DATA : nRet = DdeData( &aParams ); break; + case WM_DDE_EXECUTE : nRet = DdeExecute( &aParams ); break; + case WM_DDE_POKE : nRet = DdePoke( &aParams ); break; + case WM_DDE_REQUEST : nRet = DdeRequest( &aParams ); break; + case WM_DDE_TERMINATE : nRet = DdeTerminate( &aParams ); break; + case WM_DDE_UNADVISE : nRet = DdeUnadvise( &aParams ); break; + case WM_TIMER : nRet = DdeTimeout( &aParams ); break; } return nRet; } -MRESULT ImpDdeMgr::SrvWndProc( HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2 ) +MRESULT ImpDdeMgr::SrvWndProc( HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2 ) { MRESULT nRet = (MRESULT)0; ImpWndProcParams aParams; aParams.hWndReceiver= hWnd; - aParams.nPar1 = nPar1; - aParams.nPar2 = nPar2; + aParams.nPar1 = nPar1; + aParams.nPar2 = nPar2; switch( nMsg ) { #ifdef DBG_UTIL - case WM_DDE_ACK : + case WM_DDE_ACK : case WM_DDE_ADVISE : case WM_DDE_EXECUTE : case WM_DDE_POKE : case WM_DDE_REQUEST : case WM_DDE_UNADVISE : case WM_DDE_DATA : - case WM_DDE_INITIATEACK : + case WM_DDE_INITIATEACK : DBG_ASSERT(0,"dde:unexpected msg"); nRet = (MRESULT)TRUE; break; @@ -1804,7 +1804,7 @@ MRESULT ImpDdeMgr::SrvWndProc( HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2 ) } -MRESULT ImpDdeMgr::DdeAck( ImpWndProcParams* pParams ) +MRESULT ImpDdeMgr::DdeAck( ImpWndProcParams* pParams ) { //WRITELOG("DdeAck:Start") HSZ hszItem; @@ -1970,7 +1970,7 @@ USHORT ImpDdeMgr::SendUnadvises(HCONV hConvServer,USHORT nFormat,BOOL bFree) HCONV ImpDdeMgr::CheckIncoming( ImpWndProcParams* pParams, ULONG nTransMask, HSZ& rhszItem ) { -// ////WRITELOG("CheckIncoming") +// ////WRITELOG("CheckIncoming") rhszItem = 0; DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2); if( !pInDDEData ) @@ -1997,14 +1997,14 @@ HCONV ImpDdeMgr::CheckIncoming( ImpWndProcParams* pParams, ULONG nTransMask, } -MRESULT ImpDdeMgr::DdeAdvise( ImpWndProcParams* pParams ) +MRESULT ImpDdeMgr::DdeAdvise( ImpWndProcParams* pParams ) { ////WRITELOG("DdeAdvise:Received") HSZ hszItem; - HCONV hConv = CheckIncoming(pParams, CBF_FAIL_ADVISES, hszItem); + HCONV hConv = CheckIncoming(pParams, CBF_FAIL_ADVISES, hszItem); DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2); - HWND hWndThis = pParams->hWndReceiver; - HWND hWndClient = (HWND)pParams->nPar1; + HWND hWndThis = pParams->hWndReceiver; + HWND hWndClient = (HWND)pParams->nPar1; if( !hConv ) { ////WRITELOG("DdeAdvise:Conversation not found") @@ -2103,13 +2103,13 @@ MRESULT ImpDdeMgr::DdeAdvise( ImpWndProcParams* pParams ) return (MRESULT)0; } -MRESULT ImpDdeMgr::DdeData( ImpWndProcParams* pParams ) +MRESULT ImpDdeMgr::DdeData( ImpWndProcParams* pParams ) { WRITELOG("DdeData:Received") HSZ hszItem; - HCONV hConv = CheckIncoming(pParams, 0, hszItem); - HWND hWndThis = pParams->hWndReceiver; - HWND hWndClient = (HWND)pParams->nPar1; + HCONV hConv = CheckIncoming(pParams, 0, hszItem); + HWND hWndThis = pParams->hWndReceiver; + HWND hWndClient = (HWND)pParams->nPar1; DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2); #if 0 && defined( OV_DEBUG ) { @@ -2238,7 +2238,7 @@ MRESULT ImpDdeMgr::DdeData( ImpWndProcParams* pParams ) return (MRESULT)0; } -MRESULT ImpDdeMgr::DdeExecute( ImpWndProcParams* pParams ) +MRESULT ImpDdeMgr::DdeExecute( ImpWndProcParams* pParams ) { ////WRITELOG("DdeExecute:Received") DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2); @@ -2291,7 +2291,7 @@ HCONV ImpDdeMgr::ConnectWithClient( HWND hWndClient, WinQueryWindowProcess( hWndClient, &pid, &tid ); DosGiveSharedMem( pDDEData, pid, PAG_READ | PAG_WRITE); } - HAB hAB = WinQueryAnchorBlock( hWndSrv ); + HAB hAB = WinQueryAnchorBlock( hWndSrv ); WinGetLastError( hAB ); // fehlercode zuruecksetzen WinSendMsg(hWndClient,WM_DDE_INITIATEACK,(MPARAM)hWndSrv,(MPARAM)pDDEData); if( WinGetLastError( hAB ) ) @@ -2331,11 +2331,11 @@ HCONV ImpDdeMgr::ConnectWithClient( HWND hWndClient, return hConv; } -MRESULT ImpDdeMgr::DdeInitiate( ImpWndProcParams* pParams ) +MRESULT ImpDdeMgr::DdeInitiate( ImpWndProcParams* pParams ) { ////WRITELOG("DdeInitiate:Received") HWND hWndClient = (HWND)(pParams->nPar1); -// BOOL bSameInst = IsSameInstance( hWndClient ); +// BOOL bSameInst = IsSameInstance( hWndClient ); BOOL bSameInst = (BOOL)(hWndClient==hWndServer); DDEINIT* pDDEData = (DDEINIT*)pParams->nPar2; @@ -2414,7 +2414,7 @@ MRESULT ImpDdeMgr::DdeInitiate( ImpWndProcParams* pParams ) return (MRESULT)TRUE; } -MRESULT ImpDdeMgr::DdeInitiateAck( ImpWndProcParams* pParams ) +MRESULT ImpDdeMgr::DdeInitiateAck( ImpWndProcParams* pParams ) { ////WRITELOG("DdeInitiateAck:Received") DDEINIT* pDDEData = (DDEINIT*)(pParams->nPar2); @@ -2431,10 +2431,10 @@ MRESULT ImpDdeMgr::DdeInitiateAck( ImpWndProcParams* pParams ) // Referenz-Count unseres Client-Windows inkrementieren IncConversationWndRefCount( hWndThis ); - HWND hWndSrv = (HWND)(pParams->nPar1); - HSZ hszService = DdeCreateStringHandle( pDDEData->pszAppName, 850 ); - HSZ hszTopic = DdeCreateStringHandle( pDDEData->pszTopic, 850 ); - HSZ hszPartnerApp = GetAppName( hWndSrv ); + HWND hWndSrv = (HWND)(pParams->nPar1); + HSZ hszService = DdeCreateStringHandle( pDDEData->pszAppName, 850 ); + HSZ hszTopic = DdeCreateStringHandle( pDDEData->pszTopic, 850 ); + HSZ hszPartnerApp = GetAppName( hWndSrv ); hCurConv = CreateConvHandle( pData, pidThis, hWndThis, hWndSrv, hszPartnerApp, hszService, hszTopic, 0 ); @@ -2473,7 +2473,7 @@ MRESULT ImpDdeMgr::DdeInitiateAck( ImpWndProcParams* pParams ) return (MRESULT)TRUE; } -MRESULT ImpDdeMgr::DdePoke( ImpWndProcParams* pParams ) +MRESULT ImpDdeMgr::DdePoke( ImpWndProcParams* pParams ) { ////WRITELOG("DdePoke:Received") HSZ hszItem = 0; @@ -2509,7 +2509,7 @@ MRESULT ImpDdeMgr::DdePoke( ImpWndProcParams* pParams ) return (MRESULT)0; } -MRESULT ImpDdeMgr::DdeRequest( ImpWndProcParams* pParams ) +MRESULT ImpDdeMgr::DdeRequest( ImpWndProcParams* pParams ) { ////WRITELOG("DdeRequest:Received") HSZ hszItem = 0; @@ -2554,15 +2554,15 @@ MRESULT ImpDdeMgr::DdeRequest( ImpWndProcParams* pParams ) } -MRESULT ImpDdeMgr::DdeUnadvise( ImpWndProcParams* pParams ) +MRESULT ImpDdeMgr::DdeUnadvise( ImpWndProcParams* pParams ) { ////WRITELOG("DdeUnadvise:Received") HSZ hszItem; - HCONV hConv = CheckIncoming( pParams, 0, hszItem ); + HCONV hConv = CheckIncoming( pParams, 0, hszItem ); DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2); - HWND hWndThis = pParams->hWndReceiver; - HWND hWndClient = (HWND)pParams->nPar1; + HWND hWndThis = pParams->hWndReceiver; + HWND hWndClient = (HWND)pParams->nPar1; USHORT nClosedTransactions = 0; if( hConv ) { @@ -2621,16 +2621,16 @@ BOOL ImpDdeMgr::WaitTransState( Transaction* pTrans, ULONG nTransId, ////WRITELOG("WaitTransState:Start") ImpHCONV* pConv = pConvTable; pConv += pTrans->hConvOwner; - HAB hAB = WinQueryAnchorBlock( pConv->hWndThis ); + HAB hAB = WinQueryAnchorBlock( pConv->hWndThis ); ULONG nTimerId = WinStartTimer( hAB, 0, 0, 50 ); QMSG aQueueMsg; -// while( WinGetMsg( hAB, &aQueueMsg, 0, 0, 0 ) && -// WinIsWindow( hAB, pConv->hWndPartner) && -// pTrans->nConvst != nNewState ) -// { -// WinDispatchMsg( hAB, &aQueueMsg ); -// } +// while( WinGetMsg( hAB, &aQueueMsg, 0, 0, 0 ) && +// WinIsWindow( hAB, pConv->hWndPartner) && +// pTrans->nConvst != nNewState ) +// { +// WinDispatchMsg( hAB, &aQueueMsg ); +// } BOOL bContinue = TRUE; while( bContinue ) diff --git a/svl/source/svdde/ddeml2.cxx b/svl/source/svdde/ddeml2.cxx index 7de4602d12ff..d27be304c887 100644 --- a/svl/source/svdde/ddeml2.cxx +++ b/svl/source/svdde/ddeml2.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -72,9 +72,9 @@ PSZ ImpDdeMgr::AllocAtomName( ATOM hString, ULONG& rBufLen ) PDDESTRUCT ImpDdeMgr::MakeDDEObject( HWND hwnd, ATOM hItemName, USHORT fsStatus, USHORT usFormat, PVOID pabData, ULONG usDataLen ) { - PDDESTRUCT pddes = 0; - ULONG usItemLen; - PULONG pulSharedObj; + PDDESTRUCT pddes = 0; + ULONG usItemLen; + PULONG pulSharedObj; //WRITELOG("MakeDDEObject: Start") PSZ pItemName = 0; @@ -125,7 +125,7 @@ APIRET ImpDdeMgr::AllocNamedSharedMem( PPVOID ppBaseAddress, PSZ pName, ULONG nElementSize, ULONG nElementCount ) { ULONG nObjSize = (ULONG)(nElementSize * nElementCount ); - nObjSize += sizeof( ULONG ); // fuer ElementCount am Anfang des Blocks + nObjSize += sizeof( ULONG ); // fuer ElementCount am Anfang des Blocks *ppBaseAddress = 0; APIRET nRet = MyDosAllocSharedMem( ppBaseAddress, pName, nObjSize, @@ -293,9 +293,9 @@ ImpDdeMgrData* ImpDdeMgr::InitAll() if( pBase ) { - pConvTable = ImpDdeMgr::GetConvTable( pBase ); + pConvTable = ImpDdeMgr::GetConvTable( pBase ); pTransTable = ImpDdeMgr::GetTransTable( pBase ); - pAppTable = ImpDdeMgr::GetAppTable( pBase ); + pAppTable = ImpDdeMgr::GetAppTable( pBase ); } memset( &aDefaultContext, 0, sizeof(CONVCONTEXT) ); @@ -338,17 +338,17 @@ HCONV ImpDdeMgr::CreateConvHandle( ImpDdeMgrData* pData, DdeKeepStringHandle( hszPartner ); DdeKeepStringHandle( hszServiceReq ); DdeKeepStringHandle( hszTopic ); - pPtr->hszPartner = hszPartner; + pPtr->hszPartner = hszPartner; pPtr->hszServiceReq = hszServiceReq; - pPtr->hszTopic = hszTopic; + pPtr->hszTopic = hszTopic; - pPtr->hWndThis = hWndMe; - pPtr->hWndPartner = hWndPartner; - pPtr->pidOwner = pidOwner; - pPtr->hConvPartner = (HCONV)0; - pPtr->nPrevHCONV = (USHORT)hPrevHCONV; - pPtr->nNextHCONV = 0; - pPtr->nStatus = ST_CONNECTED; + pPtr->hWndThis = hWndMe; + pPtr->hWndPartner = hWndPartner; + pPtr->pidOwner = pidOwner; + pPtr->hConvPartner = (HCONV)0; + pPtr->nPrevHCONV = (USHORT)hPrevHCONV; + pPtr->nNextHCONV = 0; + pPtr->nStatus = ST_CONNECTED; pData->nCurConvCount++; @@ -397,7 +397,7 @@ void ImpDdeMgr::FreeConvHandle( ImpDdeMgrData* pBase, HCONV hConv, DdeFreeStringHandle( pPtr->hszPartner ); DdeFreeStringHandle( pPtr->hszServiceReq ); - DdeFreeStringHandle( pPtr->hszTopic ); + DdeFreeStringHandle( pPtr->hszTopic ); if( bDestroyHWndThis ) DestroyConversationWnd( pPtr->hWndThis ); memset( pPtr, 0, sizeof(ImpHCONV) ); @@ -544,8 +544,8 @@ ULONG ImpDdeMgr::GetTransaction( ImpDdeMgrData* pBase, if( pTrans->hConvOwner ) { if(( pTrans->hConvOwner == hOwner || - pTrans->hConvOwner == hConvPartner) && - pTrans->nFormat == nFormat && + pTrans->hConvOwner == hConvPartner) && + pTrans->nFormat == nFormat && pTrans->hszItem == hszItem ) { // gefunden! @@ -640,7 +640,7 @@ HDDEDATA ImpDdeMgr::DdeCreateDataHandle( void* pSrc, ULONG cb, else nStatus = 0; PDDESTRUCT hData=MakeDDEObject(0,(ATOM)hszItem,nStatus,wFmt,pData,cb); -// WRITEDATA(hData) +// WRITEDATA(hData) if ( !hData ) ImpDdeMgr::nLastErrInstance = DMLERR_INVALIDPARAMETER; return (HDDEDATA)hData; @@ -752,7 +752,7 @@ void ImpDdeMgr::FreeTransactions( ImpDdeMgrData* pData, HCONV hConvOwner ) return; Transaction* pTrans = GetTransTable( pData ); -// ImpHCONV* pConvTable = GetConvTable( pData ); +// ImpHCONV* pConvTable = GetConvTable( pData ); pTrans++; for( USHORT nPos=1; nPos < pData->nMaxTransCount; nPos++, pTrans++ ) { diff --git a/svl/source/svdde/ddemldeb.cxx b/svl/source/svdde/ddemldeb.cxx index f921e93d2e9c..af27c1039646 100644 --- a/svl/source/svdde/ddemldeb.cxx +++ b/svl/source/svdde/ddemldeb.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/svdde/ddemldeb.hxx b/svl/source/svdde/ddemldeb.hxx index 8654bbd3ca65..b200621d39da 100644 --- a/svl/source/svdde/ddemldeb.hxx +++ b/svl/source/svdde/ddemldeb.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/svdde/ddemlimp.hxx b/svl/source/svdde/ddemlimp.hxx index 28c4bf248bbe..165e2f939560 100644 --- a/svl/source/svdde/ddemlimp.hxx +++ b/svl/source/svdde/ddemlimp.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,31 +33,31 @@ #include <ctype.h> #include "ddemlos2.h" -#define DDEMLSERVICETABLE_INISIZE 8 +#define DDEMLSERVICETABLE_INISIZE 8 // Bezeichner der systemglobalen DDEML-Tabelle -#define DDEMLDATA "\\SHAREMEM\\OV_DDEML.DAT" +#define DDEMLDATA "\\SHAREMEM\\OV_DDEML.DAT" // vorlaeufig konstante Tabellengroessen #define CONVTABLECOUNT 2048 /* max count conversations */ #define TRANSTABLECOUNT 2048 /* transactions */ -#define DDEMLAPPCOUNT 16 /* max count simultaniously running */ +#define DDEMLAPPCOUNT 16 /* max count simultaniously running */ /* ddeml (StarDivision) applications */ -#define ST_TERMACKREC 0x8000 /* wird im Conversationhandle gesetzt, */ +#define ST_TERMACKREC 0x8000 /* wird im Conversationhandle gesetzt, */ /* wenn die Partner-App DDE_TERMINATE */ /* bestaetigt hat */ -#define XST_TIMEOUT 17 /* Trans. hat Timeout ueberschritten */ -#define XST_WAITING_ACK 18 /* Trans. wartet auf Acknowledge */ -#define XST_WAITING_ADVDATA 19 /* Trans. wartet auf Advise-Daten */ -#define XST_WAITING_REQDATA 20 /* Trans. wartet auf angeforderte Daten */ +#define XST_TIMEOUT 17 /* Trans. hat Timeout ueberschritten */ +#define XST_WAITING_ACK 18 /* Trans. wartet auf Acknowledge */ +#define XST_WAITING_ADVDATA 19 /* Trans. wartet auf Advise-Daten */ +#define XST_WAITING_REQDATA 20 /* Trans. wartet auf angeforderte Daten */ /* User-Flags DDESTRUCT */ -#define IMP_HDATAAPPOWNED 0x8000 +#define IMP_HDATAAPPOWNED 0x8000 -#define CONVLISTNAME "DdeConvListId" +#define CONVLISTNAME "DdeConvListId" #define XTYPF_MASK (XTYPF_NOBLOCK | XTYPF_NODATA | XTYPF_ACKREQ) @@ -70,14 +70,14 @@ // eines neuen Services gesendet // Params: nPar1: hszBaseServName // nPar2: hszInstServName -#define WM_DDEML_REGISTER WM_USER+1 +#define WM_DDEML_REGISTER WM_USER+1 // Msg: WM_DDEML_UNREGISTER // Empfaenger: wird allen DDEML-Applikationen nach Deregistrierung // eines Services gesendet // Params: nPar1: hszBaseServName // nPar2: hszInstServName -#define WM_DDEML_UNREGISTER WM_USER+2 +#define WM_DDEML_UNREGISTER WM_USER+2 // // @@ -85,58 +85,58 @@ struct ImpHCONV { - HCONV hConvPartner; - HSZ hszPartner; // Name of partner application - HSZ hszServiceReq; // Service name - HSZ hszTopic; // Topic name - USHORT nStatus; // ST_* of conversation - HCONVLIST hConvList; // ConvListId , wenn in ConvList - CONVCONTEXT aConvContext; // Conversation context + HCONV hConvPartner; + HSZ hszPartner; // Name of partner application + HSZ hszServiceReq; // Service name + HSZ hszTopic; // Topic name + USHORT nStatus; // ST_* of conversation + HCONVLIST hConvList; // ConvListId , wenn in ConvList + CONVCONTEXT aConvContext; // Conversation context // private - HWND hWndThis; // 0 == Handle not used - HWND hWndPartner; - PID pidOwner; // PID des DdeManagers, der + HWND hWndThis; // 0 == Handle not used + HWND hWndPartner; + PID pidOwner; // PID des DdeManagers, der // den Conv-Handle erzeugt hat. - USHORT nPrevHCONV; // 0 == no previous hConv or not in list - USHORT nNextHCONV; // 0 == no next hconv or not in list + USHORT nPrevHCONV; // 0 == no previous hConv or not in list + USHORT nNextHCONV; // 0 == no next hconv or not in list }; struct Transaction { - HSZ hszItem; // Item name - USHORT nFormat; // Data format - USHORT nType; // Transaction type (XTYP_*) + HSZ hszItem; // Item name + USHORT nFormat; // Data format + USHORT nType; // Transaction type (XTYP_*) // XTYP_ADVREQ [|XTYPF_NODATA] == Advise-Loop - // [|XTYPF_ACKREQ] + // [|XTYPF_ACKREQ] // XTYP_EXECUTE == laufendes Execute // XTYP_REQUEST // XTYP_POKE // XTYP_ADVSTOP // XTYP_ADVSTART - USHORT nConvst; // Conversation state (XST_*) + USHORT nConvst; // Conversation state (XST_*) // 0 == idle // XST_REQSENT (fuer XTYP_ADVREQ) // XST_TIMEOUT (fuer alle Typen!) // XST_WAITING (alle ausser XTYP_ADVREQ) - USHORT nLastError; // last err in transaction - ULONG nUser; // Userhandle + USHORT nLastError; // last err in transaction + ULONG nUser; // Userhandle // private - HCONV hConvOwner; // 0 == Transaction not used + HCONV hConvOwner; // 0 == Transaction not used }; struct ImpWndProcParams { - HWND hWndReceiver; - MPARAM nPar1; - MPARAM nPar2; + HWND hWndReceiver; + MPARAM nPar1; + MPARAM nPar2; }; struct ImpService { - HSZ hBaseServName; // Basis-Name des Service - HSZ hInstServName; // Basis-Name + DDEML-Server-HWND der App + HSZ hBaseServName; // Basis-Name des Service + HSZ hInstServName; // Basis-Name + DDEML-Server-HWND der App }; class ImpDdeMgr; @@ -145,27 +145,27 @@ class ImpDdeMgr; struct ImpConvWndData { ImpDdeMgr* pThis; - USHORT nRefCount; // Zahl Conversations auf diesem Window + USHORT nRefCount; // Zahl Conversations auf diesem Window }; // systemglobale Daten der Library (liegen in named shared memory) struct ImpDdeMgrData { - ULONG nTotalSize; - ULONG nOffsAppTable; - ULONG nOffsConvTable; - ULONG nOffsTransTable; - USHORT nMaxAppCount; - USHORT nMaxConvCount; - USHORT nMaxTransCount; - USHORT nLastErr; - USHORT nReserved; - USHORT nCurTransCount; - USHORT nCurConvCount; - HWND aAppTable[ 1 ]; // fuer Broadcast-Messages - ImpHCONV aConvTable[ 1 ]; - Transaction aTransTable[ 1 ]; + ULONG nTotalSize; + ULONG nOffsAppTable; + ULONG nOffsConvTable; + ULONG nOffsTransTable; + USHORT nMaxAppCount; + USHORT nMaxConvCount; + USHORT nMaxTransCount; + USHORT nLastErr; + USHORT nReserved; + USHORT nCurTransCount; + USHORT nCurConvCount; + HWND aAppTable[ 1 ]; // fuer Broadcast-Messages + ImpHCONV aConvTable[ 1 ]; + Transaction aTransTable[ 1 ]; }; @@ -177,67 +177,67 @@ class ImpDdeMgr friend void ImpWriteDdeStatus(char*,char*); friend void ImpAddHSZ( HSZ, String& ); - static PSZ AllocAtomName( ATOM hString, ULONG& rBufLen ); + static PSZ AllocAtomName( ATOM hString, ULONG& rBufLen ); static PDDESTRUCT MakeDDEObject( HWND hwnd, ATOM hItemName, USHORT fsStatus, USHORT usFormat, PVOID pabData, ULONG usDataLen ); - static APIRET AllocNamedSharedMem( PPVOID ppBaseAddress, PSZ pName, + static APIRET AllocNamedSharedMem( PPVOID ppBaseAddress, PSZ pName, ULONG nElementSize, ULONG nElementCount ); - HWND hWndServer; - PID pidThis; - PFNCALLBACK pCallback; - ULONG nTransactFilter; - CONVCONTEXT aDefaultContext; - ImpDdeMgrData* pData; - ImpService* pServices; - USHORT nServiceCount; + HWND hWndServer; + PID pidThis; + PFNCALLBACK pCallback; + ULONG nTransactFilter; + CONVCONTEXT aDefaultContext; + ImpDdeMgrData* pData; + ImpService* pServices; + USHORT nServiceCount; - ImpHCONV* pConvTable; // liegt in pData (nicht deleten!) - Transaction* pTransTable; // liegt in pData (nicht deleten!) - HWND* pAppTable; // liegt in pData (nicht deleten!) + ImpHCONV* pConvTable; // liegt in pData (nicht deleten!) + Transaction* pTransTable; // liegt in pData (nicht deleten!) + HWND* pAppTable; // liegt in pData (nicht deleten!) - static ImpHCONV* GetConvTable( ImpDdeMgrData* ); + static ImpHCONV* GetConvTable( ImpDdeMgrData* ); static Transaction* GetTransTable( ImpDdeMgrData* ); - static HWND* GetAppTable( ImpDdeMgrData* ); + static HWND* GetAppTable( ImpDdeMgrData* ); - static HWND NextFrameWin( HENUM hEnum ); - void CreateServerWnd(); - void DestroyServerWnd(); - HWND CreateConversationWnd(); + static HWND NextFrameWin( HENUM hEnum ); + void CreateServerWnd(); + void DestroyServerWnd(); + HWND CreateConversationWnd(); // Fktn. duerfen nur fuer HCONVs aufgerufen werden, die // in der eigenen Applikation erzeugt wurden - static void DestroyConversationWnd( HWND hWndConv ); - static USHORT GetConversationWndRefCount( HWND hWndConv ); - static USHORT IncConversationWndRefCount( HWND hWndConv ); - - MRESULT SrvWndProc(HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2); - MRESULT ConvWndProc(HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2); - void RegisterDDEMLApp(); - void UnregisterDDEMLApp(); - void CleanUp(); - ImpDdeMgrData* InitAll(); - static BOOL MyWinDdePostMsg( HWND, HWND, USHORT, PDDESTRUCT, ULONG ); - void MyInitiateDde( HWND hWndServer, HWND hWndClient, + static void DestroyConversationWnd( HWND hWndConv ); + static USHORT GetConversationWndRefCount( HWND hWndConv ); + static USHORT IncConversationWndRefCount( HWND hWndConv ); + + MRESULT SrvWndProc(HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2); + MRESULT ConvWndProc(HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2); + void RegisterDDEMLApp(); + void UnregisterDDEMLApp(); + void CleanUp(); + ImpDdeMgrData* InitAll(); + static BOOL MyWinDdePostMsg( HWND, HWND, USHORT, PDDESTRUCT, ULONG ); + void MyInitiateDde( HWND hWndServer, HWND hWndClient, HSZ hszService, HSZ hszTopic, CONVCONTEXT* pCC ); - DDEINIT* CreateDDEInitData( HWND hWndDest, HSZ hszService, + DDEINIT* CreateDDEInitData( HWND hWndDest, HSZ hszService, HSZ hszTopic, CONVCONTEXT* pCC ); // wenn pDDEData==0, muss pCC gesetzt sein - HCONV ConnectWithClient( HWND hWndClient, HSZ hszPartner, + HCONV ConnectWithClient( HWND hWndClient, HSZ hszPartner, HSZ hszService, HSZ hszTopic, BOOL bSameInst, DDEINIT* pDDEData, CONVCONTEXT* pCC = 0); - HCONV CheckIncoming( ImpWndProcParams*, ULONG nTransMask, + HCONV CheckIncoming( ImpWndProcParams*, ULONG nTransMask, HSZ& rhszItem ); // fuer Serverbetrieb. Ruft Callback-Fkt fuer alle offenen Advises // auf, deren Owner der uebergebene HCONV ist. // bFreeTransactions==TRUE: loescht die Transaktionen // gibt Anzahl der getrennten Transaktionen zurueck - USHORT SendUnadvises( HCONV hConv, + USHORT SendUnadvises( HCONV hConv, USHORT nFormat, // 0==alle BOOL bFreeTransactions ); - BOOL WaitTransState( + BOOL WaitTransState( Transaction* pTrans, ULONG nTransId, USHORT nNewState, ULONG nTimeout ); @@ -245,142 +245,142 @@ class ImpDdeMgr // DDEML ruft Callback mit XTYP_CONNECT-Transaction nur auf, // wenn die App den angeforderten Service registriert hat // Standardeinstellung: TRUE - BOOL bServFilterOn; + BOOL bServFilterOn; // Fehlercode muss noch systemglobal werden (Atom o. ae.) - static USHORT nLastErrInstance; // wenn 0, dann gilt globaler Fehlercode + static USHORT nLastErrInstance; // wenn 0, dann gilt globaler Fehlercode static ImpDdeMgrData* AccessMgrData(); - static HCONV CreateConvHandle( ImpDdeMgrData* pBase, + static HCONV CreateConvHandle( ImpDdeMgrData* pBase, PID pidOwner, HWND hWndThis, HWND hWndPartner, HSZ hszPartner, HSZ hszServiceReq, HSZ hszTopic, HCONV hPrevHCONV = 0 ); - static HCONV IsConvHandleAvailable( ImpDdeMgrData* pBase ); - static HCONV GetConvHandle( ImpDdeMgrData* pBase, + static HCONV IsConvHandleAvailable( ImpDdeMgrData* pBase ); + static HCONV GetConvHandle( ImpDdeMgrData* pBase, HWND hWndThis, HWND hWndPartner ); - static void FreeConvHandle( ImpDdeMgrData*, HCONV, + static void FreeConvHandle( ImpDdeMgrData*, HCONV, BOOL bDestroyHWndThis = TRUE ); - static ULONG CreateTransaction( ImpDdeMgrData* pBase, + static ULONG CreateTransaction( ImpDdeMgrData* pBase, HCONV hOwner, HSZ hszItem, USHORT nFormat, USHORT nTransactionType ); - static ULONG GetTransaction( ImpDdeMgrData* pBase, + static ULONG GetTransaction( ImpDdeMgrData* pBase, HCONV hOwner, HSZ hszItem, USHORT nFormat ); - static void FreeTransaction( ImpDdeMgrData*, ULONG nTransId ); + static void FreeTransaction( ImpDdeMgrData*, ULONG nTransId ); - BOOL DisconnectAll(); + BOOL DisconnectAll(); // Transaktionen muessen _vor_ den Konversationen geloescht werden! - static void FreeTransactions( ImpDdeMgrData*, HWND hWndThis, + static void FreeTransactions( ImpDdeMgrData*, HWND hWndThis, HWND hWndPartner ); - static void FreeTransactions( ImpDdeMgrData*, HCONV hConvOwner ); + static void FreeTransactions( ImpDdeMgrData*, HCONV hConvOwner ); - static void FreeConversations( ImpDdeMgrData*,HWND hWndThis, + static void FreeConversations( ImpDdeMgrData*,HWND hWndThis, HWND hWndPartner ); - ImpService* GetService( HSZ hszService ); - ImpService* PutService( HSZ hszService ); - void BroadcastService( ImpService*, BOOL bRegistered ); + ImpService* GetService( HSZ hszService ); + ImpService* PutService( HSZ hszService ); + void BroadcastService( ImpService*, BOOL bRegistered ); // rh: Startposition(!) & gefundener Handle static ImpHCONV* GetFirstServer( ImpDdeMgrData*, HCONVLIST, HCONV& rh); static ImpHCONV* GetLastServer( ImpDdeMgrData*, HCONVLIST, HCONV& ); - static BOOL CheckConvListId( HCONVLIST hConvListId ); + static BOOL CheckConvListId( HCONVLIST hConvListId ); - BOOL IsSameInstance( HWND hWnd ); - HSZ GetAppName( HWND hWnd ); + BOOL IsSameInstance( HWND hWnd ); + HSZ GetAppName( HWND hWnd ); // Transactions - MRESULT DdeAck( ImpWndProcParams* pParams ); - MRESULT DdeAdvise( ImpWndProcParams* pParams ); - MRESULT DdeData( ImpWndProcParams* pParams ); - MRESULT DdeExecute( ImpWndProcParams* pParams ); - MRESULT DdeInitiate( ImpWndProcParams* pParams ); - MRESULT DdeInitiateAck( ImpWndProcParams* pParams ); - MRESULT DdePoke( ImpWndProcParams* pParams ); - MRESULT DdeRequest( ImpWndProcParams* pParams ); - MRESULT DdeTerminate( ImpWndProcParams* pParams ); - MRESULT DdeUnadvise( ImpWndProcParams* pParams ); - MRESULT DdeRegister( ImpWndProcParams* pParams ); - MRESULT DdeUnregister( ImpWndProcParams* pParams ); - MRESULT DdeTimeout( ImpWndProcParams* pParams ); - - HDDEDATA Callback( - USHORT nTransactionType, - USHORT nClipboardFormat, - HCONV hConversationHandle, - HSZ hsz1, - HSZ hsz2, + MRESULT DdeAck( ImpWndProcParams* pParams ); + MRESULT DdeAdvise( ImpWndProcParams* pParams ); + MRESULT DdeData( ImpWndProcParams* pParams ); + MRESULT DdeExecute( ImpWndProcParams* pParams ); + MRESULT DdeInitiate( ImpWndProcParams* pParams ); + MRESULT DdeInitiateAck( ImpWndProcParams* pParams ); + MRESULT DdePoke( ImpWndProcParams* pParams ); + MRESULT DdeRequest( ImpWndProcParams* pParams ); + MRESULT DdeTerminate( ImpWndProcParams* pParams ); + MRESULT DdeUnadvise( ImpWndProcParams* pParams ); + MRESULT DdeRegister( ImpWndProcParams* pParams ); + MRESULT DdeUnregister( ImpWndProcParams* pParams ); + MRESULT DdeTimeout( ImpWndProcParams* pParams ); + + HDDEDATA Callback( + USHORT nTransactionType, + USHORT nClipboardFormat, + HCONV hConversationHandle, + HSZ hsz1, + HSZ hsz2, HDDEDATA hData, - ULONG nData1, - ULONG nData2 ); + ULONG nData1, + ULONG nData2 ); - HCONV DdeConnectImp( HSZ hszService,HSZ hszTopic,CONVCONTEXT* pCC); + HCONV DdeConnectImp( HSZ hszService,HSZ hszTopic,CONVCONTEXT* pCC); // connection data - HCONV hCurConv; // wird im DdeInitiateAck gesetzt - HCONVLIST hCurListId; // fuer DdeConnectList - USHORT nPrevConv; // .... "" .... - BOOL bListConnect; + HCONV hCurConv; // wird im DdeInitiateAck gesetzt + HCONVLIST hCurListId; // fuer DdeConnectList + USHORT nPrevConv; // .... "" .... + BOOL bListConnect; // synchr. transaction data - BOOL bInSyncTrans; - ULONG nSyncTransId; - HDDEDATA hSyncResponseData; - ULONG nSyncResponseMsg; // WM_DDE_ACK, WM_DDE_DATA, WM_TIMER + BOOL bInSyncTrans; + ULONG nSyncTransId; + HDDEDATA hSyncResponseData; + ULONG nSyncResponseMsg; // WM_DDE_ACK, WM_DDE_DATA, WM_TIMER // TRUE==nach Ende der synchronen Transaktion eine evtl. benutzte // asynchrone Transaktion beenden (typisch synchroner Request auf // Advise-Loop) - BOOL bSyncAbandonTrans; + BOOL bSyncAbandonTrans; public: ImpDdeMgr(); ~ImpDdeMgr(); - USHORT DdeInitialize( PFNCALLBACK pCallbackProc, ULONG nTransactionFilter ); - USHORT DdeGetLastError(); + USHORT DdeInitialize( PFNCALLBACK pCallbackProc, ULONG nTransactionFilter ); + USHORT DdeGetLastError(); - HCONV DdeConnect( HSZ hszService, HSZ hszTopic, CONVCONTEXT* ); - HCONVLIST DdeConnectList( HSZ hszService, HSZ hszTopic, + HCONV DdeConnect( HSZ hszService, HSZ hszTopic, CONVCONTEXT* ); + HCONVLIST DdeConnectList( HSZ hszService, HSZ hszTopic, HCONVLIST hConvList, CONVCONTEXT* ); - static BOOL DdeDisconnect( HCONV hConv ); - static BOOL DdeDisconnectList( HCONVLIST hConvList ); - static HCONV DdeReconnect(HCONV hConv); - static HCONV DdeQueryNextServer(HCONVLIST hConvList, HCONV hConvPrev); - static USHORT DdeQueryConvInfo(HCONV hConv, ULONG idTrans,CONVINFO* pCI); - static BOOL DdeSetUserHandle(HCONV hConv, ULONG id, ULONG hUser); - BOOL DdeAbandonTransaction( HCONV hConv, ULONG idTransaction); + static BOOL DdeDisconnect( HCONV hConv ); + static BOOL DdeDisconnectList( HCONVLIST hConvList ); + static HCONV DdeReconnect(HCONV hConv); + static HCONV DdeQueryNextServer(HCONVLIST hConvList, HCONV hConvPrev); + static USHORT DdeQueryConvInfo(HCONV hConv, ULONG idTrans,CONVINFO* pCI); + static BOOL DdeSetUserHandle(HCONV hConv, ULONG id, ULONG hUser); + BOOL DdeAbandonTransaction( HCONV hConv, ULONG idTransaction); - BOOL DdePostAdvise( HSZ hszTopic, HSZ hszItem); - BOOL DdeEnableCallback( HCONV hConv, USHORT wCmd); + BOOL DdePostAdvise( HSZ hszTopic, HSZ hszItem); + BOOL DdeEnableCallback( HCONV hConv, USHORT wCmd); - HDDEDATA DdeNameService( HSZ hszService, USHORT afCmd); + HDDEDATA DdeNameService( HSZ hszService, USHORT afCmd); - static HDDEDATA DdeClientTransaction(void* pData, ULONG cbData, + static HDDEDATA DdeClientTransaction(void* pData, ULONG cbData, HCONV hConv, HSZ hszItem, USHORT wFmt, USHORT wType, ULONG dwTimeout, ULONG* pdwResult); // Data handles - HDDEDATA DdeCreateDataHandle( void* pSrc, ULONG cb, ULONG cbOff, + HDDEDATA DdeCreateDataHandle( void* pSrc, ULONG cb, ULONG cbOff, HSZ hszItem, USHORT wFmt, USHORT afCmd); - static BYTE* DdeAccessData(HDDEDATA hData, ULONG* pcbDataSize); - static BOOL DdeUnaccessData(HDDEDATA hData); - static BOOL DdeFreeDataHandle(HDDEDATA hData); + static BYTE* DdeAccessData(HDDEDATA hData, ULONG* pcbDataSize); + static BOOL DdeUnaccessData(HDDEDATA hData); + static BOOL DdeFreeDataHandle(HDDEDATA hData); static HDDEDATA DdeAddData(HDDEDATA hData,void* pSrc,ULONG cb,ULONG cbOff); - static ULONG DdeGetData(HDDEDATA hData,void* pDst,ULONG cbMax,ULONG cbOff); + static ULONG DdeGetData(HDDEDATA hData,void* pDst,ULONG cbMax,ULONG cbOff); // String handles - static HSZ DdeCreateStringHandle( PSZ pStr, int iCodePage); - static ULONG DdeQueryString(HSZ hsz,PSZ pStr,ULONG cchMax,int iCPage); - static BOOL DdeFreeStringHandle( HSZ hsz ); - static BOOL DdeKeepStringHandle( HSZ hsz ); - static int DdeCmpStringHandles(HSZ hsz1, HSZ hsz2); + static HSZ DdeCreateStringHandle( PSZ pStr, int iCodePage); + static ULONG DdeQueryString(HSZ hsz,PSZ pStr,ULONG cchMax,int iCPage); + static BOOL DdeFreeStringHandle( HSZ hsz ); + static BOOL DdeKeepStringHandle( HSZ hsz ); + static int DdeCmpStringHandles(HSZ hsz1, HSZ hsz2); // mit dieser Funktion kann geprueft werden, ob eine // Applikation schon eine DDEML-Instanz angelegt hat. @@ -390,7 +390,7 @@ public: // gibt TRUE zurueck, wenn mind. ein lebender HCONV // von diesem DdeMgr erzeugt wurde - BOOL OwnsConversationHandles(); + BOOL OwnsConversationHandles(); }; // static diff --git a/svl/source/svdde/ddemlos2.h b/svl/source/svdde/ddemlos2.h index bdd31e470bcd..8a00aa63ba02 100644 --- a/svl/source/svdde/ddemlos2.h +++ b/svl/source/svdde/ddemlos2.h @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,27 +42,27 @@ typedef LHANDLE HSTR; #endif -typedef ULONG HCONVLIST; -typedef ULONG HCONV; -typedef ATOM HSZ; -typedef DDESTRUCT* HDDEDATA; +typedef ULONG HCONVLIST; +typedef ULONG HCONV; +typedef ATOM HSZ; +typedef DDESTRUCT* HDDEDATA; struct CONVINFO { - USHORT nSize; // sizeof(CONVINFO) - ULONG nUser; // Userhandle - HCONV hConvPartner; // - HSZ hszPartner; // Name der Partnerapp - HSZ hszServiceReq; // Name des angeforderten Services - HSZ hszTopic; // -- " -- Topics - HSZ hszItem; // -- " -- Items - USHORT nFormat; // Datenformat der akt. Transaktion - USHORT nType; // Typ der akt. Transaktion (XTYP_*) - USHORT nStatus; // ST_* der Konversation - USHORT nConvst; // XST_* der akt. Transaktion - USHORT nLastError; // letzter Fehler der Transaktion - HCONVLIST hConvList; // ConvListId , wenn in ConvList - CONVCONTEXT aConvCtxt; // conversation context + USHORT nSize; // sizeof(CONVINFO) + ULONG nUser; // Userhandle + HCONV hConvPartner; // + HSZ hszPartner; // Name der Partnerapp + HSZ hszServiceReq; // Name des angeforderten Services + HSZ hszTopic; // -- " -- Topics + HSZ hszItem; // -- " -- Items + USHORT nFormat; // Datenformat der akt. Transaktion + USHORT nType; // Typ der akt. Transaktion (XTYP_*) + USHORT nStatus; // ST_* der Konversation + USHORT nConvst; // XST_* der akt. Transaktion + USHORT nLastError; // letzter Fehler der Transaktion + HCONVLIST hConvList; // ConvListId , wenn in ConvList + CONVCONTEXT aConvCtxt; // conversation context }; /* the following structure is for use with XTYP_WILDCONNECT processing. */ @@ -324,50 +324,50 @@ int DdeCmpStringHandles(HSZ hsz1, HSZ hsz2); /* von OS/2 nicht unterstuetzte Win3.1 Clipboard-Formate */ -#define CF_NOTSUPPORTED_BASE 0xff00 +#define CF_NOTSUPPORTED_BASE 0xff00 #ifndef CF_DIB -#define CF_DIB CF_NOTSUPPORTED_BASE+1 +#define CF_DIB CF_NOTSUPPORTED_BASE+1 #endif #ifndef CF_DIF -#define CF_DIF CF_NOTSUPPORTED_BASE+2 +#define CF_DIF CF_NOTSUPPORTED_BASE+2 #endif #ifndef CF_DSPMETAFILEPICT -#define CF_DSPMETAFILEPICT CF_NOTSUPPORTED_BASE+3 +#define CF_DSPMETAFILEPICT CF_NOTSUPPORTED_BASE+3 #endif #ifndef CF_METAFILEPICT -#define CF_METAFILEPICT CF_NOTSUPPORTED_BASE+4 +#define CF_METAFILEPICT CF_NOTSUPPORTED_BASE+4 #endif #ifndef CF_OEMTEXT -#define CF_OEMTEXT CF_NOTSUPPORTED_BASE+5 +#define CF_OEMTEXT CF_NOTSUPPORTED_BASE+5 #endif #ifndef CF_OWNERDISPLAY -#define CF_OWNERDISPLAY CF_NOTSUPPORTED_BASE+6 +#define CF_OWNERDISPLAY CF_NOTSUPPORTED_BASE+6 #endif #ifndef CF_PENDATA -#define CF_PENDATA CF_NOTSUPPORTED_BASE+7 +#define CF_PENDATA CF_NOTSUPPORTED_BASE+7 #endif #ifndef CF_RIFF -#define CF_RIFF CF_NOTSUPPORTED_BASE+8 +#define CF_RIFF CF_NOTSUPPORTED_BASE+8 #endif #ifndef CF_SYLK -#define CF_SYLK CF_NOTSUPPORTED_BASE+9 +#define CF_SYLK CF_NOTSUPPORTED_BASE+9 #endif #ifndef CF_TIFF -#define CF_TIFF CF_NOTSUPPORTED_BASE+10 +#define CF_TIFF CF_NOTSUPPORTED_BASE+10 #endif #ifndef CF_WAVE -#define CF_WAVE CF_NOTSUPPORTED_BASE+11 +#define CF_WAVE CF_NOTSUPPORTED_BASE+11 #endif diff --git a/svl/source/svdde/ddestrg.cxx b/svl/source/svdde/ddestrg.cxx index 4f0e2464a276..5288908e5d6a 100644 --- a/svl/source/svdde/ddestrg.cxx +++ b/svl/source/svdde/ddestrg.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx index c361f259d610..1b7664f6d21f 100644 --- a/svl/source/svdde/ddesvr.cxx +++ b/svl/source/svdde/ddesvr.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -1014,7 +1014,7 @@ String DdeService::Formats() String s; long f; TCHAR buf[128]; - LPCTSTR p; + LPCTSTR p; short n = 0; for ( f = aFormats.First(); f; f = aFormats.Next(), n++ ) diff --git a/svl/source/svdde/ddewrap.cxx b/svl/source/svdde/ddewrap.cxx index 7e75fef55898..bbd8eb746732 100644 --- a/svl/source/svdde/ddewrap.cxx +++ b/svl/source/svdde/ddewrap.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,9 +43,9 @@ HSZ WINAPI DdeCreateStringHandleW_9x( DWORD idInst, LPCWSTR pszString, int ) { - HSZ hszResult; - LPSTR pszANSIString; - int nSize; + HSZ hszResult; + LPSTR pszANSIString; + int nSize; nSize = pszString ? WideCharToMultiByte( CP_ACP, 0, pszString, -1, NULL, 0, NULL, NULL ) : 0; pszANSIString = nSize ? (LPSTR)HeapAlloc( GetProcessHeap(), 0, nSize * sizeof(CHAR) ) : NULL; @@ -65,8 +65,8 @@ HSZ WINAPI DdeCreateStringHandleW_9x( DWORD idInst, LPCWSTR pszString, int ) DWORD WINAPI DdeQueryStringW_9x( DWORD idInst, HSZ hsz, LPWSTR pszString, DWORD cchMax, int ) { - DWORD dwResult; - LPSTR pszANSIString; + DWORD dwResult; + LPSTR pszANSIString; pszANSIString = cchMax ? (LPSTR)HeapAlloc( GetProcessHeap(), 0, cchMax * sizeof(CHAR) ) : NULL; diff --git a/svl/source/svdde/ddewrap.hxx b/svl/source/svdde/ddewrap.hxx index 77d012ccbba5..793d5c972e01 100644 --- a/svl/source/svdde/ddewrap.hxx +++ b/svl/source/svdde/ddewrap.hxx @@ -15,9 +15,9 @@ DECLARE_WAPI_FUNC( DdeInitializeW ); #ifndef _SVTOOLS_SVDDE_DDEWRAP_CXX_ -#define DdeCreateStringHandleW lpfnDdeCreateStringHandleW -#define DdeQueryStringW lpfnDdeQueryStringW -#define DdeInitializeW lpfnDdeInitializeW +#define DdeCreateStringHandleW lpfnDdeCreateStringHandleW +#define DdeQueryStringW lpfnDdeQueryStringW +#define DdeInitializeW lpfnDdeInitializeW #endif diff --git a/svl/source/svsql/converter.cxx b/svl/source/svsql/converter.cxx index ee36914289a3..354abdcc7bea 100644 --- a/svl/source/svsql/converter.cxx +++ b/svl/source/svsql/converter.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx index fa5eca964a8c..003f8752f68f 100644 --- a/svl/source/undo/undo.cxx +++ b/svl/source/undo/undo.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -184,7 +184,7 @@ void SfxUndoManager::SetMaxUndoActionCount( USHORT nMaxUndoActionCount ) // the number of entries due to a lower nMaxUndoActionCount. // Both redo and undo action entries will be removed until we reached the // new nMaxUndoActionCount. - + long nNumToDelete = pActUndoArray->aUndoActions.Count() - nMaxUndoActionCount; if ( nNumToDelete > 0 ) { @@ -211,7 +211,7 @@ void SfxUndoManager::SetMaxUndoActionCount( USHORT nMaxUndoActionCount ) --nNumToDelete; } } - + if ( nPos == pActUndoArray->aUndoActions.Count() ) break; // Cannot delete more entries } @@ -377,9 +377,9 @@ void SfxUndoManager::RemoveLastUndoAction() BOOL SfxUndoManager::Undo( USHORT ) { - bool bUndoWasEnabled = mbUndoEnabled; + bool bUndoWasEnabled = mbUndoEnabled; mbUndoEnabled = false; - + BOOL bRet = FALSE; try @@ -404,7 +404,7 @@ BOOL SfxUndoManager::Undo( USHORT ) void SfxUndoManager::Undo( SfxUndoAction &rAction ) { - bool bUndoWasEnabled = mbUndoEnabled; + bool bUndoWasEnabled = mbUndoEnabled; mbUndoEnabled = false; try { @@ -444,9 +444,9 @@ USHORT SfxUndoManager::GetRedoActionId( USHORT nNo ) const BOOL SfxUndoManager::Redo( USHORT ) { - bool bUndoWasEnabled = mbUndoEnabled; + bool bUndoWasEnabled = mbUndoEnabled; mbUndoEnabled = false; - + BOOL bRet = FALSE; try @@ -471,7 +471,7 @@ BOOL SfxUndoManager::Redo( USHORT ) void SfxUndoManager::Redo( SfxUndoAction &rAction ) { - bool bUndoWasEnabled = mbUndoEnabled; + bool bUndoWasEnabled = mbUndoEnabled; mbUndoEnabled = false; try @@ -548,7 +548,7 @@ BOOL SfxUndoManager::CanRepeat( SfxRepeatTarget &rTarget, USHORT nNo ) const void SfxUndoManager::EnterListAction( const XubString& rComment, const XubString &rRepeatComment, USHORT nId ) -/* [Beschreibung] +/* [Beschreibung] Fuegt eine ListUndoAction ein und setzt dessen UndoArray als aktuelles. */ @@ -571,7 +571,7 @@ void SfxUndoManager::EnterListAction( void SfxUndoManager::LeaveListAction() -/* [Beschreibung] +/* [Beschreibung] Verlaesst die aktuelle ListAction und geht eine Ebene nach oben. */ @@ -657,7 +657,7 @@ SfxListUndoAction::SfxListUndoAction USHORT Id, SfxUndoArray *pFather ) -: nId(Id), aComment(rComment), aRepeatComment(rRepeatComment) +: nId(Id), aComment(rComment), aRepeatComment(rRepeatComment) { pFatherUndoArray = pFather; nMaxUndoActions = USHRT_MAX; @@ -709,7 +709,7 @@ BOOL SfxListUndoAction::Merge( SfxUndoAction *pNextAction ) //------------------------------------------------------------------------ SfxLinkUndoAction::SfxLinkUndoAction(SfxUndoManager *pManager) -/* [Beschreibung] +/* [Beschreibung] Richtet eine LinkAction ein, die auf einen weiteren UndoManager zeigt. Holt sich als zugehoerige Action des weiteren UndoManagers dessen diff --git a/svl/source/uno/pathservice.cxx b/svl/source/uno/pathservice.cxx index 1a3be47713a1..16917d92eabf 100644 --- a/svl/source/uno/pathservice.cxx +++ b/svl/source/uno/pathservice.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svl/source/uno/registerservices.cxx b/svl/source/uno/registerservices.cxx index ab01d308c2da..f34fe118d615 100644 --- a/svl/source/uno/registerservices.cxx +++ b/svl/source/uno/registerservices.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -147,5 +147,5 @@ SVL_DLLPUBLIC void* SAL_CALL component_getFactory ( return pResult; } -} // "C" +} // "C" |