[Libreoffice-commits] core.git: 4 commits - chart2/Library_chartcontroller.mk chart2/source chart2/uiconfig chart2/UIConfig_chart2.mk sc/source

Markus Mohrhard markus.mohrhard at collabora.co.uk
Sun Feb 9 05:17:56 PST 2014


 chart2/Library_chartcontroller.mk                    |    1 
 chart2/UIConfig_chart2.mk                            |    1 
 chart2/source/controller/dialogs/tp_DataSource.cxx   |    8 -
 chart2/source/controller/dialogs/tp_RangeChooser.cxx |   12 -
 chart2/source/view/main/OpenGLRender.cxx             |   13 +-
 chart2/uiconfig/ui/tp_DataSource.ui                  |   28 ++++
 chart2/uiconfig/ui/tp_RangeChooser.ui                |  119 ++++++++++++++++++-
 sc/source/core/tool/interpr1.cxx                     |    2 
 8 files changed, 162 insertions(+), 22 deletions(-)

New commits:
commit 7f8b4e14d787ec648a3de69fd51dc90fcfc876d9
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Sun Feb 9 13:45:21 2014 +0100

    fix memcheck report about uninitialized fVal
    
    Change-Id: I7ae3f6ce0499cc4fda885a13be09063c5b75559d

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index bbc7110..fbf564f 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -1222,7 +1222,7 @@ void ScInterpreter::ScAnd()
                             double fVal;
                             sal_uInt16 nErr = 0;
                             ScValueIterator aValIter( pDok, aRange );
-                            if ( aValIter.GetFirst( fVal, nErr ) )
+                            if ( aValIter.GetFirst( fVal, nErr ) && nErr == 0 )
                             {
                                 bHaveValue = true;
                                 do
commit 33c8b164257a481875dee41be8177bd4cd744dd1
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Sat Feb 8 19:43:38 2014 +0100

    add a few more debug statements
    
    Change-Id: I9c9f4f216f1505d66911cfcf049eb991fbe59ccf

diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx
index 9de0571..cc031f3 100755
--- a/chart2/source/view/main/OpenGLRender.cxx
+++ b/chart2/source/view/main/OpenGLRender.cxx
@@ -1423,9 +1423,12 @@ int OpenGLRender::RenderTextShape()
         MoveModelf(trans, angle, scale);
         m_MVP = m_Projection * m_View * m_Model;
         glBindBuffer(GL_ARRAY_BUFFER, m_VertexBuffer);
+        CHECK_GL_ERROR();
         glBufferData(GL_ARRAY_BUFFER, sizeof(textInfo.vertex), textInfo.vertex, GL_STATIC_DRAW);
+        CHECK_GL_ERROR();
         glUseProgram(m_TextProID);
 
+        CHECK_GL_ERROR();
         glUniformMatrix4fv(m_TextMatrixID, 1, GL_FALSE, &m_MVP[0][0]);
         // 1rst attribute buffer : vertices
         glEnableVertexAttribArray(m_TextVertexID);
@@ -1439,6 +1442,7 @@ int OpenGLRender::RenderTextShape()
             (void*)0            // array buffer offset
             );
         //tex coord
+        CHECK_GL_ERROR();
         glEnableVertexAttribArray(m_TextTexCoordID);
         glBindBuffer(GL_ARRAY_BUFFER, m_TextTexCoordBuf);
         glVertexAttribPointer(
@@ -1450,15 +1454,22 @@ int OpenGLRender::RenderTextShape()
             (void*)0            // array buffer offset
             );
         //texture
+        CHECK_GL_ERROR();
         glBindTexture(GL_TEXTURE_2D, textInfo.texture);
+        CHECK_GL_ERROR();
         glUniform1i(m_TextTexID, 0);
+        CHECK_GL_ERROR();
         //TODO: moggi: get rid fo GL_QUADS
-        glDrawArrays(GL_QUADS, 0, 4);
+        glDrawArrays(GL_QUADS, 0, 3);
+        CHECK_GL_ERROR();
         glDisableVertexAttribArray(m_TextTexCoordID);
+        CHECK_GL_ERROR();
         glDisableVertexAttribArray(m_TextVertexID);
+        CHECK_GL_ERROR();
         glBindTexture(GL_TEXTURE_2D, 0);
         glUseProgram(0);
         glDeleteTextures(1, &textInfo.texture);
+        CHECK_GL_ERROR();
         m_TextInfoList.pop_front();
     }
     CHECK_GL_ERROR();
commit ec4b0ed8e070f2c0955c0a60194328d84490d1bb
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Fri Jan 31 02:23:56 2014 +0100

    improve dialogs for mapped properties
    
    Change-Id: I87e07a30743de0fc30d0caafd35192b18caf3dae

diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk
index d4f309f..bf59cab 100644
--- a/chart2/Library_chartcontroller.mk
+++ b/chart2/Library_chartcontroller.mk
@@ -103,6 +103,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\
     chart2/source/controller/dialogs/dlg_InsertTitle \
     chart2/source/controller/dialogs/dlg_NumberFormat \
     chart2/source/controller/dialogs/dlg_ObjectProperties \
+    chart2/source/controller/dialogs/dlg_PropertyMapping \
     chart2/source/controller/dialogs/dlg_ShapeFont \
     chart2/source/controller/dialogs/dlg_ShapeParagraph \
     chart2/source/controller/dialogs/dlg_View3D \
diff --git a/chart2/UIConfig_chart2.mk b/chart2/UIConfig_chart2.mk
index d9ef7d7..515ddf0 100644
--- a/chart2/UIConfig_chart2.mk
+++ b/chart2/UIConfig_chart2.mk
@@ -37,6 +37,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\
 	chart2/uiconfig/ui/datarangedialog \
 	chart2/uiconfig/ui/dlg_DataLabel \
 	chart2/uiconfig/ui/dlg_InsertErrorBars \
+	chart2/uiconfig/ui/dlg_PropertyMapping \
 	chart2/uiconfig/ui/insertaxisdlg \
 	chart2/uiconfig/ui/insertgriddlg \
 	chart2/uiconfig/ui/inserttitledlg \
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index de931a5..2f18449 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -28,6 +28,7 @@
 #include "tp_DataSourceControls.hxx"
 #include "ControllerLockGuard.hxx"
 #include "DataSourceHelper.hxx"
+#include "dlg_PropertyMapping.hxx"
 #include <com/sun/star/sheet/XRangeSelection.hpp>
 #include <com/sun/star/table/XCellRange.hpp>
 #include <com/sun/star/chart2/XChartType.hpp>
@@ -217,8 +218,7 @@ DataSourceTabPage::DataSourceTabPage(
     get(m_pFT_DATALABELS  ,"FT_DATALABELS");
     get(m_pEDT_CATEGORIES ,"EDT_CATEGORIES");
     get(m_pIMB_RANGE_CAT  ,"IMB_RANGE_CAT");
-
-    m_pBtn_AddMapping = NULL;
+    get(m_pBtn_AddMapping ,"BTN_ADD_MAPPING");
 
     m_pFT_CAPTION->Show(!bHideDescription);
 
@@ -249,9 +249,7 @@ DataSourceTabPage::DataSourceTabPage(
     m_pEDT_CATEGORIES->SetStyle( m_pEDT_CATEGORIES->GetStyle() | WB_FORCECTRLBACKGROUND );
 
     // mapped properties
-#if 0
     m_pBtn_AddMapping->SetClickHdl( LINK( this, DataSourceTabPage, AddMappingHdl ));
-#endif
 
     // set symbol font for arrows
     // note: StarSymbol is substituted to OpenSymbol for OOo
@@ -763,6 +761,8 @@ IMPL_LINK( DataSourceTabPage, RangeUpdateDataHdl, Edit*, pEdit )
 
 IMPL_LINK_NOARG( DataSourceTabPage, AddMappingHdl )
 {
+    PropertyMappingDlg aDlg(this);
+    aDlg.Execute();
     OUString aNewMappingName = "FillColor";
     m_pLB_ROLE->InsertEntry( lcl_GetRoleLBEntry( aNewMappingName, OUString()));
 
diff --git a/chart2/uiconfig/ui/tp_DataSource.ui b/chart2/uiconfig/ui/tp_DataSource.ui
index d36559f..a067a6f 100644
--- a/chart2/uiconfig/ui/tp_DataSource.ui
+++ b/chart2/uiconfig/ui/tp_DataSource.ui
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Fri Jan 17 16:28:14 2014 -->
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
   <!-- interface-requires LibreOffice 1.0 -->
@@ -93,9 +92,11 @@
                 <child>
                   <object class="GtkButton" id="BTN_ADD">
                     <property name="label" translatable="yes">_Add</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                   </object>
                   <packing>
@@ -107,9 +108,11 @@
                 </child>
                 <child>
                   <object class="GtkButton" id="BTN_UP">
+                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="always_show_image">True</property>
                   </object>
                   <packing>
@@ -122,10 +125,12 @@
                 <child>
                   <object class="GtkButton" id="BTN_REMOVE">
                     <property name="label" translatable="yes">_Remove</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="receives_default">True</property>
                     <property name="hexpand">True</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_underline">True</property>
                   </object>
                   <packing>
@@ -137,9 +142,11 @@
                 </child>
                 <child>
                   <object class="GtkButton" id="BTN_DOWN">
+                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
@@ -237,9 +244,11 @@
                 </child>
                 <child>
                   <object class="GtkButton" id="IMB_RANGE_MAIN">
+                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="image">imageIMB_RANGE_MAIN</property>
                   </object>
                   <packing>
@@ -317,9 +326,11 @@
                 </child>
                 <child>
                   <object class="GtkButton" id="IMB_RANGE_CAT">
+                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="image">imageIMB_RANGE_CAT</property>
                   </object>
                   <packing>
@@ -335,6 +346,21 @@
                 <property name="position">5</property>
               </packing>
             </child>
+            <child>
+              <object class="GtkButton" id="BTN_ADD_MAPPING">
+                <property name="label" translatable="yes">Add property mapping</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">6</property>
+              </packing>
+            </child>
           </object>
           <packing>
             <property name="expand">False</property>
commit 8cb2877b2d58d889a314defc5c2fa51d1cf2bde2
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Thu Jan 30 00:21:47 2014 +0100

    add the time based charting stuff to the ui files
    
    Change-Id: I5ffb382f61e56d1c07dfb945f08fa354aea9d5fc

diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index a244504..571b260 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -88,10 +88,9 @@ RangeChooserTabPage::RangeChooserTabPage( Window* pParent
     get(m_pCB_FirstRowAsLabel, "CB_FIRST_ROW_ASLABELS");
     get(m_pCB_FirstColumnAsLabel, "CB_FIRST_COLUMN_ASLABELS");
     get(m_pFTTitle, "STR_PAGE_DATA_RANGE");// OH:remove later with dialog title
-    m_pCB_TimeBased = NULL;
-    m_pFt_TimeBased = NULL;
-    m_pEd_TimeStart = NULL;
-    m_pEd_TimeEnd = NULL;
+    get(m_pCB_TimeBased, "CB_TIME_BASED");
+    get(m_pEd_TimeStart, "ED_TIME_BASED_START");
+    get(m_pEd_TimeEnd, "ED_TIME_BASED_END");
 
     m_pFT_Caption->Show(!bHideDescription);
 
@@ -118,11 +117,9 @@ RangeChooserTabPage::RangeChooserTabPage( Window* pParent
     m_pRB_Rows->SetToggleHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ) );
     m_pCB_FirstRowAsLabel->SetToggleHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ) );
     m_pCB_FirstColumnAsLabel->SetToggleHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ) );
-#if 0
     m_pCB_TimeBased->SetToggleHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ) );
     m_pEd_TimeStart->SetModifyHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ) );
     m_pEd_TimeEnd->SetModifyHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ) );
-#endif
 }
 
 RangeChooserTabPage::~RangeChooserTabPage()
@@ -210,10 +207,7 @@ void RangeChooserTabPage::changeDialogModelAccordingToControls()
             || ( m_pCB_FirstRowAsLabel->IsChecked()    && !m_pRB_Rows->IsChecked() );
         sal_Bool bHasCategories = ( m_pCB_FirstColumnAsLabel->IsChecked() && m_pRB_Columns->IsChecked() )
             || ( m_pCB_FirstRowAsLabel->IsChecked()    && m_pRB_Rows->IsChecked() );
-        sal_Bool bTimeBased = false;
-#if 0
         sal_Bool bTimeBased = m_pCB_TimeBased->IsChecked();
-#endif
 
         Sequence< beans::PropertyValue > aArguments(
             DataSourceHelper::createArguments(
diff --git a/chart2/uiconfig/ui/tp_RangeChooser.ui b/chart2/uiconfig/ui/tp_RangeChooser.ui
index c9bbcc6..bc3a1b3 100644
--- a/chart2/uiconfig/ui/tp_RangeChooser.ui
+++ b/chart2/uiconfig/ui/tp_RangeChooser.ui
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Fri Jan 17 16:26:18 2014 -->
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkImage" id="imageIB_RANGE">
@@ -72,10 +71,12 @@
             </child>
             <child>
               <object class="GtkButton" id="IB_RANGE">
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="receives_default">True</property>
                 <property name="tooltip_markup" translatable="yes">Select data range</property>
+                <property name="use_action_appearance">False</property>
                 <property name="image">imageIB_RANGE</property>
               </object>
               <packing>
@@ -88,15 +89,17 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">2</property>
+            <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkRadioButton" id="RB_DATAROWS">
             <property name="label" translatable="yes">Data series in _rows</property>
+            <property name="use_action_appearance">False</property>
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="receives_default">False</property>
+            <property name="use_action_appearance">False</property>
             <property name="use_underline">True</property>
             <property name="xalign">0</property>
             <property name="active">True</property>
@@ -106,15 +109,17 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">3</property>
+            <property name="position">2</property>
           </packing>
         </child>
         <child>
           <object class="GtkRadioButton" id="RB_DATACOLS">
             <property name="label" translatable="yes">Data series in _columns</property>
+            <property name="use_action_appearance">False</property>
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="receives_default">False</property>
+            <property name="use_action_appearance">False</property>
             <property name="use_underline">True</property>
             <property name="xalign">0</property>
             <property name="active">True</property>
@@ -124,15 +129,17 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">4</property>
+            <property name="position">3</property>
           </packing>
         </child>
         <child>
           <object class="GtkCheckButton" id="CB_FIRST_ROW_ASLABELS">
             <property name="label" translatable="yes">_First row as label</property>
+            <property name="use_action_appearance">False</property>
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="receives_default">False</property>
+            <property name="use_action_appearance">False</property>
             <property name="use_underline">True</property>
             <property name="xalign">0</property>
             <property name="draw_indicator">True</property>
@@ -140,15 +147,17 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">5</property>
+            <property name="position">4</property>
           </packing>
         </child>
         <child>
           <object class="GtkCheckButton" id="CB_FIRST_COLUMN_ASLABELS">
             <property name="label" translatable="yes">F_irst column as label</property>
+            <property name="use_action_appearance">False</property>
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="receives_default">False</property>
+            <property name="use_action_appearance">False</property>
             <property name="use_underline">True</property>
             <property name="xalign">0</property>
             <property name="draw_indicator">True</property>
@@ -156,10 +165,108 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
+            <property name="position">5</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkSeparator" id="separator1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">6</property>
           </packing>
         </child>
         <child>
+          <object class="GtkCheckButton" id="CB_TIME_BASED">
+            <property name="label" translatable="yes">Time based charting</property>
+            <property name="use_action_appearance">False</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="use_action_appearance">False</property>
+            <property name="xalign">0</property>
+            <property name="draw_indicator">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">7</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkGrid" id="grid1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkEntry" id="ED_TIME_BASED_START">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">●</property>
+                <property name="width_chars">5</property>
+                <property name="text" translatable="yes">0</property>
+                <property name="input_purpose">number</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="ED_TIME_BASED_END">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">●</property>
+                <property name="width_chars">5</property>
+                <property name="text" translatable="yes">0</property>
+              </object>
+              <packing>
+                <property name="left_attach">3</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xpad">4</property>
+                <property name="label" translatable="yes">Start Table Index</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xpad">8</property>
+                <property name="label" translatable="yes">End Table Index</property>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">8</property>
+          </packing>
+        </child>
+        <child>
           <object class="GtkLabel" id="STR_PAGE_DATA_RANGE">
             <property name="can_focus">False</property>
             <property name="label" translatable="yes">Data Range</property>
@@ -167,7 +274,7 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">7</property>
+            <property name="position">11</property>
           </packing>
         </child>
       </object>


More information about the Libreoffice-commits mailing list