Kaydet (Commit) 0e19bb25 authored tarafından Caolán McNamara's avatar Caolán McNamara

weld SdPresLayoutTemplateDlg

Change-Id: Ifc4c9a4631e92eee4b7f9b215c41d2bcc12a17d1
Reviewed-on: https://gerrit.libreoffice.org/61926
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst f1ca6480
...@@ -182,7 +182,7 @@ public: ...@@ -182,7 +182,7 @@ public:
virtual VclPtr<AbstractSdStartPresDlg> CreateSdStartPresentationDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, virtual VclPtr<AbstractSdStartPresDlg> CreateSdStartPresentationDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs,
const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList ) = 0; const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList ) = 0;
virtual VclPtr<VclAbstractDialog> CreateRemoteDialog( vcl::Window* pWindow ) = 0; virtual VclPtr<VclAbstractDialog> CreateRemoteDialog( vcl::Window* pWindow ) = 0;
virtual VclPtr<SfxAbstractTabDialog> CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) = 0; virtual VclPtr<SfxAbstractTabDialog> CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool) = 0;
virtual VclPtr<AbstractSdPresLayoutDlg> CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) = 0; virtual VclPtr<AbstractSdPresLayoutDlg> CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) = 0;
virtual VclPtr<SfxAbstractTabDialog> CreateSdTabTemplateDlg(vcl::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView) = 0; virtual VclPtr<SfxAbstractTabDialog> CreateSdTabTemplateDlg(vcl::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView) = 0;
virtual VclPtr<SfxAbstractDialog> CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0; virtual VclPtr<SfxAbstractDialog> CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0;
......
...@@ -463,16 +463,17 @@ VclPtr<VclAbstractDialog> SdDialogsTest::createDialogByID(sal_uInt32 nID) ...@@ -463,16 +463,17 @@ VclPtr<VclAbstractDialog> SdDialogsTest::createDialogByID(sal_uInt32 nID)
} }
case 15: case 15:
{ {
// CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, vcl::Window* pParent, const SdResId& DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool) override; // CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, const SdResId& DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool) override;
// use STR_PSEUDOSHEET_TITLE configuration, see futempl.cxx for more possible configurations // use STR_PSEUDOSHEET_TITLE configuration, see futempl.cxx for more possible configurations
// may be nicer on the long run to take a configuration which represents a selected SdrObject // may be nicer on the long run to take a configuration which represents a selected SdrObject
SfxStyleSheetBasePool* pStyleSheetPool = getDocShell()->GetStyleSheetPool(); SfxStyleSheetBasePool* pStyleSheetPool = getDocShell()->GetStyleSheetPool();
CPPUNIT_ASSERT(pStyleSheetPool); CPPUNIT_ASSERT(pStyleSheetPool);
SfxStyleSheetBase* pStyleSheet = pStyleSheetPool->First(); SfxStyleSheetBase* pStyleSheet = pStyleSheetPool->First();
CPPUNIT_ASSERT(pStyleSheet); CPPUNIT_ASSERT(pStyleSheet);
vcl::Window* pWin = Application::GetDefDialogParent();
pRetval = getSdAbstractDialogFactory()->CreateSdPresLayoutTemplateDlg( pRetval = getSdAbstractDialogFactory()->CreateSdPresLayoutTemplateDlg(
getDocShell(), getDocShell(),
Application::GetDefDialogParent(), pWin ? pWin->GetFrameWeld() : nullptr,
false, false,
*pStyleSheet, *pStyleSheet,
PO_TITLE, PO_TITLE,
......
...@@ -49,19 +49,17 @@ ...@@ -49,19 +49,17 @@
/** /**
* Constructor of Tab dialog: appends pages to the dialog * Constructor of Tab dialog: appends pages to the dialog
*/ */
SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell const * pDocSh, SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg(SfxObjectShell const * pDocSh,
vcl::Window* pParent, weld::Window* pParent,
bool bBackground, bool bBackground,
SfxStyleSheetBase& rStyleBase, SfxStyleSheetBase& rStyleBase,
PresentationObjects _ePO, PresentationObjects _ePO,
SfxStyleSheetBasePool* pSSPool ) : SfxStyleSheetBasePool* pSSPool)
SfxTabDialog ( pParent : SfxTabDialogController(pParent, "modules/sdraw/ui/drawprtldialog.ui", "DrawPRTLDialog")
, "DrawPRTLDialog" , mpDocShell(pDocSh)
, "modules/sdraw/ui/drawprtldialog.ui"), , ePO(_ePO)
mpDocShell ( pDocSh ), , aInputSet(*rStyleBase.GetItemSet().GetPool(), svl::Items<SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL>{})
ePO ( _ePO ), , pOrgSet(&rStyleBase.GetItemSet())
aInputSet ( *rStyleBase.GetItemSet().GetPool(), svl::Items<SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL>{} ),
pOrgSet ( &rStyleBase.GetItemSet() )
{ {
if( IS_OUTLINE(ePO)) if( IS_OUTLINE(ePO))
{ {
...@@ -133,14 +131,14 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell const * pDocSh, ...@@ -133,14 +131,14 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell const * pDocSh,
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
mnLine = AddTabPage( "RID_SVXPAGE_LINE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINE ), nullptr ); AddTabPage( "RID_SVXPAGE_LINE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINE ), nullptr );
mnArea = AddTabPage( "RID_SVXPAGE_AREA", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), nullptr ); AddTabPage( "RID_SVXPAGE_AREA", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), nullptr );
mnShadow = AddTabPage( "RID_SVXPAGE_SHADOW", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_SHADOW ), nullptr ); AddTabPage( "RID_SVXPAGE_SHADOW", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_SHADOW ), nullptr );
mnTransparency = AddTabPage( "RID_SVXPAGE_TRANSPARENCE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), nullptr ); AddTabPage( "RID_SVXPAGE_TRANSPARENCE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), nullptr );
mnFont = AddTabPage( "RID_SVXPAGE_CHAR_NAME", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), nullptr ); AddTabPage( "RID_SVXPAGE_CHAR_NAME", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), nullptr );
mnEffects = AddTabPage( "RID_SVXPAGE_CHAR_EFFECTS", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), nullptr ); AddTabPage( "RID_SVXPAGE_CHAR_EFFECTS", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), nullptr );
AddTabPage( "RID_SVXPAGE_STD_PARAGRAPH", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_STD_PARAGRAPH ), nullptr ); AddTabPage( "RID_SVXPAGE_STD_PARAGRAPH", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_STD_PARAGRAPH ), nullptr );
mnTextAtt = AddTabPage( "RID_SVXPAGE_TEXTATTR", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TEXTATTR ), nullptr ); AddTabPage( "RID_SVXPAGE_TEXTATTR", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TEXTATTR ), nullptr );
AddTabPage( "RID_SVXPAGE_PICK_BULLET", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_BULLET ), nullptr ); AddTabPage( "RID_SVXPAGE_PICK_BULLET", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_BULLET ), nullptr );
AddTabPage( "RID_SVXPAGE_PICK_SINGLE_NUM", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_SINGLE_NUM ), nullptr ); AddTabPage( "RID_SVXPAGE_PICK_SINGLE_NUM", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_SINGLE_NUM ), nullptr );
AddTabPage( "RID_SVXPAGE_PICK_BMP", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_BMP ), nullptr ); AddTabPage( "RID_SVXPAGE_PICK_BMP", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_BMP ), nullptr );
...@@ -148,7 +146,7 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell const * pDocSh, ...@@ -148,7 +146,7 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell const * pDocSh,
AddTabPage( "RID_SVXPAGE_TABULATOR", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TABULATOR ), nullptr ); AddTabPage( "RID_SVXPAGE_TABULATOR", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TABULATOR ), nullptr );
AddTabPage( "RID_SVXPAGE_PARA_ASIAN", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PARA_ASIAN ), nullptr ); AddTabPage( "RID_SVXPAGE_PARA_ASIAN", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PARA_ASIAN ), nullptr );
AddTabPage( "RID_SVXPAGE_ALIGN_PARAGRAPH", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGN_PARAGRAPH ), nullptr ); AddTabPage( "RID_SVXPAGE_ALIGN_PARAGRAPH", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGN_PARAGRAPH ), nullptr );
mnBackground = AddTabPage( "RID_SVXPAGE_BACKGROUND", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), nullptr); AddTabPage( "RID_SVXPAGE_BACKGROUND", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), nullptr);
SvtCJKOptions aCJKOptions; SvtCJKOptions aCJKOptions;
if( !aCJKOptions.IsAsianTypographyEnabled() ) if( !aCJKOptions.IsAsianTypographyEnabled() )
...@@ -212,25 +210,18 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell const * pDocSh, ...@@ -212,25 +210,18 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell const * pDocSh,
aTitle = SdResId(STR_PSEUDOSHEET_NOTES); aTitle = SdResId(STR_PSEUDOSHEET_NOTES);
break; break;
} }
SetText( aTitle ); m_xDialog->set_title(aTitle);
} }
SdPresLayoutTemplateDlg::~SdPresLayoutTemplateDlg() SdPresLayoutTemplateDlg::~SdPresLayoutTemplateDlg()
{ {
disposeOnce();
} }
void SdPresLayoutTemplateDlg::dispose() void SdPresLayoutTemplateDlg::PageCreated(const OString& rId, SfxTabPage &rPage)
{
pOutSet.reset();
SfxTabDialog::dispose();
}
void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{ {
SfxAllItemSet aSet(*(aInputSet.GetPool())); SfxAllItemSet aSet(*(aInputSet.GetPool()));
if (nId == mnLine) if (rId == "RID_SVXPAGE_LINE")
{ {
aSet.Put (SvxColorListItem(pColorTab,SID_COLOR_TABLE)); aSet.Put (SvxColorListItem(pColorTab,SID_COLOR_TABLE));
aSet.Put (SvxDashListItem(pDashList,SID_DASH_LIST)); aSet.Put (SvxDashListItem(pDashList,SID_DASH_LIST));
...@@ -238,7 +229,7 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) ...@@ -238,7 +229,7 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
aSet.Put (SfxUInt16Item(SID_DLG_TYPE,1)); aSet.Put (SfxUInt16Item(SID_DLG_TYPE,1));
rPage.PageCreated(aSet); rPage.PageCreated(aSet);
} }
else if (nId == mnArea) else if (rId == "RID_SVXPAGE_AREA")
{ {
aSet.Put (SvxColorListItem(pColorTab,SID_COLOR_TABLE)); aSet.Put (SvxColorListItem(pColorTab,SID_COLOR_TABLE));
aSet.Put (SvxGradientListItem(pGradientList,SID_GRADIENT_LIST)); aSet.Put (SvxGradientListItem(pGradientList,SID_GRADIENT_LIST));
...@@ -250,35 +241,35 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) ...@@ -250,35 +241,35 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
aSet.Put (SfxUInt16Item(SID_TABPAGE_POS,0)); aSet.Put (SfxUInt16Item(SID_TABPAGE_POS,0));
rPage.PageCreated(aSet); rPage.PageCreated(aSet);
} }
else if (nId == mnShadow) else if (rId == "RID_SVXPAGE_SHADOW")
{ {
aSet.Put (SvxColorListItem(pColorTab,SID_COLOR_TABLE)); aSet.Put (SvxColorListItem(pColorTab,SID_COLOR_TABLE));
aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,0)); aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,0));
aSet.Put (SfxUInt16Item(SID_DLG_TYPE,1)); aSet.Put (SfxUInt16Item(SID_DLG_TYPE,1));
rPage.PageCreated(aSet); rPage.PageCreated(aSet);
} }
else if (nId == mnTransparency) else if (rId == "RID_SVXPAGE_TRANSPARENCE")
{ {
aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,0)); aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,0));
aSet.Put (SfxUInt16Item(SID_DLG_TYPE,1)); aSet.Put (SfxUInt16Item(SID_DLG_TYPE,1));
rPage.PageCreated(aSet); rPage.PageCreated(aSet);
} }
else if (nId == mnFont) else if (rId == "RID_SVXPAGE_CHAR_NAME")
{ {
SvxFontListItem aItem(*static_cast<const SvxFontListItem*>(mpDocShell->GetItem( SID_ATTR_CHAR_FONTLIST) ) ); SvxFontListItem aItem(*static_cast<const SvxFontListItem*>(mpDocShell->GetItem( SID_ATTR_CHAR_FONTLIST) ) );
aSet.Put (SvxFontListItem( aItem.GetFontList(), SID_ATTR_CHAR_FONTLIST)); aSet.Put (SvxFontListItem( aItem.GetFontList(), SID_ATTR_CHAR_FONTLIST));
rPage.PageCreated(aSet); rPage.PageCreated(aSet);
} }
else if (nId == mnEffects) else if (rId == "RID_SVXPAGE_CHAR_EFFECTS")
{ {
rPage.PageCreated(aSet); rPage.PageCreated(aSet);
} }
else if (nId == mnTextAtt) else if (rId == "RID_SVXPAGE_TEXTATTR")
{ {
aSet.Put(CntUInt16Item(SID_SVXTEXTATTRPAGE_OBJKIND, OBJ_TEXT)); aSet.Put(CntUInt16Item(SID_SVXTEXTATTRPAGE_OBJKIND, OBJ_TEXT));
rPage.PageCreated(aSet); rPage.PageCreated(aSet);
} }
else if (nId == mnBackground) else if (rId == "RID_SVXPAGE_BACKGROUND")
{ {
aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast<sal_uInt32>(SvxBackgroundTabFlags::SHOW_CHAR_BKGCOLOR))); aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast<sal_uInt32>(SvxBackgroundTabFlags::SHOW_CHAR_BKGCOLOR)));
rPage.PageCreated(aSet); rPage.PageCreated(aSet);
...@@ -287,17 +278,17 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) ...@@ -287,17 +278,17 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
const SfxItemSet* SdPresLayoutTemplateDlg::GetOutputItemSet() const const SfxItemSet* SdPresLayoutTemplateDlg::GetOutputItemSet() const
{ {
if( pOutSet ) if (pOutSet)
{ {
pOutSet->Put( *SfxTabDialog::GetOutputItemSet() ); pOutSet->Put(*SfxTabDialogController::GetOutputItemSet());
const SvxNumBulletItem *pSvxNumBulletItem = nullptr; const SvxNumBulletItem *pSvxNumBulletItem = nullptr;
if( SfxItemState::SET == pOutSet->GetItemState(EE_PARA_NUMBULLET, false, reinterpret_cast<const SfxPoolItem**>(&pSvxNumBulletItem) )) if (SfxItemState::SET == pOutSet->GetItemState(EE_PARA_NUMBULLET, false, reinterpret_cast<const SfxPoolItem**>(&pSvxNumBulletItem)))
SdBulletMapper::MapFontsInNumRule( *pSvxNumBulletItem->GetNumRule(), *pOutSet ); SdBulletMapper::MapFontsInNumRule( *pSvxNumBulletItem->GetNumRule(), *pOutSet );
return pOutSet.get(); return pOutSet.get();
} }
else else
return SfxTabDialog::GetOutputItemSet(); return SfxTabDialogController::GetOutputItemSet();
} }
sal_uInt16 SdPresLayoutTemplateDlg::GetOutlineLevel() const sal_uInt16 SdPresLayoutTemplateDlg::GetOutlineLevel() const
......
...@@ -65,7 +65,16 @@ short AbstractSdCustomShowDlg_Impl::Execute() ...@@ -65,7 +65,16 @@ short AbstractSdCustomShowDlg_Impl::Execute()
} }
IMPL_ABSTDLG_BASE(SdAbstractTabDialog_Impl); IMPL_ABSTDLG_BASE(SdAbstractTabDialog_Impl);
IMPL_ABSTDLG_BASE(SdPresLayoutTemplateDlg_Impl);
short SdPresLayoutTemplateDlg_Impl::Execute()
{
return m_xDlg->execute();
}
bool SdPresLayoutTemplateDlg_Impl::StartExecuteAsync(AsyncContext &rCtx)
{
return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
}
short AbstractSdModifyFieldDlg_Impl::Execute() short AbstractSdModifyFieldDlg_Impl::Execute()
{ {
...@@ -243,27 +252,27 @@ void AbstractBulletDialog_Impl::SetText( const OUString& rStr ) ...@@ -243,27 +252,27 @@ void AbstractBulletDialog_Impl::SetText( const OUString& rStr )
void SdPresLayoutTemplateDlg_Impl::SetCurPageId( const OString& rName ) void SdPresLayoutTemplateDlg_Impl::SetCurPageId( const OString& rName )
{ {
pDlg->SetCurPageId( rName ); m_xDlg->SetCurPageId( rName );
} }
const SfxItemSet* SdPresLayoutTemplateDlg_Impl::GetOutputItemSet() const const SfxItemSet* SdPresLayoutTemplateDlg_Impl::GetOutputItemSet() const
{ {
return pDlg->GetOutputItemSet(); return m_xDlg->GetOutputItemSet();
} }
const sal_uInt16* SdPresLayoutTemplateDlg_Impl::GetInputRanges(const SfxItemPool& pItem ) const sal_uInt16* SdPresLayoutTemplateDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
{ {
return pDlg->GetInputRanges( pItem ); return m_xDlg->GetInputRanges( pItem );
} }
void SdPresLayoutTemplateDlg_Impl::SetInputSet( const SfxItemSet* pInSet ) void SdPresLayoutTemplateDlg_Impl::SetInputSet( const SfxItemSet* pInSet )
{ {
pDlg->SetInputSet( pInSet ); m_xDlg->SetInputSet( pInSet );
} }
void SdPresLayoutTemplateDlg_Impl::SetText( const OUString& rStr ) void SdPresLayoutTemplateDlg_Impl::SetText( const OUString& rStr )
{ {
pDlg->SetText( rStr ); m_xDlg->set_title(rStr);
} }
SvxFieldData* AbstractSdModifyFieldDlg_Impl::GetField() SvxFieldData* AbstractSdModifyFieldDlg_Impl::GetField()
...@@ -456,9 +465,9 @@ VclPtr<VclAbstractDialog> SdAbstractDialogFactory_Impl::CreateRemoteDialog( vcl: ...@@ -456,9 +465,9 @@ VclPtr<VclAbstractDialog> SdAbstractDialogFactory_Impl::CreateRemoteDialog( vcl:
return VclPtr<SdVclAbstractDialog_Impl>::Create( VclPtr<::sd::RemoteDialog>::Create( pParent ) ); return VclPtr<SdVclAbstractDialog_Impl>::Create( VclPtr<::sd::RemoteDialog>::Create( pParent ) );
} }
VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool)
{ {
return VclPtr<SdPresLayoutTemplateDlg_Impl>::Create( VclPtr<SdPresLayoutTemplateDlg>::Create( pDocSh, pParent, bBackgroundDlg, rStyleBase, ePO, pSSPool ) ); return VclPtr<SdPresLayoutTemplateDlg_Impl>::Create(o3tl::make_unique<SdPresLayoutTemplateDlg>(pDocSh, pParent, bBackgroundDlg, rStyleBase, ePO, pSSPool));
} }
VclPtr<AbstractSdPresLayoutDlg> SdAbstractDialogFactory_Impl::CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) VclPtr<AbstractSdPresLayoutDlg> SdAbstractDialogFactory_Impl::CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs)
......
...@@ -176,7 +176,15 @@ public: ...@@ -176,7 +176,15 @@ public:
class SdPresLayoutTemplateDlg; class SdPresLayoutTemplateDlg;
class SdPresLayoutTemplateDlg_Impl : public SfxAbstractTabDialog class SdPresLayoutTemplateDlg_Impl : public SfxAbstractTabDialog
{ {
DECL_ABSTDLG_BASE( SdPresLayoutTemplateDlg_Impl,SdPresLayoutTemplateDlg ) protected:
std::shared_ptr<SdPresLayoutTemplateDlg> m_xDlg;
public:
explicit SdPresLayoutTemplateDlg_Impl(std::unique_ptr<SdPresLayoutTemplateDlg> p)
: m_xDlg(std::move(p))
{
}
virtual short Execute() override;
virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
virtual void SetCurPageId( const OString& rName ) override; virtual void SetCurPageId( const OString& rName ) override;
virtual const SfxItemSet* GetOutputItemSet() const override; virtual const SfxItemSet* GetOutputItemSet() const override;
virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ) override; virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ) override;
...@@ -342,8 +350,8 @@ public: ...@@ -342,8 +350,8 @@ public:
virtual VclPtr<SfxAbstractTabDialog> CreateSdParagraphTabDlg(weld::Window* pParent, const SfxItemSet* pAttr) override; virtual VclPtr<SfxAbstractTabDialog> CreateSdParagraphTabDlg(weld::Window* pParent, const SfxItemSet* pAttr) override;
virtual VclPtr<AbstractSdStartPresDlg> CreateSdStartPresentationDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, virtual VclPtr<AbstractSdStartPresDlg> CreateSdStartPresentationDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs,
const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList ) override; const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList ) override;
virtual VclPtr<VclAbstractDialog> CreateRemoteDialog( vcl::Window* pWindow ) override; // ad for RemoteDialog virtual VclPtr<VclAbstractDialog> CreateRemoteDialog( vcl::Window* pWindow ) override; // add for RemoteDialog
virtual VclPtr<SfxAbstractTabDialog> CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) override; virtual VclPtr<SfxAbstractTabDialog> CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool) override;
virtual VclPtr<AbstractSdPresLayoutDlg> CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) override; virtual VclPtr<AbstractSdPresLayoutDlg> CreateSdPresLayoutDlg(weld::Window* pParent, ::sd::DrawDocShell* pDocShell, const SfxItemSet& rInAttrs) override;
virtual VclPtr<SfxAbstractTabDialog> CreateSdTabTemplateDlg(vcl::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) override; virtual VclPtr<SfxAbstractTabDialog> CreateSdTabTemplateDlg(vcl::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) override;
virtual VclPtr<SfxAbstractDialog> CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) override; virtual VclPtr<SfxAbstractDialog> CreatSdActionDialog(vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) override;
......
...@@ -136,8 +136,8 @@ void FuPresentationObjects::DoExecute( SfxRequest& ) ...@@ -136,8 +136,8 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
SfxStyleSheetBase& rStyleSheet = *pStyleSheet; SfxStyleSheetBase& rStyleSheet = *pStyleSheet;
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, mpViewShell->GetActiveWindow(), ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSdPresLayoutTemplateDlg(mpDocSh, mpViewShell->GetFrameWeld(),
false, rStyleSheet, ePO, pStyleSheetPool )); false, rStyleSheet, ePO, pStyleSheetPool));
if( pDlg->Execute() == RET_OK ) if( pDlg->Execute() == RET_OK )
{ {
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
......
...@@ -363,7 +363,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) ...@@ -363,7 +363,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
if( !bOldDocInOtherLanguage ) if( !bOldDocInOtherLanguage )
{ {
pPresDlg.disposeAndReset(pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, mpViewShell->GetActiveWindow(), bBackground, *pStyleSheet, ePO, pSSPool ) : nullptr); pPresDlg.disposeAndReset(pFact ? pFact->CreateSdPresLayoutTemplateDlg(mpDocSh, mpViewShell->GetFrameWeld(), bBackground, *pStyleSheet, ePO, pSSPool ) : nullptr);
} }
} }
......
...@@ -32,7 +32,7 @@ class SfxStyleSheetBasePool; ...@@ -32,7 +32,7 @@ class SfxStyleSheetBasePool;
/** /**
* Template-Tab-Dialog * Template-Tab-Dialog
*/ */
class SdPresLayoutTemplateDlg : public SfxTabDialog class SdPresLayoutTemplateDlg : public SfxTabDialogController
{ {
private: private:
const SfxObjectShell* mpDocShell; const SfxObjectShell* mpDocShell;
...@@ -45,18 +45,9 @@ private: ...@@ -45,18 +45,9 @@ private:
XDashListRef pDashList; XDashListRef pDashList;
XLineEndListRef pLineEndList; XLineEndListRef pLineEndList;
sal_uInt16 mnLine;
sal_uInt16 mnArea;
sal_uInt16 mnShadow;
sal_uInt16 mnTransparency;
sal_uInt16 mnFont;
sal_uInt16 mnEffects;
sal_uInt16 mnTextAtt;
sal_uInt16 mnBackground;
PresentationObjects const ePO; PresentationObjects const ePO;
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override; virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
// for mapping with the new SvxNumBulletItem // for mapping with the new SvxNumBulletItem
SfxItemSet aInputSet; SfxItemSet aInputSet;
...@@ -65,12 +56,9 @@ private: ...@@ -65,12 +56,9 @@ private:
sal_uInt16 GetOutlineLevel() const; sal_uInt16 GetOutlineLevel() const;
using SfxTabDialog::GetOutputItemSet;
public: public:
SdPresLayoutTemplateDlg( SfxObjectShell const * pDocSh, vcl::Window* pParent, bool bBackground, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ); SdPresLayoutTemplateDlg(SfxObjectShell const * pDocSh, weld::Window* pParent, bool bBackground, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool);
virtual ~SdPresLayoutTemplateDlg() override; virtual ~SdPresLayoutTemplateDlg() override;
virtual void dispose() override;
const SfxItemSet* GetOutputItemSet() const; const SfxItemSet* GetOutputItemSet() const;
}; };
......
...@@ -47,7 +47,7 @@ void TabPage::ImplInit( vcl::Window* pParent, WinBits nStyle ) ...@@ -47,7 +47,7 @@ void TabPage::ImplInit( vcl::Window* pParent, WinBits nStyle )
void TabPage::ImplInitSettings() void TabPage::ImplInitSettings()
{ {
vcl::Window* pParent = GetParent(); vcl::Window* pParent = GetParent();
if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() ) if (pParent && pParent->IsChildTransparentModeEnabled() && !IsControlBackground())
{ {
EnableChildTransparentMode(); EnableChildTransparentMode();
SetParentClipMode( ParentClipMode::NoClip ); SetParentClipMode( ParentClipMode::NoClip );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment