[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/shapes/pathshapes/rectangle
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2007-02-28 20:34:49
Message-ID: 1172694889.966989.11710.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 638100 by zachmann:

o save rectangle


 M  +17 -1     KoRectangleShape.cpp  
 M  +5 -1      KoRectangleShape.h  


--- trunk/koffice/shapes/pathshapes/rectangle/KoRectangleShape.cpp #638099:638100
@@ -1,5 +1,5 @@
 /* This file is part of the KDE project
-   Copyright (C) 2006 Thorsten Zachmann <zachmann@kde.org>
+   Copyright (C) 2006-2007 Thorsten Zachmann <zachmann@kde.org>
    Copyright (C) 2006 Jan Hambrecht <jaham@gmx.net>
 
    This library is free software; you can redistribute it and/or
@@ -23,6 +23,9 @@
 #include <QDebug>
 #include <QPainter>
 
+#include <KoShapeSavingContext.h>
+#include <KoXmlWriter.h>
+
 KoRectangleShape::KoRectangleShape()
 : m_cornerRadiusX( 0 )
 , m_cornerRadiusY( 0 )
@@ -39,6 +42,19 @@
 {
 }
 
+bool KoRectangleShape::saveOdfData( KoShapeSavingContext & context ) const
+{
+    saveOdfSizeAndPosition( context );
+    // TODO save rectange specific stuff
+
+    return true;
+}
+
+const char * KoRectangleShape::odfTagName() const
+{
+    return "draw:rect";
+}
+
 void KoRectangleShape::moveHandleAction( int handleId, const QPointF & point, \
Qt::KeyboardModifiers modifiers )  {
     Q_UNUSED( modifiers );
--- trunk/koffice/shapes/pathshapes/rectangle/KoRectangleShape.h #638099:638100
@@ -1,5 +1,5 @@
 /* This file is part of the KDE project
-   Copyright (C) 2006 Thorsten Zachmann <zachmann@kde.org>
+   Copyright (C) 2006-2007 Thorsten Zachmann <zachmann@kde.org>
    Copyright (C) 2006 Jan Hambrecht <jaham@gmx.net>
 
    This library is free software; you can redistribute it and/or
@@ -63,6 +63,10 @@
     void setCornerRadiusY( double radius );
 
 protected:
+    const char * odfTagName() const;
+
+    bool saveOdfData( KoShapeSavingContext & context ) const;
+
     void moveHandleAction( int handleId, const QPointF & point, \
Qt::KeyboardModifiers modifiers = Qt::NoModifier );  void updatePath( const QSizeF \
&size );  void createPath( const QSizeF &size );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic