[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kchart
From: Thorsten Zachmann <t.zachmann () zagge ! de>
Date: 2008-10-19 7:19:01
Message-ID: 1224400741.731291.15819.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 873245 by zachmann:
o use the new call to createShapeAndInit
The Axis does not pass the correct to createShapeAndInit but I have
no idea on how to fix that.
M +1 -1 KChartPart.cpp
M +3 -1 shape/Axis.cpp
M +12 -3 shape/ChartShape.cpp
M +3 -0 shape/ChartShape.h
--- trunk/koffice/kchart/KChartPart.cpp #873244:873245
@@ -98,7 +98,7 @@
m_chartData( 0 )
{
// A KChart part contains a single chart Flake shape.
- m_chartShape = ( ChartShape* )( KoShapeRegistry::instance()->value("ChartShape") \
)->createDefaultShapeAndInit( this ); + m_chartShape = ( ChartShape* )( \
KoShapeRegistry::instance()->value("ChartShape") )->createDefaultShapeAndInit( \
dataCenterMap() ); setComponentData( KChartFactory::global(), false );
setTemplateType( "kchart_template" );
--- trunk/koffice/kchart/shape/Axis.cpp #873244:873245
@@ -442,7 +442,9 @@
setShowMajorGrid( false );
setShowMinorGrid( false );
- d->title = KoShapeRegistry::instance()->value( TextShapeId \
)->createDefaultShapeAndInit( 0 ); + // TODO check if it is ok to pass an empty \
map. The text shape might not work correctly + QMap<QString, KoDataCenter *> \
dataCenterMap; + d->title = KoShapeRegistry::instance()->value( TextShapeId \
)->createDefaultShapeAndInit( dataCenterMap ); if ( d->title )
{
d->titleData = qobject_cast<TextLabelData*>( d->title->userData() );
--- trunk/koffice/kchart/shape/ChartShape.cpp #873244:873245
@@ -356,7 +356,9 @@
d->plotArea->setChartType( BarChartType );
d->plotArea->setChartSubType( NormalChartSubtype );
- d->title = KoShapeRegistry::instance()->value( TextShapeId \
)->createDefaultShapeAndInit( 0 ); + // We use a empty dataCenterMap here for the \
creation and then in init we init the shapes with the correct data + QMap<QString, \
KoDataCenter *> dataCenterMap; + d->title = KoShapeRegistry::instance()->value( \
TextShapeId )->createDefaultShapeAndInit( dataCenterMap ); if ( !d->title )
{
d->title = new TextLabelDummy;
@@ -379,7 +381,7 @@
d->title->setVisible( false );
d->title->setZIndex( 2 );
- d->subTitle = KoShapeRegistry::instance()->value( TextShapeId \
)->createDefaultShapeAndInit( 0 ); + d->subTitle = \
KoShapeRegistry::instance()->value( TextShapeId )->createDefaultShapeAndInit( \
dataCenterMap ); if ( !d->subTitle )
{
d->subTitle = new TextLabelDummy;
@@ -399,7 +401,7 @@
d->subTitle->setVisible( false );
d->subTitle->setZIndex( 3 );
- d->footer = KoShapeRegistry::instance()->value( TextShapeId \
)->createDefaultShapeAndInit( 0 ); + d->footer = \
KoShapeRegistry::instance()->value( TextShapeId )->createDefaultShapeAndInit( \
dataCenterMap ); if ( !d->footer )
{
d->footer = new TextLabelDummy;
@@ -1179,6 +1181,13 @@
bodyWriter.endElement(); // table:table
}
+void ChartShape::init( const QMap<QString, KoDataCenter *> & dataCenterMap )
+{
+ d->title->init( dataCenterMap );
+ d->subTitle->init( dataCenterMap );
+ d->footer->init( dataCenterMap );
+}
+
void ChartShape::update() const
{
KoShape::update();
--- trunk/koffice/kchart/shape/ChartShape.h #873244:873245
@@ -153,6 +153,9 @@
/// reimplemented
void saveOdf( KoShapeSavingContext &context ) const;
void saveOdfData( KoXmlWriter &bodyWriter, KoGenStyles &mainStyles ) const;
+
+ /// reimplemented
+ void init( const QMap<QString, KoDataCenter *> & dataCenterMap );
void updateChildrenPositions();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic