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

2019-08-16 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/about.cxx  |   12 
 cui/uiconfig/ui/aboutdialog.ui|1 +
 include/vcl/weld.hxx  |4 ++--
 vcl/source/app/salvtables.cxx |8 
 vcl/source/window/aboutdialog.cxx |4 +---
 vcl/unx/gtk3/gtk3gtkinst.cxx  |   38 +-
 6 files changed, 21 insertions(+), 46 deletions(-)

New commits:
commit a94f95d173e531fe7df0e8caebd6763253798b39
Author: Caolán McNamara 
AuthorDate: Fri Aug 16 14:56:54 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Aug 16 17:42:41 2019 +0200

tdf#126254 Help - About is black with Linux gen and gtk2

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

diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index a10fd4ecba9b..a9617f7a8381 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -178,10 +178,8 @@ void AboutDialog::SetLogo()
 m_xDialog->set_logo(nullptr);
 else
 {
-ScopedVclPtr 
xDevice(m_xDialog->create_virtual_device());
-xDevice->SetOutputSize(aLogoBitmap.GetSizePixel());
-xDevice->DrawBitmapEx(Point(), aLogoBitmap);
-m_xDialog->set_logo(xDevice.get());
+Graphic aGraphic(aLogoBitmap);
+m_xDialog->set_logo(aGraphic.GetXGraphic());
 }
 }
 
@@ -193,10 +191,8 @@ IMPL_LINK(AboutDialog, SizeAllocHdl, const Size&, rSize, 
void)
 if (!(Application::GetSettings().GetStyleSettings().GetHighContrastMode()))
 {
 SfxApplication::loadBrandSvg("shell/about", aBackgroundBitmap, 
rSize.Width());
-ScopedVclPtr 
xDevice(m_xDialog->create_virtual_device());
-xDevice->SetOutputSize(aBackgroundBitmap.GetSizePixel());
-xDevice->DrawBitmapEx(Point(), aBackgroundBitmap);
-m_xDialog->set_background(xDevice.get());
+Graphic aGraphic(aBackgroundBitmap);
+m_xDialog->set_background(aGraphic.GetXGraphic());
 }
 }
 
diff --git a/cui/uiconfig/ui/aboutdialog.ui b/cui/uiconfig/ui/aboutdialog.ui
index 07f2be7e3e06..b2ad949019c8 100644
--- a/cui/uiconfig/ui/aboutdialog.ui
+++ b/cui/uiconfig/ui/aboutdialog.ui
@@ -9,6 +9,7 @@
 0
 dialog
 About %PRODUCTNAME
+False
 %PRODUCTNAME
 %PRODUCTNAME is a modern, easy-to-use, open 
source productivity suite for word processing, spreadsheets, presentations and 
more.
 https://www.libreoffice.org/
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 9f781faf1c1c..198b7a72f0d6 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -453,8 +453,8 @@ public:
 virtual void set_website(const OUString& rURL) = 0;
 virtual void set_website_label(const OUString& rLabel) = 0;
 virtual OUString get_website_label() const = 0;
-virtual void set_logo(VirtualDevice* pDevice) = 0;
-virtual void set_background(VirtualDevice* pDevice) = 0;
+virtual void set_logo(const css::uno::Reference& 
rImage) = 0;
+virtual void set_background(const 
css::uno::Reference& rImage) = 0;
 };
 
 struct VCL_DLLPUBLIC ComboBoxEntry
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 0ca121c0e8ac..90481eaf0c7e 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1438,13 +1438,13 @@ public:
 {
 return m_xAboutDialog->GetWebsiteLabel();
 }
-virtual void set_logo(VirtualDevice* pDevice) override
+virtual void set_logo(const css::uno::Reference& 
rImage) override
 {
-m_xAboutDialog->SetLogo(createImage(*pDevice));
+m_xAboutDialog->SetLogo(Image(rImage));
 }
-virtual void set_background(VirtualDevice* pDevice) override
+virtual void set_background(const 
css::uno::Reference& rImage) override
 {
-m_xAboutDialog->SetBackground(createImage(*pDevice));
+m_xAboutDialog->SetBackground(Image(rImage));
 }
 };
 
diff --git a/vcl/source/window/aboutdialog.cxx 
b/vcl/source/window/aboutdialog.cxx
index 10074a1a3eac..483aec85017e 100644
--- a/vcl/source/window/aboutdialog.cxx
+++ b/vcl/source/window/aboutdialog.cxx
@@ -129,10 +129,8 @@ void AboutDialog::SetBackground(const Image& 
rBackgroundBitmap)
 Invalidate();
 }
 
-void AboutDialog::Paint(vcl::RenderContext& rRenderContext, const 
::tools::Rectangle& rRect)
+void AboutDialog::Paint(vcl::RenderContext& rRenderContext, const 
::tools::Rectangle& /*rRect*/)
 {
-rRenderContext.SetClipRegion(vcl::Region(rRect));
-
 Size aSize(GetOutputSizePixel());
 Point aPos(aSize.Width() - m_aBackgroundBitmap.GetSizePixel().Width(),
aSize.Height() - m_aBackgroundBitmap.GetSizePixel().Height());
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index b015248a4acb..aa831c1bfbb9 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -3514,9 +3514,9 @@ public:
  

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

2019-05-21 Thread Caolán McNamara (via logerrit)
 cui/source/inc/autocdlg.hxx|1 +
 cui/source/tabpages/autocdlg.cxx   |   17 +
 cui/uiconfig/ui/acorreplacepage.ui |1 +
 include/vcl/weld.hxx   |   10 --
 vcl/source/app/salvtables.cxx  |   19 ++-
 vcl/unx/gtk3/gtk3gtkinst.cxx   |6 +-
 6 files changed, 42 insertions(+), 12 deletions(-)

New commits:
commit 86618248683fa4048192d15356c7e6b430e8dbb9
Author: Caolán McNamara 
AuthorDate: Mon May 20 12:34:52 2019 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 21 17:21:02 2019 +0200

tdf#109158 short-circuit text width measuring with fixed width columns

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

diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index 346c6a1e556c..bcb283f154e6 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -180,6 +180,7 @@ private:
 bool bReplaceEditChanged:1;
 bool bSWriter:1;
 
+std::vector m_aReplaceFixedWidths;
 std::unique_ptr m_xTextOnlyCB;
 std::unique_ptr m_xShortED;
 std::unique_ptr m_xReplaceED;
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 9e65e501740d..00c409916d42 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -680,9 +680,9 @@ 
OfaAutocorrReplacePage::OfaAutocorrReplacePage(TabPageParent pParent,
 pCompareClass->loadDefaultCollator( aLanguageTag.getLocale(), 0 );
 pCharClass.reset( new CharClass( aLanguageTag ) );
 
-std::vector aWidths;
-aWidths.push_back(m_xReplaceTLB->get_approximate_digit_width() * 32);
-m_xReplaceTLB->set_column_fixed_widths(aWidths);
+auto nColWidth = m_xReplaceTLB->get_approximate_digit_width() * 32;
+m_aReplaceFixedWidths.push_back(nColWidth);
+m_aReplaceFixedWidths.push_back(nColWidth);
 
 m_xReplaceTLB->connect_changed( LINK(this, OfaAutocorrReplacePage, 
SelectHdl) );
 m_xNewReplacePB->connect_clicked( LINK(this, OfaAutocorrReplacePage, 
NewDelButtonHdl) );
@@ -827,7 +827,7 @@ void OfaAutocorrReplacePage::RefillReplaceBox(bool 
bFromReset,
 {
 aFormatText.insert(rDouble.sShort);
 }
-});
+}, &m_aReplaceFixedWidths);
 }
 else
 {
@@ -853,7 +853,7 @@ void OfaAutocorrReplacePage::RefillReplaceBox(bool 
bFromReset,
 {
 aFormatText.insert(elem->GetShort());
 }
-});
+}, &m_aReplaceFixedWidths);
 m_xNewReplacePB->set_sensitive(false);
 m_xDeleteReplacePB->set_sensitive(false);
 }
@@ -999,12 +999,13 @@ IMPL_LINK(OfaAutocorrReplacePage, NewDelActionHdl, 
weld::Entry&, rEdit, bool)
 
 IMPL_LINK_NOARG(OfaAutocorrReplacePage, EntrySizeAllocHdl, const Size&, void)
 {
-std::vector aWidths;
+m_aReplaceFixedWidths.clear();
 int x, y, width, height;
 if (m_xReplaceED->get_extents_relative_to(*m_xReplaceTLB, x, y, width, 
height))
 {
-aWidths.push_back(x);
-m_xReplaceTLB->set_column_fixed_widths(aWidths);
+m_aReplaceFixedWidths.push_back(x);
+m_aReplaceFixedWidths.push_back(width - 1);
+m_xReplaceTLB->set_column_fixed_widths(m_aReplaceFixedWidths);
 }
 }
 
diff --git a/cui/uiconfig/ui/acorreplacepage.ui 
b/cui/uiconfig/ui/acorreplacepage.ui
index 326152eb2ca8..36808eb4ec4d 100644
--- a/cui/uiconfig/ui/acorreplacepage.ui
+++ b/cui/uiconfig/ui/acorreplacepage.ui
@@ -85,6 +85,7 @@
 True
 True
 True
+never
 in
 
   
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 8ba41b4e5851..71214ada80cf 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -775,9 +775,15 @@ public:
 // inserted with an arg of the index that this row will be when bulk insert
 // ends.
 //
-// this enables inserting the entries backwards in models where that is 
faster
+// this enables inserting the entries backwards in models where that is 
faster,
+//
+// pFixedWidths is optional, when present each matching entry col text
+// width will not be measured, and the fixed width used instead. Use
+// sparingly because wider text than the fixed width is clipped and cannot
+// be scrolled into view horizontally.
 virtual void bulk_insert_for_each(int nSourceCount,
-  const std::function& func)
+  const std::function& func,
+  const std::vector* pFixedWidths = 
nullptr)
 = 0;
 
 void connect_expanding(const Link& rLink) { 
m_aExpandingHdl = rLink; }
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 3e375cd212ee..5c75d2f369a2 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvt

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

2019-02-05 Thread Libreoffice Gerrit user
 cui/source/options/optinet2.cxx  |4 
 cui/source/options/webconninfo.cxx   |  189 +++
 cui/source/options/webconninfo.hxx   |   44 ++
 cui/uiconfig/ui/storedwebconnectiondialog.ui |  100 --
 include/vcl/weld.hxx |5 
 vcl/source/app/salvtables.cxx|   42 +-
 vcl/source/window/builder.cxx|   32 
 vcl/unx/gtk3/gtk3gtkinst.cxx |   85 +---
 8 files changed, 270 insertions(+), 231 deletions(-)

New commits:
commit 29a66fe8cde3e18bf4d1c3d7a1f2077ea54548be
Author: Caolán McNamara 
AuthorDate: Tue Feb 5 15:35:35 2019 +
Commit: Caolán McNamara 
CommitDate: Tue Feb 5 22:43:05 2019 +0100

weld WebConnectionInfoDialog

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

diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index c269d87fdda5..bee5e2d64d14 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -784,8 +784,8 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, ShowPasswordsHdl, 
Button*, void)
 
 if ( xMasterPasswd->isPersistentStoringAllowed() && 
xMasterPasswd->authorizateWithMasterPassword(xTmpHandler) )
 {
-ScopedVclPtrInstance< svx::WebConnectionInfoDialog > aDlg(this);
-aDlg->Execute();
+svx::WebConnectionInfoDialog aDlg(GetDialogFrameWeld());
+aDlg.run();
 }
 }
 catch (const Exception&)
diff --git a/cui/source/options/webconninfo.cxx 
b/cui/source/options/webconninfo.cxx
index 18a2cd7fbca9..5bb56294cfc3 100644
--- a/cui/source/options/webconninfo.cxx
+++ b/cui/source/options/webconninfo.cxx
@@ -35,125 +35,49 @@ using namespace ::com::sun::star;
 namespace svx
 {
 
-
-// class PasswordTable ---
-
-PasswordTable::PasswordTable(SvSimpleTableContainer& rParent, WinBits nBits)
-: SvSimpleTable(rParent, nBits | WB_NOINITIALSELECTION)
-{
-}
-
-void PasswordTable::InsertHeaderItem(sal_uInt16 nColumn, const OUString& 
rText, HeaderBarItemBits nBits)
-{
-GetTheHeaderBar().InsertItem( nColumn, rText, 0, nBits );
-}
-
-void PasswordTable::Resort( bool bForced )
-{
-sal_uInt16 nColumn = GetSelectedCol();
-if ( 0 == nColumn || bForced ) // only the first column is sorted
-{
-HeaderBarItemBits nBits = GetTheHeaderBar().GetItemBits(1);
-bool bUp = ( ( nBits & HeaderBarItemBits::UPARROW ) == 
HeaderBarItemBits::UPARROW );
-SvSortMode eMode = SortAscending;
-
-if ( bUp )
-{
-nBits &= ~HeaderBarItemBits::UPARROW;
-nBits |= HeaderBarItemBits::DOWNARROW;
-eMode = SortDescending;
-}
-else
-{
-nBits &= ~HeaderBarItemBits::DOWNARROW;
-nBits |= HeaderBarItemBits::UPARROW;
-}
-GetTheHeaderBar().SetItemBits( 1, nBits );
-SvTreeList* pListModel = GetModel();
-pListModel->SetSortMode( eMode );
-pListModel->Resort();
-}
-}
-
-void PasswordTable::Resize()
-{
-SvSimpleTable::Resize();
-if (isInitialLayout(this))
-setColWidths();
-}
-
-void PasswordTable::setColWidths()
-{
-HeaderBar &rBar = GetTheHeaderBar();
-if (rBar.GetItemCount() < 2)
-return;
-long nUserNameWidth = 12 +
-std::max(rBar.GetTextWidth(rBar.GetItemText(2)),
-GetTextWidth(""));
-long nWebSiteWidth = std::max(
-12 + rBar.GetTextWidth(rBar.GetItemText(1)),
-GetSizePixel().Width() - nUserNameWidth);
-long aStaticTabs[]= { 0, nWebSiteWidth };
-SvSimpleTable::SetTabs(SAL_N_ELEMENTS(aStaticTabs), aStaticTabs, 
MapUnit::MapPixel);
-}
-
 // class WebConnectionInfoDialog -
 
-
-WebConnectionInfoDialog::WebConnectionInfoDialog(vcl::Window* pParent)
-: ModalDialog(pParent, "StoredWebConnectionDialog", 
"cui/ui/storedwebconnectiondialog.ui")
+WebConnectionInfoDialog::WebConnectionInfoDialog(weld::Window* pParent)
+: GenericDialogController(pParent, "cui/ui/storedwebconnectiondialog.ui", 
"StoredWebConnectionDialog")
 , m_nPos( -1 )
+, m_xRemoveBtn(m_xBuilder->weld_button("remove"))
+, m_xRemoveAllBtn(m_xBuilder->weld_button("removeall"))
+, m_xChangeBtn(m_xBuilder->weld_button("change"))
+, m_xPasswordsLB(m_xBuilder->weld_tree_view("logins"))
 {
-get(m_pRemoveBtn, "remove");
-get(m_pRemoveAllBtn, "removeall");
-get(m_pChangeBtn, "change");
-
-SvSimpleTableContainer *pPasswordsLBContainer = 
get("logins");
-m_pPasswordsLB = VclPtr::Create(*pPasswordsLBContainer, 0);
-
-long const aStaticTabs[]= { 0, 0 };
-m_pPasswordsLB->SetTabs( SAL_N_ELEMENTS(aStaticTabs), aStaticTabs );
-m_pPasswordsLB->InsertHeaderItem( 1,

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

2018-09-19 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuigaldlg.cxx  |   65 
 cui/source/inc/cuigaldlg.hxx  |   22 +++--
 cui/uiconfig/ui/gallerygeneralpage.ui |   37 ++--
 include/vcl/weld.hxx  |7 +++
 vcl/source/app/salvtables.cxx |   25 +++
 vcl/unx/gtk3/gtk3gtkinst.cxx  |   77 +++---
 6 files changed, 119 insertions(+), 114 deletions(-)

New commits:
commit af60b15af12bbb0cda2b48b99fde632f1532e1aa
Author: Caolán McNamara 
AuthorDate: Tue Sep 18 17:13:33 2018 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 19 22:00:27 2018 +0200

weld TPGalleryThemeGeneral

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

diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 18e39c8ae267..a04340bbc80e 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -574,7 +574,6 @@ GalleryThemeProperties::GalleryThemeProperties(vcl::Window* 
pParent,
 SetText( aText );
 }
 
-
 void GalleryThemeProperties::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
 {
 if (nId == m_nGeneralPageId)
@@ -583,39 +582,18 @@ void GalleryThemeProperties::PageCreated( sal_uInt16 nId, 
SfxTabPage &rPage )
 static_cast( rPage ).SetXChgData( pData );
 }
 
-
-TPGalleryThemeGeneral::TPGalleryThemeGeneral(vcl::Window* pParent, const 
SfxItemSet& rSet)
-: SfxTabPage(pParent, "GalleryGeneralPage",
-"cui/ui/gallerygeneralpage.ui", &rSet)
+TPGalleryThemeGeneral::TPGalleryThemeGeneral(TabPageParent pParent, const 
SfxItemSet& rSet)
+: SfxTabPage(pParent, "cui/ui/gallerygeneralpage.ui", 
"GalleryGeneralPage", &rSet)
 , pData(nullptr)
+, m_xFiMSImage(m_xBuilder->weld_image("image"))
+, m_xEdtMSName(m_xBuilder->weld_entry("name"))
+, m_xFtMSShowType(m_xBuilder->weld_label("type"))
+, m_xFtMSShowPath(m_xBuilder->weld_label("location"))
+, m_xFtMSShowContent(m_xBuilder->weld_label("contents"))
+, m_xFtMSShowChangeDate(m_xBuilder->weld_label("modified"))
 {
-get(m_pFiMSImage, "image");
-get(m_pEdtMSName, "name");
-get(m_pFtMSShowType, "type");
-get(m_pFtMSShowPath, "location");
-get(m_pFtMSShowContent, "contents");
-get(m_pFtMSShowChangeDate, "modified");
-}
-
-
-TPGalleryThemeGeneral::~TPGalleryThemeGeneral()
-{
-disposeOnce();
-}
-
-
-void TPGalleryThemeGeneral::dispose()
-{
-m_pFiMSImage.clear();
-m_pEdtMSName.clear();
-m_pFtMSShowType.clear();
-m_pFtMSShowPath.clear();
-m_pFtMSShowContent.clear();
-m_pFtMSShowChangeDate.clear();
-SfxTabPage::dispose();
 }
 
-
 void TPGalleryThemeGeneral::SetXChgData( ExchangeData* _pData )
 {
 pData = _pData;
@@ -627,19 +605,15 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* 
_pData )
 OUStringaType( SvxResId( RID_SVXSTR_GALLERYPROPS_GALTHEME ) );
 boolbReadOnly = pThm->IsReadOnly();
 
-m_pEdtMSName->SetText( pThm->GetName() );
-m_pEdtMSName->SetReadOnly( bReadOnly );
-
-if( bReadOnly )
-m_pEdtMSName->Disable();
-else
-m_pEdtMSName->Enable();
+m_xEdtMSName->set_text(pThm->GetName());
+m_xEdtMSName->set_editable(!bReadOnly);
+m_xEdtMSName->set_sensitive(!bReadOnly);
 
 if( pThm->IsReadOnly() )
 aType += CuiResId( RID_SVXSTR_GALLERY_READONLY );
 
-m_pFtMSShowType->SetText( aType );
-m_pFtMSShowPath->SetText( pThm->GetSdgURL().GetMainURL( 
INetURLObject::DecodeMechanism::Unambiguous ) );
+m_xFtMSShowType->set_label(aType);
+
m_xFtMSShowPath->set_label(pThm->GetSdgURL().GetMainURL(INetURLObject::DecodeMechanism::Unambiguous));
 
 // singular or plural?
 if ( 1 == pThm->GetObjectCount() )
@@ -649,7 +623,7 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* 
_pData )
 
 aOutStr += " " + aObjStr;
 
-m_pFtMSShowContent->SetText( aOutStr );
+m_xFtMSShowContent->set_label(aOutStr);
 
 // get locale wrapper (singleton)
 const SvtSysLocale aSysLocale;
@@ -657,7 +631,7 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* 
_pData )
 
 // ChangeDate/Time
 aAccess = aLocaleData.getDate( pData->aThemeChangeDate ) + ", " + 
aLocaleData.getTime( pData->aThemeChangeTime );
-m_pFtMSShowChangeDate->SetText( aAccess );
+m_xFtMSShowChangeDate->set_label(aAccess);
 
 // set image
 OUString sId;
@@ -669,21 +643,20 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* 
_pData )
 else
 sId = RID_SVXBMP_THEME_NORMAL_BIG;
 
-m_pFiMSImage->SetImage(Image(BitmapEx(sId)));
+m_xFiMSImage->set_from_icon_name(sId);
 }
 
 bool TPGalleryThemeGeneral::FillItemSet( SfxItemSet* /*rSet*/ )
 {
-pData->aEditedTitle = m_pEdtMSName->GetText();
+pData->aEditedTitle = m_xEdtMSName->get_text();
 return true;
 }
 
-VclPtr TPGa

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

2018-05-02 Thread Caolán McNamara
 cui/source/inc/textanim.hxx|   63 ++---
 cui/source/tabpages/textanim.cxx   |  417 -
 cui/uiconfig/ui/textanimtabpage.ui |   30 +-
 include/vcl/weld.hxx   |   16 +
 vcl/source/app/salvtables.cxx  |   74 +-
 vcl/source/window/builder.cxx  |6 
 vcl/unx/gtk3/gtk3gtkinst.cxx   |   15 -
 7 files changed, 328 insertions(+), 293 deletions(-)

New commits:
commit c7f9599f685a8e297be32fe6db5de04068b22d05
Author: Caolán McNamara 
Date:   Wed May 2 09:23:43 2018 +0100

weld SvxTextAnimationPage

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

diff --git a/cui/source/inc/textanim.hxx b/cui/source/inc/textanim.hxx
index 0d568d7dd1f6..958b99841acc 100644
--- a/cui/source/inc/textanim.hxx
+++ b/cui/source/inc/textanim.hxx
@@ -39,50 +39,49 @@ class SvxTextAnimationPage : public SfxTabPage
 private:
 static const sal_uInt16 pRanges[];
 
-VclPtr m_pLbEffect;
-VclPtr  m_pBoxDirection;
-VclPtr  m_pBtnUp;
-VclPtr  m_pBtnLeft;
-VclPtr  m_pBtnRight;
-VclPtr  m_pBtnDown;
-
-VclPtrm_pFlProperties;
-VclPtr m_pTsbStartInside;
-VclPtr m_pTsbStopInside;
-
-VclPtr  m_pBoxCount;
-VclPtr m_pTsbEndless;
-VclPtrm_pNumFldCount;
-
-VclPtr m_pTsbPixel;
-VclPtr m_pMtrFldAmount;
-
-VclPtr m_pTsbAuto;
-VclPtr m_pMtrFldDelay;
-
 const SfxItemSet&   rOutAttrs;
 SdrTextAniKind  eAniKind;
 FieldUnit   eFUnit;
 MapUnit eUnit;
 
-DECL_LINK( SelectEffectHdl_Impl, ListBox&, void );
-DECL_LINK( ClickEndlessHdl_Impl, Button*, void );
-DECL_LINK( ClickAutoHdl_Impl, Button*, void );
-DECL_LINK( ClickPixelHdl_Impl, Button*, void );
-DECL_LINK( ClickDirectionHdl_Impl, Button*, void );
-
-voidSelectDirection( SdrTextAniDirection nValue );
-sal_uInt16  GetSelectedDirection();
-
 TriState m_aUpState;
 TriState m_aLeftState;
 TriState m_aRightState;
 TriState m_aDownState;
 
+std::unique_ptr m_xLbEffect;
+std::unique_ptr m_xBoxDirection;
+std::unique_ptr m_xBtnUp;
+std::unique_ptr m_xBtnLeft;
+std::unique_ptr m_xBtnRight;
+std::unique_ptr m_xBtnDown;
+
+std::unique_ptr m_xFlProperties;
+std::unique_ptr m_xTsbStartInside;
+std::unique_ptr m_xTsbStopInside;
+
+std::unique_ptr m_xBoxCount;
+std::unique_ptr m_xTsbEndless;
+std::unique_ptr m_xNumFldCount;
+
+std::unique_ptr m_xTsbPixel;
+std::unique_ptr m_xMtrFldAmount;
+
+std::unique_ptr m_xTsbAuto;
+std::unique_ptr m_xMtrFldDelay;
+
+DECL_LINK( SelectEffectHdl_Impl, weld::ComboBoxText&, void );
+DECL_LINK( ClickEndlessHdl_Impl, weld::Button&, void );
+DECL_LINK( ClickAutoHdl_Impl, weld::Button&, void );
+DECL_LINK( ClickPixelHdl_Impl, weld::Button&, void );
+DECL_LINK( ClickDirectionHdl_Impl, weld::Button&, void );
+
+void SelectDirection( SdrTextAniDirection nValue );
+sal_uInt16 GetSelectedDirection();
+
 public:
-SvxTextAnimationPage( vcl::Window* pWindow, const SfxItemSet& rInAttrs );
+SvxTextAnimationPage(TabPageParent pPage, const SfxItemSet& rInAttrs);
 virtual ~SvxTextAnimationPage() override;
-virtual void dispose() override;
 
 static VclPtr  Create( TabPageParent, const SfxItemSet* );
 static const sal_uInt16* GetRanges() { return pRanges; }
diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx
index cb8f10c9afb0..3a2ca39e625c 100644
--- a/cui/source/tabpages/textanim.cxx
+++ b/cui/source/tabpages/textanim.cxx
@@ -87,77 +87,50 @@ void SvxTextTabDialog::PageCreated( sal_uInt16 nId, 
SfxTabPage &rPage )
 |*
 \/
 
-SvxTextAnimationPage::SvxTextAnimationPage(vcl::Window* pWindow, const 
SfxItemSet& rInAttrs)
-: SfxTabPage(pWindow, "TextAnimation", "cui/ui/textanimtabpage.ui", 
&rInAttrs)
+SvxTextAnimationPage::SvxTextAnimationPage(TabPageParent pPage, const 
SfxItemSet& rInAttrs)
+: SfxTabPage(pPage, "cui/ui/textanimtabpage.ui", "TextAnimation", 
&rInAttrs)
 , rOutAttrs(rInAttrs)
 , eAniKind(SdrTextAniKind::NONE)
 , m_aUpState(TRISTATE_INDET)
 , m_aLeftState(TRISTATE_INDET)
 , m_aRightState(TRISTATE_INDET)
 , m_aDownState(TRISTATE_INDET)
+, m_xLbEffect(m_xBuilder->weld_combo_box_text("LB_EFFECT"))
+, m_xBoxDirection(m_xBuilder->weld_widget("boxDIRECTION"))
+, m_xBtnUp(m_xBuilder->weld_toggle_button("BTN_UP"))
+, m_xBtnLeft(m_xBuilder->weld_toggle_button("BTN_LEFT"))
+, m_xBtnRight(m_xBuilder->weld_toggle_button("BTN_RIGHT"))
+, m_xBtnDown(m_xBuilder->weld_toggle_button("BTN_DOWN"))
+