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
fbea89b6
Kaydet (Commit)
fbea89b6
authored
Mar 03, 2016
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
refactor these two bizarro positioning things into reusable chunks
Change-Id: I3f89aca650d31658ce17b3b1496a7babba23bdc6
üst
509bc5e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
21 deletions
+35
-21
floatwin.hxx
include/vcl/floatwin.hxx
+2
-0
floatwin.cxx
vcl/source/window/floatwin.cxx
+33
-21
No files found.
include/vcl/floatwin.hxx
Dosyayı görüntüle @
fbea89b6
...
...
@@ -129,6 +129,8 @@ public:
SAL_DLLPRIVATE
static
Point
ImplCalcPos
(
vcl
::
Window
*
pWindow
,
const
Rectangle
&
rRect
,
FloatWinPopupFlags
nFlags
,
sal_uInt16
&
rArrangeIndex
);
SAL_DLLPRIVATE
static
Point
ImplConvertToAbsPos
(
vcl
::
Window
*
pReference
,
const
Point
&
rPos
);
SAL_DLLPRIVATE
static
Rectangle
ImplConvertToAbsPos
(
vcl
::
Window
*
pReference
,
const
Rectangle
&
rRect
);
SAL_DLLPRIVATE
void
ImplEndPopupMode
(
FloatWinPopupEndFlags
nFlags
=
FloatWinPopupEndFlags
::
NONE
,
VclPtr
<
vcl
::
Window
>
xFocusId
=
nullptr
);
SAL_DLLPRIVATE
Rectangle
&
ImplGetItemEdgeClipRect
();
SAL_DLLPRIVATE
bool
ImplIsInPrivatePopupMode
()
const
{
return
mbInPopupMode
;
}
...
...
vcl/source/window/floatwin.cxx
Dosyayı görüntüle @
fbea89b6
...
...
@@ -449,10 +449,8 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow,
return
pW
->
OutputToScreenPixel
(
aPos
);
}
FloatingWindow
*
FloatingWindow
::
ImplFloatHitTest
(
vcl
::
Window
*
pReference
,
const
Point
&
rPos
,
HitTest
&
rHitTest
)
Point
FloatingWindow
::
ImplConvertToAbsPos
(
vcl
::
Window
*
pReference
,
const
Point
&
rPos
)
{
FloatingWindow
*
pWin
=
this
;
Point
aAbsolute
(
rPos
);
const
OutputDevice
*
pWindowOutDev
=
pReference
->
GetOutDev
();
...
...
@@ -472,6 +470,37 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( vcl::Window* pReference, const
aAbsolute
=
Point
(
pReference
->
OutputToAbsoluteScreenPixel
(
pReference
->
ScreenToOutputPixel
(
rPos
)
)
);
return
aAbsolute
;
}
Rectangle
FloatingWindow
::
ImplConvertToAbsPos
(
vcl
::
Window
*
pReference
,
const
Rectangle
&
rRect
)
{
Rectangle
aFloatRect
=
rRect
;
const
OutputDevice
*
pParentWinOutDev
=
pReference
->
GetOutDev
();
// compare coordinates in absolute screen coordinates
// Keep in sync with FloatingWindow::ImplFloatHitTest, e.g. fdo#33509
if
(
pReference
->
HasMirroredGraphics
()
)
{
if
(
!
pReference
->
IsRTLEnabled
()
)
// --- RTL --- re-mirror back to get device coordinates
pParentWinOutDev
->
ReMirror
(
aFloatRect
);
aFloatRect
.
SetPos
(
pReference
->
ScreenToOutputPixel
(
aFloatRect
.
TopLeft
()));
aFloatRect
=
pReference
->
ImplOutputToUnmirroredAbsoluteScreenPixel
(
aFloatRect
);
}
else
aFloatRect
.
SetPos
(
pReference
->
OutputToAbsoluteScreenPixel
(
pReference
->
ScreenToOutputPixel
(
rRect
.
TopLeft
())));
return
aFloatRect
;
}
FloatingWindow
*
FloatingWindow
::
ImplFloatHitTest
(
vcl
::
Window
*
pReference
,
const
Point
&
rPos
,
HitTest
&
rHitTest
)
{
FloatingWindow
*
pWin
=
this
;
Point
aAbsolute
(
FloatingWindow
::
ImplConvertToAbsPos
(
pReference
,
rPos
));
do
{
// compute the floating window's size in absolute screen coordinates
...
...
@@ -665,24 +694,7 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, FloatWinPopupFlags
// convert maFloatRect to absolute device coordinates
// so they can be compared across different frames
// !!! rRect is expected to be in screen coordinates of the parent frame window !!!
maFloatRect
=
rRect
;
vcl
::
Window
*
pReference
=
GetParent
();
const
OutputDevice
*
pParentWinOutDev
=
pReference
->
GetOutDev
();
// compare coordinates in absolute screen coordinates
// Keep in sync with FloatingWindow::ImplFloatHitTest, e.g. fdo#33509
if
(
pReference
->
HasMirroredGraphics
()
)
{
if
(
!
pReference
->
IsRTLEnabled
()
)
// --- RTL --- re-mirror back to get device coordinates
pParentWinOutDev
->
ReMirror
(
maFloatRect
);
maFloatRect
.
SetPos
(
pReference
->
ScreenToOutputPixel
(
maFloatRect
.
TopLeft
()));
maFloatRect
=
pReference
->
ImplOutputToUnmirroredAbsoluteScreenPixel
(
maFloatRect
);
}
else
maFloatRect
.
SetPos
(
pReference
->
OutputToAbsoluteScreenPixel
(
pReference
->
ScreenToOutputPixel
(
rRect
.
TopLeft
())));
maFloatRect
=
FloatingWindow
::
ImplConvertToAbsPos
(
GetParent
(),
rRect
);
maFloatRect
.
Left
()
-=
2
;
maFloatRect
.
Top
()
-=
2
;
...
...
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