summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-22 08:11:58 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-22 08:13:42 +0100
commite6c124ae3b4de78848344a172003de934e1cb163 (patch)
tree99bbb9c600af26b18842ef33fca9790685d55ccc /sw/source/uibase
parent08bdb40656898fc484f5200b63610a31369ddd87 (diff)
Some more loplugin:cstylecast: sw
note the two TODOs about suspicious casts Change-Id: I324fa05b30a5c8aa1d9e9a6d488a1e295226e788
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/docstyle.cxx2
-rw-r--r--sw/source/uibase/dialog/swabstdlg.cxx4
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx4
-rw-r--r--sw/source/uibase/inc/conttree.hxx6
-rw-r--r--sw/source/uibase/inc/srtdlg.hxx2
-rw-r--r--sw/source/uibase/inc/swdtflvr.hxx8
-rw-r--r--sw/source/uibase/shells/frmsh.cxx4
-rw-r--r--sw/source/uibase/table/tablepg.hxx4
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx2
-rw-r--r--sw/source/uibase/utlui/content.cxx5
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx5
11 files changed, 27 insertions, 19 deletions
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index ce60c981dfd1..a9e00cf7172e 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -1335,7 +1335,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
const SwCondCollItem* pCondItem;
if( SfxItemState::SET != rSet.GetItemState( FN_COND_COLL, false,
- (const SfxPoolItem**)&pCondItem ))
+ reinterpret_cast<const SfxPoolItem**>(&pCondItem) ))
pCondItem = 0;
if( RES_CONDTXTFMTCOLL == pColl->Which() && pCondItem )
diff --git a/sw/source/uibase/dialog/swabstdlg.cxx b/sw/source/uibase/dialog/swabstdlg.cxx
index 7b5ec71bbe10..34c84c93d6e7 100644
--- a/sw/source/uibase/dialog/swabstdlg.cxx
+++ b/sw/source/uibase/dialog/swabstdlg.cxx
@@ -44,8 +44,8 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create()
static const OUString sLibName(SWUI_DLL_NAME);
if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, sLibName,
SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY ) )
- fp = ( SwAbstractDialogFactory* (SAL_CALL*)() )
- aDialogLibrary.getFunctionSymbol( OUString("SwCreateDialogFactory"));
+ fp = reinterpret_cast<SwAbstractDialogFactory* (SAL_CALL*)()>(
+ aDialogLibrary.getFunctionSymbol( OUString("SwCreateDialogFactory")));
#else
fp = SwCreateDialogFactory();
#endif
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 845ea02087d1..d389a48b8180 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -3546,7 +3546,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
// Interfaces for Selection
void SwTransferable::CreateSelection( SwWrtShell& rSh,
- const SwViewShell * _pCreatorView )
+ const SwFrameShell * _pCreatorView )
{
SwModule *pMod = SW_MOD();
SwTransferable* pNew = new SwTransferable( rSh );
@@ -3559,7 +3559,7 @@ void SwTransferable::CreateSelection( SwWrtShell& rSh,
}
void SwTransferable::ClearSelection( SwWrtShell& rSh,
- const SwViewShell * _pCreatorView)
+ const SwFrameShell * _pCreatorView)
{
SwModule *pMod = SW_MOD();
if( pMod->pXSelection &&
diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx
index 43d76b38716a..2c603fef01b9 100644
--- a/sw/source/uibase/inc/conttree.hxx
+++ b/sw/source/uibase/inc/conttree.hxx
@@ -105,8 +105,7 @@ protected:
virtual void InitEntry(SvTreeListEntry*, const OUString&, const Image&, const Image&, SvLBoxButtonKind) SAL_OVERRIDE;
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
- SwNavigationPI* GetParentWindow(){return
- (SwNavigationPI*)Window::GetParent();}
+ SwNavigationPI* GetParentWindow();
virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ) SAL_OVERRIDE;
virtual void DragFinished( sal_Int8 ) SAL_OVERRIDE;
@@ -299,8 +298,7 @@ protected:
DECL_LINK( DoubleClickHdl, void* );
bool IsInternalDrag() const {return bIsInternalDrag;}
- SwNavigationPI* GetParentWindow()
- { return (SwNavigationPI*)Window::GetParent(); }
+ SwNavigationPI* GetParentWindow();
void OpenDoc(const SwGlblDocContent*);
void GotoContent(const SwGlblDocContent*);
diff --git a/sw/source/uibase/inc/srtdlg.hxx b/sw/source/uibase/inc/srtdlg.hxx
index c42a4cc6f809..a20fdeb6f04a 100644
--- a/sw/source/uibase/inc/srtdlg.hxx
+++ b/sw/source/uibase/inc/srtdlg.hxx
@@ -77,7 +77,7 @@ class SwSortDlg : public SvxStandardDialog
virtual void Apply() SAL_OVERRIDE;
sal_Unicode GetDelimChar() const;
- DECL_LINK( CheckHdl, CheckBox * );
+ DECL_LINK( CheckHdl, void * );
DECL_LINK( DelimHdl, RadioButton* );
DECL_LINK( LanguageHdl, ListBox* );
DECL_LINK(DelimCharHdl, void *);
diff --git a/sw/source/uibase/inc/swdtflvr.hxx b/sw/source/uibase/inc/swdtflvr.hxx
index d5cb2acc806b..12a6392730be 100644
--- a/sw/source/uibase/inc/swdtflvr.hxx
+++ b/sw/source/uibase/inc/swdtflvr.hxx
@@ -35,7 +35,7 @@ class SwDocFac;
class SwTextBlocks;
class SwWrtShell;
class SvxClipboardFmtItem;
-class SwViewShell;
+class SwFrameShell;
class SwView_Impl;
typedef sal_uInt16 TransferBufferType;
@@ -63,7 +63,7 @@ class SW_DLLPUBLIC SwTransferable : public TransferableHelper
SwWrtShell *pWrtShell;
/* #96392# Added pCreatorView to distinguish SwFrameShell from
SwWrtShell. */
- const SwViewShell *pCreatorView;
+ const SwFrameShell *pCreatorView;
SwDocFac *pClpDocFac;
Graphic *pClpGraphic, *pClpBitmap, *pOrigGrf;
INetBookmark *pBkmk; // URL and description!
@@ -197,9 +197,9 @@ public:
// Interfaces for Selection
/* #96392# Added pCreator to distinguish SwFrameShell from SwWrtShell. */
static void CreateSelection( SwWrtShell & rSh,
- const SwViewShell * pCreator = NULL );
+ const SwFrameShell * pCreator = NULL );
static void ClearSelection( SwWrtShell& rSh,
- const SwViewShell * pCreator = NULL );
+ const SwFrameShell * pCreator = NULL );
// the related SwView is being closed and the SwTransferable is invalid now
void Invalidate() {pWrtShell = 0;}
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 19c69e6790f6..cc6a8c805c61 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -969,7 +969,7 @@ SwFrameShell::SwFrameShell(SwView &_rView) :
SetHelpId(SW_FRAMESHELL);
// #96392# Use this to announce it is the frame shell who creates the selection.
- SwTransferable::CreateSelection( _rView.GetWrtShell(), (SwViewShell *) this );
+ SwTransferable::CreateSelection( _rView.GetWrtShell(), this );
SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Frame));
}
@@ -977,7 +977,7 @@ SwFrameShell::SwFrameShell(SwView &_rView) :
SwFrameShell::~SwFrameShell()
{
// #96392# Only clear the selection if it was this frame shell who created it.
- SwTransferable::ClearSelection( GetShell(), (SwViewShell *) this );
+ SwTransferable::ClearSelection( GetShell(), this );
}
void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
diff --git a/sw/source/uibase/table/tablepg.hxx b/sw/source/uibase/table/tablepg.hxx
index bd49752dc2ab..f89d66e7bb14 100644
--- a/sw/source/uibase/table/tablepg.hxx
+++ b/sw/source/uibase/table/tablepg.hxx
@@ -71,7 +71,7 @@ class SwFormatTablePage : public SfxTabPage
void Init();
void ModifyHdl(const Edit* pEdit);
- DECL_LINK( AutoClickHdl, CheckBox * );
+ DECL_LINK( AutoClickHdl, void * );
DECL_LINK( RelWidthClickHdl, CheckBox * );
void RightModify();
DECL_LINK( UpDownLoseFocusHdl, MetricField * );
@@ -115,7 +115,7 @@ class SwTableColumnPage : public SfxTabPage
bool bPercentMode:1;
void Init(bool bWeb);
- DECL_LINK( AutoClickHdl, CheckBox * );
+ DECL_LINK( AutoClickHdl, void * );
void ModifyHdl( MetricField* pEdit );
DECL_LINK( UpHdl, MetricField * );
DECL_LINK( DownHdl, MetricField * );
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index cfde02812e5b..f2112af54455 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -95,7 +95,7 @@ void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, bool bWeb )
const SwAddPrinterItem* pAddPrinterAttr;
if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, false,
- (const SfxPoolItem**)&pAddPrinterAttr ) )
+ reinterpret_cast<const SfxPoolItem**>(&pAddPrinterAttr) ) )
{
if( pIDDA )
pIDDA->setPrintData( *pAddPrinterAttr );
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 5c4ee6e223b6..9b89a7b39dd0 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -3537,6 +3537,11 @@ void SwContentTree::DataChanged( const DataChangedEvent& rDCEvt )
SvTreeListBox::DataChanged( rDCEvt );
}
+SwNavigationPI* SwContentTree::GetParentWindow()
+{
+ return static_cast<SwNavigationPI*>(Window::GetParent());
+}
+
sal_Int32 SwContentTree::GetEntryRealChildrenNum( SvTreeListEntry* pParent ) const
{
// ist es ein Inhaltstyp?
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index 9b40f9d4f312..ae6d50e71bd8 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -1203,6 +1203,11 @@ IMPL_LINK_NOARG( SwGlobalTree, DoubleClickHdl)
return 0;
}
+SwNavigationPI* SwGlobalTree::GetParentWindow()
+{
+ return static_cast<SwNavigationPI*>(Window::GetParent());
+}
+
IMPL_STATIC_LINK_NOINSTANCE(SwGlobalTree, ShowFrameHdl, SwGlobalTree*, EMPTYARG)
{
const SfxObjectShell* pShell = SwGlobalTree::GetShowShell();