Issue 14861 - return type mismatch - return by value assigned to reference
Summary: return type mismatch - return by value assigned to reference
Status: CLOSED FIXED
Alias: None
Product: Internationalization
Classification: Code
Component: code (show other issues)
Version: OOo 1.1 Beta2
Hardware: All All
: P1 (highest) Trivial (vote)
Target Milestone: ---
Assignee: khendricks
QA Contact: issues@l10n
URL:
Keywords:
Depends on:
Blocks: 13400
  Show dependency tree
 
Reported: 2003-05-25 19:24 UTC by khendricks
Modified: 2013-08-07 15:02 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description khendricks 2003-05-25 19:24:11 UTC
gcc 3.3 now provides error messages when there are return type 
mismatches such as when a method returns an object by value 
that is assigned to a reference which is a bug since the 
reference points to a temporary variable created to hold 
the return by value. 
 
An occurrence of this type occurred here see ... (fixme?) 
 
Please evaluate that line and fix the code in question 
to prevent the bug if needed. 
 
Thanks, 
 
i18npool/source/collator/chaptercollator.cxx 
@@ -110,7 
        if( ans != 0 ) 
            return ans; 
 
(fixme?)OUString &aAddAllowed = OUString::createFromAscii("?"); 
        ParseResult res1, res2; 
        // Bug #100323#, since parseAnyToken does not take length as parameter, we have to 
copy 
        // it to a temp. string. 
 
 
 
 
 
i18npool/source/collator/collatorImpl.cxx 
@@ -118,7 
 sal_Int32 SAL_CALL 
 CollatorImpl::loadDefaultCollator(const lang::Locale& rLocale, sal_Int32 collatorOptions) 
throw(RuntimeException) 
 { 
(fixme?) Sequence< Implementation > &imp = localedata->getCollatorImplementations(rLocale); 
     for (sal_Int16 i = 0; i < imp.getLength(); i++) 
         if (imp[i].isDefault) 
             return loadCollatorAlgorithm(imp[i].unoID, rLocale, collatorOptions); 
 
 
 
 
 
 
 
 
i18npool/source/collator/collatorImpl.cxx 
@@ -156,7 
 CollatorImpl::listCollatorAlgorithms( const lang::Locale& rLocale ) throw(RuntimeException) 
 { 
     nLocale = rLocale; 
(fixme?) Sequence< Implementation > &imp = localedata->getCollatorImplementations(rLocale); 
     Sequence< OUString > list(imp.getLength()); 
 
     for (sal_Int32 i = 0; i < imp.getLength(); i++) { 
 
 
 
 
 
i18npool/source/collator/collator_icu.cxx 
@@ -93,8 
 { 
        if (collator) { 
            if (tranModules & TransliterationModules_IGNORE_KANA) { 
(fixme?)        OUString& s1 = ignore->transliterateString2String(str1, off1, len1); 
(fixme?)        OUString& s2 = ignore->transliterateString2String(str2, off2, len2); 
                return collator->compare(s1.getStr(), s1.getLength(), s2.getStr(), s2.getLength()); 
            } 
            else 
 
 
 
i18npool/source/localedata/localedata.cxx 
@@ -273,7 
                cals = getAllCalendars(loc); 
                len = cals.getLength(); 
            } 
(fixme?)    OUString& id = name.getToken(0, under, index); 
            for (index = 0; index < cals.getLength(); index++) { 
                if (id.equals(cals[index].Name)) { 
                    ref_cal = cals[index]; 
 
 
 
 
i18npool/source/transliteration/fullwidthToHalfwidth.cxx 
@@ -90,11 
   throw(RuntimeException) 
 { 
     // Decomposition: GA --> KA + voice-mark 
(fixme?)OUString& newStr = widthfolding::decompose_ja_voiced_sound_marks (inStr, startPos, 
nCount, offset, useOffset); 
 
     // One to One mapping 
     useOffset = sal_False; 
(fixme?)OUString &tmp = transliteration_OneToOne::transliterate( newStr, 0, newStr.getLength(), 
offset); 
     useOffset = sal_True; 
     return tmp; 
 } 
 
 
i18npool/source/transliteration/halfwidthToFullwidth.cxx 
@@ -87,7 
     sal_Bool _useOffset = useOffset; 
     // One to One mapping 
     useOffset = sal_False; 
(fixme?)OUString& newStr = transliteration_OneToOne::transliterate( inStr, startPos, nCount, 
offset); 
     useOffset = _useOffset; 
 
     // Composition: KA + voice-mark --> GA 
 
 
i18npool/source/transliteration/transliterationImpl.cxx 
@@ -303,7 
 Sequence<OUString> SAL_CALL 
 TransliterationImpl::getAvailableModules( const Locale& rLocale, sal_Int16 sType ) 
throw(RuntimeException) 
 { 
(fixme?)Sequence<OUString> &translist = localedata->getTransliterations(rLocale); 
     Sequence<OUString> &r = *new Sequence< OUString > (translist.getLength()); 
     Reference<XExtendedTransliteration> body; 
     sal_Int32 n = 0; 
 
 
 
 
i18npool/source/transliteration/transliterationImpl.cxx 
@@ -532,7 
     sal_Int32 j_tmp = 0; 
     Sequence< OUString > ostr(MaxOutput*length); 
     for (sal_Int32 j = 0; j < length; j+=2) { 
(fixme?) Sequence< OUString >& temp = 
bodyCascade[_numCascade]->transliterateRange(inStrs[j], inStrs[j+1]); 
 
         for ( sal_Int32 k = 0; k < temp.getLength(); k++) { 
             if ( j_tmp >= MaxOutput*length ) throw ERROR; 
 
 
 
 
i18npool/source/transliteration/transliteration_commonclass.cxx 
@@ -162,7 
 { 
     static Sequence < sal_Int32 > dummy_offset; 
     useOffset = sal_False; 
(fixme?) OUString &tmpStr = transliterate(inStr, startPos, nCount, dummy_offset); 
     useOffset = sal_True; 
     return tmpStr; 
 } 
 
 
i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx 
@@ -346,7 
                break; 
           case TRANSLITERATION: 
               try { 
(fixme?)            OUString &tmp = OUString::valueOf( number ); 
                    OUString transliteration; 
                    getPropertyByName(aProperties, "Transliteration", sal_True) >>= transliteration; 
                    translit->loadModuleByImplName(transliteration, aLocale);
Comment 1 Martin Hollmichel 2003-05-26 09:57:49 UTC
reassign and reset prio.
Comment 2 ooo 2003-05-26 18:17:46 UTC
Most fixed by waratah (just changed two bits)
Comment 3 ooo 2003-06-12 15:59:19 UTC
Kevin,
please verify in cws_srx644_ooo11beta2 and close if present in
SRX645_m5s1 or later.
Comment 4 michael.bemmer 2003-06-16 14:51:35 UTC
I guess resolved fixed is the correct status for this one.
Comment 5 khendricks 2003-06-16 15:14:06 UTC
Hi, 
 
I will verify all of these as soon as I get access to a cws_srx645_ooo11rc which 
martin just announced will probably be open by Wednesday for volunteer 
developers. 
 
Thanks! 
 
Kevin 
 
Comment 6 Martin Hollmichel 2004-02-15 07:28:40 UTC
verfied in 1.1.0.
Comment 7 Martin Hollmichel 2004-02-15 07:31:50 UTC
close issue
Comment 8 panricarfe 2010-11-10 15:47:09 UTC
Created attachment 73000