Printers, fix page orientation when user has not changed job options of cups printer

git-svn-id: trunk@19003 -
This commit is contained in:
jesus 2009-03-15 18:34:22 +00:00
parent d92087e835
commit 36cd39a33d

View File

@ -757,7 +757,9 @@ begin
i:=GetAttributeInteger('orientation-requested-default',3); i:=GetAttributeInteger('orientation-requested-default',3);
//Get selected orientation or Default if not defined //Get selected orientation or Default if not defined
i:=StrToIntDef(cupsGetOption('orientation-requested'),i); i:=StrToIntDef(cupsGetOption('orientation-requested'),i);
//Calc result // check if rotation is automatic or out-of-range
if not (i in [3,4,5,6]) then
i:=3; // yep, then for us this means portait
fCachedOrientation:=TPrinterOrientation(i-3); fCachedOrientation:=TPrinterOrientation(i-3);
end; end;
{$IFDEF UseCache} {$IFDEF UseCache}