[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: DataCenterMap
From: Thorsten Zachmann <t.zachmann () zagge ! de>
Date: 2010-01-23 5:32:03
Message-ID: 201001230632.03266.t.zachmann () zagge ! de
[Download RAW message or body]
KWView.cpp
- KoCanvasResourceProvider *provider = m_canvas->resourceProvider();
+ KoResourceManager *provider = m_canvas->resourceManager();
the variable should be renamed to manager or resourceManager.
Index: plugins/pictureshape/PictureShapeFactory.cpp
===================================================================
--- plugins/pictureshape/PictureShapeFactory.cpp (revision 1076954)
+++ plugins/pictureshape/PictureShapeFactory.cpp (working copy)
@@ -39,37 +39,31 @@ PictureShapeFactory::PictureShapeFactory
setLoadingPriority(1);
}
-KoShape* PictureShapeFactory::createDefaultShape() const
+KoShape *PictureShapeFactory::createDefaultShape(KoResourceManager
*documentResources) const
{
+ Q_UNUSED(documentResources);
the parameter is used
These miss the Q_OBJECT macro
b/plugins/videoshape/VideoCollection.h
+ KoShapeLoadingContext shapeContext(odfContext, 0); // TODO find a proper
documentResourceManager somewhere.
Did you find a solution for that?
kspread/part/Doc.cpp:
// Init chart shape factory with KSpread's specific configuration panels.
QList<KoShapeConfigFactory*> panels = ChartDialog::panels(this);
- // Ask every shapefactory to populate the dataCenterMap
foreach(QString id, KoShapeRegistry::instance()->keys()) {
KoShapeFactory *shapeFactory = KoShapeRegistry::instance()-
>value(id);
- shapeFactory->populateDataCenterMap(d->dataCenterMap);
if (id == ChartShapeId) {
shapeFactory->setOptionPanels(panels);
}
}
The loop is no longer needed. How about using KoShapeRegistry::instance()-
>value(ChartShapeId) only?
There are still quite a lot of static_cast. How about using more of
Q_DECLAE_METATYPE. e.g.
+ KoStyleManager *styleManager = static_cast<KoStyleManager
*>(m_document->resourceManager()-
>resource(KoText::StyleManager).value<void*>());
+ return
static_cast<KoImageCollection*>(resource(KoDocumentResource::ImageCollection).value<void*>());
+ m_pageProvider = static_cast<KoPAPageProvider*>(var.value<void*>());
KoPADocument
+ if (resourceManager()->hasResource(KoText::InlineTextObjectManager)) {
+ QVariant var = resourceManager()-
>resource(KoText::InlineTextObjectManager);
it is faster to just get the resource and then check if it worked out as only
one lookup into the map needs to be done in that case.
libs/kotext/FindDirection_p.h:
class FindDirection
{
public:
- FindDirection(KoCanvasResourceProvider *provider);
+ FindDirection(KoResourceManager *provider);
virtual ~FindDirection();
virtual bool positionReached(const QTextCursor ¤tPos, const
QTextCursor &endPos) = 0;
@@ -40,13 +40,13 @@ public:
virtual void nextDocument(QTextDocument *document, KoFindPrivate
*findPrivate) = 0;
protected:
- KoCanvasResourceProvider *m_provider;
+ KoResourceManager *m_provider;
};
variable should be renamed form (m_)?provider to resourceManager
same for
+KoFind::KoFind(QWidget *parent, KoResourceManager *provider,
KActionCollection *ac)
+KoFindPrivate::KoFindPrivate(KoFind *find, KoResourceManager *crp, QWidget *w)
+ KoRulerController(KoRuler *horizontalRuler, KoResourceManager *crp);
void StyleDocker::updateGradient(KoResource * item)
+ KoResourceManager * provider = m_canvas->resourceManager();
After these changes I'm fine with committing if there are no other objections.
Thorsten
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic