Kaydet (Commit) 1913d534 authored tarafından Caolán McNamara's avatar Caolán McNamara

convert control font dialog to .ui

Change-Id: I44f6f587dffe047d4aef7e32233bafe54a77cb6d
üst 1bb4a669
......@@ -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 \
......
......@@ -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 \
))
......
......@@ -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);
......
......@@ -63,6 +63,8 @@ namespace pcr
protected:
virtual void PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage);
private:
sal_uInt16 m_nCharsId;
};
//............................................................................
} // namespace pcr
......
/* -*- 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: */
......@@ -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
......
......@@ -283,11 +283,6 @@
#define RID_DLG_SELECTION ( RID_PROPCONTROLLER_START + 3 )
#define RID_DLG_NEW_DATA_TYPE ( RID_PROPCONTROLLER_START + 4 )
// -----------------------------------------------------------------------
// - tab dialogs
#define RID_TABDLG_FONTDIALOG ( RID_PROPCONTROLLER_START + 0 )
// -----------------------------------------------------------------------
// - ImageLists
......
<?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>
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