Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
482ac12a
Kaydet (Commit)
482ac12a
authored
May 23, 2018
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
member can be a ref instead of a pointer
Change-Id: Idb0c27933b42f3aef65f0bce098f9bd7a81dc034
üst
4f75ad50
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
98 additions
and
99 deletions
+98
-99
fuconarc.cxx
sc/source/ui/drawfunc/fuconarc.cxx
+2
-2
fuconcustomshape.cxx
sc/source/ui/drawfunc/fuconcustomshape.cxx
+2
-2
fuconpol.cxx
sc/source/ui/drawfunc/fuconpol.cxx
+2
-2
fuconrec.cxx
sc/source/ui/drawfunc/fuconrec.cxx
+2
-2
fuconstr.cxx
sc/source/ui/drawfunc/fuconstr.cxx
+9
-9
fuconuno.cxx
sc/source/ui/drawfunc/fuconuno.cxx
+2
-2
fudraw.cxx
sc/source/ui/drawfunc/fudraw.cxx
+20
-20
fuins2.cxx
sc/source/ui/drawfunc/fuins2.cxx
+12
-13
fupoor.cxx
sc/source/ui/drawfunc/fupoor.cxx
+6
-6
fusel.cxx
sc/source/ui/drawfunc/fusel.cxx
+13
-13
fusel2.cxx
sc/source/ui/drawfunc/fusel2.cxx
+4
-4
futext.cxx
sc/source/ui/drawfunc/futext.cxx
+19
-19
futext2.cxx
sc/source/ui/drawfunc/futext2.cxx
+1
-1
futext3.cxx
sc/source/ui/drawfunc/futext3.cxx
+3
-3
fupoor.hxx
sc/source/ui/inc/fupoor.hxx
+1
-1
No files found.
sc/source/ui/drawfunc/fuconarc.cxx
Dosyayı görüntüle @
482ac12a
...
...
@@ -104,7 +104,7 @@ void FuConstArc::Activate()
pView
->
SetCurrentObj
(
sal
::
static_int_cast
<
sal_uInt16
>
(
aObjKind
)
);
aOldPointer
=
pWindow
->
GetPointer
();
pViewShell
->
SetActivePointer
(
aNewPointer
);
rViewShell
.
SetActivePointer
(
aNewPointer
);
FuDraw
::
Activate
();
}
...
...
@@ -112,7 +112,7 @@ void FuConstArc::Activate()
void
FuConstArc
::
Deactivate
()
{
FuDraw
::
Deactivate
();
pViewShell
->
SetActivePointer
(
aOldPointer
);
rViewShell
.
SetActivePointer
(
aOldPointer
);
}
// Create default drawing objects via keyboard
...
...
sc/source/ui/drawfunc/fuconcustomshape.cxx
Dosyayı görüntüle @
482ac12a
...
...
@@ -108,7 +108,7 @@ void FuConstCustomShape::Activate()
aNewPointer
=
Pointer
(
PointerStyle
::
DrawRect
);
aOldPointer
=
pWindow
->
GetPointer
();
pViewShell
->
SetActivePointer
(
aNewPointer
);
rViewShell
.
SetActivePointer
(
aNewPointer
);
SdrLayer
*
pLayer
=
pView
->
GetModel
()
->
GetLayerAdmin
().
GetLayerPerID
(
SC_LAYER_CONTROLS
);
if
(
pLayer
)
...
...
@@ -125,7 +125,7 @@ void FuConstCustomShape::Deactivate()
if
(
pLayer
)
pView
->
SetActiveLayer
(
pLayer
->
GetName
()
);
pViewShell
->
SetActivePointer
(
aOldPointer
);
rViewShell
.
SetActivePointer
(
aOldPointer
);
}
// Create default drawing objects via keyboard
...
...
sc/source/ui/drawfunc/fuconpol.cxx
Dosyayı görüntüle @
482ac12a
...
...
@@ -158,7 +158,7 @@ void FuConstPolygon::Activate()
aNewPointer
=
Pointer
(
PointerStyle
::
DrawPolygon
);
aOldPointer
=
pWindow
->
GetPointer
();
pViewShell
->
SetActivePointer
(
aNewPointer
);
rViewShell
.
SetActivePointer
(
aNewPointer
);
}
void
FuConstPolygon
::
Deactivate
()
...
...
@@ -169,7 +169,7 @@ void FuConstPolygon::Deactivate()
FuConstruct
::
Deactivate
();
pViewShell
->
SetActivePointer
(
aOldPointer
);
rViewShell
.
SetActivePointer
(
aOldPointer
);
}
// Create default drawing objects via keyboard
...
...
sc/source/ui/drawfunc/fuconrec.cxx
Dosyayı görüntüle @
482ac12a
...
...
@@ -207,7 +207,7 @@ void FuConstRectangle::Activate()
pView
->
SetCurrentObj
(
sal
::
static_int_cast
<
sal_uInt16
>
(
aObjKind
));
aOldPointer
=
pWindow
->
GetPointer
();
pViewShell
->
SetActivePointer
(
aNewPointer
);
rViewShell
.
SetActivePointer
(
aNewPointer
);
FuConstruct
::
Activate
();
}
...
...
@@ -347,7 +347,7 @@ void FuConstRectangle::SetLineEnds(SfxItemSet& rAttr, const SdrObject& rObj, sal
void
FuConstRectangle
::
Deactivate
()
{
FuConstruct
::
Deactivate
();
pViewShell
->
SetActivePointer
(
aOldPointer
);
rViewShell
.
SetActivePointer
(
aOldPointer
);
}
// Create default drawing objects via keyboard
...
...
sc/source/ui/drawfunc/fuconstr.cxx
Dosyayı görüntüle @
482ac12a
...
...
@@ -53,7 +53,7 @@ FuConstruct::~FuConstruct()
Point
FuConstruct
::
CurrentGridSyncOffsetAndPos
(
Point
&
rInOutPos
)
{
Point
aRetGridOff
;
ScViewData
&
rViewData
=
pViewShell
->
GetViewData
();
ScViewData
&
rViewData
=
rViewShell
.
GetViewData
();
ScDocument
*
pDoc
=
rViewData
.
GetDocument
();
if
(
pDoc
)
{
...
...
@@ -71,7 +71,7 @@ Point FuConstruct::CurrentGridSyncOffsetAndPos( Point& rInOutPos )
ScSplitPos
eWhich
=
rViewData
.
GetActivePart
();
ScGridWindow
*
pGridWin
=
rViewData
.
GetActiveWin
();
// and equiv screen pos
Point
aScreenPos
=
pViewShell
->
GetViewData
().
GetScrPos
(
aOldStt
.
Col
(),
aOldStt
.
Row
(),
eWhich
,
true
);
Point
aScreenPos
=
rViewShell
.
GetViewData
().
GetScrPos
(
aOldStt
.
Col
(),
aOldStt
.
Row
(),
eWhich
,
true
);
MapMode
aDrawMode
=
pGridWin
->
GetDrawMapMode
();
Point
aCurPosHmm
=
pGridWin
->
PixelToLogic
(
aScreenPos
,
aDrawMode
);
Point
aOff
=
(
rInOutPos
-
aCurPosHmm
);
...
...
@@ -161,15 +161,15 @@ bool FuConstruct::MouseMove(const MouseEvent& rMEvt)
if
(
pHdl
!=
nullptr
)
{
pViewShell
->
SetActivePointer
(
pHdl
->
GetPointer
());
rViewShell
.
SetActivePointer
(
pHdl
->
GetPointer
());
}
else
if
(
pView
->
IsMarkedHit
(
aPnt
)
)
{
pViewShell
->
SetActivePointer
(
Pointer
(
PointerStyle
::
Move
));
rViewShell
.
SetActivePointer
(
Pointer
(
PointerStyle
::
Move
));
}
else
{
pViewShell
->
SetActivePointer
(
aNewPointer
);
rViewShell
.
SetActivePointer
(
aNewPointer
);
}
}
return
true
;
...
...
@@ -202,11 +202,11 @@ bool FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
bool
bVertical
=
(
pOPO
&&
pOPO
->
IsVertical
()
);
sal_uInt16
nTextSlotId
=
bVertical
?
SID_DRAW_TEXT_VERTICAL
:
SID_DRAW_TEXT
;
pViewShell
->
GetViewData
().
GetDispatcher
().
rViewShell
.
GetViewData
().
GetDispatcher
().
Execute
(
nTextSlotId
,
SfxCallMode
::
SLOT
|
SfxCallMode
::
RECORD
);
// Get the created FuText now and change into EditModus
FuPoor
*
pPoor
=
pViewShell
->
GetViewData
().
GetView
()
->
GetDrawFuncPtr
();
FuPoor
*
pPoor
=
rViewShell
.
GetViewData
().
GetView
()
->
GetDrawFuncPtr
();
if
(
pPoor
&&
pPoor
->
GetSlotID
()
==
nTextSlotId
)
// has no RTTI
{
FuText
*
pText
=
static_cast
<
FuText
*>
(
pPoor
);
...
...
@@ -253,7 +253,7 @@ bool FuConstruct::SimpleMouseButtonUp(const MouseEvent& rMEvt)
{
pView
->
MarkObj
(
aPnt
,
-
2
,
false
,
rMEvt
.
IsMod1
());
SfxDispatcher
&
rDisp
=
pViewShell
->
GetViewData
().
GetDispatcher
();
SfxDispatcher
&
rDisp
=
rViewShell
.
GetViewData
().
GetDispatcher
();
if
(
pView
->
AreObjectsMarked
()
)
rDisp
.
Execute
(
SID_OBJECT_SELECT
,
SfxCallMode
::
SLOT
|
SfxCallMode
::
RECORD
);
else
...
...
@@ -280,7 +280,7 @@ bool FuConstruct::KeyInput(const KeyEvent& rKEvt)
}
else
// end drawing mode
{
pViewShell
->
GetViewData
().
GetDispatcher
().
rViewShell
.
GetViewData
().
GetDispatcher
().
Execute
(
aSfxRequest
.
GetSlot
(),
SfxCallMode
::
SLOT
|
SfxCallMode
::
RECORD
);
}
break
;
...
...
sc/source/ui/drawfunc/fuconuno.cxx
Dosyayı görüntüle @
482ac12a
...
...
@@ -85,7 +85,7 @@ void FuConstUnoControl::Activate()
aNewPointer
=
Pointer
(
PointerStyle
::
DrawRect
);
aOldPointer
=
pWindow
->
GetPointer
();
pViewShell
->
SetActivePointer
(
aNewPointer
);
rViewShell
.
SetActivePointer
(
aNewPointer
);
SdrLayer
*
pLayer
=
pView
->
GetModel
()
->
GetLayerAdmin
().
GetLayerPerID
(
SC_LAYER_CONTROLS
);
if
(
pLayer
)
...
...
@@ -102,7 +102,7 @@ void FuConstUnoControl::Deactivate()
if
(
pLayer
)
pView
->
SetActiveLayer
(
pLayer
->
GetName
()
);
pViewShell
->
SetActivePointer
(
aOldPointer
);
rViewShell
.
SetActivePointer
(
aOldPointer
);
}
// Create default drawing objects via keyboard
...
...
sc/source/ui/drawfunc/fudraw.cxx
Dosyayı görüntüle @
482ac12a
...
...
@@ -88,7 +88,7 @@ void FuDraw::ResetModifiers()
if
(
!
pView
)
return
;
ScViewData
&
rViewData
=
pViewShell
->
GetViewData
();
ScViewData
&
rViewData
=
rViewShell
.
GetViewData
();
const
ScViewOptions
&
rOpt
=
rViewData
.
GetOptions
();
const
ScGridOptions
&
rGrid
=
rOpt
.
GetGridOptions
();
bool
bGridOpt
=
rGrid
.
GetUseGridSnap
();
...
...
@@ -138,7 +138,7 @@ bool FuDraw::MouseButtonUp(const MouseEvent& rMEvt)
}
// Process Keyboard events. Return true if an event is being handled
static
bool
lcl_KeyEditMode
(
SdrObject
*
pObj
,
ScTabViewShell
*
p
ViewShell
,
const
KeyEvent
*
pInitialKey
)
static
bool
lcl_KeyEditMode
(
SdrObject
*
pObj
,
ScTabViewShell
&
r
ViewShell
,
const
KeyEvent
*
pInitialKey
)
{
bool
bReturn
=
false
;
if
(
pObj
&&
dynamic_cast
<
const
SdrTextObj
*>
(
pObj
)
!=
nullptr
&&
dynamic_cast
<
const
SdrUnoObj
*>
(
pObj
)
==
nullptr
)
...
...
@@ -151,15 +151,15 @@ static bool lcl_KeyEditMode( SdrObject* pObj, ScTabViewShell* pViewShell, const
sal_uInt16
nTextSlotId
=
bVertical
?
SID_DRAW_TEXT_VERTICAL
:
SID_DRAW_TEXT
;
// don't switch shells if text shell is already active
FuPoor
*
pPoor
=
pViewShell
->
GetViewData
().
GetView
()
->
GetDrawFuncPtr
();
FuPoor
*
pPoor
=
rViewShell
.
GetViewData
().
GetView
()
->
GetDrawFuncPtr
();
if
(
!
pPoor
||
pPoor
->
GetSlotID
()
!=
nTextSlotId
)
{
pViewShell
->
GetViewData
().
GetDispatcher
().
rViewShell
.
GetViewData
().
GetDispatcher
().
Execute
(
nTextSlotId
,
SfxCallMode
::
SYNCHRON
|
SfxCallMode
::
RECORD
);
}
// get the resulting FuText and set in edit mode
pPoor
=
pViewShell
->
GetViewData
().
GetView
()
->
GetDrawFuncPtr
();
pPoor
=
rViewShell
.
GetViewData
().
GetView
()
->
GetDrawFuncPtr
();
if
(
pPoor
&&
pPoor
->
GetSlotID
()
==
nTextSlotId
)
// no RTTI
{
FuText
*
pText
=
static_cast
<
FuText
*>
(
pPoor
);
...
...
@@ -174,18 +174,18 @@ static bool lcl_KeyEditMode( SdrObject* pObj, ScTabViewShell* pViewShell, const
bool
FuDraw
::
KeyInput
(
const
KeyEvent
&
rKEvt
)
{
bool
bReturn
=
false
;
ScViewData
&
rViewData
=
pViewShell
->
GetViewData
();
ScViewData
&
rViewData
=
rViewShell
.
GetViewData
();
switch
(
rKEvt
.
GetKeyCode
().
GetCode
()
)
{
case
KEY_ESCAPE
:
if
(
pViewShell
->
IsDrawTextShell
()
||
aSfxRequest
.
GetSlot
()
==
SID_DRAW_NOTEEDIT
)
if
(
rViewShell
.
IsDrawTextShell
()
||
aSfxRequest
.
GetSlot
()
==
SID_DRAW_NOTEEDIT
)
{
// if object selected -> normal draw-shell, else turn off drawing
rViewData
.
GetDispatcher
().
Execute
(
aSfxRequest
.
GetSlot
(),
SfxCallMode
::
SLOT
|
SfxCallMode
::
RECORD
);
bReturn
=
true
;
}
else
if
(
pViewShell
->
IsDrawSelMode
()
)
else
if
(
rViewShell
.
IsDrawSelMode
()
)
{
pView
->
UnmarkAll
();
rViewData
.
GetDispatcher
().
Execute
(
SID_OBJECT_SELECT
,
SfxCallMode
::
SLOT
|
SfxCallMode
::
RECORD
);
...
...
@@ -202,7 +202,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
// while bezier editing, object is selected
if
(
!
pView
->
AreObjectsMarked
())
pViewShell
->
SetDrawShell
(
false
);
rViewShell
.
SetDrawShell
(
false
);
bReturn
=
true
;
}
...
...
@@ -222,16 +222,16 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
const
SdrMarkList
&
rMarkList
=
pView
->
GetMarkedObjectList
();
if
(
!
pView
->
IsTextEdit
()
&&
1
==
rMarkList
.
GetMarkCount
()
)
{
bool
bOle
=
pViewShell
->
GetViewFrame
()
->
GetFrame
().
IsInPlace
();
bool
bOle
=
rViewShell
.
GetViewFrame
()
->
GetFrame
().
IsInPlace
();
SdrObject
*
pObj
=
rMarkList
.
GetMark
(
0
)
->
GetMarkedSdrObj
();
if
(
pObj
&&
dynamic_cast
<
const
SdrOle2Obj
*>
(
pObj
)
!=
nullptr
&&
!
bOle
)
{
pViewShell
->
ActivateObject
(
static_cast
<
SdrOle2Obj
*
>
(
pObj
),
0
);
rViewShell
.
ActivateObject
(
static_cast
<
SdrOle2Obj
*
>
(
pObj
),
0
);
// consumed
bReturn
=
true
;
}
else
if
(
lcl_KeyEditMode
(
pObj
,
p
ViewShell
,
nullptr
)
)
// start text edit for suitable object
else
if
(
lcl_KeyEditMode
(
pObj
,
r
ViewShell
,
nullptr
)
)
// start text edit for suitable object
bReturn
=
true
;
}
}
...
...
@@ -248,7 +248,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
if
(
!
pView
->
IsTextEdit
()
&&
1
==
rMarkList
.
GetMarkCount
()
)
{
SdrObject
*
pObj
=
rMarkList
.
GetMark
(
0
)
->
GetMarkedSdrObj
();
if
(
lcl_KeyEditMode
(
pObj
,
p
ViewShell
,
nullptr
)
)
// start text edit for suitable object
if
(
lcl_KeyEditMode
(
pObj
,
r
ViewShell
,
nullptr
)
)
// start text edit for suitable object
bReturn
=
true
;
}
}
...
...
@@ -611,7 +611,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
SdrObject
*
pObj
=
rMarkList
.
GetMark
(
0
)
->
GetMarkedSdrObj
();
// start text edit for suitable object, pass key event to OutlinerView
if
(
lcl_KeyEditMode
(
pObj
,
p
ViewShell
,
&
rKEvt
)
)
if
(
lcl_KeyEditMode
(
pObj
,
r
ViewShell
,
&
rKEvt
)
)
bReturn
=
true
;
}
}
...
...
@@ -664,16 +664,16 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
if
(
pView
->
IsTextEdit
()
)
{
pViewShell
->
SetActivePointer
(
Pointer
(
PointerStyle
::
Text
));
// can't be ?
rViewShell
.
SetActivePointer
(
Pointer
(
PointerStyle
::
Text
));
// can't be ?
}
else
if
(
pHdl
)
{
pViewShell
->
SetActivePointer
(
rViewShell
.
SetActivePointer
(
pView
->
GetPreferredPointer
(
aPnt
,
pWindow
)
);
}
else
if
(
pView
->
IsMarkedHit
(
aPnt
)
)
{
pViewShell
->
SetActivePointer
(
Pointer
(
PointerStyle
::
Move
)
);
rViewShell
.
SetActivePointer
(
Pointer
(
PointerStyle
::
Move
)
);
}
else
if
(
!
bAlt
&&
(
!
pMEvt
||
!
pMEvt
->
GetButtons
()
)
&&
lcl_UrlHit
(
pView
,
aPosPixel
,
pWindow
)
)
...
...
@@ -685,14 +685,14 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
{
// could be suppressed with ALT
SdrObjMacroHitRec
aHitRec
;
//! something missing ????
pViewShell
->
SetActivePointer
(
pObj
->
GetMacroPointer
(
aHitRec
)
);
rViewShell
.
SetActivePointer
(
pObj
->
GetMacroPointer
(
aHitRec
)
);
}
else
if
(
!
bAlt
&&
pInfo
&&
(
!
pInfo
->
GetMacro
().
isEmpty
()
||
!
pInfo
->
GetHlink
().
isEmpty
())
)
pWindow
->
SetPointer
(
Pointer
(
PointerStyle
::
RefHand
)
);
else
if
(
IsDetectiveHit
(
aPnt
)
)
pViewShell
->
SetActivePointer
(
Pointer
(
PointerStyle
::
Detective
)
);
rViewShell
.
SetActivePointer
(
Pointer
(
PointerStyle
::
Detective
)
);
else
pViewShell
->
SetActivePointer
(
aNewPointer
);
//! in Gridwin?
rViewShell
.
SetActivePointer
(
aNewPointer
);
//! in Gridwin?
}
}
...
...
sc/source/ui/drawfunc/fuins2.cxx
Dosyayı görüntüle @
482ac12a
...
...
@@ -242,13 +242,13 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView*
if
(
nSlot
==
SID_INSERT_OBJECT
&&
pNameItem
)
{
SvGlobalName
aClassName
=
pNameItem
->
GetValue
();
xObj
=
pViewShell
->
GetViewFrame
()
->
GetObjectShell
()
->
GetEmbeddedObjectContainer
().
CreateEmbeddedObject
(
aClassName
.
GetByteSequence
(),
aName
);
xObj
=
rViewShell
.
GetViewFrame
()
->
GetObjectShell
()
->
GetEmbeddedObjectContainer
().
CreateEmbeddedObject
(
aClassName
.
GetByteSequence
(),
aName
);
}
else
if
(
nSlot
==
SID_INSERT_SMATH
)
{
if
(
SvtModuleOptions
().
IsMath
()
)
{
xObj
=
pViewShell
->
GetViewFrame
()
->
GetObjectShell
()
->
GetEmbeddedObjectContainer
().
CreateEmbeddedObject
(
SvGlobalName
(
SO3_SM_CLASSID_60
).
GetByteSequence
(),
aName
);
xObj
=
rViewShell
.
GetViewFrame
()
->
GetObjectShell
()
->
GetEmbeddedObjectContainer
().
CreateEmbeddedObject
(
SvGlobalName
(
SO3_SM_CLASSID_60
).
GetByteSequence
(),
aName
);
rReq
.
AppendItem
(
SfxGlobalNameItem
(
SID_INSERT_OBJECT
,
SvGlobalName
(
SO3_SM_CLASSID_60
)
)
);
}
}
...
...
@@ -266,7 +266,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView*
{
SvxAbstractDialogFactory
*
pFact
=
SvxAbstractDialogFactory
::
Create
();
ScopedVclPtr
<
SfxAbstractInsertObjectDialog
>
pDlg
(
pFact
->
CreateInsertObjectDialog
(
pViewShell
->
GetFrameWeld
(),
SC_MOD
()
->
GetSlotPool
()
->
GetSlot
(
nSlot
)
->
GetCommandString
(),
pFact
->
CreateInsertObjectDialog
(
rViewShell
.
GetFrameWeld
(),
SC_MOD
()
->
GetSlotPool
()
->
GetSlot
(
nSlot
)
->
GetCommandString
(),
xStorage
,
&
aServerLst
));
if
(
pDlg
)
{
...
...
@@ -386,11 +386,11 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView*
if
(
bIsFromFile
)
{
// Object selected, activate Draw-Shell
pViewShell
->
SetDrawShell
(
true
);
rViewShell
.
SetDrawShell
(
true
);
}
else
{
pViewShell
->
ActivateObject
(
pObj
,
embed
::
EmbedVerbs
::
MS_OLEVERB_SHOW
);
rViewShell
.
ActivateObject
(
pObj
,
embed
::
EmbedVerbs
::
MS_OLEVERB_SHOW
);
}
}
...
...
@@ -483,7 +483,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawV
const
sal_Int64
nAspect
=
embed
::
Aspects
::
MSOLE_CONTENT
;
uno
::
Reference
<
embed
::
XEmbeddedObject
>
xObj
=
pViewShell
->
GetObjectShell
()
->
GetEmbeddedObjectContainer
().
CreateEmbeddedObject
(
SvGlobalName
(
SO3_SCH_CLASSID_60
).
GetByteSequence
(),
aName
);
rViewShell
.
GetObjectShell
()
->
GetEmbeddedObjectContainer
().
CreateEmbeddedObject
(
SvGlobalName
(
SO3_SCH_CLASSID_60
).
GetByteSequence
(),
aName
);
uno
::
Reference
<
css
::
chart2
::
data
::
XDataReceiver
>
xReceiver
;
uno
::
Reference
<
embed
::
XComponentSupplier
>
xCompSupp
(
xObj
,
uno
::
UNO_QUERY
);
...
...
@@ -621,7 +621,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawV
//the controller will be unlocked by the dialog when the dialog is told to do so
// only activate object if not called via API (e.g. macro)
pViewShell
->
ActivateObject
(
pObj
,
embed
::
EmbedVerbs
::
MS_OLEVERB_SHOW
);
rViewShell
.
ActivateObject
(
pObj
,
embed
::
EmbedVerbs
::
MS_OLEVERB_SHOW
);
//open wizard
//@todo get context from calc if that has one
...
...
@@ -661,7 +661,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawV
if
(
aDialogSize
.
Width
()
>
0
&&
aDialogSize
.
Height
()
>
0
)
{
//calculate and set new position
Point
aDialogPos
=
pViewShell
->
GetChartDialogPos
(
aDialogSize
,
aRect
);
Point
aDialogPos
=
rViewShell
.
GetChartDialogPos
(
aDialogSize
,
aRect
);
xDialogProps
->
setPropertyValue
(
"Position"
,
uno
::
makeAny
(
awt
::
Point
(
aDialogPos
.
getX
(),
aDialogPos
.
getY
())
)
);
}
...
...
@@ -681,9 +681,8 @@ FuInsertChart::FuInsertChart(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawV
if
(
nDialogRet
==
ui
::
dialogs
::
ExecutableDialogResults
::
CANCEL
)
{
// leave OLE inplace mode and unmark
OSL_ASSERT
(
pViewShell
);
OSL_ASSERT
(
pView
);
pViewShell
->
DeactivateOle
();
rViewShell
.
DeactivateOle
();
pView
->
UnmarkAll
();
// old page view pointer is invalid after switching sheets
...
...
@@ -705,7 +704,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawV
bAddUndo
=
false
;
// don't create the undo action for inserting
// leave the draw shell
pViewShell
->
SetDrawShell
(
false
);
rViewShell
.
SetDrawShell
(
false
);
// reset marked cell area
...
...
@@ -742,7 +741,7 @@ FuInsertChartFromFile::FuInsertChartFromFile(ScTabViewShell& rViewSh, vcl::Windo
rURL
,
comphelper
::
getProcessComponentContext
());
comphelper
::
EmbeddedObjectContainer
&
rObjContainer
=
pViewShell
->
GetObjectShell
()
->
GetEmbeddedObjectContainer
();
rViewShell
.
GetObjectShell
()
->
GetEmbeddedObjectContainer
();
OUString
aName
;
uno
::
Reference
<
embed
::
XEmbeddedObject
>
xObj
=
rObjContainer
.
InsertEmbeddedObject
(
xStorage
,
aName
);
...
...
@@ -768,7 +767,7 @@ FuInsertChartFromFile::FuInsertChartFromFile(ScTabViewShell& rViewSh, vcl::Windo
pView
->
UnmarkAllObj
();
pView
->
MarkObj
(
pObj
,
pPV
);
pViewShell
->
ActivateObject
(
pObj
,
embed
::
EmbedVerbs
::
MS_OLEVERB_SHOW
);
rViewShell
.
ActivateObject
(
pObj
,
embed
::
EmbedVerbs
::
MS_OLEVERB_SHOW
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sc/source/ui/drawfunc/fupoor.cxx
Dosyayı görüntüle @
482ac12a
...
...
@@ -33,7 +33,7 @@
FuPoor
::
FuPoor
(
ScTabViewShell
&
rViewSh
,
vcl
::
Window
*
pWin
,
ScDrawView
*
pViewP
,
SdrModel
*
pDoc
,
const
SfxRequest
&
rReq
)
:
pView
(
pViewP
),
pViewShell
(
&
rViewSh
),
rViewShell
(
rViewSh
),
pWindow
(
pWin
),
pDrDoc
(
pDoc
),
aSfxRequest
(
rReq
),
...
...
@@ -89,27 +89,27 @@ void FuPoor::ForceScroll(const Point& aPixPos)
if
(
aPixPos
.
Y
()
<=
0
)
dy
=
-
1
;
if
(
aPixPos
.
Y
()
>=
aSize
.
Height
()
)
dy
=
1
;
ScViewData
&
rViewData
=
pViewShell
->
GetViewData
();
ScViewData
&
rViewData
=
rViewShell
.
GetViewData
();
if
(
rViewData
.
GetDocument
()
->
IsNegativePage
(
rViewData
.
GetTabNo
()
)
)
dx
=
-
dx
;
ScSplitPos
eWhich
=
rViewData
.
GetActivePart
();
if
(
dx
>
0
&&
rViewData
.
GetHSplitMode
()
==
SC_SPLIT_FIX
&&
WhichH
(
eWhich
)
==
SC_SPLIT_LEFT
)
{
pViewShell
->
ActivatePart
(
(
eWhich
==
SC_SPLIT_TOPLEFT
)
?
rViewShell
.
ActivatePart
(
(
eWhich
==
SC_SPLIT_TOPLEFT
)
?
SC_SPLIT_TOPRIGHT
:
SC_SPLIT_BOTTOMRIGHT
);
dx
=
0
;
}
if
(
dy
>
0
&&
rViewData
.
GetVSplitMode
()
==
SC_SPLIT_FIX
&&
WhichV
(
eWhich
)
==
SC_SPLIT_TOP
)
{
pViewShell
->
ActivatePart
(
(
eWhich
==
SC_SPLIT_TOPLEFT
)
?
rViewShell
.
ActivatePart
(
(
eWhich
==
SC_SPLIT_TOPLEFT
)
?
SC_SPLIT_BOTTOMLEFT
:
SC_SPLIT_BOTTOMRIGHT
);
dy
=
0
;
}
if
(
dx
!=
0
||
dy
!=
0
)
{
pViewShell
->
ScrollLines
(
2
*
dx
,
4
*
dy
);
rViewShell
.
ScrollLines
(
2
*
dx
,
4
*
dy
);
aScrollTimer
.
Start
();
}
}
...
...
@@ -185,7 +185,7 @@ IMPL_LINK_NOARG(FuPoor, DragHdl, void*, void)
{
pWindow
->
ReleaseMouse
();
bIsInDragMode
=
true
;
pViewShell
->
GetScDrawView
()
->
BeginDrag
(
pWindow
,
aMDPos
);
rViewShell
.
GetScDrawView
()
->
BeginDrag
(
pWindow
,
aMDPos
);
}
}
...
...
sc/source/ui/drawfunc/fusel.cxx
Dosyayı görüntüle @
482ac12a
...
...
@@ -191,7 +191,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
uno
::
Sequence
<
uno
::
Any
>
aInArgs
;
pObjSh
->
CallXScript
(
pInfo
->
GetMacro
(),
aInArgs
,
aRet
,
aOutArgsIndex
,
aOutArgs
,
true
,
&
aCaller
);
pViewShell
->
FakeButtonUp
(
pViewShell
->
GetViewData
().
GetActivePart
()
);
rViewShell
.
FakeButtonUp
(
rViewShell
.
GetViewData
().
GetActivePart
()
);
return
true
;
// no CaptureMouse etc.
}
}
...
...
@@ -225,13 +225,13 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
if
(
!
sURL
.
isEmpty
()
)
{
ScGlobal
::
OpenURL
(
sURL
,
sTarget
);
pViewShell
->
FakeButtonUp
(
pViewShell
->
GetViewData
().
GetActivePart
()
);
rViewShell
.
FakeButtonUp
(
rViewShell
.
GetViewData
().
GetActivePart
()
);
return
true
;
// no CaptureMouse etc.
}
// Is another object being edited in this view?
// (Editing is ended in MarkListHasChanged - test before UnmarkAll)
SfxInPlaceClient
*
pClient
=
pViewShell
->
GetIPClient
();
SfxInPlaceClient
*
pClient
=
rViewShell
.
GetIPClient
();
bool
bWasOleActive
=
(
pClient
&&
pClient
->
IsObjectInPlaceActive
()
);
// Selection
...
...
@@ -266,12 +266,12 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
bReturn
=
true
;
}
else
// object at the edge
if
(
pViewShell
->
IsDrawSelMode
())
if
(
rViewShell
.
IsDrawSelMode
())
bReturn
=
true
;
}
else
{
if
(
pViewShell
->
IsDrawSelMode
())
if
(
rViewShell
.
IsDrawSelMode
())
{
// select object
...
...
@@ -329,7 +329,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
SetMouseButtonCode
(
rMEvt
.
GetButtons
());
bool
bReturn
=
FuDraw
::
MouseButtonUp
(
rMEvt
);
bool
bOle
=
pViewShell
->
GetViewFrame
()
->
GetFrame
().
IsInPlace
();
bool
bOle
=
rViewShell
.
GetViewFrame
()
->
GetFrame
().
IsInPlace
();
SdrObject
*
pObj
=
nullptr
;
if
(
aDragTimer
.
IsActive
()
)
...
...
@@ -341,7 +341,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
Point
aPnt
(
pWindow
->
PixelToLogic
(
rMEvt
.
GetPosPixel
()
)
);
bool
bCopy
=
false
;
ScViewData
&
rViewData
=
pViewShell
->
GetViewData
();
ScViewData
&
rViewData
=
rViewShell
.
GetViewData
();
ScDocument
*
pDocument
=
rViewData
.
GetDocument
();
SdrPageView
*
pPageView
=
(
pView
?
pView
->
GetSdrPageView
()
:
nullptr
);
SdrPage
*
pPage
=
(
pPageView
?
pPageView
->
GetPage
()
:
nullptr
);
...
...
@@ -428,7 +428,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
}
// maybe consider OLE object
SfxInPlaceClient
*
pIPClient
=
pViewShell
->
GetIPClient
();
SfxInPlaceClient
*
pIPClient
=
rViewShell
.
GetIPClient
();
if
(
pIPClient
)
{
...
...
@@ -466,7 +466,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
{
if
(
static_cast
<
SdrOle2Obj
*>
(
pObj
)
->
GetObjRef
().
is
())
{
pViewShell
->
ActivateObject
(
static_cast
<
SdrOle2Obj
*>
(
pObj
),
0
);
rViewShell
.
ActivateObject
(
static_cast
<
SdrOle2Obj
*>
(
pObj
),
0
);
}
}
}
...
...
@@ -481,11 +481,11 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
bool
bVertical
=
(
pOPO
&&
pOPO
->
IsVertical
()
);
sal_uInt16
nTextSlotId
=
bVertical
?
SID_DRAW_TEXT_VERTICAL
:
SID_DRAW_TEXT
;
pViewShell
->
GetViewData
().
GetDispatcher
().
rViewShell
.
GetViewData
().
GetDispatcher
().
Execute
(
nTextSlotId
,
SfxCallMode
::
SYNCHRON
|
SfxCallMode
::
RECORD
);
// Get the created FuText now and change into EditModus
FuPoor
*
pPoor
=
pViewShell
->
GetViewData
().
GetView
()
->
GetDrawFuncPtr
();
FuPoor
*
pPoor
=
rViewShell
.
GetViewData
().
GetView
()
->
GetDrawFuncPtr
();
if
(
pPoor
&&
pPoor
->
GetSlotID
()
==
nTextSlotId
)
// has no RTTI
{
FuText
*
pText
=
static_cast
<
FuText
*>
(
pPoor
);
...
...
@@ -509,8 +509,8 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
// command handler for context menu follows after MouseButtonUp,
// therefore here the hard IsLeft call
if
(
!
bReturn
&&
rMEvt
.
IsLeft
()
)
if
(
pViewShell
->
IsDrawSelMode
())
pViewShell
->
GetViewData
().
GetDispatcher
().
if
(
rViewShell
.
IsDrawSelMode
())
rViewShell
.
GetViewData
().
GetDispatcher
().
Execute
(
SID_OBJECT_SELECT
,
SfxCallMode
::
SLOT
|
SfxCallMode
::
RECORD
);
if
(
bCopy
&&
pDocument
&&
pPage
)
...
...
sc/source/ui/drawfunc/fusel2.cxx
Dosyayı görüntüle @
482ac12a
...
...
@@ -62,8 +62,8 @@ bool FuSelection::TestDetective( const SdrPageView* pPV, const Point& rPos )
Size
(
pView
->
GetHitTolerancePixel
(),
0
)).
Width
());
if
(
SdrObjectPrimitiveHit
(
*
pObject
,
rPos
,
nHitLog
,
*
pPV
,
nullptr
,
false
))
{
ScViewData
&
rViewData
=
pViewShell
->
GetViewData
();
ScSplitPos
ePos
=
pViewShell
->
FindWindow
(
pWindow
);
ScViewData
&
rViewData
=
rViewShell
.
GetViewData
();
ScSplitPos
ePos
=
rViewShell
.
FindWindow
(
pWindow
);
Point
aLineStart
=
pObject
->
GetPoint
(
0
);
Point
aLineEnd
=
pObject
->
GetPoint
(
1
);
Point
aPixel
=
pWindow
->
LogicToPixel
(
aLineStart
);
...
...
@@ -94,7 +94,7 @@ bool FuSelection::TestDetective( const SdrPageView* pPV, const Point& rPos )
nDifX
=
nEndCol
-
nCurX
;
nDifY
=
nEndRow
-
nCurY
;
}
pViewShell
->
MoveCursorRel
(
nDifX
,
nDifY
,
SC_FOLLOW_JUMP
,
false
);
rViewShell
.
MoveCursorRel
(
nDifX
,
nDifY
,
SC_FOLLOW_JUMP
,
false
);
bFound
=
true
;
}
...
...
@@ -124,7 +124,7 @@ bool FuSelection::IsNoteCaptionClicked( const Point& rPos ) const
SdrPageView
*
pPageView
=
pView
?
pView
->
GetSdrPageView
()
:
nullptr
;
if
(
pPageView
)
{
const
ScViewData
&
rViewData
=
pViewShell
->
GetViewData
();
const
ScViewData
&
rViewData
=
rViewShell
.
GetViewData
();
ScDocument
&
rDoc
=
*
rViewData
.
GetDocument
();
SCTAB
nTab
=
rViewData
.
GetTabNo
();
ScDocShell
*
pDocSh
=
rViewData
.
GetDocShell
();
...
...
sc/source/ui/drawfunc/futext.cxx
Dosyayı görüntüle @
482ac12a
...
...
@@ -201,7 +201,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
if
(
pView
->
SdrBeginTextEdit
(
pObj
,
pPV
,
pWindow
,
true
,
pO
.
release
())
)
{
// subscribe EditEngine-UndoManager
pViewShell
->
SetDrawTextUndo
(
pUndoManager
);
rViewShell
.
SetDrawTextUndo
(
pUndoManager
);
OutlinerView
*
pOLV
=
pView
->
GetTextEditOutlinerView
();
if
(
pOLV
->
MouseButtonDown
(
rMEvt
)
)
...
...
@@ -252,7 +252,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
}
pView
->
SetDragMode
(
SdrDragMode
::
Move
);
SfxBindings
&
rBindings
=
pViewShell
->
GetViewFrame
()
->
GetBindings
();
SfxBindings
&
rBindings
=
rViewShell
.
GetViewFrame
()
->
GetBindings
();
rBindings
.
Invalidate
(
SID_OBJECT_ROTATE
);
rBindings
.
Invalidate
(
SID_OBJECT_MIRROR
);
}
...
...
@@ -287,7 +287,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
{
// Edit notes -> create no new text objects
// and leave text mode
pViewShell
->
GetViewData
().
GetDispatcher
().
rViewShell
.
GetViewData
().
GetDispatcher
().
Execute
(
aSfxRequest
.
GetSlot
(),
SfxCallMode
::
SLOT
|
SfxCallMode
::
RECORD
);
}
else
...
...
@@ -308,7 +308,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
else
if
(
SdrObject
*
pObj
=
pView
->
PickObj
(
aMDPos
,
pView
->
getHitTolLog
(),
pPV
,
SdrSearchOptions
::
ALSOONMASTER
|
SdrSearchOptions
::
BEFOREMARK
))
{
pView
->
UnmarkAllObj
();
ScViewData
&
rViewData
=
pViewShell
->
GetViewData
();
ScViewData
&
rViewData
=
rViewShell
.
GetViewData
();
rViewData
.
GetDispatcher
().
Execute
(
aSfxRequest
.
GetSlot
(),
SfxCallMode
::
SLOT
|
SfxCallMode
::
RECORD
);
pView
->
MarkObj
(
pObj
,
pPV
);
...
...
@@ -324,15 +324,15 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
{
pWindow
->
CaptureMouse
();
// ForcePointer(&rMEvt);
lcl_InvalidateAttribs
(
pViewShell
->
GetViewFrame
()
->
GetBindings
()
);
lcl_InvalidateAttribs
(
rViewShell
.
GetViewFrame
()
->
GetBindings
()
);
}
pViewShell
->
SetActivePointer
(
pView
->
GetPreferredPointer
(
rViewShell
.
SetActivePointer
(
pView
->
GetPreferredPointer
(
pWindow
->
PixelToLogic
(
rMEvt
.
GetPosPixel
()),
pWindow
));
if
(
!
bStraightEnter
)
{
pView
->
UnmarkAll
();
ScViewData
&
rViewData
=
pViewShell
->
GetViewData
();
ScViewData
&
rViewData
=
rViewShell
.
GetViewData
();
rViewData
.
GetDispatcher
().
Execute
(
aSfxRequest
.
GetSlot
(),
SfxCallMode
::
SLOT
|
SfxCallMode
::
RECORD
);
}
...
...
@@ -341,7 +341,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
bool
FuText
::
MouseMove
(
const
MouseEvent
&
rMEvt
)
{
pViewShell
->
SetActivePointer
(
pView
->
GetPreferredPointer
(
rViewShell
.
SetActivePointer
(
pView
->
GetPreferredPointer
(
pWindow
->
PixelToLogic
(
rMEvt
.
GetPosPixel
()),
pWindow
));
if
(
aDragTimer
.
IsActive
()
)
...
...
@@ -383,7 +383,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
aDragTimer
.
Stop
();
}
lcl_InvalidateAttribs
(
pViewShell
->
GetViewFrame
()
->
GetBindings
()
);
lcl_InvalidateAttribs
(
rViewShell
.
GetViewFrame
()
->
GetBindings
()
);
Point
aPnt
(
pWindow
->
PixelToLogic
(
rMEvt
.
GetPosPixel
()
)
);
...
...
@@ -456,7 +456,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
{
pView
->
MarkObj
(
aPnt
,
-
2
,
false
,
rMEvt
.
IsMod1
());
SfxDispatcher
&
rDisp
=
pViewShell
->
GetViewData
().
GetDispatcher
();
SfxDispatcher
&
rDisp
=
rViewShell
.
GetViewData
().
GetDispatcher
();
if
(
pView
->
AreObjectsMarked
()
)
rDisp
.
Execute
(
SID_OBJECT_SELECT
,
SfxCallMode
::
SLOT
|
SfxCallMode
::
RECORD
);
else
...
...
@@ -476,7 +476,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
{
pView
->
MarkObj
(
aPnt
,
-
2
,
false
,
rMEvt
.
IsMod1
());
SfxDispatcher
&
rDisp
=
pViewShell
->
GetViewData
().
GetDispatcher
();
SfxDispatcher
&
rDisp
=
rViewShell
.
GetViewData
().
GetDispatcher
();
if
(
pView
->
AreObjectsMarked
()
)
rDisp
.
Execute
(
SID_OBJECT_SELECT
,
SfxCallMode
::
SLOT
|
SfxCallMode
::
RECORD
);
else
...
...
@@ -490,7 +490,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
// switch mouse-pointer
void
FuText
::
ForcePointer
(
const
MouseEvent
*
/* pMEvt */
)
{
pViewShell
->
SetActivePointer
(
aNewPointer
);
rViewShell
.
SetActivePointer
(
aNewPointer
);
}
// modify keyboard events
...
...
@@ -502,7 +502,7 @@ bool FuText::KeyInput(const KeyEvent& rKEvt)
if
(
pView
->
KeyInput
(
rKEvt
,
pWindow
)
)
{
bReturn
=
true
;
lcl_InvalidateAttribs
(
pViewShell
->
GetViewFrame
()
->
GetBindings
()
);
lcl_InvalidateAttribs
(
rViewShell
.
GetViewFrame
()
->
GetBindings
()
);
}
else
{
...
...
@@ -515,7 +515,7 @@ bool FuText::KeyInput(const KeyEvent& rKEvt)
void
FuText
::
Activate
()
{
pView
->
SetDragMode
(
SdrDragMode
::
Move
);
SfxBindings
&
rBindings
=
pViewShell
->
GetViewFrame
()
->
GetBindings
();
SfxBindings
&
rBindings
=
rViewShell
.
GetViewFrame
()
->
GetBindings
();
rBindings
.
Invalidate
(
SID_OBJECT_ROTATE
);
rBindings
.
Invalidate
(
SID_OBJECT_MIRROR
);
...
...
@@ -534,7 +534,7 @@ void FuText::Activate()
aNewPointer
=
Pointer
(
PointerStyle
::
Text
);
aOldPointer
=
pWindow
->
GetPointer
();
pViewShell
->
SetActivePointer
(
aNewPointer
);
rViewShell
.
SetActivePointer
(
aNewPointer
);
FuConstruct
::
Activate
();
}
...
...
@@ -542,7 +542,7 @@ void FuText::Activate()
void
FuText
::
Deactivate
()
{