[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - 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 |   53 ++-
 3 files changed, 51 insertions(+), 8 deletions(-)

New commits:
commit 336feec6b0bef15bd3a234c63d63ad8d869a3374
Author: Caolán McNamara 
AuthorDate: Mon Jan 28 13:12:00 2019 +
Commit: Caolán McNamara 
CommitDate: Mon Feb 4 22:37:06 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/67136
Tested-by: Jenkins
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 da7ee7047391..d6fc20577fa7 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -136,7 +136,7 @@ private:
 
 voidInit_Impl();
 DECL_LINK(LayoutHdl_Impl, weld::ComboBoxText&, void);
-DECL_LINK(PaperBinHdl_Impl, weld::ComboBoxText&, 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 054bc8fb16ed..a3e7a2ebb80e 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -314,7 +314,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));
@@ -808,7 +808,7 @@ IMPL_LINK_NOARG(SvxPageDescPage, LayoutHdl_Impl, 
weld::ComboBoxText&, void)
 UpdateExample_Impl( true );
 }
 
-IMPL_LINK_NOARG(SvxPageDescPage, PaperBinHdl_Impl, weld::ComboBoxText&, 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 bd221af10cdb..384f1d411e4d 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1183,11 +1183,6 @@ class GtkInstanceWidget : public virtual weld::Widget
 {
 protected:
 GtkWidget* m_pWidget;
-private:
-bool m_bTakeOwnership;
-gulong m_nFocusInSignalId;
-gulong m_nFocusOutSignalId;
-gulong m_nKeyPressSignalId;
 
 static void signalFocusIn(GtkWidget*, GdkEvent*, gpointer widget)
 {
@@ -1203,6 +1198,12 @@ private:
 pThis->signal_focus_out();
 }
 
+private:
+bool m_bTakeOwnership;
+gulong m_nFocusInSignalId;
+gulong m_nFocusOutSignalId;
+gulong m_nKeyPressSignalId;
+
 static gboolean signalKeyPress(GtkWidget*, GdkEventKey* pEvent, gpointer)
 {
 // #i1820# use locale specific decimal separator
@@ -4486,8 +4487,11 @@ class GtkInstanceComboBoxText : public 
GtkInstanceContainer, public virtual weld
 {
 private:
 GtkComboBoxText* m_pComboBoxText;
+GtkWidget* m_pToggleButton;
 std::unique_ptr m_xSorter;
 gboolean m_bPopupActive;
+gulong m_nToggleFocusInSignalId;
+gulong m_nToggleFocusOutSignalId;
 gulong m_nChangedSignalId;
 gulong m_nPopupShownSignalId;
 gulong m_nEntryActivateSignalId;
@@ -4594,11 +4598,25 @@ private:
 g_object_unref(pCompletion);
 }
 
+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:
 GtkInstanceComboBoxText(GtkComboBoxText* pComboBoxText, bool 
bTakeOwnership)
 : GtkInstanceContainer(GTK_CONTAINER(pComboBoxText), bTakeOwnership)
 , m_pComboBoxText(pComboBoxText)
+, m_pToggleButton(nullptr)
 , m_bPopupActive(false)
+, m_nToggleFocusInSignalId(0)
+, m_nToggleFocusOutSignalId(0)
 , m_nChangedSignalId(g_signal_connect(m_pComboBoxText, "changed", 
G_CALLBACK(signalChanged), this))
 , m_nPopupShownSignalId(g_signal_connect(m_pComboBoxText, 
"notify::popup-shown", G_CALLBACK(signalPopupShown), this))
 {
@@ 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - 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 a9642a2549bf429eb70aed724fbd98a147c22a42
Author: Xisco Fauli 
AuthorDate: Fri Jan 25 12:11:04 2019 +0100
Commit: Xisco Faulí 
CommitDate: Mon Jan 28 14:10:20 2019 +0100

tdf#122951: Fix insertion of graphics as bullets

Regression from 81260c448911069ce8cb051d3a973ec52b9b43a3

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

diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 3c31e11d4a4b..8ff1e9384512 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -1998,12 +1998,14 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, 
PopupActivateHdl_Impl, MenuButton *, void)
 GalleryExplorer::BeginLocking(GALLERY_THEME_BULLETS);
 
 Graphic aGraphic;
+OUString sGrfName;
 size_t i = 0;
 for (auto & grfName : aGrfNames)
 {
-INetURLObject aObj(grfName);
+sGrfName = grfName;
+INetURLObject aObj(sGrfName);
 if(aObj.GetProtocol() == INetProtocol::File)
-grfName = aObj.PathToFileName();
+sGrfName = aObj.PathToFileName();
 
 if(GalleryExplorer::GetGraphicObj( GALLERY_THEME_BULLETS, i, 
))
 {
@@ -2020,13 +2022,13 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, 
PopupActivateHdl_Impl, MenuButton *, void)
 }
 Image aImage(aBitmap);
 
-pPopup->InsertItem(MN_GALLERY_ENTRY + i, grfName, aImage );
+pPopup->InsertItem(MN_GALLERY_ENTRY + i, sGrfName, aImage 
);
 }
 else
 {
 Image aImage;
 pPopup->InsertItem(
-MN_GALLERY_ENTRY + i, grfName, aImage );
+MN_GALLERY_ENTRY + i, sGrfName, aImage );
 }
 ++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-1' - cui/source

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

New commits:
commit 850d31f97e1f47b646a9e296183b142dbfe0ba9b
Author: Caolán McNamara 
AuthorDate: Wed Jan 16 10:55:07 2019 +
Commit: Christian Lohmaier 
CommitDate: Wed Jan 16 20:06:28 2019 +0100

Resolves: tdf#122458 not enough values saved

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

diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 5f3af968def6..70c353abc54a 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -590,9 +590,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-1' - 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 390ad702841fd247061377c044df446a7b2c587d
Author: Caolán McNamara 
AuthorDate: Mon Jan 14 09:48:43 2019 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Jan 16 02:08:37 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 
(cherry picked from commit aa15463a2f303ab75679eefa4d8241f2b700684e)
Reviewed-on: https://gerrit.libreoffice.org/66389
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 5b6538eb65dc..3d0e7ee81be7 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -521,7 +521,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-1' - 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 808cc4d5fd87e6e6719a4a16f815e5897608bd2d
Author: Muhammet Kara 
AuthorDate: Wed Jan 2 01:24:20 2019 +0300
Commit: Muhammet Kara 
CommitDate: Wed Jan 2 07:36:29 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/65799

diff --git a/cui/source/customize/SvxMenuConfigPage.cxx 
b/cui/source/customize/SvxMenuConfigPage.cxx
index 9b69c64a1374..a890fef033ab 100644
--- a/cui/source/customize/SvxMenuConfigPage.cxx
+++ b/cui/source/customize/SvxMenuConfigPage.cxx
@@ -500,6 +500,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 bdca809fd326..f3727b4c3234 100644
--- a/cui/source/customize/SvxToolbarConfigPage.cxx
+++ b/cui/source/customize/SvxToolbarConfigPage.cxx
@@ -515,9 +515,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();
@@ -856,10 +861,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() )
@@ -878,8 +891,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 8d64d3ce2e3c..df347cc811e2 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1600,8 +1600,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;
 }
@@ -1624,8 +1625,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())
@@ -1649,8 +1648,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-1' - cui/source

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

New commits:
commit cb32be59baca89dc0d21a5f16c8ecd46b143c436
Author: Julien Nabet 
AuthorDate: Sun Dec 16 14:21:37 2018 +0100
Commit: Markus Mohrhard 
CommitDate: Mon Dec 31 21:49:30 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/65222
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard 

diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 3f8c0cb794da..fb401745c52e 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -1012,9 +1012,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-1' - cui/source

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

New commits:
commit 8b141eb612a89a112b9bb11baeff32155e4a0150
Author: Caolán McNamara 
AuthorDate: Tue Nov 27 21:21:45 2018 +
Commit: Xisco Faulí 
CommitDate: Wed Nov 28 12:43:35 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/64132
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index bfc5017e3705..e9f067b38a77 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -1126,6 +1126,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-1' - cui/source

2018-11-15 Thread Libreoffice Gerrit user
 cui/source/inc/swpossizetabpage.hxx  |1 +
 cui/source/tabpages/swpossizetabpage.cxx |   10 ++
 2 files changed, 11 insertions(+)

New commits:
commit 5ea33b0f99c3586e6be2fe39cc983ad72619a68f
Author: Caolán McNamara 
AuthorDate: Fri Oct 5 21:12:44 2018 +0100
Commit: Xisco Faulí 
CommitDate: Fri Nov 16 00:49:00 2018 +0100

Resolves: tdf#120334 crash on ESC in position and size

Change-Id: I50421f01ca368ec4d074db4b0add2f08b7b3fc0d
Reviewed-on: https://gerrit.libreoffice.org/61448
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 692c26408ca3a5d9cc34a07e3a34ac0b2d87d920)
Reviewed-on: https://gerrit.libreoffice.org/63435
Reviewed-by: Xisco Faulí 

diff --git a/cui/source/inc/swpossizetabpage.hxx 
b/cui/source/inc/swpossizetabpage.hxx
index d9e326dee456..7702ff5045d7 100644
--- a/cui/source/inc/swpossizetabpage.hxx
+++ b/cui/source/inc/swpossizetabpage.hxx
@@ -113,6 +113,7 @@ class SvxSwPosSizeTabPage : public SfxTabPage
 
 public:
 SvxSwPosSizeTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs);
+virtual void dispose() override;
 virtual ~SvxSwPosSizeTabPage() override;
 
 static VclPtr Create( TabPageParent, const SfxItemSet* );
diff --git a/cui/source/tabpages/swpossizetabpage.cxx 
b/cui/source/tabpages/swpossizetabpage.cxx
index 7c9282ab7614..4a0e455e221c 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -595,6 +595,16 @@ SvxSwPosSizeTabPage::SvxSwPosSizeTabPage(TabPageParent 
pParent, const SfxItemSet
 
 SvxSwPosSizeTabPage::~SvxSwPosSizeTabPage()
 {
+disposeOnce();
+}
+
+void SvxSwPosSizeTabPage::dispose()
+{
+m_xWidthMF.reset();
+m_xHeightMF.reset();
+m_xHoriByMF.reset();
+m_xVertByMF.reset();
+SfxTabPage::dispose();
 }
 
 namespace
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-06 Thread Libreoffice Gerrit user
 cui/source/dialogs/passwdomdlg.cxx |2 +-
 cui/source/dialogs/postdlg.cxx |2 +-
 cui/source/dialogs/zoom.cxx|2 +-
 cui/source/inc/passwdomdlg.hxx |5 ++---
 cui/source/inc/postdlg.hxx |4 ++--
 cui/source/inc/zoom.hxx|2 +-
 include/sfx2/new.hxx   |3 ++-
 include/svx/passwd.hxx |4 ++--
 sd/source/ui/dlg/brkdlg.cxx|2 +-
 sd/source/ui/inc/BreakDlg.hxx  |4 ++--
 sfx2/source/dialog/versdlg.cxx |2 +-
 sfx2/source/doc/new.cxx|2 +-
 sfx2/source/inc/versdlg.hxx|2 +-
 svx/source/dialog/passwd.cxx   |2 +-
 sw/source/ui/config/mailconfigpage.cxx |4 ++--
 sw/source/ui/dbui/mmresultdialogs.cxx  |8 
 sw/source/ui/dialog/ascfldlg.cxx   |2 +-
 sw/source/ui/inc/mmresultdialogs.hxx   |4 ++--
 sw/source/ui/misc/linenum.cxx  |2 +-
 sw/source/ui/misc/titlepage.cxx|2 +-
 sw/source/ui/table/convert.cxx |2 +-
 sw/source/ui/table/instable.cxx|2 +-
 sw/source/ui/table/tautofmt.cxx|6 +++---
 sw/source/uibase/inc/ascfldlg.hxx  |2 +-
 sw/source/uibase/inc/convert.hxx   |4 ++--
 sw/source/uibase/inc/instable.hxx  |2 +-
 sw/source/uibase/inc/linenum.hxx   |4 ++--
 sw/source/uibase/inc/tautofmt.hxx  |2 +-
 sw/source/uibase/inc/titlepage.hxx |4 ++--
 29 files changed, 44 insertions(+), 44 deletions(-)

New commits:
commit 20826019d8f77129853712c5fdf5134aff058171
Author: Caolán McNamara 
AuthorDate: Wed Oct 3 15:13:36 2018 +0100
Commit: Bartosz Kosiorek 
CommitDate: Tue Nov 6 19:24:26 2018 +0100

Related: tdf#120277 inherit from SfxDialogController

where the dialog originally inherited from SfxModalDialog.

Change-Id: Ibe0006de93b0a9f05fb3b6181baf3ba1b4cf04c8
Reviewed-on: https://gerrit.libreoffice.org/61313
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
Reviewed-on: https://gerrit.libreoffice.org/61326
Reviewed-by: Bartosz Kosiorek 

diff --git a/cui/source/dialogs/passwdomdlg.cxx 
b/cui/source/dialogs/passwdomdlg.cxx
index a5efbd0d6428..1d33a32e1321 100644
--- a/cui/source/dialogs/passwdomdlg.cxx
+++ b/cui/source/dialogs/passwdomdlg.cxx
@@ -70,7 +70,7 @@ IMPL_LINK_NOARG(PasswordToOpenModifyDialog, OkBtnClickHdl, 
weld::Button&, void)
 }
 
 PasswordToOpenModifyDialog::PasswordToOpenModifyDialog(weld::Window * pParent, 
sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify)
-: GenericDialogController(pParent, "cui/ui/password.ui", "PasswordDialog")
+: SfxDialogController(pParent, "cui/ui/password.ui", "PasswordDialog")
 , m_xPasswdToOpenED(m_xBuilder->weld_entry("newpassEntry"))
 , m_xReenterPasswdToOpenED(m_xBuilder->weld_entry("confirmpassEntry"))
 , m_xOptionsExpander(m_xBuilder->weld_expander("expander"))
diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx
index dbf6436e14d0..e9408131c0c1 100644
--- a/cui/source/dialogs/postdlg.cxx
+++ b/cui/source/dialogs/postdlg.cxx
@@ -35,7 +35,7 @@
 
 SvxPostItDialog::SvxPostItDialog(weld::Window* pParent, const SfxItemSet& 
rCoreSet,
 bool bPrevNext)
-: GenericDialogController(pParent, "cui/ui/comment.ui", "CommentDialog")
+: SfxDialogController(pParent, "cui/ui/comment.ui", "CommentDialog")
 , m_rSet(rCoreSet)
 , m_xLastEditFT(m_xBuilder->weld_label("lastedit"))
 , m_xAltTitle(m_xBuilder->weld_label("alttitle"))
diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx
index 9ff5d03f9ace..39e3ee448830 100644
--- a/cui/source/dialogs/zoom.cxx
+++ b/cui/source/dialogs/zoom.cxx
@@ -124,7 +124,7 @@ const SfxItemSet* SvxZoomDialog::GetOutputItemSet() const
 }
 
 SvxZoomDialog::SvxZoomDialog(weld::Window* pParent, const SfxItemSet& rCoreSet)
-: GenericDialogController(pParent, "cui/ui/zoomdialog.ui", "ZoomDialog")
+: SfxDialogController(pParent, "cui/ui/zoomdialog.ui", "ZoomDialog")
 , m_rSet(rCoreSet)
 , m_bModified(false)
 , m_xOptimalBtn(m_xBuilder->weld_radio_button("optimal"))
diff --git a/cui/source/inc/passwdomdlg.hxx b/cui/source/inc/passwdomdlg.hxx
index 2d56f3b480ce..618ee1cd232a 100644
--- a/cui/source/inc/passwdomdlg.hxx
+++ b/cui/source/inc/passwdomdlg.hxx
@@ -19,11 +19,10 @@
 #ifndef INCLUDED_CUI_SOURCE_INC_PASSWDOMDLG_HXX
 #define INCLUDED_CUI_SOURCE_INC_PASSWDOMDLG_HXX
 
-#include 
+#include 
 #include 
 
-
-class PasswordToOpenModifyDialog : public weld::GenericDialogController
+class PasswordToOpenModifyDialog : public SfxDialogController
 {
 std::unique_ptr m_xPasswdToOpenED;
 std::unique_ptr m_xReenterPasswdToOpenED;
diff --git a/cui/source/inc/postdlg.hxx b/cui/source/inc/postdlg.hxx
index 45e5c9ea62da..13ecf359c096 100644
--- a/cui/source/inc/postdlg.hxx
+++ b/cui/source/inc/postdlg.hxx
@@ -19,7 +19,7 @@
 #ifndef INCLUDED_CUI_SOURCE_INC_POSTDLG_HXX
 

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

2018-11-01 Thread Libreoffice Gerrit user
 cui/source/tabpages/tparea.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 925d71995028dd0fa7fe0e120a8cf6a26960641b
Author: Tamás Zolnai 
AuthorDate: Thu Nov 1 12:59:11 2018 +0100
Commit: Markus Mohrhard 
CommitDate: Fri Nov 2 06:06:11 2018 +0100

tdf#121083: EDITOR UI Hatch background color not read back from editor

Reviewed-on: https://gerrit.libreoffice.org/62735
Reviewed-by: Tamás Zolnai 
Tested-by: Tamás Zolnai 
(cherry picked from commit 56d799764d394c906936f7a042dfd3e4219d7063)

Change-Id: Ic64fda8184a4cac244fe992dd72db9d67d35870c
Reviewed-on: https://gerrit.libreoffice.org/62763
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard 

diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index dbceed157716..a922ed1b0b78 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -201,6 +201,8 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
 case drawing::FillStyle_HATCH:
 {
 m_rXFSet.Put( rSet.Get(XATTR_FILLHATCH) );
+m_rXFSet.Put( rSet.Get(XATTR_FILLBACKGROUND) );
+m_rXFSet.Put( rSet.Get(XATTR_FILLCOLOR) );
 SelectFillTypeHdl_Impl( m_pBtnHatch );
 break;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-31 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuicharmap.cxx |2 -
 cui/source/inc/cuicharmap.hxx |2 -
 include/sfx2/basedlgs.hxx |   12 +++-
 include/vcl/dialog.hxx|2 +
 include/vcl/weld.hxx  |8 +
 sfx2/source/dialog/basedlgs.cxx   |   55 +-
 vcl/source/app/salvtables.cxx |5 +++
 vcl/source/window/dialog.cxx  |   32 --
 vcl/unx/gtk3/gtk3gtkinst.cxx  |5 +++
 9 files changed, 88 insertions(+), 35 deletions(-)

New commits:
commit 12ed60bc8cc391811b9447300b0d06bba8e18975
Author: Caolán McNamara 
AuthorDate: Wed Oct 3 14:48:35 2018 +0100
Commit: Miklos Vajna 
CommitDate: Wed Oct 31 10:27:12 2018 +0100

Resolves: tdf#120277 special character dialog not appearing in Online

the magic smoke connecting the dialog to the viewshell was in
SfxModalDialog, so not inheriting from that drops the connection

add a SfxDialogController to enable setting up the connection

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

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index 7837e6fa6f5d..2d3caa50944b 100755
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -53,7 +53,7 @@
 using namespace css;
 
 SvxCharacterMap::SvxCharacterMap(weld::Window* pParent, const SfxItemSet* 
pSet, bool bInsert)
-: GenericDialogController(pParent, "cui/ui/specialcharacters.ui", 
"SpecialCharactersDialog")
+: SfxDialogController(pParent, "cui/ui/specialcharacters.ui", 
"SpecialCharactersDialog")
 , m_xVirDev(VclPtr::Create())
 , pSubsetMap( nullptr )
 , isSearchMode(true)
diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx
index 70a98593b5e2..02dca3683843 100644
--- a/cui/source/inc/cuicharmap.hxx
+++ b/cui/source/inc/cuicharmap.hxx
@@ -68,7 +68,7 @@ public:
 
 /** The main purpose of this dialog is to enable the use of characters
 that are not easily accessible from the keyboard. */
-class SvxCharacterMap : public weld::GenericDialogController
+class SvxCharacterMap : public SfxDialogController
 {
 private:
 
diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx
index 58657fc58e8b..14bdad25b075 100644
--- a/include/sfx2/basedlgs.hxx
+++ b/include/sfx2/basedlgs.hxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class TabPage;
 class SfxTabPage;
@@ -55,6 +56,7 @@ private:
 
 SAL_DLLPRIVATE void SetDialogData_Impl();
 SAL_DLLPRIVATE void GetDialogData_Impl();
+DECL_DLLPRIVATE_LINK(InstallLOKNotifierHdl, void*, 
vcl::ILibreOfficeKitNotifier*);
 
 protected:
 SfxModalDialog(vcl::Window *pParent, const OUString& rID, const OUString& 
rUIXMLDescription);
@@ -86,6 +88,7 @@ class SFX2_DLLPUBLIC SfxModelessDialog: public ModelessDialog
 
 void Init(SfxBindings *pBindinx, SfxChildWindow *pCW);
 
+DECL_DLLPRIVATE_LINK(InstallLOKNotifierHdl, void*, 
vcl::ILibreOfficeKitNotifier*);
 protected:
 SfxModelessDialog( SfxBindings*, SfxChildWindow*,
 vcl::Window*, const OUString& rID, const OUString& rUIXMLDescription );
@@ -104,7 +107,6 @@ public:
 { return *pBindings; }
 
 DECL_LINK(TimerHdl, Timer *, void);
-
 };
 
 // class SfxFloatingWindow --
@@ -189,6 +191,14 @@ private:
 std::unique_ptr   pImpl;
 };
 
+class SFX2_DLLPUBLIC SfxDialogController : public weld::GenericDialogController
+{
+private:
+DECL_DLLPRIVATE_LINK(InstallLOKNotifierHdl, void*, 
vcl::ILibreOfficeKitNotifier*);
+public:
+SfxDialogController(weld::Widget* pParent, const OUString& rUIFile, const 
OString& rDialogId);
+};
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 36f88b8feb45..8c952c9b668a 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -176,6 +176,8 @@ public:
 voidGrabFocusToFirstControl();
 virtual voidResize() override;
 
+voidSetInstallLOKNotifierHdl(const Link& rLink);
+
 voidadd_button(PushButton* pButton, int nResponse, bool 
bTransferOwnership);
 voidset_default_response(int nResponse);
 vcl::Window*get_widget_for_response(int nResponse);
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 17f2b5119049..98f2b7394a7d 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -23,6 +23,11 @@
 typedef css::uno::Reference a11yref;
 typedef css::uno::Reference 
a11yrelationset;
 
+namespace vcl
+{
+class ILibreOfficeKitNotifier;
+}
+
 namespace weld
 {
 class Container;
@@ -225,6 +230,9 @@ public:
 virtual void set_default_response(int response) = 0;
 virtual Button* get_widget_for_response(int response) = 0;
 virtual Container* weld_content_area() = 

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

2018-10-31 Thread Libreoffice Gerrit user
 cui/source/inc/cuicharmap.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4ca51f7f34c820873fe423c132d97cabf846f59e
Author: Caolán McNamara 
AuthorDate: Wed Oct 3 14:46:29 2018 +0100
Commit: Miklos Vajna 
CommitDate: Wed Oct 31 10:26:30 2018 +0100

use ScopedVclPtr here

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

diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx
index 9e926f20484b..70a98593b5e2 100644
--- a/cui/source/inc/cuicharmap.hxx
+++ b/cui/source/inc/cuicharmap.hxx
@@ -45,7 +45,7 @@ namespace svx
 class SvxShowText : public weld::CustomWidgetController
 {
 private:
-VclPtr m_xVirDev;
+ScopedVclPtr m_xVirDev;
 OUString m_sText;
 long mnY;
 bool mbCenter;
@@ -74,7 +74,7 @@ private:
 
 voidinit();
 
-VclPtr m_xVirDev;
+ScopedVclPtr m_xVirDev;
 vcl::Font   aFont;
 const SubsetMap*pSubsetMap;
 boolisSearchMode;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-11 Thread Libreoffice Gerrit user
 cui/source/customize/cfg.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 94b6b9b17c39edf7d3e1f8220f8d77bf21bf0f40
Author: Muhammet Kara 
AuthorDate: Mon Oct 8 01:08:25 2018 +0300
Commit: Muhammet Kara 
CommitDate: Thu Oct 11 13:08:47 2018 +0200

tdf#119266: Nodes don't expand on double click in the Customize dialog

Change-Id: I8b6667dc631df2fd38a8a2d99668b4a2336801b6
Reviewed-on: https://gerrit.libreoffice.org/61504
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
(cherry picked from commit 307c29ecbcd63b787374c5c2aefabdc4353d2723)
Reviewed-on: https://gerrit.libreoffice.org/61649
Tested-by: Xisco Faulí 

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 250c2a3f0e90..8d64d3ce2e3c 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1753,8 +1753,12 @@ IMPL_LINK( SvxConfigPage, MoveHdl, Button *, pButton, 
void )
 IMPL_LINK_NOARG( SvxConfigPage, FunctionDoubleClickHdl, SvTreeListBox *, bool )
 {
 if ( m_pAddCommandButton->IsEnabled() )
+{
 m_pAddCommandButton->Click();
-return false;
+return false;
+}
+else
+return true;
 }
 
 IMPL_LINK_NOARG( SvxConfigPage, SelectFunctionHdl, SvTreeListBox *, 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-1' - cui/source

2018-10-09 Thread Libreoffice Gerrit user
 cui/source/tabpages/tptrans.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ae55c37347abf97126377914e66328a0eb0d3308
Author: Caolán McNamara 
AuthorDate: Mon Oct 8 20:25:08 2018 +0100
Commit: Christian Lohmaier 
CommitDate: Tue Oct 9 14:16:32 2018 +0200

Resolves: tdf#120370 should check gradientgrid sensitivity

rather than whether listbox first entry is not selected

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

diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx
index f75416c0c94b..0e199b672b65 100644
--- a/cui/source/tabpages/tptrans.cxx
+++ b/cui/source/tabpages/tptrans.cxx
@@ -300,7 +300,7 @@ bool SvxTransparenceTabPage::FillItemSet(SfxItemSet* rAttrs)
 }
 }
 }
-else if (m_xLbTrgrGradientType->get_active())
+else if (m_xGridGradient->get_sensitive())
 {
 // transparence gradient, fill ItemSet from values
 if (!bGradActive
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-09-18 Thread Libreoffice Gerrit user
 cui/source/tabpages/textattr.cxx |   84 +++
 1 file changed, 84 insertions(+)

New commits:
commit ca34dd89e38911f8a1fc7b6ce6afa3b39580fa21
Author: Caolán McNamara 
AuthorDate: Mon Sep 17 21:25:00 2018 +0100
Commit: Michael Stahl 
CommitDate: Tue Sep 18 11:12:21 2018 +0200

Resolves: tdf#119860 missing block of code to set text positioning

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

diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index d1ccabc9a9f9..b090e3f60822 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -214,6 +214,9 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
 SdrTextHorzAdjust eTHA = 
rAttrs->Get(SDRATTR_TEXT_HORZADJUST).GetValue();
 RectPoint eRP = RectPoint::LB;
 
+if (m_xTsbFullWidth->get_state() == TRISTATE_INDET)
+m_xTsbFullWidth->set_state(TRISTATE_FALSE);
+
 // Translate item values into local anchor position.
 switch (eTVA)
 {
@@ -368,6 +371,87 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs)
 rAttrs->Put( makeSdrTextWordWrapItem( TRISTATE_TRUE == eState ) );
 }
 
+eState = m_xTsbContour->get_state();
+if( m_xTsbContour->get_state_changed_from_saved() )
+{
+rAttrs->Put( makeSdrTextContourFrameItem( TRISTATE_TRUE == eState ) );
+}
+
+eState = m_xTsbFitToSize->get_state();
+if( m_xTsbFitToSize->get_state_changed_from_saved() )
+{
+drawing::TextFitToSizeType eFTS;
+switch( eState )
+{
+default: ; //prevent warning
+OSL_FAIL( "svx::SvxTextAttrPage::FillItemSet(), unhandled 
state!" );
+SAL_FALLTHROUGH;
+case TRISTATE_FALSE: eFTS = drawing::TextFitToSizeType_AUTOFIT; 
break;
+case TRISTATE_TRUE: eFTS = 
drawing::TextFitToSizeType_PROPORTIONAL; break;
+}
+rAttrs->Put( SdrTextFitToSizeTypeItem( eFTS ) );
+}
+
+// centered
+RectPoint eRP = m_aCtlPosition.GetActualRP();
+SdrTextVertAdjust eTVA, eOldTVA;
+SdrTextHorzAdjust eTHA, eOldTHA;
+
+switch( eRP )
+{
+default:
+case RectPoint::LT: eTVA = SDRTEXTVERTADJUST_TOP;
+eTHA = SDRTEXTHORZADJUST_LEFT; break;
+case RectPoint::LM: eTVA = SDRTEXTVERTADJUST_CENTER;
+eTHA = SDRTEXTHORZADJUST_LEFT; break;
+case RectPoint::LB: eTVA = SDRTEXTVERTADJUST_BOTTOM;
+eTHA = SDRTEXTHORZADJUST_LEFT; break;
+case RectPoint::MT: eTVA = SDRTEXTVERTADJUST_TOP;
+eTHA = SDRTEXTHORZADJUST_CENTER; break;
+case RectPoint::MM: eTVA = SDRTEXTVERTADJUST_CENTER;
+eTHA = SDRTEXTHORZADJUST_CENTER; break;
+case RectPoint::MB: eTVA = SDRTEXTVERTADJUST_BOTTOM;
+eTHA = SDRTEXTHORZADJUST_CENTER; break;
+case RectPoint::RT: eTVA = SDRTEXTVERTADJUST_TOP;
+eTHA = SDRTEXTHORZADJUST_RIGHT; break;
+case RectPoint::RM: eTVA = SDRTEXTVERTADJUST_CENTER;
+eTHA = SDRTEXTHORZADJUST_RIGHT; break;
+case RectPoint::RB: eTVA = SDRTEXTVERTADJUST_BOTTOM;
+eTHA = SDRTEXTHORZADJUST_RIGHT; break;
+}
+
+// #103516# Do not change values if adjust controls were disabled.
+bool bIsDisabled(m_aCtlPosition.IsCompletelyDisabled());
+
+if(!bIsDisabled)
+{
+if( m_xTsbFullWidth->get_state() == TRISTATE_TRUE )
+{
+if (IsTextDirectionLeftToRight())
+eTHA = SDRTEXTHORZADJUST_BLOCK;
+else
+eTVA = SDRTEXTVERTADJUST_BLOCK;
+}
+
+if ( rOutAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST ) != 
SfxItemState::DONTCARE )
+{
+eOldTVA = rOutAttrs.Get( SDRATTR_TEXT_VERTADJUST ).GetValue();
+if( eOldTVA != eTVA )
+rAttrs->Put( SdrTextVertAdjustItem( eTVA ) );
+}
+else
+rAttrs->Put( SdrTextVertAdjustItem( eTVA ) );
+
+if ( rOutAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ) != 
SfxItemState::DONTCARE )
+{
+eOldTHA = rOutAttrs.Get( SDRATTR_TEXT_HORZADJUST ).GetValue();
+if( eOldTHA != eTHA )
+rAttrs->Put( SdrTextHorzAdjustItem( eTHA ) );
+}
+else
+rAttrs->Put( SdrTextHorzAdjustItem( eTHA ) );
+}
+
 return true;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-09-13 Thread Libreoffice Gerrit user
 cui/source/options/personalization.cxx |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 2f52a8e0f1098a51631434129707cfb0b60fecb3
Author: Muhammet Kara 
AuthorDate: Thu Sep 13 14:59:28 2018 +0300
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Sep 14 01:02:16 2018 +0200

tdf#118881: Fix HTML parsing for personas

This is just a band-aid to make personas feature
work again.

Change-Id: I80b54fe9a8ddc93d93744fcf2c7f739d81f6face
Reviewed-on: https://gerrit.libreoffice.org/60432
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Tested-by: Heiko Tietze 
Reviewed-by: Muhammet Kara 
(cherry picked from commit e98ac43ec42ff398ad489d6719960d595f0327be)
Reviewed-on: https://gerrit.libreoffice.org/60468
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index 216bc6e8e935..1201a9d8d3fb 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -550,14 +550,14 @@ static OUString searchValue( const OString , 
sal_Int32 from, const OStri
 
 where += rIdentifier.getLength();
 
-sal_Int32 end = rBuffer.indexOf( "", where );
+sal_Int32 end = rBuffer.indexOf( "\"", where );
 if ( end < 0 )
 return OUString();
 
 OString aOString( rBuffer.copy( where, end - where ) );
 OUString aString( aOString.getStr(),  aOString.getLength(), 
RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS );
 
-return aString.replaceAll( "\\/", "/" );
+return aString.replaceAll( "\\u002F", "/" );
 }
 
 /// Parse the Persona web page, and find where to get the bitmaps + the color 
values.
@@ -569,32 +569,32 @@ static bool parsePersonaInfo( const OString , 
OUString *pHeaderURL, O
 // let's replace the whole buffer with last one so we can treat it easily
 OString rBuffer = rBufferArg.replaceAll(OString(""), 
OString(""));
 // it is the first attribute that contains "persona="
-sal_Int32 persona = rBuffer.indexOf( "data-browsertheme=\"{" );
+sal_Int32 persona = rBuffer.indexOf( "\"type\":\"persona\"" );
 if ( persona < 0 )
 return false;
 
 // now search inside
-*pHeaderURL = searchValue( rBuffer, persona, "headerURL:" );
+*pHeaderURL = searchValue( rBuffer, persona, "\"headerURL\":\"" );
 if ( pHeaderURL->isEmpty() )
 return false;
 
-*pFooterURL = searchValue( rBuffer, persona, "footerURL:" );
+*pFooterURL = searchValue( rBuffer, persona, "\"footerURL\":\"" );
 if ( pFooterURL->isEmpty() )
 return false;
 
-*pTextColor = searchValue( rBuffer, persona, "textcolor:" );
+*pTextColor = searchValue( rBuffer, persona, "\"textcolor\":\"" );
 if ( pTextColor->isEmpty() )
 return false;
 
-*pAccentColor = searchValue( rBuffer, persona, 
"accentcolor:" );
+*pAccentColor = searchValue( rBuffer, persona, "\"accentcolor\":\"" );
 if ( pAccentColor->isEmpty() )
 return false;
 
-*pPreviewURL = searchValue( rBuffer, persona, "previewURL:" 
);
+*pPreviewURL = searchValue( rBuffer, persona, "\"previewURL\":\"" );
 if ( pPreviewURL->isEmpty() )
 return false;
 
-*pName = searchValue( rBuffer, persona, "name:" );
+*pName = searchValue( rBuffer, persona, "\"name\":\"" );
 return !pName->isEmpty();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-09-04 Thread Libreoffice Gerrit user
 cui/source/tabpages/page.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 6a3300fdf65b91350d2c8f63c57cab2c38c3c828
Author: Caolán McNamara 
AuthorDate: Mon Sep 3 10:09:55 2018 +0100
Commit: Maxim Monastirsky 
CommitDate: Wed Sep 5 00:35:37 2018 +0200

Resolves: tdf#119574 set specific width for style list widget

so super wide style name doesn't break things

Change-Id: I096eb1d3deeb935b43566b4d3ccb45d89ac2a56a
Reviewed-on: https://gerrit.libreoffice.org/59929
Tested-by: Jenkins
Tested-by: Xisco Faulí 
Reviewed-by: Maxim Monastirsky 

diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index df36ebf3a12d..054bc8fb16ed 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -183,6 +183,8 @@ SvxPageDescPage::SvxPageDescPage(TabPageParent pParent, 
const SfxItemSet& rAttr)
 , m_xPrintRangeQueryText(m_xBuilder->weld_label("labelMsg"))
 , m_xBspWin(new weld::CustomWeld(*m_xBuilder, "drawingareaPageDirection", 
m_aBspWin))
 {
+
m_xRegisterLB->set_size_request(m_xRegisterLB->get_approximate_digit_width() * 
20, -1);
+
 bBorderModified = false;
 m_aBspWin.EnableRTL(false);
 
@@ -1425,8 +1427,10 @@ void SvxPageDescPage::SetCollectionList(const 
std::vector )
 OSL_ENSURE(!aList.empty(), "Empty string list");
 
 sStandardRegister = aList[0];
+m_xRegisterLB->freeze();
 for (size_t i = 1; i < aList.size(); ++i)
 m_xRegisterLB->append_text(aList[i]);
+m_xRegisterLB->thaw();
 
 m_xRegisterCB->show();
 m_xRegisterFT->show();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-28 Thread Libreoffice Gerrit user
 cui/source/inc/page.hxx  |2 +-
 cui/source/tabpages/page.cxx |6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c21e8bde3a2cf31e02d5eaf7a8773f6af6c67b3b
Author: Caolán McNamara 
AuthorDate: Tue Aug 21 12:06:51 2018 +0100
Commit: Miklos Vajna 
CommitDate: Tue Aug 28 18:27:19 2018 +0200

Resolves: tdf#119350 page with 0 margins shown as 1cm in page dialog

since...

commit 7958091b06954a7b253fdebb9ea0313db9217959
Date:   Fri Jun 15 14:03:31 2018 +0100

weld SvxPageDescPage

because the toggle handler fires when the value of landscape is set,
change to a click handler which fires only when the user explicitly
clicks on it, which restore the original quirky behaviour

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

diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index ab9f1cad1869..da7ee7047391 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -137,7 +137,7 @@ private:
 voidInit_Impl();
 DECL_LINK(LayoutHdl_Impl, weld::ComboBoxText&, void);
 DECL_LINK(PaperBinHdl_Impl, weld::ComboBoxText&, void);
-DECL_LINK(SwapOrientation_Impl, weld::ToggleButton&, void);
+DECL_LINK(SwapOrientation_Impl, weld::Button&, void);
 void SwapFirstValues_Impl( bool bSet );
 DECL_LINK(BorderModify_Impl, weld::MetricSpinButton&, void);
 void InitHeadFoot_Impl( const SfxItemSet& rSet );
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 265b2d1ef72b..df36ebf3a12d 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -316,8 +316,8 @@ void SvxPageDescPage::Init_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));
-m_xLandscapeBtn->connect_toggled(LINK(this, SvxPageDescPage, 
SwapOrientation_Impl));
-m_xPortraitBtn->connect_toggled(LINK(this, SvxPageDescPage, 
SwapOrientation_Impl));
+m_xLandscapeBtn->connect_clicked(LINK(this, SvxPageDescPage, 
SwapOrientation_Impl));
+m_xPortraitBtn->connect_clicked(LINK(this, SvxPageDescPage, 
SwapOrientation_Impl));
 
 Link aLink = LINK(this, SvxPageDescPage, 
BorderModify_Impl);
 m_xLeftMarginEdit->connect_value_changed(aLink);
@@ -905,7 +905,7 @@ IMPL_LINK_NOARG(SvxPageDescPage, PaperSizeModify_Impl, 
weld::MetricSpinButton&,
 RangeHdl_Impl();
 }
 
-IMPL_LINK(SvxPageDescPage, SwapOrientation_Impl, weld::ToggleButton&, rBtn, 
void)
+IMPL_LINK(SvxPageDescPage, SwapOrientation_Impl, weld::Button&, rBtn, void)
 {
 if (
 (!bLandscape &&  == m_xLandscapeBtn.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-1' - cui/source include/svx include/vcl svx/source vcl/source

2018-08-23 Thread Libreoffice Gerrit user
 cui/source/tabpages/tppattern.cxx |5 +-
 include/svx/xbtmpit.hxx   |6 ---
 include/vcl/BitmapTools.hxx   |6 +++
 svx/source/dialog/dlgctrl.cxx |3 +
 svx/source/xoutdev/xattrbmp.cxx   |   61 ---
 svx/source/xoutdev/xtabptrn.cxx   |9 ++---
 vcl/source/bitmap/BitmapTools.cxx |   65 ++
 7 files changed, 82 insertions(+), 73 deletions(-)

New commits:
commit 7607320e8e68cfeb2ef8933d8a5a7d06f74f16fd
Author: Noel Grandin 
AuthorDate: Tue Aug 21 16:07:55 2018 +0200
Commit: Caolán McNamara 
CommitDate: Thu Aug 23 16:41:59 2018 +0200

tdf#119282 Area tab, Pattern color change

regression from

commit ccd316d1cb310734848bd20244f509024b549b8c
use VirtualDevice in createHistorical8x8FromArray

Move the code inside vcl so we don't need to expose BitmapWriteAccess.

I tried to detect this thing by counting the number of independent
colors in the bitmap, but that didn't work. It is used from more than
one place, and appears to be very determined that it needs a 2-color
palette to work properly.

Change-Id: Id11dd9ea78e5e522a6083d6a799e801cac81fd5b
Reviewed-on: https://gerrit.libreoffice.org/59331
Reviewed-by: Michael Meeks 
Tested-by: Jenkins
(cherry picked from commit cd8dd48bf89d800c012afb04b16281ed8b261de9)
Reviewed-on: https://gerrit.libreoffice.org/59416
Reviewed-by: Noel Grandin 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/tabpages/tppattern.cxx 
b/cui/source/tabpages/tppattern.cxx
index 8f06c8051fec..7516e6689adf 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -73,7 +74,7 @@ public:
 {
 if (!pBmpArray)
 return BitmapEx();
-return createHistorical8x8FromArray(*pBmpArray, aPixelColor, 
aBackgroundColor);
+return vcl::bitmap::createHistorical8x8FromArray(*pBmpArray, 
aPixelColor, aBackgroundColor);
 }
 
 void SetBmpArray( std::array const & pPixel ) { pBmpArray = 
 }
@@ -296,7 +297,7 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ChangePatternHdl_Impl, 
ValueSet*, void)
 {
 BitmapColor aBack;
 BitmapColor aFront;
-bool 
bIs8x8(isHistorical8x8(pGraphicObject->GetGraphic().GetBitmapEx(), aBack, 
aFront));
+bool 
bIs8x8(vcl::bitmap::isHistorical8x8(pGraphicObject->GetGraphic().GetBitmapEx(), 
aBack, aFront));
 
 m_pLbColor->SetNoSelection();
 m_pLbBackgroundColor->SetNoSelection();
diff --git a/include/svx/xbtmpit.hxx b/include/svx/xbtmpit.hxx
index 2f8e5f1181ee..218985c077d6 100644
--- a/include/svx/xbtmpit.hxx
+++ b/include/svx/xbtmpit.hxx
@@ -29,12 +29,6 @@ class SdrModel;
 class BitmapColor;
 
 
-// helper to construct historical 8x8 bitmaps with two colors
-
-BitmapEx SVX_DLLPUBLIC createHistorical8x8FromArray(std::array 
const & pArray, Color aColorPix, Color aColorBack);
-bool SVX_DLLPUBLIC isHistorical8x8(const BitmapEx& rBitmapEx, BitmapColor& 
o_rBack, BitmapColor& o_rFront);
-
-
 // class XFillBitmapItem
 
 class SVX_DLLPUBLIC XFillBitmapItem : public NameOrIndex
diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx
index 2064cb2d01dc..75eb6ed53077 100644
--- a/include/vcl/BitmapTools.hxx
+++ b/include/vcl/BitmapTools.hxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace vcl {
 namespace bitmap {
@@ -113,6 +114,11 @@ VCL_DLLPUBLIC void CanvasCairoExtractBitmapData( BitmapEx 
const & rBmpEx, Bitmap
 
 VCL_DLLPUBLIC css::uno::Sequence< sal_Int8 > CanvasExtractBitmapData(BitmapEx 
const & rBitmapEx, const css::geometry::IntegerRectangle2D& rect);
 
+// helper to construct historical 8x8 bitmaps with two colors
+
+BitmapEx VCL_DLLPUBLIC createHistorical8x8FromArray(std::array 
const & pArray, Color aColorPix, Color aColorBack);
+bool VCL_DLLPUBLIC isHistorical8x8(const BitmapEx& rBitmapEx, BitmapColor& 
o_rBack, BitmapColor& o_rFront);
+
 }} // end vcl::bitmap
 
 #endif // INCLUDED_VCL_BITMAP_TOOLS_HXX
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 48a24c0372f5..f5ec3b570d93 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -46,6 +46,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #define OUTPUT_DRAWMODE_COLOR   (DrawModeFlags::Default)
@@ -1445,7 +1446,7 @@ void SvxPixelCtl::SetXBitmap(const BitmapEx& rBitmapEx)
 BitmapColor aBack;
 BitmapColor aFront;
 
-if (isHistorical8x8(rBitmapEx, aBack, aFront))
+if (vcl::bitmap::isHistorical8x8(rBitmapEx, aBack, aFront))
 {
 Bitmap aBitmap(rBitmapEx.GetBitmap());
 Bitmap::ScopedReadAccess pRead(aBitmap);
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index a25c5d41faf4..b20bbf4d5ec8 100644
--- 

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

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

New commits:
commit 18a8285433ec2f94d0ca523af8dd769ff46fd5a1
Author: Caolán McNamara 
AuthorDate: Wed Aug 8 09:28:27 2018 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Aug 8 20:38:04 2018 +0200

Resolves: tdf#118281 control positions always in cm

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

diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 134ac9b3e988..bfc5017e3705 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -437,6 +437,11 @@ void SvxSlantTabPage::Construct()
 DBG_ASSERT(pView, "no valid view (!)");
 eDlgUnit = GetModuleFieldUnit(GetItemSet());
 SetFieldUnit(*m_xMtrRadius, eDlgUnit, true);
+for (int i = 0; i < 2; ++i)
+{
+SetFieldUnit(*m_aControlX[i], eDlgUnit, true);
+SetFieldUnit(*m_aControlY[i], eDlgUnit, true);
+}
 
 { // #i75273#
 ::tools::Rectangle aTempRect(pView->GetAllMarkedRect());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-06 Thread Libreoffice Gerrit user
 cui/source/tabpages/tpbitmap.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit c936193b51c9328f9279078207bddfca23995b05
Author: Jim Raykowski 
AuthorDate: Fri Jul 27 15:43:11 2018 -0800
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Aug 6 18:59:45 2018 +0200

tdf#117892 Blue Area/Background Bitmap tabpage Preview fix

Change-Id: Iaef3651407d1df85b1cb221821d47c33e111016e
Reviewed-on: https://gerrit.libreoffice.org/58206
Tested-by: Jenkins
Tested-by: Xisco Faulí 
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 10b865fc00a97e5ad0bf76cb9bad774933e25461)
Reviewed-on: https://gerrit.libreoffice.org/58365
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 52ca43fb6892..9e387385120d 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -524,6 +524,8 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyBitmapHdl, 
ValueSet*, void)
 ModifyBitmapStyleHdl( *m_pBitmapStyleLB );
 ModifyBitmapPositionHdl( *m_pPositionLB );
 
+m_rXFSet.ClearItem();
+
 m_rXFSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP));
 m_rXFSet.Put(XFillBitmapItem(OUString(), *pGraphicObject));
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-03 Thread Libreoffice Gerrit user
 cui/source/tabpages/tppattern.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit f207e283b756ea40721a46440d235836dcb79568
Author: Jim Raykowski 
AuthorDate: Sat Jul 28 00:37:30 2018 -0800
Commit: Caolán McNamara 
CommitDate: Fri Aug 3 17:14:00 2018 +0200

tdf#118976 Make area pattern tab page display pattern preview

Change-Id: If30b83ec93897b85784d66c699ece377f47f68d4
Reviewed-on: https://gerrit.libreoffice.org/58265
Tested-by: Jenkins
Tested-by: Xisco Faulí 
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 623cb7a1299386f8d8f7c53b0369a40cae51b752)
Reviewed-on: https://gerrit.libreoffice.org/58366
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/tabpages/tppattern.cxx 
b/cui/source/tabpages/tppattern.cxx
index 4768d0189a49..8f06c8051fec 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -320,6 +320,8 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ChangePatternHdl_Impl, 
ValueSet*, void)
 // update m_pBitmapCtl, rXFSet and m_pCtlPreview
 m_pBitmapCtl->SetPixelColor( aPixelColor );
 m_pBitmapCtl->SetBackgroundColor( aBackColor );
+m_rXFSet.ClearItem();
+m_rXFSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP));
 m_rXFSet.Put(XFillBitmapItem(OUString(), 
Graphic(m_pBitmapCtl->GetBitmapEx(;
 m_pCtlPreview->SetAttributes( m_aXFillAttr.GetItemSet() );
 m_pCtlPreview->Invalidate();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-26 Thread Libreoffice Gerrit user
 cui/source/inc/transfrm.hxx  |2 +
 cui/source/tabpages/transfrm.cxx |   44 ++-
 2 files changed, 32 insertions(+), 14 deletions(-)

New commits:
commit e8b10d012b14942f79202147b0ef311909413228
Author: Caolán McNamara 
AuthorDate: Thu Jul 19 09:52:29 2018 +0100
Commit: Miklos Vajna 
CommitDate: Thu Jul 26 10:28:22 2018 +0200

tdf#118816 recover initial intent of enabled possibility of tristate as a 
flag

Change-Id: I0150b96e063818cc20e2404081b906ccc5ff0be6
Reviewed-on: https://gerrit.libreoffice.org/57712
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 9f01dca60e6539f48cd529180f0d64c2131e0ea1)
Reviewed-on: https://gerrit.libreoffice.org/57713
Reviewed-by: Miklos Vajna 

diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx
index d4f9be4e6917..95c137a2b051 100644
--- a/cui/source/inc/transfrm.hxx
+++ b/cui/source/inc/transfrm.hxx
@@ -85,6 +85,8 @@ private:
 boolmbProtectDisabled;
 boolmbSizeDisabled;
 boolmbAdjustDisabled;
+boolmbIgnoreAutoGrowWidth;
+boolmbIgnoreAutoGrowHeight;
 
 // from size
 // #i75273#
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index fcd86eb7c082..134ac9b3e988 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -763,6 +763,8 @@ 
SvxPositionSizeTabPage::SvxPositionSizeTabPage(TabPageParent pParent, const SfxI
 , mbProtectDisabled(false)
 , mbSizeDisabled(false)
 , mbAdjustDisabled(true)
+, mbIgnoreAutoGrowWidth(true)
+, mbIgnoreAutoGrowHeight(true)
 , mfOldWidth(0.0)
 , mfOldHeight(0.0)
 , m_aCtlPos(this)
@@ -890,6 +892,10 @@ void SvxPositionSizeTabPage::Construct()
 
 m_xTsbAutoGrowWidth->connect_toggled( LINK( this, 
SvxPositionSizeTabPage, ClickSizeProtectHdl ) );
 m_xTsbAutoGrowHeight->connect_toggled( LINK( this, 
SvxPositionSizeTabPage, ClickSizeProtectHdl ) );
+
+// is used as flag to evaluate if its selectable
+mbIgnoreAutoGrowWidth = false;
+mbIgnoreAutoGrowHeight = false;
 }
 }
 
@@ -997,23 +1003,33 @@ bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet* 
rOutAttrs )
 
 if (m_xTsbAutoGrowWidth->get_state_changed_from_saved())
 {
-if( m_xTsbAutoGrowWidth->get_inconsistent() )
-rOutAttrs->InvalidateItem( SID_ATTR_TRANSFORM_AUTOWIDTH );
-else
-rOutAttrs->Put(
-SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_AUTOWIDTH ),
-m_xTsbAutoGrowWidth->get_active() ) );
+if (!mbIgnoreAutoGrowWidth)
+{
+if( m_xTsbAutoGrowWidth->get_inconsistent() )
+rOutAttrs->InvalidateItem( SID_ATTR_TRANSFORM_AUTOWIDTH );
+else
+rOutAttrs->Put(
+SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_AUTOWIDTH ),
+m_xTsbAutoGrowWidth->get_active() ) );
+}
 bModified = true;
 }
 
 if (m_xTsbAutoGrowHeight->get_state_changed_from_saved())
 {
-if (m_xTsbAutoGrowHeight->get_inconsistent())
-rOutAttrs->InvalidateItem( SID_ATTR_TRANSFORM_AUTOHEIGHT );
-else
-rOutAttrs->Put(
-SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_AUTOHEIGHT ),
-m_xTsbAutoGrowHeight->get_active() ) );
+if (!mbIgnoreAutoGrowHeight)
+{
+if (m_xTsbAutoGrowHeight->get_inconsistent())
+{
+rOutAttrs->InvalidateItem( SID_ATTR_TRANSFORM_AUTOHEIGHT );
+}
+else
+{
+rOutAttrs->Put(
+SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_AUTOHEIGHT ),
+m_xTsbAutoGrowHeight->get_active() ) );
+}
+}
 bModified = true;
 }
 
@@ -1170,8 +1186,8 @@ void SvxPositionSizeTabPage::UpdateControlStates()
 {
 const bool bPosProtect =  m_xTsbPosProtect->get_state() == TRISTATE_TRUE;
 const bool bSizeProtect = m_xTsbSizeProtect->get_state() == TRISTATE_TRUE;
-const bool bHeightChecked = !m_xTsbAutoGrowHeight->get_inconsistent() && 
(m_xTsbAutoGrowHeight->get_active());
-const bool bWidthChecked = !m_xTsbAutoGrowWidth->get_inconsistent() && 
(m_xTsbAutoGrowWidth->get_active());
+const bool bHeightChecked = !mbIgnoreAutoGrowHeight && 
(m_xTsbAutoGrowHeight->get_active());
+const bool bWidthChecked = !mbIgnoreAutoGrowWidth && 
(m_xTsbAutoGrowWidth->get_active());
 
 m_xFlPosition->set_sensitive(!bPosProtect && !mbPageDisabled);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-25 Thread Libreoffice Gerrit user
 cui/source/dialogs/SignatureLineDialog.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 8a4f07b367284e898898b1840fc22f357099aba9
Author: Michael Stahl 
AuthorDate: Wed Jul 25 13:14:30 2018 +0200
Commit: Katarina Behrens 
CommitDate: Wed Jul 25 22:03:31 2018 +0200

tdf#118777 cui: use right XText in SignatureLineDialog

Writer has multiple nested XText and we have to call insertTextContent
on the one that corresponds to the xCursor, so use the convenient
getText() instead of hard-coding the body text.

Change-Id: I86bce48e97730917aa8c4b093bb74c03e3f0dd36
Reviewed-on: https://gerrit.libreoffice.org/57969
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 7213a583f5c1d42c05dc4f19b4d4d2f9dded7733)
Reviewed-on: https://gerrit.libreoffice.org/57978
Reviewed-by: Katarina Behrens 

diff --git a/cui/source/dialogs/SignatureLineDialog.cxx 
b/cui/source/dialogs/SignatureLineDialog.cxx
index f2a5ec06d26e..60e8491cbff0 100644
--- a/cui/source/dialogs/SignatureLineDialog.cxx
+++ b/cui/source/dialogs/SignatureLineDialog.cxx
@@ -165,11 +165,13 @@ void SignatureLineDialog::Apply()
 
 // Insert into document
 const Reference xTextDocument(m_xModel, UNO_QUERY);
-Reference xText = xTextDocument->getText();
 Reference xTextContent(xShape, UNO_QUERY_THROW);
 Reference 
xViewCursorSupplier(m_xModel->getCurrentController(),

UNO_QUERY_THROW);
 Reference xCursor = 
xViewCursorSupplier->getViewCursor();
+// use cursor's XText - it might be in table cell, frame, ...
+Reference const xText(xCursor->getText());
+assert(xText.is());
 xText->insertTextContent(xCursor, xTextContent, true);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-20 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuicharmap.cxx |   22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

New commits:
commit a32d9ec1fa48296ffba713bc4593cad45a1c83ad
Author: Caolán McNamara 
AuthorDate: Thu Jul 19 12:20:47 2018 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Jul 20 11:54:11 2018 +0200

tdf#118304 reselect current glyph on changing font

preview glyph will rerender the glyph if its there, or the glyph description
changes to "missing glyph" if its not there anymore. Don't auto select
first entry of the subset when font changes, leave it as unselected and
let the glyph determine what's ends up there

Change-Id: I33d7dd3a071100175ac9bc7c7e9d44684a1aff28
Reviewed-on: https://gerrit.libreoffice.org/57724
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit e8bf2cb72dbe55f4e9ac7ace48e644a934cfc503)
Reviewed-on: https://gerrit.libreoffice.org/57764
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index d65ec3fe1926..7837e6fa6f5d 100755
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -471,6 +471,8 @@ void SvxCharacterMap::init()
 else if (m_xFontLB->get_count() )
 m_xFontLB->set_active(0);
 FontSelectHdl(*m_xFontLB);
+if (m_xSubsetLB->get_count())
+m_xSubsetLB->set_active(0);
 
 m_xFontLB->connect_changed(LINK( this, SvxCharacterMap, FontSelectHdl));
 m_xSubsetLB->connect_changed(LINK( this, SvxCharacterMap, 
SubsetSelectHdl));
@@ -603,6 +605,8 @@ void SvxCharacterMap::SetCharFont( const vcl::Font& rFont )
 m_xFontLB->set_active_text(aTmp.GetFamilyName());
 aFont = aTmp;
 FontSelectHdl(*m_xFontLB);
+if (m_xSubsetLB->get_count())
+m_xSubsetLB->set_active(0);
 }
 
 void SvxCharacterMap::fillAllSubsets(weld::ComboBoxText& rListBox)
@@ -680,14 +684,10 @@ IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl, 
weld::ComboBoxText&, void)
 pSubsetMap = new SubsetMap( xFontCharMap );
 
 // update subset listbox for new font's unicode subsets
-bool bFirst = true;
 for (auto const& subset : pSubsetMap->GetSubsetMap())
 {
 
m_xSubsetLB->append(OUString::number(reinterpret_cast()), 
subset.GetName());
 // NOTE: subset must live at least as long as the selected font
-if (bFirst)
-m_xSubsetLB->set_active(0);
-bFirst = false;
 }
 
 if (m_xSubsetLB->get_count() <= 1)
@@ -696,6 +696,9 @@ IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl, 
weld::ComboBoxText&, void)
 
 m_xSubsetText->set_sensitive(bNeedSubset);
 m_xSubsetLB->set_sensitive(bNeedSubset);
+
+// tdf#118304 reselect current glyph to see if its still there in new font
+selectCharByCode(Radix::hexadecimal);
 }
 
 void SvxCharacterMap::toggleSearchView(bool state)
@@ -999,14 +1002,11 @@ IMPL_LINK_NOARG(SvxCharacterMap, CharHighlightHdl, 
SvxShowCharSet*, void)
 m_xSubsetLB->set_active(-1);
 }
 
-if(m_xShowSet->HasFocus() || m_xHexCodeText->has_focus() || 
m_xDecimalCodeText->has_focus() )
-{
-m_aShowChar.SetText( aText );
-m_aShowChar.SetFont( aFont );
-m_aShowChar.Invalidate();
+m_aShowChar.SetText( aText );
+m_aShowChar.SetFont( aFont );
+m_aShowChar.Invalidate();
 
-setFavButtonState(aText, aFont.GetFamilyName());
-}
+setFavButtonState(aText, aFont.GetFamilyName());
 }
 
 IMPL_LINK_NOARG(SvxCharacterMap, SearchCharHighlightHdl, SvxShowCharSet*, 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-1' - cui/source

2018-07-19 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuicharmap.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 5e5e49eba37c15b17a4d9788da91415abbca4eb1
Author: Caolán McNamara 
AuthorDate: Thu Jul 19 10:10:33 2018 +0100
Commit: Christian Lohmaier 
CommitDate: Thu Jul 19 13:43:07 2018 +0200

tdf#117038 set button width to max possible content width

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

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index 678bddee71e3..d65ec3fe1926 100755
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -493,6 +493,14 @@ void SvxCharacterMap::init()
 m_xHexCodeText->connect_changed( LINK( this, SvxCharacterMap, 
HexCodeChangeHdl ) );
 m_xFavouritesBtn->connect_clicked( LINK(this, SvxCharacterMap, 
FavSelectHdl));
 
+// tdf#117038 set the buttons width to its max possible width so it doesn't
+// make layout change when the label changes
+m_xFavouritesBtn->set_label(CuiResId(RID_SVXSTR_REMOVE_FAVORITES));
+auto nMaxWidth = m_xFavouritesBtn->get_preferred_size().Width();
+m_xFavouritesBtn->set_label(CuiResId(RID_SVXSTR_ADD_FAVORITES));
+nMaxWidth = std::max(nMaxWidth, 
m_xFavouritesBtn->get_preferred_size().Width());
+m_xFavouritesBtn->set_size_request(nMaxWidth, -1);
+
 if( SvxShowCharSet::getSelectedChar() == ' ')
 {
 m_xOKBtn->set_sensitive(false);
@@ -560,7 +568,7 @@ void SvxCharacterMap::setFavButtonState(const OUString& 
sTitle, const OUString&
 else
 m_xFavouritesBtn->set_sensitive(true);
 
-if(isFavChar(sTitle, rFont))
+if (isFavChar(sTitle, rFont))
 {
 m_xFavouritesBtn->set_label(CuiResId(RID_SVXSTR_REMOVE_FAVORITES));
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-18 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuicharmap.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 805ea77cf21ff96f8ffd091f94726840771ee658
Author: Caolán McNamara 
AuthorDate: Tue Jul 17 15:55:03 2018 +0100
Commit: Eike Rathke 
CommitDate: Wed Jul 18 20:59:34 2018 +0200

Related: tdf#118681 use a case insensitive compare for hex digits

Change-Id: I7b177d2772a86cada37c20056794bc1d8ab50991
Reviewed-on: https://gerrit.libreoffice.org/57565
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index 7c6d8f50a342..678bddee71e3 100755
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -977,8 +977,8 @@ IMPL_LINK_NOARG(SvxCharacterMap, CharHighlightHdl, 
SvxShowCharSet*, void)
 setCharName(cChar);
 
 // Update the hex and decimal codes only if necessary
-if (m_xHexCodeText->get_text() != aHexText)
-m_xHexCodeText->set_text( aHexText );
+if (!m_xHexCodeText->get_text().equalsIgnoreAsciiCase(aHexText))
+m_xHexCodeText->set_text(aHexText);
 if (m_xDecimalCodeText->get_text() != aDecimalText)
 m_xDecimalCodeText->set_text( aDecimalText );
 
@@ -1020,7 +1020,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, SearchCharHighlightHdl, 
SvxShowCharSet*, void)
 setCharName(cChar);
 
 // Update the hex and decimal codes only if necessary
-if (m_xHexCodeText->get_text() != aHexText)
+if (!m_xHexCodeText->get_text().equalsIgnoreAsciiCase(aHexText))
 m_xHexCodeText->set_text(aHexText);
 if (m_xDecimalCodeText->get_text() != aDecimalText)
 m_xDecimalCodeText->set_text( aDecimalText );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-17 Thread Libreoffice Gerrit user
 cui/source/tabpages/tpcolor.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 59304815cc70544de4a3227f070895143f0276a4
Author: Caolán McNamara 
AuthorDate: Mon Jul 16 14:30:53 2018 +0100
Commit: Eike Rathke 
CommitDate: Tue Jul 17 11:09:49 2018 +0200

tdf#118549 crash on dialog teardown

only an issue for the current partially complete interim case

Change-Id: Iaf1ef4dabca1cdd5d2d90028edf5793cf45feb20
Reviewed-on: https://gerrit.libreoffice.org/57502
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 724a075b22d5..401c7f3d27d9 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -166,7 +166,9 @@ SvxColorTabPage::~SvxColorTabPage()
 void SvxColorTabPage::dispose()
 {
 mpTopDlg.clear();
+m_xValSetRecentListWin.reset();
 m_xValSetRecentList.reset();
+m_xValSetColorListWin.reset();
 m_xValSetColorList.reset();
 SfxTabPage::dispose();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-17 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuicharmap.cxx   |9 +++--
 include/svx/charmap.hxx |5 +++--
 starmath/source/dialog.cxx  |3 +--
 svx/source/dialog/charmap.cxx   |8 ++--
 svx/source/dialog/searchcharmap.cxx |1 -
 5 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit a09d357daf65e285323ff77653a6de3058fc44da
Author: Caolán McNamara 
AuthorDate: Mon Jul 16 16:04:11 2018 +0100
Commit: Eike Rathke 
CommitDate: Tue Jul 17 11:01:57 2018 +0200

tdf#118681 make sure we're using the right font char map

Change-Id: I64265dac5d0d18b092d64ef656997d7177a425a4
Reviewed-on: https://gerrit.libreoffice.org/57505
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index 117ab6f5813d..7c6d8f50a342 100755
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -668,8 +668,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl, 
weld::ComboBoxText&, void)
 bool bNeedSubset = (aFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL);
 if (bNeedSubset)
 {
-FontCharMapRef xFontCharMap( new FontCharMap() );
-m_xShowSet->GetFontCharMap( xFontCharMap );
+FontCharMapRef xFontCharMap = m_xShowSet->GetFontCharMap();
 pSubsetMap = new SubsetMap( xFontCharMap );
 
 // update subset listbox for new font's unicode subsets
@@ -841,8 +840,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, SearchUpdateHdl, 
weld::Entry&, void)
 
 toggleSearchView(true);
 
-FontCharMapRef xFontCharMap(new FontCharMap());
-m_xSearchSet->GetFontCharMap(xFontCharMap);
+FontCharMapRef xFontCharMap = m_xSearchSet->GetFontCharMap();
 
 sal_UCS4 sChar = xFontCharMap->GetFirstChar();
 while(sChar != xFontCharMap->GetLastChar())
@@ -1061,8 +1059,7 @@ void SvxCharacterMap::selectCharByCode(Radix radix)
 // Convert the code back to a character using the appropriate radix
 sal_UCS4 cChar = aCodeString.toUInt32(static_cast (radix));
 // Use FontCharMap::HasChar(sal_UCS4 cChar) to see if the desired 
character is in the font
-FontCharMapRef xFontCharMap(new FontCharMap());
-m_xShowSet->GetFontCharMap(xFontCharMap);
+FontCharMapRef xFontCharMap = m_xShowSet->GetFontCharMap();
 if (xFontCharMap->HasChar(cChar))
 // Select the corresponding character
 SetChar(cChar);
diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx
index 6e18581c4786..5101b230059f 100644
--- a/include/svx/charmap.hxx
+++ b/include/svx/charmap.hxx
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -80,8 +81,8 @@ public:
 voidSetFavClickHdl( const Link& rHdl ) { 
aFavClickHdl = rHdl; }
 static sal_uInt32& getSelectedChar();
 voidSetFont( const vcl::Font& rFont );
-vcl::Font const & GetFont() const { return mxVirDev->GetFont(); }
-boolGetFontCharMap(FontCharMapRef& rxFontCharMap) const { 
return mxVirDev->GetFontCharMap(rxFontCharMap); }
+vcl::Font const & GetFont() const { return maFont; }
+FontCharMapRef  GetFontCharMap();
 boolisFavChar(const OUString& sTitle, const OUString& rFont);
 voidgetFavCharacterList(); //gets both Fav char and Fav char 
font list
 voidupdateFavCharacterList(const OUString& rChar, const 
OUString& rFont);
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index ac7269345c0c..1dabf0abd0b3 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1987,8 +1987,7 @@ void SmSymDefineDialog::SetFont(const OUString 
, const OUString 
 m_aSymbolDisplay.SetFont(aFontMetric);
 
 // update subset listbox for new font's unicode subsets
-FontCharMapRef xFontCharMap;
-m_xCharsetDisplay->GetFontCharMap( xFontCharMap );
+FontCharMapRef xFontCharMap = m_xCharsetDisplay->GetFontCharMap();
 m_xSubsetMap.reset(new SubsetMap( xFontCharMap ));
 
 m_xFontsSubsetLB->clear();
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 1d8d286d03cc..4dd8dec69cde 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -20,7 +20,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
@@ -845,12 +844,17 @@ svx::SvxShowCharSetItem* SvxShowCharSet::ImplGetItem( int 
_nPos )
 return aFind->second.get();
 }
 
-
 sal_Int32 SvxShowCharSet::getMaxCharCount() const
 {
 return mxFontCharMap->GetCharCount();
 }
 
+FontCharMapRef SvxShowCharSet::GetFontCharMap()
+{
+RecalculateFont(*mxVirDev);
+return mxFontCharMap;
+}
+
 // TODO: should be moved into Font Attributes stuff
 // we let it mature here though because it is currently the only use
 
diff --git a/svx/source/dialog/searchcharmap.cxx 
b/svx/source/dialog/searchcharmap.cxx
index cf9faf363673..ba2a8a36eb56 100644
--- 

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

2018-07-13 Thread Eike Rathke
 cui/source/options/dbregister.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 48c6375458d09378b404e2ab5153f2ef2cc0630e
Author: Eike Rathke 
Date:   Thu Jul 12 18:26:05 2018 +0200

SvTreeListBox::DoubleClickHdl: DbRegistrationOptionsPage more, tdf#115950 
rel.

Change-Id: I820ce28a4df108f17cbb65210834acae6b0f8946
(cherry picked from commit 1a5ef55b7de60131efa7a831309186b29cb6214e)
Reviewed-on: https://gerrit.libreoffice.org/57355
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky 

diff --git a/cui/source/options/dbregister.cxx 
b/cui/source/options/dbregister.cxx
index 40ec9d950f87..91e0d16dbf35 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -284,7 +284,9 @@ IMPL_LINK_NOARG(DbRegistrationOptionsPage, NewHdl, Button*, 
void)
 IMPL_LINK_NOARG(DbRegistrationOptionsPage, PathBoxDoubleClickHdl, 
SvTreeListBox*, bool)
 {
 EditHdl(nullptr);
-return false;
+// Signal more to be done, i.e. when entry removed/inserted via
+// openLinkDialog().
+return true;
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-07-06 Thread Samuel Mehrbrodt
 cui/source/dialogs/SignatureLineDialog.cxx |   13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

New commits:
commit a09ed9a9eae17103b7ad6b5f99c78f6c36b6084b
Author: Samuel Mehrbrodt 
Date:   Thu Jul 5 21:48:49 2018 +0200

Writer: Insert signature line at current cursor position

Reviewed-on: https://gerrit.libreoffice.org/57026
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 8905ae9f0fc8b0e4a95113fd81e88d4e7db57bcc)

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

diff --git a/cui/source/dialogs/SignatureLineDialog.cxx 
b/cui/source/dialogs/SignatureLineDialog.cxx
index bd3d2a75003a..f2a5ec06d26e 100644
--- a/cui/source/dialogs/SignatureLineDialog.cxx
+++ b/cui/source/dialogs/SignatureLineDialog.cxx
@@ -25,6 +25,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 using namespace css;
 using namespace css::uno;
@@ -162,10 +164,13 @@ void SignatureLineDialog::Apply()
 xShapeProps->setPropertyValue("AnchorType", 
Any(TextContentAnchorType_AT_PARAGRAPH));
 
 // Insert into document
-Reference const xEnd
-= Reference(m_xModel, 
UNO_QUERY)->getText()->getEnd();
-Reference const xShapeContent(xShapeProps, UNO_QUERY);
-xShapeContent->attach(xEnd);
+const Reference xTextDocument(m_xModel, UNO_QUERY);
+Reference xText = xTextDocument->getText();
+Reference xTextContent(xShape, UNO_QUERY_THROW);
+Reference 
xViewCursorSupplier(m_xModel->getCurrentController(),
+   
UNO_QUERY_THROW);
+Reference xCursor = 
xViewCursorSupplier->getViewCursor();
+xText->insertTextContent(xCursor, xTextContent, true);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-06-28 Thread Samuel Mehrbrodt
 cui/source/dialogs/SignatureLineDialog.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 4b0f8418089296fc8734b3fef34322eaed0e0fb2
Author: Samuel Mehrbrodt 
Date:   Thu Jun 28 09:33:53 2018 +0200

tdf#118429 Provide unsigned signature image

when creating signature line.
OOXML Export expects this.

Change-Id: Ib6ab1f879c5ef27e8347002576ba95104117cadd
Reviewed-on: https://gerrit.libreoffice.org/56576
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit b80207f5ac67ff585ce10f741803df12d3a308a7)
Reviewed-on: https://gerrit.libreoffice.org/56587
Reviewed-by: Thorsten Behrens 

diff --git a/cui/source/dialogs/SignatureLineDialog.cxx 
b/cui/source/dialogs/SignatureLineDialog.cxx
index a1716fe282b6..bd3d2a75003a 100644
--- a/cui/source/dialogs/SignatureLineDialog.cxx
+++ b/cui/source/dialogs/SignatureLineDialog.cxx
@@ -132,6 +132,7 @@ void SignatureLineDialog::Apply()
 UNO_QUERY);
 
 xShapeProps->setPropertyValue("Graphic", Any(xGraphic));
+xShapeProps->setPropertyValue("SignatureLineUnsignedImage", Any(xGraphic));
 
 // Set signature line properties
 xShapeProps->setPropertyValue("IsSignatureLine", Any(true));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-06-28 Thread Miklos Vajna
 cui/source/options/personalization.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit ea08ffc92d84e944a143902f9cd280370986a781
Author: Miklos Vajna 
Date:   Thu Jun 28 11:43:35 2018 +0200

tdf#117866 cui personalization: fix a possible race

The case when the thread is re-scheduled exactly after checking for
m_bExecute but before taking the solar mutex.

(cherry picked from commit f4c73f90da2a2c31f0d29572180aa97e10c3dbad)

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

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index 7b4cf6807170..216bc6e8e935 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -99,7 +99,13 @@ SelectPersonaDialog::~SelectPersonaDialog()
 void SelectPersonaDialog::dispose()
 {
 if (m_pSearchThread.is())
+{
+// Release the solar mutex, so the thread is not affected by the race
+// when it's after the m_bExecute check but before taking the solar
+// mutex.
+SolarMutexReleaser aReleaser;
 m_pSearchThread->join();
+}
 
 m_pEdit.clear();
 m_pSearchButton.clear();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-06-26 Thread Caolán McNamara
 cui/source/dialogs/cuicharmap.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 66881028595257fcf11985fd0e8835f4360632a0
Author: Caolán McNamara 
Date:   Tue Jun 26 16:11:53 2018 +0100

tdf#118309 freeze/thaw adding large amounts to ComboBoxText

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

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index d236d812d603..117ab6f5813d 100755
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -435,7 +435,8 @@ void SvxCharacterMap::init()
 OUString aDefStr( aFont.GetFamilyName() );
 OUString aLastName;
 int nCount = m_xVirDev->GetDevFontCount();
-for ( int i = 0; i < nCount; i++ )
+m_xFontLB->freeze();
+for (int i = 0; i < nCount; ++i)
 {
 OUString aFontName( m_xVirDev->GetDevFont( i ).GetFamilyName() );
 if (aFontName != aLastName)
@@ -444,6 +445,7 @@ void SvxCharacterMap::init()
 m_xFontLB->append(OUString::number(i), aFontName);
 }
 }
+m_xFontLB->thaw();
 // the font may not be in the list =>
 // try to find a font name token in list and select found font,
 // else select topmost entry
@@ -599,8 +601,10 @@ void SvxCharacterMap::fillAllSubsets(weld::ComboBoxText& 
rListBox)
 {
 SubsetMap aAll(nullptr);
 rListBox.clear();
+rListBox.freeze();
 for (auto & subset : aAll.GetSubsetMap())
 rListBox.append_text(subset.GetName());
+rListBox.thaw();
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-06-22 Thread Caolán McNamara
 cui/source/dialogs/colorpicker.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 55ce334d65baebcf523d1a825004d35385c637d0
Author: Caolán McNamara 
Date:   Thu Jun 21 10:48:34 2018 +0100

use Application::GetFrameWeld to tunnel weld::Window through XWindow

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

diff --git a/cui/source/dialogs/colorpicker.cxx 
b/cui/source/dialogs/colorpicker.cxx
index 3b182cde641a..c928c0493e45 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -1301,8 +1301,7 @@ void SAL_CALL ColorPicker::setTitle( const OUString& 
sTitle )
 
 sal_Int16 SAL_CALL ColorPicker::execute()
 {
-VclPtr xWin(VCLUnoHelper::GetWindow(mxParent));
-std::unique_ptr xDlg(new ColorPickerDialog(xWin ? 
xWin->GetFrameWeld() : nullptr, mnColor, mnMode));
+std::unique_ptr xDlg(new 
ColorPickerDialog(Application::GetFrameWeld(mxParent), mnColor, mnMode));
 sal_Int16 ret = xDlg->run();
 if (ret)
 mnColor = xDlg->GetColor();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-06-20 Thread Caolán McNamara
 cui/source/inc/cuitabarea.hxx  |   94 ++---
 cui/source/tabpages/tpcolor.cxx|  419 +++--
 cui/uiconfig/ui/colorpage.ui   |  242 ++
 extras/source/glade/libreoffice-catalog.xml.in |3 
 include/svtools/valueset.hxx   |   15 
 include/svx/Palette.hxx|1 
 include/svx/PaletteManager.hxx |2 
 include/svx/SvxColorValueSet.hxx   |2 
 include/svx/hexcolorcontrol.hxx|   15 
 include/vcl/vclenum.hxx|7 
 include/vcl/weld.hxx   |3 
 sc/source/ui/miscdlgs/tabbgcolordlg.cxx|3 
 svtools/source/control/valueset.cxx|  118 ++-
 svx/inc/palettes.hxx   |3 
 svx/source/dialog/hexcolorcontrol.cxx  |  107 --
 svx/source/tbxctrls/Palette.cxx|   37 ++
 svx/source/tbxctrls/PaletteManager.cxx |   52 +++
 svx/source/tbxctrls/SvxColorValueSet.cxx   |   52 +++
 vcl/source/app/salvtables.cxx  |   26 +
 vcl/source/window/layout.cxx   |4 
 vcl/unx/gtk3/gtk3gtkinst.cxx   |  154 ++---
 21 files changed, 770 insertions(+), 589 deletions(-)

New commits:
commit d148e5c5db3f3ea32abd6f7bed30665a3931e937
Author: Caolán McNamara 
Date:   Mon Jun 18 21:30:10 2018 +0100

weld SvxColorTabPage

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

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 7a72431bb9a5..2c8e55234fe9 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -654,43 +654,6 @@ class SvxColorTabPage : public SfxTabPage
 private:
 VclPtr mpTopDlg;
 
-PaletteManager maPaletteManager;
-VclPtrm_pSelectPalette;
-VclPtr   m_pValSetColorList;
-VclPtr   m_pValSetRecentList;
-
-VclPtrm_pCtlPreviewOld;
-VclPtrm_pCtlPreviewNew;
-
-VclPtrm_pRbRGB;
-VclPtrm_pRbCMYK;
-
-VclPtr   m_pRGBcustom;
-VclPtr   m_pRGBpreset;
-VclPtr   m_pRcustom;
-VclPtr   m_pRpreset;
-VclPtr   m_pGcustom;
-VclPtr   m_pGpreset;
-VclPtr   m_pBcustom;
-VclPtr   m_pBpreset;
-VclPtrm_pHexpreset;
-VclPtrm_pHexcustom;
-
-VclPtr   m_pCMYKcustom;
-VclPtr   m_pCMYKpreset;
-VclPtrm_pCcustom;
-VclPtrm_pCpreset;
-VclPtrm_pYcustom;
-VclPtrm_pYpreset;
-VclPtrm_pMcustom;
-VclPtrm_pMpreset;
-VclPtrm_pKcustom;
-VclPtrm_pKpreset;
-
-VclPtr m_pBtnAdd;
-VclPtr m_pBtnDelete;
-VclPtr m_pBtnWorkOn;
-
 const SfxItemSet&   rOutAttrs;
 
 XColorListRef pColorList;
@@ -705,6 +668,44 @@ private:
 Color   aPreviousColor;
 Color   aCurrentColor;
 
+css::uno::Reference< css::uno::XComponentContext > m_context;
+
+PaletteManager maPaletteManager;
+XRectPreview m_aCtlPreviewOld;
+XRectPreview m_aCtlPreviewNew;
+std::unique_ptr m_xValSetColorList;
+std::unique_ptr m_xValSetRecentList;
+std::unique_ptr m_xSelectPalette;
+std::unique_ptr m_xRbRGB;
+std::unique_ptr m_xRbCMYK;
+std::unique_ptr m_xRGBcustom;
+std::unique_ptr m_xRGBpreset;
+std::unique_ptr m_xRpreset;
+std::unique_ptr m_xGpreset;
+std::unique_ptr m_xBpreset;
+std::unique_ptr m_xRcustom;
+std::unique_ptr m_xGcustom;
+std::unique_ptr m_xBcustom;
+std::unique_ptr m_xHexpreset;
+std::unique_ptr m_xHexcustom;
+std::unique_ptr m_xCMYKcustom;
+std::unique_ptr m_xCMYKpreset;
+std::unique_ptr m_xCpreset;
+std::unique_ptr m_xYpreset;
+std::unique_ptr m_xMpreset;
+std::unique_ptr m_xKpreset;
+std::unique_ptr m_xCcustom;
+std::unique_ptr m_xYcustom;
+std::unique_ptr m_xMcustom;
+std::unique_ptr m_xKcustom;
+std::unique_ptr m_xBtnAdd;
+std::unique_ptr m_xBtnDelete;
+std::unique_ptr m_xBtnWorkOn;
+std::unique_ptr m_xCtlPreviewOld;
+std::unique_ptr m_xCtlPreviewNew;
+std::unique_ptr m_xValSetColorListWin;
+std::unique_ptr m_xValSetRecentListWin;
+
 static voidConvertColorValues (Color& rColor, ColorModel eModell);
 static voidRgbToCmyk_Impl( Color& rColor, sal_uInt16& rK );
 static voidCmykToRgb_Impl( Color& rColor, const sal_uInt16 nKey );
@@ -714,27 +715,28 @@ private:
 void ImpColorCountChanged();
 void FillPaletteLB();
 
-DECL_LINK( ClickAddHdl_Impl, Button*, void );
-DECL_LINK( ClickWorkOnHdl_Impl, Button*, void );
-DECL_LINK( ClickDeleteHdl_Impl, Button*, void );
+DECL_LINK(ClickAddHdl_Impl, weld::Button&, 

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

2018-06-17 Thread Caolán McNamara
 cui/source/inc/page.hxx  |  125 +--
 cui/source/tabpages/page.cxx |  905 +--
 cui/uiconfig/ui/pageformatpage.ui|   85 --
 extras/source/glade/libreoffice-catalog.xml.in   |3 
 include/svx/SvxNumOptionsTabPageHelper.hxx   |4 
 include/svx/frmdirlbox.hxx   |6 
 include/svx/pagenumberlistbox.hxx|   17 
 include/svx/papersizelistbox.hxx |   20 
 include/vcl/weld.hxx |   32 
 solenv/sanitizers/ui/cui.suppr   |4 
 svx/source/dialog/SvxNumOptionsTabPageHelper.cxx |   52 +
 svx/source/dialog/pagectrl.cxx   |2 
 svx/source/dialog/pagenumberlistbox.cxx  |   44 +
 svx/source/dialog/papersizelistbox.cxx   |   50 +
 14 files changed, 699 insertions(+), 650 deletions(-)

New commits:
commit 73b1aeca87d050634bae9194632601561dedec06
Author: Caolán McNamara 
Date:   Fri Jun 15 14:03:31 2018 +0100

weld SvxPageDescPage

Change-Id: I5e2457b51a294cbdacc5c78db4ec0a048567b93d
Reviewed-on: https://gerrit.libreoffice.org/55952
Tested-by: Jenkins
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 7f24edc49514..ab9f1cad1869 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -74,55 +75,7 @@ class SvxPageDescPage : public SfxTabPage
 
 static const sal_uInt16 pRanges[];
 private:
-// paper format
-VclPtrm_pPaperSizeBox;
-
-VclPtr m_pPaperWidthEdit;
-VclPtr m_pPaperHeightEdit;
-
-VclPtr   m_pOrientationFT;
-VclPtr m_pPortraitBtn;
-VclPtr m_pLandscapeBtn;
-
-VclPtr   m_pBspWin;
-
-VclPtr   m_pTextFlowLbl;
-VclPtr  m_pTextFlowBox;
-
-VclPtr m_pPaperTrayBox;
-
-// Margins
-VclPtr   m_pLeftMarginLbl;
-VclPtr m_pLeftMarginEdit;
-VclPtr   m_pRightMarginLbl;
-VclPtr m_pRightMarginEdit;
-VclPtr m_pTopMarginEdit;
-VclPtr m_pBottomMarginEdit;
-
-// layout settings
-VclPtr   m_pPageText;
-VclPtr m_pLayoutBox;
-VclPtr m_pNumberFormatBox;
-
-//Extras Calc
-VclPtr   m_pTblAlignFT;
-VclPtrm_pHorzBox;
-VclPtrm_pVertBox;
-
-// Impress and Draw
-VclPtrm_pAdaptBox;
-
-//Register Writer
-VclPtrm_pRegisterCB;
-VclPtr   m_pRegisterFT;
-VclPtr m_pRegisterLB;
-
-OUString sStandardRegister;
-
-VclPtr   m_pInsideLbl;
-VclPtr   m_pOutsideLbl;
-VclPtr   m_pPrintRangeQueryText;
-
+OUStringsStandardRegister;
 longnFirstLeftMargin;
 longnFirstRightMargin;
 longnFirstTopMargin;
@@ -143,38 +96,76 @@ private:
 boolmbDelPrinter : 1;
 boolmbEnableDrawingLayerFillStyles : 1;
 
+PageWindow m_aBspWin;
+
+// paper format
+std::unique_ptr m_xPaperSizeBox;
+std::unique_ptr m_xPaperWidthEdit;
+std::unique_ptr m_xPaperHeightEdit;
+std::unique_ptr m_xOrientationFT;
+std::unique_ptr m_xPortraitBtn;
+std::unique_ptr m_xLandscapeBtn;
+std::unique_ptr m_xTextFlowLbl;
+std::unique_ptr  m_xTextFlowBox;
+std::unique_ptr m_xPaperTrayBox;
+// Margins
+std::unique_ptr m_xLeftMarginLbl;
+std::unique_ptr m_xLeftMarginEdit;
+std::unique_ptr m_xRightMarginLbl;
+std::unique_ptr m_xRightMarginEdit;
+std::unique_ptr m_xTopMarginEdit;
+std::unique_ptr m_xBottomMarginEdit;
+// layout settings
+std::unique_ptr m_xPageText;
+std::unique_ptr m_xLayoutBox;
+std::unique_ptr m_xNumberFormatBox;
+//Extras Calc
+std::unique_ptr m_xTblAlignFT;
+std::unique_ptr m_xHorzBox;
+std::unique_ptr m_xVertBox;
+// Impress and Draw
+std::unique_ptr m_xAdaptBox;
+//Register Writer
+std::unique_ptr m_xRegisterCB;
+std::unique_ptr m_xRegisterFT;
+std::unique_ptr m_xRegisterLB;
+std::unique_ptr m_xInsideLbl;
+std::unique_ptr m_xOutsideLbl;
+std::unique_ptr m_xPrintRangeQueryText;
+std::unique_ptr m_xBspWin;
+
 voidInit_Impl();
-DECL_LINK(LayoutHdl_Impl, ListBox&, void);
-DECL_LINK(PaperBinHdl_Impl, Control&, void);
-DECL_LINK(SwapOrientation_Impl, Button*, void );
-voidSwapFirstValues_Impl( bool bSet );
-DECL_LINK(BorderModify_Impl, Edit&, void);
-voidInitHeadFoot_Impl( const SfxItemSet& rSet );
-DECL_LINK(CenterHdl_Impl, Button*, void);
-voidUpdateExample_Impl( bool bResetbackground = false );
+

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

2018-06-15 Thread Caolán McNamara
 cui/source/inc/paragrph.hxx  |   60 ++-
 cui/source/tabpages/paragrph.cxx |  558 ---
 cui/uiconfig/ui/paraindentspacing.ui |  143 
 include/svx/relfld.hxx   |   42 ++
 include/vcl/weld.hxx |4 
 solenv/sanitizers/ui/cui.suppr   |4 
 svx/source/dialog/relfld.cxx |   80 +
 7 files changed, 500 insertions(+), 391 deletions(-)

New commits:
commit 903e664735b6bb0d58a16e08db8dfcb3fe52ed94
Author: Caolán McNamara 
Date:   Thu Jun 14 13:05:26 2018 +0100

weld SvxStdParagraphTabPage

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

diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index ed88e4461532..16614656125c 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -51,48 +51,53 @@ class SvxStdParagraphTabPage: public SfxTabPage
 static const sal_uInt16 pStdRanges[];
 
 private:
-SvxStdParagraphTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
+SvxStdParagraphTabPage(TabPageParent pParent, const SfxItemSet& rSet);
+
+longnAbst;
+longnWidth;
+longnMinFixDist;
+boolbRelativeMode;
+OUStringsAbsDist;
+
+ParaPrevWindow m_aExampleWin;
 
 // indention
-VclPtr   m_pLeftIndent;
+std::unique_ptr m_xLeftIndent;
 
-VclPtr  m_pRightLabel;
-VclPtr   m_pRightIndent;
+std::unique_ptr m_xRightLabel;
+std::unique_ptr m_xRightIndent;
 
-VclPtr  m_pFLineLabel;
-VclPtr   m_pFLineIndent;
-VclPtr   m_pAutoCB;
+std::unique_ptr m_xFLineLabel;
+std::unique_ptr m_xFLineIndent;
+std::unique_ptr m_xAutoCB;
 
 // distance
-VclPtr   m_pTopDist;
-VclPtr   m_pBottomDist;
-VclPtr   m_pContextualCB;
+std::unique_ptr m_xTopDist;
+std::unique_ptr m_xBottomDist;
+std::unique_ptr m_xContextualCB;
 
 // line spacing
-VclPtrm_pLineDist;
-VclPtr  m_pLineDistAtLabel;
-VclPtrm_pLineDistAtPercentBox;
-VclPtrm_pLineDistAtMetricBox;
-VclPtr  m_pAbsDist;
-OUStringsAbsDist;
-VclPtr  m_pExampleWin;
+std::unique_ptr m_xLineDist;
+std::unique_ptr m_xLineDistAtPercentBox;
+std::unique_ptr m_xLineDistAtMetricBox;
+std::unique_ptr m_xLineDistAtLabel;
+std::unique_ptr m_xAbsDist;
 
 // only writer
-VclPtr   m_pRegisterFL;
-VclPtr   m_pRegisterCB;
+std::unique_ptr m_xRegisterFL;
+std::unique_ptr m_xRegisterCB;
 
-longnAbst;
-longnWidth;
-longnMinFixDist;
-boolbRelativeMode;
+// preview
+std::unique_ptr m_xExampleWin;
 
 voidSetLineSpacing_Impl( const SvxLineSpacingItem& 
rAttr );
 voidInit_Impl();
 voidUpdateExample_Impl();
+voidELRLoseFocus();
 
-DECL_LINK( LineDistHdl_Impl, ListBox&, void );
-DECL_LINK( ModifyHdl_Impl, Edit&, void );
-DECL_LINK( AutoHdl_Impl, Button*, void );
+DECL_LINK(LineDistHdl_Impl, weld::ComboBoxText&, void);
+DECL_LINK(ModifyHdl_Impl, weld::MetricSpinButton&, void);
+DECL_LINK(AutoHdl_Impl, weld::ToggleButton&, void);
 
 protected:
 virtual voidActivatePage( const SfxItemSet& rSet ) override;
@@ -101,9 +106,8 @@ protected:
 
 public:
 virtual ~SvxStdParagraphTabPage() override;
-virtual void dispose() override;
 
-DECL_LINK(ELRLoseFocusHdl, Control&, void);
+DECL_LINK(ELRLoseFocusHdl, weld::MetricSpinButton&, void);
 
 static VclPtr  Create( TabPageParent pParent, const 
SfxItemSet* rSet );
 static const sal_uInt16* GetRanges() { return pStdRanges; }
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 0fdc536823df..5f3af968def6 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -160,46 +160,53 @@ sal_uInt16 GetHtmlMode_Impl(const SfxItemSet& rSet)
 
 }
 
-IMPL_LINK_NOARG(SvxStdParagraphTabPage, ELRLoseFocusHdl, Control&, void)
+void SvxStdParagraphTabPage::ELRLoseFocus()
 {
 SfxItemPool* pPool = GetItemSet().GetPool();
 DBG_ASSERT( pPool, "Where is the pool?" );
 FieldUnit eUnit =
 MapToFieldUnit( pPool->GetMetric( GetWhich( SID_ATTR_LRSPACE ) ) );
 
-sal_Int64 nL = m_pLeftIndent->Denormalize( m_pLeftIndent->GetValue( eUnit 
) );
-sal_Int64 nR = m_pRightIndent->Denormalize( m_pRightIndent->GetValue( 
eUnit ) );
-OUString aTmp = m_pFLineIndent->GetText();
+sal_Int64 nL = 

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

2018-06-14 Thread Caolán McNamara
 cui/source/inc/paragrph.hxx   |   41 ++---
 cui/source/tabpages/paragrph.cxx  |  308 +-
 cui/uiconfig/ui/paragalignpage.ui |  115 +-
 include/svx/frmdirlbox.hxx|1 
 4 files changed, 205 insertions(+), 260 deletions(-)

New commits:
commit 575a9bb4cd3952ed39aaccb83a5d6761ea082601
Author: Caolán McNamara 
Date:   Thu Jun 14 11:07:20 2018 +0100

weld SvxParaAlignTabPage

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

diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index 569f5c082b23..ed88e4461532 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -130,36 +130,38 @@ class SvxParaAlignTabPage : public SfxTabPage
 using TabPage::DeactivatePage;
 static const sal_uInt16 pAlignRanges[];
 
+ParaPrevWindow m_aExampleWin;
+
 // alignment
-VclPtr m_pLeft;
-VclPtr m_pRight;
-VclPtr m_pCenter;
-VclPtr m_pJustify;
-VclPtr   m_pLeftBottom;
-VclPtr   m_pRightTop;
+std::unique_ptr m_xLeft;
+std::unique_ptr m_xRight;
+std::unique_ptr m_xCenter;
+std::unique_ptr m_xJustify;
+std::unique_ptr m_xLeftBottom;
+std::unique_ptr m_xRightTop;
 
-VclPtr   m_pLastLineFT;
-VclPtr m_pLastLineLB;
-VclPtrm_pExpandCB;
+std::unique_ptr m_xLastLineFT;
+std::unique_ptr m_xLastLineLB;
+std::unique_ptr m_xExpandCB;
 
-VclPtrm_pSnapToGridCB;
+std::unique_ptr m_xSnapToGridCB;
 
 //preview
-VclPtr   m_pExampleWin;
+std::unique_ptr m_xExampleWin;
 //vertical alignment
-VclPtrm_pVertAlignFL;
-VclPtr m_pVertAlignLB;
+std::unique_ptr m_xVertAlignFL;
+std::unique_ptr m_xVertAlignLB;
 
-VclPtrm_pPropertiesFL;
-VclPtr  m_pTextDirectionLB;
+std::unique_ptr m_xPropertiesFL;
+std::unique_ptr  m_xTextDirectionLB;
 
-DECL_LINK(AlignHdl_Impl, Button*, void);
-DECL_LINK(LastLineHdl_Impl, ListBox&, void);
-DECL_LINK(TextDirectionHdl_Impl, ListBox&, void);
+DECL_LINK(AlignHdl_Impl, weld::ToggleButton&, void);
+DECL_LINK(LastLineHdl_Impl, weld::ComboBoxText&, void);
+DECL_LINK(TextDirectionHdl_Impl, weld::ComboBoxText&, void);
 
 voidUpdateExample_Impl();
 
-SvxParaAlignTabPage( vcl::Window* pParent, const 
SfxItemSet& rSet );
+SvxParaAlignTabPage(TabPageParent pParent, const SfxItemSet& rSet);
 
 protected:
 virtual voidActivatePage( const SfxItemSet& rSet ) override;
@@ -167,7 +169,6 @@ protected:
 
 public:
 virtual ~SvxParaAlignTabPage() override;
-virtual void dispose() override;
 
 static VclPtr  Create( TabPageParent pParent, const 
SfxItemSet* rSet );
 static const sal_uInt16* GetRanges() { return pAlignRanges; }
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index a3f25820739b..0fdc536823df 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -1016,29 +1016,24 @@ voidSvxStdParagraphTabPage::PageCreated(const 
SfxAllItemSet& aSet)
 #define LASTLINECOUNT_OLD   3
 #define LASTLINECOUNT_NEW   4
 
-SvxParaAlignTabPage::SvxParaAlignTabPage( vcl::Window* pParent, const 
SfxItemSet& rSet )
-
-: SfxTabPage(pParent, "ParaAlignPage", "cui/ui/paragalignpage.ui",)
+SvxParaAlignTabPage::SvxParaAlignTabPage(TabPageParent pParent, const 
SfxItemSet& rSet)
+: SfxTabPage(pParent, "cui/ui/paragalignpage.ui", "ParaAlignPage", )
+, m_xLeft(m_xBuilder->weld_radio_button("radioBTN_LEFTALIGN"))
+, m_xRight(m_xBuilder->weld_radio_button("radioBTN_RIGHTALIGN"))
+, m_xCenter(m_xBuilder->weld_radio_button("radioBTN_CENTERALIGN"))
+, m_xJustify(m_xBuilder->weld_radio_button("radioBTN_JUSTIFYALIGN"))
+, m_xLeftBottom(m_xBuilder->weld_label("labelST_LEFTALIGN_ASIAN"))
+, m_xRightTop(m_xBuilder->weld_label("labelST_RIGHTALIGN_ASIAN"))
+, m_xLastLineFT(m_xBuilder->weld_label("labelLB_LASTLINE"))
+, m_xLastLineLB(m_xBuilder->weld_combo_box_text("comboLB_LASTLINE"))
+, m_xExpandCB(m_xBuilder->weld_check_button("checkCB_EXPAND"))
+, m_xSnapToGridCB(m_xBuilder->weld_check_button("checkCB_SNAP"))
+, m_xExampleWin(new weld::CustomWeld(*m_xBuilder, "drawingareaWN_EXAMPLE", 
m_aExampleWin))
+, m_xVertAlignFL(m_xBuilder->weld_widget("frameFL_VERTALIGN"))
+, m_xVertAlignLB(m_xBuilder->weld_combo_box_text("comboLB_VERTALIGN"))
+, m_xPropertiesFL(m_xBuilder->weld_widget("framePROPERTIES"))
+, m_xTextDirectionLB(new 
svx::SvxFrameDirectionListBox(m_xBuilder->weld_combo_box_text("comboLB_TEXTDIRECTION")))
 {
-get(m_pLeft,"radioBTN_LEFTALIGN");

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

2018-06-14 Thread Caolán McNamara
 cui/source/inc/paragrph.hxx  |   82 ++---
 cui/source/tabpages/paragrph.cxx |  638 +--
 cui/uiconfig/ui/textflowpage.ui  |   41 ++
 3 files changed, 363 insertions(+), 398 deletions(-)

New commits:
commit 8f72549ce32c522ca951b7f53c2beedc7b4dcc7a
Author: Caolán McNamara 
Date:   Wed Jun 13 21:26:35 2018 +0100

weld SvxExtParagraphTabPage

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

diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index 648394ae4690..569f5c082b23 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -202,7 +202,6 @@ class SvxExtParagraphTabPage: public SfxTabPage
 
 public:
 virtual ~SvxExtParagraphTabPage() override;
-virtual void dispose() override;
 
 static VclPtr  Create( TabPageParent pParent,
 const SfxItemSet* rSet );
@@ -218,59 +217,58 @@ protected:
 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
 private:
-SvxExtParagraphTabPage( vcl::Window* pParent, const 
SfxItemSet& rSet );
+SvxExtParagraphTabPage(TabPageParent pParent, const SfxItemSet& rSet);
+
+boolbPageBreak;
+boolbHtmlMode;
+sal_uInt16  nStdPos;
 
 // hyphenation
-VclPtrm_pHyphenBox;
-VclPtr  m_pBeforeText;
-VclPtr   m_pExtHyphenBeforeBox;
-VclPtr  m_pAfterText;
-VclPtr   m_pExtHyphenAfterBox;
-VclPtr  m_pMaxHyphenLabel;
-VclPtr   m_pMaxHyphenEdit;
+std::unique_ptr m_xHyphenBox;
+std::unique_ptr m_xBeforeText;
+std::unique_ptr m_xExtHyphenBeforeBox;
+std::unique_ptr m_xAfterText;
+std::unique_ptr m_xExtHyphenAfterBox;
+std::unique_ptr m_xMaxHyphenLabel;
+std::unique_ptr m_xMaxHyphenEdit;
 
 // pagebreak
-VclPtrm_pPageBreakBox;
-VclPtr  m_pBreakTypeFT;
-VclPtrm_pBreakTypeLB;
-VclPtr  m_pBreakPositionFT;
-VclPtrm_pBreakPositionLB;
-VclPtrm_pApplyCollBtn;
-VclPtrm_pApplyCollBox;
-VclPtrm_pPageNumBox;
-VclPtr   m_pPagenumEdit;
+std::unique_ptr m_xPageBreakBox;
+std::unique_ptr m_xBreakTypeFT;
+std::unique_ptr m_xBreakTypeLB;
+std::unique_ptr m_xBreakPositionFT;
+std::unique_ptr m_xBreakPositionLB;
+std::unique_ptr m_xApplyCollBtn;
+std::unique_ptr m_xApplyCollBox;
+std::unique_ptr m_xPageNumBox;
+std::unique_ptr m_xPagenumEdit;
 
 // paragraph division
-VclPtrm_pKeepTogetherBox;
-VclPtrm_pKeepParaBox;
+std::unique_ptr m_xKeepTogetherBox;
+std::unique_ptr m_xKeepParaBox;
 
 // orphan/widow
-VclPtrm_pOrphanBox;
-VclPtr   m_pOrphanRowNo;
-VclPtr  m_pOrphanRowLabel;
-
-VclPtrm_pWidowBox;
-VclPtr   m_pWidowRowNo;
-VclPtr  m_pWidowRowLabel;
-
-boolbPageBreak;
-boolbHtmlMode;
-sal_uInt16  nStdPos;
-
-DECL_LINK(PageBreakHdl_Impl, Button*, void);
-DECL_LINK(KeepTogetherHdl_Impl, Button*, void);
-DECL_LINK(WidowHdl_Impl, Button*, void);
-DECL_LINK(OrphanHdl_Impl, Button*, void);
-DECL_LINK(HyphenClickHdl_Impl, Button*, void);
-DECL_LINK(ApplyCollClickHdl_Impl, Button*, void);
-DECL_LINK( PageBreakPosHdl_Impl, ListBox&, void );
-DECL_LINK( PageBreakTypeHdl_Impl, ListBox&, void );
-DECL_LINK(PageNumBoxClickHdl_Impl, Button*, void);
+std::unique_ptr m_xOrphanBox;
+std::unique_ptr m_xOrphanRowNo;
+std::unique_ptr m_xOrphanRowLabel;
+
+std::unique_ptr m_xWidowBox;
+std::unique_ptr m_xWidowRowNo;
+std::unique_ptr m_xWidowRowLabel;
+
+DECL_LINK(PageBreakHdl_Impl, weld::ToggleButton&, void);
+DECL_LINK(KeepTogetherHdl_Impl, weld::ToggleButton&, void);
+DECL_LINK(WidowHdl_Impl, weld::ToggleButton&, void);
+DECL_LINK(OrphanHdl_Impl, weld::ToggleButton&, void);
+DECL_LINK(HyphenClickHdl_Impl, weld::ToggleButton&, void);
+DECL_LINK(ApplyCollClickHdl_Impl, weld::ToggleButton&, void);
+DECL_LINK(PageBreakPosHdl_Impl, weld::ComboBoxText&, void);
+DECL_LINK(PageBreakTypeHdl_Impl, weld::ComboBoxText&, void);
+DECL_LINK(PageNumBoxClickHdl_Impl, weld::ToggleButton&, void);
 
 virtual voidPageCreated(const SfxAllItemSet& aSet) override;
 };
 
-
 class SvxAsianTabPage : public SfxTabPage
 {
 friend class VclPtr;
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 96b0f6706107..a3f25820739b 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -1390,23 +1390,22 @@ void SvxParaAlignTabPage::PageCreated (const 
SfxAllItemSet& aSet)
 EnableJustifyExt();
 }
 

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

2018-06-14 Thread Caolán McNamara
 cui/source/inc/paragrph.hxx  |   14 ++-
 cui/source/tabpages/paragrph.cxx |   72 +--
 2 files changed, 30 insertions(+), 56 deletions(-)

New commits:
commit 41e5231bf6089f639944c13ba915162b0ba784e6
Author: Caolán McNamara 
Date:   Wed Jun 13 21:07:53 2018 +0100

weld SvxAsianTabPage

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

diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index e46168ddf192..648394ae4690 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -275,20 +275,16 @@ class SvxAsianTabPage : public SfxTabPage
 {
 friend class VclPtr;
 
-VclPtr m_pForbiddenRulesCB;
-VclPtr m_pHangingPunctCB;
-VclPtr m_pScriptSpaceCB;
+std::unique_ptr m_xForbiddenRulesCB;
+std::unique_ptr m_xHangingPunctCB;
+std::unique_ptr m_xScriptSpaceCB;
 
-SvxAsianTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
-
-DECL_STATIC_LINK( SvxAsianTabPage, ClickHdl_Impl, Button*, void );
+SvxAsianTabPage(TabPageParent pParent, const SfxItemSet& rSet);
 
 public:
 virtual ~SvxAsianTabPage() override;
-virtual void dispose() override;
 
-static VclPtr  Create( TabPageParent pParent,
-const SfxItemSet* rSet );
+static VclPtr  Create(TabPageParent pParent, const SfxItemSet* 
rSet);
 static const sal_uInt16*  GetRanges();
 
 virtual boolFillItemSet( SfxItemSet* rSet ) override;
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 1b48ca731dc0..96b0f6706107 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -2239,37 +2239,21 @@ void SvxExtParagraphTabPage::PageCreated(const 
SfxAllItemSet& aSet)
 DisablePageBreak();
 }
 
-SvxAsianTabPage::SvxAsianTabPage( vcl::Window* pParent, const SfxItemSet& rSet 
) :
-SfxTabPage(pParent, "AsianTypography","cui/ui/asiantypography.ui", )
-
+SvxAsianTabPage::SvxAsianTabPage(TabPageParent pParent, const SfxItemSet& rSet)
+: SfxTabPage(pParent, "cui/ui/asiantypography.ui", "AsianTypography", 
)
+, m_xForbiddenRulesCB(m_xBuilder->weld_check_button("checkForbidList"))
+, m_xHangingPunctCB(m_xBuilder->weld_check_button("checkHangPunct"))
+, m_xScriptSpaceCB(m_xBuilder->weld_check_button("checkApplySpacing"))
 {
-get(m_pForbiddenRulesCB,"checkForbidList");
-get(m_pHangingPunctCB,"checkHangPunct");
-get(m_pScriptSpaceCB,"checkApplySpacing");
-
-Link aLink = LINK( this, SvxAsianTabPage, ClickHdl_Impl );
-m_pHangingPunctCB->SetClickHdl( aLink );
-m_pScriptSpaceCB->SetClickHdl( aLink );
-m_pForbiddenRulesCB->SetClickHdl( aLink );
-
 }
 
 SvxAsianTabPage::~SvxAsianTabPage()
 {
-disposeOnce();
 }
 
-void SvxAsianTabPage::dispose()
+VclPtr SvxAsianTabPage::Create(TabPageParent pParent, const 
SfxItemSet* rSet)
 {
-m_pForbiddenRulesCB.clear();
-m_pHangingPunctCB.clear();
-m_pScriptSpaceCB.clear();
-SfxTabPage::dispose();
-}
-
-VclPtr SvxAsianTabPage::Create( TabPageParent pParent, const 
SfxItemSet* rSet )
-{
-return VclPtr::Create(pParent.pParent, *rSet);
+return VclPtr::Create(pParent, *rSet);
 }
 
 const sal_uInt16* SvxAsianTabPage::GetRanges()
@@ -2286,66 +2270,60 @@ bool SvxAsianTabPage::FillItemSet( SfxItemSet* rSet )
 {
 bool bRet = false;
 SfxItemPool* pPool = rSet->GetPool();
-if (m_pScriptSpaceCB->IsEnabled() && 
m_pScriptSpaceCB->IsValueChangedFromSaved())
+if (m_xScriptSpaceCB->get_sensitive() && 
m_xScriptSpaceCB->get_state_changed_from_saved())
 {
 std::unique_ptr 
pNewItem(static_cast(rSet->Get(
 pPool->GetWhich(SID_ATTR_PARA_SCRIPTSPACE)).Clone()));
-pNewItem->SetValue(m_pScriptSpaceCB->IsChecked());
+pNewItem->SetValue(m_xScriptSpaceCB->get_active());
 rSet->Put(*pNewItem);
 bRet = true;
 }
-if (m_pHangingPunctCB->IsEnabled() && 
m_pHangingPunctCB->IsValueChangedFromSaved())
+if (m_xHangingPunctCB->get_sensitive() && 
m_xHangingPunctCB->get_state_changed_from_saved())
 {
 std::unique_ptr 
pNewItem(static_cast(rSet->Get(
 pPool->GetWhich(SID_ATTR_PARA_HANGPUNCTUATION)).Clone()));
-pNewItem->SetValue(m_pHangingPunctCB->IsChecked());
+pNewItem->SetValue(m_xHangingPunctCB->get_active());
 rSet->Put(*pNewItem);
 bRet = true;
 }
-if (m_pForbiddenRulesCB->IsEnabled() && 
m_pForbiddenRulesCB->IsValueChangedFromSaved())
+if (m_xForbiddenRulesCB->get_sensitive() && 
m_xForbiddenRulesCB->get_state_changed_from_saved())
 {
 std::unique_ptr 
pNewItem(static_cast(rSet->Get(
 pPool->GetWhich(SID_ATTR_PARA_FORBIDDEN_RULES)).Clone()));
-pNewItem->SetValue(m_pForbiddenRulesCB->IsChecked());

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

2018-06-14 Thread Caolán McNamara
 cui/source/inc/chardlg.hxx  |   23 +++
 cui/source/tabpages/chardlg.cxx |  130 +---
 cui/uiconfig/ui/twolinespage.ui |  117 ++--
 include/vcl/builder.hxx |2 
 vcl/source/window/builder.cxx   |   12 +++
 5 files changed, 164 insertions(+), 120 deletions(-)

New commits:
commit fa5f3096c9f669a063fe81325b5b47c6903d94a5
Author: Caolán McNamara 
Date:   Wed Jun 13 16:31:39 2018 +0100

weld SvxCharTwoLinesPage

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

diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index fd46e3c3c334..489ea991b5a4 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -354,32 +354,31 @@ public:
 
 // class SvxCharTwoLinesPage -
 
-class SvxCharTwoLinesPage : public SvxCharBasePage
+class SvxCharTwoLinesPage : public CharBasePage
 {
 friend class VclPtr;
 private:
 static const sal_uInt16 pTwoLinesRanges[];
-VclPtr   m_pTwoLinesBtn;
-VclPtr   m_pEnclosingFrame;
-VclPtrm_pStartBracketLB;
-VclPtrm_pEndBracketLB;
-
 sal_uInt16  m_nStartBracketPosition;
 sal_uInt16  m_nEndBracketPosition;
 
-SvxCharTwoLinesPage(vcl::Window* pParent, const SfxItemSet& rSet);
+std::unique_ptr  m_xTwoLinesBtn;
+std::unique_ptr m_xEnclosingFrame;
+std::unique_ptr m_xStartBracketLB;
+std::unique_ptr m_xEndBracketLB;
+
+SvxCharTwoLinesPage(TabPageParent pParent, const SfxItemSet& rSet);
 
 voidUpdatePreview_Impl();
 voidInitialize();
-voidSelectCharacter( ListBox* pBox );
-voidSetBracket( sal_Unicode cBracket, bool bStart );
+voidSelectCharacter(weld::TreeView* pBox);
+voidSetBracket(sal_Unicode cBracket, bool bStart);
 
-DECL_LINK(TwoLinesHdl_Impl, Button*, void);
-DECL_LINK(CharacterMapHdl_Impl, ListBox&, void );
+DECL_LINK(TwoLinesHdl_Impl, weld::ToggleButton&, void);
+DECL_LINK(CharacterMapHdl_Impl, weld::TreeView&, void);
 
 public:
 virtual ~SvxCharTwoLinesPage() override;
-virtual void dispose() override;
 
 using SfxTabPage::ActivatePage;
 using SfxTabPage::DeactivatePage;
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 22422651f504..c2b7a78eda83 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -3130,45 +3130,33 @@ void SvxCharPositionPage::PageCreated(const 
SfxAllItemSet& aSet)
 }
 // class SvxCharTwoLinesPage 
 
-SvxCharTwoLinesPage::SvxCharTwoLinesPage(vcl::Window* pParent, const 
SfxItemSet& rInSet)
-: SvxCharBasePage(pParent, "TwoLinesPage", "cui/ui/twolinespage.ui", 
rInSet)
+SvxCharTwoLinesPage::SvxCharTwoLinesPage(TabPageParent pParent, const 
SfxItemSet& rInSet)
+: CharBasePage(pParent, "cui/ui/twolinespage.ui", "TwoLinesPage", rInSet)
 , m_nStartBracketPosition( 0 )
 , m_nEndBracketPosition( 0 )
+, m_xTwoLinesBtn(m_xBuilder->weld_check_button("twolines"))
+, m_xEnclosingFrame(m_xBuilder->weld_widget("enclosing"))
+, m_xStartBracketLB(m_xBuilder->weld_tree_view("startbracket"))
+, m_xEndBracketLB(m_xBuilder->weld_tree_view("endbracket"))
 {
-get(m_pTwoLinesBtn, "twolines");
-get(m_pEnclosingFrame, "enclosing");
-get(m_pStartBracketLB, "startbracket");
-get(m_pEndBracketLB, "endbracket");
-
-get(m_pPreviewWin, "preview");
-
+m_xPreviewWin.reset(new weld::CustomWeld(*m_xBuilder, "preview", 
m_aPreviewWin));
 Initialize();
 }
 
 SvxCharTwoLinesPage::~SvxCharTwoLinesPage()
 {
-disposeOnce();
-}
-
-void SvxCharTwoLinesPage::dispose()
-{
-m_pTwoLinesBtn.clear();
-m_pEnclosingFrame.clear();
-m_pStartBracketLB.clear();
-m_pEndBracketLB.clear();
-SvxCharBasePage::dispose();
 }
 
 void SvxCharTwoLinesPage::Initialize()
 {
-m_pTwoLinesBtn->Check( false );
-TwoLinesHdl_Impl( nullptr );
+m_xTwoLinesBtn->set_active(false);
+TwoLinesHdl_Impl(*m_xTwoLinesBtn);
 
-m_pTwoLinesBtn->SetClickHdl( LINK( this, SvxCharTwoLinesPage, 
TwoLinesHdl_Impl ) );
+m_xTwoLinesBtn->connect_toggled(LINK(this, SvxCharTwoLinesPage, 
TwoLinesHdl_Impl));
 
-Link aLink = LINK( this, SvxCharTwoLinesPage, 
CharacterMapHdl_Impl );
-m_pStartBracketLB->SetSelectHdl( aLink );
-m_pEndBracketLB->SetSelectHdl( aLink );
+Link aLink = LINK(this, SvxCharTwoLinesPage, 
CharacterMapHdl_Impl);
+m_xStartBracketLB->connect_changed(aLink);
+m_xEndBracketLB->connect_changed(aLink);
 
 SvxFont& rFont = GetPreviewFont();
 SvxFont& rCJKFont = GetPreviewCJKFont();
@@ -3178,10 +3166,9 @@ void 

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

2018-06-13 Thread Caolán McNamara
 cui/source/inc/chardlg.hxx  |   97 ++-
 cui/source/tabpages/chardlg.cxx |  459 +-
 cui/uiconfig/ui/positionpage.ui |   71 ++
 include/sfx2/dialoghelper.hxx   |2 
 include/svx/fntctrl.hxx |   58 ++
 include/vcl/weld.hxx|   14 
 sfx2/source/dialog/dialoghelper.cxx |4 
 solenv/sanitizers/ui/cui.suppr  |1 
 svtools/source/control/valueset.cxx |2 
 svx/source/dialog/dlgctrl.cxx   |3 
 svx/source/dialog/fntctrl.cxx   |  909 +++-
 svx/source/dialog/measctrl.cxx  |2 
 12 files changed, 1332 insertions(+), 290 deletions(-)

New commits:
commit e10cd7f66af779347f428425f89fdd225ba5cc2e
Author: Caolán McNamara 
Date:   Wed Jun 13 14:40:15 2018 +0100

weld SvxCharPositionPage

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

diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index 144b13e94513..fd46e3c3c334 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 // forward ---
@@ -62,6 +63,33 @@ public:
 
 };
 
+class CharBasePage : public SfxTabPage
+{
+protected:
+FontPrevWindow   m_aPreviewWin;
+std::unique_ptr m_xPreviewWin;
+
+boolm_bPreviewBackgroundToCharacter;
+
+CharBasePage(TabPageParent pParent, const OUString& rUIXMLDescription, 
const OString& rID, const SfxItemSet& rAttrSet);
+
+void SetPrevFontWidthScale( const SfxItemSet& rSet );
+void SetPrevFontEscapement( sal_uInt8 nProp, sal_uInt8 nEscProp, short 
nEsc );
+
+inline SvxFont& GetPreviewFont();
+inline SvxFont& GetPreviewCJKFont();
+inline SvxFont& GetPreviewCTLFont();
+
+public:
+virtual ~CharBasePage() override;
+
+using SfxTabPage::ActivatePage;
+using SfxTabPage::DeactivatePage;
+
+virtual voidActivatePage( const SfxItemSet& rSet ) override;
+
+};
+
 // class SvxCharNamePage -
 
 struct SvxCharNamePage_Impl;
@@ -252,35 +280,12 @@ public:
 // class SvxCharPositionPage -
 
 
-class SvxCharPositionPage : public SvxCharBasePage
+class SvxCharPositionPage : public CharBasePage
 {
 friend class VclPtr;
 static const sal_uInt16 pPositionRanges[];
 
 private:
-VclPtrm_pHighPosBtn;
-VclPtrm_pNormalPosBtn;
-VclPtrm_pLowPosBtn;
-VclPtr  m_pHighLowFT;
-VclPtrm_pHighLowMF;
-VclPtr   m_pHighLowRB;
-VclPtr  m_pFontSizeFT;
-VclPtrm_pFontSizeMF;
-
-VclPtr   m_pRotationContainer;
-
-VclPtr  m_pScalingFT;
-VclPtr  m_pScalingAndRotationFT;
-VclPtrm_p0degRB;
-VclPtrm_p90degRB;
-VclPtrm_p270degRB;
-VclPtr   m_pFitToLineCB;
-
-VclPtrm_pScaleWidthMF;
-
-VclPtrm_pKerningMF;
-VclPtr   m_pPairKerningBtn;
-
 short   m_nSuperEsc;
 short   m_nSubEsc;
 
@@ -290,25 +295,47 @@ private:
 sal_uInt8m_nSuperProp;
 sal_uInt8m_nSubProp;
 
-SvxCharPositionPage( vcl::Window* pParent, const 
SfxItemSet& rSet );
+std::unique_ptr m_xHighPosBtn;
+std::unique_ptr m_xNormalPosBtn;
+std::unique_ptr m_xLowPosBtn;
+std::unique_ptr m_xHighLowFT;
+std::unique_ptr m_xHighLowMF;
+std::unique_ptr m_xHighLowRB;
+std::unique_ptr m_xFontSizeFT;
+std::unique_ptr m_xFontSizeMF;
+
+std::unique_ptr m_xRotationContainer;
+
+std::unique_ptr m_xScalingFT;
+std::unique_ptr m_xScalingAndRotationFT;
+std::unique_ptr m_x0degRB;
+std::unique_ptr m_x90degRB;
+std::unique_ptr m_x270degRB;
+std::unique_ptr m_xFitToLineCB;
+
+std::unique_ptr m_xScaleWidthMF;
+
+std::unique_ptr m_xKerningMF;
+std::unique_ptr m_xPairKerningBtn;
+
+SvxCharPositionPage(TabPageParent pParent, const 
SfxItemSet& rSet);
 
 voidInitialize();
 voidUpdatePreview_Impl( sal_uInt8 nProp, sal_uInt8 
nEscProp, short nEsc );
 voidSetEscapement_Impl( SvxEscapement nEsc );
 
-DECL_LINK(PositionHdl_Impl, Button*, void );
-DECL_LINK(RotationHdl_Impl, Button*, void );
-DECL_LINK(FontModifyHdl_Impl, Edit&, void );
-DECL_LINK(AutoPositionHdl_Impl, Button*, void );
-DECL_LINK(FitToLineHdl_Impl, Button*, void );
-DECL_LINK(KerningSelectHdl_Impl, ListBox&, void );
-DECL_LINK(KerningModifyHdl_Impl, Edit&, void );
-DECL_LINK(LoseFocusHdl_Impl, Control&, void );
-DECL_LINK(

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

2018-06-12 Thread Caolán McNamara
 cui/source/inc/cuitabarea.hxx  |   65 +++---
 cui/source/tabpages/tptrans.cxx|  352 +++--
 cui/uiconfig/ui/transparencytabpage.ui |  162 ++-
 include/svx/dlgctrl.hxx|   51 
 include/vcl/customweld.hxx |1 
 svx/source/dialog/dlgctrl.cxx  |  149 +
 6 files changed, 511 insertions(+), 269 deletions(-)

New commits:
commit f8480defc137d0eb9f9cd20294909546c2cfc598
Author: Caolán McNamara 
Date:   Tue Jun 12 11:22:15 2018 +0100

weld SvxTransparenceTabPage

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

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index da368bf460e0..7a72431bb9a5 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -146,42 +146,48 @@ class SvxTransparenceTabPage : public SvxTabPage
 PageType   nPageType;
 sal_uInt16 nDlgType;
 
+boolbBitmap;
+
+XFillAttrSetItemaXFillAttr;
+SfxItemSet& rXFSet;
+
+XRectPreview m_aCtlBitmapPreview;
+XRectPreview m_aCtlXRectPreview;
+
 // main selection
-VclPtrm_pRbtTransOff;
-VclPtrm_pRbtTransLinear;
-VclPtrm_pRbtTransGradient;
+std::unique_ptr m_xRbtTransOff;
+std::unique_ptr m_xRbtTransLinear;
+std::unique_ptr m_xRbtTransGradient;
 
 /// linear transparency
-VclPtrm_pMtrTransparent;
+std::unique_ptr m_xMtrTransparent;
 
 // gradient transparency
-VclPtrm_pGridGradient;
-VclPtrm_pLbTrgrGradientType;
-VclPtr  m_pFtTrgrCenterX;
-VclPtrm_pMtrTrgrCenterX;
-VclPtr  m_pFtTrgrCenterY;
-VclPtrm_pMtrTrgrCenterY;
-VclPtr  m_pFtTrgrAngle;
-VclPtrm_pMtrTrgrAngle;
-VclPtrm_pMtrTrgrBorder;
-VclPtrm_pMtrTrgrStartValue;
-VclPtrm_pMtrTrgrEndValue;
+std::unique_ptr m_xGridGradient;
+std::unique_ptr m_xLbTrgrGradientType;
+std::unique_ptr m_xFtTrgrCenterX;
+std::unique_ptr m_xMtrTrgrCenterX;
+std::unique_ptr m_xFtTrgrCenterY;
+std::unique_ptr m_xMtrTrgrCenterY;
+std::unique_ptr m_xFtTrgrAngle;
+std::unique_ptr m_xMtrTrgrAngle;
+std::unique_ptr m_xMtrTrgrBorder;
+std::unique_ptr m_xMtrTrgrStartValue;
+std::unique_ptr m_xMtrTrgrEndValue;
+std::unique_ptr m_xCtlBitmapBorder;
+std::unique_ptr m_xCtlXRectBorder;
 
 // preview
-VclPtrm_pCtlBitmapPreview;
-VclPtrm_pCtlXRectPreview;
-boolbBitmap;
-
-XFillAttrSetItemaXFillAttr;
-SfxItemSet& rXFSet;
+std::unique_ptr m_xCtlBitmapPreview;
+std::unique_ptr m_xCtlXRectPreview;
 
-DECL_LINK(ClickTransOffHdl_Impl, Button*, void );
-DECL_LINK(ClickTransLinearHdl_Impl, Button*, void );
-DECL_LINK(ClickTransGradientHdl_Impl, Button*, void );
-DECL_LINK(ModifyTransparentHdl_Impl, Edit&, void);
-DECL_LINK(ModifiedTrgrEditHdl_Impl, Edit&, void);
-DECL_LINK(ModifiedTrgrListBoxHdl_Impl, ListBox&, void);
-void ModifiedTrgrHdl_Impl(void const *);
+DECL_LINK(ClickTransOffHdl_Impl, weld::ToggleButton&, void);
+DECL_LINK(ClickTransLinearHdl_Impl, weld::ToggleButton&, void);
+DECL_LINK(ClickTransGradientHdl_Impl, weld::ToggleButton&, void );
+DECL_LINK(ModifyTransparentHdl_Impl, weld::MetricSpinButton&, void);
+DECL_LINK(ModifiedTrgrEditHdl_Impl, weld::MetricSpinButton&, void);
+DECL_LINK(ModifiedTrgrListBoxHdl_Impl, weld::ComboBoxText&, void);
+void ModifiedTrgrHdl_Impl(const weld::ComboBoxText*);
 
 void ActivateLinear(bool bActivate);
 void ActivateGradient(bool bActivate);
@@ -191,9 +197,8 @@ class SvxTransparenceTabPage : public SvxTabPage
 void InvalidatePreview (bool bEnable = true );
 
 public:
-SvxTransparenceTabPage(vcl::Window* pParent, const SfxItemSet& rInAttrs);
+SvxTransparenceTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs);
 virtual ~SvxTransparenceTabPage() override;
-virtual void dispose() override;
 
 static VclPtr Create(TabPageParent, const SfxItemSet*);
 static const sal_uInt16* GetRanges() { return pTransparenceRanges; }
diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx
index 1f6fc20da7dd..f75416c0c94b 100644
--- a/cui/source/tabpages/tptrans.cxx
+++ b/cui/source/tabpages/tptrans.cxx
@@ -59,22 +59,22 @@ const sal_uInt16 
SvxTransparenceTabPage::pTransparenceRanges[] =
 |*
 \/
 
-IMPL_LINK_NOARG(SvxTransparenceTabPage, ClickTransOffHdl_Impl, Button*, void)
+IMPL_LINK_NOARG(SvxTransparenceTabPage, ClickTransOffHdl_Impl, 
weld::ToggleButton&, void)
 {
 // disable all other controls
 

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

2018-06-05 Thread Miklos Vajna
 cui/source/options/personalization.cxx |8 +---
 cui/source/options/personalization.hxx |4 +++-
 2 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 400137b1d36e4296e4e297a4c570933e6572b38c
Author: Miklos Vajna 
Date:   Mon Jun 4 16:28:22 2018 +0200

tdf#117866 cui: avoid deadlock in personalization dialog

The deadlock happened as the main thread wanted to join
SearchAndParseThread (while owning the solar mutex), but
SearchAndParseThread wanted to take the solar mutex to import a graphic.

Fix the deadlock by checking for the termination flag earlier, so we
don't take any new mutexes if termination was requested already.

(cherry picked from commit 766c85a4f67f5d50645340e31cebd5956998c6fc)

Related: tdf#117866 cui: use std::atomic for thread termination flag

(cherry picked from commit f4ac7b5a084a7cf483bb89a2fa411f9df70df4d0)

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

diff --git a/cui/source/options/personalization.cxx 
b/cui/source/options/personalization.cxx
index d05775e93a53..7b4cf6807170 100644
--- a/cui/source/options/personalization.cxx
+++ b/cui/source/options/personalization.cxx
@@ -778,14 +778,16 @@ void SearchAndParseThread::execute()
 continue;
 }
 INetURLObject aURLObj( sPreviewFile );
+
+// Stop the thread if requested -- before taking the solar mutex.
+if( !m_bExecute )
+return;
+
 // for VCL to be able to create bitmaps / do visual changes in the 
thread
 SolarMutexGuard aGuard;
 aFilter.ImportGraphic( aGraphic, aURLObj );
 Bitmap aBmp = aGraphic.GetBitmap();
 
-if( !m_bExecute )
-return;
-
 m_pPersonaDialog->SetImages( Image( aBmp ), nIndex++ );
 m_pPersonaDialog->setOptimalLayoutSize();
 m_pPersonaDialog->AddPersonaSetting( aPersonaSetting );
diff --git a/cui/source/options/personalization.hxx 
b/cui/source/options/personalization.hxx
index 1f1e1f1e77ca..aae43240ea80 100644
--- a/cui/source/options/personalization.hxx
+++ b/cui/source/options/personalization.hxx
@@ -16,6 +16,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define CATEGORYCOUNT 6// Number of persona categories
 
@@ -119,7 +120,8 @@ private:
 
 VclPtr m_pPersonaDialog;
 OUString m_aURL;
-bool m_bExecute, m_bDirectURL;
+std::atomic m_bExecute;
+bool m_bDirectURL;
 
 virtual ~SearchAndParseThread() override;
 virtual void execute() override;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-05-30 Thread Samuel Mehrbrodt
 cui/source/dialogs/SignSignatureLineDialog.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d96e30a157230d9ad60cddab47dc9b727849f7de
Author: Samuel Mehrbrodt 
Date:   Wed May 30 12:10:39 2018 +0200

Fix condition

Change-Id: I977eae208bd12886d25679d4c75308d51245766a
Reviewed-on: https://gerrit.libreoffice.org/55057
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 
(cherry picked from commit 29f0c9d344bfe2e09727fd9b9aa88e8c7bf361e2)
Reviewed-on: https://gerrit.libreoffice.org/55067
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/cui/source/dialogs/SignSignatureLineDialog.cxx 
b/cui/source/dialogs/SignSignatureLineDialog.cxx
index 0c6059e75649..0753ecf30298 100644
--- a/cui/source/dialogs/SignSignatureLineDialog.cxx
+++ b/cui/source/dialogs/SignSignatureLineDialog.cxx
@@ -164,7 +164,7 @@ SignSignatureLineDialog::getSignedGraphic(bool bValid)
 OUString aIssuerLine = CuiResId(RID_SVXSTR_SIGNATURELINE_SIGNED_BY)
.replaceFirst("%1", 
m_xSelectedCertifate->getIssuerName());
 aSvgImage = aSvgImage.replaceAll("[SIGNED_BY]", 
getCDataString(aIssuerLine));
-if (!bValid)
+if (bValid)
 aSvgImage = aSvgImage.replaceAll("[INVALID_SIGNATURE]", "");
 
 OUString aDate;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-05-29 Thread Caolán McNamara
 cui/source/tabpages/transfrm.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 91ea25d7579ac1830e428fcefbf522c0b4da2a97
Author: Caolán McNamara 
Date:   Tue May 29 13:53:35 2018 +0100

fix pow by digits

Change-Id: I715b85fa1c1e3f6c391c742f861e3791a505a570
Reviewed-on: https://gerrit.libreoffice.org/55013
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 cf3bc446a78e..0f5894d8d550 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -1071,6 +1071,8 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet*  )
 pItem = GetItem( mrOutAttrs, SID_ATTR_TRANSFORM_WIDTH );
 mfOldWidth = std::max( pItem ? static_cast(static_cast(pItem)->GetValue()) : 0.0, 1.0 );
 double 
fTmpWidth((OutputDevice::LogicToLogic(static_cast(mfOldWidth), 
mePoolUnit, MapUnit::Map100thMM)) / fUIScale);
+if (m_xMtrWidth->get_digits())
+fTmpWidth *= pow(10.0, m_xMtrWidth->get_digits());
 m_xMtrWidth->set_value(static_cast(fTmpWidth), FUNIT_100TH_MM);
 }
 
@@ -1078,6 +1080,8 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet*  )
 pItem = GetItem( mrOutAttrs, SID_ATTR_TRANSFORM_HEIGHT );
 mfOldHeight = std::max( pItem ? static_cast(static_cast(pItem)->GetValue()) : 0.0, 1.0 );
 double 
fTmpHeight((OutputDevice::LogicToLogic(static_cast(mfOldHeight), 
mePoolUnit, MapUnit::Map100thMM)) / fUIScale);
+if (m_xMtrHeight->get_digits())
+fTmpHeight *= pow(10.0, m_xMtrHeight->get_digits());
 m_xMtrHeight->set_value(static_cast(fTmpHeight), FUNIT_100TH_MM);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - cui/source cui/uiconfig include/svx include/vcl starmath/source svx/source vcl/source

2018-05-29 Thread Caolán McNamara
 cui/source/inc/swpossizetabpage.hxx  |   97 +---
 cui/source/tabpages/swpossizetabpage.cxx |  746 ++-
 cui/uiconfig/ui/swpossizepage.ui |   64 +-
 include/svx/swframeexample.hxx   |   65 ++
 include/vcl/weld.hxx |4 
 starmath/source/dialog.cxx   |8 
 svx/source/dialog/swframeexample.cxx |  666 +++
 vcl/source/app/salvtables.cxx|5 
 8 files changed, 1168 insertions(+), 487 deletions(-)

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

weld SvxSwPosSizeTabPage

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

diff --git a/cui/source/inc/swpossizetabpage.hxx 
b/cui/source/inc/swpossizetabpage.hxx
index b10e2ca7617f..d9e326dee456 100644
--- a/cui/source/inc/swpossizetabpage.hxx
+++ b/cui/source/inc/swpossizetabpage.hxx
@@ -20,12 +20,9 @@
 #define INCLUDED_CUI_SOURCE_INC_SWPOSSIZETABPAGE_HXX
 
 #include 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
+#include 
 
 // SvxSwPosSizeTabPage - position and size page for Writer drawing objects
 struct FrmMap;
@@ -37,40 +34,6 @@ class SvxSwPosSizeTabPage : public SfxTabPage
 {
 using TabPage::DeactivatePage;
 
-VclPtr  m_pWidthMF;
-VclPtr  m_pHeightMF;
-VclPtr m_pKeepRatioCB;
-
-VclPtr  m_pToPageRB;
-VclPtr  m_pToParaRB;
-VclPtr  m_pToCharRB;
-VclPtr  m_pAsCharRB;
-VclPtr  m_pToFrameRB;
-
-VclPtr  m_pPositionCB;
-VclPtr  m_pSizeCB;
-
-VclPtr m_pPosFrame;
-VclPtrm_pHoriFT;
-VclPtr  m_pHoriLB;
-VclPtrm_pHoriByFT;
-VclPtr  m_pHoriByMF;
-VclPtrm_pHoriToFT;
-VclPtr  m_pHoriToLB;
-
-VclPtr m_pHoriMirrorCB;
-
-VclPtrm_pVertFT;
-VclPtr  m_pVertLB;
-VclPtrm_pVertByFT;
-VclPtr  m_pVertByMF;
-VclPtrm_pVertToFT;
-VclPtr  m_pVertToLB;
-
-VclPtr m_pFollowCB;
-
-VclPtr m_pExampleWN;
-
 Link m_aValidateLink;
 
 ::tools::Rectangle   m_aRect; //size of all selected objects
@@ -95,24 +58,53 @@ class SvxSwPosSizeTabPage : public SfxTabPage
 boolm_bIsInRightToLeft;
 TriStatem_nProtectSizeState;
 
-DECL_LINK(RangeModifyHdl, Control&, void);
-DECL_LINK(RangeModifyClickHdl, Button*, void);
-DECL_LINK(AnchorTypeHdl, Button*, void);
-DECL_LINK( PosHdl, ListBox&, void );
-DECL_LINK( RelHdl, ListBox&, void );
-DECL_LINK(MirrorHdl, Button*, void);
-DECL_LINK( ModifyHdl, Edit&, void );
-DECL_LINK(ProtectHdl, Button*, void);
+SwFrameExample m_aExampleWN;
+
+std::unique_ptr m_xWidthMF;
+std::unique_ptr m_xHeightMF;
+std::unique_ptr m_xKeepRatioCB;
+std::unique_ptr m_xToPageRB;
+std::unique_ptr m_xToParaRB;
+std::unique_ptr m_xToCharRB;
+std::unique_ptr m_xAsCharRB;
+std::unique_ptr m_xToFrameRB;
+std::unique_ptr m_xPositionCB;
+std::unique_ptr m_xSizeCB;
+std::unique_ptr m_xPosFrame;
+std::unique_ptr m_xHoriFT;
+std::unique_ptr m_xHoriLB;
+std::unique_ptr m_xHoriByFT;
+std::unique_ptr m_xHoriByMF;
+std::unique_ptr m_xHoriToFT;
+std::unique_ptr m_xHoriToLB;
+std::unique_ptr m_xHoriMirrorCB;
+std::unique_ptr m_xVertFT;
+std::unique_ptr m_xVertLB;
+std::unique_ptr m_xVertByFT;
+std::unique_ptr m_xVertByMF;
+std::unique_ptr m_xVertToFT;
+std::unique_ptr m_xVertToLB;
+std::unique_ptr m_xFollowCB;
+std::unique_ptr m_xExampleWN;
+
+DECL_LINK(RangeModifyHdl, weld::Widget&, void);
+DECL_LINK(RangeModifyClickHdl, weld::ToggleButton&, void);
+DECL_LINK(AnchorTypeHdl, weld::ToggleButton&, void);
+DECL_LINK(PosHdl, weld::ComboBoxText&, void);
+DECL_LINK(RelHdl, weld::ComboBoxText&, void);
+DECL_LINK(MirrorHdl, weld::ToggleButton&, void);
+DECL_LINK(ModifyHdl, weld::MetricSpinButton&, void);
+DECL_LINK(ProtectHdl, weld::ToggleButton&, void);
 
 voidInitPos(RndStdIds nAnchorType, sal_uInt16 nH, sal_uInt16 
nHRel,
 sal_uInt16 nV,  sal_uInt16 nVRel,
 long   nX,  long   nY);
-static sal_uInt16   GetMapPos(FrmMap const *pMap, ListBox const );
-static shortGetAlignment(FrmMap const *pMap, sal_uInt16 nMapPos, 
ListBox const );
-static shortGetRelation(ListBox const );
+static sal_uInt16   GetMapPos(FrmMap const *pMap, const 
weld::ComboBoxText& rAlignLB);
+static shortGetAlignment(FrmMap const *pMap, sal_uInt16 nMapPos, 
const weld::ComboBoxText& rRelationLB);
+static shortGetRelation(const weld::ComboBoxText& rRelationLB);
 RndStdIds   GetAnchorType(bool* pbHasChanged = nullptr);
-voidFillRelLB(FrmMap const *pMap, sal_uInt16 nLBSelPos, 

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

2018-05-29 Thread Caolán McNamara
 cui/source/dialogs/colorpicker.cxx |   14 -
 cui/source/inc/transfrm.hxx|   27 +--
 cui/source/tabpages/transfrm.cxx   |  134 -
 cui/uiconfig/ui/rotationtabpage.ui |   86 ---
 include/svx/dialcontrol.hxx|   93 
 include/vcl/customweld.hxx |6 
 include/vcl/weld.hxx   |4 
 svx/source/dialog/charmap.cxx  |4 
 svx/source/dialog/dialcontrol.cxx  |  277 -
 vcl/source/app/salvtables.cxx  |   15 ++
 vcl/unx/gtk3/gtk3gtkinst.cxx   |   15 ++
 11 files changed, 543 insertions(+), 132 deletions(-)

New commits:
commit 94762fbc8dcb3b7fe6d535374915db7e7ab95937
Author: Caolán McNamara 
Date:   Fri May 25 16:54:30 2018 +0100

weld SvxAngleTabPage

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

diff --git a/cui/source/dialogs/colorpicker.cxx 
b/cui/source/dialogs/colorpicker.cxx
index 4fba23b2f7ca..3b182cde641a 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -426,7 +426,7 @@ void ColorFieldControl::ShowPosition( const Point& rPos, 
bool bUpdate )
 
 void ColorFieldControl::MouseButtonDown(const MouseEvent& rMEvt)
 {
-grab_add();
+CaptureMouse();
 mbMouseCaptured = true;
 ShowPosition(rMEvt.GetPosPixel(), true);
 Modify();
@@ -443,7 +443,7 @@ void ColorFieldControl::MouseMove(const MouseEvent& rMEvt)
 
 void ColorFieldControl::MouseButtonUp(const MouseEvent&)
 {
-grab_remove();
+ReleaseMouse();
 mbMouseCaptured = false;
 }
 
@@ -537,14 +537,12 @@ private:
 VclPtr mxBitmap;
 sal_Int16 mnLevel;
 double mdValue;
-bool mbMouseCaptured;
 };
 
 ColorSliderControl::ColorSliderControl()
 : meMode( DefaultMode )
 , mnLevel( 0 )
 , mdValue( -1.0 )
-, mbMouseCaptured(false)
 {
 }
 
@@ -651,15 +649,14 @@ void ColorSliderControl::ChangePosition(long nY)
 
 void ColorSliderControl::MouseButtonDown(const MouseEvent& rMEvt)
 {
-grab_add();
-mbMouseCaptured = true;
+CaptureMouse();
 ChangePosition(rMEvt.GetPosPixel().Y());
 Modify();
 }
 
 void ColorSliderControl::MouseMove(const MouseEvent& rMEvt)
 {
-if (mbMouseCaptured)
+if (IsMouseCaptured())
 {
 ChangePosition(rMEvt.GetPosPixel().Y());
 Modify();
@@ -668,8 +665,7 @@ void ColorSliderControl::MouseMove(const MouseEvent& rMEvt)
 
 void ColorSliderControl::MouseButtonUp(const MouseEvent&)
 {
-grab_remove();
-mbMouseCaptured = false;
+ReleaseMouse();
 }
 
 void ColorSliderControl::Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle&)
diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx
index 7e7aa264f91b..9dccd2663241 100644
--- a/cui/source/inc/transfrm.hxx
+++ b/cui/source/inc/transfrm.hxx
@@ -175,15 +175,6 @@ class SvxAngleTabPage : public SvxTabPage
 static const sal_uInt16 pAngleRanges[];
 
 private:
-VclPtrm_pFlPosition;
-VclPtr m_pMtrPosX;
-VclPtr m_pMtrPosY;
-VclPtr  m_pCtlRect;
-
-VclPtrm_pFlAngle;
-VclPtrm_pNfAngle;
-VclPtrm_pCtlAngle;
-
 const SfxItemSet&   rOutAttrs;
 const SdrView*  pView;
 
@@ -194,10 +185,20 @@ private:
 MapUnit ePoolUnit;
 FieldUnit   eDlgUnit;
 
+svx::SvxDialControl m_aCtlAngle;
+RectCtl m_aCtlRect;
+
+std::unique_ptr m_xFlPosition;
+std::unique_ptr m_xMtrPosX;
+std::unique_ptr m_xMtrPosY;
+std::unique_ptr m_xCtlRect;
+std::unique_ptr m_xFlAngle;
+std::unique_ptr m_xNfAngle;
+std::unique_ptr m_xCtlAngle;
+
 public:
- SvxAngleTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs  );
+SvxAngleTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs);
 virtual ~SvxAngleTabPage() override;
-virtual void dispose() override;
 
 static VclPtr Create( TabPageParent, const SfxItemSet* );
 static const sal_uInt16*  GetRanges() { return pAngleRanges; }
@@ -208,8 +209,8 @@ public:
 virtual void ActivatePage( const SfxItemSet& rSet ) override;
 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
-virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
-virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) 
override;
+virtual void PointChanged(weld::DrawingArea* pWindow, RectPoint eRP) 
override;
+virtual void PointChanged(vcl::Window* pWindow, RectPoint eRP) override;
 
 void Construct();
 void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index b37d366f2f0b..cf3bc446a78e 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -173,57 +173,43 @@ void 

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

2018-05-29 Thread Caolán McNamara
 cui/source/inc/transfrm.hxx   |   24 +++
 cui/source/tabpages/transfrm.cxx  |  113 --
 cui/uiconfig/ui/slantcornertabpage.ui |   68 ++--
 3 files changed, 101 insertions(+), 104 deletions(-)

New commits:
commit 9f1fb000a50f38e45b68b4cb14cb4f7f9c514f82
Author: Caolán McNamara 
Date:   Fri May 25 16:19:52 2018 +0100

weld SvxSlantTabPage

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

diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx
index 959cd6bd8f4d..7e7aa264f91b 100644
--- a/cui/source/inc/transfrm.hxx
+++ b/cui/source/inc/transfrm.hxx
@@ -227,17 +227,6 @@ class SvxSlantTabPage : public SvxTabPage
 static const sal_uInt16 pSlantRanges[];
 
 private:
-VclPtrm_pFlRadius;
-VclPtr m_pMtrRadius;
-VclPtrm_pFlAngle;
-VclPtr m_pMtrAngle;
-
-VclPtrm_aControlGroups[2];
-VclPtrm_aControlGroupX[2];
-VclPtr m_aControlX[2];
-VclPtrm_aControlGroupY[2];
-VclPtr m_aControlY[2];
-
 const SfxItemSet&   rOutAttrs;
 
 const SdrView*  pView;
@@ -248,10 +237,19 @@ private:
 MapUnit ePoolUnit;
 FieldUnit   eDlgUnit;
 
+std::unique_ptr m_xFlRadius;
+std::unique_ptr m_xMtrRadius;
+std::unique_ptr m_xFlAngle;
+std::unique_ptr m_xMtrAngle;
+std::unique_ptr m_aControlGroups[2];
+std::unique_ptr m_aControlGroupX[2];
+std::unique_ptr m_aControlX[2];
+std::unique_ptr m_aControlGroupY[2];
+std::unique_ptr m_aControlY[2];
+
 public:
- SvxSlantTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs  );
+SvxSlantTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs);
 virtual ~SvxSlantTabPage() override;
-virtual void dispose() override;
 
 static VclPtr Create( TabPageParent, const SfxItemSet* );
 static const sal_uInt16* GetRanges() {  return pSlantRanges; }
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 0e67b85261b9..b37d366f2f0b 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -320,13 +320,11 @@ void SvxAngleTabPage::Reset(const SfxItemSet* rAttrs)
 m_pCtlAngle->SaveValue();
 }
 
-
 VclPtr SvxAngleTabPage::Create( TabPageParent pWindow, const 
SfxItemSet* rSet)
 {
 return VclPtr::Create(pWindow.pParent, *rSet);
 }
 
-
 void SvxAngleTabPage::ActivatePage(const SfxItemSet& rSet)
 {
 SfxBoolItem const * bPosProtect = nullptr;
@@ -337,7 +335,6 @@ void SvxAngleTabPage::ActivatePage(const SfxItemSet& rSet)
 }
 }
 
-
 DeactivateRC SvxAngleTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
 if(_pSet)
@@ -422,25 +419,23 @@ void SvxAngleTabPage::PointChanged(weld::DrawingArea* 
/*pWindow*/, RectPoint /*e
 |*  dialog for changing slant and corner radius
 |*
 \/
-SvxSlantTabPage::SvxSlantTabPage(vcl::Window* pParent, const SfxItemSet& 
rInAttrs)
-: SvxTabPage( 
pParent,"SlantAndCornerRadius","cui/ui/slantcornertabpage.ui",
-rInAttrs)
+SvxSlantTabPage::SvxSlantTabPage(TabPageParent pParent, const SfxItemSet& 
rInAttrs)
+: SvxTabPage(pParent, "cui/ui/slantcornertabpage.ui", 
"SlantAndCornerRadius", rInAttrs)
 , rOutAttrs(rInAttrs)
 , pView(nullptr)
 , eDlgUnit(FUNIT_NONE)
+, m_xFlRadius(m_xBuilder->weld_widget("FL_RADIUS"))
+, m_xMtrRadius(m_xBuilder->weld_metric_spin_button("MTR_FLD_RADIUS", 
FUNIT_CM))
+, m_xFlAngle(m_xBuilder->weld_widget("FL_SLANT"))
+, m_xMtrAngle(m_xBuilder->weld_metric_spin_button("MTR_FLD_ANGLE", 
FUNIT_DEGREE))
 {
-get(m_pFlRadius, "FL_RADIUS");
-get(m_pMtrRadius, "MTR_FLD_RADIUS");
-get(m_pFlAngle, "FL_SLANT");
-get(m_pMtrAngle, "MTR_FLD_ANGLE");
-
 for (int i = 0; i < 2; ++i)
 {
-get(m_aControlGroups[i], "controlgroups" + OString::number(i+1));
-get(m_aControlGroupX[i], "controlgroupx" + OString::number(i+1));
-get(m_aControlX[i], "controlx" + OString::number(i+1));
-get(m_aControlGroupY[i], "controlgroupy" + OString::number(i+1));
-get(m_aControlY[i], "controly" + OString::number(i+1));
+m_aControlGroups[i].reset(m_xBuilder->weld_widget("controlgroups" + 
OString::number(i+1)));
+m_aControlGroupX[i].reset(m_xBuilder->weld_widget("controlgroupx" + 
OString::number(i+1)));
+m_aControlX[i].reset(m_xBuilder->weld_metric_spin_button("controlx" + 
OString::number(i+1), FUNIT_CM));
+m_aControlGroupY[i].reset(m_xBuilder->weld_widget("controlgroupy" + 
OString::number(i+1)));
+m_aControlY[i].reset(m_xBuilder->weld_metric_spin_button("controly" + 
OString::number(i+1), FUNIT_CM));
 }
 
 // this page needs ExchangeSupport
@@ -448,30 +443,12 @@ 

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

2018-05-29 Thread Caolán McNamara
 cui/source/inc/transfrm.hxx   |   70 +++---
 cui/source/tabpages/transfrm.cxx  |  439 --
 cui/uiconfig/ui/possizetabpage.ui |  145 +++-
 include/vcl/customweld.hxx|1 
 4 files changed, 311 insertions(+), 344 deletions(-)

New commits:
commit 7ea2b86a7f82860be35bd1f7a4597d33cc82cef6
Author: Caolán McNamara 
Date:   Mon May 28 16:51:20 2018 +0100

weld SvxPositionSizeTabPage

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

diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx
index 94fa4836de51..959cd6bd8f4d 100644
--- a/cui/source/inc/transfrm.hxx
+++ b/cui/source/inc/transfrm.hxx
@@ -74,32 +74,6 @@ class SvxPositionSizeTabPage : public SvxTabPage
 static const sal_uInt16 pPosSizeRanges[];
 
 private:
-// position
-VclPtrm_pFlPosition;
-VclPtr m_pMtrPosX;
-VclPtr m_pMtrPosY;
-VclPtr  m_pCtlPos;
-
-// size
-VclPtrm_pFlSize;
-VclPtr   m_pFtWidth;
-VclPtr m_pMtrWidth;
-VclPtr   m_pFtHeight;
-VclPtr m_pMtrHeight;
-VclPtrm_pCbxScale;
-VclPtr  m_pCtlSize;
-
-// protect
-VclPtrm_pFlProtect;
-VclPtr m_pTsbPosProtect;
-VclPtr m_pTsbSizeProtect;
-
-// adjust
-VclPtrm_pFlAdjust;
-VclPtr m_pTsbAutoGrowWidth;
-VclPtr m_pTsbAutoGrowHeight;
-
-private:
 const SfxItemSet&   mrOutAttrs;
 
 const SdrView*  mpView;
@@ -123,22 +97,48 @@ private:
 double  mfOldHeight;
 RectPoint  meRP;
 
+RectCtl  m_aCtlPos;
+RectCtl  m_aCtlSize;
 
-DECL_LINK( ChangePosProtectHdl, Button*, void );
-DECL_LINK( ChangeSizeProtectHdl, Button*, void );
+// position
+std::unique_ptr m_xFlPosition;
+std::unique_ptr m_xMtrPosX;
+std::unique_ptr m_xMtrPosY;
+std::unique_ptr m_xCtlPos;
+
+// size
+std::unique_ptr m_xFlSize;
+std::unique_ptr m_xFtWidth;
+std::unique_ptr m_xMtrWidth;
+std::unique_ptr m_xFtHeight;
+std::unique_ptr m_xMtrHeight;
+std::unique_ptr m_xCbxScale;
+std::unique_ptr m_xCtlSize;
+
+// protect
+std::unique_ptr m_xFlProtect;
+std::unique_ptr m_xTsbPosProtect;
+std::unique_ptr m_xTsbSizeProtect;
+
+// adjust
+std::unique_ptr m_xFlAdjust;
+std::unique_ptr m_xTsbAutoGrowWidth;
+std::unique_ptr m_xTsbAutoGrowHeight;
+
+DECL_LINK(ChangePosProtectHdl, weld::ToggleButton&, void);
+DECL_LINK(ChangeSizeProtectHdl, weld::ToggleButton&, void);
 
 void SetMinMaxPosition();
 void GetTopLeftPosition(double& rfX, double& rfY, const basegfx::B2DRange& 
rRange);
 
-DECL_LINK( ChangeWidthHdl, Edit&, void );
-DECL_LINK( ChangeHeightHdl, Edit&, void );
-DECL_LINK( ClickSizeProtectHdl, Button*, void );
-DECL_LINK( ClickAutoHdl, Button*, void );
+DECL_LINK( ChangeWidthHdl, weld::MetricSpinButton&, void );
+DECL_LINK( ChangeHeightHdl, weld::MetricSpinButton&, void );
+DECL_LINK( ClickSizeProtectHdl, weld::ToggleButton&, void );
+DECL_LINK( ClickAutoHdl, weld::ToggleButton&, void );
 
 public:
-SvxPositionSizeTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs  
);
+SvxPositionSizeTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs);
 virtual ~SvxPositionSizeTabPage() override;
-virtual void dispose() override;
 
 static VclPtr Create( TabPageParent, const SfxItemSet* );
 static const sal_uInt16* GetRanges() {  return pPosSizeRanges; }
@@ -149,8 +149,8 @@ public:
 virtual void ActivatePage( const SfxItemSet& rSet ) override;
 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
-virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
 virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) 
override;
+virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
 
 void Construct();
 void SetView( const SdrView* pSdrView ) { mpView = pSdrView; }
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 570635d1737a..0e67b85261b9 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -804,8 +804,8 @@ void SvxSlantTabPage::PointChanged( weld::DrawingArea*, 
RectPoint )
 |*  Dialog for changing position and size of graphic objects
 |*
 \/
-SvxPositionSizeTabPage::SvxPositionSizeTabPage(vcl::Window* pParent, const 
SfxItemSet& rInAttrs)
-: SvxTabPage(pParent,"PositionAndSize","cui/ui/possizetabpage.ui", 
rInAttrs)
+SvxPositionSizeTabPage::SvxPositionSizeTabPage(TabPageParent pParent, const 
SfxItemSet& 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - cui/source include/svx sal/rtl sd/source svx/source vcl/inc

2018-05-28 Thread Noel Grandin
 cui/source/tabpages/textattr.cxx   |2 
 include/svx/dlgctrl.hxx|8 -
 sal/rtl/alloc_arena.hxx|2 
 sd/source/ui/table/TableDesignPane.cxx |6 
 sd/source/ui/table/TableDesignPane.hxx |3 
 svx/source/dialog/dlgctrl.cxx  |  227 ++---
 vcl/inc/salwtype.hxx   |1 
 7 files changed, 101 insertions(+), 148 deletions(-)

New commits:
commit d1ceb421883fd4c05d146c109f906127d2b2ee31
Author: Noel Grandin 
Date:   Fri May 25 16:34:11 2018 +0200

loplugin:unusedfields

Change-Id: I625b73152c0c277c6e0ce3e24e4704094fc4e8ff
Reviewed-on: https://gerrit.libreoffice.org/54822
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 
(cherry picked from commit 96d7c67d98527b1ccc1cfba3ca817238e582d63b)
Reviewed-on: https://gerrit.libreoffice.org/54943
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index 3013bd6038d7..9cb423211176 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -81,7 +81,7 @@ SvxTextAttrPage::SvxTextAttrPage(TabPageParent pPage, const 
SfxItemSet& rInAttrs
 , m_xCtlPosition(new weld::CustomWeld(*m_xBuilder, "CTL_POSITION", 
m_aCtlPosition))
 , m_xTsbFullWidth(m_xBuilder->weld_check_button("TSB_FULL_WIDTH"))
 {
-m_aCtlPosition.SetControlSettings(RectPoint::MM, 240, 100);
+m_aCtlPosition.SetControlSettings(RectPoint::MM, 240);
 
 FieldUnit eFUnit = GetModuleFieldUnit( rInAttrs );
 SetFieldUnit( *m_xMtrFldLeft, eFUnit );
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index c14761bd8017..c7a1e1087765 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -100,7 +100,6 @@ protected:
 BitmapEx* pBitmap;
 CTL_STATE m_nState;
 
-bool mbCompleteDisable : 1;
 bool mbUpdateForeground : 1;
 bool mbUpdateBackground : 1;
 
@@ -143,8 +142,6 @@ public:
 virtual css::uno::Reference< css::accessibility::XAccessible > 
CreateAccessible() override;
 
 RectPoint  GetApproxRPFromPixPt( const css::awt::Point& 
rPixelPoint ) const;
-
-bool IsCompletelyDisabled() const { return mbCompleteDisable; }
 };
 
 class SAL_WARN_UNUSED SVX_DLLPUBLIC RectCtl : public 
weld::CustomWidgetController
@@ -163,7 +160,6 @@ private:
 protected:
 rtl::Reference pAccContext;
 sal_uInt16 nBorderWidth;
-sal_uInt16 nRadius;
 Point aPtLT, aPtMT, aPtRT;
 Point aPtLM, aPtMM, aPtRM;
 Point aPtLB, aPtMB, aPtRB;
@@ -180,8 +176,8 @@ protected:
 
 Point   GetApproxLogPtFromPixPt( const Point& rRoughPixelPoint 
) const;
 public:
-RectCtl(SvxTabPage* pPage, RectPoint eRpt = RectPoint::MM, sal_uInt16 
nBorder = 200, sal_uInt16 nCircle = 80);
-void SetControlSettings(RectPoint eRpt, sal_uInt16 nBorder, sal_uInt16 
nCircl);
+RectCtl(SvxTabPage* pPage, RectPoint eRpt = RectPoint::MM, sal_uInt16 
nBorder = 200);
+void SetControlSettings(RectPoint eRpt, sal_uInt16 nBorder);
 virtual ~RectCtl() override;
 
 virtual void Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle&) override;
diff --git a/sal/rtl/alloc_arena.hxx b/sal/rtl/alloc_arena.hxx
index 120d0ec5ac45..061fc0cf044f 100644
--- a/sal/rtl/alloc_arena.hxx
+++ b/sal/rtl/alloc_arena.hxx
@@ -100,8 +100,6 @@ struct rtl_arena_st
 rtl_arena_segment_type *  m_hash_table_0[RTL_ARENA_HASH_SIZE];
 sal_Size  m_hash_size;  /* m_hash_mask + 1   */
 sal_Size  m_hash_shift; /* log2(m_hash_size) */
-
-rtl_cache_type ** m_qcache_ptr;
 };
 
 /** gp_default_arena
diff --git a/sd/source/ui/table/TableDesignPane.cxx 
b/sd/source/ui/table/TableDesignPane.cxx
index 1a61bf6f100e..23a8dd2499e4 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -86,8 +86,6 @@ static const OUStringLiteral gPropNames[CB_COUNT] =
 
 TableDesignWidget::TableDesignWidget( VclBuilderContainer* pParent, 
ViewShellBase& rBase )
 : mrBase(rBase)
-, mbStyleSelected(false)
-, mbOptionsChanged(false)
 {
 pParent->get(m_pValueSet, "previews");
 m_pValueSet->SetStyle(m_pValueSet->GetStyle() | WB_NO_DIRECTSELECT | 
WB_FLATVALUESET | WB_ITEMBORDER);
@@ -146,7 +144,6 @@ static SfxDispatcher* getDispatcher( ViewShellBase const & 
rBase )
 
 IMPL_LINK_NOARG(TableDesignWidget, implValueSetHdl, ValueSet*, void)
 {
-mbStyleSelected = true;
 ApplyStyle();
 }
 
@@ -202,10 +199,7 @@ void TableDesignWidget::ApplyStyle()
 
 IMPL_LINK_NOARG(TableDesignWidget, implCheckBoxHdl, Button*, void)
 {
-mbOptionsChanged = true;
-
 ApplyOptions();
-
 FillDesignPreviewControl();
 }
 
diff --git a/sd/source/ui/table/TableDesignPane.hxx 
b/sd/source/ui/table/TableDesignPane.hxx
index 149ce0ae..a8a641291656 100644
--- a/sd/source/ui/table/TableDesignPane.hxx
+++ b/sd/source/ui/table/TableDesignPane.hxx
@@ -98,9 +98,6