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
cee1991a
Kaydet (Commit)
cee1991a
authored
Eyl 18, 2015
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: prefix members of SwViewShellImp
Change-Id: I36fb0314f8d946b3aeb9fcf6d4cdc711ca79a84e
üst
9b3495b4
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
141 additions
and
141 deletions
+141
-141
viewimp.hxx
sw/source/core/inc/viewimp.hxx
+36
-36
layact.cxx
sw/source/core/layout/layact.cxx
+5
-5
pagepreviewlayout.cxx
sw/source/core/view/pagepreviewlayout.cxx
+4
-4
vdraw.cxx
sw/source/core/view/vdraw.cxx
+9
-9
viewimp.cxx
sw/source/core/view/viewimp.cxx
+71
-71
viewsh.cxx
sw/source/core/view/viewsh.cxx
+16
-16
No files found.
sw/source/core/inc/viewimp.hxx
Dosyayı görüntüle @
cee1991a
...
...
@@ -61,33 +61,33 @@ class SwViewShellImp
// for paint of page preview
friend
class
SwPagePreviewLayout
;
SwViewShell
*
pSh
;
// If someone passes an Imp, but needs a SwViewShell, we
SwViewShell
*
m_pShell
;
// If someone passes an Imp, but needs a SwViewShell, we
// keep a backlink here
SwDrawView
*
pDrawView
;
// Our DrawView
SdrPageView
*
pSdrPageView
;
// Exactly one Page for our DrawView
SwDrawView
*
m_
pDrawView
;
// Our DrawView
SdrPageView
*
m_
pSdrPageView
;
// Exactly one Page for our DrawView
SwPageFrm
*
pFirstVis
Page
;
// Always points to the first visible Page
SwRegionRects
*
pRegion
;
// Collector of Paintrects from the LayAction
SwPageFrm
*
m_pFirstVisible
Page
;
// Always points to the first visible Page
SwRegionRects
*
m_
pRegion
;
// Collector of Paintrects from the LayAction
SwLayAction
*
pLayAct
;
// Is set if an Action object exists
SwLayAction
*
m_pLayAction
;
// Is set if an Action object exists
// Is registered by the SwLayAction ctor and deregistered by the dtor
SwLayIdle
*
pIdleAct
;
// The same as SwLayAction for SwLayIdle
SwLayIdle
*
m_
pIdleAct
;
// The same as SwLayAction for SwLayIdle
SwAccessibleMap
*
pAcc
Map
;
// Accessible wrappers
SwAccessibleMap
*
m_pAccessible
Map
;
// Accessible wrappers
mutable
const
SdrObject
*
pSdrObj
Cached
;
mutable
OUString
sSdrObj
CachedComment
;
mutable
const
SdrObject
*
m_pSdrObject
Cached
;
mutable
OUString
m_sSdrObject
CachedComment
;
bool
bFirstPageInvalid
:
1
;
// Pointer to the first Page invalid?
bool
bResetHdlHiddenPaint
:
1
;
// Ditto
bool
bSmoothUpdate
:
1
;
// For SmoothScroll
bool
bStopSmooth
:
1
;
bool
m_
bFirstPageInvalid
:
1
;
// Pointer to the first Page invalid?
bool
m_
bResetHdlHiddenPaint
:
1
;
// Ditto
bool
m_
bSmoothUpdate
:
1
;
// For SmoothScroll
bool
m_
bStopSmooth
:
1
;
sal_uInt16
nRestoreActions
;
// Count for the Action that need to be restored (UNO)
SwRect
aSmoothRect
;
sal_uInt16
m_
nRestoreActions
;
// Count for the Action that need to be restored (UNO)
SwRect
m_
aSmoothRect
;
SwPagePreviewLayout
*
m
pPg
PreviewLayout
;
SwPagePreviewLayout
*
m
_pPage
PreviewLayout
;
void
SetFirstVisPage
(
OutputDevice
*
pRenderContext
);
// Recalculate the first visible Page
...
...
@@ -140,26 +140,26 @@ public:
~
SwViewShellImp
();
void
Init
(
const
SwViewOption
*
);
/// Only for SwViewShell::Init()
const
SwViewShell
*
GetShell
()
const
{
return
pSh
;
}
SwViewShell
*
GetShell
()
{
return
pSh
;
}
const
SwViewShell
*
GetShell
()
const
{
return
m_pShell
;
}
SwViewShell
*
GetShell
()
{
return
m_pShell
;
}
Color
GetRetoucheColor
()
const
;
/// Management of the first visible Page
const
SwPageFrm
*
GetFirstVisPage
(
OutputDevice
*
pRenderContext
)
const
;
SwPageFrm
*
GetFirstVisPage
(
OutputDevice
*
pRenderContext
);
void
SetFirstVisPageInvalid
()
{
bFirstPageInvalid
=
true
;
}
void
SetFirstVisPageInvalid
()
{
m_
bFirstPageInvalid
=
true
;
}
bool
AddPaintRect
(
const
SwRect
&
rRect
);
SwRegionRects
*
GetRegion
()
{
return
pRegion
;
}
SwRegionRects
*
GetRegion
()
{
return
m_
pRegion
;
}
void
DelRegion
();
/// New Interface for StarView Drawing
bool
HasDrawView
()
const
{
return
0
!=
pDrawView
;
}
SwDrawView
*
GetDrawView
()
{
return
pDrawView
;
}
const
SwDrawView
*
GetDrawView
()
const
{
return
pDrawView
;
}
SdrPageView
*
GetPageView
()
{
return
pSdrPageView
;
}
const
SdrPageView
*
GetPageView
()
const
{
return
pSdrPageView
;
}
bool
HasDrawView
()
const
{
return
0
!=
m_
pDrawView
;
}
SwDrawView
*
GetDrawView
()
{
return
m_
pDrawView
;
}
const
SwDrawView
*
GetDrawView
()
const
{
return
m_
pDrawView
;
}
SdrPageView
*
GetPageView
()
{
return
m_
pSdrPageView
;
}
const
SdrPageView
*
GetPageView
()
const
{
return
m_
pSdrPageView
;
}
void
MakeDrawView
();
/**
...
...
@@ -187,10 +187,10 @@ public:
void
NotifySizeChg
(
const
Size
&
rNewSz
);
/// SS for the Lay-/IdleAction and relatives
bool
IsAction
()
const
{
return
pLayAct
!=
0
;
}
bool
IsIdleAction
()
const
{
return
pIdleAct
!=
0
;
}
SwLayAction
&
GetLayAction
()
{
return
*
pLayAct
;
}
const
SwLayAction
&
GetLayAction
()
const
{
return
*
pLayAct
;
}
bool
IsAction
()
const
{
return
m_pLayAction
!=
0
;
}
bool
IsIdleAction
()
const
{
return
m_
pIdleAct
!=
0
;
}
SwLayAction
&
GetLayAction
()
{
return
*
m_pLayAction
;
}
const
SwLayAction
&
GetLayAction
()
const
{
return
*
m_pLayAction
;
}
/**
* If an Action is running we ask it to check whether it's time
...
...
@@ -208,18 +208,18 @@ public:
*/
bool
IsUpdateExpFields
();
void
SetRestoreActions
(
sal_uInt16
nSet
){
nRestoreActions
=
nSet
;}
sal_uInt16
GetRestoreActions
()
const
{
return
nRestoreActions
;}
void
SetRestoreActions
(
sal_uInt16
nSet
){
m_
nRestoreActions
=
nSet
;}
sal_uInt16
GetRestoreActions
()
const
{
return
m_
nRestoreActions
;}
void
InitPagePreviewLayout
();
inline
SwPagePreviewLayout
*
PagePreviewLayout
()
{
return
m
pPg
PreviewLayout
;
return
m
_pPage
PreviewLayout
;
}
/// Is this view accessible?
bool
IsAccessible
()
const
{
return
pAcc
Map
!=
0
;
}
bool
IsAccessible
()
const
{
return
m_pAccessible
Map
!=
0
;
}
inline
SwAccessibleMap
&
GetAccessibleMap
();
...
...
@@ -272,10 +272,10 @@ public:
inline
SwAccessibleMap
&
SwViewShellImp
::
GetAccessibleMap
()
{
if
(
!
pAcc
Map
)
if
(
!
m_pAccessible
Map
)
CreateAccessibleMap
();
return
*
pAcc
Map
;
return
*
m_pAccessible
Map
;
}
inline
void
SwViewShellImp
::
DisposeAccessibleFrm
(
const
SwFrm
*
pFrm
,
...
...
sw/source/core/layout/layact.cxx
Dosyayı görüntüle @
cee1991a
...
...
@@ -276,14 +276,14 @@ SwLayAction::SwLayAction( SwRootFrm *pRt, SwViewShellImp *pI ) :
// OD 14.04.2003 #106346# - init new flag <mbFormatContentOnInterrupt>.
mbFormatContentOnInterrupt
=
false
;
assert
(
!
pImp
->
pLayAct
);
// there can be only one SwLayAction
pImp
->
pLayAct
=
this
;
// register there
assert
(
!
pImp
->
m_pLayAction
);
// there can be only one SwLayAction
pImp
->
m_pLayAction
=
this
;
// register there
}
SwLayAction
::~
SwLayAction
()
{
OSL_ENSURE
(
!
pWait
,
"Wait object not destroyed"
);
pImp
->
pLayAct
=
0
;
// unregister
pImp
->
m_pLayAction
=
0
;
// unregister
}
void
SwLayAction
::
Reset
()
...
...
@@ -2118,7 +2118,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) :
{
SAL_INFO
(
"sw.idle"
,
"SwLayIdle() entry"
);
pImp
->
pIdleAct
=
this
;
pImp
->
m_
pIdleAct
=
this
;
SHOW_IDLE
(
COL_LIGHTRED
);
...
...
@@ -2306,7 +2306,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) :
SwLayIdle
::~
SwLayIdle
()
{
pImp
->
pIdleAct
=
0
;
pImp
->
m_
pIdleAct
=
0
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sw/source/core/view/pagepreviewlayout.cxx
Dosyayı görüntüle @
cee1991a
...
...
@@ -1048,8 +1048,8 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const Rectan
// prepare paint
if
(
maPreviewPages
.
size
()
>
0
)
{
mrParentViewShell
.
Imp
()
->
bFirstPageInvalid
=
false
;
mrParentViewShell
.
Imp
()
->
pFirstVis
Page
=
mrParentViewShell
.
Imp
()
->
m_
bFirstPageInvalid
=
false
;
mrParentViewShell
.
Imp
()
->
m_pFirstVisible
Page
=
const_cast
<
SwPageFrm
*>
(
maPreviewPages
[
0
]
->
pPage
);
}
...
...
@@ -1197,8 +1197,8 @@ void SwPagePreviewLayout::Repaint( const Rectangle& rInvalidCoreRect ) const
// prepare paint
if
(
maPreviewPages
.
size
()
>
0
)
{
mrParentViewShell
.
Imp
()
->
bFirstPageInvalid
=
false
;
mrParentViewShell
.
Imp
()
->
pFirstVis
Page
=
mrParentViewShell
.
Imp
()
->
m_
bFirstPageInvalid
=
false
;
mrParentViewShell
.
Imp
()
->
m_pFirstVisible
Page
=
const_cast
<
SwPageFrm
*>
(
maPreviewPages
[
0
]
->
pPage
);
}
...
...
sw/source/core/view/vdraw.cxx
Dosyayı görüntüle @
cee1991a
...
...
@@ -48,8 +48,8 @@ void SwViewShellImp::StartAction()
if
(
HasDrawView
()
)
{
SET_CURR_SHELL
(
GetShell
()
);
if
(
pSh
->
ISA
(
SwFEShell
)
)
static_cast
<
SwFEShell
*>
(
pSh
)
->
HideChainMarker
();
// might have changed
if
(
m_pShell
->
ISA
(
SwFEShell
)
)
static_cast
<
SwFEShell
*>
(
m_pShell
)
->
HideChainMarker
();
// might have changed
}
}
...
...
@@ -58,8 +58,8 @@ void SwViewShellImp::EndAction()
if
(
HasDrawView
()
)
{
SET_CURR_SHELL
(
GetShell
()
);
if
(
pSh
->
ISA
(
SwFEShell
)
)
static_cast
<
SwFEShell
*>
(
pSh
)
->
SetChainMarker
();
// might have changed
if
(
m_pShell
->
ISA
(
SwFEShell
)
)
static_cast
<
SwFEShell
*>
(
m_pShell
)
->
SetChainMarker
();
// might have changed
}
}
...
...
@@ -67,18 +67,18 @@ void SwViewShellImp::LockPaint()
{
if
(
HasDrawView
()
)
{
bResetHdlHiddenPaint
=
!
GetDrawView
()
->
areMarkHandlesHidden
();
m_
bResetHdlHiddenPaint
=
!
GetDrawView
()
->
areMarkHandlesHidden
();
GetDrawView
()
->
hideMarkHandles
();
}
else
{
bResetHdlHiddenPaint
=
false
;
m_
bResetHdlHiddenPaint
=
false
;
}
}
void
SwViewShellImp
::
UnlockPaint
()
{
if
(
bResetHdlHiddenPaint
)
if
(
m_
bResetHdlHiddenPaint
)
GetDrawView
()
->
showMarkHandles
();
}
...
...
@@ -204,8 +204,8 @@ void SwViewShellImp::NotifySizeChg( const Size &rNewSz )
if
(
!
bCheckDrawObjs
)
return
;
OSL_ENSURE
(
pSh
->
getIDocumentDrawModelAccess
().
GetDrawModel
(),
"NotifySizeChg without DrawModel"
);
SdrPage
*
pPage
=
pSh
->
getIDocumentDrawModelAccess
().
GetDrawModel
()
->
GetPage
(
0
);
OSL_ENSURE
(
m_pShell
->
getIDocumentDrawModelAccess
().
GetDrawModel
(),
"NotifySizeChg without DrawModel"
);
SdrPage
*
pPage
=
m_pShell
->
getIDocumentDrawModelAccess
().
GetDrawModel
()
->
GetPage
(
0
);
const
size_t
nObjs
=
pPage
->
GetObjCount
();
for
(
size_t
nObj
=
0
;
nObj
<
nObjs
;
++
nObj
)
{
...
...
sw/source/core/view/viewimp.cxx
Dosyayı görüntüle @
cee1991a
...
...
@@ -43,106 +43,106 @@
void
SwViewShellImp
::
Init
(
const
SwViewOption
*
pNewOpt
)
{
OSL_ENSURE
(
pDrawView
,
"SwViewShellImp::Init without DrawView"
);
OSL_ENSURE
(
m_
pDrawView
,
"SwViewShellImp::Init without DrawView"
);
//Create PageView if it doesn't exist
SwRootFrm
*
pRoot
=
pSh
->
GetLayout
();
if
(
!
pSdrPageView
)
SwRootFrm
*
pRoot
=
m_pShell
->
GetLayout
();
if
(
!
m_
pSdrPageView
)
{
IDocumentDrawModelAccess
&
rIDDMA
=
pSh
->
getIDocumentDrawModelAccess
();
IDocumentDrawModelAccess
&
rIDDMA
=
m_pShell
->
getIDocumentDrawModelAccess
();
if
(
!
pRoot
->
GetDrawPage
()
)
pRoot
->
SetDrawPage
(
rIDDMA
.
GetDrawModel
()
->
GetPage
(
0
)
);
if
(
pRoot
->
GetDrawPage
()
->
GetSize
()
!=
pRoot
->
Frm
().
SSize
()
)
pRoot
->
GetDrawPage
()
->
SetSize
(
pRoot
->
Frm
().
SSize
()
);
pSdrPageView
=
pDrawView
->
ShowSdrPage
(
pRoot
->
GetDrawPage
());
m_pSdrPageView
=
m_
pDrawView
->
ShowSdrPage
(
pRoot
->
GetDrawPage
());
// OD 26.06.2003 #108784# - notify drawing page view about invisible
// layers.
rIDDMA
.
NotifyInvisibleLayers
(
*
pSdrPageView
);
rIDDMA
.
NotifyInvisibleLayers
(
*
m_
pSdrPageView
);
}
pDrawView
->
SetDragStripes
(
pNewOpt
->
IsCrossHair
()
);
pDrawView
->
SetGridSnap
(
pNewOpt
->
IsSnap
()
);
pDrawView
->
SetGridVisible
(
pNewOpt
->
IsGridVisible
()
);
m_
pDrawView
->
SetDragStripes
(
pNewOpt
->
IsCrossHair
()
);
m_
pDrawView
->
SetGridSnap
(
pNewOpt
->
IsSnap
()
);
m_
pDrawView
->
SetGridVisible
(
pNewOpt
->
IsGridVisible
()
);
const
Size
&
rSz
=
pNewOpt
->
GetSnapSize
();
pDrawView
->
SetGridCoarse
(
rSz
);
m_
pDrawView
->
SetGridCoarse
(
rSz
);
const
Size
aFSize
(
rSz
.
Width
()
?
rSz
.
Width
()
/
std
::
max
(
short
(
1
),
pNewOpt
->
GetDivisionX
())
:
0
,
rSz
.
Height
()
?
rSz
.
Height
()
/
std
::
max
(
short
(
1
),
pNewOpt
->
GetDivisionY
())
:
0
);
pDrawView
->
SetGridFine
(
aFSize
);
m_
pDrawView
->
SetGridFine
(
aFSize
);
Fraction
aSnGrWdtX
(
rSz
.
Width
(),
pNewOpt
->
GetDivisionX
()
+
1
);
Fraction
aSnGrWdtY
(
rSz
.
Height
(),
pNewOpt
->
GetDivisionY
()
+
1
);
pDrawView
->
SetSnapGridWidth
(
aSnGrWdtX
,
aSnGrWdtY
);
m_
pDrawView
->
SetSnapGridWidth
(
aSnGrWdtX
,
aSnGrWdtY
);
if
(
pRoot
->
Frm
().
HasArea
()
)
pDrawView
->
SetWorkArea
(
pRoot
->
Frm
().
SVRect
()
);
m_
pDrawView
->
SetWorkArea
(
pRoot
->
Frm
().
SVRect
()
);
if
(
GetShell
()
->
IsPreview
()
)
pDrawView
->
SetAnimationEnabled
(
false
);
m_
pDrawView
->
SetAnimationEnabled
(
false
);
pDrawView
->
SetUseIncompatiblePathCreateInterface
(
false
);
m_
pDrawView
->
SetUseIncompatiblePathCreateInterface
(
false
);
// set handle size to 9 pixels, always
pDrawView
->
SetMarkHdlSizePixel
(
9
);
m_
pDrawView
->
SetMarkHdlSizePixel
(
9
);
}
/// CTor for the core internals
SwViewShellImp
::
SwViewShellImp
(
SwViewShell
*
pParent
)
:
pSh
(
pParent
),
pDrawView
(
0
),
pSdrPageView
(
0
),
pFirstVis
Page
(
0
),
pRegion
(
0
),
pLayAct
(
0
),
pIdleAct
(
0
),
pAcc
Map
(
0
),
pSdrObj
Cached
(
NULL
),
bFirstPageInvalid
(
true
),
bResetHdlHiddenPaint
(
false
),
bSmoothUpdate
(
false
),
bStopSmooth
(
false
),
nRestoreActions
(
0
),
m_pShell
(
pParent
),
m_
pDrawView
(
0
),
m_
pSdrPageView
(
0
),
m_pFirstVisible
Page
(
0
),
m_
pRegion
(
0
),
m_pLayAction
(
0
),
m_
pIdleAct
(
0
),
m_pAccessible
Map
(
0
),
m_pSdrObject
Cached
(
NULL
),
m_
bFirstPageInvalid
(
true
),
m_
bResetHdlHiddenPaint
(
false
),
m_
bSmoothUpdate
(
false
),
m_
bStopSmooth
(
false
),
m_
nRestoreActions
(
0
),
// OD 12.12.2002 #103492#
m
pPg
PreviewLayout
(
0
)
m
_pPage
PreviewLayout
(
0
)
{
}
SwViewShellImp
::~
SwViewShellImp
()
{
delete
pAcc
Map
;
delete
m_pAccessible
Map
;
// OD 12.12.2002 #103492#
delete
m
pPg
PreviewLayout
;
delete
m
_pPage
PreviewLayout
;
//JP 29.03.96: after ShowSdrPage HideSdrPage must also be executed!!!
if
(
pDrawView
)
pDrawView
->
HideSdrPage
();
if
(
m_
pDrawView
)
m_
pDrawView
->
HideSdrPage
();
delete
pDrawView
;
delete
m_
pDrawView
;
DelRegion
();
OSL_ENSURE
(
!
pLayAct
,
"Have action for the rest of your life."
);
OSL_ENSURE
(
!
pIdleAct
,
"Be idle for the rest of your life."
);
OSL_ENSURE
(
!
m_pLayAction
,
"Have action for the rest of your life."
);
OSL_ENSURE
(
!
m_
pIdleAct
,
"Be idle for the rest of your life."
);
}
void
SwViewShellImp
::
DelRegion
()
{
DELETEZ
(
pRegion
);
DELETEZ
(
m_
pRegion
);
}
bool
SwViewShellImp
::
AddPaintRect
(
const
SwRect
&
rRect
)
{
// In case of tiled rendering the visual area is the last painted tile -> not interesting.
if
(
rRect
.
IsOver
(
pSh
->
VisArea
()
)
||
pSh
->
isTiledRendering
()
)
if
(
rRect
.
IsOver
(
m_pShell
->
VisArea
()
)
||
m_pShell
->
isTiledRendering
()
)
{
if
(
!
pRegion
)
if
(
!
m_
pRegion
)
{
// In case of normal rendering, this makes sure only visible rectangles are painted.
// Otherwise get the rectangle of the full document, so all paint rectangles are invalidated.
const
SwRect
&
rArea
=
pSh
->
isTiledRendering
()
?
pSh
->
GetLayout
()
->
Frm
()
:
pSh
->
VisArea
();
pRegion
=
new
SwRegionRects
(
rArea
);
const
SwRect
&
rArea
=
m_pShell
->
isTiledRendering
()
?
m_pShell
->
GetLayout
()
->
Frm
()
:
m_pShell
->
VisArea
();
m_
pRegion
=
new
SwRegionRects
(
rArea
);
}
(
*
pRegion
)
-=
rRect
;
(
*
m_
pRegion
)
-=
rRect
;
return
true
;
}
return
false
;
...
...
@@ -150,20 +150,20 @@ bool SwViewShellImp::AddPaintRect( const SwRect &rRect )
void
SwViewShellImp
::
CheckWaitCrsr
()
{
if
(
pLayAct
)
pLayAct
->
CheckWaitCrsr
();
if
(
m_pLayAction
)
m_pLayAction
->
CheckWaitCrsr
();
}
bool
SwViewShellImp
::
IsCalcLayoutProgress
()
const
{
return
pLayAct
&&
pLayAct
->
IsCalcLayout
();
return
m_pLayAction
&&
m_pLayAction
->
IsCalcLayout
();
}
bool
SwViewShellImp
::
IsUpdateExpFields
()
{
if
(
pLayAct
&&
pLayAct
->
IsCalcLayout
()
)
if
(
m_pLayAction
&&
m_pLayAction
->
IsCalcLayout
()
)
{
pLayAct
->
SetUpdateExpFields
();
m_pLayAction
->
SetUpdateExpFields
();
return
true
;
}
return
false
;
...
...
@@ -171,23 +171,23 @@ bool SwViewShellImp::IsUpdateExpFields()
void
SwViewShellImp
::
SetFirstVisPage
(
OutputDevice
*
pRenderContext
)
{
if
(
pSh
->
mbDocSizeChgd
&&
pSh
->
VisArea
().
Top
()
>
pSh
->
GetLayout
()
->
Frm
().
Height
()
)
if
(
m_pShell
->
mbDocSizeChgd
&&
m_pShell
->
VisArea
().
Top
()
>
m_pShell
->
GetLayout
()
->
Frm
().
Height
()
)
{
//We are in an action and because of erase actions the VisArea is
//after the first visible page.
//To avoid excessive formatting, hand back the last page.
pFirstVisPage
=
static_cast
<
SwPageFrm
*>
(
pSh
->
GetLayout
()
->
Lower
());
while
(
pFirstVisPage
&&
pFirstVis
Page
->
GetNext
()
)
pFirstVisPage
=
static_cast
<
SwPageFrm
*>
(
pFirstVis
Page
->
GetNext
());
m_pFirstVisiblePage
=
static_cast
<
SwPageFrm
*>
(
m_pShell
->
GetLayout
()
->
Lower
());
while
(
m_pFirstVisiblePage
&&
m_pFirstVisible
Page
->
GetNext
()
)
m_pFirstVisiblePage
=
static_cast
<
SwPageFrm
*>
(
m_pFirstVisible
Page
->
GetNext
());
}
else
{
const
SwViewOption
*
pSwViewOption
=
GetShell
()
->
GetViewOptions
();
const
bool
bBookMode
=
pSwViewOption
->
IsViewLayoutBookMode
();
SwPageFrm
*
pPage
=
static_cast
<
SwPageFrm
*>
(
pSh
->
GetLayout
()
->
Lower
());
SwPageFrm
*
pPage
=
static_cast
<
SwPageFrm
*>
(
m_pShell
->
GetLayout
()
->
Lower
());
SwRect
aPageRect
=
pPage
->
GetBoundRect
(
pRenderContext
);
while
(
pPage
&&
!
aPageRect
.
IsOver
(
pSh
->
VisArea
()
)
)
while
(
pPage
&&
!
aPageRect
.
IsOver
(
m_pShell
->
VisArea
()
)
)
{
pPage
=
static_cast
<
SwPageFrm
*>
(
pPage
->
GetNext
());
if
(
pPage
)
...
...
@@ -200,9 +200,9 @@ void SwViewShellImp::SetFirstVisPage(OutputDevice* pRenderContext)
}
}
}
pFirstVisPage
=
pPage
?
pPage
:
static_cast
<
SwPageFrm
*>
(
pSh
->
GetLayout
()
->
Lower
());
m_pFirstVisiblePage
=
pPage
?
pPage
:
static_cast
<
SwPageFrm
*>
(
m_pShell
->
GetLayout
()
->
Lower
());
}
bFirstPageInvalid
=
false
;
m_
bFirstPageInvalid
=
false
;
}
void
SwViewShellImp
::
MakeDrawView
()
...
...
@@ -217,7 +217,7 @@ void SwViewShellImp::MakeDrawView()
}
else
{
if
(
!
pDrawView
)
if
(
!
m_
pDrawView
)
{
// #i72809#
// Discussed with FME, he also thinks that the getPrinter is old and not correct. When i got
...
...
@@ -232,7 +232,7 @@ void SwViewShellImp::MakeDrawView()
pOutDevForDrawView
=
GetShell
()
->
GetOut
();
}
pDrawView
=
new
SwDrawView
(
*
this
,
rIDDMA
.
GetDrawModel
(),
pOutDevForDrawView
);
m_
pDrawView
=
new
SwDrawView
(
*
this
,
rIDDMA
.
GetDrawModel
(),
pOutDevForDrawView
);
}
GetDrawView
()
->
SetActiveLayer
(
"Heaven"
);
...
...
@@ -241,11 +241,11 @@ void SwViewShellImp::MakeDrawView()
// #i68597# If document is read-only, we will not profit from overlay,
// so switch it off.
if
(
pDrawView
->
IsBufferedOverlayAllowed
())
if
(
m_
pDrawView
->
IsBufferedOverlayAllowed
())
{
if
(
pSwViewOption
->
IsReadonly
())
{
pDrawView
->
SetBufferedOverlayAllowed
(
false
);
m_
pDrawView
->
SetBufferedOverlayAllowed
(
false
);
}
}
}
...
...
@@ -271,24 +271,24 @@ Color SwViewShellImp::GetRetoucheColor() const
SwPageFrm
*
SwViewShellImp
::
GetFirstVisPage
(
OutputDevice
*
pRenderContext
)
{
if
(
bFirstPageInvalid
)
if
(
m_
bFirstPageInvalid
)
SetFirstVisPage
(
pRenderContext
);
return
pFirstVis
Page
;
return
m_pFirstVisible
Page
;
}
const
SwPageFrm
*
SwViewShellImp
::
GetFirstVisPage
(
OutputDevice
*
pRenderContext
)
const
{
if
(
bFirstPageInvalid
)
if
(
m_
bFirstPageInvalid
)
const_cast
<
SwViewShellImp
*>
(
this
)
->
SetFirstVisPage
(
pRenderContext
);
return
pFirstVis
Page
;
return
m_pFirstVisible
Page
;
}
// create page preview layout
void
SwViewShellImp
::
InitPagePreviewLayout
()
{
OSL_ENSURE
(
pSh
->
GetLayout
(),
"no layout - page preview layout can not be created."
);
if
(
pSh
->
GetLayout
()
)
m
pPgPreviewLayout
=
new
SwPagePreviewLayout
(
*
pSh
,
*
(
pSh
->
GetLayout
())
);
OSL_ENSURE
(
m_pShell
->
GetLayout
(),
"no layout - page preview layout can not be created."
);
if
(
m_pShell
->
GetLayout
()
)
m
_pPagePreviewLayout
=
new
SwPagePreviewLayout
(
*
m_pShell
,
*
(
m_pShell
->
GetLayout
())
);
}
void
SwViewShellImp
::
UpdateAccessible
()
...
...
@@ -442,9 +442,9 @@ void SwViewShellImp::InvalidateAccessiblePreviewSelection( sal_uInt16 nSelPage )
SwAccessibleMap
*
SwViewShellImp
::
CreateAccessibleMap
()
{
OSL_ENSURE
(
!
pAcc
Map
,
"accessible map exists"
);
pAcc
Map
=
new
SwAccessibleMap
(
GetShell
()
);
return
pAcc
Map
;
OSL_ENSURE
(
!
m_pAccessible
Map
,
"accessible map exists"
);
m_pAccessible
Map
=
new
SwAccessibleMap
(
GetShell
()
);
return
m_pAccessible
Map
;
}
void
SwViewShellImp
::
FireAccessibleEvents
()
...
...
sw/source/core/view/viewsh.cxx
Dosyayı görüntüle @
cee1991a
...
...
@@ -331,7 +331,7 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
{
SwRootFrm
*
pCurrentLayout
=
GetLayout
();
Imp
()
->
pRegion
=
NULL
;
Imp
()
->
m_
pRegion
=
NULL
;
//First Invert then Compress, never the other way round!
pRegion
->
Invert
();
...
...
@@ -1237,7 +1237,7 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect
if
(
bSmoothScrollAllowed
)
{
Imp
()
->
bStopSmooth
=
false
;
Imp
()
->
m_
bStopSmooth
=
false
;
const
SwRect
aOldVis
(
VisArea
()
);
...
...
@@ -1333,7 +1333,7 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect
while
(
lDiff
)
{
long
lScroll
;
if
(
Imp
()
->
bStopSmooth
||
std
::
abs
(
lDiff
)
<=
std
::
abs
(
lMaDelta
)
)
if
(
Imp
()
->
m_
bStopSmooth
||
std
::
abs
(
lDiff
)
<=
std
::
abs
(
lMaDelta
)
)
{
lScroll
=
lDiff
;
lDiff
=
0
;
...
...
@@ -1367,28 +1367,28 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect
Imp
()
->
GetDrawView
()
->
VisAreaChanged
(
GetWin
()
);
SetFirstVisPageInvalid
();
if
(
!
Imp
()
->
bStopSmooth
)
if
(
!
Imp
()
->
m_
bStopSmooth
)
{
const
bool
bScrollDirectionIsUp
(
lScroll
>
0
);
Imp
()
->
aSmoothRect
=
VisArea
();
Imp
()
->
m_
aSmoothRect
=
VisArea
();
if
(
bScrollDirectionIsUp
)
{
Imp
()
->
aSmoothRect
.
Bottom
(
VisArea
().
Top
()
+
lScroll
+
aPixSz
.
Height
());
Imp
()
->
m_
aSmoothRect
.
Bottom
(
VisArea
().
Top
()
+
lScroll
+
aPixSz
.
Height
());
}
else
{
Imp
()
->
aSmoothRect
.
Top
(
VisArea
().
Bottom
()
+
lScroll
-
aPixSz
.
Height
());
Imp
()
->
m_
aSmoothRect
.
Top
(
VisArea
().
Bottom
()
+
lScroll
-
aPixSz
.
Height
());
}
Imp
()
->
bSmoothUpdate
=
true
;
Imp
()
->
m_
bSmoothUpdate
=
true
;
GetWin
()
->
Update
();
Imp
()
->
bSmoothUpdate
=
false
;
Imp
()
->
m_
bSmoothUpdate
=
false
;
if
(
!
Imp
()
->
bStopSmooth
)
if
(
!
Imp
()
->
m_
bStopSmooth
)
{
// start paint on logic base
const
Rectangle
aTargetLogic
(
Imp
()
->
aSmoothRect
.
SVRect
());
const
Rectangle
aTargetLogic
(
Imp
()
->
m_
aSmoothRect
.
SVRect
());
DLPrePaint2
(
vcl
::
Region
(
aTargetLogic
));
// get target rectangle in discrete pixels
...
...
@@ -1422,7 +1422,7 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect
}
pVout
.
disposeAndClear
();
GetWin
()
->
Update
();
if
(
!
Imp
()
->
bStopSmooth
)
if
(
!
Imp
()
->
m_
bStopSmooth
)
--
mnLockPaint
;
SetFirstVisPageInvalid
();
return
true
;
...
...
@@ -1720,14 +1720,14 @@ void SwViewShell::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRe
RenderContextGuard
aGuard
(
mpOut
,
&
rRenderContext
,
this
);
if
(
mnLockPaint
)
{
if
(
Imp
()
->
bSmoothUpdate
)
if
(
Imp
()
->
m_
bSmoothUpdate
)
{
SwRect
aTmp
(
rRect
);
if
(
!
Imp
()
->
aSmoothRect
.
IsInside
(
aTmp
)
)
Imp
()
->
bStopSmooth
=
true
;
if
(
!
Imp
()
->
m_
aSmoothRect
.
IsInside
(
aTmp
)
)
Imp
()
->
m_
bStopSmooth
=
true
;
else
{
Imp
()
->
aSmoothRect
=
aTmp
;
Imp
()
->
m_
aSmoothRect
=
aTmp
;
return
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment