diff options
-rw-r--r-- | include/svl/filerec.hxx | 4 | ||||
-rw-r--r-- | include/svl/inettype.hxx | 3 | ||||
-rw-r--r-- | include/svl/itempool.hxx | 2 | ||||
-rw-r--r-- | include/svl/itemset.hxx | 7 | ||||
-rw-r--r-- | include/svl/undo.hxx | 4 | ||||
-rw-r--r-- | include/svl/urihelper.hxx | 3 | ||||
-rw-r--r-- | include/svl/zforlist.hxx | 4 | ||||
-rw-r--r-- | include/svl/zformat.hxx | 11 | ||||
-rw-r--r-- | svl/source/filerec/filerec.cxx | 10 | ||||
-rw-r--r-- | svl/source/items/itempool.cxx | 4 | ||||
-rw-r--r-- | svl/source/items/itemset.cxx | 50 | ||||
-rw-r--r-- | svl/source/misc/inethist.cxx | 8 | ||||
-rw-r--r-- | svl/source/misc/inettype.cxx | 7 | ||||
-rw-r--r-- | svl/source/misc/urihelper.cxx | 9 | ||||
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 8 | ||||
-rw-r--r-- | svl/source/numbers/zformat.cxx | 65 | ||||
-rw-r--r-- | svl/source/undo/undo.cxx | 4 |
17 files changed, 64 insertions, 139 deletions
diff --git a/include/svl/filerec.hxx b/include/svl/filerec.hxx index b5685f33949f..063d2961908f 100644 --- a/include/svl/filerec.hxx +++ b/include/svl/filerec.hxx @@ -386,7 +386,7 @@ protected: public: inline ~SfxMultiFixRecordWriter(); - sal_uInt32 Close( bool bSeekToEndOfRec = true ); + sal_uInt32 Close(); }; /** write record with multiple content items @@ -450,7 +450,7 @@ public: void NewContent(); - sal_uInt32 Close( bool bSeekToEndOfRec = true ); + sal_uInt32 Close(); }; /** write record with multiple content items with identical size diff --git a/include/svl/inettype.hxx b/include/svl/inettype.hxx index 4fe32060585b..a5282a53feea 100644 --- a/include/svl/inettype.hxx +++ b/include/svl/inettype.hxx @@ -219,8 +219,7 @@ class SVL_DLLPUBLIC INetContentTypes public: static INetContentType RegisterContentType(OUString const & rTypeName, OUString const & rPresentation, - OUString const * pExtension = nullptr, - OUString const * pSystemFileType = nullptr); + OUString const * pExtension = nullptr); static INetContentType GetContentType(OUString const & rTypeName); diff --git a/include/svl/itempool.hxx b/include/svl/itempool.hxx index a719a11c69da..e9f216bd4f4c 100644 --- a/include/svl/itempool.hxx +++ b/include/svl/itempool.hxx @@ -204,7 +204,7 @@ public: sal_uInt16 GetWhich( sal_uInt16 nSlot, bool bDeep = true ) const; sal_uInt16 GetSlotId( sal_uInt16 nWhich, bool bDeep = true ) const; sal_uInt16 GetTrueWhich( sal_uInt16 nSlot, bool bDeep = true ) const; - sal_uInt16 GetTrueSlotId( sal_uInt16 nWhich, bool bDeep = true ) const; + sal_uInt16 GetTrueSlotId( sal_uInt16 nWhich ) const; void SetVersionMap( sal_uInt16 nVer, sal_uInt16 nOldStart, sal_uInt16 nOldEnd, diff --git a/include/svl/itemset.hxx b/include/svl/itemset.hxx index 6607ad5d37b6..ac3ea8def2f6 100644 --- a/include/svl/itemset.hxx +++ b/include/svl/itemset.hxx @@ -118,7 +118,7 @@ public: void DisableItem(sal_uInt16 nWhich); void InvalidateItem( sal_uInt16 nWhich ); sal_uInt16 ClearItem( sal_uInt16 nWhich = 0); - void ClearInvalidItems( bool bHardDefault = false ); + void ClearInvalidItems(); void InvalidateAllItems(); // HACK(via nWhich = 0) ??? inline void SetParent( const SfxItemSet* pNew ); @@ -136,7 +136,7 @@ public: bool Set( const SfxItemSet&, bool bDeep = true ); void Intersect( const SfxItemSet& rSet ); - void MergeValues( const SfxItemSet& rSet, bool bOverwriteDefaults = false ); + void MergeValues( const SfxItemSet& rSet ); void Differentiate( const SfxItemSet& rSet ); void MergeValue( const SfxPoolItem& rItem, bool bOverwriteDefaults = false ); @@ -146,8 +146,7 @@ public: void MergeRange( sal_uInt16 nFrom, sal_uInt16 nTo ); const SfxItemSet* GetParent() const { return m_pParent; } - void Load( SvStream &, bool bDirect = false, - const SfxItemPool *pRefPool = nullptr ); + void Load( SvStream &, bool bDirect = false ); void Store( SvStream &, bool bDirect = false ) const; bool operator==(const SfxItemSet &) const; diff --git a/include/svl/undo.hxx b/include/svl/undo.hxx index 0dce8073f855..cefb5fb50d85 100644 --- a/include/svl/undo.hxx +++ b/include/svl/undo.hxx @@ -199,7 +199,7 @@ namespace svl virtual size_t GetRedoActionCount( bool const i_currentLevel = CurrentLevel ) const = 0; virtual OUString GetRedoActionComment( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const = 0; - virtual SfxUndoAction* GetRedoAction( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const = 0; + virtual SfxUndoAction* GetRedoAction( size_t nNo=0 ) const = 0; virtual bool Undo() = 0; virtual bool Redo() = 0; @@ -317,7 +317,7 @@ public: virtual SfxUndoAction* GetUndoAction( size_t nNo=0 ) const override; virtual size_t GetRedoActionCount( bool const i_currentLevel = CurrentLevel ) const override; virtual OUString GetRedoActionComment( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const override; - virtual SfxUndoAction* GetRedoAction( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const override; + virtual SfxUndoAction* GetRedoAction( size_t nNo=0 ) const override; virtual bool Undo() override; virtual bool Redo() override; virtual void Clear() override; diff --git a/include/svl/urihelper.hxx b/include/svl/urihelper.hxx index 5f7633033ffd..ce10bc932a1c 100644 --- a/include/svl/urihelper.hxx +++ b/include/svl/urihelper.hxx @@ -120,8 +120,7 @@ SVL_DLLPUBLIC OUString FindFirstURLInText(OUString const & rText, sal_Int32 & rEnd, CharClass const & rCharClass, INetURLObject::EncodeMechanism eMechanism = INetURLObject::WAS_ENCODED, - rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, - INetURLObject::FSysStyle eStyle = INetURLObject::FSYS_DETECT); + rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); /** Remove any password component from both absolute and relative URLs. diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx index 6178de7eb2d9..2b98347b97b5 100644 --- a/include/svl/zforlist.hxx +++ b/include/svl/zforlist.hxx @@ -845,7 +845,7 @@ private: LanguageType eLnge ); // Create builtin formats for language/country if necessary, return CLOffset - SVL_DLLPRIVATE sal_uInt32 ImpGenerateCL( LanguageType eLnge, bool bNoAdditionalFormats = false ); + SVL_DLLPRIVATE sal_uInt32 ImpGenerateCL( LanguageType eLnge ); // Build negative currency format, old compatibility style SVL_DLLPRIVATE void ImpGetNegCurrFormat(OUStringBuffer& sNegStr, const OUString& rCurrSymbol); @@ -879,7 +879,7 @@ private: // Non-PRODUCT version may check locale data for matching defaults in one // FormatElement group. SVL_DLLPRIVATE void ImpAdjustFormatCodeDefault( css::i18n::NumberFormatCode * pFormatArr, - sal_Int32 nCount, bool bCheckCorrectness = true ); + sal_Int32 nCount ); // Obtain the format entry for a given key index. SVL_DLLPRIVATE SvNumberformat* GetFormatEntry( sal_uInt32 nKey ); diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx index b66006b1f6fb..2b3569e84c3e 100644 --- a/include/svl/zformat.hxx +++ b/include/svl/zformat.hxx @@ -196,8 +196,7 @@ public: // Build a format string of application defined keywords OUString GetMappedFormatstring( const NfKeywordTable& rKeywords, - const LocaleDataWrapper& rLoc, - bool bDontQuote = false ) const; + const LocaleDataWrapper& rLoc ) const; void SetStarFormatSupport( bool b ) { bStarFlag = b; } @@ -239,7 +238,7 @@ public: //! Only onLoad: convert from stored to current system language/country void ConvertLanguage( SvNumberFormatter& rConverter, - LanguageType eConvertFrom, LanguageType eConvertTo, bool bSystem = false ); + LanguageType eConvertFrom, LanguageType eConvertTo ); // Substring of a subformat code nNumFor (0..3) // nPos == 0xFFFF => last substring @@ -249,8 +248,7 @@ public: // Subtype of a subformat code nNumFor (0..3) // nPos == 0xFFFF => last substring - // bString==true: first/last SYMBOLTYPE_STRING or SYMBOLTYPE_CURRENCY - short GetNumForType( sal_uInt16 nNumFor, sal_uInt16 nPos, bool bString = false ) const; + short GetNumForType( sal_uInt16 nNumFor, sal_uInt16 nPos ) const; sal_Int32 GetForcedDenominatorForType( sal_uInt16 nNumFor ) const; /** If the count of string elements (substrings, ignoring [modifiers] and @@ -354,8 +352,7 @@ public: */ static sal_Int32 GetQuoteEnd( const OUString& rString, sal_Int32 nPos, sal_Unicode cQuote = '"', - sal_Unicode cEscIn = '\0', - sal_Unicode cEscOut = '\\' ); + sal_Unicode cEscIn = '\0' ); void SetComment( const OUString& rStr ) { sComment = rStr; } diff --git a/svl/source/filerec/filerec.cxx b/svl/source/filerec/filerec.cxx index 73bd612161d2..01b13171f69f 100644 --- a/svl/source/filerec/filerec.cxx +++ b/svl/source/filerec/filerec.cxx @@ -307,7 +307,7 @@ SfxMultiFixRecordWriter::SfxMultiFixRecordWriter(sal_uInt8 nRecordType, /** * @see SfxMiniRecordWriter */ -sal_uInt32 SfxMultiFixRecordWriter::Close( bool bSeekToEndOfRec ) +sal_uInt32 SfxMultiFixRecordWriter::Close() { // Header not written yet? if ( !_bHeaderOk ) @@ -320,8 +320,7 @@ sal_uInt32 SfxMultiFixRecordWriter::Close( bool bSeekToEndOfRec ) _pStream->WriteUInt32( _nContentSize ); // seek to end of record or stay after the header - if ( bSeekToEndOfRec ) - _pStream->Seek(nEndPos); + _pStream->Seek(nEndPos); return nEndPos; } @@ -417,7 +416,7 @@ void SfxMultiVarRecordWriter::NewContent() /** * @see SfxMiniRecordWriter */ -sal_uInt32 SfxMultiVarRecordWriter::Close( bool bSeekToEndOfRec ) +sal_uInt32 SfxMultiVarRecordWriter::Close() { // Header not written yet? if ( !_bHeaderOk ) @@ -444,8 +443,7 @@ sal_uInt32 SfxMultiVarRecordWriter::Close( bool bSeekToEndOfRec ) _pStream->WriteUInt32( nContentOfsPos ); // seek to the end of the record or stay where we are - if ( bSeekToEndOfRec ) - _pStream->Seek(nEndPos); + _pStream->Seek(nEndPos); return nEndPos; } diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx index ca03fb863f31..40fd54cb9bd6 100644 --- a/svl/source/items/itempool.cxx +++ b/svl/source/items/itempool.cxx @@ -1000,14 +1000,14 @@ sal_uInt16 SfxItemPool::GetTrueWhich( sal_uInt16 nSlotId, bool bDeep ) const } -sal_uInt16 SfxItemPool::GetTrueSlotId( sal_uInt16 nWhich, bool bDeep ) const +sal_uInt16 SfxItemPool::GetTrueSlotId( sal_uInt16 nWhich ) const { if ( !IsWhich(nWhich) ) return 0; if ( !IsInRange( nWhich ) ) { - if ( pImp->mpSecondary && bDeep ) + if ( pImp->mpSecondary ) return pImp->mpSecondary->GetTrueSlotId(nWhich); assert(false && "unknown WhichId - cannot get slot-id"); return 0; diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index 1f7728827ce6..d55bfa6818c7 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -325,29 +325,20 @@ sal_uInt16 SfxItemSet::ClearItem( sal_uInt16 nWhich ) return nDel; } -void SfxItemSet::ClearInvalidItems( bool bHardDefault ) +void SfxItemSet::ClearInvalidItems() { sal_uInt16* pPtr = m_pWhichRanges; SfxItemArray ppFnd = m_pItems; - if ( bHardDefault ) - while( *pPtr ) - { - for ( sal_uInt16 nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd ) - if ( IsInvalidItem(*ppFnd) ) - *ppFnd = &m_pPool->Put( m_pPool->GetDefaultItem(nWhich) ); - pPtr += 2; - } - else - while( *pPtr ) - { - for( sal_uInt16 nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd ) - if( IsInvalidItem(*ppFnd) ) - { - *ppFnd = nullptr; - --m_nCount; - } - pPtr += 2; - } + while( *pPtr ) + { + for( sal_uInt16 nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd ) + if( IsInvalidItem(*ppFnd) ) + { + *ppFnd = nullptr; + --m_nCount; + } + pPtr += 2; + } } void SfxItemSet::InvalidateAllItems() @@ -1139,7 +1130,7 @@ static void MergeItem_Impl( SfxItemPool *_pPool, sal_uInt16 &rCount, } } -void SfxItemSet::MergeValues( const SfxItemSet& rSet, bool bIgnoreDefaults ) +void SfxItemSet::MergeValues( const SfxItemSet& rSet ) { // WARNING! When making changes/fixing bugs, always update the table above!! assert( GetPool() == rSet.GetPool() && "MergeValues with different Pools" ); @@ -1167,7 +1158,7 @@ void SfxItemSet::MergeValues( const SfxItemSet& rSet, bool bIgnoreDefaults ) SfxItemArray ppFnd2 = rSet.m_pItems; for( ; nSize; --nSize, ++ppFnd1, ++ppFnd2 ) - MergeItem_Impl(m_pPool, m_nCount, ppFnd1, *ppFnd2, bIgnoreDefaults); + MergeItem_Impl(m_pPool, m_nCount, ppFnd1, *ppFnd2, false/*bIgnoreDefaults*/); } else { @@ -1180,14 +1171,13 @@ void SfxItemSet::MergeValues( const SfxItemSet& rSet, bool bIgnoreDefaults ) if( !pItem ) { // Not set, so default - if ( !bIgnoreDefaults ) - MergeValue( rSet.GetPool()->GetDefaultItem( nWhich ), bIgnoreDefaults ); + MergeValue( rSet.GetPool()->GetDefaultItem( nWhich ) ); } else if( IsInvalidItem( pItem ) ) // don't care InvalidateItem( nWhich ); else - MergeValue( *pItem, bIgnoreDefaults ); + MergeValue( *pItem ); } } } @@ -1326,22 +1316,18 @@ void SfxItemSet::Load ( SvStream& rStream, // Stream we're loading from - bool bDirect, /* true + bool bDirect /* true Items are directly read form the stream and not via Surrogates false (default) Items are read via Surrogates */ - - const SfxItemPool* pRefPool /* Pool that can resolve the Surrogates - (e.g. when inserting documents) */ ) { assert(m_pPool); - // No RefPool => Resolve Surrogates with ItemSet's Pool - if ( !pRefPool ) - pRefPool = m_pPool; + // Resolve Surrogates with ItemSet's Pool + const SfxItemPool *pRefPool = m_pPool; // Load Item count and as many Items sal_uInt16 nCount = 0; diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx index ce76e2bd6b99..09fec7d6a65c 100644 --- a/svl/source/misc/inethist.cxx +++ b/svl/source/misc/inethist.cxx @@ -71,9 +71,9 @@ class INetURLHistory_Impl: private boost::noncopyable /** Initialization. */ - void initialize (sal_uInt16 nLru, sal_uInt32 nHash = 0) + void initialize (sal_uInt16 nLru) { - m_nHash = nHash; + m_nHash = 0; m_nLru = nLru; m_nMBZ = 0; } @@ -100,9 +100,9 @@ class INetURLHistory_Impl: private boost::noncopyable /** Initialization. */ - void initialize (sal_uInt16 nThis, sal_uInt32 nHash = 0) + void initialize (sal_uInt16 nThis) { - m_nHash = nHash; + m_nHash = 0; m_nNext = nThis; m_nPrev = nThis; } diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx index 15ca63f9f89c..fc99529d5902 100644 --- a/svl/source/misc/inettype.cxx +++ b/svl/source/misc/inettype.cxx @@ -537,14 +537,13 @@ MediaTypeEntry const * seekEntry(OUString const & rTypeName, //static INetContentType INetContentTypes::RegisterContentType(OUString const & rTypeName, OUString const & rPresentation, - OUString const * pExtension, - OUString const * pSystemFileType) + OUString const * pExtension) { INetContentType eTypeID = GetContentType(rTypeName); if (eTypeID == CONTENT_TYPE_UNKNOWN) eTypeID = Registration::RegisterContentType(rTypeName, rPresentation, pExtension, - pSystemFileType); + nullptr/*pSystemFileType*/); else if (eTypeID > CONTENT_TYPE_LAST) { TypeIDMapEntry * pTypeEntry = Registration::getEntry(eTypeID); @@ -552,8 +551,6 @@ INetContentType INetContentTypes::RegisterContentType(OUString const & rTypeName { if (!rPresentation.isEmpty()) pTypeEntry->m_aPresentation = rPresentation; - if (pSystemFileType) - pTypeEntry->m_aSystemFileType = *pSystemFileType; } if (pExtension) { diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx index e24b982bf240..b53a725dde55 100644 --- a/svl/source/misc/urihelper.cxx +++ b/svl/source/misc/urihelper.cxx @@ -429,8 +429,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText, sal_Int32 & rEnd, CharClass const & rCharClass, INetURLObject::EncodeMechanism eMechanism, - rtl_TextEncoding eCharset, - INetURLObject::FSysStyle eStyle) + rtl_TextEncoding eCharset) { if (!(rBegin <= rEnd && rEnd <= rText.getLength())) return OUString(); @@ -529,7 +528,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText, { INetURLObject aUri(rText.copy(nPos, nUriEnd - nPos), INetProtocol::File, eMechanism, eCharset, - eStyle); + INetURLObject::FSYS_DETECT); if (!aUri.HasError()) { rBegin = nPos; @@ -618,7 +617,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText, } } - if ((eStyle & INetURLObject::FSYS_DOS) != 0 && rEnd - nPos >= 3 + if (rEnd - nPos >= 3 && rText[nPos + 1] == ':' && (rText[nPos + 2] == '/' || rText[nPos + 2] == '\\')) // 7th, 8th @@ -644,7 +643,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText, } } } - else if ((eStyle & INetURLObject::FSYS_DOS) != 0 && rEnd - nPos >= 2 + else if (rEnd - nPos >= 2 && rText[nPos] == '\\' && rText[nPos + 1] == '\\') // 6th { diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 7b1f0bd60f35..dd48e2cad78e 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -944,7 +944,7 @@ SvNumberFormatTable& SvNumberFormatter::GetFirstEntryTable( return GetEntryTable(eTypetmp, FIndex, rLnge); } -sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge, bool bNoAdditionalFormats ) +sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge ) { ChangeIntl(eLnge); sal_uInt32 CLOffset = ImpGetCLOffset(ActLnge); @@ -999,7 +999,7 @@ sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge, bool bNoAdditio } MaxCLOffset += SV_COUNTRY_LANGUAGE_OFFSET; - ImpGenerateFormats( MaxCLOffset, bNoAdditionalFormats ); + ImpGenerateFormats( MaxCLOffset, false/*bNoAdditionalFormats*/ ); CLOffset = MaxCLOffset; } return CLOffset; @@ -2092,13 +2092,13 @@ sal_Int32 SvNumberFormatter::ImpGetFormatCodeIndex( void SvNumberFormatter::ImpAdjustFormatCodeDefault( css::i18n::NumberFormatCode * pFormatArr, - sal_Int32 nCnt, bool bCheckCorrectness ) + sal_Int32 nCnt ) { using namespace ::com::sun::star; if ( !nCnt ) return; - if (bCheckCorrectness && LocaleDataWrapper::areChecksEnabled()) + if (LocaleDataWrapper::areChecksEnabled()) { // check the locale data for correctness OStringBuffer aMsg; diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 1590893423c5..c19d52bdafb3 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -1594,32 +1594,20 @@ short SvNumberformat::ImpNextSymbol(OUStringBuffer& rString, void SvNumberformat::ConvertLanguage( SvNumberFormatter& rConverter, LanguageType eConvertFrom, - LanguageType eConvertTo, bool bSystem ) + LanguageType eConvertTo ) { sal_Int32 nCheckPos; sal_uInt32 nKey; short nType = eType; OUString aFormatString( sFormatstring ); - if ( bSystem ) - { - rConverter.PutandConvertEntrySystem( aFormatString, nCheckPos, nType, - nKey, eConvertFrom, eConvertTo ); - } - else - { - rConverter.PutandConvertEntry( aFormatString, nCheckPos, nType, - nKey, eConvertFrom, eConvertTo ); - } + rConverter.PutandConvertEntry( aFormatString, nCheckPos, nType, + nKey, eConvertFrom, eConvertTo ); const SvNumberformat* pFormat = rConverter.GetEntry( nKey ); DBG_ASSERT( pFormat, "SvNumberformat::ConvertLanguage: Conversion ohne Format" ); if ( pFormat ) { ImpCopyNumberformat( *pFormat ); // Reset values taken over from Formatter/Scanner - if ( bSystem ) - { - maLocale.meLanguage = LANGUAGE_SYSTEM; - } // pColor still points to table in temporary Formatter/Scanner for ( sal_uInt16 i = 0; i < 4; i++ ) { @@ -4488,8 +4476,7 @@ const OUString* SvNumberformat::GetNumForString( sal_uInt16 nNumFor, sal_uInt16 return &NumFor[nNumFor].Info().sStrArray[nPos]; } -short SvNumberformat::GetNumForType( sal_uInt16 nNumFor, sal_uInt16 nPos, - bool bString /* = false */ ) const +short SvNumberformat::GetNumForType( sal_uInt16 nNumFor, sal_uInt16 nPos ) const { if ( nNumFor > 3 ) { @@ -4503,41 +4490,11 @@ short SvNumberformat::GetNumForType( sal_uInt16 nNumFor, sal_uInt16 nPos, if ( nPos == 0xFFFF ) { nPos = nAnz - 1; - if ( bString ) - { - // Backwards - short* pType = NumFor[nNumFor].Info().nTypeArray + nPos; - while ( nPos > 0 && (*pType != NF_SYMBOLTYPE_STRING) && - (*pType != NF_SYMBOLTYPE_CURRENCY) ) - { - pType--; - nPos--; - } - if ( (*pType != NF_SYMBOLTYPE_STRING) && (*pType != NF_SYMBOLTYPE_CURRENCY) ) - { - return 0; - } - } } else if ( nPos > nAnz - 1 ) { return 0; } - else if ( bString ) - { - // Forwards - short* pType = NumFor[nNumFor].Info().nTypeArray + nPos; - while ( nPos < nAnz && (*pType != NF_SYMBOLTYPE_STRING) && - (*pType != NF_SYMBOLTYPE_CURRENCY) ) - { - pType++; - nPos++; - } - if ( (*pType != NF_SYMBOLTYPE_STRING) && (*pType != NF_SYMBOLTYPE_CURRENCY) ) - { - return 0; - } - } return NumFor[nNumFor].Info().nTypeArray[nPos]; } @@ -4706,8 +4663,7 @@ static void lcl_SvNumberformat_AddLimitStringImpl( OUString& rStr, } OUString SvNumberformat::GetMappedFormatstring( const NfKeywordTable& rKeywords, - const LocaleDataWrapper& rLocWrp, - bool bDontQuote ) const + const LocaleDataWrapper& rLocWrp ) const { OUStringBuffer aStr; bool bDefault[4]; @@ -4854,11 +4810,7 @@ OUString SvNumberformat::GetMappedFormatstring( const NfKeywordTable& rKeywords, aStr.append( rLocWrp.getTime100SecSep() ); break; case NF_SYMBOLTYPE_STRING : - if( bDontQuote ) - { - aStr.append( pStr[j] ); - } - else if ( pStr[j].getLength() == 1 ) + if ( pStr[j].getLength() == 1 ) { aStr.append( '\\' ); aStr.append( pStr[j] ); @@ -5076,8 +5028,7 @@ bool SvNumberformat::IsInQuote( const OUString& rStr, sal_Int32 nPos, // static sal_Int32 SvNumberformat::GetQuoteEnd( const OUString& rStr, sal_Int32 nPos, - sal_Unicode cQuote, sal_Unicode cEscIn, - sal_Unicode cEscOut ) + sal_Unicode cQuote, sal_Unicode cEscIn ) { if ( nPos < 0 ) { @@ -5088,7 +5039,7 @@ sal_Int32 SvNumberformat::GetQuoteEnd( const OUString& rStr, sal_Int32 nPos, { return -1; } - if ( !IsInQuote( rStr, nPos, cQuote, cEscIn, cEscOut ) ) + if ( !IsInQuote( rStr, nPos, cQuote, cEscIn ) ) { if ( rStr[ nPos ] == cQuote ) { diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx index 868f275f15fc..164c6534ca4e 100644 --- a/svl/source/undo/undo.cxx +++ b/svl/source/undo/undo.cxx @@ -849,11 +849,11 @@ size_t SfxUndoManager::ImplGetRedoActionCount_Lock( bool const i_currentLevel ) } -SfxUndoAction* SfxUndoManager::GetRedoAction( size_t nNo, bool const i_currentLevel ) const +SfxUndoAction* SfxUndoManager::GetRedoAction( size_t nNo ) const { UndoManagerGuard aGuard( *m_xData ); - const SfxUndoArray* pUndoArray = i_currentLevel ? m_xData->pActUndoArray : m_xData->pUndoArray; + const SfxUndoArray* pUndoArray = m_xData->pActUndoArray; if ( (pUndoArray->nCurUndoAction + nNo) > pUndoArray->aUndoActions.size() ) { return nullptr; |