summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2014-07-08 17:25:45 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-07-10 13:17:49 +0000
commite56f9da481629e9e3a382029bdf41ce42531b672 (patch)
tree0dabeb158b9b17a14a133de0539e738cc61ff33d /sfx2
parentd1fc47793c1efbe9ff5271656283211647dd0b33 (diff)
MD_DDE_LINKEDIT conversion to .ui
Change-Id: Id058400bad5a8b100ef5a07060ea1c5013c6e6d6 Reviewed-on: https://gerrit.libreoffice.org/10146 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/AllLangResTarget_sfx2.mk1
-rw-r--r--sfx2/UIConfig_sfx.mk1
-rw-r--r--sfx2/source/appl/app.hrc1
-rw-r--r--sfx2/source/appl/dde.hrc34
-rw-r--r--sfx2/source/appl/dde.src88
-rw-r--r--sfx2/source/appl/impldde.cxx54
-rw-r--r--sfx2/uiconfig/ui/linkeditdialog.ui198
7 files changed, 220 insertions, 157 deletions
diff --git a/sfx2/AllLangResTarget_sfx2.mk b/sfx2/AllLangResTarget_sfx2.mk
index 42e1661ff2c1..9d7b68560e7c 100644
--- a/sfx2/AllLangResTarget_sfx2.mk
+++ b/sfx2/AllLangResTarget_sfx2.mk
@@ -36,7 +36,6 @@ $(eval $(call gb_SrsTarget_set_include,sfx/res,\
$(eval $(call gb_SrsTarget_add_files,sfx/res,\
sfx2/source/appl/app.src \
- sfx2/source/appl/dde.src \
sfx2/source/appl/newhelp.src \
sfx2/source/appl/sfx.src \
sfx2/source/bastyp/fltfnc.src \
diff --git a/sfx2/UIConfig_sfx.mk b/sfx2/UIConfig_sfx.mk
index 489d9b082a8c..310d6e434372 100644
--- a/sfx2/UIConfig_sfx.mk
+++ b/sfx2/UIConfig_sfx.mk
@@ -28,6 +28,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/helpsearchpage \
sfx2/uiconfig/ui/inputdialog \
sfx2/uiconfig/ui/licensedialog \
+ sfx2/uiconfig/ui/linkeditdialog \
sfx2/uiconfig/ui/loadtemplatedialog \
sfx2/uiconfig/ui/managestylepage \
sfx2/uiconfig/ui/newstyle \
diff --git a/sfx2/source/appl/app.hrc b/sfx2/source/appl/app.hrc
index e0c1d1304671..d0fff73c8088 100644
--- a/sfx2/source/appl/app.hrc
+++ b/sfx2/source/appl/app.hrc
@@ -132,7 +132,6 @@
#define RID_SVXSTR_INCORRECT_PASSWORD (RID_SFX_APP_START + 213)
#define RID_SVXSTR_FORWARD_ERRMSSG (RID_SFX_APP_START + 214)
-#define MD_DDE_LINKEDIT (RID_SFX_APP_START + 1)
#endif // #ifndef _SFX_APP_HRC
diff --git a/sfx2/source/appl/dde.hrc b/sfx2/source/appl/dde.hrc
deleted file mode 100644
index c701a9ec293a..000000000000
--- a/sfx2/source/appl/dde.hrc
+++ /dev/null
@@ -1,34 +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 _SFX_DDE_HRC
-#define _SFX_DDE_HRC
-
-#include "app.hrc"
-
-#define ED_DDE_APP 50
-#define ED_DDE_TOPIC 51
-#define ED_DDE_ITEM 52
-#define FT_DDE_APP 53
-#define FT_DDE_TOPIC 54
-#define FT_DDE_ITEM 55
-#define GROUP_DDE_CHG 56
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/dde.src b/sfx2/source/appl/dde.src
deleted file mode 100644
index 41ec5547bcb6..000000000000
--- a/sfx2/source/appl/dde.src
+++ /dev/null
@@ -1,88 +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 "dde.hrc"
-
-ModalDialog MD_DDE_LINKEDIT
-{
- HelpID = "sfx2:ModalDialog:MD_DDE_LINKEDIT";
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 223 , 74 ) ;
- Text [ en-US ] = "Modify Link" ;
- Moveable = TRUE ;
- FixedText FT_DDE_APP
- {
- Pos = MAP_APPFONT ( 12 , 16 ) ;
- Size = MAP_APPFONT ( 40 , 8 ) ;
- Text [ en-US ] = "~Application:" ;
- };
- Edit ED_DDE_APP
- {
- HelpID = "sfx2:Edit:MD_DDE_LINKEDIT:ED_DDE_APP";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 55 , 14 ) ;
- Size = MAP_APPFONT ( 100 , 12 ) ;
- };
- FixedText FT_DDE_TOPIC
- {
- Pos = MAP_APPFONT ( 12 , 34 ) ;
- Size = MAP_APPFONT ( 40 , 8 ) ;
- Text [ en-US ] = "~File:" ;
- };
- Edit ED_DDE_TOPIC
- {
- HelpID = "sfx2:Edit:MD_DDE_LINKEDIT:ED_DDE_TOPIC";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 55 , 32 ) ;
- Size = MAP_APPFONT ( 100 , 12 ) ;
- };
- FixedText FT_DDE_ITEM
- {
- Pos = MAP_APPFONT ( 12 , 52 ) ;
- Size = MAP_APPFONT ( 40 , 8 ) ;
- Text [ en-US ] = "~Category:" ;
- };
- Edit ED_DDE_ITEM
- {
- HelpID = "sfx2:Edit:MD_DDE_LINKEDIT:ED_DDE_ITEM";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 55 , 50 ) ;
- Size = MAP_APPFONT ( 100 , 12 ) ;
- };
- FixedLine GROUP_DDE_CHG
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 155 , 8 ) ;
- Text [ en-US ] = "Modify link" ;
- };
- OKButton 1
- {
- Pos = MAP_APPFONT ( 167 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- DefButton = TRUE ;
- };
- CancelButton 1
- {
- Pos = MAP_APPFONT ( 167 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 7ec637a825ca..1035241223b2 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -35,7 +35,6 @@
#include <rtl/strbuf.hxx>
#include <rtl/ustring.hxx>
-#include "dde.hrc"
#include <sfx2/lnkbase.hxx>
#include <sfx2/linkmgr.hxx>
#include <sfx2/sfxresid.hxx>
@@ -58,15 +57,10 @@ namespace sfx2
class SvDDELinkEditDialog : public ModalDialog
{
- FixedText aFtDdeApp;
- Edit aEdDdeApp;
- FixedText aFtDdeTopic;
- Edit aEdDdeTopic;
- FixedText aFtDdeItem;
- Edit aEdDdeItem;
- FixedLine aGroupDdeChg;
- OKButton aOKButton1;
- CancelButton aCancelButton1;
+ Edit *m_pEdDdeApp;
+ Edit *m_pEdDdeTopic;
+ Edit *m_pEdDdeItem;
+ OKButton *m_pOKButton;
DECL_STATIC_LINK( SvDDELinkEditDialog, EditHdl_Impl, Edit* );
public:
@@ -75,46 +69,40 @@ public:
};
SvDDELinkEditDialog::SvDDELinkEditDialog( Window* pParent, SvBaseLink* pLink )
- : ModalDialog( pParent, SfxResId( MD_DDE_LINKEDIT ) ),
- aFtDdeApp( this, SfxResId( FT_DDE_APP ) ),
- aEdDdeApp( this, SfxResId( ED_DDE_APP ) ),
- aFtDdeTopic( this, SfxResId( FT_DDE_TOPIC ) ),
- aEdDdeTopic( this, SfxResId( ED_DDE_TOPIC ) ),
- aFtDdeItem( this, SfxResId( FT_DDE_ITEM ) ),
- aEdDdeItem( this, SfxResId( ED_DDE_ITEM ) ),
- aGroupDdeChg( this, SfxResId( GROUP_DDE_CHG ) ),
- aOKButton1( this, SfxResId( 1 ) ),
- aCancelButton1( this, SfxResId( 1 ) )
+ : ModalDialog( pParent, "LinkEditDialog", "sfx/ui/linkeditdialog.ui" )
{
- FreeResource();
+ get(m_pOKButton, "ok");
+ get(m_pEdDdeApp, "app");
+ get(m_pEdDdeTopic, "file");
+ get(m_pEdDdeItem, "category");
OUString sServer, sTopic, sItem;
pLink->GetLinkManager()->GetDisplayNames( pLink, &sServer, &sTopic, &sItem );
- aEdDdeApp.SetText( sServer );
- aEdDdeTopic.SetText( sTopic );
- aEdDdeItem.SetText( sItem );
+ m_pEdDdeApp->SetText( sServer );
+ m_pEdDdeTopic->SetText( sTopic );
+ m_pEdDdeItem->SetText( sItem );
- aEdDdeApp.SetModifyHdl( STATIC_LINK( this, SvDDELinkEditDialog, EditHdl_Impl));
- aEdDdeTopic.SetModifyHdl( STATIC_LINK( this, SvDDELinkEditDialog, EditHdl_Impl));
- aEdDdeItem.SetModifyHdl( STATIC_LINK( this, SvDDELinkEditDialog, EditHdl_Impl));
+ m_pEdDdeApp->SetModifyHdl( STATIC_LINK( this, SvDDELinkEditDialog, EditHdl_Impl));
+ m_pEdDdeTopic->SetModifyHdl( STATIC_LINK( this, SvDDELinkEditDialog, EditHdl_Impl));
+ m_pEdDdeItem->SetModifyHdl( STATIC_LINK( this, SvDDELinkEditDialog, EditHdl_Impl));
- aOKButton1.Enable( !sServer.isEmpty() && !sTopic.isEmpty() && !sItem.isEmpty() );
+ m_pOKButton->Enable( !sServer.isEmpty() && !sTopic.isEmpty() && !sItem.isEmpty() );
}
OUString SvDDELinkEditDialog::GetCmd() const
{
- OUString sCmd( aEdDdeApp.GetText() ), sRet;
- ::sfx2::MakeLnkName( sRet, &sCmd, aEdDdeTopic.GetText(), aEdDdeItem.GetText() );
+ OUString sCmd( m_pEdDdeApp->GetText() ), sRet;
+ ::sfx2::MakeLnkName( sRet, &sCmd, m_pEdDdeTopic->GetText(), m_pEdDdeItem->GetText() );
return sRet;
}
IMPL_STATIC_LINK( SvDDELinkEditDialog, EditHdl_Impl, Edit *, pEdit )
{
(void)pEdit; // unused variable
- pThis->aOKButton1.Enable( !pThis->aEdDdeApp.GetText().isEmpty() &&
- !pThis->aEdDdeTopic.GetText().isEmpty() &&
- !pThis->aEdDdeItem.GetText().isEmpty() );
+ pThis->m_pOKButton->Enable( !pThis->m_pEdDdeApp->GetText().isEmpty() &&
+ !pThis->m_pEdDdeTopic->GetText().isEmpty() &&
+ !pThis->m_pEdDdeItem->GetText().isEmpty() );
return 0;
}
diff --git a/sfx2/uiconfig/ui/linkeditdialog.ui b/sfx2/uiconfig/ui/linkeditdialog.ui
new file mode 100644
index 000000000000..d973c62e7f01
--- /dev/null
+++ b/sfx2/uiconfig/ui/linkeditdialog.ui
@@ -0,0 +1,198 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkDialog" id="LinkEditDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</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">6</property>
+ <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="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">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>
+ </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="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</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="hexpand">True</property>
+ <property name="vexpand">True</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="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">_Application:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">app</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="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">_File:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">file</property>
+ </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>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">_Category:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">category</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="GtkEntry" id="app">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">•</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>
+ <child>
+ <object class="GtkEntry" id="file">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">•</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="category">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">•</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</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">Modify Link</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </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">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ </action-widgets>
+ </object>
+</interface>