[Libreoffice-commits] core.git: chart2/source cui/source cui/uiconfig include/svx sc/source sd/source sw/source

Caolán McNamara caolanm at redhat.com
Thu May 3 19:57:31 UTC 2018


 chart2/source/controller/main/ShapeController.cxx |    2 
 cui/source/factory/dlgfact.cxx                    |   39 +++++++++-
 cui/source/factory/dlgfact.hxx                    |   20 +++++
 cui/source/inc/textanim.hxx                       |   10 --
 cui/source/tabpages/textanim.cxx                  |   19 +----
 cui/uiconfig/ui/textanimtabpage.ui                |   16 ++--
 cui/uiconfig/ui/textattrtabpage.ui                |   14 +--
 cui/uiconfig/ui/textdialog.ui                     |   82 ++++++++++++++++++----
 include/svx/svxdlg.hxx                            |    2 
 sc/source/ui/drawfunc/drawsh.cxx                  |    3 
 sc/source/ui/drawfunc/drtxtob.cxx                 |    3 
 sd/source/ui/func/futxtatt.cxx                    |    2 
 sw/source/uibase/shells/drawdlg.cxx               |    2 
 sw/source/uibase/shells/drwtxtsh.cxx              |    2 
 14 files changed, 155 insertions(+), 61 deletions(-)

New commits:
commit 098ba55907b0fec87fe8f62b52a087a4f2f9239e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu May 3 10:24:52 2018 +0100

    weld SvxTextTabDialog
    
    Change-Id: I2a48230d38fbc3c7d3e1e3b3ad43d4b17f48ed16
    Reviewed-on: https://gerrit.libreoffice.org/53783
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
index 1ffe80d2786b..1b6a89b94985 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -336,7 +336,7 @@ void ShapeController::executeDispatch_TextAttributes()
             if ( pFact )
             {
                 ScopedVclPtr< SfxAbstractTabDialog > pDlg(
-                    pFact->CreateTextTabDialog( pChartWindow, &aAttr, pDrawViewWrapper ) );
+                    pFact->CreateTextTabDialog( pChartWindow ? pChartWindow->GetFrameWeld() : nullptr, &aAttr, pDrawViewWrapper ) );
                 if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
                 {
                     const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 85b2d1504c37..a22a64c1f933 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -275,6 +275,38 @@ void CuiAbstractTabDialog_Impl::SetText( const OUString& rStr )
     pDlg->SetText( rStr );
 }
 
+short CuiAbstractTabController_Impl::Execute()
+{
+    return m_xDlg->execute();
+}
+
+void CuiAbstractTabController_Impl::SetCurPageId( const OString &rName )
+{
+    m_xDlg->SetCurPageId( rName );
+}
+
+const SfxItemSet* CuiAbstractTabController_Impl::GetOutputItemSet() const
+{
+    return m_xDlg->GetOutputItemSet();
+}
+
+const sal_uInt16* CuiAbstractTabController_Impl::GetInputRanges(const SfxItemPool& pItem )
+{
+    return m_xDlg->GetInputRanges( pItem );
+}
+
+void CuiAbstractTabController_Impl::SetInputSet( const SfxItemSet* pInSet )
+{
+     m_xDlg->SetInputSet( pInSet );
+}
+
+//From class Window.
+void CuiAbstractTabController_Impl::SetText( const OUString& rStr )
+{
+    m_xDlg->set_title(rStr);
+}
+
+
 
 const SfxItemSet* CuiAbstractSfxDialog_Impl::GetOutputItemSet() const
 {
@@ -934,12 +966,11 @@ VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateCustomizeTabDialo
 }
 
 // TabDialog that use functionality of the drawing layer
-VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateTextTabDialog( vcl::Window* pParent,
+VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateTextTabDialog(weld::Window* pParent,
                                             const SfxItemSet* pAttrSet,
-                                            SdrView* pView )
+                                            SdrView* pView)
 {
-    VclPtrInstance<SvxTextTabDialog> pDlg( pParent, pAttrSet, pView );
-    return VclPtr<CuiAbstractTabDialog_Impl>::Create( pDlg );
+    return VclPtr<CuiAbstractTabController_Impl>::Create(new SvxTextTabDialog(pParent, pAttrSet, pView));
 }
 
 // TabDialog that use functionality of the drawing layer and add AnchorTypes -- for SvxCaptionTabDialog
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 9de13861ee17..b1239c049e00 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -124,6 +124,24 @@ class CuiAbstractTabDialog_Impl : public SfxAbstractTabDialog
     virtual void        SetText( const OUString& rStr ) override;
 };
 
+class CuiAbstractTabController_Impl : public SfxAbstractTabDialog
+{
+protected:
+    std::unique_ptr<SfxTabDialogController> m_xDlg;
+public:
+    explicit CuiAbstractTabController_Impl(SfxTabDialogController* p)
+        : m_xDlg(p)
+    {
+    }
+    virtual short Execute() override;
+    virtual void                SetCurPageId( const OString &rName ) override;
+    virtual const SfxItemSet*   GetOutputItemSet() const override;
+    virtual const sal_uInt16*   GetInputRanges( const SfxItemPool& pItem ) override;
+    virtual void                SetInputSet( const SfxItemSet* pInSet ) override;
+        //From class Window.
+    virtual void        SetText( const OUString& rStr ) override;
+};
+
 class SvxDistributeDialog;
 class AbstractSvxDistributeDialog_Impl: public AbstractSvxDistributeDialog
 {
@@ -588,7 +606,7 @@ public:
     virtual VclPtr<SfxAbstractTabDialog> CreateCustomizeTabDialog(
                                             const SfxItemSet* pAttrSet,
                                             const css::uno::Reference< css::frame::XFrame >& xViewFrame ) override;
-    virtual VclPtr<SfxAbstractTabDialog> CreateTextTabDialog( vcl::Window* pParent,
+    virtual VclPtr<SfxAbstractTabDialog> CreateTextTabDialog( weld::Window* pParent,
                                             const SfxItemSet* pAttrSet,
                                             SdrView* pView ) override;
     virtual VclPtr<SfxAbstractTabDialog> CreateTabItemDialog(vcl::Window* pParent,
diff --git a/cui/source/inc/textanim.hxx b/cui/source/inc/textanim.hxx
index 958b99841acc..953399d718e8 100644
--- a/cui/source/inc/textanim.hxx
+++ b/cui/source/inc/textanim.hxx
@@ -95,21 +95,17 @@ public:
 |* Text-Tab-Dialog
 |*
 \************************************************************************/
-class SvxTextTabDialog : public SfxTabDialog
+class SvxTextTabDialog : public SfxTabDialogController
 {
-    sal_uInt16          m_nTextId;
 private:
     const SdrView*      pView;
 
-    virtual void        PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override;
+    virtual void        PageCreated(const OString& rId, SfxTabPage &rPage) override;
 
 public:
-
-            SvxTextTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr,
-                                const SdrView* pView );
+    SvxTextTabDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrView* pView);
 };
 
-
 #endif // INCLUDED_CUI_SOURCE_INC_TEXTANIM_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx
index 3a2ca39e625c..ac79e3607893 100644
--- a/cui/source/tabpages/textanim.cxx
+++ b/cui/source/tabpages/textanim.cxx
@@ -41,17 +41,12 @@ const sal_uInt16 SvxTextAnimationPage::pRanges[] =
 |*
 \************************************************************************/
 
-SvxTextTabDialog::SvxTextTabDialog( vcl::Window* pParent,
-                                const SfxItemSet* pAttr,
-                                const SdrView* pSdrView ) :
-        SfxTabDialog        ( pParent
-                              ,"TextDialog"
-                              ,"cui/ui/textdialog.ui"
-                              , pAttr ),
-        pView               ( pSdrView )
+SvxTextTabDialog::SvxTextTabDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrView* pSdrView)
+    : SfxTabDialogController(pParent, "cui/ui/textdialog.ui", "TextDialog", pAttr)
+    , pView(pSdrView)
 {
-    m_nTextId = AddTabPage( "RID_SVXPAGE_TEXTATTR", SvxTextAttrPage::Create, nullptr);
-    AddTabPage( "RID_SVXPAGE_TEXTANIMATION", SvxTextAnimationPage::Create, nullptr);
+    AddTabPage("RID_SVXPAGE_TEXTATTR", SvxTextAttrPage::Create, nullptr);
+    AddTabPage("RID_SVXPAGE_TEXTANIMATION", SvxTextAnimationPage::Create, nullptr);
 }
 
 /*************************************************************************
@@ -60,9 +55,9 @@ SvxTextTabDialog::SvxTextTabDialog( vcl::Window* pParent,
 |*
 \************************************************************************/
 
-void SvxTextTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
+void SvxTextTabDialog::PageCreated(const OString& rId, SfxTabPage &rPage)
 {
-    if (nId == m_nTextId)
+    if (rId == "RID_SVXPAGE_TEXTATTR")
     {
         const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
         bool bHasMarked = rMarkList.GetMarkCount() > 0;
diff --git a/cui/uiconfig/ui/textanimtabpage.ui b/cui/uiconfig/ui/textanimtabpage.ui
index a6c701af5ee0..d234f5af44b9 100644
--- a/cui/uiconfig/ui/textanimtabpage.ui
+++ b/cui/uiconfig/ui/textanimtabpage.ui
@@ -268,7 +268,7 @@
                   <object class="GtkCheckButton" id="TSB_START_INSIDE">
                     <property name="label" translatable="yes" context="textanimtabpage|TSB_START_INSIDE">S_tart inside</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="use_underline">True</property>
                     <property name="xalign">0</property>
@@ -285,7 +285,7 @@
                   <object class="GtkCheckButton" id="TSB_STOP_INSIDE">
                     <property name="label" translatable="yes" context="textanimtabpage|TSB_STOP_INSIDE">Text _visible when exiting</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="use_underline">True</property>
                     <property name="xalign">0</property>
@@ -322,7 +322,7 @@
                       <object class="GtkCheckButton" id="TSB_ENDLESS">
                         <property name="label" translatable="yes" context="textanimtabpage|TSB_ENDLESS">_Continuous</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
+                        <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="use_underline">True</property>
                         <property name="xalign">0</property>
@@ -341,7 +341,7 @@
                     <child>
                       <object class="GtkSpinButton" id="NUM_FLD_COUNT">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
+                        <property name="can_focus">True</property>
                         <property name="halign">start</property>
                         <property name="activates_default">True</property>
                         <accessibility>
@@ -385,7 +385,7 @@
                       <object class="GtkCheckButton" id="TSB_PIXEL">
                         <property name="label" translatable="yes" context="textanimtabpage|TSB_PIXEL">_Pixels</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
+                        <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="use_underline">True</property>
                         <property name="xalign">0</property>
@@ -404,7 +404,7 @@
                     <child>
                       <object class="GtkSpinButton" id="MTR_FLD_AMOUNT">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
+                        <property name="can_focus">True</property>
                         <property name="halign">start</property>
                         <property name="activates_default">True</property>
                         <accessibility>
@@ -448,7 +448,7 @@
                       <object class="GtkCheckButton" id="TSB_AUTO">
                         <property name="label" translatable="yes" context="textanimtabpage|TSB_AUTO">_Automatic</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
+                        <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="use_underline">True</property>
                         <property name="xalign">0</property>
@@ -467,7 +467,7 @@
                     <child>
                       <object class="GtkSpinButton" id="MTR_FLD_DELAY">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
+                        <property name="can_focus">True</property>
                         <property name="halign">start</property>
                         <property name="activates_default">True</property>
                         <accessibility>
diff --git a/cui/uiconfig/ui/textattrtabpage.ui b/cui/uiconfig/ui/textattrtabpage.ui
index f5ee8ec34ed1..2b6b02b5a4d7 100644
--- a/cui/uiconfig/ui/textattrtabpage.ui
+++ b/cui/uiconfig/ui/textattrtabpage.ui
@@ -300,7 +300,7 @@
                     <child>
                       <object class="GtkSpinButton" id="MTR_FLD_LEFT">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
+                        <property name="can_focus">True</property>
                         <property name="activates_default">True</property>
                         <property name="adjustment">adjustment1</property>
                         <property name="digits">2</property>
@@ -313,7 +313,7 @@
                     <child>
                       <object class="GtkSpinButton" id="MTR_FLD_RIGHT">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
+                        <property name="can_focus">True</property>
                         <property name="activates_default">True</property>
                         <property name="adjustment">adjustment2</property>
                         <property name="digits">2</property>
@@ -326,7 +326,7 @@
                     <child>
                       <object class="GtkSpinButton" id="MTR_FLD_TOP">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
+                        <property name="can_focus">True</property>
                         <property name="activates_default">True</property>
                         <property name="adjustment">adjustment3</property>
                         <property name="digits">2</property>
@@ -339,7 +339,7 @@
                     <child>
                       <object class="GtkSpinButton" id="MTR_FLD_BOTTOM">
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
+                        <property name="can_focus">True</property>
                         <property name="activates_default">True</property>
                         <property name="adjustment">adjustment4</property>
                         <property name="digits">2</property>
@@ -374,21 +374,19 @@
         <child>
           <object class="GtkFrame" id="FL_POSITION">
             <property name="visible">True</property>
-            <property name="can_focus">True</property>
+            <property name="can_focus">False</property>
             <property name="label_xalign">0</property>
             <property name="shadow_type">none</property>
             <child>
               <object class="GtkAlignment" id="alignment3">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="vexpand">True</property>
                 <property name="top_padding">6</property>
                 <property name="left_padding">12</property>
                 <child>
                   <object class="GtkBox" id="box3">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="vexpand">True</property>
                     <property name="orientation">vertical</property>
                     <property name="spacing">6</property>
                     <child>
@@ -426,7 +424,7 @@
                       <object class="GtkCheckButton" id="TSB_FULL_WIDTH">
                         <property name="label" translatable="yes" context="textattrtabpage|TSB_FULL_WIDTH">Full _width</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">False</property>
+                        <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="use_underline">True</property>
                         <property name="xalign">0</property>
diff --git a/cui/uiconfig/ui/textdialog.ui b/cui/uiconfig/ui/textdialog.ui
index f31c82d9997a..7a7a43d88559 100644
--- a/cui/uiconfig/ui/textdialog.ui
+++ b/cui/uiconfig/ui/textdialog.ui
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.20.4 -->
 <interface domain="cui">
   <requires lib="gtk+" version="3.18"/>
   <object class="GtkDialog" id="TextDialog">
@@ -7,6 +7,9 @@
     <property name="border_width">6</property>
     <property name="title" translatable="yes" context="textdialog|TextDialog">Text</property>
     <property name="resizable">False</property>
+    <property name="modal">True</property>
+    <property name="default_width">0</property>
+    <property name="default_height">0</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox1">
@@ -18,12 +21,10 @@
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
-              <object class="GtkButton" id="ok">
-                <property name="label">gtk-ok</property>
+              <object class="GtkButton" id="reset">
+                <property name="label">gtk-revert-to-saved</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
                 <property name="receives_default">True</property>
                 <property name="use_stock">True</property>
               </object>
@@ -34,10 +35,12 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="cancel">
-                <property name="label">gtk-cancel</property>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
                 <property name="receives_default">True</property>
                 <property name="use_stock">True</property>
               </object>
@@ -48,8 +51,8 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="help">
-                <property name="label">gtk-help</property>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
@@ -59,12 +62,11 @@
                 <property name="expand">False</property>
                 <property name="fill">True</property>
                 <property name="position">2</property>
-                <property name="secondary">True</property>
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="reset">
-                <property name="label">gtk-revert-to-saved</property>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
@@ -74,6 +76,7 @@
                 <property name="expand">False</property>
                 <property name="fill">True</property>
                 <property name="position">3</property>
+                <property name="secondary">True</property>
               </packing>
             </child>
           </object>
@@ -87,7 +90,7 @@
         <child>
           <object class="GtkNotebook" id="tabcontrol">
             <property name="visible">True</property>
-            <property name="can_focus">False</property>
+            <property name="can_focus">True</property>
             <property name="hexpand">True</property>
             <property name="vexpand">True</property>
             <child>
@@ -97,6 +100,30 @@
                 <child>
                   <placeholder/>
                 </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
               </object>
             </child>
             <child type="tab">
@@ -116,6 +143,30 @@
                 <child>
                   <placeholder/>
                 </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
               </object>
               <packing>
                 <property name="position">1</property>
@@ -142,10 +193,13 @@
       </object>
     </child>
     <action-widgets>
+      <action-widget response="0">reset</action-widget>
       <action-widget response="-5">ok</action-widget>
       <action-widget response="-6">cancel</action-widget>
       <action-widget response="-11">help</action-widget>
-      <action-widget response="0">reset</action-widget>
     </action-widgets>
+    <child>
+      <placeholder/>
+    </child>
   </object>
 </interface>
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 3d60ad7de275..1d8b43f4c7b0 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -335,7 +335,7 @@ public:
 
     virtual                             ~SvxAbstractDialogFactory() override;
 
-    virtual VclPtr<SfxAbstractTabDialog>      CreateTextTabDialog( vcl::Window* pParent,
+    virtual VclPtr<SfxAbstractTabDialog>      CreateTextTabDialog( weld::Window* pParent,
                                             const SfxItemSet* pAttrSet,
                                             SdrView* pView ) = 0 ;
 
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 32782c5385b4..ab1b08a37f4f 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -446,7 +446,8 @@ void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq )
         pView->MergeAttrFromMarked( aNewAttr, false );
 
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-    ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( pViewData->GetDialogParent(), &aNewAttr, pView ));
+    vcl::Window* pWin = pViewData->GetDialogParent();
+    ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(pWin ? pWin->GetFrameWeld() : nullptr, &aNewAttr, pView));
 
     sal_uInt16 nResult = pDlg->Execute();
 
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index 0da8c62579eb..6a6ac2ef0528 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -874,7 +874,8 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq )
             case SID_DRAWTEXT_ATTR_DLG:
                 {
                     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-                    ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( pViewData->GetDialogParent(), &aEditAttr, pView ));
+                    vcl::Window* pWin = pViewData->GetDialogParent();
+                    ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( pWin ? pWin->GetFrameWeld() : nullptr, &aEditAttr, pView ));
 
                     bDone = ( RET_OK == pDlg->Execute() );
 
diff --git a/sd/source/ui/func/futxtatt.cxx b/sd/source/ui/func/futxtatt.cxx
index 78fcb3f011d0..721acabcdcb0 100644
--- a/sd/source/ui/func/futxtatt.cxx
+++ b/sd/source/ui/func/futxtatt.cxx
@@ -57,7 +57,7 @@ void FuTextAttrDlg::DoExecute( SfxRequest& rReq )
     if( !pArgs )
     {
         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-        ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( nullptr, &aNewAttr, mpView ));
+        ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(rReq.GetFrameWeld(), &aNewAttr, mpView));
 
         sal_uInt16 nResult = pDlg->Execute();
 
diff --git a/sw/source/uibase/shells/drawdlg.cxx b/sw/source/uibase/shells/drawdlg.cxx
index 21dbe250db15..2edc3848a9c0 100644
--- a/sw/source/uibase/shells/drawdlg.cxx
+++ b/sw/source/uibase/shells/drawdlg.cxx
@@ -54,7 +54,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
             SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
             if ( pFact )
             {
-                ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( nullptr, &aNewAttr, pView ));
+                ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(rReq.GetFrameWeld(), &aNewAttr, pView));
                 sal_uInt16 nResult = pDlg->Execute();
 
                 if (nResult == RET_OK)
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index 130af5052b3e..f4a1f7f8b263 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -440,7 +440,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
                 if ( pFact )
                 {
                     ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(
-                                &(GetView().GetViewFrame()->GetWindow()),
+                                GetView().GetViewFrame()->GetWindow().GetFrameWeld(),
                                 &aNewAttr, pSdrView ));
                     sal_uInt16 nResult = pDlg->Execute();
 


More information about the Libreoffice-commits mailing list