Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 82184

Summary: poor quality source code
Product: [Retired] Red Hat Linux Reporter: d.binderman
Component: kofficeAssignee: Ngo Than <than>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-07-08 14:34:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description d.binderman 2003-01-19 10:04:32 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.6 [en-gb]C-CCK-MCD NetscapeOnline.co.uk  (Win98; I)

Description of problem:

Hello there,

I just tried to compile package koffice-1.2-0.rc1.4 from Redhat 8.0

The compiler said

vcanvas.cc:160: warning: taking address of temporary
karbon_part.cc:231: warning: taking address of temporary
karbon_view.cc:269: warning: taking address of temporary

Here is an untested patch to shut up the compiler

*** ./karbon/core/vcanvas.cc.old	2003-01-12 10:15:47.000000000 +0000
--- ./karbon/core/vcanvas.cc	2003-01-12 10:18:10.000000000 +0000
***************
*** 157,163 ****
  		p->setWorldMatrix( mat ); */
  		setYMirroring( false );
  
! 		m_part->document().draw( p, &KoRect::fromQRect( rect ) );
  
  		p->end();
  	}
--- 157,165 ----
  		p->setWorldMatrix( mat ); */
  		setYMirroring( false );
  
! 		KoRect tmp = KoRect::fromQRect( rect );
! 
! 		m_part->document().draw( p, &tmp);
  
  		p->end();
  	}
*** ./karbon/karbon_part.cc.old	2003-01-12 10:18:44.000000000 +0000
--- ./karbon/karbon_part.cc	2003-01-12 10:19:42.000000000 +0000
***************
*** 227,234 ****
  	m_doc.selection()->clear();
  	QPtrListIterator<VLayer> itr( m_doc.layers() );
  	for( ; itr.current(); ++itr )
! 		//if( itr.current()->visible() )
! 			itr.current()->draw( p, &KoRect::fromQRect( rect ) );
  
  	p->end();
  	delete painterFactory;
--- 227,237 ----
  	m_doc.selection()->clear();
  	QPtrListIterator<VLayer> itr( m_doc.layers() );
  	for( ; itr.current(); ++itr )
! 	{
! 		KoRect tmp = KoRect::fromQRect( rect );
! 
! 		itr.current()->draw( p, & tmp);
! 	}
  
  	p->end();
  	delete painterFactory;
*** ./karbon/karbon_view.cc.old	2003-01-12 10:20:14.000000000 +0000
--- ./karbon/karbon_view.cc	2003-01-12 10:21:38.000000000 +0000
***************
*** 265,272 ****
  	// TODO : use real page layout stuff
  	QPtrListIterator<VLayer> i = m_part->document().layers();
  	for ( ; i.current(); ++i )
! 		//if ( i.current()->visible() )
! 			i.current()->draw( &p, &KoRect::fromQRect( QRect( 0, 0, width(), height() ) ) );
  
  	p.end();
  }
--- 265,274 ----
  	// TODO : use real page layout stuff
  	QPtrListIterator<VLayer> i = m_part->document().layers();
  	for ( ; i.current(); ++i )
! 	{
! 		KoRect tmp = KoRect::fromQRect( QRect( 0, 0, width(), height() ) );
! 		i.current()->draw( &p, & tmp);
! 	}
  
  	p.end();
  }

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. compile the program
2.
3.
    

Additional info

Comment 1 Ngo Than 2003-07-08 14:34:13 UTC
it's fixed in koffice-1.2.1. which is included in RHL 9