diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/modcfg.hxx | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | sw/inc/pch/precompiled_sw.hxx | 5 | ||||
-rw-r--r-- | sw/inc/swmodule.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/view/printdata.cxx | 162 | ||||
-rw-r--r-- | sw/source/filter/ascii/parasc.cxx | 20 | ||||
-rw-r--r-- | sw/source/filter/xml/xmliteme.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/app/docshini.cxx | 41 | ||||
-rw-r--r-- | sw/source/ui/config/optdlg.src | 15 | ||||
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 62 | ||||
-rw-r--r-- | sw/source/ui/dialog/ascfldlg.cxx | 20 | ||||
-rw-r--r-- | sw/source/ui/inc/pview.hxx | 1 | ||||
-rw-r--r-- | sw/source/ui/inc/uitool.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/inc/usrpref.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/inc/view.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/uiview/pview.cxx | 13 | ||||
-rw-r--r-- | sw/source/ui/uiview/view.cxx | 1 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewfunc.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewprt.cxx | 37 |
18 files changed, 152 insertions, 239 deletions
diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx index c5d67217ab2a..89c5a7a1a1be 100644 --- a/sw/inc/modcfg.hxx +++ b/sw/inc/modcfg.hxx @@ -28,7 +28,7 @@ #define _MODOPT_HXX #include <tools/string.hxx> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include <vcl/field.hxx> #include <svl/svarray.hxx> #include <unotools/configitem.hxx> diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index 7a5f1e2847b1..13e8cb3ddbdd 100644..100755 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -659,7 +659,6 @@ #include "unotools/pathoptions.hxx" #include "svl/poolitem.hxx" #include "svtools/prgsbar.hxx" -#include "svtools/printdlg.hxx" #include "svtools/prnsetup.hxx" #include "svl/ptitem.hxx" #include "svl/rectitem.hxx" @@ -913,7 +912,7 @@ #include "vcl/event.hxx" #include "vcl/field.hxx" #include "vcl/fixed.hxx" -#include "vcl/fldunit.hxx" +#include "tools/fldunit.hxx" #include "vcl/font.hxx" #include "unotools/fontcvt.hxx" #include "vcl/graph.hxx" @@ -950,7 +949,7 @@ #include "vcl/virdev.hxx" #include "vcl/waitobj.hxx" #include "vcl/window.hxx" -#include "vcl/wintypes.hxx" +#include "tools/wintypes.hxx" #include "vcl/wrkwin.hxx" #include "vos/mutex.hxx" diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx index c8e601143877..da2fc80f33ad 100644 --- a/sw/inc/swmodule.hxx +++ b/sw/inc/swmodule.hxx @@ -28,7 +28,7 @@ #define _SWMODULE_HXX #include <tools/link.hxx> #include <tools/string.hxx> -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> #include <svl/lstner.hxx> #include <unotools/options.hxx> #include <sfx2/module.hxx> diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index b54922a1b8e7..bc16348abaee 100644 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -198,8 +198,8 @@ SwPrintUIOptions::SwPrintUIOptions( { ResStringArray aLocalizedStrings( SW_RES( STR_PRINTOPTUI ) ); - DBG_ASSERT( aLocalizedStrings.Count() >= 44, "resource incomplete" ); - if( aLocalizedStrings.Count() < 44 ) // bad resource ? + DBG_ASSERT( aLocalizedStrings.Count() >= 30, "resource incomplete" ); + if( aLocalizedStrings.Count() < 30 ) // bad resource ? return; // printing HTML sources does not have any valid UI options. @@ -226,7 +226,7 @@ SwPrintUIOptions::SwPrintUIOptions( String aAppGroupname( aLocalizedStrings.GetString( 0 ) ); aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), aModOpt.GetModuleName( SvtModuleOptions::E_SWRITER ) ); - m_aUIProperties[ nIdx++ ].Value = getGroupControlOpt( aAppGroupname, rtl::OUString() ); + m_aUIProperties[ nIdx++ ].Value = getGroupControlOpt( aAppGroupname, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:TabPage:AppPage" ) ) ); // create sub section for Contents m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 1 ), rtl::OUString() ); @@ -234,79 +234,79 @@ SwPrintUIOptions::SwPrintUIOptions( // 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" ) ), - bDefaultVal ); + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintPageBackground:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPageBackground" ) ), + bDefaultVal ); // 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" ) ), - bDefaultVal ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 3 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintPicturesAndObjects:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPicturesAndObjects" ) ), + 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" ) ), - bDefaultVal ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintHiddenText:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintHiddenText" ) ), + 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" ) ), - bDefaultVal ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 5 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintTextPlaceholder:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintTextPlaceholder" ) ), + 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" ) ), - bDefaultVal ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 6 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintControls:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintControls" ) ), + bDefaultVal ); // create sub section for Color - m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 12 ), rtl::OUString() ); + m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 7 ), rtl::OUString() ); // 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" ) ), - bDefaultVal ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 8 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintBlackFonts:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintBlackFonts" ) ), + bDefaultVal ); if (!bWeb) { // create subgroup for misc options - m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 15 ) ), rtl::OUString() ); + m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 9 ) ), 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 ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 10 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintEmptyPages:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintEmptyPages" ) ), + 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" ) ), - bDefaultVal, - aPaperTrayOpt - ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 11 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintPaperFromSetup:CheckBox" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPaperFromSetup" ) ), + bDefaultVal, + aPaperTrayOpt + ); // print range selection vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt; aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) ); aPrintRangeOpt.mbInternalOnly = sal_True; - m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 37 ) ), + m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 26 ) ), rtl::OUString(), aPrintRangeOpt ); @@ -315,18 +315,18 @@ SwPrintUIOptions::SwPrintUIOptions( rtl::OUString aPrintRangeName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ); uno::Sequence< rtl::OUString > aChoices( 3 ); uno::Sequence< sal_Bool > aChoicesDisabled( 3 ); - uno::Sequence< rtl::OUString > aHelpText( 3 ); - aChoices[0] = aLocalizedStrings.GetString( 38 ); + uno::Sequence< rtl::OUString > aHelpIds( 3 ); + aChoices[0] = aLocalizedStrings.GetString( 27 ); aChoicesDisabled[0] = sal_False; - aHelpText[0] = aLocalizedStrings.GetString( 39 ); - aChoices[1] = aLocalizedStrings.GetString( 40 ); + aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ) ); + aChoices[1] = aLocalizedStrings.GetString( 28 ); aChoicesDisabled[1] = sal_False; - aHelpText[1] = aLocalizedStrings.GetString( 41 ); - aChoices[2] = aLocalizedStrings.GetString( 42 ); + aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ) ); + aChoices[2] = aLocalizedStrings.GetString( 29 ); aChoicesDisabled[2] = sal_Bool(! bHasSelection); - aHelpText[2] = aLocalizedStrings.GetString( 43 ); + aHelpIds[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2" ) ); m_aUIProperties[nIdx++].Value = getChoiceControlOpt( rtl::OUString(), - aHelpText, + aHelpIds, aPrintRangeName, aChoices, bHasSelection ? 2 /*enable 'Selection' radio button*/ : 0 /* enable 'All pages' */, @@ -336,7 +336,7 @@ SwPrintUIOptions::SwPrintUIOptions( // create a an Edit dependent on "Pages" selected vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True ); m_aUIProperties[nIdx++].Value = getEditControlOpt( rtl::OUString(), - rtl::OUString(), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PageRange:Edit" ) ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ), rtl::OUString(), aPageRangeOpt @@ -344,31 +344,31 @@ SwPrintUIOptions::SwPrintUIOptions( // print content selection vcl::PrinterOptionsHelper::UIControlOptions aContentsOpt; aContentsOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "JobPage" ) ); - m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 20 ) ), + m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 12 ) ), rtl::OUString(), 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 ); - aChoices[2] = aLocalizedStrings.GetString( 23 ); - aChoices[3] = aLocalizedStrings.GetString( 24 ); - aHelpText.realloc( 2 ); - aHelpText[0] = aLocalizedStrings.GetString( 25 ); - aHelpText[1] = aLocalizedStrings.GetString( 25 ); + aChoices[0] = aLocalizedStrings.GetString( 13 ); + aChoices[1] = aLocalizedStrings.GetString( 14 ); + aChoices[2] = aLocalizedStrings.GetString( 15 ); + aChoices[3] = aLocalizedStrings.GetString( 16 ); + aHelpIds.realloc( 2 ); + aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintAnnotationMode:FixedText" ) ); + aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintAnnotationMode:ListBox" ) ); vcl::PrinterOptionsHelper::UIControlOptions aAnnotOpt( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) ), 0, sal_False ); aAnnotOpt.mbEnabled = bHasPostIts; - m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 26 ), - aHelpText, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintAnnotationMode" ) ), - aChoices, - nPrintPostIts, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ), - uno::Sequence< sal_Bool >(), - aAnnotOpt - ); + m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 17 ), + aHelpIds, + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintAnnotationMode" ) ), + aChoices, + nPrintPostIts, + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ), + uno::Sequence< sal_Bool >(), + aAnnotOpt + ); // create subsection for Page settings vcl::PrinterOptionsHelper::UIControlOptions aPageSetOpt; @@ -376,16 +376,16 @@ SwPrintUIOptions::SwPrintUIOptions( if (!bWeb) { - m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 27 ) ), + m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 18 ) ), rtl::OUString(), aPageSetOpt ); uno::Sequence< rtl::OUString > aRLChoices( 3 ); - aRLChoices[0] = aLocalizedStrings.GetString( 28 ); - aRLChoices[1] = aLocalizedStrings.GetString( 29 ); - aRLChoices[2] = aLocalizedStrings.GetString( 30 ); + aRLChoices[0] = aLocalizedStrings.GetString( 19 ); + aRLChoices[1] = aLocalizedStrings.GetString( 20 ); + aRLChoices[2] = aLocalizedStrings.GetString( 21 ); uno::Sequence< rtl::OUString > aRLHelp( 1 ); - aRLHelp[0] = aLocalizedStrings.GetString( 31 ); + aRLHelp[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintLeftRightPages:ListBox" ) ); // create a choice option for all/left/right pages // 0 : all pages (left & right) // 1 : left pages @@ -397,7 +397,7 @@ SwPrintUIOptions::SwPrintUIOptions( nPagesChoice = 1; else if (!rDefaultPrintData.IsPrintLeftPage() && rDefaultPrintData.IsPrintRightPage()) nPagesChoice = 2; - m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 32 ), + m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 22 ), aRLHelp, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintLeftRightPages" ) ), aRLChoices, @@ -409,27 +409,29 @@ SwPrintUIOptions::SwPrintUIOptions( // 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, - bDefaultVal, - aPageSetOpt - ); + m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 23 ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintProspect:CheckBox" ) ), + aBrochurePropertyName, + bDefaultVal, + aPageSetOpt + ); if (bCTL) { // create a bool option for brochure RTL dependent on brochure uno::Sequence< rtl::OUString > aBRTLChoices( 2 ); - aBRTLChoices[0] = aLocalizedStrings.GetString( 35 ); - aBRTLChoices[1] = aLocalizedStrings.GetString( 36 ); + aBRTLChoices[0] = aLocalizedStrings.GetString( 24 ); + aBRTLChoices[1] = aLocalizedStrings.GetString( 25 ); vcl::PrinterOptionsHelper::UIControlOptions aBrochureRTLOpt( aBrochurePropertyName, -1, sal_True ); + uno::Sequence< rtl::OUString > aBRTLHelpIds( 1 ); + aBRTLHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintProspectRTL:ListBox" ) ); 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 >(), + aBRTLHelpIds, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspectRTL" ) ), aBRTLChoices, nBRTLChoice, diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index 282551474e36..64a261fc8ba0 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -54,6 +54,8 @@ #include <mdiexp.hxx> // ...Percent() #include <poolfmt.hxx> +#include "vcl/metric.hxx" + #define ASC_BUFFLEN 4096 class SwASCIIParser @@ -129,24 +131,14 @@ SwASCIIParser::SwASCIIParser(SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn, } if( rOpt.GetFontName().Len() ) { - bool bDelete = false; - const SfxFont* pFnt = 0; + Font aTextFont( rOpt.GetFontName(), Size( 0, 10 ) ); if( pDoc->getPrinter( false ) ) - pFnt = pDoc->getPrinter( false )->GetFontByName( rOpt.GetFontName() ); - - if( !pFnt ) - { - pFnt = new SfxFont( FAMILY_DONTKNOW, rOpt.GetFontName() ); - bDelete = true; - } - SvxFontItem aFont( pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), RES_CHRATR_FONT ); + aTextFont = pDoc->getPrinter( false )->GetFontMetric( aTextFont ); + SvxFontItem aFont( aTextFont.GetFamily(), aTextFont.GetName(), + aEmptyStr, aTextFont.GetPitch(), aTextFont.GetCharSet(), RES_CHRATR_FONT ); pItemSet->Put( aFont ); pItemSet->Put( aFont, RES_CHRATR_CJK_FONT ); pItemSet->Put( aFont, RES_CHRATR_CTL_FONT ); - - if( bDelete ) - delete (SfxFont*)pFnt; } } diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx index 5645891c5b3c..05c30ce7b496 100644 --- a/sw/source/filter/xml/xmliteme.cxx +++ b/sw/source/filter/xml/xmliteme.cxx @@ -40,7 +40,7 @@ #include "xmlbrshe.hxx" #include <editeng/tstpitem.hxx> #include <editeng/brshitem.hxx> -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> #include <swmodule.hxx> #include <doc.hxx> #include "fmtornt.hxx" diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx index 98fe7316ecd5..d4b15b7febd0 100644 --- a/sw/source/ui/app/docshini.cxx +++ b/sw/source/ui/app/docshini.cxx @@ -210,21 +210,15 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) if(!pStdFont->IsFontDefault(nFontId)) { sEntry = pStdFont->GetFontFor(nFontId); - sal_Bool bDelete = sal_False; - const SfxFont* pFnt = pPrt ? pPrt->GetFontByName(sEntry): 0; - if(!pFnt) - { - pFnt = new SfxFont( FAMILY_DONTKNOW, sEntry, PITCH_DONTKNOW, - ::gsl_getSystemTextEncoding() ); - bDelete = sal_True; - } - pFontItem = new SvxFontItem(pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich); - if(bDelete) + + Font aFont( sEntry, Size( 0, 10 ) ); + if( pPrt ) { - delete (SfxFont*) pFnt; - bDelete = sal_False; + aFont = pPrt->GetFontMetric( aFont ); } + + pFontItem = new SvxFontItem(aFont.GetFamily(), aFont.GetName(), + aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich); } else { @@ -303,25 +297,18 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) if(!pStdFont->IsFontDefault(aFontIdPoolId[nIdx])) { sEntry = pStdFont->GetFontFor(aFontIdPoolId[nIdx]); - sal_Bool bDelete = sal_False; - const SfxFont* pFnt = pPrt ? pPrt->GetFontByName(sEntry): 0; - if(!pFnt) - { - pFnt = new SfxFont( FAMILY_DONTKNOW, sEntry, PITCH_DONTKNOW, - ::gsl_getSystemTextEncoding() ); - bDelete = sal_True; - } + + Font aFont( sEntry, Size( 0, 10 ) ); + if( pPrt ) + aFont = pPrt->GetFontMetric( aFont ); + pColl = pDoc->GetTxtCollFromPool(aFontIdPoolId[nIdx + 1]); if( !bHTMLTemplSet || SFX_ITEM_SET != pColl->GetAttrSet().GetItemState( nFontWhich, sal_False ) ) { - pColl->SetFmtAttr(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich)); - } - if(bDelete) - { - delete (SfxFont*) pFnt; + pColl->SetFmtAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(), + aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); } } sal_Int32 nFontHeight = pStdFont->GetFontHeight( static_cast< sal_Int8 >(aFontIdPoolId[nIdx]), 0, eLanguage ); diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src index 0f0eddc5d9ed..400b3439b795 100644 --- a/sw/source/ui/config/optdlg.src +++ b/sw/source/ui/config/optdlg.src @@ -1035,7 +1035,6 @@ TabPage TP_OPTSHDWCRSR }; }; - StringArray STR_PRINTOPTUI { ItemList [en-US] = @@ -1043,47 +1042,33 @@ StringArray STR_PRINTOPTUI < "%PRODUCTNAME %s"; >; < "Contents"; >; < "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."; >; < "P~ictures and other graphic objects"; >; - < "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 placeholders"; >; - < "Enable this option to print text placeholders. Disable this option to leave the text placeholders blank in the printout."; >; < "Form control~s"; >; - < "Specifies whether the form control fields of the text document are printed"; >; < "Color"; >; < "Print text in blac~k"; >; - < "Specifies whether to always print text in black."; >; < "Pages"; >; < "Print ~automatically inserted blank pages"; >; - < "If this option is enabled automatically inserted blank pages are printed. This is best if you are printing double-sided. For example, in a book, a \"chapter\" paragraph style has been set to always start with an odd numbered page. If the previous chapter ends on an odd page, %PRODUCTNAME inserts an even numbered blank page. This option controls whether to print that even numbered page or not"; >; < "~Use only paper tray from printer preferences"; >; - < "For printers with multiple trays this option specifies whether the paper tray used is specified by the system settings of the printer."; >; < "Print"; >; < "None (document only)"; >; < "Comments only"; >; < "Place at end of document"; >; < "Place at end of page"; >; - < "Specify where to print comments (if any)."; >; < "~Comments"; >; < "Page sides";>; < "All pages"; >; < "Back sides / left pages"; >; < "Front sides / right pages"; >; - < "Specify which pages to include in the output"; >; < "Include"; >; < "Broch~ure"; >; - < "Select the Brochure option to print the document in brochure format."; >; < "Left-to-right script"; >; < "Right-to-left script"; >; < "Range and copies"; >; < "~All pages"; >; - < "Print the whole document."; >; < "Pa~ges"; >; - < "Print a range of pages of the document."; >; < "~Selection"; >; - < "Print only the selected parts of the document"; >; }; }; diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 6e6ed773a33d..01ef0a4f7500 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -726,20 +726,12 @@ void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType, SfxPrinter* pPrt, const String& rStyle, USHORT nFontWhich) { - BOOL bDelete = FALSE; - const SfxFont* pFnt = pPrt ? pPrt->GetFontByName(rStyle): 0; - if(!pFnt) - { - pFnt = new SfxFont(FAMILY_DONTKNOW, rStyle); - bDelete = TRUE; - } + Font aFont( rStyle, Size( 0, 10 ) ); + if( pPrt ) + aFont = pPrt->GetFontMetric( aFont ); SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(nType); - pColl->SetFmtAttr(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich)); - if(bDelete) - { - delete (SfxFont*) pFnt; - } + pColl->SetFmtAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(), + aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); } /*-- 11.10.2005 15:47:52--------------------------------------------------- @@ -822,22 +814,13 @@ BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& ) FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONTSIZE : RES_CHRATR_CTL_FONTSIZE); if(sStandard != sShellStd) { - BOOL bDelete = FALSE; - const SfxFont* pFnt = pPrinter ? pPrinter->GetFontByName(sStandard): 0; - if(!pFnt) - { - pFnt = new SfxFont(FAMILY_DONTKNOW, sStandard); - bDelete = TRUE; - } - pWrtShell->SetDefault(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(), - aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich)); + Font aFont( sStandard, Size( 0, 10 ) ); + if( pPrinter ) + aFont = pPrinter->GetFontMetric( aFont ); + pWrtShell->SetDefault(SvxFontItem(aFont.GetFamily(), aFont.GetName(), + aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD); pColl->ResetFmtAttr(nFontWhich); - if(bDelete) - { - delete (SfxFont*) pFnt; - bDelete = FALSE; - } // lcl_SetColl(pWrtShell, RES_POOLCOLL_STANDARD, pPrinter, sStandard); bMod = TRUE; } @@ -943,15 +926,24 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) // #i94536# prevent duplication of font entries when 'reset' button is pressed if( !aStandardBox.GetEntryCount() ) { - const USHORT nCount = pPrt->GetFontCount(); - for (USHORT i = 0; i < nCount; ++i) + // get the set of disctinct available family names + std::set< String > aFontNames; + int nFontNames = pPrt->GetDevFontCount(); + for( int i = 0; i < nFontNames; i++ ) + { + FontInfo aInf( pPrt->GetDevFont( i ) ); + aFontNames.insert( aInf.GetName() ); + } + + // insert to listboxes + for( std::set< String >::const_iterator it = aFontNames.begin(); + it != aFontNames.end(); ++it ) { - const String &rString = pPrt->GetFont(i)->GetName(); - aStandardBox.InsertEntry( rString ); - aTitleBox .InsertEntry( rString ); - aListBox .InsertEntry( rString ); - aLabelBox .InsertEntry( rString ); - aIdxBox .InsertEntry( rString ); + aStandardBox.InsertEntry( *it ); + aTitleBox .InsertEntry( *it ); + aListBox .InsertEntry( *it ); + aLabelBox .InsertEntry( *it ); + aIdxBox .InsertEntry( *it ); } } if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_STDFONTS, FALSE, &pItem)) diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index 355e68bd5c58..4cab48e79d8a 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -58,6 +58,8 @@ #include <ascfldlg.hrc> #endif +#include "vcl/metric.hxx" + using namespace ::com::sun::star; @@ -180,11 +182,21 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh, bDelPrinter = TRUE; } - const USHORT nCount = pPrt->GetFontCount(); - for (USHORT i = 0; i < nCount; ++i) + + // get the set of disctinct available family names + std::set< String > aFontNames; + int nFontNames = pPrt->GetDevFontCount(); + for( int i = 0; i < nFontNames; i++ ) + { + FontInfo aInf( pPrt->GetDevFont( i ) ); + aFontNames.insert( aInf.GetName() ); + } + + // insert to listbox + for( std::set< String >::const_iterator it = aFontNames.begin(); + it != aFontNames.end(); ++it ) { - const String &rStr = pPrt->GetFont(i)->GetName(); - aFontLB.InsertEntry( rStr ); + aFontLB.InsertEntry( *it ); } if( !aOpt.GetFontName().Len() ) diff --git a/sw/source/ui/inc/pview.hxx b/sw/source/ui/inc/pview.hxx index d0d8f2cb804a..2b1c9366707e 100644 --- a/sw/source/ui/inc/pview.hxx +++ b/sw/source/ui/inc/pview.hxx @@ -223,7 +223,6 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell SW_DLLPRIVATE virtual USHORT SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ); SW_DLLPRIVATE virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions ); - SW_DLLPRIVATE virtual PrintDialog* CreatePrintDialog( Window *pParent ); SW_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill, BOOL bInner ); diff --git a/sw/source/ui/inc/uitool.hxx b/sw/source/ui/inc/uitool.hxx index e48f78f9aa96..c3dfd0f07b2a 100644 --- a/sw/source/ui/inc/uitool.hxx +++ b/sw/source/ui/inc/uitool.hxx @@ -27,7 +27,7 @@ #ifndef _UITOOL_HXX #define _UITOOL_HXX -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include <vcl/field.hxx> #include <swtypes.hxx> #include "swdllapi.h" diff --git a/sw/source/ui/inc/usrpref.hxx b/sw/source/ui/inc/usrpref.hxx index 0758f89af8bf..854b12d4f40e 100644 --- a/sw/source/ui/inc/usrpref.hxx +++ b/sw/source/ui/inc/usrpref.hxx @@ -32,7 +32,7 @@ #include <unotools/configitem.hxx> #include <fldupde.hxx> #include "viewopt.hxx" -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> /* -----------------------------28.09.00 09:45-------------------------------- diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index 78817eec874c..0c92d7fdeb65 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -57,7 +57,6 @@ class SvxRuler; class SvxLRSpaceItem; class SwDocShell; class SwScrollbar; -class PrintDialog; class SvxVCBrowser; class SvBorder; class Ruler; @@ -355,7 +354,6 @@ class SW_DLLPUBLIC SwView: public SfxViewShell // Methoden fuers Printing SW_DLLPRIVATE virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE ); - SW_DLLPRIVATE virtual PrintDialog* CreatePrintDialog( Window* pParent ); SfxTabPage* CreatePrintOptionsPage( Window* pParent, const SfxItemSet& rSet); // fuer Readonly-Umschaltung diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index addf6f9db512..fd5d57ae35c0 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -35,7 +35,6 @@ #include <vcl/help.hxx> #include <vcl/cmdevt.hxx> #include <vcl/button.hxx> -#include <svtools/printdlg.hxx> #include <svl/whiter.hxx> #include <svl/stritem.hxx> #include <svl/eitem.hxx> @@ -1985,18 +1984,6 @@ SfxTabPage* SwPagePreView::CreatePrintOptionsPage( Window *pParent, --------------------------------------------------------------------*/ -PrintDialog* SwPagePreView::CreatePrintDialog( Window *pParent ) -{ - PrintDialog *pDlg = ::CreatePrintDialog( pParent, 1, 0 ); - pDlg->DisableRange( PRINTDIALOG_SELECTION ); - return pDlg; -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - - // OD 18.12.2002 #103492# - no longer needed ?? Size SwPagePreView::GetOptimalSizePixel() const { diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 209c563169d6..5c440d55883e 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -39,7 +39,6 @@ #include <svl/eitem.hxx> #include <unotools/undoopt.hxx> #include <unotools/lingucfg.hxx> -#include <svtools/printdlg.hxx> #include <unotools/useroptions.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/request.hxx> diff --git a/sw/source/ui/uiview/viewfunc.hxx b/sw/source/ui/uiview/viewfunc.hxx index f04db152ec2f..6da6c01bbda4 100644 --- a/sw/source/ui/uiview/viewfunc.hxx +++ b/sw/source/ui/uiview/viewfunc.hxx @@ -30,7 +30,6 @@ class ImageButton; class Point; -class PrintDialog; class SfxItemSet; class SfxPrinter; class SfxTabPage; @@ -42,7 +41,6 @@ class Window; class SwWrtShell; // folgende Funktionen stehen im viewprt.cxx -PrintDialog* CreatePrintDialog( Window* , USHORT, SwWrtShell* ); void SetPrinter( IDocumentDeviceAccess*, SfxPrinter*, BOOL bWeb ); SfxTabPage* CreatePrintOptionsPage( Window*, const SfxItemSet& ); void SetAppPrintOptions( ViewShell* pSh, BOOL bWeb ); diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx index 7ddc594dd223..3fdc6f6d61d3 100644 --- a/sw/source/ui/uiview/viewprt.cxx +++ b/sw/source/ui/uiview/viewprt.cxx @@ -49,7 +49,6 @@ #include <svl/flagitem.hxx> #include <vcl/msgbox.hxx> #include <vcl/oldprintadaptor.hxx> -#include <svtools/printdlg.hxx> #include <sfx2/printer.hxx> #include <sfx2/prnmon.hxx> #include <editeng/paperinf.hxx> @@ -183,42 +182,6 @@ SfxTabPage* __EXPORT SwView::CreatePrintOptionsPage(Window* pParent, } /*-------------------------------------------------------------------- - Beschreibung: Druckerdialog - --------------------------------------------------------------------*/ - -PrintDialog* CreatePrintDialog( Window* pParent, USHORT nPg, SwWrtShell* pSh ) -{ - PrintDialog *pDlg = new PrintDialog( pParent, false ); -// pDlg->ChangeFirstPage( 1 ); - - if ( !nPg ) - nPg = 1; -// pDlg->ChangeLastPage( nPg ); -// pDlg->ChangeMaxPage( 9999 ); - pDlg->EnableRange( PRINTDIALOG_FROMTO ); - - if (pSh && (pSh->IsSelection() || pSh->IsFrmSelected() || pSh->IsObjSelected())) - pDlg->EnableRange( PRINTDIALOG_SELECTION ); - - pDlg->SetRangeText( String::CreateFromInt32(nPg) ); - pDlg->EnableRange( PRINTDIALOG_RANGE ); - pDlg->EnableCollate(); - return pDlg; -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - -PrintDialog* __EXPORT SwView::CreatePrintDialog( Window* pParent ) -{ - // AMA: Hier sollte vielleicht die virtuelle Seitennummer angezeigt werden, - // aber nur, wenn das Drucken virtuelle Seitennummern und nicht wie - // bisher (auch beim SWG 2.0) physikalische beachtet werden. - return ::CreatePrintDialog( pParent, GetWrtShell().GetPhyPageNum(), &GetWrtShell() ); -} - -/*-------------------------------------------------------------------- Beschreibung: Print-Dispatcher --------------------------------------------------------------------*/ |