summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-12-16 12:57:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-12-16 12:59:20 +0000
commit1bb4a66904509faf1954a87e95c7299f5f502580 (patch)
treed5760f577d425e2d218c459105382fb615278372
parent3b5c3d5a6cbbfd3ecbf30012b834bfca9b3953c2 (diff)
convert goto record dialog to .ui
Change-Id: I2bc2c5837556da73cc60e0e5b906ddb4f01844d9
-rw-r--r--cui/AllLangResTarget_cui.mk1
-rw-r--r--cui/UIConfig_cui.mk1
-rw-r--r--cui/source/dialogs/cuitbxform.cxx21
-rw-r--r--cui/source/dialogs/fmsearch.hrc1
-rw-r--r--cui/source/dialogs/tbxform.src60
-rw-r--r--cui/source/inc/cuitbxform.hxx14
-rw-r--r--cui/uiconfig/ui/recordnumberdialog.ui105
7 files changed, 117 insertions, 86 deletions
diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk
index 15966db855d4..3265c7e2fb8e 100644
--- a/cui/AllLangResTarget_cui.mk
+++ b/cui/AllLangResTarget_cui.mk
@@ -43,7 +43,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/dialogs/showcols.src \
cui/source/dialogs/srchxtra.src \
cui/source/dialogs/svuidlg.src \
- cui/source/dialogs/tbxform.src \
cui/source/options/certpath.src \
cui/source/options/connpooloptions.src \
cui/source/options/dbregister.src \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index c540b0ea2c90..d90ef3231f8b 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -118,6 +118,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/querynoloadedfiledialog \
cui/uiconfig/ui/querynosavefiledialog \
cui/uiconfig/ui/querysavelistdialog \
+ cui/uiconfig/ui/recordnumberdialog \
cui/uiconfig/ui/rotationtabpage \
cui/uiconfig/ui/scriptorganizer \
cui/uiconfig/ui/securityoptionsdialog \
diff --git a/cui/source/dialogs/cuitbxform.cxx b/cui/source/dialogs/cuitbxform.cxx
index 263102da1a3c..3c1f7cfd6bf9 100644
--- a/cui/source/dialogs/cuitbxform.cxx
+++ b/cui/source/dialogs/cuitbxform.cxx
@@ -30,25 +30,16 @@
#include "cuitbxform.hxx"
#include <sfx2/viewfrm.hxx>
#include <sfx2/viewsh.hxx>
-#include "fmsearch.hrc"
-
-//========================================================================
-// class FmInputRecordNoDialog
-//========================================================================
FmInputRecordNoDialog::FmInputRecordNoDialog(Window * pParent)
- :ModalDialog( pParent, CUI_RES(RID_SVX_DLG_INPUTRECORDNO))
- ,m_aLabel(this, CUI_RES(1))
- ,m_aRecordNo(this, CUI_RES(1))
- ,m_aOk(this, CUI_RES(1))
- ,m_aCancel(this, CUI_RES(1))
+ : ModalDialog( pParent, "RecordNumberDialog", "cui/ui/recordnumberdialog.ui")
{
- m_aRecordNo.SetMin(1);
- m_aRecordNo.SetMax(0x7FFFFFFF);
- m_aRecordNo.SetStrictFormat(sal_True);
- m_aRecordNo.SetDecimalDigits(0);
+ get(m_pRecordNo, "entry-nospin");
- FreeResource();
+ m_pRecordNo->SetMin(1);
+ m_pRecordNo->SetMax(0x7FFFFFFF);
+ m_pRecordNo->SetStrictFormat(sal_True);
+ m_pRecordNo->SetDecimalDigits(0);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/dialogs/fmsearch.hrc b/cui/source/dialogs/fmsearch.hrc
index a58ecb80dc2f..3b65fdb85225 100644
--- a/cui/source/dialogs/fmsearch.hrc
+++ b/cui/source/dialogs/fmsearch.hrc
@@ -21,7 +21,6 @@
#include "svl/solar.hrc"
-#define RID_SVX_DLG_INPUTRECORDNO (RID_FORMS_START + 10)
#define RID_SVX_DLG_SHOWGRIDCOLUMNS (RID_FORMS_START + 11)
#define RID_SVXDLG_SEARCHFORM (RID_FORMS_START + 7)
#define RID_STR_SEARCH_ANYWHERE (RID_FORMS_START + 85)
diff --git a/cui/source/dialogs/tbxform.src b/cui/source/dialogs/tbxform.src
deleted file mode 100644
index 5b6fc4a2628c..000000000000
--- a/cui/source/dialogs/tbxform.src
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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 "fmsearch.hrc"
-
-ModalDialog RID_SVX_DLG_INPUTRECORDNO
-{
- HelpID = "cui:ModalDialog:RID_SVX_DLG_INPUTRECORDNO";
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 130 , 45 ) ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Text [ en-US ] = "Record Number";
-
- FixedText 1
- {
- Pos = MAP_APPFONT ( 6 , 6 ) ;
- Size = MAP_APPFONT ( 70 , 12 ) ;
- Text [ en-US ] = "go to record";
- };
- NumericField 1
- {
- HelpID = "cui:NumericField:RID_SVX_DLG_INPUTRECORDNO:1";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 79 , 6 ) ;
- Size = MAP_APPFONT ( 45 , 12 ) ;
- TabStop = TRUE ;
- };
- OKButton 1
- {
- Pos = MAP_APPFONT ( 6 , 25 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton 1
- {
- Pos = MAP_APPFONT ( 74 , 25 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cuitbxform.hxx b/cui/source/inc/cuitbxform.hxx
index 044285bc030a..389690df409d 100644
--- a/cui/source/inc/cuitbxform.hxx
+++ b/cui/source/inc/cuitbxform.hxx
@@ -20,26 +20,22 @@
#define INCLUDED_CUI_SOURCE_INC_CUITBXFORM_HXX
#include <sfx2/tbxctrl.hxx>
-#include <vcl/field.hxx>
-#include <vcl/dialog.hxx>
-
#include <vcl/button.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/field.hxx>
//========================================================================
class FmInputRecordNoDialog : public ModalDialog
{
public:
- FixedText m_aLabel;
- NumericField m_aRecordNo;
- OKButton m_aOk;
- CancelButton m_aCancel;
+ NumericField* m_pRecordNo;
public:
FmInputRecordNoDialog(Window * pParent);
- void SetValue(long dNew) { m_aRecordNo.SetValue(dNew); }
- long GetValue() const { return static_cast<long>(m_aRecordNo.GetValue()); }
+ void SetValue(long dNew) { m_pRecordNo->SetValue(dNew); }
+ long GetValue() const { return static_cast<long>(m_pRecordNo->GetValue()); }
};
#endif
diff --git a/cui/uiconfig/ui/recordnumberdialog.ui b/cui/uiconfig/ui/recordnumberdialog.ui
new file mode 100644
index 000000000000..9f4824b8cea1
--- /dev/null
+++ b/cui/uiconfig/ui/recordnumberdialog.ui
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="RecordNumberDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Record Number</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="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">start</property>
+ <property name="hexpand">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">go to record</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">entry-nospin</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="entry-nospin">
+ <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">0</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</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>
+ </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="GtkButton" id="cancel">
+ <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="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ </action-widgets>
+ </object>
+</interface>