summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPalenik Mihály <palenik.mihaly@gmail.com>2014-08-03 15:55:33 +0200
committerDavid Tardon <dtardon@redhat.com>2014-08-04 10:41:22 +0000
commitc6f4f70b24eaddbedf8bb463dfc4bd225f3c7f86 (patch)
treec483fc80fb097dcf5f670c2239927a3279a3758f
parent0059f083e511bb6c7113ad62a72abf3d7618f9e1 (diff)
Convert RID_SVXDLG_ASSIGNCOMPONENT to .ui
Change-Id: Id38ee64e22684905c1a0809d3649e54e893580e1 Reviewed-on: https://gerrit.libreoffice.org/10710 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
-rw-r--r--cui/UIConfig_cui.mk1
-rw-r--r--cui/source/customize/macropg.cxx17
-rw-r--r--cui/source/customize/macropg.hrc54
-rw-r--r--cui/source/customize/macropg.src47
-rw-r--r--cui/source/customize/macropg_impl.hxx7
-rw-r--r--cui/source/inc/cuires.hrc1
-rw-r--r--cui/uiconfig/ui/assigncomponentdialog.ui124
7 files changed, 133 insertions, 118 deletions
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index dbd98d091b0e..c806bfc01081 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/areadialog \
cui/uiconfig/ui/areatabpage \
cui/uiconfig/ui/asiantypography \
+ cui/uiconfig/ui/assigncomponentdialog \
cui/uiconfig/ui/autocorrectdialog \
cui/uiconfig/ui/backgroundpage \
cui/uiconfig/ui/baselinksdialog \
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 8ab8d2b092f6..fcb3af8f2221 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -35,7 +35,6 @@
#include <dialmgr.hxx>
#include "selector.hxx"
#include "cfg.hxx"
-#include "macropg.hrc"
#include "helpid.hrc"
#include <cuires.hrc>
#include "headertablistbox.hxx"
@@ -847,7 +846,7 @@ SvxMacroAssignDlg::SvxMacroAssignDlg( Window* pParent, const Reference< frame::X
IMPL_LINK_NOARG(AssignComponentDialog, ButtonHandler)
{
- OUString aMethodName = maMethodEdit.GetText();
+ OUString aMethodName = mpMethodEdit->GetText();
maURL = "";
if( !aMethodName.isEmpty() )
{
@@ -859,16 +858,12 @@ IMPL_LINK_NOARG(AssignComponentDialog, ButtonHandler)
}
AssignComponentDialog::AssignComponentDialog( Window * pParent, const OUString& rURL )
- : ModalDialog( pParent, CUI_RES( RID_SVXDLG_ASSIGNCOMPONENT ) )
- , maMethodLabel( this, CUI_RES( FT_METHOD ) )
- , maMethodEdit( this, CUI_RES( EDIT_METHOD ) )
- , maOKButton( this, CUI_RES( RID_PB_OK ) )
- , maCancelButton( this, CUI_RES( RID_PB_CANCEL ) )
- , maHelpButton( this, CUI_RES( RID_PB_HELP ) )
+ : ModalDialog( pParent, "AssignComponent", "cui/ui/assigncomponentdialog.ui" )
, maURL( rURL )
{
- FreeResource();
- maOKButton.SetClickHdl(LINK(this, AssignComponentDialog, ButtonHandler));
+ get(mpMethodEdit, "methodEntry");
+ get(mpOKButton, "ok");
+ mpOKButton->SetClickHdl(LINK(this, AssignComponentDialog, ButtonHandler));
OUString aMethodName;
if( maURL.startsWith( aVndSunStarUNO ) )
@@ -876,7 +871,7 @@ AssignComponentDialog::AssignComponentDialog( Window * pParent, const OUString&
sal_Int32 nBegin = aVndSunStarUNO.getLength();
aMethodName = maURL.copy( nBegin );
}
- maMethodEdit.SetText( aMethodName, Selection( 0, SELECTION_MAX ) );
+ mpMethodEdit->SetText( aMethodName, Selection( 0, SELECTION_MAX ) );
}
AssignComponentDialog::~AssignComponentDialog()
diff --git a/cui/source/customize/macropg.hrc b/cui/source/customize/macropg.hrc
deleted file mode 100644
index 5101a038f7cd..000000000000
--- a/cui/source/customize/macropg.hrc
+++ /dev/null
@@ -1,54 +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 .
- */
-
-#ifndef _MACROPG_HRC
-#define _MACROPG_HRC
-
-#include <svtools/controldims.hrc>
-
-#define LB_EVENT 1
-#define PB_DELETE 3
-#define STR_EVENT 4
-#define STR_ASSMACRO 5
-#define FT_ASSIGN 6
-#define PB_ASSIGN_COMPONENT 7
-
-#define IMG_MACRO 30
-#define IMG_COMPONENT 31
-
-#define RID_PB_OK 41
-#define RID_PB_CANCEL 42
-#define RID_PB_HELP 43
-#define FT_METHOD 44
-#define EDIT_METHOD 45
-
-#define COMP_EDIT_WIDTH 100
-#define COMP_DIST_Y 6
-#define COMP_WIDTH (COMP_EDIT_WIDTH+RSC_CD_PUSHBUTTON_WIDTH+3*COMP_DIST_Y)
-#define COMP_COL0 COMP_DIST_Y
-#define COMP_COL1 (COMP_COL0+COMP_EDIT_WIDTH+COMP_DIST_Y)
-#define COMP_ROW0 6
-#define COMP_ROW1 (COMP_ROW0+RSC_CD_PUSHBUTTON_HEIGHT+RSC_SP_CTRL_GROUP_Y)
-#define COMP_ROW2 (COMP_ROW1+RSC_CD_PUSHBUTTON_HEIGHT+2*RSC_SP_CTRL_GROUP_Y)
-#define COMP_ROWEDIT (COMP_ROW0+RSC_CD_FIXEDTEXT_HEIGHT+2)
-#define COMP_HEIGHT (COMP_ROW2+RSC_CD_PUSHBUTTON_HEIGHT+2*RSC_SP_CTRL_GROUP_Y)
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/customize/macropg.src b/cui/source/customize/macropg.src
index 3c9c4944790a..c4cc3675ea56 100644
--- a/cui/source/customize/macropg.src
+++ b/cui/source/customize/macropg.src
@@ -18,57 +18,10 @@
*/
#include <sfx2/sfx.hrc>
-#include "macropg.hrc"
#include <cuires.hrc>
#include "helpid.hrc"
#include <svx/dialogs.hrc>
-#define MASKCOLOR MaskColor = \
- Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
-
-ModalDialog RID_SVXDLG_ASSIGNCOMPONENT
-{
- HelpID = "cui:ModalDialog:RID_SVXDLG_ASSIGNCOMPONENT";
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( COMP_WIDTH , COMP_HEIGHT ) ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Text [ en-US ] = "Assign Component";
- OKButton RID_PB_OK
- {
- Pos = MAP_APPFONT ( COMP_COL1 , COMP_ROW0 ) ;
- Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton RID_PB_CANCEL
- {
- Pos = MAP_APPFONT ( COMP_COL1 , COMP_ROW1 ) ;
- Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
- TabStop = TRUE ;
- };
- HelpButton RID_PB_HELP
- {
- Pos = MAP_APPFONT ( COMP_COL1 , COMP_ROW2 ) ;
- Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
- };
- FixedText FT_METHOD
- {
- Pos = MAP_APPFONT ( COMP_COL0 , COMP_ROW0 ) ;
- Size = MAP_APPFONT ( COMP_EDIT_WIDTH , RSC_CD_FIXEDTEXT_HEIGHT ) ;
- Text [ en-US ] = "Component method name" ;
- };
- Edit EDIT_METHOD
- {
- HelpID = "cui:Edit:RID_SVXDLG_ASSIGNCOMPONENT:EDIT_METHOD";
- Border = TRUE ;
- Pos = MAP_APPFONT ( COMP_COL0 , COMP_ROWEDIT ) ;
- Size = MAP_APPFONT ( COMP_EDIT_WIDTH , RSC_CD_TEXTBOX_HEIGHT ) ;
- TabStop = TRUE ;
- };
-};
-
//DF
String RID_SVXSTR_EVENT_STARTAPP
{
diff --git a/cui/source/customize/macropg_impl.hxx b/cui/source/customize/macropg_impl.hxx
index 907bdfdf06af..4f8e824db0b3 100644
--- a/cui/source/customize/macropg_impl.hxx
+++ b/cui/source/customize/macropg_impl.hxx
@@ -40,11 +40,8 @@ public:
class AssignComponentDialog : public ModalDialog
{
private:
- FixedText maMethodLabel;
- Edit maMethodEdit;
- OKButton maOKButton;
- CancelButton maCancelButton;
- HelpButton maHelpButton;
+ Edit* mpMethodEdit;
+ OKButton* mpOKButton;
OUString maURL;
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index 1c6280d8d1e8..176e7fd594e2 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -259,7 +259,6 @@
#define RID_SVXDLG_CUSTOMIZE (RID_SVX_START + 291)
#define RID_SVXPAGE_TOOLBARS (RID_SVX_START + 294)
#define RID_SVXPAGE_CONFIGGROUPBOX (RID_SVX_START + 304)
-#define RID_SVXDLG_ASSIGNCOMPONENT (RID_SVX_START + 297)
#define RID_SVXSTR_NEW_MENU (RID_SVX_START + 1039)
#define RID_SVXSTR_NEW_TOOLBAR (RID_SVX_START + 1040)
diff --git a/cui/uiconfig/ui/assigncomponentdialog.ui b/cui/uiconfig/ui/assigncomponentdialog.ui
new file mode 100644
index 000000000000..48b777d0e264
--- /dev/null
+++ b/cui/uiconfig/ui/assigncomponentdialog.ui
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="AssignComponent">
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Assign Component</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="hexpand">True</property>
+ <property name="vexpand">True</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="use_action_appearance">False</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="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="use_action_appearance">False</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="help">
+ <property name="label">gtk-help</property>
+ <property name="use_action_appearance">False</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="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">Component method name</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="methodEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</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">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ <action-widget response="0">help</action-widget>
+ </action-widgets>
+ </object>
+</interface>