[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - chart2/source

2013-03-13 Thread Stephan Bergmann
 chart2/source/view/charttypes/PieChart.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit e15488286d2f5eb4fb5414cf3a17690b36eed8ac
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Mar 13 09:27:13 2013 +0100

-Werror=shadow/-Werror=unused-variable

...picking the corresponding fix from 
bab961dd0a5abe985e2787aa789eae7a4d6cbbd9
Fix chart2 build.

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index bb68948..916199e 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -391,7 +391,6 @@ void PieChart::createShapes()
 if( !bIsVisible )
 continue;
 
-double fLogicZ = -1.0;//as defined
 double fDepth  = this-getTransformedDepth() * (n3DRelativeHeight 
/ 100.0);
 
 uno::Reference drawing::XShapes  xSeriesGroupShape_Shapes = 
getSeriesGroupShape(pSeries, xSeriesTarget);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - chart2/source

2013-03-13 Thread Caolán McNamara
 chart2/source/view/charttypes/PieChart.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a42076ead5adf56ab8e1173353b5201e7e3672e3
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Mar 13 09:13:47 2013 +

WaE: fLogicZ duplicated

Change-Id: I92a8ebee9524e40c301bf1de52d5b986323275f2

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index 916199e..8b6d4bc 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -442,7 +442,7 @@ void PieChart::createShapes()
 }
 
 //create data point
-double fLogicZ = -1.0; // For 3D pie chart label position
+fLogicZ = -1.0; // For 3D pie chart label position
 uno::Referencedrawing::XShape xPointShape(
 createDataPoint( xSeriesGroupShape_Shapes, xPointProperties
 , fUnitCircleStartAngleDegree, 
fUnitCircleWidthAngleDegree
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - chart2/source

2013-03-13 Thread Caolán McNamara
 chart2/source/view/charttypes/PieChart.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 83bdce645a7fd4843630fc9a378de8620d48c6c4
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Mar 13 09:16:32 2013 +

Revert WaE: fLogicZ duplicated

This reverts commit a42076ead5adf56ab8e1173353b5201e7e3672e3.

diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index 8b6d4bc..916199e 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -442,7 +442,7 @@ void PieChart::createShapes()
 }
 
 //create data point
-fLogicZ = -1.0; // For 3D pie chart label position
+double fLogicZ = -1.0; // For 3D pie chart label position
 uno::Referencedrawing::XShape xPointShape(
 createDataPoint( xSeriesGroupShape_Shapes, xPointProperties
 , fUnitCircleStartAngleDegree, 
fUnitCircleWidthAngleDegree
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - chart2/source sc/source

2013-03-11 Thread Armin Le Grand
 chart2/source/model/main/Diagram.cxx  |   11 +--
 chart2/source/model/template/PieChartType.cxx |9 -
 chart2/source/view/charttypes/PieChart.cxx|   14 +-
 chart2/source/view/main/ChartView.cxx |   23 +++
 sc/source/filter/excel/xichart.cxx|1 +
 sc/source/filter/inc/xlchart.hxx  |6 ++
 6 files changed, 60 insertions(+), 4 deletions(-)

New commits:
commit a8f081d14741cdc1c0df272adf1f26839d2f0aee
Author: Armin Le Grand a...@apache.org
Date:   Thu Jun 28 10:01:49 2012 +

Resolves: #119989# Support relative 3D pie chart height when importing 
charts.

Reported by: Yan Li
Patch by: Yan Li, Tan Li, alg
Review by: alg(cherry picked from commit 
2b1cedbe547ea8f7979f91873dd6e602ebb08a7b)

Signed-off-by: Fridrich Å trba fridrich.st...@bluewin.ch

(cherry picked from commit ded39ea57b25617071012640cbaebaaf72a05744)

Change-Id: Ibc6f070021c79809c651ba789409a5fb5096c185
Reviewed-on: https://gerrit.libreoffice.org/2671
Reviewed-by: Thorsten Behrens tbehr...@suse.com
Tested-by: Thorsten Behrens tbehr...@suse.com

diff --git a/chart2/source/model/main/Diagram.cxx 
b/chart2/source/model/main/Diagram.cxx
index 1cca41c..1756c822 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -73,7 +73,8 @@ enum
 PROP_DIAGRAM_PERSPECTIVE,
 PROP_DIAGRAM_ROTATION_HORIZONTAL,
 PROP_DIAGRAM_ROTATION_VERTICAL,
-PROP_DIAGRAM_MISSING_VALUE_TREATMENT
+PROP_DIAGRAM_MISSING_VALUE_TREATMENT,
+PROP_DIAGRAM_3DRELATIVEHEIGHT
 };
 
 void lcl_AddPropertiesToVector(
@@ -166,6 +167,11 @@ void lcl_AddPropertiesToVector(
   ::getCppuType( reinterpret_cast const sal_Int32 * (0)),
   beans::PropertyAttribute::BOUND
   | beans::PropertyAttribute::MAYBEVOID ));
+   rOutProperties.push_back(
+   Property( C2U(3DRelativeHeight),
+  PROP_DIAGRAM_3DRELATIVEHEIGHT,
+  ::getCppuType( reinterpret_cast const sal_Int32 * (0)),
+  beans::PropertyAttribute::MAYBEVOID ));
 }
 
 struct StaticDiagramDefaults_Initializer
@@ -186,7 +192,8 @@ private:
 ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_DIAGRAM_INCLUDE_HIDDEN_CELLS, true );
 ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_DIAGRAM_RIGHT_ANGLED_AXES, false );
 ::chart::PropertyHelper::setPropertyValueDefault sal_Int32 ( 
rOutMap, PROP_DIAGRAM_STARTING_ANGLE, 90 );
-::chart::SceneProperties::AddDefaultsToMap( rOutMap );
+::chart::PropertyHelper::setPropertyValueDefault sal_Int32 ( 
rOutMap, PROP_DIAGRAM_3DRELATIVEHEIGHT, 100 );
+ ::chart::SceneProperties::AddDefaultsToMap( rOutMap );
 }
 };
 
diff --git a/chart2/source/model/template/PieChartType.cxx 
b/chart2/source/model/template/PieChartType.cxx
index 450a622..05b8219 100644
--- a/chart2/source/model/template/PieChartType.cxx
+++ b/chart2/source/model/template/PieChartType.cxx
@@ -42,7 +42,8 @@ namespace
 
 enum
 {
-PROP_PIECHARTTYPE_USE_RINGS
+PROP_PIECHARTTYPE_USE_RINGS,
+PROP_PIECHARTTYPE_3DRELATIVEHEIGHT
 };
 
 static void lcl_AddPropertiesToVector(
@@ -54,6 +55,11 @@ static void lcl_AddPropertiesToVector(
   ::getBooleanCppuType(),
   beans::PropertyAttribute::BOUND
   | beans::PropertyAttribute::MAYBEDEFAULT ));
+rOutProperties.push_back(
+Property( C2U(3DRelativeHeight),
+  PROP_PIECHARTTYPE_3DRELATIVEHEIGHT,
+  ::getCppuType( reinterpret_cast const sal_Int32 * (0)),
+  beans::PropertyAttribute::MAYBEVOID ));
 }
 
 struct StaticPieChartTypeDefaults_Initializer
@@ -68,6 +74,7 @@ private:
 void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap  rOutMap )
 {
 ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, 
PROP_PIECHARTTYPE_USE_RINGS, false );
+::chart::PropertyHelper::setPropertyValueDefault sal_Int32 ( 
rOutMap, PROP_PIECHARTTYPE_3DRELATIVEHEIGHT, 100 );
 }
 };
 
diff --git a/chart2/source/view/charttypes/PieChart.cxx 
b/chart2/source/view/charttypes/PieChart.cxx
index e8fc689..bb68948 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -340,6 +340,17 @@ void PieChart::createShapes()
 
 m_aLabelInfoList.clear();
 ::rtl::math::setNan(m_fMaxOffset);
+sal_Int32 n3DRelativeHeight = 100;
+uno::Reference beans::XPropertySet  xPropertySet( m_xChartTypeModel, 
uno::UNO_QUERY );
+if ( (m_nDimension==3)  xPropertySet.is())
+{
+try
+{
+uno::Any aAny = xPropertySet-getPropertyValue( 
C2U(3DRelativeHeight) );
+aAny = n3DRelativeHeight;
+}
+catch(const uno::Exception e) {}
+}
 
 //=
 for( 

[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - chart2/source

2013-03-04 Thread Markus Mohrhard
 chart2/source/controller/dialogs/tp_ErrorBars.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 68bc2384a250d3b6cb3017ba91c0dac5e8b6707f
Author: Markus Mohrhard markus.mohrh...@googlemail.com
Date:   Mon Mar 4 13:52:11 2013 +0100

we need to use GetParentDialog nowadays, fdo#60253

Change-Id: I6317ce1f99af58439f7009cac5a4bc133e404dbf
(cherry picked from commit 1f810b3adf030d4e20e71845bd6368b119a53bc7)
Reviewed-on: https://gerrit.libreoffice.org/2537
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/chart2/source/controller/dialogs/tp_ErrorBars.cxx 
b/chart2/source/controller/dialogs/tp_ErrorBars.cxx
index 6956550..70b3128 100644
--- a/chart2/source/controller/dialogs/tp_ErrorBars.cxx
+++ b/chart2/source/controller/dialogs/tp_ErrorBars.cxx
@@ -35,7 +35,7 @@ ErrorBarsTabPage::ErrorBarsTabPage( Window* pParent, const 
SfxItemSet rInAttrs
 m_aErrorBarResources(
 this,
 // the parent is the tab control, of which the parent is the dialog
-dynamic_cast Dialog * ( pParent-GetParent() ),
+pParent-GetParentDialog(),
 rInAttrs, /* bNoneAvailable = */ false )
 {
 FreeResource();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - chart2/source

2013-02-22 Thread Eike Rathke
 chart2/source/tools/ExplicitCategoriesProvider.cxx |   24 +
 1 file changed, 15 insertions(+), 9 deletions(-)

New commits:
commit 74d1466914547aaa5369f18727c228db9ce88121
Author: Eike Rathke er...@redhat.com
Date:   Tue Feb 19 19:22:27 2013 +0100

do not access vector elements beyond size, rhbz#847519 related

The actual bug (crash) is not triggered anymore because the categories
are assembled differently, nevertheless the code in question could
expose the same behavior under different preconditions.

Change-Id: Ic37f6b34effaf4e5252e80aab46b021547b36efb
(cherry picked from commit d1ba2cd612a4c39976e2980c7dc4e3fa38c88470)
Reviewed-on: https://gerrit.libreoffice.org/2272
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx 
b/chart2/source/tools/ExplicitCategoriesProvider.cxx
index e3d800f..00b481c 100644
--- a/chart2/source/tools/ExplicitCategoriesProvider.cxx
+++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx
@@ -353,11 +353,14 @@ Sequence OUString  lcl_getExplicitSimpleCategories(
 }
 for( aOuterIt=rComplexCats.begin(); aOuterIt != aOuterEnd; ++aOuterIt )
 {
-sal_Int32 nCurrentCount = lcl_getCategoryCount( *aOuterIt );
-if( nCurrentCount nMaxCategoryCount )
+if ( !aOuterIt-empty() )
 {
-ComplexCategory rComplexCategory = aOuterIt-back();
-rComplexCategory.Count += (nMaxCategoryCount-nCurrentCount);
+sal_Int32 nCurrentCount = lcl_getCategoryCount( *aOuterIt );
+if( nCurrentCount nMaxCategoryCount )
+{
+ComplexCategory rComplexCategory = aOuterIt-back();
+rComplexCategory.Count += 
(nMaxCategoryCount-nCurrentCount);
+}
 }
 }
 }
@@ -389,12 +392,15 @@ Sequence OUString  lcl_getExplicitSimpleCategories(
 OUString aText;
 for( aOuterIt=aComplexCatsPerIndex.begin() ; aOuterIt != 
aOuterEnd; ++aOuterIt )
 {
-OUString aAddText = (*aOuterIt)[nN].Text;
-if( !aAddText.isEmpty() )
+if ( static_castsize_t(nN)  aOuterIt-size() )
 {
-if(!aText.isEmpty())
-aText += aSpace;
-aText += aAddText;
+OUString aAddText = (*aOuterIt)[nN].Text;
+if( !aAddText.isEmpty() )
+{
+if(!aText.isEmpty())
+aText += aSpace;
+aText += aAddText;
+}
 }
 }
 aRet[nN]=aText;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits