[Libreoffice-commits] core.git: Branch 'feature/chained-text-boxes' - 76 commits - chart2/source chart2/uiconfig comphelper/source dbaccess/source desktop/qa desktop/README.vars desktop/source editeng/source extensions/source framework/inc framework/source include/comphelper include/dbaccess include/editeng include/LibreOfficeKit include/sfx2 include/svx include/toolkit include/vcl libreofficekit/qa libreofficekit/source reportdesign/source sc/inc sc/qa sc/source sd/inc sd/source sfx2/Library_sfx.mk sfx2/source slideshow/inc slideshow/source svtools/source svx/source sw/inc sw/qa sw/source toolkit/source tools/source vcl/inc vcl/osx vcl/source vcl/unx xmloff/source
Stephan Bergmann
sbergman at redhat.com
Thu Sep 24 02:42:46 PDT 2015
chart2/source/controller/sidebar/ChartElementsPanel.cxx | 73 -
chart2/source/controller/sidebar/ChartElementsPanel.hxx | 17
chart2/uiconfig/ui/sidebarelements.ui | 66 -
comphelper/source/misc/lok.cxx | 12
dbaccess/source/ui/misc/ToolBoxHelper.cxx | 8
desktop/README.vars | 16
desktop/qa/desktop_lib/test_desktop_lib.cxx | 32
desktop/source/lib/init.cxx | 72 +
desktop/source/splash/splash.cxx | 9
editeng/source/editeng/impedit3.cxx | 4
editeng/source/outliner/overflowingtxt.cxx | 10
extensions/source/bibliography/toolbar.cxx | 4
extensions/source/bibliography/toolbar.hxx | 2
extensions/source/update/ui/updatecheckui.cxx | 11
framework/inc/services/layoutmanager.hxx | 2
framework/source/helper/statusindicator.cxx | 2
framework/source/layoutmanager/layoutmanager.cxx | 23
include/LibreOfficeKit/LibreOfficeKit.h | 19
include/LibreOfficeKit/LibreOfficeKit.hxx | 50
include/LibreOfficeKit/LibreOfficeKitGtk.h | 2
include/comphelper/lok.hxx | 5
include/dbaccess/ToolBoxHelper.hxx | 4
include/editeng/overflowingtxt.hxx | 4
include/sfx2/lokhelper.hxx | 34
include/sfx2/sidebar/FocusManager.hxx | 2
include/sfx2/viewsh.hxx | 7
include/svx/svdmodel.hxx | 2
include/svx/textchain.hxx | 1
include/svx/textchainflow.hxx | 1
include/toolkit/awt/vclxaccessiblecomponent.hxx | 2
include/vcl/ITiledRenderable.hxx | 2
include/vcl/svapp.hxx | 4
include/vcl/tabctrl.hxx | 2
include/vcl/window.hxx | 4
libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx | 537 ++++++----
libreofficekit/source/gtk/lokdocview.cxx | 131 +-
reportdesign/source/ui/inc/ReportControllerObserver.hxx | 2
reportdesign/source/ui/report/ReportControllerObserver.cxx | 11
sc/inc/document.hxx | 10
sc/inc/global.hxx | 17
sc/inc/hints.hxx | 12
sc/inc/scmod.hxx | 44
sc/inc/table.hxx | 20
sc/qa/perf/scperfobj.cxx | 81 +
sc/qa/perf/testdocuments/scMathFunctions.ods |binary
sc/source/core/data/documen3.cxx | 8
sc/source/core/data/table1.cxx | 4
sc/source/core/tool/calcconfig.cxx | 6
sc/source/core/tool/hints.cxx | 8
sc/source/core/tool/interpr1.cxx | 2
sc/source/filter/excel/xelink.cxx | 2
sc/source/filter/xml/XMLTableSourceContext.cxx | 6
sc/source/ui/Accessibility/AccessibleDocument.cxx | 36
sc/source/ui/app/inputhdl.cxx | 14
sc/source/ui/app/scmod.cxx | 4
sc/source/ui/docshell/tablink.cxx | 12
sc/source/ui/inc/AccessibleDocument.hxx | 2
sc/source/ui/inc/inputhdl.hxx | 2
sc/source/ui/inc/undotab.hxx | 2
sc/source/ui/inc/viewdata.hxx | 23
sc/source/ui/undo/undotab.cxx | 8
sc/source/ui/unoobj/cellsuno.cxx | 14
sc/source/ui/unoobj/linkuno.cxx | 6
sc/source/ui/view/gridwin.cxx | 8
sc/source/ui/view/select.cxx | 14
sc/source/ui/view/tabview4.cxx | 2
sc/source/ui/view/tabvwsh4.cxx | 8
sc/source/ui/view/viewdata.cxx | 10
sc/source/ui/view/viewfun2.cxx | 2
sd/inc/sdmod.hxx | 2
sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx | 23
sd/source/ui/app/sdmod1.cxx | 7
sd/source/ui/inc/AccessibleDocumentViewBase.hxx | 4
sd/source/ui/inc/OutlineView.hxx | 2
sd/source/ui/slideshow/slideshowimpl.cxx | 10
sd/source/ui/slideshow/slideshowimpl.hxx | 2
sd/source/ui/slidesorter/controller/SlideSorterController.cxx | 6
sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx | 2
sd/source/ui/view/outlview.cxx | 3
sfx2/Library_sfx.mk | 1
sfx2/source/sidebar/FocusManager.cxx | 21
sfx2/source/toolbox/imgmgr.cxx | 40
sfx2/source/view/lokhelper.cxx | 83 +
sfx2/source/view/viewimp.hxx | 3
sfx2/source/view/viewsh.cxx | 14
slideshow/inc/pch/precompiled_slideshow.hxx | 1
slideshow/source/engine/effectrewinder.hxx | 3
slideshow/source/engine/shapes/shapeimporter.cxx | 4
slideshow/source/engine/shapes/viewmediashape.hxx | 1
slideshow/source/engine/smilfunctionparser.cxx | 19
slideshow/source/engine/sp_debug.cxx | 9
slideshow/source/inc/eventmultiplexer.hxx | 4
slideshow/source/inc/screenupdater.hxx | 4
svtools/source/config/colorcfg.cxx | 15
svtools/source/config/extcolorcfg.cxx | 15
svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx | 2
svx/source/sidebar/insert/InsertPropertyPanel.cxx | 33
svx/source/sidebar/insert/InsertPropertyPanel.hxx | 2
svx/source/sidebar/line/LinePropertyPanelBase.cxx | 2
svx/source/svdraw/svdotext.cxx | 12
svx/source/svdraw/svdotextdecomposition.cxx | 4
svx/source/svdraw/textchain.cxx | 14
svx/source/svdraw/textchainflow.cxx | 8
sw/inc/crsrsh.hxx | 2
sw/inc/view.hxx | 2
sw/inc/viewsh.hxx | 3
sw/qa/extras/ooxmlexport/data/tdf92521.odt |binary
sw/qa/extras/ooxmlexport/ooxmlexport4.cxx | 7
sw/qa/extras/tiledrendering/tiledrendering.cxx | 4
sw/source/core/access/accdoc.cxx | 50
sw/source/core/access/accdoc.hxx | 2
sw/source/core/crsr/crsrsh.cxx | 34
sw/source/core/crsr/viscrs.cxx | 34
sw/source/core/doc/DocumentStylePoolManager.cxx | 9
sw/source/core/doc/docnum.cxx | 1
sw/source/core/text/xmldump.cxx | 10
sw/source/core/view/viewsh.cxx | 6
sw/source/filter/ww8/attributeoutputbase.hxx | 2
sw/source/filter/ww8/docxattributeoutput.cxx | 31
sw/source/filter/ww8/docxattributeoutput.hxx | 2
sw/source/filter/ww8/docxexport.cxx | 3
sw/source/filter/ww8/rtfattributeoutput.cxx | 47
sw/source/filter/ww8/rtfattributeoutput.hxx | 2
sw/source/filter/ww8/ww8attributeoutput.hxx | 2
sw/source/uibase/docvw/edtwin.cxx | 10
sw/source/uibase/uiview/viewmdi.cxx | 41
toolkit/source/awt/vclxaccessiblecomponent.cxx | 12
toolkit/source/awt/vclxtoolkit.cxx | 27
tools/source/zcodec/zcodec.cxx | 4
vcl/inc/osx/a11yfocustracker.hxx | 4
vcl/inc/vcleventlisteners.hxx | 8
vcl/inc/window.h | 2
vcl/osx/a11yfocustracker.cxx | 24
vcl/source/app/svapp.cxx | 8
vcl/source/app/vclevent.cxx | 24
vcl/source/control/tabctrl.cxx | 10
vcl/source/window/event.cxx | 29
vcl/unx/gtk/a11y/atkutil.cxx | 24
xmloff/source/draw/ximpshap.cxx | 2
139 files changed, 1519 insertions(+), 914 deletions(-)
New commits:
commit 4c657f5a1a340ec9afe795d911625991f6a9cf7a
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Sep 21 12:05:25 2015 +0200
Properly #if these debug hooks
...moved here with 6fbab2ce87372bd98275d8239cd782d0ca6375e8 "loplugin:unreffun";
this file still indirectly includes boost/scoped_ptr.hpp via. boost/spirit
Change-Id: Ib2f251420950395f58415c1f7c944b7e8fd61476
diff --git a/slideshow/source/engine/smilfunctionparser.cxx b/slideshow/source/engine/smilfunctionparser.cxx
index 3cc64da..2dd955f 100644
--- a/slideshow/source/engine/smilfunctionparser.cxx
+++ b/slideshow/source/engine/smilfunctionparser.cxx
@@ -626,6 +626,8 @@ namespace slideshow
}
}
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+
// debug hooks
namespace boost
@@ -641,4 +643,6 @@ void sp_scalar_destructor_hook(void *)
}
+#endif
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit d66d6d70591049ccf99f22d3f52e85f26dbfe433
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 21 09:43:05 2015 +0100
valgrind: use of uninit data in sw_globalfilter test
Change-Id: I4d327d1e65c8ef5b9dede18ac55f1658d8e3569a
diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx
index e0d6a88..c8a8dc2 100644
--- a/tools/source/zcodec/zcodec.cxx
+++ b/tools/source/zcodec/zcodec.cxx
@@ -82,7 +82,7 @@ long ZCodec::EndCompression()
{
long retvalue = 0;
- if (meState != STATE_INIT)
+ if (mbStatus && meState != STATE_INIT)
{
if (meState == STATE_COMPRESS)
{
@@ -106,7 +106,7 @@ long ZCodec::EndCompression()
delete[] mpInBuf;
meState = STATE_INIT;
}
- return ( mbStatus ) ? retvalue : -1;
+ return mbStatus ? retvalue : -1;
}
long ZCodec::Compress( SvStream& rIStm, SvStream& rOStm )
commit 6fbab2ce87372bd98275d8239cd782d0ca6375e8
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Sep 21 10:31:14 2015 +0200
loplugin:unreffun
Change-Id: I526b9e1cff25a30c3f6b935c1a11ef571f7a12ea
diff --git a/slideshow/source/engine/smilfunctionparser.cxx b/slideshow/source/engine/smilfunctionparser.cxx
index 7ded14f..3cc64da 100644
--- a/slideshow/source/engine/smilfunctionparser.cxx
+++ b/slideshow/source/engine/smilfunctionparser.cxx
@@ -626,4 +626,19 @@ namespace slideshow
}
}
+// debug hooks
+
+namespace boost
+{
+
+void sp_scalar_constructor_hook(void *)
+{
+}
+
+void sp_scalar_destructor_hook(void *)
+{
+}
+
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/slideshow/source/engine/sp_debug.cxx b/slideshow/source/engine/sp_debug.cxx
index 0a68607..38d507a 100644
--- a/slideshow/source/engine/sp_debug.cxx
+++ b/slideshow/source/engine/sp_debug.cxx
@@ -198,10 +198,6 @@ std::size_t find_unreachable_objects(bool report)
namespace boost
{
-void sp_scalar_constructor_hook(void *)
-{
-}
-
void sp_scalar_constructor_hook(void * px, std::size_t size, void * pn)
{
#ifdef BOOST_HAS_THREADS
@@ -213,10 +209,6 @@ void sp_scalar_constructor_hook(void * px, std::size_t size, void * pn)
get_map()[pn] = std::make_pair(px, size);
}
-void sp_scalar_destructor_hook(void *)
-{
-}
-
void sp_scalar_destructor_hook(void *, std::size_t, void * pn)
{
#ifdef BOOST_HAS_THREADS
commit 6afa5614463fbc952d5a983c813d587edbc82fac
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date: Mon Sep 21 08:46:01 2015 +0200
Cleanup: Remove superfluous comment
No need to mention that there has been a check for some state sometime.
Change-Id: I844478350ae1209ae64766d28d8e254b7a4d9e10
Reviewed-on: https://gerrit.libreoffice.org/18739
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index 3fd845b..3a7567b 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -204,15 +204,10 @@ namespace
pColl->SetFormatAttr( aLR );
}
- // #i71764#
- // Check on document setting OUTLINE_LEVEL_YIELDS_OUTLINE_RULE no longer needed.
// All paragraph styles, which are assigned to a level of the
// outline style has to have the outline style set as its list style.
- {
- SwNumRuleItem aItem(pOutlineRule->GetName());
-
- pColl->SetFormatAttr(aItem);
- }
+ SwNumRuleItem aItem(pOutlineRule->GetName());
+ pColl->SetFormatAttr(aItem);
}
}
pColl->SetNextTextFormatColl( *pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool(
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 787558f..ea9c695 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -158,7 +158,6 @@ void SwDoc::PropagateOutlineRule()
// Check only the list style, which is set at the paragraph style
const SwNumRuleItem & rCollRuleItem = pColl->GetNumRule( false );
- // Check on document setting OUTLINE_LEVEL_YIELDS_OUTLINE_RULE no longer needed.
if ( rCollRuleItem.GetValue().isEmpty() )
{
SwNumRule * pMyOutlineRule = GetOutlineNumRule();
commit 921686a827e663199c040f376249de727613751f
Author: Noel Grandin <noelgrandin at gmail.com>
Date: Sun Sep 20 21:21:54 2015 +0200
convert SC_LINKREFTYPE to scoped enum
Change-Id: Ia894548d87390e5170d2b704eac26e34729ebe8e
Reviewed-on: https://gerrit.libreoffice.org/18736
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/sc/inc/hints.hxx b/sc/inc/hints.hxx
index cedbb00..f219973 100644
--- a/sc/inc/hints.hxx
+++ b/sc/inc/hints.hxx
@@ -81,15 +81,13 @@ public:
};
//! move ScLinkRefreshedHint to a different file?
-
-#define SC_LINKREFTYPE_NONE 0
-#define SC_LINKREFTYPE_SHEET 1
-#define SC_LINKREFTYPE_AREA 2
-#define SC_LINKREFTYPE_DDE 3
+enum class ScLinkRefType {
+ NONE, SHEET, AREA, DDE
+};
class ScLinkRefreshedHint : public SfxHint
{
- sal_uInt16 nLinkType; // SC_LINKREFTYPE_...
+ ScLinkRefType nLinkType;
OUString aUrl; // used for sheet links
OUString aDdeAppl; // used for dde links:
OUString aDdeTopic;
@@ -106,7 +104,7 @@ public:
void SetDdeLink( const OUString& rA, const OUString& rT, const OUString& rI, sal_uInt8 nM );
void SetAreaLink( const ScAddress& rPos );
- sal_uInt16 GetLinkType() const { return nLinkType; }
+ ScLinkRefType GetLinkType() const { return nLinkType; }
const OUString& GetUrl() const { return aUrl; }
const OUString& GetDdeAppl() const { return aDdeAppl; }
const OUString& GetDdeTopic() const { return aDdeTopic; }
diff --git a/sc/source/core/tool/hints.cxx b/sc/source/core/tool/hints.cxx
index 3d7a69b..3cbd133 100644
--- a/sc/source/core/tool/hints.cxx
+++ b/sc/source/core/tool/hints.cxx
@@ -57,7 +57,7 @@ ScPointerChangedHint::~ScPointerChangedHint()
// ScLinkRefreshedHint - a link has been refreshed
ScLinkRefreshedHint::ScLinkRefreshedHint() :
- nLinkType( SC_LINKREFTYPE_NONE ),
+ nLinkType( ScLinkRefType::NONE ),
nDdeMode( 0 )
{
}
@@ -68,14 +68,14 @@ ScLinkRefreshedHint::~ScLinkRefreshedHint()
void ScLinkRefreshedHint::SetSheetLink( const OUString& rSourceUrl )
{
- nLinkType = SC_LINKREFTYPE_SHEET;
+ nLinkType = ScLinkRefType::SHEET;
aUrl = rSourceUrl;
}
void ScLinkRefreshedHint::SetDdeLink(
const OUString& rA, const OUString& rT, const OUString& rI, sal_uInt8 nM )
{
- nLinkType = SC_LINKREFTYPE_DDE;
+ nLinkType = ScLinkRefType::DDE;
aDdeAppl = rA;
aDdeTopic = rT;
aDdeItem = rI;
@@ -84,7 +84,7 @@ void ScLinkRefreshedHint::SetDdeLink(
void ScLinkRefreshedHint::SetAreaLink( const ScAddress& rPos )
{
- nLinkType = SC_LINKREFTYPE_AREA;
+ nLinkType = ScLinkRefType::AREA;
aDestPos = rPos;
}
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index 693c7d9..eb2b8b9 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -102,7 +102,7 @@ void ScSheetLinkObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( dynamic_cast<const ScLinkRefreshedHint*>(&rHint) )
{
const ScLinkRefreshedHint& rLH = static_cast<const ScLinkRefreshedHint&>(rHint);
- if ( rLH.GetLinkType() == SC_LINKREFTYPE_SHEET && rLH.GetUrl() == aFileName )
+ if ( rLH.GetLinkType() == ScLinkRefType::SHEET && rLH.GetUrl() == aFileName )
Refreshed_Impl();
}
}
@@ -628,7 +628,7 @@ void ScAreaLinkObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( dynamic_cast<const ScLinkRefreshedHint*>(&rHint) )
{
const ScLinkRefreshedHint& rLH = static_cast<const ScLinkRefreshedHint&>(rHint);
- if ( rLH.GetLinkType() == SC_LINKREFTYPE_AREA )
+ if ( rLH.GetLinkType() == ScLinkRefType::AREA )
{
// get this link to compare dest position
ScAreaLink* pLink = lcl_GetAreaLink(pDocShell, nPos);
@@ -1074,7 +1074,7 @@ void ScDDELinkObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( dynamic_cast<const ScLinkRefreshedHint*>(&rHint) )
{
const ScLinkRefreshedHint& rLH = static_cast<const ScLinkRefreshedHint&>(rHint);
- if ( rLH.GetLinkType() == SC_LINKREFTYPE_DDE &&
+ if ( rLH.GetLinkType() == ScLinkRefType::DDE &&
rLH.GetDdeAppl() == aAppl &&
rLH.GetDdeTopic() == aTopic &&
rLH.GetDdeItem() == aItem ) //! mode is ignored
commit 588e1f97577b53a0131fa24c3cdfdf158b27efa7
Author: Noel Grandin <noelgrandin at gmail.com>
Date: Sun Sep 20 16:27:05 2015 +0200
convert SC_ENTER constants to scoped enum
Change-Id: Idd77e2dbbcb1d1c7238ed9b5998730f0e0a9bf50
Reviewed-on: https://gerrit.libreoffice.org/18732
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index a030e38..2af2c8d6 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -239,9 +239,9 @@ enum class ScLinkMode {
NONE, NORMAL, VALUE
};
// input
-#define SC_ENTER_NORMAL 0
-#define SC_ENTER_BLOCK 1
-#define SC_ENTER_MATRIX 2
+enum class ScEnterMode {
+ NORMAL, BLOCK, MATRIX
+};
// step = 10pt, max. indention = 100 steps
#define SC_INDENT_STEP 200
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index 482a6e6..3d70b9f 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -104,7 +104,7 @@ class ScModule: public SfxModule, public SfxListener, utl::ConfigurationListener
SvtUserOptions* pUserOptions;
SfxErrorHandler* pErrorHdl;
ScFormEditData* pFormEditData;
- sal_uInt16 nCurRefDlgId;
+ sal_uInt16 nCurRefDlgId;
bool bIsWaterCan:1;
bool bIsInEditCommand:1;
bool bIsInExecuteDrop:1;
@@ -120,8 +120,8 @@ private:
static void InitInterface_Impl();
public:
- ScModule( SfxObjectFactory* pFact );
- virtual ~ScModule();
+ ScModule( SfxObjectFactory* pFact );
+ virtual ~ScModule();
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) SAL_OVERRIDE;
@@ -168,28 +168,28 @@ public:
// Options:
const ScViewOptions& GetViewOptions ();
-SC_DLLPUBLIC const ScDocOptions& GetDocOptions ();
-SC_DLLPUBLIC const ScAppOptions& GetAppOptions ();
-SC_DLLPUBLIC const ScDefaultsOptions& GetDefaultsOptions ();
- SC_DLLPUBLIC const ScFormulaOptions& GetFormulaOptions ();
- SC_DLLPUBLIC const ScInputOptions& GetInputOptions ();
-SC_DLLPUBLIC const ScPrintOptions& GetPrintOptions ();
- void SetViewOptions ( const ScViewOptions& rOpt );
-SC_DLLPUBLIC void SetDocOptions ( const ScDocOptions& rOpt );
-SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rOpt );
- void SetDefaultsOptions ( const ScDefaultsOptions& rOpt );
- SC_DLLPUBLIC void SetFormulaOptions ( const ScFormulaOptions& rOpt );
+ SC_DLLPUBLIC const ScDocOptions& GetDocOptions ();
+ SC_DLLPUBLIC const ScAppOptions& GetAppOptions ();
+ SC_DLLPUBLIC const ScDefaultsOptions& GetDefaultsOptions ();
+ SC_DLLPUBLIC const ScFormulaOptions& GetFormulaOptions ();
+ SC_DLLPUBLIC const ScInputOptions& GetInputOptions ();
+ SC_DLLPUBLIC const ScPrintOptions& GetPrintOptions ();
+ void SetViewOptions ( const ScViewOptions& rOpt );
+ SC_DLLPUBLIC void SetDocOptions ( const ScDocOptions& rOpt );
+ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rOpt );
+ void SetDefaultsOptions ( const ScDefaultsOptions& rOpt );
+ SC_DLLPUBLIC void SetFormulaOptions ( const ScFormulaOptions& rOpt );
SC_DLLPUBLIC void SetInputOptions ( const ScInputOptions& rOpt );
- void SetPrintOptions ( const ScPrintOptions& rOpt );
- void InsertEntryToLRUList(sal_uInt16 nFIndex);
+ void SetPrintOptions ( const ScPrintOptions& rOpt );
+ void InsertEntryToLRUList(sal_uInt16 nFIndex);
static void RecentFunctionsChanged();
static void GetSpellSettings( sal_uInt16& rDefLang, sal_uInt16& rCjkLang, sal_uInt16& rCtlLang,
- bool& rAutoSpell );
+ bool& rAutoSpell );
static void SetAutoSpellProperty( bool bSet );
static bool HasThesaurusLanguage( sal_uInt16 nLang );
- sal_uInt16 GetOptDigitLanguage(); // from CTL options
+ sal_uInt16 GetOptDigitLanguage(); // from CTL options
ScNavipiCfg& GetNavipiCfg();
ScAddInCfg& GetAddInCfg();
@@ -203,9 +203,9 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO
// InputHandler:
bool IsEditMode(); // not for SC_INPUT_TYPE
bool IsInputMode(); // also for SC_INPUT_TYPE
- void SetInputMode( ScInputMode eMode, const OUString* pInitText = NULL );
+ void SetInputMode( ScInputMode eMode, const OUString* pInitText = NULL );
bool InputKeyEvent( const KeyEvent& rKEvt, bool bStartEdit = false );
- SC_DLLPUBLIC void InputEnterHandler( sal_uInt8 nBlockMode = 0 );
+ SC_DLLPUBLIC void InputEnterHandler( ScEnterMode nBlockMode = ScEnterMode::NORMAL );
void InputCancelHandler();
void InputSelection( EditView* pView );
void InputChanged( EditView* pView );
@@ -230,7 +230,7 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO
ScFormEditData* GetFormEditData() { return pFormEditData; }
// input of reference:
- SC_DLLPUBLIC void SetRefDialog( sal_uInt16 nId, bool bVis, SfxViewFrame* pViewFrm = NULL );
+ SC_DLLPUBLIC void SetRefDialog( sal_uInt16 nId, bool bVis, SfxViewFrame* pViewFrm = NULL );
bool IsModalMode(SfxObjectShell* pDocSh = NULL);
bool IsFormulaMode();
bool IsRefDialogOpen();
@@ -239,7 +239,7 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO
const ScMarkData* pMarkData = NULL );
void AddRefEntry();
void EndReference();
- sal_uInt16 GetCurRefDlgId() const { return nCurRefDlgId; }
+ sal_uInt16 GetCurRefDlgId() const { return nCurRefDlgId; }
// virtual methods for the options dialog
virtual SfxItemSet* CreateItemSet( sal_uInt16 nId ) SAL_OVERRIDE;
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 1abcbf3..7b157bf 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2409,7 +2409,7 @@ static void lcl_SelectionToEnd( EditView* pView )
}
}
-void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode )
+void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
{
// Macro calls for validity can cause a lot of problems, so inhibit
// nested calls of EnterHandler().
@@ -2419,7 +2419,7 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode )
ImplCreateEditEngine();
- bool bMatrix = ( nBlockMode == SC_ENTER_MATRIX );
+ bool bMatrix = ( nBlockMode == ScEnterMode::MATRIX );
SfxApplication* pSfxApp = SfxGetpApp();
EditTextObject* pObject = NULL;
@@ -2705,9 +2705,9 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode )
SfxBindings& rBindings = pExecuteSh->GetViewFrame()->GetBindings();
sal_uInt16 nId = FID_INPUTLINE_ENTER;
- if ( nBlockMode == SC_ENTER_BLOCK )
+ if ( nBlockMode == ScEnterMode::BLOCK )
nId = FID_INPUTLINE_BLOCK;
- else if ( nBlockMode == SC_ENTER_MATRIX )
+ else if ( nBlockMode == ScEnterMode::MATRIX )
nId = FID_INPUTLINE_MATRIX;
ScInputStatusItem aItem( FID_INPUTLINE_STATUS,
@@ -3055,11 +3055,11 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, bool bStartEdit /* = false
}
else
{
- sal_uInt8 nMode = SC_ENTER_NORMAL;
+ ScEnterMode nMode = ScEnterMode::NORMAL;
if ( bShift && bControl )
- nMode = SC_ENTER_MATRIX;
+ nMode = ScEnterMode::MATRIX;
else if ( bAlt )
- nMode = SC_ENTER_BLOCK;
+ nMode = ScEnterMode::BLOCK;
EnterHandler( nMode );
if (pActiveViewSh)
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 6a8a342..1265653 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1415,7 +1415,7 @@ bool ScModule::InputKeyEvent( const KeyEvent& rKEvt, bool bStartEdit )
return pHdl && pHdl->KeyInput( rKEvt, bStartEdit );
}
-void ScModule::InputEnterHandler( sal_uInt8 nBlockMode )
+void ScModule::InputEnterHandler( ScEnterMode nBlockMode )
{
if ( !SfxGetpApp()->IsDowning() ) // Not when quitting the program
{
@@ -1509,7 +1509,7 @@ void ScModule::ActivateInputWindow( const OUString* pStrFormula, bool bMatrix )
pWin->SetFuncString( *pStrFormula, false );
// SetSumAssignMode due to sal_False not necessary
}
- sal_uInt8 nMode = bMatrix ? SC_ENTER_MATRIX : SC_ENTER_NORMAL;
+ ScEnterMode nMode = bMatrix ? ScEnterMode::MATRIX : ScEnterMode::NORMAL;
pHdl->EnterHandler( nMode );
// Without Invalidate the selection remains active, if the formula has not changed
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index effbc4c..63f5fd2 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -180,7 +180,7 @@ public:
bool GetTextAndFields( ScEditEngineDefaulter& rDestEngine );
bool KeyInput( const KeyEvent& rKEvt, bool bStartEdit = false );
- void EnterHandler( sal_uInt8 nBlockMode = 0 );
+ void EnterHandler( ScEnterMode nBlockMode = ScEnterMode::NORMAL );
void CancelHandler();
void SetReference( const ScRange& rRef, ScDocument* pDoc );
void AddRefEntry();
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 996f7c7..33a556a 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1310,14 +1310,14 @@ bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt)
if ( bOnRefSheet )
HideAllCursors();
- sal_uInt8 nMode = SC_ENTER_NORMAL;
+ ScEnterMode nMode = ScEnterMode::NORMAL;
if ( bShift && bControl )
- nMode = SC_ENTER_MATRIX;
+ nMode = ScEnterMode::MATRIX;
else if ( bAlt )
- nMode = SC_ENTER_BLOCK;
+ nMode = ScEnterMode::BLOCK;
pScMod->InputEnterHandler(nMode);
- if (nMode == SC_ENTER_NORMAL)
+ if (nMode == ScEnterMode::NORMAL)
{
if( bShift )
GetViewData().GetDispatcher().Execute( SID_CURSORENTERUP,
commit bd6f61ad7afcd51f7cb23c14558fdccbda1803a1
Author: Noel Grandin <noelgrandin at gmail.com>
Date: Sun Sep 20 15:52:48 2015 +0200
convert SC_LINK constants to scoped enum
Change-Id: I20470070740fcc39bce85f90ff4e8c14cdd86862
Reviewed-on: https://gerrit.libreoffice.org/18731
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index afa2b7e..2f275a8 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -714,19 +714,19 @@ public:
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const;
SC_DLLPUBLIC formula::FormulaGrammar::Grammar GetGrammar() const { return eGrammar;}
SC_DLLPUBLIC void SetGrammar( formula::FormulaGrammar::Grammar eGram );
- SC_DLLPUBLIC sal_uInt8 GetLinkMode( SCTAB nTab ) const;
- bool IsLinked( SCTAB nTab ) const;
+ SC_DLLPUBLIC ScLinkMode GetLinkMode( SCTAB nTab ) const;
+ bool IsLinked( SCTAB nTab ) const;
SC_DLLPUBLIC const OUString GetLinkDoc( SCTAB nTab ) const;
const OUString GetLinkFlt( SCTAB nTab ) const;
const OUString GetLinkOpt( SCTAB nTab ) const;
SC_DLLPUBLIC const OUString GetLinkTab( SCTAB nTab ) const;
sal_uLong GetLinkRefreshDelay( SCTAB nTab ) const;
- void SetLink( SCTAB nTab, sal_uInt8 nMode, const OUString& rDoc,
+ void SetLink( SCTAB nTab, ScLinkMode nMode, const OUString& rDoc,
const OUString& rFilter, const OUString& rOptions,
const OUString& rTabName, sal_uLong nRefreshDelay );
bool HasLink( const OUString& rDoc,
const OUString& rFilter, const OUString& rOptions ) const;
- SC_DLLPUBLIC bool LinkExternalTab( SCTAB& nTab, const OUString& aDocTab,
+ SC_DLLPUBLIC bool LinkExternalTab( SCTAB& nTab, const OUString& aDocTab,
const OUString& aFileName,
const OUString& aTabName );
@@ -734,7 +734,7 @@ public:
SC_DLLPUBLIC ScExternalRefManager* GetExternalRefManager() const;
bool IsInExternalReferenceMarking() const;
void MarkUsedExternalReferences();
- bool MarkUsedExternalReferences( ScTokenArray& rArr, const ScAddress& rPos );
+ bool MarkUsedExternalReferences( ScTokenArray& rArr, const ScAddress& rPos );
/** Returns the pool containing external formula parsers. Creates the pool
on first call. */
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 51a8d94..a030e38 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -234,11 +234,10 @@ const InsertDeleteFlags IDF_AUTOFILL = IDF_ALL & ~(IDF_NOTE | IDF_OBJECTS);
#define SC_LAYER_CONTROLS 3
#define SC_LAYER_HIDDEN 4
- // link tables
-#define SC_LINK_NONE 0
-#define SC_LINK_NORMAL 1
-#define SC_LINK_VALUE 2
-
+// link tables
+enum class ScLinkMode {
+ NONE, NORMAL, VALUE
+};
// input
#define SC_ENTER_NORMAL 0
#define SC_ENTER_BLOCK 1
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 8a12532..ed832f1 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -125,15 +125,15 @@ private:
OUString aCodeName;
OUString aComment;
- OUString aLinkDoc;
- OUString aLinkFlt;
- OUString aLinkOpt;
- OUString aLinkTab;
- sal_uLong nLinkRefreshDelay;
- sal_uInt8 nLinkMode;
+ OUString aLinkDoc;
+ OUString aLinkFlt;
+ OUString aLinkOpt;
+ OUString aLinkTab;
+ sal_uLong nLinkRefreshDelay;
+ ScLinkMode nLinkMode;
// page style template
- OUString aPageStyle;
+ OUString aPageStyle;
Size aPageSizeTwips; // size of the print-page
SCCOL nRepeatStartX; // repeating rows/columns
SCCOL nRepeatEndX; // REPEAT_NONE, if not used
@@ -282,15 +282,15 @@ public:
void SetActiveScenario(bool bSet) { bActiveScenario = bSet; }
bool IsActiveScenario() const { return bActiveScenario; }
- sal_uInt8 GetLinkMode() const { return nLinkMode; }
- bool IsLinked() const { return nLinkMode != SC_LINK_NONE; }
+ ScLinkMode GetLinkMode() const { return nLinkMode; }
+ bool IsLinked() const { return nLinkMode != ScLinkMode::NONE; }
const OUString& GetLinkDoc() const { return aLinkDoc; }
const OUString& GetLinkFlt() const { return aLinkFlt; }
const OUString& GetLinkOpt() const { return aLinkOpt; }
const OUString& GetLinkTab() const { return aLinkTab; }
sal_uLong GetLinkRefreshDelay() const { return nLinkRefreshDelay; }
- void SetLink( sal_uInt8 nMode, const OUString& rDoc, const OUString& rFlt,
+ void SetLink( ScLinkMode nMode, const OUString& rDoc, const OUString& rFlt,
const OUString& rOpt, const OUString& rTab, sal_uLong nRefreshDelay );
void GetName( OUString& rName ) const;
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 15d407a..df944a3 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -464,11 +464,11 @@ void ScDocument::SetGrammar( formula::FormulaGrammar::Grammar eGram )
eGrammar = eGram;
}
-sal_uInt8 ScDocument::GetLinkMode( SCTAB nTab ) const
+ScLinkMode ScDocument::GetLinkMode( SCTAB nTab ) const
{
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
return maTabs[nTab]->GetLinkMode();
- return SC_LINK_NONE;
+ return ScLinkMode::NONE;
}
const OUString ScDocument::GetLinkDoc( SCTAB nTab ) const
@@ -506,7 +506,7 @@ sal_uLong ScDocument::GetLinkRefreshDelay( SCTAB nTab ) const
return 0;
}
-void ScDocument::SetLink( SCTAB nTab, sal_uInt8 nMode, const OUString& rDoc,
+void ScDocument::SetLink( SCTAB nTab, ScLinkMode nMode, const OUString& rDoc,
const OUString& rFilter, const OUString& rOptions,
const OUString& rTabName, sal_uLong nRefreshDelay )
{
@@ -564,7 +564,7 @@ bool ScDocument::LinkExternalTab( SCTAB& rTab, const OUString& aDocTab,
sal_uLong nRefreshDelay = 0;
bool bWasThere = HasLink( aFileName, aFilterName, aOptions );
- SetLink( rTab, SC_LINK_VALUE, aFileName, aFilterName, aOptions, aTabName, nRefreshDelay );
+ SetLink( rTab, ScLinkMode::VALUE, aFileName, aFilterName, aOptions, aTabName, nRefreshDelay );
if ( !bWasThere ) // Add link only once per source document
{
ScTableLink* pLink = new ScTableLink( pShell, aFileName, aFilterName, aOptions, nRefreshDelay );
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 9ddf3b5..3ad5b2f 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -230,7 +230,7 @@ ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const OUString& rNewName,
aName( rNewName ),
aCodeName( rNewName ),
nLinkRefreshDelay( 0 ),
- nLinkMode( 0 ),
+ nLinkMode( ScLinkMode::NONE ),
aPageStyle( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) ),
nRepeatStartX( SCCOL_REPEAT_NONE ),
nRepeatEndX( SCCOL_REPEAT_NONE ),
@@ -419,7 +419,7 @@ void ScTable::SetScenario( bool bFlag )
bScenario = bFlag;
}
-void ScTable::SetLink( sal_uInt8 nMode,
+void ScTable::SetLink( ScLinkMode nMode,
const OUString& rDoc, const OUString& rFlt, const OUString& rOpt,
const OUString& rTab, sal_uLong nRefreshDelay )
{
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 8dfd0db8..3a5dd0a 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2165,7 +2165,7 @@ void ScInterpreter::ScCell()
OUString aFuncResult;
if( nTab < pDok->GetTableCount() )
{
- if( pDok->GetLinkMode( nTab ) == SC_LINK_VALUE )
+ if( pDok->GetLinkMode( nTab ) == ScLinkMode::VALUE )
pDok->GetName( nTab, aFuncResult );
else
{
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index e52a185..bea1098 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -693,7 +693,7 @@ XclExpTabInfo::XclExpTabInfo( const XclExpRoot& rRoot ) :
}
// external sheets (skipped, but with valid Excel sheet index for ref's)
- else if( rDoc.GetLinkMode( nScTab ) == SC_LINK_VALUE )
+ else if( rDoc.GetLinkMode( nScTab ) == ScLinkMode::VALUE )
{
SetFlag( nScTab, EXC_TABBUF_EXTERN );
}
diff --git a/sc/source/filter/xml/XMLTableSourceContext.cxx b/sc/source/filter/xml/XMLTableSourceContext.cxx
index 1051977..ecb6d7b 100644
--- a/sc/source/filter/xml/XMLTableSourceContext.cxx
+++ b/sc/source/filter/xml/XMLTableSourceContext.cxx
@@ -108,11 +108,11 @@ void ScXMLTableSourceContext::EndElement()
if (sFilterName.isEmpty())
ScDocumentLoader::GetFilterName( sLink, sFilterName, sFilterOptions, false, false );
- sal_uInt8 nLinkMode = SC_LINK_NONE;
+ ScLinkMode nLinkMode = ScLinkMode::NONE;
if ( nMode == sheet::SheetLinkMode_NORMAL )
- nLinkMode = SC_LINK_NORMAL;
+ nLinkMode = ScLinkMode::NORMAL;
else if ( nMode == sheet::SheetLinkMode_VALUE )
- nLinkMode = SC_LINK_VALUE;
+ nLinkMode = ScLinkMode::VALUE;
pDoc->SetLink( GetScImport().GetTables().GetCurrentSheet(),
nLinkMode, sLink, sFilterName, sFilterOptions,
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index a391691..07d5c7a 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -101,7 +101,7 @@ ScTableLink::~ScTableLink()
SCTAB nCount = rDoc.GetTableCount();
for (SCTAB nTab=0; nTab<nCount; nTab++)
if (rDoc.IsLinked(nTab) && aFileName.equals(rDoc.GetLinkDoc(nTab)))
- rDoc.SetLink( nTab, SC_LINK_NONE, "", "", "", "", 0 );
+ rDoc.SetLink( nTab, ScLinkMode::NONE, "", "", "", "", 0 );
delete pImpl;
}
@@ -230,8 +230,8 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter,
SCTAB nCount = rDoc.GetTableCount();
for (SCTAB nTab=0; nTab<nCount; nTab++)
{
- sal_uInt8 nMode = rDoc.GetLinkMode(nTab);
- if (nMode && aFileName.equals(rDoc.GetLinkDoc(nTab)))
+ ScLinkMode nMode = rDoc.GetLinkMode(nTab);
+ if (nMode != ScLinkMode::NONE && aFileName.equals(rDoc.GetLinkDoc(nTab)))
{
OUString aTabName = rDoc.GetLinkTab(nTab);
@@ -254,7 +254,7 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter,
// Tabellenname einer ExtDocRef anpassen
- if ( bNewUrlName && nMode == SC_LINK_VALUE )
+ if ( bNewUrlName && nMode == ScLinkMode::VALUE )
{
OUString aName;
rDoc.GetName( nTab, aName );
@@ -285,13 +285,13 @@ bool ScTableLink::Refresh(const OUString& rNewFile, const OUString& rNewFilter,
if (bFound)
rDoc.TransferTab( &rSrcDoc, nSrcTab, nTab, false, // nicht neu einfuegen
- (nMode == SC_LINK_VALUE) ); // nur Werte?
+ (nMode == ScLinkMode::VALUE) ); // nur Werte?
else
{
rDoc.DeleteAreaTab( 0,0,MAXCOL,MAXROW, nTab, IDF_ALL );
bool bShowError = true;
- if ( nMode == SC_LINK_VALUE )
+ if ( nMode == ScLinkMode::VALUE )
{
// Value link (used with external references in formulas):
// Look for formulas that reference the sheet, and put errors in the referenced cells.
diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx
index e523496..3ffc95d 100644
--- a/sc/source/ui/inc/undotab.hxx
+++ b/sc/source/ui/inc/undotab.hxx
@@ -311,7 +311,7 @@ private:
sal_uLong nRefreshDelay;
sal_uInt16 nCount;
SCTAB* pTabs;
- sal_uInt8* pModes;
+ ScLinkMode* pModes;
OUString* pTabNames;
void DoChange( bool bLink ) const;
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 64dd3dd..2b20217 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -1042,13 +1042,13 @@ ScUndoRemoveLink::ScUndoRemoveLink( ScDocShell* pShell, const OUString& rDocName
ScDocument& rDoc = pDocShell->GetDocument();
SCTAB nTabCount = rDoc.GetTableCount();
pTabs = new SCTAB[nTabCount];
- pModes = new sal_uInt8[nTabCount];
+ pModes = new ScLinkMode[nTabCount];
pTabNames = new OUString[nTabCount];
for (SCTAB i=0; i<nTabCount; i++)
{
- sal_uInt8 nMode = rDoc.GetLinkMode(i);
- if (nMode)
+ ScLinkMode nMode = rDoc.GetLinkMode(i);
+ if (nMode != ScLinkMode::NONE)
if (rDoc.GetLinkDoc(i) == aDocName)
{
if (!nCount)
@@ -1090,7 +1090,7 @@ void ScUndoRemoveLink::DoChange( bool bLink ) const
if (bLink) // establish link
rDoc.SetLink( pTabs[i], pModes[i], aDocName, aFltName, aOptions, pTabNames[i], nRefreshDelay );
else // remove link
- rDoc.SetLink( pTabs[i], SC_LINK_NONE, "", "", "", "", 0 );
+ rDoc.SetLink( pTabs[i], ScLinkMode::NONE, "", "", "", "", 0 );
pDocShell->UpdateLinks();
}
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 527c781..c1ed4da 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -7566,10 +7566,10 @@ sheet::SheetLinkMode SAL_CALL ScTableSheetObj::getLinkMode() throw(uno::RuntimeE
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
- sal_uInt8 nMode = pDocSh->GetDocument().GetLinkMode( GetTab_Impl() );
- if ( nMode == SC_LINK_NORMAL )
+ ScLinkMode nMode = pDocSh->GetDocument().GetLinkMode( GetTab_Impl() );
+ if ( nMode == ScLinkMode::NORMAL )
eRet = sheet::SheetLinkMode_NORMAL;
- else if ( nMode == SC_LINK_VALUE )
+ else if ( nMode == ScLinkMode::VALUE )
eRet = sheet::SheetLinkMode_VALUE;
}
return eRet;
@@ -7658,11 +7658,11 @@ void SAL_CALL ScTableSheetObj::link( const OUString& aUrl, const OUString& aShee
// aren't reset when the filter name is changed in ScTableLink::DataChanged
ScDocumentLoader::RemoveAppPrefix( aFilterString );
- sal_uInt8 nLinkMode = SC_LINK_NONE;
+ ScLinkMode nLinkMode = ScLinkMode::NONE;
if ( nMode == sheet::SheetLinkMode_NORMAL )
- nLinkMode = SC_LINK_NORMAL;
+ nLinkMode = ScLinkMode::NORMAL;
else if ( nMode == sheet::SheetLinkMode_VALUE )
- nLinkMode = SC_LINK_VALUE;
+ nLinkMode = ScLinkMode::VALUE;
sal_uLong nRefresh = 0;
rDoc.SetLink( nTab, nLinkMode, aFileString, aFilterString, aOptString, aSheetString, nRefresh );
@@ -7674,7 +7674,7 @@ void SAL_CALL ScTableSheetObj::link( const OUString& aUrl, const OUString& aShee
//! Undo fuer Link-Daten an der Table
- if ( nLinkMode != SC_LINK_NONE && rDoc.IsExecuteLinkEnabled() ) // Link updaten
+ if ( nLinkMode != ScLinkMode::NONE && rDoc.IsExecuteLinkEnabled() ) // Link updaten
{
// Update immer, auch wenn der Link schon da war
//! Update nur fuer die betroffene Tabelle???
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index bc1488f..466eec0 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2462,7 +2462,7 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
for (i=0; i<nInsCount; i++)
{
rSrcDoc.GetName( pSrcTabs[i], aTabStr );
- rDoc.SetLink( nTab+i, SC_LINK_NORMAL,
+ rDoc.SetLink( nTab+i, ScLinkMode::NORMAL,
aFileName, aFilterName, aOptions, aTabStr, nRefresh );
}
commit 64144c28fef385625b0edc95e1aceed82e028d40
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Sep 18 16:55:15 2015 +0100
boost->std
Change-Id: I787ff19fd41d5ecee56efa1aa7ee539f46650703
Reviewed-on: https://gerrit.libreoffice.org/18703
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/slideshow/inc/pch/precompiled_slideshow.hxx b/slideshow/inc/pch/precompiled_slideshow.hxx
index e007ffb..07318fb 100644
--- a/slideshow/inc/pch/precompiled_slideshow.hxx
+++ b/slideshow/inc/pch/precompiled_slideshow.hxx
@@ -44,7 +44,6 @@
#include <boost/mem_fn.hpp>
#include <boost/noncopyable.hpp>
#include <boost/optional.hpp>
-#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/spirit/include/classic_core.hpp>
#include <boost/tuple/tuple.hpp>
diff --git a/slideshow/source/engine/effectrewinder.hxx b/slideshow/source/engine/effectrewinder.hxx
index 7132376..97975d5 100644
--- a/slideshow/source/engine/effectrewinder.hxx
+++ b/slideshow/source/engine/effectrewinder.hxx
@@ -28,9 +28,8 @@
#include <com/sun/star/presentation/XSlideShow.hpp>
-#include <boost/scoped_ptr.hpp>
-
#include <functional>
+#include <memory>
#include <vector>
namespace slideshow { namespace internal {
diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx
index e3c70ff..c92e27a 100644
--- a/slideshow/source/engine/shapes/shapeimporter.cxx
+++ b/slideshow/source/engine/shapes/shapeimporter.cxx
@@ -52,7 +52,7 @@
#include "slideshowcontext.hxx"
#include <boost/shared_ptr.hpp>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
using namespace com::sun::star;
@@ -116,7 +116,7 @@ bool importShapeGraphic(
// no special string found, graphic must be
// external. Load via GraphicIm porter
INetURLObject aTmp( aURL );
- boost::scoped_ptr<SvStream> pGraphicStream(
+ std::unique_ptr<SvStream> pGraphicStream(
utl::UcbStreamHelper::CreateStream(
aTmp.GetMainURL( INetURLObject::NO_DECODE ),
StreamMode::READ ) );
diff --git a/slideshow/source/engine/shapes/viewmediashape.hxx b/slideshow/source/engine/shapes/viewmediashape.hxx
index 7b73930..dc6d284 100644
--- a/slideshow/source/engine/shapes/viewmediashape.hxx
+++ b/slideshow/source/engine/shapes/viewmediashape.hxx
@@ -25,7 +25,6 @@
#include <boost/shared_ptr.hpp>
#include <boost/noncopyable.hpp>
-#include <boost/scoped_ptr.hpp>
#include <vcl/vclptr.hxx>
#include "viewlayer.hxx"
diff --git a/slideshow/source/engine/sp_debug.cxx b/slideshow/source/engine/sp_debug.cxx
index 2efb80e..0a68607 100644
--- a/slideshow/source/engine/sp_debug.cxx
+++ b/slideshow/source/engine/sp_debug.cxx
@@ -32,7 +32,6 @@
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
#include <boost/assert.hpp>
-#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/detail/lightweight_mutex.hpp>
#include <canvas/debug.hxx>
diff --git a/slideshow/source/inc/eventmultiplexer.hxx b/slideshow/source/inc/eventmultiplexer.hxx
index 1dde126..cd70cd9 100644
--- a/slideshow/source/inc/eventmultiplexer.hxx
+++ b/slideshow/source/inc/eventmultiplexer.hxx
@@ -27,7 +27,7 @@
#include "vieweventhandler.hxx"
#include <boost/noncopyable.hpp>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#include <com/sun/star/uno/Reference.hxx>
@@ -727,7 +727,7 @@ public:
bool notifyHyperlinkClicked( OUString const& hyperLink );
private:
- boost::scoped_ptr<EventMultiplexerImpl> mpImpl;
+ std::unique_ptr<EventMultiplexerImpl> mpImpl;
};
} // namespace internal
diff --git a/slideshow/source/inc/screenupdater.hxx b/slideshow/source/inc/screenupdater.hxx
index ade4096..2fbf426 100644
--- a/slideshow/source/inc/screenupdater.hxx
+++ b/slideshow/source/inc/screenupdater.hxx
@@ -23,7 +23,7 @@
#include "viewupdate.hxx"
#include "unoviewcontainer.hxx"
#include <boost/noncopyable.hpp>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
/* Definition of ScreenUpdater class */
@@ -128,7 +128,7 @@ namespace slideshow
private:
struct ImplScreenUpdater;
- boost::scoped_ptr<ImplScreenUpdater> mpImpl;
+ std::unique_ptr<ImplScreenUpdater> mpImpl;
};
}
commit dd38f64014f81df215fca9fd69e5963e161c47e2
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 21 09:29:14 2015 +0200
fix OSX build
after my Link<> changes
Change-Id: I418101e2bf2a29b13b7e9eadaedfe57776cf45ee
diff --git a/vcl/inc/osx/a11yfocustracker.hxx b/vcl/inc/osx/a11yfocustracker.hxx
index 3dc3926..0188cac 100644
--- a/vcl/inc/osx/a11yfocustracker.hxx
+++ b/vcl/inc/osx/a11yfocustracker.hxx
@@ -87,7 +87,7 @@ private:
std::set<VclPtr<vcl::Window>> m_aDocumentWindowList;
// the link object needed for Application::addEventListener
- Link<> m_aWindowEventLink;
+ Link<VclSimpleEvent&,void> m_aWindowEventLink;
// the UNO XAccessibilityEventListener for Documents and other non VCL objects
const ::com::sun::star::uno::Reference< DocumentFocusListener > m_xDocumentFocusListener;
commit 1e67e94f1a308ca60d4934e9fe9d5c048225ebe8
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 21 08:03:25 2015 +0200
convert Link<> to typed
Change-Id: If3e2b00092440ebd42ae5b73ae2b0e44c3702683
diff --git a/dbaccess/source/ui/misc/ToolBoxHelper.cxx b/dbaccess/source/ui/misc/ToolBoxHelper.cxx
index facfa72..a7baf7c 100644
--- a/dbaccess/source/ui/misc/ToolBoxHelper.cxx
+++ b/dbaccess/source/ui/misc/ToolBoxHelper.cxx
@@ -74,19 +74,17 @@ namespace dbaui
m_pToolBox->SetOutStyle(aOptions.GetToolboxStyle());
}
}
- IMPL_LINK(OToolBoxHelper, SettingsChanged, VclWindowEvent*, _pEvt)
+ IMPL_LINK_TYPED(OToolBoxHelper, SettingsChanged, VclSimpleEvent&, _rEvt, void)
{
- if ( m_pToolBox && _pEvt && _pEvt->GetId() == VCLEVENT_APPLICATION_DATACHANGED )
+ if ( m_pToolBox && _rEvt.GetId() == VCLEVENT_APPLICATION_DATACHANGED )
{
- DataChangedEvent* pData = static_cast<DataChangedEvent*>(_pEvt->GetData());
+ DataChangedEvent* pData = static_cast<DataChangedEvent*>(static_cast<VclWindowEvent&>(_rEvt).GetData());
if ( pData && ((( pData->GetType() == DataChangedEventType::SETTINGS ) ||
( pData->GetType() == DataChangedEventType::DISPLAY )) &&
( pData->GetFlags() & AllSettingsFlags::STYLE )))
// check if imagelist changed
checkImageList();
}
-
- return 0L;
}
void OToolBoxHelper::setToolBox(ToolBox* _pTB)
{
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index 17f07dd..7d57c0e 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -72,7 +72,7 @@ private:
VclPtr<SplashScreenWindow> pWindow;
- DECL_LINK( AppEventListenerHdl, VclWindowEvent * );
+ DECL_LINK_TYPED( AppEventListenerHdl, VclSimpleEvent&, void );
virtual ~SplashScreen();
void loadConfig();
void updateStatus();
@@ -366,11 +366,11 @@ void SplashScreen::updateStatus()
}
// internal private methods
-IMPL_LINK( SplashScreen, AppEventListenerHdl, VclWindowEvent *, inEvent )
+IMPL_LINK_TYPED( SplashScreen, AppEventListenerHdl, VclSimpleEvent&, inEvent, void )
{
- if (inEvent != 0 && inEvent->GetWindow() == pWindow)
+ if (static_cast<VclWindowEvent&>(inEvent).GetWindow() == pWindow)
{
- switch ( inEvent->GetId() )
+ switch ( inEvent.GetId() )
{
case VCLEVENT_WINDOW_SHOW:
pWindow->Redraw();
@@ -379,7 +379,6 @@ IMPL_LINK( SplashScreen, AppEventListenerHdl, VclWindowEvent *, inEvent )
break;
}
}
- return 0;
}
// Read keys from soffice{.ini|rc}:
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index e60e3f7..a6f7316 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -555,7 +555,7 @@ IMPL_LINK_NOARG_TYPED( BibToolBar, OptionsChanged_Impl, LinkParamNone*, void )
-IMPL_LINK_NOARG( BibToolBar, SettingsChanged_Impl )
+IMPL_LINK_NOARG_TYPED( BibToolBar, SettingsChanged_Impl, VclSimpleEvent&, void )
{
// Check if toolbar button size have changed and we have to use system settings
sal_Int16 eSymbolsSize = SvtMiscOptions().GetCurrentSymbolsSize();
@@ -564,8 +564,6 @@ IMPL_LINK_NOARG( BibToolBar, SettingsChanged_Impl )
nSymbolsSize = eSymbolsSize;
RebuildToolbar();
}
-
- return 0L;
}
diff --git a/extensions/source/bibliography/toolbar.hxx b/extensions/source/bibliography/toolbar.hxx
index 341344e..5d8b514 100644
--- a/extensions/source/bibliography/toolbar.hxx
+++ b/extensions/source/bibliography/toolbar.hxx
@@ -132,7 +132,7 @@ class BibToolBar: public ToolBox
DECL_LINK_TYPED( SendSelHdl, Idle*, void );
DECL_LINK_TYPED( MenuHdl, ToolBox*, void );
DECL_LINK_TYPED( OptionsChanged_Impl, LinkParamNone*, void );
- DECL_LINK( SettingsChanged_Impl, void* );
+ DECL_LINK_TYPED( SettingsChanged_Impl, VclSimpleEvent&, void );
void ApplyImageList();
void RebuildToolbar();
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index 9416e74..f9167e1 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -136,7 +136,7 @@ class UpdateCheckUI : public ::cppu::WeakImplHelper
Idle maWaitIdle;
Timer maTimeoutTimer;
Link<VclWindowEvent&,void> maWindowEventHdl;
- Link<> maApplicationEventHdl;
+ Link<VclSimpleEvent&,void> maApplicationEventHdl;
bool mbShowBubble;
bool mbShowMenuIcon;
bool mbBubbleChanged;
@@ -149,7 +149,7 @@ private:
DECL_LINK_TYPED(TimeOutHdl, Timer *, void);
DECL_LINK_TYPED(UserEventHdl, void *, void);
DECL_LINK_TYPED(WindowEventHdl, VclWindowEvent&, void);
- DECL_LINK( ApplicationEventHdl, VclSimpleEvent* );
+ DECL_LINK_TYPED(ApplicationEventHdl, VclSimpleEvent&, void);
BubbleWindow* GetBubbleWindow();
void RemoveBubbleWindow( bool bRemoveIcon );
@@ -712,16 +712,16 @@ IMPL_LINK_TYPED( UpdateCheckUI, WindowEventHdl, VclWindowEvent&, rEvent, void )
}
-IMPL_LINK( UpdateCheckUI, ApplicationEventHdl, VclSimpleEvent *, pEvent)
+IMPL_LINK_TYPED( UpdateCheckUI, ApplicationEventHdl, VclSimpleEvent&, rEvent, void)
{
- switch (pEvent->GetId())
+ switch (rEvent.GetId())
{
case VCLEVENT_WINDOW_SHOW:
case VCLEVENT_WINDOW_ACTIVATE:
case VCLEVENT_WINDOW_GETFOCUS: {
SolarMutexGuard aGuard;
- vcl::Window *pWindow = static_cast< VclWindowEvent * >(pEvent)->GetWindow();
+ vcl::Window *pWindow = static_cast< VclWindowEvent * >(&rEvent)->GetWindow();
if ( pWindow && pWindow->IsTopWindow() )
{
SystemWindow *pSysWin = pWindow->GetSystemWindow();
@@ -734,7 +734,6 @@ IMPL_LINK( UpdateCheckUI, ApplicationEventHdl, VclSimpleEvent *, pEvent)
break;
}
}
- return 0;
}
diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx
index c8b4e7c..76d958e 100644
--- a/framework/inc/services/layoutmanager.hxx
+++ b/framework/inc/services/layoutmanager.hxx
@@ -169,7 +169,7 @@ namespace framework
virtual void SAL_CALL removeLayoutManagerEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManagerListener >& aLayoutManagerListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
DECL_LINK_TYPED( MenuBarClose, void *, void);
- DECL_LINK( WindowEventListener, VclSimpleEvent* );
+ DECL_LINK_TYPED( WindowEventListener, VclWindowEvent&, void );
// ILayoutNotifications
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index f27f528..4b4b645 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -1398,25 +1398,18 @@ uno::Reference< ui::XUIElement > LayoutManager::implts_createDockingWindow( cons
return xUIElement;
}
-IMPL_LINK( LayoutManager, WindowEventListener, VclSimpleEvent*, pEvent )
+IMPL_LINK_TYPED( LayoutManager, WindowEventListener, VclWindowEvent&, rEvent, void )
{
- long nResult( 1 );
-
- if ( pEvent && pEvent->ISA( VclWindowEvent ))
+ vcl::Window* pWindow = rEvent.GetWindow();
+ if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX )
{
- vcl::Window* pWindow = static_cast< VclWindowEvent* >(pEvent)->GetWindow();
- if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX )
- {
- SolarMutexClearableGuard aReadLock;
- ToolbarLayoutManager* pToolbarManager( m_pToolbarManager );
- aReadLock.clear();
+ SolarMutexClearableGuard aReadLock;
+ ToolbarLayoutManager* pToolbarManager( m_pToolbarManager );
+ aReadLock.clear();
- if ( pToolbarManager )
- nResult = pToolbarManager->childWindowEvent( pEvent );
- }
+ if ( pToolbarManager )
+ pToolbarManager->childWindowEvent( &rEvent );
}
-
- return nResult;
}
void SAL_CALL LayoutManager::createElement( const OUString& aName )
diff --git a/include/dbaccess/ToolBoxHelper.hxx b/include/dbaccess/ToolBoxHelper.hxx
index b64bf85..3c6ed20 100644
--- a/include/dbaccess/ToolBoxHelper.hxx
+++ b/include/dbaccess/ToolBoxHelper.hxx
@@ -28,7 +28,7 @@
class SvtMiscOptions;
class ToolBox;
-class VclWindowEvent;
+class VclSimpleEvent;
namespace dbaui
{
@@ -72,7 +72,7 @@ namespace dbaui
protected:
DECL_LINK_TYPED(ConfigOptionsChanged, LinkParamNone*, void);
- DECL_LINK(SettingsChanged, VclWindowEvent* );
+ DECL_LINK_TYPED(SettingsChanged, VclSimpleEvent&, void );
};
}
#endif // INCLUDED_DBACCESS_TOOLBOXHELPER_HXX
diff --git a/include/sfx2/sidebar/FocusManager.hxx b/include/sfx2/sidebar/FocusManager.hxx
index 93b78b8..a7ffd5e 100644
--- a/include/sfx2/sidebar/FocusManager.hxx
+++ b/include/sfx2/sidebar/FocusManager.hxx
@@ -97,7 +97,7 @@ private:
/** Listen for key events for panels and buttons.
*/
DECL_LINK_TYPED( WindowEventListener, VclWindowEvent&, void);
- DECL_LINK(ChildEventListener, VclSimpleEvent*);
+ DECL_LINK_TYPED(ChildEventListener, VclWindowEvent&, void);
void ClearPanels();
void ClearButtons();
diff --git a/include/toolkit/awt/vclxaccessiblecomponent.hxx b/include/toolkit/awt/vclxaccessiblecomponent.hxx
index bd0c739..13233a4 100644
--- a/include/toolkit/awt/vclxaccessiblecomponent.hxx
+++ b/include/toolkit/awt/vclxaccessiblecomponent.hxx
@@ -70,7 +70,7 @@ private:
protected:
DECL_LINK_TYPED( WindowEventListener, VclWindowEvent&, void );
- DECL_LINK( WindowChildEventListener, VclSimpleEvent* );
+ DECL_LINK_TYPED( WindowChildEventListener, VclWindowEvent&, void );
virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
virtual void ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent );
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 1365215..c2b6d04 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -760,7 +760,7 @@ public:
@see RemoveEventListener, AddKeyListener, RemoveKeyListener
*/
- static void AddEventListener( const Link<>& rEventListener );
+ static void AddEventListener( const Link<VclSimpleEvent&,void>& rEventListener );
/** Remove a VCL event listener from the application.
@@ -768,7 +768,7 @@ public:
@see AddEventListener, AddKeyListener, RemoveKeyListener
*/
- static void RemoveEventListener( const Link<>& rEventListener );
+ static void RemoveEventListener( const Link<VclSimpleEvent&,void>& rEventListener );
/** Add a keypress listener to the application. If keypress listener exists,
then initialize the application's keypress event listener with a new one, then
diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx
index 69e4886..fa5b947 100644
--- a/include/vcl/tabctrl.hxx
+++ b/include/vcl/tabctrl.hxx
@@ -78,7 +78,7 @@ private:
SAL_DLLPRIVATE bool ImplHandleKeyEvent( const KeyEvent& rKeyEvent );
DECL_DLLPRIVATE_LINK( ImplListBoxSelectHdl, void* );
- DECL_DLLPRIVATE_LINK( ImplWindowEventListener, VclSimpleEvent* );
+ DECL_DLLPRIVATE_LINK_TYPED( ImplWindowEventListener, VclWindowEvent&, void );
protected:
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 0ea1042..9c968f5 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -882,8 +882,8 @@ public:
void AddEventListener( const Link<VclWindowEvent&,void>& rEventListener );
void RemoveEventListener( const Link<VclWindowEvent&,void>& rEventListener );
- void AddChildEventListener( const Link<>& rEventListener );
- void RemoveChildEventListener( const Link<>& rEventListener );
+ void AddChildEventListener( const Link<VclWindowEvent&,void>& rEventListener );
+ void RemoveChildEventListener( const Link<VclWindowEvent&,void>& rEventListener );
ImplSVEvent * PostUserEvent( const Link<void*,void>& rLink, void* pCaller = NULL, bool bReferenceLink = false );
void RemoveUserEvent( ImplSVEvent * nUserEvent );
diff --git a/reportdesign/source/ui/inc/ReportControllerObserver.hxx b/reportdesign/source/ui/inc/ReportControllerObserver.hxx
index ea440d3..735a149 100644
--- a/reportdesign/source/ui/inc/ReportControllerObserver.hxx
+++ b/reportdesign/source/ui/inc/ReportControllerObserver.hxx
@@ -103,7 +103,7 @@ namespace rptui
void switchListening( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& _rxContainer, bool _bStartListening );
void switchListening( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxObject, bool _bStartListening );
- DECL_LINK(SettingsChanged, VclWindowEvent* );
+ DECL_LINK_TYPED(SettingsChanged, VclSimpleEvent&, void );
private:
::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild> >::const_iterator getSection(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild>& _xContainer) const;
diff --git a/reportdesign/source/ui/report/ReportControllerObserver.cxx b/reportdesign/source/ui/report/ReportControllerObserver.cxx
index b93f49f..52c67e3 100644
--- a/reportdesign/source/ui/report/ReportControllerObserver.cxx
+++ b/reportdesign/source/ui/report/ReportControllerObserver.cxx
@@ -94,15 +94,13 @@ public:
}
- IMPL_LINK(OXReportControllerObserver, SettingsChanged, VclWindowEvent*, _pEvt)
+ IMPL_LINK_TYPED(OXReportControllerObserver, SettingsChanged, VclSimpleEvent&, _rEvt, void)
{
- if ( _pEvt )
- {
- sal_Int32 nEvent = _pEvt->GetId();
+ sal_Int32 nEvent = _rEvt.GetId();
if (nEvent == VCLEVENT_APPLICATION_DATACHANGED )
{
- DataChangedEvent* pData = static_cast<DataChangedEvent*>(_pEvt->GetData());
+ DataChangedEvent* pData = static_cast<DataChangedEvent*>(static_cast<VclWindowEvent&>(_rEvt).GetData());
if ( pData && ((( pData->GetType() == DataChangedEventType::SETTINGS ) ||
( pData->GetType() == DataChangedEventType::DISPLAY )) &&
( pData->GetFlags() & AllSettingsFlags::STYLE )))
@@ -137,9 +135,6 @@ public:
}
}
}
- }
-
- return 0L;
}
// XEventListener
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index f94d6b2..9fe0208 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -1483,36 +1483,30 @@ void SAL_CALL ScAccessibleDocument::disposing( const lang::EventObject& /* Sourc
//===== SfxListener =====================================================
-IMPL_LINK( ScAccessibleDocument, WindowChildEventListener, VclSimpleEvent*, pEvent )
+IMPL_LINK_TYPED( ScAccessibleDocument, WindowChildEventListener, VclWindowEvent&, rEvent, void )
{
- OSL_ENSURE( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" );
- if ( pEvent && pEvent->ISA( VclWindowEvent ) )
+ OSL_ENSURE( rEvent.GetWindow(), "Window???" );
+ switch ( rEvent.GetId() )
{
- VclWindowEvent *pVclEvent = static_cast< VclWindowEvent * >( pEvent );
- OSL_ENSURE( pVclEvent->GetWindow(), "Window???" );
- switch ( pVclEvent->GetId() )
+ case VCLEVENT_WINDOW_SHOW: // send create on show for direct accessible children
{
- case VCLEVENT_WINDOW_SHOW: // send create on show for direct accessible children
+ vcl::Window* pChildWin = static_cast < vcl::Window * >( rEvent.GetData() );
+ if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
{
- vcl::Window* pChildWin = static_cast < vcl::Window * >( pVclEvent->GetData() );
- if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
- {
- AddChild( pChildWin->GetAccessible(), true );
- }
+ AddChild( pChildWin->GetAccessible(), true );
}
- break;
- case VCLEVENT_WINDOW_HIDE: // send destroy on hide for direct accessible children
+ }
+ break;
+ case VCLEVENT_WINDOW_HIDE: // send destroy on hide for direct accessible children
+ {
+ vcl::Window* pChildWin = static_cast < vcl::Window * >( rEvent.GetData() );
+ if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
{
- vcl::Window* pChildWin = static_cast < vcl::Window * >( pVclEvent->GetData() );
- if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
- {
- RemoveChild( pChildWin->GetAccessible(), true );
- }
+ RemoveChild( pChildWin->GetAccessible(), true );
}
- break;
}
+ break;
}
- return 0;
}
void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
diff --git a/sc/source/ui/inc/AccessibleDocument.hxx b/sc/source/ui/inc/AccessibleDocument.hxx
index 3e1d94f..ff153b0 100644
--- a/sc/source/ui/inc/AccessibleDocument.hxx
+++ b/sc/source/ui/inc/AccessibleDocument.hxx
@@ -65,7 +65,7 @@ public:
virtual void Init() SAL_OVERRIDE;
- DECL_LINK( WindowChildEventListener, VclSimpleEvent* );
+ DECL_LINK_TYPED( WindowChildEventListener, VclWindowEvent&, void );
protected:
virtual ~ScAccessibleDocument();
diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx
index a113a00..0ca3765 100644
--- a/sd/inc/sdmod.hxx
+++ b/sd/inc/sdmod.hxx
@@ -189,7 +189,7 @@ private:
@VclSimpleEvent *
a pointer to a VCLSimpleEvent (see vcl/vclevent.hxx )
*/
- DECL_STATIC_LINK( SdModule, EventListenerHdl, VclSimpleEvent* );
+ DECL_STATIC_LINK_TYPED( SdModule, EventListenerHdl, VclSimpleEvent&, void );
};
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index bc21e83..afd2626 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -160,15 +160,11 @@ void AccessibleDocumentViewBase::Init()
SetState(AccessibleStateType::EDITABLE);
}
-IMPL_LINK(AccessibleDocumentViewBase, WindowChildEventListener,
- VclSimpleEvent*, pEvent)
+IMPL_LINK_TYPED(AccessibleDocumentViewBase, WindowChildEventListener,
+ VclWindowEvent&, rEvent, void)
{
- OSL_ASSERT(pEvent!=NULL && pEvent->ISA(VclWindowEvent));
- if (pEvent!=NULL && pEvent->ISA(VclWindowEvent))
- {
- VclWindowEvent* pWindowEvent = static_cast<VclWindowEvent*>(pEvent);
// DBG_ASSERT( pVclEvent->GetWindow(), "Window???" );
- switch (pWindowEvent->GetId())
+ switch (rEvent.GetId())
{
case VCLEVENT_OBJECT_DYING:
{
@@ -176,11 +172,11 @@ IMPL_LINK(AccessibleDocumentViewBase, WindowChildEventListener,
// This is also attempted in the disposing() method.
vcl::Window* pWindow = maShapeTreeInfo.GetWindow();
vcl::Window* pDyingWindow = static_cast<vcl::Window*>(
- pWindowEvent->GetWindow());
+ rEvent.GetWindow());
if (pWindow==pDyingWindow && pWindow!=NULL && maWindowLink.IsSet())
{
pWindow->RemoveChildEventListener (maWindowLink);
- maWindowLink = Link<>();
+ maWindowLink = Link<VclWindowEvent&,void>();
}
}
break;
@@ -189,7 +185,7 @@ IMPL_LINK(AccessibleDocumentViewBase, WindowChildEventListener,
{
// A new window has been created. Is it an OLE object?
vcl::Window* pChildWindow = static_cast<vcl::Window*>(
- pWindowEvent->GetData());
+ rEvent.GetData());
if (pChildWindow!=NULL
&& (pChildWindow->GetAccessibleRole()
== AccessibleRole::EMBEDDED_OBJECT))
@@ -204,7 +200,7 @@ IMPL_LINK(AccessibleDocumentViewBase, WindowChildEventListener,
// A window has been destroyed. Has that been an OLE
// object?
vcl::Window* pChildWindow = static_cast<vcl::Window*>(
- pWindowEvent->GetData());
+ rEvent.GetData());
if (pChildWindow!=NULL
&& (pChildWindow->GetAccessibleRole()
== AccessibleRole::EMBEDDED_OBJECT))
@@ -214,9 +210,6 @@ IMPL_LINK(AccessibleDocumentViewBase, WindowChildEventListener,
}
break;
}
- }
-
- return 0;
}
//===== IAccessibleViewForwarderListener ====================================
@@ -487,7 +480,7 @@ void AccessibleDocumentViewBase::impl_dispose()
{
if (pWindow)
pWindow->RemoveChildEventListener (maWindowLink);
- maWindowLink = Link<>();
+ maWindowLink = Link<VclWindowEvent&,void>();
}
else
{
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 9613ea6..83e5f40 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -416,11 +416,11 @@ void SdModule::GetState(SfxItemSet& rItemSet)
}
}
-IMPL_STATIC_LINK( SdModule, EventListenerHdl, VclSimpleEvent*, pEvent )
+IMPL_STATIC_LINK_TYPED( SdModule, EventListenerHdl, VclSimpleEvent&, rSimpleEvent, void )
{
- if( pEvent && (pEvent->GetId() == VCLEVENT_WINDOW_COMMAND) && static_cast<VclWindowEvent*>(pEvent)->GetData() )
+ if( (rSimpleEvent.GetId() == VCLEVENT_WINDOW_COMMAND) && static_cast<VclWindowEvent*>(&rSimpleEvent)->GetData() )
{
- const CommandEvent& rEvent = *static_cast<const CommandEvent*>(static_cast<VclWindowEvent*>(pEvent)->GetData());
+ const CommandEvent& rEvent = *static_cast<const CommandEvent*>(static_cast<VclWindowEvent*>(&rSimpleEvent)->GetData());
if( rEvent.GetCommand() == CommandEventId::Media )
{
@@ -447,7 +447,6 @@ IMPL_STATIC_LINK( SdModule, EventListenerHdl, VclSimpleEvent*, pEvent )
}
}
}
- return 0;
}
void SdModule::AddSummaryPage (SfxViewFrame* pViewFrame, SdDrawDocument* pDocument)
diff --git a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
index 6c44a3a..ceb9a50 100644
--- a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
+++ b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
@@ -127,7 +127,7 @@ public:
/** Define callback for listening to window child events of VCL.
Listen for creation or destruction of OLE objects.
*/
- DECL_LINK (WindowChildEventListener, VclSimpleEvent*);
+ DECL_LINK_TYPED( WindowChildEventListener, VclWindowEvent&, void );
//===== IAccessibleViewForwarderListener ================================
@@ -305,7 +305,7 @@ protected:
::com::sun::star::accessibility::XAccessible>
mxAccessibleOLEObject;
- Link<> maWindowLink;
+ Link<VclWindowEvent&,void> maWindowLink;
// This method is called from the component helper base class while
// disposing.
diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx
index 60b54ac..e888837 100644
--- a/sd/source/ui/inc/OutlineView.hxx
+++ b/sd/source/ui/inc/OutlineView.hxx
@@ -200,7 +200,7 @@ private:
/** this link is called from the vcl application when the stylesettings
change. Its only purpose is to call onUpdateStyleSettings() then.
*/
- DECL_LINK( AppEventListenerHdl, void * );
+ DECL_LINK_TYPED( AppEventListenerHdl, VclSimpleEvent&, void );
DECL_LINK_TYPED(EventMultiplexerListener, sd::tools::EventMultiplexerEvent&, void);
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 25a0a1f..0b3f79d 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -2003,14 +2003,14 @@ bool SlideshowImpl::keyInput(const KeyEvent& rKEvt)
return bRet;
}
-IMPL_LINK( SlideshowImpl, EventListenerHdl, VclSimpleEvent*, pEvent )
+IMPL_LINK_TYPED( SlideshowImpl, EventListenerHdl, VclSimpleEvent&, rSimpleEvent, void )
{
if( !mxShow.is() || mbInputFreeze )
- return 0;
+ return;
- if( pEvent && (pEvent->GetId() == VCLEVENT_WINDOW_COMMAND) && static_cast<VclWindowEvent*>(pEvent)->GetData() )
+ if( (rSimpleEvent.GetId() == VCLEVENT_WINDOW_COMMAND) && static_cast<VclWindowEvent*>(&rSimpleEvent)->GetData() )
{
- const CommandEvent& rEvent = *static_cast<const CommandEvent*>(static_cast<VclWindowEvent*>(pEvent)->GetData());
+ const CommandEvent& rEvent = *static_cast<const CommandEvent*>(static_cast<VclWindowEvent*>(&rSimpleEvent)->GetData());
if( rEvent.GetCommand() == CommandEventId::Media )
{
@@ -2078,8 +2078,6 @@ IMPL_LINK( SlideshowImpl, EventListenerHdl, VclSimpleEvent*, pEvent )
}
}
}
-
- return 0;
}
void SlideshowImpl::mouseButtonUp(const MouseEvent& rMEvt)
diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx
index 06ac09e..9d0b342 100644
--- a/sd/source/ui/slideshow/slideshowimpl.hxx
+++ b/sd/source/ui/slideshow/slideshowimpl.hxx
@@ -281,7 +281,7 @@ private:
DECL_LINK_TYPED( ContextMenuSelectHdl, Menu *, bool );
DECL_LINK_TYPED( ContextMenuHdl, void*, void );
DECL_LINK_TYPED( deactivateHdl, Timer *, void );
- DECL_LINK( EventListenerHdl, VclSimpleEvent* );
+ DECL_LINK_TYPED( EventListenerHdl, VclSimpleEvent&, void );
// helper
void receiveRequest(SfxRequest& rReq);
diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index 3b34246..845f4b8 100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -540,11 +540,9 @@ void SlideSorterController::HandleModelChange()
}
}
-IMPL_LINK(SlideSorterController, ApplicationEventHandler, VclWindowEvent*, pEvent)
+IMPL_LINK_TYPED(SlideSorterController, ApplicationEventHandler, VclSimpleEvent&, rEvent, void)
{
- if (pEvent)
- WindowEventHandler(*pEvent);
- return 1;
+ WindowEventHandler(static_cast<VclWindowEvent&>(rEvent));
}
IMPL_LINK_TYPED(SlideSorterController, WindowEventHandler, VclWindowEvent&, rEvent, void)
{
diff --git a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
index e47ed18..2127793 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
@@ -161,7 +161,7 @@ public:
void HandleModelChange();
DECL_LINK_TYPED(WindowEventHandler, VclWindowEvent&, void);
- DECL_LINK(ApplicationEventHandler, VclWindowEvent*);
+ DECL_LINK_TYPED(ApplicationEventHandler, VclSimpleEvent&, void);
/** Update the display of all pages. This involves a redraw and
releasing previews and caches.
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index d1117bd..12deaea 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -1425,10 +1425,9 @@ void OutlineView::onUpdateStyleSettings( bool bForceUpdate /* = false */ )
}
}
-IMPL_LINK_NOARG(OutlineView, AppEventListenerHdl)
+IMPL_LINK_NOARG_TYPED(OutlineView, AppEventListenerHdl, VclSimpleEvent&, void)
{
onUpdateStyleSettings();
- return 0;
}
IMPL_LINK_TYPED(OutlineView, EventMultiplexerListener, ::sd::tools::EventMultiplexerEvent&, rEvent, void)
diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx
index d36b7ac..d44f0b1 100644
--- a/sfx2/source/sidebar/FocusManager.cxx
+++ b/sfx2/source/sidebar/FocusManager.cxx
@@ -537,24 +537,17 @@ IMPL_LINK_TYPED(FocusManager, WindowEventListener, VclWindowEvent&, rWindowEvent
}
}
-IMPL_LINK(FocusManager, ChildEventListener, VclSimpleEvent*, pEvent)
+IMPL_LINK_TYPED(FocusManager, ChildEventListener, VclWindowEvent&, rEvent, void)
{
- if (pEvent == NULL)
- return 0;
-
- if (!pEvent->ISA(VclWindowEvent))
- return 0;
-
- VclWindowEvent* pWindowEvent = static_cast<VclWindowEvent*>(pEvent);
- vcl::Window* pSource = pWindowEvent->GetWindow();
+ vcl::Window* pSource = rEvent.GetWindow();
if (pSource == NULL)
- return 0;
+ return;
- switch (pWindowEvent->GetId())
+ switch (rEvent.GetId())
{
case VCLEVENT_WINDOW_KEYINPUT:
{
- KeyEvent* pKeyEvent = static_cast<KeyEvent*>(pWindowEvent->GetData());
+ KeyEvent* pKeyEvent = static_cast<KeyEvent*>(rEvent.GetData());
// Go up the window hierarchy to find out whether the
// parent of the event source is known to us.
@@ -593,7 +586,7 @@ IMPL_LINK(FocusManager, ChildEventListener, VclSimpleEvent*, pEvent)
break;
}
}
- return 1;
+ return;
}
case VCLEVENT_WINDOW_GETFOCUS:
@@ -609,8 +602,6 @@ IMPL_LINK(FocusManager, ChildEventListener, VclSimpleEvent*, pEvent)
default:
break;
}
-
- return 0;
}
} } // end of namespace sfx2::sidebar
diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx
index f6bc338..a873ea9 100644
--- a/sfx2/source/toolbox/imgmgr.cxx
+++ b/sfx2/source/toolbox/imgmgr.cxx
@@ -63,7 +63,7 @@ public:
void SetSymbolsSize_Impl( sal_Int16 );
DECL_LINK_TYPED( OptionsChanged_Impl, LinkParamNone*, void );
- DECL_LINK( SettingsChanged_Impl, VclWindowEvent* );
+ DECL_LINK_TYPED( SettingsChanged_Impl, VclSimpleEvent&, void );
explicit SfxImageManager_Impl(SfxModule& rModule);
~SfxImageManager_Impl();
@@ -207,32 +207,28 @@ IMPL_LINK_NOARG_TYPED(SfxImageManager_Impl, OptionsChanged_Impl, LinkParamNone*,
-IMPL_LINK( SfxImageManager_Impl, SettingsChanged_Impl, VclWindowEvent*, pEvent)
+IMPL_LINK_TYPED( SfxImageManager_Impl, SettingsChanged_Impl, VclSimpleEvent&, rEvent, void)
{
- if (pEvent)
+ switch (rEvent.GetId())
{
- switch (pEvent->GetId())
+ case VCLEVENT_OBJECT_DYING:
+ if (m_bAppEventListener)
{
- case VCLEVENT_OBJECT_DYING:
- if (m_bAppEventListener)
- {
- Application::RemoveEventListener( LINK( this, SfxImageManager_Impl, SettingsChanged_Impl ) );
- m_bAppEventListener = false;
- }
- break;
- case VCLEVENT_APPLICATION_DATACHANGED:
- // Check if toolbar button size have changed and we have to use system settings
- {
- sal_Int16 nSymbolsSize = m_aOpt.GetCurrentSymbolsSize();
- if (m_nSymbolsSize != nSymbolsSize)
- SetSymbolsSize_Impl(nSymbolsSize);
- }
- break;
- default:
- break;
+ Application::RemoveEventListener( LINK( this, SfxImageManager_Impl, SettingsChanged_Impl ) );
+ m_bAppEventListener = false;
+ }
+ break;
+ case VCLEVENT_APPLICATION_DATACHANGED:
+ // Check if toolbar button size have changed and we have to use system settings
+ {
+ sal_Int16 nSymbolsSize = m_aOpt.GetCurrentSymbolsSize();
+ if (m_nSymbolsSize != nSymbolsSize)
+ SetSymbolsSize_Impl(nSymbolsSize);
}
+ break;
+ default:
+ break;
}
- return 0L;
}
SfxImageManager::SfxImageManager(SfxModule& rModule)
diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx
index 5408aa1..e54f896 100644
--- a/svtools/source/config/colorcfg.cxx
+++ b/svtools/source/config/colorcfg.cxx
@@ -101,7 +101,7 @@ public:
bool GetAutoDetectSystemHC() {return m_bAutoDetectSystemHC;}
// #100822#
- DECL_LINK( DataChangedEventListener, VclWindowEvent* );
+ DECL_LINK_TYPED( DataChangedEventListener, VclSimpleEvent&, void );
void ImplUpdateApplicationSettings();
};
@@ -349,20 +349,17 @@ void ColorConfig_Impl::SettingsChanged()
NotifyListeners(0);
}
-IMPL_LINK( ColorConfig_Impl, DataChangedEventListener, VclWindowEvent*, pEvent )
+IMPL_LINK_TYPED( ColorConfig_Impl, DataChangedEventListener, VclSimpleEvent&, rEvent, void )
{
- if ( pEvent->GetId() == VCLEVENT_APPLICATION_DATACHANGED )
+ if ( rEvent.GetId() == VCLEVENT_APPLICATION_DATACHANGED )
{
- DataChangedEvent* pData = static_cast<DataChangedEvent*>(pEvent->GetData());
+ DataChangedEvent* pData = static_cast<DataChangedEvent*>(static_cast<VclWindowEvent&>(rEvent).GetData());
if ( (pData->GetType() == DataChangedEventType::SETTINGS) &&
(pData->GetFlags() & AllSettingsFlags::STYLE) )
{
SettingsChanged();
- return 1L;
- } else
- return 0L;
- } else
- return 0L;
+ }
+ }
}
diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx
index 812dcd7..62eba20 100644
--- a/svtools/source/config/extcolorcfg.cxx
+++ b/svtools/source/config/extcolorcfg.cxx
@@ -132,7 +132,7 @@ public:
static void UnlockBroadcast();
// #100822#
- DECL_LINK( DataChangedEventListener, VclWindowEvent* );
+ DECL_LINK_TYPED( DataChangedEventListener, VclSimpleEvent&, void );
};
uno::Sequence< OUString> ExtendedColorConfig_Impl::GetPropertyNames(const OUString& rScheme)
@@ -542,20 +542,17 @@ void ExtendedColorConfig_Impl::UnlockBroadcast()
m_bLockBroadcast = false;
}
-IMPL_LINK( ExtendedColorConfig_Impl, DataChangedEventListener, VclWindowEvent*, pEvent )
+IMPL_LINK_TYPED( ExtendedColorConfig_Impl, DataChangedEventListener, VclSimpleEvent&, rEvent, void )
{
- if ( pEvent->GetId() == VCLEVENT_APPLICATION_DATACHANGED )
+ if ( rEvent.GetId() == VCLEVENT_APPLICATION_DATACHANGED )
{
- DataChangedEvent* pData = static_cast<DataChangedEvent*>(pEvent->GetData());
+ DataChangedEvent* pData = static_cast<DataChangedEvent*>(static_cast<VclWindowEvent&>(rEvent).GetData());
if ( (pData->GetType() == DataChangedEventType::SETTINGS) &&
(pData->GetFlags() & AllSettingsFlags::STYLE) )
{
SettingsChanged();
- return 1L;
- } else
- return 0L;
- } else
- return 0L;
+ }
+ }
}
diff --git a/svx/source/sidebar/insert/InsertPropertyPanel.cxx b/svx/source/sidebar/insert/InsertPropertyPanel.cxx
index df89146..ff120dc 100644
--- a/svx/source/sidebar/insert/InsertPropertyPanel.cxx
+++ b/svx/source/sidebar/insert/InsertPropertyPanel.cxx
@@ -91,59 +91,52 @@ void InsertPropertyPanel::dispose()
-IMPL_LINK(InsertPropertyPanel, WindowEventListener, VclSimpleEvent*, pEvent)
+IMPL_LINK_TYPED(InsertPropertyPanel, WindowEventListener, VclWindowEvent&, rEvent, void)
{
// We will be getting a lot of window events (well, basically all
// of them), so reject early everything that is not connected to
// toolbox selection.
- if (pEvent == NULL)
- return 1;
- if ( ! pEvent->ISA(VclWindowEvent))
- return 1;
- if (pEvent->GetId() != VCLEVENT_TOOLBOX_SELECT)
- return 1;
-
- VclWindowEvent* pWindowEvent = dynamic_cast<VclWindowEvent*>(pEvent);
- vcl::Window* pWindow = pWindowEvent ? pWindowEvent->GetWindow() : NULL;
+ if (rEvent.GetId() != VCLEVENT_TOOLBOX_SELECT)
+ return;
+
+ vcl::Window* pWindow = rEvent.GetWindow();
ToolBox* pToolBox = dynamic_cast<ToolBox*>(pWindow);
if (pToolBox == NULL)
- return 1;
+ return;
// Extract name of (sub)toolbar from help id.
OUString sToolbarName (rtl::OStringToOUString(pToolBox->GetHelpId(), RTL_TEXTENCODING_UTF8));
if (sToolbarName.getLength() == 0)
- return 1;
+ return;
const util::URL aURL (sfx2::sidebar::Tools::GetURL(sToolbarName));
if (aURL.Path.getLength() == 0)
- return 1;
+ return;
// Get item id.
sal_uInt16 nId = pToolBox->GetCurItemId();
if (nId == 0)
- return 1;
+ return;
SidebarToolBox* pSidebarToolBox = dynamic_cast<SidebarToolBox*>(mpStandardShapesToolBox.get());
if (pSidebarToolBox == NULL)
- return 1;
+ return;
sal_uInt16 nItemId (pSidebarToolBox->GetItemIdForSubToolbarName(aURL.Path));
if (nItemId == 0)
{
pSidebarToolBox = dynamic_cast<SidebarToolBox*>(mpCustomShapesToolBox.get());
if (pSidebarToolBox == NULL)
- return 1;
+ return;
nItemId = pSidebarToolBox->GetItemIdForSubToolbarName(aURL.Path);
if (nItemId == 0)
- return 1;
+ return;
}
Reference<frame::XSubToolbarController> xController (pSidebarToolBox->GetControllerForItemId(nItemId), UNO_QUERY);
if ( ! xController.is() )
- return 1;
+ return;
const OUString sCommand (pToolBox->GetItemCommand(nId));
xController->functionSelected(sCommand);
-
- return 1;
}
diff --git a/svx/source/sidebar/insert/InsertPropertyPanel.hxx b/svx/source/sidebar/insert/InsertPropertyPanel.hxx
index 01ce363..f8feaf7 100644
--- a/svx/source/sidebar/insert/InsertPropertyPanel.hxx
+++ b/svx/source/sidebar/insert/InsertPropertyPanel.hxx
@@ -49,7 +49,7 @@ private:
VclPtr<ToolBox> mpCustomShapesToolBox;
const css::uno::Reference<css::frame::XFrame> mxFrame;
- DECL_LINK(WindowEventListener, VclSimpleEvent*);
+ DECL_LINK_TYPED(WindowEventListener, VclWindowEvent&, void);
};
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index a718591..d4227e2 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -295,7 +295,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
DECL_DLLPRIVATE_LINK_TYPED( ScrollHdl, ScrollBar*, void );
DECL_DLLPRIVATE_LINK_TYPED( EndScrollHdl, ScrollBar*, void );
SAL_DLLPRIVATE bool UpdateScrollbars();
- DECL_DLLPRIVATE_LINK( WindowChildEventListener, VclSimpleEvent* );
+ DECL_DLLPRIVATE_LINK_TYPED( WindowChildEventListener, VclWindowEvent&, void );
SAL_DLLPRIVATE void CalcVisArea( const Size &rPixelSz );
// linguistics functions
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index d31a6f3..fbfdde8 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -390,45 +390,39 @@ void SwAccessibleDocument::Dispose( bool bRecursive )
SwAccessibleContext::Dispose( bRecursive );
}
-IMPL_LINK( SwAccessibleDocument, WindowChildEventListener, VclSimpleEvent*, pEvent )
+IMPL_LINK_TYPED( SwAccessibleDocument, WindowChildEventListener, VclWindowEvent&, rEvent, void )
{
- OSL_ENSURE( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" );
- if ( pEvent && pEvent->ISA( VclWindowEvent ) )
+ OSL_ENSURE( rEvent.GetWindow(), "Window???" );
+ switch ( rEvent.GetId() )
{
- VclWindowEvent *pVclEvent = static_cast< VclWindowEvent * >( pEvent );
- OSL_ENSURE( pVclEvent->GetWindow(), "Window???" );
- switch ( pVclEvent->GetId() )
+ case VCLEVENT_WINDOW_SHOW: // send create on show for direct accessible children
{
- case VCLEVENT_WINDOW_SHOW: // send create on show for direct accessible children
+ vcl::Window* pChildWin = static_cast< vcl::Window* >( rEvent.GetData() );
+ if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
{
- vcl::Window* pChildWin = static_cast< vcl::Window* >( pVclEvent->GetData() );
- if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
- {
- AddChild( pChildWin );
- }
+ AddChild( pChildWin );
}
- break;
- case VCLEVENT_WINDOW_HIDE: // send destroy on hide for direct accessible children
+ }
+ break;
+ case VCLEVENT_WINDOW_HIDE: // send destroy on hide for direct accessible children
+ {
+ vcl::Window* pChildWin = static_cast< vcl::Window* >( rEvent.GetData() );
+ if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
{
- vcl::Window* pChildWin = static_cast< vcl::Window* >( pVclEvent->GetData() );
- if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
- {
- RemoveChild( pChildWin );
- }
+ RemoveChild( pChildWin );
}
- break;
- case VCLEVENT_OBJECT_DYING: // send destroy on hide for direct accessible children
+ }
+ break;
+ case VCLEVENT_OBJECT_DYING: // send destroy on hide for direct accessible children
+ {
+ vcl::Window* pChildWin = rEvent.GetWindow();
+ if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
{
- vcl::Window* pChildWin = pVclEvent->GetWindow();
- if( pChildWin && AccessibleRole::EMBEDDED_OBJECT == pChildWin->GetAccessibleRole() )
- {
- RemoveChild( pChildWin );
- }
+ RemoveChild( pChildWin );
}
- break;
}
+ break;
}
- return 0;
}
OUString SAL_CALL SwAccessibleDocument::getImplementationName()
diff --git a/sw/source/core/access/accdoc.hxx b/sw/source/core/access/accdoc.hxx
index c31d294..98fc056 100644
--- a/sw/source/core/access/accdoc.hxx
+++ b/sw/source/core/access/accdoc.hxx
@@ -123,7 +123,7 @@ protected:
public:
SwAccessibleDocument( SwAccessibleMap* pInitMap );
- DECL_LINK( WindowChildEventListener, VclSimpleEvent* );
+ DECL_LINK_TYPED( WindowChildEventListener, VclWindowEvent&, void );
// XServiceInfo
diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx
index 3674f78..4782528 100644
--- a/sw/source/uibase/uiview/viewmdi.cxx
+++ b/sw/source/uibase/uiview/viewmdi.cxx
@@ -258,33 +258,26 @@ void SwView::SetViewLayout( sal_uInt16 nColumns, bool bBookMode, bool bViewOnly
// Scrollbar - Handler
-IMPL_LINK( SwView, WindowChildEventListener, VclSimpleEvent*, pEvent )
+IMPL_LINK_TYPED( SwView, WindowChildEventListener, VclWindowEvent&, rEvent, void )
{
- OSL_ENSURE( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" );
- if ( pEvent && pEvent->ISA( VclWindowEvent ) )
- {
- VclWindowEvent *pVclEvent = static_cast< VclWindowEvent * >( pEvent );
- OSL_ENSURE( pVclEvent->GetWindow(), "Window???" );
- vcl::Window* pChildWin = static_cast< vcl::Window* >( pVclEvent->GetData() );
+ OSL_ENSURE( rEvent.GetWindow(), "Window???" );
+ vcl::Window* pChildWin = static_cast< vcl::Window* >( rEvent.GetData() );
- switch ( pVclEvent->GetId() )
- {
- case VCLEVENT_WINDOW_HIDE:
- if( pChildWin == m_pHScrollbar )
- ShowHScrollbar( false );
- else if( pChildWin == m_pVScrollbar )
- ShowVScrollbar( false );
- break;
- case VCLEVENT_WINDOW_SHOW:
- if( pChildWin == m_pHScrollbar )
- ShowHScrollbar( true );
- else if( pChildWin == m_pVScrollbar )
- ShowVScrollbar( true );
- break;
- }
+ switch ( rEvent.GetId() )
+ {
+ case VCLEVENT_WINDOW_HIDE:
+ if( pChildWin == m_pHScrollbar )
+ ShowHScrollbar( false );
+ else if( pChildWin == m_pVScrollbar )
+ ShowVScrollbar( false );
+ break;
+ case VCLEVENT_WINDOW_SHOW:
+ if( pChildWin == m_pHScrollbar )
+ ShowHScrollbar( true );
+ else if( pChildWin == m_pVScrollbar )
+ ShowVScrollbar( true );
+ break;
}
-
- return 0;
}
int SwView::_CreateScrollbar( bool bHori )
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index 61098cd..b83169d 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -118,21 +118,19 @@ IMPL_LINK_TYPED( VCLXAccessibleComponent, WindowEventListener, VclWindowEvent&,
}
}
-IMPL_LINK( VCLXAccessibleComponent, WindowChildEventListener, VclSimpleEvent*, pEvent )
+IMPL_LINK_TYPED( VCLXAccessibleComponent, WindowChildEventListener, VclWindowEvent&, rEvent, void )
{
- DBG_ASSERT( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" );
- if ( pEvent && pEvent->ISA( VclWindowEvent ) && mxWindow.is() /* #i68079# */ )
+ if ( mxWindow.is() /* #i68079# */ )
{
- DBG_ASSERT( static_cast<VclWindowEvent*>(pEvent)->GetWindow(), "Window???" );
- if( !static_cast<VclWindowEvent*>(pEvent)->GetWindow()->IsAccessibilityEventsSuppressed() )
+ DBG_ASSERT( rEvent.GetWindow(), "Window???" );
+ if( !rEvent.GetWindow()->IsAccessibilityEventsSuppressed() )
{
// #103087# to prevent an early release of the component
uno::Reference< accessibility::XAccessibleContext > xTmp = this;
- ProcessWindowChildEvent( *static_cast<VclWindowEvent*>(pEvent) );
+ ProcessWindowChildEvent( rEvent );
}
}
- return 0;
}
uno::Reference< accessibility::XAccessible > VCLXAccessibleComponent::GetChildAccessible( const VclWindowEvent& rVclWindowEvent )
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index 00f7999..09751da 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -160,12 +160,12 @@ class VCLXToolkit : public VCLXToolkit_Impl,
::cppu::OInterfaceContainerHelper m_aTopWindowListeners;
::cppu::OInterfaceContainerHelper m_aKeyHandlers;
::cppu::OInterfaceContainerHelper m_aFocusListeners;
- ::Link<> m_aEventListenerLink;
+ ::Link<VclSimpleEvent&,void> m_aEventListenerLink;
::Link<VclWindowEvent&,bool> m_aKeyListenerLink;
bool m_bEventListener;
bool m_bKeyListener;
- DECL_LINK(eventListenerHandler, ::VclSimpleEvent const *);
+ DECL_LINK_TYPED(eventListenerHandler, ::VclSimpleEvent&, void);
DECL_LINK_TYPED(keyListenerHandler, ::VclWindowEvent&, bool);
@@ -1695,46 +1695,45 @@ void SAL_CALL VCLXToolkit::fireFocusLost(
}
-IMPL_LINK(VCLXToolkit, eventListenerHandler, ::VclSimpleEvent const *, pEvent)
+IMPL_LINK_TYPED(VCLXToolkit, eventListenerHandler, ::VclSimpleEvent&, rEvent, void)
{
- switch (pEvent->GetId())
+ switch (rEvent.GetId())
{
case VCLEVENT_WINDOW_SHOW:
callTopWindowListeners(
- pEvent, &css::awt::XTopWindowListener::windowOpened);
+ &rEvent, &css::awt::XTopWindowListener::windowOpened);
break;
case VCLEVENT_WINDOW_HIDE:
callTopWindowListeners(
- pEvent, &css::awt::XTopWindowListener::windowClosed);
+ &rEvent, &css::awt::XTopWindowListener::windowClosed);
break;
case VCLEVENT_WINDOW_ACTIVATE:
callTopWindowListeners(
- pEvent, &css::awt::XTopWindowListener::windowActivated);
+ &rEvent, &css::awt::XTopWindowListener::windowActivated);
break;
case VCLEVENT_WINDOW_DEACTIVATE:
callTopWindowListeners(
- pEvent, &css::awt::XTopWindowListener::windowDeactivated);
+ &rEvent, &css::awt::XTopWindowListener::windowDeactivated);
break;
case VCLEVENT_WINDOW_CLOSE:
callTopWindowListeners(
- pEvent, &css::awt::XTopWindowListener::windowClosing);
+ &rEvent, &css::awt::XTopWindowListener::windowClosing);
break;
case VCLEVENT_WINDOW_GETFOCUS:
- callFocusListeners(pEvent, true);
+ callFocusListeners(&rEvent, true);
break;
case VCLEVENT_WINDOW_LOSEFOCUS:
- callFocusListeners(pEvent, false);
+ callFocusListeners(&rEvent, false);
break;
case VCLEVENT_WINDOW_MINIMIZE:
callTopWindowListeners(
- pEvent, &css::awt::XTopWindowListener::windowMinimized);
+ &rEvent, &css::awt::XTopWindowListener::windowMinimized);
break;
case VCLEVENT_WINDOW_NORMALIZE:
callTopWindowListeners(
- pEvent, &css::awt::XTopWindowListener::windowNormalized);
+ &rEvent, &css::awt::XTopWindowListener::windowNormalized);
break;
}
- return 0;
}
IMPL_LINK_TYPED(VCLXToolkit, keyListenerHandler, ::VclWindowEvent&, rEvent, bool)
diff --git a/vcl/inc/osx/a11yfocustracker.hxx b/vcl/inc/osx/a11yfocustracker.hxx
index 2dc3d82..3dc3926 100644
--- a/vcl/inc/osx/a11yfocustracker.hxx
+++ b/vcl/inc/osx/a11yfocustracker.hxx
@@ -74,7 +74,7 @@ protected:
void toolbox_open_floater(vcl::Window *pWindow);
// callback function for Application::addEventListener
- static sal_IntPtr WindowEventHandler(void * pThis, void * pCaller);
+ static void WindowEventHandler(void * pThis, VclSimpleEvent&);
private:
// the accessible object that has the keyboard focus (if any)
diff --git a/vcl/inc/vcleventlisteners.hxx b/vcl/inc/vcleventlisteners.hxx
index 5be40e8..e2f72bf 100644
--- a/vcl/inc/vcleventlisteners.hxx
+++ b/vcl/inc/vcleventlisteners.hxx
@@ -34,11 +34,11 @@
class VCL_DLLPUBLIC VclEventListeners
{
public:
- void Call( VclSimpleEvent* pEvent ) const;
- void addListener( const Link<>& rListener );
- void removeListener( const Link<>& rListener );
+ void Call( VclSimpleEvent& rEvent ) const;
+ void addListener( const Link<VclSimpleEvent&,void>& rListener );
+ void removeListener( const Link<VclSimpleEvent&,void>& rListener );
private:
- std::vector<Link<>> m_aListeners;
+ std::vector<Link<VclSimpleEvent&,void>> m_aListeners;
};
#endif // INCLUDED_VCL_INC_VCLEVENTLISTENERS_HXX
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 00c1785..4eebb76 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -230,7 +230,7 @@ public:
VclPtr<vcl::Window> mpLastFocusWindow;
VclPtr<vcl::Window> mpDlgCtrlDownWindow;
std::vector<Link<VclWindowEvent&,void>> maEventListeners;
- VclEventListeners maChildEventListeners;
+ std::vector<Link<VclWindowEvent&,void>> maChildEventListeners;
// The canvas interface for this VCL window. Is persistent after the first GetCanvas() call
::com::sun::star::uno::WeakReference< ::com::sun::star::rendering::XCanvas > mxCanvas;
diff --git a/vcl/osx/a11yfocustracker.cxx b/vcl/osx/a11yfocustracker.cxx
index 0f3182d..8823ba8 100644
--- a/vcl/osx/a11yfocustracker.cxx
+++ b/vcl/osx/a11yfocustracker.cxx
@@ -43,42 +43,40 @@ getWindow(const ::VclSimpleEvent *pEvent)
// callback function for Application::addEventListener
-sal_IntPtr AquaA11yFocusTracker::WindowEventHandler(
- void * pThis, void * pCaller)
+void AquaA11yFocusTracker::WindowEventHandler(void * pThis, VclSimpleEvent& rEvent)
{
AquaA11yFocusTracker *pFocusTracker = static_cast<AquaA11yFocusTracker *>(
pThis);
- VclSimpleEvent const *pEvent = static_cast<VclSimpleEvent const *>(pCaller);
- switch (pEvent->GetId())
+ switch (rEvent.GetId())
{
case VCLEVENT_WINDOW_PAINT:
- pFocusTracker-> toolbox_open_floater( getWindow(pEvent) );
+ pFocusTracker-> toolbox_open_floater( getWindow(&rEvent) );
break;
case VCLEVENT_WINDOW_GETFOCUS:
- pFocusTracker->window_got_focus( getWindow(pEvent) );
+ pFocusTracker->window_got_focus( getWindow(&rEvent) );
break;
case VCLEVENT_OBJECT_DYING:
- pFocusTracker->m_aDocumentWindowList.erase( getWindow(pEvent) );
+ pFocusTracker->m_aDocumentWindowList.erase( getWindow(&rEvent) );
// intentional pass through ..
case VCLEVENT_TOOLBOX_HIGHLIGHTOFF:
- pFocusTracker->toolbox_highlight_off( getWindow(pEvent) );
+ pFocusTracker->toolbox_highlight_off( getWindow(&rEvent) );
break;
case VCLEVENT_TOOLBOX_HIGHLIGHT:
- pFocusTracker->toolbox_highlight_on( getWindow(pEvent) );
+ pFocusTracker->toolbox_highlight_on( getWindow(&rEvent) );
break;
case VCLEVENT_TABPAGE_ACTIVATE:
- pFocusTracker->tabpage_activated( getWindow(pEvent) );
+ pFocusTracker->tabpage_activated( getWindow(&rEvent) );
break;
case VCLEVENT_MENU_HIGHLIGHT:
// Inspired by code in WindowEventHandler in
// vcl/unx/gtk/a11y/atkutil.cxx, find out what kind of event
// it is to avoid blindly using a static_cast and crash,
// fdo#47275.
- if( const VclMenuEvent* pMenuEvent = dynamic_cast < const VclMenuEvent* > (pEvent) )
+ if( const VclMenuEvent* pMenuEvent = dynamic_cast < const VclMenuEvent* > (&rEvent) )
{
pFocusTracker->menu_highlighted( pMenuEvent );
}
- else if( const VclAccessibleEvent* pAccEvent = dynamic_cast < const VclAccessibleEvent* > (pEvent) )
+ else if( const VclAccessibleEvent* pAccEvent = dynamic_cast < const VclAccessibleEvent* > (&rEvent) )
{
Reference< XAccessible > xAccessible = pAccEvent->GetAccessible();
if( xAccessible.is() )
@@ -88,8 +86,6 @@ sal_IntPtr AquaA11yFocusTracker::WindowEventHandler(
default:
break;
};
-
- return 0;
}
AquaA11yFocusTracker::AquaA11yFocusTracker() :
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index c57ca13..b25b738 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -674,7 +674,7 @@ void Application::ImplCallEventListeners( sal_uLong nEvent, vcl::Window *pWin, v
VclWindowEvent aEvent( pWin, nEvent, pData );
if ( pSVData->maAppData.mpEventListeners )
- pSVData->maAppData.mpEventListeners->Call( &aEvent );
+ pSVData->maAppData.mpEventListeners->Call( aEvent );
}
void Application::ImplCallEventListeners( VclSimpleEvent& rEvent )
@@ -682,10 +682,10 @@ void Application::ImplCallEventListeners( VclSimpleEvent& rEvent )
ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->maAppData.mpEventListeners )
- pSVData->maAppData.mpEventListeners->Call( &rEvent );
+ pSVData->maAppData.mpEventListeners->Call( rEvent );
}
-void Application::AddEventListener( const Link<>& rEventListener )
+void Application::AddEventListener( const Link<VclSimpleEvent&,void>& rEventListener )
{
ImplSVData* pSVData = ImplGetSVData();
if( !pSVData->maAppData.mpEventListeners )
@@ -693,7 +693,7 @@ void Application::AddEventListener( const Link<>& rEventListener )
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list