summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextcontrol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text/qtextcontrol.cpp')
-rw-r--r--src/gui/text/qtextcontrol.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index 03845deb38..d280a67a1b 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -60,6 +60,7 @@
#include "qtextdocumentwriter.h"
#include "private/qtextcursor_p.h"
#include "qpagedpaintdevice.h"
+#include "private/qpagedpaintdevice_p.h"
#include <qtextformat.h>
#include <qdatetime.h>
@@ -2237,9 +2238,7 @@ void QTextControl::print(QPagedPaintDevice *printer) const
return;
QTextDocument *tempDoc = 0;
const QTextDocument *doc = d->doc;
- // ####
-#if 0
- if (printer->printRange() == QPrinter::Selection) {
+ if (QPagedPaintDevicePrivate::get(printer)->printSelectionOnly) {
if (!d->cursor.hasSelection())
return;
tempDoc = new QTextDocument(const_cast<QTextDocument *>(doc));
@@ -2253,7 +2252,6 @@ void QTextControl::print(QPagedPaintDevice *printer) const
// copy the custom object handlers
doc->documentLayout()->d_func()->handlers = d->doc->documentLayout()->d_func()->handlers;
}
-#endif
doc->print(printer);
delete tempDoc;
}