summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAugust Sodora <augsod@gmail.com>2011-12-07 21:58:26 -0500
committerAugust Sodora <augsod@gmail.com>2011-12-07 21:59:28 -0500
commitbd7f8380113b0cbe706d131b33e7551b2c484205 (patch)
tree60ff450396806f72bf2945eae0a86af9461b3746
parent855115d2f5845502e8619b35666512023584e012 (diff)
Remove oooimprovement
-rw-r--r--comphelper/Library_comphelp.mk1
-rw-r--r--comphelper/Package_inc.mk1
-rw-r--r--comphelper/inc/comphelper/uieventslogger.hxx60
-rw-r--r--comphelper/source/misc/uieventslogger.cxx680
-rw-r--r--cui/AllLangResTarget_cui.mk1
-rw-r--r--cui/Library_cui.mk2
-rw-r--r--cui/source/factory/dlgfact.cxx9
-rw-r--r--cui/source/inc/optimprove.hxx120
-rw-r--r--cui/source/options/optimprove.cxx197
-rw-r--r--cui/source/options/optimprove.hrc50
-rw-r--r--cui/source/options/optimprove.src124
-rw-r--r--cui/source/options/optimprove2.cxx267
-rw-r--r--cui/source/options/treeopt.cxx43
-rw-r--r--cui/source/options/treeopt.src1
-rw-r--r--extensions/prj/build.lst4
-rw-r--r--extensions/prj/d.lst2
-rw-r--r--extensions/source/oooimprovecore/core.cxx190
-rw-r--r--extensions/source/oooimprovecore/makefile.mk82
-rw-r--r--extensions/source/oooimprovecore/oooimprovecore.component34
-rw-r--r--extensions/source/oooimprovecore/oooimprovecore_module.cxx54
-rw-r--r--extensions/source/oooimprovecore/oooimprovecore_module.hxx89
-rw-r--r--extensions/source/oooimprovecore/oooimprovecore_services.cxx51
-rw-r--r--extensions/source/oooimprovement/Jobs.xcu25
-rw-r--r--extensions/source/oooimprovement/Logging.xcu8
-rw-r--r--extensions/source/oooimprovement/config.cxx297
-rw-r--r--extensions/source/oooimprovement/config.hxx67
-rw-r--r--extensions/source/oooimprovement/corecontroller.cxx90
-rw-r--r--extensions/source/oooimprovement/corecontroller.hxx86
-rw-r--r--extensions/source/oooimprovement/errormail.cxx206
-rw-r--r--extensions/source/oooimprovement/errormail.hxx57
-rw-r--r--extensions/source/oooimprovement/invite_job.cxx125
-rw-r--r--extensions/source/oooimprovement/invite_job.hxx84
-rw-r--r--extensions/source/oooimprovement/logpacker.cxx115
-rw-r--r--extensions/source/oooimprovement/logpacker.hxx54
-rw-r--r--extensions/source/oooimprovement/logstorage.cxx147
-rw-r--r--extensions/source/oooimprovement/logstorage.hxx58
-rw-r--r--extensions/source/oooimprovement/makefile.mk110
-rw-r--r--extensions/source/oooimprovement/makefile.pmk29
-rw-r--r--extensions/source/oooimprovement/myconfigurationhelper.cxx156
-rw-r--r--extensions/source/oooimprovement/myconfigurationhelper.hxx213
-rw-r--r--extensions/source/oooimprovement/onlogrotate_job.cxx241
-rw-r--r--extensions/source/oooimprovement/onlogrotate_job.hxx85
-rw-r--r--extensions/source/oooimprovement/oooimprovement.component38
-rw-r--r--extensions/source/oooimprovement/oooimprovement_exports.cxx86
-rw-r--r--extensions/source/oooimprovement/soaprequest.cxx201
-rw-r--r--extensions/source/oooimprovement/soaprequest.hxx63
-rw-r--r--extensions/source/oooimprovement/soapsender.cxx161
-rw-r--r--extensions/source/oooimprovement/soapsender.hxx59
-rw-r--r--framework/source/inc/dispatch/uieventloghelper.hxx85
-rw-r--r--framework/source/uielement/buttontoolbarcontroller.cxx3
-rw-r--r--framework/source/uielement/complextoolbarcontroller.cxx7
-rw-r--r--framework/source/uielement/controlmenucontroller.cxx3
-rw-r--r--framework/source/uielement/fontmenucontroller.cxx7
-rw-r--r--framework/source/uielement/fontsizemenucontroller.cxx3
-rw-r--r--framework/source/uielement/footermenucontroller.cxx1
-rw-r--r--framework/source/uielement/generictoolbarcontroller.cxx4
-rw-r--r--framework/source/uielement/headermenucontroller.cxx3
-rw-r--r--framework/source/uielement/langselectionmenucontroller.cxx3
-rw-r--r--framework/source/uielement/langselectionstatusbarcontroller.cxx3
-rw-r--r--framework/source/uielement/macrosmenucontroller.cxx3
-rw-r--r--framework/source/uielement/menubarmanager.cxx3
-rw-r--r--framework/source/uielement/newmenucontroller.cxx3
-rw-r--r--framework/source/uielement/objectmenucontroller.cxx3
-rw-r--r--framework/source/uielement/recentfilesmenucontroller.cxx3
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx3
-rw-r--r--offapi/UnoApi_offapi.mk8
-rw-r--r--offapi/com/sun/star/oooimprovement/Core.idl55
-rw-r--r--offapi/com/sun/star/oooimprovement/CoreController.idl56
-rw-r--r--offapi/com/sun/star/oooimprovement/XCore.idl59
-rw-r--r--offapi/com/sun/star/oooimprovement/XCoreController.idl57
-rw-r--r--postprocess/packcomponents/makefile.mk1
-rw-r--r--postprocess/packregistry/makefile.mk6
-rw-r--r--postprocess/rebase/coffbase.txt2
-rw-r--r--scp2/source/ooo/file_library_ooo.scp2
-rw-r--r--setup_native/source/packinfo/packinfo_office.txt46
-rw-r--r--sfx2/source/control/bindings.cxx20
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx41
-rwxr-xr-xsvx/inc/svx/dialogs.hrc1
-rw-r--r--svx/source/dialog/svxruler.cxx29
79 files changed, 1 insertions, 5445 deletions
diff --git a/comphelper/Library_comphelp.mk b/comphelper/Library_comphelp.mk
index 29ab7800df0a..be3699413c02 100644
--- a/comphelper/Library_comphelp.mk
+++ b/comphelper/Library_comphelp.mk
@@ -115,7 +115,6 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\
comphelper/source/misc/string \
comphelper/source/misc/synchronousdispatch \
comphelper/source/misc/types \
- comphelper/source/misc/uieventslogger \
comphelper/source/misc/weak \
comphelper/source/misc/weakeventlistener \
comphelper/source/officeinstdir/officeinstallationdirectories \
diff --git a/comphelper/Package_inc.mk b/comphelper/Package_inc.mk
index 87e4a2a8b7b7..bb5490b4d795 100644
--- a/comphelper/Package_inc.mk
+++ b/comphelper/Package_inc.mk
@@ -55,7 +55,6 @@ $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/TypeGeneration.h
$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/MasterPropertySetInfo.hxx,comphelper/MasterPropertySetInfo.hxx))
$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/accessiblewrapper.hxx,comphelper/accessiblewrapper.hxx))
$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/sequence.hxx,comphelper/sequence.hxx))
-$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/uieventslogger.hxx,comphelper/uieventslogger.hxx))
$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/docpasswordhelper.hxx,comphelper/docpasswordhelper.hxx))
$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertystatecontainer.hxx,comphelper/propertystatecontainer.hxx))
$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/propertysetinfo.hxx,comphelper/propertysetinfo.hxx))
diff --git a/comphelper/inc/comphelper/uieventslogger.hxx b/comphelper/inc/comphelper/uieventslogger.hxx
deleted file mode 100644
index 40e9a68ad1cf..000000000000
--- a/comphelper/inc/comphelper/uieventslogger.hxx
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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 _COMPHELPER_UIEVENTSLOGGER_HXX
-#define _COMPHELPER_UIEVENTSLOGGER_HXX
-
-#include <com/sun/star/uno/Sequence.hxx>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/util/URL.hpp>
-#include <comphelper/comphelperdllapi.h>
-#include <rtl/ustring.hxx>
-
-
-namespace comphelper
-{
- // this class is part of the OOo Improvement Program Core
- class COMPHELPER_DLLPUBLIC UiEventsLogger
- {
- public:
- static sal_Bool isEnabled();
- static sal_Int32 getSessionLogEventCount();
- static void appendDispatchOrigin( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& args, const ::rtl::OUString& originapp, const ::rtl::OUString& originwidget);
- static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> purgeDispatchOrigin(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& args);
- static void logDispatch(const ::com::sun::star::util::URL& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& args);
- static void logVcl(const ::rtl::OUString& parent_id, sal_Int32 window_type, const ::rtl::OUString& id, const ::rtl::OUString& method, const ::rtl::OUString& param);
- static void logVcl(const ::rtl::OUString& parent_id, sal_Int32 window_type, const ::rtl::OUString& id, const ::rtl::OUString& method, sal_Int32 param);
- static void logVcl(const ::rtl::OUString& parent_id, sal_Int32 window_type, const ::rtl::OUString& id, const ::rtl::OUString& method);
- static void disposing();
- static void reinit();
- virtual ~UiEventsLogger() {}
- };
-}
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/comphelper/source/misc/uieventslogger.cxx b/comphelper/source/misc/uieventslogger.cxx
deleted file mode 100644
index 5fa210d29605..000000000000
--- a/comphelper/source/misc/uieventslogger.cxx
+++ /dev/null
@@ -1,680 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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.
- *
-***********************************************************************/
-
-
-#include <comphelper/uieventslogger.hxx>
-#include <com/sun/star/frame/XDesktop.hpp>
-#include <com/sun/star/frame/XTerminateListener.hpp>
-#include <com/sun/star/lang/XEventListener.hpp>
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/logging/LogLevel.hpp>
-#include <com/sun/star/logging/XCsvLogFormatter.hpp>
-#include <com/sun/star/logging/XLogHandler.hpp>
-#include <com/sun/star/logging/XLogger.hpp>
-#include <com/sun/star/logging/XLoggerPool.hpp>
-#include <com/sun/star/oooimprovement/XCoreController.hpp>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <com/sun/star/util/XStringSubstitution.hpp>
-#include <comphelper/configurationhelper.hxx>
-#include <comphelper/processfactory.hxx>
-#include <map>
-#include <osl/file.hxx>
-#include <osl/mutex.hxx>
-#include <osl/time.h>
-#include <rtl/ustrbuf.hxx>
-#include <rtl/instance.hxx>
-
-
-using namespace com::sun::star::beans;
-using namespace com::sun::star::frame;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::logging;
-using namespace com::sun::star::oooimprovement;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::util;
-using namespace cppu;
-using namespace osl;
-using namespace std;
-
-using ::rtl::OUString;
-using ::rtl::OUStringBuffer;
-
-namespace
-{
- static void lcl_SetupOriginAppAbbr(map<OUString, OUString>& abbrs)
- {
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextDocument"))] = OUString(sal_Unicode('W')); // Writer
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetDocument"))] = OUString(sal_Unicode('C')); // Calc
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.PresentationDocument"))] = OUString(sal_Unicode('I')); // Impress
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.DrawingDocument"))] = OUString(sal_Unicode('D')); // Draw
- };
-
- static void lcl_SetupOriginWidgetAbbr(map<OUString,OUString>& abbrs)
- {
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("ButtonToolbarController"))] = OUString(sal_Unicode('0'));
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("ComplexToolbarController"))] = OUString(sal_Unicode('1'));
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("ControlMenuController"))] = OUString(sal_Unicode('2'));
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("FontMenuController"))] = OUString(sal_Unicode('3'));
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("FontSizeMenuController"))] = OUString(sal_Unicode('4'));
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("FooterMenuController"))] = OUString(sal_Unicode('5'));
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("GenericToolbarController"))] = OUString(sal_Unicode('6'));
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("HeaderMenuController"))] = OUString(sal_Unicode('7'));
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("LanguageSelectionMenuController"))] = OUString(sal_Unicode('8'));
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("LangSelectionStatusbarController"))] = OUString(sal_Unicode('9'));
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("MacrosMenuController"))] = OUString(RTL_CONSTASCII_USTRINGPARAM("10"));
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("MenuBarManager"))] = OUString(RTL_CONSTASCII_USTRINGPARAM("11"));
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("NewMenuController"))] = OUString(RTL_CONSTASCII_USTRINGPARAM("12"));
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("ObjectMenuController"))] = OUString(RTL_CONSTASCII_USTRINGPARAM("13"));
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("RecentFilesMenuController"))] = OUString(RTL_CONSTASCII_USTRINGPARAM("14"));
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("ToolbarsMenuController"))] = OUString(RTL_CONSTASCII_USTRINGPARAM("15"));
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("SfxToolBoxControl"))] = OUString(RTL_CONSTASCII_USTRINGPARAM("16"));
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("SfxAsyncExec"))] = OUString(RTL_CONSTASCII_USTRINGPARAM("17"));
- abbrs[OUString(RTL_CONSTASCII_USTRINGPARAM("AcceleratorExecute"))] = OUString(RTL_CONSTASCII_USTRINGPARAM("18"));
- };
-}
-
-namespace comphelper
-{
- // declaration of implementation
- class UiEventsLogger_Impl;
- class UiEventsLogger_Impl : public UiEventsLogger
- {
- private:
- //typedefs and friends
- friend class UiEventsLogger;
- typedef UiEventsLogger_Impl* ptr;
-
- // instance methods and data
- UiEventsLogger_Impl();
- void initializeLogger();
- void logDispatch(const ::com::sun::star::util::URL& url,
- const Sequence<PropertyValue>& args);
- void logRotated();
- void logVcl(const ::rtl::OUString& parent_id,
- sal_Int32 window_type,
- const ::rtl::OUString& id,
- const ::rtl::OUString& method,
- const ::rtl::OUString& param);
- void rotate();
- void hotRotate();
- void prepareLogHandler();
- void checkIdleTimeout();
- OUString getCurrentPath();
- OUString getRotatedPath();
- void disposing();
-
- bool m_Active;
- TimeValue m_LastLogEventTime;
- const OUString m_LogPath;
- const TimeValue m_IdleTimeout;
- sal_Int32 m_SessionLogEventCount;
- Reference<XLogger> m_Logger;
- Reference<XLogHandler> m_LogHandler;
- Reference<XCsvLogFormatter> m_Formatter;
- map<OUString, OUString> m_OriginAppAbbr;
- map<OUString, OUString> m_OriginWidgetAbbr;
-
-
- // static methods and data
- static ptr getInstance();
- static bool shouldActivate();
- static bool getEnabledFromCoreController();
- static bool getEnabledFromCfg();
- static TimeValue getIdleTimeoutFromCfg();
- static OUString getLogPathFromCfg();
- static sal_Int32 findIdx(const Sequence<PropertyValue>& args, const OUString& key);
-
- static ptr instance;
- static const sal_Int32 COLUMNS;
- static const OUString CFG_ENABLED;
- static const OUString CFG_IDLETIMEOUT;
- static const OUString CFG_LOGGING;
- static const OUString CFG_LOGPATH;
- static const OUString CFG_OOOIMPROVEMENT;
- static const OUString ETYPE_DISPATCH;
- static const OUString ETYPE_ROTATED;
- static const OUString ETYPE_VCL;
- static const OUString CSSL_CSVFORMATTER;
- static const OUString CSSL_FILEHANDLER;
- static const OUString CSSL_LOGGERPOOL;
- static const OUString CSSO_CORECONTROLLER;
- static const OUString CSST_JOBEXECUTOR;
- static const OUString CSSU_PATHSUB;
- static const OUString LOGGERNAME;
- static const OUString LOGORIGINAPP;
- static const OUString LOGORIGINWIDGET;
- static const OUString UNKNOWN_ORIGIN;
- static const OUString FN_CURRENTLOG;
- static const OUString FN_ROTATEDLOG;
- static const OUString LOGROTATE_EVENTNAME;
- static const OUString URL_UNO;
- static const OUString URL_SPECIAL;
- static const OUString URL_FILE;
- };
-}
-
-namespace comphelper
-{
- // consts
- const sal_Int32 UiEventsLogger_Impl::COLUMNS = 9;
- const OUString UiEventsLogger_Impl::CFG_ENABLED(RTL_CONSTASCII_USTRINGPARAM("EnablingAllowed"));
- const OUString UiEventsLogger_Impl::CFG_IDLETIMEOUT(RTL_CONSTASCII_USTRINGPARAM("IdleTimeout"));
- const OUString UiEventsLogger_Impl::CFG_LOGGING(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.Logging"));
- const OUString UiEventsLogger_Impl::CFG_LOGPATH(RTL_CONSTASCII_USTRINGPARAM("LogPath"));
- const OUString UiEventsLogger_Impl::CFG_OOOIMPROVEMENT(RTL_CONSTASCII_USTRINGPARAM("OOoImprovement"));
-
- const OUString UiEventsLogger_Impl::CSSL_CSVFORMATTER(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.logging.CsvFormatter"));
- const OUString UiEventsLogger_Impl::CSSL_FILEHANDLER(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.logging.FileHandler"));
- const OUString UiEventsLogger_Impl::CSSL_LOGGERPOOL(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.logging.LoggerPool"));
- const OUString UiEventsLogger_Impl::CSSO_CORECONTROLLER(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.oooimprovement.CoreController"));
- const OUString UiEventsLogger_Impl::CSSU_PATHSUB(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.PathSubstitution"));
-
- const OUString UiEventsLogger_Impl::ETYPE_DISPATCH(RTL_CONSTASCII_USTRINGPARAM("dispatch"));
- const OUString UiEventsLogger_Impl::ETYPE_ROTATED(RTL_CONSTASCII_USTRINGPARAM("rotated"));
- const OUString UiEventsLogger_Impl::ETYPE_VCL(RTL_CONSTASCII_USTRINGPARAM("vcl"));
-
- const OUString UiEventsLogger_Impl::LOGGERNAME(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.oooimprovement.Core.UiEventsLogger"));
- const OUString UiEventsLogger_Impl::LOGORIGINWIDGET(RTL_CONSTASCII_USTRINGPARAM("comphelper.UiEventsLogger.LogOriginWidget"));
- const OUString UiEventsLogger_Impl::LOGORIGINAPP(RTL_CONSTASCII_USTRINGPARAM("comphelper.UiEventsLogger.LogOriginApp"));
-
- const OUString UiEventsLogger_Impl::UNKNOWN_ORIGIN(RTL_CONSTASCII_USTRINGPARAM("unknown origin"));
- const OUString UiEventsLogger_Impl::FN_CURRENTLOG(RTL_CONSTASCII_USTRINGPARAM("Current"));
- const OUString UiEventsLogger_Impl::FN_ROTATEDLOG(RTL_CONSTASCII_USTRINGPARAM("OOoImprove"));
- const OUString UiEventsLogger_Impl::LOGROTATE_EVENTNAME(RTL_CONSTASCII_USTRINGPARAM("onOOoImprovementLogRotated"));
-
- const OUString UiEventsLogger_Impl::URL_UNO(RTL_CONSTASCII_USTRINGPARAM(".uno:"));
- const OUString UiEventsLogger_Impl::URL_SPECIAL(RTL_CONSTASCII_USTRINGPARAM(".special:"));
- const OUString UiEventsLogger_Impl::URL_FILE(RTL_CONSTASCII_USTRINGPARAM("file:"));
-
- namespace
- {
- struct theSingletonMutex : public rtl::Static< Mutex, theSingletonMutex > {};
- }
-
- // public UiEventsLogger interface
- sal_Bool UiEventsLogger::isEnabled()
- {
- if ( UiEventsLogger_Impl::getEnabledFromCfg() )
- {
- try {
- Guard<Mutex> singleton_guard(theSingletonMutex::get());
- return UiEventsLogger_Impl::getInstance()->m_Active;
- } catch(...) { return false; } // never throws
- } // if ( )
- return sal_False;
- }
-
- sal_Int32 UiEventsLogger::getSessionLogEventCount()
- {
- try {
- Guard<Mutex> singleton_guard(theSingletonMutex::get());
- return UiEventsLogger_Impl::getInstance()->m_SessionLogEventCount;
- } catch(...) { return 0; } // never throws
- }
-
- void UiEventsLogger::appendDispatchOrigin(
- Sequence<PropertyValue>& args,
- const OUString& originapp,
- const OUString& originwidget)
- {
- sal_Int32 old_length = args.getLength();
- args.realloc(old_length+2);
- args[old_length].Name = UiEventsLogger_Impl::LOGORIGINAPP;
- args[old_length].Value = static_cast<Any>(originapp);
- args[old_length+1].Name = UiEventsLogger_Impl::LOGORIGINWIDGET;
- args[old_length+1].Value = static_cast<Any>(originwidget);
- }
-
- Sequence<PropertyValue> UiEventsLogger::purgeDispatchOrigin(
- const Sequence<PropertyValue>& args)
- {
- Sequence<PropertyValue> result(args.getLength());
- sal_Int32 target_idx=0;
- for(sal_Int32 source_idx=0; source_idx<args.getLength(); source_idx++)
- if(args[source_idx].Name != UiEventsLogger_Impl::LOGORIGINAPP
- && args[source_idx].Name != UiEventsLogger_Impl::LOGORIGINWIDGET)
- result[target_idx++] = args[source_idx];
- result.realloc(target_idx);
- return result;
- }
-
- void UiEventsLogger::logDispatch(
- const URL& url,
- const Sequence<PropertyValue>& args)
- {
- try {
- Guard<Mutex> singleton_guard(theSingletonMutex::get());
- UiEventsLogger_Impl::getInstance()->logDispatch(url, args);
- } catch(...) { } // never throws
- }
-
- void UiEventsLogger::logVcl(
- const OUString& parent_id,
- sal_Int32 window_type,
- const OUString& id,
- const OUString& method,
- const OUString& param)
- {
- try {
- Guard<Mutex> singleton_guard(theSingletonMutex::get());
- UiEventsLogger_Impl::getInstance()->logVcl(parent_id, window_type, id, method, param);
- } catch(...) { } // never throws
- }
-
- void UiEventsLogger::logVcl(
- const OUString& parent_id,
- sal_Int32 window_type,
- const OUString& id,
- const OUString& method,
- sal_Int32 param)
- {
- OUStringBuffer buf;
- UiEventsLogger::logVcl(parent_id, window_type, id, method, buf.append(param).makeStringAndClear());
- }
-
- void UiEventsLogger::logVcl(
- const OUString& parent_id,
- sal_Int32 window_type,
- const OUString& id,
- const OUString& method)
- {
- OUString empty;
- UiEventsLogger::logVcl(parent_id, window_type, id, method, empty);
- }
-
- void UiEventsLogger::disposing()
- {
- // we dont want to create an instance just to dispose it
- Guard<Mutex> singleton_guard(theSingletonMutex::get());
- if(UiEventsLogger_Impl::instance!=UiEventsLogger_Impl::ptr())
- UiEventsLogger_Impl::getInstance()->disposing();
- }
-
- void UiEventsLogger::reinit()
- {
- Guard<Mutex> singleton_guard(theSingletonMutex::get());
- if(UiEventsLogger_Impl::instance)
- {
- UiEventsLogger_Impl::instance->disposing();
- delete UiEventsLogger_Impl::instance;
- UiEventsLogger_Impl::instance = NULL;
- }
- }
-
- // private UiEventsLogger_Impl methods
- UiEventsLogger_Impl::UiEventsLogger_Impl()
- : m_Active(UiEventsLogger_Impl::shouldActivate())
- , m_LogPath(UiEventsLogger_Impl::getLogPathFromCfg())
- , m_IdleTimeout(UiEventsLogger_Impl::getIdleTimeoutFromCfg())
- , m_SessionLogEventCount(0)
- {
- lcl_SetupOriginAppAbbr(m_OriginAppAbbr);
- lcl_SetupOriginWidgetAbbr(m_OriginWidgetAbbr);
- m_LastLogEventTime.Seconds = m_LastLogEventTime.Nanosec = 0;
- if(m_Active) rotate();
- if(m_Active) initializeLogger();
- }
-
- void UiEventsLogger_Impl::logDispatch(
- const URL& url,
- const Sequence<PropertyValue>& args)
- {
- if(!m_Active) return;
- if(!url.Complete.match(URL_UNO)
- && !url.Complete.match(URL_FILE)
- && !url.Complete.match(URL_SPECIAL))
- {
- return;
- }
- checkIdleTimeout();
-
- Sequence<OUString> logdata = Sequence<OUString>(COLUMNS);
- logdata[0] = ETYPE_DISPATCH;
- sal_Int32 originapp_idx = findIdx(args, LOGORIGINAPP);
- if(originapp_idx!=-1)
- {
- OUString app;
- args[originapp_idx].Value >>= app;
- map<OUString, OUString>::iterator abbr_it = m_OriginAppAbbr.find(app);
- if(abbr_it != m_OriginAppAbbr.end())
- app = abbr_it->second;
- logdata[1] = app;
- }
- else
- logdata[1] = UNKNOWN_ORIGIN;
- sal_Int32 originwidget_idx = findIdx(args, LOGORIGINWIDGET);
- if(originwidget_idx!=-1)
- {
- OUString widget;
- args[originwidget_idx].Value >>= widget;
- map<OUString, OUString>::iterator widget_it = m_OriginWidgetAbbr.find(widget);
- if(widget_it != m_OriginWidgetAbbr.end())
- widget = widget_it->second;
- logdata[2] = widget;
- }
- else
- logdata[2] = UNKNOWN_ORIGIN;
- if(url.Complete.match(URL_FILE))
- logdata[3] = URL_FILE;
- else
- logdata[3] = url.Main;
- OSL_TRACE("UiEventsLogger Logging: %s,%s,%s,%s,%s,%s,%s,%s",
- OUStringToOString(logdata[0],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[1],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[2],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[3],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[4],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[5],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[6],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[7],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[8],RTL_TEXTENCODING_UTF8).getStr());
- m_Logger->log(LogLevel::INFO, m_Formatter->formatMultiColumn(logdata));
- m_SessionLogEventCount++;
- }
-
- void UiEventsLogger_Impl::logRotated()
- {
- Sequence<OUString> logdata = Sequence<OUString>(COLUMNS);
- logdata[0] = ETYPE_ROTATED;
- OSL_TRACE("UiEventsLogger Logging: %s,%s,%s,%s,%s,%s,%s,%s",
- OUStringToOString(logdata[0],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[1],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[2],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[3],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[4],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[5],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[6],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[7],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[8],RTL_TEXTENCODING_UTF8).getStr());
- m_Logger->log(LogLevel::INFO, m_Formatter->formatMultiColumn(logdata));
- }
-
- void UiEventsLogger_Impl::logVcl(
- const OUString& parent_id,
- sal_Int32 window_type,
- const OUString& id,
- const OUString& method,
- const OUString& param)
- {
- if(!m_Active) return;
- checkIdleTimeout();
-
- OUStringBuffer buf;
- Sequence<OUString> logdata = Sequence<OUString>(COLUMNS);
- logdata[0] = ETYPE_VCL;
- logdata[4] = parent_id;
- logdata[5] = buf.append(window_type).makeStringAndClear();
- logdata[6] = id;
- logdata[7] = method;
- logdata[8] = param;
- OSL_TRACE("UiEventsLogger Logging: %s,%s,%s,%s,%s,%s,%s,%s",
- OUStringToOString(logdata[0],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[1],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[2],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[3],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[4],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[5],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[6],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[7],RTL_TEXTENCODING_UTF8).getStr(),
- OUStringToOString(logdata[8],RTL_TEXTENCODING_UTF8).getStr());
- m_Logger->log(LogLevel::INFO, m_Formatter->formatMultiColumn(logdata));
- m_SessionLogEventCount++;
- }
-
- void UiEventsLogger_Impl::rotate()
- {
- FileBase::RC result = File::move(getCurrentPath(), getRotatedPath());
- if(result!=FileBase::E_None && result!=FileBase::E_NOENT)
- m_Active = false;
- }
-
- void UiEventsLogger_Impl::hotRotate()
- {
- logRotated();
- m_Logger->removeLogHandler(m_LogHandler);
- m_LogHandler = NULL;
- rotate();
- prepareLogHandler();
- if(m_Formatter.is() && m_LogHandler.is() && m_Logger.is())
- {
- m_LogHandler->setFormatter(Reference<XLogFormatter>(m_Formatter, UNO_QUERY));
- m_LogHandler->setLevel(LogLevel::ALL);
- m_Logger->addLogHandler(m_LogHandler);
- }
- else
- m_Active = false;
- }
-
- void UiEventsLogger_Impl::prepareLogHandler()
- {
- Reference<XMultiServiceFactory> sm = getProcessServiceFactory();
-
- Sequence<Any> init_args = Sequence<Any>(1);
- init_args[0] = static_cast<Any>(getCurrentPath());
- Reference< XInterface > temp =
- sm->createInstanceWithArguments(CSSL_FILEHANDLER, init_args);
- m_LogHandler = Reference<XLogHandler>(temp, UNO_QUERY);
- }
-
- void UiEventsLogger_Impl::checkIdleTimeout()
- {
- TimeValue now;
- osl_getSystemTime(&now);
- if(now.Seconds - m_LastLogEventTime.Seconds > m_IdleTimeout.Seconds && m_SessionLogEventCount>0)
- hotRotate();
- m_LastLogEventTime = now;
- }
-
- OUString UiEventsLogger_Impl::getCurrentPath()
- {
- OUStringBuffer current_path(m_LogPath);
- current_path.appendAscii("/");
- current_path.append(FN_CURRENTLOG);
- current_path.appendAscii(".csv");
- return current_path.makeStringAndClear();
- }
-
- OUString UiEventsLogger_Impl::getRotatedPath()
- {
- OUStringBuffer rotated_path(m_LogPath);
- rotated_path.appendAscii("/");
- rotated_path.append(FN_ROTATEDLOG);
- rotated_path.appendAscii("-");
- {
- // ISO 8601
- char tsrotated_pathfer[20];
- oslDateTime now;
- TimeValue now_tv;
- osl_getSystemTime(&now_tv);
- osl_getDateTimeFromTimeValue(&now_tv, &now);
- const size_t rotated_pathfer_size = sizeof(tsrotated_pathfer);
- snprintf(tsrotated_pathfer, rotated_pathfer_size, "%04i-%02i-%02iT%02i_%02i_%02i",
- now.Year,
- now.Month,
- now.Day,
- now.Hours,
- now.Minutes,
- now.Seconds);
- rotated_path.appendAscii(tsrotated_pathfer);
- rotated_path.appendAscii(".csv");
- }
- return rotated_path.makeStringAndClear();
- }
-
- void UiEventsLogger_Impl::initializeLogger()
- {
- Reference<XMultiServiceFactory> sm = getProcessServiceFactory();
-
- // getting the Core Uno proxy object
- // It will call disposing and make sure we clear all our references
- {
- Reference<XTerminateListener> xCore(
- sm->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.oooimprovement.Core"))),
- UNO_QUERY);
- Reference<XDesktop> xDesktop(
- sm->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop"))),
- UNO_QUERY);
- if(!(xCore.is() && xDesktop.is()))
- {
- m_Active = false;
- return;
- }
- xDesktop->addTerminateListener(xCore);
- }
- // getting the LoggerPool
- Reference<XLoggerPool> pool;
- {
- Reference<XInterface> temp =
- sm->createInstance(CSSL_LOGGERPOOL);
- pool = Reference<XLoggerPool>(temp, UNO_QUERY);
- }
-
- // getting the Logger
- m_Logger = pool->getNamedLogger(LOGGERNAME);
-
- // getting the FileHandler
- prepareLogHandler();
-
- // getting the Formatter
- {
- Reference<XInterface> temp =
- sm->createInstance(CSSL_CSVFORMATTER);
- m_Formatter = Reference<XCsvLogFormatter>(temp, UNO_QUERY);
- }
-
- if(m_Formatter.is() && m_LogHandler.is() && m_Logger.is())
- {
- Sequence<OUString> columns = Sequence<OUString>(COLUMNS);
- columns[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("eventtype"));
- columns[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("originapp"));
- columns[2] = OUString(RTL_CONSTASCII_USTRINGPARAM("originwidget"));
- columns[3] = OUString(RTL_CONSTASCII_USTRINGPARAM("uno url"));
- columns[4] = OUString(RTL_CONSTASCII_USTRINGPARAM("parent id"));
- columns[5] = OUString(RTL_CONSTASCII_USTRINGPARAM("window type"));
- columns[6] = OUString(RTL_CONSTASCII_USTRINGPARAM("id"));
- columns[7] = OUString(RTL_CONSTASCII_USTRINGPARAM("method"));
- columns[8] = OUString(RTL_CONSTASCII_USTRINGPARAM("parameter"));
- m_Formatter->setColumnnames(columns);
- m_LogHandler->setFormatter(Reference<XLogFormatter>(m_Formatter, UNO_QUERY));
- m_Logger->setLevel(LogLevel::ALL);
- m_LogHandler->setLevel(LogLevel::ALL);
- m_Logger->addLogHandler(m_LogHandler);
- }
- else
- m_Active = false;
- }
-
- // private static UiEventsLogger_Impl
- bool UiEventsLogger_Impl::shouldActivate()
- {
- return getEnabledFromCfg() && getEnabledFromCoreController();
- }
-
- OUString UiEventsLogger_Impl::getLogPathFromCfg()
- {
- OUString result;
- Reference<XMultiServiceFactory> sm = getProcessServiceFactory();
-
- ConfigurationHelper::readDirectKey(
- sm,
- CFG_LOGGING, CFG_OOOIMPROVEMENT, CFG_LOGPATH,
- ConfigurationHelper::E_READONLY
- ) >>= result;
-
- Reference<XStringSubstitution> path_sub(
- sm->createInstance(CSSU_PATHSUB),
- UNO_QUERY);
- if(path_sub.is())
- result = path_sub->substituteVariables(result, sal_False);
- return result;
- }
-
- TimeValue UiEventsLogger_Impl::getIdleTimeoutFromCfg()
- {
- sal_Int32 timeoutminutes = 360;
- Reference<XMultiServiceFactory> sm = getProcessServiceFactory();
-
- ConfigurationHelper::readDirectKey(
- sm,
- CFG_LOGGING, CFG_OOOIMPROVEMENT, CFG_IDLETIMEOUT,
- ConfigurationHelper::E_READONLY
- ) >>= timeoutminutes;
- TimeValue result;
- result.Seconds = static_cast<sal_uInt32>(timeoutminutes)*60;
- result.Nanosec = 0;
- return result;
- }
-
- bool UiEventsLogger_Impl::getEnabledFromCfg()
- {
- sal_Bool result = false;
- Reference<XMultiServiceFactory> sm = getProcessServiceFactory();
- ConfigurationHelper::readDirectKey(
- sm,
- CFG_LOGGING, CFG_OOOIMPROVEMENT, CFG_ENABLED,
- ::comphelper::ConfigurationHelper::E_READONLY
- ) >>= result;
- return result;
- }
-
- bool UiEventsLogger_Impl::getEnabledFromCoreController()
- {
- Reference<XMultiServiceFactory> sm = getProcessServiceFactory();
- Reference<XCoreController> core_c(
- sm->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.oooimprovement.CoreController"))),
- UNO_QUERY);
- if(!core_c.is()) return false;
- return core_c->enablingUiEventsLoggerAllowed(1);
- }
-
- UiEventsLogger_Impl::ptr UiEventsLogger_Impl::instance = UiEventsLogger_Impl::ptr();
- UiEventsLogger_Impl::ptr UiEventsLogger_Impl::getInstance()
- {
- if(instance == NULL)
- instance = UiEventsLogger_Impl::ptr(new UiEventsLogger_Impl());
- return instance;
- }
-
- sal_Int32 UiEventsLogger_Impl::findIdx(const Sequence<PropertyValue>& args, const OUString& key)
- {
- for(sal_Int32 i=0; i<args.getLength(); i++)
- if(args[i].Name == key)
- return i;
- return -1;
- }
-
- void UiEventsLogger_Impl::disposing()
- {
- m_Active = false;
- m_Logger.clear() ;
- m_LogHandler.clear();
- m_Formatter.clear();
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk
index bbe5492a507b..9d40d826f62f 100644
--- a/cui/AllLangResTarget_cui.mk
+++ b/cui/AllLangResTarget_cui.mk
@@ -91,7 +91,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/options/optgdlg.src \
cui/source/options/optgenrl.src \
cui/source/options/opthtml.src \
- cui/source/options/optimprove.src \
cui/source/options/optinet2.src \
cui/source/options/optjava.src \
cui/source/options/optjsearch.src \
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index fa6df22e1bac..6a5e6838b1f1 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -156,8 +156,6 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
cui/source/options/optgenrl \
cui/source/options/optHeaderTabListbox \
cui/source/options/opthtml \
- cui/source/options/optimprove2 \
- cui/source/options/optimprove \
cui/source/options/optinet2 \
cui/source/options/optjava \
cui/source/options/optjsearch \
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 2a6340dd5ee9..dc7c368203c1 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -36,7 +36,6 @@
#include <cuires.hrc>
#include <svx/dialogs.hrc>
#include "numfmt.hxx"
-#include "optimprove.hxx"
#include "splitcelldlg.hxx"
#include "gallery.hrc"
#include "dstribut.hxx"
@@ -1667,14 +1666,6 @@ SfxAbstractDialog* AbstractDialogFactory_Impl::CreateSfxDialog( Window* pParent,
case RID_SFXPAGE_DBREGISTER :
pDlg = new DatabaseRegistrationDialog( pParent, rAttr );
break;
- case RID_SVXPAGE_IMPROVEMENT :
- {
- String help_url;
- SFX_ITEMSET_ARG( &rAttr, pItem, SfxStringItem, SID_CURRENT_URL, sal_False );
- if ( pItem )
- help_url = pItem->GetValue();
- pDlg = new SvxImprovementDialog( pParent, help_url);
- }
default:
break;
}
diff --git a/cui/source/inc/optimprove.hxx b/cui/source/inc/optimprove.hxx
deleted file mode 100644
index 0666c78df0bd..000000000000
--- a/cui/source/inc/optimprove.hxx
+++ /dev/null
@@ -1,120 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 _SVX_OPTIMPROVE_HXX
-#define _SVX_OPTIMPROVE_HXX
-
-// include ---------------------------------------------------------------
-
-#include <vcl/tabpage.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/button.hxx>
-#include <svtools/fixedhyper.hxx>
-#include <sfx2/basedlgs.hxx>
-#include <sfx2/tabdlg.hxx>
-
-// class SvxImprovementPage ----------------------------------------------
-
-class SvxImprovementPage : public TabPage
-{
-private:
- FixedLine m_aImproveFL;
- FixedText m_aInvitationFT;
- RadioButton m_aYesRB;
- RadioButton m_aNoRB;
- FixedLine m_aDataFL;
- FixedText m_aNumberOfReportsFT;
- FixedText m_aNumberOfReportsValueFT;
- FixedText m_aNumberOfActionsFT;
- FixedText m_aNumberOfActionsValueFT;
- PushButton m_aShowDataPB;
-
- String m_sInfo;
- String m_sMoreInfo;
-
-public:
- SvxImprovementPage( Window* pParent );
- ~SvxImprovementPage();
-
- inline bool IsYesChecked() const { return m_aYesRB.IsChecked() != sal_False; }
-
- inline String GetPageText() const { return GetText(); }
- inline String GetInvitationText() const { return m_aInvitationFT.GetText(); }
- inline String GetYesButtonText() const { return m_aYesRB.GetText(); }
- inline String GetNoButtonText() const { return m_aNoRB.GetText(); }
- inline String GetInfoText() const { return m_sInfo; }
- inline String GetTitleText() const { return m_aImproveFL.GetText(); }
-};
-
-class SvxImprovementOptionsPage : public SfxTabPage
-{
-private:
- FixedLine m_aImproveFL;
- FixedText m_aInvitationFT;
- RadioButton m_aYesRB;
- RadioButton m_aNoRB;
- svt::FixedHyperlinkImage m_aInfoFI;
- FixedLine m_aDataFL;
- FixedText m_aNumberOfReportsFT;
- FixedText m_aNumberOfReportsValueFT;
- FixedText m_aNumberOfActionsFT;
- FixedText m_aNumberOfActionsValueFT;
- PushButton m_aShowDataPB;
-
- String m_sInfo;
- String m_sMoreInfo;
- ::rtl::OUString m_sLogPath;
-
- SvxImprovementOptionsPage( Window* pParent, const SfxItemSet& rSet );
-
- DECL_LINK( HandleHyperlink, svt::FixedHyperlinkImage * );
- DECL_LINK( HandleShowData, PushButton * );
-
-public:
- virtual ~SvxImprovementOptionsPage();
-
- static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet );
-
- virtual sal_Bool FillItemSet( SfxItemSet& rSet );
- virtual void Reset( const SfxItemSet& rSet );
-};
-
-class SvxImprovementDialog : public SfxSingleTabDialog
-{
-private:
- SvxImprovementPage* m_pPage;
-
- DECL_LINK( HandleOK, OKButton * );
- DECL_LINK( HandleHyperlink, svt::FixedHyperlinkImage * );
-
-public:
- SvxImprovementDialog( Window* pParent, const String& rInfoURL );
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optimprove.cxx b/cui/source/options/optimprove.cxx
deleted file mode 100644
index 27d5e9fe68d2..000000000000
--- a/cui/source/options/optimprove.cxx
+++ /dev/null
@@ -1,197 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// include ---------------------------------------------------------------
-
-#define _SVX_OPTIMPROVE_CXX
-
-#include <optimprove.hxx>
-#include <dialmgr.hxx>
-#include <vcl/msgbox.hxx>
-#include <svx/dialogs.hrc>
-#include "optimprove.hrc"
-#include "helpid.hrc"
-#include <cuires.hrc>
-
-#include <com/sun/star/uno/Any.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
-#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
-#include <com/sun/star/oooimprovement/XCoreController.hpp>
-#include <comphelper/configurationhelper.hxx>
-#include <comphelper/processfactory.hxx>
-#include <comphelper/uieventslogger.hxx>
-
-namespace lang = ::com::sun::star::lang;
-namespace uno = ::com::sun::star::uno;
-using namespace com::sun::star::system;
-
-// class SvxImprovementPage ----------------------------------------------
-
-SvxImprovementPage::SvxImprovementPage( Window* pParent ) :
-
- TabPage( pParent, CUI_RES( RID_SVXPAGE_IMPROVEMENT ) ),
-
- m_aImproveFL ( this, CUI_RES( FL_IMPROVE ) ),
- m_aInvitationFT ( this, CUI_RES( FT_INVITATION ) ),
- m_aYesRB ( this, CUI_RES( RB_YES ) ),
- m_aNoRB ( this, CUI_RES( RB_NO ) ),
- m_aDataFL ( this, CUI_RES( FL_DATA ) ),
- m_aNumberOfReportsFT ( this, CUI_RES( FT_NR_REPORTS ) ),
- m_aNumberOfReportsValueFT ( this, CUI_RES( FT_NR_REPORTS_VALUE ) ),
- m_aNumberOfActionsFT ( this, CUI_RES( FT_NR_ACTIONS ) ),
- m_aNumberOfActionsValueFT ( this, CUI_RES( FT_NR_ACTIONS_VALUE ) ),
- m_aShowDataPB ( this, CUI_RES( PB_SHOWDATA ) ),
-
- m_sInfo ( CUI_RES( STR_INFO ) ),
- m_sMoreInfo ( CUI_RES( STR_MOREINFO ) )
-
-{
- FreeResource();
-
- m_aInvitationFT.Show();
- m_aDataFL.Hide();
- m_aNumberOfReportsFT.Hide();
- m_aNumberOfReportsValueFT.Hide();
- m_aNumberOfActionsFT.Hide();
- m_aNumberOfActionsValueFT.Hide();
- m_aShowDataPB.Hide();
-
- Size aNewSize = m_aInvitationFT.GetSizePixel();
- const long nMinWidth = m_aYesRB.CalcMinimumSize().Width();
- const long nNewWidth = std::max( aNewSize.Width() * 4 / 5, nMinWidth );
- const long nWDelta = aNewSize.Width() - nNewWidth;
- aNewSize.Width() = nNewWidth;
- const Size aCalcSize = m_aInvitationFT.CalcMinimumSize( nNewWidth );
- const long nHDelta = aCalcSize.Height() - aNewSize.Height();
- aNewSize.Height() = aCalcSize.Height();
- m_aInvitationFT.SetSizePixel( aNewSize );
-
- aNewSize = m_aYesRB.GetSizePixel();
- aNewSize.Width() = nNewWidth;
- Point aNewPos = m_aYesRB.GetPosPixel();
- aNewPos.Y() += nHDelta;
- m_aYesRB.SetPosSizePixel( aNewPos, aNewSize );
- aNewSize = m_aNoRB.GetSizePixel();
- aNewSize.Width() = nNewWidth;
- aNewPos = m_aNoRB.GetPosPixel();
- aNewPos.Y() += nHDelta;
- m_aNoRB.SetPosSizePixel( aNewPos, aNewSize );
- aNewSize = m_aImproveFL.GetSizePixel();
- aNewSize.Width() -= nWDelta;
- m_aImproveFL.SetSizePixel( aNewSize );
-
- Size aSize = GetOutputSizePixel();
- aSize.Width() -= nWDelta;
- aSize.Height() = m_aDataFL.GetPosPixel().Y();
- aSize.Height() += nHDelta;
- SetSizePixel( aSize );
-}
-
-// -----------------------------------------------------------------------
-
-SvxImprovementPage::~SvxImprovementPage()
-{
-}
-
-// class SvxImprovementDialog --------------------------------------------
-
-SvxImprovementDialog::SvxImprovementDialog( Window* pParent, const String& rInfoURL ) :
-
- SfxSingleTabDialog( pParent, RID_SVXPAGE_IMPROVEMENT, rInfoURL ),
-
- m_pPage( NULL )
-
-{
- m_pPage = new SvxImprovementPage( this );
- SetInfoLink( LINK( this, SvxImprovementDialog, HandleHyperlink ) );
- SetPage( m_pPage );
- if ( GetOKButton() )
- GetOKButton()->SetClickHdl( LINK( this, SvxImprovementDialog, HandleOK ) );
-}
-
-IMPL_LINK( SvxImprovementDialog, HandleHyperlink, svt::FixedHyperlinkImage*, pHyperlinkImage )
-{
- ::rtl::OUString sURL( pHyperlinkImage->GetURL() );
-
- if ( sURL.getLength() > 0 )
- {
- try
- {
- uno::Reference< lang::XMultiServiceFactory > xSMGR =
- ::comphelper::getProcessServiceFactory();
- uno::Reference< XSystemShellExecute > xSystemShell(
- xSMGR->createInstance( ::rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SystemShellExecute" ) ) ),
- uno::UNO_QUERY_THROW );
- if ( xSystemShell.is() )
- {
- xSystemShell->execute(
- sURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
- }
- }
- catch( const uno::Exception& e )
- {
- OSL_TRACE( "Caught exception: %s\n thread terminated.\n",
- rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
- }
- }
-
- return 0;
-}
-
-IMPL_LINK( SvxImprovementDialog, HandleOK, OKButton*, EMPTYARG )
-{
- uno::Reference< lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
- uno::Reference< com::sun::star::oooimprovement::XCoreController > core_c(
- xSMGR->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.oooimprovement.CoreController") ) ),
- uno::UNO_QUERY);
- if(core_c.is())
- {
- ::comphelper::ConfigurationHelper::writeDirectKey(
- xSMGR,
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.OOoImprovement.Settings") ),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Participation") ),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ShowedInvitation") ),
- uno::makeAny( true ),
- ::comphelper::ConfigurationHelper::E_STANDARD );
- ::comphelper::ConfigurationHelper::writeDirectKey(
- xSMGR,
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.OOoImprovement.Settings") ),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Participation") ),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InvitationAccepted") ),
- uno::makeAny( m_pPage->IsYesChecked() ),
- ::comphelper::ConfigurationHelper::E_STANDARD );
- // TODO: refactor
- ::comphelper::UiEventsLogger::reinit();
- }
- EndDialog( RET_OK );
- return 0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optimprove.hrc b/cui/source/options/optimprove.hrc
deleted file mode 100644
index 024e5d5aae4a..000000000000
--- a/cui/source/options/optimprove.hrc
+++ /dev/null
@@ -1,50 +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 _SVX_OPTIMPROVE_HRC
-#define _SVX_OPTIMPROVE_HRC
-
-// defines ---------------------------------------------------------------
-
-#define FL_IMPROVE 10
-#define FT_INVITATION 11
-#define RB_YES 12
-#define RB_NO 13
-#define FL_DATA 14
-#define FT_NR_REPORTS 15
-#define FT_NR_REPORTS_VALUE 16
-#define FT_NR_ACTIONS 17
-#define FT_NR_ACTIONS_VALUE 18
-#define PB_SHOWDATA 19
-#define FI_INFO 20
-#define WIN_INFO 21
-#define BTN_OK 22
-
-#define STR_INFO 10
-#define STR_MOREINFO 11
-
-#endif
-
diff --git a/cui/source/options/optimprove.src b/cui/source/options/optimprove.src
deleted file mode 100644
index 523dc8545ca9..000000000000
--- a/cui/source/options/optimprove.src
+++ /dev/null
@@ -1,124 +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.
- *
- ************************************************************************/
-
-// include --------------------------------------------------------------
-
-#include "optimprove.hrc"
-#include <cuires.hrc>
-#include "helpid.hrc"
-#include <svx/dialogs.hrc>
-
-TabPage RID_SVXPAGE_IMPROVEMENT
-{
- HelpId = "cui:TabPage:RID_SVXPAGE_IMPROVEMENT" ;
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Hide = TRUE ;
- Size = MAP_APPFONT ( 260 , 185 ) ;
- Text [ en-US ] = "%PRODUCTNAME Improvement Program" ;
- FixedLine FL_IMPROVE
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 248 , 8 ) ;
- Text [ en-US ] = "Improvement Program" ;
- };
- FixedText FT_INVITATION
- {
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 242 , 72 ) ;
- WordBreak = TRUE ;
- Text [ en-US ] = "We invite you to join our %PRODUCTNAME Improvement Program to help optimize the quality of %PRODUCTNAME.\n\nIf you are willing to participate, we will collect anonymous statistics about how you use %PRODUCTNAME. The data is used to identify usage patterns.\n\nThe %PRODUCTNAME Improvement Program will not collect any personal data, or document content." ;
- };
- RadioButton RB_YES
- {
- HelpID = "cui:RadioButton:RID_SVXPAGE_IMPROVEMENT:RB_YES";
- Pos = MAP_APPFONT ( 12 , 92 ) ;
- Size = MAP_APPFONT ( 215 , 10 ) ;
- Check = TRUE ;
- Text [ en-US ] = "~Yes, I am willing to participate in the %PRODUCTNAME Improvement Program" ;
- };
- RadioButton RB_NO
- {
- HelpID = "cui:RadioButton:RID_SVXPAGE_IMPROVEMENT:RB_NO";
- Pos = MAP_APPFONT ( 12 , 105 ) ;
- Size = MAP_APPFONT ( 215 , 10 ) ;
- Text [ en-US ] = "~No, I do not wish to participate" ;
- };
- FixedImage FI_INFO
- {
- Pos = MAP_APPFONT ( 230 , 91 ) ;
- Size = MAP_APPFONT ( 24 , 24 ) ;
- Fixed = Image
- {
- ImageBitmap = Bitmap { File = "info.png"; };
- };
- };
- FixedLine FL_DATA
- {
- Pos = MAP_APPFONT ( 6 , 121 ) ;
- Size = MAP_APPFONT ( 248 , 8 ) ;
- Text [ en-US ] = "Tracked Data" ;
- };
- FixedText FT_NR_REPORTS
- {
- Pos = MAP_APPFONT ( 12 , 132 ) ;
- Size = MAP_APPFONT ( 96 , 8 ) ;
- Text [ en-US ] = "Number of reports sent:" ;
- };
- FixedText FT_NR_REPORTS_VALUE
- {
- Pos = MAP_APPFONT ( 111 , 132 ) ;
- Size = MAP_APPFONT ( 100 , 10 ) ;
- };
- FixedText FT_NR_ACTIONS
- {
- Pos = MAP_APPFONT ( 12 , 145 ) ;
- Size = MAP_APPFONT ( 96 , 8 ) ;
- Text [ en-US ] = "Number of tracked actions:" ;
- };
- FixedText FT_NR_ACTIONS_VALUE
- {
- Pos = MAP_APPFONT ( 111 , 145 ) ;
- Size = MAP_APPFONT ( 100 , 10 ) ;
- };
- PushButton PB_SHOWDATA
- {
- HelpID = "cui:PushButton:RID_SVXPAGE_IMPROVEMENT:PB_SHOWDATA";
- Pos = MAP_APPFONT ( 12 , 161 ) ;
- Size = MAP_APPFONT ( 60 , 14 ) ;
- Text [ en-US ] = "~Show Data" ;
- };
- String STR_INFO
- {
- Text [ en-US ] = "Help Optimize the Quality of %PRODUCTNAME" ;
- };
- String STR_MOREINFO
- {
- Text [ en-US ] = "More Information" ;
- };
-};
-
diff --git a/cui/source/options/optimprove2.cxx b/cui/source/options/optimprove2.cxx
deleted file mode 100644
index 4d6f23836a0f..000000000000
--- a/cui/source/options/optimprove2.cxx
+++ /dev/null
@@ -1,267 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#define _SVX_OPTIMPROVE_CXX
-
-#include <optimprove.hxx>
-#include <dialmgr.hxx>
-#include <vcl/msgbox.hxx>
-
-#include "optimprove.hrc"
-#include "helpid.hrc"
-#include <cuires.hrc>
-#include <svx/dialogs.hrc>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/oooimprovement/XCore.hpp>
-#include <com/sun/star/oooimprovement/XCoreController.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
-#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
-#include <com/sun/star/util/XStringSubstitution.hpp>
-#include <comphelper/configurationhelper.hxx>
-#include <comphelper/processfactory.hxx>
-#include <comphelper/synchronousdispatch.hxx>
-#include <comphelper/uieventslogger.hxx>
-#include <osl/file.hxx>
-
-#define C2S(s) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s))
-
-namespace beans = ::com::sun::star::beans;
-namespace lang = ::com::sun::star::lang;
-namespace uno = ::com::sun::star::uno;
-namespace util = ::com::sun::star::util;
-using namespace com::sun::star::system;
-
-
-namespace
-{
- bool lcl_doesLogfileExist(const ::rtl::OUString& sLogPath)
- {
- ::rtl::OUString sLogFile( sLogPath );
- sLogFile += C2S("/Current.csv");
- ::osl::File aLogFile(sLogFile);
- return aLogFile.open(osl_File_OpenFlag_Read) == ::osl::FileBase::E_None;
- }
-}
-
-// class SvxImprovementOptionsPage ---------------------------------------
-
-SvxImprovementOptionsPage::SvxImprovementOptionsPage( Window* pParent, const SfxItemSet& rSet ) :
-
- SfxTabPage( pParent, CUI_RES( RID_SVXPAGE_IMPROVEMENT ), rSet ),
-
- m_aImproveFL ( this, CUI_RES( FL_IMPROVE ) ),
- m_aInvitationFT ( this, CUI_RES( FT_INVITATION ) ),
- m_aYesRB ( this, CUI_RES( RB_YES ) ),
- m_aNoRB ( this, CUI_RES( RB_NO ) ),
- m_aInfoFI ( this, CUI_RES( FI_INFO ) ),
- m_aDataFL ( this, CUI_RES( FL_DATA ) ),
- m_aNumberOfReportsFT ( this, CUI_RES( FT_NR_REPORTS ) ),
- m_aNumberOfReportsValueFT ( this, CUI_RES( FT_NR_REPORTS_VALUE ) ),
- m_aNumberOfActionsFT ( this, CUI_RES( FT_NR_ACTIONS ) ),
- m_aNumberOfActionsValueFT ( this, CUI_RES( FT_NR_ACTIONS_VALUE ) ),
- m_aShowDataPB ( this, CUI_RES( PB_SHOWDATA ) ),
-
- m_sInfo ( CUI_RES( STR_INFO ) ),
- m_sMoreInfo ( CUI_RES( STR_MOREINFO ) )
-
-{
- FreeResource();
-
- m_aInfoFI.SetURL( C2S( "www.sun.com/privacy/" ) );
- m_aInfoFI.SetClickHdl( LINK( this, SvxImprovementOptionsPage, HandleHyperlink ) );
- m_aShowDataPB.SetClickHdl( LINK( this, SvxImprovementOptionsPage, HandleShowData ) );
-}
-
-SvxImprovementOptionsPage::~SvxImprovementOptionsPage()
-{
-}
-
-IMPL_LINK( SvxImprovementOptionsPage, HandleHyperlink, svt::FixedHyperlinkImage*, EMPTYARG )
-{
- ::rtl::OUString sURL( m_aInfoFI.GetURL() );
-
- if ( sURL.getLength() > 0 )
- {
- try
- {
- uno::Reference< lang::XMultiServiceFactory > xSMGR =
- ::comphelper::getProcessServiceFactory();
- uno::Reference< XSystemShellExecute > xSystemShell(
- xSMGR->createInstance( ::rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SystemShellExecute" ) ) ),
- uno::UNO_QUERY_THROW );
- if ( xSystemShell.is() )
- {
- xSystemShell->execute(
- sURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
- }
- }
- catch( const uno::Exception& e )
- {
- OSL_TRACE( "Caught exception: %s\n thread terminated.\n",
- rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
- }
- }
-
- return 0;
-}
-
-IMPL_LINK( SvxImprovementOptionsPage, HandleShowData, PushButton*, EMPTYARG )
-{
- uno::Reference < uno::XInterface > xDesktop( ::comphelper::getProcessServiceFactory()->createInstance(
- C2S("com.sun.star.frame.Desktop") ), uno::UNO_QUERY );
- if ( xDesktop.is() )
- {
- ::rtl::OUString sLogFile( m_sLogPath );
- sLogFile += C2S("/Current.csv");
- uno::Sequence< beans::PropertyValue > aArgs(3);
- aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FilterName") );
- aArgs[0].Value = uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Text - txt - csv (StarCalc)") ) );
- aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FilterOptions") );
- aArgs[1].Value = uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("44,34,12,1,") ) );
- aArgs[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly") );
- aArgs[2].Value = uno::makeAny(true);
-
- uno::Reference< lang::XComponent > xDoc = ::comphelper::SynchronousDispatch::dispatch(
- xDesktop, sLogFile, C2S("_default"), 0, aArgs );
- if ( xDoc.is() )
- {
- dynamic_cast<Dialog*>(GetParent())->EndDialog( RET_CANCEL );
- return 1;
- }
- }
-
- return 0;
-}
-
-SfxTabPage* SvxImprovementOptionsPage::Create( Window* pParent, const SfxItemSet& rSet )
-{
- return new SvxImprovementOptionsPage( pParent, rSet );
-}
-
-sal_Bool SvxImprovementOptionsPage::FillItemSet( SfxItemSet& /*rSet*/ )
-{
- uno::Reference< lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
- uno::Reference< uno::XInterface > xConfig;
-
- try
- {
- xConfig = ::comphelper::ConfigurationHelper::openConfig(
- xSMGR, C2S("/org.openoffice.Office.OOoImprovement.Settings"),
- ::comphelper::ConfigurationHelper::E_STANDARD );
- ::comphelper::ConfigurationHelper::writeRelativeKey(
- xConfig, C2S("Participation"), C2S("ShowedInvitation"), uno::makeAny( true ) );
- ::comphelper::ConfigurationHelper::writeRelativeKey(
- xConfig, C2S("Participation"), C2S("InvitationAccepted"), uno::makeAny( m_aYesRB.IsChecked() != sal_False ) );
- ::comphelper::ConfigurationHelper::flush( xConfig );
- // TODO: refactor
- ::comphelper::UiEventsLogger::reinit();
- }
- catch( uno::Exception& )
- {
- }
-
- return sal_False;
-}
-
-void SvxImprovementOptionsPage::Reset( const SfxItemSet& /*rSet*/ )
-{
- uno::Reference< lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
- uno::Reference< com::sun::star::oooimprovement::XCore > xCore(
- xSMGR->createInstance( C2S("com.sun.star.oooimprovement.Core") ),
- uno::UNO_QUERY );
- uno::Reference< uno::XInterface > xConfig;
-
- try
- {
- m_aNoRB.Check();
- xConfig = ::comphelper::ConfigurationHelper::openConfig(
- xSMGR, C2S("/org.openoffice.Office.OOoImprovement.Settings"),
- ::comphelper::ConfigurationHelper::E_READONLY );
- if ( xConfig.is() )
- {
- bool bYesChecked = false;
- uno::Any aAny = ::comphelper::ConfigurationHelper::
- readRelativeKey( xConfig, C2S("Participation"), C2S("ShowedInvitation") );
- if ( ( aAny >>= bYesChecked ) && bYesChecked )
- {
- bool bTemp = false;
- aAny = ::comphelper::ConfigurationHelper::
- readRelativeKey( xConfig, C2S("Participation"), C2S("InvitationAccepted") );
- if ( aAny >>= bTemp )
- {
- bYesChecked &= bTemp;
- if ( bYesChecked )
- m_aYesRB.Check();
- }
- }
-
- ::rtl::OUString sURL;
- aAny = ::comphelper::ConfigurationHelper::
- readRelativeKey( xConfig, C2S("Participation"), C2S("HelpUrl") );
- if ( aAny >>= sURL )
- m_aInfoFI.SetURL( sURL );
-
- sal_Int32 nCount = 0;
- aAny = ::comphelper::ConfigurationHelper::
- readRelativeKey( xConfig, C2S("Counters"), C2S("UploadedReports") );
- if ( aAny >>= nCount )
- m_aNumberOfReportsValueFT.SetText( String::CreateFromInt32( nCount ) );
- aAny = ::comphelper::ConfigurationHelper::
- readRelativeKey( xConfig, C2S("Counters"), C2S("LoggedEvents") );
- if ( aAny >>= nCount )
- {
- if ( xCore.is() )
- nCount += xCore->getSessionLogEventCount();
- m_aNumberOfActionsValueFT.SetText( String::CreateFromInt32( nCount ) );
- }
-
- ::rtl::OUString sPath;
- aAny = ::comphelper::ConfigurationHelper::readDirectKey(
- xSMGR, C2S("/org.openoffice.Office.Logging"), C2S("OOoImprovement"),
- C2S("LogPath"), ::comphelper::ConfigurationHelper::E_READONLY );
- if ( aAny >>= sPath )
- {
- uno::Reference< util::XStringSubstitution > xSubst(
- xSMGR->createInstance( C2S("com.sun.star.util.PathSubstitution") ),
- uno::UNO_QUERY );
- if ( xSubst.is() )
- sPath = xSubst->substituteVariables( sPath, sal_False );
- m_sLogPath = sPath;
- m_aShowDataPB.Enable(lcl_doesLogfileExist(m_sLogPath));
- }
- }
- }
- catch( uno::Exception& )
- {
- m_aShowDataPB.Enable(false);
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index d5f48812e779..66210b70b1bf 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -45,7 +45,6 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/oooimprovement/XCoreController.hpp>
#include <comphelper/configurationhelper.hxx>
#include <com/sun/star/awt/XDialogProvider.hpp>
#include <com/sun/star/awt/XDialogProvider2.hpp>
@@ -99,7 +98,6 @@
#include "optjsearch.hxx"
#include "connpooloptions.hxx"
#include "optupdt.hxx"
-#include <optimprove.hxx>
#include "optchart.hxx"
#include "optgdlg.hxx"
#include "optmemory.hxx"
@@ -361,7 +359,6 @@ SfxTabPage* CreateGeneralTabPage( sal_uInt16 nId, Window* pParent, const SfxItem
case RID_SVXPAGE_OPTIONS_JAVA: fnCreate = &SvxJavaOptionsPage::Create ; break;
case RID_SVXPAGE_ONLINEUPDATE: fnCreate = &SvxOnlineUpdateTabPage::Create; break;
case RID_OPTPAGE_CHART_DEFCOLORS: fnCreate = &SvxDefaultColorOptPage::Create; break;
- case RID_SVXPAGE_IMPROVEMENT: fnCreate = &SvxImprovementOptionsPage::Create; break;
}
SfxTabPage* pRet = fnCreate ? (*fnCreate)( pParent, rSet ) : NULL;
@@ -394,7 +391,6 @@ static OptionsMapping_Impl const OptionsMap_Impl[] =
{ "ProductName", "Java", RID_SVXPAGE_OPTIONS_JAVA },
{ "ProductName", "NetworkIdentity", RID_SVXPAGE_SSO },
{ "ProductName", "OnlineUpdate", RID_SVXPAGE_ONLINEUPDATE },
- { "ProductName", "ImprovementProgram", RID_SVXPAGE_IMPROVEMENT },
{ "LanguageSettings", NULL, SID_LANGUAGE_OPTIONS },
{ "LanguageSettings", "Languages", OFA_TP_LANGUAGES },
{ "LanguageSettings", "WritingAids", RID_SFXPAGE_LINGU },
@@ -1823,50 +1819,11 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
continue;
}
}
- // Disable OOoImprovement page if not enabled
- if( RID_SVXPAGE_IMPROVEMENT == nPageId )
- {
- continue;
- }
- if ( nPageId != RID_SVXPAGE_SSO || isSSOEnabled )
- {
- AddTabPage( nPageId, sNewTitle, nGroup );
- }
- }
- do
- {
- String sNewTitle = C2U("Improvement Program");
- {
- SvxImprovementPage aTempTabPage(this);
- sNewTitle = aTempTabPage.GetTitleText();
- }
- nPageId = RID_SVXPAGE_IMPROVEMENT;
- if ( lcl_isOptionHidden( nPageId, aOptionsDlgOpt ) )
- continue;
- // Disable OOoImprovement page if not enabled
- {
- const ::rtl::OUString sService = C2U("com.sun.star.oooimprovement.CoreController");
- try
- {
- Reference < XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
- Reference < ::com::sun::star::oooimprovement::XCoreController > xService( xFactory->createInstance( sService ), UNO_QUERY );
-
- if( ! xService.is() )
- continue;
- if( ! xService->showBuiltinOptionsPage(1))
- continue;
- }
- catch ( ::com::sun::star::loader::CannotActivateFactoryException& )
- {
- continue;
- }
- }
if ( nPageId != RID_SVXPAGE_SSO || isSSOEnabled )
{
AddTabPage( nPageId, sNewTitle, nGroup );
}
}
- while (0);
}
// Load and Save options
diff --git a/cui/source/options/treeopt.src b/cui/source/options/treeopt.src
index 62be8ce22c40..acfc312426ba 100644
--- a/cui/source/options/treeopt.src
+++ b/cui/source/options/treeopt.src
@@ -162,7 +162,6 @@ Resource RID_OFADLG_OPTIONS_TREE_PAGES
< "Java" ; RID_SVXPAGE_OPTIONS_JAVA ; > ;
< "Network Identity" ; RID_SVXPAGE_SSO ; > ;
< "Online Update" ; RID_SVXPAGE_ONLINEUPDATE ; > ;
- < "" ; RID_SVXPAGE_IMPROVEMENT ; > ;
};
};
StringArray SID_LANGUAGE_OPTIONS
diff --git a/extensions/prj/build.lst b/extensions/prj/build.lst
index 45bea6a46e3f..f29d117d3dc8 100644
--- a/extensions/prj/build.lst
+++ b/extensions/prj/build.lst
@@ -23,15 +23,13 @@ ex extensions\source\propctrlr nmake - all ex_propctrlr ex_
ex extensions\source\dbpilots nmake - all ex_dbpilots ex_inc NULL
ex extensions\source\abpilot nmake - all ex_abpilot ex_inc NULL
ex extensions\source\logging nmake - all ex_logging ex_inc NULL
-ex extensions\source\oooimprovecore nmake - all ex_oooimprovecore ex_inc NULL
-ex extensions\source\oooimprovement nmake - all ex_oooimprovement ex_inc NULL
ex extensions\source\config\ldap nmake - all ex_ldap ex_inc NULL
ex extensions\source\nsplugin\source nmake - u ex_nsplugin ex_inc NULL
ex extensions\source\nsplugin\source nmake - w ex_nsplugin ex_inc NULL
ex extensions\source\update\feed nmake - all ex_updchkfeed ex_inc NULL
ex extensions\source\update\check nmake - all ex_updchk ex_inc NULL
ex extensions\source\update\ui nmake - all ex_updchkui ex_inc NULL
-ex extensions\util nmake - all ex_util ex_abpilot ex_dbpilots ex_logging ex_ldap ex_propctrlr ex_bib ex_plutil ex_oooimprovecore NULL
+ex extensions\util nmake - all ex_util ex_abpilot ex_dbpilots ex_logging ex_ldap ex_propctrlr ex_bib ex_plutil NULL
# Fails at the moment
# ex extensions\qa\complex\extensions nmake - all ex_complex ex_util NULL
diff --git a/extensions/prj/d.lst b/extensions/prj/d.lst
index 8f726eb87a9a..01025ae00c68 100644
--- a/extensions/prj/d.lst
+++ b/extensions/prj/d.lst
@@ -45,8 +45,6 @@ mkdir: %_DEST%\xml\registry\spool\org\openoffice\Office\Logging
..\%__SRC%\misc\dbp.component %_DEST%\xml\dbp.component
..\%__SRC%\misc\ldapbe2.component %_DEST%\xml\ldapbe2.component
..\%__SRC%\misc\log.component %_DEST%\xml\log.component
-..\%__SRC%\misc\oooimprovecore.component %_DEST%\xml\oooimprovecore.component
-..\%__SRC%\misc\oooimprovement.component %_DEST%\xml\oooimprovement.component
..\%__SRC%\misc\pcr.component %_DEST%\xml\pcr.component
..\%__SRC%\misc\pl.component %_DEST%\xml\pl.component
..\%__SRC%\misc\res.component %_DEST%\xml\res.component
diff --git a/extensions/source/oooimprovecore/core.cxx b/extensions/source/oooimprovecore/core.cxx
deleted file mode 100644
index b857c68cf4d6..000000000000
--- a/extensions/source/oooimprovecore/core.cxx
+++ /dev/null
@@ -1,190 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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.
- *
- ************************************************************************/
-
-
-#include <com/sun/star/oooimprovement/XCore.hpp>
-
-#include "oooimprovecore_module.hxx"
-#include <com/sun/star/frame/XTerminateListener.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/oooimprovement/XCoreController.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <comphelper/configurationhelper.hxx>
-#include <comphelper/processfactory.hxx>
-#include <comphelper/uieventslogger.hxx>
-#include <cppuhelper/implbase3.hxx>
-#include <svx/svxdlg.hxx>
-#include <vcl/svapp.hxx>
-#include <osl/mutex.hxx>
-#include <svl/itemset.hxx>
-#include <svl/stritem.hxx>
-#include <sfx2/app.hxx>
-#include <svx/dialogs.hrc>
-#include <sfx2/sfxsids.hrc>
-
-using namespace ::com::sun::star::oooimprovement;
-using ::com::sun::star::frame::XTerminateListener;
-using ::com::sun::star::lang::EventObject;
-using ::com::sun::star::lang::XMultiServiceFactory;
-using ::com::sun::star::lang::XServiceInfo;
-using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::RuntimeException;
-using ::com::sun::star::uno::Sequence;
-using ::com::sun::star::uno::UNO_QUERY;
-using ::com::sun::star::uno::XComponentContext;
-using ::com::sun::star::uno::XInterface;
-using ::comphelper::UiEventsLogger;
-using ::rtl::OUString;
-
-// declaration
-namespace oooimprovecore
-{
- class Core : public ::cppu::WeakImplHelper3<XCore,XServiceInfo,XTerminateListener>
- {
- public:
- // XServiceInfo - static version
- static OUString SAL_CALL getImplementationName_static();
- static Sequence<OUString> SAL_CALL getSupportedServiceNames_static();
- static Reference<XInterface> Create(const Reference<XComponentContext>& context );
-
- protected:
- Core(const Reference<XComponentContext>&);
- virtual ~Core();
-
- // XCore
- virtual sal_Int32 SAL_CALL getSessionLogEventCount() throw(RuntimeException);
- virtual sal_Bool SAL_CALL getUiEventsLoggerEnabled() throw(RuntimeException);
- virtual void SAL_CALL inviteUser() throw(RuntimeException);
-
- // XServiceInfo
- virtual OUString SAL_CALL getImplementationName() throw(RuntimeException);
- virtual sal_Bool SAL_CALL supportsService(const OUString& service_name) throw(RuntimeException);
- virtual Sequence<OUString> SAL_CALL getSupportedServiceNames() throw(RuntimeException);
-
- // XTerminateListener
- virtual void SAL_CALL queryTermination(const EventObject&) throw(RuntimeException);
- virtual void SAL_CALL notifyTermination(const EventObject&) throw(RuntimeException);
-
- // XEventListener
- virtual void SAL_CALL disposing(const EventObject&) throw(RuntimeException);
- };
-}
-
-
-// implementation
-namespace oooimprovecore
-{
-
- Core::Core(const Reference<XComponentContext>&)
- { }
-
- Core::~Core()
- { }
-
- sal_Int32 SAL_CALL Core::getSessionLogEventCount() throw(RuntimeException)
- { return UiEventsLogger::getSessionLogEventCount(); }
-
- sal_Bool SAL_CALL Core::getUiEventsLoggerEnabled() throw(RuntimeException)
- { return UiEventsLogger::isEnabled(); }
-
- void SAL_CALL Core::inviteUser() throw(RuntimeException)
- {
- Reference<XMultiServiceFactory> xServiceFactory = ::comphelper::getProcessServiceFactory();
-
- OUString help_url;
- Reference<XCoreController> core_c(
- xServiceFactory->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.oooimprovement.CoreController"))),
- UNO_QUERY);
- if(core_c.is())
- ::comphelper::ConfigurationHelper::readDirectKey(
- xServiceFactory,
- OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.OOoImprovement.Settings")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("Participation")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("HelpUrl")),
- ::comphelper::ConfigurationHelper::E_READONLY) >>= help_url;
- else
- help_url = OUString(RTL_CONSTASCII_USTRINGPARAM("http://www.libreoffice.org"));
- {
- SolarMutexGuard aGuard;
- SfxAllItemSet aSet( SFX_APP()->GetPool() );
- aSet.Put( SfxStringItem( SID_CURRENT_URL, help_url ) );
- SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- if ( pFact )
- {
- SfxAbstractDialog *pDlg = pFact->CreateSfxDialog( NULL, aSet, 0, RID_SVXPAGE_IMPROVEMENT );
- pDlg->Execute();
- delete pDlg;
- }
- }
- }
-
- sal_Bool SAL_CALL Core::supportsService(const OUString& service_name) throw(RuntimeException)
- {
- const Sequence<OUString> service_names(getSupportedServiceNames());
- for (sal_Int32 idx = service_names.getLength()-1; idx>=0; --idx)
- if(service_name == service_names[idx]) return sal_True;
- return sal_False;
- }
-
- OUString SAL_CALL Core::getImplementationName() throw(RuntimeException)
- { return getImplementationName_static(); }
-
- Sequence<OUString> SAL_CALL Core::getSupportedServiceNames() throw(RuntimeException)
- { return getSupportedServiceNames_static(); }
-
- OUString SAL_CALL Core::getImplementationName_static()
- { return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.extensions.oooimprovecore.Core")); }
-
- Sequence<OUString> SAL_CALL Core::getSupportedServiceNames_static()
- {
- Sequence<OUString> aServiceNames(1);
- aServiceNames[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.oooimprovement.Core"));
- return aServiceNames;
- }
-
- void Core::queryTermination(const EventObject&) throw(RuntimeException)
- { }
-
- void Core::notifyTermination(const EventObject&) throw(RuntimeException)
- {
- UiEventsLogger::disposing();
- }
-
- void Core::disposing(const EventObject&) throw(RuntimeException)
- { }
-
- Reference<XInterface> Core::Create(const Reference<XComponentContext>& context)
- { return *(new Core(context)); }
-
- void createRegistryInfo_Core()
- {
- static OAutoRegistration<Core> auto_reg;
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovecore/makefile.mk b/extensions/source/oooimprovecore/makefile.mk
deleted file mode 100644
index 66ab6cd1090c..000000000000
--- a/extensions/source/oooimprovecore/makefile.mk
+++ /dev/null
@@ -1,82 +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.
-#
-#*************************************************************************
-
-PRJ=..$/..
-PRJNAME=extensions
-TARGET=oooimprovecore
-
-# --- Settings ----------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files -------------------------------------
-
-EXCEPTIONSFILES= \
- $(SLO)$/core.obj \
- $(SLO)$/oooimprovecore_services.obj \
-
-SLOFILES= \
- $(EXCEPTIONSFILES) \
- $(SLO)$/oooimprovecore_module.obj \
-
-LIB1TARGET=$(SLB)$/$(TARGET)_t.lib
-LIB1FILES= \
- $(SLB)$/$(TARGET).lib \
-
-SHL1TARGET=$(TARGET)$(DLLPOSTFIX)
-
-SHL1STDLIBS= \
- $(COMPHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(SALLIB) \
- $(VCLLIB) \
- $(SVLLIB) \
- $(SVTOOLLIB) \
- $(SFXLIB) \
- $(SVXCORELIB) \
- $(SVXLIB) \
- $(TOOLSLIB)
-
-
-SHL1LIBS=$(LIB1TARGET)
-SHL1DEF=$(MISC)$/$(SHL1TARGET).def
-DEF1NAME=$(SHL1TARGET)
-SHL1VERSIONMAP=$(SOLARENV)/src/component.map
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
-
-ALLTAR : $(MISC)/oooimprovecore.component
-
-$(MISC)/oooimprovecore.component .ERRREMOVE : \
- $(SOLARENV)/bin/createcomponent.xslt oooimprovecore.component
- $(XSLTPROC) --nonet --stringparam uri \
- '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
- $(SOLARENV)/bin/createcomponent.xslt oooimprovecore.component
diff --git a/extensions/source/oooimprovecore/oooimprovecore.component b/extensions/source/oooimprovecore/oooimprovecore.component
deleted file mode 100644
index 58bdaf37c2c5..000000000000
--- a/extensions/source/oooimprovecore/oooimprovecore.component
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--**********************************************************************
-*
-* 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.
-*
-**********************************************************************-->
-
-<component loader="com.sun.star.loader.SharedLibrary"
- xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.comp.extensions.oooimprovecore.Core">
- <service name="com.sun.star.oooimprovement.Core"/>
- </implementation>
-</component>
diff --git a/extensions/source/oooimprovecore/oooimprovecore_module.cxx b/extensions/source/oooimprovecore/oooimprovecore_module.cxx
deleted file mode 100644
index 11be045ecf7a..000000000000
--- a/extensions/source/oooimprovecore/oooimprovecore_module.cxx
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#include "oooimprovecore_module.hxx"
-#include <rtl/instance.hxx>
-
-namespace oooimprovecore
-{
- struct OooimprovecoreModuleCreator
- {
- OooimprovecoreModule m_aOooimprovecoreModule;
- };
- namespace
- {
- class theOooimprovecoreModuleInstance : public rtl::Static<OooimprovecoreModuleCreator, theOooimprovecoreModuleInstance> {};
- }
-
- OooimprovecoreModule::OooimprovecoreModule()
- :BaseClass()
- {
- }
-
- OooimprovecoreModule& OooimprovecoreModule::getInstance()
- {
- return theOooimprovecoreModuleInstance::get().m_aOooimprovecoreModule;
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovecore/oooimprovecore_module.hxx b/extensions/source/oooimprovecore/oooimprovecore_module.hxx
deleted file mode 100644
index 3dda474cc7ce..000000000000
--- a/extensions/source/oooimprovecore/oooimprovecore_module.hxx
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 EXTENSIONS_OOOIMPROVECORE_MODULE_HXX
-#define EXTENSIONS_OOOIMPROVECORE_MODULE_HXX
-
-#include <comphelper/componentmodule.hxx>
-
-namespace oooimprovecore
-{
- /* -------------------------------------------------------------------- */
- class OooimprovecoreModule : public ::comphelper::OModule
- {
- friend struct OooimprovecoreModuleCreator;
- typedef ::comphelper::OModule BaseClass;
-
- public:
- static OooimprovecoreModule& getInstance();
-
- private:
- OooimprovecoreModule();
- };
-
- /* -------------------------------------------------------------------- */
- class OooimprovecoreModuleClient : public ::comphelper::OModuleClient
- {
- private:
- typedef ::comphelper::OModuleClient BaseClass;
-
- public:
- OooimprovecoreModuleClient() : BaseClass( OooimprovecoreModule::getInstance() )
- {
- }
- };
-
- /* -------------------------------------------------------------------- */
- template < class TYPE >
- class OAutoRegistration : public ::comphelper::OAutoRegistration< TYPE >
- {
- private:
- typedef ::comphelper::OAutoRegistration< TYPE > BaseClass;
-
- public:
- OAutoRegistration() : BaseClass( OooimprovecoreModule::getInstance() )
- {
- }
- };
-
- /* -------------------------------------------------------------------- */
- template < class TYPE >
- class OSingletonRegistration : public ::comphelper::OSingletonRegistration< TYPE >
- {
- private:
- typedef ::comphelper::OSingletonRegistration< TYPE > BaseClass;
-
- public:
- OSingletonRegistration() : BaseClass( OooimprovecoreModule::getInstance() )
- {
- }
- };
-}
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovecore/oooimprovecore_services.cxx b/extensions/source/oooimprovecore/oooimprovecore_services.cxx
deleted file mode 100644
index 56c8ed56de8e..000000000000
--- a/extensions/source/oooimprovecore/oooimprovecore_services.cxx
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-
-#include "oooimprovecore_module.hxx"
-
-namespace oooimprovecore
-{
- extern void createRegistryInfo_Core();
-
- static void initializeModule()
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- createRegistryInfo_Core();
- }
-
-}
-
-extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
- const sal_Char* pImplementationName, void* pServiceManager, void* pRegistryKey )
-{
- ::oooimprovecore::initializeModule();
- return ::oooimprovecore::OooimprovecoreModule::getInstance().getComponentFactory( pImplementationName, pServiceManager, pRegistryKey );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/Jobs.xcu b/extensions/source/oooimprovement/Jobs.xcu
deleted file mode 100644
index 206d83dd7eb2..000000000000
--- a/extensions/source/oooimprovement/Jobs.xcu
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<oor:component-data oor:name="Jobs" oor:package="org.openoffice.Office" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <node oor:name="Jobs">
- <node oor:name="OOoImprovement.OnLogRotateJob" oor:op="replace">
- <prop oor:name="Service">
- <value>com.sun.star.comp.extensions.oooimprovement.OnLogRotateJob</value>
- </prop>
- <node oor:name="Arguments"/>
- </node>
- <node oor:name="OOoImprovement.InviteJob" oor:op="replace">
- <prop oor:name="Service">
- <value>com.sun.star.comp.extensions.oooimprovement.InviteJob</value>
- </prop>
- <node oor:name="Arguments"/>
- </node>
- </node>
- <node oor:name="Events">
- <node oor:name="onFirstVisibleTask" oor:op="fuse">
- <node oor:name="JobList">
- <node oor:name="OOoImprovement.OnLogRotateJob" oor:op="replace"/>
- <node oor:name="OOoImprovement.InviteJob" oor:op="replace"/>
- </node>
- </node>
- </node>
-</oor:component-data>
diff --git a/extensions/source/oooimprovement/Logging.xcu b/extensions/source/oooimprovement/Logging.xcu
deleted file mode 100644
index 4ea492d67737..000000000000
--- a/extensions/source/oooimprovement/Logging.xcu
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<oor:component-data oor:name="Logging" oor:package="org.openoffice.Office" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <node oor:name="OOoImprovement">
- <prop oor:name="EnablingAllowed">
- <value>true</value>
- </prop>
- </node>
-</oor:component-data>
diff --git a/extensions/source/oooimprovement/config.cxx b/extensions/source/oooimprovement/config.cxx
deleted file mode 100644
index 7611ffee499e..000000000000
--- a/extensions/source/oooimprovement/config.cxx
+++ /dev/null
@@ -1,297 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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.
- *
- ************************************************************************/
-
-
-#include "config.hxx"
-#include "myconfigurationhelper.hxx"
-#include <rtl/ustrbuf.hxx>
-
-
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::uno;
-using ::rtl::OUString;
-using ::rtl::OUStringBuffer;
-
-
-namespace
-{
- using namespace oooimprovement;
-
- static const OUString CFG_COUNTERS(RTL_CONSTASCII_USTRINGPARAM("Counters"));
- static const OUString CFG_ENABLINGALLOWED(RTL_CONSTASCII_USTRINGPARAM("EnablingAllowed"));
- static const OUString CFG_EVENTSCOUNT(RTL_CONSTASCII_USTRINGPARAM("LoggedEvents"));
- static const OUString CFG_EXTENSION(RTL_CONSTASCII_USTRINGPARAM("ooSetupExtension"));
- static const OUString CFG_FAILEDATTEMPTS(RTL_CONSTASCII_USTRINGPARAM("FailedAttempts"));
- static const OUString CFG_INVACCEPT(RTL_CONSTASCII_USTRINGPARAM("InvitationAccepted"));
- static const OUString CFG_L10N(RTL_CONSTASCII_USTRINGPARAM("L10N"));
- static const OUString CFG_LOCALE(RTL_CONSTASCII_USTRINGPARAM("ooLocale"));
- static const OUString CFG_LOGGING(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.Logging"));
- static const OUString CFG_LOGPATH(RTL_CONSTASCII_USTRINGPARAM("LogPath"));
- static const OUString CFG_NAME(RTL_CONSTASCII_USTRINGPARAM("ooName"));
- static const OUString CFG_OFFICESTARTCOUNTDOWN(RTL_CONSTASCII_USTRINGPARAM("OfficeStartCounterdown"));
- static const OUString CFG_OOOIMPROVEMENT(RTL_CONSTASCII_USTRINGPARAM("OOoImprovement"));
- static const OUString CFG_OOOIMPROVEMENTPACK(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.OOoImprovement.Settings"));
- static const OUString CFG_PARTICIPATION(RTL_CONSTASCII_USTRINGPARAM("Participation"));
- static const OUString CFG_PRODUCT(RTL_CONSTASCII_USTRINGPARAM("Product"));
- static const OUString CFG_REPORTCOUNT(RTL_CONSTASCII_USTRINGPARAM("UploadedReports"));
- static const OUString CFG_REPORTEREMAIL(RTL_CONSTASCII_USTRINGPARAM("ReporterEmail"));
- static const OUString CFG_SETUP(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup"));
- static const OUString CFG_SHOWEDINV(RTL_CONSTASCII_USTRINGPARAM("ShowedInvitation"));
- static const OUString CFG_SOAPIDADD(RTL_CONSTASCII_USTRINGPARAM("SoapIdAdditions"));
- static const OUString CFG_SOAPURL(RTL_CONSTASCII_USTRINGPARAM("SoapUrl"));
- static const OUString CFG_UPLOAD(RTL_CONSTASCII_USTRINGPARAM("Upload"));
- static const OUString CFG_VERSION(RTL_CONSTASCII_USTRINGPARAM("ooSetupVersion"));
-
- static const OUString SOAPID(RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org Improvement Report - Version 1\n"));
-
- static sal_Int32 incrementCfgValue(
- const Reference<XMultiServiceFactory> sm,
- const OUString& package,
- const OUString& rel_path,
- const OUString& key,
- sal_Int32 increment_by)
- {
- sal_Int32 value;
- Reference<XInterface> cfg =
- MyConfigurationHelper::openConfig(
- sm,
- package, MyConfigurationHelper::E_STANDARD);
- MyConfigurationHelper::readRelativeKey(
- cfg,
- rel_path, key) >>= value;
- value += increment_by;
- MyConfigurationHelper::writeRelativeKey(
- cfg,
- rel_path, key,
- Any(value));
- MyConfigurationHelper::flush(cfg);
- return value;
- };
-}
-
-namespace oooimprovement
-{
- Config::Config(const Reference<XMultiServiceFactory>& sf)
- : m_ServiceFactory(sf)
- {}
-
- OUString Config::getSoapUrl() const
- {
- OUString result;
- MyConfigurationHelper::readDirectKey(
- m_ServiceFactory,
- CFG_OOOIMPROVEMENTPACK, CFG_UPLOAD, CFG_SOAPURL,
- MyConfigurationHelper::E_READONLY) >>= result;
- return result;
- }
-
- OUString Config::getSoapId() const
- {
- OUString value;
- OUStringBuffer result = SOAPID;
- MyConfigurationHelper::readDirectKey(
- m_ServiceFactory,
- CFG_OOOIMPROVEMENTPACK, CFG_UPLOAD, CFG_SOAPIDADD,
- MyConfigurationHelper::E_READONLY) >>= value;
- result.append(value);
- return result.makeStringAndClear();
- }
-
- OUString Config::getReporterEmail() const
- {
- OUString result;
- MyConfigurationHelper::readDirectKey(
- m_ServiceFactory,
- CFG_OOOIMPROVEMENTPACK, CFG_UPLOAD, CFG_REPORTEREMAIL,
- MyConfigurationHelper::E_READONLY) >>= result;
- return result;
- }
-
- OUString Config::getLogPath() const
- {
- OUString result;
- MyConfigurationHelper::readDirectKey(
- m_ServiceFactory,
- CFG_LOGGING, CFG_OOOIMPROVEMENT, CFG_LOGPATH,
- MyConfigurationHelper::E_READONLY) >>= result;
- return result;
- }
-
- bool Config::getEnablingAllowed() const
- {
- bool result = false;
- MyConfigurationHelper::readDirectKey(
- m_ServiceFactory,
- CFG_LOGGING, CFG_OOOIMPROVEMENT, CFG_ENABLINGALLOWED,
- MyConfigurationHelper::E_READONLY) >>= result;
- return result;
- }
-
- bool Config::getInvitationAccepted() const
- {
- bool result = false;
- MyConfigurationHelper::readDirectKey(
- m_ServiceFactory,
- CFG_OOOIMPROVEMENTPACK, CFG_PARTICIPATION, CFG_INVACCEPT,
- MyConfigurationHelper::E_READONLY) >>= result;
- return result;
- };
-
- bool Config::getShowedInvitation() const
- {
- bool result = false;
- MyConfigurationHelper::readDirectKey(
- m_ServiceFactory,
- CFG_OOOIMPROVEMENTPACK, CFG_PARTICIPATION, CFG_SHOWEDINV,
- MyConfigurationHelper::E_READONLY) >>= result;
- return result;
- };
-
- OUString Config::getCompleteProductname() const
- {
- OUStringBuffer result;
- OUString value;
- MyConfigurationHelper::readDirectKey(
- m_ServiceFactory,
- CFG_SETUP, CFG_PRODUCT, CFG_NAME,
- MyConfigurationHelper::E_READONLY) >>= value;
- result.append(value);
-
- value = OUString();
- MyConfigurationHelper::readDirectKey(
- m_ServiceFactory,
- CFG_SETUP, CFG_PRODUCT, CFG_VERSION,
- MyConfigurationHelper::E_READONLY) >>= value;
- if(value.getLength()) result.appendAscii(" ").append(value);
-
- value = OUString();
- MyConfigurationHelper::readDirectKey(
- m_ServiceFactory,
- CFG_SETUP, CFG_PRODUCT, CFG_EXTENSION,
- MyConfigurationHelper::E_READONLY) >>= value;
- if(value.getLength()) result.appendAscii(" ").append(value);
-
- return result.makeStringAndClear();
- }
-
- OUString Config::getSetupLocale() const
- {
- OUString result;
- MyConfigurationHelper::readDirectKey(
- m_ServiceFactory,
- CFG_SETUP, CFG_L10N, CFG_LOCALE,
- MyConfigurationHelper::E_READONLY) >>= result;
- return result;
- }
-
- sal_Int32 Config::getReportCount() const
- {
- sal_Int32 result = 0;
- MyConfigurationHelper::readDirectKey(
- m_ServiceFactory,
- CFG_OOOIMPROVEMENTPACK, CFG_COUNTERS, CFG_REPORTCOUNT,
- MyConfigurationHelper::E_READONLY) >>= result;
- return result;
- }
-
-#ifdef FUTURE
- sal_Int32 Config::getFailedAttempts() const
- {
- sal_Int32 result = 0;
- MyConfigurationHelper::readDirectKey(
- m_ServiceFactory,
- CFG_OOOIMPROVEMENTPACK, CFG_COUNTERS, CFG_FAILEDATTEMPTS,
- MyConfigurationHelper::E_READONLY) >>= result;
- return result;
- }
-#endif
-
- sal_Int32 Config::getOfficeStartCounterdown() const
- {
- sal_Int32 result = 0;
- MyConfigurationHelper::readDirectKey(
- m_ServiceFactory,
- CFG_OOOIMPROVEMENTPACK, CFG_PARTICIPATION, CFG_OFFICESTARTCOUNTDOWN,
- MyConfigurationHelper::E_READONLY) >>= result;
- return result;
- }
-
- sal_Int32 Config::incrementReportCount(sal_Int32 by)
- {
- return incrementCfgValue(
- m_ServiceFactory,
- CFG_OOOIMPROVEMENTPACK, CFG_COUNTERS, CFG_REPORTCOUNT,
- by);
- }
-
- sal_Int32 Config::incrementEventCount(sal_Int32 by)
- {
- return incrementCfgValue(
- m_ServiceFactory,
- CFG_OOOIMPROVEMENTPACK, CFG_COUNTERS, CFG_EVENTSCOUNT,
- by);
- }
-
- sal_Int32 Config::incrementFailedAttempts(sal_Int32 by)
- {
- return incrementCfgValue(
- m_ServiceFactory,
- CFG_OOOIMPROVEMENTPACK, CFG_COUNTERS, CFG_FAILEDATTEMPTS,
- by);
- }
-
- sal_Int32 Config::decrementOfficeStartCounterdown(sal_Int32 by)
- {
- return incrementCfgValue(
- m_ServiceFactory,
- CFG_OOOIMPROVEMENTPACK, CFG_PARTICIPATION, CFG_OFFICESTARTCOUNTDOWN,
- -by);
- }
-
- void Config::resetFailedAttempts()
- {
- sal_Int32 zero = 0;
- MyConfigurationHelper::writeDirectKey(
- m_ServiceFactory,
- CFG_OOOIMPROVEMENTPACK, CFG_COUNTERS, CFG_FAILEDATTEMPTS,
- Any(zero),
- MyConfigurationHelper::E_STANDARD);
- }
-
- void Config::giveupUploading()
- {
- sal_Bool f = false;
- MyConfigurationHelper::writeDirectKey(
- m_ServiceFactory,
- CFG_OOOIMPROVEMENTPACK, CFG_PARTICIPATION, CFG_INVACCEPT,
- Any(f),
- MyConfigurationHelper::E_STANDARD);
- resetFailedAttempts();
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/config.hxx b/extensions/source/oooimprovement/config.hxx
deleted file mode 100644
index fe8e38ca820a..000000000000
--- a/extensions/source/oooimprovement/config.hxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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 EXTENSIONS_OOOIMPROVEMENT_CONFIG_HXX
-#define EXTENSIONS_OOOIMPROVEMENT_CONFIG_HXX
-
-#include <rtl/ustring.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-
-
-namespace oooimprovement
-{
- class Config
- {
- public:
- Config(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& sf);
- bool getEnablingAllowed() const;
- bool getInvitationAccepted() const;
- bool getShowedInvitation() const;
- ::rtl::OUString getCompleteProductname() const;
- ::rtl::OUString getLogPath() const;
- ::rtl::OUString getReporterEmail() const;
- ::rtl::OUString getSetupLocale() const;
- ::rtl::OUString getSoapId() const;
- ::rtl::OUString getSoapUrl() const;
- sal_Int32 getReportCount() const;
- sal_Int32 getOfficeStartCounterdown() const;
- sal_Int32 incrementEventCount(sal_Int32 by);
- sal_Int32 incrementReportCount(sal_Int32 by);
- sal_Int32 incrementFailedAttempts(sal_Int32 by);
- sal_Int32 decrementOfficeStartCounterdown(sal_Int32 by);
- void resetFailedAttempts();
- void giveupUploading();
-
- private:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_ServiceFactory;
- };
-}
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/corecontroller.cxx b/extensions/source/oooimprovement/corecontroller.cxx
deleted file mode 100644
index e233b681e573..000000000000
--- a/extensions/source/oooimprovement/corecontroller.cxx
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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.
- *
- ************************************************************************/
-
-
-#include "corecontroller.hxx"
-#include "config.hxx"
-
-using ::rtl::OUString;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::uno;
-
-
-namespace oooimprovement
-{
- CoreController::CoreController(const Reference<XMultiServiceFactory>& sf)
- : m_ServiceFactory(sf)
- { }
-
- CoreController::~CoreController()
- { }
-
- sal_Bool SAL_CALL CoreController::enablingUiEventsLoggerAllowed(sal_Int16 version) throw(RuntimeException)
- {
- Config config(m_ServiceFactory);
- if(version==1 && config.getEnablingAllowed() && config.getShowedInvitation() && config.getInvitationAccepted())
- return true;
- return false;
- }
-
- sal_Bool SAL_CALL CoreController::showBuiltinOptionsPage(sal_Int16 version) throw(RuntimeException)
- {
- Config config(m_ServiceFactory);
- if(version==1 && config.getEnablingAllowed())
- return true;
- return false;
- }
-
- sal_Bool SAL_CALL CoreController::supportsService(const OUString& service_name) throw(RuntimeException)
- {
- const Sequence<OUString> service_names(getSupportedServiceNames());
- for (sal_Int32 idx = service_names.getLength()-1; idx>=0; --idx)
- if(service_name == service_names[idx]) return sal_True;
- return sal_False;
- }
-
- OUString SAL_CALL CoreController::getImplementationName() throw(RuntimeException)
- { return getImplementationName_static(); }
-
- Sequence<OUString> SAL_CALL CoreController::getSupportedServiceNames() throw(RuntimeException)
- { return getSupportedServiceNames_static(); }
-
- OUString SAL_CALL CoreController::getImplementationName_static()
- { return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.extensions.oooimprovement.CoreController")); }
-
- Sequence<OUString> SAL_CALL CoreController::getSupportedServiceNames_static()
- {
- Sequence<OUString> aServiceNames(1);
- aServiceNames[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.oooimprovement.CoreController"));
- return aServiceNames;
- }
-
- Reference<XInterface> SAL_CALL CoreController::Create(const Reference<XMultiServiceFactory>& sm)
- { return *(new CoreController(sm)); }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/corecontroller.hxx b/extensions/source/oooimprovement/corecontroller.hxx
deleted file mode 100644
index a1c04deb448f..000000000000
--- a/extensions/source/oooimprovement/corecontroller.hxx
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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 EXTENSIONS_OOOIMPROVEMENT_CORECONTROLLER_HXX
-#define EXTENSIONS_OOOIMPROVEMENT_CORECONTROLLER_HXX
-
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/oooimprovement/XCoreController.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <cppuhelper/implbase2.hxx>
-
-
-namespace oooimprovement
-{
- #ifdef css
- #error css defined globally
- #endif
- #define css ::com::sun::star
- class CoreController : public ::cppu::WeakImplHelper2<
- css::oooimprovement::XCoreController,
- css::lang::XServiceInfo>
- {
- public:
- // css::lang::XServiceInfo - static version
- static ::rtl::OUString SAL_CALL getImplementationName_static();
- static css::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames_static();
- //static css::uno::Reference< css::uno::XInterface> SAL_CALL Create(
- // const css::uno::Reference<css::uno::XComponentContext>& context);
-
- static css::uno::Reference< css::uno::XInterface> SAL_CALL Create(
- const css::uno::Reference< css::lang::XMultiServiceFactory>& sm);
-
- protected:
- CoreController(const css::uno::Reference< css::uno::XComponentContext>& context);
- CoreController(const css::uno::Reference< css::lang::XMultiServiceFactory>& sm);
- virtual ~CoreController();
-
- // css::oooimprovement::XCoreController
- virtual sal_Bool SAL_CALL enablingUiEventsLoggerAllowed(sal_Int16 version)
- throw(css::uno::RuntimeException);
- virtual sal_Bool SAL_CALL showBuiltinOptionsPage(sal_Int16 version)
- throw(css::uno::RuntimeException);
-
- // css::lang::XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName()
- throw(css::uno::RuntimeException);
- virtual ::sal_Bool SAL_CALL supportsService(const ::rtl::OUString& service_name)
- throw(css::uno::RuntimeException);
- virtual css::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames()
- throw(css::uno::RuntimeException);
-
- private:
- css::uno::Reference< css::lang::XMultiServiceFactory> m_ServiceFactory;
- };
- #undef css
-}
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/errormail.cxx b/extensions/source/oooimprovement/errormail.cxx
deleted file mode 100644
index 45ebf3b6ee19..000000000000
--- a/extensions/source/oooimprovement/errormail.cxx
+++ /dev/null
@@ -1,206 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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.
- *
- ************************************************************************/
-
-
-#include "errormail.hxx"
-#include "config.hxx"
-#include <unotools/bootstrap.hxx>
-#include <rtl/ustring.hxx>
-#include <rtl/string.hxx>
-#include <rtl/strbuf.hxx>
-
-#if defined(UNIX)
- #include <sys/utsname.h>
-#endif
-#ifdef WIN32
- #include <windows.h>
-#endif
-
-
-using namespace com::sun::star::lang;
-using namespace com::sun::star::uno;
-using namespace oooimprovement;
-using ::rtl::OUString;
-using ::rtl::OString;
-using ::rtl::OStringBuffer;
-
-
-namespace {
- static OString replaceAll(const OString& str, sal_Char old, const OString& replacement)
- {
- OStringBuffer result;
- sal_Int32 idx = 0;
- do {
- result.append(str.getToken(0, old, idx));
- if(idx>=0) result.append(replacement);
- } while(idx >= 0);
- return result.makeStringAndClear();
- };
-
- static OString xmlAttrEncode(const OString& input)
- {
- OString result = replaceAll(input, '&', OString("&amp;"));
- result = replaceAll(result, '<', OString("&lt;"));
- result = replaceAll(result, '"', OString("&quot;"));
- return replaceAll(result, '>', OString("&gt;"));
- }
-
- static OString getPlatform()
- {
- #ifdef SOLARIS
- return "Solaris";
- #elif defined LINUX
- return "Linux";
- #elif defined WIN32
- return "Win32";
- #elif defined UNIX
- return "Unix";
- #else
- return "Unknown";
- #endif
- };
-
-#if defined(UNIX)
- static const OString getLocale()
- {
- const char * locale = getenv( "LC_ALL" );
- if( NULL == locale )
- locale = getenv( "LC_CTYPE" );
-
- if( NULL == locale )
- locale = getenv( "LANG" );
-
- if( NULL == locale )
- locale = "C";
- return locale;
- };
-
- static OString getSystemInfoXml(const Reference<XMultiServiceFactory>&)
- {
- struct utsname info;
- //memset(&info, 0, sizeof(info));
- uname(&info);
- OStringBuffer result =
- "<systeminfo:systeminfo xmlns:systeminfo=\"http://openoffice.org/2002/systeminfo\">\n"
- "<systeminfo:System name=\""
- + xmlAttrEncode(OString(info.sysname)) + "\" version=\""
- + xmlAttrEncode(OString(info.version)) + "\" build=\""
- + xmlAttrEncode(OString(info.release)) + "\" locale=\""
- + xmlAttrEncode(OString(getLocale())) + "\"/>\n"
- "<systeminfo:CPU type=\""
- + xmlAttrEncode(OString(info.machine)) + "\"/>\n"
- "</systeminfo:systeminfo>\n";
- return result.makeStringAndClear();
- };
-#else
- static OString getSystemInfoXml(const Reference<XMultiServiceFactory>&)
- {
- OSVERSIONINFO info;
- ZeroMemory(&info, sizeof(OSVERSIONINFO));
- info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
- GetVersionEx(&info);
- OStringBuffer result = OString(
- "<systeminfo:systeminfo xmlns:systeminfo=\"http://openoffice.org/2002/systeminfo\">\n"
- "<systeminfo:System name=\"");
- if(VER_PLATFORM_WIN32_NT == info.dwPlatformId)
- result.append(OString("Windows NT"));
- else
- result.append(OString("Windows"));
- result.append("\" version=\"").append(static_cast<long>(info.dwMajorVersion));
- result.append(".").append(static_cast<long>(info.dwMinorVersion));
- result.append("\" build=\"").append(static_cast<long>(info.dwBuildNumber));
- result.append("\" locale=\"").append(static_cast<long>(GetUserDefaultLangID()));
- result.append("\"/>\n");
- result.append("<systeminfo:CPU type=\""
- /* x86 or AMD64 */ "\"/>\n"
- "</systeminfo:systeminfo>\n");
- return result.makeStringAndClear();
- };
-#endif
-
- static OString getOfficeInfoXml(const Reference<XMultiServiceFactory>& sf)
- {
- Config config(sf);
- const OString product = OUStringToOString(config.getCompleteProductname(), RTL_TEXTENCODING_ASCII_US);
- const OString platform = getPlatform();
- const OString language = OUStringToOString(config.getSetupLocale(), RTL_TEXTENCODING_ASCII_US);
- // If the oooimprovement lib is packaged in an extension, this needs to
- // be done in another way: The build version string needs to be made
- // available in an UNO service (if no better place is found for this,
- // com.sun.star.comp.extensions.oooimprovecore.Core in oooimprovecore
- // is likely the best fit)
- const OString build = OUStringToOString(::utl::Bootstrap::getBuildIdData(OUString()), RTL_TEXTENCODING_ASCII_US);
- const OString exceptiontype = "";
- OStringBuffer result =
- "<officeinfo:officeinfo xmlns:officeinfo=\"http://openoffice.org/2002/officeinfo\" platform=\""
- + xmlAttrEncode(platform) + "\" language=\""
- + xmlAttrEncode(language) + "\" build=\""
- + xmlAttrEncode(build) + "\" exceptiontype=\""
- + xmlAttrEncode(exceptiontype) + "\" product=\""
- + xmlAttrEncode(product) + " \" />\n";
- return result.makeStringAndClear();
- };
-}
-
-namespace oooimprovement
-{
- Errormail::Errormail(const Reference<XMultiServiceFactory>& sf)
- : m_ServiceFactory(sf)
- {}
-
- OString Errormail::getXml()
- {
- Config config(m_ServiceFactory);
- const OString usertype;
- const OString email = OUStringToOString(config.getReporterEmail(), RTL_TEXTENCODING_ASCII_US);
- OString feedback;
- {
- OStringBuffer temp;
- temp.append(config.getReportCount());
- feedback = temp.makeStringAndClear();
- }
- const OString title;
- OStringBuffer result =
- "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
- "<!DOCTYPE errormail:errormail PUBLIC \"-//OpenOffice.org//DTD ErrorMail 1.0//EN\" \"errormail.dtd\">\n"
- "<errormail:errormail xmlns:errormail=\"http://openoffice.org/2002/errormail\" usertype=\""
- + xmlAttrEncode(usertype) + "\">\n"
- "<reportmail:mail xmlns:reportmail=\"http://openoffice.org/2002/reportmail\" version=\"1.1\" feedback=\""
- + xmlAttrEncode(feedback) + "\" email=\""
- + xmlAttrEncode(email) + "\">\n"
- "<reportmail:title>"
- + xmlAttrEncode(title) + "</reportmail:title>\n"
- "<reportmail:attachment name=\"data.zip\" media-type=\"application/zip\" class=\"OOoImprovementLog\"/>\n"
- "</reportmail:mail>\n"
- + getOfficeInfoXml(m_ServiceFactory)
- + getSystemInfoXml(m_ServiceFactory) +
- "</errormail:errormail>\n";
- return result.makeStringAndClear();
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/errormail.hxx b/extensions/source/oooimprovement/errormail.hxx
deleted file mode 100644
index 8b836514fcac..000000000000
--- a/extensions/source/oooimprovement/errormail.hxx
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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 EXTENSIONS_OOOIMPROVEMENT_ERRORMAIL_HXX
-#define EXTENSIONS_OOOIMPROVEMENT_ERRORMAIL_HXX
-
-#include <rtl/string.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-
-
-namespace oooimprovement
-{
- #ifdef css
- #error css defined globally
- #endif
- #define css ::com::sun::star
- class Errormail
- {
- public:
- Errormail(const css::uno::Reference<css::lang::XMultiServiceFactory>& sf);
- // Errormail does NOT use CDATA so it can be included
- // in a CDATA of another XML document without further
- // quoting
- ::rtl::OString getXml();
- private:
- css::uno::Reference<css::lang::XMultiServiceFactory> m_ServiceFactory;
- };
- #undef css
-}
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/invite_job.cxx b/extensions/source/oooimprovement/invite_job.cxx
deleted file mode 100644
index 80418ddcc4d6..000000000000
--- a/extensions/source/oooimprovement/invite_job.cxx
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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.
- *
- ************************************************************************/
-
-
-
-#include "invite_job.hxx"
-#include "config.hxx"
-#include "logstorage.hxx"
-#include <com/sun/star/oooimprovement/XCore.hpp>
-#include <rtl/process.h>
-
-
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::task;
-using namespace ::com::sun::star::uno;
-using ::com::sun::star::oooimprovement::XCore;
-using ::rtl::OUString;
-
-namespace
-{
- // dont show Invitation, when:
- // -nofirststartwizard commandline switch is present
- // [add additional conditions here]
- static bool lcl_IsInvitationAllowed()
- {
- static OUString sNoFirstStartWizard(RTL_CONSTASCII_USTRINGPARAM("-nofirststartwizard"));
- sal_Int32 nCount = rtl_getAppCommandArgCount();
- for(sal_Int32 nCurrent=0; nCurrent<nCount; nCurrent++)
- {
- OUString sArg;
- rtl_getAppCommandArg(nCurrent, &sArg.pData);
- if(sNoFirstStartWizard == sArg)
- return false;
- }
- return true;
- }
-}
-
-namespace oooimprovement
-{
-
- InviteJob::InviteJob(const Reference<XMultiServiceFactory>& sf)
- : m_ServiceFactory(sf)
- { }
-
- InviteJob::~InviteJob()
- { }
-
- void SAL_CALL InviteJob::executeAsync(const Sequence<NamedValue>&, const Reference<XJobListener>& listener) throw(RuntimeException)
- {
- Config config(m_ServiceFactory);
- {
- LogStorage log_storage(m_ServiceFactory);
- log_storage.assureExists();
- }
- if(config.getOfficeStartCounterdown() > 0)
- config.decrementOfficeStartCounterdown(1);
- else
- {
- if(lcl_IsInvitationAllowed() && !config.getShowedInvitation())
- {
- Reference<XCore> core(
- m_ServiceFactory->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.oooimprovement.Core"))),
- UNO_QUERY);
- if(core.is()) core->inviteUser();
- }
- }
- Any result;
- listener->jobFinished(Reference<XAsyncJob>(this), result);
- }
-
- sal_Bool SAL_CALL InviteJob::supportsService(const OUString& service_name) throw(RuntimeException)
- {
- const Sequence<OUString> service_names(getSupportedServiceNames());
- for (sal_Int32 idx = service_names.getLength()-1; idx>=0; --idx)
- if(service_name == service_names[idx]) return sal_True;
- return sal_False;
- }
-
- OUString SAL_CALL InviteJob::getImplementationName() throw(RuntimeException)
- { return getImplementationName_static(); }
-
- Sequence<OUString> SAL_CALL InviteJob::getSupportedServiceNames() throw(RuntimeException)
- { return getSupportedServiceNames_static(); }
-
- OUString SAL_CALL InviteJob::getImplementationName_static()
- { return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.extensions.oooimprovement.InviteJob")); }
-
- Sequence<OUString> SAL_CALL InviteJob::getSupportedServiceNames_static()
- {
- Sequence<OUString> aServiceNames(1);
- aServiceNames[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.AsyncJob"));
- return aServiceNames;
- }
-
- Reference<XInterface> InviteJob::Create(const Reference<XMultiServiceFactory>& sm)
- { return *(new InviteJob(sm)); }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/invite_job.hxx b/extensions/source/oooimprovement/invite_job.hxx
deleted file mode 100644
index 599649f62205..000000000000
--- a/extensions/source/oooimprovement/invite_job.hxx
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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 EXTENSIONS_OOOIMPROVEMENT_INVITEJOB_HXX
-#define EXTENSIONS_OOOIMPROVEMENT_INVITEJOB_HXX
-
-#include <com/sun/star/task/XAsyncJob.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <cppuhelper/implbase2.hxx>
-
-
-namespace oooimprovement
-{
- #ifdef css
- #error css defined globally
- #endif
- #define css ::com::sun::star
- class InviteJob : public ::cppu::WeakImplHelper2<
- css::task::XAsyncJob,
- css::lang::XServiceInfo>
- {
- public:
- // XServiceInfo - static version
- static ::rtl::OUString SAL_CALL getImplementationName_static();
- static css::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames_static();
- //static css::uno::Reference< css::uno::XInterface> SAL_CALL Create(
- // const css::uno::Reference< css::uno::XComponentContext>& context);
-
- static css::uno::Reference< css::uno::XInterface> SAL_CALL Create(const css::uno::Reference< css::lang::XMultiServiceFactory>& sm);
-
- protected:
- InviteJob(const css::uno::Reference< css::uno::XComponentContext>& context);
- InviteJob(const css::uno::Reference< css::lang::XMultiServiceFactory>& sf);
- virtual ~InviteJob();
-
- // XAsyncJob
- virtual void SAL_CALL executeAsync(
- const css::uno::Sequence< css::beans::NamedValue>& args,
- const css::uno::Reference< css::task::XJobListener>& listener)
- throw(css::uno::RuntimeException);
-
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName()
- throw(css::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService(const ::rtl::OUString& service_name)
- throw(css::uno::RuntimeException);
- virtual css::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames()
- throw(css::uno::RuntimeException);
-
- private:
- css::uno::Reference< css::lang::XMultiServiceFactory> m_ServiceFactory;
- };
- #undef css
-}
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/logpacker.cxx b/extensions/source/oooimprovement/logpacker.cxx
deleted file mode 100644
index fe04c885f3e8..000000000000
--- a/extensions/source/oooimprovement/logpacker.cxx
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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.
- *
- ************************************************************************/
-
-
-#include "logpacker.hxx"
-#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <com/sun/star/embed/XStorage.hpp>
-#include <com/sun/star/embed/XTransactedObject.hpp>
-#include <com/sun/star/embed/ElementModes.hpp>
-#include <rtl/ustrbuf.hxx>
-
-
-using namespace com::sun::star::embed;
-using namespace com::sun::star::io;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::uno;
-using ::com::sun::star::ucb::XSimpleFileAccess;
-using ::rtl::OUString;
-using ::rtl::OUStringBuffer;
-
-
-namespace
-{
- static const OUString getZipfileurl(const OUString& csvfileurl)
- {
- OUStringBuffer buf(csvfileurl);
- buf.setLength(csvfileurl.getLength()-3);
- buf.appendAscii("zip");
- return buf.makeStringAndClear();
- };
-
- static sal_Int32 countLines(const Sequence<sal_Int8>& data)
- {
- sal_Int32 result = 0;
- for(sal_Int32 idx = data.getLength()-1; idx>=0; --idx)
- if(data[idx]==0x0a) result++;
- return result;
- };
-}
-
-namespace oooimprovement
-{
- LogPacker::LogPacker(const Reference<XMultiServiceFactory>& sf)
- : m_ServiceFactory(sf)
- {}
-
- sal_Int32 LogPacker::pack(const OUString& fileurl)
- {
- Reference<XSimpleFileAccess> file_access(
- m_ServiceFactory->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess"))),
- UNO_QUERY_THROW);
-
- Reference<XStorage> storage;
- {
- Reference<XSingleServiceFactory> storage_factory(
- m_ServiceFactory->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.StorageFactory"))),
- UNO_QUERY_THROW);
- Sequence<Any> storage_init_args(2);
- storage_init_args[0] = Any(getZipfileurl(fileurl));
- storage_init_args[1] = Any(ElementModes::WRITE);
- storage = Reference<XStorage>(
- storage_factory->createInstanceWithArguments(storage_init_args),
- UNO_QUERY_THROW);
- }
-
- Reference<XOutputStream> zipped_stream = storage->openStreamElement(
- OUString(RTL_CONSTASCII_USTRINGPARAM("logdata.csv")),
- ElementModes::WRITE)->getOutputStream();
- Reference<XInputStream> unzipped_stream = file_access->openFileRead(fileurl);
- const sal_Int32 bufsize = 1024;
- sal_Int32 read_bytes;
- sal_Int32 logged_events = -1; // ignore header row
- Sequence<sal_Int8> buf(bufsize);
- do
- {
- read_bytes = unzipped_stream->readBytes(buf, bufsize);
- buf.realloc(read_bytes);
- logged_events += countLines(buf);
- zipped_stream->writeBytes(buf);
- } while(read_bytes == bufsize);
- unzipped_stream->closeInput();
- zipped_stream->flush();
- zipped_stream->closeOutput();
- Reference<XTransactedObject>(storage, UNO_QUERY_THROW)->commit();
- file_access->kill(fileurl);
- return logged_events;
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/logpacker.hxx b/extensions/source/oooimprovement/logpacker.hxx
deleted file mode 100644
index fdf08141ba03..000000000000
--- a/extensions/source/oooimprovement/logpacker.hxx
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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 EXTENSIONS_OOOIMPROVEMENT_LOGPACKER_HXX
-#define EXTENSIONS_OOOIMPROVEMENT_LOGPACKER_HXX
-
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <rtl/ustring.hxx>
-
-
-namespace oooimprovement
-{
- #ifdef css
- #error css defined globally
- #endif
- #define css ::com::sun::star
- class LogPacker
- {
- public:
- LogPacker(const css::uno::Reference< css::lang::XMultiServiceFactory>& sf);
- sal_Int32 pack(const ::rtl::OUString& fileurl);
- private:
- const css::uno::Reference< css::lang::XMultiServiceFactory> m_ServiceFactory;
- };
- #undef css
-}
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/logstorage.cxx b/extensions/source/oooimprovement/logstorage.cxx
deleted file mode 100644
index 4be4fa01fff5..000000000000
--- a/extensions/source/oooimprovement/logstorage.cxx
+++ /dev/null
@@ -1,147 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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.
- *
- ************************************************************************/
-
-
-#include "logstorage.hxx"
-#include "config.hxx"
-#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
-#include <com/sun/star/util/XStringSubstitution.hpp>
-
-
-using namespace com::sun::star::io;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::util;
-using ::com::sun::star::ucb::XSimpleFileAccess;
-using ::rtl::OUString;
-using ::std::vector;
-
-
-namespace
-{
- using namespace oooimprovement;
-
- static const OUString CSSU_PATHSUB(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.PathSubstitution"));
-
- static OUString getLogPathFromCfg(const Reference<XMultiServiceFactory>& sf)
- {
- Config config(sf);
- OUString result=config.getLogPath();
- Reference<XStringSubstitution> path_sub(
- sf->createInstance(CSSU_PATHSUB),
- UNO_QUERY);
- if(path_sub.is())
- result = path_sub->substituteVariables(result, sal_False);
- return result;
- }
-
- static bool isZipfile(const OUString& fileurl)
- {
- static const OUString file_extension(RTL_CONSTASCII_USTRINGPARAM(".zip"));
- return fileurl.match(file_extension, fileurl.getLength()-file_extension.getLength());
- };
-
- static bool isLogfile(const OUString& fileurl)
- {
- static const OUString file_extension(RTL_CONSTASCII_USTRINGPARAM(".csv"));
- static const OUString current(RTL_CONSTASCII_USTRINGPARAM("Current.csv"));
- return
- fileurl.match(file_extension, fileurl.getLength()-file_extension.getLength())
- && !fileurl.match(current, fileurl.getLength()-current.getLength());
- };
-
- static bool isZipOrLogFile(const OUString& fileurl)
- {
- return isZipfile(fileurl) || isLogfile(fileurl);
- }
-
- static Sequence<OUString> getAllLogStoragefiles(const Reference<XMultiServiceFactory>& sf)
- {
- Reference<XSimpleFileAccess> file_access(
- sf->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess"))),
- UNO_QUERY_THROW);
- return file_access->getFolderContents(
- getLogPathFromCfg(sf),
- false);
- };
-
- static vector<OUString> getLogStoragefiles(
- const Reference<XMultiServiceFactory>& sf,
- bool (*condition)(const OUString& path))
- {
- Sequence<OUString> candidates = getAllLogStoragefiles(sf);
- vector<OUString> result;
- result.reserve(candidates.getLength());
- for(sal_Int32 idx=0; idx<candidates.getLength(); ++idx)
- if(condition(candidates[idx]))
- result.push_back(candidates[idx]);
- return result;
- };
-
- static void assureLogStorageExists(const Reference<XMultiServiceFactory>& sf)
- {
- Reference<XSimpleFileAccess> file_access(
- sf->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess"))),
- UNO_QUERY_THROW);
- OUString log_path(getLogPathFromCfg(sf));
- if(!file_access->isFolder(log_path))
- file_access->createFolder(log_path);
- };
-}
-
-namespace oooimprovement
-{
-
- LogStorage::LogStorage(const Reference<XMultiServiceFactory>& sf)
- : m_ServiceFactory(sf)
- {}
-
- void LogStorage::assureExists()
- {
- assureLogStorageExists(m_ServiceFactory);
- }
-
- void LogStorage::clear()
- {
- Reference<XSimpleFileAccess> file_access(
- m_ServiceFactory->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess"))),
- UNO_QUERY_THROW);
- vector<OUString> files_to_kill = getLogStoragefiles(m_ServiceFactory, &isZipOrLogFile);
- for(vector<OUString>::iterator item = files_to_kill.begin();
- item != files_to_kill.end();
- ++item)
- file_access->kill(*item);
- }
-
- const vector<OUString> LogStorage::getUnzippedLogFiles() const
- { return getLogStoragefiles(m_ServiceFactory, &isLogfile); }
-
- const vector<OUString> LogStorage::getZippedLogFiles() const
- { return getLogStoragefiles(m_ServiceFactory, &isZipfile); }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/logstorage.hxx b/extensions/source/oooimprovement/logstorage.hxx
deleted file mode 100644
index 82dcdf331f59..000000000000
--- a/extensions/source/oooimprovement/logstorage.hxx
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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 EXTENSIONS_OOOIMPROVEMENT_LOGSTORAGE_HXX
-#define EXTENSIONS_OOOIMPROVEMENT_LOGSTORAGE_HXX
-
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <rtl/ustring.hxx>
-#include <vector>
-
-
-namespace oooimprovement
-{
- #ifdef css
- #error css defined globally
- #endif
- #define css ::com::sun::star
- class LogStorage
- {
- public:
- LogStorage(const css::uno::Reference< css::lang::XMultiServiceFactory>& sf);
- void assureExists();
- void clear();
- const std::vector< ::rtl::OUString> getUnzippedLogFiles() const;
- const std::vector< ::rtl::OUString> getZippedLogFiles() const;
- private:
- const css::uno::Reference< css::lang::XMultiServiceFactory> m_ServiceFactory;
- };
- #undef css
-}
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/makefile.mk b/extensions/source/oooimprovement/makefile.mk
deleted file mode 100644
index 1a7e4ba17711..000000000000
--- a/extensions/source/oooimprovement/makefile.mk
+++ /dev/null
@@ -1,110 +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.
-#
-#*************************************************************************
-
-
-PRJ=..$/..
-
-PRJNAME=extensions
-TARGET=oooimprovement
-ENABLE_EXCEPTIONS=TRUE
-
-PACKAGE=org.openoffice.Office
-ABSXCSROOT=$(SOLARXMLDIR)
-XCSROOT=..
-DTDDIR=$(ABSXCSROOT)
-XSLDIR=$(ABSXCSROOT)$/processing
-PROCESSOUT=$(MISC)$/$(TARGET)
-PROCESSORDIR=$(SOLARBINDIR)
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES= \
- $(SLO)$/myconfigurationhelper.obj \
- $(SLO)$/config.obj \
- $(SLO)$/corecontroller.obj \
- $(SLO)$/errormail.obj \
- $(SLO)$/invite_job.obj \
- $(SLO)$/logpacker.obj \
- $(SLO)$/logstorage.obj \
- $(SLO)$/onlogrotate_job.obj \
- $(SLO)$/oooimprovement_exports.obj \
- $(SLO)$/soaprequest.obj \
- $(SLO)$/soapsender.obj \
-
-SHL1STDLIBS= \
- $(COMPHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(SALLIB) \
- $(UNOTOOLSLIB) \
-
-SHL1TARGET= $(TARGET)$(DLLPOSTFIX)
-
-SHL1LIBS= $(SLB)$/$(TARGET).lib
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-DEF1NAME= $(SHL1TARGET)
-SHL1VERSIONMAP=$(SOLARENV)/src/component.map
-
-PACKAGEDIR=$(subst,.,$/ $(PACKAGE))
-SPOOLDIR=$(MISC)$/registry$/spool
-
-XCUFILES= \
- Jobs.xcu \
- Logging.xcu
-
-MYXCUFILES= \
- $(SPOOLDIR)$/$(PACKAGEDIR)$/Jobs$/Jobs-oooimprovement.xcu \
- $(SPOOLDIR)$/$(PACKAGEDIR)$/Logging$/Logging-oooimprovement.xcu
-
-
-# --- Targets ---
-
-.INCLUDE : target.mk
-
-ALLTAR : $(MYXCUFILES)
-
-XCU_SOURCEDIR:=.
-
-$(SPOOLDIR)$/$(PACKAGEDIR)$/Jobs$/Jobs-oooimprovement.xcu : $(XCU_SOURCEDIR)$/Jobs.xcu
- @-$(MKDIRHIER) $(@:d)
- @$(COPY) $< $@
-
-$(SPOOLDIR)$/$(PACKAGEDIR)$/Logging$/Logging-oooimprovement.xcu : $(XCU_SOURCEDIR)$/Logging.xcu
- @-$(MKDIRHIER) $(@:d)
- @$(COPY) $< $@
-
-ALLTAR : $(MISC)/oooimprovement.component
-
-$(MISC)/oooimprovement.component .ERRREMOVE : \
- $(SOLARENV)/bin/createcomponent.xslt oooimprovement.component
- $(XSLTPROC) --nonet --stringparam uri \
- '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
- $(SOLARENV)/bin/createcomponent.xslt oooimprovement.component
diff --git a/extensions/source/oooimprovement/makefile.pmk b/extensions/source/oooimprovement/makefile.pmk
deleted file mode 100644
index f5c8da25b54a..000000000000
--- a/extensions/source/oooimprovement/makefile.pmk
+++ /dev/null
@@ -1,29 +0,0 @@
-# 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.
-#
-#*************************************************************************
-
-XSLDIR=$(SOLARXMLDIR)$/processing
-XCSROOT=$(SOLARXMLDIR)
-ABSXCSROOT=$(SOLARXMLDIR)
-DTDDIR=$(SOLARXMLDIR)
-PROCESSOUT=$(MISC)$/$(CUSTID)
-PROCESSORDIR=$(SOLARBINDIR)
-
-# no validation by inspector class
-NO_INSPECTION=TRUE
-
diff --git a/extensions/source/oooimprovement/myconfigurationhelper.cxx b/extensions/source/oooimprovement/myconfigurationhelper.cxx
deleted file mode 100644
index 493ae01cc7fe..000000000000
--- a/extensions/source/oooimprovement/myconfigurationhelper.cxx
+++ /dev/null
@@ -1,156 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-
-#include "myconfigurationhelper.hxx"
-#include <com/sun/star/beans/NamedValue.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/configuration/theDefaultProvider.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <comphelper/processfactory.hxx>
-#include <rtl/ustrbuf.hxx>
-
-namespace css = ::com::sun::star;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::uno;
-using ::rtl::OUString;
-using ::rtl::OUStringBuffer;
-
-namespace
-{
- static const OUString noSuchElement(const OUString& path)
- {
- OUStringBuffer buf(256);
- buf.appendAscii("The requested path \"");
- buf.append(path);
- buf.appendAscii("\" does not exists.");
- return buf.makeStringAndClear();
- };
-}
-
-namespace oooimprovement
-{
- Reference<XInterface> MyConfigurationHelper::openConfig(
- const Reference<XMultiServiceFactory> xSMGR,
- const OUString& sPackage,
- sal_Int32 eMode)
- {
- Reference<XMultiServiceFactory> xConfigProvider(
- css::configuration::theDefaultProvider::get(
- comphelper::getComponentContext(xSMGR)));
-
- css::uno::Sequence<Any> lParams(1);
- css::beans::NamedValue aParam;
-
- // set root path
- aParam.Name = OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath"));
- aParam.Value <<= sPackage;
- lParams[0] = makeAny(aParam);
-
- // open it
- Reference<XInterface> xCFG;
-
- sal_Bool bReadOnly = ((eMode & MyConfigurationHelper::E_READONLY)==MyConfigurationHelper::E_READONLY);
- if (bReadOnly)
- xCFG = xConfigProvider->createInstanceWithArguments(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")),
- lParams);
- else
- xCFG = xConfigProvider->createInstanceWithArguments(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationUpdateAccess")),
- lParams);
- return xCFG;
- }
-
- Any MyConfigurationHelper::readRelativeKey(
- const Reference<XInterface> xCFG,
- const OUString& sRelPath,
- const OUString& sKey)
- {
- Reference<css::container::XHierarchicalNameAccess> xAccess(xCFG, UNO_QUERY_THROW);
-
- Reference<css::beans::XPropertySet> xProps;
- xAccess->getByHierarchicalName(sRelPath) >>= xProps;
- if (!xProps.is())
- throw css::container::NoSuchElementException(
- noSuchElement(sRelPath),
- Reference<XInterface>());
- return xProps->getPropertyValue(sKey);
- }
-
- void MyConfigurationHelper::writeRelativeKey(
- const Reference<XInterface> xCFG,
- const OUString& sRelPath,
- const OUString& sKey,
- const Any& aValue)
- {
- Reference<css::container::XHierarchicalNameAccess> xAccess(xCFG, UNO_QUERY_THROW);
-
- Reference<css::beans::XPropertySet> xProps;
- xAccess->getByHierarchicalName(sRelPath) >>= xProps;
- if (!xProps.is())
- throw css::container::NoSuchElementException(
- noSuchElement(sRelPath),
- Reference<XInterface>());
- xProps->setPropertyValue(sKey, aValue);
- }
-
- Any MyConfigurationHelper::readDirectKey(
- const Reference<XMultiServiceFactory> xSMGR,
- const OUString& sPackage,
- const OUString& sRelPath,
- const OUString& sKey,
- sal_Int32 eMode)
- {
- Reference<XInterface> xCFG = MyConfigurationHelper::openConfig(xSMGR, sPackage, eMode);
- return MyConfigurationHelper::readRelativeKey(xCFG, sRelPath, sKey);
- }
-
- void MyConfigurationHelper::writeDirectKey(
- const Reference<XMultiServiceFactory> xSMGR,
- const OUString& sPackage,
- const OUString& sRelPath,
- const OUString& sKey,
- const Any& aValue,
- sal_Int32 eMode)
- {
- Reference<XInterface> xCFG = MyConfigurationHelper::openConfig(xSMGR, sPackage, eMode);
- MyConfigurationHelper::writeRelativeKey(xCFG, sRelPath, sKey, aValue);
- MyConfigurationHelper::flush(xCFG);
- }
-
- void MyConfigurationHelper::flush(const Reference<XInterface>& xCFG)
- {
- Reference<css::util::XChangesBatch> xBatch(xCFG, UNO_QUERY_THROW);
- xBatch->commitChanges();
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/myconfigurationhelper.hxx b/extensions/source/oooimprovement/myconfigurationhelper.hxx
deleted file mode 100644
index 56b3d1353c8f..000000000000
--- a/extensions/source/oooimprovement/myconfigurationhelper.hxx
+++ /dev/null
@@ -1,213 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 EXTENSIONS_OOOIMPROVEMENT_CONFIGURATIONHELPER_HXX
-#define EXTENSIONS_OOOIMPROVEMENT_CONFIGURATIONHELPER_HXX
-
-#include <com/sun/star/uno/XInterface.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
-#include <com/sun/star/util/XChangesBatch.hpp>
-#include <rtl/ustring.hxx>
-
-
-namespace oooimprovement
-{
- #ifdef css
- #error css defined globally
- #endif
- #define css ::com::sun::star
- // Copy from comphelper module, we cant use that directly from an extension
- class MyConfigurationHelper
- {
- public:
- //-----------------------------------------------
- /** specify all possible modes, which can be used to open a configuration access.
- *
- * @see openConfig()
- * @see readDirectKey()
- * @see writeDirectKey()
- */
- enum EConfigurationModes
- {
- /// opens configuration in read/write mode (without LAZY writing!)
- E_STANDARD = 0,
- /// configuration will be opened readonly
- E_READONLY = 1,
- };
-
- //-----------------------------------------------
- /** returns access to the specified configuration package.
- *
- * This method should be used, if e.g. more then one request to the same
- * configuration package is needed. The configuration access can be cached
- * outside and used inbetween.
- *
- * @param xSMGR
- * the uno service manager, which should be used to create the
- * configuration access.
- *
- * @param sPackage
- * the name of the configuration package.
- * e.g. <ul>
- * <li>org.openoffice.Office.Common</li>
- * <li>org.openoffice.Office.Common/Menu</li>
- * </ul>
- *
- * @param eMode
- * specify the open mode for the returned configuration access.
- * It's interpreted as a flag field and can be any usefull combination
- * of values of EConfigurationModes.
- *
- * @throw css::uno::Any exceptions the underlying configuration can throw.
- * E.g. css::uno::Exception if the configuration could not be opened.
- */
- static css::uno::Reference< css::uno::XInterface> openConfig(
- const css::uno::Reference< css::lang::XMultiServiceFactory> xSMGR,
- const ::rtl::OUString& sPackage,
- sal_Int32 eMode);
-
- //-----------------------------------------------
- /** reads the value of an existing(!) configuration key,
- * which is searched relative to the specified configuration access.
- *
- * This method must be used in combination with openConfig().
- * The cached configuration access must be provided here ... and
- * all operations are made relativ to this access point.
- *
- * @param xCFG
- * the configuration root, where sRelPath should be interpreted.
- * as relativ path
- *
- * @param sRelPath
- * path relative to xCFG parameter.
- *
- * @param sKey
- * the configuration node, where we should read the value.
- *
- * @return [css.uno.css::uno::Any]
- * the value of sKey.
- *
- * @throw css::uno::Any exceptions the underlying configuration can throw.
- * E.g. css::container::NoSuchElementException if the specified
- * key does not exists.
- */
- static css::uno::Any readRelativeKey(
- const css::uno::Reference< css::uno::XInterface> xCFG,
- const ::rtl::OUString& sRelPath,
- const ::rtl::OUString& sKey);
-
- //-----------------------------------------------
- /** writes a new value for an existing(!) configuration key,
- * which is searched relative to the specified configuration access.
- *
- * This method must be used in combination with openConfig().
- * The cached configuration access must be provided here ... and
- * all operations are made relativ to this access point.
- *
- * @param xCFG
- * the configuration root, where sRelPath should be interpreted.
- * as relativ path
- *
- * @param sRelPath
- * path relative to xCFG parameter.
- *
- * @param sKey
- * the configuration node, where we should write the new value.
- *
- * @param aValue
- * the new value for sKey.
- *
- * @throw css::uno::Any exceptions the underlying configuration can throw.
- * E.g. css::container::NoSuchElementException if the specified
- * key does not exists or css::uno::Exception if the provided configuration
- * access does not allow writing for this key.
- */
- static void writeRelativeKey(
- const css::uno::Reference< css::uno::XInterface> xCFG,
- const ::rtl::OUString& sRelPath,
- const ::rtl::OUString& sKey,
- const css::uno::Any& aValue);
-
- //-----------------------------------------------
- /** commit all changes made on the specified configuration access.
- *
- * This method must be used in combination with openConfig().
- * The cached configuration access must be provided here.
- *
- * @param xCFG
- * the configuration root, where changes should be commited.
- *
- * @throw css::uno::Any exceptions the underlying configuration can throw.
- * E.g. uno::Exception if the provided configuration
- * access does not allow writing for this set.
- */
- static void flush(const css::uno::Reference< css::uno::XInterface>& xCFG);
-
- //-----------------------------------------------
- /** does the same then openConfig() & readRelativeKey() together.
- *
- * This method should be used for reading one key at one code place only.
- * Because it opens the specified configuration package, reads the key and
- * closes the configuration again.
- *
- * So its not very usefull to use this method for reading multiple keys at the same time.
- * (Excepting these keys exists inside different configuration packages ...))
- */
- static css::uno::Any readDirectKey(
- const css::uno::Reference< css::lang::XMultiServiceFactory> xSMGR,
- const ::rtl::OUString& sPackage,
- const ::rtl::OUString& sRelPath,
- const ::rtl::OUString& sKey,
- sal_Int32 eMode);
-
- //-----------------------------------------------
- /** does the same then openConfig() / writeRelativeKey() & flush() together.
- *
- * This method should be used for writing one key at one code place only.
- * Because it opens the specified configuration package, writes the key, flush
- * all changes and closes the configuration again.
- *
- * So its not very usefull to use this method for writing multiple keys at the same time.
- * (Excepting these keys exists inside different configuration packages ...))
- */
- static void writeDirectKey(
- const css::uno::Reference< css::lang::XMultiServiceFactory> xSMGR,
- const ::rtl::OUString& sPackage,
- const ::rtl::OUString& sRelPath,
- const ::rtl::OUString& sKey,
- const css::uno::Any& aValue,
- sal_Int32 eMode);
- };
- #undef css
-}
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/onlogrotate_job.cxx b/extensions/source/oooimprovement/onlogrotate_job.cxx
deleted file mode 100644
index 43efaeb80668..000000000000
--- a/extensions/source/oooimprovement/onlogrotate_job.cxx
+++ /dev/null
@@ -1,241 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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.
- *
- ************************************************************************/
-
-
-#include "onlogrotate_job.hxx"
-#include "config.hxx"
-#include "logpacker.hxx"
-#include "logstorage.hxx"
-#include "soaprequest.hxx"
-#include "soapsender.hxx"
-
-#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
-#include <com/sun/star/frame/XDesktop.hpp>
-#include <com/sun/star/frame/XTerminateListener.hpp>
-#include <osl/conditn.hxx>
-#include <osl/thread.hxx>
-#include <osl/time.h>
-#include <cppuhelper/implbase1.hxx>
-#include <memory>
-
-
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::task;
-using namespace ::com::sun::star::uno;
-using ::com::sun::star::frame::XTerminateListener;
-using ::com::sun::star::frame::XDesktop;
-using ::com::sun::star::ucb::XSimpleFileAccess;
-using ::rtl::OUString;
-using ::std::vector;
-
-namespace
-{
- using namespace oooimprovement;
-
- static void packLogs(const Reference<XMultiServiceFactory>& sf)
- {
- try
- {
- Config config(sf);
- LogPacker log_packer(sf);
- vector<OUString> csvfiles = LogStorage(sf).getUnzippedLogFiles();
- for(
- vector<OUString>::iterator item = csvfiles.begin();
- item!=csvfiles.end();
- item++)
- config.incrementEventCount(log_packer.pack(*item));
- } catch(...) {};
- };
-
- static void uploadLogs(const Reference<XMultiServiceFactory>& sf)
- {
- try
- {
- Config config(sf);
- Reference<XSimpleFileAccess> file_access(
- sf->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess"))),
- UNO_QUERY_THROW);
- SoapSender sender(sf, config.getSoapUrl());
- OUString soap_id = config.getSoapId();
- vector<OUString> zipfiles = LogStorage(sf).getZippedLogFiles();
- for(
- vector<OUString>::iterator item = zipfiles.begin();
- item!=zipfiles.end();
- item++)
- {
- if(config.incrementFailedAttempts(1) > 25)
- {
- config.giveupUploading();
- LogStorage(sf).clear();
- return;
- }
- sender.send(SoapRequest(sf, soap_id, *item));
- config.incrementReportCount(1);
- file_access->kill(*item);
- config.resetFailedAttempts();
- }
- } catch(...) {};
- }
-
- class OnLogRotateThread : public ::osl::Thread
- {
- public:
- OnLogRotateThread(Reference<XMultiServiceFactory> sf);
- virtual void SAL_CALL run();
- void stop();
-
- private:
- Reference<XMultiServiceFactory> m_ServiceFactory;
- ::osl::Condition m_Stop;
- };
-
- OnLogRotateThread::OnLogRotateThread(Reference<XMultiServiceFactory> sf)
- : m_ServiceFactory(sf)
- {
- OSL_ASSERT(sf.is());
- }
-
- void SAL_CALL OnLogRotateThread::run()
- {
- TimeValue wait_intervall = {30,0};
- if (m_Stop.wait(&wait_intervall) == ::osl::Condition::result_timeout)
- {
- try
- {
- if(Config(m_ServiceFactory).getInvitationAccepted())
- {
- packLogs(m_ServiceFactory);
- uploadLogs(m_ServiceFactory);
- }
- else
- LogStorage(m_ServiceFactory).clear();
- }
- catch(...) {}
- }
- }
-
- void OnLogRotateThread::stop()
- {
- m_Stop.set();
- }
-
- class OnLogRotateThreadWatcher : public ::cppu::WeakImplHelper1<XTerminateListener>
- {
- public:
- OnLogRotateThreadWatcher(Reference<XMultiServiceFactory> sf)
- : m_Thread(new OnLogRotateThread(sf))
- {
- m_Thread->create();
- }
- virtual ~OnLogRotateThreadWatcher()
- {
- m_Thread->stop();
- m_Thread->join();
- };
-
- // XTerminateListener
- virtual void SAL_CALL queryTermination(const EventObject&) throw(RuntimeException)
- { };
- virtual void SAL_CALL notifyTermination(const EventObject&) throw(RuntimeException)
- {
- m_Thread->stop();
- m_Thread->join();
- };
- // XEventListener
- virtual void SAL_CALL disposing(const EventObject&) throw(RuntimeException)
- {
- m_Thread->stop();
- m_Thread->join();
- };
- private:
- ::std::auto_ptr<OnLogRotateThread> m_Thread;
- };
-}
-
-namespace oooimprovement
-{
- OnLogRotateJob::OnLogRotateJob(const Reference<XComponentContext>& context)
- : m_ServiceFactory(Reference<XMultiServiceFactory>(
- context->getServiceManager()->createInstanceWithContext(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.XMultiServiceFactory")), context),
- UNO_QUERY))
- { }
-
- OnLogRotateJob::OnLogRotateJob(const Reference<XMultiServiceFactory>& sf)
- : m_ServiceFactory(sf)
- { }
-
- OnLogRotateJob::~OnLogRotateJob()
- { }
-
- void SAL_CALL OnLogRotateJob::executeAsync(
- const Sequence<NamedValue>&,
- const Reference<XJobListener>& listener)
- throw(RuntimeException)
- {
- Reference<XDesktop> xDesktop(
- m_ServiceFactory->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop"))),
- UNO_QUERY);
- if(xDesktop.is())
- xDesktop->addTerminateListener(Reference<XTerminateListener>(new OnLogRotateThreadWatcher(m_ServiceFactory)));
- Any result;
- listener->jobFinished(Reference<XAsyncJob>(this), result);
- }
-
- sal_Bool SAL_CALL OnLogRotateJob::supportsService(const OUString& service_name) throw(RuntimeException)
- {
- const Sequence<OUString> service_names(getSupportedServiceNames());
- for (sal_Int32 idx = service_names.getLength()-1; idx>=0; --idx)
- if(service_name == service_names[idx]) return sal_True;
- return sal_False;
- }
-
- OUString SAL_CALL OnLogRotateJob::getImplementationName() throw(RuntimeException)
- { return getImplementationName_static(); }
-
- Sequence<OUString> SAL_CALL OnLogRotateJob::getSupportedServiceNames() throw(RuntimeException)
- { return getSupportedServiceNames_static(); }
-
- OUString SAL_CALL OnLogRotateJob::getImplementationName_static()
- { return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.extensions.oooimprovement.OnLogRotateJob")); }
-
- Sequence<OUString> SAL_CALL OnLogRotateJob::getSupportedServiceNames_static()
- {
- Sequence<OUString> aServiceNames(1);
- aServiceNames[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.AsyncJob"));
- return aServiceNames;
- }
-
- Reference<XInterface> OnLogRotateJob::Create(const Reference<XComponentContext>& context)
- { return *(new OnLogRotateJob(context)); }
-
- Reference<XInterface> OnLogRotateJob::Create(const Reference<XMultiServiceFactory>& sf)
- { return *(new OnLogRotateJob(sf)); }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/onlogrotate_job.hxx b/extensions/source/oooimprovement/onlogrotate_job.hxx
deleted file mode 100644
index a84575c9f187..000000000000
--- a/extensions/source/oooimprovement/onlogrotate_job.hxx
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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 EXTENSIONS_OOOIMPROVEMENT_ONLOGROTATEJOB_HXX
-#define EXTENSIONS_OOOIMPROVEMENT_ONLOGROTATEJOB_HXX
-
-#include <com/sun/star/task/XAsyncJob.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <cppuhelper/implbase2.hxx>
-
-
-namespace oooimprovement
-{
- #ifdef css
- #error css defined globally
- #endif
- #define css ::com::sun::star
- class OnLogRotateJob : public ::cppu::WeakImplHelper2<
- ::com::sun::star::task::XAsyncJob,
- ::com::sun::star::lang::XServiceInfo>
- {
- public:
- // XServiceInfo - static version
- static ::rtl::OUString SAL_CALL getImplementationName_static();
- static ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames_static();
- static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> SAL_CALL Create(
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& context);
-
- static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> SAL_CALL Create(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& sf);
-
- protected:
- OnLogRotateJob(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& context);
- OnLogRotateJob(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& sm);
- virtual ~OnLogRotateJob();
-
- // XAsyncJob
- virtual void SAL_CALL executeAsync(
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue>& args,
- const ::com::sun::star::uno::Reference< ::com::sun::star::task::XJobListener>& listener)
- throw(::com::sun::star::uno::RuntimeException);
-
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName()
- throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService(const ::rtl::OUString& service_name)
- throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames()
- throw(::com::sun::star::uno::RuntimeException);
-
- private:
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_ServiceFactory;
- };
- #undef css
-}
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/oooimprovement.component b/extensions/source/oooimprovement/oooimprovement.component
deleted file mode 100644
index e133f932c199..000000000000
--- a/extensions/source/oooimprovement/oooimprovement.component
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--**********************************************************************
-*
-* 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.
-*
-**********************************************************************-->
-
-<component loader="com.sun.star.loader.SharedLibrary"
- xmlns="http://openoffice.org/2010/uno-components">
- <implementation
- name="com.sun.star.comp.extensions.oooimprovement.CoreController">
- <service name="com.sun.star.oooimprovement.CoreController"/>
- </implementation>
- <implementation name="com.sun.star.comp.extensions.oooimprovement.InviteJob"/>
- <implementation
- name="com.sun.star.comp.extensions.oooimprovement.OnLogRotateJob"/>
-</component>
diff --git a/extensions/source/oooimprovement/oooimprovement_exports.cxx b/extensions/source/oooimprovement/oooimprovement_exports.cxx
deleted file mode 100644
index ef7d9dac476d..000000000000
--- a/extensions/source/oooimprovement/oooimprovement_exports.cxx
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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.
- *
- ************************************************************************/
-
-
-#include "corecontroller.hxx"
-#include "invite_job.hxx"
-#include "onlogrotate_job.hxx"
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <cppuhelper/factory.hxx>
-#include <osl/mutex.hxx>
-#include <osl/thread.h>
-#include <rtl/ustrbuf.hxx>
-#include <rtl/ustring.hxx>
-
-
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
-using namespace ::com::sun::star::uno;
-using namespace ::oooimprovement;
-using ::rtl::OUString;
-using ::rtl::OUStringBuffer;
-
-
-namespace
-{
- void writeInfo(const Reference<XRegistryKey>& reg_key,
- const OUString& implementation_name,
- const OUString& service_name)
- {
- OUStringBuffer buf(256);
- buf.append(implementation_name);
- buf.appendAscii("/UNO/SERVICES/");
- buf.append(service_name);
- reg_key->createKey(buf.makeStringAndClear());
- }
-}
-
-extern "C"
-{
- SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* pImplName, void* pServiceManager, void*)
- {
- if ( !pServiceManager || !pImplName ) return 0;
-
- Reference<XSingleServiceFactory> factory;
- Reference<XMultiServiceFactory> sm(reinterpret_cast<XMultiServiceFactory*>(pServiceManager), UNO_QUERY);
- OUString impl_name = OUString::createFromAscii(pImplName);
- Sequence<OUString> names(1);
- names[0] = impl_name;
-
- if (impl_name.equals(CoreController::getImplementationName_static()))
- factory = ::cppu::createSingleFactory(sm, impl_name, CoreController::Create, names);
- if (impl_name.equals(OnLogRotateJob::getImplementationName_static()))
- factory = ::cppu::createSingleFactory(sm, impl_name, OnLogRotateJob::Create, names);
- if (impl_name.equals(InviteJob::getImplementationName_static()))
- factory = ::cppu::createSingleFactory(sm, impl_name, InviteJob::Create, names);
- if (!factory.is()) return 0;
- factory->acquire();
- return factory.get();
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/soaprequest.cxx b/extensions/source/oooimprovement/soaprequest.cxx
deleted file mode 100644
index e2b90618ea0c..000000000000
--- a/extensions/source/oooimprovement/soaprequest.cxx
+++ /dev/null
@@ -1,201 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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.
- *
- ************************************************************************/
-
-
-
-#include "soaprequest.hxx"
-#include "errormail.hxx"
-#include "config.hxx"
-#include <boost/shared_ptr.hpp>
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
-#include <rtl/strbuf.hxx>
-#include <rtl/ustring.hxx>
-
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::io;
-using boost::shared_ptr;
-using com::sun::star::io::XOutputStream;
-using com::sun::star::ucb::XSimpleFileAccess;
-using rtl::OUString;
-using rtl::OString;
-using rtl::OStringBuffer;
-
-
-namespace
-{
- static unsigned long asUlong(sal_Int8 input)
- {
- return *reinterpret_cast<unsigned char *>(&input);
- };
-
- static Sequence<sal_Int8> base64_encode(const Sequence<sal_Int8>& input)
- {
- static const char base64_tab[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
- Sequence<sal_Int8> result(4);
- unsigned long value = asUlong(input[0]) << 16;
- if(input.getLength() > 1) value |= asUlong(input[1]) << 8;
- if(input.getLength() > 2) value |= asUlong(input[2]);
-
- result[0] = static_cast<sal_Int8>(base64_tab[(value >> 18) & 0x3F]);
- result[1] = static_cast<sal_Int8>(base64_tab[(value >> 12) & 0x3F]);
- result[2] = static_cast<sal_Int8>('=');
- result[3] = static_cast<sal_Int8>('=');
-
- if (input.getLength() > 1)
- {
- result[2] = base64_tab[(value >> 6) & 0x3F];
- if (input.getLength() > 2)
- result[3] = base64_tab[(value >> 0) & 0x3F];
- }
- return result;
- };
-
- static OString replaceAll(const OString& str, sal_Char old, const OString& replacement)
- {
- OStringBuffer result;
- sal_Int32 idx = 0;
- do {
- result.append(str.getToken(0, old, idx));
- if(idx>=0) result.append(replacement);
- } while(idx >= 0);
- return result.makeStringAndClear();
- };
-
- static OString xmlEncode(const OString& input)
- {
- OString result = replaceAll(input, '&', OString("&amp;"));
- result = replaceAll(result, '<', OString("&lt;"));
- return replaceAll(result, '>', OString("&gt;"));
- }
-
- static shared_ptr<Sequence<sal_Int8> > createSequenceFromString(const OString& str)
- {
- const sal_Int32 size = str.getLength();
- shared_ptr<Sequence<sal_Int8> > result(new Sequence<sal_Int8>(size));
- for(sal_Int32 idx=0; idx < size; idx++)
- (*result)[idx] = str[idx];
- return result;
- };
-
- static void writeString(const Reference<XOutputStream>& target, const OString& str)
- {
- shared_ptr<Sequence<sal_Int8> > seq = createSequenceFromString(str);
- target->writeBytes(*seq);
- };
-
- static void writeFile(const Reference<XMultiServiceFactory>& sf, const Reference<XOutputStream>& target, const OUString& fileurl)
- {
- Reference<XSimpleFileAccess> file_access(
- sf->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess"))),
- UNO_QUERY);
- Reference<XInputStream> file = file_access->openFileRead(fileurl);
- const sal_Int32 bufsize = 3;
- sal_Int32 bytes_read;
- Sequence<sal_Int8> buf(bufsize);
- do
- {
- bytes_read = file->readBytes(buf, bufsize);
- if(bytes_read < buf.getLength()) buf.realloc(bytes_read);
- if(bytes_read) target->writeBytes(base64_encode(buf));
- } while(bytes_read == bufsize);
- };
-
- static const OString SOAP_START(
- "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
- "<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"\n"
- "xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\"\n"
- "xmlns:xsi=\"http://www.w3.org/1999/XMLSchema-instance\"\n"
- "xmlns:xsd=\"http://www.w3.org/1999/XMLSchema\"\n"
- "xmlns:rds=\"urn:ReportDataService\"\n"
- "xmlns:apache=\"http://xml.apache.org/xml-soap\"\n"
- "SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n"
- "<SOAP-ENV:Body>\n"
- "<rds:submitReport>\n");
- static const OString SOAP_ITEMS_START("<hash xsi:type=\"apache:Map\">\n");
- static const OString SOAP_ITEMS_END("</hash>\n");
- static const OString SOAP_END(
- "</rds:submitReport>\n"
- "</SOAP-ENV:Body>\n"
- "</SOAP-ENV:Envelope>\n");
- static const OString SOAP_ITEM_END("]]></value></item>\n");
-
- static const OString getSoapOfficeversion(const Reference<XMultiServiceFactory>& sf)
- {
- return ::rtl::OUStringToOString(oooimprovement::Config(sf).getCompleteProductname(), RTL_TEXTENCODING_ASCII_US);
- };
-
- static const OString getSoapSoapId(const Reference<XMultiServiceFactory>& sf, const OString& soap_id)
- {
- OStringBuffer buf;
- buf.append("<body xsi:type=\"xsd:string\">");
- buf.append(xmlEncode(soap_id)).append("\n");
- buf.append(xmlEncode(getSoapOfficeversion(sf))).append("\n");
- buf.append("</body>\n");
- return buf.makeStringAndClear();
- };
-
- static const OString getSoapItemStart(const OString& key)
- {
- OStringBuffer buf =
- "<item>\n"
- "<key xsi:type=\"xsd:string\">" + key + "</key>\n"
- "<value xsi:type=\"xsd:string\"><![CDATA[";
- return buf.makeStringAndClear();
- };
-}
-
-namespace oooimprovement
-{
- SoapRequest::SoapRequest(const Reference<XMultiServiceFactory>& sf, const OUString& soap_id, const OUString& logfile)
- : m_ServiceFactory(sf)
- , m_SoapId(soap_id)
- , m_Logfile(logfile)
- {}
-
- void SoapRequest::writeTo(const Reference<XOutputStream>& target) const
- {
- writeString(target, SOAP_START);
- writeString(
- target,
- getSoapSoapId(m_ServiceFactory, rtl::OUStringToOString(m_SoapId, RTL_TEXTENCODING_ASCII_US)));
- writeString(target, SOAP_ITEMS_START);
- writeString(target, getSoapItemStart("reportmail.xml"));
- writeString(target, Errormail(m_ServiceFactory).getXml());
- writeString(target, SOAP_ITEM_END);
- writeString(target, getSoapItemStart("data.zip"));
- writeFile(m_ServiceFactory, target, m_Logfile);
- writeString(target, SOAP_ITEM_END);
- writeString(target, SOAP_ITEMS_END);
- writeString(target, SOAP_END);
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/soaprequest.hxx b/extensions/source/oooimprovement/soaprequest.hxx
deleted file mode 100644
index 313569a2c0d0..000000000000
--- a/extensions/source/oooimprovement/soaprequest.hxx
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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 EXTENSIONS_OOOIMPROVEMENT_SOAPREQUEST_HXX
-#define EXTENSIONS_OOOIMPROVEMENT_SOAPREQUEST_HXX
-
-#include <com/sun/star/io/XOutputStream.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <rtl/ustring.hxx>
-
-
-namespace oooimprovement
-{
- #ifdef css
- #error css defined globally
- #endif
- #define css ::com::sun::star
- class SoapRequest
- {
- public:
- SoapRequest(
- const css::uno::Reference< css::lang::XMultiServiceFactory>& sf,
- const ::rtl::OUString& soap_id,
- const ::rtl::OUString& logfile);
- void writeTo(const css::uno::Reference< css::io::XOutputStream>& target) const;
- private:
- const css::uno::Reference< css::lang::XMultiServiceFactory> m_ServiceFactory;
- // soap_id has to be a plain 7-Bit ASCII String for identification of
- // automated test logs etc.
- const ::rtl::OUString m_SoapId;
- // logfile is the file-url to the file to include
- const ::rtl::OUString m_Logfile;
- };
- #undef css
-}
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/soapsender.cxx b/extensions/source/oooimprovement/soapsender.cxx
deleted file mode 100644
index e52679439fbc..000000000000
--- a/extensions/source/oooimprovement/soapsender.cxx
+++ /dev/null
@@ -1,161 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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.
- *
- ************************************************************************/
-
-
-#include "soapsender.hxx"
-#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
-#include <com/sun/star/uno/RuntimeException.hpp>
-#include <com/sun/star/util/XURLTransformer.hpp>
-#include <com/sun/star/io/XTempFile.hpp>
-#include <com/sun/star/io/XOutputStream.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
-#include <osl/socket.hxx>
-#include <rtl/strbuf.hxx>
-#include <boost/shared_ptr.hpp>
-
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::io;
-using boost::shared_ptr;
-using com::sun::star::io::XTempFile;
-using com::sun::star::ucb::XSimpleFileAccess;
-using com::sun::star::util::URL;
-using com::sun::star::util::XURLTransformer;
-using osl::ConnectorSocket;
-using rtl::OString;
-using rtl::OUString;
-using rtl::OStringBuffer;
-
-
-namespace
-{
- static OString getHttpPostHeader(OString path, sal_Int32 length)
- {
- OStringBuffer result =
- "POST " + path + " HTTP/1.0\r\n"
- "Content-Type: text/xml; charset=\"utf-8\"\r\n"
- "Content-Length: ";
- result.append(length);
- result.append("\r\nSOAPAction: \"\"\r\n\r\n");
- return result.makeStringAndClear();
- };
-}
-
-namespace oooimprovement
-{
- SoapSender::SoapSender(const Reference<XMultiServiceFactory> sf, const OUString& url)
- : m_ServiceFactory(sf)
- , m_Url(url)
- { }
-
- void SoapSender::send(const SoapRequest& request) const
- {
- Reference<XTempFile> temp_file(
- m_ServiceFactory->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile"))),
- UNO_QUERY_THROW);
- Reference<XSimpleFileAccess> file_access(
- m_ServiceFactory->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess"))),
- UNO_QUERY_THROW);
- Reference<XURLTransformer> url_trans(
- m_ServiceFactory->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.URLTransformer"))),
- UNO_QUERY_THROW);
-
- // writing request to tempfile
- {
- Reference<XOutputStream> temp_stream = temp_file->getOutputStream();
- request.writeTo(temp_stream);
- temp_stream->flush();
- temp_stream->closeOutput();
- }
-
- // parse Url
- URL url;
- {
- url.Complete = m_Url;
- url_trans->parseStrict(url);
- }
-
- // connect socket
- shared_ptr<ConnectorSocket> socket(new ConnectorSocket(osl_Socket_FamilyInet, osl_Socket_ProtocolIp, osl_Socket_TypeStream));
- {
- ::osl::SocketAddr addr(url.Server, url.Port);
- oslSocketResult result = socket->connect(addr);
- if(result != osl_Socket_Ok)
- throw RuntimeException(
- OUString(RTL_CONSTASCII_USTRINGPARAM("unable to connect to SOAP server")),
- Reference<XInterface>());
- }
-
- // send header
- {
- OStringBuffer path_on_server =
- OUStringToOString(url.Path, RTL_TEXTENCODING_ASCII_US) +
- OUStringToOString(url.Name, RTL_TEXTENCODING_ASCII_US);
- const OString header = getHttpPostHeader(path_on_server.makeStringAndClear(), file_access->getSize(temp_file->getUri()));
- if(socket->write(header.getStr(), header.getLength()) != static_cast<sal_Int32>(header.getLength()))
- throw RuntimeException(
- OUString(RTL_CONSTASCII_USTRINGPARAM("error while sending HTTP header")),
- Reference<XInterface>());
- }
-
- // send soap request
- {
- Reference<XInputStream> temp_stream = file_access->openFileRead(temp_file->getUri());
- const sal_Int32 bufsize = 1024;
- sal_Int32 bytes_read;
- Sequence<sal_Int8> buf(bufsize);
- char buf2[bufsize];
- do
- {
- bytes_read = temp_stream->readBytes(buf, bufsize);
- buf.realloc(bytes_read);
- for(sal_Int32 idx = 0; idx < bytes_read; idx++)
- buf2[idx] = buf[idx];
- if(socket->write(buf2, bytes_read) != bytes_read)
- throw RuntimeException(
- OUString(RTL_CONSTASCII_USTRINGPARAM("error while sending SOAP request")),
- Reference<XInterface>());
- } while(bytes_read == bufsize);
- }
-
- // receive answer
- {
- const sal_Int32 bufsize = 1024;
- char buf[bufsize];
- sal_Int32 bytes_read = socket->read(buf, bufsize);
- OString answer(buf, bytes_read);
- const sal_Int32 returncode_start = answer.indexOf(' ');
- if(returncode_start==-1 || !answer.copy(returncode_start, 4).equals(OString(" 200")))
- throw RuntimeException(
- OUString(RTL_CONSTASCII_USTRINGPARAM("SOAP server returns a error")),
- Reference<XInterface>());
- }
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/oooimprovement/soapsender.hxx b/extensions/source/oooimprovement/soapsender.hxx
deleted file mode 100644
index b21cbe95e011..000000000000
--- a/extensions/source/oooimprovement/soapsender.hxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- * 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 EXTENSIONS_OOOIMPROVEMENT_SOAPSENDER_HXX
-#define EXTENSIONS_OOOIMPROVEMENT_SOAPSENDER_HXX
-
-#include "soaprequest.hxx"
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/util/URL.hpp>
-#include <rtl/ustring.hxx>
-
-
-namespace oooimprovement
-{
- #ifdef css
- #error css defined globally
- #endif
- #define css ::com::sun::star
- class SoapSender
- {
- public:
- SoapSender(
- const css::uno::Reference< css::lang::XMultiServiceFactory> sf,
- const ::rtl::OUString& url);
- void send(const SoapRequest& request) const;
- private:
- const css::uno::Reference< css::lang::XMultiServiceFactory> m_ServiceFactory;
- const ::rtl::OUString m_Url;
- };
- #undef css
-}
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/inc/dispatch/uieventloghelper.hxx b/framework/source/inc/dispatch/uieventloghelper.hxx
deleted file mode 100644
index 90df4943d9f6..000000000000
--- a/framework/source/inc/dispatch/uieventloghelper.hxx
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 __FRAMEWORK_DISPATCH_UIEVENTLOGHELPER_HXX_
-#define __FRAMEWORK_DISPATCH_UIEVENTLOGHELPER_HXX_
-
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/frame/XModuleManager.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <com/sun/star/uno/XInterface.hpp>
-#include <com/sun/star/util/URL.hpp>
-#include <comphelper/uieventslogger.hxx>
-#include <rtl/ustring.hxx>
-#include <services.h>
-
-namespace framework
-{
- class UiEventLogHelper
- {
- public:
- UiEventLogHelper(const ::rtl::OUString& aWidgetname)
- : m_aWidgetName(aWidgetname)
- , m_hasAppName(false)
- { }
-
- void log(const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager,
- const ::com::sun::star::uno::Reference< com::sun::star::uno::XInterface >& rModel,
- const ::com::sun::star::util::URL& rUrl,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs)
- {
-
- if(!m_hasAppName && rServiceManager.is() && rModel.is())
- {
- try
- {
- static ::rtl::OUString our_aModuleManagerName = SERVICENAME_MODULEMANAGER;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > xModuleManager(
- rServiceManager->createInstance(our_aModuleManagerName)
- , ::com::sun::star::uno::UNO_QUERY_THROW);
- m_aAppName = xModuleManager->identify(rModel);
- m_hasAppName = true;
- } catch(::com::sun::star::uno::Exception&) {}
- }
- ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> aArgsWithOrigin(rArgs);
- ::comphelper::UiEventsLogger::appendDispatchOrigin(aArgsWithOrigin, m_aAppName, m_aWidgetName);
- ::comphelper::UiEventsLogger::logDispatch(rUrl, aArgsWithOrigin);
- }
-
- private:
- const ::rtl::OUString m_aWidgetName;
- bool m_hasAppName;
- ::rtl::OUString m_aAppName;
- };
-}
-
-#endif // __FRAMEWORK_DISPATCH_UIEVENTLOGHELPER_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/uielement/buttontoolbarcontroller.cxx b/framework/source/uielement/buttontoolbarcontroller.cxx
index d219a8fd3a41..4bedf0cf2884 100644
--- a/framework/source/uielement/buttontoolbarcontroller.cxx
+++ b/framework/source/uielement/buttontoolbarcontroller.cxx
@@ -62,7 +62,6 @@
#include <vcl/bitmap.hxx>
#include <svtools/filter.hxx>
#include <svtools/miscopt.hxx>
-#include <dispatch/uieventloghelper.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::awt;
@@ -279,8 +278,6 @@ throw (::com::sun::star::uno::RuntimeException)
aArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "KeyModifier" ));
aArgs[0].Value <<= KeyModifier;
- if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
- UiEventLogHelper(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ButtonToolbarController"))).log(m_xServiceManager, m_xFrame, aTargetURL, aArgs);
xDispatch->dispatch( aTargetURL, aArgs );
}
catch ( DisposedException& )
diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx
index 91b5951a392c..6d088b1a3b62 100644
--- a/framework/source/uielement/complextoolbarcontroller.cxx
+++ b/framework/source/uielement/complextoolbarcontroller.cxx
@@ -55,7 +55,6 @@
#include <vcl/svapp.hxx>
#include <vcl/mnemonic.hxx>
#include <tools/urlobj.hxx>
-#include <dispatch/uieventloghelper.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::awt;
@@ -154,12 +153,6 @@ throw ( RuntimeException )
pExecuteInfo->xDispatch = xDispatch;
pExecuteInfo->aTargetURL = aTargetURL;
pExecuteInfo->aArgs = aArgs;
- if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
- UiEventLogHelper(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ComplexToolbarController"))).log(
- m_xServiceManager,
- m_xFrame,
- aTargetURL,
- aArgs);
Application::PostUserEvent( STATIC_LINK(0, ComplexToolbarController , ExecuteHdl_Impl), pExecuteInfo );
}
}
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx
index 1e7ae5f55bd3..7fd52d33768e 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -60,7 +60,6 @@
#include <tools/rcid.h>
#include <vcl/image.hxx>
#include <svtools/menuoptions.hxx>
-#include <dispatch/uieventloghelper.hxx>
#include <osl/mutex.hxx>
// Copied from svx
@@ -338,8 +337,6 @@ void ControlMenuController::impl_select(const Reference< XDispatch >& /*_xDispat
{
Sequence<PropertyValue> aArgs;
Reference< XDispatch > xDispatch = pIter->second;
- if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
- UiEventLogHelper(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ControlMenuController"))).log(m_xServiceManager, m_xFrame, aURL, aArgs);
if ( xDispatch.is() )
xDispatch->dispatch( aURL, aArgs );
}
diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx
index 56871bce5e2b..a31b9f91c853 100644
--- a/framework/source/uielement/fontmenucontroller.cxx
+++ b/framework/source/uielement/fontmenucontroller.cxx
@@ -53,7 +53,6 @@
#include <tools/urlobj.hxx>
#include <rtl/ustrbuf.hxx>
#include <vcl/mnemonic.hxx>
-#include <dispatch/uieventloghelper.hxx>
#include <osl/mutex.hxx>
//_________________________________________________________________________________________________________________
@@ -174,12 +173,6 @@ void SAL_CALL FontMenuController::statusChanged( const FeatureStateEvent& Event
void FontMenuController::impl_select(const Reference< XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aTargetURL)
{
Sequence<PropertyValue> aArgs;
- if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
- UiEventLogHelper(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FontMenuController"))).log(
- m_xServiceManager,
- m_xFrame,
- aTargetURL,
- Sequence<PropertyValue>());
OSL_ENSURE(_xDispatch.is(),"FontMenuController::impl_select: No dispatch");
if ( _xDispatch.is() )
_xDispatch->dispatch( aTargetURL, aArgs );
diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx
index 137ec5fb4689..fadf338bec5c 100644
--- a/framework/source/uielement/fontsizemenucontroller.cxx
+++ b/framework/source/uielement/fontsizemenucontroller.cxx
@@ -54,7 +54,6 @@
#include <vcl/outdev.hxx>
#include <vcl/print.hxx>
#include <svtools/ctrltool.hxx>
-#include <dispatch/uieventloghelper.hxx>
#include <osl/mutex.hxx>
//_________________________________________________________________________________________________________________
@@ -312,8 +311,6 @@ void SAL_CALL FontSizeMenuController::statusChanged( const FeatureStateEvent& Ev
void FontSizeMenuController::impl_select(const Reference< XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aTargetURL)
{
Sequence<PropertyValue> aArgs;
- if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
- UiEventLogHelper(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FontSizeMenuController"))).log(m_xServiceManager, m_xFrame, aTargetURL, aArgs);
OSL_ENSURE(_xDispatch.is(),"FontSizeMenuController::impl_select: No dispatch");
if ( _xDispatch.is() )
_xDispatch->dispatch( aTargetURL, aArgs );
diff --git a/framework/source/uielement/footermenucontroller.cxx b/framework/source/uielement/footermenucontroller.cxx
index 05a5898628e8..6b6926bf667e 100644
--- a/framework/source/uielement/footermenucontroller.cxx
+++ b/framework/source/uielement/footermenucontroller.cxx
@@ -57,7 +57,6 @@
#include <vcl/i18nhelp.hxx>
#include <tools/urlobj.hxx>
#include <rtl/ustrbuf.hxx>
-#include <dispatch/uieventloghelper.hxx>
//_________________________________________________________________________________________________________________
// Defines
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx
index 5265315a0074..7e6c566e0c71 100644
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -56,8 +56,6 @@
#include <tools/urlobj.hxx>
#include <classes/resource.hrc>
#include <classes/fwkresid.hxx>
-#include <dispatch/uieventloghelper.hxx>
-
#include <framework/menuconfiguration.hxx>
#include <uielement/menubarmanager.hxx>
@@ -197,8 +195,6 @@ throw ( RuntimeException )
pExecuteInfo->xDispatch = xDispatch;
pExecuteInfo->aTargetURL = aTargetURL;
pExecuteInfo->aArgs = aArgs;
- if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
- UiEventLogHelper(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GenericToolbarController"))).log( m_xServiceManager, m_xFrame, aTargetURL, aArgs);
Application::PostUserEvent( STATIC_LINK(0, GenericToolbarController , ExecuteHdl_Impl), pExecuteInfo );
}
}
diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx
index 301a2355e997..dabce89c3f58 100644
--- a/framework/source/uielement/headermenucontroller.cxx
+++ b/framework/source/uielement/headermenucontroller.cxx
@@ -57,7 +57,6 @@
#include <vcl/i18nhelp.hxx>
#include <tools/urlobj.hxx>
#include <rtl/ustrbuf.hxx>
-#include <dispatch/uieventloghelper.hxx>
#include <osl/mutex.hxx>
//_________________________________________________________________________________________________________________
@@ -242,8 +241,6 @@ void SAL_CALL HeaderMenuController::statusChanged( const FeatureStateEvent& Even
void HeaderMenuController::impl_select(const Reference< XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aTargetURL)
{
Sequence<PropertyValue> aArgs;
- if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
- UiEventLogHelper(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(m_bFooter ? "FooterMenuController" : "HeaderMenuController"))).log(m_xServiceManager, m_xFrame, aTargetURL, aArgs);
OSL_ENSURE(_xDispatch.is(),"HeaderMenuController::impl_select: No dispatch");
if ( _xDispatch.is() )
_xDispatch->dispatch( aTargetURL, aArgs );
diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx
index b5f1566b42fd..2e243328334f 100644
--- a/framework/source/uielement/langselectionmenucontroller.cxx
+++ b/framework/source/uielement/langselectionmenucontroller.cxx
@@ -67,7 +67,6 @@
#include <classes/fwlresid.hxx>
#include <classes/resource.hrc>
-#include <dispatch/uieventloghelper.hxx>
#include "helper/mischelper.hxx"
#include <osl/mutex.hxx>
@@ -185,8 +184,6 @@ void LanguageSelectionMenuController::impl_select(const Reference< XDispatch >&
if ( xDispatch.is() )
{
Sequence<PropertyValue> aArgs;
- if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
- UiEventLogHelper( OUString(RTL_CONSTASCII_USTRINGPARAM("LanguageSelectionMenuController"))).log( m_xServiceManager, m_xFrame, aTargetURL, aArgs );
xDispatch->dispatch( aTargetURL, aArgs );
}
}
diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx
index 680ed90fbf1c..902b2bd90b8c 100644
--- a/framework/source/uielement/langselectionstatusbarcontroller.cxx
+++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx
@@ -64,7 +64,6 @@
#include <com/sun/star/awt/Command.hpp>
#include <svl/languageoptions.hxx>
#include <com/sun/star/linguistic2/XLanguageGuessing.hpp>
-#include <dispatch/uieventloghelper.hxx>
#include "helper/mischelper.hxx"
@@ -321,8 +320,6 @@ throw (::com::sun::star::uno::RuntimeException)
if( xDispatch.is() )
{
uno::Sequence< beans::PropertyValue > aPV;
- if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
- UiEventLogHelper( OUString(RTL_CONSTASCII_USTRINGPARAM("ButtonToolbarController"))).log(m_xServiceManager, m_xFrame, aURL, aPV);
xDispatch->dispatch( aURL, aPV);
}
}
diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx
index 374e7023c09d..30eaa8f5cd58 100644
--- a/framework/source/uielement/macrosmenucontroller.cxx
+++ b/framework/source/uielement/macrosmenucontroller.cxx
@@ -45,7 +45,6 @@
#include <vcl/i18nhelp.hxx>
#include <tools/urlobj.hxx>
#include <rtl/ustrbuf.hxx>
-#include <dispatch/uieventloghelper.hxx>
#include "helper/mischelper.hxx"
#include "helpid.hrc"
#include <osl/mutex.hxx>
@@ -147,8 +146,6 @@ void MacrosMenuController::impl_select(const Reference< XDispatch >& /*_xDispatc
ExecuteInfo* pExecuteInfo = new ExecuteInfo;
pExecuteInfo->xDispatch = xDispatch;
pExecuteInfo->aTargetURL = aTargetURL;
- if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
- UiEventLogHelper(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MacrosMenuController"))).log(m_xServiceManager, m_xFrame, aTargetURL, pExecuteInfo->aArgs);
Application::PostUserEvent( STATIC_LINK(0, MacrosMenuController , ExecuteHdl_Impl), pExecuteInfo );
}
}
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 5e80d0e20936..28c29dab5800 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -93,7 +93,6 @@
#include "svtools/miscopt.hxx"
#include <framework/addonmenu.hxx>
#include <uielement/menubarmerger.hxx>
-#include <dispatch/uieventloghelper.hxx>
// Be careful removing this "bad" construct. There are serious problems
// with #define STRICT and including windows.h. Changing this needs some
@@ -1119,8 +1118,6 @@ IMPL_LINK( MenuBarManager, Select, Menu *, pMenu )
if ( xDispatch.is() )
{
const sal_uInt32 nRef = Application::ReleaseSolarMutex();
- if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
- UiEventLogHelper(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MenuBarManager"))).log(getServiceFactory(), m_xFrame, aTargetURL, aArgs);
xDispatch->dispatch( aTargetURL, aArgs );
Application::AcquireSolarMutex( nRef );
}
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index 8a785029424b..3877f193e317 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -63,7 +63,6 @@
#include <svtools/menuoptions.hxx>
#include <svtools/acceleratorexecute.hxx>
#include <unotools/moduleoptions.hxx>
-#include <dispatch/uieventloghelper.hxx>
#include <osl/mutex.hxx>
//_________________________________________________________________________________________________________________
@@ -463,8 +462,6 @@ void SAL_CALL NewMenuController::select( const css::awt::MenuEvent& rEvent ) thr
pNewDocument->xDispatch = xDispatch;
pNewDocument->aTargetURL = aTargetURL;
pNewDocument->aArgSeq = aArgsList;
- if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
- UiEventLogHelper(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NewMenuController"))).log(m_xServiceManager, m_xFrame, aTargetURL, aArgsList);
Application::PostUserEvent( STATIC_LINK(0, NewMenuController, ExecuteHdl_Impl), pNewDocument );
}
}
diff --git a/framework/source/uielement/objectmenucontroller.cxx b/framework/source/uielement/objectmenucontroller.cxx
index 63a1620bc59b..df8707bedbdf 100644
--- a/framework/source/uielement/objectmenucontroller.cxx
+++ b/framework/source/uielement/objectmenucontroller.cxx
@@ -53,7 +53,6 @@
#include <vcl/i18nhelp.hxx>
#include <tools/urlobj.hxx>
#include <rtl/ustrbuf.hxx>
-#include <dispatch/uieventloghelper.hxx>
#include <osl/mutex.hxx>
//_________________________________________________________________________________________________________________
@@ -150,8 +149,6 @@ void SAL_CALL ObjectMenuController::statusChanged( const FeatureStateEvent& Even
void ObjectMenuController::impl_select(const Reference< XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aTargetURL)
{
Sequence<PropertyValue> aArgs;
- if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
- UiEventLogHelper(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ObjectMenuController"))).log(m_xServiceManager, m_xFrame, aTargetURL, aArgs);
OSL_ENSURE(_xDispatch.is(),"ObjectMenuController::impl_select: No dispatch");
if ( _xDispatch.is() )
_xDispatch->dispatch( aTargetURL, aArgs );
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index df1d86dccc72..0329c3f89316 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -62,7 +62,6 @@
#undef GradientStyle_RECT
#include <odma_lib.hxx>
#endif
-#include <dispatch/uieventloghelper.hxx>
#include <osl/mutex.hxx>
//_________________________________________________________________________________________________________________
@@ -338,8 +337,6 @@ void RecentFilesMenuController::executeEntry( sal_Int32 nIndex )
pLoadRecentFile->xDispatch = xDispatch;
pLoadRecentFile->aTargetURL = aTargetURL;
pLoadRecentFile->aArgSeq = aArgsList;
- if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
- UiEventLogHelper(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RecentFilesMenuController"))).log(m_xServiceManager, m_xFrame, aTargetURL, aArgsList);
Application::PostUserEvent( STATIC_LINK(0, RecentFilesMenuController, ExecuteHdl_Impl), pLoadRecentFile );
}
}
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index 4acea2195d5d..9c06cceda2d0 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -70,7 +70,6 @@
#include <vcl/window.hxx>
#include <svtools/menuoptions.hxx>
#include <unotools/cmdoptions.hxx>
-#include <dispatch/uieventloghelper.hxx>
#include <rtl/logfile.hxx>
#include <svtools/miscopt.hxx>
@@ -740,8 +739,6 @@ void SAL_CALL ToolbarsMenuController::select( const css::awt::MenuEvent& rEvent
pExecuteInfo->xDispatch = xDispatch;
pExecuteInfo->aTargetURL = aTargetURL;
pExecuteInfo->aArgs = aArgs;
- if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
- UiEventLogHelper(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ToolbarsMenuController"))).log(m_xServiceManager, m_xFrame, aTargetURL, aArgs);
Application::PostUserEvent( STATIC_LINK(0, ToolbarsMenuController, ExecuteHdl_Impl), pExecuteInfo );
}
}
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 0391056465a3..333a9caa7793 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -143,10 +143,6 @@ $(eval $(call gb_UnoApiTarget_add_idlfiles_nohdl,offapi,offapi/com/sun/star/mail
$(eval $(call gb_UnoApiTarget_add_idlfiles_nohdl,offapi,offapi/com/sun/star/media,\
Manager \
))
-$(eval $(call gb_UnoApiTarget_add_idlfiles_nohdl,offapi,offapi/com/sun/star/oooimprovement,\
- Core \
- CoreController \
-))
$(eval $(call gb_UnoApiTarget_add_idlfiles_nohdl,offapi,offapi/com/sun/star/presentation,\
SlideShow \
TransitionFactory \
@@ -2810,10 +2806,6 @@ $(eval $(call gb_UnoApiTarget_add_idlfiles,offapi,offapi/com/sun/star/office,\
XAnnotationAccess \
XAnnotationEnumeration \
))
-$(eval $(call gb_UnoApiTarget_add_idlfiles,offapi,offapi/com/sun/star/oooimprovement,\
- XCore \
- XCoreController \
-))
$(eval $(call gb_UnoApiTarget_add_idlfiles,offapi,offapi/com/sun/star/packages,\
EncryptionNotAllowedException \
NoEncryptionException \
diff --git a/offapi/com/sun/star/oooimprovement/Core.idl b/offapi/com/sun/star/oooimprovement/Core.idl
deleted file mode 100644
index 7ab8ec97541a..000000000000
--- a/offapi/com/sun/star/oooimprovement/Core.idl
+++ /dev/null
@@ -1,55 +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 __com_sun_star_oooimprovement_Core_idl__
-#define __com_sun_star_oooimprovement_Core_idl__
-
-//=============================================================================
-
-module com { module sun { module star { module oooimprovement {
-
-interface XCore;
-
-//=============================================================================
-
-/** specifies a service which allows interfacing the core components of the
- Core
-
- @since OOo 3.0
- */
-service Core : XCore
-{
- /// creates a CsvLogFormatter instance
- create();
-};
-
-//=============================================================================
-
-}; }; }; };
-
-//=============================================================================
-
-#endif
diff --git a/offapi/com/sun/star/oooimprovement/CoreController.idl b/offapi/com/sun/star/oooimprovement/CoreController.idl
deleted file mode 100644
index 234fcf4fadb9..000000000000
--- a/offapi/com/sun/star/oooimprovement/CoreController.idl
+++ /dev/null
@@ -1,56 +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 __com_sun_star_oooimprovement_CoreController_idl__
-#define __com_sun_star_oooimprovement_CoreController_idl__
-
-//=============================================================================
-
-module com { module sun { module star { module oooimprovement {
-
-interface XCoreController;
-
-//=============================================================================
-
-/** specifies a service controlling the core components of the OpenOffice.org
- improvement program. The OOo improvement program extension has to implement
- this service.
-
- @since OOo 3.0
- */
-service CoreController : XCoreController
-{
- /// creates a CoreController instance
- create();
-};
-
-//=============================================================================
-
-}; }; }; };
-
-//=============================================================================
-
-#endif
diff --git a/offapi/com/sun/star/oooimprovement/XCore.idl b/offapi/com/sun/star/oooimprovement/XCore.idl
deleted file mode 100644
index aa9d246609af..000000000000
--- a/offapi/com/sun/star/oooimprovement/XCore.idl
+++ /dev/null
@@ -1,59 +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 __com_sun_star_oooimprovement_XCore_idl__
-#define __com_sun_star_oooimprovement_XCore_idl__
-
-#include <com/sun/star/uno/XInterface.idl>
-
-//=============================================================================
-
-module com { module sun { module star { module oooimprovement {
-
-//=============================================================================
-
-/** specifies the interface used to query the Core status
-
- @since OOo 3.0
-*/
-interface XCore
-{
- /** Count of Events logged in the current session */
- [readonly, attribute] long SessionLogEventCount;
- /** returns the current status of the Core */
- [readonly, attribute] boolean UiEventsLoggerEnabled;
- /** shows a dialog inviting the user to take part */
- void inviteUser();
-};
-
-//=============================================================================
-
-}; }; }; };
-
-//=============================================================================
-
-#endif
diff --git a/offapi/com/sun/star/oooimprovement/XCoreController.idl b/offapi/com/sun/star/oooimprovement/XCoreController.idl
deleted file mode 100644
index 8de545c0eeba..000000000000
--- a/offapi/com/sun/star/oooimprovement/XCoreController.idl
+++ /dev/null
@@ -1,57 +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 __com_sun_star_oooimprovement_XCoreController_idl__
-#define __com_sun_star_oooimprovement_XCoreController_idl__
-
-#include <com/sun/star/uno/XInterface.idl>
-
-//=============================================================================
-
-module com { module sun { module star { module oooimprovement {
-
-//=============================================================================
-
-/** specifies the interface used to control the OOo Improvement core
- components
-
- @since OOo 3.0
-*/
-interface XCoreController
-{
- /** specifies if the core UiEventsLogger should enable itself */
- boolean enablingUiEventsLoggerAllowed([in] short Version);
- boolean showBuiltinOptionsPage([in] short Version);
-};
-
-//=============================================================================
-
-}; }; }; };
-
-//=============================================================================
-
-#endif
diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk
index f09c51e4a2fc..02d871be6f81 100644
--- a/postprocess/packcomponents/makefile.mk
+++ b/postprocess/packcomponents/makefile.mk
@@ -177,7 +177,6 @@ my_components += \
component/desktop/source/splash/spl \
dbp \
log \
- oooimprovecore \
pcr \
res \
scn \
diff --git a/postprocess/packregistry/makefile.mk b/postprocess/packregistry/makefile.mk
index d82c9ef1bb09..84cbfa114f59 100644
--- a/postprocess/packregistry/makefile.mk
+++ b/postprocess/packregistry/makefile.mk
@@ -47,7 +47,6 @@ MY_XCDS = \
$(MISC)/main.xcd \
$(MISC)/math.xcd \
$(MISC)/onlineupdate.xcd \
- $(MISC)/oooimprovement.xcd \
$(MISC)/palm.xcd \
$(MISC)/pocketexcel.xcd \
$(MISC)/pocketword.xcd \
@@ -359,11 +358,6 @@ MY_DEPS_onlineupdate = main
MY_FILES_onlineupdate = \
$(MY_MOD)/org/openoffice/Office/Addons/Addons-onlineupdate.xcu \
$(MY_MOD)/org/openoffice/Office/Jobs/Jobs-onlineupdate.xcu
-
-MY_DEPS_oooimprovement = main
-MY_FILES_oooimprovement = \
- $(MY_MOD)/org/openoffice/Office/Jobs/Jobs-oooimprovement.xcu \
- $(MY_MOD)/org/openoffice/Office/Logging/Logging-oooimprovement.xcu
.ENDIF
MY_DEPS_palm = main
diff --git a/postprocess/rebase/coffbase.txt b/postprocess/rebase/coffbase.txt
index 0d64df167e71..ea7f867a4004 100644
--- a/postprocess/rebase/coffbase.txt
+++ b/postprocess/rebase/coffbase.txt
@@ -195,7 +195,6 @@ oleautobridge2.uno.dll 0x0000000061590000 0x00050000
onlinecheck.dll 0x0000000061570000 0x00010000
ooofilt.dll 0x0000000061530000 0x00030000
ooofiltproxy.dll 0x0000000061500000 0x00020000
-oooimprovecoremi.dll 0x00000000614e0000 0x00010000
ooxmi.dll 0x0000000061190000 0x00340000
ooxml.dll 0x0000000060f20000 0x00260000
package2.dll 0x0000000060ec0000 0x00050000
@@ -369,7 +368,6 @@ nssutil3.dll 0x0000000059260000 0x00020000
odbcbasemi.dll 0x00000000591f0000 0x00060000
odbcmi.dll 0x00000000591d0000 0x00010000
ooofilt_x64.dll 0x0000000059130000 0x00090000
-oooimprovementmi.dll 0x0000000059100000 0x00020000
plc4.dll 0x00000000590e0000 0x00010000
plds4.dll 0x00000000590c0000 0x00010000
propertyhdl.dll 0x0000000059070000 0x00040000
diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index ef75e8ccbafe..7b20c242bd32 100644
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -1525,8 +1525,6 @@ File gid_File_Lib_Unopkgapp
Styles = (PACKED);
End
-STD_LIB_FILE( gid_File_Lib_Oooimprovecore , oooimprovecore)
-
#if defined WNT && !defined _gcc3 && !defined SYSTEM_MOZILLA && !defined WITHOUT_MOZILLA
// see common_brand.scp gid_Brand_File_Lib_Msvcp80 and
// gid_Brand_File_Lib_Msvcr80
diff --git a/setup_native/source/packinfo/packinfo_office.txt b/setup_native/source/packinfo/packinfo_office.txt
index ed901a4d3830..10b23b4f4551 100644
--- a/setup_native/source/packinfo/packinfo_office.txt
+++ b/setup_native/source/packinfo/packinfo_office.txt
@@ -190,36 +190,6 @@ packageversion = "%ABOUTBOXPRODUCTVERSION"
End
Start
-module = "gid_Module_Oooimprovement"
-solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-oooimprovement"
-solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core01,%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core04,%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core05,SUNWmfrun"
-packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-oooimprovement"
-freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core01"
-requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core01"
-copyright = "1999-2009 by OpenOffice.org"
-solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
-description = "Usage tracking module for %PRODUCTNAME %PRODUCTVERSION"
-destpath = "/opt"
-packageversion = "%ABOUTBOXPRODUCTVERSION"
-End
-
-Start
-module = "gid_Module_Optional_Testtool"
-solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-testtool"
-solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core01,%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core04,%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core05,SUNWmfrun"
-packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-testtool"
-freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core01"
-requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core01"
-copyright = "1999-2009 by OpenOffice.org"
-solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
-description = "Testtool module for %PRODUCTNAME %PRODUCTVERSION"
-destpath = "/opt"
-packageversion = "%ABOUTBOXPRODUCTVERSION"
-End
-
-Start
module = "gid_Module_Optional_Oo_English"
solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-spellcheck"
solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core01"
@@ -476,22 +446,6 @@ packageversion = "%ABOUTBOXPRODUCTVERSION"
End
Start
-module = "gid_Module_Root_Extension_Oooimprovement"
-script = "shellscripts_extensions.txt"
-solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-oooimprovement"
-solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core07, %PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION"
-packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-oooimprovement"
-requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure,%BASISPACKAGEPREFIX%PRODUCTVERSION-core01,%BASISPACKAGEPREFIX%PRODUCTVERSION-core02,%BASISPACKAGEPREFIX%PRODUCTVERSION-core03,%BASISPACKAGEPREFIX%PRODUCTVERSION-core04,%BASISPACKAGEPREFIX%PRODUCTVERSION-core05,%BASISPACKAGEPREFIX%PRODUCTVERSION-core06,%BASISPACKAGEPREFIX%PRODUCTVERSION-core07,%UNIXPACKAGENAME%BRANDPACKAGEVERSION"
-linuxpatchrequires = ""
-copyright = "1999-2010 by Oracle"
-solariscopyright = "solariscopyrightfile"
-vendor = "Oracle"
-description = "OOo improvement extension for %PRODUCTNAME %PRODUCTVERSION"
-destpath = "/opt"
-packageversion = "%PACKAGEVERSION"
-End
-
-Start
module = "gid_Module_Root_Extension_Dictionary_Af"
script = "shellscripts_extensions.txt"
solarispackagename = "%PACKAGEPREFIX%SOLARISBRANDPACKAGENAME%BRANDPACKAGEVERSION-dict-af"
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 1e18d7c410b9..e063e119be30 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -71,7 +71,6 @@
#include <sfx2/objsh.hxx>
#include <sfx2/msgpool.hxx>
-#include <comphelper/uieventslogger.hxx>
#include <com/sun/star/frame/XModuleManager.hpp>
#include <boost/scoped_ptr.hpp>
@@ -2223,25 +2222,6 @@ sal_Bool SfxBindings::ExecuteCommand_Impl( const String& rCommand )
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDisp = pImp->xProv->queryDispatch( aURL, ::rtl::OUString(), 0 );
if ( xDisp.is() )
{
- if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
- {
- ::rtl::OUString sAppName;
- try
- {
- static ::rtl::OUString our_aModuleManagerName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.ModuleManager"));
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager =
- ::comphelper::getProcessServiceFactory();
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > xModuleManager(
- xServiceManager->createInstance(our_aModuleManagerName)
- , ::com::sun::star::uno::UNO_QUERY_THROW);
- ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame > xFrame(
- pDispatcher->GetFrame()->GetFrame().GetFrameInterface(), UNO_QUERY_THROW);
- sAppName = xModuleManager->identify(xFrame);
- } catch(::com::sun::star::uno::Exception&) {}
- Sequence<beans::PropertyValue> source;
- ::comphelper::UiEventsLogger::appendDispatchOrigin(source, sAppName, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SfxAsyncExec")));
- ::comphelper::UiEventsLogger::logDispatch(aURL, source);
- }
new SfxAsyncExec_Impl( aURL, xDisp );
return sal_True;
}
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index ba246d82a4a6..a5469b30d47e 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -101,7 +101,6 @@
#include <sfx2/module.hxx>
#include "sfx2/imagemgr.hxx"
-#include <comphelper/uieventslogger.hxx>
#include <com/sun/star/frame/XModuleManager.hpp>
using namespace ::com::sun::star::beans;
@@ -470,28 +469,7 @@ void SfxToolBoxControl::Dispatch( const ::rtl::OUString& aCommand, ::com::sun::s
Reference < XDispatch > xDispatch = xProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 );
if ( xDispatch.is() )
- {
- if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
- {
- ::rtl::OUString sAppName;
- try
- {
- static ::rtl::OUString our_aModuleManagerName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.ModuleManager"));
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager =
- ::comphelper::getProcessServiceFactory();
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > xModuleManager(
- xServiceManager->createInstance(our_aModuleManagerName)
- , ::com::sun::star::uno::UNO_QUERY_THROW);
- ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame > xFrame(
- getFrameInterface(), UNO_QUERY_THROW);
- sAppName = xModuleManager->identify(xFrame);
- } catch(::com::sun::star::uno::Exception&) {}
- Sequence<PropertyValue> source;
- ::comphelper::UiEventsLogger::appendDispatchOrigin(source, sAppName, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SfxToolBoxControl")));
- ::comphelper::UiEventsLogger::logDispatch(aTargetURL, source);
- }
xDispatch->dispatch( aTargetURL, aArgs );
- }
}
}
@@ -1012,25 +990,6 @@ void SfxToolBoxControl::Select( sal_uInt16 nModifier )
void SfxToolBoxControl::Select( sal_Bool /*bMod1*/ )
{
- if(::comphelper::UiEventsLogger::isEnabled()) //#i88653# #i102805#
- {
- ::rtl::OUString sAppName;
- try
- {
- static ::rtl::OUString our_aModuleManagerName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.ModuleManager"));
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager =
- ::comphelper::getProcessServiceFactory();
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > xModuleManager(
- xServiceManager->createInstance(our_aModuleManagerName)
- , ::com::sun::star::uno::UNO_QUERY_THROW);
- sAppName = xModuleManager->identify(m_xFrame);
- } catch(::com::sun::star::uno::Exception&) {}
- Sequence<PropertyValue> vSource;
- ::comphelper::UiEventsLogger::appendDispatchOrigin(vSource, sAppName, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SfxToolBoxControl")));
- URL aURL;
- aURL.Complete = m_aCommandURL;
- ::comphelper::UiEventsLogger::logDispatch(aURL, vSource);
- }
svt::ToolboxController::execute( pImpl->nSelectModifier );
}
diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc
index 079be0af5127..0ece88fa594e 100755
--- a/svx/inc/svx/dialogs.hrc
+++ b/svx/inc/svx/dialogs.hrc
@@ -104,7 +104,6 @@
#define RID_SVXPAGE_ANGLE (RID_SVX_START + 48)
#define RID_SVXPAGE_SLANT (RID_SVX_START + 49)
#define RID_SVXPAGE_DISTRIBUTE (RID_SVX_START + 236)
-#define RID_SVXPAGE_IMPROVEMENT (RID_SVX_START + 302)
#define RID_SVXPAGE_MACROASSIGN (RID_SVX_START + 296)
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index c24f981b0e3c..ad28264a2a96 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -39,10 +39,6 @@
#include <svl/smplhint.hxx>
-
-
-
-
#include <svx/dialogs.hrc>
#include <svx/dialmgr.hxx>
#include <svx/ruler.hxx>
@@ -56,28 +52,6 @@
#define RULER_TAB_RTL ((sal_uInt16)0x0010)
#endif
-#include <comphelper/uieventslogger.hxx>
-
-namespace
-{
- void lcl_logRulerUse(const ::rtl::OUString& sURL) //#i99729#
- {
- using namespace ::com::sun::star;
- util::URL aTargetURL;
- aTargetURL.Complete = sURL;
- aTargetURL.Main = sURL;
- if(::comphelper::UiEventsLogger::isEnabled()) //#i88653#
- {
- ::rtl::OUString sAppName;
- uno::Sequence<beans::PropertyValue> source;
- ::comphelper::UiEventsLogger::appendDispatchOrigin(source, sAppName, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SfxRuler")));
- ::comphelper::UiEventsLogger::logDispatch(aTargetURL, source);
- }
- }
-}
-
-
-
// STATIC DATA -----------------------------------------------------------
#define CTRL_ITEM_COUNT 14
@@ -2717,7 +2691,6 @@ void SvxRuler::Click()
*/
{
- lcl_logRulerUse(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".special://SfxRuler/Click")));
Ruler::Click();
if( bActive )
{
@@ -3347,7 +3320,6 @@ long SvxRuler::StartDrag()
*/
{
- lcl_logRulerUse(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".special://SfxRuler/StartDrag")));
sal_Bool bContentProtected = pRuler_Imp->aProtectItem.IsCntntProtected();
if(!bValid)
return sal_False;
@@ -3464,7 +3436,6 @@ void SvxRuler::EndDrag()
data to the application.
*/
{
- lcl_logRulerUse(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".special://SfxRuler/EndDrag")));
const sal_Bool bUndo = IsDragCanceled();
const long lPos = GetDragPos();
DrawLine_Impl(lTabPos, 6, bHorz);