[Libreoffice-commits] core.git: 2 commits - chart2/AllLangResTarget_chartcontroller.mk chart2/source chart2/uiconfig chart2/UIConfig_chart2.mk cui/source

Caolán McNamara caolanm at redhat.com
Sat Jan 4 11:24:08 PST 2014


 chart2/AllLangResTarget_chartcontroller.mk         |    1 
 chart2/UIConfig_chart2.mk                          |    1 
 chart2/source/controller/dialogs/ResourceIds.hrc   |    1 
 chart2/source/controller/dialogs/dlg_ShapeFont.cxx |   44 ++----
 chart2/source/controller/dialogs/dlg_ShapeFont.src |   56 -------
 chart2/source/controller/inc/dlg_ShapeFont.hxx     |   10 -
 chart2/uiconfig/ui/chardialog.ui                   |  148 +++++++++++++++++++++
 cui/source/inc/cuires.hrc                          |    1 
 8 files changed, 170 insertions(+), 92 deletions(-)

New commits:
commit 204c2a1a022b2e1c29f3a5e33a031758d43703b7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Jan 4 19:19:55 2014 +0000

    convert chart shape character dialog to .ui
    
    Change-Id: I03917fdceebdf5bd06c04f5719615092ee166852

diff --git a/chart2/AllLangResTarget_chartcontroller.mk b/chart2/AllLangResTarget_chartcontroller.mk
index 56655c3..345ccd6 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_ShapeFont.src \
     chart2/source/controller/dialogs/dlg_ShapeParagraph.src \
     chart2/source/controller/dialogs/res_BarGeometry.src \
     chart2/source/controller/dialogs/Strings_AdditionalControls.src \
diff --git a/chart2/UIConfig_chart2.mk b/chart2/UIConfig_chart2.mk
index ff06b99..dd89b25 100644
--- a/chart2/UIConfig_chart2.mk
+++ b/chart2/UIConfig_chart2.mk
@@ -32,6 +32,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/schart,\
 $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\
 	chart2/uiconfig/ui/3dviewdialog \
 	chart2/uiconfig/ui/attributedialog \
+	chart2/uiconfig/ui/chardialog \
 	chart2/uiconfig/ui/dlg_DataLabel \
 	chart2/uiconfig/ui/dlg_InsertErrorBars \
 	chart2/uiconfig/ui/insertaxisdlg \
diff --git a/chart2/source/controller/dialogs/ResourceIds.hrc b/chart2/source/controller/dialogs/ResourceIds.hrc
index d78f5da..897e907 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_FONT      921
 #define DLG_SHAPE_PARAGRAPH 922
 
 //-----------------------------------------------------------------------------
diff --git a/chart2/source/controller/dialogs/dlg_ShapeFont.cxx b/chart2/source/controller/dialogs/dlg_ShapeFont.cxx
index a58b2d62..929c9cd 100644
--- a/chart2/source/controller/dialogs/dlg_ShapeFont.cxx
+++ b/chart2/source/controller/dialogs/dlg_ShapeFont.cxx
@@ -36,41 +36,29 @@ namespace chart
 
 ShapeFontDialog::ShapeFontDialog( Window* pParent, const SfxItemSet* pAttr,
     const ViewElementListProvider* pViewElementListProvider )
-    :SfxTabDialog( pParent, SchResId( DLG_SHAPE_FONT ), pAttr )
-    ,m_pViewElementListProvider( pViewElementListProvider )
-{
-    FreeResource();
-
-    AddTabPage( RID_SVXPAGE_CHAR_NAME );
-    AddTabPage( RID_SVXPAGE_CHAR_EFFECTS );
-    AddTabPage( RID_SVXPAGE_CHAR_POSITION );
-}
-
-ShapeFontDialog::~ShapeFontDialog()
+    : SfxTabDialog(pParent, "CharDialog",
+        "modules/schart/ui/chardialog.ui", pAttr)
+    , m_pViewElementListProvider(pViewElementListProvider)
+    , m_nNamePageId(0)
+    , m_nEffectsPageId(0)
 {
+    m_nNamePageId = AddTabPage("font", RID_SVXPAGE_CHAR_NAME);
+    m_nEffectsPageId = AddTabPage("fonteffects", RID_SVXPAGE_CHAR_EFFECTS);
+    AddTabPage("position", RID_SVXPAGE_CHAR_POSITION );
 }
 
 void ShapeFontDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage )
 {
     SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) );
-    switch ( nId )
+    if (nId == m_nNamePageId)
+    {
+        aSet.Put( SvxFontListItem( m_pViewElementListProvider->getFontList(), SID_ATTR_CHAR_FONTLIST ) );
+        rPage.PageCreated( aSet );
+    }
+    else if (nId == m_nEffectsPageId)
     {
-        case RID_SVXPAGE_CHAR_NAME:
-            {
-                aSet.Put( SvxFontListItem( m_pViewElementListProvider->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;
-        default:
-            {
-            }
-            break;
+        aSet.Put( SfxUInt16Item( SID_DISABLE_CTL, DISABLE_CASEMAP ) );
+        rPage.PageCreated( aSet );
     }
 }
 
diff --git a/chart2/source/controller/dialogs/dlg_ShapeFont.src b/chart2/source/controller/dialogs/dlg_ShapeFont.src
deleted file mode 100644
index c107789..0000000
--- a/chart2/source/controller/dialogs/dlg_ShapeFont.src
+++ /dev/null
@@ -1,56 +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_FONT
-{
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Size = MAP_APPFONT ( 289 , 176 ) ;
-    Text [ en-US ] = "Character" ;
-    Moveable = TRUE ;
-    Closeable = TRUE ;
-    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";
-            };
-            PageItem
-            {
-                Identifier = RID_SVXPAGE_CHAR_EFFECTS ;
-                Text [ en-US ] = "Font Effects";
-            };
-            PageItem
-            {
-                Identifier = RID_SVXPAGE_CHAR_POSITION ;
-                Text [ en-US ] = "Font Position";
-            };
-        };
-    };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_ShapeFont.hxx b/chart2/source/controller/inc/dlg_ShapeFont.hxx
index e988d4e..14622e0 100644
--- a/chart2/source/controller/inc/dlg_ShapeFont.hxx
+++ b/chart2/source/controller/inc/dlg_ShapeFont.hxx
@@ -31,14 +31,14 @@ class ViewElementListProvider;
 class ShapeFontDialog : public SfxTabDialog
 {
 public:
-    ShapeFontDialog( Window* pParent, const SfxItemSet* pAttr,
-        const ViewElementListProvider* pViewElementListProvider );
-    virtual ~ShapeFontDialog();
-
+    ShapeFontDialog(Window* pParent, const SfxItemSet* pAttr,
+        const ViewElementListProvider* pViewElementListProvider);
 private:
-    virtual void PageCreated( sal_uInt16 nId, SfxTabPage& rPage );
+    virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage);
 
     const ViewElementListProvider* m_pViewElementListProvider;
+    sal_uInt16 m_nNamePageId;
+    sal_uInt16 m_nEffectsPageId;
 };
 
 } //  namespace chart
diff --git a/chart2/uiconfig/ui/chardialog.ui b/chart2/uiconfig/ui/chardialog.ui
new file mode 100644
index 0000000..71d0861
--- /dev/null
+++ b/chart2/uiconfig/ui/chardialog.ui
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.0 on Sat Jan  4 17:30:31 2014 -->
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="CharDialog">
+    <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>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="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>
commit 16cb303c88c350f911a9a5acb98c6ad450bd1632
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Jan 4 17:01:07 2014 +0000

    unused define
    
    Change-Id: I81e720c0601d701b114cd27b596e3b2df7ec3cdf

diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index 2fe95b9..0c51510 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -240,7 +240,6 @@
 #define RID_MULTIPATH_DBL_ERR               (RID_SVX_START + 207)
 
 // script organizer
-#define RID_DLG_SCRIPTORGANIZER             (RID_SVX_START + 258)
 #define RID_SVXSTR_DELQUERY                 (RID_SVX_START + 1027)
 #define RID_SVXSTR_DELQUERY_TITLE           (RID_SVX_START + 1028)
 #define RID_SVXSTR_DELFAILED                (RID_SVX_START + 1029)


More information about the Libreoffice-commits mailing list