[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 101074] Charts are really small when printed from KSpread
From:       Inge Wallin <inge () lysator ! liu ! se>
Date:       2005-05-06 23:42:51
Message-ID: 20050506234251.18020.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
         
http://bugs.kde.org/show_bug.cgi?id=101074         
inge lysator liu se changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From inge lysator liu se  2005-05-07 01:42 -------
SVN commit 410200 by ingwa:

Fix bug 101074: Charts are really small when printed from KSpread

Naturally, the chart was unzoomed.  But now there is another bug: The
legend has disappeared.

BUGS: 101074



 M  +2 -0      trunk/koffice/kspread/TODO  
 M  +21 -9     trunk/koffice/kspread/kspread_sheetprint.cc  


--- trunk/koffice/kspread/TODO #410199:410200
 @ -74,6 +74,8  @
   + 100992: left border of cells with text, which is wider than the   1 DONE
 	    cell breaks printout
   + 101074: Charts are really small when printed from KSpread	      1 ----
+        Fix the zoom issue						done
+	Fix the disappearing legend					----
 
 * Cut/Copy & Paste
   + 63332: Pasting into a cell that has spilled out, pastes into all  1 DONE
--- trunk/koffice/kspread/kspread_sheetprint.cc #410199:410200
 @ -520,9 +520,7  @
     //
     QRect zoomedView = m_pDoc->zoomRect( view );
     QPtrListIterator<KoDocumentChild> it( m_pDoc->children() );
-    QRect bound;
-    for( ; it.current(); ++it )
-    {
+    for ( ; it.current(); ++it ) {
 //        QString tmp=QString("Testing child %1/%2 %3/%4 against view %5/%6 %7/%8")
 //        .arg(it.current()->contentRect().left())
 //        .arg(it.current()->contentRect().top())
 @ -531,19 +529,33  @
 //        .arg(view.left()).arg(view.top()).arg(zoomedView.right()).arg(zoomedView.bottom());
 //        kdDebug(36001)<<tmp<<" offset "<<_childOffset.x()<<"/"<<_childOffset.y()<<endl;
 
-        bound = it.current()->boundingRect();
-        if ( ( ( KSpreadChild* )it.current() )->sheet() == m_pSheet &&
-             bound.intersects( zoomedView ) )
-        {
+        QRect bound = it.current()->boundingRect();
+	QRect zoomedBound = m_pDoc->zoomRect( KoRect(bound.left(), bound.top(),
+						     bound.width(), 
+						     bound.height() ) );
+#if 0
+        kdDebug(36001)  << "printRect(): Bounding rect of view: " << view
+			<< endl;
+        kdDebug(36001)  << "printRect(): Bounding rect of zoomed view: "
+			<< zoomedView << endl;
+        kdDebug(36001)  << "printRect(): Bounding rect of child: " << bound
+			<< endl;
+        kdDebug(36001)  << "printRect(): Bounding rect of zoomed child: "
+			<< zoomedBound << endl;
+#endif
+        if ( ( ( KSpreadChild* )it.current() )->sheet() == m_pSheet 
+	     && zoomedBound.intersects( zoomedView ) ) 
+	{
             painter.save();
 
             painter.translate( -zoomedView.left() + m_pDoc->zoomItX( topLeft.x() ),
                                -zoomedView.top()  + m_pDoc->zoomItY( topLeft.y() ) );
-            bound.moveBy( -bound.x(), -bound.y() );
+	    // FIXME: Why can this suddenly be removed?
+            //zoomedBound.moveBy( -zoomedBound.x(), -zoomedBound.y() );
 
             it.current()->transform( painter );
             it.current()->document()->paintEverything( painter,
-                                                       bound,
+                                                       zoomedBound,
                                                        it.current()->isTransparent() );
             painter.restore();
         }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic