Kaydet (Commit) e1283c87 authored tarafından Olivier Hallot's avatar Olivier Hallot Kaydeden (comit) Caolán McNamara

Convert text dialog to widget UI

Change-Id: Ifd1303db2b3da95d80baaace898fc3e93996fa76
Reviewed-on: https://gerrit.libreoffice.org/5486Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst cc0b40f6
......@@ -75,7 +75,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/tabpages/page.src \
cui/source/tabpages/paragrph.src \
cui/source/tabpages/strings.src \
cui/source/tabpages/textanim.src \
cui/source/tabpages/transfrm.src \
))
......
......@@ -109,6 +109,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/swpossizepage \
cui/uiconfig/ui/textattrtabpage \
cui/uiconfig/ui/textanimtabpage \
cui/uiconfig/ui/textdialog \
cui/uiconfig/ui/textflowpage \
cui/uiconfig/ui/thesaurus \
cui/uiconfig/ui/transparencytabpage \
......
......@@ -44,7 +44,6 @@
#define RID_SVX_FORMAT_CELLS_DLG ( RID_SVX_START + 42 )
// used in "tabpages"
#define RID_SVXDLG_TEXT (RID_SVX_START + 183)
#define RID_SVXDLG_TRANSFORM (RID_SVX_START + 45)
#define RID_SVXDLG_LINE (RID_SVX_START + 50)
#define RID_SVXDLG_BBDLG (RID_SVX_START + 40)
......
......@@ -92,6 +92,8 @@ public:
\************************************************************************/
class SvxTextTabDialog : public SfxTabDialog
{
sal_uInt16 m_nTextId;
sal_uInt16 m_nTextAnimId;
private:
const SdrView* pView;
......
......@@ -45,13 +45,14 @@ static sal_uInt16 pRanges[] =
SvxTextTabDialog::SvxTextTabDialog( Window* pParent,
const SfxItemSet* pAttr,
const SdrView* pSdrView ) :
SfxTabDialog ( pParent, CUI_RES( RID_SVXDLG_TEXT ), pAttr ),
SfxTabDialog ( pParent
,"TextDialog"
,"cui/ui/textdialog.ui"
, pAttr ),
pView ( pSdrView )
{
FreeResource();
AddTabPage( RID_SVXPAGE_TEXTATTR, SvxTextAttrPage::Create, 0);
AddTabPage( RID_SVXPAGE_TEXTANIMATION, SvxTextAnimationPage::Create, 0);
m_nTextId = AddTabPage( "RID_SVXPAGE_TEXTATTR", SvxTextAttrPage::Create, 0);
m_nTextAnimId = AddTabPage( "RID_SVXPAGE_TEXTANIMATION", SvxTextAnimationPage::Create, 0);
}
/*************************************************************************
......@@ -62,21 +63,11 @@ SvxTextTabDialog::SvxTextTabDialog( Window* pParent,
void SvxTextTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
switch( nId )
{
case RID_SVXPAGE_TEXTATTR:
if (nId == m_nTextId)
{
( (SvxTextAttrPage&) rPage ).SetView( pView );
( (SvxTextAttrPage&) rPage ).Construct();
}
break;
case RID_SVXPAGE_TEXTANIMATION:
break;
default:
break;
}
}
......
/* -*- 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 <svtools/controldims.hrc>
#include <cuires.hrc>
#include <svx/dialogs.hrc>
// direction image buttons
#define MA_HALFBUTTON_WIDTH 7
#define MA_BUTTON_WIDTH (2 * MA_HALFBUTTON_WIDTH)
#define MA_BUTTON_HEIGHT (2 * MA_HALFBUTTON_WIDTH)
#define BUTTON_SIZE MAP_APPFONT( MA_BUTTON_WIDTH, MA_BUTTON_WIDTH )
#define MA_MOVEBUT_GRACE_X 6
// height of first group Text effects
#define MA_EFFECTSGROUP_HEIGHT (RSC_CD_FIXEDLINE_HEIGHT + \
RSC_SP_FLGR_INNERBORDER_LEFT + \
/* direction buttons */ 3*MA_BUTTON_HEIGHT + \
RSC_SP_FLGR_INNERBORDER_BOTTOM + RSC_SP_FLGR_SPACE_Y)
// height of second group height of FIXEDTEXT
#define MA_PROPERTIESGROUP_HEIGHT (RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_INNERBORDER_LEFT + \
/* text initially visible */ RSC_CD_CHECKBOX_HEIGHT + RSC_SP_CTRL_GROUP_Y + \
/* text finally visible */ RSC_CD_CHECKBOX_HEIGHT + RSC_SP_CTRL_GROUP_Y + \
/* animation runs */ RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_CTRL_GROUP_Y + \
/* number of runs */ RSC_CD_TEXTBOX_HEIGHT + RSC_SP_CTRL_GROUP_Y + \
/* step size */ RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_CTRL_GROUP_Y + \
/* number of pixel */ RSC_CD_TEXTBOX_HEIGHT + RSC_SP_CTRL_GROUP_Y + \
/* step delay */ RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_CTRL_GROUP_Y + \
/* delay time */ RSC_CD_TEXTBOX_HEIGHT)
// tabpage total size
#define MA_TOTAL_WIDTH 260
#define MA_TOTAL_HEIGHT RSC_SP_TBPG_INNERBORDER_TOP + MA_EFFECTSGROUP_HEIGHT + MA_PROPERTIESGROUP_HEIGHT + RSC_SP_TBPG_INNERBORDER_BOTTOM
// X position and width of effects drop down
#define MA_EFFECTLIST_X 50
#define MA_EFFECTLIST_WIDTH 95
// RID_SVXDLG_TEXT -------------------------------------------------------
TabDialog RID_SVXDLG_TEXT
{
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 289 , 185 + 46 ) ;
Text [ en-US ] = "Text" ;
Moveable = TRUE ;
TabControl 1
{
OutputSize = TRUE ;
Pos = MAP_APPFONT ( 3 , 3 ) ;
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
PageList =
{
PageItem
{
PageResID = RID_SVXPAGE_TEXTATTR ;
Identifier = RID_SVXPAGE_TEXTATTR ;
Text [ en-US ] = "Text" ;
};
PageItem
{
PageResID = RID_SVXPAGE_TEXTANIMATION ;
Identifier = RID_SVXPAGE_TEXTANIMATION ;
Text [ en-US ] = "Text Animation" ;
};
};
};
};
// ******************************************************************* EOF
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="TextDialog">
<property name="can_focus">False</property>
<property name="border_width">5</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">2</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">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="RID_SVXPAGE_TEXTATTR">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Text</property>
</object>
<packing>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="RID_SVXPAGE_TEXTANIMATION">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Text animation</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