diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-11-06 10:38:41 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-11-06 11:46:04 +0000 |
commit | fbdc77fea91e6003e2c3438e326e454afd5c0f92 (patch) | |
tree | 9e1561646d53a5fd63d666be9429506d0a89044e /sd | |
parent | 9b6b03542df7f6b0feecf60a13bab7e885ef3587 (diff) |
convert insert slides dialog to .ui
Change-Id: I4285ccfb9609305b2e92fec6c3f79b5277016f8b
Diffstat (limited to 'sd')
-rw-r--r-- | sd/AllLangResTarget_sd.mk | 1 | ||||
-rw-r--r-- | sd/UIConfig_simpress.mk | 1 | ||||
-rw-r--r-- | sd/source/ui/dlg/ins_paste.cxx | 34 | ||||
-rw-r--r-- | sd/source/ui/dlg/ins_paste.src | 75 | ||||
-rw-r--r-- | sd/source/ui/inc/ins_paste.hrc | 30 | ||||
-rw-r--r-- | sd/source/ui/inc/ins_paste.hxx | 16 | ||||
-rw-r--r-- | sd/uiconfig/simpress/ui/insertslides.ui | 157 |
7 files changed, 170 insertions, 144 deletions
diff --git a/sd/AllLangResTarget_sd.mk b/sd/AllLangResTarget_sd.mk index d2f85adbda78..2e311ef1c00f 100644 --- a/sd/AllLangResTarget_sd.mk +++ b/sd/AllLangResTarget_sd.mk @@ -47,7 +47,6 @@ $(eval $(call gb_SrsTarget_add_files,sd/res,\ sd/source/ui/dlg/dlgfield.src \ sd/source/ui/dlg/dlgolbul.src \ sd/source/ui/dlg/inspagob.src \ - sd/source/ui/dlg/ins_paste.src \ sd/source/ui/dlg/LayerDialog.src \ sd/source/ui/dlg/morphdlg.src \ sd/source/ui/dlg/navigatr.src \ diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk index e13f035de9f2..f6a12f8700e7 100644 --- a/sd/UIConfig_simpress.mk +++ b/sd/UIConfig_simpress.mk @@ -82,6 +82,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\ sd/uiconfig/simpress/ui/dlgfield \ sd/uiconfig/simpress/ui/headerfooterdialog \ sd/uiconfig/simpress/ui/headerfootertab \ + sd/uiconfig/simpress/ui/insertslides \ sd/uiconfig/simpress/ui/masterlayoutdlg \ sd/uiconfig/simpress/ui/optimpressgeneralpage \ sd/uiconfig/simpress/ui/photoalbum \ diff --git a/sd/source/ui/dlg/ins_paste.cxx b/sd/source/ui/dlg/ins_paste.cxx index f99322db8a67..109fb757ebf3 100644 --- a/sd/source/ui/dlg/ins_paste.cxx +++ b/sd/source/ui/dlg/ins_paste.cxx @@ -17,38 +17,20 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -#include "ins_paste.hrc" #include "ins_paste.hxx" -// -------------------- -// - SdInsertPasteDlg - -// -------------------- - -SdInsertPasteDlg::SdInsertPasteDlg( Window* pWindow ) : - ModalDialog( pWindow, SdResId( DLG_INSERT_PASTE ) ), - aFlPosition( this, SdResId( FL_POSITION ) ), - aRbBefore( this, SdResId( RB_BEFORE ) ), - aRbAfter( this, SdResId( RB_AFTER ) ), - aBtnOK( this, SdResId( BTN_OK ) ), - aBtnCancel( this, SdResId( BTN_CANCEL ) ), - aBtnHelp( this, SdResId( BTN_HELP ) ) +SdInsertPasteDlg::SdInsertPasteDlg(Window* pWindow) + : ModalDialog( pWindow, "InsertSlidesDialog", + "modules/simpress/ui/insertslides.ui") { - FreeResource(); - aRbAfter.Check( sal_True ); + get(m_pRbBefore, "before"); + get(m_pRbAfter, "after"); + m_pRbAfter->Check( sal_True ); } -// ----------------------------------------------------------------------------- - -SdInsertPasteDlg::~SdInsertPasteDlg() -{ -} - -// ----------------------------------------------------------------------------- - -sal_Bool SdInsertPasteDlg::IsInsertBefore() const +bool SdInsertPasteDlg::IsInsertBefore() const { - return( aRbBefore.IsChecked() ); + return( m_pRbBefore->IsChecked() ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/dlg/ins_paste.src b/sd/source/ui/dlg/ins_paste.src deleted file mode 100644 index 0e03e519728a..000000000000 --- a/sd/source/ui/dlg/ins_paste.src +++ /dev/null @@ -1,75 +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 "ins_paste.hrc" - -ModalDialog DLG_INSERT_PASTE -{ - HelpID = "sd:ModalDialog:DLG_INSERT_PASTE"; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 148 , 90 ) ; - Moveable = TRUE ; - OKButton BTN_OK - { - Pos = MAP_APPFONT ( 92 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 92 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT ( 92 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - - FixedLine FL_POSITION - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 80 , 8 ) ; - Text [ en-US ] = "Position"; - }; - RadioButton RB_BEFORE - { - HelpID = "sd:RadioButton:DLG_INSERT_PASTE:RB_BEFORE"; - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 80, 10 ) ; - Text [ en-US ] = "~Before" ; - TabStop = TRUE ; - }; - RadioButton RB_AFTER - { - HelpID = "sd:RadioButton:DLG_INSERT_PASTE:RB_AFTER"; - Pos = MAP_APPFONT ( 12, 27 ) ; - Size = MAP_APPFONT ( 80, 10 ) ; - Text [ en-US ] = "A~fter" ; - TabStop = TRUE ; - Check = TRUE ; - }; - Text [ en-US ] = "Insert Slides"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/ins_paste.hrc b/sd/source/ui/inc/ins_paste.hrc deleted file mode 100644 index 94ef7df58a6b..000000000000 --- a/sd/source/ui/inc/ins_paste.hrc +++ /dev/null @@ -1,30 +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 . - */ - -#define DLG_INSERT_PASTE 678 - -#define BTN_OK 1 -#define BTN_CANCEL 1 -#define BTN_HELP 1 - -#define FL_POSITION 1 -#define RB_BEFORE 1 -#define RB_AFTER 2 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/ins_paste.hxx b/sd/source/ui/inc/ins_paste.hxx index d504e2734c10..bfbc62d2491d 100644 --- a/sd/source/ui/inc/ins_paste.hxx +++ b/sd/source/ui/inc/ins_paste.hxx @@ -34,20 +34,12 @@ class SD_DLLPUBLIC SdInsertPasteDlg : public ModalDialog { private: - - FixedLine aFlPosition; - RadioButton aRbBefore; - RadioButton aRbAfter; - OKButton aBtnOK; - CancelButton aBtnCancel; - HelpButton aBtnHelp; + RadioButton* m_pRbBefore; + RadioButton* m_pRbAfter; public: - - SdInsertPasteDlg( Window* pWindow ); - ~SdInsertPasteDlg(); - - sal_Bool IsInsertBefore() const; + SdInsertPasteDlg( Window* pWindow ); + bool IsInsertBefore() const; }; #endif // INCLUDED_SD_SOURCE_UI_INC_INS_PASTE_HXX diff --git a/sd/uiconfig/simpress/ui/insertslides.ui b/sd/uiconfig/simpress/ui/insertslides.ui new file mode 100644 index 000000000000..439718f75653 --- /dev/null +++ b/sd/uiconfig/simpress/ui/insertslides.ui @@ -0,0 +1,157 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="InsertSlidesDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Insert Slides</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 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="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="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</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="GtkFrame" id="action"> + <property name="visible">True</property> + <property name="can_focus">False</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="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkRadioButton" id="before"> + <property name="label" translatable="yes">_Before</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="hexpand">True</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="group">after</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="after"> + <property name="label" translatable="yes">A_fter</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="hexpand">True</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="group">before</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">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="yalign">0.55000001192092896</property> + <property name="xpad">1</property> + <property name="label" translatable="yes">Position</property> + <property name="justify">center</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </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> |