2003-10-06 08:58:36 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2005-09-07 23:10:26 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2003-10-06 08:58:36 +00:00
|
|
|
*
|
2005-09-07 23:10:26 +00:00
|
|
|
* $RCSfile: dlg_ObjectProperties.cxx,v $
|
2003-10-06 08:58:36 +00:00
|
|
|
*
|
2007-11-23 10:46:53 +00:00
|
|
|
* $Revision: 1.20 $
|
2003-10-06 08:58:36 +00:00
|
|
|
*
|
2007-11-23 10:46:53 +00:00
|
|
|
* last change: $Author: ihi $ $Date: 2007-11-23 11:46:53 $
|
2003-10-06 08:58:36 +00:00
|
|
|
*
|
2005-09-07 23:10:26 +00:00
|
|
|
* The Contents of this file are made available subject to
|
|
|
|
* the terms of GNU Lesser General Public License Version 2.1.
|
2003-10-06 08:58:36 +00:00
|
|
|
*
|
|
|
|
*
|
2005-09-07 23:10:26 +00:00
|
|
|
* GNU Lesser General Public License Version 2.1
|
|
|
|
* =============================================
|
|
|
|
* Copyright 2005 by Sun Microsystems, Inc.
|
|
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
2003-10-06 08:58:36 +00:00
|
|
|
*
|
2005-09-07 23:10:26 +00:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License version 2.1, as published by the Free Software Foundation.
|
2003-10-06 08:58:36 +00:00
|
|
|
*
|
2005-09-07 23:10:26 +00:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2003-10-06 08:58:36 +00:00
|
|
|
*
|
2005-09-07 23:10:26 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
* MA 02111-1307 USA
|
2003-10-06 08:58:36 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
2006-09-17 11:58:10 +00:00
|
|
|
|
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_chart2.hxx"
|
2003-10-06 08:58:36 +00:00
|
|
|
#ifndef _ZFORLIST_HXX
|
|
|
|
#ifndef _ZFORLIST_DECLARE_TABLE
|
|
|
|
#define _ZFORLIST_DECLARE_TABLE
|
|
|
|
#endif
|
|
|
|
#include <svtools/zforlist.hxx>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "dlg_ObjectProperties.hxx"
|
2007-05-22 16:37:01 +00:00
|
|
|
#include "ResourceIds.hrc"
|
|
|
|
#include "Strings.hrc"
|
2003-10-06 08:58:36 +00:00
|
|
|
#include "TabPages.hrc"
|
|
|
|
#include "tp_AxisLabel.hxx"
|
|
|
|
#include "tp_DataLabel.hxx"
|
|
|
|
#include "tp_LegendPosition.hxx"
|
|
|
|
#include "tp_PointGeometry.hxx"
|
|
|
|
#include "tp_Scale.hxx"
|
|
|
|
#include "tp_SeriesStatistic.hxx"
|
|
|
|
#include "tp_SeriesToAxis.hxx"
|
|
|
|
#include "tp_TitleRotation.hxx"
|
2007-11-23 10:46:53 +00:00
|
|
|
#include "tp_RegressionOptions.hxx"
|
2003-10-06 08:58:36 +00:00
|
|
|
#include "ResId.hxx"
|
|
|
|
#include "ViewElementListProvider.hxx"
|
2003-11-08 21:59:51 +00:00
|
|
|
#include "macros.hxx"
|
|
|
|
#include "ChartModelHelper.hxx"
|
2003-11-10 18:36:10 +00:00
|
|
|
#include "ChartTypeHelper.hxx"
|
2007-05-22 16:37:01 +00:00
|
|
|
#include "ObjectNameProvider.hxx"
|
|
|
|
#include "DiagramHelper.hxx"
|
|
|
|
#include "chartview/NumberFormatterWrapper.hxx"
|
|
|
|
#include "AxisIndexDefines.hxx"
|
2003-11-08 21:59:51 +00:00
|
|
|
|
2007-05-22 16:37:01 +00:00
|
|
|
#ifndef _COM_SUN_STAR_CHART2_XAXIS_HPP_
|
|
|
|
#include <com/sun/star/chart2/XAxis.hpp>
|
|
|
|
#endif
|
2004-01-26 08:13:31 +00:00
|
|
|
#ifndef _COM_SUN_STAR_CHART2_XCHARTTYPE_HPP_
|
|
|
|
#include <com/sun/star/chart2/XChartType.hpp>
|
2003-11-08 21:59:51 +00:00
|
|
|
#endif
|
2004-01-26 08:13:31 +00:00
|
|
|
#ifndef _COM_SUN_STAR_CHART2_XDATASERIES_HPP_
|
|
|
|
#include <com/sun/star/chart2/XDataSeries.hpp>
|
2003-11-08 21:59:51 +00:00
|
|
|
#endif
|
|
|
|
|
2004-02-10 09:21:12 +00:00
|
|
|
#ifndef _SFXINTITEM_HXX
|
|
|
|
#include <svtools/intitem.hxx>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _SVX_SVXIDS_HRC
|
|
|
|
#include <svx/svxids.hrc>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _SVX_DRAWITEM_HXX
|
|
|
|
#include <svx/drawitem.hxx>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _OFF_OFAITEM_HXX
|
|
|
|
#include <svx/ofaitem.hxx>
|
|
|
|
#endif
|
|
|
|
#ifndef _SVX_GRAPHICITEM_HXX
|
|
|
|
#include <svx/svxgrahicitem.hxx>
|
|
|
|
#endif
|
2003-10-06 08:58:36 +00:00
|
|
|
|
|
|
|
#ifndef _SVX_DIALOGS_HRC
|
|
|
|
#include <svx/dialogs.hrc>
|
|
|
|
#endif
|
|
|
|
#ifndef _SVX_FLSTITEM_HXX
|
|
|
|
#include <svx/flstitem.hxx>
|
|
|
|
#endif
|
|
|
|
#ifndef _SVX_TAB_LINE_HXX
|
|
|
|
#include <svx/tabline.hxx>
|
|
|
|
#endif
|
|
|
|
|
2004-05-12 14:24:22 +00:00
|
|
|
#include <svx/flagsdef.hxx>
|
2003-10-06 08:58:36 +00:00
|
|
|
|
|
|
|
#ifndef _SVX_NUMINF_HXX
|
|
|
|
#include <svx/numinf.hxx>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//.............................................................................
|
|
|
|
namespace chart
|
|
|
|
{
|
|
|
|
//.............................................................................
|
|
|
|
|
2003-11-08 21:59:51 +00:00
|
|
|
using namespace ::com::sun::star;
|
2004-01-26 08:13:31 +00:00
|
|
|
using namespace ::com::sun::star::chart2;
|
2003-11-08 21:59:51 +00:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
ObjectPropertiesDialogParameter::ObjectPropertiesDialogParameter( const rtl::OUString& rObjectCID )
|
|
|
|
: m_aObjectCID( rObjectCID )
|
|
|
|
, m_eObjectType( ObjectIdentifier::getObjectType( m_aObjectCID ) )
|
|
|
|
, m_bAffectsMultipleObjects(false)
|
2007-05-22 16:37:01 +00:00
|
|
|
, m_aLocalizedName()
|
2003-11-08 21:59:51 +00:00
|
|
|
, m_bHasGeometryProperties(false)
|
|
|
|
, m_bHasStatisticProperties(false)
|
2003-12-10 15:51:53 +00:00
|
|
|
, m_bHasRegressionProperties(false)
|
2003-11-08 21:59:51 +00:00
|
|
|
, m_bProvidesSecondaryYAxis(false)
|
2007-05-22 16:37:01 +00:00
|
|
|
, m_bProvidesOverlapAndGapWidth(false)
|
2003-11-08 21:59:51 +00:00
|
|
|
, m_bHasAreaProperties(false)
|
|
|
|
, m_bHasLineProperties(false)
|
|
|
|
, m_bHasSymbolProperties(false)
|
|
|
|
, m_bHasScaleProperties(false)
|
|
|
|
, m_bCanAxisLabelsBeStaggered(false)
|
2007-10-22 15:45:39 +00:00
|
|
|
, m_bHasNumberProperties(false)
|
2003-11-08 21:59:51 +00:00
|
|
|
{
|
|
|
|
rtl::OUString aParticleID = ObjectIdentifier::getParticleID( m_aObjectCID );
|
|
|
|
m_bAffectsMultipleObjects = aParticleID.equals(C2U("ALLELEMENTS"));
|
|
|
|
}
|
|
|
|
ObjectPropertiesDialogParameter::~ObjectPropertiesDialogParameter()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
ObjectType ObjectPropertiesDialogParameter::getObjectType() const
|
|
|
|
{
|
|
|
|
return m_eObjectType;
|
|
|
|
}
|
2007-05-22 16:37:01 +00:00
|
|
|
rtl::OUString ObjectPropertiesDialogParameter::getLocalizedName() const
|
|
|
|
{
|
|
|
|
return m_aLocalizedName;
|
|
|
|
}
|
2003-11-08 21:59:51 +00:00
|
|
|
|
|
|
|
void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel >& xChartModel )
|
|
|
|
{
|
2007-05-22 16:37:01 +00:00
|
|
|
uno::Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( xChartModel ) );
|
2003-11-10 18:36:10 +00:00
|
|
|
uno::Reference< XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( m_aObjectCID, xChartModel );
|
|
|
|
uno::Reference< XChartType > xChartType = ChartModelHelper::getChartTypeOfSeries( xChartModel, xSeries );
|
2007-05-22 16:37:01 +00:00
|
|
|
sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram );
|
2003-11-08 21:59:51 +00:00
|
|
|
|
2007-09-18 13:53:52 +00:00
|
|
|
bool bHasSeriesProperties = (OBJECTTYPE_DATA_SERIES==m_eObjectType || OBJECTTYPE_DATA_LABELS==m_eObjectType);
|
|
|
|
bool bHasDataPointproperties = (OBJECTTYPE_DATA_POINT==m_eObjectType);
|
2003-11-08 21:59:51 +00:00
|
|
|
|
2007-09-18 13:53:52 +00:00
|
|
|
if( bHasSeriesProperties || bHasDataPointproperties )
|
2003-11-08 21:59:51 +00:00
|
|
|
{
|
2007-09-18 13:53:52 +00:00
|
|
|
m_bHasGeometryProperties = ChartTypeHelper::isSupportingGeometryProperties( xChartType, nDimensionCount );
|
|
|
|
m_bHasAreaProperties = ChartTypeHelper::isSupportingAreaProperties( xChartType, nDimensionCount );
|
|
|
|
m_bHasSymbolProperties = ChartTypeHelper::isSupportingSymbolProperties( xChartType, nDimensionCount );
|
|
|
|
|
|
|
|
if( bHasSeriesProperties )
|
|
|
|
{
|
|
|
|
m_bHasStatisticProperties = ChartTypeHelper::isSupportingStatisticProperties( xChartType, nDimensionCount );
|
|
|
|
m_bHasRegressionProperties = ChartTypeHelper::isSupportingRegressionProperties( xChartType, nDimensionCount );
|
|
|
|
m_bProvidesSecondaryYAxis = ChartTypeHelper::isSupportingSecondaryAxis( xChartType, nDimensionCount, 1 );
|
|
|
|
m_bProvidesOverlapAndGapWidth = ChartTypeHelper::isSupportingOverlapAndGapWidthProperties( xChartType, nDimensionCount );
|
|
|
|
}
|
2003-11-08 21:59:51 +00:00
|
|
|
}
|
2007-09-18 13:53:52 +00:00
|
|
|
m_bHasLineProperties = true; //@todo ask object
|
2003-11-08 21:59:51 +00:00
|
|
|
|
|
|
|
if( OBJECTTYPE_AXIS == m_eObjectType )
|
|
|
|
{
|
|
|
|
//show scale properties only for a single axis not for multiselection
|
|
|
|
m_bHasScaleProperties = !m_bAffectsMultipleObjects;
|
|
|
|
|
2007-10-22 15:45:39 +00:00
|
|
|
//no scale page for series axis
|
2007-05-22 16:37:01 +00:00
|
|
|
if( m_bHasScaleProperties )
|
|
|
|
{
|
|
|
|
uno::Reference< XAxis > xAxis( ObjectIdentifier::getAxisForCID( m_aObjectCID, xChartModel ) );
|
|
|
|
if( xAxis.is() )
|
|
|
|
{
|
|
|
|
ScaleData aData( xAxis->getScaleData() );
|
2007-10-22 15:45:39 +00:00
|
|
|
if( chart2::AxisType::SERIES == aData.AxisType )
|
2007-05-22 16:37:01 +00:00
|
|
|
m_bHasScaleProperties = false;
|
2007-10-22 15:45:39 +00:00
|
|
|
if( chart2::AxisType::REALNUMBER == aData.AxisType || chart2::AxisType::PERCENT == aData.AxisType )
|
|
|
|
m_bHasNumberProperties = true;
|
2007-05-22 16:37:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-11-08 21:59:51 +00:00
|
|
|
//no staggering of labels for 3D axis
|
|
|
|
m_bCanAxisLabelsBeStaggered = nDimensionCount==2;
|
|
|
|
}
|
2007-05-22 16:37:01 +00:00
|
|
|
|
|
|
|
//create gui name for this object
|
|
|
|
{
|
|
|
|
if( !m_bAffectsMultipleObjects && OBJECTTYPE_AXIS == m_eObjectType )
|
|
|
|
{
|
|
|
|
m_aLocalizedName = ObjectNameProvider::getAxisName( m_aObjectCID, xChartModel );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ObjectType eType = m_eObjectType;
|
|
|
|
if( OBJECTTYPE_DATA_LABEL == eType )
|
|
|
|
eType = OBJECTTYPE_DATA_POINT;
|
|
|
|
else if( OBJECTTYPE_DATA_LABELS == eType )
|
|
|
|
eType = OBJECTTYPE_DATA_SERIES;
|
|
|
|
m_aLocalizedName = ObjectNameProvider::getName(eType,m_bAffectsMultipleObjects);
|
|
|
|
}
|
|
|
|
}
|
2003-11-08 21:59:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool ObjectPropertiesDialogParameter::HasGeometryProperties() const
|
|
|
|
{
|
|
|
|
return m_bHasGeometryProperties;
|
|
|
|
}
|
|
|
|
bool ObjectPropertiesDialogParameter::HasStatisticProperties() const
|
|
|
|
{
|
|
|
|
return m_bHasStatisticProperties;
|
|
|
|
}
|
2003-12-10 15:51:53 +00:00
|
|
|
bool ObjectPropertiesDialogParameter::HasRegressionProperties() const
|
|
|
|
{
|
|
|
|
return m_bHasRegressionProperties;
|
|
|
|
}
|
2003-11-08 21:59:51 +00:00
|
|
|
bool ObjectPropertiesDialogParameter::ProvidesSecondaryYAxis() const
|
|
|
|
{
|
|
|
|
return m_bProvidesSecondaryYAxis;
|
|
|
|
}
|
2007-05-22 16:37:01 +00:00
|
|
|
bool ObjectPropertiesDialogParameter::ProvidesOverlapAndGapWidth() const
|
|
|
|
{
|
|
|
|
return m_bProvidesOverlapAndGapWidth;
|
|
|
|
}
|
2003-11-08 21:59:51 +00:00
|
|
|
bool ObjectPropertiesDialogParameter::HasAreaProperties() const
|
|
|
|
{
|
|
|
|
return m_bHasAreaProperties;
|
|
|
|
}
|
|
|
|
bool ObjectPropertiesDialogParameter::HasLineProperties() const
|
|
|
|
{
|
|
|
|
return m_bHasLineProperties;
|
|
|
|
}
|
|
|
|
bool ObjectPropertiesDialogParameter::HasSymbolProperties() const
|
|
|
|
{
|
|
|
|
return m_bHasSymbolProperties;
|
|
|
|
}
|
|
|
|
bool ObjectPropertiesDialogParameter::HasScaleProperties() const
|
|
|
|
{
|
|
|
|
return m_bHasScaleProperties;
|
|
|
|
}
|
|
|
|
bool ObjectPropertiesDialogParameter::CanAxisLabelsBeStaggered() const
|
|
|
|
{
|
|
|
|
return m_bCanAxisLabelsBeStaggered;
|
|
|
|
}
|
2007-10-22 15:45:39 +00:00
|
|
|
bool ObjectPropertiesDialogParameter::HasNumberProperties() const
|
|
|
|
{
|
|
|
|
return m_bHasNumberProperties;
|
|
|
|
}
|
2003-11-08 21:59:51 +00:00
|
|
|
|
|
|
|
//const USHORT nNoArrowDlg = 1100;
|
|
|
|
const USHORT nNoArrowNoShadowDlg = 1101;
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------
|
|
|
|
//-------------------------------------------------------------------
|
|
|
|
//-------------------------------------------------------------------
|
2003-10-06 08:58:36 +00:00
|
|
|
|
2003-11-13 14:17:51 +00:00
|
|
|
void SchAttribTabDlg::setSymbolInformation( SfxItemSet* pSymbolShapeProperties,
|
|
|
|
Graphic* pAutoSymbolGraphic )
|
2003-10-06 08:58:36 +00:00
|
|
|
{
|
2003-11-13 14:17:51 +00:00
|
|
|
m_pSymbolShapeProperties = pSymbolShapeProperties;
|
|
|
|
m_pAutoSymbolGraphic = pAutoSymbolGraphic;
|
2003-10-06 08:58:36 +00:00
|
|
|
}
|
|
|
|
|
2007-07-25 07:33:41 +00:00
|
|
|
void SchAttribTabDlg::SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth )
|
|
|
|
{
|
|
|
|
m_fAxisMinorStepWidthForErrorBarDecimals = fMinorStepWidth;
|
|
|
|
}
|
|
|
|
|
2003-11-08 21:59:51 +00:00
|
|
|
SchAttribTabDlg::SchAttribTabDlg(Window* pParent,
|
2003-10-06 08:58:36 +00:00
|
|
|
const SfxItemSet* pAttr,
|
2003-11-08 21:59:51 +00:00
|
|
|
const ObjectPropertiesDialogParameter* pDialogParameter,
|
2007-05-22 16:37:01 +00:00
|
|
|
const ViewElementListProvider* pViewElementListProvider,
|
|
|
|
const uno::Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier
|
|
|
|
)
|
|
|
|
: SfxTabDialog(pParent, SchResId(DLG_OBJECT_PROPERTIES), pAttr)
|
2003-11-08 21:59:51 +00:00
|
|
|
, eObjectType(pDialogParameter->getObjectType())
|
2003-10-06 08:58:36 +00:00
|
|
|
, nDlgType(nNoArrowNoShadowDlg)
|
|
|
|
, nPageType(0)
|
2003-11-08 21:59:51 +00:00
|
|
|
, m_pParameter( pDialogParameter )
|
2003-10-06 08:58:36 +00:00
|
|
|
, m_pViewElementListProvider( pViewElementListProvider )
|
2007-05-22 16:37:01 +00:00
|
|
|
, m_pNumberFormatter(0)
|
2003-11-13 14:17:51 +00:00
|
|
|
, m_pSymbolShapeProperties(NULL)
|
|
|
|
, m_pAutoSymbolGraphic(NULL)
|
2007-07-25 07:33:41 +00:00
|
|
|
, m_fAxisMinorStepWidthForErrorBarDecimals(0.1)
|
2003-10-06 08:58:36 +00:00
|
|
|
{
|
|
|
|
FreeResource();
|
2007-05-22 16:37:01 +00:00
|
|
|
|
|
|
|
NumberFormatterWrapper aNumberFormatterWrapper( xNumberFormatsSupplier );
|
|
|
|
m_pNumberFormatter = aNumberFormatterWrapper.getSvNumberFormatter();
|
|
|
|
|
|
|
|
this->SetText( pDialogParameter->getLocalizedName() );
|
|
|
|
|
2003-10-06 08:58:36 +00:00
|
|
|
switch (eObjectType)
|
|
|
|
{
|
2007-05-22 16:37:01 +00:00
|
|
|
case OBJECTTYPE_TITLE:
|
|
|
|
AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_BORDER)));
|
|
|
|
AddTabPage(RID_SVXPAGE_AREA, String(SchResId(STR_PAGE_AREA)));
|
|
|
|
AddTabPage(RID_SVXPAGE_TRANSPARENCE, String(SchResId(STR_PAGE_TRANSPARENCY)));
|
|
|
|
AddTabPage(RID_SVXPAGE_CHAR_NAME, String(SchResId(STR_PAGE_CHARACTERS)));
|
|
|
|
AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, String(SchResId(STR_PAGE_FONT_EFFECTS)));
|
|
|
|
AddTabPage(TP_ALIGNMENT, String(SchResId(STR_PAGE_ALIGNMENT)), SchAlignmentTabPage::Create, NULL);
|
2003-10-06 08:58:36 +00:00
|
|
|
break;
|
|
|
|
|
2007-05-22 16:37:01 +00:00
|
|
|
case OBJECTTYPE_LEGEND:
|
|
|
|
AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_BORDER)));
|
|
|
|
AddTabPage(RID_SVXPAGE_AREA, String(SchResId(STR_PAGE_AREA)));
|
|
|
|
AddTabPage(RID_SVXPAGE_TRANSPARENCE, String(SchResId(STR_PAGE_TRANSPARENCY)));
|
|
|
|
AddTabPage(RID_SVXPAGE_CHAR_NAME, String(SchResId(STR_PAGE_CHARACTERS)));
|
|
|
|
AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, String(SchResId(STR_PAGE_FONT_EFFECTS)));
|
|
|
|
AddTabPage(TP_LEGEND_POS, String(SchResId(STR_PAGE_POSITION)), SchLegendPosTabPage::Create, NULL);
|
2003-10-06 08:58:36 +00:00
|
|
|
break;
|
|
|
|
|
2007-05-22 16:37:01 +00:00
|
|
|
case OBJECTTYPE_DATA_SERIES:
|
|
|
|
case OBJECTTYPE_DATA_POINT:
|
2003-10-06 08:58:36 +00:00
|
|
|
case OBJECTTYPE_DATA_LABEL:
|
|
|
|
case OBJECTTYPE_DATA_LABELS:
|
2007-05-22 16:37:01 +00:00
|
|
|
AddTabPage(RID_SVXPAGE_LINE, String(SchResId( m_pParameter->HasAreaProperties() ? STR_PAGE_BORDER : STR_PAGE_LINE )));
|
|
|
|
if(m_pParameter->HasAreaProperties())
|
2003-10-06 08:58:36 +00:00
|
|
|
{
|
2007-05-22 16:37:01 +00:00
|
|
|
AddTabPage(RID_SVXPAGE_AREA, String(SchResId(STR_PAGE_AREA)));
|
|
|
|
AddTabPage(RID_SVXPAGE_TRANSPARENCE, String(SchResId(STR_PAGE_TRANSPARENCY)));
|
2003-10-06 08:58:36 +00:00
|
|
|
}
|
2007-05-22 16:37:01 +00:00
|
|
|
AddTabPage(RID_SVXPAGE_CHAR_NAME, String(SchResId(STR_PAGE_CHARACTERS)));
|
|
|
|
AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, String(SchResId(STR_PAGE_FONT_EFFECTS)));
|
2007-07-25 07:33:41 +00:00
|
|
|
AddTabPage(TP_DATA_DESCR, String(SchResId(STR_OBJECT_DATALABELS)), DataLabelsTabPage::Create, NULL);
|
2007-05-22 16:37:01 +00:00
|
|
|
if( m_pParameter->HasStatisticProperties() )
|
|
|
|
AddTabPage(TP_STAT, String(SchResId(STR_PAGE_STATISTICS)), SchStatisticTabPage::Create, NULL);
|
|
|
|
if( m_pParameter->HasGeometryProperties() )
|
|
|
|
AddTabPage(TP_LAYOUT, String(SchResId(STR_PAGE_LAYOUT)),SchLayoutTabPage::Create, NULL);
|
|
|
|
if( m_pParameter->ProvidesSecondaryYAxis() || m_pParameter->ProvidesOverlapAndGapWidth() )
|
|
|
|
AddTabPage(TP_OPTIONS, String(SchResId(STR_PAGE_OPTIONS)),SchOptionTabPage::Create, NULL);
|
2003-10-06 08:58:36 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case OBJECTTYPE_AXIS:
|
|
|
|
{
|
2007-05-22 16:37:01 +00:00
|
|
|
AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_LINE)));
|
|
|
|
AddTabPage(RID_SVXPAGE_CHAR_NAME, String(SchResId(STR_PAGE_CHARACTERS)));
|
|
|
|
AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, String(SchResId(STR_PAGE_FONT_EFFECTS)));
|
|
|
|
AddTabPage(TP_AXIS_LABEL, String(SchResId(STR_OBJECT_LABEL)), SchAxisLabelTabPage::Create, NULL);
|
|
|
|
if( m_pParameter->HasScaleProperties() )
|
2007-10-22 15:45:39 +00:00
|
|
|
AddTabPage(TP_SCALE_Y, String(SchResId(STR_PAGE_SCALE)), ScaleTabPage::Create, NULL);
|
|
|
|
if( m_pParameter->HasNumberProperties() )
|
2007-05-22 16:37:01 +00:00
|
|
|
AddTabPage(RID_SVXPAGE_NUMBERFORMAT, String(SchResId(STR_PAGE_NUMBERS)));
|
2003-10-06 08:58:36 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2007-05-22 16:37:01 +00:00
|
|
|
case OBJECTTYPE_GRID:
|
|
|
|
case OBJECTTYPE_SUBGRID:
|
2003-10-06 08:58:36 +00:00
|
|
|
case OBJECTTYPE_DATA_ERRORS:
|
|
|
|
case OBJECTTYPE_DATA_ERRORS_X:
|
|
|
|
case OBJECTTYPE_DATA_ERRORS_Y:
|
|
|
|
case OBJECTTYPE_DATA_ERRORS_Z:
|
2007-05-22 16:37:01 +00:00
|
|
|
case OBJECTTYPE_DATA_AVERAGE_LINE:
|
|
|
|
case OBJECTTYPE_DATA_STOCK_RANGE:
|
|
|
|
AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_LINE)));
|
2003-10-06 08:58:36 +00:00
|
|
|
break;
|
|
|
|
|
2007-11-23 10:46:53 +00:00
|
|
|
case OBJECTTYPE_DATA_CURVE:
|
|
|
|
AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_LINE)));
|
|
|
|
AddTabPage(TP_REGRESSION_OPTIONS, String(SchResId(STR_PAGE_REGRESSION_OPTIONS)), RegressionOptionsTabPage::Create, NULL);
|
|
|
|
break;
|
|
|
|
|
2007-05-22 16:37:01 +00:00
|
|
|
case OBJECTTYPE_DATA_STOCK_LOSS:
|
|
|
|
case OBJECTTYPE_DATA_STOCK_GAIN:
|
|
|
|
case OBJECTTYPE_PAGE:
|
|
|
|
case OBJECTTYPE_DIAGRAM_FLOOR:
|
|
|
|
case OBJECTTYPE_DIAGRAM_WALL:
|
|
|
|
case OBJECTTYPE_DIAGRAM:
|
|
|
|
AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_BORDER)));
|
|
|
|
AddTabPage(RID_SVXPAGE_AREA, String(SchResId(STR_PAGE_AREA)));
|
|
|
|
AddTabPage(RID_SVXPAGE_TRANSPARENCE, String(SchResId(STR_PAGE_TRANSPARENCY)));
|
2003-10-06 08:58:36 +00:00
|
|
|
break;
|
2003-12-10 15:51:53 +00:00
|
|
|
|
|
|
|
case OBJECTTYPE_LEGEND_ENTRY:
|
|
|
|
case OBJECTTYPE_AXIS_UNITLABEL:
|
|
|
|
case OBJECTTYPE_UNKNOWN:
|
|
|
|
// nothing
|
|
|
|
break;
|
2007-11-23 10:46:53 +00:00
|
|
|
case OBJECTTYPE_DATA_CURVE_EQUATION:
|
|
|
|
AddTabPage(RID_SVXPAGE_LINE, String(SchResId(STR_PAGE_BORDER)));
|
|
|
|
AddTabPage(RID_SVXPAGE_AREA, String(SchResId(STR_PAGE_AREA)));
|
|
|
|
AddTabPage(RID_SVXPAGE_TRANSPARENCE, String(SchResId(STR_PAGE_TRANSPARENCY)));
|
|
|
|
AddTabPage(RID_SVXPAGE_CHAR_NAME, String(SchResId(STR_PAGE_CHARACTERS)));
|
|
|
|
AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, String(SchResId(STR_PAGE_FONT_EFFECTS)));
|
|
|
|
AddTabPage(RID_SVXPAGE_NUMBERFORMAT, String(SchResId(STR_PAGE_NUMBERS)));
|
|
|
|
break;
|
2003-10-06 08:58:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SchAttribTabDlg::~SchAttribTabDlg()
|
|
|
|
{
|
2003-11-13 14:17:51 +00:00
|
|
|
delete m_pSymbolShapeProperties;
|
|
|
|
delete m_pAutoSymbolGraphic;
|
2003-10-06 08:58:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SchAttribTabDlg::PageCreated(USHORT nId, SfxTabPage &rPage)
|
|
|
|
{
|
2004-02-10 09:21:12 +00:00
|
|
|
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
|
2003-10-06 08:58:36 +00:00
|
|
|
switch (nId)
|
|
|
|
{
|
|
|
|
case TP_LAYOUT:
|
|
|
|
break;
|
|
|
|
case RID_SVXPAGE_LINE:
|
2004-02-10 09:21:12 +00:00
|
|
|
aSet.Put (SvxColorTableItem(m_pViewElementListProvider->GetColorTable(),SID_COLOR_TABLE));
|
|
|
|
aSet.Put (SvxDashListItem(m_pViewElementListProvider->GetDashList(),SID_DASH_LIST));
|
|
|
|
aSet.Put (SvxLineEndListItem(m_pViewElementListProvider->GetLineEndList(),SID_LINEEND_LIST));
|
|
|
|
aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,nPageType));
|
|
|
|
aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType));
|
|
|
|
|
2003-11-12 17:13:41 +00:00
|
|
|
if( m_pParameter->HasSymbolProperties() )
|
2003-11-08 21:59:51 +00:00
|
|
|
{
|
2004-02-10 09:21:12 +00:00
|
|
|
aSet.Put(OfaPtrItem(SID_OBJECT_LIST,m_pViewElementListProvider->GetSymbolList()));
|
2003-11-13 14:17:51 +00:00
|
|
|
if( m_pSymbolShapeProperties )
|
2004-02-10 09:21:12 +00:00
|
|
|
aSet.Put(SfxTabDialogItem(SID_ATTR_SET,*m_pSymbolShapeProperties));
|
2003-11-13 14:17:51 +00:00
|
|
|
if( m_pAutoSymbolGraphic )
|
2004-02-10 09:21:12 +00:00
|
|
|
aSet.Put(SvxGraphicItem(SID_GRAPHIC,*m_pAutoSymbolGraphic));
|
2003-10-06 08:58:36 +00:00
|
|
|
}
|
2004-02-10 09:21:12 +00:00
|
|
|
rPage.PageCreated(aSet);
|
2007-05-22 16:37:01 +00:00
|
|
|
//rPage.ActivatePage(*GetInputSetImpl()); //what for?
|
2003-10-06 08:58:36 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case RID_SVXPAGE_AREA:
|
2004-02-10 09:21:12 +00:00
|
|
|
aSet.Put(SvxColorTableItem(m_pViewElementListProvider->GetColorTable(),SID_COLOR_TABLE));
|
|
|
|
aSet.Put(SvxGradientListItem(m_pViewElementListProvider->GetGradientList(),SID_GRADIENT_LIST));
|
|
|
|
aSet.Put(SvxHatchListItem(m_pViewElementListProvider->GetHatchList(),SID_HATCH_LIST));
|
|
|
|
aSet.Put(SvxBitmapListItem(m_pViewElementListProvider->GetBitmapList(),SID_BITMAP_LIST));
|
|
|
|
aSet.Put(SfxUInt16Item(SID_PAGE_TYPE,nPageType));
|
|
|
|
aSet.Put(SfxUInt16Item(SID_DLG_TYPE,nDlgType));
|
|
|
|
rPage.PageCreated(aSet);
|
2007-05-22 16:37:01 +00:00
|
|
|
//rPage.ActivatePage(*GetInputSetImpl()); //what for?
|
2003-10-06 08:58:36 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case RID_SVXPAGE_TRANSPARENCE:
|
2004-02-10 09:21:12 +00:00
|
|
|
aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,nPageType));
|
|
|
|
aSet.Put (SfxUInt16Item(SID_DLG_TYPE,nDlgType));
|
|
|
|
rPage.PageCreated(aSet);
|
2003-10-06 08:58:36 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case RID_SVXPAGE_CHAR_NAME:
|
2004-05-10 14:36:55 +00:00
|
|
|
|
|
|
|
//CHINA001 ((SvxCharNamePage&)rPage).
|
|
|
|
//CHINA001 SetFontList(SvxFontListItem(m_pViewElementListProvider->getFontList()));
|
|
|
|
aSet.Put (SvxFontListItem(m_pViewElementListProvider->getFontList(), SID_ATTR_CHAR_FONTLIST)); //CHINA001
|
|
|
|
rPage.PageCreated(aSet); //CHINA001
|
2003-10-06 08:58:36 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case RID_SVXPAGE_CHAR_EFFECTS:
|
2004-05-10 14:36:55 +00:00
|
|
|
//CHINA001 ((SvxCharEffectsPage&) rPage).DisableControls( DISABLE_CASEMAP );
|
|
|
|
aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP)); //CHINA001
|
|
|
|
rPage.PageCreated(aSet);
|
2003-10-06 08:58:36 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case TP_AXIS_LABEL:
|
|
|
|
{
|
2003-11-08 21:59:51 +00:00
|
|
|
bool bShowStaggeringControls = m_pParameter->CanAxisLabelsBeStaggered();
|
2003-10-06 08:58:36 +00:00
|
|
|
((SchAxisLabelTabPage&)rPage).ShowStaggeringControls( bShowStaggeringControls );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case TP_ALIGNMENT:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TP_SCALE_Y:
|
|
|
|
{
|
2007-10-22 15:45:39 +00:00
|
|
|
ScaleTabPage & rAxisTabPage = static_cast< ScaleTabPage & >( rPage );
|
2003-10-06 08:58:36 +00:00
|
|
|
|
2007-09-18 13:53:52 +00:00
|
|
|
// #i81259# fix for #101318# undone. The numberformatter passed
|
|
|
|
// here must contain the actually used number format. Showing
|
|
|
|
// numbers with more digits is now solved in FormattedField
|
|
|
|
// (using the input format also for output).
|
|
|
|
rAxisTabPage.SetNumFormatter( m_pNumberFormatter );
|
2003-10-06 08:58:36 +00:00
|
|
|
}
|
|
|
|
break;
|
2007-07-25 07:33:41 +00:00
|
|
|
//DLNF case TP_DATA_DESCR:
|
|
|
|
//DLNF {
|
|
|
|
//DLNF DataLabelsTabPage & rLabelPage = static_cast< DataLabelsTabPage & >( rPage );
|
|
|
|
//DLNF rLabelPage.SetNumberFormatter( m_pNumberFormatter );
|
|
|
|
//DLNF }
|
|
|
|
//DLNF break;
|
2003-10-06 08:58:36 +00:00
|
|
|
|
2007-10-22 15:45:39 +00:00
|
|
|
case TP_DATA_DESCR:
|
|
|
|
{
|
|
|
|
DataLabelsTabPage & rLabelPage = static_cast< DataLabelsTabPage & >( rPage );
|
|
|
|
rLabelPage.SetNumberFormatter( m_pNumberFormatter );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2003-10-06 08:58:36 +00:00
|
|
|
case RID_SVXPAGE_NUMBERFORMAT:
|
2007-05-22 16:37:01 +00:00
|
|
|
aSet.Put (SvxNumberInfoItem( m_pNumberFormatter, (const USHORT)SID_ATTR_NUMBERFORMAT_INFO));
|
2004-05-10 14:36:55 +00:00
|
|
|
rPage.PageCreated(aSet);
|
2003-10-06 08:58:36 +00:00
|
|
|
break;
|
2003-12-10 15:51:53 +00:00
|
|
|
|
|
|
|
case TP_STAT:
|
2007-07-25 07:33:41 +00:00
|
|
|
static_cast< SchStatisticTabPage & >( rPage ).EnableTrendLine(
|
2003-12-10 15:51:53 +00:00
|
|
|
m_pParameter->HasRegressionProperties() );
|
2007-07-25 07:33:41 +00:00
|
|
|
static_cast< SchStatisticTabPage & >( rPage ).SetAxisMinorStepWidthForErrorBarDecimals(
|
|
|
|
m_fAxisMinorStepWidthForErrorBarDecimals );
|
2003-12-10 15:51:53 +00:00
|
|
|
break;
|
2007-11-23 10:46:53 +00:00
|
|
|
|
|
|
|
case TP_REGRESSION_OPTIONS:
|
|
|
|
break;
|
2003-10-06 08:58:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//.............................................................................
|
|
|
|
} //namespace chart
|
|
|
|
//.............................................................................
|