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

Convert Draw char dialog to widget UI

Conflicts:
	sd/UIConfig_sdraw.mk

Change-Id: I1635e21d3bcfa708b4e6b99e5ec5bd00448e1f59
Reviewed-on: https://gerrit.libreoffice.org/6054Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst e5c370e5
......@@ -45,7 +45,6 @@ $(eval $(call gb_SrsTarget_add_files,sd/res,\
sd/source/ui/dlg/animobjs.src \
sd/source/ui/dlg/brkdlg.src \
sd/source/ui/dlg/dlgass.src \
sd/source/ui/dlg/dlg_char.src \
sd/source/ui/dlg/dlgfield.src \
sd/source/ui/dlg/dlgolbul.src \
sd/source/ui/dlg/inspagob.src \
......
......@@ -68,6 +68,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/sdraw,\
$(eval $(call gb_UIConfig_add_uifiles,modules/sdraw,\
sd/uiconfig/sdraw/ui/dlgsnap \
sd/uiconfig/sdraw/ui/copydlg \
sd/uiconfig/sdraw/ui/drawchardialog \
sd/uiconfig/sdraw/ui/drawparadialog \
sd/uiconfig/sdraw/ui/drawpagedialog \
sd/uiconfig/sdraw/ui/insertlayer \
......
/* -*- 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 <svx/dialogs.hrc>
#include "dlg_char.hrc"
TabDialog TAB_CHAR
{
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 289 , 176 ) ;
Text [ en-US ] = "Character" ;
Moveable = TRUE ;
// Closeable = TRUE; // Dieser Dialog enthaelt OK und/oder Cancel Button (KH)
TabControl 1
{
OutputSize = TRUE ;
Pos = MAP_APPFONT ( 3 , 3 ) ;
Size = MAP_APPFONT ( 260 , 135 ) ;
PageList =
{
PageItem
{
Identifier = RID_SVXPAGE_CHAR_NAME ;
Text [ en-US ] = "Font" ;
PageResID = RID_SVXPAGE_CHAR_NAME ;
};
PageItem
{
Identifier = RID_SVXPAGE_CHAR_EFFECTS ;
Text [ en-US ] = "Font Effects" ;
PageResID = RID_SVXPAGE_CHAR_EFFECTS ;
};
PageItem
{
Identifier = RID_SVXPAGE_CHAR_POSITION ;
PageResID = RID_SVXPAGE_CHAR_POSITION ;
Text [ en-US ] = "Position";
};
};
};
OKButton 1
{
Pos = MAP_APPFONT ( 6 , 151 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
CancelButton 1
{
Pos = MAP_APPFONT ( 60 , 151 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
HelpButton 1
{
Pos = MAP_APPFONT ( 114 , 151 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
PushButton 1
{
Pos = MAP_APPFONT ( 169 , 151 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "Return" ;
TabStop = TRUE ;
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -21,6 +21,7 @@
#include <editeng/flstitem.hxx>
#include <svx/flagsdef.hxx>
#include <sfx2/objsh.hxx>
#include <svx/svxdlg.hxx>
#include "sdresid.hxx"
#include "dlg_char.hxx"
......@@ -32,14 +33,19 @@
*/
SdCharDlg::SdCharDlg( Window* pParent, const SfxItemSet* pAttr,
const SfxObjectShell* pDocShell ) :
SfxTabDialog ( pParent, SdResId( TAB_CHAR ), pAttr ),
SfxTabDialog ( pParent
,"DrawCharDialog"
,"modules/sdraw/ui/drawchardialog.ui"
, pAttr ),
rDocShell ( *pDocShell )
{
FreeResource();
AddTabPage( RID_SVXPAGE_CHAR_NAME );
AddTabPage( RID_SVXPAGE_CHAR_EFFECTS );
AddTabPage( RID_SVXPAGE_CHAR_POSITION );
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
mnCharName = AddTabPage( "RID_SVXPAGE_CHAR_NAME", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), 0 );
mnCharEffects = AddTabPage( "RID_SVXPAGE_CHAR_EFFECTS", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), 0 );
mnCharPosition = AddTabPage( "RID_SVXPAGE_CHAR_POSITION", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), 0 );
}
// -----------------------------------------------------------------------
......@@ -47,25 +53,17 @@ SdCharDlg::SdCharDlg( Window* pParent, const SfxItemSet* pAttr,
void SdCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
switch( nId )
if (nId == mnCharName)
{
case RID_SVXPAGE_CHAR_NAME:
{
SvxFontListItem aItem(*( (const SvxFontListItem*)
( rDocShell.GetItem( SID_ATTR_CHAR_FONTLIST) ) ) );
aSet.Put (SvxFontListItem( aItem.GetFontList(), SID_ATTR_CHAR_FONTLIST));
rPage.PageCreated(aSet);
}
break;
case RID_SVXPAGE_CHAR_EFFECTS:
aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP));
rPage.PageCreated(aSet);
break;
SvxFontListItem aItem(*( (const SvxFontListItem*) ( rDocShell.GetItem( SID_ATTR_CHAR_FONTLIST) ) ) );
default:
break;
aSet.Put (SvxFontListItem( aItem.GetFontList(), SID_ATTR_CHAR_FONTLIST));
rPage.PageCreated(aSet);
}
else if (nId == mnCharEffects)
{
aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP));
rPage.PageCreated(aSet);
}
}
......
/* -*- 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 TAB_CHAR 20600
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -23,8 +23,6 @@
#include <sfx2/tabdlg.hxx>
#include "dlg_char.hrc"
class SfxItemSet;
class SfxObjectShell;
......@@ -35,6 +33,10 @@ class SfxObjectShell;
class SdCharDlg : public SfxTabDialog
{
private:
sal_uInt16 mnCharName;
sal_uInt16 mnCharEffects;
sal_uInt16 mnCharPosition;
const SfxObjectShell& rDocShell;
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
......
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="DrawCharDialog">
<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">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="RID_SVXPAGE_CHAR_NAME">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Fonts</property>
</object>
<packing>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="RID_SVXPAGE_CHAR_EFFECTS">
<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>
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="RID_SVXPAGE_CHAR_POSITION">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Position</property>
</object>
<packing>
<property name="position">2</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>
......@@ -4,6 +4,7 @@
<object class="GtkDialog" id="DrawPageDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Page Setup</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
......
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