[Libreoffice-commits] core.git: sw/AllLangResTarget_sw.mk sw/source sw/uiconfig

Caolán McNamara caolanm at redhat.com
Fri Aug 23 04:42:16 PDT 2013


 sw/AllLangResTarget_sw.mk               |    1 
 sw/source/ui/config/optcomp.cxx         |    9 --
 sw/source/ui/config/optcomp.hrc         |   48 -----------
 sw/source/ui/config/optcomp.src         |  131 --------------------------------
 sw/uiconfig/swriter/ui/optcompatpage.ui |  116 ++++++++++++++++++++++++++++
 5 files changed, 120 insertions(+), 185 deletions(-)

New commits:
commit 17d5f351610d0a10bde09621aeda8fdf6878394d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Aug 23 12:40:05 2013 +0100

    fix up compat ids
    
    Change-Id: Id783db750885404457e0c4f96eca74c39ec63394

diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk
index 5305e4d..67bb0b4 100644
--- a/sw/AllLangResTarget_sw.mk
+++ b/sw/AllLangResTarget_sw.mk
@@ -69,7 +69,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
     sw/source/ui/app/mn.src \
     sw/source/ui/chrdlg/chrdlg.src \
     sw/source/ui/config/mailconfigpage.src \
-    sw/source/ui/config/optcomp.src \
     sw/source/ui/config/optdlg.src \
     sw/source/ui/config/optload.src \
     sw/source/ui/dbui/addresslistdialog.src \
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index aaab82f..5b3e990 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -26,7 +26,6 @@
 #include "view.hxx"
 #include "wrtsh.hxx"
 
-#include "optcomp.hrc"
 #include "globals.hrc"
 #include <unotools/configmgr.hxx>
 #include <vcl/layout.hxx>
@@ -114,10 +113,10 @@ SwCompatibilityOptPage::SwCompatibilityOptPage(Window* pParent, const SfxItemSet
     for (sal_uInt16 nId = COPT_USE_PRINTERDEVICE; nId <= COPT_EXPAND_WORDSPACE; ++nId)
     {
         String sEntry = m_pFormattingLB->GetEntry(nId);
-        if ( STR_TAB_ALIGNMENT == nId ||
-             STR_LINE_SPACING == nId ||
-             STR_USE_OBJPOSITIONING == nId ||
-             STR_USE_OURTEXTWRAPPING == nId )
+        if ( COPT_USE_OUR_TABSTOPS == nId ||
+             COPT_USE_LINESPACING == nId ||
+             COPT_USE_OBJECTPOSITIONING == nId ||
+             COPT_USE_OUR_TEXTWRAPPING == nId )
             ReplaceFormatName( sEntry );
         SvTreeListEntry* pEntry = m_pOptionsLB->SvTreeListBox::InsertEntry( sEntry );
         if ( pEntry )
diff --git a/sw/source/ui/config/optcomp.hrc b/sw/source/ui/config/optcomp.hrc
deleted file mode 100644
index 6f07218..0000000
--- a/sw/source/ui/config/optcomp.hrc
+++ /dev/null
@@ -1,48 +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 .
- */
-
-// the controls
-
-#define FL_MAIN         10
-#define FT_FORMATTING   11
-#define LB_FORMATTING   12
-#define FT_OPTIONS      13
-#define LB_OPTIONS      14
-#define PB_RESET        15
-#define PB_DEFAULT      16
-
-// the option strings
-
-#define STR_USERENTRY                   10
-
-#define STR_COMP_OPTIONS_START          100
-#define STR_PRINTER_METRICS             (STR_COMP_OPTIONS_START + 0)
-#define STR_MERGE_PARA_DIST             (STR_COMP_OPTIONS_START + 1)
-#define STR_MERGE_PARA_DIST_PAGESTART   (STR_COMP_OPTIONS_START + 2)
-#define STR_TAB_ALIGNMENT               (STR_COMP_OPTIONS_START + 3)
-#define STR_EXTERNAL_LEADING            (STR_COMP_OPTIONS_START + 4)
-#define STR_LINE_SPACING                (STR_COMP_OPTIONS_START + 5)
-#define STR_ADD_TABLESPACING            (STR_COMP_OPTIONS_START + 6)
-#define STR_USE_OBJPOSITIONING          (STR_COMP_OPTIONS_START + 7)
-#define STR_USE_OURTEXTWRAPPING         (STR_COMP_OPTIONS_START + 8)
-#define STR_CONSIDER_WRAPPINGSTYLE      (STR_COMP_OPTIONS_START + 9)
-#define STR_EXPAND_WORDSPACE            (STR_COMP_OPTIONS_START + 10)
-#define STR_COMP_OPTIONS_END            (STR_EXPAND_WORDSPACE + 1)
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/optcomp.src b/sw/source/ui/config/optcomp.src
deleted file mode 100644
index bb43e6e..0000000
--- a/sw/source/ui/config/optcomp.src
+++ /dev/null
@@ -1,131 +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 .
- */
-
-#include "optcomp.hrc"
-#include "globals.hrc"
-#include "helpid.h"
-
-// TabPage TP_OPTCOMPATIBILITY_PAGE --------------------------------------
-
-TabPage TP_OPTCOMPATIBILITY_PAGE
-{
-    Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
-    Hide = TRUE ;
-    FixedLine FL_MAIN
-    {
-        Pos = MAP_APPFONT ( 6 , 3 ) ;
-        Size = MAP_APPFONT ( 248 , 8 ) ;
-        Text [ en-US ] = "Compatibility options for %DOCNAME";
-    };
-    FixedText FT_FORMATTING
-    {
-        Pos = MAP_APPFONT ( 12 , 14 ) ;
-        Size = MAP_APPFONT ( 236 , 8 ) ;
-        Text [ en-US ] = "Recommended ~formatting options for";
-    };
-    ListBox LB_FORMATTING
-    {
-        HelpID = "sw:ListBox:TP_OPTCOMPATIBILITY_PAGE:LB_FORMATTING";
-        Pos = MAP_APPFONT ( 12 , 25 ) ;
-        Size = MAP_APPFONT ( 118 , 24 ) ;
-        DropDown = TRUE;
-    };
-    FixedText FT_OPTIONS
-    {
-        Pos = MAP_APPFONT ( 12 , 40 ) ;
-        Size = MAP_APPFONT ( 236 , 8 ) ;
-        Text [ en-US ] = "~Options";
-    };
-    Control LB_OPTIONS
-    {
-        HelpId = HID_COMPATIBILITY_OPTIONS_BOX ;
-        Pos = MAP_APPFONT ( 12 , 51 ) ;
-        Size = MAP_APPFONT ( 236 , 108 ) ;
-        Border = TRUE ;
-        TabStop = TRUE ;
-    };
-    PushButton PB_RESET
-    {
-        HelpID = "sw:PushButton:TP_OPTCOMPATIBILITY_PAGE:PB_RESET";
-        Pos = MAP_APPFONT ( 125 , 165 ) ;
-        Size = MAP_APPFONT ( 60 , 14 ) ;
-        Text [ en-US ] = "~Reset";
-    };
-    PushButton PB_DEFAULT
-    {
-        HelpID = "sw:PushButton:TP_OPTCOMPATIBILITY_PAGE:PB_DEFAULT";
-        Pos = MAP_APPFONT ( 188 , 165 ) ;
-        Size = MAP_APPFONT ( 60 , 14 ) ;
-        Text [ en-US ] = "Use as ~Default";
-    };
-
-    String STR_USERENTRY
-    {
-        Text [ en-US ] = "<User settings>";
-    };
-
-// the option strings ----------------------------------------------------
-
-    String STR_PRINTER_METRICS
-    {
-        Text [ en-US ] = "Use printer metrics for document formatting";
-    };
-    String STR_MERGE_PARA_DIST
-    {
-        Text [ en-US ] = "Add spacing between paragraphs and tables (in current document)";
-    };
-    String STR_MERGE_PARA_DIST_PAGESTART
-    {
-        Text [ en-US ] = "Add paragraph and table spacing at tops of pages (in current document)";
-    };
-    String STR_TAB_ALIGNMENT
-    {
-        Text [ en-US ] = "Use %WRITERCOMPATIBILITYVERSIONOOO11 tabstop formatting";
-    };
-    String STR_EXTERNAL_LEADING
-    {
-        Text [ en-US ] = "Do not add leading (extra space) between lines of text";
-    };
-    String STR_LINE_SPACING
-    {
-        Text [ en-US ] = "Use %WRITERCOMPATIBILITYVERSIONOOO11 line spacing";
-    };
-    String STR_ADD_TABLESPACING
-    {
-        Text [ en-US ] = "Add paragraph and table spacing at bottom of table cells";
-    };
-    String STR_USE_OBJPOSITIONING
-    {
-        Text [ en-US ] = "Use %WRITERCOMPATIBILITYVERSIONOOO11 object positioning";
-    };
-    String STR_USE_OURTEXTWRAPPING
-    {
-        Text [ en-US ] = "Use %WRITERCOMPATIBILITYVERSIONOOO11 text wrapping around objects";
-    };
-    String STR_CONSIDER_WRAPPINGSTYLE
-    {
-        Text [ en-US ] = "Consider wrapping style when positioning objects";
-    };
-    String STR_EXPAND_WORDSPACE
-    {
-        Text [ en-US ] = "Expand word space on lines with manual line breaks in justified paragraphs";
-    };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/uiconfig/swriter/ui/optcompatpage.ui b/sw/uiconfig/swriter/ui/optcompatpage.ui
new file mode 100644
index 0000000..d0c28b9
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/optcompatpage.ui
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <!-- interface-requires LibreOffice 1.0 -->
+  <object class="GtkGrid" id="OptCompatPage">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="hexpand">True</property>
+    <property name="vexpand">True</property>
+    <property name="border_width">6</property>
+    <child>
+      <object class="GtkFrame" id="compatframe">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="hexpand">True</property>
+        <property name="vexpand">True</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">none</property>
+        <child>
+          <object class="GtkAlignment" id="alignment4">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <property name="top_padding">6</property>
+            <property name="left_padding">12</property>
+            <child>
+              <object class="GtkGrid" id="grid1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="row_spacing">5</property>
+                <child>
+                  <object class="svxcorelo-SvxCheckListBox" id="options:border">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                    <child internal-child="selection">
+                      <object class="GtkTreeSelection" id="Check List Box-selection1"/>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkComboBoxText" id="format">
+                    <property name="can_focus">False</property>
+                    <property name="no_show_all">True</property>
+                    <property name="entry_text_column">0</property>
+                    <property name="id_column">1</property>
+                    <items>
+                      <item translatable="yes">Use printer metrics for document formatting</item>
+                      <item translatable="yes">Add spacing between paragraphs and tables (in current document)</item>
+                      <item translatable="yes">Add paragraph and table spacing at tops of pages (in current document)</item>
+                      <item translatable="yes">Use %WRITERCOMPATIBILITYVERSIONOOO11 tabstop formatting</item>
+                      <item translatable="yes">Do not add leading (extra space) between lines of text</item>
+                      <item translatable="yes">Use %WRITERCOMPATIBILITYVERSIONOOO11 line spacing</item>
+                      <item translatable="yes">Add paragraph and table spacing at bottom of table cells</item>
+                      <item translatable="yes">Use %WRITERCOMPATIBILITYVERSIONOOO11 object positioning</item>
+                      <item translatable="yes">Use %WRITERCOMPATIBILITYVERSIONOOO11 text wrapping around objects</item>
+                      <item translatable="yes">Consider wrapping style when positioning objects</item>
+                      <item translatable="yes">Expand word space on lines with manual line breaks in justified paragraphs</item>
+                      <item translatable="yes"><User settings></item>
+                    </items>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="default">
+                    <property name="label" translatable="yes">Use as _Default</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="halign">end</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="label11">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Compatibility options for %DOCNAME</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+        </child>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">0</property>
+        <property name="width">1</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+  </object>
+</interface>


More information about the Libreoffice-commits mailing list