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
a0a31723
Kaydet (Commit)
a0a31723
authored
Tem 30, 2012
tarafından
Andrzej J.R. Hunt
Kaydeden (comit)
Michael Meeks
Agu 06, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Attempt to use the XHTML export filter for note export (not functional yet).
Change-Id: Iaf88b879d679a9dabc31468c51fe9b943c2053e5
üst
292bc25e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
93 additions
and
2 deletions
+93
-2
PresentationFragment.java
...c/org/libreoffice/impressremote/PresentationFragment.java
+1
-2
ImagePreparer.cxx
sd/source/ui/remotecontrol/ImagePreparer.cxx
+91
-0
ImagePreparer.hxx
sd/source/ui/remotecontrol/ImagePreparer.hxx
+1
-0
No files found.
android/sdremote/src/org/libreoffice/impressremote/PresentationFragment.java
Dosyayı görüntüle @
a0a31723
...
...
@@ -93,8 +93,7 @@ public class PresentationFragment extends Fragment {
private
void
updateSlideNumberDisplay
()
{
int
aSlide
=
mSlideShow
.
getCurrentSlide
();
mNumberText
.
setText
((
aSlide
+
1
)
+
"/"
+
mSlideShow
.
getSize
());
mNotes
.
loadData
(
"<html><body>"
+
mSlideShow
.
getNotes
(
aSlide
)
+
"</html></body>"
,
"text/html"
,
null
);
mNotes
.
loadData
(
mSlideShow
.
getNotes
(
aSlide
),
"text/html"
,
null
);
}
// -------------------------------------------------- RESIZING LISTENER ----
...
...
sd/source/ui/remotecontrol/ImagePreparer.cxx
Dosyayı görüntüle @
a0a31723
...
...
@@ -35,6 +35,7 @@
#include <rtl/strbuf.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/document/XExporter.hpp>
#include <com/sun/star/lang/XServiceName.hpp>
...
...
@@ -82,6 +83,7 @@ void ImagePreparer::execute()
}
sendNotes
(
i
);
}
// notesToHtml( 0 );
mRef
.
clear
();
}
...
...
@@ -207,13 +209,102 @@ void ImagePreparer::sendNotes( sal_uInt32 aSlideNumber )
aBuffer
.
append
(
OString
::
valueOf
(
sal_Int32
(
aSlideNumber
)
).
getStr
()
);
aBuffer
.
append
(
"
\n
"
);
aBuffer
.
append
(
"<html><body>"
);
aBuffer
.
append
(
aNotes
);
aBuffer
.
append
(
"</html></body>"
);
aBuffer
.
append
(
"
\n\n
"
);
pTransmitter
->
addMessage
(
aBuffer
.
makeStringAndClear
(),
Transmitter
::
Priority
::
LOW
);
}
OString
ImagePreparer
::
notesToHtml
(
sal_uInt32
aSlideNumber
)
{
OString
aRet
(
""
);
OUString
aFileURL
;
FileBase
::
createTempFile
(
0
,
0
,
&
aFileURL
);
fprintf
(
stderr
,
OUStringToOString
(
aFileURL
,
RTL_TEXTENCODING_UTF8
).
getStr
()
);
if
(
!
xController
->
isRunning
()
)
return
""
;
// Get the filter
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
xServiceManager
(
::
comphelper
::
getProcessServiceFactory
(),
uno
::
UNO_QUERY_THROW
);
uno
::
Reference
<
container
::
XNameAccess
>
xFilterFactory
(
xServiceManager
->
createInstance
(
"com.sun.star.document.FilterFactory"
),
uno
::
UNO_QUERY_THROW
);
if
(
xFilterFactory
->
hasByName
(
"com.sun.star.comp.Writer.XmlFilterAdaptor"
)
)
fprintf
(
stderr
,
"Is contained
\n
"
);
else
fprintf
(
stderr
,
"Not contained
\n
"
);
// uno::Sequence<Any> aList(6);
// aList[0] <<= OUString("com.sun.star.documentconversion.XSLTFilter");
// aList[1] <<= OUString("");
// aList[2] <<= OUString("com.sun.star.comp.Impress.XMLOasisImporter");
// aList[3] <<= OUString("com.sun.star.comp.Impress.XMLOasisExporter"),
// aList[4] <<= OUString("");
// aList[5] <<= OUString("../share/xslt/export/xhtml/opendoc2xhtml.xsl");
// uno::Reference< lang::XMultiServiceFactory > xFilterF( xFilterFactory, uno::UNO_QUERY_THROW );
// xFilterF->createInstanceWithArguments(OUString("com.sun.star.comp.Writer.XmlFilterAdaptor"), aList);
css
::
uno
::
Reference
<
document
::
XFilter
>
xFilter
(
xFilterFactory
->
getByName
(
"com.sun.star.comp.Writer.XmlFilterAdaptor"
),
uno
::
UNO_QUERY_THROW
);
// Get the page
uno
::
Reference
<
lang
::
XComponent
>
xNotesPage
;
uno
::
Reference
<
drawing
::
XDrawPage
>
xSourceDoc
(
xController
->
getSlideByIndex
(
aSlideNumber
),
uno
::
UNO_QUERY_THROW
);
uno
::
Reference
<
presentation
::
XPresentationPage
>
xPresentationPage
(
xSourceDoc
,
UNO_QUERY
);
if
(
xPresentationPage
.
is
())
xNotesPage
=
uno
::
Reference
<
lang
::
XComponent
>
(
xPresentationPage
->
getNotesPage
(),
uno
::
UNO_QUERY_THROW
);
else
return
""
;
// Start Exporting
uno
::
Reference
<
document
::
XExporter
>
xExporter
(
xFilter
,
uno
::
UNO_QUERY_THROW
);
xExporter
->
setSourceDocument
(
xNotesPage
);
uno
::
Sequence
<
beans
::
PropertyValue
>
aProps
(
1
);
aProps
[
0
].
Name
=
"URL"
;
aProps
[
0
].
Value
<<=
aFileURL
;
// aProps[1].Name = "com.sun.star.comp.Impress.XMLOasisExporter";
// aProps[1].Value <<= OUString( "../share/xslt/export/xhtml/opendoc2xhtml.xsl" );
// aProps[2].Name = "FilterData";
// aProps[2].Value <<= aFilterData;
fprintf
(
stderr
,
"Trying to filter
\n
"
);
xFilter
->
filter
(
aProps
);
// FIXME: error handling.
// File aFile( aFileURL );
// aFile.open(0);
// sal_uInt64 aRead;
// rSize = 0;
// aFile.getSize( rSize );
// uno::Sequence<sal_Int8> aContents( rSize );
// aFile.read( aContents.getArray(), rSize, aRead );
// aFile.close();
// File::remove( aFileURL );
// return aContents;
return
aRet
;
}
// Code copied from sdremote/source/presenter/PresenterNotesView.cxx
OString
ImagePreparer
::
prepareNotes
(
sal_uInt32
aSlideNumber
)
{
...
...
sd/source/ui/remotecontrol/ImagePreparer.hxx
Dosyayı görüntüle @
a0a31723
...
...
@@ -45,6 +45,7 @@ private:
void
sendNotes
(
sal_uInt32
aSlideNumber
);
rtl
::
OString
prepareNotes
(
sal_uInt32
aSlideNumber
);
rtl
::
OString
notesToHtml
(
sal_uInt32
aSlideNumber
);
};
}
...
...
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