rpms/openoffice.org/devel openoffice.org-2.0.3.rh127576.gtkunixprintdialog.patch, 1.42, 1.43 openoffice.org.spec, 1.1410, 1.1411 openoffice.org-2.4.0.ooo85643.psprint.helppreviewers.patch, 1.1, NONE

Caolan McNamara (caolanm) fedora-extras-commits at redhat.com
Tue Jan 29 12:00:12 UTC 2008


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18475

Modified Files:
	openoffice.org-2.0.3.rh127576.gtkunixprintdialog.patch 
	openoffice.org.spec 
Removed Files:
	openoffice.org-2.4.0.ooo85643.psprint.helppreviewers.patch 
Log Message:
Resolves: rhbz#422661 support n-up printing of rotated landscape slides

openoffice.org-2.0.3.rh127576.gtkunixprintdialog.patch:

Index: openoffice.org-2.0.3.rh127576.gtkunixprintdialog.patch
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org-2.0.3.rh127576.gtkunixprintdialog.patch,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- openoffice.org-2.0.3.rh127576.gtkunixprintdialog.patch	24 Jan 2008 18:47:12 -0000	1.42
+++ openoffice.org-2.0.3.rh127576.gtkunixprintdialog.patch	29 Jan 2008 11:59:58 -0000	1.43
@@ -5,22 +5,38 @@
 diff -u -r1.4 jobdata.hxx
 --- openoffice.org.orig/psprint/inc/psprint/jobdata.hxx	4 Dec 2006 16:33:06 -0000	1.4
 +++ openoffice.org/psprint/inc/psprint/jobdata.hxx	9 May 2007 10:45:05 -0000
-@@ -51,6 +51,7 @@
+@@ -51,6 +51,8 @@
  
  struct JobData
  {
 +    bool                    m_bCupsJob;
++    bool                    m_bNumberUpJob;
      int                     m_nCopies;
      int                     m_nLeftMarginAdjust;
      int                     m_nRightMarginAdjust;
-@@ -66,6 +67,7 @@
+@@ -61,11 +63,14 @@
+     int                     m_nPSLevel;     // 0: no override, else languaglevel to use
+     int                     m_nColorDevice; // 0: no override, -1 grey scale, +1 color
+     orientation::type       m_eOrientation;
++    orientation::type       m_eNumberUpOrientation;
+     ::rtl::OUString         m_aPrinterName;
+     const PPDParser*        m_pParser;
      PPDContext              m_aContext;
  
      JobData() :
 +            m_bCupsJob( false ),
++            m_bNumberUpJob( false ),
              m_nCopies( 1 ),
              m_nLeftMarginAdjust( 0 ),
              m_nRightMarginAdjust( 0 ),
+@@ -75,6 +80,7 @@
+             m_nPSLevel( 0 ),
+             m_nColorDevice( 0 ),
+             m_eOrientation( orientation::Portrait ),
++            m_eNumberUpOrientation( orientation::Portrait ),
+             m_pParser( NULL ) {}
+ 
+     JobData& operator=(const psp::JobData& rRight);
 Index: source/printer/jobdata.cxx
 ===================================================================
 RCS file: /cvs/gsl/psprint/source/printer/jobdata.cxx,v
@@ -28,15 +44,32 @@
 diff -u -r1.9 jobdata.cxx
 --- openoffice.org.orig/psprint/source/printer/jobdata.cxx	4 Dec 2006 16:33:20 -0000	1.9
 +++ openoffice.org/psprint/source/printer/jobdata.cxx	9 May 2007 10:45:55 -0000
-@@ -46,6 +46,7 @@
+@@ -46,6 +46,8 @@
  
  JobData& JobData::operator=(const JobData& rRight)
  {
 +    m_bCupsJob				= rRight.m_bCupsJob;
++    m_bNumberUpJob			= rRight.m_bNumberUpJob;
      m_nCopies				= rRight.m_nCopies;
      m_nLeftMarginAdjust		= rRight.m_nLeftMarginAdjust;
      m_nRightMarginAdjust	= rRight.m_nRightMarginAdjust;
-@@ -94,6 +95,10 @@
+@@ -53,6 +55,7 @@
+     m_nBottomMarginAdjust	= rRight.m_nBottomMarginAdjust;
+     m_nColorDepth			= rRight.m_nColorDepth;
+     m_eOrientation			= rRight.m_eOrientation;
++    m_eNumberUpOrientation  = rRight.m_eNumberUpOrientation;
+     m_aPrinterName			= rRight.m_aPrinterName;
+     m_pParser				= rRight.m_pParser;
+     m_aContext				= rRight.m_aContext;
+@@ -90,10 +93,22 @@
+     aLine += m_eOrientation == orientation::Landscape ? "Landscape" : "Portrait";
+     aStream.WriteLine( aLine );
+ 
++    aLine = "nupsorientation=";
++    aLine += m_eNumberUpOrientation == orientation::Landscape ? "Landscape" : "Portrait";
++    aStream.WriteLine( aLine );
++
+     aLine = "copies=";
      aLine += ByteString::CreateFromInt32( m_nCopies );
      aStream.WriteLine( aLine );
  
@@ -44,26 +77,28 @@
 +    aLine += ByteString::CreateFromInt32( m_bCupsJob );
 +    aStream.WriteLine( aLine );
 +
++    aLine = "nups=";
++    aLine += ByteString::CreateFromInt32( m_bNumberUpJob );
++    aStream.WriteLine( aLine );
++
      aLine = "margindajustment=";
      aLine += ByteString::CreateFromInt32( m_nLeftMarginAdjust );
      aLine += ',';
-@@ -136,6 +141,7 @@
-     bool bVersion       = false;
-     bool bPrinter       = false;
-     bool bOrientation   = false;
-+    bool bCups          = false;
-     bool bCopies        = false;
-     bool bContext       = false;
-     bool bMargin        = false;
-@@ -162,6 +168,11 @@
+@@ -157,11 +172,17 @@
+             bOrientation = true;
+             rJobData.m_eOrientation = aLine.Copy( 12 ).EqualsIgnoreCaseAscii( "landscape" ) ? orientation::Landscape : orientation::Portrait;
+         }
++        else if( aLine.CompareTo( "nupsorientation=", 16 ) == COMPARE_EQUAL )
++            rJobData.m_eNumberUpOrientation = aLine.Copy( 16 ).EqualsIgnoreCaseAscii( "landscape" ) ? orientation::Landscape : orientation::Portrait;
+         else if( aLine.CompareTo( "copies=", 7 ) == COMPARE_EQUAL )
+         {
              bCopies = true;
              rJobData.m_nCopies = aLine.Copy( 7 ).ToInt32();
          }
 +        else if( aLine.CompareTo( "cups=", 5 ) == COMPARE_EQUAL )
-+        {
-+            bCups = true;
 +            rJobData.m_bCupsJob = aLine.Copy( 5 ).ToInt32();
-+        }
++        else if( aLine.CompareTo( "nups=", 5 ) == COMPARE_EQUAL )
++            rJobData.m_bNumberUpJob = aLine.Copy( 5 ).ToInt32();
          else if( aLine.CompareTo( "margindajustment=",17 ) == COMPARE_EQUAL )
          {
              bMargin = true;
@@ -74,7 +109,82 @@
 diff -u -r1.40 printerjob.cxx
 --- openoffice.org.orig/psprint/source/printergfx/printerjob.cxx	24 Oct 2006 15:06:47 -0000	1.40
 +++ openoffice.org/psprint/source/printergfx/printerjob.cxx	9 Nov 2006 10:40:31 -0000
-@@ -1150,7 +1154,7 @@
+@@ -412,6 +412,7 @@
+ {
+     m_bQuickJob = bIsQuickJob;
+     mnMaxWidthPt = mnMaxHeightPt = 0;
++    mnLandscapes = mnPortraits = 0;
+     m_pGraphics = pGraphics;
+     InitPaperSize (rSetupData);
+ 
+@@ -504,6 +505,7 @@
+     // Other
+     WritePS (mpJobHeader, "%%DocumentData: Clean7Bit\n");
+     WritePS (mpJobHeader, "%%Pages: (atend)\n");
++    WritePS (mpJobHeader, "%%Orientation: (atend)\n");
+     WritePS (mpJobHeader, "%%PageOrder: Ascend\n");
+     WritePS (mpJobHeader, "%%EndComments\n");
+ 
+@@ -535,6 +537,10 @@
+     aTrailer.append( (sal_Int32)mnMaxWidthPt );
+     aTrailer.append( " " );
+     aTrailer.append( (sal_Int32)mnMaxHeightPt );
++    if( mnLandscapes > mnPortraits )
++        aTrailer.append("\n%%Orientation: Landscape");
++    else
++        aTrailer.append("\n%%Orientation: Portrait");
+     aTrailer.append( "\n%%Pages: " );
+     aTrailer.append( (sal_Int32)maPageList.size() );
+     aTrailer.append( "\n%%EOF\n" );
+@@ -663,6 +669,17 @@
+ 
+     mnResolution	= nRes;
+ 
++    if (rJobSetup.m_bNumberUpJob && rJobSetup.m_eOrientation == orientation::Landscape)
++    {
++        //swap width/height
++        std::swap(nWidth, nHeight);
++        int nTemp = nLeft;
++        nLeft = nUpper;
++        nUpper = nRight;
++        nRight = nLower;
++        nLower = nTemp;
++    }
++
+     mnWidthPt       = nWidth;
+     mnHeightPt      = nHeight;
+ 
+@@ -715,6 +732,19 @@
+     WritePS (pPageHeader, aPageNo);
+     WritePS (pPageHeader, "\n");
+ 
++    orientation::type eOrientation = rJobSetup.m_bNumberUpJob ? orientation::Portrait : rJobSetup.m_eOrientation;
++
++    if( eOrientation == orientation::Landscape )
++    {
++        WritePS (pPageHeader, "%%PageOrientation: Landscape\n");
++        mnLandscapes++;
++    }
++    else
++    {
++        WritePS (pPageHeader, "%%PageOrientation: Portrait\n");
++        mnPortraits++;
++    }
++
+     sal_Char  pBBox [256];
+     sal_Int32 nChar = 0;
+ 
+@@ -886,7 +916,8 @@
+     sal_Char  pTranslate [128];
+     sal_Int32 nChar = 0;
+ 
+-    if( rJob.m_eOrientation == orientation::Portrait )
++    orientation::type eOrientation = rJob.m_bNumberUpJob ? orientation::Portrait : rJob.m_eOrientation;
++    if( eOrientation == orientation::Portrait )
+     {
+         nChar  = psp::appendStr  ("gsave\n[",   pTranslate); 
+         nChar += psp::getValueOfDouble (        pTranslate + nChar, mfXScale, 5);
+@@ -1197,7 +1228,7 @@
              WritePS (pFile, "<< /NumCopies null /Policies << /NumCopies 1 >> >> setpagedevice\n" );
      }
  
@@ -280,19 +390,17 @@
 --- openoffice.org.orig/vcl/source/gdi/jobset.cxx	9 Sep 2005 12:03:24 -0000	1.9
 +++ openoffice.org/vcl/source/gdi/jobset.cxx	19 May 2006 13:17:00 -0000
 @@ -53,6 +53,7 @@
- #include <jobset.h>
+ #include <vcl/jobset.h>
  #endif
  
 +#include <psprint/printerinfomanager.hxx>
  // =======================================================================
  
  DBG_NAME( JobSetup )
-@@ -244,6 +245,231 @@
- 		mpData = new ImplJobSetup();
- 
+@@ -246,6 +247,237 @@
  	mpData->maValueMap[ rKey ] = rValue;
-+}
-+
+ }
+ 
 +inline int PtTo10Mu( int nPoints ) { return (int)((((double)nPoints)*35.27777778)+0.5); }
 +void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, psp::JobData& rData );
 +
@@ -443,6 +551,7 @@
 +    aInfo.m_aContext.rebuildFromStreamBuffer( NULL, 0 );
 +    
 +    aInfo.m_bCupsJob=false;
++    aInfo.m_bNumberUpJob=false;
 +    copyJobDataToJobSetup( mpData, aInfo );
 +}
 +
@@ -513,12 +622,19 @@
 +			aInfo.m_aContext.setValue(pNewKey, pValue);
 +		}
 +	}
++    if (rKey.CompareToAscii("number-up") == COMPARE_EQUAL)
++    {
++        aInfo.m_bNumberUpJob=rValue.ToInt32() > 1;
++        aInfo.m_eNumberUpOrientation=aInfo.m_eOrientation;
++    }
 +    aInfo.m_bCupsJob=true;
 +    copyJobDataToJobSetup( mpData, aInfo );
 +
- }
- 
++}
++
  // -----------------------------------------------------------------------
+ 
+ JobSetup& JobSetup::operator=( const JobSetup& rJobSetup )
 Index: source/printer/cupsmgr.cxx
 ===================================================================
 RCS file: /cvs/gsl/psprint/source/printer/cupsmgr.cxx,v
@@ -598,6 +714,20 @@
  }
  
  #ifdef ENABLE_CUPS
+@@ -837,6 +853,13 @@
+                 rNumOptions = m_pCUPSWrapper->cupsAddOption( aKey.getStr(), aValue.getStr(), rNumOptions, (cups_option_t**)rOptions );
+             }
+         }
++	if (rJob.m_bNumberUpJob)
++        {
++	    if (rJob.m_eNumberUpOrientation == orientation::Landscape)
++                rNumOptions = m_pCUPSWrapper->cupsAddOption( "orientation-requested", "4", rNumOptions, (cups_option_t**)rOptions );
++	    else
++                rNumOptions = m_pCUPSWrapper->cupsAddOption( "orientation-requested", "1", rNumOptions, (cups_option_t**)rOptions );
++        }
+     }
+ }
+ 
 Index: inc/cupsmgr.hxx
 ===================================================================
 RCS file: /cvs/gsl/psprint/inc/cupsmgr.hxx,v
@@ -994,7 +1124,7 @@
  short PrintDialog::Execute()
  {
  	if ( !mpPrinter || mpPrinter->IsPrinting() || mpPrinter->IsJobActive() )
-@@ -803,15 +1104,325 @@
+@@ -803,15 +1104,329 @@
  	ImplInitControls();
  	ImplModifyControlHdl( NULL );
  
@@ -1277,6 +1407,10 @@
 + 						}
 + 					}
 + 					mpPrinter->Reset();
++	                if (1 == gtk_combo_box_get_active(GTK_COMBO_BOX(aHandle.orientwidget)))
++ 						mpPrinter->SetOrientation(ORIENTATION_LANDSCAPE);
++	                else
++ 					    mpPrinter->SetOrientation(ORIENTATION_PORTRAIT);
 + 					gtk_print_settings_foreach(pSettings, setcupskey, mpPrinter);
 + 
 + 					mpPrinter->SetOrientation(ORIENTATION_PORTRAIT);
@@ -1327,7 +1461,7 @@
  	}
  
  	maStatusTimer.Stop();
-@@ -826,4 +1434,3 @@
+@@ -826,4 +1441,3 @@
  	mpPrinterImpl->m_bHelpDisabled = sal_True;
  	maBtnHelp.Disable();
  }
@@ -1539,3 +1673,20 @@
  };
  
  
+Index: inc/psprint/printerjob.hxx
+===================================================================
+RCS file: /cvs/gsl/psprint/inc/psprint/printerjob.hxx,v
+retrieving revision 1.10
+diff -u -r1.10 printerjob.hxx
+--- openoffice.org.orig/psprint/inc/psprint/printerjob.hxx	12 Dec 2007 14:55:42 -0000	1.10
++++ openoffice.org/psprint/inc/psprint/printerjob.hxx	28 Jan 2008 15:20:51 -0000
+@@ -81,6 +81,9 @@
+     sal_uInt32      mnMaxWidthPt;
+     sal_uInt32      mnMaxHeightPt;
+ 
++    int mnLandscapes;
++    int mnPortraits;
++
+     sal_uInt32      mnLMarginPt;
+     sal_uInt32      mnRMarginPt;
+     sal_uInt32      mnTMarginPt;


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.1410
retrieving revision 1.1411
diff -u -r1.1410 -r1.1411
--- openoffice.org.spec	28 Jan 2008 19:01:00 -0000	1.1410
+++ openoffice.org.spec	29 Jan 2008 11:59:58 -0000	1.1411
@@ -1,6 +1,6 @@
 %define oootag OOH680
 %define ooomilestone 5
-%define rh_rpm_release 1
+%define rh_rpm_release 2
 
 # undef to get english only and no-langpacks for a faster smoketest build
 %define langpacks 1
@@ -139,7 +139,6 @@
 Patch65: openoffice.org-2.4.0.ooo85429.sw.a11ycrash.patch
 Patch66: openoffice.org-2.4.0.ooo85448.emptyrpath.patch
 Patch67: workspace.cairotext01.patch
-Patch68: openoffice.org-2.4.0.ooo85643.psprint.helppreviewers.patch
 
 %define instdir %{_libdir}/openoffice.org
 
@@ -1093,7 +1092,6 @@
 %patch65 -p1 -b .ooo85429.sw.a11ycrash.patch
 %patch66 -p1 -b .ooo85448.emptyrpath.patch
 %patch67 -p1 -b .workspace.cairotext01.patch
-%patch68 -p1 -b .ooo85643.psprint.helppreviewers.patch
 
 %build
 echo build start time is `date`, diskspace: `df -h . | tail -n 1`
@@ -2860,6 +2858,10 @@
 
 
 %changelog
+* Tue Jan 29 2008 Caolan McNamara <caolanm at redhat.com> - 1:2.4.0-5.2
+- Resolves: rhbz#422661 support n-up printing of rotated landscape
+  slides in a human-expectation direction
+
 * Mon Jan 28 2008 Caolan McNamara <caolanm at redhat.com> - 1:2.4.0-5.1
 - next milestone
 - replace cairotext with workspace.cairotext01.patch, not use


--- openoffice.org-2.4.0.ooo85643.psprint.helppreviewers.patch DELETED ---




More information about the fedora-extras-commits mailing list