diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-02-03 20:05:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-02-04 14:39:37 +0000 |
commit | 774fa68764b01aad9c79d2ca73f78758f3a99972 (patch) | |
tree | fbd1eed1dafd501df3fe19f6548cf63f8951dfb0 /sd | |
parent | d584e2dcc0454e66151d888fb45c23ccb1634aa6 (diff) |
flatten STR_IMPRESS_PRINT_UI_OPTIONS resource
Change-Id: Icef2a5ae31973c09620112dba062525d42bdd227
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/glob.hrc | 2 | ||||
-rw-r--r-- | sd/source/ui/inc/strings.hrc | 31 | ||||
-rw-r--r-- | sd/source/ui/view/DocumentRenderer.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/view/DocumentRenderer.hrc | 54 | ||||
-rw-r--r-- | sd/source/ui/view/DocumentRenderer.src | 299 |
5 files changed, 183 insertions, 213 deletions
diff --git a/sd/inc/glob.hrc b/sd/inc/glob.hrc index 2296eec4d0dd..da77cce52077 100644 --- a/sd/inc/glob.hrc +++ b/sd/inc/glob.hrc @@ -22,7 +22,7 @@ #include <sfx2/sfx.hrc> -#define RID_GLOB_START RID_APP_START+750 +#define RID_GLOB_START RID_APP_START+1000 #define STR_LAYER_BCKGRND RID_GLOB_START #define STR_LAYER_BCKGRNDOBJ RID_GLOB_START+1 diff --git a/sd/source/ui/inc/strings.hrc b/sd/source/ui/inc/strings.hrc index c99591b4cb4b..b131a8d81ca0 100644 --- a/sd/source/ui/inc/strings.hrc +++ b/sd/source/ui/inc/strings.hrc @@ -417,6 +417,37 @@ #define STR_INSERT_3D_MODEL_TITLE (RID_APP_START+732) #define STR_INSERT_3D_MODEL_ALL_SUPPORTED_FORMATS (RID_APP_START+733) +#define STR_IMPRESS_PRINT_UI_GROUP_NAME (RID_APP_START+734) +#define STR_IMPRESS_PRINT_UI_PRINT_CONTENT (RID_APP_START+735) +#define STR_IMPRESS_PRINT_UI_PRINT_GROUP (RID_APP_START+736) +#define STR_IMPRESS_PRINT_UI_CONTENT (RID_APP_START+737) +#define STR_IMPRESS_PRINT_UI_CONTENT_CHOICES (RID_APP_START+738) +#define STR_IMPRESS_PRINT_UI_SLIDESPERPAGE (RID_APP_START+739) +#define STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES (RID_APP_START+740) +#define STR_IMPRESS_PRINT_UI_ORDER (RID_APP_START+741) +#define STR_IMPRESS_PRINT_UI_ORDER_CHOICES (RID_APP_START+742) +#define STR_IMPRESS_PRINT_UI_INCLUDE_CONTENT (RID_APP_START+743) +#define STR_IMPRESS_PRINT_UI_IS_PRINT_NAME (RID_APP_START+744) +#define STR_IMPRESS_PRINT_UI_IS_PRINT_DATE (RID_APP_START+745) +#define STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN (RID_APP_START+746) +#define STR_IMPRESS_PRINT_UI_OUTPUT_OPTIONS_GROUP (RID_APP_START+747) +#define STR_IMPRESS_PRINT_UI_QUALITY (RID_APP_START+748) +#define STR_IMPRESS_PRINT_UI_QUALITY_CHOICES (RID_APP_START+749) +#define STR_IMPRESS_PRINT_UI_PAGE_OPTIONS (RID_APP_START+750) +#define STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES (RID_APP_START+751) +#define STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW (RID_APP_START+752) +#define STR_IMPRESS_PRINT_UI_BROCHURE (RID_APP_START+753) +#define STR_IMPRESS_PRINT_UI_PAGE_SIDES (RID_APP_START+754) +#define STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE (RID_APP_START+755) +#define STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST (RID_APP_START+756) +#define STR_IMPRESS_PRINT_UI_PAPER_TRAY_GROUP (RID_APP_START+757) +#define STR_IMPRESS_PRINT_UI_PAPER_TRAY (RID_APP_START+758) +#define STR_IMPRESS_PRINT_UI_PAGE_RANGE (RID_APP_START+759) +#define STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE (RID_APP_START+760) +#define STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE (RID_APP_START+761) +#define STR_DRAW_PRINT_UI_IS_PRINT_NAME (RID_APP_START+762) + + /****************************************************************************** * The ids in glob.hrc start at RID_APP_START+750! ******************************************************************************/ diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index e08eac833ed5..66504cb4f777 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -20,7 +20,6 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include "DocumentRenderer.hxx" -#include "DocumentRenderer.hrc" #include "drawdoc.hxx" #include "optsitem.hxx" @@ -329,15 +328,14 @@ namespace { rPrinter.SetFont(aOriginalFont); } - /** Read the resource file and process it into a sequence of properties + /** Read the resources and process then into a sequence of properties that can be passed to the printing dialog. */ - class DialogCreator : public Resource + class DialogCreator { public: DialogCreator (ViewShellBase &rBase, bool bImpress, sal_Int32 nCurPage) - : Resource(SdResId(STR_IMPRESS_PRINT_UI_OPTIONS)) - , mrBase(rBase) + : mrBase(rBase) , mbImpress(bImpress) , mnCurPage(nCurPage) { @@ -622,8 +620,6 @@ namespace { AddDialogControl(vcl::PrinterOptionsHelper::setEditControlOpt("pagerange", "", ".HelpID:vcl:PrintDialog:PageRange:Edit", "PageRange", aPageRange, aPageRangeOpt)); - - FreeResource(); } void AddDialogControl( const Any& i_rCtrl ) diff --git a/sd/source/ui/view/DocumentRenderer.hrc b/sd/source/ui/view/DocumentRenderer.hrc deleted file mode 100644 index 1261ca558fd7..000000000000 --- a/sd/source/ui/view/DocumentRenderer.hrc +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#define STR_IMPRESS_PRINT_UI_OPTIONS 32001 -#define STR_IMPRESS_PRINT_UI_GROUP_NAME 1 -#define STR_IMPRESS_PRINT_UI_PRINT_CONTENT 2 -#define STR_IMPRESS_PRINT_UI_PRINT_GROUP 3 -#define STR_IMPRESS_PRINT_UI_CONTENT 4 -#define STR_IMPRESS_PRINT_UI_CONTENT_CHOICES 6 -#define STR_IMPRESS_PRINT_UI_SLIDESPERPAGE 7 -#define STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES 8 -#define STR_IMPRESS_PRINT_UI_ORDER 10 -#define STR_IMPRESS_PRINT_UI_ORDER_CHOICES 11 -#define STR_IMPRESS_PRINT_UI_INCLUDE_CONTENT 13 -#define STR_IMPRESS_PRINT_UI_IS_PRINT_NAME 14 -#define STR_IMPRESS_PRINT_UI_IS_PRINT_DATE 16 -#define STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN 20 - -#define STR_IMPRESS_PRINT_UI_OUTPUT_OPTIONS_GROUP 22 -#define STR_IMPRESS_PRINT_UI_QUALITY 23 -#define STR_IMPRESS_PRINT_UI_QUALITY_CHOICES 24 -#define STR_IMPRESS_PRINT_UI_PAGE_OPTIONS 26 -#define STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES 27 -#define STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW 28 -#define STR_IMPRESS_PRINT_UI_BROCHURE 30 -#define STR_IMPRESS_PRINT_UI_PAGE_SIDES 32 -#define STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE 33 -#define STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST 35 -#define STR_IMPRESS_PRINT_UI_PAPER_TRAY_GROUP 37 -#define STR_IMPRESS_PRINT_UI_PAPER_TRAY 38 - -#define STR_IMPRESS_PRINT_UI_PAGE_RANGE 40 -#define STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE 41 -#define STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE 43 - -#define STR_DRAW_PRINT_UI_IS_PRINT_NAME 44 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/view/DocumentRenderer.src b/sd/source/ui/view/DocumentRenderer.src index ed0b8517dbf1..7e7e7ee08799 100644 --- a/sd/source/ui/view/DocumentRenderer.src +++ b/sd/source/ui/view/DocumentRenderer.src @@ -18,178 +18,175 @@ */ #include "app.hrc" -#include "DocumentRenderer.hrc" +#include "strings.hrc" -Resource STR_IMPRESS_PRINT_UI_OPTIONS +String STR_IMPRESS_PRINT_UI_GROUP_NAME { - String STR_IMPRESS_PRINT_UI_GROUP_NAME - { - Text [en-US] = "%PRODUCTNAME %s"; - }; - String STR_IMPRESS_PRINT_UI_PRINT_CONTENT - { - Text [ en-US ] = "Print content"; - }; - String STR_IMPRESS_PRINT_UI_PRINT_GROUP - { - Text [ en-US ] = "Print"; - }; - String STR_IMPRESS_PRINT_UI_CONTENT - { - Text [ en-US ] = "Document"; - }; - StringArray STR_IMPRESS_PRINT_UI_CONTENT_CHOICES - { - ItemList [ en-US ] = - { - < "Slides" ; > ; - < "Handouts" ; > ; - < "Notes" ; > ; - < "Outline" ; > ; - }; - }; - String STR_IMPRESS_PRINT_UI_SLIDESPERPAGE - { - Text [ en-US ] = "Slides per page" ; - }; - StringArray STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES - { - ItemList [ en-US ] = - { - < "According to layout" ; > ; - < "1" ; > ; - < "2" ; > ; - < "3" ; > ; - < "4" ; > ; - < "6" ; > ; - < "9" ; > ; - }; - }; - String STR_IMPRESS_PRINT_UI_ORDER - { - Text [ en-US ] = "Order" ; - }; - StringArray STR_IMPRESS_PRINT_UI_ORDER_CHOICES - { - ItemList [ en-US ] = - { - < "Left to right, then down" ; > ; - < "Top to bottom, then right" ; > ; - }; - }; - String STR_IMPRESS_PRINT_UI_INCLUDE_CONTENT - { - Text [ en-US ] = "~Contents"; - }; - String STR_IMPRESS_PRINT_UI_IS_PRINT_NAME - { - Text [ en-US ] = "~Slide name"; - }; - String STR_DRAW_PRINT_UI_IS_PRINT_NAME - { - Text [ en-US ] = "P~age name"; - }; - String STR_IMPRESS_PRINT_UI_IS_PRINT_DATE - { - Text [ en-US ] = "~Date and time"; - }; - String STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN - { - Text [ en-US ] = "Hidden pages"; - }; - String STR_IMPRESS_PRINT_UI_OUTPUT_OPTIONS_GROUP - { - Text [ en-US ] = "Output options"; - }; - String STR_IMPRESS_PRINT_UI_QUALITY - { - Text [ en-US ] = "Color"; - }; - StringArray STR_IMPRESS_PRINT_UI_QUALITY_CHOICES - { - ItemList [ en-US ] = - { - < "Original colors" ; > ; - < "Grayscale" ; > ; - < "Black & white" ; > ; - }; - }; - String STR_IMPRESS_PRINT_UI_PAGE_OPTIONS + Text [en-US] = "%PRODUCTNAME %s"; +}; +String STR_IMPRESS_PRINT_UI_PRINT_CONTENT +{ + Text [ en-US ] = "Print content"; +}; +String STR_IMPRESS_PRINT_UI_PRINT_GROUP +{ + Text [ en-US ] = "Print"; +}; +String STR_IMPRESS_PRINT_UI_CONTENT +{ + Text [ en-US ] = "Document"; +}; +StringArray STR_IMPRESS_PRINT_UI_CONTENT_CHOICES +{ + ItemList [ en-US ] = { - Text [ en-US ] = "~Size"; + < "Slides" ; > ; + < "Handouts" ; > ; + < "Notes" ; > ; + < "Outline" ; > ; }; - StringArray STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES +}; +String STR_IMPRESS_PRINT_UI_SLIDESPERPAGE +{ + Text [ en-US ] = "Slides per page" ; +}; +StringArray STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES +{ + ItemList [ en-US ] = { - ItemList [ en-US ] = - { - < "Original size" ; > ; - < "Fit to printable page" ; > ; - < "Distribute on multiple sheets of paper" ; > ; - < "Tile sheet of paper with repeated slides" ; > ; - }; + < "According to layout" ; > ; + < "1" ; > ; + < "2" ; > ; + < "3" ; > ; + < "4" ; > ; + < "6" ; > ; + < "9" ; > ; }; - StringArray STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW +}; +String STR_IMPRESS_PRINT_UI_ORDER +{ + Text [ en-US ] = "Order" ; +}; +StringArray STR_IMPRESS_PRINT_UI_ORDER_CHOICES +{ + ItemList [ en-US ] = { - ItemList [ en-US ] = - { - < "Original size" ; > ; - < "Fit to printable page" ; > ; - < "Distribute on multiple sheets of paper" ; > ; - < "Tile sheet of paper with repeated pages" ; > ; - }; + < "Left to right, then down" ; > ; + < "Top to bottom, then right" ; > ; }; - String STR_IMPRESS_PRINT_UI_BROCHURE +}; +String STR_IMPRESS_PRINT_UI_INCLUDE_CONTENT +{ + Text [ en-US ] = "~Contents"; +}; +String STR_IMPRESS_PRINT_UI_IS_PRINT_NAME +{ + Text [ en-US ] = "~Slide name"; +}; +String STR_DRAW_PRINT_UI_IS_PRINT_NAME +{ + Text [ en-US ] = "P~age name"; +}; +String STR_IMPRESS_PRINT_UI_IS_PRINT_DATE +{ + Text [ en-US ] = "~Date and time"; +}; +String STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN +{ + Text [ en-US ] = "Hidden pages"; +}; +String STR_IMPRESS_PRINT_UI_OUTPUT_OPTIONS_GROUP +{ + Text [ en-US ] = "Output options"; +}; +String STR_IMPRESS_PRINT_UI_QUALITY +{ + Text [ en-US ] = "Color"; +}; +StringArray STR_IMPRESS_PRINT_UI_QUALITY_CHOICES +{ + ItemList [ en-US ] = { - Text [en-US] = "Brochure"; + < "Original colors" ; > ; + < "Grayscale" ; > ; + < "Black & white" ; > ; }; - String STR_IMPRESS_PRINT_UI_PAGE_SIDES +}; +String STR_IMPRESS_PRINT_UI_PAGE_OPTIONS +{ + Text [ en-US ] = "~Size"; +}; +StringArray STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES +{ + ItemList [ en-US ] = { - Text [ en-US ] = "Page sides"; + < "Original size" ; > ; + < "Fit to printable page" ; > ; + < "Distribute on multiple sheets of paper" ; > ; + < "Tile sheet of paper with repeated slides" ; > ; }; - String STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE +}; +StringArray STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW +{ + ItemList [ en-US ] = { - Text [ en-US ] = "Include"; + < "Original size" ; > ; + < "Fit to printable page" ; > ; + < "Distribute on multiple sheets of paper" ; > ; + < "Tile sheet of paper with repeated pages" ; > ; }; - StringArray STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST +}; +String STR_IMPRESS_PRINT_UI_BROCHURE +{ + Text [en-US] = "Brochure"; +}; +String STR_IMPRESS_PRINT_UI_PAGE_SIDES +{ + Text [ en-US ] = "Page sides"; +}; +String STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE +{ + Text [ en-US ] = "Include"; +}; +StringArray STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST +{ + ItemList [ en-US ] = { - ItemList [ en-US ] = - { - < "All pages" ; > ; - < "Front sides / right pages" ; > ; - < "Back sides / left pages" ; > ; - }; + < "All pages" ; > ; + < "Front sides / right pages" ; > ; + < "Back sides / left pages" ; > ; }; +}; - String STR_IMPRESS_PRINT_UI_PAPER_TRAY_GROUP - { - Text [ en-US ] = "Paper tray"; - }; - String STR_IMPRESS_PRINT_UI_PAPER_TRAY - { - Text [ en-US ] = "~Use only paper tray from printer preferences"; - }; - String STR_IMPRESS_PRINT_UI_PAGE_RANGE - { - Text [en-US] = "Print range"; - }; - StringArray STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE +String STR_IMPRESS_PRINT_UI_PAPER_TRAY_GROUP +{ + Text [ en-US ] = "Paper tray"; +}; +String STR_IMPRESS_PRINT_UI_PAPER_TRAY +{ + Text [ en-US ] = "~Use only paper tray from printer preferences"; +}; +String STR_IMPRESS_PRINT_UI_PAGE_RANGE +{ + Text [en-US] = "Print range"; +}; +StringArray STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE +{ + ItemList [ en-US ] = { - ItemList [ en-US ] = - { - < "~All slides"; >; - < "~Slides"; >; - < "Se~lection"; >; - }; + < "~All slides"; >; + < "~Slides"; >; + < "Se~lection"; >; }; +}; - StringArray STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE +StringArray STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE +{ + ItemList [ en-US ] = { - ItemList [ en-US ] = - { - < "~All pages"; >; - < "Pa~ges"; >; - < "Se~lection"; >; - }; + < "~All pages"; >; + < "Pa~ges"; >; + < "Se~lection"; >; }; }; |