Kaydet (Commit) c6f4f70b authored tarafından Palenik Mihály's avatar Palenik Mihály Kaydeden (comit) David Tardon

Convert RID_SVXDLG_ASSIGNCOMPONENT to .ui

Change-Id: Id38ee64e22684905c1a0809d3649e54e893580e1
Reviewed-on: https://gerrit.libreoffice.org/10710Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst 0059f083
......@@ -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 \
......
......@@ -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()
......
/* -*- 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: */
......@@ -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
{
......
......@@ -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;
......
......@@ -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)
......
<?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>
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