diff options
33 files changed, 11 insertions, 899 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index cc0824c82b62..12a46f0fd37d 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -185,8 +185,6 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet) { get(m_pToolTipsCB, "tooltips"); get(m_pExtHelpCB, "exthelp"); - get(m_pHelpAgentCB, "helpagent"); - get(m_pHelpAgentResetBtn, "resethelpagent"); if (!lcl_HasSystemFilePicker()) get<VclContainer>("filedlgframe")->Hide(); #if !defined(MACOSX) && ! ENABLE_GTK @@ -219,8 +217,6 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet) aLink = LINK( this, OfaMiscTabPage, HelpCheckHdl_Impl ); m_pToolTipsCB->SetClickHdl( aLink ); - m_pHelpAgentCB->SetClickHdl( aLink ); - m_pHelpAgentResetBtn->SetClickHdl( LINK( this, OfaMiscTabPage, HelpAgentResetHdl_Impl ) ); } // ----------------------------------------------------------------------- @@ -249,9 +245,6 @@ sal_Bool OfaMiscTabPage::FillItemSet( SfxItemSet& rSet ) bChecked = ( m_pExtHelpCB->IsChecked() && m_pToolTipsCB->IsChecked() ); if ( bChecked != m_pExtHelpCB->GetSavedValue() ) aHelpOptions.SetExtendedHelp( bChecked ); - bChecked = m_pHelpAgentCB->IsChecked(); - if ( bChecked != m_pHelpAgentCB->GetSavedValue() ) - aHelpOptions.SetHelpAgentAutoStartMode( bChecked ); if ( m_pFileDlgCB->IsChecked() != m_pFileDlgCB->GetSavedValue() ) { @@ -300,12 +293,9 @@ void OfaMiscTabPage::Reset( const SfxItemSet& rSet ) SvtHelpOptions aHelpOptions; m_pToolTipsCB->Check( aHelpOptions.IsHelpTips() ); m_pExtHelpCB->Check( aHelpOptions.IsHelpTips() && aHelpOptions.IsExtendedHelp() ); - m_pHelpAgentCB->Check( aHelpOptions.IsHelpAgentAutoStartMode() ); m_pToolTipsCB->SaveValue(); m_pExtHelpCB->SaveValue(); - m_pHelpAgentCB->SaveValue(); - HelpCheckHdl_Impl(m_pHelpAgentCB); SvtMiscOptions aMiscOpt; m_pFileDlgCB->Check( !aMiscOpt.UseSystemFileDialog() ); @@ -372,21 +362,11 @@ IMPL_LINK( OfaMiscTabPage, TwoFigureConfigHdl, NumericField*, pEd ) IMPL_LINK_NOARG(OfaMiscTabPage, HelpCheckHdl_Impl) { m_pExtHelpCB->Enable( m_pToolTipsCB->IsChecked() ); - m_pHelpAgentResetBtn->Enable( m_pHelpAgentCB->IsChecked() ); return 0; } // ----------------------------------------------------------------------- -IMPL_LINK_NOARG(OfaMiscTabPage, HelpAgentResetHdl_Impl) -{ - SvtHelpOptions().resetAgentIgnoreURLCounter(); - return 0; -} - -// ----------------------------------------------------------------------- - -// ------------------------------------------------------------------- class CanvasSettings { public: diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index c89972a71caa..49c7fdf304a0 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -37,8 +37,6 @@ class OfaMiscTabPage : public SfxTabPage private: CheckBox* m_pToolTipsCB; CheckBox* m_pExtHelpCB; - CheckBox* m_pHelpAgentCB; - PushButton* m_pHelpAgentResetBtn; FixedImage* m_pFileDlgROImage; CheckBox* m_pFileDlgCB; @@ -57,7 +55,6 @@ private: DECL_LINK( TwoFigureHdl, NumericField* ); DECL_LINK( TwoFigureConfigHdl, NumericField* ); DECL_LINK(HelpCheckHdl_Impl, void *); - DECL_LINK(HelpAgentResetHdl_Impl, void *); #ifdef WNT DECL_LINK( OnFileDlgToggled, void* ); #endif diff --git a/cui/uiconfig/ui/optgeneralpage.ui b/cui/uiconfig/ui/optgeneralpage.ui index 795896572fe5..2e59fd9a7c97 100644 --- a/cui/uiconfig/ui/optgeneralpage.ui +++ b/cui/uiconfig/ui/optgeneralpage.ui @@ -61,45 +61,12 @@ <property name="draw_indicator">True</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> - <property name="width">1</property> - <property name="height">1</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="helpagent"> - <property name="label" translatable="yes">_Help Agent</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="draw_indicator">True</property> - </object> - <packing> <property name="left_attach">0</property> <property name="top_attach">1</property> <property name="width">1</property> <property name="height">1</property> </packing> </child> - <child> - <object class="GtkButton" id="resethelpagent"> - <property name="label" translatable="yes">_Reset Help Agent</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="halign">start</property> - <property name="use_underline">True</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> - <property name="width">1</property> - <property name="height">1</property> - </packing> - </child> </object> </child> </object> @@ -249,6 +216,7 @@ <object class="GtkGrid" id="grid2"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="row_spacing">6</property> <child> <object class="GtkCheckButton" id="docstatus"> <property name="label" translatable="yes">_Printing sets "document modified" status</property> diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index e9228891d7a5..1f4bc8f9aeef 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -1412,69 +1412,6 @@ sal_uLong SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt, } while( false ); - if( nRet ) - { - const char* aHelpIds[] = - { - HID_AUTOCORR_HELP_WORD, - HID_AUTOCORR_HELP_SENT, - HID_AUTOCORR_HELP_SENTWORD, - HID_AUTOCORR_HELP_ACORWORD, - "", - HID_AUTOCORR_HELP_ACORSENTWORD, - "", - HID_AUTOCORR_HELP_CHGTOENEMDASH, - HID_AUTOCORR_HELP_WORDENEMDASH, - HID_AUTOCORR_HELP_SENTENEMDASH, - HID_AUTOCORR_HELP_SENTWORDENEMDASH, - HID_AUTOCORR_HELP_ACORWORDENEMDASH, - "", - HID_AUTOCORR_HELP_ACORSENTWORDENEMDASH, - "", - HID_AUTOCORR_HELP_CHGQUOTES, - HID_AUTOCORR_HELP_CHGSGLQUOTES, - HID_AUTOCORR_HELP_SETINETATTR, - HID_AUTOCORR_HELP_INGNOREDOUBLESPACE, - HID_AUTOCORR_HELP_CHGWEIGHTUNDERL, - HID_AUTOCORR_HELP_CHGFRACTIONSYMBOL, - HID_AUTOCORR_HELP_CHGORDINALNUMBER - }; - - sal_uLong nHelpId = 0; - if( nRet & ( Autocorrect|CptlSttSntnc|CptlSttWrd|ChgToEnEmDash ) ) - { - // from 0 - 15 - if( nRet & ChgToEnEmDash ) - nHelpId += 8; - if( nRet & Autocorrect ) - nHelpId += 4; - if( nRet & CptlSttSntnc ) - nHelpId += 2; - if( nRet & CptlSttWrd ) - nHelpId += 1; - } - else - { - if( nRet & ChgQuotes) nHelpId = 16; - else if( nRet & ChgSglQuotes) nHelpId = 17; - else if( nRet & SetINetAttr) nHelpId = 18; - else if( nRet & IgnoreDoubleSpace) nHelpId = 19; - else if( nRet & ChgWeightUnderl) nHelpId = 20; - else if( nRet & AddNonBrkSpace) nHelpId = 21; - else if( nRet & ChgOrdinalNumber) nHelpId = 22; - } - - if( nHelpId ) - { - Help* pHelp = Application::GetHelp(); - if (pHelp) - { - nHelpId -= 1; - Application::GetHelp()->OpenHelpAgent( aHelpIds[nHelpId] ); - } - } - } - return nRet; } diff --git a/include/sfx2/sfxhelp.hxx b/include/sfx2/sfxhelp.hxx index 9de00f008736..217f802ccaa7 100644 --- a/include/sfx2/sfxhelp.hxx +++ b/include/sfx2/sfxhelp.hxx @@ -40,7 +40,6 @@ private: SAL_DLLPRIVATE sal_Bool Start_Impl( const OUString& rURL, const Window* pWindow, const OUString& rKeyword ); SAL_DLLPRIVATE virtual sal_Bool SearchKeyword( const OUString& rKeyWord ); SAL_DLLPRIVATE virtual sal_Bool Start( const OUString& rURL, const Window* pWindow ); - SAL_DLLPRIVATE virtual void OpenHelpAgent( const OString& sHelpId ); SAL_DLLPRIVATE OUString GetHelpModuleName_Impl(); SAL_DLLPRIVATE OUString CreateHelpURL_Impl( const OUString& aCommandURL, const OUString& rModuleName ); @@ -54,8 +53,6 @@ public: virtual OUString GetHelpText( const OUString&, const Window* pWindow ); static OUString CreateHelpURL( const OUString& aCommandURL, const OUString& rModuleName ); - using Help::OpenHelpAgent; - static void OpenHelpAgent( SfxFrame* pFrame, const OString& sHelpId ); static OUString GetDefaultHelpModule(); static OUString GetCurrentModuleIdentifier(); }; diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc index c838c32b6f82..fcfe4ddc6a8a 100644 --- a/include/sfx2/sfxsids.hrc +++ b/include/sfx2/sfxsids.hrc @@ -529,8 +529,6 @@ #define SID_ATTR_DEFTABSTOP (SID_OPTIONS_START + 14) #define SID_ATTR_BUTTON_OUTSTYLE3D (SID_OPTIONS_START + 62) #define SID_ATTR_BUTTON_BIGSIZE (SID_OPTIONS_START + 63) -#define SID_ATTR_AUTOHELPAGENT (SID_OPTIONS_START + 67) -#define SID_HELPAGENT_TIMEOUT (SID_OPTIONS_START + 93) #define SID_ATTR_WELCOMESCREEN (SID_OPTIONS_START + 81) #define SID_WELCOMESCREEN_RESET (SID_OPTIONS_START + 82) #define SID_ATTR_QUICKLAUNCHER (SID_OPTIONS_START + 74) diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx index 17016489e917..b1d3ed0c0f4c 100644 --- a/include/sfx2/tabdlg.hxx +++ b/include/sfx2/tabdlg.hxx @@ -112,7 +112,6 @@ protected: // Is not deleted in Sfx! virtual const SfxItemSet* GetRefreshedSet(); virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); - virtual long Notify( NotifyEvent& rNEvt ); VclButtonBox* m_pActionArea; SfxItemSet* pExampleSet; diff --git a/include/svtools/helpopt.hxx b/include/svtools/helpopt.hxx index 6004ab4dd77a..938bd221b1da 100644 --- a/include/svtools/helpopt.hxx +++ b/include/svtools/helpopt.hxx @@ -42,18 +42,9 @@ public: void SetHelpTips( sal_Bool b ); sal_Bool IsHelpTips() const; - void SetHelpAgentAutoStartMode( sal_Bool b ); - sal_Bool IsHelpAgentAutoStartMode() const; - void SetHelpAgentTimeoutPeriod( sal_Int32 _nSeconds ); - sal_Int32 GetHelpAgentTimeoutPeriod( ) const; - const String& GetHelpStyleSheet()const; void SetHelpStyleSheet(const String& rStyleSheet); - /** resets the help agent's ignore counter for all URL's - */ - void resetAgentIgnoreURLCounter(); - void SetWelcomeScreen( sal_Bool b ); sal_Bool IsWelcomeScreen() const; diff --git a/include/svtools/svtools.hrc b/include/svtools/svtools.hrc index ea04f469df35..cceb888ef4f0 100644 --- a/include/svtools/svtools.hrc +++ b/include/svtools/svtools.hrc @@ -263,8 +263,6 @@ //............................................................................. // bitmaps -#define BMP_HELP_AGENT_IMAGE (RID_SVTOOLS_BITMAP_START + 1) -#define BMP_HELP_AGENT_CLOSER (RID_SVTOOLS_BITMAP_START + 2) #define BMP_PLUGIN (RID_SVTOOLS_BITMAP_START + 3) #define BMP_LIST_ADD (RID_SVTOOLS_BITMAP_START + 4) diff --git a/include/vcl/help.hxx b/include/vcl/help.hxx index b74d8023f75c..35d9cb32b672 100644 --- a/include/vcl/help.hxx +++ b/include/vcl/help.hxx @@ -65,7 +65,6 @@ public: virtual sal_Bool Start( const OUString& rHelpId, const Window* pWindow ); virtual sal_Bool SearchKeyword( const OUString& rKeyWord ); - virtual void OpenHelpAgent( const OString& rHelpId ); virtual OUString GetHelpText( const OUString& aHelpURL, const Window* pWindow ); static void EnableContextHelp(); diff --git a/officecfg/Configuration_officecfg.mk b/officecfg/Configuration_officecfg.mk index 70cc15b9de46..dc8a77c4d817 100644 --- a/officecfg/Configuration_officecfg.mk +++ b/officecfg/Configuration_officecfg.mk @@ -45,7 +45,6 @@ $(eval $(call gb_Configuration_add_datas,registry,officecfg/registry/data,\ org/openoffice/Office/ProtocolHandler.xcu \ org/openoffice/Office/Security.xcu \ org/openoffice/Office/Scripting.xcu \ - org/openoffice/Office/SFX.xcu \ org/openoffice/Office/Views.xcu \ org/openoffice/Office/Paths.xcu \ org/openoffice/Office/Histories.xcu \ @@ -139,7 +138,6 @@ $(eval $(call gb_Configuration_add_localized_datas,registry,officecfg/registry/d org/openoffice/Office/Accelerators.xcu \ org/openoffice/Office/Addons.xcu \ org/openoffice/Office/Common.xcu \ - org/openoffice/Office/SFX.xcu \ org/openoffice/Office/DataAccess.xcu \ org/openoffice/Office/PresenterScreen.xcu \ org/openoffice/Office/TableWizard.xcu \ diff --git a/officecfg/files.mk b/officecfg/files.mk index 20237c123e1d..3fbbfa0f0887 100644 --- a/officecfg/files.mk +++ b/officecfg/files.mk @@ -44,7 +44,6 @@ officecfg_XCSFILES := \ Office/ProtocolHandler \ Office/Recovery \ Office/ReportDesign \ - Office/SFX \ Office/Scripting \ Office/Security \ Office/Substitution \ diff --git a/officecfg/registry/data/org/openoffice/Office/SFX.xcu b/officecfg/registry/data/org/openoffice/Office/SFX.xcu deleted file mode 100644 index a3ff323dd6b5..000000000000 --- a/officecfg/registry/data/org/openoffice/Office/SFX.xcu +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - --> -<!DOCTYPE oor:component-data SYSTEM "../../../../component-update.dtd"> -<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:install="http://openoffice.org/2004/installation" oor:name="SFX" oor:package="org.openoffice.Office"> - <node oor:name="Help"> - <prop oor:name="HelpAgentStarterList"> - <value xml:lang="x-no-translate"/> - <value xml:lang="en-US">956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946</value> - </prop> - </node> -</oor:component-data> diff --git a/officecfg/registry/schema/org/openoffice/Office/SFX.xcs b/officecfg/registry/schema/org/openoffice/Office/SFX.xcs deleted file mode 100644 index d042c4f8560b..000000000000 --- a/officecfg/registry/schema/org/openoffice/Office/SFX.xcs +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - --> -<!DOCTYPE oor:component-schema SYSTEM "../../../../component-schema.dtd"> -<oor:component-schema xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" oor:name="SFX" oor:package="org.openoffice.Office" xml:lang="en-US"> - <info> - <desc>Contains the component-schema for the sfx module.</desc> - </info> - <component> - <group oor:name="Help"> - <info> - <desc>Contains settings which specifies how the help in Office should work.</desc> - </info> - <prop oor:name="HelpAgentStarterList" oor:type="xs:string" oor:localized="true" oor:nillable="false"> - <!-- OldLocation: hlpagent.ini --> - <info> - <desc>Lists IDs used by SFX to start the help agent.</desc> - </info> - <value/> - <!-- JB: Empty default inserted into empty property node. Remove if NIL was intended --> - </prop> - </group> - </component> -</oor:component-schema> diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk index fa2b1399848c..38758b26f9f5 100644 --- a/postprocess/CustomTarget_registry.mk +++ b/postprocess/CustomTarget_registry.mk @@ -166,7 +166,6 @@ postprocess_FILES_main := \ $(postprocess_XCS)/Office/Paths.xcs \ $(postprocess_XCS)/Office/ProtocolHandler.xcs \ $(postprocess_XCS)/Office/Recovery.xcs \ - $(postprocess_XCS)/Office/SFX.xcs \ $(postprocess_XCS)/Office/Scripting.xcs \ $(postprocess_XCS)/Office/Security.xcs \ $(postprocess_XCS)/Office/Substitution.xcs \ @@ -237,7 +236,6 @@ postprocess_FILES_main := \ $(postprocess_XCU)/Office/Math.xcu \ $(postprocess_XCU)/Office/Paths.xcu \ $(postprocess_XCU)/Office/ProtocolHandler.xcu \ - $(postprocess_XCU)/Office/SFX.xcu \ $(postprocess_XCU)/Office/Scripting.xcu \ $(postprocess_XCU)/Office/Security.xcu \ $(postprocess_XCU)/Office/TableWizard.xcu \ diff --git a/sc/source/ui/vba/vbaassistant.cxx b/sc/source/ui/vba/vbaassistant.cxx index bcc590bf522f..8796fa04a853 100644 --- a/sc/source/ui/vba/vbaassistant.cxx +++ b/sc/source/ui/vba/vbaassistant.cxx @@ -54,15 +54,11 @@ void SAL_CALL ScVbaAssistant::setVisible( sal_Bool bVisible ) throw (uno::Runtim sal_Bool SAL_CALL ScVbaAssistant::getOn() throw (uno::RuntimeException) { - if( SvtHelpOptions().IsHelpAgentAutoStartMode() ) - return sal_True; - else - return false; + return false; } void SAL_CALL ScVbaAssistant::setOn( sal_Bool bOn ) throw (uno::RuntimeException) { - SvtHelpOptions().SetHelpAgentAutoStartMode( bOn ); setVisible( bOn ); } diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi index 320a75e121d2..817ea1f5aefc 100644 --- a/sfx2/sdi/appslots.sdi +++ b/sfx2/sdi/appslots.sdi @@ -75,11 +75,6 @@ interface Application ExecMethod = MiscExec_Impl ; StateMethod = MiscState_Impl ; ] - SID_HELP_PI // ole(no) api(final/play/rec) - [ - ExecMethod = MiscExec_Impl ; - StateMethod = MiscState_Impl ; - ] SID_LOADCONFIG // ole(no) api(final/play) [ ExecMethod = MiscExec_Impl ; diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index b34e2a205269..63ab2fcea2dc 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -2854,33 +2854,6 @@ SfxVoidItem HelpDownload SID_HELP_DOWNLOAD ] //-------------------------------------------------------------------------- -SfxBoolItem HelperDialog SID_HELP_PI - -[ - /* flags: */ - AutoUpdate = TRUE, - Cachable = Cachable, - FastCall = FALSE, - HasCoreId = FALSE, - HasDialog = FALSE, - ReadOnlyDoc = TRUE, - Toggle = FALSE, - Container = TRUE, - RecordAbsolute = FALSE, - RecordPerSet; - Synchron; - - Readonly = FALSE, - - /* config: */ - AccelConfig = TRUE, - MenuConfig = TRUE, - StatusBarConfig = FALSE, - ToolBoxConfig = TRUE, - GroupId = GID_APPLICATION; -] - -//-------------------------------------------------------------------------- SfxVoidItem HelpIndex SID_HELPINDEX () [ diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index 03aaf69c2e0b..8b0022aec34c 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -270,16 +270,6 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet ) aHelpOptions.IsHelpTips() ) ) ) bRet = sal_True; break; - case SID_ATTR_AUTOHELPAGENT : - if(rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_ATTR_AUTOHELPAGENT ), - aHelpOptions.IsHelpAgentAutoStartMode() ) ) ) - bRet = sal_True; - break; - case SID_HELPAGENT_TIMEOUT : - if ( rSet.Put( SfxInt32Item( rPool.GetWhich( SID_HELPAGENT_TIMEOUT ), - aHelpOptions.GetHelpAgentTimeoutPeriod() ) ) ) - bRet = sal_True; - break; case SID_ATTR_WELCOMESCREEN : if(rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_ATTR_WELCOMESCREEN ), aHelpOptions.IsWelcomeScreen() ) ) ) @@ -638,20 +628,6 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) aHelpOptions.SetHelpTips(((const SfxBoolItem *)pItem)->GetValue()); } - // AutoHelpAgent - if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOHELPAGENT ), sal_True, &pItem)) - { - DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); - aHelpOptions.SetHelpAgentAutoStartMode( ((const SfxBoolItem *)pItem)->GetValue() ); - } - - // help agent timeout - if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_HELPAGENT_TIMEOUT ), sal_True, &pItem ) ) - { - DBG_ASSERT(pItem->ISA(SfxInt32Item), "Int32Item expected"); - aHelpOptions.SetHelpAgentTimeoutPeriod( ( (const SfxInt32Item*)pItem )->GetValue() ); - } - // WelcomeScreen if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_WELCOMESCREEN ), sal_True, &pItem)) { diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 825125d0d48f..8914037f0ec3 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -528,20 +528,6 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case SID_HELP_PI: - { - SvtHelpOptions aHelpOpt; - SFX_REQUEST_ARG(rReq, pOnItem, SfxBoolItem, SID_HELP_PI, sal_False); - sal_Bool bOn = pOnItem - ? ((SfxBoolItem*)pOnItem)->GetValue() - : !aHelpOpt.IsHelpAgentAutoStartMode(); - aHelpOpt.SetHelpAgentAutoStartMode( bOn ); - Invalidate(SID_HELP_PI); - bDone = true; - break; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case SID_ABOUT: { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); @@ -766,11 +752,6 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet) rSet.Put( SfxBoolItem( SID_HELPBALLOONS, Help::IsBalloonHelpEnabled() ) ); } break; - case SID_HELP_PI: - { - rSet.Put( SfxBoolItem( SID_HELP_PI, SvtHelpOptions().IsHelpAgentAutoStartMode() ) ); - } - break; case SID_EXTENDEDHELP: { diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 0d35063ecba8..cd0676159005 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -96,8 +96,6 @@ void NoHelpErrorBox::RequestHelp( const HelpEvent& ) // do nothing, because no help available } -#define STARTERLIST 0 - static bool impl_hasHelpInstalled( const OUString &rLang ); /// Return the locale we prefer for displaying help @@ -200,115 +198,12 @@ sal_Bool GetHelpAnchor_Impl( const OUString& _rURL, OUString& _rAnchor ) return bRet; } -class SfxHelpOptions_Impl : public utl::ConfigItem -{ -private: - std::set < OString > m_aIds; - -public: - SfxHelpOptions_Impl(); - ~SfxHelpOptions_Impl(); - - bool HasId( const OString& rId ) { return m_aIds.size() ? m_aIds.find( rId ) != m_aIds.end() : false; } - virtual void Notify( const com::sun::star::uno::Sequence< OUString >& aPropertyNames ); - virtual void Commit(); -}; - -static Sequence< OUString > GetPropertyNames() -{ - Sequence< OUString > aNames( 1 ); - OUString* pNames = aNames.getArray(); - pNames[0] = OUString( "HelpAgentStarterList" ); - - return aNames; -} - -SfxHelpOptions_Impl::SfxHelpOptions_Impl() - : ConfigItem( OUString("Office.SFX/Help") ) -{ - Sequence< OUString > aNames = GetPropertyNames(); - Sequence< Any > aValues = GetProperties( aNames ); - EnableNotification( aNames ); - const Any* pValues = aValues.getConstArray(); - DBG_ASSERT( aValues.getLength() == aNames.getLength(), "GetProperties failed" ); - if ( aValues.getLength() == aNames.getLength() ) - { - for ( int nProp = 0; nProp < aNames.getLength(); nProp++ ) - { - DBG_ASSERT( pValues[nProp].hasValue(), "property value missing" ); - if ( pValues[nProp].hasValue() ) - { - switch ( nProp ) - { - case STARTERLIST : - { - OUString aCodedList; - if ( pValues[nProp] >>= aCodedList ) - { - OString aTmp( - OUStringToOString( - aCodedList, RTL_TEXTENCODING_UTF8)); - sal_Int32 nIndex = 0; - do - { - OString aToken = aTmp.getToken( 0, ',', nIndex ); - if ( !aToken.isEmpty() ) - m_aIds.insert( aToken ); - } - while ( nIndex >= 0 ); - } - else { - SAL_WARN( "sfx2.appl", "Wrong property type!" ); - } - - break; - } - - default: - SAL_WARN( "sfx2.appl", "Wrong property!" ); - break; - } - } - } - } -} - -SfxHelpOptions_Impl::~SfxHelpOptions_Impl() -{ -} - - -void SfxHelpOptions_Impl::Notify( const com::sun::star::uno::Sequence< OUString >& ) -{ -} - -void SfxHelpOptions_Impl::Commit() -{ -} - class SfxHelp_Impl { -private: - SfxHelpOptions_Impl* m_pOpt; // the options - public: - SfxHelp_Impl(); - ~SfxHelp_Impl(); - - SfxHelpOptions_Impl* GetOptions(); - static OUString GetHelpText( const OUString& aCommandURL, const OUString& rModule ); + static OUString GetHelpText( const OUString& aCommandURL, const OUString& rModule ); }; -SfxHelp_Impl::SfxHelp_Impl() : - m_pOpt ( NULL ) -{ -} - -SfxHelp_Impl::~SfxHelp_Impl() -{ - delete m_pOpt; -} - OUString SfxHelp_Impl::GetHelpText( const OUString& aCommandURL, const OUString& rModule ) { // create help url @@ -322,14 +217,6 @@ OUString SfxHelp_Impl::GetHelpText( const OUString& aCommandURL, const OUString& return SfxContentHelper::GetActiveHelpString( aHelpURL.makeStringAndClear() ); } -SfxHelpOptions_Impl* SfxHelp_Impl::GetOptions() -{ - // create if not exists - if ( !m_pOpt ) - m_pOpt = new SfxHelpOptions_Impl; - return m_pOpt; -} - SfxHelp::SfxHelp() : bIsDebug( sal_False ), pImp ( NULL ) @@ -581,7 +468,7 @@ SfxHelpWindow_Impl* impl_createHelp(Reference< XFrame2 >& rHelpTask , OUString SfxHelp::GetHelpText( const OUString& aCommandURL, const Window* pWindow ) { OUString sModuleName = GetHelpModuleName_Impl(); - OUString sHelpText = pImp->GetHelpText( aCommandURL, sModuleName ); + OUString sHelpText = SfxHelp_Impl::GetHelpText( aCommandURL, sModuleName ); OString aNewHelpId; @@ -592,7 +479,7 @@ OUString SfxHelp::GetHelpText( const OUString& aCommandURL, const Window* pWindo while ( pParent ) { aNewHelpId = pParent->GetHelpId(); - sHelpText = pImp->GetHelpText( OStringToOUString(aNewHelpId, RTL_TEXTENCODING_UTF8), sModuleName ); + sHelpText = SfxHelp_Impl::GetHelpText( OStringToOUString(aNewHelpId, RTL_TEXTENCODING_UTF8), sModuleName ); if (!sHelpText.isEmpty()) pParent = NULL; else @@ -793,49 +680,6 @@ OUString SfxHelp::CreateHelpURL(const OUString& aCommandURL, const OUString& rMo return pHelp ? pHelp->CreateHelpURL_Impl( aCommandURL, rModuleName ) : OUString(); } -void SfxHelp::OpenHelpAgent( SfxFrame*, const OString& sHelpId ) -{ - SfxHelp* pHelp = (static_cast< SfxHelp* >(Application::GetHelp()) ); - if ( pHelp ) - pHelp->OpenHelpAgent( sHelpId ); -} - -void SfxHelp::OpenHelpAgent( const OString& sHelpId ) -{ - if ( SvtHelpOptions().IsHelpAgentAutoStartMode() ) - { - SfxHelpOptions_Impl *pOpt = pImp->GetOptions(); - if ( !pOpt->HasId( sHelpId ) ) - return; - - try - { - URL aURL; - aURL.Complete = CreateHelpURL_Impl( OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8), GetHelpModuleName_Impl() ); - Reference< XURLTransformer > xTrans( URLTransformer::create( ::comphelper::getProcessComponentContext() ) ); - xTrans->parseStrict(aURL); - - Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() ); - Reference < XFrame > xCurrentFrame = xDesktop->getCurrentFrame(); - - Reference< XDispatchProvider > xDispProv( xCurrentFrame, UNO_QUERY ); - Reference< XDispatch > xHelpDispatch; - if ( xDispProv.is() ) - xHelpDispatch = xDispProv->queryDispatch( - aURL, OUString("_helpagent"), - FrameSearchFlag::PARENT | FrameSearchFlag::SELF ); - - DBG_ASSERT( xHelpDispatch.is(), "OpenHelpAgent: could not get a dispatcher!" ); - if ( xHelpDispatch.is() ) - xHelpDispatch->dispatch( aURL, Sequence< PropertyValue >() ); - } - catch (const Exception&) - { - SAL_WARN( "sfx2.appl", "OpenHelpAgent: caught an exception while executing the dispatch!" ); - } - } -} - OUString SfxHelp::GetDefaultHelpModule() { return getDefaultModule_Impl(); diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index f77cae4813c5..9acf705ee3be 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -239,16 +239,6 @@ int SfxDispatcher::Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest sal_Bool *pOldInCallAliveFlag = pImp->pInCallAliveFlag; pImp->pInCallAliveFlag = &bThisDispatcherAlive; - SfxViewFrame* pView = GetFrame(); - if ( !pView ) - pView = SfxViewFrame::Current(); - if ( pView ) - { - OString aCmd(".uno:"); - aCmd += rSlot.GetUnoName(); - SfxHelp::OpenHelpAgent( &pView->GetFrame(), aCmd ); - } - SfxExecFunc pFunc = rSlot.GetExecFnc(); rShell.CallExec( pFunc, rReq ); diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 5fedbc3ff620..6b26bf3b0a8e 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -367,16 +367,6 @@ long SfxModelessDialog::Notify( NotifyEvent& rEvt ) { pBindings->SetActiveFrame( pImp->pMgr->GetFrame() ); pImp->pMgr->Activate_Impl(); - Window* pWindow = rEvt.GetWindow(); - OString sHelpId; - while ( sHelpId.isEmpty() && pWindow ) - { - sHelpId = pWindow->GetHelpId(); - pWindow = pWindow->GetParent(); - } - - if ( !sHelpId.isEmpty() ) - SfxHelp::OpenHelpAgent( &pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), sHelpId ); } else if ( rEvt.GetType() == EVENT_LOSEFOCUS && !HasChildPathFocus() ) { @@ -465,16 +455,6 @@ long SfxFloatingWindow::Notify( NotifyEvent& rEvt ) { pBindings->SetActiveFrame( pImp->pMgr->GetFrame() ); pImp->pMgr->Activate_Impl(); - Window* pWindow = rEvt.GetWindow(); - OString sHelpId; - while ( sHelpId.isEmpty() && pWindow ) - { - sHelpId = pWindow->GetHelpId(); - pWindow = pWindow->GetParent(); - } - - if ( !sHelpId.isEmpty() ) - SfxHelp::OpenHelpAgent( &pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), sHelpId ); } else if ( rEvt.GetType() == EVENT_LOSEFOCUS ) { diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 8486883fa2cf..1e3b0e2ed03f 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -1782,17 +1782,6 @@ long SfxDockingWindow::Notify( NotifyEvent& rEvt ) else if (pMgr != NULL) pMgr->Activate_Impl(); - Window* pWindow = rEvt.GetWindow(); - OString sHelpId; - while ( sHelpId.isEmpty() && pWindow ) - { - sHelpId = pWindow->GetHelpId(); - pWindow = pWindow->GetParent(); - } - - if ( !sHelpId.isEmpty() ) - SfxHelp::OpenHelpAgent( &pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), sHelpId ); - // In VCL Notify goes first to the window itself, also call the // base class, otherwise the parent learns nothing // if ( rEvt.GetWindow() == this ) PB: #i74693# not necessary any longer diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index cc463289060b..75fcdef6bdb3 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -1625,27 +1625,4 @@ void SfxTabDialog::SetInputSet( const SfxItemSet* pInSet ) } } -long SfxTabDialog::Notify( NotifyEvent& rNEvt ) -{ - if ( rNEvt.GetType() == EVENT_GETFOCUS ) - { - SfxViewFrame* pViewFrame = GetViewFrame() ? GetViewFrame() : SfxViewFrame::Current(); - if ( pViewFrame ) - { - Window* pWindow = rNEvt.GetWindow(); - OString sHelpId; - while ( sHelpId.isEmpty() && pWindow ) - { - sHelpId = pWindow->GetHelpId(); - pWindow = pWindow->GetParent(); - } - - if ( !sHelpId.isEmpty() ) - SfxHelp::OpenHelpAgent( &pViewFrame->GetFrame(), sHelpId ); - } - } - - return TabDialog::Notify( rNEvt ); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 907ee1a67228..cfd21cfdb76e 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -558,7 +558,6 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) // at the end of the method aModelGuard.Init_Impl( uno::Reference< util::XCloseable >( GetModel(), uno::UNO_QUERY ) ); - sal_Bool bDialogUsed = sal_False; sal_uInt32 nErrorCode = ERRCODE_NONE; // by default versions should be preserved always except in case of an explicit @@ -662,7 +661,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) if ( QueryHiddenInformation( bIsPDFExport ? WhenCreatingPDF : WhenSaving, NULL ) == RET_YES ) { - bDialogUsed = aHelper.GUIStoreModel( GetModel(), + aHelper.GUIStoreModel( GetModel(), OUString::createFromAscii( pSlot->GetUnoName() ), aDispatchArgs, bPreselectPassword, @@ -691,15 +690,6 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) const SfxFilter* pFilt = GetFactory().GetFilterContainer()->GetFilter4FilterName( aFilterName ); OSL_ENSURE( nId == SID_SAVEDOC || pFilt, "The filter can not be zero since it was used for storing!\n" ); - if ( bDialogUsed && pFilt - && pFilt->IsOwnFormat() - && pFilt->UsesStorage() - && pFilt->GetVersion() >= SOFFICE_FILEFORMAT_60 ) - { - SfxViewFrame* pDocViewFrame = SfxViewFrame::GetFirst( this ); - if ( pDocViewFrame ) - SfxHelp::OpenHelpAgent( &pDocViewFrame->GetFrame(), HID_DID_SAVE_PACKED_XML ); - } // the StoreAsURL/StoreToURL method have called this method with false // so it has to be restored to true here since it is a call from GUI diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index 133ac0280399..64e5b4314721 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -622,13 +622,6 @@ sal_uInt16 SfxObjectShell::PrepareClose // Ask if to save short nRet = RET_YES; { - //initiate help agent to inform about "print modifies the document" - SvtPrintWarningOptions aPrintOptions; - if (aPrintOptions.IsModifyDocumentOnPrintingAllowed() && - HasName() && getDocProperties()->getPrintDate().Month > 0) - { - SfxHelp::OpenHelpAgent( &pFirst->GetFrame(), HID_CLOSE_WARNING ); - } const Reference< XTitle > xTitle( *pImp->pBaseModel.get(), UNO_QUERY_THROW ); const OUString sTitle = xTitle->getTitle (); nRet = ExecuteQuerySaveDocument(&pFrame->GetWindow(),sTitle); diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx index 6ac414f3469c..bacba1ce0d3f 100644 --- a/sfx2/source/view/frame2.cxx +++ b/sfx2/source/view/frame2.cxx @@ -114,18 +114,6 @@ long SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt ) pView->MakeActive_Impl( sal_False ); } - // TODO/LATER: do we still need this code? - Window* pWindow = rNEvt.GetWindow(); - OString sHelpId; - while ( sHelpId.isEmpty() && pWindow ) - { - sHelpId = pWindow->GetHelpId(); - pWindow = pWindow->GetParent(); - } - - if ( !sHelpId.isEmpty() ) - SfxHelp::OpenHelpAgent( pFrame, sHelpId ); - // if focus was on an external window, the clipboard content might have been changed pView->GetBindings().Invalidate( SID_PASTE ); pView->GetBindings().Invalidate( SID_PASTE_SPECIAL ); diff --git a/svtools/AllLangResTarget_svt.mk b/svtools/AllLangResTarget_svt.mk index 24d4df10e6f7..9a5e41f1bcdb 100644 --- a/svtools/AllLangResTarget_svt.mk +++ b/svtools/AllLangResTarget_svt.mk @@ -49,7 +49,6 @@ $(eval $(call gb_SrsTarget_add_files,svt/res,\ $(if $(filter TRUE,$(SOLAR_JAVA)), \ svtools/source/java/javaerror.src) \ svtools/source/misc/ehdl.src \ - svtools/source/misc/helpagent.src \ svtools/source/misc/imagemgr.src \ svtools/source/misc/langtab.src \ svtools/source/misc/svtools.src \ diff --git a/svtools/source/config/helpopt.cxx b/svtools/source/config/helpopt.cxx index 6380e9534a28..a51ed04b7d15 100644 --- a/svtools/source/config/helpopt.cxx +++ b/svtools/source/config/helpopt.cxx @@ -41,20 +41,14 @@ static sal_Int32 nRefCount = 0; #define EXTENDEDHELP 0 #define HELPTIPS 1 -#define AGENT_ENABLED 2 -#define AGENT_TIMEOUT 3 -#define AGENT_RETRYLIMIT 4 -#define LOCALE 5 -#define SYSTEM 6 -#define STYLESHEET 7 +#define LOCALE 2 +#define SYSTEM 3 +#define STYLESHEET 4 class SvtHelpOptions_Impl : public utl::ConfigItem { - sal_Int32 nHelpAgentTimeoutPeriod; - sal_Int32 nHelpAgentRetryLimit; sal_Bool bExtendedHelp; sal_Bool bHelpTips; - sal_Bool bHelpAgentEnabled; sal_Bool bWelcomeScreen; String aLocale; String aSystem; @@ -78,15 +72,6 @@ public: void SetHelpTips( sal_Bool b ) { bHelpTips = b; SetModified(); } sal_Bool IsHelpTips() const { return bHelpTips; } - void SetHelpAgentEnabled( sal_Bool b ) { bHelpAgentEnabled = b; SetModified(); } - sal_Bool IsHelpAgentEnabled() const { return bHelpAgentEnabled; } - void SetHelpAgentTimeoutPeriod( sal_Int32 _nSeconds ) { nHelpAgentTimeoutPeriod = _nSeconds; SetModified(); } - sal_Int32 GetHelpAgentTimeoutPeriod( ) const { return nHelpAgentTimeoutPeriod; } - void SetHelpAgentRetryLimit( sal_Int32 _nTrials ) { nHelpAgentRetryLimit = _nTrials; SetModified(); } - sal_Int32 GetHelpAgentRetryLimit( ) const { return nHelpAgentRetryLimit; } - - void resetAgentIgnoreURLCounter(); - void SetWelcomeScreen( sal_Bool b ) { bWelcomeScreen = b; SetModified(); } sal_Bool IsWelcomeScreen() const { return bWelcomeScreen; } String GetLocale() const { return aLocale; } @@ -96,12 +81,6 @@ public: void SetHelpStyleSheet(const String& rStyleSheet){sHelpStyleSheet = rStyleSheet; SetModified();} static ::osl::Mutex & getInitMutex(); - -protected: - void implLoadURLCounters(); - void implSaveURLCounters(); - // to be called with aIgnoreCounterSafety locked - void implGetURLCounters( Sequence< OUString >& _rNodeNames, Sequence< Any >& _rURLs, Sequence< Any >& _rCounter ); }; Sequence< OUString > SvtHelpOptions_Impl::GetPropertyNames() @@ -110,13 +89,9 @@ Sequence< OUString > SvtHelpOptions_Impl::GetPropertyNames() { "ExtendedTip", "Tip", - "HelpAgent/Enabled", - "HelpAgent/Timeout", - "HelpAgent/RetryLimit", "Locale", "System", - "HelpStyleSheet", -// "HowTo/Show" + "HelpStyleSheet" }; const int nCount = sizeof( aPropNames ) / sizeof( const char* ); @@ -151,13 +126,11 @@ SvtHelpOptions_Impl::SvtHelpOptions_Impl() : ConfigItem( OUString( "Office.Common/Help" ) ) , bExtendedHelp( sal_False ) , bHelpTips( sal_True ) - , bHelpAgentEnabled( sal_False ) , bWelcomeScreen( sal_False ) { Sequence< OUString > aNames = GetPropertyNames(); Load( aNames ); EnableNotification( aNames ); - implLoadURLCounters(); } // ----------------------------------------------------------------------- @@ -200,9 +173,6 @@ void SvtHelpOptions_Impl::Load(const uno::Sequence< OUString>& rPropertyNames) case HELPTIPS : bHelpTips = bTmp; break; - case AGENT_ENABLED : - bHelpAgentEnabled = bTmp; - break; default: SAL_WARN( "svtools.config", "Wrong Member!" ); break; @@ -229,20 +199,7 @@ void SvtHelpOptions_Impl::Load(const uno::Sequence< OUString>& rPropertyNames) } else if ( pValues[nProp] >>= nTmpInt ) { - switch ( nProp ) - { - case AGENT_TIMEOUT: - nHelpAgentTimeoutPeriod = nTmpInt; - break; - - case AGENT_RETRYLIMIT: - nHelpAgentRetryLimit = nTmpInt; - break; - - default: - SAL_WARN( "svtools.config", "Wrong Member!" ); - break; - } + SAL_WARN( "svtools.config", "Wrong Member!" ); } else { @@ -259,220 +216,6 @@ void SvtHelpOptions_Impl::Load(const uno::Sequence< OUString>& rPropertyNames) // ----------------------------------------------------------------------- -void SvtHelpOptions_Impl::implGetURLCounters( Sequence< OUString >& _rNodeNames, Sequence< Any >& _rURLs, Sequence< Any >& _rCounters ) -{ - // the ignore counters for the help agent URLs - const OUString sIgnoreListNodePath( "HelpAgent/IgnoreList" ); - const OUString sPathSeparator( "/" ); - const OUString sURLLocalPath( "/Name" ); - const OUString sCounterLocalPath( "/Counter" ); - - // get the names of all the nodes containing ignore counters - // collect the node names we have to ask - // first get the node names of all children of HelpAgent/IgnoreList - _rNodeNames = GetNodeNames(sIgnoreListNodePath); - const OUString* pIgnoredURLsNodes = _rNodeNames.getConstArray(); - const OUString* pIgnoredURLsNodesEnd = pIgnoredURLsNodes + _rNodeNames.getLength(); - - // then assemble the two lists (of node paths) for the URLs and the counters - Sequence< OUString > aIgnoredURLs(_rNodeNames.getLength()); - Sequence< OUString > aIgnoredURLsCounter(_rNodeNames.getLength()); - OUString* pIgnoredURLs = aIgnoredURLs.getArray(); - OUString* pIgnoredURLsCounter = aIgnoredURLsCounter.getArray(); - for (;pIgnoredURLsNodes != pIgnoredURLsNodesEnd; ++pIgnoredURLsNodes, ++pIgnoredURLs, ++pIgnoredURLsCounter) - { - OUString sLocalURLAccess = sIgnoreListNodePath; - sLocalURLAccess += sPathSeparator; - sLocalURLAccess += *pIgnoredURLsNodes; - - // the path to the URL of this specific entry - *pIgnoredURLs = sLocalURLAccess; - *pIgnoredURLs += sURLLocalPath; - - // the path of the counter for that URL - *pIgnoredURLsCounter = sLocalURLAccess; - *pIgnoredURLsCounter += sCounterLocalPath; - } - - // now collect the values - _rURLs = GetProperties(aIgnoredURLs); - _rCounters = GetProperties(aIgnoredURLsCounter); - - sal_Int32 nURLs = _rURLs.getLength(); - sal_Int32 nCounters = _rCounters.getLength(); - DBG_ASSERT(nURLs == nCounters, "SvtHelpOptions_Impl::implGetURLCounters: inconsistence while retrieving the visited URLs!"); - - // normalize in case something went wrong - sal_Int32 nKnownURLs = nURLs < nCounters ? nURLs : nCounters; - if (nURLs < nCounters) - { - _rCounters.realloc(nKnownURLs); - _rNodeNames.realloc(nKnownURLs); - } - else if (nURLs > nCounters) - { - _rURLs.realloc(nKnownURLs); - _rNodeNames.realloc(nKnownURLs); - } -} - -// ----------------------------------------------------------------------- - -void SvtHelpOptions_Impl::implSaveURLCounters() -{ - ::osl::MutexGuard aGuard(aIgnoreCounterSafety); - - const OUString sIgnoreListNodePath( "HelpAgent/IgnoreList" ); - const OUString sPathSeparator( "/" ); - const OUString sURLLocalPath( "/Name" ); - const OUString sCounterLocalPath( "/Counter" ); - - // get the current URL/counter pairs (as they're persistent at the moment) - Sequence< OUString > aNodeNames; - Sequence< Any > aURLs; - Sequence< Any > aCounters; - - implGetURLCounters(aNodeNames, aURLs, aCounters); - sal_Int32 nKnownURLs = aURLs.getLength(); - - const OUString* pNodeNames = aNodeNames.getConstArray(); - const Any* pURLs = aURLs.getConstArray(); - const Any* pCounters = aCounters.getConstArray(); - - // check which of them must be deleted/modified - Sequence< OUString > aDeleteFromConfig(nKnownURLs); // names of nodes to be deleted - OUString* pDeleteFromConfig = aDeleteFromConfig.getArray(); - ::std::set< OUString > aAlreadyPresent; // URLs currently persistent - - // for modifying already existent nodes - Sequence< OUString > aNewCounterNodePaths(nKnownURLs); - Sequence< Any > aNewCounterValues(nKnownURLs); - OUString* pNewCounterNodePaths = aNewCounterNodePaths.getArray(); - Any* pNewCounterValues = aNewCounterValues.getArray(); - - // temporaries needed inside the loop - OUString sCurrentURL, sCurrentURLNodeName; - - for (sal_Int32 i=0; i<nKnownURLs; ++i, ++pNodeNames, ++pURLs, ++pCounters) - { - if (!((*pURLs) >>= sCurrentURL)) - continue; - - ConstMapString2IntIterator aThisURLNewCounter = aURLIgnoreCounters.find(sCurrentURL); - if (aURLIgnoreCounters.end() == aThisURLNewCounter) - { // we do not know anything about this URL anymore. - // -> have to removed it from the configuration later on - *pDeleteFromConfig = *pNodeNames; - ++pDeleteFromConfig; - } - else - { // we know this URL - sCurrentURLNodeName = sIgnoreListNodePath; - sCurrentURLNodeName += sPathSeparator; - sCurrentURLNodeName += *pNodeNames; - - // -> remember this (so we don't need to add a new node for this URL later on) - aAlreadyPresent.insert(sCurrentURL); - - sal_Int32 nThisURLPersistentCounter = 0; - (*pCounters) >>= nThisURLPersistentCounter; - - if (aThisURLNewCounter->second != nThisURLPersistentCounter) - { // the counter changed - // -> remember the path and the new counter for the adjustment below - *pNewCounterNodePaths = sCurrentURLNodeName; - *pNewCounterNodePaths += sCounterLocalPath; - ++pNewCounterNodePaths; - - (*pNewCounterValues) <<= aThisURLNewCounter->second; - ++pNewCounterValues; - } - } - } - - // delete the nodes which are flagged so ... - aDeleteFromConfig.realloc(pDeleteFromConfig - aDeleteFromConfig.getArray()); - if (0 != aDeleteFromConfig.getLength()) - { - ClearNodeElements(sIgnoreListNodePath, aDeleteFromConfig); - } - - // modify the nodes which need to be - aNewCounterNodePaths.realloc(pNewCounterNodePaths - aNewCounterNodePaths.getArray()); - aNewCounterValues.realloc(pNewCounterValues - aNewCounterValues.getArray()); - if (0 != aNewCounterNodePaths.getLength()) - { - PutProperties(aNewCounterNodePaths, aNewCounterValues); - } - - // and for the new ones ... - OUString sNewNodeName; - Sequence< OUString > aNewCounterDataNodeNames(2); - Sequence< Any > aNewCounterDataValues(2); - const OUString sNodeNameBase( "URL" ); - for ( ConstMapString2IntIterator aCollectNew = aURLIgnoreCounters.begin(); - aCollectNew != aURLIgnoreCounters.end(); - ++aCollectNew - ) - { - if (aAlreadyPresent.end() == aAlreadyPresent.find(aCollectNew->first)) - { // this URL is not persistent, yet - // -> add a new node - sNewNodeName = sNodeNameBase; - if (!getUniqueSetElementName(sIgnoreListNodePath, sNewNodeName)) - { - SAL_WARN( "svtools.config", "SvtHelpOptions_Impl::implSaveURLCounters: could not get a free name!" ); - continue; - } - AddNode(sIgnoreListNodePath, sNewNodeName); - - // and set the URL/counter pair - aNewCounterDataNodeNames[0] = sIgnoreListNodePath; - aNewCounterDataNodeNames[0] += sPathSeparator; - aNewCounterDataNodeNames[0] += sNewNodeName; - aNewCounterDataNodeNames[0] += sURLLocalPath; - aNewCounterDataValues[0] <<= aCollectNew->first; - - aNewCounterDataNodeNames[1] = sIgnoreListNodePath; - aNewCounterDataNodeNames[1] += sPathSeparator; - aNewCounterDataNodeNames[1] += sNewNodeName; - aNewCounterDataNodeNames[1] += sCounterLocalPath; - aNewCounterDataValues[1] <<= aCollectNew->second; - - PutProperties(aNewCounterDataNodeNames, aNewCounterDataValues); - } - } -} - -// ----------------------------------------------------------------------- - -void SvtHelpOptions_Impl::implLoadURLCounters() -{ - ::osl::MutexGuard aGuard(aIgnoreCounterSafety); - - Sequence< OUString > aNodeNames; - Sequence< Any > aURLs; - Sequence< Any > aCounters; - - implGetURLCounters(aNodeNames, aURLs, aCounters); - sal_Int32 nKnownURLs = aURLs.getLength(); - - const Any* pURLs = aURLs.getConstArray(); - const Any* pCounters = aCounters.getConstArray(); - - OUString sCurrentURL; - sal_Int32 nCurrentCounter; - for (sal_Int32 i=0; i<nKnownURLs; ++i, ++pURLs, ++pCounters) - { - (*pURLs) >>= sCurrentURL; - nCurrentCounter = 0; - (*pCounters) >>= nCurrentCounter; - aURLIgnoreCounters[sCurrentURL] = nCurrentCounter; - } -} - -// ----------------------------------------------------------------------- - void SvtHelpOptions_Impl::Commit() { Sequence< OUString > aNames = GetPropertyNames(); @@ -490,18 +233,6 @@ void SvtHelpOptions_Impl::Commit() pValues[nProp] <<= bHelpTips; break; - case AGENT_ENABLED : - pValues[nProp] <<= bHelpAgentEnabled; - break; - - case AGENT_TIMEOUT: - pValues[nProp] <<= nHelpAgentTimeoutPeriod; - break; - - case AGENT_RETRYLIMIT: - pValues[nProp] <<= nHelpAgentRetryLimit; - break; - case LOCALE: pValues[nProp] <<= OUString(aLocale); break; @@ -517,8 +248,6 @@ void SvtHelpOptions_Impl::Commit() } PutProperties( aNames, aValues ); - - implSaveURLCounters(); } // ----------------------------------------------------------------------- @@ -545,15 +274,6 @@ SvtHelpOptions::SvtHelpOptions() // ----------------------------------------------------------------------- -void SvtHelpOptions_Impl::resetAgentIgnoreURLCounter() -{ - ::osl::MutexGuard aGuard(aIgnoreCounterSafety); - aURLIgnoreCounters.clear(); - SetModified(); -} - -// ----------------------------------------------------------------------- - SvtHelpOptions::~SvtHelpOptions() { // Global access, must be guarded (multithreading) @@ -588,41 +308,6 @@ sal_Bool SvtHelpOptions::IsHelpTips() const // ----------------------------------------------------------------------- -void SvtHelpOptions::SetHelpAgentTimeoutPeriod( sal_Int32 _nSeconds ) -{ - pImp->SetHelpAgentTimeoutPeriod( _nSeconds ); -} - -// ----------------------------------------------------------------------- - -sal_Int32 SvtHelpOptions::GetHelpAgentTimeoutPeriod( ) const -{ - return pImp->GetHelpAgentTimeoutPeriod( ); -} - -// ----------------------------------------------------------------------- - -void SvtHelpOptions::SetHelpAgentAutoStartMode( sal_Bool b ) -{ - pImp->SetHelpAgentEnabled( b ); -} - -// ----------------------------------------------------------------------- - -sal_Bool SvtHelpOptions::IsHelpAgentAutoStartMode() const -{ - return pImp->IsHelpAgentEnabled(); -} - -// ----------------------------------------------------------------------- - -void SvtHelpOptions::resetAgentIgnoreURLCounter() -{ - pImp->resetAgentIgnoreURLCounter(); -} - -// ----------------------------------------------------------------------- - void SvtHelpOptions::SetWelcomeScreen( sal_Bool b ) { pImp->SetWelcomeScreen( b ); diff --git a/svtools/source/misc/helpagent.src b/svtools/source/misc/helpagent.src deleted file mode 100644 index 697f684a2478..000000000000 --- a/svtools/source/misc/helpagent.src +++ /dev/null @@ -1,32 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <svtools/svtools.hrc> - -Bitmap BMP_HELP_AGENT_IMAGE -{ - File = "helpagent.png"; -}; - -Bitmap BMP_HELP_AGENT_CLOSER -{ - File = "closer.png"; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 044a96b265be..f490aab3fc43 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -1081,7 +1081,6 @@ void SwView::Execute(SfxRequest &rReq) if(bQuery) { SfxViewFrame* pTmpFrame = GetViewFrame(); - SfxHelp::OpenHelpAgent( &pTmpFrame->GetFrame(), HID_MAIL_MERGE_SELECT ); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialogdiet fail!"); AbstractMailMergeCreateFromDlg* pDlg = pFact->CreateMailMergeCreateFromDlg( DLG_MERGE_CREATE, diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index 77261bdc20a0..856ef1e09c11 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -58,10 +58,6 @@ Help::~Help() // ----------------------------------------------------------------------- -void Help::OpenHelpAgent( const OString& ) -{ -} - // ----------------------------------------------------------------------- sal_Bool Help::Start( const OUString&, const Window* ) |