summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview/pview.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/uiview/pview.cxx')
-rw-r--r--sw/source/uibase/uiview/pview.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index ee4f6a767188..2a9018834aeb 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -334,6 +334,7 @@ bool SwPagePreviewWin::MovePage( int eMoveMode )
nNewSttPage = nPageCount;
SetSelectedPage( nPageCount );
break;
+
case MV_SELPAGE:
// <nNewSttPage> and <SelectedPage()> are already set.
// not start at first column, only if the
@@ -880,6 +881,24 @@ void SwPagePreview::Execute( SfxRequest &rReq )
_ExecPgUpAndPgDown( rReq.GetSlot() == FN_PAGEUP, &rReq );
break;
}
+ case SID_JUMP_TO_SPECIFIC_PAGE:
+ {
+ sal_uInt16 nPageNum = 1;
+ const SfxItemSet *pArgs = rReq.GetArgs();
+ if( pArgs && pArgs->Count())
+ {
+ nPageNum = static_cast<const SfxUInt16Item &>(pArgs->Get(SID_JUMP_TO_SPECIFIC_PAGE)).GetValue();
+
+ if( nPageNum > 0 && nPageNum <= mnPageCount )
+ {
+ pViewWin->SetSttPage( nPageNum);
+ pViewWin->SetSelectedPage( nPageNum );
+ ChgPage( SwPagePreviewWin::MV_SPECIFIC_PAGE, false );
+ ScrollViewSzChg();
+ }
+ }
+ }
+ break;
case FN_START_OF_LINE:
case FN_START_OF_DOCUMENT:
pViewWin->SetSelectedPage( 1 );