[Libreoffice-commits] core.git: 2 commits - sw/AllLangResTarget_sw.mk sw/inc sw/source sw/uiconfig sw/UIConfig_swriter.mk writerfilter/source
Szymon KÅos
eszkadev at gmail.com
Wed Jul 2 03:58:47 PDT 2014
sw/AllLangResTarget_sw.mk | 2
sw/UIConfig_swriter.mk | 2
sw/inc/dbui.hrc | 2
sw/source/ui/dbui/dbtablepreviewdialog.cxx | 22
sw/source/ui/dbui/dbtablepreviewdialog.hrc | 28 -
sw/source/ui/dbui/dbtablepreviewdialog.hxx | 3
sw/source/ui/dbui/dbtablepreviewdialog.src | 54 --
sw/source/ui/dbui/mmgreetingspage.cxx | 110 ++--
sw/source/ui/dbui/mmgreetingspage.hrc | 50 --
sw/source/ui/dbui/mmgreetingspage.hxx | 34 -
sw/source/ui/dbui/mmgreetingspage.src | 182 --------
sw/uiconfig/swriter/ui/mmmailbody.ui | 468 +++++++++++++++++++++
sw/uiconfig/swriter/ui/tablepreviewdialog.ui | 77 +++
writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx | 7
writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx | 2
15 files changed, 616 insertions(+), 427 deletions(-)
New commits:
commit b55b8d83feaf7f36d50a16edd2c21ae626c2a5bb
Author: Szymon KÅos <eszkadev at gmail.com>
Date: Tue Jul 1 09:32:56 2014 +0200
DLG_MM_DBTABLEPREVIEWDIALOG and DLG_MM_MAILBODY conversion to .ui
Change-Id: Ie00c75e54918e51068ab69c5ea9047d0503b5b87
Reviewed-on: https://gerrit.libreoffice.org/10004
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk
index f6b099d..bf03701 100644
--- a/sw/AllLangResTarget_sw.mk
+++ b/sw/AllLangResTarget_sw.mk
@@ -89,11 +89,9 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
sw/source/ui/chrdlg/chrdlg.src \
sw/source/ui/config/optdlg.src \
sw/source/ui/config/optload.src \
- sw/source/ui/dbui/dbtablepreviewdialog.src \
sw/source/ui/dbui/dbui.src \
sw/source/ui/dbui/mailmergewizard.src \
sw/source/ui/dbui/mmaddressblockpage.src \
- sw/source/ui/dbui/mmgreetingspage.src \
sw/source/ui/dbui/selectdbtabledialog.src \
sw/source/ui/dialog/dialog.src \
sw/source/ui/dochdl/dochdl.src \
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index f2b9eb1..c0be4e1 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -168,6 +168,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/mmaddressblockpage \
sw/uiconfig/swriter/ui/mmcreatingdialog \
sw/uiconfig/swriter/ui/mmlayoutpage \
+ sw/uiconfig/swriter/ui/mmmailbody \
sw/uiconfig/swriter/ui/mmmergepage \
sw/uiconfig/swriter/ui/mmoutputpage \
sw/uiconfig/swriter/ui/mmoutputtypepage \
@@ -207,6 +208,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/tocindexpage \
sw/uiconfig/swriter/ui/tocstylespage \
sw/uiconfig/swriter/ui/tablecolumnpage \
+ sw/uiconfig/swriter/ui/tablepreviewdialog \
sw/uiconfig/swriter/ui/tableproperties \
sw/uiconfig/swriter/ui/tabletextflowpage \
sw/uiconfig/swriter/ui/templatedialog1 \
diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc
index 0e370e7..58bbc6d 100644
--- a/sw/inc/dbui.hrc
+++ b/sw/inc/dbui.hrc
@@ -25,9 +25,7 @@
// Dialoge --------------------------------------------------------------------
#define DLG_MAILMERGEWIZARD (RC_DBUI_BEGIN + 3)
-#define DLG_MM_DBTABLEPREVIEWDIALOG (RC_DBUI_BEGIN + 13)
-#define DLG_MM_MAILBODY (RC_DBUI_BEGIN + 24)
#define DLG_MM_SENDMAILS (RC_DBUI_BEGIN + 25)
#define DLG_MAILMERGECHILD (RC_DBUI_BEGIN + 26)
// Strings ------------------------------------------------------------------
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.cxx b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
index e836737..e71ccc7 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.cxx
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
@@ -23,8 +23,6 @@
#include <com/sun/star/frame/Frame.hpp>
#include <toolkit/helper/vclunohelper.hxx>
-#include <dbui.hrc>
-#include <dbtablepreviewdialog.hrc>
#include <unomid.h>
using namespace ::com::sun::star;
@@ -36,21 +34,23 @@ using namespace ::com::sun::star::util;
using namespace ::rtl;
SwDBTablePreviewDialog::SwDBTablePreviewDialog(Window* pParent, uno::Sequence< beans::PropertyValue>& rValues ) :
- SfxModalDialog(pParent, SW_RES(DLG_MM_DBTABLEPREVIEWDIALOG)),
- m_aDescriptionFI( this, SW_RES( FI_DESCRIPTION)),
- m_pBeamerWIN( new Window(this, SW_RES( WIN_BEAMER ))),
- m_aOK( this, SW_RES( PB_OK ))
+ SfxModalDialog(pParent, "TablePreviewDialog", "modules/swriter/ui/tablepreviewdialog.ui")
{
- FreeResource();
+ get(m_pDescriptionFI, "description");
+ get(m_pBeamerWIN, "beamer");
+ Size aSize(LogicToPixel(Size(338, 150), MAP_APPFONT));
+ m_pBeamerWIN->set_width_request(aSize.Width());
+ m_pBeamerWIN->set_height_request(aSize.Height());
+
const beans::PropertyValue* pValues = rValues.getConstArray();
for(sal_Int32 nValue = 0; nValue < rValues.getLength(); ++nValue )
{
if ( pValues[nValue].Name == "Command" )
{
- OUString sDescription = m_aDescriptionFI.GetText();
+ OUString sDescription = m_pDescriptionFI->GetText();
OUString sTemp;
pValues[nValue].Value >>= sTemp;
- m_aDescriptionFI.SetText(sDescription.replaceFirst("%1", sTemp));
+ m_pDescriptionFI->SetText(sDescription.replaceFirst("%1", sTemp));
break;
}
}
@@ -59,6 +59,8 @@ SwDBTablePreviewDialog::SwDBTablePreviewDialog(Window* pParent, uno::Sequence< b
{
// create a frame wrapper for myself
m_xFrame = frame::Frame::create( comphelper::getProcessComponentContext() );
+ // m_xFrame takes ownership of m_pBeamerWIN
+ m_pUIBuilder->drop_ownership(m_pBeamerWIN);
m_xFrame->initialize( VCLUnoHelper::GetInterface( m_pBeamerWIN ) );
}
catch (uno::Exception const &)
@@ -85,8 +87,6 @@ SwDBTablePreviewDialog::~SwDBTablePreviewDialog()
m_xFrame->setComponent(NULL, NULL);
m_xFrame->dispose();
}
- else
- delete m_pBeamerWIN;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.hrc b/sw/source/ui/dbui/dbtablepreviewdialog.hrc
deleted file mode 100644
index bc1fbb9..0000000
--- a/sw/source/ui/dbui/dbtablepreviewdialog.hrc
+++ /dev/null
@@ -1,28 +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 .
- */
-#ifndef _DBTABLEPREVIEWDIALOG_HRC
-#define _DBTABLEPREVIEWDIALOG_HRC
-
-#define FI_DESCRIPTION 1
-#define WIN_BEAMER 2
-#define PB_OK 3
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.hxx b/sw/source/ui/dbui/dbtablepreviewdialog.hxx
index b47d2c2..e32b1ef 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.hxx
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.hxx
@@ -31,9 +31,8 @@ namespace com{ namespace sun{ namespace star{
class SwDBTablePreviewDialog : public SfxModalDialog
{
- FixedInfo m_aDescriptionFI;
+ FixedText* m_pDescriptionFI;
Window* m_pBeamerWIN;
- OKButton m_aOK;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame2 > m_xFrame;
public:
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.src b/sw/source/ui/dbui/dbtablepreviewdialog.src
deleted file mode 100644
index 540ddaf..0000000
--- a/sw/source/ui/dbui/dbtablepreviewdialog.src
+++ /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 .
- */
-#include <dbtablepreviewdialog.hrc>
-#include <dbui.hrc>
-#include <helpid.h>
-
-ModalDialog DLG_MM_DBTABLEPREVIEWDIALOG
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- HelpID = HID_MM_DBTABLEPREVIEWDIALOG;
- Size = MAP_APPFONT ( 350 , 200 ) ;
- Moveable = TRUE ;
-
- Text [ en-US ] = "Mail Merge Recipients";
-
- FixedText FI_DESCRIPTION
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 338 , 8 ) ;
- WordBreak = TRUE;
- Text [ en-US ] = "The list below shows the contents of: %1";
- };
- Window WIN_BEAMER
- {
- Pos = MAP_APPFONT ( 6 , 14 ) ;
- Size = MAP_APPFONT ( 338 , 150 ) ;
- };
- OKButton PB_OK
- {
- Pos = MAP_APPFONT ( 150 , 180 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- DefButton = TRUE ;
- Text [ en-US ] = "~Close";
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index 48a6db8..1a55248 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -23,7 +23,6 @@
#include <mmaddressblockpage.hxx>
#include <swtypes.hxx>
#include <vcl/msgbox.hxx>
-#include <mmgreetingspage.hrc>
#include <dbui.hrc>
#include <com/sun/star/sdb/XColumn.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
@@ -399,45 +398,31 @@ IMPL_LINK(SwMailMergeGreetingsPage, InsertDataHdl_Impl, ImageButton*, pButton)
}
SwMailBodyDialog::SwMailBodyDialog(Window* pParent, SwMailMergeWizard* _pWizard) :
- SfxModalDialog(pParent, SW_RES(DLG_MM_MAILBODY)),
- m_aGreetingLineCB(this, SW_RES( CB_GREETINGLINE ) ),
- m_aPersonalizedCB(this, SW_RES( CB_PERSONALIZED ) ),
- m_aFemaleFT(this, SW_RES( FT_FEMALE ) ),
- m_aFemaleLB(this, SW_RES( LB_FEMALE ) ),
- m_aFemalePB(this, SW_RES( PB_FEMALE ) ),
- m_aMaleFT(this, SW_RES( FT_MALE ) ),
- m_aMaleLB(this, SW_RES( LB_MALE ) ),
- m_aMalePB(this, SW_RES( PB_MALE ) ),
- m_aFemaleFI(this, SW_RES( FI_FEMALE ) ),
- m_aFemaleColumnFT(this, SW_RES( FT_FEMALECOLUMN ) ),
- m_aFemaleColumnLB(this, SW_RES( LB_FEMALECOLUMN ) ),
- m_aFemaleFieldFT(this, SW_RES( FT_FEMALEFIELD ) ),
- m_aFemaleFieldCB(this, SW_RES( CB_FEMALEFIELD ) ),
- m_aNeutralFT(this, SW_RES( FT_NEUTRAL ) ),
- m_aNeutralCB(this, SW_RES( CB_NEUTRAL ) ),
- m_aBodyFT( this, SW_RES( FT_BODY ) ),
- m_aBodyMLE( this, SW_RES( MLE_BODY ) ),
- 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 ) )
+ SfxModalDialog(pParent, "MailBodyDialog", "modules/swriter/ui/mmmailbody.ui")
{
m_pWizard = _pWizard;
- m_pGreetingLineCB = &m_aGreetingLineCB;
- m_pPersonalizedCB = &m_aPersonalizedCB;
- m_pFemaleFT = & m_aFemaleFT;
- m_pFemaleLB = & m_aFemaleLB;
- m_pFemalePB = & m_aFemalePB;
- m_pMaleFT = & m_aMaleFT;
- m_pMaleLB = & m_aMaleLB;
- m_pMalePB = & m_aMalePB;
- m_pFemaleFI = & m_aFemaleFI;
- m_pFemaleColumnFT = &m_aFemaleColumnFT;
- m_pFemaleColumnLB = &m_aFemaleColumnLB;
- m_pFemaleFieldFT = & m_aFemaleFieldFT;
- m_pFemaleFieldCB = & m_aFemaleFieldCB;
- m_pNeutralFT = & m_aNeutralFT;
- m_pNeutralCB = &m_aNeutralCB;
+ get(m_pGreetingLineCB, "greeting");
+ get(m_pPersonalizedCB, "personalized");
+ get(m_pFemaleFT, "femaleft");
+ get(m_pFemaleLB, "female");
+ get(m_pFemalePB, "newfemale");
+ get(m_pMaleFT, "maleft");
+ get(m_pMaleLB, "male");
+ get(m_pMalePB, "newmale");
+ get(m_pFemaleFI, "femalefi");
+ get(m_pFemaleColumnFT, "femalecolft");
+ get(m_pFemaleColumnLB, "femalecol");
+ get(m_pFemaleFieldFT, "femalefieldft");
+ get(m_pFemaleFieldCB, "femalefield");
+ get(m_pNeutralFT, "generalft");
+ get(m_pNeutralCB, "general");
+ get(m_pBodyFT, "bodyft");
+ get(m_pBodyMLE, "bodymle");
+ m_pBodyMLE->SetStyle(m_pBodyMLE->GetStyle() | WB_HSCROLL | WB_VSCROLL | WB_IGNORETAB);
+ Size aSize(LogicToPixel(Size(180, 50), MAP_APPFONT));
+ m_pBodyMLE->set_width_request(aSize.Width());
+ m_pBodyMLE->set_height_request(aSize.Height());
+ get(m_pOK, "ok");
m_bIsTabPage = false;
m_pPersonalizedCB->SetHelpId( HID_MM_BODY_CB_PERSONALIZED );
@@ -449,41 +434,40 @@ SwMailBodyDialog::SwMailBodyDialog(Window* pParent, SwMailMergeWizard* _pWizard)
m_pFemaleFieldCB->SetHelpId( HID_MM_BODY_CB_FEMALEFIELD );
m_pNeutralCB->SetHelpId( HID_MM_BODY_CB_NEUTRAL );
- FreeResource();
- m_aGreetingLineCB.SetClickHdl(LINK(this, SwMailBodyDialog, ContainsHdl_Impl));
+ m_pGreetingLineCB->SetClickHdl(LINK(this, SwMailBodyDialog, ContainsHdl_Impl));
Link aIndividualLink = LINK(this, SwGreetingsHandler, IndividualHdl_Impl);
- m_aPersonalizedCB.SetClickHdl(aIndividualLink);
+ m_pPersonalizedCB->SetClickHdl(aIndividualLink);
Link aGreetingLink = LINK(this, SwGreetingsHandler, GreetingHdl_Impl);
- m_aFemalePB.SetClickHdl(aGreetingLink);
- m_aMalePB.SetClickHdl(aGreetingLink);
- m_aOK.SetClickHdl(LINK(this, SwMailBodyDialog, OKHdl));
+ m_pFemalePB->SetClickHdl(aGreetingLink);
+ m_pMalePB->SetClickHdl(aGreetingLink);
+ m_pOK->SetClickHdl(LINK(this, SwMailBodyDialog, OKHdl));
SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem();
- m_aGreetingLineCB.Check(rConfig.IsGreetingLine(true));
- m_aPersonalizedCB.Check(rConfig.IsIndividualGreeting(true));
- ContainsHdl_Impl(&m_aGreetingLineCB);
+ m_pGreetingLineCB->Check(rConfig.IsGreetingLine(true));
+ m_pPersonalizedCB->Check(rConfig.IsIndividualGreeting(true));
+ ContainsHdl_Impl(m_pGreetingLineCB);
aIndividualLink.Call(0);
- lcl_FillGreetingsBox(m_aFemaleLB, rConfig, SwMailMergeConfigItem::FEMALE);
- lcl_FillGreetingsBox(m_aMaleLB, rConfig, SwMailMergeConfigItem::MALE);
- lcl_FillGreetingsBox(m_aNeutralCB, rConfig, SwMailMergeConfigItem::NEUTRAL);
+ lcl_FillGreetingsBox(*m_pFemaleLB, rConfig, SwMailMergeConfigItem::FEMALE);
+ lcl_FillGreetingsBox(*m_pMaleLB, rConfig, SwMailMergeConfigItem::MALE);
+ lcl_FillGreetingsBox(*m_pNeutralCB, rConfig, SwMailMergeConfigItem::NEUTRAL);
//try to find the gender setting
- m_aFemaleColumnLB.Clear();
+ m_pFemaleColumnLB->Clear();
Reference< sdbcx::XColumnsSupplier > xColsSupp = rConfig.GetColumnsSupplier();
if(xColsSupp.is())
{
Reference < container::XNameAccess> xColAccess = xColsSupp->getColumns();
Sequence< OUString > aColumns = xColAccess->getElementNames();
for(sal_Int32 nName = 0; nName < aColumns.getLength(); ++nName)
- m_aFemaleColumnLB.InsertEntry(aColumns[nName]);
+ m_pFemaleColumnLB->InsertEntry(aColumns[nName]);
}
- m_aFemaleColumnLB.SelectEntry(rConfig.GetAssignedColumn(MM_PART_GENDER));
- m_aFemaleColumnLB.SaveValue();
+ m_pFemaleColumnLB->SelectEntry(rConfig.GetAssignedColumn(MM_PART_GENDER));
+ m_pFemaleColumnLB->SaveValue();
- m_aFemaleFieldCB.SetText(rConfig.GetFemaleGenderValue());
- m_aFemaleFieldCB.SaveValue();
+ m_pFemaleFieldCB->SetText(rConfig.GetFemaleGenderValue());
+ m_pFemaleFieldCB->SaveValue();
}
SwMailBodyDialog::~SwMailBodyDialog()
@@ -501,25 +485,25 @@ IMPL_LINK_NOARG(SwMailBodyDialog, OKHdl)
{
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
rConfigItem.SetGreetingLine(
- m_aGreetingLineCB.IsChecked(), false);
+ m_pGreetingLineCB->IsChecked(), false);
rConfigItem.SetIndividualGreeting(
- m_aPersonalizedCB.IsChecked(), false);
+ m_pPersonalizedCB->IsChecked(), false);
- if(m_aFemaleColumnLB.IsValueChangedFromSaved())
+ if(m_pFemaleColumnLB->IsValueChangedFromSaved())
{
const SwDBData& rDBData = rConfigItem.GetCurrentDBData();
Sequence< OUString> aAssignment = rConfigItem.GetColumnAssignment( rDBData );
- sal_Int32 nPos = m_aFemaleColumnLB.GetSelectEntryPos();
+ sal_Int32 nPos = m_pFemaleColumnLB->GetSelectEntryPos();
if(aAssignment.getLength() < MM_PART_GENDER)
aAssignment.realloc(MM_PART_GENDER);
if( nPos > 0 )
- aAssignment[MM_PART_GENDER] = m_aFemaleColumnLB.GetSelectEntry();
+ aAssignment[MM_PART_GENDER] = m_pFemaleColumnLB->GetSelectEntry();
else
aAssignment[MM_PART_GENDER] = OUString();
rConfigItem.SetColumnAssignment( rDBData, aAssignment );
}
- if(m_aFemaleFieldCB.IsValueChangedFromSaved())
- rConfigItem.SetFemaleGenderValue(m_aFemaleFieldCB.GetText());
+ if(m_pFemaleFieldCB->IsValueChangedFromSaved())
+ rConfigItem.SetFemaleGenderValue(m_pFemaleFieldCB->GetText());
EndDialog(RET_OK);
return 0;
diff --git a/sw/source/ui/dbui/mmgreetingspage.hrc b/sw/source/ui/dbui/mmgreetingspage.hrc
deleted file mode 100644
index c3a9b93..0000000
--- a/sw/source/ui/dbui/mmgreetingspage.hrc
+++ /dev/null
@@ -1,50 +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 .
- */
-#ifndef _MAILMERGEGREETINGSPAGE_HRC
-#define _MAILMERGEGREETINGSPAGE_HRC
-
-#define CB_PERSONALIZED 2
-#define LB_FEMALE 3
-#define PB_FEMALE 4
-#define LB_MALE 5
-#define PB_MALE 6
-#define FI_FEMALE 7
-#define FT_FEMALECOLUMN 8
-#define LB_FEMALECOLUMN 9
-#define FT_FEMALEFIELD 10
-#define CB_FEMALEFIELD 11
-#define FT_NEUTRAL 12
-
-#define CB_NEUTRAL 14
-#define CB_GREETINGLINE 15
-
-#define STR_DOCUMENT 22
-#define FT_FEMALE 24
-#define FT_MALE 25
-
-#define FT_BODY 30
-#define MLE_BODY 31
-#define FL_SEPARATOR 32
-#define PB_OK 33
-#define PB_CANCEL 34
-#define PB_HELP 35
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx
index 04f48a0..fa94bc1 100644
--- a/sw/source/ui/dbui/mmgreetingspage.hxx
+++ b/sw/source/ui/dbui/mmgreetingspage.hxx
@@ -95,34 +95,10 @@ public:
class SwMailBodyDialog : public SfxModalDialog, public SwGreetingsHandler
{
- CheckBox m_aGreetingLineCB;
+ FixedText *m_pBodyFT;
+ VclMultiLineEdit *m_pBodyMLE;
- CheckBox m_aPersonalizedCB;
-
- FixedText m_aFemaleFT;
- ListBox m_aFemaleLB;
- PushButton m_aFemalePB;
-
- FixedText m_aMaleFT;
- ListBox m_aMaleLB;
- PushButton m_aMalePB;
-
- FixedInfo m_aFemaleFI;
- FixedText m_aFemaleColumnFT;
- ListBox m_aFemaleColumnLB;
- FixedText m_aFemaleFieldFT;
- ComboBox m_aFemaleFieldCB;
-
- FixedText m_aNeutralFT;
- ComboBox m_aNeutralCB;
-
- FixedText m_aBodyFT;
- MultiLineEdit m_aBodyMLE;
- FixedLine m_aSeparatorFL;
-
- OKButton m_aOK;
- CancelButton m_aCancel;
- HelpButton m_aHelp;
+ OKButton *m_pOK;
DECL_LINK(ContainsHdl_Impl, CheckBox*);
DECL_LINK(OKHdl, void *);
@@ -130,8 +106,8 @@ public:
SwMailBodyDialog(Window* pParent, SwMailMergeWizard* pWizard);
virtual ~SwMailBodyDialog();
- void SetBody(const OUString& rBody ) {m_aBodyMLE.SetText(rBody);}
- OUString GetBody() const {return m_aBodyMLE.GetText();}
+ void SetBody(const OUString& rBody ) {m_pBodyMLE->SetText(rBody);}
+ OUString GetBody() const {return m_pBodyMLE->GetText();}
};
#endif
diff --git a/sw/source/ui/dbui/mmgreetingspage.src b/sw/source/ui/dbui/mmgreetingspage.src
deleted file mode 100644
index 721596c..0000000
--- a/sw/source/ui/dbui/mmgreetingspage.src
+++ /dev/null
@@ -1,182 +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 <mmgreetingspage.hrc>
-#include <dbui.hrc>
-#include <helpid.h>
-
-#define _LB_FEMALECOLUMN \
- StringList [en-US]= \
- { \
- < "< not available >" ; > ; \
- };
-
-#define GREETINGS_BODY \
- CheckBox CB_PERSONALIZED \
- { \
- Pos = MAP_APPFONT ( 12 + LEFT_OFFSET , 17 + TOP_OFFSET ) ; \
- Size = MAP_APPFONT ( 226 , 10 ) ; \
- Text[ en-US ] = "Insert personalized salutation"; \
- }; \
- FixedText FT_FEMALE \
- { \
- Pos = MAP_APPFONT ( 18 + LEFT_OFFSET , 32 + TOP_OFFSET ) ; \
- Size = MAP_APPFONT ( 50 , 8 ) ; \
- Text[ en-US ] = "~Female"; \
- }; \
- ListBox LB_FEMALE \
- { \
- Pos = MAP_APPFONT ( 71 + LEFT_OFFSET , 30 + TOP_OFFSET ) ; \
- Size = MAP_APPFONT ( 121 , 50 ) ; \
- DropDown = TRUE; \
- Border = TRUE; \
- }; \
- PushButton PB_FEMALE \
- { \
- Pos = MAP_APPFONT ( 198 + LEFT_OFFSET , 29 + TOP_OFFSET ) ; \
- Size = MAP_APPFONT ( 50 , 14 ) ; \
- Text[ en-US ] = "~New..."; \
- }; \
- FixedText FT_MALE \
- { \
- Pos = MAP_APPFONT ( 18 + LEFT_OFFSET , 49 + TOP_OFFSET ) ; \
- Size = MAP_APPFONT ( 50 , 8 ) ; \
- Text[ en-US ] = "~Male"; \
- }; \
- ListBox LB_MALE \
- { \
- Pos = MAP_APPFONT ( 71 + LEFT_OFFSET , 47 + TOP_OFFSET ) ; \
- Size = MAP_APPFONT ( 121 , 50 ) ; \
- DropDown = TRUE; \
- Border = TRUE; \
- }; \
- PushButton PB_MALE \
- { \
- Pos = MAP_APPFONT ( 198 + LEFT_OFFSET , 48 + TOP_OFFSET ) ; \
- Size = MAP_APPFONT ( 50 , 14 ) ; \
- Text[ en-US ] = "N~ew..."; \
- }; \
- FixedText FI_FEMALE \
- { \
- Pos = MAP_APPFONT ( 18 + LEFT_OFFSET , 67 + TOP_OFFSET ) ; \
- Size = MAP_APPFONT ( 225 , 8 ) ; \
- Text[ en-US ] = "Address list field indicating a female recipient"; \
- }; \
- FixedText FT_FEMALECOLUMN \
- { \
- Pos = MAP_APPFONT ( 18 + LEFT_OFFSET , 80 + TOP_OFFSET ) ; \
- Size = MAP_APPFONT ( 50 , 8 ) ; \
- Text[ en-US ] = "Field name"; \
- }; \
- ListBox LB_FEMALECOLUMN \
- { \
- Pos = MAP_APPFONT ( 71 + LEFT_OFFSET , 78 + TOP_OFFSET ) ; \
- Size = MAP_APPFONT ( 121 , 50 ) ; \
- DropDown = TRUE; \
- Border = TRUE; \
- _LB_FEMALECOLUMN \
- }; \
- FixedText FT_FEMALEFIELD \
- { \
- Pos = MAP_APPFONT ( 18 + LEFT_OFFSET , 95 + TOP_OFFSET ) ; \
- Size = MAP_APPFONT ( 50 , 8 ) ; \
- Text[ en-US ] = "Field value"; \
- }; \
- ComboBox CB_FEMALEFIELD \
- { \
- Pos = MAP_APPFONT ( 71 + LEFT_OFFSET , 93 + TOP_OFFSET ) ; \
- Size = MAP_APPFONT ( 121 , 50 ) ; \
- DropDown = TRUE; \
- Border = TRUE; \
- }; \
- FixedText FT_NEUTRAL \
- { \
- Pos = MAP_APPFONT ( 12 + LEFT_OFFSET , 113 + TOP_OFFSET ) ; \
- Size = MAP_APPFONT ( 180 , 8 ) ; \
- Text[ en-US ] = "General salutation"; \
- }; \
- ComboBox CB_NEUTRAL \
- { \
- Pos = MAP_APPFONT ( 12 + LEFT_OFFSET , 124 + TOP_OFFSET ) ; \
- Size = MAP_APPFONT ( 180 , 50 ) ; \
- DropDown = TRUE; \
- Border = TRUE; \
- };
-
-#undef TOP_OFFSET
-#undef LEFT_OFFSET
-
-#define TOP_OFFSET 0
-#define LEFT_OFFSET 0
-ModalDialog DLG_MM_MAILBODY
-{
- HelpID = HID_MM_MAILBODY;
- Size = MAP_APPFONT ( 254 , 238 ) ;
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Moveable = TRUE ;
- Text [ en-US ] = "E-Mail Message";
- CheckBox CB_GREETINGLINE
- {
- HelpID = "sw:CheckBox:DLG_MM_MAILBODY:CB_GREETINGLINE";
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 242 , 10 ) ;
- Text[ en-US ] = "This e-mail should contain a salutation";
- };
- GREETINGS_BODY
- FixedText FT_BODY
- {
- Pos = MAP_APPFONT ( 12 , 140 ) ;
- Size = MAP_APPFONT ( 174 , 8 ) ;
- Text[ en-US ] = "Write your message here";
- };
- MultiLineEdit MLE_BODY
- {
- HelpID = "sw:MultiLineEdit:DLG_MM_MAILBODY:MLE_BODY";
- Pos = MAP_APPFONT ( 12, 151 ) ;
- Size = MAP_APPFONT ( 180 , 50 ) ;
- Border = TRUE;
- TabStop = TRUE ;
- Left = TRUE ;
- VScroll = TRUE ;
- HScroll = TRUE ;
- IgnoreTab = TRUE;
- };
- FixedLine FL_SEPARATOR
- {
- Pos = MAP_APPFONT ( 0 , 207 ) ;
- Size = MAP_APPFONT ( 254 , 8 ) ;
- };
- OKButton PB_OK
- {
- Pos = MAP_APPFONT ( 89, 218 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- };
- CancelButton PB_CANCEL
- {
- Pos = MAP_APPFONT ( 142 , 218 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- };
- HelpButton PB_HELP
- {
- Pos = MAP_APPFONT ( 198 , 218 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/uiconfig/swriter/ui/mmmailbody.ui b/sw/uiconfig/swriter/ui/mmmailbody.ui
new file mode 100644
index 0000000..936e09a
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/mmmailbody.ui
@@ -0,0 +1,468 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkDialog" id="MailBodyDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">E-Mail Message</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">2</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="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_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="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_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="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_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="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">12</property>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="bodyft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Write your message here</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">bodymle:border</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="GtkTextView" id="bodymle:border">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">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="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="GtkGrid" id="grid4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="greeting">
+ <property name="label" translatable="yes">This e-mail should contain a salutation</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</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="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="generalft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">General salutation</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">general</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="GtkComboBoxText" id="general">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="has_entry">True</property>
+ <child internal-child="entry">
+ <object class="GtkEntry" id="comboboxtext-entry1">
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ </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>
+ <child>
+ <object class="GtkGrid" id="grid6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid8">
+ <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>
+ <property name="row_homogeneous">True</property>
+ <child>
+ <object class="GtkLabel" id="femalefi">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Address list field indicating a female recipient</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">3</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="femaleft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Female</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">female</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="maleft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Male</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">male</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="femalecolft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Field name</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="femalefieldft">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Field value</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="newfemale">
+ <property name="label" translatable="yes">_New...</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="valign">center</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="newmale">
+ <property name="label" translatable="yes">N_ew...</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="valign">center</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="female">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">center</property>
+ <property name="hexpand">True</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="GtkComboBoxText" id="male">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">center</property>
+ <property name="hexpand">True</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>
+ <child>
+ <object class="GtkComboBoxText" id="femalecol">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">center</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="femalefield">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">center</property>
+ <property name="hexpand">True</property>
+ <property name="has_entry">True</property>
+ <child internal-child="entry">
+ <object class="GtkEntry" id="comboboxtext-entry2">
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </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="GtkCheckButton" id="personalized">
+ <property name="label" translatable="yes">Insert personalized salutation</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</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>
+ </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>
+ </child>
+ </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="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </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>
+ <object class="GtkSizeGroup" id="sizegroup2">
+ <widgets>
+ <widget name="femaleft"/>
+ <widget name="maleft"/>
+ <widget name="femalecolft"/>
+ <widget name="femalefieldft"/>
+ </widgets>
+ </object>
+</interface>
diff --git a/sw/uiconfig/swriter/ui/tablepreviewdialog.ui b/sw/uiconfig/swriter/ui/tablepreviewdialog.ui
new file mode 100644
index 0000000..934a70f
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/tablepreviewdialog.ui
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkDialog" id="TablePreviewDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Mail Merge Recipients</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">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">center</property>
+ <child>
+ <object class="GtkButton" id="close">
+ <property name="label">gtk-close</property>
+ <property name="use_action_appearance">False</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>
+ <property name="image_position">top</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</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="GtkLabel" id="description">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">The list below shows the contents of: %1</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkDrawingArea" id="beamer">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">close</action-widget>
+ </action-widgets>
+ </object>
+</interface>
commit 5d157ce0d77b7deb6f510eee01c6e211c9713ff3
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Wed Jul 2 11:56:34 2014 +0100
fdo#76260 - don't allocate and free std::strings on each element.
This debug code is quite expensive; 2.5% of document load time;
Avoid the pointless heap allocation, and punt the rest to fdo#80798.
Change-Id: I499b3cf48867d5ed0f2b33b9d12f1c128c993aae
diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
index 2903554..c718a52 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
@@ -402,8 +402,9 @@ bool OOXMLPropertySetImplCompare::operator()(const OOXMLProperty::Pointer_t x,
*/
OOXMLPropertySetImpl::OOXMLPropertySetImpl()
-: msType("OOXMLPropertySetImpl")
{
+ static OString aName("OOXMLPropertySetImpl");
+ maType = aName;
}
OOXMLPropertySetImpl::~OOXMLPropertySetImpl()
@@ -449,7 +450,7 @@ OOXMLPropertySetImpl::end() const
string OOXMLPropertySetImpl::getType() const
{
- return msType;
+ return string(maType.getStr());
}
void OOXMLPropertySetImpl::add(OOXMLProperty::Pointer_t pProperty)
@@ -497,7 +498,7 @@ OOXMLPropertySet * OOXMLPropertySetImpl::clone() const
void OOXMLPropertySetImpl::setType(const string & rsType)
{
- msType = rsType;
+ maType = OString(rsType.c_str(), rsType.size());
}
#ifdef DEBUG_DOMAINMAPPER
diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx
index f2f3f54..e9ca21a 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx
@@ -164,7 +164,7 @@ public:
typedef std::vector<OOXMLProperty::Pointer_t> OOXMLProperties_t;
private:
OOXMLProperties_t mProperties;
- std::string msType;
+ OString maType;
public:
OOXMLPropertySetImpl();
virtual ~OOXMLPropertySetImpl();
More information about the Libreoffice-commits
mailing list