[Libreoffice-commits] .: cui/source desktop/source sd/source sfx2/source svtools/inc svtools/Library_svt.mk svtools/Package_inc.mk svtools/source toolkit/inc toolkit/Library_tk.mk toolkit/Package_inc.mk toolkit/source vcl/inc vcl/Library_vcl.mk vcl/Package_inc.mk vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Nov 12 04:02:42 PST 2012


 cui/source/dialogs/SpellDialog.cxx                    |    4 
 cui/source/inc/SpellDialog.hxx                        |   10 -
 cui/source/inc/about.hxx                              |    1 
 cui/source/inc/optlingu.hxx                           |    6 
 desktop/source/deployment/gui/dp_gui_dialog2.cxx      |    6 
 desktop/source/deployment/gui/dp_gui_dialog2.hxx      |    8 -
 desktop/source/deployment/gui/dp_gui_extlistbox.cxx   |    2 
 desktop/source/deployment/gui/dp_gui_extlistbox.hxx   |    6 
 desktop/source/deployment/gui/dp_gui_updatedialog.cxx |    2 
 desktop/source/deployment/gui/dp_gui_updatedialog.hxx |   14 -
 sd/source/ui/dlg/RemoteDialogClientBox.hxx            |    1 
 sfx2/source/dialog/basedlgs.cxx                       |    1 
 svtools/Library_svt.mk                                |    1 
 svtools/Package_inc.mk                                |    1 
 svtools/inc/svtools/fixedhyper.hxx                    |  133 ------------------
 svtools/inc/svtools/templdlg.hxx                      |    4 
 svtools/source/control/fixedhyper.cxx                 |  133 ------------------
 svtools/source/uno/unoiface.cxx                       |    4 
 toolkit/Library_tk.mk                                 |    1 
 toolkit/Package_inc.mk                                |    1 
 toolkit/inc/toolkit/helper/fixedhyperbase.hxx         |   50 ------
 toolkit/source/awt/vclxwindows.cxx                    |   14 -
 toolkit/source/helper/fixedhyperbase.cxx              |   63 --------
 vcl/Library_vcl.mk                                    |    1 
 vcl/Package_inc.mk                                    |    1 
 vcl/inc/vcl/fixedhyper.hxx                            |  127 +++++++++++++++++
 vcl/source/control/fixedhyper.cxx                     |  133 ++++++++++++++++++
 vcl/source/window/builder.cxx                         |    3 
 28 files changed, 305 insertions(+), 426 deletions(-)

New commits:
commit 040e022d06ecadc36d3ef5c52178095a4d2c828a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Nov 10 23:22:47 2012 +0000

    move svtools's FixedHyper.hxx to vcl
    
    merge with fixedhyperbase and map GtkLinkButton
    to FixedHyper. Convert to String while I'm at it.
    
    Change-Id: Ibc61fd29c01796561eeef952a159c82ff215a095

diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 54f94cf..b5ba380 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -420,7 +420,7 @@ void SpellDialog::UpdateBoxes_Impl()
     }
     else
     {
-        bool bHasExplainLink = aExplainLink.GetURL().Len() != 0;
+        bool bHasExplainLink = !aExplainLink.GetURL().isEmpty();
         aExplainLink.Show( bHasExplainLink );
 
         sal_Int32 nExplainWidth = aExplainLink.GetPosPixel().X() - aExplainFT.GetPosPixel().X();
@@ -2156,7 +2156,7 @@ void  SentenceEditWindow_Impl::SetUndoEditMode(bool bSet)
     pSpellDialog->aChangePB.Enable();
 }
 
-IMPL_LINK( SpellDialog, HandleHyperlink, svt::FixedHyperlink*, pHyperlink )
+IMPL_LINK( SpellDialog, HandleHyperlink, FixedHyperlink*, pHyperlink )
 {
     rtl::OUString sURL=pHyperlink->GetURL();
     rtl::OUString sTitle=GetText();
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx
index b2a9f94..4161407 100644
--- a/cui/source/inc/SpellDialog.hxx
+++ b/cui/source/inc/SpellDialog.hxx
@@ -36,7 +36,7 @@
 #include <memory>
 #include <svtools/svmedit.hxx>
 #include <svl/lstner.hxx>
-#include <svtools/fixedhyper.hxx>
+#include <vcl/fixedhyper.hxx>
 #include <vcl/xtextedt.hxx>
 #include <editeng/SpellPortions.hxx>
 
@@ -137,10 +137,10 @@ private:
     FixedText       aLanguageFT;
     SvxLanguageBox  aLanguageLB;
 
-    HelpFixedText       aExplainFT;
-    svt::FixedHyperlink aExplainLink;
+    HelpFixedText   aExplainFT;
+    FixedHyperlink  aExplainLink;
 
-    FixedText           aNotInDictFT;
+    FixedText       aNotInDictFT;
     SentenceEditWindow_Impl  aSentenceED;
 
     FixedText       aSuggestionFT;
@@ -201,7 +201,7 @@ private:
     DECL_LINK( AddToDictClickHdl, PushButton* );
     DECL_LINK( LanguageSelectHdl, SvxLanguageBox* );
     DECL_LINK( DialogUndoHdl, SpellUndoAction_Impl* );
-    DECL_LINK( HandleHyperlink, svt::FixedHyperlink * );
+    DECL_LINK( HandleHyperlink, FixedHyperlink * );
 
     DECL_STATIC_LINK( SpellDialog, InitHdl, SpellDialog * );
 
diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx
index 28e2fa5..4f824e3 100644
--- a/cui/source/inc/about.hxx
+++ b/cui/source/inc/about.hxx
@@ -23,7 +23,6 @@
 #include <vcl/accel.hxx>
 #include <svtools/svmedit.hxx>
 #include <svtools/stdctrl.hxx>
-#include "svtools/fixedhyper.hxx"
 #include <sfx2/basedlgs.hxx>        ///< for SfxModalDialog
 #include <vector>
 
diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx
index 75e4b12..b870f61 100644
--- a/cui/source/inc/optlingu.hxx
+++ b/cui/source/inc/optlingu.hxx
@@ -23,7 +23,7 @@
 #include <vcl/fixed.hxx>
 #include <vcl/toolbox.hxx>
 #include <vcl/field.hxx>
-#include <svtools/fixedhyper.hxx>
+#include <vcl/fixedhyper.hxx>
 #include <sfx2/tabdlg.hxx>
 #include <svx/checklbx.hxx>
 #include <svx/langbox.hxx>
@@ -59,7 +59,7 @@ class SvxEditModulesDlg : public ModalDialog
     PushButton          aPrioUpPB;
     PushButton          aPrioDownPB;
     PushButton          aBackPB;
-    svt::FixedHyperlink aMoreDictsLink;
+    FixedHyperlink      aMoreDictsLink;
 
     FixedLine           aButtonsFL;
     HelpButton          aHelpPB;
@@ -110,7 +110,7 @@ private:
     FixedText           aLinguOptionsFT;
     SvxCheckListBox     aLinguOptionsCLB;
     PushButton          aLinguOptionsEditPB;
-    svt::FixedHyperlink aMoreDictsLink;
+    FixedHyperlink      aMoreDictsLink;
 
     String              sCapitalWords;
     String              sWordsWithDigits;
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index cb80e01..b7d924a 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -149,7 +149,7 @@ class ExtBoxWithBtns_Impl : public ExtensionBox_Impl
     DECL_DLLPRIVATE_LINK( HandleOptionsBtn, void * );
     DECL_DLLPRIVATE_LINK( HandleEnableBtn, void * );
     DECL_DLLPRIVATE_LINK( HandleRemoveBtn, void * );
-    DECL_DLLPRIVATE_LINK( HandleHyperlink, svt::FixedHyperlink * );
+    DECL_DLLPRIVATE_LINK( HandleHyperlink, FixedHyperlink * );
 
 public:
                     ExtBoxWithBtns_Impl( ExtMgrDialog* pParent, TheExtensionManager *pManager );
@@ -1122,7 +1122,7 @@ IMPL_LINK_NOARG(ExtMgrDialog, HandleUpdateBtn)
 }
 
 // -----------------------------------------------------------------------
-IMPL_LINK( ExtMgrDialog, HandleHyperlink, svt::FixedHyperlink*, pHyperlink )
+IMPL_LINK( ExtMgrDialog, HandleHyperlink, FixedHyperlink*, pHyperlink )
 {
     openWebBrowser( pHyperlink->GetURL(), GetText() );
 
@@ -1610,7 +1610,7 @@ IMPL_LINK_NOARG(UpdateRequiredDialog, HandleCloseBtn)
 }
 
 // -----------------------------------------------------------------------
-IMPL_LINK( UpdateRequiredDialog, HandleHyperlink, svt::FixedHyperlink*, pHyperlink )
+IMPL_LINK( UpdateRequiredDialog, HandleHyperlink, FixedHyperlink*, pHyperlink )
 {
     openWebBrowser( pHyperlink->GetURL(), GetText() );
 
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
index 0aecee3..542e040 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
@@ -32,9 +32,9 @@
 #include "vcl/dialog.hxx"
 #include "vcl/button.hxx"
 #include "vcl/fixed.hxx"
+#include "vcl/fixedhyper.hxx"
 #include "vcl/timer.hxx"
 
-#include "svtools/fixedhyper.hxx"
 #include "svtools/prgsbar.hxx"
 #include "svtools/svmedit.hxx"
 
@@ -118,7 +118,7 @@ class ExtMgrDialog : public ModelessDialog,
     CheckBox             m_aBundledCbx;
     CheckBox             m_aSharedCbx;
     CheckBox             m_aUserCbx;
-    svt::FixedHyperlink  m_aGetExtensions;
+    FixedHyperlink       m_aGetExtensions;
     FixedText            m_aProgressText;
     ProgressBar          m_aProgressBar;
     CancelButton         m_aCancelBtn;
@@ -145,7 +145,7 @@ class ExtMgrDialog : public ModelessDialog,
     DECL_DLLPRIVATE_LINK( HandleUpdateBtn, void * );
     DECL_DLLPRIVATE_LINK( HandleCancelBtn, void * );
     DECL_DLLPRIVATE_LINK( HandleExtTypeCbx, void * );
-    DECL_DLLPRIVATE_LINK( HandleHyperlink, svt::FixedHyperlink * );
+    DECL_DLLPRIVATE_LINK( HandleHyperlink, FixedHyperlink * );
     DECL_DLLPRIVATE_LINK(TimeOutHdl, void *);
     DECL_DLLPRIVATE_LINK( startProgress, void * );
 
@@ -214,7 +214,7 @@ class UpdateRequiredDialog : public ModalDialog,
     DECL_DLLPRIVATE_LINK( HandleCancelBtn, void * );
     DECL_DLLPRIVATE_LINK(TimeOutHdl, void *);
     DECL_DLLPRIVATE_LINK( startProgress, void * );
-    DECL_DLLPRIVATE_LINK( HandleHyperlink, svt::FixedHyperlink * );
+    DECL_DLLPRIVATE_LINK( HandleHyperlink, FixedHyperlink * );
 
     bool            isEnabled( const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > &xPackage ) const;
     bool            checkDependencies( const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > &xPackage ) const;
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 29511d2..4163dc5 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -542,7 +542,7 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl pEntr
     // Init publisher link here
     if ( !pEntry->m_pPublisher && pEntry->m_sPublisher.Len() )
     {
-        pEntry->m_pPublisher = new svt::FixedHyperlink( this );
+        pEntry->m_pPublisher = new FixedHyperlink( this );
         pEntry->m_pPublisher->SetBackground();
         pEntry->m_pPublisher->SetPaintTransparent( true );
         pEntry->m_pPublisher->SetURL( pEntry->m_sPublisherURL );
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
index 0a6eca2..2ca3da7 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
@@ -29,10 +29,10 @@
 #include "rtl/ustring.hxx"
 #include "vcl/scrbar.hxx"
 #include "vcl/fixed.hxx"
+#include "vcl/fixedhyper.hxx"
 #include "vcl/dialog.hxx"
 
 #include "svtools/extensionlistbox.hxx"
-#include "svtools/fixedhyper.hxx"
 #include "cppuhelper/implbase1.hxx"
 #include "unotools/collatorwrapper.hxx"
 
@@ -54,7 +54,7 @@ namespace dp_gui {
 
 class TheExtensionManager;
 
-typedef ::boost::shared_ptr< svt::FixedHyperlink > TFixedHyperlink;
+typedef ::boost::shared_ptr< FixedHyperlink > TFixedHyperlink;
 
 //------------------------------------------------------------------------------
 //                          struct Entry_Impl
@@ -85,7 +85,7 @@ struct Entry_Impl
     String          m_sLicenseText;
     Image           m_aIcon;
     Image           m_aIconHC;
-    svt::FixedHyperlink *m_pPublisher;
+    FixedHyperlink* m_pPublisher;
 
     ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage> m_xPackage;
 
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index 129663a..c9b5c4f 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -1390,7 +1390,7 @@ IMPL_LINK_NOARG(UpdateDialog, closeHandler) {
     return 0;
 }
 
-IMPL_LINK( UpdateDialog, hyperlink_clicked, svt::FixedHyperlink*, pHyperlink )
+IMPL_LINK( UpdateDialog, hyperlink_clicked, FixedHyperlink*, pHyperlink )
 {
     ::rtl::OUString sURL;
     if ( pHyperlink )
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
index ea1cc8d..d267e9d 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
@@ -41,10 +41,10 @@
 #include "svx/checklbx.hxx"
 #include "tools/link.hxx"
 #include "tools/solar.h"
-#include "vcl/button.hxx"
-#include "vcl/dialog.hxx"
-#include "vcl/fixed.hxx"
-#include <svtools/fixedhyper.hxx>
+#include <vcl/button.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/fixedhyper.hxx>
 #include <vcl/throbber.hxx>
 
 #include "descedit.hxx"
@@ -177,7 +177,7 @@ private:
     DECL_LINK(allHandler, void *);
     DECL_LINK(okHandler, void *);
     DECL_LINK(closeHandler, void *);
-    DECL_LINK(hyperlink_clicked, svt::FixedHyperlink *);
+    DECL_LINK(hyperlink_clicked, FixedHyperlink *);
 
     com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
         m_context;
@@ -188,9 +188,9 @@ private:
     CheckBox m_all;
     FixedLine m_description;
     FixedText m_PublisherLabel;
-    svt::FixedHyperlink m_PublisherLink;
+    FixedHyperlink m_PublisherLink;
     FixedText m_ReleaseNotesLabel;
-    svt::FixedHyperlink m_ReleaseNotesLink;
+    FixedHyperlink m_ReleaseNotesLink;
     dp_gui::DescriptionEdit m_descriptions;
     FixedLine m_line;
     HelpButton m_help;
diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.hxx b/sd/source/ui/dlg/RemoteDialogClientBox.hxx
index c9d272e..fba0296 100644
--- a/sd/source/ui/dlg/RemoteDialogClientBox.hxx
+++ b/sd/source/ui/dlg/RemoteDialogClientBox.hxx
@@ -33,7 +33,6 @@
 #include "vcl/field.hxx"
 
 #include "svtools/extensionlistbox.hxx"
-#include "svtools/fixedhyper.hxx"
 #include "cppuhelper/implbase1.hxx"
 
 #include "com/sun/star/lang/Locale.hpp"
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index c784ab8..e438d7e 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -25,7 +25,6 @@
 #include <vcl/msgbox.hxx>
 #include <svl/eitem.hxx>
 #include <unotools/viewoptions.hxx>
-#include <svtools/fixedhyper.hxx>
 #include <svtools/controldims.hrc>
 
 #include <sfx2/basedlgs.hxx>
diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk
index 21988dd..4916808 100644
--- a/svtools/Library_svt.mk
+++ b/svtools/Library_svt.mk
@@ -114,7 +114,6 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
     svtools/source/control/filectrl \
     svtools/source/control/filectrl2 \
     svtools/source/control/fileurlbox \
-    svtools/source/control/fixedhyper \
     svtools/source/control/fmtfield \
     svtools/source/control/headbar \
     svtools/source/control/hyperlabel \
diff --git a/svtools/Package_inc.mk b/svtools/Package_inc.mk
index ecd6fb5..3aeb5d3 100644
--- a/svtools/Package_inc.mk
+++ b/svtools/Package_inc.mk
@@ -69,7 +69,6 @@ $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fileurlbox.hxx,svtools
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fileview.hxx,svtools/fileview.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/filter.hxx,svtools/filter.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/filechangedchecker.hxx,svtools/filechangedchecker.hxx))
-$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fixedhyper.hxx,svtools/fixedhyper.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fltcall.hxx,svtools/fltcall.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fmtfield.hxx,svtools/fmtfield.hxx))
 $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fontsubstconfig.hxx,svtools/fontsubstconfig.hxx))
diff --git a/svtools/inc/svtools/fixedhyper.hxx b/svtools/inc/svtools/fixedhyper.hxx
deleted file mode 100644
index 07c5e54..0000000
--- a/svtools/inc/svtools/fixedhyper.hxx
+++ /dev/null
@@ -1,133 +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 .
- */
-
-#ifndef SVTOOLS_FIXEDHYPER_HXX
-#define SVTOOLS_FIXEDHYPER_HXX
-
-#include "svtools/svtdllapi.h"
-
-#include <toolkit/helper/fixedhyperbase.hxx>
-
-//.........................................................................
-namespace svt
-{
-//.........................................................................
-
-    //=====================================================================
-    //= FixedHyperlink
-    //=====================================================================
-    class SVT_DLLPUBLIC FixedHyperlink : public ::toolkit::FixedHyperlinkBase
-    {
-    private:
-        long                m_nTextLen;
-        Pointer             m_aOldPointer;
-        Link                m_aClickHdl;
-        String              m_sURL;
-
-        /** initializes the font (link color and underline).
-
-            Called by the Ctors.
-        */
-        void                Initialize();
-
-    protected:
-        /** overwrites Window::MouseMove().
-
-            Changes the pointer only over the text.
-        */
-        virtual void        MouseMove( const MouseEvent& rMEvt );
-
-        /** overwrites Window::MouseButtonUp().
-
-            Calls the set link if the mouse is over the text.
-        */
-        virtual void        MouseButtonUp( const MouseEvent& rMEvt );
-
-        /** overwrites Window::RequestHelp().
-
-            Shows tooltip only if the mouse is over the text.
-        */
-        virtual void        RequestHelp( const HelpEvent& rHEvt );
-
-    public:
-        /** ctors
-
-            With ResId or WinBits.
-        */
-        FixedHyperlink( Window* pParent, const ResId& rId );
-        FixedHyperlink( Window* pParent, WinBits nWinStyle = 0 );
-
-        /** dtor
-
-        */
-        virtual ~FixedHyperlink();
-
-        /** overwrites Window::GetFocus().
-
-            Changes the color of the text and shows a focus rectangle.
-        */
-        virtual void        GetFocus();
-
-        /** overwrites Window::LoseFocus().
-
-            Changes the color of the text and hides the focus rectangle.
-        */
-        virtual void        LoseFocus();
-
-        /** overwrites Window::KeyInput().
-
-            KEY_RETURN and KEY_SPACE calls the link handler.
-        */
-        virtual void        KeyInput( const KeyEvent& rKEvt );
-
-        /** sets <member>m_aClickHdl</member> with <arg>rLink</arg>.
-
-            <member>m_aClickHdl</member> is called if the text is clicked.
-        */
-        inline void         SetClickHdl( const Link& rLink ) { m_aClickHdl = rLink; }
-
-        /** returns <member>m_aClickHdl</member>.
-
-            @return
-                <member>m_aClickHdl</member>
-        */
-        inline const Link&  GetClickHdl() const { return m_aClickHdl; }
-
-        // ::toolkit::FixedHyperbaseLink
-
-        /** sets the URL of the hyperlink and uses it as tooltip. */
-        virtual void        SetURL( const String& rNewURL );
-
-        /** returns the URL of the hyperlink.
-
-            @return
-                <member>m_sURL</member>
-        */
-        virtual String      GetURL() const;
-
-        /** sets new text and recalculates the text length. */
-        virtual void        SetDescription( const String& rNewDescription );
-    };
-//.........................................................................
-} // namespace svt
-//.........................................................................
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/inc/svtools/templdlg.hxx b/svtools/inc/svtools/templdlg.hxx
index f259515..ba195a5 100644
--- a/svtools/inc/svtools/templdlg.hxx
+++ b/svtools/inc/svtools/templdlg.hxx
@@ -33,7 +33,7 @@
 #include <vcl/button.hxx>
 #include <vcl/dialog.hxx>
 #include <vcl/fixed.hxx>
-#include <svtools/fixedhyper.hxx>
+#include <vcl/fixedhyper.hxx>
 
 struct SvtTmplDlg_Impl;
 
@@ -44,7 +44,7 @@ class SvtTemplateWindow;
 class SVT_DLLPUBLIC SvtDocumentTemplateDialog : public ModalDialog
 {
 private:
-    svt::FixedHyperlink aMoreTemplatesLink;
+    FixedHyperlink      aMoreTemplatesLink;
     FixedLine           aLine;
     PushButton          aManageBtn;
     PushButton          aEditBtn;
diff --git a/svtools/source/control/fixedhyper.cxx b/svtools/source/control/fixedhyper.cxx
deleted file mode 100644
index 5d4c1bc..0000000
--- a/svtools/source/control/fixedhyper.cxx
+++ /dev/null
@@ -1,133 +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/fixedhyper.hxx>
-
-//.........................................................................
-namespace svt
-{
-//.........................................................................
-
-// class FixedHyperlink --------------------------------------------------
-
-FixedHyperlink::FixedHyperlink( Window* pParent, const ResId& rResId ) :
-    ::toolkit::FixedHyperlinkBase( pParent, rResId ),
-    m_nTextLen(0)
-{
-    Initialize();
-}
-
-FixedHyperlink::FixedHyperlink( Window* pParent, WinBits nWinStyle  ) :
-    ::toolkit::FixedHyperlinkBase( pParent, nWinStyle ),
-    m_nTextLen(0)
-{
-    Initialize();
-}
-
-FixedHyperlink::~FixedHyperlink()
-{
-}
-
-void FixedHyperlink::Initialize()
-{
-    // saves the old pointer
-    m_aOldPointer = GetPointer();
-    // changes the font
-    Font aFont = GetControlFont( );
-    // to underline
-    aFont.SetUnderline( UNDERLINE_SINGLE );
-    SetControlFont( aFont );
-    // changes the color to light blue
-    SetTextColor( Color( COL_LIGHTBLUE ) );
-    // calculates text len
-    m_nTextLen = GetCtrlTextWidth( GetText() );
-}
-
-void FixedHyperlink::MouseMove( const MouseEvent& rMEvt )
-{
-    // changes the pointer if the control is enabled and the mouse is over the text.
-    if ( !rMEvt.IsLeaveWindow() && IsEnabled() && GetPointerPosPixel().X() < m_nTextLen )
-        SetPointer( POINTER_REFHAND );
-    else
-        SetPointer( m_aOldPointer );
-}
-
-void FixedHyperlink::MouseButtonUp( const MouseEvent& )
-{
-    // calls the link if the control is enabled and the mouse is over the text.
-    if ( IsEnabled() && GetPointerPosPixel().X() < m_nTextLen )
-        ImplCallEventListenersAndHandler( VCLEVENT_BUTTON_CLICK, m_aClickHdl, this );
-}
-
-void FixedHyperlink::RequestHelp( const HelpEvent& rHEvt )
-{
-    if ( IsEnabled() && GetPointerPosPixel().X() < m_nTextLen )
-        FixedText::RequestHelp( rHEvt );
-}
-
-void FixedHyperlink::GetFocus()
-{
-    SetTextColor( Color( COL_LIGHTRED ) );
-    Paint( Rectangle( Point(), GetSizePixel() ) );
-    ShowFocus( Rectangle( Point( 1, 1 ), Size( m_nTextLen + 4, GetSizePixel().Height() - 2 ) ) );
-}
-
-void FixedHyperlink::LoseFocus()
-{
-    SetTextColor( Color( COL_LIGHTBLUE ) );
-    Paint( Rectangle( Point(), GetSizePixel() ) );
-    HideFocus();
-}
-
-void FixedHyperlink::KeyInput( const KeyEvent& rKEvt )
-{
-    switch ( rKEvt.GetKeyCode().GetCode() )
-    {
-        case KEY_SPACE:
-        case KEY_RETURN:
-            m_aClickHdl.Call( this );
-            break;
-
-        default:
-            FixedText::KeyInput( rKEvt );
-    }
-}
-
-void FixedHyperlink::SetURL( const String& rNewURL )
-{
-    m_sURL = rNewURL;
-    SetQuickHelpText( m_sURL );
-}
-
-String  FixedHyperlink::GetURL() const
-{
-    return m_sURL;
-}
-
-void FixedHyperlink::SetDescription( const String& rNewDescription )
-{
-    SetText( rNewDescription );
-    m_nTextLen = GetCtrlTextWidth( GetText() );
-}
-
-//.........................................................................
-} // namespace svt
-//.........................................................................
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index cd1688c..bb05a95 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -28,12 +28,12 @@
 
 
 #include <tools/debug.hxx>
+#include <vcl/fixedhyper.hxx>
 #include <vcl/svapp.hxx>
 #include <svtools/svmedit.hxx>
 #include <unoiface.hxx>
 #include <svtools/filectrl.hxx>
 #include <svtools/roadmap.hxx>
-#include <svtools/fixedhyper.hxx>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
 #include <com/sun/star/awt/LineEndFormat.hpp>
@@ -151,7 +151,7 @@ SAL_DLLPUBLIC_EXPORT Window* CreateWindow( VCLXWindow** ppNewComp, const ::com::
     {
         if ( pParent )
         {
-            pWindow = new ::svt::FixedHyperlink( pParent, nWinBits );
+            pWindow = new FixedHyperlink( pParent, nWinBits );
             *ppNewComp = new VCLXFixedHyperlink;
         }
         else
diff --git a/toolkit/Library_tk.mk b/toolkit/Library_tk.mk
index b799478..cfd0079 100644
--- a/toolkit/Library_tk.mk
+++ b/toolkit/Library_tk.mk
@@ -114,7 +114,6 @@ $(eval $(call gb_Library_add_exception_objects,tk,\
     toolkit/source/controls/unocontrols \
     toolkit/source/helper/accessibilityclient \
     toolkit/source/helper/externallock \
-    toolkit/source/helper/fixedhyperbase \
     toolkit/source/helper/formpdfexport \
     toolkit/source/helper/imagealign \
     toolkit/source/helper/listenermultiplexer \
diff --git a/toolkit/Package_inc.mk b/toolkit/Package_inc.mk
index 2bd4246..b2e0b32 100644
--- a/toolkit/Package_inc.mk
+++ b/toolkit/Package_inc.mk
@@ -38,7 +38,6 @@ $(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/accessiblefacto
 $(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/convert.hxx,toolkit/helper/convert.hxx))
 $(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/emptyfontdescriptor.hxx,toolkit/helper/emptyfontdescriptor.hxx))
 $(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/externallock.hxx,toolkit/helper/externallock.hxx))
-$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/fixedhyperbase.hxx,toolkit/helper/fixedhyperbase.hxx))
 $(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/formpdfexport.hxx,toolkit/helper/formpdfexport.hxx))
 $(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/imagealign.hxx,toolkit/helper/imagealign.hxx))
 $(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/listenermultiplexer.hxx,toolkit/helper/listenermultiplexer.hxx))
diff --git a/toolkit/inc/toolkit/helper/fixedhyperbase.hxx b/toolkit/inc/toolkit/helper/fixedhyperbase.hxx
deleted file mode 100644
index 950d9e4..0000000
--- a/toolkit/inc/toolkit/helper/fixedhyperbase.hxx
+++ /dev/null
@@ -1,50 +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 .
- */
-
-#ifndef TOOLKIT_INC_TOOLKIT_HELPER_FIXEDHYPERBASE_HXX
-#define TOOLKIT_INC_TOOLKIT_HELPER_FIXEDHYPERBASE_HXX
-
-#include <toolkit/dllapi.h>
-
-#include <vcl/fixed.hxx>
-
-//........................................................................
-namespace toolkit
-{
-//........................................................................
-
-    class TOOLKIT_DLLPUBLIC FixedHyperlinkBase : public FixedText
-    {
-    public:
-        FixedHyperlinkBase( Window* pParent, const ResId& rId );
-        FixedHyperlinkBase( Window* pParent, WinBits nWinStyle );
-        virtual ~FixedHyperlinkBase();
-
-        virtual void    SetURL( const String& rNewURL );
-        virtual String  GetURL() const;
-        virtual void    SetDescription( const String& rNewDescription );
-    };
-
-//........................................................................
-} // namespace toolkit
-//........................................................................
-
-#endif // TOOLKIT_INC_TOOLKIT_HELPER_FIXEDHYPERBASE_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 434ae8b..4177481 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -28,7 +28,6 @@
 #include <toolkit/helper/convert.hxx>
 #include <toolkit/helper/imagealign.hxx>
 #include <toolkit/helper/accessibilityclient.hxx>
-#include <toolkit/helper/fixedhyperbase.hxx>
 #include <toolkit/helper/tkresmgr.hxx>
 #include <cppuhelper/typeprovider.hxx>
 #include <com/sun/star/awt/VisualEffect.hpp>
@@ -46,6 +45,7 @@
 #include <vcl/lstbox.hxx>
 #include <vcl/combobox.hxx>
 #include <vcl/field.hxx>
+#include <vcl/fixedhyper.hxx>
 #include <vcl/longcurr.hxx>
 #include <vcl/imgctrl.hxx>
 #include <vcl/dialog.hxx>
@@ -2919,7 +2919,7 @@ void VCLXFixedHyperlink::ProcessWindowEvent( const VclWindowEvent& rVclWindowEve
             {
                 // open the URL
                 ::rtl::OUString sURL;
-                ::toolkit::FixedHyperlinkBase* pBase = (::toolkit::FixedHyperlinkBase*)GetWindow();
+                FixedHyperlink* pBase = (FixedHyperlink*)GetWindow();
                 if ( pBase )
                     sURL = pBase->GetURL();
                 Reference< ::com::sun::star::system::XSystemShellExecute > xSystemShellExecute( ::com::sun::star::system::SystemShellExecute::create(
@@ -2954,7 +2954,7 @@ void VCLXFixedHyperlink::setText( const ::rtl::OUString& Text ) throw(::com::sun
 {
     SolarMutexGuard aGuard;
 
-    ::toolkit::FixedHyperlinkBase* pBase = (::toolkit::FixedHyperlinkBase*)GetWindow();
+    FixedHyperlink* pBase = (FixedHyperlink*)GetWindow();
     if ( pBase )
         pBase->SetDescription( Text );
 }
@@ -2974,7 +2974,7 @@ void VCLXFixedHyperlink::setURL( const ::rtl::OUString& URL ) throw(::com::sun::
 {
     SolarMutexGuard aGuard;
 
-    ::toolkit::FixedHyperlinkBase* pBase = (::toolkit::FixedHyperlinkBase*)GetWindow();
+    FixedHyperlink* pBase = (FixedHyperlink*)GetWindow();
     if ( pBase )
         pBase->SetURL( URL );
 }
@@ -2984,7 +2984,7 @@ void VCLXFixedHyperlink::setURL( const ::rtl::OUString& URL ) throw(::com::sun::
     SolarMutexGuard aGuard;
 
     ::rtl::OUString aText;
-    ::toolkit::FixedHyperlinkBase* pBase = (::toolkit::FixedHyperlinkBase*)GetWindow();
+    FixedHyperlink* pBase = (FixedHyperlink*)GetWindow();
     if ( pBase )
         aText = pBase->GetURL();
     return aText;
@@ -3074,7 +3074,7 @@ void VCLXFixedHyperlink::setProperty( const ::rtl::OUString& PropertyName, const
 {
     SolarMutexGuard aGuard;
 
-    ::toolkit::FixedHyperlinkBase* pBase = (::toolkit::FixedHyperlinkBase*)GetWindow();
+    FixedHyperlink* pBase = (FixedHyperlink*)GetWindow();
     if ( pBase )
     {
         sal_uInt16 nPropType = GetPropertyId( PropertyName );
@@ -3109,7 +3109,7 @@ void VCLXFixedHyperlink::setProperty( const ::rtl::OUString& PropertyName, const
     SolarMutexGuard aGuard;
 
     ::com::sun::star::uno::Any aProp;
-    ::toolkit::FixedHyperlinkBase* pBase = (::toolkit::FixedHyperlinkBase*)GetWindow();
+    FixedHyperlink* pBase = (FixedHyperlink*)GetWindow();
     if ( pBase )
     {
         sal_uInt16 nPropType = GetPropertyId( PropertyName );
diff --git a/toolkit/source/helper/fixedhyperbase.cxx b/toolkit/source/helper/fixedhyperbase.cxx
deleted file mode 100644
index 91a03a3..0000000
--- a/toolkit/source/helper/fixedhyperbase.cxx
+++ /dev/null
@@ -1,63 +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 <toolkit/helper/fixedhyperbase.hxx>
-
-//........................................................................
-namespace toolkit
-{
-//........................................................................
-
-//  ----------------------------------------------------
-//  class FixedHyperlinkBase
-//  ----------------------------------------------------
-
-FixedHyperlinkBase::FixedHyperlinkBase( Window* pParent, const ResId& rId ) :
-    FixedText( pParent, rId )
-{
-}
-
-FixedHyperlinkBase::FixedHyperlinkBase( Window* pParent, WinBits nWinStyle ) :
-    FixedText( pParent, nWinStyle )
-{
-}
-
-FixedHyperlinkBase::~FixedHyperlinkBase()
-{
-}
-
-void FixedHyperlinkBase::SetURL( const String& )
-{
-}
-
-String FixedHyperlinkBase::GetURL() const
-{
-    return String::EmptyString();
-}
-
-void FixedHyperlinkBase::SetDescription( const String& )
-{
-}
-
-//........................................................................
-} // namespace toolkit
-//........................................................................
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index efb39b8..212eb8e 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -131,6 +131,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
     vcl/source/control/field2 \
     vcl/source/control/field \
     vcl/source/control/fixed \
+    vcl/source/control/fixedhyper \
     vcl/source/control/group \
     vcl/source/control/ilstbox \
     vcl/source/control/imgctrl \
diff --git a/vcl/Package_inc.mk b/vcl/Package_inc.mk
index dfdc585..a079a7a 100644
--- a/vcl/Package_inc.mk
+++ b/vcl/Package_inc.mk
@@ -52,6 +52,7 @@ $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/evntpost.hxx,vcl/evntpost.hxx)
 $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/extoutdevdata.hxx,vcl/extoutdevdata.hxx))
 $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/field.hxx,vcl/field.hxx))
 $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/fixed.hxx,vcl/fixed.hxx))
+$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/fixedhyper.hxx,vcl/fixedhyper.hxx))
 $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/floatwin.hxx,vcl/floatwin.hxx))
 $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/fntstyle.hxx,vcl/fntstyle.hxx))
 $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/font.hxx,vcl/font.hxx))
diff --git a/vcl/inc/vcl/fixedhyper.hxx b/vcl/inc/vcl/fixedhyper.hxx
new file mode 100644
index 0000000..2f53ba2
--- /dev/null
+++ b/vcl/inc/vcl/fixedhyper.hxx
@@ -0,0 +1,127 @@
+/* -*- 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 .
+ */
+
+#ifndef VCL_FIXEDHYPER_HXX
+#define VCL_FIXEDHYPER_HXX
+
+#include <vcl/dllapi.h>
+#include <vcl/fixed.hxx>
+
+    //=====================================================================
+    //= FixedHyperlink
+    //=====================================================================
+    class VCL_DLLPUBLIC FixedHyperlink : public FixedText
+    {
+    private:
+        long                m_nTextLen;
+        Pointer             m_aOldPointer;
+        Link                m_aClickHdl;
+        OUString            m_sURL;
+
+        /** initializes the font (link color and underline).
+
+            Called by the Ctors.
+        */
+        void                Initialize();
+
+    protected:
+        /** overwrites Window::MouseMove().
+
+            Changes the pointer only over the text.
+        */
+        virtual void        MouseMove( const MouseEvent& rMEvt );
+
+        /** overwrites Window::MouseButtonUp().
+
+            Calls the set link if the mouse is over the text.
+        */
+        virtual void        MouseButtonUp( const MouseEvent& rMEvt );
+
+        /** overwrites Window::RequestHelp().
+
+            Shows tooltip only if the mouse is over the text.
+        */
+        virtual void        RequestHelp( const HelpEvent& rHEvt );
+
+    public:
+        /** ctors
+
+            With ResId or WinBits.
+        */
+        FixedHyperlink( Window* pParent, const ResId& rId );
+        FixedHyperlink( Window* pParent, WinBits nWinStyle = 0 );
+
+        /** dtor
+
+        */
+        virtual ~FixedHyperlink();
+
+        /** overwrites Window::GetFocus().
+
+            Changes the color of the text and shows a focus rectangle.
+        */
+        virtual void        GetFocus();
+
+        /** overwrites Window::LoseFocus().
+
+            Changes the color of the text and hides the focus rectangle.
+        */
+        virtual void        LoseFocus();
+
+        /** overwrites Window::KeyInput().
+
+            KEY_RETURN and KEY_SPACE calls the link handler.
+        */
+        virtual void        KeyInput( const KeyEvent& rKEvt );
+
+        virtual bool        set_property(const OString &rKey, const OString &rValue);
+
+
+        /** sets <member>m_aClickHdl</member> with <arg>rLink</arg>.
+
+            <member>m_aClickHdl</member> is called if the text is clicked.
+        */
+        inline void         SetClickHdl( const Link& rLink ) { m_aClickHdl = rLink; }
+
+        /** returns <member>m_aClickHdl</member>.
+
+            @return
+                <member>m_aClickHdl</member>
+        */
+        inline const Link&  GetClickHdl() const { return m_aClickHdl; }
+
+        // ::FixedHyperbaseLink
+
+        /** sets the URL of the hyperlink and uses it as tooltip. */
+        void        SetURL(const OUString& rNewURL);
+
+        /** returns the URL of the hyperlink.
+
+            @return
+                <member>m_sURL</member>
+        */
+        OUString    GetURL() const;
+
+        /** sets new text and recalculates the text length. */
+        void        SetDescription(const OUString& rNewDescription);
+    };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx
new file mode 100644
index 0000000..18de8a6
--- /dev/null
+++ b/vcl/source/control/fixedhyper.cxx
@@ -0,0 +1,133 @@
+/* -*- 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 <vcl/fixedhyper.hxx>
+
+// class FixedHyperlink --------------------------------------------------
+
+FixedHyperlink::FixedHyperlink(Window* pParent, const ResId& rResId)
+    : FixedText(pParent, rResId)
+    , m_nTextLen(0)
+{
+    Initialize();
+}
+
+FixedHyperlink::FixedHyperlink(Window* pParent, WinBits nWinStyle)
+    : FixedText(pParent, nWinStyle)
+    , m_nTextLen(0)
+{
+    Initialize();
+}
+
+FixedHyperlink::~FixedHyperlink()
+{
+}
+
+void FixedHyperlink::Initialize()
+{
+    // saves the old pointer
+    m_aOldPointer = GetPointer();
+    // changes the font
+    Font aFont = GetControlFont( );
+    // to underline
+    aFont.SetUnderline( UNDERLINE_SINGLE );
+    SetControlFont( aFont );
+    // changes the color to light blue
+    SetTextColor( Color( COL_LIGHTBLUE ) );
+    // calculates text len
+    m_nTextLen = GetCtrlTextWidth( GetText() );
+}
+
+void FixedHyperlink::MouseMove( const MouseEvent& rMEvt )
+{
+    // changes the pointer if the control is enabled and the mouse is over the text.
+    if ( !rMEvt.IsLeaveWindow() && IsEnabled() && GetPointerPosPixel().X() < m_nTextLen )
+        SetPointer( POINTER_REFHAND );
+    else
+        SetPointer( m_aOldPointer );
+}
+
+void FixedHyperlink::MouseButtonUp( const MouseEvent& )
+{
+    // calls the link if the control is enabled and the mouse is over the text.
+    if ( IsEnabled() && GetPointerPosPixel().X() < m_nTextLen )
+        ImplCallEventListenersAndHandler( VCLEVENT_BUTTON_CLICK, m_aClickHdl, this );
+}
+
+void FixedHyperlink::RequestHelp( const HelpEvent& rHEvt )
+{
+    if ( IsEnabled() && GetPointerPosPixel().X() < m_nTextLen )
+        FixedText::RequestHelp( rHEvt );
+}
+
+void FixedHyperlink::GetFocus()
+{
+    SetTextColor( Color( COL_LIGHTRED ) );
+    Paint( Rectangle( Point(), GetSizePixel() ) );
+    ShowFocus( Rectangle( Point( 1, 1 ), Size( m_nTextLen + 4, GetSizePixel().Height() - 2 ) ) );
+}
+
+void FixedHyperlink::LoseFocus()
+{
+    SetTextColor( Color( COL_LIGHTBLUE ) );
+    Paint( Rectangle( Point(), GetSizePixel() ) );
+    HideFocus();
+}
+
+void FixedHyperlink::KeyInput( const KeyEvent& rKEvt )
+{
+    switch ( rKEvt.GetKeyCode().GetCode() )
+    {
+        case KEY_SPACE:
+        case KEY_RETURN:
+            m_aClickHdl.Call( this );
+            break;
+
+        default:
+            FixedText::KeyInput( rKEvt );
+    }
+}
+
+void FixedHyperlink::SetURL( const OUString& rNewURL )
+{
+    m_sURL = rNewURL;
+    SetQuickHelpText( m_sURL );
+}
+
+OUString FixedHyperlink::GetURL() const
+{
+    return m_sURL;
+}
+
+void FixedHyperlink::SetDescription(const OUString& rNewDescription)
+{
+    SetText(rNewDescription);
+    m_nTextLen = GetCtrlTextWidth(GetText());
+}
+
+bool FixedHyperlink::set_property(const OString &rKey, const OString &rValue)
+{
+    if (rKey == "uri")
+        SetURL(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
+    else
+        return FixedText::set_property(rKey, rValue);
+    return true;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index ffe728f..55c9ecb 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -16,6 +16,7 @@
 #include <vcl/edit.hxx>
 #include <vcl/field.hxx>
 #include <vcl/fixed.hxx>
+#include <vcl/fixedhyper.hxx>
 #include <vcl/layout.hxx>
 #include <vcl/lstbox.hxx>
 #include <vcl/menubtn.hxx>
@@ -702,6 +703,8 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
             pWindow = pField;
         }
     }
+    else if (name == "GtkLinkButton")
+        pWindow = new FixedHyperlink(pParent);
     else if (name == "GtkComboBox")
     {
         extractModel(id, rMap);


More information about the Libreoffice-commits mailing list