summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2012-03-09 19:34:28 +0100
committerMatúš Kukan <matus.kukan@gmail.com>2012-03-10 21:23:18 +0100
commit156202b06270a90a4b73370d04401486145076d2 (patch)
treedc6e5bda1d418990d8b8f7cb29ef231b11d3ae40 /extensions
parentf2abfdb94e111ba551bb97ec06fa5b57be3f6299 (diff)
extensions: export npsoplugin's symbols
Diffstat (limited to 'extensions')
-rw-r--r--extensions/Library_npsoplugin.mk27
-rw-r--r--extensions/source/nsplugin/source/npshell.cxx37
2 files changed, 46 insertions, 18 deletions
diff --git a/extensions/Library_npsoplugin.mk b/extensions/Library_npsoplugin.mk
index 2c5ad4f6c792..a4d3e3b3ea11 100644
--- a/extensions/Library_npsoplugin.mk
+++ b/extensions/Library_npsoplugin.mk
@@ -62,7 +62,7 @@ endif
endif # GUI=UNX
-ifeq ($(GUI),WNT)
+ifeq ($(OS),WNT)
$(eval $(call gb_Library_add_linked_static_libs,npsoplugin,\
ooopathutils \
@@ -86,6 +86,29 @@ $(eval $(call gb_Library_add_defs,npsoplugin,\
-DENGLISH \
))
+ifeq ($(COM),MSC)
+$(eval $(call gb_Library_add_ldflags,npsoplugin,\
+ /EXPORT:NPP_GetMIMEDescription \
+ /EXPORT:NPP_Initialize \
+ /EXPORT:NPP_Shutdown \
+ /EXPORT:NPP_New \
+ /EXPORT:NPP_Destroy \
+ /EXPORT:NPP_SetWindow \
+ /EXPORT:NPP_NewStream \
+ /EXPORT:NPP_WriteReady \
+ /EXPORT:NPP_Write \
+ /EXPORT:NPP_DestroyStream \
+ /EXPORT:NPP_StreamAsFile \
+ /EXPORT:NPP_URLNotify \
+ /EXPORT:NPP_Print \
+ /EXPORT:NPP_Shutdown \
+ /EXPORT:NP_GetEntryPoints \
+ /EXPORT:NP_Initialize \
+ /EXPORT:NP_Shutdown \
+ /EXPORT:NP_GetMIMEDescription \
+))
+endif
+
# Trick to get rid of the default.res to avoid duplicate VERSION
# resource: Set NATIVERES for npsoplugin to be *only* npsoplugin_res
@@ -99,4 +122,4 @@ $(eval $(call gb_Library_add_exception_objects,npsoplugin,\
extensions/source/nsplugin/source/npshell \
))
-# vim:set shiftwidth=4 softtabstop=4 expandtab:
+# vim:set shiftwidth=4 softtabstop=4 noexpandtab:
diff --git a/extensions/source/nsplugin/source/npshell.cxx b/extensions/source/nsplugin/source/npshell.cxx
index 83f2371602e8..81ce8fb098de 100644
--- a/extensions/source/nsplugin/source/npshell.cxx
+++ b/extensions/source/nsplugin/source/npshell.cxx
@@ -80,6 +80,12 @@
#include <comphelper/documentconstants.hxx>
+#ifdef _MSC_VER
+#define NP_DLLPUBLIC
+#else
+#define NP_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#endif
+
/***********************************************************************
*
* Implementations of plugin API functions
@@ -361,6 +367,7 @@ MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_ASCII ":odp:OpenDocument Presentation;"
MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE_ASCII ":otp:OpenDocument Presentation Template;"
MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_ASCII ":odf:OpenDocument Formula;" );
+NP_DLLPUBLIC
#ifndef HAVE_NON_CONST_NPP_GETMIMEDESCRIPTION
const
#endif
@@ -372,9 +379,7 @@ NPP_GetMIMEDescription(void)
}
#ifdef UNIX
-SAL_DLLPUBLIC_EXPORT NPError
-// I am not actually sure wrt this, it ast least compiles with external
-// npapi.h now...
+NP_DLLPUBLIC NPError
NPP_GetValue(NPP /*instance*/, NPPVariable variable, void *value)
{
NPError err = NPERR_NO_ERROR;
@@ -407,7 +412,7 @@ dupMimeType(NPMIMEType type)
}
#endif // end of UNIX
-SAL_DLLPUBLIC_EXPORT NPError
+NP_DLLPUBLIC NPError
NPP_Initialize(void)
{
debug_fprintf(NSP_LOG_NEW, "NS Plugin begin initialize.\n");
@@ -415,14 +420,14 @@ NPP_Initialize(void)
}
#ifdef OJI
-jref
+NP_DLLPUBLIC jref
NPP_GetJavaClass()
{
return NULL;
}
#endif
-SAL_DLLPUBLIC_EXPORT void
+NP_DLLPUBLIC void
NPP_Shutdown(void)
{
PLUGIN_MSG msg;
@@ -438,7 +443,7 @@ NPP_Shutdown(void)
#endif
}
-NPError NP_LOADDS
+NP_DLLPUBLIC NPError NP_LOADDS
NPP_New(NPMIMEType pluginType,
NPP instance,
uint16_t mode,
@@ -490,7 +495,7 @@ NPP_New(NPMIMEType pluginType,
return NPERR_NO_ERROR;
}
-NPError NP_LOADDS
+NP_DLLPUBLIC NPError NP_LOADDS
NPP_Destroy(NPP instance, NPSavedData** /*save*/)
{
debug_fprintf(NSP_LOG_APPEND, "print by Nsplugin, enter NPP_Destroy.\n");
@@ -535,7 +540,7 @@ NPP_Destroy(NPP instance, NPSavedData** /*save*/)
}
-NPError NP_LOADDS
+NP_DLLPUBLIC NPError NP_LOADDS
NPP_SetWindow(NPP instance, NPWindow* window)
{
PluginInstance* This;
@@ -629,7 +634,7 @@ NPP_SetWindow(NPP instance, NPWindow* window)
}
-NPError NP_LOADDS
+NP_DLLPUBLIC NPError NP_LOADDS
NPP_NewStream(NPP instance,
NPMIMEType /*type*/,
NPStream* /*stream*/,
@@ -651,21 +656,21 @@ int32_t STREAMBUFSIZE = 0X0FFFFFFF;
* mode so we can take any size stream in our
* write call (since we ignore it) */
-int32_t NP_LOADDS
+NP_DLLPUBLIC int32_t NP_LOADDS
NPP_WriteReady(NPP /*instance*/, NPStream* /*stream*/)
{
return STREAMBUFSIZE;
}
-int32_t NP_LOADDS
+NP_DLLPUBLIC int32_t NP_LOADDS
NPP_Write(NPP /*instance*/, NPStream* /*stream*/, int32_t /*offset*/, int32_t len, void* /*buffer*/)
{
return len; /* The number of bytes accepted */
}
-NPError NP_LOADDS
+NP_DLLPUBLIC NPError NP_LOADDS
NPP_DestroyStream(NPP instance, NPStream* /*stream*/, NPError /*reason*/)
{
if (instance == NULL)
@@ -674,7 +679,7 @@ NPP_DestroyStream(NPP instance, NPStream* /*stream*/, NPError /*reason*/)
}
// save fname to another file with the original file name
-void NP_LOADDS
+NP_DLLPUBLIC void NP_LOADDS
NPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname)
{
debug_fprintf(NSP_LOG_APPEND, "Into Stream\n");
@@ -815,14 +820,14 @@ NPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname)
debug_fprintf(NSP_LOG_APPEND, "NPP_StreamAsFile send SO_SET_WINDOW return failure \n");
}
-void NP_LOADDS
+NP_DLLPUBLIC void NP_LOADDS
NPP_URLNotify(NPP /*instance*/, const char* /*url*/,
NPReason /*reason*/, void* /*notifyData*/)
{
}
-void NP_LOADDS
+NP_DLLPUBLIC void NP_LOADDS
NPP_Print(NPP instance, NPPrint* printInfo)
{
if(printInfo == NULL)