[Libreoffice-commits] core.git: 2 commits - sd/inc sd/source sw/source

Caolán McNamara caolanm at redhat.com
Sat Feb 4 14:40:21 UTC 2017


 sd/inc/glob.hrc                        |    2 
 sd/source/ui/inc/strings.hrc           |   31 +++
 sd/source/ui/view/DocumentRenderer.cxx |   10 -
 sd/source/ui/view/DocumentRenderer.hrc |   54 -----
 sd/source/ui/view/DocumentRenderer.src |  299 ++++++++++++++++-----------------
 sw/source/uibase/utlui/initui.cxx      |    8 
 6 files changed, 183 insertions(+), 221 deletions(-)

New commits:
commit fa9c00760bd6ab39437cee6bc112024009e67b58
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Feb 3 20:11:04 2017 +0000

    this windows-only quote replacement looks out of date
    
    its there since initial checkin and I rather feel things
    have moved on since then
    
    Change-Id: Iea3aa1c5a1637cecdd18539987ef8b84db095e9a

diff --git a/sw/source/uibase/utlui/initui.cxx b/sw/source/uibase/utlui/initui.cxx
index 8713459..ab67b03 100644
--- a/sw/source/uibase/utlui/initui.cxx
+++ b/sw/source/uibase/utlui/initui.cxx
@@ -290,18 +290,10 @@ ImpAutoFormatNameListLoader::ImpAutoFormatNameListLoader( std::vector<OUString>&
         OUString p(ResId(n + 1, *pSwResMgr));
         if(STR_AUTOFMTREDL_TYPO == n)
         {
-#ifdef _WIN32
-            // For Windows, a special treatment is necessary because MS has
-            // forgotten some characters in the dialog font here.
-            p = p.replaceFirst("%1", ",,");
-            p = p.replaceFirst("%2", "''");
-#else
             const SvtSysLocale aSysLocale;
             const LocaleDataWrapper& rLclD = aSysLocale.GetLocaleData();
-            // With real operating systems it also works without special handling.
             p = p.replaceFirst("%1", rLclD.getDoubleQuotationMarkStart());
             p = p.replaceFirst("%2", rLclD.getDoubleQuotationMarkEnd());
-#endif
         }
         rLst.insert(rLst.begin() + n, p);
     }
commit 774fa68764b01aad9c79d2ca73f78758f3a99972
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Feb 3 20:05:03 2017 +0000

    flatten STR_IMPRESS_PRINT_UI_OPTIONS resource
    
    Change-Id: Icef2a5ae31973c09620112dba062525d42bdd227

diff --git a/sd/inc/glob.hrc b/sd/inc/glob.hrc
index 2296eec..da77cce 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 c99591b..b131a8d 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 e08eac8..66504cb 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 1261ca5..0000000
--- 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 ed0b851..7e7e7ee 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"; >;
     };
 };
 


More information about the Libreoffice-commits mailing list