Commit 5dfb3c59 authored by Thomas Zander's avatar Thomas Zander

SVN_SILENT remove whitespace at end of line

svn path=/trunk/koffice/; revision=1006395
parent cef0d4cf
......@@ -29,7 +29,7 @@ public:
class Relation
{
public:
explicit Relation(KoShape *child)
explicit Relation(KoShape *child)
: m_inside(false)
, m_child(child)
{}
......
......@@ -42,7 +42,7 @@ public:
/// Sets the background color
void setColor( const QColor &color );
/// Returns the background style
Qt::BrushStyle style() const;
......
......@@ -84,7 +84,7 @@ void KoConnectionShape::saveOdf(KoShapeSavingContext & context) const
{
context.xmlWriter().startElement("draw:connector");
saveOdfAttributes( context, OdfMandatories | OdfAdditionalAttributes );
switch( d->connectionType )
{
case Lines:
......@@ -100,7 +100,7 @@ void KoConnectionShape::saveOdf(KoShapeSavingContext & context) const
context.xmlWriter().addAttribute( "draw:type", "standard" );
break;
}
if (d->shape1) {
context.xmlWriter().addAttribute( "draw:start-shape", context.drawId(d->shape1) );
context.xmlWriter().addAttribute( "draw:start-glue-point", d->connectionPointIndex1 );
......@@ -121,7 +121,7 @@ void KoConnectionShape::saveOdf(KoShapeSavingContext & context) const
}
saveOdfCommonChildElements(context);
context.xmlWriter().endElement();
}
......@@ -291,19 +291,19 @@ bool KoConnectionShape::setConnection1(KoShape * shape1, int connectionPointInde
// refuse to connect to a shape that depends on us (e.g. a artistic text shape)
if (hasDependee(shape1))
return false;
// check if the connection point does exist
if (shape1 && connectionPointIndex1 >= shape1->connectionPoints().count())
return false;
if (d->shape1)
d->shape1->removeDependee(this);
d->shape1 = shape1;
if (d->shape1)
d->shape1->addDependee(this);
d->connectionPointIndex1 = connectionPointIndex1;
return true;
}
......@@ -312,19 +312,19 @@ bool KoConnectionShape::setConnection2(KoShape * shape2, int connectionPointInde
// refuse to connect to a shape that depends on us (e.g. a artistic text shape)
if (hasDependee(shape2))
return false;
// check if the connection point does exist
if (shape2 && connectionPointIndex2 >= shape2->connectionPoints().count())
return false;
if (d->shape2)
d->shape2->removeDependee(this);
d->shape2 = shape2;
if (d->shape2)
d->shape2->addDependee(this);
d->connectionPointIndex2 = connectionPointIndex2;
return true;
}
......
/* This file is part of the KDE project
* Copyright (c) 2009 Cyrille Berger <cberger@cberger.net>
* Copyright (c) 2009 Jan Hambrecht <jaham@gmx.net>
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* 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
* Library General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
......@@ -32,7 +32,7 @@ struct KoFilterEffect::Private {
// add the default input
inputs.append(QString());
}
QString id;
QString name;
QRectF filterRect;
......@@ -42,7 +42,7 @@ struct KoFilterEffect::Private {
int maximalInputCount;
};
KoFilterEffect::KoFilterEffect( const QString& id, const QString& name )
KoFilterEffect::KoFilterEffect( const QString& id, const QString& name )
: d(new Private)
{
d->id = id;
......@@ -135,10 +135,10 @@ int KoFilterEffect::maximalInputCount() const
QImage KoFilterEffect::processImages(const QList<QImage> &images, const QRect &filterRegion, const KoViewConverter &/*converter*/) const
{
Q_ASSERT(images.count());
Q_UNUSED(images);
Q_UNUSED(filterRegion);
return images.first();
}
......
/* This file is part of the KDE project
* Copyright (c) 2009 Cyrille Berger <cberger@cberger.net>
* Copyright (c) 2009 Jan Hambrecht <jaham@gmx.net>
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* 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
* Library General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
......@@ -42,22 +42,22 @@ class FLAKE_EXPORT KoFilterEffect
public:
KoFilterEffect( const QString& id, const QString& name );
virtual ~KoFilterEffect();
/// Returns the user visible name of the filter
QString name() const;
/// Returns the unique id of the filter
QString id() const;
/// Sets the region the filter is applied to in bounding box units
void setFilterRect(const QRectF &filterRect);
/// Returns the region this filter is applied to in bounding box units
QRectF filterRect() const;
/// Returns the region this filter is applied to for the given bounding rect
QRectF filterRectForBoundingRect(const QRectF &boundingRect) const;
/**
* Sets the name of the output image
*
......@@ -67,35 +67,35 @@ public:
* @param output the output image name
*/
void setOutput(const QString &output);
/// Returns the name of the output image
QString output() const;
/**
* Returns list of named input images of this filter effect.
*
* These names identify the input images for this filter effect.
* These can be one of the keywords SourceGraphic, SourceAlpha,
* BackgroundImage, BackgroundAlpha, FillPaint or StrokePaint,
* BackgroundImage, BackgroundAlpha, FillPaint or StrokePaint,
* as well as a named output of another filter effect in the stack.
* An empty input list of the first effect in the stack default to
* SourceGraphic, whereas on subsequent effects it defaults to the
* result of the previous filter effect.
*/
QList<QString> inputs() const;
/// Adds a new input at the end of the input list
void addInput(const QString &input);
/// Inserts an input at the giben position in the input list
void insertInput(int index, const QString &input);
/// Sets an existing input to a new value
void setInput(int index, const QString &input);
/// Removes an input from the given position in the input list
void removeInput(int index);
/**
* Return the required number of input images.
* The default required number of input images is 1.
......@@ -103,7 +103,7 @@ public:
* a different number.
*/
int requiredInputCount() const;
/**
* Returns the maximal number of input images.
* The default maximal number of input images is 1.
......@@ -116,7 +116,7 @@ public:
* Apply the effect on an image.
* @param image the image the filter should be applied to
* @param filterRegion the region of the image corresponding to the filter region
* @param converter to convert between document and view coordinates
* @param converter to convert between document and view coordinates
*/
virtual QImage processImage(const QImage &image, const QRect &filterRegion, const KoViewConverter &converter) const = 0;
......@@ -124,27 +124,27 @@ public:
* Apply the effect on a list of images.
* @param images the images the filter should be applied to
* @param filterRegion the region of the image corresponding to the filter region
* @param converter to convert between document and view coordinates
* @param converter to convert between document and view coordinates
*/
virtual QImage processImages(const QList<QImage> &images, const QRect &filterRegion, const KoViewConverter &converter) const;
/**
* Loads data from given xml element.
* @param element the xml element to load data from
* @return true if loading was successful, else false
*/
virtual bool load(const QDomElement &element) = 0;
/**
* Writes custom data to given xml element.
* @param writer the xml writer to write data to
*/
virtual void save(KoXmlWriter &writer) = 0;
protected:
/// Sets the required number of input images
void setRequiredInputCount(int count);
/// Sets the maximal number of input images
void setMaximalInputCount(int count);
......@@ -156,7 +156,7 @@ protected:
* All other filters have to write inputs on their own.
*/
void saveCommonAttributes(KoXmlWriter &writer);
private:
struct Private;
Private* const d;
......
/* This file is part of the KDE project
* Copyright (c) 2009 Jan Hambrecht <jaham@gmx.net>
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* 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
* Library General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
......
/* This file is part of the KDE project
* Copyright (c) 2009 Jan Hambrecht <jaham@gmx.net>
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* 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
* Library General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
......@@ -32,10 +32,10 @@ class FLAKE_EXPORT KoFilterEffectConfigWidgetBase : public QWidget
public:
KoFilterEffectConfigWidgetBase(QWidget *parent = 0);
virtual ~KoFilterEffectConfigWidgetBase() {};
/// Sets the filter effect to be edited by the config widget
virtual bool editFilterEffect(KoFilterEffect * filterEffect) = 0;
signals:
/// Is emitted when the filter effect has changed
void filterChanged();
......
/* This file is part of the KDE project
* Copyright (c) 2009 Jan Hambrecht <jaham@gmx.net>
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* 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
* Library General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
......@@ -22,7 +22,7 @@
class KoFilterEffectFactory::Private
{
public:
Private(const QString &_id, const QString &_name) : id(_id), name(_name)
Private(const QString &_id, const QString &_name) : id(_id), name(_name)
{
}
const QString id;
......
/* This file is part of the KDE project
* Copyright (c) 2009 Jan Hambrecht <jaham@gmx.net>
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* 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
* Library General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
......@@ -30,7 +30,7 @@ class FLAKE_EXPORT KoFilterEffectFactory : public QObject
{
Q_OBJECT
public:
/**
* Create the new factory
* @param parent the parent QObject for memory management usage.
......@@ -45,25 +45,25 @@ public:
* @return the id for the filter this factory creates
*/
QString id() const;
/**
* Returns the user visible (and translated) name to be seen by the user.
* @return the user visible (and translated) name to be seen by the user
*/
QString name() const;
/**
* This method should be implemented by factories to create a filter effect.
* @return a new filter effect
*/
virtual KoFilterEffect * createFilterEffect() const = 0;
/**
* This method should be implemented by factories to create a filter effect config widget.
* @return the filter effect options widget
*/
virtual KoFilterEffectConfigWidgetBase * createConfigWidget() const = 0;
private:
class Private;
Private * const d;
......
/* This file is part of the KDE project
* Copyright (c) 2009 Jan Hambrecht <jaham@gmx.net>
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* 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
* Library General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
......@@ -55,11 +55,11 @@ KoFilterEffect * KoFilterEffectRegistry::createFilterEffectFromXml(const QDomEle
KoFilterEffectFactory * factory = get(element.tagName());
if (!factory)
return 0;
KoFilterEffect * filterEffect = factory->createFilterEffect();
if (filterEffect->load(element))
return filterEffect;
delete filterEffect;
return 0;
}
......
/* This file is part of the KDE project
* Copyright (c) 2009 Jan Hambrecht <jaham@gmx.net>
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* 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
* Library General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
......@@ -33,16 +33,16 @@ Q_OBJECT
public:
virtual ~KoFilterEffectRegistry();
/**
* Return the only instance of KoFilterEffectRegistry.
* Creates an instance on the first call.
*/
static KoFilterEffectRegistry * instance();
/// Creates filter effect from given xml element
KoFilterEffect * createFilterEffectFromXml(const QDomElement & element);
private:
KoFilterEffectRegistry();
KoFilterEffectRegistry(const KoFilterEffectRegistry&);
......
/* This file is part of the KDE project
* Copyright (c) 2009 Jan Hambrecht <jaham@gmx.net>
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* 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
* Library General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
......@@ -30,12 +30,12 @@ public:
: clipRect(-0.1, -0.1, 1.2, 1.2)
{
}
~Private()
{
qDeleteAll(filterEffects);
}
QList<KoFilterEffect*> filterEffects;
QRectF clipRect;
QAtomicInt refCount;
......@@ -117,10 +117,10 @@ void KoFilterEffectStack::save(KoXmlWriter &writer, const QString &filterId)
writer.addAttribute("y", d->clipRect.y() );
writer.addAttribute("width", d->clipRect.width() );
writer.addAttribute("height", d->clipRect.height() );
foreach(KoFilterEffect *effect, d->filterEffects) {
effect->save(writer);
}
writer.endElement();
}
/* This file is part of the KDE project
* Copyright (c) 2009 Jan Hambrecht <jaham@gmx.net>
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* 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
* Library General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
......@@ -33,27 +33,27 @@ class FLAKE_EXPORT KoFilterEffectStack
public:
KoFilterEffectStack();
~KoFilterEffectStack();
/**
* The first filter of the list is the first to be applied.
*
* @return the list of filter effects applied on the shape when rendering.
*/
QList<KoFilterEffect*> filterEffects() const;
/**
* Inserts a new filter at the given position in the filter list.
* @param index the list index to insert the new filter at
* @param filter the new filter to insert
*/
void insertFilterEffect(int index, KoFilterEffect *filter);
/**
* Appends a new filter at the end of the filter list.
* @param filter the new filter to append
*/
void appendFilterEffect(KoFilterEffect *filter);
/**
* Removes the filter with the given index from the filter list.
* @param index the index of the filter to remove
......@@ -62,27 +62,27 @@ public:
/// Sets the clipping rectangle used for this filter in bounding box units
void setClipRect(const QRectF &clipRect);
/// Returns the clipping rectangle used for this filter in bounding box units
QRectF clipRect() const;
/// Returns the clipping rectangle for the given bounding rect
QRectF clipRectForBoundingRect(const QRectF &boundingRect) const;
/// Increase reference counter
void addUser();
/// Decrease reference counter
bool removeUser();
/// Return reference counter
int useCount() const;
/**
* Saves filter stack using given xml writer.
* @param writer the xml writer to write data to
* @param id the filter id to write, used for referencing the filter
*/
void save(KoXmlWriter &writer, const QString &filterId);
private:
class Private;
Private * const d;
......
......@@ -66,7 +66,7 @@ public:
/// Maximal possible shape z-index
static int maxZIndex() { return 0x2000-1; }
private:
KoFlake();
};
......
......@@ -99,12 +99,12 @@ void KoLineBorder::borderInsets(const KoShape *shape, KoInsets &insets)
if (lineWidth < 0)
lineWidth = 1;
lineWidth *= 0.5; // since we draw a line half inside, and half outside the object.
// if we have square cap, we need a little more space
// -> sqrt( (0.5*penWidth)^2 + (0.5*penWidth)^2 )
if( capStyle() == Qt::SquareCap )
lineWidth *= M_SQRT2;
insets.top = lineWidth;
insets.bottom = lineWidth;
insets.left = lineWidth;
......
......@@ -25,13 +25,13 @@
class KoShape;
/**
* Reimplement this class when you depend on a shape during loading that is
* Reimplement this class when you depend on a shape during loading that is
* not yet loaded.
*
* As soon as the shape you depend on is loaded the method update is called.
* Then you can setup the data you need.
* Then you can setup the data you need.
*
* @see KoConnectionShape
* @see KoConnectionShape
* @see KoShapeLoadingContext::updateShape
*/
class FLAKE_EXPORT KoLoadingShapeUpdater
......
......@@ -28,7 +28,7 @@ class QPen;
class QString;