[Libreoffice-commits] .: svl/source
svl/source/items/style.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 4ad425818402e96e526010ae00ee9a26d21c9ec3 Author: David Tardon Date: Tue Jan 22 15:24:29 2013 +0100 silence MacOS X tinderbox Change-Id: I53e2c5789c9d96187b13bb0d52da9d70f24b39b6 diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index 812567c..9116640 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -872,7 +872,8 @@ SfxStyleSheet::SfxStyleSheet(const XubString &rName, SfxStyleSheet::SfxStyleSheet(const SfxStyleSheet& rStyle) : SfxStyleSheetBase(rStyle), SfxListener( rStyle ), -SfxBroadcaster( rStyle ) +SfxBroadcaster( rStyle ), +svl::StyleSheetUser() {} SfxStyleSheet::~SfxStyleSheet() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/numbers/zformat.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 49ce84919aff654104987c86c3102304202fef6d Author: Joren De Cuyper Date: Sat Jan 19 12:41:31 2013 +0100 resolve fdo#59240 - FORMATTING: Thai number shown as Arabic numerals Change-Id: I6123f8924d7502d3b97b3254ce4e5df724e4370d Reviewed-on: https://gerrit.libreoffice.org/1769 Reviewed-by: Petr Mladek Tested-by: Petr Mladek diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 01f38a2..9709110 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -5282,7 +5282,7 @@ void SvNumberformat::impTransliterateImpl(OUStringBuffer& rStr, com::sun::star::lang::Locale aLocale( LanguageTag( rNum.GetLang() ).getLocale() ); OUString sTemp(rStr.makeStringAndClear()); -GetFormatter().GetNatNum()->getNativeNumberString( sTemp, aLocale, rNum.GetNatNum() ); +sTemp = GetFormatter().GetNatNum()->getNativeNumberString( sTemp, aLocale, rNum.GetNatNum() ); rStr.append(sTemp); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/numbers/zforfind.cxx | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) New commits: commit 8041285b369e58df477b5e92df4bde68e96056a2 Author: Eike Rathke Date: Wed Dec 19 21:53:13 2012 +0100 resolved fdo#54344 let date pattern match overrule incomplete format match Change-Id: I69a0c62ab5b4da036a77bd6c3b2baec0af7c8339 diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index 7e05fe4..d5adf88 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -1678,11 +1678,21 @@ input for the following reasons: { case 0: // not found { -bool bHadExact; sal_uInt32 nExactDateOrder = (bFormatTurn ? pFormat->GetExactDateOrder() : GetDatePatternOrder()); bool bIsExact = (0xff < nExactDateOrder && nExactDateOrder <= 0x); +if (!bIsExact && bFormatTurn && IsAcceptedDatePattern( nNums[0])) +{ +// If input does not match format but pattern, use pattern +// instead, even if eEDF==NF_EVALDATEFORMAT_FORMAT_INTL. +// For example, format has "Y-M-D" and pattern is "D.M.", +// input with 2 numbers can't match format and 31.12. would +// lead to 1931-12-01 (fdo#54344) +nExactDateOrder = GetDatePatternOrder(); +bIsExact = (0xff < nExactDateOrder && nExactDateOrder <= 0x); +} +bool bHadExact; if (bIsExact) { // formatted as date and exactly 2 parts ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/numbers/zforfind.cxx | 67 +--- svl/source/numbers/zforfind.hxx | 10 + 2 files changed, 72 insertions(+), 5 deletions(-) New commits: commit f2851a270eb9c617fce9bfdde5c8f2428ced7014 Author: Eike Rathke Date: Wed Dec 19 19:21:55 2012 +0100 resolved fdo#54336 accept abbreviated combined date/time input Abbreviated combined date/time input was not accepted if the date acceptance pattern ended in a separator, like "D.M." with input "D.M. hh:mm". Additionally check that for "D.M. #" input against a "D.M." pattern the '#' (any number) is not interpreted as year if the input so far was recognized to possibly match a date without time, in which case the count of numbers in input must match the count of numbers in pattern and input here is not a date. Change-Id: I3b123b872fbab9dab58afe3b6754b8ad70a61356 diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index 6a19dd7..7e05fe4 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -140,6 +140,7 @@ void ImpSvNumberInputScan::Reset() nMayBeMonthDate = 0; nAcceptedDatePattern = -2; nDatePatternStart = 0; +nDatePatternNumbers = 0; nCanForceToIso8601 = 0; } @@ -1179,6 +1180,7 @@ bool ImpSvNumberInputScan::IsAcceptedDatePattern( sal_uInt16 nStartPatternAt ) for (sal_Int32 nPattern=0; nPattern < sDateAcceptancePatterns.getLength(); ++nPattern) { sal_uInt16 nNext = nDatePatternStart; +nDatePatternNumbers = 0; bool bOk = true; const OUString& rPat = sDateAcceptancePatterns[nPattern]; sal_Int32 nPat = 0; @@ -1190,6 +1192,8 @@ bool ImpSvNumberInputScan::IsAcceptedDatePattern( sal_uInt16 nStartPatternAt ) case 'M': case 'D': bOk = IsNum[nNext]; +if (bOk) +++nDatePatternNumbers; break; default: bOk = !IsNum[nNext]; @@ -1227,12 +1231,45 @@ bool ImpSvNumberInputScan::IsAcceptedDatePattern( sal_uInt16 nStartPatternAt ) if (nNext < nAnzStrings) { // Pattern end but not input end. -if (!IsNum[nNext]) +// A trailing blank may be part of the current pattern input, +// if pattern is "D.M." and input is "D.M. hh:mm" last was +// ". ", or may be following the current pattern input, if +// pattern is "D.M" and input is "D.M hh:mm" last was "M". +sal_Int32 nPos = 0; +sal_uInt16 nCheck; +if (nPat > 0 && nNext > 0) +{ +// nPat is one behind after the for loop. +sal_Int32 nPatCheck = nPat - 1; +switch (rPat[nPatCheck]) +{ +case 'Y': +case 'M': +case 'D': +nCheck = nNext; +break; +default: +{ +nCheck = nNext - 1; +// Advance position in input to match length of +// non-YMD (separator) characters in pattern. +sal_Unicode c; +do +{ +++nPos; +} while ((c = rPat[--nPatCheck]) != 'Y' && c != 'M' && c != 'D'); +} +} +} +else +{ +nCheck = nNext; +} +if (!IsNum[nCheck]) { // Trailing (or separating if time follows) blanks are ok. -sal_Int32 nPos = 0; -SkipBlanks( sStrArray[nNext], nPos); -if (nPos == sStrArray[nNext].getLength()) +SkipBlanks( sStrArray[nCheck], nPos); +if (nPos == sStrArray[nCheck].getLength()) { nAcceptedDatePattern = nPattern; return true; @@ -1307,6 +1344,18 @@ bool ImpSvNumberInputScan::SkipDatePatternSeparator( sal_uInt16 nParticle, sal_I //--- +sal_uInt16 ImpSvNumberInputScan::GetDatePatternNumbers() +{ +// If not initialized yet start with first number, if any. +if (!IsAcceptedDatePattern( (nAnzNums ? nNums[0] : 0))) +{ +return 0; +} +return nDatePatternNumbers; +} + +//--- + sal_uInt32 ImpSvNumberInputScan::GetDatePatternOrder() { // If not initialized yet start with firs
[Libreoffice-commits] .: svl/source
svl/source/numbers/zforscan.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 91d3c0ce2b808e917ee45f18f2c40a58329d2c19 Author: Eike Rathke Date: Tue Dec 18 19:16:43 2012 +0100 resolved fdo#58179 ImpSvNumberformatScan::RemoveQuotes: both ... Bug crept in with String to OUString change of 1599fc9e54a7c4855bee1c30d92dd1f5be05f530 Change-Id: I25a6b40de10785bc861fa2b353edada0e4a623c9 diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx index 0b88129..24c14a7 100644 --- a/svl/source/numbers/zforscan.cxx +++ b/svl/source/numbers/zforscan.cxx @@ -2853,7 +2853,7 @@ sal_Int32 ImpSvNumberformatScan::RemoveQuotes( OUString& rStr ) sal_Int32 n = rStr.getLength() - 1; if ( c == '"' && rStr[n] == '"' ) { -rStr = rStr.copy(1,n); +rStr = rStr.copy( 1, n-1); return 2; } else if ( c == '\\' ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/misc/restrictedpaths.cxx |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit 422ed6bc3a7811121dea060a9e36d64de434f261 Author: Norbert Thiebaud Date: Wed Nov 28 00:13:54 2012 -0600 fix windows miss in svl OUString work Change-Id: Iff20613231058db92d65cfecc5e4b16dd5395589 diff --git a/svl/source/misc/restrictedpaths.cxx b/svl/source/misc/restrictedpaths.cxx index 1cff971..c1b7f86 100644 --- a/svl/source/misc/restrictedpaths.cxx +++ b/svl/source/misc/restrictedpaths.cxx @@ -91,12 +91,13 @@ namespace svt boolm_bAllowParent; public: inline CheckURLAllowed( const OUString& _rCheckURL, bool bAllowParent = true ) -:m_sCheckURL( _rCheckURL ), m_bAllowParent( bAllowParent ) +: m_sCheckURL( _rCheckURL ) +, m_bAllowParent( bAllowParent ) { #ifdef WNT // on windows, assume that the relevant file systems are case insensitive, // thus normalize the URL -m_sCheckURL = m_aSysLocale.GetCharClass().lowercase( m_sCheckURL, 0, m_sCheckURL.Len() ); +m_sCheckURL = m_aSysLocale.GetCharClass().lowercase( m_sCheckURL, 0, m_sCheckURL.getLength() ); #endif } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/items/itempool.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit c6c3bf968fed804bc31f6b3a5af74a7141dac139 Author: Eike Rathke Date: Thu Nov 22 12:45:54 2012 +0100 silenced a SAL_WARN that was HACK macro, use SAL_INFO instead Change-Id: Ifea40945c1ac9596a97bf8b84aab734a86be8f38 diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx index 5448421..cc678eb 100644 --- a/svl/source/items/itempool.cxx +++ b/svl/source/items/itempool.cxx @@ -376,7 +376,7 @@ void SfxItemPool::SetSecondaryPool( SfxItemPool *pPool ) if ( pImp->mpSecondary ) { #ifdef DBG_UTIL -SAL_WARN( "svl.items", "fuer Image, dort gibt es derzeit keine Statics - Bug" ); +SAL_INFO( "svl.items", "fuer Image, dort gibt es derzeit keine Statics - Bug" ); if ( pImp->ppStaticDefaults ) { // Delete() ist noch nicht gelaufen? @@ -514,7 +514,7 @@ void SfxItemPool::Delete() sal_uInt16 nArrCnt; //Erst die SetItems abraeumen -SAL_WARN( "svl.items", "fuer Image, dort gibt es derzeit keine Statics - Bug" ); +SAL_INFO( "svl.items", "fuer Image, dort gibt es derzeit keine Statics - Bug" ); if ( pImp->ppStaticDefaults ) { for ( nArrCnt = GetSize_Impl(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/numbers/zformat.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 9b24ce6da284505aed2bbaf4ad2790c161fbc232 Author: Eike Rathke Date: Fri Nov 16 15:57:22 2012 +0100 use LanguageTag Change-Id: I28aff5533ec6cc31a3d6f3de3198452bd716ba62 diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 52ae19c..8a171ea 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -5206,7 +5206,7 @@ String SvNumberformat::ImpGetNatNumString( const SvNumberNatNum& rNum, OUString SvNumberformat::impTransliterateImpl(const OUString& rStr, const SvNumberNatNum& rNum ) const { -com::sun::star::lang::Locale aLocale( MsLangId::convertLanguageToLocale( rNum.GetLang() ) ); +com::sun::star::lang::Locale aLocale( LanguageTag( rNum.GetLang() ).getLocale() ); return GetFormatter().GetNatNum()->getNativeNumberString( rStr, aLocale, rNum.GetNatNum() ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/numbers/zforlist.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 760ef2ef7457aad9486a12a7f21da2b298749bf1 Author: Michael Stahl Date: Mon Nov 19 13:33:45 2012 +0100 SvNumberFormatter: warning C4701 pot. uninitialized variable nCheckPos used Change-Id: I497d7ddc90bdfed9cd49e0b0c988a74f733bfa36 diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index ae02773..f609417 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -422,7 +422,7 @@ void SvNumberFormatter::ReplaceSystemCL( LanguageType eOldLanguage ) ChangeIntl( eOldLanguage ); LanguageType eLge = eOldLanguage; // ConvertMode changes this bool bCheck = false; -xub_StrLen nCheckPos; +xub_StrLen nCheckPos = 0; SvNumberformat* pNewEntry = new SvNumberformat( aString, pFormatScanner, pStringScanner, nCheckPos, eLge ); if ( nCheckPos != 0 ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/numbers/zforscan.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 0cd1ae1f9b85261e6915471938c5f6c3e0ec9283 Author: Noel Power Date: Tue Nov 13 16:30:07 2012 + don't always show integer part for fraction formats with hard denom fdo#56205 fixes bug when you have a fraction format with a forced denominator e.g. '?/5' which showed the integer part of the fraction ( as if the format was '# ?/5' ) but even without the space e.g. before fix pi 3.14159265358979 with format '?/8' would be shown as "31/8" after the fix 3.14159265358979 with format '?/8' would be shown as "25/8" Change-Id: I1feb8b78af94b90db1bcc30da248077243dd8dfc Reviewed-on: https://gerrit.libreoffice.org/1047 Reviewed-by: Eike Rathke Tested-by: Eike Rathke diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx index 4916ff2..fb3649c 100644 --- a/svl/source/numbers/zforscan.cxx +++ b/svl/source/numbers/zforscan.cxx @@ -1595,7 +1595,9 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString ) nCounter = nCntPost; else if (nCntPre) nCounter = nCntPre; -if (!nCntPre) +// don't artificially increment nCntPre +// for forced denominator +if ( ( eScannedType != NUMBERFORMAT_FRACTION ) && (!nCntPre) ) nCntPre++; } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/items/nranges.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit cc6798946dd8ab54d3fac1e49e9a201724e6d747 Author: Stephan Bergmann Date: Wed Nov 14 09:24:12 2012 +0100 Turn "odd number of Which-IDs" into a true assert ...as it leads to crashes anyway (as witnessed with what got fixed with 09ee17974f31ca188df532a2fea33a79ca367ebe "Fix Which-ID range of OfaTreeOptionsDialog item set"). Change-Id: I9ad24d3dd11530ad002a5277d22b60e651e67d70 diff --git a/svl/source/items/nranges.cxx b/svl/source/items/nranges.cxx index b3a7210..c2c08cd 100644 --- a/svl/source/items/nranges.cxx +++ b/svl/source/items/nranges.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - +#include #include // compiled via include from itemset.cxx only! @@ -86,7 +86,7 @@ NUMTYPE InitializeRanges_Impl( NUMTYPE *&rpRanges, va_list pArgs, aNumArr.push_back( nIns ); } -DBG_ASSERT( bEndOfRange, "ungerade Anzahl von Which-Paaren!" ); +assert( bEndOfRange ); // odd number of Which-IDs // so, jetzt sind alle Bereiche vorhanden und rpRanges = new NUMTYPE[ aNumArr.size() + 1 ]; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/numbers/zforfind.cxx | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) New commits: commit 5391bd1e54157457abe1098b29f067d6e0059113 Author: Eike Rathke Date: Tue Nov 13 14:23:01 2012 +0100 resolved fdo#55369 accept fraction input if preset Accept fraction input without integer portion if the format was preset as fraction, e.g. 1/5 instead of 0 1/5 and don't force to date. Change-Id: I188593c57e5779aae029a1aa2ebd2c18de441804 diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index 55d7fd7..4767f45 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -2014,14 +2014,24 @@ bool ImpSvNumberInputScan::ScanMidString( const String& rString, { if ( eScannedType != NUMBERFORMAT_UNDEFINED // already another type && eScannedType != NUMBERFORMAT_DATE) // except date -return MatchedReturn(); // => jan/31/1994 -else if (eScannedType != NUMBERFORMAT_DATE // analyzed date until now - && (eSetType == NUMBERFORMAT_FRACTION // and preset was fraction - || (nAnzNums == 3 // or 3 numbers - && nStringPos > 2) ) ) // and what ??? +return MatchedReturn(); // => jan/31/1994 +else if (eScannedType != NUMBERFORMAT_DATE // analyzed no date until now +&& ( eSetType == NUMBERFORMAT_FRACTION // and preset was fraction +|| (nAnzNums == 3 // or 3 numbers +&& (nStringPos == 3 // and 3rd string particle +|| (nStringPos == 4 // or 4th +&& nSign) // if signed { SkipBlanks(rString, nPos); -eScannedType = NUMBERFORMAT_FRACTION; // !!! it IS a fraction +if (nPos == rString.Len()) +{ +eScannedType = NUMBERFORMAT_FRACTION; // !!! it IS a fraction (so far) +if (eSetType == NUMBERFORMAT_FRACTION +&& nAnzNums == 2 +&& (nStringPos == 1 // for 4/5 +|| (nStringPos == 2 && nSign))) // or signed -4/5 +return true;// don't fall into date trap +} } else nPos--; // put '/' back ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/numbers/zforlist.cxx | 31 ++- 1 file changed, 26 insertions(+), 5 deletions(-) New commits: commit dbd85e2b73b87c7f9ad53a8e4dbc124b24c3ec89 Author: Eike Rathke Date: Fri Oct 26 16:25:04 2012 +0200 SAL_WARN on dup positions Change-Id: I6ac3940fb0b07d280998a56d5eaede0909f14bce diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 7236766..9bc4f5d 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -509,13 +509,16 @@ bool SvNumberFormatter::PutEntry(String& rString, SvNumberformat* pStdFormat = GetFormatEntry(CLOffset + ZF_STANDARD); sal_uInt32 nPos = CLOffset + pStdFormat->GetLastInsertKey(); -if (nPos - CLOffset >= SV_COUNTRY_LANGUAGE_OFFSET) +if (nPos+1 - CLOffset >= SV_COUNTRY_LANGUAGE_OFFSET) { -SAL_WARN( "svl.numbers", "SvNumberFormatter:: Zu viele Formate pro CL"); +SAL_WARN( "svl.numbers", "SvNumberFormatter::PutEntry: too many formats for CL"); delete p_Entry; } else if (!aFTable.insert(make_pair( nPos+1,p_Entry)).second) +{ +SAL_WARN( "svl.numbers", "SvNumberFormatter::PutEntry: dup position"); delete p_Entry; +} else { bCheck = true; @@ -714,7 +717,10 @@ bool SvNumberFormatter::Load( SvStream& rStream ) pEnt->SetLastInsertKey(pEntry->GetLastInsertKey()); } if (!aFTable.insert(make_pair( nPos, pEntry)).second) +{ +SAL_WARN( "svl.numbers", "SvNumberFormatter::Load: dup position"); delete pEntry; +} rStream >> nPos; } @@ -1843,6 +1849,10 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( aMsg += rCode.Code; LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg)); } +else +{ +SAL_WARN( "svl.numbers", "SvNumberFormatter::ImpInsertFormat: dup position"); +} delete pFormat; return NULL; } @@ -2203,7 +2213,10 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio if ( !aFTable.insert(make_pair( CLOffset + SetIndexTable( NF_BOOLEAN, ZF_STANDARD_LOGICAL ), pNewFormat)).second) +{ +SAL_WARN( "svl.numbers", "SvNumberFormatter::ImpGenerateFormats: dup position Boolean"); delete pNewFormat; +} // Text aFormatCode = '@'; @@ -2214,7 +2227,10 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio if ( !aFTable.insert(make_pair( CLOffset + SetIndexTable( NF_TEXT, ZF_STANDARD_TEXT ), pNewFormat)).second) +{ +SAL_WARN( "svl.numbers", "SvNumberFormatter::ImpGenerateFormats: dup position Text"); delete pNewFormat; +} @@ -2904,7 +2920,10 @@ SvNumberFormatterIndexTable* SvNumberFormatter::MergeFormatter(SvNumberFormatter // pNewEntry = new SvNumberformat(*pFormat); // Copy is not sufficient! pNewEntry = new SvNumberformat( *pFormat, *pFormatScanner ); if (!aFTable.insert(make_pair( nNewKey, pNewEntry)).second) +{ +SAL_WARN( "svl.numbers", "SvNumberFormatter::MergeFormatter: dup position"); delete pNewEntry; +} } if (nNewKey != nOldKey) // new index { @@ -2926,14 +2945,16 @@ SvNumberFormatterIndexTable* SvNumberFormatter::MergeFormatter(SvNumberFormatter GetFormatEntry(nCLOffset + ZF_STANDARD); sal_uInt32 nPos = nCLOffset + pStdFormat->GetLastInsertKey(); nNewKey = nPos+1; -if (nPos - nCLOffset >= SV_COUNTRY_LANGUAGE_OFFSET) +if (nNewKey - nCLOffset >= SV_COUNTRY_LANGUAGE_OFFSET) { -SAL_WARN( "svl.numbers", -"SvNumberFormatter:: Zu viele Formate pro CL"); +SAL_WARN( "svl.numbers", "SvNumberFormatter::MergeFormatter: too many formats for CL"); delete pNewEntry; } else if (!aFTable.insert(make_pair( nNewKey, pNewEntry)).second) +{ +SAL_WARN( "svl.numbers", "SvNumberFormatter::MergeFormatter: dup position"); delete pNewEntry; +} else pStdFormat->SetLastInsertKey((sal_uInt16) (nNewKey - nCLOffset)); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/numbers/zforfind.cxx | 12 ++-- svl/source/numbers/zforlist.cxx | 18 +- svl/source/numbers/zformat.cxx | 12 ++-- 3 files changed, 21 insertions(+), 21 deletions(-) New commits: commit 09908f8da622d5443fb75fabeff87df81472b5e8 Author: Eike Rathke Date: Fri Oct 26 15:46:10 2012 +0200 consistently use SAL_WARN svl.numbers Change-Id: I16c555e87f8df19a74c8d34f21bce4570c1d756f diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index b2f8d2b..da2a66f 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -886,7 +886,7 @@ bool ImpSvNumberInputScan::GetTimeRef( { nHour = 0; bRet = false; -SAL_WARN( "svl", "ImpSvNumberInputScan::GetTimeRef: bad number index"); +SAL_WARN( "svl.numbers", "ImpSvNumberInputScan::GetTimeRef: bad number index"); } if (nDecPos == 2 && nAnz == 2) // 45.5 nMinute = 0; @@ -1082,7 +1082,7 @@ bool ImpSvNumberInputScan::IsAcceptedDatePattern( sal_uInt16 nStartPatternAt ) else if (!sDateAcceptancePatterns.getLength()) { sDateAcceptancePatterns = pFormatter->GetLocaleData()->getDateAcceptancePatterns(); -SAL_WARN_IF( !sDateAcceptancePatterns.getLength(), "svl", "ImpSvNumberInputScan::IsAcceptedDatePattern: no date acceptance patterns"); +SAL_WARN_IF( !sDateAcceptancePatterns.getLength(), "svl.numbers", "ImpSvNumberInputScan::IsAcceptedDatePattern: no date acceptance patterns"); nAcceptedDatePattern = (sDateAcceptancePatterns.getLength() ? -2 : -1); } @@ -1300,7 +1300,7 @@ DateFormat ImpSvNumberInputScan::GetDateOrder() break; } } -SAL_WARN( "svl", "ImpSvNumberInputScan::GetDateOrder: undefined, falling back to locale's default"); +SAL_WARN( "svl.numbers", "ImpSvNumberInputScan::GetDateOrder: undefined, falling back to locale's default"); return pFormatter->GetLocaleData()->getDateFormat(); } @@ -1379,7 +1379,7 @@ bool ImpSvNumberInputScan::GetDateRef( double& fDays, sal_uInt16& nCounter, } break; default: -OSL_FAIL( "ImpSvNumberInputScan::GetDateRef: unknown NfEvalDateFormat" ); +SAL_WARN( "svl.numbers", "ImpSvNumberInputScan::GetDateRef: unknown NfEvalDateFormat" ); DateFmt = YMD; bFormatTurn = false; } @@ -1550,7 +1550,7 @@ input for the following reasons: default: bHadExact = false; } -SAL_WARN_IF( !bHadExact, "svl", "ImpSvNumberInputScan::GetDateRef: error in exact date order"); +SAL_WARN_IF( !bHadExact, "svl.numbers", "ImpSvNumberInputScan::GetDateRef: error in exact date order"); } else bHadExact = false; @@ -3230,7 +3230,7 @@ bool ImpSvNumberInputScan::IsNumberFormat( break; default: -SAL_WARN( "svl", "Some number recognized but what's it?" ); +SAL_WARN( "svl.numbers", "Some number recognized but what's it?" ); fOutNumber = 0.0; break; } diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index db12eda..7236766 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -511,7 +511,7 @@ bool SvNumberFormatter::PutEntry(String& rString, sal_uInt32 nPos = CLOffset + pStdFormat->GetLastInsertKey(); if (nPos - CLOffset >= SV_COUNTRY_LANGUAGE_OFFSET) { -OSL_FAIL("SvNumberFormatter:: Zu viele Formate pro CL"); +SAL_WARN( "svl.numbers", "SvNumberFormatter:: Zu viele Formate pro CL"); delete p_Entry; } else if (!aFTable.insert(make_pair( nPos+1,p_Entry)).second) @@ -829,7 +829,7 @@ String SvNumberFormatter::GetKeyword( LanguageType eLnge, sal_uInt16 nIndex ) if ( nIndex < NF_KEYWORD_ENTRIES_COUNT ) return rTable[nIndex]; -OSL_FAIL("GetKeyword: invalid index"); +SAL_WARN( "svl.numbers", "GetKeyword: invalid index"); return String(); } @@ -2928,7 +2928,7 @@ SvNumberFormatterIndexTable* SvNumberFormatter::MergeFormatter(SvNumberFormatter nNewKey = nPos+1; if (nPos - nCLOffset >= SV_COUNTRY_LANGUAGE_OFFSET) { -OSL_FAIL( +SAL_WARN( "svl.numbers", "SvNumberFormatter:: Zu viele Formate pro CL"); delete pNewEntry; } @@ -3880,7 +3880,7 @@ void NfCurrencyEntry::CompletePositiveFormatString(OUStringBuffer& rStr, } break; default: -OSL_FAIL("NfCurrencyEntry:
[Libreoffice-commits] .: svl/source
svl/source/numbers/numfmuno.cxx | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) New commits: commit 61b94e06ef5a822e0dbe24528bc5d4d112a2547b Author: Caolán McNamara Date: Tue Oct 9 23:13:29 2012 +0100 These are now already OUStrings, so no need for extra temp OUStrings Change-Id: I3cf01d975e468299d9dc009f389e88bff7c8f4a2 diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx index 6b60052..e669a7f 100644 --- a/svl/source/numbers/numfmuno.cxx +++ b/svl/source/numbers/numfmuno.cxx @@ -804,13 +804,13 @@ uno::Any SAL_CALL SvNumberFormatObj::getPropertyValue( const rtl::OUString& aPro { OUString aSymbol, aExt; pFormat->GetNewCurrencySymbol( aSymbol, aExt ); -aRet <<= rtl::OUString( aSymbol ); +aRet <<= aSymbol; } else if (aString.EqualsAscii( PROPERTYNAME_CURREXT )) { OUString aSymbol, aExt; pFormat->GetNewCurrencySymbol( aSymbol, aExt ); -aRet <<= rtl::OUString( aExt ); +aRet <<= aExt; } else if (aString.EqualsAscii( PROPERTYNAME_CURRABB )) { @@ -877,7 +877,7 @@ uno::Sequence SAL_CALL SvNumberFormatObj::getPropertyValue if (pFormat) { OUString aSymbol, aExt; -String aAbb; +OUString aAbb; bool bBank = false; pFormat->GetNewCurrencySymbol( aSymbol, aExt ); const NfCurrencyEntry* pCurr = pFormatter->GetCurrencyEntry( bBank, @@ -885,8 +885,8 @@ uno::Sequence SAL_CALL SvNumberFormatObj::getPropertyValue if ( pCurr ) aAbb = pCurr->GetBankSymbol(); -String aFmtStr = pFormat->GetFormatstring(); -String aComment = pFormat->GetComment(); +OUString aFmtStr = pFormat->GetFormatstring(); +OUString aComment = pFormat->GetComment(); sal_Bool bStandard = ( ( nKey % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 ); //! SvNumberformat Member bStandard rausreichen? sal_Bool bUserDef = ( ( pFormat->GetType() & NUMBERFORMAT_DEFINED ) != 0 ); @@ -900,13 +900,13 @@ uno::Sequence SAL_CALL SvNumberFormatObj::getPropertyValue beans::PropertyValue* pArray = aSeq.getArray(); pArray[0].Name = rtl::OUString(PROPERTYNAME_FMTSTR ); -pArray[0].Value <<= rtl::OUString( aFmtStr ); +pArray[0].Value <<= aFmtStr; pArray[1].Name = rtl::OUString(PROPERTYNAME_LOCALE ); pArray[1].Value <<= aLocale; pArray[2].Name = rtl::OUString(PROPERTYNAME_TYPE ); pArray[2].Value <<= (sal_Int16)( pFormat->GetType() ); pArray[3].Name = rtl::OUString(PROPERTYNAME_COMMENT ); -pArray[3].Value <<= rtl::OUString( aComment ); +pArray[3].Value <<= aComment; pArray[4].Name = rtl::OUString(PROPERTYNAME_STDFORM ); pArray[4].Value.setValue( &bStandard, getBooleanCppuType() ); pArray[5].Name = rtl::OUString(PROPERTYNAME_USERDEF ); @@ -920,11 +920,11 @@ uno::Sequence SAL_CALL SvNumberFormatObj::getPropertyValue pArray[9].Name = rtl::OUString(PROPERTYNAME_THOUS ); pArray[9].Value.setValue( &bThousand, getBooleanCppuType() ); pArray[10].Name = rtl::OUString(PROPERTYNAME_CURRSYM ); -pArray[10].Value <<= rtl::OUString( aSymbol ); +pArray[10].Value <<= aSymbol; pArray[11].Name = rtl::OUString(PROPERTYNAME_CURREXT ); -pArray[11].Value <<= rtl::OUString( aExt ); +pArray[11].Value <<= aExt; pArray[12].Name = rtl::OUString(PROPERTYNAME_CURRABB ); -pArray[12].Value <<= rtl::OUString( aAbb ); +pArray[12].Value <<= aAbb; return aSeq; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source svtools/source
svl/source/numbers/zformat.cxx |2 +- svtools/source/misc/ehdl.cxx | 40 +--- 2 files changed, 10 insertions(+), 32 deletions(-) New commits: commit 55149144cb926513ef250c87fdf0c59e11e2f6cf Author: Michael Stahl Date: Tue Oct 9 23:32:18 2012 +0200 SfxErrorHandler::CreateString: remove pointless loops Change-Id: I585add18ea917249df252827e0eee944e59ce410 diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 4049881..447bcf5 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -4721,7 +4721,7 @@ OUString SvNumberformat::GetMappedFormatstring( { // append empty subformats aStr.append( ';' ); } -return aStr.getStr(); +return aStr.makeStringAndClear(); } String SvNumberformat::ImpGetNatNumString( const SvNumberNatNum& rNum, diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx index 97b81fd..1fac294 100644 --- a/svtools/source/misc/ehdl.cxx +++ b/svtools/source/misc/ehdl.cxx @@ -192,13 +192,7 @@ sal_Bool SfxErrorHandler::CreateString( { if(GetMessageString(nErrCode, rStr, nFlags)) { -for (xub_StrLen i = 0; i < rStr.getLength();) -{ -if( rStr.indexOf(OUString("$(ARG1)"), i) == -1 ) -break; -rStr = rStr.replaceAll("$(ARG1)", pMsgInfo->GetMessageArg(), i); -i = i + pMsgInfo->GetMessageArg().getLength(); -} +rStr = rStr.replaceAll("$(ARG1)", pMsgInfo->GetMessageArg()); return sal_True; } } @@ -206,35 +200,19 @@ sal_Bool SfxErrorHandler::CreateString( { StringErrorInfo *pStringInfo=PTR_CAST(StringErrorInfo,pErr); if(pStringInfo) -for (xub_StrLen i = 0; i < rStr.getLength();) -{ -if( rStr.indexOf("$(ARG1)", i) == -1 ) -break; -rStr = rStr.replaceAll(rtl::OUString("$(ARG1)"), - pStringInfo->GetErrorString(), i); -i = i + pStringInfo->GetErrorString().getLength(); -} +{ +rStr = rStr.replaceAll(rtl::OUString("$(ARG1)"), + pStringInfo->GetErrorString()); +} else { TwoStringErrorInfo * pTwoStringInfo = PTR_CAST(TwoStringErrorInfo, pErr); if (pTwoStringInfo) -for (sal_uInt16 i = 0; i < rStr.getLength();) -{ -sal_uInt16 nArg1Pos = rStr.indexOf(rtl::OUString("$(ARG1)"), i); -sal_uInt16 nArg2Pos = rStr.indexOf(rtl::OUString("$(ARG2)"), i); -if (nArg1Pos < nArg2Pos) -{ -rStr = rStr.replaceAt(nArg1Pos, 7, pTwoStringInfo->GetArg1()); -i = nArg1Pos + pTwoStringInfo->GetArg1().getLength(); -} -else if (nArg2Pos < nArg1Pos) -{ -rStr = rStr.replaceAt(nArg2Pos, 7, pTwoStringInfo->GetArg2()); -i = nArg2Pos + pTwoStringInfo->GetArg2().getLength(); -} -else break; -} +{ +rStr = rStr.replaceAll("$(ARG1)", pTwoStringInfo->GetArg1()); +rStr = rStr.replaceAll("$(ARG2)", pTwoStringInfo->GetArg2()); +} } return sal_True; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/items/style.cxx|3 ++- svl/source/misc/inethist.cxx |6 +++--- svl/source/misc/strmadpt.cxx | 11 ++- svl/source/numbers/numuno.cxx |2 +- 4 files changed, 12 insertions(+), 10 deletions(-) New commits: commit a3ffd9ed6ee0723de407691de93340af9975d3b7 Author: Arnaud Versini Date: Sun Sep 2 14:55:54 2012 +0200 Replace usage of rtl/memory.h in svl with equivalent from string.h Change-Id: I44e6b162a190939bfa17e04f551309d6249c48df diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index 06f70e0..3f6b768 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #ifdef DBG_UTIL class DbgStyleSheetReferences @@ -942,7 +943,7 @@ SfxUnoStyleSheet* SfxUnoStyleSheet::getUnoStyleSheet( const ::com::sun::star::un ::sal_Int64 SAL_CALL SfxUnoStyleSheet::getSomething( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& rId ) throw (::com::sun::star::uno::RuntimeException) { -if( rId.getLength() == 16 && 0 == rtl_compareMemory( getIdentifier().getConstArray(), rId.getConstArray(), 16 ) ) +if( rId.getLength() == 16 && 0 == memcmp( getIdentifier().getConstArray(), rId.getConstArray(), 16 ) ) { return sal::static_int_cast(reinterpret_cast(this)); } diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx index 3530ced..8233358 100644 --- a/svl/source/misc/inethist.cxx +++ b/svl/source/misc/inethist.cxx @@ -20,10 +20,10 @@ #include #include +#include #include "rtl/instance.hxx" #include "rtl/crc.h" -#include "rtl/memory.h" #include #include #include @@ -273,7 +273,7 @@ void INetURLHistory_Impl::move (sal_uInt16 nSI, sal_uInt16 nDI) if (nSI < nDI) { // shift left. -rtl_moveMemory ( +memmove ( &m_pHash[nSI], &m_pHash[nSI + 1], (nDI - nSI) * sizeof(hash_entry)); @@ -281,7 +281,7 @@ void INetURLHistory_Impl::move (sal_uInt16 nSI, sal_uInt16 nDI) if (nSI > nDI) { // shift right. -rtl_moveMemory ( +memmove ( &m_pHash[nDI + 1], &m_pHash[nDI], (nSI - nDI) * sizeof(hash_entry)); diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx index cf1d41e..77a8676 100644 --- a/svl/source/misc/strmadpt.cxx +++ b/svl/source/misc/strmadpt.cxx @@ -23,8 +23,9 @@ #include #include #include +#include + #include -#include #include #include #include @@ -511,7 +512,7 @@ sal_uLong SvInputStream::GetData(void * pData, sal_uLong nSize) SetError(ERRCODE_IO_CANTREAD); return nRead; } -rtl_copyMemory(static_cast< sal_Int8 * >(pData) + nRead, +memcpy(static_cast< sal_Int8 * >(pData) + nRead, aBuffer.getConstArray(), sal_uInt32(nCount)); nRead += nCount; if (nCount < nRemain) @@ -879,7 +880,7 @@ sal_uInt32 SvDataPipe_Impl::read() sal_uInt32 nBlock = std::min(sal_uInt32(m_pReadPage->m_pEnd - m_pReadPage->m_pRead), nRemain); -rtl_copyMemory(m_pReadBuffer, m_pReadPage->m_pRead, nBlock); +memcpy(m_pReadBuffer, m_pReadPage->m_pRead, nBlock); m_pReadPage->m_pRead += nBlock; m_pReadBuffer += nBlock; m_nReadBufferSize -= nBlock; @@ -942,7 +943,7 @@ sal_uInt32 SvDataPipe_Impl::write(sal_Int8 const * pBuffer, sal_uInt32 nSize) if (nBlock > 0) { -rtl_copyMemory(m_pReadBuffer + m_nReadBufferFilled, pBuffer, +memcpy(m_pReadBuffer + m_nReadBufferFilled, pBuffer, nBlock); m_nReadBufferFilled += nBlock; nRemain -= nBlock; @@ -963,7 +964,7 @@ sal_uInt32 SvDataPipe_Impl::write(sal_Int8 const * pBuffer, sal_uInt32 nSize) = std::min(sal_uInt32(m_pWritePage->m_aBuffer + m_nPageSize - m_pWritePage->m_pEnd), nRemain); -rtl_copyMemory(m_pWritePage->m_pEnd, pBuffer, nBlock); +memcpy(m_pWritePage->m_pEnd, pBuffer, nBlock); m_pWritePage->m_pEnd += nBlock; pBuffer += nBlock; nRemain -= nBlock; diff --git a/svl/source/numbers/numuno.cxx b/svl/source/numbers/numuno.cxx index ee68795..8e5b4a1 100644 --- a/svl/source/numbers/numuno.cxx +++ b/svl/source/numbers/numuno.cxx @@ -106,7 +106,7 @@ sal_Int64 SAL_CALL SvNumberFormatsSupplierObj::getSomething( const uno::Sequence& rId ) throw(uno::RuntimeException) { if ( rId.getLength() == 16 && - 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), + 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) { return
[Libreoffice-commits] .: svl/source
svl/source/svdde/ddesvr.cxx | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) New commits: commit 8df3fbe5249c3f4a1ea3d5586b5c073d5a756fb0 Author: Fridrich Å trba Date: Tue Jul 31 22:30:34 2012 +0200 Fix mingw build of svl Change-Id: I9992dba75903fea3d31be73de69e49f439df3a41 diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx index dadba45..25cc3cf 100644 --- a/svl/source/svdde/ddesvr.cxx +++ b/svl/source/svdde/ddesvr.cxx @@ -82,8 +82,9 @@ HDDEDATA CALLBACK _export DdeInternal::SvrCallback( DdeQueryString( pInst->hDdeInstSvr, hText1, chTopicBuf, sizeof(chTopicBuf)/sizeof(TCHAR), CP_WINUNICODE ); -for( pService = rAll.First();pService;pService = rAll.Next() ) +for (DdeServices::iterator aI = rAll.begin(); aI != rAll.end(); ++aI) { +pService = *aI; if ( !hText2 || ( *pService->pName == hText2 ) ) { String sTopics( pService->Topics() ); @@ -113,8 +114,9 @@ HDDEDATA CALLBACK _export DdeInternal::SvrCallback( return (HDDEDATA)NULL; HSZPAIR* q = pPairs; -for( pService = rAll.First(); pService; pService = rAll.Next() ) +for (DdeServices::iterator aI = rAll.begin(); aI != rAll.end(); ++aI) { +pService = *aI; if ( !hText2 || (*pService->pName == hText2 ) ) { String sTopics( pService->Topics() ); @@ -177,8 +179,9 @@ HDDEDATA CALLBACK _export DdeInternal::SvrCallback( return (HDDEDATA)NULL; } -for ( pService = rAll.First(); pService; pService = rAll.Next() ) +for (DdeServices::iterator aI = rAll.begin(); aI != rAll.end(); ++aI) { +pService = *aI; for ( size_t i = 0, n = pService->pConv->size(); i < n; ++i ) { pC = (*pService->pConv)[ i ]; @@ -365,8 +368,9 @@ DdeService* DdeInternal::FindService( HSZ hService ) { DdeService* s; DdeServices& rSvc = DdeService::GetServices(); -for ( s = rSvc.First(); s; s = rSvc.Next() ) +for (DdeServices::iterator aI = rSvc.begin(); aI != rSvc.end(); ++aI) { +s = *aI; if ( *s->pName == hService ) return s; } @@ -1033,7 +1037,7 @@ String DdeService::Formats() { TCHAR buf[128]; GetClipboardFormatName( (UINT)f, buf, sizeof(buf) / sizeof(TCHAR) ); -s += rtl::OUString(buf); +s += rtl::OUString(reinterpret_cast(buf)); } break; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/items/cstitem.src | 23 +++ 1 file changed, 23 insertions(+) New commits: commit f674de15e17e9608003d7b0af2abe3c11d1b1856 Author: Norbert Thiebaud Date: Wed Jul 18 18:16:17 2012 -0500 Revert "hrc cleanup: Remove unused cstitem.src" This reverts commit ae95e31831916df760503bfc2496b7bc55bc638b. diff --git a/svl/source/items/cstitem.src b/svl/source/items/cstitem.src new file mode 100644 index 000..cc972e6 --- /dev/null +++ b/svl/source/items/cstitem.src @@ -0,0 +1,23 @@ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include +String STR_COLUM_DT_AUTO +{ +Text [ en-US ] = "automatic" ; +}; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/numbers/zformat.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f4679c1caf3f56f756fdb5d9609710a3ae3a8fd8 Author: Ivan Timofeev Date: Wed Jul 4 15:44:03 2012 +0400 cast sal_uInt8 to sal_Int32, otherwise it would invoke valueOf(sal_Bool) Change-Id: Ibdd7b9213c073035a34cab11a6ec6f6d07bc6b13 diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 7b66797..5b20717 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -941,7 +941,7 @@ SvNumberformat::SvNumberformat(String& rString, if (pSc->GetNatNumModifier() && !NumFor[nIndex].GetNatNum().IsSet()) { rtl::OUString aNat( "[NatNum"); -aNat += rtl::OUString::valueOf( pSc->GetNatNumModifier()); +aNat += rtl::OUString::valueOf( sal_Int32(pSc->GetNatNumModifier())); aNat += "]"; sStr.Insert( aNat, 0); NumFor[nIndex].SetNatNumNum( pSc->GetNatNumModifier(), false ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/numbers/zforlist.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e8bc25ab32b4b562ec4aa0ef648c08d7ee706f6a Author: David Tardon Date: Wed Jul 4 07:59:58 2012 +0200 explicitly convert to int to help the compiler select overloaded func Change-Id: I8462319d0c5ccea0bc4d5327c94660e2e683e268 diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 368a022..252ff7b 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -1954,7 +1954,7 @@ sal_Int32 SvNumberFormatter::ImpGetFormatCodeIndex( || nTabOff == NF_CURRENCY_1000DEC2_CCC)) { // currency entries with decimals might not exist, e.g. Italian Lira rtl::OUString aMsg( "SvNumberFormatter::ImpGetFormatCodeIndex: not found: " ); -aMsg += rtl::OUString::valueOf( nTabOff ); +aMsg += rtl::OUString::valueOf( sal_Int32( nTabOff ) ); LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo(aMsg)); } if ( nLen ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/numbers/zforlist.cxx | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit 7f5f50052df9222dd3bb0908cff7d864859ae213 Author: Olivier Hallot Date: Tue Jul 3 23:22:25 2012 -0300 Make windows tinderbox happy fix some cast for OUString Change-Id: I20563d404169b9e1f29699d52567760509fabb13 diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 934a043..368a022 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -949,7 +949,7 @@ sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge, bool bNoAdditio if ( !aDupes.isEmpty() ) { rtl::OUString aMsg("XML locale data FormatElement formatindex dupe: "); -aMsg += rtl::OUString::valueOf( nIdx ); +aMsg += rtl::OUString::valueOf( sal_Int32(nIdx) ); aMsg += "\nFormatElements: "; aMsg += rtl::OUString::valueOf( j ); aMsg += "("; @@ -1740,7 +1740,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( rCode.Index != NF_CURRENCY_1000DEC2_CCC ) { rtl::OUString aMsg("SvNumberFormatter::ImpInsertFormat: no [$...] on currency format code, index "); -aMsg += rtl::OUString::valueOf( rCode.Index ); +aMsg += rtl::OUString::valueOf( sal_Int32(rCode.Index) ); aMsg += ":\n"; aMsg += rCode.Code; LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg)); @@ -1758,7 +1758,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( if (LocaleDataWrapper::areChecksEnabled()) { rtl::OUString aMsg( "SvNumberFormatter::ImpInsertFormat: bad format code, index " ); -aMsg += rtl::OUString::valueOf( rCode.Index ); +aMsg += rtl::OUString::valueOf( sal_Int32(rCode.Index) ); aMsg += "\n"; aMsg += rCode.Code; LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg)); @@ -1788,7 +1788,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( default: { rtl::OUString aMsg("SvNumberFormatter::ImpInsertFormat: dup format code, index "); -aMsg += rtl::OUString::valueOf( rCode.Index ); +aMsg += rtl::OUString::valueOf( sal_Int32(rCode.Index) ); aMsg += "\n"; aMsg += rCode.Code; LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg)); @@ -1803,7 +1803,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( if (LocaleDataWrapper::areChecksEnabled()) { rtl::OUString aMsg( "SvNumberFormatter::ImpInsertFormat: too many format codes, index "); -aMsg += rtl::OUString::valueOf( rCode.Index ); +aMsg += rtl::OUString::valueOf( sal_Int32(rCode.Index) ); aMsg += "\n"; aMsg += rCode.Code; LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg)); @@ -1819,7 +1819,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( rtl::OUString aMsg( "ImpInsertFormat: can't insert number format key pos: "); aMsg += rtl::OUString::valueOf( sal_Int32( nPos ) ); aMsg += ", code index "; -aMsg += rtl::OUString::valueOf( rCode.Index ); +aMsg += rtl::OUString::valueOf( sal_Int32(rCode.Index) ); aMsg += "\n"; aMsg += rCode.Code; LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/passwordcontainer/passwordcontainer.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 837c864bb3e1c1ea868d3b6f65f2af1a4cfb03e1 Author: Julien Nabet Date: Sat May 12 16:13:15 2012 +0200 Replace !var.size() by var.empty() Change-Id: I936b59a5bf339d1520cbc10e51b1e9fdc937f0f3 diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index 52bdbcb..dccff95 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -933,7 +933,7 @@ UrlRecord PasswordContainer::find( else { vector< ::rtl::OUString > aRM( DecodePasswords( aEncodedMP, aPass ) ); -if( !aRM.size() || !aPass.equals( aRM[0] ) ) +if( aRM.empty() || !aPass.equals( aRM[0] ) ) { bAskAgain = sal_True; aRMode = PasswordRequestMode_PASSWORD_REENTER; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/numbers/zforfind.cxx | 13 + svl/source/numbers/zforfind.hxx |6 +- 2 files changed, 14 insertions(+), 5 deletions(-) New commits: commit 803b5513eff8f8c185a91e91aee235dfab38d3bc Author: Eike Rathke Date: Thu May 10 16:19:44 2012 +0200 resolved fdo#46233 value >12 with AM/PM can't be clock time diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index cce08f9..31f9c2c 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -860,11 +860,12 @@ inline bool ImpSvNumberInputScan::GetNextNumber( sal_uInt16& i, sal_uInt16& j ) //--- // GetTimeRef -void ImpSvNumberInputScan::GetTimeRef( +bool ImpSvNumberInputScan::GetTimeRef( double& fOutNumber, sal_uInt16 nIndex, // j-value of the first numeric time part of input, default 0 sal_uInt16 nAnz ) // count of numeric time parts { +bool bRet = true; sal_uInt16 nHour; sal_uInt16 nMinute = 0; sal_uInt16 nSecond = 0; @@ -893,6 +894,7 @@ void ImpSvNumberInputScan::GetTimeRef( else { nHour = 0; +bRet = false; SAL_WARN( "svl.items", "ImpSvNumberInputScan::GetTimeRef: bad number index"); } if (nDecPos == 2 && nAnz == 2) // 45.5 @@ -903,7 +905,9 @@ void ImpSvNumberInputScan::GetTimeRef( nSecond = (sal_uInt16) sStrArray[nNums[nIndex++]].ToInt32(); if (nIndex - nStartIndex < nAnz) fSecond100 = StringToDouble( sStrArray[nNums[nIndex]], true ); -if (nAmPm == -1 && nHour != 12) // PM +if (nAmPm && nHour > 12)// not a valid AM/PM clock time +bRet = false; +else if (nAmPm == -1 && nHour != 12)// PM nHour += 12; else if (nAmPm == 1 && nHour == 12) // 12 AM nHour = 0; @@ -912,6 +916,7 @@ void ImpSvNumberInputScan::GetTimeRef( (double)nMinute*60 + (double)nSecond + fSecond100)/86400.0; +return bRet; } @@ -3171,7 +3176,7 @@ bool ImpSvNumberInputScan::IsNumberFormat( break; case NUMBERFORMAT_TIME: -GetTimeRef(fOutNumber, 0, nAnzNums); +res = GetTimeRef(fOutNumber, 0, nAnzNums); if ( nSign < 0 ) fOutNumber = -fOutNumber; break; @@ -3190,7 +3195,7 @@ bool ImpSvNumberInputScan::IsNumberFormat( if ( res ) { double fTime; -GetTimeRef( fTime, nCounter, nAnzNums - nCounter ); +res = GetTimeRef( fTime, nCounter, nAnzNums - nCounter ); fOutNumber += fTime; } } diff --git a/svl/source/numbers/zforfind.hxx b/svl/source/numbers/zforfind.hxx index c57c90a..7c2e8eb 100644 --- a/svl/source/numbers/zforfind.hxx +++ b/svl/source/numbers/zforfind.hxx @@ -294,7 +294,11 @@ private: sal_uInt16& i, sal_uInt16& j ); -void GetTimeRef(// Converts time -> double (only decimals) +/** Converts time -> double (only decimals) + +@return TRUE if time, FALSE if not (e.g. hours >12 with AM/PM) + */ +bool GetTimeRef( double& fOutNumber, // result as double sal_uInt16 nIndex, // Index of hour in input sal_uInt16 nAnz ); // Count of time substrings in input ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/svdde/ddesvr.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d9051c4ce5c8302f7739a171b80cd5c9e6bf74b8 Author: Julien Nabet Date: Wed May 2 17:09:10 2012 +0200 != instead of < for comparison with end iterator Change-Id: I16f3b768cdb3304d3f7a9b3a63a4262377c7c89b diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx index 0d887a3..35a0ba7 100644 --- a/svl/source/svdde/ddesvr.cxx +++ b/svl/source/svdde/ddesvr.cxx @@ -204,7 +204,7 @@ found: { pC->pTopic->_Disconnect( (long) hConv ); for ( ConvList::iterator it = pService->pConv->begin(); - it < pService->pConv->end(); + it != pService->pConv->end(); ++it ) { if ( *it == pC ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svl/source
svl/source/svdde/ddesvr.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit bbf894bc2ec60bbd5ff64e44242316a26e3c7790 Author: Julien Nabet Date: Wed May 2 15:32:24 2012 +0200 != instead of < for comparison with end iterator Change-Id: Ie21b39b11d021095fa8f4de9be1e7e0289af4e91 diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx index d47a6c0..0d887a3 100644 --- a/svl/source/svdde/ddesvr.cxx +++ b/svl/source/svdde/ddesvr.cxx @@ -608,7 +608,7 @@ void DdeService::AddFormat( sal_uLong nFmt ) void DdeService::RemoveFormat( sal_uLong nFmt ) { nFmt = DdeData::GetExternalFormat( nFmt ); -for ( DdeFormats::iterator it = aFormats.begin(); it < aFormats.end(); ++it ) { +for ( DdeFormats::iterator it = aFormats.begin(); it != aFormats.end(); ++it ) { if ( (sal_uLong) *it == nFmt ) { aFormats.erase( it ); break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits