diff options
Diffstat (limited to 'svx/source/dialog/hyprlink.cxx')
-rw-r--r-- | svx/source/dialog/hyprlink.cxx | 48 |
1 files changed, 29 insertions, 19 deletions
diff --git a/svx/source/dialog/hyprlink.cxx b/svx/source/dialog/hyprlink.cxx index c1be60ebe3..211b2edb22 100644 --- a/svx/source/dialog/hyprlink.cxx +++ b/svx/source/dialog/hyprlink.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,16 +33,16 @@ #include <tools/urlobj.hxx> #include <vcl/msgbox.hxx> #include <unotools/configitem.hxx> -#include <svtools/cmdoptions.hxx> +#include <unotools/cmdoptions.hxx> #include <svtools/inetimg.hxx> -#include <svtools/urlbmk.hxx> -#include <svtools/eitem.hxx> -#include <svtools/stritem.hxx> +#include <svl/urlbmk.hxx> +#include <svl/eitem.hxx> +#include <svl/stritem.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/docfile.hxx> #include <sfx2/imgmgr.hxx> #include <sfx2/dispatch.hxx> -#include <svtools/urihelper.hxx> +#include <svl/urihelper.hxx> #include <sfx2/objsh.hxx> #include <comphelper/processfactory.hxx> @@ -66,13 +66,15 @@ public: ~SearchDefaultConfigItem_Impl(); const OUString& GetDefaultSearchEngine(){ return sDefaultEngine;} + virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); + virtual void Commit(); }; /*-- 11.11.2003 14:20:59--------------------------------------------------- -----------------------------------------------------------------------*/ SearchDefaultConfigItem_Impl::SearchDefaultConfigItem_Impl() : - ConfigItem(OUString::createFromAscii("Inet/DefaultSearchEngine")) + ConfigItem(OUString::createFromAscii("Inet/DefaultSearchEngine")) { uno::Sequence<OUString> aNames(1); aNames.getArray()[0] = OUString::createFromAscii("Name"); @@ -86,6 +88,14 @@ SearchDefaultConfigItem_Impl::~SearchDefaultConfigItem_Impl() { } +void SearchDefaultConfigItem_Impl::Notify( const com::sun::star::uno::Sequence< rtl::OUString >& ) +{ +} + +void SearchDefaultConfigItem_Impl::Commit() +{ +} + /************************************************************************* |* |* Dialog zum Einf"ugen/"Andern eines Hyperlink @@ -119,10 +129,10 @@ SvxHyperlinkDlg::SvxHyperlinkDlg( SfxBindings *_pBindings, Window* pParent) : FreeResource(); mpManager = SfxImageManager::GetImageManager( 0 ); - mpManager->RegisterToolBox( this ); - + mpManager->RegisterToolBox( this ); + SetImages(); - + // save initial size nMaxWidth = GetSizePixel().Width(); nMaxHeight = GetSizePixel().Height(); @@ -188,9 +198,9 @@ SvxHyperlinkDlg::SvxHyperlinkDlg( SfxBindings *_pBindings, Window* pParent) : // Hide button according to config item. SvtCommandOptions aCmdOpts; - if ( aCmdOpts.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( + if ( aCmdOpts.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( "InternetSearch" ) ) ) ) HideItem( BTN_INET_SEARCH ); } @@ -202,7 +212,7 @@ SvxHyperlinkDlg::SvxHyperlinkDlg( SfxBindings *_pBindings, Window* pParent) : SvxHyperlinkDlg::~SvxHyperlinkDlg() { SfxImageManager::GetImageManager( 0 )->ReleaseToolBox(this); - + if (pTargetMenu != NULL) delete pTargetMenu; } @@ -419,14 +429,14 @@ IMPL_LINK( SvxHyperlinkDlg, DropdownClick, ToolBox *, pBox ) String sTest(rData.sEngineName); sTest.ToLowerAscii(); bool bIsDefaultEngine = bHasDefault && STRING_NOTFOUND != sTest.Search( sDefault ); - //then put it at the top + //then put it at the top if(i && bIsDefaultEngine) { pMenu->InsertItem( i + 1, rData.sEngineName, 0, 0); pMenu->InsertSeparator(1); - } + } else - { + { if (i) pMenu->InsertSeparator(); pMenu->InsertItem( i + 1, rData.sEngineName); @@ -439,7 +449,7 @@ IMPL_LINK( SvxHyperlinkDlg, DropdownClick, ToolBox *, pBox ) delete pMenu; } break; - + case BTN_TARGET: { // Target Frame einstellen @@ -834,7 +844,7 @@ void SvxHyperlinkDlg::SetImages() SetItemImage( BTN_INSERT_BOOKMARK, mpManager->GetImage( BTN_INSERT_BOOKMARK, bHighContrast ) ); SetItemImage( BTN_INET_SEARCH, mpManager->GetImage( BTN_INET_SEARCH, bHighContrast ) ); SetItemImage( BTN_TARGET, mpManager->GetImage( BTN_TARGET, bHighContrast ) ); - SetItemImage( BTN_OPENDIALOG, mpManager->GetImage( BTN_OPENDIALOG, bHighContrast ) ); + SetItemImage( BTN_OPENDIALOG, mpManager->GetImage( BTN_OPENDIALOG, bHighContrast ) ); } /*-------------------------------------------------------------------- |