summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-11-10 23:22:47 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-11-12 12:01:39 +0000
commit040e022d06ecadc36d3ef5c52178095a4d2c828a (patch)
treed60733f77650b251276b3313ad802d7c007d1f36
parentbfd8721577f0b26e890ab1528e2a71ad4889cb70 (diff)
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
-rw-r--r--cui/source/dialogs/SpellDialog.cxx4
-rw-r--r--cui/source/inc/SpellDialog.hxx10
-rw-r--r--cui/source/inc/about.hxx1
-rw-r--r--cui/source/inc/optlingu.hxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.hxx8
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.hxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.hxx14
-rw-r--r--sd/source/ui/dlg/RemoteDialogClientBox.hxx1
-rw-r--r--sfx2/source/dialog/basedlgs.cxx1
-rw-r--r--svtools/Library_svt.mk1
-rw-r--r--svtools/Package_inc.mk1
-rw-r--r--svtools/inc/svtools/templdlg.hxx4
-rw-r--r--svtools/source/uno/unoiface.cxx4
-rw-r--r--toolkit/Library_tk.mk1
-rw-r--r--toolkit/Package_inc.mk1
-rw-r--r--toolkit/inc/toolkit/helper/fixedhyperbase.hxx50
-rw-r--r--toolkit/source/awt/vclxwindows.cxx14
-rw-r--r--toolkit/source/helper/fixedhyperbase.cxx63
-rw-r--r--vcl/Library_vcl.mk1
-rw-r--r--vcl/Package_inc.mk1
-rw-r--r--vcl/inc/vcl/fixedhyper.hxx (renamed from svtools/inc/svtools/fixedhyper.hxx)32
-rw-r--r--vcl/source/control/fixedhyper.cxx (renamed from svtools/source/control/fixedhyper.cxx)40
-rw-r--r--vcl/source/window/builder.cxx3
26 files changed, 78 insertions, 199 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 54f94cfdfc64..b5ba38030d2e 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 b2a9f94b17d7..4161407588fa 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 28e2fa5e6d2a..4f824e314f84 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 75e4b1214063..b870f618f17e 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 cb80e01ea78a..b7d924a9b5f7 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 0aecee3d6a51..542e04082545 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 29511d247515..4163dc53474f 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 0a6eca204c86..2ca3da7bb94c 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 129663a28dec..c9b5c4ff2042 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 ea1cc8d56201..d267e9d16014 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 c9d272e3ecc9..fba0296cd23e 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 c784ab8a7f4c..e438d7eb6792 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 21988dd45027..4916808e748c 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 ecd6fb589262..3aeb5d36d2f7 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/templdlg.hxx b/svtools/inc/svtools/templdlg.hxx
index f2595150fdc3..ba195a579b8d 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/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index cd1688c392dc..bb05a95e5a89 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 b7994783559d..cfd0079c2978 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 2bd4246d9d58..b2e0b326bbea 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 950d9e4ab214..000000000000
--- 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 434ae8b61736..41774812a48e 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 91a03a3249a8..000000000000
--- 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 efb39b8e6473..212eb8e07c94 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 dfdc585c35cb..a079a7a20088 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/svtools/inc/svtools/fixedhyper.hxx b/vcl/inc/vcl/fixedhyper.hxx
index 07c5e54848e1..2f53ba2e34cf 100644
--- a/svtools/inc/svtools/fixedhyper.hxx
+++ b/vcl/inc/vcl/fixedhyper.hxx
@@ -17,28 +17,22 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef SVTOOLS_FIXEDHYPER_HXX
-#define SVTOOLS_FIXEDHYPER_HXX
+#ifndef VCL_FIXEDHYPER_HXX
+#define VCL_FIXEDHYPER_HXX
-#include "svtools/svtdllapi.h"
-
-#include <toolkit/helper/fixedhyperbase.hxx>
-
-//.........................................................................
-namespace svt
-{
-//.........................................................................
+#include <vcl/dllapi.h>
+#include <vcl/fixed.hxx>
//=====================================================================
//= FixedHyperlink
//=====================================================================
- class SVT_DLLPUBLIC FixedHyperlink : public ::toolkit::FixedHyperlinkBase
+ class VCL_DLLPUBLIC FixedHyperlink : public FixedText
{
private:
long m_nTextLen;
Pointer m_aOldPointer;
Link m_aClickHdl;
- String m_sURL;
+ OUString m_sURL;
/** initializes the font (link color and underline).
@@ -96,6 +90,9 @@ namespace svt
*/
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.
@@ -109,24 +106,21 @@ namespace svt
*/
inline const Link& GetClickHdl() const { return m_aClickHdl; }
- // ::toolkit::FixedHyperbaseLink
+ // ::FixedHyperbaseLink
/** sets the URL of the hyperlink and uses it as tooltip. */
- virtual void SetURL( const String& rNewURL );
+ void SetURL(const OUString& rNewURL);
/** returns the URL of the hyperlink.
@return
<member>m_sURL</member>
*/
- virtual String GetURL() const;
+ OUString GetURL() const;
/** sets new text and recalculates the text length. */
- virtual void SetDescription( const String& rNewDescription );
+ void SetDescription(const OUString& rNewDescription);
};
-//.........................................................................
-} // namespace svt
-//.........................................................................
#endif
diff --git a/svtools/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx
index 5d4c1bc77509..18de8a6fb41d 100644
--- a/svtools/source/control/fixedhyper.cxx
+++ b/vcl/source/control/fixedhyper.cxx
@@ -17,25 +17,20 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <svtools/fixedhyper.hxx>
-
-//.........................................................................
-namespace svt
-{
-//.........................................................................
+#include <vcl/fixedhyper.hxx>
// class FixedHyperlink --------------------------------------------------
-FixedHyperlink::FixedHyperlink( Window* pParent, const ResId& rResId ) :
- ::toolkit::FixedHyperlinkBase( pParent, rResId ),
- m_nTextLen(0)
+FixedHyperlink::FixedHyperlink(Window* pParent, const ResId& rResId)
+ : FixedText(pParent, rResId)
+ , m_nTextLen(0)
{
Initialize();
}
-FixedHyperlink::FixedHyperlink( Window* pParent, WinBits nWinStyle ) :
- ::toolkit::FixedHyperlinkBase( pParent, nWinStyle ),
- m_nTextLen(0)
+FixedHyperlink::FixedHyperlink(Window* pParent, WinBits nWinStyle)
+ : FixedText(pParent, nWinStyle)
+ , m_nTextLen(0)
{
Initialize();
}
@@ -109,25 +104,30 @@ void FixedHyperlink::KeyInput( const KeyEvent& rKEvt )
}
}
-void FixedHyperlink::SetURL( const String& rNewURL )
+void FixedHyperlink::SetURL( const OUString& rNewURL )
{
m_sURL = rNewURL;
SetQuickHelpText( m_sURL );
}
-String FixedHyperlink::GetURL() const
+OUString FixedHyperlink::GetURL() const
{
return m_sURL;
}
-void FixedHyperlink::SetDescription( const String& rNewDescription )
+void FixedHyperlink::SetDescription(const OUString& rNewDescription)
{
- SetText( rNewDescription );
- m_nTextLen = GetCtrlTextWidth( GetText() );
+ SetText(rNewDescription);
+ m_nTextLen = GetCtrlTextWidth(GetText());
}
-//.........................................................................
-} // namespace svt
-//.........................................................................
+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 ffe728f2af34..55c9ecbf661c 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);