summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/makefile.mk5
-rw-r--r--connectivity/source/drivers/mozab/makefile.mk2
-rw-r--r--connectivity/source/drivers/mozab/mozillasrc/makefile.mk2
-rw-r--r--desktop/os2/source/applauncher/launcher.cxx4
-rw-r--r--formula/util/makefile.mk10
-rwxr-xr-xreadlicense_oo/util/makefile.pmk6
-rw-r--r--sfx2/source/appl/shutdowniconOs2.cxx2
-rw-r--r--sfx2/source/doc/objstor.cxx66
-rw-r--r--shell/source/unix/exec/shellexec.cxx21
-rw-r--r--shell/source/unix/misc/open-url.c40
-rw-r--r--shell/source/unix/misc/senddoc.c40
-rw-r--r--xmlhelp/source/com/sun/star/help/HelpLinker.cxx4
12 files changed, 145 insertions, 57 deletions
diff --git a/connectivity/source/drivers/mozab/bootstrap/makefile.mk b/connectivity/source/drivers/mozab/bootstrap/makefile.mk
index a22b3699760a..9b4b05868cd2 100644
--- a/connectivity/source/drivers/mozab/bootstrap/makefile.mk
+++ b/connectivity/source/drivers/mozab/bootstrap/makefile.mk
@@ -44,6 +44,11 @@ USE_DEFFILE=TRUE
ENABLE_EXCEPTIONS=TRUE
VISIBILITY_HIDDEN=TRUE
+.IF "$(OS)" == "OS2"
+all:
+ @echo " Not building under OS/2"
+.ENDIF
+
# --- Settings ----------------------------------
.IF "$(DBGUTIL_OJ)"!=""
ENVCFLAGS+=/FR$(SLO)$/
diff --git a/connectivity/source/drivers/mozab/makefile.mk b/connectivity/source/drivers/mozab/makefile.mk
index 42ce1ab8ca6e..677e605096c4 100644
--- a/connectivity/source/drivers/mozab/makefile.mk
+++ b/connectivity/source/drivers/mozab/makefile.mk
@@ -35,7 +35,7 @@ TARGET=mozab
TARGET2=$(TARGET)drv
VISIBILITY_HIDDEN=TRUE
-.IF ( "$(SYSTEM_MOZILLA)" == "YES" && "$(WITH_MOZILLA)" == "YES") || "$(WITH_MOZILLA)" == "NO" || ( "$(OS)" == "MACOSX" )
+.IF ( "$(SYSTEM_MOZILLA)" == "YES" && "$(WITH_MOZILLA)" == "YES") || "$(WITH_MOZILLA)" == "NO" || ( "$(OS)" == "MACOSX" ) || ( "$(OS)" == "OS2" )
all:
@echo " Not building the mozilla address book driver"
@echo " dependency to Mozilla developer snapshots not feasable at the moment"
diff --git a/connectivity/source/drivers/mozab/mozillasrc/makefile.mk b/connectivity/source/drivers/mozab/mozillasrc/makefile.mk
index e350365d3442..e31d4c7e412b 100644
--- a/connectivity/source/drivers/mozab/mozillasrc/makefile.mk
+++ b/connectivity/source/drivers/mozab/mozillasrc/makefile.mk
@@ -52,7 +52,7 @@ ENVCFLAGS+=/FR$(SLO)$/
.INCLUDE : settings.mk
-.IF ("$(SYSTEM_MOZILLA)" == "YES" && "$(WITH_MOZILLA)" == "YES") || "$(WITH_MOZILLA)" == "NO"
+.IF ("$(SYSTEM_MOZILLA)" == "YES" && "$(WITH_MOZILLA)" == "YES") || "$(WITH_MOZILLA)" == "NO" || "$(OS)" == "OS2"
dummy:
@echo " Not building the mozillasrc stuff in OpenOffice.org build"
@echo " dependency to Mozilla developer snapshots not feasable at the moment"
diff --git a/desktop/os2/source/applauncher/launcher.cxx b/desktop/os2/source/applauncher/launcher.cxx
index a17838687a0f..1d1280c71bf1 100644
--- a/desktop/os2/source/applauncher/launcher.cxx
+++ b/desktop/os2/source/applauncher/launcher.cxx
@@ -66,7 +66,11 @@ int main( int argc, char* argv[])
DosSetExtLIBPATH( (PCSZ)szLibpath, BEGIN_LIBPATH);
// make sure we load DLL from our path only, so multiple instances/versions
// can be loaded.
+#if 0
+ // YD this feature is not compatible with innowin b20,
+ // java cannot load with this flag enabled
DosSetExtLIBPATH( (PCSZ)"T", LIBPATHSTRICT);
+#endif
// adjust exe name
_splitpath( szApplicationName, szDrive, szDir, szFileName, szExt );
diff --git a/formula/util/makefile.mk b/formula/util/makefile.mk
index 6852a53e499d..d1d78c11bbc2 100644
--- a/formula/util/makefile.mk
+++ b/formula/util/makefile.mk
@@ -98,7 +98,11 @@ SHL2STDLIBS= \
$(CPPUHELPERLIB) \
$(SALLIB)
-.IF "$(GUI)"!="WNT" || "$(COM)"=="GCC"
+.IF "$(GUI)"=="OS2"
+SHL2STDLIBS+= \
+ $(LB)$/ifor.lib
+SHL2DEPN=$(LB)$/i$(TARGET).lib
+.ELIF "$(GUI)"!="WNT" || "$(COM)"=="GCC"
SHL2STDLIBS+= \
-lfor$(DLLPOSTFIX)
SHL2DEPN=$(SHL1TARGETN)
@@ -113,6 +117,10 @@ SHL2IMPLIB=i$(TARGET2)
SHL2LIBS=$(LIB2TARGET)
SHL2DEF=$(MISC)$/$(SHL2TARGET).def
DEF2NAME=$(SHL2TARGET)
+.IF "$(GUI)"=="OS2"
+DEFLIB2NAME=$(TARGET2)
+.ENDIF
+
SHL2USE_EXPORTS=name
# SHL2VERSIONMAP=$(TARGET2).map
diff --git a/readlicense_oo/util/makefile.pmk b/readlicense_oo/util/makefile.pmk
index aa66ec0657b9..b5c9099a1aa6 100755
--- a/readlicense_oo/util/makefile.pmk
+++ b/readlicense_oo/util/makefile.pmk
@@ -70,6 +70,12 @@ $(MISC)$/$(GUI)$/$(eq,$(GUI),WNT readme README)_%.html : 'virtual'
chmod g+w $(MISC)$/$(GUI)
.ENDIF # "$(GUI)"=="UNX"
+$(MISC)$/$(GUI)$/$(eq,$(GUI),OS2 readme README)_%.html : 'virtual'
+ $(XSLTPROC) --nonet -o $@ \
+ --stringparam os1 $(OS) --stringparam gui1 $(GUI) --stringparam com1 $(COM) \
+ --stringparam cp1 $(CPUNAME) --stringparam type html --stringparam lang1 $* \
+ ..$/readme.xsl $(MERGEDXRM)
+
# no percent-rule to avoid ambiguous inference chains for README_<lang>.html
$(SYSTEXTDOCS) : $(MISC)$/readme_text.xsl
$(XSLTPROC) --nonet -o $@ \
diff --git a/sfx2/source/appl/shutdowniconOs2.cxx b/sfx2/source/appl/shutdowniconOs2.cxx
index e527519d1564..6b69b5d0fae8 100644
--- a/sfx2/source/appl/shutdowniconOs2.cxx
+++ b/sfx2/source/appl/shutdowniconOs2.cxx
@@ -51,7 +51,7 @@ using namespace ::osl;
//
// This ObjectID must match the one created in WarpIN scripts!!
//
-#define QUICKSTART_OBJID "OO2B_QUICKSTART"
+#define QUICKSTART_OBJID "OO2_QUICKSTART"
bool ShutdownIcon::IsQuickstarterInstalled()
{
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 89f2fe74e2f9..5a4aed274c30 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -136,6 +136,12 @@
#include "appbaslib.hxx"
#include "appdata.hxx"
+#ifdef OS2
+#include <osl/file.hxx>
+#include <stdio.h>
+#include <sys/ea.h>
+#endif
+
#include "../appl/app.hrc"
extern sal_uInt32 CheckPasswd_Impl( SfxObjectShell*, SfxItemPool&, SfxMedium* );
@@ -1784,6 +1790,66 @@ sal_Bool SfxObjectShell::SaveTo_Impl
catch( Exception& )
{
}
+
+#ifdef OS2
+ {
+#define CHAR_POINTER(THE_OUSTRING) ::rtl::OUStringToOString (THE_OUSTRING, RTL_TEXTENCODING_UTF8).pData->buffer
+ // Header for a single-valued ASCII EA data item
+ typedef struct _EA_ASCII_header {
+ USHORT usAttr; /* value: EAT_ASCII */
+ USHORT usLen; /* length of data */
+ CHAR szType[_MAX_PATH]; /* ASCII data fits in here ... */
+ } EA_ASCII_HEADER;
+ char filePath[_MAX_PATH];
+ char fileExt[_MAX_PATH];
+ char docType[_MAX_PATH];
+ int rc;
+ oslFileError eRet;
+ ::rtl::OUString aSystemFileURL;
+ const ::rtl::OUString aFileURL = rMedium.GetName();
+ // close medium
+ rMedium.Close();
+
+ // convert file URL to system path
+ if (osl::FileBase::getSystemPathFromFileURL( aFileURL, aSystemFileURL) == osl::FileBase::E_None) {
+ EA_ASCII_HEADER eaAscii;
+ struct _ea eaType;
+ strcpy( filePath, CHAR_POINTER( aSystemFileURL));
+ strcpy( docType, CHAR_POINTER( rMedium.GetFilter()->GetServiceName()));
+#if OSL_DEBUG_LEVEL>1
+ printf( "file name: %s\n", filePath);
+ printf( "filter name: %s\n", CHAR_POINTER(rMedium.GetFilter()->GetFilterName()));
+ printf( "service name: %s\n", docType);
+#endif
+ // initialize OS/2 EA data structure
+ eaAscii.usAttr = EAT_ASCII;
+ _splitpath ( filePath, NULL, NULL, NULL, fileExt);
+ if (!stricmp( fileExt, ".pdf"))
+ strcpy( eaAscii.szType, "Acrobat Document");
+ else if (!strcmp( docType, "com.sun.star.text.TextDocument"))
+ strcpy( eaAscii.szType, "OpenOfficeOrg Writer Document");
+ else if (!strcmp( docType, "com.sun.star.sheet.SpreadsheetDocument"))
+ strcpy( eaAscii.szType, "OpenOfficeOrg Calc Document");
+ else if (!strcmp( docType, "com.sun.star.presentation.PresentationDocument"))
+ strcpy( eaAscii.szType, "OpenOfficeOrg Impress Document");
+ else if (!strcmp( docType, "com.sun.star.drawing.DrawingDocument"))
+ strcpy( eaAscii.szType, "OpenOfficeOrg Draw Document");
+ else
+ strcpy( eaAscii.szType, "OpenOfficeOrg Document");
+ eaAscii.usLen = strlen( eaAscii.szType);
+ // fill libc EA data structure
+ eaType.flags = 0;
+ eaType.size = sizeof(USHORT)*2 + eaAscii.usLen;
+ eaType.value = &eaAscii;
+ // put EA to file
+ rc = _ea_put( &eaType, filePath, 0, ".TYPE");
+#if OSL_DEBUG_LEVEL>1
+ printf( "ea name: %s, rc %d, errno %d\n", eaAscii.szType, rc, errno);
+#endif
+ }
+ }
+#endif
+
}
return bOk;
diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx
index 315f78c517ff..4ee0f32eb072 100644
--- a/shell/source/unix/exec/shellexec.cxx
+++ b/shell/source/unix/exec/shellexec.cxx
@@ -97,12 +97,10 @@ void escapeForShell( rtl::OStringBuffer & rBuffer, const rtl::OString & rURL)
{
// escape every non alpha numeric characters (excluding a few "known good") by prepending a '\'
sal_Char c = rURL[n];
- if( ( c < 'A' || c > 'Z' ) && ( c < 'a' || c > 'z' ) && ( c < '0' || c > '9' )
-#ifdef OS2 // YD we don't need to escape ':', '-', '\\', '_'
- && c != ':' && c != '-' && c != '\\' && c != '_'
-#endif
- && c != '/' && c != '.' )
+#ifndef OS2 // YD shell does not support escaped chars
+ if( ( c < 'A' || c > 'Z' ) && ( c < 'a' || c > 'z' ) && ( c < '0' || c > '9' ) && c != '/' && c != '.' )
rBuffer.append( '\\' );
+#endif
rBuffer.append( c );
}
@@ -210,6 +208,19 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
static_cast < XSystemShellExecute * > (this), ENOENT );
}
+#ifdef OS2
+ OStringBuffer aProg = OUStringToOString(aProgram, osl_getThreadTextEncoding());
+ aProg.append("open-url.exe");
+ OString aUrl = OUStringToOString(aURL, osl_getThreadTextEncoding());
+ if ( -1 == spawnl(P_NOWAIT, aProg.getStr(), aProg.getStr(), aUrl.getStr() , NULL) )
+ {
+ int nerr = errno;
+ throw SystemShellExecuteException(OUString::createFromAscii( strerror( nerr ) ),
+ static_cast < XSystemShellExecute * > (this), nerr );
+ }
+ return;
+#endif
+
OString aTmp = OUStringToOString(aProgram, osl_getThreadTextEncoding());
escapeForShell(aBuffer, aTmp);
diff --git a/shell/source/unix/misc/open-url.c b/shell/source/unix/misc/open-url.c
index 00a2e3bff774..f8e76f26ec5d 100644
--- a/shell/source/unix/misc/open-url.c
+++ b/shell/source/unix/misc/open-url.c
@@ -1,35 +1,27 @@
/*************************************************************************
*
- * OpenOffice.org - a multi-platform office productivity suite
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * $RCSfile:$
+ * Copyright 2008 by Sun Microsystems, Inc.
*
- * $Revision:$
+ * OpenOffice.org - a multi-platform office productivity suite
*
- * last change: $Author:$
+ * This file is part of OpenOffice.org.
*
- * The Contents of this file are made available subject to
- * the terms of GNU Lesser General Public License Version 2.1.
+ * 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).
*
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2005 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library 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 for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * 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.
*
************************************************************************/
diff --git a/shell/source/unix/misc/senddoc.c b/shell/source/unix/misc/senddoc.c
index e918ba69c86d..bbe96420699d 100644
--- a/shell/source/unix/misc/senddoc.c
+++ b/shell/source/unix/misc/senddoc.c
@@ -1,35 +1,27 @@
/*************************************************************************
*
- * OpenOffice.org - a multi-platform office productivity suite
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * $RCSfile:$
+ * Copyright 2008 by Sun Microsystems, Inc.
*
- * $Revision:$
+ * OpenOffice.org - a multi-platform office productivity suite
*
- * last change: $Author:$
+ * This file is part of OpenOffice.org.
*
- * The Contents of this file are made available subject to
- * the terms of GNU Lesser General Public License Version 2.1.
+ * 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).
*
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2005 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library 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 for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * 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.
*
************************************************************************/
diff --git a/xmlhelp/source/com/sun/star/help/HelpLinker.cxx b/xmlhelp/source/com/sun/star/help/HelpLinker.cxx
index 67049df439e1..8acb129b21fb 100644
--- a/xmlhelp/source/com/sun/star/help/HelpLinker.cxx
+++ b/xmlhelp/source/com/sun/star/help/HelpLinker.cxx
@@ -476,8 +476,10 @@ void HelpLinker::link() throw( HelpProcessingException )
if( !bExtensionMode )
{
+#ifndef OS2 // YD @TODO@ crashes libc runtime :-(
std::cout << "Making " << outputFile.native_file_string() <<
" from " << helpFiles.size() << " input files" << std::endl;
+#endif
}
// here we start our loop over the hzip files.
@@ -1014,7 +1016,9 @@ int main(int argc, char**argv)
exit(1);
}
sal_uInt32 endtime = osl_getGlobalTimer();
+#ifndef OS2 // YD @TODO@ crashes libc runtime :-(
std::cout << "time taken was " << (endtime-starttime)/1000.0 << " seconds" << std::endl;
+#endif
return 0;
}