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
9d8b3307
Kaydet (Commit)
9d8b3307
authored
Şub 02, 2016
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
lokdocview: add a set_visible_area()
Change-Id: Ib63959ad64fe52b648e0c0d3fe6d49fb282d57ee
üst
6691d78f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
1 deletion
+37
-1
LibreOfficeKitGtk.h
include/LibreOfficeKit/LibreOfficeKitGtk.h
+11
-0
gtktiledviewer.cxx
libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+3
-0
lokdocview.cxx
libreofficekit/source/gtk/lokdocview.cxx
+23
-1
No files found.
include/LibreOfficeKit/LibreOfficeKitGtk.h
Dosyayı görüntüle @
9d8b3307
...
@@ -113,6 +113,17 @@ LibreOfficeKitDocument* lok_doc_view_get_document (LOKDocView*
...
@@ -113,6 +113,17 @@ LibreOfficeKitDocument* lok_doc_view_get_document (LOKDocView*
*/
*/
void
lok_doc_view_set_zoom
(
LOKDocView
*
pDocView
,
void
lok_doc_view_set_zoom
(
LOKDocView
*
pDocView
,
float
fZoom
);
float
fZoom
);
/**
* lok_doc_view_set_visible_area:
* @pDocView: The #LOKDocView instance
* @fZoom: The new visible area of pDocView in twips.
*
* Sets the new visible area of the widget. This helps e.g. the page down key
* to jump the correct length, which depends on the amount of visible height of
* the document.
*/
void
lok_doc_view_set_visible_area
(
LOKDocView
*
pDocView
,
GdkRectangle
*
pVisibleArea
);
/**
/**
* lok_doc_view_get_zoom:
* lok_doc_view_get_zoom:
...
...
libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
Dosyayı görüntüle @
9d8b3307
...
@@ -440,6 +440,9 @@ static void changeZoom( GtkWidget* pButton, gpointer /* pItem */ )
...
@@ -440,6 +440,9 @@ static void changeZoom( GtkWidget* pButton, gpointer /* pItem */ )
if
(
pDocView
)
if
(
pDocView
)
{
{
lok_doc_view_set_zoom
(
LOK_DOC_VIEW
(
pDocView
),
fZoom
);
lok_doc_view_set_zoom
(
LOK_DOC_VIEW
(
pDocView
),
fZoom
);
GdkRectangle
aVisibleArea
;
getVisibleAreaTwips
(
pDocView
,
&
aVisibleArea
);
lok_doc_view_set_visible_area
(
LOK_DOC_VIEW
(
pDocView
),
&
aVisibleArea
);
}
}
}
}
std
::
string
aZoom
=
std
::
to_string
(
int
(
fZoom
*
100
))
+
std
::
string
(
"%"
);
std
::
string
aZoom
=
std
::
to_string
(
int
(
fZoom
*
100
))
+
std
::
string
(
"%"
);
...
...
libreofficekit/source/gtk/lokdocview.cxx
Dosyayı görüntüle @
9d8b3307
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
#include <vector>
#include <vector>
#include <string>
#include <string>
#include <sstream>
#include <sstream>
#include <iostream>
#include <boost/property_tree/json_parser.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <com/sun/star/awt/Key.hpp>
#include <com/sun/star/awt/Key.hpp>
...
@@ -129,6 +130,9 @@ struct LOKDocViewPrivateImpl
...
@@ -129,6 +130,9 @@ struct LOKDocViewPrivateImpl
*/
*/
int
m_nTileSizeTwips
;
int
m_nTileSizeTwips
;
GdkRectangle
m_aVisibleArea
;
bool
m_bVisibleAreaSet
;
LOKDocViewPrivateImpl
()
LOKDocViewPrivateImpl
()
:
m_aLOPath
(
nullptr
),
:
m_aLOPath
(
nullptr
),
m_aDocPath
(
nullptr
),
m_aDocPath
(
nullptr
),
...
@@ -166,7 +170,9 @@ struct LOKDocViewPrivateImpl
...
@@ -166,7 +170,9 @@ struct LOKDocViewPrivateImpl
m_bInDragEndHandle
(
false
),
m_bInDragEndHandle
(
false
),
m_pGraphicHandle
(
nullptr
),
m_pGraphicHandle
(
nullptr
),
m_nViewId
(
0
),
m_nViewId
(
0
),
m_nTileSizeTwips
(
0
)
m_nTileSizeTwips
(
0
),
m_aVisibleArea
({
0
,
0
,
0
,
0
}),
m_bVisibleAreaSet
(
false
)
{
{
memset
(
&
m_aGraphicHandleRects
,
0
,
sizeof
(
m_aGraphicHandleRects
));
memset
(
&
m_aGraphicHandleRects
,
0
,
sizeof
(
m_aGraphicHandleRects
));
memset
(
&
m_bInDragGraphicHandles
,
0
,
sizeof
(
m_bInDragGraphicHandles
));
memset
(
&
m_bInDragGraphicHandles
,
0
,
sizeof
(
m_bInDragGraphicHandles
));
...
@@ -561,6 +567,11 @@ postKeyEventInThread(gpointer data)
...
@@ -561,6 +567,11 @@ postKeyEventInThread(gpointer data)
priv
->
m_nTileSizeTwips
);
priv
->
m_nTileSizeTwips
);
priv
->
m_nTileSizeTwips
=
0
;
priv
->
m_nTileSizeTwips
=
0
;
}
}
if
(
priv
->
m_bVisibleAreaSet
)
{
// TODO invoke lok::Document::setVisibleArea() here.
priv
->
m_bVisibleAreaSet
=
false
;
}
std
::
stringstream
ss
;
std
::
stringstream
ss
;
ss
<<
"lok::Document::postKeyEvent("
<<
pLOEvent
->
m_nKeyEvent
<<
", "
<<
pLOEvent
->
m_nCharCode
<<
", "
<<
pLOEvent
->
m_nKeyCode
<<
")"
;
ss
<<
"lok::Document::postKeyEvent("
<<
pLOEvent
->
m_nKeyEvent
<<
", "
<<
pLOEvent
->
m_nCharCode
<<
", "
<<
pLOEvent
->
m_nKeyCode
<<
")"
;
...
@@ -2520,6 +2531,17 @@ lok_doc_view_get_document (LOKDocView* pDocView)
...
@@ -2520,6 +2531,17 @@ lok_doc_view_get_document (LOKDocView* pDocView)
return
priv
->
m_pDocument
;
return
priv
->
m_pDocument
;
}
}
SAL_DLLPUBLIC_EXPORT
void
lok_doc_view_set_visible_area
(
LOKDocView
*
pDocView
,
GdkRectangle
*
pVisibleArea
)
{
if
(
!
pVisibleArea
)
return
;
LOKDocViewPrivate
&
priv
=
getPrivate
(
pDocView
);
priv
->
m_aVisibleArea
=
*
pVisibleArea
;
priv
->
m_bVisibleAreaSet
=
true
;
}
SAL_DLLPUBLIC_EXPORT
void
SAL_DLLPUBLIC_EXPORT
void
lok_doc_view_set_zoom
(
LOKDocView
*
pDocView
,
float
fZoom
)
lok_doc_view_set_zoom
(
LOKDocView
*
pDocView
,
float
fZoom
)
{
{
...
...
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