]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextprint.cpp
Don't redraw borders for cells that are hidden - fixes drawing glitch in sample
[wxWidgets.git] / src / richtext / richtextprint.cpp
index a3c8d1152298264c61bf0db0f4814c5c16b77e3e..837d3b0c58cc9bfffd52b4fa8ad02a7c25b176fd 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     Rich text printing classes
 // Author:      Julian Smart
 // Created:     2006-10-24
-// RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -105,16 +104,16 @@ void wxRichTextPrintout::OnPreparePrinting()
                         {
                             // New page starting at this line
                             int newY = rect.y;
-                            
+
                             // We increase the offset by the difference between new and old positions
-                            
+
                             int increaseOffsetBy = lineY - newY;
                             yOffset += increaseOffsetBy;
-                            
+
                             m_pageBreaksStart.Add(lastStartPos);
                             m_pageBreaksEnd.Add(lastLine->GetAbsoluteRange().GetEnd());
                             m_pageYOffsets.Add(yOffset);
-                            
+
                             lastStartPos = line->GetAbsoluteRange().GetStart();
                             m_numPages ++;
                         }
@@ -146,12 +145,9 @@ void wxRichTextPrintout::OnPreparePrinting()
         }
 
         // Closing page break
-        if (m_pageBreaksStart.GetCount() == 0 || (m_pageBreaksEnd[m_pageBreaksEnd.GetCount()-1] < (GetRichTextBuffer()->GetOwnRange().GetEnd()-1)))
-        {
-            m_pageBreaksStart.Add(lastStartPos);
-            m_pageBreaksEnd.Add(GetRichTextBuffer()->GetOwnRange().GetEnd());
-            m_pageYOffsets.Add(yOffset);
-        }
+        m_pageBreaksStart.Add(lastStartPos);
+        m_pageBreaksEnd.Add(GetRichTextBuffer()->GetOwnRange().GetEnd());
+        m_pageYOffsets.Add(yOffset);
     }
 }
 
@@ -509,6 +505,7 @@ void wxRichTextPrinting::SetRichTextBufferPreview(wxRichTextBuffer* buf)
     m_richTextBufferPreview = buf;
 }
 
+#if wxUSE_FFILE && wxUSE_STREAMS
 bool wxRichTextPrinting::PreviewFile(const wxString& richTextFile)
 {
     SetRichTextBufferPreview(new wxRichTextBuffer);
@@ -528,6 +525,7 @@ bool wxRichTextPrinting::PreviewFile(const wxString& richTextFile)
     p2->SetRichTextBuffer(m_richTextBufferPrinting);
     return DoPreview(p1, p2);
 }
+#endif // wxUSE_FFILE && wxUSE_STREAMS
 
 bool wxRichTextPrinting::PreviewBuffer(const wxRichTextBuffer& buffer)
 {
@@ -543,6 +541,7 @@ bool wxRichTextPrinting::PreviewBuffer(const wxRichTextBuffer& buffer)
     return DoPreview(p1, p2);
 }
 
+#if wxUSE_FFILE && wxUSE_STREAMS
 bool wxRichTextPrinting::PrintFile(const wxString& richTextFile, bool showPrintDialog)
 {
     SetRichTextBufferPrinting(new wxRichTextBuffer);
@@ -560,6 +559,7 @@ bool wxRichTextPrinting::PrintFile(const wxString& richTextFile, bool showPrintD
     delete p;
     return ret;
 }
+#endif // wxUSE_FFILE && wxUSE_STREAMS
 
 bool wxRichTextPrinting::PrintBuffer(const wxRichTextBuffer& buffer, bool showPrintDialog)
 {