Issue 9337 - C++: & and l-value
Summary: C++: & and l-value
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: 643
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: stefan.baltzer
QA Contact: issues@sw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-18 23:27 UTC by pavel
Modified: 2013-08-07 14:43 UTC (History)
2 users (show)

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


Attachments
suggested fix as a patch (514 bytes, patch)
2002-11-19 22:22 UTC, pavel
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description pavel 2002-11-18 23:27:29 UTC
This is from:

http://www.openoffice.org/servlets/ReadMsg?msgId=454168&listName=dev

see also Stephan's response

http://www.openoffice.org/servlets/ReadMsg?msgId=454663&listName=dev

Hi,

while compiling OOo 1.0.1 on Sun Solaris 8 with Forte C++ update 2 (with
all patches) it issued this error while compiling
sw/source/ui/misc/glosdoc.cxx:

"/oo/Build/oo_1.0.1_src/sw/source/ui/misc/glosdoc.cxx", line 164: Error:
The "&" operator can only be applied to a variable or other l-value.

GCC (2.95 on Solaris) and 3.0.4 (on SuSE Linux) compile this without even
warning me. I tend to agree that Forte is right here so I applied this
change to that file:

--- sw/source/ui/misc/glosdoc.cxx~	Tue Nov 12 02:22:16 2002
+++ sw/source/ui/misc/glosdoc.cxx	Tue Nov 12 02:22:16 2002
@@ -158,10 +158,11 @@
 
 	if( !bOk )
 	{
+
	String sExt (SwGlossaries::GetExtension());
 
	//generate generic name
 
	utl::TempFile aTemp(
 
		String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "group" )),
-
		&SwGlossaries::GetExtension(),
+
		&sExt,
 
		&rNewFilePath );
 
	aTemp.EnableKillingFile();
Comment 1 stx123 2002-11-19 13:58:28 UTC
Confirmed by Stephan.
Comment 2 pavel 2002-11-19 22:22:48 UTC
Created attachment 3674 [details]
suggested fix as a patch
Comment 3 Joost Andrae 2002-11-28 10:15:16 UTC
JA->AMA: reassigned to the project owner
Comment 4 andreas.martens 2002-12-03 11:36:39 UTC
Ok, accepted.
Comment 5 frank.meies 2003-02-11 13:06:06 UTC
FME: Has already been fixed in sw/source/ui/misc/glosdoc.cxx rev. 1.13
Comment 6 Oliver-Rainer Wittmann 2003-02-25 09:35:27 UTC
OD (25.02.2003):
reopen for verify and QA
Comment 7 Oliver-Rainer Wittmann 2003-02-25 09:39:01 UTC
OD->SBA (25.02.2003):
Fix is integrated in OOo_srx644_m1. Please verify and close this issue.
Comment 8 stefan.baltzer 2003-02-25 11:35:56 UTC
Set to fixed.
Comment 9 stefan.baltzer 2003-02-25 11:36:38 UTC
Set to verified.
Comment 10 stefan.baltzer 2003-02-25 11:45:14 UTC
Closed.