#i108219# SwWeb print options fixed

This commit is contained in:
Thomas Lange [tl] 2010-01-13 10:16:37 +01:00
parent af8a4cf239
commit 680ebbec15
3 changed files with 44 additions and 14 deletions

View file

@ -394,7 +394,7 @@ SwPrintUIOptions::SwPrintUIOptions(
// 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;
@ -455,15 +455,18 @@ SwPrintUIOptions::SwPrintUIOptions(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintBlackFonts" ) ),
bDefaultVal );
// create subgroup for misc options
m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 15 ) ), rtl::OUString() );
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 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();

19
sw/source/ui/config/optpage.cxx Normal file → Executable file
View file

@ -416,13 +416,26 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
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;

View file

@ -69,8 +69,8 @@ Sequence<OUString> SwPrintOptions::GetPropertyNames()
"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);
@ -92,6 +92,8 @@ SwPrintOptions::SwPrintOptions(sal_Bool bWeb) :
bPrintPageBackground = !bWeb;
bPrintBlackFont = bWeb;
bPrintTextPlaceholder = bPrintHiddenText = sal_False;
if (bWeb)
bPrintEmptyPages = sal_False;
Sequence<OUString> aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames);
@ -133,6 +135,12 @@ SwPrintOptions::SwPrintOptions(sal_Bool bWeb) :
}
}
}
// 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--------------------------------
@ -176,6 +184,12 @@ void SwPrintOptions::Commit()
case 17: bVal = bPrintHiddenText; pValues[nProp].setValue(&bVal, rType); break;
}
}
// 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);
}