[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - basctl/source sc/Module_sc.mk sc/source sc/uiconfig sc/UI_scalc.mk sd/Module_sd.mk sd/source sd/uiconfig sd/UI_sdraw.mk sd/UI_simpress.mk sfx2/source starmath/Module_starmath.mk starmath/source starmath/uiconfig starmath/UI_smath.mk sw/source sw/uiconfig sw/UI_swriter.mk vcl/inc vcl/Module_vcl.mk vcl/source vcl/uiconfig vcl/UI_vcl.mk
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Sep 10 09:01:31 PDT 2012
basctl/source/basicide/basicrenderable.cxx | 28
sc/Module_sc.mk | 1
sc/UI_scalc.mk | 16
sc/source/ui/unoobj/docuno.cxx | 66 -
sc/uiconfig/scalc/ui/printeroptions.ui | 51
sd/Module_sd.mk | 2
sd/UI_sdraw.mk | 16
sd/UI_simpress.mk | 16
sd/source/ui/view/DocumentRenderer.cxx | 100 -
sd/uiconfig/sdraw/ui/printeroptions.ui | 283 ++++
sd/uiconfig/simpress/ui/printeroptions.ui | 300 +++++
sfx2/source/appl/sfxhelp.cxx | 12
starmath/Module_starmath.mk | 1
starmath/UI_smath.mk | 16
starmath/source/unomodel.cxx | 39
starmath/uiconfig/smath/ui/printeroptions.ui | 210 +++
sw/UI_swriter.mk | 1
sw/source/core/view/printdata.cxx | 164 +-
sw/uiconfig/swriter/ui/printeroptions.ui | 211 +++
vcl/Module_vcl.mk | 1
vcl/UI_vcl.mk | 16
vcl/inc/printdlg.hxx | 139 --
vcl/inc/svids.hrc | 13
vcl/inc/vcl/builder.hxx | 1
vcl/inc/vcl/layout.hxx | 1
vcl/inc/vcl/print.hxx | 109 +
vcl/inc/vcl/tabctrl.hxx | 2
vcl/source/control/tabctrl.cxx | 22
vcl/source/gdi/print3.cxx | 152 +-
vcl/source/src/print.src | 60 -
vcl/source/window/dialog.cxx | 2
vcl/source/window/layout.cxx | 10
vcl/source/window/printdlg.cxx | 1484 +++++++------------------
vcl/source/window/tabpage.cxx | 1
vcl/uiconfig/ui/printdialog.ui | 1572 +++++++++++++++++++++++++++
35 files changed, 3677 insertions(+), 1441 deletions(-)
New commits:
commit d890a364ff09793a7f581940c514ac12cccff73b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 10 16:59:55 2012 +0100
convert writer, draw, impress, calc and starmath printer dialogs
to new-style widget layout mostly described in .ui format
Change-Id: I8ead53a246a8ac3e2d446d158f06d7e2e436ce60
diff --git a/basctl/source/basicide/basicrenderable.cxx b/basctl/source/basicide/basicrenderable.cxx
index dfb42ba..c0cbee5 100644
--- a/basctl/source/basicide/basicrenderable.cxx
+++ b/basctl/source/basicide/basicrenderable.cxx
@@ -42,37 +42,33 @@ BasicRenderable::BasicRenderable( IDEBaseWindow* pWin )
m_aUIProperties.realloc( 3 );
- // create Subgroup for print range
+ // show Subgroup for print range
vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt;
aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) );
aPrintRangeOpt.mbInternalOnly = sal_True;
- m_aUIProperties[0].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 0 ) ),
- rtl::OUString(),
- aPrintRangeOpt
- );
+ m_aUIProperties[0].Value = setSubgroupControlOpt("printrange", rtl::OUString(aStrings.GetString(0)),
+ rtl::OUString(), aPrintRangeOpt);
// create a choice for the range to print
rtl::OUString aPrintContentName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) );
Sequence< rtl::OUString > aChoices( 2 );
Sequence< rtl::OUString > aHelpIds( 2 );
+ Sequence< rtl::OUString > aWidgetIds( 2 );
aChoices[0] = aStrings.GetString( 1 );
aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ) );
aChoices[1] = aStrings.GetString( 2 );
aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ) );
- m_aUIProperties[1].Value = getChoiceControlOpt( rtl::OUString(),
- aHelpIds,
- aPrintContentName,
- aChoices,
- 0 );
+ aWidgetIds[0] = rtl::OUString("printallpages");
+ aWidgetIds[1] = rtl::OUString("printpages");
+ m_aUIProperties[1].Value = setChoiceRadiosControlOpt(aWidgetIds, rtl::OUString(),
+ aHelpIds, aPrintContentName,
+ aChoices, 0);
// create a an Edit dependent on "Pages" selected
vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintContentName, 1, sal_True );
- m_aUIProperties[2].Value = getEditControlOpt( rtl::OUString(),
- rtl::OUString(),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ),
- rtl::OUString(),
- aPageRangeOpt
- );
+ m_aUIProperties[2].Value = setEditControlOpt("pagerange", rtl::OUString(),
+ rtl::OUString(), "PageRange",
+ rtl::OUString(), aPageRangeOpt);
}
BasicRenderable::~BasicRenderable()
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index 3afcaf2..93608dd 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -31,6 +31,7 @@ $(eval $(call gb_Module_add_targets,sc,\
Library_scui \
Package_uiconfig \
Package_xml \
+ UI_scalc \
))
ifneq ($(DISABLE_SCRIPTING),TRUE)
diff --git a/sc/UI_scalc.mk b/sc/UI_scalc.mk
new file mode 100644
index 0000000..c2b21a9
--- /dev/null
+++ b/sc/UI_scalc.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UI_UI,modules/scalc))
+
+$(eval $(call gb_UI_add_uifiles,modules/scalc,\
+ sw/uiconfig/scalc/ui/printeroptions \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 2220e2d..4668107 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -231,62 +231,69 @@ ScPrintUIOptions::ScPrintUIOptions()
if( aStrings.Count() < 10 ) // bad resource ?
return;
- m_aUIProperties.realloc( 8 );
+ sal_Int32 nNumProps= 9, nIdx = 0;
+
+ m_aUIProperties.realloc(nNumProps);
+
+ // load the writer PrinterOptions into the custom tab
+ m_aUIProperties[nIdx].Name = rtl::OUString("OptionsUIFile");
+ m_aUIProperties[nIdx++].Value <<= rtl::OUString("modules/scalc/ui/printeroptions.ui");
// create Section for spreadsheet (results in an extra tab page in dialog)
SvtModuleOptions aOpt;
String aAppGroupname( aStrings.GetString( 9 ) );
aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ),
aOpt.GetModuleName( SvtModuleOptions::E_SCALC ) );
- m_aUIProperties[0].Value = getGroupControlOpt( aAppGroupname, rtl::OUString() );
+ m_aUIProperties[nIdx++].Value = setGroupControlOpt("tabcontrol-page2", aAppGroupname, rtl::OUString());
- // create subgroup for pages
- m_aUIProperties[1].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 0 ) ), rtl::OUString() );
+ // show subgroup for pages
+ m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("pages", rtl::OUString(aStrings.GetString(0)), rtl::OUString());
// create a bool option for empty pages
- m_aUIProperties[2].Value = getBoolControlOpt( rtl::OUString( aStrings.GetString( 1 ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:IsIncludeEmptyPages:CheckBox" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsIncludeEmptyPages" ) ),
- ! bSuppress
- );
- // create Subgroup for print content
+ m_aUIProperties[nIdx++].Value = setBoolControlOpt("includeemptypages", rtl::OUString( aStrings.GetString( 1 ) ),
+ ".HelpID:vcl:PrintDialog:IsIncludeEmptyPages:CheckBox",
+ "IsIncludeEmptyPages",
+ ! bSuppress);
+ // show Subgroup for print content
vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt;
aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) );
- m_aUIProperties[3].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 2 ) ),
+ m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("printrange", rtl::OUString(aStrings.GetString(2)),
rtl::OUString(),
- aPrintRangeOpt
- );
+ aPrintRangeOpt);
// create a choice for the content to create
- uno::Sequence< rtl::OUString > aChoices( 3 ), aHelpIds( 3 );
+ uno::Sequence< rtl::OUString > aChoices( 3 ), aHelpIds( 3 ), aWidgetIds( 3 );
aChoices[0] = aStrings.GetString( 3 );
aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ) );
+ aWidgetIds[0] = "printallsheets";
aChoices[1] = aStrings.GetString( 4 );
aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ) );
+ aWidgetIds[1] = "printselectedsheets";
aChoices[2] = aStrings.GetString( 5 );
aHelpIds[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2" ) );
- m_aUIProperties[4].Value = getChoiceControlOpt( rtl::OUString(),
- aHelpIds,
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ),
- aChoices,
- nContent );
+ aWidgetIds[2] = "printselectedcells";
+ m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, rtl::OUString(),
+ aHelpIds, "PrintContent",
+ aChoices, nContent );
- // create Subgroup for print range
+ // show Subgroup for print range
aPrintRangeOpt.mbInternalOnly = sal_True;
- m_aUIProperties[5].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 6 ) ),
+ m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("fromwhich", rtl::OUString(aStrings.GetString(6)),
rtl::OUString(),
- aPrintRangeOpt
- );
+ aPrintRangeOpt);
// create a choice for the range to print
rtl::OUString aPrintRangeName( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) );
aChoices.realloc( 2 );
aHelpIds.realloc( 2 );
+ aWidgetIds.realloc( 2 );
aChoices[0] = aStrings.GetString( 7 );
aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintRange:RadioButton:0" ) );
+ aWidgetIds[0] = "printallpages";
aChoices[1] = aStrings.GetString( 8 );
aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintRange:RadioButton:1" ) );
- m_aUIProperties[6].Value = getChoiceControlOpt( rtl::OUString(),
+ aWidgetIds[1] = "printpages";
+ m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, rtl::OUString(),
aHelpIds,
aPrintRangeName,
aChoices,
@@ -294,12 +301,11 @@ ScPrintUIOptions::ScPrintUIOptions()
// create a an Edit dependent on "Pages" selected
vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True );
- m_aUIProperties[7].Value = getEditControlOpt( rtl::OUString(),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PageRange:Edit" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ),
- rtl::OUString(),
- aPageRangeOpt
- );
+ m_aUIProperties[nIdx++].Value = setEditControlOpt("pagerange", rtl::OUString(),
+ ".HelpID:vcl:PrintDialog:PageRange:Edit",
+ "PageRange", rtl::OUString(), aPageRangeOpt);
+
+ assert(nIdx == nNumProps);
}
void ScPrintUIOptions::SetDefaults()
diff --git a/sc/uiconfig/scalc/ui/printeroptions.ui b/sc/uiconfig/scalc/ui/printeroptions.ui
new file mode 100644
index 0000000..e65686f
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/printeroptions.ui
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkBox" id="box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkFrame" id="pages">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkCheckButton" id="includeemptypages">
+ <property name="label" translatable="yes">Include output of empty pages</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Pages</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+</interface>
diff --git a/sd/Module_sd.mk b/sd/Module_sd.mk
index d4c080d..3d9fb75 100644
--- a/sd/Module_sd.mk
+++ b/sd/Module_sd.mk
@@ -38,6 +38,8 @@ $(eval $(call gb_Module_add_targets,sd,\
Package_uiconfig \
Package_web \
Package_xml \
+ UI_sdraw \
+ UI_simpress \
))
ifneq ($(OS),DRAGONFLY)
diff --git a/sd/UI_sdraw.mk b/sd/UI_sdraw.mk
new file mode 100644
index 0000000..c557e66
--- /dev/null
+++ b/sd/UI_sdraw.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UI_UI,modules/sdraw))
+
+$(eval $(call gb_UI_add_uifiles,modules/sdraw,\
+ sd/uiconfig/sdraw/ui/printeroptions \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sd/UI_simpress.mk b/sd/UI_simpress.mk
new file mode 100644
index 0000000..3ddeac9
--- /dev/null
+++ b/sd/UI_simpress.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UI_UI,modules/simpress))
+
+$(eval $(call gb_UI_add_uifiles,modules/simpress,\
+ sd/uiconfig/simpress/ui/printeroptions \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 794e4ab..0d3b1e3 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -401,47 +401,51 @@ namespace {
void ProcessResource()
{
+ // load the writer PrinterOptions into the custom tab
+ beans::PropertyValue aOptionsUIFile;
+ aOptionsUIFile.Name = rtl::OUString("OptionsUIFile");
+ if( mbImpress )
+ aOptionsUIFile.Value <<= rtl::OUString("modules/simpress/ui/printeroptions.ui");
+ else
+ aOptionsUIFile.Value <<= rtl::OUString("modules/sdraw/ui/printeroptions.ui");
+ maProperties.push_back(aOptionsUIFile);
+
SvtModuleOptions aOpt;
String aAppGroupname( String( SdResId( _STR_IMPRESS_PRINT_UI_GROUP_NAME ) ) );
aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ),
aOpt.GetModuleName( mbImpress ? SvtModuleOptions::E_SIMPRESS : SvtModuleOptions::E_SDRAW ) );
- AddDialogControl( vcl::PrinterOptionsHelper::getGroupControlOpt(
- aAppGroupname,
- ".HelpID:vcl:PrintDialog:TabPage:AppPage"
- ) );
+ AddDialogControl(vcl::PrinterOptionsHelper::setGroupControlOpt("tabcontrol-page2", aAppGroupname, ".HelpID:vcl:PrintDialog:TabPage:AppPage"));
- uno::Sequence< rtl::OUString > aHelpIds;
+ uno::Sequence< rtl::OUString > aHelpIds, aWidgetIds;
if( mbImpress )
{
vcl::PrinterOptionsHelper::UIControlOptions aPrintOpt;
aPrintOpt.maGroupHint = "JobPage" ;
- AddDialogControl( vcl::PrinterOptionsHelper::getSubgroupControlOpt(
+ AddDialogControl( vcl::PrinterOptionsHelper::setSubgroupControlOpt("extraimpressprintoptions",
String( SdResId(_STR_IMPRESS_PRINT_UI_PRINT_GROUP) ),
"",
- aPrintOpt )
- );
+ aPrintOpt ));
aHelpIds.realloc( 1 );
aHelpIds[0] = ".HelpID:vcl:PrintDialog:PageContentType:ListBox" ;
- AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
+ AddDialogControl( vcl::PrinterOptionsHelper::setChoiceListControlOpt(
+ "impressdocument",
String( SdResId( _STR_IMPRESS_PRINT_UI_CONTENT ) ),
aHelpIds,
"PageContentType" ,
CreateChoice(_STR_IMPRESS_PRINT_UI_CONTENT_CHOICES),
- 0,
- "List"
- )
+ 0)
);
aHelpIds[0] = ".HelpID:vcl:PrintDialog:SlidesPerPage:ListBox" ;
vcl::PrinterOptionsHelper::UIControlOptions aContentOpt( "PageContentType" , 1 );
- AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
+ AddDialogControl( vcl::PrinterOptionsHelper::setChoiceListControlOpt(
+ "slidesperpage",
String( SdResId( _STR_IMPRESS_PRINT_UI_SLIDESPERPAGE ) ),
aHelpIds,
"SlidesPerPage" ,
GetSlidesPerPageSequence(),
0,
- "List",
Sequence< sal_Bool >(),
aContentOpt
)
@@ -449,25 +453,25 @@ namespace {
aHelpIds[0] = ".HelpID:vcl:PrintDialog:SlidesPerPageOrder:ListBox" ;
vcl::PrinterOptionsHelper::UIControlOptions aSlidesPerPageOpt( "SlidesPerPage" , -1, sal_True );
- AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
+ AddDialogControl( vcl::PrinterOptionsHelper::setChoiceListControlOpt(
+ "slidesperpageorder",
String( SdResId( _STR_IMPRESS_PRINT_UI_ORDER ) ),
aHelpIds,
"SlidesPerPageOrder" ,
CreateChoice(_STR_IMPRESS_PRINT_UI_ORDER_CHOICES),
0,
- "List" ,
Sequence< sal_Bool >(),
aSlidesPerPageOpt )
);
}
- AddDialogControl( vcl::PrinterOptionsHelper::getSubgroupControlOpt(
+ AddDialogControl( vcl::PrinterOptionsHelper::setSubgroupControlOpt("contents",
String( SdResId(_STR_IMPRESS_PRINT_UI_INCLUDE_CONTENT) ), "" ) );
if( mbImpress )
{
- AddDialogControl( vcl::PrinterOptionsHelper::getBoolControlOpt(
+ AddDialogControl( vcl::PrinterOptionsHelper::setBoolControlOpt("printname",
String( SdResId(_STR_IMPRESS_PRINT_UI_IS_PRINT_NAME) ),
".HelpID:vcl:PrintDialog:IsPrintName:CheckBox" ,
"IsPrintName" ,
@@ -477,7 +481,7 @@ namespace {
}
else
{
- AddDialogControl( vcl::PrinterOptionsHelper::getBoolControlOpt(
+ AddDialogControl( vcl::PrinterOptionsHelper::setBoolControlOpt("printname",
String( SdResId(_STR_DRAW_PRINT_UI_IS_PRINT_NAME) ),
".HelpID:vcl:PrintDialog:IsPrintName:CheckBox" ,
"IsPrintName" ,
@@ -486,7 +490,7 @@ namespace {
);
}
- AddDialogControl( vcl::PrinterOptionsHelper::getBoolControlOpt(
+ AddDialogControl( vcl::PrinterOptionsHelper::setBoolControlOpt("printdatetime",
String( SdResId(_STR_IMPRESS_PRINT_UI_IS_PRINT_DATE) ),
".HelpID:vcl:PrintDialog:IsPrintDateTime:CheckBox" ,
"IsPrintDateTime" ,
@@ -496,7 +500,7 @@ namespace {
if( mbImpress )
{
- AddDialogControl( vcl::PrinterOptionsHelper::getBoolControlOpt(
+ AddDialogControl( vcl::PrinterOptionsHelper::setBoolControlOpt("printhidden",
String( SdResId(_STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN) ),
".HelpID:vcl:PrintDialog:IsPrintHidden:CheckBox" ,
"IsPrintHidden" ,
@@ -505,23 +509,27 @@ namespace {
);
}
- AddDialogControl( vcl::PrinterOptionsHelper::getSubgroupControlOpt(
+ AddDialogControl( vcl::PrinterOptionsHelper::setSubgroupControlOpt("color",
String( SdResId(_STR_IMPRESS_PRINT_UI_QUALITY) ), "" ) );
aHelpIds.realloc( 3 );
aHelpIds[0] = ".HelpID:vcl:PrintDialog:Quality:RadioButton:0" ;
aHelpIds[1] = ".HelpID:vcl:PrintDialog:Quality:RadioButton:1" ;
aHelpIds[2] = ".HelpID:vcl:PrintDialog:Quality:RadioButton:2" ;
- AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
+ aWidgetIds.realloc( 3 );
+ aWidgetIds[0] = "originalcolors";
+ aWidgetIds[1] = "grayscale";
+ aWidgetIds[2] = "blackandwhite";
+ AddDialogControl( vcl::PrinterOptionsHelper::setChoiceRadiosControlOpt(
+ aWidgetIds,
"",
aHelpIds,
"Quality" ,
CreateChoice(_STR_IMPRESS_PRINT_UI_QUALITY_CHOICES),
- 0
- )
+ 0)
);
- AddDialogControl( vcl::PrinterOptionsHelper::getSubgroupControlOpt(
+ AddDialogControl( vcl::PrinterOptionsHelper::setSubgroupControlOpt("pagesizes",
String( SdResId(_STR_IMPRESS_PRINT_UI_PAGE_OPTIONS) ), "" ) );
aHelpIds.realloc( 4 );
@@ -529,17 +537,22 @@ namespace {
aHelpIds[1] = ".HelpID:vcl:PrintDialog:PageOptions:RadioButton:1" ;
aHelpIds[2] = ".HelpID:vcl:PrintDialog:PageOptions:RadioButton:2" ;
aHelpIds[3] = ".HelpID:vcl:PrintDialog:PageOptions:RadioButton:3" ;
+ aWidgetIds.realloc( 4 );
+ aWidgetIds[0] = "originalsize";
+ aWidgetIds[1] = "fittoprintable";
+ aWidgetIds[2] = "distributeonmultiple";
+ aWidgetIds[3] = "tilesheet";
if( mbImpress )
{
// FIXME: additional dependency on PrintProspect = false
vcl::PrinterOptionsHelper::UIControlOptions aPageOptionsOpt( "PageContentType" , 0 );
- AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
+ AddDialogControl( vcl::PrinterOptionsHelper::setChoiceRadiosControlOpt(
+ aWidgetIds,
"",
aHelpIds,
"PageOptions" ,
CreateChoice(_STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES),
0,
- "Radio" ,
Sequence< sal_Bool >(),
aPageOptionsOpt
)
@@ -548,13 +561,13 @@ namespace {
else
{
vcl::PrinterOptionsHelper::UIControlOptions aPageOptionsOpt( "PrintProspect" , sal_False );
- AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
+ AddDialogControl( vcl::PrinterOptionsHelper::setChoiceRadiosControlOpt(
+ aWidgetIds,
"",
aHelpIds,
"PageOptions" ,
CreateChoice(_STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW),
0,
- "Radio" ,
Sequence< sal_Bool >(),
aPageOptionsOpt
)
@@ -563,12 +576,12 @@ namespace {
vcl::PrinterOptionsHelper::UIControlOptions aBrochureOpt;
aBrochureOpt.maGroupHint = "LayoutPage" ;
- AddDialogControl( vcl::PrinterOptionsHelper::getSubgroupControlOpt(
+ AddDialogControl( vcl::PrinterOptionsHelper::setSubgroupControlOpt("pagesides",
String( SdResId(_STR_IMPRESS_PRINT_UI_PAGE_SIDES) ), "",
aBrochureOpt ) );
// brochure printing
- AddDialogControl( vcl::PrinterOptionsHelper::getBoolControlOpt(
+ AddDialogControl( vcl::PrinterOptionsHelper::setBoolControlOpt("brochure",
String( SdResId(_STR_IMPRESS_PRINT_UI_BROCHURE) ),
".HelpID:vcl:PrintDialog:PrintProspect:CheckBox" ,
"PrintProspect" ,
@@ -582,13 +595,13 @@ namespace {
aIncludeOpt.maGroupHint = "LayoutPage" ;
aHelpIds.realloc( 1 );
aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintProspectInclude:ListBox" ;
- AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
+ AddDialogControl( vcl::PrinterOptionsHelper::setChoiceListControlOpt(
+ "brochureinclude",
String( SdResId(_STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE) ),
aHelpIds,
"PrintProspectInclude" ,
CreateChoice(_STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST),
0,
- "List" ,
Sequence< sal_Bool >(),
aIncludeOpt
)
@@ -597,7 +610,7 @@ namespace {
// paper tray (on options page)
vcl::PrinterOptionsHelper::UIControlOptions aPaperTrayOpt;
aPaperTrayOpt.maGroupHint = "OptionsPageOptGroup" ;
- AddDialogControl( vcl::PrinterOptionsHelper::getBoolControlOpt(
+ AddDialogControl( vcl::PrinterOptionsHelper::setBoolControlOpt("printpaperfromsetup",
String( SdResId(_STR_IMPRESS_PRINT_UI_PAPER_TRAY) ),
".HelpID:vcl:PrintDialog:PrintPaperFromSetup:CheckBox" ,
"PrintPaperFromSetup" ,
@@ -609,7 +622,7 @@ namespace {
vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt;
aPrintRangeOpt.mbInternalOnly = sal_True;
aPrintRangeOpt.maGroupHint = "PrintRange" ;
- AddDialogControl( vcl::PrinterOptionsHelper::getSubgroupControlOpt(
+ AddDialogControl( vcl::PrinterOptionsHelper::setSubgroupControlOpt("printrange",
String( SdResId( _STR_IMPRESS_PRINT_UI_PAGE_RANGE ) ),
"",
aPrintRangeOpt )
@@ -621,7 +634,11 @@ namespace {
aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ;
aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ;
aHelpIds[2] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2" ;
- AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt( "",
+ aWidgetIds.realloc( 3 );
+ aWidgetIds[0] = "printallpages";
+ aWidgetIds[1] = "printpages";
+ aWidgetIds[2] = "printselection";
+ AddDialogControl( vcl::PrinterOptionsHelper::setChoiceRadiosControlOpt(aWidgetIds, "",
aHelpIds,
aPrintRangeName,
CreateChoice(mbImpress
@@ -631,12 +648,9 @@ namespace {
);
// create a an Edit dependent on "Pages" selected
vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True );
- AddDialogControl( vcl::PrinterOptionsHelper::getEditControlOpt( "",
- ".HelpID:vcl:PrintDialog:PageRange:Edit" ,
- "PageRange" ,
- "",
- aPageRangeOpt )
- );
+ AddDialogControl(vcl::PrinterOptionsHelper::setEditControlOpt("pagerange", "",
+ ".HelpID:vcl:PrintDialog:PageRange:Edit", "PageRange",
+ "", aPageRangeOpt));
FreeResource();
}
diff --git a/sd/uiconfig/sdraw/ui/printeroptions.ui b/sd/uiconfig/sdraw/ui/printeroptions.ui
new file mode 100644
index 0000000..3718af3
--- /dev/null
+++ b/sd/uiconfig/sdraw/ui/printeroptions.ui
@@ -0,0 +1,283 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkBox" id="box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkFrame" id="contents">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkCheckButton" id="printname">
+ <property name="label" translatable="yes">Page name</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="printdatetime">
+ <property name="label" translatable="yes">Date and time</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Contents</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="color">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkRadioButton" id="originalcolors">
+ <property name="label" translatable="yes">Original size</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">grayscale</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="grayscale">
+ <property name="label" translatable="yes">Grayscale</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">blackandwhite</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="blackandwhite">
+ <property name="label" translatable="yes">Black & white</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">originalcolors</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Color</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="pagesizes">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox" id="box3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkRadioButton" id="originalsize">
+ <property name="label" translatable="yes">Original size</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">fittoprintable</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="fittoprintable">
+ <property name="label" translatable="yes">Fit to printable page</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">distributeonmultiple</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="distributeonmultiple">
+ <property name="label" translatable="yes">Distribute on multiple sheets of paper</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">tilesheet</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="tilesheet">
+ <property name="label" translatable="yes">Tile sheet of paper with repeated pages</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">originalsize</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Size</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+</interface>
diff --git a/sd/uiconfig/simpress/ui/printeroptions.ui b/sd/uiconfig/simpress/ui/printeroptions.ui
new file mode 100644
index 0000000..99117c5
--- /dev/null
+++ b/sd/uiconfig/simpress/ui/printeroptions.ui
@@ -0,0 +1,300 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkBox" id="box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkFrame" id="contents">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkCheckButton" id="printname">
+ <property name="label" translatable="yes">Slide name</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="printdatetime">
+ <property name="label" translatable="yes">Date and time</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="printhidden">
+ <property name="label" translatable="yes">Hidden pages</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Contents</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="color">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkRadioButton" id="originalcolors">
+ <property name="label" translatable="yes">Original size</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">grayscale</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="grayscale">
+ <property name="label" translatable="yes">Grayscale</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">blackandwhite</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="blackandwhite">
+ <property name="label" translatable="yes">Black & white</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">originalcolors</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Color</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="pagesizes">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox" id="box3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkRadioButton" id="originalsize">
+ <property name="label" translatable="yes">Original size</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">fittoprintable</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="fittoprintable">
+ <property name="label" translatable="yes">Fit to printable page</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">distributeonmultiple</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="distributeonmultiple">
+ <property name="label" translatable="yes">Distribute on multiple sheets of paper</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">tilesheet</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="tilesheet">
+ <property name="label" translatable="yes">Tile sheet of paper with repeated slides</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">originalsize</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Size</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+</interface>
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 62030ef..137cbdf 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -612,6 +612,7 @@ XubString SfxHelp::GetHelpText( const String& aCommandURL, const Window* pWindow
{
String sModuleName = GetHelpModuleName_Impl();
String sHelpText = pImp->GetHelpText( aCommandURL, sModuleName );
+ fprintf(stderr, "A sHelpText %s for id %s\n", rtl::OUStringToOString(sHelpText, RTL_TEXTENCODING_UTF8).getStr(), rtl::OUStringToOString(aCommandURL, RTL_TEXTENCODING_UTF8).getStr());
rtl::OString aNewHelpId;
@@ -623,6 +624,7 @@ XubString SfxHelp::GetHelpText( const String& aCommandURL, const Window* pWindow
{
aNewHelpId = pParent->GetHelpId();
sHelpText = pImp->GetHelpText( rtl::OStringToOUString(aNewHelpId, RTL_TEXTENCODING_UTF8), sModuleName );
+ fprintf(stderr, "B sHelpText %s for id %s\n", rtl::OUStringToOString(sHelpText, RTL_TEXTENCODING_UTF8).getStr(), aNewHelpId.getStr());
if ( sHelpText.Len() > 0 )
pParent = NULL;
else
@@ -738,6 +740,8 @@ sal_Bool SfxHelp::Start_Impl( const String& rURL, const Window* pWindow, const S
if ( rURL.Search( sHelpIdScheme ) != 0 )
sKeyword = ::rtl::OUString( rURL );
+ fprintf(stderr, "C aHelpURL %s\n", rtl::OUStringToOString(aHelpURL, RTL_TEXTENCODING_UTF8).getStr());
+
if ( impl_hasHelpInstalled() && pWindow && SfxContentHelper::IsHelpErrorDocument( aHelpURL ) )
{
// no help found -> try with parent help id.
@@ -745,15 +749,23 @@ sal_Bool SfxHelp::Start_Impl( const String& rURL, const Window* pWindow, const S
while ( pParent )
{
rtl::OString aHelpId = pParent->GetHelpId();
+ fprintf(stderr, "D helpid %s for %p\n", aHelpId.getStr(), pParent);
aHelpURL = CreateHelpURL( rtl::OStringToOUString(aHelpId, RTL_TEXTENCODING_UTF8), aHelpModuleName );
+ fprintf(stderr, "D aHelpURL %s\n", rtl::OUStringToOString(aHelpURL, RTL_TEXTENCODING_UTF8).getStr());
if ( !SfxContentHelper::IsHelpErrorDocument( aHelpURL ) )
+ {
+ fprintf(stderr, "found as %s\n", rtl::OUStringToOString(aHelpURL, RTL_TEXTENCODING_UTF8).getStr());
break;
+ }
else
{
pParent = pParent->GetParent();
if ( !pParent )
+ {
+ fprintf(stderr, "no more parents\n");
// create help url of start page ( helpid == 0 -> start page)
aHelpURL = CreateHelpURL( String(), aHelpModuleName );
+ }
}
}
}
diff --git a/starmath/Module_starmath.mk b/starmath/Module_starmath.mk
index cbee845..f73d625 100644
--- a/starmath/Module_starmath.mk
+++ b/starmath/Module_starmath.mk
@@ -28,6 +28,7 @@ $(eval $(call gb_Module_add_targets,sm,\
Library_sm \
Library_smd \
Package_uiconfig \
+ UI_smath \
))
#$(eval $(call gb_Module_add_check_targets,sm,\
diff --git a/starmath/UI_smath.mk b/starmath/UI_smath.mk
new file mode 100644
index 0000000..6cbfb8d
--- /dev/null
+++ b/starmath/UI_smath.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UI_UI,modules/smath))
+
+$(eval $(call gb_UI_add_uifiles,modules/smath,\
+ starmath/uiconfig/smath/ui/printeroptions \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index a253cdf..30a3af6 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -88,38 +88,44 @@ SmPrintUIOptions::SmPrintUIOptions()
if (!pConfig)
return;
+ sal_Int32 nNumProps = 10, nIdx=0;
+
// create sequence of print UI options
// (Actually IsIgnoreSpacesRight is a parser option. Without it we need only 8 properties here.)
- m_aUIProperties.realloc( 9 );
+ m_aUIProperties.realloc( nNumProps );
+
+ // load the math PrinterOptions into the custom tab
+ m_aUIProperties[nIdx].Name = rtl::OUString("OptionsUIFile");
+ m_aUIProperties[nIdx++].Value <<= rtl::OUString("modules/smath/ui/printeroptions.ui");
// create Section for formula (results in an extra tab page in dialog)
SvtModuleOptions aOpt;
String aAppGroupname( aLocalizedStrings.GetString( 0 ) );
aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ),
aOpt.GetModuleName( SvtModuleOptions::E_SMATH ) );
- m_aUIProperties[0].Value = getGroupControlOpt( aAppGroupname, ".HelpID:vcl:PrintDialog:TabPage:AppPage" );
+ m_aUIProperties[nIdx++].Value = setGroupControlOpt("tabcontrol-page2", aAppGroupname, ".HelpID:vcl:PrintDialog:TabPage:AppPage");
// create subgroup for print options
- m_aUIProperties[1].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 1 ), rtl::OUString() );
+ m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("contents", aLocalizedStrings.GetString(1), rtl::OUString());
// create a bool option for title row (matches to SID_PRINTTITLE)
- m_aUIProperties[2].Value = getBoolControlOpt( aLocalizedStrings.GetString( 2 ),
+ m_aUIProperties[nIdx++].Value = setBoolControlOpt("title", aLocalizedStrings.GetString( 2 ),
".HelpID:vcl:PrintDialog:TitleRow:CheckBox",
PRTUIOPT_TITLE_ROW,
- pConfig->IsPrintTitle() );
+ pConfig->IsPrintTitle());
// create a bool option for formula text (matches to SID_PRINTTEXT)
- m_aUIProperties[3].Value = getBoolControlOpt( aLocalizedStrings.GetString( 3 ),
+ m_aUIProperties[nIdx++].Value = setBoolControlOpt("formulatext", aLocalizedStrings.GetString( 3 ),
".HelpID:vcl:PrintDialog:FormulaText:CheckBox",
PRTUIOPT_FORMULA_TEXT,
- pConfig->IsPrintFormulaText() );
+ pConfig->IsPrintFormulaText());
// create a bool option for border (matches to SID_PRINTFRAME)
- m_aUIProperties[4].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ),
+ m_aUIProperties[nIdx++].Value = setBoolControlOpt("borders", aLocalizedStrings.GetString( 4 ),
".HelpID:vcl:PrintDialog:Border:CheckBox",
PRTUIOPT_BORDER,
- pConfig->IsPrintFrame() );
+ pConfig->IsPrintFrame());
// create subgroup for print format
- m_aUIProperties[5].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 5 ), rtl::OUString() );
+ m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("size", aLocalizedStrings.GetString(5), rtl::OUString());
// create a radio button group for print format (matches to SID_PRINTSIZE)
Sequence< rtl::OUString > aChoices( 3 );
@@ -130,8 +136,12 @@ SmPrintUIOptions::SmPrintUIOptions()
aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:0";
aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:1";
aHelpIds[2] = ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:2";
+ Sequence< rtl::OUString > aWidgetIds( 3 );
+ aWidgetIds[0] = "originalsize";
+ aWidgetIds[1] = "fittopage";
+ aWidgetIds[2] = "scaling";
OUString aPrintFormatProp( PRTUIOPT_PRINT_FORMAT );
- m_aUIProperties[6].Value = getChoiceControlOpt( rtl::OUString(),
+ m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, rtl::OUString(),
aHelpIds,
aPrintFormatProp,
aChoices, static_cast< sal_Int32 >(pConfig->GetPrintSize())
@@ -139,19 +149,20 @@ SmPrintUIOptions::SmPrintUIOptions()
// create a numeric box for scale dependent on PrintFormat = "Scaling" (matches to SID_PRINTZOOM)
vcl::PrinterOptionsHelper::UIControlOptions aRangeOpt( aPrintFormatProp, 2, sal_True );
- m_aUIProperties[ 7 ].Value = getRangeControlOpt( rtl::OUString(),
+ m_aUIProperties[nIdx++].Value = setRangeControlOpt("scalingspin", rtl::OUString(),
".HelpID:vcl:PrintDialog:PrintScale:NumericField",
PRTUIOPT_PRINT_SCALE,
pConfig->GetPrintZoomFactor(), // initial value
10, // min value
1000, // max value
- aRangeOpt );
+ aRangeOpt);
Sequence< PropertyValue > aHintNoLayoutPage( 1 );
aHintNoLayoutPage[0].Name = "HintNoLayoutPage";
aHintNoLayoutPage[0].Value = makeAny( sal_True );
- m_aUIProperties[8].Value <<= aHintNoLayoutPage;
+ m_aUIProperties[nIdx++].Value <<= aHintNoLayoutPage;
+ assert(nIdx == nNumProps);
}
diff --git a/starmath/uiconfig/smath/ui/printeroptions.ui b/starmath/uiconfig/smath/ui/printeroptions.ui
new file mode 100644
index 0000000..9d81826
--- /dev/null
+++ b/starmath/uiconfig/smath/ui/printeroptions.ui
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkBox" id="box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkFrame" id="contents">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkCheckButton" id="title">
+ <property name="label" translatable="yes">Title</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="formulatext">
+ <property name="label" translatable="yes">Formula text</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="borders">
+ <property name="label" translatable="yes">Borders</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Contents</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="size">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkRadioButton" id="originalsize">
+ <property name="label" translatable="yes">Original size</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">fittopage</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="fittopage">
+ <property name="label" translatable="yes">Fit to page</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">scaling</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkRadioButton" id="scaling">
+ <property name="label" translatable="yes">Scaling</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">originalsize</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="scalingspin">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">â</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Soze</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+</interface>
diff --git a/sw/UI_swriter.mk b/sw/UI_swriter.mk
index e0f7edc..e6bece6 100644
--- a/sw/UI_swriter.mk
+++ b/sw/UI_swriter.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_UI_UI,modules/swriter))
$(eval $(call gb_UI_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/inserttable \
sw/uiconfig/swriter/ui/linenumbering \
+ sw/uiconfig/swriter/ui/printeroptions \
sw/uiconfig/swriter/ui/titlepage \
sw/uiconfig/swriter/ui/wordcount \
))
diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx
index 4e6d37f..252b6ad 100644
--- a/sw/source/core/view/printdata.cxx
+++ b/sw/source/core/view/printdata.cxx
@@ -209,137 +209,136 @@ 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 ? 14 : 20);
+ const int nNumProps = nCTLOpts + (bWeb ? 15 : 21);
m_aUIProperties.realloc( nNumProps );
int nIdx = 0;
+ // load the writer PrinterOptions into the custom tab
+ m_aUIProperties[nIdx].Name = rtl::OUString("OptionsUIFile");
+ m_aUIProperties[nIdx++].Value <<= rtl::OUString("modules/swriter/ui/printeroptions.ui");
+
// create "writer" section (new tab page in dialog)
SvtModuleOptions aModOpt;
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( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:TabPage:AppPage" ) ) );
+ m_aUIProperties[ nIdx++ ].Value = setGroupControlOpt("tabcontrol-page2", aAppGroupname, ".HelpID:vcl:PrintDialog:TabPage:AppPage");
// create sub section for Contents
- m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 1 ), rtl::OUString() );
+ m_aUIProperties[ nIdx++ ].Value = setSubgroupControlOpt("contents", aLocalizedStrings.GetString(1), rtl::OUString());
// create a bool option for background
bool bDefaultVal = rDefaultPrintData.IsPrintPageBackground();
- m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 2 ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintPageBackground:CheckBox" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPageBackground" ) ),
- bDefaultVal );
+ m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("pagebackground", aLocalizedStrings.GetString( 2 ),
+ ".HelpID:vcl:PrintDialog:PrintPageBackground:CheckBox",
+ "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( 3 ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintPicturesAndObjects:CheckBox" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPicturesAndObjects" ) ),
- bDefaultVal );
+ m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("pictures", aLocalizedStrings.GetString( 3 ),
+ ".HelpID:vcl:PrintDialog:PrintPicturesAndObjects:CheckBox",
+ "PrintPicturesAndObjects",
+ bDefaultVal);
if (!bWeb)
{
// create a bool option for hidden text
bDefaultVal = rDefaultPrintData.IsPrintHiddenText();
- 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 );
+ m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("hiddentext", aLocalizedStrings.GetString( 4 ),
+ ".HelpID:vcl:PrintDialog:PrintHiddenText:CheckBox",
+ "PrintHiddenText",
+ bDefaultVal);
// create a bool option for place holder
bDefaultVal = rDefaultPrintData.IsPrintTextPlaceholder();
- 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 );
+ m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("placeholders", aLocalizedStrings.GetString( 5 ),
+ ".HelpID:vcl:PrintDialog:PrintTextPlaceholder:CheckBox",
+ "PrintTextPlaceholder",
+ bDefaultVal);
}
// create a bool option for controls
bDefaultVal = rDefaultPrintData.IsPrintControl();
- 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 );
+ m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("formcontrols", aLocalizedStrings.GetString( 6 ),
+ ".HelpID:vcl:PrintDialog:PrintControls:CheckBox",
+ "PrintControls",
+ bDefaultVal);
// create sub section for Color
- m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 7 ), rtl::OUString() );
+ m_aUIProperties[ nIdx++ ].Value = setSubgroupControlOpt("color", 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( 8 ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintBlackFonts:CheckBox" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintBlackFonts" ) ),
- bDefaultVal );
+ m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("textinblack", aLocalizedStrings.GetString( 8 ),
+ ".HelpID:vcl:PrintDialog:PrintBlackFonts:CheckBox",
+ "PrintBlackFonts",
+ bDefaultVal);
if (!bWeb)
{
// create subgroup for misc options
- m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 9 ) ), rtl::OUString() );
+ m_aUIProperties[ nIdx++ ].Value = setSubgroupControlOpt("pages", 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( 10 ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintEmptyPages:CheckBox" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintEmptyPages" ) ),
- bDefaultVal );
+ m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("autoblankpages", aLocalizedStrings.GetString( 10 ),
+ ".HelpID:vcl:PrintDialog:PrintEmptyPages:CheckBox",
+ "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( 11 ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintPaperFromSetup:CheckBox" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPaperFromSetup" ) ),
- bDefaultVal,
- aPaperTrayOpt
- );
+ m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("printpaperfromsetup", aLocalizedStrings.GetString( 11 ),
+ ".HelpID:vcl:PrintDialog:PrintPaperFromSetup:CheckBox",
+ "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( 26 ) ),
+ m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("printrange", rtl::OUString(aLocalizedStrings.GetString(26)),
rtl::OUString(),
- aPrintRangeOpt
- );
+ aPrintRangeOpt);
// create a choice for the content to create
rtl::OUString aPrintRangeName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) );
uno::Sequence< rtl::OUString > aChoices( 3 );
uno::Sequence< sal_Bool > aChoicesDisabled( 3 );
uno::Sequence< rtl::OUString > aHelpIds( 3 );
+ uno::Sequence< rtl::OUString > aWidgetIds( 3 );
aChoices[0] = aLocalizedStrings.GetString( 27 );
aChoicesDisabled[0] = sal_False;
aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ) );
+ aWidgetIds[0] = "printallpages";
aChoices[1] = aLocalizedStrings.GetString( 28 );
aChoicesDisabled[1] = sal_False;
aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ) );
+ aWidgetIds[1] = "printpages";
aChoices[2] = aLocalizedStrings.GetString( 29 );
aChoicesDisabled[2] = sal_Bool(! bHasSelection);
aHelpIds[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2" ) );
- m_aUIProperties[nIdx++].Value = getChoiceControlOpt( rtl::OUString(),
- aHelpIds,
- aPrintRangeName,
- aChoices,
- 0 /* always default to 'All pages' */,
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Radio" ) ),
- aChoicesDisabled
- );
- // create a an Edit dependent on "Pages" selected
+ aWidgetIds[2] = "printselection";
+ m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, rtl::OUString(),
+ aHelpIds, aPrintRangeName,
+ aChoices, 0 /* always default to 'All pages' */,
+ aChoicesDisabled);
+ // show an Edit dependent on "Pages" selected
vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True );
- m_aUIProperties[nIdx++].Value = getEditControlOpt( rtl::OUString(),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PageRange:Edit" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ),
- rtl::OUString::valueOf( sal_Int32( nCurrentPage ) ) /* set text box to current page number */,
- aPageRangeOpt
- );
+ m_aUIProperties[nIdx++].Value = setEditControlOpt("pagerange", rtl::OUString(),
+ ".HelpID:vcl:PrintDialog:PageRange:Edit",
+ "PageRange",
+ rtl::OUString::valueOf( sal_Int32( nCurrentPage ) ) /* set text box to current page number */,
+ aPageRangeOpt);
// print content selection
vcl::PrinterOptionsHelper::UIControlOptions aContentsOpt;
aContentsOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "JobPage" ) );
- m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 12 ) ),
- rtl::OUString(),
- aContentsOpt
- );
+ m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("extrawriterprintoptions", rtl::OUString(aLocalizedStrings.GetString(12)),
+ rtl::OUString(), aContentsOpt);
// create a list box for notes content
const sal_Int16 nPrintPostIts = rDefaultPrintData.GetPrintPostIts();
aChoices.realloc( 4 );
@@ -352,15 +351,14 @@ SwPrintUIOptions::SwPrintUIOptions(
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( 17 ),
+ m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt("writercomments",
+ aLocalizedStrings.GetString( 17 ),
aHelpIds,
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintAnnotationMode" ) ),
aChoices,
nPrintPostIts,
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ),
uno::Sequence< sal_Bool >(),
- aAnnotOpt
- );
+ aAnnotOpt);
// create subsection for Page settings
vcl::PrinterOptionsHelper::UIControlOptions aPageSetOpt;
@@ -368,10 +366,8 @@ SwPrintUIOptions::SwPrintUIOptions(
if (!bWeb)
{
- m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 18 ) ),
- rtl::OUString(),
- aPageSetOpt
- );
+ m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("pagesides", rtl::OUString(aLocalizedStrings.GetString(18)),
+ rtl::OUString(), aPageSetOpt);
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list