summaryrefslogtreecommitdiff
path: root/extensions/source/nsplugin
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/nsplugin')
-rw-r--r--extensions/source/nsplugin/source/npshell.cxx2
-rw-r--r--extensions/source/nsplugin/source/npshell.hxx2
-rw-r--r--extensions/source/nsplugin/source/ns_debug.hxx2
-rw-r--r--extensions/source/nsplugin/source/nsp_func.hxx8
-rw-r--r--extensions/source/nsplugin/source/nsp_windows.cxx16
-rw-r--r--extensions/source/nsplugin/source/nsp_windows.hxx4
-rw-r--r--extensions/source/nsplugin/source/nsplugin_oo.rc2
-rw-r--r--extensions/source/nsplugin/source/so_closelistener.cxx2
-rw-r--r--extensions/source/nsplugin/source/so_closelistener.hxx4
-rw-r--r--extensions/source/nsplugin/source/so_env.cxx4
-rw-r--r--extensions/source/nsplugin/source/so_env.hxx6
-rw-r--r--extensions/source/nsplugin/source/so_instance.cxx130
-rw-r--r--extensions/source/nsplugin/source/so_instance.hxx14
-rw-r--r--extensions/source/nsplugin/source/so_main.cxx38
-rw-r--r--extensions/source/nsplugin/source/so_msg.hxx4
15 files changed, 119 insertions, 119 deletions
diff --git a/extensions/source/nsplugin/source/npshell.cxx b/extensions/source/nsplugin/source/npshell.cxx
index d009774aeb25..d19b7b6d2482 100644
--- a/extensions/source/nsplugin/source/npshell.cxx
+++ b/extensions/source/nsplugin/source/npshell.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/extensions/source/nsplugin/source/npshell.hxx b/extensions/source/nsplugin/source/npshell.hxx
index 8af8bc687535..e3e44c93ac09 100644
--- a/extensions/source/nsplugin/source/npshell.hxx
+++ b/extensions/source/nsplugin/source/npshell.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/extensions/source/nsplugin/source/ns_debug.hxx b/extensions/source/nsplugin/source/ns_debug.hxx
index 83dc5a695534..d2ee5b0bd2cd 100644
--- a/extensions/source/nsplugin/source/ns_debug.hxx
+++ b/extensions/source/nsplugin/source/ns_debug.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/extensions/source/nsplugin/source/nsp_func.hxx b/extensions/source/nsplugin/source/nsp_func.hxx
index 566236a24ad3..c9ebbc7d747c 100644
--- a/extensions/source/nsplugin/source/nsp_func.hxx
+++ b/extensions/source/nsplugin/source/nsp_func.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -49,7 +49,7 @@ typedef int NSP_PIPE_FD;
#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
+//for socket
#define NSP_CloseSocket close
//for sleep
@@ -86,13 +86,13 @@ SECURITY_ATTRIBUTES NSP_pipe_access = { sizeof(SECURITY_ATTRIBUTES), NULL, TRUE
//for execl()
#define NSP_CreateProcess(a, b ) CreateProcess(a, b, NULL, NULL, TRUE, 0, NULL, NULL, NULL, NULL)
-//for socket
+//for socket
#define NSP_CloseSocket closesocket
//for sleep
#define NSP_Sleep(a) Sleep(a*1000)
//for mutex
-#define NSP_Mute_Obj HANDLE
+#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)
diff --git a/extensions/source/nsplugin/source/nsp_windows.cxx b/extensions/source/nsplugin/source/nsp_windows.cxx
index fe9060d134b1..85cabfbb278c 100644
--- a/extensions/source/nsplugin/source/nsp_windows.cxx
+++ b/extensions/source/nsplugin/source/nsp_windows.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -39,28 +39,28 @@
int NSP_ResetWinStyl(long hParent)
{
int ret = 0;
-#ifdef WNT
+#ifdef WNT
LONG dOldStyl = GetWindowLong( (HWND)hParent, GWL_STYLE);
ret = dOldStyl;
-
+
if(ret != 0)
{
LONG dNewStyl = dOldStyl|WS_CLIPCHILDREN;
if(0 == SetWindowLong((HWND)hParent, GWL_STYLE, dNewStyl))
ret = 0;
}
-#endif
+#endif
return ret;
-
+
}
int NSP_RestoreWinStyl(long hParent, long dOldStyle)
{
int ret = 0;
-#ifdef WNT
+#ifdef WNT
ret = SetWindowLong((HWND)hParent, GWL_STYLE, dOldStyle);
-#endif
- return ret;
+#endif
+ return ret;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/nsplugin/source/nsp_windows.hxx b/extensions/source/nsplugin/source/nsp_windows.hxx
index 1a2d49711973..4ed2f89c3906 100644
--- a/extensions/source/nsplugin/source/nsp_windows.hxx
+++ b/extensions/source/nsplugin/source/nsp_windows.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -29,7 +29,7 @@
#ifndef __NSP_WINDOWS_HXX__
#define __NSP_WINDOWS_HXX__
-
+
int NSP_ResetWinStyl(long hParent);
int NSP_RestoreWinStyl(long hParent, long dOldStyle);
diff --git a/extensions/source/nsplugin/source/nsplugin_oo.rc b/extensions/source/nsplugin/source/nsplugin_oo.rc
index 42a2a642e023..9d30de3918a1 100644
--- a/extensions/source/nsplugin/source/nsplugin_oo.rc
+++ b/extensions/source/nsplugin/source/nsplugin_oo.rc
@@ -26,5 +26,5 @@
************************************************************************/
#define ADDITIONAL_VERINFO1 value "FileExtents", "sdc|sds|sda|sdd|sdp|smf|vor|sgl|sdw|sxc|stc|sxd|std|sxi|sti|sxm|sxw|sxg|stw|odt|ott|odm|oth|ods|ots|odg|otg|odp|otp|odf\0"\
value "FileOpenName", "StarCalc 3.0 - 5.0|StarChart 3.0 - 5.0|StarDraw 3.0 - 5.0|StarImpress 3.0 - 5.0|StarImpress-packed 3.0 - 5.0|StarMath 3.0 - 5.0|StarWriter Template 3.0 - 5.0|StarWriter Global 3.0 - 5.0|StarWriter 3.0 - 5.0|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\0"
-#define ADDITIONAL_VERINFO2 value "FileDescription", "OpenOffice.org Plug-in handles all its documents" value "ProductName", "OpenOffice.org Plug-in" value "MIMEType", "application/vnd.stardivision.calc|application/vnd.stardivision.chart|application/vnd.stardivision.draw|application/vnd.stardivision.impress|application/vnd.stardivision.impress-packed|application/vnd.stardivision.math|application/vnd.stardivision.writer|application/vnd.stardivision.writer-global|application/vnd.staroffice.writer|application/vnd.sun.xml.calc|application/vnd.sun.xml.calc.template|application/vnd.sun.xml.draw|application/vnd.sun.xml.draw.template|"
+#define ADDITIONAL_VERINFO2 value "FileDescription", "LibreOffice Plug-in handles all its documents" value "ProductName", "LibreOffice Plug-in" value "MIMEType", "application/vnd.stardivision.calc|application/vnd.stardivision.chart|application/vnd.stardivision.draw|application/vnd.stardivision.impress|application/vnd.stardivision.impress-packed|application/vnd.stardivision.math|application/vnd.stardivision.writer|application/vnd.stardivision.writer-global|application/vnd.staroffice.writer|application/vnd.sun.xml.calc|application/vnd.sun.xml.calc.template|application/vnd.sun.xml.draw|application/vnd.sun.xml.draw.template|"
#define ADDITIONAL_VERINFO3 "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\0"
diff --git a/extensions/source/nsplugin/source/so_closelistener.cxx b/extensions/source/nsplugin/source/so_closelistener.cxx
index 3b99747b104b..4fb26e593669 100644
--- a/extensions/source/nsplugin/source/so_closelistener.cxx
+++ b/extensions/source/nsplugin/source/so_closelistener.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
diff --git a/extensions/source/nsplugin/source/so_closelistener.hxx b/extensions/source/nsplugin/source/so_closelistener.hxx
index 733381544399..7451c44b8203 100644
--- a/extensions/source/nsplugin/source/so_closelistener.hxx
+++ b/extensions/source/nsplugin/source/so_closelistener.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -49,7 +49,7 @@ public:
virtual void SAL_CALL notifyClosing( const ::com::sun::star::lang::EventObject& aEvent ) throw ( ::com::sun::star::uno::RuntimeException ) ;
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw ( ::com::sun::star::uno::RuntimeException ) ;
-};
+};
#endif
diff --git a/extensions/source/nsplugin/source/so_env.cxx b/extensions/source/nsplugin/source/so_env.cxx
index bf782a74933f..8f8e436f0d7d 100644
--- a/extensions/source/nsplugin/source/so_env.cxx
+++ b/extensions/source/nsplugin/source/so_env.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -110,7 +110,7 @@ restoreUTF8(char *pPath)
unsigned char *s, *d;
#define XDIGIT(c) ((c) <= '9' ? (c) - '0' : ((c) & 0x4F) - 'A' + 10)
-
+
s = d = (unsigned char *)pPath;
do {
if (*s == '%' && s[1] && s[2]) {
diff --git a/extensions/source/nsplugin/source/so_env.hxx b/extensions/source/nsplugin/source/so_env.hxx
index 5da85f23c467..9737425f428e 100644
--- a/extensions/source/nsplugin/source/so_env.hxx
+++ b/extensions/source/nsplugin/source/so_env.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -53,7 +53,7 @@
#ifdef UNIX
#define STAROFFICE_VERSION_FILE "/.sversionrc"
#define STAROFFICE_EXE_FILE_NAME "soffice"
-#endif
+#endif
#ifdef WNT
#define STAROFFICE_VERSION_FILE "\\sversion.ini"
#define STAROFFICE_EXE_FILE_NAME "soffice.exe"
@@ -72,7 +72,7 @@ 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();
diff --git a/extensions/source/nsplugin/source/so_instance.cxx b/extensions/source/nsplugin/source/so_instance.cxx
index f6320c22f33e..b94d2958a815 100644
--- a/extensions/source/nsplugin/source/so_instance.cxx
+++ b/extensions/source/nsplugin/source/so_instance.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -36,15 +36,15 @@
#include <com/sun/star/awt/XVclWindowPeer.hpp>
#include <com/sun/star/util/XCloseable.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
-#include <com/sun/star/presentation/XPresentation.hpp>
-#include <com/sun/star/presentation/XPresentationSupplier.hpp>
+#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+#include <com/sun/star/presentation/XPresentation.hpp>
+#include <com/sun/star/presentation/XPresentationSupplier.hpp>
#include <tools/debug.hxx>
#include <tools/color.hxx>
#include <vcl/window.hxx>
#include <rtl/textenc.h>
#include <rtl/locale.h>
-#include <osl/nlsupport.h>
+#include <osl/nlsupport.h>
#include <stdio.h>
#include <stdlib.h>
@@ -84,12 +84,12 @@ SoPluginInstance::SoPluginInstance(long pParent, Reference< XMultiServiceFactory
m_nHeight = 0;
m_nX = 0;
m_nY = 0;
- m_nFlag = 15;
+ m_nFlag = 15;
m_bInit = sal_False;
m_sURL = rtl::OUString::createFromAscii("");
m_hParent = 0;
m_pParent = pParent;
- m_dParentStyl = 0;
+ m_dParentStyl = 0;
mxRemoteMSF = xMSF;
}
@@ -102,8 +102,8 @@ sal_Bool SoPluginInstance::SetURL(char* aURL)
debug_fprintf(NSP_LOG_APPEND, "SoPluginInstance::SetURL %s\n", aURL);
sal_uInt16 encoding = 11;
- rtl_Locale* pLocale = NULL;
- osl_getProcessLocale(&pLocale);
+ rtl_Locale* pLocale = NULL;
+ osl_getProcessLocale(&pLocale);
encoding = osl_getTextEncodingFromLocale(pLocale);
m_sURL = ::rtl::OUString(aURL, strlen(aURL), encoding);
@@ -120,7 +120,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
{
debug_fprintf(NSP_LOG_APPEND, "only reset windows size\n");
m_xUnoWin->setPosSize( m_nX, m_nY, m_nWidth, m_nHeight, m_nFlag );
- debug_fprintf(NSP_LOG_APPEND, "set windows to x:%d y:%d w:%d h%d falg:%d\n",
+ debug_fprintf(NSP_LOG_APPEND, "set windows to x:%d y:%d w:%d h%d falg:%d\n",
m_nX, m_nY, m_nWidth, m_nHeight, m_nFlag);
return sal_True;
}
@@ -135,7 +135,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
try
{
// try to create netscape plugin window
- Reference< awt::XToolkit > xToolkit(
+ Reference< awt::XToolkit > xToolkit(
mxRemoteMSF->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.awt.Toolkit") ),
uno::UNO_QUERY );
if( !xToolkit.is() )
@@ -143,7 +143,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
debug_fprintf(NSP_LOG_APPEND, "Can not create Toolkit!\n");
return sal_False;
}
-
+
// prepare parameters for plugin window
css::uno::Any hwndParent = css::uno::makeAny((sal_Int32)hParent);
#ifdef UNIX
@@ -152,10 +152,10 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
#ifdef WNT
sal_Int16 nWindowType = css::lang::SystemDependent::SYSTEM_WIN32;
#endif //end of WNT
-
+
Reference< awt::XSystemChildFactory > xToolkitSystemChildFactory(xToolkit, uno::UNO_QUERY);
if (!xToolkitSystemChildFactory.is())
- {
+ {
debug_fprintf(NSP_LOG_APPEND, "print by Nsplugin, get xToolkitSystemChildFactory failure.\n");
return sal_False;
}
@@ -163,8 +163,8 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
debug_fprintf(NSP_LOG_APPEND, "print by Nsplugin, try to create plugin container window HWIN:%ld.\n", hParent);
// create the plugin window
- Reference< awt::XWindowPeer > xNewWinPeer =
- xToolkitSystemChildFactory->createSystemChild( hwndParent,
+ Reference< awt::XWindowPeer > xNewWinPeer =
+ xToolkitSystemChildFactory->createSystemChild( hwndParent,
css::uno::Sequence<sal_Int8>(), nWindowType );
if ( !xNewWinPeer.is() )
{
@@ -184,7 +184,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
xNewWinPeer->setBackground( COL_GRAY );
m_xUnoWin->setVisible( sal_True );
m_xUnoWin->setPosSize( m_nX, m_nY, m_nWidth, m_nHeight, m_nFlag );
- debug_fprintf(NSP_LOG_APPEND, "set windows to x:%d y:%d w:%d h%d falg:%d\n",
+ debug_fprintf(NSP_LOG_APPEND, "set windows to x:%d y:%d w:%d h%d falg:%d\n",
m_nX, m_nY, m_nWidth, m_nHeight, m_nFlag);
// create frame
@@ -199,7 +199,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
// initialize frame
m_xFrame->initialize( m_xUnoWin );
-
+
try
{
// currently ignore errors in this code
@@ -211,9 +211,9 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
}
catch( uno::Exception& )
{}
-
+
// get frames supplier
- Reference< frame::XFramesSupplier > m_xFramesSupplier(
+ Reference< frame::XFramesSupplier > m_xFramesSupplier(
mxRemoteMSF->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop") ),
uno::UNO_QUERY );
if ( !m_xFramesSupplier.is() )
@@ -221,7 +221,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
debug_fprintf(NSP_LOG_APPEND, "can not get desktop\n");
return sal_False;
}
-
+
// get frames
m_xFrames = m_xFramesSupplier->getFrames();
if ( !m_xFrames.is() )
@@ -229,10 +229,10 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
debug_fprintf(NSP_LOG_APPEND, "can not get frames from FramesSupplier\n");
return sal_False;
}
-
+
// append m_xFrame to m_xFrames
m_xFrames->append( m_xFrame );
-
+
// create XComponentLoader
Reference< frame::XComponentLoader > xLoader( m_xFrame, uno::UNO_QUERY );
if ( !xLoader.is() )
@@ -240,7 +240,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
debug_fprintf(NSP_LOG_APPEND, "can not get ComponentLoader to load URL\n");
return sal_False;
}
-
+
//create stream for the document
Reference< ::com::sun::star::ucb::XSimpleFileAccess > xSimpleFileAccess(
mxRemoteMSF->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.ucb.SimpleFileAccess") ),
@@ -248,14 +248,14 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
if(!xSimpleFileAccess.is())
{
debug_fprintf(NSP_LOG_APPEND, "can not create SimpleFileAccess to load URL\n");
- return sal_False;
+ return sal_False;
}
- Reference<io::XInputStream> xInputStream = xSimpleFileAccess->openFileRead( m_sURL );
-
+ Reference<io::XInputStream> xInputStream = xSimpleFileAccess->openFileRead( m_sURL );
+
if(!xInputStream.is())
{
debug_fprintf(NSP_LOG_APPEND, "can not create XInputStream for URL\n");
- return sal_False;
+ return sal_False;
}
// prepare to load document
@@ -271,35 +271,35 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
setPropValues[ 3 ].Name = "FilterName";
setPropValues[ 3 ].Value = "Flat XML File";*/
- debug_fprintf(NSP_LOG_APPEND, "try to load copy of URL from local file %s:%d\n",
- ::rtl::OUStringToOString( m_sURL, RTL_TEXTENCODING_ASCII_US ).getStr( ),
+ debug_fprintf(NSP_LOG_APPEND, "try to load copy of URL from local file %s:%d\n",
+ ::rtl::OUStringToOString( m_sURL, RTL_TEXTENCODING_ASCII_US ).getStr( ),
m_sURL.getLength() );
-
+
// load document
-/*
+/*
m_xComponent = xLoader->loadComponentFromURL(
- OUString(RTL_CONSTASCII_USTRINGPARAM("private:stream")), //m_sURL,
+ OUString(RTL_CONSTASCII_USTRINGPARAM("private:stream")), //m_sURL,
m_xFrame->getName(), 0, setPropValues );
- */
+ */
Sequence< ::com::sun::star::beans::PropertyValue > setPropValues2(3);
setPropValues2[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("ViewOnly") );
setPropValues2[0].Value <<= sal_True;
setPropValues2[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") );
- setPropValues2[1].Value <<= sal_True;
+ setPropValues2[1].Value <<= sal_True;
setPropValues2[2].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("AsTemplate") );
- setPropValues2[2].Value <<= sal_False;
+ setPropValues2[2].Value <<= sal_False;
m_xComponent = xLoader->loadComponentFromURL(
- m_sURL,
- m_xFrame->getName(), 0, setPropValues2 );
-
+ m_sURL,
+ m_xFrame->getName(), 0, setPropValues2 );
+
if ( !m_xComponent.is() )
{
debug_fprintf(NSP_LOG_APPEND, "print by Nsplugin, Load Componment error\n");
return sal_False;
- }
-
+ }
+
// register the closelistener that will prevent closing of the component
Reference< util::XCloseable > xCloseable( m_xFrame, uno::UNO_QUERY );
if ( xCloseable.is() )
@@ -315,7 +315,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
debug_fprintf(NSP_LOG_APPEND, "load document success\n");
// create frame::XDispatchHelper and frame::XDispatchProvider
- m_xDispatcher = Reference< frame::XDispatchHelper > (
+ m_xDispatcher = Reference< frame::XDispatchHelper > (
mxRemoteMSF->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.DispatchHelper")),
uno::UNO_QUERY );
if(!m_xDispatcher.is())
@@ -327,23 +327,23 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
if(!m_xDispatchProvider.is())
{
debug_fprintf(NSP_LOG_APPEND, "m_xDispatchProvider can not be getten\n");
- return sal_False;
+ return sal_False;
}
//try to enable toolbar and tool windows
Sequence< ::com::sun::star::beans::PropertyValue > propertyValue(1);
propertyValue[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("FunctionBarVisible") );
propertyValue[0].Value <<= sal_True;
- m_xDispatcher->executeDispatch(m_xDispatchProvider,
- ::rtl::OUString::createFromAscii(".uno:FunctionBarVisible"),
+ m_xDispatcher->executeDispatch(m_xDispatchProvider,
+ ::rtl::OUString::createFromAscii(".uno:FunctionBarVisible"),
m_xFrame->getName(), 0,
- propertyValue );
-
+ propertyValue );
+
// reset window style of parent window
#ifdef WNT
- m_dParentStyl = ::NSP_ResetWinStyl (m_hParent);
+ m_dParentStyl = ::NSP_ResetWinStyl (m_hParent);
#endif
- m_bInit = sal_True;
+ m_bInit = sal_True;
try
{
@@ -382,10 +382,10 @@ sal_Bool SoPluginInstance::SetWindow(NSP_HWND hParent, int x, int y, int w, int
{
m_hParent = hParent;
- debug_fprintf(NSP_LOG_APPEND, "SoPluginInstance::SetWindow %s : %d\n",
- ::rtl::OUStringToOString(m_sURL, RTL_TEXTENCODING_ASCII_US).getStr(),
+ debug_fprintf(NSP_LOG_APPEND, "SoPluginInstance::SetWindow %s : %d\n",
+ ::rtl::OUStringToOString(m_sURL, RTL_TEXTENCODING_ASCII_US).getStr(),
m_sURL.getLength() );
- m_nWidth = w;
+ m_nWidth = w;
m_nHeight =h;
m_nX = x;
m_nY = y;
@@ -406,7 +406,7 @@ sal_Bool SoPluginInstance::SetWindow(NSP_HWND hParent, int x, int y, int w, int
mxRemoteMSF = Reference< XMultiServiceFactory >();
m_bInit = sal_False;
bRetval = LoadDocument(hParent);
- debug_fprintf(NSP_LOG_APPEND, "load document again, return %d\n", bRetval);
+ debug_fprintf(NSP_LOG_APPEND, "load document again, return %d\n", bRetval);
}
}
@@ -415,16 +415,16 @@ sal_Bool SoPluginInstance::SetWindow(NSP_HWND hParent, int x, int y, int w, int
sal_Bool SoPluginInstance::Destroy(void)
{
-#ifdef WNT
+#ifdef WNT
if(m_dParentStyl != 0)
NSP_RestoreWinStyl(m_hParent, m_dParentStyl);
#endif
-// if(m_xDispatcher.is()){
-// m_xDispatcher->executeDispatch(m_xDispatchProvider,
-// ::rtl::OUString::createFromAscii(".uno:CloseFrame"),
+// if(m_xDispatcher.is()){
+// m_xDispatcher->executeDispatch(m_xDispatchProvider,
+// ::rtl::OUString::createFromAscii(".uno:CloseFrame"),
// ::rtl::OUString::createFromAscii("_top"), 0,
// Sequence< ::com::sun::star::beans::PropertyValue >() );
-// }
+// }
uno::Reference< util::XCloseable > xCloseable( m_xFrame, uno::UNO_QUERY );
@@ -451,7 +451,7 @@ sal_Bool SoPluginInstance::Destroy(void)
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.DocumentCloser" ) ),
aArgs ),
uno::UNO_QUERY_THROW );
-
+
xDocumentCloser->dispose(); // this call should close the document
}
catch( uno::Exception& )
@@ -479,19 +479,19 @@ sal_Bool SoPluginInstance::Destroy(void)
m_xFrames = Reference< frame::XFrames >();
m_xDispatcher = Reference< frame::XDispatchHelper >();
m_xDispatchProvider = Reference< frame::XDispatchProvider >();
- return sal_True;
-}
+ return sal_True;
+}
sal_Bool SoPluginInstance::Print(void)
{
if(!m_xDispatcher.is())
return sal_False;
-
+
Sequence< ::com::sun::star::beans::PropertyValue > propertyValue(1);
- m_xDispatcher->executeDispatch(m_xDispatchProvider,
- ::rtl::OUString::createFromAscii(".uno:PrintDefault"),
+ m_xDispatcher->executeDispatch(m_xDispatchProvider,
+ ::rtl::OUString::createFromAscii(".uno:PrintDefault"),
m_xFrame->getName(), 0,
- propertyValue );
+ propertyValue );
return sal_True;
}
diff --git a/extensions/source/nsplugin/source/so_instance.hxx b/extensions/source/nsplugin/source/so_instance.hxx
index 54974799f9a4..07b73ba8c1d6 100644
--- a/extensions/source/nsplugin/source/so_instance.hxx
+++ b/extensions/source/nsplugin/source/so_instance.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -55,7 +55,7 @@
typedef sal_Int32 NSP_HWND;
class PluginDocumentClosePreventer;
-class SoPluginInstance
+class SoPluginInstance
{
private:
@@ -63,7 +63,7 @@ private:
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_nWidth;
int m_nHeight;
int m_nX;
int m_nY;
@@ -71,7 +71,7 @@ private:
::rtl::OUString m_sURL; // URL of the document to be loaded
sal_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
+ 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
@@ -90,14 +90,14 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseListener > m_xCloseListener;
sal_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 sal_Bool SetURL(char* aURL);
+ virtual sal_Bool SetURL(char* aURL);
virtual sal_Bool IsInit(void){return m_bInit;};
virtual sal_Bool SetWindow(NSP_HWND hParent, int x, int y, int w, int h) ;
virtual sal_Bool Destroy(void) ;
diff --git a/extensions/source/nsplugin/source/so_main.cxx b/extensions/source/nsplugin/source/so_main.cxx
index 76381fab9c61..eaead5ff5303 100644
--- a/extensions/source/nsplugin/source/so_main.cxx
+++ b/extensions/source/nsplugin/source/so_main.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -42,7 +42,7 @@
#endif
#pragma warning (push,1)
#pragma warning (disable:4668)
-#define WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winsock2.h>
#include <stdlib.h>
@@ -98,23 +98,23 @@ using namespace ::com::sun::star::uno;
SoPluginInstance* lpInstance[MAX_NODE_NUM];
-static NSP_PIPE_FD la_read_fd = 0;
+static NSP_PIPE_FD la_read_fd = 0;
static char const * progdir = NULL;
long int NSP_ReadFromPipe(NSP_PIPE_FD fp, void* buf, unsigned long int len)
{
unsigned long int len_unix = 0, len_wnt = 0;
-
+
len_unix = NSP_Read_Pipe(fp, buf, len, &len_wnt);
#ifdef UNIX
(void)len_wnt;
return len_unix;
-#endif //end of UNIX
+#endif //end of UNIX
#ifdef WNT
- return len_wnt;
-#endif //end of WNT
-
+ return len_wnt;
+#endif //end of WNT
+
}
int find_free_node()
@@ -131,7 +131,7 @@ int find_cur_node(long cur_id)
{
for(int i=0; i<MAX_NODE_NUM; i++)
{
- if(lpInstance[i] == NULL)
+ if(lpInstance[i] == NULL)
continue;
if(cur_id == lpInstance[i]->GetParent())
return i;
@@ -144,9 +144,9 @@ sal_Bool dump_plugin_message(PLUGIN_MSG* pMsg)
if (!pMsg)
return sal_False;
debug_fprintf(NSP_LOG_APPEND, "NSPlugin Message: msg_id:%d; instance_id:%d;wnd_id:%d;wnd_x:%d;wnd_y:%d;wnd_w:%d;wnd_h:%d; url:%s\n",
- pMsg->msg_id, pMsg->instance_id, pMsg->wnd_id,
+ pMsg->msg_id, pMsg->instance_id, pMsg->wnd_id,
pMsg->wnd_x, pMsg->wnd_y, pMsg->wnd_w, pMsg->wnd_h, pMsg->url);
- return sal_True;
+ return sal_True;
}
int Set_Window(PLUGIN_MSG* pMsg)
@@ -159,7 +159,7 @@ int Set_Window(PLUGIN_MSG* pMsg)
pMsg->wnd_x, pMsg->wnd_y, pMsg->wnd_w, pMsg->wnd_h))
return 0;
else
- return -1;
+ return -1;
}
int Set_URL(PLUGIN_MSG* pMsg)
@@ -171,7 +171,7 @@ int Set_URL(PLUGIN_MSG* pMsg)
if(lpInstance[cur_no]->SetURL(pMsg->url))
return 0;
else
- return -1;
+ return -1;
}
int New_Instance(PLUGIN_MSG* pMsg, Reference< lang::XMultiServiceFactory > xMSF)
@@ -294,7 +294,7 @@ Reference< lang::XMultiServiceFactory > SAL_CALL start_office(NSP_PIPE_FD read_f
#endif //end of WNT
// create default local component context
- Reference< XComponentContext > xLocalContext(
+ Reference< XComponentContext > xLocalContext(
defaultBootstrap_InitialComponentContext() );
if ( !xLocalContext.is() )
{
@@ -341,14 +341,14 @@ Reference< lang::XMultiServiceFactory > SAL_CALL start_office(NSP_PIPE_FD read_f
OSL_ASSERT( buf.getLength() == 0 );
buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "uno:pipe,name=" ) );
buf.append( aPluginPipeName );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(
+ buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(
";urp;StarOffice.ComponentContext" ) );
OUString sConnectString( buf.makeStringAndClear() );
try
{
// try to connect to office, no need to start instance again if office already started
- xRemoteContext.set(
+ xRemoteContext.set(
xUrlResolver->resolve( sConnectString ), UNO_QUERY_THROW );
debug_fprintf(NSP_LOG_APPEND, "Staroffice already start\n");
return Reference< lang::XMultiServiceFactory >(xRemoteContext->getServiceManager(), UNO_QUERY);
@@ -375,7 +375,7 @@ Reference< lang::XMultiServiceFactory > SAL_CALL start_office(NSP_PIPE_FD read_f
NULL);
_exit(255);
}
-#else
+#else
(void) read_fd; /* avoid warning about unused parameter */
Security sec;
oslProcess hProcess = 0;
@@ -413,7 +413,7 @@ Reference< lang::XMultiServiceFactory > SAL_CALL start_office(NSP_PIPE_FD read_f
try
{
// try to connect to office
- xRemoteContext.set(
+ xRemoteContext.set(
xUrlResolver->resolve( sConnectString ), UNO_QUERY_THROW );
return Reference< lang::XMultiServiceFactory >(xRemoteContext->getServiceManager(), UNO_QUERY);
}
@@ -459,7 +459,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
fd_pipe[0] = (NSP_PIPE_FD) iPipe[0] ;
fd_pipe[1] = (NSP_PIPE_FD) iPipe[1] ;
NSP_Close_Pipe(fd_pipe[1]);
-
+
la_read_fd = fd_pipe[0];
if(la_read_fd < 0)
{
diff --git a/extensions/source/nsplugin/source/so_msg.hxx b/extensions/source/nsplugin/source/so_msg.hxx
index 8a539ed72a87..162bb40f04ec 100644
--- a/extensions/source/nsplugin/source/so_msg.hxx
+++ b/extensions/source/nsplugin/source/so_msg.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* 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
@@ -34,7 +34,7 @@ enum msg_type
SO_SET_WINDOW, // 1
SO_SET_URL, // 2
SO_NEW_INSTANCE, // 3
- SO_DESTROY, // 4
+ SO_DESTROY, // 4
SO_SHUTDOWN, // 5
SO_PRINT // 6
};