[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - 2 commits - sw/AllLangResTarget_sw.mk sw/inc sw/source sw/uiconfig sw/UI_swriter.mk vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Sep 25 04:13:35 PDT 2012


 sw/AllLangResTarget_sw.mk             |    1 
 sw/UI_swriter.mk                      |    1 
 sw/inc/helpid.h                       |    1 
 sw/source/ui/inc/table.hrc            |    2 
 sw/source/ui/table/tautofmt.cxx       |   31 +++------
 sw/source/ui/table/tautofmt.hrc       |   54 ----------------
 sw/source/ui/table/tautofmt.src       |   65 --------------------
 sw/uiconfig/swriter/ui/stringinput.ui |  110 ++++++++++++++++++++++++++++++++++
 vcl/source/window/window2.cxx         |    2 
 9 files changed, 123 insertions(+), 144 deletions(-)

New commits:
commit 3317ace80225e5b62257153631362f80e3ff9f3d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 25 12:10:02 2012 +0100

    convert add/remove autoformats to new layout dialogs
    
    Change-Id: I79d658b4e8e1342c012a4bc52b3204ccceaa5520

diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk
index c11b215..21d313f 100644
--- a/sw/AllLangResTarget_sw.mk
+++ b/sw/AllLangResTarget_sw.mk
@@ -176,7 +176,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
     sw/source/ui/table/rowht.src \
     sw/source/ui/table/table.src \
     sw/source/ui/table/tabledlg.src \
-    sw/source/ui/table/tautofmt.src \
     sw/source/ui/uiview/pview.src \
     sw/source/ui/uiview/view.src \
     sw/source/ui/utlui/attrdesc.src \
diff --git a/sw/UI_swriter.mk b/sw/UI_swriter.mk
index 9a3338c..b03328e 100644
--- a/sw/UI_swriter.mk
+++ b/sw/UI_swriter.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UI_add_uifiles,modules/swriter,\
 	sw/uiconfig/swriter/ui/linenumbering \
 	sw/uiconfig/swriter/ui/printeroptions \
 	sw/uiconfig/swriter/ui/splittable \
+	sw/uiconfig/swriter/ui/stringinput \
 	sw/uiconfig/swriter/ui/titlepage \
 	sw/uiconfig/swriter/ui/wordcount \
 ))
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 46581d9..c0dbfdb 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -609,7 +609,6 @@
 #define HID_TABLE_DELETE_ROW                                    "SW_HID_TABLE_DELETE_ROW"
 #define HID_TABLE_DELETE_COL                                    "SW_HID_TABLE_DELETE_COL"
 #define HID_TABLE_MERGE_CELLS                                   "SW_HID_TABLE_MERGE_CELLS"
-#define HID_SWDLG_STRINPUT                                      "SW_HID_SWDLG_STRINPUT"
 #define HID_TABLE_SET_ULSPACE                                   "SW_HID_TABLE_SET_ULSPACE"
 #define HID_TABLE_SET_GRID                                      "SW_HID_TABLE_SET_GRID"
 #define HID_TABLE_SET_SHADOW                                    "SW_HID_TABLE_SET_SHADOW"
diff --git a/sw/source/ui/inc/table.hrc b/sw/source/ui/inc/table.hrc
index 3844cbb..5675910 100644
--- a/sw/source/ui/inc/table.hrc
+++ b/sw/source/ui/inc/table.hrc
@@ -26,7 +26,7 @@
 #define MSG_ERR_TABLE_MERGE     (RC_TABLE_BEGIN + 7)
 
 
-#define DLG_SWDLG_STRINPUT      (RC_TABLE_BEGIN + 10)
+
 #define TP_TABLE_COLUMN         (RC_TABLE_BEGIN + 11)
 #define DLG_INSERT_CHART        (RC_TABLE_BEGIN + 12)
 #define MSG_WRONG_TABLENAME     (RC_TABLE_BEGIN + 13)
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index 974e231..0e0f2f1 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -50,7 +50,6 @@
 #include "tblafmt.hxx"
 #include "tautofmt.hxx"
 #include "shellres.hxx"
-#include "tautofmt.hrc"
 
 using namespace com::sun::star;
 
@@ -128,36 +127,26 @@ public:
     void GetInputString( String& rString ) const;
 
 private:
-    Edit            aEdInput;   // Edit erhaelt so den Focus
-    FixedText       aFtEditTitle;
-    OKButton        aBtnOk;
-    CancelButton    aBtnCancel;
+    Edit*           m_pEdInput;   // Edit erhaelt so den Focus
 };
 
 
-SwStringInputDlg::SwStringInputDlg( Window*         pParent,
-                                    const String&   rTitle,
-                                    const String&   rEditTitle,
-                                    const String&   rDefault    ) :
-    ModalDialog     ( pParent, SW_RES( DLG_SWDLG_STRINPUT ) ),
-    //
-    aEdInput        ( this, SW_RES( ED_INPUT ) ),
-    aFtEditTitle    ( this, SW_RES( FT_LABEL ) ),
-    aBtnOk          ( this, SW_RES( BTN_OK ) ),
-    aBtnCancel      ( this, SW_RES( BTN_CANCEL ) )
+SwStringInputDlg::SwStringInputDlg(Window* pParent, const String& rTitle,
+    const String& rEditTitle, const String& rDefault)
+    : ModalDialog(pParent, "StringInputDialog", "modules/swriter/ui/stringinput.ui")
 {
-    SetText( rTitle );
-    aFtEditTitle.SetText( rEditTitle );
-    aEdInput.SetText( rDefault );
-    //-------------
-    FreeResource();
+    get<FixedText>("name")->SetText(rEditTitle);
+    get(m_pEdInput, "edit");
+
+    SetText(rTitle);
+    m_pEdInput->SetText(rDefault);
 }
 
 //------------------------------------------------------------------------
 
 void SwStringInputDlg::GetInputString( String& rString ) const
 {
-    rString = aEdInput.GetText();
+    rString = m_pEdInput->GetText();
 }
 
 
diff --git a/sw/source/ui/table/tautofmt.hrc b/sw/source/ui/table/tautofmt.hrc
deleted file mode 100644
index 0ac480d..0000000
--- a/sw/source/ui/table/tautofmt.hrc
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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 .
- */
-#ifndef SW_TAUTOFMT_HRC
-#define SW_TAUTOFMT_HRC
-
-#include "table.hrc"
-// allgemein
-#define BTN_OK          100
-#define BTN_CANCEL      102
-#define BTN_HELP        103
-#define BTN_MORE        104
-#define BTN_ADD         105
-#define BTN_REMOVE      106
-#define BTN_RENAME      107
-#define FT_LABEL        110
-#define FL_FRAME        111
-#define STR_BTN_CLOSE   200
-
-// Autoformat
-#define LB_FORMAT       1
-#define FL_FORMAT               9
-#define FL_FORMATS               29
-#define WND_PREVIEW     19
-#define BTN_NUMFORMAT   20
-#define BTN_BORDER      21
-#define BTN_FONT        23
-#define BTN_PATTERN     24
-#define BTN_ALIGNMENT   25
-
-// Gruppierung setzen/aufheben:
-#define BTN_GROUP_COLS  1
-#define BTN_GROUP_ROWS  3
-#define STR_GROUP       1
-#define STR_UNGROUP     2
-
-
-#define ED_INPUT       1
-
-#endif
diff --git a/sw/source/ui/table/tautofmt.src b/sw/source/ui/table/tautofmt.src
deleted file mode 100644
index 620f6e5..0000000
--- a/sw/source/ui/table/tautofmt.src
+++ /dev/null
@@ -1,65 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "tautofmt.hrc"
-#include "helpid.h"
-ModalDialog DLG_SWDLG_STRINPUT
-{
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Size = MAP_APPFONT ( 172 , 63 ) ;
-    Moveable = TRUE ;
-    Closeable = TRUE ;
-    HelpID = HID_SWDLG_STRINPUT ;
-    Edit ED_INPUT
-    {
-        HelpID = "sw:Edit:DLG_SWDLG_STRINPUT:ED_INPUT";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 6 , 24 ) ;
-        Size = MAP_APPFONT ( 104 , 12 ) ;
-        TabStop = TRUE ;
-    };
-    FixedText FT_LABEL
-    {
-        Pos = MAP_APPFONT ( 6 , 13 ) ;
-        Size = MAP_APPFONT ( 90 , 10 ) ;
-        Text = "Label" ;
-    };
-    OKButton BTN_OK
-    {
-        Pos = MAP_APPFONT ( 116 , 6 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-        DefButton = TRUE ;
-    };
-    CancelButton BTN_CANCEL
-    {
-        Pos = MAP_APPFONT ( 116 , 23 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-    };
-};
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 88e10bd..8d50878 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -2032,7 +2032,7 @@ bool Window::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
         set_margin_bottom(rValue.toInt32());
     else
     {
-        fprintf(stderr, "unhandled property %s\n", rKey.getStr());
+        SAL_WARN("vcl.layout", "unhandled property: " << rKey.getStr());
         return false;
     }
     return true;
commit 72e0e9ef5e14ecbcd0b731e1619430d5b278bab6
Author: Gokul <gokul.cdac at gmail.com>
Date:   Tue Sep 25 12:09:03 2012 +0100

    convert String Input dialog
    
    Change-Id: I484f7b495d529664717cf2f9f3f1f4edc7c1ad01

diff --git a/sw/uiconfig/swriter/ui/stringinput.ui b/sw/uiconfig/swriter/ui/stringinput.ui
new file mode 100644
index 0000000..7c00011
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/stringinput.ui
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="StringInputDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">5</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <property name="layout_style">start</property>
+            <child>
+              <object class="GtkButton" id="ok1">
+                <property name="label">gtk-ok</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel1">
+                <property name="label">gtk-cancel</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkGrid" id="grid5">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="margin_left">5</property>
+            <property name="margin_right">5</property>
+            <property name="margin_top">5</property>
+            <property name="margin_bottom">5</property>
+            <property name="row_spacing">10</property>
+            <property name="column_spacing">10</property>
+            <property name="column_homogeneous">True</property>
+            <child>
+              <object class="GtkLabel" id="name">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Name</property>
+              </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="GtkEntry" id="edit">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">•</property>
+                <property name="invisible_char_set">True</property>
+              </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>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">ok1</action-widget>
+      <action-widget response="0">cancel1</action-widget>
+    </action-widgets>
+  </object>
+</interface>


More information about the Libreoffice-commits mailing list