Kaydet (Commit) ea91c7d9 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Turn presenter screen from bundled extension to plain code

The immediate trigger was 5e5c11c6 "fdo#42070
Fix RTL support in presenter console" causing build failures on Mac OS X when
linking the extension against vcl, but there should be more benefits of going
from a bundled-anyway extension to plain code.  (Not the least to get rid of the
com.sun.star.drawing.XPresenterHelper hack.)

To avoid unnecessary confusion between the newly plain code and any instance of
the old extension still installed (per-user or shared), I renamed all relevant
identifiers as follows:
* UNO implementation com.sun.star.comp.Draw.framework.PresenterScreenJob ->
  org.libreoffice.comp.PresenterScreenJob
* UNO implementation com.sun.star.sdext.presenter.PresenterProtocolHandler ->
  org.libreoffice.comp.PresenterScreenProtocolHandler
* protocol handler schema vnd.com.sun.star.comp.PresenterScreen ->
  vnd.org.libreoffice.presenterscreen
* configuration schema /org.openoffice.Office.extension.PresenterScreen ->
  /org.openoffice.Office.PresenterScreen (it appears this contains little to no
  user-changeable data anyway, so not migrating it to a new user profile due to
  the schema name change should not be problematic)
* job ID onDocumentOpenedJob -> org.libreoffice.PresenterScreen

Even with these precautions, having the presenter screen installed both as plain
code and as a (per-user or shared) extension still leads to a crash when
activating presentation mode (likely due to how both codes want to take control
of the screen).  To mitigate this, existing installations of the extension are
explicitly not migrated to new user profiles.

The sdext/source/presenter/bitmaps/*.png files were moved to
icon-themes/galaxy/sd/res/presenterscreen-*.png and are now accessed via SdResId
(adding the relevant data to sd/source/ui/inc/res_bmp.hrc and
sd/source/ui/app/res_bmp.src; not sure whether these locations are already
ideal).

The code itself has been left mostly unchanged in sdext/source/presenter/, and
it still clumsily communicates with sd core code via XPresenterHelper.  There is
a lot of room for improvement here.

The help data is left untouched at sdext/source/presenter/help/ and needs to
be incorporated properly into helpcontent2 in a follow-up commit.

The --disable-ext-presenter-console configure switch is gone.

Change-Id: I71adb7ae6dcdbd1802151fce6e3871d8a2026332
üst 397f3e5d
......@@ -535,6 +535,7 @@ $(eval $(call gb_Helper_register_libraries,RTVERLIBS, \
))
$(eval $(call gb_Helper_register_libraries,UNOLIBS_OOO, \
PresenterScreen \
basprov \
cairocanvas \
canvasfactory \
......@@ -637,7 +638,6 @@ $(eval $(call gb_Helper_register_libraries,UNOVERLIBS, \
$(eval $(call gb_Helper_register_libraries,EXTENSIONLIBS, \
pdfimport \
PresenterScreen \
SunPresentationMinimizer \
))
......
......@@ -164,7 +164,6 @@ export ENABLE_ONLINE_UPDATE=@ENABLE_ONLINE_UPDATE@
export ENABLE_OPENGL=@ENABLE_OPENGL@
export ENABLE_OXYGENOFFICE=@ENABLE_OXYGENOFFICE@
export ENABLE_PDFIMPORT=@ENABLE_PDFIMPORT@
export ENABLE_PRESENTER_SCREEN=@ENABLE_PRESENTER_SCREEN@
export ENABLE_QUICKSTART_LIBPNG=@ENABLE_QUICKSTART_LIBPNG@
export ENABLE_RANDR=@ENABLE_RANDR@
export ENABLE_RELEASE_BUILD=@ENABLE_RELEASE_BUILD@
......
......@@ -626,11 +626,6 @@ AC_ARG_ENABLE(ext-pdfimport,
[Disable the PDF Import extension.])
)
AC_ARG_ENABLE(ext-presenter-console,
AS_HELP_STRING([--disable-ext-presenter-console],
[Disable the Presenter Console extension.])
)
AC_ARG_ENABLE(ext-presenter-minimizer,
AS_HELP_STRING([--disable-ext-presenter-minimizer],
[Disable the Presentation Minimizer extension.])
......@@ -9748,18 +9743,6 @@ else
fi
AC_SUBST(ENABLE_MINIMIZER)
# presenter console extension?
AC_MSG_CHECKING([whether to build the Presenter Console extension])
if test "x$enable_ext_presenter_console" != "xno" -a "x$enable_extension_integration" != "xno"; then
AC_MSG_RESULT([yes])
ENABLE_PRESENTER_SCREEN=YES
else
AC_MSG_RESULT([no])
ENABLE_PRESENTER_SCREEN=NO
SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_PRESENTER_SCREEN"
fi
AC_SUBST(ENABLE_PRESENTER_SCREEN)
# pdf import extension?
AC_MSG_CHECKING([whether to build the PDF Import extension])
if test "x$enable_ext_pdfimport" != "xno" -a "x$enable_extension_integration" != "xno"; then
......@@ -9801,11 +9784,6 @@ AC_SUBST(POPPLER_CFLAGS)
AC_SUBST(POPPLER_LIBS)
AC_SUBST(XPDF_TARBALL)
if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then
BUILD_TYPE="$BUILD_TYPE SDEXT"
fi
AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
if test "x$enable_ext_wiki_publisher" = "xyes" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then
AC_MSG_RESULT([yes])
......
......@@ -28,13 +28,13 @@
module com { module sun { module star { module drawing {
/** This interface is a collection of functions that are necessary to
/** This interface is a collection of functions that were necessary to
implement larger parts of the presenter screen as extension. The
methods of this interface give access to services that can, at the
moment, only implemented in the Office core, not in an extension.
methods of this interface give access to services that could only be
implemented in the Office core, not in an extension.
<p>With time some, maybe all, methods can moved to other, better suited,
interfaces.</p>
<p>As the presenter screen is no extension any more, this hack can go again;
it just needs clean-up.</p>
*/
interface XPresenterHelper
{
......@@ -114,17 +114,15 @@ interface XPresenterHelper
void toTop (
[in] ::com::sun::star::awt::XWindow xWindow);
/** Load a bitmap from a file or other accessible resource that can be
located via a URL.
@param sURL
The URL of the bitmap. For a file URL the bitmap is loaded from
the specified file.
/** Load a bitmap with a given ID.
@param id
The ID of the bitmap.
@param xCanvas
The bitmap is created to be compatible, and possibly optimized,
for this canvas.
*/
::com::sun::star::rendering::XBitmap loadBitmap (
[in] string sURL,
[in] string id,
[in] ::com::sun::star::rendering::XCanvas xCanvas);
/** Capture the mouse so that no other window will receive mouse events.
......
......@@ -82,7 +82,9 @@ $(eval $(call gb_Configuration_add_spool_modules,registry,officecfg/registry/dat
org/openoffice/Office/Common-macosx.xcu \
org/openoffice/Office/Common-wnt.xcu \
org/openoffice/Office/Common-UseOOoFileDialogs.xcu \
org/openoffice/Office/Jobs-impress.xcu \
org/openoffice/Office/Linguistic-ForceDefaultLanguage.xcu \
org/openoffice/Office/ProtocolHandler-impress.xcu \
org/openoffice/Office/Scripting-python.xcu \
org/openoffice/Office/Common-cjk.xcu \
org/openoffice/Office/Common-ctl.xcu \
......@@ -124,6 +126,7 @@ $(eval $(call gb_Configuration_add_localized_datas,registry,officecfg/registry/d
org/openoffice/Office/Common.xcu \
org/openoffice/Office/SFX.xcu \
org/openoffice/Office/DataAccess.xcu \
org/openoffice/Office/PresenterScreen.xcu \
org/openoffice/Office/TableWizard.xcu \
org/openoffice/Office/UI.xcu \
org/openoffice/Office/Embedding.xcu \
......
......@@ -17,9 +17,25 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<!DOCTYPE oor:component-data SYSTEM "../../../../component-update.dtd">
<oor:component-data oor:name="Jobs" oor:package="org.openoffice.Office" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<oor:component-data oor:name="Jobs" oor:package="org.openoffice.Office"
xmlns:install="http://openoffice.org/2004/installation"
xmlns:oor="http://openoffice.org/2001/registry">
<node oor:name="Jobs">
<node oor:name="org.libreoffice.PresenterScreen" oor:op="replace"
install:module="impress">
<prop oor:name="Service">
<value>org.libreoffice.comp.PresenterScreenJob</value>
</prop>
<prop oor:name="Context">
<value>com.sun.star.presentation.PresentationDocument</value>
</prop>
</node>
</node>
<node oor:name="Events">
<node oor:name="onDocumentOpened" oor:op="fuse" install:module="impress">
<node oor:name="JobList">
<node oor:name="org.libreoffice.PresenterScreen" oor:op="replace"/>
</node>
</node>
</node>
</oor:component-data>
......@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<!DOCTYPE oor:component-data SYSTEM "../../../../component-update.dtd">
<oor:component-data xmlns:install="http://openoffice.org/2004/installation" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" oor:package="org.openoffice.Office.extension" oor:name="PresenterScreen">
<oor:component-data xmlns:install="http://openoffice.org/2004/installation" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" oor:package="org.openoffice.Office" oor:name="PresenterScreen">
<node oor:name="PresenterScreenSettings">
<node oor:name="ToolBars">
<node oor:name="ToolBar" oor:op="replace">
......@@ -30,7 +30,7 @@
<node oor:name="Icon">
<prop oor:name="NormalFileName"><value>bitmaps/ButtonSlidePreviousNormal.png</value></prop>
</node>
<prop oor:name="Action"><value>vnd.com.sun.star.comp.PresenterScreen:PrevSlide</value></prop>
<prop oor:name="Action"><value>vnd.org.libreoffice.presenterscreen:PrevSlide</value></prop>
<node oor:name="Font">
<prop oor:name="Size"><value>12</value></prop>
<prop oor:name="Style"><value>Bold</value></prop>
......@@ -60,7 +60,7 @@
<node oor:name="Icon">
<prop oor:name="NormalFileName"><value>bitmaps/ButtonEffectNextNormal.png</value></prop>
</node>
<prop oor:name="Action"><value>vnd.com.sun.star.comp.PresenterScreen:NextEffect</value></prop>
<prop oor:name="Action"><value>vnd.org.libreoffice.presenterscreen:NextEffect</value></prop>
<node oor:name="Font">
<prop oor:name="Size"><value>12</value></prop>
<prop oor:name="Style"><value>Bold</value></prop>
......@@ -90,7 +90,7 @@
<node oor:name="Icon">
<prop oor:name="NormalFileName"><value>bitmaps/ButtonNotesNormal.png</value></prop>
</node>
<prop oor:name="Action"><value>vnd.com.sun.star.comp.PresenterScreen:ShowNotes</value></prop>
<prop oor:name="Action"><value>vnd.org.libreoffice.presenterscreen:ShowNotes</value></prop>
<node oor:name="Font">
<prop oor:name="Size"><value>12</value></prop>
<prop oor:name="Style"><value>Bold</value></prop>
......@@ -113,7 +113,7 @@
<node oor:name="Font">
<prop oor:name="Color"><value>FFFFFF</value></prop>
</node>
<prop oor:name="Action"><value>vnd.com.sun.star.comp.PresenterScreen:CloseNotes</value></prop>
<prop oor:name="Action"><value>vnd.org.libreoffice.presenterscreen:CloseNotes</value></prop>
</node>
<node oor:name="Disabled">
<node oor:name="Icon">
......@@ -129,7 +129,7 @@
<node oor:name="Icon">
<prop oor:name="NormalFileName"><value>bitmaps/ButtonSlideSorterNormal.png</value></prop>
</node>
<prop oor:name="Action"><value>vnd.com.sun.star.comp.PresenterScreen:ShowSlideSorter</value></prop>
<prop oor:name="Action"><value>vnd.org.libreoffice.presenterscreen:ShowSlideSorter</value></prop>
<node oor:name="Font">
<prop oor:name="Size"><value>12</value></prop>
<prop oor:name="Style"><value>Bold</value></prop>
......@@ -152,7 +152,7 @@
<node oor:name="Font">
<prop oor:name="Color"><value>FFFFFF</value></prop>
</node>
<prop oor:name="Action"><value>vnd.com.sun.star.comp.PresenterScreen:CloseSlideSorter</value></prop>
<prop oor:name="Action"><value>vnd.org.libreoffice.presenterscreen:CloseSlideSorter</value></prop>
</node>
<node oor:name="Disabled">
<node oor:name="Icon">
......@@ -220,7 +220,7 @@
<node oor:name="Icon">
<prop oor:name="NormalFileName"><value>bitmaps/ButtonSwitchMonitorNormal.png</value></prop>
</node>
<prop oor:name="Action"><value>vnd.com.sun.star.comp.PresenterScreen:SwitchMonitor</value></prop>
<prop oor:name="Action"><value>vnd.org.libreoffice.presenterscreen:SwitchMonitor</value></prop>
<node oor:name="Font">
<prop oor:name="Size"><value>12</value></prop>
<prop oor:name="Style"><value>Bold</value></prop>
......@@ -258,7 +258,7 @@
<node oor:name="Icon">
<prop oor:name="NormalFileName"><value>bitmaps/ButtonHelpNormal.png</value></prop>
</node>
<prop oor:name="Action"><value>vnd.com.sun.star.comp.PresenterScreen:ShowHelp</value></prop>
<prop oor:name="Action"><value>vnd.org.libreoffice.presenterscreen:ShowHelp</value></prop>
<node oor:name="Font">
<prop oor:name="Size"><value>12</value></prop>
<prop oor:name="Style"><value>Bold</value></prop>
......@@ -281,7 +281,7 @@
<node oor:name="Font">
<prop oor:name="Color"><value>FFFFFF</value></prop>
</node>
<prop oor:name="Action"><value>vnd.com.sun.star.comp.PresenterScreen:CloseHelp</value></prop>
<prop oor:name="Action"><value>vnd.org.libreoffice.presenterscreen:CloseHelp</value></prop>
</node>
<node oor:name="Disabled">
<node oor:name="Icon">
......@@ -312,7 +312,7 @@
<node oor:name="Icon">
<prop oor:name="NormalFileName"><value>bitmaps/ButtonPlusNormal.png</value></prop>
</node>
<prop oor:name="Action"><value>vnd.com.sun.star.comp.PresenterScreen:GrowNotesFont</value></prop>
<prop oor:name="Action"><value>vnd.org.libreoffice.presenterscreen:GrowNotesFont</value></prop>
</node>
<node oor:name="MouseOver">
<node oor:name="Icon">
......@@ -332,7 +332,7 @@
<node oor:name="Icon">
<prop oor:name="NormalFileName"><value>bitmaps/ButtonMinusNormal.png</value></prop>
</node>
<prop oor:name="Action"><value>vnd.com.sun.star.comp.PresenterScreen:ShrinkNotesFont</value></prop>
<prop oor:name="Action"><value>vnd.org.libreoffice.presenterscreen:ShrinkNotesFont</value></prop>
</node>
<node oor:name="MouseOver">
<node oor:name="Icon">
......@@ -354,21 +354,21 @@
<prop oor:name="Text">
<value xml:lang="en-US">Close</value>
</prop>
<prop oor:name="Action"><value>vnd.com.sun.star.comp.PresenterScreen:CloseSlideSorter</value></prop>
<prop oor:name="Action"><value>vnd.org.libreoffice.presenterscreen:CloseSlideSorter</value></prop>
</node>
<node oor:name="NotesViewCloser" oor:op="replace">
<prop oor:name="Name"><value>NotesViewCloser</value></prop>
<prop oor:name="Text">
<value xml:lang="en-US">Close</value>
</prop>
<prop oor:name="Action"><value>vnd.com.sun.star.comp.PresenterScreen:CloseNotes</value></prop>
<prop oor:name="Action"><value>vnd.org.libreoffice.presenterscreen:CloseNotes</value></prop>
</node>
<node oor:name="HelpViewCloser" oor:op="replace">
<prop oor:name="Name"><value>HelpViewCloser</value></prop>
<prop oor:name="Text">
<value xml:lang="en-US">Close</value>
</prop>
<prop oor:name="Action"><value>vnd.com.sun.star.comp.PresenterScreen:CloseHelp</value></prop>
<prop oor:name="Action"><value>vnd.org.libreoffice.presenterscreen:CloseHelp</value></prop>
</node>
</node>
<node oor:name="ScrollBar">
......
......@@ -17,7 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<!DOCTYPE oor:component-data SYSTEM "../../../../component-update.dtd">
<oor:component-data oor:name="ProtocolHandler" oor:package="org.openoffice.Office" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<oor:component-data oor:name="ProtocolHandler"
oor:package="org.openoffice.Office"
xmlns:install="http://openoffice.org/2004/installation"
xmlns:oor="http://openoffice.org/2001/registry">
<node oor:name="HandlerSet">
<node oor:name="com.sun.star.comp.sfx2.SfxMacroLoader" oor:op="replace">
<prop oor:name="Protocols">
......@@ -59,5 +62,11 @@
<value>vnd.sun.star.findbar:*</value>
</prop>
</node>
<node oor:name="org.libreoffice.comp.PresenterScreenProtocolHandler"
oor:op="replace" install:module="impress">
<prop oor:name="Protocols">
<value>vnd.org.libreoffice.presenterscreen:*</value>
</prop>
</node>
</node>
</oor:component-data>
......@@ -791,6 +791,11 @@
<prop oor:name="MigrationService">
<value>com.sun.star.migration.Extensions</value>
</prop>
<prop oor:name="ExcludedExtensions">
<value>
<it>com.sun.PresenterScreen-*</it>
</value>
</prop>
</node>
<node oor:name="Inet" oor:op="replace">
<prop oor:name="IncludedNodes">
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment