[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice
From: Thomas Zander <zander () kde ! org>
Date: 2008-06-14 21:14:40
Message-ID: 1213478080.505117.32360.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 820585 by zander:
* Remove empty files KWImageFrame
* Rename hidden methods createShape() and createDefaultShape().
This is required since C++ doesn't allow us to have 2 methods only a difference in
arguments as virtual without creating problems.
Or, more practical; Base::foo(); and Base::foo(int); plus Derived::foo() will \
make it impossible to call myDerived->foo(1);
Solution, call one of the methods slightly different :)
M +1 -1 filters/karbon/svg/svgimport.cc
M +1 -1 kchart/KChartPart.cpp
M +1 -1 kchart/shape/Axis.cpp
M +3 -3 kchart/shape/ChartShape.cpp
M +1 -1 kexi/plugins/reportspgz/backend/wrtembed/reportentityshape.cpp
M +2 -2 kpresenter/part/KPrNotes.cpp
M +1 -1 kpresenter/plugins/eventactions/sound/KPrSoundEventAction.cpp
M +1 -1 krita/plugins/tools/selectiontools/kis_tool_select_elliptical.cc
M +1 -1 krita/plugins/tools/selectiontools/kis_tool_select_rectangular.cc
M +1 -1 kspread/Sheet.cpp
M +0 -1 kword/part/CMakeLists.txt
M +1 -2 kword/part/KWDLoader.cpp
M +2 -2 kword/part/KWOdfLoader.cpp
M +1 -1 kword/part/frames/KWFrameLayout.cpp
D kword/part/frames/KWImageFrame.cpp
D kword/part/frames/KWImageFrame.h
M +1 -1 kword/plugins/scripting/FrameSet.h
M +2 -2 libs/flake/KoCanvasController_p.cpp
M +2 -2 libs/flake/KoShapeFactory.cpp
M +2 -2 libs/flake/KoShapeFactory.h
M +1 -1 libs/flake/KoShapeRegistry.cpp
M +3 -3 libs/flake/tests/TestKoShapeFactory.cpp
M +4 -4 libs/flake/tools/KoCreateShapeStrategy.cpp
M +1 -1 plugins/dockers/Plugin.cpp
M +1 -1 plugins/tableshape/TableCell.cpp
--- trunk/koffice/filters/karbon/svg/svgimport.cc #820584:820585
@@ -1801,7 +1801,7 @@
return 0;
}
- KoShape * shape = factory->createDefaultShape( 0 );
+ KoShape * shape = factory->createDefaultShapeAndInit( 0 );
if( shape && shape->shapeId().isEmpty() )
shape->setShapeId( factory->id() );
--- trunk/koffice/kchart/KChartPart.cpp #820584:820585
@@ -98,7 +98,7 @@
m_chartData( 0 )
{
// A KChart part contains a single chart Flake shape.
- m_chartShape = ( ChartShape* )( KoShapeRegistry::instance()->value("ChartShape") \
)->createDefaultShape( this ); + m_chartShape = ( ChartShape* )( \
KoShapeRegistry::instance()->value("ChartShape") )->createDefaultShapeAndInit( this \
); setComponentData( KChartFactory::global(), false );
setTemplateType( "kchart_template" );
--- trunk/koffice/kchart/shape/Axis.cpp #820584:820585
@@ -320,7 +320,7 @@
setShowGrid( false );
- d->title = KoShapeRegistry::instance()->value( TextShapeId \
)->createDefaultShape( 0 ); + d->title = KoShapeRegistry::instance()->value( \
TextShapeId )->createDefaultShapeAndInit( 0 ); if ( d->title )
{
d->titleData = qobject_cast<TextLabelData*>( d->title->userData() );
--- trunk/koffice/kchart/shape/ChartShape.cpp #820584:820585
@@ -256,7 +256,7 @@
d->plotArea->setChartType( BarChartType );
d->plotArea->setChartSubType( NormalChartSubtype );
- d->title = KoShapeRegistry::instance()->value( TextShapeId \
)->createDefaultShape( 0 ); + d->title = KoShapeRegistry::instance()->value( \
TextShapeId )->createDefaultShapeAndInit( 0 ); if ( !d->title )
{
d->title = new TextLabelDummy;
@@ -273,7 +273,7 @@
titleData()->document()->setPlainText( i18n( "Title" ) );
d->title->setVisible( false );
- d->subTitle = KoShapeRegistry::instance()->value( TextShapeId \
)->createDefaultShape( 0 ); + d->subTitle = KoShapeRegistry::instance()->value( \
TextShapeId )->createDefaultShapeAndInit( 0 ); if ( !d->subTitle )
{
d->subTitle = new TextLabelDummy;
@@ -287,7 +287,7 @@
subTitleData()->document()->setPlainText( i18n( "Subtitle" ) );
d->subTitle->setVisible( false );
- d->footer = KoShapeRegistry::instance()->value( TextShapeId \
)->createDefaultShape( 0 ); + d->footer = KoShapeRegistry::instance()->value( \
TextShapeId )->createDefaultShapeAndInit( 0 ); if ( !d->footer )
{
d->footer = new TextLabelDummy;
--- trunk/koffice/kexi/plugins/reportspgz/backend/wrtembed/reportentityshape.cpp \
#820584:820585 @@ -88,7 +88,7 @@
QList<KoShape*> shapes;
painter->setRenderHint(QPainter::Antialiasing);
- mShape = ( KoShape* )( \
KoShapeRegistry::instance()->value(_shapeType->value().toString()) \
)->createDefaultShape( 0 ); + mShape = ( KoShape* )( \
KoShapeRegistry::instance()->value(_shapeType->value().toString()) \
)->createDefaultShapeAndInit( 0 ); mShape->setSize(_size.toScene());
shapes << mShape;
--- trunk/koffice/kpresenter/part/KPrNotes.cpp #820584:820585
@@ -64,7 +64,7 @@
// All sizes and positions are hardcoded for now
KoShapeFactory *factory = KoShapeRegistry::instance()->value("TextShapeID");
Q_ASSERT(factory);
- m_textShape = factory->createDefaultShape(0);
+ m_textShape = factory->createDefaultShapeAndInit(0);
m_textShape->setLocked(true);
m_textShape->setAdditionalAttribute( "presentation:class", "notes" );
m_pageLayout = KoPageLayout::standardLayout();
@@ -73,7 +73,7 @@
factory = KoShapeRegistry::instance()->value("PictureShape");
Q_ASSERT(factory);
- m_thumbnailShape = factory->createDefaultShape(0);
+ m_thumbnailShape = factory->createDefaultShapeAndInit(0);
m_thumbnailShape->setLocked(true);
m_thumbnailShape->setAdditionalAttribute( "presentation:class", "page" );
m_thumbnailShape->setPosition(QPointF(108.00, 60.18));
--- trunk/koffice/kpresenter/plugins/eventactions/sound/KPrSoundEventAction.cpp \
#820584:820585 @@ -114,4 +114,4 @@
m_media = 0;
}
-#include "KPrSoundEventAction.moc"
+#include <KPrSoundEventAction.moc>
--- trunk/koffice/krita/plugins/tools/selectiontools/kis_tool_select_elliptical.cc \
#820584:820585 @@ -192,7 +192,7 @@
KoShape* shape;
KoShapeFactory *rectFactory = \
KoShapeRegistry::instance()->value("KoEllipseShape"); if(rectFactory) {
- shape = rectFactory->createDefaultShape( 0 );
+ shape = rectFactory->createDefaultShapeAndInit( 0 );
shape->setSize(documentRect.size());
shape->setPosition(documentRect.topLeft());
}
--- trunk/koffice/krita/plugins/tools/selectiontools/kis_tool_select_rectangular.cc \
#820584:820585 @@ -206,7 +206,7 @@
KoShape* shape;
KoShapeFactory *rectFactory = \
KoShapeRegistry::instance()->value("KoRectangleShape"); if(rectFactory) {
- shape = rectFactory->createDefaultShape( 0 );
+ shape = rectFactory->createDefaultShapeAndInit( 0 );
shape->setSize(documentRect.size());
shape->setPosition(documentRect.topLeft());
}
--- trunk/koffice/kspread/Sheet.cpp #820584:820585
@@ -269,7 +269,7 @@
const QList<KoShape*> shapes = other.d->shapes;
for (int i = 0; i < shapes.count(); ++i)
{
- shape = KoShapeRegistry::instance()->value(shapes[i]->shapeId())->createDefaultShape( \
0 ); + shape = \
KoShapeRegistry::instance()->value(shapes[i]->shapeId())->createDefaultShapeAndInit( \
0 ); shape->copySettings(shapes[i]);
addShape(shape);
}
--- trunk/koffice/kword/part/CMakeLists.txt #820584:820585
@@ -35,7 +35,6 @@
frames/KWTextFrameSet.cpp
frames/KWCopyShape.cpp
frames/KWAnchorStrategy.cpp
- frames/KWImageFrame.cpp
frames/KWOutlineShape.cpp
dialogs/KWFrameConnectSelector.cpp
--- trunk/koffice/kword/part/KWDLoader.cpp #820584:820585
@@ -22,7 +22,6 @@
#include "KWPageSettings.h"
#include "frames/KWTextFrameSet.h"
#include "frames/KWTextFrame.h"
-#include "frames/KWImageFrame.h"
// koffice
#include <KoShapeRegistry.h>
@@ -552,7 +551,7 @@
{
KoShapeFactory *factory = \
KoShapeRegistry::instance()->value(TextShape_SHAPEID); Q_ASSERT(factory);
- KoShape *shape = factory->createDefaultShape( m_document );
+ KoShape *shape = factory->createDefaultShapeAndInit( m_document );
KWTextFrame *frame = new KWTextFrame(shape, fs);
fill(frame, frameElem);
--- trunk/koffice/kword/part/KWOdfLoader.cpp #820584:820585
@@ -214,7 +214,7 @@
KoShapeFactory *factory = KoShapeRegistry::instance()->value(TextShape_SHAPEID);
Q_ASSERT(factory);
// Create a TextShape
- KoShape *shape = factory->createDefaultShape( d->document );
+ KoShape *shape = factory->createDefaultShapeAndInit( d->document );
Q_ASSERT(shape);
// The TextShape will be displayed within a KWTextFrame
KWTextFrame *frame = new KWTextFrame(shape, fs);
@@ -401,7 +401,7 @@
// Add the frameset and the shape for the header/footer to the document.
KoShapeFactory *sf = KoShapeRegistry::instance()->value(TextShape_SHAPEID);
Q_ASSERT(sf);
- KoShape *s = sf->createDefaultShape( document );
+ KoShape *s = sf->createDefaultShapeAndInit( document );
Q_ASSERT(s);
KWTextFrame *f = new KWTextFrame(s, fs);
document->addFrameSet(fs);
--- trunk/koffice/kword/part/frames/KWFrameLayout.cpp #820584:820585
@@ -576,7 +576,7 @@
KoShape *KWFrameLayout::createTextShape(KWPage *page) {
KoShapeFactory *factory = KoShapeRegistry::instance()->value(TextShape_SHAPEID);
Q_ASSERT(factory);
- KoShape *shape = factory->createDefaultShape( const_cast<KWDocument *>( \
m_document ) ); + KoShape *shape = factory->createDefaultShapeAndInit( \
const_cast<KWDocument *>( m_document ) ); shape->setPosition(QPointF(0, \
page->offsetInDocument())); return shape;
}
--- trunk/koffice/kword/plugins/scripting/FrameSet.h #820584:820585
@@ -96,7 +96,7 @@
kWarning(32010) << "Scripting::Module::addFrame() Invalid \
shapeId: " << shapeId << endl; return 0;
}
- KoShape *shape = factory->createDefaultShape( 0 );
+ KoShape *shape = factory->createDefaultShapeAndInit( 0 );
Q_ASSERT(shape);
shape->setZIndex( 100 + m_frameset->frameCount() );
KWFrame* frame = 0;
--- trunk/koffice/libs/flake/KoCanvasController_p.cpp #820584:820585
@@ -138,10 +138,10 @@
if(isTemplate) {
KoProperties props;
props.load(properties);
- m_draggedShape = factory->createShape( &props, \
m_parent->canvas()->shapeController()->shapeControllerBase() ); + \
m_draggedShape = factory->createShapeAndInit( &props, \
m_parent->canvas()->shapeController()->shapeControllerBase() ); }
else
- m_draggedShape = factory->createDefaultShape( \
m_parent->canvas()->shapeController()->shapeControllerBase() ); + \
m_draggedShape = factory->createDefaultShapeAndInit( \
m_parent->canvas()->shapeController()->shapeControllerBase() );
Q_ASSERT(m_draggedShape);
if (!m_draggedShape) return;
--- trunk/koffice/libs/flake/KoShapeFactory.cpp #820584:820585
@@ -64,7 +64,7 @@
delete d;
}
-KoShape * KoShapeFactory::createDefaultShape( KoShapeControllerBase * \
shapeController ) +KoShape * KoShapeFactory::createDefaultShapeAndInit( \
KoShapeControllerBase * shapeController ) const {
KoShape * shape = createDefaultShape();
if ( shape && shapeController ) {
@@ -73,7 +73,7 @@
return shape;
}
-KoShape * KoShapeFactory::createShape( const KoProperties * params, \
KoShapeControllerBase *shapeController ) +KoShape * \
KoShapeFactory::createShapeAndInit( const KoProperties * params, \
KoShapeControllerBase *shapeController ) const {
KoShape * shape = createShape( params );
if ( shape && shapeController ) {
--- trunk/koffice/libs/flake/KoShapeFactory.h #820584:820585
@@ -120,7 +120,7 @@
* @see KoShapeFactory::createDefaultShape
* @see KoShapeControllerBase::shapeCreated
*/
- virtual KoShape * createDefaultShape( KoShapeControllerBase * shapeController );
+ KoShape * createDefaultShapeAndInit( KoShapeControllerBase * shapeController ) \
const;
/**
* This method should be called to create a shape based on a set of properties \
that are @@ -142,7 +142,7 @@
* @see KoShapeTemplate::properties
* @see KoShapeControllerBase::shapeCreated
*/
- virtual KoShape * createShape(const KoProperties * params, KoShapeControllerBase \
*shapeController ); + KoShape * createShapeAndInit(const KoProperties * params, \
KoShapeControllerBase *shapeController ) const;
/**
* Create a list of option panels to show on creating a new shape.
--- trunk/koffice/libs/flake/KoShapeRegistry.cpp #820584:820585
@@ -175,7 +175,7 @@
KoShapeFactory * factory = factories[i];
if ( factory->supports( element ) ) {
- KoShape * shape = factory->createDefaultShape( context.shapeController() \
); + KoShape * shape = factory->createDefaultShapeAndInit( \
context.shapeController() );
if( shape->shapeId().isEmpty() )
shape->setShapeId(factory->id());
--- trunk/koffice/libs/flake/tests/TestKoShapeFactory.cpp #820584:820585
@@ -49,7 +49,7 @@
void TestKoShapeFactory::testCreateDefaultShape()
{
KoShapeFactory * factory = new KoPathShapeFactory(0, QStringList());
- KoShape * shape = factory->createDefaultShape( 0 );
+ KoShape * shape = factory->createDefaultShapeAndInit( 0 );
QVERIFY( shape != 0 );
delete shape;
delete factory;
@@ -58,7 +58,7 @@
void TestKoShapeFactory::testCreateShape()
{
KoShapeFactory * factory = new KoPathShapeFactory(0, QStringList());
- KoShape * shape = factory->createShape( 0, 0 );
+ KoShape * shape = factory->createShapeAndInit( 0, 0 );
QVERIFY( shape != 0 );
delete shape;
delete factory;
@@ -109,7 +109,7 @@
QVERIFY( pathElement.tagName() == "path" );
QCOMPARE( factory->supports( pathElement ), true );
- KoShape * shape = factory->createDefaultShape( 0 );
+ KoShape * shape = factory->createDefaultShapeAndInit( 0 );
QVERIFY( shape );
// XXX: When loading is implemented, these no doubt have to be
--- trunk/koffice/libs/flake/tools/KoCreateShapeStrategy.cpp #820584:820585
@@ -40,11 +40,11 @@
KoShape *shape;
if ( props ) {
// the shapeController is 0 as the shape will not be inserted in the \
document
- shape = factory->createShape( props, 0 );
+ shape = factory->createShapeAndInit( props, 0 );
}
else {
// the shapeController is 0 as the shape will not be inserted in the \
document
- shape = factory->createDefaultShape( 0 );
+ shape = factory->createDefaultShapeAndInit( 0 );
}
m_outline = shape->outline();
@@ -65,9 +65,9 @@
const KoProperties *props = parent->shapeProperties();
KoShape *shape;
if(props)
- shape = factory->createShape( props, \
parent->m_canvas->shapeController()->shapeControllerBase() ); + shape = \
factory->createShapeAndInit( props, \
parent->m_canvas->shapeController()->shapeControllerBase() ); else
- shape = factory->createDefaultShape( \
parent->m_canvas->shapeController()->shapeControllerBase() ); + shape = \
factory->createDefaultShapeAndInit( \
parent->m_canvas->shapeController()->shapeControllerBase() ); if( \
shape->shapeId().isEmpty() ) shape->setShapeId(factory->id());
QRectF rect = selectRect();
--- trunk/koffice/plugins/dockers/Plugin.cpp #820584:820585
@@ -37,7 +37,7 @@
KoDockRegistry::instance()->add( new ShapePropertiesDockerFactory() );
KoDockRegistry::instance()->add( new KoShapeCollectionDockerFactory() );
KoDockRegistry::instance()->add( new ShadowDockerFactory() );
- //KoDockRegistry::instance()->add( new ShapeSelectorFactory() );
+ KoDockRegistry::instance()->add( new ShapeSelectorFactory() );
}
#include "Plugin.moc"
--- trunk/koffice/plugins/tableshape/TableCell.cpp #820584:820585
@@ -65,7 +65,7 @@
KoShapeFactory * factory = KoShapeRegistry::instance()->get(shapeId);
if (!factory) return 0;
- KoShape * shape = factory->createDefaultShape( 0 );
+ KoShape * shape = factory->createDefaultShapeAndInit( 0 );
d->shape = shape;
return d->shape;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic