summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2016-10-06 23:34:36 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2016-10-06 23:54:22 +0300
commit44ba8c2b986bb94b8809885bdf7dc97ae7db7398 (patch)
tree9312689d0111ffc57dae26daaa919ac22b0d1917
parent5507e9dda79b769e8bb2c079f725d93931e5c1c5 (diff)
We pass the controller anyway, so get the frame from it
Change-Id: Idd8fc19b24f4d55cd0f836761d5f155b9310c3ca
-rw-r--r--sd/source/ui/controller/displaymodecontroller.cxx10
-rw-r--r--sd/source/ui/controller/slidelayoutcontroller.cxx17
-rw-r--r--svx/source/tbxctrls/bulletsnumbering.cxx8
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.cxx20
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.hxx8
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx18
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx8
7 files changed, 39 insertions, 50 deletions
diff --git a/sd/source/ui/controller/displaymodecontroller.cxx b/sd/source/ui/controller/displaymodecontroller.cxx
index 91b35a8b28ed..a0e848a39b65 100644
--- a/sd/source/ui/controller/displaymodecontroller.cxx
+++ b/sd/source/ui/controller/displaymodecontroller.cxx
@@ -52,8 +52,7 @@ public:
class DisplayModeToolbarMenu : public svtools::ToolbarMenu
{
public:
- DisplayModeToolbarMenu( DisplayModeController& rController,
- const Reference< XFrame >& xFrame, vcl::Window* pParent );
+ DisplayModeToolbarMenu( DisplayModeController& rController, vcl::Window* pParent );
virtual ~DisplayModeToolbarMenu() override;
virtual void dispose() override;
@@ -133,9 +132,8 @@ static void fillLayoutValueSet( ValueSet* pValue, const snewfoil_value_info* pIn
pValue->SetSizePixel( pValue->CalcWindowSizePixel( aLayoutItemSize ) );
}
-DisplayModeToolbarMenu::DisplayModeToolbarMenu( DisplayModeController& rController,
- const Reference< XFrame >& xFrame, vcl::Window* pParent )
-: svtools::ToolbarMenu(xFrame, pParent, WB_CLIPCHILDREN )
+DisplayModeToolbarMenu::DisplayModeToolbarMenu( DisplayModeController& rController, vcl::Window* pParent )
+: svtools::ToolbarMenu( rController.getFrameInterface(), pParent, WB_CLIPCHILDREN )
, mrController( rController )
, mpDisplayModeSet1( nullptr )
, mpDisplayModeSet2( nullptr )
@@ -242,7 +240,7 @@ void SAL_CALL DisplayModeController::initialize( const css::uno::Sequence< css::
VclPtr<vcl::Window> DisplayModeController::createPopupWindow( vcl::Window* pParent )
{
- return VclPtr<sd::DisplayModeToolbarMenu>::Create( *this, m_xFrame, pParent );
+ return VclPtr<sd::DisplayModeToolbarMenu>::Create( *this, pParent );
}
void DisplayModeController::setToolboxItemImage( sal_uInt16 nImage )
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx
index 8191e7b79793..6dd1079094b5 100644
--- a/sd/source/ui/controller/slidelayoutcontroller.cxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.cxx
@@ -65,7 +65,7 @@ namespace sd
class LayoutToolbarMenu : public svtools::ToolbarMenu
{
public:
- LayoutToolbarMenu( SlideLayoutController& rController, const Reference< XFrame >& xFrame, vcl::Window* pParent, const bool bInsertPage );
+ LayoutToolbarMenu( SlideLayoutController& rController, vcl::Window* pParent, const bool bInsertPage );
virtual ~LayoutToolbarMenu() override;
virtual void dispose() override;
@@ -75,7 +75,6 @@ protected:
void SelectHdl(void*);
private:
SlideLayoutController& mrController;
- Reference< XFrame > mxFrame;
bool mbInsertPage;
VclPtr<ValueSet> mpLayoutSet1;
VclPtr<ValueSet> mpLayoutSet2;
@@ -151,15 +150,15 @@ static void fillLayoutValueSet( ValueSet* pValue, const snewfoil_value_info_layo
pValue->SetSizePixel( pValue->CalcWindowSizePixel( aLayoutItemSize ) );
}
-LayoutToolbarMenu::LayoutToolbarMenu( SlideLayoutController& rController, const Reference< XFrame >& xFrame, vcl::Window* pParent, const bool bInsertPage )
-: svtools::ToolbarMenu(xFrame, pParent, WB_CLIPCHILDREN )
+LayoutToolbarMenu::LayoutToolbarMenu( SlideLayoutController& rController, vcl::Window* pParent, const bool bInsertPage )
+: svtools::ToolbarMenu( rController.getFrameInterface(), pParent, WB_CLIPCHILDREN )
, mrController( rController )
-, mxFrame(xFrame)
, mbInsertPage( bInsertPage )
, mpLayoutSet1( nullptr )
, mpLayoutSet2( nullptr )
{
DrawViewMode eMode = DrawViewMode_DRAW;
+ Reference< XFrame > xFrame( rController.getFrameInterface() );
// find out which view is running
if( xFrame.is() ) try
@@ -235,17 +234,17 @@ LayoutToolbarMenu::LayoutToolbarMenu( SlideLayoutController& rController, const
OUString sSlotStr;
Image aSlotImage;
- if( mxFrame.is() )
+ if( xFrame.is() )
{
if( bInsertPage )
sSlotStr = ".uno:DuplicatePage";
else
sSlotStr = ".uno:Undo";
- aSlotImage = ::GetImage( mxFrame, sSlotStr, false );
+ aSlotImage = ::GetImage( xFrame, sSlotStr, false );
OUString sSlotTitle;
if( bInsertPage )
- sSlotTitle = ImplRetrieveLabelFromCommand( mxFrame, sSlotStr );
+ sSlotTitle = ImplRetrieveLabelFromCommand( xFrame, sSlotStr );
else
sSlotTitle = SD_RESSTR( STR_RESET_LAYOUT );
appendEntry( 2, sSlotTitle, aSlotImage);
@@ -358,7 +357,7 @@ void SAL_CALL SlideLayoutController::initialize( const css::uno::Sequence< css::
VclPtr<vcl::Window> SlideLayoutController::createPopupWindow( vcl::Window* pParent )
{
- return VclPtr<sd::LayoutToolbarMenu>::Create( *this, m_xFrame, pParent, mbInsertPage );
+ return VclPtr<sd::LayoutToolbarMenu>::Create( *this, pParent, mbInsertPage );
}
// XServiceInfo
diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx b/svx/source/tbxctrls/bulletsnumbering.cxx
index 9ac5972e3f4d..9da0da285a05 100644
--- a/svx/source/tbxctrls/bulletsnumbering.cxx
+++ b/svx/source/tbxctrls/bulletsnumbering.cxx
@@ -33,7 +33,6 @@ class NumberingPopup : public svtools::ToolbarMenu
void VSSelectHdl(void *);
public:
NumberingPopup( NumberingToolBoxControl& rController,
- const css::uno::Reference< css::frame::XFrame >& rFrame,
vcl::Window* pParent, NumberingPageType ePageType );
virtual ~NumberingPopup() override;
virtual void dispose() override;
@@ -70,9 +69,8 @@ public:
//class NumberingPopup
NumberingPopup::NumberingPopup( NumberingToolBoxControl& rController,
- const css::uno::Reference< css::frame::XFrame >& rFrame,
vcl::Window* pParent, NumberingPageType ePageType ) :
- ToolbarMenu( rFrame, pParent, WB_STDPOPUP ),
+ ToolbarMenu( rController.getFrameInterface(), pParent, WB_STDPOPUP ),
mePageType( ePageType ),
mrController( rController )
{
@@ -128,7 +126,7 @@ NumberingPopup::NumberingPopup( NumberingToolBoxControl& rController,
AddStatusListener( ".uno:CurrentOutlineType" );
}
- appendEntry( 1, aMoreItemText, ::GetImage( rFrame, ".uno:OutlineBullet", false ) );
+ appendEntry( 1, aMoreItemText, ::GetImage( mrController.getFrameInterface(), ".uno:OutlineBullet", false ) );
SetOutputSizePixel( getMenuSize() );
mpValueSet->SetSelectHdl( LINK( this, NumberingPopup, VSSelectValueSetHdl ) );
@@ -213,7 +211,7 @@ NumberingToolBoxControl::NumberingToolBoxControl( const css::uno::Reference< css
VclPtr<vcl::Window> NumberingToolBoxControl::createPopupWindow( vcl::Window* pParent )
{
- return VclPtr<NumberingPopup>::Create( *this, m_xFrame, pParent, mePageType );
+ return VclPtr<NumberingPopup>::Create( *this, pParent, mePageType );
}
bool NumberingToolBoxControl::IsInImpressDraw()
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index aab9155340f0..4a74d5d661c9 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -59,10 +59,9 @@ static const char g_sExtrusionProjection[] = ".uno:ExtrusionProjection";
ExtrusionDirectionWindow::ExtrusionDirectionWindow(
svt::ToolboxController& rController,
- const css::uno::Reference< css::frame::XFrame >& rFrame,
vcl::Window* pParentWindow
)
- : ToolbarMenu(rFrame, pParentWindow, WB_STDPOPUP)
+ : ToolbarMenu(rController.getFrameInterface(), pParentWindow, WB_STDPOPUP)
, mrController(rController)
, maImgPerspective(SVX_RES(RID_SVXIMG_PERSPECTIVE))
, maImgParallel(SVX_RES(RID_SVXIMG_PARALLEL))
@@ -241,7 +240,7 @@ ExtrusionDirectionControl::ExtrusionDirectionControl(
VclPtr<vcl::Window> ExtrusionDirectionControl::createPopupWindow( vcl::Window* pParent )
{
- return VclPtr<ExtrusionDirectionWindow>::Create( *this, m_xFrame, pParent );
+ return VclPtr<ExtrusionDirectionWindow>::Create( *this, pParent );
}
// XInitialization
@@ -320,9 +319,8 @@ double aDepthListMM[] = { 0, 1000, 2500, 5000, 10000 };
ExtrusionDepthWindow::ExtrusionDepthWindow(
svt::ToolboxController& rController,
- const css::uno::Reference< css::frame::XFrame >& rFrame,
vcl::Window* pParentWindow
-) : ToolbarMenu( rFrame, pParentWindow, WB_STDPOPUP )
+) : ToolbarMenu( rController.getFrameInterface(), pParentWindow, WB_STDPOPUP )
, mrController( rController )
, maImgDepth0(SVX_RES(RID_SVXIMG_DEPTH_0))
, maImgDepth1(SVX_RES(RID_SVXIMG_DEPTH_1))
@@ -477,7 +475,7 @@ ExtrusionDepthController::ExtrusionDepthController(
VclPtr<vcl::Window> ExtrusionDepthController::createPopupWindow( vcl::Window* pParent )
{
- return VclPtr<ExtrusionDepthWindow>::Create( *this, m_xFrame, pParent );
+ return VclPtr<ExtrusionDepthWindow>::Create( *this, pParent );
}
// XInitialization
@@ -527,9 +525,8 @@ static const char g_sExtrusionLightingDirection[] = ".uno:ExtrusionLightingDirec
static const char g_sExtrusionLightingIntensity[] = ".uno:ExtrusionLightingIntensity";
ExtrusionLightingWindow::ExtrusionLightingWindow(svt::ToolboxController& rController,
- const css::uno::Reference<css::frame::XFrame >& rFrame,
vcl::Window* pParentWindow)
- : ToolbarMenu(rFrame, pParentWindow, WB_STDPOPUP)
+ : ToolbarMenu(rController.getFrameInterface(), pParentWindow, WB_STDPOPUP)
, mrController(rController)
, maImgBright(SVX_RES(RID_SVXIMG_LIGHTING_BRIGHT))
, maImgNormal(SVX_RES(RID_SVXIMG_LIGHTING_NORMAL))
@@ -743,7 +740,7 @@ ExtrusionLightingControl::ExtrusionLightingControl(
VclPtr<vcl::Window> ExtrusionLightingControl::createPopupWindow( vcl::Window* pParent )
{
- return VclPtr<ExtrusionLightingWindow>::Create( *this, m_xFrame, pParent );
+ return VclPtr<ExtrusionLightingWindow>::Create( *this, pParent );
}
// XInitialization
@@ -797,9 +794,8 @@ static const char g_sExtrusionSurface[] = ".uno:ExtrusionSurface";
ExtrusionSurfaceWindow::ExtrusionSurfaceWindow(
svt::ToolboxController& rController,
- const css::uno::Reference< css::frame::XFrame >& rFrame,
vcl::Window* pParentWindow)
- : ToolbarMenu(rFrame, pParentWindow, WB_STDPOPUP)
+ : ToolbarMenu(rController.getFrameInterface(), pParentWindow, WB_STDPOPUP)
, mrController(rController)
, maImgSurface1(SVX_RES(RID_SVXIMG_WIRE_FRAME))
, maImgSurface2(SVX_RES(RID_SVXIMG_MATTE))
@@ -880,7 +876,7 @@ ExtrusionSurfaceControl::ExtrusionSurfaceControl(
VclPtr<vcl::Window> ExtrusionSurfaceControl::createPopupWindow( vcl::Window* pParent )
{
- return VclPtr<ExtrusionSurfaceWindow>::Create( *this, m_xFrame, pParent );
+ return VclPtr<ExtrusionSurfaceWindow>::Create( *this, pParent );
}
// XInitialization
diff --git a/svx/source/tbxctrls/extrusioncontrols.hxx b/svx/source/tbxctrls/extrusioncontrols.hxx
index f1426cfb4cf8..9b0f50b5687d 100644
--- a/svx/source/tbxctrls/extrusioncontrols.hxx
+++ b/svx/source/tbxctrls/extrusioncontrols.hxx
@@ -39,7 +39,7 @@ namespace svx
class ExtrusionDirectionWindow : public svtools::ToolbarMenu
{
public:
- ExtrusionDirectionWindow( svt::ToolboxController& rController, const css::uno::Reference< css::frame::XFrame >& rFrame, vcl::Window* pParentWindow );
+ ExtrusionDirectionWindow( svt::ToolboxController& rController, vcl::Window* pParentWindow );
virtual ~ExtrusionDirectionWindow() override;
virtual void dispose() override;
@@ -106,7 +106,7 @@ private:
void implSetDepth( double fDepth );
public:
- ExtrusionDepthWindow( svt::ToolboxController& rController, const css::uno::Reference< css::frame::XFrame >& rFrame, vcl::Window* pParentWindow );
+ ExtrusionDepthWindow( svt::ToolboxController& rController, vcl::Window* pParentWindow );
virtual void statusChanged( const css::frame::FeatureStateEvent& Event ) throw ( css::uno::RuntimeException, std::exception ) override;
};
@@ -156,7 +156,7 @@ private:
DECL_LINK( SelectValueSetHdl, ValueSet*, void );
void SelectHdl(void*);
public:
- ExtrusionLightingWindow( svt::ToolboxController& rController, const css::uno::Reference< css::frame::XFrame >& rFrame, vcl::Window* pParentWindow );
+ ExtrusionLightingWindow( svt::ToolboxController& rController, vcl::Window* pParentWindow );
virtual ~ExtrusionLightingWindow() override;
virtual void dispose() override;
@@ -199,7 +199,7 @@ private:
void implSetSurface( int nSurface, bool bEnabled );
public:
- ExtrusionSurfaceWindow( svt::ToolboxController& rController, const css::uno::Reference< css::frame::XFrame >& rFrame, vcl::Window* pParentWindow );
+ ExtrusionSurfaceWindow( svt::ToolboxController& rController, vcl::Window* pParentWindow );
virtual void statusChanged( const css::frame::FeatureStateEvent& Event ) throw ( css::uno::RuntimeException ) override;
};
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index 58968b0a5eb0..e8d5f369212e 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -246,7 +246,7 @@ IMPL_LINK_NOARG(FontWorkGalleryDialog, DoubleClickFavoriteHdl, ValueSet*, void)
class FontworkAlignmentWindow : public ToolbarMenu
{
public:
- FontworkAlignmentWindow( svt::ToolboxController& rController, const Reference< css::frame::XFrame >& rFrame, vcl::Window* pParentWindow );
+ FontworkAlignmentWindow( svt::ToolboxController& rController, vcl::Window* pParentWindow );
virtual void statusChanged( const css::frame::FeatureStateEvent& Event ) throw ( RuntimeException ) override;
@@ -266,9 +266,8 @@ private:
void implSetAlignment( int nAlignmentMode, bool bEnabled );
};
-FontworkAlignmentWindow::FontworkAlignmentWindow(svt::ToolboxController& rController,
- const Reference< css::frame::XFrame >& rFrame, vcl::Window* pParentWindow)
- : ToolbarMenu(rFrame, pParentWindow, WB_STDPOPUP)
+FontworkAlignmentWindow::FontworkAlignmentWindow(svt::ToolboxController& rController, vcl::Window* pParentWindow)
+ : ToolbarMenu(rController.getFrameInterface(), pParentWindow, WB_STDPOPUP)
, mrController(rController)
, maImgAlgin1(SVX_RES(RID_SVXIMG_FONTWORK_ALIGN_LEFT))
, maImgAlgin2(SVX_RES(RID_SVXIMG_FONTWORK_ALIGN_CENTER))
@@ -362,7 +361,7 @@ FontworkAlignmentControl::FontworkAlignmentControl( const Reference< XComponentC
VclPtr<vcl::Window> FontworkAlignmentControl::createPopupWindow( vcl::Window* pParent )
{
- return VclPtr<FontworkAlignmentWindow>::Create( *this, m_xFrame, pParent );
+ return VclPtr<FontworkAlignmentWindow>::Create( *this, pParent );
}
// XInitialization
@@ -413,7 +412,7 @@ Sequence< OUString > SAL_CALL FontworkAlignmentControl::getSupportedServiceNames
class FontworkCharacterSpacingWindow : public ToolbarMenu
{
public:
- FontworkCharacterSpacingWindow( svt::ToolboxController& rController, const Reference< css::frame::XFrame >& rFrame, vcl::Window* pParentWindow );
+ FontworkCharacterSpacingWindow( svt::ToolboxController& rController, vcl::Window* pParentWindow );
virtual void statusChanged( const css::frame::FeatureStateEvent& Event ) throw ( css::uno::RuntimeException ) override;
private:
@@ -429,9 +428,8 @@ private:
};
-FontworkCharacterSpacingWindow::FontworkCharacterSpacingWindow(svt::ToolboxController& rController,
- const Reference< css::frame::XFrame >& rFrame, vcl::Window* pParentWindow)
- : ToolbarMenu(rFrame, pParentWindow, WB_STDPOPUP)
+FontworkCharacterSpacingWindow::FontworkCharacterSpacingWindow(svt::ToolboxController& rController, vcl::Window* pParentWindow)
+ : ToolbarMenu(rController.getFrameInterface(), pParentWindow, WB_STDPOPUP)
, mrController(rController)
, msFontworkCharacterSpacing(".uno:FontworkCharacterSpacing")
, msFontworkKernCharacterPairs(".uno:FontworkKernCharacterPairs")
@@ -589,7 +587,7 @@ FontworkCharacterSpacingControl::FontworkCharacterSpacingControl( const Referenc
VclPtr<vcl::Window> FontworkCharacterSpacingControl::createPopupWindow( vcl::Window* pParent )
{
- return VclPtr<FontworkCharacterSpacingWindow>::Create( *this, m_xFrame, pParent );
+ return VclPtr<FontworkCharacterSpacingWindow>::Create( *this, pParent );
}
// XInitialization
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index d14ba1abef09..220146db6137 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -262,7 +262,7 @@ protected:
virtual void GetFocus() override;
public:
- SvxFrameWindow_Impl( const Reference< XFrame >& rFrame, vcl::Window* pParentWindow, svt::ToolboxController& rController );
+ SvxFrameWindow_Impl( svt::ToolboxController& rController, vcl::Window* pParentWindow );
virtual ~SvxFrameWindow_Impl() override;
virtual void dispose() override;
@@ -1595,8 +1595,8 @@ Color BorderColorStatus::GetColor()
}
-SvxFrameWindow_Impl::SvxFrameWindow_Impl (const Reference< XFrame >& rFrame, vcl::Window* pParentWindow, svt::ToolboxController& rController ) :
- ToolbarPopup( rFrame, pParentWindow, WB_STDPOPUP | WB_MOVEABLE | WB_CLOSEABLE ),
+SvxFrameWindow_Impl::SvxFrameWindow_Impl ( svt::ToolboxController& rController, vcl::Window* pParentWindow ) :
+ ToolbarPopup( rController.getFrameInterface(), pParentWindow, WB_STDPOPUP | WB_MOVEABLE | WB_CLOSEABLE ),
aFrameSet ( VclPtr<SvxFrmValueSet_Impl>::Create(this, WinBits( WB_ITEMBORDER | WB_DOUBLEBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT )) ),
mrController( rController ),
bParagraphMode(false)
@@ -2929,7 +2929,7 @@ void SvxFrameToolBoxControl::initialize( const css::uno::Sequence< css::uno::Any
VclPtr<vcl::Window> SvxFrameToolBoxControl::createPopupWindow( vcl::Window* pParent )
{
- return VclPtr<SvxFrameWindow_Impl>::Create( m_xFrame, pParent, *this );
+ return VclPtr<SvxFrameWindow_Impl>::Create( *this, pParent );
}
OUString SvxFrameToolBoxControl::getImplementationName()