Anonymous avatar Anonymous committed 962c197

#i108219# SwWeb print options fixed

Comments (0)

Files changed (3)

sw/source/core/view/vprint.cxx

     // create sequence of print UI options
     // (5 options are not available for Writer-Web)
     const int nCTLOpts = bCTL ? 1 : 0;
-    const int nNumProps = nCTLOpts + (bWeb ? 16 : 20);
+    const int nNumProps = nCTLOpts + (bWeb ? 14 : 20);
     m_aUIProperties.realloc( nNumProps );
     int nIdx = 0;
 
                                                   aLocalizedStrings.GetString( 14 ),
                                                   rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintBlackFonts" ) ),
                                                   bDefaultVal );
-    
-    // create subgroup for misc options
-    m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 15 ) ), rtl::OUString() );
 
-    // create a bool option for printing automatically inserted blank pages
-    bDefaultVal = rDefaultPrintData.IsPrintEmptyPages();
-    m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 16 ),
-                                                   aLocalizedStrings.GetString( 17 ),
-                                                   rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintEmptyPages" ) ),
-                                                   bDefaultVal );
+    if (!bWeb)
+    {
+        // create subgroup for misc options
+        m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 15 ) ), rtl::OUString() );
+
+        // create a bool option for printing automatically inserted blank pages
+        bDefaultVal = rDefaultPrintData.IsPrintEmptyPages();
+        m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 16 ),
+                                                       aLocalizedStrings.GetString( 17 ),
+                                                       rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintEmptyPages" ) ),
+                                                       bDefaultVal );
+    }
 
     // create a bool option for paper tray
     bDefaultVal = rDefaultPrintData.IsPaperFromSetup();

sw/source/ui/config/optpage.cxx

         aPrintTextPlaceholderCB.Hide();
 //		aReverseCB.SetPosPixel(aLeftPageCB.GetPosPixel());
 		aProspectCB.SetPosPixel(aLeftPageCB.GetPosPixel());
-		Point rPt( aRightPageCB.GetPosPixel() );
-		rPt.setX(rPt.getX() + 15); // indent
-		aProspectCB_RTL.SetPosPixel(rPt);
+        Point aPt( aRightPageCB.GetPosPixel() );
+        aPt.setX(aPt.getX() + 15); // indent
+        aProspectCB_RTL.SetPosPixel(aPt);
 //		aBlackFontCB.SetPosPixel(aBackgroundCB.GetPosPixel());
 //        aPrintHiddenTextCB.SetPosPixel(aBlackFontCB.GetPosPixel());
 //		aBackgroundCB.SetPosPixel(aCtrlFldCB.GetPosPixel());
 //		aCtrlFldCB.SetPosPixel(aDrawCB.GetPosPixel());
+        
+        // hide aPrintEmptyPagesCB and move everything below up accordingly
+        long nDeltaY = aPaperFromSetupCB.GetPosPixel().getY() - aPrintEmptyPagesCB.GetPosPixel().getY();
+        aPrintEmptyPagesCB.Hide();
+        aPt = aPaperFromSetupCB.GetPosPixel();
+        aPt.setY( aPt.getY() - nDeltaY );
+        aPaperFromSetupCB.SetPosPixel( aPt );
+        aPt = aFaxFT.GetPosPixel();
+        aPt.setY( aPt.getY() - nDeltaY );
+        aFaxFT.SetPosPixel( aPt );
+        aPt = aFaxLB.GetPosPixel();
+        aPt.setY( aPt.getY() - nDeltaY );
+        aFaxLB.SetPosPixel( aPt );
 	}
 	aProspectCB_RTL.Disable();
     SvtCTLOptions aCTLOptions;

sw/source/ui/config/prtopt.cxx

         "Page/LeftPage",                // 13 not in SW/Web
         "Page/RightPage",               // 14 not in SW/Web
         "EmptyPages",                   // 15 not in SW/Web
-        "Content/PrintPlaceholders",     // 16 not in Sw/Web
-        "Content/PrintHiddenText"      // 17
+        "Content/PrintPlaceholders",    // 16 not in Sw/Web
+        "Content/PrintHiddenText"       // 17 not in Sw/Web
 	};
     const int nCount = bIsWeb ? 12 : 18;
 	Sequence<OUString> aNames(nCount);
     bPrintPageBackground = !bWeb;
     bPrintBlackFont = bWeb;
     bPrintTextPlaceholder = bPrintHiddenText = sal_False;
+    if (bWeb)
+        bPrintEmptyPages = sal_False;
 
     Sequence<OUString> aNames = GetPropertyNames();
 	Sequence<Any> aValues = GetProperties(aNames);
 			}
 		}
 	}
+
+    // currently there is just one checkbox for print drawings and print graphics
+    // In the UI. (File/Print dialog and Tools/Options/.../Print)
+    // And since print graphics is the only available in Writer and WrtierWeb ...
+
+    bPrintDraw = bPrintGraphic;
 }
 /* -----------------------------06.09.00 16:50--------------------------------
 
             case 17: bVal = bPrintHiddenText; pValues[nProp].setValue(&bVal, rType);  break;
         }
 	}
-	PutProperties(aNames, aValues);
+
+    // currently there is just one checkbox for print drawings and print graphics
+    // In the UI. (File/Print dialog and Tools/Options/.../Print)
+    // And since print graphics is the only available in Writer and WrtierWeb ...
+    bPrintDraw = bPrintGraphic;
+
+    PutProperties(aNames, aValues);
 }
 
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.