[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-08-13 Thread Caolán McNamara (via logerrit)
 cui/source/options/optgdlg.cxx |5 -
 cui/source/options/optgdlg.hxx |1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 4d45200945462fda2ed3ae906106b5c6df6466e0
Author: Caolán McNamara 
AuthorDate: Wed Aug 7 10:13:08 2019 +0100
Commit: Xisco Faulí 
CommitDate: Tue Aug 13 10:25:23 2019 +0200

Resolves: tdf#125483 locale separator label needs to be derived from 
original

regression from...

commit fa3d5ca1f99fe253689004a45ec2888ebbe85fd3
Date:   Thu May 30 12:33:32 2013 +0200

Convert Languages tab page to .ui

Change-Id: I940269d14a0a84768c4f8e62c153cfac51cf577f
Reviewed-on: https://gerrit.libreoffice.org/77088
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 535262f022a8..082919e25768 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1170,6 +1170,9 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(vcl::Window* 
pParent, const SfxItemSet&
 get(m_pCTLSupportCB, "ctlsupport");
 get(m_pIgnoreLanguageChangeCB, "ignorelanguagechange");
 
+// tdf#125483 save original default label
+m_sDecimalSeparatorLabel = m_pDecimalSeparatorCB->GetText();
+
 // initialize user interface language selection
 m_sSystemDefaultString = SvtLanguageTable::GetLanguageString( 
LANGUAGE_SYSTEM );
 
@@ -1801,7 +1804,7 @@ IMPL_LINK( OfaLanguagesTabPage, LocaleSettingHdl, 
ListBox&, rListBox, void )
 LocaleDataWrapper aLocaleWrapper( aLanguageTag );
 
 // update the decimal separator key of the related CheckBox
-OUString sTempLabel(m_pDecimalSeparatorCB->GetText());
+OUString sTempLabel(m_sDecimalSeparatorLabel);
 sTempLabel = sTempLabel.replaceFirst("%1", 
aLocaleWrapper.getNumDecimalSep() );
 m_pDecimalSeparatorCB->SetText(sTempLabel);
 
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index 08d5634a889e..890c2efce3e3 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -163,6 +163,7 @@ class OfaLanguagesTabPage : public SfxTabPage
 
 OUStringm_sUserLocaleValue;
 OUStringm_sSystemDefaultString;
+OUStringm_sDecimalSeparatorLabel;
 
 boolm_bDatePatternsValid;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-08-12 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/tplnedef.cxx |   15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

New commits:
commit ac996989897dca899b8fd388c32c6512021b802b
Author: Caolán McNamara 
AuthorDate: Fri Aug 9 12:18:53 2019 +0100
Commit: Xisco Faulí 
CommitDate: Mon Aug 12 14:08:43 2019 +0200

Resolves: tdf#126736 change range on change of unit

and make the max % 800 instead of 500 while we're at it
(0.15cm is considered 100% FWIW)

when flipping from measurement unit to %

Change-Id: Ia1b15559f3db0d1e11d4563ad7c6aacc3f9ba32d
Reviewed-on: https://gerrit.libreoffice.org/77194
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 5d822005f8ba..dea7c0e3ba02 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -408,6 +408,11 @@ void 
SvxLineDefTabPage::ChangeMetricHdl_Impl(weld::ToggleButton* p)
 m_xMtrLength2->set_unit(eFUnit);
 m_xMtrDistance->set_unit(eFUnit);
 
+// tdf#126736 max 5cm
+m_xMtrLength1->set_range(0, 500, FieldUnit::CM);
+m_xMtrLength2->set_range(0, 500, FieldUnit::CM);
+m_xMtrDistance->set_range(0, 500, FieldUnit::CM);
+
 SetMetricValue( *m_xMtrLength1, nTmp1, ePoolUnit );
 SetMetricValue( *m_xMtrLength2, nTmp2, ePoolUnit );
 SetMetricValue( *m_xMtrDistance, nTmp3, ePoolUnit );
@@ -438,10 +443,14 @@ void 
SvxLineDefTabPage::ChangeMetricHdl_Impl(weld::ToggleButton* p)
 m_xMtrLength2->set_unit(FieldUnit::PERCENT);
 m_xMtrDistance->set_unit(FieldUnit::PERCENT);
 
-SetMetricValue( *m_xMtrLength1, nTmp1, ePoolUnit );
-SetMetricValue( *m_xMtrLength2, nTmp2, ePoolUnit );
-SetMetricValue( *m_xMtrDistance, nTmp3, ePoolUnit );
+// tdf#126736 800%
+m_xMtrLength1->set_range(0, 800, FieldUnit::PERCENT);
+m_xMtrLength2->set_range(0, 800, FieldUnit::PERCENT);
+m_xMtrDistance->set_range(0, 800, FieldUnit::PERCENT);
 
+m_xMtrLength1->set_value(nTmp1, FieldUnit::PERCENT);
+m_xMtrLength2->set_value(nTmp2, FieldUnit::PERCENT);
+m_xMtrDistance->set_value(nTmp3, FieldUnit::PERCENT);
 }
 SelectTypeHdl_Impl( nullptr );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-08-08 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/swpossizetabpage.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 3c2076fd7366d4f10c6fcff1eb3cd3edc97d2167
Author: Caolán McNamara 
AuthorDate: Wed Aug 7 15:56:33 2019 +0100
Commit: Xisco Faulí 
CommitDate: Thu Aug 8 11:48:47 2019 +0200

Resolves: tdf#126691 width/height considered changed, but it didn't

regression from...

commit c4041a3b6c703254ee3977eef1a989992506772b
Author: Caolán McNamara 
Date:   Mon May 28 14:33:42 2018 +0100

weld SvxSwPosSizeTabPage

Change-Id: Ib8a5359a1aee9ac7b645621b9de9311cd56449f5
Reviewed-on: https://gerrit.libreoffice.org/77123
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/cui/source/tabpages/swpossizetabpage.cxx 
b/cui/source/tabpages/swpossizetabpage.cxx
index d5c536d4bdc7..df4b03381666 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -994,10 +994,12 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet* rSet)
 sal_Int32 nWidth = std::max( pItem ? ( static_cast(pItem)->GetValue()) : 0, sal_uInt32(1) );
 
 m_xWidthMF->set_value(m_xWidthMF->normalize(nWidth), FieldUnit::TWIP);
+m_xWidthMF->save_value();
 
 pItem = GetItem( *rSet, SID_ATTR_TRANSFORM_HEIGHT );
 sal_Int32 nHeight = std::max( pItem ? ( static_cast(pItem)->GetValue()) : 0, sal_uInt32(1) );
 m_xHeightMF->set_value(m_xHeightMF->normalize(nHeight), FieldUnit::TWIP);
+m_xHeightMF->save_value();
 m_fWidthHeightRatio = double(nWidth) / double(nHeight);
 
 if(!m_bPositioningDisabled)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-07-29 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/numpages.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 2faedd9849de26fea1f8ba7e98314d6ec479d63e
Author: Caolán McNamara 
AuthorDate: Mon Jul 29 09:53:36 2019 +0100
Commit: Michael Stahl 
CommitDate: Mon Jul 29 19:05:45 2019 +0200

Resolves: tdf#126485 remove max limit

Change-Id: Ieda7b500c1c08d169bfbfa995b42d3761d2427d7
Reviewed-on: https://gerrit.libreoffice.org/76528
Reviewed-by: Michael Stahl 
Tested-by: Jenkins

diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index d99d3888c9dd..ea18811d8f42 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2514,6 +2514,10 @@ 
SvxNumPositionTabPage::SvxNumPositionTabPage(TabPageParent pParent, const SfxIte
 {
 SetExchangeSupport();
 
+m_xAlignedAtMF->set_range(0, SAL_MAX_INT32, FieldUnit::NONE);
+m_xListtabMF->set_range(0, SAL_MAX_INT32, FieldUnit::NONE);
+m_xIndentAtMF->set_range(0, SAL_MAX_INT32, FieldUnit::NONE);
+
 m_xRelativeCB->set_active(true);
 m_xAlignLB->connect_changed(LINK(this, SvxNumPositionTabPage, 
EditModifyHdl_Impl));
 m_xAlign2LB->connect_changed(LINK(this, SvxNumPositionTabPage, 
EditModifyHdl_Impl));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-06-13 Thread Muhammet Kara (via logerrit)
 cui/source/customize/SvxMenuConfigPage.cxx |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit c98b7c9e75a951012d6693f5adecb1ff0e1f8f6b
Author: Muhammet Kara 
AuthorDate: Thu Jun 13 13:19:05 2019 +0200
Commit: Michael Weghorn 
CommitDate: Thu Jun 13 19:41:32 2019 +0200

Resolves tdf#125840: Crash when trying to customize Base Data View toolbar

Change-Id: If5b157c1f1362128d22d210286da741ba905e5aa
Reviewed-on: https://gerrit.libreoffice.org/73958
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/cui/source/customize/SvxMenuConfigPage.cxx 
b/cui/source/customize/SvxMenuConfigPage.cxx
index bf0247ca5f2c..03e3f9ac046d 100644
--- a/cui/source/customize/SvxMenuConfigPage.cxx
+++ b/cui/source/customize/SvxMenuConfigPage.cxx
@@ -223,10 +223,14 @@ void SvxMenuConfigPage::UpdateButtonStates()
 {
 SvxConfigEntry* pMenuData = GetTopLevelSelection();
 PopupMenu* pGearPopup = m_pGearBtn->GetPopupMenu();
+
+if (!pGearPopup)
+return;
+
 // Add option (gear_add) will always be enabled
-pGearPopup->EnableItem( "gear_delete", pMenuData->IsDeletable() );
-pGearPopup->EnableItem( "gear_rename", pMenuData->IsRenamable() );
-pGearPopup->EnableItem( "gear_move", pMenuData->IsMovable() );
+pGearPopup->EnableItem( "gear_delete", pMenuData && 
pMenuData->IsDeletable() );
+pGearPopup->EnableItem( "gear_rename", pMenuData && 
pMenuData->IsRenamable() );
+pGearPopup->EnableItem( "gear_move", pMenuData && 
pMenuData->IsMovable() );
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-06-07 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/autocdlg.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit d0c5664add278379e07cec673f28d6aec35b1f81
Author: Caolán McNamara 
AuthorDate: Sun May 26 16:42:27 2019 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jun 7 11:46:28 2019 +0200

Resolves: tdf#125348 some an initial fixed width for the treeview

the final width will be determined by the width of the entry boxes above it

Change-Id: Ifcac2a2ef220cbacf5cd0ef6531e4a04e10a7326
Reviewed-on: https://gerrit.libreoffice.org/72989
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
Reviewed-on: https://gerrit.libreoffice.org/73020
Reviewed-by: Miklos Vajna 

diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index ee0ab7f2e37a..6a3223aebc33 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -775,7 +775,9 @@ 
OfaAutocorrReplacePage::OfaAutocorrReplacePage(TabPageParent pParent,
 {
 sNew = m_xNewReplacePB->get_label();
 sModify = m_xReplacePB->get_label();
-m_xReplaceTLB->set_size_request(-1, m_xReplaceTLB->get_height_rows(10));
+// tdf#125348 set some small but fixed initial width size, final width will
+// depend on the size of the entry boxes
+m_xReplaceTLB->set_size_request(42, m_xReplaceTLB->get_height_rows(10));
 
 SfxModule *pMod = SfxApplication::GetModule(SfxToolsModule::Writer);
 bSWriter = pMod == SfxModule::GetActiveModule();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-06-04 Thread Tamás Zolnai (via logerrit)
 cui/source/dialogs/cuicharmap.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 4531b32e0b58933179408fcff779aabe659e50a9
Author: Tamás Zolnai 
AuthorDate: Sat Jun 1 13:28:36 2019 +0200
Commit: Andras Timar 
CommitDate: Tue Jun 4 14:21:52 2019 +0200

tdf#125576: Empty recent characters in special characters dialog...

... for bullet customization

Change-Id: Ica66dcc0d3f379886788d426941b98d170444799
Reviewed-on: https://gerrit.libreoffice.org/73306
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai 
(cherry picked from commit 7dc6525fddc418359eefa2cd7c7ecbbd1269e8f6)
Reviewed-on: https://gerrit.libreoffice.org/73310
Reviewed-by: Andras Timar 

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index 807b772fdbcd..4994582c250c 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -921,8 +921,12 @@ IMPL_LINK_NOARG(SvxCharacterMap, SearchCharSelectHdl, 
SvxShowCharSet*, void)
 
 IMPL_LINK_NOARG(SvxCharacterMap, InsertClickHdl, weld::Button&, void)
 {
-   insertCharToDoc(m_aShowChar.GetText());
-   m_xDialog->response(RET_OK);
+OUString sChar = m_aShowChar.GetText();
+insertCharToDoc(sChar);
+// Need to update recent character list, when OK button does not insert
+if(!m_xFrame.is())
+updateRecentCharacterList(sChar, aFont.GetFamilyName());
+m_xDialog->response(RET_OK);
 }
 
 IMPL_LINK_NOARG(SvxCharacterMap, FavSelectHdl, weld::Button&, void)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-06-01 Thread Takeshi Abe (via logerrit)
 cui/source/dialogs/about.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit df67a9ae9c1e9f3e21b1674deb4036f61eced05c
Author: Takeshi Abe 
AuthorDate: Thu May 30 23:56:25 2019 +0900
Commit: Xisco Faulí 
CommitDate: Sat Jun 1 19:58:36 2019 +0200

tdf#124936 Show "(x86)" in About dialog on the 32-bit version

... installed on Windows.

Change-Id: I2a4d846265b69f0e46e4c711430689ce39d60fcd
Reviewed-on: https://gerrit.libreoffice.org/73211
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 
(cherry picked from commit 932c1bd99f4b99705c3948d0babaa1f4160f37c3)
Reviewed-on: https://gerrit.libreoffice.org/73313
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index a99a814d28e1..2059ac7f10c3 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -304,6 +304,8 @@ OUString AboutDialog::GetVersionString()
 
 #ifdef _WIN64
 sVersion += " (x64)";
+#elif defined(_WIN32)
+sVersion += " (x86)";
 #endif
 
 OUString sBuildId = GetBuildId();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-05-22 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/transfrm.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 6431b8e8a977c959a375f061b9a24cd281228ad2
Author: Caolán McNamara 
AuthorDate: Mon May 20 15:57:16 2019 +0100
Commit: Xisco Faulí 
CommitDate: Wed May 22 12:55:36 2019 +0200

Resolves: tdf#125387 gtk3 fit-to-text stuck as disabled

should only disable/enable its parent container

Change-Id: I002a525b7ac4c178c3db7efc06848315afb785e0
Reviewed-on: https://gerrit.libreoffice.org/72624
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit c278c1cf3e9ad4c810534558b7f9ea1a41c5e1cc)
Reviewed-on: https://gerrit.libreoffice.org/72664
Reviewed-by: Xisco Faulí 

diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 2b56a7a76ad0..e77b890cb8d3 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -797,8 +797,6 @@ 
SvxPositionSizeTabPage::SvxPositionSizeTabPage(TabPageParent pParent, const SfxI
 m_xMtrHeight->connect_value_changed( LINK( this, SvxPositionSizeTabPage, 
ChangeHeightHdl ) );
 m_xCbxScale->connect_toggled( LINK( this, SvxPositionSizeTabPage, 
ClickAutoHdl ) );
 
-m_xTsbAutoGrowWidth->set_sensitive(false);
-m_xTsbAutoGrowHeight->set_sensitive(false);
 m_xFlAdjust->set_sensitive(false);
 
 // #i2379# disable controls when protected
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-05-21 Thread Caolán McNamara (via logerrit)
 cui/source/inc/align.hxx  |   12 +-
 cui/source/tabpages/align.cxx |   48 ++
 2 files changed, 50 insertions(+), 10 deletions(-)

New commits:
commit 23ccf16e9e86ecc64367f41f4df695d0a6926d72
Author: Caolán McNamara 
AuthorDate: Fri May 17 17:09:16 2019 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 21 12:52:16 2019 +0200

Resolves: tdf#124467 enable wrap text to return to TRISTATE_INDET

Change-Id: Ie956560885fd9bb9e7367018a2f6e37a26c3c6af
Reviewed-on: https://gerrit.libreoffice.org/72495
Tested-by: Xisco Faulí 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx
index 1f5257e9d2c1..12dbcd5ab649 100644
--- a/cui/source/inc/align.hxx
+++ b/cui/source/inc/align.hxx
@@ -76,9 +76,19 @@ private:
 boolHasAlignmentChanged( const SfxItemSet& rNew, 
sal_uInt16 nWhich ) const;
 
 DECL_LINK(UpdateEnableHdl, weld::ComboBox&, void);
-DECL_LINK(UpdateEnableClickHdl, weld::ToggleButton&, void);
+DECL_LINK(StackedClickHdl, weld::ToggleButton&, void);
+DECL_LINK(AsianModeClickHdl, weld::ToggleButton&, void);
+DECL_LINK(WrapClickHdl, weld::ToggleButton&, void);
+DECL_LINK(HyphenClickHdl, weld::ToggleButton&, void);
+DECL_LINK(ShrinkClickHdl, weld::ToggleButton&, void);
 
 private:
+weld::TriStateEnabled m_aStackedState;
+weld::TriStateEnabled m_aAsianModeState;
+weld::TriStateEnabled m_aWrapState;
+weld::TriStateEnabled m_aHyphenState;
+weld::TriStateEnabled m_aShrinkState;
+
 SvxDialControl m_aCtrlDial;
 SvtValueSet m_aVsRefEdge;
 
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index 57e23b0bba46..b278de9951be 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -141,8 +141,12 @@ AlignmentTabPage::AlignmentTabPage(TabPageParent pParent, 
const SfxItemSet& rCor
 InitVsRefEgde();
 
 m_xLbHorAlign->connect_changed(LINK(this, AlignmentTabPage, 
UpdateEnableHdl));
-m_xBtnWrap->connect_toggled(LINK(this, AlignmentTabPage, 
UpdateEnableClickHdl));
-m_xCbStacked->connect_toggled(LINK(this, AlignmentTabPage, 
UpdateEnableClickHdl));
+
+m_xCbStacked->connect_toggled(LINK(this, AlignmentTabPage, 
StackedClickHdl));
+m_xCbAsianMode->connect_toggled(LINK(this, AlignmentTabPage, 
AsianModeClickHdl));
+m_xBtnWrap->connect_toggled(LINK(this, AlignmentTabPage, WrapClickHdl));
+m_xBtnHyphen->connect_toggled(LINK(this, AlignmentTabPage, 
HyphenClickHdl));
+m_xBtnShrink->connect_toggled(LINK(this, AlignmentTabPage, 
ShrinkClickHdl));
 
 // Asian vertical mode
 m_xCbAsianMode->show(SvtCJKOptions().IsVerticalTextEnabled());
@@ -320,26 +324,30 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet )
 
 namespace
 {
-void ResetBool(sal_uInt16 nWhich, const SfxItemSet* pSet, 
weld::CheckButton& rBtn)
+void ResetBool(sal_uInt16 nWhich, const SfxItemSet* pSet, 
weld::CheckButton& rBtn, weld::TriStateEnabled& rTriState)
 {
 SfxItemState eState = pSet->GetItemState(nWhich);
 switch (eState)
 {
 case SfxItemState::UNKNOWN:
 rBtn.hide();
+rTriState.bTriStateEnabled = false;
 break;
 case SfxItemState::DISABLED:
 case SfxItemState::READONLY:
 rBtn.set_sensitive(false);
+rTriState.bTriStateEnabled = false;
 break;
 case SfxItemState::DONTCARE:
 rBtn.set_state(TRISTATE_INDET);
+rTriState.bTriStateEnabled = true;
 break;
 case SfxItemState::DEFAULT:
 case SfxItemState::SET:
 {
 const SfxBoolItem& rItem = static_cast(pSet->Get(nWhich));
 rBtn.set_state(static_cast(rItem.GetValue()));
+rTriState.bTriStateEnabled = false;
 break;
 }
 }
@@ -351,11 +359,11 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs)
 {
 SfxTabPage::Reset(pCoreAttrs);
 
-ResetBool(GetWhich(SID_ATTR_ALIGN_STACKED), pCoreAttrs, *m_xCbStacked);
-ResetBool(GetWhich(SID_ATTR_ALIGN_ASIANVERTICAL), pCoreAttrs, 
*m_xCbAsianMode);
-ResetBool(GetWhich(SID_ATTR_ALIGN_LINEBREAK), pCoreAttrs, *m_xBtnWrap);
-ResetBool(GetWhich(SID_ATTR_ALIGN_HYPHENATION), pCoreAttrs, *m_xBtnHyphen);
-ResetBool(GetWhich(SID_ATTR_ALIGN_SHRINKTOFIT), pCoreAttrs, *m_xBtnShrink);
+ResetBool(GetWhich(SID_ATTR_ALIGN_STACKED), pCoreAttrs, *m_xCbStacked, 
m_aStackedState);
+ResetBool(GetWhich(SID_ATTR_ALIGN_ASIANVERTICAL), pCoreAttrs, 
*m_xCbAsianMode, m_aAsianModeState);
+ResetBool(GetWhich(SID_ATTR_ALIGN_LINEBREAK), pCoreAttrs, *m_xBtnWrap, 
m_aWrapState);
+ResetBool(GetWhich(SID_ATTR_ALIGN_HYPHENATION), pCoreAttrs, *m_xBtnHyphen, 
m_aHyphenState);
+

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-05-21 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/autocdlg.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 2ff0b6bd5e549ee97f668e210df1b6911238cb7e
Author: Caolán McNamara 
AuthorDate: Thu May 16 17:24:13 2019 +0100
Commit: Miklos Vajna 
CommitDate: Tue May 21 11:33:08 2019 +0200

not much point setting the checkbox on each insertion

Change-Id: Ibc12e52d075c7bc7c33b7c25841cfd122d6c014e
Reviewed-on: https://gerrit.libreoffice.org/72452
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 354fc5d336f3..ee0ab7f2e37a 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -921,7 +921,6 @@ void OfaAutocorrReplacePage::RefillReplaceBox(bool 
bFromReset,
 // formatted text is only in Writer
 if (bSWriter || bTextOnly)
 {
-m_xTextOnlyCB->set_active(bTextOnly);
 OUString sId;
 if (!bTextOnly)
 {
@@ -948,7 +947,6 @@ void OfaAutocorrReplacePage::RefillReplaceBox(bool 
bFromReset,
 // formatted text is only in Writer
 if (bSWriter || bTextOnly)
 {
-m_xTextOnlyCB->set_active(elem->IsTextOnly());
 OUString sId;
 if (!bTextOnly)
 {
@@ -980,6 +978,7 @@ void OfaAutocorrReplacePage::RefillReplaceBox(bool 
bFromReset,
 }
 else
 {
+m_xTextOnlyCB->set_active(true);
 m_xTextOnlyCB->set_sensitive(false);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source include/vcl sc/source vcl/source

2019-05-09 Thread Caolán McNamara (via logerrit)
 cui/source/inc/paragrph.hxx   |   28 
 cui/source/tabpages/paragrph.cxx  |   20 
 include/vcl/weld.hxx  |   12 
 sc/source/ui/attrdlg/tabpages.cxx |   20 
 sc/source/ui/inc/tabpages.hxx |   20 
 vcl/source/app/salvtables.cxx |   20 
 6 files changed, 44 insertions(+), 76 deletions(-)

New commits:
commit 70bb74f2ef9bc81aa1141b6ab35ffb2a411bb656
Author: Caolán McNamara 
AuthorDate: Wed May 8 12:26:39 2019 +0100
Commit: Michael Stahl 
CommitDate: Thu May 9 11:10:15 2019 +0200

merge duplicated TriStateEnabled class

Change-Id: I1c10010eb7fd33a03f477af0cba03ae74859b174
Reviewed-on: https://gerrit.libreoffice.org/71999
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index 183dbba699dc..b741934754ef 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -184,18 +184,6 @@ public:
 virtual voidPageCreated(const SfxAllItemSet& aSet) override;
 };
 
-struct TriStateEnabled
-{
-TriState eState;
-bool bTriStateEnabled;
-TriStateEnabled()
-: eState(TRISTATE_INDET)
-, bTriStateEnabled(true)
-{
-}
-void ButtonToggled(weld::ToggleButton& rToggle);
-};
-
 // class SvxExtParagraphTabPage --
 /*
 [Description]
@@ -235,14 +223,14 @@ protected:
 private:
 SvxExtParagraphTabPage(TabPageParent pParent, const SfxItemSet& rSet);
 
-TriStateEnabled aHyphenState;
-TriStateEnabled aPageBreakState;
-TriStateEnabled aApplyCollState;
-TriStateEnabled aPageNumState;
-TriStateEnabled aKeepTogetherState;
-TriStateEnabled aKeepParaState;
-TriStateEnabled aOrphanState;
-TriStateEnabled aWidowState;
+weld::TriStateEnabled aHyphenState;
+weld::TriStateEnabled aPageBreakState;
+weld::TriStateEnabled aApplyCollState;
+weld::TriStateEnabled aPageNumState;
+weld::TriStateEnabled aKeepTogetherState;
+weld::TriStateEnabled aKeepParaState;
+weld::TriStateEnabled aOrphanState;
+weld::TriStateEnabled aWidowState;
 
 boolbPageBreak;
 boolbHtmlMode;
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index a8d9d8ab6003..35515175c760 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -2063,26 +2063,6 @@ IMPL_LINK(SvxExtParagraphTabPage, WidowHdl_Impl, 
weld::ToggleButton&, rToggle, v
 WidowHdl();
 }
 
-void TriStateEnabled::ButtonToggled(weld::ToggleButton& rToggle)
-{
-if (bTriStateEnabled)
-{
-switch (eState)
-{
-case TRISTATE_INDET:
-rToggle.set_state(TRISTATE_FALSE);
-break;
-case TRISTATE_TRUE:
-rToggle.set_state(TRISTATE_INDET);
-break;
-case TRISTATE_FALSE:
-rToggle.set_state(TRISTATE_TRUE);
-break;
-}
-}
-eState = rToggle.get_state();
-}
-
 IMPL_LINK(SvxExtParagraphTabPage, OrphanHdl_Impl, weld::ToggleButton&, 
rToggle, void)
 {
 aOrphanState.ButtonToggled(rToggle);
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 449829015054..a124cd09786d 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -627,6 +627,18 @@ public:
 virtual void connect_toggled(const Link& rLink) { 
m_aToggleHdl = rLink; }
 };
 
+struct VCL_DLLPUBLIC TriStateEnabled
+{
+TriState eState;
+bool bTriStateEnabled;
+TriStateEnabled()
+: eState(TRISTATE_INDET)
+, bTriStateEnabled(true)
+{
+}
+void ButtonToggled(ToggleButton& rToggle);
+};
+
 class VCL_DLLPUBLIC MenuButton : virtual public ToggleButton
 {
 protected:
diff --git a/sc/source/ui/attrdlg/tabpages.cxx 
b/sc/source/ui/attrdlg/tabpages.cxx
index 6ce555b62085..8795514813aa 100644
--- a/sc/source/ui/attrdlg/tabpages.cxx
+++ b/sc/source/ui/attrdlg/tabpages.cxx
@@ -144,26 +144,6 @@ DeactivateRC ScTabPageProtection::DeactivatePage( 
SfxItemSet* pSetP )
 return DeactivateRC::LeavePage;
 }
 
-void TriStateEnabled::ButtonToggled(weld::ToggleButton& rToggle)
-{
-if (bTriStateEnabled)
-{
-switch (eState)
-{
-case TRISTATE_INDET:
-rToggle.set_state(TRISTATE_FALSE);
-break;
-case TRISTATE_TRUE:
-rToggle.set_state(TRISTATE_INDET);
-break;
-case TRISTATE_FALSE:
-rToggle.set_state(TRISTATE_TRUE);
-break;
-}
-}
-eState = rToggle.get_state();
-}
-
 IMPL_LINK(ScTabPageProtection, ProtectClickHdl, weld::ToggleButton&, rBox, 
void)
 {
 aProtectState.ButtonToggled(rBox);
diff --git a/sc/source/ui/inc/tabpages.hxx b/sc/source/ui/inc/tabpages.hxx
index 5d195bb3cde2..16046ab4f6bc 100644
--- 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-05-06 Thread Jim Raykowski (via logerrit)
 cui/source/inc/cuitabarea.hxx|1 +
 cui/source/tabpages/tpbitmap.cxx |   20 ++--
 2 files changed, 19 insertions(+), 2 deletions(-)

New commits:
commit 6c3ceaf3e4d59c658d0f9e4e1b22204be25f74e2
Author: Jim Raykowski 
AuthorDate: Wed Jan 23 22:13:21 2019 -0900
Commit: Katarina Behrens 
CommitDate: Mon May 6 22:08:25 2019 +0200

Fix bitmap not being selected and displayed in bitmap tab page

The background tab page uses SvxBrushItem. Area tab page uses
XFillBitmapItem. setSvxBrushItemAsFillAttributesToTargetSet creates
empty string for XFillBitmapItem name. Bitmap can be identified by
GraphicObject::GetUniqueId. Use this to select bitmap in bitmap tab page
bitmap list.

Change-Id: Ic739c0b462502a986358bf00acfbac01fafd19f7
Reviewed-on: https://gerrit.libreoffice.org/66838
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 
(cherry picked from commit 6850fcef74f7d3d82dc17143dd1befdf250977d7)
Reviewed-on: https://gerrit.libreoffice.org/71855
Reviewed-by: Katarina Behrens 

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index f98a6acc9c6f..8faa44e825f2 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -564,6 +564,7 @@ private:
 void ClickBitmapHdl_Impl();
 void CalculateBitmapPresetSize();
 sal_Int32 SearchBitmapList(const OUString& rBitmapName);
+sal_Int32 SearchBitmapList(const GraphicObject& rGraphicObject);
 
 public:
 SvxBitmapTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs);
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index f73301e373a2..78f795ee0cf8 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -157,9 +157,9 @@ void SvxBitmapTabPage::ActivatePage( const SfxItemSet& rSet 
)
 sal_Int32 nPos( 0 );
 if ( !aItem.isPattern() )
 {
-nPos = SearchBitmapList( aItem.GetName() );
+nPos = SearchBitmapList( aItem.GetGraphicObject() );
 if ( nPos == LISTBOX_ENTRY_NOTFOUND )
-nPos = 0;
+return;
 }
 else
 {
@@ -784,6 +784,22 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, 
weld::Button&, void)
 }
 }
 
+sal_Int32 SvxBitmapTabPage::SearchBitmapList(const GraphicObject& 
rGraphicObject)
+{
+long nCount = m_pBitmapList->Count();
+sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
+
+for(long i = 0;i < nCount;i++)
+{
+if(rGraphicObject.GetUniqueID() == m_pBitmapList->GetBitmap( i 
)->GetGraphicObject().GetUniqueID())
+{
+nPos = i;
+break;
+}
+}
+return nPos;
+}
+
 sal_Int32 SvxBitmapTabPage::SearchBitmapList(const OUString& rBitmapName)
 {
 long nCount = m_pBitmapList->Count();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-05-03 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/cuigaldlg.cxx |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit 7bfbac57ee1c0ad1e22f6fd351882e027975b635
Author: Caolán McNamara 
AuthorDate: Fri May 3 10:28:44 2019 +0100
Commit: Christian Lohmaier 
CommitDate: Fri May 3 21:42:44 2019 +0200

Resolves: tdf#125080 crashing adding a ref to a non-VclPtr

Change-Id: I72a0deaab3d86ac0772092ab5f60bcace7632847
Reviewed-on: https://gerrit.libreoffice.org/71732
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index a272d3d54590..06f3e824fa1c 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -216,8 +216,6 @@ IMPL_LINK_NOARG(SearchProgress, CleanUpHdl, void*, void)
 m_aSearchThread->join();
 
 m_xDialog->response(RET_OK);
-
-m_xDialog.reset();
 }
 
 void SearchProgress::LaunchThread()
@@ -244,7 +242,6 @@ TakeThread::~TakeThread()
 {
 }
 
-
 void TakeThread::execute()
 {
 sal_Int32   nEntries;
@@ -289,10 +286,9 @@ void TakeThread::execute()
 pStatusProgress.reset();
 }
 
-Application::PostUserEvent( LINK( mpProgress, TakeProgress, CleanUpHdl ), 
nullptr, true );
+Application::PostUserEvent(LINK(mpProgress, TakeProgress, CleanUpHdl));
 }
 
-
 TakeProgress::TakeProgress(weld::Window* pParent, TPGalleryThemeProperties* 
pTabPage)
 : GenericDialogController(pParent, "cui/ui/galleryapplyprogress.ui",
   "GalleryApplyProgress")
@@ -364,7 +360,6 @@ IMPL_LINK_NOARG(TakeProgress, CleanUpHdl, void*, void)
 xWait.reset();
 
 m_xDialog->response(RET_OK);
-m_xDialog.reset();
 }
 
 void TakeProgress::LaunchThread()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source fpicker/source sc/source sd/source sfx2/source svx/source sw/source vcl/source

2019-05-02 Thread Stephan Bergmann (via logerrit)
 cui/source/dialogs/cuigaldlg.cxx|2 +-
 fpicker/source/office/OfficeFilePicker.cxx  |2 +-
 fpicker/source/office/OfficeFolderPicker.cxx|2 +-
 sc/source/ui/view/tabvwsha.cxx  |2 +-
 sd/source/ui/animations/CustomAnimationPane.cxx |2 +-
 sd/source/ui/func/fuarea.cxx|2 +-
 sd/source/ui/func/fuline.cxx|2 +-
 sd/source/ui/func/futransf.cxx  |2 +-
 sfx2/source/appl/childwin.cxx   |2 +-
 svx/source/gallery2/galbrws1.cxx|4 ++--
 sw/source/uibase/app/apphdl.cxx |2 +-
 sw/source/uibase/app/docst.cxx  |2 +-
 sw/source/uibase/shells/txtnum.cxx  |2 +-
 sw/source/uibase/uiview/viewling.cxx|2 +-
 vcl/source/window/dialog.cxx|2 +-
 15 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 4def21a89a90c642a4bf516c171564b0b578734f
Author: Stephan Bergmann 
AuthorDate: Mon Dec 17 08:53:07 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu May 2 12:32:01 2019 +0200

Resolve deprecated implicit capture of *this by reference in C++20

...as flagged with -Werror=deprecated by trunk GCC in -std=c++2a mode.  But
C++17 forbids "this" in combination with a capture-default of "=", so in 
such
cases list any entities explicitly that shall be captured by value.

Change-Id: Ic228cd20682277a0f93e3e75798356d0fbbb80d4
Reviewed-on: https://gerrit.libreoffice.org/65241
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit c56a8280bdd605f77f0075a7f2bfa474aa2a26e5)
Reviewed-on: https://gerrit.libreoffice.org/71661
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 20034936de80..a272d3d54590 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -817,7 +817,7 @@ void TPGalleryThemeProperties::SearchFiles()
 xProgress->SetDirectory( INetURLObject() );
 
 xProgress->LaunchThread();
-weld::DialogController::runAsync(xProgress, [=](sal_Int32 nResult) {
+weld::DialogController::runAsync(xProgress, [this](sal_Int32 nResult) {
 EndSearchProgressHdl(nResult);
 });
 }
diff --git a/fpicker/source/office/OfficeFilePicker.cxx 
b/fpicker/source/office/OfficeFilePicker.cxx
index 6f22961fdf8d..3397aa0e7b3c 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -503,7 +503,7 @@ void SAL_CALL SvtFilePicker::startExecuteModal( const 
Reference< css::ui::dialog
 prepareExecute();
 SvtFileDialog_Base* pDialog = getDialog();
 pDialog->EnableAutocompletion();
-pDialog->StartExecuteAsync([=](sal_Int32 nResult){
+pDialog->StartExecuteAsync([this](sal_Int32 nResult){
 DialogClosedHdl(nResult);
 });
 }
diff --git a/fpicker/source/office/OfficeFolderPicker.cxx 
b/fpicker/source/office/OfficeFolderPicker.cxx
index 06703055fb4b..b95f0f972980 100644
--- a/fpicker/source/office/OfficeFolderPicker.cxx
+++ b/fpicker/source/office/OfficeFolderPicker.cxx
@@ -65,7 +65,7 @@ void SAL_CALL SvtFolderPicker::startExecuteModal( const 
Reference< css::ui::dial
 prepareExecute();
 SvtFileDialog_Base* pDialog = getDialog();
 pDialog->EnableAutocompletion();
-pDialog->StartExecuteAsync([=](sal_Int32 nResult){
+pDialog->StartExecuteAsync([this](sal_Int32 nResult){
 DialogClosedHdl(nResult);
 });
 }
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 2785c8097dcf..d8d8c22a6615 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -547,7 +547,7 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, 
const OString 
 std::shared_ptr pRequest(new SfxRequest(rReq));
 rReq.Ignore(); // the 'old' request is not relevant any more
 
-pDlg->StartExecuteAsync([=](sal_Int32 nResult){
+pDlg->StartExecuteAsync([pDlg, pOldSet, pRequest, this](sal_Int32 nResult){
 bInFormatDialog = false;
 
 if ( nResult == RET_OK )
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx 
b/sd/source/ui/animations/CustomAnimationPane.cxx
index ab695076ddc2..99675714021b 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -1667,7 +1667,7 @@ void CustomAnimationPane::showOptions(const OString& 
rPage)
 
 std::shared_ptr xDlg(new 
CustomAnimationDialog(GetFrameWeld(), std::move(xSet), rPage));
 
-weld::DialogController::runAsync(xDlg, [=](sal_Int32 nResult){
+weld::DialogController::runAsync(xDlg, [xDlg, this](sal_Int32 nResult){
 if (nResult )
 {
 addUndo();
diff --git a/sd/source/ui/func/fuarea.cxx b/sd/source/ui/func/fuarea.cxx
index 85eaef244991..a7cfa3fef87f 100644
--- 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-04-28 Thread Caolán McNamara (via logerrit)
 cui/source/inc/tabstpge.hxx  |4 ++--
 cui/source/tabpages/tabstpge.cxx |   30 ++
 2 files changed, 20 insertions(+), 14 deletions(-)

New commits:
commit 8b92cd8ff345d86e5b1cfee09e221826d135afc4
Author: Caolán McNamara 
AuthorDate: Sun Apr 28 17:16:36 2019 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun Apr 28 23:00:22 2019 +0200

Resolves: tdf#125002 toggling on radio button generates click on another

so use toggle and ignore toggle offs

Change-Id: Id6a9f3a7a9cf02d62ede00e4c246629406f9a64b
Reviewed-on: https://gerrit.libreoffice.org/71482
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/cui/source/inc/tabstpge.hxx b/cui/source/inc/tabstpge.hxx
index e79cfc767949..ade5a184c75e 100644
--- a/cui/source/inc/tabstpge.hxx
+++ b/cui/source/inc/tabstpge.hxx
@@ -137,8 +137,8 @@ private:
 DECL_LINK(DelHdl_Impl, weld::Button&, void);
 DECL_LINK(DelAllHdl_Impl, weld::Button&, void);
 
-DECL_LINK(FillTypeCheckHdl_Impl, weld::Button&, void);
-DECL_LINK(TabTypeCheckHdl_Impl, weld::Button&, void);
+DECL_LINK(FillTypeCheckHdl_Impl, weld::ToggleButton&, void);
+DECL_LINK(TabTypeCheckHdl_Impl, weld::ToggleButton&, void);
 
 DECL_LINK(SelectHdl_Impl, weld::TreeView&, void);
 DECL_LINK(ModifyHdl_Impl, weld::ComboBox&, void);
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index d47645ee4801..729d6fcc28de 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -123,22 +123,22 @@ SvxTabulatorTabPage::SvxTabulatorTabPage(TabPageParent 
pParent, const SfxItemSet
 m_xDelBtn->connect_clicked(LINK(this,SvxTabulatorTabPage, DelHdl_Impl));
 m_xDelAllBtn->connect_clicked(LINK(this,SvxTabulatorTabPage, 
DelAllHdl_Impl));
 
-Link aLink = LINK(this, SvxTabulatorTabPage, 
TabTypeCheckHdl_Impl);
-m_xLeftTab->connect_clicked(aLink);
-m_xRightTab->connect_clicked(aLink);
-m_xDezTab->connect_clicked(aLink);
-m_xCenterTab->connect_clicked(aLink);
+Link aLink = LINK(this, SvxTabulatorTabPage, 
TabTypeCheckHdl_Impl);
+m_xLeftTab->connect_toggled(aLink);
+m_xRightTab->connect_toggled(aLink);
+m_xDezTab->connect_toggled(aLink);
+m_xCenterTab->connect_toggled(aLink);
 
 m_xDezChar->connect_focus_out(LINK(this,  SvxTabulatorTabPage, 
GetDezCharHdl_Impl));
 m_xDezChar->set_sensitive(false);
 m_xDezCharLabel->set_sensitive(false);
 
 aLink = LINK(this, SvxTabulatorTabPage, FillTypeCheckHdl_Impl);
-m_xNoFillChar->connect_clicked(aLink);
-m_xFillPoints->connect_clicked(aLink);
-m_xFillDashLine->connect_clicked(aLink);
-m_xFillSolidLine->connect_clicked(aLink);
-m_xFillSpecial->connect_clicked(aLink);
+m_xNoFillChar->connect_toggled(aLink);
+m_xFillPoints->connect_toggled(aLink);
+m_xFillDashLine->connect_toggled(aLink);
+m_xFillSolidLine->connect_toggled(aLink);
+m_xFillSpecial->connect_toggled(aLink);
 m_xFillChar->connect_focus_out(LINK(this,  SvxTabulatorTabPage, 
GetFillCharHdl_Impl));
 m_xFillChar->set_sensitive(false);
 
@@ -537,8 +537,11 @@ IMPL_LINK_NOARG(SvxTabulatorTabPage, DelAllHdl_Impl, 
weld::Button&, void)
 }
 }
 
-IMPL_LINK(SvxTabulatorTabPage, TabTypeCheckHdl_Impl, weld::Button&, rBox, void)
+IMPL_LINK(SvxTabulatorTabPage, TabTypeCheckHdl_Impl, weld::ToggleButton&, 
rBox, void)
 {
+if (!rBox.get_active())
+return;
+
 SvxTabAdjust eAdj;
 m_xDezChar->set_sensitive(false);
 m_xDezCharLabel->set_sensitive(false);
@@ -567,8 +570,11 @@ IMPL_LINK(SvxTabulatorTabPage, TabTypeCheckHdl_Impl, 
weld::Button&, rBox, void)
 }
 }
 
-IMPL_LINK(SvxTabulatorTabPage, FillTypeCheckHdl_Impl, weld::Button&, rBox, 
void)
+IMPL_LINK(SvxTabulatorTabPage, FillTypeCheckHdl_Impl, weld::ToggleButton&, 
rBox, void)
 {
+if (!rBox.get_active())
+return;
+
 sal_uInt8 cFill = ' ';
 m_xFillChar->set_text( "" );
 m_xFillChar->set_sensitive(false);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-04-26 Thread Caolán McNamara (via logerrit)
 cui/source/inc/border.hxx  |2 ++
 cui/source/tabpages/border.cxx |   21 +
 2 files changed, 15 insertions(+), 8 deletions(-)

New commits:
commit 324755caddb21e53454e56889f0d0e6b50923223
Author: Caolán McNamara 
AuthorDate: Thu Apr 25 11:14:53 2019 +0100
Commit: Michael Stahl 
CommitDate: Fri Apr 26 11:40:27 2019 +0200

Resolves: tdf#124804 border considered changed when it isn't

Change-Id: Ib4b6031b31500a8a2086721124b5b8f554f7c1c5
Reviewed-on: https://gerrit.libreoffice.org/71307
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index 009048d738fb..455b88ee5f8c 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -49,6 +49,8 @@ public:
 void SetControlValue(const SvxShadowItem& rItem);
 void SetControlDontKnow();
 
+bool get_value_changed_from_saved() const;
+
 private:
 SvtValueSet&mrVsPos;
 weld::MetricSpinButton& mrMfSize;
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 4960f160357f..b81b6830bfd9 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -157,9 +157,18 @@ void ShadowControlsWrapper::SetControlValue(const 
SvxShadowItem& rItem)
 mrVsPos.SetNoSelection();
 break;
 }
+mrVsPos.SaveValue();
 mrMfSize.set_value(mrMfSize.normalize(rItem.GetWidth()), FieldUnit::TWIP);
-mrLbColor.SelectEntry(rItem.GetColor());
 mrMfSize.save_value();
+mrLbColor.SelectEntry(rItem.GetColor());
+mrLbColor.SaveValue();
+}
+
+bool ShadowControlsWrapper::get_value_changed_from_saved() const
+{
+return mrVsPos.IsValueChangedFromSaved() ||
+   mrMfSize.get_value_changed_from_saved() ||
+   mrLbColor.IsValueChangedFromSaved();
 }
 
 void ShadowControlsWrapper::SetControlDontKnow()
@@ -833,16 +842,12 @@ bool SvxBorderTabPage::FillItemSet( SfxItemSet* 
rCoreAttrs )
 bAttrsChanged = true;
 }
 
-if (m_xShadowControls)
+if (m_xShadowControls && m_xShadowControls->get_value_changed_from_saved())
 {
 sal_uInt16 nShadowId = pPool->GetWhich(mnShadowSlot);
 const SvxShadowItem& rOldShadowItem = *static_cast(rCoreAttrs->GetItem(nShadowId));
-SvxShadowItem aNewShadowItem = 
m_xShadowControls->GetControlValue(rOldShadowItem);
-if (aNewShadowItem != rOldShadowItem)
-{
-rCoreAttrs->Put(aNewShadowItem);
-bAttrsChanged = true;
-}
+rCoreAttrs->Put(m_xShadowControls->GetControlValue(rOldShadowItem));
+bAttrsChanged = true;
 }
 
 if (m_xMarginControls && m_xMarginControls->get_value_changed_from_saved())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source cui/uiconfig

2019-04-09 Thread Caolán McNamara (via logerrit)
 cui/source/inc/paragrph.hxx  |   30 +++
 cui/source/tabpages/paragrph.cxx |  104 ++-
 cui/uiconfig/ui/textflowpage.ui  |3 +
 3 files changed, 126 insertions(+), 11 deletions(-)

New commits:
commit 99ec13e699ff2788db7c8eda7d9c41c1faa3d94d
Author: Caolán McNamara 
AuthorDate: Mon Mar 25 13:30:07 2019 +
Commit: Xisco Faulí 
CommitDate: Tue Apr 9 10:39:32 2019 +0200

Resolves: tdf#123550 allow returning to TRISTATE_INDET

Change-Id: I3e4b18c0b3217e010c80fbddccebd547ee29253a
Reviewed-on: https://gerrit.libreoffice.org/69675
Tested-by: Jenkins
Tested-by: Xisco Faulí 
Reviewed-by: Xisco Faulí 

diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index bbcb7b3d3f68..183dbba699dc 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -184,6 +184,18 @@ public:
 virtual voidPageCreated(const SfxAllItemSet& aSet) override;
 };
 
+struct TriStateEnabled
+{
+TriState eState;
+bool bTriStateEnabled;
+TriStateEnabled()
+: eState(TRISTATE_INDET)
+, bTriStateEnabled(true)
+{
+}
+void ButtonToggled(weld::ToggleButton& rToggle);
+};
+
 // class SvxExtParagraphTabPage --
 /*
 [Description]
@@ -223,6 +235,15 @@ protected:
 private:
 SvxExtParagraphTabPage(TabPageParent pParent, const SfxItemSet& rSet);
 
+TriStateEnabled aHyphenState;
+TriStateEnabled aPageBreakState;
+TriStateEnabled aApplyCollState;
+TriStateEnabled aPageNumState;
+TriStateEnabled aKeepTogetherState;
+TriStateEnabled aKeepParaState;
+TriStateEnabled aOrphanState;
+TriStateEnabled aWidowState;
+
 boolbPageBreak;
 boolbHtmlMode;
 sal_uInt16  nStdPos;
@@ -260,6 +281,14 @@ private:
 std::unique_ptr m_xWidowRowNo;
 std::unique_ptr m_xWidowRowLabel;
 
+void HyphenClickHdl();
+void PageNumBoxClickHdl();
+void ApplyCollClickHdl();
+void PageBreakHdl();
+void KeepTogetherHdl();
+void OrphanHdl();
+void WidowHdl();
+
 DECL_LINK(PageBreakHdl_Impl, weld::ToggleButton&, void);
 DECL_LINK(KeepTogetherHdl_Impl, weld::ToggleButton&, void);
 DECL_LINK(WidowHdl_Impl, weld::ToggleButton&, void);
@@ -269,6 +298,7 @@ private:
 DECL_LINK(PageBreakPosHdl_Impl, weld::ComboBox&, void);
 DECL_LINK(PageBreakTypeHdl_Impl, weld::ComboBox&, void);
 DECL_LINK(PageNumBoxClickHdl_Impl, weld::ToggleButton&, void);
+DECL_LINK(KeepParaBoxClickHdl_Impl, weld::ToggleButton&, void);
 
 virtual voidPageCreated(const SfxAllItemSet& aSet) override;
 };
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index f522b62b95d1..a8d9d8ab6003 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -1573,6 +1573,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* 
rSet )
 {
 const SvxHyphenZoneItem& rHyphen =
 static_cast(rSet->Get( _nWhich ));
+aHyphenState.bTriStateEnabled = false;
 
 bIsHyphen = rHyphen.IsHyphen();
 m_xHyphenBox->set_state(bIsHyphen ? TRISTATE_TRUE : TRISTATE_FALSE);
@@ -1599,6 +1600,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* 
rSet )
 {
 case SfxItemState::SET:
 {
+aPageNumState.bTriStateEnabled = false;
 m_xPageNumBox->set_state(TRISTATE_TRUE);
 SfxUInt16Item const*const 
pItem(rSet->GetItem(_nWhich));
 const sal_uInt16 nPageNum(pItem->GetValue());
@@ -1607,6 +1609,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* 
rSet )
 }
 case SfxItemState::DONTCARE:
 {
+aPageNumState.bTriStateEnabled = true;
 m_xPageNumBox->set_state(TRISTATE_INDET);
 break;
 }
@@ -1614,6 +1617,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* 
rSet )
 case SfxItemState::DEFAULT:
 case SfxItemState::DISABLED:
 {
+aPageNumState.bTriStateEnabled = false;
 m_xPageNumBox->set_state(TRISTATE_FALSE);
 break;
 }
@@ -1631,6 +1635,8 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* 
rSet )
 
 if ( eItemState >= SfxItemState::SET )
 {
+aApplyCollState.bTriStateEnabled = false;
+
 const SvxPageModelItem& rModel =
 static_cast(rSet->Get( _nWhich ));
 const OUString& aStr( rModel.GetValue() );
@@ -1642,6 +1648,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* 
rSet )
 bIsPageModel = true;
 
 m_xPageBreakBox->set_sensitive(true);
+aPageBreakState.bTriStateEnabled = false;
 m_xBreakTypeFT->set_sensitive(true);
 m_xBreakTypeLB->set_sensitive(true);
 m_xBreakPositionFT->set_sensitive(true);
@@ -1662,6 +1669,7 @@ 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-03-30 Thread Caolán McNamara (via logerrit)
 cui/source/tabpages/border.cxx |   12 
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 685c847a00ee653bd0c2bd42a7f7f866885896e8
Author: Caolán McNamara 
AuthorDate: Fri Mar 29 12:05:56 2019 +
Commit: Xisco Faulí 
CommitDate: Sat Mar 30 16:49:02 2019 +0100

Resolves: tdf#124410 crash cell border page with diagonal borders

Change-Id: I0fd8738d42ad33f029381dae0ec9f41e7912b72c
Reviewed-on: https://gerrit.libreoffice.org/69918
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 6c29dbb7a1c3a04f3cbaa3dd720db482755538d7)
Reviewed-on: https://gerrit.libreoffice.org/69919
Reviewed-by: Xisco Faulí 
Tested-by: Xisco Faulí 

diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 009297050a59..4960f160357f 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -549,15 +549,19 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet )
 if (m_aFrameSel.IsBorderEnabled(svx::FrameBorderType::TLBR))
 {
 sal_uInt16 nBorderDiagId = pPool->GetWhich(SID_ATTR_BORDER_DIAG_TLBR);
-const SvxLineItem& rLineItem(*static_cast(rSet->GetItem(nBorderDiagId)));
-m_aFrameSel.ShowBorder(svx::FrameBorderType::TLBR, 
rLineItem.GetLine());
+if (const SvxLineItem* pLineItem = static_cast(rSet->GetItem(nBorderDiagId)))
+m_aFrameSel.ShowBorder(svx::FrameBorderType::TLBR, 
pLineItem->GetLine());
+else
+m_aFrameSel.SetBorderDontCare(svx::FrameBorderType::TLBR);
 }
 
 if (m_aFrameSel.IsBorderEnabled(svx::FrameBorderType::BLTR))
 {
 sal_uInt16 nBorderDiagId = pPool->GetWhich(SID_ATTR_BORDER_DIAG_BLTR);
-const SvxLineItem& rLineItem(*static_cast(rSet->GetItem(nBorderDiagId)));
-m_aFrameSel.ShowBorder(svx::FrameBorderType::BLTR, 
rLineItem.GetLine());
+if (const SvxLineItem* pLineItem = static_cast(rSet->GetItem(nBorderDiagId)))
+m_aFrameSel.ShowBorder(svx::FrameBorderType::BLTR, 
pLineItem->GetLine());
+else
+m_aFrameSel.SetBorderDontCare(svx::FrameBorderType::BLTR);
 }
 
 if (m_xShadowControls)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-03-21 Thread Libreoffice Gerrit user
 cui/source/tabpages/tpbitmap.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8e56c7e5858b4d69bf1674ffeec27ae5d2c9ee79
Author: Caolán McNamara 
AuthorDate: Thu Mar 21 14:46:29 2019 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Mar 21 22:48:56 2019 +0100

Resolves: tdf#122804 make bitmap page 'add' dialog title localized

Change-Id: I0c4f6775b8bc9fae8dc81f07fec2e21218e36037
Reviewed-on: https://gerrit.libreoffice.org/69521
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index d8d0ea3ca01f..f73301e373a2 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -714,7 +714,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyTileOffsetHdl, 
weld::MetricSpinButton&,
 
 IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, weld::Button&, void)
 {
-SvxOpenGraphicDialog aDlg("Import", GetDialogFrameWeld());
+SvxOpenGraphicDialog aDlg(CuiResId(RID_SVXSTR_ADD_IMAGE), 
GetDialogFrameWeld());
 aDlg.EnableLink(false);
 long nCount = m_pBitmapList->Count();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-03-21 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuigaldlg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ddf479c183ef906ddc7eaff96c0fb9992d34aae1
Author: Caolán McNamara 
AuthorDate: Thu Mar 21 14:41:33 2019 +
Commit: Xisco Faulí 
CommitDate: Thu Mar 21 17:30:09 2019 +0100

Resolves: tdf#122803 make gallery 'add' dialog title localized

Change-Id: Iaa2ee6c982c8fd5d5cf1b9b09a835b917217d85c
Reviewed-on: https://gerrit.libreoffice.org/69517
Reviewed-by: Xisco Faulí 
Tested-by: Xisco Faulí 

diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 42329f0e95b0..20034936de80 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -926,7 +926,7 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, ClickTakeHdl, 
weld::Button&, void)
 
 if (!m_xLbxFound->count_selected_rows() || !bEntriesFound)
 {
-SvxOpenGraphicDialog aDlg("Gallery", GetDialogFrameWeld());
+SvxOpenGraphicDialog aDlg(CuiResId(RID_SVXSTR_KEY_GALLERY_DIR), 
GetDialogFrameWeld());
 aDlg.EnableLink(false);
 aDlg.AsLink(false);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source vcl/unx

2019-03-21 Thread Libreoffice Gerrit user
 cui/source/tabpages/page.cxx |   14 ++
 vcl/unx/gtk3/gtk3gtkinst.cxx |6 --
 2 files changed, 14 insertions(+), 6 deletions(-)

New commits:
commit 71e64623f08b162e18180cdae5ad532114e56190
Author: Caolán McNamara 
AuthorDate: Sat Mar 16 21:46:54 2019 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Mar 21 08:11:39 2019 +0100

Resolves: tdf#123650 explicitly grab focus after modification

of the widget after gaining focus, otherwise gtk loses track
of where the focus should be

and tdf#124226 do fill-on-demand hack only on first visit

disconnect focus handler after the fill

Change-Id: I90d9f36acf807aec8687c7f563449ef16d5eb574
Reviewed-on: https://gerrit.libreoffice.org/69356
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 81ad11e810f6..b8ed9094c06e 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -308,7 +308,6 @@ void SvxPageDescPage::Init_Impl()
 // adjust the handler
 m_xLayoutBox->connect_changed(LINK(this, SvxPageDescPage, LayoutHdl_Impl));
 
-m_xPaperTrayBox->connect_focus_in(LINK(this, SvxPageDescPage, 
PaperBinHdl_Impl));
 m_xPaperSizeBox->connect_changed(LINK(this, SvxPageDescPage, 
PaperSizeSelect_Impl));
 m_xPaperWidthEdit->connect_value_changed( LINK(this, SvxPageDescPage, 
PaperSizeModify_Impl));
 m_xPaperHeightEdit->connect_value_changed(LINK(this, SvxPageDescPage, 
PaperSizeModify_Impl));
@@ -410,6 +409,10 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet )
 
 m_xPaperTrayBox->append(OUString::number(nPaperBin), aBinName);
 m_xPaperTrayBox->set_active_text(aBinName);
+// reset focus handler to default first so know none already connected
+m_xPaperTrayBox->connect_focus_in(Link());
+// update the list when widget gets focus
+m_xPaperTrayBox->connect_focus_in(LINK(this, SvxPageDescPage, 
PaperBinHdl_Impl));
 
 Size aPaperSize = SvxPaperInfo::GetPaperSize( mpDefPrinter );
 pItem = GetItem( *rSet, SID_ATTR_PAGE_SIZE );
@@ -804,9 +807,8 @@ IMPL_LINK_NOARG(SvxPageDescPage, LayoutHdl_Impl, 
weld::ComboBox&, void)
 
 IMPL_LINK_NOARG(SvxPageDescPage, PaperBinHdl_Impl, weld::Widget&, void)
 {
-if (m_xPaperTrayBox->get_count() > 1)
-// already filled
-return;
+// tdf#124226 disconnect so not called again, unless Reset occurs
+m_xPaperTrayBox->connect_focus_in(Link());
 
 OUString aOldName = m_xPaperTrayBox->get_active_text();
 m_xPaperTrayBox->freeze();
@@ -826,6 +828,10 @@ IMPL_LINK_NOARG(SvxPageDescPage, PaperBinHdl_Impl, 
weld::Widget&, void)
 }
 m_xPaperTrayBox->set_active_text(aOldName);
 m_xPaperTrayBox->thaw();
+
+// tdf#123650 explicitly grab-focus after the modification otherwise gtk 
loses track
+// of there the focus should be
+m_xPaperTrayBox->grab_focus();
 }
 
 IMPL_LINK_NOARG(SvxPageDescPage, PaperSizeSelect_Impl, weld::ComboBox&, void)
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index b130fe5d4747..95f6ccfa4c48 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1222,11 +1222,12 @@ protected:
 GtkWidget* m_pWidget;
 GtkInstanceBuilder* m_pBuilder;
 
-static void signalFocusIn(GtkWidget*, GdkEvent*, gpointer widget)
+static gboolean signalFocusIn(GtkWidget*, GdkEvent*, gpointer widget)
 {
 GtkInstanceWidget* pThis = static_cast(widget);
 SolarMutexGuard aGuard;
 pThis->signal_focus_in();
+return false;
 }
 
 void signal_focus_in()
@@ -1234,11 +1235,12 @@ protected:
 m_aFocusInHdl.Call(*this);
 }
 
-static void signalFocusOut(GtkWidget*, GdkEvent*, gpointer widget)
+static gboolean signalFocusOut(GtkWidget*, GdkEvent*, gpointer widget)
 {
 GtkInstanceWidget* pThis = static_cast(widget);
 SolarMutexGuard aGuard;
 pThis->signal_focus_out();
+return false;
 }
 
 void signal_focus_out()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-03-19 Thread Libreoffice Gerrit user
 cui/source/inc/backgrnd.hxx  |6 +
 cui/source/inc/cuitabarea.hxx|5 +
 cui/source/tabpages/backgrnd.cxx |  154 +++
 cui/source/tabpages/tparea.cxx   |   10 ++
 4 files changed, 159 insertions(+), 16 deletions(-)

New commits:
commit 95355f66fdeddb4146f3ee14db899c70b09e54e7
Author: Jim Raykowski 
AuthorDate: Tue Jan 22 18:50:23 2019 -0900
Commit: Caolán McNamara 
CommitDate: Tue Mar 19 13:46:12 2019 +0100

tdf#122790 Improve background tab page for writer tables

This patch improves the new background tab page use for setting Writer
table cell, row, and table backgrounds. Now cell, row, and table
backgrounds fill tab page according to the fill style of each and can
all be set in the same opening of a Table Properties dialog. This patch
also makes the Reset reset background settings to initial settings of
dialog opening.

Change-Id: I567ef9229232f02d98b45a81309e920dca854bed
Reviewed-on: https://gerrit.libreoffice.org/66844
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 
(cherry picked from commit 222b5b5b9b0d0419e30961261c63ff8585550b81)
Reviewed-on: https://gerrit.libreoffice.org/69168
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index 8f02659118b6..78c82a6448ac 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -160,6 +160,11 @@ class SvxBkgTabPage : public SvxAreaTabPage
 boolbHighlighting   : 1;
 boolbCharBackColor  : 1;
 SfxItemSet maSet;
+std::unique_ptr m_pResetSet;
+
+sal_Int32 m_nActPos = -1;
+
+DECL_LINK(TblDestinationHdl_Impl, weld::ComboBox&, void);
 public:
 using SvxAreaTabPage::ActivatePage;
 using SvxAreaTabPage::DeactivatePage;
@@ -173,6 +178,7 @@ public:
 virtual void ActivatePage( const SfxItemSet& ) override;
 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 virtual void PageCreated( const SfxAllItemSet& aSet ) override;
+virtual void Reset( const SfxItemSet * ) override;
 };
 
 #endif // INCLUDED_CUI_SOURCE_INC_BACKGRND_HXX
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index d23a5209a78a..f98a6acc9c6f 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -252,6 +252,9 @@ protected:
 
 void SetOptimalSize(weld::DialogController* pController);
 
+void SelectFillType( weld::ToggleButton& rButton, const SfxItemSet* _pSet 
= nullptr );
+SfxTabPage* GetFillTabPage() { return m_pFillTabPage; }
+
 private:
 DECL_LINK(SelectFillTypeHdl_Impl, weld::ToggleButton&, void);
 
@@ -760,6 +763,8 @@ public:
 
 voidSetColorChgd( ChangeType* pIn ) { pnColorListState = pIn; }
 
+voidSetCtlPreviewOld( SfxItemSet& rAttrs ) { 
m_aCtlPreviewOld.SetAttributes( rAttrs ); }
+
 virtual void FillUserData() override;
 };
 
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index efcc9d270be9..9c29a1ae725a 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1345,6 +1345,26 @@ void SvxBackgroundTabPage::PageCreated(const 
SfxAllItemSet& aSet)
 }
 }
 
+static sal_uInt16 lcl_GetTableDestSlot(sal_Int32 nTblDest)
+{
+switch (nTblDest)
+{
+default:
+case TBL_DEST_CELL:
+{
+return SID_ATTR_BRUSH;
+}
+case TBL_DEST_ROW:
+{
+return SID_ATTR_BRUSH_ROW;
+}
+case TBL_DEST_TBL:
+{
+return SID_ATTR_BRUSH_TABLE;
+}
+}
+}
+
 SvxBkgTabPage::SvxBkgTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs)
 : SvxAreaTabPage(pParent, rInAttrs),
 bHighlighting(false),
@@ -1405,24 +1425,29 @@ DeactivateRC SvxBkgTabPage::DeactivatePage( SfxItemSet* 
_pSet )
 return DeactivateRC::LeavePage;
 }
 
-bool SvxBkgTabPage::FillItemSet( SfxItemSet* rCoreSet )
+void SvxBkgTabPage::Reset( const SfxItemSet* )
 {
-sal_uInt16 nSlot = SID_ATTR_BRUSH;
-if (m_xTblLBox && m_xTblLBox->get_visible())
+maSet.Set( *m_pResetSet.get() );
+if ( m_xTblLBox && m_xTblLBox->get_visible() )
 {
-switch (m_xTblLBox->get_active())
+m_nActPos = -1;
+const SfxPoolItem* pItem;
+if ( SfxItemState::SET == m_pResetSet->GetItemState( 
SID_BACKGRND_DESTINATION, false,  ) )
 {
-case TBL_DEST_CELL:
-nSlot = SID_ATTR_BRUSH;
-break;
-case TBL_DEST_ROW:
-nSlot = SID_ATTR_BRUSH_ROW;
-break;
-case TBL_DEST_TBL:
-nSlot = SID_ATTR_BRUSH_TABLE;
-break;
+sal_uInt16 nDestValue = static_cast(pItem)->GetValue();
+m_xTblLBox->set_active( nDestValue );
+TblDestinationHdl_Impl( *m_xTblLBox );
 }
+m_xTblLBox->save_value();
 }
+

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-03-18 Thread Libreoffice Gerrit user
 cui/source/inc/cuitabarea.hxx|2 --
 cui/source/tabpages/backgrnd.cxx |3 +--
 cui/source/tabpages/tparea.cxx   |5 +++--
 3 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 38792118d9e8bbbf1d1ee1f1874b32991fb1442b
Author: Jim Raykowski 
AuthorDate: Sun Jan 20 00:50:15 2019 -0900
Commit: Xisco Faulí 
CommitDate: Mon Mar 18 21:08:07 2019 +0100

Fix squeezed Bitmap fill style tab page layout in Background tab page

Just use the size set by the Area tab page class

Change-Id: Ie87b4e86a3c80e94f6d916dab217e52c82558074
Reviewed-on: https://gerrit.libreoffice.org/66650
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 
(cherry picked from commit db4c828913cfc8c33b8cc87b576fddcc2e705176)

Resolves: tdf#124058 factor bitmap page into size req when its toggled on

post ctor time

Change-Id: I8257c8ffdfc4dab9893ab7d2d67e218dd3f8097c

don't need m_aColorSize

Change-Id: I27740ae0bff0d1676799ddfba76eab5e7a299f66
Reviewed-on: https://gerrit.libreoffice.org/69364
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 3d69c9c717ae..d23a5209a78a 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -242,8 +242,6 @@ private:
 SfxItemSet& m_rXFSet;
 
 protected:
-Size m_aColorSize;
-
 std::unique_ptr m_xFillTab;
 std::unique_ptr m_xBtnNone;
 std::unique_ptr m_xBtnColor;
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index e7926e552be3..efcc9d270be9 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1376,8 +1376,6 @@ SvxBkgTabPage::SvxBkgTabPage(TabPageParent pParent, const 
SfxItemSet& rInAttrs)
 
 SetColorList(pColorTable);
 SetBitmapList(pBitmapList);
-
-m_xFillTab->set_size_request(m_aColorSize.Width(), m_aColorSize.Height());
 }
 
 SvxBkgTabPage::~SvxBkgTabPage()
@@ -1506,6 +1504,7 @@ void SvxBkgTabPage::PageCreated(const SfxAllItemSet& aSet)
 }
 if (nFlags & SvxBackgroundTabFlags::SHOW_SELECTOR)
 m_xBtnBitmap->show();
+SetOptimalSize(GetDialogController());
 }
 
 if ( bCharBackColor )
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index a311becb2fe1..b29d8147889a 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -121,6 +121,8 @@ SvxAreaTabPage::SvxAreaTabPage(TabPageParent pParent, const 
SfxItemSet& rInAttrs
 
 void SvxAreaTabPage::SetOptimalSize(weld::DialogController* pController)
 {
+m_xFillTab->set_size_request(-1, -1);
+
 TabPageParent aFillTab(m_xFillTab.get(), pController);
 // TEMP
 if (!aFillTab.pController)
@@ -128,8 +130,7 @@ void SvxAreaTabPage::SetOptimalSize(weld::DialogController* 
pController)
 
 // Calculate optimal size of all pages..
 m_pFillTabPage.disposeAndReset(SvxColorTabPage::Create(aFillTab, 
_rXFSet));
-m_aColorSize = m_xFillTab->get_preferred_size();
-Size aSize(m_aColorSize);
+Size aSize(m_xFillTab->get_preferred_size());
 
 if (m_xBtnGradient->get_visible())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source include/vcl vcl/qa vcl/source

2019-03-11 Thread Libreoffice Gerrit user
 cui/source/dialogs/FontFeaturesDialog.cxx |4 
 include/vcl/font/Feature.hxx  |   44 ---
 include/vcl/font/FeatureParser.hxx|   11 -
 vcl/qa/cppunit/FontFeatureTest.cxx|  182 ++
 vcl/source/font/Feature.cxx   |   35 -
 vcl/source/font/FeatureParser.cxx |   38 ++
 vcl/source/gdi/CommonSalLayout.cxx|4 
 7 files changed, 242 insertions(+), 76 deletions(-)

New commits:
commit 3450311c403af714d3fc0ba14b9f7673c717a6a2
Author: Khaled Hosny 
AuthorDate: Mon Mar 11 20:55:24 2019 +0200
Commit: Khaled Hosny 
CommitDate: Tue Mar 12 03:38:19 2019 +0100

tdf#123304: Allow the full feature syntax as pre 6.2

Fix regression from:

commit dc9ee533dc707cc10b99d537eaccc3ee5aa555fe
Author: Tomaž Vajngerl 
Date:   Fri Jun 15 19:32:15 2018 +0200

vcl: parser of font features included in the font name

Where hb_feature_from_string() was replaced by a simple parser that supports
avery limited subset of the syntax it supports (as documented in
https://harfbuzz.github.io/harfbuzz-hb-common.html#hb-feature-from-string)

Reviewed-on: https://gerrit.libreoffice.org/69062
Reviewed-by: Khaled Hosny 
Tested-by: Khaled Hosny 
(cherry picked from commit 45deb5b714d2d011eb2a5ad91721a9c2c508a426)

Change-Id: I613190a677d24183e8c718fcfcaf9cf9b37a1e8f
Reviewed-on: https://gerrit.libreoffice.org/69068
Reviewed-by: Khaled Hosny 
Tested-by: Khaled Hosny 

diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx 
b/cui/source/dialogs/FontFeaturesDialog.cxx
index 8da13eda49e6..f9276441c1a8 100644
--- a/cui/source/dialogs/FontFeaturesDialog.cxx
+++ b/cui/source/dialogs/FontFeaturesDialog.cxx
@@ -74,7 +74,7 @@ void FontFeaturesDialog::initialize()
 void FontFeaturesDialog::fillGrid(std::vector const& 
rFontFeatures)
 {
 vcl::font::FeatureParser aParser(m_sFontName);
-std::unordered_map aExistingFeatures = 
aParser.getFeaturesMap();
+auto aExistingFeatures = aParser.getFeaturesMap();
 
 sal_Int32 i = 0;
 for (vcl::font::Feature const& rFontFeature : rFontFeatures)
@@ -89,7 +89,7 @@ void 
FontFeaturesDialog::fillGrid(std::vector const& rFontFe
 
 m_aFeatureItems.emplace_back(m_xContentGrid.get());
 
-sal_uInt32 nValue = 0;
+uint32_t nValue = 0;
 if (aExistingFeatures.find(nFontFeatureCode) != 
aExistingFeatures.end())
 nValue = aExistingFeatures.at(nFontFeatureCode);
 
diff --git a/include/vcl/font/Feature.hxx b/include/vcl/font/Feature.hxx
index 299d0a55a9f2..76ba597b1ba2 100644
--- a/include/vcl/font/Feature.hxx
+++ b/include/vcl/font/Feature.hxx
@@ -21,13 +21,13 @@ namespace vcl
 {
 namespace font
 {
-constexpr sal_uInt32 featureCode(const char sFeature[4])
+constexpr uint32_t featureCode(const char sFeature[4])
 {
-return static_cast(sFeature[0]) << 24U | 
static_cast(sFeature[1]) << 16U
-   | static_cast(sFeature[2]) << 8U | 
static_cast(sFeature[3]);
+return static_cast(sFeature[0]) << 24U | 
static_cast(sFeature[1]) << 16U
+   | static_cast(sFeature[2]) << 8U | 
static_cast(sFeature[3]);
 }
 
-VCL_DLLPUBLIC OUString featureCodeAsString(sal_uInt32 nFeature);
+VCL_DLLPUBLIC OUString featureCodeAsString(uint32_t nFeature);
 
 enum class FeatureParameterType
 {
@@ -44,22 +44,22 @@ enum class FeatureType
 struct VCL_DLLPUBLIC FeatureParameter
 {
 private:
-sal_uInt32 m_nCode;
+uint32_t m_nCode;
 OUString m_sDescription;
 const char* m_pDescriptionID;
 
 public:
-FeatureParameter(sal_uInt32 nCode, OUString aDescription);
-FeatureParameter(sal_uInt32 nCode, const char* pDescriptionID);
+FeatureParameter(uint32_t nCode, OUString aDescription);
+FeatureParameter(uint32_t nCode, const char* pDescriptionID);
 
-sal_uInt32 getCode() const;
+uint32_t getCode() const;
 OUString getDescription() const;
 };
 
 class VCL_DLLPUBLIC FeatureDefinition
 {
 private:
-sal_uInt32 m_nCode;
+uint32_t m_nCode;
 OUString m_sDescription;
 const char* m_pDescriptionID;
 OUString m_sNumericPart;
@@ -69,18 +69,18 @@ private:
 
 public:
 FeatureDefinition();
-FeatureDefinition(sal_uInt32 nCode, OUString const& rDescription,
+FeatureDefinition(uint32_t nCode, OUString const& rDescription,
   FeatureParameterType eType = FeatureParameterType::BOOL,
   std::vector const& rEnumParameters
   = std::vector{});
-FeatureDefinition(sal_uInt32 nCode, const char* pDescriptionID,
+FeatureDefinition(uint32_t nCode, const char* pDescriptionID,
   OUString const& rNumericPart = OUString());
-FeatureDefinition(sal_uInt32 nCode, const char* pDescriptionID,
+FeatureDefinition(uint32_t nCode, const char* pDescriptionID,
   std::vector aEnumParameters);
 
 const std::vector& getEnumParameters() const;
 OUString 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source vcl/unx

2019-03-07 Thread Libreoffice Gerrit user
 cui/source/tabpages/numfmt.cxx |2 +-
 vcl/unx/gtk3/gtk3gtkinst.cxx   |   23 +--
 2 files changed, 18 insertions(+), 7 deletions(-)

New commits:
commit 115f3749a737de337f6b456dcc84b6e3a6fdfc0e
Author: Caolán McNamara 
AuthorDate: Thu Feb 21 15:57:22 2019 +
Commit: Miklos Vajna 
CommitDate: Thu Mar 7 18:15:06 2019 +0100

menu of currency combobox in format-cells is too narrow

we want the combobox to be narrower than it wants to be.  To make that 
happen
we have only the option of shrinking the cell renderer of the combobox area.
And that is also used by the menu.

Setting a small value of e.g. 1 works to let the combobox not request more
width than that, and the combobox will correctly render within the wider 
size
it actually gets. But then the menu is a min width menu, which is 
undesirable,
we want the menu to be as wide as it can be.

So calculate what part of the combobox belongs to the cell area and set
the widest cell area we can within the overall combobox width, resulting
in the widest menu we can get.

Change-Id: Ie3e9960a320a70471ac21d2a88f32632cafa951f
Reviewed-on: https://gerrit.libreoffice.org/68168
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index b6a4a8ba4d5c..d202232b951d 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -234,7 +234,7 @@ 
SvxNumberFormatTabPage::SvxNumberFormatTabPage(TabPageParent pParent,
 auto nWidth = approximate_char_width() * 26;
 m_xLbCategory->set_size_request(nWidth, m_xLbCategory->get_height_rows(7));
 m_xLbFormat->set_size_request(nWidth, m_xLbFormat->get_height_rows(5));
-m_xLbCurrency->set_size_request(1, -1);  // width of 1, so real width will 
be that of its LbFormat sibling
+m_xLbCurrency->set_size_request(nWidth, -1);  // width of 1, so real width 
will be that of its LbFormat sibling
 
 // Initially remove the "Automatically" entry.
 m_xLbCurrency->set_active(-1); // First ensure that nothing is selected.
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index a9fdfd3615eb..e81f451f7fa0 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -6978,20 +6978,31 @@ public:
 // tweak the cell render to get a narrower size to stick
 GList* cells = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(m_pComboBox));
 GtkCellRenderer* cell = static_cast(cells->data);
-GtkRequisition size;
-gtk_cell_renderer_get_preferred_size(cell, m_pWidget, , nullptr);
-if (nWidth < size.width)
+
+if (nWidth != -1)
 {
 // this bit isn't great, I really want to be able to ellipse the 
text in the comboboxtext itself and let
-// the popup menu render them in full, in the interim ellipse both
+// the popup menu render them in full, in the interim ellipse both 
of them
 g_object_set(G_OBJECT(m_pTextRenderer), "ellipsize", 
PANGO_ELLIPSIZE_MIDDLE, nullptr);
-gtk_cell_renderer_set_fixed_size(cell, nWidth, size.height);
+
+// to find out how much of the width of the combobox belongs to 
the cell, set
+// the cell and widget to the min cell width and see what the 
difference is
+int min;
+gtk_cell_renderer_get_preferred_width(cell, m_pWidget, , 
nullptr);
+gtk_cell_renderer_set_fixed_size(cell, min, -1);
+gtk_widget_set_size_request(m_pWidget, min, -1);
+int nNonCellWidth = get_preferred_size().Width() - min;
+
+// now set the cell to the max width which it can be within the
+// requested widget width
+gtk_cell_renderer_set_fixed_size(cell, nWidth - nNonCellWidth, -1);
 }
 else
 {
 g_object_set(G_OBJECT(m_pTextRenderer), "ellipsize", 
PANGO_ELLIPSIZE_NONE, nullptr);
-gtk_cell_renderer_set_fixed_size(cell, -1, size.height);
+gtk_cell_renderer_set_fixed_size(cell, -1, -1);
 }
+
 g_list_free(cells);
 
 gtk_widget_set_size_request(m_pWidget, nWidth, nHeight);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source include/vcl

2019-03-04 Thread Libreoffice Gerrit user
 cui/source/inc/tabstpge.hxx  |2 ++
 cui/source/tabpages/tabstpge.cxx |   16 ++--
 include/vcl/weld.hxx |2 +-
 3 files changed, 13 insertions(+), 7 deletions(-)

New commits:
commit a5a6e9c8021d547943ad8085873b82ec68136c18
Author: Caolán McNamara 
AuthorDate: Thu Feb 14 12:36:29 2019 +
Commit: Christian Lohmaier 
CommitDate: Mon Mar 4 16:43:45 2019 +0100

Resolves: tdf#123426 don't reformat tabstop pos while editing

we want to know what it would format as, but we don't want to do
the formatting during typing

Change-Id: I817798adf5b3f9325682f43b92fe107659803b4f
Reviewed-on: https://gerrit.libreoffice.org/67820
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/cui/source/inc/tabstpge.hxx b/cui/source/inc/tabstpge.hxx
index d244064b5c67..e79cfc767949 100644
--- a/cui/source/inc/tabstpge.hxx
+++ b/cui/source/inc/tabstpge.hxx
@@ -130,6 +130,8 @@ private:
 voidSetFillAndTabType_Impl();
 voidNewHdl_Impl(weld::Button*);
 
+OUStringFormatTab();
+
 // Handler
 DECL_LINK(NewHdl_Impl, weld::Button&, void);
 DECL_LINK(DelHdl_Impl, weld::Button&, void);
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index 8220e0b19d04..d47645ee4801 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -434,6 +434,7 @@ void SvxTabulatorTabPage::NewHdl_Impl(weld::Button* pBtn)
 {
 // Add a new one and select it
 // Get the value from the display
+ReformatHdl_Impl(*m_xTabBox);
 m_xTabSpin->set_text(m_xTabBox->get_active_text());
 auto nVal = m_xTabSpin->denormalize(m_xTabSpin->get_value(eDefUnit));
 
@@ -488,8 +489,7 @@ void SvxTabulatorTabPage::NewHdl_Impl(weld::Button* pBtn)
 
 int SvxTabulatorTabPage::FindCurrentTab()
 {
-ReformatHdl_Impl(*m_xTabBox);
-return m_xTabBox->find_text(m_xTabBox->get_active_text());
+return m_xTabBox->find_text(FormatTab());
 }
 
 IMPL_LINK_NOARG(SvxTabulatorTabPage, DelHdl_Impl, weld::Button&, void)
@@ -632,11 +632,16 @@ IMPL_LINK_NOARG(SvxTabulatorTabPage, SelectHdl_Impl, 
weld::TreeView&, void)
 }
 }
 
-IMPL_LINK_NOARG(SvxTabulatorTabPage, ReformatHdl_Impl, weld::Widget&, void)
+OUString SvxTabulatorTabPage::FormatTab()
 {
 m_xTabSpin->set_text(m_xTabBox->get_active_text());
-m_xTabSpin->set_value(m_xTabSpin->get_value(FieldUnit::NONE), 
FieldUnit::NONE);
-m_xTabBox->set_entry_text(m_xTabSpin->get_text());
+m_xTabSpin->reformat();
+return m_xTabSpin->get_text();
+}
+
+IMPL_LINK_NOARG(SvxTabulatorTabPage, ReformatHdl_Impl, weld::Widget&, void)
+{
+m_xTabBox->set_entry_text(FormatTab());
 }
 
 IMPL_LINK_NOARG(SvxTabulatorTabPage, ModifyHdl_Impl, weld::ComboBox&, void)
@@ -649,7 +654,6 @@ IMPL_LINK_NOARG(SvxTabulatorTabPage, ModifyHdl_Impl, 
weld::ComboBox&, void)
 
 m_xTabSpin->set_text(m_xTabBox->get_active_text());
 aCurrentTab.GetTabPos() = 
m_xTabSpin->denormalize(m_xTabSpin->get_value(eDefUnit));
-
 m_xNewBtn->set_sensitive(false);
 m_xDelBtn->set_sensitive(true);
 return;
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 557f206abeca..449829015054 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -999,7 +999,7 @@ public:
 // typically you only need to call this if set_text (e.g. with "") was
 // previously called to display some arbitrary text instead of the
 // formatted value and now you want to show it as formatted again
-void reformat() { set_value(get_value(m_eSrcUnit), m_eSrcUnit); }
+void reformat() { spin_button_output(*m_xSpinButton); }
 
 void set_range(int min, int max, FieldUnit eValueUnit)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-02-28 Thread Libreoffice Gerrit user
 cui/source/inc/cuitabarea.hxx|2 +
 cui/source/tabpages/backgrnd.cxx |4 ++-
 cui/source/tabpages/tparea.cxx   |   48 ++-
 3 files changed, 38 insertions(+), 16 deletions(-)

New commits:
commit b3ef6fd488cb2b08488fd61494704755b0800712
Author: Caolán McNamara 
AuthorDate: Wed Feb 27 11:41:54 2019 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Feb 28 22:09:03 2019 +0100

Related: tdf#123711 better optimal size for highlighting tab

it only uses the color subtab, so just measure
ones which can be visible

Change-Id: Id09419480fd920b242f4d0d65e9ac5fbfb619784
Reviewed-on: https://gerrit.libreoffice.org/68432
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 19c52a601f25..3d69c9c717ae 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -252,6 +252,8 @@ protected:
 std::unique_ptr m_xBtnBitmap;
 std::unique_ptr m_xBtnPattern;
 
+void SetOptimalSize(weld::DialogController* pController);
+
 private:
 DECL_LINK(SelectFillTypeHdl_Impl, weld::ToggleButton&, void);
 
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index b41680e22c81..e7926e552be3 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1480,7 +1480,9 @@ bool SvxBkgTabPage::FillItemSet( SfxItemSet* rCoreSet )
 
 VclPtr SvxBkgTabPage::Create(TabPageParent pWindow, const 
SfxItemSet* rAttrs)
 {
-return VclPtr::Create(pWindow, *rAttrs);
+auto xRet = VclPtr::Create(pWindow, *rAttrs);
+xRet->SetOptimalSize(pWindow.pController);
+return xRet;
 }
 
 void SvxBkgTabPage::PageCreated(const SfxAllItemSet& aSet)
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index cacca8f8d51e..a311becb2fe1 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -117,8 +117,11 @@ SvxAreaTabPage::SvxAreaTabPage(TabPageParent pParent, 
const SfxItemSet& rInAttrs
 m_xBtnPattern->connect_toggled(aLink);
 
 SetExchangeSupport();
+}
 
-TabPageParent aFillTab(m_xFillTab.get(), pParent.pController);
+void SvxAreaTabPage::SetOptimalSize(weld::DialogController* pController)
+{
+TabPageParent aFillTab(m_xFillTab.get(), pController);
 // TEMP
 if (!aFillTab.pController)
 aFillTab.pParent = GetParentDialog();
@@ -126,21 +129,34 @@ SvxAreaTabPage::SvxAreaTabPage(TabPageParent pParent, 
const SfxItemSet& rInAttrs
 // Calculate optimal size of all pages..
 m_pFillTabPage.disposeAndReset(SvxColorTabPage::Create(aFillTab, 
_rXFSet));
 m_aColorSize = m_xFillTab->get_preferred_size();
-m_pFillTabPage.disposeAndReset(SvxGradientTabPage::Create(aFillTab, 
_rXFSet));
-Size aGradientSize = m_xFillTab->get_preferred_size();
-m_pFillTabPage.disposeAndReset(SvxBitmapTabPage::Create(aFillTab, 
_rXFSet));
-Size aBitmapSize = m_xFillTab->get_preferred_size();
-m_pFillTabPage.disposeAndReset(SvxHatchTabPage::Create(aFillTab, 
_rXFSet));
-Size aHatchSize = m_xFillTab->get_preferred_size();
-m_pFillTabPage.disposeAndReset(SvxPatternTabPage::Create(aFillTab, 
_rXFSet));
-Size aPatternSize = m_xFillTab->get_preferred_size();
+Size aSize(m_aColorSize);
+
+if (m_xBtnGradient->get_visible())
+{
+m_pFillTabPage.disposeAndReset(SvxGradientTabPage::Create(aFillTab, 
_rXFSet));
+Size aGradientSize = m_xFillTab->get_preferred_size();
+lclExtendSize(aSize, aGradientSize);
+}
+if (m_xBtnBitmap->get_visible())
+{
+m_pFillTabPage.disposeAndReset(SvxBitmapTabPage::Create(aFillTab, 
_rXFSet));
+Size aBitmapSize = m_xFillTab->get_preferred_size();
+lclExtendSize(aSize, aBitmapSize);
+}
+if (m_xBtnHatch->get_visible())
+{
+m_pFillTabPage.disposeAndReset(SvxHatchTabPage::Create(aFillTab, 
_rXFSet));
+Size aHatchSize = m_xFillTab->get_preferred_size();
+lclExtendSize(aSize, aHatchSize);
+}
+if (m_xBtnPattern->get_visible())
+{
+m_pFillTabPage.disposeAndReset(SvxPatternTabPage::Create(aFillTab, 
_rXFSet));
+Size aPatternSize = m_xFillTab->get_preferred_size();
+lclExtendSize(aSize, aPatternSize);
+}
 m_pFillTabPage.disposeAndClear();
 
-Size aSize(m_aColorSize);
-lclExtendSize(aSize, aGradientSize);
-lclExtendSize(aSize, aBitmapSize);
-lclExtendSize(aSize, aHatchSize);
-lclExtendSize(aSize, aPatternSize);
 m_xFillTab->set_size_request(aSize.Width(), aSize.Height());
 }
 
@@ -326,7 +342,9 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs )
 
 VclPtr SvxAreaTabPage::Create(TabPageParent pParent, const 
SfxItemSet* rAttrs)
 {
-return VclPtr::Create(pParent, *rAttrs);
+auto xRet = VclPtr::Create(pParent, *rAttrs);
+xRet->SetOptimalSize(pParent.pController);
+return xRet;
 }
 
 namespace {

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-02-11 Thread Libreoffice Gerrit user
 cui/source/inc/cuitabline.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 04a6277f40727bf814c67a75e55ce3a6dcbc6bec
Author: Caolán McNamara 
AuthorDate: Mon Feb 11 10:31:43 2019 +
Commit: Xisco Faulí 
CommitDate: Mon Feb 11 16:10:14 2019 +0100

Resolves: tdf#123309 destroy menu before menubutton

Change-Id: Ib6b179c460bed4ffdcc2678294633004bbae816a
Reviewed-on: https://gerrit.libreoffice.org/67678
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx
index 284a0e656a55..bd26683b7963 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -148,8 +148,6 @@ private:
 std::unique_ptr m_xMtrEndWidth;
 std::unique_ptr m_xTsbCenterEnd;
 std::unique_ptr m_xCbxSynchronize;
-std::unique_ptr m_xGalleryMenu;
-std::unique_ptr m_xSymbolsMenu;
 std::unique_ptr m_xCtlPreview;
 
 std::unique_ptr m_xFLEdgeStyle;
@@ -162,6 +160,8 @@ private:
 std::unique_ptr m_xFlSymbol;
 std::unique_ptr m_xGridIconSize;
 std::unique_ptr m_xSymbolMB;
+std::unique_ptr m_xSymbolsMenu;
+std::unique_ptr m_xGalleryMenu;
 std::unique_ptr m_xSymbolWidthMF;
 std::unique_ptr m_xSymbolHeightMF;
 std::unique_ptr m_xSymbolRatioCB;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-02-06 Thread Libreoffice Gerrit user
 cui/source/dialogs/SpellDialog.cxx |7 ---
 cui/source/inc/SpellDialog.hxx |2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 80198e1da81bd23ab698ff73d2d758f648acdcef
Author: Szymon Kłos 
AuthorDate: Mon Jan 21 11:20:19 2019 +0100
Commit: Miklos Vajna 
CommitDate: Wed Feb 6 09:23:05 2019 +0100

tdf#122748 Don't restore previous language selection

Change-Id: I8688c65695080804bae22209ed5d4890ced1a8dc
Reviewed-on: https://gerrit.libreoffice.org/66678
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 
(cherry picked from commit 1b1999009962b9d79858139bd7573947f78e6669)
Reviewed-on: https://gerrit.libreoffice.org/66738
Reviewed-by: Miklos Vajna 

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 42c6721b3ec8..0b27d8d20aab 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -296,7 +296,7 @@ void SpellDialog::Init_Impl()
 LinguMgr::GetChangeAllList()->clear();
 }
 
-void SpellDialog::UpdateBoxes_Impl()
+void SpellDialog::UpdateBoxes_Impl(bool bCallFromSelectHdl)
 {
 sal_Int32 i;
 m_pSuggestionLB->Clear();
@@ -323,7 +323,8 @@ void SpellDialog::UpdateBoxes_Impl()
 }
 else
 SetTitle_Impl( nAltLanguage );
-m_pLanguageLB->SelectLanguage( nAltLanguage );
+if( !bCallFromSelectHdl )
+m_pLanguageLB->SelectLanguage( nAltLanguage );
 int nDicts = InitUserDicts();
 
 // enter alternatives
@@ -766,7 +767,7 @@ IMPL_LINK(SpellDialog, LanguageSelectHdl, ListBox&, rBox, 
void)
 
  
m_pSentenceED->AddUndoAction(o3tl::make_unique(SPELLUNDO_CHANGE_LANGUAGE,
 aDialogUndoLink));
 }
-SpellDialog::UpdateBoxes_Impl();
+SpellDialog::UpdateBoxes_Impl(true);
 }
 
 
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx
index 9af4d9af83c9..83ea575f91f5 100644
--- a/cui/source/inc/SpellDialog.hxx
+++ b/cui/source/inc/SpellDialog.hxx
@@ -196,7 +196,7 @@ private:
 voidAddToDictionaryExecute( sal_uInt16 ItemId, PopupMenu const 
*pMenu );
 voidStartSpellOptDlg_Impl();
 int InitUserDicts();
-voidUpdateBoxes_Impl();
+voidUpdateBoxes_Impl(bool bCallFromSelectHdl = false);
 voidInit_Impl();
 voidSpellContinue_Impl(bool UseSavedSentence = false, bool 
bIgnoreCurrentError = false );
 voidLockFocusChanges( bool bLock ) {bFocusLocked = bLock;}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source vcl/unx

2019-02-04 Thread Libreoffice Gerrit user
 cui/source/inc/page.hxx  |2 -
 cui/source/tabpages/page.cxx |4 +-
 vcl/unx/gtk3/gtk3gtkinst.cxx |   61 +--
 3 files changed, 56 insertions(+), 11 deletions(-)

New commits:
commit 5d0eba55bf516e94111aa4ed45c107cce6523124
Author: Caolán McNamara 
AuthorDate: Mon Jan 28 13:12:00 2019 +
Commit: Caolán McNamara 
CommitDate: Mon Feb 4 22:37:24 2019 +0100

Resolves: tdf#122930 paper tray is to update on focus-in

which adds the problem that GtkComboBox doesn't send a focus-in,
but its toggle does, to find and use that instead

Change-Id: I18d46511bf2e6997539a8413f574a94b24b4583f
Reviewed-on: https://gerrit.libreoffice.org/67016
Tested-by: Jenkins
Tested-by: Xisco Faulí 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index 7fe4681343f9..315d6a36fd82 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -135,7 +135,7 @@ private:
 
 voidInit_Impl();
 DECL_LINK(LayoutHdl_Impl, weld::ComboBox&, void);
-DECL_LINK(PaperBinHdl_Impl, weld::ComboBox&, void);
+DECL_LINK(PaperBinHdl_Impl, weld::Widget&, void);
 DECL_LINK(SwapOrientation_Impl, weld::Button&, void);
 void SwapFirstValues_Impl( bool bSet );
 DECL_LINK(BorderModify_Impl, weld::MetricSpinButton&, void);
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index c9cc5f5dfd64..81ad11e810f6 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -308,7 +308,7 @@ void SvxPageDescPage::Init_Impl()
 // adjust the handler
 m_xLayoutBox->connect_changed(LINK(this, SvxPageDescPage, LayoutHdl_Impl));
 
-m_xPaperTrayBox->connect_changed(LINK(this, SvxPageDescPage, 
PaperBinHdl_Impl));
+m_xPaperTrayBox->connect_focus_in(LINK(this, SvxPageDescPage, 
PaperBinHdl_Impl));
 m_xPaperSizeBox->connect_changed(LINK(this, SvxPageDescPage, 
PaperSizeSelect_Impl));
 m_xPaperWidthEdit->connect_value_changed( LINK(this, SvxPageDescPage, 
PaperSizeModify_Impl));
 m_xPaperHeightEdit->connect_value_changed(LINK(this, SvxPageDescPage, 
PaperSizeModify_Impl));
@@ -802,7 +802,7 @@ IMPL_LINK_NOARG(SvxPageDescPage, LayoutHdl_Impl, 
weld::ComboBox&, void)
 UpdateExample_Impl( true );
 }
 
-IMPL_LINK_NOARG(SvxPageDescPage, PaperBinHdl_Impl, weld::ComboBox&, void)
+IMPL_LINK_NOARG(SvxPageDescPage, PaperBinHdl_Impl, weld::Widget&, void)
 {
 if (m_xPaperTrayBox->get_count() > 1)
 // already filled
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 32da17be9fc5..08becd0c2ede 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1203,14 +1203,6 @@ class GtkInstanceWidget : public virtual weld::Widget
 {
 protected:
 GtkWidget* m_pWidget;
-private:
-bool m_bTakeOwnership;
-bool m_bFrozen;
-gulong m_nFocusInSignalId;
-gulong m_nFocusOutSignalId;
-gulong m_nKeyPressSignalId;
-gulong m_nKeyReleaseSignalId;
-gulong m_nSizeAllocateSignalId;
 
 static void signalFocusIn(GtkWidget*, GdkEvent*, gpointer widget)
 {
@@ -1236,6 +1228,15 @@ private:
 m_aFocusOutHdl.Call(*this);
 }
 
+private:
+bool m_bTakeOwnership;
+bool m_bFrozen;
+gulong m_nFocusInSignalId;
+gulong m_nFocusOutSignalId;
+gulong m_nKeyPressSignalId;
+gulong m_nKeyReleaseSignalId;
+gulong m_nSizeAllocateSignalId;
+
 static void signalSizeAllocate(GtkWidget*, GdkRectangle* allocation, 
gpointer widget)
 {
 GtkInstanceWidget* pThis = static_cast(widget);
@@ -6505,11 +6506,14 @@ private:
 GtkTreeModel* m_pTreeModel;
 GtkCellRenderer* m_pTextRenderer;
 GtkMenu* m_pMenu;
+GtkWidget* m_pToggleButton;
 std::unique_ptr m_xSorter;
 vcl::QuickSelectionEngine m_aQuickSelectionEngine;
 std::vector m_aSeparatorRows;
 gboolean m_bPopupActive;
 bool m_bAutoComplete;
+gulong m_nToggleFocusInSignalId;
+gulong m_nToggleFocusOutSignalId;
 gulong m_nChangedSignalId;
 gulong m_nPopupShownSignalId;
 gulong m_nKeyPressEventSignalId;
@@ -6860,15 +6864,29 @@ private:
 g_signal_connect(m_pMenu, "key-press-event", 
G_CALLBACK(signalKeyPress), this);
 }
 
+static void find_toggle_button(GtkWidget *pWidget, gpointer user_data)
+{
+if (g_strcmp0(gtk_widget_get_name(pWidget), "GtkToggleButton") == 0)
+{
+GtkWidget **ppToggleButton = static_cast(user_data);
+*ppToggleButton = pWidget;
+}
+else if (GTK_IS_CONTAINER(pWidget))
+gtk_container_forall(GTK_CONTAINER(pWidget), find_toggle_button, 
user_data);
+}
+
 public:
 GtkInstanceComboBox(GtkComboBox* pComboBox, bool bTakeOwnership)
 : GtkInstanceContainer(GTK_CONTAINER(pComboBox), bTakeOwnership)
 , m_pComboBox(pComboBox)
 , m_pTreeModel(gtk_combo_box_get_model(m_pComboBox))
 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-01-31 Thread Libreoffice Gerrit user
 cui/source/options/personalization.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 90b979e3977053f96f16ae4b87584536f5099280
Author: Xisco Fauli 
AuthorDate: Wed Jan 30 16:42:43 2019 +0100
Commit: Xisco Faulí 
CommitDate: Fri Feb 1 07:18:56 2019 +0100

tdf#123050: catch object does not have a key labeled 'theme_data'

json::document_error: node::child: this object does not have a key labeled 
'theme_data'

Change-Id: Ic4daf53cff4e3e25b83393cb92957bf60cd5a92c
Reviewed-on: https://gerrit.libreoffice.org/67161
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 45a0f2177b089065a2099a798639cb534ad67ac3)
Reviewed-on: https://gerrit.libreoffice.org/67227
Reviewed-by: Xisco Faulí 

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index f199ab2082cb..625362004fe6 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -814,10 +814,10 @@ PersonaInfo parseSingleResponse(const std::string& 
rResponse)
 return PersonaInfo();
 }
 
-auto theme_data = aDocumentRoot.child("theme_data");
-
 try
 {
+auto theme_data = aDocumentRoot.child("theme_data");
+
 PersonaInfo aNewPersona = {
 OUString(),
 OStringToOUString( 
OString(theme_data.child("name").string_value().get()),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-01-30 Thread Libreoffice Gerrit user
 cui/source/customize/cfg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1bb9126567becd881453da342315f139b4a564c9
Author: Julien Nabet 
AuthorDate: Wed Jan 30 09:12:35 2019 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jan 30 13:42:13 2019 +0100

tdf#123036: fix assert in cfg.cxx (cui)

See https://bugs.documentfoundation.org/show_bug.cgi?id=123036#c3

Regression from 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=52ccd8fabeea247da7077798b50a6db1da31a2eb

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

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index bfddfef5b6ec..4d4a8ef2ddc0 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1934,7 +1934,7 @@ SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog(
 
 m_sNewMenuEntryId = 
OUString::number(reinterpret_cast(pNewEntryData));
 m_xMenuListBox->append(m_sNewMenuEntryId,
-   
SvxConfigPageHelper::stripHotKey(pNewEntryData->GetName()), "");
+   
SvxConfigPageHelper::stripHotKey(pNewEntryData->GetName()));
 m_xMenuListBox->select(m_xMenuListBox->n_children() - 1);
 
 if (mpEntries)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-01-29 Thread Libreoffice Gerrit user
 cui/source/tabpages/chardlg.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 184e614038893d94f45dbcd6334ee8d682c2d7f3
Author: Caolán McNamara 
AuthorDate: Mon Jan 28 17:21:32 2019 +
Commit: Caolán McNamara 
CommitDate: Tue Jan 29 13:32:10 2019 +0100

Resolves: tdf#122992 allow pre-selected fonts not in the font list

Change-Id: I75c1b6d3933a5773d9e1dce40744c2342ab63ee8
Reviewed-on: https://gerrit.libreoffice.org/67025
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 
Tested-by: Xisco Faulí 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index c1a46b88663a..a12cc64ba4f6 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -673,7 +673,12 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, 
LanguageGroup eLangGrp
 if ( eState >= SfxItemState::DEFAULT )
 {
 pFontItem = static_cast(&( rSet.Get( nWhich ) ));
-pNameBox->set_active_text( pFontItem->GetFamilyName() );
+const OUString  = pFontItem->GetFamilyName();
+int nIndex = pNameBox->find_text(rName);
+pNameBox->set_active(nIndex);
+// tdf#122992 if it didn't exist in the list, set the entry text to it 
anyway
+if (nIndex == -1)
+pNameBox->set_entry_text(rName);
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-01-28 Thread Libreoffice Gerrit user
 cui/source/options/optgdlg.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 6ba08959ab0e70a3dd50a4a88134ccf7a18710ca
Author: Xisco Fauli 
AuthorDate: Thu Jan 24 10:13:18 2019 +0100
Commit: Katarina Behrens 
CommitDate: Mon Jan 28 12:05:05 2019 +0100

tdf#122912: Close option dialog if restart is confirmed ( part 2 )

forgot it in e961e08a3277158d4e3074bfacb8599296d2fa75

Change-Id: Id896bf407ca33faf0dbff74f3cbe98d23de0e0c7
Reviewed-on: https://gerrit.libreoffice.org/66846
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 
(cherry picked from commit c81340bcc73144e082efb9fc575ef62b9b046ca4)
Reviewed-on: https://gerrit.libreoffice.org/66870
Reviewed-by: Katarina Behrens 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index bd9702902e6d..535262f022a8 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1393,9 +1393,10 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet )
 Reference< XChangesBatch >(xProp, 
UNO_QUERY_THROW)->commitChanges();
 // display info
 SolarMutexGuard aGuard;
-svtools::executeRestartDialog(
-comphelper::getProcessComponentContext(), GetFrameWeld(),
-svtools::RESTART_REASON_LANGUAGE_CHANGE);
+if (svtools::executeRestartDialog(
+comphelper::getProcessComponentContext(), GetFrameWeld(),
+svtools::RESTART_REASON_LANGUAGE_CHANGE))
+GetParentDialog()->EndDialog(RET_OK);
 
 // tell quickstarter to stop being a veto listener
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-01-28 Thread Libreoffice Gerrit user
 cui/source/tabpages/numpages.cxx |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit c985db8b603d809d5896e42259e0768d607177f7
Author: Xisco Fauli 
AuthorDate: Fri Jan 25 12:11:04 2019 +0100
Commit: Xisco Faulí 
CommitDate: Mon Jan 28 11:34:21 2019 +0100

tdf#122951: Fix insertion of graphics as bullets

Regression from 81260c448911069ce8cb051d3a973ec52b9b43a3

Change-Id: Iecf00ea8310a767ff7945e7c1a0efe9dca5edd20
Reviewed-on: https://gerrit.libreoffice.org/66903
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 265a4fd43d207cd6a99fdd9c23d54259428ed709)
Reviewed-on: https://gerrit.libreoffice.org/66905
Reviewed-by: Julien Nabet 
Reviewed-by: Xisco Faulí 

diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index a6ea4899f3dd..7f4fa43b0494 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -1910,14 +1910,16 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, 
PopupActivateHdl_Impl, weld::ToggleButton&
 GalleryExplorer::BeginLocking(GALLERY_THEME_BULLETS);
 
 Graphic aGraphic;
+OUString sGrfName;
 ScopedVclPtrInstance< VirtualDevice > pVD;
 size_t i = 0;
 for (auto & grfName : aGrfNames)
 {
+sGrfName = grfName;
 OUString sItemId = "gallery" + OUString::number(i);
-INetURLObject aObj(grfName);
+INetURLObject aObj(sGrfName);
 if(aObj.GetProtocol() == INetProtocol::File)
-grfName = aObj.PathToFileName();
+sGrfName = aObj.PathToFileName();
 if(GalleryExplorer::GetGraphicObj( GALLERY_THEME_BULLETS, i, 
))
 {
 BitmapEx aBitmap(aGraphic.GetBitmapEx());
@@ -1933,11 +1935,11 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, 
PopupActivateHdl_Impl, weld::ToggleButton&
 }
 pVD->SetOutputSizePixel(aBitmap.GetSizePixel(), false);
 pVD->DrawBitmapEx(Point(), aBitmap);
-m_xGalleryMenu->append(sItemId, grfName, *pVD);
+m_xGalleryMenu->append(sItemId, sGrfName, *pVD);
 }
 else
 {
-m_xGalleryMenu->append(sItemId, grfName);
+m_xGalleryMenu->append(sItemId, sGrfName);
 }
 ++i;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-01-25 Thread Libreoffice Gerrit user
 cui/source/tabpages/paragrph.cxx |   56 +--
 1 file changed, 37 insertions(+), 19 deletions(-)

New commits:
commit 14f9cd1009074e447a73a66ca65349ac3c2440bc
Author: Caolán McNamara 
AuthorDate: Thu Jan 24 13:52:31 2019 +
Commit: Miklos Vajna 
CommitDate: Fri Jan 25 09:31:58 2019 +0100

Related: tdf#122914 visiting alignment page sets an SvxAdjustItem

even if the user doesn't interact with anything, since...

commit 122da2eea23faf6916c3f3b9e1895f5c404b26c7
Author: Jim Raykowski 
Date:   Sat Nov 18 22:21:24 2017 -0900

tdf#107567 et al. Paragraph dialog preview windows fixes

tdf#107567 tdf#98211 tdf#98212 tdf#113275

Checking those issues, I don't see a change if I put this
part back to only set SvxAdjustItem in FillItemSet if the radio-button
has changed (or justify subcontrols if justify was already set)

Change-Id: Ia68c50fd659be5b507d6e0989caecb353b494df7
Reviewed-on: https://gerrit.libreoffice.org/66882
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 4ea53b306251..f522b62b95d1 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -1059,34 +1059,52 @@ bool SvxParaAlignTabPage::FillItemSet( SfxItemSet* 
rOutSet )
 {
 bool bModified = false;
 
+bool bAdj = false;
 SvxAdjust eAdjust = SvxAdjust::Left;
 
-if ( m_xLeft->get_active() )
+if (m_xLeft->get_active())
+{
 eAdjust = SvxAdjust::Left;
-else if ( m_xRight->get_active() )
+bAdj = m_xLeft->get_saved_state() == TRISTATE_FALSE;
+}
+else if (m_xRight->get_active())
+{
 eAdjust = SvxAdjust::Right;
-else if ( m_xCenter->get_active() )
+bAdj = m_xRight->get_saved_state() == TRISTATE_FALSE;
+}
+else if (m_xCenter->get_active())
+{
 eAdjust = SvxAdjust::Center;
-else if ( m_xJustify->get_active() )
+bAdj = m_xCenter->get_saved_state() == TRISTATE_FALSE;
+}
+else if (m_xJustify->get_active())
+{
 eAdjust = SvxAdjust::Block;
+bAdj = m_xJustify->get_saved_state() == TRISTATE_FALSE ||
+m_xExpandCB->get_state_changed_from_saved() ||
+m_xLastLineLB->get_value_changed_from_saved();
+}
 
 sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_ADJUST );
 
-SvxAdjust eOneWord = m_xExpandCB->get_active() ? SvxAdjust::Block : 
SvxAdjust::Left;
-
-int nLBPos = m_xLastLineLB->get_active();
-SvxAdjust eLastBlock = SvxAdjust::Left;
-if ( 1 == nLBPos )
-eLastBlock = SvxAdjust::Center;
-else if ( 2 == nLBPos )
-eLastBlock = SvxAdjust::Block;
-
-SvxAdjustItem aAdj( static_cast(GetItemSet().Get( 
_nWhich )) );
-aAdj.SetAdjust( eAdjust );
-aAdj.SetOneWord( eOneWord );
-aAdj.SetLastBlock( eLastBlock );
-rOutSet->Put( aAdj );
-bModified = true;
+if (bAdj)
+{
+SvxAdjust eOneWord = m_xExpandCB->get_active() ? SvxAdjust::Block : 
SvxAdjust::Left;
+
+int nLBPos = m_xLastLineLB->get_active();
+SvxAdjust eLastBlock = SvxAdjust::Left;
+if ( 1 == nLBPos )
+eLastBlock = SvxAdjust::Center;
+else if ( 2 == nLBPos )
+eLastBlock = SvxAdjust::Block;
+
+SvxAdjustItem aAdj( static_cast(GetItemSet().Get( _nWhich )) );
+aAdj.SetAdjust( eAdjust );
+aAdj.SetOneWord( eOneWord );
+aAdj.SetLastBlock( eLastBlock );
+rOutSet->Put( aAdj );
+bModified = true;
+}
 
 if (m_xSnapToGridCB->get_state_changed_from_saved())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-01-25 Thread Libreoffice Gerrit user
 cui/source/tabpages/border.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 7666c1e958a6e2326b38497b4acb763f8fa53ea6
Author: Caolán McNamara 
AuthorDate: Thu Jan 24 12:51:03 2019 +
Commit: Miklos Vajna 
CommitDate: Fri Jan 25 09:31:16 2019 +0100

Resolves: tdf#122914 missing save_value

Change-Id: Ie28195f342b73b1420a1a120b1414941aab337b7
Reviewed-on: https://gerrit.libreoffice.org/66864
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 749505c1fd0f..009297050a59 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -159,6 +159,7 @@ void ShadowControlsWrapper::SetControlValue(const 
SvxShadowItem& rItem)
 }
 mrMfSize.set_value(mrMfSize.normalize(rItem.GetWidth()), FieldUnit::TWIP);
 mrLbColor.SelectEntry(rItem.GetColor());
+mrMfSize.save_value();
 }
 
 void ShadowControlsWrapper::SetControlDontKnow()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-01-22 Thread Libreoffice Gerrit user
 cui/source/tabpages/paragrph.cxx |   12 ++--
 1 file changed, 2 insertions(+), 10 deletions(-)

New commits:
commit 636898660b09382054855c5eaca3c79eb3bbeee3
Author: Caolán McNamara 
AuthorDate: Wed Jan 16 10:55:07 2019 +
Commit: Caolán McNamara 
CommitDate: Tue Jan 22 18:10:53 2019 +0100

Resolves: tdf#122458 not enough values saved

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

diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index fde0bffd9804..4ea53b306251 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -591,9 +591,7 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet* rSet )
 // because for Impress the min of first-line indent depends on value of
 // left-indent!
 ELRLoseFocus();
-m_xAutoCB->save_state();
-m_xContextualCB->save_state();
-m_xLineDist->save_value();
+ChangesApplied();
 }
 
 void SvxStdParagraphTabPage::ChangesApplied()
@@ -869,12 +867,6 @@ void SvxStdParagraphTabPage::Init_Impl()
 m_xRightIndent->connect_value_changed(aLink2);
 
 Link aLink = LINK(this, 
SvxStdParagraphTabPage, ModifyHdl_Impl);
-#if 0
-//TO DO
-m_xFLineIndent->SetModifyHdl( aLink );
-m_xLeftIndent->SetModifyHdl( aLink );
-m_xRightIndent->SetModifyHdl( aLink );
-#endif
 m_xTopDist->connect_value_changed(aLink);
 m_xBottomDist->connect_value_changed(aLink);
 
@@ -943,7 +935,7 @@ void SvxStdParagraphTabPage::EnableAbsLineDist(long 
nMinTwip)
 nMinFixDist = nMinTwip;
 }
 
-voidSvxStdParagraphTabPage::PageCreated(const SfxAllItemSet& aSet)
+void SvxStdParagraphTabPage::PageCreated(const SfxAllItemSet& aSet)
 {
 
 /* different bit represent call to different method of SvxStdParagraphTabPage
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-01-22 Thread Libreoffice Gerrit user
 cui/source/options/optgdlg.cxx  |7 ---
 cui/source/options/optinet2.cxx |3 ++-
 2 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit dfa1f1f872c418e89757a3985979b79e94c12fcc
Author: Xisco Fauli 
AuthorDate: Mon Jan 21 17:00:52 2019 +0100
Commit: Xisco Faulí 
CommitDate: Tue Jan 22 17:50:48 2019 +0100

tdf#122846: Close option dialog if restart is confirmed

use the same logic as 0fa14d58457e9418ff756a0efd66e365c4403a67

Change-Id: I485cb232bb787e176918caf2eee74b0fbb360e47
Reviewed-on: https://gerrit.libreoffice.org/66691
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Reviewed-by: Katarina Behrens 
Reviewed-on: https://gerrit.libreoffice.org/66732
Reviewed-by: Xisco Faulí 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index bd244c72a518..bd9702902e6d 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -958,9 +958,10 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 m_pForceOpenGL->IsValueChangedFromSaved())
 {
 SolarMutexGuard aGuard;
-svtools::executeRestartDialog(
-comphelper::getProcessComponentContext(), nullptr,
-svtools::RESTART_REASON_OPENGL);
+if( svtools::executeRestartDialog(
+comphelper::getProcessComponentContext(), nullptr,
+svtools::RESTART_REASON_OPENGL))
+GetParentDialog()->EndDialog(RET_OK);
 }
 
 return bModified;
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 8124c7d8998c..4d32aea2ebb4 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -803,7 +803,8 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, CertPathPBHdl, Button*, 
void)
 if (nRet == RET_OK && sOrig != mpCertPathDlg->getDirectory())
 {
 SolarMutexGuard aGuard;
-
svtools::executeRestartDialog(comphelper::getProcessComponentContext(), 
nullptr, svtools::RESTART_REASON_ADDING_PATH);
+if 
(svtools::executeRestartDialog(comphelper::getProcessComponentContext(), 
nullptr, svtools::RESTART_REASON_ADDING_PATH))
+GetParentDialog()->EndDialog(RET_OK);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-01-22 Thread Libreoffice Gerrit user
 cui/source/tabpages/numfmt.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 35f4219155e7efa0eee231a886a0df8f7dc9c42e
Author: Eike Rathke 
AuthorDate: Thu Jan 17 17:00:57 2019 +0100
Commit: Eike Rathke 
CommitDate: Tue Jan 22 11:25:06 2019 +0100

Resolves: tdf#122786 use weld::SpinButton::set_value() instead of set_text()

... otherwise get_value() returns 0.

Change-Id: I345d31e888e40f1fc191cef7dac802eb860a824f
Reviewed-on: https://gerrit.libreoffice.org/66539
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit af8d616fe7556716af8ccd4c4de7a68ae52ce2b7)
Reviewed-on: https://gerrit.libreoffice.org/66546

diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index a150af80db56..b6a4a8ba4d5c 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -947,10 +947,10 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( bool 
bCheckCatChange /*= sal_Fa
 m_xEdDecimals->set_text( "" ); //General format tdf#44399
 else
 if ( nCategory == CAT_FRACTION )
-m_xEdDenominator->set_text( OUString::number( nDecimals ) 
);
+m_xEdDenominator->set_value( nDecimals );
 else
-m_xEdDecimals->set_text( OUString::number( nDecimals ) );
-m_xEdLeadZeroes->set_text( OUString::number( nZeroes ) );
+m_xEdDecimals->set_value( nDecimals );
+m_xEdLeadZeroes->set_value( nZeroes );
 m_xBtnNegRed->set_active( bNegRed );
 if ( nCategory != CAT_SCIENTIFIC )
 {
@@ -976,8 +976,8 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( bool 
bCheckCatChange /*= sal_Fa
 m_xBtnNegRed->set_sensitive(false);
 m_xBtnThousand->set_sensitive(false);
 m_xBtnEngineering->set_sensitive(false);
-m_xEdDecimals->set_text( OUString::number( 0 ) );
-m_xEdLeadZeroes->set_text( OUString::number( 0 ) );
+m_xEdDecimals->set_text( OUString() );
+m_xEdLeadZeroes->set_text( OUString() );
 m_xBtnNegRed->set_active( false );
 m_xBtnThousand->set_active( false );
 m_xBtnEngineering->set_active( false );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-01-17 Thread Libreoffice Gerrit user
 cui/source/tabpages/chardlg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6561f24bf55c617efc8ac3aca503dee572f388ab
Author: Caolán McNamara 
AuthorDate: Thu Jan 17 09:42:31 2019 +
Commit: Caolán McNamara 
CommitDate: Thu Jan 17 15:42:31 2019 +0100

Resolves: tdf#122346 get font features to stick in entry properly

Change-Id: I56058a2069600a4c8acba861a38e7e5d84f44d81
Reviewed-on: https://gerrit.libreoffice.org/66500
Reviewed-by: Xisco Faulí 
Tested-by: Xisco Faulí 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 8ac253999f85..c1a46b88663a 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1170,7 +1170,7 @@ IMPL_LINK(SvxCharNamePage, FontFeatureButtonClicked, 
weld::Button&, rButton, voi
 cui::FontFeaturesDialog aDialog(GetDialogFrameWeld(), sFontName);
 if (aDialog.run() == RET_OK)
 {
-pNameBox->set_active_text(aDialog.getResultFontName());
+pNameBox->set_entry_text(aDialog.getResultFontName());
 UpdatePreview_Impl();
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source include/svx svx/source

2019-01-17 Thread Libreoffice Gerrit user
 cui/source/tabpages/numfmt.cxx |2 +-
 include/svx/numfmtsh.hxx   |2 +-
 svx/source/items/numfmtsh.cxx  |   31 +++
 3 files changed, 25 insertions(+), 10 deletions(-)

New commits:
commit 1b47b2b7cc71a75373df7fd656e2a6bdc0d9a21f
Author: Eike Rathke 
AuthorDate: Wed Jan 16 17:40:18 2019 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jan 17 10:24:25 2019 +0100

Resolves: tdf#122509 we have a second list with generated currency formats

... which kicks in if SvxNumberFormatShell::FindEntry() determined
a format index of NUMBERFORMAT_ENTRY_NEW_CURRENCY instead of a
real existing index.

Regression from

commit e607f1da329a2d4dd91904053d7ff86ac05c77bf
CommitDate: Thu Oct 4 15:02:13 2018 +0200

Select the current format if multiple instead of first matching 
format code

The old (now removed as unused)
SvxNumberFormatShell::GetListPos4Entry(const OUString&)
used before took care of that, add the functionality back but
combine into the existing GetListPos4Entry() function, the
additional FindEntry() call wasn't necessary anyway because it was
just called before in the caller.

The actual crash happened elsewhere in
SvNumberFormatter::GenerateFormat() because no format exists for
the then determined entry, which should be changed independently
to prevent such abuses.

Change-Id: Id42efa152693119fbde82b234f367679f818cfab
Reviewed-on: https://gerrit.libreoffice.org/66472
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit c9d19b70c93b02e5c666414097e835039c598731)
Reviewed-on: https://gerrit.libreoffice.org/66477
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 344e381546b5..a150af80db56 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1504,7 +1504,7 @@ void SvxNumberFormatTabPage::EditHdl_Impl(const 
weld::Entry* pEdFormat)
 if (nTmpCurPos != sal_uInt16(-1))
 set_active_currency(nTmpCurPos);
 }
-short nPosi=pNumFmtShell->GetListPos4Entry( nCurKey);
+short nPosi=pNumFmtShell->GetListPos4Entry( nCurKey, aFormat);
 if(nPosi>=0)
 m_xLbFormat->select(static_cast(nPosi));
 
diff --git a/include/svx/numfmtsh.hxx b/include/svx/numfmtsh.hxx
index 8f1b0262f1cd..2b7d36e5c475 100644
--- a/include/svx/numfmtsh.hxx
+++ b/include/svx/numfmtsh.hxx
@@ -165,7 +165,7 @@ public:
 sal_uInt16  FindCurrencyFormat( const OUString& rFmtString );
 sal_uInt16  FindCurrencyFormat(const NfCurrencyEntry* 
pTmpCurrencyEntry,bool bTmpBanking);
 voidSetCurCurrencyEntry(NfCurrencyEntry*);
-short   GetListPos4Entry(sal_uInt32 nIdx);
+short   GetListPos4Entry( sal_uInt32 nIdx, const OUString& 
rFmtString );
 
 voidGetCurrencySymbols(std::vector& rList, 
sal_uInt16* pPos );
 
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
index 923a0db04f4b..2bf80b4cb33f 100644
--- a/svx/source/items/numfmtsh.cxx
+++ b/svx/source/items/numfmtsh.cxx
@@ -1329,24 +1329,39 @@ OUString SvxNumberFormatShell::GetFormat4Entry(short 
nEntry)
  * Input:  Number of the entry
  * Output: Category number
  */
-short SvxNumberFormatShell::GetListPos4Entry(sal_uInt32 nIdx)
+short SvxNumberFormatShell::GetListPos4Entry( sal_uInt32 nIdx, const OUString& 
rFmtString )
 {
 short nSelP = SELPOS_NONE;
-// Check list size against return type limit.
-if (aCurEntryList.size() <= 
static_cast(::std::numeric_limits::max()))
+if (nIdx != NUMBERFORMAT_ENTRY_NEW_CURRENCY)
 {
-for (size_t i = 0; i < aCurEntryList.size(); ++i)
+// Check list size against return type limit.
+if (aCurEntryList.size() <= 
static_cast(::std::numeric_limits::max()))
 {
-if (aCurEntryList[i] == nIdx)
+for (size_t i = 0; i < aCurEntryList.size(); ++i)
 {
-nSelP = i;
-break;
+if (aCurEntryList[i] == nIdx)
+{
+nSelP = i;
+break;
+}
 }
 }
+else
+{
+OSL_FAIL("svx::SvxNumberFormatShell::GetListPos4Entry(), list got 
too large!");
+}
 }
 else
 {
-OSL_FAIL("svx::SvxNumberFormatShell::GetListPos4Entry(), list got too 
large!");
+// A second list holds the generated currency formats.
+for (size_t i = 0; i < aCurrencyFormatList.size(); ++i)
+{
+if (rFmtString == aCurrencyFormatList[i])
+{
+nSelP = static_cast(i);
+break;
+}
+}
 }
 return nSelP;
 }

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-01-16 Thread Libreoffice Gerrit user
 cui/source/tabpages/numfmt.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit f3ff8ba104e8271e7a33c5cbb94ab8f561dd4a38
Author: Caolán McNamara 
AuthorDate: Wed Jan 9 16:13:24 2019 +
Commit: Xisco Faulí 
CommitDate: Wed Jan 16 17:42:56 2019 +0100

Resolves: tdf#122356 on row-activate click ok button

instead of proceeding directy to the ok response. Because there is
an additional handler installed in the okbutton to do extra stuff
that is needed to make this work

Change-Id: I9646ea6978533084c6c9c48b03806e46eaa49c33
Reviewed-on: https://gerrit.libreoffice.org/66047
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index d3eb10e38b42..344e381546b5 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1139,7 +1139,10 @@ IMPL_LINK(SvxNumberFormatTabPage, DoubleClickHdl_Impl, 
weld::TreeView&, rLb, voi
 SelFormatHdl_Impl();
 
 if (SfxTabDialogController* pController = GetDialogController())
-pController->getDialog()->response(RET_OK);
+{
+weld::Button& rOkButton = pController->GetOKButton();
+rOkButton.clicked();
+}
 else
 {
 SfxSingleTabDialog* pParent = 
dynamic_cast(GetParentDialog());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source cui/uiconfig include/vcl sw/uiconfig vcl/source vcl/unx

2019-01-16 Thread Libreoffice Gerrit user
 cui/source/tabpages/autocdlg.cxx |   66 +--
 cui/uiconfig/ui/acoroptionspage.ui   |3 +
 cui/uiconfig/ui/applyautofmtpage.ui  |6 ++
 cui/uiconfig/ui/applylocalizedpage.ui|9 +++
 cui/uiconfig/ui/smarttagoptionspage.ui   |   15 +-
 include/vcl/weld.hxx |4 -
 sw/uiconfig/swriter/ui/assignstylesdialog.ui |   24 +
 sw/uiconfig/swriter/ui/optcaptionpage.ui |2 
 sw/uiconfig/swriter/ui/tocindexpage.ui   |2 
 vcl/source/app/salvtables.cxx|7 --
 vcl/unx/gtk3/gtk3gtkinst.cxx |   19 ---
 11 files changed, 94 insertions(+), 63 deletions(-)

New commits:
commit c8e26c255238e41c378bce4a715a566034a6a9e2
Author: Caolán McNamara 
AuthorDate: Tue Jan 15 11:15:50 2019 +
Commit: Caolán McNamara 
CommitDate: Wed Jan 16 17:19:07 2019 +0100

Related: tdf#122627 auto detect of toggle column doesn't work

so remove it and explicitly state what column contains the toggle

Change-Id: I58fb12a4b8fa9eeb9c038f796e48b0aeaa0b2404
Reviewed-on: https://gerrit.libreoffice.org/66380
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 
Tested-by: Xisco Faulí 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 6f9f82a0eb62..8fae6fd346fd 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -206,20 +206,24 @@ VclPtr 
OfaAutocorrOptionsPage::Create(TabPageParent pParent,
 return VclPtr::Create(pParent, *rSet);
 }
 
+#define CBCOL_FIRST 0
+#define CBCOL_SECOND1
+#define CBCOL_BOTH  2
+
 bool OfaAutocorrOptionsPage::FillItemSet( SfxItemSet* )
 {
 SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
 ACFlags nFlags = pAutoCorrect->GetFlags();
 
 int nPos = 0;
-pAutoCorrect->SetAutoCorrFlag(ACFlags::Autocorrect,  
m_xCheckLB->get_toggle(nPos++));
-pAutoCorrect->SetAutoCorrFlag(ACFlags::CapitalStartWord, 
m_xCheckLB->get_toggle(nPos++));
-pAutoCorrect->SetAutoCorrFlag(ACFlags::CapitalStartSentence, 
m_xCheckLB->get_toggle(nPos++));
-pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgWeightUnderl,  
m_xCheckLB->get_toggle(nPos++));
-pAutoCorrect->SetAutoCorrFlag(ACFlags::SetINetAttr,  
m_xCheckLB->get_toggle(nPos++));
-pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgToEnEmDash,
m_xCheckLB->get_toggle(nPos++));
-pAutoCorrect->SetAutoCorrFlag(ACFlags::IgnoreDoubleSpace,
m_xCheckLB->get_toggle(nPos++));
-pAutoCorrect->SetAutoCorrFlag(ACFlags::CorrectCapsLock,  
m_xCheckLB->get_toggle(nPos++));
+pAutoCorrect->SetAutoCorrFlag(ACFlags::Autocorrect,  
m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST));
+pAutoCorrect->SetAutoCorrFlag(ACFlags::CapitalStartWord, 
m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST));
+pAutoCorrect->SetAutoCorrFlag(ACFlags::CapitalStartSentence, 
m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST));
+pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgWeightUnderl,  
m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST));
+pAutoCorrect->SetAutoCorrFlag(ACFlags::SetINetAttr,  
m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST));
+pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgToEnEmDash,
m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST));
+pAutoCorrect->SetAutoCorrFlag(ACFlags::IgnoreDoubleSpace,
m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST));
+pAutoCorrect->SetAutoCorrFlag(ACFlags::CorrectCapsLock,  
m_xCheckLB->get_toggle(nPos++, CBCOL_FIRST));
 
 bool bReturn = nFlags != pAutoCorrect->GetFlags();
 if(bReturn )
@@ -241,14 +245,10 @@ void OfaAutocorrOptionsPage::InsertEntry(const OUString& 
rTxt)
 m_xCheckLB->insert(nullptr, -1, nullptr, nullptr, nullptr,
nullptr, nullptr, false);
 const int nRow = m_xCheckLB->n_children() - 1;
-m_xCheckLB->set_toggle(nRow, false, 0);
+m_xCheckLB->set_toggle(nRow, false, CBCOL_FIRST);
 m_xCheckLB->set_text(nRow, rTxt, 1);
 }
 
-#define CBCOL_FIRST 0
-#define CBCOL_SECOND1
-#define CBCOL_BOTH  2
-
 void OfaAutocorrOptionsPage::Reset( const SfxItemSet* )
 {
 SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
@@ -411,25 +411,25 @@ bool OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet*  )
 SvxSwAutoFormatFlags *pOpt = >GetSwFlags();
 ACFlags nFlags = pAutoCorrect->GetFlags();
 
-bool bCheck = m_xCheckLB->get_toggle(USE_REPLACE_TABLE);
+bool bCheck = m_xCheckLB->get_toggle(USE_REPLACE_TABLE, CBCOL_FIRST);
 bModified |= pOpt->bAutoCorrect != bCheck;
 pOpt->bAutoCorrect = bCheck;
 pAutoCorrect->SetAutoCorrFlag(ACFlags::Autocorrect,
 m_xCheckLB->get_toggle(USE_REPLACE_TABLE, 
CBCOL_SECOND));
 
-bCheck = m_xCheckLB->get_toggle(CORR_UPPER);
+bCheck = m_xCheckLB->get_toggle(CORR_UPPER, CBCOL_FIRST);
 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-01-15 Thread Libreoffice Gerrit user
 cui/source/options/optgdlg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit aa15463a2f303ab75679eefa4d8241f2b700684e
Author: Caolán McNamara 
AuthorDate: Mon Jan 14 09:48:43 2019 +
Commit: Mike Kaganski 
CommitDate: Tue Jan 15 13:43:57 2019 +0100

Resolves: tdf#122701 opengl settings don't affect gtk3

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

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index bc2510fb8e7a..bd244c72a518 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -526,7 +526,7 @@ CanvasSettings::CanvasSettings() :
 bool CanvasSettings::IsHardwareAccelerationAvailable() const
 {
 #if HAVE_FEATURE_OPENGL
-if( OpenGLWrapper::isVCLOpenGLEnabled() )
+if (OpenGLWrapper::isVCLOpenGLEnabled() && Application::GetToolkitName() 
!= "gtk3")
 mbHWAccelAvailable = false;
 
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-01-14 Thread Libreoffice Gerrit user
 cui/source/tabpages/autocdlg.cxx |   24 
 1 file changed, 12 insertions(+), 12 deletions(-)

New commits:
commit a3db8a7ec8c28053c6bd3ca3e5e30bd2cedf7d57
Author: Caolán McNamara 
AuthorDate: Mon Jan 14 10:08:08 2019 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Jan 14 16:33:10 2019 +0100

Resolves: tdf#122627 be explicit about what column to check

Change-Id: Icdd1cef6b0bc9d8dd61c309dc9de66021fc9422d
Reviewed-on: https://gerrit.libreoffice.org/66287
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 0c76a85333c5..6f9f82a0eb62 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -245,6 +245,10 @@ void OfaAutocorrOptionsPage::InsertEntry(const OUString& 
rTxt)
 m_xCheckLB->set_text(nRow, rTxt, 1);
 }
 
+#define CBCOL_FIRST 0
+#define CBCOL_SECOND1
+#define CBCOL_BOTH  2
+
 void OfaAutocorrOptionsPage::Reset( const SfxItemSet* )
 {
 SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
@@ -263,14 +267,14 @@ void OfaAutocorrOptionsPage::Reset( const SfxItemSet* )
 InsertEntry(m_sAccidentalCaps);
 
 int nPos = 0;
-m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::Autocorrect) );
-m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::CapitalStartWord) );
-m_xCheckLB->set_toggle( nPos++, bool(nFlags & 
ACFlags::CapitalStartSentence) );
-m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::ChgWeightUnderl) );
-m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::SetINetAttr) );
-m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::ChgToEnEmDash) );
-m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::IgnoreDoubleSpace) 
);
-m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::CorrectCapsLock) );
+m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::Autocorrect), 
CBCOL_FIRST );
+m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::CapitalStartWord), 
CBCOL_FIRST );
+m_xCheckLB->set_toggle( nPos++, bool(nFlags & 
ACFlags::CapitalStartSentence), CBCOL_FIRST );
+m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::ChgWeightUnderl), 
CBCOL_FIRST );
+m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::SetINetAttr), 
CBCOL_FIRST );
+m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::ChgToEnEmDash), 
CBCOL_FIRST );
+m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::IgnoreDoubleSpace), 
CBCOL_FIRST );
+m_xCheckLB->set_toggle( nPos++, bool(nFlags & ACFlags::CorrectCapsLock), 
CBCOL_FIRST );
 
 m_xCheckLB->thaw();
 }
@@ -319,10 +323,6 @@ public:
 /*   */
 /*/
 
-#define CBCOL_FIRST 0
-#define CBCOL_SECOND1
-#define CBCOL_BOTH  2
-
 enum OfaAutoFmtOptions
 {
 USE_REPLACE_TABLE,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source vcl/unx

2019-01-09 Thread Libreoffice Gerrit user
 cui/source/inc/cuitabline.hxx  |1 
 cui/source/tabpages/tpline.cxx |   17 +-
 vcl/unx/gtk3/gtk3gtkinst.cxx   |  323 +++--
 3 files changed, 193 insertions(+), 148 deletions(-)

New commits:
commit 08be15ebedd173dbc86fbbdf33667d7fa45ec1bc
Author: Caolán McNamara 
AuthorDate: Tue Jan 8 16:48:20 2019 +
Commit: Caolán McNamara 
CommitDate: Wed Jan 9 22:11:40 2019 +0100

tdf#122527 dot symbols in chart menubutton not working

a few problems here

*) each symbol was drawn on top of the previous one instead of clearing it
*) some spurious placeholder text in the menu entry
*) m_nSymbolType not set correctly on activation of a submenu entry
*) under gtk3 adding entries to the submenus didn't inform the
   menubutton of their addition
*) we can drop m_xMenu because set_item_sensitive can be used
   instead, which didn't exist at the initial time of writing

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

diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx
index 639ad645c7ce..284a0e656a55 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -148,7 +148,6 @@ private:
 std::unique_ptr m_xMtrEndWidth;
 std::unique_ptr m_xTsbCenterEnd;
 std::unique_ptr m_xCbxSynchronize;
-std::unique_ptr m_xMenu;
 std::unique_ptr m_xGalleryMenu;
 std::unique_ptr m_xSymbolsMenu;
 std::unique_ptr m_xCtlPreview;
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index dad85068f793..b4498348c8ed 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -108,7 +108,6 @@ SvxLineTabPage::SvxLineTabPage(TabPageParent pParent, const 
SfxItemSet& rInAttrs
 , m_xMtrEndWidth(m_xBuilder->weld_metric_spin_button("MTR_FLD_END_WIDTH", 
FieldUnit::CM))
 , m_xTsbCenterEnd(m_xBuilder->weld_check_button("TSB_CENTER_END"))
 , m_xCbxSynchronize(m_xBuilder->weld_check_button("CBX_SYNCHRONIZE"))
-, m_xMenu(m_xBuilder->weld_menu("menuSELECT"))
 , m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, "CTL_PREVIEW", 
m_aCtlPreview))
 , m_xFLEdgeStyle(m_xBuilder->weld_widget("FL_EDGE_STYLE"))
 , m_xGridEdgeCaps(m_xBuilder->weld_widget("gridEDGE_CAPS"))
@@ -1410,7 +1409,7 @@ IMPL_LINK_NOARG(SvxLineTabPage, MenuCreateHdl_Impl, 
weld::ToggleButton&, void)
 aBitmap.Scale(nScale, nScale);
 
 }
-pVD->SetOutputSizePixel(aBitmap.GetSizePixel(), false);
+pVD->SetOutputSizePixel(aBitmap.GetSizePixel());
 pVD->DrawBitmapEx(Point(), aBitmap);
 m_xGalleryMenu->append(pInfo->sItemId, *pUIName, *pVD);
 }
@@ -1422,7 +1421,7 @@ IMPL_LINK_NOARG(SvxLineTabPage, MenuCreateHdl_Impl, 
weld::ToggleButton&, void)
 }
 
 if (m_aGrfNames.empty())
-m_xMenu->set_sensitive("gallery", false);
+m_xSymbolMB->set_item_sensitive("gallery", false);
 }
 
 if (!m_xSymbolsMenu && m_pSymbolList)
@@ -1494,15 +1493,15 @@ IMPL_LINK_NOARG(SvxLineTabPage, MenuCreateHdl_Impl, 
weld::ToggleButton&, void)
 double(MAX_BMP_HEIGHT) / 
static_cast(aSize.Height());
 aBitmapEx.Scale(nScale, nScale);
 }
-pVD->SetOutputSizePixel(aBitmapEx.GetSizePixel(), false);
+pVD->SetOutputSizePixel(aBitmapEx.GetSizePixel());
 pVD->DrawBitmapEx(Point(), aBitmapEx);
-m_xSymbolsMenu->append(pInfo->sItemId, "foo", *pVD);
+m_xSymbolsMenu->append(pInfo->sItemId, "", *pVD);
 }
 pInvisibleSquare=pPage->RemoveObject(0);
 SdrObject::Free(pInvisibleSquare);
 
 if (m_aGrfNames.empty())
-m_xMenu->set_sensitive("symbols", false);
+m_xSymbolMB->set_item_sensitive("symbols", false);
 }
 }
 }
@@ -1522,10 +1521,12 @@ IMPL_LINK(SvxLineTabPage, GraphicHdl_Impl, const 
OString&, rIdent, void)
 {
 SvxBmpItemInfo* pInfo = m_aGalleryBrushItems[sNumber.toUInt32()].get();
 pGraphic = pInfo->pBrushItem->GetGraphic();
+m_nSymbolType = SVX_SYMBOLTYPE_BRUSHITEM;
 }
 else if (rIdent.startsWith("symbol", ))
 {
-SvxBmpItemInfo* pInfo = m_aSymbolBrushItems[sNumber.toUInt32()].get();
+m_nSymbolType = sNumber.toUInt32();
+SvxBmpItemInfo* pInfo = m_aSymbolBrushItems[m_nSymbolType].get();
 pGraphic = pInfo->pBrushItem->GetGraphic();
 }
 else if (rIdent == "automatic")
@@ -1559,7 +1560,7 @@ IMPL_LINK(SvxLineTabPage, GraphicHdl_Impl, const 
OString&, rIdent, void)
 return;
 }
 
-if(pGraphic)
+if (pGraphic)
 {
 Size aSize = 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2019-01-01 Thread Libreoffice Gerrit user
 cui/source/customize/SvxMenuConfigPage.cxx|6 ++
 cui/source/customize/SvxToolbarConfigPage.cxx |   17 ++---
 cui/source/customize/cfg.cxx  |   12 
 3 files changed, 28 insertions(+), 7 deletions(-)

New commits:
commit bd9f2037f379cc3cd887122ca34eedfe85e4e820
Author: Muhammet Kara 
AuthorDate: Wed Jan 2 01:24:20 2019 +0300
Commit: Muhammet Kara 
CommitDate: Wed Jan 2 07:35:13 2019 +0100

Resolves tdf#122383 and tdf#122410

Add some null pointer checks

Change-Id: I905c6dd46a5019e66d9c2e59374cc7d1ce83397b
Reviewed-on: https://gerrit.libreoffice.org/65789
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
(cherry picked from commit be8897d9c63a77b223a9c0aed1d2eb689e0e0082)
Reviewed-on: https://gerrit.libreoffice.org/65798

diff --git a/cui/source/customize/SvxMenuConfigPage.cxx 
b/cui/source/customize/SvxMenuConfigPage.cxx
index 6cf31514352c..bf0247ca5f2c 100644
--- a/cui/source/customize/SvxMenuConfigPage.cxx
+++ b/cui/source/customize/SvxMenuConfigPage.cxx
@@ -499,6 +499,12 @@ IMPL_LINK_NOARG( SvxMenuConfigPage, ResetMenuHdl, Button 
*, void )
 {
 SvxConfigEntry* pMenuData = GetTopLevelSelection();
 
+if (pMenuData == nullptr)
+{
+SAL_WARN("cui.customize", "RHB top level selection is null. A menu 
must be selected to reset!");
+return;
+}
+
 std::unique_ptr 
xQueryBox(Application::CreateMessageDialog(GetFrameWeld(),
VclMessageType::Question, 
VclButtonsType::YesNo,

CuiResId(RID_SVXSTR_CONFIRM_RESTORE_DEFAULT_MENU)));
diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx 
b/cui/source/customize/SvxToolbarConfigPage.cxx
index 4ba5682fcd22..84d69f3ef0d0 100644
--- a/cui/source/customize/SvxToolbarConfigPage.cxx
+++ b/cui/source/customize/SvxToolbarConfigPage.cxx
@@ -514,9 +514,14 @@ IMPL_LINK( SvxToolbarConfigPage, ModifyItemHdl, MenuButton 
*, pButton, void )
 
 // get currently selected toolbar
 SvxConfigEntry* pToolbar = GetTopLevelSelection();
-
 OString sIdent = pButton->GetCurItemIdent();
 
+if (sIdent.isEmpty() || pToolbar == nullptr)
+{
+SAL_WARN("cui.customize", "No toolbar selected, or empty sIdent!");
+return;
+}
+
 if (sIdent == "renameItem")
 {
 SvTreeListEntry* pActEntry = m_pContentsListBox->GetCurEntry();
@@ -855,10 +860,18 @@ IMPL_LINK_NOARG( SvxToolbarConfigPage, SelectToolbar, 
ListBox&, void )
 void SvxToolbarConfigPage::AddFunction(
 SvTreeListEntry* pTarget, bool bFront )
 {
+SvxConfigEntry* pToolbar = GetTopLevelSelection();
+
+if (pToolbar == nullptr)
+return;
+
 // Add the command to the contents listbox of the selected toolbar
 SvTreeListEntry* pNewLBEntry =
 SvxConfigPage::AddFunction( pTarget, bFront, true/*bAllowDuplicates*/ 
);
 
+if (pNewLBEntry == nullptr)
+return;
+
 SvxConfigEntry* pEntry = 
static_cast(pNewLBEntry->GetUserData());
 
 if ( pEntry->IsBinding() )
@@ -877,8 +890,6 @@ void SvxToolbarConfigPage::AddFunction(
 // TODO: Figure out a way to show the changes on the toolbar, but revert if
 //   the dialog is closed by pressing "Cancel"
 // get currently selected toolbar and apply change
-SvxConfigEntry* pToolbar = GetTopLevelSelection();
-
 if ( pToolbar != nullptr )
 {
 static_cast( GetSaveInData() )->ApplyToolbar( 
pToolbar );
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 55f500612d1a..bfddfef5b6ec 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1599,8 +1599,9 @@ SvTreeListEntry* SvxConfigPage::AddFunction(
 SvTreeListEntry* pTarget, bool bFront, bool bAllowDuplicates )
 {
 OUString aURL = GetScriptURL();
+SvxConfigEntry* pParent = GetTopLevelSelection();
 
-if ( aURL.isEmpty() )
+if ( aURL.isEmpty() || pParent == nullptr )
 {
 return nullptr;
 }
@@ -1623,8 +1624,6 @@ SvTreeListEntry* SvxConfigPage::AddFunction(
 pNewEntryData->SetName( GetSelectedDisplayName() );
 
 // check that this function is not already in the menu
-SvxConfigEntry* pParent = GetTopLevelSelection();
-
 if ( !bAllowDuplicates )
 {
 for (auto const& entry : *pParent->GetEntries())
@@ -1648,8 +1647,13 @@ SvTreeListEntry* SvxConfigPage::InsertEntry(
 SvTreeListEntry* pTarget,
 bool bFront )
 {
+SvxConfigEntry* pTopLevelSelection = GetTopLevelSelection();
+
+if (pTopLevelSelection == nullptr)
+return nullptr;
+
 // Grab the entries list for the currently selected menu
-SvxEntries* pEntries = GetTopLevelSelection()->GetEntries();
+SvxEntries* pEntries = pTopLevelSelection->GetEntries();
 
 SvTreeListEntry* pNewEntry = nullptr;
 SvTreeListEntry* pCurEntry =
___
Libreoffice-commits mailing list

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2018-12-19 Thread Libreoffice Gerrit user
 cui/source/dialogs/FontFeaturesDialog.cxx |5 -
 1 file changed, 5 deletions(-)

New commits:
commit cd70a4614fc24d62e16a4ff6182d4fecfb6617d1
Author: Caolán McNamara 
AuthorDate: Wed Dec 19 10:32:07 2018 +
Commit: Caolán McNamara 
CommitDate: Wed Dec 19 16:49:17 2018 +0100

tdf#122119 make fontfeature dialog size unlimited

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

diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx 
b/cui/source/dialogs/FontFeaturesDialog.cxx
index 0c8a2e368bfd..8da13eda49e6 100644
--- a/cui/source/dialogs/FontFeaturesDialog.cxx
+++ b/cui/source/dialogs/FontFeaturesDialog.cxx
@@ -127,11 +127,6 @@ void 
FontFeaturesDialog::fillGrid(std::vector const& rFontFe
 
 i++;
 }
-
-Size aSize(m_xContentWindow->get_preferred_size());
-Size aMaxSize(std::min(aSize.Width(), 
m_xContentGrid->get_approximate_digit_width() * 100),
-  std::min(aSize.Height(), 
m_xContentGrid->get_text_height() * 20));
-m_xContentWindow->set_size_request(aMaxSize.Width(), aMaxSize.Height());
 }
 
 void FontFeaturesDialog::updateFontPreview()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2018-12-19 Thread Libreoffice Gerrit user
 cui/source/dialogs/FontFeaturesDialog.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 1520eef33db2d8217c54feb9a9e5174f7ad397d2
Author: Caolán McNamara 
AuthorDate: Wed Dec 19 09:52:43 2018 +
Commit: Caolán McNamara 
CommitDate: Wed Dec 19 13:53:16 2018 +0100

set explicit color for font feature preview bg

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

diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx 
b/cui/source/dialogs/FontFeaturesDialog.cxx
index 00b28434651a..0c8a2e368bfd 100644
--- a/cui/source/dialogs/FontFeaturesDialog.cxx
+++ b/cui/source/dialogs/FontFeaturesDialog.cxx
@@ -10,6 +10,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 using namespace css;
@@ -23,6 +24,9 @@ FontFeaturesDialog::FontFeaturesDialog(weld::Window* pParent, 
OUString const& rF
 , m_xContentGrid(m_xBuilder->weld_container("contentGrid"))
 , m_xPreviewWindow(new weld::CustomWeld(*m_xBuilder, "preview", 
m_aPreviewWindow))
 {
+svtools::ColorConfig aColorConfig;
+Color aFillColor(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor);
+m_aPreviewWindow.SetBackColor(aFillColor);
 initialize();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2018-12-18 Thread Libreoffice Gerrit user
 cui/source/options/optjava.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e455cbd491e038bc8b84b4b717b1fcf02ca162b0
Author: Julien Nabet 
AuthorDate: Sun Dec 16 14:21:37 2018 +0100
Commit: Thorsten Behrens 
CommitDate: Tue Dec 18 22:42:40 2018 +0100

tdf#122136: select first element if there's at least one

See bt from https://bugs.documentfoundation.org/attachment.cgi?id=147594

Change-Id: Ibf031b8024aa4952e2d3263a445cafdb3c031390
Reviewed-on: https://gerrit.libreoffice.org/65221
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 5f44c6d424f9..69b1b82c092d 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -1014,9 +1014,9 @@ void SvxJavaClassPathDlg::SetClassPath( const OUString& 
_rPath )
 m_xPathList->append("", sPath, 
SvFileInformationManager::GetImageId(aURL));
 }
 while (nIdx>=0);
+// select first entry
+m_xPathList->select(0);
 }
-// select first entry
-m_xPathList->select(0);
 SelectHdl_Impl(*m_xPathList);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2018-12-18 Thread Libreoffice Gerrit user
 cui/source/tabpages/numfmt.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit badd8b10588d39995164668dfc3956b81002e592
Author: Caolán McNamara 
AuthorDate: Tue Dec 18 16:47:20 2018 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 18 21:56:27 2018 +0100

Resolves: tdf#122168 width/height transposed

don't need it anyway, the width req is already set by 
SvxNumberPreview::SetDrawingArea

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

diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index c7366193008f..d3eb10e38b42 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -235,7 +235,6 @@ 
SvxNumberFormatTabPage::SvxNumberFormatTabPage(TabPageParent pParent,
 m_xLbCategory->set_size_request(nWidth, m_xLbCategory->get_height_rows(7));
 m_xLbFormat->set_size_request(nWidth, m_xLbFormat->get_height_rows(5));
 m_xLbCurrency->set_size_request(1, -1);  // width of 1, so real width will 
be that of its LbFormat sibling
-m_xWndPreview->set_size_request(GetTextHeight()*3, -1);
 
 // Initially remove the "Automatically" entry.
 m_xLbCurrency->set_active(-1); // First ensure that nothing is selected.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2018-12-18 Thread Libreoffice Gerrit user
 cui/source/tabpages/tparea.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit fdbc562156e817d61bbcd3d6fbcf7cb98d4ea51c
Author: Caolán McNamara 
AuthorDate: Tue Dec 18 17:12:20 2018 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 18 21:55:26 2018 +0100

stray fprintf

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

diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index a6d1f429296e..cacca8f8d51e 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -128,7 +128,6 @@ SvxAreaTabPage::SvxAreaTabPage(TabPageParent pParent, const 
SfxItemSet& rInAttrs
 m_aColorSize = m_xFillTab->get_preferred_size();
 m_pFillTabPage.disposeAndReset(SvxGradientTabPage::Create(aFillTab, 
_rXFSet));
 Size aGradientSize = m_xFillTab->get_preferred_size();
-fprintf(stderr, "aGradientSize %ld\n", aGradientSize.Height());
 m_pFillTabPage.disposeAndReset(SvxBitmapTabPage::Create(aFillTab, 
_rXFSet));
 Size aBitmapSize = m_xFillTab->get_preferred_size();
 m_pFillTabPage.disposeAndReset(SvxHatchTabPage::Create(aFillTab, 
_rXFSet));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2018-12-18 Thread Libreoffice Gerrit user
 cui/source/tabpages/numfmt.cxx |   13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 9fcca59d30ab69bfbb07b40d7429bcba6fcf869c
Author: Caolán McNamara 
AuthorDate: Mon Dec 17 17:42:09 2018 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 18 12:33:54 2018 +0100

Related: tdf#122120 left align text if preview won't fit

in the number format page

Change-Id: Ic398e5302ee54dfd437e07fdf892269e6eefd8fa
Reviewed-on: https://gerrit.libreoffice.org/65285
Tested-by: Jenkins
Tested-by: Xisco Faulí 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 69b25330c98e..c7366193008f 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -168,8 +168,17 @@ void SvxNumberPreview::Paint(vcl::RenderContext& 
rRenderContext, const ::tools::
 aTmpStr = aTmpStr.replaceAt(mnPos, 0, OUString(mnChar));
 }
 }
-Point aPosText = Point((mnPos != -1) ? 0 : nLeadSpace,
-   (aSzWnd.Height() - GetTextHeight()) / 2);
+long nX;
+if (mnPos != -1)
+nX = 0;
+else
+{
+//tdf#122120 if it won't fit anyway, then left align it
+if (nLeadSpace > 0)
+nX = nLeadSpace;
+nX = 0;
+}
+Point aPosText = Point(nX, (aSzWnd.Height() - GetTextHeight()) / 2);
 rRenderContext.DrawText(aPosText, aTmpStr);
 rRenderContext.Pop();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source include/svtools svtools/source

2018-12-17 Thread Libreoffice Gerrit user
 cui/source/options/treeopt.cxx   |5 +++--
 include/svtools/restartdialog.hxx|4 ++--
 svtools/source/dialogs/restartdialog.cxx |6 --
 3 files changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 9be9b4072741ac3c7282f272484df1f65aa2765e
Author: Mike Kaganski 
AuthorDate: Thu Dec 13 14:24:01 2018 +0300
Commit: Xisco Faulí 
CommitDate: Mon Dec 17 09:45:25 2018 +0100

tdf#121180: close Options dialog when restart is confirmed

Change-Id: Ieb6e62ca83921abed6b6432d70c6717dadfaaa34
Reviewed-on: https://gerrit.libreoffice.org/65090
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 0fa14d58457e9418ff756a0efd66e365c4403a67)
Reviewed-on: https://gerrit.libreoffice.org/65184
Reviewed-by: Xisco Faulí 

diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index a0ced4fccd16..cebb55371923 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -697,8 +697,9 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, ApplyHdl_Impl, 
Button*, void)
 if ( bNeedsRestart )
 {
 SolarMutexGuard aGuard;
-
::svtools::executeRestartDialog(comphelper::getProcessComponentContext(),
-GetFrameWeld(), eRestartReason);
+if 
(svtools::executeRestartDialog(comphelper::getProcessComponentContext(),
+GetFrameWeld(), eRestartReason))
+EndDialog(RET_OK);
 }
 }
 
diff --git a/include/svtools/restartdialog.hxx 
b/include/svtools/restartdialog.hxx
index 750542a37459..f29366c1b592 100644
--- a/include/svtools/restartdialog.hxx
+++ b/include/svtools/restartdialog.hxx
@@ -58,8 +58,8 @@ enum RestartReason {
 RESTART_REASON_NONE
 };
 
-// Must be called with the solar mutex locked:
-SVT_DLLPUBLIC void executeRestartDialog(
+// Must be called with the solar mutex locked; returns if restart was 
initiated:
+SVT_DLLPUBLIC bool executeRestartDialog(
 css::uno::Reference< css::uno::XComponentContext > const & context,
 weld::Window* parent, RestartReason reason);
 
diff --git a/svtools/source/dialogs/restartdialog.cxx 
b/svtools/source/dialogs/restartdialog.cxx
index 1de2e09cc014..079cc5e28f21 100644
--- a/svtools/source/dialogs/restartdialog.cxx
+++ b/svtools/source/dialogs/restartdialog.cxx
@@ -90,18 +90,20 @@ IMPL_LINK_NOARG(RestartDialog, hdlNo, weld::Button&, void)
 
 }
 
-void svtools::executeRestartDialog(
+bool svtools::executeRestartDialog(
 css::uno::Reference< css::uno::XComponentContext > const & context,
 weld::Window* parent, RestartReason reason)
 {
 auto xRestartManager = css::task::OfficeRestartManager::get(context);
 if (xRestartManager->isRestartRequested(false))
-return; // don't try to show another dialog when restart is already in 
progress
+return true; // don't try to show another dialog when restart is 
already in progress
 RestartDialog aDlg(parent, reason);
 if (aDlg.run()) {
 xRestartManager->requestRestart(
 css::uno::Reference< css::task::XInteractionHandler >());
+return true;
 }
+return false;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source include/sfx2

2018-12-13 Thread Libreoffice Gerrit user
 cui/source/tabpages/tparea.cxx |   11 ++-
 include/sfx2/tabdlg.hxx|6 --
 2 files changed, 6 insertions(+), 11 deletions(-)

New commits:
commit 322d5b231c35fed64ea597deccf716ef1917cd26
Author: Caolán McNamara 
AuthorDate: Wed Dec 12 21:28:38 2018 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 13 09:52:29 2018 +0100

Resolves: tdf#120481 gradient subpage 12 pixels too short

because the max preferred-size of the subpages is taken and
applied as the size-request of the container parent.

But the container parent as a 6px border, so the subpages end
up hosted in a parent which allocates them 12px less than they hoped
for.

As they are instantiated in the parent to measure them, measure their
parent instead and that calculates in the parent's border to end up
with what they wanted

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

diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 33e4137b470e..a6d1f429296e 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -125,15 +125,16 @@ SvxAreaTabPage::SvxAreaTabPage(TabPageParent pParent, 
const SfxItemSet& rInAttrs
 
 // Calculate optimal size of all pages..
 m_pFillTabPage.disposeAndReset(SvxColorTabPage::Create(aFillTab, 
_rXFSet));
-m_aColorSize = m_pFillTabPage->get_container_size();
+m_aColorSize = m_xFillTab->get_preferred_size();
 m_pFillTabPage.disposeAndReset(SvxGradientTabPage::Create(aFillTab, 
_rXFSet));
-Size aGradientSize = m_pFillTabPage->get_container_size();
+Size aGradientSize = m_xFillTab->get_preferred_size();
+fprintf(stderr, "aGradientSize %ld\n", aGradientSize.Height());
 m_pFillTabPage.disposeAndReset(SvxBitmapTabPage::Create(aFillTab, 
_rXFSet));
-Size aBitmapSize = m_pFillTabPage->get_container_size();
+Size aBitmapSize = m_xFillTab->get_preferred_size();
 m_pFillTabPage.disposeAndReset(SvxHatchTabPage::Create(aFillTab, 
_rXFSet));
-Size aHatchSize = m_pFillTabPage->get_container_size();
+Size aHatchSize = m_xFillTab->get_preferred_size();
 m_pFillTabPage.disposeAndReset(SvxPatternTabPage::Create(aFillTab, 
_rXFSet));
-Size aPatternSize = m_pFillTabPage->get_container_size();
+Size aPatternSize = m_xFillTab->get_preferred_size();
 m_pFillTabPage.disposeAndClear();
 
 Size aSize(m_aColorSize);
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 0bf86625d690..d739a88ef5fc 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -391,12 +391,6 @@ public:
 
 //TODO rename to GetFrameWeld when SfxTabPage doesn't inherit from anything
 weld::Window*   GetDialogFrameWeld() const;
-
-//TODO rename to get_preferred_size when SfxTabPage doesn't inherit from 
anything
-Size get_container_size() const
-{
-return m_xContainer->get_preferred_size();
-}
 };
 
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2018-12-04 Thread Libreoffice Gerrit user
 cui/source/tabpages/numpages.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 253af4f2cfb93a7f8c223661c0c1b7845c1644f0
Author: Noel Grandin 
AuthorDate: Mon Dec 3 10:42:01 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Dec 5 08:06:44 2018 +0100

tdf#121620 Opening Image tab of Bullets and Numbering dialog resets 
selection

regression from
commit 39e6bae2c4be24a3aad5ef8cd37d3d83c41a4abe
loplugin:useuniqueptr in cui numpages

Change-Id: I77e16880d0590793545da38b7a3c8c5d2626d8f5
Reviewed-on: https://gerrit.libreoffice.org/64441
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit c9e70af2bf6dc9427a9c1dd32d5e8ecccd32c3c2)
Reviewed-on: https://gerrit.libreoffice.org/64536

diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 4b8f278b93b4..a6ea4899f3dd 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -845,7 +845,7 @@ void  SvxBitmapPickTabPage::ActivatePage(const SfxItemSet& 
rSet)
 }
 
 if(!aGrfNames.empty() &&
-(pActNum && (lcl_IsNumFmtSet(pActNum.get(), nActNumLvl) || bIsPreset)))
+(pActNum && (!lcl_IsNumFmtSet(pActNum.get(), nActNumLvl) || 
bIsPreset)))
 {
 m_xExamplesVS->SelectItem(1);
 NumSelectHdl_Impl(m_xExamplesVS.get());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source cui/uiconfig include/sfx2 include/svx include/vcl sfx2/source solenv/sanitizers svx/source sw/source vcl/source vcl/unx

2018-12-04 Thread Libreoffice Gerrit user
 cui/source/factory/dlgfact.cxx|5 
 cui/source/factory/dlgfact.hxx|2 
 cui/source/inc/autocdlg.hxx   |   14 --
 cui/source/tabpages/autocdlg.cxx  |   86 ++---
 cui/uiconfig/ui/acorexceptpage.ui |3 
 cui/uiconfig/ui/acoroptionspage.ui|3 
 cui/uiconfig/ui/applyautofmtpage.ui   |3 
 cui/uiconfig/ui/applylocalizedpage.ui |4 
 cui/uiconfig/ui/autocorrectdialog.ui  |  212 ++
 cui/uiconfig/ui/wordcompletionpage.ui |   17 +-
 include/sfx2/sfxdlg.hxx   |2 
 include/svx/langbox.hxx   |2 
 include/vcl/weld.hxx  |2 
 sfx2/source/appl/appserv.cxx  |2 
 solenv/sanitizers/ui/cui.suppr|2 
 svx/source/dialog/langbox.cxx |   10 +
 sw/source/uibase/app/docsh2.cxx   |2 
 vcl/source/app/salvtables.cxx |6 
 vcl/unx/gtk3/gtk3gtkinst.cxx  |   48 +++
 19 files changed, 326 insertions(+), 99 deletions(-)

New commits:
commit 90586b8ad2c6b2329508747a87d2eb51edd98c28
Author: Caolán McNamara 
AuthorDate: Mon Dec 3 16:27:28 2018 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 4 20:57:43 2018 +0100

weld OfaAutoCorrDlg

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

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 759b90bc53c6..dd8c8bf1c3d4 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -986,10 +986,9 @@ VclPtr 
AbstractDialogFactory_Impl::CreateFrameDialog(vcl::Win
 }
 
 // TabDialog outside the drawing layer
-VclPtr 
AbstractDialogFactory_Impl::CreateAutoCorrTabDialog(vcl::Window* pParent, const 
SfxItemSet* pAttrSet)
+VclPtr 
AbstractDialogFactory_Impl::CreateAutoCorrTabDialog(weld::Window* pParent, 
const SfxItemSet* pAttrSet)
 {
-VclPtrInstance pDlg(pParent, pAttrSet);
-return VclPtr::Create( pDlg );
+return 
VclPtr::Create(o3tl::make_unique(pParent,
 pAttrSet));
 }
 
 VclPtr 
AbstractDialogFactory_Impl::CreateCustomizeTabDialog(
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 1e103792893d..cd6dffd9f4e6 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -688,7 +688,7 @@ public:
 virtual VclPtrCreateFrameDialog(vcl::Window* 
pParent, const css::uno::Reference< css::frame::XFrame >& rxFrame,
sal_uInt32 nResId,
const OUString& 
rParameter ) override;
-virtual VclPtr CreateAutoCorrTabDialog(vcl::Window* 
pParent, const SfxItemSet* pAttrSet) override;
+virtual VclPtr CreateAutoCorrTabDialog(weld::Window* 
pParent, const SfxItemSet* pAttrSet) override;
 virtual VclPtr CreateCustomizeTabDialog(
 const SfxItemSet* pAttrSet,
 const css::uno::Reference< 
css::frame::XFrame >& xViewFrame ) override;
diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index cc8b5383b7af..465ee0a34498 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -40,20 +40,16 @@ namespace editeng { class SortedAutoCompleteStrings; }
 
 // class OfaAutoCorrDlg --
 
-class OfaAutoCorrDlg : public SfxTabDialog
+class OfaAutoCorrDlg : public SfxTabDialogController
 {
-VclPtr m_pLanguageBox;
-VclPtr  m_pLanguageLB;
+std::unique_ptr m_xLanguageBox;
+std::unique_ptr  m_xLanguageLB;
 
-sal_uInt16 m_nReplacePageId;
-sal_uInt16 m_nExceptionsPageId;
-
-DECL_LINK(SelectLanguageHdl, ListBox&, void);
+DECL_LINK(SelectLanguageHdl, weld::ComboBox&, void);
 public:
 
-OfaAutoCorrDlg(vcl::Window* pParent, const SfxItemSet *pSet);
+OfaAutoCorrDlg(weld::Window* pParent, const SfxItemSet *pSet);
 virtual ~OfaAutoCorrDlg() override;
-virtual void dispose() override;
 
 void EnableLanguage(bool bEnable);
 };
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 347c28141c3f..0c76a85333c5 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -60,12 +60,11 @@ static LanguageType eLastDialogLanguage = LANGUAGE_SYSTEM;
 using namespace ::com::sun::star::util;
 using namespace ::com::sun::star;
 
-OfaAutoCorrDlg::OfaAutoCorrDlg(vcl::Window* pParent, const SfxItemSet* _pSet )
-: SfxTabDialog(pParent, "AutoCorrectDialog", 
"cui/ui/autocorrectdialog.ui", _pSet)
+OfaAutoCorrDlg::OfaAutoCorrDlg(weld::Window* pParent, const SfxItemSet* _pSet )
+: SfxTabDialogController(pParent, "cui/ui/autocorrectdialog.ui", 
"AutoCorrectDialog", _pSet)
+, m_xLanguageBox(m_xBuilder->weld_widget("langbox"))
+, m_xLanguageLB(new 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source cui/uiconfig

2018-12-04 Thread Libreoffice Gerrit user
 cui/source/inc/autocdlg.hxx|   15 +---
 cui/source/tabpages/autocdlg.cxx   |  123 ++---
 cui/uiconfig/ui/smarttagoptionspage.ui |   58 ++-
 3 files changed, 114 insertions(+), 82 deletions(-)

New commits:
commit 358c94ee861a8e39810f8b996b3693a94484ce8b
Author: Caolán McNamara 
AuthorDate: Mon Dec 3 15:20:55 2018 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 4 14:10:35 2018 +0100

weld OfaSmartTagOptionsTabPage

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

diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index ca7daf9c4328..cc8b5383b7af 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -422,9 +422,9 @@ class OfaSmartTagOptionsTabPage : public SfxTabPage
 private:
 
 // controls
-VclPtr   m_pMainCB;
-VclPtrm_pSmartTagTypesLB;
-VclPtr m_pPropertiesPB;
+std::unique_ptr m_xMainCB;
+std::unique_ptr m_xSmartTagTypesLB;
+std::unique_ptr m_xPropertiesPB;
 
 /** Inserts items into m_aSmartTagTypesLB
 
@@ -442,27 +442,26 @@ private:
 Enables/disables all controls in the tab page (except from the
 check box.
 */
-DECL_LINK(CheckHdl, CheckBox&, void);
+DECL_LINK(CheckHdl, weld::ToggleButton&, void);
 
 /** Handler for the push button
 
 Calls the displayPropertyPage function of the smart tag recognizer
 associated with the currently selected smart tag type.
 */
-DECL_LINK(ClickHdl, Button*, void);
+DECL_LINK(ClickHdl, weld::Button&, void);
 
 /** Handler for the list box
 
 Enables/disables the properties push button if selection in the
 smart tag types list box changes.
 */
-DECL_LINK(SelectHdl, SvTreeListBox*, void);
+DECL_LINK(SelectHdl, weld::TreeView&, void);
 
 public:
 /// construction via Create()
-OfaSmartTagOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
+OfaSmartTagOptionsTabPage(TabPageParent pParent, const SfxItemSet& rSet);
 virtual ~OfaSmartTagOptionsTabPage() override;
-virtual void dispose() override;
 
 static VclPtr  Create( TabPageParent pParent, const 
SfxItemSet* rAttrSet);
 
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 74604a9e5d2b..347c28141c3f 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -2233,25 +2233,24 @@ IMPL_LINK(OfaAutoCompleteTabPage, KeyReleaseHdl, const 
KeyEvent&, rEvent, bool)
 
 // class OfaSmartTagOptionsTabPage 
-
 
-OfaSmartTagOptionsTabPage::OfaSmartTagOptionsTabPage( vcl::Window* pParent,
-  const SfxItemSet& rSet )
-: SfxTabPage(pParent, "SmartTagOptionsPage", 
"cui/ui/smarttagoptionspage.ui", )
+OfaSmartTagOptionsTabPage::OfaSmartTagOptionsTabPage(TabPageParent pParent,
+ const SfxItemSet& rSet )
+: SfxTabPage(pParent, "cui/ui/smarttagoptionspage.ui", 
"SmartTagOptionsPage", )
+, m_xMainCB(m_xBuilder->weld_check_button("main"))
+, m_xSmartTagTypesLB(m_xBuilder->weld_tree_view("list"))
+, m_xPropertiesPB(m_xBuilder->weld_button("properties"))
 {
-get(m_pMainCB, "main");
-get(m_pSmartTagTypesLB, "list");
-get(m_pPropertiesPB, "properties");
+
m_xSmartTagTypesLB->set_size_request(m_xSmartTagTypesLB->get_approximate_digit_width()
 * 50,
+ 
m_xSmartTagTypesLB->get_height_rows(6));
 
-// some options for the list box:
-m_pSmartTagTypesLB->SetStyle( m_pSmartTagTypesLB->GetStyle() | WB_HSCROLL 
| WB_HIDESELECTION );
-m_pSmartTagTypesLB->SetHighlightRange();
-Size aControlSize(LogicToPixel(Size(172, 154), 
MapMode(MapUnit::MapAppFont)));
-m_pSmartTagTypesLB->set_width_request(aControlSize.Width());
-m_pSmartTagTypesLB->set_height_request(aControlSize.Height());
+std::vector aWidths;
+aWidths.push_back(m_xSmartTagTypesLB->get_approximate_digit_width() * 3 + 
6);
+m_xSmartTagTypesLB->set_column_fixed_widths(aWidths);
 
 // set the handlers:
-m_pMainCB->SetToggleHdl(LINK(this, OfaSmartTagOptionsTabPage, CheckHdl));
-m_pPropertiesPB->SetClickHdl(LINK(this, OfaSmartTagOptionsTabPage, 
ClickHdl));
-m_pSmartTagTypesLB->SetSelectHdl(LINK(this, OfaSmartTagOptionsTabPage, 
SelectHdl));
+m_xMainCB->connect_toggled(LINK(this, OfaSmartTagOptionsTabPage, 
CheckHdl));
+m_xPropertiesPB->connect_clicked(LINK(this, OfaSmartTagOptionsTabPage, 
ClickHdl));
+m_xSmartTagTypesLB->connect_changed(LINK(this, OfaSmartTagOptionsTabPage, 
SelectHdl));
 }
 
 OfaSmartTagOptionsTabPage::~OfaSmartTagOptionsTabPage()
@@ -2259,17 +2258,9 @@ 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source cui/uiconfig

2018-12-04 Thread Libreoffice Gerrit user
 cui/source/inc/autocdlg.hxx|9 +--
 cui/source/tabpages/autocdlg.cxx   |   94 +++--
 cui/uiconfig/ui/acoroptionspage.ui |   58 --
 3 files changed, 108 insertions(+), 53 deletions(-)

New commits:
commit c61b6668a388bdbf69f0b47e242b943c1cb00a2a
Author: Caolán McNamara 
AuthorDate: Mon Dec 3 15:31:02 2018 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 4 13:34:23 2018 +0100

weld OfaAutocorrOptionsPage

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

diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index 0f85612dc1f7..ca7daf9c4328 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -95,8 +95,6 @@ class OfaAutocorrOptionsPage : public SfxTabPage
 using TabPage::ActivatePage;
 
 private:
-VclPtr m_pCheckLB;
-
 OUString m_sInput;
 OUString m_sDoubleCaps;
 OUString m_sStartCap;
@@ -106,10 +104,13 @@ private:
 OUString m_sDash;
 OUString m_sAccidentalCaps;
 
+std::unique_ptr m_xCheckLB;
+
+void InsertEntry(const OUString& rTxt);
+
 public:
-OfaAutocorrOptionsPage(vcl::Window* pParent, const SfxItemSet& rSet);
+OfaAutocorrOptionsPage(TabPageParent pParent, const SfxItemSet& rSet);
 virtual ~OfaAutocorrOptionsPage() override;
-virtual void dispose() override;
 
 static VclPtr  Create( TabPageParent pParent,
 const SfxItemSet* rAttrSet);
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index e3870bd2fa3b..74604a9e5d2b 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -188,8 +188,8 @@ IMPL_LINK(OfaAutoCorrDlg, SelectLanguageHdl, ListBox&, 
rBox, void)
 }
 }
 
-OfaAutocorrOptionsPage::OfaAutocorrOptionsPage(vcl::Window* pParent, const 
SfxItemSet& rSet)
-: SfxTabPage(pParent, "AutocorrectOptionsPage", 
"cui/ui/acoroptionspage.ui", )
+OfaAutocorrOptionsPage::OfaAutocorrOptionsPage(TabPageParent pParent, const 
SfxItemSet& rSet)
+: SfxTabPage(pParent, "cui/ui/acoroptionspage.ui", 
"AutocorrectOptionsPage", )
 , m_sInput(CuiResId(RID_SVXSTR_USE_REPLACE))
 , m_sDoubleCaps(CuiResId(RID_SVXSTR_CPTL_STT_WORD))
 , m_sStartCap(CuiResId(RID_SVXSTR_CPTL_STT_SENT))
@@ -198,8 +198,11 @@ 
OfaAutocorrOptionsPage::OfaAutocorrOptionsPage(vcl::Window* pParent, const SfxIt
 , m_sNoDblSpaces(CuiResId(RID_SVXSTR_NO_DBL_SPACES))
 , m_sDash(CuiResId(RID_SVXSTR_DASH))
 , m_sAccidentalCaps(CuiResId(RID_SVXSTR_CORRECT_ACCIDENTAL_CAPS_LOCK))
+, m_xCheckLB(m_xBuilder->weld_tree_view("checklist"))
 {
-get(m_pCheckLB, "checklist");
+std::vector aWidths;
+aWidths.push_back(m_xCheckLB->get_approximate_digit_width() * 3 + 6);
+m_xCheckLB->set_column_fixed_widths(aWidths);
 }
 
 OfaAutocorrOptionsPage::~OfaAutocorrOptionsPage()
@@ -207,16 +210,10 @@ OfaAutocorrOptionsPage::~OfaAutocorrOptionsPage()
 disposeOnce();
 }
 
-void OfaAutocorrOptionsPage::dispose()
-{
-m_pCheckLB.clear();
-SfxTabPage::dispose();
-}
-
-VclPtr OfaAutocorrOptionsPage::Create( TabPageParent pParent,
-   const SfxItemSet* rSet)
+VclPtr OfaAutocorrOptionsPage::Create(TabPageParent pParent,
+  const SfxItemSet* rSet)
 {
-return VclPtr::Create(pParent.pParent, *rSet);
+return VclPtr::Create(pParent, *rSet);
 }
 
 bool OfaAutocorrOptionsPage::FillItemSet( SfxItemSet* )
@@ -224,15 +221,15 @@ bool OfaAutocorrOptionsPage::FillItemSet( SfxItemSet* )
 SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect();
 ACFlags nFlags = pAutoCorrect->GetFlags();
 
-sal_uLong nPos = 0;
-pAutoCorrect->SetAutoCorrFlag(ACFlags::Autocorrect,  
m_pCheckLB->IsChecked(nPos++));
-pAutoCorrect->SetAutoCorrFlag(ACFlags::CapitalStartWord, 
m_pCheckLB->IsChecked(nPos++));
-pAutoCorrect->SetAutoCorrFlag(ACFlags::CapitalStartSentence, 
m_pCheckLB->IsChecked(nPos++));
-pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgWeightUnderl,  
m_pCheckLB->IsChecked(nPos++));
-pAutoCorrect->SetAutoCorrFlag(ACFlags::SetINetAttr,  
m_pCheckLB->IsChecked(nPos++));
-pAutoCorrect->SetAutoCorrFlag(ACFlags::ChgToEnEmDash,
m_pCheckLB->IsChecked(nPos++));
-pAutoCorrect->SetAutoCorrFlag(ACFlags::IgnoreDoubleSpace,
m_pCheckLB->IsChecked(nPos++));
-pAutoCorrect->SetAutoCorrFlag(ACFlags::CorrectCapsLock,  
m_pCheckLB->IsChecked(nPos++));
+int nPos = 0;
+pAutoCorrect->SetAutoCorrFlag(ACFlags::Autocorrect,  
m_xCheckLB->get_toggle(nPos++));
+pAutoCorrect->SetAutoCorrFlag(ACFlags::CapitalStartWord, 
m_xCheckLB->get_toggle(nPos++));
+pAutoCorrect->SetAutoCorrFlag(ACFlags::CapitalStartSentence, 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source cui/uiconfig vcl/source

2018-12-04 Thread Libreoffice Gerrit user
 cui/source/inc/autocdlg.hxx   |   60 +++---
 cui/source/tabpages/autocdlg.cxx  |  303 +++---
 cui/uiconfig/ui/applylocalizedpage.ui |  226 ++---
 vcl/source/app/salvtables.cxx |   20 ++
 4 files changed, 279 insertions(+), 330 deletions(-)

New commits:
commit d07193a25bc057f687a68f487204df3ce999f96c
Author: Caolán McNamara 
AuthorDate: Mon Dec 3 13:48:34 2018 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 4 13:09:43 2018 +0100

weld OfaQuoteTabPage

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

diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index 6dc3a39548f8..0f85612dc1f7 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -320,54 +320,48 @@ class OfaQuoteTabPage : public SfxTabPage
 using TabPage::ActivatePage;
 
 private:
-/// For anything but writer
-VclPtr m_pCheckLB;
-
-/// Just for writer
-VclPtr   m_pSwCheckLB;
-
 OUStringsNonBrkSpace;
 OUStringsOrdinal;
 
-std::unique_ptr m_xCheckButtonData;
-
-VclPtr   m_pSingleTypoCB;
-VclPtr m_pSglStartQuotePB;
-VclPtr  m_pSglStartExFT;
-VclPtr m_pSglEndQuotePB;
-VclPtr  m_pSglEndExFT;
-VclPtr m_pSglStandardPB;
-
-VclPtr   m_pDoubleTypoCB;
-VclPtr m_pDblStartQuotePB;
-VclPtr  m_pDblStartExFT;
-VclPtr m_pDblEndQuotePB;
-VclPtr  m_pDblEndExFT;
-VclPtr m_pDblStandardPB;
-
-OUStringm_sStandard;
-
-
 sal_UCS4cSglStartQuote;
 sal_UCS4cSglEndQuote;
 
 sal_UCS4cStartQuote;
 sal_UCS4cEndQuote;
 
-DECL_LINK( QuoteHdl, Button*, void );
-DECL_LINK( StdQuoteHdl, Button*, void );
+std::unique_ptr m_xSingleTypoCB;
+std::unique_ptr m_xSglStartQuotePB;
+std::unique_ptr m_xSglStartExFT;
+std::unique_ptr m_xSglEndQuotePB;
+std::unique_ptr m_xSglEndExFT;
+std::unique_ptr m_xSglStandardPB;
+std::unique_ptr m_xDoubleTypoCB;
+std::unique_ptr m_xDblStartQuotePB;
+std::unique_ptr m_xDblStartExFT;
+std::unique_ptr m_xDblEndQuotePB;
+std::unique_ptr m_xDblEndExFT;
+std::unique_ptr m_xDblStandardPB;
+std::unique_ptr m_xStandard;
+/// For anything but writer
+std::unique_ptr m_xCheckLB;
+/// Just for writer
+std::unique_ptr m_xSwCheckLB;
+
+
+DECL_LINK(QuoteHdl, weld::Button&, void);
+DECL_LINK(StdQuoteHdl, weld::Button&, void);
 
 OUStringChangeStringExt_Impl( sal_UCS4 );
 
-SvTreeListEntry* CreateEntry(OUString& rTxt, sal_uInt16 nCol);
+static void CreateEntry(weld::TreeView& rLstBox, const OUString& rTxt,
+sal_uInt16 nCol, sal_uInt16 nTextCol);
 
-OfaQuoteTabPage( vcl::Window* pParent, const 
SfxItemSet& rSet );
+OfaQuoteTabPage(TabPageParent pParent, const SfxItemSet& rSet);
 public:
-virtual ~OfaQuoteTabPage() override;
-virtual voiddispose() override;
+virtual ~OfaQuoteTabPage() override;
 
-static VclPtr  Create( TabPageParent pParent,
-const SfxItemSet* rAttrSet);
+static VclPtr Create(TabPageParent pParent,
+ const SfxItemSet* rAttrSet);
 
 virtual boolFillItemSet( SfxItemSet* rSet ) override;
 virtual voidReset( const SfxItemSet* rSet ) override;
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 27f0d3945c14..e3870bd2fa3b 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -319,62 +319,6 @@ public:
 
 /*/
 /*   */
-/*  changed LBoxString   */
-/*   */
-/*/
-
-class OfaImpBrwString : public SvLBoxString
-{
-public:
-
-explicit OfaImpBrwString( const OUString& rStr ) : SvLBoxString(rStr){}
-
-virtual void Paint(const Point& rPos, SvTreeListBox& rDev, 
vcl::RenderContext& rRenderContext,
-   const SvViewDataEntry* pView, const SvTreeListEntry& 
rEntry) override;
-};
-
-void OfaImpBrwString::Paint(const Point& rPos, SvTreeListBox& /*rDev*/, 
vcl::RenderContext& rRenderContext,
-const SvViewDataEntry* /*pView*/, const 
SvTreeListEntry& rEntry)
-{
-rRenderContext.DrawText(rPos, GetText());
-if (rEntry.GetUserData())
-{
-ImpUserData* pUserData = 
static_cast(rEntry.GetUserData());
-Point aNewPos(rPos);
-aNewPos.AdjustX(rRenderContext.GetTextWidth(GetText()) );
-vcl::Font 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source extensions/source include/vcl sc/inc sc/source sc/uiconfig sd/source sw/source vcl/source vcl/unx

2018-12-03 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuigaldlg.cxx |2 
 cui/source/dialogs/showcols.cxx  |2 
 cui/source/tabpages/numpages.cxx |4 
 extensions/source/propctrlr/listselectiondlg.cxx |2 
 include/vcl/seleng.hxx   |4 
 include/vcl/vclenum.hxx  |2 
 include/vcl/weld.hxx |2 
 sc/inc/strings.hrc   |3 
 sc/source/ui/docshell/docsh4.cxx |   11 -
 sc/source/ui/inc/sharedocdlg.hxx |   22 +--
 sc/source/ui/miscdlgs/instbdlg.cxx   |2 
 sc/source/ui/miscdlgs/linkarea.cxx   |2 
 sc/source/ui/miscdlgs/sharedocdlg.cxx|  115 ++---
 sc/source/ui/miscdlgs/shtabdlg.cxx   |2 
 sc/uiconfig/scalc/ui/sharedocumentdlg.ui |  151 +--
 sd/source/ui/dlg/custsdlg.cxx|2 
 sw/source/ui/misc/num.cxx|4 
 vcl/source/app/salvtables.cxx|4 
 vcl/unx/gtk3/gtk3gtkinst.cxx |   25 +++
 19 files changed, 158 insertions(+), 203 deletions(-)

New commits:
commit 196f174b5707760d41d8062aed6410ba08878326
Author: Caolán McNamara 
AuthorDate: Fri Nov 30 13:29:23 2018 +
Commit: Caolán McNamara 
CommitDate: Mon Dec 3 09:50:36 2018 +0100

weld ScShareDocumentDlg

Change-Id: I790f957c9ebc6d87a94a355c30215245aaabeb30
Reviewed-on: https://gerrit.libreoffice.org/64421
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 49ae1aa8657b..42329f0e95b0 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -604,7 +604,7 @@ 
TPGalleryThemeProperties::TPGalleryThemeProperties(TabPageParent pWindow, const
 {
 m_xLbxFound->set_size_request(m_xLbxFound->get_approximate_digit_width() * 
35,
   m_xLbxFound->get_height_rows(15));
-m_xLbxFound->set_selection_mode(true);
+m_xLbxFound->set_selection_mode(SelectionMode::Multiple);
 xDialogListener->SetDialogClosedLink( LINK( this, 
TPGalleryThemeProperties, DialogClosedHdl ) );
 }
 
diff --git a/cui/source/dialogs/showcols.cxx b/cui/source/dialogs/showcols.cxx
index e1a454038638..d9dca102beb8 100644
--- a/cui/source/dialogs/showcols.cxx
+++ b/cui/source/dialogs/showcols.cxx
@@ -33,7 +33,7 @@ FmShowColsDialog::FmShowColsDialog(weld::Window* pParent)
 , m_xOK(m_xBuilder->weld_button("ok"))
 {
 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_xList->set_selection_mode(SelectionMode::Multiple);
 m_xOK->connect_clicked(LINK(this, FmShowColsDialog, OnClickedOk));
 }
 
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 5904c18affcf..4b8f278b93b4 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -1100,7 +1100,7 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(TabPageParent 
pParent,
 m_xFmtLB->connect_changed(LINK(this, SvxNumOptionsTabPage, 
NumberTypeSelectHdl_Impl));
 m_xBitmapMB->connect_selected(LINK(this, SvxNumOptionsTabPage, 
GraphicHdl_Impl));
 m_xBitmapMB->connect_toggled(LINK(this, SvxNumOptionsTabPage, 
PopupActivateHdl_Impl));
-m_xLevelLB->set_selection_mode(true);
+m_xLevelLB->set_selection_mode(SelectionMode::Multiple);
 m_xLevelLB->connect_changed(LINK(this, SvxNumOptionsTabPage, 
LevelHdl_Impl));
 m_xCharFmtLB->connect_changed(LINK(this, SvxNumOptionsTabPage, 
CharFmtHdl_Impl));
 m_xWidthMF->connect_value_changed(LINK(this, SvxNumOptionsTabPage, 
SizeHdl_Impl));
@@ -2531,7 +2531,7 @@ 
SvxNumPositionTabPage::SvxNumPositionTabPage(TabPageParent pParent, const SfxIte
 m_xAlignedAtMF->connect_value_changed(LINK(this, SvxNumPositionTabPage, 
AlignAtHdl_Impl));
 m_xIndentAtMF->connect_value_changed(LINK(this, SvxNumPositionTabPage, 
IndentAtHdl_Impl));
 
-m_xLevelLB->set_selection_mode(true);
+m_xLevelLB->set_selection_mode(SelectionMode::Multiple);
 m_xLevelLB->connect_changed(LINK(this, SvxNumPositionTabPage, 
LevelHdl_Impl));
 m_xRelativeCB->connect_toggled(LINK(this, SvxNumPositionTabPage, 
RelativeHdl_Impl));
 m_xStandardPB->connect_clicked(LINK(this, SvxNumPositionTabPage, 
StandardHdl_Impl));
diff --git a/extensions/source/propctrlr/listselectiondlg.cxx 
b/extensions/source/propctrlr/listselectiondlg.cxx
index 5cbe35c7d3fc..29b3b19e3a58 100644
--- a/extensions/source/propctrlr/listselectiondlg.cxx
+++ b/extensions/source/propctrlr/listselectiondlg.cxx
@@ -72,7 +72,7 @@ namespace pcr
 // initialize the multi-selection flag
 bool bMultiSelection = false;
 OSL_VERIFY( m_xListBox->getPropertyValue( PROPERTY_MULTISELECTION 
) >>= 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source cui/uiconfig include/svtools include/vcl sc/source vcl/source vcl/unx

2018-11-30 Thread Libreoffice Gerrit user
 cui/source/inc/autocdlg.hxx|   78 -
 cui/source/tabpages/autocdlg.cxx   |  297 +++--
 cui/uiconfig/ui/acorreplacepage.ui |   59 ++-
 include/svtools/inettbc.hxx|2 
 include/vcl/combobox.hxx   |2 
 include/vcl/edit.hxx   |4 
 include/vcl/weld.hxx   |   23 ++
 sc/source/ui/inc/linkarea.hxx  |2 
 sc/source/ui/miscdlgs/linkarea.cxx |   10 -
 vcl/source/app/salvtables.cxx  |   74 ++---
 vcl/source/control/combobox.cxx|2 
 vcl/source/control/edit.cxx|3 
 vcl/unx/gtk3/gtk3gtkinst.cxx   |   75 ++---
 13 files changed, 384 insertions(+), 247 deletions(-)

New commits:
commit 76dc9f5a625d3241364e5e30d0406316fdbc120b
Author: Caolán McNamara 
AuthorDate: Thu Nov 29 11:45:47 2018 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 30 09:48:03 2018 +0100

weld OfaAutocorrReplacePage

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

diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index 55e1fed825ac..bc8739ac2fa0 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -233,49 +233,51 @@ typedef std::map 
StringChangeTable;
 
 class OfaAutocorrReplacePage : public SfxTabPage
 {
-using TabPage::ActivatePage;
-using TabPage::DeactivatePage;
+using TabPage::ActivatePage;
+using TabPage::DeactivatePage;
 
 private:
 
-StringChangeTable aChangesTable;
-
-VclPtr   m_pTextOnlyCB;
-VclPtr   m_pShortED;
-VclPtr   m_pReplaceED;
-VclPtr   m_pReplaceTLB;
-VclPtr m_pNewReplacePB;
-VclPtr m_pDeleteReplacePB;
-
-OUStringsModify;
-OUStringsNew;
-
-std::set  aFormatText;
-std::map
-aDoubleStringTable;
-std::unique_ptr  pCompareClass;
-std::unique_ptrpCharClass;
-LanguageTypeeLang;
-
-bool bHasSelectionText;
-bool bFirstSelect:1;
-bool bReplaceEditChanged:1;
-bool bSWriter:1;
-
-DECL_LINK(SelectHdl, SvTreeListBox*, void);
-DECL_LINK(NewDelButtonHdl, Button*, void);
-DECL_LINK(NewDelActionHdl, AutoCorrEdit&, bool);
-DECL_LINK(ModifyHdl, Edit&, void);
-bool NewDelHdl(void const *);
-
-void RefillReplaceBox(  bool bFromReset,
-LanguageType eOldLanguage,
-LanguageType eNewLanguage);
+StringChangeTable aChangesTable;
+
+OUStringsModify;
+OUStringsNew;
+
+std::set  aFormatText;
+std::map
+aDoubleStringTable;
+std::unique_ptr  pCompareClass;
+std::unique_ptrpCharClass;
+LanguageTypeeLang;
+
+bool bHasSelectionText;
+bool bFirstSelect:1;
+bool bReplaceEditChanged:1;
+bool bSWriter:1;
+
+std::unique_ptr m_xTextOnlyCB;
+std::unique_ptr m_xShortED;
+std::unique_ptr m_xReplaceED;
+std::unique_ptr m_xReplaceTLB;
+std::unique_ptr m_xNewReplacePB;
+std::unique_ptr m_xReplacePB;
+std::unique_ptr m_xDeleteReplacePB;
+
+DECL_LINK(SelectHdl, weld::TreeView&, void);
+DECL_LINK(NewDelButtonHdl, weld::Button&, void);
+DECL_LINK(NewDelActionHdl, weld::Entry&, bool);
+DECL_LINK(EntrySizeAllocHdl, const Size&, void);
+DECL_LINK(ModifyHdl, weld::Entry&, void);
+bool NewDelHdl(const weld::Widget*);
+
+void RefillReplaceBox(  bool bFromReset,
+LanguageType eOldLanguage,
+LanguageType eNewLanguage);
 
 public:
-OfaAutocorrReplacePage( vcl::Window* pParent, const 
SfxItemSet& rSet );
-virtual ~OfaAutocorrReplacePage() override;
-virtual voiddispose() override;
+OfaAutocorrReplacePage(TabPageParent pParent, const SfxItemSet& rSet);
+virtual ~OfaAutocorrReplacePage() override;
+virtual void dispose() override;
 
 static VclPtr  Create( TabPageParent pParent, const 
SfxItemSet* rAttrSet);
 
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index c491d265253c..b143f2734857 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -857,24 +857,25 @@ voidOfaACorrCheckListBox::KeyInput( const KeyEvent& 
rKEvt )
 SvSimpleTable::KeyInput(rKEvt);
 }
 
-OfaAutocorrReplacePage::OfaAutocorrReplacePage( vcl::Window* pParent,
-const SfxItemSet& rSet )
-: SfxTabPage(pParent, "AcorReplacePage", "cui/ui/acorreplacepage.ui", 
)
+OfaAutocorrReplacePage::OfaAutocorrReplacePage(TabPageParent pParent,
+   const 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source include/vcl

2018-11-29 Thread Libreoffice Gerrit user
 cui/source/factory/dlgfact.cxx |6 --
 cui/source/factory/dlgfact.hxx |6 --
 include/vcl/abstdlg.hxx|8 
 3 files changed, 20 deletions(-)

New commits:
commit 9766892044fc69de18d0395ec2c4a0e652165c23
Author: Caolán McNamara 
AuthorDate: Thu Nov 29 09:25:34 2018 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 30 00:47:45 2018 +0100

drop unused VclAbstractRefreshableDialog

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

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 206d4a13cca9..759b90bc53c6 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -110,7 +110,6 @@ short CuiAbstractSingleTabController_Impl::Execute()
 }
 
 IMPL_ABSTDLG_BASE(CuiVclAbstractDialog_Impl)
-IMPL_ABSTDLG_BASE(VclAbstractRefreshableDialog_Impl);
 IMPL_ABSTDLG_BASE(CuiAbstractTabDialog_Impl);
 
 short AbstractSvxDistributeDialog_Impl::Execute()
@@ -554,11 +553,6 @@ sal_uInt32 AbstractGalleryIdDialog_Impl::GetId() const
 return m_xDlg->GetId();
 }
 
-void VclAbstractRefreshableDialog_Impl::Update()
-{
-pDlg->Update();
-}
-
 OUString AbstractURLDlg_Impl::GetURL() const
 {
 return pDlg->GetURL();
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 40f51fb6c681..1e103792893d 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -97,12 +97,6 @@ public:
 virtual short Execute() override;
 };
 
-class VclAbstractRefreshableDialog_Impl : public VclAbstractRefreshableDialog
-{
-DECL_ABSTDLG_BASE(VclAbstractRefreshableDialog_Impl,Dialog)
-virtual voidUpdate() override ;
-};
-
 class CuiAbstractSfxDialog_Impl : public SfxAbstractDialog
 {
 DECL_ABSTDLG_BASE(CuiAbstractSfxDialog_Impl,SfxModalDialog)
diff --git a/include/vcl/abstdlg.hxx b/include/vcl/abstdlg.hxx
index 353a542439cf..f000d92c26e5 100644
--- a/include/vcl/abstdlg.hxx
+++ b/include/vcl/abstdlg.hxx
@@ -86,14 +86,6 @@ public:
 virtual voidEndDialog(sal_Int32 nResult) = 0;
 };
 
-class VCL_DLLPUBLIC VclAbstractRefreshableDialog : public VclAbstractDialog
-{
-protected:
-virtual ~VclAbstractRefreshableDialog() override = default;
-public:
-virtual voidUpdate() = 0;
-};
-
 class VCL_DLLPUBLIC AbstractPasswordToOpenModifyDialog : public 
VclAbstractDialog
 {
 protected:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source include/svx svx/source

2018-11-29 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuigaldlg.cxx |   53 +++
 cui/source/factory/dlgfact.cxx   |   21 +--
 cui/source/factory/dlgfact.hxx   |   19 +++--
 cui/source/inc/cuigaldlg.hxx |   19 ++---
 include/svx/svxdlg.hxx   |4 +-
 svx/source/gallery2/galbrws1.cxx |3 --
 6 files changed, 55 insertions(+), 64 deletions(-)

New commits:
commit 155073e8391f9b9834b8741571852c7930496c73
Author: Caolán McNamara 
AuthorDate: Thu Nov 29 09:20:28 2018 +
Commit: Caolán McNamara 
CommitDate: Thu Nov 29 21:10:03 2018 +0100

weld ActualizeProgress

Change-Id: I35c486ac2dcf9818e331816f554a5c414bdb2386
Reviewed-on: https://gerrit.libreoffice.org/64221
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 e9a12d98582a..49ae1aa8657b 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -374,78 +374,55 @@ void TakeProgress::LaunchThread()
 maTakeThread->launch();
 }
 
-ActualizeProgress::ActualizeProgress(vcl::Window* pWindow, GalleryTheme* pThm)
-: ModalDialog(pWindow, "GalleryUpdateProgress",
-"cui/ui/galleryupdateprogress.ui")
+ActualizeProgress::ActualizeProgress(weld::Window* pWindow, GalleryTheme* pThm)
+: GenericDialogController(pWindow, "cui/ui/galleryupdateprogress.ui",
+  "GalleryUpdateProgress")
 , pIdle(nullptr)
 , pTheme(pThm)
+, m_xFtActualizeFile(m_xBuilder->weld_label("file"))
+, m_xBtnCancel(m_xBuilder->weld_button("cancel"))
 {
-get(m_pFtActualizeFile, "file");
-get(m_pBtnCancel, "cancel");
-m_pBtnCancel->SetClickHdl( LINK( this, ActualizeProgress, ClickCancelBtn ) 
);
+m_xBtnCancel->connect_clicked(LINK(this, ActualizeProgress, 
ClickCancelBtn));
 }
 
-
 ActualizeProgress::~ActualizeProgress()
 {
-disposeOnce();
 }
 
-
-void ActualizeProgress::dispose()
+short ActualizeProgress::run()
 {
-m_pFtActualizeFile.clear();
-m_pBtnCancel.clear();
-ModalDialog::dispose();
-}
-
-
-short ActualizeProgress::Execute()
-{
-short nRet;
-
 pIdle = new Idle("ActualizeProgressTimeout");
 pIdle->SetInvokeHandler( LINK( this, ActualizeProgress, TimeoutHdl ) );
 pIdle->SetPriority( TaskPriority::LOWEST );
 pIdle->Start();
 
-nRet = ModalDialog::Execute();
-
-return nRet;
+return GenericDialogController::run();
 }
 
-
-IMPL_LINK_NOARG(ActualizeProgress, ClickCancelBtn, Button*, void)
+IMPL_LINK_NOARG(ActualizeProgress, ClickCancelBtn, weld::Button&, void)
 {
 pTheme->AbortActualize();
-EndDialog( RET_OK );
+m_xDialog->response(RET_OK);
 }
 
-
 IMPL_LINK( ActualizeProgress, TimeoutHdl, Timer*, _pTimer, void)
 {
-if ( _pTimer )
+if (_pTimer)
 {
 _pTimer->Stop();
 delete _pTimer;
 }
 
-pTheme->Actualize( LINK( this, ActualizeProgress, ActualizeHdl ), 
 );
-ClickCancelBtn( nullptr );
+pTheme->Actualize(LINK(this, ActualizeProgress, ActualizeHdl), 
);
+ClickCancelBtn(*m_xBtnCancel);
 }
 
-
 IMPL_LINK( ActualizeProgress, ActualizeHdl, const INetURLObject&, rURL, void )
 {
-Application::Reschedule( true );
-
-Flush();
-
-m_pFtActualizeFile->SetText( GetReducedString( rURL, 30 ) );
-m_pFtActualizeFile->Flush();
+Application::Reschedule(true);
+m_xFtActualizeFile->set_label(GetReducedString(rURL, 30));
 }
 
-
 TitleDialog::TitleDialog(weld::Window* pParent, const OUString& rOldTitle)
 : GenericDialogController(pParent, "cui/ui/gallerytitledialog.ui", 
"GalleryTitleDialog")
 , m_xEdit(m_xBuilder->weld_entry("entry"))
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index d1fa040adece..206d4a13cca9 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -104,6 +104,11 @@ short CuiAbstractController_Impl::Execute()
 return m_xDlg->run();
 }
 
+short CuiAbstractSingleTabController_Impl::Execute()
+{
+return m_xDlg->run();
+}
+
 IMPL_ABSTDLG_BASE(CuiVclAbstractDialog_Impl)
 IMPL_ABSTDLG_BASE(VclAbstractRefreshableDialog_Impl);
 IMPL_ABSTDLG_BASE(CuiAbstractTabDialog_Impl);
@@ -339,12 +344,12 @@ void CuiAbstractTabController_Impl::SetText( const 
OUString& rStr )
 m_xDlg->set_title(rStr);
 }
 
-const SfxItemSet* CuiAbstractController_Impl::GetOutputItemSet() const
+const SfxItemSet* CuiAbstractSingleTabController_Impl::GetOutputItemSet() const
 {
 return m_xDlg->GetOutputItemSet();
 }
 
-void CuiAbstractController_Impl::SetText(const OUString& rStr)
+void CuiAbstractSingleTabController_Impl::SetText(const OUString& rStr)
 {
 m_xDlg->set_title(rStr);
 }
@@ -1068,10 +1073,10 @@ VclPtr 
AbstractDialogFactory_Impl::CreateSvxSpellDialog(
 return VclPtr::Create(pDlg);
 }
 
-VclPtr 
AbstractDialogFactory_Impl::CreateActualizeProgressDialog( vcl::Window* 
pParent, GalleryTheme* pThm )
+VclPtr 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - 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 6c2962b48e183c0a5008f439104db5e9b5810b5c
Author: Caolán McNamara 
AuthorDate: Wed Nov 28 19:56:26 2018 +
Commit: Caolán McNamara 
CommitDate: Thu Nov 29 13:30:37 2018 +0100

weld GalleryThemeProperties

Change-Id: I88fbb9ab03f0026ffe0c5fe79ab0a386160738a1
Reviewed-on: https://gerrit.libreoffice.org/64220
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 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 )
-{
-

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source cui/uiconfig extras/source include/svx svx/source

2018-11-29 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuigaldlg.cxx   |  232 ++---
 cui/source/inc/cuigaldlg.hxx   |   42 ++--
 cui/uiconfig/ui/galleryfilespage.ui|   88 +++--
 extras/source/glade/libreoffice-catalog.xml.in |3 
 include/svx/galctrl.hxx|   21 ++
 svx/source/gallery2/galctrl.cxx|   86 +
 6 files changed, 288 insertions(+), 184 deletions(-)

New commits:
commit b7900dd3fdc93e6830006f41047315dd66d0c989
Author: Caolán McNamara 
AuthorDate: Wed Nov 28 16:52:14 2018 +
Commit: Caolán McNamara 
CommitDate: Thu Nov 29 11:58:44 2018 +0100

weld GalleryFilesPage

Change-Id: I5fa399144fb12bb19c3b88bf99f99dad6a64e052
Reviewed-on: https://gerrit.libreoffice.org/64211
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 aacb1f37ff89..f2eeb836e15c 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -73,31 +73,29 @@ SearchThread::SearchThread( SearchProgress* pProgress,
 {
 }
 
-
 SearchThread::~SearchThread()
 {
 }
 
-
 void SearchThread::execute()
 {
-const OUString aFileType( mpBrowser->m_pCbbFileType->GetText() );
+const OUString aFileType(mpBrowser->m_xCbbFileType->get_active_text());
 
-if( !aFileType.isEmpty() )
+if (!aFileType.isEmpty())
 {
-const sal_Int32 nFileNumber = mpBrowser->m_pCbbFileType->GetEntryPos( 
aFileType );
+const int nFileNumber = 
mpBrowser->m_xCbbFileType->find_text(aFileType);
 sal_Int32 nBeginFormat, nEndFormat;
 std::vector< OUString > aFormats;
 
-if( !nFileNumber || ( nFileNumber >= 
mpBrowser->m_pCbbFileType->GetEntryCount() ) )
+if( !nFileNumber || nFileNumber == -1)
 {
 nBeginFormat = 1;
-nEndFormat = mpBrowser->m_pCbbFileType->GetEntryCount() - 1;
+nEndFormat = mpBrowser->m_xCbbFileType->get_count() - 1;
 }
 else
 nBeginFormat = nEndFormat = nFileNumber;
 
-for( sal_Int32 i = nBeginFormat; i <= nEndFormat; ++i )
+for (sal_Int32 i = nBeginFormat; i <= nEndFormat; ++i)
 aFormats.push_back( mpBrowser->aFilterEntryList[ i 
]->aFilterName.toAsciiLowerCase() );
 
 ImplSearch( maStartURL, aFormats, mpBrowser->bSearchRecursive );
@@ -171,9 +169,9 @@ void SearchThread::ImplSearch( const INetURLObject& 
rStartURL,
 mpBrowser->aFoundList.push_back(
 aFoundURL.GetMainURL( 
INetURLObject::DecodeMechanism::NONE )
 );
-mpBrowser->m_pLbxFound->InsertEntry(
-GetReducedString( aFoundURL, 50 ),
-
static_cast(mpBrowser->aFoundList.size()) - 1 );
+mpBrowser->m_xLbxFound->insert_text(
+mpBrowser->aFoundList.size() - 1,
+GetReducedString(aFoundURL, 50));
 }
 }
 }
@@ -279,16 +277,24 @@ void TakeThread::execute()
 GalleryTheme*   pThm = mpBrowser->GetXChgData()->pTheme;
 std::unique_ptr pStatusProgress;
 
+std::vector aSelectedRows;
+
 {
 SolarMutexGuard aGuard;
 pStatusProgress.reset(new GalleryProgress);
-nEntries = mpBrowser->bTakeAll ? 
mpBrowser->m_pLbxFound->GetEntryCount() : 
mpBrowser->m_pLbxFound->GetSelectedEntryCount();
+if (mpBrowser->bTakeAll)
+nEntries = mpBrowser->m_xLbxFound->n_children();
+else
+{
+aSelectedRows = mpBrowser->m_xLbxFound->get_selected_rows();
+nEntries = aSelectedRows.size();
+}
 pThm->LockBroadcaster();
 }
 
 for( sal_Int32 i = 0; i < nEntries && schedule(); ++i )
 {
-const sal_Int32 nPos = mpBrowser->bTakeAll ? i : 
mpBrowser->m_pLbxFound->GetSelectedEntryPos( i );
+const sal_Int32 nPos = mpBrowser->bTakeAll ? i : aSelectedRows[i];
 const INetURLObject aURL( mpBrowser->aFoundList[ nPos ]);
 
 mrTakenList.push_back( static_cast(nPos) );
@@ -359,8 +365,8 @@ IMPL_LINK_NOARG(TakeProgress, CleanUpHdl, void*, void)
 sal_uInt32  i, nCount;
 
 GetParent()->EnterWait();
-pBrowser->m_pLbxFound->SetUpdateMode( false );
-pBrowser->m_pLbxFound->SetNoSelection();
+pBrowser->m_xLbxFound->select(-1);
+pBrowser->m_xLbxFound->freeze();
 
 // mark all taken positions in aRemoveEntries
 for( i = 0, nCount = maTakenList.size(); i < nCount; ++i )
@@ -382,17 +388,17 @@ IMPL_LINK_NOARG(TakeProgress, CleanUpHdl, void*, void)
 // refill list box
 for( i = 0, nCount = aRemoveEntries.size(); i < nCount; ++i )
 if( !aRemoveEntries[ i ] )
-aRemainingVector.push_back( 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2018-11-28 Thread Libreoffice Gerrit user
 cui/source/tabpages/transfrm.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 50fdcf88f668547be7a29a525e392679385d5f0b
Author: Caolán McNamara 
AuthorDate: Tue Nov 27 21:21:45 2018 +
Commit: Caolán McNamara 
CommitDate: Wed Nov 28 09:47:36 2018 +0100

Resolves: tdf#121695 call save_value

so get_value_changed_from_saved detects no-op

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

diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 3da5625fb774..2b56a7a76ad0 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -1115,6 +1115,11 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet*  )
 OUString aStr = GetUserData();
 m_xCbxScale->set_active(aStr.toInt32() != 0);
 
+m_xMtrPosX->save_value();
+m_xMtrPosY->save_value();
+m_xMtrWidth->save_value();
+m_xMtrHeight->save_value();
+
 m_xTsbSizeProtect->save_state();
 m_xTsbAutoGrowWidth->save_state();
 m_xTsbAutoGrowHeight->save_state();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source cui/uiconfig sw/inc sw/source sw/uiconfig vcl/source vcl/unx

2018-11-25 Thread Libreoffice Gerrit user
 cui/source/customize/cfgutil.cxx|4 
 cui/source/tabpages/macroass.cxx|   15 -
 cui/uiconfig/ui/eventassignpage.ui  |   25 +-
 sw/inc/swabstdlg.hxx|2 
 sw/source/ui/dialog/swdlgfact.cxx   |5 
 sw/source/ui/dialog/swdlgfact.hxx   |2 
 sw/source/ui/frmdlg/frmdlg.cxx  |   73 +++-
 sw/source/ui/frmdlg/frmpage.cxx |4 
 sw/source/uibase/inc/frmdlg.hxx |   29 +--
 sw/source/uibase/inc/frmpage.hxx|2 
 sw/source/uibase/shells/frmsh.cxx   |2 
 sw/source/uibase/shells/grfsh.cxx   |2 
 sw/source/uibase/shells/textsh.cxx  |2 
 sw/uiconfig/swriter/ui/framedialog.ui   |  251 +++--
 sw/uiconfig/swriter/ui/frmaddpage.ui|9 -
 sw/uiconfig/swriter/ui/frmtypepage.ui   |2 
 sw/uiconfig/swriter/ui/frmurlpage.ui|2 
 sw/uiconfig/swriter/ui/picturedialog.ui |  275 ++--
 vcl/source/app/salvtables.cxx   |2 
 vcl/unx/gtk3/gtk3gtkinst.cxx|   18 +-
 20 files changed, 585 insertions(+), 141 deletions(-)

New commits:
commit e18348e7842a11d4950f1e6be05f379f41123950
Author: Caolán McNamara 
AuthorDate: Fri Nov 23 20:40:02 2018 +
Commit: Caolán McNamara 
CommitDate: Sun Nov 25 16:49:49 2018 +0100

weld SwFrameDlg

and now can remove...

commit 5d84af7e83404f22d3c9cd0b0bb88fb84d0550e7
Date:   Tue Dec 4 22:43:46 2012 +0100

fdo#57553: Picture dialog Macro tab page: lazily init

... because JVM startup is annoying, so delay it until really activating
Macro tab.  This patch is sort of lame but with the change in
bd2c14ec78a7549d4a19738154cdd5ea890f61c4 what can you do...

and description is revealed to be a text_view not an entry

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

diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 4204d2c0a0d6..16e2f993ef74 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -369,6 +369,7 @@ 
CuiConfigFunctionListBox::CuiConfigFunctionListBox(std::unique_ptrmake_sorted();
+m_xTreeView->set_size_request(m_xTreeView->get_approximate_digit_width() * 
20, m_xTreeView->get_height_rows(9));
 }
 
 CuiConfigFunctionListBox::~CuiConfigFunctionListBox()
@@ -1271,6 +1272,7 @@ 
CuiConfigGroupListBox::CuiConfigGroupListBox(std::unique_ptr xTr
 {
 m_xTreeView->connect_row_activated(LINK(this, CuiConfigGroupListBox, 
OpenCurrentHdl));
 m_xTreeView->connect_expanding(LINK(this, CuiConfigGroupListBox, 
ExpandingHdl));
+m_xTreeView->set_size_request(m_xTreeView->get_approximate_digit_width() * 
20, m_xTreeView->get_height_rows(9));
 }
 
 IMPL_LINK_NOARG(CuiConfigGroupListBox, OpenCurrentHdl, weld::TreeView&, void)
@@ -1541,8 +1543,8 @@ void CuiConfigGroupListBox::Init(const 
css::uno::Reference< css::uno::XComponent
 m_xTreeView->insert(nullptr, -1, sStyle, , nullptr, nullptr, 
nullptr, true);
 }
 
-m_xTreeView->scroll_to_row(0);
 m_xTreeView->thaw();
+m_xTreeView->scroll_to_row(0);
 m_xTreeView->select(0);
 }
 
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index e1a3f9060378..4788ccc404cf 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -55,12 +55,10 @@ public:
 
 Idlem_aFillGroupIdle;
 boolm_bGotEvents;
-bool m_bDummyActivated; ///< has this tab page already been activated
 };
 
 SfxMacroTabPage_Impl::SfxMacroTabPage_Impl()
 : m_bGotEvents(false)
-, m_bDummyActivated(false)
 {
 }
 
@@ -189,13 +187,6 @@ void SfxMacroTabPage::LaunchFillGroup()
 
 void SfxMacroTabPage::ActivatePage( const SfxItemSet& )
 {
-// fdo#57553 lazily init script providers, because it is annoying if done
-// on dialog open (SfxTabDialog::Start_Impl activates all tab pages once!)
-if (!mpImpl->m_bDummyActivated)
-{
-mpImpl->m_bDummyActivated = true;
-return;
-}
 LaunchFillGroup();
 }
 
@@ -396,15 +387,15 @@ void SfxMacroTabPage::FillEvents()
 
 namespace
 {
-VclPtr CreateSfxMacroTabPage( vcl::Window* pParent, const 
SfxItemSet& rAttrSet )
+VclPtr CreateSfxMacroTabPage(TabPageParent pParent, const 
SfxItemSet& rAttrSet)
 {
 return VclPtr::Create( pParent, nullptr, rAttrSet );
 }
 }
 
-VclPtr SfxMacroTabPage::Create( TabPageParent pParent, const 
SfxItemSet* rAttrSet )
+VclPtr SfxMacroTabPage::Create(TabPageParent pParent, const 
SfxItemSet* rAttrSet)
 {
-return CreateSfxMacroTabPage(pParent.pParent, *rAttrSet);
+return CreateSfxMacroTabPage(pParent, *rAttrSet);
 }
 
 SfxMacroAssignDlg::SfxMacroAssignDlg(vcl::Window* pParent,
diff --git a/cui/uiconfig/ui/eventassignpage.ui 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source include/sfx2 include/svx sc/source svx/source sw/source

2018-11-25 Thread Libreoffice Gerrit user
 cui/source/dialogs/hltpbase.cxx   |8 
 cui/source/factory/dlgfact.cxx|9 -
 cui/source/factory/dlgfact.hxx|7 +++
 cui/source/inc/macroass.hxx   |   13 -
 cui/source/tabpages/macroass.cxx  |   34 --
 include/sfx2/basedlgs.hxx |2 +-
 include/svx/svxdlg.hxx|5 ++---
 sc/source/ui/drawfunc/drawsh.cxx  |4 ++--
 sc/source/ui/inc/drawsh.hxx   |2 +-
 svx/source/dialog/imapwnd.cxx |2 +-
 sw/source/ui/chrdlg/chardlg.cxx   |2 +-
 sw/source/ui/dialog/macassgn.cxx  |6 +++---
 sw/source/ui/misc/glossary.cxx|2 +-
 sw/source/uibase/inc/macassgn.hxx |4 ++--
 14 files changed, 45 insertions(+), 55 deletions(-)

New commits:
commit 1f7ad0824ff0e4b634094b373ff90df8cf2a9e7d
Author: Caolán McNamara 
AuthorDate: Sat Nov 24 15:09:10 2018 +
Commit: Caolán McNamara 
CommitDate: Sun Nov 25 20:18:40 2018 +0100

weld SfxMacroAssignDlg

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

diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index f01447069da7..38402c8af924 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -336,10 +336,10 @@ IMPL_LINK_NOARG(SvxHyperlinkTabPageBase, 
ClickScriptHdl_Impl, Button*, void)
 bool bIsInputEnabled = GetParent()->IsInputEnabled();
 if ( bIsInputEnabled )
 GetParent()->EnableInput( false );
-ScopedVclPtrInstance< SfxMacroAssignDlg > aDlg( this, mxDocumentFrame, 
*pItemSet );
+SfxMacroAssignDlg aDlg(GetFrameWeld(), mxDocumentFrame, *pItemSet);
 
 // add events
-SfxMacroTabPage *pMacroPage = static_cast( 
aDlg->GetTabPage() );
+SfxMacroTabPage *pMacroPage = aDlg.GetTabPage();
 
 if ( pHyperlinkItem->GetMacroEvents() & 
HyperDialogEvent::MouseOverObject )
 pMacroPage->AddEvent( CuiResId(RID_SVXSTR_HYPDLG_MACROACT1),
@@ -355,11 +355,11 @@ IMPL_LINK_NOARG(SvxHyperlinkTabPageBase, 
ClickScriptHdl_Impl, Button*, void)
 GetParent()->EnableInput();
 // execute dlg
 DisableClose( true );
-short nRet = aDlg->Execute();
+short nRet = aDlg.run();
 DisableClose( false );
 if ( RET_OK == nRet )
 {
-const SfxItemSet* pOutSet = aDlg->GetOutputItemSet();
+const SfxItemSet* pOutSet = aDlg.GetOutputItemSet();
 const SfxPoolItem* pItem;
 if( SfxItemState::SET == pOutSet->GetItemState( 
SID_ATTR_MACROITEM, false,  ))
 {
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index ff95f66b2574..f2f09863a5c4 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1318,12 +1318,11 @@ VclPtr 
AbstractDialogFactory_Impl::CreateCharMapDialog(weld::
 return 
VclPtr::Create(o3tl::make_unique(pParent,
 , bInsert));
 }
 
-VclPtr AbstractDialogFactory_Impl::CreateEventConfigDialog( 
vcl::Window* pParent,
-const 
SfxItemSet& rAttr,
-const 
Reference< XFrame >& _rxDocumentFrame)
+VclPtr 
AbstractDialogFactory_Impl::CreateEventConfigDialog(weld::Window* pParent,
+  
const SfxItemSet& rAttr,
+  
const Reference< XFrame >& _rxDocumentFrame)
 {
-SfxModalDialog* pDlg = VclPtr::Create(pParent, 
_rxDocumentFrame, rAttr);
-return VclPtr::Create(pDlg);
+return 
VclPtr::Create(o3tl::make_unique(pParent,
 _rxDocumentFrame, rAttr));
 }
 
 VclPtr 
AbstractDialogFactory_Impl::CreateSfxDialog(vcl::Window* pParent,
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index a662aa09ee07..0b1436f3c4d7 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -677,10 +677,9 @@ public:
 virtual VclPtrCreateCharMapDialog(weld::Window* 
pParent,
  const SfxItemSet& 
rAttr,
  bool bInsert) 
override;
-virtual VclPtrCreateEventConfigDialog( vcl::Window* 
pParent,
- const SfxItemSet& 
rAttr,
- const 
css::uno::Reference< css::frame::XFrame >& _rxFrame
- ) override;
+virtual VclPtrCreateEventConfigDialog(weld::Window* 
pParent,
+ const 
SfxItemSet& rAttr,
+ 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source cui/uiconfig

2018-11-25 Thread Libreoffice Gerrit user
 cui/source/customize/cfgutil.cxx   |4 
 cui/source/customize/macropg.cxx   |2 
 cui/uiconfig/ui/eventassignpage.ui |  326 +++--
 3 files changed, 172 insertions(+), 160 deletions(-)

New commits:
commit 11353846b72b8b43d7b8a955a74e7dd0ec0f448a
Author: Caolán McNamara 
AuthorDate: Sun Nov 25 14:35:15 2018 +
Commit: Caolán McNamara 
CommitDate: Sun Nov 25 22:33:47 2018 +0100

pretty up assign events dialog

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

diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 16e2f993ef74..9505873dc68c 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -369,7 +369,7 @@ 
CuiConfigFunctionListBox::CuiConfigFunctionListBox(std::unique_ptrmake_sorted();
-m_xTreeView->set_size_request(m_xTreeView->get_approximate_digit_width() * 
20, m_xTreeView->get_height_rows(9));
+m_xTreeView->set_size_request(m_xTreeView->get_approximate_digit_width() * 
35, m_xTreeView->get_height_rows(9));
 }
 
 CuiConfigFunctionListBox::~CuiConfigFunctionListBox()
@@ -1272,7 +1272,7 @@ 
CuiConfigGroupListBox::CuiConfigGroupListBox(std::unique_ptr xTr
 {
 m_xTreeView->connect_row_activated(LINK(this, CuiConfigGroupListBox, 
OpenCurrentHdl));
 m_xTreeView->connect_expanding(LINK(this, CuiConfigGroupListBox, 
ExpandingHdl));
-m_xTreeView->set_size_request(m_xTreeView->get_approximate_digit_width() * 
20, m_xTreeView->get_height_rows(9));
+m_xTreeView->set_size_request(m_xTreeView->get_approximate_digit_width() * 
35, m_xTreeView->get_height_rows(9));
 }
 
 IMPL_LINK_NOARG(CuiConfigGroupListBox, OpenCurrentHdl, weld::TreeView&, void)
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 3786f11c0692..d39bfe9e7b73 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -199,7 +199,7 @@ 
CuiMacroEventListBox::CuiMacroEventListBox(std::unique_ptr xTree
 : m_xTreeView(std::move(xTreeView))
 {
 m_xTreeView->set_help_id(HID_MACRO_HEADERTABLISTBOX);
-m_xTreeView->set_size_request(m_xTreeView->get_approximate_digit_width() * 
40, m_xTreeView->get_height_rows(9));
+m_xTreeView->set_size_request(m_xTreeView->get_approximate_digit_width() * 
70, m_xTreeView->get_height_rows(9));
 }
 
 CuiMacroEventListBox::~CuiMacroEventListBox()
diff --git a/cui/uiconfig/ui/eventassignpage.ui 
b/cui/uiconfig/ui/eventassignpage.ui
index 1dc25df90b5d..d8d2034261db 100644
--- a/cui/uiconfig/ui/eventassignpage.ui
+++ b/cui/uiconfig/ui/eventassignpage.ui
@@ -41,161 +41,6 @@
 12
 True
 
-  
-True
-False
-True
-True
-0
-none
-
-  
-True
-False
-True
-True
-6
-12
-
-  
-True
-True
-True
-True
-in
-
-  
-True
-True
-True
-True
-True
-liststore2
-False
-0
-False
-
-  
-
-
-  
-
-  
-  
-0
-  
-
-
-  
-  
-1
-  
-
-  
-
-  
-
-  
-
-  
-
-
-  
-True
-False
-Existing Macros
-False
-
-  
-
-  
-
-  
-  
-1
-1
-  
-
-
-  
-True
-False
-True
-True
-0
-none
-
-  
-True
-False
-True
-True
-6
-12
-
-  
-True
-True
-True
-True
-in
-
-  
--1
-True
-True
-True
-True
-True
-liststore1
-False
-1
-True
-True
-
-  
-
-
-

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source cui/uiconfig include/sfx2 include/vcl sfx2/source vcl/source vcl/unx

2018-11-24 Thread Libreoffice Gerrit user
 cui/source/customize/cfgutil.cxx |  779 ++-
 cui/source/customize/macropg.cxx |   11 
 cui/source/inc/cfgutil.hxx   |   93 
 cui/source/inc/headertablistbox.hxx  |   16 
 cui/source/inc/macroass.hxx  |   14 
 cui/source/tabpages/macroass.cxx |  272 +---
 cui/uiconfig/ui/eventassignpage.ui   |  191 +---
 include/sfx2/sfxhelp.hxx |3 
 include/vcl/help.hxx |3 
 include/vcl/weld.hxx |3 
 sfx2/source/appl/sfxhelp.cxx |   43 +
 sfx2/source/dialog/filedlghelper.cxx |2 
 vcl/source/app/help.cxx  |5 
 vcl/source/app/salvtables.cxx|   26 +
 vcl/source/treelist/treelistbox.cxx  |4 
 vcl/source/window/builder.cxx|2 
 vcl/source/window/menu.cxx   |4 
 vcl/unx/gtk/salprn-gtk.cxx   |2 
 vcl/unx/gtk3/gtk3gtkinst.cxx |   31 +
 19 files changed, 1261 insertions(+), 243 deletions(-)

New commits:
commit 4be36ad16cf8c43c343b8ff3bfc3f58556b00f7f
Author: Caolán McNamara 
AuthorDate: Fri Nov 23 09:14:32 2018 +
Commit: Caolán McNamara 
CommitDate: Sat Nov 24 15:41:30 2018 +0100

weld SfxMacroTabPage

Change-Id: I167dd233c8af64e31f0e266bac5cf5b9c4658ca6
Reviewed-on: https://gerrit.libreoffice.org/63893
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit f27bfc190d4105b9d057980a5e6f0eac07f88aba)
Reviewed-on: https://gerrit.libreoffice.org/63915

diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 828205e31f93..d0900c2ccbab 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -330,7 +330,7 @@ OUString SfxConfigFunctionListBox::GetHelpText( bool 
bConsiderParent )
 if (bConsiderParent)
 return Application::GetHelp()->GetHelpText( 
pData->sCommand, this );
 else
-return Application::GetHelp()->GetHelpText( 
pData->sCommand, nullptr );
+return Application::GetHelp()->GetHelpText( 
pData->sCommand, static_cast(nullptr) );
 }
 else if ( pData->nKind == SfxCfgKind::FUNCTION_SCRIPT )
 {
@@ -365,6 +365,108 @@ OUString SfxConfigFunctionListBox::GetCurLabel()
 return pData->sCommand;
 }
 
+CuiConfigFunctionListBox::CuiConfigFunctionListBox(std::unique_ptr
 xTreeView)
+: m_xTreeView(std::move(xTreeView))
+{
+m_xTreeView->make_sorted();
+}
+
+CuiConfigFunctionListBox::~CuiConfigFunctionListBox()
+{
+ClearAll();
+}
+
+void CuiConfigFunctionListBox::ClearAll()
+/*  Description
+Deletes all entries in the FunctionListBox, all UserData and all
+possibly existing MacroInfo.
+*/
+{
+sal_uInt16 nCount = aArr.size();
+for ( sal_uInt16 i=0; inKind == SfxCfgKind::FUNCTION_SCRIPT )
+{
+OUString* pScriptURI = static_cast(pData->pObject);
+delete pScriptURI;
+}
+
+if ( pData->nKind == SfxCfgKind::GROUP_SCRIPTCONTAINER )
+{
+XInterface* xi = static_cast(pData->pObject);
+if (xi != nullptr)
+{
+xi->release();
+}
+}
+}
+
+aArr.clear();
+m_xTreeView->clear();
+}
+
+OUString CuiConfigFunctionListBox::GetSelectedScriptURI()
+{
+int nSelected = m_xTreeView->get_selected_index();
+if (nSelected != -1)
+{
+SfxGroupInfo_Impl *pData = 
reinterpret_cast(m_xTreeView->get_id(nSelected).toInt64());
+if (pData && pData->nKind == SfxCfgKind::FUNCTION_SCRIPT)
+return *static_cast(pData->pObject);
+}
+return OUString();
+}
+
+OUString CuiConfigFunctionListBox::GetHelpText( bool bConsiderParent )
+{
+int nSelected = m_xTreeView->get_selected_index();
+if (nSelected != -1)
+{
+SfxGroupInfo_Impl *pData = 
reinterpret_cast(m_xTreeView->get_id(nSelected).toInt64());
+if ( pData )
+{
+if ( pData->nKind == SfxCfgKind::FUNCTION_SLOT )
+{
+if (bConsiderParent)
+return 
Application::GetHelp()->GetHelpText(pData->sCommand, m_xTreeView.get());
+else
+return 
Application::GetHelp()->GetHelpText(pData->sCommand, 
static_cast(nullptr));
+}
+else if ( pData->nKind == SfxCfgKind::FUNCTION_SCRIPT )
+{
+return pData->sHelpText;
+}
+}
+}
+return OUString();
+}
+
+OUString CuiConfigFunctionListBox::GetCurCommand()
+{
+int nSelected = m_xTreeView->get_selected_index();
+if (nSelected == -1)
+return OUString();
+SfxGroupInfo_Impl *pData = 
reinterpret_cast(m_xTreeView->get_id(nSelected).toInt64());
+if (!pData)
+return OUString();
+return pData->sCommand;
+}
+
+OUString CuiConfigFunctionListBox::GetCurLabel()
+{
+int nSelected = 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source

2018-11-20 Thread Libreoffice Gerrit user
 cui/source/tabpages/numfmt.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 79422c4378d3d504f191f3959edbc798ef1e332a
Author: Caolán McNamara 
AuthorDate: Tue Nov 20 11:53:03 2018 +
Commit: Caolán McNamara 
CommitDate: Tue Nov 20 18:29:32 2018 +0100

tdf#121538 index 1 never existed

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

diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index a13403059b88..69b25330c98e 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1612,7 +1612,9 @@ IMPL_LINK_NOARG(SvxNumberFormatTabPage, 
LostFocusHdl_Impl, weld::Widget&, void)
 {
 sal_uInt16 nSelPos = m_xLbFormat->get_selected_index();
 pNumFmtShell->SetComment4Entry(nSelPos, m_xEdComment->get_text());
-m_xEdComment->set_text(m_xLbCategory->get_text(1));// String for 
user defined
+// String for user defined, if present
+OUString sEntry = m_xLbCategory->n_children() > 1 ? 
m_xLbCategory->get_text(1) : OUString();
+m_xEdComment->set_text(sEntry);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - cui/source cui/uiconfig

2018-11-19 Thread Libreoffice Gerrit user
 cui/source/options/optaboutconfig.cxx |4 ++--
 cui/source/options/optaboutconfig.hxx |2 +-
 cui/source/options/optjava.cxx|2 +-
 cui/uiconfig/ui/aboutconfigdialog.ui  |1 +
 4 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 3853b2dc60d6fa39b66cb7d2e9d14fa37f4f7be7
Author: Caolán McNamara 
AuthorDate: Mon Nov 19 11:12:17 2018 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 19 14:09:13 2018 +0100

Resolves: tdf#121487 ::Execute called on "modeless" dialog

that isn't really modeless

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

diff --git a/cui/source/options/optaboutconfig.cxx 
b/cui/source/options/optaboutconfig.cxx
index 0e26e06effeb..a9d884cdb411 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -142,7 +142,7 @@ Size CuiCustomMultilineEdit::GetOptimalSize() const
 }
 
 CuiAboutConfigTabPage::CuiAboutConfigTabPage( vcl::Window* pParent/*, const 
SfxItemSet& rItemSet*/ ) :
-ModelessDialog( pParent, "AboutConfig", "cui/ui/aboutconfigdialog.ui"),
+ModalDialog( pParent, "AboutConfig", "cui/ui/aboutconfigdialog.ui"),
 m_pPrefCtrl( get("preferences") ),
 m_pResetBtn( get("reset") ),
 m_pEditBtn( get("edit") ),
@@ -195,7 +195,7 @@ void CuiAboutConfigTabPage::dispose()
 m_pEditBtn.clear();
 m_pSearchBtn.clear();
 m_pSearchEdit.clear();
-ModelessDialog::dispose();
+ModalDialog::dispose();
 }
 
 void CuiAboutConfigTabPage::InsertEntry(const OUString& rPropertyPath, const 
OUString& rProp, const OUString& rStatus,
diff --git a/cui/source/options/optaboutconfig.hxx 
b/cui/source/options/optaboutconfig.hxx
index dcb6b6c0971a..7d10212ee11b 100644
--- a/cui/source/options/optaboutconfig.hxx
+++ b/cui/source/options/optaboutconfig.hxx
@@ -39,7 +39,7 @@ public:
 virtual Size GetOptimalSize() const override;
 };
 
-class CuiAboutConfigTabPage : public ModelessDialog
+class CuiAboutConfigTabPage : public ModalDialog
 {
 private:
 VclPtr m_pPrefCtrl;
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 81f93cb0136b..5f44c6d424f9 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -374,7 +374,7 @@ IMPL_LINK( SvxJavaOptionsPage, DialogClosedHdl, 
DialogClosedEvent*, pEvt, void )
 
 IMPL_LINK_NOARG( SvxJavaOptionsPage, ExpertConfigHdl_Impl, Button*, void )
 {
-ScopedVclPtrInstance< CuiAboutConfigTabPage > pExpertConfigDlg(this);
+ScopedVclPtrInstance< CuiAboutConfigTabPage > 
pExpertConfigDlg(GetTabDialog());
 pExpertConfigDlg->Reset();//initialize and reset function
 
 if( RET_OK == pExpertConfigDlg->Execute() )
diff --git a/cui/uiconfig/ui/aboutconfigdialog.ui 
b/cui/uiconfig/ui/aboutconfigdialog.ui
index 34bfb4c8ae91..09e2e38bb242 100644
--- a/cui/uiconfig/ui/aboutconfigdialog.ui
+++ b/cui/uiconfig/ui/aboutconfigdialog.ui
@@ -7,6 +7,7 @@
 False
 6
 Expert Configuration
+True
 normal
 True
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits