[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx svx/source

2023-03-10 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/cuicharmap.cxx|2 ++
 cui/uiconfig/ui/specialcharacters.ui |4 +++-
 include/svx/searchcharmap.hxx|1 +
 svx/source/dialog/searchcharmap.cxx  |   11 ---
 4 files changed, 14 insertions(+), 4 deletions(-)

New commits:
commit e6230bbfc9526af65e6618390593c3a3c90743d0
Author: Caolán McNamara 
AuthorDate: Fri Mar 10 11:13:17 2023 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 10 15:18:34 2023 +

Resolves: tdf#154087 update scrollbar range when search criteria change

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

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index 457b5238ccdd..c6994000e36d 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -885,6 +885,8 @@ IMPL_LINK_NOARG(SvxCharacterMap, SearchUpdateHdl, 
weld::Entry&, void)
 if(!sName.isEmpty() && 
sName.toAsciiLowerCase().indexOf(aKeyword.toAsciiLowerCase()) >= 0)
 m_xSearchSet->AppendCharToList(sChar);
 }
+
+m_xSearchSet->UpdateScrollRange();
 }
 else
 {
diff --git a/cui/uiconfig/ui/specialcharacters.ui 
b/cui/uiconfig/ui/specialcharacters.ui
index b8a7261f20af..a397c2e5762d 100644
--- a/cui/uiconfig/ui/specialcharacters.ui
+++ b/cui/uiconfig/ui/specialcharacters.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -855,6 +855,8 @@
 True
 True
 True
+never
+always
 in
 
   
diff --git a/include/svx/searchcharmap.hxx b/include/svx/searchcharmap.hxx
index 7ebc8ce5ab2c..d05f3ea82728 100644
--- a/include/svx/searchcharmap.hxx
+++ b/include/svx/searchcharmap.hxx
@@ -50,6 +50,7 @@ public:
 virtual voidSelectIndex( int index, bool bFocus = 
false ) override;
 voidAppendCharToList(sal_UCS4 cChar);
 voidClearPreviousData();
+voidUpdateScrollRange();
 
 virtual sal_Int32   getMaxCharCount() const override;
 
diff --git a/svx/source/dialog/searchcharmap.cxx 
b/svx/source/dialog/searchcharmap.cxx
index e15ec15da2c7..c5ae90dbf052 100644
--- a/svx/source/dialog/searchcharmap.cxx
+++ b/svx/source/dialog/searchcharmap.cxx
@@ -329,9 +329,7 @@ void SvxSearchCharSet::RecalculateFont(vcl::RenderContext& 
rRenderContext)
 nX = aSize.Width() / COLUMN_COUNT;
 nY = aSize.Height() / ROW_COUNT;
 
-//scrollbar settings -- error
-int nLastRow = (getMaxCharCount() - 1 + COLUMN_COUNT) / COLUMN_COUNT;
-mxScrollArea->vadjustment_configure(mxScrollArea->vadjustment_get_value(), 
0, nLastRow, 1, ROW_COUNT - 1, ROW_COUNT);
+UpdateScrollRange();
 
 // rearrange CharSet element in sync with nX- and nY-multiples
 Size aDrawSize(nX * COLUMN_COUNT, nY * ROW_COUNT);
@@ -341,6 +339,13 @@ void SvxSearchCharSet::RecalculateFont(vcl::RenderContext& 
rRenderContext)
 mbRecalculateFont = false;
 }
 
+void SvxSearchCharSet::UpdateScrollRange()
+{
+//scrollbar settings
+int nLastRow = (getMaxCharCount() - 1 + COLUMN_COUNT) / COLUMN_COUNT;
+mxScrollArea->vadjustment_configure(mxScrollArea->vadjustment_get_value(), 
0, nLastRow, 1, ROW_COUNT - 1, ROW_COUNT);
+}
+
 void SvxSearchCharSet::SelectIndex(int nNewIndex, bool bFocus)
 {
 if (!mxFontCharMap.is())


[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx svx/source

2019-07-30 Thread Caolán McNamara (via logerrit)
 cui/source/options/optgdlg.cxx  |  347 +++-
 cui/source/options/optgdlg.hxx  |   45 ++--
 cui/uiconfig/ui/optlanguagespage.ui |   84 
 include/svx/langbox.hxx |6 
 svx/source/dialog/langbox.cxx   |   19 +
 5 files changed, 269 insertions(+), 232 deletions(-)

New commits:
commit 08101a1ab3b5d7c41488e93a2af518462286844f
Author: Caolán McNamara 
AuthorDate: Tue Jul 30 11:41:12 2019 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 30 14:04:17 2019 +0200

weld OfaLanguagesTabPage

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

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 32802f75a3ed..63ad892a2d27 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -302,7 +302,6 @@ OfaMiscTabPage::OfaMiscTabPage(TabPageParent pParent, const 
SfxItemSet& rSet)
 
 OfaMiscTabPage::~OfaMiscTabPage()
 {
-disposeOnce();
 }
 
 VclPtr OfaMiscTabPage::Create( TabPageParent pParent, const 
SfxItemSet* rAttrSet )
@@ -737,7 +736,7 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 case 2: eSet = SFX_SYMBOLS_SIZE_LARGE; break;
 case 3: eSet = SFX_SYMBOLS_SIZE_32; break;
 default:
-OSL_FAIL( "OfaViewTabPage::FillItemSet(): This state of 
m_pIconSizeLB should not be possible!" );
+OSL_FAIL( "OfaViewTabPage::FillItemSet(): This state of 
m_xIconSizeLB should not be possible!" );
 }
 aMiscOptions.SetSymbolsSize( eSet );
 }
@@ -753,7 +752,7 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 case 1: eSet = ToolBoxButtonSize::Small; break;
 case 2: eSet = ToolBoxButtonSize::Large; break;
 default:
-OSL_FAIL( "OfaViewTabPage::FillItemSet(): This state of 
m_pSidebarIconSizeLB should not be possible!" );
+OSL_FAIL( "OfaViewTabPage::FillItemSet(): This state of 
m_xSidebarIconSizeLB should not be possible!" );
 }
 aMiscOptions.SetSidebarIconSize( eSet );
 }
@@ -1098,34 +1097,29 @@ namespace
 }
 }
 
-OfaLanguagesTabPage::OfaLanguagesTabPage(vcl::Window* pParent, const 
SfxItemSet& rSet)
-: SfxTabPage(pParent,"OptLanguagesPage","cui/ui/optlanguagespage.ui", 
)
+OfaLanguagesTabPage::OfaLanguagesTabPage(TabPageParent pParent, const 
SfxItemSet& rSet)
+: SfxTabPage(pParent, "cui/ui/optlanguagespage.ui", "OptLanguagesPage", 
)
 , pLangConfig(new LanguageConfig_Impl)
 , m_bDatePatternsValid(false)
+, m_xUserInterfaceLB(m_xBuilder->weld_combo_box("userinterface"))
+, m_xLocaleSettingFT(m_xBuilder->weld_label("localesettingFT"))
+, m_xLocaleSettingLB(new 
LanguageBox(m_xBuilder->weld_combo_box("localesetting")))
+, m_xDecimalSeparatorCB(m_xBuilder->weld_check_button("decimalseparator"))
+, m_xCurrencyFT(m_xBuilder->weld_label("defaultcurrency"))
+, m_xCurrencyLB(m_xBuilder->weld_combo_box("currencylb"))
+, m_xDatePatternsFT(m_xBuilder->weld_label("dataaccpatterns"))
+, m_xDatePatternsED(m_xBuilder->weld_entry("datepatterns"))
+, m_xWesternLanguageLB(new 
LanguageBox(m_xBuilder->weld_combo_box("westernlanguage")))
+, m_xWesternLanguageFT(m_xBuilder->weld_label("western"))
+, m_xAsianLanguageLB(new 
LanguageBox(m_xBuilder->weld_combo_box("asianlanguage")))
+, m_xComplexLanguageLB(new 
LanguageBox(m_xBuilder->weld_combo_box("complexlanguage")))
+, m_xCurrentDocCB(m_xBuilder->weld_check_button("currentdoc"))
+, m_xAsianSupportCB(m_xBuilder->weld_check_button("asiansupport"))
+, m_xCTLSupportCB(m_xBuilder->weld_check_button("ctlsupport"))
+, 
m_xIgnoreLanguageChangeCB(m_xBuilder->weld_check_button("ignorelanguagechange"))
 {
-get(m_pUserInterfaceLB, "userinterface");
-m_pUserInterfaceLB->SetStyle(m_pUserInterfaceLB->GetStyle() | WB_SORT);
-get(m_pLocaleSettingLB, "localesetting");
-m_pLocaleSettingLB->SetStyle(m_pLocaleSettingLB->GetStyle() | WB_SORT);
-get(m_pLocaleSettingFT, "localesettingFT");
-get(m_pDecimalSeparatorCB, "decimalseparator");
-get(m_pCurrencyFT, "defaultcurrency");
-get(m_pCurrencyLB, "currencylb");
-m_pCurrencyLB->SetStyle(m_pCurrencyLB->GetStyle() | WB_SORT);
-get(m_pDatePatternsFT,"dataaccpatterns");
-get(m_pDatePatternsED, "datepatterns");
-
-get(m_pWesternLanguageLB, "westernlanguage");
-m_pWesternLanguageLB->SetStyle(m_pWesternLanguageLB->GetStyle() | WB_SORT);
-get(m_pWesternLanguageFT, "western");
-get(m_pAsianLanguageLB, "asianlanguage");
-m_pAsianLanguageLB->SetStyle(m_pAsianLanguageLB->GetStyle() | WB_SORT);
-get(m_pComplexLanguageLB, "complexlanguage");
-m_pComplexLanguageLB->SetStyle(m_pComplexLanguageLB->GetStyle() | WB_SORT);
-get(m_pCurrentDocCB, "currentdoc");
-

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx svx/source

2019-07-27 Thread Caolán McNamara (via logerrit)
 cui/source/options/opthtml.cxx |  197 ++---
 cui/source/options/opthtml.hxx |   38 +++
 cui/uiconfig/ui/opthtmlpage.ui |2 
 include/svx/txencbox.hxx   |   13 ++
 svx/source/dialog/txencbox.cxx |   21 +++-
 5 files changed, 131 insertions(+), 140 deletions(-)

New commits:
commit 2aff82411b905d55774057ed6e74b8cd45dc570b
Author: Caolán McNamara 
AuthorDate: Sat Jul 27 12:16:41 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sat Jul 27 15:48:39 2019 +0200

weld OfaHtmlTabPage

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

diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx
index 23a628c3231c..0cb16f175367 100644
--- a/cui/source/options/opthtml.cxx
+++ b/cui/source/options/opthtml.cxx
@@ -23,28 +23,26 @@
 #include 
 
 
-OfaHtmlTabPage::OfaHtmlTabPage(vcl::Window* pParent, const SfxItemSet& rSet) :
-SfxTabPage( pParent, "OptHtmlPage" , "cui/ui/opthtmlpage.ui",  )
+OfaHtmlTabPage::OfaHtmlTabPage(TabPageParent pParent, const SfxItemSet& rSet)
+: SfxTabPage(pParent, "cui/ui/opthtmlpage.ui", "OptHtmlPage", )
+, m_xSize1NF(m_xBuilder->weld_spin_button("size1"))
+, m_xSize2NF(m_xBuilder->weld_spin_button("size2"))
+, m_xSize3NF(m_xBuilder->weld_spin_button("size3"))
+, m_xSize4NF(m_xBuilder->weld_spin_button("size4"))
+, m_xSize5NF(m_xBuilder->weld_spin_button("size5"))
+, m_xSize6NF(m_xBuilder->weld_spin_button("size6"))
+, m_xSize7NF(m_xBuilder->weld_spin_button("size7"))
+, m_xNumbersEnglishUSCB(m_xBuilder->weld_check_button("numbersenglishus"))
+, m_xUnknownTagCB(m_xBuilder->weld_check_button("unknowntag"))
+, m_xIgnoreFontNamesCB(m_xBuilder->weld_check_button("ignorefontnames"))
+, m_xStarBasicCB(m_xBuilder->weld_check_button("starbasic"))
+, m_xStarBasicWarningCB(m_xBuilder->weld_check_button("starbasicwarning"))
+, m_xPrintExtensionCB(m_xBuilder->weld_check_button("printextension"))
+, m_xSaveGrfLocalCB(m_xBuilder->weld_check_button("savegrflocal"))
+, m_xCharSetLB(new TextEncodingBox(m_xBuilder->weld_combo_box("charset")))
 {
-get(aSize1NF,"size1");
-get(aSize2NF,"size2");
-get(aSize3NF,"size3");
-get(aSize4NF,"size4");
-get(aSize5NF,"size5");
-get(aSize6NF,"size6");
-get(aSize7NF,"size7");
-get(aNumbersEnglishUSCB,"numbersenglishus");
-get(aUnknownTagCB,"unknowntag");
-get(aIgnoreFontNamesCB,"ignorefontnames");
-get(aStarBasicCB,"starbasic");
-get(aStarBasicWarningCB,"starbasicwarning");
-get(aPrintExtensionCB,"printextension");
-get(aSaveGrfLocalCB,"savegrflocal");
-get(aCharSetLB,"charset");
-aCharSetLB->SetStyle(aCharSetLB->GetStyle() | WB_SORT);
-
 // replace placeholder with UI string from language list
-OUString aText( aNumbersEnglishUSCB->GetText());
+OUString aText(m_xNumbersEnglishUSCB->get_label());
 OUString aPlaceholder("%ENGLISHUSLOCALE");
 sal_Int32 nPos;
 if ((nPos = aText.indexOf( aPlaceholder)) != -1)
@@ -53,88 +51,67 @@ SfxTabPage( pParent, "OptHtmlPage" , 
"cui/ui/opthtmlpage.ui",  )
 if (!rStr.isEmpty())
 {
 aText = aText.replaceAt( nPos, aPlaceholder.getLength(), rStr);
-aNumbersEnglishUSCB->SetText( aText);
+m_xNumbersEnglishUSCB->set_label( aText);
 }
 }
 
-aStarBasicCB->SetClickHdl(LINK(this, OfaHtmlTabPage, CheckBoxHdl_Impl));
+m_xStarBasicCB->connect_toggled(LINK(this, OfaHtmlTabPage, 
CheckBoxHdl_Impl));
 
 // initialize the characterset listbox
-aCharSetLB->FillWithMimeAndSelectBest();
+m_xCharSetLB->FillWithMimeAndSelectBest();
 }
 
 OfaHtmlTabPage::~OfaHtmlTabPage()
 {
-disposeOnce();
-}
-
-void OfaHtmlTabPage::dispose()
-{
-aSize1NF.clear();
-aSize2NF.clear();
-aSize3NF.clear();
-aSize4NF.clear();
-aSize5NF.clear();
-aSize6NF.clear();
-aSize7NF.clear();
-aNumbersEnglishUSCB.clear();
-aUnknownTagCB.clear();
-aIgnoreFontNamesCB.clear();
-aStarBasicCB.clear();
-aStarBasicWarningCB.clear();
-aPrintExtensionCB.clear();
-aSaveGrfLocalCB.clear();
-aCharSetLB.clear();
-SfxTabPage::dispose();
 }
 
 VclPtr OfaHtmlTabPage::Create( TabPageParent pParent,
const SfxItemSet* rAttrSet )
 {
-return VclPtr::Create(pParent.pParent, *rAttrSet);
+return VclPtr::Create(pParent, *rAttrSet);
 }
 
 bool OfaHtmlTabPage::FillItemSet( SfxItemSet* )
 {
 SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
-if(aSize1NF->IsValueChangedFromSaved())
-rHtmlOpt.SetFontSize(0, static_cast(aSize1NF->GetValue()));
-if(aSize2NF->IsValueChangedFromSaved())
-rHtmlOpt.SetFontSize(1, static_cast(aSize2NF->GetValue()));
-if(aSize3NF->IsValueChangedFromSaved())
-rHtmlOpt.SetFontSize(2, 

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx svx/source

2019-03-26 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/cuiimapwnd.cxx |   49 +++---
 cui/source/factory/dlgfact.cxx|   23 ++---
 cui/source/factory/dlgfact.hxx|   11 ++--
 cui/source/inc/cuiimapwnd.hxx |   38 -
 cui/uiconfig/ui/cuiimapdlg.ui |   34 +-
 include/svx/svxdlg.hxx|2 -
 svx/source/dialog/imapwnd.cxx |4 +--
 7 files changed, 83 insertions(+), 78 deletions(-)

New commits:
commit 621538e4cb6b4e05e38af54d70d08b12ab85d290
Author: Caolán McNamara 
AuthorDate: Mon Mar 25 21:42:04 2019 +
Commit: Caolán McNamara 
CommitDate: Tue Mar 26 10:05:48 2019 +0100

weld URLDlg

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

diff --git a/cui/source/dialogs/cuiimapwnd.cxx 
b/cui/source/dialogs/cuiimapwnd.cxx
index 5fbc6e428f95..516b35c7e55c 100644
--- a/cui/source/dialogs/cuiimapwnd.cxx
+++ b/cui/source/dialogs/cuiimapwnd.cxx
@@ -45,44 +45,35 @@
 |*
 \/
 
-URLDlg::URLDlg( vcl::Window* pWindow, const OUString& rURL, const OUString& 
rAlternativeText, const OUString& rDescription, const OUString& rTarget, const 
OUString& rName, TargetList& rTargetList )
-: ModalDialog(pWindow, "IMapDialog", "cui/ui/cuiimapdlg.ui")
+URLDlg::URLDlg(weld::Window* pWindow, const OUString& rURL, const OUString& 
rAlternativeText,
+   const OUString& rDescription, const OUString& rTarget, const 
OUString& rName,
+   TargetList& rTargetList)
+: GenericDialogController(pWindow, "cui/ui/cuiimapdlg.ui", "IMapDialog")
+, m_xEdtURL(m_xBuilder->weld_entry("urlentry"))
+, m_xCbbTargets(m_xBuilder->weld_combo_box("frameCB"))
+, m_xEdtName(m_xBuilder->weld_entry("nameentry"))
+, m_xEdtAlternativeText(m_xBuilder->weld_entry("textentry"))
+, m_xEdtDescription(m_xBuilder->weld_text_view("descTV"))
 {
-get(m_pEdtURL, "urlentry");
-get(m_pCbbTargets, "frameCB");
-get(m_pEdtName, "nameentry");
-get(m_pEdtAlternativeText, "textentry");
-get(m_pEdtDescription, "descTV");
-m_pEdtDescription->set_height_request(m_pEdtDescription->GetTextHeight() * 
5);
-
m_pEdtDescription->set_width_request(m_pEdtDescription->approximate_char_width()
 * 60);
+
m_xEdtDescription->set_size_request(m_xEdtDescription->get_approximate_digit_width()
 * 51,
+m_xEdtDescription->get_height_rows(5));
 
-m_pEdtURL->SetText( rURL );
-m_pEdtAlternativeText->SetText( rAlternativeText );
-m_pEdtDescription->SetText( rDescription );
-m_pEdtName->SetText( rName );
+m_xEdtURL->set_text( rURL );
+m_xEdtAlternativeText->set_text( rAlternativeText );
+m_xEdtDescription->set_text( rDescription );
+m_xEdtName->set_text( rName );
 
-for(OUString & i : rTargetList)
-m_pCbbTargets->InsertEntry( i );
+for (const OUString& a : rTargetList)
+m_xCbbTargets->append_text(a);
 
-if( rTarget.isEmpty() )
-m_pCbbTargets->SetText( "_self");
+if (rTarget.isEmpty())
+m_xCbbTargets->set_entry_text("_self");
 else
-m_pCbbTargets->SetText( rTarget );
+m_xCbbTargets->set_entry_text(rTarget);
 }
 
 URLDlg::~URLDlg()
 {
-disposeOnce();
-}
-
-void URLDlg::dispose()
-{
-m_pEdtURL.clear();
-m_pCbbTargets.clear();
-m_pEdtName.clear();
-m_pEdtAlternativeText.clear();
-m_pEdtDescription.clear();
-ModalDialog::dispose();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 08fea16c4049..a862bea608ab 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -152,7 +152,10 @@ short AbstractGalleryIdDialog_Impl::Execute()
 return m_xDlg->run();
 }
 
-IMPL_ABSTDLG_BASE(AbstractURLDlg_Impl);
+short AbstractURLDlg_Impl::Execute()
+{
+return m_xDlg->run();
+}
 
 short AbstractSvxSearchSimilarityDialog_Impl::Execute()
 {
@@ -537,27 +540,27 @@ sal_uInt32 AbstractGalleryIdDialog_Impl::GetId() const
 
 OUString AbstractURLDlg_Impl::GetURL() const
 {
-return pDlg->GetURL();
+return m_xDlg->GetURL();
 }
 
 OUString AbstractURLDlg_Impl::GetAltText() const
 {
-return pDlg->GetAltText();
+return m_xDlg->GetAltText();
 }
 
 OUString AbstractURLDlg_Impl::GetDesc() const
 {
-return pDlg->GetDesc();
+return m_xDlg->GetDesc();
 }
 
 OUString AbstractURLDlg_Impl::GetTarget() const
 {
-return pDlg->GetTarget();
+return m_xDlg->GetTarget();
 }
 
 OUString AbstractURLDlg_Impl::GetName() const
 {
-return pDlg->GetName();
+return m_xDlg->GetName();
 }
 
 sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetOther()
@@ -1098,14 +1101,14 @@ VclPtr 
AbstractDialogFactory_Impl::CreateGalleryThemeProperti

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx svx/source vcl/unx

2018-11-29 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuigaldlg.cxx |  204 +++
 cui/source/factory/dlgfact.cxx   |6 
 cui/source/factory/dlgfact.hxx   |2 
 cui/source/inc/cuigaldlg.hxx |   67 --
 cui/uiconfig/ui/galleryapplyprogress.ui  |8 -
 cui/uiconfig/ui/gallerysearchprogress.ui |8 -
 cui/uiconfig/ui/gallerythemedialog.ui|   24 +--
 include/svx/svxdlg.hxx   |2 
 svx/source/gallery2/galbrws1.cxx |2 
 vcl/unx/gtk3/gtk3gtkinst.cxx |   21 ++-
 10 files changed, 151 insertions(+), 193 deletions(-)

New commits:
commit 7d311ea864e7cfeb1c8f4ca417911db20d13361e
Author: Caolán McNamara 
AuthorDate: Wed Nov 28 19:56:26 2018 +
Commit: Caolán McNamara 
CommitDate: Thu Nov 29 11:59:56 2018 +0100

weld GalleryThemeProperties

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

diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index f2eeb836e15c..e9a12d98582a 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -63,13 +63,13 @@ using namespace ::com::sun::star::ui::dialogs;
 using namespace ::com::sun::star::uno;
 
 
-SearchThread::SearchThread( SearchProgress* pProgress,
-TPGalleryThemeProperties* pBrowser,
-const INetURLObject& rStartURL ) :
-Thread  ( "cuiSearchThread" ),
-mpProgress  ( pProgress ),
-mpBrowser   ( pBrowser ),
-maStartURL  ( rStartURL )
+SearchThread::SearchThread(SearchProgress* pProgress,
+   TPGalleryThemeProperties* pBrowser,
+   const INetURLObject& rStartURL)
+: Thread("cuiSearchThread")
+, mpProgress(pProgress)
+, mpBrowser(pBrowser)
+, maStartURL(rStartURL)
 {
 }
 
@@ -101,7 +101,7 @@ void SearchThread::execute()
 ImplSearch( maStartURL, aFormats, mpBrowser->bSearchRecursive );
 }
 
-Application::PostUserEvent( LINK( mpProgress, SearchProgress, CleanUpHdl 
), nullptr, true );
+Application::PostUserEvent(LINK(mpProgress, SearchProgress, CleanUpHdl));
 }
 
 
@@ -113,7 +113,6 @@ void SearchThread::ImplSearch( const INetURLObject& 
rStartURL,
 SolarMutexGuard aGuard;
 
 mpProgress->SetDirectory( rStartURL );
-mpProgress->Flush();
 }
 
 try
@@ -189,68 +188,43 @@ void SearchThread::ImplSearch( const INetURLObject& 
rStartURL,
 }
 }
 
-
-SearchProgress::SearchProgress( vcl::Window* pParent, const INetURLObject& 
rStartURL )
-: ModalDialog(pParent, "GallerySearchProgress", 
"cui/ui/gallerysearchprogress.ui")
-, parent_(pParent)
+SearchProgress::SearchProgress(weld::Window* pParent, 
TPGalleryThemeProperties* pTabPage, const INetURLObject& rStartURL)
+: GenericDialogController(pParent, "cui/ui/gallerysearchprogress.ui", 
"GallerySearchProgress")
 , startUrl_(rStartURL)
+, m_xTabPage(pTabPage)
+, m_xFtSearchDir(m_xBuilder->weld_label("dir"))
+, m_xFtSearchType(m_xBuilder->weld_label("file"))
+, m_xBtnCancel(m_xBuilder->weld_button("cancel"))
 {
-get(m_pFtSearchDir, "dir");
-get(m_pFtSearchType, "file");
-
m_pFtSearchType->set_width_request(m_pFtSearchType->get_preferred_size().Width());
-get(m_pBtnCancel, "cancel");
-m_pBtnCancel->SetClickHdl( LINK( this, SearchProgress, ClickCancelBtn ) );
+
m_xFtSearchType->set_size_request(m_xFtSearchType->get_preferred_size().Width(),
 -1);
+m_xBtnCancel->connect_clicked(LINK(this, SearchProgress, ClickCancelBtn));
 }
 
-
 SearchProgress::~SearchProgress()
 {
-disposeOnce();
-}
-
-
-void SearchProgress::dispose()
-{
-m_pFtSearchDir.clear();
-m_pFtSearchType.clear();
-m_pBtnCancel.clear();
-parent_.clear();
-ModalDialog::dispose();
 }
 
-
-IMPL_LINK_NOARG(SearchProgress, ClickCancelBtn, Button*, void)
+IMPL_LINK_NOARG(SearchProgress, ClickCancelBtn, weld::Button&, void)
 {
-if (maSearchThread.is())
-maSearchThread->terminate();
+if (m_aSearchThread.is())
+m_aSearchThread->terminate();
 }
 
-
 IMPL_LINK_NOARG(SearchProgress, CleanUpHdl, void*, void)
 {
-if (maSearchThread.is())
-maSearchThread->join();
+if (m_aSearchThread.is())
+m_aSearchThread->join();
 
-EndDialog( RET_OK );
+m_xDialog->response(RET_OK);
 
-disposeOnce();
+m_xDialog.reset();
 }
 
-short SearchProgress::Execute()
+void SearchProgress::LaunchThread()
 {
-OSL_FAIL( "SearchProgress cannot be executed via Dialog::Execute!\n"
-   "It creates a thread that will call back to VCL apartment => 
deadlock!\n"
-   "Use Dialog::StartExecuteModal to execute the dialog!" );
-return RET_CANCEL;
-}
-
-bool SearchProgress::StartExecuteAsync(VclAbstractDialog::AsyncContext )
-{
-assert(!maSearchThread.is());
-

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx svx/source

2018-10-10 Thread Libreoffice Gerrit user
 cui/source/dialogs/showcols.cxx  |   37 ++-
 cui/source/factory/dlgfact.cxx   |   15 ++-
 cui/source/factory/dlgfact.hxx   |   13 +++--
 cui/source/inc/showcols.hxx  |   19 --
 cui/uiconfig/ui/showcoldialog.ui |   52 +--
 include/svx/svxdlg.hxx   |2 -
 svx/source/fmcomp/fmgridcl.cxx   |2 -
 7 files changed, 86 insertions(+), 54 deletions(-)

New commits:
commit ddc44ac1773f00c90922216d7d3ba2cc0d230a7b
Author: Caolán McNamara 
AuthorDate: Wed Oct 10 17:21:56 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Oct 10 21:23:48 2018 +0200

weld FmShowColsDialog

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

diff --git a/cui/source/dialogs/showcols.cxx b/cui/source/dialogs/showcols.cxx
index 7c7f7af3a081..66ee00b34b9c 100644
--- a/cui/source/dialogs/showcols.cxx
+++ b/cui/source/dialogs/showcols.cxx
@@ -26,38 +26,30 @@
 #define CUIFM_PROP_HIDDEN "Hidden"
 #define CUIFM_PROP_LABEL  "Label"
 
-FmShowColsDialog::FmShowColsDialog(vcl::Window* pParent)
-: ModalDialog(pParent, "ShowColDialog", "cui/ui/showcoldialog.ui")
+FmShowColsDialog::FmShowColsDialog(weld::Window* pParent)
+: GenericDialogController(pParent, "cui/ui/showcoldialog.ui", 
"ShowColDialog")
+, m_xList(m_xBuilder->weld_tree_view("treeview"))
+, m_xOK(m_xBuilder->weld_button("ok"))
 {
-get(m_pOK, "ok");
-get(m_pList, "treeview");
-m_pList->set_height_request(m_pList->GetTextHeight() * 8);
-m_pList->set_width_request(m_pList->approximate_char_width() * 56);
-m_pList->EnableMultiSelection(true);
-m_pOK->SetClickHdl( LINK( this, FmShowColsDialog, OnClickedOk ) );
+m_xList->set_size_request(m_xList->get_approximate_digit_width() * 40, 
m_xList->get_height_rows(8));
+m_xList->set_selection_mode(true);
+m_xOK->connect_clicked(LINK(this, FmShowColsDialog, OnClickedOk));
 }
 
 FmShowColsDialog::~FmShowColsDialog()
 {
-disposeOnce();
 }
 
-void FmShowColsDialog::dispose()
-{
-m_pList.clear();
-m_pOK.clear();
-ModalDialog::dispose();
-}
-
-IMPL_LINK_NOARG(FmShowColsDialog, OnClickedOk, Button*, void)
+IMPL_LINK_NOARG(FmShowColsDialog, OnClickedOk, weld::Button&, void)
 {
 DBG_ASSERT(m_xColumns.is(), "FmShowColsDialog::OnClickedOk : you should 
call SetColumns before executing the dialog !");
 if (m_xColumns.is())
 {
 css::uno::Reference< css::beans::XPropertySet > xCol;
-for (sal_Int32 i=0; i < m_pList->GetSelectedEntryCount(); ++i)
+auto nSelectedRows = m_xList->get_selected_rows();
+for (auto i : nSelectedRows)
 {
-
m_xColumns->getByIndex(sal::static_int_cast(reinterpret_cast(m_pList->GetEntryData(m_pList->GetSelectedEntryPos(i)
 >>= xCol;
+m_xColumns->getByIndex(m_xList->get_id(i).toInt32()) >>= xCol;
 if (xCol.is())
 {
 try
@@ -72,10 +64,9 @@ IMPL_LINK_NOARG(FmShowColsDialog, OnClickedOk, Button*, void)
 }
 }
 
-EndDialog(RET_OK);
+m_xDialog->response(RET_OK);
 }
 
-
 void FmShowColsDialog::SetColumns(const css::uno::Reference< 
css::container::XIndexContainer>& xCols)
 {
 DBG_ASSERT(xCols.is(), "FmShowColsDialog::SetColumns : invalid columns !");
@@ -83,7 +74,7 @@ void FmShowColsDialog::SetColumns(const css::uno::Reference< 
css::container::XIn
 return;
 m_xColumns = xCols.get();
 
-m_pList->Clear();
+m_xList->clear();
 
 css::uno::Reference< css::beans::XPropertySet>  xCurCol;
 OUString sCurName;
@@ -108,7 +99,7 @@ void FmShowColsDialog::SetColumns(const css::uno::Reference< 
css::container::XIn
 
 // if the col is hidden, put it into the list
 if (bIsHidden)
-m_pList->SetEntryData( m_pList->InsertEntry(sCurName), 
reinterpret_cast(static_cast(i)) );
+m_xList->append(OUString::number(i), sCurName);
 }
 }
 
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index a49f2b240952..be648afb4361 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -114,7 +114,11 @@ short AbstractSvxDistributeDialog_Impl::Execute()
 }
 
 IMPL_ABSTDLG_BASE(AbstractHangulHanjaConversionDialog_Impl);
-IMPL_ABSTDLG_BASE(AbstractFmShowColsDialog_Impl);
+
+short AbstractFmShowColsDialog_Impl::Execute()
+{
+return m_xDlg->run();
+}
 
 short AbstractHyphenWordDialog_Impl::Execute()
 {
@@ -540,9 +544,9 @@ SotClipboardFormatId AbstractPasteDialog_Impl::GetFormat( 
const TransferableData
 return m_xDlg->GetFormat(aHelper);
 }
 
-void  AbstractFmShowColsDialog_Impl::SetColumns(const ::Reference< 
css::container::XIndexContainer>& xCols)
+void AbstractFmShowColsDialog_Impl::SetColumns(const ::Reference< 
css::container::XIndexContainer>& xCols)
 {
- pDlg->SetColumns(xCols);
+ 

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx svx/source

2018-09-28 Thread Libreoffice Gerrit user
 cui/source/dialogs/sdrcelldlg.cxx |   17 +--
 cui/source/factory/dlgfact.cxx|4 
 cui/source/factory/dlgfact.hxx|2 
 cui/source/inc/sdrcelldlg.hxx |9 --
 cui/uiconfig/ui/formatcellsdialog.ui  |  129 ++
 include/svx/sdr/table/tablecontroller.hxx |4 
 include/svx/svxdlg.hxx|2 
 svx/source/table/tablecontroller.cxx  |9 +-
 8 files changed, 138 insertions(+), 38 deletions(-)

New commits:
commit 1e6b6f038af656b475cb87844822287fd4e6c166
Author: Caolán McNamara 
AuthorDate: Wed Sep 26 13:38:50 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Sep 28 14:03:52 2018 +0200

weld SvxFormatCellsDialog

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

diff --git a/cui/source/dialogs/sdrcelldlg.cxx 
b/cui/source/dialogs/sdrcelldlg.cxx
index 47dd49cbc6a5..e20a3f488209 100644
--- a/cui/source/dialogs/sdrcelldlg.cxx
+++ b/cui/source/dialogs/sdrcelldlg.cxx
@@ -25,25 +25,24 @@
 #include 
 #include 
 
-SvxFormatCellsDialog::SvxFormatCellsDialog( vcl::Window* pParent, const 
SfxItemSet* pAttr, const SdrModel& rModel )
-: SfxTabDialog(pParent, "FormatCellsDialog", 
"cui/ui/formatcellsdialog.ui", pAttr)
+SvxFormatCellsDialog::SvxFormatCellsDialog(weld::Window* pParent, const 
SfxItemSet* pAttr, const SdrModel& rModel)
+: SfxTabDialogController(pParent, "cui/ui/formatcellsdialog.ui", 
"FormatCellsDialog", pAttr)
 , mrOutAttrs(*pAttr)
 , mpColorTab(rModel.GetColorList())
 , mpGradientList(rModel.GetGradientList())
 , mpHatchingList(rModel.GetHatchList())
 , mpBitmapList(rModel.GetBitmapList())
 , mpPatternList(rModel.GetPatternList())
-, m_nAreaPageId(0)
 {
 AddTabPage("name", RID_SVXPAGE_CHAR_NAME);
 AddTabPage("effects", RID_SVXPAGE_CHAR_EFFECTS);
-m_nBorderPageId = AddTabPage("border", RID_SVXPAGE_BORDER );
-m_nAreaPageId = AddTabPage("area", RID_SVXPAGE_AREA);
+AddTabPage("border", RID_SVXPAGE_BORDER );
+AddTabPage("area", RID_SVXPAGE_AREA);
 }
 
-void SvxFormatCellsDialog::PageCreated( sal_uInt16 nId, SfxTabPage  )
+void SvxFormatCellsDialog::PageCreated(const OString& rId, SfxTabPage )
 {
-if (nId == m_nAreaPageId)
+if (rId == "area")
 {
 SvxAreaTabPage& rAreaPage = static_cast(rPage);
 rAreaPage.SetColorList( mpColorTab );
@@ -53,13 +52,13 @@ void SvxFormatCellsDialog::PageCreated( sal_uInt16 nId, 
SfxTabPage  )
 rAreaPage.SetPatternList( mpPatternList );;
 rAreaPage.ActivatePage( mrOutAttrs );
 }
-else if (nId == m_nBorderPageId)
+else if (rId == "border")
 {
 SvxBorderTabPage& rBorderPage = static_cast(rPage);
 rBorderPage.SetTableMode();
 }
 else
-SfxTabDialog::PageCreated( nId, rPage );
+SfxTabDialogController::PageCreated(rId, rPage);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index d32d0a817e90..e48e1f87d11c 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1618,9 +1618,9 @@ VclPtr 
AbstractDialogFactory_Impl::CreateLinksDialog( vc
 return VclPtr::Create( pLinkDlg );
 }
 
-VclPtr 
AbstractDialogFactory_Impl::CreateSvxFormatCellsDialog( const SfxItemSet* 
pAttr, const SdrModel& rModel, const SdrObject* /*pObj*/ )
+VclPtr 
AbstractDialogFactory_Impl::CreateSvxFormatCellsDialog(weld::Window* pParent, 
const SfxItemSet* pAttr, const SdrModel& rModel, const SdrObject* /*pObj*/)
 {
-return VclPtr::Create( 
VclPtr::Create( nullptr, pAttr, rModel ) );
+return 
VclPtr::Create(o3tl::make_unique(pParent,
 pAttr, rModel));
 }
 
 VclPtr 
AbstractDialogFactory_Impl::CreateSvxSplitTableDialog(weld::Window* pParent, 
bool bIsTableVertical, long nMaxVertical)
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 3a1acd506334..2316ff7be199 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -824,7 +824,7 @@ public:
 const sal_uInt16 _nInitiallySelectedEvent
 ) override;
 
-virtual VclPtr CreateSvxFormatCellsDialog( const 
SfxItemSet* pAttr, const SdrModel& rModel, const SdrObject* pObj ) override;
+virtual VclPtr 
CreateSvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet* pAttr, 
const SdrModel& rModel, const SdrObject* pObj) override;
 
 virtual VclPtr 
CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, long 
nMaxVertical) override;
 
diff --git a/cui/source/inc/sdrcelldlg.hxx b/cui/source/inc/sdrcelldlg.hxx
index 0a38f759a494..50ab4b39ac70 100644
--- a/cui/source/inc/sdrcelldlg.hxx
+++ b/cui/source/inc/sdrcelldlg.hxx
@@ -25,7 +25,7 @@
 #include 
 
 class SdrModel;
-class SvxFormatCellsDialog : public SfxTabDialog
+class 

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx svx/source

2018-09-19 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuigrfflt.cxx |   35 ---
 cui/source/factory/dlgfact.cxx   |5 ++---
 cui/source/factory/dlgfact.hxx   |2 +-
 cui/source/inc/cuigrfflt.hxx |   13 +
 cui/uiconfig/ui/posterdialog.ui  |   29 ++---
 include/svx/svxdlg.hxx   |2 +-
 svx/source/dialog/grfflt.cxx |2 +-
 7 files changed, 44 insertions(+), 44 deletions(-)

New commits:
commit 65b5fc8f66eb2facaed5d35b61a2836b3390fb01
Author: Caolán McNamara 
AuthorDate: Tue Sep 18 14:12:21 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 19 16:51:32 2018 +0200

weld GraphicFilterPoster

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

diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index 0ba79e581a0a..0a0c9f718dce 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -522,44 +522,25 @@ Graphic GraphicFilterSepia::GetFilteredGraphic( const 
Graphic& rGraphic, double,
 return aRet;
 }
 
-
-GraphicFilterPoster::GraphicFilterPoster(vcl::Window* pParent, const Graphic& 
rGraphic,
+GraphicFilterPoster::GraphicFilterPoster(weld::Window* pParent, const Graphic& 
rGraphic,
   sal_uInt16 nPosterCount)
-: GraphicFilterDialog(pParent, "PosterDialog",
-"cui/ui/posterdialog.ui", rGraphic)
+: GraphicFilterDialogController(pParent, "cui/ui/posterdialog.ui", 
"PosterDialog", rGraphic)
+, mxNumPoster(m_xBuilder->weld_spin_button("value"))
 {
-get(mpNumPoster, "value");
-
-mpNumPoster->SetFirst( 2 );
-mpNumPoster->SetLast( rGraphic.GetBitmapEx().GetBitCount() );
-mpNumPoster->SetValue( nPosterCount );
-mpNumPoster->SetModifyHdl( LINK(this, GraphicFilterPoster, EditModifyHdl) 
);
+mxNumPoster->set_range(2, rGraphic.GetBitmapEx().GetBitCount());
+mxNumPoster->set_value(nPosterCount);
+mxNumPoster->connect_value_changed(LINK(this, GraphicFilterPoster, 
EditModifyHdl));
 }
 
-
-IMPL_LINK_NOARG(GraphicFilterPoster, EditModifyHdl, Edit&, void)
+IMPL_LINK_NOARG(GraphicFilterPoster, EditModifyHdl, weld::SpinButton&, void)
 {
 GetModifyHdl().Call(nullptr);
 }
 
-
-GraphicFilterPoster::~GraphicFilterPoster()
-{
-disposeOnce();
-}
-
-
-void GraphicFilterPoster::dispose()
-{
-mpNumPoster.clear();
-GraphicFilterDialog::dispose();
-}
-
-
 Graphic GraphicFilterPoster::GetFilteredGraphic( const Graphic& rGraphic, 
double, double )
 {
 Graphic  aRet;
-const sal_uInt16 nPosterCount = 
static_cast(mpNumPoster->GetValue());
+const sal_uInt16 nPosterCount = 
static_cast(mxNumPoster->get_value());
 
 if( rGraphic.IsAnimated() )
 {
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 108ac73ca14d..d8240ce678e9 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1285,11 +1285,10 @@ VclPtr 
AbstractDialogFactory_Impl::CreateGraphicFil
 return 
VclPtr::Create(o3tl::make_unique(pParent,
 rGraphic, RectPoint::MM));
 }
 
-VclPtr 
AbstractDialogFactory_Impl::CreateGraphicFilterPoster(vcl::Window* pParent,
+VclPtr 
AbstractDialogFactory_Impl::CreateGraphicFilterPoster(weld::Window* pParent,
 const Graphic& rGraphic)
 {
-VclPtrInstance pDlg( pParent, rGraphic, 16 );
-return VclPtr::Create( pDlg );
+return 
VclPtr::Create(o3tl::make_unique(pParent,
 rGraphic, 16));
 }
 
 VclPtr 
AbstractDialogFactory_Impl::CreateGraphicFilterSepia(weld::Window* pParent,
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index d26d30fa1dce..753b12bd150d 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -755,7 +755,7 @@ public:
 const 
Link& lnkContextSupplier) override;
 virtual VclPtr   
CreateGraphicFilterEmboss(weld::Window* pParent,
 const Graphic& rGraphic) 
override;
-virtual VclPtr   
CreateGraphicFilterPoster(vcl::Window* pParent,
+virtual VclPtr   
CreateGraphicFilterPoster(weld::Window* pParent,
 const Graphic& rGraphic) 
override;
 virtual VclPtr   
CreateGraphicFilterSepia(weld::Window* pParent,
 const Graphic& rGraphic) 
override;
diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx
index 3ba2b75148e5..c202a189a95c 100644
--- a/cui/source/inc/cuigrfflt.hxx
+++ b/cui/source/inc/cuigrfflt.hxx
@@ -209,17 +209,14 @@ public:
 virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double 
fScaleX, double fScaleY ) override;
 };
 
-class GraphicFilterPoster : public GraphicFilterDialog
+class GraphicFilterPoster : public 

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx svx/source

2018-09-19 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuigrfflt.cxx |   34 --
 cui/source/factory/dlgfact.cxx   |5 ++---
 cui/source/factory/dlgfact.hxx   |2 +-
 cui/source/inc/cuigrfflt.hxx |   11 ---
 cui/uiconfig/ui/smoothdialog.ui  |   30 ++
 include/svx/svxdlg.hxx   |2 +-
 svx/source/dialog/grfflt.cxx |   14 +++---
 7 files changed, 49 insertions(+), 49 deletions(-)

New commits:
commit d6cee8ad86ded54004f0dc87b390e43b20560390
Author: Caolán McNamara 
AuthorDate: Tue Sep 18 14:31:16 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 19 16:51:58 2018 +0200

weld GraphicFilterSmooth

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

diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index 0a0c9f718dce..f489112798c4 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -370,42 +370,24 @@ Graphic GraphicFilterMosaic::GetFilteredGraphic( const 
Graphic& rGraphic,
 return aRet;
 }
 
-
-GraphicFilterSmooth::GraphicFilterSmooth( vcl::Window* pParent, const Graphic& 
rGraphic, double nRadius)
-: GraphicFilterDialog(pParent, "SmoothDialog",
-"cui/ui/smoothdialog.ui", rGraphic)
+GraphicFilterSmooth::GraphicFilterSmooth(weld::Window* pParent, const Graphic& 
rGraphic, double nRadius)
+: GraphicFilterDialogController(pParent, "cui/ui/smoothdialog.ui", 
"SmoothDialog", rGraphic)
+, mxMtrRadius(m_xBuilder->weld_spin_button("radius"))
 {
-get(mpMtrRadius, "radius");
-
-mpMtrRadius->SetValue( nRadius* 10  );
-mpMtrRadius->SetModifyHdl( LINK(this, GraphicFilterSmooth, EditModifyHdl) 
);
-mpMtrRadius->GrabFocus();
+mxMtrRadius->set_value(nRadius * 10);
+mxMtrRadius->connect_value_changed(LINK(this, GraphicFilterSmooth, 
EditModifyHdl));
+mxMtrRadius->grab_focus();
 }
 
-
-IMPL_LINK_NOARG(GraphicFilterSmooth, EditModifyHdl, Edit&, void)
+IMPL_LINK_NOARG(GraphicFilterSmooth, EditModifyHdl, weld::SpinButton&, void)
 {
 GetModifyHdl().Call(nullptr);
 }
 
-
-GraphicFilterSmooth::~GraphicFilterSmooth()
-{
-disposeOnce();
-}
-
-
-void GraphicFilterSmooth::dispose()
-{
-mpMtrRadius.clear();
-GraphicFilterDialog::dispose();
-}
-
-
 Graphic GraphicFilterSmooth::GetFilteredGraphic( const Graphic& rGraphic, 
double, double )
 {
 Graphic aRet;
-double  nRadius = mpMtrRadius->GetValue() / 10.0;
+double  nRadius = mxMtrRadius->get_value() / 10.0;
 
 if( rGraphic.IsAnimated() )
 {
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index d8240ce678e9..c6cc366e97a1 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1297,11 +1297,10 @@ VclPtr 
AbstractDialogFactory_Impl::CreateGraphicFil
 return 
VclPtr::Create(o3tl::make_unique(pParent,
 rGraphic, 10));
 }
 
-VclPtr 
AbstractDialogFactory_Impl::CreateGraphicFilterSmooth(vcl::Window* pParent,
+VclPtr 
AbstractDialogFactory_Impl::CreateGraphicFilterSmooth(weld::Window* pParent,
 const Graphic& rGraphic, double 
nRadius)
 {
-VclPtrInstance pDlg( pParent, rGraphic, nRadius );
-return VclPtr::Create( pDlg );
+return 
VclPtr::Create(o3tl::make_unique(pParent,
 rGraphic, nRadius));
 }
 
 VclPtr 
AbstractDialogFactory_Impl::CreateGraphicFilterSolarize(weld::Window* pParent,
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 753b12bd150d..59b9dd574de8 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -759,7 +759,7 @@ public:
 const Graphic& rGraphic) 
override;
 virtual VclPtr   
CreateGraphicFilterSepia(weld::Window* pParent,
 const Graphic& rGraphic) 
override;
-virtual VclPtr   CreateGraphicFilterSmooth 
(vcl::Window* pParent,
+virtual VclPtr   
CreateGraphicFilterSmooth(weld::Window* pParent,
 const Graphic& rGraphic, 
double nRadius) override;
 virtual VclPtr  
CreateGraphicFilterSolarize(weld::Window* pParent,
 const Graphic& rGraphic) 
override;
diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx
index c202a189a95c..48ee3f3b25de 100644
--- a/cui/source/inc/cuigrfflt.hxx
+++ b/cui/source/inc/cuigrfflt.hxx
@@ -151,18 +151,15 @@ public:
 virtual Graphic GetFilteredGraphic(const Graphic& rGraphic, double 
fScaleX, double fScaleY) = 0;
 };
 
-class GraphicFilterSmooth : public GraphicFilterDialog
+class GraphicFilterSmooth : public GraphicFilterDialogController
 {
 private:
-VclPtr   mpMtrRadius;
-DECL_LINK(EditModifyHdl, Edit&, void);
+std::unique_ptr mxMtrRadius;
+

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx svx/source

2018-09-19 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuigrfflt.cxx |   58 ---
 cui/source/factory/dlgfact.cxx   |5 +--
 cui/source/factory/dlgfact.hxx   |2 -
 cui/source/inc/cuigrfflt.hxx |   21 ++
 cui/uiconfig/ui/mosaicdialog.ui  |   50 ++---
 include/svx/svxdlg.hxx   |2 -
 svx/source/dialog/grfflt.cxx |4 +-
 7 files changed, 74 insertions(+), 68 deletions(-)

New commits:
commit d85d206077bd400162157dadd1a36184e4851dbf
Author: Caolán McNamara 
AuthorDate: Tue Sep 18 14:02:30 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 19 16:51:09 2018 +0200

weld GraphicFilterMosaic

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

diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index 3fd751a953cf..0ba79e581a0a 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -302,63 +302,43 @@ IMPL_LINK_NOARG(GraphicFilterDialogController, 
ImplModifyHdl, LinkParamNone*, vo
 }
 }
 
-GraphicFilterMosaic::GraphicFilterMosaic( vcl::Window* pParent, const Graphic& 
rGraphic,
-  sal_uInt16 nTileWidth, sal_uInt16 
nTileHeight, bool bEnhanceEdges )
-: GraphicFilterDialog(pParent, "MosaicDialog",
-"cui/ui/mosaicdialog.ui", rGraphic)
+GraphicFilterMosaic::GraphicFilterMosaic(weld::Window* pParent, const Graphic& 
rGraphic,
+ sal_uInt16 nTileWidth, sal_uInt16 
nTileHeight, bool bEnhanceEdges)
+: GraphicFilterDialogController(pParent, "cui/ui/mosaicdialog.ui", 
"MosaicDialog", rGraphic)
+, mxMtrWidth(m_xBuilder->weld_metric_spin_button("width", FUNIT_PIXEL))
+, mxMtrHeight(m_xBuilder->weld_metric_spin_button("height", FUNIT_PIXEL))
+, mxCbxEdges(m_xBuilder->weld_check_button("edges"))
 {
-get(mpMtrWidth, "width");
-get(mpMtrHeight, "height");
-get(mpCbxEdges, "edges");
+mxMtrWidth->set_value(nTileWidth, FUNIT_PIXEL);
+mxMtrWidth->set_max(GetGraphicSizePixel().Width(), FUNIT_PIXEL);
+mxMtrWidth->connect_value_changed(LINK(this, GraphicFilterMosaic, 
EditModifyHdl));
 
-mpMtrWidth->SetValue( nTileWidth );
-mpMtrWidth->SetLast( GetGraphicSizePixel().Width() );
-mpMtrWidth->SetModifyHdl( LINK(this, GraphicFilterMosaic, EditModifyHdl) );
+mxMtrHeight->set_value(nTileHeight, FUNIT_PIXEL);
+mxMtrHeight->set_max(GetGraphicSizePixel().Height(), FUNIT_PIXEL);
+mxMtrHeight->connect_value_changed(LINK(this, GraphicFilterMosaic, 
EditModifyHdl));
 
-mpMtrHeight->SetValue( nTileHeight );
-mpMtrHeight->SetLast( GetGraphicSizePixel().Height() );
-mpMtrHeight->SetModifyHdl( LINK(this, GraphicFilterMosaic, EditModifyHdl) 
);
+mxCbxEdges->set_active(bEnhanceEdges);
+mxCbxEdges->connect_toggled(LINK(this, GraphicFilterMosaic, 
CheckBoxModifyHdl));
 
-mpCbxEdges->Check( bEnhanceEdges );
-mpCbxEdges->SetToggleHdl( LINK(this, GraphicFilterMosaic, 
CheckBoxModifyHdl) );
-
-mpMtrWidth->GrabFocus();
+mxMtrWidth->grab_focus();
 }
 
-
-IMPL_LINK_NOARG(GraphicFilterMosaic, CheckBoxModifyHdl, CheckBox&, void)
+IMPL_LINK_NOARG(GraphicFilterMosaic, CheckBoxModifyHdl, weld::ToggleButton&, 
void)
 {
 GetModifyHdl().Call(nullptr);
 }
 
-
-IMPL_LINK_NOARG(GraphicFilterMosaic, EditModifyHdl, Edit&, void)
+IMPL_LINK_NOARG(GraphicFilterMosaic, EditModifyHdl, weld::MetricSpinButton&, 
void)
 {
 GetModifyHdl().Call(nullptr);
 }
 
-
-GraphicFilterMosaic::~GraphicFilterMosaic()
-{
-disposeOnce();
-}
-
-
-void GraphicFilterMosaic::dispose()
-{
-mpMtrWidth.clear();
-mpMtrHeight.clear();
-mpCbxEdges.clear();
-GraphicFilterDialog::dispose();
-}
-
-
 Graphic GraphicFilterMosaic::GetFilteredGraphic( const Graphic& rGraphic,
  double fScaleX, double 
fScaleY )
 {
 Graphic aRet;
-longnTileWidth = static_cast(mpMtrWidth->GetValue());
-longnTileHeight = static_cast(mpMtrHeight->GetValue());
+longnTileWidth = 
static_cast(mxMtrWidth->get_value(FUNIT_PIXEL));
+longnTileHeight = 
static_cast(mxMtrHeight->get_value(FUNIT_PIXEL));
 const Size  aSize( std::max( FRound( nTileWidth * fScaleX ), 1L ),
std::max( FRound( nTileHeight * fScaleY ), 1L ) );
 
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 40863a65d543..108ac73ca14d 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1311,11 +1311,10 @@ VclPtr 
AbstractDialogFactory_Impl::CreateGraphicFil
 return 
VclPtr::Create(o3tl::make_unique(pParent,
 rGraphic, 128, false /*bInvert*/));
 }
 
-VclPtr 
AbstractDialogFactory_Impl::CreateGraphicFilterMosaic (vcl::Window* pParent,
+VclPtr 

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx svx/source

2018-09-19 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuigrfflt.cxx  |   44 ++
 cui/source/factory/dlgfact.cxx|5 +---
 cui/source/factory/dlgfact.hxx|2 -
 cui/source/inc/cuigrfflt.hxx  |   22 +++
 cui/uiconfig/ui/embossdialog.ui   |1 
 cui/uiconfig/ui/solarizedialog.ui |   33 
 include/svx/svxdlg.hxx|2 -
 svx/source/dialog/grfflt.cxx  |2 -
 8 files changed, 55 insertions(+), 56 deletions(-)

New commits:
commit 4b743a2cc1b6d29404873205a25432baf4f9c933
Author: Caolán McNamara 
AuthorDate: Tue Sep 18 12:10:37 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 19 16:19:43 2018 +0200

weld GraphicFilterSolarize

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

diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index f8f2b76bc4a5..c8268ac38f02 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -449,53 +449,33 @@ Graphic GraphicFilterSmooth::GetFilteredGraphic( const 
Graphic& rGraphic, double
 return aRet;
 }
 
-
-GraphicFilterSolarize::GraphicFilterSolarize( vcl::Window* pParent, const 
Graphic& rGraphic,
-  sal_uInt8 cGreyThreshold, bool 
bInvert )
-: GraphicFilterDialog(pParent, "SolarizeDialog",
-"cui/ui/solarizedialog.ui", rGraphic)
+GraphicFilterSolarize::GraphicFilterSolarize(weld::Window* pParent, const 
Graphic& rGraphic,
+ sal_uInt8 cGreyThreshold, bool 
bInvert)
+: GraphicFilterDialogController(pParent, "cui/ui/solarizedialog.ui", 
"SolarizeDialog", rGraphic)
+, mxMtrThreshold(m_xBuilder->weld_metric_spin_button("value", 
FUNIT_PERCENT))
+, mxCbxInvert(m_xBuilder->weld_check_button("invert"))
 {
-get(mpMtrThreshold, "value");
-get(mpCbxInvert, "invert");
-
-mpMtrThreshold->SetValue( FRound( cGreyThreshold / 2.55 ) );
-mpMtrThreshold->SetModifyHdl( LINK(this, GraphicFilterSolarize, 
EditModifyHdl) );
+mxMtrThreshold->set_value(FRound(cGreyThreshold / 2.55), FUNIT_PERCENT);
+mxMtrThreshold->connect_value_changed(LINK(this, GraphicFilterSolarize, 
EditModifyHdl));
 
-mpCbxInvert->Check( bInvert );
-mpCbxInvert->SetToggleHdl( LINK(this, GraphicFilterSolarize, 
CheckBoxModifyHdl) );
+mxCbxInvert->set_active(bInvert);
+mxCbxInvert->connect_toggled(LINK(this, GraphicFilterSolarize, 
CheckBoxModifyHdl));
 }
 
-
-IMPL_LINK_NOARG(GraphicFilterSolarize, CheckBoxModifyHdl, CheckBox&, void)
+IMPL_LINK_NOARG(GraphicFilterSolarize, CheckBoxModifyHdl, weld::ToggleButton&, 
void)
 {
 GetModifyHdl().Call(nullptr);
 }
 
-
-IMPL_LINK_NOARG(GraphicFilterSolarize, EditModifyHdl, Edit&, void)
+IMPL_LINK_NOARG(GraphicFilterSolarize, EditModifyHdl, weld::MetricSpinButton&, 
void)
 {
 GetModifyHdl().Call(nullptr);
 }
 
-
-GraphicFilterSolarize::~GraphicFilterSolarize()
-{
-disposeOnce();
-}
-
-
-void GraphicFilterSolarize::dispose()
-{
-mpMtrThreshold.clear();
-mpCbxInvert.clear();
-GraphicFilterDialog::dispose();
-}
-
-
 Graphic GraphicFilterSolarize::GetFilteredGraphic( const Graphic& rGraphic, 
double, double )
 {
 Graphic aRet;
-sal_uInt8   nGreyThreshold = static_cast(FRound( 
mpMtrThreshold->GetValue() * 2.55 ));
+sal_uInt8   nGreyThreshold = 
static_cast(FRound(mxMtrThreshold->get_value(FUNIT_PERCENT) * 2.55));
 
 if( rGraphic.IsAnimated() )
 {
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 63868ad23534..0534e2e006f8 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1306,11 +1306,10 @@ VclPtr 
AbstractDialogFactory_Impl::CreateGraphicFil
 return VclPtr::Create( pDlg );
 }
 
-VclPtr 
AbstractDialogFactory_Impl::CreateGraphicFilterSolarize (vcl::Window* pParent,
+VclPtr 
AbstractDialogFactory_Impl::CreateGraphicFilterSolarize(weld::Window* pParent,
 const Graphic& rGraphic)
 {
-VclPtrInstance pDlg( pParent, rGraphic, 128, 
false/*bInvert*/ );
-return VclPtr::Create( pDlg );
+return 
VclPtr::Create(o3tl::make_unique(pParent,
 rGraphic, 128, false /*bInvert*/));
 }
 
 VclPtr 
AbstractDialogFactory_Impl::CreateGraphicFilterMosaic (vcl::Window* pParent,
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 6df50a3b0f52..968685e8994c 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -761,7 +761,7 @@ public:
 const Graphic& rGraphic) 
override;
 virtual VclPtr   CreateGraphicFilterSmooth 
(vcl::Window* pParent,
 const Graphic& rGraphic, 
double nRadius) override;
-virtual VclPtr  

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx svx/source

2018-09-17 Thread Libreoffice Gerrit user
 cui/source/dialogs/srchxtra.cxx   |   35 +---
 cui/source/factory/dlgfact.cxx|6 
 cui/source/factory/dlgfact.hxx|3 
 cui/source/inc/srchxtra.hxx   |   11 -
 cui/uiconfig/ui/searchformatdialog.ui |  246 --
 include/svx/svxdlg.hxx|3 
 svx/source/dialog/srchdlg.cxx |2 
 7 files changed, 254 insertions(+), 52 deletions(-)

New commits:
commit c090d2fc981d237a5591a51a94674a35835b706d
Author: Caolán McNamara 
AuthorDate: Mon Sep 17 12:30:14 2018 +0100
Commit: Caolán McNamara 
CommitDate: Mon Sep 17 18:14:58 2018 +0200

weld SvxSearchFormatDialog

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

diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx
index edfb1d0df063..4efffd9aecea 100644
--- a/cui/source/dialogs/srchxtra.cxx
+++ b/cui/source/dialogs/srchxtra.cxx
@@ -33,22 +33,18 @@
 #include 
 #include 
 
-SvxSearchFormatDialog::SvxSearchFormatDialog(vcl::Window* pParent, const 
SfxItemSet& rSet)
-: SfxTabDialog(pParent, "SearchFormatDialog", 
"cui/ui/searchformatdialog.ui", )
-, m_nNamePageId(0)
-, m_nParaStdPageId(0)
-, m_nParaAlignPageId(0)
-, m_nBackPageId(0)
+SvxSearchFormatDialog::SvxSearchFormatDialog(weld::Window* pParent, const 
SfxItemSet& rSet)
+: SfxTabDialogController(pParent, "cui/ui/searchformatdialog.ui", 
"SearchFormatDialog", )
 {
-m_nNamePageId = AddTabPage("font", SvxCharNamePage::Create, nullptr);
+AddTabPage("font", SvxCharNamePage::Create, nullptr);
 AddTabPage("fonteffects", SvxCharEffectsPage::Create, nullptr);
 AddTabPage("position", SvxCharPositionPage::Create, nullptr);
 AddTabPage("asianlayout", SvxCharTwoLinesPage::Create, nullptr);
-m_nParaStdPageId = AddTabPage("labelTP_PARA_STD", 
SvxStdParagraphTabPage::Create, nullptr);
-m_nParaAlignPageId = AddTabPage("labelTP_PARA_ALIGN", 
SvxParaAlignTabPage::Create, nullptr);
+AddTabPage("labelTP_PARA_STD", SvxStdParagraphTabPage::Create, nullptr);
+AddTabPage("labelTP_PARA_ALIGN", SvxParaAlignTabPage::Create, nullptr);
 AddTabPage("labelTP_PARA_EXT", SvxExtParagraphTabPage::Create, nullptr);
 AddTabPage("labelTP_PARA_ASIAN", SvxAsianTabPage::Create, nullptr );
-m_nBackPageId = AddTabPage("background", SvxBackgroundTabPage::Create, 
nullptr);
+AddTabPage("background", SvxBackgroundTabPage::Create, nullptr);
 
 // remove asian tabpages if necessary
 SvtCJKOptions aCJKOptions;
@@ -60,18 +56,11 @@ SvxSearchFormatDialog::SvxSearchFormatDialog(vcl::Window* 
pParent, const SfxItem
 
 SvxSearchFormatDialog::~SvxSearchFormatDialog()
 {
-disposeOnce();
-}
-
-void SvxSearchFormatDialog::dispose()
-{
-m_pFontList.reset();
-SfxTabDialog::dispose();
 }
 
-void SvxSearchFormatDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage )
+void SvxSearchFormatDialog::PageCreated(const OString& rId, SfxTabPage& rPage)
 {
-if (nId == m_nNamePageId)
+if (rId == "font")
 {
 const FontList* pApm_pFontList = nullptr;
 SfxObjectShell* pSh = SfxObjectShell::Current();
@@ -89,7 +78,7 @@ void SvxSearchFormatDialog::PageCreated( sal_uInt16 nId, 
SfxTabPage& rPage )
 if ( !pList )
 {
 if ( !m_pFontList )
-m_pFontList.reset( new FontList( this ) );
+m_pFontList.reset(new 
FontList(Application::GetDefaultDevice()));
 pList = m_pFontList.get();
 }
 
@@ -98,15 +87,15 @@ void SvxSearchFormatDialog::PageCreated( sal_uInt16 nId, 
SfxTabPage& rPage )
 SetFontList( SvxFontListItem( pList, SID_ATTR_CHAR_FONTLIST ) 
);
 static_cast(rPage).EnableSearchMode();
 }
-else if (nId == m_nParaStdPageId)
+else if (rId == "labelTP_PARA_STD")
 {
 static_cast(rPage).EnableAutoFirstLine();
 }
-else if (nId == m_nParaAlignPageId)
+else if (rId == "labelTP_PARA_ALIGN")
 {
 static_cast(rPage).EnableJustifyExt();
 }
-else if (nId == m_nBackPageId)
+else if (rId == "background")
 {
 SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
 
aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast(SvxBackgroundTabFlags::SHOW_HIGHLIGHTING)));
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index e7c622ad507c..e2c8a6fda1c8 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1143,11 +1143,11 @@ VclPtr 
AbstractDialogFactory_Impl::CreateURLDialog( vcl::Window*
 return VclPtr::Create( pDlg );
 }
 
-VclPtr 
AbstractDialogFactory_Impl::CreateTabItemDialog(vcl::Window* pParent,
+VclPtr 
AbstractDialogFactory_Impl::CreateTabItemDialog(weld::Window* pParent,
 const SfxItemSet& rSet)
 {
-VclPtrInstance pDlg(pParent, rSet);
-return VclPtr::Create(pDlg);
+

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx svx/source

2018-09-11 Thread Libreoffice Gerrit user
 cui/source/inc/numpages.hxx |   25 --
 cui/source/tabpages/numpages.cxx|   76 +++-
 cui/uiconfig/ui/pickgraphicpage.ui  |   40 +---
 include/svx/numvset.hxx |   10 +---
 svx/source/dialog/svxbmpnumvalueset.cxx |   21 ++--
 5 files changed, 90 insertions(+), 82 deletions(-)

New commits:
commit 1520d56ea3cd5075c71b8ec492e3d4c23b9593f5
Author: Caolán McNamara 
AuthorDate: Mon Sep 10 14:51:22 2018 +0100
Commit: Caolán McNamara 
CommitDate: Tue Sep 11 09:56:57 2018 +0200

weld SvxBitmapPickTabPage

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

diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index 920ffbf6b3c1..e0d9a1909f30 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -196,16 +196,11 @@ public:
 virtual voidPageCreated(const SfxAllItemSet& aSet) override;
 };
 
-
 class SvxBitmapPickTabPage final : public SfxTabPage
 {
 using TabPage::ActivatePage;
 using TabPage::DeactivatePage;
 
-VclPtr  m_pErrorText;
-VclPtr  m_pExamplesVS;
-VclPtr m_pBtBrowseFile;
-
 std::vector aGrfNames;
 
 std::unique_ptr pActNum;
@@ -216,19 +211,22 @@ class SvxBitmapPickTabPage final : public SfxTabPage
 boolbModified   : 1;
 boolbPreset : 1;
 
-DECL_LINK(NumSelectHdl_Impl, ValueSet*, void);
-DECL_LINK(DoubleClickHdl_Impl, ValueSet*, void);
-DECL_LINK(ClickAddBrowseHdl_Impl, Button*, void );
+std::unique_ptr m_xErrorText;
+std::unique_ptr m_xBtBrowseFile;
+std::unique_ptr m_xExamplesVS;
+std::unique_ptr m_xExamplesVSWin;
 
+DECL_LINK(NumSelectHdl_Impl, SvtValueSet*, void);
+DECL_LINK(DoubleClickHdl_Impl, SvtValueSet*, void);
+DECL_LINK(ClickAddBrowseHdl_Impl, weld::Button&, void);
 
 public:
-SvxBitmapPickTabPage(vcl::Window* pParent,
-   const SfxItemSet& rSet);
-virtual ~SvxBitmapPickTabPage() override;
+SvxBitmapPickTabPage(TabPageParent pParent, const SfxItemSet& rSet);
+virtual ~SvxBitmapPickTabPage() override;
 virtual void dispose() override;
 
-static VclPtr  Create( TabPageParent pParent,
-const SfxItemSet* rAttrSet);
+static VclPtr  Create(TabPageParent pParent,
+  const SfxItemSet* rAttrSet);
 
 virtual voidActivatePage(const SfxItemSet& rSet) override;
 virtual DeactivateRC   DeactivatePage(SfxItemSet *pSet) override;
@@ -236,7 +234,6 @@ public:
 virtual voidReset( const SfxItemSet* rSet ) override;
 };
 
-
 class SvxNumOptionsTabPage : public SfxTabPage
 {
 using TabPage::ActivatePage;
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 58cdf26ee997..a505c954c306 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -176,7 +176,7 @@ 
SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(TabPageParent pParent, const Sf
 , bModified(false)
 , bPreset(false)
 , nNumItemId(SID_ATTR_NUMBERING_RULE)
-, m_xExamplesVS(new NumValueSet)
+, m_xExamplesVS(new NumValueSet(nullptr))
 , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", 
*m_xExamplesVS))
 {
 SetExchangeSupport();
@@ -361,7 +361,7 @@ SvxBulletPickTabPage::SvxBulletPickTabPage(TabPageParent 
pParent, const SfxItemS
 , bModified(false)
 , bPreset(false)
 , nNumItemId(SID_ATTR_NUMBERING_RULE)
-, m_xExamplesVS(new NumValueSet)
+, m_xExamplesVS(new NumValueSet(nullptr))
 , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", 
*m_xExamplesVS))
 {
 SetExchangeSupport();
@@ -516,7 +516,7 @@ SvxNumPickTabPage::SvxNumPickTabPage(TabPageParent pParent, 
const SfxItemSet& rS
 , nNumItemId(SID_ATTR_NUMBERING_RULE)
 , bModified(false)
 , bPreset(false)
-, m_xExamplesVS(new NumValueSet)
+, m_xExamplesVS(new NumValueSet(nullptr))
 , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", 
*m_xExamplesVS))
 {
 SetExchangeSupport();
@@ -755,22 +755,23 @@ void SvxNumPickTabPage::PageCreated(const SfxAllItemSet& 
aSet)
 SetCharFormatNames( 
pNumCharFmt->GetValue(),pBulletCharFmt->GetValue());
 }
 
-SvxBitmapPickTabPage::SvxBitmapPickTabPage(vcl::Window* pParent,
-   const SfxItemSet& rSet)
-: SfxTabPage(pParent, "PickGraphicPage", "cui/ui/pickgraphicpage.ui", 
)
+SvxBitmapPickTabPage::SvxBitmapPickTabPage(TabPageParent pParent, const 
SfxItemSet& rSet)
+: SfxTabPage(pParent, "cui/ui/pickgraphicpage.ui", "PickGraphicPage", 
)
 , nActNumLvl(SAL_MAX_UINT16)
 , nNumItemId(SID_ATTR_NUMBERING_RULE)
 , bModified(false)
 , bPreset(false)
+, 

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx svx/source

2018-09-07 Thread Libreoffice Gerrit user
 cui/source/inc/chardlg.hxx   |   79 ++---
 cui/source/tabpages/chardlg.cxx  |  579 +--
 cui/uiconfig/ui/effectspage.ui   |  336 +++---
 include/svx/colorbox.hxx |5 
 include/svx/colorwindow.hxx  |1 
 include/svx/fntctrl.hxx  |3 
 svx/source/dialog/fntctrl.cxx|   26 +
 svx/source/tbxctrls/tbcontrl.cxx |   39 ++
 8 files changed, 481 insertions(+), 587 deletions(-)

New commits:
commit 5744597e4d1df2cd9a739f249dbbcae7214a4e23
Author: Caolán McNamara 
AuthorDate: Fri Sep 7 12:37:03 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Sep 7 16:43:01 2018 +0200

weld SvxCharEffectsPage

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

diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index cee534052568..6a5f2b5c8332 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -200,7 +200,7 @@ public:
 
 // class SvxCharEffectsPage --
 
-class SvxCharEffectsPage : public SvxCharBasePage
+class SvxCharEffectsPage : public CharBasePage
 {
 friend class VclPtr;
 
@@ -210,43 +210,34 @@ private:
 bool   m_bNewFontColor;
 bool   m_bEnableNoneFontColor;
 Color  m_aOrigFontColor;
-VclPtr  m_pFontColorFT;
-VclPtrm_pFontColorLB;
-
-VclPtr  m_pEffectsFT;
-VclPtrm_pEffectsLB;
-
-VclPtr  m_pReliefFT;
-VclPtrm_pReliefLB;
-
-VclPtrm_pOutlineBtn;
-VclPtrm_pShadowBtn;
-VclPtrm_pBlinkingBtn;
-VclPtrm_pHiddenBtn;
-
-VclPtrm_pOverlineLB;
-VclPtr  m_pOverlineColorFT;
-VclPtrm_pOverlineColorLB;
-
-VclPtrm_pStrikeoutLB;
-
-VclPtrm_pUnderlineLB;
-VclPtr  m_pUnderlineColorFT;
-VclPtrm_pUnderlineColorLB;
-
-VclPtr   m_pIndividualWordsBtn;
-
-VclPtr  m_pEmphasisFT;
-VclPtrm_pEmphasisLB;
-
-VclPtr  m_pPositionFT;
-VclPtrm_pPositionLB;
-
-VclPtr  m_pA11yWarningFT;
-
-sal_uInt16  m_nHtmlMode;
-
-SvxCharEffectsPage( vcl::Window* pParent, const 
SfxItemSet& rSet );
+sal_uInt16 m_nHtmlMode;
+bool   m_bUnderlineColorDisabled;
+
+std::unique_ptr m_xFontColorFT;
+std::unique_ptr m_xFontColorLB;
+std::unique_ptr m_xEffectsFT;
+std::unique_ptr m_xEffectsLB;
+std::unique_ptr m_xReliefFT;
+std::unique_ptr m_xReliefLB;
+std::unique_ptr m_xOutlineBtn;
+std::unique_ptr m_xShadowBtn;
+std::unique_ptr m_xBlinkingBtn;
+std::unique_ptr m_xHiddenBtn;
+std::unique_ptr m_xOverlineLB;
+std::unique_ptr m_xOverlineColorFT;
+std::unique_ptr m_xOverlineColorLB;
+std::unique_ptr m_xStrikeoutLB;
+std::unique_ptr m_xUnderlineLB;
+std::unique_ptr m_xUnderlineColorFT;
+std::unique_ptr m_xUnderlineColorLB;
+std::unique_ptr m_xIndividualWordsBtn;
+std::unique_ptr m_xEmphasisFT;
+std::unique_ptr m_xEmphasisLB;
+std::unique_ptr m_xPositionFT;
+std::unique_ptr m_xPositionLB;
+std::unique_ptr m_xA11yWarningFT;
+
+SvxCharEffectsPage(TabPageParent pParent, const SfxItemSet& rSet);
 
 voidInitialize();
 voidUpdatePreview_Impl();
@@ -256,12 +247,12 @@ private:
 Color   GetPreviewFontColor(const Color& rColor) const;
 voidEnableNoneFontColor();
 
-void SelectHdl_Impl(ListBox*);
-DECL_LINK(SelectListBoxHdl_Impl, ListBox&, void);
-DECL_LINK(CbClickHdl_Impl, Button*, void);
-DECL_LINK(TristClickHdl_Impl, Button*, void);
-DECL_LINK(UpdatePreview_Impl, ListBox&, void);
-DECL_LINK(ColorBoxSelectHdl_Impl, SvxColorListBox&, void);
+void SelectHdl_Impl(weld::ComboBoxText*);
+DECL_LINK(SelectListBoxHdl_Impl, weld::ComboBoxText&, void);
+DECL_LINK(CbClickHdl_Impl, weld::ToggleButton&, void);
+DECL_LINK(TristClickHdl_Impl, weld::ToggleButton&, void);
+DECL_LINK(UpdatePreview_Impl, weld::ComboBoxText&, void);
+DECL_LINK(ColorBoxSelectHdl_Impl, ColorListBox&, void);
 
 public:
 virtual ~SvxCharEffectsPage() override;
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 83e3dc17e6e0..2c729da529f6 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1389,46 +1389,46 @@ void SvxCharNamePage::PageCreated(const SfxAllItemSet& 
aSet)
 }
 // class SvxCharEffectsPage --
 
-SvxCharEffectsPage::SvxCharEffectsPage( vcl::Window* pParent, const 
SfxItemSet& rInSet )
-: SvxCharBasePage(pParent, 

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx svx/source

2018-05-14 Thread Caolán McNamara
 cui/source/dialogs/cuigaldlg.cxx|   47 +++-
 cui/source/factory/dlgfact.cxx  |   16 ---
 cui/source/factory/dlgfact.hxx  |   14 --
 cui/source/inc/cuigaldlg.hxx|   15 +++---
 cui/uiconfig/ui/gallerythemeiddialog.ui |   72 +---
 include/svx/galtheme.hxx|4 -
 include/svx/svxdlg.hxx  |4 -
 svx/source/gallery2/galbrws1.cxx|2 
 svx/source/gallery2/gallery1.cxx|6 +-
 9 files changed, 91 insertions(+), 89 deletions(-)

New commits:
commit 7b8556729629ceaf633f60c86f0114e4427d2b4a
Author: Caolán McNamara 
Date:   Mon May 14 12:52:37 2018 +0100

weld GalleryIdDialog

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

diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 1e39d5b1055b..6729b7fcd912 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -503,41 +503,29 @@ TitleDialog::~TitleDialog()
 {
 }
 
-GalleryIdDialog::GalleryIdDialog( vcl::Window* pParent, GalleryTheme* _pThm )
-: ModalDialog(pParent, "GalleryThemeIDDialog", 
"cui/ui/gallerythemeiddialog.ui")
-, pThm(_pThm )
+GalleryIdDialog::GalleryIdDialog(weld::Window* pParent, GalleryTheme* _pThm)
+: GenericDialogController(pParent, "cui/ui/gallerythemeiddialog.ui", 
"GalleryThemeIDDialog")
+, m_pThm(_pThm)
+, m_xBtnOk(m_xBuilder->weld_button("ok"))
+, m_xLbResName(m_xBuilder->weld_combo_box_text("entry"))
 {
-get(m_pBtnOk, "ok");
-get(m_pLbResName, "entry");
+m_xLbResName->append_text("!!! No Id !!!");
 
-m_pLbResName->InsertEntry( OUString( "!!! No Id !!!" ) );
+GalleryTheme::InsertAllThemes(*m_xLbResName);
 
-GalleryTheme::InsertAllThemes(*m_pLbResName);
+m_xLbResName->set_active(m_pThm->GetId());
+m_xLbResName->grab_focus();
 
-m_pLbResName->SelectEntryPos( static_cast(pThm->GetId()) );
-m_pLbResName->GrabFocus();
-
-m_pBtnOk->SetClickHdl( LINK( this, GalleryIdDialog, ClickOkHdl ) );
+m_xBtnOk->connect_clicked(LINK(this, GalleryIdDialog, ClickOkHdl));
 }
 
-
 GalleryIdDialog::~GalleryIdDialog()
 {
-disposeOnce();
-}
-
-
-void GalleryIdDialog::dispose()
-{
-m_pBtnOk.clear();
-m_pLbResName.clear();
-ModalDialog::dispose();
 }
 
-
-IMPL_LINK_NOARG(GalleryIdDialog, ClickOkHdl, Button*, void)
+IMPL_LINK_NOARG(GalleryIdDialog, ClickOkHdl, weld::Button&, void)
 {
-Gallery*pGal = pThm->GetParent();
+Gallery*pGal = m_pThm->GetParent();
 const sal_uLong nId = GetId();
 boolbDifferentThemeExists = false;
 
@@ -545,26 +533,25 @@ IMPL_LINK_NOARG(GalleryIdDialog, ClickOkHdl, Button*, 
void)
 {
 const GalleryThemeEntry* pInfo = pGal->GetThemeInfo( i );
 
-if( ( pInfo->GetId() == nId ) && ( pInfo->GetThemeName() != 
pThm->GetName() ) )
+if ((pInfo->GetId() == nId) && (pInfo->GetThemeName() != 
m_pThm->GetName()))
 {
 OUString aStr( CuiResId( RID_SVXSTR_GALLERY_ID_EXISTS ) );
 
 aStr += " (" + pInfo->GetThemeName() + ")";
 
-std::unique_ptr 
xInfoBox(Application::CreateMessageDialog(GetFrameWeld(),
+std::unique_ptr 
xInfoBox(Application::CreateMessageDialog(m_xDialog.get(),
   
VclMessageType::Info, VclButtonsType::Ok,
   aStr));
 xInfoBox->run();
-m_pLbResName->GrabFocus();
+m_xLbResName->grab_focus();
 bDifferentThemeExists = true;
 }
 }
 
-if( !bDifferentThemeExists )
-EndDialog( RET_OK );
+if (!bDifferentThemeExists)
+m_xDialog->response(RET_OK);
 }
 
-
 GalleryThemeProperties::GalleryThemeProperties(vcl::Window* pParent,
 ExchangeData* _pData, SfxItemSet const * pItemSet)
 : SfxTabDialog( pParent, "GalleryThemeDialog",
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 283bd1a651d1..a5c76ef405ab 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -117,7 +117,12 @@ short AbstractTitleDialog_Impl::Execute()
 }
 
 IMPL_ABSTDLG_BASE(AbstractScriptSelectorDialog_Impl);
-IMPL_ABSTDLG_BASE(AbstractGalleryIdDialog_Impl);
+
+short AbstractGalleryIdDialog_Impl::Execute()
+{
+return m_xDlg->run();
+}
+
 IMPL_ABSTDLG_BASE(AbstractURLDlg_Impl);
 
 short AbstractSvxSearchSimilarityDialog_Impl::Execute()
@@ -518,7 +523,7 @@ OUString AbstractTitleDialog_Impl::GetTitle() const
 
 sal_uInt32 AbstractGalleryIdDialog_Impl::GetId() const
 {
-return pDlg->GetId();
+return m_xDlg->GetId();
 }
 
 void VclAbstractRefreshableDialog_Impl::Update()
@@ -1084,11 

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx svx/source

2018-05-14 Thread Caolán McNamara
 cui/source/dialogs/cuigaldlg.cxx  |   20 +--
 cui/source/factory/dlgfact.cxx|   13 ++--
 cui/source/factory/dlgfact.hxx|   12 +++-
 cui/source/inc/cuigaldlg.hxx  |9 +--
 cui/uiconfig/ui/gallerytitledialog.ui |   91 ++
 include/svx/svxdlg.hxx|4 -
 svx/source/gallery2/galbrws1.cxx  |6 +-
 svx/source/gallery2/galbrws2.cxx  |2 
 8 files changed, 81 insertions(+), 76 deletions(-)

New commits:
commit 38fa68b90ae50d9bf25cf22fef36e030282b44a3
Author: Caolán McNamara 
Date:   Mon May 14 12:41:06 2018 +0100

weld TitleDialog

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

diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 972dbc0f5399..1e39d5b1055b 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -491,28 +491,18 @@ IMPL_LINK( ActualizeProgress, ActualizeHdl, const 
INetURLObject&, rURL, void )
 }
 
 
-TitleDialog::TitleDialog(vcl::Window* pParent, const OUString& rOldTitle)
-: ModalDialog(pParent, "GalleryTitleDialog", 
"cui/ui/gallerytitledialog.ui")
+TitleDialog::TitleDialog(weld::Window* pParent, const OUString& rOldTitle)
+: GenericDialogController(pParent, "cui/ui/gallerytitledialog.ui", 
"GalleryTitleDialog")
+, m_xEdit(m_xBuilder->weld_entry("entry"))
 {
-get(m_pEdit, "entry");
-m_pEdit->SetText( rOldTitle );
-m_pEdit->GrabFocus();
+m_xEdit->set_text(rOldTitle);
+m_xEdit->grab_focus();
 }
 
-
 TitleDialog::~TitleDialog()
 {
-disposeOnce();
-}
-
-
-void TitleDialog::dispose()
-{
-m_pEdit.clear();
-ModalDialog::dispose();
 }
 
-
 GalleryIdDialog::GalleryIdDialog( vcl::Window* pParent, GalleryTheme* _pThm )
 : ModalDialog(pParent, "GalleryThemeIDDialog", 
"cui/ui/gallerythemeiddialog.ui")
 , pThm(_pThm )
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 0bf6ea154642..283bd1a651d1 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -111,7 +111,11 @@ short AbstractSvxZoomDialog_Impl::Execute()
 return m_xDlg->run();
 }
 
-IMPL_ABSTDLG_BASE(AbstractTitleDialog_Impl);
+short AbstractTitleDialog_Impl::Execute()
+{
+return m_xDlg->run();
+}
+
 IMPL_ABSTDLG_BASE(AbstractScriptSelectorDialog_Impl);
 IMPL_ABSTDLG_BASE(AbstractGalleryIdDialog_Impl);
 IMPL_ABSTDLG_BASE(AbstractURLDlg_Impl);
@@ -509,7 +513,7 @@ SfxBindings& AbstractSpellDialog_Impl::GetBindings()
 
 OUString AbstractTitleDialog_Impl::GetTitle() const
 {
-return pDlg->GetTitle();
+return m_xDlg->GetTitle();
 }
 
 sal_uInt32 AbstractGalleryIdDialog_Impl::GetId() const
@@ -1074,11 +1078,10 @@ VclPtr 
AbstractDialogFactory_Impl::CreateSvxScriptOrgDialog(
 return VclPtr::Create( pDlg );
 }
 
-VclPtr AbstractDialogFactory_Impl::CreateTitleDialog( 
vcl::Window* pParent,
+VclPtr 
AbstractDialogFactory_Impl::CreateTitleDialog(weld::Window* pParent,
 const OUString& rOldText)
 {
-   VclPtrInstance pDlg( pParent, rOldText);
-   return VclPtr::Create( pDlg );
+   return VclPtr::Create(new TitleDialog(pParent, 
rOldText));
 }
 
 VclPtr 
AbstractDialogFactory_Impl::CreateGalleryIdDialog( vcl::Window* pParent,
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index e5be4de5f999..7d75a69b9d98 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -230,7 +230,14 @@ class AbstractSpellDialog_Impl : public AbstractSpellDialog
 class TitleDialog;
 class AbstractTitleDialog_Impl : public AbstractTitleDialog
 {
-DECL_ABSTDLG_BASE(AbstractTitleDialog_Impl,TitleDialog)
+protected:
+std::unique_ptr m_xDlg;
+public:
+explicit AbstractTitleDialog_Impl(TitleDialog* p)
+: m_xDlg(p)
+{
+}
+virtual short Execute() override;
 virtual OUString  GetTitle() const override ;
 
 };
@@ -666,8 +673,7 @@ public:
 svx::SpellDialogChildWindow* pSpellChildWindow ) 
override;
 
 virtual VclPtr 
CreateActualizeProgressDialog( vcl::Window* pParent, GalleryTheme* pThm ) 
override;
-virtual VclPtr CreateTitleDialog( vcl::Window* 
pParent,
- const OUString& rOldText) 
override;
+virtual VclPtr CreateTitleDialog(weld::Window* 
pParent, const OUString& rOldText) override;
 virtual VclPtr CreateGalleryIdDialog( 
vcl::Window* pParent,
 GalleryTheme* pThm) override;
 virtual VclPtr 
CreateGalleryThemePropertiesDialog(vcl::Window* pParent,
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index e9c96b561b0a..c316fb6b7e95 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -168,15 

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx svx/source

2018-04-09 Thread Caolán McNamara
 cui/source/dialogs/cuifmsearch.cxx|2 -
 cui/source/dialogs/srchxtra.cxx   |   39 --
 cui/source/factory/dlgfact.cxx|   20 +--
 cui/source/factory/dlgfact.hxx|   11 ++--
 cui/source/inc/srchxtra.hxx   |   31 +++
 cui/uiconfig/ui/similaritysearchdialog.ui |   30 ++-
 include/svx/svxdlg.hxx|2 -
 svx/source/dialog/srchdlg.cxx |2 -
 8 files changed, 74 insertions(+), 63 deletions(-)

New commits:
commit 40ca52ee802ea3992caa82f811eab124381bc121
Author: Caolán McNamara 
Date:   Mon Apr 9 13:03:02 2018 +0100

weld SvxSearchSimilarityDialog

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

diff --git a/cui/source/dialogs/cuifmsearch.cxx 
b/cui/source/dialogs/cuifmsearch.cxx
index 69a867b4f036..cbca9ae7fa3a 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -356,7 +356,7 @@ IMPL_LINK(FmSearchDialog, OnClickedSpecialSettings, 
Button*, pButton, void )
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
 if (pFact)
 {
-ScopedVclPtr 
pDlg(pFact->CreateSvxSearchSimilarityDialog( this, 
m_pSearchEngine->GetLevRelaxed(), m_pSearchEngine->GetLevOther(),
+ScopedVclPtr 
pDlg(pFact->CreateSvxSearchSimilarityDialog(GetFrameWeld(), 
m_pSearchEngine->GetLevRelaxed(), m_pSearchEngine->GetLevOther(),
 m_pSearchEngine->GetLevShorter(), 
m_pSearchEngine->GetLevLonger() ));
 DBG_ASSERT( pDlg, "FmSearchDialog, OnClickedSpecialSettings: could 
not load the dialog!" );
 if (pDlg && pDlg->Execute() == RET_OK)
diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx
index 3e07eefc2847..beee5afea428 100644
--- a/cui/source/dialogs/srchxtra.cxx
+++ b/cui/source/dialogs/srchxtra.cxx
@@ -235,39 +235,22 @@ IMPL_LINK_NOARG(SvxSearchAttributeDialog, OKHdl, Button*, 
void)
 
 // class SvxSearchSimilarityDialog ---
 
-SvxSearchSimilarityDialog::SvxSearchSimilarityDialog
-(
-vcl::Window* pParent,
-bool bRelax,
-sal_uInt16 nOther,
-sal_uInt16 nShorter,
-sal_uInt16 nLonger
-) :
-ModalDialog( pParent, "SimilaritySearchDialog", 
"cui/ui/similaritysearchdialog.ui" )
+SvxSearchSimilarityDialog::SvxSearchSimilarityDialog(weld::Window* pParent, 
bool bRelax,
+sal_uInt16 nOther, sal_uInt16 nShorter, sal_uInt16 nLonger)
+: GenericDialogController(pParent, "cui/ui/similaritysearchdialog.ui", 
"SimilaritySearchDialog")
+, m_xOtherFld(m_xBuilder->weld_spin_button("otherfld"))
+, m_xLongerFld(m_xBuilder->weld_spin_button("longerfld"))
+, m_xShorterFld(m_xBuilder->weld_spin_button("shorterfld"))
+, m_xRelaxBox(m_xBuilder->weld_check_button("relaxbox"))
 {
-get( m_pOtherFld, "otherfld");
-get( m_pLongerFld, "longerfld");
-get( m_pShorterFld, "shorterfld");
-get( m_pRelaxBox, "relaxbox");
-
-m_pOtherFld->SetValue( nOther );
-m_pShorterFld->SetValue( nShorter );
-m_pLongerFld->SetValue( nLonger );
-m_pRelaxBox->Check( bRelax );
+m_xOtherFld->set_value(nOther);
+m_xShorterFld->set_value(nShorter);
+m_xLongerFld->set_value(nLonger);
+m_xRelaxBox->set_active(bRelax);
 }
 
 SvxSearchSimilarityDialog::~SvxSearchSimilarityDialog()
 {
-disposeOnce();
-}
-
-void SvxSearchSimilarityDialog::dispose()
-{
-m_pOtherFld.clear();
-m_pLongerFld.clear();
-m_pShorterFld.clear();
-m_pRelaxBox.clear();
-ModalDialog::dispose();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 091c920b9c5a..2002a4339183 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -113,7 +113,12 @@ IMPL_ABSTDLG_BASE(AbstractTitleDialog_Impl);
 IMPL_ABSTDLG_BASE(AbstractScriptSelectorDialog_Impl);
 IMPL_ABSTDLG_BASE(AbstractGalleryIdDialog_Impl);
 IMPL_ABSTDLG_BASE(AbstractURLDlg_Impl);
-IMPL_ABSTDLG_BASE(AbstractSvxSearchSimilarityDialog_Impl);
+
+short AbstractSvxSearchSimilarityDialog_Impl::Execute()
+{
+return m_xDlg->run();
+}
+
 IMPL_ABSTDLG_BASE(AbstractSvxTransformTabDialog_Impl);
 IMPL_ABSTDLG_BASE(AbstractSvxCaptionDialog_Impl);
 IMPL_ABSTDLG_BASE(AbstractSvxJSearchOptionsDialog_Impl);
@@ -498,22 +503,22 @@ OUString AbstractURLDlg_Impl::GetName() const
 
 sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetOther()
 {
-return pDlg->GetOther();
+return m_xDlg->GetOther();
 }
 
 sal_uInt16 AbstractSvxSearchSimilarityDialog_Impl::GetShorter()
 {
-return pDlg->GetShorter();
+return m_xDlg->GetShorter();
 }
 
 sal_uInt16