Thorsten Zachmann | 1 Aug 2010 07:20
Picon
Favicon

Re: Review Request: Shape in background

This is an automatically generated e-mail. To reply, visit: http://reviewboard.kde.org/r/4797/

Can the same effect you are archiving with the runThrouh variable archived by changing the z-index of the shape? As far as I have seen this property has only effect on how the main text is painted. So by manipulating the z-index of the shapes for all shapes that should be painted below the main text shape can be archived by setting the z-index lower then the one of the main text shape of kword. When doing some testing I generated the the following file: http://www.zagge.de/files/run_through.odt It also has a background set on the main text frame. However that can't be done with your proposed solution. I would like to add additional code to flake if it could be avoided.

- Thorsten


On July 30th, 2010, 2:42 p.m., Matus Hanzes wrote:

Review request for KOffice.
By Matus Hanzes.

Updated 2010-07-30 14:42:37

Description

This patch allows placing shapes behind text. https://bugs.kde.org/show_bug.cgi?id=239689

Diffs

  • trunk/koffice/kword/part/KWCanvas.h (1157153)
  • trunk/koffice/kword/part/KWCanvas.cpp (1157153)
  • trunk/koffice/kword/part/frames/KWCopyShape.cpp (1157153)
  • trunk/koffice/kword/part/frames/KWFrame.cpp (1157153)
  • trunk/koffice/libs/flake/KoShape.h (1157153)
  • trunk/koffice/libs/flake/KoShape.cpp (1157153)
  • trunk/koffice/libs/flake/KoShapeManager.h (1157153)
  • trunk/koffice/libs/flake/KoShapeManager.cpp (1157153)
  • trunk/koffice/libs/flake/KoShape_p.h (1157153)

View Diff

_______________________________________________
koffice-devel mailing list
koffice-devel <at> kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
Matus Uzak | 2 Aug 2010 12:43
Favicon

Re: KoXmlWriter: A problem in combination of the content written by two writers

Hi,

> Why are you using 2 writers, One writer is enough.

Well just a matter of simplicity and consistency.  I could of course share  
one global writer in the code
and check a few variables for context but this would mess up the code.   
I'm collecting the content for
the hyperlink element and inserting corresponding bookmarks into a  
temporary writer, because I don't know
if this is going to be an image (<draw:a> required) or text (<text:a>  
required).

When I'm using addCompleteElement to add the CONTENT wrote by the  
temporary writer, the result is following:
newline space CONTENT space.  The second space is added by calling  
endElement.  KoXmlWriter is just doing
this to keep the resulting xml look nice, which is not desired in my case.

I will try to redesign the code to use just one KoXmlWriter, shouldn't be  
that bad.

br,

matus

On Sat, 31 Jul 2010 06:33:24 +0200, Thorsten Zachmann  
<t.zachmann <at> zagge.de> wrote:

> Hello,
>
> On Friday 30 July 2010 15:42:44 Matus Uzak wrote:
>> I'm using two KoXmlWriter type writers to construct the following:
>>
>> <text:a xlink:type="simple"
>> xlink:href="http://google.com">http://google.co<text:bookmark-start
>> text:name="_Hlt250539236"/>m<text:bookmark-end
>> text:name="_Hlt250539236"/></text:a>
>>
>> The first writer is taking care of the <text:a> element and it's  
>> parents.
>> The second one is used to write plain text
>> potentially combined with several <text:bookmark> elements.
>>
>
> Why are you using 2 writers, One writer is enough. The following does  
> what you
> want:
>
>     writer->startElement("text:a");
>     writer->addAttribute("xlink:href", "http://google.com");
>     writer->addTextNode("http://google.co");
>     writer->startElement("text:bookmark-start");
>     writer->addAttribute("text:name", "_Hlt250539236");
>     writer->endElement();
>     writer->addTextNode("m");
>     writer->startElement("text:bookmark-end");
>     writer->addAttribute("text:name", "_Hlt250539236");
>     writer->endElement();
>     writer->endElement();
>
> Using one writer only has the benefit of using less resources and be much
> faster too.
>
>> PROBLEM:
>> --------
>>
>> There are two options to insert the buff2 content wrote by the second
>> writer:
>>
>> 1. Using addCompleteElement, which indents the buff2 content (NOT  
>> CORRECT
>> in this case!):
>>
>> writer.startElement("text:a");
>> writer.addAttribute("xlink:type", "simple");
>> writer.addAttribute("xlink:href", QUrl(*str).toEncoded());
>> writer.addCompleteElement(buff2);
>> writer.endElement();
>>
>> The result:
>>
>> <text:a xlink:type="simple" xlink:href="http://google.com">
>>   http://google.co<text:bookmark-start
>> text:name="_Hlt250539236"/>m<text:bookmark-end  
>> text:name="_Hlt250539236"/>
>> </text:a>
>>
>>
>> 2. Using addTextNode, which is calling escapeForXML (NOT CORRECT in this
>> case!):
>>
>> writer.startElement("text:a");
>> writer.addAttribute("xlink:type", "simple");
>> writer.addAttribute("xlink:href", QUrl(*str).toEncoded());
>> QString tmp = QString::fromUtf8(buff2.buffer(), buff2.buffer().size());
>> writer.addTextNode(tmp);
>> writer.endElement();
>>
>> The result:
>>
>> <text:a xlink:type="simple"
>> xlink:href="http://google.com">http://google.co&lt;text:bookmark-start
>> text:name="_Hlt250539236"/&gt;m&lt;text:bookmark-end
>> text:name="_Hlt250539236"/&gt;</text:a>
>>
>
> What exactly is the problem you are trying to solve? Using addTextNode  
> is not
> what you want to do you want to add a xml snippet for which  
> addCompleteElement
> should be used. The name might be misleading but it does what you want.
>
>> SOLUTION:
>> ---------
>>
>> I would like to overload the addTextNode function without using
>> escapeForXML or simply add another parameter, which would control the
>> usage of escapeForXML.
>> Any other suggestions or comments?
>
> Adding a text node needs to escape for XML so adding a bool there is just
> wrong . I think it makes no sense to misuse this function.
>
> The above might make no sense as I have not understood what the problem  
> is you
> are trying to solve. If so please try to explain it once more in more  
> detail.
>
> Thorsten
> _______________________________________________
> koffice-devel mailing list
> koffice-devel <at> kde.org
> https://mail.kde.org/mailman/listinfo/koffice-devel
>

--

-- 
Matus Uzak
Software Designer
Ixonos Slovakia s.r.o.
Sturova 27
040 01 Kosice, Slovakia
mobile 0421 918 718 958
email: matus.uzak <at> ixonos.com
http://www.ixonos.com
zander | 2 Aug 2010 16:29
Picon
Favicon

Re: Review Request: Shape in background

On Friday 30. July 2010 16.42.38 Matus Hanzes wrote:
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/4797/
> -----------------------------------------------------------
> 
> Review request for KOffice.
> 
> 
> Summary
> -------
> 
> This patch allows placing shapes behind text.
> 
> https://bugs.kde.org/show_bug.cgi?id=239689
> 
> 
> Diffs
> -----
> 
>   trunk/koffice/kword/part/KWCanvas.h 1157153
>   trunk/koffice/kword/part/KWCanvas.cpp 1157153
>   trunk/koffice/kword/part/frames/KWCopyShape.cpp 1157153
>   trunk/koffice/kword/part/frames/KWFrame.cpp 1157153
>   trunk/koffice/libs/flake/KoShape.h 1157153
>   trunk/koffice/libs/flake/KoShape.cpp 1157153
>   trunk/koffice/libs/flake/KoShapeManager.h 1157153
>   trunk/koffice/libs/flake/KoShapeManager.cpp 1157153
>   trunk/koffice/libs/flake/KoShape_p.h 1157153

Reviewboard is down right now, so sorry for replying to the koffice ML.
We talked about this functionality before on this mailinglist and I remember 
that you also suggested to add some code to KoShape back then.  As I can't 
read the diff either I'm just wondering if the suggestion I made back then to 
use the z-index only was not possible for some reason.

Supporting this feature seems to be possible by *only* changing code in the 
text shape, using zindex. But I didn't do the work so I can't be 100% sure. So 
I'm wondering if you tried it and what the problems you found with the 
suggested solution were.

If its possible to implement this feature inside the text shape without 
modifying flake and only very little in kword then that would have my 
preference.
--

-- 
Thomas Zander
Thomas Zander | 2 Aug 2010 19:09
Picon
Favicon

Re: koffice/kword/part/frames

Casper, maybe this mail didn't get through as the question was unanswered so 
far. Re-sending :)

On Thursday 22. July 2010 13.35.06 Thomas Zander wrote:
> Is there a reason you stopped using reviewboard for commits that I think
> there was a clear understanding we need reviewboard for ?
> 
> On Wednesday 21. July 2010 17.23.24 Casper Boemann wrote:
> > SVN commit 1152612 by boemann:
> > 
> > Make layout of text not fail in certain situations in tables. The symptom
> > was that every line of the text was laid out on individual lines.
> > 
> > This removes the rightIndent in the fitting process.
> > 
> > Try without this patch and see how it was even trying to do the wrong
> > thing: Write some text and set some right indent, then add a anchored
> > shape and you will see how it worked wrongly
> > 
> >  M  +0 -4      KWTextDocumentLayout.cpp
> > 
> > --- trunk/koffice/kword/part/frames/KWTextDocumentLayout.cpp
> > #1152611:1152612  <at>  <at>  -268,7 +268,6  <at>  <at> 
> > 
> >              void tryFit() {
> >              
> >                  const qreal leftIndent = m_state->x();
> >                  const qreal width = m_state->width();
> > 
> > -                const qreal rightIndent = m_state->shape->size().width()
> > - width - leftIndent; QRectF rect(leftIndent, m_state->y(), width, 1.);
> > line.setLineWidth(rect.width());
> > 
> >                  if (rect.width() <= 0. || line.textLength() == 0) {
> > 
> >  <at>  <at>  -294,9 +293,6  <at>  <at> 
> > 
> >                              x += leftIndent;
> >                              effectiveLineWidth -= leftIndent;
> >                          
> >                          }
> > 
> > -                        if (leftIndent + width > rect.right()) // limit
> > moved the right edge, keep the indent. -
> > effectiveLineWidth = rect.width() - rightIndent; -
> > 
> >                          line.setLineWidth(effectiveLineWidth);
> >                          line.setPosition(QPointF(x, rect.y()));
> >                      
> >                      }

--

-- 
Thomas Zander
Thomas Zander | 2 Aug 2010 19:16
Picon
Favicon

Re: Review Request: Implementation of around wrap (on both sides)

On Thursday 29. July 2010 15.27.38 Pavol Korinek wrote:
> > On 2010-07-24 07:54:36, Casper Boemann wrote:
> > > Interesting approach. I can't test it right now, but please test that
> > > it works if more than one shape is "dividing" the text
> > > 
> > > But it not bad at all if it works.
> > 
> > Casper Boemann wrote:
> >     I'm pretty sure that this situation will not be handled:
> >     
> >     
> >     text [BOTH SIDES SHAPE] text [BOTH SIDES SHAPE] text
> 
> yes. you right. text can be only on
> left side of most left leftsided or bothsided shape
> or on
> right side of most right rightsided or bothsided shape
> 
> Actually I'm working on new version, which works in general. I need to
> rewrite tryFit method. It will takes some time. Can be this patch comited
> as temporally version ? It can be deleted with my new version later.
> 
> Thomas, what's your opinion an this patch ?

The concept of run-around-both is not something I think warrents any effort as 
any good typography should not use it. So I don't want to put much time into 
this.
For that reason your patch is just fine, you can commit it it you want and I 
think its good enough as is.

The one nag I need to make is that for text-layout there should be adequate 
test coverage, which means new unit tests for new features. So if you have some 
time for that, that would be useful.
--

-- 
Thomas Zander
C. Boemann | 2 Aug 2010 19:25
Picon

Re: koffice/kword/part/frames

No particular reason. It was a small change that can easily be post reviewed, 
if people think it's wrong.

On Monday 02 August 2010 19:09:09 Thomas Zander wrote:
> Casper, maybe this mail didn't get through as the question was unanswered
> so far. Re-sending :)
> 
> On Thursday 22. July 2010 13.35.06 Thomas Zander wrote:
> > Is there a reason you stopped using reviewboard for commits that I think
> > there was a clear understanding we need reviewboard for ?
> > 
> > On Wednesday 21. July 2010 17.23.24 Casper Boemann wrote:
> > > SVN commit 1152612 by boemann:
> > > 
> > > Make layout of text not fail in certain situations in tables. The
> > > symptom was that every line of the text was laid out on individual
> > > lines.
> > > 
> > > This removes the rightIndent in the fitting process.
> > > 
> > > Try without this patch and see how it was even trying to do the wrong
> > > thing: Write some text and set some right indent, then add a anchored
> > > shape and you will see how it worked wrongly
> > > 
> > >  M  +0 -4      KWTextDocumentLayout.cpp
> > > 
> > > --- trunk/koffice/kword/part/frames/KWTextDocumentLayout.cpp
> > > #1152611:1152612  <at>  <at>  -268,7 +268,6  <at>  <at> 
> > > 
> > >              void tryFit() {
> > >              
> > >                  const qreal leftIndent = m_state->x();
> > >                  const qreal width = m_state->width();
> > > 
> > > -                const qreal rightIndent =
> > > m_state->shape->size().width() - width - leftIndent; QRectF
> > > rect(leftIndent, m_state->y(), width, 1.);
> > > line.setLineWidth(rect.width());
> > > 
> > >                  if (rect.width() <= 0. || line.textLength() == 0) {
> > > 
> > >  <at>  <at>  -294,9 +293,6  <at>  <at> 
> > > 
> > >                              x += leftIndent;
> > >                              effectiveLineWidth -= leftIndent;
> > >                          
> > >                          }
> > > 
> > > -                        if (leftIndent + width > rect.right()) //
> > > limit moved the right edge, keep the indent. -
> > > effectiveLineWidth = rect.width() - rightIndent; -
> > > 
> > >                          line.setLineWidth(effectiveLineWidth);
> > >                          line.setPosition(QPointF(x, rect.y()));
> > >                      
> > >                      }
Thomas Zander | 3 Aug 2010 00:21
Picon
Favicon

koffice

SVN commit 1158520 by zander:

Make setCursor consistent and remove unused return value

CCMAIL: koffice-devel <at> kde.org

the setCursor method exists on several Qt classes and nowhere
does it return anything; so lets follow that example since
nobody in KOffice svn was using the return value anyway.

Also fix the problem that in kspread the new method ended up
being a slot.

 M  +2 -3      karbon/ui/widgets/KarbonCanvas.cpp  
 M  +1 -1      karbon/ui/widgets/KarbonCanvas.h  
 M  +1 -3      kformula/KFormulaCanvas.cpp  
 M  +1 -1      kformula/KFormulaCanvas.h  
 M  +1 -6      kformula/flake/tests/TestCursor.cpp  
 M  +2 -3      krita/plugins/extensions/painterlyframework/mixercanvas.cpp  
 M  +1 -1      krita/plugins/extensions/painterlyframework/mixercanvas.h  
 M  +1 -3      krita/ui/canvas/kis_canvas2.cpp  
 M  +1 -1      krita/ui/canvas/kis_canvas2.h  
 M  +1 -1      krita/ui/flake/kis_shape_layer_canvas.h  
 M  +1 -4      krita/ui/flake/kis_shape_selection_canvas.h  
 M  +2 -3      kspread/part/Canvas.cpp  
 M  +2 -2      kspread/part/Canvas.h  
 M  +1 -3      kspread/part/CanvasItem.cpp  
 M  +1 -1      kspread/part/CanvasItem.h  
 M  +1 -3      kword/part/KWCanvas.cpp  
 M  +1 -1      kword/part/KWCanvas.h  
 M  +1 -3      kword/part/KWCanvasItem.cpp  
 M  +1 -1      kword/part/KWCanvasItem.h  
 M  +1 -1      libs/flake/KoCanvasBase.h  
 M  +1 -4      libs/flake/KoShapePainter.cpp  
 M  +1 -4      libs/flake/tests/MockShapes.h  
 M  +1 -3      libs/kopageapp/KoPACanvas.cpp  
 M  +1 -1      libs/kopageapp/KoPACanvas.h  
 M  +3 -1      plugins/dockers/shapeselector/Canvas.h  

--- trunk/koffice/karbon/ui/widgets/KarbonCanvas.cpp #1158519:1158520
 <at>  <at>  -420,11 +420,10  <at>  <at> 
     setPalette(pal);
 }

-QCursor KarbonCanvas::setCursor(const QCursor &cursor)
+void KarbonCanvas::setCursor(const QCursor &cursor)
 {
-    QCursor oldCursor = QWidget::cursor();
     QWidget::setCursor(cursor);
-    return oldCursor;
 }
+
 #include "KarbonCanvas.moc"

--- trunk/koffice/karbon/ui/widgets/KarbonCanvas.h #1158519:1158520
 <at>  <at>  -85,7 +85,7  <at>  <at> 
     virtual void updateInputMethodInfo();
     /// reimplemented from KoCanvasBase
     virtual KoGuidesData * guidesData();
-    virtual QCursor setCursor(const QCursor &cursor);
+    virtual void setCursor(const QCursor &cursor);
     /// Enables/disables showing page margins
     void setShowPageMargins(bool on);

--- trunk/koffice/kformula/KFormulaCanvas.cpp #1158519:1158520
 <at>  <at>  -157,9 +157,7  <at>  <at> 
     updateMicroFocus();
 }

-QCursor KFormulaCanvas::setCursor(const QCursor &cursor)
+void KFormulaCanvas::setCursor(const QCursor &cursor)
 {
-    QCursor oldCursor = QWidget::cursor();
     QWidget::setCursor(cursor);
-    return oldCursor;
 }
--- trunk/koffice/kformula/KFormulaCanvas.h #1158519:1158520
 <at>  <at>  -78,7 +78,7  <at>  <at> 
     /// reimplemented method from superclass
     virtual void updateInputMethodInfo();

-    QCursor setCursor(const QCursor &cursor);
+    void setCursor(const QCursor &cursor);

 protected:
     void mousePressEvent( QMouseEvent* event );
--- trunk/koffice/kformula/flake/tests/TestCursor.cpp #1158519:1158520
 <at>  <at>  -74,12 +74,7  <at>  <at> 
         return KoUnit(KoUnit::Millimeter);
     }
     void updateInputMethodInfo() {}
-
-
-    QCursor setCursor(const QCursor &cursor)
-    {
-        return cursor;
-    }
+    void setCursor(const QCursor &) {}
 };

 void TestCursor::moveCursor()
--- trunk/koffice/krita/plugins/extensions/painterlyframework/mixercanvas.cpp #1158519:1158520
 <at>  <at>  -207,10 +207,9  <at>  <at> 
     return KoColor();
 }

-QCursor MixerCanvas::setCursor(const QCursor &cursor)
+void MixerCanvas::setCursor(const QCursor &cursor)
 {
-    QCursor oldCursor = QWidget::cursor();
     QWidget::setCursor(cursor);
-    return oldCursor;
 }
+
 #include "mixercanvas.moc"
--- trunk/koffice/krita/plugins/extensions/painterlyframework/mixercanvas.h #1158519:1158520
 <at>  <at>  -67,7 +67,7  <at>  <at> 

     KoColor currentColorAt(QPoint pos);

-    QCursor setCursor(const QCursor &cursor);
+    void setCursor(const QCursor &cursor);
 protected:

     // Events to be redirected to the MixerTool
--- trunk/koffice/krita/ui/canvas/kis_canvas2.cpp #1158519:1158520
 <at>  <at>  -601,11 +601,9  <at>  <at> 
     return false;
 }

-QCursor KisCanvas2::setCursor(const QCursor &cursor)
+void KisCanvas2::setCursor(const QCursor &cursor)
 {
-    QCursor oldCursor = canvasWidget()->cursor();
     canvasWidget()->setCursor(cursor);
-    return oldCursor;
 }

 #include "kis_canvas2.moc"
--- trunk/koffice/krita/ui/canvas/kis_canvas2.h #1158519:1158520
 <at>  <at>  -195,7 +195,7  <at>  <at> 

     void slotCanvasDestroyed(QWidget* w);

-    QCursor setCursor(const QCursor &cursor);
+    void setCursor(const QCursor &cursor);

 public:
 //    friend class KisView2;
--- trunk/koffice/krita/ui/flake/kis_shape_layer_canvas.h #1158519:1158520
 <at>  <at>  -60,7 +60,7  <at>  <at> 
     const QWidget* canvasWidget() const;
     KoUnit unit() const;
     virtual void updateInputMethodInfo() {}
-    QCursor setCursor(const QCursor &cursor) { return cursor; }
+    virtual void setCursor(const QCursor &) {}

 private slots:
     void repaint();
--- trunk/koffice/krita/ui/flake/kis_shape_selection_canvas.h #1158519:1158520
 <at>  <at>  -52,10 +52,7  <at>  <at> 
     const QWidget* canvasWidget() const;
     KoUnit unit() const;
     virtual void updateInputMethodInfo() {}
-    QCursor setCursor(const QCursor &cursor)
-    {
-        return cursor;
-    }
+    virtual void setCursor(const QCursor &) {}
 private:
     KoShapeManager * m_shapeManager;
 };
--- trunk/koffice/kspread/part/Canvas.cpp #1158519:1158520
 <at>  <at>  -372,10 +372,9  <at>  <at> 
     view()->disableAutoScroll();
 }

-QCursor Canvas::setCursor(const QCursor &cursor)
+void Canvas::setCursor(const QCursor &cursor)
 {
-    QCursor oldCursor = QWidget::cursor();
     QWidget::setCursor(cursor);
-    return oldCursor;
 }
+
 #include "Canvas.moc"
--- trunk/koffice/kspread/part/Canvas.h #1158519:1158520
 <at>  <at>  -96,6 +96,8  <at>  <at> 

     virtual Sheet* activeSheet() const;
     virtual KSpread::Selection* selection() const;
+    virtual void setCursor(const QCursor &cursor);
+
 public Q_SLOTS:
     void setDocumentOffset(const QPoint& offset) {
         CanvasBase::setDocumentOffset(offset);
 <at>  <at>  -103,9 +105,7  <at>  <at> 
     void setDocumentSize(const QSizeF& size) {
         CanvasBase::setDocumentSize(size);
     }
-    QCursor setCursor(const QCursor &cursor);

-
 Q_SIGNALS:
     /* virtual */ void documentSizeChanged(const QSize&);

--- trunk/koffice/kspread/part/CanvasItem.cpp #1158519:1158520
 <at>  <at>  -395,11 +395,9  <at>  <at> 
     return d->rowHeader;
 }

-QCursor CanvasItem::setCursor(const QCursor &cursor)
+void CanvasItem::setCursor(const QCursor &cursor)
 {
-    QCursor oldCursor = QGraphicsWidget::cursor();
     QGraphicsWidget::setCursor(cursor);
-    return oldCursor;
 }

 #include "CanvasItem.moc"
--- trunk/koffice/kspread/part/CanvasItem.h #1158519:1158520
 <at>  <at>  -174,7 +174,7  <at>  <at> 

     virtual ColumnHeader* columnHeader() const;
     virtual RowHeader* rowHeader() const;
-    virtual QCursor setCursor(const QCursor &cursor);
+    virtual void setCursor(const QCursor &cursor);

 private:
     Q_DISABLE_COPY(CanvasItem)
--- trunk/koffice/kword/part/KWCanvas.cpp #1158519:1158520
 <at>  <at>  -165,11 +165,9  <at>  <at> 
     painter.end();
 }

-QCursor KWCanvas::setCursor(const QCursor &cursor)
+void KWCanvas::setCursor(const QCursor &cursor)
 {
-    QCursor oldCursor = QWidget::cursor();
     QWidget::setCursor(cursor);
-    return oldCursor;
 }

 void KWCanvas::updateInputMethodInfo()
--- trunk/koffice/kword/part/KWCanvas.h #1158519:1158520
 <at>  <at>  -81,7 +81,7  <at>  <at> 
         return m_view;
     }

-    virtual QCursor setCursor(const QCursor &cursor);
+    virtual void setCursor(const QCursor &cursor);

 public slots:
     /**
--- trunk/koffice/kword/part/KWCanvasItem.cpp #1158519:1158520
 <at>  <at>  -181,9 +181,7  <at>  <at> 
     KWCanvasBase::paint(*painter, option->exposedRect);
 }

-QCursor KWCanvasItem::setCursor(const QCursor &cursor)
+void KWCanvasItem::setCursor(const QCursor &cursor)
 {
-    QCursor oldCursor = QGraphicsWidget::cursor();
     QGraphicsWidget::setCursor(cursor);
-    return oldCursor;
 }
--- trunk/koffice/kword/part/KWCanvasItem.h #1158519:1158520
 <at>  <at>  -86,7 +86,7  <at>  <at> 
     /// reimplemented method from superclass
     virtual void updateInputMethodInfo();

-    virtual QCursor setCursor(const QCursor &cursor);
+    virtual void setCursor(const QCursor &cursor);

 public slots:
     /**
--- trunk/koffice/libs/flake/KoCanvasBase.h #1158519:1158520
 <at>  <at>  -94,7 +94,7  <at>  <at> 
      *  <at> param cursor the new cursor
      *  <at> return the old cursor
      */
-    virtual QCursor setCursor(const QCursor &cursor) = 0;
+    virtual void setCursor(const QCursor &cursor) = 0;

     /**
      * Adds a command to the history. Call this for each  <at> p command you create.
--- trunk/koffice/libs/flake/KoShapePainter.cpp #1158519:1158520
 <at>  <at>  -100,10 +100,7  <at>  <at> 

     virtual void updateInputMethodInfo() {}

-    QCursor setCursor(const QCursor &cursor)
-    {
-        return cursor;
-    }
+    void setCursor(const QCursor &) {}

 private:
     KoShapeManager *m_shapeManager;
--- trunk/koffice/libs/flake/tests/MockShapes.h #1158519:1158520
 <at>  <at>  -87,10 +87,7  <at>  <at> 
         return KoUnit(KoUnit::Millimeter);
     }
     void updateInputMethodInfo() {}
-    QCursor setCursor(const QCursor &cursor)
-    {
-        return cursor;
-    }
+    void setCursor(const QCursor &) {}
 };

 class MockShapeController : public KoShapeControllerBase
--- trunk/koffice/libs/kopageapp/KoPACanvas.cpp #1158519:1158520
 <at>  <at>  -318,11 +318,9  <at>  <at> 
     return &d->doc->guidesData();
 }

-QCursor KoPACanvas::setCursor(const QCursor &cursor)
+void KoPACanvas::setCursor(const QCursor &cursor)
 {
-    QCursor oldCursor = QWidget::cursor();
     QWidget::setCursor(cursor);
-    return oldCursor;
 }

 #include <KoPACanvas.moc>
--- trunk/koffice/libs/kopageapp/KoPACanvas.h #1158519:1158520
 <at>  <at>  -76,7 +76,7  <at>  <at> 
     QPoint viewToWidget(const QPoint& p) const;
     QRect viewToWidget(const QRect& r) const;

-    QCursor setCursor(const QCursor &cursor);
+    virtual void setCursor(const QCursor &cursor);

 public slots:
     /// Recalculates the size of the canvas (needed when zooming or changing pagelayout)
--- trunk/koffice/plugins/dockers/shapeselector/Canvas.h #1158519:1158520
 <at>  <at>  -72,7 +72,9  <at>  <at> 
     virtual void updateInputMethodInfo() {}
     /// implementing KoCanvasBase
     virtual const QWidget* canvasWidget() const { return 0; }
-    QCursor setCursor(const QCursor &cursor) { return cursor; }
+    void setCursor(const QCursor &cursor) {
+        QWidget::setCursor(cursor);
+    }
     ItemStore *itemStore() const { return m_parent->itemStore(); }

     /**
Christoph Goerlich | 3 Aug 2010 12:44
Picon
Picon

Re: Review Request: SpellChecker remove all misspelled when disabled.

This is an automatically generated e-mail. To reply, visit: http://reviewboard.kde.org/r/4762/

Review request for KOffice.
By Christoph Goerlich.

Updated 2010-08-03 10:44:19.379345

Changes

Changed the way misspelled words are removed, now iterating over all Textblocks of the document. p.s. Sorry for the numerous postings, i am new and didn't find straightaway how to change a review request and also got python errors as i try to submit.

Description

I have done a Junior Job (see http://wiki.koffice.org/index.php?title=Junior_Jobs in section kword "Spellchecker should remove all misspelled words when the spellchecker is disabled.").

Diffs (updated)

  • trunk/koffice/plugins/textediting/spellcheck/SpellCheck.cpp (1156544)

View Diff

_______________________________________________
koffice-devel mailing list
koffice-devel <at> kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
Christoph Goerlich | 3 Aug 2010 12:30
Picon
Picon

Re: Review Request: SpellChecker remove all misspelled when disabled.

This is an automatically generated e-mail. To reply, visit: http://reviewboard.kde.org/r/4762/

Changed the way misspelled words are removed, now iterating over all Textblocks of the document.

- Christoph


On July 27th, 2010, 6:33 p.m., Christoph Goerlich wrote:

Review request for KOffice.
By Christoph Goerlich.

Updated 2010-07-27 18:33:32

Description

I have done a Junior Job (see http://wiki.koffice.org/index.php?title=Junior_Jobs in section kword "Spellchecker should remove all misspelled words when the spellchecker is disabled.").

Diffs

  • trunk/koffice/plugins/textediting/spellcheck/SpellCheck.cpp (1154371)

View Diff

_______________________________________________
koffice-devel mailing list
koffice-devel <at> kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
Casper Boemann | 3 Aug 2010 13:31
Picon

Review Request: Allow painting text outside the shape

This is an automatically generated e-mail. To reply, visit: http://reviewboard.kde.org/r/4861/

Review request for KOffice.
By Casper Boemann.

Description

When you have negative indents you want to be able to paint text outside the frame of the textshape. This patch accomplishes that. It also changes the way Rulers work regarding active ranges. First it now has the notion of an override range which the rulermanager gets from resourcemanager. This way the tools are now responsible for setting the (override) active range. The default active range is still set by the apps, (and kword now also defaults to the entire paper like kpresenter) As to the draw outside i've introduced an outlineRect() method similar to outline() but just a rect rather than a path.

Diffs

  • trunk/koffice/kword/part/KWGui.cpp (1158585)
  • trunk/koffice/kword/part/tests/TestDocumentLayout.cpp (1158585)
  • trunk/koffice/libs/flake/KoResourceManager.h (1158585)
  • trunk/koffice/libs/flake/KoShape.h (1158585)
  • trunk/koffice/libs/flake/KoShape.cpp (1158585)
  • trunk/koffice/libs/kotext/KoTextDocumentLayout.h (1158585)
  • trunk/koffice/libs/kotext/KoTextDocumentLayout.cpp (1158585)
  • trunk/koffice/libs/main/KoRuler.h (1158585)
  • trunk/koffice/libs/main/KoRuler.cpp (1158585)
  • trunk/koffice/libs/main/KoRulerController.cpp (1158585)
  • trunk/koffice/libs/main/KoRuler_p.h (1158585)
  • trunk/koffice/plugins/textshape/Layout.h (1158585)
  • trunk/koffice/plugins/textshape/Layout.cpp (1158585)
  • trunk/koffice/plugins/textshape/TextShape.h (1158585)
  • trunk/koffice/plugins/textshape/TextShape.cpp (1158585)
  • trunk/koffice/plugins/textshape/TextTool.cpp (1158585)
  • trunk/koffice/plugins/textshape/tests/TestDocumentLayout.cpp (1158585)

View Diff

_______________________________________________
koffice-devel mailing list
koffice-devel <at> kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel

Gmane