sw/UIConfig_swriter.mk                         |    1 
 sw/inc/dbui.hrc                                |    1 
 sw/inc/helpid.h                                |    2 
 sw/source/ui/dbui/mmoutputtypepage.cxx         |    1 
 sw/source/uibase/dbui/mailmergechildwindow.cxx |   29 +++----------
 sw/source/uibase/dbui/mailmergechildwindow.hrc |   23 ----------
 sw/source/uibase/dbui/mailmergechildwindow.src |   50 -----------------------
 sw/source/uibase/inc/mailmergechildwindow.hxx  |    6 --
 sw/uiconfig/swriter/ui/floatingmmchild.ui      |   54 +++++++++++++++++++++++++
 9 files changed, 64 insertions(+), 103 deletions(-)

New commits:
commit 0df2b61e1a81477f0f828e3234030a1f69880214
Author: Caolán McNamara <caol...@redhat.com>
Date:   Tue Sep 2 17:08:54 2014 +0100

    convert DLG_MAILMERGECHILD floating window to .ui
    
    Change-Id: I0ab16d3f5d86004b63f9a1baa454b18b7948f86a

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 23f9523..58df298 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -112,6 +112,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
        sw/uiconfig/swriter/ui/fldfuncpage \
        sw/uiconfig/swriter/ui/fldrefpage \
        sw/uiconfig/swriter/ui/fldvarpage \
+       sw/uiconfig/swriter/ui/floatingmmchild \
        sw/uiconfig/swriter/ui/floatingsync \
        sw/uiconfig/swriter/ui/formatsectiondialog \
        sw/uiconfig/swriter/ui/formattablepage \
diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc
index 35f84c2..9bfd540 100644
--- a/sw/inc/dbui.hrc
+++ b/sw/inc/dbui.hrc
@@ -22,7 +22,6 @@
 
 #include "rcid.hrc"
 
-#define DLG_MAILMERGECHILD            (RC_DBUI_BEGIN + 26)
 // Strings ------------------------------------------------------------------
 
 #define SA_ADDRESS_HEADER       (RC_DBUI_BEGIN + 1)
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index d2f79e3..35a3bb9 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -363,8 +363,6 @@
 #define HID_MODULE_TOOLBOX                                      
"SW_HID_MODULE_TOOLBOX"
 
 #define HID_MM_SELECTDBTABLEDDIALOG                             
"SW_HID_MM_SELECTDBTABLEDDIALOG"
-#define HID_MAILMERGECHILD                                      
"SW_HID_MAILMERGECHILD"
-#define HID_RETURN_TO_MAILMERGE                                 
"SW_HID_RETURN_TO_MAILMERGE"
 
 #define HID_NID_TBL                                             
"SW_HID_NID_TBL"
 #define HID_NID_FRM                                             
"SW_HID_NID_FRM"
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx 
b/sw/source/ui/dbui/mmoutputtypepage.cxx
index 75b401e..ca442c0 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -67,7 +67,6 @@ IMPL_LINK_NOARG(SwMailMergeOutputTypePage, TypeHdl_Impl)
 
 #include <helpid.h>
 #include <cmdid.h>
-#include <../../uibase/dbui/mailmergechildwindow.hrc>
 #include <swunohelper.hxx>
 #include <mmoutputpage.hxx>
 #include <maildispatcher.hxx>
diff --git a/sw/source/uibase/dbui/mailmergechildwindow.cxx 
b/sw/source/uibase/dbui/mailmergechildwindow.cxx
index 1334720..f52bf62 100644
--- a/sw/source/uibase/dbui/mailmergechildwindow.cxx
+++ b/sw/source/uibase/dbui/mailmergechildwindow.cxx
@@ -30,7 +30,6 @@
 #include <svtools/svmedit.hxx>
 #include <vcl/msgbox.hxx>
 #include <vcl/image.hxx>
-#include <mailmergechildwindow.hrc>
 #include <dbui.hrc>
 #include <helpid.h>
 
@@ -64,28 +63,14 @@ SwMailMergeChildWindow::SwMailMergeChildWindow( Window* 
_pParent,
     pWindow->Show();
 }
 
-SwMailMergeChildWin::SwMailMergeChildWin( SfxBindings* _pBindings,
-                            SfxChildWindow* pChild,
-                            Window *pParent) :
-    SfxFloatingWindow(_pBindings, pChild, pParent, SW_RES(DLG_MAILMERGECHILD)),
-    m_aBackTB(this, SW_RES( TB_BACK ))
-{
-    m_aBackTB.SetSelectHdl(LINK(this, SwMailMergeChildWin, BackHdl));
-    sal_uInt16 nIResId = ILIST_TBX;
-    ResId aResId( nIResId, *pSwResMgr );
-    ImageList aIList(aResId);
-    FreeResource();
-
-    m_aBackTB.SetItemImage( 1, aIList.GetImage(FN_SHOW_ROOT) );
-    m_aBackTB.SetButtonType( BUTTON_SYMBOLTEXT );
-    Size aSz = m_aBackTB.CalcWindowSizePixel(1);
-    m_aBackTB.SetPosSizePixel( Point(), aSz );
-    SetOutputSizePixel(aSz);
-    m_aBackTB.Show();
-}
-
-SwMailMergeChildWin::~SwMailMergeChildWin()
+SwMailMergeChildWin::SwMailMergeChildWin(SfxBindings* _pBindings,
+    SfxChildWindow* pChild, Window *pParent)
+    : SfxFloatingWindow(_pBindings, pChild, pParent, "FloatingMMChild",
+                        "modules/swriter/ui/floatingmmchild.ui")
 {
+    get(m_pBackTB, "back");
+    m_pBackTB->SetSelectHdl(LINK(this, SwMailMergeChildWin, BackHdl));
+    m_pBackTB->SetButtonType( BUTTON_SYMBOLTEXT );
 }
 
 IMPL_LINK_NOARG(SwMailMergeChildWin, BackHdl)
diff --git a/sw/source/uibase/dbui/mailmergechildwindow.hrc 
b/sw/source/uibase/dbui/mailmergechildwindow.hrc
deleted file mode 100644
index 84fe175..0000000
--- a/sw/source/uibase/dbui/mailmergechildwindow.hrc
+++ /dev/null
@@ -1,23 +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 TB_BACK                     1
-#define ILIST_TBX                   90
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/dbui/mailmergechildwindow.src 
b/sw/source/uibase/dbui/mailmergechildwindow.src
index c2572e1..68b37f0 100644
--- a/sw/source/uibase/dbui/mailmergechildwindow.src
+++ b/sw/source/uibase/dbui/mailmergechildwindow.src
@@ -16,60 +16,10 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#include "mailmergechildwindow.hrc"
 #include "dbui.hrc"
 #include "helpid.h"
 #include <cmdid.h>
 
-#define WIDTH  100
-#define HEIGHT 16
-
-#define WORKAROUND \
-    Text [ en-US ] = "Return to Mail Merge Wizard" ; \
-
-FloatingWindow DLG_MAILMERGECHILD\
-{
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Size = MAP_APPFONT ( WIDTH , HEIGHT ) ;
-    Moveable = TRUE ;
-    Closeable = FALSE ;
-    Sizeable = FALSE ;
-    Zoomable = TRUE ;
-    HelpID = HID_MAILMERGECHILD ;
-    Hide = TRUE ;
-    Text [ en-US ] = "Mail Merge Wizard";\
-    ToolBox TB_BACK\
-    {
-        MenuStrings = TRUE ;
-        SVLook = TRUE ;
-        ItemList =
-        {
-            ToolBoxItem\
-            {
-                Identifier = 1;
-                HelpID = HID_RETURN_TO_MAILMERGE ;
-                Left = TRUE;
-                WORKAROUND
-            };
-        };
-    };
-    #define IMGLIST1_IDS\
-        IdList = \
-        { \
-            FN_SHOW_ROOT; \
-        }; \
-        IdCount = 1
-
-    ImageList ILIST_TBX
-    {
-        Prefix = "sc";
-        MaskColor = IMAGE_MASK_COLOR;
-        IMGLIST1_IDS;
-    };
-};
-
-
 String ST_SEND
 {
     Text[ en-US ] = "Sending e-mails...";
diff --git a/sw/source/uibase/inc/mailmergechildwindow.hxx 
b/sw/source/uibase/inc/mailmergechildwindow.hxx
index 30dc88e..8ee4aa9 100644
--- a/sw/source/uibase/inc/mailmergechildwindow.hxx
+++ b/sw/source/uibase/inc/mailmergechildwindow.hxx
@@ -25,15 +25,13 @@
 
 class SwMailMergeChildWin : public SfxFloatingWindow
 {
-    ToolBox                 m_aBackTB;
-
+    ToolBox* m_pBackTB;
     DECL_LINK( BackHdl, void* );
 
 public:
     SwMailMergeChildWin(SfxBindings*, SfxChildWindow*, Window *pParent);
-    virtual ~SwMailMergeChildWin();
 
-    virtual void    FillInfo(SfxChildWinInfo&) const SAL_OVERRIDE;
+    virtual void FillInfo(SfxChildWinInfo&) const SAL_OVERRIDE;
 };
 
 class SwMailMergeChildWindow : public SfxChildWindow
diff --git a/sw/uiconfig/swriter/ui/floatingmmchild.ui 
b/sw/uiconfig/swriter/ui/floatingmmchild.ui
new file mode 100644
index 0000000..af65a14
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/floatingmmchild.ui
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+  <requires lib="gtk+" version="3.0"/>
+  <object class="GtkWindow" id="FloatingMMChild">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="no_show_all">True</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Mail Merge Wizard</property>
+    <property name="resizable">False</property>
+    <property name="type_hint">utility</property>
+    <property name="deletable">False</property>
+    <child>
+      <object class="GtkBox" id="box1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="hexpand">True</property>
+        <property name="vexpand">True</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkToolbar" id="back">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <property name="toolbar_style">both-horiz</property>
+            <property name="show_arrow">False</property>
+            <child>
+              <object class="GtkToolButton" id="return">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <property name="label" translatable="yes">Return to Mail Merge 
Wizard</property>
+                <property name="use_underline">True</property>
+                <property name="icon_name">sw/imglst/sc20234.png</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="homogeneous">True</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to