-static int
-get_page_orientation (PSDocument *gs, int page)
-{
- int orientation;
-
- orientation = GTK_GS_ORIENTATION_NONE;
-
- if (gs->structured_doc) {
- orientation = gs->doc->pages[page].orientation;
- }
- if (orientation == GTK_GS_ORIENTATION_NONE) {
- orientation = gs->doc->default_page_orientation;
- }
- if (orientation == GTK_GS_ORIENTATION_NONE) {
- orientation = gs->doc->orientation;
- }
- if (orientation == GTK_GS_ORIENTATION_NONE) {
- orientation = GTK_GS_ORIENTATION_PORTRAIT;
- }
- if (gs->orientation != GTK_GS_ORIENTATION_NONE) {
- orientation = gs->orientation;
- }
-
- return orientation;
-}
-