[TD]fix PrintAll output to printer

This commit is contained in:
wandererfan
2022-09-12 15:07:38 -04:00
committed by WandererFan
parent 1ac102e1d0
commit f337a0f9d4
3 changed files with 39 additions and 25 deletions

View File

@@ -235,6 +235,7 @@ double DrawPage::getPageHeight() const
throw Base::RuntimeError("Template not set for Page");
}
//orientation as text
const char * DrawPage::getPageOrientation() const
{
App::DocumentObject *obj;
@@ -250,6 +251,22 @@ const char * DrawPage::getPageOrientation() const
throw Base::RuntimeError("Template not set for Page");
}
//orientation as 0(Portrait) or 1(Landscape)
int DrawPage::getOrientation() const
{
App::DocumentObject *obj;
obj = Template.getValue();
if(obj) {
if(obj->isDerivedFrom(TechDraw::DrawTemplate::getClassTypeId())) {
TechDraw::DrawTemplate *templ = static_cast<TechDraw::DrawTemplate *>(obj);
return templ->Orientation.getValue();
}
}
throw Base::RuntimeError("Template not set for Page");
}
int DrawPage::addView(App::DocumentObject *docObj)
{
if(!docObj->isDerivedFrom(TechDraw::DrawView::getClassTypeId()))