Issue 14867 - 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: General
Classification: Code
Component: chart (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P2 Trivial (vote)
Target Milestone: ---
Assignee: Martin Hollmichel
QA Contact: issues@graphics
URL:
Keywords:
Depends on:
Blocks: 13400
  Show dependency tree
 
Reported: 2003-05-25 19:37 UTC by khendricks
Modified: 2013-02-24 21:18 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:37:33 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. 
 
 
sch/source/ui/unoidl/register.cxx 
@@ -95,7 
        RTL_CONSTASCII_USTRINGPARAM("/") ) + SchDocument_getImplementationName() + 
        ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") )  ); 
 
(fixme?)uno::Sequence< rtl::OUString > &rServices = 
SchDocument_getSupportedServiceNames(); 
        for(i = 0; i < rServices.getLength(); i++ ) 
                xNewKey->createKey( rServices.getConstArray()[i]);
Comment 1 Martin Hollmichel 2003-05-26 10:05:24 UTC
reassigned and reset prio
Comment 2 bjoern.milcke 2003-05-26 13:46:16 UTC
"Priority 1: This priority is for issues that make it impossible to
work with the version!"

->Martin: Why is it not possible to work with the Application? The
wrong line was introduced in srx644m9s2, I have worked with the chart
since then. Please set priorities according to the rules.

->Mikhail: I didn't know of the existence of register.cxx until now.
What was it introduced for? I think the fix is obvious, but I resend
this bug to you, because maybe you have a similar line in other
applications.
Comment 3 Martin Hollmichel 2003-05-26 14:18:59 UTC
reset prio to 2.
Comment 4 mikhail.voytenko 2003-05-26 15:05:04 UTC
'register.cxx' is introduced to allow to register UNO services in
chart object. It was required for creation of a document model
implementation as UNO service. This feature was implemented for all
applications, so this code was introduced in StarChart also, but it is
not really used for now.
The compiling problem in 'sch' was introduced from 'starmath' project
by copy/paste. It is defenitly not correct to use reference there. 
The problem is fixed in both projects now.
Comment 5 mikhail.voytenko 2003-06-30 13:16:00 UTC
Sending for closing.
Comment 6 Martin Hollmichel 2003-06-30 13:54:37 UTC
verified.
Comment 7 Martin Hollmichel 2003-06-30 13:55:01 UTC
verified.
Comment 8 Martin Hollmichel 2004-02-07 07:05:48 UTC
close issue.