summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorTobias Krause <tkr@openoffice.org>2010-01-25 12:39:18 +0100
committerTobias Krause <tkr@openoffice.org>2010-01-25 12:39:18 +0100
commit94261b22fa81269d94273f1548918258032644c0 (patch)
tree58c345bc625d4727fa65833a1a638042da44da33 /shell
parent617bef82b3fcb51ff6241ac76f4cbe1bacfcb779 (diff)
parentf60d8940366b3b7da6761c07d6c9186699225da6 (diff)
tkr32: rebase from m65 to m70
Diffstat (limited to 'shell')
-rw-r--r--shell/inc/internal/config.hxx5
-rw-r--r--shell/inc/internal/utilities.hxx21
-rw-r--r--shell/inc/internal/xml_parser.hxx11
-rw-r--r--shell/inc/kde_headers.h97
-rw-r--r--shell/prj/build.lst2
-rw-r--r--shell/prj/d.lst4
-rwxr-xr-xshell/qa/makefile.mk12
-rwxr-xr-xshell/qa/recent_docs.cxx132
-rw-r--r--shell/source/all/xml_parser.cxx14
-rw-r--r--shell/source/backends/gconfbe/gconfbackend.cxx3
-rw-r--r--shell/source/backends/gconfbe/gconfbackend.hxx5
-rw-r--r--shell/source/backends/kdebe/kdebecdef.cxx40
-rw-r--r--shell/source/backends/kdebe/kdecommonlayer.cxx20
-rw-r--r--shell/source/backends/kdebe/kdeinetlayer.hxx16
-rw-r--r--shell/source/backends/kdebe/kdepathslayer.cxx16
-rw-r--r--shell/source/backends/kdebe/kdevcllayer.cxx16
-rw-r--r--shell/source/backends/localebe/localebackend.cxx6
-rw-r--r--shell/source/tools/lngconvex/lngconvex.cxx44
-rw-r--r--shell/source/unix/sysshell/recently_used_file.cxx6
-rw-r--r--shell/source/unix/sysshell/recently_used_file.hxx3
-rw-r--r--shell/source/unix/sysshell/recently_used_file_handler.cxx20
-rw-r--r--shell/source/win32/shlxthandler/infotips/infotips.cxx2
-rw-r--r--shell/source/win32/shlxthandler/makefile.mk13
-rw-r--r--shell/source/win32/shlxthandler/ooofilt/proxy/ooofiltproxy.cxx166
-rw-r--r--shell/source/win32/shlxthandler/propsheets/propsheets.cxx3
-rw-r--r--shell/source/win32/shlxthandler/res/makefile.mk10
-rw-r--r--shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx20
-rw-r--r--shell/source/win32/shlxthandler/util/utilities.cxx15
28 files changed, 486 insertions, 236 deletions
diff --git a/shell/inc/internal/config.hxx b/shell/inc/internal/config.hxx
index 21c4387c1c..caf33f39a3 100644
--- a/shell/inc/internal/config.hxx
+++ b/shell/inc/internal/config.hxx
@@ -39,8 +39,13 @@
#include <tchar.h>
#endif
+#ifdef _AMD64_
+#define MODULE_NAME TEXT("shlxthdl_x64.dll")
+#define MODULE_NAME_FILTER TEXT("ooofilt_x64.dll")
+#else
#define MODULE_NAME TEXT("shlxthdl.dll")
#define MODULE_NAME_FILTER TEXT("ooofilt.dll")
+#endif
#define COLUMN_HANDLER_DESCRIPTIVE_NAME TEXT("OpenOffice.org Column Handler")
#define INFOTIP_HANDLER_DESCRIPTIVE_NAME TEXT("OpenOffice.org Infotip Handler")
diff --git a/shell/inc/internal/utilities.hxx b/shell/inc/internal/utilities.hxx
index 9d5b43117c..aed96260c3 100644
--- a/shell/inc/internal/utilities.hxx
+++ b/shell/inc/internal/utilities.hxx
@@ -47,6 +47,8 @@
#include "internal/types.hxx"
#include <string>
+#define STRSAFE_NO_DEPRECATE
+#include <strsafe.h>
//---------------------------------
/** Convert a string to a wstring
@@ -89,4 +91,23 @@ bool HasOnlySpaces(const std::wstring& String);
LCID LocaleSetToLCID( const LocaleSet_t & Locale );
#endif
+//----------------------------------------------------------
+#ifdef DEBUG
+inline void OutputDebugStringFormat( LPCSTR pFormat, ... )
+{
+ CHAR buffer[1024];
+ va_list args;
+
+ va_start( args, pFormat );
+ StringCchVPrintfA( buffer, sizeof(buffer), pFormat, args );
+ OutputDebugStringA( buffer );
+}
+#else
+static inline void OutputDebugStringFormat( LPCSTR, ... )
+{
+}
+#endif
+//----------------------------------------------------------
+
+
#endif
diff --git a/shell/inc/internal/xml_parser.hxx b/shell/inc/internal/xml_parser.hxx
index 6080d4c5fd..7e47195f08 100644
--- a/shell/inc/internal/xml_parser.hxx
+++ b/shell/inc/internal/xml_parser.hxx
@@ -31,11 +31,7 @@
#ifndef _XML_PARSER_HXX_
#define _XML_PARSER_HXX_
-#ifdef SYSTEM_EXPAT
#include <expat.h>
-#else
-#include <external/expat/xmlparse.h>
-#endif
#include <stdexcept>
//-----------------------------------------------------
@@ -76,9 +72,6 @@ public:
xml_parser(const XML_Char* EncodingName = 0);
//########################################################
- xml_parser(const XML_Char* EncodingName, XML_Char NamespaceSeparator);
-
- //########################################################
~xml_parser();
//########################################################
@@ -126,10 +119,6 @@ public:
/** Returns the currently used document handler or null if
no document handler was set before. */
i_xml_parser_event_handler* get_document_handler() const;
-
- //############################################
- void set_encoding(const XML_Char* Encoding);
-
private:
void init();
diff --git a/shell/inc/kde_headers.h b/shell/inc/kde_headers.h
new file mode 100644
index 0000000000..75c362967d
--- /dev/null
+++ b/shell/inc/kde_headers.h
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: kde_headers.h,v $
+ * $Revision: 1.6 $
+ *
+ * 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_VCL_KDE_HEADERS_H
+#define INCLUDED_VCL_KDE_HEADERS_H
+
+/* ********* Suppress warnings if needed */
+#include "sal/config.h"
+
+#if defined __GNUC__
+#pragma GCC system_header
+#endif
+
+
+/* ********* Hack, but needed because of conflicting types... */
+#define Region QtXRegion
+
+
+/* ********* Qt headers */
+#include <qaccessible.h>
+#include <qcheckbox.h>
+#include <qcombobox.h>
+#include <qfont.h>
+#include <qframe.h>
+#include <qlineedit.h>
+#include <qlistview.h>
+#include <qmainwindow.h>
+#include <qmenudata.h>
+#include <qpaintdevice.h>
+#include <qpainter.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qrangecontrol.h>
+#include <qstring.h>
+#include <qtabbar.h>
+#include <qtabwidget.h>
+#include <qtoolbar.h>
+#include <qtoolbutton.h>
+#include <qwidget.h>
+#include <qprogressbar.h>
+
+/* ********* See hack on top of this file */
+#undef Region
+
+
+/* ********* KDE base headers */
+#include <kaboutdata.h>
+#include <kapplication.h>
+#include <kcmdlineargs.h>
+#include <kconfig.h>
+#include <kdeversion.h>
+#include <kemailsettings.h>
+#include <kglobal.h>
+#include <kglobalsettings.h>
+#include <klocale.h>
+#include <kmainwindow.h>
+#include <kmenubar.h>
+#include <kprotocolmanager.h>
+#include <kstartupinfo.h>
+#include <kstyle.h>
+
+
+/* ********* KDE address book connectivity headers */
+#include <kabc/addressbook.h>
+#include <kabc/addressee.h>
+#include <kabc/field.h>
+#include <kabc/stdaddressbook.h>
+
+
+#endif
diff --git a/shell/prj/build.lst b/shell/prj/build.lst
index 864ff49b32..becde6d21f 100644
--- a/shell/prj/build.lst
+++ b/shell/prj/build.lst
@@ -1,4 +1,4 @@
-sl shell : l10n offuh rdbmaker tools sal vcl EXPAT:expat NULL
+sl shell : l10n offuh rdbmaker tools sal EXPAT:expat NULL
sl shell\inc nmake - all sl_inc NULL
sl shell\source\win32 nmake - w sl_win32 sl_inc NULL
sl shell\source\win32\simplemail nmake - w sl_win32_simplemail sl_inc NULL
diff --git a/shell/prj/d.lst b/shell/prj/d.lst
index 98d4a6215f..eee13ef34f 100644
--- a/shell/prj/d.lst
+++ b/shell/prj/d.lst
@@ -4,6 +4,9 @@
..\%__SRC%\lib\*.uno.so %_DEST%\lib%_EXT%\*.uno.so
..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll
..\%__SRC%\bin\*.exe %_DEST%\bin%_EXT%\*.exe
+..\%__SRC%\bin\x64\shlxthdl.dll %_DEST%\bin%_EXT%\shlxthdl_x64.dll
+..\%__SRC%\bin\x64\ooofiltproxy.dll %_DEST%\bin%_EXT%\ooofiltproxy_x64.dll
+..\%__SRC%\bin\x64\ooofilt.dll %_DEST%\bin%_EXT%\ooofilt_x64.dll
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
..\%__SRC%\lib\*.a %_DEST%\lib%_EXT%\*.a
@@ -18,3 +21,4 @@
..\%__SRC%\misc\*.xml %_DEST%\xml%_EXT%\*.xml
..\%__SRC%\misc\*-ucd.txt %_DEST%\bin%_EXT%\*-ucd.txt
+..\inc\kde_headers.h %_DEST%\inc%_EXT%\shell\kde_headers.h
diff --git a/shell/qa/makefile.mk b/shell/qa/makefile.mk
index 70c42e6463..e935abd1c0 100755
--- a/shell/qa/makefile.mk
+++ b/shell/qa/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -42,17 +42,13 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : settings.mk
# BEGIN ----------------------------------------------------------------
-# auto generated Target:testjob by codegen.pl
+# auto generated Target:testjob by codegen.pl
-SHL1OBJS=$(SLO)$/recent_docs.obj $(SLO)$/xml_parser.obj
+SHL1OBJS=$(SLO)$/recent_docs.obj $(SLO)$/xml_parser.obj
SHL1TARGET=recent_docs
-SHL1STDLIBS=$(SALLIB)
+SHL1STDLIBS=$(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
-.IF "$(GUI)" == "WNT"
-SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib
-.ENDIF
.IF "$(GUI)" == "UNX"
-SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a \
..$/unxsols4.pro$/slb$/libsysshell.a \
$(EXPATASCII3RDLIB)
.ENDIF
diff --git a/shell/qa/recent_docs.cxx b/shell/qa/recent_docs.cxx
index 40a0d92eac..314e7f9134 100755
--- a/shell/qa/recent_docs.cxx
+++ b/shell/qa/recent_docs.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_shell.hxx"
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include "systemshell.hxx"
#include "osl/file.hxx"
@@ -41,114 +41,114 @@
#include <stdlib.h>
#include <iostream>
-//########################################
+//########################################
using namespace osl;
using namespace rtl;
namespace syssh = SystemShell;
-//########################################
+//########################################
const OUString SXW_MIME_TYPE = OUString::createFromAscii("application/vnd.sun.xml.writer");
const OUString SXC_MIME_TYPE = OUString::createFromAscii("application/vnd.sun.xml.calc");
const OUString SXI_MIME_TYPE = OUString::createFromAscii("application/vnd.sun.xml.impress");
const OUString SXD_MIME_TYPE = OUString::createFromAscii("application/vnd.sun.xml.draw");
const OUString SXM_MIME_TYPE = OUString::createFromAscii("application/vnd.sun.xml.math");
-
+
class Test_AddToRecentDocs : public CppUnit::TestFixture
-{
+{
public:
-
+
Test_AddToRecentDocs()
- {
+ {
}
-
- //------------------------------------------------
+
+ //------------------------------------------------
void test_existing_recently_used_file_with_valid_xml()
- {
+ {
system("rm $HOME/.recently-used");
- system("echo '<?xml version=\"1.0\"?>\n<RecentFiles>\n<RecentItem>\n<URI>file:///home/federico/gedit.txt</URI>\n<Mime-Type>text/plain</Mime-Type>\n<Timestamp>1046485966</Timestamp>\n<Groups>\n<Group>gedit</Group>\n</Groups>\n</RecentItem>\n</RecentFiles>' > $HOME/.recently-used");
-
+ system("echo '<?xml version=\"1.0\"?>\n<RecentFiles>\n<RecentItem>\n<URI>file:///home/federico/gedit.txt</URI>\n<Mime-Type>text/plain</Mime-Type>\n<Timestamp>1046485966</Timestamp>\n<Groups>\n<Group>gedit</Group>\n</Groups>\n</RecentItem>\n</RecentFiles>' > $HOME/.recently-used");
+
rtl::OUString url = rtl::OUString::createFromAscii("file:///home_athene/test.sxw");
- syssh::AddToRecentDocumentList(url, SXW_MIME_TYPE);
-
+ syssh::AddToRecentDocumentList(url, SXW_MIME_TYPE);
+
url = rtl::OUString::createFromAscii("file:///home_athene/test.sxc");
- syssh::AddToRecentDocumentList(url, SXC_MIME_TYPE);
-
+ syssh::AddToRecentDocumentList(url, SXC_MIME_TYPE);
+
url = rtl::OUString::createFromAscii("file:///home_athene/test.sxi");
- syssh::AddToRecentDocumentList(url, SXI_MIME_TYPE);
+ syssh::AddToRecentDocumentList(url, SXI_MIME_TYPE);
url = rtl::OUString::createFromAscii("file:///home_athene/test.sxd");
- syssh::AddToRecentDocumentList(url, SXD_MIME_TYPE);
+ syssh::AddToRecentDocumentList(url, SXD_MIME_TYPE);
url = rtl::OUString::createFromAscii("file:///home_athene/test.sxm");
- syssh::AddToRecentDocumentList(url, SXM_MIME_TYPE);
+ syssh::AddToRecentDocumentList(url, SXM_MIME_TYPE);
}
- //------------------------------------------------
- void test_existing_recently_used_file_with_invalid_xml()
+ //------------------------------------------------
+ void test_existing_recently_used_file_with_invalid_xml()
{
system("rm $HOME/.recently-used");
system("echo '<?xml version=\"1.0\"?>\n<RecentFiles>\n<RecentItem>\n<URI>file:///home/federico/gedit.txt</URI>\n<Mime-Type>text/plain</Mime-Type>\n<Timestamp>1046485966</Timestamp>\n<Groups>\n<Group>gedit</Group>\n</Groups>\n<RecentItem>\n<URI>file:///home/federico/gedit2.txt</URI>\n<Mime-Type>text/plain</Mime-Type>\n<Timestamp>1046485966</Timestamp>\n<Groups>\n<Group>gedit</Group>\n</Groups>\n</RecentItem>\n</RecentFiles>' > $HOME/.recently-used");
-
+
rtl::OUString url = rtl::OUString::createFromAscii("file:///home_athene/test.sxw");
- syssh::AddToRecentDocumentList(url, SXW_MIME_TYPE);
+ syssh::AddToRecentDocumentList(url, SXW_MIME_TYPE);
}
-
- //------------------------------------------------
+
+ //------------------------------------------------
void test_non_existing_recently_used_file()
{
- int ret = system("rm $HOME/.recently-used");
-
+ int ret = system("rm $HOME/.recently-used");
+
rtl::OUString url = rtl::OUString::createFromAscii("file:///home_athene/test.sxw");
- syssh::AddToRecentDocumentList(url, SXW_MIME_TYPE);
-
+ syssh::AddToRecentDocumentList(url, SXW_MIME_TYPE);
+
url = rtl::OUString::createFromAscii("file:///home_athene/test.sxc");
- syssh::AddToRecentDocumentList(url, SXC_MIME_TYPE);
-
+ syssh::AddToRecentDocumentList(url, SXC_MIME_TYPE);
+
url = rtl::OUString::createFromAscii("file:///home_athene/test.sxi");
- syssh::AddToRecentDocumentList(url, SXI_MIME_TYPE);
+ syssh::AddToRecentDocumentList(url, SXI_MIME_TYPE);
url = rtl::OUString::createFromAscii("file:///home_athene/test.sxd");
- syssh::AddToRecentDocumentList(url, SXD_MIME_TYPE);
+ syssh::AddToRecentDocumentList(url, SXD_MIME_TYPE);
url = rtl::OUString::createFromAscii("file:///home_athene/test.sxm");
- syssh::AddToRecentDocumentList(url, SXM_MIME_TYPE);
+ syssh::AddToRecentDocumentList(url, SXM_MIME_TYPE);
ret = system("ls $HOME/.recently-used");
-
+
CPPUNIT_ASSERT_MESSAGE(".recently-used doesn't exist", 0 == ret);
}
-
+
//------------------------------------------------
OUString get_recently_used_url()
{
Security sec;
OUString recently_used_url;
-
+
CPPUNIT_ASSERT_MESSAGE("cannot get user home directory", sec.getHomeDir(recently_used_url));
-
- if ((recently_used_url.getLength() > 0) &&
+
+ if ((recently_used_url.getLength() > 0) &&
('/' != recently_used_url.pData->buffer[recently_used_url.getLength() - 1]))
- recently_used_url += rtl::OUString::createFromAscii("/");
-
+ recently_used_url += rtl::OUString::createFromAscii("/");
+
recently_used_url += rtl::OUString::createFromAscii(".recently-used");
return recently_used_url;
}
-
+
//------------------------------------------------
void read_recently_used(void* buffer, size_t size)
{
File ruf(get_recently_used_url());
FileBase::RC rc = ruf.open(OpenFlag_Read);
-
+
CPPUNIT_ASSERT_MESSAGE("Cannot open ~/.recently-used", FileBase::E_None == rc);
-
+
sal_uInt64 read;
ruf.read(buffer, size, read);
ruf.close();
CPPUNIT_ASSERT_MESSAGE("Cannot read .recently-used", (read > 0));
}
-
+
//------------------------------------------------
void test_existing_recently_used_file_without_xml()
{
@@ -156,48 +156,48 @@ public:
// create a new one with non xml data
system("rm $HOME/.recently-used");
system("date > $HOME/.recently-used");
-
+
char cnt_before[128];
- memset(cnt_before, 0, sizeof(cnt_before));
- read_recently_used(cnt_before, sizeof(cnt_before));
-
+ memset(cnt_before, 0, sizeof(cnt_before));
+ read_recently_used(cnt_before, sizeof(cnt_before));
+
OUString url = OUString::createFromAscii("file:///home_athene/test.sxw");
- syssh::AddToRecentDocumentList(url, SXW_MIME_TYPE);
-
+ syssh::AddToRecentDocumentList(url, SXW_MIME_TYPE);
+
char cnt_after[128];
memset(cnt_after, 0, sizeof(cnt_after));
- read_recently_used(cnt_after, sizeof(cnt_after));
- CPPUNIT_ASSERT_MESSAGE(".recently-used unexpectly touched", (0 == strcmp(cnt_before, cnt_after)));
+ read_recently_used(cnt_after, sizeof(cnt_after));
+ CPPUNIT_ASSERT_MESSAGE(".recently-used unexpectly touched", (0 == strcmp(cnt_before, cnt_after)));
}
-
- //------------------------------------------------
+
+ //------------------------------------------------
void test_existing_recently_used_with_unknown_xml()
- {
+ {
system("rm $HOME/.recently-used");
-
- char* xml_unknown = "<?xml version=\"1.0\"?>\n<test>test</test>";
+
+ char* xml_unknown = "<?xml version=\"1.0\"?>\n<test>test</test>";
char cmd[256];
sprintf(cmd, "echo '%s' > $HOME/.recently-used", xml_unknown);
system(cmd);
-
+
OUString url = OUString::createFromAscii("file:///home_athene/test.sxw");
- syssh::AddToRecentDocumentList(url, SXW_MIME_TYPE);
-
+ syssh::AddToRecentDocumentList(url, SXW_MIME_TYPE);
+
char buffer[256];
memset(buffer, 0, sizeof(buffer));
read_recently_used(buffer, sizeof(buffer));
-
+
CPPUNIT_ASSERT_MESSAGE("Unexpected recently-used content", (0 == strncmp(xml_unknown, buffer, strlen(xml_unknown))));
}
-
+
//------------------------------------------------
void test_existing_empty_recently_used_file()
{
system("rm $HOME/.recently-used");
system("touch $HOME/.recently-used");
-
+
OUString url = OUString::createFromAscii("file:///home_athene/test.sxw");
- syssh::AddToRecentDocumentList(url, SXW_MIME_TYPE);
+ syssh::AddToRecentDocumentList(url, SXW_MIME_TYPE);
char buffer[256];
memset(buffer, 0, sizeof(buffer));
diff --git a/shell/source/all/xml_parser.cxx b/shell/source/all/xml_parser.cxx
index 5dcb351682..6236b1db27 100644
--- a/shell/source/all/xml_parser.cxx
+++ b/shell/source/all/xml_parser.cxx
@@ -90,14 +90,6 @@ xml_parser::xml_parser(const XML_Char* EncodingName) :
}
//###################################################
-xml_parser::xml_parser(const XML_Char* EncodingName, XML_Char /*NamespaceSeparator*/) :
- document_handler_(0),
- xml_parser_(XML_ParserCreate(EncodingName))
-{
- init();
-}
-
-//###################################################
xml_parser::~xml_parser()
{
XML_ParserFree(xml_parser_);
@@ -224,9 +216,3 @@ i_xml_parser_event_handler* xml_parser::get_document_handler() const
{
return document_handler_;
}
-
-//###################################################
-void xml_parser::set_encoding(const XML_Char* Encoding)
-{
- XML_SetEncoding(xml_parser_, Encoding);
-}
diff --git a/shell/source/backends/gconfbe/gconfbackend.cxx b/shell/source/backends/gconfbe/gconfbackend.cxx
index d5ae5915b2..4918eeadba 100644
--- a/shell/source/backends/gconfbe/gconfbackend.cxx
+++ b/shell/source/backends/gconfbe/gconfbackend.cxx
@@ -763,7 +763,6 @@ keyChangedCallback(GConfClient* aClient,
aGconfBe->notifyListeners(aGconfKey);
}
-#endif
//------------------------------------------------------------------------------
@@ -827,7 +826,7 @@ void GconfBackend::notifyListeners(const rtl::OUString& /*aGconfKey*/)
}
*/
}
-
+#endif
//------------------------------------------------------------------------------
void SAL_CALL GconfBackend::addChangesListener(
diff --git a/shell/source/backends/gconfbe/gconfbackend.hxx b/shell/source/backends/gconfbe/gconfbackend.hxx
index 2177eb99b6..e469fe10a4 100644
--- a/shell/source/backends/gconfbe/gconfbackend.hxx
+++ b/shell/source/backends/gconfbe/gconfbackend.hxx
@@ -174,10 +174,11 @@ class GconfBackend : public BackendBase {
const uno::Reference<backend::XBackendChangesListener>& xListener,
const rtl::OUString& aComponent)
throw (::com::sun::star::uno::RuntimeException);
-
+// currently not used
+#if 0
//Notify all listener of component change
void notifyListeners(const rtl::OUString& aGconfKey);
-
+#endif
protected:
/**
Service constructor from a service factory.
diff --git a/shell/source/backends/kdebe/kdebecdef.cxx b/shell/source/backends/kdebe/kdebecdef.cxx
index 026bffa7c1..c4995e6e81 100644
--- a/shell/source/backends/kdebe/kdebecdef.cxx
+++ b/shell/source/backends/kdebe/kdebecdef.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,7 +37,7 @@
#include <cppuhelper/implementationentry.hxx>
#endif
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <vcl/kde_headers.h>
+#include "kde_headers.h"
#include "uno/current_context.hxx"
@@ -52,28 +52,28 @@ static uno::Reference<uno::XInterface> SAL_CALL createKDEBackend(const uno::Refe
{
try {
uno::Reference< uno::XCurrentContext > xCurrentContext(uno::getCurrentContext());
-
+
if (xCurrentContext.is())
{
uno::Any aValue = xCurrentContext->getValueByName(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "system.desktop-environment" ) ) );
-
+
rtl::OUString aDesktopEnvironment;
if ( (aValue >>= aDesktopEnvironment) && (aDesktopEnvironment.equalsAscii("KDE")) && (KApplication::kApplication() != NULL) )
return * KDEBackend::createInstance(xContext);
}
-
- return uno::Reference<uno::XInterface>();
-
+
+ return uno::Reference<uno::XInterface>();
+
} catch (uno::RuntimeException e) {
- return uno::Reference<uno::XInterface>();
- }
-
+ return uno::Reference<uno::XInterface>();
+ }
+
}
//==============================================================================
-static const cppu::ImplementationEntry kImplementations_entries[] =
+static const cppu::ImplementationEntry kImplementations_entries[] =
{
{
createKDEBackend,
@@ -97,7 +97,7 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(
extern "C" sal_Bool SAL_CALL component_writeInfo(void *,
void *pRegistryKey) {
-
+
using namespace ::com::sun::star::registry;
if (pRegistryKey)
{
@@ -106,25 +106,25 @@ extern "C" sal_Bool SAL_CALL component_writeInfo(void *,
uno::Reference< XRegistryKey > xImplKey = static_cast< XRegistryKey* >( pRegistryKey )->createKey(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + KDEBackend::getBackendName()
);
-
+
// Register associated service names
- uno::Reference< XRegistryKey > xServicesKey = xImplKey->createKey(
+ uno::Reference< XRegistryKey > xServicesKey = xImplKey->createKey(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES") )
);
-
+
uno::Sequence<rtl::OUString> sServiceNames = KDEBackend::getBackendServiceNames();
for (sal_Int32 i = 0 ; i < sServiceNames.getLength() ; ++ i)
xServicesKey->createKey(sServiceNames[i]);
return sal_True;
}
-
+
catch( InvalidRegistryException& )
- {
- OSL_ENSURE(sal_False, "InvalidRegistryException caught");
+ {
+ OSL_ENSURE(sal_False, "InvalidRegistryException caught");
}
}
-
+
return sal_False;
}
@@ -133,7 +133,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo(void *,
extern "C" void *component_getFactory(const sal_Char *aImplementationName,
void *aServiceManager,
void *aRegistryKey) {
-
+
return cppu::component_getFactoryHelper(
aImplementationName,
aServiceManager,
diff --git a/shell/source/backends/kdebe/kdecommonlayer.cxx b/shell/source/backends/kdebe/kdecommonlayer.cxx
index d770c87013..44592e8933 100644
--- a/shell/source/backends/kdebe/kdecommonlayer.cxx
+++ b/shell/source/backends/kdebe/kdecommonlayer.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_shell.hxx"
#include "kdecommonlayer.hxx"
-#include <vcl/kde_headers.h>
+#include "kde_headers.h"
#include <com/sun/star/configuration/backend/PropertyInfo.hpp>
#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYERCONTENTDESCIBER_HPP_
#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
@@ -48,7 +48,7 @@ KDECommonLayer::KDECommonLayer(const uno::Reference<uno::XComponentContext>& xCo
rtl::OUString const k_sLayerDescriberService(RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.comp.configuration.backend.LayerDescriber"));
- typedef uno::Reference<backend::XLayerContentDescriber> LayerDescriber;
+ typedef uno::Reference<backend::XLayerContentDescriber> LayerDescriber;
uno::Reference< lang::XMultiComponentFactory > xServiceManager = xContext->getServiceManager();
if( xServiceManager.is() )
{
@@ -63,8 +63,8 @@ KDECommonLayer::KDECommonLayer(const uno::Reference<uno::XComponentContext>& xCo
//------------------------------------------------------------------------------
-void SAL_CALL KDECommonLayer::readData( const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException, lang::NullPointerException,
+void SAL_CALL KDECommonLayer::readData( const uno::Reference<backend::XLayerHandler>& xHandler)
+ throw ( backend::MalformedDataException, lang::NullPointerException,
lang::WrappedTargetException, uno::RuntimeException)
{
if( ! m_xLayerContentDescriber.is() )
@@ -73,7 +73,7 @@ void SAL_CALL KDECommonLayer::readData( const uno::Reference<backend::XLayerHand
"Could not create com.sun.star.configuration.backend.LayerContentDescriber Service"
) ), static_cast < backend::XLayer * > (this) );
}
-
+
uno::Sequence<backend::PropertyInfo> aPropInfoList(3);
sal_Int32 nProperties = 0;
@@ -91,7 +91,7 @@ void SAL_CALL KDECommonLayer::readData( const uno::Reference<backend::XLayerHand
aPropInfoList[nProperties].Name = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office.Common/ExternalMailer/Program") );
- aPropInfoList[nProperties].Type = rtl::OUString(
+ aPropInfoList[nProperties].Type = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "string" ) );
aPropInfoList[nProperties].Protected = sal_False;
aPropInfoList[nProperties++].Value = uno::makeAny( sClientProgram );
@@ -109,14 +109,14 @@ void SAL_CALL KDECommonLayer::readData( const uno::Reference<backend::XLayerHand
aPropInfoList[nProperties].Name = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office.Common/Font/SourceViewFont/FontName") );
- aPropInfoList[nProperties].Type = rtl::OUString(
+ aPropInfoList[nProperties].Type = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "string" ) );
aPropInfoList[nProperties].Protected = sal_False;
aPropInfoList[nProperties++].Value = uno::makeAny( sFontName );
aPropInfoList[nProperties].Name = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office.Common/Font/SourceViewFont/FontHeight") );
- aPropInfoList[nProperties].Type = rtl::OUString(
+ aPropInfoList[nProperties].Type = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "short" ) );
aPropInfoList[nProperties].Protected = sal_False;
aPropInfoList[nProperties++].Value = uno::makeAny( nFontHeight );
@@ -130,7 +130,7 @@ void SAL_CALL KDECommonLayer::readData( const uno::Reference<backend::XLayerHand
//------------------------------------------------------------------------------
-rtl::OUString SAL_CALL KDECommonLayer::getTimestamp(void)
+rtl::OUString SAL_CALL KDECommonLayer::getTimestamp(void)
throw (uno::RuntimeException)
{
// Return the value as timestamp to avoid regenerating the binary cache
diff --git a/shell/source/backends/kdebe/kdeinetlayer.hxx b/shell/source/backends/kdebe/kdeinetlayer.hxx
index f6066c39a7..1a7427b1cb 100644
--- a/shell/source/backends/kdebe/kdeinetlayer.hxx
+++ b/shell/source/backends/kdebe/kdeinetlayer.hxx
@@ -10,7 +10,7 @@
#endif
#include <com/sun/star/util/XTimeStamped.hpp>
#include <cppuhelper/implbase2.hxx>
-#include <vcl/kde_headers.h>
+#include <kde_headers.h>
namespace css = com::sun::star ;
namespace uno = css::uno ;
@@ -22,7 +22,7 @@ namespace util = css::util ;
Implementation of the XLayer interface for the KDE values mapped into
the org.openoffice.Inet configuration component.
*/
-class KDEInetLayer : public cppu::WeakImplHelper2<backend::XLayer, util::XTimeStamped>
+class KDEInetLayer : public cppu::WeakImplHelper2<backend::XLayer, util::XTimeStamped>
{
public :
/**
@@ -35,21 +35,21 @@ public :
// XLayer
virtual void SAL_CALL readData(
- const uno::Reference<backend::XLayerHandler>& xHandler)
+ const uno::Reference<backend::XLayerHandler>& xHandler)
throw ( backend::MalformedDataException,
- lang::NullPointerException,
- lang::WrappedTargetException,
+ lang::NullPointerException,
+ lang::WrappedTargetException,
uno::RuntimeException) ;
-
+
// XTimeStamped
- virtual rtl::OUString SAL_CALL getTimestamp(void)
+ virtual rtl::OUString SAL_CALL getTimestamp(void)
throw (uno::RuntimeException);
protected:
/** Destructor */
~KDEInetLayer(void) {}
-
+
private :
uno::Reference<backend::XLayerContentDescriber> m_xLayerContentDescriber ;
diff --git a/shell/source/backends/kdebe/kdepathslayer.cxx b/shell/source/backends/kdebe/kdepathslayer.cxx
index dd622f1bc0..c60a7fff04 100644
--- a/shell/source/backends/kdebe/kdepathslayer.cxx
+++ b/shell/source/backends/kdebe/kdepathslayer.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_shell.hxx"
#include "kdepathslayer.hxx"
-#include <vcl/kde_headers.h>
+#include "kde_headers.h"
#include <com/sun/star/configuration/backend/PropertyInfo.hpp>
#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYERCONTENTDESCIBER_HPP_
#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
@@ -50,7 +50,7 @@ KDEPathsLayer::KDEPathsLayer(const uno::Reference<uno::XComponentContext>& xCont
rtl::OUString const k_sLayerDescriberService(RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.comp.configuration.backend.LayerDescriber"));
- typedef uno::Reference<backend::XLayerContentDescriber> LayerDescriber;
+ typedef uno::Reference<backend::XLayerContentDescriber> LayerDescriber;
uno::Reference< lang::XMultiComponentFactory > xServiceManager = xContext->getServiceManager();
if( xServiceManager.is() )
{
@@ -65,8 +65,8 @@ KDEPathsLayer::KDEPathsLayer(const uno::Reference<uno::XComponentContext>& xCont
//------------------------------------------------------------------------------
-void SAL_CALL KDEPathsLayer::readData( const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException, lang::NullPointerException,
+void SAL_CALL KDEPathsLayer::readData( const uno::Reference<backend::XLayerHandler>& xHandler)
+ throw ( backend::MalformedDataException, lang::NullPointerException,
lang::WrappedTargetException, uno::RuntimeException)
{
if( ! m_xLayerContentDescriber.is() )
@@ -75,7 +75,7 @@ void SAL_CALL KDEPathsLayer::readData( const uno::Reference<backend::XLayerHandl
"Could not create com.sun.star.configuration.backend.LayerContentDescriber Service"
) ), static_cast < backend::XLayer * > (this) );
}
-
+
uno::Sequence<backend::PropertyInfo> aPropInfoList(1);
sal_Int32 nProperties = 0;
@@ -89,7 +89,7 @@ void SAL_CALL KDEPathsLayer::readData( const uno::Reference<backend::XLayerHandl
aPropInfoList[nProperties].Name = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office.Paths/Variables/Work") );
- aPropInfoList[nProperties].Type = rtl::OUString(
+ aPropInfoList[nProperties].Type = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "string" ) );
aPropInfoList[nProperties].Protected = sal_False;
aPropInfoList[nProperties++].Value = uno::makeAny( sDocumentsURL );
@@ -103,7 +103,7 @@ void SAL_CALL KDEPathsLayer::readData( const uno::Reference<backend::XLayerHandl
//------------------------------------------------------------------------------
-rtl::OUString SAL_CALL KDEPathsLayer::getTimestamp(void)
+rtl::OUString SAL_CALL KDEPathsLayer::getTimestamp(void)
throw (uno::RuntimeException)
{
// Return the value as timestamp to avoid regenerating the binary cache
diff --git a/shell/source/backends/kdebe/kdevcllayer.cxx b/shell/source/backends/kdebe/kdevcllayer.cxx
index e2373e08a2..f6c5368acf 100644
--- a/shell/source/backends/kdebe/kdevcllayer.cxx
+++ b/shell/source/backends/kdebe/kdevcllayer.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,7 +36,7 @@
#include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
#endif
#include <com/sun/star/uno/Sequence.hxx>
-#include <vcl/kde_headers.h>
+#include "kde_headers.h"
//==============================================================================
@@ -46,7 +46,7 @@ KDEVCLLayer::KDEVCLLayer(const uno::Reference<uno::XComponentContext>& xContext)
rtl::OUString const k_sLayerDescriberService(RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.comp.configuration.backend.LayerDescriber"));
- typedef uno::Reference<backend::XLayerContentDescriber> LayerDescriber;
+ typedef uno::Reference<backend::XLayerContentDescriber> LayerDescriber;
uno::Reference< lang::XMultiComponentFactory > xServiceManager = xContext->getServiceManager();
if( xServiceManager.is() )
{
@@ -61,8 +61,8 @@ KDEVCLLayer::KDEVCLLayer(const uno::Reference<uno::XComponentContext>& xContext)
//------------------------------------------------------------------------------
-void SAL_CALL KDEVCLLayer::readData( const uno::Reference<backend::XLayerHandler>& xHandler)
- throw ( backend::MalformedDataException, lang::NullPointerException,
+void SAL_CALL KDEVCLLayer::readData( const uno::Reference<backend::XLayerHandler>& xHandler)
+ throw ( backend::MalformedDataException, lang::NullPointerException,
lang::WrappedTargetException, uno::RuntimeException)
{
if( ! m_xLayerContentDescriber.is() )
@@ -71,7 +71,7 @@ void SAL_CALL KDEVCLLayer::readData( const uno::Reference<backend::XLayerHandler
"Could not create com.sun.star.configuration.backend.LayerContentDescriber Service"
) ), static_cast < backend::XLayer * > (this) );
}
-
+
uno::Sequence<backend::PropertyInfo> aPropInfoList(1);
/*
@@ -93,7 +93,7 @@ void SAL_CALL KDEVCLLayer::readData( const uno::Reference<backend::XLayerHandler
aPropInfoList[0].Name = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.VCL/Settings/Accessibility/EnableATToolSupport") );
- aPropInfoList[0].Type = rtl::OUString(
+ aPropInfoList[0].Type = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "string" ) );
aPropInfoList[0].Protected = sal_False;
aPropInfoList[0].Value = uno::makeAny( rtl::OUString::valueOf( ATToolSupport ) );
@@ -103,7 +103,7 @@ void SAL_CALL KDEVCLLayer::readData( const uno::Reference<backend::XLayerHandler
//------------------------------------------------------------------------------
-rtl::OUString SAL_CALL KDEVCLLayer::getTimestamp(void)
+rtl::OUString SAL_CALL KDEVCLLayer::getTimestamp(void)
throw (uno::RuntimeException)
{
// Return the value as timestamp to avoid regenerating the binary cache
diff --git a/shell/source/backends/localebe/localebackend.cxx b/shell/source/backends/localebe/localebackend.cxx
index 56094892f0..80d6240ae8 100644
--- a/shell/source/backends/localebe/localebackend.cxx
+++ b/shell/source/backends/localebe/localebackend.cxx
@@ -39,7 +39,7 @@
#include <stdio.h>
-#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) || defined(OS2)
+#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || defined(FREEBSD) || defined(OS2)
#include <rtl/ustrbuf.hxx>
#include <locale.h>
@@ -256,7 +256,7 @@ LocaleBackend* LocaleBackend::createInstance(
rtl::OUString LocaleBackend::getLocale(void)
{
-#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) || defined(OS2)
+#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || defined(FREEBSD) || defined(OS2)
return ImplGetLocale(LC_CTYPE);
#elif defined (MACOSX)
return ImplGetLocale("AppleLocale");
@@ -269,7 +269,7 @@ rtl::OUString LocaleBackend::getLocale(void)
rtl::OUString LocaleBackend::getUILocale(void)
{
-#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) || defined(OS2)
+#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || defined(FREEBSD) || defined(OS2)
return ImplGetLocale(LC_MESSAGES);
#elif defined(MACOSX)
return ImplGetLocale("AppleLanguages");
diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx
index e5fa02155f..bc15796b25 100644
--- a/shell/source/tools/lngconvex/lngconvex.cxx
+++ b/shell/source/tools/lngconvex/lngconvex.cxx
@@ -31,12 +31,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_shell.hxx"
-#if OSL_DEBUG_LEVEL == 0
-#ifndef NDEBUG
-#define NDEBUG
-#endif
-#endif
-
#include <tools/presys.h>
#if defined _MSC_VER
#pragma warning(push, 1)
@@ -60,11 +54,11 @@
#include <iostream>
#include <fstream>
-#include <assert.h>
#include <map>
#include <sstream>
#include <iterator>
#include <algorithm>
+#include <string>
namespace /* private */
{
@@ -282,7 +276,7 @@ public:
void substitute(std::string& Text)
{
replacement_table_t* prt = get_replacement_table(active_iso_lang_.make_std_string());
- assert(prt);
+ OSL_ASSERT(prt);
replacement_table_t::iterator iter = prt->find(Text);
if (iter != prt->end())
Text = iter->second;
@@ -292,7 +286,7 @@ public:
const std::string& Placeholder, const std::string& Substitute)
{
replacement_table_t* prt = get_replacement_table(active_iso_lang_.make_std_string());
- assert(prt);
+ OSL_ASSERT(prt);
prt->insert(std::make_pair(Placeholder, Substitute));
}
@@ -324,31 +318,47 @@ private:
iso_lang_identifier active_iso_lang_;
};
+typedef std::map< unsigned short , std::string , std::less< unsigned short > > shortmap;
+
//###########################################
void add_group_entries(
Config& aConfig,
const ByteString& GroupName,
Substitutor& Substitutor)
{
- assert(aConfig.HasGroup(GroupName));
+ OSL_ASSERT(aConfig.HasGroup(GroupName));
aConfig.SetGroup(GroupName);
size_t key_count = aConfig.GetKeyCount();
+ shortmap map;
for (size_t i = 0; i < key_count; i++)
{
ByteString iso_lang = aConfig.GetKeyName(sal::static_int_cast<USHORT>(i));
ByteString key_value_utf8 = aConfig.ReadKey(sal::static_int_cast<USHORT>(i));
+ iso_lang_identifier myiso_lang( iso_lang );
+ LanguageType ltype = MsLangId::convertIsoNamesToLanguage(myiso_lang.language(), myiso_lang.country());
+ if( ( ltype & 0x0200 ) == 0 && map[ ltype ].empty() )
+ {
+ Substitutor.set_language(iso_lang_identifier(iso_lang));
- Substitutor.set_language(iso_lang_identifier(iso_lang));
-
- key_value_utf8.EraseLeadingAndTrailingChars('\"');
+ key_value_utf8.EraseLeadingAndTrailingChars('\"');
- OUString key_value_utf16 =
- rtl::OStringToOUString(key_value_utf8, RTL_TEXTENCODING_UTF8);
+ OUString key_value_utf16 =
+ rtl::OStringToOUString(key_value_utf8, RTL_TEXTENCODING_UTF8);
- Substitutor.add_substitution(
- GroupName.GetBuffer(), make_winrc_unicode_string(key_value_utf16));
+ Substitutor.add_substitution(
+ GroupName.GetBuffer(), make_winrc_unicode_string(key_value_utf16));
+ map[ static_cast<unsigned short>(ltype) ] = std::string( iso_lang.GetBuffer() );
+ }
+ else
+ {
+ if( !map[ ltype ].empty() )
+ {
+ printf("ERROR: Duplicated ms id %d found for the languages %s and %s !!!! This does not work in microsoft resources\nPlease remove one!\n", ltype , map[ ltype ].c_str() , iso_lang.GetBuffer());
+ exit( -1 );
+ }
+ }
}
}
diff --git a/shell/source/unix/sysshell/recently_used_file.cxx b/shell/source/unix/sysshell/recently_used_file.cxx
index 9763ea8417..37a4ca7e2a 100644
--- a/shell/source/unix/sysshell/recently_used_file.cxx
+++ b/shell/source/unix/sysshell/recently_used_file.cxx
@@ -115,12 +115,6 @@ void recently_used_file::reset() const
}
//------------------------------------------------
-void recently_used_file::flush()
-{
- fflush(file_);
-}
-
-//------------------------------------------------
void recently_used_file::truncate(off_t length)
{
ftruncate(fileno(file_), length);
diff --git a/shell/source/unix/sysshell/recently_used_file.hxx b/shell/source/unix/sysshell/recently_used_file.hxx
index 596f047d83..8fe8477bb2 100644
--- a/shell/source/unix/sysshell/recently_used_file.hxx
+++ b/shell/source/unix/sysshell/recently_used_file.hxx
@@ -54,9 +54,6 @@ public:
void truncate(off_t length = 0);
//----------------------------
- void flush();
-
- //----------------------------
size_t read(
char* buffer,
size_t size) const;
diff --git a/shell/source/unix/sysshell/recently_used_file_handler.cxx b/shell/source/unix/sysshell/recently_used_file_handler.cxx
index d468a507a3..14ba26a773 100644
--- a/shell/source/unix/sysshell/recently_used_file_handler.cxx
+++ b/shell/source/unix/sysshell/recently_used_file_handler.cxx
@@ -49,18 +49,6 @@
#include <string.h>
namespace /* private */ {
-
- const rtl::OUString ENVV_UPDATE_RECENTLY_USED =
- rtl::OUString::createFromAscii("ENABLE_UPDATE_RECENTLY_USED");
-
- //########################################
- inline rtl::OString get_file_extension(const rtl::OString& file_url)
- {
- sal_Int32 index = file_url.lastIndexOf('.');
- OSL_ENSURE((index != -1) && ((index + 1) < file_url.getLength()), "Invalid file url");
- return file_url.copy(index + 1);
- }
-
//########################################
typedef std::vector<string_t> string_container_t;
@@ -475,14 +463,6 @@ namespace /* private */ {
greater_recently_used_item());
}
- //##############################
- bool update_recently_used_enabled()
- {
- rtl::OUString tmp;
- osl_getEnvironment(ENVV_UPDATE_RECENTLY_USED.pData, &tmp.pData);
- return (tmp.getLength() > 0);
- }
-
//------------------------------------------------
struct cleanup_guard
{
diff --git a/shell/source/win32/shlxthandler/infotips/infotips.cxx b/shell/source/win32/shlxthandler/infotips/infotips.cxx
index 2b0826fa45..4ebe4c642a 100644
--- a/shell/source/win32/shlxthandler/infotips/infotips.cxx
+++ b/shell/source/win32/shlxthandler/infotips/infotips.cxx
@@ -45,6 +45,8 @@
#include <stdio.h>
#include <utility>
#include <stdlib.h>
+
+
#define MAX_STRING 80
#define KB 1024.0
const std::wstring WSPACE = std::wstring(SPACE);
diff --git a/shell/source/win32/shlxthandler/makefile.mk b/shell/source/win32/shlxthandler/makefile.mk
index 481dbe654a..d85e5d4d5f 100644
--- a/shell/source/win32/shlxthandler/makefile.mk
+++ b/shell/source/win32/shlxthandler/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -124,17 +124,17 @@ SHL1STDLIBS_X64+=\
$(SHELL32LIB_X64)\
$(KERNEL32LIB_X64)\
$(GDI32LIB_X64)\
- $(MSVCRT_X64) \
- $(MSVCPRT_X64) \
$(USER32LIB_X64) \
- $(OLDNAMESLIB_X64) \
- $(GDIPLUSLIB_X64)
+ $(GDIPLUSLIB_X64) \
+ $(MSVCRT_X64) \
+ $(MSVCPRT_X64) \
+ $(OLDNAMESLIB_X64)
SHL1LIBS_X64+=$(SLB_X64)$/util.lib\
$(SLB_X64)$/ooofilereader.lib
SHL1OBJS_X64=$(SLOFILES_X64)
SHL1DEF_X64=$(MISC_X64)$/$(SHL1TARGET).def
-SHL1RES_X64=$(RES_X64)$/$(TARGET)_x64.res
+SHL1RES_X64=$(RES_X64)$/$(TARGET).res
DEF1NAME_X64=$(SHL1TARGET_X64)
DEF1EXPORTFILE_X64=exports.dxp
@@ -147,3 +147,4 @@ DEF1EXPORTFILE_X64=exports.dxp
INCLUDE!:=$(subst,/stl, $(INCLUDE))
.EXPORT : INCLUDE
.INCLUDE : tg_wntx64.mk
+
diff --git a/shell/source/win32/shlxthandler/ooofilt/proxy/ooofiltproxy.cxx b/shell/source/win32/shlxthandler/ooofilt/proxy/ooofiltproxy.cxx
new file mode 100644
index 0000000000..4836eb34bb
--- /dev/null
+++ b/shell/source/win32/shlxthandler/ooofilt/proxy/ooofiltproxy.cxx
@@ -0,0 +1,166 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ooofiltproxy.cxx,v $
+ * $Revision: 1.8 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_shell.hxx"
+
+#if defined _MSC_VER
+#pragma warning(push, 1)
+#endif
+#include <windows.h>
+#if defined _MSC_VER
+#pragma warning(pop)
+#endif
+#include <tchar.h>
+#ifdef __MINGW32__
+#include <basetyps.h>
+#endif
+#include "internal/config.hxx"
+
+
+/*
+ The indexing filter library ooofilt.dll is linked against a couple
+ of libaries (e.g. stlport, uwinapi, ...) which are not standard on
+ a windows system. Unfortunately the library will be loaded by the
+ indexing service via LoadLibrary so that the libraries ooofilt.dll
+ depends on need to be in one of the standard search directories or
+ the <office installation> directory need to be added to the PATH
+ environment variable. In order to prevent failures while loading
+ the ooofilt.dll we're installing and registering this proxy library
+ which will load ooofilt.dll using LoadLibraryEx with the flag
+ LOAD_WITH_ALTERED_SEARCH_PATH (see MSDN for details). This approach
+ ensures that all libraries ooofilt.dll depends on will be found.
+*/
+
+typedef HRESULT (__stdcall * Forward_DllGetClassObject_t)(REFCLSID cid, REFIID iid, void** ppvObj);
+typedef HRESULT (__stdcall * Forward_DllCanUnloadNow_t)();
+typedef HRESULT (__stdcall * Forward_DllRegisterServer_t)();
+typedef HRESULT (__stdcall * Forward_DllUnregisterServer_t)();
+
+Forward_DllGetClassObject_t Forward_DllGetClassObject = NULL;
+Forward_DllCanUnloadNow_t Forward_DllCanUnloadNow = NULL;
+Forward_DllRegisterServer_t Forward_DllRegisterServer = NULL;
+Forward_DllUnregisterServer_t Forward_DllUnregisterServer = NULL;
+
+HMODULE hOoofilt = NULL;
+HMODULE hThisLibrary = NULL;
+
+/* Truncates the file name from an absolute path but
+ leaves the final '\' */
+void PathTruncateFileName(TCHAR* path)
+{
+ TCHAR* p = path + lstrlen(path);
+ while (*p != _T('\\')) p--;
+ p++;
+ *p = 0;
+}
+
+void Init()
+{
+ if (Forward_DllGetClassObject == NULL)
+ {
+ TCHAR buff[MAX_PATH];
+ GetModuleFileName(hThisLibrary, buff, (sizeof(buff)/sizeof(TCHAR)));
+ PathTruncateFileName(buff);
+
+ lstrcat(buff, MODULE_NAME_FILTER);
+
+ hOoofilt = LoadLibraryEx(buff, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
+
+ if (hOoofilt)
+ {
+ Forward_DllGetClassObject = reinterpret_cast<Forward_DllGetClassObject_t>(
+ GetProcAddress(hOoofilt, "DllGetClassObject"));
+ Forward_DllCanUnloadNow = reinterpret_cast<Forward_DllCanUnloadNow_t>(
+ GetProcAddress(hOoofilt, "DllCanUnloadNow"));
+ Forward_DllRegisterServer = reinterpret_cast<Forward_DllRegisterServer_t>(
+ GetProcAddress(hOoofilt, "DllRegisterServer"));
+ Forward_DllUnregisterServer = reinterpret_cast<Forward_DllUnregisterServer_t>(
+ GetProcAddress(hOoofilt, "DllUnregisterServer"));
+ }
+ }
+}
+
+extern "C" BOOL WINAPI DllMain(HMODULE hInstance, DWORD fdwReason, LPVOID /*lpvReserved*/)
+{
+ switch (fdwReason)
+ {
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls( hInstance );
+ hThisLibrary = hInstance;
+ break;
+ case DLL_PROCESS_DETACH:
+ if (hOoofilt)
+ FreeLibrary(hOoofilt);
+ break;
+ default:
+ break;
+ }
+ return TRUE;
+}
+
+extern "C" HRESULT __stdcall DllGetClassObject(REFCLSID cid, REFIID iid, void** ppvObj)
+{
+ Init();
+
+ if (Forward_DllGetClassObject)
+ return Forward_DllGetClassObject(cid, iid, ppvObj);
+ else
+ return E_FAIL;
+}
+
+extern "C" HRESULT __stdcall DllCanUnloadNow()
+{
+ Init();
+
+ if (Forward_DllCanUnloadNow)
+ return Forward_DllCanUnloadNow();
+ else
+ return E_FAIL;
+}
+
+extern "C" HRESULT __stdcall DllRegisterServer()
+{
+ Init();
+ if (Forward_DllRegisterServer)
+ return Forward_DllRegisterServer();
+ else
+ return E_FAIL;
+}
+
+extern "C" HRESULT __stdcall DllUnregisterServer()
+{
+ Init();
+
+ if (Forward_DllUnregisterServer)
+ return Forward_DllUnregisterServer();
+ else
+ return E_FAIL;
+}
diff --git a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx
index c901c7be42..7172fa8348 100644
--- a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx
+++ b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx
@@ -177,7 +177,6 @@ HRESULT STDMETHODCALLTYPE CPropertySheet::Initialize(
HRESULT STDMETHODCALLTYPE CPropertySheet::AddPages(LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam)
{
-
PROPSHEETPAGE psp;
// add the summary property page
@@ -309,7 +308,6 @@ BOOL CALLBACK CPropertySheet::PropPageStatisticsProc(HWND hwnd, UINT uiMsg, WPAR
//##################################
void CPropertySheet::InitPropPageSummary(HWND hwnd, LPPROPSHEETPAGE /*lppsp*/)
{
-
CMetaInfoReader metaInfo(m_szFileName);
SetWindowText(GetDlgItem(hwnd,IDC_TITLE), metaInfo.getTagData( META_INFO_TITLE ).c_str() );
@@ -335,7 +333,6 @@ void CPropertySheet::InitPropPageSummary(HWND hwnd, LPPROPSHEETPAGE /*lppsp*/)
*/
void CPropertySheet::InitPropPageStatistics(HWND hwnd, LPPROPSHEETPAGE /*lppsp*/)
{
-
CMetaInfoReader metaInfo(m_szFileName);
document_statistic_reader_ptr doc_stat_reader = create_document_statistic_reader(m_szFileName, &metaInfo);
diff --git a/shell/source/win32/shlxthandler/res/makefile.mk b/shell/source/win32/shlxthandler/res/makefile.mk
index 08893506b2..8f8c776383 100644
--- a/shell/source/win32/shlxthandler/res/makefile.mk
+++ b/shell/source/win32/shlxthandler/res/makefile.mk
@@ -53,9 +53,19 @@ ULFDIR:=$(COMMONMISC)$/$(TARGET)
.ELSE # "$(WITH_LANG)"!=""
ULFDIR:=.
.ENDIF # "$(WITH_LANG)"!=""
+
# --- Targets ------------------------------------------------------
+.IF "$(BUILD_X64)"!=""
+$(RES)$/x64$/$(TARGET).res : $(RES)$/$(TARGET).res
+ -$(MKDIR) $(RES)$/x64
+ @@cp $< $@
+.ENDIF # "$(BUILD_X64)"!=""
+
+.INCLUDE : set_wntx64.mk
.INCLUDE : target.mk
+.INCLUDE : tg_wntx64.mk
+
# Generate the native Windows resource file
diff --git a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
index 9c9952e057..0c77dc22f3 100644
--- a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
+++ b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
@@ -30,19 +30,21 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_shell.hxx"
+
#include "internal/global.hxx"
#ifndef INFOTIPS_HXX_INCLUDED
#include "internal/thumbviewer.hxx"
#endif
#include "internal/shlxthdl.hxx"
-#include "internal/utilities.hxx"
#include "internal/registry.hxx"
#include "internal/fileextensions.hxx"
#include "internal/config.hxx"
#include "internal/zipfile.hxx"
+#include "internal/utilities.hxx"
#include "internal/resource.h"
+
#include <stdio.h>
#include <utility>
#include <stdlib.h>
@@ -212,15 +214,15 @@ HRESULT STDMETHODCALLTYPE StreamOnZipBuffer::Read(void *pv, ULONG cb, ULONG *pcb
HRESULT STDMETHODCALLTYPE StreamOnZipBuffer::Seek(LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *)
{
- size_t size = ref_zip_buffer_.size();
- size_t p = 0;
+ __int64 size = (__int64) ref_zip_buffer_.size();
+ __int64 p = 0;
switch (dwOrigin)
{
case STREAM_SEEK_SET:
break;
case STREAM_SEEK_CUR:
- p = pos_;
+ p = (__int64) pos_;
break;
case STREAM_SEEK_END:
p = size - 1;
@@ -229,10 +231,11 @@ HRESULT STDMETHODCALLTYPE StreamOnZipBuffer::Seek(LARGE_INTEGER dlibMove, DWORD
HRESULT hr = STG_E_INVALIDFUNCTION;
- p += dlibMove.LowPart;
- if (p < size)
+ p += dlibMove.QuadPart;
+
+ if ( ( p >= 0 ) && (p < size) )
{
- pos_ = p;
+ pos_ = (size_t) p;
hr = S_OK;
}
return hr;
@@ -295,7 +298,7 @@ HRESULT STDMETHODCALLTYPE StreamOnZipBuffer::Clone(IStream **)
CThumbviewer::CThumbviewer(long RefCnt) :
ref_count_(RefCnt)
-{
+{
InterlockedIncrement(&g_DllRefCnt);
thumbnail_size_.cx = 0;
@@ -468,6 +471,7 @@ HRESULT STDMETHODCALLTYPE CThumbviewer::Extract(HBITMAP *phBmpImage)
}
catch(std::exception&)
{
+ OutputDebugStringFormat( "CThumbviewer Extract ERROR!\n" );
hr = E_FAIL;
}
return hr;
diff --git a/shell/source/win32/shlxthandler/util/utilities.cxx b/shell/source/win32/shlxthandler/util/utilities.cxx
index d76e0c9df7..eaffd4f023 100644
--- a/shell/source/win32/shlxthandler/util/utilities.cxx
+++ b/shell/source/win32/shlxthandler/util/utilities.cxx
@@ -32,12 +32,9 @@
#include "precompiled_shell.hxx"
-#include "internal/utilities.hxx"
#include "internal/config.hxx"
#include "internal/dbgmacros.hxx"
-
-
-
+#include "internal/utilities.hxx"
//-----------------------------
// constants
@@ -87,15 +84,9 @@ std::wstring GetResString(int ResId)
{
wchar_t szResStr[MAX_RES_STRING];
- #if OSL_DEBUG_LEVEL > 0
- int rc =
- #endif
- LoadStringW(
- GetModuleHandleW(MODULE_NAME),
- ResId,
- szResStr,
- sizeof(szResStr));
+ int rc = LoadStringW( GetModuleHandleW(MODULE_NAME), ResId, szResStr, sizeof(szResStr) );
+ OutputDebugStringFormat( "GetResString: read %d chars\n", rc );
ENSURE(rc, "String resource not found");
return std::wstring(szResStr);