I've attached a patch to src/wp/ap/xp/ap_EditMethods.cpp that fixes
a landscape printing bug. All the logic was there to rotate the
page; it just needed to be implemented.

It worked for me with a (surprise!) one-page church bulletin -- if
some of you real programmers could test it out & commit it, I'd
appreciate it. And I'll make the church bulletin available if you
need an example. :-)

        Larry
        (glad to finally have contributed
        a little *code* to the project)
*** ap_EditMethods.cpp.orig	Fri Mar 30 03:06:47 2001
--- ap_EditMethods.cpp	Thu May  3 23:49:32 2001
***************
*** 4112,4125 ****
  			       UT_uint32 nToPage, UT_uint32 nFromPage)
  {
          UT_uint32 j,k;
  
          dg_DrawArgs da;
  	memset(&da, 0, sizeof(da));
  	da.pG = NULL;
  
  	fp_PageSize ps = pPrintView->getPageSize();
  
! 	pGraphics->setPortrait (ps.isPortrait ());
  
  	if(pGraphics->startPrint())
  	  {
--- 4112,4128 ----
  			       UT_uint32 nToPage, UT_uint32 nFromPage)
  {
          UT_uint32 j,k;
+ 		bool orient;
  
          dg_DrawArgs da;
  	memset(&da, 0, sizeof(da));
  	da.pG = NULL;
  
+ 
  	fp_PageSize ps = pPrintView->getPageSize();
  
! 	orient = ps.isPortrait ();
! 	pGraphics->setPortrait (orient);
  
  	if(pGraphics->startPrint())
  	  {
***************
*** 4132,4138 ****
  		      // pGraphics->m_iRasterPosition when
  		      // iHeight is allowed to vary page to page
  		      pGraphics->m_iRasterPosition = (k-1)*iHeight;
! 		      pGraphics->startPage(pDocName, k, true, iWidth, iHeight);
  		      pPrintView->draw(k-1, &da);
  		    }
  	      }
--- 4135,4141 ----
  		      // pGraphics->m_iRasterPosition when
  		      // iHeight is allowed to vary page to page
  		      pGraphics->m_iRasterPosition = (k-1)*iHeight;
! 		      pGraphics->startPage(pDocName, k, orient, iWidth, iHeight);
  		      pPrintView->draw(k-1, &da);
  		    }
  	      }
***************
*** 4145,4151 ****
  		      // pGraphics->m_iRasterPosition when
  		      // iHeight is allowed to vary page to page
  		      pGraphics->m_iRasterPosition = (k-1)*iHeight;
! 		      pGraphics->startPage(pDocName, k, true, iWidth, iHeight);
  		      pPrintView->draw(k-1, &da);
  		    }
  	      }
--- 4148,4154 ----
  		      // pGraphics->m_iRasterPosition when
  		      // iHeight is allowed to vary page to page
  		      pGraphics->m_iRasterPosition = (k-1)*iHeight;
! 		      pGraphics->startPage(pDocName, k, orient, iWidth, iHeight);
  		      pPrintView->draw(k-1, &da);
  		    }
  	      }

Reply via email to