[Libreoffice-commits] core.git: dbaccess/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 24 18:28:55 UTC 2020


 dbaccess/source/ui/browser/sbagrid.cxx          |    2 +-
 dbaccess/source/ui/control/FieldDescControl.cxx |    2 +-
 dbaccess/source/ui/dlg/dlgattr.cxx              |    2 +-
 dbaccess/source/ui/inc/UITools.hxx              |    9 ++++++---
 dbaccess/source/ui/inc/dlgattr.hxx              |    2 +-
 dbaccess/source/ui/misc/UITools.cxx             |    8 ++++----
 6 files changed, 14 insertions(+), 11 deletions(-)

New commits:
commit 77af4cb9715a00f4f5165fcd912b9640d5ffbca3
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jul 24 17:02:17 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jul 24 20:28:17 2020 +0200

    move callColumnFormatDialog to use weld::Widget
    
    instead of vcl::Window
    
    Change-Id: I7c7692c91a610030fc523ba55fd5b73e503dd1ec
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99386
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 4c88ec938766..3af305f5ead5 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -791,7 +791,7 @@ void SbaGridControl::SetColAttrs(sal_uInt16 nColId)
 
     // get the field the column is bound to
     Reference< XPropertySet >  xField = getField(nModelPos);
-    ::dbaui::callColumnFormatDialog(xAffectedCol,xField,pFormatter,this);//(Window::GetSettings().GetLanguage());
+    ::dbaui::callColumnFormatDialog(xAffectedCol,xField,pFormatter,GetFrameWeld());
 }
 
 void SbaGridControl::SetBrowserAttrs()
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index dff28c54f767..54365392353b 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -329,7 +329,7 @@ IMPL_LINK_NOARG(OFieldDescControl, FormatClickHdl, weld::Button&, void)
         return;
 
     SvNumberFormatter* pFormatter = pSupplierImpl->GetNumberFormatter();
-    if(!::dbaui::callColumnFormatDialog(this,pFormatter,pActFieldDescr->GetType(),nOldFormatKey,rOldJustify,true))
+    if(!::dbaui::callColumnFormatDialog(m_xContainer.get(),pFormatter,pActFieldDescr->GetType(),nOldFormatKey,rOldJustify,true))
         return;
 
     bool bModified = false;
diff --git a/dbaccess/source/ui/dlg/dlgattr.cxx b/dbaccess/source/ui/dlg/dlgattr.cxx
index a69f29fe7fb2..ce42469873c4 100644
--- a/dbaccess/source/ui/dlg/dlgattr.cxx
+++ b/dbaccess/source/ui/dlg/dlgattr.cxx
@@ -31,7 +31,7 @@
 using namespace dbaui;
 
 
-SbaSbAttrDlg::SbaSbAttrDlg(weld::Window* pParent, const SfxItemSet* pCellAttrs,
+SbaSbAttrDlg::SbaSbAttrDlg(weld::Widget* pParent, const SfxItemSet* pCellAttrs,
     SvNumberFormatter* pFormatter, bool bHasFormat)
     : SfxTabDialogController(pParent, "dbaccess/ui/fielddialog.ui", "FieldDialog", pCellAttrs)
 {
diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx
index 0ea5b03c93c3..913504f4e4f6 100644
--- a/dbaccess/source/ui/inc/UITools.hxx
+++ b/dbaccess/source/ui/inc/UITools.hxx
@@ -68,7 +68,10 @@ namespace svt
 }
 
 namespace vcl { class Window; }
-namespace weld {class Window; }
+namespace weld {
+    class Widget;
+    class Window;
+}
 class ToolBox;
 namespace vcl { class Font; }
 class SvNumberFormatter;
@@ -181,11 +184,11 @@ namespace dbaui
     void callColumnFormatDialog(const css::uno::Reference< css::beans::XPropertySet>& _xAffectedCol,
                                 const css::uno::Reference< css::beans::XPropertySet>& _xField,
                                 SvNumberFormatter* _pFormatter,
-                                const vcl::Window* _pParent);
+                                weld::Widget* _pParent);
 
     /** second variant of the function before
     */
-    bool callColumnFormatDialog(const vcl::Window* _pParent,
+    bool callColumnFormatDialog(weld::Widget* _pParent,
                                     SvNumberFormatter* _pFormatter,
                                     sal_Int32 _nDataType,
                                     sal_Int32& _nFormatKey,
diff --git a/dbaccess/source/ui/inc/dlgattr.hxx b/dbaccess/source/ui/inc/dlgattr.hxx
index 6be420776208..5be28fa6129b 100644
--- a/dbaccess/source/ui/inc/dlgattr.hxx
+++ b/dbaccess/source/ui/inc/dlgattr.hxx
@@ -32,7 +32,7 @@ namespace dbaui
         std::unique_ptr<SvxNumberInfoItem> pNumberInfoItem;
 
     public:
-        SbaSbAttrDlg(weld::Window * pParent, const SfxItemSet*, SvNumberFormatter*, bool bHasFormat);
+        SbaSbAttrDlg(weld::Widget* pParent, const SfxItemSet*, SvNumberFormatter*, bool bHasFormat);
         virtual ~SbaSbAttrDlg() override;
 
         virtual void  PageCreated(const OString& rPageId, SfxTabPage& rTabPage) override;
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index e7c5a72ffbb3..46b6c83f5692 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -720,7 +720,7 @@ SvxCellHorJustify mapTextJustify(sal_Int32 _nAlignment)
 void callColumnFormatDialog(const Reference<XPropertySet>& xAffectedCol,
                             const Reference<XPropertySet>& xField,
                             SvNumberFormatter* _pFormatter,
-                            const vcl::Window* _pParent)
+                            weld::Widget* _pParent)
 {
     if (!(xAffectedCol.is() && xField.is()))
         return;
@@ -753,7 +753,7 @@ void callColumnFormatDialog(const Reference<XPropertySet>& xAffectedCol,
     }
 }
 
-bool callColumnFormatDialog(const vcl::Window* _pParent,
+bool callColumnFormatDialog(weld::Widget* _pParent,
                                 SvNumberFormatter* _pFormatter,
                                 sal_Int32 _nDataType,
                                 sal_Int32& _nFormatKey,
@@ -805,7 +805,7 @@ bool callColumnFormatDialog(const vcl::Window* _pParent,
             pFormatDescriptor->Put(SfxBoolItem(SID_ATTR_NUMBERFORMAT_ONE_AREA, true));
             if (!_pFormatter->IsTextFormat(_nFormatKey))
                 // text fields can only have text formats
-                _nFormatKey = _pFormatter->GetStandardFormat(SvNumFormatType::TEXT,_pParent->GetSettings().GetLanguageTag().getLanguageType());
+                _nFormatKey = _pFormatter->GetStandardFormat(SvNumFormatType::TEXT, Application::GetSettings().GetLanguageTag().getLanguageType());
         }
 
         pFormatDescriptor->Put(SfxUInt32Item(SBA_DEF_FMTVALUE, _nFormatKey));
@@ -818,7 +818,7 @@ bool callColumnFormatDialog(const vcl::Window* _pParent,
     }
 
     {   // want the dialog to be destroyed before our set
-        SbaSbAttrDlg aDlg(_pParent->GetFrameWeld(), pFormatDescriptor.get(), _pFormatter, _bHasFormat);
+        SbaSbAttrDlg aDlg(_pParent, pFormatDescriptor.get(), _pFormatter, _bHasFormat);
         if (RET_OK == aDlg.run())
         {
             // ItemSet->UNO


More information about the Libreoffice-commits mailing list