summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-04-15 11:14:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-04-15 11:16:24 +0100
commitfd2c9d360ab0b55d0100273875e469448e607751 (patch)
tree79a1108252b5b60ea783ff9596ee3e888389280b
parentc6fa764daaf80640198bc02a4c8af1f0a06f72b0 (diff)
adapt code to create names .ui conversion
Change-Id: I276f354cd07480c8798951c14b565994c93750c2
-rw-r--r--sc/UIConfig_scalc.mk1
-rw-r--r--sc/inc/sc.hrc2
-rw-r--r--sc/inc/scabstdlg.hxx3
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx23
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx3
-rw-r--r--sc/source/ui/inc/namecrea.hxx12
-rw-r--r--sc/source/ui/miscdlgs/namecrea.cxx45
-rw-r--r--sc/source/ui/src/miscdlgs.src67
-rw-r--r--sc/source/ui/view/cellsh1.cxx2
-rw-r--r--sc/uiconfig/scalc/ui/createnamesdialog.ui21
-rw-r--r--sc/uiconfig/scalc/ui/externaldata.ui12
11 files changed, 52 insertions, 139 deletions
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 437195908345..fe4e04981f06 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -60,6 +60,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/scalc,\
$(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/cellprotectionpage \
+ sc/uiconfig/scalc/ui/createnamesdialog \
sc/uiconfig/scalc/ui/definename \
sc/uiconfig/scalc/ui/deletecells \
sc/uiconfig/scalc/ui/deletecontents \
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index d1310920cdf9..b0bfb20413b0 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1002,7 +1002,7 @@
#define RID_SCPAGE_PRINT (SC_DIALOGS_START + 70)
#define RID_SCDLG_COLORROW (SC_DIALOGS_START + 71)
-#define RID_SCDLG_NAMES_CREATE (SC_DIALOGS_START + 73)
+
#define RID_SCDLG_CHAR (SC_DIALOGS_START + 76)
#define RID_SCDLG_PARAGRAPH (SC_DIALOGS_START + 77)
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 026a03ebb679..4e9ffaaf5e6e 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -414,7 +414,8 @@ public:
const String& rDefault,
int nId ) = 0;
- virtual AbstractScNameCreateDlg * CreateScNameCreateDlg ( Window * pParent, sal_uInt16 nFlags, int nId ) = 0; //add for ScNameCreateDlg
+ virtual AbstractScNameCreateDlg * CreateScNameCreateDlg(Window * pParent,
+ sal_uInt16 nFlags) = 0;
virtual AbstractScNamePasteDlg * CreateScNamePasteDlg ( Window * pParent, ScDocShell* pShell, bool bInsList=true ) = 0; // add for ScNamePasteDlg
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 83f3c235c143..acf411bd3540 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -1041,29 +1041,12 @@ AbstractScMoveTableDlg * ScAbstractDialogFactory_Impl::CreateScMoveTableDlg( Wi
return 0;
}
-
-
-
-AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg ( Window * pParent, sal_uInt16 nFlags, int nId )
+AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg(Window * pParent, sal_uInt16 nFlags)
{
- ScNameCreateDlg * pDlg=NULL;
- switch ( nId )
- {
- case RID_SCDLG_NAMES_CREATE :
- pDlg = new ScNameCreateDlg( pParent, nFlags );
- break;
- default:
- break;
- }
-
- if ( pDlg )
- return new AbstractScNameCreateDlg_Impl( pDlg );
- return 0;
+ ScNameCreateDlg * pDlg = new ScNameCreateDlg( pParent, nFlags );
+ return new AbstractScNameCreateDlg_Impl( pDlg );
}
-
-
-
AbstractScNamePasteDlg * ScAbstractDialogFactory_Impl::CreateScNamePasteDlg ( Window * pParent, ScDocShell* pShell, bool bInsList )
{
ScNamePasteDlg * pDlg = new ScNamePasteDlg( pParent, pShell, bInsList );
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index f88bb0ebf6ba..d4ea5ef2775b 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -481,7 +481,8 @@ public:
const String& rDefault,
int nId );
- virtual AbstractScNameCreateDlg * CreateScNameCreateDlg ( Window * pParent, sal_uInt16 nFlags, int nId ); //add for ScNameCreateDlg
+ virtual AbstractScNameCreateDlg * CreateScNameCreateDlg(Window * pParent,
+ sal_uInt16 nFlags);
virtual AbstractScNamePasteDlg * CreateScNamePasteDlg ( Window * pParent, ScDocShell* pShell, bool bInsList=true ); //add for ScNamePasteDlg
diff --git a/sc/source/ui/inc/namecrea.hxx b/sc/source/ui/inc/namecrea.hxx
index 8de83ce97a04..dc52ae5b5f05 100644
--- a/sc/source/ui/inc/namecrea.hxx
+++ b/sc/source/ui/inc/namecrea.hxx
@@ -28,14 +28,10 @@
class ScNameCreateDlg : public ModalDialog
{
protected:
- FixedLine aFixedLine;
- CheckBox aTopBox;
- CheckBox aLeftBox;
- CheckBox aBottomBox;
- CheckBox aRightBox;
- OKButton aOKButton;
- CancelButton aCancelButton;
- HelpButton aHelpButton;
+ CheckBox* m_pTopBox;
+ CheckBox* m_pLeftBox;
+ CheckBox* m_pBottomBox;
+ CheckBox* m_pRightBox;
public:
ScNameCreateDlg( Window * pParent, sal_uInt16 nFlags );
diff --git a/sc/source/ui/miscdlgs/namecrea.cxx b/sc/source/ui/miscdlgs/namecrea.cxx
index 599b8b66cb66..74b462e0f627 100644
--- a/sc/source/ui/miscdlgs/namecrea.cxx
+++ b/sc/source/ui/miscdlgs/namecrea.cxx
@@ -20,51 +20,32 @@
#undef SC_DLLIMPLEMENTATION
-
-
-//------------------------------------------------------------------
-
#include "namecrea.hxx"
#include "scresid.hxx"
-#include "miscdlgs.hrc"
-
-
-//==================================================================
ScNameCreateDlg::ScNameCreateDlg( Window * pParent, sal_uInt16 nFlags )
- : ModalDialog( pParent, ScResId(RID_SCDLG_NAMES_CREATE) ),
- aFixedLine ( this, ScResId( FL_FRAME ) ),
- aTopBox ( this, ScResId( BTN_TOP ) ),
- aLeftBox ( this, ScResId( BTN_LEFT ) ),
- aBottomBox ( this, ScResId( BTN_BOTTOM ) ),
- aRightBox ( this, ScResId( BTN_RIGHT ) ),
- aOKButton ( this, ScResId( BTN_OK ) ),
- aCancelButton ( this, ScResId( BTN_CANCEL ) ),
- aHelpButton ( this, ScResId( BTN_HELP ) )
+ : ModalDialog(pParent, "CreateNamesDialog", "modules/scalc/ui/createnamesdialog.ui")
{
- aTopBox.Check ( (nFlags & NAME_TOP) ? sal_True : false );
- aLeftBox.Check ( (nFlags & NAME_LEFT) ? sal_True : false );
- aBottomBox.Check( (nFlags & NAME_BOTTOM)? sal_True : false );
- aRightBox.Check ( (nFlags & NAME_RIGHT) ? sal_True : false );
-
- FreeResource();
+ get(m_pTopBox, "top");
+ get(m_pLeftBox, "left");
+ get(m_pBottomBox, "bottom");
+ get(m_pRightBox, "right");
+ m_pTopBox->Check ( (nFlags & NAME_TOP) ? sal_True : false );
+ m_pLeftBox->Check ( (nFlags & NAME_LEFT) ? sal_True : false );
+ m_pBottomBox->Check( (nFlags & NAME_BOTTOM)? sal_True : false );
+ m_pRightBox->Check ( (nFlags & NAME_RIGHT) ? sal_True : false );
}
-//------------------------------------------------------------------
-
sal_uInt16 ScNameCreateDlg::GetFlags() const
{
sal_uInt16 nResult = 0;
- nResult |= aTopBox.IsChecked() ? NAME_TOP: 0 ;
- nResult |= aLeftBox.IsChecked() ? NAME_LEFT: 0 ;
- nResult |= aBottomBox.IsChecked() ? NAME_BOTTOM: 0 ;
- nResult |= aRightBox.IsChecked() ? NAME_RIGHT: 0 ;
+ nResult |= m_pTopBox->IsChecked() ? NAME_TOP: 0 ;
+ nResult |= m_pLeftBox->IsChecked() ? NAME_LEFT: 0 ;
+ nResult |= m_pBottomBox->IsChecked() ? NAME_BOTTOM: 0 ;
+ nResult |= m_pRightBox->IsChecked() ? NAME_RIGHT: 0 ;
return nResult;
}
-
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/src/miscdlgs.src b/sc/source/ui/src/miscdlgs.src
index f7bbd9946722..798a375821cd 100644
--- a/sc/source/ui/src/miscdlgs.src
+++ b/sc/source/ui/src/miscdlgs.src
@@ -1115,73 +1115,6 @@ ModalDialog RID_SCDLG_COLORROW
};
};
-ModalDialog RID_SCDLG_NAMES_CREATE
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- HelpID = CMD_FID_USE_NAME ;
- Size = MAP_APPFONT ( 174 , 72 ) ;
- Moveable = TRUE ;
- CheckBox BTN_TOP
- {
- HelpID = "sc:CheckBox:RID_SCDLG_NAMES_CREATE:BTN_TOP";
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 93 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Top row" ;
- };
- CheckBox BTN_LEFT
- {
- HelpID = "sc:CheckBox:RID_SCDLG_NAMES_CREATE:BTN_LEFT";
- Pos = MAP_APPFONT ( 12 , 28 ) ;
- Size = MAP_APPFONT ( 93 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Left column" ;
- };
- CheckBox BTN_BOTTOM
- {
- HelpID = "sc:CheckBox:RID_SCDLG_NAMES_CREATE:BTN_BOTTOM";
- Pos = MAP_APPFONT ( 12 , 42 ) ;
- Size = MAP_APPFONT ( 93 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Bottom row" ;
- };
- CheckBox BTN_RIGHT
- {
- HelpID = "sc:CheckBox:RID_SCDLG_NAMES_CREATE:BTN_RIGHT";
- Pos = MAP_APPFONT ( 12 , 56 ) ;
- Size = MAP_APPFONT ( 93 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Right column" ;
- };
- OKButton BTN_OK
- {
- Pos = MAP_APPFONT ( 116 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT ( 116 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BTN_HELP
- {
- Pos = MAP_APPFONT ( 116 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- FixedLine FL_FRAME
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 104 , 8 ) ;
- Text [ en-US ] = "Create names from" ;
- };
- Text [ en-US ] = "Create Names" ;
-};
-
ModalDialog RID_SCDLG_CHARTCOLROW
{
HelpID = "sc:ModalDialog:RID_SCDLG_CHARTCOLROW";
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index c4742b25ca7e..ccb39b0c3222 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1687,7 +1687,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- AbstractScNameCreateDlg* pDlg = pFact->CreateScNameCreateDlg(pTabViewShell->GetDialogParent(), nFlags, RID_SCDLG_NAMES_CREATE );
+ AbstractScNameCreateDlg* pDlg = pFact->CreateScNameCreateDlg(pTabViewShell->GetDialogParent(), nFlags);
OSL_ENSURE(pDlg, "Dialog create fail!");
if( pDlg->Execute() )
diff --git a/sc/uiconfig/scalc/ui/createnamesdialog.ui b/sc/uiconfig/scalc/ui/createnamesdialog.ui
index 63fbc835db4d..0a0787e56c18 100644
--- a/sc/uiconfig/scalc/ui/createnamesdialog.ui
+++ b/sc/uiconfig/scalc/ui/createnamesdialog.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
- <object class="GtkDialog" id="createnames">
+ <object class="GtkDialog" id="CreateNamesDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Create Names</property>
@@ -9,17 +9,19 @@
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
- <property name="spacing">2</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</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="ok">
<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>
<property name="xalign">0.50999999046325684</property>
@@ -86,7 +88,7 @@
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="GtkCheckButton" id="checkbutton1">
+ <object class="GtkCheckButton" id="top">
<property name="label" translatable="yes">_Top row</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -102,7 +104,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="checkbutton2">
+ <object class="GtkCheckButton" id="left">
<property name="label" translatable="yes">_Left column</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -118,7 +120,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="checkbutton3">
+ <object class="GtkCheckButton" id="bottom">
<property name="label" translatable="yes">_Bottom row</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -136,7 +138,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="checkbutton4">
+ <object class="GtkCheckButton" id="right">
<property name="label" translatable="yes">_Right column</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -160,7 +162,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0.49000000953674316</property>
- <property name="label" translatable="yes">Create names form</property>
+ <property name="label" translatable="yes">Create names from</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
</child>
</object>
diff --git a/sc/uiconfig/scalc/ui/externaldata.ui b/sc/uiconfig/scalc/ui/externaldata.ui
index a9b8f303182c..3ab0490b50f1 100644
--- a/sc/uiconfig/scalc/ui/externaldata.ui
+++ b/sc/uiconfig/scalc/ui/externaldata.ui
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
<object class="GtkAdjustment" id="adjustment1">
<property name="lower">1</property>
<property name="upper">99999</property>
@@ -111,6 +112,12 @@
<property name="tooltip_text" translatable="yes">Enter the URL of the source document in the local file system or Internet here.</property>
<property name="hexpand">True</property>
<property name="has_entry">True</property>
+ <property name="max_width_chars">48</property>
+ <child internal-child="entry">
+ <object class="GtkEntry" id="URLBox-entry2">
+ <property name="can_focus">False</property>
+ </object>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -189,6 +196,8 @@
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="ranges">
@@ -196,6 +205,9 @@
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection1"/>
+ </child>
</object>
</child>
</object>