Kaydet (Commit) 8d831cc0 authored tarafından Caolán McNamara's avatar Caolán McNamara

weld SvxCaptionTabDialog

Change-Id: If678c5f4834144f1c710465701dc4d13714a6b44
Reviewed-on: https://gerrit.libreoffice.org/60247
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst f21e8a94
...@@ -362,7 +362,7 @@ void ShapeController::executeDispatch_TransformDialog() ...@@ -362,7 +362,7 @@ void ShapeController::executeDispatch_TransformDialog()
SfxItemSet aGeoAttr( pDrawViewWrapper->GetGeoAttrFromMarked() ); SfxItemSet aGeoAttr( pDrawViewWrapper->GetGeoAttrFromMarked() );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr< SfxAbstractTabDialog > pDlg( ScopedVclPtr< SfxAbstractTabDialog > pDlg(
pFact->CreateCaptionDialog( pChartWindow, pDrawViewWrapper ) ); pFact->CreateCaptionDialog(pChartWindow->GetFrameWeld(), pDrawViewWrapper));
const sal_uInt16* pRange = pDlg->GetInputRanges( *aAttr.GetPool() ); const sal_uInt16* pRange = pDlg->GetInputRanges( *aAttr.GetPool() );
SfxItemSet aCombAttr( *aAttr.GetPool(), pRange ); SfxItemSet aCombAttr( *aAttr.GetPool(), pRange );
aCombAttr.Put( aAttr ); aCombAttr.Put( aAttr );
......
...@@ -141,7 +141,16 @@ bool AbstractSvxTransformTabDialog_Impl::StartExecuteAsync(AsyncContext &rCtx) ...@@ -141,7 +141,16 @@ bool AbstractSvxTransformTabDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn); return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
} }
IMPL_ABSTDLG_BASE(AbstractSvxCaptionDialog_Impl); short AbstractSvxCaptionDialog_Impl::Execute()
{
return m_xDlg->execute();
}
bool AbstractSvxCaptionDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
{
return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
}
IMPL_ABSTDLG_BASE(AbstractSvxJSearchOptionsDialog_Impl); IMPL_ABSTDLG_BASE(AbstractSvxJSearchOptionsDialog_Impl);
short AbstractFmInputRecordNoDialog_Impl::Execute() short AbstractFmInputRecordNoDialog_Impl::Execute()
...@@ -630,31 +639,32 @@ void AbstractSvxTransformTabDialog_Impl::SetValidateFramePosLink( const Link<Svx ...@@ -630,31 +639,32 @@ void AbstractSvxTransformTabDialog_Impl::SetValidateFramePosLink( const Link<Svx
// AbstractSvxCaptionDialog implementations just forwards everything to the dialog // AbstractSvxCaptionDialog implementations just forwards everything to the dialog
void AbstractSvxCaptionDialog_Impl::SetCurPageId( const OString& rName ) void AbstractSvxCaptionDialog_Impl::SetCurPageId( const OString& rName )
{ {
pDlg->SetCurPageId( rName ); m_xDlg->SetCurPageId(rName);
} }
const SfxItemSet* AbstractSvxCaptionDialog_Impl::GetOutputItemSet() const const SfxItemSet* AbstractSvxCaptionDialog_Impl::GetOutputItemSet() const
{ {
return pDlg->GetOutputItemSet(); return m_xDlg->GetOutputItemSet();
} }
const sal_uInt16* AbstractSvxCaptionDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) const sal_uInt16* AbstractSvxCaptionDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
{ {
return pDlg->GetInputRanges( pItem ); return m_xDlg->GetInputRanges( pItem );
} }
void AbstractSvxCaptionDialog_Impl::SetInputSet( const SfxItemSet* pInSet ) void AbstractSvxCaptionDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
{ {
pDlg->SetInputSet( pInSet ); m_xDlg->SetInputSet( pInSet );
} }
//From class Window.
void AbstractSvxCaptionDialog_Impl::SetText( const OUString& rStr ) void AbstractSvxCaptionDialog_Impl::SetText( const OUString& rStr )
{ {
pDlg->SetText( rStr ); m_xDlg->set_title(rStr);
} }
void AbstractSvxCaptionDialog_Impl::SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink ) void AbstractSvxCaptionDialog_Impl::SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink )
{ {
pDlg->SetValidateFramePosLink( rLink ); m_xDlg->SetValidateFramePosLink( rLink );
} }
TransliterationFlags AbstractSvxJSearchOptionsDialog_Impl::GetTransliterationFlags() const TransliterationFlags AbstractSvxJSearchOptionsDialog_Impl::GetTransliterationFlags() const
...@@ -1008,12 +1018,11 @@ VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateTextTabDialog(wel ...@@ -1008,12 +1018,11 @@ VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateTextTabDialog(wel
} }
// TabDialog that use functionality of the drawing layer and add AnchorTypes -- for SvxCaptionTabDialog // TabDialog that use functionality of the drawing layer and add AnchorTypes -- for SvxCaptionTabDialog
VclPtr<AbstractSvxCaptionDialog> AbstractDialogFactory_Impl::CreateCaptionDialog( vcl::Window* pParent, VclPtr<AbstractSvxCaptionDialog> AbstractDialogFactory_Impl::CreateCaptionDialog(weld::Window* pParent,
const SdrView* pView, const SdrView* pView,
SvxAnchorIds nAnchorTypes ) SvxAnchorIds nAnchorTypes)
{ {
VclPtrInstance<SvxCaptionTabDialog> pDlg( pParent, pView, nAnchorTypes ); return VclPtr<AbstractSvxCaptionDialog_Impl>::Create(o3tl::make_unique<SvxCaptionTabDialog>(pParent, pView, nAnchorTypes));
return VclPtr<AbstractSvxCaptionDialog_Impl>::Create( pDlg );
} }
VclPtr<AbstractSvxDistributeDialog> AbstractDialogFactory_Impl::CreateSvxDistributeDialog(const SfxItemSet& rAttr) VclPtr<AbstractSvxDistributeDialog> AbstractDialogFactory_Impl::CreateSvxDistributeDialog(const SfxItemSet& rAttr)
......
...@@ -323,7 +323,15 @@ public: ...@@ -323,7 +323,15 @@ public:
class AbstractSvxCaptionDialog_Impl : public AbstractSvxCaptionDialog class AbstractSvxCaptionDialog_Impl : public AbstractSvxCaptionDialog
{ {
DECL_ABSTDLG_BASE(AbstractSvxCaptionDialog_Impl,SvxCaptionTabDialog) protected:
std::shared_ptr<SvxCaptionTabDialog> m_xDlg;
public:
explicit AbstractSvxCaptionDialog_Impl(std::unique_ptr<SvxCaptionTabDialog> p)
: m_xDlg(std::move(p))
{
}
virtual short Execute() override;
virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
virtual void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink ) override; virtual void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink ) 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;
...@@ -647,9 +655,9 @@ public: ...@@ -647,9 +655,9 @@ public:
virtual VclPtr<SfxAbstractTabDialog> CreateTabItemDialog(vcl::Window* pParent, virtual VclPtr<SfxAbstractTabDialog> CreateTabItemDialog(vcl::Window* pParent,
const SfxItemSet& rSet) override; const SfxItemSet& rSet) override;
virtual VclPtr<AbstractSvxCaptionDialog> virtual VclPtr<AbstractSvxCaptionDialog>
CreateCaptionDialog( vcl::Window* pParent, CreateCaptionDialog(weld::Window* pParent,
const SdrView* pView, const SdrView* pView,
SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE ) override; SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE) override;
virtual VclPtr<AbstractSvxDistributeDialog> virtual VclPtr<AbstractSvxDistributeDialog>
CreateSvxDistributeDialog(const SfxItemSet& rAttr) override; CreateSvxDistributeDialog(const SfxItemSet& rAttr) override;
virtual VclPtr<SfxAbstractInsertObjectDialog> virtual VclPtr<SfxAbstractInsertObjectDialog>
......
...@@ -100,21 +100,18 @@ public: ...@@ -100,21 +100,18 @@ public:
// class SvxCaptionTabDialog --------------------------------------------- // class SvxCaptionTabDialog ---------------------------------------------
struct SvxSwFrameValidation; struct SvxSwFrameValidation;
class SvxCaptionTabDialog : public SfxTabDialog class SvxCaptionTabDialog : public SfxTabDialogController
{ {
private: private:
const SdrView* pView; const SdrView* pView;
SvxAnchorIds nAnchorCtrls; SvxAnchorIds nAnchorCtrls;
sal_uInt16 m_nSwPosSizePageId;
sal_uInt16 m_nPositionSizePageId;
sal_uInt16 m_nCaptionPageId;
Link<SvxSwFrameValidation&,void> aValidateLink; Link<SvxSwFrameValidation&,void> aValidateLink;
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override; virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
public: public:
SvxCaptionTabDialog(vcl::Window* pParent, const SdrView* pView, SvxCaptionTabDialog(weld::Window* pParent, const SdrView* pView,
SvxAnchorIds nAnchorTypes); SvxAnchorIds nAnchorTypes);
/// link for the Writer to validate positions /// link for the Writer to validate positions
......
...@@ -473,37 +473,34 @@ void SvxCaptionTabPage::FillValueSet() ...@@ -473,37 +473,34 @@ void SvxCaptionTabPage::FillValueSet()
m_xCT_CAPTTYPE->SetItemImage(BMP_CAPTTYPE_3, m_aBmpCapTypes[2] ); m_xCT_CAPTTYPE->SetItemImage(BMP_CAPTTYPE_3, m_aBmpCapTypes[2] );
} }
SvxCaptionTabDialog::SvxCaptionTabDialog(vcl::Window* pParent, const SdrView* pSdrView, SvxCaptionTabDialog::SvxCaptionTabDialog(weld::Window* pParent, const SdrView* pSdrView,
SvxAnchorIds nAnchorTypes) SvxAnchorIds nAnchorTypes)
: SfxTabDialog( pParent, "CalloutDialog", "cui/ui/calloutdialog.ui") : SfxTabDialogController(pParent, "cui/ui/calloutdialog.ui", "CalloutDialog")
, pView(pSdrView) , pView(pSdrView)
, nAnchorCtrls(nAnchorTypes) , nAnchorCtrls(nAnchorTypes)
, m_nSwPosSizePageId(0)
, m_nPositionSizePageId(0)
, m_nCaptionPageId(0)
{ {
assert(pView); // No valid View transferred! assert(pView); // No valid View transferred!
//different positioning page in Writer //different positioning page in Writer
if (nAnchorCtrls & (SvxAnchorIds::Paragraph | SvxAnchorIds::Character | SvxAnchorIds::Page | SvxAnchorIds::Fly)) if (nAnchorCtrls & (SvxAnchorIds::Paragraph | SvxAnchorIds::Character | SvxAnchorIds::Page | SvxAnchorIds::Fly))
{ {
m_nSwPosSizePageId = AddTabPage("RID_SVXPAGE_SWPOSSIZE", SvxSwPosSizeTabPage::Create, AddTabPage("RID_SVXPAGE_SWPOSSIZE", SvxSwPosSizeTabPage::Create,
SvxSwPosSizeTabPage::GetRanges ); SvxSwPosSizeTabPage::GetRanges );
RemoveTabPage("RID_SVXPAGE_POSITION_SIZE"); RemoveTabPage("RID_SVXPAGE_POSITION_SIZE");
} }
else else
{ {
m_nPositionSizePageId = AddTabPage("RID_SVXPAGE_POSITION_SIZE", SvxPositionSizeTabPage::Create, AddTabPage("RID_SVXPAGE_POSITION_SIZE", SvxPositionSizeTabPage::Create,
SvxPositionSizeTabPage::GetRanges ); SvxPositionSizeTabPage::GetRanges );
RemoveTabPage("RID_SVXPAGE_SWPOSSIZE"); RemoveTabPage("RID_SVXPAGE_SWPOSSIZE");
} }
m_nCaptionPageId = AddTabPage("RID_SVXPAGE_CAPTION", SvxCaptionTabPage::Create, AddTabPage("RID_SVXPAGE_CAPTION", SvxCaptionTabPage::Create,
SvxCaptionTabPage::GetRanges ); SvxCaptionTabPage::GetRanges );
} }
void SvxCaptionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) void SvxCaptionTabDialog::PageCreated(const OString& rId, SfxTabPage &rPage)
{ {
if (nId == m_nPositionSizePageId) if (rId == "RID_SVXPAGE_POSITION_SIZE")
{ {
static_cast<SvxPositionSizeTabPage&>( rPage ).SetView( pView ); static_cast<SvxPositionSizeTabPage&>( rPage ).SetView( pView );
static_cast<SvxPositionSizeTabPage&>( rPage ).Construct(); static_cast<SvxPositionSizeTabPage&>( rPage ).Construct();
...@@ -513,13 +510,13 @@ void SvxCaptionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) ...@@ -513,13 +510,13 @@ void SvxCaptionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
if( nAnchorCtrls & SvxAnchorIds::NoProtect ) if( nAnchorCtrls & SvxAnchorIds::NoProtect )
static_cast<SvxPositionSizeTabPage&>( rPage ).DisableProtect(); static_cast<SvxPositionSizeTabPage&>( rPage ).DisableProtect();
} }
else if (nId == m_nSwPosSizePageId) else if (rId == "RID_SVXPAGE_SWPOSSIZE")
{ {
SvxSwPosSizeTabPage& rSwPage = static_cast<SvxSwPosSizeTabPage&>(rPage); SvxSwPosSizeTabPage& rSwPage = static_cast<SvxSwPosSizeTabPage&>(rPage);
rSwPage.EnableAnchorTypes(nAnchorCtrls); rSwPage.EnableAnchorTypes(nAnchorCtrls);
rSwPage.SetValidateFramePosLink( aValidateLink ); rSwPage.SetValidateFramePosLink( aValidateLink );
} }
else if (nId == m_nCaptionPageId) else if (rId == "RID_SVXPAGE_CAPTION")
{ {
static_cast<SvxCaptionTabPage&>( rPage ).SetView( pView ); static_cast<SvxCaptionTabPage&>( rPage ).SetView( pView );
static_cast<SvxCaptionTabPage&>( rPage ).Construct(); static_cast<SvxCaptionTabPage&>( rPage ).Construct();
...@@ -531,5 +528,4 @@ void SvxCaptionTabDialog::SetValidateFramePosLink( const Link<SvxSwFrameValidati ...@@ -531,5 +528,4 @@ void SvxCaptionTabDialog::SetValidateFramePosLink( const Link<SvxSwFrameValidati
aValidateLink = rLink; aValidateLink = rLink;
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 --> <!-- Generated with glade 3.22.1 -->
<interface domain="cui"> <interface domain="cui">
<requires lib="gtk+" version="3.18"/> <requires lib="gtk+" version="3.18"/>
<object class="GtkDialog" id="CalloutDialog"> <object class="GtkDialog" id="CalloutDialog">
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
<property name="title" translatable="yes" context="calloutdialog|CalloutDialog">Position and Size</property> <property name="title" translatable="yes" context="calloutdialog|CalloutDialog">Position and Size</property>
<property name="resizable">False</property> <property name="resizable">False</property>
<property name="type_hint">dialog</property> <property name="type_hint">dialog</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox"> <child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1"> <object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property> <property name="can_focus">False</property>
...@@ -18,12 +21,10 @@ ...@@ -18,12 +21,10 @@
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="layout_style">end</property> <property name="layout_style">end</property>
<child> <child>
<object class="GtkButton" id="ok"> <object class="GtkButton" id="reset">
<property name="label">gtk-ok</property> <property name="label">gtk-revert-to-saved</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
<property name="use_stock">True</property> <property name="use_stock">True</property>
</object> </object>
...@@ -34,10 +35,12 @@ ...@@ -34,10 +35,12 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkButton" id="cancel"> <object class="GtkButton" id="ok">
<property name="label">gtk-cancel</property> <property name="label">gtk-ok</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
<property name="use_stock">True</property> <property name="use_stock">True</property>
</object> </object>
...@@ -48,8 +51,8 @@ ...@@ -48,8 +51,8 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkButton" id="help"> <object class="GtkButton" id="cancel">
<property name="label">gtk-help</property> <property name="label">gtk-cancel</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
...@@ -59,12 +62,11 @@ ...@@ -59,12 +62,11 @@
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">2</property> <property name="position">2</property>
<property name="secondary">True</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkButton" id="reset"> <object class="GtkButton" id="help">
<property name="label">gtk-revert-to-saved</property> <property name="label">gtk-help</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
...@@ -74,6 +76,7 @@ ...@@ -74,6 +76,7 @@
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">3</property> <property name="position">3</property>
<property name="secondary">True</property>
</packing> </packing>
</child> </child>
</object> </object>
...@@ -97,6 +100,30 @@ ...@@ -97,6 +100,30 @@
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object> </object>
</child> </child>
<child type="tab"> <child type="tab">
...@@ -116,6 +143,30 @@ ...@@ -116,6 +143,30 @@
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object> </object>
<packing> <packing>
<property name="position">1</property> <property name="position">1</property>
...@@ -139,6 +190,30 @@ ...@@ -139,6 +190,30 @@
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object> </object>
<packing> <packing>
<property name="position">2</property> <property name="position">2</property>
...@@ -165,10 +240,10 @@ ...@@ -165,10 +240,10 @@
</object> </object>
</child> </child>
<action-widgets> <action-widgets>
<action-widget response="0">reset</action-widget>
<action-widget response="-5">ok</action-widget> <action-widget response="-5">ok</action-widget>
<action-widget response="-6">cancel</action-widget> <action-widget response="-6">cancel</action-widget>
<action-widget response="-11">help</action-widget> <action-widget response="-11">help</action-widget>
<action-widget response="0">reset</action-widget>
</action-widgets> </action-widgets>
</object> </object>
</interface> </interface>
...@@ -338,9 +338,9 @@ public: ...@@ -338,9 +338,9 @@ public:
const SfxItemSet* pAttrSet, const SfxItemSet* pAttrSet,
SdrView* pView ) = 0 ; SdrView* pView ) = 0 ;
virtual VclPtr<AbstractSvxCaptionDialog> CreateCaptionDialog( vcl::Window* pParent, virtual VclPtr<AbstractSvxCaptionDialog> CreateCaptionDialog(weld::Window* pParent,
const SdrView* pView, const SdrView* pView,
SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE ) = 0; SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE) = 0;
virtual VclPtr<AbstractSvxDistributeDialog> CreateSvxDistributeDialog( virtual VclPtr<AbstractSvxDistributeDialog> CreateSvxDistributeDialog(
const SfxItemSet& rAttr)= 0; const SfxItemSet& rAttr)= 0;
......
...@@ -265,7 +265,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq ) ...@@ -265,7 +265,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
SfxItemSet aNewGeoAttr(pView->GetGeoAttrFromMarked()); SfxItemSet aNewGeoAttr(pView->GetGeoAttrFromMarked());
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateCaptionDialog( pWin, pView )); ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateCaptionDialog(pWin ? pWin->GetFrameWeld() : nullptr, pView));
const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() ); const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange ); SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange );
......
...@@ -93,7 +93,7 @@ void FuTransform::DoExecute( SfxRequest& rReq ) ...@@ -93,7 +93,7 @@ void FuTransform::DoExecute( SfxRequest& rReq )
mpView->GetAttributes( aNewAttr ); mpView->GetAttributes( aNewAttr );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
pDlg.reset(pFact->CreateCaptionDialog(mpViewShell->GetActiveWindow(), mpView)); pDlg.reset(pFact->CreateCaptionDialog(mpViewShell->GetFrameWeld(), mpView));
const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() ); const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange ); SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange );
......
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