[Libreoffice-commits] .: configmgr/qa framework/source officecfg/registry scripting/workben sfx2/inc sfx2/sdi sfx2/source svx/inc svx/prj svx/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Fri Feb 11 10:29:05 PST 2011
configmgr/qa/unit/data.xcd | 8
framework/source/uielement/toolbarsmenucontroller.cxx | 2
officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu | 8
scripting/workben/bindings/calcmenubar.xml | 1
scripting/workben/bindings/drawmenubar.xml | 1
scripting/workben/bindings/impressmenubar.xml | 1
scripting/workben/bindings/writermenubar.xml | 1
sfx2/inc/sfx2/sfxsids.hrc | 1
sfx2/sdi/frmslots.sdi | 5
sfx2/sdi/sfx.sdi | 27
sfx2/source/appl/app.src | 5
svx/inc/globlmn_tmpl.hrc | 7
svx/inc/svx/svxids.hrc | 1
svx/prj/d.lst | 1
svx/source/dialog/hyprdlg.hxx | 141 -
svx/source/dialog/hyprlink.cxx | 947 ----------
svx/source/dialog/hyprlink.hrc | 58
svx/source/dialog/hyprlink.hxx | 45
svx/source/dialog/hyprlink.src | 167 -
svx/source/dialog/makefile.mk | 2
20 files changed, 1429 deletions(-)
New commits:
commit bf91130e1496712ff95806a15ff2d3e3ea8420d7
Author: Alfonso Eusebio <alfonso_eusebio at yahoo.co.uk>
Date: Thu Feb 10 08:23:22 2011 +0000
Remove obsolete Hyperlink Bar from libs-core
Removed all code related to hyperlink bar from libs-core repo.
diff --git a/configmgr/qa/unit/data.xcd b/configmgr/qa/unit/data.xcd
index 506a829..027aa59 100644
--- a/configmgr/qa/unit/data.xcd
+++ b/configmgr/qa/unit/data.xcd
@@ -3475,14 +3475,6 @@
<value xml:lang="x-no-translate"></value><value xml:lang="en-US">To Document Begin</value>
</prop>
</node>
- <node oor:name=".uno:InsertHyperlink" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="x-no-translate"></value><value xml:lang="en-US">~Hyperlink Bar</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
<node oor:name=".uno:GoToEndOfRow" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="x-no-translate"></value><value xml:lang="en-US">To Document End</value>
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index 3bca816..3aa25e7 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -94,7 +94,6 @@ using namespace ::com::sun::star::ui;
static const char CONFIGURE_TOOLBARS_CMD[] = "ConfigureDialog";
static const char CONFIGURE_TOOLBARS[] = ".uno:ConfigureDialog";
static const char CMD_COLORBAR[] = ".uno:ColorControl";
-static const char CMD_HYPERLINKBAR[] = ".uno:InsertHyperlink";
static const char CMD_FORMULABAR[] = ".uno:InsertFormula";
static const char CMD_INPUTLINEBAR[] = ".uno:InputLineVisible";
static const char CMD_RESTOREVISIBILITY[] = ".cmd:RestoreVisibility";
@@ -506,7 +505,6 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r
m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) ||
m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" ) ))
{
- addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_HYPERLINKBAR )), 10360, aEmptyString );
if ( m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) ||
m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ))
addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_COLORBAR )), 10417, aEmptyString );
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 42ca952..281500a 100755
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -3440,14 +3440,6 @@
<value xml:lang="en-US">To Document Begin</value>
</prop>
</node>
- <node oor:name=".uno:InsertHyperlink" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Hyperlink Bar</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
<node oor:name=".uno:GoToEndOfRow" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">To Document End</value>
diff --git a/scripting/workben/bindings/calcmenubar.xml b/scripting/workben/bindings/calcmenubar.xml
index 21f6404..26b884c 100644
--- a/scripting/workben/bindings/calcmenubar.xml
+++ b/scripting/workben/bindings/calcmenubar.xml
@@ -112,7 +112,6 @@
<menu:menuitem menu:id="slot:5910" menu:helpid="5910" menu:label="~Function Bar"/>
<menu:menuitem menu:id="slot:5905" menu:helpid="5905" menu:label="~Object Bar"/>
<menu:menuitem menu:id="slot:5909" menu:helpid="5909" menu:label="Main ~Toolbar"/>
- <menu:menuitem menu:id="slot:10360" menu:helpid="10360" menu:label="~Hyperlink Bar"/>
<menu:menuitem menu:id="slot:26241" menu:helpid="26241" menu:label="For~mula Bar"/>
<menu:menuseparator/>
<menu:menuitem menu:id="slot:5908" menu:helpid="5908" menu:label="Customi~ze..."/>
diff --git a/scripting/workben/bindings/drawmenubar.xml b/scripting/workben/bindings/drawmenubar.xml
index c1c644f..2fbfe54 100644
--- a/scripting/workben/bindings/drawmenubar.xml
+++ b/scripting/workben/bindings/drawmenubar.xml
@@ -87,7 +87,6 @@
<menu:menuitem menu:id="slot:5910" menu:helpid="5910" menu:label="~Function Bar"/>
<menu:menuitem menu:id="slot:5905" menu:helpid="5905" menu:label="~Object Bar"/>
<menu:menuitem menu:id="slot:5909" menu:helpid="5909" menu:label="Main ~Toolbar"/>
- <menu:menuitem menu:id="slot:10360" menu:helpid="10360" menu:label="~Hyperlink Bar"/>
<menu:menuitem menu:id="slot:5911" menu:helpid="5911" menu:label="Optio~n Bar"/>
<menu:menuitem menu:id="slot:10417" menu:helpid="10417" menu:label="~Color Bar"/>
<menu:menuseparator/>
diff --git a/scripting/workben/bindings/impressmenubar.xml b/scripting/workben/bindings/impressmenubar.xml
index ec51390..627fd16 100644
--- a/scripting/workben/bindings/impressmenubar.xml
+++ b/scripting/workben/bindings/impressmenubar.xml
@@ -86,7 +86,6 @@
<menu:menuitem menu:id="slot:5910" menu:helpid="5910" menu:label="~Function Bar"/>
<menu:menuitem menu:id="slot:5905" menu:helpid="5905" menu:label="~Object Bar"/>
<menu:menuitem menu:id="slot:5909" menu:helpid="5909" menu:label="Main ~Toolbar"/>
- <menu:menuitem menu:id="slot:10360" menu:helpid="10360" menu:label="~Hyperlink Bar"/>
<menu:menuitem menu:id="slot:5911" menu:helpid="5911" menu:label="Optio~n Bar"/>
<menu:menuitem menu:id="slot:5928" menu:helpid="5928" menu:label="~Presentation"/>
<menu:menuitem menu:id="slot:10417" menu:helpid="10417" menu:label="~Color Bar"/>
diff --git a/scripting/workben/bindings/writermenubar.xml b/scripting/workben/bindings/writermenubar.xml
index 0865204..d2d6d88 100644
--- a/scripting/workben/bindings/writermenubar.xml
+++ b/scripting/workben/bindings/writermenubar.xml
@@ -104,7 +104,6 @@
<menu:menuitem menu:id="slot:5910" menu:helpid="5910" menu:label="~Function Bar"/>
<menu:menuitem menu:id="slot:5905" menu:helpid="5905" menu:label="~Object Bar"/>
<menu:menuitem menu:id="slot:5909" menu:helpid="5909" menu:label="Main ~Toolbar"/>
- <menu:menuitem menu:id="slot:10360" menu:helpid="10360" menu:label="~Hyperlink Bar"/>
<menu:menuitem menu:id="slot:20128" menu:helpid="20128" menu:label="Fo~rmula Bar"/>
<menu:menuseparator/>
<menu:menuitem menu:id="slot:5908" menu:helpid="5908" menu:label="Customi~ze..."/>
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
index c823aaa..b69d251 100644
--- a/sfx2/inc/sfx2/sfxsids.hrc
+++ b/sfx2/inc/sfx2/sfxsids.hrc
@@ -873,7 +873,6 @@
#define SID_ZOOM (SID_SVX_START + 289)
#define SID_SEARCH_ITEM (SID_SVX_START + 291)
#define SID_ATTR_CHAR_FONTWIDTH (SID_SVX_START + 303)
-#define SID_HYPERLINK_INSERT (SID_SVX_START + 360)
#define SID_HYPERLINK_GETLINK (SID_SVX_START + 361)
#define SID_HYPERLINK_SETLINK (SID_SVX_START + 362)
#define SID_NAVIGATOR (SID_SVX_START + 366)
diff --git a/sfx2/sdi/frmslots.sdi b/sfx2/sdi/frmslots.sdi
index e58d95e..7f66212 100644
--- a/sfx2/sdi/frmslots.sdi
+++ b/sfx2/sdi/frmslots.sdi
@@ -30,11 +30,6 @@ interface Window
Automation = FALSE ;
]
{
- SID_HYPERLINK_INSERT
- [
- ExecMethod = ChildWindowExecute ;
- StateMethod = ChildWindowState ;
- ]
SID_HYPERLINK_DIALOG
[
ExecMethod = ChildWindowExecute ;
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index 7e9b5cc..bce76f2 100755
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -2953,33 +2953,6 @@ SfxBoolItem InsertDoc SID_INSERTDOC
]
//--------------------------------------------------------------------------
-SfxBoolItem InsertHyperlink SID_HYPERLINK_INSERT
-
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_VIEW;
-]
-
-//--------------------------------------------------------------------------
SfxVoidItem InsertObjectFloatingFrame SID_INSERT_FLOATINGFRAME
(
SfxStringItem Name FN_PARAM_1,
diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src
index ac05749..9e6b9d0 100644
--- a/sfx2/source/appl/app.src
+++ b/sfx2/source/appl/app.src
@@ -748,11 +748,6 @@ ToolBox RID_ENVTOOLBOX
};
ToolBoxItem
{
- Identifier = SID_HYPERLINK_INSERT ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
Identifier = SID_WIN_FULLSCREEN ;
Hide = TRUE;
};
diff --git a/svx/inc/globlmn_tmpl.hrc b/svx/inc/globlmn_tmpl.hrc
index d76a647..6d4309e 100644
--- a/svx/inc/globlmn_tmpl.hrc
+++ b/svx/inc/globlmn_tmpl.hrc
@@ -606,14 +606,7 @@
Command = ".uno:Beamer" ; \
HelpID = SID_BROWSER ; \
Text [ en-US ] = "~Beamer" ; \
-
-#define ITEM_INSERT_HYPERLINK_INSERT \
- Identifier = SID_HYPERLINK_INSERT ; \
- Command = ".uno:InsertHyperlink" ; \
- HelpID = SID_HYPERLINK_INSERT ; \
- Text [ en-US ] = "~Hyperlink Bar" ; \
-
#define ITEM_INSERT_INSERT_GRAPHIC \
Identifier = SID_INSERT_GRAPHIC ; \
Command = ".uno:InsertGraphic" ; \
diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc
index 82e8a2f..01323c3 100755
--- a/svx/inc/svx/svxids.hrc
+++ b/svx/inc/svx/svxids.hrc
@@ -701,7 +701,6 @@
#define SID_BMPMASK_PIPETTE ( SID_SVX_START + 351 )
#define SID_BMPMASK_BMPSELECT ( SID_SVX_START + 352 )
#define SID_BMPMASK_EXEC ( SID_SVX_START + 353 )
-//#define SID_HYPERLINK_INSERT ( SID_SVX_START + 360 ) -> sfxsids.hrc
//#define SID_HYPERLINK_GETLINK ( SID_SVX_START + 361 ) -> sfxsids.hrc
//#define SID_HYPERLINK_SETLINK ( SID_SVX_START + 362 ) -> sfxsids.hrc
#define SID_NO_GRAPHICS ( SID_SVX_START + 364 )
diff --git a/svx/prj/d.lst b/svx/prj/d.lst
index d79e421..3d6092f 100644
--- a/svx/prj/d.lst
+++ b/svx/prj/d.lst
@@ -32,7 +32,6 @@ mkdir: %_DEST%\inc%_EXT%\svx
..\%__SRC%\inc\svxslots.hxx %_DEST%\inc%_EXT%\svx\svxslots.hxx
..\%__SRC%\inc\globlmn.hrc %_DEST%\inc%_EXT%\svx\globlmn.hrc
..\source\inc\fmresids.hrc %_DEST%\inc%_EXT%\svx\fmresids.hrc
-..\source\dialog\hyprlink.hxx %_DEST%\inc%_EXT%\svx\hyprlink.hxx
../source/customshapes/EnhancedCustomShapeTypeNames.hxx %_DEST%\inc%_EXT%\svx\EnhancedCustomShapeTypeNames.hxx
../source/customshapes/EnhancedCustomShapeGeometry.hxx %_DEST%\inc%_EXT%\svx\EnhancedCustomShapeGeometry.hxx
diff --git a/svx/source/dialog/hyprdlg.hxx b/svx/source/dialog/hyprdlg.hxx
deleted file mode 100644
index d0db4fc..0000000
--- a/svx/source/dialog/hyprdlg.hxx
+++ /dev/null
@@ -1,141 +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_DLG_HYPERDLG_HXX
-#define _SVX_DLG_HYPERDLG_HXX
-
-#include <vcl/combobox.hxx>
-#include <vcl/toolbox.hxx>
-#include <vcl/menu.hxx>
-#include <svtools/stdctrl.hxx>
-#include <sfx2/ctrlitem.hxx>
-#include <svl/srchcfg.hxx>
-#include <sfx2/tbxctrl.hxx>
-
-class SvxHyperlinkDlg;
-class SfxViewFrame;
-
-class HyperCombo : public ComboBox
-{
- SvxHyperlinkDlg *pDlg;
- long nMaxWidth;
- long nMinWidth;
- long nRatio;
-
- virtual long Notify( NotifyEvent& rNEvt );
- virtual long PreNotify( NotifyEvent& rNEvt );
-
-public:
- HyperCombo( SvxHyperlinkDlg* pDialog, const ResId& rResId );
-
- inline void SetRatio( long nR ) { nRatio = nR; }
- inline long GetRatio() { return nRatio; }
- long CalcResizeWidth( long nW );
- inline long GetResizeWidth() { return (nMaxWidth - nMinWidth); }
- void DoResize( long nW );
-};
-
-class HyperFixedText : public FixedInfo
-{
- SvxHyperlinkDlg *pDlg;
-
-public:
- HyperFixedText( SvxHyperlinkDlg* pDialog, const ResId& rResId );
-
-};
-
-/*--------------------------------------------------------------------
- Beschreibung: Dialog zum Einfgen/ndern eines Hyperlink
- --------------------------------------------------------------------*/
-
-class SvxHyperlinkDlg : public ToolBox, public SfxControllerItem
-{
- friend class HyperCombo;
- friend class HyperFixedText;
- using ToolBox::StateChanged;
-
-private:
- SfxStatusForwarder aForwarder;
- SfxStatusForwarder aHyperlinkDlgForward;
- HyperCombo aNameCB;
- HyperFixedText aUrlFT;
- HyperCombo aUrlCB;
-
- SvxSearchConfig aSearchConfig;
-
- String sAddress;
- String sExplorer;
- String sOldName;
- String sSearchTitle;
- PopupMenu aLinkPopup;
- PopupMenu *pTargetMenu;
- BOOL bNoDoc;
- BOOL bSend;
- BOOL bHasOldName;
- long nMaxWidth;
- long nMinWidth;
- long nMaxHeight;
- BOOL bHtmlMode;
-
- SfxImageManager* mpManager;
-
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
-
- // DockingWindow
- virtual void Resize();
- virtual void Resizing(Size& rSize);
-
- // Drag&Drop
- BOOL GetDragData(USHORT nItem, ULONG nDDFormatId, String& rBuffer);
-
- DECL_LINK(TBClickHdl, ToolBox *);
- DECL_LINK(TBSelectHdl, ToolBox *);
- DECL_LINK(DropdownClick, ToolBox * );
- DECL_LINK(LinkPopupSelectHdl, Menu *);
- DECL_LINK(SearchPopupSelectHdl, Menu *);
- DECL_LINK(ComboSelectHdl, ComboBox *);
- DECL_LINK(ComboModifyHdl, ComboBox *);
- DECL_LINK(BookmarkFoundHdl, String *);
-
- void OpenDoc( const String& rURL, SfxViewFrame* pViewFrame );
- void EnableLink();
- void SendToApp(USHORT nType);
- void AddToHistory(const String& rName, const String& rURL);
- void TargetMenu(const String& rSelEntry, BOOL bExecute);
- String GetSelTarget();
-
- void SetImages();
-public:
- SvxHyperlinkDlg(SfxBindings *pBindings, Window* pWindow);
- ~SvxHyperlinkDlg();
-};
-
-
-#endif // _SVX_DLG_HYPERDLG_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/hyprlink.cxx b/svx/source/dialog/hyprlink.cxx
deleted file mode 100644
index bd66b25..0000000
--- a/svx/source/dialog/hyprlink.cxx
+++ /dev/null
@@ -1,947 +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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svx.hxx"
-#include <tools/urlobj.hxx>
-#include <vcl/msgbox.hxx>
-#include <unotools/configitem.hxx>
-#include <unotools/cmdoptions.hxx>
-#include <svtools/inetimg.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 <svl/urihelper.hxx>
-#include <sfx2/objsh.hxx>
-#include <comphelper/processfactory.hxx>
-
-#include "hlnkitem.hxx"
-#include <svx/dialogs.hrc>
-#include "hyprlink.hrc"
-#include <svx/dialmgr.hxx>
-#include "hyprlink.hxx"
-#include "hyprdlg.hxx"
-
-using namespace ::rtl;
-using namespace ::com::sun::star;
-
-// -----------------------------------------------------------------------
-
-class SearchDefaultConfigItem_Impl : public ::utl::ConfigItem
-{
- OUString sDefaultEngine;
-public:
- SearchDefaultConfigItem_Impl();
- ~SearchDefaultConfigItem_Impl();
-
- const OUString& GetDefaultSearchEngine(){ return sDefaultEngine;}
- virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
- virtual void Commit();
-};
-
-SearchDefaultConfigItem_Impl::SearchDefaultConfigItem_Impl() :
- ConfigItem(OUString(RTL_CONSTASCII_USTRINGPARAM("Inet/DefaultSearchEngine")))
-{
- uno::Sequence<OUString> aNames(1);
- aNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("Name"));
- uno::Sequence< uno::Any > aValues = GetProperties(aNames);
- aValues.getConstArray()[0] >>= sDefaultEngine;
-}
-
-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
-|*
-\************************************************************************/
-
-SvxHyperlinkDlg::SvxHyperlinkDlg( SfxBindings *_pBindings, Window* pParent) :
-
- ToolBox ( pParent, SVX_RES( RID_SVXDLG_HYPERLINK ) ),
- SfxControllerItem ( SID_HYPERLINK_SETLINK, *_pBindings ),
-
- aForwarder ( SID_HYPERLINK_GETLINK, *this ),
- aHyperlinkDlgForward( SID_HYPERLINK_DIALOG , *this),
-
- aNameCB ( this, SVX_RES( CB_NAME ) ),
- aUrlFT ( this, SVX_RES( FT_URL ) ),
- aUrlCB ( this, SVX_RES( CB_URL ) ),
- aSearchConfig (sal_True),
- sAddress ( SVX_RES( STR_ADDRESS ) ),
- sExplorer ( SVX_RES( STR_EXPLORER ) ),
- sSearchTitle ( SVX_RES( STR_BOOKMARK_SEARCH ) ),
- aLinkPopup ( SVX_RES( RID_SVXMN_HYPERLINK ) ),
- pTargetMenu ( NULL ),
-
- bNoDoc ( TRUE ),
- bSend ( FALSE ),
- bHasOldName ( FALSE ),
- bHtmlMode ( FALSE )
-
-{
- FreeResource();
-
- mpManager = SfxImageManager::GetImageManager( 0 );
- mpManager->RegisterToolBox( this );
-
- SetImages();
-
- // save initial size
- nMaxWidth = GetSizePixel().Width();
- nMaxHeight = GetSizePixel().Height();
-
-
- InsertSeparator( 0 );
- InsertWindow( CB_URL, &aUrlCB, 0, 0 );
- // we need an item text for accessibility
- String sItemText = aUrlCB.GetText();
- if ( sItemText.Len() == 0 )
- sItemText = aUrlCB.GetQuickHelpText();
- if ( sItemText.Len() > 0 )
- {
- SetItemText( CB_URL, sItemText );
- sItemText.Erase();
- }
- InsertWindow( FT_URL, &aUrlFT, 0, 0 );
- InsertSeparator( 0 );
- InsertWindow( CB_NAME, &aNameCB, 0, 0 );
- sItemText = aNameCB.GetText();
- if ( sItemText.Len() == 0 )
- sItemText = aNameCB.GetQuickHelpText();
- if ( sItemText.Len() > 0 )
- SetItemText( CB_NAME, sItemText );
-
- SetSizePixel(CalcWindowSizePixel()); // Groesse initialisieren
-
- nMaxHeight = GetSizePixel().Height(); // Hoehe nochmal merken, da sie veraendert wurde
- // SetSizePixel ruft Resize-Handler!
-
- Show();
- Resize();
-
- long nUrlWidth = aUrlCB.GetResizeWidth();
- long nNameWidth = aNameCB.GetResizeWidth();
- long nSum = nUrlWidth + nNameWidth;
-
- aUrlCB.SetRatio((nUrlWidth * 100L) / nSum);
- aNameCB.SetRatio((nNameWidth * 100L) / nSum);
-
- SetClickHdl( LINK( this, SvxHyperlinkDlg, TBClickHdl ) );
- SetSelectHdl( LINK( this, SvxHyperlinkDlg, TBSelectHdl ) );
- SetDropdownClickHdl( LINK( this, SvxHyperlinkDlg, DropdownClick ) );
-
- SetItemBits( BTN_TARGET, GetItemBits( BTN_TARGET ) | TIB_DROPDOWNONLY );
- SetItemBits( BTN_INET_SEARCH, GetItemBits( BTN_INET_SEARCH ) | TIB_DROPDOWN );
- SetItemBits( BTN_INET_SEARCH, GetItemBits( BTN_TARGET ) | TIB_DROPDOWNONLY );
-
- aLinkPopup.SetSelectHdl(LINK(this, SvxHyperlinkDlg, LinkPopupSelectHdl));
-
- Link aLk = LINK(this, SvxHyperlinkDlg, ComboSelectHdl);
- aNameCB.SetSelectHdl(aLk);
- aUrlCB.SetSelectHdl(aLk);
-
- aLk = LINK(this, SvxHyperlinkDlg, ComboModifyHdl);
- aNameCB.SetModifyHdl(aLk);
- aUrlCB.SetModifyHdl(aLk);
-
- // Accessibility: Set the quick help text as accessible name for the
- // drop down lists.
- aNameCB.SetAccessibleName (aNameCB.GetQuickHelpText());
- aUrlCB.SetAccessibleName (aUrlCB.GetQuickHelpText());
-
- // Hide button according to config item.
- SvtCommandOptions aCmdOpts;
- if ( aCmdOpts.Lookup( SvtCommandOptions::CMDOPTION_DISABLED,
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "InternetSearch" ) ) ) )
- HideItem( BTN_INET_SEARCH );
-}
-
-SvxHyperlinkDlg::~SvxHyperlinkDlg()
-{
- SfxImageManager::GetImageManager( 0 )->ReleaseToolBox(this);
-
- if (pTargetMenu != NULL)
- delete pTargetMenu;
-}
-
-/*--------------------------------------------------------------------
- Beschreibung: Leiste so resizen, dass die Comboboxen automatisch mit
- verkleinert werden
- --------------------------------------------------------------------*/
-
-void SvxHyperlinkDlg::Resize()
-{
- long nWidth = GetSizePixel().Width();
-
- ToolBox::Resize();
-
- if (nWidth) // nWidth ist manchmal 0
- {
- long nDeltaW = nMaxWidth - nWidth + aUrlCB.LogicToPixel(Size(3, 1)).Width() + 1;
-
- long nNewUrlWidth = aUrlCB.CalcResizeWidth(nDeltaW);
- long nNewNameWidth = aNameCB.CalcResizeWidth(nDeltaW);
-
- if (nNewUrlWidth && nNewNameWidth) // Flackern reduzieren
- {
- SetUpdateMode(FALSE);
-
- // Comboboxen resizen
- aUrlCB.DoResize(nNewUrlWidth);
- aNameCB.DoResize(nNewNameWidth);
- RecalcItems(); // Alle Elemente neu anordnen
-
- SetUpdateMode(TRUE);
- }
- }
-}
-
-void SvxHyperlinkDlg::Resizing(Size& rSize)
-{
- if (rSize.Height() > nMaxHeight)
- rSize.Height() = nMaxHeight;
-
- if (rSize.Width() > nMaxWidth)
- rSize.Width() = nMaxWidth;
-
- ToolBox::Resizing(rSize);
-}
-
-/*--------------------------------------------------------------------
- Beschreibung: Im Dokument selektierten Hyperlink in Leiste anzeigen
- --------------------------------------------------------------------*/
-
-void SvxHyperlinkDlg::StateChanged( USHORT nSID, SfxItemState eState,
- const SfxPoolItem* pState )
-{
- if ( nSID == SID_HYPERLINK_DIALOG )
- {
- if( eState != SFX_ITEM_DISABLED)
- {
- EnableItem( BTN_OPENDIALOG, TRUE );
-
- BOOL bItem = FALSE;
- if ( pState && eState == SFX_ITEM_AVAILABLE )
- bItem = ((SfxBoolItem*)pState)->GetValue();
- SetItemState ( BTN_OPENDIALOG, bItem ? STATE_CHECK : STATE_NOCHECK );
- }
- else
- {
- SetItemState ( BTN_OPENDIALOG, STATE_NOCHECK );
- EnableItem( BTN_OPENDIALOG, FALSE );
- }
- }
-
- if (nSID == SID_HYPERLINK_SETLINK)
- {
- if (eState == SFX_ITEM_DISABLED)
- bNoDoc = TRUE;
- else
- bNoDoc = FALSE;
- EnableItem(BTN_TARGET, !bNoDoc);
- EnableLink();
- }
-
- if (nSID == SID_HYPERLINK_GETLINK)
- {
- if (eState == SFX_ITEM_AVAILABLE)
- {
- const SvxHyperlinkItem& rHLnkItem = *((const SvxHyperlinkItem*)pState);
-
- USHORT nNamePos = aNameCB.GetEntryPos(aNameCB.GetText());
- USHORT nUrlPos = aUrlCB.GetEntryPos(aUrlCB.GetText());
- USHORT nNotFound = COMBOBOX_ENTRY_NOTFOUND;
-
- if (!bHasOldName &&
- (nNamePos == nNotFound || nUrlPos == nNotFound))
- {
- sOldName = aNameCB.GetText();
- bHasOldName = TRUE;
- }
- if (rHLnkItem.GetName().Len())
- {
- aNameCB.SetText(rHLnkItem.GetName());
- ComboModifyHdl(&aNameCB);
- }
- if (rHLnkItem.GetURL().Len() || rHLnkItem.GetName().Len())
- {
- String sUrl = INetURLObject(rHLnkItem.GetURL()).GetURLNoPass();
- aUrlCB.SetText(sUrl);
- }
- else if (aUrlCB.GetEntryCount())
- { // Letzten Eintrag wieder selektieren
- aNameCB.SetText(aNameCB.GetEntry(0));
- aUrlCB.SetText(aUrlCB.GetEntry(0));
- }
-
- TargetMenu(rHLnkItem.GetTargetFrame(), FALSE);
- bHtmlMode = (rHLnkItem.GetInsertMode() & HLINK_HTMLMODE) != 0;
- }
- else
- return;
-
- ComboModifyHdl(&aUrlCB);
- }
-}
-
-IMPL_LINK( SvxHyperlinkDlg, TBClickHdl, ToolBox *, pBox )
-{
- switch (pBox->GetCurItemId())
- {
- case BTN_LINK:
- {
- if (!bSend) // Link ins Dokument einfuegen
- SendToApp(HLINK_DEFAULT);
- }
- break;
-
- case BTN_OPENDIALOG:
- {
- GetBindings().GetDispatcher()->Execute( SID_HYPERLINK_DIALOG );
- }
- break;
- }
-
- return TRUE;
-}
-
-IMPL_LINK( SvxHyperlinkDlg, TBSelectHdl, ToolBox *, pBox )
-{
- switch (pBox->GetCurItemId())
- {
- // Link als Bookmark im Explorer eintragen
- // Soll erst im Loslassen der Maus gerufen werden, daher im Select-Hdl
- case BTN_INSERT_BOOKMARK:
- {
- String sName = aNameCB.GetText();
- if ( !sName.Len() )
- sName = aUrlCB.GetText();
-
- String aBase = GetBindings().GetDispatcher()->GetFrame()->GetObjectShell()->GetMedium()->GetBaseURL();
- SfxStringItem aName( SID_BOOKMARK_TITLE, sName );
- SfxStringItem aURL( SID_BOOKMARK_URL,
- URIHelper::SmartRel2Abs( INetURLObject(aBase), aUrlCB.GetText(), URIHelper::GetMaybeFileHdl(), true, false,
- INetURLObject::WAS_ENCODED,
- INetURLObject::DECODE_UNAMBIGUOUS ) );
- GetBindings().GetDispatcher()->Execute(
- SID_CREATELINK, SFX_CALLMODE_ASYNCHRON, &aName, &aURL, 0L );
- }
- break;
- }
-
- return TRUE;
-}
-
-IMPL_LINK( SvxHyperlinkDlg, DropdownClick, ToolBox *, pBox )
-{
- switch (pBox->GetCurItemId())
- {
- case BTN_LINK:
- {
- // Link-Popup anstossen
- EndSelection(); // Vor dem Execute, damit Popup den Focus bekommt
- aLinkPopup.EnableItem(MN_BUTTON, !bHtmlMode);
- aLinkPopup.Execute( this, GetItemRect( BTN_LINK ), FLOATWIN_POPUPMODE_DOWN );
- }
- break;
-
- case BTN_INET_SEARCH:
- {
- // Search-Engines per Popup auswaehlen
- PopupMenu *pMenu = new PopupMenu;
- pMenu->SetSelectHdl(LINK(this, SvxHyperlinkDlg, SearchPopupSelectHdl));
- SearchDefaultConfigItem_Impl aDefaultEngine;
- String sDefault(aDefaultEngine.GetDefaultSearchEngine());
- sDefault.ToLowerAscii();
- const bool bHasDefault = sDefault.Len() > 0;
-
- sal_uInt16 nCount = aSearchConfig.Count();
- String sFound;
- for (USHORT i = 0; i < nCount; i++)
- {
- const SvxSearchEngineData& rData = aSearchConfig.GetData(i);
- //check if it's the configured default search engine
- String sTest(rData.sEngineName);
- sTest.ToLowerAscii();
- bool bIsDefaultEngine = bHasDefault && STRING_NOTFOUND != sTest.Search( sDefault );
- //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);
- }
- }
- pBox->SetItemDown(BTN_INET_SEARCH, TRUE, TRUE);
- pMenu->Execute( this, GetItemRect( BTN_INET_SEARCH ), FLOATWIN_POPUPMODE_DOWN );
- pBox->SetItemDown(BTN_INET_SEARCH, FALSE, TRUE);
- EndSelection();
- delete pMenu;
- }
- break;
-
- case BTN_TARGET:
- {
- // Target Frame einstellen
- TargetMenu(GetSelTarget(), TRUE);
- EndSelection();
- }
- break;
- }
-
- return TRUE;
-}
-
-void SvxHyperlinkDlg::TargetMenu(const String& rSelEntry, BOOL bExecute)
-{
- if (pTargetMenu && !bExecute)
- {
- for (USHORT i = 1; i <= pTargetMenu->GetItemCount(); i++)
- {
- if (pTargetMenu->GetItemText(i) == rSelEntry)
- {
- pTargetMenu->CheckItem(i);
- return;
- }
- }
- }
-
- SfxViewFrame* pVwFrm = SfxViewFrame::Current();
-
- if (pVwFrm) // Alle moeglichen Target Frames zusammensammeln und anzeigen
- {
- TargetList aList;
- pVwFrm->GetTopFrame().GetTargetList(aList);
-
- if ( !aList.empty() )
- {
- size_t nCount = aList.size();
- BOOL bChecked = FALSE;
-
- if (pTargetMenu != NULL)
- delete pTargetMenu;
-
- pTargetMenu = new PopupMenu;
- pTargetMenu->SetMenuFlags( pTargetMenu->GetMenuFlags() |
- MENU_FLAG_NOAUTOMNEMONICS );
-
- for ( size_t i = 0; i < nCount; i++ )
- {
- String sEntry( *aList[ i ] );
- pTargetMenu->InsertItem(i + 1, sEntry, MIB_RADIOCHECK|MIB_AUTOCHECK);
-
- if (sEntry == rSelEntry)
- {
- pTargetMenu->CheckItem(i + 1);
- bChecked = TRUE;
- }
- }
- for ( size_t i = nCount; i; )
- delete aList[ --i ];
-
- if (!bChecked)
- pTargetMenu->CheckItem(1);
-
- if (bExecute)
- {
- USHORT nEntry = pTargetMenu->Execute(
- this, GetItemRect( BTN_TARGET ), FLOATWIN_POPUPMODE_DOWN );
- if ( nEntry )
- pTargetMenu->CheckItem( nEntry );
- }
- }
- }
-}
-
-IMPL_LINK( SvxHyperlinkDlg, LinkPopupSelectHdl, Menu *, pMenu )
-{
- switch (pMenu->GetCurItemId())
- {
- case MN_FIELD: // URL als Hyperlink ins Dok einfuegen
- SendToApp(HLINK_FIELD);
- break;
- case MN_BUTTON: // URL als Button ins Dok einfuegen
- SendToApp(HLINK_BUTTON);
- break;
- }
-
- return TRUE;
-}
-
-IMPL_LINK( SvxHyperlinkDlg, SearchPopupSelectHdl, Menu *, pMenu )
-{
- const SvxSearchEngineData& rData = aSearchConfig.GetData(pMenu->GetCurItemId() - 1);
- String sText(aNameCB.GetText());
- sText.EraseLeadingChars().EraseTrailingChars();
-
- rtl::OUString sPrefix;
- rtl::OUString sSuffix;
- rtl::OUString sSeparator;
- sal_Int32 nCaseMatch;
- sal_Unicode cToken = 0;
-
- if (sText.Search(' ') != STRING_NOTFOUND)
- {
- sPrefix = rData.sExactPrefix;
- sSuffix = rData.sExactSuffix;
- sSeparator = rData.sExactSeparator;
- nCaseMatch = rData.nExactCaseMatch;
- cToken = ' ';
- }
- else if (sText.Search('+') != STRING_NOTFOUND)
- {
- sPrefix = rData.sAndPrefix;
- sSuffix = rData.sAndSuffix;
- sSeparator = rData.sAndSeparator;
- nCaseMatch = rData.nAndCaseMatch;
- cToken = '+';
- }
- else if (sText.Search(',') != STRING_NOTFOUND)
- {
- sPrefix = rData.sOrPrefix;
- sSuffix = rData.sOrSuffix;
- sSeparator = rData.sOrSeparator;
- nCaseMatch = rData.nOrCaseMatch;
- cToken = ',';
- }
- else
- {
- sPrefix = rData.sExactPrefix;
- sSuffix = rData.sExactSuffix;
- nCaseMatch = rData.nExactCaseMatch;
- cToken = 0;
- }
-
- String sURL = sPrefix;
- xub_StrLen nTok;
-
- if(1 == nCaseMatch)
- sText.ToUpperAscii();
- else if(2 == nCaseMatch)
- sText.ToLowerAscii();
-
- if ((nTok = sText.GetTokenCount(cToken)) > 1)
- {
- for (USHORT i = 0; i < nTok; i++)
- {
- sURL += sText.GetToken(i, cToken);
- if(i < nTok -1)
- sURL += (String)sSeparator;
- }
- sURL += (String)sSuffix;
- }
- else
- {
- sURL += sText;
- sURL += (String)sSuffix;
- }
- sURL.EraseAllChars(); // remove all spaces
- SfxViewFrame* pViewFrame = SfxViewFrame::Current();
- if ( pViewFrame )
- pViewFrame = pViewFrame->GetTopViewFrame();
- OpenDoc( sURL, pViewFrame );
-
- return TRUE;
-}
-
-IMPL_LINK( SvxHyperlinkDlg, BookmarkFoundHdl, String *, pUrl )
-{
- if (pUrl && pUrl->Len())
- {
- aUrlCB.SetText(*pUrl);
- ComboModifyHdl(&aUrlCB);
- }
-
- return TRUE;
-}
-/*--------------------------------------------------------------------
- Beschreibung: Link-Button enablen/disablen
- --------------------------------------------------------------------*/
-
-void SvxHyperlinkDlg::EnableLink()
-{
- BOOL bEnable = aUrlCB.GetText().Len() != 0;
-
- EnableItem(BTN_LINK, (!bNoDoc) & bEnable);
-}
-
-/*--------------------------------------------------------------------
- Beschreibung: URL im Dokument einfuegen
- --------------------------------------------------------------------*/
-
-void SvxHyperlinkDlg::SendToApp(USHORT nType)
-{
- BOOL bIsFile = FALSE;
- bSend = TRUE;
- String sURL( aUrlCB.GetText() );
-
- if ( !sURL.Len() )
- return;
-
- String aBase = GetBindings().GetDispatcher()->GetFrame()->GetObjectShell()->GetMedium()->GetBaseURL();
- INetURLObject aObj( URIHelper::SmartRel2Abs( INetURLObject(aBase), sURL, URIHelper::GetMaybeFileHdl(), true, false,
- INetURLObject::WAS_ENCODED,
- INetURLObject::DECODE_UNAMBIGUOUS ) );
- sURL = aObj.GetMainURL( INetURLObject::NO_DECODE );
- if ( aObj.GetProtocol() == INET_PROT_FILE )
- bIsFile = TRUE;
-
- if ( bIsFile )
- {
- EnterWait();
- SfxMedium aMedium( sURL, STREAM_STD_READ, TRUE );
- if ( aMedium.Exists( FALSE ) == FALSE )
- {
- LeaveWait();
- QueryBox aBox( this, SVX_RES( RID_SVXQB_DONTEXIST ) );
- if ( aBox.Execute() == RET_NO )
- return;
- }
- else
- LeaveWait();
- }
-
- SvxHyperlinkItem aItem( SID_HYPERLINK_SETLINK );
-
- if (aNameCB.GetText().Len())
- aItem.SetName( aNameCB.GetText() );
- else
- aItem.SetName( sURL );
-
- sOldName = aNameCB.GetText();
-
- aItem.SetURL(sURL);
- aItem.SetInsertMode( (SvxLinkInsertMode)nType );
- aItem.SetTargetFrame( GetSelTarget() );
-
- GetBindings().GetDispatcher()->Execute(
- SID_HYPERLINK_SETLINK, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L );
-
- AddToHistory( aNameCB.GetText(), sURL );
-
- if ( sURL != aUrlCB.GetText() )
- aUrlCB.SetText( sURL );
-}
-
-/*--------------------------------------------------------------------
- Beschreibung: Selektierten Target Frame Eintrag im Popup ermitteln
- --------------------------------------------------------------------*/
-
-String SvxHyperlinkDlg::GetSelTarget()
-{
- String sTarget;
-
- if (pTargetMenu != NULL)
- {
- for (USHORT i = 1; i <= pTargetMenu->GetItemCount(); i++)
- {
- if (pTargetMenu->IsItemChecked(i))
- {
- sTarget = pTargetMenu->GetItemText(i);
- break;
- }
- }
- }
-
- return sTarget;
-}
-
-/*--------------------------------------------------------------------
- Beschreibung: URL in History der Leiste aufnehmen
- --------------------------------------------------------------------*/
-
-void SvxHyperlinkDlg::AddToHistory(const String& rName, const String& rURL)
-{
- String sName(rName);
-
- if (bHasOldName && sOldName.Len())
- {
- sName = sOldName;
- bHasOldName = FALSE;
- }
-
- if (!sName.Len())
- sName = rURL;
-
- if (rURL.Len())
- {
- USHORT nNamePos = aNameCB.GetEntryPos(sName);
- USHORT nUrlPos = aUrlCB.GetEntryPos(rURL);
- USHORT nPos = COMBOBOX_ENTRY_NOTFOUND;
-
- if (nNamePos != COMBOBOX_ENTRY_NOTFOUND)
- nPos = nNamePos;
- else
- nPos = nUrlPos;
-
- // Alten Eintrag durch neuen Eintrag ersetzen
- if (nPos != COMBOBOX_ENTRY_NOTFOUND)
- {
- aNameCB.RemoveEntry(nPos);
- aUrlCB.RemoveEntry(nPos);
- aNameCB.SetText(rName);
- aUrlCB.SetText(rURL);
- }
-
- aNameCB.InsertEntry(sName, 0);
- aUrlCB.InsertEntry(rURL, 0);
- }
-}
-
-/*--------------------------------------------------------------------
- Beschreibung: Bookmark und Search-Button enablen/disablen
- --------------------------------------------------------------------*/
-
-IMPL_LINK( SvxHyperlinkDlg, ComboSelectHdl, ComboBox *, pCombo )
-{
- USHORT nPos = pCombo->GetEntryPos(pCombo->GetText());
-
- if (nPos != COMBOBOX_ENTRY_NOTFOUND)
- {
- aNameCB.SetText(aNameCB.GetEntry(nPos));
- aUrlCB.SetText(aUrlCB.GetEntry(nPos));
-
- EnableLink();
- EnableItem(BTN_INSERT_BOOKMARK, TRUE);
- EnableItem(BTN_INET_SEARCH, TRUE);
- }
- return TRUE;
-}
-
-IMPL_LINK( SvxHyperlinkDlg, ComboModifyHdl, ComboBox *, pCombo )
-{
- BOOL bEnable = TRUE;
-
- if (!pCombo->GetText().Len())
- bEnable = FALSE;
-
- if (pCombo == &aNameCB)
- {
- if (IsItemEnabled(BTN_INET_SEARCH) != bEnable)
- EnableItem(BTN_INET_SEARCH, bEnable);
- }
-
- EnableLink();
-
- if (aUrlCB.GetText().Len())
- bEnable = TRUE;
- else
- bEnable = FALSE;
-
- if (IsItemEnabled(BTN_INSERT_BOOKMARK) != bEnable)
- EnableItem(BTN_INSERT_BOOKMARK, bEnable);
-
- return TRUE;
-}
-
-// --------------------------------------------------------------------
-
-void SvxHyperlinkDlg::DataChanged( const DataChangedEvent& rDCEvt )
-{
- ToolBox::DataChanged( rDCEvt );
-
- if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE))
- SetImages();
-}
-
-// --------------------------------------------------------------------
-
-void SvxHyperlinkDlg::SetImages()
-{
- SetItemImage( BTN_LINK, mpManager->GetImage( BTN_LINK ) );
- SetItemImage( BTN_INSERT_BOOKMARK, mpManager->GetImage( BTN_INSERT_BOOKMARK ) );
- SetItemImage( BTN_INET_SEARCH, mpManager->GetImage( BTN_INET_SEARCH ) );
- SetItemImage( BTN_TARGET, mpManager->GetImage( BTN_TARGET ) );
- SetItemImage( BTN_OPENDIALOG, mpManager->GetImage( BTN_OPENDIALOG ) );
-}
-
-/*--------------------------------------------------------------------
- Beschreibung: Comboboxen
- --------------------------------------------------------------------*/
-
-HyperCombo::HyperCombo( SvxHyperlinkDlg* pDialog, const ResId& rResId ) :
- ComboBox( (Window *)pDialog, rResId )
-{
- nRatio = 0;
- pDlg = pDialog;
-
- nMaxWidth = GetSizePixel().Width();
- if (this == &pDlg->aUrlCB)
- nMinWidth = GetTextWidth(String::CreateFromAscii("http://www.stardiv.dewww"));
- else
- nMinWidth = GetTextWidth(String::CreateFromAscii("StarDivision GmbHwww"));
-}
-
-/*--------------------------------------------------------------------
- Beschreibung: Comboboxen KeyInput
- --------------------------------------------------------------------*/
-
-long HyperCombo::Notify( NotifyEvent& rNEvt )
-{
- long nHandled = 0;
- static BOOL bLocked = FALSE;
-
- if (bLocked) // Keine weiteren RETURNs annehmen (nicht Reentrant!)
- return nHandled;
-
- bLocked = TRUE;
-
- if ( rNEvt.GetType() == EVENT_KEYINPUT )
- {
- const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
- const KeyCode aKeyCode = pKEvt->GetKeyCode();
-
- if (aKeyCode.GetCode() == KEY_RETURN)
- {
- pDlg->SendToApp(HLINK_DEFAULT);
- nHandled = 1;
- }
- }
- if (this == &pDlg->aNameCB)
- pDlg->sOldName = GetText();
-
- if (!nHandled)
- nHandled = ComboBox::Notify( rNEvt );
-
- bLocked = FALSE;
-
- return nHandled;
-}
-
-/*--------------------------------------------------------------------
- Beschreibung: Drag&Drop vor dem Combo-Edit abfangen und weiterleiten
- --------------------------------------------------------------------*/
-
-long HyperCombo::PreNotify( NotifyEvent& rNEvt )
-{
- long nHandled = 0;
-
- nHandled = ComboBox::PreNotify( rNEvt );
-
- return nHandled;
-}
-
-long HyperCombo::CalcResizeWidth( long nW )
-{
- long nNewWidth = Max(nMaxWidth - nW * GetRatio() / 100L, nMinWidth);
-
- if (nNewWidth > nMaxWidth)
- nNewWidth = nMaxWidth;
-
- if (nNewWidth != GetSizePixel().Width())
- return nNewWidth;
- else
- return 0; // Kein Resize notwendig
-}
-
-void HyperCombo::DoResize( long nNewWidth )
-{
- SetSizePixel(Size(nNewWidth, GetSizePixel().Height()));
-}
-
-/*--------------------------------------------------------------------
- Beschreibung: FixedText
- --------------------------------------------------------------------*/
-
-HyperFixedText::HyperFixedText( SvxHyperlinkDlg* pDialog, const ResId& rResId ) :
- FixedInfo( (Window *)pDialog, rResId )
-{
- pDlg = pDialog;
-}
-
-/*--------------------------------------------------------------------
- Beschreibung: Webseite der Search-Engine mit Suchergebnissen anzeigen
- --------------------------------------------------------------------*/
-void SvxHyperlinkDlg::OpenDoc( const String& rURL, SfxViewFrame* pViewFrame )
-{
- SfxStringItem aName( SID_FILE_NAME, rURL );
- SfxStringItem aReferer( SID_REFERER, String::CreateFromAscii("private:user") );
- SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, TRUE );
- SfxBoolItem aSilent( SID_SILENT, TRUE );
- SfxBoolItem aReadOnly( SID_DOC_READONLY, TRUE );
- SfxBoolItem aExternal( SID_BROWSE, TRUE );
- SfxDispatcher* pDisp = SfxViewFrame::Current() ? SfxViewFrame::Current()->GetDispatcher() : NULL;
-
- if ( pViewFrame )
- {
- SfxFrameItem aView( SID_DOCFRAME, pViewFrame ? &pViewFrame->GetFrame() : NULL );
- if ( pDisp )
- pDisp->Execute( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
- &aName, &aView, &aNewView, &aSilent, &aReadOnly, &aReferer, &aExternal, 0L );
- }
- else if ( pDisp )
- pDisp->Execute( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
- &aName, &aNewView, &aSilent, &aReadOnly, &aReferer, 0L );
-}
-// class SvxHyperlinkDialogWrapper ------------------------------------------
-
-SFX_IMPL_CHILDWINDOW(SvxHyperlinkDlgWrapper, SID_HYPERLINK_INSERT)
-
-/*--------------------------------------------------------------------
- Beschreibung: Wrapper fuer Hyperlinkleiste
- --------------------------------------------------------------------*/
-
-SvxHyperlinkDlgWrapper::SvxHyperlinkDlgWrapper( Window* _pParent, USHORT nId,
- SfxBindings* _pBindings, SfxChildWinInfo* /*pInfo*/ ) :
-
- SfxChildWindow( _pParent, nId )
-
-{
- pWindow = new SvxHyperlinkDlg( _pBindings, _pParent );
- eChildAlignment = SFX_ALIGN_TOP;
-}
-
-SfxChildWinInfo SvxHyperlinkDlgWrapper::GetInfo() const
-{
- SfxChildWinInfo aInfo = SfxChildWindow::GetInfo();
- return aInfo;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/hyprlink.hrc b/svx/source/dialog/hyprlink.hrc
deleted file mode 100644
index 87f7c9f..0000000
--- a/svx/source/dialog/hyprlink.hrc
+++ /dev/null
@@ -1,58 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef _SVX_HYPERLINK_HRC
-#define _SVX_HYPERLINK_HRC
-
-#ifndef _SVX_SVXIDS_HRC
-#include <svx/svxids.hrc>
-#endif
-
-#ifndef _SFXSIDS_HRC
-#include <sfx2/sfxsids.hrc>
-#endif
-
-// defines ------------------------------------------------------------------
-
-#define CB_NAME 1
-#define FT_URL 2
-#define CB_URL 3
-#define BTN_LINK SID_HLINKBAR_LINK
-#define BTN_INSERT_BOOKMARK SID_HLINKBAR_BOOKMARK
-#define BTN_INET_SEARCH SID_HLINKBAR_SEARCH
-#define TB 7
-#define MN_FIELD 8
-#define MN_BUTTON 9
-#define BTN_TARGET SID_HLINKBAR_TARGET
-#define STR_ADDRESS 11
-#define STR_EXPLORER 12
-#define STR_BOOKMARK_SEARCH 13
-
-#define BTN_OPENDIALOG SID_HYPERLINK_DIALOG
-
-
-#endif
-
diff --git a/svx/source/dialog/hyprlink.hxx b/svx/source/dialog/hyprlink.hxx
deleted file mode 100644
index b37c2cf..0000000
--- a/svx/source/dialog/hyprlink.hxx
+++ /dev/null
@@ -1,45 +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_DLG_HYPERLINK_HXX
-#define _SVX_DLG_HYPERLINK_HXX
-
-#include <sfx2/childwin.hxx>
-#include "svx/svxdllapi.h"
-
-// class SvxHyperlinkDialogWrapper ---------------------------------------
-class SVX_DLLPUBLIC SvxHyperlinkDlgWrapper : public SfxChildWindow
-{
-public:
- SvxHyperlinkDlgWrapper( Window*pParent, USHORT nId,
- SfxBindings* pBindings, SfxChildWinInfo* pInfo );
- SFX_DECL_CHILDWINDOW(SvxHyperlinkDlgWrapper);
-};
-#endif // _SVX_DLG_HYPERLINK_HXX
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/hyprlink.src b/svx/source/dialog/hyprlink.src
deleted file mode 100644
index 75d6775..0000000
--- a/svx/source/dialog/hyprlink.src
+++ /dev/null
@@ -1,167 +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 <svx/dialogs.hrc>
-#include "hyprlink.hrc"
-#include "helpid.hrc"
-#include <svx/svxids.hrc>
-
- // pragma -------------------------------------------------------------------
-
- // RID_SVXDLG_HYPERLINK ------------------------------------------------------
-ToolBox RID_SVXDLG_HYPERLINK
-{
- OutputSize = TRUE ;
- Hide = TRUE;
-
- // Dockable = TRUE ;
- // Closeable = TRUE ;
- // Moveable = TRUE ;
- // Sizeable = TRUE ;
- // EnableResizing = TRUE ;
-
- SVLook = TRUE ;
- Border = TRUE ;
- Size = MAP_APPFONT ( 410 , 17 ) ;
- Scroll = TRUE ;
- HelpID = HID_OFA_HYPERLINK_DLG ;
-
- Text [ en-US ] = "Insert Hyperlink" ;
-
- ComboBox CB_NAME
- {
- HelpID = HID_OFA_HYPERLINK_NAME ;
- Pos = MAP_APPFONT ( 2 , 3 ) ;
- Size = MAP_APPFONT ( 100 , 60 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- AutoSize = TRUE ;
- AutoHScroll = TRUE ;
- DDExtraWidth = TRUE ;
- QuickHelpText [ en-US ] = "URL Name" ;
- };
- FixedText FT_URL
- {
- HelpID = HID_OFA_HYPERLINK_URL_TXT ;
- Pos = MAP_APPFONT ( 105 , 5 ) ;
- Size = MAP_APPFONT ( 16 , 10 ) ;
- Text [ en-US ] = "URL:" ;
- };
- ComboBox CB_URL
- {
- HelpID = HID_OFA_HYPERLINK_URL ;
- Pos = MAP_APPFONT ( 121 , 3 ) ;
- Size = MAP_APPFONT ( 204 , 60 ) ;
- TabStop = TRUE ;
- DropDown = TRUE ;
- AutoSize = TRUE ;
- AutoHScroll = TRUE ;
- DDExtraWidth = TRUE ;
- QuickHelpText [ en-US ] = "Internet URLs" ;
- };
- ItemList =
- {
- ToolBoxItem
- {
- HelpID = HID_OFA_HYPERLINK_TARGET ;
- Identifier = BTN_TARGET ;
- DropDown = TRUE ;
- Text [ en-US ] = "Target Frame" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- HelpID = SID_HYPERLINK_SETLINK ;
- Identifier = BTN_LINK ;
- Disable = TRUE ;
- DropDown = TRUE ;
- Text [ en-US ] = "Hyperlink" ;
- };
- ToolBoxItem
- {
- HelpID = SID_CREATELINK ;
- Identifier = BTN_INSERT_BOOKMARK ;
- Disable = TRUE ;
- Hide = TRUE;
- Text [ en-US ] = "Link" ;
- };
- ToolBoxItem
- {
- HelpID = HID_OFA_HYPERLINK_SEARCH ;
- Identifier = BTN_INET_SEARCH ;
- Disable = TRUE ;
- DropDown = TRUE ;
- Text [ en-US ] = "Find" ;
- };
- };
- String STR_ADDRESS
- {
- Text [ en-US ] = "Address Book" ;
- };
- String STR_EXPLORER
- {
- Text [ en-US ] = "Bookmark folder" ;
- };
- String STR_BOOKMARK_SEARCH
- {
- Text [ en-US ] = "Search in bookmarks";
- };
-};
- // PopupMenu -------------------------------------------------------------
-Menu RID_SVXMN_HYPERLINK
-{
- ItemList =
- {
- MenuItem
- {
- Identifier = MN_FIELD ;
- Text [ en-US ] = "As Text" ;
- };
- MenuItem
- {
- Identifier = MN_BUTTON ;
- Text [ en-US ] = "As Button" ;
- };
- };
-};
-QueryBox RID_SVXQB_DONTEXIST
-{
- BUTTONS = WB_YES_NO ;
- DEFBUTTON = WB_DEF_YES ;
- Message [ en-US ] = "This URL does not exist.\nInsert anyway?" ;
-};
-
-
-
-
-
-
-
-
diff --git a/svx/source/dialog/makefile.mk b/svx/source/dialog/makefile.mk
index 3805de9..2f1d36c 100644
--- a/svx/source/dialog/makefile.mk
+++ b/svx/source/dialog/makefile.mk
@@ -52,7 +52,6 @@ SRC1FILES = \
fontwork.src \
frmsel.src \
hdft.src \
- hyprlink.src \
imapdlg.src \
langbox.src \
language.src \
@@ -106,7 +105,6 @@ LIB2OBJFILES= \
$(SLO)$/grfflt.obj \
$(SLO)$/hdft.obj \
$(SLO)$/hyperdlg.obj \
- $(SLO)$/hyprlink.obj \
$(SLO)$/imapdlg.obj \
$(SLO)$/imapwnd.obj \
$(SLO)$/linkwarn.obj \
More information about the Libreoffice-commits
mailing list