summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lange [tl] <tl@openoffice.org>2010-01-13 10:16:37 +0100
committerThomas Lange [tl] <tl@openoffice.org>2010-01-13 10:16:37 +0100
commit680ebbec1520b6df42264a450932d779edc07c3c (patch)
tree2103327bc458e2cd1ab89cacef63f1d2058e3c04
parentaf8a4cf23931e9b26d31683292dfe56cec2e97cb (diff)
#i108219# SwWeb print options fixed
-rwxr-xr-xsw/source/core/view/vprint.cxx23
-rwxr-xr-x[-rw-r--r--]sw/source/ui/config/optpage.cxx19
-rw-r--r--sw/source/ui/config/prtopt.cxx18
3 files changed, 45 insertions, 15 deletions
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index bab2428c0b67..864948046b75 100755
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -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() );
-
- // 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();
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index d609f1ed28cc..0777ac3c3325 100644..100755
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -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;
diff --git a/sw/source/ui/config/prtopt.cxx b/sw/source/ui/config/prtopt.cxx
index ceb48b6adefe..1f8f04f54d65 100644
--- a/sw/source/ui/config/prtopt.cxx
+++ b/sw/source/ui/config/prtopt.cxx
@@ -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);
}