Kaydet (Commit) 496bc3cd authored tarafından Bryan Quigley's avatar Bryan Quigley Kaydeden (comit) Stephan Bergmann

fdo#45071 Remove Libreoffice browser plugin

This removes ENABLE_NPAPI_INTO_BROWSER while it should keep
ENABLE_NPAPI_FROM_BROWSER (embed flash in LO) intact.
Signed-off-by: 's avatarStephan Bergmann <sbergman@redhat.com>
Conflicts:
	extensions/source/nsplugin/source/npshell.cxx

Change-Id: I80a9159a75653c74423d8fdc7c188568d3188e04
üst 1d62f6a2
......@@ -88,7 +88,6 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,ooo, \
$(eval $(call gb_Helper_register_executables,OOO, \
$(call gb_Helper_optional,CRASHREP,crashrep) \
gnome-open-url.bin \
$(if $(ENABLE_NPAPI_INTO_BROWSER),nsplugin) \
$(if $(filter-out ANDROID IOS MACOSX WNT,$(OS)),oosplash) \
$(if $(ENABLE_NPAPI_FROM_BROWSER),pluginapp.bin) \
soffice_bin \
......@@ -145,12 +144,6 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \
endif
ifeq ($(ENABLE_NPAPI_INTO_BROWSER),TRUE)
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
npsoplugin \
))
endif
ifeq ($(OS),MACOSX)
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \
......
......@@ -154,7 +154,6 @@ export ENABLE_MACOSX_SANDBOX=@ENABLE_MACOSX_SANDBOX@
export ENABLE_MEDIAWIKI=@ENABLE_MEDIAWIKI@
export ENABLE_MARIADBC=@ENABLE_MARIADBC@
export ENABLE_NPAPI_FROM_BROWSER=@ENABLE_NPAPI_FROM_BROWSER@
export ENABLE_NPAPI_INTO_BROWSER=@ENABLE_NPAPI_INTO_BROWSER@
export ENABLE_ONLINE_UPDATE=@ENABLE_ONLINE_UPDATE@
export ENABLE_OOENV=@ENABLE_OOENV@
export ENABLE_OPENGL=@ENABLE_OPENGL@
......
......@@ -1889,7 +1889,6 @@ AC_ARG_WITH(system-liblangtag,
AC_ARG_WITH(system-npapi-headers,
AS_HELP_STRING([--with-system-npapi-headers],
[Use NPAPI headers provided by system instead of bundled ones. Used in
extensions/source/nsplugin (ENABLE_NPAPI_INTO_BROWSER=TRUE) and
extensions/source/plugin (ENABLE_NPAPI_FROM_BROWSER=TRUE)]),,
[with_system_npapi_headers="$with_system_headers"]
)
......@@ -8964,8 +8963,7 @@ if test "$with_system_npapi_headers" = "yes"; then
NPAPI_HEADERS_CFLAGS=$(printf '%s' "$NPAPI_HEADERS_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
else
AC_MSG_RESULT([internal])
dnl ...but will not be built/used unless ENABLE_NPAPI_FROM_BROWSER or
dnl ENABLE_NPAPI_INTO_BROWSER is TRUE
dnl ...but will not be built/used unless ENABLE_NPAPI_FROM_BROWSER
SYSTEM_NPAPI_HEADERS=
fi
AC_SUBST(NPAPI_HEADERS_CFLAGS)
......@@ -9205,21 +9203,6 @@ else
fi
AC_SUBST(ENABLE_NPAPI_FROM_BROWSER)
dnl ===================================================================
dnl Check for NPAPI interface to plug LibreOffice into browser windows
dnl ===================================================================
AC_MSG_CHECKING([whether to plug LibreOffice into browser windows])
if test "$enable_mpl_subset" != yes -a \( "$_os" = WINNT -o "$_os" != Android -a "$_os" != Darwin -a "$_os" != iOS -a \
"$enable_headless" != yes -a "$enable_gtk" != no \)
then
AC_MSG_RESULT([yes])
ENABLE_NPAPI_INTO_BROWSER=TRUE
else
AC_MSG_RESULT([no])
ENABLE_NPAPI_INTO_BROWSER=
fi
AC_SUBST(ENABLE_NPAPI_INTO_BROWSER)
AC_MSG_CHECKING([whether to use X11])
dnl ***************************************
dnl testing for X libraries and includes...
......
......@@ -114,7 +114,6 @@
#define RID_SVXPAGE_INET_SECURITY (RID_SVX_START + 200)
#define RID_SVXPAGE_INET_PROXY (RID_SVX_START + 157)
#define RID_SVXPAGE_INET_MAIL (RID_SVX_START + 155)
#define RID_SVXPAGE_INET_MOZPLUGIN (RID_SVX_START + 2161)
#define RID_OFAPAGE_HTMLOPT (RID_OFA_START + 100)
#define OFA_TP_LANGUAGES (RID_OFA_START + 205)
#define OFA_TP_MISC (RID_OFA_START + 200)
......
......@@ -317,7 +317,6 @@ SfxTabPage* CreateGeneralTabPage( sal_uInt16 nId, Window* pParent, const SfxItem
case SID_SB_DBREGISTEROPTIONS: fnCreate = &::svx::DbRegistrationOptionsPage::Create; break;
case RID_SVXPAGE_ACCESSIBILITYCONFIG: fnCreate = &SvxAccessibilityOptionsTabPage::Create; break;
case RID_SVXPAGE_OPTIONS_CTL: fnCreate = &SvxCTLOptionsPage::Create ; break;
case RID_SVXPAGE_INET_MOZPLUGIN: fnCreate = &MozPluginTabPage::Create; break;
case RID_SVXPAGE_OPTIONS_JAVA: fnCreate = &SvxJavaOptionsPage::Create ; break;
case RID_SVXPAGE_ONLINEUPDATE: fnCreate = &SvxOnlineUpdateTabPage::Create; break;
case RID_OPTPAGE_CHART_DEFCOLORS: fnCreate = &SvxDefaultColorOptPage::Create; break;
......@@ -365,7 +364,6 @@ static OptionsMapping_Impl const OptionsMap_Impl[] =
{ "Internet", NULL, SID_INET_DLG },
{ "Internet", "Proxy", RID_SVXPAGE_INET_PROXY },
{ "Internet", "Email", RID_SVXPAGE_INET_MAIL },
{ "Internet", "MozillaPlugin", RID_SVXPAGE_INET_MOZPLUGIN },
{ "LoadSave", NULL, SID_FILTER_DLG },
{ "LoadSave", "General", RID_SFXPAGE_SAVE },
{ "LoadSave", "VBAProperties", SID_OPTFILTER_MSOFFICE },
......@@ -1765,33 +1763,6 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
// Disable E-mail tab-page on Windows
if ( nPageId == RID_SVXPAGE_INET_MAIL )
continue;
#endif
#if defined MACOSX
// Disable Mozilla Plug-in tab-page on Mac
if ( nPageId == RID_SVXPAGE_INET_MOZPLUGIN )
continue;
#endif
#ifdef LINUX
// Disable Mozilla Plug-in tab-page on Linux if we find a
// globally installed plugin
if ( nPageId == RID_SVXPAGE_INET_MOZPLUGIN ) {
struct stat sb;
char *p;
bool bHaveSystemWidePlugin = false;
char mozpaths[]="/usr/lib/mozilla/plugins/libnpsoplugin.so:/usr/lib/firefox/plugins/libnpsoplugin.so:/usr/lib/mozilla-firefox/plugins/libnpsoplugin.so:/usr/lib/iceweasel/plugins/libnpsoplugin.so:/usr/lib/iceape/plugins/libnpsoplugin.so:/usr/lib/browser-plugins/libnpsoplugin.so:/usr/lib64/browser-plugins/libnpsoplugin.so";
p = strtok(mozpaths, ":");
while (p != NULL) {
if (stat(p, &sb) != -1) {
bHaveSystemWidePlugin = true;
break;
}
p = strtok(NULL, ":");
}
if (bHaveSystemWidePlugin == true)
continue;
}
#endif
AddTabPage( nPageId, rInetArray.GetString(i), nGroup );
}
......
......@@ -64,7 +64,6 @@ Resource RID_OFADLG_OPTIONS_TREE_PAGES
< "Internet" ; 0; > ;
< "Proxy" ; RID_SVXPAGE_INET_PROXY; > ;
< "E-mail" ; RID_SVXPAGE_INET_MAIL; > ;
< "Browser Plug-in" ; RID_SVXPAGE_INET_MOZPLUGIN; > ;
};
};
StringArray SID_SW_EDITOPTIONS
......
......@@ -111,22 +111,6 @@ endif
endif # ENABLE_NPAPI_FROM_BROWSER=TRUE
ifeq ($(ENABLE_NPAPI_INTO_BROWSER),TRUE)
$(eval $(call gb_Module_add_targets,extensions,\
Executable_nsplugin \
Library_npsoplugin \
StaticLibrary_npsoenv \
))
ifeq ($(OS),WNT)
$(eval $(call gb_Module_add_targets,extensions,\
WinResTarget_npsoplugin \
))
endif
endif # ENABLE_NPAPI_INTO_BROWSER=TRUE
ifeq ($(OS),MACOSX)
$(eval $(call gb_Module_add_targets,extensions,\
Library_OOoSpotlightImporter \
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef INCLUDED_EXTENSIONS_SOURCE_NSPLUGIN_SOURCE_NPSHELL_HXX
#define INCLUDED_EXTENSIONS_SOURCE_NSPLUGIN_SOURCE_NPSHELL_HXX
#ifdef UNIX
#ifndef MOZ_X11
# define MOZ_X11
#endif
#include <gtk/gtk.h>
#include <X11/Xlib.h>
typedef struct _PluginInstance
{
uint16_t mode;
#ifdef MOZ_X11
Window window;
Display *display;
#endif
uint32_t x, y;
uint32_t width, height;
NPMIMEType type;
char *message;
NPP instance;
char *pluginsPageUrl;
char *pluginsFileUrl;
NPBool pluginsHidden;
#ifdef MOZ_X11
Visual* visual;
Colormap colormap;
#endif
unsigned int depth;
GtkWidget* dialogBox;
NPBool exists; /* Does the widget already exist? */
int action; /* What action should we take? (GET or REFRESH) */
} PluginInstance;
typedef struct _MimeTypeElement
{
PluginInstance *pinst;
struct _MimeTypeElement *next;
} MimeTypeElement;
#endif //end of UNIX
#ifdef WNT
#include <windows.h>
typedef struct _PluginInstance
{
NPWindow* fWindow;
uint16_t fMode;
HWND fhWnd;
WNDPROC fDefaultWindowProc;
} PluginInstance;
#endif //end of WNT
/* Extern functions */
extern "C" NPMIMEType dupMimeType(NPMIMEType type);
#endif // INCLUDED_EXTENSIONS_SOURCE_NSPLUGIN_SOURCE_NPSHELL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef INCLUDED_EXTENSIONS_SOURCE_NSPLUGIN_SOURCE_NS_DEBUG_HXX
#define INCLUDED_EXTENSIONS_SOURCE_NSPLUGIN_SOURCE_NS_DEBUG_HXX
#define NPP_PATH_MAX 1024
#define NPP_BUFFER_SIZE 1024
#define NSP_LOG_APPEND 2
#define NSP_LOG_NEW 0
#define debug_fprintf NSP_WriteLog
#include <config_lgpl.h>
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef INCLUDED_EXTENSIONS_SOURCE_NSPLUGIN_SOURCE_NSP_FUNC_HXX
#define INCLUDED_EXTENSIONS_SOURCE_NSPLUGIN_SOURCE_NSP_FUNC_HXX
// Some function different from UNIX and Window.
/************************ In UNIX ************************/
#ifdef UNIX
// for chdir()
#define NSP_CHDIR chdir
//for vsnprintf()
#define NSP_vsnprintf vsnprintf
//for pipe()
typedef int NSP_PIPE_FD;
#define NSP_Close_Pipe(fp) close(fp)
//for write(), read()
#define NSP_Write_Pipe(a, b, c, d) write(a, b, c)
#define NSP_Read_Pipe(a, b, c, d) read(a, b, c)
//for socket
#define NSP_CloseSocket close
//for sleep
#define NSP_Sleep(a) sleep(a)
//for mutex
#define NSP_Mute_Obj pthread_mutex_t
#define NSP_New_Mute_Obj() PTHREAD_MUTEX_INITIALIZER
#define NSP_Lock_Mute_Obj(a) pthread_mutex_lock(&a)
#define NSP_Unlock_Mute_Obj(a) pthread_mutex_unlock(&a)
#define STRNICMP(a, b ,c) strncasecmp(a, b ,c)
#endif //end of UNIX
/************************ In WINWS ************************/
#ifdef WNT
#include <windows.h>
//for chdir()
#define NSP_CHDIR(a) _chdir(a)
//for vsnprintf()
#define NSP_vsnprintf _vsnprintf
//for pipe()
typedef HANDLE NSP_PIPE_FD;
#define NSP_Close_Pipe(fp) CloseHandle(fp)
//for write(), read()
#define NSP_Write_Pipe(a, b, c, d) WriteFile(a, b, c, d, NULL)
#define NSP_Read_Pipe(a, b, c, d) ReadFile(a, b, c, d, NULL)
//for execl()
#define NSP_CreateProcess(a, b ) CreateProcess(a, b, NULL, NULL, TRUE, 0, NULL, NULL, NULL, NULL)
//for socket
#define NSP_CloseSocket closesocket
//for sleep
#define NSP_Sleep(a) Sleep(a*1000)
//for mutex
#define NSP_Mute_Obj HANDLE
#define NSP_New_Mute_Obj() CreateMutex (NULL, FALSE, NULL)
#define NSP_Lock_Mute_Obj(a) WaitForSingleObject(a, INFINITE)
#define NSP_Unlock_Mute_Obj(a) ReleaseMutex(a)
#define STRNICMP(a, b ,c) strnicmp(a, b ,c)
#endif //end of WNT
#endif //end of INCLUDED_EXTENSIONS_SOURCE_NSPLUGIN_SOURCE_NSP_FUNC_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include "nsp_windows.hxx"
int NSP_ResetWinStyl(LONG_PTR hParent)
{
int ret = 0;
#ifdef WNT
LONG_PTR dOldStyl = GetWindowLongPtr( (HWND)hParent, GWL_STYLE);
ret = dOldStyl;
if(ret != 0)
{
LONG_PTR dNewStyl = dOldStyl|WS_CLIPCHILDREN;
if(0 == SetWindowLongPtr((HWND)hParent, GWL_STYLE, dNewStyl))
ret = 0;
}
#endif
return ret;
}
int NSP_RestoreWinStyl(LONG_PTR hParent, LONG_PTR dOldStyle)
{
int ret = 0;
#ifdef WNT
ret = SetWindowLongPtr((HWND)hParent, GWL_STYLE, dOldStyle);
#endif
return ret;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef INCLUDED_EXTENSIONS_SOURCE_NSPLUGIN_SOURCE_NSP_WINDOWS_HXX
#define INCLUDED_EXTENSIONS_SOURCE_NSPLUGIN_SOURCE_NSP_WINDOWS_HXX
#ifdef WNT
#ifdef _MSC_VER
#pragma warning (push,1)
#pragma warning (disable:4668)
#endif
#include <windows.h>
#ifdef _MSC_VER
#pragma warning (pop)
#endif
#else
#ifndef LONG_PTR
#define LONG_PTR long
#endif
#endif
int NSP_ResetWinStyl(LONG_PTR hParent);
int NSP_RestoreWinStyl(LONG_PTR hParent, LONG_PTR dOldStyle);
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include <windows.h>
#include "version.hrc"
VS_VERSION_INFO VERSIONINFO
FILEVERSION VERSION, SUBVERSION, MICROVERSION, VERVARIANT
PRODUCTVERSION VERSION, SUBVERSION, MICROVERSION, VERVARIANT
FILEFLAGSMASK 0x3F
FILEFLAGS
#if defined(DEBUG)
VS_FF_DEBUG |
#endif
#ifdef VER_PREL
VS_FF_PRERELEASE |
#endif
0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
{
BLOCK "StringFileInfo"
{
BLOCK "040904E4"
{
// International StringTable
VALUE "CompanyName", PPS(RES_APP_VENDOR) "\0"
VALUE "ProductName", "LibreOffice Plug-in\0"
VALUE "ProductVersion", PPS(VER_LEVEL) "\0"
VALUE "FileVersion", PPS(VER_LEVEL) "\0"
VALUE "FileDescription", "LibreOffice Plug-in handles all its documents\0"
VALUE "OriginalFilename", "npsoplugin.dll\0"
VALUE "InternalName", "npsoplugin\0"
VALUE "LegalCopyright", S_CRIGHT " LibreOffice contributors. All rights reserved.\0"
VALUE "FileExtents", "sxc|stc|sxd|std|sxi|sti|sxm|sxw|sxg|stw|"
"odt|ott|odm|oth|ods|ots|odg|otg|odp|otp|odf|"
"fodt|fods|fogd|fodp|"
"doc|dot|docx|docm|dotx|dotm|rtf|xls|xlt|xla|xlsx|xlsm|xltx|xltm|ppt|pptx|pptm|potx|potm\0"
VALUE "FileOpenName", "StarOffice 6.0/7 Spreadsheet|"
"StarOffice 6.0/7 Spreadsheet Template|"
"StarOffice 6.0/7 Drawing|"
"StarOffice 6.0/7 Drawing Template|"
"StarOffice 6.0/7 Presentation|"
"StarOffice 6.0/7 Presentation Template|"
"StarOffice 6.0/7 Formula|"
"StarOffice 6.0/7 Text Document|"
"StarOffice 6.0/7 Master Document|"
"StarOffice 6.0/7 Text Document Template|"
"OpenDocument Text|"
"OpenDocument Text Template|"
"OpenDocument Master Document|"
"HTML Document Template|"
"OpenDocument Spreadsheet|"
"OpenDocument Spreadsheet Template|"
"OpenDocument Drawing|"
"OpenDocument Drawing Template|"
"OpenDocument Presentation|"
"OpenDocument Presentation Template|"
"OpenDocument Formula|"
"OpenDocument Text Flat XML|"
"OpenDocument Spreadsheet Flat XML|"
"OpenDocument Drawing Flat XML|"
"OpenDocument Presentation Flat XML|"
"MS Word 97-2003 document|"
"MS Word 97-2003 document template|"
"MS Word document|"
"MS Word document with macros|"
"MS Word document template|"
"MS Word document template with macros|"
"Rich Text Format|"
"MS Excel 97-2003 spreadsheet|"
"MS Excel 97-2003 spreadsheet template|"
"MS Excel 97-2003 spreadsheet|"
"MS Excel spreadsheet|"
"MS Excel spreadsheet with macros|"
"MS Excel spreadsheet template|"
"MS Excel spreadsheet template with macros|"
"MS PowerPoint 97-2003 presentation|"
"MS PowerPoint presentation|"
"MS PowerPoint presentation with macros|"
"MS PowerPoint presentation template|"
"MS PowerPoint presentation template with macros\0"
VALUE "MIMEType", "application/vnd.sun.xml.calc|"
"application/vnd.sun.xml.calc.template|"
"application/vnd.sun.xml.draw|"
"application/vnd.sun.xml.draw.template|"
"application/vnd.sun.xml.impress|"
"application/vnd.sun.xml.impress.template|"
"application/vnd.sun.xml.math|"
"application/vnd.sun.xml.writer|"
"application/vnd.sun.xml.writer.global|"
"application/vnd.sun.xml.writer.template|"
"application/vnd.oasis.opendocument.text|"
"application/vnd.oasis.opendocument.text-template|"
"application/vnd.oasis.opendocument.text-master|"
"application/vnd.oasis.opendocument.text-web|"
"application/vnd.oasis.opendocument.spreadsheet|"
"application/vnd.oasis.opendocument.spreadsheet-template|"
"application/vnd.oasis.opendocument.graphics|"
"application/vnd.oasis.opendocument.graphics-template|"
"application/vnd.oasis.opendocument.presentation|"
"application/vnd.oasis.opendocument.presentation-template|"
"application/vnd.oasis.opendocument.formula|"
"application/vnd.oasis.opendocument.text-flat-xml|"
"application/vnd.oasis.opendocument.spreadsheet-flat-xml|"
"application/vnd.oasis.opendocument.graphics-flat-xml|"
"application/vnd.oasis.opendocument.presentation-flat-xml|"
"application/msword|"
"application/msword|"
"application/vnd.openxmlformats-officedocument.wordprocessingml.document|"
"application/vnd.ms-word.document.macroenabled.12|"
"application/vnd.openxmlformats-officedocument.wordprocessingml.template|"
"application/vnd.ms-word.template.macroenabled.12|"
"application/rtf|"
"application/vnd.ms-excel|"
"application/vnd.ms-excel|"
"application/vnd.ms-excel|"
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet|"
"application/vnd.ms-excel.sheet.macroenabled.12|"
"application/vnd.openxmlformats-officedocument.spreadsheetml.template|"
"application/vnd.ms-excel.template.macroenabled.12|"
"application/vnd.ms-powerpoint|"
"application/vnd.openxmlformats-officedocument.presentationml.presentation|"
"application/vnd.ms-powerpoint.presentation.macroenabled.12|"
"application/vnd.openxmlformats-officedocument.presentationml.template|"
"application/vnd.ms-powerpoint.template.macroenabled.12\0"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x0409, 1252
}
}
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include "so_closelistener.hxx"
using namespace ::com::sun::star;
void SAL_CALL PluginDocumentClosePreventer::queryClosing( const lang::EventObject& /*aEvent*/, sal_Bool /*bDeliverOwnership*/ )
throw ( uno::RuntimeException, util::CloseVetoException, std::exception )
{
if ( m_bPreventClose )
throw util::CloseVetoException();
}
void SAL_CALL PluginDocumentClosePreventer::notifyClosing( const lang::EventObject& /*aEvent*/ ) throw ( uno::RuntimeException, std::exception )
{}
void SAL_CALL PluginDocumentClosePreventer::disposing( const lang::EventObject& /*aEvent*/ ) throw ( uno::RuntimeException, std::exception )
{}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef INCLUDED_EXTENSIONS_SOURCE_NSPLUGIN_SOURCE_SO_CLOSELISTENER_HXX
#define INCLUDED_EXTENSIONS_SOURCE_NSPLUGIN_SOURCE_SO_CLOSELISTENER_HXX
#include <com/sun/star/util/XCloseListener.hpp>
#include <cppuhelper/implbase1.hxx>
class PluginDocumentClosePreventer : public ::cppu::WeakImplHelper1< ::com::sun::star::util::XCloseListener >
{
bool m_bPreventClose;
public:
PluginDocumentClosePreventer()
: m_bPreventClose( true )
{}
void StopPreventClose() { m_bPreventClose = false; }
virtual void SAL_CALL queryClosing( const ::com::sun::star::lang::EventObject& aEvent, sal_Bool bDeliverOwnership )
throw ( ::com::sun::star::uno::RuntimeException, ::com::sun::star::util::CloseVetoException, std::exception ) SAL_OVERRIDE;
virtual void SAL_CALL notifyClosing( const ::com::sun::star::lang::EventObject& aEvent ) throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE ;
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw ( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE ;
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef INCLUDED_EXTENSIONS_SOURCE_NSPLUGIN_SOURCE_SO_ENV_HXX
#define INCLUDED_EXTENSIONS_SOURCE_NSPLUGIN_SOURCE_SO_ENV_HXX
#ifdef UNIX
#include <unistd.h>
#include <pthread.h>
#include <sys/types.h>
#include <sys/socket.h>
#endif //end of UNIX
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#define SO_SERVER_PORT 8100
#ifdef UNIX
#define STAROFFICE_VERSION_FILE "/.sversionrc"
#define STAROFFICE_EXE_FILE_NAME "soffice"
#endif
#ifdef WNT
#define STAROFFICE_VERSION_FILE "\\sversion.ini"
#define STAROFFICE_EXE_FILE_NAME "soffice.exe"
#endif
#define SECTION_NAME "Versions"
#define SOFFICE_VERSION "StarOffice 8"
#define APP_ERROR 1
#define APP_CHAR 2
#define APP_WCHAR 3
// return the install path of staroffice, return value like "/home/build/staroffice"
const char* findInstallDir();
// return SO program dir absolute path, like "/home/build/staroffice/program"
const char* findProgramDir();
#ifdef WNT
// return SO executable absolute path, like "/home/build/staroffice/program/soffice"
const char* findSofficeExecutable();
// change Dos path such as c:\program\soffice to c:/program/soffice
int DosToUnixPath(char*);
#endif
//change Unix path such as program\soffice to program/soffice
int UnixToDosPath(char*);
void NSP_WriteLog(int level, const char* pFormat, ...);
int restoreUTF8(char* pPath);
char* NSP_getPluginName();
char* NSP_getPluginDesc();
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef INCLUDED_EXTENSIONS_SOURCE_NSPLUGIN_SOURCE_SO_INSTANCE_HXX
#define INCLUDED_EXTENSIONS_SOURCE_NSPLUGIN_SOURCE_SO_INSTANCE_HXX
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <osl/diagnose.h>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
#include <com/sun/star/uno/XNamingService.hpp>
#include <com/sun/star/connection/ConnectionSetupException.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/util/URL.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/io/XSeekable.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/util/XCloseListener.hpp>
#include <cppuhelper/bootstrap.hxx>
#include <com/sun/star/awt/WindowDescriptor.hpp>
#include <rtl/ustring.hxx>
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/frame/XFrame2.hpp>
#include <com/sun/star/frame/XDispatchHelper.hpp>
#include "ns_debug.hxx"
typedef sal_Int32 NSP_HWND;
class PluginDocumentClosePreventer;
class SoPluginInstance
{
private:
// Service manager of remote Soffice
static ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxRemoteMSF;
// Dir where Soffice is in, ie. /Soffice7/program
static char sSO_Dir[NPP_PATH_MAX];
int m_nWidth;
int m_nHeight;
int m_nX;
int m_nY;
sal_Int16 m_nFlag; // Set to 12 during initialization
OUString m_sURL; // URL of the document to be loaded
bool m_bInit; // If the Plugin instance is initilaized.
NSP_HWND m_hParent; // Windows handle of parent window
long m_pParent; // ID of this instance - get from NPP
// StarOffice window
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xUnoWin;
// StarOffice component window
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xComponent;
// StarOffice frame for this Plugin
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame2 > m_xFrame;
// Frames of StarOffice
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrames > m_xFrames;
// Dispatcher of frame
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchHelper > m_xDispatcher;
// DispatchProvider of frame
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xDispatchProvider;
// the closelistener that will prevent document closing
PluginDocumentClosePreventer* m_pCloseListener;
::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseListener > m_xCloseListener;
bool LoadDocument(NSP_HWND hParent);
long m_dParentStyl; // Old Windows style of parent window
public:
SoPluginInstance(long iInstance, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF);
virtual ~SoPluginInstance(void);
virtual bool SetURL(char* aURL);
virtual bool IsInit(void){return m_bInit;};
virtual bool SetWindow(NSP_HWND hParent, int x, int y, int w, int h) ;
virtual bool Destroy(void) ;
virtual bool Print(void) ;
static bool ShutDown(void);
static char* GetSODir(void) {return sSO_Dir;};
long GetParent(void) {return m_pParent;};
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef INCLUDED_EXTENSIONS_SOURCE_NSPLUGIN_SOURCE_SO_MSG_HXX
#define INCLUDED_EXTENSIONS_SOURCE_NSPLUGIN_SOURCE_SO_MSG_HXX
enum msg_type
{
SO_EMPTY, // 0
SO_SET_WINDOW, // 1
SO_SET_URL, // 2
SO_NEW_INSTANCE, // 3
SO_DESTROY, // 4
SO_SHUTDOWN, // 5
SO_PRINT // 6
};
#ifdef _WIN64
#define plugin_Int32 unsigned __int64
#else
#define plugin_Int32 unsigned long int
#endif
typedef struct _PLUGIN_MSG {
plugin_Int32 msg_id;
plugin_Int32 instance_id;
plugin_Int32 wnd_id;
plugin_Int32 wnd_x;
plugin_Int32 wnd_y;
plugin_Int32 wnd_w;
plugin_Int32 wnd_h;
char url[484];
} PLUGIN_MSG;
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -10,14 +10,4 @@
$(eval $(call gb_Module_Module,np_sdk))
ifneq ($(ENABLE_NPAPI_FROM_BROWSER)$(ENABLE_NPAPI_INTO_BROWSER),)
ifeq ($(ENABLE_NPAPI_INTO_BROWSER),TRUE)
$(eval $(call gb_Module_add_targets,np_sdk,\
StaticLibrary_nputils \
))
endif
endif
# vim: set noet sw=4 ts=4:
......@@ -21,7 +21,6 @@ $(eval $(call gb_InstallModule_define_if_set,scp2/ooo,\
ENABLE_KDE \
ENABLE_MACOSX_SANDBOX \
ENABLE_NPAPI_FROM_BROWSER \
ENABLE_NPAPI_INTO_BROWSER \
ENABLE_ONLINE_UPDATE \
ENABLE_TDE \
SYSTEM_CURL \
......
......@@ -583,15 +583,6 @@ File gid_Brand_File_Bin_Unopkg
Name = "unopkg.bin";
End
#if defined ENABLE_NPAPI_INTO_BROWSER
File gid_Brand_File_Lib_Npsoplugin
BIN_FILE_BODY;
Name = SPECIAL_NAME(npsoplugin);
Dir = gid_Brand_Dir_Program;
Styles = (PACKED);
End
#endif
File gid_Brand_File_Bmp_IntroAboutShell
TXT_FILE_BODY;
Dir = FILELIST_DIR;
......
......@@ -122,19 +122,6 @@ File gid_File_Basic_Tutorials
Name = "wizards_basicsrvtutorials.filelist";
End
#if defined ENABLE_NPAPI_INTO_BROWSER
File gid_File_Exe_Nsplugin
BIN_FILE_BODY;
Styles = (PACKED);
Dir = gid_Brand_Dir_Program;
#ifdef UNX
Name = "nsplugin";
#else
Name = "nsplugin.exe";
#endif
End
#endif
File gid_File_Bin_UIPreviewer
BIN_FILE_BODY;
Dir = gid_Brand_Dir_Program;
......
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