Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit e36bbf2b authored by Boudewijn Rempt's avatar Boudewijn Rempt

java--

svn path=/trunk/koffice/; revision=853289
parent b8da8bbe
......@@ -152,7 +152,7 @@ int KisLmsAF32ColorSpaceFactory::referenceDepth() const
KoColorConversionTransformationFactory* KisLmsAF32ColorSpaceFactory::createICCColorConversionTransformationFactory(const QString& profileName) const
{
Q_UNUSED( profileName );
Q_UNUSED(profileName);
return 0;
}
......
......@@ -44,8 +44,6 @@ namespace
class KisPaintDeviceCommand : public QUndoCommand
{
typedef QUndoCommand super;
public:
KisPaintDeviceCommand(const QString& name, KisPaintDeviceSP paintDevice);
virtual ~KisPaintDeviceCommand() {}
......@@ -57,7 +55,7 @@ protected:
};
KisPaintDeviceCommand::KisPaintDeviceCommand(const QString& name, KisPaintDeviceSP paintDevice) :
super(name), m_paintDevice(paintDevice)
QUndoCommand(name), m_paintDevice(paintDevice)
{
}
......@@ -70,13 +68,12 @@ void KisPaintDeviceCommand::setUndo(bool undo)
class KisConvertLayerTypeCmd : public KisPaintDeviceCommand
{
typedef KisPaintDeviceCommand super;
public:
KisConvertLayerTypeCmd(KisPaintDeviceSP paintDevice,
KisDataManagerSP beforeData, const KoColorSpace * beforeColorSpace,
KisDataManagerSP afterData, const KoColorSpace * afterColorSpace
) : super(i18n("Convert Layer Type"), paintDevice) {
KisDataManagerSP afterData, const KoColorSpace * afterColorSpace)
: KisPaintDeviceCommand(i18n("Convert Layer Type"), paintDevice) {
m_beforeData = beforeData;
m_beforeColorSpace = beforeColorSpace;
m_afterData = afterData;
......
......@@ -34,31 +34,31 @@ template <class T>
class KisSharedPtrVector : public QVector< KisSharedPtr<T> >
{
typedef QVector< KisSharedPtr<T> > super;
typedef QVector< KisSharedPtr<T> > SharedPtrVector;
public:
KisSharedPtrVector() {}
void pop_back() {
if (!super::empty()) {
super::back() = 0;
super::pop_back();
if (!SharedPtrVector::empty()) {
SharedPtrVector::back() = 0;
SharedPtrVector::pop_back();
}
}
typename super::iterator erase(typename super::iterator it) {
typename SharedPtrVector::iterator erase(typename SharedPtrVector::iterator it) {
*it = 0;
return super::erase(it);
return SharedPtrVector::erase(it);
}
typename super::iterator erase(typename super::iterator first, typename super::iterator last) {
typename SharedPtrVector::iterator erase(typename SharedPtrVector::iterator first, typename SharedPtrVector::iterator last) {
qFill(first, last, 0);
return super::erase(first, last);
return SharedPtrVector::erase(first, last);
}
bool contains(KisSharedPtr<T> ptr) const {
for (int i = 0, n = super::count(); i < n; ++i)
if (super::at(i) == ptr)
for (int i = 0, n = SharedPtrVector::count(); i < n; ++i)
if (SharedPtrVector::at(i) == ptr)
return true;
return false;
}
......
......@@ -36,11 +36,15 @@ public:
}
virtual void setConfiguration(KisFilterConfiguration*);
virtual KisFilterConfiguration* configuration() const;
private slots:
void linkSpacingToggled(bool);
void spinBoxHalfWidthChanged(int);
void spinBoxHalfHeightChanged(int);
private:
bool m_halfSizeLink;
Ui_WdgBlur* m_widget;
};
......
......@@ -4545,15 +4545,15 @@ public:
if (dimx != width || dimy != height) {
switch (cimg::X11attr().nb_bits) {
case 8: {
unsigned char foo; _resize(foo,dimx,dimy,redraw);
unsigned char foo; _resize(foo, dimx, dimy, redraw);
}
break;
case 16: {
unsigned short foo; _resize(foo,dimx,dimy,redraw);
unsigned short foo; _resize(foo, dimx, dimy, redraw);
}
break;
default: {
unsigned int foo; _resize(foo,dimx,dimy,redraw);
unsigned int foo; _resize(foo, dimx, dimy, redraw);
}
break;
}
......@@ -8535,11 +8535,11 @@ template<typename T> struct CImg {
v0 >= dim || v1 >= dim || x1 < x0 || y1 < y0 || z1 < z0 || v1 < v0)
switch (border_condition) {
case false: {
cimg_mapXYZV(dest,x,y,z,v) dest(x,y,z,v) = pix4d(x0+x,y0+y,z0+z,v0+v,0);
cimg_mapXYZV(dest, x, y, z, v) dest(x, y, z, v) = pix4d(x0 + x, y0 + y, z0 + z, v0 + v, 0);
}
break;
default: {
cimg_mapXYZV(dest,x,y,z,v) dest(x,y,z,v) = pix4d(x0+x,y0+y,z0+z,v0+v);
cimg_mapXYZV(dest, x, y, z, v) dest(x, y, z, v) = pix4d(x0 + x, y0 + y, z0 + z, v0 + v);
}
break;
}
......@@ -13462,15 +13462,15 @@ template<typename T> struct CImg {
Y = new double[cimg::max(width,height,depth)];
switch (cimg::uncase(axe)) {
case 'x': if (width>1) {
offset = 1; nb = width; cimg_mapYZV(*this,y,z,k) cimg_deriche_map(0,y,z,k,nb,offset,T);
offset = 1; nb = width; cimg_mapYZV(*this, y, z, k) cimg_deriche_map(0, y, z, k, nb, offset, T);
}
break;
case 'y': if (height>1) {
offset = width; nb = height; cimg_mapXZV(*this,x,z,k) cimg_deriche_map(x,0,z,k,nb,offset,T);
offset = width; nb = height; cimg_mapXZV(*this, x, z, k) cimg_deriche_map(x, 0, z, k, nb, offset, T);
}
break;
case 'z': if (depth>1) {
offset = width*height; nb = depth; cimg_mapXYV(*this,x,y,k) cimg_deriche_map(x,y,0,k,nb,offset,T);
offset = width * height; nb = depth; cimg_mapXYV(*this, x, y, k) cimg_deriche_map(x, y, 0, k, nb, offset, T);
}
break;
default: throw CImgArgumentException("CImg<%s>::deriche() : unknow axe '%c', must be 'x','y' or 'z'",pixel_type(),axe);
......@@ -14823,7 +14823,7 @@ template<typename T> struct CImg {
if (vec.size() < width*width) vec.assign(width, width);
switch (width) {
case 1: {
val[0]=(t)(*this)[0]; vec[0]=(t)1;
val[0] = (t)(*this)[0]; vec[0] = (t)1;
}
break;
case 2: {
......@@ -18993,19 +18993,19 @@ template<typename T> struct CImgl {
res.assign(dx, dy, dz, dv, 0);
switch (cimg::uncase(align)) {
case 'p' : {
cimgl_map(*this,ll) {
res.draw_image((*this)[ll],pos,0,0,0); pos+=(*this)[ll].width;
cimgl_map(*this, ll) {
res.draw_image((*this)[ll], pos, 0, 0, 0); pos += (*this)[ll].width;
}
}
break;
case 'n' : {
cimgl_map(*this,ll) {
cimgl_map(*this, ll) {
res.draw_image((*this)[ll], pos, dy - (*this)[ll].height, dz - (*this)[ll].depth, dv - (*this)[ll].dim); pos += (*this)[ll].width;
}
}
break;
default : {
cimgl_map(*this,ll) {
cimgl_map(*this, ll) {
res.draw_image((*this)[ll], pos, (dy - (*this)[ll].height) / 2, (dz - (*this)[ll].depth) / 2, (dv - (*this)[ll].dim) / 2);
pos += (*this)[ll].width;
}
......@@ -19025,19 +19025,19 @@ template<typename T> struct CImgl {
res.assign(dx, dy, dz, dv, 0);
switch (cimg::uncase(align)) {
case 'p': {
cimgl_map(*this,ll) {
res.draw_image((*this)[ll],0,pos,0,0); pos+=(*this)[ll].height;
cimgl_map(*this, ll) {
res.draw_image((*this)[ll], 0, pos, 0, 0); pos += (*this)[ll].height;
}
}
break;
case 'n': {
cimgl_map(*this,ll) {
cimgl_map(*this, ll) {
res.draw_image((*this)[ll], dx - (*this)[ll].width, pos, dz - (*this)[ll].depth, dv - (*this)[ll].dim); pos += (*this)[ll].height;
}
}
break;
default : {
cimgl_map(*this,ll) {
cimgl_map(*this, ll) {
res.draw_image((*this)[ll], (dx - (*this)[ll].width) / 2, pos, (dz - (*this)[ll].depth) / 2, (dv - (*this)[ll].dim) / 2);
pos += (*this)[ll].height;
}
......@@ -19057,19 +19057,19 @@ template<typename T> struct CImgl {
res.assign(dx, dy, dz, dv, 0);
switch (cimg::uncase(align)) {
case 'p': {
cimgl_map(*this,ll) {
res.draw_image((*this)[ll],0,0,pos,0); pos+=(*this)[ll].depth;
cimgl_map(*this, ll) {
res.draw_image((*this)[ll], 0, 0, pos, 0); pos += (*this)[ll].depth;
}
}
break;
case 'n': {
cimgl_map(*this,ll) {
cimgl_map(*this, ll) {
res.draw_image((*this)[ll], dx - (*this)[ll].width, dy - (*this)[ll].height, pos, dv - (*this)[ll].dim); pos += (*this)[ll].depth;
}
}
break;
case 'c': {
cimgl_map(*this,ll) {
cimgl_map(*this, ll) {
res.draw_image((*this)[ll], (dx - (*this)[ll].width) / 2, (dy - (*this)[ll].height) / 2, pos, (dv - (*this)[ll].dim) / 2);
pos += (*this)[ll].depth;
}
......@@ -19089,19 +19089,19 @@ template<typename T> struct CImgl {
res.assign(dx, dy, dz, dv, 0);
switch (cimg::uncase(align)) {
case 'p': {
cimgl_map(*this,ll) {
res.draw_image((*this)[ll],0,0,0,pos); pos+=(*this)[ll].dim;
cimgl_map(*this, ll) {
res.draw_image((*this)[ll], 0, 0, 0, pos); pos += (*this)[ll].dim;
}
}
break;
case 'n': {
cimgl_map(*this,ll) {
cimgl_map(*this, ll) {
res.draw_image((*this)[ll], dx - (*this)[ll].width, dy - (*this)[ll].height, dz - (*this)[ll].depth, pos); pos += (*this)[ll].dim;
}
}
break;
case 'c': {
cimgl_map(*this,ll) {
cimgl_map(*this, ll) {
res.draw_image((*this)[ll], (dx - (*this)[ll].width) / 2, (dy - (*this)[ll].height) / 2, (dz - (*this)[ll].depth) / 2, pos);
pos += (*this)[ll].dim;
}
......@@ -390,15 +390,15 @@ bool KisCImgFilter::prepare_inpaint()
if (dilate) mask.dilate(dilate);
switch (ip_init) {
case 0 : {
cimg_mapXYV(img,x,y,k) if (mask(x,y)) img(x,y,k) = 0;
cimg_mapXYV(img, x, y, k) if (mask(x, y)) img(x, y, k) = 0;
}
break;
case 1 : {
cimg_mapXYV(img,x,y,k) if (mask(x,y)) img(x,y,k) = 255;
cimg_mapXYV(img, x, y, k) if (mask(x, y)) img(x, y, k) = 255;
}
break;
case 2 : {
cimg_mapXYV(img,x,y,k) if (mask(x,y)) img(x,y,k) = (float)(255*cimg::rand());
cimg_mapXYV(img, x, y, k) if (mask(x, y)) img(x, y, k) = (float)(255 * cimg::rand());
}
break;
case 3 : break;
......
......@@ -94,7 +94,6 @@ private:
class KisPerChannelConfigWidget : public KisFilterConfigWidget
{
typedef KisFilterConfigWidget super;
Q_OBJECT
public:
......
......@@ -43,7 +43,6 @@ class KisToolColorPicker : public KisTool
{
Q_OBJECT
typedef KisTool super;
public:
KisToolColorPicker(KoCanvasBase* canvas);
......
......@@ -37,7 +37,6 @@ class KoCanvasBase;
class KisToolEllipse : public KisToolShape
{
typedef KisToolShape super;
Q_OBJECT
public:
......
......@@ -192,7 +192,7 @@ void KisToolFill::mouseReleaseEvent(KoPointerEvent *e)
QWidget* KisToolFill::createOptionWidget()
{
//QWidget *widget = super::createOptionWidget(parent);
//QWidget *widget = KisToolPaint::createOptionWidget(parent);
QWidget *widget = KisToolPaint::createOptionWidget();
m_lbThreshold = new QLabel(i18n("Threshold: "), widget);
......
......@@ -42,7 +42,6 @@ class KoCanvasBase;
class KisToolFill : public KisToolPaint
{
typedef KisToolPaint super;
Q_OBJECT
public:
......
......@@ -64,7 +64,7 @@
#endif
KisToolGradient::KisToolGradient(KoCanvasBase * canvas)
: super(canvas, KisCursor::load("tool_gradient_cursor.png", 6, 6)),
: KisToolPaint(canvas, KisCursor::load("tool_gradient_cursor.png", 6, 6)),
m_dragging(false)
{
setObjectName("tool_gradient");
......@@ -329,7 +329,7 @@ void KisToolGradient::paintLine(QPainter& gc)
QWidget* KisToolGradient::createOptionWidget()
{
QWidget *widget = super::createOptionWidget();
QWidget *widget = KisToolPaint::createOptionWidget();
Q_CHECK_PTR(widget);
m_lbShape = new QLabel(i18n("Shape:"), widget);
......
......@@ -52,7 +52,6 @@ class KisToolGradient : public KisToolPaint
{
Q_OBJECT
typedef KisToolPaint super;
public:
KisToolGradient(KoCanvasBase * canvas);
......
......@@ -42,7 +42,6 @@ class KisToolLine : public KisToolPaint
{
Q_OBJECT
typedef KisToolPaint super;
public:
KisToolLine(KoCanvasBase * canvas);
......
......@@ -63,7 +63,6 @@ class KisToolMeasure : public KisTool
{
Q_OBJECT
typedef KisTool super;
public:
KisToolMeasure(KoCanvasBase * canvas);
......
......@@ -31,7 +31,6 @@ class KoCanvasBase;
class KisToolMove : public KisTool
{
typedef KisTool super;
Q_OBJECT
public:
......
......@@ -31,7 +31,6 @@ class KoCanvasBase;
class KisToolPath : public KoCreatePathTool
{
typedef KoCreatePathTool super;
Q_OBJECT
public:
......
......@@ -42,7 +42,6 @@ class KoCanvasBase;
class KisToolRectangle : public KisToolShape
{
typedef KisToolShape super;
Q_OBJECT
public:
......
......@@ -47,8 +47,8 @@
#include "kis_undo_adapter.h"
KisToolSelectBrush::KisToolSelectBrush(KoCanvasBase *canvas)
: super(canvas, KisCursor::load("tool_brush_selection_cursor.png", 5, 5),
i18n("Selection Brush"))
: KisToolFreehand(canvas, KisCursor::load("tool_brush_selection_cursor.png", 5, 5),
i18n("Selection Brush"))
{
setObjectName("tool_select_brush");
m_optWidget = 0;
......@@ -61,7 +61,7 @@ KisToolSelectBrush::~KisToolSelectBrush()
void KisToolSelectBrush::activate(bool tmp)
{
super::activate(tmp);
KisToolFreehand::activate(tmp);
if (!m_optWidget)
return;
......
......@@ -37,7 +37,6 @@ class KisSelectionOptions;
class KisToolSelectBrush : public KisToolFreehand
{
Q_OBJECT
typedef KisToolFreehand super;
public:
KisToolSelectBrush(KoCanvasBase *canvas);
......
......@@ -49,7 +49,7 @@
#include "kis_selection_tool_helper.h"
KisToolSelectContiguous::KisToolSelectContiguous(KoCanvasBase *canvas)
: super(canvas, KisCursor::load("tool_contiguous_selection_cursor.png", 6, 6))
: KisTool(canvas, KisCursor::load("tool_contiguous_selection_cursor.png", 6, 6))
{
setObjectName("tool_select_contiguous");
m_optWidget = 0;
......@@ -64,7 +64,7 @@ KisToolSelectContiguous::~KisToolSelectContiguous()
void KisToolSelectContiguous::activate(bool tmp)
{
super::activate(tmp);
KisTool::activate(tmp);
if (!m_optWidget)
return;
......
......@@ -38,7 +38,6 @@ class KisSelectionOptions;
class KisToolSelectContiguous : public KisTool
{
typedef KisTool super;
Q_OBJECT
public:
......
......@@ -66,7 +66,7 @@ KisToolSelectElliptical::~KisToolSelectElliptical()
void KisToolSelectElliptical::activate(bool tmp)
{
super::activate(tmp);
KisTool::activate(tmp);
if (!m_optWidget)
return;
......
......@@ -35,7 +35,6 @@ class KisSelectionOptions;
class KisToolSelectElliptical : public KisTool
{
typedef KisTool super;
Q_OBJECT
public:
......
......@@ -42,8 +42,8 @@
#include "kis_undo_adapter.h"
KisToolSelectEraser::KisToolSelectEraser(KoCanvasBase *canvas)
: super(canvas, KisCursor::load("tool_eraser_selection_cursor.png", 5, 5),
i18n("Selection Eraser"))
: KisToolFreehand(canvas, KisCursor::load("tool_eraser_selection_cursor.png", 5, 5),
i18n("Selection Eraser"))
{
setObjectName("tool_select_eraser");
m_optWidget = 0;
......@@ -56,7 +56,7 @@ KisToolSelectEraser::~KisToolSelectEraser()
void KisToolSelectEraser::activate(bool tmp)
{
super::activate(tmp);
KisToolFreehand::activate(tmp);
if (!m_optWidget)
return;
......@@ -100,7 +100,7 @@ void KisToolSelectEraser::initPaint(KoPointerEvent */*e*/)
void KisToolSelectEraser::endPaint()
{
super::endPaint();
KisToolFreehand::endPaint();
}
QWidget* KisToolSelectEraser::createOptionWidget()
......
......@@ -36,7 +36,6 @@ class KisSelectionOptions;
class KisToolSelectEraser : public KisToolFreehand
{
Q_OBJECT
typedef KisToolFreehand super;
public:
KisToolSelectEraser(KoCanvasBase *canvas);
......@@ -57,7 +56,7 @@ private:
class KisToolSelectEraserFactory : public KoToolFactory
{
typedef KoToolFactory super;
public:
KisToolSelectEraserFactory(QObject *parent, const QStringList&)
: KoToolFactory(parent, "KisToolSelectEraser", i18n("Selection Eraser")) {
......
......@@ -65,7 +65,7 @@ KisToolSelectOutline::~KisToolSelectOutline()
void KisToolSelectOutline::activate(bool temporary)
{
super::activate(temporary);
KisTool::activate(temporary);
if (!m_optWidget)
return;
......
......@@ -36,7 +36,6 @@ class KisSelectionOptions;
class KisToolSelectOutline : public KisTool
{
typedef KisTool super;
Q_OBJECT
public:
KisToolSelectOutline(KoCanvasBase *canvas);
......@@ -70,7 +69,7 @@ private:
class KisToolSelectOutlineFactory : public KoToolFactory
{
typedef KoToolFactory super;
public:
KisToolSelectOutlineFactory(QObject *parent, const QStringList&)
: KoToolFactory(parent, "KisToolSelectOutline", i18n("Outline Selection")) {
......
......@@ -61,7 +61,7 @@ KisToolSelectPath::~KisToolSelectPath()
void KisToolSelectPath::activate(bool tmp)
{
super::activate(tmp);
KoCreatePathTool::activate(tmp);
if (!m_optWidget)
return;
......
......@@ -32,7 +32,6 @@ class KoCanvasBase;
class KisToolSelectPath : public KoCreatePathTool
{
typedef KoCreatePathTool super;
Q_OBJECT
public:
......
......@@ -49,7 +49,7 @@
#include "kis_selection_tool_helper.h"
KisToolSelectPolygonal::KisToolSelectPolygonal(KoCanvasBase *canvas)
: super(canvas, KisCursor::load("tool_polygonal_selection_cursor.png", 6, 6))
: KisTool(canvas, KisCursor::load("tool_polygonal_selection_cursor.png", 6, 6))
{
setObjectName("tool_select_polygonal");
m_dragging = false;
......@@ -65,7 +65,7 @@ KisToolSelectPolygonal::~KisToolSelectPolygonal()
void KisToolSelectPolygonal::activate(bool tmp)
{
m_points.clear();
super::activate(tmp);
KisTool::activate(tmp);
if (!m_optWidget)
return;
......
......@@ -34,7 +34,6 @@ class KisSelectionOptions;
class KisToolSelectPolygonal : public KisTool
{
typedef KisTool super;
Q_OBJECT
public:
KisToolSelectPolygonal(KoCanvasBase *canvas);
......
......@@ -70,7 +70,7 @@ KisToolSelectRectangular::~KisToolSelectRectangular()
void KisToolSelectRectangular::activate(bool tmp)
{
super::activate(tmp);
KisTool::activate(tmp);
if (!m_optWidget)
return;
......
......@@ -33,7 +33,6 @@ class KoCanvasBase;
class KisToolSelectRectangular : public KisTool
{
typedef KisTool super;
Q_OBJECT
public:
......
......@@ -50,7 +50,7 @@
#include <kis_crop_visitor.h>
KisToolCrop::KisToolCrop(KoCanvasBase * canvas)
: super(canvas, KisCursor::load("tool_crop_cursor.png", 6, 6))
: KisTool(canvas, KisCursor::load("tool_crop_cursor.png", 6, 6))
{
setObjectName("tool_crop");
m_selecting = false;
......@@ -66,7 +66,7 @@ KisToolCrop::~KisToolCrop()
void KisToolCrop::activate(bool tmp)
{
super::activate(tmp);
KisTool::activate(tmp);
KisSelectionSP sel = currentSelection();
if (sel) {
......
......@@ -52,7 +52,6 @@ public:
class KisToolCrop : public KisTool
{
typedef KisTool super;
Q_OBJECT
public:
......
......@@ -30,11 +30,10 @@ typedef QMutableListIterator<KisCurvePoint> KisBaseIterator;
class KisCurveIterator : public KisBaseIterator
{
typedef KisBaseIterator super;
public:
KisCurveIterator(KoPointList& base) : super(base) {
KisCurveIterator(KoPointList& base) : KisBaseIterator(base) {
return;
}
~KisCurveIterator() {