Issue 14863 - 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: xml
Classification: Code
Component: definition (show other issues)
Version: OOo 1.1 Beta2
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 1.1 RC
Assignee: khendricks
QA Contact: issues@xml
URL:
Keywords:
Depends on:
Blocks: 13400
  Show dependency tree
 
Reported: 2003-05-25 19:27 UTC by khendricks
Modified: 2004-02-15 07:31 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:27:59 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. 
 
 
xmloff/source/core/nmspmap.cxx 
@@ -256,7 
                                        sQName.append ( (*aIter).second->sPrefix); 
                                        sQName.append ( sal_Unicode(':') ); 
                                        sQName.append ( rLocalName ); 
(fixme?)                                OUString *pString = new OUString ( rLocalName ), &rString = 
sQName.makeStringAndClear(); 
                                        const_cast < QNameCache * > (&aQNameCache)->operator[] ( 
QNamePair ( nKey, pString ) ) = rString; 
                                        return rString; 
                                } 
 
 
 
 
 
xmloff/source/text/XMLChangeImportContext.cxx 
@@ -133,7 
                        // prepare parameters 
                        UniReference<XMLTextImportHelper> rHelper = 
                                GetImport().GetTextImport(); 
(fixme?)                OUString& rID = xAttrList->getValueByIndex(nAttr); 
 
                        // call for bStart and bEnd (may both be true) 
                        if (bIsStart) 
 
 
 
xmloff/source/text/XMLChangedRegionImportContext.cxx 
@@ -137,7 
                        GetKeyByAttrName( xAttrList->getNameByIndex(nAttr), 
                                                          &sLocalName ); 
 
(fixme?) OUString& rValue = xAttrList->getValueByIndex(nAttr); 
                if ( XML_NAMESPACE_TEXT == nPrefix ) 
         { 
             if( IsXMLToken( sLocalName, XML_ID ) ) 
 
 
 
 
xmloff/source/text/txtflde.cxx 
@@ -1506,7 
        case FIELD_ID_DATABASE_DISPLAY: 
        { 
                // get database, table and column name from field master 
(fixme?)        Reference<XPropertySet> & xMaster = GetMasterPropertySet(rTextField); 
                ProcessString(XML_DATABASE_NAME, 
                                          GetStringProperty(sPropertyDataBaseName, xMaster)); 
                ProcessString(XML_TABLE_NAME,
Comment 1 Martin Hollmichel 2003-05-26 09:59:35 UTC
re set prio.
Comment 2 michael.brauer 2003-05-26 14:18:18 UTC
P3 seems to be more apropriate, because the code should be fixed until
the 1.1, but does not cause a real damage.
Comment 3 openoffice 2003-05-27 14:48:01 UTC
dvo: Fixed in CWS sw016.
All fixes as indicated by the (fixme?) marks in the bug description.
Comment 4 openoffice 2003-06-11 10:18:04 UTC
dvo: Verified in sw016.

dvo->khendricks: Please verify & close issue after fixes are
integrated into main tree.
Comment 5 openoffice 2003-06-11 10:26:36 UTC
.
Comment 6 openoffice 2003-06-11 10:26:50 UTC
.
Comment 7 openoffice 2003-06-11 10:27:21 UTC
dvo->khendricks: Please verify & close issue after fixes have been
integrated into main tree.
Comment 8 stefan.baltzer 2003-06-11 16:40:08 UTC
According to Daniel, nothing to test for QA.
Comment 9 stefan.baltzer 2003-06-11 16:40:39 UTC
Set to verified in CWS sw016.
-> Kevin: Please check and close after CWS sw016 got integrated. Thx.
Comment 10 Martin Hollmichel 2004-02-15 07:31:51 UTC
close issue