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

2023-11-20 Thread Balazs Varga (via logerrit)
 sw/inc/SwCapConfigProp.hxx   |   38 ++
 sw/source/ui/config/optload.cxx  |  503 ++-
 sw/source/uibase/inc/optload.hxx |   11 
 sw/uiconfig/swriter/ui/optcaptionpage.ui |  206 ++--
 4 files changed, 725 insertions(+), 33 deletions(-)

New commits:
commit 3e81415f7f71b7fe99342c82b3c54011fbcb2dbb
Author: Balazs Varga 
AuthorDate: Fri Nov 17 19:03:51 2023 +0100
Commit: Balazs Varga 
CommitDate: Mon Nov 20 12:55:55 2023 +0100

tdf#158136 - UI: Part 31 - Unify lockdown behavior of Options dialog

for Writer - AutoCaption Page.

Change-Id: Ia3c37510477542556c3302d2013fe10a4ae00545
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159594
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sw/inc/SwCapConfigProp.hxx b/sw/inc/SwCapConfigProp.hxx
new file mode 100644
index ..20257f3d9716
--- /dev/null
+++ b/sw/inc/SwCapConfigProp.hxx
@@ -0,0 +1,38 @@
+/* -*- 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 INCLUDED_SW_INC_SWCAPCONFIGPROP_HXX
+#define INCLUDED_SW_INC_SWCAPCONFIGPROP_HXX
+
+enum CapConfigProp
+{
+PROP_CAP_OBJECT_ENABLE = 0, //0
+PROP_CAP_OBJECT_CATEGORY, //1
+PROP_CAP_OBJECT_NUMBERING, //2
+PROP_CAP_OBJECT_NUMBERINGSEPARATOR, //3
+PROP_CAP_OBJECT_CAPTIONTEXT, //4
+PROP_CAP_OBJECT_DELIMITER, //5
+PROP_CAP_OBJECT_LEVEL, //6
+PROP_CAP_OBJECT_POSITION, //7
+PROP_CAP_OBJECT_CHARACTERSTYLE, //8
+PROP_CAP_OBJECT_APPLYATTRIBUTES, //9
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 675a2d48e8d6..3adf4dce4e34 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -55,6 +55,436 @@
 
 using namespace ::com::sun::star;
 
+static bool lcl_isPropertyReadOnly(const SwCapObjType eType, const 
CapConfigProp ePropType, const SvGlobalName& rOleId)
+{
+bool bReadOnly = false;
+
+switch (ePropType)
+{
+case PROP_CAP_OBJECT_ENABLE:
+{
+switch (eType)
+{
+case TABLE_CAP:
+bReadOnly = 
officecfg::Office::Writer::Insert::Caption::WriterObject::Table::Enable::isReadOnly();
+break;
+case FRAME_CAP:
+bReadOnly = 
officecfg::Office::Writer::Insert::Caption::WriterObject::Frame::Enable::isReadOnly();
+break;
+case GRAPHIC_CAP:
+bReadOnly = 
officecfg::Office::Writer::Insert::Caption::WriterObject::Graphic::Enable::isReadOnly();
+break;
+case OLE_CAP:
+{
+if (rOleId == SvGlobalName(SO3_SC_CLASSID)) {
+bReadOnly = 
officecfg::Office::Writer::Insert::Caption::OfficeObject::Calc::Enable::isReadOnly();
+} else if (rOleId == SvGlobalName(SO3_SIMPRESS_CLASSID)) {
+bReadOnly = 
officecfg::Office::Writer::Insert::Caption::OfficeObject::Impress::Enable::isReadOnly();
+} else if (rOleId == SvGlobalName(SO3_SCH_CLASSID)) {
+bReadOnly = 
officecfg::Office::Writer::Insert::Caption::OfficeObject::Chart::Enable::isReadOnly();
+} else if (rOleId == SvGlobalName(SO3_SM_CLASSID)) {
+bReadOnly = 
officecfg::Office::Writer::Insert::Caption::OfficeObject::Formula::Enable::isReadOnly();
+} else if (rOleId == SvGlobalName(SO3_SDRAW_CLASSID)) {
+bReadOnly = 
officecfg::Office::Writer::Insert::Caption::OfficeObject::Draw::Enable::isReadOnly();
+} else if (rOleId == SvGlobalName(SO3_OUT_CLASSID)) {
+bReadOnly = 
officecfg::Office::Writer::Insert::Caption::OfficeObject::OLEMisc::Enable::isReadOnly();
+} else {
+// Should not reach it.
+}
+}
+break;
+default:
+break;
+

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

2023-07-26 Thread Heiko Tietze (via logerrit)
 sw/inc/docstat.hxx   |1 
 sw/source/core/doc/docstat.cxx   |2 
 sw/source/ui/dialog/wordcountdialog.cxx  |5 
 sw/source/uibase/inc/wordcountdialog.hxx |1 
 sw/source/uibase/uiview/view2.cxx|5 
 sw/uiconfig/swriter/ui/wordcount.ui  |  192 +--
 6 files changed, 122 insertions(+), 84 deletions(-)

New commits:
commit 90e3af16c12f94f487ff7516048a239db1d2ff7d
Author: Heiko Tietze 
AuthorDate: Tue Jul 18 15:02:58 2023 +0200
Commit: Heiko Tietze 
CommitDate: Wed Jul 26 10:37:35 2023 +0200

Resolves tdf#95329 - Number of comments in word count dialog

Change-Id: I29ca811065cce83f9c8630f79a2b78c2c3fe0da1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154581
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/sw/inc/docstat.hxx b/sw/inc/docstat.hxx
index fd53d80bfcbf..84476db5c065 100644
--- a/sw/inc/docstat.hxx
+++ b/sw/inc/docstat.hxx
@@ -36,6 +36,7 @@ struct SW_DLLPUBLIC SwDocStat
 sal_uLong   nAsianWord;
 sal_uLong   nChar;
 sal_uLong   nCharExcludingSpaces;
+sal_uLong   nComments;
 boolbModified;
 
 SwDocStat();
diff --git a/sw/source/core/doc/docstat.cxx b/sw/source/core/doc/docstat.cxx
index c34e8d094ba2..959c61833dd6 100644
--- a/sw/source/core/doc/docstat.cxx
+++ b/sw/source/core/doc/docstat.cxx
@@ -30,6 +30,7 @@ SwDocStat::SwDocStat() :
 nAsianWord(0),
 nChar(0),
 nCharExcludingSpaces(0),
+nComments(0),
 bModified(true)
 {}
 
@@ -45,6 +46,7 @@ void SwDocStat::Reset()
 nAsianWord = 0;
 nChar   = 0;
 nCharExcludingSpaces = 0;
+nComments = 0;
 bModified = true;
 }
 
diff --git a/sw/source/ui/dialog/wordcountdialog.cxx 
b/sw/source/ui/dialog/wordcountdialog.cxx
index a96e1c50b3be..b0b92a6ae1a7 100644
--- a/sw/source/ui/dialog/wordcountdialog.cxx
+++ b/sw/source/ui/dialog/wordcountdialog.cxx
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define IS_MOBILE_PHONE (comphelper::LibreOfficeKit::isActive() && 
SfxViewShell::Current() && SfxViewShell::Current()->isLOKMobilePhone())
 
@@ -64,6 +65,7 @@ void SwWordCountFloatDlg::SetValues(const SwDocStat& 
rCurrent, const SwDocStat&
 setValue(*m_xDocCharacterFT, rDoc.nChar, rLocaleData);
 setValue(*m_xDocCharacterExcludingSpacesFT, rDoc.nCharExcludingSpaces, 
rLocaleData);
 setValue(*m_xDocCjkcharsFT, rDoc.nAsianWord, rLocaleData);
+setValue(*m_xDocComments, rCurrent.nComments, rLocaleData);
 
 if (m_xStandardizedPagesLabelFT->get_visible())
 {
@@ -120,6 +122,7 @@ SwWordCountFloatDlg::SwWordCountFloatDlg(SfxBindings* 
_pBindings,
 , m_xCjkcharsLabelFT2(m_xBuilder->weld_label("cjkcharsft2"))
 , m_xStandardizedPagesLabelFT(m_xBuilder->weld_label("standardizedpages"))
 , 
m_xStandardizedPagesLabelFT2(m_xBuilder->weld_label("standardizedpages2"))
+, m_xDocComments(m_xBuilder->weld_label("docComments"))
 {
 showCJK(SvtCJKOptions::IsAnyEnabled());
 
showStandardizedPages(officecfg::Office::Writer::WordCount::ShowStandardizedPageCount::get());
@@ -143,6 +146,8 @@ void SwWordCountFloatDlg::UpdateCounts()
 aDocStat = rSh.GetUpdatedDocStat();
 rSh.EndAction();
 }
+SwPostItMgr* pPostItMgr = rSh.GetPostItMgr();
+aCurrCnt.nComments = pPostItMgr->end() - pPostItMgr->begin();
 SetValues(aCurrCnt, aDocStat);
 }
 }
diff --git a/sw/source/uibase/inc/wordcountdialog.hxx 
b/sw/source/uibase/inc/wordcountdialog.hxx
index c5b23f0c5307..ffa0b6478dcc 100644
--- a/sw/source/uibase/inc/wordcountdialog.hxx
+++ b/sw/source/uibase/inc/wordcountdialog.hxx
@@ -43,6 +43,7 @@ class SwWordCountFloatDlg final : public 
SfxModelessDialogController
 std::unique_ptr m_xCjkcharsLabelFT2;
 std::unique_ptr m_xStandardizedPagesLabelFT;
 std::unique_ptr m_xStandardizedPagesLabelFT2;
+std::unique_ptr m_xDocComments;
 
 public:
 SwWordCountFloatDlg(SfxBindings* pBindings,
diff --git a/sw/source/uibase/uiview/view2.cxx 
b/sw/source/uibase/uiview/view2.cxx
index 2903bbf19c03..0fb4f0e22a2b 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1875,9 +1875,12 @@ void SwView::StateStatusLine(SfxItemSet )
 OUString aWordCount(SwResId(pResId));
 aWordCount = aWordCount.replaceAll("$1", aWordArg);
 aWordCount = aWordCount.replaceAll("$2", aCharArg);
-
 rSet.Put( SfxStringItem( FN_STAT_WORDCOUNT, aWordCount ) );
 
+SwPostItMgr* pPostItMgr = rShell.GetPostItMgr();
+if (pPostItMgr)
+selectionStats.nComments = pPostItMgr->end() - 
pPostItMgr->begin();
+
 SwWordCountWrapper *pWrdCnt = 
static_cast(GetViewFrame().GetChildWindow(SwWordCountWrapper::GetChildWindowId()));
 if (pWrdCnt)
 pWrdCnt->SetCounts(selectionStats, documentStats);
diff --git 

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

2023-06-07 Thread Samuel Mehrbrodt (via logerrit)
 sw/inc/AccessibilityCheckStrings.hrc  |2 
 sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx |  164 +-
 sw/source/uibase/sidebar/A11yCheckIssuesPanel.hxx |   29 ++
 sw/uiconfig/swriter/ui/a11ycheckissuespanel.ui|  251 +-
 4 files changed, 432 insertions(+), 14 deletions(-)

New commits:
commit ee8405d7567c35ae240e014fe1da289b4bb1abe2
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jun 5 14:20:37 2023 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu Jun 8 07:56:16 2023 +0200

tdf#155505 Group issues by type in a11y sidebar panel

Change-Id: I87349e9d3f5680751a91264e055e4579c97fa93e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152617
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sw/inc/AccessibilityCheckStrings.hrc 
b/sw/inc/AccessibilityCheckStrings.hrc
index cb461b1013f8..12e2e1fa2b8d 100644
--- a/sw/inc/AccessibilityCheckStrings.hrc
+++ b/sw/inc/AccessibilityCheckStrings.hrc
@@ -13,7 +13,7 @@
 
 #define NC_(Context, String) TranslateId(Context, reinterpret_cast(u8##String))
 
-#define STR_NO_ALT  NC_("STR_NO_ALT", "No alt or 
description text for graphic “%OBJECT_NAME%”.")
+#define STR_NO_ALT  NC_("STR_NO_ALT", "%OBJECT_NAME%")
 #define STR_TABLE_MERGE_SPLIT   NC_("STR_TABLE_MERGE_SPLIT", "Table 
“%OBJECT_NAME%” contains merges or splits.")
 #define STR_FAKE_NUMBERING  NC_("STR_FAKE_NUMBERING", "Simulated 
numbering “%NUMBERING%”.")
 #define STR_HYPERLINK_TEXT_IS_LINK  NC_("STR_HYPERLINK_TEXT_IS_LINK", 
"Hyperlink text is the same as the link address “%LINK%”.")
diff --git a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx 
b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
index c0c8595408c6..1728ed58e266 100644
--- a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
+++ b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx
@@ -69,7 +69,24 @@ std::unique_ptr 
A11yCheckIssuesPanel::Create(weld::Widget* pParent,
 
 A11yCheckIssuesPanel::A11yCheckIssuesPanel(weld::Widget* pParent, SfxBindings* 
pBindings)
 : PanelLayout(pParent, "A11yCheckIssuesPanel", 
"modules/swriter/ui/a11ycheckissuespanel.ui")
-, m_xAccessibilityCheckBox(m_xBuilder->weld_box("accessibilityCheckBox"))
+, m_xExpanderDocument(m_xBuilder->weld_expander("expand_document"))
+, m_xExpanderStyles(m_xBuilder->weld_expander("expand_styles"))
+, m_xExpanderNoAlt(m_xBuilder->weld_expander("expand_no_alt"))
+, m_xExpanderTable(m_xBuilder->weld_expander("expand_table"))
+, m_xExpanderFormatting(m_xBuilder->weld_expander("expand_formatting"))
+, m_xExpanderHyperlink(m_xBuilder->weld_expander("expand_hyperlink"))
+, m_xExpanderFakes(m_xBuilder->weld_expander("expand_fakes"))
+, m_xExpanderNumbering(m_xBuilder->weld_expander("expand_numbering"))
+, m_xExpanderOther(m_xBuilder->weld_expander("expand_other"))
+, m_xBoxDocument(m_xBuilder->weld_box("box_document"))
+, m_xBoxStyles(m_xBuilder->weld_box("box_styles"))
+, m_xBoxNoAlt(m_xBuilder->weld_box("box_no_alt"))
+, m_xBoxTable(m_xBuilder->weld_box("box_table"))
+, m_xBoxFormatting(m_xBuilder->weld_box("box_formatting"))
+, m_xBoxHyperlink(m_xBuilder->weld_box("box_hyperlink"))
+, m_xBoxFakes(m_xBuilder->weld_box("box_fakes"))
+, m_xBoxNumbering(m_xBuilder->weld_box("box_numbering"))
+, m_xBoxOther(m_xBuilder->weld_box("box_other"))
 , mpBindings(pBindings)
 , mpDoc(nullptr)
 , maA11yCheckController(FN_STAT_ACCESSIBILITY_CHECK, *pBindings, *this)
@@ -108,7 +125,24 @@ void A11yCheckIssuesPanel::ImplDestroy()
 batch->commit();
 mpBindings->Invalidate(SID_ACCESSIBILITY_CHECK_ONLINE);
 }
-m_xAccessibilityCheckBox.reset();
+m_xExpanderDocument.reset();
+m_xExpanderStyles.reset();
+m_xExpanderNoAlt.reset();
+m_xExpanderTable.reset();
+m_xExpanderFormatting.reset();
+m_xExpanderHyperlink.reset();
+m_xExpanderFakes.reset();
+m_xExpanderNumbering.reset();
+m_xExpanderOther.reset();
+m_xBoxDocument.reset();
+m_xBoxStyles.reset();
+m_xBoxNoAlt.reset();
+m_xBoxTable.reset();
+m_xBoxFormatting.reset();
+m_xBoxHyperlink.reset();
+m_xBoxFakes.reset();
+m_xBoxNumbering.reset();
+m_xBoxOther.reset();
 }
 
 A11yCheckIssuesPanel::~A11yCheckIssuesPanel() { 
suppress_fun_call_w_exception(ImplDestroy()); }
@@ -122,23 +156,133 @@ void A11yCheckIssuesPanel::populateIssues()
 m_aIssueCollection = aCheck.getIssueCollection();
 
 // Remove old issue widgets
-for (auto const& xEntry : m_aAccessibilityCheckEntries)
-m_xAccessibilityCheckBox->move(xEntry->get_widget(), nullptr);
+for (auto const& xEntry : m_aDocumentEntries)
+m_xBoxDocument->move(xEntry->get_widget(), nullptr);
+for (auto const& xEntry : m_aStylesEntries)
+m_xBoxStyles->move(xEntry->get_widget(), nullptr);
+for (auto const& xEntry : m_aNoAltEntries)
+

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

2023-05-02 Thread Justin Luth (via logerrit)
 sw/inc/swabstdlg.hxx|1 +
 sw/source/ui/dialog/swdlgfact.cxx   |5 +
 sw/source/ui/dialog/swdlgfact.hxx   |1 +
 sw/source/ui/misc/pagenumberdlg.cxx |7 +++
 sw/source/uibase/inc/pagenumberdlg.hxx  |2 ++
 sw/source/uibase/shells/textfld.cxx |   29 +
 sw/uiconfig/swriter/ui/pagenumberdlg.ui |   26 --
 7 files changed, 65 insertions(+), 6 deletions(-)

New commits:
commit 751cb2cf874a2d017cae699a7983e4419dcbe6f6
Author: Justin Luth 
AuthorDate: Fri Apr 28 13:38:13 2023 -0400
Commit: Miklos Vajna 
CommitDate: Tue May 2 15:36:07 2023 +0200

tdf#86630 sw page number wizard: add page total

1 - 3 is the format of the output.
Not totally clear, but it is at least not in English,
and I'm fairly certain I've seen this format used numerous times.

At least everything is there, and all the user needs to do is
modify the - to be whatever they want.

I checked to see if by some miracle localedata had a specification
for "X of Y" but it doesn't.

Change-Id: Iae1e74e612ec449f72086b3f5a5e32713fee4d27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151173
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Miklos Vajna 

diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 49eefef5e4a3..fe6bab309ef9 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -239,6 +239,7 @@ public:
 virtual int GetPageNumberPosition() const = 0;
 virtual int GetPageNumberAlignment() const = 0;
 virtual bool GetMirrorOnEvenPages() const = 0;
+virtual bool GetIncludePageTotal() const = 0;
 virtual SvxNumType GetPageNumberType() const = 0;
 virtual void SetPageNumberType(SvxNumType nSet) = 0;
 };
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index 6ec8e23a6304..90f7c6e34d84 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -647,6 +647,11 @@ bool AbstractSwPageNumberDlg_Impl::GetMirrorOnEvenPages() 
const
 return m_xDlg->GetMirrorOnEvenPages();
 }
 
+bool AbstractSwPageNumberDlg_Impl::GetIncludePageTotal() const
+{
+return m_xDlg->GetIncludePageTotal();
+}
+
 SvxNumType AbstractSwPageNumberDlg_Impl::GetPageNumberType() const
 {
 return m_xDlg->GetPageNumberType();
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index 6d3f37aa6a47..0b6f67b1da23 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -167,6 +167,7 @@ public:
 virtual int GetPageNumberPosition() const override;
 virtual int GetPageNumberAlignment() const override;
 bool GetMirrorOnEvenPages() const override;
+bool GetIncludePageTotal() const override;
 SvxNumType GetPageNumberType() const override;
 void SetPageNumberType(SvxNumType nSet) override;
 };
diff --git a/sw/source/ui/misc/pagenumberdlg.cxx 
b/sw/source/ui/misc/pagenumberdlg.cxx
index 06facf1bff22..1b5084c5e94b 100644
--- a/sw/source/ui/misc/pagenumberdlg.cxx
+++ b/sw/source/ui/misc/pagenumberdlg.cxx
@@ -31,6 +31,7 @@ SwPageNumberDlg::SwPageNumberDlg(weld::Window* pParent)
 , m_xPageNumberPosition(m_xBuilder->weld_combo_box("positionCombo"))
 , m_xPageNumberAlignment(m_xBuilder->weld_combo_box("alignmentCombo"))
 , m_xMirrorOnEvenPages(m_xBuilder->weld_check_button("mirrorCheckbox"))
+, m_xIncludePageTotal(m_xBuilder->weld_check_button("pagetotalCheckbox"))
 , m_xPageNumberTypeLB(new 
SvxPageNumberListBox(m_xBuilder->weld_combo_box("numfmtlb")))
 , m_xPreviewImage(m_xBuilder->weld_image("previewImage"))
 , m_aPageNumberPosition(1) // bottom
@@ -44,6 +45,7 @@ SwPageNumberDlg::SwPageNumberDlg(weld::Window* pParent)
 m_xPageNumberAlignment->set_active(m_aPageNumberAlignment);
 m_xMirrorOnEvenPages->set_sensitive(false);
 m_xMirrorOnEvenPages->set_state(TRISTATE_TRUE);
+m_xIncludePageTotal->set_state(TRISTATE_FALSE);
 
SvxNumOptionsTabPageHelper::GetI18nNumbering(m_xPageNumberTypeLB->get_widget(),
  
::std::numeric_limits::max());
 m_xPageNumberTypeLB->connect_changed(LINK(this, SwPageNumberDlg, 
NumberTypeSelectHdl));
@@ -80,6 +82,11 @@ bool SwPageNumberDlg::GetMirrorOnEvenPages()
&& m_xMirrorOnEvenPages->get_state() == TRISTATE_TRUE;
 }
 
+bool SwPageNumberDlg::GetIncludePageTotal()
+{
+return m_xIncludePageTotal->get_state() == TRISTATE_TRUE;
+}
+
 void SwPageNumberDlg::SetPageNumberType(SvxNumType nSet)
 {
 m_nPageNumberType = nSet;
diff --git a/sw/source/uibase/inc/pagenumberdlg.hxx 
b/sw/source/uibase/inc/pagenumberdlg.hxx
index b5dccd93127a..cf719b492a33 100644
--- a/sw/source/uibase/inc/pagenumberdlg.hxx
+++ b/sw/source/uibase/inc/pagenumberdlg.hxx
@@ -32,6 +32,7 @@ class SwPageNumberDlg final : public SfxDialogController
 std::unique_ptr m_xPageNumberPosition;
 

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

2023-04-28 Thread Justin Luth (via logerrit)
 sw/inc/crsrsh.hxx   |2 
 sw/inc/swabstdlg.hxx|1 
 sw/source/core/crsr/crstrvl.cxx |   11 ++-
 sw/source/ui/dialog/swdlgfact.cxx   |5 +
 sw/source/ui/dialog/swdlgfact.hxx   |1 
 sw/source/ui/misc/pagenumberdlg.cxx |   14 
 sw/source/uibase/inc/pagenumberdlg.hxx  |2 
 sw/source/uibase/shells/textfld.cxx |  103 +++-
 sw/uiconfig/swriter/ui/pagenumberdlg.ui |   24 ++-
 9 files changed, 153 insertions(+), 10 deletions(-)

New commits:
commit 21fad629e72791f6cc1791fdba858bf52b9bfeff
Author: Justin Luth 
AuthorDate: Wed Apr 26 13:29:25 2023 -0400
Commit: Miklos Vajna 
CommitDate: Fri Apr 28 08:08:06 2023 +0200

tdf#86630 sw page number wizard: mirror right/left

If the user puts the page numbers on the left or right
side of the page, they usually want that mirrored
on even and odd pages.

This got rather tricky, but in the end
I have enough safeguards that it seems
to work logically and stablely.
So I think it is ready to be submitted.

Change-Id: I321e575cd9f6718579ffee99f1258bffe26581f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151152
Reviewed-by: Justin Luth 
Tested-by: Jenkins

diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 319911a33e65..5f99deff126b 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -675,7 +675,7 @@ public:
 bool GotoHeaderText();   ///< jump from the content to the header
 bool GotoFooterText();   ///< jump from the content to the footer
 // jump to the header/footer of the given or current PageDesc
-bool SetCursorInHdFt( size_t nDescNo, bool bInHeader );
+bool SetCursorInHdFt(size_t nDescNo, bool bInHeader, bool bEven = false, 
bool bFirst = false);
 // is point of cursor in header/footer. pbInHeader return true if it is
 // in a headerframe otherwise in a footerframe
 bool IsInHeaderFooter( bool* pbInHeader = nullptr ) const;
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 9749539c5643..49eefef5e4a3 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -238,6 +238,7 @@ protected:
 public:
 virtual int GetPageNumberPosition() const = 0;
 virtual int GetPageNumberAlignment() const = 0;
+virtual bool GetMirrorOnEvenPages() const = 0;
 virtual SvxNumType GetPageNumberType() const = 0;
 virtual void SetPageNumberType(SvxNumType nSet) = 0;
 };
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index c5c0c741f5dd..c8b1e3d8513a 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -189,7 +189,7 @@ bool SwCursorShell::GotoFooterText()
 return nullptr != pFrame;
 }
 
-bool SwCursorShell::SetCursorInHdFt( size_t nDescNo, bool bInHeader )
+bool SwCursorShell::SetCursorInHdFt(size_t nDescNo, bool bInHeader, bool 
bEven, bool bFirst)
 {
 SwDoc *pMyDoc = GetDoc();
 const SwPageDesc* pDesc = nullptr;
@@ -216,14 +216,17 @@ bool SwCursorShell::SetCursorInHdFt( size_t nDescNo, bool 
bInHeader )
 const SwFormatContent* pCnt = nullptr;
 if( bInHeader )
 {
-// mirrored pages? ignore for now
-const SwFormatHeader& rHd = pDesc->GetMaster().GetHeader();
+const SwFormatHeader& rHd
+= bEven ? bFirst ? pDesc->GetFirstLeft().GetHeader() : 
pDesc->GetLeft().GetHeader()
+: bFirst ? pDesc->GetFirstMaster().GetHeader() : 
pDesc->GetMaster().GetHeader();
 if( rHd.GetHeaderFormat() )
 pCnt = ()->GetContent();
 }
 else
 {
-const SwFormatFooter& rFt = pDesc->GetMaster().GetFooter();
+const SwFormatFooter& rFt
+= bEven ? bFirst ? pDesc->GetFirstLeft().GetFooter() : 
pDesc->GetLeft().GetFooter()
+: bFirst ? pDesc->GetFirstMaster().GetFooter() : 
pDesc->GetMaster().GetFooter();
 if( rFt.GetFooterFormat() )
 pCnt = ()->GetContent();
 }
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index 672b953ff8e2..6ec8e23a6304 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -642,6 +642,11 @@ int AbstractSwPageNumberDlg_Impl::GetPageNumberAlignment() 
const
 return m_xDlg->GetPageNumberAlignment();
 }
 
+bool AbstractSwPageNumberDlg_Impl::GetMirrorOnEvenPages() const
+{
+return m_xDlg->GetMirrorOnEvenPages();
+}
+
 SvxNumType AbstractSwPageNumberDlg_Impl::GetPageNumberType() const
 {
 return m_xDlg->GetPageNumberType();
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index 788aaa9c6f80..6d3f37aa6a47 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -166,6 +166,7 @@ public:
 virtual bool StartExecuteAsync(AsyncContext ) override;
 virtual int GetPageNumberPosition() const override;
 virtual int GetPageNumberAlignment() const 

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

2023-04-26 Thread Justin Luth (via logerrit)
 sw/inc/swabstdlg.hxx|3 ++
 sw/source/ui/dialog/swdlgfact.cxx   |   10 +++
 sw/source/ui/dialog/swdlgfact.hxx   |2 +
 sw/source/ui/misc/pagenumberdlg.cxx |   16 +++
 sw/source/uibase/inc/pagenumberdlg.hxx  |7 +
 sw/source/uibase/shells/textfld.cxx |   17 +++-
 sw/uiconfig/swriter/ui/pagenumberdlg.ui |   43 
 7 files changed, 97 insertions(+), 1 deletion(-)

New commits:
commit f6f14b98b8be8319c810708e73cffdb189c467ca
Author: Justin Luth 
AuthorDate: Tue Apr 25 16:45:52 2023 -0400
Commit: Miklos Vajna 
CommitDate: Wed Apr 26 09:35:31 2023 +0200

tdf#86630 sw page number wizard: set page style numbering type

Giving the user the opportunity to change the number type
is rather important. Well, maybe not too critical since I
assume that the default page number style is relatively accurate
for each locale, and at least for English we always just
use numbers for the page style.

However, a wizard is the perfect place to expose such a setting,
otherwise it is buried in page style settings - far from
where anyone would look when inserting a page number.

Change-Id: I9053504fa55d16ebf5424946b480cb044b79988c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151005
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Miklos Vajna 

diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index cbe4cd9aaf80..9749539c5643 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -19,6 +19,7 @@
 #ifndef INCLUDED_SW_INC_SWABSTDLG_HXX
 #define INCLUDED_SW_INC_SWABSTDLG_HXX
 
+#include 
 #include 
 #include 
 #include 
@@ -237,6 +238,8 @@ protected:
 public:
 virtual int GetPageNumberPosition() const = 0;
 virtual int GetPageNumberAlignment() const = 0;
+virtual SvxNumType GetPageNumberType() const = 0;
+virtual void SetPageNumberType(SvxNumType nSet) = 0;
 };
 
 /**
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index 694813bbb51a..672b953ff8e2 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -642,6 +642,16 @@ int AbstractSwPageNumberDlg_Impl::GetPageNumberAlignment() 
const
 return m_xDlg->GetPageNumberAlignment();
 }
 
+SvxNumType AbstractSwPageNumberDlg_Impl::GetPageNumberType() const
+{
+return m_xDlg->GetPageNumberType();
+}
+
+void AbstractSwPageNumberDlg_Impl::SetPageNumberType(SvxNumType nSet)
+{
+m_xDlg->SetPageNumberType(nSet);
+}
+
 bool AbstractInsFootNoteDlg_Impl::IsEndNote()
 {
 return m_xDlg->IsEndNote();
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index 8fee741ff96b..788aaa9c6f80 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -166,6 +166,8 @@ public:
 virtual bool StartExecuteAsync(AsyncContext ) override;
 virtual int GetPageNumberPosition() const override;
 virtual int GetPageNumberAlignment() const override;
+SvxNumType GetPageNumberType() const override;
+void SetPageNumberType(SvxNumType nSet) override;
 };
 
 class AbstractGenericDialog_Impl : public VclAbstractDialog
diff --git a/sw/source/ui/misc/pagenumberdlg.cxx 
b/sw/source/ui/misc/pagenumberdlg.cxx
index ed889a277852..0c6357e7ef99 100644
--- a/sw/source/ui/misc/pagenumberdlg.cxx
+++ b/sw/source/ui/misc/pagenumberdlg.cxx
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -29,6 +30,7 @@ SwPageNumberDlg::SwPageNumberDlg(weld::Window* pParent)
 , m_xCancel(m_xBuilder->weld_button("cancel"))
 , m_xPageNumberPosition(m_xBuilder->weld_combo_box("positionCombo"))
 , m_xPageNumberAlignment(m_xBuilder->weld_combo_box("alignmentCombo"))
+, m_xPageNumberTypeLB(new 
SvxPageNumberListBox(m_xBuilder->weld_combo_box("numfmtlb")))
 , m_xPreviewImage(m_xBuilder->weld_image("previewImage"))
 , m_aPageNumberPosition(1) // bottom
 , m_aPageNumberAlignment(1) // center
@@ -38,6 +40,9 @@ SwPageNumberDlg::SwPageNumberDlg(weld::Window* pParent)
 m_xPageNumberAlignment->connect_changed(LINK(this, SwPageNumberDlg, 
AlignmentSelectHdl));
 m_xPageNumberPosition->set_active(m_aPageNumberPosition);
 m_xPageNumberAlignment->set_active(m_aPageNumberAlignment);
+
SvxNumOptionsTabPageHelper::GetI18nNumbering(m_xPageNumberTypeLB->get_widget(),
+ 
::std::numeric_limits::max());
+m_xPageNumberTypeLB->connect_changed(LINK(this, SwPageNumberDlg, 
NumberTypeSelectHdl));
 updateImage();
 }
 
@@ -55,6 +60,17 @@ IMPL_LINK_NOARG(SwPageNumberDlg, AlignmentSelectHdl, 
weld::ComboBox&, void)
 updateImage();
 }
 
+IMPL_LINK_NOARG(SwPageNumberDlg, NumberTypeSelectHdl, weld::ComboBox&, void)
+{
+m_nPageNumberType = m_xPageNumberTypeLB->get_active_id();
+}
+
+void SwPageNumberDlg::SetPageNumberType(SvxNumType nSet)
+{
+m_nPageNumberType = nSet;
+

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

2022-12-26 Thread Jim Raykowski (via logerrit)
 sw/inc/doc.hxx |2 +
 sw/source/core/doc/doc.cxx |   24 ++
 sw/source/core/inc/rolbck.hxx  |2 -
 sw/source/core/undo/unattr.cxx |   26 
 sw/source/uibase/utlui/content.cxx |   32 -
 sw/uiconfig/swriter/ui/navigatorcontextmenu.ui |   10 +++
 6 files changed, 93 insertions(+), 3 deletions(-)

New commits:
commit 9d387cc1e7848848c41f29ad91fee44ade79f678
Author: Jim Raykowski 
AuthorDate: Sat Dec 17 00:21:28 2022 -0900
Commit: Jim Raykowski 
CommitDate: Tue Dec 27 06:33:36 2022 +

tdf#140666 Make delete reference possible from the Navigator

This patch makes it possible to delete a reference without having to do
the steps given in the help.

"References are fields. To remove a reference, delete the field. If you
set a longer text as a reference and you do not want to re-enter it
after deleting the reference, select the text and copy it to the
clipboard. You can then reinsert it as "unformatted text" at the same
position using the command Edit - Paste special. The text remains
intact while the reference is deleted."

Change-Id: If363340288de25aacbc28acd5858ce275f309af6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144406
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 80aa234cc6e3..8412f1aebf63 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1312,6 +1312,8 @@ public:
  If array pointer is 0 return only whether a RefMark is set in document. */
 sal_uInt16 GetRefMarks( std::vector* = nullptr ) const;
 
+void DeleteFormatRefMark(const SwFormatRefMark* pFormatRefMark);
+
 // Insert label. If a FlyFormat is created, return it.
 SwFlyFrameFormat* InsertLabel( const SwLabelType eType, const OUString 
, const OUString& rSeparator,
 const OUString& rNumberingSeparator,
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 0c00640cc10c..07f54882fbdd 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -68,6 +68,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -1115,6 +1117,28 @@ sal_uInt16 SwDoc::GetRefMarks( std::vector* 
pNames ) const
 return nCount;
 }
 
+void SwDoc::DeleteFormatRefMark(const SwFormatRefMark* pFormatRefMark)
+{
+const SwTextRefMark* pTextRefMark = pFormatRefMark->GetTextRefMark();
+SwTextNode& rTextNd = const_cast(pTextRefMark->GetTextNode());
+std::unique_ptr aRegHistory;
+if (GetIDocumentUndoRedo().DoesUndo())
+{
+SwUndoResetAttr* pUndo = new SwUndoResetAttr(SwPosition(rTextNd, 
pTextRefMark->GetStart()),
+ RES_TXTATR_REFMARK);
+GetIDocumentUndoRedo().AppendUndo(std::unique_ptr(pUndo));
+aRegHistory.reset(new SwRegHistory(rTextNd, >GetHistory()));
+rTextNd.GetpSwpHints()->Register(aRegHistory.get());
+}
+rTextNd.DeleteAttribute(const_cast(pTextRefMark));
+if (GetIDocumentUndoRedo().DoesUndo())
+{
+if (rTextNd.GetpSwpHints())
+rTextNd.GetpSwpHints()->DeRegister();
+}
+getIDocumentState().SetModified();
+}
+
 static bool lcl_SpellAndGrammarAgain( SwNode* pNd, void* pArgs )
 {
 SwTextNode *pTextNode = pNd->GetTextNode();
diff --git a/sw/source/core/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx
index 1497da7e7b89..3d3b224d03a5 100644
--- a/sw/source/core/inc/rolbck.hxx
+++ b/sw/source/core/inc/rolbck.hxx
@@ -159,7 +159,7 @@ class SwHistorySetRefMark final : public SwHistoryHint
 public:
 SwHistorySetRefMark( const SwTextRefMark* pTextHt, SwNodeOffset nNode );
 virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ) override;
-
+const OUString& GetRefName() {return m_RefName;}
 };
 
 class SwHistorySetTOXMark final : public SwHistoryHint
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index 19929658e342..d8dc236c92e2 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -55,6 +55,7 @@
 #include 
 #include 
 #include 
+#include 
 
 SwUndoFormatAttrHelper::SwUndoFormatAttrHelper(SwFormat& rFormat, bool 
bSvDrwPt)
 : SwClient()
@@ -571,6 +572,10 @@ void SwUndoResetAttr::UndoImpl(::sw::UndoRedoContext & 
rContext)
 if( pTNd )
 pTNd->DontExpandFormat( m_nSttContent, false );
 }
+else if (m_nFormatId == RES_TXTATR_REFMARK)
+{
+rDoc.GetEditShell()->SwViewShell::UpdateFields();
+}
 
 AddUndoRedoPaM(rContext);
 }
@@ -621,6 +626,27 @@ void SwUndoResetAttr::RedoImpl(::sw::UndoRedoContext & 
rContext)
 }
 }
 break;
+case RES_TXTATR_REFMARK:
+{
+SfxItemPool::Item2Range aRange = 
rDoc.GetAttrPool().GetItemSurrogates(RES_TXTATR_REFMARK);
+SwHistoryHint* pHistoryHint = 

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

2022-11-28 Thread Caolán McNamara (via logerrit)
 sw/inc/shellio.hxx |2 
 sw/source/core/inc/SwXMLTextBlocks.hxx |1 
 sw/source/core/inc/swblocks.hxx|1 
 sw/source/core/swg/SwXMLTextBlocks.cxx |   53 ++
 sw/source/core/swg/swblocks.cxx|   10 ++
 sw/source/ui/misc/glossary.cxx |  117 +
 sw/source/uibase/dochdl/gloshdl.cxx|   22 ++
 sw/source/uibase/inc/gloshdl.hxx   |2 
 sw/source/uibase/inc/glossary.hxx  |3 
 sw/uiconfig/swriter/ui/autotext.ui |2 
 10 files changed, 213 insertions(+)

New commits:
commit 61f42c31b02c569ad22cad5e71b20cb0df8fd1f8
Author: Caolán McNamara 
AuthorDate: Sun Nov 27 21:19:45 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 28 17:28:10 2022 +0100

Resolves: tdf#147203 allow dnd between autotext categories

restores various methods removed as unused since original
regression at

commit 4830a1bae89a8ed60696503e315ffd42c70dff74
Date:   Thu May 30 16:12:23 2019 +0100

weld SwGlossaryDlg

Change-Id: I5c6186b9f45f3c0957926de2861eb6bc76dda73d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143363
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index e476b530fd8a..0fe3985597ef 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -327,6 +327,8 @@ public:
 
 bool   Delete( sal_uInt16 );
 void   Rename( sal_uInt16, const OUString*, const OUString* );
+ErrCode const & CopyBlock( SwTextBlocks const & rSource, OUString& 
rSrcShort,
+const OUString& rLong );
 
 bool   BeginGetDoc( sal_uInt16 );   // Read text modules.
 void   EndGetDoc(); // Release text modules.
diff --git a/sw/source/core/inc/SwXMLTextBlocks.hxx 
b/sw/source/core/inc/SwXMLTextBlocks.hxx
index bd6458e717d0..9132b5993e8f 100644
--- a/sw/source/core/inc/SwXMLTextBlocks.hxx
+++ b/sw/source/core/inc/SwXMLTextBlocks.hxx
@@ -61,6 +61,7 @@ public:
 virtual ~SwXMLTextBlocks() override;
 virtual ErrCode Delete( sal_uInt16 ) override;
 virtual ErrCode Rename( sal_uInt16, const OUString& ) override;
+virtual ErrCode CopyBlock( SwImpBlocks& rImp, OUString& rShort, const 
OUString& rLong) override;
 virtual void  ClearDoc() override;
 virtual ErrCode GetDoc( sal_uInt16 ) override;
 virtual ErrCode BeginPutDoc( const OUString&, const OUString& ) override;
diff --git a/sw/source/core/inc/swblocks.hxx b/sw/source/core/inc/swblocks.hxx
index d822acbe26ab..7bd877ad653d 100644
--- a/sw/source/core/inc/swblocks.hxx
+++ b/sw/source/core/inc/swblocks.hxx
@@ -106,6 +106,7 @@ public:
 
 virtual ErrCode Delete( sal_uInt16 ) = 0;
 virtual ErrCode Rename( sal_uInt16, const OUString& ) = 0;
+virtual ErrCode CopyBlock( SwImpBlocks& rImp, OUString& rShort, const 
OUString& rLong) = 0;
 virtual ErrCode GetDoc( sal_uInt16 ) = 0;
 virtual ErrCode BeginPutDoc( const OUString&, const OUString& ) = 0;
 virtual ErrCode PutDoc() = 0;
diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx 
b/sw/source/core/swg/SwXMLTextBlocks.cxx
index f48d007db3c4..3bb108cbf22e 100644
--- a/sw/source/core/swg/SwXMLTextBlocks.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks.cxx
@@ -232,6 +232,59 @@ ErrCode SwXMLTextBlocks::Rename( sal_uInt16 nIdx, const 
OUString& rNewShort )
 return ERRCODE_NONE;
 }
 
+ErrCode SwXMLTextBlocks::CopyBlock( SwImpBlocks& rDestImp, OUString& rShort,
+const OUString& rLong)
+{
+ErrCode nError = ERRCODE_NONE;
+OpenFile();
+rDestImp.OpenFile(false);
+const OUString aGroup( rShort );
+bool bTextOnly = IsOnlyTextBlock ( rShort ) ;//pImp->pBlkRoot->IsStream( 
aGroup );
+sal_uInt16 nIndex = GetIndex ( rShort );
+OUString sPackageName( GetPackageName (nIndex) );
+OUString sDestShortName( sPackageName );
+sal_uInt16 nIdx = 0;
+
+OSL_ENSURE( m_xBlkRoot.is(), "No storage set" );
+if(!m_xBlkRoot.is())
+return ERR_SWG_WRITE_ERROR;
+
+uno::Reference < container::XNameAccess > 
xAccess(static_cast(rDestImp).m_xBlkRoot);
+while ( xAccess->hasByName( sDestShortName ) )
+{
+++nIdx;
+// If someone is that crazy ...
+if(USHRT_MAX == nIdx)
+{
+CloseFile();
+rDestImp.CloseFile();
+return ERR_SWG_WRITE_ERROR;
+}
+sDestShortName = sPackageName + OUString::number( nIdx );
+}
+
+try
+{
+uno::Reference < embed::XStorage > rSourceRoot = 
m_xBlkRoot->openStorageElement( aGroup, embed::ElementModes::READ );
+uno::Reference < embed::XStorage > rDestRoot = 
static_cast(rDestImp).m_xBlkRoot->openStorageElement( 
sDestShortName, embed::ElementModes::READWRITE );
+rSourceRoot->copyToStorage( rDestRoot );
+}
+catch (const uno::Exception&)
+{
+nError = ERR_SWG_WRITE_ERROR;
+}
+
+

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

2022-04-05 Thread Mike Kaganski (via logerrit)
 sw/inc/strings.hrc |2 ++
 sw/source/ui/dbui/mmoutputtypepage.cxx |5 -
 sw/source/ui/inc/mmresultdialogs.hxx   |2 ++
 sw/uiconfig/swriter/ui/mmsendmails.ui  |2 +-
 4 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit abaa11329822d659581d7860a82308409189f0f5
Author: Mike Kaganski 
AuthorDate: Tue Apr 5 10:20:00 2022 +0300
Commit: Mike Kaganski 
CommitDate: Tue Apr 5 17:02:13 2022 +0200

Related tdf#148384: Improve mail merge results reporting

1. Disambiguate "address validity check failed" from "mail delivery error".
2. Change "Cancel" button into "Close" when operation is finished.
3. "%1 of %2 emails sent" changed to "%1 of %2 emails processed", since
   the number does not reflect the sent status, and includes failures.

Change-Id: Idb4934618a843133dfb35de10b9903875094366a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132565
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index b9a5cd8b6d82..b534cb115b80 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -1379,9 +1379,11 @@
 #define STR_SAVEACOPY_SRC   NC_("STR_SAVEACOPY_SRC", 
"~Export copy of source...")
 
 #define ST_CONTINUE NC_("ST_CONTINUE", "~Continue")
+#define ST_CLOSE_DIALOG NC_("ST_CLOSE_DIALOG", 
"~Close")
 #define ST_SENDINGTONC_("ST_SENDINGTO", "Sending 
to: %1")
 #define ST_COMPLETEDNC_("ST_COMPLETED", 
"Successfully sent")
 #define ST_FAILED   NC_("ST_FAILED", "Sending 
failed")
+#define ST_ADDRESS_INVALID  NC_("ST_ADDRESS_INVALID", 
"Address invalid")
 
 #define STR_SENDER_TOKENS   NC_("STR_SENDER_TOKENS", 
"COMPANY;CR;FIRSTNAME; ;LASTNAME;CR;ADDRESS;CR;CITY; ;STATEPROV; 
;POSTALCODE;CR;COUNTRY;CR;")
 
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx 
b/sw/source/ui/dbui/mmoutputtypepage.cxx
index dd05de3095a7..01a8b2c3ff66 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -205,9 +205,11 @@ public:
 SwSendMailDialog::SwSendMailDialog(weld::Window *pParent, 
SwMailMergeConfigItem& rConfigItem)
 : GenericDialogController(pParent, "modules/swriter/ui/mmsendmails.ui", 
"SendMailsDialog")
 , m_sContinue(SwResId( ST_CONTINUE ))
+, m_sClose(SwResId(ST_CLOSE_DIALOG))
 , m_sSendingTo(   SwResId(ST_SENDINGTO ))
 , m_sCompleted(   SwResId(ST_COMPLETED ))
 , m_sFailed(  SwResId(ST_FAILED ))
+, m_sAddressInvalid(SwResId(ST_ADDRESS_INVALID))
 , m_bCancel(false)
 , m_bDestructionEnabled(false)
 , m_pImpl(new SwSendMailDialog_Impl)
@@ -395,7 +397,7 @@ void  SwSendMailDialog::IterateMails()
 m_xStatus->append();
 m_xStatus->set_image(m_nSendCount, RID_BMP_FORMULA_CANCEL, 0);
 m_xStatus->set_text(m_nSendCount, sMessage.replaceFirst("%1", 
pCurrentMailDescriptor->sEMail), 1);
-m_xStatus->set_text(m_nSendCount, m_sFailed, 2);
+m_xStatus->set_text(m_nSendCount, m_sAddressInvalid, 2);
 ++m_nSendCount;
 ++m_nErrorCount;
 UpdateTransferStatus( );
@@ -517,6 +519,7 @@ void SwSendMailDialog::AllMailsSent()
 if (m_nSendCount == m_nExpectedCount)
 {
 m_xStop->set_sensitive(false);
+m_xCancel->set_label(m_sClose);
 // Leave open if some kind of error occurred
 if (m_nErrorCount == 0)
 {
diff --git a/sw/source/ui/inc/mmresultdialogs.hxx 
b/sw/source/ui/inc/mmresultdialogs.hxx
index a5b96cf27175..d00e99044f0e 100644
--- a/sw/source/ui/inc/mmresultdialogs.hxx
+++ b/sw/source/ui/inc/mmresultdialogs.hxx
@@ -140,11 +140,13 @@ class SwSendMailDialog final : public 
weld::GenericDialogController
 {
 OUStringm_sContinue;
 OUStringm_sStop;
+OUStringm_sClose;
 OUStringm_sTransferStatus;
 OUStringm_sErrorStatus;
 OUStringm_sSendingTo;
 OUStringm_sCompleted;
 OUStringm_sFailed;
+OUStringm_sAddressInvalid;
 
 boolm_bCancel;
 boolm_bDestructionEnabled;
diff --git a/sw/uiconfig/swriter/ui/mmsendmails.ui 
b/sw/uiconfig/swriter/ui/mmsendmails.ui
index 0f2d7f76b99a..15e97871639c 100644
--- a/sw/uiconfig/swriter/ui/mmsendmails.ui
+++ b/sw/uiconfig/swriter/ui/mmsendmails.ui
@@ -147,7 +147,7 @@
 False
 start
 True
-%1 of %2 emails sent
+%1 of %2 emails processed
 0
 0
   


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

2022-01-13 Thread Caolán McNamara (via logerrit)
 sw/inc/viewopt.hxx|5 +-
 sw/source/core/txtnode/fntcache.cxx   |   59 ++
 sw/uiconfig/swriter/ui/viewoptionspage.ui |3 -
 3 files changed, 23 insertions(+), 44 deletions(-)

New commits:
commit 935761709fb7629c8d23aa5dc8bfcbd2988f5bbf
Author: Caolán McNamara 
AuthorDate: Wed Jan 12 20:44:37 2022 +
Commit: Caolán McNamara 
CommitDate: Thu Jan 13 20:26:25 2022 +0100

tdf#144862 adjust positioning experimental options

drop GlyphPositioningMode::ClassicInspired as that just demos the
tradeoffs of the original GlyphPositioningMode::Classic vs the chaos of
GlyphPositioningMode::PreferReadability where hinting at small sizes
pushes the text outside its layout bounds.

add GlyphPositioningMode::LayoutAndMatchRender to demo the next
option.

so:
GlyphPositioningMode::Classic This is as it ~always was, using the
technique documented at https://wiki.openoffice.org/wiki/Writer/WYSIWYG

GlyphPositioningMode::Layout This is just taking the high resolution
layout positions, dropping the "Classic" technique and let vcl do its
default scaling and rendering of the glyph positions as happens in
editeng.

GlyphPositioningMode::LayoutAndMatchRender same as Layout, but during
text render preserve the scaled glyph positions as floating point
positions and pass through to the various platform text renderers
configured as best to handle that.

Change-Id: Ic37bb8f3cf4472bdc3c48f02b1f9057a0f80cbd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128360
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index 6c93602a85ae..a6ac48b31581 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -128,9 +128,8 @@ namespace o3tl {
 
 enum class GlyphPositioningMode {
 Classic,
-ClassicInspired,
-PreferLayout,
-PreferReadability
+Layout,
+LayoutAndMatchRender
 };
 
 class SW_DLLPUBLIC SwViewOption
diff --git a/sw/source/core/txtnode/fntcache.cxx 
b/sw/source/core/txtnode/fntcache.cxx
index b56672460afb..698ddd6051bf 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -865,21 +865,17 @@ namespace
 tools::Long nScr = rScrArray[i] - rScrArray[i - 1];
 switch (eGlyphPositioningMode)
 {
-case GlyphPositioningMode::PreferLayout:
+case GlyphPositioningMode::Layout:  // <- glyph positioning stable 
during editing,
+// but at ~90% screen zoom 
rendering will
+// start to show kerning 
problems
+case GlyphPositioningMode::LayoutAndMatchRender: // <- glyph 
positioning stable during editing,
+// and should 
render nicely at sane zoom levels
 rScrPos = rKernArray[i - 1] + nScr;
 // just accept the print layout positions, this is what 
editeng does
 // 
https://freddie.witherden.org/pages/font-rasterisation/#application-requirements
 break;
-case GlyphPositioningMode::PreferReadability:
-{
-// Overwrite KernArray with the screen-optimized glyph 
positions
-// these will generally be too wide at small sizes and text 
will spill out
-// of its designated zones
-rKernArray[i - 1] = rScrPos;
-rScrPos += nScr;
-break;
-}
-case GlyphPositioningMode::Classic:
+case GlyphPositioningMode::Classic: // <- layout unstable during 
editing, fairly arbitrary glyph
+// positioning depends on zoom
 {
 // https://wiki.openoffice.org/wiki/Writer/WYSIWYG
 if (nCh == CH_BLANK)
@@ -899,27 +895,6 @@ namespace
 rKernArray[i - 1] = rScrPos - nScr;
 break;
 }
-case GlyphPositioningMode::ClassicInspired:
-{
-// use the print layout positions for blanks and the first 
glyph after a blank or -
-// and use screen layout within a run of glyphs
-const bool bSyncWithPrintLayout = nCh == CH_BLANK || cChPrev 
== CH_BLANK || cChPrev == '-';
-if (bSyncWithPrintLayout)
-{
-// Leave KernArray untouched at its print layout position 
in this case
-// sync ScreenPos to print layout position
-rScrPos = rKernArray[i - 1] + nScr;
-}
-else
-{
-// Overwrite KernArray within the run to use 
screen-optimized glyph positions
-rKernArray[i - 1] = rScrPos;
- 

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

2020-07-30 Thread Jim Raykowski (via logerrit)
 sw/inc/strings.hrc |4 
 sw/source/uibase/inc/conttree.hxx  |2 
 sw/source/uibase/utlui/content.cxx |  178 -
 sw/uiconfig/swriter/ui/navigatorcontextmenu.ui |   20 ++
 4 files changed, 199 insertions(+), 5 deletions(-)

New commits:
commit dce97e84f2bb748e4403841593bb7b0b92ea44c4
Author: Jim Raykowski 
AuthorDate: Mon Jul 27 21:03:58 2020 -0800
Commit: Mike Kaganski 
CommitDate: Thu Jul 30 12:04:56 2020 +0200

tdf#38093 Writer outline folding - Navigator UI

Patch 5/6 that breaks down https://gerrit.libreoffice.org/c/core/+/96672

Adds submenu 'Outline Content Visibilty' and action handling for submenu
items to Navigator Headings context menu.

Change-Id: Iccdcbc7518a83cc1b2e2e75f3052f8dbbffb1338
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99656
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index 20d45f5cc19b..a9b2ab36d587 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -647,6 +647,10 @@
 #define STR_OUTLINE_CONTENT_TOGGLE_VISIBILITY_EXT   
NC_("STR_OUTLINE_CONTENT_TOGGLE_VISIBILITY_EXT", "hold Ctrl or right-click to 
include sub levels")
 #define STR_ClICK_OUTLINE_CONTENT_TOGGLE_VISIBILITY 
NC_("STR_CLICK_OUTLINE_CONTENT_TOGGLE_VISIBILITY", "Click to Toggle Outline 
Content Visibility")
 #define STR_CLICK_OUTLINE_CONTENT_TOGGLE_VISIBILITY_EXT 
NC_("STR_CLICK_OUTLINE_CONTENT_TOGGLE_VISIBILITY_EXT", "right-click to include 
sub levels")
+#define STR_OUTLINE_CONTENT_VISIBILITY  NC_("STR_OUTLINE_CONTENT", 
"Outline Content Visibility")
+#define STR_OUTLINE_CONTENT_VISIBILITY_TOGGLE   
NC_("STR_OUTLINE_CONTENT_VISIBILITY_TOGGLE", "Toggle")
+#define STR_OUTLINE_CONTENT_VISIBILITY_SHOW_ALL 
NC_("STR_OUTLINE_CONTENT_VISIBILITY_SHOW_ALL", "Show All")
+#define STR_OUTLINE_CONTENT_VISIBILITY_HIDE_ALL 
NC_("STR_OUTLINE_CONTENT_VISIBILITY_HIDE_ALL", "Hide All")
 
 #define STR_EXPANDALL   NC_("STR_EXPANDALL", "Expand 
All")
 #define STR_COLLAPSEALL NC_("STR_COLLAPSEALL", 
"Collapse All")
diff --git a/sw/source/uibase/inc/conttree.hxx 
b/sw/source/uibase/inc/conttree.hxx
index 0a090a1d18f0..6f65b1984523 100644
--- a/sw/source/uibase/inc/conttree.hxx
+++ b/sw/source/uibase/inc/conttree.hxx
@@ -121,7 +121,7 @@ class SwContentTree final : public SfxListener
 // outline root mode drag & drop
 std::vector> m_aDndOutlinesSelected;
 
-bool m_bIsInPromoteDemote = false;
+bool m_bIgnoreViewChange = false;
 
 /**
  * Before any data will be deleted, the last active entry has to be found.
diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 1fcd1873d8f3..e92cddc641ef 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1152,6 +1152,122 @@ static bool 
lcl_InsertExpandCollapseAllItem(weld::TreeView& rContentTree, weld::
 return true;
 }
 
+static void lcl_SetOutlineContentEntriesSensitivities(SwContentTree* pThis, 
weld::TreeView& rContentTree, weld::TreeIter& rEntry, weld::Menu& rPop)
+{
+rPop.set_sensitive(OString::number(1512), false);
+rPop.set_sensitive(OString::number(1513), false);
+rPop.set_sensitive(OString::number(1514), false);
+
+if 
(!pThis->GetActiveWrtShell()->GetViewOptions()->IsShowOutlineContentVisibilityButton())
+return;
+
+// todo: multi selection
+if (rContentTree.count_selected_rows() > 1)
+return;
+
+const SwNodes& rNodes = pThis->GetWrtShell()->GetNodes();
+const SwOutlineNodes& rOutlineNodes = rNodes.GetOutLineNds();
+size_t nOutlinePos = weld::GetAbsPos(rContentTree, rEntry);
+
+bool bIsRoot = lcl_IsContentType(rEntry, rContentTree);
+
+if (!bIsRoot)
+--nOutlinePos;
+
+if (nOutlinePos >= rOutlineNodes.size())
+ return;
+
+int nFirstLevel = 
pThis->GetWrtShell()->getIDocumentOutlineNodesAccess()->getOutlineLevel(nOutlinePos);
+{
+// determine if any concerned outline node has content
+bool bHasContent(false);
+size_t nPos = nOutlinePos;
+SwNode* pSttNd = rOutlineNodes[nPos];
+SwNode* pEndNd = ();
+if (rOutlineNodes.size() > nPos + 1)
+pEndNd = rOutlineNodes[nPos + 1];
+
+// selected
+SwNodeIndex aIdx(*pSttNd);
+if (rNodes.GoNext() != pEndNd)
+bHasContent = true;
+
+// decendants
+if (!bHasContent && (rContentTree.iter_has_child(rEntry) || 
rContentTree.get_children_on_demand(rEntry)))
+{
+while (++nPos < rOutlineNodes.size() &&
+  (bIsRoot || 
pThis->GetWrtShell()->getIDocumentOutlineNodesAccess()->getOutlineLevel(nPos) > 
nFirstLevel))
+{
+pSttNd = rOutlineNodes[nPos];
+pEndNd = ();
+if (rOutlineNodes.size() > nPos + 1)
+

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

2020-01-14 Thread Caolán McNamara (via logerrit)
 sw/inc/PageColumnPopup.hxx |1 
 sw/source/uibase/sidebar/PageColumnControl.cxx |   82 ++-
 sw/source/uibase/sidebar/PageColumnControl.hxx |   27 ++---
 sw/source/uibase/sidebar/PageColumnPopup.cxx   |   14 ++
 sw/uiconfig/swriter/ui/pagecolumncontrol.ui|  135 +
 sw/uiconfig/swriter/ui/pagesizecontrol.ui  |   21 ++-
 6 files changed, 149 insertions(+), 131 deletions(-)

New commits:
commit bcc6b77164134a1ea84f8ac2f5b8e6afa02e4228
Author: Caolán McNamara 
AuthorDate: Tue Jan 14 11:47:42 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Jan 14 14:35:02 2020 +0100

weld PageColumnControl

Change-Id: I943191b63d32cf5027a587c23fc73bbb2e7d730e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86753
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sw/inc/PageColumnPopup.hxx b/sw/inc/PageColumnPopup.hxx
index a16b2893c807..18665fef9a50 100644
--- a/sw/inc/PageColumnPopup.hxx
+++ b/sw/inc/PageColumnPopup.hxx
@@ -28,6 +28,7 @@ public:
 PageColumnPopup(const css::uno::Reference& 
rContext);
 virtual ~PageColumnPopup() override;
 
+virtual std::unique_ptr weldPopupWindow() override;
 using svt::ToolboxController::createPopupWindow;
 virtual VclPtr createPopupWindow( vcl::Window* pParent ) 
override;
 
diff --git a/sw/source/uibase/sidebar/PageColumnControl.cxx 
b/sw/source/uibase/sidebar/PageColumnControl.cxx
index a7ee125ce33d..c8f5e3db2f11 100644
--- a/sw/source/uibase/sidebar/PageColumnControl.cxx
+++ b/sw/source/uibase/sidebar/PageColumnControl.cxx
@@ -31,11 +31,11 @@
 
 namespace sw { namespace sidebar {
 
-PageColumnControl::PageColumnControl(PageColumnPopup* pControl, vcl::Window* 
pParent)
-: ToolbarPopup(pControl->getFrameInterface(), pParent, 
"PageColumnControl", "modules/swriter/ui/pagecolumncontrol.ui" )
+PageColumnControl::PageColumnControl(PageColumnPopup* pControl, weld::Widget* 
pParent)
+: WeldToolbarPopup(pControl->getFrameInterface(), pParent, 
"modules/swriter/ui/pagecolumncontrol.ui", "PageColumnControl")
+, m_xMoreButton(m_xBuilder->weld_button("moreoptions"))
+, m_xControl(pControl)
 {
-get( m_pMoreButton, "moreoptions" );
-
 bool bLandscape = false;
 const SfxPoolItem *pItem;
 if ( SfxViewFrame::Current() )
@@ -46,51 +46,43 @@ PageColumnControl::PageColumnControl(PageColumnPopup* 
pControl, vcl::Window* pPa
 
 if ( bLandscape )
 {
-get(m_pOneColumn, "column1L");
-get(m_pTwoColumns, "column2L");
-get(m_pThreeColumns, "column3L");
-get(m_pLeft, "columnleftL");
-get(m_pRight, "columnrightL");
+m_xOneColumn = m_xBuilder->weld_button("column1L");
+m_xTwoColumns = m_xBuilder->weld_button("column2L");
+m_xThreeColumns = m_xBuilder->weld_button("column3L");
+m_xLeft = m_xBuilder->weld_button("columnleftL");
+m_xRight = m_xBuilder->weld_button("columnrightL");
 }
 else
 {
-get(m_pOneColumn, "column1");
-get(m_pTwoColumns, "column2");
-get(m_pThreeColumns, "column3");
-get(m_pLeft, "columnleft");
-get(m_pRight, "columnright");
+m_xOneColumn = m_xBuilder->weld_button("column1");
+m_xTwoColumns = m_xBuilder->weld_button( "column2");
+m_xThreeColumns = m_xBuilder->weld_button("column3");
+m_xLeft = m_xBuilder->weld_button("columnleft");
+m_xRight = m_xBuilder->weld_button("columnright");
 }
 
-m_pOneColumn->Show();
-m_pTwoColumns->Show();
-m_pThreeColumns->Show();
-m_pLeft->Show();
-m_pRight->Show();
+m_xOneColumn->show();
+m_xTwoColumns->show();
+m_xThreeColumns->show();
+m_xLeft->show();
+m_xRight->show();
 
-m_pOneColumn->SetClickHdl( LINK( this, PageColumnControl, 
ColumnButtonClickHdl_Impl ) );
-m_pTwoColumns->SetClickHdl( LINK( this, PageColumnControl, 
ColumnButtonClickHdl_Impl ) );
-m_pThreeColumns->SetClickHdl( LINK( this, PageColumnControl, 
ColumnButtonClickHdl_Impl ) );
-m_pLeft->SetClickHdl( LINK( this, PageColumnControl, 
ColumnButtonClickHdl_Impl ) );
-m_pRight->SetClickHdl( LINK( this, PageColumnControl, 
ColumnButtonClickHdl_Impl ) );
+m_xOneColumn->connect_clicked( LINK( this, PageColumnControl, 
ColumnButtonClickHdl_Impl ) );
+m_xTwoColumns->connect_clicked( LINK( this, PageColumnControl, 
ColumnButtonClickHdl_Impl ) );
+m_xThreeColumns->connect_clicked( LINK( this, PageColumnControl, 
ColumnButtonClickHdl_Impl ) );
+m_xLeft->connect_clicked( LINK( this, PageColumnControl, 
ColumnButtonClickHdl_Impl ) );
+m_xRight->connect_clicked( LINK( this, PageColumnControl, 
ColumnButtonClickHdl_Impl ) );
 
-m_pMoreButton->SetClickHdl( LINK( this, PageColumnControl, 
MoreButtonClickHdl_Impl ) );
-m_pMoreButton->GrabFocus();
+m_xMoreButton->connect_clicked( LINK( this, PageColumnControl, 
MoreButtonClickHdl_Impl ) );
 }
 

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

2019-08-05 Thread Gabor Kelemen (via logerrit)
 sw/inc/strings.hrc|1 
 sw/source/ui/dbui/addresslistdialog.cxx   |   31 ++
 sw/source/ui/dbui/addresslistdialog.hxx   |2 +
 sw/uiconfig/swriter/ui/selectaddressdialog.ui |   23 +++
 4 files changed, 52 insertions(+), 5 deletions(-)

New commits:
commit 007fd868e398f51363a24aa24c244cb8096e0579
Author: Gabor Kelemen 
AuthorDate: Wed Jul 24 01:22:47 2019 +0200
Commit: László Németh 
CommitDate: Mon Aug 5 10:38:56 2019 +0200

tdf#113699 Add Remove button to Select Address List dialog of MM Wizard

To make it easier to remove no longer needed data base connections
But only enable it when the list has items to remove

Change-Id: I288ec2e4d95ea570c2b42e0024c8e9bb4207b397
Reviewed-on: https://gerrit.libreoffice.org/76209
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Tested-by: Heiko Tietze 

diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index 660b87da3111..1164c8daeb16 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -807,6 +807,7 @@
 #define ST_SALUTATIONELEMENTNC_("ST_SALUTATIONELEMENT", 
"Salutation elements")
 #define ST_MATCHESTONC_("ST_MATCHESTO", "Matches 
to field:")
 #define ST_PREVIEW  NC_("ST_PREVIEW", "Preview")
+#define ST_DELETE_CONFIRM   NC_("ST_DELETE_CONFIRM", "Do 
you want to delete this registered data source?")
 
 #define STR_NOTASSIGNED NC_("STR_NOTASSIGNED", " not 
yet matched ")
 #define STR_FILTER_ALL  NC_("STR_FILTER_ALL", "All 
files")
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx 
b/sw/source/ui/dbui/addresslistdialog.cxx
index f1d0f49a555d..12818a36e2a5 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -52,6 +52,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -126,6 +127,7 @@ 
SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent)
 , m_xConnecting(m_xBuilder->weld_label("connecting"))
 , m_xListLB(m_xBuilder->weld_tree_view("sources"))
 , m_xLoadListPB(m_xBuilder->weld_button("add"))
+, m_xRemovePB(m_xBuilder->weld_button("remove"))
 , m_xCreateListPB(m_xBuilder->weld_button("create"))
 , m_xFilterPB(m_xBuilder->weld_button("filter"))
 , m_xEditPB(m_xBuilder->weld_button("edit"))
@@ -141,6 +143,7 @@ 
SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent)
 m_xDescriptionFI->set_label(sTemp);
 m_xFilterPB->connect_clicked( LINK( this, SwAddressListDialog,
FilterHdl_Impl ));
 m_xLoadListPB->connect_clicked( LINK( this, SwAddressListDialog,  
LoadHdl_Impl ));
+m_xRemovePB->connect_clicked( LINK(this, SwAddressListDialog,   
RemoveHdl_Impl ));
 m_xCreateListPB->connect_clicked( LINK( this, 
SwAddressListDialog,CreateHdl_Impl ));
 m_xEditPB->connect_clicked(LINK( this, SwAddressListDialog, EditHdl_Impl));
 m_xTablePB->connect_clicked(LINK( this, SwAddressListDialog, 
TableSelectHdl_Impl));
@@ -207,6 +210,7 @@ 
SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent)
 
 m_xOK->set_sensitive(m_xListLB->n_children() > 0 && bEnableOK);
 m_xEditPB->set_sensitive(bEnableEdit);
+m_xRemovePB->set_sensitive(m_xListLB->n_children() > 0);
 m_xListLB->connect_changed(LINK(this, SwAddressListDialog, 
ListBoxSelectHdl_Impl));
 TableSelectHdl(nullptr);
 }
@@ -282,9 +286,35 @@ IMPL_LINK_NOARG(SwAddressListDialog, LoadHdl_Impl, 
weld::Button&, void)
 m_xListLB->set_id(*m_xIter, 
OUString::number(reinterpret_cast(pUserData)));
 m_xListLB->select(*m_xIter);
 ListBoxSelectHdl_Impl(*m_xListLB);
+m_xRemovePB->set_sensitive(true);
 }
 }
 
+IMPL_LINK_NOARG(SwAddressListDialog, RemoveHdl_Impl, weld::Button&, void)
+{
+int nEntry = m_xListLB->get_selected_index();
+if (nEntry != -1)
+{
+std::unique_ptr 
xQuery(Application::CreateMessageDialog(getDialog(),
+VclMessageType::Question, 
VclButtonsType::YesNo, SwResId(ST_DELETE_CONFIRM)));
+if (xQuery->run() == RET_YES)
+{   // Remove data source connection
+SwDBManager::RevokeDataSource(m_xListLB->get_selected_text());
+// Remove item from the list
+m_xListLB->remove(nEntry);
+// If this was the last item, disable the Remove & Edit buttons 
and enable Create
+if (m_xListLB->n_children() < 1 )
+{
+m_xRemovePB->set_sensitive(false);
+m_xEditPB->set_sensitive(false);
+m_xCreateListPB->set_sensitive(true);
+}
+}
+}
+
+
+}
+
 IMPL_LINK_NOARG(SwAddressListDialog, CreateHdl_Impl, weld::Button&, void)
 {
 SwCreateAddressListDialog aDlg(m_xDialog.get(), /*sInputURL*/OUString(), 

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

2019-03-01 Thread Libreoffice Gerrit user
 sw/inc/strings.hrc  |2 
 sw/source/ui/dbui/addresslistdialog.cxx |9 +
 sw/source/ui/dbui/selectdbtabledialog.cxx   |  130 
 sw/source/ui/dbui/selectdbtabledialog.hxx   |   18 +--
 sw/uiconfig/swriter/ui/selecttabledialog.ui |   71 +--
 5 files changed, 113 insertions(+), 117 deletions(-)

New commits:
commit b164e74e85fc4c99f1042f22b5e3afc99ed159ca
Author: Caolán McNamara 
AuthorDate: Thu Feb 28 13:30:13 2019 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 1 11:03:55 2019 +0100

weld SwSelectDBTableDialog

Change-Id: I3759d4da18a7cb5a8fce500bd15e7a004e36c605
Reviewed-on: https://gerrit.libreoffice.org/68507
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index c5fdd50f5f77..85ec816ad3d8 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -829,8 +829,6 @@
 #define ST_FINISH   NC_("ST_FINISH", "~Finish")
 #define ST_MMWTITLE NC_("ST_MMWTITLE", "Mail Merge 
Wizard")
 
-#define ST_NAME NC_("ST_NAME", "Name")
-#define ST_TYPE NC_("ST_TYPE", "Type")
 #define ST_TABLENC_("ST_TABLE", "Table")
 #define ST_QUERYNC_("ST_QUERY", "Query")
 
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx 
b/sw/source/ui/dbui/addresslistdialog.cxx
index 767800ec8f43..9d62691d751c 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -550,14 +551,14 @@ void SwAddressListDialog::DetectTablesAndQueries(
 if(nTables > 1 && bWidthDialog)
 {
 //now call the table select dialog - if more than one table 
exists
-VclPtrInstance pDlg(this, 
pUserData->xConnection);
+SwSelectDBTableDialog aDlg(GetFrameWeld(), 
pUserData->xConnection);
 const OUString sTable = SvTabListBox::GetEntryText(pSelect, 
ITEMID_TABLE - 1);
 if(!sTable.isEmpty())
-pDlg->SetSelectedTable(sTable, pUserData->nCommandType == 
CommandType::TABLE);
-if(RET_OK == pDlg->Execute())
+aDlg.SetSelectedTable(sTable, pUserData->nCommandType == 
CommandType::TABLE);
+if(RET_OK == aDlg.run())
 {
 bool bIsTable;
-m_aDBData.sCommand = pDlg->GetSelectedTable(bIsTable);
+m_aDBData.sCommand = aDlg.GetSelectedTable(bIsTable);
 m_aDBData.nCommandType = bIsTable ? CommandType::TABLE : 
CommandType::QUERY;
 pUserData->nCommandType = m_aDBData.nCommandType;
 }
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx 
b/sw/source/ui/dbui/selectdbtabledialog.cxx
index f931563cd46a..c7c309265f5a 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -43,66 +43,21 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
 
-class SwAddressTable : public SvSimpleTable
-{
-public:
-explicit SwAddressTable(SvSimpleTableContainer& rParent);
-void InsertHeaderItem(sal_uInt16 nColumn, const OUString& rText);
-virtual void Resize() override;
-void setColSizes();
-};
-
-SwAddressTable::SwAddressTable(SvSimpleTableContainer& rParent)
-: SvSimpleTable(rParent, 0)
-{
-SetSpaceBetweenEntries(3);
-SetSelectionMode(SelectionMode::Single);
-SetDragDropMode(DragDropMode::NONE);
-EnableAsyncDrag(false);
-}
-
-void SwAddressTable::InsertHeaderItem(sal_uInt16 nColumn, const OUString& 
rText)
-{
-GetTheHeaderBar().InsertItem( nColumn, rText, 0, HeaderBarItemBits::LEFT );
-}
-
-void SwAddressTable::Resize()
-{
-SvSimpleTable::Resize();
-setColSizes();
-}
-
-void SwAddressTable::setColSizes()
-{
-HeaderBar  = GetTheHeaderBar();
-if (rHB.GetItemCount() < 2)
-return;
-
-long nWidth = rHB.GetSizePixel().Width();
-nWidth /= 2;
-
-long nTabs[2] = { 0, nWidth };
-SvSimpleTable::SetTabs(SAL_N_ELEMENTS(nTabs), nTabs, MapUnit::MapPixel);
-}
-
-SwSelectDBTableDialog::SwSelectDBTableDialog(vcl::Window* pParent,
+SwSelectDBTableDialog::SwSelectDBTableDialog(weld::Window* pParent,
 const uno::Reference< sdbc::XConnection>& rConnection)
-: SfxModalDialog(pParent, "SelectTableDialog", 
"modules/swriter/ui/selecttabledialog.ui")
+: SfxDialogController(pParent, "modules/swriter/ui/selecttabledialog.ui", 
"SelectTableDialog")
 , m_xConnection(rConnection)
+, m_xTable(m_xBuilder->weld_tree_view("table"))
+, m_xPreviewPB(m_xBuilder->weld_button("preview"))
 {
-get(m_pPreviewPB, 

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

2018-11-13 Thread Libreoffice Gerrit user
 sw/inc/shellio.hxx  |5 +++
 sw/source/filter/ascii/wrtasc.cxx   |   18 ++--
 sw/source/filter/basflt/fltini.cxx  |   15 ++
 sw/source/ui/dialog/ascfldlg.cxx|   41 +++-
 sw/source/uibase/inc/ascfldlg.hxx   |4 ++
 sw/uiconfig/swriter/ui/asciifilterdialog.ui |   16 ++
 6 files changed, 95 insertions(+), 4 deletions(-)

New commits:
commit 607ab542d043c24bfbd6a08bb62fbebd095114e3
Author: Martin van Zijl 
AuthorDate: Tue Feb 27 07:35:25 2018 +1300
Commit: Mike Kaganski 
CommitDate: Tue Nov 13 14:03:18 2018 +0100

Fix tdf#44291. Allow saving text without byte-order mark.

Change-Id: Ib16a4f37adcb2cfb3d2af9b6af21a4b32e4ae54c
Reviewed-on: https://gerrit.libreoffice.org/50388
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 137cc4e4b50a..2e1e8b8af4f9 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -66,6 +66,7 @@ class SW_DLLPUBLIC SwAsciiOptions
 rtl_TextEncoding eCharSet;
 LanguageType nLanguage;
 LineEnd eCRLF_Flag;
+bool bIncludeBOM;   // Whether to include a byte-order-mark in the output.
 
 public:
 
@@ -81,12 +82,16 @@ public:
 LineEnd GetParaFlags() const { return eCRLF_Flag; }
 void SetParaFlags( LineEnd eVal ) { eCRLF_Flag = eVal; }
 
+bool GetIncludeBOM() const { return bIncludeBOM; }
+void SetIncludeBOM( bool bVal ) { bIncludeBOM = bVal; }
+
 void Reset()
 {
 sFont.clear();
 eCRLF_Flag = GetSystemLineEnd();
 eCharSet = ::osl_getThreadTextEncoding();
 nLanguage = LANGUAGE_SYSTEM;
+bIncludeBOM = true;
 }
 // for the automatic conversion (mail/news/...)
 void ReadUserData( const OUString& );
diff --git a/sw/source/filter/ascii/wrtasc.cxx 
b/sw/source/filter/ascii/wrtasc.cxx
index b8964aaadd8b..c5f6f3fba971 100644
--- a/sw/source/filter/ascii/wrtasc.cxx
+++ b/sw/source/filter/ascii/wrtasc.cxx
@@ -85,6 +85,8 @@ SwASCWriter::~SwASCWriter() {}
 
 ErrCode SwASCWriter::WriteStream()
 {
+bool bIncludeBOM = GetAsciiOptions().GetIncludeBOM();
+
 if( m_bASCII_ParaAsCR )   // If predefined
 m_sLineEnd = "\015";
 else if( m_bASCII_ParaAsBlank )
@@ -154,15 +156,25 @@ ErrCode SwASCWriter::WriteStream()
 switch(GetAsciiOptions().GetCharSet())
 {
 case RTL_TEXTENCODING_UTF8:
-Strm().WriteUChar( 0xEF ).WriteUChar( 0xBB 
).WriteUChar( 0xBF );
+if( bIncludeBOM )
+{
+Strm().WriteUChar( 0xEF ).WriteUChar( 0xBB 
).WriteUChar( 0xBF );
+}
+
 break;
 case RTL_TEXTENCODING_UCS2:
 #ifdef OSL_LITENDIAN
 Strm().SetEndian(SvStreamEndian::LITTLE);
-Strm().WriteUChar( 0xFF ).WriteUChar( 0xFE );
+if( bIncludeBOM )
+{
+Strm().WriteUChar( 0xFF ).WriteUChar( 0xFE 
);
+}
 #else
 Strm().SetEndian(SvStreamEndian::BIG);
-Strm().WriteUChar( 0xFE ).WriteUChar( 0xFF );
+if( bIncludeBOM )
+{
+Strm().WriteUChar( 0xFE ).WriteUChar( 0xFF 
);
+}
 #endif
 break;
 
diff --git a/sw/source/filter/basflt/fltini.cxx 
b/sw/source/filter/basflt/fltini.cxx
index 16756e475729..8ecd122d8757 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -570,6 +570,7 @@ OUString NameFromCharSet(rtl_TextEncoding nChrSet)
 //  2. LineEnd - as CR/LR/CRLF
 //  3. Fontname
 //  4. Language
+//  5. Whether to include byte-order-mark
 // the delimiter character is ","
 
 void SwAsciiOptions::ReadUserData( const OUString& rStr )
@@ -599,6 +600,9 @@ void SwAsciiOptions::ReadUserData( const OUString& rStr )
 case 3: // Language
 nLanguage = LanguageTag::convertToLanguageTypeWithFallback( 
sToken );
 break;
+case 4:
+bIncludeBOM = !(sToken.equalsIgnoreAsciiCase("FALSE"));
+break;
 }
 }
 ++nCnt;
@@ -634,6 +638,17 @@ void SwAsciiOptions::WriteUserData(OUString& rStr)
 rStr += LanguageTag::convertToBcp47(nLanguage);
 }
 rStr += ",";
+
+// 5. Whether to include byte-order-mark
+if( bIncludeBOM )
+{
+rStr += "true";
+}
+else
+{
+rStr += "false";
+}
+rStr += ",";
 }
 
 #ifdef DISABLE_DYNLOADING
diff --git 

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

2018-10-25 Thread Libreoffice Gerrit user
 sw/inc/swabstdlg.hxx|2 
 sw/source/ui/dialog/swdlgfact.cxx   |5 
 sw/source/ui/dialog/swdlgfact.hxx   |2 
 sw/source/ui/index/swuiidxmrk.cxx   |  373 +++-
 sw/source/uibase/inc/swuiidxmrk.hxx |   59 
 sw/source/uibase/shells/textidx.cxx |2 
 sw/uiconfig/swriter/ui/bibliographyentry.ui |   86 ++
 7 files changed, 462 insertions(+), 67 deletions(-)

New commits:
commit af428a570e05a7d38476208152630853dc15f41f
Author: Caolán McNamara 
AuthorDate: Thu Oct 25 12:16:44 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Oct 25 16:39:55 2018 +0200

weld SwAuthMarkModalDlg

Change-Id: Ief3a32a6001cf8b388107c74dc96fc82430d6398
Reviewed-on: https://gerrit.libreoffice.org/62354
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 59f7e12ad227..cf621ad6e89a 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -400,7 +400,7 @@ public:
  bool bDraw,
  const OString& 
sDefPage = OString() ) = 0;
 
-virtual VclPtr CreateSwAutoMarkDialog(vcl::Window 
*pParent, SwWrtShell ) = 0;
+virtual VclPtr CreateSwAutoMarkDialog(weld::Window 
*pParent, SwWrtShell ) = 0;
 
 virtual VclPtr 
CreateSwSelGlossaryDlg(weld::Window *pParent, const OUString ) = 0;
 
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index ed9cc2b47001..15a96a671249 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -875,10 +875,9 @@ VclPtr 
SwAbstractDialogFactory_Impl::CreateSwParaDlg(weld:
 return 
VclPtr::Create(o3tl::make_unique(pParent,
 rVw, rCoreSet, DLG_STD, nullptr, bDraw, sDefPage));
 }
 
-VclPtr 
SwAbstractDialogFactory_Impl::CreateSwAutoMarkDialog(vcl::Window *pParent, 
SwWrtShell )
+VclPtr 
SwAbstractDialogFactory_Impl::CreateSwAutoMarkDialog(weld::Window *pParent, 
SwWrtShell )
 {
-VclPtr pDlg = VclPtr::Create( pParent, rSh );
-return VclPtr::Create( pDlg );
+return 
VclPtr::Create(o3tl::make_unique(pParent,
 rSh));
 }
 
 VclPtr 
SwAbstractDialogFactory_Impl::CreateSwColumnDialog(weld::Window *pParent, 
SwWrtShell )
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index 3943fb159bce..78d79677c0ed 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -629,7 +629,7 @@ public:
 bool bDraw,
 const OString& sDefPage = 
OString()) override;
 
-virtual VclPtr CreateSwAutoMarkDialog(vcl::Window 
*pParent, SwWrtShell ) override;
+virtual VclPtr CreateSwAutoMarkDialog(weld::Window 
*pParent, SwWrtShell ) override;
 virtual VclPtr 
CreateSwSelGlossaryDlg(weld::Window *pParent, const OUString ) 
override;
 virtual VclPtr CreateSwSortingDialog(weld::Window 
*pParent, SwWrtShell ) override;
 virtual VclPtr CreateSwTableHeightDialog(weld::Window 
*pParent, SwWrtShell ) override;
diff --git a/sw/source/ui/index/swuiidxmrk.cxx 
b/sw/source/ui/index/swuiidxmrk.cxx
index cc6775996300..b986228698fa 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -1443,6 +1443,361 @@ void SwAuthorMarkPane::Activate()
 m_pActionBT->Enable(!pSh->HasReadonlySel());
 }
 
+bool AuthorMarkPane::bIsFromComponent = true;
+
+AuthorMarkPane::AuthorMarkPane(weld::DialogController , weld::Builder& 
rBuilder, bool bNewDlg)
+: m_rDialog(rDialog)
+, bNewEntry(bNewDlg)
+, bBibAccessInitialized(false)
+, pSh(nullptr)
+, m_xFromComponentRB(rBuilder.weld_radio_button("frombibliography"))
+, m_xFromDocContentRB(rBuilder.weld_radio_button("fromdocument"))
+, m_xAuthorFI(rBuilder.weld_label("author"))
+, m_xTitleFI(rBuilder.weld_label("title"))
+, m_xEntryED(rBuilder.weld_entry("entryed"))
+, m_xEntryLB(rBuilder.weld_combo_box("entrylb"))
+, m_xActionBT(rBuilder.weld_button(bNewEntry ? OString("insert") : 
OString("modify")))
+, m_xCloseBT(rBuilder.weld_button("close"))
+, m_xCreateEntryPB(rBuilder.weld_button("new"))
+, m_xEditEntryPB(rBuilder.weld_button("edit"))
+{
+m_xActionBT->show(true);
+m_xFromComponentRB->show(bNewEntry);
+m_xFromDocContentRB->show(bNewEntry);
+m_xFromComponentRB->set_active(bIsFromComponent);
+m_xFromDocContentRB->set_active(!bIsFromComponent);
+
+m_xActionBT->connect_clicked(LINK(this,AuthorMarkPane, InsertHdl));
+m_xCloseBT->connect_clicked(LINK(this,AuthorMarkPane, CloseHdl));
+m_xCreateEntryPB->connect_clicked(LINK(this,AuthorMarkPane, 
CreateEntryHdl));
+m_xEditEntryPB->connect_clicked(LINK(this,AuthorMarkPane, CreateEntryHdl));
+m_xFromComponentRB->connect_toggled(LINK(this,AuthorMarkPane, 

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

2018-10-13 Thread Libreoffice Gerrit user
 sw/inc/bitmaps.hlst   |2 +
 sw/source/ui/frmdlg/frmpage.cxx   |3 +
 sw/uiconfig/swriter/ui/picturepage.ui |   53 +-
 3 files changed, 13 insertions(+), 45 deletions(-)

New commits:
commit 0d87cfbdb5a4d75295d83e5246bad2849f5f66b1
Author: Caolán McNamara 
AuthorDate: Sat Oct 13 16:45:39 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 13 18:44:07 2018 +0200

move fallback image out of .ui

Change-Id: Id46f1c2a06e6c32b60e6308a01dc4ee5e75e20ba
Reviewed-on: https://gerrit.libreoffice.org/61743
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/inc/bitmaps.hlst b/sw/inc/bitmaps.hlst
index 1a68eee6c1e2..337b9f697703 100644
--- a/sw/inc/bitmaps.hlst
+++ b/sw/inc/bitmaps.hlst
@@ -100,6 +100,8 @@
 #define RID_BMP_WRAP_PARALLEL   "sw/res/wr04.png"
 #define RID_BMP_WRAP_CONTOUR_PARALLEL   "sw/res/wr010.png"
 
+#define RID_BMP_PREVIEW_FALLBACK"sw/res/image-example.png"
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 65b6260dfc16..f2a816a99c2d 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -22,6 +22,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -2384,7 +2385,7 @@ SwGrfExtPage::SwGrfExtPage(vcl::Window *pParent, const 
SfxItemSet )
 get(m_pConnectED, "entry");
 get(m_pBrowseBT, "browse");
 get(m_pBmpWin, "preview");
-
m_pBmpWin->SetBitmapEx(get("fallback")->GetImage().GetBitmapEx());
+m_pBmpWin->SetBitmapEx(BitmapEx(RID_BMP_PREVIEW_FALLBACK));
 
 // RotGrfFlyFrame: Need Angle and RotateControls now
 get(m_pFlAngle, "FL_ANGLE");
diff --git a/sw/uiconfig/swriter/ui/picturepage.ui 
b/sw/uiconfig/swriter/ui/picturepage.ui
index 6591f259aa32..300212cd858a 100644
--- a/sw/uiconfig/swriter/ui/picturepage.ui
+++ b/sw/uiconfig/swriter/ui/picturepage.ui
@@ -1,8 +1,8 @@
 
-
+
 
   
-  
+  
   
 True
 False
@@ -37,8 +37,6 @@
   
 1
 1
-1
-1
   
 
 
@@ -50,24 +48,21 @@
   
 0
 1
-1
-1
   
 
 
   
 True
 False
-0
 _File name
 True
 entry
+0
   
   
 0
 0
 2
-1
   
 
   
@@ -88,8 +83,6 @@
   
 0
 1
-1
-1
   
 
 
@@ -126,8 +119,6 @@
   
 0
 0
-1
-1
   
 
 
@@ -143,8 +134,6 @@
   
 0
 1
-1
-1
   
 
 
@@ -153,8 +142,8 @@
 True
 True
 False
-True
 12
+True
 0
 True
 True
@@ -163,8 +152,6 @@
   
 0
 2
-1
-1
   
 
 
@@ -173,8 +160,8 @@
 True
 True
 False
-True
 12
+True
 0
 True
 rightpages
@@ -182,8 +169,6 @@
   
 0
 3
-1
-1
   
 
 
@@ -192,8 +177,8 @@
 True
 True
 False
-True
 12
+True
 0
 True
 allpages
@@ -201,8 +186,6 @@
   
 0
 4
-1
-1
   
 
 
@@ -220,23 +203,10 @@
 0
   
 
-
-  
-False
-True
-sw/res/image-example.png
-  
-  

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

2018-10-06 Thread Libreoffice Gerrit user
 sw/inc/swabstdlg.hxx   |4 +--
 sw/source/ui/dialog/swdlgfact.cxx  |   16 +++--
 sw/source/ui/dialog/swdlgfact.hxx  |   13 ---
 sw/source/ui/dochdl/selglos.cxx|   29 +++--
 sw/source/uibase/dochdl/gloshdl.cxx|   10 
 sw/source/uibase/inc/gloshdl.hxx   |4 +--
 sw/source/uibase/inc/selglos.hxx   |   23 +++
 sw/source/uibase/shells/textglos.cxx   |2 -
 sw/uiconfig/swriter/ui/insertautotextdialog.ui |   23 ---
 9 files changed, 66 insertions(+), 58 deletions(-)

New commits:
commit 692c4f4d2c5995660baf747f2d15929896f6e992
Author: Caolán McNamara 
AuthorDate: Sat Oct 6 17:57:35 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 6 20:55:30 2018 +0200

weld SwSelGlossaryDlg

Change-Id: I8d8b4a3b7ed461275eb4af86f3fd7709bab30586
Reviewed-on: https://gerrit.libreoffice.org/61476
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 6673fdef64ac..8478b77b990f 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -402,9 +402,9 @@ public:
 
 virtual VclPtr CreateSwAutoMarkDialog(vcl::Window 
*pParent, SwWrtShell ) = 0;
 
-virtual VclPtr CreateSwSelGlossaryDlg(const 
OUString ) = 0;
+virtual VclPtr 
CreateSwSelGlossaryDlg(weld::Window *pParent, const OUString ) = 0;
 
-virtual VclPtr CreateSwSortingDialog(weld::Window * 
pParent, SwWrtShell ) = 0;
+virtual VclPtr CreateSwSortingDialog(weld::Window 
*pParent, SwWrtShell ) = 0;
 virtual VclPtr CreateSwTableHeightDialog(weld::Window 
*pParent, SwWrtShell ) = 0;
 virtual VclPtr CreateSwColumnDialog(weld::Window 
*pParent, SwWrtShell ) = 0;
 virtual VclPtr 
CreateSplitTableDialog(weld::Window* pParent, SwWrtShell ) = 0;
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index 4ad47f91a41b..e8eb7119af93 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -172,7 +172,10 @@ short AbstractSwLabDlg_Impl::Execute()
 return m_xDlg->execute();
 }
 
-IMPL_ABSTDLG_BASE(AbstractSwSelGlossaryDlg_Impl);
+short AbstractSwSelGlossaryDlg_Impl::Execute()
+{
+return m_xDlg->run();
+}
 
 short AbstractSwAutoFormatDlg_Impl::Execute()
 {
@@ -415,17 +418,17 @@ Printer * AbstractSwLabDlg_Impl::GetPrt()
 
 void AbstractSwSelGlossaryDlg_Impl::InsertGlos(const OUString , const 
OUString )
 {
-pDlg->InsertGlos( rRegion, rGlosName );
+m_xDlg->InsertGlos( rRegion, rGlosName );
 }
 
 sal_Int32 AbstractSwSelGlossaryDlg_Impl::GetSelectedIdx() const
 {
-return pDlg->GetSelectedIdx();
+return m_xDlg->GetSelectedIdx();
 }
 
 void AbstractSwSelGlossaryDlg_Impl::SelectEntryPos(sal_Int32 nIdx)
 {
-pDlg->SelectEntryPos( nIdx );
+m_xDlg->SelectEntryPos( nIdx );
 }
 
 SwTableAutoFormat* AbstractSwAutoFormatDlg_Impl::FillAutoFormatOfIndex() const
@@ -889,10 +892,9 @@ VclPtr 
SwAbstractDialogFactory_Impl::CreateSplitTableD
 return 
VclPtr::Create(o3tl::make_unique(pParent,
 rSh));
 }
 
-VclPtr 
SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg(const OUString )
+VclPtr 
SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg(weld::Window *pParent, 
const OUString )
 {
-VclPtr pDlg = VclPtr::Create(nullptr, 
rShortName);
-return VclPtr::Create(pDlg);
+return 
VclPtr::Create(o3tl::make_unique(pParent,
 rShortName));
 }
 
 VclPtr 
SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg(weld::Window* pParent,
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index 208d423fc3c7..6471d1864c4c 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -342,7 +342,14 @@ public:
 
 class AbstractSwSelGlossaryDlg_Impl : public AbstractSwSelGlossaryDlg
 {
-DECL_ABSTDLG_BASE(AbstractSwSelGlossaryDlg_Impl,SwSelGlossaryDlg)
+protected:
+std::unique_ptr m_xDlg;
+public:
+explicit AbstractSwSelGlossaryDlg_Impl(std::unique_ptr p)
+: m_xDlg(std::move(p))
+{
+}
+virtual short Execute() override;
 virtual void InsertGlos(const OUString , const OUString 
) override;// inline
 virtual sal_Int32 GetSelectedIdx() const override;  // inline
 virtual void SelectEntryPos(sal_Int32 nIdx) override;   // inline
@@ -609,8 +616,8 @@ public:
 const OString& sDefPage = 
OString()) override;
 
 virtual VclPtr CreateSwAutoMarkDialog(vcl::Window 
*pParent, SwWrtShell ) override;
-virtual VclPtr CreateSwSelGlossaryDlg(const 
OUString ) override;
-virtual VclPtr CreateSwSortingDialog(weld::Window * 
pParent, SwWrtShell ) override;
+virtual VclPtr 
CreateSwSelGlossaryDlg(weld::Window *pParent, const OUString ) 
override;
+virtual VclPtr CreateSwSortingDialog(weld::Window 
*pParent, SwWrtShell ) override;
 virtual VclPtr 

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

2018-09-20 Thread Libreoffice Gerrit user
 sw/inc/swabstdlg.hxx |2 +-
 sw/source/ui/dialog/swdlgfact.cxx|5 ++---
 sw/source/ui/dialog/swdlgfact.hxx|2 +-
 sw/source/ui/frmdlg/wrap.cxx |   13 +++--
 sw/source/uibase/inc/wrap.hxx|4 ++--
 sw/source/uibase/shells/drwbassh.cxx |2 +-
 sw/uiconfig/swriter/ui/wrapdialog.ui |8 +++-
 7 files changed, 21 insertions(+), 15 deletions(-)

New commits:
commit f6ab12d5dae1212b0ad4e82ca3325f3dd4c974b6
Author: Caolán McNamara 
AuthorDate: Thu Sep 20 14:24:55 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Sep 20 18:13:05 2018 +0200

weld SwWrapDlg

Change-Id: Ib60a44932764965ab6af3055d615771617737392
Reviewed-on: https://gerrit.libreoffice.org/60816
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 63e966bbd723..e9f201a35ffb 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -414,7 +414,7 @@ public:
   bool 
bSetAutoFormat = true,
   const 
SwTableAutoFormat* pSelFormat = nullptr ) = 0;
 virtual VclPtr CreateSwBorderDlg(weld::Window* pParent, 
SfxItemSet& rSet, SwBorderModes nType) = 0;
-virtual VclPtr CreateSwWrapDlg ( vcl::Window* pParent, 
SfxItemSet& rSet, SwWrtShell* pSh ) = 0;
+virtual VclPtr CreateSwWrapDlg(weld::Window* pParent, 
SfxItemSet& rSet, SwWrtShell* pSh) = 0;
 
 virtual VclPtr CreateSwTableWidthDlg(weld::Window 
*pParent, SwTableFUNC ) = 0;
 virtual VclPtr CreateSwTableTabDlg(weld::Window* 
pParent,
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index 973e46ab8fd7..2a5849a1753e 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -910,10 +910,9 @@ VclPtr 
SwAbstractDialogFactory_Impl::CreateSwBorderDlg(weld::
 return 
VclPtr::Create(o3tl::make_unique(pParent,
 rSet, nType));
 }
 
-VclPtr SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( 
vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh )
+VclPtr 
SwAbstractDialogFactory_Impl::CreateSwWrapDlg(weld::Window* pParent, 
SfxItemSet& rSet, SwWrtShell* pSh)
 {
-VclPtr pDlg = VclPtr::Create( pParent, rSet, 
pSh, true/*bDrawMode*/ );
-return VclPtr::Create( pDlg );
+return 
VclPtr::Create(o3tl::make_unique(pParent,
 rSet, pSh, true/*bDrawMode*/));
 }
 
 VclPtr 
SwAbstractDialogFactory_Impl::CreateSwTableWidthDlg(weld::Window *pParent, 
SwTableFUNC )
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index ba2412c50a70..7cbb22347371 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -620,7 +620,7 @@ public:
   const 
SwTableAutoFormat* pSelFormat = nullptr) override;
 virtual VclPtr CreateSwBorderDlg(weld::Window* pParent, 
SfxItemSet& rSet, SwBorderModes nType) override;
 
-virtual VclPtr CreateSwWrapDlg ( vcl::Window* pParent, 
SfxItemSet& rSet, SwWrtShell* pSh ) override;
+virtual VclPtr CreateSwWrapDlg(weld::Window* pParent, 
SfxItemSet& rSet, SwWrtShell* pSh) override;
 virtual VclPtr CreateSwTableWidthDlg(weld::Window 
*pParent, SwTableFUNC ) override;
 virtual VclPtr CreateSwTableTabDlg(weld::Window* 
pParent,
 const SfxItemSet* pItemSet, SwWrtShell* pSh) override;
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index e20cf7677b90..d01dd02ab9a2 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -50,14 +50,15 @@ const sal_uInt16 SwWrapTabPage::m_aWrapPageRg[] = {
 0
 };
 
-SwWrapDlg::SwWrapDlg(vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* 
pWrtShell, bool bDrawMode)
-: SfxSingleTabDialog(pParent, rSet, "WrapDialog", 
"modules/swriter/ui/wrapdialog.ui")
+SwWrapDlg::SwWrapDlg(weld::Window* pParent, SfxItemSet& rSet, SwWrtShell* 
pWrtShell, bool bDrawMode)
+: SfxSingleTabDialogController(pParent, rSet, 
"modules/swriter/ui/wrapdialog.ui", "WrapDialog")
 {
 // create TabPage
-VclPtr pNewPage = static_cast( 
SwWrapTabPage::Create(get_content_area(), ).get() );
-pNewPage->SetFormatUsed(false, bDrawMode);
-pNewPage->SetShell(pWrtShell);
-SetTabPage(pNewPage);
+TabPageParent pPageParent(get_content_area(), this);
+VclPtr xNewPage = 
static_cast(SwWrapTabPage::Create(pPageParent, ).get());
+xNewPage->SetFormatUsed(false, bDrawMode);
+xNewPage->SetShell(pWrtShell);
+SetTabPage(xNewPage);
 }
 
 SwWrapTabPage::SwWrapTabPage(vcl::Window *pParent, const SfxItemSet )
diff --git a/sw/source/uibase/inc/wrap.hxx b/sw/source/uibase/inc/wrap.hxx
index c0c34f1b6404..744b9cf183f2 100644
--- a/sw/source/uibase/inc/wrap.hxx
+++ b/sw/source/uibase/inc/wrap.hxx
@@ -29,10 +29,10 @@ namespace vcl { class Window; }
 class SfxItemSet;
 class SwWrtShell;
 

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

2018-09-10 Thread Libreoffice Gerrit user
 sw/inc/swabstdlg.hxx  |2 
 sw/source/ui/dbui/dbinsdlg.cxx|4 
 sw/source/ui/dialog/swdlgfact.cxx |5 -
 sw/source/ui/dialog/swdlgfact.hxx |2 
 sw/source/ui/table/tabledlg.cxx   |   20 +---
 sw/source/uibase/inc/tabledlg.hxx |   10 --
 sw/source/uibase/shells/tabsh.cxx |4 
 sw/uiconfig/swriter/ui/tableproperties.ui |  149 +++---
 8 files changed, 157 insertions(+), 39 deletions(-)

New commits:
commit 916260dcbe84fcde76ee66c752391123f44ea4da
Author: Caolán McNamara 
AuthorDate: Mon Sep 10 09:04:43 2018 +0100
Commit: Caolán McNamara 
CommitDate: Mon Sep 10 13:16:13 2018 +0200

weld SwTableTabDlg

Change-Id: I343ddfd5ba1e42711b74815517ab931e0905dd07
Reviewed-on: https://gerrit.libreoffice.org/60243
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index a1b670d2dcbc..c1c735fdb5db 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -417,7 +417,7 @@ public:
 virtual VclPtr CreateSwWrapDlg ( vcl::Window* pParent, 
SfxItemSet& rSet, SwWrtShell* pSh ) = 0;
 
 virtual VclPtr CreateSwTableWidthDlg(weld::Window 
*pParent, SwTableFUNC ) = 0;
-virtual VclPtr CreateSwTableTabDlg(vcl::Window* 
pParent,
+virtual VclPtr CreateSwTableTabDlg(weld::Window* 
pParent,
 const SfxItemSet* pItemSet, SwWrtShell* pSh) = 0;
 
 virtual VclPtr CreateSwFieldDlg(SfxBindings* pB, 
SwChildWinWrapper* pCW, vcl::Window *pParent) = 0;
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 3524214b5380..74de0e146404 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -653,7 +653,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, DblClickHdl, ListBox&, 
rBox, void )
 TableToFromHdl( pButton );
 }
 
-IMPL_LINK( SwInsertDBColAutoPilot, TableFormatHdl, Button*, pButton, void )
+IMPL_LINK_NOARG(SwInsertDBColAutoPilot, TableFormatHdl, Button*, void)
 {
 SwWrtShell& rSh = pView->GetWrtShell();
 bool bNewSet = false;
@@ -761,7 +761,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TableFormatHdl, Button*, 
pButton, void )
 SwAbstractDialogFactory* pFact = swui::GetFactory();
 OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
 
-ScopedVclPtr 
pDlg(pFact->CreateSwTableTabDlg(pButton, pTableSet.get(), ));
+ScopedVclPtr 
pDlg(pFact->CreateSwTableTabDlg(GetFrameWeld(), pTableSet.get(), ));
 if( RET_OK == pDlg->Execute() )
 pTableSet->Put( *pDlg->GetOutputItemSet() );
 else if( bNewSet )
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index 971fd2a057bb..65969975b8e6 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -892,11 +892,10 @@ VclPtr 
SwAbstractDialogFactory_Impl::CreateSwTableWidthDlg(we
 return 
VclPtr::Create(o3tl::make_unique(pParent,
 rFnc));
 }
 
-VclPtr 
SwAbstractDialogFactory_Impl::CreateSwTableTabDlg(vcl::Window* pParent,
+VclPtr 
SwAbstractDialogFactory_Impl::CreateSwTableTabDlg(weld::Window* pParent,
 const SfxItemSet* pItemSet, SwWrtShell* pSh)
 {
-VclPtr pDlg = VclPtr::Create(pParent, 
pItemSet, pSh);
-return VclPtr::Create(pDlg);
+return 
VclPtr::Create(o3tl::make_unique(pParent,
 pItemSet, pSh));
 }
 
 VclPtr 
SwAbstractDialogFactory_Impl::CreateSwFieldDlg(SfxBindings* pB, 
SwChildWinWrapper* pCW, vcl::Window *pParent)
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index ef655833b3fc..eb1fb9993bc6 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -608,7 +608,7 @@ public:
 
 virtual VclPtr CreateSwWrapDlg ( vcl::Window* pParent, 
SfxItemSet& rSet, SwWrtShell* pSh ) override;
 virtual VclPtr CreateSwTableWidthDlg(weld::Window 
*pParent, SwTableFUNC ) override;
-virtual VclPtr CreateSwTableTabDlg(vcl::Window* 
pParent,
+virtual VclPtr CreateSwTableTabDlg(weld::Window* 
pParent,
 const SfxItemSet* pItemSet, SwWrtShell* pSh) override;
 virtual VclPtr CreateSwFieldDlg(SfxBindings* pB, 
SwChildWinWrapper* pCW, vcl::Window *pParent) override;
 virtual VclPtr   CreateSwFieldEditDlg ( SwView& rVw ) 
override;
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index ba617f7f8177..7be5d0a313c6 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -1150,35 +1150,33 @@ void SwTableColumnPage::SetVisibleWidth(sal_uInt16 
nPos, SwTwips nNewWidth)
 
 }
 
-SwTableTabDlg::SwTableTabDlg(vcl::Window* pParent,
-const SfxItemSet* pItemSet, SwWrtShell* pSh)
-: SfxTabDialog(pParent, "TablePropertiesDialog",
-"modules/swriter/ui/tableproperties.ui", pItemSet)
+SwTableTabDlg::SwTableTabDlg(weld::Window* pParent, const SfxItemSet* 
pItemSet, SwWrtShell* pSh)
+: SfxTabDialogController(pParent, 

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

2018-06-19 Thread Caolán McNamara
 sw/inc/swabstdlg.hxx|2 
 sw/source/ui/dialog/swdlgfact.cxx   |5 -
 sw/source/ui/dialog/swdlgfact.hxx   |2 
 sw/source/ui/misc/titlepage.cxx |  148 ++--
 sw/source/uibase/inc/titlepage.hxx  |   55 +
 sw/source/uibase/shells/basesh.cxx  |   16 +--
 sw/uiconfig/swriter/ui/titlepage.ui |   53 +---
 7 files changed, 135 insertions(+), 146 deletions(-)

New commits:
commit 525f06ca797e3a5a81864e632f26421a10f43b01
Author: Caolán McNamara 
Date:   Mon Jun 18 16:18:03 2018 +0100

weld SwTitlePageDlg

Change-Id: I16a82709f49ed9e85751afd8c8001705c40a6e6d
Reviewed-on: https://gerrit.libreoffice.org/56049
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 5caf37cb4c5b..9d6e4dbf147c 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -449,7 +449,7 @@ public:
 SwWrtShell , SwField* pField, bool bPrevButton, bool bNextButton) 
= 0;
 virtual VclPtr 
CreateInsFootNoteDlg(weld::Window * pParent,
 SwWrtShell , bool bEd = false) = 0;
-virtual VclPtr  CreateTitlePageDlg ( 
vcl::Window * pParent ) = 0;
+virtual VclPtr  
CreateTitlePageDlg(weld::Window* pParent) = 0;
 virtual VclPtr CreateVclSwViewDialog(SwView& 
rView) = 0;
 virtual VclPtrCreateInsTableDlg(SwView& 
rView) = 0;
 virtual VclPtr 
CreateJavaEditDialog(weld::Window* pParent,
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index b623c5d81a87..ae69d4b54f04 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -949,10 +949,9 @@ VclPtr 
SwAbstractDialogFactory_Impl::CreateInsFootNoteDl
 return VclPtr::Create(new 
SwInsFootNoteDlg(pParent, rSh, bEd));
 }
 
-VclPtr SwAbstractDialogFactory_Impl::CreateTitlePageDlg ( 
vcl::Window *pParent )
+VclPtr 
SwAbstractDialogFactory_Impl::CreateTitlePageDlg(weld::Window *pParent)
 {
-VclPtr pDlg = VclPtr::Create( pParent );
-return VclPtr::Create( pDlg );
+return VclPtr::Create(new 
SwTitlePageDlg(pParent));
 }
 
 VclPtr 
SwAbstractDialogFactory_Impl::CreateVclSwViewDialog(SwView& rView)
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index 60b7072bf4a1..a06afd8175b6 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -622,7 +622,7 @@ public:
 SwWrtShell , SwField* pField, bool bPrevButton, bool bNextButton) 
override;
 virtual VclPtr CreateInsFootNoteDlg(
 weld::Window * pParent, SwWrtShell , bool bEd = false) override;
-virtual VclPtr CreateTitlePageDlg ( vcl::Window 
* pParent ) override;
+virtual VclPtr CreateTitlePageDlg(weld::Window* 
pParent) override;
 virtual VclPtr CreateVclSwViewDialog(SwView& 
rView) override;
 virtual VclPtrCreateInsTableDlg(SwView& 
rView) override;
 virtual VclPtr 
CreateJavaEditDialog(weld::Window* pParent,
diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx
index 4d21a57850fa..36034678463b 100644
--- a/sw/source/ui/misc/titlepage.cxx
+++ b/sw/source/ui/misc/titlepage.cxx
@@ -130,45 +130,44 @@ namespace
  */
 void SwTitlePageDlg::FillList()
 {
-sal_uInt16 nTitlePages = m_pPageCountNF->GetValue();
-m_pPagePropertiesLB->Clear();
+sal_uInt16 nTitlePages = m_xPageCountNF->get_value();
+m_xPagePropertiesLB->clear();
 if (mpTitleDesc)
-m_pPagePropertiesLB->InsertEntry(mpTitleDesc->GetName());
+m_xPagePropertiesLB->append_text(mpTitleDesc->GetName());
 if (nTitlePages > 1 && mpIndexDesc)
-m_pPagePropertiesLB->InsertEntry(mpIndexDesc->GetName());
+m_xPagePropertiesLB->append_text(mpIndexDesc->GetName());
 if (mpNormalDesc)
-m_pPagePropertiesLB->InsertEntry(mpNormalDesc->GetName());
-m_pPagePropertiesLB->SelectEntryPos(0);
+m_xPagePropertiesLB->append_text(mpNormalDesc->GetName());
+m_xPagePropertiesLB->set_active(0);
 }
 
 sal_uInt16 SwTitlePageDlg::GetInsertPosition() const
 {
 sal_uInt16 nPage = 1;
-if (m_pPageStartNF->IsEnabled())
-nPage = m_pPageStartNF->GetValue();
+if (m_xPageStartNF->get_sensitive())
+nPage = m_xPageStartNF->get_value();
 return nPage;
 }
 
-SwTitlePageDlg::SwTitlePageDlg( vcl::Window *pParent ) :
-SfxModalDialog( pParent, "DLG_TITLEPAGE", 
"modules/swriter/ui/titlepage.ui"),
-mpPageFormatDesc(nullptr)
+SwTitlePageDlg::SwTitlePageDlg(weld::Window *pParent)
+: GenericDialogController(pParent, "modules/swriter/ui/titlepage.ui", 
"DLG_TITLEPAGE")
+, mpPageFormatDesc(nullptr)
+, 
m_xUseExistingPagesRB(m_xBuilder->weld_radio_button("RB_USE_EXISTING_PAGES"))
+, m_xPageCountNF(m_xBuilder->weld_spin_button("NF_PAGE_COUNT"))
+, m_xDocumentStartRB(m_xBuilder->weld_radio_button("RB_DOCUMENT_START"))
+  

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

2018-05-14 Thread Caolán McNamara
 sw/inc/dbmgr.hxx |3 -
 sw/source/ui/dbui/mmresultdialogs.cxx|   15 ++---
 sw/source/ui/inc/mmresultdialogs.hxx |1 
 sw/source/uibase/dbui/dbmgr.cxx  |   42 +++---
 sw/source/uibase/dbui/dbui.cxx   |   78 ---
 sw/source/uibase/inc/dbui.hxx|   39 +++--
 sw/uiconfig/swriter/ui/printmonitordialog.ui |1 
 7 files changed, 51 insertions(+), 128 deletions(-)

New commits:
commit c7ac8480c9df601a58bad892c472dcf7c5e9dc01
Author: Caolán McNamara 
Date:   Mon May 14 10:28:41 2018 +0100

weld CreateMonitor and PrintMonitor

Change-Id: Icf57a0660482cf283d6f993f72f72def2ddf6181
Reviewed-on: https://gerrit.libreoffice.org/54307
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 4af6308b6003..03e8c2f7ecc9 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -270,8 +271,6 @@ class SW_DLLPUBLIC SwDBManager
 SAL_DLLPRIVATE SwDSParam*  FindDSData(const SwDBData& rData, bool 
bCreate);
 SAL_DLLPRIVATE SwDSParam*  FindDSConnection(const OUString& 
rSource, bool bCreate);
 
-DECL_DLLPRIVATE_LINK( PrtCancelHdl, Button *, void );
-
 /// Insert data record as text into document.
 SAL_DLLPRIVATE void ImportFromConnection( SwWrtShell* pSh);
 
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx 
b/sw/source/ui/dbui/mmresultdialogs.cxx
index ff1487e2cd90..a558f12712ac 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -462,11 +462,6 @@ IMPL_LINK_NOARG(SwMMResultEmailDialog, CopyToHdl_Impl, 
Button*, void)
 }
 }
 
-IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveCancelHdl_Impl, weld::Button&, void)
-{
-m_bCancelSaving = true;
-}
-
 namespace {
 
 int documentStartPageNumber(SwMailMergeConfigItem* pConfigItem, int document)
@@ -627,10 +622,13 @@ IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveOutputHdl_Impl, 
weld::Button&, void)
 SwView* pSourceView = xConfigItem->GetSourceView();
 std::shared_ptr xSaveMonitor(new 
SaveMonitor(m_xDialog.get()));
 
xSaveMonitor->m_xDocName->set_label(pSourceView->GetDocShell()->GetTitle(22));
-xSaveMonitor->m_xCancel->connect_clicked(LINK(this, 
SwMMResultSaveDialog, SaveCancelHdl_Impl));
 xSaveMonitor->m_xPrinter->set_label( INetURLObject( sPath 
).getFSysPath( FSysStyle::Detect ) );
 m_bCancelSaving = false;
-weld::DialogController::runAsync(xSaveMonitor, [](int) {});
+weld::DialogController::runAsync(xSaveMonitor, [this, 
](sal_Int32 nResult){
+if (nResult == RET_CANCEL)
+m_bCancelSaving = true;
+xSaveMonitor.reset();
+});
 
 for(sal_uInt32 nDoc = nBegin; nDoc < nEnd && !m_bCancelSaving; ++nDoc)
 {
@@ -707,7 +705,8 @@ IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveOutputHdl_Impl, 
weld::Button&, void)
 }
 }
 }
-xSaveMonitor->response(RET_OK);
+if (xSaveMonitor)
+xSaveMonitor->response(RET_OK);
 ::osl::File::remove( sTargetTempURL );
 }
 
diff --git a/sw/source/ui/inc/mmresultdialogs.hxx 
b/sw/source/ui/inc/mmresultdialogs.hxx
index cde6faee8f9f..d391f34a50f9 100644
--- a/sw/source/ui/inc/mmresultdialogs.hxx
+++ b/sw/source/ui/inc/mmresultdialogs.hxx
@@ -57,7 +57,6 @@ class SwMMResultSaveDialog : public 
weld::GenericDialogController
 std::unique_ptr m_xOKButton;
 
 DECL_LINK(SaveOutputHdl_Impl, weld::Button& , void);
-DECL_LINK(SaveCancelHdl_Impl, weld::Button&, void);
 DECL_LINK(DocumentSelectionHdl_Impl, weld::ToggleButton&, void);
 
 public:
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 9430342bc158..8d6487dae6ee 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1312,22 +1312,25 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* 
pSourceShell,
 sal_uInt16 nStartingPageNo = 0;
 
 vcl::Window *pSourceWindow = nullptr;
-VclPtr pProgressDlg;
+std::shared_ptr xProgressDlg;
 
 if( !bIsMergeSilent )
 {
 // construct the process dialog
 pSourceWindow = >GetView().GetEditWin();
 if (!bMT_PRINTER)
-pProgressDlg = VclPtr::Create(pSourceWindow);
+xProgressDlg.reset(new 
CreateMonitor(pSourceWindow->GetFrameWeld()));
 else
 {
-pProgressDlg = VclPtr::Create(pSourceWindow);
-static_cast( pProgressDlg.get() )->SetText(
-pSourceDocSh->GetTitle(22) );
+xProgressDlg.reset(new 
PrintMonitor(pSourceWindow->GetFrameWeld()));
+static_cast(xProgressDlg.get())->set_title(
+pSourceDocSh->GetTitle(22));
  

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

2018-05-13 Thread Caolán McNamara
 sw/inc/swabstdlg.hxx |2 
 sw/source/ui/dbui/mmresultdialogs.cxx|   87 +++
 sw/source/ui/dialog/swdlgfact.cxx|6 -
 sw/source/ui/dialog/swdlgfact.hxx|2 
 sw/source/ui/inc/mmresultdialogs.hxx |   27 +++-
 sw/source/uibase/app/apphdl.cxx  |2 
 sw/uiconfig/swriter/ui/mmresultsavedialog.ui |   40 +---
 7 files changed, 87 insertions(+), 79 deletions(-)

New commits:
commit 4a1cdfef802deacf119c56ea51d5fddd59aeb17a
Author: Caolán McNamara 
Date:   Sun May 13 19:33:11 2018 +0100

weld SwMMResultSaveDialog

and set a proper parent for it

Change-Id: Ia03e549e9fdde5925d85af3332d63253d9fbe911
Reviewed-on: https://gerrit.libreoffice.org/54199
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 67aecd817661..5caf37cb4c5b 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -498,7 +498,7 @@ public:
 // for tabpage
 virtual CreateTabPage   GetTabPageCreatorFunc( sal_uInt16 nId 
) = 0;
 
-virtual void ExecuteMMResultSaveDialog() = 0;
+virtual void ExecuteMMResultSaveDialog(weld::Window* pParent) = 0;
 virtual void ExecuteMMResultPrintDialog(weld::Window* pParent) = 0;
 virtual void ExecuteMMResultEmailDialog() = 0;
 
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx 
b/sw/source/ui/dbui/mmresultdialogs.cxx
index b2f8cb2c3d7e..b0c82cbc2ac5 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -208,50 +208,36 @@ public:
 void SetBCC(const OUString& rSet) {m_xBCCED->set_text(rSet);}
 };
 
-SwMMResultSaveDialog::SwMMResultSaveDialog()
-: SfxModalDialog(nullptr, "MMResultSaveDialog", 
"modules/swriter/ui/mmresultsavedialog.ui"),
-m_bCancelSaving(false)
+SwMMResultSaveDialog::SwMMResultSaveDialog(weld::Window* pParent)
+: GenericDialogController(pParent, 
"modules/swriter/ui/mmresultsavedialog.ui", "MMResultSaveDialog")
+, m_bCancelSaving(false)
+, m_xSaveAsOneRB(m_xBuilder->weld_radio_button("singlerb"))
+, m_xSaveIndividualRB(m_xBuilder->weld_radio_button("individualrb"))
+, m_xFromRB(m_xBuilder->weld_radio_button("fromrb"))
+, m_xFromNF(m_xBuilder->weld_spin_button("from"))
+, m_xToFT(m_xBuilder->weld_label("toft"))
+, m_xToNF(m_xBuilder->weld_spin_button("to"))
+, m_xOKButton(m_xBuilder->weld_button("ok"))
 {
-get(m_pSaveAsOneRB, "singlerb");
-get(m_pSaveIndividualRB, "individualrb");
-get(m_pFromRB, "fromrb");
-get(m_pFromNF, "from-nospin");
-get(m_pToFT, "toft");
-get(m_pToNF, "to-nospin");
-get(m_pOKButton, "ok");
-
-Link aLink = LINK(this, SwMMResultSaveDialog, 
DocumentSelectionHdl_Impl);
-m_pSaveAsOneRB->SetClickHdl(aLink);
-m_pSaveIndividualRB->SetClickHdl(aLink);
-m_pFromRB->SetClickHdl(aLink);
+Link aLink = LINK(this, SwMMResultSaveDialog, 
DocumentSelectionHdl_Impl);
+m_xSaveAsOneRB->connect_toggled(aLink);
+m_xSaveIndividualRB->connect_toggled(aLink);
+m_xFromRB->connect_toggled(aLink);
 // m_pSaveAsOneRB is the default, so disable m_pFromNF and m_pToNF 
initially.
-aLink.Call(m_pSaveAsOneRB);
+aLink.Call(*m_xSaveAsOneRB);
 SwView* pView = ::GetActiveView();
 std::shared_ptr xConfigItem = 
pView->GetMailMergeConfigItem();
 assert(xConfigItem);
 sal_Int32 nCount = xConfigItem->GetMergedDocumentCount();
-m_pToNF->SetMax(nCount);
-m_pToNF->SetValue(nCount);
+m_xFromNF->set_max(nCount);
+m_xToNF->set_max(nCount);
+m_xToNF->set_value(nCount);
 
-m_pOKButton->SetClickHdl(LINK(this, SwMMResultSaveDialog, 
SaveOutputHdl_Impl));
+m_xOKButton->connect_clicked(LINK(this, SwMMResultSaveDialog, 
SaveOutputHdl_Impl));
 }
 
 SwMMResultSaveDialog::~SwMMResultSaveDialog()
 {
-disposeOnce();
-}
-
-void SwMMResultSaveDialog::dispose()
-{
-m_pSaveAsOneRB.clear();
-m_pSaveIndividualRB.clear();
-m_pFromRB.clear();
-m_pFromNF.clear();
-m_pToFT.clear();
-m_pToNF.clear();
-m_pOKButton.clear();
-
-SfxModalDialog::dispose();
 }
 
 SwMMResultPrintDialog::SwMMResultPrintDialog(weld::Window* pParent)
@@ -440,12 +426,12 @@ void SwMMResultEmailDialog::FillInEmailSettings()
 
 }
 
-IMPL_LINK(SwMMResultSaveDialog, DocumentSelectionHdl_Impl, Button*, pButton, 
void)
+IMPL_LINK(SwMMResultSaveDialog, DocumentSelectionHdl_Impl, 
weld::ToggleButton&, rButton, void)
 {
-bool bEnableFromTo = pButton == m_pFromRB;
-m_pFromNF->Enable(bEnableFromTo);
-m_pToFT->Enable(bEnableFromTo);
-m_pToNF->Enable(bEnableFromTo);
+bool bEnableFromTo =  == m_xFromRB.get();
+m_xFromNF->set_sensitive(bEnableFromTo);
+m_xToFT->set_sensitive(bEnableFromTo);
+

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

2018-04-17 Thread Caolán McNamara
 sw/inc/swabstdlg.hxx  |2 
 sw/source/ui/dialog/swdlgfact.cxx |   16 ++-
 sw/source/ui/dialog/swdlgfact.hxx |   11 +-
 sw/source/ui/fldui/DropDownFieldDialog.cxx|  125 +++---
 sw/source/uibase/inc/DropDownFieldDialog.hxx  |   48 -
 sw/source/uibase/inc/wrtsh.hxx|2 
 sw/source/uibase/wrtsh/wrtsh2.cxx |9 +
 sw/uiconfig/swriter/ui/dropdownfielddialog.ui |  119 
 8 files changed, 185 insertions(+), 147 deletions(-)

New commits:
commit 9a360f993d7a791c548801779d7f444f87541489
Author: Caolán McNamara 
Date:   Tue Apr 17 09:51:26 2018 +0100

weld DropDownFieldDialog

Change-Id: I58ceb44f96d8ae3e3732b85eafd44c4d6eab42aa
Reviewed-on: https://gerrit.libreoffice.org/53035
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index d64bc9aad389..92699b35f7ee 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -396,7 +396,7 @@ public:
 const SwDBData& rData) = 0;
 virtual VclPtr CreateSwFootNoteOptionDlg(vcl::Window 
*pParent, SwWrtShell ) = 0;
 
-virtual VclPtr 
CreateDropDownFieldDialog(SwWrtShell ,
+virtual VclPtr 
CreateDropDownFieldDialog(weld::Window* pParent, SwWrtShell ,
 SwField* pField, bool bPrevButton, bool bNextButton) = 0;
 virtual VclPtr CreateSwEnvDlg ( vcl::Window* 
pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, bool 
bInsert ) = 0;
 
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index cf431989c93f..fd0e2009e953 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -133,7 +133,12 @@ short AbstractSwConvertTableDlg_Impl::Execute()
 return m_xDlg->run();
 }
 IMPL_ABSTDLG_BASE(AbstractSwInsertDBColAutoPilot_Impl);
-IMPL_ABSTDLG_BASE(AbstractDropDownFieldDialog_Impl);
+
+short AbstractDropDownFieldDialog_Impl::Execute()
+{
+return m_xDlg->execute();
+}
+
 IMPL_ABSTDLG_BASE(AbstractSwLabDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractSwSelGlossaryDlg_Impl);
 short AbstractSwAutoFormatDlg_Impl::Execute()
@@ -281,12 +286,12 @@ void AbstractSwInsertDBColAutoPilot_Impl::DataToDoc( 
const uno::Sequence< uno::A
 
 bool AbstractDropDownFieldDialog_Impl::PrevButtonPressed() const
 {
-return pDlg->PrevButtonPressed();
+return m_xDlg->PrevButtonPressed();
 }
 
 bool AbstractDropDownFieldDialog_Impl::NextButtonPressed() const
 {
-return pDlg->NextButtonPressed();
+return m_xDlg->NextButtonPressed();
 }
 
 void AbstractSwLabDlg_Impl::SetCurPageId( sal_uInt16 nId )
@@ -758,11 +763,10 @@ VclPtr 
SwAbstractDialogFactory_Impl::CreateSwFootNoteOptio
 return VclPtr::Create( pDlg );
 }
 
-VclPtr 
SwAbstractDialogFactory_Impl::CreateDropDownFieldDialog(
+VclPtr 
SwAbstractDialogFactory_Impl::CreateDropDownFieldDialog(weld::Window *pParent,
 SwWrtShell , SwField* pField, bool bPrevButton, bool bNextButton)
 {
-VclPtr pDlg = 
VclPtr::Create(nullptr, rSh, pField, bPrevButton, 
bNextButton);
-return VclPtr::Create( pDlg );
+return VclPtr::Create(new 
sw::DropDownFieldDialog(pParent, rSh, pField, bPrevButton, bNextButton));
 }
 
 VclPtr SwAbstractDialogFactory_Impl::CreateSwEnvDlg ( 
vcl::Window* pParent, const SfxItemSet& rSet,
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index b708efc4098c..48fd7f95c91f 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -262,7 +262,14 @@ class AbstractSwInsertDBColAutoPilot_Impl :  public 
AbstractSwInsertDBColAutoPil
 
 class AbstractDropDownFieldDialog_Impl : public AbstractDropDownFieldDialog
 {
-DECL_ABSTDLG_BASE(AbstractDropDownFieldDialog_Impl, 
sw::DropDownFieldDialog)
+protected:
+std::unique_ptr m_xDlg;
+public:
+explicit AbstractDropDownFieldDialog_Impl(sw::DropDownFieldDialog* p)
+: m_xDlg(p)
+{
+}
+virtual short Execute() override;
 virtual bool  PrevButtonPressed() const override;
 virtual bool  NextButtonPressed() const override;
 };
@@ -537,7 +544,7 @@ public:
 const SwDBData& rData) override;
 virtual VclPtr CreateSwFootNoteOptionDlg(vcl::Window 
*pParent, SwWrtShell ) override;
 
-virtual VclPtr 
CreateDropDownFieldDialog(SwWrtShell ,
+virtual VclPtr 
CreateDropDownFieldDialog(weld::Window* pParent, SwWrtShell ,
 SwField* pField, bool bPrevButton, bool bNextButton) override;
 virtual VclPtr CreateSwEnvDlg ( vcl::Window* 
pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, bool 
bInsert ) override;
 virtual VclPtr CreateSwLabDlg(const SfxItemSet& rSet,
diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx 
b/sw/source/ui/fldui/DropDownFieldDialog.cxx
index 8de7bd7c32d8..d21758e062dc 100644
--- 

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

2018-04-03 Thread Caolán McNamara
 sw/inc/gotodlg.hxx   |   31 +++-
 sw/source/uibase/uiview/view2.cxx|6 +--
 sw/source/uibase/utlui/gotodlg.cxx   |   59 +++
 sw/uiconfig/swriter/ui/gotopagedialog.ui |   13 +-
 4 files changed, 50 insertions(+), 59 deletions(-)

New commits:
commit 5672627a4d4adc613aecb3ccef721655d9dcd0b2
Author: Caolán McNamara 
Date:   Tue Apr 3 15:17:23 2018 +0100

weld SwGotoPageDlg

Change-Id: I23c77c3ed532d3e79cdbf07fcebda5bcdc7d27dc
Reviewed-on: https://gerrit.libreoffice.org/52333
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/inc/gotodlg.hxx b/sw/inc/gotodlg.hxx
index 41ae860e03fe..547a439e196f 100644
--- a/sw/inc/gotodlg.hxx
+++ b/sw/inc/gotodlg.hxx
@@ -20,34 +20,33 @@
 #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_GOTODLG_HXX
 #define INCLUDED_SW_SOURCE_UIBASE_INC_GOTODLG_HXX
 
-#include 
+#include 
 
 class SwView;
 class SwWrtShell;
 
-class SwGotoPageDlg : public ModalDialog
+class SwGotoPageDlg : public weld::GenericDialogController
 {
 public:
-SwGotoPageDlg(vcl::Window *parent, SfxBindings* _pBindings);
+SwGotoPageDlg(weld::Window *parent, SfxBindings* _pBindings);
 
-virtual ~SwGotoPageDlg() override;
-virtual void dispose() override;
-
-sal_uInt16 GetPageSelection() const{
-return (mpMtrPageCtrl->GetText()).toUInt32();}
+sal_uInt16 GetPageSelection() const
+{
+return mxMtrPageCtrl->get_text().toUInt32();
+}
 
 private:
-SwView*GetCreateView() const;
-sal_uInt16 GetPageInfo();
-
-DECL_LINK( PageModifiedHdl, Edit&, void );
-
-VclPtr mpMtrPageCtrl;
-VclPtr mpPageNumberLbl;
-
 SwView   *m_pCreateView;
 SfxBindings  *m_rBindings;
 sal_uInt16   mnMaxPageCnt;
+
+std::unique_ptr mxMtrPageCtrl;
+std::unique_ptr mxPageNumberLbl;
+
+SwView*GetCreateView() const;
+sal_uInt16 GetPageInfo();
+
+DECL_LINK( PageModifiedHdl, weld::Entry&, void );
 };
 
 #endif
diff --git a/sw/source/uibase/uiview/view2.cxx 
b/sw/source/uibase/uiview/view2.cxx
index 26fdb197f3cf..8e5f4c376d64 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -882,9 +882,9 @@ void SwView::Execute(SfxRequest )
 break;
 case FN_GOTO_PAGE:
 {
-ScopedVclPtrInstance< SwGotoPageDlg > aDlg 
(()->GetWindow(), ()->GetBindings());
-if(aDlg->Execute() == RET_OK)
-GetWrtShell().GotoPage(aDlg->GetPageSelection(), true);
+SwGotoPageDlg aDlg(GetViewFrame()->GetWindow().GetFrameWeld(), 
()->GetBindings());
+if (aDlg.run() == RET_OK)
+GetWrtShell().GotoPage(aDlg.GetPageSelection(), true);
 }
 break;
 case  FN_EDIT_CURRENT_TOX:
diff --git a/sw/source/uibase/utlui/gotodlg.cxx 
b/sw/source/uibase/utlui/gotodlg.cxx
index 1098923f40f4..8be160720a40 100644
--- a/sw/source/uibase/utlui/gotodlg.cxx
+++ b/sw/source/uibase/utlui/gotodlg.cxx
@@ -27,54 +27,39 @@
 
 using namespace com::sun::star;
 
-SwGotoPageDlg::SwGotoPageDlg( vcl::Window* pParent, SfxBindings* _pBindings):
-ModalDialog(pParent, "GotoPageDialog", 
"modules/swriter/ui/gotopagedialog.ui"),
-m_pCreateView(nullptr),
-m_rBindings(_pBindings),
-mnMaxPageCnt(1)
+SwGotoPageDlg::SwGotoPageDlg(weld::Window* pParent, SfxBindings* _pBindings)
+: GenericDialogController(pParent, "modules/swriter/ui/gotopagedialog.ui", 
"GotoPageDialog")
+, m_pCreateView(nullptr)
+, m_rBindings(_pBindings)
+, mnMaxPageCnt(1)
+, mxMtrPageCtrl(m_xBuilder->weld_entry("page"))
+, mxPageNumberLbl(m_xBuilder->weld_label("page_count"))
 {
-get(mpMtrPageCtrl, "page");
-get(mpPageNumberLbl, "page_count");
-
 sal_uInt16 nTotalPage = GetPageInfo();
 
 if(nTotalPage)
 {
-OUString sStr = mpPageNumberLbl->GetText();
-mpPageNumberLbl->SetText(sStr.replaceFirst("$1", 
OUString::number(nTotalPage)));
+OUString sStr = mxPageNumberLbl->get_label();
+mxPageNumberLbl->set_label(sStr.replaceFirst("$1", 
OUString::number(nTotalPage)));
 mnMaxPageCnt = nTotalPage;
 }
-mpMtrPageCtrl->SetModifyHdl(LINK(this, SwGotoPageDlg, PageModifiedHdl));
-mpMtrPageCtrl->SetCursorAtLast();
-Selection aSel(0, EDIT_NOLIMIT);
-mpMtrPageCtrl->SetSelection(aSel);
-}
-
-SwGotoPageDlg::~SwGotoPageDlg()
-{
-disposeOnce();
-}
-
-void SwGotoPageDlg::dispose()
-{
-mpMtrPageCtrl.clear();
-mpPageNumberLbl.clear();
-
-ModalDialog::dispose();
+mxMtrPageCtrl->connect_changed(LINK(this, SwGotoPageDlg, PageModifiedHdl));
+mxMtrPageCtrl->set_position(-1);
+mxMtrPageCtrl->select_region(0, -1);
 }
 
-IMPL_LINK_NOARG(SwGotoPageDlg, PageModifiedHdl, Edit&, void)
+IMPL_LINK_NOARG(SwGotoPageDlg, PageModifiedHdl, weld::Entry&, void)
 {
-

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

2018-04-02 Thread Caolán McNamara
 sw/inc/swabstdlg.hxx |2 -
 sw/source/ui/dialog/swdlgfact.cxx|   14 ---
 sw/source/ui/dialog/swdlgfact.hxx|   13 +--
 sw/source/ui/misc/bookmark.cxx   |2 -
 sw/source/ui/utlui/swrenamexnameddlg.cxx |   49 +++
 sw/source/uibase/inc/swrenamexnameddlg.hxx   |   29 +++
 sw/source/uibase/utlui/content.cxx   |2 -
 sw/uiconfig/swriter/ui/renameobjectdialog.ui |   18 ++---
 8 files changed, 66 insertions(+), 63 deletions(-)

New commits:
commit 91af9a53df79d256dc6a02c900fa570fe10d63ad
Author: Caolán McNamara 
Date:   Mon Apr 2 17:54:45 2018 +0100

weld SwRenameXNamedDlg

Change-Id: I3373ac37509e5230b6e6e07d85035d0b02252e24
Reviewed-on: https://gerrit.libreoffice.org/52273
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index d7d95a1fc4fe..c0e2484a4d75 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -441,7 +441,7 @@ public:
 
 virtual VclPtr CreateSwFieldDlg(SfxBindings* pB, 
SwChildWinWrapper* pCW, vcl::Window *pParent) = 0;
 virtual VclPtr   CreateSwFieldEditDlg ( SwView& rVw ) = 
0;
-virtual VclPtr 
CreateSwRenameXNamedDlg(vcl::Window* pParent,
+virtual VclPtr 
CreateSwRenameXNamedDlg(weld::Window* pParent,
 css::uno::Reference< css::container::XNamed > & xNamed,
 css::uno::Reference< css::container::XNameAccess > & xNameAccess) = 0;
 virtual VclPtr 
CreateSwModalRedlineAcceptDlg(vcl::Window *pParent) = 0;
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index 1d1ad97285a2..eae34ddfb912 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -137,7 +137,10 @@ short AbstractSwAutoFormatDlg_Impl::Execute()
 return m_xDlg->execute();
 }
 IMPL_ABSTDLG_BASE(AbstractSwFieldDlg_Impl);
-IMPL_ABSTDLG_BASE(AbstractSwRenameXNamedDlg_Impl);
+short AbstractSwRenameXNamedDlg_Impl::Execute()
+{
+return m_xDlg->run();
+}
 IMPL_ABSTDLG_BASE(AbstractSwModalRedlineAcceptDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractGlossaryDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractFieldInputDlg_Impl);
@@ -400,14 +403,14 @@ void AbstractSwFieldDlg_Impl::ShowReferencePage()
 
 void AbstractSwRenameXNamedDlg_Impl::SetForbiddenChars( const OUString& rSet )
 {
-pDlg->SetForbiddenChars( rSet );
+m_xDlg->SetForbiddenChars( rSet );
 }
 
 voidAbstractSwRenameXNamedDlg_Impl::SetAlternativeAccess(
  css::uno::Reference< css::container::XNameAccess > & xSecond,
  css::uno::Reference< css::container::XNameAccess > & xThird )
 {
-pDlg->SetAlternativeAccess( xSecond, xThird);
+m_xDlg->SetAlternativeAccess( xSecond, xThird);
 }
 
 voidAbstractSwModalRedlineAcceptDlg_Impl::AcceptAll( bool bAccept )
@@ -877,12 +880,11 @@ VclPtr   
SwAbstractDialogFactory_Impl::CreateSwFieldEditDlg (
 return VclPtr::Create( pDlg );
 }
 
-VclPtr 
SwAbstractDialogFactory_Impl::CreateSwRenameXNamedDlg(vcl::Window* pParent,
+VclPtr 
SwAbstractDialogFactory_Impl::CreateSwRenameXNamedDlg(weld::Window* pParent,
 css::uno::Reference< css::container::XNamed > & xNamed,
 css::uno::Reference< css::container::XNameAccess > & xNameAccess)
 {
-VclPtr pDlg = VclPtr::Create( 
pParent,xNamed, xNameAccess);
-return VclPtr::Create( pDlg );
+return VclPtr::Create(new 
SwRenameXNamedDlg(pParent,xNamed, xNameAccess));
 }
 
 VclPtr 
SwAbstractDialogFactory_Impl::CreateSwModalRedlineAcceptDlg(vcl::Window 
*pParent)
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index 882a5ffb2003..d2e1f5e342a8 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -306,8 +306,15 @@ class AbstractSwFieldDlg_Impl : public AbstractSwFieldDlg
 
 class AbstractSwRenameXNamedDlg_Impl : public AbstractSwRenameXNamedDlg
 {
-DECL_ABSTDLG_BASE(AbstractSwRenameXNamedDlg_Impl,SwRenameXNamedDlg )
-virtual voidSetForbiddenChars( const OUString& rSet ) override;
+protected:
+std::unique_ptr m_xDlg;
+public:
+explicit AbstractSwRenameXNamedDlg_Impl(SwRenameXNamedDlg* p)
+: m_xDlg(p)
+{
+}
+virtual short Execute() override;
+virtual void SetForbiddenChars( const OUString& rSet ) override;
 virtual void SetAlternativeAccess(
  css::uno::Reference< css::container::XNameAccess > & xSecond,
  css::uno::Reference< css::container::XNameAccess > & xThird ) 
override;
@@ -531,7 +538,7 @@ public:
 const SfxItemSet* pItemSet, SwWrtShell* pSh) override;
 virtual VclPtr CreateSwFieldDlg(SfxBindings* pB, 
SwChildWinWrapper* pCW, vcl::Window *pParent) override;
 virtual VclPtr   CreateSwFieldEditDlg ( SwView& rVw ) 
override;
-virtual VclPtr 
CreateSwRenameXNamedDlg(vcl::Window* 

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

2018-04-02 Thread Caolán McNamara
 sw/inc/swabstdlg.hxx   |2 +-
 sw/source/ui/dialog/swdlgfact.cxx  |9 ++---
 sw/source/ui/dialog/swdlgfact.hxx  |   15 ++-
 sw/source/ui/dialog/swuiexp.cxx|1 +
 sw/source/ui/table/mergetbl.cxx|   26 +++---
 sw/source/uibase/inc/mergetbl.hxx  |   20 
 sw/source/uibase/shells/tabsh.cxx  |2 +-
 sw/uiconfig/swriter/ui/mergetabledialog.ui |   15 +--
 8 files changed, 51 insertions(+), 39 deletions(-)

New commits:
commit 0c466688fef13295e2a5fcbe23e215b528c4f781
Author: Caolán McNamara 
Date:   Mon Apr 2 17:27:05 2018 +0100

weld SwMergeTableDlg

Change-Id: Idbe96bb8150fc695408faa38342237191aceb777
Reviewed-on: https://gerrit.libreoffice.org/52271
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index aa80546e98f7..d7d95a1fc4fe 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -446,7 +446,7 @@ public:
 css::uno::Reference< css::container::XNameAccess > & xNameAccess) = 0;
 virtual VclPtr 
CreateSwModalRedlineAcceptDlg(vcl::Window *pParent) = 0;
 
-virtual VclPtr  CreateTableMergeDialog( 
vcl::Window* pParent, bool& rWithPrev ) = 0;
+virtual VclPtr  
CreateTableMergeDialog(weld::Window* pParent, bool& rWithPrev) = 0;
 virtual VclPtr   CreateFrameTabDialog(const 
OUString ,
 SfxViewFrame *pFrame, 
vcl::Window *pParent,
 const SfxItemSet& rCoreSet,
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index 309a7393ea6a..1d1ad97285a2 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -111,6 +111,10 @@ short AbstractSwTableHeightDlg_Impl::Execute()
 {
 return m_xDlg->execute();
 }
+short AbstractSwMergeTableDlg_Impl::Execute()
+{
+return m_xDlg->execute();
+}
 short AbstractSwSortDlg_Impl::Execute()
 {
 return m_xDlg->execute();
@@ -887,10 +891,9 @@ VclPtr 
SwAbstractDialogFactory_Impl::CreateSwMo
 return VclPtr::Create( pDlg );
 }
 
-VclPtr 
SwAbstractDialogFactory_Impl::CreateTableMergeDialog(vcl::Window* pParent, 
bool& rWithPrev)
+VclPtr 
SwAbstractDialogFactory_Impl::CreateTableMergeDialog(weld::Window* pParent, 
bool& rWithPrev)
 {
-VclPtr pDlg = VclPtr::Create( pParent, rWithPrev 
);
-return VclPtr::Create( pDlg );
+return VclPtr::Create(new 
SwMergeTableDlg(pParent, rWithPrev));
 }
 
 VclPtr 
SwAbstractDialogFactory_Impl::CreateFrameTabDialog(const OUString ,
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index d2cab9091623..882a5ffb2003 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -28,6 +28,7 @@ class SwBreakDlg;
 class SwSortDlg;
 class SwTableHeightDlg;
 class SwTableWidthDlg;
+class SwMergeTableDlg;
 class SignatureLineDialog;
 class SfxTabDialog;
 class SwConvertTableDlg;
@@ -168,6 +169,18 @@ public:
 virtual short Execute() override;
 };
 
+class AbstractSwMergeTableDlg_Impl : public VclAbstractDialog
+{
+protected:
+std::unique_ptr m_xDlg;
+public:
+explicit AbstractSwMergeTableDlg_Impl(SwMergeTableDlg* p)
+: m_xDlg(p)
+{
+}
+virtual short Execute() override;
+};
+
 class AbstractSplitTableDialog_Impl : public AbstractSplitTableDialog // add 
for
 {
 protected:
@@ -523,7 +536,7 @@ public:
 css::uno::Reference< css::container::XNameAccess > & xNameAccess) 
override;
 virtual VclPtr 
CreateSwModalRedlineAcceptDlg(vcl::Window *pParent) override;
 
-virtual VclPtr  
CreateTableMergeDialog(vcl::Window* pParent, bool& rWithPrev) override;
+virtual VclPtr  
CreateTableMergeDialog(weld::Window* pParent, bool& rWithPrev) override;
 virtual VclPtr   CreateFrameTabDialog( const 
OUString ,
 SfxViewFrame *pFrame, 
vcl::Window *pParent,
 const SfxItemSet& rCoreSet,
diff --git a/sw/source/ui/dialog/swuiexp.cxx b/sw/source/ui/dialog/swuiexp.cxx
index 657801c4af65..c063c8c924cd 100644
--- a/sw/source/ui/dialog/swuiexp.cxx
+++ b/sw/source/ui/dialog/swuiexp.cxx
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/sw/source/ui/table/mergetbl.cxx b/sw/source/ui/table/mergetbl.cxx
index b00fca6ca93e..fa51a3b60aa3 100644
--- a/sw/source/ui/table/mergetbl.cxx
+++ b/sw/source/ui/table/mergetbl.cxx
@@ -20,29 +20,25 @@
 #include 
 #include 
 
-SwMergeTableDlg::SwMergeTableDlg( vcl::Window *pParent, bool& rWithPrev )
-: SvxStandardDialog(pParent, "MergeTableDialog", 
"modules/swriter/ui/mergetabledialog.ui")

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

2018-04-02 Thread Caolán McNamara
 sw/inc/colwd.hxx|3 ++
 sw/inc/swabstdlg.hxx|2 -
 sw/source/ui/dialog/swdlgfact.cxx   |9 --
 sw/source/ui/dialog/swdlgfact.hxx   |   15 ++
 sw/source/ui/dialog/swuiexp.cxx |1 
 sw/source/ui/table/colwd.cxx|   14 +-
 sw/source/ui/table/rowht.cxx|   50 +++-
 sw/source/uibase/inc/rowht.hxx  |   18 ++--
 sw/source/uibase/shells/tabsh.cxx   |2 -
 sw/uiconfig/swriter/ui/rowheight.ui |   20 ++
 10 files changed, 79 insertions(+), 55 deletions(-)

New commits:
commit cc78e723723bac34a43e5f3ad05947f775abe0db
Author: Caolán McNamara 
Date:   Mon Apr 2 16:57:30 2018 +0100

weld SwTableHeightDlg

Change-Id: I46b90b97da28a7461a069867bade40a64b17c9b5
Reviewed-on: https://gerrit.libreoffice.org/52269
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/inc/colwd.hxx b/sw/inc/colwd.hxx
index 894ed19b2f5a..379f4584c922 100644
--- a/sw/inc/colwd.hxx
+++ b/sw/inc/colwd.hxx
@@ -25,6 +25,7 @@ class SwTableFUNC;
 
 class SwTableWidthDlg final : public weld::GenericDialogController
 {
+private:
 SwTableFUNC _rFnc;
 
 std::unique_ptr m_xColNF;
@@ -32,6 +33,8 @@ class SwTableWidthDlg final : public 
weld::GenericDialogController
 
 DECL_LINK(LoseFocusHdl, weld::SpinButton&, void);
 
+void Apply();
+
 public:
 SwTableWidthDlg(weld::Window *pParent, SwTableFUNC );
 short execute();
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 9c900e9d4b6f..aa80546e98f7 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -425,7 +425,7 @@ public:
 virtual VclPtr CreateSwSelGlossaryDlg(const 
OUString ) = 0;
 
 virtual VclPtr CreateSwSortingDialog(weld::Window * 
pParent, SwWrtShell ) = 0;
-virtual VclPtr CreateSwTableHeightDialog(vcl::Window 
*pParent, SwWrtShell ) = 0;
+virtual VclPtr CreateSwTableHeightDialog(weld::Window 
*pParent, SwWrtShell ) = 0;
 virtual VclPtr CreateSwColumnDialog(vcl::Window 
*pParent, SwWrtShell ) = 0;
 virtual VclPtr 
CreateSplitTableDialog(weld::Window* pParent, SwWrtShell ) = 0;
 
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index ca8b8c12fb44..309a7393ea6a 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -107,6 +107,10 @@ short AbstractSwTableWidthDlg_Impl::Execute()
 {
 return m_xDlg->execute();
 }
+short AbstractSwTableHeightDlg_Impl::Execute()
+{
+return m_xDlg->execute();
+}
 short AbstractSwSortDlg_Impl::Execute()
 {
 return m_xDlg->execute();
@@ -806,10 +810,9 @@ VclPtr 
SwAbstractDialogFactory_Impl::CreateSwColumnDialog(vcl
 return VclPtr::Create( pDlg );
 }
 
-VclPtr 
SwAbstractDialogFactory_Impl::CreateSwTableHeightDialog(vcl::Window *pParent, 
SwWrtShell )
+VclPtr 
SwAbstractDialogFactory_Impl::CreateSwTableHeightDialog(weld::Window *pParent, 
SwWrtShell )
 {
-VclPtr pDlg = VclPtr::Create( pParent, rSh);
-return VclPtr::Create( pDlg );
+return VclPtr::Create(new 
SwTableHeightDlg(pParent, rSh));
 }
 
 VclPtr 
SwAbstractDialogFactory_Impl::CreateSwSortingDialog(weld::Window *pParent, 
SwWrtShell )
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index 6635787db0fc..d2cab9091623 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -26,6 +26,7 @@ class SwAsciiFilterDlg;
 class Dialog;
 class SwBreakDlg;
 class SwSortDlg;
+class SwTableHeightDlg;
 class SwTableWidthDlg;
 class SignatureLineDialog;
 class SfxTabDialog;
@@ -155,6 +156,18 @@ public:
 virtual short Execute() override;
 };
 
+class AbstractSwTableHeightDlg_Impl : public VclAbstractDialog
+{
+protected:
+std::unique_ptr m_xDlg;
+public:
+explicit AbstractSwTableHeightDlg_Impl(SwTableHeightDlg* p)
+: m_xDlg(p)
+{
+}
+virtual short Execute() override;
+};
+
 class AbstractSplitTableDialog_Impl : public AbstractSplitTableDialog // add 
for
 {
 protected:
@@ -490,7 +503,7 @@ public:
 virtual VclPtr CreateSwAutoMarkDialog(vcl::Window 
*pParent, SwWrtShell ) override;
 virtual VclPtr CreateSwSelGlossaryDlg(const 
OUString ) override;
 virtual VclPtr CreateSwSortingDialog(weld::Window * 
pParent, SwWrtShell ) override;
-virtual VclPtr CreateSwTableHeightDialog(vcl::Window 
*pParent, SwWrtShell ) override;
+virtual VclPtr CreateSwTableHeightDialog(weld::Window 
*pParent, SwWrtShell ) override;
 virtual VclPtr CreateSwColumnDialog(vcl::Window 
*pParent, SwWrtShell ) override;
 virtual VclPtr 
CreateSplitTableDialog(weld::Window* pParent, SwWrtShell ) override;
 
diff --git a/sw/source/ui/dialog/swuiexp.cxx b/sw/source/ui/dialog/swuiexp.cxx
index 1b681c9e8b52..657801c4af65 100644
--- a/sw/source/ui/dialog/swuiexp.cxx
+++ 

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

2018-03-16 Thread Caolán McNamara
 sw/inc/swabstdlg.hxx|2 
 sw/source/ui/dialog/swdlgfact.cxx   |9 ++-
 sw/source/ui/dialog/swdlgfact.hxx   |   16 +-
 sw/source/ui/dialog/swuiexp.cxx |1 
 sw/source/uibase/dialog/SignatureLineDialog.cxx |   58 +++-
 sw/source/uibase/inc/SignatureLineDialog.hxx|   29 +---
 sw/source/uibase/uiview/viewdlg2.cxx|8 +--
 sw/uiconfig/swriter/ui/signatureline.ui |   54 ++
 8 files changed, 101 insertions(+), 76 deletions(-)

New commits:
commit d416fa9a212e0421a7c925507ddee07132f3cab3
Author: Caolán McNamara 
Date:   Fri Mar 16 12:02:17 2018 +

weld SignatureLineDialog

Change-Id: I14cbc7e1aa70696abdeb21eae31176566f17e066
Reviewed-on: https://gerrit.libreoffice.org/51422
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 0c9a77babacd..7c7861797d03 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -400,7 +400,7 @@ public:
 SwCharDlgMode nDialogMode, const OUString* pFormatStr = nullptr) = 0;
 virtual VclPtr CreateSwConvertTableDlg(SwView& 
rView, bool bToTable) = 0;
 virtual VclPtr CreateSwCaptionDialog ( vcl::Window 
*pParent, SwView ) = 0;
-virtual VclPtr CreateSignatureLineDialog(vcl::Window* 
pParent, SwView& rView) = 0;
+virtual VclPtr CreateSignatureLineDialog(weld::Window* 
pParent, SwView& rView) = 0;
 
 virtual VclPtr 
CreateSwInsertDBColAutoPilot(SwView& rView,
 css::uno::Reference< css::sdbc::XDataSource> rxSource,
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index 4ddbae92c8b3..b0724dcf18e7 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -104,6 +104,10 @@ short AbstractSwSortDlg_Impl::Execute()
 {
 return m_xDlg->execute();
 }
+short AbstractSignatureLineDialog_Impl::Execute()
+{
+return m_xDlg->execute();
+}
 IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl);
 short AbstractSwConvertTableDlg_Impl::Execute()
 {
@@ -724,10 +728,9 @@ VclPtr 
SwAbstractDialogFactory_Impl::CreateSwCaptionDialog (
 return VclPtr::Create( pDlg );
 }
 
-VclPtr 
SwAbstractDialogFactory_Impl::CreateSignatureLineDialog(vcl::Window* pParent, 
SwView& rV)
+VclPtr 
SwAbstractDialogFactory_Impl::CreateSignatureLineDialog(weld::Window* pParent, 
SwView& rV)
 {
-VclPtr pDlg = VclPtr::Create(pParent, rV);
-return VclPtr::Create(pDlg);
+return VclPtr::Create(new 
SignatureLineDialog(pParent, rV));
 }
 
 VclPtr 
SwAbstractDialogFactory_Impl::CreateSwInsertDBColAutoPilot( SwView& rView,
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index b24f08177d0d..33db10f8cb49 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -26,6 +26,7 @@ class SwAsciiFilterDlg;
 class Dialog;
 class SwBreakDlg;
 class SwSortDlg;
+class SignatureLineDialog;
 class SfxTabDialog;
 class SwConvertTableDlg;
 class SwInsertDBColAutoPilot;
@@ -114,6 +115,18 @@ public:
 virtual short Execute() override;
 };
 
+class AbstractSignatureLineDialog_Impl : public VclAbstractDialog
+{
+protected:
+std::unique_ptr m_xDlg;
+public:
+explicit AbstractSignatureLineDialog_Impl(SignatureLineDialog* p)
+: m_xDlg(p)
+{
+}
+virtual short Execute() override;
+};
+
 class AbstractSwBreakDlg_Impl : public AbstractSwBreakDlg
 {
 protected:
@@ -438,8 +451,7 @@ public:
 SwCharDlgMode nDialogMode, const OUString* pFormatStr = nullptr) 
override;
 virtual VclPtr CreateSwConvertTableDlg(SwView& 
rView, bool bToTable) override;
 virtual VclPtr CreateSwCaptionDialog ( vcl::Window 
*pParent, SwView ) override;
-virtual VclPtr CreateSignatureLineDialog(vcl::Window* 
pParent,
-SwView& rView) 
override;
+virtual VclPtr CreateSignatureLineDialog(weld::Window* 
pParent, SwView& rView) override;
 
 virtual VclPtr 
CreateSwInsertDBColAutoPilot(SwView& rView,
 css::uno::Reference< css::sdbc::XDataSource> rxSource,
diff --git a/sw/source/ui/dialog/swuiexp.cxx b/sw/source/ui/dialog/swuiexp.cxx
index b6f412435c33..f938df0b3ff0 100644
--- a/sw/source/ui/dialog/swuiexp.cxx
+++ b/sw/source/ui/dialog/swuiexp.cxx
@@ -39,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/sw/source/uibase/dialog/SignatureLineDialog.cxx 
b/sw/source/uibase/dialog/SignatureLineDialog.cxx
index c7832e4078e9..815636d86ab9 100644
--- a/sw/source/uibase/dialog/SignatureLineDialog.cxx
+++ b/sw/source/uibase/dialog/SignatureLineDialog.cxx
@@ -37,16 +37,18 @@ using namespace css::view;
 using namespace css::drawing;
 using namespace css::graphic;
 

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

2018-03-02 Thread Caolán McNamara
 sw/inc/swabstdlg.hxx |2 +-
 sw/source/ui/dialog/swdlgfact.cxx|   11 +++
 sw/source/ui/dialog/swdlgfact.hxx|   11 +--
 sw/source/ui/table/splittbl.cxx  |   33 ++---
 sw/source/uibase/inc/splittbl.hxx|   33 -
 sw/source/uibase/shells/tabsh.cxx|3 ++-
 sw/uiconfig/swriter/ui/splittable.ui |   22 ++
 7 files changed, 59 insertions(+), 56 deletions(-)

New commits:
commit 6eb1affe21d98097c539619af617f0bbe5b8abd1
Author: Caolán McNamara 
Date:   Fri Mar 2 15:30:01 2018 +

weld split table dialog

Change-Id: I329a57fa09e6eb0fe75b93b0726d9b7718426693
Reviewed-on: https://gerrit.libreoffice.org/50639
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 89e70bc4237b..dcdc6d408c8d 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -430,7 +430,7 @@ public:
 virtual VclPtr CreateSwSortingDialog(vcl::Window * 
pParent, SwWrtShell ) = 0;
 virtual VclPtr CreateSwTableHeightDialog(vcl::Window 
*pParent, SwWrtShell ) = 0;
 virtual VclPtr CreateSwColumnDialog(vcl::Window 
*pParent, SwWrtShell ) = 0;
-virtual VclPtr CreateSplitTableDialog ( 
vcl::Window * pParent, SwWrtShell  ) = 0;
+virtual VclPtr 
CreateSplitTableDialog(weld::Window* pParent, SwWrtShell ) = 0;
 
 virtual VclPtr 
CreateSwAutoFormatDlg(weld::Window* pParent, SwWrtShell* pShell,
   bool 
bSetAutoFormat = true,
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index a2999ec607dd..96a4acb469c5 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -92,7 +92,10 @@ IMPL_ABSTDLG_BASE(AbstractSwInsertAbstractDlg_Impl);
 IMPL_ABSTDLG_BASE(SwAbstractSfxDialog_Impl);
 IMPL_ABSTDLG_BASE(AbstractSwAsciiFilterDlg_Impl);
 IMPL_ABSTDLG_BASE(VclAbstractDialog_Impl);
-IMPL_ABSTDLG_BASE(AbstractSplitTableDialog_Impl);
+short AbstractSplitTableDialog_Impl::Execute()
+{
+return m_xDlg->run();
+}
 short AbstractSwBreakDlg_Impl::Execute()
 {
 return m_xDlg->run();
@@ -197,7 +200,7 @@ void AbstractSwAsciiFilterDlg_Impl::FillOptions( 
SwAsciiOptions& rOptions )
 
 SplitTable_HeadlineOption AbstractSplitTableDialog_Impl::GetSplitMode()
 {
-return pDlg->GetSplitMode();
+return m_xDlg->GetSplitMode();
 }
 
 OUString AbstractSwBreakDlg_Impl::GetTemplateName()
@@ -795,9 +798,9 @@ VclPtr 
SwAbstractDialogFactory_Impl::CreateSwSortingDialog(vc
 return VclPtr::Create( pDlg );
 }
 
-VclPtr 
SwAbstractDialogFactory_Impl::CreateSplitTableDialog ( vcl::Window *pParent, 
SwWrtShell  )
+VclPtr 
SwAbstractDialogFactory_Impl::CreateSplitTableDialog(weld::Window *pParent, 
SwWrtShell )
 {
-return VclPtr::Create( 
VclPtr::Create( pParent, rSh) );
+return VclPtr::Create(new 
SwSplitTableDlg(pParent, rSh));
 }
 
 VclPtr 
SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg(const OUString )
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index 6c0418ecdf6d..13a25e8d9948 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -118,7 +118,14 @@ public:
 
 class AbstractSplitTableDialog_Impl : public AbstractSplitTableDialog // add 
for
 {
-DECL_ABSTDLG_BASE(AbstractSplitTableDialog_Impl, SwSplitTableDlg)
+protected:
+std::unique_ptr m_xDlg;
+public:
+explicit AbstractSplitTableDialog_Impl(SwSplitTableDlg* p)
+: m_xDlg(p)
+{
+}
+virtual short Execute() override;
 virtual SplitTable_HeadlineOption GetSplitMode() override;
 };
 
@@ -438,7 +445,7 @@ public:
 virtual VclPtr CreateSwSortingDialog(vcl::Window * 
pParent, SwWrtShell ) override;
 virtual VclPtr CreateSwTableHeightDialog(vcl::Window 
*pParent, SwWrtShell ) override;
 virtual VclPtr CreateSwColumnDialog(vcl::Window 
*pParent, SwWrtShell ) override;
-virtual VclPtr CreateSplitTableDialog ( 
vcl::Window * pParent, SwWrtShell  ) override;
+virtual VclPtr 
CreateSplitTableDialog(weld::Window* pParent, SwWrtShell ) override;
 
 virtual VclPtr 
CreateSwAutoFormatDlg(weld::Window* pParent, SwWrtShell* pShell,
   bool 
bSetAutoFormat = true,
diff --git a/sw/source/ui/table/splittbl.cxx b/sw/source/ui/table/splittbl.cxx
index 63dd08223447..f78041b06cfa 100644
--- a/sw/source/ui/table/splittbl.cxx
+++ b/sw/source/ui/table/splittbl.cxx
@@ -21,39 +21,26 @@
 #include 
 #include 
 
-SwSplitTableDlg::SwSplitTableDlg( vcl::Window *pParent, SwWrtShell  )
-: SvxStandardDialog( pParent, "SplitTableDialog", 
"modules/swriter/ui/splittable.ui" )
+SwSplitTableDlg::SwSplitTableDlg(weld::Window *pParent, SwWrtShell )
+: m_xBuilder(Application::CreateBuilder(pParent, 

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

2018-03-01 Thread Caolán McNamara
 sw/inc/swabstdlg.hxx   |8 
 sw/source/ui/dbui/dbinsdlg.cxx |   30 -
 sw/source/ui/dialog/swdlgfact.cxx  |   14 
 sw/source/ui/dialog/swdlgfact.hxx  |   17 -
 sw/source/ui/table/autoformatpreview.cxx   |  439 +++--
 sw/source/ui/table/convert.cxx |   13 
 sw/source/ui/table/tautofmt.cxx|  306 +---
 sw/source/uibase/inc/autoformatpreview.hxx |   54 +++
 sw/source/uibase/inc/convert.hxx   |2 
 sw/source/uibase/inc/dbinsdlg.hxx  |2 
 sw/source/uibase/inc/instable.hxx  |2 
 sw/source/uibase/inc/tautofmt.hxx  |   70 ++--
 sw/source/uibase/shells/tabsh.cxx  |2 
 sw/uiconfig/swriter/ui/autoformattable.ui  |  214 --
 sw/uiconfig/swriter/ui/inserttable.ui  |2 
 15 files changed, 821 insertions(+), 354 deletions(-)

New commits:
commit d24dba40175256a317a3d2281c70d3240b74f4a0
Author: Caolán McNamara 
Date:   Thu Mar 1 10:40:27 2018 +

weld autoformat dialog

Change-Id: I93af2393d103d882d08b74e1e5a98b601ebd29dc
Reviewed-on: https://gerrit.libreoffice.org/50586
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index f79fa593433c..89e70bc4237b 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -314,7 +314,7 @@ class AbstractSwAutoFormatDlg : public VclAbstractDialog
 protected:
 virtual ~AbstractSwAutoFormatDlg() override = default;
 public:
-virtual void FillAutoFormatOfIndex( SwTableAutoFormat*& rToFill ) const = 
0;
+virtual SwTableAutoFormat* FillAutoFormatOfIndex() const = 0;
 };
 
 class AbstractSwFieldDlg : public SfxAbstractTabDialog
@@ -432,9 +432,9 @@ public:
 virtual VclPtr CreateSwColumnDialog(vcl::Window 
*pParent, SwWrtShell ) = 0;
 virtual VclPtr CreateSplitTableDialog ( 
vcl::Window * pParent, SwWrtShell  ) = 0;
 
-virtual VclPtr CreateSwAutoFormatDlg( 
vcl::Window* pParent, SwWrtShell* pShell,
-bool 
bSetAutoFormat = true,
-const 
SwTableAutoFormat* pSelFormat = nullptr ) = 0;
+virtual VclPtr 
CreateSwAutoFormatDlg(weld::Window* pParent, SwWrtShell* pShell,
+  bool 
bSetAutoFormat = true,
+  const 
SwTableAutoFormat* pSelFormat = nullptr ) = 0;
 virtual VclPtr CreateSwBorderDlg ( vcl::Window* 
pParent, SfxItemSet& rSet, SwBorderModes nType ) = 0;
 virtual VclPtr CreateSwWrapDlg ( vcl::Window* pParent, 
SfxItemSet& rSet, SwWrtShell* pSh ) = 0;
 
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index d96a5feac7f5..8a1df9b58491 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -191,7 +191,6 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& 
rView,
 , aDBData(rData)
 , sNoTmpl(SwResId(SW_STR_NONE))
 , pView()
-, pTAutoFormat(nullptr)
 , pTableSet(nullptr)
 , pRep(nullptr)
 {
@@ -421,7 +420,7 @@ void SwInsertDBColAutoPilot::dispose()
 delete pTableSet;
 delete pRep;
 
-delete pTAutoFormat;
+m_xTAutoFormat.reset();
 m_pRbAsTable.clear();
 m_pRbAsField.clear();
 m_pRbAsText.clear();
@@ -781,10 +780,10 @@ IMPL_LINK( SwInsertDBColAutoPilot, AutoFormatHdl, 
Button*, pButton, void )
 SwAbstractDialogFactory* pFact = swui::GetFactory();
 OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
 
-ScopedVclPtr 
pDlg(pFact->CreateSwAutoFormatDlg(pButton, pView->GetWrtShellPtr(), false, 
pTAutoFormat));
+ScopedVclPtr 
pDlg(pFact->CreateSwAutoFormatDlg(pButton->GetFrameWeld(), 
pView->GetWrtShellPtr(), false, m_xTAutoFormat.get()));
 OSL_ENSURE(pDlg, "Dialog creation failed!");
 if( RET_OK == pDlg->Execute())
-pDlg->FillAutoFormatOfIndex( pTAutoFormat );
+m_xTAutoFormat.reset(pDlg->FillAutoFormatOfIndex());
 }
 
 IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox&, rBox, void )
@@ -1044,7 +1043,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const 
Sequence& rSelection,
 bool bHTML = 0 != (::GetHtmlMode( pView->GetDocShell() ) & 
HTMLMODE_ON);
 rSh.InsertTable(
 pModOpt->GetInsTableFlags(bHTML),
-nRows, nCols, (pSelection ? pTAutoFormat : nullptr) );
+nRows, nCols, (pSelection ? m_xTAutoFormat.get(): nullptr) );
 rSh.MoveTable( GotoPrevTable, fnTableStart );
 
 if( pSelection && pTableSet )
@@ -1189,13 +1188,13 @@ void SwInsertDBColAutoPilot::DataToDoc( const 
Sequence& rSelection,
 }
 
 rSh.MoveTable( GotoCurrTable, fnTableStart );
-if( !pSelection && ( pTableSet || pTAutoFormat ))
+if( 

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

2017-09-18 Thread Bernhard Widl
 sw/inc/swabstdlg.hxx  |   18 +++---
 sw/source/ui/dialog/swdlgfact.cxx |   28 -
 sw/source/ui/dialog/swdlgfact.hxx |   18 +++---
 sw/source/ui/fldui/DropDownFieldDialog.cxx|   48 ++--
 sw/source/ui/fldui/inpdlg.cxx |   31 +-
 sw/source/uibase/docvw/edtwin.cxx |2 
 sw/source/uibase/inc/DropDownFieldDialog.hxx  |   15 +++--
 sw/source/uibase/inc/inpdlg.hxx   |   10 +++
 sw/source/uibase/inc/wrtsh.hxx|6 +-
 sw/source/uibase/shells/textfld.cxx   |2 
 sw/source/uibase/wrtsh/wrtsh2.cxx |   76 --
 sw/uiconfig/swriter/ui/dropdownfielddialog.ui |   27 +++--
 sw/uiconfig/swriter/ui/inputfielddialog.ui|   27 +++--
 13 files changed, 248 insertions(+), 60 deletions(-)

New commits:
commit 7d5245848c28f5786258476cd7aa2a4523645de3
Author: Bernhard Widl 
Date:   Fri Sep 15 17:39:48 2017 +0200

tdf#79877 revert to old behavior when clicking on input fields.

doubleclick on input field brings up old input fields dialog
that dialog now starts at current field and has previous/next navigation

Change-Id: Ie3eec38d62cbf8a8248acb4fd84731c078ebadd4
Reviewed-on: https://gerrit.libreoffice.org/42333
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index ba607870619d..c582500ac0b0 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -111,9 +111,11 @@ protected:
 virtual ~AbstractFieldInputDlg() override = default;
 public:
 //from class SalFrame
-virtual void SetWindowState( const OString & rStr ) = 0;
-virtual OString  GetWindowState() const = 0;
-virtual void EndDialog(sal_Int32 nResult) override = 0;
+virtual void  SetWindowState( const OString & rStr ) = 0;
+virtual OString   GetWindowState() const = 0;
+virtual void  EndDialog(sal_Int32 nResult) override = 0;
+virtual bool  PrevButtonPressed() const = 0;
+virtual bool  NextButtonPressed() const = 0;
 };
 
 class AbstractInsFootNoteDlg : public VclAbstractDialog
@@ -282,8 +284,10 @@ class AbstractDropDownFieldDialog : public 
VclAbstractDialog
 protected:
 virtual ~AbstractDropDownFieldDialog() override = default;
 public:
-virtual OString GetWindowState() const = 0; //this method inherit from 
SystemWindow
-virtual voidSetWindowState( const OString & rStr ) = 0; //this method 
inherit from SystemWindow
+virtual OString   GetWindowState() const = 0; //this method inherit 
from SystemWindow
+virtual void  SetWindowState( const OString & rStr ) = 0; //this 
method inherit from SystemWindow
+virtual bool  PrevButtonPressed() const = 0;
+virtual bool  NextButtonPressed() const = 0;
 };
 
 class AbstractSwLabDlg  : public SfxAbstractTabDialog
@@ -404,7 +408,7 @@ public:
 virtual VclPtr CreateSwFootNoteOptionDlg(vcl::Window 
*pParent, SwWrtShell ) = 0;
 
 virtual VclPtr 
CreateDropDownFieldDialog(SwWrtShell ,
-SwField* pField, bool bNextButton) = 0;
+SwField* pField, bool bPrevButton, bool bNextButton) = 0;
 virtual VclPtr CreateSwEnvDlg ( vcl::Window* 
pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, bool 
bInsert ) = 0;
 
 virtual VclPtr CreateSwLabDlg(const SfxItemSet& rSet,
@@ -463,7 +467,7 @@ public:
 SwGlossaryHdl* pGlosHdl,
 SwWrtShell *pWrtShell) = 0;
 virtual VclPtr
CreateFieldInputDlg(vcl::Window *pParent,
-SwWrtShell , SwField* pField, bool bNextButton) = 0;
+SwWrtShell , SwField* pField, bool bPrevButton, bool bNextButton) 
= 0;
 virtual VclPtr 
CreateInsFootNoteDlg(vcl::Window * pParent,
 SwWrtShell , bool bEd = false) = 0;
 virtual VclPtr  CreateTitlePageDlg ( 
vcl::Window * pParent ) = 0;
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index 9d6f17de3971..12f2ce433673 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -239,6 +239,16 @@ void AbstractDropDownFieldDialog_Impl::SetWindowState( 
const OString& rStr )
 pDlg->SetWindowState(rStr);
 }
 
+bool AbstractDropDownFieldDialog_Impl::PrevButtonPressed() const
+{
+return pDlg->PrevButtonPressed();
+}
+
+bool AbstractDropDownFieldDialog_Impl::NextButtonPressed() const
+{
+return pDlg->NextButtonPressed();
+}
+
 void AbstractSwLabDlg_Impl::SetCurPageId( sal_uInt16 nId )
 {
 pDlg->SetCurPageId( nId );
@@ -411,6 +421,16 @@ void AbstractFieldInputDlg_Impl::EndDialog(sal_Int32 n)
 pDlg->EndDialog(n);
 }
 
+bool AbstractFieldInputDlg_Impl::PrevButtonPressed() const
+{
+return 

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

2017-06-12 Thread Samuel Mehrbrodt
 sw/inc/crstate.hxx  |6 +++--
 sw/source/core/crsr/crstrvl.cxx |   16 +++---
 sw/source/core/text/frmcrsr.cxx |   16 ++
 sw/source/ui/config/optpage.cxx |7 ++
 sw/source/ui/dbui/mmlayoutpage.cxx  |2 -
 sw/source/uibase/inc/optpage.hxx|1 
 sw/uiconfig/swriter/ui/optformataidspage.ui |   30 +---
 7 files changed, 63 insertions(+), 15 deletions(-)

New commits:
commit 23cf6dbe4d35d0d9beeaa2193247c6f67a869c66
Author: Samuel Mehrbrodt 
Date:   Mon Jun 12 09:31:03 2017 +0200

tdf#108427 Direct cursor: Add option to insert only spaces

Change-Id: I1136688ec8af44c533f4dd40a9a4b24ea59992ef
Reviewed-on: https://gerrit.libreoffice.org/38685
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/sw/inc/crstate.hxx b/sw/inc/crstate.hxx
index 8c361dee61fc..71a3a7868dcb 100644
--- a/sw/inc/crstate.hxx
+++ b/sw/inc/crstate.hxx
@@ -27,7 +27,8 @@
 enum SwFillMode
 {
 FILL_TAB,   ///< default, fill with tabs
-FILL_SPACE, ///< fill with spaces and tabs
+FILL_TAB_SPACE, ///< fill with spaces and tabs
+FILL_SPACE, ///< fill with spaces
 FILL_MARGIN,///< only align left, center, right
 FILL_INDENT ///< by left paragraph indention
 };
@@ -38,11 +39,12 @@ struct SwFillCursorPos
 sal_uInt16 nParaCnt;///< number of paragraphs to insert
 sal_uInt16 nTabCnt; ///< number of tabs respectively size of 
indentation
 sal_uInt16 nSpaceCnt;   ///< number of spaces to insert
+sal_uInt16 nSpaceOnlyCnt;   ///< number of spaces to insert ("only spaces, 
no tabs" mode)
 sal_uInt16 nColumnCnt;  ///< number of necessary column breaks
 sal_Int16  eOrient;  ///< paragraph alignment
 SwFillMode eMode;   ///< desired fill-up rule
 SwFillCursorPos( SwFillMode eMd ) :
-nParaCnt( 0 ), nTabCnt( 0 ), nSpaceCnt( 0 ), nColumnCnt( 0 ),
+nParaCnt( 0 ), nTabCnt( 0 ), nSpaceCnt( 0 ), nSpaceOnlyCnt(0), 
nColumnCnt( 0 ),
 eOrient( css::text::HoriOrientation::NONE ), eMode( eMd )
 {}
 };
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 0dd9819023a5..ccd662d67f13 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -1950,13 +1950,21 @@ bool SwCursorShell::SetShadowCursorPos( const Point& 
rPt, SwFillMode eFillMode )
 break;
 
 case FILL_TAB:
+case FILL_TAB_SPACE:
 case FILL_SPACE:
 {
 OUStringBuffer sInsert;
-if (aFPos.nTabCnt)
-comphelper::string::padToLength(sInsert, 
aFPos.nTabCnt, '\t');
-if (aFPos.nSpaceCnt)
-comphelper::string::padToLength(sInsert, 
sInsert.getLength() + aFPos.nSpaceCnt, ' ');
+if (aFPos.eMode == FILL_SPACE)
+{
+comphelper::string::padToLength(sInsert, 
sInsert.getLength() + aFPos.nSpaceOnlyCnt, ' ');
+}
+else
+{
+if (aFPos.nTabCnt)
+comphelper::string::padToLength(sInsert, 
aFPos.nTabCnt, '\t');
+if (aFPos.nSpaceCnt)
+comphelper::string::padToLength(sInsert, 
sInsert.getLength() + aFPos.nSpaceCnt, ' ');
+}
 if (!sInsert.isEmpty())
 
GetDoc()->getIDocumentContentOperations().InsertString( *m_pCurrentCursor, 
sInsert.makeStringAndClear());
 }
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 4481a5cb129b..dd448aab7b9f 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -538,6 +538,7 @@ struct SwFillData
 SwFillCursorPos () const { return *pCMS->m_pFill; }
 void SetTab( sal_uInt16 nNew ) { pCMS->m_pFill->nTabCnt = nNew; }
 void SetSpace( sal_uInt16 nNew ) { pCMS->m_pFill->nSpaceCnt = nNew; }
+void SetSpaceOnly( sal_uInt16 nNew ) { pCMS->m_pFill->nSpaceOnlyCnt = 
nNew; }
 void SetOrient( const sal_Int16 eNew ){ pCMS->m_pFill->eOrient = eNew; }
 };
 
@@ -1508,6 +1509,7 @@ void SwTextFrame::FillCursorPos( SwFillData& rFill ) const
 SwTwips nLeftTab;
 SwTwips nRightTab = nLeft;
 sal_uInt16 nSpaceCnt = 0;
+sal_uInt16 nSpaceOnlyCnt = 0;
 sal_uInt16 nTabCnt = 0;
 sal_uInt16 nIdx = 0;
 do
@@ -1551,7 +1553,7 @@ void SwTextFrame::FillCursorPos( SwFillData& rFill ) const
 }
 while( rFill.X() > nRightTab );
 --nTabCnt;
-

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

2017-04-12 Thread Caolán McNamara
 sw/UIConfig_swriter.mk |1 
 sw/inc/cmdid.h |4 
 sw/inc/swcommands.h|3 
 sw/source/ui/app/mn.src|   23 
 sw/source/uibase/docvw/HeaderFooterWin.cxx |  138 +
 sw/source/uibase/inc/HeaderFooterWin.hxx   |5 -
 sw/source/uibase/inc/popup.hrc |3 
 sw/uiconfig/swriter/ui/headerfootermenu.ui |   31 ++
 8 files changed, 101 insertions(+), 107 deletions(-)

New commits:
commit d74689c15170b5bad3e2230b4ea99bb1d9dd1e60
Author: Caolán McNamara 
Date:   Wed Apr 12 14:30:36 2017 +0100

convert header/footer menu to .ui

Change-Id: Ia1aed81bfd806fbca78acc3b23886056a23ade4d

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 81d073621edd..66e19966b996 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -149,6 +149,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/frmtypepage \
sw/uiconfig/swriter/ui/frmurlpage \
sw/uiconfig/swriter/ui/gotopagedialog \
+   sw/uiconfig/swriter/ui/headerfootermenu \
sw/uiconfig/swriter/ui/indexentry \
sw/uiconfig/swriter/ui/inputfielddialog \
sw/uiconfig/swriter/ui/inputwinmenu \
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 9e718b820487..0b2662a3089d 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -711,10 +711,6 @@
 #define FN_REPLY(FN_NOTES+7)
 #define FN_FORMAT_ALL_NOTES (FN_NOTES+8)
 
-#define FN_HEADERFOOTER_EDIT(FN_HEADERFOOTER+1)
-#define FN_HEADERFOOTER_DELETE  (FN_HEADERFOOTER+2)
-#define FN_HEADERFOOTER_BORDERBACK  (FN_HEADERFOOTER+3)
-
 // Region: Parameter
 #define FN_PARAM_MOVE_COUNT (FN_PARAM+2)
 #define FN_PARAM_MOVE_SELECTION (FN_PARAM+3)
diff --git a/sw/inc/swcommands.h b/sw/inc/swcommands.h
index d1ad3e7a5ba4..e726c818344e 100644
--- a/sw/inc/swcommands.h
+++ b/sw/inc/swcommands.h
@@ -32,9 +32,6 @@
 #define CMD_FN_REDLINE_REJECT_DIRECT".uno:RejectTrackedChange"
 #define CMD_FN_REDLINE_NEXT_CHANGE  ".uno:NextTrackedChange"
 #define CMD_FN_REDLINE_PREV_CHANGE  
".uno:PreviousTrackedChange"
-#define CMD_FN_HEADERFOOTER_EDIT".uno:HeaderFooterEdit"
-#define CMD_FN_HEADERFOOTER_DELETE  ".uno:HeaderFooterDelete"
-#define CMD_FN_HEADERFOOTER_BORDERBACK  
".uno:HeaderFooterBorderBackground"
 
 #endif
 
diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src
index fe71b4d08838..984e7ebf55b7 100644
--- a/sw/source/ui/app/mn.src
+++ b/sw/source/ui/app/mn.src
@@ -89,27 +89,4 @@ Menu MN_ANNOTATION_BUTTON
 };
 };
 
-Menu MN_HEADERFOOTER_BUTTON
-{
-ItemList =
-{
-MenuItem
-{
-Identifier = FN_HEADERFOOTER_EDIT ;
-HelpID = CMD_FN_HEADERFOOTER_EDIT ;
-};
-MenuItem
-{
-Identifier = FN_HEADERFOOTER_BORDERBACK ;
-HelpID = CMD_FN_HEADERFOOTER_BORDERBACK ;
-Text [ en-US ] = "Border and Background..." ;
-};
-MenuItem
-{
-Identifier = FN_HEADERFOOTER_DELETE ;
-HelpID = CMD_FN_HEADERFOOTER_DELETE ;
-};
-};
-};
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx 
b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index f686d8c4fc04..85e2836ab08e 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -126,8 +126,9 @@ namespace
 
 SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwFrame 
*pFrame, bool bHeader ) :
 SwFrameMenuButtonBase( pEditWin, pFrame ),
+m_aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), 
"modules/swriter/ui/headerfootermenu.ui", ""),
 m_bIsHeader( bHeader ),
-m_pPopupMenu( nullptr ),
+m_pPopupMenu(m_aBuilder.get_menu("menu")),
 m_pLine( nullptr ),
 m_bIsAppearing( false ),
 m_nFadeRate( 100 ),
@@ -143,19 +144,17 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* 
pEditWin, const SwFrame *pFrame
 m_pLine = VclPtr::Create(GetEditWin(), 
::GetHeaderFooterMarkColor);
 m_pLine->SetZOrder(this, ZOrderFlags::Before);
 
-// Create and set the PopupMenu
-m_pPopupMenu = VclPtr::Create(SW_RES(MN_HEADERFOOTER_BUTTON));
-
+// set the PopupMenu
 // Rewrite the menu entries' text
 if (m_bIsHeader)
 {
-m_pPopupMenu->SetItemText(FN_HEADERFOOTER_EDIT, 
SW_RESSTR(STR_FORMAT_HEADER));
-m_pPopupMenu->SetItemText(FN_HEADERFOOTER_DELETE, 
SW_RESSTR(STR_DELETE_HEADER));
+m_pPopupMenu->SetItemText(m_pPopupMenu->GetItemId("edit"), 
SW_RESSTR(STR_FORMAT_HEADER));
+m_pPopupMenu->SetItemText(m_pPopupMenu->GetItemId("delete"), 
SW_RESSTR(STR_DELETE_HEADER));
 }
 else
 {
-m_pPopupMenu->SetItemText(FN_HEADERFOOTER_EDIT, 

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

2017-04-12 Thread Caolán McNamara
 sw/UIConfig_swriter.mk  |1 
 sw/inc/cmdid.h  |3 
 sw/inc/swcommands.h |2 
 sw/source/ui/app/mn.src |   19 
 sw/source/uibase/docvw/PageBreakWin.cxx |  148 +++-
 sw/source/uibase/inc/PageBreakWin.hxx   |3 
 sw/source/uibase/inc/popup.hrc  |3 
 sw/uiconfig/swriter/ui/pagebreakmenu.ui |   25 +
 8 files changed, 102 insertions(+), 102 deletions(-)

New commits:
commit 2fccbd4dea4d3570f1a9c5987bc1904f9211c27c
Author: Caolán McNamara 
Date:   Wed Apr 12 14:01:10 2017 +0100

convert annotation page break menu to .ui

Change-Id: I822029c8fe2dc8ae0a0f52091375d79c0784b7ce

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 41fed854c5d4..81d073621edd 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -211,6 +211,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/notebookbar \
sw/uiconfig/swriter/ui/notebookbar_groups \
sw/uiconfig/swriter/ui/notebookbar_single \
+   sw/uiconfig/swriter/ui/pagebreakmenu \
sw/uiconfig/swriter/ui/pagecolumncontrol \
sw/uiconfig/swriter/ui/pagemargincontrol \
sw/uiconfig/swriter/ui/pageorientationcontrol \
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 74ac12b2c4a6..9e718b820487 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -715,9 +715,6 @@
 #define FN_HEADERFOOTER_DELETE  (FN_HEADERFOOTER+2)
 #define FN_HEADERFOOTER_BORDERBACK  (FN_HEADERFOOTER+3)
 
-#define FN_PAGEBREAK_EDIT   (FN_PAGEBREAK+1)
-#define FN_PAGEBREAK_DELETE (FN_PAGEBREAK+2)
-
 // Region: Parameter
 #define FN_PARAM_MOVE_COUNT (FN_PARAM+2)
 #define FN_PARAM_MOVE_SELECTION (FN_PARAM+3)
diff --git a/sw/inc/swcommands.h b/sw/inc/swcommands.h
index fdcff077d38f..d1ad3e7a5ba4 100644
--- a/sw/inc/swcommands.h
+++ b/sw/inc/swcommands.h
@@ -35,8 +35,6 @@
 #define CMD_FN_HEADERFOOTER_EDIT".uno:HeaderFooterEdit"
 #define CMD_FN_HEADERFOOTER_DELETE  ".uno:HeaderFooterDelete"
 #define CMD_FN_HEADERFOOTER_BORDERBACK  
".uno:HeaderFooterBorderBackground"
-#define CMD_FN_PAGEBREAK_EDIT   ".uno:PageBreakEdit"
-#define CMD_FN_PAGEBREAK_DELETE ".uno:PageBreakDelete"
 
 #endif
 
diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src
index d6dac73f716d..fe71b4d08838 100644
--- a/sw/source/ui/app/mn.src
+++ b/sw/source/ui/app/mn.src
@@ -112,23 +112,4 @@ Menu MN_HEADERFOOTER_BUTTON
 };
 };
 
-Menu MN_PAGEBREAK_BUTTON
-{
-ItemList =
-{
-MenuItem
-{
-Identifier = FN_PAGEBREAK_EDIT ;
-HelpID = CMD_FN_PAGEBREAK_EDIT ;
-Text [ en-US ] = "Edit Page Break..." ;
-};
-MenuItem
-{
-Identifier = FN_PAGEBREAK_DELETE ;
-HelpID = CMD_FN_PAGEBREAK_DELETE ;
-Text [ en-US ] = "Delete Page Break" ;
-};
-};
-};
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx 
b/sw/source/uibase/docvw/PageBreakWin.cxx
index dcf4b0801088..10b91718b756 100644
--- a/sw/source/uibase/docvw/PageBreakWin.cxx
+++ b/sw/source/uibase/docvw/PageBreakWin.cxx
@@ -93,7 +93,8 @@ namespace
 
 SwPageBreakWin::SwPageBreakWin( SwEditWin* pEditWin, const SwFrame *pFrame ) :
 SwFrameMenuButtonBase( pEditWin, pFrame ),
-m_pPopupMenu( nullptr ),
+m_aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), 
"modules/swriter/ui/pagebreakmenu.ui", ""),
+m_pPopupMenu(m_aBuilder.get_menu("menu")),
 m_pLine( nullptr ),
 m_bIsAppearing( false ),
 m_nFadeRate( 100 ),
@@ -107,10 +108,9 @@ SwPageBreakWin::SwPageBreakWin( SwEditWin* pEditWin, const 
SwFrame *pFrame ) :
 // Create the line control
 m_pLine = VclPtr::Create( GetEditWin(), 
::GetPageBreakColor, this );
 
-// Create the popup menu
-m_pPopupMenu = VclPtr::Create( SW_RES( MN_PAGEBREAK_BUTTON ) );
+// Set the popup menu
 m_pPopupMenu->SetDeactivateHdl( LINK( this, SwPageBreakWin, HideHandler ) 
);
-SetPopupMenu( m_pPopupMenu );
+SetPopupMenu(m_pPopupMenu);
 
 m_aFadeTimer.SetTimeout( 50 );
 m_aFadeTimer.SetInvokeHandler( LINK( this, SwPageBreakWin, FadeHandler ) );
@@ -127,7 +127,9 @@ void SwPageBreakWin::dispose()
 m_aFadeTimer.Stop();
 
 m_pLine.disposeAndClear();
-m_pPopupMenu.disposeAndClear();
+m_pPopupMenu.clear();
+m_aBuilder.disposeBuilder();
+
 delete m_pMousePt;
 m_pMousePt = nullptr;
 
@@ -214,88 +216,84 @@ void SwPageBreakWin::Paint(vcl::RenderContext& 
rRenderContext, const ::tools::Re
 pProcessor->process(aGhostedSeq);
 }
 
-void SwPageBreakWin::Select( )
+void SwPageBreakWin::Select()
 {
 SwFrameControlPtr pThis = GetEditWin()->GetFrameControlsManager( 
).GetControl( PageBreak, GetFrame() );
 
-switch( GetCurItemId( ) )

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

2017-02-24 Thread Caolán McNamara
 sw/UIConfig_swriter.mk  |3 
 sw/inc/helpid.h |3 
 sw/source/uibase/inc/olmenu.hxx |   16 +++-
 sw/source/uibase/lingu/olmenu.cxx   |  113 +++-
 sw/source/uibase/lingu/olmenu.hrc   |9 --
 sw/source/uibase/lingu/olmenu.src   |   90 --
 sw/uiconfig/swriter/ui/spellmenu.ui |  142 
 7 files changed, 237 insertions(+), 139 deletions(-)

New commits:
commit 51d5cb5de245245fc7a3498cf87743d33eede525
Author: Caolán McNamara 
Date:   Fri Feb 24 16:40:24 2017 +

convert spell menu to .ui

Change-Id: I96a4b852fd396883385d5e2d43728dc8c2b20ce3

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 95495a2..8d51e8c 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -242,8 +242,9 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/pagefooterpanel \
sw/uiconfig/swriter/ui/sidebarwrap \
sw/uiconfig/swriter/ui/sidebarstylepresets \
-sw/uiconfig/swriter/ui/sidebartheme \
+   sw/uiconfig/swriter/ui/sidebartheme \
sw/uiconfig/swriter/ui/sortdialog \
+   sw/uiconfig/swriter/ui/spellmenu \
sw/uiconfig/swriter/ui/splittable \
sw/uiconfig/swriter/ui/statisticsinfopage \
sw/uiconfig/swriter/ui/stringinput \
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 559d40c..f06dac6 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -99,9 +99,6 @@
 #define HID_MN_READONLY_LOADGRAPHIC 
"SW_HID_MN_READONLY_LOADGRAPHIC"
 #define HID_MN_READONLY_GRAPHICOFF  
"SW_HID_MN_READONLY_GRAPHICOFF"
 
-#define HID_LINGU_ADD_WORD  
"SW_HID_LINGU_ADD_WORD"
-#define HID_LINGU_IGNORE_WORD   
"SW_HID_LINGU_IGNORE_WORD"
-#define HID_LINGU_SPELLING_DLG  
"SW_HID_LINGU_SPELLING_DLG"
 #define HID_LINGU_AUTOCORR  
"SW_HID_LINGU_AUTOCORR"
 #define HID_LINGU_REPLACE   
"SW_HID_LINGU_REPLACE"
 #define HID_SMARTTAG_MAIN   
"SW_HID_SMARTTAG_MAIN"// SMARTTAGS
diff --git a/sw/source/uibase/inc/olmenu.hxx b/sw/source/uibase/inc/olmenu.hxx
index af1156b..a2077cd 100644
--- a/sw/source/uibase/inc/olmenu.hxx
+++ b/sw/source/uibase/inc/olmenu.hxx
@@ -25,6 +25,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
@@ -35,7 +36,20 @@ class SwWrtShell;
 
 class SW_DLLPUBLIC SwSpellPopup
 {
-ScopedVclPtrInstance m_xPopupMenu;
+VclBuilder m_aBuilder;
+VclPtr m_xPopupMenu;
+sal_uInt16 m_nIgnoreWordId;
+sal_uInt16 m_nAddMenuId;
+sal_uInt16 m_nAddId;
+sal_uInt16 m_nSpellDialogId;
+sal_uInt16 m_nCorrectMenuId;
+sal_uInt16 m_nCorrectDialogId;
+sal_uInt16 m_nLangSelectionMenuId;
+sal_uInt16 m_nLangParaMenuId;
+sal_uInt16 m_nRedlineAcceptId;
+sal_uInt16 m_nRedlineRejectId;
+sal_uInt16 m_nRedlineNextId;
+sal_uInt16 m_nRedlinePrevId;
 SwWrtShell* m_pSh;
 css::uno::Sequence< css::uno::Reference< css::linguistic2::XDictionary >  
> m_aDics;
 css::uno::Reference< css::linguistic2::XSpellAlternatives > m_xSpellAlt;
diff --git a/sw/source/uibase/lingu/olmenu.cxx 
b/sw/source/uibase/lingu/olmenu.cxx
index 2932585..39a52d8 100644
--- a/sw/source/uibase/lingu/olmenu.cxx
+++ b/sw/source/uibase/lingu/olmenu.cxx
@@ -259,7 +259,20 @@ SwSpellPopup::SwSpellPopup(
 SwWrtShell* pWrtSh,
 const uno::Reference< linguistic2::XSpellAlternatives >  ,
 const OUString )
-: m_xPopupMenu( SW_RES(MN_SPELL_POPUP) )
+: m_aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), 
"modules/swriter/ui/spellmenu.ui", "")
+, m_xPopupMenu(m_aBuilder.get_menu("menu"))
+, m_nIgnoreWordId(m_xPopupMenu->GetItemId("ignoreall"))
+, m_nAddMenuId(m_xPopupMenu->GetItemId("addmenu"))
+, m_nAddId(m_xPopupMenu->GetItemId("add"))
+, m_nSpellDialogId(m_xPopupMenu->GetItemId("spelldialog"))
+, m_nCorrectMenuId(m_xPopupMenu->GetItemId("correctmenu"))
+, m_nCorrectDialogId(m_xPopupMenu->GetItemId("correctdialog"))
+, m_nLangSelectionMenuId(m_xPopupMenu->GetItemId("langselection"))
+, m_nLangParaMenuId(m_xPopupMenu->GetItemId("langpara"))
+, m_nRedlineAcceptId(m_xPopupMenu->GetItemId("accept"))
+, m_nRedlineRejectId(m_xPopupMenu->GetItemId("reject"))
+, m_nRedlineNextId(m_xPopupMenu->GetItemId("next"))
+, m_nRedlinePrevId(m_xPopupMenu->GetItemId("prev"))
 , m_pSh( pWrtSh )
 , m_xSpellAlt(xAlt)
 , m_nGrammarError(0)
@@ -280,7 +293,7 @@ SwSpellPopup::SwSpellPopup(
 
 SvtLinguConfig aCfg;
 
-PopupMenu *pMenu = m_xPopupMenu->GetPopupMenu(MN_AUTOCORR);
+PopupMenu *pMenu = m_xPopupMenu->GetPopupMenu(m_nCorrectMenuId);
 pMenu->SetMenuFlags(MenuFlags::NoAutoMnemonics);
 bool bEnable = false;
 if( 

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

2017-02-22 Thread Caolán McNamara
 sw/UIConfig_swriter.mk |1 
 sw/inc/helpid.h|   29 ---
 sw/source/uibase/inc/inputwin.hxx  |1 
 sw/source/uibase/inc/ribbar.hrc|3 
 sw/source/uibase/ribbar/inputwin.cxx   |   54 +-
 sw/source/uibase/ribbar/inputwin.hrc   |   55 ---
 sw/source/uibase/ribbar/inputwin.src   |  198 -
 sw/uiconfig/swriter/ui/inputwinmenu.ui |  257 +
 8 files changed, 267 insertions(+), 331 deletions(-)

New commits:
commit 575fa39650cdaab28c9093c90ffd995b4ca7dea2
Author: Caolán McNamara 
Date:   Wed Feb 22 11:37:08 2017 +

convert input window menu to .ui

Change-Id: I1b9f05d16746bf1de57115f68df5f95e2a90413a

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 532f0ba..95495a2 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -150,6 +150,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/gotopagedialog \
sw/uiconfig/swriter/ui/indexentry \
sw/uiconfig/swriter/ui/inputfielddialog \
+   sw/uiconfig/swriter/ui/inputwinmenu \
sw/uiconfig/swriter/ui/indentpage \
sw/uiconfig/swriter/ui/infonotfounddialog \
sw/uiconfig/swriter/ui/inforeadonlydialog \
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 2a780a4..559d40c 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -88,35 +88,6 @@
 #define HID_MN_SUB_SPELLING 
"SW_HID_MN_SUB_SPELLING"
 #define HID_MN_SUB_MIRROR   
"SW_HID_MN_SUB_MIRROR"
 
-#define HID_MN_CALC_PHD 
"SW_HID_MN_CALC_PHD"
-#define HID_MN_CALC_SQRT
"SW_HID_MN_CALC_SQRT"
-#define HID_MN_CALC_OR  
"SW_HID_MN_CALC_OR"
-#define HID_MN_CALC_XOR 
"SW_HID_MN_CALC_XOR"
-#define HID_MN_CALC_AND 
"SW_HID_MN_CALC_AND"
-#define HID_MN_CALC_NOT 
"SW_HID_MN_CALC_NOT"
-#define HID_MN_CALC_EQ  
"SW_HID_MN_CALC_EQ"
-#define HID_MN_CALC_NEQ 
"SW_HID_MN_CALC_NEQ"
-#define HID_MN_CALC_LEQ 
"SW_HID_MN_CALC_LEQ"
-#define HID_MN_CALC_GEQ 
"SW_HID_MN_CALC_GEQ"
-#define HID_MN_CALC_LES 
"SW_HID_MN_CALC_LES"
-#define HID_MN_CALC_GRE 
"SW_HID_MN_CALC_GRE"
-#define HID_MN_CALC_SUM 
"SW_HID_MN_CALC_SUM"
-#define HID_MN_CALC_MEAN
"SW_HID_MN_CALC_MEAN"
-#define HID_MN_CALC_MIN 
"SW_HID_MN_CALC_MIN"
-#define HID_MN_CALC_MAX 
"SW_HID_MN_CALC_MAX"
-#define HID_MN_CALC_SIN 
"SW_HID_MN_CALC_SIN"
-#define HID_MN_CALC_COS 
"SW_HID_MN_CALC_COS"
-#define HID_MN_CALC_TAN 
"SW_HID_MN_CALC_TAN"
-#define HID_MN_CALC_ASIN
"SW_HID_MN_CALC_ASIN"
-#define HID_MN_CALC_ACOS
"SW_HID_MN_CALC_ACOS"
-#define HID_MN_CALC_ATAN
"SW_HID_MN_CALC_ATAN"
-#define HID_MN_CALC_POW 
"SW_HID_MN_CALC_POW"
-#define HID_MN_CALC_LISTSEP 
"SW_HID_MN_CALC_LISTSEP"
-#define HID_MN_POP_OPS  
"SW_HID_MN_POP_OPS"
-#define HID_MN_POP_STATISTICS   
"SW_HID_MN_POP_STATISTICS"
-#define HID_MN_POP_FUNC 
"SW_HID_MN_POP_FUNC"
-#define HID_MN_CALC_ROUND   
"SW_HID_MN_CALC_ROUND"
-
 #define HID_MN_READONLY_SAVEGRAPHIC 
"SW_HID_MN_READONLY_SAVEGRAPHIC"
 #define HID_MN_READONLY_GRAPHICTOGALLERY
"SW_HID_MN_READONLY_GRAPHICTOGALLERY"
 #define HID_MN_READONLY_TOGALLERYLINK   
"SW_HID_MN_READONLY_TOGALLERYLINK"
diff --git a/sw/source/uibase/inc/inputwin.hxx 
b/sw/source/uibase/inc/inputwin.hxx
index 18f3408..c83301f 100644
--- a/sw/source/uibase/inc/inputwin.hxx
+++ b/sw/source/uibase/inc/inputwin.hxx
@@ -49,7 +49,6 @@ friend class InputEdit;
 
 VclPtraPos;
 VclPtr   aEdit;
-ScopedVclPtrInstance aPopMenu;
 SwFieldMgr* pMgr;
 SwWrtShell* pWrtShell;
 SwView* pView;
diff --git a/sw/source/uibase/inc/ribbar.hrc b/sw/source/uibase/inc/ribbar.hrc
index 366a775..4c16379 100644
--- a/sw/source/uibase/inc/ribbar.hrc
+++ b/sw/source/uibase/inc/ribbar.hrc
@@ 

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

2014-09-02 Thread Caolán McNamara
 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..000
--- a/sw/source/uibase/dbui/mailmergechildwindow.hrc
+++ /dev/null
@@ -1,23 +0,0 @@
-/* -*- Mode: C++; 

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

2014-07-23 Thread Caolán McNamara
 sw/inc/dbui.hrc|   17 
 sw/source/ui/dbui/mmoutputpage.hxx |4 --
 sw/source/ui/dbui/mmoutputtypepage.cxx |   25 -
 sw/source/uibase/dbui/mailmergechildwindow.src |5 --
 sw/uiconfig/swriter/ui/mmsendmails.ui  |   48 -
 5 files changed, 25 insertions(+), 74 deletions(-)

New commits:
commit 5ccd10fbbd66558a6662d74bc7ba76a4697f593a
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Jul 23 10:05:49 2014 +0100

use an expander instead of hand-crafted code

Change-Id: Id5606051656f21309c9e5c8d08a2eacd65b22dbf

diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc
index 4e42d95..b4ec5bf 100644
--- a/sw/inc/dbui.hrc
+++ b/sw/inc/dbui.hrc
@@ -72,17 +72,16 @@
 #define ST_MATCHESTO(RC_DBUI_BEGIN + 42)
 #define ST_PREVIEW  (RC_DBUI_BEGIN + 43)
 #define ST_CONTINUE (RC_DBUI_BEGIN + 44)
-#define ST_LESS (RC_DBUI_BEGIN + 45)
-#define ST_TASK (RC_DBUI_BEGIN + 46)
-#define ST_STATUS   (RC_DBUI_BEGIN + 47)
-#define ST_SEND (RC_DBUI_BEGIN + 48)
-#define ST_SENDINGTO(RC_DBUI_BEGIN + 49)
-#define ST_COMPLETED(RC_DBUI_BEGIN + 50)
-#define ST_FAILED   (RC_DBUI_BEGIN + 51)
-#define ST_TERMINATEQUERY   (RC_DBUI_BEGIN + 52)
+#define ST_TASK (RC_DBUI_BEGIN + 45)
+#define ST_STATUS   (RC_DBUI_BEGIN + 46)
+#define ST_SEND (RC_DBUI_BEGIN + 47)
+#define ST_SENDINGTO(RC_DBUI_BEGIN + 48)
+#define ST_COMPLETED(RC_DBUI_BEGIN + 49)
+#define ST_FAILED   (RC_DBUI_BEGIN + 50)
+#define ST_TERMINATEQUERY   (RC_DBUI_BEGIN + 51)
 
 // ImageList
-#define ILIST   (RC_DBUI_BEGIN + 53)
+#define ILIST   (RC_DBUI_BEGIN + 52)
 
 // Elements -
 #define MM_PART_TITLE   0
diff --git a/sw/source/ui/dbui/mmoutputpage.hxx 
b/sw/source/ui/dbui/mmoutputpage.hxx
index fef10e9..8585c02 100644
--- a/sw/source/ui/dbui/mmoutputpage.hxx
+++ b/sw/source/ui/dbui/mmoutputpage.hxx
@@ -147,7 +147,6 @@ class SwSendMailDialog : public ModelessDialog 
//SfxModalDialog
 ProgressBar *m_pProgressBar;
 FixedText   *m_pErrorStatus;
 
-PushButton  *m_pDetails;
 SvSimpleTableContainer  *m_pContainer;
 HeaderBar   *m_pStatusHB;
 SvTabListBox*m_pStatusLB;
@@ -156,8 +155,6 @@ class SwSendMailDialog : public ModelessDialog 
//SfxModalDialog
 PushButton  *m_pStop;
 PushButton  *m_pClose;
 
-OUStringm_sMore;
-OUStringm_sLess;
 OUStringm_sContinue;
 OUStringm_sStop;
 OUStringm_sSend;
@@ -179,7 +176,6 @@ class SwSendMailDialog : public ModelessDialog 
//SfxModalDialog
 sal_Int32   m_nSendCount;
 sal_Int32   m_nErrorCount;
 
-SAL_DLLPRIVATE DECL_LINK( DetailsHdl_Impl, void* );
 SAL_DLLPRIVATE DECL_LINK( StopHdl_Impl, PushButton* );
 SAL_DLLPRIVATE DECL_LINK( CloseHdl_Impl, void* );
 SAL_DLLPRIVATE DECL_STATIC_LINK( SwSendMailDialog, StartSendMails, 
SwSendMailDialog* );
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx 
b/sw/source/ui/dbui/mmoutputtypepage.cxx
index 29aecd3..75b401e 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -232,12 +232,9 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, 
SwMailMergeConfigItem rConf
 m_pPaused(getFixedText(paused)),
 m_pProgressBar(getProgressBar(progress)),
 m_pErrorStatus(getFixedText(errorstatus)),
-m_pDetails(getPushButton(details)),
 m_pContainer(getSvSimpleTableContainer(container)),
 m_pStop(getPushButton(stop)),
 m_pClose(getPushButton(close)),
-m_sMore(m_pDetails-GetText()),
-m_sLess(SW_RES(ST_LESS)),
 m_sContinue(SW_RES( ST_CONTINUE )),
 m_sStop(m_pStop-GetText()),
 m_sSend(SW_RES(ST_SEND)),
@@ -265,7 +262,6 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, 
SwMailMergeConfigItem rConf
 OUString sTask(SW_RES(ST_TASK));
 OUString sStatus(SW_RES(ST_STATUS));
 
-m_pDetails-SetClickHdl(LINK( this, SwSendMailDialog, DetailsHdl_Impl));
 m_pStop-SetClickHdl(LINK( this, SwSendMailDialog, StopHdl_Impl));
 m_pClose-SetClickHdl(LINK( this, SwSendMailDialog, CloseHdl_Impl));
 
@@ -284,7 +280,6 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, 
SwMailMergeConfigItem rConf
 m_pStatus-SetTabs(nTabs[0], MAP_PIXEL);
 m_pStatus-SetSpaceBetweenEntries(3);
 
-DetailsHdl_Impl( m_pDetails );
 UpdateTransferStatus();
 }
 
@@ -335,26 +330,6 @@ void SwSendMailDialog::SetDocumentCount( sal_Int32 
nAllDocuments )
 UpdateTransferStatus();
 }
 
-IMPL_LINK_NOARG(SwSendMailDialog, DetailsHdl_Impl)
-{
-long 

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

2014-06-16 Thread sk94
 sw/UIConfig_swriter.mk  |1 
 sw/inc/dbui.hrc |5 
 sw/source/ui/dbui/selectdbtabledialog.cxx   |   82 ++
 sw/source/ui/dbui/selectdbtabledialog.hrc   |   36 --
 sw/source/ui/dbui/selectdbtabledialog.hxx   |   15 --
 sw/source/ui/dbui/selectdbtabledialog.src   |   78 ++---
 sw/uiconfig/swriter/ui/selecttabledialog.ui |  163 
 7 files changed, 227 insertions(+), 153 deletions(-)

New commits:
commit 6154e810836a7a4bc7f417cbe16d7c84584d49e9
Author: sk94 eszka...@gmail.com
Date:   Fri Jun 13 20:20:54 2014 +0200

DLG_MM_SELECTDBTABLEDDIALOG conversion to .ui

Change-Id: Iaaa32bd5723ae45099d0fb670b207fc64c46d306
Reviewed-on: https://gerrit.libreoffice.org/9780
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index f9763e1..f2b9eb1 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -193,6 +193,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/selectautotextdialog \
sw/uiconfig/swriter/ui/selectblockdialog \
sw/uiconfig/swriter/ui/selectindexdialog \
+   sw/uiconfig/swriter/ui/selecttabledialog \
sw/uiconfig/swriter/ui/sidebarpage \
sw/uiconfig/swriter/ui/sidebarwrap \
sw/uiconfig/swriter/ui/sortdialog \
diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc
index f22bb76..0e370e7 100644
--- a/sw/inc/dbui.hrc
+++ b/sw/inc/dbui.hrc
@@ -25,7 +25,6 @@
 // Dialoge 
 
 #define DLG_MAILMERGEWIZARD (RC_DBUI_BEGIN + 3)
-#define DLG_MM_SELECTDBTABLEDDIALOG (RC_DBUI_BEGIN + 12)
 #define DLG_MM_DBTABLEPREVIEWDIALOG (RC_DBUI_BEGIN + 13)
 
 #define DLG_MM_MAILBODY   (RC_DBUI_BEGIN + 24)
@@ -65,6 +64,10 @@
 #define ST_NOSUBJECT(RC_DBUI_BEGIN + 31)
 #define ST_CONFIGUREMAIL(RC_DBUI_BEGIN + 32)
 #define ST_FILTERNAME   (RC_DBUI_BEGIN + 33)
+#define ST_TYPE (RC_DBUI_BEGIN + 34)
+#define ST_NAME (RC_DBUI_BEGIN + 35)
+#define ST_TABLE(RC_DBUI_BEGIN + 36)
+#define ST_QUERY(RC_DBUI_BEGIN + 37)
 
 // Elements -
 #define MM_PART_TITLE   0
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx 
b/sw/source/ui/dbui/selectdbtabledialog.cxx
index 113aecf..1d6fb3f 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -30,7 +30,6 @@
 
 #include unomid.h
 
-#include selectdbtabledialog.hrc
 #include dbui.hrc
 #include helpid.h
 #include boost/scoped_ptr.hpp
@@ -45,54 +44,51 @@ using namespace ::com::sun::star::beans;
 
 SwSelectDBTableDialog::SwSelectDBTableDialog(Window* pParent,
 const uno::Reference sdbc::XConnection rConnection) :
-SfxModalDialog(pParent, SW_RES(DLG_MM_SELECTDBTABLEDDIALOG)),
-m_aSelectFI( this, SW_RES(   FI_SELECT )),
-m_aTableHB( this, WB_BUTTONSTYLE | WB_BOTTOMBORDER),
-m_aTableLB( this, SW_RES(LB_TABLE  )),
-m_aPreviewPB( this, SW_RES(  PB_PREVIEW)),
-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, SelectTableDialog, 
modules/swriter/ui/selecttabledialog.ui),
 m_sName( SW_RES( ST_NAME )),
 m_sType( SW_RES( ST_TYPE )),
 m_sTable( SW_RES( ST_TABLE )),
 m_sQuery( SW_RES( ST_QUERY )),
 m_xConnection(rConnection)
 {
-FreeResource();
-
-Size aLBSize(m_aTableLB.GetSizePixel());
-m_aTableHB.SetSizePixel(aLBSize);
-Size aHeadSize(m_aTableHB.CalcWindowSizePixel());
+get(m_pPreviewPB, preview);
+get(m_pContainer, table);
+m_pTableHB = new HeaderBar(m_pContainer, WB_BUTTONSTYLE | WB_BOTTOMBORDER);
+m_pTableHB-set_height_request(40);
+m_pTableLB = new SvTabListBox(m_pContainer, WB_BORDER);
+
+Size aLBSize(Size(400, 100));
+m_pContainer-SetSizePixel(aLBSize);
+Size aHeadSize(m_pTableHB-CalcWindowSizePixel());
 aHeadSize.Width() = aLBSize.Width();
-m_aTableHB.SetSizePixel(aHeadSize);
-Point aLBPos(m_aTableLB.GetPosPixel());
-m_aTableHB.SetPosPixel(aLBPos);
+m_pTableHB-SetSizePixel(aHeadSize);
+Point aLBPos(0, 0);
+m_pTableHB-SetPosPixel(aLBPos);
 aLBPos.Y() += aHeadSize.Height();
 aLBSize.Height() -= aHeadSize.Height();
-m_aTableLB.SetPosSizePixel(aLBPos, aLBSize);
+m_pTableLB-SetPosSizePixel(aLBPos, aLBSize);
 
-Size aSz(m_aTableHB.GetOutputSizePixel());
-m_aTableHB.InsertItem( 1, m_sName,
+Size aSz(m_pTableHB-GetOutputSizePixel());
+m_pTableHB-InsertItem( 1, m_sName,
 aSz.Width()/2,
  

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

2014-06-16 Thread Caolán McNamara
 sw/inc/helpid.h |2 
 sw/source/ui/dbui/mmoutputtypepage.cxx  |1 
 sw/source/ui/dbui/selectdbtabledialog.cxx   |  134 
 sw/source/ui/dbui/selectdbtabledialog.hxx   |   17 +--
 sw/uiconfig/swriter/ui/selecttabledialog.ui |   13 +-
 5 files changed, 90 insertions(+), 77 deletions(-)

New commits:
commit be0837fbc0c5bf49497d8fffc1e8e626942481b1
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Jun 16 11:43:11 2014 +0100

rework to use a SvSimpleTableContainer

Change-Id: I6737d75c70c36b19c5bec075f6f82f159ef00d2d

diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 0639edf..5465bb2 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -365,9 +365,7 @@
 #define HID_MODULE_TOOLBOX  
SW_HID_MODULE_TOOLBOX
 
 #define HID_MM_SELECTDBTABLEDDIALOG 
SW_HID_MM_SELECTDBTABLEDDIALOG
-#define HID_MM_SELECTDBTABLEDDIALOG_LISTBOX 
SW_HID_MM_SELECTDBTABLEDDIALOG_LISTBOX
 #define HID_MM_DBTABLEPREVIEWDIALOG 
SW_HID_MM_DBTABLEPREVIEWDIALOG
-#define HID_MM_ADDRESSLIST_HB   
SW_HID_MM_ADDRESSLIST_HB
 #define HID_MM_MAILBODY 
SW_HID_MM_MAILBODY
 #define HID_MM_SENDMAILS
SW_HID_MM_SENDMAILS
 #define HID_MM_SENDMAILS_STATUSLB   
SW_HID_MM_SENDMAILS_STATUSLB
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx 
b/sw/source/ui/dbui/mmoutputtypepage.cxx
index e4a7397..b23aa92 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -291,7 +291,6 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, 
SwMailMergeConfigItem rConf
 m_aStatusHB.InsertItem( ITEMID_STATUS, sStatus,
 nPos2,
 HIB_LEFT | HIB_VCENTER );
-m_aStatusHB.SetHelpId(HID_MM_ADDRESSLIST_HB );
 m_aStatusHB.Show();
 
 m_aStatusLB.SetHelpId(HID_MM_MAILSTATUS_TLB);
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx 
b/sw/source/ui/dbui/selectdbtabledialog.cxx
index 1d6fb3f..2724e35 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -20,6 +20,7 @@
 #include swtypes.hxx
 #include selectdbtabledialog.hxx
 #include dbtablepreviewdialog.hxx
+#include svtools/simptabl.hxx
 #include svtools/treelistentry.hxx
 #include com/sun/star/sdbcx/XTablesSupplier.hpp
 #include com/sun/star/sdb/XQueriesSupplier.hpp
@@ -42,56 +43,78 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
 
+class SwAddressTable : public SvSimpleTable
+{
+public:
+SwAddressTable(SvSimpleTableContainer rParent, WinBits nBits = 0);
+void InsertHeaderItem(sal_uInt16 nColumn, const OUString rText, 
HeaderBarItemBits nBits);
+virtual void Resize() SAL_OVERRIDE;
+void setColSizes();
+};
+
+SwAddressTable::SwAddressTable(SvSimpleTableContainer rParent, WinBits nBits)
+: SvSimpleTable(rParent, nBits)
+{
+SetSpaceBetweenEntries(3);
+SetSelectionMode(SINGLE_SELECTION);
+SetDragDropMode(0);
+EnableAsyncDrag(false);
+}
+
+void SwAddressTable::InsertHeaderItem(sal_uInt16 nColumn, const OUString 
rText, HeaderBarItemBits nBits)
+{
+GetTheHeaderBar().InsertItem( nColumn, rText, 0, nBits );
+}
+
+void SwAddressTable::Resize()
+{
+SvSimpleTable::Resize();
+setColSizes();
+}
+
+void SwAddressTable::setColSizes()
+{
+HeaderBar rHB = GetTheHeaderBar();
+if (rHB.GetItemCount()  2)
+return;
+
+long nWidth = rHB.GetSizePixel().Width();
+nWidth /= 2;
+
+long nTabs_Impl[3];
+
+nTabs_Impl[0] = 2;
+nTabs_Impl[1] = 0;
+nTabs_Impl[2] = nWidth;
+
+SvSimpleTable::SetTabs(nTabs_Impl[0], MAP_PIXEL);
+}
+
 SwSelectDBTableDialog::SwSelectDBTableDialog(Window* pParent,
-const uno::Reference sdbc::XConnection rConnection) :
-SfxModalDialog(pParent, SelectTableDialog, 
modules/swriter/ui/selecttabledialog.ui),
-m_sName( SW_RES( ST_NAME )),
-m_sType( SW_RES( ST_TYPE )),
-m_sTable( SW_RES( ST_TABLE )),
-m_sQuery( SW_RES( ST_QUERY )),
-m_xConnection(rConnection)
+const uno::Reference sdbc::XConnection rConnection)
+: SfxModalDialog(pParent, SelectTableDialog, 
modules/swriter/ui/selecttabledialog.ui)
+, m_sName(SW_RES(ST_NAME))
+, m_sType(SW_RES(ST_TYPE))
+, m_sTable(SW_RES(ST_TABLE))
+, m_sQuery(SW_RES(ST_QUERY))
+, m_xConnection(rConnection)
 {
 get(m_pPreviewPB, preview);
-get(m_pContainer, table);
-m_pTableHB = new HeaderBar(m_pContainer, WB_BUTTONSTYLE | WB_BOTTOMBORDER);
-m_pTableHB-set_height_request(40);
-m_pTableLB = new SvTabListBox(m_pContainer, WB_BORDER);
-
-Size aLBSize(Size(400, 100));
-m_pContainer-SetSizePixel(aLBSize);
-Size aHeadSize(m_pTableHB-CalcWindowSizePixel());
-

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

2014-04-16 Thread Caolán McNamara
 sw/inc/PostItMgr.hxx  |3 +
 sw/inc/SidebarWin.hxx |2 
 sw/inc/printdata.hxx  |1 
 sw/source/core/layout/paintfrm.cxx|2 
 sw/source/core/uibase/docvw/PostItMgr.cxx |   16 ++
 sw/source/core/uibase/docvw/SidebarTxtControl.cxx |   40 
 sw/source/core/uibase/docvw/SidebarTxtControl.hxx |2 
 sw/source/core/uibase/docvw/SidebarWin.cxx|   55 ++
 sw/source/core/uibase/inc/optpage.hxx |1 
 sw/source/core/view/printdata.cxx |7 +-
 sw/source/core/view/vprint.cxx|   49 ++-
 sw/source/ui/config/optdlg.src|1 
 sw/source/ui/config/optpage.cxx   |6 ++
 sw/uiconfig/swriter/ui/printoptionspage.ui|   23 -
 14 files changed, 200 insertions(+), 8 deletions(-)

New commits:
commit eb1c0480050a1328287c4a85468afbec50b0e29d
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Apr 15 09:42:32 2014 +0100

Resolves: fdo#36815 enable printing WYSIWYG sidewindow comments

in order for that to happen the document has to be scaled down
so that the comments outside the border of the sheet of paper
can be brought inside the printable area

Change-Id: Ifafb8eec10a4ea3ea001409772603e61e5a4

diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index 3043215..4f99419 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -33,6 +33,7 @@
 #include SidebarWindowsTypes.hxx
 #include svl/lstner.hxx
 
+class OutputDevice;
 class SwWrtShell;
 class SwDoc;
 class SwView;
@@ -279,6 +280,8 @@ class SwPostItMgr: public SfxListener
 const sal_Int32 nIndex );
 void GetAllSidebarWinForFrm( const SwFrm rFrm,
  std::vector Window* * pChildren );
+
+void DrawNotesForPage(OutputDevice *pOutDev, sal_uInt32 nPage);
 };
 
 #endif
diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx
index 630ef16..8ab89a5 100644
--- a/sw/inc/SidebarWin.hxx
+++ b/sw/inc/SidebarWin.hxx
@@ -176,6 +176,8 @@ class SwSidebarWin : public Window
 void ChangeSidebarItem( SwSidebarItem rSidebarItem );
 virtual ::com::sun::star::uno::Reference 
::com::sun::star::accessibility::XAccessible  CreateAccessible() SAL_OVERRIDE;
 
+virtual voidDraw(OutputDevice* pDev, const Point, const Size, 
sal_uLong) SAL_OVERRIDE;
+
 protected:
 virtual voidDataChanged( const DataChangedEvent aEvent) 
SAL_OVERRIDE;
 virtual voidLoseFocus() SAL_OVERRIDE;
diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx
index 4ff41e2..748c694 100644
--- a/sw/inc/printdata.hxx
+++ b/sw/inc/printdata.hxx
@@ -292,6 +292,7 @@ public:
 #define POSTITS_ONLY1
 #define POSTITS_ENDDOC  2
 #define POSTITS_ENDPAGE 3
+#define POSTITS_INMARGINS 4
 
 namespace sw {
 
diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index eb3133a..a5cbf3b 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6172,7 +6172,7 @@ static void lcl_paintBitmapExToRect(OutputDevice *pOut, 
const Point aPoint, con
 SwAlignRect( aPageRect, _pViewShell );
 
 const SwPostItMgr *pMgr = _pViewShell-GetPostItMgr();
-if (pMgr  pMgr-ShowNotes()  pMgr-HasNotes())  // do not show 
anything in print preview
+if (pMgr /* pMgr-ShowNotes()*/  pMgr-HasNotes())  // do not show 
anything in print preview
 {
 sal_Int32 nScrollerHeight = pMgr-GetSidebarScrollerHeight();
 const Rectangle aVisRect = _pViewShell-VisArea().SVRect();
diff --git a/sw/source/core/uibase/docvw/PostItMgr.cxx 
b/sw/source/core/uibase/docvw/PostItMgr.cxx
index 4193ad6..e63ce8b 100644
--- a/sw/source/core/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/core/uibase/docvw/PostItMgr.cxx
@@ -823,6 +823,22 @@ bool SwPostItMgr::BorderOverPageBorder(unsigned long 
aPage) const
 return false;
 }
 
+void SwPostItMgr::DrawNotesForPage(OutputDevice *pOutDev, sal_uInt32 nPage)
+{
+assert(nPage  mPages.size());
+if (nPage = mPages.size())
+return;
+for(SwSidebarItem_iterator i = mPages[nPage]-mList-begin(); i != 
mPages[nPage]-mList-end(); ++i)
+{
+SwSidebarWin* pPostIt = (*i)-pPostIt;
+if (!pPostIt)
+continue;
+Point aPoint(mpEditWin-PixelToLogic(pPostIt-GetPosPixel()));
+Size aSize(pPostIt-PixelToLogic(pPostIt-GetSizePixel()));
+pPostIt-Draw(pOutDev, aPoint, aSize, 0);
+}
+}
+
 void SwPostItMgr::Scroll(const long lScroll,const unsigned long aPage)
 {
 OSL_ENSURE((lScroll % GetScrollSize() )==0,SwPostItMgr::Scroll: scrolling 
by wrong value);
diff --git a/sw/source/core/uibase/docvw/SidebarTxtControl.cxx 
b/sw/source/core/uibase/docvw/SidebarTxtControl.cxx
index 421bd0a..4e84a0b 100644
--- 

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

2014-03-18 Thread Caolán McNamara
 sw/UIConfig_swriter.mk   |1 
 sw/inc/dbui.hrc  |1 
 sw/inc/helpid.h  |1 
 sw/source/ui/dbui/mmaddressblockpage.cxx |  178 +++-
 sw/source/ui/dbui/mmaddressblockpage.hxx |   50 --
 sw/source/ui/dbui/mmaddressblockpage.src |  159 ---
 sw/uiconfig/swriter/ui/mmaddressblockpage.ui |  571 +++
 7 files changed, 666 insertions(+), 295 deletions(-)

New commits:
commit 2b04529465fde57795177cf176ce59255d8ef9ae
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Mar 18 12:35:38 2014 +

convert address block wizard page to .ui

Change-Id: I38c0c7262dffaaf5280e2c000eb122f71203e385

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 2787065..987669e 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -163,6 +163,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/queryrotateintostandarddialog \
sw/uiconfig/swriter/ui/querysavelabeldialog \
sw/uiconfig/swriter/ui/queryshowchangesdialog \
+   sw/uiconfig/swriter/ui/mmaddressblockpage \
sw/uiconfig/swriter/ui/mmcreatingdialog \
sw/uiconfig/swriter/ui/mmoutputtypepage \
sw/uiconfig/swriter/ui/mmselectpage \
diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc
index 628be9b..0185686 100644
--- a/sw/inc/dbui.hrc
+++ b/sw/inc/dbui.hrc
@@ -27,7 +27,6 @@
 #define DLG_MAILMERGEWIZARD (RC_DBUI_BEGIN + 3)
 #define DLG_MM_DOCSELECT_PAGE   (RC_DBUI_BEGIN + 4)
 #define DLG_MM_OUTPUTTYPE_PAGE  (RC_DBUI_BEGIN + 5)
-#define DLG_MM_ADDRESSBLOCK_PAGE(RC_DBUI_BEGIN + 6)
 #define DLG_MM_GREETINGS_PAGE   (RC_DBUI_BEGIN + 7)
 #define DLG_MM_PREPAREMERGE_PAGE(RC_DBUI_BEGIN + 8)
 #define DLG_MM_MERGE_PAGE   (RC_DBUI_BEGIN + 9)
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 36568ed..411b567 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -364,7 +364,6 @@
 #define HID_PRINT_AS_MERGE  
SW_HID_PRINT_AS_MERGE
 #define HID_MODULE_TOOLBOX  
SW_HID_MODULE_TOOLBOX
 
-#define HID_MM_ADDRESSBLOCKPAGE 
SW_HID_MM_ADDRESSBLOCKPAGE
 #define HID_MM_GREETINGSPAGE
SW_HID_MM_GREETINGSPAGE
 #define HID_MM_PREPAREMERGEPAGE 
SW_HID_MM_PREPAREMERGEPAGE
 #define HID_MM_MERGEPAGE
SW_HID_MM_MERGEPAGE
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx 
b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 5511a25..3fc2b01 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -53,50 +53,45 @@ static void lcl_Move(Control* pCtrl, long nYOffset)
 }
 
 SwMailMergeAddressBlockPage::SwMailMergeAddressBlockPage( SwMailMergeWizard* 
_pParent) :
-svt::OWizardPage(_pParent, SW_RES(DLG_MM_ADDRESSBLOCK_PAGE)),
-m_aHeaderFI(this, SW_RES(  FI_HEADER   ) ),
-m_aFirstFI( this, SW_RES( FI_FIRST ) ),
-m_aAddressListFI(   this, SW_RES( FI_ADDRESSLIST ) ),
-m_aAddressListPB(   this, SW_RES( PB_ADDRESSLIST ) ),
-m_aCurrentAddressFI( this, SW_RES( FI_CURRENTADDRESS ) ),
-m_aFirstFL( this, SW_RES( FL_FIRST ) ),
-m_aSecondFI(this, SW_RES( FI_SECOND )),
-m_aSettingsFI(  this, SW_RES( FI_SECOND) ),
-m_aAddressCB(   this, SW_RES( CB_ADDRESS   ) ),
-m_aSettingsWIN( this, SW_RES( WIN_SETTINGS   ) ),
-m_aSettingsPB(  this, SW_RES( PB_SETTINGS) ),
-m_aHideEmptyParagraphsCB( this, SW_RES( CB_HIDE_EMPTY_PARA ) ),
-m_aSecondFL(this, SW_RES( FL_SECOND )),
-m_aThirdFI( this, SW_RES( FI_THIRD ) ),
-m_aMatchFieldsFI(   this, SW_RES( FI_MATCH_FIELDS ) ),
-m_aAssignPB(this, SW_RES( PB_ASSIGN  ) ),
-m_aThirdFL( this, SW_RES( FL_THIRD ) ),
-m_aFourthFI(this, SW_RES( FI_FOURTH ) ),
-m_aPreviewFI(   this, SW_RES( FI_PREVIEW ) ),
-m_aPreviewWIN(  this, SW_RES( WIN_PREVIEW) ),
-m_aDocumentIndexFI( this, SW_RES( FI_DOCINDEX) ),
-m_aPrevSetIB(   this, SW_RES( IB_PREVSET ) ),
-m_aNextSetIB(   this, SW_RES( IB_NEXTSET ) ),
-m_sDocument(SW_RES(   STR_DOCUMENT  ) ),
-m_sChangeAddress(   SW_RES(  STR_CHANGEADDRESS )),
-m_pWizard(_pParent)
-{
-FreeResource();
-m_sCurrentAddress = m_aCurrentAddressFI.GetText();
-m_aAddressListPB.SetClickHdl(LINK(this, SwMailMergeAddressBlockPage, 
AddressListHdl_Impl));
-m_aSettingsPB.SetClickHdl(LINK(this, SwMailMergeAddressBlockPage, 
SettingsHdl_Impl));
-m_aAssignPB.SetClickHdl(LINK(this, SwMailMergeAddressBlockPage, 
AssignHdl_Impl ));
-m_aAddressCB.SetClickHdl(LINK(this, SwMailMergeAddressBlockPage, 
AddressBlockHdl_Impl));
-m_aSettingsWIN.SetSelectHdl(LINK(this, 

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

2014-03-18 Thread Caolán McNamara
 sw/UIConfig_swriter.mk |1 
 sw/inc/dbui.hrc|1 
 sw/inc/helpid.h|9 
 sw/source/ui/dbui/mmgreetingspage.cxx  |  198 --
 sw/source/ui/dbui/mmgreetingspage.hxx  |   37 --
 sw/source/ui/dbui/mmgreetingspage.src  |   70 ---
 sw/uiconfig/swriter/ui/mmsalutationpage.ui |  532 +
 7 files changed, 629 insertions(+), 219 deletions(-)

New commits:
commit 81f331b0ace0eb28a4f6dd03ac9a89fa5eeaf816
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Mar 18 15:05:39 2014 +

convert salutation wizard page to .ui

Change-Id: I31d352038175cde43020655546c8216ab4442e3e

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 987669e..98b91b1 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -167,6 +167,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/mmcreatingdialog \
sw/uiconfig/swriter/ui/mmoutputtypepage \
sw/uiconfig/swriter/ui/mmselectpage \
+   sw/uiconfig/swriter/ui/mmsalutationpage \
sw/uiconfig/swriter/ui/paradialog \
sw/uiconfig/swriter/ui/picturedialog \
sw/uiconfig/swriter/ui/picturepage \
diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc
index 0185686..2bf18ec 100644
--- a/sw/inc/dbui.hrc
+++ b/sw/inc/dbui.hrc
@@ -27,7 +27,6 @@
 #define DLG_MAILMERGEWIZARD (RC_DBUI_BEGIN + 3)
 #define DLG_MM_DOCSELECT_PAGE   (RC_DBUI_BEGIN + 4)
 #define DLG_MM_OUTPUTTYPE_PAGE  (RC_DBUI_BEGIN + 5)
-#define DLG_MM_GREETINGS_PAGE   (RC_DBUI_BEGIN + 7)
 #define DLG_MM_PREPAREMERGE_PAGE(RC_DBUI_BEGIN + 8)
 #define DLG_MM_MERGE_PAGE   (RC_DBUI_BEGIN + 9)
 #define DLG_MM_OUTPUT_PAGE  (RC_DBUI_BEGIN + 10)
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 411b567..55fe598 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -364,7 +364,6 @@
 #define HID_PRINT_AS_MERGE  
SW_HID_PRINT_AS_MERGE
 #define HID_MODULE_TOOLBOX  
SW_HID_MODULE_TOOLBOX
 
-#define HID_MM_GREETINGSPAGE
SW_HID_MM_GREETINGSPAGE
 #define HID_MM_PREPAREMERGEPAGE 
SW_HID_MM_PREPAREMERGEPAGE
 #define HID_MM_MERGEPAGE
SW_HID_MM_MERGEPAGE
 #define HID_MM_OUTPUTPAGE   
SW_HID_MM_OUTPUTPAGE
@@ -404,14 +403,6 @@
 #define HID_NID_NEXT
SW_HID_NID_NEXT
 #define HID_MM_NEXT_PAGE
SW_HID_MM_NEXT_PAGE
 #define HID_MM_PREV_PAGE
SW_HID_MM_PREV_PAGE
-#define HID_MM_GREETINGS_CB_PERSONALIZED
SW_HID_MM_GREETINGS_CB_PERSONALIZED
-#define HID_MM_GREETINGS_LB_FEMALE  
SW_HID_MM_GREETINGS_LB_FEMALE
-#define HID_MM_GREETINGS_PB_FEMALE  
SW_HID_MM_GREETINGS_PB_FEMALE
-#define HID_MM_GREETINGS_LB_MALE
SW_HID_MM_GREETINGS_LB_MALE
-#define HID_MM_GREETINGS_PB_MALE
SW_HID_MM_GREETINGS_PB_MALE
-#define HID_MM_GREETINGS_LB_FEMALECOLUMN
SW_HID_MM_GREETINGS_LB_FEMALECOLUMN
-#define HID_MM_GREETINGS_CB_FEMALEFIELD 
SW_HID_MM_GREETINGS_CB_FEMALEFIELD
-#define HID_MM_GREETINGS_CB_NEUTRAL 
SW_HID_MM_GREETINGS_CB_NEUTRAL
 #define HID_MM_BODY_CB_PERSONALIZED 
SW_HID_MM_BODY_CB_PERSONALIZED
 #define HID_MM_BODY_LB_FEMALE   
SW_HID_MM_BODY_LB_FEMALE
 #define HID_MM_BODY_PB_FEMALE   
SW_HID_MM_BODY_PB_FEMALE
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx 
b/sw/source/ui/dbui/mmgreetingspage.cxx
index da9d8fa..083415f 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -133,9 +133,9 @@ voidSwGreetingsHandler::UpdatePreview()
 
 IMPL_LINK(SwMailMergeGreetingsPage, AssignHdl_Impl, PushButton*, pButton)
 {
-OUString sPreview = m_aFemaleLB.GetSelectEntry();
+OUString sPreview = m_pFemaleLB-GetSelectEntry();
 sPreview += \n;
-sPreview += m_aMaleLB.GetSelectEntry();
+sPreview += m_pMaleLB-GetSelectEntry();
 boost::scoped_ptrSwAssignFieldsDialog pDlg(
 new SwAssignFieldsDialog(pButton, m_pWizard-GetConfigItem(), 
sPreview, false));
 if(RET_OK == pDlg-Execute())
@@ -160,8 +160,8 @@ void SwMailMergeGreetingsPage::UpdatePreview()
 bool bNoValue = !m_pFemaleColumnLB-IsEnabled();
 if( !bNoValue )
 {
-OUString sFemaleValue = m_aFemaleFieldCB.GetText();
-OUString sFemaleColumn = m_aFemaleColumnLB.GetSelectEntry();
+OUString sFemaleValue = m_pFemaleFieldCB-GetText();
+OUString sFemaleColumn = m_pFemaleColumnLB-GetSelectEntry();
 

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

2013-10-14 Thread Caolán McNamara
 sw/UIConfig_swriter.mk |1 
 sw/inc/dbui.hrc|8 --
 sw/source/ui/dbui/dbui.cxx |   30 +++
 sw/source/ui/dbui/dbui.src |   83 
 sw/source/ui/inc/dbui.hxx  |   11 +-
 sw/uiconfig/swriter/ui/mmcreatingdialog.ui |  116 +
 6 files changed, 134 insertions(+), 115 deletions(-)

New commits:
commit 33450a258a92986c25923d37d033c948b702c585
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Oct 14 20:28:47 2013 +0100

convert creating document mail merge dialog to .ui

Change-Id: Ibcb82ba8204fe94d31e32c74d8c2ade3228ff4f8

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index c346962..c3fff9b 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -160,6 +160,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/querydefaultcompatdialog \
sw/uiconfig/swriter/ui/querysavelabeldialog \
sw/uiconfig/swriter/ui/queryshowchangesdialog \
+   sw/uiconfig/swriter/ui/mmcreatingdialog \
sw/uiconfig/swriter/ui/mmoutputtypepage \
sw/uiconfig/swriter/ui/mmselectpage \
sw/uiconfig/swriter/ui/paradialog \
diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc
index 0e6a220..a988946 100644
--- a/sw/inc/dbui.hrc
+++ b/sw/inc/dbui.hrc
@@ -46,7 +46,6 @@
 #define DLG_MM_MAILBODY   (RC_DBUI_BEGIN + 24)
 #define DLG_MM_SENDMAILS  (RC_DBUI_BEGIN + 25)
 #define DLG_MAILMERGECHILD(RC_DBUI_BEGIN + 26)
-#define DLG_MM_CREATIONMONITOR(RC_DBUI_BEGIN + 30)
 // Strings --
 
 #define SA_ADDRESS_HEADER   (RC_DBUI_BEGIN + 1)
@@ -75,19 +74,12 @@
 #define ST_DRAGSALUTATION   (RC_DBUI_BEGIN + 24)
 #define ST_TITLE_EDIT   (RC_DBUI_BEGIN + 25)
 
-
 // Elements -
 
 #define BTN_OK  2
 #define BTN_CANCEL  3
 #define BTN_HELP4
 
-#define PB_CANCELPRNMON 9
-#define FT_STATUS   12
-#define FT_CREATEDOCUMENTS  13
-#define FT_PROGRESS 14
-#define FT_COUNTING 15
-
 #define MM_PART_TITLE   0
 #define MM_PART_FIRSTNAME   1
 #define MM_PART_LASTNAME2
diff --git a/sw/source/ui/dbui/dbui.cxx b/sw/source/ui/dbui/dbui.cxx
index f1b58e2..fd45bbc 100644
--- a/sw/source/ui/dbui/dbui.cxx
+++ b/sw/source/ui/dbui/dbui.cxx
@@ -46,22 +46,18 @@ PrintMonitor::PrintMonitor(Window *pParent, 
PrintMonitorType eType )
 
 // Progress Indicator for Creation of personalized Mail Merge documents:
 CreateMonitor::CreateMonitor( Window *pParent )
-:   ModelessDialog( pParent, SW_RES(DLG_MM_CREATIONMONITOR) ),
-m_aStatus   (this, SW_RES( FT_STATUS )),
-m_aProgress (this, SW_RES( FT_PROGRESS )),
-m_aCreateDocuments  (this, SW_RES( FT_CREATEDOCUMENTS )),
-m_aCounting (this, SW_RES( FT_COUNTING )),
-m_aCancelButton (this, SW_RES( PB_CANCELPRNMON  )),
-m_sCountingPattern(),
-m_sVariable_Total( OUString(%Y) ),
-m_sVariable_Position( OUString(%X) ),
-m_nTotalCount(0),
-m_nCurrentPosition(0)
+: ModelessDialog(pParent, MMCreatingDialog,
+modules/swriter/ui/mmcreatingdialog.ui)
+, m_sCountingPattern()
+, m_sVariable_Total(%Y)
+, m_sVariable_Position(%X)
+, m_nTotalCount(0)
+, m_nCurrentPosition(0)
 {
-FreeResource();
-
-m_sCountingPattern = m_aCounting.GetText();
-m_aCounting.SetText(OUString(...));
+get(m_pCancelButton, cancel);
+get(m_pCounting, progress);
+m_sCountingPattern = m_pCounting-GetText();
+m_pCounting-SetText(...);
 }
 
 void CreateMonitor::UpdateCountingText()
@@ -69,7 +65,7 @@ void CreateMonitor::UpdateCountingText()
 OUString sText(m_sCountingPattern);
 sText = sText.replaceAll( m_sVariable_Total, OUString::number( 
m_nTotalCount ) );
 sText = sText.replaceAll( m_sVariable_Position, OUString::number( 
m_nCurrentPosition ) );
-m_aCounting.SetText(sText);
+m_pCounting-SetText(sText);
 }
 
 void CreateMonitor::SetTotalCount( sal_Int32 nTotal )
@@ -86,7 +82,7 @@ void CreateMonitor::SetCurrentPosition( sal_Int32 nCurrent )
 
 void CreateMonitor::SetCancelHdl( const Link rLink )
 {
-m_aCancelButton.SetClickHdl( rLink );
+m_pCancelButton-SetClickHdl( rLink );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/dbui.src b/sw/source/ui/dbui/dbui.src
index 51ee91a..5ff7097 100644
--- a/sw/source/ui/dbui/dbui.src
+++ b/sw/source/ui/dbui/dbui.src
@@ -85,87 +85,4 @@ String STR_FILTER_ACCDB
 Text [ en-US ] = Microsoft Access 2007 (*.accdb) ;
 };
 
- // DLG_MM_CREATIONMONITOR 
--
-ModelessDialog DLG_MM_CREATIONMONITOR
-{
-SVLOOK = TRUE ;
-HIDE = TRUE ;
-OUTPUTSIZE = TRUE ;
-_WHMAPMODE 

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

2013-10-11 Thread Caolán McNamara
 sw/UIConfig_swriter.mk |1 
 sw/inc/helpid.h|1 
 sw/source/ui/app/app.src   |   33 ---
 sw/source/ui/inc/app.hrc   |8 --
 sw/source/ui/uiview/view2.cxx  |   56 ++--
 sw/uiconfig/swriter/ui/warndatasourcedialog.ui |   69 +
 6 files changed, 76 insertions(+), 92 deletions(-)

New commits:
commit cc6f43275a00b0aff2e60e70ee803a2c9610
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Oct 11 15:55:24 2013 +0100

convert merge source error dialog to .ui

Change-Id: I1f09a4b4377a9a6c21e0e260c856dd9fbff4f1bd

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 1a03283..64900b1 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -204,6 +204,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/titlepage \
sw/uiconfig/swriter/ui/tokenwidget \
sw/uiconfig/swriter/ui/viewoptionspage \
+   sw/uiconfig/swriter/ui/warndatasourcedialog \
sw/uiconfig/swriter/ui/wordcount \
sw/uiconfig/swriter/ui/wrapdialog \
sw/uiconfig/swriter/ui/wrappage \
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index cc4a15e..da7cb7e 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -365,7 +365,6 @@
 #define HID_PVIEW_ZOOM_LB   
SW_HID_PVIEW_ZOOM_LB
 #define HID_MAIL_MERGE_SELECT   
SW_HID_MAIL_MERGE_SELECT
 #define HID_PRINT_AS_MERGE  
SW_HID_PRINT_AS_MERGE
-#define HID_MERGE_SOURCE_UNAVAILABLE
SW_HID_MERGE_SOURCE_UNAVAILABLE
 #define HID_MODULE_TOOLBOX  
SW_HID_MODULE_TOOLBOX
 
 #define HID_MM_ADDRESSBLOCKPAGE 
SW_HID_MM_ADDRESSBLOCKPAGE
diff --git a/sw/source/ui/app/app.src b/sw/source/ui/app/app.src
index 5b4000c..a42d2de 100644
--- a/sw/source/ui/app/app.src
+++ b/sw/source/ui/app/app.src
@@ -489,39 +489,6 @@ QueryBox MSG_PRINT_AS_MERGE
 Message [ en-US ] = Your document contains address database fields. Do 
you want to print a form letter?;
 };
 
-ModalDialog DLG_MERGE_SOURCE_UNAVAILABLE
-{
-HelpId = HID_MERGE_SOURCE_UNAVAILABLE;
-OutputSize = TRUE ;
-SVLook = TRUE ;
-Size = MAP_APPFONT ( 202 , 72 ) ;
-Moveable = TRUE ;
-
-FixedImage IMG_MERGE
-{
-Pos = MAP_APPFONT ( 12 , 14 ) ;
-Size = MAP_APPFONT ( 103 , 32 ) ;
-};
-FixedText ST_MERGE_SOURCE_UNAVAILABLE
-{
-Pos = MAP_APPFONT ( 12 , 6 ) ;
-Size = MAP_APPFONT ( 178 , 40 ) ;
-WordBreak = TRUE;
-Text [ en-US ] = The data source '%1' was not found. Thus the 
connection to the data source could not be established.\n\nPlease check the 
connection settings.;
-};
-OKButton PB_MERGE_OK
-{
-Pos = MAP_APPFONT ( 12 , 52 ) ;
-Size = MAP_APPFONT ( 125 , 14 ) ;
-Text [ en-US ] = Check Connection Settings...;
-};
-CancelButton PB_MERGE_CANCEL
-{
-Pos = MAP_APPFONT ( 140 , 52 ) ;
-Size = MAP_APPFONT ( 50 , 14 ) ;
-};
-};
-
 String RID_MODULE_TOOLBOX
 {
 Text [ en-US ] = Function Bar (viewing mode) ;
diff --git a/sw/source/ui/inc/app.hrc b/sw/source/ui/inc/app.hrc
index 7752ca0..d28ae33 100644
--- a/sw/source/ui/inc/app.hrc
+++ b/sw/source/ui/inc/app.hrc
@@ -45,14 +45,6 @@
 #define STR_CJK_FONT(RC_APP_BEGIN + 78)
 #define MSG_PRINT_AS_MERGE  (RC_APP_BEGIN + 80)
 
-#define DLG_MERGE_SOURCE_UNAVAILABLE(RC_APP_BEGIN + 83)
-
-#define ST_MERGE_SOURCE_UNAVAILABLE 1
-#define PB_MERGE_OK 2
-#define PB_MERGE_CANCEL 3
-#define IMG_MERGE   4
-
-
 #define STR_ENV_TITLE   (RC_APP_BEGIN + 91)
 #define STR_LAB_TITLE   (RC_APP_BEGIN + 92)
 
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 77f8637..eedf54e 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -2218,52 +2218,6 @@ namespace
 }
 }
 
-class SwMergeSourceWarningBox_Impl : public ModalDialog
-{
-FixedInfo   aMessageFI;
-OKButtonaOK;
-CancelButtonaCancel;
-
-FixedImage  aWarnImage;
-public:
-SwMergeSourceWarningBox_Impl( Window* pParent ) :
-ModalDialog( pParent, SW_RES( DLG_MERGE_SOURCE_UNAVAILABLE   ) ),
-aMessageFI( this, SW_RES( ST_MERGE_SOURCE_UNAVAILABLE ) ),
-aOK(this, SW_RES( PB_MERGE_OK ) ),
-aCancel(this, SW_RES( PB_MERGE_CANCEL ) ),
-aWarnImage( this, SW_RES( IMG_MERGE   ) )
-{
-FreeResource();
-SetText( 

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

2013-09-09 Thread Caolán McNamara
 sw/UIConfig_swriter.mk|1 
 sw/inc/dbui.hrc   |1 
 sw/inc/helpid.h   |1 
 sw/source/ui/dbui/createaddresslistdialog.cxx |   45 ++
 sw/source/ui/dbui/createaddresslistdialog.hrc |8 -
 sw/source/ui/dbui/createaddresslistdialog.hxx |   23 +--
 sw/source/ui/dbui/createaddresslistdialog.src |   59 
 sw/uiconfig/swriter/ui/findentrydialog.ui |  190 ++
 vcl/inc/svids.hrc |1 
 vcl/source/src/btntext.src|5 
 vcl/source/window/builder.cxx |2 
 11 files changed, 229 insertions(+), 107 deletions(-)

New commits:
commit 780887431209af99743f1bece265118dfb340988
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Sep 9 12:18:10 2013 +0100

convert find entry dialog to .ui

Change-Id: I0d8ef363e45f9032676a161c63d7cf9bcbe417fd

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index d05381b..fed58d3 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -96,6 +96,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/envprinterpage \
sw/uiconfig/swriter/ui/exchangedatabases \
sw/uiconfig/swriter/ui/fielddialog \
+   sw/uiconfig/swriter/ui/findentrydialog \
sw/uiconfig/swriter/ui/flddbpage \
sw/uiconfig/swriter/ui/flddocinfopage \
sw/uiconfig/swriter/ui/flddocumentpage \
diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc
index a03816e..1bb029f0 100644
--- a/sw/inc/dbui.hrc
+++ b/sw/inc/dbui.hrc
@@ -36,7 +36,6 @@
 #define DLG_MM_SELECTDBTABLEDDIALOG (RC_DBUI_BEGIN + 12)
 #define DLG_MM_DBTABLEPREVIEWDIALOG (RC_DBUI_BEGIN + 13)
 #define DLG_MM_CREATEADDRESSLIST(RC_DBUI_BEGIN + 14)
-#define DLG_MM_FIND_ENTRY   (RC_DBUI_BEGIN + 15)
 #define DLG_MM_CUSTOMIZE_ADDRESS_LIST (RC_DBUI_BEGIN + 17)
 #define DLG_MM_CUSTOMIZEADDRESSBLOCK  (RC_DBUI_BEGIN + 18)
 #define DLG_MM_SELECTADDRESSBLOCK (RC_DBUI_BEGIN + 19)
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index bc96436..4536ec1 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -380,7 +380,6 @@
 #define HID_MM_SELECTDBTABLEDDIALOG_LISTBOX 
SW_HID_MM_SELECTDBTABLEDDIALOG_LISTBOX
 #define HID_MM_DBTABLEPREVIEWDIALOG 
SW_HID_MM_DBTABLEPREVIEWDIALOG
 #define HID_MM_CREATEADDRESSLIST
SW_HID_MM_CREATEADDRESSLIST
-#define HID_MM_FIND_ENTRY   
SW_HID_MM_FIND_ENTRY
 #define HID_MM_CUSTOMIZE_ADDRESS_LIST   
SW_HID_MM_CUSTOMIZE_ADDRESS_LIST
 #define HID_MM_CUSTOMIZEADDRESSBLOCK
SW_HID_MM_CUSTOMIZEADDRESSBLOCK
 #define HID_MM_SELECTADDRESSBLOCK   
SW_HID_MM_SELECTADDRESSBLOCK
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx 
b/sw/source/ui/dbui/createaddresslistdialog.cxx
index d1ba639..02bcac3 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -526,6 +526,7 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, FindHdl_Impl)
 ++aHeaderIter)
 rColumnBox.InsertEntry(*aHeaderIter);
 rColumnBox.SelectEntryPos( 0 );
+m_pFindDlg-Show();
 }
 else
 m_pFindDlg-Show(!m_pFindDlg-IsVisible());
@@ -717,46 +718,34 @@ void SwCreateAddressListDialog::Find(const String 
rSearch, sal_Int32 nColumn)
 }
 }
 
-SwFindEntryDialog::SwFindEntryDialog(SwCreateAddressListDialog* pParent) :
-ModelessDialog(pParent, SW_RES(DLG_MM_FIND_ENTRY)),
-#ifdef _MSC_VER
-#pragma warning (disable : 4355)
-#endif
-m_aFindFT( this, SW_RES(  FT_FIND  )),
-m_aFindED( this, SW_RES(  ED_FIND  )),
-m_aFindOnlyCB( this, SW_RES(  CB_FINDONLY )),
-m_aFindOnlyLB( this, SW_RES(  LB_FINDONLY  )),
-m_aFindPB( this, SW_RES(  PB_FIND)),
-m_aCancel( this, SW_RES(  PB_CANCEL)),
-m_aHelp( this, SW_RES(PB_HELP)),
-#ifdef _MSC_VER
-#pragma warning (default : 4355)
-#endif
-   m_pParent(pParent)
-{
-FreeResource();
-m_aFindPB.SetClickHdl(LINK(this, SwFindEntryDialog, FindHdl_Impl));
-m_aFindED.SetModifyHdl(LINK(this, SwFindEntryDialog, FindEnableHdl_Impl));
-m_aCancel.SetClickHdl(LINK(this, SwFindEntryDialog, CloseHdl_Impl));
-}
-
-SwFindEntryDialog::~SwFindEntryDialog()
+SwFindEntryDialog::SwFindEntryDialog(SwCreateAddressListDialog* pParent)
+: ModelessDialog(pParent, FindEntryDialog,
+modules/swriter/ui/findentrydialog.ui)
+, m_pParent(pParent)
 {
+get(m_pCancel, cancel);
+get(m_pFindPB, find);
+get(m_pFindOnlyLB, area);
+get(m_pFindOnlyCB, findin);
+get(m_pFindED, entry);
+m_pFindPB-SetClickHdl(LINK(this, SwFindEntryDialog, FindHdl_Impl));
+m_pFindED-SetModifyHdl(LINK(this, SwFindEntryDialog, FindEnableHdl_Impl));
+m_pCancel-SetClickHdl(LINK(this, 

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

2013-09-02 Thread Caolán McNamara
 sw/UIConfig_swriter.mk   |1 
 sw/inc/globals.hrc   |1 
 sw/inc/helpid.h  |1 
 sw/source/ui/inc/cnttab.hxx  |8 
 sw/source/ui/index/cntex.cxx |1 
 sw/source/ui/index/cnttab.cxx|  142 
 sw/source/ui/index/cnttab.hrc|   11 -
 sw/source/ui/index/cnttab.src|   80 -
 sw/uiconfig/swriter/ui/assignstylesdialog.ui |  227 +++
 9 files changed, 311 insertions(+), 161 deletions(-)

New commits:
commit d649afe84ba659df845d2c4733dfba3fa4c657a3
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Sep 2 09:29:47 2013 +0100

convert apply styles dialog to .ui

Change-Id: Id596ceaebc0dda3be046be89f22b6bf1a304fa4e

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 4d22eea..ceb9611 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -61,6 +61,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/swriter,\
 $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/abstractdialog \
sw/uiconfig/swriter/ui/asciifilterdialog \
+   sw/uiconfig/swriter/ui/assignstylesdialog \
sw/uiconfig/swriter/ui/authenticationsettingsdialog \
sw/uiconfig/swriter/ui/autoformattable \
sw/uiconfig/swriter/ui/autotext \
diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
index c13fac8..5d0d28f 100644
--- a/sw/inc/globals.hrc
+++ b/sw/inc/globals.hrc
@@ -124,7 +124,6 @@
 
 #define TP_OPTCAPTION_PAGE  (RC_GLOBALS_BEGIN +  77)
 #define DLG_SVXTEST_NUM_BULLET  (RC_GLOBALS_BEGIN +  79)
-#define DLG_ADD_IDX_STYLES  (RC_GLOBALS_BEGIN +  94)
 //maximum: RC_GLOBALS_BEGIN +  120
 
 
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 3b76017..83b8cd4 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -137,7 +137,6 @@
 
 #define HID_REDLINE_CTRL
SW_HID_REDLINE_CTRL
 #define HID_OPTCAPTION_PAGE 
SW_HID_OPTCAPTION_PAGE
-#define HID_DLG_ADD_IDX_STYLES  
SW_HID_DLG_ADD_IDX_STYLES
 #define HID_ADD_STYLES_TLB  
SW_HID_ADD_STYLES_TLB
 
 #define HID_COMPATIBILITY_OPTIONS_BOX   
SW_HID_COMPATIBILITY_OPTIONS_BOX
diff --git a/sw/source/ui/inc/cnttab.hxx b/sw/source/ui/inc/cnttab.hxx
index 0da1276..30dc8e1 100644
--- a/sw/source/ui/inc/cnttab.hxx
+++ b/sw/source/ui/inc/cnttab.hxx
@@ -43,6 +43,14 @@
 #define TOX_PAGE_ENTRY  2
 #define TOX_PAGE_STYLES 3
 
+#define TO_CONTENT  1
+#define TO_INDEX2
+#define TO_ILLUSTRATION 4
+#define TO_TABLE8
+#define TO_USER 16
+#define TO_OBJECT   32
+#define TO_AUTHORITIES  64
+
 struct CurTOXType
 {
 TOXTypeseType;
diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx
index 33c1d90..a3f96c3 100644
--- a/sw/source/ui/index/cntex.cxx
+++ b/sw/source/ui/index/cntex.cxx
@@ -47,7 +47,6 @@
 #include cmdid.h
 #include utlui.hrc
 #include index.hrc
-#include cnttab.hrc
 #include globals.hrc
 #include SwStyleNameMapper.hxx
 #include swuicnttab.hxx
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 802a73d..77dd117 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -68,7 +68,7 @@
 #include helpid.h
 #include utlui.hrc
 #include index.hrc
-#include cnttab.hrc
+#include cnttab.hxx
 #include globals.hrc
 #include SwStyleNameMapper.hxx
 #include sfx2/filedlghelper.hxx
@@ -562,10 +562,13 @@ sal_Bool SwMultiTOXTabDialog::IsNoNum(SwWrtShell rSh, 
const String rName)
 
 class SwIndexTreeLB : public SvSimpleTable
 {
+private:
 public:
-SwIndexTreeLB(SvSimpleTableContainer rParent, WinBits nBits = WB_BORDER);
+SwIndexTreeLB(SvSimpleTableContainer rParent, WinBits nBits = 0);
 virtual void KeyInput( const KeyEvent rKEvt );
+virtual void Resize();
 virtual sal_IntPtr GetTabPos( SvTreeListEntry*, SvLBoxTab* );
+void setColSizes();
 };
 
 
@@ -573,7 +576,8 @@ SwIndexTreeLB::SwIndexTreeLB(SvSimpleTableContainer 
rParent, WinBits nBits)
 : SvSimpleTable(rParent, nBits)
 {
 HeaderBar rStylesHB = GetTheHeaderBar();
-
rStylesHB.SetStyle(rStylesHB.GetStyle()|WB_BUTTONSTYLE|WB_TABSTOP|WB_BORDER);
+rStylesHB.SetStyle(rStylesHB.GetStyle()|WB_BUTTONSTYLE);
+SetStyle(GetStyle()  ~(WB_AUTOHSCROLL|WB_HSCROLL));
 }
 
 sal_IntPtr SwIndexTreeLB::GetTabPos( SvTreeListEntry* pEntry, SvLBoxTab* pTab)
@@ -625,19 +629,40 @@ void SwIndexTreeLB::KeyInput( const KeyEvent rKEvt )
 SvTreeListBox::KeyInput(rKEvt);
 }
 
+void SwIndexTreeLB::Resize()
+{
+SvSimpleTable::Resize();
+setColSizes();
+}
+
+void SwIndexTreeLB::setColSizes()
+{
+HeaderBar rHB = GetTheHeaderBar();
+if (rHB.GetItemCount()  MAXLEVEL+1)
+return;
+
+long nWidth = rHB.GetSizePixel().Width();
+nWidth 

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

2013-08-22 Thread Caolán McNamara
 sw/UIConfig_swriter.mk   |1 
 sw/inc/envelp.hrc|2 
 sw/inc/helpid.h  |1 
 sw/inc/swabstdlg.hxx |3 
 sw/source/ui/dialog/swdlgfact.cxx|   17 --
 sw/source/ui/dialog/swdlgfact.hxx|3 
 sw/source/ui/envelp/mailmrge.cxx |   19 --
 sw/source/ui/envelp/mailmrge.hrc |5 
 sw/source/ui/envelp/mailmrge.src |   57 
 sw/source/ui/inc/mailmrge.hxx|   18 --
 sw/source/ui/uiview/view2.cxx|4 
 sw/uiconfig/swriter/ui/mailmergedialog.ui|4 
 sw/uiconfig/swriter/ui/mergeconnectdialog.ui |  174 +++
 13 files changed, 192 insertions(+), 116 deletions(-)

New commits:
commit c880eff613540fc291cd5f90928c95cbe260979f
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Aug 22 09:57:51 2013 +0100

convert mail merge connection dialog to .ui

Change-Id: I37bbe66798efe855e9d12d131311615f6fbac702

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index d3360ca..f9d1578 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -125,6 +125,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/linenumbering \
sw/uiconfig/swriter/ui/mailconfigpage \
sw/uiconfig/swriter/ui/mailmergedialog \
+   sw/uiconfig/swriter/ui/mergeconnectdialog \
sw/uiconfig/swriter/ui/mergetabledialog \
sw/uiconfig/swriter/ui/newuserindexdialog \
sw/uiconfig/swriter/ui/numparapage \
diff --git a/sw/inc/envelp.hrc b/sw/inc/envelp.hrc
index 7ab5d3d..f96c9e2 100644
--- a/sw/inc/envelp.hrc
+++ b/sw/inc/envelp.hrc
@@ -52,8 +52,6 @@
 #define STR_DATABASE_NOT_OPENED  (RC_ENVLOP_BEGIN + 63)
 #define STR_NO_DRIVERS   (RC_ENVLOP_BEGIN + 64)
 
-#define DLG_MERGE_FIELD_CONNECTIONS (RC_ENVLOP_BEGIN + 66)
-
 #define STR_BTN_NEWDOC   (RC_ENVLOP_BEGIN + 68)
 #define STR_SENDER_TOKENS(RC_ENVLOP_BEGIN + 69)
 // Ueberlaufpruefung --
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 8dccf24..3b9689f 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -384,7 +384,6 @@
 
 #define HID_PVIEW_ZOOM_LB   
SW_HID_PVIEW_ZOOM_LB
 #define HID_MAIL_MERGE_SELECT   
SW_HID_MAIL_MERGE_SELECT
-#define HID_MAIL_MERGE_INSERT_FIELDS
SW_HID_MAIL_MERGE_INSERT_FIELDS
 #define HID_PRINT_AS_MERGE  
SW_HID_PRINT_AS_MERGE
 #define HID_MERGE_SOURCE_UNAVAILABLE
SW_HID_MERGE_SOURCE_UNAVAILABLE
 #define HID_MODULE_TOOLBOX  
SW_HID_MODULE_TOOLBOX
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 2fca3cc..c5b26d5 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -428,8 +428,7 @@ public:
 const 
::com::sun::star::uno::Reference ::com::sun::star::sdbc::XConnection 
xConnection,
 
::com::sun::star::uno::Sequence ::com::sun::star::uno::Any * pSelection = 0 ) 
= 0; //add for SwMailMergeDlg
 virtual AbstractMailMergeCreateFromDlg* 
CreateMailMergeCreateFromDlg(Window* pParent) = 0;
-virtual AbstractMailMergeFieldConnectionsDlg*   
CreateMailMergeFieldConnectionsDlg( int nResId,
-Window* pParent ) 
= 0; //add for SwMailMergeFieldConnectionsDlg
+virtual AbstractMailMergeFieldConnectionsDlg* 
CreateMailMergeFieldConnectionsDlg(Window* pParent) = 0; //add for 
SwMailMergeFieldConnectionsDlg
 virtual VclAbstractDialog*  CreateMultiTOXMarkDlg( int nResId,
 Window* pParent, SwTOXMgr 
rTOXMgr ) = 0; //add for SwMultiTOXMarkDlg
 virtual SfxAbstractTabDialog*   CreateSwTabDialog( int nResId,
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index d15d834..3c6e5b5 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -1020,21 +1020,10 @@ AbstractMailMergeCreateFromDlg * 
SwAbstractDialogFactory_Impl::CreateMailMergeCr
 return new AbstractMailMergeCreateFromDlg_Impl(pDlg);
 }
 
-AbstractMailMergeFieldConnectionsDlg * 
SwAbstractDialogFactory_Impl::CreateMailMergeFieldConnectionsDlg( int nResId,
-Window* pParent ) 
//add for SwMailMergeFieldConnectionsDlg
+AbstractMailMergeFieldConnectionsDlg * 
SwAbstractDialogFactory_Impl::CreateMailMergeFieldConnectionsDlg(Window* 
pParent) //add for SwMailMergeFieldConnectionsDlg
 {
-SwMailMergeFieldConnectionsDlg* pDlg=NULL;
-switch ( nResId )
-{
-case DLG_MERGE_FIELD_CONNECTIONS :
-pDlg = new 

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

2013-08-12 Thread Caolán McNamara
 sw/UIConfig_swriter.mk   |1 
 sw/inc/helpid.h  |2 
 sw/source/ui/envelp/label.hrc|8 -
 sw/source/ui/envelp/label.src|   44 --
 sw/source/ui/envelp/label1.cxx   |   73 -
 sw/source/ui/envelp/labelexp.cxx |   32 +++
 sw/source/ui/envelp/swuilabimp.hxx   |   10 --
 sw/uiconfig/swriter/ui/cardformatpage.ui |  129 +++
 8 files changed, 183 insertions(+), 116 deletions(-)

New commits:
commit 6a5eeaee0853c87e498ebd0546d97e9177dc4190
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Aug 12 14:49:14 2013 +0100

convert visiting cards page to .ui

Change-Id: Id541e1749572701827ab5a49df5197f77554c789

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 311364c..8cb55b4 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -68,6 +68,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/bulletsandnumbering \
sw/uiconfig/swriter/ui/cannotsavelabeldialog \
sw/uiconfig/swriter/ui/captionoptions \
+   sw/uiconfig/swriter/ui/cardformatpage \
sw/uiconfig/swriter/ui/cardmediumpage \
sw/uiconfig/swriter/ui/characterproperties \
sw/uiconfig/swriter/ui/charurlpage \
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 3c54ef4..0766a2b 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -166,7 +166,6 @@
 #define HID_OPTCAPTION_PAGE 
SW_HID_OPTCAPTION_PAGE
 #define HID_TP_TOX_SELECT   
SW_HID_TP_TOX_SELECT
 #define HID_TP_TOX_ENTRY
SW_HID_TP_TOX_ENTRY
-#define HID_TP_VISITING_CARDS   
SW_HID_TP_VISITING_CARDS
 #define HID_DLG_ADD_IDX_STYLES  
SW_HID_DLG_ADD_IDX_STYLES
 #define HID_ADD_STYLES_TLB  
SW_HID_ADD_STYLES_TLB
 #define HID_OLE_CHECKLB 
SW_HID_OLE_CHECKLB
@@ -394,7 +393,6 @@
 #define HID_AUTH_FIELD_ISBN 
SW_HID_AUTH_FIELD_ISBN
 
 #define HID_INSERT_INDEX_ENTRY_LEVEL_LB 
SW_HID_INSERT_INDEX_ENTRY_LEVEL_LB
-#define HID_BUSINESS_CARD_CONTENT   
SW_HID_BUSINESS_CARD_CONTENT
 #define HID_BUSINESS_FMT_PAGE   
SW_HID_BUSINESS_FMT_PAGE
 #define HID_BUSINESS_FMT_PAGE_CONT  
SW_HID_BUSINESS_FMT_PAGE_CONT
 #define HID_BUSINESS_FMT_PAGE_SHEET 
SW_HID_BUSINESS_FMT_PAGE_SHEET
diff --git a/sw/source/ui/envelp/label.hrc b/sw/source/ui/envelp/label.hrc
index b7bfaef..4130fac 100644
--- a/sw/source/ui/envelp/label.hrc
+++ b/sw/source/ui/envelp/label.hrc
@@ -26,14 +26,6 @@
 
 #define BTN_SYNC 20
 
-#define LB_AUTO_TEXT3
-#define FT_AUTO_TEXT_GROUP  4
-#define LB_AUTO_TEXT_GROUP  5
-#define ED_TEXT 6
-#define FL_CONTENT  7
-#define WIN_EXAMPLE 8
-#define ST_VISCARD_GROUP10
-
 #define FL_DATA 30
 #define FT_NAME 31
 #define ED_FIRSTNAME32
diff --git a/sw/source/ui/envelp/label.src b/sw/source/ui/envelp/label.src
index 4008642..d19939c 100644
--- a/sw/source/ui/envelp/label.src
+++ b/sw/source/ui/envelp/label.src
@@ -116,50 +116,6 @@ String STR_CUSTOM
 Text [ en-US ] = [User];
 };
 //
-TabPage TP_VISITING_CARDS
-{
-HelpID = HID_TP_VISITING_CARDS ;
-Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
-Hide = TRUE ;
-
-Control LB_AUTO_TEXT
-{
-Pos = MAP_APPFONT ( 12 , 14 ) ;
-Size = MAP_APPFONT ( 109 , 135 ) ;
-Border = TRUE ;
-TabStop = TRUE ;
-};
-FixedText FT_AUTO_TEXT_GROUP
-{
-Pos = MAP_APPFONT ( 12 ,  153) ;
-Size = MAP_APPFONT ( 109 , 8 ) ;
-Text [ en-US ] = AutoText - Section;
-};
-ListBox LB_AUTO_TEXT_GROUP
-{
-HelpID = sw:ListBox:TP_VISITING_CARDS:LB_AUTO_TEXT_GROUP;
-Pos = MAP_APPFONT ( 12 , 164) ;
-Size = MAP_APPFONT ( 109 , 50 ) ;
-Border = TRUE ;
-TabStop = TRUE ;
-DropDown = TRUE ;
-};
-FixedLine FL_CONTENT
-{
-Pos = MAP_APPFONT ( 6 , 3 ) ;
-Size = MAP_APPFONT ( 248 , 8 ) ;
-Text [ en-US ] = Content;
-};
-Window WIN_EXAMPLE
-{
-Pos = MAP_APPFONT ( 139, 14 ) ;
-Size = MAP_APPFONT ( 109 , 162 ) ;
-};
-String ST_VISCARD_GROUP
-{
-   Text = Cards;
-};
-};
 TabPage TP_PRIVATE_DATA
 {
 HelpID = HID_TP_PRIVATE_DATA  ;
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index d938370..188ef9f 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -548,11 

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

2013-08-07 Thread Caolán McNamara
 sw/UIConfig_swriter.mk   |1 
 sw/inc/helpid.h  |1 
 sw/source/ui/envelp/label.hrc|   19 -
 sw/source/ui/envelp/label.src|  157 -
 sw/source/ui/envelp/label1.cxx   |  253 ++-
 sw/source/ui/envelp/swuilabimp.hxx   |   42 +-
 sw/uiconfig/swriter/ui/cardmediumpage.ui |  520 +++
 7 files changed, 644 insertions(+), 349 deletions(-)

New commits:
commit 37aa92dfa3605b4d2d03d977a45a71b34e4b6b9d
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Aug 7 13:47:28 2013 +0200

convert label medium tabpage to .ui

Change-Id: I38c3e28070b9d5b689bd6ba4bde01a7a8dedba18

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 34ea76f..7e67b46 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -68,6 +68,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/bulletsandnumbering \
sw/uiconfig/swriter/ui/cannotsavelabeldialog \
sw/uiconfig/swriter/ui/captionoptions \
+   sw/uiconfig/swriter/ui/cardmediumpage \
sw/uiconfig/swriter/ui/characterproperties \
sw/uiconfig/swriter/ui/charurlpage \
sw/uiconfig/swriter/ui/columndialog \
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 0a4014c..74edf70 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -144,7 +144,6 @@
 
 #define HID_FRM_STD 
SW_HID_FRM_STD
 #define HID_GRF_EXT 
SW_HID_GRF_EXT
-#define HID_LAB_LAB 
SW_HID_LAB_LAB
 #define HID_ENV_PRT 
SW_HID_ENV_PRT
 #define HID_LAB_FMT 
SW_HID_LAB_FMT
 #define HID_ENV_ENV 
SW_HID_ENV_ENV
diff --git a/sw/source/ui/envelp/label.hrc b/sw/source/ui/envelp/label.hrc
index 1d00229..b7bfaef 100644
--- a/sw/source/ui/envelp/label.hrc
+++ b/sw/source/ui/envelp/label.hrc
@@ -24,25 +24,6 @@
 
 // local resources *
 
-#define TXT_WRITING   1
-#define BOX_ADDR  2
-#define EDT_WRITING   3
-#define FT_DATABASE   4
-#define LB_DATABASE   5
-#define FT_TABLE  6
-#define LB_TABLE  7
-#define FL_WRITING   8
-#define BTN_CONT  9
-#define BTN_SHEET10
-#define TXT_MAKE 11
-#define BOX_MAKE 12
-#define TXT_TYPE 13
-#define BOX_TYPE 14
-#define INF_FORMAT   15
-#define FL_FORMAT   16
-#define FT_DBFIELD   17
-#define LB_DBFIELD   18
-#define BTN_INSERT   19
 #define BTN_SYNC 20
 
 #define LB_AUTO_TEXT3
diff --git a/sw/source/ui/envelp/label.src b/sw/source/ui/envelp/label.src
index 89db7c9..4008642 100644
--- a/sw/source/ui/envelp/label.src
+++ b/sw/source/ui/envelp/label.src
@@ -84,162 +84,7 @@ TabDialog DLG_LAB
 Text [ en-US ] = Medium;
 };
 };
- // TP_LAB_LAB ---
-TabPage TP_LAB_LAB
-{
-HelpID = HID_LAB_LAB ;
-Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
-Hide = TRUE ;
-FixedText TXT_WRITING
-{
-Pos = MAP_APPFONT ( 12 , 15 ) ;
-Size = MAP_APPFONT ( 50 , 8 ) ;
-Group = TRUE ;
-Left = TRUE ;
-Text [ en-US ] = Label text ;
-};
-CheckBox BOX_ADDR
-{
-HelpID = sw:CheckBox:TP_LAB_LAB:BOX_ADDR;
-Pos = MAP_APPFONT ( 67 , 14 ) ;
-Size = MAP_APPFONT ( 50 , 10 ) ;
-TabStop = TRUE ;
-Text [ en-US ] = Address ;
-};
-MultiLineEdit EDT_WRITING
-{
-HelpID = sw:MultiLineEdit:TP_LAB_LAB:EDT_WRITING;
-Border = TRUE ;
-Pos = MAP_APPFONT ( 12 , 27 ) ;
-Size = MAP_APPFONT ( 105 , 89 ) ;
-TabStop = TRUE ;
-Left = TRUE ;
-HScroll = TRUE ;
-VScroll = TRUE ;
-IgnoreTab = TRUE;
-};
-FixedText FT_DATABASE
-{
-Pos = MAP_APPFONT ( 149 , 16 ) ;
-Size = MAP_APPFONT ( 99 , 8 ) ;
-Text [ en-US ] = Database ;
-};
-ListBox LB_DATABASE
-{
-HelpID = sw:ListBox:TP_LAB_LAB:LB_DATABASE;
-Border = TRUE ;
-Pos = MAP_APPFONT ( 149 , 27 ) ;
-Size = MAP_APPFONT ( 99 , 70 ) ;
-TabStop = TRUE ;
-DropDown = TRUE ;
-};
-FixedText FT_TABLE
-{
-Pos = MAP_APPFONT ( 149 , 45 ) ;
-Size = MAP_APPFONT ( 99 , 8 ) ;
-Text [ en-US ] = Table ;
-};
-ListBox LB_TABLE
-{
-HelpID = sw:ListBox:TP_LAB_LAB:LB_TABLE;
-Border = TRUE ;
-Pos = MAP_APPFONT ( 149 , 56 ) ;
-Size = MAP_APPFONT ( 99 , 70 ) ;
-TabStop = TRUE ;
-DropDown = TRUE ;
-};
-ImageButton BTN_INSERT
-{
-HelpID = sw:ImageButton:TP_LAB_LAB:BTN_INSERT;
-Pos = MAP_APPFONT ( 124 , 92 ) ;
-Size = MAP_APPFONT ( 18 , 12 ) ;
-SYMBOL = 

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

2013-07-12 Thread Caolán McNamara
 sw/inc/helpid.h  |1 
 sw/source/ui/frmdlg/frmpage.cxx  |   81 +++
 sw/source/ui/inc/frmpage.hxx |   53 +++---
 sw/uiconfig/swriter/ui/frmaddpage.ui |   77 -
 4 files changed, 90 insertions(+), 122 deletions(-)

New commits:
commit 1163b54c2973e3e67d1259ad10b2ff81be74055b
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Jul 12 10:36:52 2013 +0100

add back text flow options and some other reorgs

Change-Id: I7139779728907b20d577bf465090674238f80649

diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index bc85c42..062ae99 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -153,7 +153,6 @@
 #define HID_ENV_FMT 
SW_HID_ENV_FMT
 #define HID_FRM_URL 
SW_HID_FRM_URL
 #define HID_COND_COLL   
SW_HID_COND_COLL
-#define HID_FRM_ADD 
SW_HID_FRM_ADD
 
 #define HID_FLD_DB  SW_HID_FLD_DB
 #define HID_FLD_DOKINF  
SW_HID_FLD_DOKINF
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 47e98bc..210293f 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2733,13 +2733,6 @@ IMPL_LINK_NOARG(SwFrmURLPage, InsertFileHdl)
 return 0;
 }
 
-static void lcl_Move(Window rWin, sal_Int32 nDiff)
-{
-Point aPos(rWin.GetPosPixel());
-aPos.Y() -= nDiff;
-rWin.SetPosPixel(aPos);
-}
-
 SwFrmAddPage::SwFrmAddPage(Window *pParent, const SfxItemSet rSet ) :
 SfxTabPage(pParent, FrmAddPage , modules/swriter/ui/frmaddpage.ui, 
rSet),
 pWrtSh(0),
@@ -2749,7 +2742,7 @@ SwFrmAddPage::SwFrmAddPage(Window *pParent, const 
SfxItemSet rSet ) :
 bFormat(sal_False),
 bNew(sal_False)
 {
-get(pNamesFT,);
+get(pNameFrame, nameframe);
 get(pNameFT,name_label);
 get(pNameED,name);
 get(pAltNameFT,altname_label);
@@ -2758,12 +2751,11 @@ SwFrmAddPage::SwFrmAddPage(Window *pParent, const 
SfxItemSet rSet ) :
 get(pPrevLB,prev);
 get(pNextFT,next_label);
 get(pNextLB,next);
-get(pProtectFT,label1);
 
+get(pProtectFrame,protect);
 get(pProtectContentCB,protectcontent);
 get(pProtectFrameCB,protectframe);
 get(pProtectSizeCB,protectsize);
-get(pExtFT,label2);
 
 get(pEditInReadonlyCB,editinreadonly);
 get(pPrintFrameCB,printframe);
@@ -2786,20 +2778,15 @@ void SwFrmAddPage::Reset(const SfxItemSet rSet )
 const SfxPoolItem* pItem;
 sal_uInt16 nHtmlMode = ::GetHtmlMode((const 
SwDocShell*)SfxObjectShell::Current());
 bHtmlMode = nHtmlMode  HTMLMODE_ON ? sal_True : sal_False;
-if(bHtmlMode)
+if (bHtmlMode)
 {
-pProtectContentCB-Hide();
-pProtectFrameCB-Hide();
-pProtectSizeCB-Hide();
+pProtectFrame-Hide();
 pEditInReadonlyCB-Hide();
 pPrintFrameCB-Hide();
-pExtFT-Hide();
-pProtectFT-Hide();
 }
 if ( DLG_FRM_GRF == nDlgType || DLG_FRM_OLE == nDlgType )
 {
 pEditInReadonlyCB-Hide();
-pPrintFrameCB-SetPosPixel(pEditInReadonlyCB-GetPosPixel());
 }
 
 if(SFX_ITEM_SET == rSet.GetItemState(FN_SET_FRM_ALT_NAME, sal_False, 
pItem))
@@ -2843,37 +2830,11 @@ void SwFrmAddPage::Reset(const SfxItemSet rSet )
 pAltNameED-Enable(sal_False);
 pNameFT-Enable( sal_False );
 pAltNameFT-Enable(sal_False);
-pNamesFT-Enable(sal_False);
 }
 if(nDlgType == DLG_FRM_STD  pAltNameFT-IsVisible())
 {
 pAltNameFT-Hide();
 pAltNameED-Hide();
-//move all controls one step up
-/*Window* aWindows[] =
-{
-pPrevFT,
-pPrevLB,
-pNextFT,
-pNextLB,
-pNamesFT,
-pProtectContentCB,
-pProtectFrameCB,
-pProtectSizeCB,
-pProtectFT,
-pEditInReadonlyCB,
-pPrintFrameCB,
-pTextFlowFT,
-pTextFlowLB,
-pExtFT,
-0
-};
-sal_Int32 nOffset = pAltNameED-GetPosPixel().Y() - 
pNameED-GetPosPixel().Y();
-sal_Int32 nIdx = 0;
-while(aWindows[nIdx])
-{
-lcl_Move(*aWindows[nIdx++], nOffset);
-}*/
 }
 else
 {
@@ -3054,38 +3015,12 @@ IMPL_LINK_NOARG(SwFrmAddPage, EditModifyHdl)
 return 0;
 }
 
-voidSwFrmAddPage::SetFormatUsed(sal_Bool bFmt)
+void SwFrmAddPage::SetFormatUsed(sal_Bool bFmt)
 {
-bFormat  = bFmt;
-if(bFormat)
+bFormat = bFmt;
+if (bFormat)
 {
-pNameFT-Show(sal_False);
-pNameED-Show(sal_False);
-pAltNameFT-Show(sal_False);
-pAltNameED-Show(sal_False);
-pPrevFT-Show(sal_False);
-pPrevLB-Show(sal_False);
-pNextFT-Show(sal_False);
-

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

2013-07-12 Thread Csikós Tamás
 sw/UIConfig_swriter.mk   |1 
 sw/inc/helpid.h  |1 
 sw/source/ui/frmdlg/frmpage.cxx  |   67 
 sw/source/ui/frmdlg/frmpage.hrc  |   10 -
 sw/source/ui/frmdlg/frmpage.src  |   88 ---
 sw/source/ui/inc/frmpage.hxx |   17 --
 sw/uiconfig/swriter/ui/frmurlpage.ui |  266 +++
 7 files changed, 304 insertions(+), 146 deletions(-)

New commits:
commit efc09e121ceffb0d2c1b841b809277bd6484f1a7
Author: Csikós Tamás csks.t...@gmail.com
Date:   Fri Jul 12 11:16:44 2013 +0200

modern .ui widgetlayout for frmpage/frmurlpage

Change-Id: Ia308fa393baffc7f456ba613cb216b427c450ca6
Reviewed-on: https://gerrit.libreoffice.org/4854
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 7096808..4cd89ab 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -88,6 +88,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/footnotepage \
sw/uiconfig/swriter/ui/footnoteareapage \
sw/uiconfig/swriter/ui/frmaddpage \
+   sw/uiconfig/swriter/ui/frmurlpage \
sw/uiconfig/swriter/ui/indexentry \
sw/uiconfig/swriter/ui/inputfielddialog \
sw/uiconfig/swriter/ui/insertbookmark \
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 062ae99..c82e46e 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -151,7 +151,6 @@
 #define HID_LAB_FMT 
SW_HID_LAB_FMT
 #define HID_ENV_ENV 
SW_HID_ENV_ENV
 #define HID_ENV_FMT 
SW_HID_ENV_FMT
-#define HID_FRM_URL 
SW_HID_FRM_URL
 #define HID_COND_COLL   
SW_HID_COND_COLL
 
 #define HID_FLD_DB  SW_HID_FLD_DB
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 210293f..4240747 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2599,22 +2599,17 @@ void BmpWindow::SetGraphic(const Graphic rGrf)
 Description:set URL and ImageMap at frames
 ***/
 SwFrmURLPage::SwFrmURLPage( Window *pParent, const SfxItemSet rSet ) :
-SfxTabPage(pParent, SW_RES(TP_FRM_URL), rSet),
-aHyperLinkFL(this, SW_RES( FL_HYPERLINK )),
-aURLFT  (this, SW_RES( FT_URL)),
-aURLED  (this, SW_RES( ED_URL)),
-aSearchPB   (this, SW_RES( PB_SEARCH  )),
-aNameFT (this, SW_RES( FT_NAME   )),
-aNameED (this, SW_RES( ED_NAME   )),
-aFrameFT(this, SW_RES( FT_FRAME   )),
-aFrameCB(this, SW_RES( CB_FRAME   )),
-
-aImageFL(this, SW_RES( FL_IMAGE   )),
-aServerCB   (this, SW_RES( CB_SERVER  )),
-aClientCB   (this, SW_RES( CB_CLIENT  ))
+SfxTabPage(pParent, FrmURLPage , modules/swriter/ui/frmurlpage.ui, 
rSet)
 {
-FreeResource();
-aSearchPB.SetClickHdl(LINK(this, SwFrmURLPage, InsertFileHdl));
+get(pURLED,url);
+get(pSearchPB,search);
+get(pNameED,name);
+get(pFrameCB,frame);
+
+get(pServerCB,server);
+get(pClientCB,client);
+
+pSearchPB-SetClickHdl(LINK(this, SwFrmURLPage, InsertFileHdl));
 }
 
 SwFrmURLPage::~SwFrmURLPage()
@@ -2633,7 +2628,7 @@ void SwFrmURLPage::Reset( const SfxItemSet rSet )
 size_t nCount = pList-size();
 for ( size_t i = 0; i  nCount; i++ )
 {
-aFrameCB.InsertEntry( *pList-at( i ) );
+pFrameCB-InsertEntry( *pList-at( i ) );
 }
 for ( size_t i = nCount; i; )
 {
@@ -2646,24 +2641,24 @@ void SwFrmURLPage::Reset( const SfxItemSet rSet )
 if ( SFX_ITEM_SET == rSet.GetItemState( RES_URL, sal_True, pItem ) )
 {
 const SwFmtURL* pFmtURL = (const SwFmtURL*)pItem;
-aURLED.SetText( INetURLObject::decode( pFmtURL-GetURL(),
+pURLED-SetText( INetURLObject::decode( pFmtURL-GetURL(),
 INET_HEX_ESCAPE,
INetURLObject::DECODE_UNAMBIGUOUS,
 RTL_TEXTENCODING_UTF8 ));
-aNameED.SetText( pFmtURL-GetName());
+pNameED-SetText( pFmtURL-GetName());
 
-aClientCB.Enable( pFmtURL-GetMap() != 0 );
-aClientCB.Check ( pFmtURL-GetMap() != 0 );
-aServerCB.Check ( pFmtURL-IsServerMap() );
+pClientCB-Enable( pFmtURL-GetMap() != 0 );
+pClientCB-Check ( pFmtURL-GetMap() != 0 );
+pServerCB-Check ( pFmtURL-IsServerMap() );
 
-aFrameCB.SetText(pFmtURL-GetTargetFrameName());
-aFrameCB.SaveValue();
+

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

2013-07-09 Thread Csikós Tamás
 sw/UIConfig_swriter.mk |1 
 sw/inc/globals.hrc |1 
 sw/source/ui/config/optdlg.hrc |   33 -
 sw/source/ui/config/optdlg.src |  239 -
 sw/source/ui/config/optpage.cxx|  178 --
 sw/source/ui/dialog/swdlgfact.cxx  |1 
 sw/source/ui/inc/optpage.hxx   |   57 +--
 sw/uiconfig/swriter/ui/opttablepage.ui |  583 +
 8 files changed, 684 insertions(+), 409 deletions(-)

New commits:
commit f39885181180e960be80155a91f60906132b414a
Author: Csikós Tamás csks.t...@gmail.com
Date:   Sun Jul 7 15:35:37 2013 +0200

modern .ui widgetlayout for optpage

Change-Id: I257f4c5878caabd5394bb2641ebf6d82a833e5f1
Reviewed-on: https://gerrit.libreoffice.org/4756
Tested-by: Caolán McNamara caol...@redhat.com
Reviewed-by: Caolán McNamara caol...@redhat.com

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index dd533a7..58abfe1 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -103,6 +103,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/optcomparison \
sw/uiconfig/swriter/ui/optformataidspage \
sw/uiconfig/swriter/ui/optgeneralpage \
+   sw/uiconfig/swriter/ui/opttablepage \
sw/uiconfig/swriter/ui/opttestpage \
sw/uiconfig/swriter/ui/outlinenumbering \
sw/uiconfig/swriter/ui/outlinenumberingpage \
diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
index 8411ebf..60cb591 100644
--- a/sw/inc/globals.hrc
+++ b/sw/inc/globals.hrc
@@ -168,7 +168,6 @@
 #define TP_FRM_ADD  (RC_GLOBALS_BEGIN +  51)
 
 #define TP_PARA_ALIGN   (RC_GLOBALS_BEGIN +  55)
-#define TP_OPTTABLE_PAGE(RC_GLOBALS_BEGIN +  56)
 
 #define TP_NUMBER   (RC_GLOBALS_BEGIN +  57)
 
diff --git a/sw/source/ui/config/optdlg.hrc b/sw/source/ui/config/optdlg.hrc
index ffe8233..4dd3868 100644
--- a/sw/source/ui/config/optdlg.hrc
+++ b/sw/source/ui/config/optdlg.hrc
@@ -73,37 +73,4 @@
 #define LB_LABEL_SIZE  111
 #define LB_INDEX_SIZE  112
 
-//Tabpage Table
-#define CB_HEADER   101
-#define CB_REPEAT_HEADER102
-#define CB_DONT_SPLIT   103
-#define CB_BORDER   104
-#define CB_NUMFORMATTING105
-#define CB_NUMALIGNMENT 106
-#define FL_TABLE107
-#define FL_TABLE_INSERT 108
-#define CB_NUMFMT_FORMATTING109
-#define FL_MOVE 110
-#define FT_ROWMOVE  111
-#define MF_ROWMOVE  112
-#define FT_COLMOVE  113
-#define MF_COLMOVE  114
-#define FT_INSERT   115
-#define FT_ROWINSERT116
-#define MF_ROWINSERT117
-#define FT_COLINSERT118
-#define MF_COLINSERT119
-#define FT_HANDLING 120
-#define RB_FIX  121
-#define RB_FIXPROP  122
-#define RB_VAR  123
-#define FT_FIX  124
-#define FT_FIXPROP  125
-#define FT_VAR  126
-
-#define FT_MOVE 128
-#define FT_COMMENT  133
-#define FL_TABLE_SEPARATOR  139
-#define CB_PROSPECT_RTL140
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src
index 4635874..93b6033 100644
--- a/sw/source/ui/config/optdlg.src
+++ b/sw/source/ui/config/optdlg.src
@@ -195,245 +195,6 @@ TabPage TP_STD_FONT
 };
 };
 
-TabPage TP_OPTTABLE_PAGE
-{
-HelpID = HID_OPTTABLE_PAGE ;
-Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
-Hide = TRUE ;
-FixedLine FL_TABLE
-{
-Pos = MAP_APPFONT ( 6 , 3 ) ;
-Size = MAP_APPFONT ( 113 , 8 ) ;
-Text [ en-US ] = Default;
-};
-CheckBox CB_HEADER
-{
-HelpID = sw:CheckBox:TP_OPTTABLE_PAGE:CB_HEADER;
-Pos = MAP_APPFONT ( 12 , 14 ) ;
-Size = MAP_APPFONT ( 107 , 10 ) ;
-TabStop = TRUE ;
-Text [ en-US ] = H~eading;
-};
-CheckBox CB_REPEAT_HEADER
-{
-HelpID = sw:CheckBox:TP_OPTTABLE_PAGE:CB_REPEAT_HEADER;
-Pos = MAP_APPFONT ( 21 , 27 ) ;
-Size = MAP_APPFONT ( 99 , 10 ) ;
-TabStop = TRUE ;
-Text [ en-US ] = Re~peat on each page;
-};
-CheckBox CB_DONT_SPLIT
-{
-HelpID = sw:CheckBox:TP_OPTTABLE_PAGE:CB_DONT_SPLIT;
-Pos = MAP_APPFONT ( 12 , 40 ) ;
-Size = MAP_APPFONT ( 107 , 10 ) ;
-TabStop = TRUE ;
-Text [ en-US ] = Do not split;
-};
-CheckBox CB_BORDER
-{
-HelpID = sw:CheckBox:TP_OPTTABLE_PAGE:CB_BORDER;
-Pos = MAP_APPFONT ( 12 , 53 ) ;
-Size = MAP_APPFONT ( 107 , 10 ) ;
-TabStop = TRUE ;
-Text [ en-US ] = B~order;
-};
-FixedLine FL_TABLE_SEPARATOR
-{
-Pos 

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

2013-07-09 Thread Caolán McNamara
 sw/inc/helpid.h|1 
 sw/source/ui/config/optpage.cxx|   13 -
 sw/uiconfig/swriter/ui/opttablepage.ui |  389 +
 3 files changed, 212 insertions(+), 191 deletions(-)

New commits:
commit 04ffb8ba6bdf746e09c63f1d0f32c60875204974
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Jul 9 09:20:02 2013 +0100

remove now unnecessary manual SetPosPixel layout workarounds

Change-Id: Id25c562620ee1bdf6cdf1182b7342067c70c5479

diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 1bd27a4..b503b96 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -155,7 +155,6 @@
 #define HID_STD_FONT
SW_HID_STD_FONT
 #define HID_COND_COLL   
SW_HID_COND_COLL
 #define HID_FRM_ADD 
SW_HID_FRM_ADD
-#define HID_OPTTABLE_PAGE   
SW_HID_OPTTABLE_PAGE
 
 #define HID_FLD_DB  SW_HID_FLD_DB
 #define HID_FLD_DOKINF  
SW_HID_FLD_DOKINF
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index bd6a6e5..41f5327 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1225,18 +1225,6 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet 
rSet)
 {
 pRepeatHeaderCB-Hide();
 pDontSplitCB-Hide();
-
-long nMoveUpBy =
-pRepeatHeaderCB-LogicToPixel( Size( 13, 13 ), MAP_APPFONT ).Height();
-
-Point aPos = pRepeatHeaderCB-GetPosPixel();
-pRepeatHeaderCB-SetPosPixel( Point( aPos.X(), aPos.Y() - nMoveUpBy ) 
);
-
-nMoveUpBy +=
-pDontSplitCB-LogicToPixel( Size( 13, 13 ), MAP_APPFONT ).Height();
-
-aPos = pBorderCB-GetPosPixel();
-pBorderCB-SetPosPixel( Point( aPos.X(), aPos.Y() - nMoveUpBy ) );
 }
 
 SwInsertTableOptions aInsOpts = pModOpt-GetInsTblFlags(bHTMLMode);
@@ -1326,7 +1314,6 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( 
Window* pParent,
 m_pCharHiddenCB-Hide();
 m_pFldHiddenCB-Hide();
 m_pFldHiddenParaCB-Hide();
-m_pBreakCB-SetPosPixel(m_pTabCB-GetPosPixel());
 
 m_pDirectCursorFrame-Hide();
 m_pOnOffCB-Hide();
diff --git a/sw/uiconfig/swriter/ui/opttablepage.ui 
b/sw/uiconfig/swriter/ui/opttablepage.ui
index 40ada4c..de5db4a 100644
--- a/sw/uiconfig/swriter/ui/opttablepage.ui
+++ b/sw/uiconfig/swriter/ui/opttablepage.ui
@@ -10,6 +10,7 @@
   object class=GtkBox id=OptTablePage
 property name=visibleTrue/property
 property name=can_focusFalse/property
+property name=border_width6/property
 property name=orientationvertical/property
 property name=spacing12/property
 child
@@ -17,14 +18,12 @@
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=hexpandTrue/property
-property name=vexpandTrue/property
 property name=spacing12/property
 child
   object class=GtkFrame id=frame1
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=hexpandTrue/property
-property name=vexpandTrue/property
 property name=label_xalign0/property
 property name=shadow_typenone/property
 child
@@ -32,7 +31,6 @@
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=hexpandTrue/property
-property name=vexpandTrue/property
 property name=top_padding6/property
 property name=left_padding12/property
 child
@@ -137,7 +135,6 @@
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=hexpandTrue/property
-property name=vexpandTrue/property
 property name=label_xalign0/property
 property name=shadow_typenone/property
 child
@@ -145,7 +142,6 @@
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=hexpandTrue/property
-property name=vexpandTrue/property
 property name=top_padding6/property
 property name=left_padding12/property
 child
@@ -258,182 +254,11 @@
 property name=row_spacing12/property
 property name=column_spacing12/property
 child
-  object class=GtkGrid id=grid4
-property name=visibleTrue/property
-property name=can_focusFalse/property
-property name=row_spacing6/property
-property name=column_spacing12/property
-property 

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

2013-07-09 Thread Csikós Tamás
 sw/UIConfig_swriter.mk   |1 
 sw/inc/globals.hrc   |4 
 sw/source/ui/config/optdlg.hrc   |   25 --
 sw/source/ui/config/optdlg.src   |  178 --
 sw/source/ui/config/optpage.cxx  |  277 ++
 sw/source/ui/inc/optpage.hxx |   42 +--
 sw/uiconfig/swriter/ui/optfonttabpage.ui |  381 +++
 7 files changed, 540 insertions(+), 368 deletions(-)

New commits:
commit 5c7570be6c987f4a406b7320599bc81197d68885
Author: Csikós Tamás csks.t...@gmail.com
Date:   Mon Jul 8 14:31:53 2013 +0200

.ui layout for optpage/fonttabpage

Change-Id: Ib41ac1b5febbb288f7a05f3823dee6ff32feb315
Reviewed-on: https://gerrit.libreoffice.org/4771
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 58abfe1..f09c26b 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -101,6 +101,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/numparapage \
sw/uiconfig/swriter/ui/numberingnamedialog \
sw/uiconfig/swriter/ui/optcomparison \
+   sw/uiconfig/swriter/ui/optfonttabpage \
sw/uiconfig/swriter/ui/optformataidspage \
sw/uiconfig/swriter/ui/optgeneralpage \
sw/uiconfig/swriter/ui/opttablepage \
diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
index 60cb591..152b894d3 100644
--- a/sw/inc/globals.hrc
+++ b/sw/inc/globals.hrc
@@ -35,6 +35,10 @@
 #define STR_PAGE(RC_GLOBALS_BEGIN + 14)
 #define STR_PRINTOPTUI  (RC_GLOBALS_BEGIN + 15)
 
+#define ST_SCRIPT_WESTERN   (RC_GLOBALS_BEGIN + 105)
+#define ST_SCRIPT_ASIAN (RC_GLOBALS_BEGIN + 106)
+#define ST_SCRIPT_CTL   (RC_GLOBALS_BEGIN + 107)
+
 //EventStrings
 
 #define STR_EVENT_OBJECT_SELECT  ( RC_GLOBALS_BEGIN + 17 )
diff --git a/sw/source/ui/config/optdlg.hrc b/sw/source/ui/config/optdlg.hrc
index 4dd3868..cd5f366 100644
--- a/sw/source/ui/config/optdlg.hrc
+++ b/sw/source/ui/config/optdlg.hrc
@@ -48,29 +48,4 @@
 #define RB_END 82
 #define RB_PAGEEND 83
 
-// Tabpage Basic Fonts
-#define FT_STANDARD 90
-#define LB_STANDARD 91
-#define FT_TITLE92
-#define LB_TITLE93
-#define FT_LIST 94
-#define LB_LIST 95
-#define FT_LABEL96
-#define LB_LABEL97
-#define FT_IDX  98
-#define LB_IDX  99
-#define FL_STDCHR  100
-#define PB_STANDARD101
-#define CB_DOCONLY 102
-#define ST_SCRIPT_WESTERN  103
-#define ST_SCRIPT_ASIAN104
-#define ST_SCRIPT_CTL  105
-#define FT_TYPE106
-#define FT_SIZE107
-#define LB_STANDARD_SIZE   108
-#define LB_TITLE_SIZE  109
-#define LB_LIST_SIZE   110
-#define LB_LABEL_SIZE  111
-#define LB_INDEX_SIZE  112
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src
index 93b6033..748560a 100644
--- a/sw/source/ui/config/optdlg.src
+++ b/sw/source/ui/config/optdlg.src
@@ -24,175 +24,17 @@
 #include optdlg.hrc
 #include helpid.h
 
-TabPage TP_STD_FONT
+String ST_SCRIPT_ASIAN
 {
-HelpID = HID_STD_FONT ;
-Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
-Hide = TRUE ;
-FixedLine FL_STDCHR
-{
-Pos = MAP_APPFONT ( 6 , 3 ) ;
-Size = MAP_APPFONT ( 248 , 8 ) ;
-Text [ en-US ] = Basic fonts (%1);
-};
-FixedText FT_TYPE
-{
-Pos = MAP_APPFONT ( 63 , 14 ) ;
-Size = MAP_APPFONT ( 100 , 8 ) ;
-Text [ en-US ] = Font;
-};
-FixedText FT_SIZE
-{
-Pos = MAP_APPFONT ( 204 , 14 ) ;
-Size = MAP_APPFONT ( 40 , 8 ) ;
-Text [ en-US ] = Size;
-};
-MetricBox LB_STANDARD_SIZE
-{
-HelpID = sw:MetricBox:TP_STD_FONT:LB_STANDARD_SIZE;
-Pos = MAP_APPFONT ( 204 , 25 ) ;
-Size = MAP_APPFONT ( 30 , 60 ) ;
-Border = TRUE ;
-DropDown = TRUE;
-};
-MetricBox LB_TITLE_SIZE
-{
-HelpID = sw:MetricBox:TP_STD_FONT:LB_TITLE_SIZE;
-Pos = MAP_APPFONT ( 204 , 42 ) ;
-Size = MAP_APPFONT ( 30 , 60 ) ;
-Border = TRUE ;
-DropDown = TRUE;
-};
-MetricBox LB_LIST_SIZE
-{
-HelpID = sw:MetricBox:TP_STD_FONT:LB_LIST_SIZE;
-Pos = MAP_APPFONT ( 204 , 59 ) ;
-Size = MAP_APPFONT ( 30 , 60 ) ;
-Border = TRUE ;
-DropDown = TRUE;
-};
-MetricBox LB_LABEL_SIZE
-{
-HelpID = 

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

2013-07-09 Thread Caolán McNamara
 sw/inc/helpid.h  |1 -
 sw/source/ui/config/optpage.cxx  |5 +
 sw/uiconfig/swriter/ui/optfonttabpage.ui |   21 +++--
 3 files changed, 20 insertions(+), 7 deletions(-)

New commits:
commit 06292e619370f9e54e859f051a743b6bacb2a2cd
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Jul 9 10:04:28 2013 +0100

set font boxes to be sorted

Change-Id: Iebd6ce2c210ccc56a72d6a59171015b9729e9b73

diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index b503b96..ad7704f 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -152,7 +152,6 @@
 #define HID_ENV_ENV 
SW_HID_ENV_ENV
 #define HID_ENV_FMT 
SW_HID_ENV_FMT
 #define HID_FRM_URL 
SW_HID_FRM_URL
-#define HID_STD_FONT
SW_HID_STD_FONT
 #define HID_COND_COLL   
SW_HID_COND_COLL
 #define HID_FRM_ADD 
SW_HID_FRM_ADD
 
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 7ae6cf3..c1782d4 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -536,14 +536,19 @@ SwStdFontTabPage::SwStdFontTabPage( Window* pParent,
 {
 get(pLabelFT,label1);
 get(pStandardBox,standardbox);
+pStandardBox-SetStyle(pStandardBox-GetStyle() |  WB_SORT);
 get(pStandardHeightLB,standardheight);
 get(pTitleBox,titlebox);
+pTitleBox-SetStyle(pTitleBox-GetStyle() |  WB_SORT);
 get(pTitleHeightLB,titleheight);
 get(pListBox,listbox);
+pListBox-SetStyle(pListBox-GetStyle() |  WB_SORT);
 get(pListHeightLB,listheight);
 get(pLabelBox,labelbox);
+pLabelBox-SetStyle(pLabelBox-GetStyle() |  WB_SORT);
 get(pLabelHeightLB,labelheight);
 get(pIdxBox,idxbox);
+pIdxBox-SetStyle(pIdxBox-GetStyle() |  WB_SORT);
 get(pIndexHeightLB,indexheight);
 
 get(pDocOnlyCB,doconly);
diff --git a/sw/uiconfig/swriter/ui/optfonttabpage.ui 
b/sw/uiconfig/swriter/ui/optfonttabpage.ui
index 6155efc..bd9e4cb 100644
--- a/sw/uiconfig/swriter/ui/optfonttabpage.ui
+++ b/sw/uiconfig/swriter/ui/optfonttabpage.ui
@@ -1,9 +1,13 @@
 ?xml version=1.0 encoding=UTF-8?
 interface
   !-- interface-requires gtk+ 3.0 --
+  !-- interface-requires LibreOffice 1.0 --
   object class=GtkBox id=OptFontTabPage
 property name=visibleTrue/property
 property name=can_focusFalse/property
+property name=hexpandTrue/property
+property name=vexpandTrue/property
+property name=border_width6/property
 property name=orientationvertical/property
 property name=spacing12/property
 child
@@ -93,6 +97,7 @@
   object class=GtkLabel id=font_label
 property name=visibleTrue/property
 property name=can_focusFalse/property
+property name=hexpandTrue/property
 property name=xalign0/property
 property name=label translatable=yesFont/property
   /object
@@ -206,7 +211,6 @@
 property name=can_focusTrue/property
 property name=receives_defaultFalse/property
 property name=margin_left12/property
-property name=hexpandTrue/property
 property name=use_underlineTrue/property
 property name=xalign0/property
 property name=draw_indicatorTrue/property
@@ -222,13 +226,14 @@
   object class=GtkComboBoxText id=standardbox
 property name=visibleTrue/property
 property name=can_focusFalse/property
+property name=hexpandTrue/property
 property name=has_entryTrue/property
 property name=entry_text_column0/property
 property name=id_column1/property
 child internal-child=entry
   object class=GtkEntry id=standardbox-entry
 property name=can_focusFalse/property
-property name=invisible_char���/property
+property name=invisible_char�/property
   /object
 /child
   /object
@@ -243,13 +248,14 @@
   object class=GtkComboBoxText id=titlebox
 property name=visibleTrue/property
 property name=can_focusFalse/property
+property name=hexpandTrue/property
 property name=has_entryTrue/property
 property name=entry_text_column0/property
 property name=id_column1/property
 child internal-child=entry
   object class=GtkEntry id=titlebox-entry
 

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

2013-06-06 Thread Caolán McNamara
 sw/UIConfig_swriter.mk |1 
 sw/inc/helpid.h|1 
 sw/inc/index.hrc   |1 
 sw/source/ui/index/cnttab.cxx  |  142 ++
 sw/source/ui/index/cnttab.hrc  |   15 -
 sw/source/ui/index/cnttab.src  |   80 
 sw/uiconfig/swriter/ui/createautomarkdialog.ui |  241 +
 7 files changed, 341 insertions(+), 140 deletions(-)

New commits:
commit 82ed0efee489b91037a41fc72b898582ea3e5ec4
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Jun 6 11:59:14 2013 +0100

convert concordence entry dialog to .ui format

Change-Id: I52f88e6be67c4473ccf1b999ac7cb346b1c4f9ee

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 618394b..89e6eac 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -73,6 +73,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/columnwidth \
sw/uiconfig/swriter/ui/converttexttable \
sw/uiconfig/swriter/ui/createauthorentry \
+   sw/uiconfig/swriter/ui/createautomarkdialog \
sw/uiconfig/swriter/ui/dropdownfielddialog \
sw/uiconfig/swriter/ui/endnotepage \
sw/uiconfig/swriter/ui/editcategories \
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 72dcb80..1ea0ffc 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -410,7 +410,6 @@
 #define HID_AUTH_FIELD_ISBN 
SW_HID_AUTH_FIELD_ISBN
 
 #define HID_INSERT_INDEX_ENTRY_LEVEL_LB 
SW_HID_INSERT_INDEX_ENTRY_LEVEL_LB
-#define HID_DLG_CREATE_AUTOMARK 
SW_HID_DLG_CREATE_AUTOMARK
 #define HID_BUSINESS_CARD_CONTENT   
SW_HID_BUSINESS_CARD_CONTENT
 #define HID_SAVE_LABEL_DLG  
SW_HID_SAVE_LABEL_DLG
 #define HID_BUSINESS_FMT_PAGE   
SW_HID_BUSINESS_FMT_PAGE
diff --git a/sw/inc/index.hrc b/sw/inc/index.hrc
index 6f3ec1e..99ec6e5 100644
--- a/sw/inc/index.hrc
+++ b/sw/inc/index.hrc
@@ -40,7 +40,6 @@
 
 #define  STR_FILE_NOT_FOUND (RC_INDEX_BEGIN + 18)
 #define  DLG_CHANGE_AUTH_ENTRY  (RC_INDEX_BEGIN + 19)
-#define  DLG_CREATE_AUTOMARK(RC_INDEX_BEGIN + 20)
 
 #endif  // _INDEX_HRC
 
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index bf7965e..c3fe967 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -140,6 +140,7 @@ struct AutoMarkEntry
 typedef boost::ptr_vectorAutoMarkEntry AutoMarkEntryArr;
 
 typedef ::svt::EditBrowseBox SwEntryBrowseBox_Base;
+
 class SwEntryBrowseBox : public SwEntryBrowseBox_Base
 {
 EditaCellEdit;
@@ -173,25 +174,25 @@ protected:
 virtual ::svt::CellController*  GetController(long nRow, sal_uInt16 nCol);
 virtual sal_BoolSaveModified();
 
+std::vectorlong   GetOptimalColWidths() const;
+
 public:
-SwEntryBrowseBox(Window* pParent, const ResId rId,
-   BrowserMode nMode = 0 );
+SwEntryBrowseBox(Window* pParent, VclBuilderContainer* pBuilder);
 voidReadEntries(SvStream rInStr);
 voidWriteEntries(SvStream rOutStr);
 
 sal_BoolIsModified()const;
 
 virtual String GetCellText( long nRow, sal_uInt16 nColumn ) const;
+virtual void Resize();
+virtual Size GetOptimalSize() const;
 };
 
 class SwAutoMarkDlg_Impl : public ModalDialog
 {
-OKButtonaOKPB;
-CancelButtonaCancelPB;
-HelpButton  aHelpPB;
+OKButton*   m_pOKPB;
 
-SwEntryBrowseBoxaEntriesBB;
-FixedLine   aEntriesFL;
+SwEntryBrowseBox*   m_pEntriesBB;
 
 String  sAutoMarkURL;
 const StringsAutoMarkType;
@@ -3879,9 +3880,8 @@ void SwTOXStylesTabPage::Modify()
 #define ITEM_WORDONLY   7
 
 
-SwEntryBrowseBox::SwEntryBrowseBox(Window* pParent, const ResId rId,
-   BrowserMode nMode ) :
-SwEntryBrowseBox_Base( pParent, rId, nMode,
+SwEntryBrowseBox::SwEntryBrowseBox(Window* pParent, VclBuilderContainer* 
pBuilder)
+: SwEntryBrowseBox_Base( pParent, EBBF_NONE, WB_TABSTOP | WB_BORDER,
BROWSER_KEEPSELECTION |
BROWSER_COLUMNSELECTION |
BROWSER_MULTISELECTION |
@@ -3889,22 +3889,21 @@ SwEntryBrowseBox::SwEntryBrowseBox(Window* pParent, 
const ResId rId,
BROWSER_HLINESFULL |
BROWSER_VLINESFULL |
BROWSER_AUTO_VSCROLL|
-   BROWSER_HIDECURSOR   ),
-aCellEdit(GetDataWindow(), 0),
-aCellCheckBox(GetDataWindow()),
-
-sSearch(ResId(ST_SEARCH, *rId.GetResMgr() )),
-

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

2013-05-31 Thread Faisal M . Al-Otaibi
 sw/UIConfig_swriter.mk  |1 
 sw/inc/helpid.h |1 
 sw/source/ui/config/optdlg.hrc  |   29 -
 sw/source/ui/config/optdlg.src  |  170 -
 sw/source/ui/config/optpage.cxx |  169 -
 sw/source/ui/inc/optpage.hxx|   49 +-
 sw/uiconfig/swriter/ui/optformataidspage.ui |  516 
 7 files changed, 620 insertions(+), 315 deletions(-)

New commits:
commit 201604d7cf3cbe497c246154950fbda7b4d4dd49
Author: Faisal M. Al-Otaibi fmalota...@kacst.edu.sa
Date:   Fri May 31 18:53:57 2013 +0200

convert writer formatting aids page to .ui

Change-Id: Ia5ca3f74ebfea2a927fe8845f1a8237a96e32df7

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index a01d738..daf19a7 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -95,6 +95,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/numparapage \
sw/uiconfig/swriter/ui/numberingnamedialog \
sw/uiconfig/swriter/ui/optcomparison \
+   sw/uiconfig/swriter/ui/optformataidspage \
sw/uiconfig/swriter/ui/opttestpage \
sw/uiconfig/swriter/ui/outlinenumbering \
sw/uiconfig/swriter/ui/outlinenumberingpage \
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index e2c2be3..72dcb80 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -164,7 +164,6 @@
 #define HID_FLD_DOK 
SW_HID_FLD_DOK
 #define HID_FLD_FUNC
SW_HID_FLD_FUNC
 #define HID_FLD_REF 
SW_HID_FLD_REF
-#define HID_OPTSHDWCRSR 
SW_HID_OPTSHDWCRSR
 
 #define HID_REDLINE_OPT 
SW_HID_REDLINE_OPT
 #define HID_EDIT_FLD_DB 
SW_HID_EDIT_FLD_DB
diff --git a/sw/source/ui/config/optdlg.hrc b/sw/source/ui/config/optdlg.hrc
index 160b8f1..ffe8233 100644
--- a/sw/source/ui/config/optdlg.hrc
+++ b/sw/source/ui/config/optdlg.hrc
@@ -17,20 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-/* TabPage View */
-#define FL_NOPRINT  2
-
-#define CB_PARA 5
-#define CB_TAB  6
-#define CB_SPACE7
-#define CB_HSPACE   8
-#define CB_SHYPH9
-#define CB_FLD_HIDDEN   10
-#define CB_BREAK11
-
-//test tab page
-
-#define CB_FLD_HIDDEN_PARA 36  // right in the middle of it, so that HelpIds 
stay compatible to FPII
 #define CB_SMOOTH_SCROLL 37
 
 #define BT_OK   38
@@ -43,7 +29,6 @@
 #define BT_EDIT 55
 #define BT_NEW  56
 #define BT_DELETE   57
-#define CB_CHAR_HIDDEN  61
 // Print-Extra-Page
 #define CB_PGRF61
 #define CB_LEFTP   64
@@ -121,18 +106,4 @@
 #define FL_TABLE_SEPARATOR  139
 #define CB_PROSPECT_RTL140
 
-#define FL_SHDWCRSFLAG 1
-#define CB_SHDWCRSONOFF2
-#define FT_SHDWCRSFILLMODE 4
-#define RB_SHDWCRSFILLMARGIN   5
-#define RB_SHDWCRSFILLINDENT   6
-#define RB_SHDWCRSFILLTAB  7
-#define RB_SHDWCRSFILLSPACE8
-#define CB_ALLOW_IN_PROT  12
-#define FL_CRSR_OPT   13
-#define FL_SEPARATOR_SHDW 14
-#define FL_LAYOUT_OPTIONS 15
-#define CB_MATH_BASELINE_ALIGNMENT16
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src
index b411db0..4635874 100644
--- a/sw/source/ui/config/optdlg.src
+++ b/sw/source/ui/config/optdlg.src
@@ -433,176 +433,6 @@ TabPage TP_OPTTABLE_PAGE
 Text [ en-US ] = Changes affect the table size;
 };
 };
-/**/
-/**/
-/*  TabPage ShadowCursor  */
-/**/
-/**/
-TabPage TP_OPTSHDWCRSR
-{
-HelpID = HID_OPTSHDWCRSR ;
-SVLook = TRUE ;
-Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
-Hide = TRUE ;
- //_
-FixedLine FL_NOPRINT
-{
-Pos = MAP_APPFONT ( 6 , 3 ) ;
-Size = MAP_APPFONT ( 118 , 8 ) ;
-Group = TRUE ;
-Text [ en-US ] = Display of;
-};
-CheckBox CB_PARA
-{
-HelpID = sw:CheckBox:TP_OPTSHDWCRSR:CB_PARA;
-Pos = MAP_APPFONT ( 12 , 14 ) ;
-Size = MAP_APPFONT ( 108 , 10 ) ;
-Text [ en-US ] = Pa~ragraph end ;
-TabStop = TRUE ;
-Group = TRUE ;
-};
-CheckBox CB_SHYPH
-{
-HelpID = sw:CheckBox:TP_OPTSHDWCRSR:CB_SHYPH;
-

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

2013-04-11 Thread Caolán McNamara
 sw/inc/helpid.h   |1 
 sw/source/ui/config/optpage.cxx   |   12 --
 sw/uiconfig/swriter/ui/viewoptionspage.ui |  174 +++---
 3 files changed, 92 insertions(+), 95 deletions(-)

New commits:
commit 9dadd9288d51e092f4b4567b6135ecde1436cce7
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Apr 11 12:47:40 2013 +0100

Restore original mnemonics for view page

And remove the remaining SetPosPixel calls of layout controlled elements, 
they
are now unnecessary and get overridden by the layout anyway. Including the 
ones
left over from the printer options conversion.

Tweak things for 6/12 spacings.

Change-Id: Ifb460fb966452c10a9ac08c6f8cd57b96a2166f0

diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 66574aa..1340e25 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -158,7 +158,6 @@
 #define HID_ENV_ENV 
SW_HID_ENV_ENV
 #define HID_ENV_FMT 
SW_HID_ENV_FMT
 #define HID_FRM_URL 
SW_HID_FRM_URL
-#define HID_CONTENT_OPT 
SW_HID_CONTENT_OPT
 #define HID_STD_FONT
SW_HID_STD_FONT
 #define HID_COND_COLL   
SW_HID_COND_COLL
 #define HID_FRM_ADD 
SW_HID_FRM_ADD
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 82ef3251..055150e 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -111,13 +111,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
 }
 
 SvtCJKOptions aCJKOptions;
-if(aCJKOptions.IsVerticalTextEnabled() )
-{
-Point aSmoothPos(m_pSmoothCBox-GetPosPixel());
-aSmoothPos.Y() += aSmoothPos.Y() - m_pVRulerCBox-GetPosPixel().Y();
-m_pSmoothCBox-SetPosPixel(aSmoothPos);
-}
-else
+if(!aCJKOptions.IsVerticalTextEnabled() )
 m_pVRulerRightCBox-Hide();
 m_pVRulerCBox-SetClickHdl(LINK(this, SwContentOptPage, VertRulerHdl ));
 m_pAnyRulerCB-SetClickHdl(LINK(this, SwContentOptPage, AnyRulerHdl));
@@ -351,10 +345,6 @@ SwAddPrinterTabPage::SwAddPrinterTabPage(Window* pParent,
 m_pRightPageCB-Hide();
 m_pPrintHiddenTextCB-Hide();
 m_pPrintTextPlaceholderCB-Hide();
-m_pProspectCB-SetPosPixel(m_pLeftPageCB-GetPosPixel());
-Point aPt( m_pRightPageCB-GetPosPixel() );
-aPt.setX(aPt.getX() + 15); // indent
-m_pProspectCB_RTL-SetPosPixel(aPt);
 
 // hide m_pPrintEmptyPagesCB
 m_pPrintEmptyPagesCB-Hide();
diff --git a/sw/uiconfig/swriter/ui/viewoptionspage.ui 
b/sw/uiconfig/swriter/ui/viewoptionspage.ui
index 2283271..6b11ae2 100644
--- a/sw/uiconfig/swriter/ui/viewoptionspage.ui
+++ b/sw/uiconfig/swriter/ui/viewoptionspage.ui
@@ -12,13 +12,14 @@
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=row_spacing6/property
-property name=column_spacing6/property
+property name=column_spacing12/property
 property name=column_homogeneousTrue/property
 child
   object class=GtkBox id=box1
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=orientationvertical/property
+property name=spacing12/property
 child
   object class=GtkFrame id=guidesframe
 property name=visibleTrue/property
@@ -37,10 +38,11 @@
 property name=can_focusFalse/property
 child
   object class=GtkCheckButton id=helplines
-property name=label 
translatable=yesHelplines While Moving/property
+property name=label 
translatable=yesHelplines _While Moving/property
 property name=visibleTrue/property
 property name=can_focusTrue/property
 property name=receives_defaultFalse/property
+property name=use_underlineTrue/property
 property name=xalign0/property
 property name=draw_indicatorTrue/property
   /object
@@ -88,12 +90,14 @@
   object class=GtkGrid id=grid3
 property name=visibleTrue/property
 property name=can_focusFalse/property
+property name=row_spacing6/property
 child
   object class=GtkCheckButton id=graphics
-property name=label translatable=yesGraphics 
and objects/property
+property name=label 
translatable=yes_Graphics and