ooo-build r11627 - in trunk: . patches/test



Author: kyoshida
Date: Tue Feb 19 04:29:14 2008
New Revision: 11627
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11627&view=rev

Log:
2008-02-18  Kohei Yoshida  <kyoshida novell com>

	* patches/test/chart-stacked-category-labels-chart2.diff:
	* patches/test/chart-stacked-category-labels-sc.diff: on-going effort to
	support stacked category labels in bar charts.  still trying to figure
	out how the chart2 code works.


Added:
   trunk/patches/test/chart-stacked-category-labels-chart2.diff
   trunk/patches/test/chart-stacked-category-labels-sc.diff
Modified:
   trunk/ChangeLog

Added: trunk/patches/test/chart-stacked-category-labels-chart2.diff
==============================================================================
--- (empty file)
+++ trunk/patches/test/chart-stacked-category-labels-chart2.diff	Tue Feb 19 04:29:14 2008
@@ -0,0 +1,386 @@
+Only in chart2: output.log
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=chart2.vpj chart2.clean/source/tools/CommonConverters.cxx chart2/source/tools/CommonConverters.cxx
+--- chart2.clean/source/tools/CommonConverters.cxx	2008-02-15 09:45:06.000000000 -0500
++++ chart2/source/tools/CommonConverters.cxx	2008-02-15 18:17:38.000000000 -0500
+@@ -816,6 +816,12 @@ uno::Sequence< rtl::OUString > DataSeque
+     if( xTextualDataSequence.is() )
+     {
+         aResult = xTextualDataSequence->getTextualData();
++        for (sal_Int16 i = 0; i < aResult.getLength(); ++i)
++        {
++            fprintf(stdout, "chart::DataSequenceToStringSequence: string = '%s'\n",
++                    rtl::OUStringToOString(aResult[i], RTL_TEXTENCODING_UTF8).getStr());
++            fflush(stdout);
++        }
+     }
+     else
+     {
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=chart2.vpj chart2.clean/source/view/axes/VCartesianAxis.cxx chart2/source/view/axes/VCartesianAxis.cxx
+--- chart2.clean/source/view/axes/VCartesianAxis.cxx	2008-02-15 09:45:05.000000000 -0500
++++ chart2/source/view/axes/VCartesianAxis.cxx	2008-02-18 23:16:39.000000000 -0500
+@@ -74,7 +74,7 @@
+ 
+ #include <algorithm>
+ #include <memory>
+-
++#include <stdio.h>
+ //.............................................................................
+ namespace chart
+ {
+@@ -637,6 +637,7 @@ bool VCartesianAxis::createTextShapes(
+                      , AxisLabelProperties& rAxisLabelProperties
+                      , TickmarkHelper_2D* pTickmarkHelper )
+ {
++    fprintf(stdout, "VCartesianAxis::createTextShapes: --begin\n");fflush(stdout);
+     //returns true if the text shapes have been created succesfully
+     //otherwise false - in this case the AxisLabelProperties have changed
+     //and contain new instructions for the next try for text shape creation
+@@ -652,6 +653,9 @@ bool VCartesianAxis::createTextShapes(
+ 
+     B2DVector aTextToTickDistance( pTickmarkHelper->getDistanceTickToText( m_aAxisProperties ) );
+ 
++    fprintf(stdout, "VCartesianAxis::createTextShapes: text to tick distance: (%g,%g)\n",
++            aTextToTickDistance.getX(), aTextToTickDistance.getY());fflush(stdout);
++
+     TickInfo* pPreviousVisibleTickInfo = NULL;
+     TickInfo* pPREPreviousVisibleTickInfo = NULL;
+     TickInfo* pLastVisibleNeighbourTickInfo = NULL;
+@@ -699,6 +703,7 @@ bool VCartesianAxis::createTextShapes(
+         ; pTickInfo
+         ; pTickInfo = rTickIter.nextInfo(), nTick++ )
+     {
++        fprintf(stdout, "VCartesianAxis::createTextShapes:   --- tick ---\n");fflush(stdout);
+         pLastVisibleNeighbourTickInfo = bIsStaggered ?
+                     pPREPreviousVisibleTickInfo : pPreviousVisibleTickInfo;
+ 
+@@ -757,6 +762,9 @@ bool VCartesianAxis::createTextShapes(
+         else
+             aLabel = aFixedNumberFormatter.getFormattedString( pTickInfo->fUnscaledTickValue, nExtraColor, bHasExtraColor );
+ 
++        fprintf(stdout, "VCartesianAxis::createTextShapes:   label = '%s'\n",
++                rtl::OUStringToOString(aLabel, RTL_TEXTENCODING_UTF8).getStr());fflush(stdout);
++
+         if(pColorAny)
+             *pColorAny = uno::makeAny(bHasExtraColor?nExtraColor:nColor);
+ 
+@@ -766,6 +774,9 @@ bool VCartesianAxis::createTextShapes(
+             static_cast<sal_Int32>(aTickScreenPos2D.getX())
+             ,static_cast<sal_Int32>(aTickScreenPos2D.getY()));
+ 
++        fprintf(stdout, "VCartesianAxis::createTextShapes:   anchor screen pos: (%ld,%ld)\n", 
++                aAnchorScreenPosition2D.X, aAnchorScreenPosition2D.Y);fflush(stdout);
++
+         //create single label
+         if(!pTickInfo->xTextShape.is())
+             pTickInfo->xTextShape = createSingleLabel( m_xShapeFactory, xTarget
+@@ -777,6 +788,14 @@ bool VCartesianAxis::createTextShapes(
+ 
+         recordMaximumTextSize( pTickInfo->xTextShape, rAxisLabelProperties.fRotationAngleDegree );
+ 
++//      if (aTextToTickDistance.getY() > 200)
++//      {
++//          aAnchorScreenPosition2D.Y += 1000;
++//          uno::Any aATransformation = ShapeFactory::makeTransformation( aAnchorScreenPosition2D, 0.0 );
++//          Reference< drawing::XShape > xShape2DText = ShapeFactory(m_xShapeFactory).createText(
++//              xTarget, rtl::OUString::createFromAscii("Foo"), aPropNames, aPropValues, aATransformation );
++//      }
++
+         //if NO OVERLAP -> remove overlapping shapes
+         if( pLastVisibleNeighbourTickInfo && !rAxisLabelProperties.bOverlapAllowed )
+         {
+@@ -813,6 +832,8 @@ bool VCartesianAxis::createTextShapes(
+         pPREPreviousVisibleTickInfo = pPreviousVisibleTickInfo;
+         pPreviousVisibleTickInfo = pTickInfo;
+     }
++    fprintf(stdout, "VCartesianAxis::createTextShapes: --end [max = (%d,%d)]\n", 
++            m_nMaximumTextWidthSoFar, m_nMaximumTextHeightSoFar);fflush(stdout);
+     return true;
+ }
+ 
+@@ -1064,6 +1085,7 @@ void SAL_CALL VCartesianAxis::createMaxi
+ 
+ void SAL_CALL VCartesianAxis::updatePositions()
+ {
++    fprintf(stdout, "VCartesianAxis::updatePositions: --begin\n");fflush(stdout);
+     //-----------------------------------------
+     //update positions of labels
+     if( m_aAxisProperties.m_bDisplayLabels )
+@@ -1090,8 +1112,12 @@ void SAL_CALL VCartesianAxis::updatePosi
+             if( xShape2DText.is() )
+             {
+                 B2DVector aTextToTickDistance( pTickmarkHelper2D->getDistanceTickToText( m_aAxisProperties ) );
++                fprintf(stdout, "VCartesianAxis::updatePositions:   text-to-tick distance = (%g,%g)\n",
++                        aTextToTickDistance.getX(), aTextToTickDistance.getY());fflush(stdout);
+                 B2DVector aTickScreenPos2D( pTickInfo->aTickScreenPosition );
+                 aTickScreenPos2D += aTextToTickDistance;
++                fprintf(stdout, "VCartesianAxis::updatePositions:   tick pos = (%g,%g)\n",
++                        aTickScreenPos2D.getX(), aTickScreenPos2D.getY());fflush(stdout);
+                 awt::Point aAnchorScreenPosition2D(
+                     static_cast<sal_Int32>(aTickScreenPos2D.getX())
+                     ,static_cast<sal_Int32>(aTickScreenPos2D.getY()));
+@@ -1123,6 +1149,7 @@ void SAL_CALL VCartesianAxis::updatePosi
+ 
+         doStaggeringOfLabels( m_aAxisLabelProperties, pTickmarkHelper2D );
+     }
++    fprintf(stdout, "VCartesianAxis::updatePositions: --end\n");fflush(stdout);
+ }
+ 
+ void SAL_CALL VCartesianAxis::createShapes()
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=chart2.vpj chart2.clean/source/view/axes/VCartesianCoordinateSystem.cxx chart2/source/view/axes/VCartesianCoordinateSystem.cxx
+--- chart2.clean/source/view/axes/VCartesianCoordinateSystem.cxx	2008-02-15 09:45:05.000000000 -0500
++++ chart2/source/view/axes/VCartesianCoordinateSystem.cxx	2008-02-18 23:17:11.000000000 -0500
+@@ -139,9 +139,13 @@ void VCartesianCoordinateSystem::createV
+     
+     for( nDimensionIndex = 0; nDimensionIndex < nDimensionCount; nDimensionIndex++ )
+     {
++        fprintf(stdout, "VCartesianCoordinateSystem::createVAxisList:   dim = %ld\n", nDimensionIndex);fflush(stdout);
++
+         sal_Int32 nMaxAxisIndex = m_xCooSysModel->getMaximumAxisIndexByDimension(nDimensionIndex);
+         for( sal_Int32 nAxisIndex = 0; nAxisIndex <= nMaxAxisIndex; nAxisIndex++ )
+         {
++            fprintf(stdout, "VCartesianCoordinateSystem::createVAxisList:   axis = %ld\n", nAxisIndex);fflush(stdout);
++
+             Reference< XAxis > xAxis = this->getAxisByDimension(nDimensionIndex,nAxisIndex);
+             if(!xAxis.is() || !AxisHelper::shouldAxisBeDisplayed( xAxis, m_xCooSysModel ))
+                 continue;
+@@ -168,6 +172,7 @@ void VCartesianCoordinateSystem::createV
+             apVAxis->initAxisLabelProperties(rFontReferenceSize,rMaximumSpaceForLabels);
+         }
+     }
++    fprintf(stdout, "VCartesianCoordinateSystem::createVAxisList: --end\n");fflush(stdout);
+ }
+ 
+ void VCartesianCoordinateSystem::initVAxisInList()
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=chart2.vpj chart2.clean/source/view/axes/VCoordinateSystem.cxx chart2/source/view/axes/VCoordinateSystem.cxx
+--- chart2.clean/source/view/axes/VCoordinateSystem.cxx	2008-02-15 09:45:05.000000000 -0500
++++ chart2/source/view/axes/VCoordinateSystem.cxx	2008-02-18 17:54:33.000000000 -0500
+@@ -485,6 +485,7 @@ void VCoordinateSystem::setExplicitScale
+ 
+ void VCoordinateSystem::createMaximumAxesLabels()
+ {
++    fprintf(stdout, "VCoordinateSystem::createMaximumAxesLabels: --begin\n");fflush(stdout);
+     tVAxisMap::iterator aIt( m_aAxisMap.begin() );
+     tVAxisMap::const_iterator aEnd( m_aAxisMap.end() );
+     for( ; aIt != aEnd; ++aIt )
+@@ -497,6 +498,7 @@ void VCoordinateSystem::createMaximumAxe
+             pVAxis->createMaximumLabels();
+         }
+     }
++    fprintf(stdout, "VCoordinateSystem::createMaximumAxesLabels: --end\n");fflush(stdout);
+ }
+ void VCoordinateSystem::createAxesLabels()
+ {
+@@ -504,6 +506,7 @@ void VCoordinateSystem::createAxesLabels
+     tVAxisMap::const_iterator aEnd( m_aAxisMap.end() );
+     for( ; aIt != aEnd; ++aIt )
+     {
++        fprintf(stdout, "VCoordinateSystem::createAxesLabels: --- axis ---\n");fflush(stdout);
+         VAxisBase* pVAxis = aIt->second.get();
+         if( pVAxis )
+         {
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=chart2.vpj chart2.clean/source/view/diagram/VDiagram.cxx chart2/source/view/diagram/VDiagram.cxx
+--- chart2.clean/source/view/diagram/VDiagram.cxx	2008-02-15 09:45:05.000000000 -0500
++++ chart2/source/view/diagram/VDiagram.cxx	2008-02-18 03:04:41.000000000 -0500
+@@ -788,11 +788,30 @@ void VDiagram::reduceToMimimumSize()
+     awt::Point aNewPos( m_aCurrentPosWithoutAxes );
+     awt::Size aNewSize( m_aCurrentSizeWithoutAxes );
+ 
++    fprintf(stdout, "VDiagram::adjustInnerSize: consumed outer (x = %ld, y = %ld, w = %ld, h = %ld)\n",
++            rConsumedOuterRect.getMinX(), rConsumedOuterRect.getMinY(), 
++            static_cast<sal_Int32>(rConsumedOuterRect.getWidth()), 
++            static_cast<sal_Int32>(rConsumedOuterRect.getHeight()));fflush(stdout);
++    fprintf(stdout, "VDiagram::adjustInnerSize: current shape (x = %ld, y = %ld, w = %ld, h = %ld)\n",
++            aNewPos.X, aNewPos.Y, aNewSize.Width, aNewSize.Height);
++    fprintf(stdout, "VDiagram::adjustInnerSize: available area (x = %ld, y = %ld, w = %ld, h = %ld)\n",
++            m_aAvailablePosIncludingAxes.X, m_aAvailablePosIncludingAxes.Y, 
++            m_aAvailableSizeIncludingAxes.Width, m_aAvailableSizeIncludingAxes.Height);
++    fflush(stdout);
++//  return adjustPosAndSize(m_aAvailablePosIncludingAxes, m_aAvailableSizeIncludingAxes);
++//  return adjustPosAndSize( aNewPos, aNewSize );
++
+     ::basegfx::B2IRectangle rAvailableOuterRect(
+         BaseGFXHelper::makeRectangle(m_aAvailablePosIncludingAxes,m_aAvailableSizeIncludingAxes) );
++    fprintf(stdout, "VDiagram::adjustInnerSize: available outer (x = %ld, y = %ld, w = %ld, h = %ld)\n",
++            rAvailableOuterRect.getMinX(), rAvailableOuterRect.getMinY(), 
++            static_cast<sal_Int32>(rAvailableOuterRect.getWidth()), 
++            static_cast<sal_Int32>(rAvailableOuterRect.getHeight()));fflush(stdout);
+     
+     sal_Int32 nDeltaWidth = static_cast<sal_Int32>(rAvailableOuterRect.getWidth() - rConsumedOuterRect.getWidth());
+     sal_Int32 nDeltaHeight = static_cast<sal_Int32>(rAvailableOuterRect.getHeight() - rConsumedOuterRect.getHeight());
++    fprintf(stdout, "VDiagram::adjustInnerSize: 1  delta width = %ld  delta height = %ld\n", 
++            nDeltaWidth, nDeltaHeight);fflush(stdout);
+     if( (aNewSize.Width + nDeltaWidth) < rAvailableOuterRect.getWidth()/3 )
+         nDeltaWidth = static_cast<sal_Int32>(rAvailableOuterRect.getWidth()/3 - aNewSize.Width);
+     aNewSize.Width += nDeltaWidth;
+@@ -800,6 +819,8 @@ void VDiagram::reduceToMimimumSize()
+     if( (aNewSize.Height + nDeltaHeight) < rAvailableOuterRect.getHeight()/3 )
+         nDeltaHeight = static_cast<sal_Int32>(rAvailableOuterRect.getHeight()/3 - aNewSize.Height);
+     aNewSize.Height += nDeltaHeight;
++    fprintf(stdout, "VDiagram::adjustInnerSize: 2  delta width = %ld  delta height = %ld\n", 
++            nDeltaWidth, nDeltaHeight);fflush(stdout);
+ 
+     sal_Int32 nDiffLeft = rConsumedOuterRect.getMinX() - rAvailableOuterRect.getMinX();
+     sal_Int32 nDiffRight = rAvailableOuterRect.getMaxX() - rConsumedOuterRect.getMaxX();
+@@ -829,6 +850,9 @@ void VDiagram::reduceToMimimumSize()
+             aNewPos.Y += abs(nDeltaHeight);
+     }
+ 
++    fprintf(stdout, "VDiagram::adjustInnerSize: new shape (x = %ld, y = %ld, w = %ld, h = %ld)\n",
++            aNewPos.X, aNewPos.Y, aNewSize.Width, aNewSize.Height);fflush(stdout);
++
+     return adjustPosAndSize( aNewPos, aNewSize );
+ }
+ 
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=chart2.vpj chart2.clean/source/view/main/ChartView.cxx chart2/source/view/main/ChartView.cxx
+--- chart2.clean/source/view/main/ChartView.cxx	2008-02-15 09:45:05.000000000 -0500
++++ chart2/source/view/main/ChartView.cxx	2008-02-18 23:20:59.000000000 -0500
+@@ -158,7 +158,7 @@
+ #ifndef _COM_SUN_STAR_UTIL_NUMBERFORMAT_HPP_
+ #include <com/sun/star/util/NumberFormat.hpp>
+ #endif
+-
++#include <stdio.h>
+ //.............................................................................
+ namespace chart
+ {
+@@ -1079,12 +1079,14 @@ void ChartView::impl_createDiagramAndCon
+             , const awt::Size& rAvailableSize
+             , const awt::Size& rPageSize )
+ {
++    fprintf(stdout, "ChartView::impl_createDiagramAndContent: --begin ++++++++++++++++++++++++++++++\n");fflush(stdout);
+ //     sal_Int32 nDiagramIndex = 0;//todo if more than one diagam is supported
+     uno::Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( m_xChartModel ) );
+     if( !xDiagram.is())
+         return;
+ 
+     sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram );
++    fprintf(stdout, "ChartView::impl_createDiagramAndContent:   dimension count = %ld\n", nDimensionCount);fflush(stdout);
+     if(!nDimensionCount)
+     {
+         //@todo handle mixed dimension
+@@ -1093,9 +1095,16 @@ void ChartView::impl_createDiagramAndCon
+ 
+     ::basegfx::B2IRectangle aAvailableOuterRect( BaseGFXHelper::makeRectangle(rAvailablePos,rAvailableSize) );
+ 
++    fprintf(stdout, "ChartView::impl_createDiagramAndContent:   available outer: [ min: (%ld,%ld); max (%ld,%ld) ]\n",
++            aAvailableOuterRect.getMinX(), aAvailableOuterRect.getMinY(),
++            aAvailableOuterRect.getMaxX(), aAvailableOuterRect.getMaxY());
++
+     const std::vector< VCoordinateSystem* >& rVCooSysList( rSeriesPlotterContainer.getCooSysList() );
+     const std::vector< VSeriesPlotter* >& rSeriesPlotterList( rSeriesPlotterContainer.getSeriesPlotterList() );
+ 
++    fprintf(stdout, "ChartView::impl_createDiagramAndContent:   coordinate system size = %ld\n", rVCooSysList.size());
++    fflush(stdout);
++
+     //create VAxis, so they can give necessary information for automatic scaling
+     uno::Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( m_xChartModel, uno::UNO_QUERY );
+     size_t nC = 0;
+@@ -1134,12 +1143,24 @@ void ChartView::impl_createDiagramAndCon
+     }
+ 
+     uno::Reference< drawing::XShapes > xTextTargetShapes( ShapeFactory(m_xShapeFactory).createGroup2D(xDiagramPlusAxes_Shapes) );
+-
++    {
++        uno::Reference< drawing::XShape > xBoundingShape( xDiagramPlusAxes_Shapes, uno::UNO_QUERY );
++    
++        ::basegfx::B2IRectangle aFirstConsumedOuterRect( ShapeFactory::getRectangleOfShape(xBoundingShape) );
++    
++        fprintf(stdout, "ChartView::impl_createDiagramAndContent:   check %d: [ min: (%ld,%ld); max (%ld,%ld); width %ld; height %ld ]\n",
++                __LINE__,
++                aFirstConsumedOuterRect.getMinX(), aFirstConsumedOuterRect.getMinY(),
++                aFirstConsumedOuterRect.getMaxX(), aFirstConsumedOuterRect.getMaxY(),
++                static_cast<sal_Int32>(aFirstConsumedOuterRect.getWidth()),
++                static_cast<sal_Int32>(aFirstConsumedOuterRect.getHeight()));
++    }
+     // - create axis and grids for all coordinate systems
+     
+     //init all coordinate systems
+     for( nC=0; nC < rVCooSysList.size(); nC++)
+     {
++        fprintf(stdout, "ChartView::impl_createDiagramAndContent:   coordinate %d\n", nC);fflush(stdout);
+         VCoordinateSystem* pVCooSys = rVCooSysList[nC];
+         pVCooSys->initPlottingTargets(xCoordinateRegionTarget,xTextTargetShapes,m_xShapeFactory);
+ 
+@@ -1159,11 +1180,29 @@ void ChartView::impl_createDiagramAndCon
+ 
+         ::basegfx::B2IRectangle aFirstConsumedOuterRect( ShapeFactory::getRectangleOfShape(xBoundingShape) );
+ 
++        fprintf(stdout, "ChartView::impl_createDiagramAndContent:   initial: [ min: (%ld,%ld); max (%ld,%ld); width %ld; height %ld ]\n",
++                aFirstConsumedOuterRect.getMinX(), aFirstConsumedOuterRect.getMinY(),
++                aFirstConsumedOuterRect.getMaxX(), aFirstConsumedOuterRect.getMaxY(),
++                static_cast<sal_Int32>(aFirstConsumedOuterRect.getWidth()),
++                static_cast<sal_Int32>(aFirstConsumedOuterRect.getHeight()));
++
+         VCoordinateSystem* pVCooSys = rVCooSysList[0];
+         pVCooSys->createMaximumAxesLabels();
+         
+         ::basegfx::B2IRectangle aConsumedOuterRect( ShapeFactory::getRectangleOfShape(xBoundingShape) );
++        fprintf(stdout, "ChartView::impl_createDiagramAndContent:   after axis labels: [ min: (%ld,%ld); max (%ld,%ld); width %ld; height %ld ]\n",
++                aConsumedOuterRect.getMinX(), aConsumedOuterRect.getMinY(),
++                aConsumedOuterRect.getMaxX(), aConsumedOuterRect.getMaxY(), 
++                static_cast<sal_Int32>(aConsumedOuterRect.getWidth()),
++                static_cast<sal_Int32>(aConsumedOuterRect.getHeight()));
++
+         ::basegfx::B2IRectangle aNewInnerRect( aVDiagram.adjustInnerSize( aConsumedOuterRect ) );
++        fprintf(stdout, "ChartView::impl_createDiagramAndContent:   first adjustment: [ min: (%ld,%ld); max (%ld,%ld); width %ld; height %ld  ]\n",
++                aNewInnerRect.getMinX(), aNewInnerRect.getMinY(),
++                aNewInnerRect.getMaxX(), aNewInnerRect.getMaxY(),
++                static_cast<sal_Int32>(aNewInnerRect.getWidth()),
++                static_cast<sal_Int32>(aNewInnerRect.getHeight()));
++        fflush(stdout);
+ 
+         pVCooSys->setTransformationSceneToScreen( B3DHomMatrixToHomogenMatrix(
+             createTransformationSceneToScreen( aNewInnerRect ) ));
+@@ -1189,11 +1228,18 @@ void ChartView::impl_createDiagramAndCon
+         if( bLessSpaceConsumedThanExpected )
+         {
+             aVDiagram.adjustInnerSize( aConsumedOuterRect );
++            fprintf(stdout, "ChartView::impl_createDiagramAndContent:   second adjustment: [ min: (%ld,%ld); max (%ld,%ld); width %ld; height %ld ]\n",
++                    aConsumedOuterRect.getMinX(), aConsumedOuterRect.getMinY(),
++                    aConsumedOuterRect.getMaxX(), aConsumedOuterRect.getMaxY(), 
++                    static_cast<sal_Int32>(aConsumedOuterRect.getWidth()),
++                    static_cast<sal_Int32>(aConsumedOuterRect.getHeight()));
+             pVCooSys->setTransformationSceneToScreen( B3DHomMatrixToHomogenMatrix(
+                 createTransformationSceneToScreen( aVDiagram.getCurrentRectangle() ) ));
+             pVCooSys->updatePositions();
+         }
+     }
++    fprintf(stdout, "ChartView::impl_createDiagramAndContent: --end   ++++++++++++++++++++++++++++++\n");fflush(stdout);
++    return;
+ 
+     //create axes and grids for the final size
+     for( nC=0; nC < rVCooSysList.size(); nC++)
+@@ -1298,6 +1344,7 @@ void ChartView::impl_createDiagramAndCon
+             pSeriesPlotter->rearrangeLabelToAvoidOverlapIfRequested( rPageSize );
+         }
+     }
++    fprintf(stdout, "ChartView::impl_createDiagramAndContent: --end\n");fflush(stdout);
+ }
+ 
+ //-------------------------------------------------------------
+@@ -2061,6 +2108,7 @@ void ChartView::impl_refreshAddIn()
+ 
+ void ChartView::createShapes()
+ {
++    fprintf(stdout, "ChartView::createShapes: --begin\n");fflush(stdout);
+ #if OSL_DEBUG_LEVEL > 0
+     clock_t nStart = clock();
+     OSL_TRACE( "\nPPPPPPPPP>>>>>>>>>>>> chart view :: createShapes()" );
+@@ -2107,6 +2155,9 @@ void ChartView::createShapes()
+         //create the group shape for diagram and axes first to have title and legends on top of it
+         uno::Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( m_xChartModel ) );
+         rtl::OUString aDiagramCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM, rtl::OUString::valueOf( sal_Int32(0) ) ) );//todo: other index if more than one diagram is possible
++        fprintf(stdout, "ChartView::createShapes: diagram CID = '%s'\n",
++                rtl::OUStringToOString(aDiagramCID, RTL_TEXTENCODING_UTF8).getStr());fflush(stdout);
++
+         uno::Reference< drawing::XShapes > xDiagramPlusAxesPlusMarkHandlesGroup_Shapes( ShapeFactory(m_xShapeFactory).createGroup2D(xPageShapes,aDiagramCID) );
+         uno::Reference< drawing::XShape > xDiagramPlusAxes_MarkHandles( ShapeFactory(m_xShapeFactory).createInvisibleRectangle(
+                     xDiagramPlusAxesPlusMarkHandlesGroup_Shapes, awt::Size(0,0) ) );
+@@ -2197,6 +2248,7 @@ void ChartView::createShapes()
+     
+     OSL_TRACE( "\nPPPPPPPPP<<<<<<<<<<<< chart view :: createShapes():: needed %f msec", fDuration );
+ #endif
++    fprintf(stdout, "ChartView::createShapes: --end\n");fflush(stdout);
+ }
+ 
+ //-----------------------------------------------------------------

Added: trunk/patches/test/chart-stacked-category-labels-sc.diff
==============================================================================
--- (empty file)
+++ trunk/patches/test/chart-stacked-category-labels-sc.diff	Tue Feb 19 04:29:14 2008
@@ -0,0 +1,95 @@
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/filter/inc/fdumper.hxx sc/source/filter/inc/fdumper.hxx
+--- sc.clean/source/filter/inc/fdumper.hxx	2008-02-05 11:16:59.000000000 -0500
++++ sc/source/filter/inc/fdumper.hxx	2008-02-15 11:13:21.000000000 -0500
+@@ -36,7 +36,7 @@
+ #ifndef SC_FDUMPER_HXX
+ #define SC_FDUMPER_HXX
+ 
+-#define SCF_INCL_DUMPER (OSL_DEBUG_LEVEL > 0)
++#define SCF_INCL_DUMPER (OSL_DEBUG_LEVEL > 0) && 0
+ 
+ #if SCF_INCL_DUMPER
+ 
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/unoobj/chart2uno.cxx sc/source/ui/unoobj/chart2uno.cxx
+--- sc.clean/source/ui/unoobj/chart2uno.cxx	2008-02-05 11:16:58.000000000 -0500
++++ sc/source/ui/unoobj/chart2uno.cxx	2008-02-18 23:12:51.000000000 -0500
+@@ -80,6 +80,8 @@
+ #include <rtl/math.hxx>
+ #endif
+ 
++#include <stdio.h>
++
+ SC_SIMPLE_SERVICE_INFO( ScChart2DataProvider, "ScChart2DataProvider",
+         "com.sun.star.chart2.data.DataProvider")
+ SC_SIMPLE_SERVICE_INFO( ScChart2DataSource, "ScChart2DataSource",
+@@ -92,6 +94,9 @@ SC_SIMPLE_SERVICE_INFO( ScChart2EmptyDat
+         "com.sun.star.chart2.data.DataSequence")
+ 
+ using namespace ::com::sun::star;
++using ::com::sun::star::uno::Sequence;
++using ::rtl::OUString;
++using ::std::vector;
+ 
+ namespace
+ {
+@@ -1597,6 +1602,52 @@ uno::Sequence< double > SAL_CALL ScChart
+ 
+ uno::Sequence< rtl::OUString > SAL_CALL ScChart2DataSequence::getTextualData(  ) throw (uno::RuntimeException)
+ {
++#if 1
++    ScUnoGuard aGuard;
++    if (!m_pDocument)
++        throw uno::RuntimeException();
++
++    const OUString LB = OUString::createFromAscii("-- endline --");
++    const OUString CONT = OUString::createFromAscii("-- cont --");
++
++    vector<OUString> aStrList;
++    for (ScRangePtr p = m_xRanges->First(); p; p = m_xRanges->Next())
++    {
++        fprintf(stdout, "ScChart2DataSequence::getTextualData: range: tab: %d; (%d, %d) - (%d, %d)\n",
++                p->aStart.Tab(), p->aStart.Col(), p->aStart.Row(), p->aEnd.Col(), p->aEnd.Row());
++        fflush(stdout);
++        const ScAddress& rStart = p->aStart;
++        const ScAddress& rEnd   = p->aEnd;
++        for (SCTAB nTab = rStart.Tab(); nTab <= rEnd.Tab(); ++nTab)
++        {
++            for (SCCOL nCol = rStart.Col(); nCol <= rEnd.Col(); ++nCol)
++            {
++                for (SCROW nRow = rStart.Row(); nRow <= rEnd.Row(); ++nRow)
++                {
++                    String aStr;
++                    m_pDocument->GetString(nCol, nRow, nTab, aStr);
++                    bool bMerged  = m_pDocument->HasAttrib(nCol,nRow,nTab,nCol,nRow,nTab, HASATTR_MERGED);
++                    bool bOverlap = m_pDocument->HasAttrib(nCol,nRow,nTab,nCol,nRow,nTab, HASATTR_OVERLAPPED);
++                    fprintf(stdout, "ScChart2DataSequence::getTextualData:   tab: %d; cell: (%d, %ld) - (merged %d; overlapped: %d) : '%s'\n",
++                            nTab, nCol, nRow, bMerged, bOverlap,
++                            rtl::OUStringToOString(aStr, RTL_TEXTENCODING_UTF8).getStr());fflush(stdout);
++                    if (bOverlap)
++                        aStrList.push_back(CONT);
++                    else
++                        aStrList.push_back(aStr);
++                }
++                aStrList.push_back(LB);
++            }
++            aStrList.push_back(LB);
++        }
++        aStrList.push_back(LB);
++    }
++
++    Sequence<OUString> aSeq(aStrList.size());
++    for (sal_Int32 i = 0; i < aSeq.getLength(); ++i)
++        aSeq[i] = aStrList[i];
++    return aSeq;
++#else    
+     ScUnoGuard aGuard;
+     if ( !m_pDocument)
+         throw uno::RuntimeException();
+@@ -1645,6 +1696,7 @@ uno::Sequence< rtl::OUString > SAL_CALL 
+         }
+     }
+     return aSeq;
++#endif    
+ }
+ 
+ ::rtl::OUString SAL_CALL ScChart2DataSequence::getSourceRangeRepresentation()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]