[Libreoffice-commits] core.git: 2 commits - sw/inc sw/source sw/uiconfig sw/UIConfig_swriter.mk

Caolán McNamara caolanm at redhat.com
Mon Sep 16 12:32:22 PDT 2013


 sw/UIConfig_swriter.mk             |    1 
 sw/inc/dbui.hrc                    |    2 
 sw/inc/helpid.h                    |    1 
 sw/source/ui/dbui/mmoutputpage.cxx |   57 ++--------
 sw/source/ui/dbui/mmoutputpage.hrc |    4 
 sw/source/ui/dbui/mmoutputpage.src |   72 -------------
 sw/source/ui/envelp/envfmt.cxx     |    8 -
 sw/uiconfig/swriter/ui/ccdialog.ui |  197 +++++++++++++++++++++++++++++++++++++
 8 files changed, 217 insertions(+), 125 deletions(-)

New commits:
commit bc01ebe47c04228cf729a8f87af3efeab213dc3a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Sep 16 20:25:59 2013 +0100

    convert copy to (cc) dialog to .ui
    
    Change-Id: I1d5ef0410a0e3d325fb6cf42dad2c07eeb89a87a

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index b118f47..9df8021 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -75,6 +75,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
 	sw/uiconfig/swriter/ui/captionoptions \
 	sw/uiconfig/swriter/ui/cardformatpage \
 	sw/uiconfig/swriter/ui/cardmediumpage \
+	sw/uiconfig/swriter/ui/ccdialog \
 	sw/uiconfig/swriter/ui/characterproperties \
 	sw/uiconfig/swriter/ui/charurlpage \
 	sw/uiconfig/swriter/ui/columndialog \
diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc
index 361b7da..0ced6d1 100644
--- a/sw/inc/dbui.hrc
+++ b/sw/inc/dbui.hrc
@@ -42,7 +42,7 @@
 #define DLG_MM_ASSIGNFIELDS           (RC_DBUI_BEGIN + 20)
 
 #define DLG_MM_LAYOUT_PAGE            (RC_DBUI_BEGIN + 22)
-#define DLG_MM_COPYTO                 (RC_DBUI_BEGIN + 23)
+
 #define DLG_MM_MAILBODY               (RC_DBUI_BEGIN + 24)
 #define DLG_MM_SENDMAILS              (RC_DBUI_BEGIN + 25)
 #define DLG_MAILMERGECHILD            (RC_DBUI_BEGIN + 26)
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 34f861e..344a790 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -381,7 +381,6 @@
 #define HID_MM_CREATEADDRESSLIST                                "SW_HID_MM_CREATEADDRESSLIST"
 #define HID_MM_ASSIGNFIELDS                                     "SW_HID_MM_ASSIGNFIELDS"
 #define HID_MM_LAYOUT_PAGE                                      "SW_HID_MM_LAYOUT_PAGE"
-#define HID_MM_COPYTO                                           "SW_HID_MM_COPYTO"
 #define HID_MM_ADDRESSLIST_HB                                   "SW_HID_MM_ADDRESSLIST_HB"
 #define HID_MM_TESTACCOUNTSETTINGS                              "SW_HID_MM_TESTACCOUNTSETTINGS"
 #define HID_MM_TESTACCOUNTSETTINGS_TLB                          "SW_HID_MM_TESTACCOUNTSETTINGS_TLB"
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index 2a5de59..bf1ec91 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -213,56 +213,25 @@ IMPL_LINK( SwSendQueryBox_Impl, ModifyHdl, Edit*, pEdit)
 
 class SwCopyToDialog : public SfxModalDialog
 {
-    FixedInfo       m_aDescriptionFI;
-    FixedText       m_aCCFT;
-    Edit            m_aCCED;
-    FixedText       m_aBCCFT;
-    Edit            m_aBCCED;
-
-    FixedInfo       m_aNoteFI;
-    FixedLine       m_aSeparatorFL;
-
-    OKButton        m_aOK;
-    CancelButton    m_aCancel;
-    HelpButton      m_aHelp;
+    Edit* m_pCCED;
+    Edit* m_pBCCED;
 
 public:
-    SwCopyToDialog(Window* pParent);
-    ~SwCopyToDialog();
+    SwCopyToDialog(Window* pParent)
+        : SfxModalDialog(pParent, "CCDialog",
+            "modules/swriter/ui/ccdialog.ui")
+    {
+        get(m_pCCED, "cc");
+        get(m_pBCCED, "bcc");
+    }
 
-    String          GetCC() {return m_aCCED.GetText();}
-    void            SetCC(const String& rSet) {m_aCCED.SetText(rSet);}
+    OUString GetCC() {return m_pCCED->GetText();}
+    void SetCC(const OUString& rSet) {m_pCCED->SetText(rSet);}
 
-    String          GetBCC() {return m_aBCCED.GetText();}
-    void            SetBCC(const String& rSet) {m_aBCCED.SetText(rSet);}
+    OUString GetBCC() {return m_pBCCED->GetText();}
+    void SetBCC(const OUString& rSet) {m_pBCCED->SetText(rSet);}
 };
 
-SwCopyToDialog::SwCopyToDialog(Window* pParent) :
-    SfxModalDialog(pParent, SW_RES(DLG_MM_COPYTO)),
-#ifdef _MSC_VER
-#pragma warning (disable : 4355)
-#endif
-    m_aDescriptionFI( this, SW_RES(       FI_DESCRIPTION )),
-    m_aCCFT( this, SW_RES(                FT_CC          )),
-    m_aCCED( this, SW_RES(                ED_CC          )),
-    m_aBCCFT( this, SW_RES(               FT_BCC         )),
-    m_aBCCED( this, SW_RES(               ED_BCC         )),
-    m_aNoteFI( this, SW_RES(              FI_NOTE        )),
-    m_aSeparatorFL( this, SW_RES(         FL_SEPARATOR   )),
-    m_aOK( this, SW_RES(                  PB_OK          )),
-    m_aCancel( this, SW_RES(              PB_CANCEL      )),
-    m_aHelp( this, SW_RES(                PB_HELP        ))
-#ifdef _MSC_VER
-#pragma warning (default : 4355)
-#endif
-{
-    FreeResource();
-}
-
-SwCopyToDialog::~SwCopyToDialog()
-{
-}
-
 SwMailMergeOutputPage::SwMailMergeOutputPage( SwMailMergeWizard* _pParent) :
     svt::OWizardPage( _pParent, SW_RES(DLG_MM_OUTPUT_PAGE)),
 #ifdef _MSC_VER
diff --git a/sw/source/ui/dbui/mmoutputpage.hrc b/sw/source/ui/dbui/mmoutputpage.hrc
index 94825ee..8a06731 100644
--- a/sw/source/ui/dbui/mmoutputpage.hrc
+++ b/sw/source/ui/dbui/mmoutputpage.hrc
@@ -58,10 +58,6 @@
 #define PB_SENDDOCUMENTS            40
 
 #define FI_DESCRIPTION              41
-#define FT_CC                       42
-#define ED_CC                       43
-#define FT_BCC                      44
-#define ED_BCC                      45
 #define PB_OK                       47
 #define PB_CANCEL                   48
 #define PB_HELP                     49
diff --git a/sw/source/ui/dbui/mmoutputpage.src b/sw/source/ui/dbui/mmoutputpage.src
index d9fa4e3..8426048 100644
--- a/sw/source/ui/dbui/mmoutputpage.src
+++ b/sw/source/ui/dbui/mmoutputpage.src
@@ -312,78 +312,6 @@ TabPage DLG_MM_OUTPUT_PAGE
     };
 };
 
-ModalDialog DLG_MM_COPYTO
-{
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    HelpID = HID_MM_COPYTO;
-    Size = MAP_APPFONT ( 250 , 100 ) ;
-    Moveable = TRUE ;
-
-    Text [ en-US ] = "Copy To";
-
-    FixedText FI_DESCRIPTION
-    {
-        Pos = MAP_APPFONT ( 6 , 3 ) ;
-        Size = MAP_APPFONT ( 238 , 8 ) ;
-        Text[ en-US ] = "Send a copy of this mail to:";
-    };
-    FixedText FT_CC
-    {
-        Pos = MAP_APPFONT ( 6 , 17 ) ;
-        Size = MAP_APPFONT ( 30 , 8 ) ;
-        Text[ en-US ] = "~Cc";
-    };
-    Edit ED_CC
-    {
-        HelpID = "sw:Edit:DLG_MM_COPYTO:ED_CC";
-        Pos = MAP_APPFONT ( 40 , 15 ) ;
-        Size = MAP_APPFONT ( 204 , 12 ) ;
-        Border = TRUE;
-    };
-    FixedText FT_BCC
-    {
-        Pos = MAP_APPFONT ( 6 , 33 ) ;
-        Size = MAP_APPFONT ( 30 , 8 ) ;
-        Text[ en-US ] = "~Bcc";
-    };
-    Edit ED_BCC
-    {
-        HelpID = "sw:Edit:DLG_MM_COPYTO:ED_BCC";
-        Pos = MAP_APPFONT ( 40 , 31 ) ;
-        Size = MAP_APPFONT ( 204 , 12 ) ;
-        Border = TRUE;
-    };
-    FixedText FI_NOTE
-    {
-        Pos = MAP_APPFONT ( 6 , 47 ) ;
-        Size = MAP_APPFONT ( 204 , 20 ) ;
-        WordBreak = TRUE;
-        Text[ en-US ] = "Note:\nSeparate e-mail addresses with a semicolon (;).";
-    };
-    FixedLine FL_SEPARATOR
-    {
-        Pos = MAP_APPFONT ( 0 , 66 ) ;
-        Size = MAP_APPFONT ( 250 , 8 ) ;
-    };
-    OKButton        PB_OK
-    {
-        Pos = MAP_APPFONT ( 85 , 80 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        DefButton = TRUE ;
-    };
-    CancelButton        PB_CANCEL
-    {
-        Pos = MAP_APPFONT ( 138 , 80 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-    };
-    HelpButton      PB_HELP
-    {
-        Pos = MAP_APPFONT ( 194 , 80 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-    };
-};
-
 ModalDialog DLG_MM_QUERY
 {
     OutputSize = TRUE ;
diff --git a/sw/uiconfig/swriter/ui/ccdialog.ui b/sw/uiconfig/swriter/ui/ccdialog.ui
new file mode 100644
index 0000000..0c8c754
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/ccdialog.ui
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="CCDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Copy To</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="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</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="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</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>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</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="GtkFrame" id="frame1">
+            <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="alignment1">
+                <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="hexpand">True</property>
+                    <property name="row_spacing">6</property>
+                    <property name="column_spacing">12</property>
+                    <child>
+                      <object class="GtkLabel" id="label2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">_Cc</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">cc</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="GtkLabel" id="label3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">_Bcc</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">bcc</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>
+                    <child>
+                      <object class="GtkLabel" id="label4">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Note: Separate e-mail addresses with a semicolon (;).</property>
+                        <property name="use_underline">True</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">2</property>
+                        <property name="width">2</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="cc">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hexpand">True</property>
+                        <property name="invisible_char">●</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">0</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="bcc">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hexpand">True</property>
+                        <property name="invisible_char">●</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">1</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label">Send a copy of this mail to...</property>
+                <attributes>
+                  <attribute name="weight" value="bold"/>
+                </attributes>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">ok</action-widget>
+      <action-widget response="0">cancel</action-widget>
+      <action-widget response="0">help</action-widget>
+    </action-widgets>
+  </object>
+</interface>
commit 902d4ded3b276ca3c0b4965bebede7c1efdc1a02
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Sep 16 17:06:10 2013 +0100

    drop annoying empty (slide) entry in inset->envelope->format
    
    Change-Id: I87018c06e8aff15431a63ddf1d81299a233a7c0b

diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index 5cf9da6..e657234 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -178,14 +178,16 @@ SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet)
     {
         if (i != PAPER_USER)
         {
-            String aPaperName = SvxPaperInfo::GetName((Paper) i),
-                   aEntryName;
+            OUString aPaperName = SvxPaperInfo::GetName((Paper) i);
+
+            if (aPaperName.isEmpty())
+                continue;
 
             sal_uInt16 nPos   = 0;
             bool bFound = false;
             while (nPos < m_pSizeFormatBox->GetEntryCount() && !bFound)
             {
-                aEntryName = m_pSizeFormatBox->GetEntry(i);
+                OUString aEntryName = m_pSizeFormatBox->GetEntry(i);
                 if (aEntryName < aPaperName)
                     nPos++;
                 else


More information about the Libreoffice-commits mailing list