diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-12-16 13:20:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-16 13:24:36 +0000 |
commit | 1913d534d25c848555e9ff6c4827dee1656d846b (patch) | |
tree | 421e6eca7ad9d9c02431e265caed853d406c0281 /extensions | |
parent | 1bb4a66904509faf1954a87e95c7299f5f502580 (diff) |
convert control font dialog to .ui
Change-Id: I44f6f587dffe047d4aef7e32233bafe54a77cb6d
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/AllLangResTarget_pcr.mk | 1 | ||||
-rw-r--r-- | extensions/UIConfig_spropctrlr.mk | 1 | ||||
-rw-r--r-- | extensions/source/propctrlr/fontdialog.cxx | 13 | ||||
-rw-r--r-- | extensions/source/propctrlr/fontdialog.hxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/fontdialog.src | 50 | ||||
-rw-r--r-- | extensions/source/propctrlr/formlocalid.hrc | 3 | ||||
-rw-r--r-- | extensions/source/propctrlr/formresid.hrc | 5 | ||||
-rw-r--r-- | extensions/uiconfig/spropctrlr/ui/controlfontdialog.ui | 133 |
8 files changed, 143 insertions, 65 deletions
diff --git a/extensions/AllLangResTarget_pcr.mk b/extensions/AllLangResTarget_pcr.mk index 415cb5538e38..30ff2530500c 100644 --- a/extensions/AllLangResTarget_pcr.mk +++ b/extensions/AllLangResTarget_pcr.mk @@ -28,7 +28,6 @@ $(eval $(call gb_SrsTarget_add_files,pcr/res,\ extensions/source/propctrlr/propres.src \ extensions/source/propctrlr/formres.src \ extensions/source/propctrlr/pcrmiscres.src \ - extensions/source/propctrlr/fontdialog.src \ extensions/source/propctrlr/selectlabeldialog.src \ extensions/source/propctrlr/formlinkdialog.src \ extensions/source/propctrlr/listselectiondlg.src \ diff --git a/extensions/UIConfig_spropctrlr.mk b/extensions/UIConfig_spropctrlr.mk index faf134ae19ae..318666867459 100644 --- a/extensions/UIConfig_spropctrlr.mk +++ b/extensions/UIConfig_spropctrlr.mk @@ -10,6 +10,7 @@ $(eval $(call gb_UIConfig_UIConfig,modules/spropctrlr)) $(eval $(call gb_UIConfig_add_uifiles,modules/spropctrlr,\ + extensions/uiconfig/spropctrlr/ui/controlfontdialog \ extensions/uiconfig/spropctrlr/ui/taborder \ )) diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index 6d3e38c4cdf5..aafe50d5789c 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -170,13 +170,14 @@ namespace pcr //======================================================================== //------------------------------------------------------------------------ ControlCharacterDialog::ControlCharacterDialog(Window* _pParent, const SfxItemSet& _rCoreSet) - :SfxTabDialog(_pParent, PcrRes(RID_TABDLG_FONTDIALOG), &_rCoreSet) + : SfxTabDialog(_pParent, "ControlFontDialog", + "modules/spropctrlr/ui/controlfontdialog.ui", &_rCoreSet) + , m_nCharsId(0) { - FreeResource(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - DBG_ASSERT(pFact, "CreateFactory fail!"); - AddTabPage(TABPAGE_CHARACTERS, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_NAME), 0 ); - AddTabPage(TABPAGE_CHARACTERS_EXT, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_EFFECTS), 0 ); + assert(pFact); //CreateFactory fail! + m_nCharsId = AddTabPage("font", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_NAME), 0 ); + AddTabPage("fonteffects", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_CHAR_EFFECTS), 0 ); } //------------------------------------------------------------------------ @@ -583,7 +584,7 @@ namespace pcr void ControlCharacterDialog::PageCreated( sal_uInt16 _nId, SfxTabPage& _rPage ) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - if ( _nId == TABPAGE_CHARACTERS ) { + if ( _nId == m_nCharsId ) { aSet.Put (SvxFontListItem(static_cast<const SvxFontListItem&>(GetInputSetImpl()->Get(CFID_FONTLIST)))); aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_HIDE_LANGUAGE)); _rPage.PageCreated(aSet); diff --git a/extensions/source/propctrlr/fontdialog.hxx b/extensions/source/propctrlr/fontdialog.hxx index ae288235c73b..485c573192ed 100644 --- a/extensions/source/propctrlr/fontdialog.hxx +++ b/extensions/source/propctrlr/fontdialog.hxx @@ -63,6 +63,8 @@ namespace pcr protected: virtual void PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage); + private: + sal_uInt16 m_nCharsId; }; //............................................................................ } // namespace pcr diff --git a/extensions/source/propctrlr/fontdialog.src b/extensions/source/propctrlr/fontdialog.src deleted file mode 100644 index ec30df843738..000000000000 --- a/extensions/source/propctrlr/fontdialog.src +++ /dev/null @@ -1,50 +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 "formresid.hrc" -#include "formlocalid.hrc" - -TabDialog RID_TABDLG_FONTDIALOG -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Text [ en-US ] = "Character" ; - Moveable = TRUE ; - TabControl 1 - { - OutputSize = TRUE ; - PageList = - { - PageItem - { - Identifier = TABPAGE_CHARACTERS ; - PageResID = TABPAGE_CHARACTERS ; - Text [ en-US ] = "Font" ; - }; - PageItem - { - Identifier = TABPAGE_CHARACTERS_EXT ; - PageResID = TABPAGE_CHARACTERS_EXT ; - Text [ en-US ] = "Font Effects" ; - }; - }; - }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/propctrlr/formlocalid.hrc b/extensions/source/propctrlr/formlocalid.hrc index 7b97aaf1a63e..603faa770617 100644 --- a/extensions/source/propctrlr/formlocalid.hrc +++ b/extensions/source/propctrlr/formlocalid.hrc @@ -20,9 +20,6 @@ #ifndef _EXTENSIONS_PROPCTRLR_FORMLOCALID_HRC_ #define _EXTENSIONS_PROPCTRLR_FORMLOCALID_HRC_ -#define TABPAGE_CHARACTERS 1 -#define TABPAGE_CHARACTERS_EXT 2 - #define IMG_PLUS 1 #define IMG_MINUS 2 diff --git a/extensions/source/propctrlr/formresid.hrc b/extensions/source/propctrlr/formresid.hrc index 9a9d34e4cf9b..1ab74b7cadac 100644 --- a/extensions/source/propctrlr/formresid.hrc +++ b/extensions/source/propctrlr/formresid.hrc @@ -284,11 +284,6 @@ #define RID_DLG_NEW_DATA_TYPE ( RID_PROPCONTROLLER_START + 4 ) // ----------------------------------------------------------------------- -// - tab dialogs - -#define RID_TABDLG_FONTDIALOG ( RID_PROPCONTROLLER_START + 0 ) - -// ----------------------------------------------------------------------- // - ImageLists #define RID_IL_FORMEXPLORER ( RID_PROPCONTROLLER_START + 0 ) diff --git a/extensions/uiconfig/spropctrlr/ui/controlfontdialog.ui b/extensions/uiconfig/spropctrlr/ui/controlfontdialog.ui new file mode 100644 index 000000000000..d95097608d70 --- /dev/null +++ b/extensions/uiconfig/spropctrlr/ui/controlfontdialog.ui @@ -0,0 +1,133 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="ControlFontDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Character</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> + <child> + <object class="GtkButton" id="reset"> + <property name="label">gtk-revert-to-saved</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">3</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="GtkNotebook" id="tabcontrol"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <child> + <placeholder/> + </child> + <child type="tab"> + <object class="GtkLabel" id="font"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Font</property> + </object> + <packing> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child type="tab"> + <object class="GtkLabel" id="fonteffects"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Font Effects</property> + </object> + <packing> + <property name="position">1</property> + <property name="tab_fill">False</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-widget response="0">reset</action-widget> + </action-widgets> + </object> +</interface> |