summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/source/controller/main/ShapeController.cxx12
-rw-r--r--chart2/source/controller/main/ShapeController.hxx4
-rw-r--r--cui/source/factory/dlgfact.cxx4
-rw-r--r--cui/source/factory/dlgfact.hxx4
-rw-r--r--include/svx/svxdlg.hxx2
-rw-r--r--sc/source/ui/drawfunc/drawsh5.cxx10
-rw-r--r--sc/source/ui/inc/drawsh.hxx4
-rw-r--r--sd/source/ui/inc/DrawViewShell.hxx3
-rw-r--r--sd/source/ui/view/drviewsc.cxx9
-rw-r--r--sw/source/uibase/inc/drwbassh.hxx4
-rw-r--r--sw/source/uibase/shells/drwbassh.cxx12
11 files changed, 31 insertions, 37 deletions
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
index 6897a29650f4..7fc856e3d9b2 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -229,22 +229,20 @@ void ShapeController::describeSupportedFeatures()
implDescribeSupportedFeature( ".uno:ParagraphDialog", COMMAND_ID_PARAGRAPH_DIALOG, CommandGroup::EDIT );
}
-IMPL_LINK( ShapeController, CheckNameHdl, AbstractSvxNameDialog*, pDialog )
+IMPL_LINK_TYPED( ShapeController, CheckNameHdl, AbstractSvxObjectNameDialog&, rDialog, bool )
{
OUString aName;
- if ( pDialog )
- {
- pDialog->GetName( aName );
- }
+ rDialog.GetName( aName );
+
if ( !aName.isEmpty() )
{
DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : NULL );
if ( pDrawViewWrapper && pDrawViewWrapper->getNamedSdrObject( aName ) )
{
- return 0;
+ return false;
}
}
- return 1;
+ return true;
}
void ShapeController::executeDispatch_FormatLine()
diff --git a/chart2/source/controller/main/ShapeController.hxx b/chart2/source/controller/main/ShapeController.hxx
index b1601890458e..93c701e909a5 100644
--- a/chart2/source/controller/main/ShapeController.hxx
+++ b/chart2/source/controller/main/ShapeController.hxx
@@ -22,7 +22,7 @@
#include "FeatureCommandDispatchBase.hxx"
#include <tools/link.hxx>
-class AbstractSvxNameDialog;
+class AbstractSvxObjectNameDialog;
class SdrObject;
namespace chart
@@ -62,7 +62,7 @@ protected:
virtual void describeSupportedFeatures() SAL_OVERRIDE;
private:
- DECL_LINK( CheckNameHdl, AbstractSvxNameDialog* );
+ DECL_LINK_TYPED( CheckNameHdl, AbstractSvxObjectNameDialog&, bool);
void executeDispatch_FormatLine();
void executeDispatch_FormatArea();
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 0961103439f0..426fe2868abf 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -619,7 +619,7 @@ void AbstractSvxObjectNameDialog_Impl::GetName(OUString& rName)
pDlg->GetName(rName);
}
-void AbstractSvxObjectNameDialog_Impl::SetCheckNameHdl(const Link<>& rLink, bool bCheckImmediately)
+void AbstractSvxObjectNameDialog_Impl::SetCheckNameHdl(const Link<AbstractSvxObjectNameDialog&,bool>& rLink, bool bCheckImmediately)
{
aCheckNameHdl = rLink;
@@ -637,7 +637,7 @@ IMPL_LINK_NOARG_TYPED(AbstractSvxObjectNameDialog_Impl, CheckNameHdl, SvxObjectN
{
if(aCheckNameHdl.IsSet())
{
- return aCheckNameHdl.Call(this);
+ return aCheckNameHdl.Call(*this);
}
return false;
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index e4e962196d53..f7d9e6bd7bfb 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -342,10 +342,10 @@ class AbstractSvxObjectNameDialog_Impl :public AbstractSvxObjectNameDialog
{
DECL_ABSTDLG_BASE(AbstractSvxObjectNameDialog_Impl, SvxObjectNameDialog)
virtual void GetName(OUString& rName) SAL_OVERRIDE ;
- virtual void SetCheckNameHdl(const Link<>& rLink, bool bCheckImmediately = false) SAL_OVERRIDE;
+ virtual void SetCheckNameHdl(const Link<AbstractSvxObjectNameDialog&,bool>& rLink, bool bCheckImmediately = false) SAL_OVERRIDE;
private:
- Link<> aCheckNameHdl;
+ Link<AbstractSvxObjectNameDialog&,bool> aCheckNameHdl;
DECL_LINK_TYPED(CheckNameHdl, SvxObjectNameDialog&, bool);
};
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx
index 1ec6814627c4..0fb8845a39d3 100644
--- a/include/svx/svxdlg.hxx
+++ b/include/svx/svxdlg.hxx
@@ -169,7 +169,7 @@ class AbstractSvxObjectNameDialog :public VclAbstractDialog
{
public:
virtual void GetName(OUString& rName) = 0;
- virtual void SetCheckNameHdl(const Link<>& rLink, bool bCheckImmediately = false) = 0;
+ virtual void SetCheckNameHdl(const Link<AbstractSvxObjectNameDialog&,bool>& rLink, bool bCheckImmediately = false) = 0;
};
class AbstractSvxObjectTitleDescDialog :public VclAbstractDialog
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx
index d3f2dad76446..cdb6999bbad4 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -617,12 +617,10 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
}
}
-IMPL_LINK( ScDrawShell, NameObjectHdl, AbstractSvxNameDialog*, pDialog )
+IMPL_LINK_TYPED( ScDrawShell, NameObjectHdl, AbstractSvxObjectNameDialog&, rDialog, bool )
{
OUString aName;
-
- if( pDialog )
- pDialog->GetName( aName );
+ rDialog.GetName( aName );
ScDrawLayer* pModel = pViewData->GetDocument()->GetDrawLayer();
if ( !aName.isEmpty() && pModel )
@@ -631,11 +629,11 @@ IMPL_LINK( ScDrawShell, NameObjectHdl, AbstractSvxNameDialog*, pDialog )
if ( pModel->GetNamedObject( aName, 0, nDummyTab ) )
{
// existing object found -> name invalid
- return 0;
+ return false;
}
}
- return 1; // name is valid
+ return true; // name is valid
}
void ScDrawShell::ExecFormText(SfxRequest& rReq)
diff --git a/sc/source/ui/inc/drawsh.hxx b/sc/source/ui/inc/drawsh.hxx
index ec203b227a52..e32652c95664 100644
--- a/sc/source/ui/inc/drawsh.hxx
+++ b/sc/source/ui/inc/drawsh.hxx
@@ -27,7 +27,7 @@
#include <tools/link.hxx>
#include <rtl/ref.hxx>
-class AbstractSvxNameDialog;
+class AbstractSvxObjectNameDialog;
class ScViewData;
class ScDrawView;
namespace svx { namespace sidebar {
@@ -39,7 +39,7 @@ class ScDrawShell : public SfxShell
ScViewData* pViewData;
::rtl::Reference<svx::sidebar::SelectionChangeHandler> mpSelectionChangeHandler;
- DECL_LINK( NameObjectHdl, AbstractSvxNameDialog* );
+ DECL_LINK_TYPED( NameObjectHdl, AbstractSvxObjectNameDialog&, bool );
void SetHlinkForObject( SdrObject* pObj, const OUString& rHlnk );
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 1970900e9439..6205ef373113 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -44,6 +44,7 @@ class AbstractSvxNameDialog;
class SdrLayer;
class SvxClipboardFormatItem;
struct ESelection;
+class AbstractSvxObjectNameDialog;
namespace sd {
@@ -405,7 +406,7 @@ protected:
DECL_LINK_TYPED( ClipboardChanged, TransferableDataHelper*, void );
DECL_LINK_TYPED( TabSplitHdl, TabBar *, void );
- DECL_LINK( NameObjectHdl, AbstractSvxNameDialog* );
+ DECL_LINK_TYPED( NameObjectHdl, AbstractSvxObjectNameDialog&, bool );
DECL_LINK_TYPED( RenameSlideHdl, AbstractSvxNameDialog&, bool );
void DeleteActualPage();
diff --git a/sd/source/ui/view/drviewsc.cxx b/sd/source/ui/view/drviewsc.cxx
index 61957356d273..72e50e70b0c8 100644
--- a/sd/source/ui/view/drviewsc.cxx
+++ b/sd/source/ui/view/drviewsc.cxx
@@ -83,14 +83,11 @@ void DrawViewShell::UpdateIMapDlg( SdrObject* pObj )
}
}
-IMPL_LINK( DrawViewShell, NameObjectHdl, AbstractSvxNameDialog*, pDialog )
+IMPL_LINK_TYPED( DrawViewShell, NameObjectHdl, AbstractSvxObjectNameDialog&, rDialog, bool )
{
OUString aName;
-
- if( pDialog )
- pDialog->GetName( aName );
-
- return ( aName.isEmpty() || ( GetDoc() && !GetDoc()->GetObj( aName ) ) ) ? 1 : 0;
+ rDialog.GetName( aName );
+ return aName.isEmpty() || ( GetDoc() && !GetDoc()->GetObj( aName ) );
}
} // end of namespace sd
diff --git a/sw/source/uibase/inc/drwbassh.hxx b/sw/source/uibase/inc/drwbassh.hxx
index e58869555b8a..95254b27ac9c 100644
--- a/sw/source/uibase/inc/drwbassh.hxx
+++ b/sw/source/uibase/inc/drwbassh.hxx
@@ -25,12 +25,12 @@
class SwView;
class SfxItemSet;
class SwDrawBase;
-class AbstractSvxNameDialog;
+class AbstractSvxObjectNameDialog;
struct SvxSwFrameValidation;
class SwDrawBaseShell: public SwBaseShell
{
- DECL_LINK( CheckGroupShapeNameHdl, AbstractSvxNameDialog* );
+ DECL_LINK_TYPED( CheckGroupShapeNameHdl, AbstractSvxObjectNameDialog&, bool );
DECL_LINK_TYPED(ValidatePosition, SvxSwFrameValidation&, void );
public:
SwDrawBaseShell(SwView &rShell);
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index 71a4fa93b09b..196d1afa6609 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -588,7 +588,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
// Checks whether a given name is allowed for a group shape
-IMPL_LINK( SwDrawBaseShell, CheckGroupShapeNameHdl, AbstractSvxNameDialog*, pNameDialog )
+IMPL_LINK_TYPED( SwDrawBaseShell, CheckGroupShapeNameHdl, AbstractSvxObjectNameDialog&, rNameDialog, bool )
{
SwWrtShell &rSh = GetShell();
SdrView *pSdrView = rSh.GetDrawView();
@@ -597,13 +597,13 @@ IMPL_LINK( SwDrawBaseShell, CheckGroupShapeNameHdl, AbstractSvxNameDialog*, pNam
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
const OUString sCurrentName = pObj->GetName();
OUString sNewName;
- pNameDialog->GetName(sNewName);
- long nRet = 0;
+ rNameDialog.GetName(sNewName);
+ bool nRet = false;
if (sNewName.isEmpty() || sCurrentName == sNewName)
- nRet = 1;
+ nRet = true;
else
{
- nRet = 1;
+ nRet = true;
SwDrawModel* pModel = rSh.getIDocumentDrawModelAccess().GetDrawModel();
SdrObjListIter aIter( *(pModel->GetPage(0)), IM_DEEPWITHGROUPS );
while( aIter.IsMore() )
@@ -611,7 +611,7 @@ IMPL_LINK( SwDrawBaseShell, CheckGroupShapeNameHdl, AbstractSvxNameDialog*, pNam
SdrObject* pTempObj = aIter.Next();
if ( pObj != pTempObj && pTempObj->GetName().equals(sNewName) )
{
- nRet = 0;
+ nRet = false;
break;
}
}