chart2/source/view/charttypes/PieChart.cxx | 2 +- chart2/source/view/main/ChartView.cxx | 5 +++-- oox/source/drawingml/chart/seriesconverter.cxx | 3 +++ sd/source/ui/view/drtxtob.cxx | 22 +++++++++++++++++++++- 4 files changed, 28 insertions(+), 4 deletions(-)
New commits: commit b4fafe903e42db1d63550b1d0ad859d786e3688b Author: Muthu Subramanian <[email protected]> Date: Thu Mar 14 12:54:28 2013 +0530 n#734735: Decrease pie chart's thickness. diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx index 916199e..8ce5462 100644 --- a/chart2/source/view/charttypes/PieChart.cxx +++ b/chart2/source/view/charttypes/PieChart.cxx @@ -156,7 +156,7 @@ void PieChart::setScales( const std::vector< ExplicitScaleData >& rScales, bool drawing::Direction3D PieChart::getPreferredDiagramAspectRatio() const { if( m_nDimension == 3 ) - return drawing::Direction3D(1,1,0.25); + return drawing::Direction3D(1,1,0.10); return drawing::Direction3D(1,1,1); } commit def57902b4913417d7c5fef3b00782de9eb7e9d1 Author: Muthu Subramanian <[email protected]> Date: Thu Mar 7 18:17:01 2013 +0530 n#657905: Display the scaled fontsize in the toolbar. Initial set of changes to improve UX for autofit. diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index 7980f14..e659b10 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -45,6 +45,7 @@ #include <editeng/outlobj.hxx> #include <editeng/writingmodeitem.hxx> #include <editeng/frmdiritem.hxx> +#include <editeng/fhgtitem.hxx> #include <sfx2/objface.hxx> @@ -170,6 +171,8 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) case SID_ATTR_CHAR_WEIGHT: case SID_ATTR_CHAR_POSTURE: { + sal_uInt16 stretchX = 100; + sal_uInt16 stretchY = 100; SvxScriptSetItem aSetItem( nSlotId, GetPool() ); aSetItem.GetItemSet().Put( aAttrSet, sal_False ); @@ -180,6 +183,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) // input language should be preferred over // current cursor position to detect script type OutlinerView* pOLV = mpView->GetTextEditOutlinerView(); + SdrOutliner *pOutliner = mpView->GetTextEditOutliner(); if (mpView->ISA(OutlineView)) { @@ -187,6 +191,9 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) mpViewShell->GetActiveWindow()); } + if( pOutliner ) + pOutliner->GetGlobalCharStretching( stretchX, stretchY ); + if(pOLV && !pOLV->GetSelection().HasRange()) { if( mpViewShell && mpViewShell->GetViewShell() && mpViewShell->GetViewShell()->GetWindow() ) @@ -200,9 +207,22 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType ); if( pI ) - aAttrSet.Put( *pI, nWhich ); + { + if( nSlotId == SID_ATTR_CHAR_FONTHEIGHT ) + { + SvxFontHeightItem aFontItem = *(dynamic_cast<const SvxFontHeightItem *>(pI)); + aFontItem.SetHeight(aFontItem.GetHeight(), stretchX, aFontItem.GetPropUnit()); + aAttrSet.Put( aFontItem, nWhich ); + } + else + { + aAttrSet.Put( *pI, nWhich ); + } + } else + { aAttrSet.InvalidateItem( nWhich ); + } } break; commit a95145e52da0f887f3cf96b515681371e76fa4a6 Author: Muthu Subramanian <[email protected]> Date: Wed Mar 27 16:20:42 2013 +0530 n#734735: [PPTX] Use number format, if available, for charts. diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index 157f4cd..e2f9034 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -234,6 +234,9 @@ void DataLabelsConverter::convertFromModel( const Reference< XDataSeries >& rxDa for( DataLabelsModel::DataLabelVector::iterator aIt = mrModel.maPointLabels.begin(), aEnd = mrModel.maPointLabels.end(); aIt != aEnd; ++aIt ) { (*aIt)->maNumberFormat.maFormatCode = mrModel.maNumberFormat.maFormatCode; + if( !mrModel.maNumberFormat.maFormatCode.isEmpty() ) + (*aIt)->maNumberFormat.mbSourceLinked = false; + DataLabelConverter aLabelConv( *this, **aIt ); aLabelConv.convertFromModel( rxDataSeries, rTypeGroup ); } commit 99be3e8dee832ac1a74d6b8a4c552e5296f4fb90 Author: Muthu Subramanian <[email protected]> Date: Wed Mar 20 17:39:30 2013 +0530 n#734735: Use full available size for pie charts. diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 001d008..710b911 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -1417,11 +1417,13 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& uno::Reference< drawing::XShapes > xSeriesTargetInFrontOfAxis(0); uno::Reference< drawing::XShapes > xSeriesTargetBehindAxis(0); VDiagram aVDiagram(xDiagram, aPreferredAspectRatio, nDimensionCount); + bool bIsPieOrDonut = lcl_IsPieOrDonut(xDiagram); {//create diagram aVDiagram.init(xDiagramPlusAxes_Shapes,xDiagramPlusAxes_Shapes,m_xShapeFactory); aVDiagram.createShapes(rAvailablePos,rAvailableSize); xSeriesTargetInFrontOfAxis = aVDiagram.getCoordinateRegion(); - if( !bUseFixedInnerSize ) + // It is preferrable to use full size than minimum for pie charts + if( !bIsPieOrDonut && !bUseFixedInnerSize ) aVDiagram.reduceToMimimumSize(); } @@ -1448,7 +1450,6 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& //use first coosys only so far; todo: calculate for more than one coosys if we have more in future //todo: this is just a workaround at the moment for pie and donut labels - bool bIsPieOrDonut = lcl_IsPieOrDonut(xDiagram); if( !bIsPieOrDonut && (!rVCooSysList.empty()) ) { VCoordinateSystem* pVCooSys = rVCooSysList[0]; _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
