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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 22 11:40:55 UTC 2019


 sw/source/uibase/app/docsh2.cxx      |   16 ++++++++--------
 sw/source/uibase/app/docst.cxx       |    4 ++--
 sw/source/uibase/dialog/regionsw.cxx |    6 +++---
 sw/source/uibase/lingu/olmenu.cxx    |    6 +++---
 sw/source/uibase/shells/basesh.cxx   |    2 +-
 sw/source/uibase/shells/drawsh.cxx   |    2 +-
 sw/source/uibase/shells/drwtxtsh.cxx |    2 +-
 sw/source/uibase/shells/grfsh.cxx    |    4 ++--
 sw/source/uibase/wrtsh/wrtsh1.cxx    |    2 +-
 9 files changed, 22 insertions(+), 22 deletions(-)

New commits:
commit d97fe19f4c93eb8bd49d7895e51e0d17101d7d18
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Aug 22 10:15:41 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Aug 22 13:40:13 2019 +0200

    we can be less verbose
    
    Change-Id: I3adf8299b920fc7a9a44fc65ea5d48eb123d7eee
    Reviewed-on: https://gerrit.libreoffice.org/77951
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 408ec26170bd..b272ecbf0d91 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -444,7 +444,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
                 aSet.Put( *static_cast<const SfxBoolItem*>(pOpenSmartTagOptionsItem) );
 
             SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
-            VclPtr<SfxAbstractTabDialog> pDlg = pFact->CreateAutoCorrTabDialog(GetView()->GetViewFrame()->GetWindow().GetFrameWeld(), &aSet);
+            VclPtr<SfxAbstractTabDialog> pDlg = pFact->CreateAutoCorrTabDialog(GetView()->GetFrameWeld(), &aSet);
             pDlg->Execute();
             pDlg.disposeAndClear();
 
@@ -567,14 +567,14 @@ void SwDocShell::Execute(SfxRequest& rReq)
                 if ( aFileName.isEmpty() )
                 {
                     SvtPathOptions aPathOpt;
-                    SfxNewFileDialog aNewFileDlg(GetView()->GetViewFrame()->GetWindow().GetFrameWeld(), SfxNewFileDialogMode::LoadTemplate);
+                    SfxNewFileDialog aNewFileDlg(GetView()->GetFrameWeld(), SfxNewFileDialogMode::LoadTemplate);
                     aNewFileDlg.SetTemplateFlags(nFlags);
 
                     nRet = aNewFileDlg.run();
                     if(RET_TEMPLATE_LOAD == nRet)
                     {
                         FileDialogHelper aDlgHelper(TemplateDescription::FILEOPEN_SIMPLE,
-                                                    FileDialogFlags::NONE, GetView()->GetViewFrame()->GetWindow().GetFrameWeld());
+                                                    FileDialogFlags::NONE, GetView()->GetFrameWeld());
                         uno::Reference < XFilePicker3 > xFP = aDlgHelper.GetFilePicker();
 
                         xFP->setDisplayDirectory( aPathOpt.GetWorkPath() );
@@ -690,7 +690,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
                     {
                         FileDialogHelper aDlgHelper(TemplateDescription::FILESAVE_AUTOEXTENSION,
                                                     FileDialogFlags::NONE,
-                                                    GetView()->GetViewFrame()->GetWindow().GetFrameWeld());
+                                                    GetView()->GetFrameWeld());
                         aDlgHelper.AddFilter( pHtmlFlt->GetFilterName(), pHtmlFlt->GetDefaultExtension() );
                         aDlgHelper.SetCurrentFilter( pHtmlFlt->GetFilterName() );
                         if( ERRCODE_NONE != aDlgHelper.Execute())
@@ -767,7 +767,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
         case FN_ABSTRACT_NEWDOC:
         {
             SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
-            ScopedVclPtr<AbstractSwInsertAbstractDlg> pDlg(pFact->CreateSwInsertAbstractDlg(GetView()->GetViewFrame()->GetWindow().GetFrameWeld()));
+            ScopedVclPtr<AbstractSwInsertAbstractDlg> pDlg(pFact->CreateSwInsertAbstractDlg(GetView()->GetFrameWeld()));
             if(RET_OK == pDlg->Execute())
             {
                 sal_uInt8 nLevel = pDlg->GetLevel();
@@ -946,7 +946,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
                     bool bError = false;
 
                     FileDialogHelper aDlgHelper(TemplateDescription::FILESAVE_AUTOEXTENSION_TEMPLATE, FileDialogFlags::NONE,
-                                                GetView()->GetViewFrame()->GetWindow().GetFrameWeld());
+                                                GetView()->GetFrameWeld());
 
                     const sal_Int16 nControlIds[] = {
                         CommonFilePickerElementIds::PUSHBUTTON_OK,
@@ -1233,7 +1233,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
         break;
         case SID_CLASSIFICATION_DIALOG:
         {
-            std::shared_ptr<svx::ClassificationDialog> xDialog(new svx::ClassificationDialog(GetView()->GetViewFrame()->GetWindow().GetFrameWeld(), false));
+            std::shared_ptr<svx::ClassificationDialog> xDialog(new svx::ClassificationDialog(GetView()->GetFrameWeld(), false));
 
             SwWrtShell* pShell = GetWrtShell();
             std::vector<svx::ClassificationResult> aInput = pShell->CollectAdvancedClassification();
@@ -1248,7 +1248,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
         case SID_PARAGRAPH_SIGN_CLASSIFY_DLG:
         {
             SwWrtShell* pShell = GetWrtShell();
-            std::shared_ptr<svx::ClassificationDialog> xDialog(new svx::ClassificationDialog(GetView()->GetViewFrame()->GetWindow().GetFrameWeld(), true, [pShell]()
+            std::shared_ptr<svx::ClassificationDialog> xDialog(new svx::ClassificationDialog(GetView()->GetFrameWeld(), true, [pShell]()
             {
                 pShell->SignParagraph();
             }));
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 562e71f7c7a6..d413e4fe8e4c 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -385,7 +385,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
                 {
                     case SID_STYLE_NEW_BY_EXAMPLE:
                     {
-                        SfxNewStyleDlg aDlg(GetView()->GetViewFrame()->GetWindow().GetFrameWeld(), *GetStyleSheetPool());
+                        SfxNewStyleDlg aDlg(GetView()->GetFrameWeld(), *GetStyleSheetPool());
                         if (aDlg.run() == RET_OK)
                         {
                             aParam = aDlg.GetName();
@@ -833,7 +833,7 @@ void SwDocShell::Edit(
         FieldUnit eMetric = ::GetDfltMetric(0 != (HTMLMODE_ON&nHtmlMode));
         SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
         SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
-        VclPtr<SfxAbstractApplyTabDialog> pDlg(pFact->CreateTemplateDialog(GetView()->GetViewFrame()->GetWindow().GetFrameWeld(),
+        VclPtr<SfxAbstractApplyTabDialog> pDlg(pFact->CreateTemplateDialog(GetView()->GetFrameWeld(),
                                                     *xTmp, nFamily, sPage, pCurrShell, bNew));
         std::shared_ptr<ApplyStyle> pApplyStyleHelper(new ApplyStyle(*this, bNew, xTmp, nFamily, pDlg.get(), m_xBasePool, bModified));
         pDlg->SetApplyHdl(LINK(pApplyStyleHelper.get(), ApplyStyle, ApplyHdl));
diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx
index 63f574429d0c..79586fe54033 100644
--- a/sw/source/uibase/dialog/regionsw.cxx
+++ b/sw/source/uibase/dialog/regionsw.cxx
@@ -82,7 +82,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
         aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth)));
         SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
         VclPtr<AbstractInsertSectionTabDialog> aTabDlg(pFact->CreateInsertSectionTabDialog(
-            GetView().GetViewFrame()->GetWindow().GetFrameWeld(), aSet , rSh));
+            GetView().GetFrameWeld(), aSet , rSh));
         aTabDlg->StartExecuteAsync([aTabDlg](sal_Int32 /*nResult*/){
             aTabDlg->disposeOnce();
         });
@@ -191,7 +191,7 @@ void SwWrtShell::StartInsertRegionDialog(const SwSectionData& rSectionData)
     aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth)));
     SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
     VclPtr<AbstractInsertSectionTabDialog> aTabDlg(pFact->CreateInsertSectionTabDialog(
-        GetView().GetViewFrame()->GetWindow().GetFrameWeld(), aSet, *this));
+        GetView().GetFrameWeld(), aSet, *this));
     aTabDlg->SetSectionData(rSectionData);
     aTabDlg->StartExecuteAsync([aTabDlg](sal_Int32 /*nResult*/){
         aTabDlg->disposeOnce();
@@ -212,7 +212,7 @@ void SwBaseShell::EditRegionDialog(SfxRequest const & rReq)
         case FN_EDIT_REGION:
         case FN_EDIT_CURRENT_REGION:
         {
-            weld::Window* pParentWin = GetView().GetViewFrame()->GetWindow().GetFrameWeld();
+            weld::Window* pParentWin = GetView().GetFrameWeld();
             {
                 SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
                 ScopedVclPtr<AbstractEditRegionDlg> pEditRegionDlg(pFact->CreateEditRegionDlg(pParentWin, rWrtShell));
diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx
index 56743d132e6b..afe19a9c0a16 100644
--- a/sw/source/uibase/lingu/olmenu.cxx
+++ b/sw/source/uibase/lingu/olmenu.cxx
@@ -739,7 +739,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
                     sWord, false, OUString() );
             if (linguistic::DictionaryError::NONE != nAddRes && !xDictionary->getEntry(sWord).is())
             {
-                SvxDicError(m_pSh->GetView().GetViewFrame()->GetWindow().GetFrameWeld(), nAddRes);
+                SvxDicError(m_pSh->GetView().GetFrameWeld(), nAddRes);
             }
         }
     }
@@ -771,7 +771,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
 
             if (linguistic::DictionaryError::NONE != nAddRes && !xDic->getEntry(sWord).is())
             {
-                SvxDicError(m_pSh->GetView().GetViewFrame()->GetWindow().GetFrameWeld(), nAddRes);
+                SvxDicError(m_pSh->GetView().GetFrameWeld(), nAddRes);
             }
         }
     }
@@ -789,7 +789,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
             uno::Any exc( ::cppu::getCaughtException() );
             OUString msg( ::comphelper::anyToString( exc ) );
             const SolarMutexGuard guard;
-            std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(m_pSh->GetView().GetViewFrame()->GetWindow().GetFrameWeld(),
+            std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(m_pSh->GetView().GetFrameWeld(),
                                                       VclMessageType::Warning, VclButtonsType::Ok, msg));
             xBox->set_title("Explanations");
             xBox->run();
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 8b1e5e39fe4c..0479fca697e0 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2449,7 +2449,7 @@ void SwBaseShell::GetBorderState(SfxItemSet &rSet)
 void SwBaseShell::ExecDlg(SfxRequest &rReq)
 {
     SwWrtShell &rSh = GetShell();
-    weld::Window* pMDI = GetView().GetViewFrame()->GetWindow().GetFrameWeld();
+    weld::Window* pMDI = GetView().GetFrameWeld();
     // So that from the basic no dialogues for the background views are called:
     bool bBackground = (&GetView() != GetActiveView());
     const SfxPoolItem* pItem = nullptr;
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx
index b19c64eef153..3e6ae90b7c1b 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -126,7 +126,7 @@ void SwDrawShell::InsertPictureFromFile(SdrObject& rObject)
 
     if(pSdrView)
     {
-        SvxOpenGraphicDialog aDlg(SwResId(STR_INSERT_GRAPHIC), GetView().GetViewFrame()->GetWindow().GetFrameWeld());
+        SvxOpenGraphicDialog aDlg(SwResId(STR_INSERT_GRAPHIC), GetView().GetFrameWeld());
 
         if (ERRCODE_NONE == aDlg.Execute())
         {
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index 557fbc5dd267..2ff34c56ebc0 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -446,7 +446,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
                 pSdrView->GetAttributes( aNewAttr );
                 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
                 ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog(
-                            GetView().GetViewFrame()->GetWindow().GetFrameWeld(),
+                            GetView().GetFrameWeld(),
                             &aNewAttr, pSdrView ));
                 sal_uInt16 nResult = pDlg->Execute();
 
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index 7c64a7263506..19c1a6558fc1 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -177,7 +177,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
                     OUString sGrfNm;
                     OUString sFilterNm;
                     rSh.GetGrfNms( &sGrfNm, &sFilterNm );
-                    GraphicHelper::ExportGraphic(GetView().GetViewFrame()->GetWindow().GetFrameWeld(), aGraphic, sGrfNm);
+                    GraphicHelper::ExportGraphic(GetView().GetFrameWeld(), aGraphic, sGrfNm);
                 }
             }
             else if (nState == RET_NO)
@@ -188,7 +188,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
                     OUString sGrfNm;
                     OUString sFilterNm;
                     rSh.GetGrfNms( &sGrfNm, &sFilterNm );
-                    GraphicHelper::ExportGraphic(GetView().GetViewFrame()->GetWindow().GetFrameWeld(), *pGraphic, sGrfNm);
+                    GraphicHelper::ExportGraphic(GetView().GetFrameWeld(), *pGraphic, sGrfNm);
                 }
             }
         }
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index cd5a638250e8..9f360c2ff266 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1839,7 +1839,7 @@ void SwWrtShell::ChangeHeaderOrFooter(
                 //Actions have to be closed while the dialog is showing
                 EndAllAction();
 
-                weld::Window* pParent = GetView().GetViewFrame()->GetWindow().GetFrameWeld();
+                weld::Window* pParent = GetView().GetFrameWeld();
                 short nResult;
                 if (bHeader) {
                     nResult = DeleteHeaderDialog(pParent).run();


More information about the Libreoffice-commits mailing list