basctl/source/basicide/basidesh.cxx | 9 - basctl/source/inc/basidesh.hxx | 4 cui/source/inc/optlingu.hxx | 1 cui/source/options/optlingu.cxx | 45 +++++---- dbaccess/source/ui/browser/unodatbr.cxx | 6 - dbaccess/source/ui/dlg/tablespage.cxx | 6 - dbaccess/source/ui/dlg/tablespage.hxx | 2 dbaccess/source/ui/inc/unodatbr.hxx | 2 extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx | 48 ++++------ include/svtools/simptabl.hxx | 2 include/svtools/stdmenu.hxx | 16 +-- include/svtools/svlbitm.hxx | 4 include/svtools/tabbar.hxx | 12 +- include/svtools/treelist.hxx | 12 +- include/svtools/treelistbox.hxx | 6 - include/svx/fntctl.hxx | 2 include/svx/fntszctl.hxx | 2 sc/source/ui/inc/tabcont.hxx | 2 sc/source/ui/inc/tabview.hxx | 3 sc/source/ui/view/tabcont.cxx | 6 - sc/source/ui/view/tabview.cxx | 4 sd/source/ui/inc/DrawViewShell.hxx | 24 ++--- sd/source/ui/view/drviews1.cxx | 4 svtools/source/contnr/simptabl.cxx | 8 - svtools/source/contnr/treelist.cxx | 4 svtools/source/contnr/treelistbox.cxx | 28 +---- svtools/source/control/stdmenu.cxx | 15 --- svtools/source/control/tabbar.cxx | 2 svx/source/mnuctrls/fntctl.cxx | 3 svx/source/mnuctrls/fntszctl.cxx | 5 - svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx | 8 - svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx | 2 sw/source/uibase/dbui/dbtree.cxx | 6 - sw/source/uibase/inc/dbtree.hxx | 2 34 files changed, 132 insertions(+), 173 deletions(-)
New commits: commit ed7ea6885400d62c84304917493ded4ba376c361 Author: Noel Grandin <[email protected]> Date: Mon Aug 31 14:34:51 2015 +0200 convert Link<> to typed Change-Id: I42eba6c9b6295d94dddc49942d47d59f474bfd28 diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index c776e6f..7d9b19c 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -3354,10 +3354,10 @@ bool SbaTableQueryBrowser::ensureConnection( SvTreeListEntry* _pDSEntry, void* p return _rConnection.is(); } -IMPL_LINK( SbaTableQueryBrowser, OnTreeEntryCompare, const SvSortData*, _pSortData ) +IMPL_LINK_TYPED( SbaTableQueryBrowser, OnTreeEntryCompare, const SvSortData&, _rSortData, sal_Int32 ) { - const SvTreeListEntry* pLHS = static_cast<const SvTreeListEntry*>(_pSortData->pLeft); - const SvTreeListEntry* pRHS = static_cast<const SvTreeListEntry*>(_pSortData->pRight); + const SvTreeListEntry* pLHS = static_cast<const SvTreeListEntry*>(_rSortData.pLeft); + const SvTreeListEntry* pRHS = static_cast<const SvTreeListEntry*>(_rSortData.pRight); OSL_ENSURE(pLHS && pRHS, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid tree entries!"); // we want the table entry and the end so we have to do a check diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index 6980f80..f67f833 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -402,10 +402,10 @@ namespace dbaui { return OnControlModified(static_cast<Button*>(_pControl)); } - IMPL_LINK( OTableSubscriptionPage, OnTreeEntryCompare, const SvSortData*, _pSortData ) + IMPL_LINK_TYPED( OTableSubscriptionPage, OnTreeEntryCompare, const SvSortData&, _rSortData, sal_Int32 ) { - const SvTreeListEntry* pLHS = static_cast<const SvTreeListEntry*>(_pSortData->pLeft); - const SvTreeListEntry* pRHS = static_cast<const SvTreeListEntry*>(_pSortData->pRight); + const SvTreeListEntry* pLHS = static_cast<const SvTreeListEntry*>(_rSortData.pLeft); + const SvTreeListEntry* pRHS = static_cast<const SvTreeListEntry*>(_rSortData.pRight); OSL_ENSURE(pLHS && pRHS, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid tree entries!"); const SvLBoxString* pLeftTextItem = static_cast<const SvLBoxString*>(pLHS->GetFirstItem(SV_ITEM_ID_LBOXSTRING)); diff --git a/dbaccess/source/ui/dlg/tablespage.hxx b/dbaccess/source/ui/dlg/tablespage.hxx index 6b2c8b2..6913f27 100644 --- a/dbaccess/source/ui/dlg/tablespage.hxx +++ b/dbaccess/source/ui/dlg/tablespage.hxx @@ -64,7 +64,7 @@ namespace dbaui virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; - DECL_LINK( OnTreeEntryCompare, const SvSortData* ); + DECL_LINK_TYPED( OnTreeEntryCompare, const SvSortData&, sal_Int32 ); DECL_LINK( OnTreeEntryChecked, Control* ); private: diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx index ccd7b5c..86a48c0 100644 --- a/dbaccess/source/ui/inc/unodatbr.hxx +++ b/dbaccess/source/ui/inc/unodatbr.hxx @@ -352,7 +352,7 @@ namespace dbaui DECL_LINK( OnCopyEntry, void* ); - DECL_LINK( OnTreeEntryCompare, const SvSortData* ); + DECL_LINK_TYPED( OnTreeEntryCompare, const SvSortData&, sal_Int32 ); DECL_LINK_TYPED( OnAsyncDrop, void*, void ); diff --git a/include/svtools/simptabl.hxx b/include/svtools/simptabl.hxx index 4e1c64a6..f892646 100644 --- a/include/svtools/simptabl.hxx +++ b/include/svtools/simptabl.hxx @@ -67,7 +67,7 @@ private: DECL_LINK_TYPED( DragHdl, HeaderBar*, void ); DECL_LINK_TYPED( EndDragHdl, HeaderBar*, void ); DECL_LINK_TYPED( HeaderBarClick, HeaderBar*, void ); - DECL_LINK( CompareHdl, SvSortData* ); + DECL_LINK_TYPED( CompareHdl, const SvSortData&, sal_Int32 ); protected: diff --git a/include/svtools/treelist.hxx b/include/svtools/treelist.hxx index 510014a..26e3f90 100644 --- a/include/svtools/treelist.hxx +++ b/include/svtools/treelist.hxx @@ -71,8 +71,8 @@ class SVT_DLLPUBLIC SvTreeList ListViewsType aViewList; sal_uLong nEntryCount; - Link<> aCloneLink; - Link<> aCompareLink; + Link<SvTreeListEntry*, SvTreeListEntry*> aCloneLink; + Link<const SvSortData&, sal_Int32> aCompareLink; SvSortMode eSortMode; sal_uInt16 nRefCount; @@ -213,11 +213,11 @@ public: // Declaration of the Clone Handler: // DECL_LINK(CloneHdl,SvTreeListEntry*); // The Handler needs to return a SvTreeListEntry* - SvTreeListEntry* Clone( SvTreeListEntry* pEntry, sal_uLong& nCloneCount ) const; - void SetCloneLink( const Link<>& rLink ) + SvTreeListEntry* Clone( SvTreeListEntry* pEntry, sal_uLong& nCloneCount ) const; + void SetCloneLink( const Link<SvTreeListEntry*,SvTreeListEntry*>& rLink ) { aCloneLink=rLink; } - const Link<>& GetCloneLink() const + const Link<SvTreeListEntry*,SvTreeListEntry*>& GetCloneLink() const { return aCloneLink; } SvTreeListEntry* CloneEntry( SvTreeListEntry* pSource ) const; // Calls the Clone Link @@ -229,7 +229,7 @@ public: void SetSortMode( SvSortMode eMode ) { eSortMode = eMode; } SvSortMode GetSortMode() const { return eSortMode; } sal_Int32 Compare(const SvTreeListEntry* pLeft, const SvTreeListEntry* pRight) const; - void SetCompareHdl( const Link<>& rLink ) { aCompareLink = rLink; } + void SetCompareHdl( const Link<const SvSortData&, sal_Int32>& rLink ) { aCompareLink = rLink; } void Resort(); void Reverse(); }; diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx index 83789c7..8e463af 100644 --- a/include/svtools/treelistbox.hxx +++ b/include/svtools/treelistbox.hxx @@ -297,7 +297,7 @@ private: DECL_DLLPRIVATE_LINK_TYPED( CheckButtonClick, SvLBoxButtonData *, void ); DECL_DLLPRIVATE_LINK( TextEditEndedHdl_Impl, void * ); // Handler that is called by TreeList to clone an Entry - DECL_DLLPRIVATE_LINK( CloneHdl_Impl, SvTreeListEntry* ); + DECL_DLLPRIVATE_LINK_TYPED( CloneHdl_Impl, SvTreeListEntry*, SvTreeListEntry* ); // Handler and methods for Drag - finished handler. // The Handle retrieved by GetDragFinishedHdl can be set on the @@ -777,7 +777,7 @@ public: // A Parent's Children are turned into Children of the Parent which comes next in hierarchy void RemoveParentKeepChildren( SvTreeListEntry* pParent ); - DECL_LINK( DefaultCompare, SvSortData* ); + DECL_LINK_TYPED( DefaultCompare, const SvSortData&, sal_Int32 ); virtual void ModelNotification( SvListAction nActionId, SvTreeListEntry* pEntry1, SvTreeListEntry* pEntry2, sal_uLong nPos ) SAL_OVERRIDE; diff --git a/svtools/source/contnr/simptabl.cxx b/svtools/source/contnr/simptabl.cxx index 16a16bb..de1c3ac 100644 --- a/svtools/source/contnr/simptabl.cxx +++ b/svtools/source/contnr/simptabl.cxx @@ -462,11 +462,11 @@ sal_Int32 SvSimpleTable::ColCompare(SvTreeListEntry* pLeft,SvTreeListEntry* pRig return nCompare; } -IMPL_LINK( SvSimpleTable, CompareHdl, SvSortData*, pData) +IMPL_LINK_TYPED( SvSimpleTable, CompareHdl, const SvSortData&, rData, sal_Int32) { - SvTreeListEntry* pLeft = const_cast<SvTreeListEntry*>(pData->pLeft); - SvTreeListEntry* pRight = const_cast<SvTreeListEntry*>(pData->pRight); - return (long) ColCompare(pLeft,pRight); + SvTreeListEntry* pLeft = const_cast<SvTreeListEntry*>(rData.pLeft); + SvTreeListEntry* pRight = const_cast<SvTreeListEntry*>(rData.pRight); + return ColCompare(pLeft,pRight); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index 27520b1..231baec 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -389,7 +389,7 @@ void SvTreeList::InsertTree(SvTreeListEntry* pSrcEntry, SvTreeListEntry* SvTreeList::CloneEntry( SvTreeListEntry* pSource ) const { if( aCloneLink.IsSet() ) - return reinterpret_cast<SvTreeListEntry*>(aCloneLink.Call( pSource )); + return aCloneLink.Call( pSource ); SvTreeListEntry* pEntry = CreateEntry(); pEntry->Clone(pSource); return pEntry; @@ -1539,7 +1539,7 @@ sal_Int32 SvTreeList::Compare(const SvTreeListEntry* pLeft, const SvTreeListEntr SvSortData aSortData; aSortData.pLeft = pLeft; aSortData.pRight = pRight; - return aCompareLink.Call( &aSortData ); + return aCompareLink.Call( aSortData ); } return 0; } diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 3926371..e2b496b 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -359,8 +359,6 @@ struct SvTreeListBoxImpl bool m_bEntryMnemonicsEnabled:1; bool m_bDoingQuickSelection:1; - Link<>* m_pLink; - vcl::MnemonicEngine m_aMnemonicEngine; vcl::QuickSelectionEngine m_aQuickSelectionEngine; @@ -368,7 +366,6 @@ struct SvTreeListBoxImpl m_bIsEmptyTextAllowed(true), m_bEntryMnemonicsEnabled(false), m_bDoingQuickSelection(false), - m_pLink(NULL), m_aMnemonicEngine(_rBox), m_aQuickSelectionEngine(_rBox) {} }; @@ -464,9 +461,9 @@ bool SvTreeListBox::IsEntryMnemonicsEnabled() const return mpImpl->m_bEntryMnemonicsEnabled; } -IMPL_LINK( SvTreeListBox, CloneHdl_Impl, SvTreeListEntry*, pEntry ) +IMPL_LINK_TYPED( SvTreeListBox, CloneHdl_Impl, SvTreeListEntry*, pEntry, SvTreeListEntry* ) { - return reinterpret_cast<sal_IntPtr>(CloneEntry(pEntry)); + return CloneEntry(pEntry); } sal_uLong SvTreeListBox::Insert( SvTreeListEntry* pEntry, SvTreeListEntry* pParent, sal_uLong nPos ) @@ -630,7 +627,7 @@ bool SvTreeListBox::CopySelection( SvTreeListBox* pSource, SvTreeListEntry* pTar bool bSuccess = true; std::vector<SvTreeListEntry*> aList; bool bClone = ( pSource->GetModel() != GetModel() ); - Link<> aCloneLink( pModel->GetCloneLink() ); + Link<SvTreeListEntry*,SvTreeListEntry*> aCloneLink( pModel->GetCloneLink() ); pModel->SetCloneLink( LINK(this, SvTreeListBox, CloneHdl_Impl )); // cache selection to simplify iterating over the selection when doing a D&D @@ -687,7 +684,7 @@ bool SvTreeListBox::MoveSelectionCopyFallbackPossible( SvTreeListBox* pSource, S bool bSuccess = true; std::vector<SvTreeListEntry*> aList; bool bClone = ( pSource->GetModel() != GetModel() ); - Link<> aCloneLink( pModel->GetCloneLink() ); + Link<SvTreeListEntry*,SvTreeListEntry*> aCloneLink( pModel->GetCloneLink() ); if ( bClone ) pModel->SetCloneLink( LINK(this, SvTreeListBox, CloneHdl_Impl )); @@ -1411,9 +1408,6 @@ void SvTreeListBox::InitTreeView() nAllItemAccRoleType = SvTreeAccRoleType::NONE; mnCheckboxItemWidth = 0; - Link<>* pLink = new Link<>( LINK(this,SvTreeListBox, DefaultCompare) ); - mpImpl->m_pLink = pLink; - nTreeFlags = SvTreeFlags::RECALCTABS; nIndent = SV_LBOX_DEFAULT_INDENT_PIXEL; nEntryHeightOffs = SV_ENTRYHEIGHTOFFS_PIXEL; @@ -1519,9 +1513,6 @@ void SvTreeListBox::dispose() } if( mpImpl ) { - delete mpImpl->m_pLink; - mpImpl->m_pLink = NULL; - ClearTabList(); delete pEdCtrl; @@ -2821,7 +2812,7 @@ void SvTreeListBox::ImplInitStyle() else { GetModel()->SetSortMode(SortNone); - GetModel()->SetCompareHdl(Link<>()); + GetModel()->SetCompareHdl(Link<const SvSortData&,sal_Int32>()); } pImp->SetStyle(nWindowStyle); pImp->Resize(); @@ -3602,10 +3593,10 @@ void SvTreeListBox::RequestHelp( const HelpEvent& rHEvt ) Control::RequestHelp( rHEvt ); } -IMPL_LINK( SvTreeListBox, DefaultCompare, SvSortData*, pData ) +IMPL_LINK_TYPED( SvTreeListBox, DefaultCompare, const SvSortData&, rData, sal_Int32 ) { - const SvTreeListEntry* pLeft = pData->pLeft; - const SvTreeListEntry* pRight = pData->pRight; + const SvTreeListEntry* pLeft = rData.pLeft; + const SvTreeListEntry* pRight = rData.pRight; OUString aLeft( static_cast<const SvLBoxString*>(pLeft->GetFirstItem(SV_ITEM_ID_LBOXSTRING))->GetText()); OUString aRight( static_cast<const SvLBoxString*>(pRight->GetFirstItem(SV_ITEM_ID_LBOXSTRING))->GetText()); pImp->UpdateStringSorter(); diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx index 2bd53c1..3c2b6ff 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx @@ -289,11 +289,11 @@ void DictionaryList::sortByColumn( sal_uInt16 nSortColumnIndex, bool bSortAtoZ ) } -IMPL_LINK( DictionaryList, CompareHdl, SvSortData*, pData ) +IMPL_LINK_TYPED( DictionaryList, CompareHdl, const SvSortData&, rData, sal_Int32 ) { - SvTreeListEntry* pLeft = const_cast<SvTreeListEntry*>(pData->pLeft); - SvTreeListEntry* pRight = const_cast<SvTreeListEntry*>(pData->pRight); - return (long) ColumnCompare(pLeft,pRight); + SvTreeListEntry* pLeft = const_cast<SvTreeListEntry*>(rData.pLeft); + SvTreeListEntry* pRight = const_cast<SvTreeListEntry*>(rData.pRight); + return ColumnCompare(pLeft,pRight); } sal_Int32 DictionaryList::ColumnCompare( SvTreeListEntry* pLeft, SvTreeListEntry* pRight ) diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx index 04bdfb7..265542b 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx @@ -89,7 +89,7 @@ private: OUString getPropertyTypeName( sal_Int16 nConversionPropertyType /*linguistic2::ConversionPropertyType*/ ) const; OUString makeTabString( const DictionaryEntry& rEntry ) const; - DECL_LINK( CompareHdl, SvSortData* ); + DECL_LINK_TYPED( CompareHdl, const SvSortData&, sal_Int32 ); sal_Int32 ColumnCompare( SvTreeListEntry* pLeft, SvTreeListEntry* pRight ); SvLBoxItem* getItemAtColumn( SvTreeListEntry* pEntry, sal_uInt16 nColumn ) const; diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx index 9aaf094..0defde0 100644 --- a/sw/source/uibase/dbui/dbtree.cxx +++ b/sw/source/uibase/dbui/dbtree.cxx @@ -407,14 +407,14 @@ void SwDBTreeList::RequestingChildren(SvTreeListEntry* pParent) } } -IMPL_LINK( SwDBTreeList, DBCompare, SvSortData*, pData ) +IMPL_LINK_TYPED( SwDBTreeList, DBCompare, const SvSortData&, rData, sal_Int32 ) { - SvTreeListEntry* pRight = const_cast<SvTreeListEntry*>(pData->pRight); + SvTreeListEntry* pRight = const_cast<SvTreeListEntry*>(rData.pRight); if (GetParent(pRight) && GetParent(GetParent(pRight))) return 1; // don't sort column names - return DefaultCompare(pData); // otherwise call base class + return DefaultCompare(rData); // otherwise call base class } OUString SwDBTreeList::GetDBName(OUString& rTableName, OUString& rColumnName, sal_Bool* pbIsTable) diff --git a/sw/source/uibase/inc/dbtree.hxx b/sw/source/uibase/inc/dbtree.hxx index dfb7930..46a0224 100644 --- a/sw/source/uibase/inc/dbtree.hxx +++ b/sw/source/uibase/inc/dbtree.hxx @@ -41,7 +41,7 @@ class SW_DLLPUBLIC SwDBTreeList : public SvTreeListBox SwDBTreeList_Impl* pImpl; - DECL_DLLPRIVATE_LINK( DBCompare, SvSortData* ); + DECL_DLLPRIVATE_LINK_TYPED( DBCompare, const SvSortData&, sal_Int32 ); SAL_DLLPRIVATE void InitTreeList(); SAL_DLLPRIVATE virtual void RequestingChildren( SvTreeListEntry* pParent ) SAL_OVERRIDE; commit 2ec22477739d2c075e7d9997c3e90cb1a512f63f Author: Noel Grandin <[email protected]> Date: Mon Aug 31 13:41:05 2015 +0200 convert Link<> to typed Change-Id: I743c74b134552eefb14d35e54491494160f1ffbd diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index a0c26a0..979d2dc 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -449,23 +449,18 @@ void Shell::OuterResizePixel( const Point &rPos, const Size &rSize ) } -IMPL_LINK( Shell, TabBarSplitHdl, TabBar *, pTBar ) +IMPL_LINK_NOARG_TYPED( Shell, TabBarSplitHdl, ::TabBar *, void ) { - (void)pTBar; bTabBarSplitted = true; ArrangeTabBar(); - - return 0; } -IMPL_LINK( Shell, TabBarHdl, TabBar *, pCurTabBar ) +IMPL_LINK_TYPED( Shell, TabBarHdl, ::TabBar *, pCurTabBar, void ) { sal_uInt16 nCurId = pCurTabBar->GetCurPageId(); BaseWindow* pWin = aWindowTable[ nCurId ]; DBG_ASSERT( pWin, "Eintrag in TabBar passt zu keinem Fenster!" ); SetCurWindow( pWin ); - - return 0; } diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx index eed9977..9206e01 100644 --- a/basctl/source/inc/basidesh.hxx +++ b/basctl/source/inc/basidesh.hxx @@ -105,8 +105,8 @@ private: void ImplStartListening( StarBASIC* pBasic ); - DECL_LINK( TabBarHdl, TabBar* ); - DECL_LINK( TabBarSplitHdl, TabBar * ); + DECL_LINK_TYPED( TabBarHdl, ::TabBar*, void ); + DECL_LINK_TYPED( TabBarSplitHdl, ::TabBar *, void ); static unsigned nShellCount; diff --git a/include/svtools/tabbar.hxx b/include/svtools/tabbar.hxx index 99539e05..f7ae4d4 100644 --- a/include/svtools/tabbar.hxx +++ b/include/svtools/tabbar.hxx @@ -348,9 +348,9 @@ private: bool mbMirrored : 1; bool mbScrollAlwaysEnabled : 1; - Link<> maSelectHdl; - Link<> maSplitHdl; - Link<> maScrollAreaContextHdl; + Link<TabBar*,void> maSelectHdl; + Link<TabBar*,void> maSplitHdl; + Link<const CommandEvent&, void> maScrollAreaContextHdl; size_t maCurrentItemList; using Window::ImplInit; @@ -496,9 +496,9 @@ public: Size CalcWindowSizePixel() const; - void SetSelectHdl( const Link<>& rLink ) { maSelectHdl = rLink; } - void SetSplitHdl( const Link<>& rLink ) { maSplitHdl = rLink; } - void SetScrollAreaContextHdl( const Link<>& rLink ) { maScrollAreaContextHdl = rLink; } + void SetSelectHdl( const Link<TabBar*,void>& rLink ) { maSelectHdl = rLink; } + void SetSplitHdl( const Link<TabBar*,void>& rLink ) { maSplitHdl = rLink; } + void SetScrollAreaContextHdl( const Link<const CommandEvent&,void>& rLink ) { maScrollAreaContextHdl = rLink; } // accessibility virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() SAL_OVERRIDE; diff --git a/sc/source/ui/inc/tabcont.hxx b/sc/source/ui/inc/tabcont.hxx index d1515c5..4c1da4c 100644 --- a/sc/source/ui/inc/tabcont.hxx +++ b/sc/source/ui/inc/tabcont.hxx @@ -42,7 +42,7 @@ private: sal_uInt16 GetMaxId() const; SCTAB GetPrivatDropPos(const Point& rPos ); - DECL_LINK(ShowPageList, const CommandEvent*); + DECL_LINK_TYPED(ShowPageList, const CommandEvent&, void); void SwitchToPageId(sal_uInt16 nId); protected: diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx index 216fdf8..5e3ea93 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -54,6 +54,7 @@ class SdrObject; class ScHintWindow; class ScPageBreakData; class SdrHdlList; +class TabBar; namespace com { namespace sun { namespace star { namespace chart2 { namespace data { @@ -237,7 +238,7 @@ public: void RemoveHintWindow(); void TestHintWindow(); - DECL_LINK( TabBarResize, void* ); + DECL_LINK_TYPED( TabBarResize, ::TabBar*, void ); /** Sets an absolute tab bar width (in pixels). */ void SetTabBarWidth( long nNewWidth ); /** Sets a relative tab bar width. diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx index 6f2ea42..abe0aac 100644 --- a/sc/source/ui/view/tabcont.cxx +++ b/sc/source/ui/view/tabcont.cxx @@ -84,7 +84,7 @@ ScTabControl::ScTabControl( vcl::Window* pParent, ScViewData* pData ) SetScrollAreaContextHdl( LINK( this, ScTabControl, ShowPageList ) ); } -IMPL_LINK(ScTabControl, ShowPageList, const CommandEvent *, pEvent) +IMPL_LINK_TYPED(ScTabControl, ShowPageList, const CommandEvent &, rEvent, void) { PopupMenu aPopup; @@ -107,10 +107,8 @@ IMPL_LINK(ScTabControl, ShowPageList, const CommandEvent *, pEvent) } } - sal_uInt16 nItemId = aPopup.Execute( this, pEvent->GetMousePosPixel() ); + sal_uInt16 nItemId = aPopup.Execute( this, rEvent.GetMousePosPixel() ); SwitchToPageId(nItemId); - - return 0; } ScTabControl::~ScTabControl() diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index b0b020e..443f7ef 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -839,7 +839,7 @@ void ScTabView::GetBorderSize( SvBorder& rBorder, const Size& /* rSize */ ) ::std::swap( rBorder.Left(), rBorder.Right() ); } -IMPL_LINK_NOARG(ScTabView, TabBarResize) +IMPL_LINK_NOARG_TYPED(ScTabView, TabBarResize, TabBar*, void) { if (aViewData.IsHScrollMode()) { @@ -862,8 +862,6 @@ IMPL_LINK_NOARG(ScTabView, TabBarResize) RepeatResize(); } } - - return 0; } void ScTabView::SetTabBarWidth( long nNewWidth ) diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index 44b56f2..c3bf37d 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -389,22 +389,22 @@ public: //move this method to ViewShell. //void NotifyAccUpdate(); protected: - DrawView* mpDrawView; - SdPage* mpActualPage; - Rectangle maMarkRect; - Point maMousePos; - bool mbMousePosFreezed; + DrawView* mpDrawView; + SdPage* mpActualPage; + Rectangle maMarkRect; + Point maMousePos; + bool mbMousePosFreezed; VclPtr<TabControl> maTabControl; - EditMode meEditMode; - PageKind mePageKind; - bool mbZoomOnPage; - bool mbIsRulerDrag; + EditMode meEditMode; + PageKind mePageKind; + bool mbZoomOnPage; + bool mbIsRulerDrag; sal_uLong mnLockCount; - bool mbReadOnly; - static bool mbPipette; + bool mbReadOnly; + static bool mbPipette; DECL_LINK_TYPED( ClipboardChanged, TransferableDataHelper*, void ); - DECL_LINK( TabSplitHdl, TabBar * ); + DECL_LINK_TYPED( TabSplitHdl, TabBar *, void ); DECL_LINK( NameObjectHdl, AbstractSvxNameDialog* ); DECL_LINK( RenameSlideHdl, AbstractSvxNameDialog* ); diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 32cd1d4..f04dea6 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -606,7 +606,7 @@ void DrawViewShell::SetUIUnit(FieldUnit eUnit) * Refresh TabControl on splitter change */ -IMPL_LINK( DrawViewShell, TabSplitHdl, TabBar *, pTab ) +IMPL_LINK_TYPED( DrawViewShell, TabSplitHdl, TabBar *, pTab, void ) { const long int nMax = maViewSize.Width() - maScrBarWH.Width() - maTabControl->GetPosPixel().X() ; @@ -626,8 +626,6 @@ IMPL_LINK( DrawViewShell, TabSplitHdl, TabBar *, pTab ) Size aScrSize(nMax - aTabSize.Width(), maScrBarWH.Height()); mpHorizontalScrollBar->SetPosSizePixel(aPos, aScrSize); - - return 0; } /// inherited from sd::ViewShell diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 68637b6..04a0489 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -290,7 +290,7 @@ void ImplTabButton::Command(const CommandEvent& rCommandEvent) if (rCommandEvent.GetCommand() == CommandEventId::ContextMenu) { TabBar* pParent = GetParent(); - pParent->maScrollAreaContextHdl.Call(const_cast<CommandEvent *>(&rCommandEvent)); + pParent->maScrollAreaContextHdl.Call(rCommandEvent); } PushButton::Command(rCommandEvent); } commit 66a205d56f4ebd3ce6f32472ce90eb2c94f6f840 Author: Noel Grandin <[email protected]> Date: Mon Aug 31 13:12:16 2015 +0200 convert Link<> to typed Change-Id: I047c52f37b21b1264396d7077a1f35f6d2b13f3f diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx index 89a8e67..36ae80a 100644 --- a/cui/source/inc/optlingu.hxx +++ b/cui/source/inc/optlingu.hxx @@ -79,6 +79,7 @@ class SvxEditModulesDlg : public ModalDialog DECL_LINK_TYPED(ClickHdl_Impl, Button*, void); DECL_LINK_TYPED(BackHdl_Impl, Button*, void); DECL_LINK( LangSelectHdl_Impl, ListBox* ); + DECL_LINK_TYPED( BoxCheckButtonHdl_Impl2, SvLBoxButtonData*, void ); DECL_LINK( BoxCheckButtonHdl_Impl, SvTreeListBox * ); DECL_LINK(OpenURLHdl_Impl, void *); diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 35c8b89..b855be3 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -1935,7 +1935,7 @@ SvTreeListEntry* SvxEditModulesDlg::CreateEntry( OUString& rTxt, sal_uInt16 nCol if( !pCheckButtonData ) { pCheckButtonData = new SvLBoxButtonData(m_pModulesCLB); - pCheckButtonData->SetLink( m_pModulesCLB->GetCheckButtonHdl() ); + pCheckButtonData->SetLink( LINK( this, SvxEditModulesDlg, BoxCheckButtonHdl_Impl2 ) ); } if (CBCOL_FIRST == nCol) @@ -1984,33 +1984,36 @@ IMPL_LINK( SvxEditModulesDlg, SelectHdl_Impl, SvxCheckListBox *, pBox ) return 0; } -IMPL_LINK( SvxEditModulesDlg, BoxCheckButtonHdl_Impl, SvTreeListBox *, pBox ) +IMPL_LINK_NOARG_TYPED( SvxEditModulesDlg, BoxCheckButtonHdl_Impl2, SvLBoxButtonData*, void ) { - pBox = m_pModulesCLB; - SvTreeListEntry *pCurEntry = pBox->GetCurEntry(); - if (pCurEntry) + BoxCheckButtonHdl_Impl(NULL); +} +IMPL_LINK( SvxEditModulesDlg, BoxCheckButtonHdl_Impl, SvTreeListBox *, /*pBox*/ ) +{ + SvTreeListEntry *pCurEntry = m_pModulesCLB->GetCurEntry(); + if (pCurEntry) + { + ModuleUserData_Impl* pData = static_cast<ModuleUserData_Impl *>( + pCurEntry->GetUserData()); + if (!pData->IsParent() && pData->GetType() == TYPE_HYPH) { - ModuleUserData_Impl* pData = static_cast<ModuleUserData_Impl *>( - pCurEntry->GetUserData()); - if (!pData->IsParent() && pData->GetType() == TYPE_HYPH) + // make hyphenator checkboxes function as radio-buttons + // (at most one box may be checked) + SvTreeListEntry *pEntry = m_pModulesCLB->First(); + while (pEntry) { - // make hyphenator checkboxes function as radio-buttons - // (at most one box may be checked) - SvTreeListEntry *pEntry = pBox->First(); - while (pEntry) + pData = static_cast<ModuleUserData_Impl*>(pEntry->GetUserData()); + if (!pData->IsParent() && + pData->GetType() == TYPE_HYPH && + pEntry != pCurEntry) { - pData = static_cast<ModuleUserData_Impl*>(pEntry->GetUserData()); - if (!pData->IsParent() && - pData->GetType() == TYPE_HYPH && - pEntry != pCurEntry) - { - lcl_SetCheckButton( pEntry, false ); - pBox->InvalidateEntry( pEntry ); - } - pEntry = pBox->Next( pEntry ); + lcl_SetCheckButton( pEntry, false ); + m_pModulesCLB->InvalidateEntry( pEntry ); } + pEntry = m_pModulesCLB->Next( pEntry ); } } + } return 0; } diff --git a/include/svtools/svlbitm.hxx b/include/svtools/svlbitm.hxx index 2aa8e63..f65996c 100644 --- a/include/svtools/svlbitm.hxx +++ b/include/svtools/svlbitm.hxx @@ -59,7 +59,7 @@ struct SvLBoxButtonData_Impl; class SVT_DLLPUBLIC SvLBoxButtonData { private: - Link<> aLink; + Link<SvLBoxButtonData*,void> aLink; long nWidth; long nHeight; SvLBoxButtonData_Impl* pImpl; @@ -80,7 +80,7 @@ public: static SvBmp GetIndex( SvItemStateFlags nItemState ); long Width(); long Height(); - void SetLink( const Link<>& rLink) { aLink=rLink; } + void SetLink( const Link<SvLBoxButtonData*,void>& rLink) { aLink=rLink; } bool IsRadio(); // as buttons are not derived from LinkHdl void CallLink(); diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx index 9ec23e4..83789c7 100644 --- a/include/svtools/treelistbox.hxx +++ b/include/svtools/treelistbox.hxx @@ -294,7 +294,7 @@ protected: private: void SetBaseModel(SvTreeList* pNewModel); - DECL_DLLPRIVATE_LINK( CheckButtonClick, SvLBoxButtonData * ); + DECL_DLLPRIVATE_LINK_TYPED( CheckButtonClick, SvLBoxButtonData *, void ); DECL_DLLPRIVATE_LINK( TextEditEndedHdl_Impl, void * ); // Handler that is called by TreeList to clone an Entry DECL_DLLPRIVATE_LINK( CloneHdl_Impl, SvTreeListEntry* ); diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 6d64a0a..3926371 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -1781,11 +1781,10 @@ const Image& SvTreeListBox::GetCollapsedEntryBmp( const SvTreeListEntry* pEntry return pItem->GetBitmap1( ); } -IMPL_LINK( SvTreeListBox, CheckButtonClick, SvLBoxButtonData *, pData ) +IMPL_LINK_TYPED( SvTreeListBox, CheckButtonClick, SvLBoxButtonData *, pData, void ) { pHdlEntry = pData->GetActEntry(); CheckButtonHdl(); - return 0; } SvTreeListEntry* SvTreeListBox::InsertEntry( commit 8f0f4faad2db50fdc50d3f66ed5d32c9a0138dad Author: Noel Grandin <[email protected]> Date: Mon Aug 31 10:36:28 2015 +0200 convert Link<> to typed Change-Id: Ibf658f42227ee3f4277f0089b6f8a8ac771dab1a diff --git a/include/svtools/stdmenu.hxx b/include/svtools/stdmenu.hxx index 7abd165..2a38a99 100644 --- a/include/svtools/stdmenu.hxx +++ b/include/svtools/stdmenu.hxx @@ -121,10 +121,9 @@ public: class SVT_DLLPUBLIC FontSizeMenu : public PopupMenu { private: - long* mpHeightAry; - long mnCurHeight; - Link<> maSelectHdl; - Link<> maHighlightHdl; + long* mpHeightAry; + long mnCurHeight; + Link<FontSizeMenu*,void> maSelectHdl; public: FontSizeMenu(); @@ -138,7 +137,7 @@ public: void SetCurHeight( long nHeight ); long GetCurHeight() const { return mnCurHeight; } - void SetSelectHdl( const Link<>& rLink ) { maSelectHdl = rLink; } + void SetSelectHdl( const Link<FontSizeMenu*,void>& rLink ) { maSelectHdl = rLink; } }; #endif // INCLUDED_SVTOOLS_STDMENU_HXX diff --git a/include/svx/fntszctl.hxx b/include/svx/fntszctl.hxx index c5ee10a..5003c91 100644 --- a/include/svx/fntszctl.hxx +++ b/include/svx/fntszctl.hxx @@ -36,7 +36,7 @@ private: Menu& rParent; SfxStatusForwarder aFontNameForwarder; - DECL_LINK( MenuSelect, FontSizeMenu * ); + DECL_LINK_TYPED( MenuSelect, FontSizeMenu *, void ); protected: virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx index fd6306d8..cf006a8 100644 --- a/svtools/source/control/stdmenu.cxx +++ b/svtools/source/control/stdmenu.cxx @@ -123,17 +123,6 @@ void FontSizeMenu::Select() void FontSizeMenu::Highlight() { - const long nTempHeight = mnCurHeight; - const sal_uInt16 nCurItemId = GetCurItemId(); - if ( !nCurItemId ) - mnCurHeight = 0; - else - { - //sal_Int32 nValue = GetItemText( nCurItemId ).ToInt32(); - mnCurHeight = mpHeightAry[ nCurItemId - 1 ]; - } - maHighlightHdl.Call( this ); - mnCurHeight = nTempHeight; } void FontSizeMenu::Fill( const vcl::FontInfo& rInfo, const FontList* pList ) diff --git a/svx/source/mnuctrls/fntszctl.cxx b/svx/source/mnuctrls/fntszctl.cxx index 7dcb0ef..34f9d6f 100644 --- a/svx/source/mnuctrls/fntszctl.cxx +++ b/svx/source/mnuctrls/fntszctl.cxx @@ -48,13 +48,13 @@ SFX_IMPL_MENU_CONTROL(SvxFontSizeMenuControl, SvxFontHeightItem); wird in einem SvxFontHeightItem verschickt. */ -IMPL_LINK( SvxFontSizeMenuControl, MenuSelect, FontSizeMenu*, pMen ) +IMPL_LINK_TYPED( SvxFontSizeMenuControl, MenuSelect, FontSizeMenu*, pMen, void ) { SfxViewFrame* pFrm = SfxViewFrame::Current(); SfxShell* pSh = pFrm ? pFrm->GetDispatcher()->GetShell( 0 ) : NULL; if ( !pSh ) - return 0; + return; const SfxItemPool& rPool = pSh->GetPool(); sal_uInt16 nWhich = rPool.GetWhich( SID_ATTR_CHAR_FONTHEIGHT ); @@ -62,7 +62,6 @@ IMPL_LINK( SvxFontSizeMenuControl, MenuSelect, FontSizeMenu*, pMen ) long nH = LOGIC( pMen->GetCurHeight(), MAP_POINT, (MapUnit)eUnit ) / 10; SvxFontHeightItem aItem( nH, 100, GetId() ); GetBindings().GetDispatcher()->Execute( GetId(), SfxCallMode::RECORD, &aItem, 0L ); - return 1; } commit 5b77f6d04f8798eaf6bd1e2d3b3087bcdab9db4a Author: Noel Grandin <[email protected]> Date: Mon Aug 31 10:18:23 2015 +0200 convert Link<> to typed Change-Id: I1acb6462aa32a0ee61e8ede3ed3e9607b8069298 diff --git a/include/svtools/stdmenu.hxx b/include/svtools/stdmenu.hxx index 4e9c0fb..7abd165 100644 --- a/include/svtools/stdmenu.hxx +++ b/include/svtools/stdmenu.hxx @@ -100,9 +100,8 @@ FontList; FontNameMenu; FontSizeBox class SVT_DLLPUBLIC FontNameMenu : public PopupMenu { private: - OUString maCurName; - Link<> maSelectHdl; - Link<> maHighlightHdl; + OUString maCurName; + Link<FontNameMenu*,void> maSelectHdl; public: FontNameMenu(); @@ -116,7 +115,7 @@ public: void SetCurName( const OUString& rName ); const OUString& GetCurName() const { return maCurName; } - void SetSelectHdl( const Link<>& rLink ) { maSelectHdl = rLink; } + void SetSelectHdl( const Link<FontNameMenu*,void>& rLink ) { maSelectHdl = rLink; } }; class SVT_DLLPUBLIC FontSizeMenu : public PopupMenu diff --git a/include/svx/fntctl.hxx b/include/svx/fntctl.hxx index 4b671b1..7aeb67f 100644 --- a/include/svx/fntctl.hxx +++ b/include/svx/fntctl.hxx @@ -37,7 +37,7 @@ private: Menu& rParent; SVX_DLLPRIVATE void FillMenu(); - DECL_LINK( MenuSelect, FontNameMenu * ); + DECL_LINK_TYPED( MenuSelect, FontNameMenu *, void); SVX_DLLPRIVATE virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE; SVX_DLLPRIVATE virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx index 760e784..fd6306d8 100644 --- a/svtools/source/control/stdmenu.cxx +++ b/svtools/source/control/stdmenu.cxx @@ -41,10 +41,6 @@ void FontNameMenu::Select() void FontNameMenu::Highlight() { - OUString aTempName = maCurName; - maCurName = GetItemText( GetCurItemId() ); - maHighlightHdl.Call( this ); - maCurName = aTempName; } void FontNameMenu::Fill( const FontList* pList ) diff --git a/svx/source/mnuctrls/fntctl.cxx b/svx/source/mnuctrls/fntctl.cxx index 197fe7b..6c2f18d 100644 --- a/svx/source/mnuctrls/fntctl.cxx +++ b/svx/source/mnuctrls/fntctl.cxx @@ -134,12 +134,11 @@ void SvxFontMenuControl::Notify( SfxBroadcaster&, const SfxHint& rHint ) weiteren Fontinformationen mu\s durch die Applikation geschehen. */ -IMPL_LINK( SvxFontMenuControl, MenuSelect, FontNameMenu *, pMen ) +IMPL_LINK_TYPED( SvxFontMenuControl, MenuSelect, FontNameMenu *, pMen, void ) { SvxFontItem aItem( GetId() ); aItem.SetFamilyName(pMen->GetCurName()); GetBindings().GetDispatcher()->Execute( GetId(), SfxCallMode::RECORD, &aItem, 0L ); - return 0; } /* [Beschreibung] commit 0e1d027f84a41509d6e9b086fba5372511461433 Author: Noel Grandin <[email protected]> Date: Fri Sep 4 11:08:08 2015 +0200 use comphelper::containerToSequence and fix some casting Change-Id: Ic476204e9db8a0cd1164002a4a8b55f90aef515e diff --git a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx index 5d01cc8..ddcd083 100644 --- a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx +++ b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx @@ -220,9 +220,7 @@ namespace pcr } } - if ( aProperties.empty() ) - return Sequence< Property >(); - return Sequence< Property >( &(*aProperties.begin()), aProperties.size() ); + return comphelper::containerToSequence( aProperties ); } @@ -233,33 +231,31 @@ namespace pcr ::std::vector< OUString > aSuperfluous; if ( m_pHelper.get() ) { - aSuperfluous.push_back( static_cast<const OUString&>(PROPERTY_CONTROLSOURCE) ); - aSuperfluous.push_back( static_cast<const OUString&>(PROPERTY_EMPTY_IS_NULL) ); - aSuperfluous.push_back( static_cast<const OUString&>(PROPERTY_FILTERPROPOSAL) ); - aSuperfluous.push_back( static_cast<const OUString&>(PROPERTY_LISTSOURCETYPE) ); - aSuperfluous.push_back( static_cast<const OUString&>(PROPERTY_LISTSOURCE) ); - aSuperfluous.push_back( static_cast<const OUString&>(PROPERTY_BOUNDCOLUMN) ); + aSuperfluous.push_back( OUString(PROPERTY_CONTROLSOURCE) ); + aSuperfluous.push_back( OUString(PROPERTY_EMPTY_IS_NULL) ); + aSuperfluous.push_back( OUString(PROPERTY_FILTERPROPOSAL) ); + aSuperfluous.push_back( OUString(PROPERTY_LISTSOURCETYPE) ); + aSuperfluous.push_back( OUString(PROPERTY_LISTSOURCE) ); + aSuperfluous.push_back( OUString(PROPERTY_BOUNDCOLUMN) ); bool bAllowBinding = m_pHelper->canBindToAnyDataType(); if ( bAllowBinding ) { - aSuperfluous.push_back( static_cast<const OUString&>(PROPERTY_MAXTEXTLEN) ); - aSuperfluous.push_back( static_cast<const OUString&>(PROPERTY_VALUEMIN) ); - aSuperfluous.push_back( static_cast<const OUString&>(PROPERTY_VALUEMAX) ); - aSuperfluous.push_back( static_cast<const OUString&>(PROPERTY_DECIMAL_ACCURACY) ); - aSuperfluous.push_back( static_cast<const OUString&>(PROPERTY_TIMEMIN) ); - aSuperfluous.push_back( static_cast<const OUString&>(PROPERTY_TIMEMAX) ); - aSuperfluous.push_back( static_cast<const OUString&>(PROPERTY_DATEMIN) ); - aSuperfluous.push_back( static_cast<const OUString&>(PROPERTY_DATEMAX) ); - aSuperfluous.push_back( static_cast<const OUString&>(PROPERTY_EFFECTIVE_MIN) ); - aSuperfluous.push_back( static_cast<const OUString&>(PROPERTY_EFFECTIVE_MAX) ); + aSuperfluous.push_back( OUString(PROPERTY_MAXTEXTLEN) ); + aSuperfluous.push_back( OUString(PROPERTY_VALUEMIN) ); + aSuperfluous.push_back( OUString(PROPERTY_VALUEMAX) ); + aSuperfluous.push_back( OUString(PROPERTY_DECIMAL_ACCURACY) ); + aSuperfluous.push_back( OUString(PROPERTY_TIMEMIN) ); + aSuperfluous.push_back( OUString(PROPERTY_TIMEMAX) ); + aSuperfluous.push_back( OUString(PROPERTY_DATEMIN) ); + aSuperfluous.push_back( OUString(PROPERTY_DATEMAX) ); + aSuperfluous.push_back( OUString(PROPERTY_EFFECTIVE_MIN) ); + aSuperfluous.push_back( OUString(PROPERTY_EFFECTIVE_MAX) ); } } - if ( aSuperfluous.empty() ) - return Sequence< OUString >(); - return Sequence< OUString >( &(*aSuperfluous.begin()), aSuperfluous.size() ); + return comphelper::containerToSequence( aSuperfluous ); } @@ -269,12 +265,10 @@ namespace pcr ::std::vector< OUString > aInterestedInActuations( 2 ); if ( m_pHelper.get() ) { - aInterestedInActuations.push_back( static_cast<const OUString&>(PROPERTY_XSD_DATA_TYPE) ); - aInterestedInActuations.push_back( static_cast<const OUString&>(PROPERTY_XML_DATA_MODEL) ); + aInterestedInActuations.push_back( OUString(PROPERTY_XSD_DATA_TYPE) ); + aInterestedInActuations.push_back( OUString(PROPERTY_XML_DATA_MODEL) ); } - if ( aInterestedInActuations.empty() ) - return Sequence< OUString >(); - return Sequence< OUString >( &(*aInterestedInActuations.begin()), aInterestedInActuations.size() ); + return comphelper::containerToSequence( aInterestedInActuations ); } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
