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
40c00297
Kaydet (Commit)
40c00297
authored
Haz 07, 2012
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clarify ideas a bit, DocumentRenderCallback service not needed
Change-Id: I0a91a45dace5d2a35daadf1c9233ab68bee8701e
üst
e243a5b4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
35 deletions
+22
-35
InternalUnoApi_touch.mk
touch/InternalUnoApi_touch.mk
+0
-1
DocumentRenderCallback.idl
touch/idl/org/libreoffice/touch/DocumentRenderCallback.idl
+0
-25
XDocument.idl
touch/idl/org/libreoffice/touch/XDocument.idl
+4
-4
Document.cxx
touch/source/uno/Document.cxx
+18
-5
No files found.
touch/InternalUnoApi_touch.mk
Dosyayı görüntüle @
40c00297
...
...
@@ -25,7 +25,6 @@ $(eval $(call gb_InternalUnoApi_set_include,touch,\
$(eval $(call gb_InternalUnoApi_add_idlfiles,touch,touch/idl/org/libreoffice/touch,\
Document \
DocumentRenderCallback \
XDocument \
XDocumentRenderCallback \
))
...
...
touch/idl/org/libreoffice/touch/DocumentRenderCallback.idl
deleted
100644 → 0
Dosyayı görüntüle @
e243a5b4
//
-*-
Mode
:
C
++
; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
//
Copyright
2012
LibreOffice
contributors
.
//
//
This
Source
Code
Form
is
subject
to
the
terms
of
the
Mozilla
Public
//
License
2.0
.
If
a
copy
of
the
MPL
was
not
distributed
with
this
//
file
,
You
can
obtain
one
at
http
:
//
mozilla
.
org/MPL/2.0/.
#
ifndef
org_libreoffice_touch_DocumentRenderCallback_idl
#
define
org_libreoffice_touch_DocumentRenderCallback_idl
#
include
<
org
/
libreoffice
/
touch
/
XDocumentRenderCallback
.
idl>
module
org
{
module
libreoffice
{
module
touch
{
service
DocumentRenderCallback
:
XDocumentRenderCallback
{
create
()
;
}
;
}
; }; };
#
endif
//
vim
:
set
shiftwidth
=
4
softtabstop
=
4
expandtab
:
touch/idl/org/libreoffice/touch/XDocument.idl
Dosyayı görüntüle @
40c00297
...
...
@@ -37,10 +37,10 @@ interface XDocument: com::sun::star::uno::XInterface
//
on
Android
version
and
/
or
hardware
?
TBD
.
Will
the
same
format
be
useful
//
also
for
iOS
?
TBD
.
//
buffer
must
have
an
exact
number
of
bytes
for
a
square
number
of
//
p
ixels
,
At
the
UNO
level
buffer
is
represented
as
the
address
of
its
//
bytes
,
i
.
e.
on
Android
it
must
be
a
"direct"
ByteBuffer
for
that
to
be
//
meaningful
.
//
buffer
must
have
an
exact
number
of
bytes
for
a
square
with
each
side
a
//
p
ower
-
of
-
two
number
of
pixels
,
At
this
API
level
buffer
is
represented
//
as
the
address
of
its
bytes
as
a
64
-
bit
integer
,
i
.
e.
on
Android
it
//
m
ust
be
a
"direct"
ByteBuffer
for
that
to
be
m
eaningful
.
//
listener
gets
a
"reasonable"
number
of
callbacks
during
the
rendering
//
if
it
takes
"significantly"
long
,
and
can
inerrupt
the
rendering
.
...
...
touch/source/uno/Document.cxx
Dosyayı görüntüle @
40c00297
...
...
@@ -9,6 +9,7 @@
// NOTE: Work in progress, most likely makes little sense
#include <com/sun/star/awt/XBitmap.hpp>
#include <com/sun/star/awt/XDevice.hpp>
#include <com/sun/star/awt/XToolkit.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
...
...
@@ -40,10 +41,15 @@ private:
uno
::
Reference
<
uno
::
XComponentContext
>
m_rContext
;
uno
::
Reference
<
lang
::
XComponent
>
m_xComponent
;
uno
::
Reference
<
frame
::
XController
>
m_xController
;
uno
::
Reference
<
awt
::
XDevice
>
m_xDevice
;
uno
::
Reference
<
view
::
XRenderable
>
m_xRenderable
;
beans
::
PropertyValues
m_aRenderProps
;
// XRenderable.getRendererCount() and .render() need an XController in the
// properties, at least in the test Java code it seemed that a totally
// dummy one works, so try that here, too.
typedef
::
cppu
::
WeakImplHelper1
<
frame
::
XController
>
MyXController_Base
;
class
MyXController
:
...
...
@@ -160,9 +166,9 @@ protected:
uno
::
Reference
<
awt
::
XToolkit
>
toolkit
(
m_rContext
->
getServiceManager
()
->
createInstanceWithContext
(
"com.sun.star.awt.Toolkit"
,
m_rContext
),
uno
::
UNO_QUERY_THROW
);
uno
::
Reference
<
awt
::
XDevice
>
device
(
toolkit
->
createScreenCompatibleDevice
(
1024
,
1024
)
);
m_xDevice
=
toolkit
->
createScreenCompatibleDevice
(
1024
,
1024
);
m_xRenderable
=
uno
::
Reference
<
view
::
XRenderable
>
(
m_rContext
->
getServiceManager
()
->
createInstanceWithContext
(
"com.sun.star.view.Renderable"
,
m_rContext
),
uno
::
UNO_QUERY_THROW
);
m_xRenderable
=
uno
::
Reference
<
view
::
XRenderable
>
(
m_rContext
->
getServiceManager
()
->
createInstanceWithContext
(
"com.sun.star.view.Renderable"
,
m_rContext
),
uno
::
UNO_QUERY_THROW
);
m_xController
=
new
MyXController
();
...
...
@@ -170,7 +176,7 @@ protected:
m_aRenderProps
[
0
].
Name
=
"IsPrinter"
;
m_aRenderProps
[
0
].
Value
<<=
sal_Bool
(
true
);
m_aRenderProps
[
1
].
Name
=
"RenderDevice"
;
m_aRenderProps
[
1
].
Value
<<=
d
evice
;
m_aRenderProps
[
1
].
Value
<<=
m_xD
evice
;
m_aRenderProps
[
2
].
Name
=
"View"
;
m_aRenderProps
[
2
].
Value
<<=
m_xController
;
}
...
...
@@ -197,13 +203,20 @@ protected:
sal_Int32
y
)
throw
(
lang
::
IllegalArgumentException
,
uno
::
RuntimeException
)
{
uno
::
Any
selection
;
(
void
)
buffer
;
(
void
)
bufferSize
;
(
void
)
listener
;
(
void
)
pageNo
;
(
void
)
zoomLevel
;
(
void
)
x
;
(
void
)
y
;
(
void
)
y
;
selection
<<=
m_xComponent
;
m_xRenderable
->
render
(
pageNo
,
selection
,
m_aRenderProps
);
uno
::
Reference
<
awt
::
XBitmap
>
bitmap
(
m_xDevice
->
createBitmap
(
0
,
0
,
1024
,
1024
)
);
}
};
...
...
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