diff options
author | Joren De Cuyper <jorendc@libreoffice.org> | 2014-07-03 14:01:10 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-21 08:29:34 +0000 |
commit | c38b40c0101e2607deb53690205fa889f06f3440 (patch) | |
tree | 8d848ca37f904b5b97fc2c146f5da974e10489c0 /sw | |
parent | 2420e776f728aee6171a8afe199ff84907152c39 (diff) |
fdo#80651 - Add 'Single Page' button to Page Preview Toolbar
Only Oxygen and Crystal theme need another icon then the 'adddirect' one.
Both themes have a 'sum' sign in that icon. Other themes shows a nice single
page icon.
Change-Id: I7db13014f6fa97b2a9474a66a27a70352ea69b29
Reviewed-on: https://gerrit.libreoffice.org/10053
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/cmdid.h | 1 | ||||
-rw-r--r-- | sw/sdi/swriter.sdi | 24 | ||||
-rw-r--r-- | sw/sdi/viewsh.sdi | 6 | ||||
-rw-r--r-- | sw/source/uibase/uiview/pview.cxx | 4 | ||||
-rw-r--r-- | sw/uiconfig/sglobal/toolbar/previewobjectbar.xml | 1 | ||||
-rw-r--r-- | sw/uiconfig/sweb/toolbar/previewobjectbar.xml | 1 | ||||
-rw-r--r-- | sw/uiconfig/swform/toolbar/previewobjectbar.xml | 1 | ||||
-rw-r--r-- | sw/uiconfig/swreport/toolbar/previewobjectbar.xml | 1 | ||||
-rw-r--r-- | sw/uiconfig/swriter/toolbar/previewobjectbar.xml | 1 | ||||
-rw-r--r-- | sw/uiconfig/swxform/toolbar/previewobjectbar.xml | 1 |
10 files changed, 41 insertions, 0 deletions
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index 3c036ba8b0c5..9a656a692f41 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -812,6 +812,7 @@ #define FN_PRINT_PAGEPREVIEW (FN_PGPREVIEW + 3) #define FN_CLOSE_PAGEPREVIEW (FN_PGPREVIEW + 4) #define FN_SHOW_BOOKVIEW (FN_PGPREVIEW + 5) +#define FN_SHOW_SINGLE_PAGE (FN_PGPREVIEW + 6) // Region: Setting Attributes #define FN_OPAQUE (FN_FRAME + 1) diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index fc78e4ab0a15..2d60dff53a18 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -7270,6 +7270,30 @@ SfxVoidItem ShowTwoPages FN_SHOW_TWO_PAGES GroupId = GID_VIEW; ] +SfxVoidItem ShowSinglePage FN_SHOW_SINGLE_PAGE +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = TRUE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_VIEW; +] + SfxBoolItem ShowBookview FN_SHOW_BOOKVIEW [ diff --git a/sw/sdi/viewsh.sdi b/sw/sdi/viewsh.sdi index 8f0735f9855d..db75fc1203e5 100644 --- a/sw/sdi/viewsh.sdi +++ b/sw/sdi/viewsh.sdi @@ -203,6 +203,12 @@ interface TextPrintPreview ExecMethod = Execute ; StateMethod = GetState ; ] + FN_SHOW_SINGLE_PAGE // status(final|play) + [ + ExecMethod = Execute ; + StateMethod = GetState ; + ] + FN_SHOW_MULTIPLE_PAGES // status(final|play) [ ExecMethod = Execute ; diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 62f49adb813d..049c2e06a304 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -739,6 +739,10 @@ void SwPagePreview::Execute( SfxRequest &rReq ) pViewWin->CalcWish( nRow, 2 ); break; + case FN_SHOW_SINGLE_PAGE: + pViewWin->CalcWish( nRow, 1 ); + break; + case FN_PREVIEW_ZOOM: case SID_ATTR_ZOOM: { diff --git a/sw/uiconfig/sglobal/toolbar/previewobjectbar.xml b/sw/uiconfig/sglobal/toolbar/previewobjectbar.xml index 36db7df7507a..9a1e05f383d4 100644 --- a/sw/uiconfig/sglobal/toolbar/previewobjectbar.xml +++ b/sw/uiconfig/sglobal/toolbar/previewobjectbar.xml @@ -24,6 +24,7 @@ <toolbar:toolbaritem xlink:href=".uno:GoToStartOfDoc" toolbar:helpid="20907"/> <toolbar:toolbaritem xlink:href=".uno:GoToEndOfDoc" toolbar:helpid="20908"/> <toolbar:toolbarseparator/> + <toolbar:toolbaritem xlink:href=".uno:ShowSinglePage"/> <toolbar:toolbaritem xlink:href=".uno:ShowTwoPages" toolbar:helpid="21251"/> <toolbar:toolbaritem xlink:href=".uno:ShowMultiplePages" toolbar:helpid="21252"/> <toolbar:toolbaritem xlink:href=".uno:ShowBookview"/> diff --git a/sw/uiconfig/sweb/toolbar/previewobjectbar.xml b/sw/uiconfig/sweb/toolbar/previewobjectbar.xml index 1cd4f9b9f723..f0f67aae0b72 100644 --- a/sw/uiconfig/sweb/toolbar/previewobjectbar.xml +++ b/sw/uiconfig/sweb/toolbar/previewobjectbar.xml @@ -24,6 +24,7 @@ <toolbar:toolbaritem xlink:href=".uno:GoToStartOfDoc" toolbar:helpid="20907"/> <toolbar:toolbaritem xlink:href=".uno:GoToEndOfDoc" toolbar:helpid="20908"/> <toolbar:toolbarseparator/> + <toolbar:toolbaritem xlink:href=".uno:ShowSinglePage"/> <toolbar:toolbaritem xlink:href=".uno:ShowTwoPages" toolbar:helpid="21251"/> <toolbar:toolbaritem xlink:href=".uno:ShowMultiplePages" toolbar:helpid="21252"/> <toolbar:toolbaritem xlink:href=".uno:ShowBookview"/> diff --git a/sw/uiconfig/swform/toolbar/previewobjectbar.xml b/sw/uiconfig/swform/toolbar/previewobjectbar.xml index 36db7df7507a..9a1e05f383d4 100644 --- a/sw/uiconfig/swform/toolbar/previewobjectbar.xml +++ b/sw/uiconfig/swform/toolbar/previewobjectbar.xml @@ -24,6 +24,7 @@ <toolbar:toolbaritem xlink:href=".uno:GoToStartOfDoc" toolbar:helpid="20907"/> <toolbar:toolbaritem xlink:href=".uno:GoToEndOfDoc" toolbar:helpid="20908"/> <toolbar:toolbarseparator/> + <toolbar:toolbaritem xlink:href=".uno:ShowSinglePage"/> <toolbar:toolbaritem xlink:href=".uno:ShowTwoPages" toolbar:helpid="21251"/> <toolbar:toolbaritem xlink:href=".uno:ShowMultiplePages" toolbar:helpid="21252"/> <toolbar:toolbaritem xlink:href=".uno:ShowBookview"/> diff --git a/sw/uiconfig/swreport/toolbar/previewobjectbar.xml b/sw/uiconfig/swreport/toolbar/previewobjectbar.xml index 36db7df7507a..9a1e05f383d4 100644 --- a/sw/uiconfig/swreport/toolbar/previewobjectbar.xml +++ b/sw/uiconfig/swreport/toolbar/previewobjectbar.xml @@ -24,6 +24,7 @@ <toolbar:toolbaritem xlink:href=".uno:GoToStartOfDoc" toolbar:helpid="20907"/> <toolbar:toolbaritem xlink:href=".uno:GoToEndOfDoc" toolbar:helpid="20908"/> <toolbar:toolbarseparator/> + <toolbar:toolbaritem xlink:href=".uno:ShowSinglePage"/> <toolbar:toolbaritem xlink:href=".uno:ShowTwoPages" toolbar:helpid="21251"/> <toolbar:toolbaritem xlink:href=".uno:ShowMultiplePages" toolbar:helpid="21252"/> <toolbar:toolbaritem xlink:href=".uno:ShowBookview"/> diff --git a/sw/uiconfig/swriter/toolbar/previewobjectbar.xml b/sw/uiconfig/swriter/toolbar/previewobjectbar.xml index 36db7df7507a..9a1e05f383d4 100644 --- a/sw/uiconfig/swriter/toolbar/previewobjectbar.xml +++ b/sw/uiconfig/swriter/toolbar/previewobjectbar.xml @@ -24,6 +24,7 @@ <toolbar:toolbaritem xlink:href=".uno:GoToStartOfDoc" toolbar:helpid="20907"/> <toolbar:toolbaritem xlink:href=".uno:GoToEndOfDoc" toolbar:helpid="20908"/> <toolbar:toolbarseparator/> + <toolbar:toolbaritem xlink:href=".uno:ShowSinglePage"/> <toolbar:toolbaritem xlink:href=".uno:ShowTwoPages" toolbar:helpid="21251"/> <toolbar:toolbaritem xlink:href=".uno:ShowMultiplePages" toolbar:helpid="21252"/> <toolbar:toolbaritem xlink:href=".uno:ShowBookview"/> diff --git a/sw/uiconfig/swxform/toolbar/previewobjectbar.xml b/sw/uiconfig/swxform/toolbar/previewobjectbar.xml index 36db7df7507a..9a1e05f383d4 100644 --- a/sw/uiconfig/swxform/toolbar/previewobjectbar.xml +++ b/sw/uiconfig/swxform/toolbar/previewobjectbar.xml @@ -24,6 +24,7 @@ <toolbar:toolbaritem xlink:href=".uno:GoToStartOfDoc" toolbar:helpid="20907"/> <toolbar:toolbaritem xlink:href=".uno:GoToEndOfDoc" toolbar:helpid="20908"/> <toolbar:toolbarseparator/> + <toolbar:toolbaritem xlink:href=".uno:ShowSinglePage"/> <toolbar:toolbaritem xlink:href=".uno:ShowTwoPages" toolbar:helpid="21251"/> <toolbar:toolbaritem xlink:href=".uno:ShowMultiplePages" toolbar:helpid="21252"/> <toolbar:toolbaritem xlink:href=".uno:ShowBookview"/> |