LCOV - code coverage report
Current view: top level - chart2/source/controller/dialogs - ChartTypeDialogController.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 713 0.0 %
Date: 2012-08-25 Functions: 0 130 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 1961 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*
       3                 :            :  * This file is part of the LibreOffice project.
       4                 :            :  *
       5                 :            :  * This Source Code Form is subject to the terms of the Mozilla Public
       6                 :            :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7                 :            :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8                 :            :  *
       9                 :            :  * This file incorporates work covered by the following license notice:
      10                 :            :  *
      11                 :            :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12                 :            :  *   contributor license agreements. See the NOTICE file distributed
      13                 :            :  *   with this work for additional information regarding copyright
      14                 :            :  *   ownership. The ASF licenses this file to you under the Apache
      15                 :            :  *   License, Version 2.0 (the "License"); you may not use this file
      16                 :            :  *   except in compliance with the License. You may obtain a copy of
      17                 :            :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18                 :            :  */
      19                 :            : 
      20                 :            : 
      21                 :            : #include "ChartTypeDialogController.hxx"
      22                 :            : #include "ResId.hxx"
      23                 :            : #include "HelpIds.hrc"
      24                 :            : #include "Strings.hrc"
      25                 :            : #include "Bitmaps.hrc"
      26                 :            : #include "macros.hxx"
      27                 :            : #include "ChartModelHelper.hxx"
      28                 :            : #include "DiagramHelper.hxx"
      29                 :            : #include "ControllerLockGuard.hxx"
      30                 :            : #include "AxisHelper.hxx"
      31                 :            : 
      32                 :            : #include <com/sun/star/chart2/DataPointGeometry3D.hpp>
      33                 :            : #include <com/sun/star/chart2/PieChartOffsetMode.hpp>
      34                 :            : #include <com/sun/star/chart2/XDataSeriesContainer.hpp>
      35                 :            : 
      36                 :            : #include <svtools/controldims.hrc>
      37                 :            : #include <svtools/valueset.hxx>
      38                 :            : // header for class Image
      39                 :            : #include <vcl/image.hxx>
      40                 :            : // header for class Bitmap
      41                 :            : #include <vcl/bitmap.hxx>
      42                 :            : #include <vcl/svapp.hxx>
      43                 :            : 
      44                 :            : #include <com/sun/star/lang/XMultiServiceFactory.hpp>
      45                 :            : 
      46                 :            : //.............................................................................
      47                 :            : namespace chart
      48                 :            : {
      49                 :            : //.............................................................................
      50                 :            : using namespace ::com::sun::star;
      51                 :            : using namespace ::com::sun::star::chart2;
      52                 :            : 
      53                 :          0 : ChartTypeParameter::ChartTypeParameter()
      54                 :            :                     : nSubTypeIndex( 1 )
      55                 :            :                     , bXAxisWithValues( false )
      56                 :            :                     , b3DLook( false )
      57                 :            :                     , bSymbols( true )
      58                 :            :                     , bLines( true )
      59                 :            :                     , eStackMode( GlobalStackMode_NONE )
      60                 :            :                     , eCurveStyle( CurveStyle_LINES )
      61                 :            :                     , nCurveResolution(20)
      62                 :            :                     , nSplineOrder(3)
      63                 :            :                     , nGeometry3D(DataPointGeometry3D::CUBOID)
      64                 :            :                     , eThreeDLookScheme(ThreeDLookScheme_Realistic)
      65                 :          0 :                     , bSortByXValues(sal_False)
      66                 :            : {
      67                 :          0 : }
      68                 :            : 
      69                 :          0 : ChartTypeParameter::ChartTypeParameter( sal_Int32 SubTypeIndex, bool HasXAxisWithValues
      70                 :            :                     ,  bool Is3DLook,  GlobalStackMode nStackMode
      71                 :            :                     , bool HasSymbols, bool HasLines
      72                 :            :                     , CurveStyle nCurveStyle )
      73                 :            :                     : nSubTypeIndex( SubTypeIndex )
      74                 :            :                     , bXAxisWithValues( HasXAxisWithValues )
      75                 :            :                     , b3DLook( Is3DLook )
      76                 :            :                     , bSymbols( HasSymbols )
      77                 :            :                     , bLines( HasLines )
      78                 :            :                     , eStackMode( nStackMode )
      79                 :            :                     , eCurveStyle( nCurveStyle )
      80                 :            :                     , nCurveResolution(20)
      81                 :            :                     , nSplineOrder(3)
      82                 :            :                     , nGeometry3D(DataPointGeometry3D::CUBOID)
      83                 :            :                     , eThreeDLookScheme(ThreeDLookScheme_Realistic)
      84                 :          0 :                     , bSortByXValues(sal_False)
      85                 :            : {
      86                 :          0 : }
      87                 :          0 : ChartTypeParameter::~ChartTypeParameter()
      88                 :            : {
      89         [ #  # ]:          0 : }
      90                 :            : 
      91                 :          0 : bool ChartTypeParameter::mapsToSameService( const ChartTypeParameter& rParameter ) const
      92                 :            : {
      93                 :          0 :     return this->mapsToSimilarService( rParameter, 0 );
      94                 :            : }
      95                 :          0 : bool ChartTypeParameter::mapsToSimilarService( const ChartTypeParameter& rParameter, sal_Int32 nTheHigherTheLess ) const
      96                 :            : {
      97                 :          0 :     sal_Int32 nMax=7;
      98         [ #  # ]:          0 :     if(nTheHigherTheLess>nMax)
      99                 :          0 :         return true;
     100         [ #  # ]:          0 :     if( this->bXAxisWithValues!=rParameter.bXAxisWithValues )
     101                 :          0 :         return nTheHigherTheLess>nMax-1;
     102         [ #  # ]:          0 :     if( this->b3DLook!=rParameter.b3DLook )
     103                 :          0 :         return nTheHigherTheLess>nMax-2;
     104         [ #  # ]:          0 :     if( this->eStackMode!=rParameter.eStackMode )
     105                 :          0 :         return nTheHigherTheLess>nMax-3;
     106         [ #  # ]:          0 :     if( this->nSubTypeIndex!=rParameter.nSubTypeIndex )
     107                 :          0 :         return nTheHigherTheLess>nMax-4;
     108         [ #  # ]:          0 :     if( this->bSymbols!=rParameter.bSymbols )
     109                 :          0 :         return nTheHigherTheLess>nMax-5;
     110         [ #  # ]:          0 :     if( this->bLines!=rParameter.bLines )
     111                 :          0 :         return nTheHigherTheLess>nMax-6;
     112                 :          0 :     return true;
     113                 :            : }
     114                 :            : 
     115                 :            : //-----------------------------------------------------------------------------
     116                 :            : //-----------------------------------------------------------------------------
     117                 :            : //-----------------------------------------------------------------------------
     118                 :            : 
     119                 :          0 : ChartTypeDialogController::ChartTypeDialogController()
     120                 :            :     : bSupportsXAxisWithValues(false)
     121                 :          0 :     , bSupports3D(true)
     122                 :            : {
     123                 :          0 : }
     124                 :            : 
     125                 :          0 : ChartTypeDialogController::~ChartTypeDialogController()
     126                 :            : {
     127         [ #  # ]:          0 : }
     128                 :          0 : Image ChartTypeDialogController::getImage()
     129                 :            : {
     130                 :          0 :     return Image();
     131                 :            : }
     132                 :          0 : bool ChartTypeDialogController::isSubType( const rtl::OUString& rServiceName )
     133                 :            : {
     134         [ #  # ]:          0 :     const tTemplateServiceChartTypeParameterMap& rTemplateMap = this->getTemplateMap();
     135         [ #  # ]:          0 :     tTemplateServiceChartTypeParameterMap::const_iterator aIt( rTemplateMap.find( rServiceName ));
     136         [ #  # ]:          0 :     if( aIt != rTemplateMap.end())
     137                 :          0 :         return true;
     138                 :          0 :     return false;
     139                 :            : }
     140                 :          0 : ChartTypeParameter ChartTypeDialogController::getChartTypeParameterForService(
     141                 :            :                                                     const rtl::OUString& rServiceName
     142                 :            :                                                     , const uno::Reference< beans::XPropertySet >& xTemplateProps )
     143                 :            : {
     144                 :          0 :     ChartTypeParameter aRet;
     145         [ #  # ]:          0 :     const tTemplateServiceChartTypeParameterMap& rTemplateMap = this->getTemplateMap();
     146         [ #  # ]:          0 :     tTemplateServiceChartTypeParameterMap::const_iterator aIt( rTemplateMap.find( rServiceName ));
     147         [ #  # ]:          0 :     if( aIt != rTemplateMap.end())
     148                 :          0 :         aRet = (*aIt).second;
     149         [ #  # ]:          0 :     if( xTemplateProps.is() )
     150                 :            :     {
     151                 :            :         try
     152                 :            :         {
     153 [ #  # ][ #  # ]:          0 :             xTemplateProps->getPropertyValue( C2U( "CurveStyle" )) >>= aRet.eCurveStyle;
         [ #  # ][ #  # ]
     154 [ #  # ][ #  # ]:          0 :             xTemplateProps->getPropertyValue( C2U( "CurveResolution" )) >>= aRet.nCurveResolution;
                 [ #  # ]
     155 [ #  # ][ #  # ]:          0 :             xTemplateProps->getPropertyValue( C2U( "SplineOrder" )) >>= aRet.nSplineOrder;
         [ #  # ][ #  # ]
     156                 :            :         }
     157         [ #  # ]:          0 :         catch( uno::Exception & ex )
     158                 :            :         {
     159                 :            :             //not all templates need to support CurveStyle, CurveResolution or SplineOrder
     160                 :          0 :             ex.Context.is();//to have debug information without compilation warnings
     161                 :            :         }
     162                 :            : 
     163                 :            :         try
     164                 :            :         {
     165 [ #  # ][ #  # ]:          0 :             xTemplateProps->getPropertyValue( C2U( "Geometry3D" )) >>= aRet.nGeometry3D;
         [ #  # ][ #  # ]
     166                 :            :         }
     167         [ #  # ]:          0 :         catch( uno::Exception& ex )
     168                 :            :         {
     169                 :            :             //not all templates need to support CGeometry3D
     170                 :          0 :             ex.Context.is();//to have debug information without compilation warnings
     171                 :            :         }
     172                 :            :     }
     173                 :          0 :     return aRet;
     174                 :            : }
     175                 :          0 : void ChartTypeDialogController::adjustSubTypeAndEnableControls( ChartTypeParameter& /*rParameter*/ )
     176                 :            : {
     177                 :          0 : }
     178                 :          0 : void ChartTypeDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter )
     179                 :            : {
     180   [ #  #  #  # ]:          0 :     switch( rParameter.nSubTypeIndex )
     181                 :            :     {
     182                 :            :         case 2:
     183                 :          0 :             rParameter.eStackMode=GlobalStackMode_STACK_Y;
     184                 :          0 :             break;
     185                 :            :         case 3:
     186                 :          0 :             rParameter.eStackMode=GlobalStackMode_STACK_Y_PERCENT;
     187                 :          0 :             break;
     188                 :            :         case 4:
     189                 :          0 :             rParameter.eStackMode=GlobalStackMode_STACK_Z;
     190                 :          0 :             break;
     191                 :            :         default:
     192                 :          0 :             rParameter.eStackMode=GlobalStackMode_NONE;
     193                 :          0 :             break;
     194                 :            :     }
     195                 :          0 : }
     196                 :          0 : void ChartTypeDialogController::adjustParameterToMainType( ChartTypeParameter& rParameter )
     197                 :            : {
     198                 :          0 :     bool bFoundSomeMatch=false;
     199                 :            : 
     200                 :          0 :     rParameter.bXAxisWithValues = bSupportsXAxisWithValues;
     201 [ #  # ][ #  # ]:          0 :     if( rParameter.b3DLook && !bSupports3D )
     202                 :          0 :         rParameter.b3DLook = false;
     203 [ #  # ][ #  # ]:          0 :     if(!rParameter.b3DLook && rParameter.eStackMode==GlobalStackMode_STACK_Z)
     204                 :          0 :         rParameter.eStackMode = GlobalStackMode_NONE;
     205                 :            : 
     206         [ #  # ]:          0 :     const tTemplateServiceChartTypeParameterMap& rMap = getTemplateMap();
     207                 :          0 :     tTemplateServiceChartTypeParameterMap::const_iterator       aIter = rMap.begin();
     208                 :          0 :     const tTemplateServiceChartTypeParameterMap::const_iterator aEnd  = rMap.end();
     209 [ #  # ][ #  # ]:          0 :     for( sal_Int32 nMatchPrecision=0; nMatchPrecision<7 && !bFoundSomeMatch; nMatchPrecision++ )
                 [ #  # ]
     210                 :            :     {
     211         [ #  # ]:          0 :         for( aIter = rMap.begin(); aIter != aEnd; ++aIter )
     212                 :            :         {
     213         [ #  # ]:          0 :             if( rParameter.mapsToSimilarService( (*aIter).second, nMatchPrecision ) )
     214                 :            :             {
     215                 :            :                 //remind some values
     216                 :          0 :                 ThreeDLookScheme aScheme = rParameter.eThreeDLookScheme;
     217                 :          0 :                 sal_Int32        nCurveResolution = rParameter.nCurveResolution;
     218                 :          0 :                 sal_Int32        nSplineOrder = rParameter.nSplineOrder;
     219                 :          0 :                 CurveStyle       eCurveStyle = rParameter.eCurveStyle;
     220                 :          0 :                 sal_Int32        nGeometry3D = rParameter.nGeometry3D;
     221                 :          0 :                 sal_Bool         bSortByXValues = rParameter.bSortByXValues;
     222                 :            : 
     223                 :          0 :                 rParameter = (*aIter).second;
     224                 :            : 
     225                 :            :                 //some values should not be changed with charttype
     226                 :          0 :                 rParameter.eThreeDLookScheme = aScheme;
     227                 :          0 :                 rParameter.nCurveResolution = nCurveResolution;
     228                 :          0 :                 rParameter.nSplineOrder =nSplineOrder;
     229                 :          0 :                 rParameter.eCurveStyle = eCurveStyle;
     230                 :          0 :                 rParameter.nGeometry3D = nGeometry3D;
     231                 :          0 :                 rParameter.bSortByXValues = bSortByXValues;
     232                 :            : 
     233                 :          0 :                 bFoundSomeMatch = true;
     234                 :          0 :                 break;
     235                 :            :             }
     236                 :            :         }
     237                 :            :     }
     238         [ #  # ]:          0 :     if(!bFoundSomeMatch)
     239                 :            :     {
     240         [ #  # ]:          0 :         if(rMap.begin()!=rMap.end())
     241                 :          0 :             rParameter = (*rMap.begin()).second;
     242                 :            :         else
     243                 :          0 :             rParameter = ChartTypeParameter();
     244                 :            :     }
     245                 :          0 : }
     246                 :          0 : rtl::OUString ChartTypeDialogController::getServiceNameForParameter( const ChartTypeParameter& rParameter ) const
     247                 :            : {
     248                 :          0 :     ChartTypeParameter aParameter(rParameter);
     249         [ #  # ]:          0 :     if( aParameter.bXAxisWithValues )
     250                 :          0 :         aParameter.eStackMode = GlobalStackMode_NONE;
     251 [ #  # ][ #  # ]:          0 :     if(!aParameter.b3DLook && aParameter.eStackMode==GlobalStackMode_STACK_Z)
     252                 :          0 :         aParameter.eStackMode = GlobalStackMode_NONE;
     253         [ #  # ]:          0 :     const tTemplateServiceChartTypeParameterMap& rMap = getTemplateMap();
     254                 :          0 :     tTemplateServiceChartTypeParameterMap::const_iterator       aIter = rMap.begin();
     255                 :          0 :     const tTemplateServiceChartTypeParameterMap::const_iterator aEnd  = rMap.end();
     256         [ #  # ]:          0 :     for( ; aIter != aEnd; ++aIter )
     257                 :            :     {
     258 [ #  # ][ #  # ]:          0 :         if( aParameter.mapsToSameService( (*aIter).second ) )
     259                 :          0 :             return (*aIter).first;
     260                 :            :     }
     261                 :            : 
     262                 :            :     OSL_FAIL( "ChartType not implemented yet - use fallback to similar type" );
     263         [ #  # ]:          0 :     for( sal_Int32 nMatchPrecision=1; nMatchPrecision<8; nMatchPrecision++ )
     264                 :            :     {
     265         [ #  # ]:          0 :         for( aIter = rMap.begin(); aIter != aEnd; ++aIter )
     266                 :            :         {
     267         [ #  # ]:          0 :             if( aParameter.mapsToSimilarService( (*aIter).second, nMatchPrecision ) )
     268                 :          0 :                 return (*aIter).first;
     269                 :            :         }
     270                 :            :     }
     271                 :          0 :     return ::rtl::OUString();
     272                 :            : }
     273                 :          0 : uno::Reference< XChartTypeTemplate > ChartTypeDialogController::getCurrentTemplate(
     274                 :            :     const ChartTypeParameter& rParameter
     275                 :            :     , const uno::Reference< lang::XMultiServiceFactory >& xTemplateManager ) const
     276                 :            : {
     277         [ #  # ]:          0 :     uno::Reference< XChartTypeTemplate > xTemplate(0);
     278                 :            : 
     279         [ #  # ]:          0 :     rtl::OUString aServiceName( this->getServiceNameForParameter( rParameter ) );
     280         [ #  # ]:          0 :     if(!aServiceName.isEmpty())
     281                 :            :     {
     282 [ #  # ][ #  # ]:          0 :         xTemplate.set( xTemplateManager->createInstance( aServiceName ), uno::UNO_QUERY );
                 [ #  # ]
     283         [ #  # ]:          0 :         if(xTemplate.is())
     284                 :            :         {
     285         [ #  # ]:          0 :             uno::Reference< beans::XPropertySet > xTemplateProps( xTemplate, uno::UNO_QUERY );
     286         [ #  # ]:          0 :             if(xTemplateProps.is())
     287                 :            :             {
     288                 :            :                 try
     289                 :            :                 {
     290 [ #  # ][ #  # ]:          0 :                     xTemplateProps->setPropertyValue( C2U( "CurveStyle" ), uno::makeAny(rParameter.eCurveStyle) );
         [ #  # ][ #  # ]
     291 [ #  # ][ #  # ]:          0 :                     xTemplateProps->setPropertyValue( C2U( "CurveResolution" ), uno::makeAny(rParameter.nCurveResolution) );
         [ #  # ][ #  # ]
     292 [ #  # ][ #  # ]:          0 :                     xTemplateProps->setPropertyValue( C2U( "SplineOrder" ), uno::makeAny(rParameter.nSplineOrder) );
         [ #  # ][ #  # ]
                 [ #  # ]
     293                 :            :                 }
     294         [ #  # ]:          0 :                 catch( uno::Exception & ex )
     295                 :            :                 {
     296                 :            :                     //not all templates need to support CurveStyle, CurveResolution or SplineOrder
     297                 :          0 :                     ex.Context.is();//to have debug information without compilation warnings
     298                 :            :                 }
     299                 :            :                 try
     300                 :            :                 {
     301 [ #  # ][ #  # ]:          0 :                     xTemplateProps->setPropertyValue( C2U( "Geometry3D" ), uno::makeAny(rParameter.nGeometry3D) );
         [ #  # ][ #  # ]
                 [ #  # ]
     302                 :            :                 }
     303   [ #  #  #  # ]:          0 :                 catch( uno::Exception & ex )
     304                 :            :                 {
     305                 :            :                     //not all templates need to support Geometry3D
     306                 :          0 :                     ex.Context.is();//to have debug information without compilation warnings
     307                 :            :                 }
     308                 :            :                 try
     309                 :            :                 {
     310         [ #  # ]:          0 :                     this->setTemplateProperties( xTemplateProps );
     311                 :            :                 }
     312         [ #  # ]:          0 :                 catch( const uno::Exception & ex )
     313                 :            :                 {
     314                 :            :                     ASSERT_EXCEPTION( ex );
     315                 :            :                 }
     316                 :          0 :             }
     317                 :            :         }
     318                 :            :     }
     319                 :          0 :     return xTemplate;
     320                 :            : }
     321                 :            : 
     322                 :          0 : bool ChartTypeDialogController::commitToModel( const ChartTypeParameter& rParameter
     323                 :            :                 , const uno::Reference< XChartDocument >& xChartModel )
     324                 :            : {
     325 [ #  # ][ #  # ]:          0 :     uno::Reference< lang::XMultiServiceFactory > xTemplateManager( xChartModel->getChartTypeManager(), uno::UNO_QUERY );
                 [ #  # ]
     326         [ #  # ]:          0 :     uno::Reference< XChartTypeTemplate > xTemplate( this->getCurrentTemplate( rParameter, xTemplateManager ) );
     327         [ #  # ]:          0 :     if(xTemplate.is())
     328                 :            :     {
     329         [ #  # ]:          0 :         uno::Reference< frame::XModel > xModel( xChartModel, uno::UNO_QUERY);
     330                 :            : 
     331                 :            :         // locked controllers
     332         [ #  # ]:          0 :         ControllerLockGuard aCtrlLockGuard( xModel );
     333         [ #  # ]:          0 :         uno::Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram( xModel );
     334                 :            :         DiagramHelper::tTemplateWithServiceName aTemplateWithService(
     335         [ #  # ]:          0 :             DiagramHelper::getTemplateForDiagram( xDiagram, xTemplateManager ));
     336         [ #  # ]:          0 :         if( aTemplateWithService.first.is())
     337 [ #  # ][ #  # ]:          0 :             aTemplateWithService.first->resetStyles( xDiagram );
     338 [ #  # ][ #  # ]:          0 :         xTemplate->changeDiagram( xDiagram );
     339 [ #  # ][ #  # ]:          0 :         if( Application::GetSettings().GetLayoutRTL() )
                 [ #  # ]
     340 [ #  # ][ #  # ]:          0 :             AxisHelper::setRTLAxisLayout( AxisHelper::getCoordinateSystemByIndex( xDiagram, 0 ) );
     341         [ #  # ]:          0 :         if( rParameter.b3DLook )
     342         [ #  # ]:          0 :             ThreeDHelper::setScheme( xDiagram, rParameter.eThreeDLookScheme );
     343                 :            : 
     344                 :            :         //SortByXValues
     345                 :            :         {
     346         [ #  # ]:          0 :             uno::Reference< beans::XPropertySet > xDiaProp( xDiagram, uno::UNO_QUERY );
     347         [ #  # ]:          0 :             if( xDiaProp.is() )
     348 [ #  # ][ #  # ]:          0 :                 xDiaProp->setPropertyValue( C2U( "SortByXValues" ), uno::makeAny( rParameter.bSortByXValues ) );
         [ #  # ][ #  # ]
     349 [ #  # ][ #  # ]:          0 :         }
     350                 :            :     }
     351                 :          0 :     return false;
     352                 :            : }
     353                 :          0 : void ChartTypeDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ )
     354                 :            : {
     355                 :          0 :     rSubTypeList.Clear();
     356                 :          0 : }
     357                 :          0 : bool ChartTypeDialogController::shouldShow_XAxisTypeControl() const
     358                 :            : {
     359                 :          0 :     return false;
     360                 :            : }
     361                 :          0 : bool ChartTypeDialogController::shouldShow_3DLookControl() const
     362                 :            : {
     363                 :          0 :     return false;
     364                 :            : }
     365                 :          0 : bool ChartTypeDialogController::shouldShow_StackingControl() const
     366                 :            : {
     367                 :          0 :     return false;
     368                 :            : }
     369                 :          0 : bool ChartTypeDialogController::shouldShow_DeepStackingControl() const
     370                 :            : {
     371                 :          0 :     return false;
     372                 :            : }
     373                 :          0 : bool ChartTypeDialogController::shouldShow_SplineControl() const
     374                 :            : {
     375                 :          0 :     return false;
     376                 :            : }
     377                 :          0 : bool ChartTypeDialogController::shouldShow_GeometryControl() const
     378                 :            : {
     379                 :          0 :     return false;
     380                 :            : }
     381                 :          0 : bool ChartTypeDialogController::shouldShow_SortByXValuesResourceGroup() const
     382                 :            : {
     383                 :          0 :     return false;
     384                 :            : }
     385                 :            : 
     386                 :          0 : void ChartTypeDialogController::showExtraControls( Window* /*pParent*/, const Point& /*rPosition*/, const Size& /*rSize*/ )
     387                 :            : {
     388                 :          0 : }
     389                 :          0 : void ChartTypeDialogController::hideExtraControls() const
     390                 :            : {
     391                 :          0 : }
     392                 :          0 : void ChartTypeDialogController::fillExtraControls( const ChartTypeParameter& /*rParameter*/
     393                 :            :                                                   , const uno::Reference< XChartDocument >& /*xChartModel*/
     394                 :            :                                                   , const uno::Reference< beans::XPropertySet >& /*xTemplateProps*/ ) const
     395                 :            : {
     396                 :          0 : }
     397                 :          0 : void ChartTypeDialogController::setTemplateProperties( const uno::Reference< beans::XPropertySet >& /*xTemplateProps*/ ) const throw (uno::RuntimeException)
     398                 :            : {
     399                 :          0 : }
     400                 :            : //--------------------------------------------------------------------------
     401                 :            : 
     402                 :          0 : ColumnOrBarChartDialogController_Base::ColumnOrBarChartDialogController_Base()
     403                 :          0 :                                         : ChartTypeDialogController()
     404                 :            : {
     405                 :          0 : }
     406                 :          0 : ColumnOrBarChartDialogController_Base::~ColumnOrBarChartDialogController_Base()
     407                 :            : {
     408         [ #  # ]:          0 : }
     409                 :          0 : bool ColumnOrBarChartDialogController_Base::shouldShow_3DLookControl() const
     410                 :            : {
     411                 :          0 :     return true;
     412                 :            : }
     413                 :          0 : bool ColumnOrBarChartDialogController_Base::shouldShow_GeometryControl() const
     414                 :            : {
     415                 :          0 :     return true;
     416                 :            : }
     417                 :          0 : void ColumnOrBarChartDialogController_Base::adjustSubTypeAndEnableControls( ChartTypeParameter& rParameter )
     418                 :            : {
     419 [ #  # ][ #  # ]:          0 :     if(rParameter.nSubTypeIndex>3 && !rParameter.b3DLook)
     420                 :            :     {
     421                 :          0 :         rParameter.nSubTypeIndex=1;
     422                 :            :     }
     423                 :          0 : }
     424                 :            : //--------------------------------------------------------------------------
     425                 :          0 : ColumnChartDialogController::ColumnChartDialogController()
     426                 :            : {
     427                 :          0 : }
     428                 :          0 : ColumnChartDialogController::~ColumnChartDialogController()
     429                 :            : {
     430         [ #  # ]:          0 : }
     431                 :          0 : String ColumnChartDialogController::getName()
     432                 :            : {
     433         [ #  # ]:          0 :     return String( SchResId( STR_TYPE_COLUMN ));
     434                 :            : }
     435                 :          0 : Image ColumnChartDialogController::getImage()
     436                 :            : {
     437         [ #  # ]:          0 :     return Image( SchResId( IMG_TYPE_COLUMN ));
     438                 :            : }
     439                 :          0 : const tTemplateServiceChartTypeParameterMap& ColumnChartDialogController::getTemplateMap() const
     440                 :            : {
     441                 :            :     static tTemplateServiceChartTypeParameterMap m_aTemplateMap =
     442                 :            :     tTemplateServiceChartTypeParameterMap
     443                 :            :         ( C2U( "com.sun.star.chart2.template.Column" ),                         ChartTypeParameter(1,false,false,GlobalStackMode_NONE) )
     444 [ #  # ][ #  # ]:          0 :         ( C2U( "com.sun.star.chart2.template.StackedColumn" ),                  ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y) )
         [ #  # ][ #  # ]
     445 [ #  # ][ #  # ]:          0 :         ( C2U( "com.sun.star.chart2.template.PercentStackedColumn" ),           ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT) )
     446 [ #  # ][ #  # ]:          0 :         ( C2U( "com.sun.star.chart2.template.ThreeDColumnFlat" ),               ChartTypeParameter(1,false,true,GlobalStackMode_NONE) )
     447 [ #  # ][ #  # ]:          0 :         ( C2U( "com.sun.star.chart2.template.StackedThreeDColumnFlat" ),        ChartTypeParameter(2,false,true,GlobalStackMode_STACK_Y) )
     448 [ #  # ][ #  # ]:          0 :         ( C2U( "com.sun.star.chart2.template.PercentStackedThreeDColumnFlat" ), ChartTypeParameter(3,false,true,GlobalStackMode_STACK_Y_PERCENT) )
     449 [ #  # ][ #  # ]:          0 :         ( C2U( "com.sun.star.chart2.template.ThreeDColumnDeep" ),               ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z) )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     450                 :            :         ;
     451                 :          0 :     return m_aTemplateMap;
     452                 :            : }
     453                 :          0 : void ColumnChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter )
     454                 :            : {
     455                 :          0 :     rSubTypeList.Clear();
     456                 :            : 
     457         [ #  # ]:          0 :     if( rParameter.b3DLook )
     458                 :            :     {
     459   [ #  #  #  # ]:          0 :         switch(rParameter.nGeometry3D)
     460                 :            :         {
     461                 :            :             case DataPointGeometry3D::CYLINDER:
     462 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_SAEULE_3D_1 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     463 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_SAEULE_3D_2 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     464 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_SAEULE_3D_3 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     465 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_SAEULE_3D_4 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     466                 :          0 :             break;
     467                 :            :             case DataPointGeometry3D::CONE:
     468 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_KEGEL_3D_1 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     469 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_KEGEL_3D_2 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     470 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_KEGEL_3D_3 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     471 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_KEGEL_3D_4 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     472                 :          0 :             break;
     473                 :            :             case DataPointGeometry3D::PYRAMID:
     474 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_PYRAMID_3D_1 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     475 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_PYRAMID_3D_2 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     476 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_PYRAMID_3D_3 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     477 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_PYRAMID_3D_4 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     478                 :          0 :             break;
     479                 :            :             default: //DataPointGeometry3D::CUBOID:
     480 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_COLUMNS_3D_1 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     481 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_COLUMNS_3D_2 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     482 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_COLUMNS_3D_3 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     483 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_COLUMNS_3D )));
         [ #  # ][ #  # ]
                 [ #  # ]
     484                 :          0 :             break;
     485                 :            :         }
     486                 :            :     }
     487                 :            :     else
     488                 :            :     {
     489 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_COLUMNS_2D_1 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     490 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_COLUMNS_2D_2 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     491 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_COLUMNS_2D_3 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     492                 :            :     }
     493                 :            : 
     494 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 1, String( SchResId( STR_NORMAL )) );
                 [ #  # ]
     495 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 2, String( SchResId( STR_STACKED )) );
                 [ #  # ]
     496 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 3, String( SchResId( STR_PERCENT )) );
                 [ #  # ]
     497 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 4, String( SchResId( STR_DEEP )) );
                 [ #  # ]
     498                 :          0 : }
     499                 :            : 
     500                 :            : //--------------------------------------------------------------------------
     501                 :            : 
     502                 :          0 : BarChartDialogController::BarChartDialogController()
     503                 :            : {
     504                 :          0 : }
     505                 :          0 : BarChartDialogController::~BarChartDialogController()
     506                 :            : {
     507         [ #  # ]:          0 : }
     508                 :          0 : String BarChartDialogController::getName()
     509                 :            : {
     510         [ #  # ]:          0 :     return String( SchResId( STR_TYPE_BAR ));
     511                 :            : }
     512                 :          0 : Image BarChartDialogController::getImage()
     513                 :            : {
     514         [ #  # ]:          0 :     return Image( SchResId( IMG_TYPE_BAR ));
     515                 :            : }
     516                 :          0 : const tTemplateServiceChartTypeParameterMap& BarChartDialogController::getTemplateMap() const
     517                 :            : {
     518                 :            :     static tTemplateServiceChartTypeParameterMap m_aTemplateMap =
     519                 :            :     tTemplateServiceChartTypeParameterMap
     520                 :            :         ( C2U( "com.sun.star.chart2.template.Bar" ),                         ChartTypeParameter(1,false,false,GlobalStackMode_NONE) )
     521 [ #  # ][ #  # ]:          0 :         ( C2U( "com.sun.star.chart2.template.StackedBar" ),                  ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y) )
         [ #  # ][ #  # ]
     522 [ #  # ][ #  # ]:          0 :         ( C2U( "com.sun.star.chart2.template.PercentStackedBar" ),           ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT) )
     523 [ #  # ][ #  # ]:          0 :         ( C2U( "com.sun.star.chart2.template.ThreeDBarFlat" ),               ChartTypeParameter(1,false,true,GlobalStackMode_NONE) )
     524 [ #  # ][ #  # ]:          0 :         ( C2U( "com.sun.star.chart2.template.StackedThreeDBarFlat" ),        ChartTypeParameter(2,false,true,GlobalStackMode_STACK_Y) )
     525 [ #  # ][ #  # ]:          0 :         ( C2U( "com.sun.star.chart2.template.PercentStackedThreeDBarFlat" ), ChartTypeParameter(3,false,true,GlobalStackMode_STACK_Y_PERCENT) )
     526 [ #  # ][ #  # ]:          0 :         ( C2U( "com.sun.star.chart2.template.ThreeDBarDeep" ),               ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z) )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     527                 :            :         ;
     528                 :          0 :     return m_aTemplateMap;
     529                 :            : }
     530                 :          0 : void BarChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter )
     531                 :            : {
     532                 :          0 :     rSubTypeList.Clear();
     533                 :            : 
     534         [ #  # ]:          0 :     if( rParameter.b3DLook )
     535                 :            :     {
     536   [ #  #  #  # ]:          0 :         switch(rParameter.nGeometry3D)
     537                 :            :         {
     538                 :            :             case DataPointGeometry3D::CYLINDER:
     539 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_ROEHRE_3D_1 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     540 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_ROEHRE_3D_2 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     541 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_ROEHRE_3D_3 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     542 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_ROEHRE_3D_4 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     543                 :          0 :             break;
     544                 :            :             case DataPointGeometry3D::CONE:
     545 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_KEGELQ_3D_1 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     546 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_KEGELQ_3D_2 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     547 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_KEGELQ_3D_3 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     548 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_KEGELQ_3D_4 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     549                 :          0 :             break;
     550                 :            :             case DataPointGeometry3D::PYRAMID:
     551 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_PYRAMIDQ_3D_1 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     552 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_PYRAMIDQ_3D_2 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     553 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_PYRAMIDQ_3D_3 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     554 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_PYRAMIDQ_3D_4 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     555                 :          0 :             break;
     556                 :            :             default: //DataPointGeometry3D::CUBOID:
     557 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_BARS_3D_1 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     558 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_BARS_3D_2 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     559 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_BARS_3D_3 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     560 [ #  # ][ #  # ]:          0 :                 rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_BARS_3D )));
         [ #  # ][ #  # ]
                 [ #  # ]
     561                 :          0 :             break;
     562                 :            :         }
     563                 :            :     }
     564                 :            :     else
     565                 :            :     {
     566 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_BARS_2D_1 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     567 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_BARS_2D_2 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     568 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_BARS_2D_3 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     569                 :            :     }
     570 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 1, String( SchResId( STR_NORMAL )) );
                 [ #  # ]
     571 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 2, String( SchResId( STR_STACKED )) );
                 [ #  # ]
     572 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 3, String( SchResId( STR_PERCENT )) );
                 [ #  # ]
     573 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 4, String( SchResId( STR_DEEP )) );
                 [ #  # ]
     574                 :          0 : }
     575                 :            : 
     576                 :            : //--------------------------------------------------------------------------
     577                 :            : 
     578                 :          0 : PieChartDialogController::PieChartDialogController()
     579                 :            : {
     580                 :          0 : }
     581                 :          0 : PieChartDialogController::~PieChartDialogController()
     582                 :            : {
     583         [ #  # ]:          0 : }
     584                 :          0 : String PieChartDialogController::getName()
     585                 :            : {
     586         [ #  # ]:          0 :     return String( SchResId( STR_TYPE_PIE ));
     587                 :            : }
     588                 :          0 : Image PieChartDialogController::getImage()
     589                 :            : {
     590         [ #  # ]:          0 :     return Image( SchResId( IMG_TYPE_PIE ));
     591                 :            : }
     592                 :          0 : const tTemplateServiceChartTypeParameterMap& PieChartDialogController::getTemplateMap() const
     593                 :            : {
     594                 :            :     static tTemplateServiceChartTypeParameterMap m_aTemplateMap =
     595                 :            :     tTemplateServiceChartTypeParameterMap
     596                 :            :     ( C2U( "com.sun.star.chart2.template.Pie" ),                    ChartTypeParameter(1,false,false) )
     597 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.PieAllExploded" ),         ChartTypeParameter(2,false,false) )
         [ #  # ][ #  # ]
     598 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.Donut" ),                  ChartTypeParameter(3,false,false) )
     599 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.DonutAllExploded" ),       ChartTypeParameter(4,false,false) )
     600 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.ThreeDPie" ),              ChartTypeParameter(1,false,true) )
     601 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.ThreeDPieAllExploded" ),   ChartTypeParameter(2,false,true) )
     602 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.ThreeDDonut" ),            ChartTypeParameter(3,false,true) )
     603 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.ThreeDDonutAllExploded" ), ChartTypeParameter(4,false,true) )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     604                 :            :     ;
     605                 :          0 :     return m_aTemplateMap;
     606                 :            : }
     607                 :          0 : void PieChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter )
     608                 :            : {
     609                 :          0 :     rSubTypeList.Clear();
     610                 :            : 
     611         [ #  # ]:          0 :     if( rParameter.b3DLook )
     612                 :            :     {
     613 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_CIRCLES_3D )));
         [ #  # ][ #  # ]
                 [ #  # ]
     614 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_CIRCLES_3D_EXPLODED )));
         [ #  # ][ #  # ]
                 [ #  # ]
     615 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_DONUT_3D )));
         [ #  # ][ #  # ]
                 [ #  # ]
     616 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_DONUT_3D_EXPLODED )));
         [ #  # ][ #  # ]
                 [ #  # ]
     617                 :            :     }
     618                 :            :     else
     619                 :            :     {
     620 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_CIRCLES_2D )));
         [ #  # ][ #  # ]
                 [ #  # ]
     621 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_CIRCLES_2D_EXPLODED )));
         [ #  # ][ #  # ]
                 [ #  # ]
     622 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_DONUT_2D )));
         [ #  # ][ #  # ]
                 [ #  # ]
     623 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_DONUT_2D_EXPLODED )));
         [ #  # ][ #  # ]
                 [ #  # ]
     624                 :            :     }
     625 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 1, String( SchResId( STR_NORMAL         ) ) );
                 [ #  # ]
     626 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 2, String( SchResId( STR_PIE_EXPLODED   ) ) );
                 [ #  # ]
     627 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 3, String( SchResId( STR_DONUT          ) ) );
                 [ #  # ]
     628 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 4, String( SchResId( STR_DONUT_EXPLODED ) ) );
                 [ #  # ]
     629                 :          0 : }
     630                 :            : 
     631                 :          0 : bool PieChartDialogController::shouldShow_3DLookControl() const
     632                 :            : {
     633                 :          0 :     return true;
     634                 :            : }
     635                 :          0 : void PieChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter )
     636                 :            : {
     637         [ #  # ]:          0 :     if(rParameter.eStackMode==GlobalStackMode_STACK_Z)
     638                 :          0 :         rParameter.eStackMode = GlobalStackMode_NONE;
     639                 :          0 : }
     640                 :            : //--------------------------------------------------------------------------
     641                 :          0 : LineChartDialogController::LineChartDialogController()
     642                 :            : {
     643                 :          0 : }
     644                 :          0 : LineChartDialogController::~LineChartDialogController()
     645                 :            : {
     646         [ #  # ]:          0 : }
     647                 :          0 : String LineChartDialogController::getName()
     648                 :            : {
     649         [ #  # ]:          0 :     return String( SchResId( STR_TYPE_LINE ));
     650                 :            : }
     651                 :          0 : Image LineChartDialogController::getImage()
     652                 :            : {
     653         [ #  # ]:          0 :     return Image( SchResId( IMG_TYPE_LINE ));
     654                 :            : }
     655                 :          0 : const tTemplateServiceChartTypeParameterMap& LineChartDialogController::getTemplateMap() const
     656                 :            : {
     657                 :            :     static tTemplateServiceChartTypeParameterMap m_aTemplateMap =
     658                 :            :     tTemplateServiceChartTypeParameterMap
     659                 :            :     //-------------------------------------------------------
     660                 :            :     ( C2U( "com.sun.star.chart2.template.Symbol" ),                     ChartTypeParameter(1,false,false,GlobalStackMode_NONE,true,false) )
     661 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.StackedSymbol" ),              ChartTypeParameter(1,false,false,GlobalStackMode_STACK_Y,true,false) )
         [ #  # ][ #  # ]
     662 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.PercentStackedSymbol" ),       ChartTypeParameter(1,false,false,GlobalStackMode_STACK_Y_PERCENT,true,false) )
     663 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.LineSymbol" ),                 ChartTypeParameter(2,false,false,GlobalStackMode_NONE,true,true) )
     664 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.StackedLineSymbol" ),          ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y,true,true) )
     665 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.PercentStackedLineSymbol" ),   ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y_PERCENT,true,true) )
     666 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.Line" ),                       ChartTypeParameter(3,false,false,GlobalStackMode_NONE,false,true) )
     667 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.StackedLine" ),                ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y,false,true) )
     668 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.PercentStackedLine" ),         ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT,false,true) )
     669                 :            :     //-------------------------------------------------------
     670 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.StackedThreeDLine" ),          ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Y,false,true) )
     671 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.PercentStackedThreeDLine" ),   ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Y_PERCENT,false,true) )
     672 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.ThreeDLineDeep" ),             ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z,false,true) )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     673                 :            :     //-------------------------------------------------------
     674                 :            :     ;
     675                 :          0 :     return m_aTemplateMap;
     676                 :            : }
     677                 :          0 : void LineChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter )
     678                 :            : {
     679                 :          0 :     rSubTypeList.Clear();
     680                 :            : 
     681         [ #  # ]:          0 :     if( CurveStyle_LINES==rParameter.eCurveStyle )
     682                 :            :     {
     683                 :            :         //direct lines
     684 [ #  # ][ #  # ]:          0 :         if( GlobalStackMode_NONE == rParameter.eStackMode || GlobalStackMode_STACK_Z == rParameter.eStackMode )
     685                 :            :         {
     686 [ #  # ][ #  # ]:          0 :             rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_POINTS_XCATEGORY )));
         [ #  # ][ #  # ]
                 [ #  # ]
     687 [ #  # ][ #  # ]:          0 :             rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_LINE_P_XCATEGORY )));
         [ #  # ][ #  # ]
                 [ #  # ]
     688 [ #  # ][ #  # ]:          0 :             rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_LINE_O_XCATEGORY )));
         [ #  # ][ #  # ]
                 [ #  # ]
     689 [ #  # ][ #  # ]:          0 :             rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_LINE3D_XCATEGORY )));
         [ #  # ][ #  # ]
                 [ #  # ]
     690                 :            :         }
     691                 :            :         else
     692                 :            :         {
     693 [ #  # ][ #  # ]:          0 :             rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_POINTS_STACKED )));
         [ #  # ][ #  # ]
                 [ #  # ]
     694 [ #  # ][ #  # ]:          0 :             rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_LINE_P_STACKED )));
         [ #  # ][ #  # ]
                 [ #  # ]
     695 [ #  # ][ #  # ]:          0 :             rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_LINE_O_STACKED )));
         [ #  # ][ #  # ]
                 [ #  # ]
     696 [ #  # ][ #  # ]:          0 :             rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_LINE3D_STACKED )));
         [ #  # ][ #  # ]
                 [ #  # ]
     697                 :            :         }
     698                 :            :     }
     699                 :            :     else //CurveStyle_LINES
     700                 :            :     {
     701 [ #  # ][ #  # ]:          0 :         if( GlobalStackMode_NONE == rParameter.eStackMode || GlobalStackMode_STACK_Z == rParameter.eStackMode )
     702                 :            :         {
     703 [ #  # ][ #  # ]:          0 :             rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_POINTS_XCATEGORY )));
         [ #  # ][ #  # ]
                 [ #  # ]
     704 [ #  # ][ #  # ]:          0 :             rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_LINE_P_XCATEGORY_SMOOTH )));
         [ #  # ][ #  # ]
                 [ #  # ]
     705 [ #  # ][ #  # ]:          0 :             rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_LINE_O_XCATEGORY_SMOOTH )));
         [ #  # ][ #  # ]
                 [ #  # ]
     706 [ #  # ][ #  # ]:          0 :             rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_LINE3D_XCATEGORY_SMOOTH )));
         [ #  # ][ #  # ]
                 [ #  # ]
     707                 :            :         }
     708                 :            :         else
     709                 :            :         {
     710 [ #  # ][ #  # ]:          0 :             rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_POINTS_STACKED )));
         [ #  # ][ #  # ]
                 [ #  # ]
     711 [ #  # ][ #  # ]:          0 :             rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_LINE_P_STACKED_SMOOTH )));
         [ #  # ][ #  # ]
                 [ #  # ]
     712 [ #  # ][ #  # ]:          0 :             rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_LINE_O_STACKED_SMOOTH )));
         [ #  # ][ #  # ]
                 [ #  # ]
     713 [ #  # ][ #  # ]:          0 :             rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_LINE3D_STACKED_SMOOTH )));
         [ #  # ][ #  # ]
                 [ #  # ]
     714                 :            :         }
     715                 :            :     }
     716                 :            : 
     717 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 1, String( SchResId( STR_POINTS_ONLY )) );
                 [ #  # ]
     718 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 2, String( SchResId( STR_POINTS_AND_LINES )) );
                 [ #  # ]
     719 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 3, String( SchResId( STR_LINES_ONLY )) );
                 [ #  # ]
     720 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 4, String( SchResId( STR_LINES_3D )) );
                 [ #  # ]
     721                 :          0 : }
     722                 :          0 : bool LineChartDialogController::shouldShow_StackingControl() const
     723                 :            : {
     724                 :          0 :     return true;
     725                 :            : }
     726                 :          0 : bool LineChartDialogController::shouldShow_DeepStackingControl() const
     727                 :            : {
     728                 :          0 :     return false;
     729                 :            : }
     730                 :          0 : bool LineChartDialogController::shouldShow_SplineControl() const
     731                 :            : {
     732                 :          0 :     return true;
     733                 :            : }
     734                 :          0 : void LineChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter )
     735                 :            : {
     736                 :          0 :     rParameter.b3DLook = false;
     737                 :            : 
     738   [ #  #  #  # ]:          0 :     switch( rParameter.nSubTypeIndex )
     739                 :            :     {
     740                 :            :         case 2:
     741                 :          0 :             rParameter.bSymbols = true;
     742                 :          0 :             rParameter.bLines = true;
     743                 :          0 :             break;
     744                 :            :         case 3:
     745                 :          0 :             rParameter.bSymbols = false;
     746                 :          0 :             rParameter.bLines = true;
     747                 :          0 :             break;
     748                 :            :         case 4:
     749                 :          0 :             rParameter.bSymbols = false;
     750                 :          0 :             rParameter.bLines = true;
     751                 :          0 :             rParameter.b3DLook = true;
     752         [ #  # ]:          0 :             if( rParameter.eStackMode == GlobalStackMode_NONE )
     753                 :          0 :                 rParameter.eStackMode = GlobalStackMode_STACK_Z;
     754                 :          0 :             break;
     755                 :            :         default:
     756                 :          0 :             rParameter.bSymbols = true;
     757                 :          0 :             rParameter.bLines = false;
     758                 :          0 :             break;
     759                 :            :     }
     760                 :            : 
     761 [ #  # ][ #  # ]:          0 :     if(!rParameter.b3DLook && rParameter.eStackMode == GlobalStackMode_STACK_Z )
     762                 :          0 :         rParameter.eStackMode = GlobalStackMode_NONE;
     763                 :          0 : }
     764                 :          0 : void LineChartDialogController::adjustParameterToMainType( ChartTypeParameter& rParameter )
     765                 :            : {
     766 [ #  # ][ #  # ]:          0 :     if( rParameter.b3DLook && rParameter.eStackMode == GlobalStackMode_NONE )
     767                 :          0 :         rParameter.eStackMode = GlobalStackMode_STACK_Z;
     768                 :            : 
     769                 :          0 :     ChartTypeDialogController::adjustParameterToMainType( rParameter );
     770                 :          0 : }
     771                 :            : //--------------------------------------------------------------------------
     772                 :          0 : XYChartDialogController::XYChartDialogController()
     773                 :            : {
     774                 :          0 :     bSupportsXAxisWithValues = true;
     775                 :          0 : }
     776                 :          0 : XYChartDialogController::~XYChartDialogController()
     777                 :            : {
     778         [ #  # ]:          0 : }
     779                 :          0 : String XYChartDialogController::getName()
     780                 :            : {
     781         [ #  # ]:          0 :     return String( SchResId( STR_TYPE_XY ));
     782                 :            : }
     783                 :          0 : Image XYChartDialogController::getImage()
     784                 :            : {
     785         [ #  # ]:          0 :     return Image( SchResId( IMG_TYPE_XY ));
     786                 :            : }
     787                 :          0 : const tTemplateServiceChartTypeParameterMap& XYChartDialogController::getTemplateMap() const
     788                 :            : {
     789                 :            :     static tTemplateServiceChartTypeParameterMap m_aTemplateMap =
     790                 :            :     tTemplateServiceChartTypeParameterMap
     791                 :            :     //-------------------------------------------------------
     792                 :            :     ( C2U( "com.sun.star.chart2.template.ScatterSymbol" ),              ChartTypeParameter(1,true,false,GlobalStackMode_NONE,true,false) )
     793 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.ScatterLineSymbol" ),          ChartTypeParameter(2,true,false,GlobalStackMode_NONE,true,true) )
         [ #  # ][ #  # ]
     794 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.ScatterLine" ),                ChartTypeParameter(3,true,false,GlobalStackMode_NONE,false,true) )
     795 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.ThreeDScatter" ),              ChartTypeParameter(4,true,true,GlobalStackMode_NONE,false,true) )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     796                 :            :     ;
     797                 :          0 :     return m_aTemplateMap;
     798                 :            : }
     799                 :          0 : void XYChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter )
     800                 :            : {
     801                 :          0 :     rSubTypeList.Clear();
     802                 :            : 
     803         [ #  # ]:          0 :     if( CurveStyle_LINES==rParameter.eCurveStyle )
     804                 :            :     {
     805 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_POINTS_XVALUES )));
         [ #  # ][ #  # ]
                 [ #  # ]
     806 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_LINE_P_XVALUES )));
         [ #  # ][ #  # ]
                 [ #  # ]
     807 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_LINE_O_XVALUES )));
         [ #  # ][ #  # ]
                 [ #  # ]
     808 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_LINE3D_XVALUES )));
         [ #  # ][ #  # ]
                 [ #  # ]
     809                 :            :     }
     810                 :            :     else //CurveStyle_LINES
     811                 :            :     {
     812                 :            :         //smooth lines
     813 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_POINTS_XVALUES )));
         [ #  # ][ #  # ]
                 [ #  # ]
     814 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_LINE_P_XVALUES_SMOOTH )));
         [ #  # ][ #  # ]
                 [ #  # ]
     815 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_LINE_O_XVALUES_SMOOTH )));
         [ #  # ][ #  # ]
                 [ #  # ]
     816 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_LINE3D_XVALUES_SMOOTH )));
         [ #  # ][ #  # ]
                 [ #  # ]
     817                 :            :     }
     818                 :            : 
     819 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 1, String( SchResId( STR_POINTS_ONLY )) );
                 [ #  # ]
     820 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 2, String( SchResId( STR_POINTS_AND_LINES )) );
                 [ #  # ]
     821 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 3, String( SchResId( STR_LINES_ONLY )) );
                 [ #  # ]
     822 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 4, String( SchResId( STR_LINES_3D )) );
                 [ #  # ]
     823                 :          0 : }
     824                 :          0 : bool XYChartDialogController::shouldShow_SplineControl() const
     825                 :            : {
     826                 :          0 :     return true;
     827                 :            : }
     828                 :          0 : bool XYChartDialogController::shouldShow_SortByXValuesResourceGroup() const
     829                 :            : {
     830                 :          0 :     return true;
     831                 :            : }
     832                 :          0 : void XYChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter )
     833                 :            : {
     834                 :          0 :     rParameter.eStackMode=GlobalStackMode_NONE;
     835                 :          0 :     rParameter.b3DLook = false;
     836                 :            : 
     837   [ #  #  #  # ]:          0 :     switch( rParameter.nSubTypeIndex )
     838                 :            :     {
     839                 :            :         case 2:
     840                 :          0 :             rParameter.bSymbols = true;
     841                 :          0 :             rParameter.bLines = true;
     842                 :          0 :             break;
     843                 :            :         case 3:
     844                 :          0 :             rParameter.bSymbols = false;
     845                 :          0 :             rParameter.bLines = true;
     846                 :          0 :             break;
     847                 :            :         case 4:
     848                 :          0 :             rParameter.bSymbols = false;
     849                 :          0 :             rParameter.bLines = true;
     850                 :          0 :             rParameter.b3DLook = true;
     851                 :          0 :             rParameter.eStackMode=GlobalStackMode_STACK_Z;
     852                 :          0 :             break;
     853                 :            :         default:
     854                 :          0 :             rParameter.bSymbols = true;
     855                 :          0 :             rParameter.bLines = false;
     856                 :          0 :             break;
     857                 :            :     }
     858                 :          0 : }
     859                 :            : //--------------------------------------------------------------------------
     860                 :          0 : AreaChartDialogController::AreaChartDialogController()
     861                 :            : {
     862                 :          0 : }
     863                 :          0 : AreaChartDialogController::~AreaChartDialogController()
     864                 :            : {
     865         [ #  # ]:          0 : }
     866                 :          0 : String AreaChartDialogController::getName()
     867                 :            : {
     868         [ #  # ]:          0 :     return String( SchResId( STR_TYPE_AREA ));
     869                 :            : }
     870                 :          0 : Image AreaChartDialogController::getImage()
     871                 :            : {
     872         [ #  # ]:          0 :     return Image( SchResId( IMG_TYPE_AREA ));
     873                 :            : }
     874                 :          0 : bool AreaChartDialogController::shouldShow_3DLookControl() const
     875                 :            : {
     876                 :          0 :     return true;
     877                 :            : }
     878                 :          0 : const tTemplateServiceChartTypeParameterMap& AreaChartDialogController::getTemplateMap() const
     879                 :            : {
     880                 :            :     static tTemplateServiceChartTypeParameterMap m_aTemplateMap =
     881                 :            :     tTemplateServiceChartTypeParameterMap
     882                 :            :     ( C2U( "com.sun.star.chart2.template.Area" ),                     ChartTypeParameter(1,false,false,GlobalStackMode_NONE) )
     883 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.ThreeDArea" ),               ChartTypeParameter(1,false,true,GlobalStackMode_STACK_Z) )
         [ #  # ][ #  # ]
     884 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.StackedArea" ),              ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y) )
     885 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.StackedThreeDArea" ),        ChartTypeParameter(2,false,true,GlobalStackMode_STACK_Y) )
     886 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.PercentStackedArea" ),       ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT) )
     887 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.PercentStackedThreeDArea" ), ChartTypeParameter(3,false,true,GlobalStackMode_STACK_Y_PERCENT) )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     888                 :            :     ;
     889                 :          0 :     return m_aTemplateMap;
     890                 :            : }
     891                 :          0 : void AreaChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter )
     892                 :            : {
     893                 :          0 :     rSubTypeList.Clear();
     894                 :            : 
     895         [ #  # ]:          0 :     if( rParameter.b3DLook )
     896                 :            :     {
     897 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_AREAS_3D )));
         [ #  # ][ #  # ]
                 [ #  # ]
     898 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_AREAS_3D_1 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     899 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_AREAS_3D_2 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     900                 :            :     }
     901                 :            :     else
     902                 :            :     {
     903 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_AREAS_2D_1 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     904 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_AREAS_2D )));
         [ #  # ][ #  # ]
                 [ #  # ]
     905 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_AREAS_2D_3 )));
         [ #  # ][ #  # ]
                 [ #  # ]
     906                 :            :     }
     907                 :            : 
     908 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 1, String( SchResId( rParameter.b3DLook ? STR_DEEP : STR_NORMAL )) );
         [ #  # ][ #  # ]
     909 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 2, String( SchResId( STR_STACKED )) );
                 [ #  # ]
     910 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 3, String( SchResId( STR_PERCENT )) );
                 [ #  # ]
     911                 :          0 : }
     912                 :          0 : void AreaChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter )
     913                 :            : {
     914                 :          0 :     rParameter.eCurveStyle = CurveStyle_LINES;
     915                 :            : 
     916         [ #  # ]:          0 :     if( rParameter.nSubTypeIndex>3 )
     917                 :          0 :         rParameter.nSubTypeIndex = 1;
     918      [ #  #  # ]:          0 :     switch( rParameter.nSubTypeIndex )
     919                 :            :     {
     920                 :            :         case 2:
     921                 :          0 :             rParameter.eStackMode=GlobalStackMode_STACK_Y;
     922                 :          0 :             break;
     923                 :            :         case 3:
     924                 :          0 :             rParameter.eStackMode=GlobalStackMode_STACK_Y_PERCENT;
     925                 :          0 :             break;
     926                 :            :         default:
     927         [ #  # ]:          0 :             if( rParameter.b3DLook )
     928                 :          0 :                 rParameter.eStackMode=GlobalStackMode_STACK_Z;
     929                 :            :             else
     930                 :          0 :                 rParameter.eStackMode=GlobalStackMode_NONE;
     931                 :          0 :             break;
     932                 :            :     }
     933                 :          0 : }
     934                 :          0 : void AreaChartDialogController::adjustParameterToMainType( ChartTypeParameter& rParameter )
     935                 :            : {
     936 [ #  # ][ #  # ]:          0 :     if( rParameter.b3DLook && rParameter.eStackMode == GlobalStackMode_NONE )
     937                 :          0 :         rParameter.eStackMode = GlobalStackMode_STACK_Z;
     938                 :            : 
     939                 :          0 :     ChartTypeDialogController::adjustParameterToMainType( rParameter );
     940                 :          0 : }
     941                 :            : //--------------------------------------------------------------------------
     942                 :          0 : NetChartDialogController::NetChartDialogController()
     943                 :            : {
     944                 :          0 :     bSupports3D = false;
     945                 :          0 : }
     946                 :          0 : NetChartDialogController::~NetChartDialogController()
     947                 :            : {
     948         [ #  # ]:          0 : }
     949                 :          0 : String NetChartDialogController::getName()
     950                 :            : {
     951         [ #  # ]:          0 :     return String( SchResId( STR_TYPE_NET ));
     952                 :            : }
     953                 :          0 : Image NetChartDialogController::getImage()
     954                 :            : {
     955         [ #  # ]:          0 :     return Image( SchResId( IMG_TYPE_NET ));
     956                 :            : }
     957                 :          0 : bool NetChartDialogController::shouldShow_StackingControl() const
     958                 :            : {
     959                 :          0 :     return true;
     960                 :            : }
     961                 :          0 : const tTemplateServiceChartTypeParameterMap& NetChartDialogController::getTemplateMap() const
     962                 :            : {
     963                 :            :     static tTemplateServiceChartTypeParameterMap m_aTemplateMap =
     964                 :            :     tTemplateServiceChartTypeParameterMap
     965                 :            :     //@todo need templates with symbols only
     966                 :            :     ( C2U( "com.sun.star.chart2.template.NetSymbol" ),              ChartTypeParameter(1,false,false,GlobalStackMode_NONE,true,false) )
     967 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.StackedNetSymbol" ),       ChartTypeParameter(1,false,false,GlobalStackMode_STACK_Y,true,false) )
         [ #  # ][ #  # ]
     968 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.PercentStackedNetSymbol" ),ChartTypeParameter(1,false,false,GlobalStackMode_STACK_Y_PERCENT,true,false) )
     969                 :            : 
     970 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.Net" ),                    ChartTypeParameter(2,false,false,GlobalStackMode_NONE,true,true) )
     971 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.StackedNet" ),             ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y,true,true) )
     972 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.PercentStackedNet" ),      ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y_PERCENT,true,true) )
     973                 :            : 
     974 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.NetLine" ),                ChartTypeParameter(3,false,false,GlobalStackMode_NONE,false,true) )
     975 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.StackedNetLine" ),         ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y,false,true) )
     976 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.PercentStackedNetLine" ),  ChartTypeParameter(3,false,false,GlobalStackMode_STACK_Y_PERCENT,false,true) )
     977                 :            : 
     978 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.FilledNet" ),            ChartTypeParameter(4,false,false,GlobalStackMode_NONE,false,false) )
     979 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.StackedFilledNet" ),     ChartTypeParameter(4,false,false,GlobalStackMode_STACK_Y,false,false) )
     980 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.PercentStackedFilledNet" ),ChartTypeParameter(4,false,false,GlobalStackMode_STACK_Y_PERCENT,false,false) )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     981                 :            :     ;
     982                 :          0 :     return m_aTemplateMap;
     983                 :            : }
     984                 :          0 : void NetChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter )
     985                 :            : {
     986                 :          0 :     rSubTypeList.Clear();
     987                 :            : 
     988         [ #  # ]:          0 :     if( GlobalStackMode_NONE == rParameter.eStackMode )
     989                 :            :     {
     990 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_NET_SYMB )));
         [ #  # ][ #  # ]
                 [ #  # ]
     991 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_NET_LINESYMB )));
         [ #  # ][ #  # ]
                 [ #  # ]
     992 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_NET )));
         [ #  # ][ #  # ]
                 [ #  # ]
     993 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_NET_FILL )));
         [ #  # ][ #  # ]
                 [ #  # ]
     994                 :            :     }
     995                 :            :     else
     996                 :            :     {
     997 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_NET_SYMB_STACK )));
         [ #  # ][ #  # ]
                 [ #  # ]
     998 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_NET_LINESYMB_STACK )));
         [ #  # ][ #  # ]
                 [ #  # ]
     999 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_NET_STACK )));
         [ #  # ][ #  # ]
                 [ #  # ]
    1000 [ #  # ][ #  # ]:          0 :         rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_NET_FILL_STACK )));
         [ #  # ][ #  # ]
                 [ #  # ]
    1001                 :            :     }
    1002                 :            : 
    1003 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 1, String( SchResId( STR_POINTS_ONLY )) );
                 [ #  # ]
    1004 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 2, String( SchResId( STR_POINTS_AND_LINES )) );
                 [ #  # ]
    1005 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 3, String( SchResId( STR_LINES_ONLY )) );
                 [ #  # ]
    1006 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 4, String( SchResId( STR_FILLED )) );
                 [ #  # ]
    1007                 :          0 : }
    1008                 :          0 : void NetChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter )
    1009                 :            : {
    1010                 :          0 :     rParameter.b3DLook = false;
    1011         [ #  # ]:          0 :     if(rParameter.eStackMode==GlobalStackMode_STACK_Z)
    1012                 :          0 :         rParameter.eStackMode = GlobalStackMode_NONE;
    1013                 :            : 
    1014   [ #  #  #  # ]:          0 :     switch( rParameter.nSubTypeIndex )
    1015                 :            :     {
    1016                 :            :         case 2:
    1017                 :          0 :             rParameter.bSymbols = true;
    1018                 :          0 :             rParameter.bLines = true;
    1019                 :          0 :             break;
    1020                 :            :         case 3:
    1021                 :          0 :             rParameter.bSymbols = false;
    1022                 :          0 :             rParameter.bLines = true;
    1023                 :          0 :             break;
    1024                 :            :         case 4:
    1025                 :          0 :             rParameter.bSymbols = false;
    1026                 :          0 :             rParameter.bLines = false;
    1027                 :          0 :             break;
    1028                 :            :         default:
    1029                 :          0 :             rParameter.bSymbols = true;
    1030                 :          0 :             rParameter.bLines = false;
    1031                 :          0 :             break;
    1032                 :            :     }
    1033                 :          0 : }
    1034                 :            : //--------------------------------------------------------------------------
    1035                 :          0 : StockChartDialogController::StockChartDialogController()
    1036                 :            : {
    1037                 :          0 :     bSupports3D = false;
    1038                 :          0 : }
    1039                 :            : 
    1040                 :          0 : StockChartDialogController::~StockChartDialogController()
    1041                 :            : {
    1042         [ #  # ]:          0 : }
    1043                 :            : 
    1044                 :          0 : String StockChartDialogController::getName()
    1045                 :            : {
    1046         [ #  # ]:          0 :     return String( SchResId( STR_TYPE_STOCK ));
    1047                 :            : }
    1048                 :          0 : Image StockChartDialogController::getImage()
    1049                 :            : {
    1050         [ #  # ]:          0 :     return Image( SchResId( IMG_TYPE_STOCK ));
    1051                 :            : }
    1052                 :            : 
    1053                 :          0 : const tTemplateServiceChartTypeParameterMap& StockChartDialogController::getTemplateMap() const
    1054                 :            : {
    1055                 :            :     static tTemplateServiceChartTypeParameterMap m_aTemplateMap =
    1056                 :            :     tTemplateServiceChartTypeParameterMap
    1057                 :            :     ( C2U( "com.sun.star.chart2.template.StockLowHighClose" ),          ChartTypeParameter(1) )
    1058 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.StockOpenLowHighClose" ),      ChartTypeParameter(2) )
         [ #  # ][ #  # ]
    1059 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.StockVolumeLowHighClose" ),    ChartTypeParameter(3) )
    1060 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ),ChartTypeParameter(4) )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
    1061                 :            :     ;
    1062                 :          0 :     return m_aTemplateMap;
    1063                 :            : }
    1064                 :          0 : void StockChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ )
    1065                 :            : {
    1066                 :          0 :     rSubTypeList.Clear();
    1067 [ #  # ][ #  # ]:          0 :     rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_STOCK_1 )));
         [ #  # ][ #  # ]
                 [ #  # ]
    1068 [ #  # ][ #  # ]:          0 :     rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_STOCK_2 )));
         [ #  # ][ #  # ]
                 [ #  # ]
    1069 [ #  # ][ #  # ]:          0 :     rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_STOCK_3 )));
         [ #  # ][ #  # ]
                 [ #  # ]
    1070 [ #  # ][ #  # ]:          0 :     rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_STOCK_4 )));
         [ #  # ][ #  # ]
                 [ #  # ]
    1071                 :            : 
    1072 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 1, String( SchResId( STR_STOCK_1 )) );
                 [ #  # ]
    1073 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 2, String( SchResId( STR_STOCK_2 )) );
                 [ #  # ]
    1074 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 3, String( SchResId( STR_STOCK_3 )) );
                 [ #  # ]
    1075 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 4, String( SchResId( STR_STOCK_4 )) );
                 [ #  # ]
    1076                 :          0 : }
    1077                 :          0 : void StockChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter )
    1078                 :            : {
    1079                 :          0 :     rParameter.b3DLook = false;
    1080                 :          0 :     rParameter.eStackMode = GlobalStackMode_NONE;
    1081                 :          0 : }
    1082                 :            : //--------------------------------------------------------------------------
    1083                 :          0 : CombiColumnLineChartDialogController::CombiColumnLineChartDialogController()
    1084                 :            :                     : m_pFT_NumberOfLines(0)
    1085                 :          0 :                     , m_pMF_NumberOfLines(0)
    1086                 :            : {
    1087                 :          0 :     bSupports3D = false;
    1088                 :          0 : }
    1089                 :            : 
    1090                 :          0 : CombiColumnLineChartDialogController::~CombiColumnLineChartDialogController()
    1091                 :            : {
    1092         [ #  # ]:          0 :     if(m_pFT_NumberOfLines)
    1093 [ #  # ][ #  # ]:          0 :         delete m_pFT_NumberOfLines;
    1094         [ #  # ]:          0 :     if(m_pMF_NumberOfLines)
    1095 [ #  # ][ #  # ]:          0 :         delete m_pMF_NumberOfLines;
    1096         [ #  # ]:          0 : }
    1097                 :            : 
    1098                 :          0 : String CombiColumnLineChartDialogController::getName()
    1099                 :            : {
    1100         [ #  # ]:          0 :     return String( SchResId( STR_TYPE_COMBI_COLUMN_LINE ));
    1101                 :            : }
    1102                 :            : 
    1103                 :          0 : Image CombiColumnLineChartDialogController::getImage( )
    1104                 :            : {
    1105         [ #  # ]:          0 :     return Image( SchResId( IMG_TYPE_COLUMN_LINE ) );
    1106                 :            : }
    1107                 :            : 
    1108                 :          0 : const tTemplateServiceChartTypeParameterMap& CombiColumnLineChartDialogController::getTemplateMap() const
    1109                 :            : {
    1110                 :            :     static tTemplateServiceChartTypeParameterMap m_aTemplateMap =
    1111                 :            :     tTemplateServiceChartTypeParameterMap
    1112                 :            :     ( C2U( "com.sun.star.chart2.template.ColumnWithLine" ),             ChartTypeParameter(1) )
    1113 [ #  # ][ #  # ]:          0 :     ( C2U( "com.sun.star.chart2.template.StackedColumnWithLine" ),      ChartTypeParameter(2,false,false,GlobalStackMode_STACK_Y) )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
    1114                 :            :     ;
    1115                 :          0 :     return m_aTemplateMap;
    1116                 :            : }
    1117                 :          0 : void CombiColumnLineChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ )
    1118                 :            : {
    1119                 :          0 :     rSubTypeList.Clear();
    1120 [ #  # ][ #  # ]:          0 :     rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_COLUMN_LINE )));
         [ #  # ][ #  # ]
                 [ #  # ]
    1121 [ #  # ][ #  # ]:          0 :     rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_COLUMN_LINE_STACKED )));
         [ #  # ][ #  # ]
                 [ #  # ]
    1122                 :            : 
    1123 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 1, String( SchResId( STR_LINE_COLUMN )) );
                 [ #  # ]
    1124 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 2, String( SchResId( STR_LINE_STACKEDCOLUMN )) );
                 [ #  # ]
    1125                 :          0 : }
    1126                 :          0 : void CombiColumnLineChartDialogController::showExtraControls( Window* pParent, const Point& rPosition, const Size& rSize )
    1127                 :            : {
    1128         [ #  # ]:          0 :     if(!m_pFT_NumberOfLines)
    1129                 :            :     {
    1130 [ #  # ][ #  # ]:          0 :         m_pFT_NumberOfLines = new FixedText(pParent,pParent->GetStyle());
                 [ #  # ]
    1131 [ #  # ][ #  # ]:          0 :         m_pFT_NumberOfLines->SetText( String( SchResId( STR_NUMBER_OF_LINES )) );
         [ #  # ][ #  # ]
    1132                 :            :     }
    1133         [ #  # ]:          0 :     if(!m_pMF_NumberOfLines)
    1134                 :            :     {
    1135 [ #  # ][ #  # ]:          0 :         m_pMF_NumberOfLines = new MetricField(pParent,pParent->GetStyle() | WB_SPIN | WB_REPEAT | WB_BORDER );
                 [ #  # ]
    1136         [ #  # ]:          0 :         m_pMF_NumberOfLines->SetDefaultUnit( FUNIT_CUSTOM );
    1137         [ #  # ]:          0 :         m_pMF_NumberOfLines->SetUnit( FUNIT_CUSTOM );
    1138                 :          0 :         m_pMF_NumberOfLines->SetSpinSize(1);
    1139         [ #  # ]:          0 :         m_pMF_NumberOfLines->SetFirst( 1, FUNIT_CUSTOM );
    1140         [ #  # ]:          0 :         m_pMF_NumberOfLines->SetLast( 100, FUNIT_CUSTOM );
    1141         [ #  # ]:          0 :         m_pMF_NumberOfLines->SetMin( 1, FUNIT_CUSTOM );
    1142         [ #  # ]:          0 :         m_pMF_NumberOfLines->SetMax( 100, FUNIT_CUSTOM );
    1143         [ #  # ]:          0 :         m_pMF_NumberOfLines->SetHelpId( HID_SCH_NUM_OF_LINES );
    1144                 :            : 
    1145 [ #  # ][ #  # ]:          0 :         m_pMF_NumberOfLines->SetModifyHdl( LINK( this, CombiColumnLineChartDialogController, ChangeLineCountHdl ) );
    1146                 :            :     }
    1147                 :            : 
    1148 [ #  # ][ #  # ]:          0 :     Size aDistanceSize( pParent->LogicToPixel( Size(RSC_SP_CTRL_DESC_X,2), MapMode(MAP_APPFONT) ) );
                 [ #  # ]
    1149 [ #  # ][ #  # ]:          0 :     Size aMFSize( pParent->LogicToPixel( Size(20,RSC_CD_TEXTBOX_HEIGHT), MapMode(MAP_APPFONT) ) );
                 [ #  # ]
    1150         [ #  # ]:          0 :     m_pMF_NumberOfLines->SetSizePixel( aMFSize );
    1151                 :            : 
    1152         [ #  # ]:          0 :     Size aFTSize(m_pFT_NumberOfLines->CalcMinimumSize(rSize.Width()-aMFSize.Width()-aDistanceSize.Width()));
    1153         [ #  # ]:          0 :     m_pFT_NumberOfLines->SetSizePixel(aFTSize);
    1154                 :            : 
    1155         [ #  # ]:          0 :     m_pFT_NumberOfLines->SetPosPixel( Point( rPosition.X(), rPosition.Y()+aDistanceSize.Height()) );
    1156         [ #  # ]:          0 :     m_pMF_NumberOfLines->SetPosPixel( Point( rPosition.X()+aFTSize.Width()+aDistanceSize.Width(), rPosition.Y()) );
    1157                 :            : 
    1158         [ #  # ]:          0 :     m_pFT_NumberOfLines->Show();
    1159         [ #  # ]:          0 :     m_pMF_NumberOfLines->Show();
    1160 [ #  # ][ #  # ]:          0 :     m_pMF_NumberOfLines->SetAccessibleName(m_pFT_NumberOfLines->GetText());
                 [ #  # ]
    1161         [ #  # ]:          0 :     m_pMF_NumberOfLines->SetAccessibleRelationLabeledBy(m_pFT_NumberOfLines);
    1162                 :          0 : }
    1163                 :          0 : void CombiColumnLineChartDialogController::hideExtraControls() const
    1164                 :            : {
    1165         [ #  # ]:          0 :     if(m_pFT_NumberOfLines)
    1166                 :          0 :         m_pFT_NumberOfLines->Hide();
    1167         [ #  # ]:          0 :     if(m_pMF_NumberOfLines)
    1168                 :          0 :         m_pMF_NumberOfLines->Hide();
    1169                 :          0 : }
    1170                 :          0 : void CombiColumnLineChartDialogController::fillExtraControls( const ChartTypeParameter& /*rParameter*/
    1171                 :            :                 , const uno::Reference< XChartDocument >& xChartModel
    1172                 :            :                 , const uno::Reference< beans::XPropertySet >& xTemplateProps ) const
    1173                 :            : {
    1174         [ #  # ]:          0 :     if(!m_pMF_NumberOfLines)
    1175                 :            :         return;
    1176                 :            : 
    1177         [ #  # ]:          0 :     uno::Reference< frame::XModel > xModel( xChartModel, uno::UNO_QUERY );
    1178                 :            : 
    1179         [ #  # ]:          0 :     uno::Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram( xModel );
    1180         [ #  # ]:          0 :     if(!xDiagram.is())
    1181                 :            :         return;
    1182                 :            : 
    1183                 :          0 :     sal_Int32 nNumLines = 0;
    1184                 :            : 
    1185         [ #  # ]:          0 :     if(xTemplateProps.is())
    1186                 :            :     try
    1187                 :            :     {
    1188 [ #  # ][ #  # ]:          0 :         xTemplateProps->getPropertyValue( C2U("NumberOfLines") ) >>= nNumLines;
         [ #  # ][ #  # ]
    1189                 :            :     }
    1190         [ #  # ]:          0 :     catch( const uno::Exception & ex )
    1191                 :            :     {
    1192                 :            :         ASSERT_EXCEPTION( ex );
    1193                 :            :     }
    1194         [ #  # ]:          0 :     if( nNumLines < 0 )
    1195                 :          0 :         nNumLines = 0;
    1196         [ #  # ]:          0 :     m_pMF_NumberOfLines->SetValue( nNumLines );
    1197                 :            : 
    1198         [ #  # ]:          0 :     sal_Int32 nMaxLines = ChartModelHelper::getDataSeries( xModel ).size() - 1;
    1199         [ #  # ]:          0 :     if( nMaxLines < 0 )
    1200                 :          0 :         nMaxLines = 0;
    1201         [ #  # ]:          0 :     m_pMF_NumberOfLines->SetLast( nMaxLines );
    1202 [ #  # ][ #  # ]:          0 :     m_pMF_NumberOfLines->SetMax( nMaxLines );
                 [ #  # ]
    1203                 :            : }
    1204                 :          0 : void CombiColumnLineChartDialogController::setTemplateProperties( const uno::Reference< beans::XPropertySet >& xTemplateProps ) const throw (uno::RuntimeException)
    1205                 :            : {
    1206         [ #  # ]:          0 :     if( xTemplateProps.is() )
    1207                 :            :     {
    1208         [ #  # ]:          0 :         sal_Int32 nNumLines = static_cast< sal_Int32 >( m_pMF_NumberOfLines->GetValue());
    1209 [ #  # ][ #  # ]:          0 :         xTemplateProps->setPropertyValue( C2U( "NumberOfLines" ), uno::makeAny(nNumLines) );
         [ #  # ][ #  # ]
    1210                 :            :     }
    1211                 :          0 : }
    1212                 :            : 
    1213                 :          0 : IMPL_LINK_NOARG(CombiColumnLineChartDialogController, ChangeLineCountHdl)
    1214                 :            : {
    1215         [ #  # ]:          0 :     if( m_pChangeListener )
    1216                 :          0 :         m_pChangeListener->stateChanged(this);
    1217                 :          0 :     return 0;
    1218                 :            : }
    1219                 :          0 : void CombiColumnLineChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter )
    1220                 :            : {
    1221                 :          0 :     rParameter.b3DLook = false;
    1222         [ #  # ]:          0 :     if(rParameter.eStackMode==GlobalStackMode_STACK_Z)
    1223                 :          0 :         rParameter.eStackMode = GlobalStackMode_NONE;
    1224                 :            : 
    1225         [ #  # ]:          0 :     switch( rParameter.nSubTypeIndex )
    1226                 :            :     {
    1227                 :            :         case 2:
    1228                 :          0 :             rParameter.eStackMode=GlobalStackMode_STACK_Y;
    1229                 :          0 :             break;
    1230                 :            :         default:
    1231                 :          0 :             rParameter.eStackMode=GlobalStackMode_NONE;
    1232                 :          0 :             break;
    1233                 :            :     }
    1234                 :          0 : }
    1235                 :            : //--------------------------------------------------------------------------
    1236                 :          0 : BubbleChartDialogController::BubbleChartDialogController()
    1237                 :            : {
    1238                 :          0 : }
    1239                 :          0 : BubbleChartDialogController::~BubbleChartDialogController()
    1240                 :            : {
    1241         [ #  # ]:          0 : }
    1242                 :          0 : String BubbleChartDialogController::getName()
    1243                 :            : {
    1244         [ #  # ]:          0 :     return String( SchResId( STR_TYPE_BUBBLE ));
    1245                 :            : }
    1246                 :          0 : Image BubbleChartDialogController::getImage()
    1247                 :            : {
    1248         [ #  # ]:          0 :     return Image( SchResId( IMG_TYPE_BUBBLE ));
    1249                 :            : }
    1250                 :          0 : const tTemplateServiceChartTypeParameterMap& BubbleChartDialogController::getTemplateMap() const
    1251                 :            : {
    1252                 :            :     static tTemplateServiceChartTypeParameterMap m_aTemplateMap =
    1253                 :            :     tTemplateServiceChartTypeParameterMap
    1254 [ #  # ][ #  # ]:          0 :         ( C2U( "com.sun.star.chart2.template.Bubble" ),          ChartTypeParameter(1,true) ) ;
         [ #  # ][ #  # ]
                 [ #  # ]
    1255                 :          0 :     return m_aTemplateMap;
    1256                 :            : }
    1257                 :          0 : void BubbleChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ )
    1258                 :            : {
    1259                 :          0 :     rSubTypeList.Clear();
    1260 [ #  # ][ #  # ]:          0 :     rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_BUBBLE_1 )));
         [ #  # ][ #  # ]
                 [ #  # ]
    1261                 :            : 
    1262 [ #  # ][ #  # ]:          0 :     rSubTypeList.SetItemText( 1, String( SchResId( STR_BUBBLE_1 )) );
                 [ #  # ]
    1263                 :          0 : }
    1264                 :          0 : void BubbleChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter )
    1265                 :            : {
    1266                 :          0 :     rParameter.b3DLook = false;
    1267                 :          0 :     rParameter.eStackMode = GlobalStackMode_NONE;
    1268                 :          0 : }
    1269                 :            : //.............................................................................
    1270                 :            : } //namespace chart
    1271                 :            : //.............................................................................
    1272                 :            : 
    1273                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10