summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-02-13 21:02:04 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-02-13 22:47:24 +0100
commitd82fc206c5d27191bc47adc486cf32442908f62d (patch)
treeb31a7c2ff2c255969b04bee4d66e9b31d6dec4fe /starmath
parent8df7d613a026861501dbff935ce9c2c829cc9c12 (diff)
Remove unused SM_RECT_DEBUG
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/node.hxx25
-rw-r--r--starmath/inc/rect.hxx4
-rw-r--r--starmath/source/node.cxx3
-rw-r--r--starmath/source/rect.cxx81
-rw-r--r--starmath/source/visitors.cxx40
5 files changed, 0 insertions, 153 deletions
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index 9d567f3a4d34..dc631c564a3e 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -166,10 +166,6 @@ public:
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
virtual void CreateTextFromNode(String &rText);
-#ifdef SM_RECT_DEBUG
- using SmRect::Draw;
-#endif
-
virtual void GetAccessibleText( String &rText ) const;
sal_Int32 GetAccessibleIndex() const { return nAccIndex; }
const SmNode * FindNodeWithAccessibleIndex(xub_StrLen nAccIndex) const;
@@ -413,10 +409,6 @@ public:
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
-#ifdef SM_RECT_DEBUG
- using SmRect::Draw;
-#endif
-
void CreateTextFromNode(String &rText);
void Accept(SmVisitor* pVisitor);
};
@@ -446,10 +438,6 @@ public:
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
-#ifdef SM_RECT_DEBUG
- using SmRect::Draw;
-#endif
-
void Accept(SmVisitor* pVisitor);
};
@@ -509,11 +497,6 @@ public:
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
virtual void CreateTextFromNode(String &rText);
-#ifdef SM_RECT_DEBUG
- using SmRect::Draw;
-#endif
-
-
virtual void GetAccessibleText( String &rText ) const;
void Accept(SmVisitor* pVisitor);
};
@@ -541,10 +524,6 @@ public:
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
-#ifdef SM_RECT_DEBUG
- using SmRect::Draw;
-#endif
-
void Accept(SmVisitor* pVisitor);
};
@@ -623,10 +602,6 @@ public:
virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth);
virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight);
-#ifdef SM_RECT_DEBUG
- using SmRect::Draw;
-#endif
-
void Accept(SmVisitor* pVisitor);
};
diff --git a/starmath/inc/rect.hxx b/starmath/inc/rect.hxx
index f1f0f60d19b2..053fc3add921 100644
--- a/starmath/inc/rect.hxx
+++ b/starmath/inc/rect.hxx
@@ -211,10 +211,6 @@ public:
inline Rectangle AsRectangle() const;
SmRect AsGlyphRect() const;
-
-#ifdef SM_RECT_DEBUG
- void Draw(OutputDevice &rDev, const Point &rPosition, int nFlags) const;
-#endif
};
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index f4631a33722b..adc27acb48ed 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -50,9 +50,6 @@
#include <math.h>
#include <float.h>
-// define this to draw rectangles for debugging
-//#define SM_RECT_DEBUG
-
#define APPEND(str,ascii) str.AppendAscii(RTL_CONSTASCII_STRINGPARAM(ascii))
////////////////////////////////////////
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index 42f432fab204..12630da1bd94 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -615,87 +615,6 @@ SmRect SmRect::AsGlyphRect() const
return aRect;
}
-#ifdef SM_RECT_DEBUG
-
-// forward declaration
-void SmDrawFrame(OutputDevice &rDev, const Rectangle &rRec,
- const Color aCol = COL_BLACK);
-
-void SmRect::Draw(OutputDevice &rDev, const Point &rPosition, int nFlags) const
-{
- if (IsEmpty())
- return;
-
- rDev.Push(PUSH_LINECOLOR);
-
- if (nFlags & SM_RECT_LINES)
- { long nLeftSpace = 0,
- nRightSpace = 0;
-
- if (nFlags & SM_RECT_ITALIC)
- { nLeftSpace = GetItalicLeftSpace();
- nRightSpace = GetItalicRightSpace();
- }
-
- long nLeft = GetLeft() - nLeftSpace,
- nRight = GetRight() + nRightSpace;
-
- Point aOffset (rPosition - GetTopLeft());
-
- rDev.SetLineColor(COL_LIGHTBLUE);
- rDev.DrawLine(Point(nLeft, GetAlignB()) += aOffset,
- Point(nRight, GetAlignB()) += aOffset);
- rDev.DrawLine(Point(nLeft, GetAlignT()) += aOffset,
- Point(nRight, GetAlignT()) += aOffset);
- if (HasBaseline())
- rDev.DrawLine(Point(nLeft, GetBaseline()) += aOffset,
- Point(nRight, GetBaseline()) += aOffset);
-
- rDev.SetLineColor(COL_GRAY);
- rDev.DrawLine(Point(nLeft, GetHiAttrFence()) += aOffset,
- Point(nRight, GetHiAttrFence()) += aOffset);
- }
-
- if (nFlags & SM_RECT_MID)
- { Point aCenter = rPosition
- + (Point(GetItalicCenterX(), GetAlignM()) -= GetTopLeft()),
- aLenX (GetWidth() / 5, 0),
- aLenY (0, GetHeight() / 16);
-
- rDev.SetLineColor(COL_LIGHTGREEN);
- rDev.DrawLine(aCenter - aLenX, aCenter + aLenX);
- rDev.DrawLine(aCenter - aLenY, aCenter + aLenY);
- }
-
- if (nFlags & SM_RECT_ITALIC)
- SmDrawFrame(rDev, Rectangle(rPosition - Point(GetItalicLeftSpace(), 0),
- GetItalicSize()));
-
- if (nFlags & SM_RECT_CORE)
- SmDrawFrame(rDev, Rectangle(rPosition, GetSize()), COL_LIGHTRED);
-
- rDev.Pop();
-}
-
-
-void SmDrawFrame(OutputDevice &rDev, const Rectangle &rRec,
- const Color aCol)
-{
- rDev.Push(PUSH_LINECOLOR);
-
- rDev.SetLineColor(aCol);
-
- rDev.DrawLine(rRec.TopLeft(), rRec.BottomLeft());
- rDev.DrawLine(rRec.BottomLeft(), rRec.BottomRight());
- rDev.DrawLine(rRec.BottomRight(), rRec.TopRight());
- rDev.DrawLine(rRec.TopRight(), rRec.TopLeft());
-
- rDev.Pop();
-}
-
-#endif //SM_RECT_DEBUG
-
-
bool SmGetGlyphBoundRect(const OutputDevice &rDev,
const XubString &rText, Rectangle &rRect)
// basically the same as 'GetTextBoundRect' (in class 'OutputDevice')
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index a6778eb31562..ffe304ccad95 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -685,14 +685,6 @@ void SmDrawingVisitor::Visit( SmRootSymbolNode* pNode )
aBar.SetPos( aDrawPos );
rDev.DrawRect( aBar );
-
-#ifdef SM_RECT_DEBUG
- if ( !pNode->IsDebug( ) )
- return;
-
- int nRFlags = SM_RECT_CORE | SM_RECT_ITALIC | SM_RECT_LINES | SM_RECT_MID;
- pNode->SmRect::Draw( rDev, Position, nRFlags );
-#endif
}
void SmDrawingVisitor::Visit( SmPolyLineNode* pNode )
@@ -714,14 +706,6 @@ void SmDrawingVisitor::Visit( SmPolyLineNode* pNode )
aTmpDev.SetLineColor( pNode->GetFont( ).GetColor( ) );
rDev.DrawPolyLine( pNode->GetPolygon( ), aInfo );
-
-#ifdef SM_RECT_DEBUG
- if ( !pNode->IsDebug( ) )
- return;
-
- int nRFlags = SM_RECT_CORE | SM_RECT_ITALIC | SM_RECT_LINES | SM_RECT_MID;
- pNode->SmRect::Draw( rDev, Position, nRFlags );
-#endif
}
void SmDrawingVisitor::Visit( SmRectangleNode* pNode )
@@ -754,14 +738,6 @@ void SmDrawingVisitor::Visit( SmRectangleNode* pNode )
aTmp.SetPos( aPos );
rDev.DrawRect( aTmp );
-
-#ifdef SM_RECT_DEBUG
- if ( !pNode->IsDebug( ) )
- return;
-
- int nRFlags = SM_RECT_CORE | SM_RECT_ITALIC | SM_RECT_LINES | SM_RECT_MID;
- pNode->SmRect::Draw( rDev, rPosition, nRFlags );
-#endif
}
void SmDrawingVisitor::DrawTextNode( SmTextNode* pNode )
@@ -778,14 +754,6 @@ void SmDrawingVisitor::DrawTextNode( SmTextNode* pNode )
aPos = rDev.PixelToLogic( rDev.LogicToPixel( aPos ) );
rDev.DrawStretchText( aPos, pNode->GetWidth( ), pNode->GetText( ) );
-
-#ifdef SM_RECT_DEBUG
- if ( !pNode->IsDebug( ) )
- return;
-
- int nRFlags = SM_RECT_CORE | SM_RECT_ITALIC | SM_RECT_LINES | SM_RECT_MID;
- pNode->SmRect::Draw( rDev, Position, nRFlags );
-#endif
}
void SmDrawingVisitor::DrawSpecialNode( SmSpecialNode* pNode )
@@ -811,14 +779,6 @@ void SmDrawingVisitor::DrawChildren( SmNode* pNode )
Position = rPosition + aOffset;
it->Accept( this );
}
-
-#ifdef SM_RECT_DEBUG
- if ( !pNode->IsDebug( ) )
- return;
-
- int nRFlags = SM_RECT_CORE | SM_RECT_ITALIC | SM_RECT_LINES | SM_RECT_MID;
- pNode->SmRect::Draw( rDev, rPosition, nRFlags );
-#endif
}
/////////////////////////////// SmSetSelectionVisitor ////////////////////////////////