Kaydet (Commit) b8400dbf authored tarafından Abdulaziz A Alayed's avatar Abdulaziz A Alayed

Convert Calc Print option page to .ui.

Change-Id: Ida482cb280c3ec3ae05af053861f19c13f8a1d78
üst 6b5455c2
...@@ -98,6 +98,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\ ...@@ -98,6 +98,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/sortwarning \ sc/uiconfig/scalc/ui/sortwarning \
sc/uiconfig/scalc/ui/textimportoptions \ sc/uiconfig/scalc/ui/textimportoptions \
sc/uiconfig/scalc/ui/textimportcsv \ sc/uiconfig/scalc/ui/textimportcsv \
sc/uiconfig/scalc/ui/optdlg \
)) ))
# vim: set noet sw=4 ts=4: # vim: set noet sw=4 ts=4:
...@@ -64,7 +64,6 @@ ...@@ -64,7 +64,6 @@
#define HID_SCPAGE_USERLISTS "SC_HID_SCPAGE_USERLISTS" #define HID_SCPAGE_USERLISTS "SC_HID_SCPAGE_USERLISTS"
#define HID_SCPAGE_AREAS "SC_HID_SCPAGE_AREAS" #define HID_SCPAGE_AREAS "SC_HID_SCPAGE_AREAS"
#define HID_SCPAGE_COMPATIBILITY "SC_HID_SCPAGE_COMPATIBILITY" #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_GROUP1 "SC_HID_SCPAGE_SUBT_GROUP1"
#define HID_SCPAGE_SUBT_GROUP2 "SC_HID_SCPAGE_SUBT_GROUP2" #define HID_SCPAGE_SUBT_GROUP2 "SC_HID_SCPAGE_SUBT_GROUP2"
#define HID_SCPAGE_SUBT_GROUP3 "SC_HID_SCPAGE_SUBT_GROUP3" #define HID_SCPAGE_SUBT_GROUP3 "SC_HID_SCPAGE_SUBT_GROUP3"
......
...@@ -56,10 +56,6 @@ ...@@ -56,10 +56,6 @@
#define STR_COPYERR 9 #define STR_COPYERR 9
// TP_PRINT: // TP_PRINT:
#define FL_PAGES 1
#define BTN_SKIPEMPTYPAGES 2
#define FL_SHEETS 2
#define BTN_SELECTEDSHEETS 4
// TP_LCONTENT // TP_LCONTENT
......
...@@ -27,10 +27,8 @@ ...@@ -27,10 +27,8 @@
class ScTpPrintOptions : public SfxTabPage class ScTpPrintOptions : public SfxTabPage
{ {
FixedLine aPagesFL; CheckBox* m_pSkipEmptyPagesCB;
CheckBox aSkipEmptyPagesCB; CheckBox* m_pSelectedSheetsCB;
FixedLine aSheetsFL;
CheckBox aSelectedSheetsCB;
ScTpPrintOptions( Window* pParent, const SfxItemSet& rCoreSet ); ScTpPrintOptions( Window* pParent, const SfxItemSet& rCoreSet );
~ScTpPrintOptions(); ~ScTpPrintOptions();
......
...@@ -34,14 +34,12 @@ ...@@ -34,14 +34,12 @@
ScTpPrintOptions::ScTpPrintOptions( Window* pParent, ScTpPrintOptions::ScTpPrintOptions( Window* pParent,
const SfxItemSet& rCoreAttrs ) const SfxItemSet& rCoreAttrs )
: SfxTabPage ( pParent, : SfxTabPage ( pParent,
ScResId( RID_SCPAGE_PRINT ), "optCalcPrintPage",
rCoreAttrs ), "modules/scalc/ui/optdlg.ui",
aPagesFL ( this, ScResId( FL_PAGES ) ), rCoreAttrs )
aSkipEmptyPagesCB( this, ScResId( BTN_SKIPEMPTYPAGES ) ),
aSheetsFL ( this, ScResId( FL_SHEETS ) ),
aSelectedSheetsCB( this, ScResId( BTN_SELECTEDSHEETS ) )
{ {
FreeResource(); get( m_pSkipEmptyPagesCB , "suppressCB" );
get( m_pSelectedSheetsCB , "printCB" );
} }
ScTpPrintOptions::~ScTpPrintOptions() ScTpPrintOptions::~ScTpPrintOptions()
...@@ -79,16 +77,16 @@ void ScTpPrintOptions::Reset( const SfxItemSet& rCoreSet ) ...@@ -79,16 +77,16 @@ void ScTpPrintOptions::Reset( const SfxItemSet& rCoreSet )
if ( SFX_ITEM_SET == rCoreSet.GetItemState( SID_PRINT_SELECTEDSHEET, false , &pItem ) ) if ( SFX_ITEM_SET == rCoreSet.GetItemState( SID_PRINT_SELECTEDSHEET, false , &pItem ) )
{ {
sal_Bool bChecked = ( (const SfxBoolItem*)pItem )->GetValue(); sal_Bool bChecked = ( (const SfxBoolItem*)pItem )->GetValue();
aSelectedSheetsCB.Check( bChecked ); m_pSelectedSheetsCB->Check( bChecked );
} }
else else
{ {
aSelectedSheetsCB.Check( !aOptions.GetAllSheets() ); m_pSelectedSheetsCB->Check( !aOptions.GetAllSheets() );
} }
aSkipEmptyPagesCB.Check( aOptions.GetSkipEmpty() ); m_pSkipEmptyPagesCB->Check( aOptions.GetSkipEmpty() );
aSkipEmptyPagesCB.SaveValue(); m_pSkipEmptyPagesCB->SaveValue();
aSelectedSheetsCB.SaveValue(); m_pSelectedSheetsCB->SaveValue();
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
...@@ -97,18 +95,18 @@ sal_Bool ScTpPrintOptions::FillItemSet( SfxItemSet& rCoreAttrs ) ...@@ -97,18 +95,18 @@ sal_Bool ScTpPrintOptions::FillItemSet( SfxItemSet& rCoreAttrs )
{ {
rCoreAttrs.ClearItem( SID_PRINT_SELECTEDSHEET ); rCoreAttrs.ClearItem( SID_PRINT_SELECTEDSHEET );
bool bSkipEmptyChanged = ( aSkipEmptyPagesCB.GetSavedValue() != aSkipEmptyPagesCB.IsChecked() ); bool bSkipEmptyChanged = ( m_pSkipEmptyPagesCB->GetSavedValue() != m_pSkipEmptyPagesCB->IsChecked() );
bool bSelectedSheetsChanged = ( aSelectedSheetsCB.GetSavedValue() != aSelectedSheetsCB.IsChecked() ); bool bSelectedSheetsChanged = ( m_pSelectedSheetsCB->GetSavedValue() != m_pSelectedSheetsCB->IsChecked() );
if ( bSkipEmptyChanged || bSelectedSheetsChanged ) if ( bSkipEmptyChanged || bSelectedSheetsChanged )
{ {
ScPrintOptions aOpt; ScPrintOptions aOpt;
aOpt.SetSkipEmpty( aSkipEmptyPagesCB.IsChecked() ); aOpt.SetSkipEmpty( m_pSkipEmptyPagesCB->IsChecked() );
aOpt.SetAllSheets( !aSelectedSheetsCB.IsChecked() ); aOpt.SetAllSheets( !m_pSelectedSheetsCB->IsChecked() );
rCoreAttrs.Put( ScTpPrintItem( SID_SCPRINTOPTIONS, aOpt ) ); rCoreAttrs.Put( ScTpPrintItem( SID_SCPRINTOPTIONS, aOpt ) );
if ( bSelectedSheetsChanged ) if ( bSelectedSheetsChanged )
{ {
rCoreAttrs.Put( SfxBoolItem( SID_PRINT_SELECTEDSHEET, aSelectedSheetsCB.IsChecked() ) ); rCoreAttrs.Put( SfxBoolItem( SID_PRINT_SELECTEDSHEET, m_pSelectedSheetsCB->IsChecked() ) );
} }
return sal_True; return sal_True;
} }
......
...@@ -755,39 +755,4 @@ TabPage RID_SCPAGE_LAYOUT ...@@ -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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
<?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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment