[Libreoffice-commits] core.git: 3 commits - chart2/AllLangResTarget_chartcontroller.mk chart2/source chart2/uiconfig chart2/UIConfig_chart2.mk helpcontent2 sc/source

Caolán McNamara caolanm at redhat.com
Tue Jan 7 01:43:29 PST 2014


 chart2/AllLangResTarget_chartcontroller.mk          |    1 
 chart2/UIConfig_chart2.mk                           |    1 
 chart2/source/controller/dialogs/dlg_DataSource.cxx |   63 +++++--------
 chart2/source/controller/dialogs/dlg_DataSource.src |   42 ---------
 chart2/source/controller/inc/HelpIds.hrc            |    1 
 chart2/source/controller/inc/dlg_DataSource.hxx     |    4 
 chart2/uiconfig/ui/datarangedialog.ui               |   92 ++++++++++++++++++++
 helpcontent2                                        |    2 
 sc/source/ui/Accessibility/AccessibleDocument.cxx   |    1 
 9 files changed, 122 insertions(+), 85 deletions(-)

New commits:
commit db666bdf0c048cec17669096cda414c4b48fc1ec
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 7 09:39:57 2014 +0000

    convert data range tabdialog to .ui
    
    Change-Id: I70e9064a13a751f6b0dae153522953eaf2ac53a5

diff --git a/chart2/AllLangResTarget_chartcontroller.mk b/chart2/AllLangResTarget_chartcontroller.mk
index 1250e2a..d15c4f5 100644
--- a/chart2/AllLangResTarget_chartcontroller.mk
+++ b/chart2/AllLangResTarget_chartcontroller.mk
@@ -28,7 +28,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/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 a497720..38f1beb 100644
--- a/chart2/UIConfig_chart2.mk
+++ b/chart2/UIConfig_chart2.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\
 	chart2/uiconfig/ui/3dviewdialog \
 	chart2/uiconfig/ui/attributedialog \
 	chart2/uiconfig/ui/chardialog \
+	chart2/uiconfig/ui/datarangedialog \
 	chart2/uiconfig/ui/dlg_DataLabel \
 	chart2/uiconfig/ui/dlg_InsertErrorBars \
 	chart2/uiconfig/ui/insertaxisdlg \
diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx b/chart2/source/controller/dialogs/dlg_DataSource.cxx
index 74f8973..7384b1a 100644
--- a/chart2/source/controller/dialogs/dlg_DataSource.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataSource.cxx
@@ -29,8 +29,8 @@
 #include "tp_RangeChooser.hxx"
 #include "tp_DataSource.hxx"
 
-// for RET_OK
-#include <vcl/msgbox.hxx>
+#include <vcl/layout.hxx>
+#include <vcl/msgbox.hxx> // for RET_OK
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::chart2;
@@ -85,8 +85,7 @@ Reference< chart2::XChartTypeTemplate > DocumentChartTypeTemplateProvider::getCu
 class DataSourceTabControl : public TabControl
 {
 public:
-    DataSourceTabControl( Window* pParent, const ResId& rResId );
-    ~DataSourceTabControl();
+    DataSourceTabControl(Window* pParent);
 
     virtual long DeactivatePage();
 
@@ -97,13 +96,11 @@ private:
     bool m_bTogglingEnabled;
 };
 
-DataSourceTabControl::DataSourceTabControl( Window* pParent, const ResId& rResId ) :
-        TabControl( pParent, rResId ),
-        m_bTogglingEnabled( true )
-{}
-
-DataSourceTabControl::~DataSourceTabControl()
-{}
+DataSourceTabControl::DataSourceTabControl(Window* pParent)
+    : TabControl(pParent)
+    , m_bTogglingEnabled(true)
+{
+}
 
 // Note that the result is long, but is intended to be a bool
 long DataSourceTabControl::DeactivatePage()
@@ -127,31 +124,25 @@ void DataSourceTabControl::EnableTabToggling()
 
 sal_uInt16 DataSourceDialog::m_nLastPageId = 0;
 
-DataSourceDialog::DataSourceDialog(
-    Window * pParent,
+DataSourceDialog::DataSourceDialog(Window * pParent,
     const Reference< XChartDocument > & xChartDocument,
-    const Reference< uno::XComponentContext > & xContext ) :
-
-        TabDialog( pParent, SchResId( DLG_DATA_SOURCE )),
-
-        m_xChartDocument( xChartDocument ),
-        m_xContext( xContext ),
-        m_apDocTemplateProvider( new DocumentChartTypeTemplateProvider( xChartDocument )),
-        m_apDialogModel( new DialogModel( xChartDocument, xContext )),
-
-        m_pTabControl( new DataSourceTabControl( this, SchResId( TABCTRL ) )),
-        m_aBtnOK( this, SchResId( BTN_OK ) ),
-        m_aBtnCancel( this, SchResId( BTN_CANCEL ) ),
-        m_aBtnHelp( this, SchResId( BTN_HELP ) ),
-
-        m_pRangeChooserTabePage(0),
-        m_pDataSourceTabPage(0),
-        m_bRangeChooserTabIsValid( true ),
-        m_bDataSourceTabIsValid( true )
+    const Reference< uno::XComponentContext > & xContext)
+    : TabDialog(pParent, "DataRangeDialog",
+        "modules/schart/ui/datarangedialog.ui")
+    , m_xChartDocument(xChartDocument)
+    , m_xContext(xContext)
+    , m_apDocTemplateProvider(new DocumentChartTypeTemplateProvider(xChartDocument))
+    , m_apDialogModel(new DialogModel(xChartDocument, xContext))
+    , m_pTabControl(new DataSourceTabControl(get_content_area()))
+    , m_pRangeChooserTabePage(0)
+    , m_pDataSourceTabPage(0)
+    , m_bRangeChooserTabIsValid(true)
+    , m_bDataSourceTabIsValid(true)
 {
-    FreeResource();
+    get(m_pBtnOK, "ok");
+
+    m_pTabControl->Show();
 
-    //don't create the tabpages before FreeResource, otherwise the help ids are not matched correctly
     m_pRangeChooserTabePage = new RangeChooserTabPage( m_pTabControl, *(m_apDialogModel.get()),
                                      m_apDocTemplateProvider.get(), this, true /* bHideDescription */ );
     m_pDataSourceTabPage = new DataSourceTabPage( m_pTabControl, *(m_apDialogModel.get()),
@@ -164,8 +155,6 @@ DataSourceDialog::DataSourceDialog(
     m_pTabControl->SetTabPage( TP_RANGECHOOSER, m_pRangeChooserTabePage );
 
     m_pTabControl->SelectTabPage( m_nLastPageId );
-
-    SetHelpId( HID_SCH_DLG_RANGES );
 }
 
 DataSourceDialog::~DataSourceDialog()
@@ -199,7 +188,7 @@ void DataSourceDialog::setInvalidPage( TabPage * pTabPage )
 
     if( ! (m_bRangeChooserTabIsValid && m_bDataSourceTabIsValid ))
     {
-        m_aBtnOK.Enable( sal_False );
+        m_pBtnOK->Enable( sal_False );
         OSL_ASSERT( m_pTabControl );
         // note: there seems to be no suitable mechanism to address pages by
         // identifier, at least it is unclear what the page identifiers are.
@@ -221,7 +210,7 @@ void DataSourceDialog::setValidPage( TabPage * pTabPage )
 
     if( m_bRangeChooserTabIsValid && m_bDataSourceTabIsValid )
     {
-        m_aBtnOK.Enable( sal_True );
+        m_pBtnOK->Enable( sal_True );
         OSL_ASSERT( m_pTabControl );
         m_pTabControl->EnableTabToggling();
     }
diff --git a/chart2/source/controller/dialogs/dlg_DataSource.src b/chart2/source/controller/dialogs/dlg_DataSource.src
deleted file mode 100644
index 4237c43..0000000
--- a/chart2/source/controller/dialogs/dlg_DataSource.src
+++ /dev/null
@@ -1,42 +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 "dlg_DataSource.hrc"
-#include "HelpIds.hrc"
-
-// for BUTTONS_OK_CANCEL_HELP_STACKED
-#include "CommonResources.hrc"
-
-TabDialog DLG_DATA_SOURCE
-{
-    HelpID = HID_SCH_DLG_RANGES ;
-
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Moveable = TRUE ;
-    Closeable = TRUE ;
-    Text [ en-US ] = "Data Ranges" ;
-    TabControl TABCTRL
-    {
-        OutputSize = TRUE ;
-        Pos = MAP_APPFONT ( 3 , 3 ) ;
-    };
-    BUTTONS_OK_CANCEL_HELP_STACKED( 200 )
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/HelpIds.hrc b/chart2/source/controller/inc/HelpIds.hrc
index 5b9be0c..e9d4257 100644
--- a/chart2/source/controller/inc/HelpIds.hrc
+++ b/chart2/source/controller/inc/HelpIds.hrc
@@ -41,7 +41,6 @@
 
 #define HID_SCH_CHART_AUTO_FORMAT                           "CHART2_HID_SCH_CHART_AUTO_FORMAT"
 #define HID_SCH_LB_BAR_GEOMETRY                             "CHART2_HID_SCH_LB_BAR_GEOMETRY"
-#define HID_SCH_DLG_RANGES                                  "CHART2_HID_SCH_DLG_RANGES"
 
 #define HID_SCH_CB_SECONDARY_XAXIS                          "CHART2_HID_SCH_CB_SECONDARY_XAXIS"
 #define HID_SCH_CB_SECONDARY_YAXIS                          "CHART2_HID_SCH_CB_SECONDARY_YAXIS"
diff --git a/chart2/source/controller/inc/dlg_DataSource.hxx b/chart2/source/controller/inc/dlg_DataSource.hxx
index d41f002..e5ae6b0 100644
--- a/chart2/source/controller/inc/dlg_DataSource.hxx
+++ b/chart2/source/controller/inc/dlg_DataSource.hxx
@@ -72,9 +72,7 @@ protected:
 
 private:
     DataSourceTabControl* m_pTabControl;
-    OKButton              m_aBtnOK;
-    CancelButton          m_aBtnCancel;
-    HelpButton            m_aBtnHelp;
+    OKButton*             m_pBtnOK;
 
     RangeChooserTabPage * m_pRangeChooserTabePage;
     DataSourceTabPage *   m_pDataSourceTabPage;
diff --git a/chart2/uiconfig/ui/datarangedialog.ui b/chart2/uiconfig/ui/datarangedialog.ui
new file mode 100644
index 0000000..e234b37
--- /dev/null
+++ b/chart2/uiconfig/ui/datarangedialog.ui
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.0 on Tue Jan  7 09:24:43 2014 -->
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="DataRangeDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Customize</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>
+          </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>
+          </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-widgets>
+  </object>
+</interface>
commit a75ed48dcd7c00881773afec53bb89f4f01d8462
Author: Steve Yin <steve_y at apache.org>
Date:   Tue Jan 7 06:02:14 2014 +0000

    Resolves: #i123622# No focus event fired on cell when new sheet is created
    
    (cherry picked from commit 68792ef189457094eb0fa1790c5895d7031571da)
    
    Change-Id: I1e0e523f32b4d6494110b41a7228a8e31784f2f4

diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index 993da13..2f1e514 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -2262,6 +2262,7 @@ uno::Reference < XAccessible >
         mpAccessibleSpreadsheet->acquire();
         mpAccessibleSpreadsheet->Init();
         mbCompleteSheetSelected = IsTableSelected();
+        mpAccessibleSpreadsheet->FireFirstCellFocus(); // i123622
     }
     return mpAccessibleSpreadsheet;
 }
commit 0eb6b6ca8e0476d1f5c36fc54541f6abf687c178
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 7 09:42:40 2014 +0000

    Updated core
    Project: help  2fb21267953bd0f2f2509080cb8de86a50fc0f3f

diff --git a/helpcontent2 b/helpcontent2
index 792806c..2fb2126 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 792806c6d7a924bf04ef90aa582ed5966a72b70b
+Subproject commit 2fb21267953bd0f2f2509080cb8de86a50fc0f3f


More information about the Libreoffice-commits mailing list