summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rwxr-xr-xsw/inc/printdata.hxx281
-rwxr-xr-xsw/source/core/view/vprint.cxx105
-rw-r--r--sw/source/ui/config/optdlg.hrc8
-rwxr-xr-xsw/source/ui/config/optdlg.src53
-rw-r--r--sw/source/ui/config/optpage.cxx50
-rw-r--r--sw/source/ui/inc/optpage.hxx8
-rwxr-xr-xsw/source/ui/uno/unotxdoc.cxx48
7 files changed, 328 insertions, 225 deletions
diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx
index 356ecb30b79e..75f16d01ace3 100755
--- a/sw/inc/printdata.hxx
+++ b/sw/inc/printdata.hxx
@@ -52,6 +52,139 @@ class SwPrtOptions;
class SwWrtShell;
class SfxViewShell;
+// forward declarations
+class SwPrintUIOptions;
+class SwRenderData;
+
+////////////////////////////////////////////////////////////
+
+
+class SwPrintData
+{
+ const SwPrintUIOptions * m_pPrintUIOptions; // not owner
+ const SwRenderData * m_pRenderData; // not owner
+
+public:
+
+ sal_Bool bPrintGraphic, bPrintTable, bPrintDraw, bPrintControl, bPrintPageBackground,
+ bPrintBlackFont,
+ //#i81434# - printing of hidden text
+ bPrintHiddenText, bPrintTextPlaceholder,
+ bPrintLeftPages, bPrintRightPages, bPrintReverse, bPrintProspect,
+ bPrintProspectRTL,
+ bPrintSingleJobs, bPaperFromSetup,
+ // --> FME 2005-12-13 #b6354161# Print empty pages
+ bPrintEmptyPages,
+ // <--
+ // #i56195# no field update while printing mail merge documents
+ bUpdateFieldsInPrinting,
+ bModified;
+
+ sal_Int16 nPrintPostIts;
+ rtl::OUString sFaxName;
+
+ SwPrintData()
+ {
+ m_pPrintUIOptions = NULL;
+ m_pRenderData = NULL;
+
+ bPrintGraphic =
+ bPrintTable =
+ bPrintDraw =
+ bPrintControl =
+ bPrintLeftPages =
+ bPrintRightPages =
+ bPrintPageBackground =
+ bPrintEmptyPages =
+ bUpdateFieldsInPrinting = sal_True;
+
+ bPaperFromSetup =
+ bPrintReverse =
+ bPrintProspect =
+ bPrintProspectRTL =
+ bPrintSingleJobs =
+ bModified =
+ bPrintBlackFont =
+ bPrintHiddenText =
+ bPrintTextPlaceholder = sal_False;
+
+ nPrintPostIts = 0;
+ }
+
+ virtual ~SwPrintData() {}
+
+ sal_Bool operator==(const SwPrintData& rData)const
+ {
+ return
+ bPrintGraphic == rData.bPrintGraphic &&
+ bPrintTable == rData.bPrintTable &&
+ bPrintDraw == rData.bPrintDraw &&
+ bPrintControl == rData.bPrintControl &&
+ bPrintPageBackground== rData.bPrintPageBackground &&
+ bPrintBlackFont == rData.bPrintBlackFont &&
+ bPrintLeftPages == rData.bPrintLeftPages &&
+ bPrintRightPages == rData.bPrintRightPages &&
+ bPrintReverse == rData.bPrintReverse &&
+ bPrintProspect == rData.bPrintProspect &&
+ bPrintProspectRTL == rData.bPrintProspectRTL &&
+ bPrintSingleJobs == rData.bPrintSingleJobs &&
+ bPaperFromSetup == rData.bPaperFromSetup &&
+ bPrintEmptyPages == rData.bPrintEmptyPages &&
+ bUpdateFieldsInPrinting == rData.bUpdateFieldsInPrinting &&
+ nPrintPostIts == rData.nPrintPostIts &&
+ sFaxName == rData.sFaxName &&
+ bPrintHiddenText == rData.bPrintHiddenText &&
+ bPrintTextPlaceholder == rData.bPrintTextPlaceholder;
+ }
+
+ // Note: in the context where this class ist used the pointers should always be valid
+ // during the lifetime of this object
+ const SwPrintUIOptions & GetPrintUIOptions() const { return *m_pPrintUIOptions; }
+ const SwRenderData & GetRenderData() const { return *m_pRenderData; }
+ void SetPrintUIOptions( const SwPrintUIOptions *pOpt ) { m_pPrintUIOptions = pOpt; }
+ void SetRenderData( const SwRenderData *pData ) { m_pRenderData = pData; }
+
+ sal_Bool IsPrintGraphic() const { return bPrintGraphic; }
+ sal_Bool IsPrintTable() const { return bPrintTable; }
+ sal_Bool IsPrintDraw() const { return bPrintDraw; }
+ sal_Bool IsPrintControl() const { return bPrintControl; }
+ sal_Bool IsPrintLeftPage() const { return bPrintLeftPages; }
+ sal_Bool IsPrintRightPage() const { return bPrintRightPages; }
+ sal_Bool IsPrintReverse() const { return bPrintReverse; }
+ sal_Bool IsPaperFromSetup() const { return bPaperFromSetup; }
+ sal_Bool IsPrintEmptyPages() const { return bPrintEmptyPages; }
+ sal_Bool IsPrintProspect() const { return bPrintProspect; }
+ sal_Bool IsPrintProspectRTL() const { return bPrintProspectRTL; }
+ sal_Bool IsPrintPageBackground() const { return bPrintPageBackground; }
+ sal_Bool IsPrintBlackFont() const { return bPrintBlackFont; }
+ sal_Bool IsPrintSingleJobs() const { return bPrintSingleJobs; }
+ sal_Int16 GetPrintPostIts() const { return nPrintPostIts; }
+ const rtl::OUString GetFaxName() const { return sFaxName; }
+ sal_Bool IsPrintHiddenText() const { return bPrintHiddenText; }
+ sal_Bool IsPrintTextPlaceholder() const { return bPrintTextPlaceholder; }
+
+ void SetPrintGraphic( sal_Bool b ) { doSetModified(); bPrintGraphic = b; }
+ void SetPrintTable( sal_Bool b ) { doSetModified(); bPrintTable = b; }
+ void SetPrintDraw( sal_Bool b ) { doSetModified(); bPrintDraw = b; }
+ void SetPrintControl( sal_Bool b ) { doSetModified(); bPrintControl = b; }
+ void SetPrintLeftPage( sal_Bool b ) { doSetModified(); bPrintLeftPages = b; }
+ void SetPrintRightPage( sal_Bool b ) { doSetModified(); bPrintRightPages = b; }
+ void SetPrintReverse( sal_Bool b ) { doSetModified(); bPrintReverse = b; }
+ void SetPaperFromSetup( sal_Bool b ) { doSetModified(); bPaperFromSetup = b; }
+ void SetPrintEmptyPages( sal_Bool b ) { doSetModified(); bPrintEmptyPages = b; }
+ void SetPrintPostIts( sal_Int16 n ) { doSetModified(); nPrintPostIts = n; }
+ void SetPrintProspect( sal_Bool b ) { doSetModified(); bPrintProspect = b; }
+ void SetPrintProspect_RTL( sal_Bool b ) { doSetModified(); bPrintProspectRTL = b; }
+ void SetPrintPageBackground( sal_Bool b ) { doSetModified(); bPrintPageBackground = b; }
+ void SetPrintBlackFont( sal_Bool b ) { doSetModified(); bPrintBlackFont = b; }
+ void SetPrintSingleJobs( sal_Bool b ) { doSetModified(); bPrintSingleJobs = b; }
+ void SetFaxName( const rtl::OUString& rSet ) { sFaxName = rSet; }
+ void SetPrintHiddenText( sal_Bool b ) { doSetModified(); bPrintHiddenText = b; }
+ void SetPrintTextPlaceholder( sal_Bool b ) { doSetModified(); bPrintTextPlaceholder = b; }
+
+ virtual void doSetModified () { bModified = sal_True;}
+};
+
////////////////////////////////////////////////////////////
@@ -59,13 +192,25 @@ class SfxViewShell;
class SwPrintUIOptions : public vcl::PrinterOptionsHelper
{
OutputDevice* m_pLast;
+ const SwPrintData & m_rDefaultPrintData;
public:
- SwPrintUIOptions( bool bWeb, bool bSwSrcView, bool bHasSelection, bool bHasPostIts );
- ~SwPrintUIOptions();
+ SwPrintUIOptions( bool bWeb, bool bSwSrcView, bool bHasSelection, bool bHasPostIts, const SwPrintData &rDefaultPrintData );
+ virtual ~SwPrintUIOptions();
bool processPropertiesAndCheckFormat( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& i_rNewProp );
+ bool IsPrintFormControls() const { return getBoolValue( "PrintControls", m_rDefaultPrintData.bPrintControl ); }
+ bool IsPrintPageBackground() const { return getBoolValue( "PrintPageBackground", m_rDefaultPrintData.bPrintPageBackground ); }
+ bool IsPrintProspect() const { return getBoolValue( "PrintProspect", m_rDefaultPrintData.bPrintProspect ); }
+ bool IsPrintProspectRTL() const { return getIntValue( "PrintProspectRTL", m_rDefaultPrintData.bPrintProspectRTL ) ? true : false; }
+ bool IsPrintTextPlaceholders() const { return getBoolValue( "PrintTextPlaceholder", m_rDefaultPrintData.bPrintTextPlaceholder ); }
+ bool IsPrintHiddenText() const { return getBoolValue( "PrintHiddenText", m_rDefaultPrintData.bPrintHiddenText ); }
+ bool IsPrintWithBlackTextColor() const { return getBoolValue( "PrintBlackFonts", m_rDefaultPrintData.bPrintBlackFont ); }
+ sal_Int16 GetPrintPostItsType() const { return static_cast< sal_Int16 >(getIntValue( "PrintAnnotationMode", m_rDefaultPrintData.nPrintPostIts )); }
+ bool IsPaperFromSetup() const { return getBoolValue( "PrintPaperFromSetup", m_rDefaultPrintData.bPaperFromSetup ); }
+ bool IsPrintReverse() const { return false; /*handled by print dialog now*/ /*getBoolValue( "PrintReversed", m_rDefaultPrintData.bPrintReverse );*/ }
+
bool IsPrintLeftPages() const;
bool IsPrintRightPages() const;
bool IsPrintEmptyPages( bool bIsPDFExport ) const;
@@ -130,8 +275,7 @@ public:
const SwPrtOptions * GetSwPrtOptions() const { return m_pPrtOptions; }
SwPrtOptions & GetSwPrtOptionsRef() { return *m_pPrtOptions; }
void MakeSwPrtOptions( SwPrtOptions &rOptions, const SwDocShell *pDocShell,
- const SwPrintUIOptions *pOpt, const SwRenderData *pData,
- bool bIsSkipEmptyPages, bool bIsPDFExport );
+ const SwPrintUIOptions *pOpt, const SwRenderData *pData, bool bIsPDFExport );
typedef std::map< sal_Int32, const SwPageFrm * > ValidStartFramesMap_t;
@@ -169,133 +313,4 @@ public:
////////////////////////////////////////////////////////////
-
-class SwPrintData
-{
- const SwPrintUIOptions * m_pPrintUIOptions; // not owner
- const SwRenderData * m_pRenderData; // not owner
-
-public:
-
- sal_Bool bPrintGraphic, bPrintTable, bPrintDraw, bPrintControl, bPrintPageBackground,
- bPrintBlackFont,
- //#i81434# - printing of hidden text
- bPrintHiddenText, bPrintTextPlaceholder,
- bPrintLeftPages, bPrintRightPages, bPrintReverse, bPrintProspect,
- bPrintProspectRTL,
- bPrintSingleJobs, bPaperFromSetup,
- // --> FME 2005-12-13 #b6354161# Print empty pages
- bPrintEmptyPages,
- // <--
- // #i56195# no field update while printing mail merge documents
- bUpdateFieldsInPrinting,
- bModified;
-
- sal_Int16 nPrintPostIts;
- rtl::OUString sFaxName;
-
- SwPrintData()
- {
- m_pPrintUIOptions = NULL;
- m_pRenderData = NULL;
-
- bPrintGraphic =
- bPrintTable =
- bPrintDraw =
- bPrintControl =
- bPrintLeftPages =
- bPrintRightPages =
- bPrintPageBackground =
- bPrintEmptyPages =
- bUpdateFieldsInPrinting = sal_True;
-
- bPaperFromSetup =
- bPrintReverse =
- bPrintProspect =
- bPrintProspectRTL =
- bPrintSingleJobs =
- bModified =
- bPrintBlackFont =
- bPrintHiddenText =
- bPrintTextPlaceholder = sal_False;
-
- nPrintPostIts = 0;
- }
-
- virtual ~SwPrintData() {}
-
- sal_Bool operator==(const SwPrintData& rData)const
- {
- return
- bPrintGraphic == rData.bPrintGraphic &&
- bPrintTable == rData.bPrintTable &&
- bPrintDraw == rData.bPrintDraw &&
- bPrintControl == rData.bPrintControl &&
- bPrintPageBackground== rData.bPrintPageBackground &&
- bPrintBlackFont == rData.bPrintBlackFont &&
- bPrintLeftPages == rData.bPrintLeftPages &&
- bPrintRightPages == rData.bPrintRightPages &&
- bPrintReverse == rData.bPrintReverse &&
- bPrintProspect == rData.bPrintProspect &&
- bPrintProspectRTL == rData.bPrintProspectRTL &&
- bPrintSingleJobs == rData.bPrintSingleJobs &&
- bPaperFromSetup == rData.bPaperFromSetup &&
- bPrintEmptyPages == rData.bPrintEmptyPages &&
- bUpdateFieldsInPrinting == rData.bUpdateFieldsInPrinting &&
- nPrintPostIts == rData.nPrintPostIts &&
- sFaxName == rData.sFaxName &&
- bPrintHiddenText == rData.bPrintHiddenText &&
- bPrintTextPlaceholder == rData.bPrintTextPlaceholder;
- }
-
- // Note: in the context where this class ist used the pointers should always be valid
- // during the lifetime of this object
- const SwPrintUIOptions & GetPrintUIOptions() const { return *m_pPrintUIOptions; }
- void SetPrintUIOptions( const SwPrintUIOptions *pOpt ) { m_pPrintUIOptions = pOpt; }
- const SwRenderData & GetRenderData() const { return *m_pRenderData; }
- void SetRenderData( const SwRenderData *pData ) { m_pRenderData = pData; }
-
- sal_Bool IsPrintGraphic() const { return bPrintGraphic; }
- sal_Bool IsPrintTable() const { return bPrintTable; }
- sal_Bool IsPrintDraw() const { return bPrintDraw; }
- sal_Bool IsPrintControl() const { return bPrintControl; }
- sal_Bool IsPrintLeftPage() const { return bPrintLeftPages; }
- sal_Bool IsPrintRightPage() const { return bPrintRightPages; }
- sal_Bool IsPrintReverse() const { return bPrintReverse; }
- sal_Bool IsPaperFromSetup() const { return bPaperFromSetup; }
- sal_Bool IsPrintEmptyPages() const{ return bPrintEmptyPages; }
- sal_Bool IsPrintProspect() const { return bPrintProspect; }
- sal_Bool IsPrintProspectRTL() const { return bPrintProspectRTL; }
- sal_Bool IsPrintPageBackground() const { return bPrintPageBackground; }
- sal_Bool IsPrintBlackFont() const { return bPrintBlackFont; }
- sal_Bool IsPrintSingleJobs() const { return bPrintSingleJobs; }
- sal_Int16 GetPrintPostIts() const { return nPrintPostIts; }
- const rtl::OUString GetFaxName() const{return sFaxName; }
- sal_Bool IsPrintHiddenText() const {return bPrintHiddenText;}
- sal_Bool IsPrintTextPlaceholder() const {return bPrintTextPlaceholder; }
-
- void SetPrintGraphic ( sal_Bool b ) { doSetModified(); bPrintGraphic = b;}
- void SetPrintTable ( sal_Bool b ) { doSetModified(); bPrintTable = b;}
- void SetPrintDraw ( sal_Bool b ) { doSetModified(); bPrintDraw = b;}
- void SetPrintControl ( sal_Bool b ) { doSetModified(); bPrintControl = b; }
- void SetPrintLeftPage ( sal_Bool b ) { doSetModified(); bPrintLeftPages = b;}
- void SetPrintRightPage( sal_Bool b ) { doSetModified(); bPrintRightPages = b;}
- void SetPrintReverse ( sal_Bool b ) { doSetModified(); bPrintReverse = b;}
- void SetPaperFromSetup( sal_Bool b ) { doSetModified(); bPaperFromSetup = b;}
- void SetPrintEmptyPages(sal_Bool b ) { doSetModified(); bPrintEmptyPages = b;}
- void SetPrintPostIts ( sal_Int16 n){ doSetModified(); nPrintPostIts = n; }
- void SetPrintProspect ( sal_Bool b ) { doSetModified(); bPrintProspect = b; }
- void SetPrintProspect_RTL ( sal_Bool b ) { doSetModified(); bPrintProspectRTL = b; }
- void SetPrintPageBackground(sal_Bool b){ doSetModified(); bPrintPageBackground = b;}
- void SetPrintBlackFont(sal_Bool b){ doSetModified(); bPrintBlackFont = b;}
- void SetPrintSingleJobs(sal_Bool b){ doSetModified(); bPrintSingleJobs = b;}
- void SetFaxName(const rtl::OUString& rSet){sFaxName = rSet;}
- void SetPrintHiddenText(sal_Bool b){ doSetModified(); bPrintHiddenText = b;}
- void SetPrintTextPlaceholder(sal_Bool b){ doSetModified(); bPrintTextPlaceholder = b;}
-
- virtual void doSetModified () { bModified = sal_True;}
-};
-
-////////////////////////////////////////////////////////////
-
#endif //_SW_PRINTDATA_HXX
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 66aa3741148f..87b8c5177e26 100755
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -305,7 +305,6 @@ void SwRenderData::MakeSwPrtOptions(
const SwDocShell *pDocShell,
const SwPrintUIOptions *pOpt,
const SwRenderData *pData,
- bool bIsSkipEmptyPages,
bool bIsPDFExport )
{
if (!pDocShell || !pOpt || !pData)
@@ -320,22 +319,22 @@ void SwRenderData::MakeSwPrtOptions(
rOptions.bPrintGraphic = pOpt->IsPrintGraphics();
rOptions.bPrintTable = pOpt->IsPrintTables();
rOptions.bPrintDraw = pOpt->IsPrintDrawings();
- rOptions.bPrintControl = pOpt->getBoolValue( "PrintControls", rOptions.bPrintControl );
+ rOptions.bPrintControl = pOpt->IsPrintFormControls();
rOptions.bPrintLeftPages = pOpt->IsPrintLeftPages();
rOptions.bPrintRightPages = pOpt->IsPrintRightPages();
- rOptions.bPrintPageBackground = pOpt->getBoolValue( "PrintPageBackground", rOptions.bPrintPageBackground );
- rOptions.bPrintEmptyPages = !bIsSkipEmptyPages;
+ rOptions.bPrintPageBackground = pOpt->IsPrintPageBackground();
+ rOptions.bPrintEmptyPages = pOpt->IsPrintEmptyPages( bIsPDFExport );
// bUpdateFieldsInPrinting <-- not set here; mail merge only
- rOptions.bPaperFromSetup = pOpt->getBoolValue( "PrintPaperFromSetup", rOptions.bPaperFromSetup );
- rOptions.bPrintReverse = pOpt->getBoolValue( "PrintReversed", rOptions.bPrintReverse );
- rOptions.bPrintProspect = pOpt->getBoolValue( "PrintProspect", rOptions.bPrintProspect );
- rOptions.bPrintProspectRTL = pOpt->getIntValue( "PrintProspectRTL", rOptions.bPrintProspectRTL ) ? true : false;
+ rOptions.bPaperFromSetup = pOpt->IsPaperFromSetup();
+ rOptions.bPrintReverse = pOpt->IsPrintReverse();
+ rOptions.bPrintProspect = pOpt->IsPrintProspect();
+ rOptions.bPrintProspectRTL = pOpt->IsPrintProspectRTL();
// bPrintSingleJobs <-- not set here; mail merge and or configuration
// bModified <-- not set here; mail merge only
- rOptions.bPrintBlackFont = pOpt->getBoolValue( "PrintBlackFonts", rOptions.bPrintBlackFont );
- rOptions.bPrintHiddenText = pOpt->getBoolValue( "PrintHiddenText", rOptions.bPrintHiddenText );
- rOptions.bPrintTextPlaceholder = pOpt->getBoolValue( "PrintTextPlaceholder", rOptions.bPrintTextPlaceholder );
- rOptions.nPrintPostIts = static_cast< sal_Int16 >(pOpt->getIntValue( "PrintAnnotationMode", rOptions.nPrintPostIts ));
+ rOptions.bPrintBlackFont = pOpt->IsPrintWithBlackTextColor();
+ rOptions.bPrintHiddenText = pOpt->IsPrintHiddenText();
+ rOptions.bPrintTextPlaceholder = pOpt->IsPrintTextPlaceholders();
+ rOptions.nPrintPostIts = pOpt->GetPrintPostItsType();
//! needs to be set after MakeOptions since the assignment operation in that
//! function will destroy the pointers
@@ -357,8 +356,14 @@ void SwRenderData::MakeSwPrtOptions(
/*****************************************************************************/
-SwPrintUIOptions::SwPrintUIOptions( bool bWeb, bool bSwSrcView, bool bHasSelection, bool bHasPostIts ) :
- m_pLast( NULL )
+SwPrintUIOptions::SwPrintUIOptions(
+ bool bWeb,
+ bool bSwSrcView,
+ bool bHasSelection,
+ bool bHasPostIts,
+ const SwPrintData &rDefaultPrintData ) :
+ m_pLast( NULL ),
+ m_rDefaultPrintData( rDefaultPrintData )
{
ResStringArray aLocalizedStrings( SW_RES( STR_PRINTOPTUI ) );
@@ -396,62 +401,70 @@ SwPrintUIOptions::SwPrintUIOptions( bool bWeb, bool bSwSrcView, bool bHasSelect
m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 1 ), rtl::OUString() );
// create a bool option for background
+ bool bDefaultVal = rDefaultPrintData.IsPrintPageBackground();
m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 2 ),
aLocalizedStrings.GetString( 3 ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPageBackground" ) ),
- sal_True );
+ bDefaultVal );
- // create a bool option for graphics
+ // create a bool option for pictures/graphics AND OLE and drawing objects as well
+ bDefaultVal = rDefaultPrintData.IsPrintGraphic() || rDefaultPrintData.IsPrintDraw();
m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ),
aLocalizedStrings.GetString( 5 ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPicturesAndObjects" ) ),
- sal_True );
+ bDefaultVal );
if (!bWeb)
{
// create a bool option for hidden text
+ bDefaultVal = rDefaultPrintData.IsPrintHiddenText();
m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 6 ),
aLocalizedStrings.GetString( 7 ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintHiddenText" ) ),
- sal_False );
+ bDefaultVal );
// create a bool option for place holder
+ bDefaultVal = rDefaultPrintData.IsPrintTextPlaceholder();
m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 8 ),
aLocalizedStrings.GetString( 9 ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintTextPlaceholder" ) ),
- sal_False );
+ bDefaultVal );
}
// create a bool option for controls
+ bDefaultVal = rDefaultPrintData.IsPrintControl();
m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 10 ),
aLocalizedStrings.GetString( 11 ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintControls" ) ),
- sal_True );
+ bDefaultVal );
// create sub section for Color
m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 12 ), rtl::OUString() );
- // create a bool option for black
+ // create a bool option for printing text with black font color
+ bDefaultVal = rDefaultPrintData.IsPrintBlackFont();
m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 13 ),
aLocalizedStrings.GetString( 14 ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintBlackFonts" ) ),
- sal_False );
+ bDefaultVal );
// create subgroup for misc options
m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 15 ) ), rtl::OUString() );
- // create a bool option for blank pages
+ // 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" ) ),
- sal_True );
+ bDefaultVal );
// create a bool option for paper tray
+ bDefaultVal = rDefaultPrintData.IsPaperFromSetup();
vcl::PrinterOptionsHelper::UIControlOptions aPaperTrayOpt;
aPaperTrayOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OptionsPageOptGroup" ) );
m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 18 ),
aLocalizedStrings.GetString( 19 ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPaperFromSetup" ) ),
- sal_False,
+ bDefaultVal,
aPaperTrayOpt
);
@@ -498,6 +511,7 @@ SwPrintUIOptions::SwPrintUIOptions( bool bWeb, bool bSwSrcView, bool bHasSelect
aContentsOpt
);
// create a list box for notes content
+ const sal_Int16 nPrintPostIts = rDefaultPrintData.GetPrintPostIts();
aChoices.realloc( 4 );
aChoices[0] = aLocalizedStrings.GetString( 21 );
aChoices[1] = aLocalizedStrings.GetString( 22 );
@@ -512,7 +526,7 @@ SwPrintUIOptions::SwPrintUIOptions( bool bWeb, bool bSwSrcView, bool bHasSelect
aHelpText,
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintAnnotationMode" ) ),
aChoices,
- 0,
+ nPrintPostIts,
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ),
aAnnotOpt
);
@@ -534,23 +548,36 @@ SwPrintUIOptions::SwPrintUIOptions( bool bWeb, bool bSwSrcView, bool bHasSelect
uno::Sequence< rtl::OUString > aRLHelp( 1 );
aRLHelp[0] = aLocalizedStrings.GetString( 31 );
// create a choice option for all/left/right pages
+ // 0 : all pages (left & right)
+ // 1 : left pages
+ // 2 : right pages
+ DBG_ASSERT( rDefaultPrintData.IsPrintLeftPage() || rDefaultPrintData.IsPrintRigthPage(),
+ "unexpected value combination" );
+ sal_Int16 nPagesChoice = 0;
+ if (rDefaultPrintData.IsPrintLeftPage() && !rDefaultPrintData.IsPrintRightPage())
+ nPagesChoice = 1;
+ else if (!rDefaultPrintData.IsPrintLeftPage() && rDefaultPrintData.IsPrintRightPage())
+ nPagesChoice = 2;
m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 32 ),
aRLHelp,
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintLeftRightPages" ) ),
- aRLChoices, 0, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) )
+ aRLChoices,
+ nPagesChoice,
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) )
);
}
// create a bool option for brochure
+ bDefaultVal = rDefaultPrintData.IsPrintProspect();
rtl::OUString aBrochurePropertyName( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) );
m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 33 ),
aLocalizedStrings.GetString( 34 ),
aBrochurePropertyName,
- sal_False,
+ bDefaultVal,
aPageSetOpt
);
- if( bCTL )
+ if (bCTL)
{
// create a bool option for brochure RTL dependent on brochure
uno::Sequence< rtl::OUString > aBRTLChoices( 2 );
@@ -558,10 +585,16 @@ SwPrintUIOptions::SwPrintUIOptions( bool bWeb, bool bSwSrcView, bool bHasSelect
aBRTLChoices[1] = aLocalizedStrings.GetString( 36 );
vcl::PrinterOptionsHelper::UIControlOptions aBrochureRTLOpt( aBrochurePropertyName, -1, sal_True );
aBrochureRTLOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutPage" ) );
+ // RTL brochure choices
+ // 0 : left-to-right
+ // 1 : right-to-left
+ const sal_Int16 nBRTLChoice = rDefaultPrintData.IsPrintProspectRTL() ? 1 : 0;
m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( rtl::OUString(),
uno::Sequence< rtl::OUString >(),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspectRTL" ) ),
- aBRTLChoices, 0, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ),
+ aBRTLChoices,
+ nBRTLChoice,
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ),
aBrochureRTLOpt
);
}
@@ -578,7 +611,7 @@ SwPrintUIOptions::~SwPrintUIOptions()
bool SwPrintUIOptions::IsPrintLeftPages() const
{
// take care of different property names for the option.
- // for compatibility the old name should win
+ // for compatibility the old name should win (may still be used for PDF export or via Uno API)
// 0: left and right pages
// 1: left pages only
@@ -592,7 +625,7 @@ bool SwPrintUIOptions::IsPrintLeftPages() const
bool SwPrintUIOptions::IsPrintRightPages() const
{
// take care of different property names for the option.
- // for compatibility the old name should win
+ // for compatibility the old name should win (may still be used for PDF export or via Uno API)
sal_Int64 nLRPages = getIntValue( "PrintLeftRightPages", 0 /* default: all */ );
bool bRes = nLRPages == 0 || nLRPages == 2;
@@ -612,8 +645,8 @@ bool SwPrintUIOptions::IsPrintEmptyPages( bool bIsPDFExport ) const
bool SwPrintUIOptions::IsPrintTables() const
{
- // take care of different property names for the option.
- // for compatibility the old name should win
+ // take care of different property names currently in use for this option.
+ // for compatibility the old name should win (may still be used for PDF export or via Uno API)
// bool bRes = getBoolValue( "PrintTablesGraphicsAndDiagrams", sal_True );
// bRes = getBoolValue( "PrintTables", bRes );
@@ -625,7 +658,7 @@ bool SwPrintUIOptions::IsPrintTables() const
bool SwPrintUIOptions::IsPrintGraphics() const
{
// take care of different property names for the option.
- // for compatibility the old name should win
+ // for compatibility the old name should win (may still be used for PDF export or via Uno API)
bool bRes = getBoolValue( "PrintPicturesAndObjects", sal_True );
bRes = getBoolValue( "PrintGraphics", bRes );
@@ -635,7 +668,7 @@ bool SwPrintUIOptions::IsPrintGraphics() const
bool SwPrintUIOptions::IsPrintDrawings() const
{
// take care of different property names for the option.
- // for compatibility the old name should win
+ // for compatibility the old name should win (may still be used for PDF export or via Uno API)
bool bRes = getBoolValue( "PrintPicturesAndObjects", sal_True );
bRes = getBoolValue( "PrintDrawings", bRes );
diff --git a/sw/source/ui/config/optdlg.hrc b/sw/source/ui/config/optdlg.hrc
index 2ada884e48c7..63ad384c7bd9 100644
--- a/sw/source/ui/config/optdlg.hrc
+++ b/sw/source/ui/config/optdlg.hrc
@@ -96,13 +96,13 @@
#define CB_CHAR_HIDDEN 61
// Print-Extra-Page
#define CB_PGRF 61
-#define CB_PTAB 62
-#define CB_PDRAW 63
+//#define CB_PTAB 62 merged with CB_PGRF in printerpullpages
+//#define CB_PDRAW 63 removed in printerpullpages
#define CB_LEFTP 64
#define CB_RIGHTP 65
-#define CB_REVERSE 66
+//#define CB_REVERSE 66 removed in printerpullpages
#define CB_PROSPECT 67
-#define CB_SINGLEJOBS 68
+//#define CB_SINGLEJOBS 68 removed in printerpullpages
#define CB_CTRLFLD 69
#define CB_PAPERFROMSETUP 70
#define FL_1 71
diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src
index ce1d9ae22942..f509b1cdcc5c 100755
--- a/sw/source/ui/config/optdlg.src
+++ b/sw/source/ui/config/optdlg.src
@@ -215,60 +215,66 @@ TabPage TP_OPTPRINT_PAGE
Text [ en-US ] = "Contents" ;
Group = TRUE ;
};
- CheckBox CB_PGRF
+ CheckBox CB_PGRF /*functionally merged with CB_PDRAW*/
{
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
- Text [ en-US ] = "~Graphics" ;
+ Text [ en-US ] = "~Pictures and objects" ;
TabStop = TRUE ;
Group = TRUE ;
};
+/*
+ removed, tables now always get printed
CheckBox CB_PTAB
{
Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "~Tables" ;
};
+*/
+/*
+ functionally merged with CB_PGRF (pictures and graphics)
CheckBox CB_PDRAW
{
Pos = MAP_APPFONT ( 12 , 40 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Dra~wings" ;
};
+*/
CheckBox CB_CTRLFLD
{
- Pos = MAP_APPFONT ( 12 , 53 ) ;
+ Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
- Text [ en-US ] = "Control~s" ;
+ Text [ en-US ] = "Form control~s" ;
};
CheckBox CB_BACKGROUND
{
- Pos = MAP_APPFONT ( 12 , 66 ) ;
+ Pos = MAP_APPFONT ( 12 , 40 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
- Text [ en-US ] = "Ba~ckground" ;
+ Text [ en-US ] = "Page ba~ckground" ;
};
CheckBox CB_BLACK_FONT
{
- Pos = MAP_APPFONT ( 12 , 79 ) ;
+ Pos = MAP_APPFONT ( 12 , 53 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
- Text [ en-US ] = "Print blac~k" ;
+ Text [ en-US ] = "Print text in blac~k" ;
};
CheckBox CB_HIDDEN_TEXT
{
- Pos = MAP_APPFONT ( 12 , 92 ) ;
+ Pos = MAP_APPFONT ( 12 , 66 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Hidden te~xt" ;
};
CheckBox CB_TEXT_PLACEHOLDER
{
- Pos = MAP_APPFONT ( 12 , 105 ) ;
+ Pos = MAP_APPFONT ( 12 , 79 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Text ~placeholder" ;
};
FixedLine FL_SEP_PRT_LEFT
{
Pos = MAP_APPFONT ( 85 , 14 ) ;
- Size = MAP_APPFONT ( 4 , 104 ) ;
+ Size = MAP_APPFONT ( 4 , 78 ) ;
Vert = TRUE;
};
FixedLine FL_2
@@ -292,21 +298,24 @@ TabPage TP_OPTPRINT_PAGE
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "~Right pages" ;
};
+/*
+ removed, noe handled by the new print dialog (i.e. vcl) itself
CheckBox CB_REVERSE
{
Pos = MAP_APPFONT ( 96 , 40 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Re~versed" ;
};
+*/
CheckBox CB_PROSPECT
{
- Pos = MAP_APPFONT ( 96 , 53 ) ;
+ Pos = MAP_APPFONT ( 96 , 40 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Broch~ure" ;
};
CheckBox CB_PROSPECT_RTL
{
- Pos = MAP_APPFONT ( 103 , 66 ) ;
+ Pos = MAP_APPFONT ( 103 , 53 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Right to Left" ;
Text [ x-comment ] = " ";
@@ -340,7 +349,7 @@ TabPage TP_OPTPRINT_PAGE
FixedLine FL_SEP_PRT_RIGHT
{
Pos = MAP_APPFONT ( 169 , 14 ) ;
- Size = MAP_APPFONT ( 4 , 104 ) ;
+ Size = MAP_APPFONT ( 4 , 78 ) ;
Vert = TRUE;
};
FixedLine FL_3
@@ -352,35 +361,37 @@ TabPage TP_OPTPRINT_PAGE
};
FixedLine FL_4
{
- Pos = MAP_APPFONT ( 6 , 121 ) ;
+ Pos = MAP_APPFONT ( 6 , 95 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Group = TRUE ;
Text [ en-US ] = "Other";
};
CheckBox CB_PRINTEMPTYPAGES
{
- Pos = MAP_APPFONT ( 12 , 132 ) ;
+ Pos = MAP_APPFONT ( 12 , 106 ) ;
Size = MAP_APPFONT ( 200 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Print ~automatically inserted blank pages";
};
+/*
CheckBox CB_SINGLEJOBS
{
- Pos = MAP_APPFONT ( 12 , 145 ) ;
+ Pos = MAP_APPFONT ( 12 , 119 ) ;
Size = MAP_APPFONT ( 200 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Create s~ingle print jobs" ;
};
+*/
CheckBox CB_PAPERFROMSETUP
{
- Pos = MAP_APPFONT ( 12 , 158 ) ;
+ Pos = MAP_APPFONT ( 12 , 119 ) ;
Size = MAP_APPFONT ( 200 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Paper tray from printer settings";
};
FixedText FT_FAX
{
- Pos = MAP_APPFONT ( 12 , 173 ) ;
+ Pos = MAP_APPFONT ( 12 , 134 ) ;
Size = MAP_APPFONT ( 50 , 8 ) ;
Group = TRUE ;
Text [ en-US ] = "~Fax";
@@ -388,7 +399,7 @@ TabPage TP_OPTPRINT_PAGE
ListBox LB_FAX
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 70 , 171 ) ;
+ Pos = MAP_APPFONT ( 70 , 132 ) ;
Size = MAP_APPFONT ( 184 , 70 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
@@ -945,7 +956,7 @@ StringArray STR_PRINTOPTUI
< "Page ba~ckground"; >;
< "Specifies whether to include colors and objects that are inserted to the background of the page (Format - Page - Background) in the printed document."; >;
< "~Pictures and objects"; >;
- < "Specifies whether the graphics of your text document are printed"; >;
+ < "Specifies whether the graphics and drawing or OLE objects of your text document are printed"; >;
< "Hidden te~xt"; >;
< "Enable this option to print text that is marked as hidden."; >;
< "~Text placeholder"; >;
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 3c529263f66d..d609f1ed28cc 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -350,8 +350,8 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
SfxTabPage( pParent, SW_RES( TP_OPTPRINT_PAGE ), rCoreSet),
aFL1 (this, SW_RES(FL_1)),
aGrfCB (this, SW_RES(CB_PGRF)),
- aTabCB (this, SW_RES(CB_PTAB)),
- aDrawCB (this, SW_RES(CB_PDRAW)),
+// aTabCB (this, SW_RES(CB_PTAB)),
+// aDrawCB (this, SW_RES(CB_PDRAW)),
aCtrlFldCB (this, SW_RES(CB_CTRLFLD)),
aBackgroundCB (this, SW_RES(CB_BACKGROUND)),
aBlackFontCB (this, SW_RES(CB_BLACK_FONT)),
@@ -361,7 +361,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aFL2 (this, SW_RES(FL_2)),
aLeftPageCB (this, SW_RES(CB_LEFTP)),
aRightPageCB (this, SW_RES(CB_RIGHTP)),
- aReverseCB (this, SW_RES(CB_REVERSE)),
+// aReverseCB (this, SW_RES(CB_REVERSE)),
aProspectCB (this, SW_RES(CB_PROSPECT)),
aProspectCB_RTL (this, SW_RES(CB_PROSPECT_RTL)),
aSeparatorRFL (this, SW_RES(FL_SEP_PRT_RIGHT)),
@@ -372,7 +372,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aFL3 (this, SW_RES(FL_3)),
aFL4 (this, SW_RES(FL_4)),
aPrintEmptyPagesCB(this, SW_RES(CB_PRINTEMPTYPAGES)),
- aSingleJobsCB (this, SW_RES(CB_SINGLEJOBS)),
+// aSingleJobsCB (this, SW_RES(CB_SINGLEJOBS)),
aPaperFromSetupCB(this, SW_RES(CB_PAPERFROMSETUP)),
aFaxFT (this, SW_RES(FT_FAX)),
aFaxLB (this, SW_RES(LB_FAX)),
@@ -386,14 +386,14 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aGrfCB.SetClickHdl( aLk );
aRightPageCB.SetClickHdl( aLk );
aLeftPageCB.SetClickHdl( aLk );
- aTabCB.SetClickHdl( aLk );
- aDrawCB.SetClickHdl( aLk );
+// aTabCB.SetClickHdl( aLk );
+// aDrawCB.SetClickHdl( aLk );
aCtrlFldCB.SetClickHdl( aLk );
aBackgroundCB.SetClickHdl( aLk );
aBlackFontCB.SetClickHdl( aLk );
aPrintHiddenTextCB.SetClickHdl( aLk );
aPrintTextPlaceholderCB.SetClickHdl( aLk );
- aReverseCB.SetClickHdl( aLk );
+// aReverseCB.SetClickHdl( aLk );
aProspectCB.SetClickHdl( aLk );
aProspectCB_RTL.SetClickHdl( aLk );
aPaperFromSetupCB.SetClickHdl( aLk );
@@ -402,27 +402,27 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aEndRB.SetClickHdl( aLk );
aOnlyRB.SetClickHdl( aLk );
aNoRB.SetClickHdl( aLk );
- aSingleJobsCB.SetClickHdl( aLk );
+// aSingleJobsCB.SetClickHdl( aLk );
aFaxLB.SetSelectHdl( LINK( this, SwAddPrinterTabPage, SelectHdl ) );
const SfxPoolItem* pItem;
if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem )
&& ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
{
- aDrawCB .Hide();
+// aDrawCB .Hide();
aLeftPageCB .Hide();
aRightPageCB .Hide();
aPrintHiddenTextCB.Hide();
aPrintTextPlaceholderCB.Hide();
- Point rPt(aReverseCB .GetPosPixel());
+// aReverseCB.SetPosPixel(aLeftPageCB.GetPosPixel());
+ aProspectCB.SetPosPixel(aLeftPageCB.GetPosPixel());
+ Point rPt( aRightPageCB.GetPosPixel() );
rPt.setX(rPt.getX() + 15); // indent
aProspectCB_RTL.SetPosPixel(rPt);
- aReverseCB.SetPosPixel(aLeftPageCB .GetPosPixel());
- aProspectCB.SetPosPixel(aRightPageCB .GetPosPixel());
- aPrintHiddenTextCB.SetPosPixel(aBlackFontCB.GetPosPixel());
- aBlackFontCB.SetPosPixel(aBackgroundCB.GetPosPixel());
- aBackgroundCB.SetPosPixel(aCtrlFldCB.GetPosPixel());
- aCtrlFldCB.SetPosPixel(aDrawCB.GetPosPixel());
+// aBlackFontCB.SetPosPixel(aBackgroundCB.GetPosPixel());
+// aPrintHiddenTextCB.SetPosPixel(aBlackFontCB.GetPosPixel());
+// aBackgroundCB.SetPosPixel(aCtrlFldCB.GetPosPixel());
+// aCtrlFldCB.SetPosPixel(aDrawCB.GetPosPixel());
}
aProspectCB_RTL.Disable();
SvtCTLOptions aCTLOptions;
@@ -465,8 +465,8 @@ BOOL SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet )
{
SwAddPrinterItem aAddPrinterAttr (FN_PARAM_ADDPRINTER);
aAddPrinterAttr.bPrintGraphic = aGrfCB.IsChecked();
- aAddPrinterAttr.bPrintTable = aTabCB.IsChecked();
- aAddPrinterAttr.bPrintDraw = aDrawCB.IsChecked();
+ aAddPrinterAttr.bPrintTable = TRUE; // always enabled since CWS printerpullgpages /*aTabCB.IsChecked();*/
+ aAddPrinterAttr.bPrintDraw = aGrfCB.IsChecked(); // UI merged with aGrfCB in CWS printerpullgpages /*aDrawCB.IsChecked()*/;
aAddPrinterAttr.bPrintControl = aCtrlFldCB.IsChecked();
aAddPrinterAttr.bPrintPageBackground = aBackgroundCB.IsChecked();
aAddPrinterAttr.bPrintBlackFont = aBlackFontCB.IsChecked();
@@ -475,12 +475,12 @@ BOOL SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet )
aAddPrinterAttr.bPrintLeftPages = aLeftPageCB.IsChecked();
aAddPrinterAttr.bPrintRightPages = aRightPageCB.IsChecked();
- aAddPrinterAttr.bPrintReverse = aReverseCB.IsChecked();
+ aAddPrinterAttr.bPrintReverse = FALSE; // handled by vcl itself since CWS printerpullpages /*aReverseCB.IsChecked()*/;
aAddPrinterAttr.bPrintProspect = aProspectCB.IsChecked();
aAddPrinterAttr.bPrintProspectRTL = aProspectCB_RTL.IsChecked();
aAddPrinterAttr.bPaperFromSetup = aPaperFromSetupCB.IsChecked();
aAddPrinterAttr.bPrintEmptyPages = aPrintEmptyPagesCB.IsChecked();
- aAddPrinterAttr.bPrintSingleJobs = aSingleJobsCB.IsChecked();
+ aAddPrinterAttr.bPrintSingleJobs = TRUE; // handled by vcl in new print dialog since CWS printerpullpages /*aSingleJobsCB.IsChecked()*/;
if (aNoRB.IsChecked()) aAddPrinterAttr.nPrintPostIts =
POSTITS_NONE;
@@ -508,9 +508,9 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& )
if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , FALSE,
(const SfxPoolItem**)&pAddPrinterAttr ))
{
- aGrfCB.Check( pAddPrinterAttr->bPrintGraphic);
- aTabCB.Check( pAddPrinterAttr->bPrintTable);
- aDrawCB.Check( pAddPrinterAttr->bPrintDraw);
+ aGrfCB.Check( pAddPrinterAttr->bPrintGraphic || pAddPrinterAttr->bPrintDraw );
+// aTabCB.Check( pAddPrinterAttr->bPrintTable);
+// aDrawCB.Check( pAddPrinterAttr->bPrintDraw);
aCtrlFldCB.Check( pAddPrinterAttr->bPrintControl);
aBackgroundCB.Check( pAddPrinterAttr->bPrintPageBackground);
aBlackFontCB.Check( pAddPrinterAttr->bPrintBlackFont);
@@ -518,12 +518,12 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& )
aPrintTextPlaceholderCB.Check(pAddPrinterAttr->bPrintTextPlaceholder);
aLeftPageCB.Check( pAddPrinterAttr->bPrintLeftPages);
aRightPageCB.Check( pAddPrinterAttr->bPrintRightPages);
- aReverseCB.Check( pAddPrinterAttr->bPrintReverse);
+// aReverseCB.Check( pAddPrinterAttr->bPrintReverse);
aPaperFromSetupCB.Check(pAddPrinterAttr->bPaperFromSetup);
aPrintEmptyPagesCB.Check(pAddPrinterAttr->bPrintEmptyPages);
aProspectCB.Check( pAddPrinterAttr->bPrintProspect);
aProspectCB_RTL.Check( pAddPrinterAttr->bPrintProspectRTL);
- aSingleJobsCB.Check( pAddPrinterAttr->bPrintSingleJobs);
+// aSingleJobsCB.Check( pAddPrinterAttr->bPrintSingleJobs);
aNoRB.Check (pAddPrinterAttr->nPrintPostIts== POSTITS_NONE ) ;
aOnlyRB.Check (pAddPrinterAttr->nPrintPostIts== POSTITS_ONLY ) ;
diff --git a/sw/source/ui/inc/optpage.hxx b/sw/source/ui/inc/optpage.hxx
index 592c581f4aa3..b2fe407964c4 100644
--- a/sw/source/ui/inc/optpage.hxx
+++ b/sw/source/ui/inc/optpage.hxx
@@ -119,8 +119,8 @@ class SwAddPrinterTabPage : public SfxTabPage
{
FixedLine aFL1;
CheckBox aGrfCB;
- CheckBox aTabCB;
- CheckBox aDrawCB;
+// CheckBox aTabCB;
+// CheckBox aDrawCB;
CheckBox aCtrlFldCB;
CheckBox aBackgroundCB;
CheckBox aBlackFontCB;
@@ -132,7 +132,7 @@ class SwAddPrinterTabPage : public SfxTabPage
FixedLine aFL2;
CheckBox aLeftPageCB;
CheckBox aRightPageCB;
- CheckBox aReverseCB;
+// CheckBox aReverseCB;
CheckBox aProspectCB;
CheckBox aProspectCB_RTL;
@@ -145,7 +145,7 @@ class SwAddPrinterTabPage : public SfxTabPage
FixedLine aFL3;
FixedLine aFL4;
CheckBox aPrintEmptyPagesCB;
- CheckBox aSingleJobsCB;
+// CheckBox aSingleJobsCB;
CheckBox aPaperFromSetupCB;
FixedText aFaxFT;
ListBox aFaxLB;
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 9377f7182b18..2ac3e7f64508 100755
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -194,7 +194,12 @@ SwPrintUIOptions * lcl_GetPrintUIOptions(
const SwView * pSwView = dynamic_cast< const SwView * >(pView);
const bool bHasSelection = pSwView ? pSwView->HasSelection( sal_False ) : false; // check for any selection, not just text selection
const bool bHasPostIts = lcl_GetPostIts( pDocShell->GetDoc(), 0 );
- return new SwPrintUIOptions( bWebDoc, bSwSrcView, bHasSelection, bHasPostIts );
+
+ // get default values to use in dialog from documents SwPrintData
+ const SwPrintData *pPrintData = pDocShell->GetDoc()->getPrintData();
+ DBG_ASSERT( pPrintData, "failed to get SwPrintData from document" );
+
+ return new SwPrintUIOptions( bWebDoc, bSwSrcView, bHasSelection, bHasPostIts, *pPrintData );
}
////////////////////////////////////////////////////////////
@@ -2619,6 +2624,42 @@ SwDoc * SwXTextDocument::GetRenderDoc(
/* -----------------------------23.08.02 16:00--------------------------------
---------------------------------------------------------------------------*/
+
+static void lcl_SavePrintUIOptionsToDocumentPrintData(
+ SwDoc &rDoc,
+ const SwPrintUIOptions &rPrintUIOptions,
+ bool bIsPDFEXport )
+{
+ if (!rDoc.getPrintData())
+ {
+ SwPrintData *pTmpData = new SwPrintData;
+ rDoc.setPrintData ( *pTmpData );
+ delete pTmpData; // setPrintData does make its own copy!
+ }
+
+ SwPrintData *pDocPrintData = rDoc.getPrintData();
+
+ pDocPrintData->SetPrintGraphic( rPrintUIOptions.IsPrintGraphics() );
+ pDocPrintData->SetPrintTable( rPrintUIOptions.IsPrintTables() );
+ pDocPrintData->SetPrintDraw( rPrintUIOptions.IsPrintDrawings() );
+ pDocPrintData->SetPrintControl( rPrintUIOptions.IsPrintFormControls() );
+ pDocPrintData->SetPrintLeftPage( rPrintUIOptions.IsPrintLeftPages() );
+ pDocPrintData->SetPrintRightPage( rPrintUIOptions.IsPrintRightPages() );
+ pDocPrintData->SetPrintReverse( rPrintUIOptions.IsPrintReverse() );
+ pDocPrintData->SetPaperFromSetup( rPrintUIOptions.IsPaperFromSetup() );
+ pDocPrintData->SetPrintEmptyPages( rPrintUIOptions.IsPrintEmptyPages( bIsPDFEXport ) );
+ pDocPrintData->SetPrintPostIts( rPrintUIOptions.GetPrintPostItsType() );
+ pDocPrintData->SetPrintProspect( rPrintUIOptions.IsPrintProspect() );
+ pDocPrintData->SetPrintProspect_RTL( rPrintUIOptions.IsPrintProspectRTL() );
+ pDocPrintData->SetPrintPageBackground( rPrintUIOptions.IsPrintPageBackground() );
+ pDocPrintData->SetPrintBlackFont( rPrintUIOptions.IsPrintWithBlackTextColor() );
+ // pDocPrintData->SetPrintSingleJobs( b ); handled by File/Print dialog itself
+ // pDocPrintData->SetFaxName( s ); n/a in File/Print dialog
+ pDocPrintData->SetPrintHiddenText( rPrintUIOptions.IsPrintHiddenText() );
+ pDocPrintData->SetPrintTextPlaceholder( rPrintUIOptions.IsPrintTextPlaceholders() );
+}
+
+
sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
const uno::Any& rSelection,
const uno::Sequence< beans::PropertyValue >& rxOptions )
@@ -2644,6 +2685,9 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
if (!pDoc || !pView)
return 0;
+ // save current UI options from the print dialog for the next call to that dialog
+ lcl_SavePrintUIOptionsToDocumentPrintData( *pDoc, *m_pPrintUIOptions, bIsPDFExport );
+
sal_Int32 nRet = 0;
if (bIsSwSrcView)
{
@@ -2678,7 +2722,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
m_pRenderData->SetSwPrtOptions( new SwPrtOptions( C2U( bIsPDFExport ? "PDF export" : "Printing" ) ) );
m_pRenderData->MakeSwPrtOptions( m_pRenderData->GetSwPrtOptionsRef(), pRenderDocShell,
- m_pPrintUIOptions, m_pRenderData, bIsSkipEmptyPages, bIsPDFExport );
+ m_pPrintUIOptions, m_pRenderData, bIsPDFExport );
//SwViewOptionAdjust_Impl aAdjust(*pWrtShell);
const TypeId aSwViewTypeId = TYPE(SwView);