summaryrefslogtreecommitdiff
path: root/chart2/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-10-30 11:07:04 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-10-31 17:11:14 +0100
commit36022becbe25c412460411ab50ecaf7740933dca (patch)
treee0c2154a49efccc1135b380d13b3749f14994411 /chart2/source
parent29a27f92a5b3b0b6b60a6108730c8197eb88f255 (diff)
avoid intermediate vcl::Windows
Change-Id: I5d6a03baed2af5801132f3e3a0411867ba60186e Reviewed-on: https://gerrit.libreoffice.org/81760 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'chart2/source')
-rw-r--r--chart2/source/controller/main/ChartController.cxx3
-rw-r--r--chart2/source/controller/main/ChartController_Position.cxx3
-rw-r--r--chart2/source/controller/main/ChartController_TextEdit.cxx3
-rw-r--r--chart2/source/controller/main/ShapeController.cxx34
4 files changed, 20 insertions, 23 deletions
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 9a5917915187..96ec317defa6 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1347,8 +1347,7 @@ void ChartController::executeDispatch_SourceData()
SolarMutexGuard aSolarGuard;
- VclPtr<ChartWindow> xChartWindow(GetChartWindow());
- std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(xChartWindow ? xChartWindow->GetFrameWeld() : nullptr,
+ std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(GetChartFrame(),
VclMessageType::Question, VclButtonsType::YesNo, SchResId(STR_DLG_REMOVE_DATA_TABLE)));
// If "No" then just return
if (xQueryBox->run() == RET_NO)
diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx
index 410d67461118..66884dfb2fa8 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -141,9 +141,8 @@ void ChartController::executeDispatch_PositionAndSize(const ::css::uno::Sequence
SolarMutexGuard aGuard;
SvxAbstractDialogFactory * pFact = SvxAbstractDialogFactory::Create();
- vcl::Window* pWin = GetChartWindow();
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSchTransformTabDialog(
- pWin ? pWin->GetFrameWeld() : nullptr, &aItemSet, pSdrView, bResizePossible));
+ GetChartFrame(), &aItemSet, pSdrView, bResizePossible));
if( pDlg->Execute() == RET_OK )
{
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx
index 9357da198834..57a687467fd6 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -167,8 +167,7 @@ void ChartController::executeDispatch_InsertSpecialCharacter()
vcl::Font aCurFont = m_pDrawViewWrapper->getOutliner()->GetRefDevice()->GetFont();
aSet.Put( SvxFontItem( aCurFont.GetFamilyType(), aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), SID_ATTR_CHAR_FONT ) );
- vcl::Window* pWin = GetChartWindow();
- ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(pWin ? pWin->GetFrameWeld() : nullptr, aSet, nullptr));
+ ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(GetChartFrame(), aSet, nullptr));
if( pDlg->Execute() == RET_OK )
{
const SfxItemSet* pSet = pDlg->GetOutputItemSet();
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
index 7f0eb271fc94..1b8f6613c6b5 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -239,7 +239,7 @@ void ShapeController::executeDispatch_FormatLine()
SolarMutexGuard aGuard;
if ( m_pChartController )
{
- VclPtr<ChartWindow> pChartWindow( m_pChartController->GetChartWindow() );
+ weld::Window* pChartWindow(m_pChartController->GetChartFrame());
DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pChartWindow && pDrawModelWrapper && pDrawViewWrapper )
@@ -253,7 +253,7 @@ void ShapeController::executeDispatch_FormatLine()
}
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr< SfxAbstractTabDialog > pDlg(
- pFact->CreateSvxLineTabDialog(pChartWindow->GetFrameWeld(), &aAttr, &pDrawModelWrapper->getSdrModel(),
+ pFact->CreateSvxLineTabDialog(pChartWindow, &aAttr, &pDrawModelWrapper->getSdrModel(),
pSelectedObj, bHasMarked));
if ( pDlg->Execute() == RET_OK )
{
@@ -276,7 +276,7 @@ void ShapeController::executeDispatch_FormatArea()
SolarMutexGuard aGuard;
if ( m_pChartController )
{
- VclPtr<ChartWindow> pChartWindow( m_pChartController->GetChartWindow() );
+ weld::Window* pChartWindow(m_pChartController->GetChartFrame());
DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pChartWindow && pDrawModelWrapper && pDrawViewWrapper )
@@ -289,7 +289,7 @@ void ShapeController::executeDispatch_FormatArea()
}
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr< AbstractSvxAreaTabDialog > pDlg(
- pFact->CreateSvxAreaTabDialog(pChartWindow->GetFrameWeld(), &aAttr, &pDrawModelWrapper->getSdrModel(), true));
+ pFact->CreateSvxAreaTabDialog(pChartWindow, &aAttr, &pDrawModelWrapper->getSdrModel(), true));
if ( pDlg->Execute() == RET_OK )
{
const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
@@ -311,7 +311,7 @@ void ShapeController::executeDispatch_TextAttributes()
SolarMutexGuard aGuard;
if ( m_pChartController )
{
- VclPtr<ChartWindow> pChartWindow( m_pChartController->GetChartWindow() );
+ weld::Window* pChartWindow(m_pChartController->GetChartFrame());
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pChartWindow && pDrawViewWrapper )
{
@@ -323,7 +323,7 @@ void ShapeController::executeDispatch_TextAttributes()
}
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr< SfxAbstractTabDialog > pDlg(
- pFact->CreateTextTabDialog(pChartWindow->GetFrameWeld(), &aAttr, pDrawViewWrapper));
+ pFact->CreateTextTabDialog(pChartWindow, &aAttr, pDrawViewWrapper));
if ( pDlg->Execute() == RET_OK )
{
const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
@@ -345,7 +345,7 @@ void ShapeController::executeDispatch_TransformDialog()
SolarMutexGuard aGuard;
if ( m_pChartController )
{
- VclPtr<ChartWindow> pChartWindow( m_pChartController->GetChartWindow() );
+ weld::Window* pChartWindow(m_pChartController->GetChartFrame());
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pChartWindow && pDrawViewWrapper )
{
@@ -359,7 +359,7 @@ void ShapeController::executeDispatch_TransformDialog()
SfxItemSet aGeoAttr( pDrawViewWrapper->GetGeoAttrFromMarked() );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr< SfxAbstractTabDialog > pDlg(
- pFact->CreateCaptionDialog(pChartWindow->GetFrameWeld(), pDrawViewWrapper));
+ pFact->CreateCaptionDialog(pChartWindow, pDrawViewWrapper));
const sal_uInt16* pRange = pDlg->GetInputRanges( *aAttr.GetPool() );
SfxItemSet aCombAttr( *aAttr.GetPool(), pRange );
aCombAttr.Put( aAttr );
@@ -377,7 +377,7 @@ void ShapeController::executeDispatch_TransformDialog()
SfxItemSet aGeoAttr( pDrawViewWrapper->GetGeoAttrFromMarked() );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr< SfxAbstractTabDialog > pDlg(
- pFact->CreateSvxTransformTabDialog(pChartWindow->GetFrameWeld(), &aGeoAttr, pDrawViewWrapper));
+ pFact->CreateSvxTransformTabDialog(pChartWindow, &aGeoAttr, pDrawViewWrapper));
if ( pDlg->Execute() == RET_OK )
{
const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
@@ -402,9 +402,9 @@ void ShapeController::executeDispatch_ObjectTitleDescription()
OUString aTitle( pSelectedObj->GetTitle() );
OUString aDescription( pSelectedObj->GetDescription() );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- VclPtr<ChartWindow> pChartWindow( m_pChartController->GetChartWindow() );
+ weld::Window* pChartWindow(m_pChartController->GetChartFrame());
ScopedVclPtr< AbstractSvxObjectTitleDescDialog > pDlg(
- pFact->CreateSvxObjectTitleDescDialog(pChartWindow ? pChartWindow->GetFrameWeld() : nullptr, aTitle, aDescription ) );
+ pFact->CreateSvxObjectTitleDescDialog(pChartWindow, aTitle, aDescription));
if ( pDlg->Execute() == RET_OK )
{
pDlg->GetTitle( aTitle );
@@ -430,9 +430,9 @@ void ShapeController::executeDispatch_RenameObject()
{
OUString aName = pSelectedObj->GetName();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- VclPtr<ChartWindow> pChartWindow( m_pChartController->GetChartWindow() );
+ weld::Window* pChartWindow(m_pChartController->GetChartFrame());
ScopedVclPtr< AbstractSvxObjectNameDialog > pDlg(
- pFact->CreateSvxObjectNameDialog(pChartWindow ? pChartWindow->GetFrameWeld() : nullptr, aName));
+ pFact->CreateSvxObjectNameDialog(pChartWindow, aName));
pDlg->SetCheckNameHdl( LINK( this, ShapeController, CheckNameHdl ) );
if ( pDlg->Execute() == RET_OK )
{
@@ -501,7 +501,7 @@ void ShapeController::executeDispatch_FontDialog()
SolarMutexGuard aGuard;
if ( m_pChartController )
{
- VclPtr<ChartWindow> pChartWindow( m_pChartController->GetChartWindow() );
+ weld::Window* pChartWindow(m_pChartController->GetChartFrame());
DrawModelWrapper* pDrawModelWrapper = m_pChartController->GetDrawModelWrapper();
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pChartWindow && pDrawModelWrapper && pDrawViewWrapper )
@@ -509,7 +509,7 @@ void ShapeController::executeDispatch_FontDialog()
SfxItemSet aAttr( pDrawViewWrapper->GetModel()->GetItemPool() );
pDrawViewWrapper->GetAttributes( aAttr );
ViewElementListProvider aViewElementListProvider( pDrawModelWrapper );
- ShapeFontDialog aDlg(pChartWindow->GetFrameWeld(), &aAttr, &aViewElementListProvider);
+ ShapeFontDialog aDlg(pChartWindow, &aAttr, &aViewElementListProvider);
if (aDlg.run() == RET_OK)
{
const SfxItemSet* pOutAttr = aDlg.GetOutputItemSet();
@@ -524,7 +524,7 @@ void ShapeController::executeDispatch_ParagraphDialog()
SolarMutexGuard aGuard;
if ( m_pChartController )
{
- VclPtr<ChartWindow> pChartWindow( m_pChartController->GetChartWindow() );
+ weld::Window* pChartWindow(m_pChartController->GetChartFrame());
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pChartWindow && pDrawViewWrapper )
{
@@ -544,7 +544,7 @@ void ShapeController::executeDispatch_ParagraphDialog()
aNewAttr.Put( SvxWidowsItem( 0, SID_ATTR_PARA_WIDOWS) );
aNewAttr.Put( SvxOrphansItem( 0, SID_ATTR_PARA_ORPHANS) );
- ShapeParagraphDialog aDlg(pChartWindow->GetFrameWeld(), &aNewAttr);
+ ShapeParagraphDialog aDlg(pChartWindow, &aNewAttr);
if (aDlg.run() == RET_OK)
{
const SfxItemSet* pOutAttr = aDlg.GetOutputItemSet();