[Libreoffice-commits] core.git: sc/inc sc/source sc/uiconfig sc/UIConfig_scalc.mk
Abdulaziz A Alayed
aalayed at kacst.edu.sa
Tue Jun 4 09:06:35 PDT 2013
sc/UIConfig_scalc.mk | 1
sc/inc/helpids.h | 1
sc/source/ui/inc/optdlg.hrc | 4
sc/source/ui/inc/tpprint.hxx | 6 -
sc/source/ui/optdlg/tpprint.cxx | 32 +++----
sc/source/ui/src/optdlg.src | 35 --------
sc/uiconfig/scalc/ui/optdlg.ui | 165 ++++++++++++++++++++++++++++++++++++++++
7 files changed, 183 insertions(+), 61 deletions(-)
New commits:
commit b8400dbf46aeffd5991f71511ae27368d46a5c40
Author: Abdulaziz A Alayed <aalayed at kacst.edu.sa>
Date: Tue Jun 4 12:12:33 2013 +0200
Convert Calc Print option page to .ui.
Change-Id: Ida482cb280c3ec3ae05af053861f19c13f8a1d78
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 94a8aea..27563d3 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -98,6 +98,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/sortwarning \
sc/uiconfig/scalc/ui/textimportoptions \
sc/uiconfig/scalc/ui/textimportcsv \
+ sc/uiconfig/scalc/ui/optdlg \
))
# vim: set noet sw=4 ts=4:
diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h
index 8bbc07a..9744a35 100644
--- a/sc/inc/helpids.h
+++ b/sc/inc/helpids.h
@@ -64,7 +64,6 @@
#define HID_SCPAGE_USERLISTS "SC_HID_SCPAGE_USERLISTS"
#define HID_SCPAGE_AREAS "SC_HID_SCPAGE_AREAS"
#define HID_SCPAGE_COMPATIBILITY "SC_HID_SCPAGE_COMPATIBILITY"
-#define HID_SCPAGE_PRINT "SC_HID_SCPAGE_PRINT"
#define HID_SCPAGE_SUBT_GROUP1 "SC_HID_SCPAGE_SUBT_GROUP1"
#define HID_SCPAGE_SUBT_GROUP2 "SC_HID_SCPAGE_SUBT_GROUP2"
#define HID_SCPAGE_SUBT_GROUP3 "SC_HID_SCPAGE_SUBT_GROUP3"
diff --git a/sc/source/ui/inc/optdlg.hrc b/sc/source/ui/inc/optdlg.hrc
index 515ddcb..78fdf85 100644
--- a/sc/source/ui/inc/optdlg.hrc
+++ b/sc/source/ui/inc/optdlg.hrc
@@ -56,10 +56,6 @@
#define STR_COPYERR 9
// TP_PRINT:
-#define FL_PAGES 1
-#define BTN_SKIPEMPTYPAGES 2
-#define FL_SHEETS 2
-#define BTN_SELECTEDSHEETS 4
// TP_LCONTENT
diff --git a/sc/source/ui/inc/tpprint.hxx b/sc/source/ui/inc/tpprint.hxx
index 0babe41..2b9eac7 100644
--- a/sc/source/ui/inc/tpprint.hxx
+++ b/sc/source/ui/inc/tpprint.hxx
@@ -27,10 +27,8 @@
class ScTpPrintOptions : public SfxTabPage
{
- FixedLine aPagesFL;
- CheckBox aSkipEmptyPagesCB;
- FixedLine aSheetsFL;
- CheckBox aSelectedSheetsCB;
+ CheckBox* m_pSkipEmptyPagesCB;
+ CheckBox* m_pSelectedSheetsCB;
ScTpPrintOptions( Window* pParent, const SfxItemSet& rCoreSet );
~ScTpPrintOptions();
diff --git a/sc/source/ui/optdlg/tpprint.cxx b/sc/source/ui/optdlg/tpprint.cxx
index 9ca45c1..cdfc5eb 100644
--- a/sc/source/ui/optdlg/tpprint.cxx
+++ b/sc/source/ui/optdlg/tpprint.cxx
@@ -34,14 +34,12 @@
ScTpPrintOptions::ScTpPrintOptions( Window* pParent,
const SfxItemSet& rCoreAttrs )
: SfxTabPage ( pParent,
- ScResId( RID_SCPAGE_PRINT ),
- rCoreAttrs ),
- aPagesFL ( this, ScResId( FL_PAGES ) ),
- aSkipEmptyPagesCB( this, ScResId( BTN_SKIPEMPTYPAGES ) ),
- aSheetsFL ( this, ScResId( FL_SHEETS ) ),
- aSelectedSheetsCB( this, ScResId( BTN_SELECTEDSHEETS ) )
+ "optCalcPrintPage",
+ "modules/scalc/ui/optdlg.ui",
+ rCoreAttrs )
{
- FreeResource();
+ get( m_pSkipEmptyPagesCB , "suppressCB" );
+ get( m_pSelectedSheetsCB , "printCB" );
}
ScTpPrintOptions::~ScTpPrintOptions()
@@ -79,16 +77,16 @@ void ScTpPrintOptions::Reset( const SfxItemSet& rCoreSet )
if ( SFX_ITEM_SET == rCoreSet.GetItemState( SID_PRINT_SELECTEDSHEET, false , &pItem ) )
{
sal_Bool bChecked = ( (const SfxBoolItem*)pItem )->GetValue();
- aSelectedSheetsCB.Check( bChecked );
+ m_pSelectedSheetsCB->Check( bChecked );
}
else
{
- aSelectedSheetsCB.Check( !aOptions.GetAllSheets() );
+ m_pSelectedSheetsCB->Check( !aOptions.GetAllSheets() );
}
- aSkipEmptyPagesCB.Check( aOptions.GetSkipEmpty() );
- aSkipEmptyPagesCB.SaveValue();
- aSelectedSheetsCB.SaveValue();
+ m_pSkipEmptyPagesCB->Check( aOptions.GetSkipEmpty() );
+ m_pSkipEmptyPagesCB->SaveValue();
+ m_pSelectedSheetsCB->SaveValue();
}
// -----------------------------------------------------------------------
@@ -97,18 +95,18 @@ sal_Bool ScTpPrintOptions::FillItemSet( SfxItemSet& rCoreAttrs )
{
rCoreAttrs.ClearItem( SID_PRINT_SELECTEDSHEET );
- bool bSkipEmptyChanged = ( aSkipEmptyPagesCB.GetSavedValue() != aSkipEmptyPagesCB.IsChecked() );
- bool bSelectedSheetsChanged = ( aSelectedSheetsCB.GetSavedValue() != aSelectedSheetsCB.IsChecked() );
+ bool bSkipEmptyChanged = ( m_pSkipEmptyPagesCB->GetSavedValue() != m_pSkipEmptyPagesCB->IsChecked() );
+ bool bSelectedSheetsChanged = ( m_pSelectedSheetsCB->GetSavedValue() != m_pSelectedSheetsCB->IsChecked() );
if ( bSkipEmptyChanged || bSelectedSheetsChanged )
{
ScPrintOptions aOpt;
- aOpt.SetSkipEmpty( aSkipEmptyPagesCB.IsChecked() );
- aOpt.SetAllSheets( !aSelectedSheetsCB.IsChecked() );
+ aOpt.SetSkipEmpty( m_pSkipEmptyPagesCB->IsChecked() );
+ aOpt.SetAllSheets( !m_pSelectedSheetsCB->IsChecked() );
rCoreAttrs.Put( ScTpPrintItem( SID_SCPRINTOPTIONS, aOpt ) );
if ( bSelectedSheetsChanged )
{
- rCoreAttrs.Put( SfxBoolItem( SID_PRINT_SELECTEDSHEET, aSelectedSheetsCB.IsChecked() ) );
+ rCoreAttrs.Put( SfxBoolItem( SID_PRINT_SELECTEDSHEET, m_pSelectedSheetsCB->IsChecked() ) );
}
return sal_True;
}
diff --git a/sc/source/ui/src/optdlg.src b/sc/source/ui/src/optdlg.src
index 5c87e41..d3c4fdb 100644
--- a/sc/source/ui/src/optdlg.src
+++ b/sc/source/ui/src/optdlg.src
@@ -755,39 +755,4 @@ TabPage RID_SCPAGE_LAYOUT
};
};
-TabPage RID_SCPAGE_PRINT
-{
- HelpId = HID_SCPAGE_PRINT ;
- SVLook = TRUE ;
- Hide = TRUE ;
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
- FixedLine FL_PAGES
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 248 , 8 ) ;
- Text [ en-US ] = "Pages";
- };
- CheckBox BTN_SKIPEMPTYPAGES
- {
- HelpID = "sc:CheckBox:RID_SCPAGE_PRINT:BTN_SKIPEMPTYPAGES";
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 239 , 10 ) ;
- Text [ en-US ] = "~Suppress output of empty pages";
- };
- FixedLine FL_SHEETS
- {
- Pos = MAP_APPFONT ( 6 , 30 ) ;
- Size = MAP_APPFONT ( 248 , 8 ) ;
- Text [ en-US ] = "Sheets";
- };
- CheckBox BTN_SELECTEDSHEETS
- {
- HelpID = "sc:CheckBox:RID_SCPAGE_PRINT:BTN_SELECTEDSHEETS";
- Pos = MAP_APPFONT ( 12 , 41 ) ;
- Size = MAP_APPFONT ( 239 , 10 ) ;
- Text [ en-US ] = "~Print only selected sheets";
- };
-};
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/uiconfig/scalc/ui/optdlg.ui b/sc/uiconfig/scalc/ui/optdlg.ui
new file mode 100644
index 0000000..115f589
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/optdlg.ui
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="lower">1</property>
+ <property name="upper">99</property>
+ <property name="value">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkBox" id="optCalcPrintPage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <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="top_padding">6</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>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="suppressCB">
+ <property name="label" translatable="yes">Suppress output of empty pages</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</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>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Pages</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </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="frame2">
+ <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="top_padding">6</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>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="printCB">
+ <property name="label" translatable="yes">Print only selected sheets</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</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>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="yalign">0.47999998927116394</property>
+ <property name="label" translatable="yes">Sheets</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+</interface>
More information about the Libreoffice-commits
mailing list