core.git: sd/inc sd/qa sd/source sd/uiconfig
sd/inc/drawdoc.hxx|1 sd/inc/sdattr.hrc |3 + sd/qa/unit/dialogs-test.cxx |2 + sd/source/core/drawdoc.cxx|3 + sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx |2 - sd/source/ui/animations/CustomAnimationPane.cxx |2 - sd/source/ui/animations/SlideTransitionPane.cxx |2 - sd/source/ui/app/sdmod1.cxx |3 + sd/source/ui/dlg/navigatr.cxx |3 + sd/source/ui/dlg/present.cxx |8 sd/source/ui/docshell/docshel3.cxx|3 + sd/source/ui/func/funavig.cxx |3 + sd/source/ui/func/fupoor.cxx |6 ++- sd/source/ui/func/fusldlg.cxx |8 sd/source/ui/inc/present.hxx |1 sd/source/ui/inc/slideshow.hxx|3 + sd/source/ui/slideshow/slideshow.cxx | 26 +++--- sd/source/ui/slideshow/slideshowimpl.cxx |2 - sd/source/ui/unoidl/DrawController.cxx|2 - sd/source/ui/view/drawview.cxx|2 - sd/source/ui/view/drviews1.cxx|4 +- sd/source/ui/view/drviews2.cxx|5 +- sd/source/ui/view/drviews3.cxx|2 - sd/source/ui/view/drviews4.cxx|3 + sd/source/ui/view/drviews7.cxx| 10 +++-- sd/source/ui/view/drviewsa.cxx|7 ++- sd/source/ui/view/drviewse.cxx|4 +- sd/source/ui/view/drviewsh.cxx|2 - sd/source/ui/view/sdview2.cxx |3 + sd/source/ui/view/viewshel.cxx|4 +- sd/uiconfig/simpress/ui/presentationdialog.ui | 21 ++- 31 files changed, 110 insertions(+), 40 deletions(-) New commits: commit c68712d3689a0322e59934cd8151d003e869f30d Author: Armin Le Grand (allotropia) AuthorDate: Fri Feb 23 16:30:23 2024 +0100 Commit: Thorsten Behrens CommitDate: Sat Feb 24 00:54:34 2024 +0100 IASS: make live slideshow experimental and configurable * adding an option button to slideshow settings dlg * switch from env var to officecfg Change-Id: I9713fde374b04264947daaab73759eb585c4a3f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163851 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index dd6b81647ef7..401bde6b5f88 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -110,6 +110,7 @@ namespace sd sal_Int32 mnPauseTimeout; bool mbShowPauseLogo; bool mbStartCustomShow; +bool mbInteractive; PresentationSettings(); }; diff --git a/sd/inc/sdattr.hrc b/sd/inc/sdattr.hrc index f431dea4f680..409838dea996 100644 --- a/sd/inc/sdattr.hrc +++ b/sd/inc/sdattr.hrc @@ -55,8 +55,9 @@ class XColorItem; #define ATTR_PRESENT_PAUSE_TIMEOUT TypedWhichId(ATTR_PRESENT_START + 13) #define ATTR_PRESENT_SHOW_PAUSELOGO ATTR_PRESENT_START + 14 #define ATTR_PRESENT_DISPLAY TypedWhichId(ATTR_PRESENT_START + 15) +#define ATTR_PRESENT_INTERACTIVE ATTR_PRESENT_START + 16 -#define ATTR_PRESENT_ENDATTR_PRESENT_DISPLAY +#define ATTR_PRESENT_ENDATTR_PRESENT_INTERACTIVE // animation attributes #define ATTR_ANIMATION_STARTATTR_PRESENT_END + 1 diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index 45bdcaef9d48..e7c0d38f7f2e 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -407,6 +407,8 @@ VclPtr SdDialogsTest::createDialogByID(sal_uInt32 nID) aDlgSet.Put(SfxBoolItem(ATTR_PRESENT_FULLSCREEN, rPresentationSettings.mbFullScreen)); aDlgSet.Put(SfxUInt32Item(ATTR_PRESENT_PAUSE_TIMEOUT, rPresentationSettings.mnPauseTimeout)); aDlgSet.Put(SfxBoolItem(ATTR_PRESENT_SHOW_PAUSELOGO, rPresentationSettings.mbShowPauseLogo)); +aDlgSet.Put(SfxBoolItem(ATTR_PRESENT_INTERACTIVE, rPresentationSettings.mbInteractive)); + //SdOptions* pOptions = SD_MOD()->GetSdOptions(DocumentType::Impress); aDlgSet.Put(SfxInt32Item(ATTR_PRESENT_DISPLAY, 0 /*pOptions->GetDisplay()*/)); pRetval = getSdAbstractDialogFactory()->CreateSdStartPresentationDlg( diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 2f9f431866a5..ea32e0f5e8d6 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -109,7 +109,8 @@ PresentationSettings::PresentationSettings()
[Libreoffice-commits] core.git: sd/inc sd/qa sd/source sd/uiconfig
sd/inc/drawdoc.hxx |1 + sd/qa/unit/uiimpress.cxx| 17 + sd/source/core/drawdoc.cxx |3 ++- sd/source/ui/dlg/custsdlg.cxx | 21 + sd/source/ui/func/fucushow.cxx | 25 ++--- sd/source/ui/func/fusldlg.cxx |1 + sd/source/ui/inc/custsdlg.hxx |2 -- sd/source/ui/inc/slideshow.hxx |3 ++- sd/source/ui/view/drviewse.cxx |4 sd/uiconfig/simpress/ui/customslideshows.ui | 20 10 files changed, 50 insertions(+), 47 deletions(-) New commits: commit a46a847d4298806d4e91e4665c3c1907c09a17c7 Author: Tibor Nagy AuthorDate: Fri Jun 25 11:52:03 2021 +0200 Commit: László Németh CommitDate: Tue Jun 29 19:16:47 2021 +0200 tdf#142589 Impress UI: fix Start button of Custom Slide Shows This button started the selected custom slide show only by changing the (already) selected custom slide show, and enabling the checkbox "Use custom slide show". Otherwise it started always the full show. Remove the redundant checkbox "Use custom slide show" of the dialog window "Custom Slide Shows" (Slide Show->Custom Slide Show...) to avoid inconsistent behavior of the Start button (which could start the full show instead of the selected custom slide show). Now Start button of the dialog starts the selected custom slide show only once, i.e. it doesn't modify the global slide show settings for all the next slide shows (that is already handled by Slide Show->Slide Show Settings->Range->"Custom slide show:" and Slide Show->Slide Show Settings->Range->"All slides"). Change-Id: I6e97a69c546870199d5a45d9a6ad102e30d820c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117876 Tested-by: László Németh Reviewed-by: László Németh diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index 7d4c3c92ce5c..80a79955537f 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -108,6 +108,7 @@ namespace sd bool mbAnimationAllowed; sal_Int32 mnPauseTimeout; bool mbShowPauseLogo; +bool mbStartCustomShow; PresentationSettings(); }; diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx index 8fa1622d6197..444677fdda41 100644 --- a/sd/qa/unit/uiimpress.cxx +++ b/sd/qa/unit/uiimpress.cxx @@ -49,6 +49,7 @@ #include #include #include +#include using namespace ::com::sun::star; @@ -717,6 +718,22 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testSearchAllInDocumentAndNotes) Scheduler::ProcessEventsToIdle(); } +CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf142589) +{ +mxComponent = loadFromDesktop("private:factory/simpress", + "com.sun.star.presentation.PresentationDocument"); +CPPUNIT_ASSERT(mxComponent.is()); + +auto pImpressDocument = dynamic_cast(mxComponent.get()); +sd::ViewShell* pViewShell = pImpressDocument->GetDocShell()->GetViewShell(); + +SfxRequest aRequest(pViewShell->GetViewFrame(), SID_PRESENTATION); +pImpressDocument->GetDoc()->getPresentationSettings().mbCustomShow = true; +pImpressDocument->GetDoc()->getPresentationSettings().mbStartCustomShow = true; +sd::slideshowhelp::ShowSlideShow(aRequest, *pImpressDocument->GetDoc()); +CPPUNIT_ASSERT_EQUAL(false, pImpressDocument->GetDoc()->getPresentationSettings().mbCustomShow); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 4e7c6c5dbd88..baf1d57fea18 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -109,7 +109,8 @@ PresentationSettings::PresentationSettings() mbFullScreen( true ), mbAnimationAllowed( true ), mnPauseTimeout( 0 ), -mbShowPauseLogo( false ) +mbShowPauseLogo( false ), +mbStartCustomShow( false ) { } diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx index afa9e0be21be..db2414a51fa2 100644 --- a/sd/source/ui/dlg/custsdlg.cxx +++ b/sd/source/ui/dlg/custsdlg.cxx @@ -38,7 +38,6 @@ SdCustomShowDlg::SdCustomShowDlg(weld::Window* pWindow, SdDrawDocument& rDrawDoc , pCustomShowList(nullptr) , bModified(false) , m_xLbCustomShows(m_xBuilder->weld_tree_view("customshowlist")) -, m_xCbxUseCustomShow(m_xBuilder->weld_check_button("usecustomshows")) , m_xBtnNew(m_xBuilder->weld_button("new")) , m_xBtnEdit(m_xBuilder->weld_button("edit")) , m_xBtnRemove(m_xBuilder->weld_button("delete")) @@ -55,7 +54,6 @@ SdCustomShowDlg::SdCustomShowDlg(weld::Window* pWindow, SdDrawDocument& rDrawDoc m_xBtnEdit->connect_clicked( aLink ); m_xBtnRemove->connect_clicked( aLink ); m_xBtnCopy->connect_clicked( aLink ); -m_xCbxUseCustomShow->connect_toggled(LINK(this, SdCusto
[Libreoffice-commits] core.git: sd/inc sd/qa sd/source sd/uiconfig
sd/inc/sdabstdlg.hxx |2 +- sd/qa/unit/dialogs-test.cxx |2 +- sd/source/ui/dlg/sddlgfact.cxx | 13 - sd/source/ui/dlg/sddlgfact.hxx | 13 ++--- sd/source/ui/dlg/tpaction.cxx| 17 - sd/source/ui/func/fuoaprms.cxx |2 +- sd/source/ui/inc/tpaction.hxx|4 ++-- sd/uiconfig/simpress/ui/interactiondialog.ui |8 +++- 8 files changed, 38 insertions(+), 23 deletions(-) New commits: commit 8bc23968129fc38d70fb614668a411599d4e6d0e Author: Caolán McNamara AuthorDate: Wed Mar 13 14:17:22 2019 + Commit: Caolán McNamara CommitDate: Thu Mar 14 11:22:58 2019 +0100 weld SdActionDlg Change-Id: I2d43c1fc65e8cfed1e252e1a16c37b907ec9f319 Reviewed-on: https://gerrit.libreoffice.org/69180 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index adb34590569c..5ecd310d54f8 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -185,7 +185,7 @@ public: virtual VclPtr CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool) = 0; virtual VclPtr CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) = 0; virtual VclPtr CreateSdTabTemplateDlg(weld::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView) = 0; -virtual VclPtr CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; +virtual VclPtr CreatSdActionDialog(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; virtual VclPtr CreateSdVectorizeDlg(weld::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell) = 0; virtual VclPtrCreateSdPublishingDlg( vcl::Window* pWindow, DocumentType eDocType) = 0; diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index 7a8ea154a8c2..1b114462584a 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -532,7 +532,7 @@ VclPtr SdDialogsTest::createDialogByID(sal_uInt32 nID) aSet.Put(SfxBoolItem(ATTR_ACTION_SOUNDON, false)); aSet.Put(SfxBoolItem(ATTR_ACTION_PLAYFULL, false)); pRetval = getSdAbstractDialogFactory()->CreatSdActionDialog( -getViewShell()->GetActiveWindow(), +getViewShell()->GetFrameWeld(), &aSet, getDrawView()); break; diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx index 0818046394b1..c29066beca1f 100644 --- a/sd/source/ui/dlg/sddlgfact.cxx +++ b/sd/source/ui/dlg/sddlgfact.cxx @@ -109,7 +109,10 @@ short AbstractSdPresLayoutDlg_Impl::Execute() return m_xDlg->run(); } -IMPL_ABSTDLG_BASE(SdAbstractSfxDialog_Impl); +short SdAbstractSfxDialog_Impl::Execute() +{ +return m_xDlg->run(); +} short AbstractSdVectorizeDlg_Impl::Execute() { @@ -342,12 +345,12 @@ void AbstractSdPresLayoutDlg_Impl::GetAttr( SfxItemSet& rOutAttrs ) const SfxItemSet* SdAbstractSfxDialog_Impl::GetOutputItemSet() const { -return pDlg->GetOutputItemSet(); +return m_xDlg->GetOutputItemSet(); } void SdAbstractSfxDialog_Impl::SetText( const OUString& rStr ) { -pDlg->SetText( rStr ); +m_xDlg->set_title(rStr); } const GDIMetaFile& AbstractSdVectorizeDlg_Impl::GetGDIMetaFile() const @@ -455,9 +458,9 @@ VclPtr SdAbstractDialogFactory_Impl::CreateSdTabTemplateD return VclPtr::Create(std::make_unique(pParent, pDocShell, rStyleBase, pModel, pView)); } -VclPtr SdAbstractDialogFactory_Impl::CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView ) +VclPtr SdAbstractDialogFactory_Impl::CreatSdActionDialog(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView ) { -return VclPtr::Create( VclPtr::Create( pParent, pAttr, pView ) ); +return VclPtr::Create(std::make_unique(pParent, pAttr, pView)); } VclPtr SdAbstractDialogFactory_Impl::CreateSdVectorizeDlg(weld::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell) diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx index 269795b4c690..8f419d943036 100644 --- a/sd/source/ui/dlg/sddlgfact.hxx +++ b/sd/source/ui/dlg/sddlgfact.hxx @@ -292,9 +292,16 @@ public: class SdAbstractSfxDialog_Impl : public SfxAbstractDialog { -DECL_ABSTDLG_BASE(SdAbstractSfxDialog_Impl,SfxModalDialog) +private: +std::unique_ptr m_xDlg; +public: +SdAbstractSfxDialog_Impl(std::unique_ptr pDlg) +: m_xDlg(std::move(pDlg)) +{ +} +virtual short Execute() override; virtual const SfxItemSet
[Libreoffice-commits] core.git: sd/inc sd/qa sd/source sd/uiconfig
sd/inc/sdabstdlg.hxx |2 sd/qa/unit/dialogs-test.cxx |2 sd/source/ui/dlg/sddlgfact.cxx|4 sd/source/ui/dlg/sddlgfact.hxx|2 sd/source/ui/dlg/tabtempl.cxx | 67 +--- sd/source/ui/func/futempl.cxx |2 sd/source/ui/inc/tabtempl.hxx | 27 - sd/uiconfig/simpress/ui/templatedialog.ui | 430 -- 8 files changed, 452 insertions(+), 84 deletions(-) New commits: commit b7d4b1dae5ad05370b8ac289ae2642aa4236111a Author: Caolán McNamara AuthorDate: Thu Oct 18 11:24:13 2018 +0100 Commit: Caolán McNamara CommitDate: Thu Oct 18 15:09:54 2018 +0200 weld SdTabTemplateDlg Change-Id: I3aae53844f839ff54fab85ab4649c0bf0691e6de Reviewed-on: https://gerrit.libreoffice.org/61927 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index da3c93f71203..6c03002c6c22 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -184,7 +184,7 @@ public: virtual VclPtr CreateRemoteDialog( vcl::Window* pWindow ) = 0; virtual VclPtr CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool) = 0; virtual VclPtr CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) = 0; -virtual VclPtr CreateSdTabTemplateDlg(vcl::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView) = 0; +virtual VclPtr CreateSdTabTemplateDlg(weld::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView) = 0; virtual VclPtr CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; virtual VclPtr CreateSdVectorizeDlg(weld::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell) = 0; virtual VclPtrCreateSdPublishingDlg( vcl::Window* pWindow, DocumentType eDocType) = 0; diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index 738b84dd0f7f..7f475dfa70b4 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -502,7 +502,7 @@ VclPtr SdDialogsTest::createDialogByID(sal_uInt32 nID) SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc(); CPPUNIT_ASSERT(pDrawDoc); pRetval = getSdAbstractDialogFactory()->CreateSdTabTemplateDlg( -getViewShell()->GetActiveWindow(), +getViewShell()->GetFrameWeld(), getDocShell(), *pStyleSheet, pDrawDoc, diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx index 7159bdd27d58..df90897d1a89 100644 --- a/sd/source/ui/dlg/sddlgfact.cxx +++ b/sd/source/ui/dlg/sddlgfact.cxx @@ -475,9 +475,9 @@ VclPtr SdAbstractDialogFactory_Impl::CreateSdPresLayout return VclPtr::Create(o3tl::make_unique(pDocShell, pParent, rInAttrs)); } -VclPtr SdAbstractDialogFactory_Impl::CreateSdTabTemplateDlg(vcl::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) +VclPtr SdAbstractDialogFactory_Impl::CreateSdTabTemplateDlg(weld::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView) { -return VclPtr::Create( VclPtr::Create( pParent, pDocShell, rStyleBase, pModel, pView ) ); +return VclPtr::Create(o3tl::make_unique(pParent, pDocShell, rStyleBase, pModel, pView)); } VclPtr SdAbstractDialogFactory_Impl::CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView ) diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx index 959718c4effb..001885bf7254 100644 --- a/sd/source/ui/dlg/sddlgfact.hxx +++ b/sd/source/ui/dlg/sddlgfact.hxx @@ -353,7 +353,7 @@ public: virtual VclPtr CreateRemoteDialog( vcl::Window* pWindow ) override; // add for RemoteDialog virtual VclPtr CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool) override; virtual VclPtr CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) override; -virtual VclPtr CreateSdTabTemplateDlg(vcl::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) override; +virtual VclPtr CreateSdTabTemplateDlg(weld::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) override; virtua
[Libreoffice-commits] core.git: sd/inc sd/qa sd/source sd/uiconfig
sd/inc/sdabstdlg.hxx |2 sd/qa/unit/dialogs-test.cxx |2 sd/source/ui/dlg/sddlgfact.cxx | 14 +++- sd/source/ui/dlg/sddlgfact.hxx | 11 +++ sd/source/ui/dlg/sdpreslt.cxx| 81 ++- sd/source/ui/func/fuprlout.cxx |2 sd/source/ui/inc/sdpreslt.hxx| 23 --- sd/uiconfig/simpress/ui/slidedesigndialog.ui | 67 +++--- 8 files changed, 111 insertions(+), 91 deletions(-) New commits: commit b752a93acff31c824bcec4233a8dd9bee014ca7d Author: Caolán McNamara AuthorDate: Fri Oct 12 11:35:07 2018 +0100 Commit: Caolán McNamara CommitDate: Fri Oct 12 14:19:47 2018 +0200 weld SdPresLayoutDlg Change-Id: I04dddf836eccf16a6335b63c3350e97335d2fb58 Reviewed-on: https://gerrit.libreoffice.org/61710 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index 7576c5bf70ea..152ceb9dc556 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -183,7 +183,7 @@ public: const std::vector &rPageNames, SdCustomShowList* pCSList ) = 0; virtual VclPtr CreateRemoteDialog( vcl::Window* pWindow ) = 0; virtual VclPtr CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) = 0; -virtual VclPtrCreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) = 0; +virtual VclPtr CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) = 0; virtual VclPtr CreateSdTabTemplateDlg(vcl::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView) = 0; virtual VclPtr CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; virtual VclPtr CreateSdVectorizeDlg(weld::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell) = 0; diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index 71f4c742537b..fd863c973eb0 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -482,7 +482,9 @@ VclPtr SdDialogsTest::createDialogByID(sal_uInt32 nID) case 16: { // CreateSdPresLayoutDlg(::sd::DrawDocShell* pDocShell, vcl::Window* pWindow, const SfxItemSet& rInAttrs) override; +auto const parent = Application::GetDefDialogParent(); pRetval = getSdAbstractDialogFactory()->CreateSdPresLayoutDlg( +parent == nullptr ? nullptr : parent->GetFrameWeld(), getDocShell(), getEmptySfxItemSet()); break; diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx index 6c43e082bdef..1bf725bdce25 100644 --- a/sd/source/ui/dlg/sddlgfact.cxx +++ b/sd/source/ui/dlg/sddlgfact.cxx @@ -94,7 +94,11 @@ short AbstractSdStartPresDlg_Impl::Execute() return m_xDlg->run(); } -IMPL_ABSTDLG_BASE(AbstractSdPresLayoutDlg_Impl); +short AbstractSdPresLayoutDlg_Impl::Execute() +{ +return m_xDlg->run(); +} + IMPL_ABSTDLG_BASE(SdAbstractSfxDialog_Impl); short AbstractSdVectorizeDlg_Impl::Execute() @@ -344,12 +348,12 @@ bool AbstractMorphDlg_Impl::IsOrientationFade() const void AbstractSdStartPresDlg_Impl::GetAttr( SfxItemSet& rOutAttrs ) { -m_xDlg->GetAttr( rOutAttrs ); +m_xDlg->GetAttr(rOutAttrs); } void AbstractSdPresLayoutDlg_Impl::GetAttr( SfxItemSet& rOutAttrs ) { -pDlg->GetAttr( rOutAttrs ); +m_xDlg->GetAttr(rOutAttrs); } const SfxItemSet* SdAbstractSfxDialog_Impl::GetOutputItemSet() const @@ -457,9 +461,9 @@ VclPtr SdAbstractDialogFactory_Impl::CreateSdPresLayoutTe return VclPtr::Create( VclPtr::Create( pDocSh, pParent, bBackgroundDlg, rStyleBase, ePO, pSSPool ) ); } -VclPtr SdAbstractDialogFactory_Impl::CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) +VclPtr SdAbstractDialogFactory_Impl::CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) { -return VclPtr::Create( VclPtr::Create( pDocShell, nullptr, rInAttrs ) ); +return VclPtr::Create(o3tl::make_unique(pDocShell, pParent, rInAttrs)); } VclPtr SdAbstractDialogFactory_Impl::CreateSdTabTemplateDlg(vcl::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx index 4571aa29248c..99ad415871e5 100644 --- a/sd/source/ui/dlg/sddlgfact.hxx +++ b/sd/source/ui/dlg/sddlgfact.hxx @@ -277,7 +277,14 @@ public: class SdPresLayoutDlg; cla
[Libreoffice-commits] core.git: sd/inc sd/qa sd/source sd/uiconfig
sd/inc/sdabstdlg.hxx|2 sd/qa/unit/dialogs-test.cxx |3 sd/source/ui/dlg/dlgolbul.cxx | 102 +++--- sd/source/ui/dlg/sddlgfact.cxx | 25 +++- sd/source/ui/dlg/sddlgfact.hxx | 13 +- sd/source/ui/func/fuolbull.cxx |2 sd/source/ui/inc/OutlineBulletDlg.hxx | 25 +--- sd/uiconfig/sdraw/ui/bulletsandnumbering.ui | 156 +--- 8 files changed, 222 insertions(+), 106 deletions(-) New commits: commit 42e5319342f436f43ada228818d928cc8fd01d5b Author: Caolán McNamara AuthorDate: Wed Oct 3 11:18:01 2018 +0100 Commit: Caolán McNamara CommitDate: Wed Oct 3 17:12:17 2018 +0200 weld OutlineBulletDlg Change-Id: Icfbe456a71e0febf5b7d7b6cb625217c730bb367 Reviewed-on: https://gerrit.libreoffice.org/61291 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index f3c24d82fbf9..7576c5bf70ea 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -177,7 +177,7 @@ public: virtual VclPtr CreateSdInsertLayerDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& rStr) = 0; virtual VclPtr CreateSdInsertPagesObjsDlg(vcl::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName) = 0; virtual VclPtr CreateMorphDlg(weld::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) = 0; -virtual VclPtr CreateSdOutlineBulletTabDlg(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; +virtual VclPtr CreateSdOutlineBulletTabDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; virtual VclPtr CreateSdParagraphTabDlg(weld::Window* pWindow, const SfxItemSet* pAttr) = 0; virtual VclPtr CreateSdStartPresentationDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, const std::vector &rPageNames, SdCustomShowList* pCSList ) = 0; diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index f56e09bffcb5..96c4d6807424 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -409,8 +409,9 @@ VclPtr SdDialogsTest::createDialogByID(sal_uInt32 nID) case 11: { // CreateSdOutlineBulletTabDlg(const SfxItemSet* pAttr, ::sd::View* pView = nullptr) override; +auto const parent = Application::GetDefDialogParent(); pRetval = getSdAbstractDialogFactory()->CreateSdOutlineBulletTabDlg( -getViewShell()->GetActiveWindow(), +parent == nullptr ? nullptr : parent->GetFrameWeld(), &getEmptySfxItemSet(), getDrawView()); break; diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx index d169853c9ac1..bbbc3fb24968 100644 --- a/sd/source/ui/dlg/dlgolbul.cxx +++ b/sd/source/ui/dlg/dlgolbul.cxx @@ -46,26 +46,22 @@ namespace sd { /** * Constructor of tab dialog: append pages to the dialog */ -OutlineBulletDlg::OutlineBulletDlg( -vcl::Window* pParent, -const SfxItemSet* pAttr, -::sd::View* pView ) -: SfxTabDialog( pParent, "BulletsAndNumberingDialog", -"modules/sdraw/ui/bulletsandnumbering.ui") -, aInputSet( *pAttr ) -, bTitle(false) -, pSdView(pView) +OutlineBulletDlg::OutlineBulletDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) +: SfxTabDialogController(pParent, "modules/sdraw/ui/bulletsandnumbering.ui", "BulletsAndNumberingDialog") +, m_aInputSet(*pAttr) +, m_bTitle(false) +, m_pSdView(pView) { -aInputSet.MergeRange( SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL ); -aInputSet.Put( *pAttr ); +m_aInputSet.MergeRange(SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL); +m_aInputSet.Put(*pAttr); -pOutputSet.reset( new SfxItemSet( *pAttr ) ); -pOutputSet->ClearItem(); +m_xOutputSet.reset( new SfxItemSet( *pAttr ) ); +m_xOutputSet->ClearItem(); bool bOutliner = false; // special treatment if a title object is selected -if( pView ) +if (pView) { const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); const size_t nCount = rMarkList.GetMarkCount(); @@ -78,7 +74,7 @@ OutlineBulletDlg::OutlineBulletDlg( switch(pObj->GetObjIdentifier()) { case OBJ_TITLETEXT: -bTitle = true; +m_bTitle = true; break; case OBJ_OUTLINETEXT: bOutliner = true; @@ -88,7 +84,7 @@ OutlineBulletDlg::OutlineBulletDlg( } } -if( SfxItemState::SET != aInputSet.GetItemState(EE_PARA_NUMBULLET)) +if( SfxItemState::SET != m_aInputSet.GetItemState(EE_PARA_NUM
[Libreoffice-commits] core.git: sd/inc sd/qa sd/source sd/uiconfig
sd/inc/sdabstdlg.hxx |2 sd/qa/unit/dialogs-test.cxx|2 sd/source/ui/dlg/paragr.cxx| 14 +-- sd/source/ui/dlg/sddlgfact.cxx |4 sd/source/ui/dlg/sddlgfact.hxx |2 sd/source/ui/func/fuparagr.cxx |2 sd/source/ui/inc/paragr.hxx|8 - sd/uiconfig/sdraw/ui/drawparadialog.ui | 152 + 8 files changed, 153 insertions(+), 33 deletions(-) New commits: commit feadf8387fb215ad0e126139c7b32af11ea2e194 Author: Caolán McNamara AuthorDate: Mon Sep 17 11:56:49 2018 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 18 21:58:49 2018 +0200 weld SdParagraphDlg Change-Id: I936b8b52c36f4e91a330020badf5ae4d7a4393da Reviewed-on: https://gerrit.libreoffice.org/60582 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index e8b1ed936ce1..44b6376dfed9 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -178,7 +178,7 @@ public: virtual VclPtr CreateSdInsertPagesObjsDlg(vcl::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName) = 0; virtual VclPtr CreateMorphDlg(weld::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) = 0; virtual VclPtr CreateSdOutlineBulletTabDlg(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; -virtual VclPtr CreateSdParagraphTabDlg(vcl::Window* pWindow, const SfxItemSet* pAttr) = 0; +virtual VclPtr CreateSdParagraphTabDlg(weld::Window* pWindow, const SfxItemSet* pAttr) = 0; virtual VclPtr CreateSdStartPresentationDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, const std::vector &rPageNames, SdCustomShowList* pCSList ) = 0; virtual VclPtr CreateRemoteDialog( vcl::Window* pWindow ) = 0; diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index 0988949f415d..b4bd349e7e31 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -419,7 +419,7 @@ VclPtr SdDialogsTest::createDialogByID(sal_uInt32 nID) { // CreateSdParagraphTabDlg(const SfxItemSet* pAttr) override; pRetval = getSdAbstractDialogFactory()->CreateSdParagraphTabDlg( -getViewShell()->GetActiveWindow(), +getViewShell()->GetFrameWeld(), &getEmptySfxItemSet()); break; } diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx index 3b7aa7698cc6..b6eb3583cbcc 100644 --- a/sd/source/ui/dlg/paragr.cxx +++ b/sd/source/ui/dlg/paragr.cxx @@ -160,13 +160,11 @@ IMPL_LINK_NOARG(SdParagraphNumTabPage, ImplNewStartHdl, Button*, void) m_pNewStartNF->Enable(bEnable && m_pNewStartNumberCB->IsChecked()); } -SdParagraphDlg::SdParagraphDlg( vcl::Window* pParent, const SfxItemSet* pAttr ) - : SfxTabDialog( pParent, - "DrawParagraphPropertiesDialog", - "modules/sdraw/ui/drawparadialog.ui", - pAttr ) +SdParagraphDlg::SdParagraphDlg(weld::Window* pParent, const SfxItemSet* pAttr) +: SfxTabDialogController(pParent, "modules/sdraw/ui/drawparadialog.ui", + "DrawParagraphPropertiesDialog", pAttr) { -m_nParaStd = AddTabPage( "labelTP_PARA_STD", RID_SVXPAGE_STD_PARAGRAPH); +AddTabPage( "labelTP_PARA_STD", RID_SVXPAGE_STD_PARAGRAPH); SvtCJKOptions aCJKOptions; if( aCJKOptions.IsAsianTypographyEnabled() ) @@ -185,10 +183,10 @@ SdParagraphDlg::SdParagraphDlg( vcl::Window* pParent, const SfxItemSet* pAttr ) AddTabPage("labelTP_TABULATOR", RID_SVXPAGE_TABULATOR); } -void SdParagraphDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) +void SdParagraphDlg::PageCreated(const OString& rId, SfxTabPage &rPage) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); -if (m_nParaStd == nId) +if (rId == "labelTP_PARA_STD") { aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST, MM50/2)); rPage.PageCreated(aSet); diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx index f6640e06d42b..871ec0d51f80 100644 --- a/sd/source/ui/dlg/sddlgfact.cxx +++ b/sd/source/ui/dlg/sddlgfact.cxx @@ -424,9 +424,9 @@ VclPtr SdAbstractDialogFactory_Impl::CreateSdOutlineBulle return VclPtr::Create( VclPtr<::sd::OutlineBulletDlg>::Create( pParent, pAttr, pView ) ); } -VclPtr SdAbstractDialogFactory_Impl::CreateSdParagraphTabDlg(vcl::Window* pParent, const SfxItemSet* pAttr ) +VclPtr SdAbstractDialogFactory_Impl::CreateSdParagraphTabDlg(weld::Window* pParent, const SfxItemSet* pAttr ) { -return VclPtr::Create( VclPtr::Create( pParent, pAttr ) ); +return VclPtr::Create(o3tl::make_unique(pParent, pAttr)); } VclPtr
[Libreoffice-commits] core.git: sd/inc sd/qa sd/source sd/uiconfig
sd/inc/sdabstdlg.hxx |2 sd/qa/unit/dialogs-test.cxx|3 sd/source/ui/dlg/dlgpage.cxx | 29 - sd/source/ui/dlg/sddlgfact.cxx | 40 sd/source/ui/dlg/sddlgfact.hxx | 22 ++ sd/source/ui/func/fupage.cxx |2 sd/source/ui/inc/dlgpage.hxx |9 -- sd/uiconfig/sdraw/ui/drawpagedialog.ui | 104 - 8 files changed, 169 insertions(+), 42 deletions(-) New commits: commit a7e9db8338e93921ede5892545ce18655d08aad5 Author: Caolán McNamara AuthorDate: Sun Sep 16 14:24:12 2018 +0100 Commit: Caolán McNamara CommitDate: Mon Sep 17 16:06:08 2018 +0200 weld SdPageDlg Change-Id: Id9c78651d3eb315bf2e982eef48ef24071bfc79b Reviewed-on: https://gerrit.libreoffice.org/60550 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index 332312ae77ba..f9c364c3a428 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -171,7 +171,7 @@ public: virtual VclPtrCreateCopyDlg(vcl::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView ) = 0; virtual VclPtr CreateSdCustomShowDlg(weld::Window* pWindow, SdDrawDocument& rDrawDoc) = 0; virtual VclPtr CreateSdTabCharDialog(vcl::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell) = 0; -virtual VclPtr CreateSdTabPageDialog(vcl::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage) = 0; +virtual VclPtr CreateSdTabPageDialog(weld::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage) = 0; virtual VclPtr CreateSdModifyFieldDlg(weld::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet) = 0; virtual VclPtr CreateSdSnapLineDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView) = 0; virtual VclPtr CreateSdInsertLayerDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& rStr) = 0; diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index dd9a6d989bec..1fe44cc04243 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -327,8 +327,9 @@ VclPtr SdDialogsTest::createDialogByID(sal_uInt32 nID) // CreateSdTabPageDialog(const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage = true) override; // needs a special SfxItemSet with merged content from page and other stuff, crashes without that (2nd page) // needs a 'SfxObjectShell* pDocShell', crashes without. Also sufficient: FillStyleItemSet with XFILL_NONE set +auto const parent = getViewShell()->GetActiveWindow(); pRetval = getSdAbstractDialogFactory()->CreateSdTabPageDialog( -getViewShell()->GetActiveWindow(), +parent == nullptr ? nullptr : parent->GetFrameWeld(), &getEmptyFillStyleSfxItemSet(), getDocShell(), true); diff --git a/sd/source/ui/dlg/dlgpage.cxx b/sd/source/ui/dlg/dlgpage.cxx index 75933ae73271..97e03977ef1a 100644 --- a/sd/source/ui/dlg/dlgpage.cxx +++ b/sd/source/ui/dlg/dlgpage.cxx @@ -33,12 +33,9 @@ /** * Constructor of tab dialog: appends pages to the dialog */ -SdPageDlg::SdPageDlg( SfxObjectShell const * pDocSh, vcl::Window* pParent, const SfxItemSet* pAttr, bool bAreaPage ) : -SfxTabDialog ( pParent - ,"DrawPageDialog" - ,"modules/sdraw/ui/drawpagedialog.ui" - , pAttr ), -mpDocShell ( pDocSh ) +SdPageDlg::SdPageDlg(SfxObjectShell const * pDocSh, weld::Window* pParent, const SfxItemSet* pAttr, bool bAreaPage) +: SfxTabDialogController(pParent, "modules/sdraw/ui/drawpagedialog.ui", "DrawPageDialog", pAttr) +, mpDocShell(pDocSh) { SvxColorListItem const * pColorListItem = mpDocShell->GetItem( SID_COLOR_TABLE ); SvxGradientListItem const * pGradientListItem = mpDocShell->GetItem( SID_GRADIENT_LIST ); @@ -54,28 +51,28 @@ SdPageDlg::SdPageDlg( SfxObjectShell const * pDocSh, vcl::Window* pParent, const SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); -mnPage = AddTabPage( "RID_SVXPAGE_PAGE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), nullptr ); -mnArea = AddTabPage( "RID_SVXPAGE_AREA", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), nullptr ); -mnTransparence = AddTabPage( "RID_SVXPAGE_TRANSPARENCE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), nullptr ); +AddTabPage("RID_SVXPAGE_PAGE", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PAGE), nullptr); +AddTabPage("RID_SVXPAGE_AREA", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_AREA), nullptr); +AddTabPage("RID_SVXPAGE_TRANSPARENCE", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TRANSPARENCE), nullptr);
[Libreoffice-commits] core.git: sd/inc sd/qa sd/source sd/uiconfig svx/source
sd/inc/sdabstdlg.hxx |2 sd/qa/unit/dialogs-test.cxx| 13 sd/source/ui/dlg/PhotoAlbumDialog.cxx | 285 ++--- sd/source/ui/dlg/PhotoAlbumDialog.hxx | 70 +--- sd/source/ui/dlg/sddlgfact.cxx | 10 sd/source/ui/dlg/sddlgfact.hxx | 14 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |3 sd/source/ui/view/drviews2.cxx |3 sd/source/ui/view/outlnvs2.cxx |3 sd/uiconfig/simpress/ui/photoalbum.ui | 64 +-- svx/source/dialog/graphctl.cxx |1 11 files changed, 206 insertions(+), 262 deletions(-) New commits: commit 850995b2c22db7c3ddbcc8ebfad5bcbc0b01f029 Author: Caolán McNamara Date: Fri May 11 13:56:03 2018 +0100 weld SdPhotoAlbumDialog Change-Id: I46cca94bb43e1b1cd9757b22baad9bb3f61bc15d Reviewed-on: https://gerrit.libreoffice.org/54132 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index babfe9d84baf..27fb17ddd9ed 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -206,7 +206,7 @@ public: virtual CreateTabPage GetSdOptionsMiscTabPageCreatorFunc() = 0; virtual CreateTabPage GetSdOptionsSnapTabPageCreatorFunc() = 0; -virtual VclPtr CreateSdPhotoAlbumDialog( vcl::Window* pWindow, SdDrawDocument* pDoc) = 0; +virtual VclPtr CreateSdPhotoAlbumDialog(weld::Window* pWindow, SdDrawDocument* pDoc) = 0; protected: ~SdAbstractDialogFactory() {} diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index f926f0be7948..8a2d6603ac55 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -278,7 +278,7 @@ VclPtr SdDialogsTest::createDialogByID(sal_uInt32 nID) } case 1: { -// CreateBreakDlg(vcl::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount) override; +// CreateBreakDlg(weld::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount) override; // this dialog requires pDrawView. It does not show much when // there is no object selected that can be broken up. For better // results it might be necessary to add/select an object that @@ -397,7 +397,7 @@ VclPtr SdDialogsTest::createDialogByID(sal_uInt32 nID) } case 10: { -// CreateMorphDlg(vcl::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) override; +// CreateMorphDlg(weld::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) override; SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc(); CPPUNIT_ASSERT(pDrawDoc); SdPage* pSdPage = pDrawDoc->GetSdPage(0, PageKind::Standard); @@ -542,7 +542,7 @@ VclPtr SdDialogsTest::createDialogByID(sal_uInt32 nID) } case 19: { -// CreateSdVectorizeDlg(vcl::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell) override; +// CreateSdVectorizeDlg(weld::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell) override; // works well with empty Bitmap, but my be nicer with setting one Bitmap aEmptyBitmap; auto const parent = Application::GetDefDialogParent(); @@ -554,17 +554,18 @@ VclPtr SdDialogsTest::createDialogByID(sal_uInt32 nID) } case 20: { -// CreateSdPhotoAlbumDialog(vcl::Window* pWindow, SdDrawDocument* pDoc) override; +// CreateSdPhotoAlbumDialog(weld::Window* pWindow, SdDrawDocument* pDoc) override; SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc(); CPPUNIT_ASSERT(pDrawDoc); +auto const parent = Application::GetDefDialogParent(); pRetval = getSdAbstractDialogFactory()->CreateSdPhotoAlbumDialog( -Application::GetDefDialogParent(), +parent == nullptr ? nullptr : parent->GetFrameWeld(), pDrawDoc); break; } case 21: { -// CreateMasterLayoutDialog(vcl::Window* pParent, SdDrawDocument* pDoc, SdPage*) override; +// CreateMasterLayoutDialog(weld::Window* pParent, SdDrawDocument* pDoc, SdPage*) override; SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc(); CPPUNIT_ASSERT(pDrawDoc); SdPage* pSdPage = pDrawDoc->GetSdPage(0, PageKind::Standard); diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index d7af857f86d8..863121b9b201 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++
[Libreoffice-commits] core.git: sd/inc sd/qa sd/source sd/uiconfig vcl/unx
sd/inc/sdabstdlg.hxx |2 sd/qa/unit/dialogs-test.cxx |3 sd/source/ui/dlg/custsdlg.cxx| 362 ++- sd/source/ui/dlg/sddlgfact.cxx | 15 sd/source/ui/dlg/sddlgfact.hxx | 11 sd/source/ui/func/fucushow.cxx |3 sd/source/ui/inc/custsdlg.hxx| 76 ++-- sd/uiconfig/simpress/ui/customslideshows.ui | 46 ++ sd/uiconfig/simpress/ui/definecustomslideshow.ui | 94 + vcl/unx/gtk3/gtk3gtkinst.cxx | 20 - 10 files changed, 351 insertions(+), 281 deletions(-) New commits: commit 5e245445200c5d094bb7eef76d8df3077b799ac5 Author: Caolán McNamara Date: Thu May 10 11:27:36 2018 +0100 weld SdCustomShowDlg and SdDefineCustomShowDlg Change-Id: I44d40a286eb5d70982284a270f340653858d38cf Reviewed-on: https://gerrit.libreoffice.org/54076 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index 65cfb1afeadc..1cd4f51d11e7 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -180,7 +180,7 @@ public: virtual VclPtr CreateBreakDlg(weld::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount ) = 0; virtual VclPtrCreateCopyDlg(vcl::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView ) = 0; -virtual VclPtr CreateSdCustomShowDlg(vcl::Window* pWindow, SdDrawDocument& rDrawDoc) = 0; +virtual VclPtr CreateSdCustomShowDlg(weld::Window* pWindow, SdDrawDocument& rDrawDoc) = 0; virtual VclPtr CreateSdTabCharDialog(vcl::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell) = 0; virtual VclPtr CreateSdTabPageDialog(vcl::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage) = 0; virtual VclPtr CreateSdModifyFieldDlg(vcl::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet) = 0; diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index a30643293ed1..a4a0a049bd7a 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -307,8 +307,9 @@ VclPtr SdDialogsTest::createDialogByID(sal_uInt32 nID) SdDrawDocument* pDrawDoc = getSdXImpressDocument()->GetDoc(); CPPUNIT_ASSERT(pDrawDoc); +auto const parent = getViewShell()->GetActiveWindow(); pRetval = getSdAbstractDialogFactory()->CreateSdCustomShowDlg( -getViewShell()->GetActiveWindow(), +parent == nullptr ? nullptr : parent->GetFrameWeld(), *pDrawDoc); break; } diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx index 66fe0686076c..060f314c74a6 100644 --- a/sd/source/ui/dlg/custsdlg.cxx +++ b/sd/source/ui/dlg/custsdlg.cxx @@ -32,36 +32,34 @@ #include // SdCustomShowDlg -SdCustomShowDlg::SdCustomShowDlg( vcl::Window* pWindow, -SdDrawDocument& rDrawDoc ) : -ModalDialog ( pWindow, "CustomSlideShows", "modules/simpress/ui/customslideshows.ui" ), -rDoc( rDrawDoc ), -pCustomShowList ( nullptr ), -pCustomShow ( nullptr ), -bModified ( false ) +SdCustomShowDlg::SdCustomShowDlg(weld::Window* pWindow, SdDrawDocument& rDrawDoc) +: GenericDialogController(pWindow, "modules/simpress/ui/customslideshows.ui", "CustomSlideShows") +, rDoc(rDrawDoc) +, pCustomShowList(nullptr) +, pCustomShow(nullptr) +, bModified(false) +, m_xLbCustomShows(m_xBuilder->weld_tree_view("customshowlist")) +, m_xCbxUseCustomShow(m_xBuilder->weld_check_button("usecustomshows")) +, m_xBtnNew(m_xBuilder->weld_button("new")) +, m_xBtnEdit(m_xBuilder->weld_button("edit")) +, m_xBtnRemove(m_xBuilder->weld_button("delete")) +, m_xBtnCopy(m_xBuilder->weld_button("copy")) +, m_xBtnHelp(m_xBuilder->weld_button("help")) +, m_xBtnStartShow(m_xBuilder->weld_button("startshow")) +, m_xBtnOK(m_xBuilder->weld_button("ok")) { -get( m_pBtnNew, "new" ); -get( m_pBtnEdit, "edit" ); -get( m_pBtnRemove, "delete" ); -get( m_pBtnCopy, "copy" ); -get( m_pBtnHelp, "help" ); -get( m_pBtnStartShow, "startshow" ); -get( m_pBtnOK, "ok" ); -get( m_pLbCustomShows, "customshowlist"); -get( m_pCbxUseCustomShow, "usecustomshows" ); - - m_pLbCustomShows->set_width_request(m_pLbCustomShows->approximate_char_width() * 32); -m_pLbCustomShows->SetDropDownLineCount(8); - -Link aLink( LINK( this, SdCustomShowDlg, ClickButtonHdl ) ); -m_pBtnNew->SetClickHdl( aLink ); -m_pBtnEdit->SetClickHdl( aLink ); -m_pBtnRemove->SetClickHdl( aLink ); -m_pBtnCopy->SetClickHdl( aLink ); -m_pCbxUseCustomShow->SetClickHdl( aLink ); -m_pLbCustomShows->Set
[Libreoffice-commits] core.git: sd/inc sd/qa sd/source sd/uiconfig
sd/inc/sdabstdlg.hxx |2 - sd/qa/unit/dialogs-test.cxx |3 + sd/source/ui/dlg/layeroptionsdlg.cxx | 66 +-- sd/source/ui/dlg/sddlgfact.cxx | 15 +-- sd/source/ui/dlg/sddlgfact.hxx | 11 - sd/source/ui/inc/layeroptionsdlg.hxx | 28 ++ sd/source/ui/view/drviews2.cxx |6 ++- sd/uiconfig/sdraw/ui/insertlayer.ui | 16 ++-- 8 files changed, 77 insertions(+), 70 deletions(-) New commits: commit 58c07ae9829c1d40f0a851d379c126933243fce3 Author: Caolán McNamara Date: Mon Apr 30 10:30:31 2018 +0100 weld SdInsertLayerDlg Change-Id: I1f298fe6bf1bbd1dc8edc6386bf4466d5ac1e05a Reviewed-on: https://gerrit.libreoffice.org/53651 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index 571d8369e2d7..8587d9dc256e 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -185,7 +185,7 @@ public: virtual VclPtr CreateSdTabPageDialog(vcl::Window* pWindow, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage) = 0; virtual VclPtr CreateSdModifyFieldDlg(vcl::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet) = 0; virtual VclPtr CreateSdSnapLineDlg(vcl::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView) = 0; -virtual VclPtr CreateSdInsertLayerDlg(vcl::Window* pParent, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr) = 0; +virtual VclPtr CreateSdInsertLayerDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& rStr) = 0; virtual VclPtr CreateSdInsertPagesObjsDlg(vcl::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName) = 0; virtual VclPtr CreateMorphDlg(weld::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) = 0; virtual VclPtr CreateSdOutlineBulletTabDlg(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index 89e036af3442..260b22ce7fc0 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -372,8 +372,9 @@ VclPtr SdDialogsTest::createDialogByID(sal_uInt32 nID) aNewAttr.Put(makeSdAttrLayerPrintable()); aNewAttr.Put(makeSdAttrLayerLocked()); aNewAttr.Put(makeSdAttrLayerThisPage()); +auto const parent = getViewShell()->GetActiveWindow(); pRetval = getSdAbstractDialogFactory()->CreateSdInsertLayerDlg( -getViewShell()->GetActiveWindow(), +parent == nullptr ? nullptr : parent->GetFrameWeld(), aNewAttr, true, // alternative: false SdResId(STR_INSERTLAYER) /* alternative: STR_MODIFYLAYER */); diff --git a/sd/source/ui/dlg/layeroptionsdlg.cxx b/sd/source/ui/dlg/layeroptionsdlg.cxx index 4c966ab0bea5..2530f3cbdace 100644 --- a/sd/source/ui/dlg/layeroptionsdlg.cxx +++ b/sd/source/ui/dlg/layeroptionsdlg.cxx @@ -18,60 +18,46 @@ */ #include -#include #include #include -SdInsertLayerDlg::SdInsertLayerDlg( vcl::Window* pWindow, const SfxItemSet& rInAttrs, -bool bDeletable, const OUString& rStr ) -: ModalDialog(pWindow, "InsertLayerDialog", "modules/sdraw/ui/insertlayer.ui") +SdInsertLayerDlg::SdInsertLayerDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, +bool bDeletable, const OUString& rStr) +: GenericDialogController(pWindow, "modules/sdraw/ui/insertlayer.ui", "InsertLayerDialog") , mrOutAttrs(rInAttrs) +, m_xEdtName(m_xBuilder->weld_entry("name")) +, m_xEdtTitle(m_xBuilder->weld_entry("title")) +, m_xEdtDesc(m_xBuilder->weld_text_view("textview")) +, m_xCbxVisible(m_xBuilder->weld_check_button("visible")) +, m_xCbxPrintable(m_xBuilder->weld_check_button("printable")) +, m_xCbxLocked(m_xBuilder->weld_check_button("locked")) +, m_xNameFrame(m_xBuilder->weld_widget("nameframe")) { -SetText(rStr); - -get(m_pEdtName, "name"); -get(m_pEdtTitle, "title"); -get(m_pEdtDesc, "textview"); -get(m_pCbxVisible, "visible"); -get(m_pCbxPrintable, "printable"); -get(m_pCbxLocked, "locked"); - -m_pEdtName->SetText( static_cast( mrOutAttrs.Get( ATTR_LAYER_NAME ) ).GetValue() ); -m_pEdtTitle->SetText( static_cast( mrOutAttrs.Get( ATTR_LAYER_TITLE ) ).GetValue() ); -m_pEdtDesc->SetText( static_cast( mrOutAttrs.Get( ATTR_LAYER_DESC ) ).GetValue() ); -m_pEdtDesc->set_height_request(4 * m_pEdtDesc->GetTextHeight()); -m_pCbxVisible->Check( static_cast( mrOutAttrs.Get( ATTR_LAYER_VISIBLE ) ).GetValue() ); -m_pCbxPrintable->Check( static_cast( mrOutAttrs.Get( ATTR_LAYER_PRINTABLE ) ).GetValue() ); -m_pCbxLocked->Check( static_cast( mrOutAttrs.Get( ATTR_LAYER_LOCKED ) ).GetValue() ); - -get("namef
[Libreoffice-commits] core.git: sd/inc sd/qa sd/source sd/uiconfig
sd/inc/sdabstdlg.hxx|2 - sd/qa/unit/dialogs-test.cxx |3 +- sd/source/ui/dlg/morphdlg.cxx | 35 ++-- sd/source/ui/dlg/sddlgfact.cxx | 19 ++--- sd/source/ui/dlg/sddlgfact.hxx | 11 -- sd/source/ui/func/fumorph.cxx |2 - sd/source/ui/inc/morphdlg.hxx | 27 sd/uiconfig/sdraw/ui/crossfadedialog.ui | 11 -- 8 files changed, 55 insertions(+), 55 deletions(-) New commits: commit 8d2fe4c81c6f6bde3571beaa02abc0a9eba038e8 Author: Caolán McNamara Date: Sun Apr 29 21:29:13 2018 +0100 weld MorphDlg Change-Id: I6f47606e8d66c9bf9a32d221f223d734397b8570 Reviewed-on: https://gerrit.libreoffice.org/53636 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index 0f96f96ea62e..571d8369e2d7 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -187,7 +187,7 @@ public: virtual VclPtr CreateSdSnapLineDlg(vcl::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView) = 0; virtual VclPtr CreateSdInsertLayerDlg(vcl::Window* pParent, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr) = 0; virtual VclPtr CreateSdInsertPagesObjsDlg(vcl::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName) = 0; -virtual VclPtr CreateMorphDlg(vcl::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) = 0; +virtual VclPtr CreateMorphDlg(weld::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) = 0; virtual VclPtr CreateSdOutlineBulletTabDlg(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; virtual VclPtr CreateSdParagraphTabDlg(vcl::Window* pWindow, const SfxItemSet* pAttr) = 0; virtual VclPtr CreateSdStartPresentationDlg( vcl::Window* pWindow, const SfxItemSet& rInAttrs, diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index 3fac39df3ed5..89e036af3442 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -402,8 +402,9 @@ VclPtr SdDialogsTest::createDialogByID(sal_uInt32 nID) SdrObject* pSdrObj = pSdPage->GetObj(0); // using one SdrObject is okay, none crashes CPPUNIT_ASSERT(pSdrObj); +auto const parent = Application::GetDefDialogParent(); pRetval = getSdAbstractDialogFactory()->CreateMorphDlg( -Application::GetDefDialogParent(), +parent == nullptr ? nullptr : parent->GetFrameWeld(), pSdrObj, pSdrObj); break; diff --git a/sd/source/ui/dlg/morphdlg.cxx b/sd/source/ui/dlg/morphdlg.cxx index df12096702e1..434a57d7f034 100644 --- a/sd/source/ui/dlg/morphdlg.cxx +++ b/sd/source/ui/dlg/morphdlg.cxx @@ -33,14 +33,12 @@ using namespace com::sun::star; namespace sd { -MorphDlg::MorphDlg( vcl::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2 ) -: ModalDialog(pParent, "CrossFadeDialog", -"modules/sdraw/ui/crossfadedialog.ui") +MorphDlg::MorphDlg(weld::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2 ) +: GenericDialogController(pParent, "modules/sdraw/ui/crossfadedialog.ui", "CrossFadeDialog") +, m_xMtfSteps(m_xBuilder->weld_spin_button("increments")) +, m_xCbxAttributes(m_xBuilder->weld_check_button("attributes")) +, m_xCbxOrientation(m_xBuilder->weld_check_button("orientation")) { -get(m_pMtfSteps, "increments"); -get(m_pCbxAttributes, "attributes"); -get(m_pCbxOrientation, "orientation"); - LoadSettings(); SfxItemPool & rPool = pObj1->GetObjectItemPool(); @@ -58,21 +56,12 @@ MorphDlg::MorphDlg( vcl::Window* pParent, const SdrObject* pObj1, const SdrObjec if ( ( ( eLineStyle1 == drawing::LineStyle_NONE ) || ( eLineStyle2 == drawing::LineStyle_NONE ) ) && ( ( eFillStyle1 != drawing::FillStyle_SOLID ) || ( eFillStyle2 != drawing::FillStyle_SOLID ) ) ) { -m_pCbxAttributes->Disable(); +m_xCbxAttributes->set_sensitive(false); } } MorphDlg::~MorphDlg() { -disposeOnce(); -} - -void MorphDlg::dispose() -{ -m_pMtfSteps.clear(); -m_pCbxAttributes.clear(); -m_pCbxOrientation.clear(); -ModalDialog::dispose(); } void MorphDlg::LoadSettings() @@ -94,9 +83,9 @@ void MorphDlg::LoadSettings() bOrient = bAttrib = true; } -m_pMtfSteps->SetValue( nSteps ); -m_pCbxOrientation->Check( bOrient ); -m_pCbxAttributes->Check( bAttrib ); +m_xMtfSteps->set_value(nSteps); +m_xCbxOrientation->set_active(bOrient); +m_xCbxAttributes->set_active(bAttrib); } void MorphDlg::SaveSettings() const @@ -108,9 +97,9 @@ void MorphDlg::SaveSettings() const { SdIOCompat aCompat( *xOStm, StreamMo
[Libreoffice-commits] core.git: sd/inc sd/qa sd/source sd/uiconfig
sd/inc/sdabstdlg.hxx |4 -- sd/qa/unit/dialogs-test.cxx|3 + sd/source/ui/dlg/masterlayoutdlg.cxx | 54 +++-- sd/source/ui/dlg/sddlgfact.cxx | 15 ++-- sd/source/ui/dlg/sddlgfact.hxx | 16 ++-- sd/source/ui/inc/masterlayoutdlg.hxx | 22 --- sd/source/ui/view/drviews3.cxx |3 + sd/uiconfig/simpress/ui/masterlayoutdlg.ui |3 + 8 files changed, 62 insertions(+), 58 deletions(-) New commits: commit 5fa87d266ef2a593b9b948787781200600f4f3da Author: Caolán McNamara Date: Mon Apr 30 10:12:31 2018 +0100 weld MasterLayoutDialog Change-Id: Iab0a2c1565f109886596a1c15179fdf497633752 Reviewed-on: https://gerrit.libreoffice.org/53650 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index 35b7233eea73..0f96f96ea62e 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -200,9 +200,7 @@ public: virtual VclPtr CreateSdVectorizeDlg( vcl::Window* pParent, const Bitmap& rBmp, ::sd::DrawDocShell* pDocShell ) = 0; virtual VclPtrCreateSdPublishingDlg( vcl::Window* pWindow, DocumentType eDocType) = 0; -virtual VclPtr CreateMasterLayoutDialog( vcl::Window* pParent, - SdDrawDocument* pDoc, - SdPage* ) = 0; +virtual VclPtr CreateMasterLayoutDialog(weld::Window* pParent, SdDrawDocument* pDoc, SdPage*) = 0; virtual VclPtr CreateHeaderFooterDialog( sd::ViewShell* pViewShell, vcl::Window* pParent, diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index 478f91b324e8..3fac39df3ed5 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -563,8 +563,9 @@ VclPtr SdDialogsTest::createDialogByID(sal_uInt32 nID) CPPUNIT_ASSERT(pDrawDoc); SdPage* pSdPage = pDrawDoc->GetSdPage(0, PageKind::Standard); CPPUNIT_ASSERT(pSdPage); +auto const parent = Application::GetDefDialogParent(); pRetval = getSdAbstractDialogFactory()->CreateMasterLayoutDialog( -Application::GetDefDialogParent(), +parent == nullptr ? nullptr : parent->GetFrameWeld(), pDrawDoc, pSdPage); break; diff --git a/sd/source/ui/dlg/masterlayoutdlg.cxx b/sd/source/ui/dlg/masterlayoutdlg.cxx index a0ec4298f54c..83d8d38c8c8e 100644 --- a/sd/source/ui/dlg/masterlayoutdlg.cxx +++ b/sd/source/ui/dlg/masterlayoutdlg.cxx @@ -24,17 +24,16 @@ using namespace ::sd; -MasterLayoutDialog::MasterLayoutDialog( vcl::Window* pParent, SdDrawDocument* pDoc, SdPage* pCurrentPage ) -: ModalDialog(pParent, "MasterLayoutDialog", "modules/simpress/ui/masterlayoutdlg.ui") +MasterLayoutDialog::MasterLayoutDialog(weld::Window* pParent, SdDrawDocument* pDoc, SdPage* pCurrentPage) +: GenericDialogController(pParent, "modules/simpress/ui/masterlayoutdlg.ui", "MasterLayoutDialog") , mpDoc(pDoc) , mpCurrentPage(pCurrentPage) +, mxCBDate(m_xBuilder->weld_check_button("datetime")) +, mxCBPageNumber(m_xBuilder->weld_check_button("pagenumber")) +, mxCBSlideNumber(m_xBuilder->weld_check_button("slidenumber")) +, mxCBHeader(m_xBuilder->weld_check_button("header")) +, mxCBFooter(m_xBuilder->weld_check_button("footer")) { -get(mpCBDate, "datetime"); -get(mpCBPageNumber, "pagenumber"); -get(mpCBSlideNumber, "slidenumber"); -get(mpCBHeader, "header"); -get(mpCBFooter, "footer"); - if( mpCurrentPage && !mpCurrentPage->IsMasterPage() ) { mpCurrentPage = static_cast(&(mpCurrentPage->TRG_GetMasterPage())); @@ -50,8 +49,8 @@ MasterLayoutDialog::MasterLayoutDialog( vcl::Window* pParent, SdDrawDocument* pD { case PageKind::Standard: { -mpCBHeader->Enable(false); -mpCBPageNumber->SetText(mpCBSlideNumber->GetText()); +mxCBHeader->set_sensitive(false); +mxCBPageNumber->set_label(mxCBSlideNumber->get_label()); break; } case PageKind::Notes: @@ -65,39 +64,28 @@ MasterLayoutDialog::MasterLayoutDialog( vcl::Window* pParent, SdDrawDocument* pD mbOldFooter = mpCurrentPage->GetPresObj( PRESOBJ_FOOTER ) != nullptr; mbOldPageNumber = mpCurrentPage->GetPresObj( PRESOBJ_SLIDENUMBER ) != nullptr; -mpCBHeader->Check( mbOldHeader ); -mpCBDate->Check( mbOldDate ); -mpCBFooter->Check( mbOldFooter ); -mpCBPageNumber->Check( mbOldPageNumber ); +mxCBHeader->set_active( mbOldHeader ); +mxCBDate->set_active( mbOldDate ); +mxCBFooter->set_active( mbOldFooter ); +mxCBPageNumber->set_active( mbOldPageNumber ); } Ma