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
814ca076
Kaydet (Commit)
814ca076
authored
Eki 30, 2013
tarafından
Ptyl Dragon
Kaydeden (comit)
Jan Holesovsky
Kas 15, 2013
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ready for integration with CATiledLayer
Change-Id: I50f519a37036ed3d17f73c80b33f4a9c4c19cb52
üst
6b6088fa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
16 deletions
+87
-16
touch.h
include/touch/touch.h
+65
-9
MLOGestureEngine.m
...ared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m
+1
-2
viewsh.cxx
sw/source/core/view/viewsh.cxx
+21
-5
No files found.
include/touch/touch.h
Dosyayı görüntüle @
814ca076
...
...
@@ -90,19 +90,75 @@ typedef CGRect MLORect;
typedef
basegfx
::
B2IBox
MLORect
;
#endif
typedef
long
long
MLOContentSizeDimension
;
struct
MLOContentSize
{
MLOContentSizeDimension
width
;
MLOContentSizeDimension
height
;
// MLODip - Device Independent Pixels
typedef
long
long
MLOPixel
;
static
const
MLOPixel
LO_TWIPS_TO_MLO_PIXEL_RATIO
=
10L
;
struct
MLOPixelSize
{
MLOPixel
width
;
MLOPixel
height
;
};
typedef
struct
MLOPixelSize
MLOPixelSize
;
struct
MLOPixelPoint
{
MLOPixel
x
;
MLOPixel
y
;
};
typedef
struct
MLOContentSize
MLOContentSize
;
typedef
struct
MLOPixelPoint
MLOPixelPoint
;
CG_INLINE
CGFloat
MLOPixelToCGFloat
(
MLOPixel
mloPixel
)
{
return
(
CGFloat
)
(
mloPixel
/
LO_TWIPS_TO_MLO_PIXEL_RATIO
);
}
CG_INLINE
MLOPixel
CGFloatToMLOPixel
(
CGFloat
cgFloat
)
{
return
(
MLOPixel
)
cgFloat
*
LO_TWIPS_TO_MLO_PIXEL_RATIO
;
}
CG_INLINE
MLOPixelSize
MLOPixelSizeMake
(
MLOPixel
width
,
MLOPixel
height
)
{
MLOPixelSize
size
;
size
.
width
=
width
;
size
.
height
=
height
;
return
size
;
}
CG_INLINE
MLOPixelPoint
MLOPixelPointMake
(
MLOPixel
x
,
MLOPixel
y
)
{
MLOPixelPoint
point
;
point
.
x
=
x
;
point
.
y
=
y
;
return
point
;
}
CG_INLINE
MLOPixelSize
CGSizeToMLOPixelSize
(
CGSize
cgSize
)
{
MLOPixelSize
mloPixelSize
;
mloPixelSize
.
width
=
MLOPixelToCGFloat
(
cgSize
.
width
);
mloPixelSize
.
height
=
MLOPixelToCGFloat
(
cgSize
.
height
);
return
mloPixelSize
;
}
CG_INLINE
CGSize
MLOPixelsToCGSize
(
MLOPixel
width
,
MLOPixel
height
)
{
CGFloat
fWidth
=
CGFloatToMLOPixel
(
width
);
CGFloat
fHeight
=
CGFloatToMLOPixel
(
height
);
return
CGSizeMake
(
fWidth
,
fHeight
);
}
CG_INLINE
MLOContent
Size
MLO
ContentSizeMake
(
MLOContentSizeDimension
width
,
MLOContentSizeDimension
height
)
CG_INLINE
CG
Size
MLO
PixelSizeToCGSize
(
MLOPixelSize
mloPixelSize
)
{
MLOContentSize
size
;
size
.
width
=
width
;
size
.
height
=
height
;
return
size
;
return
MLOPixelsToCGSize
(
mloPixelSize
.
width
,
mloPixelSize
.
height
)
;
}
MLOPixelPoint
CGPointToMLOPixelPoint
(
CGPoint
cgPoint
);
CGPoint
MLOPixelPointToCGPoint
(
MLOPixelPoint
mloPixelPoint
);
// selection
void
touch_ui_selection_start
(
MLOSelectionKind
kind
,
const
void
*
documentHandle
,
MLORect
*
rectangles
,
...
...
@@ -145,7 +201,7 @@ context, contextHeight, contextWidth specify where to draw.
*/
void
touch_lo_draw_tile
(
void
*
context
,
int
contextWidth
,
int
contextHeight
,
int
tilePosX
,
int
tilePosY
,
int
tileWidth
,
int
tileHeight
);
void
touch_lo_copy_buffer
(
const
void
*
source
,
size_t
sourceWidth
,
size_t
sourceHeight
,
size_t
sourceBytesPerRow
,
void
*
target
,
size_t
targetWidth
,
size_t
targetHeight
);
MLOContent
Size
touch_lo_get_content_size
();
CG
Size
touch_lo_get_content_size
();
void
touch_lo_mouse_drag
(
int
x
,
int
y
,
MLOMouseButtonState
state
);
// Move the start of the selection to (x,y)
...
...
ios/shared/ios_sharedlo/objective_c/gestures/MLOGestureEngine.m
Dosyayı görüntüle @
814ca076
...
...
@@ -473,4 +473,4 @@ void touch_ui_selection_start(MLOSelectionKind kind,
void
touch_ui_selection_none
(){
// STUB
}
\ No newline at end of file
}
sw/source/core/view/viewsh.cxx
Dosyayı görüntüle @
814ca076
...
...
@@ -1816,7 +1816,7 @@ void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int
Application
::
ReleaseSolarMutex
();
}
extern
"C"
MLOContent
Size
touch_lo_get_content_size
()
CG
Size
touch_lo_get_content_size
()
{
SwWrtShell
*
pViewShell
=
GetActiveWrtShell
();
if
(
pViewShell
)
...
...
@@ -1824,14 +1824,30 @@ MLOContentSize touch_lo_get_content_size()
static
const
long
WIDTH_ADDITION
=
6L
*
DOCUMENTBORDER
;
static
const
long
HEIGHT_ADDITION
=
2L
*
DOCUMENTBORDER
;
Size
documentSize
=
pViewShell
->
GetView
().
GetDocSz
();
return
MLO
ContentSizeMak
e
(
documentSize
.
Width
()
+
WIDTH_ADDITION
,
return
MLO
PixelsToCGSiz
e
(
documentSize
.
Width
()
+
WIDTH_ADDITION
,
documentSize
.
Height
()
+
HEIGHT_ADDITION
);
}
return
MLOContentSizeMake
(
0
,
0
);
return
CGSizeMake
(
0
,
0
);
}
extern
"C"
MLOPixelPoint
CGPointToMLOPixelPoint
(
CGPoint
cgPoint
)
{
CGSize
contentSize
=
touch_lo_get_content_size
();
MLOPixel
x
=
CGFloatToMLOPixel
(
cgPoint
.
x
-
(
contentSize
.
width
/
2.0
f
));
MLOPixel
y
=
CGFloatToMLOPixel
(
cgPoint
.
y
);
return
MLOPixelPointMake
(
x
,
y
);
}
#endif
extern
"C"
void
touch_ui_selection_none
()
{}
extern
"C"
CGPoint
MLOPixelPointToCGPoint
(
MLOPixelPoint
mloPixelPoint
)
{
CGSize
contentSize
=
touch_lo_get_content_size
();
CGFloat
x
=
MLOPixelToCGFloat
(
mloPixelPoint
.
x
)
+
(
contentSize
.
width
/
2.0
f
);
CGFloat
y
=
MLOPixelToCGFloat
(
mloPixelPoint
.
y
);
return
CGPointMake
(
x
,
y
);
}
#endif
void
SwViewShell
::
SetBrowseBorder
(
const
Size
&
rNew
)
{
...
...
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