diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Editor.cxx | 7 | ||||
| -rw-r--r-- | src/Editor.h | 8 | 
2 files changed, 9 insertions, 6 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index b71d451b3..fcfc04998 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3750,10 +3750,10 @@ long Editor::FormatRange(bool draw, Sci_RangeToFormat *pfr) {  	if (!pfr)  		return 0; -	AutoSurface surface(pfr->hdc, this); +	AutoSurface surface(pfr->hdc, this, SC_TECHNOLOGY_DEFAULT);  	if (!surface)  		return 0; -	AutoSurface surfaceMeasure(pfr->hdcTarget, this); +	AutoSurface surfaceMeasure(pfr->hdcTarget, this, SC_TECHNOLOGY_DEFAULT);  	if (!surfaceMeasure) {  		return 0;  	} @@ -3762,6 +3762,7 @@ long Editor::FormatRange(bool draw, Sci_RangeToFormat *pfr) {  	posCache.Clear();  	ViewStyle vsPrint(vs); +	vsPrint.technology = SC_TECHNOLOGY_DEFAULT;  	// Modify the view style for printing as do not normally want any of the transient features to be printed  	// Printing supports only the line number margin. @@ -3776,6 +3777,8 @@ long Editor::FormatRange(bool draw, Sci_RangeToFormat *pfr) {  	vsPrint.showMarkedLines = false;  	vsPrint.fixedColumnWidth = 0;  	vsPrint.zoomLevel = printMagnification; +	// Don't show indentation guides +	// If this ever gets changed, cached pixmap would need to be recreated if technology != SC_TECHNOLOGY_DEFAULT  	vsPrint.viewIndentationGuides = ivNone;  	// Don't show the selection when printing  	vsPrint.selbackset = false; diff --git a/src/Editor.h b/src/Editor.h index b407789a1..bdb0f6b30 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -572,9 +572,9 @@ class AutoSurface {  private:  	Surface *surf;  public: -	AutoSurface(Editor *ed) : surf(0) { +	AutoSurface(Editor *ed, int technology = -1) : surf(0) {  		if (ed->wMain.GetID()) { -			surf = Surface::Allocate(ed->technology); +			surf = Surface::Allocate(technology != -1 ? technology : ed->technology);  			if (surf) {  				surf->Init(ed->wMain.GetID());  				surf->SetUnicodeMode(SC_CP_UTF8 == ed->CodePage()); @@ -582,9 +582,9 @@ public:  			}  		}  	} -	AutoSurface(SurfaceID sid, Editor *ed) : surf(0) { +	AutoSurface(SurfaceID sid, Editor *ed, int technology = -1) : surf(0) {  		if (ed->wMain.GetID()) { -			surf = Surface::Allocate(ed->technology); +			surf = Surface::Allocate(technology != -1 ? technology : ed->technology);  			if (surf) {  				surf->Init(sid, ed->wMain.GetID());  				surf->SetUnicodeMode(SC_CP_UTF8 == ed->CodePage());  | 
