diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 12:24:29 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 12:24:29 +0200 |
commit | 92667c8edbaee9a252b1d5d221eb62849f76697c (patch) | |
tree | 8f1d329f2259b7d5bff054bc14d0965637df6961 /shell | |
parent | baecdfb578cb7bc992944857ad4d8882ef7e842c (diff) | |
parent | 48b4a99ce2451f1ddf2e8e128bbfcd6683072999 (diff) |
Merge branch 'master' into feature/gnumake4
Conflicts:
connectivity/source/cpool/Zregistration.cxx
connectivity/source/drivers/evoab/LCatalog.cxx
connectivity/source/drivers/evoab/LColumnAlias.cxx
connectivity/source/drivers/evoab/LColumnAlias.hxx
connectivity/source/drivers/evoab/LColumns.cxx
connectivity/source/drivers/evoab/LColumns.hxx
connectivity/source/drivers/evoab/LConfigAccess.cxx
connectivity/source/drivers/evoab/LConfigAccess.hxx
connectivity/source/drivers/evoab/LConnection.cxx
connectivity/source/drivers/evoab/LConnection.hxx
connectivity/source/drivers/evoab/LDatabaseMetaData.cxx
connectivity/source/drivers/evoab/LDatabaseMetaData.hxx
connectivity/source/drivers/evoab/LDriver.cxx
connectivity/source/drivers/evoab/LDriver.hxx
connectivity/source/drivers/evoab/LFolderList.cxx
connectivity/source/drivers/evoab/LFolderList.hxx
connectivity/source/drivers/evoab/LNoException.cxx
connectivity/source/drivers/evoab/LPreparedStatement.cxx
connectivity/source/drivers/evoab/LPreparedStatement.hxx
connectivity/source/drivers/evoab/LResultSet.cxx
connectivity/source/drivers/evoab/LResultSet.hxx
connectivity/source/drivers/evoab/LServices.cxx
connectivity/source/drivers/evoab/LStatement.cxx
connectivity/source/drivers/evoab/LStatement.hxx
connectivity/source/drivers/evoab/LTable.cxx
connectivity/source/drivers/evoab/LTable.hxx
connectivity/source/drivers/evoab/LTables.cxx
connectivity/source/drivers/evoab/LTables.hxx
connectivity/source/drivers/evoab/evoab.xml
connectivity/source/drivers/evoab/makefile.mk
editeng/Library_editeng.mk
framework/Library_fwe.mk
framework/test/test.cxx
idl/prj/d.lst
idl/util/idlpch.cxx
linguistic/Makefile
linguistic/Module_linguistic.mk
linguistic/inc/linguistic/lngdllapi.h
linguistic/inc/linguistic/lngprophelp.hxx
linguistic/inc/linguistic/misc.hxx
linguistic/prj/build.lst
linguistic/prj/d.lst
linguistic/qa/unoapi/Test.java
linguistic/source/grammarchecker.cxx
linguistic/source/grammarchecker.hxx
linguistic/source/hyphdta.cxx
linguistic/source/lngprophelp.cxx
linguistic/source/makefile.mk
linguistic/source/spelldta.cxx
sfx2/Library_qstart.mk
sfx2/Library_sfx.mk
sfx2/inc/sfx2/qswin32.h
sfx2/prj/build.lst
sfx2/qa/cppunit/makefile.mk
xmlscript/inc/xmlscript/xcrdllapi.h
xmlscript/prj/d.lst
xmlscript/util/makefile.mk
Diffstat (limited to 'shell')
189 files changed, 779 insertions, 1306 deletions
diff --git a/shell/inc/internal/basereader.hxx b/shell/inc/internal/basereader.hxx index fcdf1cdd7dff..bb5c27645e2a 100644 --- a/shell/inc/internal/basereader.hxx +++ b/shell/inc/internal/basereader.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,9 +35,7 @@ #include "internal/utilities.hxx" #include "internal/i_xml_parser_event_handler.hxx" -#ifndef XML_PARSER_HXX_INCLUDED #include "internal/xml_parser.hxx" -#endif #include "internal/zipfile.hxx" class CBaseReader : public i_xml_parser_event_handler @@ -78,3 +77,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/internal/columninfo.hxx b/shell/inc/internal/columninfo.hxx index 4e392dd76f4d..32cc89680a88 100644 --- a/shell/inc/internal/columninfo.hxx +++ b/shell/inc/internal/columninfo.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,3 +76,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/internal/config.hxx b/shell/inc/internal/config.hxx index 3c10e7db26a7..37de9ca89368 100644 --- a/shell/inc/internal/config.hxx +++ b/shell/inc/internal/config.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,9 +33,7 @@ #pragma warning (disable : 4786 4503 4917) #endif -#ifndef OS2 #include <tchar.h> -#endif #ifdef _AMD64_ #define MODULE_NAME TEXT("shlxthdl_x64.dll") @@ -102,3 +101,5 @@ #define CONTENT_STYLE_PROPERTIES_COUNTRYASIAN L"country-asian" #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/internal/contentreader.hxx b/shell/inc/internal/contentreader.hxx index 63b0c550c534..6a7dc594af60 100644 --- a/shell/inc/internal/contentreader.hxx +++ b/shell/inc/internal/contentreader.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,7 +38,6 @@ class CContentReader : public CBaseReader public: virtual ~CContentReader(); - //CContentReader( const std::string& DocumentName ); CContentReader( const std::string& DocumentName, LocaleSet_t const & DocumentLocale ); CContentReader( void* stream, LocaleSet_t const & DocumentLocale, zlib_filefunc_def* fa ); @@ -124,3 +124,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/internal/dbgmacros.hxx b/shell/inc/internal/dbgmacros.hxx deleted file mode 100644 index fbab023664ac..000000000000 --- a/shell/inc/internal/dbgmacros.hxx +++ /dev/null @@ -1,51 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef DBGMACROS_HXX_INCLUDED -#define DBGMACROS_HXX_INCLUDED - -void DbgAssert(bool condition, const char* message); - -#if OSL_DEBUG_LEVEL > 0 - - #define PRE_CONDITION(x, msg) DbgAssert(x, msg) - - #define POST_CONDITION(x, msg) DbgAssert(x, msg) - - #define ENSURE(x ,msg) DbgAssert(x, msg) - -#else // OSL_DEBUG_LEVEL == 0 - - #define PRE_CONDITION(x, msg) ((void)0) - - #define POST_CONDITION(x, msg) ((void)0) - - #define ENSURE(x, msg) ((void)0) - -#endif - -#endif diff --git a/shell/inc/internal/fileextensions.hxx b/shell/inc/internal/fileextensions.hxx index 48d6f283ea1d..4005258d8ac7 100644 --- a/shell/inc/internal/fileextensions.hxx +++ b/shell/inc/internal/fileextensions.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -66,3 +67,5 @@ enum File_Type_t { UNKNOWN, WRITER, CALC, DRAW, IMPRESS, MATH, WEB, DATABASE }; File_Type_t get_file_type(const std::string& file_name); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/internal/global.hxx b/shell/inc/internal/global.hxx index ebf3305934bd..a87510958f08 100644 --- a/shell/inc/internal/global.hxx +++ b/shell/inc/internal/global.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,14 +32,13 @@ #if defined _MSC_VER #pragma warning(push, 1) #endif -#ifndef OS2 #include <windows.h> -#endif #if defined _MSC_VER #pragma warning(pop) #endif -#include "internal/dbgmacros.hxx" extern long g_DllRefCnt; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/internal/i_xml_parser_event_handler.hxx b/shell/inc/internal/i_xml_parser_event_handler.hxx index 5164f2236522..710efc062ab5 100644 --- a/shell/inc/internal/i_xml_parser_event_handler.hxx +++ b/shell/inc/internal/i_xml_parser_event_handler.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,7 +44,6 @@ typedef std::map<string_t, string_t> xml_tag_attribute_container_t; -//######################################### class i_xml_parser_event_handler { public: @@ -76,3 +76,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/internal/infotips.hxx b/shell/inc/internal/infotips.hxx index 8193615a505f..d4e5de2582b1 100644 --- a/shell/inc/internal/infotips.hxx +++ b/shell/inc/internal/infotips.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -98,3 +99,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/internal/iso8601_converter.hxx b/shell/inc/internal/iso8601_converter.hxx index f7f00bbe1c53..9e59a50feddf 100644 --- a/shell/inc/internal/iso8601_converter.hxx +++ b/shell/inc/internal/iso8601_converter.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -45,3 +46,5 @@ std::wstring iso8601_date_to_local_date(const std::wstring& iso8601date); std::wstring iso8601_duration_to_local_duration(const std::wstring& iso8601duration); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/internal/metainforeader.hxx b/shell/inc/internal/metainforeader.hxx index ea29dff07c80..516224571078 100755..100644 --- a/shell/inc/internal/metainforeader.hxx +++ b/shell/inc/internal/metainforeader.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -146,3 +147,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/internal/propertyhdl.hxx b/shell/inc/internal/propertyhdl.hxx index 6379fdf0137b..c430c2f5778e 100755..100644 --- a/shell/inc/internal/propertyhdl.hxx +++ b/shell/inc/internal/propertyhdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -6,9 +7,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PropertyHdl.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -124,3 +122,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/internal/propsheets.hxx b/shell/inc/internal/propsheets.hxx index 0159379e3127..e3e38dd84350 100644 --- a/shell/inc/internal/propsheets.hxx +++ b/shell/inc/internal/propsheets.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -92,3 +93,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/internal/registry.hxx b/shell/inc/internal/registry.hxx index 25f1749a6a3c..dc1b2488e188 100644 --- a/shell/inc/internal/registry.hxx +++ b/shell/inc/internal/registry.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -67,3 +68,5 @@ bool QueryRegistryKey(HKEY RootKey, const char* KeyName, const char* ValueName, #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/internal/resource.h b/shell/inc/internal/resource.h index 3685ac5f66fc..338e1f0114ae 100644..100755 --- a/shell/inc/internal/resource.h +++ b/shell/inc/internal/resource.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ #ifndef RESOURCE_H_INCLUDED #define RESOURCE_H_INCLUDED @@ -55,3 +56,5 @@ #define IDP_SIGNET 2000 #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/internal/shlxthdl.hxx b/shell/inc/internal/shlxthdl.hxx index b13a142b6e2c..310d54f9d5d4 100755..100644 --- a/shell/inc/internal/shlxthdl.hxx +++ b/shell/inc/internal/shlxthdl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -53,3 +54,5 @@ const CLSID CLSID_THUMBVIEWER_HANDLER = { 0x3b092f0c, 0x7696, 0x40e3, { 0xa8, 0xf, 0x68, 0xd7, 0x4d, 0xa8, 0x42, 0x10 } }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/internal/stream_helper.hxx b/shell/inc/internal/stream_helper.hxx index 2ef4529b54ce..bd31ee111315 100755..100644 --- a/shell/inc/internal/stream_helper.hxx +++ b/shell/inc/internal/stream_helper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,3 +34,5 @@ IStream* PrepareIStream( IStream* pStream, zlib_filefunc_def &zFileFunc ); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/internal/thumbviewer.hxx b/shell/inc/internal/thumbviewer.hxx index 8c4a8979a181..73f6ba8de010 100644 --- a/shell/inc/internal/thumbviewer.hxx +++ b/shell/inc/internal/thumbviewer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -116,3 +117,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/internal/types.hxx b/shell/inc/internal/types.hxx index c11692912aec..a806d02768dd 100644 --- a/shell/inc/internal/types.hxx +++ b/shell/inc/internal/types.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -40,13 +41,10 @@ typedef std::vector<std::wstring> StringList_t; //+------------------------------------------------------------------------- -// // Declare: XmlTagAttributes_t, xml tag attribute struct // XmlTag_t, xml tag including content and attributes. // XmlTags_t, tags defined with tag name and xml tag. -// // Contents: Definitions of xml tag used in parser. -// //-------------------------------------------------------------------------- typedef std::wstring Name_t; typedef std::wstring Value_t; @@ -59,13 +57,10 @@ typedef std::map<Name_t, XmlTag_t> XmlTags_t; const XmlTag_t EMPTY_XML_TAG = std::make_pair(std::wstring(), XmlTagAttributes_t()); //+------------------------------------------------------------------------- -// // Declare: Language_t, language of the Locale pair // Country_t, country of the Local pair // LocaleSet_t, Local pair -// // Contents: Definitions of Chunk properties. -// //-------------------------------------------------------------------------- typedef ::std::wstring Language_t; typedef ::std::wstring Country_t; @@ -79,12 +74,9 @@ const LocaleSet_t EMPTY_LOCALE = ::std::make_pair(::std::wstring(), ::std::wstri const Chunk_t EMPTY_CHUNK = ::std::make_pair( EMPTY_LOCALE, ::std::wstring()); //+------------------------------------------------------------------------- -// // Declare: StyleName_t, style name of a style-locale pair. // StyleLocaleMap, the map of Styple-Locale pair. -// // Contents: Definitions of Style Names. -// //-------------------------------------------------------------------------- typedef ::std::wstring StyleName_t; typedef ::std::pair <StyleName_t, LocaleSet_t> StyleLocalePair_t; @@ -93,3 +85,5 @@ typedef ::std::map<StyleName_t, LocaleSet_t> StyleLocaleMap_t; const StyleLocalePair_t EMPTY_STYLELOCALE_PAIR = ::std::make_pair(::std::wstring(), EMPTY_LOCALE ); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/internal/utilities.hxx b/shell/inc/internal/utilities.hxx index c67787c5cb9d..2697c8002dc6 100755..100644 --- a/shell/inc/internal/utilities.hxx +++ b/shell/inc/internal/utilities.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,9 +33,7 @@ #if defined _MSC_VER #pragma warning(push, 1) #endif -#ifndef OS2 #include <windows.h> -#endif #if defined _MSC_VER #pragma warning(pop) #endif @@ -90,9 +89,7 @@ bool HasOnlySpaces(const std::wstring& String); std::wstring getShortPathName( const std::wstring& aLongName ); -#ifndef OS2 LCID LocaleSetToLCID( const LocaleSet_t & Locale ); -#endif //---------------------------------------------------------- #ifdef DEBUG @@ -114,3 +111,5 @@ static inline void OutputDebugStringFormat( LPCSTR, ... ) #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/internal/xml_parser.hxx b/shell/inc/internal/xml_parser.hxx index 57e8a4fd6d88..fbf7cf2e03ce 100644 --- a/shell/inc/internal/xml_parser.hxx +++ b/shell/inc/internal/xml_parser.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -65,13 +66,10 @@ class i_xml_parser_event_handler; class xml_parser { public: - //######################################################## xml_parser(const XML_Char* EncodingName = 0); - //######################################################## ~xml_parser(); - //######################################################## /** Parse a XML data stream @param pXmlData @@ -93,7 +91,6 @@ public: contains detailed information about the error. */ void parse(const char* XmlData, size_t Length, bool IsFinal = true); - //######################################################## /** Set a document handler @descr A document handler implements the interface i_xml_parser_event_handler. @@ -112,7 +109,6 @@ public: @postcond currently used document handler == pSaxDocumentHandler */ void set_document_handler(i_xml_parser_event_handler* event_handler); - //######################################################## /** Returns the currently used document handler or null if no document handler was set before. */ i_xml_parser_event_handler* get_document_handler() const; @@ -132,3 +128,4 @@ private: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/internal/zipfile.hxx b/shell/inc/internal/zipfile.hxx index a3e3575082c0..6d8d24b0538c 100644 --- a/shell/inc/internal/zipfile.hxx +++ b/shell/inc/internal/zipfile.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -160,3 +161,4 @@ private: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/kde_headers.h b/shell/inc/kde_headers.h index 772a5382fe81..7ec45fdc383d 100644..100755 --- a/shell/inc/kde_headers.h +++ b/shell/inc/kde_headers.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,6 +32,8 @@ /* ********* Suppress warnings if needed */ #include "sal/config.h" +#include <cstddef> + #if defined __GNUC__ #pragma GCC system_header #endif @@ -90,5 +93,6 @@ #include <kabc/field.h> #include <kabc/stdaddressbook.h> - #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/makefile.mk b/shell/inc/makefile.mk index c297cb4f77e9..c297cb4f77e9 100644..100755 --- a/shell/inc/makefile.mk +++ b/shell/inc/makefile.mk diff --git a/shell/inc/pch/precompiled_shell.cxx b/shell/inc/pch/precompiled_shell.cxx index 778ff4e4578e..749acbe4ed3f 100644 --- a/shell/inc/pch/precompiled_shell.cxx +++ b/shell/inc/pch/precompiled_shell.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,3 +28,4 @@ #include "precompiled_shell.hxx" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/inc/pch/precompiled_shell.hxx b/shell/inc/pch/precompiled_shell.hxx index a3ea4e27b4bb..487d27d55cd2 100644 --- a/shell/inc/pch/precompiled_shell.hxx +++ b/shell/inc/pch/precompiled_shell.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,3 +31,4 @@ #ifdef PRECOMPILED_HEADERS #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/prj/build.lst b/shell/prj/build.lst index abf9af0c0c8e..db5273020fe8 100755..100644 --- a/shell/prj/build.lst +++ b/shell/prj/build.lst @@ -1,4 +1,4 @@ -sl shell : L10N:l10n offuh rdbmaker tools sal EXPAT:expat LIBXSLT:libxslt NULL +sl shell : TRANSLATIONS:translations offuh rdbmaker tools sal EXPAT:expat LIBXSLT:libxslt 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 3ef183dbdf42..679b34c83d36 100644 --- a/shell/prj/d.lst +++ b/shell/prj/d.lst @@ -1,34 +1,34 @@ -..\%__SRC%\slb\*.lib %_DEST%\lib%_EXT%\*.lib -..\%__SRC%\slb\*.a %_DEST%\lib%_EXT%\*.a -..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT% -..\%__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%\bin\x64\propertyhdl.dll %_DEST%\bin%_EXT%\propertyhdl_x64.dll -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib -..\%__SRC%\lib\*.a %_DEST%\lib%_EXT%\*.a -..\%__SRC%\misc\cmdmail.component %_DEST%\xml%_EXT%\cmdmail.component +..\%__SRC%\slb\*.lib %_DEST%\lib\*.lib +..\%__SRC%\slb\*.a %_DEST%\lib\*.a +..\%__SRC%\lib\lib*.so %_DEST%\lib +..\%__SRC%\lib\*.uno.so %_DEST%\lib\*.uno.so +..\%__SRC%\bin\*.dll %_DEST%\bin\*.dll +..\%__SRC%\bin\*.exe %_DEST%\bin\*.exe +..\%__SRC%\bin\x64\shlxthdl.dll %_DEST%\bin\shlxthdl_x64.dll +..\%__SRC%\bin\x64\ooofiltproxy.dll %_DEST%\bin\ooofiltproxy_x64.dll +..\%__SRC%\bin\x64\ooofilt.dll %_DEST%\bin\ooofilt_x64.dll +..\%__SRC%\bin\x64\propertyhdl.dll %_DEST%\bin\propertyhdl_x64.dll +..\%__SRC%\lib\*.dylib %_DEST%\lib\*.dylib +..\%__SRC%\lib\*.a %_DEST%\lib\*.a +..\%__SRC%\misc\cmdmail.component %_DEST%\xml\cmdmail.component -..\%__SRC%\bin\open-url %_DEST%\bin%_EXT%\open-url -..\%__SRC%\bin\cde-open-url %_DEST%\bin%_EXT%\cde-open-url -..\%__SRC%\bin\kde-open-url %_DEST%\bin%_EXT%\kde-open-url -..\%__SRC%\bin\gnome-open-url %_DEST%\bin%_EXT%\gnome-open-url -..\%__SRC%\bin\gnome-open-url.bin %_DEST%\bin%_EXT%\gnome-open-url.bin -..\%__SRC%\bin\senddoc %_DEST%\bin%_EXT%\senddoc -..\%__SRC%\bin\uri-encode %_DEST%\bin%_EXT%\uri-encode +..\%__SRC%\bin\open-url %_DEST%\bin\open-url +..\%__SRC%\bin\cde-open-url %_DEST%\bin\cde-open-url +..\%__SRC%\bin\kde-open-url %_DEST%\bin\kde-open-url +..\%__SRC%\bin\gnome-open-url %_DEST%\bin\gnome-open-url +..\%__SRC%\bin\gnome-open-url.bin %_DEST%\bin\gnome-open-url.bin +..\%__SRC%\bin\senddoc %_DEST%\bin\senddoc +..\%__SRC%\bin\uri-encode %_DEST%\bin\uri-encode -..\%__SRC%\misc\*.xml %_DEST%\xml%_EXT%\*.xml +..\%__SRC%\misc\*.xml %_DEST%\xml\*.xml -..\%__SRC%\misc\desktopbe1.component %_DEST%\xml%_EXT%\desktopbe1.component -..\%__SRC%\misc\gconfbe1.component %_DEST%\xml%_EXT%\gconfbe1.component -..\%__SRC%\misc\kde4be1.component %_DEST%\xml%_EXT%\kde4be1.component -..\%__SRC%\misc\kdebe1.component %_DEST%\xml%_EXT%\kdebe1.component -..\inc\kde_headers.h %_DEST%\inc%_EXT%\shell\kde_headers.h -..\%__SRC%\misc\localebe1.component %_DEST%\xml%_EXT%\localebe1.component -..\%__SRC%\misc\macbe1.component %_DEST%\xml%_EXT%\macbe1.component -..\%__SRC%\misc\smplmail.component %_DEST%\xml%_EXT%\smplmail.component -..\%__SRC%\misc\syssh.component %_DEST%\xml%_EXT%\syssh.component -..\%__SRC%\misc\wininetbe1.component %_DEST%\xml%_EXT%\wininetbe1.component +..\%__SRC%\misc\desktopbe1.component %_DEST%\xml\desktopbe1.component +..\%__SRC%\misc\gconfbe1.component %_DEST%\xml\gconfbe1.component +..\%__SRC%\misc\kde4be1.component %_DEST%\xml\kde4be1.component +..\%__SRC%\misc\kdebe1.component %_DEST%\xml\kdebe1.component +..\inc\kde_headers.h %_DEST%\inc\shell\kde_headers.h +..\%__SRC%\misc\localebe1.component %_DEST%\xml\localebe1.component +..\%__SRC%\misc\macbe1.component %_DEST%\xml\macbe1.component +..\%__SRC%\misc\smplmail.component %_DEST%\xml\smplmail.component +..\%__SRC%\misc\syssh.component %_DEST%\xml\syssh.component +..\%__SRC%\misc\wininetbe1.component %_DEST%\xml\wininetbe1.component diff --git a/shell/qa/i_xml_parser_event_handler.hxx b/shell/qa/i_xml_parser_event_handler.hxx index 1758e2075b55..5ff98ff75972 100644 --- a/shell/qa/i_xml_parser_event_handler.hxx +++ b/shell/qa/i_xml_parser_event_handler.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -42,7 +43,6 @@ typedef std::map<string_t, string_t> xml_tag_attribute_container_t; -//######################################### class i_xml_parser_event_handler { public: @@ -75,3 +75,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/qa/makefile.mk b/shell/qa/makefile.mk index 290798bab18e..1420d3881d09 100755 --- a/shell/qa/makefile.mk +++ b/shell/qa/makefile.mk @@ -42,7 +42,7 @@ CFLAGSCXX += $(CPPUNIT_CFLAGS) SHL1OBJS=$(SLO)$/recent_docs.obj $(SLO)$/xml_parser.obj SHL1TARGET=recent_docs -SHL1STDLIBS=$(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) +SHL1STDLIBS=$(SALLIB) $(CPPUNITLIB) .IF "$(GUI)" == "UNX" ..$/unxsols4.pro$/slb$/libsysshell.a \ diff --git a/shell/qa/recent_docs.cxx b/shell/qa/recent_docs.cxx index b4408e2f7737..e0907dbff486 100755..100644 --- a/shell/qa/recent_docs.cxx +++ b/shell/qa/recent_docs.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,18 +39,17 @@ #include <stdlib.h> #include <iostream> -//######################################## using namespace osl; -using namespace rtl; + +using ::rtl::OUString; 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"); +const OUString SXW_MIME_TYPE(RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.xml.writer")); +const OUString SXC_MIME_TYPE(RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.xml.calc")); +const OUString SXI_MIME_TYPE(RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.xml.impress")); +const OUString SXD_MIME_TYPE(RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.xml.draw")); +const OUString SXM_MIME_TYPE(RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.xml.math")); class Test_AddToRecentDocs : public CppUnit::TestFixture { @@ -65,19 +65,19 @@ public: 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"); - rtl::OUString url = rtl::OUString::createFromAscii("file:///home_athene/test.sxw"); + rtl::OUString url(RTL_CONSTASCII_USTRINGPARAM("file:///home_athene/test.sxw")); syssh::AddToRecentDocumentList(url, SXW_MIME_TYPE); - url = rtl::OUString::createFromAscii("file:///home_athene/test.sxc"); + url = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///home_athene/test.sxc")); syssh::AddToRecentDocumentList(url, SXC_MIME_TYPE); - url = rtl::OUString::createFromAscii("file:///home_athene/test.sxi"); + url = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///home_athene/test.sxi")); syssh::AddToRecentDocumentList(url, SXI_MIME_TYPE); - url = rtl::OUString::createFromAscii("file:///home_athene/test.sxd"); + url = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///home_athene/test.sxd")); syssh::AddToRecentDocumentList(url, SXD_MIME_TYPE); - url = rtl::OUString::createFromAscii("file:///home_athene/test.sxm"); + url = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///home_athene/test.sxm")); syssh::AddToRecentDocumentList(url, SXM_MIME_TYPE); } @@ -87,7 +87,7 @@ public: 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"); + rtl::OUString url(RTL_CONSTASCII_USTRINGPARAM("file:///home_athene/test.sxw")); syssh::AddToRecentDocumentList(url, SXW_MIME_TYPE); } @@ -96,19 +96,19 @@ public: { int ret = system("rm $HOME/.recently-used"); - rtl::OUString url = rtl::OUString::createFromAscii("file:///home_athene/test.sxw"); + rtl::OUString url(RTL_CONSTASCII_USTRINGPARAM("file:///home_athene/test.sxw")); syssh::AddToRecentDocumentList(url, SXW_MIME_TYPE); - url = rtl::OUString::createFromAscii("file:///home_athene/test.sxc"); + url = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///home_athene/test.sxc")); syssh::AddToRecentDocumentList(url, SXC_MIME_TYPE); - url = rtl::OUString::createFromAscii("file:///home_athene/test.sxi"); + url = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///home_athene/test.sxi")); syssh::AddToRecentDocumentList(url, SXI_MIME_TYPE); - url = rtl::OUString::createFromAscii("file:///home_athene/test.sxd"); + url = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///home_athene/test.sxd")); syssh::AddToRecentDocumentList(url, SXD_MIME_TYPE); - url = rtl::OUString::createFromAscii("file:///home_athene/test.sxm"); + url = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///home_athene/test.sxm")); syssh::AddToRecentDocumentList(url, SXM_MIME_TYPE); ret = system("ls $HOME/.recently-used"); @@ -126,9 +126,9 @@ public: 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(RTL_CONSTASCII_USTRINGPARAM("/")); - recently_used_url += rtl::OUString::createFromAscii(".recently-used"); + recently_used_url += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".recently-used")); return recently_used_url; } @@ -136,7 +136,7 @@ public: void read_recently_used(void* buffer, size_t size) { File ruf(get_recently_used_url()); - FileBase::RC rc = ruf.open(OpenFlag_Read); + FileBase::RC rc = ruf.open(osl_File_OpenFlag_Read); CPPUNIT_ASSERT_MESSAGE("Cannot open ~/.recently-used", FileBase::E_None == rc); @@ -158,7 +158,7 @@ public: memset(cnt_before, 0, sizeof(cnt_before)); read_recently_used(cnt_before, sizeof(cnt_before)); - OUString url = OUString::createFromAscii("file:///home_athene/test.sxw"); + OUString url(RTL_CONSTASCII_USTRINGPARAM("file:///home_athene/test.sxw")); syssh::AddToRecentDocumentList(url, SXW_MIME_TYPE); char cnt_after[128]; @@ -177,7 +177,7 @@ public: sprintf(cmd, "echo '%s' > $HOME/.recently-used", xml_unknown); system(cmd); - OUString url = OUString::createFromAscii("file:///home_athene/test.sxw"); + OUString url(RTL_CONSTASCII_USTRINGPARAM("file:///home_athene/test.sxw")); syssh::AddToRecentDocumentList(url, SXW_MIME_TYPE); char buffer[256]; @@ -193,7 +193,7 @@ public: system("rm $HOME/.recently-used"); system("touch $HOME/.recently-used"); - OUString url = OUString::createFromAscii("file:///home_athene/test.sxw"); + OUString url(RTL_CONSTASCII_USTRINGPARAM("file:///home_athene/test.sxw")); syssh::AddToRecentDocumentList(url, SXW_MIME_TYPE); char buffer[256]; @@ -216,9 +216,9 @@ public: }; -//##################################### // register test suites CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test_AddToRecentDocs, "Test_AddToRecentDocs"); NOADDITIONAL; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/all/makefile.mk b/shell/source/all/makefile.mk index 66b185132fa6..b4cc34a42601 100755 --- a/shell/source/all/makefile.mk +++ b/shell/source/all/makefile.mk @@ -47,9 +47,6 @@ CFLAGS_X64+=-wd4710 -wd4711 -wd4514 -wd4619 -wd4217 -wd4820 CDEFS_X64+=-D_WIN32_IE=0x501 .ENDIF # "$(BUILD_X64)"!="" .ENDIF -.IF "$(GUI)" == "OS2" -CFLAGS+=-DISOLATION_AWARE_ENABLED -DXML_UNICODE -DXML_UNICODE_WCHAR_T -DUNICODE -D_UNICODE -.ENDIF # --- Files -------------------------------------------------------- @@ -58,7 +55,7 @@ CFLAGS+=-DSYSTEM_EXPAT .ENDIF SLOFILES=$(SLO)$/xml_parser.obj - + .IF "$(BUILD_X64)"!="" SLOFILES_X64=$(SLO_X64)$/xml_parser.obj .ENDIF # "$(BUILD_X64)"!="" diff --git a/shell/source/all/ooofilereader/autostyletag.cxx b/shell/source/all/ooofilereader/autostyletag.cxx index 6d51259345df..3cf81a7bd5f9 100644 --- a/shell/source/all/ooofilereader/autostyletag.cxx +++ b/shell/source/all/ooofilereader/autostyletag.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -98,3 +99,4 @@ void CAutoStyleTag::clearStyleLocalePair( ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/all/ooofilereader/autostyletag.hxx b/shell/source/all/ooofilereader/autostyletag.hxx index 3957dd1b09b8..c392b53bb0cb 100644 --- a/shell/source/all/ooofilereader/autostyletag.hxx +++ b/shell/source/all/ooofilereader/autostyletag.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,3 +71,5 @@ class CAutoStyleTag : public ITag }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/all/ooofilereader/basereader.cxx b/shell/source/all/ooofilereader/basereader.cxx index 2fc4a0c79297..1b8c1391f8cc 100644 --- a/shell/source/all/ooofilereader/basereader.cxx +++ b/shell/source/all/ooofilereader/basereader.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,11 +28,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_shell.hxx" + +#include <osl/diagnose.h> + #include "internal/basereader.hxx" -#ifndef XML_PARSER_HXX_INCLUDED #include "internal/xml_parser.hxx" -#endif #include "assert.h" #include <memory> @@ -44,8 +46,6 @@ m_ZipFile( DocumentName ) } //------------------------------ -// -//------------------------------ CBaseReader::CBaseReader(void * sw, zlib_filefunc_def* fa): m_ZipFile( sw , fa ) @@ -53,24 +53,18 @@ m_ZipFile( sw , fa ) } //------------------------------ -// -//------------------------------ CBaseReader::~CBaseReader() { } //------------------------------ -// -//------------------------------ void CBaseReader::start_document() { } //------------------------------ -// -//------------------------------ void CBaseReader::end_document() { @@ -97,10 +91,12 @@ void CBaseReader::Initialize( const std::string& ContentName) #endif ) { - ENSURE( false, ex.what() ); + OSL_ENSURE( false, ex.what() ); } catch(...) { - ENSURE(false, "Unknown error"); + OSL_ENSURE(false, "Unknown error"); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/all/ooofilereader/contentreader.cxx b/shell/source/all/ooofilereader/contentreader.cxx index 4afb278ff2c8..e0213839cc9d 100644 --- a/shell/source/all/ooofilereader/contentreader.cxx +++ b/shell/source/all/ooofilereader/contentreader.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,6 +28,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_shell.hxx" + +#include <osl/diagnose.h> + #include "internal/contentreader.hxx" #include "dummytag.hxx" #include "simpletag.hxx" @@ -50,11 +54,11 @@ CBaseReader( DocumentName ) #endif ) { - ENSURE(false, ex.what()); + OSL_ENSURE(false, ex.what()); } catch(...) { - ENSURE(false, "Unknown error"); + OSL_ENSURE(false, "Unknown error"); } } @@ -72,11 +76,11 @@ try #endif ) { - ENSURE(false, ex.what()); + OSL_ENSURE(false, ex.what()); } catch(...) { - ENSURE(false, "Unknown error"); + OSL_ENSURE(false, "Unknown error"); } } @@ -233,3 +237,4 @@ void CContentReader::characters( const std::wstring& character ) } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/all/ooofilereader/dummytag.hxx b/shell/source/all/ooofilereader/dummytag.hxx index cbd4382e84e3..b7007f5acf7c 100644 --- a/shell/source/all/ooofilereader/dummytag.hxx +++ b/shell/source/all/ooofilereader/dummytag.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -59,3 +60,5 @@ class CDummyTag : public ITag #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/all/ooofilereader/itag.hxx b/shell/source/all/ooofilereader/itag.hxx index 97c09ed35b32..c4a7eeacf8f5 100644 --- a/shell/source/all/ooofilereader/itag.hxx +++ b/shell/source/all/ooofilereader/itag.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -50,3 +51,5 @@ class ITag }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/all/ooofilereader/keywordstag.cxx b/shell/source/all/ooofilereader/keywordstag.cxx index 2ffccfddaff2..695bfe8b5a60 100644 --- a/shell/source/all/ooofilereader/keywordstag.cxx +++ b/shell/source/all/ooofilereader/keywordstag.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -62,3 +63,4 @@ std::wstring CKeywordsTag::getTagContent( ) return ret_KeyWord_String; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/all/ooofilereader/keywordstag.hxx b/shell/source/all/ooofilereader/keywordstag.hxx index 634810febd31..9a761acf8072 100644 --- a/shell/source/all/ooofilereader/keywordstag.hxx +++ b/shell/source/all/ooofilereader/keywordstag.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -52,3 +53,5 @@ class CKeywordsTag : public ITag }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/all/ooofilereader/makefile.mk b/shell/source/all/ooofilereader/makefile.mk index bf6365526eec..67d29acaaf85 100644..100755 --- a/shell/source/all/ooofilereader/makefile.mk +++ b/shell/source/all/ooofilereader/makefile.mk @@ -36,17 +36,12 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk -.IF "$(GUI)" != "OS2" CFLAGS+=-DISOLATION_AWARE_ENABLED -DWIN32_LEAN_AND_MEAN -DXML_UNICODE -D_NTSDK -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0501 CFLAGS+=-wd4710 -wd4711 -wd4514 -wd4619 -wd4217 -wd4820 CDEFS+=-D_WIN32_IE=0x501 CFLAGS_X64+=-DISOLATION_AWARE_ENABLED -DWIN32_LEAN_AND_MEAN -DXML_UNICODE -D_NTSDK -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0501 CFLAGS_X64+=-wd4710 -wd4711 -wd4514 -wd4619 -wd4217 -wd4820 CDEFS_X64+=-D_WIN32_IE=0x501 -.ENDIF -.IF "$(GUI)" == "OS2" -CFLAGS+=-DISOLATION_AWARE_ENABLED -DXML_UNICODE -DXML_UNICODE_WCHAR_T -DUNICODE -D_UNICODE -.ENDIF # --- Files -------------------------------------------------------- diff --git a/shell/source/all/ooofilereader/metainforeader.cxx b/shell/source/all/ooofilereader/metainforeader.cxx index 24e59f6845da..71be05505127 100644 --- a/shell/source/all/ooofilereader/metainforeader.cxx +++ b/shell/source/all/ooofilereader/metainforeader.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,6 +28,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_shell.hxx" + +#include <osl/diagnose.h> + #include "internal/metainforeader.hxx" #include "dummytag.hxx" #include "simpletag.hxx" @@ -69,11 +73,11 @@ CBaseReader( DocumentName ) #endif ) { - ENSURE(false, ex.what()); + OSL_ENSURE(false, ex.what()); } catch(...) { - ENSURE(false, "Unknown error"); + OSL_ENSURE(false, "Unknown error"); } } @@ -110,11 +114,11 @@ try #endif ) { - ENSURE(false, ex.what()); + OSL_ENSURE(false, ex.what()); } catch(...) { - ENSURE(false, "Unknown error"); + OSL_ENSURE(false, "Unknown error"); } } @@ -300,3 +304,4 @@ void CMetaInfoReader::characters( const std::wstring& character ) } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/all/ooofilereader/simpletag.cxx b/shell/source/all/ooofilereader/simpletag.cxx index 8fad2dc618ed..fa9f28796869 100644 --- a/shell/source/all/ooofilereader/simpletag.cxx +++ b/shell/source/all/ooofilereader/simpletag.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -63,3 +64,5 @@ std::wstring CSimpleTag::getTagContent( ) else return ( ::std::wstring( EMPTY_STRING ) ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/all/ooofilereader/simpletag.hxx b/shell/source/all/ooofilereader/simpletag.hxx index 8e251c4329ab..fb4b5d8399ce 100644 --- a/shell/source/all/ooofilereader/simpletag.hxx +++ b/shell/source/all/ooofilereader/simpletag.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -56,3 +57,5 @@ class CSimpleTag : public ITag }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/all/xml_parser.cxx b/shell/source/all/xml_parser.cxx index b7f73d2404a8..10d7f88a8580 100644 --- a/shell/source/all/xml_parser.cxx +++ b/shell/source/all/xml_parser.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_shell.hxx" -#ifndef XML_PARSER_HXX_INCLUDED #include "internal/xml_parser.hxx" -#endif #include "internal/i_xml_parser_event_handler.hxx" #include <assert.h> @@ -38,7 +37,6 @@ namespace /* private */ { - //###################################################### /* Extracts the local part of tag without namespace decoration e.g. meta:creator -> creator */ const XML_Char COLON = (XML_Char)':'; @@ -61,14 +59,12 @@ namespace /* private */ return p; } - //################################################ inline xml_parser* get_parser_instance(void* data) { return reinterpret_cast<xml_parser*>(XML_GetUserData( reinterpret_cast<XML_Parser>(data))); } - //################################################ bool has_only_whitespaces(const XML_Char* s, int len) { const XML_Char* p = s; @@ -78,7 +74,6 @@ namespace /* private */ } } -//################################################### xml_parser::xml_parser(const XML_Char* EncodingName) : document_handler_(0), xml_parser_(XML_ParserCreate(EncodingName)) @@ -86,17 +81,14 @@ xml_parser::xml_parser(const XML_Char* EncodingName) : init(); } -//################################################### xml_parser::~xml_parser() { XML_ParserFree(xml_parser_); } -//################################################### /* Callback functions will be called by the parser on different events */ -//################################################### extern "C" { @@ -124,7 +116,6 @@ static void xml_start_element_handler(void* UserData, const XML_Char* name, cons } } -//################################################### static void xml_end_element_handler(void* UserData, const XML_Char* name) { assert(UserData); @@ -135,7 +126,6 @@ static void xml_end_element_handler(void* UserData, const XML_Char* name) pDocHdl->end_element(reinterpret_cast<const char_t*>(name), reinterpret_cast<const char_t*>(get_local_name(name))); } -//################################################### static void xml_character_data_handler(void* UserData, const XML_Char* s, int len) { assert(UserData); @@ -151,7 +141,6 @@ static void xml_character_data_handler(void* UserData, const XML_Char* s, int le } } -//################################################### static void xml_comment_handler(void* UserData, const XML_Char* Data) { assert(UserData); @@ -164,7 +153,6 @@ static void xml_comment_handler(void* UserData, const XML_Char* Data) } // extern "C" -//################################################### void xml_parser::init() { XML_SetUserData(xml_parser_, this); @@ -189,7 +177,6 @@ void xml_parser::init() xml_comment_handler); } -//################################################### void xml_parser::parse(const char* XmlData, size_t Length, bool IsFinal) { if (0 == XML_Parse(xml_parser_, XmlData, Length, IsFinal)) @@ -201,15 +188,15 @@ void xml_parser::parse(const char* XmlData, size_t Length, bool IsFinal) XML_GetCurrentByteIndex(xml_parser_)); } -//################################################### void xml_parser::set_document_handler( i_xml_parser_event_handler* event_handler) { document_handler_ = event_handler; } -//################################################### i_xml_parser_event_handler* xml_parser::get_document_handler() const { return document_handler_; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/all/zipfile/makefile.mk b/shell/source/all/zipfile/makefile.mk index 4e0af2891027..4e0af2891027 100644..100755 --- a/shell/source/all/zipfile/makefile.mk +++ b/shell/source/all/zipfile/makefile.mk diff --git a/shell/source/all/zipfile/zipexcptn.cxx b/shell/source/all/zipfile/zipexcptn.cxx index fcbbf54382bf..5a5dcefc16ea 100644 --- a/shell/source/all/zipfile/zipexcptn.cxx +++ b/shell/source/all/zipfile/zipexcptn.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -83,10 +84,8 @@ Win32Exception::Win32Exception(int Error) : */ Win32Exception::~Win32Exception() throw() { -#ifndef OS2 if (m_MsgBuff) LocalFree(m_MsgBuff); -#endif } //------------------------------------------ @@ -94,9 +93,6 @@ Win32Exception::~Win32Exception() throw() */ const char* Win32Exception::what() const throw() { -#ifdef OS2 - return "Win32Exception!"; -#else FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | @@ -109,7 +105,6 @@ const char* Win32Exception::what() const throw() NULL); return reinterpret_cast<char*>(m_MsgBuff); -#endif } //------------------------------------------ @@ -135,3 +130,5 @@ IOException::IOException(int Error) : Win32Exception(Error) { } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/all/zipfile/zipexcptn.hxx b/shell/source/all/zipfile/zipexcptn.hxx index b98dc6df594f..0b635448f482 100644 --- a/shell/source/all/zipfile/zipexcptn.hxx +++ b/shell/source/all/zipfile/zipexcptn.hxx @@ -1,6 +1,5 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ // ZipException.h: interface for the ZipException class. -// -////////////////////////////////////////////////////////////////////// #ifndef ZIPEXCPTN_HXX_INCLUDED #define ZIPEXCPTN_HXX_INCLUDED @@ -76,3 +75,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/all/zipfile/zipfile.cxx b/shell/source/all/zipfile/zipfile.cxx index 96dd7922ec08..c7ed65e5d177 100644 --- a/shell/source/all/zipfile/zipfile.cxx +++ b/shell/source/all/zipfile/zipfile.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,12 +38,6 @@ #include <string.h> -#ifdef OS2 -#include <alloca.h> -#define _alloca alloca -#define ERROR_NOT_ENOUGH_MEMORY 8 -#endif - namespace internal { /* for case in-sensitive string comparison */ @@ -249,3 +244,4 @@ long ZipFile::GetFileLongestFileNameLength() const return lmax; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/backends/desktopbe/desktopbackend.cxx b/shell/source/backends/desktopbe/desktopbackend.cxx index e628e8e1b830..6fd80da7425f 100644 --- a/shell/source/backends/desktopbe/desktopbackend.cxx +++ b/shell/source/backends/desktopbe/desktopbackend.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -276,9 +277,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( pImplName, pServiceManager, pRegistryKey, services); } -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL -component_getImplementationEnvironment( +extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( char const ** ppEnvTypeName, uno_Environment **) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/backends/desktopbe/desktopbe1.component b/shell/source/backends/desktopbe/desktopbe1.component index 9ef142107698..9ef142107698 100644..100755 --- a/shell/source/backends/desktopbe/desktopbe1.component +++ b/shell/source/backends/desktopbe/desktopbe1.component diff --git a/shell/source/backends/desktopbe/makefile.mk b/shell/source/backends/desktopbe/makefile.mk index 66ad8cf99e1e..66ad8cf99e1e 100644..100755 --- a/shell/source/backends/desktopbe/makefile.mk +++ b/shell/source/backends/desktopbe/makefile.mk diff --git a/shell/source/backends/gconfbe/gconfaccess.cxx b/shell/source/backends/gconfbe/gconfaccess.cxx index 64d0e2e94eae..9b93c737cd2e 100644 --- a/shell/source/backends/gconfbe/gconfaccess.cxx +++ b/shell/source/backends/gconfbe/gconfaccess.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -26,7 +27,8 @@ ************************************************************************/ #include "precompiled_shell.hxx" -#include "sal/config.h" +#include <sal/macros.h> +#include <sal/config.h> #include <string.h> @@ -36,6 +38,7 @@ #include "osl/thread.h" #include "rtl/strbuf.hxx" #include "rtl/ustrbuf.hxx" +#include "sal/macros.h" #include "gconfaccess.hxx" @@ -48,7 +51,11 @@ namespace { namespace css = com::sun::star ; namespace uno = css::uno ; -using namespace rtl; + +using ::rtl::OUString; +using ::rtl::OString; +using ::rtl::OStringToOUString; +using ::rtl::OUStringBuffer; GConfClient* getGconfClient() { @@ -73,8 +80,8 @@ GConfClient* getGconfClient() mClient = gconf_client_get_default(); if (!mClient) { - throw uno::RuntimeException(rtl::OUString::createFromAscii - ("GconfBackend:GconfLayer: Cannot Initialize Gconf connection"),NULL); + throw uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM + ("GconfBackend:GconfLayer: Cannot Initialize Gconf connection")),NULL); } static const char * const PreloadValuesList[] = @@ -114,7 +121,7 @@ static OUString xdg_user_dir_lookup (const char *type) if (!aSecurity.getHomeDir( aHomeDirURL ) ) { - osl::FileBase::getFileURLFromSystemPath(rtl::OUString::createFromAscii("/tmp"), aDocumentsDirURL); + osl::FileBase::getFileURLFromSystemPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/tmp")), aDocumentsDirURL); return aDocumentsDirURL; } @@ -122,12 +129,12 @@ static OUString xdg_user_dir_lookup (const char *type) if (config_home == NULL || config_home[0] == 0) { aConfigFileURL = OUString(aHomeDirURL); - aConfigFileURL += OUString::createFromAscii( "/.config/user-dirs.dirs" ); + aConfigFileURL += OUString(RTL_CONSTASCII_USTRINGPARAM("/.config/user-dirs.dirs")); } else { aConfigFileURL = OUString::createFromAscii(config_home); - aConfigFileURL += OUString::createFromAscii( "/user-dirs.dirs" ); + aConfigFileURL += OUString(RTL_CONSTASCII_USTRINGPARAM("/user-dirs.dirs")); } if(osl_File_E_None == osl_openFile(aConfigFileURL.pData, &handle, osl_File_OpenFlag_Read)) @@ -225,19 +232,19 @@ static OUString xdg_user_dir_lookup (const char *type) //------------------------------------------------------------------------------ -uno::Any makeAnyOfGconfValue( GConfValue *aGconfValue ) +uno::Any makeAnyOfGconfValue( GConfValue *pGconfValue ) { - switch( aGconfValue->type ) + switch( pGconfValue->type ) { case GCONF_VALUE_BOOL: - return uno::makeAny( (sal_Bool) gconf_value_get_bool( aGconfValue ) ); + return uno::makeAny( (sal_Bool) gconf_value_get_bool( pGconfValue ) ); case GCONF_VALUE_INT: - return uno::makeAny( (sal_Int32) gconf_value_get_int( aGconfValue ) ); + return uno::makeAny( (sal_Int32) gconf_value_get_int( pGconfValue ) ); case GCONF_VALUE_STRING: return uno::makeAny( OStringToOUString( rtl::OString( - gconf_value_get_string(aGconfValue) ), RTL_TEXTENCODING_UTF8 ) ); + gconf_value_get_string(pGconfValue) ), RTL_TEXTENCODING_UTF8 ) ); default: fprintf( stderr, "makeAnyOfGconfValue: Type not handled.\n" ); @@ -249,9 +256,9 @@ uno::Any makeAnyOfGconfValue( GConfValue *aGconfValue ) //------------------------------------------------------------------------------ -static void splitFontName( GConfValue *aGconfValue, rtl::OUString &rName, sal_Int16 &rHeight) +static void splitFontName( GConfValue *pGconfValue, rtl::OUString &rName, sal_Int16 &rHeight) { - rtl::OString aFont( gconf_value_get_string( aGconfValue ) ); + rtl::OString aFont( gconf_value_get_string( pGconfValue ) ); aFont.trim(); sal_Int32 nIdx = aFont.lastIndexOf( ' ' ); if (nIdx < 1) { // urk @@ -267,20 +274,20 @@ static void splitFontName( GConfValue *aGconfValue, rtl::OUString &rName, sal_In //------------------------------------------------------------------------------ -uno::Any translateToOOo( const ConfigurationValue aValue, GConfValue *aGconfValue ) +uno::Any translateToOOo( const ConfigurationValue &rValue, GConfValue *pGconfValue ) { - switch( aValue.nSettingId ) + switch( rValue.nSettingId ) { case SETTING_PROXY_MODE: { rtl::OUString aProxyMode; - uno::Any aOriginalValue = makeAnyOfGconfValue( aGconfValue ); + uno::Any aOriginalValue = makeAnyOfGconfValue( pGconfValue ); aOriginalValue >>= aProxyMode; - if( aProxyMode.equals( rtl::OUString::createFromAscii( "manual" ) ) ) + if( aProxyMode.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("manual")) ) ) return uno::makeAny( (sal_Int32) 1 ); - else if( aProxyMode.equals( rtl::OUString::createFromAscii( "none" ) ) ) + else if( aProxyMode.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("none")) ) ) return uno::makeAny( (sal_Int32) 0 ); } break; @@ -288,9 +295,9 @@ uno::Any translateToOOo( const ConfigurationValue aValue, GConfValue *aGconfValu case SETTING_NO_PROXY_FOR: { rtl::OStringBuffer aBuffer; - if( (GCONF_VALUE_LIST == aGconfValue->type) && (GCONF_VALUE_STRING == gconf_value_get_list_type(aGconfValue)) ) + if( (GCONF_VALUE_LIST == pGconfValue->type) && (GCONF_VALUE_STRING == gconf_value_get_list_type(pGconfValue)) ) { - GSList * list = gconf_value_get_list(aGconfValue); + GSList * list = gconf_value_get_list(pGconfValue); for(; list; list = g_slist_next(list)) { aBuffer.append(gconf_value_get_string((GConfValue *) list->data)); @@ -308,7 +315,7 @@ uno::Any translateToOOo( const ConfigurationValue aValue, GConfValue *aGconfValu case SETTING_MAILER_PROGRAM: { rtl::OUString aMailer; - uno::Any aOriginalValue = makeAnyOfGconfValue( aGconfValue ); + uno::Any aOriginalValue = makeAnyOfGconfValue( pGconfValue ); aOriginalValue >>= aMailer; sal_Int32 nIndex = 0; return uno::makeAny( aMailer.getToken( 0, ' ', nIndex ) ); @@ -319,8 +326,8 @@ uno::Any translateToOOo( const ConfigurationValue aValue, GConfValue *aGconfValu case SETTING_FONT_ANTI_ALIASING_MIN_PIXEL: case SETTING_SYMBOL_SET: { - sal_Int32 nShortValue; - uno::Any aOriginalValue = makeAnyOfGconfValue( aGconfValue ); + sal_Int32 nShortValue(0); + uno::Any aOriginalValue = makeAnyOfGconfValue( pGconfValue ); aOriginalValue >>= nShortValue; return uno::makeAny( (sal_Int16) nShortValue ); } @@ -334,7 +341,7 @@ uno::Any translateToOOo( const ConfigurationValue aValue, GConfValue *aGconfValu #endif // ENABLE_LOCKDOWN { sal_Bool bBooleanValue = false; - uno::Any aOriginalValue = makeAnyOfGconfValue( aGconfValue ); + uno::Any aOriginalValue = makeAnyOfGconfValue( pGconfValue ); aOriginalValue >>= bBooleanValue; return uno::makeAny( rtl::OUString::valueOf( (sal_Bool) bBooleanValue ) ); } @@ -379,8 +386,8 @@ uno::Any translateToOOo( const ConfigurationValue aValue, GConfValue *aGconfValu rtl::OUString aName; sal_Int16 nHeight; - splitFontName (aGconfValue, aName, nHeight); - if (aValue.nSettingId == SETTING_SOURCEVIEWFONT_NAME) + splitFontName (pGconfValue, aName, nHeight); + if (rValue.nSettingId == SETTING_SOURCEVIEWFONT_NAME) return uno::makeAny( aName ); else return uno::makeAny( nHeight ); @@ -397,18 +404,18 @@ uno::Any translateToOOo( const ConfigurationValue aValue, GConfValue *aGconfValu //------------------------------------------------------------------------------ -sal_Bool SAL_CALL isDependencySatisfied( GConfClient* aClient, const ConfigurationValue aValue ) +sal_Bool SAL_CALL isDependencySatisfied( GConfClient* pClient, const ConfigurationValue &rValue ) { - switch( aValue.nDependsOn ) + switch( rValue.nDependsOn ) { case SETTING_PROXY_MODE: { - GConfValue* aGconfValue = gconf_client_get( aClient, GCONF_PROXY_MODE_KEY, NULL ); + GConfValue* pGconfValue = gconf_client_get( pClient, GCONF_PROXY_MODE_KEY, NULL ); - if ( aGconfValue != NULL ) + if ( pGconfValue != NULL ) { - bool bOk = g_strcasecmp( "manual", gconf_value_get_string( aGconfValue ) ) == 0; - gconf_value_free( aGconfValue ); + bool bOk = g_strcasecmp( "manual", gconf_value_get_string( pGconfValue ) ) == 0; + gconf_value_free( pGconfValue ); if (bOk) return sal_True; } } @@ -428,7 +435,7 @@ sal_Bool SAL_CALL isDependencySatisfied( GConfClient* aClient, const Configurati { rtl::OUString aCompleteName( rtl::OStringToOUString( g_get_real_name(), osl_getThreadTextEncoding() ) ); - if( !aCompleteName.equalsAscii( "Unknown" ) ) + if( !aCompleteName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Unknown")) ) return sal_True; } break; @@ -437,9 +444,9 @@ sal_Bool SAL_CALL isDependencySatisfied( GConfClient* aClient, const Configurati { rtl::OUString aCompleteName( rtl::OStringToOUString( g_get_real_name(), osl_getThreadTextEncoding() ) ); - if( !aCompleteName.equalsAscii( "Unknown" ) ) + if( !aCompleteName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Unknown")) ) { - if( aCompleteName.trim().indexOf(rtl::OUString::createFromAscii(" "), 0) != -1 ) + if( aCompleteName.trim().indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")), 0) != -1 ) return sal_True; } } @@ -448,12 +455,12 @@ sal_Bool SAL_CALL isDependencySatisfied( GConfClient* aClient, const Configurati #ifdef ENABLE_LOCKDOWN case SETTING_AUTO_SAVE: { - GConfValue* aGconfValue = gconf_client_get( aClient, GCONF_AUTO_SAVE_KEY, NULL ); + GConfValue* pGconfValue = gconf_client_get( pClient, GCONF_AUTO_SAVE_KEY, NULL ); - if( ( aGconfValue != NULL ) ) + if( ( pGconfValue != NULL ) ) { - bool bOk = gconf_value_get_bool( aGconfValue ); - gconf_value_free( aGconfValue ); + bool bOk = gconf_value_get_bool( pGconfValue ); + gconf_value_free( pGconfValue ); if (bOk) return sal_True; } } @@ -475,7 +482,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_ENABLE_ACCESSIBILITY, "/desktop/gnome/interface/accessibility", - "EnableATToolSupport", + RTL_CONSTASCII_STRINGPARAM("EnableATToolSupport"), sal_True, SETTINGS_LAST }, @@ -483,7 +490,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_PROXY_MODE, GCONF_PROXY_MODE_KEY, - "ooInetProxyType", + RTL_CONSTASCII_STRINGPARAM("ooInetProxyType"), sal_True, SETTINGS_LAST }, @@ -491,7 +498,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_PROXY_HTTP_HOST, "/system/http_proxy/host", - "ooInetHTTPProxyName", + RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyName"), sal_False, SETTING_PROXY_MODE }, @@ -499,7 +506,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_PROXY_HTTP_PORT, "/system/http_proxy/port", - "ooInetHTTPProxyPort", + RTL_CONSTASCII_STRINGPARAM("ooInetHTTPProxyPort"), sal_False, SETTING_PROXY_MODE }, @@ -507,7 +514,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_PROXY_HTTPS_HOST, "/system/proxy/secure_host", - "ooInetHTTPSProxyName", + RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyName"), sal_False, SETTING_PROXY_MODE }, @@ -515,7 +522,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_PROXY_HTTPS_PORT, "/system/proxy/secure_port", - "ooInetHTTPSProxyPort", + RTL_CONSTASCII_STRINGPARAM("ooInetHTTPSProxyPort"), sal_False, SETTING_PROXY_MODE }, @@ -523,7 +530,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_PROXY_FTP_HOST, "/system/proxy/ftp_host", - "ooInetFTPProxyName", + RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyName"), sal_False, SETTING_PROXY_MODE }, @@ -531,7 +538,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_PROXY_FTP_PORT, "/system/proxy/ftp_port", - "ooInetFTPProxyPort", + RTL_CONSTASCII_STRINGPARAM("ooInetFTPProxyPort"), sal_False, SETTING_PROXY_MODE }, @@ -539,7 +546,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_NO_PROXY_FOR, "/system/http_proxy/ignore_hosts", - "ooInetNoProxy", + RTL_CONSTASCII_STRINGPARAM("ooInetNoProxy"), sal_True, SETTING_PROXY_MODE }, @@ -547,21 +554,21 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_MAILER_PROGRAM, "/desktop/gnome/url-handlers/mailto/command", - "ExternalMailer", + RTL_CONSTASCII_STRINGPARAM("ExternalMailer"), sal_True, SETTINGS_LAST }, { SETTING_SOURCEVIEWFONT_NAME, "/desktop/gnome/interface/monospace_font_name", - "SourceViewFontName", + RTL_CONSTASCII_STRINGPARAM("SourceViewFontName"), sal_True, SETTINGS_LAST }, { SETTING_SOURCEVIEWFONT_HEIGHT, "/desktop/gnome/interface/monospace_font_name", - "SourceViewFontHeight", + RTL_CONSTASCII_STRINGPARAM("SourceViewFontHeight"), sal_True, SETTINGS_LAST }, @@ -569,7 +576,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_WORK_DIRECTORY, "/desktop/gnome/url-handlers/mailto/command", // dummy - "WorkPathVariable", + RTL_CONSTASCII_STRINGPARAM("WorkPathVariable"), sal_True, SETTING_WORK_DIRECTORY, // so that the existence of the dir can be checked }, @@ -578,7 +585,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_WRITER_DEFAULT_DOC_FORMAT, "/apps/openoffice/writer_default_document_format", - "TextDocumentSetupFactoryDefaultFilter", + RTL_CONSTASCII_STRINGPARAM("TextDocumentSetupFactoryDefaultFilter"), sal_False, SETTINGS_LAST }, @@ -586,7 +593,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_IMPRESS_DEFAULT_DOC_FORMAT, "/apps/openoffice/impress_default_document_format", - "PresentationDocumentSetupFactoryDefaultFilter", + RTL_CONSTASCII_STRINGPARAM("PresentationDocumentSetupFactoryDefaultFilter"), sal_False, SETTINGS_LAST }, @@ -594,7 +601,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_CALC_DEFAULT_DOC_FORMAT, "/apps/openoffice/calc_default_document_format", - "SpreadsheetDocumentSetupFactoryDefaultFilter", + RTL_CONSTASCII_STRINGPARAM("SpreadsheetDocumentSetupFactoryDefaultFilter"), sal_False, SETTINGS_LAST }, @@ -602,7 +609,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_AUTO_SAVE, GCONF_AUTO_SAVE_KEY, - "AutoSaveEnabled", + RTL_CONSTASCII_STRINGPARAM("AutoSaveEnabled"), sal_False, SETTINGS_LAST }, @@ -610,7 +617,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_AUTO_SAVE_INTERVAL, "/apps/openoffice/auto_save_interval", - "AutoSaveTimeIntervall", + RTL_CONSTASCII_STRINGPARAM("AutoSaveTimeIntervall"), sal_False, SETTING_AUTO_SAVE }, @@ -618,7 +625,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_USER_GIVENNAME, "/desktop/gnome/url-handlers/mailto/command", // dummy - "givenname", + RTL_CONSTASCII_STRINGPARAM("givenname"), sal_True, SETTING_USER_GIVENNAME }, @@ -626,7 +633,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_USER_SURNAME, "/desktop/gnome/url-handlers/mailto/command", // dummy - "sn", + RTL_CONSTASCII_STRINGPARAM("sn"), sal_True, SETTING_USER_SURNAME }, @@ -634,7 +641,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_DISABLE_PRINTING, "/desktop/gnome/lockdown/disable_printing", - "DisablePrinting", + RTL_CONSTASCII_STRINGPARAM("DisablePrinting"), sal_True, SETTINGS_LAST }, @@ -642,7 +649,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_USE_SYSTEM_FILE_DIALOG, "/apps/openoffice/use_system_file_dialog", - "UseSystemFileDialog", + RTL_CONSTASCII_STRINGPARAM("UseSystemFileDialog"), sal_False, SETTINGS_LAST }, @@ -650,7 +657,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_PRINTING_MODIFIES_DOCUMENT, "/apps/openoffice/printing_modifies_doc", - "PrintingModifiesDocument", + RTL_CONSTASCII_STRINGPARAM("PrintingModifiesDocument"), sal_False, SETTINGS_LAST }, @@ -658,7 +665,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_SHOW_ICONS_IN_MENUS, "/apps/openoffice/show_menu_icons", - "ShowIconsInMenues", + RTL_CONSTASCII_STRINGPARAM("ShowIconsInMenues"), sal_False, SETTINGS_LAST }, @@ -666,7 +673,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_SHOW_INACTIVE_MENUITEMS, "/apps/openoffice/show_menu_inactive_items", - "DontHideDisabledEntry", + RTL_CONSTASCII_STRINGPARAM("DontHideDisabledEntry"), sal_False, SETTINGS_LAST }, @@ -674,7 +681,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_SHOW_FONT_PREVIEW, "/apps/openoffice/show_font_preview", - "ShowFontBoxWYSIWYG", + RTL_CONSTASCII_STRINGPARAM("ShowFontBoxWYSIWYG"), sal_False, SETTINGS_LAST }, @@ -682,7 +689,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_SHOW_FONT_HISTORY, "/apps/openoffice/show_font_history", - "FontViewHistory", + RTL_CONSTASCII_STRINGPARAM("FontViewHistory"), sal_False, SETTINGS_LAST }, @@ -690,7 +697,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_ENABLE_OPENGL, "/apps/openoffice/use_opengl", - "OpenGL", + RTL_CONSTASCII_STRINGPARAM("OpenGL"), sal_False, SETTINGS_LAST }, @@ -698,7 +705,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_OPTIMIZE_OPENGL, "/apps/openoffice/optimize_opengl", - "OpenGL_Faster", + RTL_CONSTASCII_STRINGPARAM("OpenGL_Faster"), sal_False, SETTINGS_LAST }, @@ -706,7 +713,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_USE_SYSTEM_FONT, "/apps/openoffice/use_system_font", - "AccessibilityIsSystemFont", + RTL_CONSTASCII_STRINGPARAM("AccessibilityIsSystemFont"), sal_False, SETTINGS_LAST }, @@ -714,7 +721,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_USE_FONT_ANTI_ALIASING, "/apps/openoffice/use_font_anti_aliasing", - "FontAntiAliasingEnabled", + RTL_CONSTASCII_STRINGPARAM("FontAntiAliasingEnabled"), sal_False, SETTINGS_LAST }, @@ -722,7 +729,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_FONT_ANTI_ALIASING_MIN_PIXEL, "/apps/openoffice/font_anti_aliasing_min_pixel", - "FontAntiAliasingMinPixelHeight", + RTL_CONSTASCII_STRINGPARAM("FontAntiAliasingMinPixelHeight"), sal_True, SETTINGS_LAST }, @@ -730,7 +737,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_WARN_CREATE_PDF, "/apps/openoffice/lockdown/warn_info_create_pdf", - "WarnCreatePDF", + RTL_CONSTASCII_STRINGPARAM("WarnCreatePDF"), sal_False, SETTINGS_LAST }, @@ -738,7 +745,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_WARN_PRINT_DOC, "/apps/openoffice/lockdown/warn_info_printing", - "WarnPrintDoc", + RTL_CONSTASCII_STRINGPARAM("WarnPrintDoc"), sal_False, SETTINGS_LAST }, @@ -746,7 +753,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_WARN_SAVEORSEND_DOC, "/apps/openoffice/lockdown/warn_info_saving", - "WarnSaveOrSendDoc", + RTL_CONSTASCII_STRINGPARAM("WarnSaveOrSendDoc"), sal_False, SETTINGS_LAST }, @@ -754,7 +761,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_WARN_SIGN_DOC, "/apps/openoffice/lockdown/warn_info_signing", - "WarnSignDoc", + RTL_CONSTASCII_STRINGPARAM("WarnSignDoc"), sal_False, SETTINGS_LAST }, @@ -762,7 +769,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_REMOVE_PERSONAL_INFO, "/apps/openoffice/lockdown/remove_personal_info_on_save", - "Scripting/RemovePersonalInfoOnSaving", + RTL_CONSTASCII_STRINGPARAM("RemovePersonalInfoOnSaving"), sal_False, SETTINGS_LAST }, @@ -770,7 +777,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_RECOMMEND_PASSWORD, "/apps/openoffice/lockdown/recommend_password_on_save", - "RecommendPasswordProtection", + RTL_CONSTASCII_STRINGPARAM("RecommendPasswordProtection"), sal_False, SETTINGS_LAST }, @@ -778,7 +785,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_UNDO_STEPS, "/apps/openoffice/undo_steps", - "UndoSteps", + RTL_CONSTASCII_STRINGPARAM("UndoSteps"), sal_False, SETTINGS_LAST }, @@ -786,7 +793,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_SYMBOL_SET, "/apps/openoffice/icon_size", - "SymbolSet", + RTL_CONSTASCII_STRINGPARAM("SymbolSet"), sal_True, SETTINGS_LAST }, @@ -794,7 +801,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_MACRO_SECURITY_LEVEL, "/apps/openoffice/lockdown/macro_security_level", - "MacroSecurityLevel", + RTL_CONSTASCII_STRINGPARAM("MacroSecurityLevel"), sal_False, SETTINGS_LAST }, @@ -802,7 +809,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_CREATE_BACKUP, "/apps/openoffice/create_backup", - "CreateBackup", + RTL_CONSTASCII_STRINGPARAM("CreateBackup"), sal_False, SETTINGS_LAST }, @@ -810,7 +817,7 @@ ConfigurationValue const ConfigurationValues[] = { SETTING_WARN_ALIEN_FORMAT, "/apps/openoffice/warn_alien_format", - "WarnAlienFormat", + RTL_CONSTASCII_STRINGPARAM("WarnAlienFormat"), sal_False, SETTINGS_LAST }, @@ -818,26 +825,25 @@ ConfigurationValue const ConfigurationValues[] = #endif // ENABLE_LOCKDOWN }; -std::size_t const nConfigurationValues = - sizeof ConfigurationValues / sizeof ConfigurationValues[0]; +std::size_t const nConfigurationValues = SAL_N_ELEMENTS(ConfigurationValues); css::beans::Optional< css::uno::Any > getValue(ConfigurationValue const & data) { - GConfClient* aClient = getGconfClient(); - GConfValue* aGconfValue; - if( ( data.nDependsOn == SETTINGS_LAST ) || isDependencySatisfied( aClient, data ) ) + GConfClient* pClient = getGconfClient(); + GConfValue* pGconfValue; + if( ( data.nDependsOn == SETTINGS_LAST ) || isDependencySatisfied( pClient, data ) ) { - aGconfValue = gconf_client_get( aClient, data.GconfItem, NULL ); + pGconfValue = gconf_client_get( pClient, data.GconfItem, NULL ); - if( aGconfValue != NULL ) + if( pGconfValue != NULL ) { css::uno::Any value; if( data.bNeedsTranslation ) - value = translateToOOo( data, aGconfValue ); + value = translateToOOo( data, pGconfValue ); else - value = makeAnyOfGconfValue( aGconfValue ); + value = makeAnyOfGconfValue( pGconfValue ); - gconf_value_free( aGconfValue ); + gconf_value_free( pGconfValue ); return css::beans::Optional< css::uno::Any >(true, value); } @@ -846,3 +852,5 @@ css::beans::Optional< css::uno::Any > getValue(ConfigurationValue const & data) } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/backends/gconfbe/gconfaccess.hxx b/shell/source/backends/gconfbe/gconfaccess.hxx index 7fdd82ff05e7..d2e560c86c03 100644 --- a/shell/source/backends/gconfbe/gconfaccess.hxx +++ b/shell/source/backends/gconfbe/gconfaccess.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -103,6 +104,7 @@ struct ConfigurationValue const ConfigurationSetting nSettingId; const gchar *GconfItem; const char *OOoConfItem; + const sal_Int32 nOOoConfItemLen; const sal_Bool bNeedsTranslation; const ConfigurationSetting nDependsOn; }; @@ -117,3 +119,5 @@ com::sun::star::beans::Optional< com::sun::star::uno::Any > getValue( } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/backends/gconfbe/gconfbackend.cxx b/shell/source/backends/gconfbe/gconfbackend.cxx index fb3fdb114305..ffd1aeacb145 100644 --- a/shell/source/backends/gconfbe/gconfbackend.cxx +++ b/shell/source/backends/gconfbe/gconfbackend.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -189,9 +190,11 @@ css::uno::Any Service::getPropertyValue(rtl::OUString const & PropertyName) css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException) { - for (std::size_t i = 0; i < gconfaccess::nConfigurationValues; ++i) { - if (PropertyName.equalsAscii( - gconfaccess::ConfigurationValues[i].OOoConfItem)) + for (std::size_t i = 0; i < gconfaccess::nConfigurationValues; ++i) + { + if (PropertyName.equalsAsciiL( + gconfaccess::ConfigurationValues[i].OOoConfItem, + gconfaccess::ConfigurationValues[i].nOOoConfItemLen)) { return css::uno::makeAny( enabled_ @@ -225,9 +228,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( pImplName, pServiceManager, pRegistryKey, services); } -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL -component_getImplementationEnvironment( +extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( char const ** ppEnvTypeName, uno_Environment **) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/backends/gconfbe/gconfbe1.component b/shell/source/backends/gconfbe/gconfbe1.component index 7638e05b544a..7638e05b544a 100644..100755 --- a/shell/source/backends/gconfbe/gconfbe1.component +++ b/shell/source/backends/gconfbe/gconfbe1.component diff --git a/shell/source/backends/gconfbe/makefile.mk b/shell/source/backends/gconfbe/makefile.mk index 9e77a0867ab0..9e77a0867ab0 100644..100755 --- a/shell/source/backends/gconfbe/makefile.mk +++ b/shell/source/backends/gconfbe/makefile.mk diff --git a/shell/source/backends/gconfbe/orbit.h b/shell/source/backends/gconfbe/orbit.h index 2858e8100dc8..82673a3e284c 100644..100755 --- a/shell/source/backends/gconfbe/orbit.h +++ b/shell/source/backends/gconfbe/orbit.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,3 +38,5 @@ #include <orbit/orbit.h> #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/backends/kde4be/kde4access.cxx b/shell/source/backends/kde4be/kde4access.cxx index 336d2d4a458e..03ffb03ed261 100644 --- a/shell/source/backends/kde4be/kde4access.cxx +++ b/shell/source/backends/kde4be/kde4access.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -126,7 +127,7 @@ css::beans::Optional< css::uno::Any > getValue(rtl::OUString const & id) { // In such cases, the proxy address is not stored in KDE, but determined dynamically. // The proxy address may depend on the requested address, on the time of the day, on the speed of the wind... // The best we can do here is to ask the current value for a given address. - aFTPProxy = KProtocolManager::proxyForUrl( KUrl("ftp://ftp.openoffice.org") ); + aFTPProxy = KProtocolManager::proxyForUrl( KUrl("ftp://ftp.libreoffice.org") ); break; default: // No proxy is used break; @@ -153,7 +154,7 @@ css::beans::Optional< css::uno::Any > getValue(rtl::OUString const & id) { // In such cases, the proxy address is not stored in KDE, but determined dynamically. // The proxy address may depend on the requested address, on the time of the day, on the speed of the wind... // The best we can do here is to ask the current value for a given address. - aFTPProxy = KProtocolManager::proxyForUrl( KUrl("ftp://ftp.openoffice.org") ); + aFTPProxy = KProtocolManager::proxyForUrl( KUrl("ftp://ftp.libreoffice.org") ); break; default: // No proxy is used break; @@ -180,7 +181,7 @@ css::beans::Optional< css::uno::Any > getValue(rtl::OUString const & id) { // In such cases, the proxy address is not stored in KDE, but determined dynamically. // The proxy address may depend on the requested address, on the time of the day, on the speed of the wind... // The best we can do here is to ask the current value for a given address. - aHTTPProxy = KProtocolManager::proxyForUrl( KUrl("http://http.openoffice.org") ); + aHTTPProxy = KProtocolManager::proxyForUrl( KUrl("http://http.libreoffice.org") ); break; default: // No proxy is used break; @@ -207,7 +208,7 @@ css::beans::Optional< css::uno::Any > getValue(rtl::OUString const & id) { // In such cases, the proxy address is not stored in KDE, but determined dynamically. // The proxy address may depend on the requested address, on the time of the day, on the speed of the wind... // The best we can do here is to ask the current value for a given address. - aHTTPProxy = KProtocolManager::proxyForUrl( KUrl("http://http.openoffice.org") ); + aHTTPProxy = KProtocolManager::proxyForUrl( KUrl("http://http.libreoffice.org") ); break; default: // No proxy is used break; @@ -234,7 +235,7 @@ css::beans::Optional< css::uno::Any > getValue(rtl::OUString const & id) { // In such cases, the proxy address is not stored in KDE, but determined dynamically. // The proxy address may depend on the requested address, on the time of the day, on the speed of the wind... // The best we can do here is to ask the current value for a given address. - aHTTPSProxy = KProtocolManager::proxyForUrl( KUrl("https://https.openoffice.org") ); + aHTTPSProxy = KProtocolManager::proxyForUrl( KUrl("https://https.libreoffice.org") ); break; default: // No proxy is used break; @@ -261,7 +262,7 @@ css::beans::Optional< css::uno::Any > getValue(rtl::OUString const & id) { // In such cases, the proxy address is not stored in KDE, but determined dynamically. // The proxy address may depend on the requested address, on the time of the day, on the speed of the wind... // The best we can do here is to ask the current value for a given address. - aHTTPSProxy = KProtocolManager::proxyForUrl( KUrl("https://https.openoffice.org") ); + aHTTPSProxy = KProtocolManager::proxyForUrl( KUrl("https://https.libreoffice.org") ); break; default: // No proxy is used break; @@ -317,3 +318,5 @@ css::beans::Optional< css::uno::Any > getValue(rtl::OUString const & id) { } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/backends/kde4be/kde4access.hxx b/shell/source/backends/kde4be/kde4access.hxx index bfb7bc1ac945..4b6f405b8ba5 100644 --- a/shell/source/backends/kde4be/kde4access.hxx +++ b/shell/source/backends/kde4be/kde4access.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -45,3 +46,5 @@ com::sun::star::beans::Optional< com::sun::star::uno::Any > getValue( } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/backends/kde4be/kde4backend.cxx b/shell/source/backends/kde4be/kde4backend.cxx index 2bf3d144a5dc..018003ccb8ff 100644 --- a/shell/source/backends/kde4be/kde4backend.cxx +++ b/shell/source/backends/kde4be/kde4backend.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -244,9 +245,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( pImplName, pServiceManager, pRegistryKey, services); } -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL -component_getImplementationEnvironment( +extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( char const ** ppEnvTypeName, uno_Environment **) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/backends/kde4be/kde4be1.component b/shell/source/backends/kde4be/kde4be1.component index 8ea7ae121088..8ea7ae121088 100644..100755 --- a/shell/source/backends/kde4be/kde4be1.component +++ b/shell/source/backends/kde4be/kde4be1.component diff --git a/shell/source/backends/kde4be/makefile.mk b/shell/source/backends/kde4be/makefile.mk index 477e47ca6100..477e47ca6100 100644..100755 --- a/shell/source/backends/kde4be/makefile.mk +++ b/shell/source/backends/kde4be/makefile.mk diff --git a/shell/source/backends/kdebe/kdeaccess.cxx b/shell/source/backends/kdebe/kdeaccess.cxx index 618d74b5eacf..22f110be96cf 100644 --- a/shell/source/backends/kdebe/kdeaccess.cxx +++ b/shell/source/backends/kdebe/kdeaccess.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -313,3 +314,5 @@ css::beans::Optional< css::uno::Any > getValue(rtl::OUString const & id) { } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/backends/kdebe/kdeaccess.hxx b/shell/source/backends/kdebe/kdeaccess.hxx index 36a22e23db9a..76a4b85447d9 100644 --- a/shell/source/backends/kdebe/kdeaccess.hxx +++ b/shell/source/backends/kdebe/kdeaccess.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -45,3 +46,5 @@ com::sun::star::beans::Optional< com::sun::star::uno::Any > getValue( } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/backends/kdebe/kdebackend.cxx b/shell/source/backends/kdebe/kdebackend.cxx index ad38a6cfc854..8ff27ebe6fc3 100644 --- a/shell/source/backends/kdebe/kdebackend.cxx +++ b/shell/source/backends/kdebe/kdebackend.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -244,9 +245,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( pImplName, pServiceManager, pRegistryKey, services); } -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL -component_getImplementationEnvironment( +extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( char const ** ppEnvTypeName, uno_Environment **) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/backends/kdebe/kdebe1.component b/shell/source/backends/kdebe/kdebe1.component index 393fbc80d538..393fbc80d538 100644..100755 --- a/shell/source/backends/kdebe/kdebe1.component +++ b/shell/source/backends/kdebe/kdebe1.component diff --git a/shell/source/backends/kdebe/makefile.mk b/shell/source/backends/kdebe/makefile.mk index b1b12ad3c6f3..b1b12ad3c6f3 100644..100755 --- a/shell/source/backends/kdebe/makefile.mk +++ b/shell/source/backends/kdebe/makefile.mk diff --git a/shell/source/backends/localebe/localebackend.cxx b/shell/source/backends/localebe/localebackend.cxx index 1335d4a7fa50..ba8e4ff66ac9 100644 --- a/shell/source/backends/localebe/localebackend.cxx +++ b/shell/source/backends/localebe/localebackend.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,54 +35,37 @@ #include <stdio.h> -#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || defined(FREEBSD) || defined(OS2) +#ifdef WNT -#include <rtl/ustrbuf.hxx> -#include <locale.h> -#include <string.h> +#ifdef WINVER +#undef WINVER +#endif +#define WINVER 0x0501 -/* - * Note: setlocale is not at all thread safe, so is this code. It could - * especially interfere with the stuff VCL is doing, so make sure this - * is called from the main thread only. - */ +#if defined _MSC_VER +#pragma warning(push, 1) +#endif +#include <windows.h> +#if defined _MSC_VER +#pragma warning(pop) +#endif -static rtl::OUString ImplGetLocale(int category) +rtl::OUString ImplGetLocale(LCID lcid) { - const char *locale = setlocale(category, ""); - - // Return "en-US" for C locales - if( (locale == NULL) || ( locale[0] == 'C' && locale[1] == '\0' ) ) - return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "en-US" ) ); - - - const char *cp; - const char *uscore = NULL; + TCHAR buffer[8]; + LPTSTR cp = buffer; - // locale string have the format lang[_ctry][.encoding][@modifier] - // we are only interested in the first two items, so we handle - // '.' and '@' as string end. - for (cp = locale; *cp; cp++) + cp += GetLocaleInfo( lcid, LOCALE_SISO639LANGNAME , buffer, 4 ); + if( cp > buffer ) { - if (*cp == '_') - uscore = cp; - if (*cp == '.' || *cp == '@') - break; - } + if( 0 < GetLocaleInfo( lcid, LOCALE_SISO3166CTRYNAME, cp, buffer + 8 - cp) ) + // #i50822# minus character must be written before cp + *(cp - 1) = '-'; - rtl::OUStringBuffer aLocaleBuffer; - if( uscore != NULL ) - { - aLocaleBuffer.appendAscii(locale, uscore++ - locale); - aLocaleBuffer.appendAscii("-"); - aLocaleBuffer.appendAscii(uscore, cp - uscore); - } - else - { - aLocaleBuffer.appendAscii(locale, cp - locale); + return rtl::OUString::createFromAscii(buffer); } - return aLocaleBuffer.makeStringAndClear(); + return rtl::OUString(); } #elif defined(MACOSX) @@ -183,44 +167,57 @@ namespace /* private */ } // namespace /* private */ -#endif +#else -// ------------------------------------------------------------------------------- +#include <rtl/ustrbuf.hxx> +#include <locale.h> +#include <string.h> -#ifdef WNT +/* + * Note: setlocale is not at all thread safe, so is this code. It could + * especially interfere with the stuff VCL is doing, so make sure this + * is called from the main thread only. + */ -#ifdef WINVER -#undef WINVER -#endif -#define WINVER 0x0501 +static rtl::OUString ImplGetLocale(int category) +{ + const char *locale = setlocale(category, ""); -#if defined _MSC_VER -#pragma warning(push, 1) -#endif -#include <windows.h> -#if defined _MSC_VER -#pragma warning(pop) -#endif + // Return "en-US" for C locales + if( (locale == NULL) || ( locale[0] == 'C' && locale[1] == '\0' ) ) + return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "en-US" ) ); -rtl::OUString ImplGetLocale(LCID lcid) -{ - TCHAR buffer[8]; - LPTSTR cp = buffer; - cp += GetLocaleInfo( lcid, LOCALE_SISO639LANGNAME , buffer, 4 ); - if( cp > buffer ) + const char *cp; + const char *uscore = NULL; + + // locale string have the format lang[_ctry][.encoding][@modifier] + // we are only interested in the first two items, so we handle + // '.' and '@' as string end. + for (cp = locale; *cp; cp++) { - if( 0 < GetLocaleInfo( lcid, LOCALE_SISO3166CTRYNAME, cp, buffer + 8 - cp) ) - // #i50822# minus character must be written before cp - *(cp - 1) = '-'; + if (*cp == '_') + uscore = cp; + if (*cp == '.' || *cp == '@') + break; + } - return rtl::OUString::createFromAscii(buffer); + rtl::OUStringBuffer aLocaleBuffer; + if( uscore != NULL ) + { + aLocaleBuffer.appendAscii(locale, uscore++ - locale); + aLocaleBuffer.appendAscii("-"); + aLocaleBuffer.appendAscii(uscore, cp - uscore); + } + else + { + aLocaleBuffer.appendAscii(locale, cp - locale); } - return rtl::OUString(); + return aLocaleBuffer.makeStringAndClear(); } -#endif // WNT +#endif // ------------------------------------------------------------------------------- @@ -245,12 +242,12 @@ LocaleBackend* LocaleBackend::createInstance() rtl::OUString LocaleBackend::getLocale(void) { -#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || defined(FREEBSD) || defined(OS2) - return ImplGetLocale(LC_CTYPE); +#if defined WNT + return ImplGetLocale( GetUserDefaultLCID() ); #elif defined (MACOSX) return ImplGetLocale("AppleLocale"); -#elif defined WNT - return ImplGetLocale( GetUserDefaultLCID() ); +#else + return ImplGetLocale(LC_CTYPE); #endif } @@ -258,12 +255,12 @@ rtl::OUString LocaleBackend::getLocale(void) rtl::OUString LocaleBackend::getUILocale(void) { -#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || defined(FREEBSD) || defined(OS2) - return ImplGetLocale(LC_MESSAGES); +#if defined WNT + return ImplGetLocale( MAKELCID(GetUserDefaultUILanguage(), SORT_DEFAULT) ); #elif defined(MACOSX) return ImplGetLocale("AppleLanguages"); -#elif defined WNT - return ImplGetLocale( MAKELCID(GetUserDefaultUILanguage(), SORT_DEFAULT) ); +#else + return ImplGetLocale(LC_MESSAGES); #endif } @@ -324,7 +321,7 @@ css::uno::Any LocaleBackend::getPropertyValue( //------------------------------------------------------------------------------ rtl::OUString SAL_CALL LocaleBackend::getBackendName(void) { - return rtl::OUString::createFromAscii("com.sun.star.comp.configuration.backend.LocaleBackend") ; + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.configuration.backend.LocaleBackend")) ; } //------------------------------------------------------------------------------ @@ -365,3 +362,5 @@ uno::Sequence<rtl::OUString> SAL_CALL LocaleBackend::getSupportedServiceNames(vo { return getBackendServiceNames() ; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/backends/localebe/localebackend.hxx b/shell/source/backends/localebe/localebackend.hxx index 29950a3df913..ee4259e26efa 100644 --- a/shell/source/backends/localebe/localebackend.hxx +++ b/shell/source/backends/localebe/localebackend.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -147,3 +148,5 @@ class LocaleBackend : public ::cppu::WeakImplHelper2 < #endif // _FIXEDVALUEBACKEND_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/backends/localebe/localebe.xml b/shell/source/backends/localebe/localebe.xml index 3c22a4970881..3c22a4970881 100644..100755 --- a/shell/source/backends/localebe/localebe.xml +++ b/shell/source/backends/localebe/localebe.xml diff --git a/shell/source/backends/localebe/localebe1.component b/shell/source/backends/localebe/localebe1.component index 7236a6198281..7236a6198281 100644..100755 --- a/shell/source/backends/localebe/localebe1.component +++ b/shell/source/backends/localebe/localebe1.component diff --git a/shell/source/backends/localebe/localebecdef.cxx b/shell/source/backends/localebe/localebecdef.cxx index 0ec9c0665125..cc929756f495 100644 --- a/shell/source/backends/localebe/localebecdef.cxx +++ b/shell/source/backends/localebe/localebecdef.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,9 +31,7 @@ #include <localebackend.hxx> -#ifndef _CPPUHELPER_IMPLEMENTATIONENTRY_HXX_ #include <cppuhelper/implementationentry.hxx> -#endif #include <com/sun/star/uno/XComponentContext.hpp> namespace css = com::sun::star ; @@ -64,7 +63,7 @@ static const cppu::ImplementationEntry kImplementations_entries[] = //------------------------------------------------------------------------------ -extern "C" void SAL_CALL component_getImplementationEnvironment( +extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Environment ** /*aEnvironment*/) { *aEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; @@ -72,7 +71,7 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( //------------------------------------------------------------------------------ -extern "C" void *component_getFactory( const sal_Char *aImplementationName, +extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char *aImplementationName, void *aServiceManager, void *aRegistryKey) { @@ -85,3 +84,4 @@ extern "C" void *component_getFactory( const sal_Char *aImplementationName, //------------------------------------------------------------------------------ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/backends/localebe/makefile.mk b/shell/source/backends/localebe/makefile.mk index 1efe3ed5e498..1efe3ed5e498 100644..100755 --- a/shell/source/backends/localebe/makefile.mk +++ b/shell/source/backends/localebe/makefile.mk diff --git a/shell/source/backends/macbe/macbackend.cxx b/shell/source/backends/macbe/macbackend.cxx index b07afb2e6701..fee3e696a04c 100644 --- a/shell/source/backends/macbe/macbackend.cxx +++ b/shell/source/backends/macbe/macbackend.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -427,7 +428,7 @@ css::uno::Any MacOSXBackend::getPropertyValue( CFStringRef rException = (CFStringRef) CFArrayGetValueAtIndex(rExceptionsList, idx); if (idx>0) - aProxyBypassList += rtl::OUString::createFromAscii( ";" ); + aProxyBypassList += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";")); aProxyBypassList += CFStringToOUString(rException); } @@ -455,7 +456,7 @@ css::uno::Any MacOSXBackend::getPropertyValue( rtl::OUString SAL_CALL MacOSXBackend::getBackendName(void) { - return rtl::OUString::createFromAscii("com.sun.star.comp.configuration.backend.MacOSXBackend"); + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.configuration.backend.MacOSXBackend")); } //------------------------------------------------------------------------------ @@ -497,3 +498,5 @@ uno::Sequence<rtl::OUString> SAL_CALL MacOSXBackend::getSupportedServiceNames(vo { return getBackendServiceNames(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/backends/macbe/macbackend.hxx b/shell/source/backends/macbe/macbackend.hxx index de4f9eee1ff6..5aabb2c2b092 100644 --- a/shell/source/backends/macbe/macbackend.hxx +++ b/shell/source/backends/macbe/macbackend.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -136,3 +137,5 @@ protected: }; #endif // _MACBACKEND_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/backends/macbe/macbe.xml b/shell/source/backends/macbe/macbe.xml index 7cee5bb14de5..7cee5bb14de5 100644..100755 --- a/shell/source/backends/macbe/macbe.xml +++ b/shell/source/backends/macbe/macbe.xml diff --git a/shell/source/backends/macbe/macbe1.component b/shell/source/backends/macbe/macbe1.component index 10bac2e2b6a0..10bac2e2b6a0 100644..100755 --- a/shell/source/backends/macbe/macbe1.component +++ b/shell/source/backends/macbe/macbe1.component diff --git a/shell/source/backends/macbe/macbecdef.cxx b/shell/source/backends/macbe/macbecdef.cxx index ab49bbb779f3..3c7b42e1e110 100644 --- a/shell/source/backends/macbe/macbecdef.cxx +++ b/shell/source/backends/macbe/macbecdef.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,9 +32,7 @@ #include "macbackend.hxx" #include <com/sun/star/registry/XRegistryKey.hpp> -#ifndef _CPPUHELPER_IMPLEMENTATIONENTRY_HXX_ #include <cppuhelper/implementationentry.hxx> -#endif #include <com/sun/star/uno/XComponentContext.hpp> namespace css = com::sun::star; @@ -65,7 +64,7 @@ static const cppu::ImplementationEntry kImplementations_entries[] = //------------------------------------------------------------------------------ -extern "C" void SAL_CALL component_getImplementationEnvironment( +extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Environment ** /*aEnvironment*/) { *aEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; @@ -73,7 +72,7 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( //------------------------------------------------------------------------------ -extern "C" void *component_getFactory( const sal_Char *aImplementationName, void *aServiceManager, void *aRegistryKey) +extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char *aImplementationName, void *aServiceManager, void *aRegistryKey) { return cppu::component_getFactoryHelper( @@ -85,3 +84,4 @@ extern "C" void *component_getFactory( const sal_Char *aImplementationName, void //------------------------------------------------------------------------------ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/backends/macbe/makefile.mk b/shell/source/backends/macbe/makefile.mk index dd20834b2635..dd20834b2635 100644..100755 --- a/shell/source/backends/macbe/makefile.mk +++ b/shell/source/backends/macbe/makefile.mk diff --git a/shell/source/backends/wininetbe/makefile.mk b/shell/source/backends/wininetbe/makefile.mk index 7d8a6be14b21..7d8a6be14b21 100644..100755 --- a/shell/source/backends/wininetbe/makefile.mk +++ b/shell/source/backends/wininetbe/makefile.mk diff --git a/shell/source/backends/wininetbe/wininetbackend.cxx b/shell/source/backends/wininetbe/wininetbackend.cxx index af6f1036496d..fe9a37459157 100644 --- a/shell/source/backends/wininetbe/wininetbackend.cxx +++ b/shell/source/backends/wininetbe/wininetbackend.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -359,7 +360,7 @@ css::uno::Any WinInetBackend::getPropertyValue( //------------------------------------------------------------------------------ rtl::OUString SAL_CALL WinInetBackend::getBackendName(void) { - return rtl::OUString::createFromAscii("com.sun.star.comp.configuration.backend.WinInetBackend") ; + return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.configuration.backend.WinInetBackend")) ; } //------------------------------------------------------------------------------ @@ -401,3 +402,5 @@ uno::Sequence<rtl::OUString> SAL_CALL WinInetBackend::getSupportedServiceNames(v { return getBackendServiceNames() ; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/backends/wininetbe/wininetbackend.hxx b/shell/source/backends/wininetbe/wininetbackend.hxx index 5fe4d5625a9a..aebe1e874c65 100644 --- a/shell/source/backends/wininetbe/wininetbackend.hxx +++ b/shell/source/backends/wininetbe/wininetbackend.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -155,3 +156,5 @@ class WinInetBackend : public ::cppu::WeakImplHelper2 < #endif // _FIXEDVALUEBACKEND_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/backends/wininetbe/wininetbe.xml b/shell/source/backends/wininetbe/wininetbe.xml index 1bf4bd2cd053..1bf4bd2cd053 100644..100755 --- a/shell/source/backends/wininetbe/wininetbe.xml +++ b/shell/source/backends/wininetbe/wininetbe.xml diff --git a/shell/source/backends/wininetbe/wininetbe1.component b/shell/source/backends/wininetbe/wininetbe1.component index d8930280fb2a..d8930280fb2a 100644..100755 --- a/shell/source/backends/wininetbe/wininetbe1.component +++ b/shell/source/backends/wininetbe/wininetbe1.component diff --git a/shell/source/backends/wininetbe/wininetbecdef.cxx b/shell/source/backends/wininetbe/wininetbecdef.cxx index ed6cdceb4a3e..925193114b28 100644 --- a/shell/source/backends/wininetbe/wininetbecdef.cxx +++ b/shell/source/backends/wininetbe/wininetbecdef.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,9 +32,7 @@ #include <wininetbackend.hxx> #include <com/sun/star/registry/XRegistryKey.hpp> -#ifndef _CPPUHELPER_IMPLEMENTATIONENTRY_HXX_ #include <cppuhelper/implementationentry.hxx> -#endif #include <com/sun/star/uno/XComponentContext.hpp> namespace css = com::sun::star ; @@ -65,7 +64,7 @@ static const cppu::ImplementationEntry kImplementations_entries[] = //------------------------------------------------------------------------------ -extern "C" void SAL_CALL component_getImplementationEnvironment( +extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Environment ** /*aEnvironment*/) { *aEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; @@ -73,7 +72,7 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( //------------------------------------------------------------------------------ -extern "C" void *component_getFactory( const sal_Char *aImplementationName, +extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char *aImplementationName, void *aServiceManager, void *aRegistryKey) { @@ -86,3 +85,4 @@ extern "C" void *component_getFactory( const sal_Char *aImplementationName, //------------------------------------------------------------------------------ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/cmdmail/cmdmail.component b/shell/source/cmdmail/cmdmail.component index 7e56741d16c1..7e56741d16c1 100644..100755 --- a/shell/source/cmdmail/cmdmail.component +++ b/shell/source/cmdmail/cmdmail.component diff --git a/shell/source/cmdmail/cmdmail.xml b/shell/source/cmdmail/cmdmail.xml index 51de9cc1e4da..51de9cc1e4da 100644..100755 --- a/shell/source/cmdmail/cmdmail.xml +++ b/shell/source/cmdmail/cmdmail.xml diff --git a/shell/source/cmdmail/cmdmailentry.cxx b/shell/source/cmdmail/cmdmailentry.cxx index 740f87cd76f1..a044dc49cf5f 100755..100644 --- a/shell/source/cmdmail/cmdmailentry.cxx +++ b/shell/source/cmdmail/cmdmailentry.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -56,8 +57,6 @@ using com::sun::star::system::XSimpleMailClientSupplier; #define COMP_IMPL_NAME "com.sun.star.comp.system.SimpleCommandMail" //----------------------------------------------------------------------- -// -//----------------------------------------------------------------------- namespace { @@ -68,7 +67,7 @@ namespace } //----------------------------------------------------------------------- -// the 3 important functions which will be exported +// the 2 important functions which will be exported //----------------------------------------------------------------------- extern "C" @@ -78,7 +77,7 @@ extern "C" // component_getImplementationEnvironment //---------------------------------------------------------------------- -void SAL_CALL component_getImplementationEnvironment( +SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; @@ -88,7 +87,7 @@ void SAL_CALL component_getImplementationEnvironment( // component_getFactory //---------------------------------------------------------------------- -void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* /*pSrvManager*/, uno_Interface* /*pRegistryKey*/ ) +SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* /*pSrvManager*/, uno_Interface* /*pRegistryKey*/ ) { Reference< XSingleComponentFactory > xFactory; @@ -109,3 +108,5 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* / } } // extern "C" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/cmdmail/cmdmailmsg.cxx b/shell/source/cmdmail/cmdmailmsg.cxx index 77de429ed771..36c934c85033 100755..100644 --- a/shell/source/cmdmail/cmdmailmsg.cxx +++ b/shell/source/cmdmail/cmdmailmsg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -54,8 +55,6 @@ using namespace com::sun::star::uno; //------------------------------------------------ -// -//------------------------------------------------ void SAL_CALL CmdMailMsg::setRecipient( const ::rtl::OUString& aRecipient ) throw (RuntimeException) @@ -65,8 +64,6 @@ void SAL_CALL CmdMailMsg::setRecipient( const ::rtl::OUString& aRecipient ) } //------------------------------------------------ -// -//------------------------------------------------ ::rtl::OUString SAL_CALL CmdMailMsg::getRecipient( ) throw (RuntimeException) @@ -76,8 +73,6 @@ void SAL_CALL CmdMailMsg::setRecipient( const ::rtl::OUString& aRecipient ) } //------------------------------------------------ -// -//------------------------------------------------ void SAL_CALL CmdMailMsg::setCcRecipient( const Sequence< OUString >& aCcRecipient ) throw (RuntimeException) @@ -87,8 +82,6 @@ void SAL_CALL CmdMailMsg::setCcRecipient( const Sequence< OUString >& aCcRecipie } //------------------------------------------------ -// -//------------------------------------------------ Sequence< OUString > SAL_CALL CmdMailMsg::getCcRecipient( ) throw (RuntimeException) @@ -98,8 +91,6 @@ Sequence< OUString > SAL_CALL CmdMailMsg::getCcRecipient( ) } //------------------------------------------------ -// -//------------------------------------------------ void SAL_CALL CmdMailMsg::setBccRecipient( const Sequence< OUString >& aBccRecipient ) throw (RuntimeException) @@ -109,8 +100,6 @@ void SAL_CALL CmdMailMsg::setBccRecipient( const Sequence< OUString >& aBccRecip } //------------------------------------------------ -// -//------------------------------------------------ Sequence< OUString > SAL_CALL CmdMailMsg::getBccRecipient( ) throw (RuntimeException) @@ -120,8 +109,6 @@ Sequence< OUString > SAL_CALL CmdMailMsg::getBccRecipient( ) } //------------------------------------------------ -// -//------------------------------------------------ void SAL_CALL CmdMailMsg::setOriginator( const OUString& aOriginator ) throw (RuntimeException) @@ -131,8 +118,6 @@ void SAL_CALL CmdMailMsg::setOriginator( const OUString& aOriginator ) } //------------------------------------------------ -// -//------------------------------------------------ OUString SAL_CALL CmdMailMsg::getOriginator( ) throw (RuntimeException) @@ -142,8 +127,6 @@ OUString SAL_CALL CmdMailMsg::getOriginator( ) } //------------------------------------------------ -// -//------------------------------------------------ void SAL_CALL CmdMailMsg::setSubject( const OUString& aSubject ) throw (RuntimeException) @@ -153,8 +136,6 @@ void SAL_CALL CmdMailMsg::setSubject( const OUString& aSubject ) } //------------------------------------------------ -// -//------------------------------------------------ OUString SAL_CALL CmdMailMsg::getSubject( ) throw (RuntimeException) @@ -164,8 +145,6 @@ OUString SAL_CALL CmdMailMsg::getSubject( ) } //------------------------------------------------ -// -//------------------------------------------------ void SAL_CALL CmdMailMsg::setAttachement( const Sequence< ::rtl::OUString >& aAttachment ) throw (IllegalArgumentException, RuntimeException) @@ -175,8 +154,6 @@ void SAL_CALL CmdMailMsg::setAttachement( const Sequence< ::rtl::OUString >& aAt } //------------------------------------------------ -// -//------------------------------------------------ Sequence< OUString > SAL_CALL CmdMailMsg::getAttachement( ) throw (RuntimeException) @@ -186,8 +163,6 @@ Sequence< OUString > SAL_CALL CmdMailMsg::getAttachement( ) } //------------------------------------------------ -// -//------------------------------------------------ Any SAL_CALL CmdMailMsg::getByName( const OUString& aName ) throw (NoSuchElementException, WrappedTargetException, RuntimeException) @@ -212,13 +187,11 @@ Any SAL_CALL CmdMailMsg::getByName( const OUString& aName ) else if( 0 == aName.compareToAscii( "attachment" ) && m_Attachments.getLength() ) return makeAny( m_Attachments ); - throw NoSuchElementException( OUString::createFromAscii( "key not found: ") + aName, + throw NoSuchElementException( OUString(RTL_CONSTASCII_USTRINGPARAM("key not found: ")) + aName, static_cast < XNameAccess * > (this) ); } //------------------------------------------------ -// -//------------------------------------------------ Sequence< OUString > SAL_CALL CmdMailMsg::getElementNames( ) throw (::com::sun::star::uno::RuntimeException) @@ -229,30 +202,28 @@ Sequence< OUString > SAL_CALL CmdMailMsg::getElementNames( ) Sequence< OUString > aRet( 6 ); if( m_aOriginator.getLength() ) - aRet[nItems++] = OUString::createFromAscii( "from" ); + aRet[nItems++] = OUString(RTL_CONSTASCII_USTRINGPARAM("from")); if( m_aRecipient.getLength() ) - aRet[nItems++] = OUString::createFromAscii( "to" ); + aRet[nItems++] = OUString(RTL_CONSTASCII_USTRINGPARAM("to")); if( m_CcRecipients.getLength() ) - aRet[nItems++] = OUString::createFromAscii( "cc" ); + aRet[nItems++] = OUString(RTL_CONSTASCII_USTRINGPARAM("cc")); if( m_BccRecipients.getLength() ) - aRet[nItems++] = OUString::createFromAscii( "bcc" ); + aRet[nItems++] = OUString(RTL_CONSTASCII_USTRINGPARAM("bcc")); if( m_aSubject.getLength() ) - aRet[nItems++] = OUString::createFromAscii( "subject" ); + aRet[nItems++] = OUString(RTL_CONSTASCII_USTRINGPARAM("subject")); if( m_Attachments.getLength() ) - aRet[nItems++] = OUString::createFromAscii( "attachment" ); + aRet[nItems++] = OUString(RTL_CONSTASCII_USTRINGPARAM("attachment")); aRet.realloc( nItems ); return aRet; } //------------------------------------------------ -// -//------------------------------------------------ sal_Bool SAL_CALL CmdMailMsg::hasByName( const ::rtl::OUString& aName ) throw (RuntimeException) @@ -281,8 +252,6 @@ Sequence< OUString > SAL_CALL CmdMailMsg::getElementNames( ) } //------------------------------------------------ -// -//------------------------------------------------ Type SAL_CALL CmdMailMsg::getElementType( ) throw (RuntimeException) @@ -292,11 +261,11 @@ Type SAL_CALL CmdMailMsg::getElementType( ) } //------------------------------------------------ -// -//------------------------------------------------ sal_Bool SAL_CALL CmdMailMsg::hasElements( ) throw (RuntimeException) { return 0 != getElementNames().getLength(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/cmdmail/cmdmailmsg.hxx b/shell/source/cmdmail/cmdmailmsg.hxx index 520bd0acbb56..e7ca0d9cf4f5 100644 --- a/shell/source/cmdmail/cmdmailmsg.hxx +++ b/shell/source/cmdmail/cmdmailmsg.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,9 +33,7 @@ #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <com/sun/star/container/XNameAccess.hpp> -#ifndef _COM_SUN_STAR_SYS_SHELL_XSYSTEMSHELLEXECUTE_HPP_ #include <com/sun/star/system/XSimpleMailMessage.hpp> -#endif #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/uno/Reference.hxx> @@ -126,3 +125,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx index 4878f8d7783f..2bd36e9e9e8d 100755..100644 --- a/shell/source/cmdmail/cmdmailsuppl.cxx +++ b/shell/source/cmdmail/cmdmailsuppl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -87,15 +88,13 @@ namespace // private Sequence< OUString > SAL_CALL Component_getSupportedServiceNames() { Sequence< OUString > aRet(1); - aRet[0] = OUString::createFromAscii("com.sun.star.system.SimpleCommandMail"); + aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SimpleCommandMail")); return aRet; } } // end private namespace //------------------------------------------------- -// -//------------------------------------------------- CmdMailSuppl::CmdMailSuppl( const Reference< XComponentContext >& xContext ) : WeakImplHelper3< XSimpleMailClientSupplier, XSimpleMailClient, XServiceInfo >() @@ -105,7 +104,7 @@ CmdMailSuppl::CmdMailSuppl( const Reference< XComponentContext >& xContext ) : if ( xServiceManager.is() ) { m_xConfigurationProvider = Reference< XMultiServiceFactory > ( xServiceManager->createInstanceWithContext( - OUString::createFromAscii( "com.sun.star.configuration.ConfigurationProvider" ), xContext ), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider")), xContext ), UNO_QUERY ); } } @@ -177,7 +176,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office.Common/ExternalMailer" ) ); PropertyValue aProperty; - aProperty.Name = OUString::createFromAscii( "nodepath" ); + aProperty.Name = OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")); aProperty.Value = makeAny( aConfigRoot ); Sequence< Any > aArgumentList( 1 ); @@ -186,7 +185,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM Reference< XNameAccess > xNameAccess = Reference< XNameAccess > ( m_xConfigurationProvider->createInstanceWithArguments( - OUString::createFromAscii( "com.sun.star.configuration.ConfigurationAccess" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")), aArgumentList ), UNO_QUERY ); @@ -196,7 +195,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM // Retrieve the value for "Program" node and append it feed senddoc with it // using the (undocumented) --mailclient switch - xNameAccess->getByName( OUString::createFromAscii( "Program" ) ) >>= aMailer; + xNameAccess->getByName( OUString(RTL_CONSTASCII_USTRINGPARAM("Program")) ) >>= aMailer; if( aMailer.getLength() ) { @@ -219,7 +218,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM { m_xConfigurationProvider.clear(); OSL_TRACE( "RuntimeException caught accessing configuration provider." ); - OSL_TRACE( OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() ); + OSL_TRACE( "%s", OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() ); throw e; } @@ -297,7 +296,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM OUString SAL_CALL CmdMailSuppl::getImplementationName( ) throw( RuntimeException ) { - return OUString::createFromAscii( COMP_IMPL_NAME ); + return OUString(RTL_CONSTASCII_USTRINGPARAM( COMP_IMPL_NAME )); } // ------------------------------------------------- @@ -326,3 +325,4 @@ Sequence< OUString > SAL_CALL CmdMailSuppl::getSupportedServiceNames( ) return Component_getSupportedServiceNames(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/cmdmail/cmdmailsuppl.hxx b/shell/source/cmdmail/cmdmailsuppl.hxx index 343de67cb68c..8728a2db469a 100644 --- a/shell/source/cmdmail/cmdmailsuppl.hxx +++ b/shell/source/cmdmail/cmdmailsuppl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,13 +38,9 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/uno/XComponentContext.hpp> -#ifndef _COM_SUN_STAR_SYS_SHELL_XSYSTEMSHELLEXECUTE_HPP_ #include <com/sun/star/system/XSimpleMailClient.hpp> -#endif -#ifndef _COM_SUN_STAR_SYS_SHELL_XSYSTEMSHELLEXECUTE_HPP_ #include <com/sun/star/system/XSimpleMailClientSupplier.hpp> -#endif //---------------------------------------------------------- // class declaration @@ -93,3 +90,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/cmdmail/exports.dxp b/shell/source/cmdmail/exports.dxp index f0e1c69934bc..f0e1c69934bc 100644..100755 --- a/shell/source/cmdmail/exports.dxp +++ b/shell/source/cmdmail/exports.dxp diff --git a/shell/source/cmdmail/makefile.mk b/shell/source/cmdmail/makefile.mk index e4d5ec48b925..e4d5ec48b925 100644..100755 --- a/shell/source/cmdmail/makefile.mk +++ b/shell/source/cmdmail/makefile.mk diff --git a/shell/source/mingw_intel.map b/shell/source/mingw_intel.map index 7713d456aba5..7713d456aba5 100644..100755 --- a/shell/source/mingw_intel.map +++ b/shell/source/mingw_intel.map diff --git a/shell/source/tools/lngconvex/cmdline.cxx b/shell/source/tools/lngconvex/cmdline.cxx index 8e51e0b203e1..350bb7949223 100644 --- a/shell/source/tools/lngconvex/cmdline.cxx +++ b/shell/source/tools/lngconvex/cmdline.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,9 +37,7 @@ /** Simple command line abstraction */ -//################################ // Creation -//################################ CommandLine::CommandLine(size_t argc, char* argv[], const std::string& ArgPrefix) : @@ -49,9 +48,7 @@ CommandLine::CommandLine(size_t argc, char* argv[], const std::string& ArgPrefix } -//################################ // Query -//################################ /** Return the argument count @@ -143,9 +140,7 @@ std::string CommandLine::get_arg(const std::string& ArgumentName) const } -//################################ // Command -//################################ /** Set the prefix used to identify arguments in @@ -173,3 +168,5 @@ bool CommandLine::is_arg_name(const std::string& Argument) const { return (0 == Argument.compare(0, m_argprefix.length(), m_argprefix)); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/tools/lngconvex/cmdline.hxx b/shell/source/tools/lngconvex/cmdline.hxx index b7c5e5453136..efee314fa9e0 100644 --- a/shell/source/tools/lngconvex/cmdline.hxx +++ b/shell/source/tools/lngconvex/cmdline.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ #ifndef _CMDLINE_HXX_ #define _CMDLINE_HXX_ @@ -11,17 +12,13 @@ class CommandLine { public: - //################################ // Creation - //################################ CommandLine(size_t argc, char* argv[], const std::string& ArgPrefix = std::string("-")); - //################################ // Query - //################################ /** Return the argument count @@ -69,9 +66,7 @@ public: std::string get_arg(const std::string& ArgumentName) const; - //################################ // Command - //################################ /** Set the prefix used to identify arguments in @@ -102,3 +97,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/tools/lngconvex/defs.hxx b/shell/source/tools/lngconvex/defs.hxx index 4304a434b486..8b2dbb218cae 100644 --- a/shell/source/tools/lngconvex/defs.hxx +++ b/shell/source/tools/lngconvex/defs.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ #ifndef _DEFS_HXX_ #define _DEFS_HXX_ @@ -12,3 +13,5 @@ typedef std::vector<int> IntegerList_t; typedef std::auto_ptr<IntegerList_t> IntegerListPtr_t; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx index 1d8862153230..364ac49ba4bd 100644 --- a/shell/source/tools/lngconvex/lngconvex.cxx +++ b/shell/source/tools/lngconvex/lngconvex.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -25,6 +26,10 @@ * ************************************************************************/ +#ifdef AIX +# undef _THREAD_SAFE +#endif + // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_shell.hxx" @@ -64,7 +69,6 @@ namespace /* private */ using rtl::OUString; using rtl::OString; -//########################################### void ShowUsage() { std::cout << "Usage: -ulf ulf_file -rc rc_output_file -rct rc_template_file -rch rch_file -rcf rcf_file" << std::endl; @@ -75,15 +79,12 @@ void ShowUsage() std::cout << "-rcf Name of the resource file footer" << std::endl; } -//########################################### inline OUString OStringToOUString(const OString& str) { return rtl::OStringToOUString(str, osl_getThreadTextEncoding()); } -//########################################### inline OString OUStringToOString(const OUString& str) { return rtl::OUStringToOString(str, osl_getThreadTextEncoding()); } -//########################################### /** Get the directory where the module is located as system directory, the returned directory has a trailing '\' */ @@ -97,7 +98,6 @@ OUString get_module_path() return module_path; } -//########################################### /** Make the absolute directory of a base and a relative directory, if the relative directory is absolute the the relative @@ -123,7 +123,6 @@ OUString get_absolute_path( return abs_sys_path; } -//########################################### OString get_absolute_file_path(const std::string& file_name) { OUString fp = get_absolute_path( @@ -131,7 +130,6 @@ OString get_absolute_file_path(const std::string& file_name) return OUStringToOString(fp); } -//########################################### /** A helper class, enables stream exceptions on construction, restors the old exception state on destruction */ @@ -158,7 +156,6 @@ private: typedef std::vector<std::string> string_container_t; -//########################################### class iso_lang_identifier { public: @@ -204,7 +201,6 @@ private: OString country_; }; -//########################################### /** Convert a OUString to the MS resource file format string e.g. OUString -> L"\x1A00\x2200\x3400" */ @@ -223,14 +219,12 @@ std::string make_winrc_unicode_string(const OUString& str) return oss.str(); } -//########################################### std::string make_winrc_unicode_string(const std::string& str) { return make_winrc_unicode_string( OUString::createFromAscii(str.c_str())); } -//################################################ /** A replacement table contains pairs of placeholders and the appropriate substitute */ class Substitutor @@ -318,7 +312,6 @@ private: typedef std::map< unsigned short , std::string , std::less< unsigned short > > shortmap; -//########################################### void add_group_entries( Config& aConfig, const ByteString& GroupName, @@ -360,7 +353,6 @@ void add_group_entries( } } -//########################################### void read_ulf_file(const std::string& FileName, Substitutor& Substitutor) { // work-around for #i32420# @@ -400,7 +392,6 @@ void read_ulf_file(const std::string& FileName, Substitutor& Substitutor) throw; } - //Config config(OStringToOUString(FileName.c_str()).getStr()); // end work-around for #i32420# @@ -410,7 +401,6 @@ void read_ulf_file(const std::string& FileName, Substitutor& Substitutor) add_group_entries(config, config.GetGroupName(sal::static_int_cast<USHORT>(i)), Substitutor); } -//########################################### void read_file( const std::string& fname, string_container_t& string_container) @@ -431,7 +421,6 @@ void read_file( } } -//########################################### /** A simple helper function that appens the content of one file to another one */ void concatenate_files(std::ostream& os, std::istream& is) @@ -452,7 +441,6 @@ void concatenate_files(std::ostream& os, std::istream& is) } } -//########################################### bool is_placeholder(const std::string& str) { return ((str.length() > 1) && @@ -460,7 +448,6 @@ bool is_placeholder(const std::string& str) ('%' == str[str.length() - 1])); } -//########################################### void start_language_section( std::ostream_iterator<std::string>& ostream_iter, const iso_lang_identifier& iso_lang) { @@ -477,7 +464,7 @@ void start_language_section( // Esp. for spanish we don't want to distinguish between trad. // and internatinal sorting ( which leads to two different sub languages ) // Setting the sub language to neutral allows us to use one - // stringlist for all spanish variants ( see #123126# ) + // stringlist for all spanish variants if ( ( primLangID == LANG_SPANISH ) && ( subLangID == SUBLANG_SPANISH ) ) subLangID = SUBLANG_NEUTRAL; @@ -493,7 +480,6 @@ void start_language_section( ostream_iter = lang_section; } -//########################################### /** Iterate all languages in the substitutor, replace the all placeholder and append the result to the output file */ @@ -528,7 +514,7 @@ void inflate_rc_template_to_file( iss >> token; substitutor.substitute(token); - // #110274# HACK for partially merged + // HACK for partially merged // *.lng files where some strings have // a particular language that others // don't have in order to keep the @@ -546,7 +532,6 @@ void inflate_rc_template_to_file( } // namespace /* private */ -//#################################################### /* MAIN The file names provided via command line should be absolute or relative to the directory of this module. @@ -603,3 +588,4 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) return 0; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/tools/lngconvex/makefile.mk b/shell/source/tools/lngconvex/makefile.mk index 3ee6298e744f..3ee6298e744f 100644..100755 --- a/shell/source/tools/lngconvex/makefile.mk +++ b/shell/source/tools/lngconvex/makefile.mk diff --git a/shell/source/tools/regsvrex/makefile.mk b/shell/source/tools/regsvrex/makefile.mk index 2eb8dbf48481..2eb8dbf48481 100644..100755 --- a/shell/source/tools/regsvrex/makefile.mk +++ b/shell/source/tools/regsvrex/makefile.mk diff --git a/shell/source/tools/regsvrex/regsvrex.cxx b/shell/source/tools/regsvrex/regsvrex.cxx index 516e386e5e06..907d7e9e055d 100644 --- a/shell/source/tools/regsvrex/regsvrex.cxx +++ b/shell/source/tools/regsvrex/regsvrex.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -89,3 +90,5 @@ int main(int argc, char* argv[]) return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/unix/exec/makefile.mk b/shell/source/unix/exec/makefile.mk index 1a26d377b142..4f07341f4dde 100644..100755 --- a/shell/source/unix/exec/makefile.mk +++ b/shell/source/unix/exec/makefile.mk @@ -46,20 +46,16 @@ DLLPRE= SLOFILES=$(SLO)$/shellexec.obj\ $(SLO)$/shellexecentry.obj - + SHL1OBJS=$(SLOFILES) - + SHL1TARGET=syssh.uno -.IF "$(GUI)" == "OS2" -SHL1IMPLIB=i$(TARGET) -.ELSE SHL1IMPLIB= -.ENDIF SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1DEF=$(MISC)$/$(SHL1TARGET).def DEF1NAME=$(SHL1TARGET) - + SHL1STDLIBS=$(CPPULIB)\ $(CPPUHELPERLIB)\ $(SALLIB) diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx index e6aca26922da..6629983fb410 100644 --- a/shell/source/unix/exec/shellexec.cxx +++ b/shell/source/unix/exec/shellexec.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,9 +34,7 @@ #include <osl/file.hxx> #include <rtl/ustrbuf.hxx> -#ifndef _RTL_URI_H_ #include <rtl/uri.hxx> -#endif #include "shellexec.hxx" #include <com/sun/star/system/SystemShellExecuteFlags.hpp> @@ -82,7 +81,7 @@ namespace // private Sequence< OUString > SAL_CALL ShellExec_getSupportedServiceNames() { Sequence< OUString > aRet(1); - aRet[0] = OUString::createFromAscii("com.sun.star.sys.shell.SystemShellExecute"); + aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sys.shell.SystemShellExecute")); return aRet; } } @@ -94,18 +93,14 @@ 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]; -#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 ); } } //----------------------------------------------------------------------------------------- -// -//----------------------------------------------------------------------------------------- ShellExec::ShellExec( const Reference< XComponentContext >& xContext ) : WeakImplHelper2< XSystemShellExecute, XServiceInfo >(), @@ -130,8 +125,6 @@ ShellExec::ShellExec( const Reference< XComponentContext >& xContext ) : } //------------------------------------------------- -// -//------------------------------------------------- void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aParameter, sal_Int32 nFlags ) throw (IllegalArgumentException, SystemShellExecuteException, RuntimeException) @@ -205,19 +198,6 @@ 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); @@ -283,7 +263,13 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar pDesktopLaunch = NULL; } - OString cmd = aBuffer.makeStringAndClear(); + OString cmd = +#ifdef LINUX + // avoid blocking (call it in background) + OStringBuffer().append( "( " ).append( aBuffer ).append( " ) &" ).makeStringAndClear(); +#else + aBuffer.makeStringAndClear(); +#endif if ( 0 != pclose(popen(cmd.getStr(), "w")) ) { int nerr = errno; @@ -300,7 +286,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar OUString SAL_CALL ShellExec::getImplementationName( ) throw( RuntimeException ) { - return OUString::createFromAscii( SHELLEXEC_IMPL_NAME ); + return OUString(RTL_CONSTASCII_USTRINGPARAM( SHELLEXEC_IMPL_NAME )); } // ------------------------------------------------- @@ -329,3 +315,4 @@ Sequence< OUString > SAL_CALL ShellExec::getSupportedServiceNames( ) return ShellExec_getSupportedServiceNames(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/unix/exec/shellexec.hxx b/shell/source/unix/exec/shellexec.hxx index d7955cc135fd..ebc729886a26 100644 --- a/shell/source/unix/exec/shellexec.hxx +++ b/shell/source/unix/exec/shellexec.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,9 +35,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/uno/XComponentContext.hpp> -#ifndef _COM_SUN_STAR_SYS_SHELL_XSYSTEMSHELLEXECUTE_HPP_ #include <com/sun/star/system/XSystemShellExecute.hpp> -#endif //---------------------------------------------------------- // class declaration @@ -77,3 +76,5 @@ public: void escapeForShell( rtl::OStringBuffer & rBuffer, const rtl::OString & rURL); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/unix/exec/shellexecentry.cxx b/shell/source/unix/exec/shellexecentry.cxx index d1eff582ea59..1abe558bb857 100644 --- a/shell/source/unix/exec/shellexecentry.cxx +++ b/shell/source/unix/exec/shellexecentry.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -55,8 +56,6 @@ using com::sun::star::system::XSystemShellExecute; #define SHELLEXEC_REGKEY_NAME "/com.sun.star.comp.system.SystemShellExecute/UNO/SERVICES/com.sun.star.system.SystemShellExecute" //----------------------------------------------------------------------- -// -//----------------------------------------------------------------------- namespace { @@ -77,7 +76,7 @@ extern "C" // component_getImplementationEnvironment //---------------------------------------------------------------------- -void SAL_CALL component_getImplementationEnvironment( +SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; @@ -87,7 +86,7 @@ void SAL_CALL component_getImplementationEnvironment( // component_getFactory //---------------------------------------------------------------------- -void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* /*pSrvManager*/, uno_Interface* /*pRegistryKey*/ ) +SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* /*pSrvManager*/, uno_Interface* /*pRegistryKey*/ ) { Reference< XSingleComponentFactory > xFactory; @@ -109,3 +108,5 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* / } } // extern "C" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/unix/exec/syssh.component b/shell/source/unix/exec/syssh.component index 030240dff3bf..030240dff3bf 100644..100755 --- a/shell/source/unix/exec/syssh.component +++ b/shell/source/unix/exec/syssh.component diff --git a/shell/source/unix/exec/syssh.xml b/shell/source/unix/exec/syssh.xml index 5c72befa9141..5c72befa9141 100644..100755 --- a/shell/source/unix/exec/syssh.xml +++ b/shell/source/unix/exec/syssh.xml diff --git a/shell/source/unix/exec/urltest.cxx b/shell/source/unix/exec/urltest.cxx index 1de12766e650..e79a321eff36 100644 --- a/shell/source/unix/exec/urltest.cxx +++ b/shell/source/unix/exec/urltest.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -149,3 +150,5 @@ int main(int argc, const char *argv[]) return ret; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/unix/exec/urltest.sh b/shell/source/unix/exec/urltest.sh index ce55ee694114..ce55ee694114 100644..100755 --- a/shell/source/unix/exec/urltest.sh +++ b/shell/source/unix/exec/urltest.sh diff --git a/shell/source/unix/exec/urltest.txt b/shell/source/unix/exec/urltest.txt index e69a8cfaf92b..e69a8cfaf92b 100644..100755 --- a/shell/source/unix/exec/urltest.txt +++ b/shell/source/unix/exec/urltest.txt diff --git a/shell/source/unix/misc/gnome-open-url.c b/shell/source/unix/misc/gnome-open-url.c index 3bd7a61e6546..5fe39ea2dc3a 100644..100755 --- a/shell/source/unix/misc/gnome-open-url.c +++ b/shell/source/unix/misc/gnome-open-url.c @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -46,28 +47,6 @@ typedef enum { GNOME_VFS_OK } GnomeVFSResult; - -/* - * HACK: avoid error messages caused by not setting a GNOME program name - */ - -gchar* gnome_gconf_get_gnome_libs_settings_relative (const gchar *subkey) -{ - void* handle = dlopen("libglib-2.0.so.0", RTLD_LAZY); - - (void)subkey; /* avoid warning due to unused parameter */ - - if( NULL != handle ) - { - gchar* (* g_strdup)(const gchar*) = (gchar* (*)(const gchar*)) dlsym(handle, "g_strdup"); - - if( NULL != g_strdup) - return g_strdup("/apps/gnome-settings/gnome-open-url"); - } - - return NULL; -} - /* * Wrapper function which extracs gnome_url_show from libgnome */ @@ -109,6 +88,7 @@ int main(int argc, char *argv[] ) GError *error = NULL; char *fallback; char *index; + int retcode = -1; if( argc != 2 ) { @@ -136,11 +116,11 @@ int main(int argc, char *argv[] ) args[0] = fallback; args[1] = argv[1]; args[2] = NULL; - return execv(fallback, args); + retcode = execv(fallback, args); } + free(fallback); - return -1; + return retcode; } - - +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/unix/misc/gnome-open-url.sh b/shell/source/unix/misc/gnome-open-url.sh index ab730d169a49..ab730d169a49 100644..100755 --- a/shell/source/unix/misc/gnome-open-url.sh +++ b/shell/source/unix/misc/gnome-open-url.sh diff --git a/shell/source/unix/misc/makefile.mk b/shell/source/unix/misc/makefile.mk index 67fcc708c615..be4660db3e8c 100644..100755 --- a/shell/source/unix/misc/makefile.mk +++ b/shell/source/unix/misc/makefile.mk @@ -47,28 +47,12 @@ SCRIPTFILES = \ $(BIN)$/gnome-open-url \ $(BIN)$/kde-open-url -.IF "$(GUI)" == "OS2" - -APP1TARGET = open-url -APP1OBJS = \ - $(OBJ)$/open-url.obj \ - open-url.def -APP1LIBS = - -APP2TARGET = senddoc -APP2OBJS = \ - $(OBJ)$/senddoc.obj \ - senddoc.def -APP2LIBS = -APP2STDLIBS = - -.ELSE - APP1TARGET = gnome-open-url.bin APP1OBJS = \ $(OBJ)$/gnome-open-url.obj APP1LIBS = -.IF "$(OS)"!="FREEBSD" && "$(OS)"!="NETBSD" +.IF "$(OS)"!="FREEBSD" && "$(OS)"!="NETBSD" && "$(OS)"!="OPENBSD" && \ + "$(OS)"!="DRAGONFLY" APP1STDLIBS=-ldl .ENDIF @@ -78,7 +62,6 @@ APP2LIBS = APP2STDLIBS = OBJFILES = $(APP1OBJS) $(APP2OBJS) -.ENDIF # --- Targets ------------------------------------------------------ diff --git a/shell/source/unix/misc/open-url.c b/shell/source/unix/misc/open-url.c index 91f4aeaff398..7d7230f040ff 100644..100755 --- a/shell/source/unix/misc/open-url.c +++ b/shell/source/unix/misc/open-url.c @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -170,3 +171,4 @@ int main(int argc, char *argv[] ) return 0; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/unix/misc/open-url.def b/shell/source/unix/misc/open-url.def index 3a26831e2a65..3a26831e2a65 100644..100755 --- a/shell/source/unix/misc/open-url.def +++ b/shell/source/unix/misc/open-url.def diff --git a/shell/source/unix/misc/senddoc.c b/shell/source/unix/misc/senddoc.c index 5a21ef1ec50f..46f5ff825f0b 100644..100755 --- a/shell/source/unix/misc/senddoc.c +++ b/shell/source/unix/misc/senddoc.c @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -202,3 +203,4 @@ int main(int argc, char *argv[] ) return 0; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/unix/misc/senddoc.def b/shell/source/unix/misc/senddoc.def index 0abf1553a4a9..0abf1553a4a9 100644..100755 --- a/shell/source/unix/misc/senddoc.def +++ b/shell/source/unix/misc/senddoc.def diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh index 3d2690379134..9d63ae3df63b 100644..100755 --- a/shell/source/unix/misc/senddoc.sh +++ b/shell/source/unix/misc/senddoc.sh @@ -1,15 +1,22 @@ #!/bin/sh URI_ENCODE="`dirname $0`/uri-encode" FOPTS="" +sd_platform=`uname -s` # linux file utility needs -L option to resolve symlinks -if [ "`uname -s`" = "Linux" ] -then +if [ "$sd_platform" = "Linux" ] ; then FOPTS="-L" fi # do not confuse the system mail clients with OOo and Java libraries -unset LD_LIBRARY_PATH +case $sd_platform in + AIX) + unset LIBPATH + ;; + *) + unset LD_LIBRARY_PATH + ;; +esac # tries to locate the executable specified # as first parameter in the user's path. diff --git a/shell/source/unix/misc/uri-encode.c b/shell/source/unix/misc/uri-encode.c index e93bd61e6675..97ebc4c33755 100644..100755 --- a/shell/source/unix/misc/uri-encode.c +++ b/shell/source/unix/misc/uri-encode.c @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -48,3 +49,5 @@ int main() { } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/unix/sysshell/makefile.mk b/shell/source/unix/sysshell/makefile.mk index 3d8a55d4377f..80cca7ccd298 100644..100755 --- a/shell/source/unix/sysshell/makefile.mk +++ b/shell/source/unix/sysshell/makefile.mk @@ -42,20 +42,12 @@ CFLAGS+=-DSYSTEM_EXPAT # --- Files -------------------------------------------------------- -.IF "$(OS)" != "MACOSX" +.IF "$(OS)" != "MACOSX" && "$(OS)" != "IOS" && "$(OS)" != "ANDROID" SLOFILES=$(SLO)$/recently_used_file.obj \ $(SLO)$/recently_used_file_handler.obj SHL1TARGET=recentfile -.IF "$(GUI)" == "OS2" -SHL1IMPLIB=i$(TARGET) -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -DEF1NAME= $(SHL1TARGET) - -.ELSE -#SHL1IMPLIB= -.ENDIF SHL1STDLIBS=$(EXPATASCII3RDLIB)\ $(SALLIB) @@ -67,9 +59,9 @@ SHL1VERSIONMAP=recfile.map .ELSE dummy: - @echo "Nothing to build for MACOSX" + @echo "Nothing to build for $(OS)" -.ENDIF # MACOSX +.ENDIF # --- Targets ------------------------------------------------------ .INCLUDE : target.mk diff --git a/shell/source/unix/sysshell/recently_used_file.cxx b/shell/source/unix/sysshell/recently_used_file.cxx index 8a9de90c8b16..3f6f7b4d398a 100644 --- a/shell/source/unix/sysshell/recently_used_file.cxx +++ b/shell/source/unix/sysshell/recently_used_file.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,8 +44,8 @@ #include <unistd.h> -const rtl::OUString RECENTLY_USED_FILE_NAME = rtl::OUString::createFromAscii(".recently-used"); -const rtl::OUString SLASH = rtl::OUString::createFromAscii("/"); +const rtl::OUString RECENTLY_USED_FILE_NAME(RTL_CONSTASCII_USTRINGPARAM(".recently-used")); +const rtl::OUString SLASH(RTL_CONSTASCII_USTRINGPARAM("/")); namespace /* private */ { @@ -145,3 +146,4 @@ bool recently_used_file::eof() const +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/unix/sysshell/recently_used_file.hxx b/shell/source/unix/sysshell/recently_used_file.hxx index 346541a7efda..da2c1865e9b3 100644 --- a/shell/source/unix/sysshell/recently_used_file.hxx +++ b/shell/source/unix/sysshell/recently_used_file.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,7 +32,6 @@ #include <stdio.h> #include <unistd.h> -//################################## // simple wrapper around the recently_used_file class recently_used_file @@ -66,3 +66,5 @@ private: }; #endif // INCLUDED_RECENTLY_USED_FILE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/unix/sysshell/recently_used_file_handler.cxx b/shell/source/unix/sysshell/recently_used_file_handler.cxx index b124d03b589c..262cc34eb647 100644 --- a/shell/source/unix/sysshell/recently_used_file_handler.cxx +++ b/shell/source/unix/sysshell/recently_used_file_handler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -46,7 +47,6 @@ #include <string.h> namespace /* private */ { - //######################################## typedef std::vector<string_t> string_container_t; #define TAG_RECENT_FILES "RecentFiles" @@ -218,11 +218,9 @@ namespace /* private */ { typedef std::vector<recently_used_item*> recently_used_item_list_t; typedef void (recently_used_item::* SET_COMMAND)(const string_t&); - //######################################## // thrown if we encounter xml tags that we do not know class unknown_xml_format_exception {}; - //######################################## class recently_used_file_filter : public i_xml_parser_event_handler { public: @@ -395,8 +393,8 @@ namespace /* private */ { uri_(uri) {} - bool operator() (const recently_used_item* item) - { return (item->uri_ == uri_); } + bool operator() (const recently_used_item* item) const + { return (item->uri_ == uri_); } private: string_t uri_; }; @@ -474,7 +472,6 @@ namespace /* private */ { } // namespace private -//########################################### /* example (see http::www.freedesktop.org): <?xml version="1.0"?> @@ -512,15 +509,17 @@ extern "C" void add_to_recently_used_file_list(const rtl::OUString& file_url, co } catch(const char* ex) { - OSL_ENSURE(false, ex); + OSL_FAIL(ex); } catch(const xml_parser_exception&) { - OSL_ENSURE(false, "XML parser error"); + OSL_FAIL("XML parser error"); } catch(const unknown_xml_format_exception&) { - OSL_ENSURE(false, "XML format unknown"); + OSL_FAIL("XML format unknown"); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx index 7264afaac109..c5ef891911bb 100644 --- a/shell/source/win32/SysShExec.cxx +++ b/shell/source/win32/SysShExec.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,10 +35,9 @@ #include <osl/diagnose.h> #include "SysShExec.hxx" #include <osl/file.hxx> +#include <sal/macros.h> -#ifndef _COM_SUN_STAR_SYS_SHELL_SYSTEMSHELLEXECUTEFLAGS_HPP_ #include <com/sun/star/system/SystemShellExecuteFlags.hpp> -#endif #define WIN32_LEAN_AND_MEAN #if defined _MSC_VER @@ -84,7 +84,7 @@ namespace // private Sequence< OUString > SAL_CALL SysShExec_getSupportedServiceNames() { Sequence< OUString > aRet(1); - aRet[0] = OUString::createFromAscii("com.sun.star.sys.shell.SystemShellExecute"); + aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sys.shell.SystemShellExecute")); return aRet; } @@ -146,7 +146,7 @@ namespace // private }; /* size of the table */ - #define ERRTABLESIZE (sizeof(errtable)/sizeof(errtable[0])) + #define ERRTABLESIZE (SAL_N_ELEMENTS(errtable)) /* The following two constants must be the minimum and maximum values in the (contiguous) range of osl_File_E_xec Failure errors. */ @@ -189,7 +189,6 @@ namespace // private #define E_UNKNOWN_EXEC_ERROR -1 //----------------------------------------- - //----------------------------------------- bool is_system_path(const OUString& path_or_uri) { @@ -202,8 +201,8 @@ namespace // private // trying to identify a jump mark //----------------------------------------- - const OUString JUMP_MARK_HTM = OUString::createFromAscii(".htm#"); - const OUString JUMP_MARK_HTML = OUString::createFromAscii(".html#"); + const OUString JUMP_MARK_HTM(RTL_CONSTASCII_USTRINGPARAM(".htm#")); + const OUString JUMP_MARK_HTML(RTL_CONSTASCII_USTRINGPARAM(".html#")); const sal_Unicode HASH_MARK = (sal_Unicode)'#'; bool has_jump_mark(const OUString& system_path, sal_Int32* jmp_mark_start = NULL) @@ -219,7 +218,6 @@ namespace // private } //----------------------------------------- - //----------------------------------------- bool is_existing_file(const OUString& file_name) { @@ -261,8 +259,6 @@ namespace // private } // end namespace //----------------------------------------------------------------------------------------- -// -//----------------------------------------------------------------------------------------- CSysShExec::CSysShExec( ) : WeakComponentImplHelper2< XSystemShellExecute, XServiceInfo >( m_aMutex ) @@ -279,8 +275,6 @@ CSysShExec::CSysShExec( ) : } //------------------------------------------------- -// -//------------------------------------------------- void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aParameter, sal_Int32 nFlags ) throw (IllegalArgumentException, SystemShellExecuteException, RuntimeException) @@ -288,13 +282,13 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa // parameter checking if (0 == aCommand.getLength()) throw IllegalArgumentException( - OUString::createFromAscii( "Empty command" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Empty command")), static_cast< XSystemShellExecute* >( this ), 1 ); if (!(nFlags >= DEFAULTS && nFlags <= NO_SYSTEM_ERROR_MESSAGE)) throw IllegalArgumentException( - OUString::createFromAscii( "Invalid Flags specified" ), + OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid Flags specified")), static_cast< XSystemShellExecute* >( this ), 3 ); @@ -344,7 +338,7 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa psxErr = MapError(psxErr); throw SystemShellExecuteException( - OUString::createFromAscii("Error executing command"), + OUString(RTL_CONSTASCII_USTRINGPARAM("Error executing command")), static_cast< XSystemShellExecute* >(this), psxErr); } @@ -357,7 +351,7 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa OUString SAL_CALL CSysShExec::getImplementationName( ) throw( RuntimeException ) { - return OUString::createFromAscii( SYSSHEXEC_IMPL_NAME ); + return OUString(RTL_CONSTASCII_USTRINGPARAM( SYSSHEXEC_IMPL_NAME )); } // ------------------------------------------------- @@ -386,3 +380,4 @@ Sequence< OUString > SAL_CALL CSysShExec::getSupportedServiceNames( ) return SysShExec_getSupportedServiceNames(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/SysShExec.hxx b/shell/source/win32/SysShExec.hxx index b4d5f18b7899..84b9a746d076 100644 --- a/shell/source/win32/SysShExec.hxx +++ b/shell/source/win32/SysShExec.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,9 +37,7 @@ #include <osl/mutex.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> -#ifndef _COM_SUN_STAR_SYS_SHELL_XSYSTEMSHELLEXECUTE_HPP_ #include <com/sun/star/system/XSystemShellExecute.hpp> -#endif //---------------------------------------------------------- // class declaration @@ -81,3 +80,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/SysShentry.cxx b/shell/source/win32/SysShentry.cxx index 727cfe269f07..a0ef37868bb2 100644 --- a/shell/source/win32/SysShentry.cxx +++ b/shell/source/win32/SysShentry.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -57,8 +58,6 @@ using com::sun::star::system::XSystemShellExecute; #define SYSSHEXEC_REGKEY_NAME "/com.sun.star.system.SystemShellExecute/UNO/SERVICES/com.sun.star.system.SystemShellExecute" //----------------------------------------------------------------------- -// -//----------------------------------------------------------------------- namespace { @@ -69,7 +68,7 @@ namespace } //----------------------------------------------------------------------- -// the 3 important functions which will be exported +// the 2 important functions which will be exported //----------------------------------------------------------------------- extern "C" @@ -79,7 +78,7 @@ extern "C" // component_getImplementationEnvironment //---------------------------------------------------------------------- -void SAL_CALL component_getImplementationEnvironment( +SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ":affine"; @@ -90,14 +89,14 @@ void SAL_CALL component_getImplementationEnvironment( // returns a factory to create XFilePicker-Services //---------------------------------------------------------------------- -void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* /*pRegistryKey*/ ) +SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* /*pRegistryKey*/ ) { void* pRet = 0; if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, SYSSHEXEC_IMPL_NAME ) ) ) { Sequence< OUString > aSNS( 1 ); - aSNS.getArray( )[0] = OUString::createFromAscii( SYSSHEXEC_SERVICE_NAME ); + aSNS.getArray( )[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( SYSSHEXEC_SERVICE_NAME )); Reference< XSingleServiceFactory > xFactory ( createOneInstanceFactory( reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ), @@ -115,3 +114,5 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* p } } // extern "C" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/exports.dxp b/shell/source/win32/exports.dxp index f0e1c69934bc..f0e1c69934bc 100644..100755 --- a/shell/source/win32/exports.dxp +++ b/shell/source/win32/exports.dxp diff --git a/shell/source/win32/makefile.mk b/shell/source/win32/makefile.mk index 7a01eefed89e..7a01eefed89e 100644..100755 --- a/shell/source/win32/makefile.mk +++ b/shell/source/win32/makefile.mk diff --git a/shell/source/win32/shlxthandler/classfactory.cxx b/shell/source/win32/shlxthandler/classfactory.cxx index e19dd68383b4..7234b2eca495 100755..100644 --- a/shell/source/win32/shlxthandler/classfactory.cxx +++ b/shell/source/win32/shlxthandler/classfactory.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,6 +28,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_shell.hxx" + +#include <osl/diagnose.h> + #include "internal/global.hxx" #include "classfactory.hxx" #include "internal/infotips.hxx" @@ -41,14 +45,10 @@ using ::std::min; #include "internal/shlxthdl.hxx" //----------------------------- -// -//----------------------------- long CClassFactory::s_ServerLocks = 0; //----------------------------- -// -//----------------------------- CClassFactory::CClassFactory(const CLSID& clsid) : m_RefCnt(1), @@ -58,8 +58,6 @@ CClassFactory::CClassFactory(const CLSID& clsid) : } //----------------------------- -// -//----------------------------- CClassFactory::~CClassFactory() { @@ -86,8 +84,6 @@ HRESULT STDMETHODCALLTYPE CClassFactory::QueryInterface(REFIID riid, void __RPC_ } //----------------------------- -// -//----------------------------- ULONG STDMETHODCALLTYPE CClassFactory::AddRef(void) { @@ -95,8 +91,6 @@ ULONG STDMETHODCALLTYPE CClassFactory::AddRef(void) } //----------------------------- -// -//----------------------------- ULONG STDMETHODCALLTYPE CClassFactory::Release(void) { @@ -134,7 +128,7 @@ HRESULT STDMETHODCALLTYPE CClassFactory::CreateInstance( else if (CLSID_THUMBVIEWER_HANDLER == m_Clsid) pUnk = static_cast<IExtractImage*>(new CThumbviewer()); - POST_CONDITION(pUnk != 0, "Could not create COM object"); + OSL_POSTCOND(pUnk != 0, "Could not create COM object"); if (0 == pUnk) return E_OUTOFMEMORY; @@ -148,8 +142,6 @@ HRESULT STDMETHODCALLTYPE CClassFactory::CreateInstance( } //----------------------------- -// -//----------------------------- HRESULT STDMETHODCALLTYPE CClassFactory::LockServer(BOOL fLock) { @@ -162,10 +154,10 @@ HRESULT STDMETHODCALLTYPE CClassFactory::LockServer(BOOL fLock) } //----------------------------- -// -//----------------------------- bool CClassFactory::IsLocked() { return (s_ServerLocks > 0); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/shlxthandler/classfactory.hxx b/shell/source/win32/shlxthandler/classfactory.hxx index f0a8b84ae6ee..a57af8b7bab1 100644 --- a/shell/source/win32/shlxthandler/classfactory.hxx +++ b/shell/source/win32/shlxthandler/classfactory.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,3 +76,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/shlxthandler/columninfo/columninfo.cxx b/shell/source/win32/shlxthandler/columninfo/columninfo.cxx index ab6c8bae2922..80f98b5a3119 100755..100644 --- a/shell/source/win32/shlxthandler/columninfo/columninfo.cxx +++ b/shell/source/win32/shlxthandler/columninfo/columninfo.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,11 +35,10 @@ #include "internal/utilities.hxx" #include "internal/config.hxx" +#include <sal/macros.h> #include <malloc.h> //---------------------------- -// -//---------------------------- namespace /* private */ { @@ -52,12 +52,10 @@ namespace /* private */ {{PSGUID_SUMMARYINFORMATION, PIDSI_PAGECOUNT},VT_BSTR, LVCFMT_LEFT, 30, SHCOLSTATE_TYPE_STR, L"Pagecount", L"Pagecount"} }; - size_t ColumnInfoTableSize = sizeof(ColumnInfoTable)/sizeof(ColumnInfoTable[0]); + size_t ColumnInfoTableSize = SAL_N_ELEMENTS(ColumnInfoTable); } //---------------------------- -// -//---------------------------- CColumnInfo::CColumnInfo(long RefCnt) : m_RefCnt(RefCnt) @@ -66,8 +64,6 @@ CColumnInfo::CColumnInfo(long RefCnt) : } //---------------------------- -// -//---------------------------- CColumnInfo::~CColumnInfo() { @@ -94,8 +90,6 @@ HRESULT STDMETHODCALLTYPE CColumnInfo::QueryInterface(REFIID riid, void __RPC_FA } //---------------------------- -// -//---------------------------- ULONG STDMETHODCALLTYPE CColumnInfo::AddRef(void) { @@ -103,8 +97,6 @@ ULONG STDMETHODCALLTYPE CColumnInfo::AddRef(void) } //---------------------------- -// -//---------------------------- ULONG STDMETHODCALLTYPE CColumnInfo::Release( void) { @@ -143,14 +135,11 @@ HRESULT STDMETHODCALLTYPE CColumnInfo::GetColumnInfo(DWORD dwIndex, SHCOLUMNINFO ZeroMemory(psci->wszTitle, sizeof(psci->wszTitle)); wcsncpy(psci->wszTitle, ColumnInfoTable[dwIndex].wszTitle, (sizeof(psci->wszTitle) - 1)); - //wcscpy(psci->wszTitle, ColumnInfoTable[dwIndex].wszTitle); return S_OK; } //----------------------------- -// -//----------------------------- HRESULT STDMETHODCALLTYPE CColumnInfo::GetItemData(LPCSHCOLUMNID pscid, LPCSHCOLUMNDATA pscd, VARIANT *pvarData) { @@ -217,8 +206,6 @@ HRESULT STDMETHODCALLTYPE CColumnInfo::GetItemData(LPCSHCOLUMNID pscid, LPCSHCOL } //----------------------------- -// -//----------------------------- bool CColumnInfo::IsOOFileExtension(wchar_t* Extension) const { @@ -230,3 +217,5 @@ bool CColumnInfo::IsOOFileExtension(wchar_t* Extension) const return false; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/shlxthandler/columninfo/makefile.mk b/shell/source/win32/shlxthandler/columninfo/makefile.mk index 868a711e005c..868a711e005c 100644..100755 --- a/shell/source/win32/shlxthandler/columninfo/makefile.mk +++ b/shell/source/win32/shlxthandler/columninfo/makefile.mk diff --git a/shell/source/win32/shlxthandler/exports.dxp b/shell/source/win32/shlxthandler/exports.dxp index 953039ccc957..953039ccc957 100644..100755 --- a/shell/source/win32/shlxthandler/exports.dxp +++ b/shell/source/win32/shlxthandler/exports.dxp diff --git a/shell/source/win32/shlxthandler/infotips/infotips.cxx b/shell/source/win32/shlxthandler/infotips/infotips.cxx index c6bf925ac6a9..8c6d701b6e25 100755..100644 --- a/shell/source/win32/shlxthandler/infotips/infotips.cxx +++ b/shell/source/win32/shlxthandler/infotips/infotips.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -49,8 +50,6 @@ const std::wstring WSPACE = std::wstring(SPACE); //----------------------------- -// -//----------------------------- CInfoTip::CInfoTip(long RefCnt) : m_RefCnt(RefCnt) @@ -60,8 +59,6 @@ CInfoTip::CInfoTip(long RefCnt) : } //----------------------------- -// -//----------------------------- CInfoTip::~CInfoTip() { @@ -97,8 +94,6 @@ HRESULT STDMETHODCALLTYPE CInfoTip::QueryInterface(REFIID riid, void __RPC_FAR * } //---------------------------- -// -//---------------------------- ULONG STDMETHODCALLTYPE CInfoTip::AddRef(void) { @@ -106,8 +101,6 @@ ULONG STDMETHODCALLTYPE CInfoTip::AddRef(void) } //---------------------------- -// -//---------------------------- ULONG STDMETHODCALLTYPE CInfoTip::Release( void) { @@ -284,7 +277,6 @@ HRESULT STDMETHODCALLTYPE CInfoTip::GetInfoTip(DWORD /*dwFlags*/, wchar_t** ppws } catch (const std::exception&) { - //return E_FAIL; } //display file size, no matter other infomation is loaded successfully or not. @@ -320,8 +312,6 @@ HRESULT STDMETHODCALLTYPE CInfoTip::GetInfoTip(DWORD /*dwFlags*/, wchar_t** ppws } //---------------------------- -// -//---------------------------- HRESULT STDMETHODCALLTYPE CInfoTip::GetInfoFlags(DWORD * /*pdwFlags*/ ) { @@ -357,7 +347,6 @@ HRESULT STDMETHODCALLTYPE CInfoTip::Load(LPCOLESTR pszFileName, DWORD /*dwMode*/ std::string fnameA = WStringToString(fname); - // #115531# // ZeroMemory because strncpy doesn't '\0'-terminates the destination // string; reserve the last place in the buffer for the final '\0' // that's why '(sizeof(m_szFileName) - 1)' @@ -368,8 +357,6 @@ HRESULT STDMETHODCALLTYPE CInfoTip::Load(LPCOLESTR pszFileName, DWORD /*dwMode*/ } //---------------------------- -// -//---------------------------- HRESULT STDMETHODCALLTYPE CInfoTip::IsDirty(void) { @@ -377,8 +364,6 @@ HRESULT STDMETHODCALLTYPE CInfoTip::IsDirty(void) } //---------------------------- -// -//---------------------------- HRESULT STDMETHODCALLTYPE CInfoTip::Save(LPCOLESTR /*pszFileName*/, BOOL /*fRemember*/) { @@ -386,8 +371,6 @@ HRESULT STDMETHODCALLTYPE CInfoTip::Save(LPCOLESTR /*pszFileName*/, BOOL /*fReme } //---------------------------- -// -//---------------------------- HRESULT STDMETHODCALLTYPE CInfoTip::SaveCompleted(LPCOLESTR /*pszFileName*/) { @@ -395,10 +378,10 @@ HRESULT STDMETHODCALLTYPE CInfoTip::SaveCompleted(LPCOLESTR /*pszFileName*/) } //---------------------------- -// -//---------------------------- HRESULT STDMETHODCALLTYPE CInfoTip::GetCurFile(LPOLESTR __RPC_FAR * /*ppszFileName*/) { return E_NOTIMPL; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/shlxthandler/infotips/makefile.mk b/shell/source/win32/shlxthandler/infotips/makefile.mk index f69f2cf2fd78..f69f2cf2fd78 100644..100755 --- a/shell/source/win32/shlxthandler/infotips/makefile.mk +++ b/shell/source/win32/shlxthandler/infotips/makefile.mk diff --git a/shell/source/win32/shlxthandler/makefile.mk b/shell/source/win32/shlxthandler/makefile.mk index b6c9a45a9515..fdaa1c43d92c 100644..100755 --- a/shell/source/win32/shlxthandler/makefile.mk +++ b/shell/source/win32/shlxthandler/makefile.mk @@ -35,7 +35,7 @@ USE_DEFFILE=TRUE USE_DEFFILE_X64=TRUE .ENDIF NO_DEFAULT_STL=TRUE -USE_STLP_DEBUG= +USE_DEBUG_RUNTIME= # --- Settings ----------------------------------------------------- diff --git a/shell/source/win32/shlxthandler/ooofilt/exports.dxp b/shell/source/win32/shlxthandler/ooofilt/exports.dxp index 953039ccc957..953039ccc957 100644..100755 --- a/shell/source/win32/shlxthandler/ooofilt/exports.dxp +++ b/shell/source/win32/shlxthandler/ooofilt/exports.dxp diff --git a/shell/source/win32/shlxthandler/ooofilt/makefile.mk b/shell/source/win32/shlxthandler/ooofilt/makefile.mk index 9111069ab889..fd1bc503cc33 100644..100755 --- a/shell/source/win32/shlxthandler/ooofilt/makefile.mk +++ b/shell/source/win32/shlxthandler/ooofilt/makefile.mk @@ -32,9 +32,6 @@ LIBTARGET=NO ENABLE_EXCEPTIONS=TRUE USE_DEFFILE=TRUE -# Do not use the dynamic STLport library. -NO_DEFAULT_STL=YES - # Do not use the uwinapi library UWINAPILIB= @@ -46,7 +43,6 @@ UWINAPILIB= CFLAGS+=-DISOLATION_AWARE_ENABLED -DWIN32_LEAN_AND_MEAN -DXML_UNICODE -D_NTSDK -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0501 CFLAGS+=-wd4710 -wd4711 -wd4514 -wd4619 -wd4217 -wd4820 CDEFS+=-D_WIN32_IE=0x501 -# SCPCDEFS+=-D_STLP_USE_STATIC_LIB # --- Files -------------------------------------------------------- @@ -54,9 +50,6 @@ SLOFILES=$(SLO)$/ooofilt.obj\ $(SLO)$/propspec.obj\ $(SLO)$/stream_helper.obj -# $(SLO)$/utilities.obj -# $(SLO)$/dbgmacros.obj - SHL1TARGET=$(TARGET) .IF "$(COM)"=="GCC" SHL1STDLIBS=$(ZLIB3RDLIB) $(EXPAT3RDLIB) @@ -84,8 +77,6 @@ SHL1STDLIBS+=msvcrt.lib .ENDIF -# $(LIBSTLPORTST) - SHL1LIBS+=$(SLB)$/util.lib\ $(SLB)$/ooofilereader.lib diff --git a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx index 30151fc5dd75..91c7592ac3de 100755..100644 --- a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx +++ b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,27 +31,20 @@ //-------------------------------------------------------------------------- // File: ooofilt.cxx -// // Contents: Filter Implementation for OpenOffice.Org Document using // Indexing Service -// // Summary: The OpenOffice.org filter reads OpenOffice.org files (with the // extension .sxw .sxi, etc) and extract their content, author, // keywords,subject,comments and title to be filtered. -// // Platform: Windows 2000, Windows XP -// //-------------------------------------------------------------------------- #include "internal/contentreader.hxx" #include "internal/metainforeader.hxx" -//#include "internal/utilities.hxx" #include "internal/registry.hxx" #include "internal/fileextensions.hxx" //-------------------------------------------------------------------------- -// // Include file Purpose -// // windows.h Win32 declarations // string.h string wstring declarations // filter.h IFilter interface declarations @@ -59,7 +53,6 @@ // assert.h assertion function. // ooofilt.hxx OpenOffice.org filter declarations // propspec.hxx PROPSPEC -// //-------------------------------------------------------------------------- #if defined _MSC_VER @@ -86,22 +79,14 @@ using ::std::min; #include "internal/stream_helper.hxx" //C------------------------------------------------------------------------- -// // Class: COooFilter -// // Summary: Implements OpenOffice.org filter class -// //-------------------------------------------------------------------------- //M------------------------------------------------------------------------- -// // Method: COooFilter::COooFilter -// // Summary: Class constructor -// // Arguments: void -// // Purpose: Manages global instance count -// //-------------------------------------------------------------------------- COooFilter::COooFilter() : m_lRefs(1), @@ -124,15 +109,10 @@ COooFilter::COooFilter() : InterlockedIncrement( &g_lInstances ); } //M------------------------------------------------------------------------- -// // Method: COooFilter::~COooFilter -// // Summary: Class destructor -// // Arguments: void -// // Purpose: Manages global instance count and file handle -// //-------------------------------------------------------------------------- COooFilter::~COooFilter() { @@ -147,21 +127,16 @@ COooFilter::~COooFilter() } //M------------------------------------------------------------------------- -// // Method: COooFilter::QueryInterface (IUnknown::QueryInterface) -// // Summary: Queries for requested interface -// // Arguments: riid // [in] Reference IID of requested interface // ppvObject // [out] Address that receives requested interface pointer -// // Returns: S_OK // Interface is supported // E_NOINTERFACE // Interface is not supported -// //-------------------------------------------------------------------------- SCODE STDMETHODCALLTYPE COooFilter::QueryInterface( REFIID riid, @@ -188,30 +163,20 @@ SCODE STDMETHODCALLTYPE COooFilter::QueryInterface( return S_OK; } //M------------------------------------------------------------------------- -// // Method: COooFilter::AddRef (IUnknown::AddRef) -// // Summary: Increments interface refcount -// // Arguments: void -// // Returns: Value of incremented interface refcount -// //-------------------------------------------------------------------------- ULONG STDMETHODCALLTYPE COooFilter::AddRef() { return InterlockedIncrement( &m_lRefs ); } //M------------------------------------------------------------------------- -// // Method: COooFilter::Release (IUnknown::Release) -// // Summary: Decrements interface refcount, deleting if unreferenced -// // Arguments: void -// // Returns: Value of decremented interface refcount -// //-------------------------------------------------------------------------- ULONG STDMETHODCALLTYPE COooFilter::Release() { @@ -222,11 +187,8 @@ ULONG STDMETHODCALLTYPE COooFilter::Release() return ulTmp; } //M------------------------------------------------------------------------- -// // Method: COooFilter::Init (IFilter::Init) -// // Summary: Initializes OpenOffice.org filter instance -// // Arguments: grfFlags // [in] Flags for filter behavior // cAttributes @@ -235,7 +197,6 @@ ULONG STDMETHODCALLTYPE COooFilter::Release() // [in] Array of requested attribute strings // pFlags // [out] Pointer to return flags for additional properties -// // Returns: S_OK // Initialization succeeded // E_FAIL @@ -246,7 +207,6 @@ ULONG STDMETHODCALLTYPE COooFilter::Release() // Unable to access file to be filtered // FILTER_E_PASSWORD // (not implemented) -// //-------------------------------------------------------------------------- const int COUNT_ATTRIBUTES = 5; @@ -339,11 +299,8 @@ SCODE STDMETHODCALLTYPE COooFilter::Init( return S_OK; } //M------------------------------------------------------------------------- -// // Method: COooFilter::GetChunk (IFilter::GetChunk) -// // Summary: Gets the next chunk -// // Arguments: ppStat // [out] Pointer to description of current chunk // Returns: S_OK @@ -360,7 +317,6 @@ SCODE STDMETHODCALLTYPE COooFilter::Init( // (not implemented) // FILTER_E_PASSWORD // (not implemented) -// //-------------------------------------------------------------------------- SCODE STDMETHODCALLTYPE COooFilter::GetChunk(STAT_CHUNK * pStat) { @@ -445,24 +401,19 @@ SCODE STDMETHODCALLTYPE COooFilter::GetChunk(STAT_CHUNK * pStat) }//for(;;) } //M------------------------------------------------------------------------- -// // Method: COooFilter::GetText (IFilter::GetText) -// // Summary: Retrieves UNICODE text for index -// // Arguments: pcwcBuffer // [in] Pointer to size of UNICODE buffer // [out] Pointer to count of UNICODE characters returned // awcBuffer // [out] Pointer to buffer to receive UNICODE text -// // Returns: S_OK // Text successfully retrieved, but text remains in chunk // FILTER_E_NO_MORE_TEXT // All of the text in the current chunk has been returned // FILTER_S_LAST_TEXT // Next call to GetText will return FILTER_E_NO_MORE_TEXT -// //-------------------------------------------------------------------------- SCODE STDMETHODCALLTYPE COooFilter::GetText(ULONG * pcwcBuffer, WCHAR * awcBuffer) { @@ -496,17 +447,12 @@ SCODE STDMETHODCALLTYPE COooFilter::GetText(ULONG * pcwcBuffer, WCHAR * awcBuffe } } //M------------------------------------------------------------------------- -// // Method: GetMetaInfoNameFromPropertyId -// // Summary: helper function to convert PropertyID into respective // MetaInfo names. -// // Arguments: ulPropID // [in] property ID -// // Returns: corresponding metainfo names. -// //-------------------------------------------------------------------------- ::std::wstring GetMetaInfoNameFromPropertyId( ULONG ulPropID ) @@ -522,19 +468,14 @@ SCODE STDMETHODCALLTYPE COooFilter::GetText(ULONG * pcwcBuffer, WCHAR * awcBuffe } } //M------------------------------------------------------------------------- -// // Method: COooFilter::GetValue (IFilter::GetValue) -// // Summary: Retrieves properites for index -// // Arguments: ppPropValue // [out] Address that receives pointer to property value -// // Returns: FILTER_E_NO_VALUES // Always // FILTER_E_NO_MORE_VALUES // (not implemented) -// //-------------------------------------------------------------------------- SCODE STDMETHODCALLTYPE COooFilter::GetValue(PROPVARIANT ** ppPropValue) @@ -569,23 +510,18 @@ SCODE STDMETHODCALLTYPE COooFilter::GetValue(PROPVARIANT ** ppPropValue) return E_FAIL; } //M------------------------------------------------------------------------- -// // Method: COooFilter::BindRegion (IFilter::BindRegion) -// // Summary: Creates moniker or other interface for indicated text -// // Arguments: origPos // [in] Description of text location and extent // riid // [in] Reference IID of specified interface // ppunk // [out] Address that receives requested interface pointer -// // Returns: E_NOTIMPL // Always // FILTER_W_REGION_CLIPPED // (not implemented) -// //-------------------------------------------------------------------------- SCODE STDMETHODCALLTYPE COooFilter::BindRegion( @@ -597,14 +533,10 @@ SCODE STDMETHODCALLTYPE COooFilter::BindRegion( return E_NOTIMPL; } //M------------------------------------------------------------------------- -// // Method: COooFilter::GetClassID (IPersist::GetClassID) -// // Summary: Retrieves the class id of the filter class -// // Arguments: pClassID // [out] Pointer to the class ID of the filter -// // Returns: S_OK // Always // E_FAIL @@ -616,18 +548,13 @@ SCODE STDMETHODCALLTYPE COooFilter::GetClassID(CLSID * pClassID) return S_OK; } //M------------------------------------------------------------------------- -// // Method: COooFilter::IsDirty (IPersistFile::IsDirty) -// // Summary: Checks whether file has changed since last save -// // Arguments: void -// // Returns: S_FALSE // Always // S_OK // (not implemented) -// //-------------------------------------------------------------------------- SCODE STDMETHODCALLTYPE COooFilter::IsDirty() { @@ -635,24 +562,19 @@ SCODE STDMETHODCALLTYPE COooFilter::IsDirty() return S_FALSE; } //M------------------------------------------------------------------------- -// // Method: COooFilter::Load (IPersistFile::Load) -// // Summary: Opens and initializes the specified file -// // Arguments: pszFileName // [in] Pointer to zero-terminated string // of absolute path of file to open // dwMode // [in] Access mode to open the file -// // Returns: S_OK // File was successfully loaded // E_OUTOFMEMORY // File could not be loaded due to insufficient memory // E_FAIL // (not implemented) -// //-------------------------------------------------------------------------- SCODE STDMETHODCALLTYPE COooFilter::Load(LPCWSTR pszFileName, DWORD /*dwMode*/) { @@ -677,22 +599,17 @@ SCODE STDMETHODCALLTYPE COooFilter::Load(LPCWSTR pszFileName, DWORD /*dwMode*/) return S_OK; } //M------------------------------------------------------------------------- -// // Method: COooFilter::Save (IPersistFile::Save) -// // Summary: Saves a copy of the current file being filtered -// // Arguments: pszFileName // [in] Pointer to zero-terminated string of // absolute path of where to save file // fRemember // [in] Whether the saved copy is made the current file -// // Returns: E_FAIL // Always // S_OK // (not implemented) -// //-------------------------------------------------------------------------- SCODE STDMETHODCALLTYPE COooFilter::Save(LPCWSTR /*pszFileName*/, BOOL /*fRemember*/) { @@ -700,18 +617,13 @@ SCODE STDMETHODCALLTYPE COooFilter::Save(LPCWSTR /*pszFileName*/, BOOL /*fRememb return E_FAIL; } //M------------------------------------------------------------------------- -// // Method: COooFilter::SaveCompleted (IPersistFile::SaveCompleted) -// // Summary: Determines whether a file save is completed -// // Arguments: pszFileName // [in] Pointer to zero-terminated string of // absolute path where file was previously saved -// // Returns: S_OK // Always -// //-------------------------------------------------------------------------- SCODE STDMETHODCALLTYPE COooFilter::SaveCompleted(LPCWSTR /*pszFileName*/) { @@ -720,20 +632,13 @@ SCODE STDMETHODCALLTYPE COooFilter::SaveCompleted(LPCWSTR /*pszFileName*/) } //M------------------------------------------------------------------------- -// // Method: COooFilter::Load (IPersistStream::Load) -// // Summary: Initializes an object from the stream where it was previously saved -// // Arguments: pStm // [in] Pointer to stream from which object should be loaded -// -// // Returns: S_OK // E_OUTOFMEMORY // E_FAIL -// -// //-------------------------------------------------------------------------- SCODE STDMETHODCALLTYPE COooFilter::Load(IStream *pStm) { @@ -759,56 +664,37 @@ SCODE STDMETHODCALLTYPE COooFilter::Load(IStream *pStm) } //M------------------------------------------------------------------------- -// // Method: COooFilter::GetSizeMax (IPersistStream::GetSizeMax) -// // Summary: Returns the size in bytes of the stream neede to save the object. -// // Arguments: pcbSize // [out] Pointer to a 64 bit unsigned int indicating the size needed -// // Returns: E_NOTIMPL -// -// //-------------------------------------------------------------------------- SCODE STDMETHODCALLTYPE COooFilter::GetSizeMax(ULARGE_INTEGER * /*pcbSize*/) { - // return E_NOTIMPL; } //M------------------------------------------------------------------------- -// // Method: COooFilter::Save (IPersistStream::Save) -// // Summary: Save object to specified stream -// // Arguments: pStm // [in] Pointer to stream -// // fClearDirty // [in] Indicates whether to clear dirty flag -// // Returns: E_NOTIMPL -// -// //-------------------------------------------------------------------------- SCODE STDMETHODCALLTYPE COooFilter::Save(IStream * /*pStm*/, BOOL ) { - // return E_NOTIMPL; } //M------------------------------------------------------------------------- -// // Method: COooFilter::GetCurFile (IPersistFile::GetCurFile) -// // Summary: Returns a copy of the current file name -// // Arguments: ppszFileName // [out] Address to receive pointer to zero-terminated // string for absolute path to current file -// // Returns: S_OK // A valid absolute path was successfully returned // S_FALSE @@ -818,7 +704,6 @@ SCODE STDMETHODCALLTYPE COooFilter::Save(IStream * /*pStm*/, BOOL ) // E_FAIL // Operation failed due to some reason // other than insufficient memory -// //------------------------------------------------------------------------- SCODE STDMETHODCALLTYPE COooFilter::GetCurFile(LPWSTR * ppszFileName) { @@ -830,15 +715,10 @@ SCODE STDMETHODCALLTYPE COooFilter::GetCurFile(LPWSTR * ppszFileName) } //M------------------------------------------------------------------------- -// // Method: COooFilterCF::COooFilterCF -// // Summary: Class factory constructor -// // Arguments: void -// // Purpose: Manages global instance count -// //-------------------------------------------------------------------------- COooFilterCF::COooFilterCF() : m_lRefs(1) @@ -846,36 +726,26 @@ COooFilterCF::COooFilterCF() : InterlockedIncrement( &g_lInstances ); } //M------------------------------------------------------------------------- -// // Method: COooFilterCF::~COooFilterCF -// // Summary: Class factory destructor -// // Arguments: void -// // Purpose: Manages global instance count -// //-------------------------------------------------------------------------- COooFilterCF::~COooFilterCF() { InterlockedDecrement( &g_lInstances ); } //M------------------------------------------------------------------------- -// // Method: COooFilterCF::QueryInterface (IUnknown::QueryInterface) -// // Summary: Queries for requested interface -// // Arguments: riid // [in] Reference IID of requested interface // ppvObject // [out] Address that receives requested interface pointer -// // Returns: S_OK // Interface is supported // E_NOINTERFACE // Interface is not supported -// //-------------------------------------------------------------------------- SCODE STDMETHODCALLTYPE COooFilterCF::QueryInterface(REFIID riid, void ** ppvObject) { @@ -895,30 +765,20 @@ SCODE STDMETHODCALLTYPE COooFilterCF::QueryInterface(REFIID riid, void ** ppvOb return S_OK; } //M------------------------------------------------------------------------- -// // Method: COooFilterCF::AddRef (IUknown::AddRef) -// // Summary: Increments interface refcount -// // Arguments: void -// // Returns: Value of incremented interface refcount -// //------------------------------------------------------------------------- ULONG STDMETHODCALLTYPE COooFilterCF::AddRef() { return InterlockedIncrement( &m_lRefs ); } //M------------------------------------------------------------------------- -// // Method: COooFilterCF::Release (IUnknown::Release) -// // Summary: Decrements interface refcount, deleting if unreferenced -// // Arguments: void -// // Returns: Value of decremented refcount -// //-------------------------------------------------------------------------- ULONG STDMETHODCALLTYPE COooFilterCF::Release() { @@ -929,18 +789,14 @@ ULONG STDMETHODCALLTYPE COooFilterCF::Release() return ulTmp; } //M------------------------------------------------------------------------- -// // Method: COooFilterCF::CreateInstance (IClassFactory::CreateInstance) -// // Summary: Creates new OpenOffice.org filter object -// // Arguments: pUnkOuter // [in] Pointer to IUnknown interface of aggregating object // riid // [in] Reference IID of requested interface // ppvObject // [out] Address that receives requested interface pointer -// // Returns: S_OK // OpenOffice.org filter object was successfully created // CLASS_E_NOAGGREGATION @@ -952,7 +808,6 @@ ULONG STDMETHODCALLTYPE COooFilterCF::Release() // due to insufficient memory // E_UNEXPECTED // Unsuccessful due to an unexpected condition -// //-------------------------------------------------------------------------- SCODE STDMETHODCALLTYPE COooFilterCF::CreateInstance( IUnknown * pUnkOuter, @@ -982,14 +837,10 @@ SCODE STDMETHODCALLTYPE COooFilterCF::CreateInstance( } //M------------------------------------------------------------------------- -// // Method: COooFilterCF::LockServer (IClassFactory::LockServer) -// // Summary: Forces/allows filter class to remain loaded/be unloaded -// // Arguments: fLock // [in] TRUE to lock, FALSE to unlock -// // Returns: S_OK // Always // E_FAIL @@ -998,7 +849,6 @@ SCODE STDMETHODCALLTYPE COooFilterCF::CreateInstance( // (not implemented) // E_UNEXPECTED // (not implemented) -// //-------------------------------------------------------------------------- SCODE STDMETHODCALLTYPE COooFilterCF::LockServer(BOOL fLock) { @@ -1009,28 +859,20 @@ SCODE STDMETHODCALLTYPE COooFilterCF::LockServer(BOOL fLock) return S_OK; } //+------------------------------------------------------------------------- -// // DLL: ooofilt.dll -// // Summary: Implements Dynamic Link Library functions for OpenOffice.org filter -// //-------------------------------------------------------------------------- //F------------------------------------------------------------------------- -// // Function: DllMain -// // Summary: Called from C-Runtime on process/thread attach/detach -// // Arguments: hInstance // [in] Handle to the DLL // fdwReason // [in] Reason for calling DLL entry point // lpReserve // [in] Details of DLL initialization and cleanup -// // Returns: TRUE // Always -// //-------------------------------------------------------------------------- extern "C" BOOL WINAPI DllMain( HINSTANCE hInstance, @@ -1043,18 +885,14 @@ extern "C" BOOL WINAPI DllMain( return TRUE; } //F------------------------------------------------------------------------- -// // Function: DllGetClassObject -// // Summary: Create OpenOffice.org filter class factory object -// // Arguments: cid // [in] Class ID of class that class factory creates // iid // [in] Reference IID of requested class factory interface // ppvObj // [out] Address that receives requested interface pointer -// // Returns: S_OK // Class factory object was created successfully // CLASS_E_CLASSNOTAVAILABLE @@ -1065,7 +903,6 @@ extern "C" BOOL WINAPI DllMain( // Insufficient memory to create the class factory object // E_UNEXPECTED // Unsuccessful due to an unexpected condition -// //------------------------------------------------------------------------- extern "C" SCODE STDMETHODCALLTYPE DllGetClassObject( REFCLSID cid, @@ -1095,18 +932,13 @@ extern "C" SCODE STDMETHODCALLTYPE DllGetClassObject( return S_OK; } //F------------------------------------------------------------------------- -// // Function: DllCanUnloadNow -// // Summary: Indicates whether it is possible to unload DLL -// // Arguments: void -// // Returns: S_OK // DLL can be unloaded now // S_FALSE // DLL must remain loaded -// //-------------------------------------------------------------------------- extern "C" SCODE STDMETHODCALLTYPE DllCanUnloadNow() { @@ -1116,12 +948,9 @@ extern "C" SCODE STDMETHODCALLTYPE DllCanUnloadNow() return S_FALSE; } //F------------------------------------------------------------------------- -// // Function: DllRegisterServer // DllUnregisterServer -// // Summary: Registers and unregisters DLL server -// // Returns: DllRegisterServer // S_OK // Registration was successful @@ -1147,14 +976,11 @@ extern "C" SCODE STDMETHODCALLTYPE DllCanUnloadNow() // (not implemented) // E_UNEXPECTED // (not implemented) -// //-------------------------------------------------------------------------- //F------------------------------------------------------------------------- -// // helper functions to register the Indexing Service. -// //-------------------------------------------------------------------------- namespace /* private */ @@ -1427,65 +1253,14 @@ namespace /* private */ STDAPI DllRegisterServer() { - /* - TCHAR ModuleFileName[MAX_PATH]; - - GetModuleFileName( - GetModuleHandle(MODULE_NAME_FILTER), - ModuleFileName, - sizeof(ModuleFileName)); - - HRESULT hr = S_OK; - - -// register search handler -#ifdef UNICODE - if (FAILED(RegisterSearchHandler(WStringToString(ModuleFileName).c_str()))) - hr = E_FAIL; - if (FAILED(AddOrRemoveDllsToRegisterList(WStringToString(ModuleFileName).c_str(), true))) - hr = E_FAIL; -#else - if (FAILED(RegisterSearchHandler(ModuleFileName))) - hr = E_FAIL; - if (FAILED(AddOrRemoveDllsToRegisterList(ModuleFileName, true))) - hr = E_FAIL; -#endif - - - return hr; - */ return S_OK; } //--------------------------- -// -//--------------------------- STDAPI DllUnregisterServer() { - /* - TCHAR ModuleFileName[MAX_PATH]; - - GetModuleFileName( - GetModuleHandle(MODULE_NAME_FILTER), - ModuleFileName, - sizeof(ModuleFileName)); - - HRESULT hr = S_OK; - - // unregister search handler - if (FAILED(UnregisterSearchHandler())) - hr = E_FAIL; - -#ifdef UNICODE - if (FAILED(AddOrRemoveDllsToRegisterList(WStringToString(ModuleFileName).c_str(),false))) - hr = E_FAIL; -#else - if (FAILED(AddOrRemoveDllsToRegisterList(ModuleFileName, false))) - hr = E_FAIL; -#endif - - return hr; - */ return S_OK; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/shlxthandler/ooofilt/ooofilt.hxx b/shell/source/win32/shlxthandler/ooofilt/ooofilt.hxx index b68863523b28..030a3e5d99ca 100755..100644 --- a/shell/source/win32/shlxthandler/ooofilt/ooofilt.hxx +++ b/shell/source/win32/shlxthandler/ooofilt/ooofilt.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,39 +29,29 @@ #include "internal/types.hxx" //+------------------------------------------------------------------------- -// // Contents: OpenOffice.org filter declarations -// // Platform: Windows 2000, Windows XP -// //-------------------------------------------------------------------------- #pragma once //+------------------------------------------------------------------------- -// // forward declaration -// //-------------------------------------------------------------------------- class CContentReader; class CMetaInfoReader; class CFullPropSpec; //+------------------------------------------------------------------------- -// // Global definitions -// //-------------------------------------------------------------------------- long g_lInstances = 0; // Global count of COooFilter and COooFilterCF instances GUID const guidStorage = PSGUID_STORAGE; // GUID for storage property set //C------------------------------------------------------------------------- -// // Class: COooFilter -// // Purpose: Implements interfaces of OpenOffice.org filter -// //-------------------------------------------------------------------------- // OooFilter Class ID @@ -179,11 +170,8 @@ private: }; //C------------------------------------------------------------------------- -// // Class: COooFilterCF -// // Purpose: Implements class factory for OpenOffice.org filter -// //-------------------------------------------------------------------------- class COooFilterCF : public IClassFactory @@ -216,3 +204,5 @@ private: long m_lRefs; // Reference count }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/shlxthandler/ooofilt/propspec.cxx b/shell/source/win32/shlxthandler/ooofilt/propspec.cxx index fd7a24f2711a..24d4c22bc9ee 100644 --- a/shell/source/win32/shlxthandler/ooofilt/propspec.cxx +++ b/shell/source/win32/shlxthandler/ooofilt/propspec.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,11 +30,8 @@ #include "precompiled_shell.hxx" //+------------------------------------------------------------------------- -// // File: propspec.cxx -// // Contents: C++ wrappers for FULLPROPSPEC -// //-------------------------------------------------------------------------- #if defined _MSC_VER #pragma warning(push, 1) @@ -49,12 +47,8 @@ #include "propspec.hxx" -//GUID CLSID_Storage = PSGUID_STORAGE; -// -// //refer to ms-help://MS.VSCC/MS.MSDNVS.2052/com/stgasstg_7agk.htm //FMTID_SummaryInformation -// //GUID CLSID_SummaryInforation = { // 0xF29F85E0, // 0x4FF9, @@ -62,13 +56,9 @@ // { 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9 } //}; //+------------------------------------------------------------------------- -// // Member: CFullPropSpec::CFullPropSpec, public -// // Synopsis: Default constructor -// // Effects: Defines property with null guid and propid 0 -// //-------------------------------------------------------------------------- CFullPropSpec::CFullPropSpec() @@ -78,14 +68,10 @@ CFullPropSpec::CFullPropSpec() _psProperty.propid = 0; } //+------------------------------------------------------------------------- -// // Member: CFullPropSpec::CFullPropSpec, public -// // Synopsis: Construct propid based propspec -// // Arguments: [guidPropSet] -- Property set // [pidProperty] -- Property -// //-------------------------------------------------------------------------- CFullPropSpec::CFullPropSpec( GUID const & guidPropSet, PROPID pidProperty ) : _guidPropSet( guidPropSet ) @@ -94,14 +80,10 @@ CFullPropSpec::CFullPropSpec( GUID const & guidPropSet, PROPID pidProperty ) : _psProperty.propid = pidProperty; } //+------------------------------------------------------------------------- -// // Member: CFullPropSpec::CFullPropSpec, public -// // Synopsis: Construct name based propspec -// // Arguments: [guidPropSet] -- Property set // [wcsProperty] -- Property -// //-------------------------------------------------------------------------- CFullPropSpec::CFullPropSpec( GUID const & guidPropSet, WCHAR const * wcsProperty ) : @@ -111,13 +93,9 @@ CFullPropSpec::CFullPropSpec( GUID const & guidPropSet, SetProperty( wcsProperty ); } //+------------------------------------------------------------------------- -// // Member: CFullPropSpec::CFullPropSpec, public -// // Synopsis: Copy constructor -// // Arguments: [src] -- Source property spec -// //-------------------------------------------------------------------------- CFullPropSpec::CFullPropSpec( CFullPropSpec const & src ) : _guidPropSet( src._guidPropSet ) @@ -143,13 +121,9 @@ inline void * operator new( size_t /*size*/, void * p ) return( p ); } //+------------------------------------------------------------------------- -// // Member: CFullPropSpec::operator=, public -// // Synopsis: Assignment operator -// // Arguments: [Property] -- Source property -// //-------------------------------------------------------------------------- CFullPropSpec & CFullPropSpec::operator=( CFullPropSpec const & Property ) { @@ -236,3 +210,4 @@ int CFullPropSpec::operator!=( CFullPropSpec const & prop ) const return( 1 ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/shlxthandler/ooofilt/propspec.hxx b/shell/source/win32/shlxthandler/ooofilt/propspec.hxx index ba4c34233d64..1c8a92b9f617 100644 --- a/shell/source/win32/shlxthandler/ooofilt/propspec.hxx +++ b/shell/source/win32/shlxthandler/ooofilt/propspec.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -25,11 +26,8 @@ * ************************************************************************/ //+------------------------------------------------------------------------- -// // File: propspec.hxx -// // Contents: C++ wrapper(s) for FULLPROPSPEC -// //------------------------------------------------------------------------- #pragma once #if defined _MSC_VER @@ -42,30 +40,14 @@ #pragma warning(pop) #endif //+------------------------------------------------------------------------- -// // Declare: CLSID_SummaryInforation, GUID // CLSID_Storage, GUID -// // Contents: Definitions of OpenOffice.org Document properties -// //-------------------------------------------------------------------------- -//extern GUID CLSID_Storage; -// -//extern GUID CLSID_SummaryInformation; -//const PID_TITLE = PIDSI_TITLE; // 2; -//const PID_SUBJECT = PIDSI_SUBJECT; // 3; -//const PID_AUTHOR = PIDSI_AUTHOR; // 4; -//const PID_KEYWORDS = PIDSI_KEYWORDS; // 5; -//const PID_COMMENTS = PIDSI_COMMENTS; //6; -//const PID_REVNUMBER = PIDSI_REVNUMBER; //9; -//const PID_WORDCOUNT = PIDSI_WORDCOUNT; //f; //+------------------------------------------------------------------------- -// // Class: CFullPropertySpec -// // Purpose: Describes full (PropertySet\Property) name of a property. -// //-------------------------------------------------------------------------- class CFullPropSpec @@ -157,3 +139,4 @@ inline BOOL CFullPropSpec::IsPropertyPropid() const +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/shlxthandler/ooofilt/stream_helper.cxx b/shell/source/win32/shlxthandler/ooofilt/stream_helper.cxx index e12f95a88e50..729e8ba814ee 100755..100644 --- a/shell/source/win32/shlxthandler/ooofilt/stream_helper.cxx +++ b/shell/source/win32/shlxthandler/ooofilt/stream_helper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,19 +39,6 @@ #include <stdio.h> #include <objidl.h> - -/*#include <string.h> -#include <filter.h> -#include <filterr.h> -#include <ntquery.h> -#include "assert.h" -#include "propspec.hxx" -#ifdef __MINGW32__ -#include <algorithm> -using ::std::min; -#endif -*/ - #include "internal/stream_helper.hxx" extern "C" { @@ -179,3 +167,5 @@ extern "C" { pzlib_filefunc_def->zerror_file = cb_serror; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/shlxthandler/prophdl/makefile.mk b/shell/source/win32/shlxthandler/prophdl/makefile.mk index dc6d0e159046..dc6d0e159046 100644..100755 --- a/shell/source/win32/shlxthandler/prophdl/makefile.mk +++ b/shell/source/win32/shlxthandler/prophdl/makefile.mk diff --git a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx index 13d1a57fefd8..2a6bff0ef78f 100755..100644 --- a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx +++ b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,6 +28,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_shell.hxx" + +#include <osl/diagnose.h> + #include "internal/global.hxx" #include "internal/PropertyHdl.hxx" #include "internal/fileextensions.hxx" @@ -36,6 +40,7 @@ #include <propkey.h> #include <propvarutil.h> +#include <sal/macros.h> #include <malloc.h> #include <strsafe.h> @@ -48,9 +53,7 @@ long g_DllRefCnt = 0; HINSTANCE g_hModule = NULL; -// // Map of property keys to the locations of their value(s) in the .??? XML schema -// struct PROPERTYMAP { PROPERTYKEY key; @@ -67,11 +70,9 @@ PROPERTYMAP g_rgPROPERTYMAP[] = { PKEY_Comment, L"OpenOffice.org", L"Comments" }, }; -size_t gPropertyMapTableSize = sizeof(g_rgPROPERTYMAP)/sizeof(g_rgPROPERTYMAP[0]); +size_t gPropertyMapTableSize = SAL_N_ELEMENTS(g_rgPROPERTYMAP); //---------------------------- -// -//---------------------------- CPropertyHdl::CPropertyHdl( long nRefCnt ) : m_RefCnt( nRefCnt ), @@ -82,8 +83,6 @@ CPropertyHdl::CPropertyHdl( long nRefCnt ) : } //---------------------------- -// -//---------------------------- CPropertyHdl::~CPropertyHdl() { @@ -245,11 +244,6 @@ HRESULT STDMETHODCALLTYPE CPropertyHdl::Initialize( IStream *pStream, DWORD grfM OutputDebugStringFormat( "CPropertyHdl::Initialize: Caught exception [%s]", e.what() ); return E_FAIL; } -/* - // load extended properties and search content - _LoadExtendedProperties(); - _LoadSearchContent(); -*/ } return S_OK; @@ -394,7 +388,7 @@ HRESULT STDMETHODCALLTYPE CClassFactory::CreateInstance( if ( CLSID_PROPERTY_HANDLER == m_Clsid ) pUnk = static_cast<IPropertyStore*>( new CPropertyHdl() ); - POST_CONDITION(pUnk != 0, "Could not create COM object"); + OSL_POSTCOND(pUnk != 0, "Could not create COM object"); if (0 == pUnk) return E_OUTOFMEMORY; @@ -461,3 +455,5 @@ BOOL WINAPI DllMain( HINSTANCE hInst, ULONG /*ul_reason_for_call*/, LPVOID /*lpR g_hModule = hInst; return TRUE; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/shlxthandler/propsheets/document_statistic.cxx b/shell/source/win32/shlxthandler/propsheets/document_statistic.cxx index 1e41f478b95b..284f50850410 100644 --- a/shell/source/win32/shlxthandler/propsheets/document_statistic.cxx +++ b/shell/source/win32/shlxthandler/propsheets/document_statistic.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,11 +40,9 @@ #include "internal/config.hxx" #include "internal/iso8601_converter.hxx" -//##################################### const bool READONLY = false; const bool WRITEABLE = true; -//##################################### document_statistic_reader_ptr create_document_statistic_reader(const std::string& document_name, CMetaInfoReader* meta_info_accessor) { File_Type_t file_type = get_file_type(document_name); @@ -57,17 +56,14 @@ document_statistic_reader_ptr create_document_statistic_reader(const std::string } -//##################################### document_statistic_reader::document_statistic_reader(const std::string& document_name, CMetaInfoReader* meta_info_accessor) : document_name_(document_name), meta_info_accessor_(meta_info_accessor) {} -//##################################### document_statistic_reader::~document_statistic_reader() {} -//##################################### void document_statistic_reader::read(statistic_group_list_t* group_list) { group_list->clear(); @@ -75,13 +71,11 @@ void document_statistic_reader::read(statistic_group_list_t* group_list) fill_origin_section(meta_info_accessor_, group_list); } -//##################################### std::string document_statistic_reader::get_document_name() const { return document_name_; } -//##################################### void document_statistic_reader::fill_origin_section(CMetaInfoReader *meta_info_accessor, statistic_group_list_t* group_list) { statistic_item_list_t il; @@ -99,12 +93,10 @@ void document_statistic_reader::fill_origin_section(CMetaInfoReader *meta_info_a group_list->push_back(statistic_group_t(GetResString(IDS_ORIGIN), il)); } -//##################################### writer_document_statistic_reader::writer_document_statistic_reader(const std::string& document_name, CMetaInfoReader* meta_info_accessor) : document_statistic_reader(document_name, meta_info_accessor) {} -//##################################### void writer_document_statistic_reader::fill_description_section(CMetaInfoReader *meta_info_accessor, statistic_group_list_t* group_list) { statistic_item_list_t il; @@ -124,13 +116,11 @@ void writer_document_statistic_reader::fill_description_section(CMetaInfoReader group_list->push_back(statistic_group_t(GetResString(IDS_DESCRIPTION), il)); } -//####################################### calc_document_statistic_reader::calc_document_statistic_reader( const std::string& document_name, CMetaInfoReader* meta_info_accessor) : document_statistic_reader(document_name, meta_info_accessor) {} -//####################################### void calc_document_statistic_reader::fill_description_section( CMetaInfoReader *meta_info_accessor,statistic_group_list_t* group_list) { @@ -147,13 +137,11 @@ void calc_document_statistic_reader::fill_description_section( group_list->push_back(statistic_group_t(GetResString(IDS_DESCRIPTION), il)); } -//####################################### draw_impress_math_document_statistic_reader::draw_impress_math_document_statistic_reader( const std::string& document_name, CMetaInfoReader* meta_info_accessor) : document_statistic_reader(document_name, meta_info_accessor) {} -//####################################### void draw_impress_math_document_statistic_reader::fill_description_section( CMetaInfoReader *meta_info_accessor, statistic_group_list_t* group_list) { @@ -168,3 +156,5 @@ void draw_impress_math_document_statistic_reader::fill_description_section( group_list->push_back(statistic_group_t(GetResString(IDS_DESCRIPTION), il)); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/shlxthandler/propsheets/document_statistic.hxx b/shell/source/win32/shlxthandler/propsheets/document_statistic.hxx index 0b3a3dd96c07..e15b62a0bc96 100644 --- a/shell/source/win32/shlxthandler/propsheets/document_statistic.hxx +++ b/shell/source/win32/shlxthandler/propsheets/document_statistic.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,8 +36,6 @@ //------------------------------------ -// -//------------------------------------ struct statistic_item { @@ -57,16 +56,12 @@ struct statistic_item }; //------------------------------------ -// -//------------------------------------ typedef std::vector<statistic_item> statistic_item_list_t; typedef std::pair<std::wstring, statistic_item_list_t> statistic_group_t; typedef std::vector<statistic_group_t> statistic_group_list_t; //------------------------------------ -// -//------------------------------------ class document_statistic_reader; typedef std::auto_ptr<document_statistic_reader> document_statistic_reader_ptr; @@ -74,8 +69,6 @@ typedef std::auto_ptr<document_statistic_reader> document_statistic_reader_ptr; document_statistic_reader_ptr create_document_statistic_reader(const std::string& document_name, CMetaInfoReader* meta_info_accessor); //------------------------------------ -// -//------------------------------------ class document_statistic_reader { @@ -102,8 +95,6 @@ private: }; //------------------------------------ -// -//------------------------------------ class writer_document_statistic_reader : public document_statistic_reader { @@ -117,8 +108,6 @@ protected: }; //------------------------------------ -// -//------------------------------------ class calc_document_statistic_reader : public document_statistic_reader { @@ -132,8 +121,6 @@ protected: }; //------------------------------------ -// -//------------------------------------ class draw_impress_math_document_statistic_reader : public document_statistic_reader { @@ -147,3 +134,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/shlxthandler/propsheets/listviewbuilder.cxx b/shell/source/win32/shlxthandler/propsheets/listviewbuilder.cxx index 5d3d365beb62..68a3b6903f3f 100644 --- a/shell/source/win32/shlxthandler/propsheets/listviewbuilder.cxx +++ b/shell/source/win32/shlxthandler/propsheets/listviewbuilder.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -52,8 +53,6 @@ #include "internal/resource.h" //------------------------------------ -// -//------------------------------------ list_view_builder_ptr create_list_view_builder( HWND hwnd_lv, const std::wstring& col1, const std::wstring& col2) @@ -65,8 +64,6 @@ list_view_builder_ptr create_list_view_builder( } //------------------------------------ -// -//------------------------------------ list_view_builder::list_view_builder( HWND hwnd_list_view, @@ -80,16 +77,12 @@ list_view_builder::list_view_builder( } //------------------------------------ -// -//------------------------------------ list_view_builder::~list_view_builder() { } //------------------------------------ -// -//------------------------------------ void list_view_builder::build(statistic_group_list_t& gl) { @@ -112,8 +105,6 @@ void list_view_builder::build(statistic_group_list_t& gl) } //------------------------------------ -// -//------------------------------------ void list_view_builder::setup_list_view() { @@ -144,8 +135,6 @@ void list_view_builder::setup_list_view() } //------------------------------------ -// -//------------------------------------ void list_view_builder::insert_group(const std::wstring& /*title*/) { @@ -153,8 +142,6 @@ void list_view_builder::insert_group(const std::wstring& /*title*/) } //------------------------------------ -// -//------------------------------------ void list_view_builder::insert_item(const std::wstring& title, const std::wstring& value, bool is_editable) { @@ -188,8 +175,6 @@ void list_view_builder::insert_item(const std::wstring& title, const std::wstrin } //------------------------------------ -// -//------------------------------------ HWND list_view_builder::get_list_view() const { @@ -197,8 +182,6 @@ HWND list_view_builder::get_list_view() const } //------------------------------------ -// -//------------------------------------ winxp_list_view_builder::winxp_list_view_builder( HWND hwnd_list_view, @@ -211,8 +194,6 @@ winxp_list_view_builder::winxp_list_view_builder( } //------------------------------------ -// -//------------------------------------ void winxp_list_view_builder::setup_list_view() { @@ -222,8 +203,6 @@ void winxp_list_view_builder::setup_list_view() } //------------------------------------ -// -//------------------------------------ void winxp_list_view_builder::insert_group(const std::wstring& name) { @@ -243,8 +222,6 @@ void winxp_list_view_builder::insert_group(const std::wstring& name) } //------------------------------------ -// -//------------------------------------ void winxp_list_view_builder::insert_item( const std::wstring& title, const std::wstring& value, bool is_editable) @@ -279,3 +256,5 @@ void winxp_list_view_builder::insert_item( row_count_++; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/shlxthandler/propsheets/listviewbuilder.hxx b/shell/source/win32/shlxthandler/propsheets/listviewbuilder.hxx index c764ff9809ad..20f9fc5ec18b 100644 --- a/shell/source/win32/shlxthandler/propsheets/listviewbuilder.hxx +++ b/shell/source/win32/shlxthandler/propsheets/listviewbuilder.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -45,8 +46,6 @@ #include "document_statistic.hxx" //------------------------------------ -// -//------------------------------------ class list_view_builder; typedef std::auto_ptr<list_view_builder> list_view_builder_ptr; @@ -56,8 +55,6 @@ list_view_builder_ptr create_list_view_builder( HWND hwnd_lv, const std::wstring& col1, const std::wstring& col2); //------------------------------------ -// -//------------------------------------ class list_view_builder { @@ -90,8 +87,6 @@ private: }; //------------------------------------ -// -//------------------------------------ class winxp_list_view_builder : public list_view_builder { @@ -113,3 +108,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/shlxthandler/propsheets/makefile.mk b/shell/source/win32/shlxthandler/propsheets/makefile.mk index 55a31c9c59d3..55a31c9c59d3 100644..100755 --- a/shell/source/win32/shlxthandler/propsheets/makefile.mk +++ b/shell/source/win32/shlxthandler/propsheets/makefile.mk diff --git a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx index d668479d5ff5..4c371cf70e2f 100755..100644 --- a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx +++ b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,9 +31,7 @@ #include "internal/config.hxx" #include "internal/global.hxx" -#ifndef PROPSEETS_HXX_INCLUDED #include "internal/propsheets.hxx" -#endif #include "internal/utilities.hxx" #include "internal/resource.h" #include "listviewbuilder.hxx" @@ -62,8 +61,6 @@ ----------------------------------------------*/ //----------------------------- -// -//----------------------------- CPropertySheet::CPropertySheet(long RefCnt) : m_RefCnt(RefCnt) @@ -73,8 +70,6 @@ CPropertySheet::CPropertySheet(long RefCnt) : } //----------------------------- -// -//----------------------------- CPropertySheet::~CPropertySheet() { @@ -111,8 +106,6 @@ HRESULT STDMETHODCALLTYPE CPropertySheet::QueryInterface( } //----------------------------- -// -//----------------------------- ULONG STDMETHODCALLTYPE CPropertySheet::AddRef(void) { @@ -121,8 +114,6 @@ ULONG STDMETHODCALLTYPE CPropertySheet::AddRef(void) } //----------------------------- -// -//----------------------------- ULONG STDMETHODCALLTYPE CPropertySheet::Release(void) { @@ -260,8 +251,6 @@ HRESULT STDMETHODCALLTYPE CPropertySheet::AddPages(LPFNADDPROPSHEETPAGE lpfnAddP } //----------------------------- -// -//----------------------------- HRESULT STDMETHODCALLTYPE CPropertySheet::ReplacePage( UINT /*uPageID*/, LPFNADDPROPSHEETPAGE /*lpfnReplaceWith*/, LPARAM /*lParam*/) @@ -270,8 +259,6 @@ HRESULT STDMETHODCALLTYPE CPropertySheet::ReplacePage( } //----------------------------- -// -//----------------------------- UINT CALLBACK CPropertySheet::PropPageSummaryCallback( HWND /*hwnd*/, UINT uMsg, LPPROPSHEETPAGE ppsp) @@ -291,8 +278,6 @@ UINT CALLBACK CPropertySheet::PropPageSummaryCallback( //----------------------------- -// -//----------------------------- BOOL CALLBACK CPropertySheet::PropPageSummaryProc(HWND hwnd, UINT uiMsg, WPARAM /*wParam*/, LPARAM lParam) { @@ -311,8 +296,6 @@ BOOL CALLBACK CPropertySheet::PropPageSummaryProc(HWND hwnd, UINT uiMsg, WPARAM } //----------------------------- -// -//----------------------------- BOOL CALLBACK CPropertySheet::PropPageStatisticsProc(HWND hwnd, UINT uiMsg, WPARAM /*wParam*/, LPARAM lParam) { @@ -330,7 +313,6 @@ BOOL CALLBACK CPropertySheet::PropPageStatisticsProc(HWND hwnd, UINT uiMsg, WPAR return FALSE; } -//################################## void CPropertySheet::InitPropPageSummary(HWND hwnd, LPPROPSHEETPAGE /*lppsp*/) { try @@ -383,3 +365,4 @@ void CPropertySheet::InitPropPageStatistics(HWND hwnd, LPPROPSHEETPAGE /*lppsp*/ { } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/shlxthandler/res/ctrylnglist.txt b/shell/source/win32/shlxthandler/res/ctrylnglist.txt index ec2196e4da43..ec2196e4da43 100644..100755 --- a/shell/source/win32/shlxthandler/res/ctrylnglist.txt +++ b/shell/source/win32/shlxthandler/res/ctrylnglist.txt diff --git a/shell/source/win32/shlxthandler/res/makefile.mk b/shell/source/win32/shlxthandler/res/makefile.mk index ec0529015179..ec0529015179 100644..100755 --- a/shell/source/win32/shlxthandler/res/makefile.mk +++ b/shell/source/win32/shlxthandler/res/makefile.mk diff --git a/shell/source/win32/shlxthandler/res/rcfooter.txt b/shell/source/win32/shlxthandler/res/rcfooter.txt index ce333b32a1d5..ce333b32a1d5 100644..100755 --- a/shell/source/win32/shlxthandler/res/rcfooter.txt +++ b/shell/source/win32/shlxthandler/res/rcfooter.txt diff --git a/shell/source/win32/shlxthandler/res/rcheader.txt b/shell/source/win32/shlxthandler/res/rcheader.txt index fac9fa31f256..fac9fa31f256 100644..100755 --- a/shell/source/win32/shlxthandler/res/rcheader.txt +++ b/shell/source/win32/shlxthandler/res/rcheader.txt diff --git a/shell/source/win32/shlxthandler/res/rctmpl.txt b/shell/source/win32/shlxthandler/res/rctmpl.txt index a512c69dd9d7..a512c69dd9d7 100644..100755 --- a/shell/source/win32/shlxthandler/res/rctmpl.txt +++ b/shell/source/win32/shlxthandler/res/rctmpl.txt diff --git a/shell/source/win32/shlxthandler/res/shlxthdl.manifest b/shell/source/win32/shlxthandler/res/shlxthdl.manifest index a785006a9601..a785006a9601 100644..100755 --- a/shell/source/win32/shlxthandler/res/shlxthdl.manifest +++ b/shell/source/win32/shlxthandler/res/shlxthdl.manifest diff --git a/shell/source/win32/shlxthandler/res/shlxthdl.ulf b/shell/source/win32/shlxthandler/res/shlxthdl.ulf index c0e879724e5d..c0e879724e5d 100644..100755 --- a/shell/source/win32/shlxthandler/res/shlxthdl.ulf +++ b/shell/source/win32/shlxthandler/res/shlxthdl.ulf diff --git a/shell/source/win32/shlxthandler/shlxthdl.cxx b/shell/source/win32/shlxthandler/shlxthdl.cxx index 6263c98ea749..00d9e60a1a53 100755..100644 --- a/shell/source/win32/shlxthandler/shlxthdl.cxx +++ b/shell/source/win32/shlxthandler/shlxthdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -425,3 +426,5 @@ BOOL WINAPI DllMain(HINSTANCE hInst, ULONG /*ul_reason_for_call*/, LPVOID /*lpRe g_hModule = hInst; return TRUE; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/shlxthandler/thumbviewer/makefile.mk b/shell/source/win32/shlxthandler/thumbviewer/makefile.mk index 1b7dd103026e..01936460fae7 100644..100755 --- a/shell/source/win32/shlxthandler/thumbviewer/makefile.mk +++ b/shell/source/win32/shlxthandler/thumbviewer/makefile.mk @@ -36,7 +36,6 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk CFLAGS+=-DWIN32_LEAN_AND_MEAN -D_NTSDK -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0501 -#CFLAGS+=-wd4710 -wd4711 -wd4514 -wd4619 -wd4217 -wd4820 CDEFS+=-D_WIN32_IE=0x501 # --- Files -------------------------------------------------------- diff --git a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx index 62fd306317be..cd573e38f7cf 100755..100644 --- a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx +++ b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,9 +31,7 @@ #include "internal/global.hxx" -#ifndef INFOTIPS_HXX_INCLUDED #include "internal/thumbviewer.hxx" -#endif #include "internal/shlxthdl.hxx" #include "internal/registry.hxx" #include "internal/fileextensions.hxx" @@ -290,7 +289,6 @@ HRESULT STDMETHODCALLTYPE StreamOnZipBuffer::Clone(IStream **) { return E_NOTIMPL; } -//######################################### CThumbviewer::CThumbviewer(long RefCnt) : @@ -531,3 +529,4 @@ Gdiplus::Rect CThumbviewer::CalcScaledAspectRatio(Gdiplus::Rect src, Gdiplus::Re return result; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/shlxthandler/util/dbgmacros.cxx b/shell/source/win32/shlxthandler/util/dbgmacros.cxx deleted file mode 100644 index 01ef1d47c083..000000000000 --- a/shell/source/win32/shlxthandler/util/dbgmacros.cxx +++ /dev/null @@ -1,58 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// 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 <stdio.h> -#include "internal/dbgmacros.hxx" - -void DbgAssert(bool /*condition*/, const char* /*message*/) -{ - - //if (!condition) - //{ - // char msg[1024]; - // - // sprintf(msg, "Assertion in file %s at line %d\n%s", __FILE__, __LINE__, message); - - // int nRet = MessageBoxA( - // 0, - // msg, - // "Assertion violation", - // MB_ICONEXCLAMATION | MB_ABORTRETRYIGNORE); - //} - -} - diff --git a/shell/source/win32/shlxthandler/util/fileextensions.cxx b/shell/source/win32/shlxthandler/util/fileextensions.cxx index 13e3535c7aa7..1093a96b826b 100755..100644 --- a/shell/source/win32/shlxthandler/util/fileextensions.cxx +++ b/shell/source/win32/shlxthandler/util/fileextensions.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,10 +30,9 @@ #include "precompiled_shell.hxx" #include "algorithm" #include "internal/fileextensions.hxx" +#include <sal/macros.h> //------------------------------------ -// -//------------------------------------ const std::string WRITER_FILE_EXTENSIONS = "sxwstwsxgodtottodm"; const std::string CALC_FILE_EXTENSIONS = "sxcstcodsots"; @@ -68,7 +68,7 @@ FileExtensionEntry OOFileExtensionTable[] = { }; -size_t OOFileExtensionTableSize = sizeof(OOFileExtensionTable)/sizeof(OOFileExtensionTable[0]); +size_t OOFileExtensionTableSize = SAL_N_ELEMENTS(OOFileExtensionTable); //--------------------------------- /** Return the extension of a file @@ -118,3 +118,4 @@ File_Type_t get_file_type(const std::string& file_name) return UNKNOWN; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/shlxthandler/util/iso8601_converter.cxx b/shell/source/win32/shlxthandler/util/iso8601_converter.cxx index dcd779098865..01a16db4ffa6 100644 --- a/shell/source/win32/shlxthandler/util/iso8601_converter.cxx +++ b/shell/source/win32/shlxthandler/util/iso8601_converter.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -45,7 +46,6 @@ std::wstring iso8601_date_to_local_date(const std::wstring& isoDate ) if ( ws8601DateTime.length() == 19 ) { - //fill in the SYSTEMTIME structure; std::string asDateTime = WStringToString( ws8601DateTime ); SYSTEMTIME DateTime; DateTime.wYear = ( unsigned short )strtol( asDateTime.substr( 0, 4 ).c_str(), NULL, 10 ); @@ -169,14 +169,7 @@ std::wstring iso8601_duration_to_local_duration(const std::wstring& iso8601durat return result; #undef ADD_AS_PREFILLED -/* -#else - std::wostringstream oss; - oss << std::setw(2) << std::setfill('0') << hours << L":" << - std::setw(2) << std::setfill('0') << minutes << L":" << - std::setw(2) << std::setfill('0') << seconds; - return oss.str(); -*/ #endif } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/shlxthandler/util/makefile.mk b/shell/source/win32/shlxthandler/util/makefile.mk index 8ccf50602f93..8d54e138f350 100644..100755 --- a/shell/source/win32/shlxthandler/util/makefile.mk +++ b/shell/source/win32/shlxthandler/util/makefile.mk @@ -28,7 +28,6 @@ PRJ=..$/..$/..$/.. PRJNAME=shell TARGET=util -#LIBTARGET=NO ENABLE_EXCEPTIONS=TRUE @@ -46,14 +45,12 @@ CDEFS_X64+=-D_WIN32_IE=0x501 # --- Files -------------------------------------------------------- -SLOFILES=$(SLO)$/dbgmacros.obj\ - $(SLO)$/fileextensions.obj\ +SLOFILES=$(SLO)$/fileextensions.obj\ $(SLO)$/registry.obj\ $(SLO)$/utilities.obj\ $(SLO)$/iso8601_converter.obj -SLOFILES_X64=$(SLO_X64)$/dbgmacros.obj\ - $(SLO_X64)$/fileextensions.obj\ +SLOFILES_X64=$(SLO_X64)$/fileextensions.obj\ $(SLO_X64)$/registry.obj\ $(SLO_X64)$/utilities.obj\ $(SLO_X64)$/iso8601_converter.obj diff --git a/shell/source/win32/shlxthandler/util/registry.cxx b/shell/source/win32/shlxthandler/util/registry.cxx index bac126bb0504..a38bcef99a83 100644 --- a/shell/source/win32/shlxthandler/util/registry.cxx +++ b/shell/source/win32/shlxthandler/util/registry.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,7 +37,6 @@ #pragma warning(pop) #endif #include <malloc.h> -#include "internal/dbgmacros.hxx" #include "internal/registry.hxx" #if defined _MSC_VER @@ -48,15 +48,11 @@ #endif //--------------------------------------- -// -//--------------------------------------- // Size of a CLSID as a string const int CLSID_STRING_SIZE = 39; //--------------------------------------- -// -//--------------------------------------- bool SetRegistryKey(HKEY RootKey, const char* KeyName, const char* ValueName, const char* Value) { @@ -78,8 +74,6 @@ bool SetRegistryKey(HKEY RootKey, const char* KeyName, const char* ValueName, co } //--------------------------------------- -// -//--------------------------------------- bool DeleteRegistryKey(HKEY RootKey, const char* KeyName) { @@ -179,8 +173,6 @@ std::string ClsidToString(const CLSID& clsid) } //--------------------------------------- -// -//--------------------------------------- bool QueryRegistryKey(HKEY RootKey, const char* KeyName, const char* ValueName, char *pszData, DWORD dwBufLen) { @@ -203,3 +195,5 @@ bool QueryRegistryKey(HKEY RootKey, const char* KeyName, const char* ValueName, return (ERROR_SUCCESS == rc); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/shlxthandler/util/utilities.cxx b/shell/source/win32/shlxthandler/util/utilities.cxx index 005e4689cdce..7fd2fcdbb8ab 100755..100644 --- a/shell/source/win32/shlxthandler/util/utilities.cxx +++ b/shell/source/win32/shlxthandler/util/utilities.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_shell.hxx" +#include <osl/diagnose.h> #include "internal/config.hxx" -#include "internal/dbgmacros.hxx" #include "internal/utilities.hxx" //----------------------------- @@ -84,7 +85,7 @@ std::wstring GetResString(int ResId) int rc = LoadStringW( GetModuleHandleW(MODULE_NAME), ResId, szResStr, sizeof(szResStr) ); OutputDebugStringFormat( "GetResString: read %d chars\n", rc ); - ENSURE(rc, "String resource not found"); + OSL_ENSURE(rc, "String resource not found"); return std::wstring(szResStr); } @@ -170,21 +171,6 @@ std::wstring getShortPathName( const std::wstring& aLongName ) return shortName; } -/** convert LocaleSet pair into Microsoft List of Locale ID (LCID) - according to ISO-639 and ISO-3166. - http://etext.lib.virginia.edu/tei/iso639.html - http://nl.ijs.si/gnusl/cee/std/ISO_3166.html - @param - Locale, LocaleSet - @returns - Windows Locale Identifier corresponding to input LocaleSet. - @Usage Sample - LocaleSet_t myDefaultLocale( ::std::wstring( L"zh" ),::std::wstring(L"HK") ); - DWORD myLCID = LocaleSetToLCID( myDefaultLocale ); - wchar_t buffer[20]; - _ultow( myLCID, buffer, 16 ); - MessageBox( NULL, buffer,L"the LCID is:",MB_OK ); -*/ LCID LocaleSetToLCID( const LocaleSet_t & Locale ) { @@ -313,8 +299,6 @@ LCID LocaleSetToLCID( const LocaleSet_t & Locale ) else if ( wsLanguage == L"es" ) { usPrimaryLang = LANG_SPANISH; //Spanish - //else if ( wsCountry == L"ES" ) - // usSubLang = SUBLANG_SPANISH; // Spanish (Castilian) if ( wsCountry == L"MX" ) usSubLang = SUBLANG_SPANISH_MEXICAN; // Spanish (Mexican) else if ( wsCountry == L"ES" ) @@ -417,8 +401,6 @@ LCID LocaleSetToLCID( const LocaleSet_t & Locale ) usPrimaryLang = LANG_NORWEGIAN; //Norwegian if ( wsCountry == L"NO" ) usSubLang = SUBLANG_NORWEGIAN_BOKMAL; // Norwegian (Bokmal) - //else if ( wsCountry == L"NO" ) - // usSubLang = SUBLANG_NORWEGIAN_NYNORSK; // Norwegian (Nynorsk) else usSubLang = SUBLANG_DEFAULT; //default sub language } @@ -505,13 +487,7 @@ LCID LocaleSetToLCID( const LocaleSet_t & Locale ) else if ( wsLanguage == L"hy" ) usPrimaryLang = LANG_ARMENIAN; //Armenian else if ( wsLanguage == L"az" ) - { usPrimaryLang = LANG_AZERI; //Azeri - //if ( wsCountry == L" " ) - // usSubLang = SUBLANG_AZERI_LATIN; // Azeri (Latin) - //else if ( wsCountry == L" " ) - // usSubLang = SUBLANG_AZERI_CYRILLIC; // Azeri (Cyrillic) - } else if ( wsLanguage == L"eu" ) usPrimaryLang = LANG_BASQUE; //Basque else if ( wsLanguage == L"mk" ) @@ -584,16 +560,10 @@ LCID LocaleSetToLCID( const LocaleSet_t & Locale ) usPrimaryLang = LANG_KASHMIRI; //Not supported. else if ( wsLanguage == L"ne" ) usPrimaryLang = LANG_NEPALI; //Not supported. - //else if ( wsLanguage == L" " ) - // usPrimaryLang = LANG_MANIPURI; //Not supported. - //else if ( wsLanguage == L" " ) - // usPrimaryLang = LANG_KONKANI; //Konkani - //else if ( wsLanguage == L" " ) - // usPrimaryLang = LANG_SYRIAC; //Syriac - //else if ( wsLanguage == L" " ) - // usPrimaryLang = LANG_DIVEHI; //Divehi else return GetSystemDefaultLCID(); //System Default Locale return MAKELCID( MAKELANGID( usPrimaryLang, usSubLang ), SORT_DEFAULT ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/simplemail/exports.dxp b/shell/source/win32/simplemail/exports.dxp index f0e1c69934bc..f0e1c69934bc 100644..100755 --- a/shell/source/win32/simplemail/exports.dxp +++ b/shell/source/win32/simplemail/exports.dxp diff --git a/shell/source/win32/simplemail/makefile.mk b/shell/source/win32/simplemail/makefile.mk index abd35e408e2d..abd35e408e2d 100644..100755 --- a/shell/source/win32/simplemail/makefile.mk +++ b/shell/source/win32/simplemail/makefile.mk diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx index bb743960afc5..e4dd24dfb11b 100644 --- a/shell/source/win32/simplemail/senddoc.cxx +++ b/shell/source/win32/simplemail/senddoc.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,10 +29,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_shell.hxx" #include <osl/diagnose.h> +#include <sal/macros.h> +#include <rtl/string.hxx> +#include <rtl/ustring.hxx> +#include <rtl/uri.hxx> +#include <osl/thread.hxx> -#ifndef _RTL_STRING_HXX_ -//#include <rtl/string.hxx> -#endif #include "simplemapi.hxx" #define WIN32_LEAN_AND_MEAN @@ -167,7 +170,17 @@ void initMapiMessage( { ZeroMemory(pMapiMessage, sizeof(MapiMessage)); + try { + rtl_uString *subject = NULL; + rtl_uString_newFromAscii(&subject, const_cast<char*>(gSubject.c_str())); + rtl_uString *decoded_subject = NULL; + rtl_uriDecode(subject, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8, &decoded_subject); + rtl::OUString ou_subject(decoded_subject); + pMapiMessage->lpszSubject = strdup(OUStringToOString(ou_subject, osl_getThreadTextEncoding(), RTL_UNICODETOTEXT_FLAGS_UNDEFINED_QUESTIONMARK).getStr()); + } + catch (...) { pMapiMessage->lpszSubject = const_cast<char*>(gSubject.c_str()); + } pMapiMessage->lpszNoteText = (gBody.length() ? const_cast<char*>(gBody.c_str()) : NULL); pMapiMessage->lpOriginator = aMapiOriginator; pMapiMessage->lpRecips = aMapiRecipientList.size() ? &aMapiRecipientList[0] : 0; @@ -189,7 +202,7 @@ char* KnownParameter[] = "--mapi-logon-ui" }; -const size_t nKnownParameter = (sizeof(KnownParameter)/sizeof(KnownParameter[0])); +const size_t nKnownParameter = (SAL_N_ELEMENTS(KnownParameter)); /** @internal */ bool isKnownParameter(const char* aParameterName) @@ -208,7 +221,7 @@ void initParameter(int argc, char* argv[]) { if (!isKnownParameter(argv[i])) { - OSL_ENSURE(false, "Wrong parameter received"); + OSL_FAIL("Wrong parameter received"); continue; } @@ -251,7 +264,6 @@ void initParameter(int argc, char* argv[]) */ int main(int argc, char* argv[]) { - //MessageBox(NULL, "Debug", "Debug", MB_OK); initParameter(argc, argv); @@ -265,7 +277,7 @@ int main(int argc, char* argv[]) { CSimpleMapi mapi; - // #93007# we have to set the flag MAPI_NEW_SESSION, + // we have to set the flag MAPI_NEW_SESSION, // because in the case Outlook xxx (not Outlook Express!) // is installed as Exchange and Mail Client a Profile // selection dialog must appear because we specify no @@ -288,6 +300,20 @@ int main(int argc, char* argv[]) ulRet = mapi.MAPISendMail(hSession, 0, &mapiMsg, gMapiFlags, 0); + // There is no point in treating an aborted mail sending + // dialog as an error to be returned as our exit + // status. If the user decided to abort sending a document + // as mail, OK, that is not an error. + + // Also, it seems that GroupWise makes MAPISendMail() + // return MAPI_E_USER_ABORT even if the mail sending + // dialog was not aborted by the user, and the mail was + // actually sent just fine. See bnc#660241 (visible to + // Novell people only, sorry). + + if (ulRet == MAPI_E_USER_ABORT) + ulRet = SUCCESS_SUCCESS; + mapi.MAPILogoff(hSession, 0, 0, 0); } } @@ -297,7 +323,7 @@ int main(int argc, char* argv[]) #endif ) { - OSL_ENSURE(false, ex.what()); + OSL_FAIL(ex.what()); } return ulRet; } @@ -345,3 +371,5 @@ int main(int argc, char* argv[]) MessageBox(NULL, oss.str().c_str(), "Arguments", MB_OK | MB_ICONINFORMATION); } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/simplemail/simplemapi.cxx b/shell/source/win32/simplemail/simplemapi.cxx index faf383f580aa..3886233e767e 100644 --- a/shell/source/win32/simplemail/simplemapi.cxx +++ b/shell/source/win32/simplemail/simplemapi.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -95,3 +96,4 @@ ULONG CSimpleMapi::MAPISendMail( return m_lpfnMapiSendMail(lhSession, ulUIParam, lpMessage, flFlags, ulReserved); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/simplemail/simplemapi.hxx b/shell/source/win32/simplemail/simplemapi.hxx index e4feb3524ed3..33dc906c5c88 100644 --- a/shell/source/win32/simplemail/simplemapi.hxx +++ b/shell/source/win32/simplemail/simplemapi.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -82,3 +83,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/simplemail/smplmail.component b/shell/source/win32/simplemail/smplmail.component index 59246c6d1551..59246c6d1551 100644..100755 --- a/shell/source/win32/simplemail/smplmail.component +++ b/shell/source/win32/simplemail/smplmail.component diff --git a/shell/source/win32/simplemail/smplmail.xml b/shell/source/win32/simplemail/smplmail.xml index 8176f094acad..8176f094acad 100644..100755 --- a/shell/source/win32/simplemail/smplmail.xml +++ b/shell/source/win32/simplemail/smplmail.xml diff --git a/shell/source/win32/simplemail/smplmailclient.cxx b/shell/source/win32/simplemail/smplmailclient.cxx index 49c546e5721d..52707b3cac19 100644 --- a/shell/source/win32/simplemail/smplmailclient.cxx +++ b/shell/source/win32/simplemail/smplmailclient.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -62,15 +63,15 @@ using css::system::SimpleMailClientFlags::NO_LOGON_DIALOG; typedef std::vector<rtl::OUString> StringList_t; typedef StringList_t::const_iterator StringListIterator_t; -const rtl::OUString TO = rtl::OUString::createFromAscii("--to"); -const rtl::OUString CC = rtl::OUString::createFromAscii("--cc"); -const rtl::OUString BCC = rtl::OUString::createFromAscii("--bcc"); -const rtl::OUString FROM = rtl::OUString::createFromAscii("--from"); -const rtl::OUString SUBJECT = rtl::OUString::createFromAscii("--subject"); -const rtl::OUString BODY = rtl::OUString::createFromAscii("--body"); -const rtl::OUString ATTACH = rtl::OUString::createFromAscii("--attach"); -const rtl::OUString FLAG_MAPI_DIALOG = rtl::OUString::createFromAscii("--mapi-dialog"); -const rtl::OUString FLAG_MAPI_LOGON_UI = rtl::OUString::createFromAscii("--mapi-logon-ui"); +const rtl::OUString TO(RTL_CONSTASCII_USTRINGPARAM("--to")); +const rtl::OUString CC(RTL_CONSTASCII_USTRINGPARAM("--cc")); +const rtl::OUString BCC(RTL_CONSTASCII_USTRINGPARAM("--bcc")); +const rtl::OUString FROM(RTL_CONSTASCII_USTRINGPARAM("--from")); +const rtl::OUString SUBJECT(RTL_CONSTASCII_USTRINGPARAM("--subject")); +const rtl::OUString BODY(RTL_CONSTASCII_USTRINGPARAM("--body")); +const rtl::OUString ATTACH(RTL_CONSTASCII_USTRINGPARAM("--attach")); +const rtl::OUString FLAG_MAPI_DIALOG(RTL_CONSTASCII_USTRINGPARAM("--mapi-dialog")); +const rtl::OUString FLAG_MAPI_LOGON_UI(RTL_CONSTASCII_USTRINGPARAM("--mapi-logon-ui")); namespace /* private */ { @@ -231,7 +232,7 @@ void CSmplMailClient::assembleCommandLine( osl::FileBase::RC err = osl::FileBase::getSystemPathFromFileURL(attachments[i], sysPath); if (err != osl::FileBase::E_None) throw IllegalArgumentException( - rtl::OUString::createFromAscii("Invalid attachment file URL"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid attachment file URL")), static_cast<XSimpleMailClient*>(this), 1); @@ -257,7 +258,7 @@ void SAL_CALL CSmplMailClient::sendSimpleMailMessage( if (!executeSenddoc(senddocParams)) throw Exception( - rtl::OUString::createFromAscii("Send email failed"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Send email failed")), static_cast<XSimpleMailClient*>(this)); } @@ -266,24 +267,25 @@ void CSmplMailClient::validateParameter( { if (!xSimpleMailMessage.is()) throw IllegalArgumentException( - rtl::OUString::createFromAscii("Empty mail message reference"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Empty mail message reference")), static_cast<XSimpleMailClient*>(this), 1); - // #93077# OSL_ENSURE(!(aFlag & NO_LOGON_DIALOG), "Flag NO_LOGON_DIALOG has currently no effect"); // check the flags, the allowed range is 0 - (2^n - 1) if (aFlag < 0 || aFlag > 3) throw IllegalArgumentException( - rtl::OUString::createFromAscii("Invalid flag value"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid flag value")), static_cast<XSimpleMailClient*>(this), 2); // check if a recipient is specified of the flags NO_USER_INTERFACE is specified if ((aFlag & NO_USER_INTERFACE) && !xSimpleMailMessage->getRecipient().getLength()) throw IllegalArgumentException( - rtl::OUString::createFromAscii("No recipient specified"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("No recipient specified")), static_cast<XSimpleMailClient*>(this), 1); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/simplemail/smplmailclient.hxx b/shell/source/win32/simplemail/smplmailclient.hxx index 5457dffbffd9..59e6db285fa9 100644 --- a/shell/source/win32/simplemail/smplmailclient.hxx +++ b/shell/source/win32/simplemail/smplmailclient.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,9 +32,7 @@ #include <cppuhelper/compbase1.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> -#ifndef _COM_SUN_STAR_SYS_SHELL_XSYSTEMSHELLEXECUTE_HPP_ #include <com/sun/star/system/XSimpleMailClient.hpp> -#endif namespace css = ::com::sun::star; @@ -52,3 +51,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/simplemail/smplmailentry.cxx b/shell/source/win32/simplemail/smplmailentry.cxx index 9970baa28122..46d953597cac 100644 --- a/shell/source/win32/simplemail/smplmailentry.cxx +++ b/shell/source/win32/simplemail/smplmailentry.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -57,8 +58,6 @@ using com::sun::star::system::XSimpleMailClientSupplier; #define COMP_REGKEY_NAME "/com.sun.star.system.SimpleSystemMail/UNO/SERVICES/com.sun.star.system.SimpleSystemMail" //----------------------------------------------------------------------- -// -//----------------------------------------------------------------------- namespace { @@ -69,7 +68,7 @@ namespace } //----------------------------------------------------------------------- -// the 3 important functions which will be exported +// the 2 important functions which will be exported //----------------------------------------------------------------------- extern "C" @@ -79,7 +78,7 @@ extern "C" // component_getImplementationEnvironment //---------------------------------------------------------------------- -void SAL_CALL component_getImplementationEnvironment( +SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; @@ -90,14 +89,14 @@ void SAL_CALL component_getImplementationEnvironment( // returns a factory to create XFilePicker-Services //---------------------------------------------------------------------- -void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* /*pRegistryKey*/ ) +SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* /*pRegistryKey*/ ) { void* pRet = 0; if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, COMP_IMPL_NAME ) ) ) { Sequence< OUString > aSNS( 1 ); - aSNS.getArray( )[0] = OUString::createFromAscii( COMP_SERVICE_NAME ); + aSNS.getArray( )[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( COMP_SERVICE_NAME )); Reference< XSingleServiceFactory > xFactory ( createOneInstanceFactory( reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ), @@ -115,3 +114,5 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* p } } // extern "C" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/simplemail/smplmailmsg.cxx b/shell/source/win32/simplemail/smplmailmsg.cxx index 088d84a050ad..ad679d84e062 100644 --- a/shell/source/win32/simplemail/smplmailmsg.cxx +++ b/shell/source/win32/simplemail/smplmailmsg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -59,8 +60,6 @@ CSmplMailMsg::CSmplMailMsg( ) } //------------------------------------------------ -// -//------------------------------------------------ void SAL_CALL CSmplMailMsg::setRecipient( const ::rtl::OUString& aRecipient ) throw (RuntimeException) @@ -69,8 +68,6 @@ void SAL_CALL CSmplMailMsg::setRecipient( const ::rtl::OUString& aRecipient ) } //------------------------------------------------ -// -//------------------------------------------------ ::rtl::OUString SAL_CALL CSmplMailMsg::getRecipient( ) throw (RuntimeException) @@ -79,8 +76,6 @@ void SAL_CALL CSmplMailMsg::setRecipient( const ::rtl::OUString& aRecipient ) } //------------------------------------------------ -// -//------------------------------------------------ void SAL_CALL CSmplMailMsg::setCcRecipient( const Sequence< OUString >& aCcRecipient ) throw (RuntimeException) @@ -89,8 +84,6 @@ void SAL_CALL CSmplMailMsg::setCcRecipient( const Sequence< OUString >& aCcRecip } //------------------------------------------------ -// -//------------------------------------------------ Sequence< OUString > SAL_CALL CSmplMailMsg::getCcRecipient( ) throw (RuntimeException) @@ -99,8 +92,6 @@ Sequence< OUString > SAL_CALL CSmplMailMsg::getCcRecipient( ) } //------------------------------------------------ -// -//------------------------------------------------ void SAL_CALL CSmplMailMsg::setBccRecipient( const Sequence< OUString >& aBccRecipient ) throw (RuntimeException) @@ -109,8 +100,6 @@ void SAL_CALL CSmplMailMsg::setBccRecipient( const Sequence< OUString >& aBccRec } //------------------------------------------------ -// -//------------------------------------------------ Sequence< OUString > SAL_CALL CSmplMailMsg::getBccRecipient( ) throw (RuntimeException) @@ -119,8 +108,6 @@ Sequence< OUString > SAL_CALL CSmplMailMsg::getBccRecipient( ) } //------------------------------------------------ -// -//------------------------------------------------ void SAL_CALL CSmplMailMsg::setOriginator( const OUString& aOriginator ) throw (RuntimeException) @@ -129,8 +116,6 @@ void SAL_CALL CSmplMailMsg::setOriginator( const OUString& aOriginator ) } //------------------------------------------------ -// -//------------------------------------------------ OUString SAL_CALL CSmplMailMsg::getOriginator( ) throw (RuntimeException) @@ -139,8 +124,6 @@ OUString SAL_CALL CSmplMailMsg::getOriginator( ) } //------------------------------------------------ -// -//------------------------------------------------ void SAL_CALL CSmplMailMsg::setSubject( const OUString& aSubject ) throw (RuntimeException) @@ -149,8 +132,6 @@ void SAL_CALL CSmplMailMsg::setSubject( const OUString& aSubject ) } //------------------------------------------------ -// -//------------------------------------------------ OUString SAL_CALL CSmplMailMsg::getSubject( ) throw (RuntimeException) @@ -159,8 +140,6 @@ OUString SAL_CALL CSmplMailMsg::getSubject( ) } //------------------------------------------------ -// -//------------------------------------------------ void SAL_CALL CSmplMailMsg::setAttachement( const Sequence< ::rtl::OUString >& aAttachement ) throw (IllegalArgumentException, RuntimeException) @@ -169,11 +148,11 @@ void SAL_CALL CSmplMailMsg::setAttachement( const Sequence< ::rtl::OUString >& a } //------------------------------------------------ -// -//------------------------------------------------ Sequence< OUString > SAL_CALL CSmplMailMsg::getAttachement( ) throw (RuntimeException) { return m_Attachements; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/simplemail/smplmailmsg.hxx b/shell/source/win32/simplemail/smplmailmsg.hxx index caeb0710de90..237996bf2c08 100644 --- a/shell/source/win32/simplemail/smplmailmsg.hxx +++ b/shell/source/win32/simplemail/smplmailmsg.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,9 +37,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/IllegalArgumentException.hpp> -#ifndef _COM_SUN_STAR_SYS_SHELL_XSYSTEMSHELLEXECUTE_HPP_ #include <com/sun/star/system/XSimpleMailMessage.hpp> -#endif //---------------------------------------------------------- // class declaration @@ -51,8 +50,6 @@ public: CSmplMailMsg( ); //------------------------------------------------ - // - //------------------------------------------------ virtual void SAL_CALL setRecipient( const ::rtl::OUString& aRecipient ) throw (::com::sun::star::uno::RuntimeException); @@ -61,8 +58,6 @@ public: throw (::com::sun::star::uno::RuntimeException); //------------------------------------------------ - // - //------------------------------------------------ virtual void SAL_CALL setCcRecipient( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aCcRecipient ) throw (::com::sun::star::uno::RuntimeException); @@ -71,8 +66,6 @@ public: throw (::com::sun::star::uno::RuntimeException); //------------------------------------------------ - // - //------------------------------------------------ virtual void SAL_CALL setBccRecipient( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aBccRecipient ) throw (::com::sun::star::uno::RuntimeException); @@ -81,8 +74,6 @@ public: throw (::com::sun::star::uno::RuntimeException); //------------------------------------------------ - // - //------------------------------------------------ virtual void SAL_CALL setOriginator( const ::rtl::OUString& aOriginator ) throw (::com::sun::star::uno::RuntimeException); @@ -91,8 +82,6 @@ public: throw (::com::sun::star::uno::RuntimeException); //------------------------------------------------ - // - //------------------------------------------------ virtual void SAL_CALL setSubject( const ::rtl::OUString& aSubject ) throw (::com::sun::star::uno::RuntimeException); @@ -101,8 +90,6 @@ public: throw (::com::sun::star::uno::RuntimeException); //------------------------------------------------ - // - //------------------------------------------------ virtual void SAL_CALL setAttachement( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aAttachement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); @@ -120,3 +107,5 @@ private: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/simplemail/smplmailsuppl.cxx b/shell/source/win32/simplemail/smplmailsuppl.cxx index 375da5b07856..9202df97efb8 100644 --- a/shell/source/win32/simplemail/smplmailsuppl.cxx +++ b/shell/source/win32/simplemail/smplmailsuppl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -49,7 +50,7 @@ namespace // private Sequence< OUString > SAL_CALL Component_getSupportedServiceNames() { Sequence< OUString > aRet(1); - aRet[0] = OUString::createFromAscii("com.sun.star.sys.shell.SimpleSystemMail"); + aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sys.shell.SimpleSystemMail")); return aRet; } @@ -84,7 +85,7 @@ Reference<XSimpleMailClient> SAL_CALL CSmplMailSuppl::querySimpleMailClient() OUString SAL_CALL CSmplMailSuppl::getImplementationName() throw(RuntimeException) { - return OUString::createFromAscii(COMP_IMPL_NAME); + return OUString(RTL_CONSTASCII_USTRINGPARAM(COMP_IMPL_NAME)); } sal_Bool SAL_CALL CSmplMailSuppl::supportsService(const OUString& ServiceName) @@ -105,3 +106,4 @@ Sequence<OUString> SAL_CALL CSmplMailSuppl::getSupportedServiceNames() return Component_getSupportedServiceNames(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/simplemail/smplmailsuppl.hxx b/shell/source/win32/simplemail/smplmailsuppl.hxx index e945556c6f8b..819ef2e50b59 100644 --- a/shell/source/win32/simplemail/smplmailsuppl.hxx +++ b/shell/source/win32/simplemail/smplmailsuppl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,13 +33,9 @@ #include <osl/mutex.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> -#ifndef _COM_SUN_STAR_SYS_SHELL_XSYSTEMSHELLEXECUTE_HPP_ #include <com/sun/star/system/XSimpleMailClientSupplier.hpp> -#endif -#ifndef _SIMPLEMAPI_HXX_ #include "simplemapi.hxx" -#endif class CSmplMailSupplBase @@ -73,3 +70,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/syssh.component b/shell/source/win32/syssh.component index 1e783f5221ae..1e783f5221ae 100644..100755 --- a/shell/source/win32/syssh.component +++ b/shell/source/win32/syssh.component diff --git a/shell/source/win32/syssh.xml b/shell/source/win32/syssh.xml index 3af4c73dc111..3af4c73dc111 100644..100755 --- a/shell/source/win32/syssh.xml +++ b/shell/source/win32/syssh.xml diff --git a/shell/source/win32/workbench/TestProxySet.cxx b/shell/source/win32/workbench/TestProxySet.cxx index ab0d89e945d2..6046d57e942c 100644 --- a/shell/source/win32/workbench/TestProxySet.cxx +++ b/shell/source/win32/workbench/TestProxySet.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -97,10 +98,10 @@ int SAL_CALL main(int, char*, char* ) OUString rdbName = OUString( RTL_CONSTASCII_USTRINGPARAM( RDB_SYSPATH ) ); Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( rdbName ) ); - // Print a message if an error occured. + // Print a message if an error occurred. if ( g_xFactory.is() == sal_False ) { - OSL_ENSURE(sal_False, "Can't create RegistryServiceFactory"); + OSL_FAIL("Can't create RegistryServiceFactory"); return(-1); } @@ -113,11 +114,11 @@ int SAL_CALL main(int, char*, char* ) try { Reference< XProxySettings > xProxySettings( - g_xFactory->createInstance( OUString::createFromAscii( "com.sun.star.system.SystemProxySettings" ) ), UNO_QUERY ); + g_xFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SystemProxySettings")) ), UNO_QUERY ); if ( !xProxySettings.is() ) { - OSL_ENSURE( sal_False, "Error creating SystemProxySettings Service" ); + OSL_FAIL( "Error creating SystemProxySettings Service" ); return(-1); } @@ -140,11 +141,11 @@ int SAL_CALL main(int, char*, char* ) printf( "Test of SystemProxySettings successful\n" ); xProxySettings = Reference< XProxySettings >( - g_xFactory->createInstance( OUString::createFromAscii( "com.sun.star.system.SOProxySettings" ) ), UNO_QUERY ); + g_xFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SOProxySettings")) ), UNO_QUERY ); if ( !xProxySettings.is() ) { - OSL_ENSURE( sal_False, "Error creating SystemProxySettings Service" ); + OSL_FAIL( "Error creating SystemProxySettings Service" ); return(-1); } @@ -183,10 +184,10 @@ int SAL_CALL main(int, char*, char* ) // Cast factory to XComponent Reference< XComponent > xComponent( g_xFactory, UNO_QUERY ); - // Print a message if an error occured. + // Print a message if an error occurred. if ( xComponent.is() == sal_False ) { - OSL_ENSURE(sal_False, "Error shuting down"); + OSL_FAIL("Error shuting down"); } // Dispose and clear factory @@ -198,3 +199,5 @@ int SAL_CALL main(int, char*, char* ) return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/workbench/TestSmplMail.cxx b/shell/source/win32/workbench/TestSmplMail.cxx index a9b04a9f4e05..9e00ef389ebf 100644 --- a/shell/source/win32/workbench/TestSmplMail.cxx +++ b/shell/source/win32/workbench/TestSmplMail.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -92,10 +93,10 @@ int SAL_CALL main(int , char*, char* ) OUString rdbName = OUString( RTL_CONSTASCII_USTRINGPARAM( RDB_SYSPATH ) ); Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( rdbName ) ); - // Print a message if an error occured. + // Print a message if an error occurred. if ( g_xFactory.is() == sal_False ) { - OSL_ENSURE(sal_False, "Can't create RegistryServiceFactory"); + OSL_FAIL("Can't create RegistryServiceFactory"); return(-1); } @@ -108,11 +109,11 @@ int SAL_CALL main(int , char*, char* ) try { Reference< XSimpleMailClientSupplier > xSmplMailClientSuppl( - g_xFactory->createInstance( OUString::createFromAscii( "com.sun.star.system.SimpleSystemMail" ) ), UNO_QUERY ); + g_xFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SimpleSystemMail")) ), UNO_QUERY ); if ( !xSmplMailClientSuppl.is() ) { - OSL_ENSURE( sal_False, "Error creating SimpleSystemMail Service" ); + OSL_FAIL( "Error creating SimpleSystemMail Service" ); return(-1); } @@ -126,30 +127,30 @@ int SAL_CALL main(int , char*, char* ) if ( xSmplMailMsg.is( ) ) { - xSmplMailMsg->setRecipient( OUString::createFromAscii("tino.rachui@germany.sun.com") ); - xSmplMailMsg->setOriginator( OUString::createFromAscii( "tino.rachui@germany.sun.com" ) ); + xSmplMailMsg->setRecipient( OUString(RTL_CONSTASCII_USTRINGPARAM("tino.rachui@germany.sun.com")) ); + xSmplMailMsg->setOriginator( OUString(RTL_CONSTASCII_USTRINGPARAM("tino.rachui@germany.sun.com")) ); Sequence< OUString > ccRecips( 1 ); - ccRecips[0] = OUString::createFromAscii( "tino.rachui@germany.sun.com" ); + ccRecips[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("tino.rachui@germany.sun.com")); xSmplMailMsg->setCcRecipient( ccRecips ); Sequence< OUString > bccRecips( 1 ); - bccRecips[0] = OUString::createFromAscii( "tino.rachui@germany.sun.com" ); + bccRecips[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("tino.rachui@germany.sun.com")); xSmplMailMsg->setBccRecipient( bccRecips ); - xSmplMailMsg->setSubject( OUString::createFromAscii( "Mapi Test" ) ); + xSmplMailMsg->setSubject( OUString(RTL_CONSTASCII_USTRINGPARAM("Mapi Test")) ); Sequence< OUString > attachements( 2 ); - OUString aFile = OUString::createFromAscii( "D:\\Projects\\gsl\\shell\\wntmsci7\\bin\\testprx.exe" ); + OUString aFile(RTL_CONSTASCII_USTRINGPARAM("D:\\Projects\\gsl\\shell\\wntmsci7\\bin\\testprx.exe")); OUString aFileURL; osl::FileBase::getFileURLFromSystemPath( aFile, aFileURL ); attachements[0] = aFileURL; - aFile = OUString::createFromAscii( "D:\\Projects\\gsl\\shell\\wntmsci7\\bin\\testsyssh.exe" ); + aFile = OUString(RTL_CONSTASCII_USTRINGPARAM("D:\\Projects\\gsl\\shell\\wntmsci7\\bin\\testsyssh.exe")); osl::FileBase::getFileURLFromSystemPath( aFile, aFileURL ); attachements[1] = aFile; @@ -171,10 +172,10 @@ int SAL_CALL main(int , char*, char* ) // Cast factory to XComponent Reference< XComponent > xComponent( g_xFactory, UNO_QUERY ); - // Print a message if an error occured. + // Print a message if an error occurred. if ( xComponent.is() == sal_False ) { - OSL_ENSURE(sal_False, "Error shuting down"); + OSL_FAIL("Error shuting down"); } // Dispose and clear factory @@ -186,3 +187,5 @@ int SAL_CALL main(int , char*, char* ) return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/workbench/TestSysShExec.cxx b/shell/source/win32/workbench/TestSysShExec.cxx index c459408d3802..d6b934f89708 100644 --- a/shell/source/win32/workbench/TestSysShExec.cxx +++ b/shell/source/win32/workbench/TestSysShExec.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,9 +36,7 @@ #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/registry/XSimpleRegistry.hpp> -#ifndef _COM_SUN_STAR_SYS_SHELL_XSYSTEMSHELLEXECUTE_HPP_ #include <com/sun/star/system/XSystemShellExecute.hpp> -#endif #include <cppuhelper/servicefactory.hxx> @@ -104,10 +103,10 @@ int SAL_CALL main(int nArgc, char* Argv[], char* ) OUString rdbName = OUString( RTL_CONSTASCII_USTRINGPARAM( RDB_SYSPATH ) ); Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( rdbName ) ); - // Print a message if an error occured. + // Print a message if an error occurred. if ( g_xFactory.is() == sal_False ) { - OSL_ENSURE(sal_False, "Can't create RegistryServiceFactory"); + OSL_FAIL("Can't create RegistryServiceFactory"); return(-1); } @@ -118,11 +117,11 @@ int SAL_CALL main(int nArgc, char* Argv[], char* ) //------------------------------------------------- Reference< XSystemShellExecute > xSysShExec( - g_xFactory->createInstance( OUString::createFromAscii( "com.sun.star.system.SystemShellExecute" ) ), UNO_QUERY ); + g_xFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SystemShellExecute")) ), UNO_QUERY ); if ( !xSysShExec.is() ) { - OSL_ENSURE( sal_False, "Error creating SystemShellExecute Service" ); + OSL_FAIL( "Error creating SystemShellExecute Service" ); return(-1); } @@ -136,11 +135,11 @@ int SAL_CALL main(int nArgc, char* Argv[], char* ) } catch( SystemShellExecuteException& ) { - OSL_ENSURE( sal_False, "Error executing system command" ); + OSL_FAIL( "Error executing system command" ); } catch( IllegalArgumentException& ) { - OSL_ENSURE( sal_False, "Invalid parameter" ); + OSL_FAIL( "Invalid parameter" ); } //-------------------------------------------------- @@ -150,10 +149,10 @@ int SAL_CALL main(int nArgc, char* Argv[], char* ) // Cast factory to XComponent Reference< XComponent > xComponent( g_xFactory, UNO_QUERY ); - // Print a message if an error occured. + // Print a message if an error occurred. if ( xComponent.is() == sal_False ) { - OSL_ENSURE(sal_False, "Error shuting down"); + OSL_FAIL("Error shuting down"); } // Dispose and clear factory @@ -165,3 +164,5 @@ int SAL_CALL main(int nArgc, char* Argv[], char* ) return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/win32/workbench/makefile.mk b/shell/source/win32/workbench/makefile.mk index 9d9c7945b9bf..9d9c7945b9bf 100644..100755 --- a/shell/source/win32/workbench/makefile.mk +++ b/shell/source/win32/workbench/makefile.mk |