[Libreoffice-commits] core.git: chart2/source cui/source cui/uiconfig include/sfx2 include/svx sc/source sd/source sfx2/source svx/source sw/source
Caolán McNamara
caolanm at redhat.com
Tue May 29 19:49:46 UTC 2018
chart2/source/controller/main/ChartController_Position.cxx | 3
chart2/source/controller/main/ShapeController.cxx | 2
cui/source/factory/dlgfact.cxx | 50 +++--
cui/source/factory/dlgfact.hxx | 27 +-
cui/source/inc/transfrm.hxx | 19 -
cui/source/tabpages/transfrm.cxx | 86 +++-----
cui/uiconfig/ui/positionsizedialog.ui | 127 +++++++++++--
include/sfx2/tabdlg.hxx | 2
include/svx/svxdlg.hxx | 17 -
sc/source/ui/drawfunc/drawsh.cxx | 2
sd/source/ui/func/futransf.cxx | 6
sfx2/source/dialog/tabdlg.cxx | 7
svx/source/dialog/dialcontrol.cxx | 4
sw/source/uibase/shells/drwbassh.cxx | 2
14 files changed, 235 insertions(+), 119 deletions(-)
New commits:
commit 6d0d201b30122395eb164807b93d76d567ff970b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue May 29 09:32:41 2018 +0100
weld SvxTransformTabDialog
Change-Id: Ib6dabd04e3f834b61363d5a620de7f0219a1e644
Reviewed-on: https://gerrit.libreoffice.org/55012
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx
index 37b0ef9ef208..2304bb72cda0 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -136,8 +136,9 @@ void ChartController::executeDispatch_PositionAndSize()
SolarMutexGuard aGuard;
SvxAbstractDialogFactory * pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE( pFact, "No dialog factory" );
+ vcl::Window* pWin = GetChartWindow();
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSchTransformTabDialog(
- GetChartWindow(), &aItemSet, pSdrView, bResizePossible ));
+ pWin ? pWin->GetFrameWeld() : nullptr, &aItemSet, pSdrView, bResizePossible));
OSL_ENSURE( pDlg, "Couldn't create SchTransformTabDialog" );
if( pDlg->Execute() == RET_OK )
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
index 1b6a89b94985..80203f179b83 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -399,7 +399,7 @@ void ShapeController::executeDispatch_TransformDialog()
if ( pFact )
{
ScopedVclPtr< SfxAbstractTabDialog > pDlg(
- pFact->CreateSvxTransformTabDialog( pChartWindow, &aGeoAttr, pDrawViewWrapper ) );
+ pFact->CreateSvxTransformTabDialog(pChartWindow ? pChartWindow->GetFrameWeld() : nullptr, &aGeoAttr, pDrawViewWrapper));
if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
{
const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index a5c76ef405ab..05c404a88b5e 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -130,7 +130,16 @@ short AbstractSvxSearchSimilarityDialog_Impl::Execute()
return m_xDlg->run();
}
-IMPL_ABSTDLG_BASE(AbstractSvxTransformTabDialog_Impl);
+short AbstractSvxTransformTabDialog_Impl::Execute()
+{
+ return m_xDlg->execute();
+}
+
+bool AbstractSvxTransformTabDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
+{
+ return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+}
+
IMPL_ABSTDLG_BASE(AbstractSvxCaptionDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractSvxJSearchOptionsDialog_Impl);
@@ -579,31 +588,33 @@ bool AbstractSvxSearchSimilarityDialog_Impl::IsRelaxed()
// AbstractSvxTransformTabDialog implementations just forwards everything to the dialog
void AbstractSvxTransformTabDialog_Impl::SetCurPageId( const OString& rName )
{
- pDlg->SetCurPageId( rName );
+ m_xDlg->SetCurPageId( rName );
}
const SfxItemSet* AbstractSvxTransformTabDialog_Impl::GetOutputItemSet() const
{
- return pDlg->GetOutputItemSet();
+ return m_xDlg->GetOutputItemSet();
}
const sal_uInt16* AbstractSvxTransformTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
{
- return pDlg->GetInputRanges( pItem );
+ return m_xDlg->GetInputRanges( pItem );
}
void AbstractSvxTransformTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
{
- pDlg->SetInputSet( pInSet );
+ m_xDlg->SetInputSet( pInSet );
}
+
//From class Window.
void AbstractSvxTransformTabDialog_Impl::SetText( const OUString& rStr )
{
- pDlg->SetText( rStr );
+ m_xDlg->set_title(rStr);
}
+
void AbstractSvxTransformTabDialog_Impl::SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink )
{
- pDlg->SetValidateFramePosLink( rLink );
+ m_xDlg->SetValidateFramePosLink( rLink );
}
// AbstractSvxCaptionDialog implementations just forwards everything to the dialog
@@ -1151,25 +1162,24 @@ VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxBorderBackgrou
return VclPtr<CuiAbstractTabDialog_Impl>::Create(pDlg);
}
-VclPtr<AbstractSvxTransformTabDialog> AbstractDialogFactory_Impl::CreateSvxTransformTabDialog( vcl::Window* pParent,
- const SfxItemSet* pAttr,
- const SdrView* pView,
- SvxAnchorIds nAnchorTypes )
+VclPtr<AbstractSvxTransformTabDialog> AbstractDialogFactory_Impl::CreateSvxTransformTabDialog(weld::Window* pParent,
+ const SfxItemSet* pAttr,
+ const SdrView* pView,
+ SvxAnchorIds nAnchorTypes)
{
- VclPtrInstance<SvxTransformTabDialog> pDlg( pParent, pAttr,pView, nAnchorTypes);
- return VclPtr<AbstractSvxTransformTabDialog_Impl>::Create( pDlg );
+ return VclPtr<AbstractSvxTransformTabDialog_Impl>::Create(new SvxTransformTabDialog(pParent, pAttr,pView, nAnchorTypes));
}
-VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSchTransformTabDialog( vcl::Window* pParent,
- const SfxItemSet* pAttr,
- const SdrView* pSdrView,
- bool bSizeTabPage
- )
+VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSchTransformTabDialog(weld::Window* pParent,
+ const SfxItemSet* pAttr,
+ const SdrView* pSdrView,
+ bool bSizeTabPage)
{
- VclPtrInstance<SvxTransformTabDialog> pDlg( pParent, pAttr,pSdrView, bSizeTabPage ? SvxAnchorIds::NoProtect : SvxAnchorIds::NoProtect|SvxAnchorIds::NoResize);
+ SvxTransformTabDialog* pDlg = new SvxTransformTabDialog(pParent, pAttr, pSdrView,
+ bSizeTabPage ? SvxAnchorIds::NoProtect : SvxAnchorIds::NoProtect|SvxAnchorIds::NoResize);
pDlg->RemoveTabPage( "RID_SVXPAGE_ANGLE" );
pDlg->RemoveTabPage( "RID_SVXPAGE_SLANT" );
- return VclPtr<CuiAbstractTabDialog_Impl>::Create( pDlg );
+ return VclPtr<CuiAbstractTabController_Impl>::Create(pDlg);
}
VclPtr<AbstractSvxJSearchOptionsDialog> AbstractDialogFactory_Impl::CreateSvxJSearchOptionsDialog( vcl::Window* pParent,
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 3c4e3dac1bb0..abb202ffa198 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -304,7 +304,15 @@ class AbstractSvxJSearchOptionsDialog_Impl :public AbstractSvxJSearchOptionsDial
class AbstractSvxTransformTabDialog_Impl : public AbstractSvxTransformTabDialog
{
- DECL_ABSTDLG_BASE(AbstractSvxTransformTabDialog_Impl,SvxTransformTabDialog)
+protected:
+ std::shared_ptr<SvxTransformTabDialog> m_xDlg;
+public:
+ explicit AbstractSvxTransformTabDialog_Impl(SvxTransformTabDialog* p)
+ : m_xDlg(p)
+ {
+ }
+ virtual short Execute() override;
+ virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
virtual void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink ) override;
virtual void SetCurPageId( const OString& rName ) override;
virtual const SfxItemSet* GetOutputItemSet() const override;
@@ -664,15 +672,14 @@ public:
const SfxItemSet& rCoreSet,
bool bEnableDrawingLayerFillStyles) override;
- virtual VclPtr<AbstractSvxTransformTabDialog> CreateSvxTransformTabDialog( vcl::Window* pParent,
- const SfxItemSet* pAttr,
- const SdrView* pView,
- SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE) override ;
- virtual VclPtr<SfxAbstractTabDialog> CreateSchTransformTabDialog( vcl::Window* pParent,
- const SfxItemSet* pAttr,
- const SdrView* pSdrView,
- bool bSizeTabPage
- ) override;
+ virtual VclPtr<AbstractSvxTransformTabDialog> CreateSvxTransformTabDialog(weld::Window* pParent,
+ const SfxItemSet* pAttr,
+ const SdrView* pView,
+ SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE) override ;
+ virtual VclPtr<SfxAbstractTabDialog> CreateSchTransformTabDialog(weld::Window* pParent,
+ const SfxItemSet* pAttr,
+ const SdrView* pSdrView,
+ bool bSizeTabPage) override;
virtual VclPtr<AbstractSpellDialog> CreateSvxSpellDialog(
vcl::Window* pParent,
SfxBindings* pBindings,
diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx
index 9dccd2663241..d4f9be4e6917 100644
--- a/cui/source/inc/transfrm.hxx
+++ b/cui/source/inc/transfrm.hxx
@@ -37,28 +37,23 @@ class SdrView;
\************************************************************************/
struct SvxSwFrameValidation;
-class SvxTransformTabDialog : public SfxTabDialog
+class SvxTransformTabDialog : public SfxTabDialogController
{
- sal_uInt16 nPosSize;
- sal_uInt16 nSWPosSize;
- sal_uInt16 nRotation;
- sal_uInt16 nSlant;
private:
const SdrView* pView;
SvxAnchorIds nAnchorCtrls;
Link<SvxSwFrameValidation&,void> aValidateLink;
- virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override;
+ virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
public:
+ SvxTransformTabDialog(weld::Window* pParent, const SfxItemSet* pAttr,
+ const SdrView* pView,
+ SvxAnchorIds nAnchorTypes);
- SvxTransformTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr,
- const SdrView* pView,
- SvxAnchorIds nAnchorTypes);
-
- //link for the Writer to validate positions
- void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink );
+ //link for the Writer to validate positions
+ void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink );
};
/*************************************************************************
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index cf3bc446a78e..6cfe85e3c0bf 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -86,14 +86,9 @@ const sal_uInt16 SvxSlantTabPage::pSlantRanges[] =
|*
\************************************************************************/
-SvxTransformTabDialog::SvxTransformTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr,
- const SdrView* pSdrView, SvxAnchorIds nAnchorTypes )
- : SfxTabDialog( pParent
- ,"PositionAndSizeDialog"
- ,"cui/ui/positionsizedialog.ui"
- , pAttr )
- , nPosSize(0)
- , nSWPosSize(0)
+SvxTransformTabDialog::SvxTransformTabDialog(weld::Window* pParent, const SfxItemSet* pAttr,
+ const SdrView* pSdrView, SvxAnchorIds nAnchorTypes)
+ : SfxTabDialogController(pParent, "cui/ui/positionsizedialog.ui", "PositionAndSizeDialog", pAttr)
, pView(pSdrView)
, nAnchorCtrls(nAnchorTypes)
{
@@ -102,65 +97,62 @@ SvxTransformTabDialog::SvxTransformTabDialog( vcl::Window* pParent, const SfxIte
//different positioning page in Writer
if(nAnchorCtrls & (SvxAnchorIds::Paragraph | SvxAnchorIds::Character | SvxAnchorIds::Page | SvxAnchorIds::Fly))
{
- nSWPosSize = AddTabPage("RID_SVXPAGE_SWPOSSIZE", SvxSwPosSizeTabPage::Create, SvxSwPosSizeTabPage::GetRanges);
+ AddTabPage("RID_SVXPAGE_SWPOSSIZE", SvxSwPosSizeTabPage::Create, SvxSwPosSizeTabPage::GetRanges);
RemoveTabPage("RID_SVXPAGE_POSITION_SIZE");
}
else
{
- nPosSize = AddTabPage("RID_SVXPAGE_POSITION_SIZE", SvxPositionSizeTabPage::Create, SvxPositionSizeTabPage::GetRanges);
+ AddTabPage("RID_SVXPAGE_POSITION_SIZE", SvxPositionSizeTabPage::Create, SvxPositionSizeTabPage::GetRanges);
RemoveTabPage("RID_SVXPAGE_SWPOSSIZE");
}
- nRotation = AddTabPage("RID_SVXPAGE_ANGLE", SvxAngleTabPage::Create, SvxAngleTabPage::GetRanges);
- nSlant = AddTabPage("RID_SVXPAGE_SLANT", SvxSlantTabPage::Create, SvxSlantTabPage::GetRanges);
+ AddTabPage("RID_SVXPAGE_ANGLE", SvxAngleTabPage::Create, SvxAngleTabPage::GetRanges);
+ AddTabPage("RID_SVXPAGE_SLANT", SvxSlantTabPage::Create, SvxSlantTabPage::GetRanges);
}
-void SvxTransformTabDialog::PageCreated(sal_uInt16 nId, SfxTabPage &rPage)
+void SvxTransformTabDialog::PageCreated(const OString& rId, SfxTabPage &rPage)
{
- if (nId==nPosSize)
- {
- SvxPositionSizeTabPage& rSvxPos = static_cast<SvxPositionSizeTabPage&>(rPage);
- rSvxPos.SetView(pView);
- rSvxPos.Construct();
-
- if(nAnchorCtrls & SvxAnchorIds::NoResize)
- {
- rSvxPos.DisableResize();
- }
+ if (rId == "RID_SVXPAGE_POSITION_SIZE")
+ {
+ SvxPositionSizeTabPage& rSvxPos = static_cast<SvxPositionSizeTabPage&>(rPage);
+ rSvxPos.SetView(pView);
+ rSvxPos.Construct();
- if(nAnchorCtrls & SvxAnchorIds::NoProtect)
- {
- rSvxPos.DisableProtect();
- rSvxPos.UpdateControlStates();
- }
- }
- else if (nId == nSWPosSize)
+ if(nAnchorCtrls & SvxAnchorIds::NoResize)
{
- SvxSwPosSizeTabPage& rSwPos = static_cast<SvxSwPosSizeTabPage&>(rPage);
-
- rSwPos.EnableAnchorTypes(nAnchorCtrls);
- rSwPos.SetValidateFramePosLink(aValidateLink);
- rSwPos.SetView(pView);
+ rSvxPos.DisableResize();
}
- else if( nId == nRotation)
+ if(nAnchorCtrls & SvxAnchorIds::NoProtect)
{
- SvxAngleTabPage& rSvxAng = static_cast<SvxAngleTabPage&>(rPage);
-
- rSvxAng.SetView( pView );
- rSvxAng.Construct();
+ rSvxPos.DisableProtect();
+ rSvxPos.UpdateControlStates();
}
+ }
+ else if (rId == "RID_SVXPAGE_SWPOSSIZE")
+ {
+ SvxSwPosSizeTabPage& rSwPos = static_cast<SvxSwPosSizeTabPage&>(rPage);
- else if (nId == nSlant)
- {
- SvxSlantTabPage& rSvxSlnt = static_cast<SvxSlantTabPage&>(rPage);
+ rSwPos.EnableAnchorTypes(nAnchorCtrls);
+ rSwPos.SetValidateFramePosLink(aValidateLink);
+ rSwPos.SetView(pView);
+ }
+ else if (rId == "RID_SVXPAGE_ANGLE")
+ {
+ SvxAngleTabPage& rSvxAng = static_cast<SvxAngleTabPage&>(rPage);
- rSvxSlnt.SetView( pView );
- rSvxSlnt.Construct();
- }
-}
+ rSvxAng.SetView( pView );
+ rSvxAng.Construct();
+ }
+ else if (rId == "RID_SVXPAGE_SLANT")
+ {
+ SvxSlantTabPage& rSvxSlnt = static_cast<SvxSlantTabPage&>(rPage);
+ rSvxSlnt.SetView( pView );
+ rSvxSlnt.Construct();
+ }
+}
void SvxTransformTabDialog::SetValidateFramePosLink(const Link<SvxSwFrameValidation&,void>& rLink)
{
diff --git a/cui/uiconfig/ui/positionsizedialog.ui b/cui/uiconfig/ui/positionsizedialog.ui
index 658d5d056f8e..8b276311627c 100644
--- a/cui/uiconfig/ui/positionsizedialog.ui
+++ b/cui/uiconfig/ui/positionsizedialog.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="cui">
<requires lib="gtk+" version="3.18"/>
<object class="GtkDialog" id="PositionAndSizeDialog">
@@ -8,7 +8,12 @@
<property name="title" translatable="yes" context="positionsizedialog|PositionAndSizeDialog">Position and Size</property>
<property name="resizable">False</property>
<property name="modal">True</property>
+ <property name="default_width">0</property>
+ <property name="default_height">0</property>
<property name="type_hint">dialog</property>
+ <child>
+ <placeholder/>
+ </child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
@@ -19,12 +24,10 @@
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
- <object class="GtkButton" id="ok">
- <property name="label">gtk-ok</property>
+ <object class="GtkButton" id="reset">
+ <property name="label">gtk-revert-to-saved</property>
<property name="visible">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="use_stock">True</property>
</object>
@@ -35,10 +38,12 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="cancel">
- <property name="label">gtk-cancel</property>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
<property name="visible">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="use_stock">True</property>
</object>
@@ -49,8 +54,8 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="help">
- <property name="label">gtk-help</property>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -60,12 +65,11 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
- <property name="secondary">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="reset">
- <property name="label">gtk-revert-to-saved</property>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -75,6 +79,7 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
+ <property name="secondary">True</property>
</packing>
</child>
</object>
@@ -98,6 +103,30 @@
<child>
<placeholder/>
</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>
</child>
<child type="tab">
@@ -117,6 +146,30 @@
<child>
<placeholder/>
</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>
<packing>
<property name="position">1</property>
@@ -140,6 +193,30 @@
<child>
<placeholder/>
</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>
<packing>
<property name="position">2</property>
@@ -163,6 +240,30 @@
<child>
<placeholder/>
</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>
<packing>
<property name="position">3</property>
@@ -189,10 +290,10 @@
</object>
</child>
<action-widgets>
+ <action-widget response="0">reset</action-widget>
<action-widget response="-5">ok</action-widget>
<action-widget response="-6">cancel</action-widget>
<action-widget response="-11">help</action-widget>
- <action-widget response="0">reset</action-widget>
</action-widgets>
</object>
</interface>
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index a83573d1dfa6..3cb85718fc8f 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -299,6 +299,8 @@ public:
void RemoveResetButton();
short execute();
+ static bool runAsync(const std::shared_ptr<SfxTabDialogController>& rController,
+ const std::function<void(sal_Int32)>&);
const SfxItemSet* GetExampleSet() const { return m_xExampleSet.get(); }
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 44bc03f37bdc..d1bd463d953c 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -384,15 +384,14 @@ public:
const SfxItemSet& rCoreSet,
bool bEnableDrawingLayerFillStyles) = 0;
- virtual VclPtr<AbstractSvxTransformTabDialog> CreateSvxTransformTabDialog( vcl::Window* pParent,
- const SfxItemSet* pAttr,
- const SdrView* pView,
- SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE) = 0;
- virtual VclPtr<SfxAbstractTabDialog> CreateSchTransformTabDialog( vcl::Window* pParent,
- const SfxItemSet* pAttr,
- const SdrView* pSdrView,
- bool bSizeTabPage
- )=0;
+ virtual VclPtr<AbstractSvxTransformTabDialog> CreateSvxTransformTabDialog(weld::Window* pParent,
+ const SfxItemSet* pAttr,
+ const SdrView* pView,
+ SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE) = 0;
+ virtual VclPtr<SfxAbstractTabDialog> CreateSchTransformTabDialog(weld::Window* pParent,
+ const SfxItemSet* pAttr,
+ const SdrView* pSdrView,
+ bool bSizeTabPage) = 0;
virtual VclPtr<AbstractSvxJSearchOptionsDialog> CreateSvxJSearchOptionsDialog( vcl::Window* pParent,
const SfxItemSet& rOptionsSet,
TransliterationFlags nInitialFlags )=0;
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index ab1b08a37f4f..62dea38876d8 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -285,7 +285,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
- ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxTransformTabDialog( pWin, &aNewAttr,pView ));
+ ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxTransformTabDialog(pWin ? pWin->GetFrameWeld() : nullptr, &aNewAttr, pView));
OSL_ENSURE(pDlg, "Dialog creation failed!");
if (pDlg->Execute() == RET_OK)
{
diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx
index 00193fe98bb9..28babc122354 100644
--- a/sd/source/ui/func/futransf.cxx
+++ b/sd/source/ui/func/futransf.cxx
@@ -81,6 +81,7 @@ void FuTransform::DoExecute( SfxRequest& rReq )
SfxItemSet aSet( mpView->GetGeoAttrFromMarked() );
VclPtr<SfxAbstractTabDialog> pDlg;
+ bool bWelded = false;
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
if( rMarkList.GetMarkCount() == 1 &&
@@ -109,7 +110,8 @@ void FuTransform::DoExecute( SfxRequest& rReq )
if (!pFact)
return;
- pDlg.reset(pFact->CreateSvxTransformTabDialog(mpViewShell->GetActiveWindow(), &aSet, mpView));
+ pDlg.reset(pFact->CreateSvxTransformTabDialog(mpViewShell->GetFrameWeld(), &aSet, mpView));
+ bWelded = true;
}
if (!pDlg)
@@ -128,6 +130,8 @@ void FuTransform::DoExecute( SfxRequest& rReq )
// deferred until the dialog ends
mpViewShell->Invalidate(SID_RULER_OBJECT);
mpViewShell->Cancel();
+ if (bWelded)
+ pDlg->disposeOnce();
});
}
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 5ccfb377fd0b..78ba325fd581 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -2038,6 +2038,13 @@ short SfxTabDialogController::execute()
return m_xDialog->run();
}
+bool SfxTabDialogController::runAsync(const std::shared_ptr<SfxTabDialogController>& rController,
+ const std::function<void(sal_Int32)>& rFunc)
+{
+ rController->Start_Impl();
+ return weld::DialogController::runAsync(rController, rFunc);
+}
+
void SfxTabDialogController::SetInputSet( const SfxItemSet* pInSet )
/* [Description]
diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx
index e62fe137dcbf..bdde7054c593 100644
--- a/svx/source/dialog/dialcontrol.cxx
+++ b/svx/source/dialog/dialcontrol.cxx
@@ -141,7 +141,7 @@ const Color& DialControlBmp::GetButtonFillColor( bool bMain ) const
void DialControlBmp::Init()
{
SetSettings(mrParent.GetSettings());
- SetBackground();
+ SetBackground(GetBackgroundColor());
}
void DialControlBmp::SetSize( const Size& rSize )
@@ -567,8 +567,6 @@ void SvxDialControl::Resize()
void SvxDialControl::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
Point aPos;
- rRenderContext.SetBackground();
- rRenderContext.Erase();
rRenderContext.DrawBitmapEx(aPos, mpImpl->mxBmpBuffered->GetBitmapEx(aPos, mpImpl->maWinSize));
}
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index 0aef51b6cdea..ca3cd3808ae8 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -199,7 +199,7 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq)
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
VclPtr<AbstractSvxTransformTabDialog> pTransform =
- pFact->CreateSvxTransformTabDialog( nullptr, nullptr, pSdrView, nAllowedAnchors );
+ pFact->CreateSvxTransformTabDialog(rReq.GetFrameWeld(), nullptr, pSdrView, nAllowedAnchors);
pDlg.disposeAndReset(pTransform);
pTransform->SetValidateFramePosLink( LINK(this, SwDrawBaseShell, ValidatePosition) );
}
More information about the Libreoffice-commits
mailing list