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
655c7877
Kaydet (Commit)
655c7877
authored
Eyl 14, 2015
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
lok::Document: add createView()
Change-Id: Ic871ec41992b611b10958799b2dc12375a91efe4
üst
58b5c13b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
0 deletions
+46
-0
init.cxx
desktop/source/lib/init.cxx
+19
-0
LibreOfficeKit.h
include/LibreOfficeKit/LibreOfficeKit.h
+3
-0
LibreOfficeKit.hxx
include/LibreOfficeKit/LibreOfficeKit.hxx
+10
-0
gtktiledviewer.cxx
libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+14
-0
No files found.
desktop/source/lib/init.cxx
Dosyayı görüntüle @
655c7877
...
@@ -52,6 +52,7 @@
...
@@ -52,6 +52,7 @@
#include <sfx2/viewfrm.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/msgpool.hxx>
#include <sfx2/msgpool.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/lokhelper.hxx>
#include <svx/svxids.hrc>
#include <svx/svxids.hrc>
#include <vcl/svapp.hxx>
#include <vcl/svapp.hxx>
#include <vcl/svpforlokit.hxx>
#include <vcl/svpforlokit.hxx>
...
@@ -246,6 +247,7 @@ static void doc_setGraphicSelection (LibreOfficeKitDocument* pThis,
...
@@ -246,6 +247,7 @@ static void doc_setGraphicSelection (LibreOfficeKitDocument* pThis,
static
void
doc_resetSelection
(
LibreOfficeKitDocument
*
pThis
);
static
void
doc_resetSelection
(
LibreOfficeKitDocument
*
pThis
);
static
char
*
doc_getCommandValues
(
LibreOfficeKitDocument
*
pThis
,
const
char
*
pCommand
);
static
char
*
doc_getCommandValues
(
LibreOfficeKitDocument
*
pThis
,
const
char
*
pCommand
);
static
int
doc_createView
(
LibreOfficeKitDocument
*
pThis
);
LibLODocument_Impl
::
LibLODocument_Impl
(
const
uno
::
Reference
<
css
::
lang
::
XComponent
>
&
xComponent
)
:
LibLODocument_Impl
::
LibLODocument_Impl
(
const
uno
::
Reference
<
css
::
lang
::
XComponent
>
&
xComponent
)
:
mxComponent
(
xComponent
)
mxComponent
(
xComponent
)
...
@@ -277,6 +279,8 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XCompone
...
@@ -277,6 +279,8 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XCompone
m_pDocumentClass
->
resetSelection
=
doc_resetSelection
;
m_pDocumentClass
->
resetSelection
=
doc_resetSelection
;
m_pDocumentClass
->
getCommandValues
=
doc_getCommandValues
;
m_pDocumentClass
->
getCommandValues
=
doc_getCommandValues
;
m_pDocumentClass
->
createView
=
doc_createView
;
gDocumentClass
=
m_pDocumentClass
;
gDocumentClass
=
m_pDocumentClass
;
}
}
pClass
=
m_pDocumentClass
.
get
();
pClass
=
m_pDocumentClass
.
get
();
...
@@ -1029,6 +1033,21 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
...
@@ -1029,6 +1033,21 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
}
}
}
}
static
int
doc_createView
(
LibreOfficeKitDocument
*
pThis
)
{
SolarMutexGuard
aGuard
;
ITiledRenderable
*
pDoc
=
getTiledRenderable
(
pThis
);
if
(
!
pDoc
)
{
gImpl
->
maLastExceptionMsg
=
"Document doesn't support tiled rendering"
;
return
-
1
;
}
SfxViewShell
*
pViewShell
=
pDoc
->
getCurrentViewShell
();
return
SfxLokHelper
::
createView
(
pViewShell
);
}
static
char
*
lo_getError
(
LibreOfficeKit
*
pThis
)
static
char
*
lo_getError
(
LibreOfficeKit
*
pThis
)
{
{
LibLibreOffice_Impl
*
pLib
=
static_cast
<
LibLibreOffice_Impl
*>
(
pThis
);
LibLibreOffice_Impl
*
pLib
=
static_cast
<
LibLibreOffice_Impl
*>
(
pThis
);
...
...
include/LibreOfficeKit/LibreOfficeKit.h
Dosyayı görüntüle @
655c7877
...
@@ -162,6 +162,9 @@ struct _LibreOfficeKitDocumentClass
...
@@ -162,6 +162,9 @@ struct _LibreOfficeKitDocumentClass
/// @see lok::Document:getStyles
/// @see lok::Document:getStyles
char
*
(
*
getCommandValues
)
(
LibreOfficeKitDocument
*
pThis
,
const
char
*
pCommand
);
char
*
(
*
getCommandValues
)
(
LibreOfficeKitDocument
*
pThis
,
const
char
*
pCommand
);
/// @see lok::Document::createView().
int
(
*
createView
)
(
LibreOfficeKitDocument
*
pThis
);
#endif // LOK_USE_UNSTABLE_API
#endif // LOK_USE_UNSTABLE_API
};
};
...
...
include/LibreOfficeKit/LibreOfficeKit.hxx
Dosyayı görüntüle @
655c7877
...
@@ -257,6 +257,16 @@ public:
...
@@ -257,6 +257,16 @@ public:
{
{
return
mpDoc
->
pClass
->
getCommandValues
(
mpDoc
,
pCommand
);
return
mpDoc
->
pClass
->
getCommandValues
(
mpDoc
,
pCommand
);
}
}
/**
* Create a new view for an existing document.
* By default a loaded document has 1 view.
* @return the ID of the new view.
*/
int
createView
()
{
return
mpDoc
->
pClass
->
createView
(
mpDoc
);
}
#endif // LOK_USE_UNSTABLE_API
#endif // LOK_USE_UNSTABLE_API
};
};
...
...
libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
Dosyayı görüntüle @
655c7877
...
@@ -147,6 +147,14 @@ static void toggleFindbar(GtkWidget* /*pButton*/, gpointer /*pItem*/)
...
@@ -147,6 +147,14 @@ static void toggleFindbar(GtkWidget* /*pButton*/, gpointer /*pItem*/)
}
}
}
}
/// Calls lok::Document::createView().
static
void
createView
(
GtkWidget
*
/*pButton*/
,
gpointer
/*pItem*/
)
{
LOKDocView
*
pLOKDocView
=
LOK_DOC_VIEW
(
pDocView
);
LibreOfficeKitDocument
*
pDocument
=
lok_doc_view_get_document
(
pLOKDocView
);
pDocument
->
pClass
->
createView
(
pDocument
);
}
/// Our GtkClipboardGetFunc implementation for HTML.
/// Our GtkClipboardGetFunc implementation for HTML.
static
void
htmlGetFunc
(
GtkClipboard
*
/*pClipboard*/
,
GtkSelectionData
*
pSelectionData
,
guint
/*info*/
,
gpointer
pUserData
)
static
void
htmlGetFunc
(
GtkClipboard
*
/*pClipboard*/
,
GtkSelectionData
*
pSelectionData
,
guint
/*info*/
,
gpointer
pUserData
)
{
{
...
@@ -555,6 +563,12 @@ int main( int argc, char* argv[] )
...
@@ -555,6 +563,12 @@ int main( int argc, char* argv[] )
gtk_toolbar_insert
(
GTK_TOOLBAR
(
pToolbar
),
pFindButton
,
-
1
);
gtk_toolbar_insert
(
GTK_TOOLBAR
(
pToolbar
),
pFindButton
,
-
1
);
g_signal_connect
(
G_OBJECT
(
pFindButton
),
"clicked"
,
G_CALLBACK
(
toggleFindbar
),
NULL
);
g_signal_connect
(
G_OBJECT
(
pFindButton
),
"clicked"
,
G_CALLBACK
(
toggleFindbar
),
NULL
);
GtkToolItem
*
pNewViewButton
=
gtk_tool_button_new
(
NULL
,
NULL
);
gtk_tool_button_set_icon_name
(
GTK_TOOL_BUTTON
(
pNewViewButton
),
"view-continuous-symbolic"
);
gtk_tool_item_set_tooltip_text
(
pNewViewButton
,
"New View"
);
gtk_toolbar_insert
(
GTK_TOOLBAR
(
pToolbar
),
pNewViewButton
,
-
1
);
g_signal_connect
(
G_OBJECT
(
pNewViewButton
),
"clicked"
,
G_CALLBACK
(
createView
),
NULL
);
gtk_toolbar_insert
(
GTK_TOOLBAR
(
pToolbar
),
gtk_separator_tool_item_new
(),
-
1
);
gtk_toolbar_insert
(
GTK_TOOLBAR
(
pToolbar
),
gtk_separator_tool_item_new
(),
-
1
);
pBold
=
gtk_toggle_tool_button_new
();
pBold
=
gtk_toggle_tool_button_new
();
...
...
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