Kaydet (Commit) 44029ade authored tarafından Caolán McNamara's avatar Caolán McNamara

convert chart shape paragraph dialog to .ui

Change-Id: I5682ccdaa7d0f877310b937ad12ceeeb0b91c350
üst 204c2a1a
...@@ -29,7 +29,6 @@ $(eval $(call gb_SrsTarget_set_include,chart2/res,\ ...@@ -29,7 +29,6 @@ $(eval $(call gb_SrsTarget_set_include,chart2/res,\
$(eval $(call gb_SrsTarget_add_files,chart2/res,\ $(eval $(call gb_SrsTarget_add_files,chart2/res,\
chart2/source/controller/dialogs/dlg_DataEditor.src \ chart2/source/controller/dialogs/dlg_DataEditor.src \
chart2/source/controller/dialogs/dlg_DataSource.src \ chart2/source/controller/dialogs/dlg_DataSource.src \
chart2/source/controller/dialogs/dlg_ShapeParagraph.src \
chart2/source/controller/dialogs/res_BarGeometry.src \ chart2/source/controller/dialogs/res_BarGeometry.src \
chart2/source/controller/dialogs/Strings_AdditionalControls.src \ chart2/source/controller/dialogs/Strings_AdditionalControls.src \
chart2/source/controller/dialogs/Strings_ChartTypes.src \ chart2/source/controller/dialogs/Strings_ChartTypes.src \
......
...@@ -38,6 +38,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\ ...@@ -38,6 +38,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\
chart2/uiconfig/ui/insertaxisdlg \ chart2/uiconfig/ui/insertaxisdlg \
chart2/uiconfig/ui/insertgriddlg \ chart2/uiconfig/ui/insertgriddlg \
chart2/uiconfig/ui/inserttitledlg \ chart2/uiconfig/ui/inserttitledlg \
chart2/uiconfig/ui/paradialog \
chart2/uiconfig/ui/smoothlinesdlg \ chart2/uiconfig/ui/smoothlinesdlg \
chart2/uiconfig/ui/steppedlinesdlg \ chart2/uiconfig/ui/steppedlinesdlg \
chart2/uiconfig/ui/titlerotationtabpage \ chart2/uiconfig/ui/titlerotationtabpage \
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#define DLG_DATA_DESCR 836 #define DLG_DATA_DESCR 836
#define DLG_LEGEND 835 #define DLG_LEGEND 835
#define DLG_SPLINE_PROPERTIES 904 #define DLG_SPLINE_PROPERTIES 904
#define DLG_SHAPE_PARAGRAPH 922
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
//TabPage Ids: //TabPage Ids:
......
...@@ -32,46 +32,35 @@ using namespace ::com::sun::star; ...@@ -32,46 +32,35 @@ using namespace ::com::sun::star;
namespace chart namespace chart
{ {
ShapeParagraphDialog::ShapeParagraphDialog( Window* pParent, const SfxItemSet* pAttr ) ShapeParagraphDialog::ShapeParagraphDialog(Window* pParent,
:SfxTabDialog( pParent, SchResId( DLG_SHAPE_PARAGRAPH ), pAttr ) const SfxItemSet* pAttr)
: SfxTabDialog(pParent, "ParagraphDialog",
"modules/schart/ui/paradialog.ui", pAttr)
, m_nTabPageId(0)
{ {
FreeResource();
SvtCJKOptions aCJKOptions; SvtCJKOptions aCJKOptions;
AddTabPage( RID_SVXPAGE_STD_PARAGRAPH ); AddTabPage("labelTP_PARA_STD", RID_SVXPAGE_STD_PARAGRAPH);
AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH ); AddTabPage("labelTP_PARA_ALIGN", RID_SVXPAGE_ALIGN_PARAGRAPH );
if ( aCJKOptions.IsAsianTypographyEnabled() ) if (aCJKOptions.IsAsianTypographyEnabled())
{ {
AddTabPage( RID_SVXPAGE_PARA_ASIAN ); AddTabPage("labelTP_PARA_ASIAN", RID_SVXPAGE_PARA_ASIAN);
} }
else else
{ {
RemoveTabPage( RID_SVXPAGE_PARA_ASIAN ); RemoveTabPage("labelTP_PARA_ASIAN");
} }
AddTabPage( RID_SVXPAGE_TABULATOR ); m_nTabPageId = AddTabPage("labelTP_TABULATOR", RID_SVXPAGE_TABULATOR);
}
ShapeParagraphDialog::~ShapeParagraphDialog()
{
} }
void ShapeParagraphDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage ) void ShapeParagraphDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage )
{ {
SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) ); if (nId == m_nTabPageId)
switch ( nId )
{ {
case RID_SVXPAGE_TABULATOR: SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) );
{ aSet.Put( SfxUInt16Item( SID_SVXTABULATORTABPAGE_CONTROLFLAGS,
aSet.Put( SfxUInt16Item( SID_SVXTABULATORTABPAGE_CONTROLFLAGS, ( TABTYPE_ALL &~TABTYPE_LEFT ) | ( TABFILL_ALL &~TABFILL_NONE ) ) );
( TABTYPE_ALL &~TABTYPE_LEFT ) | ( TABFILL_ALL &~TABFILL_NONE ) ) ); rPage.PageCreated( aSet );
rPage.PageCreated( aSet );
}
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 "ResourceIds.hrc"
#include <svx/dialogs.hrc>
TabDialog DLG_SHAPE_PARAGRAPH
{
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 289 , 176 ) ;
Text [ en-US ] = "Paragraph" ;
Moveable = TRUE ;
Closeable = TRUE ;
TabControl 1
{
OutputSize = TRUE ;
Pos = MAP_APPFONT ( 3 , 3 ) ;
Size = MAP_APPFONT ( 260 , 135 ) ;
PageList =
{
PageItem
{
Identifier = RID_SVXPAGE_STD_PARAGRAPH ;
Text [ en-US ] = "Indents & Spacing";
};
PageItem
{
Identifier = RID_SVXPAGE_ALIGN_PARAGRAPH ;
Text [ en-US ] = "Alignment";
};
PageItem
{
Identifier = RID_SVXPAGE_PARA_ASIAN ;
Text [ en-US ] = "Asian Typography";
};
PageItem
{
Identifier = RID_SVXPAGE_TABULATOR ;
Text [ en-US ] = "Tab";
};
};
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -29,11 +29,10 @@ namespace chart ...@@ -29,11 +29,10 @@ namespace chart
class ShapeParagraphDialog : public SfxTabDialog class ShapeParagraphDialog : public SfxTabDialog
{ {
public: public:
ShapeParagraphDialog( Window* pParent, const SfxItemSet* pAttr ); ShapeParagraphDialog(Window* pParent, const SfxItemSet* pAttr);
virtual ~ShapeParagraphDialog();
private: private:
virtual void PageCreated( sal_uInt16 nId, SfxTabPage& rPage ); virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage);
sal_uInt16 m_nTabPageId;
}; };
} // namespace chart } // namespace chart
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.0 on Sat Jan 4 19:26:45 2014 -->
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="ParagraphDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Paragraph</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="labelTP_PARA_STD">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Indents &amp; Spacing</property>
</object>
<packing>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="labelTP_PARA_ALIGN">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0.4699999988079071</property>
<property name="label" translatable="yes">Alignment</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="labelTP_PARA_ASIAN">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Asian Typography</property>
</object>
<packing>
<property name="position">2</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="labelTP_TABULATOR">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Tabs</property>
</object>
<packing>
<property name="position">3</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