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
7f3628e5
Kaydet (Commit)
7f3628e5
authored
Mar 13, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: prefix members of SwSelPaintRects
Change-Id: I527151198635ced3d1be917bc0396f7f062ed868
üst
be500fc6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
59 deletions
+60
-59
viscrs.hxx
sw/inc/viscrs.hxx
+12
-12
init.cxx
sw/source/core/bastyp/init.cxx
+2
-2
viscrs.cxx
sw/source/core/crsr/viscrs.cxx
+46
-45
No files found.
sw/inc/viscrs.hxx
Dosyayı görüntüle @
7f3628e5
...
...
@@ -66,21 +66,21 @@ class SwSelPaintRects : public SwRects
friend
void
_InitCore
();
friend
void
_FinitCore
();
static
long
nPixPtX
,
nPixPtY
;
static
MapMode
*
pMapMode
;
static
long
s_nPixPtX
,
s_
nPixPtY
;
static
MapMode
*
s_
pMapMode
;
const
SwCrsrShell
*
pC
Shell
;
const
SwCrsrShell
*
m_pCursor
Shell
;
#if HAVE_FEATURE_DESKTOP || defined(ANDROID)
sdr
::
overlay
::
OverlayObject
*
mpCursorOverlay
;
sdr
::
overlay
::
OverlayObject
*
m
_
pCursorOverlay
;
// access to mpCursorOverlay for swapContent
sdr
::
overlay
::
OverlayObject
*
getCursorOverlay
()
const
{
return
mpCursorOverlay
;
}
void
setCursorOverlay
(
sdr
::
overlay
::
OverlayObject
*
pNew
)
{
mpCursorOverlay
=
pNew
;
}
// access to m
_
pCursorOverlay for swapContent
sdr
::
overlay
::
OverlayObject
*
getCursorOverlay
()
const
{
return
m
_
pCursorOverlay
;
}
void
setCursorOverlay
(
sdr
::
overlay
::
OverlayObject
*
pNew
)
{
m
_
pCursorOverlay
=
pNew
;
}
#endif
bool
mbShowTxtInputFldOverlay
;
sw
::
overlay
::
OverlayRangesOutline
*
mpTxtInputFldOverlay
;
bool
m
_
bShowTxtInputFldOverlay
;
sw
::
overlay
::
OverlayRangesOutline
*
m
_
pTxtInputFldOverlay
;
void
HighlightInputFld
();
...
...
@@ -93,7 +93,7 @@ public:
virtual
void
FillStartEnd
(
SwRect
&
rStart
,
SwRect
&
rEnd
)
const
=
0
;
// #i75172# in SwCrsrShell::CreateCrsr() the content of SwSelPaintRects is exchanged. To
// make a complete swap access to mpCursorOverlay is needed there
// make a complete swap access to m
_
pCursorOverlay is needed there
void
swapContent
(
SwSelPaintRects
&
rSwap
);
void
Show
();
...
...
@@ -102,10 +102,10 @@ public:
inline
void
SetShowTxtInputFldOverlay
(
const
bool
bShow
)
{
mbShowTxtInputFldOverlay
=
bShow
;
m
_
bShowTxtInputFldOverlay
=
bShow
;
}
const
SwCrsrShell
*
GetShell
()
const
{
return
pC
Shell
;
}
const
SwCrsrShell
*
GetShell
()
const
{
return
m_pCursor
Shell
;
}
// check current MapMode of the shell and set possibly the static members.
// Optional set the parameters pX, pY
static
void
Get1PixelInLogic
(
const
SwViewShell
&
rSh
,
...
...
sw/source/core/bastyp/init.cxx
Dosyayı görüntüle @
7f3628e5
...
...
@@ -734,7 +734,7 @@ void _InitCore()
_FrmInit
();
_TextInit
();
SwSelPaintRects
::
pMapMode
=
new
MapMode
;
SwSelPaintRects
::
s_
pMapMode
=
new
MapMode
;
SwFntObj
::
pPixMap
=
new
MapMode
;
pGlobalOLEExcludeList
=
new
std
::
vector
<
SvGlobalName
*>
;
...
...
@@ -758,7 +758,7 @@ void _FinitCore()
// destroy default TableAutoFormat
delete
SwTableAutoFmt
::
pDfltBoxAutoFmt
;
delete
SwSelPaintRects
::
pMapMode
;
delete
SwSelPaintRects
::
s_
pMapMode
;
delete
SwFntObj
::
pPixMap
;
delete
SwEditShell
::
pAutoFmtFlags
;
...
...
sw/source/core/crsr/viscrs.cxx
Dosyayı görüntüle @
7f3628e5
...
...
@@ -61,9 +61,9 @@
// MapMode. This is done so that on ShowCrsr the same size does not have to be
// expensively determined again and again.
long
SwSelPaintRects
::
nPixPtX
=
0
;
long
SwSelPaintRects
::
nPixPtY
=
0
;
MapMode
*
SwSelPaintRects
::
pMapMode
=
0
;
long
SwSelPaintRects
::
s_
nPixPtX
=
0
;
long
SwSelPaintRects
::
s_
nPixPtY
=
0
;
MapMode
*
SwSelPaintRects
::
s_
pMapMode
=
0
;
// Starting from here: classes / methods for the non-text-cursor
SwVisCrsr
::
SwVisCrsr
(
const
SwCrsrShell
*
pCShell
)
...
...
@@ -204,11 +204,11 @@ void SwVisCrsr::_SetPosAndShow()
SwSelPaintRects
::
SwSelPaintRects
(
const
SwCrsrShell
&
rCSh
)
:
SwRects
()
,
pC
Shell
(
&
rCSh
)
,
m_pCursor
Shell
(
&
rCSh
)
#if HAVE_FEATURE_DESKTOP
,
m
pCursorOverlay
(
0
)
,
m
bShowTxtInputFldOverlay
(
true
)
,
m
pTxtInputFldOverlay
(
NULL
)
,
m
_pCursorOverlay
(
nullptr
)
,
m
_bShowTxtInputFldOverlay
(
true
)
,
m
_pTxtInputFldOverlay
(
nullptr
)
#endif
{
}
...
...
@@ -223,34 +223,34 @@ void SwSelPaintRects::swapContent(SwSelPaintRects& rSwap)
SwRects
::
swap
(
rSwap
);
#if HAVE_FEATURE_DESKTOP
// #i75172# also swap mpCursorOverlay
// #i75172# also swap m
_
pCursorOverlay
sdr
::
overlay
::
OverlayObject
*
pTempOverlay
=
getCursorOverlay
();
setCursorOverlay
(
rSwap
.
getCursorOverlay
());
rSwap
.
setCursorOverlay
(
pTempOverlay
);
const
bool
bTempShowTxtInputFldOverlay
=
mbShowTxtInputFldOverlay
;
m
bShowTxtInputFldOverlay
=
rSwap
.
m
bShowTxtInputFldOverlay
;
rSwap
.
mbShowTxtInputFldOverlay
=
bTempShowTxtInputFldOverlay
;
const
bool
bTempShowTxtInputFldOverlay
=
m
_
bShowTxtInputFldOverlay
;
m
_bShowTxtInputFldOverlay
=
rSwap
.
m_
bShowTxtInputFldOverlay
;
rSwap
.
m
_
bShowTxtInputFldOverlay
=
bTempShowTxtInputFldOverlay
;
sw
::
overlay
::
OverlayRangesOutline
*
pTempTxtInputFldOverlay
=
mpTxtInputFldOverlay
;
m
pTxtInputFldOverlay
=
rSwap
.
m
pTxtInputFldOverlay
;
rSwap
.
mpTxtInputFldOverlay
=
pTempTxtInputFldOverlay
;
sw
::
overlay
::
OverlayRangesOutline
*
pTempTxtInputFldOverlay
=
m
_
pTxtInputFldOverlay
;
m
_pTxtInputFldOverlay
=
rSwap
.
m_
pTxtInputFldOverlay
;
rSwap
.
m
_
pTxtInputFldOverlay
=
pTempTxtInputFldOverlay
;
#endif
}
void
SwSelPaintRects
::
Hide
()
{
#if HAVE_FEATURE_DESKTOP
if
(
m
pCursorOverlay
)
if
(
m_
pCursorOverlay
)
{
delete
mpCursorOverlay
;
m
pCursorOverlay
=
0
;
delete
m
_
pCursorOverlay
;
m
_pCursorOverlay
=
nullptr
;
}
if
(
mpTxtInputFldOverlay
!=
NULL
)
if
(
m_pTxtInputFldOverlay
!=
nullptr
)
{
delete
mpTxtInputFldOverlay
;
m
pTxtInputFldOverlay
=
NULL
;
delete
m
_
pTxtInputFldOverlay
;
m
_pTxtInputFldOverlay
=
nullptr
;
}
#endif
...
...
@@ -283,7 +283,7 @@ void SwShellCrsr::FillStartEnd(SwRect& rStart, SwRect& rEnd) const
void
SwSelPaintRects
::
Show
()
{
SdrView
*
pView
=
(
SdrView
*
)
pCShell
->
GetDrawView
(
);
SdrView
*
const
pView
=
const_cast
<
SdrView
*>
(
m_pCursorShell
->
GetDrawView
()
);
if
(
pView
&&
pView
->
PaintWindowCount
())
{
...
...
@@ -305,16 +305,16 @@ void SwSelPaintRects::Show()
aPntRect
.
Right
()
+
1
,
aPntRect
.
Bottom
()
+
1
));
}
if
(
m
pCursorOverlay
)
if
(
m_
pCursorOverlay
)
{
if
(
!
aNewRanges
.
empty
())
{
static_cast
<
sdr
::
overlay
::
OverlaySelection
*
>
(
m
pCursorOverlay
)
->
setRanges
(
aNewRanges
);
static_cast
<
sdr
::
overlay
::
OverlaySelection
*>
(
m_
pCursorOverlay
)
->
setRanges
(
aNewRanges
);
}
else
{
delete
mpCursorOverlay
;
m
pCursorOverlay
=
0
;
delete
m
_
pCursorOverlay
;
m
_pCursorOverlay
=
nullptr
;
}
}
else
if
(
!
empty
())
...
...
@@ -329,13 +329,13 @@ void SwSelPaintRects::Show()
const
Color
aHighlight
(
aSvtOptionsDrawinglayer
.
getHilightColor
());
// create correct selection
mpCursorOverlay
=
new
sdr
::
overlay
::
OverlaySelection
(
m
_
pCursorOverlay
=
new
sdr
::
overlay
::
OverlaySelection
(
sdr
::
overlay
::
OVERLAY_TRANSPARENT
,
aHighlight
,
aNewRanges
,
true
);
xTargetOverlay
->
add
(
*
mpCursorOverlay
);
xTargetOverlay
->
add
(
*
m
_
pCursorOverlay
);
}
}
...
...
@@ -395,7 +395,7 @@ void SwSelPaintRects::HighlightInputFld()
{
std
::
vector
<
basegfx
::
B2DRange
>
aInputFldRanges
;
if
(
mbShowTxtInputFldOverlay
)
if
(
m_bShowTxtInputFldOverlay
)
{
SwTxtInputFld
*
pCurTxtInputFldAtCrsr
=
dynamic_cast
<
SwTxtInputFld
*>
(
GetShell
()
->
GetTxtFldAtPos
(
GetShell
()
->
GetCrsr
()
->
Start
(),
false
));
...
...
@@ -424,9 +424,9 @@ void SwSelPaintRects::HighlightInputFld()
if
(
aInputFldRanges
.
size
()
>
0
)
{
if
(
mpTxtInputFldOverlay
!=
NULL
)
if
(
m_pTxtInputFldOverlay
!=
nullptr
)
{
mpTxtInputFldOverlay
->
setRanges
(
aInputFldRanges
);
m
_
pTxtInputFldOverlay
->
setRanges
(
aInputFldRanges
);
}
else
{
...
...
@@ -441,17 +441,18 @@ void SwSelPaintRects::HighlightInputFld()
Color
aHighlight
(
aSvtOptionsDrawinglayer
.
getHilightColor
());
aHighlight
.
DecreaseLuminance
(
128
);
mpTxtInputFldOverlay
=
new
sw
::
overlay
::
OverlayRangesOutline
(
aHighlight
,
aInputFldRanges
);
xTargetOverlay
->
add
(
*
mpTxtInputFldOverlay
);
m_pTxtInputFldOverlay
=
new
sw
::
overlay
::
OverlayRangesOutline
(
aHighlight
,
aInputFldRanges
);
xTargetOverlay
->
add
(
*
m_pTxtInputFldOverlay
);
}
}
}
else
{
if
(
mpTxtInputFldOverlay
!=
NULL
)
if
(
m_pTxtInputFldOverlay
!=
nullptr
)
{
delete
mpTxtInputFldOverlay
;
m
pTxtInputFldOverlay
=
NULL
;
delete
m
_
pTxtInputFldOverlay
;
m
_pTxtInputFldOverlay
=
nullptr
;
}
}
}
...
...
@@ -480,9 +481,9 @@ void SwSelPaintRects::Invalidate( const SwRect& rRect )
{
SwRect
&
rRectIt
=
*
it
;
if
(
rRectIt
.
Right
()
==
GetShell
()
->
m_aOldRBPos
.
X
()
)
rRectIt
.
Right
(
rRectIt
.
Right
()
+
nPixPtX
);
rRectIt
.
Right
(
rRectIt
.
Right
()
+
s_
nPixPtX
);
if
(
rRectIt
.
Bottom
()
==
GetShell
()
->
m_aOldRBPos
.
Y
()
)
rRectIt
.
Bottom
(
rRectIt
.
Bottom
()
+
nPixPtY
);
rRectIt
.
Bottom
(
rRectIt
.
Bottom
()
+
s_
nPixPtY
);
}
}
}
...
...
@@ -497,20 +498,20 @@ void SwSelPaintRects::Get1PixelInLogic( const SwViewShell& rSh,
pOut
=
rSh
.
GetOut
();
const
MapMode
&
rMM
=
pOut
->
GetMapMode
();
if
(
pMapMode
->
GetMapUnit
()
!=
rMM
.
GetMapUnit
()
||
pMapMode
->
GetScaleX
()
!=
rMM
.
GetScaleX
()
||
pMapMode
->
GetScaleY
()
!=
rMM
.
GetScaleY
()
)
if
(
s_
pMapMode
->
GetMapUnit
()
!=
rMM
.
GetMapUnit
()
||
s_
pMapMode
->
GetScaleX
()
!=
rMM
.
GetScaleX
()
||
s_pMapMode
->
GetScaleY
()
!=
rMM
.
GetScaleY
()
)
{
*
pMapMode
=
rMM
;
*
s_
pMapMode
=
rMM
;
Size
aTmp
(
1
,
1
);
aTmp
=
pOut
->
PixelToLogic
(
aTmp
);
nPixPtX
=
aTmp
.
Width
();
nPixPtY
=
aTmp
.
Height
();
s_
nPixPtX
=
aTmp
.
Width
();
s_
nPixPtY
=
aTmp
.
Height
();
}
if
(
pX
)
*
pX
=
nPixPtX
;
*
pX
=
s_
nPixPtX
;
if
(
pY
)
*
pY
=
nPixPtY
;
*
pY
=
s_
nPixPtY
;
}
SwShellCrsr
::
SwShellCrsr
(
...
...
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