diff options
-rw-r--r-- | chart2/AllLangResTarget_chartcontroller.mk | 1 | ||||
-rw-r--r-- | chart2/UIConfig_chart2.mk | 1 | ||||
-rw-r--r-- | chart2/source/controller/dialogs/ResourceIds.hrc | 1 | ||||
-rw-r--r-- | chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx | 43 | ||||
-rw-r--r-- | chart2/source/controller/dialogs/dlg_ShapeParagraph.src | 61 | ||||
-rw-r--r-- | chart2/source/controller/inc/dlg_ShapeParagraph.hxx | 7 | ||||
-rw-r--r-- | chart2/uiconfig/ui/paradialog.ui | 163 |
7 files changed, 183 insertions, 94 deletions
diff --git a/chart2/AllLangResTarget_chartcontroller.mk b/chart2/AllLangResTarget_chartcontroller.mk index 345ccd6da620..1250e2adf4ed 100644 --- a/chart2/AllLangResTarget_chartcontroller.mk +++ b/chart2/AllLangResTarget_chartcontroller.mk @@ -29,7 +29,6 @@ $(eval $(call gb_SrsTarget_set_include,chart2/res,\ $(eval $(call gb_SrsTarget_add_files,chart2/res,\ chart2/source/controller/dialogs/dlg_DataEditor.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/Strings_AdditionalControls.src \ chart2/source/controller/dialogs/Strings_ChartTypes.src \ diff --git a/chart2/UIConfig_chart2.mk b/chart2/UIConfig_chart2.mk index dd89b25c5c98..a49772024068 100644 --- a/chart2/UIConfig_chart2.mk +++ b/chart2/UIConfig_chart2.mk @@ -38,6 +38,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\ chart2/uiconfig/ui/insertaxisdlg \ chart2/uiconfig/ui/insertgriddlg \ chart2/uiconfig/ui/inserttitledlg \ + chart2/uiconfig/ui/paradialog \ chart2/uiconfig/ui/smoothlinesdlg \ chart2/uiconfig/ui/steppedlinesdlg \ chart2/uiconfig/ui/titlerotationtabpage \ diff --git a/chart2/source/controller/dialogs/ResourceIds.hrc b/chart2/source/controller/dialogs/ResourceIds.hrc index 897e907c6fe9..45b860102ba5 100644 --- a/chart2/source/controller/dialogs/ResourceIds.hrc +++ b/chart2/source/controller/dialogs/ResourceIds.hrc @@ -31,7 +31,6 @@ #define DLG_DATA_DESCR 836 #define DLG_LEGEND 835 #define DLG_SPLINE_PROPERTIES 904 -#define DLG_SHAPE_PARAGRAPH 922 //----------------------------------------------------------------------------- //TabPage Ids: diff --git a/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx b/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx index bb0449d63ae1..44b343719d08 100644 --- a/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx +++ b/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx @@ -32,46 +32,35 @@ using namespace ::com::sun::star; namespace chart { -ShapeParagraphDialog::ShapeParagraphDialog( Window* pParent, const SfxItemSet* pAttr ) - :SfxTabDialog( pParent, SchResId( DLG_SHAPE_PARAGRAPH ), pAttr ) +ShapeParagraphDialog::ShapeParagraphDialog(Window* pParent, + const SfxItemSet* pAttr) + : SfxTabDialog(pParent, "ParagraphDialog", + "modules/schart/ui/paradialog.ui", pAttr) + , m_nTabPageId(0) { - FreeResource(); - SvtCJKOptions aCJKOptions; - AddTabPage( RID_SVXPAGE_STD_PARAGRAPH ); - AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH ); - if ( aCJKOptions.IsAsianTypographyEnabled() ) + AddTabPage("labelTP_PARA_STD", RID_SVXPAGE_STD_PARAGRAPH); + AddTabPage("labelTP_PARA_ALIGN", RID_SVXPAGE_ALIGN_PARAGRAPH ); + if (aCJKOptions.IsAsianTypographyEnabled()) { - AddTabPage( RID_SVXPAGE_PARA_ASIAN ); + AddTabPage("labelTP_PARA_ASIAN", RID_SVXPAGE_PARA_ASIAN); } else { - RemoveTabPage( RID_SVXPAGE_PARA_ASIAN ); + RemoveTabPage("labelTP_PARA_ASIAN"); } - AddTabPage( RID_SVXPAGE_TABULATOR ); -} - -ShapeParagraphDialog::~ShapeParagraphDialog() -{ + m_nTabPageId = AddTabPage("labelTP_TABULATOR", RID_SVXPAGE_TABULATOR); } void ShapeParagraphDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage ) { - SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) ); - switch ( nId ) + if (nId == m_nTabPageId) { - case RID_SVXPAGE_TABULATOR: - { - aSet.Put( SfxUInt16Item( SID_SVXTABULATORTABPAGE_CONTROLFLAGS, - ( TABTYPE_ALL &~TABTYPE_LEFT ) | ( TABFILL_ALL &~TABFILL_NONE ) ) ); - rPage.PageCreated( aSet ); - } - break; - default: - { - } - break; + SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) ); + aSet.Put( SfxUInt16Item( SID_SVXTABULATORTABPAGE_CONTROLFLAGS, + ( TABTYPE_ALL &~TABTYPE_LEFT ) | ( TABFILL_ALL &~TABFILL_NONE ) ) ); + rPage.PageCreated( aSet ); } } diff --git a/chart2/source/controller/dialogs/dlg_ShapeParagraph.src b/chart2/source/controller/dialogs/dlg_ShapeParagraph.src deleted file mode 100644 index 8fe5e9c0b4ee..000000000000 --- a/chart2/source/controller/dialogs/dlg_ShapeParagraph.src +++ /dev/null @@ -1,61 +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 "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: */ diff --git a/chart2/source/controller/inc/dlg_ShapeParagraph.hxx b/chart2/source/controller/inc/dlg_ShapeParagraph.hxx index 8e1e0ff41f98..4f8805eeb86d 100644 --- a/chart2/source/controller/inc/dlg_ShapeParagraph.hxx +++ b/chart2/source/controller/inc/dlg_ShapeParagraph.hxx @@ -29,11 +29,10 @@ namespace chart class ShapeParagraphDialog : public SfxTabDialog { public: - ShapeParagraphDialog( Window* pParent, const SfxItemSet* pAttr ); - virtual ~ShapeParagraphDialog(); - + ShapeParagraphDialog(Window* pParent, const SfxItemSet* pAttr); private: - virtual void PageCreated( sal_uInt16 nId, SfxTabPage& rPage ); + virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage); + sal_uInt16 m_nTabPageId; }; } // namespace chart diff --git a/chart2/uiconfig/ui/paradialog.ui b/chart2/uiconfig/ui/paradialog.ui new file mode 100644 index 000000000000..e9c95d87638b --- /dev/null +++ b/chart2/uiconfig/ui/paradialog.ui @@ -0,0 +1,163 @@ +<?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 & 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> |