Kaydet (Commit) 4f75ad50 authored tarafından Caolán McNamara's avatar Caolán McNamara

ScTabViewShell is never optional

Change-Id: I9f42fd6179c0a64cc14a051ca7c9e2ed9300f5c8
üst 8f1a64bb
......@@ -26,9 +26,9 @@
#include <svx/svdocirc.hxx>
#include <svx/sxciaitm.hxx>
FuConstArc::FuConstArc( ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, const SfxRequest& rReq )
: FuConstruct( pViewSh, pWin, pViewP, pDoc, rReq )
FuConstArc::FuConstArc(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, const SfxRequest& rReq)
: FuConstruct(rViewSh, pWin, pViewP, pDoc, rReq)
{
}
......
......@@ -37,8 +37,8 @@
using namespace com::sun::star;
FuConstCustomShape::FuConstCustomShape( ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP, SdrModel* pDoc, const SfxRequest& rReq )
: FuConstruct( pViewSh, pWin, pViewP, pDoc, rReq )
FuConstCustomShape::FuConstCustomShape(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP, SdrModel* pDoc, const SfxRequest& rReq )
: FuConstruct(rViewSh, pWin, pViewP, pDoc, rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
if ( pArgs )
......
......@@ -27,9 +27,9 @@
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/point/b2dpoint.hxx>
FuConstPolygon::FuConstPolygon(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, const SfxRequest& rReq)
: FuConstruct(pViewSh, pWin, pViewP, pDoc, rReq)
FuConstPolygon::FuConstPolygon(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, const SfxRequest& rReq)
: FuConstruct(rViewSh, pWin, pViewP, pDoc, rReq)
{
}
......
......@@ -40,9 +40,9 @@
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/point/b2dpoint.hxx>
FuConstRectangle::FuConstRectangle(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, const SfxRequest& rReq)
: FuConstruct(pViewSh, pWin, pViewP, pDoc, rReq)
FuConstRectangle::FuConstRectangle(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, const SfxRequest& rReq)
: FuConstruct(rViewSh, pWin, pViewP, pDoc, rReq)
{
}
......
......@@ -36,9 +36,9 @@
//! fusel,fuconstr,futext - combine them!
#define SC_MAXDRAGMOVE 3
FuConstruct::FuConstruct(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, const SfxRequest& rReq) :
FuDraw(pViewSh, pWin, pViewP, pDoc, rReq)
FuConstruct::FuConstruct(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, const SfxRequest& rReq)
: FuDraw(rViewSh, pWin, pViewP, pDoc, rReq)
{
}
......
......@@ -22,9 +22,9 @@
#include <sc.hrc>
#include <drawview.hxx>
FuConstUnoControl::FuConstUnoControl(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, const SfxRequest& rReq)
: FuConstruct(pViewSh, pWin, pViewP, pDoc, rReq)
FuConstUnoControl::FuConstUnoControl(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, const SfxRequest& rReq)
: FuConstruct(rViewSh, pWin, pViewP, pDoc, rReq)
, nInventor(SdrInventor::Unknown)
, nIdentifier(0)
{
......
......@@ -40,11 +40,11 @@
#include <drawview.hxx>
// base class for draw module specific functions
FuDraw::FuDraw(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, const SfxRequest& rReq) :
FuPoor (pViewSh, pWin, pViewP, pDoc, rReq),
aNewPointer ( PointerStyle::Arrow ),
aOldPointer ( PointerStyle::Arrow )
FuDraw::FuDraw(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, const SfxRequest& rReq)
: FuPoor(rViewSh, pWin, pViewP, pDoc, rReq)
, aNewPointer(PointerStyle::Arrow)
, aOldPointer(PointerStyle::Arrow)
{
}
......
......@@ -99,7 +99,7 @@ void ScLimitSizeOnDrawPage( Size& rSize, Point& rPos, const Size& rPage )
static void lcl_InsertGraphic( const Graphic& rGraphic,
const OUString& rFileName, const OUString& rFilterName, bool bAsLink, bool bApi,
ScTabViewShell* pViewSh, const vcl::Window* pWindow, SdrView* pView,
ScTabViewShell& rViewSh, const vcl::Window* pWindow, SdrView* pView,
ScAnchorType aAnchorType = SCA_CELL )
{
Graphic& rGraphic1 = const_cast<Graphic &>(rGraphic);
......@@ -117,7 +117,7 @@ static void lcl_InsertGraphic( const Graphic& rGraphic,
}
}
}
ScDrawView* pDrawView = pViewSh->GetScDrawView();
ScDrawView* pDrawView = rViewSh.GetScDrawView();
// #i123922# check if an existing object is selected; if yes, evtl. replace
// the graphic for a SdrGraphObj (including link state updates) or adapt the fill
......@@ -167,9 +167,9 @@ static void lcl_InsertGraphic( const Graphic& rGraphic,
SdrPageView* pPV = pView->GetSdrPageView();
SdrPage* pPage = pPV->GetPage();
Point aInsertPos = pViewSh->GetInsertPos();
Point aInsertPos = rViewSh.GetInsertPos();
ScViewData& rData = pViewSh->GetViewData();
ScViewData& rData = rViewSh.GetViewData();
if ( rData.GetDocument()->IsNegativePage( rData.GetTabNo() ) )
aInsertPos.AdjustX( -(aLogicSize.Width()) ); // move position to left edge
......@@ -255,12 +255,12 @@ static void lcl_InsertMedia( const OUString& rMediaURL, bool bApi,
pView->InsertObjectAtView( pObj, *pPV, bApi ? SdrInsertFlags::DONTMARK : SdrInsertFlags::NONE );
}
FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh,
FuInsertGraphic::FuInsertGraphic( ScTabViewShell& rViewSh,
vcl::Window* pWin,
ScDrawView* pViewP,
SdrModel* pDoc,
SfxRequest& rReq )
: FuPoor(pViewSh, pWin, pViewP, pDoc, rReq)
: FuPoor(rViewSh, pWin, pViewP, pDoc, rReq)
{
const SfxItemSet* pReqArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
......@@ -281,7 +281,7 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh,
ErrCode nError = GraphicFilter::LoadGraphic( aFileName, aFilterName, aGraphic, &GraphicFilter::GetGraphicFilter() );
if ( nError == ERRCODE_NONE )
{
lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, true, pViewSh, pWindow, pView );
lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, true, rViewSh, pWindow, pView );
}
}
else
......@@ -347,7 +347,7 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh,
else
aAnchorType = SCA_DONTKNOW;
lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, false, pViewSh, pWindow, pView, aAnchorType );
lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, false, rViewSh, pWindow, pView, aAnchorType );
// append items for recording
rReq.AppendItem( SfxStringItem( SID_INSERT_GRAPHIC, aFileName ) );
......@@ -367,12 +367,12 @@ FuInsertGraphic::~FuInsertGraphic()
{
}
FuInsertMedia::FuInsertMedia( ScTabViewShell* pViewSh,
FuInsertMedia::FuInsertMedia( ScTabViewShell& rViewSh,
vcl::Window* pWin,
ScDrawView* pViewP,
SdrModel* pDoc,
const SfxRequest& rReq ) :
FuPoor(pViewSh, pWin, pViewP, pDoc, rReq)
FuPoor(rViewSh, pWin, pViewP, pDoc, rReq)
{
OUString aURL;
const SfxItemSet* pReqArgs = rReq.GetArgs();
......@@ -413,7 +413,7 @@ FuInsertMedia::FuInsertMedia( ScTabViewShell* pViewSh,
else
#endif
{
lcl_InsertMedia( aURL, bAPI, pViewSh, pWindow, pView, aPrefSize,
lcl_InsertMedia( aURL, bAPI, &rViewSh, pWindow, pView, aPrefSize,
bLink );
if( pWin )
......
......@@ -219,9 +219,9 @@ void lcl_ChartInit(const uno::Reference <embed::XEmbeddedObject>& xObj, ScViewDa
}
FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
FuInsertOLE::FuInsertOLE(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, SfxRequest& rReq)
: FuPoor(pViewSh, pWin, pViewP, pDoc, rReq)
: FuPoor(rViewSh, pWin, pViewP, pDoc, rReq)
{
if( ! rReq.IsAPI() )
rReq.Done();
......@@ -278,7 +278,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView*
nAspect = embed::Aspects::MSOLE_ICON;
if ( xObj.is() )
pViewSh->GetObjectShell()->GetEmbeddedObjectContainer().InsertEmbeddedObject( xObj, aName );
rViewSh.GetObjectShell()->GetEmbeddedObjectContainer().InsertEmbeddedObject( xObj, aName );
// to activate DrawShell (no need to activate Object)
bIsFromFile = !pDlg->IsCreateNew();
}
......@@ -341,11 +341,11 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView*
// initialize chart ?
if ( SvtModuleOptions().IsChart() && SotExchange::IsChart( SvGlobalName( xObj->getClassID() ) ) )
lcl_ChartInit(xObj, &pViewSh->GetViewData(), OUString(), false);
lcl_ChartInit(xObj, &rViewSh.GetViewData(), OUString(), false);
ScViewData& rData = pViewSh->GetViewData();
ScViewData& rData = rViewSh.GetViewData();
Point aPnt = pViewSh->GetInsertPos();
Point aPnt = rViewSh.GetInsertPos();
if ( rData.GetDocument()->IsNegativePage( rData.GetTabNo() ) )
aPnt.AdjustX( -(aSize.Width()) ); // move position to left edge
tools::Rectangle aRect (aPnt, aSize);
......@@ -405,9 +405,9 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView*
rReq.Ignore();
}
FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
FuInsertChart::FuInsertChart(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, SfxRequest& rReq)
: FuPoor(pViewSh, pWin, pViewP, pDoc, rReq)
: FuPoor(rViewSh, pWin, pViewP, pDoc, rReq)
{
const SfxItemSet* pReqArgs = rReq.GetArgs();
......@@ -423,21 +423,21 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV
OUString aRangeString;
bool bRangeIsPivotTable = false;
ScRange aPositionRange; // cell range for chart positioning
ScMarkData aMark = pViewSh->GetViewData().GetMarkData();
ScMarkData aMark = rViewSh.GetViewData().GetMarkData();
if( pReqArgs )
{
const SfxPoolItem* pItem;
if( pReqArgs->HasItem( FN_PARAM_5, &pItem ) )
aRangeString = static_cast<const SfxStringItem*>(pItem)->GetValue();
aPositionRange = pViewSh->GetViewData().GetCurPos();
aPositionRange = rViewSh.GetViewData().GetCurPos();
}
else
{
ScDocument* pDocument = pViewSh->GetViewData().GetDocument();
ScDPObject* pObject = pDocument->GetDPAtCursor(pViewSh->GetViewData().GetCurX(),
pViewSh->GetViewData().GetCurY(),
pViewSh->GetViewData().GetTabNo());
ScDocument* pDocument = rViewSh.GetViewData().GetDocument();
ScDPObject* pObject = pDocument->GetDPAtCursor(rViewSh.GetViewData().GetCurX(),
rViewSh.GetViewData().GetCurY(),
rViewSh.GetViewData().GetTabNo());
if (pObject)
{
aRangeString = pObject->GetName();
......@@ -448,7 +448,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV
bool bAutomaticMark = false;
if ( !aMark.IsMarked() && !aMark.IsMultiMarked() )
{
pViewSh->GetViewData().GetView()->MarkDataArea();
rViewSh.GetViewData().GetView()->MarkDataArea();
bAutomaticMark = true;
}
......@@ -472,7 +472,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV
}
if(bAutomaticMark)
pViewSh->GetViewData().GetView()->Unmark();
rViewSh.GetViewData().GetView()->Unmark();
}
}
......@@ -520,7 +520,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV
xObj->setVisualAreaSize( nAspect, aSz );
}
ScViewData& rData = pViewSh->GetViewData();
ScViewData& rData = rViewSh.GetViewData();
ScDocShell* pScDocSh = rData.GetDocShell();
ScDocument& rScDoc = pScDocSh->GetDocument();
bool bUndo (rScDoc.IsUndoEnabled());
......@@ -569,7 +569,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV
}
pScDocSh->Broadcast( ScTablesHint( SC_TAB_INSERTED, nNewTab ) );
pViewSh->SetTabNo( nNewTab, true );
rViewSh.SetTabNo( nNewTab, true );
pScDocSh->PostPaintExtras(); //! done afterwards ???
}
else
......@@ -579,7 +579,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV
}
else if ( nToTable != rData.GetTabNo() )
{
pViewSh->SetTabNo( nToTable, true );
rViewSh.SetTabNo( nToTable, true );
}
}
......@@ -588,7 +588,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV
// object position
// get chart position (from window size and data range)
Point aStart = pViewSh->GetChartInsertPos( aSize, aPositionRange );
Point aStart = rViewSh.GetChartInsertPos( aSize, aPositionRange );
tools::Rectangle aRect (aStart, aSize);
SdrOle2Obj* pObj = new SdrOle2Obj(
......@@ -709,7 +709,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV
// reset marked cell area
pViewSh->GetViewData().GetViewShell()->SetMarkData(aMark);
rViewSh.GetViewData().GetViewShell()->SetMarkData(aMark);
}
else
{
......@@ -734,9 +734,9 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV
// BM/IHA --
}
FuInsertChartFromFile::FuInsertChartFromFile( ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
FuInsertChartFromFile::FuInsertChartFromFile(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, const SfxRequest& rReq, const OUString& rURL):
FuPoor(pViewSh, pWin, pViewP, pDoc, rReq)
FuPoor(rViewSh, pWin, pViewP, pDoc, rReq)
{
uno::Reference< io::XInputStream > xStorage = comphelper::OStorageHelper::GetInputStreamFromURL(
rURL, comphelper::getProcessComponentContext());
......@@ -751,8 +751,8 @@ FuInsertChartFromFile::FuInsertChartFromFile( ScTabViewShell* pViewSh, vcl::Wind
awt::Size aSz = xObj->getVisualAreaSize( nAspect );
Size aSize( aSz.Width, aSz.Height );
ScRange aPositionRange = pViewSh->GetViewData().GetCurPos();
Point aStart = pViewSh->GetChartInsertPos( aSize, aPositionRange );
ScRange aPositionRange = rViewSh.GetViewData().GetCurPos();
Point aStart = rViewSh.GetChartInsertPos( aSize, aPositionRange );
tools::Rectangle aRect (aStart, aSize);
SdrOle2Obj* pObj = new SdrOle2Obj(
*pDoc, // TTTT should be reference
......
......@@ -30,10 +30,10 @@
#include <vcl/svapp.hxx>
#include <svx/sdrhittesthelper.hxx>
FuPoor::FuPoor(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
FuPoor::FuPoor(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, const SfxRequest& rReq) :
pView(pViewP),
pViewShell(pViewSh),
pViewShell(&rViewSh),
pWindow(pWin),
pDrDoc(pDoc),
aSfxRequest(rReq),
......
......@@ -58,7 +58,7 @@ using namespace com::sun::star;
FuSelection::FuSelection(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, const SfxRequest& rReq)
: FuDraw(&rViewSh, pWin, pViewP, pDoc, rReq)
: FuDraw(rViewSh, pWin, pViewP, pDoc, rReq)
{
}
......
......@@ -101,9 +101,9 @@ static void lcl_UpdateHyphenator( Outliner& rOutliner, const SdrObject* pObj )
}
}
FuText::FuText(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, const SfxRequest& rReq) :
FuConstruct(pViewSh, pWin, pViewP, pDoc, rReq)
FuText::FuText(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP,
SdrModel* pDoc, const SfxRequest& rReq)
: FuConstruct(rViewSh, pWin, pViewP, pDoc, rReq)
{
}
......
......@@ -25,9 +25,9 @@
/** Draw rectangle */
class FuConstArc : public FuConstruct
{
public:
FuConstArc( ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView,
SdrModel* pDoc, const SfxRequest& rReq);
public:
FuConstArc(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pView,
SdrModel* pDoc, const SfxRequest& rReq);
virtual ~FuConstArc() override;
// Mouse- & Key-Events
......
......@@ -29,7 +29,7 @@ class FuConstCustomShape : public FuConstruct
void SetAttributes( SdrObject* pObj );
public:
FuConstCustomShape(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView,
FuConstCustomShape(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pView,
SdrModel* pDoc, const SfxRequest& rReq);
virtual ~FuConstCustomShape() override;
......
......@@ -25,8 +25,8 @@
/** Base class for all functions */
class FuConstPolygon : public FuConstruct
{
public:
FuConstPolygon(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView,
public:
FuConstPolygon(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pView,
SdrModel* pDoc, const SfxRequest& rReq);
virtual ~FuConstPolygon() override;
......
......@@ -25,9 +25,9 @@
/** Draw rectangle */
class FuConstRectangle : public FuConstruct
{
public:
FuConstRectangle(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView,
SdrModel* pDoc, const SfxRequest& rReq);
public:
FuConstRectangle(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pView,
SdrModel* pDoc, const SfxRequest& rReq);
virtual ~FuConstRectangle() override;
// Mouse- & Key-Events
......
......@@ -25,9 +25,9 @@
/** Draw rectangle */
class FuConstruct : public FuDraw
{
public:
FuConstruct(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView,
SdrModel* pDoc, const SfxRequest& rReq);
public:
FuConstruct(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pView,
SdrModel* pDoc, const SfxRequest& rReq);
virtual ~FuConstruct() override;
// Mouse- & Key-Events
......
......@@ -31,7 +31,7 @@ class FuConstUnoControl final : public FuConstruct
sal_uInt16 nIdentifier;
public:
FuConstUnoControl(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView,
FuConstUnoControl(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pView,
SdrModel* pDoc, const SfxRequest& rReq);
virtual ~FuConstUnoControl() override;
......
......@@ -31,7 +31,7 @@ class FuDraw : public FuPoor
Pointer aOldPointer;
public:
FuDraw(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView,
FuDraw(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pView,
SdrModel* pDoc, const SfxRequest& rReq);
virtual ~FuDraw() override;
......
......@@ -25,37 +25,37 @@
class FuInsertGraphic : public FuPoor
{
public:
FuInsertGraphic( ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView,
public:
FuInsertGraphic(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pView,
SdrModel* pDoc, SfxRequest& rReq);
virtual ~FuInsertGraphic() override;
};
class FuInsertOLE : public FuPoor
{
public:
FuInsertOLE( ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView,
public:
FuInsertOLE(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pView,
SdrModel* pDoc, SfxRequest& rReq);
};
class FuInsertChart : public FuPoor
{
public:
FuInsertChart( ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView,
public:
FuInsertChart(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pView,
SdrModel* pDoc, SfxRequest& rReq);
};
class FuInsertChartFromFile : public FuPoor
{
public:
FuInsertChartFromFile( ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView,
public:
FuInsertChartFromFile(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pView,
SdrModel* pDoc, const SfxRequest& rReq, const OUString& rURL);
};
class FuInsertMedia : public FuPoor
{
public:
FuInsertMedia( ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView,
public:
FuInsertMedia(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pView,
SdrModel* pDoc, const SfxRequest& rReq);
virtual ~FuInsertMedia() override;
};
......
......@@ -65,7 +65,7 @@ private:
sal_uInt16 mnCode;
public:
FuPoor(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView,
FuPoor(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pView,
SdrModel* pDoc, const SfxRequest& rReq);
virtual ~FuPoor();
......
......@@ -30,7 +30,7 @@ class SdrOutliner;
class FuText : public FuConstruct
{
public:
FuText(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView,
FuText(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pView,
SdrModel* pDoc, const SfxRequest& rReq);
virtual ~FuText() override;
......
......@@ -90,7 +90,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
if ( nNewId == SID_DRAW_CHART )
{
// #i71254# directly insert a chart instead of drawing its output rectangle
FuInsertChart(this, pWin, pView, pDoc, rReq);
FuInsertChart(*this, pWin, pView, pDoc, rReq);
return;
}
......@@ -232,12 +232,12 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
case SID_DRAW_RECT:
case SID_DRAW_ELLIPSE:
case SID_DRAW_MEASURELINE:
pTabView->SetDrawFuncPtr(new FuConstRectangle(this, pWin, pView, pDoc, aNewReq));
pTabView->SetDrawFuncPtr(new FuConstRectangle(*this, pWin, pView, pDoc, aNewReq));
break;
case SID_DRAW_CAPTION:
case SID_DRAW_CAPTION_VERTICAL:
pTabView->SetDrawFuncPtr(new FuConstRectangle(this, pWin, pView, pDoc, aNewReq));
pTabView->SetDrawFuncPtr(new FuConstRectangle(*this, pWin, pView, pDoc, aNewReq));
pView->SetFrameDragSingles( false );
rBindings.Invalidate( SID_BEZIER_EDIT );
break;
......@@ -250,25 +250,25 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
case SID_DRAW_BEZIER_FILL:
case SID_DRAW_FREELINE:
case SID_DRAW_FREELINE_NOFILL:
pTabView->SetDrawFuncPtr(new FuConstPolygon(this, pWin, pView, pDoc, aNewReq));
pTabView->SetDrawFuncPtr(new FuConstPolygon(*this, pWin, pView, pDoc, aNewReq));
break;
case SID_DRAW_ARC:
case SID_DRAW_PIE:
case SID_DRAW_CIRCLECUT:
pTabView->SetDrawFuncPtr(new FuConstArc(this, pWin, pView, pDoc, aNewReq));
pTabView->SetDrawFuncPtr(new FuConstArc(*this, pWin, pView, pDoc, aNewReq));
break;
case SID_DRAW_TEXT:
case SID_DRAW_TEXT_VERTICAL:
case SID_DRAW_TEXT_MARQUEE:
case SID_DRAW_NOTEEDIT:
pTabView->SetDrawFuncPtr(new FuText(this, pWin, pView, pDoc, aNewReq));
pTabView->SetDrawFuncPtr(new FuText(*this, pWin, pView, pDoc, aNewReq));
break;
case SID_FM_CREATE_CONTROL:
SetDrawFormShell(true);
pTabView->SetDrawFuncPtr(new FuConstUnoControl(this, pWin, pView, pDoc, aNewReq));
pTabView->SetDrawFuncPtr(new FuConstUnoControl(*this, pWin, pView, pDoc, aNewReq));
nFormSfxId = nNewFormId;
break;
......@@ -280,7 +280,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
case SID_DRAWTBX_CS_STAR :
case SID_DRAW_CS_ID :
{
pTabView->SetDrawFuncPtr( new FuConstCustomShape( this, pWin, pView, pDoc, aNewReq ));
pTabView->SetDrawFuncPtr( new FuConstCustomShape(*this, pWin, pView, pDoc, aNewReq));
if ( nNewId != SID_DRAW_CS_ID )
{
const SfxStringItem* pEnumCommand = rReq.GetArg<SfxStringItem>(nNewId);
......
......@@ -325,23 +325,23 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
switch ( nSlot )
{
case SID_INSERT_GRAPHIC:
FuInsertGraphic(this, pWin, pView, pDrModel, rReq);
FuInsertGraphic(*this, pWin, pView, pDrModel, rReq);
// shell is set in MarkListHasChanged
break;
case SID_INSERT_AVMEDIA:
FuInsertMedia(this, pWin, pView, pDrModel, rReq);
FuInsertMedia(*this, pWin, pView, pDrModel, rReq);
// shell is set in MarkListHasChanged
break;
case SID_INSERT_DIAGRAM:
FuInsertChart(this, pWin, pView, pDrModel, rReq);
FuInsertChart(*this, pWin, pView, pDrModel, rReq);
break;
case SID_INSERT_OBJECT:
case SID_INSERT_SMATH:
case SID_INSERT_FLOATINGFRAME:
FuInsertOLE(this, pWin, pView, pDrModel, rReq);
FuInsertOLE(*this, pWin, pView, pDrModel, rReq);
break;
case SID_INSERT_DIAGRAM_FROM_FILE:
......@@ -354,7 +354,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
{
INetURLObject aURLObj( aDlg.GetPath() );
OUString aURL = aURLObj.GetURLNoPass();
FuInsertChartFromFile(this, pWin, pView, pDrModel, rReq, aURL);
FuInsertChartFromFile(*this, pWin, pView, pDrModel, rReq, aURL);
}
}
catch (const uno::Exception& e)
......
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