summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-01-19 16:22:18 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-01-19 20:59:42 +0000
commit621d1fba84e13a28843fb7a7befb28e26a6d0a15 (patch)
tree36a322f50ce52e19df1fa3fca1e556b3d8187fd9 /cui
parent253e439c347fae54e6c4731d432eef842a889c9d (diff)
convert split cells dialog to our 99th .ui file
Change-Id: If1a37074400540e3adce42de2bb7c88c2c599382
Diffstat (limited to 'cui')
-rw-r--r--cui/AllLangResTarget_cui.mk1
-rw-r--r--cui/UI_cui.mk1
-rw-r--r--cui/source/dialogs/splitcelldlg.cxx57
-rw-r--r--cui/source/dialogs/splitcelldlg.hrc29
-rw-r--r--cui/source/dialogs/splitcelldlg.src118
-rw-r--r--cui/source/inc/splitcelldlg.hxx14
-rw-r--r--cui/uiconfig/ui/splitcellsdialog.ui275
7 files changed, 305 insertions, 190 deletions
diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk
index f8a133ed0f58..967d702ad5b7 100644
--- a/cui/AllLangResTarget_cui.mk
+++ b/cui/AllLangResTarget_cui.mk
@@ -73,7 +73,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/dialogs/scriptdlg.src \
cui/source/dialogs/sdrcelldlg.src \
cui/source/dialogs/showcols.src \
- cui/source/dialogs/splitcelldlg.src \
cui/source/dialogs/srchxtra.src \
cui/source/dialogs/svuidlg.src \
cui/source/dialogs/tbxform.src \
diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk
index d041c02fbb89..e67ffac8047a 100644
--- a/cui/UI_cui.mk
+++ b/cui/UI_cui.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\
cui/uiconfig/ui/select_persona_dialog \
cui/uiconfig/ui/specialcharacters \
cui/uiconfig/ui/spellingdialog \
+ cui/uiconfig/ui/splitcellsdialog \
cui/uiconfig/ui/thesaurus \
cui/uiconfig/ui/twolinespage \
cui/uiconfig/ui/zoomdialog \
diff --git a/cui/source/dialogs/splitcelldlg.cxx b/cui/source/dialogs/splitcelldlg.cxx
index d1566a529514..f8d37b92bf42 100644
--- a/cui/source/dialogs/splitcelldlg.cxx
+++ b/cui/source/dialogs/splitcelldlg.cxx
@@ -23,40 +23,33 @@
#include "dialmgr.hxx"
#include "splitcelldlg.hxx"
#include "cuires.hrc"
-#include "splitcelldlg.hrc"
-SvxSplitTableDlg::SvxSplitTableDlg( Window *pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal )
-: SvxStandardDialog(pParent, CUI_RES(RID_SVX_SPLITCELLDLG))
-, maCountFL(this, CUI_RES(FL_COUNT))
-, maCountLbl(this, CUI_RES(FT_COUNT))
-, maCountEdit(this, CUI_RES(ED_COUNT))
-, maDirFL(this, CUI_RES(FL_DIR))
-, maHorzBox(this, CUI_RES(RB_HORZ))
-, maVertBox(this, CUI_RES(RB_VERT))
-, maPropCB(this, CUI_RES(CB_PROP))
-, maOKBtn(this, CUI_RES(BT_OK))
-, maCancelBtn(this, CUI_RES(BT_CANCEL))
-, maHelpBtn( this, CUI_RES( BT_HELP ) )
-, mnMaxVertical( nMaxVertical )
-, mnMaxHorizontal( nMaxHorizontal )
+SvxSplitTableDlg::SvxSplitTableDlg( Window *pParent, bool bIsTableVertical,
+ long nMaxVertical, long nMaxHorizontal )
+ : SvxStandardDialog(pParent, "SplitCellsDialog", "cui/ui/splitcellsdialog.ui")
+ , mnMaxVertical(nMaxVertical)
+ , mnMaxHorizontal(nMaxHorizontal)
{
- FreeResource();
- maHorzBox.SetClickHdl( LINK( this, SvxSplitTableDlg, ClickHdl ));
- maPropCB.SetClickHdl( LINK( this, SvxSplitTableDlg, ClickHdl ));
- maVertBox.SetClickHdl( LINK( this, SvxSplitTableDlg, ClickHdl ));
+ get(m_pCountEdit, "countnf");
+ get(m_pHorzBox, "hori");
+ get(m_pVertBox, "vert");
+ get(m_pPropCB, "prop");
+ m_pHorzBox->SetClickHdl( LINK( this, SvxSplitTableDlg, ClickHdl ));
+ m_pPropCB->SetClickHdl( LINK( this, SvxSplitTableDlg, ClickHdl ));
+ m_pVertBox->SetClickHdl( LINK( this, SvxSplitTableDlg, ClickHdl ));
if( mnMaxVertical < 2 )
- maVertBox.Enable(sal_False);
+ m_pVertBox->Enable(sal_False);
//exchange the meaning of horizontal and vertical for vertical text
if(bIsTableVertical)
{
- Image aTmpImg(maHorzBox.GetModeRadioImage());
- String sTmp(maHorzBox.GetText());
- maHorzBox.SetText(maVertBox.GetText());
- maHorzBox.SetModeRadioImage(maVertBox.GetModeRadioImage());
- maVertBox.SetText(sTmp);
- maVertBox.SetModeRadioImage(aTmpImg);
+ Image aTmpImg(m_pHorzBox->GetModeRadioImage());
+ String sTmp(m_pHorzBox->GetText());
+ m_pHorzBox->SetText(m_pVertBox->GetText());
+ m_pHorzBox->SetModeRadioImage(m_pVertBox->GetModeRadioImage());
+ m_pVertBox->SetText(sTmp);
+ m_pVertBox->SetModeRadioImage(aTmpImg);
}
}
@@ -66,26 +59,26 @@ SvxSplitTableDlg::~SvxSplitTableDlg()
IMPL_LINK( SvxSplitTableDlg, ClickHdl, Button *, pButton )
{
- const bool bIsVert = pButton == &maVertBox ;
+ const bool bIsVert = pButton == m_pVertBox ;
long nMax = bIsVert ? mnMaxVertical : mnMaxHorizontal;
- maPropCB.Enable(!bIsVert);
- maCountEdit.SetMax( nMax );
+ m_pPropCB->Enable(!bIsVert);
+ m_pCountEdit->SetMax( nMax );
return 0;
}
bool SvxSplitTableDlg::IsHorizontal() const
{
- return maHorzBox.IsChecked();
+ return m_pHorzBox->IsChecked();
}
bool SvxSplitTableDlg::IsProportional() const
{
- return maPropCB.IsChecked() && maHorzBox.IsChecked();
+ return m_pPropCB->IsChecked() && m_pHorzBox->IsChecked();
}
long SvxSplitTableDlg::GetCount() const
{
- return sal::static_int_cast<long>( maCountEdit.GetValue() );
+ return sal::static_int_cast<long>( m_pCountEdit->GetValue() );
}
short SvxSplitTableDlg::Execute()
diff --git a/cui/source/dialogs/splitcelldlg.hrc b/cui/source/dialogs/splitcelldlg.hrc
deleted file mode 100644
index 5ce498454356..000000000000
--- a/cui/source/dialogs/splitcelldlg.hrc
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#define FT_COUNT 1
-#define ED_COUNT 2
-#define FL_COUNT 3
-
-#define RB_HORZ 10
-#define CB_PROP 11
-#define RB_VERT 12
-#define FL_DIR 12
-
-#define BT_OK 100
-#define BT_CANCEL 101
-#define BT_HELP 102
diff --git a/cui/source/dialogs/splitcelldlg.src b/cui/source/dialogs/splitcelldlg.src
deleted file mode 100644
index 86fd9b011752..000000000000
--- a/cui/source/dialogs/splitcelldlg.src
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <cuires.hrc>
-#include "splitcelldlg.hrc"
-
-ModalDialog RID_SVX_SPLITCELLDLG
-{
- HelpID = "cui:ModalDialog:RID_SVX_SPLITCELLDLG";
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 169 , 108 ) ;
- Text [ en-US ] = "Split Cells" ;
- Moveable = TRUE ;
-
- OKButton BT_OK
- {
- Pos = MAP_APPFONT ( 115 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BT_CANCEL
- {
- Pos = MAP_APPFONT ( 115 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BT_HELP
- {
- Pos = MAP_APPFONT ( 115 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- FixedText FT_COUNT
- {
- Pos = MAP_APPFONT ( 12 , 16 ) ;
- Size = MAP_APPFONT ( 67 , 8 ) ;
- Text [ en-US ] = "~Split cell into" ;
- Left = TRUE ;
- };
- NumericField ED_COUNT
- {
- HelpID = "cui:NumericField:RID_SVX_SPLITCELLDLG:ED_COUNT";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 82 , 14 ) ;
- Size = MAP_APPFONT ( 21 , 12 ) ;
- TabStop = TRUE ;
- Left = TRUE ;
- Right = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = 2 ;
- Maximum = 20 ;
- First = 2 ;
- Last = 5 ;
- };
- FixedLine FL_COUNT
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 103 , 8 ) ;
- Text [ en-US ] = "Split" ;
- };
- ImageRadioButton RB_HORZ
- {
- HelpID = "cui:ImageRadioButton:RID_SVX_SPLITCELLDLG:RB_HORZ";
- Pos = MAP_APPFONT ( 12 , 47 ) ;
- Size = MAP_APPFONT ( 90 , 18 ) ;
- Group = TRUE;
- Text [ en-US ] = "H~orizontally" ;
- RadioButtonImage = Image
- {
- ImageBitmap = Bitmap { File = "zetlhor2.bmp" ; };
- };
- TabStop = TRUE ;
- Check = TRUE ;
- };
- CheckBox CB_PROP
- {
- HelpID = "cui:CheckBox:RID_SVX_SPLITCELLDLG:CB_PROP";
- Pos = MAP_APPFONT ( 18 , 68 ) ;
- Size = MAP_APPFONT ( 91 , 12 ) ;
- Text [ en-US ] = "~Into equal proportions";
- };
- ImageRadioButton RB_VERT
- {
- HelpID = "cui:ImageRadioButton:RID_SVX_SPLITCELLDLG:RB_VERT";
- Pos = MAP_APPFONT ( 12 , 84 ) ;
- Size = MAP_APPFONT ( 90 , 18 ) ;
- Text [ en-US ] = "~Vertically" ;
- RadioButtonImage = Image
- {
- ImageBitmap = Bitmap { File = "zetlver2.bmp" ; };
- };
- TabStop = TRUE ;
- };
- FixedLine FL_DIR
- {
- Pos = MAP_APPFONT ( 6 , 36 ) ;
- Size = MAP_APPFONT ( 103 , 8 ) ;
- Text [ en-US ] = "Direction" ;
- };
-};
diff --git a/cui/source/inc/splitcelldlg.hxx b/cui/source/inc/splitcelldlg.hxx
index d1c1ba97f13e..0cf0351aa236 100644
--- a/cui/source/inc/splitcelldlg.hxx
+++ b/cui/source/inc/splitcelldlg.hxx
@@ -28,16 +28,10 @@
class SvxSplitTableDlg : public SvxAbstractSplittTableDialog, public SvxStandardDialog
{
- FixedLine maCountFL;
- FixedText maCountLbl;
- NumericField maCountEdit;
- FixedLine maDirFL;
- ImageRadioButton maHorzBox;
- ImageRadioButton maVertBox;
- CheckBox maPropCB;
- OKButton maOKBtn;
- CancelButton maCancelBtn;
- HelpButton maHelpBtn;
+ NumericField* m_pCountEdit;
+ RadioButton* m_pHorzBox;
+ RadioButton* m_pVertBox;
+ CheckBox* m_pPropCB;
long mnMaxVertical;
long mnMaxHorizontal;
diff --git a/cui/uiconfig/ui/splitcellsdialog.ui b/cui/uiconfig/ui/splitcellsdialog.ui
new file mode 100644
index 000000000000..cf08eaedc5e5
--- /dev/null
+++ b/cui/uiconfig/ui/splitcellsdialog.ui
@@ -0,0 +1,275 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="lower">2</property>
+ <property name="upper">20</property>
+ <property name="value">2</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">5</property>
+ </object>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixbuf">svx/res/zetlhor2.png</property>
+ </object>
+ <object class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixbuf">svx/res/zetlver2.png</property>
+ </object>
+ <object class="GtkDialog" id="SplitCellsDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Split Cells</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="button1">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button2">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button3">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</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="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Split cell into</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="countnf">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="adjustment">adjustment1</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</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">Split</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="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">12</property>
+ <child>
+ <object class="GtkRadioButton" id="hori">
+ <property name="label" translatable="yes">H_orizontally</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="image">image1</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">vert</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="vert">
+ <property name="label" translatable="yes">_Vertically</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="image">image2</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">hori</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <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="prop">
+ <property name="label" translatable="yes">_Into equal proportions</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>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </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="label" translatable="yes">Direction</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>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">button1</action-widget>
+ <action-widget response="0">button2</action-widget>
+ <action-widget response="0">button3</action-widget>
+ </action-widgets>
+ </object>
+</interface>