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

Caolán McNamara caolanm at redhat.com
Tue Apr 3 19:02:27 UTC 2018


 cui/source/dialogs/pastedlg.cxx          |   67 ++++++++++++-------------------
 cui/source/factory/dlgfact.cxx           |   22 ++++++----
 cui/source/factory/dlgfact.hxx           |   11 ++++-
 cui/source/inc/pastedlg.hxx              |   29 ++++---------
 cui/uiconfig/ui/pastespecial.ui          |   44 +++++++++++++++++---
 dbaccess/source/ui/app/AppController.cxx |    4 -
 include/sfx2/sfxdlg.hxx                  |    2 
 sc/source/ui/drawfunc/drtxtob1.cxx       |    3 -
 sc/source/ui/view/cellsh1.cxx            |    2 
 sc/source/ui/view/editsh.cxx             |    3 -
 sd/source/ui/func/fuinsert.cxx           |    2 
 sw/source/uibase/dochdl/swdtflvr.cxx     |    2 
 sw/source/uibase/shells/annotsh.cxx      |    2 
 13 files changed, 107 insertions(+), 86 deletions(-)

New commits:
commit c5dac92053f053f302ac404afe0816b4d0654158
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Apr 3 16:27:56 2018 +0100

    weld SvPasteObjectDialog
    
    Change-Id: I5248950fd3650df309015fbaf4302d2541a6374a
    Reviewed-on: https://gerrit.libreoffice.org/52337
    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/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx
index 30205888f936..6c3a2ecaf176 100644
--- a/cui/source/dialogs/pastedlg.cxx
+++ b/cui/source/dialogs/pastedlg.cxx
@@ -37,52 +37,38 @@
 
 #include <dialmgr.hxx>
 
-SvPasteObjectDialog::SvPasteObjectDialog( vcl::Window* pParent )
-    : ModalDialog(pParent, "PasteSpecialDialog", "cui/ui/pastespecial.ui")
+SvPasteObjectDialog::SvPasteObjectDialog(weld::Window* pParent)
+    : GenericDialogController(pParent, "cui/ui/pastespecial.ui", "PasteSpecialDialog")
+    , m_xFtObjectSource(m_xBuilder->weld_label("source"))
+    , m_xLbInsertList(m_xBuilder->weld_tree_view("list"))
+    , m_xOKButton(m_xBuilder->weld_button("ok"))
 {
-    get(m_pFtObjectSource, "source");
-    get(m_pLbInsertList, "list");
-    get(m_pOKButton, "ok");
+    m_xLbInsertList->set_size_request(m_xLbInsertList->get_approximate_digit_width() * 40,
+                                      m_xLbInsertList->get_height_rows(6));
+    m_xOKButton->set_sensitive(false);
 
-    m_pLbInsertList->SetDropDownLineCount(8);
-    m_pLbInsertList->set_width_request(m_pLbInsertList->approximate_char_width() * 32);
-    m_pOKButton->Disable();
-
-    ObjectLB().SetSelectHdl( LINK( this, SvPasteObjectDialog, SelectHdl ) );
-    ObjectLB().SetDoubleClickHdl( LINK( this, SvPasteObjectDialog, DoubleClickHdl ) );
-}
-
-SvPasteObjectDialog::~SvPasteObjectDialog()
-{
-    disposeOnce();
-}
-
-void SvPasteObjectDialog::dispose()
-{
-    m_pFtObjectSource.clear();
-    m_pLbInsertList.clear();
-    m_pOKButton.clear();
-    ModalDialog::dispose();
+    ObjectLB().connect_changed(LINK(this, SvPasteObjectDialog, SelectHdl));
+    ObjectLB().connect_row_activated(LINK( this, SvPasteObjectDialog, DoubleClickHdl));
 }
 
 void SvPasteObjectDialog::SelectObject()
 {
-    if (m_pLbInsertList->GetEntryCount())
+    if (m_xLbInsertList->n_children())
     {
-        m_pLbInsertList->SelectEntryPos(0);
-        SelectHdl(*m_pLbInsertList);
+        m_xLbInsertList->select(0);
+        SelectHdl(*m_xLbInsertList);
     }
 }
 
-IMPL_LINK_NOARG( SvPasteObjectDialog, SelectHdl, ListBox&, void )
+IMPL_LINK_NOARG(SvPasteObjectDialog, SelectHdl, weld::TreeView&, void)
 {
-    if ( !m_pOKButton->IsEnabled() )
-        m_pOKButton->Enable();
+    if (!m_xOKButton->get_sensitive())
+        m_xOKButton->set_sensitive(true);
 }
 
-IMPL_LINK_NOARG( SvPasteObjectDialog, DoubleClickHdl, ListBox&, void )
+IMPL_LINK_NOARG(SvPasteObjectDialog, DoubleClickHdl, weld::TreeView&, void)
 {
-    EndDialog( RET_OK );
+    m_xDialog->response(RET_OK);
 }
 
 /*************************************************************************
@@ -109,7 +95,7 @@ SotClipboardFormatId SvPasteObjectDialog::GetFormat( const TransferableDataHelpe
     SotClipboardFormatId nSelFormat = SotClipboardFormatId::NONE;
     SvGlobalName aEmptyNm;
 
-    ObjectLB().SetUpdateMode( false );
+    ObjectLB().freeze();
 
     for (auto const& format : *pFormats)
     {
@@ -169,9 +155,10 @@ SotClipboardFormatId SvPasteObjectDialog::GetFormat( const TransferableDataHelpe
                     continue;
             }
 
-            if( LISTBOX_ENTRY_NOTFOUND == ObjectLB().GetEntryPos( aName ) )
-                ObjectLB().SetEntryData(
-                    ObjectLB().InsertEntry( aName ), reinterpret_cast<void*>(nFormat) );
+            if (ObjectLB().find(aName) == -1)
+            {
+                ObjectLB().append(OUString::number(static_cast<sal_uInt32>(nFormat)), aName, "");
+            }
         }
     }
 
@@ -190,7 +177,7 @@ SotClipboardFormatId SvPasteObjectDialog::GetFormat( const TransferableDataHelpe
         }
     }
 
-    ObjectLB().SetUpdateMode( true );
+    ObjectLB().thaw();
     SelectObject();
 
     if( !aSourceName.isEmpty() )
@@ -202,11 +189,11 @@ SotClipboardFormatId SvPasteObjectDialog::GetFormat( const TransferableDataHelpe
         aTypeName = convertLineEnd(aTypeName, GetSystemLineEnd());
     }
 
-    m_pFtObjectSource->SetText( aTypeName );
+    m_xFtObjectSource->set_label(aTypeName);
 
-    if( Dialog::Execute() == RET_OK )
+    if (run() == RET_OK)
     {
-        nSelFormat = static_cast<SotClipboardFormatId>(reinterpret_cast<sal_uLong>(ObjectLB().GetSelectedEntryData()));
+        nSelFormat = static_cast<SotClipboardFormatId>(ObjectLB().get_selected_id().toUInt32());
     }
 
     return nSelFormat;
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index a3b1ced56c74..bf07b49fc5d5 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -147,7 +147,12 @@ IMPL_ABSTDLG_BASE(AbstractSvxHpLinkDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractFmSearchDialog_Impl);
 IMPL_ABSTDLG_BASE(AbstractGraphicFilterDialog_Impl);
 IMPL_ABSTDLG_BASE(AbstractSvxAreaTabDialog_Impl);
-IMPL_ABSTDLG_BASE(AbstractPasteDialog_Impl);
+
+short AbstractPasteDialog_Impl::Execute()
+{
+    return m_xDlg->run();
+}
+
 IMPL_ABSTDLG_BASE(AbstractInsertObjectDialog_Impl);
 IMPL_ABSTDLG_BASE(AbstractLinksDialog_Impl);
 IMPL_ABSTDLG_BASE(AbstractSpellDialog_Impl);
@@ -393,19 +398,19 @@ bool AbstractInsertObjectDialog_Impl::IsCreateNew()
    return pDlg->GetIconIfIconified( pGraphicMediaType );
 }
 
-void AbstractPasteDialog_Impl::Insert( SotClipboardFormatId nFormat, const OUString & rFormatName )
+void AbstractPasteDialog_Impl::Insert(SotClipboardFormatId nFormat, const OUString& rFormatName)
 {
-    pDlg->Insert( nFormat, rFormatName );
+    m_xDlg->Insert(nFormat, rFormatName);
 }
 
-void AbstractPasteDialog_Impl::SetObjName( const SvGlobalName & rClass, const OUString & rObjName )
+void AbstractPasteDialog_Impl::SetObjName(const SvGlobalName & rClass, const OUString& rObjName)
 {
-    pDlg->SetObjName( rClass, rObjName );
+    m_xDlg->SetObjName(rClass, rObjName);
 }
 
 SotClipboardFormatId AbstractPasteDialog_Impl::GetFormat( const TransferableDataHelper& aHelper )
 {
-    return pDlg->GetFormat( aHelper );
+    return m_xDlg->GetFormat(aHelper);
 }
 
 void  AbstractFmShowColsDialog_Impl::SetColumns(const ::Reference< css::container::XIndexContainer>& xCols)
@@ -1499,10 +1504,9 @@ VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateEditObjectDialog( co
     return nullptr;
 }
 
-
-VclPtr<SfxAbstractPasteDialog> AbstractDialogFactory_Impl::CreatePasteDialog( vcl::Window* pParent )
+VclPtr<SfxAbstractPasteDialog> AbstractDialogFactory_Impl::CreatePasteDialog(weld::Window* pParent)
 {
-    return VclPtr<AbstractPasteDialog_Impl>::Create( VclPtr<SvPasteObjectDialog>::Create( pParent ) );
+    return VclPtr<AbstractPasteDialog_Impl>::Create(new SvPasteObjectDialog(pParent));
 }
 
 VclPtr<SfxAbstractLinksDialog> AbstractDialogFactory_Impl::CreateLinksDialog( vcl::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML, sfx2::SvBaseLink* p)
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 2b36adee6204..ddea72e2c206 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -433,8 +433,15 @@ class AbstractInsertObjectDialog_Impl : public SfxAbstractInsertObjectDialog
 
 class AbstractPasteDialog_Impl : public SfxAbstractPasteDialog
 {
+protected:
+    std::unique_ptr<SvPasteObjectDialog> m_xDlg;
+public:
+    explicit AbstractPasteDialog_Impl(SvPasteObjectDialog* p)
+        : m_xDlg(p)
+    {
+    }
+    virtual short Execute() override;
 public:
-    DECL_ABSTDLG_BASE(AbstractPasteDialog_Impl, SvPasteObjectDialog )
     virtual void Insert( SotClipboardFormatId nFormat, const OUString & rFormatName ) override;
     virtual void SetObjName( const SvGlobalName & rClass, const OUString & rObjName ) override;
     virtual SotClipboardFormatId GetFormat( const TransferableDataHelper& aHelper ) override;
@@ -546,7 +553,7 @@ public:
                                             const SvObjectServerList* pList ) override;
     virtual VclPtr<VclAbstractDialog>      CreateEditObjectDialog( const OUString& rCommmand,
                                             const css::uno::Reference < css::embed::XEmbeddedObject >& xObj ) override;
-    virtual VclPtr<SfxAbstractPasteDialog> CreatePasteDialog( vcl::Window* pParent ) override;
+    virtual VclPtr<SfxAbstractPasteDialog> CreatePasteDialog(weld::Window* pParent) override;
     virtual VclPtr<SfxAbstractLinksDialog> CreateLinksDialog( vcl::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML = false, sfx2::SvBaseLink* p=nullptr  ) override;
 
     virtual VclPtr<AbstractHangulHanjaConversionDialog> CreateHangulHanjaConversionDialog( vcl::Window* _pParent,
diff --git a/cui/source/inc/pastedlg.hxx b/cui/source/inc/pastedlg.hxx
index 6ef2572d839b..55f2c43dd83e 100644
--- a/cui/source/inc/pastedlg.hxx
+++ b/cui/source/inc/pastedlg.hxx
@@ -24,38 +24,29 @@
 #include <sot/formats.hxx>
 #include <tools/globname.hxx>
 #include <svtools/transfer.hxx>
-
-#include <vcl/dialog.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/button.hxx>
-#include <vcl/edit.hxx>
-#include <vcl/lstbox.hxx>
-
-/********************** SvPasteObjectDialog ******************************
-*************************************************************************/
+#include <vcl/weld.hxx>
 
 struct TransferableObjectDescriptor;
 class TransferableDataHelper;
 
-class SvPasteObjectDialog : public ModalDialog
+class SvPasteObjectDialog : public weld::GenericDialogController
 {
-    VclPtr<FixedText> m_pFtObjectSource;
-    VclPtr<ListBox> m_pLbInsertList;
-    VclPtr<OKButton> m_pOKButton;
     std::map< SotClipboardFormatId, OUString > aSupplementMap;
     SvGlobalName    aObjClassName;
     OUString        aObjName;
 
-    ListBox&        ObjectLB()      { return *m_pLbInsertList; }
+    std::unique_ptr<weld::Label> m_xFtObjectSource;
+    std::unique_ptr<weld::TreeView> m_xLbInsertList;
+    std::unique_ptr<weld::Button> m_xOKButton;
+
+    weld::TreeView& ObjectLB() { return *m_xLbInsertList; }
 
     void            SelectObject();
-    DECL_LINK( SelectHdl, ListBox&, void );
-    DECL_LINK( DoubleClickHdl, ListBox&, void );
+    DECL_LINK(SelectHdl, weld::TreeView&, void);
+    DECL_LINK(DoubleClickHdl, weld::TreeView&, void);
 
 public:
-                SvPasteObjectDialog( vcl::Window* pParent );
-    virtual     ~SvPasteObjectDialog() override;
-    virtual void dispose() override;
+    SvPasteObjectDialog(weld::Window* pParent);
 
     void        Insert( SotClipboardFormatId nFormat, const OUString & rFormatName );
     void        SetObjName( const SvGlobalName & rClass, const OUString & rObjName );
diff --git a/cui/uiconfig/ui/pastespecial.ui b/cui/uiconfig/ui/pastespecial.ui
index 0a9684cd5b67..8931e42e2944 100644
--- a/cui/uiconfig/ui/pastespecial.ui
+++ b/cui/uiconfig/ui/pastespecial.ui
@@ -1,20 +1,32 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.20.4 -->
 <interface domain="cui">
-  <!-- interface-requires gtk+ 3.0 -->
+  <requires lib="gtk+" version="3.18"/>
+  <object class="GtkListStore" id="liststore1">
+    <columns>
+      <!-- column-name text -->
+      <column type="gchararray"/>
+      <!-- column-name id -->
+      <column type="gchararray"/>
+    </columns>
+  </object>
   <object class="GtkDialog" id="PasteSpecialDialog">
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes" context="pastespecial|PasteSpecialDialog">Paste Special</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-vbox3">
         <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
         <property name="spacing">12</property>
         <child internal-child="action_area">
           <object class="GtkButtonBox" id="dialog-action_area3">
             <property name="can_focus">False</property>
-            <property name="orientation">vertical</property>
-            <property name="layout_style">start</property>
+            <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="ok">
                 <property name="label">gtk-ok</property>
@@ -57,6 +69,7 @@
                 <property name="expand">False</property>
                 <property name="fill">True</property>
                 <property name="position">2</property>
+                <property name="secondary">True</property>
               </packing>
             </child>
           </object>
@@ -129,20 +142,34 @@
                     <property name="top_padding">6</property>
                     <property name="left_padding">12</property>
                     <child>
-                      <object class="GtkScrolledWindow" id="scrolledwindow1">
+                      <object class="GtkScrolledWindow">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="hexpand">True</property>
                         <property name="vexpand">True</property>
                         <property name="shadow_type">in</property>
                         <child>
-                          <object class="GtkTreeView" id="list:border">
+                          <object class="GtkTreeView" id="list">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="hexpand">True</property>
                             <property name="vexpand">True</property>
+                            <property name="model">liststore1</property>
+                            <property name="headers_visible">False</property>
+                            <property name="headers_clickable">False</property>
+                            <property name="search_column">0</property>
+                            <property name="show_expanders">False</property>
                             <child internal-child="selection">
-                              <object class="GtkTreeSelection" id="treeview-selection"/>
+                              <object class="GtkTreeSelection" id="treeview-selection1"/>
+                            </child>
+                            <child>
+                              <object class="GtkTreeViewColumn" id="treeviewcolumn1">
+                                <child>
+                                  <object class="GtkCellRendererText" id="cellrenderertext1"/>
+                                  <attributes>
+                                    <attribute name="text">0</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
                             </child>
                           </object>
                         </child>
@@ -181,5 +208,8 @@
       <action-widget response="-6">cancel</action-widget>
       <action-widget response="-11">help</action-widget>
     </action-widgets>
+    <child>
+      <placeholder/>
+    </child>
   </object>
 </interface>
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index e07cf2aea470..092d5448dd78 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -522,7 +522,7 @@ sal_Bool SAL_CALL OApplicationController::suspend(sal_Bool bSuspend)
                 )
             )
         {
-            switch (ExecuteQuerySaveDocument(getFrameWeld(),getStrippedDatabaseName()))
+            switch (ExecuteQuerySaveDocument(getFrameWeld(), getStrippedDatabaseName()))
             {
                 case RET_YES:
                     Execute(ID_BROWSER_SAVEDOC,Sequence<PropertyValue>());
@@ -1042,7 +1042,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
                     if ( !aArgs.getLength() )
                     {
                         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-                        ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( getView() ));
+                        ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog(getFrameWeld()));
                         std::vector<SotClipboardFormatId> aFormatIds;
                         getSupportedFormats(getContainer()->getElementType(),aFormatIds);
                         for (auto const& formatId : aFormatIds)
diff --git a/include/sfx2/sfxdlg.hxx b/include/sfx2/sfxdlg.hxx
index 030b866a5977..732bb30f2ee7 100644
--- a/include/sfx2/sfxdlg.hxx
+++ b/include/sfx2/sfxdlg.hxx
@@ -139,7 +139,7 @@ public:
             const SvObjectServerList* pList )=0;
     virtual VclPtr<VclAbstractDialog>          CreateEditObjectDialog( const OUString& rCommand,
             const css::uno::Reference < css::embed::XEmbeddedObject >& xObj )=0;
-    virtual VclPtr<SfxAbstractPasteDialog>    CreatePasteDialog( vcl::Window* pParent )=0;
+    virtual VclPtr<SfxAbstractPasteDialog>    CreatePasteDialog(weld::Window* pParent) = 0;
     virtual VclPtr<SfxAbstractLinksDialog>    CreateLinksDialog( vcl::Window* pParent, sfx2::LinkManager* pMgr, bool bHTML=false, sfx2::SvBaseLink* p=nullptr )=0;
     virtual VclPtr<VclAbstractDialog>         CreateSvxScriptOrgDialog( vcl::Window* pParent,  const rtl::OUString& rLanguage ) = 0;
 
diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx
index 994b6aa8b44a..12a845ca0400 100644
--- a/sc/source/ui/drawfunc/drtxtob1.cxx
+++ b/sc/source/ui/drawfunc/drtxtob1.cxx
@@ -110,7 +110,8 @@ void ScDrawTextObjectBar::ExecutePasteContents( SfxRequest & /* rReq */ )
     SdrView* pView = pViewData->GetScDrawView();
     OutlinerView* pOutView = pView->GetTextEditOutlinerView();
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-    ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( pViewData->GetDialogParent() ));
+    vcl::Window* pWin = pViewData->GetDialogParent();
+    ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog(pWin ? pWin->GetFrameWeld() : nullptr));
 
     pDlg->Insert( SotClipboardFormatId::STRING, EMPTY_OUSTRING );
     pDlg->Insert( SotClipboardFormatId::RTF,    EMPTY_OUSTRING );
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index e67ace0376b9..80b3ccf6d888 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1570,7 +1570,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                         if ( nFormatCount )
                         {
                             SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-                            ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( pTabViewShell->GetDialogParent() ));
+                            ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog(pTabViewShell->GetFrameWeld()));
                             if ( pDlg )
                             {
                             for (sal_uInt16 i=0; i<nFormatCount; i++)
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index be066a1d1da2..6299749c6b4d 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -262,7 +262,8 @@ void ScEditShell::Execute( SfxRequest& rReq )
         case SID_PASTE_SPECIAL:
             {
                 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-                ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( pViewData->GetDialogParent() ));
+                vcl::Window* pWin = pViewData->GetDialogParent();
+                ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog(pWin ? pWin->GetFrameWeld() : nullptr));
                 SotClipboardFormatId nFormat = SotClipboardFormatId::NONE;
                 if ( pDlg )
                 {
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 31e5f14d279e..b31b22ef0d11 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -239,7 +239,7 @@ void FuInsertClipboard::DoExecute( SfxRequest&  )
     SotClipboardFormatId                        nFormatId;
 
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-    ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( mpViewShell->GetActiveWindow() ));
+    ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog(mpViewShell->GetFrameWeld()));
     if ( pDlg )
     {
         pDlg->Insert( SotClipboardFormatId::EMBED_SOURCE, OUString() );
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 7e2e33cd563d..4e3c76c17ff7 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -2903,7 +2903,7 @@ bool SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rDat
 {
     bool bRet = false;
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-    ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( &rSh.GetView().GetEditWin() ));
+    ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog(rSh.GetView().GetEditWin().GetFrameWeld()));
 
     DataFlavorExVector aFormats( rData.GetDataFlavorExVector() );
     TransferableObjectDescriptor aDesc;
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index c0f5d44efceb..06be285e36f2 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -917,7 +917,7 @@ void SwAnnotationShell::ExecClpbrd(SfxRequest const &rReq)
             if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED)
             {
                 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-                ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( &rView.GetEditWin() ));
+                ScopedVclPtr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog(rView.GetEditWin().GetFrameWeld()));
 
                 pDlg->Insert( SotClipboardFormatId::STRING, OUString() );
                 pDlg->Insert( SotClipboardFormatId::RTF,    OUString() );


More information about the Libreoffice-commits mailing list