basctl/source/basicide/baside2.cxx | 1 basctl/source/basicide/baside2.hxx | 1 basctl/source/basicide/baside2b.cxx | 2 + basctl/source/basicide/basobj2.cxx | 2 + basctl/source/basicide/bastype2.cxx | 41 ++++++++++++------------- basctl/source/basicide/bastype2.hxx | 4 +- basctl/source/basicide/bastype3.cxx | 1 basctl/source/basicide/documentenumeration.cxx | 1 basctl/source/basicide/layout.hxx | 1 basctl/source/basicide/moduldl2.cxx | 11 ++++-- basctl/source/basicide/moduldlg.cxx | 11 +++--- 11 files changed, 45 insertions(+), 31 deletions(-)
New commits: commit d8160fa8343a395cff0116286dd24894b076c02b Author: Stephan Bergmann <[email protected]> Date: Fri Sep 11 21:08:05 2015 +0200 Revert overly aggressive removal of include statements ...from 4758ab313de3cb2c8cb9ea5792425a808e94b7df "Removed useless includes in basctl/source/basicide/ tree" Change-Id: I754b964baf4c8a48f6ca79d6a214bab1f3325b6d diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 1aa1aa6..55d6849 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -49,6 +49,7 @@ #include <vcl/xtextedt.hxx> #include <vcl/settings.hxx> #include <toolkit/helper/vclunohelper.hxx> +#include <cassert> namespace basctl { diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index fbadefd..b7135ce 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -39,6 +39,7 @@ class SvxSearchItem; #include <sfx2/progress.hxx> +#include <set> #include <vcl/textdata.hxx> #include <basic/codecompletecache.hxx> diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index b389792..971cb24 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -17,7 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> +#include <cassert> #include "helpid.hrc" #include "baside2.hrc" diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index 4152e36..94f4952 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -31,6 +31,8 @@ #include <tools/diagnose_ex.h> #include <unotools/moduleoptions.hxx> +#include <vector> +#include <algorithm> #include <basic/basmgr.hxx> namespace basctl { diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index 4f2a614..9c130aa 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -34,6 +34,7 @@ #include <vcl/builderfactory.hxx> #include <initializer_list> +#include <memory> #include <com/sun/star/script/ModuleType.hpp> #include <com/sun/star/script/vba/XVBAModuleInfo.hpp> diff --git a/basctl/source/basicide/bastype2.hxx b/basctl/source/basicide/bastype2.hxx index 8801567..66b01b5 100644 --- a/basctl/source/basicide/bastype2.hxx +++ b/basctl/source/basicide/bastype2.hxx @@ -19,7 +19,9 @@ #ifndef INCLUDED_BASCTL_SOURCE_BASICIDE_BASTYPE2_HXX #define INCLUDED_BASCTL_SOURCE_BASICIDE_BASTYPE2_HXX +#include <sal/config.h> +#include <memory> #include "doceventnotifier.hxx" diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx index 24122ea..88178c0 100644 --- a/basctl/source/basicide/bastype3.cxx +++ b/basctl/source/basicide/bastype3.cxx @@ -24,6 +24,7 @@ #include <bastypes.hxx> #include <com/sun/star/script/XLibraryContainer.hpp> #include <com/sun/star/script/XLibraryContainerPassword.hpp> +#include <deque> #include <sfx2/docfac.hxx> #include <svtools/treelistentry.hxx> diff --git a/basctl/source/basicide/documentenumeration.cxx b/basctl/source/basicide/documentenumeration.cxx index 7fea9ad..2ee1da0 100644 --- a/basctl/source/basicide/documentenumeration.cxx +++ b/basctl/source/basicide/documentenumeration.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> #include <set> diff --git a/basctl/source/basicide/layout.hxx b/basctl/source/basicide/layout.hxx index bf34ae6..037ab56 100644 --- a/basctl/source/basicide/layout.hxx +++ b/basctl/source/basicide/layout.hxx @@ -23,6 +23,7 @@ #include <vcl/split.hxx> #include <vcl/vclptr.hxx> +#include <vector> class DockingWindow; class SfxRequest; diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 02fdd4f..a9b8c69 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -57,6 +57,8 @@ #include <comphelper/propertysequence.hxx> #include <cppuhelper/implbase.hxx> +#include <cassert> +#include <memory> namespace basctl { diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index f8cb3ce..939c841 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - +#include <sal/config.h> #include "basidesh.hrc" commit 9aeac1b2dd39f538f897602bd1ae6d37efa6cde4 Author: Stephan Bergmann <[email protected]> Date: Fri Sep 11 20:55:17 2015 +0200 Use move semantics Change-Id: I9ba8265044d0f83afe44b6965b78cc733cace653 diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index eeee9c3..4f2a614 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -22,6 +22,7 @@ #include <bastype2.hxx> #include <baside2.hrc> #include <iderid.hxx> +#include <o3tl/make_unique.hxx> #include <tools/urlobj.hxx> #include <tools/diagnose_ex.h> #include <svtools/imagemgr.hxx> @@ -245,11 +246,10 @@ void TreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocation eL OUString aRootName( GetRootEntryName( rDocument, eLocation ) ); Image aImage; GetRootEntryBitmaps( rDocument, aImage ); - std::unique_ptr<Entry> e(new DocumentEntry(rDocument, eLocation)); AddEntry( aRootName, aImage, - 0, true, &e); + 0, true, o3tl::make_unique<DocumentEntry>(rDocument, eLocation)); } SetUpdateMode(true); @@ -308,11 +308,11 @@ void TreeListBox::ImpCreateLibEntries( SvTreeListEntry* pDocumentRootEntry, cons } else { - std::unique_ptr<Entry> e(new Entry(OBJ_TYPE_LIBRARY)); AddEntry( aLibName, Image( IDEResId( nId ) ), - pDocumentRootEntry, true, &e); + pDocumentRootEntry, true, + o3tl::make_unique<Entry>(OBJ_TYPE_LIBRARY)); } } } @@ -344,11 +344,11 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const SvTreeListEntry* pModuleEntry = FindEntry( pLibRootEntry, aModName, OBJ_TYPE_MODULE ); if ( !pModuleEntry ) { - std::unique_ptr<Entry> e(new Entry(OBJ_TYPE_MODULE)); pModuleEntry = AddEntry( aModName, Image( IDEResId( RID_IMG_MODULE ) ), - pLibRootEntry, false, &e); + pLibRootEntry, false, + o3tl::make_unique<Entry>(OBJ_TYPE_MODULE)); } // methods @@ -364,12 +364,12 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const SvTreeListEntry* pEntry = FindEntry( pModuleEntry, aName, OBJ_TYPE_METHOD ); if ( !pEntry ) { - std::unique_ptr<Entry> e( - new Entry(OBJ_TYPE_METHOD)); pEntry = AddEntry( aName, Image( IDEResId( RID_IMG_MACRO ) ), - pModuleEntry, false, &e); + pModuleEntry, false, + o3tl::make_unique<Entry>( + OBJ_TYPE_METHOD)); } } } @@ -403,11 +403,11 @@ void TreeListBox::ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const SvTreeListEntry* pDialogEntry = FindEntry( pLibRootEntry, aDlgName, OBJ_TYPE_DIALOG ); if ( !pDialogEntry ) { - std::unique_ptr<Entry> e(new Entry(OBJ_TYPE_DIALOG)); pDialogEntry = AddEntry( aDlgName, Image( IDEResId( RID_IMG_DIALOG ) ), - pLibRootEntry, false, &e); + pLibRootEntry, false, + o3tl::make_unique<Entry>(OBJ_TYPE_DIALOG)); } } } @@ -439,11 +439,10 @@ void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvTreeListEntry* pLibRootEntr } else { - std::unique_ptr<Entry> e(new Entry(eType)); AddEntry( aEntryName, Image( IDEResId( RID_IMG_MODLIB ) ), - pLibRootEntry, true, &e); + pLibRootEntry, true, o3tl::make_unique<Entry>(eType)); } } } @@ -501,11 +500,11 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvTreeListEntry* pLibSubRo SvTreeListEntry* pModuleEntry = FindEntry( pLibSubRootEntry, aEntryName, OBJ_TYPE_MODULE ); if ( !pModuleEntry ) { - std::unique_ptr<Entry> e(new Entry(OBJ_TYPE_MODULE)); pModuleEntry = AddEntry( aEntryName, Image( IDEResId( RID_IMG_MODULE ) ), - pLibSubRootEntry, false, &e); + pLibSubRootEntry, false, + o3tl::make_unique<Entry>(OBJ_TYPE_MODULE)); } // methods @@ -521,11 +520,11 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvTreeListEntry* pLibSubRo SvTreeListEntry* pEntry = FindEntry( pModuleEntry, aName, OBJ_TYPE_METHOD ); if ( !pEntry ) { - std::unique_ptr<Entry> e(new Entry(OBJ_TYPE_METHOD)); pEntry = AddEntry( aName, Image( IDEResId( RID_IMG_MACRO ) ), - pModuleEntry, false, &e); + pModuleEntry, false, + o3tl::make_unique<Entry>(OBJ_TYPE_METHOD)); } } } @@ -736,15 +735,14 @@ SvTreeListEntry* TreeListBox::AddEntry( const Image& rImage, SvTreeListEntry* pParent, bool bChildrenOnDemand, - std::unique_ptr<Entry> * aUserData + std::unique_ptr<Entry> && aUserData ) { - assert(aUserData != 0); SvTreeListEntry* p = InsertEntry( rText, rImage, rImage, pParent, bChildrenOnDemand, TREELIST_APPEND, - aUserData->get() + aUserData.get() ); - aUserData->release(); + aUserData.release(); return p; } diff --git a/basctl/source/basicide/bastype2.hxx b/basctl/source/basicide/bastype2.hxx index d009735..8801567 100644 --- a/basctl/source/basicide/bastype2.hxx +++ b/basctl/source/basicide/bastype2.hxx @@ -231,7 +231,7 @@ public: SvTreeListEntry* AddEntry( const OUString& rText, const Image& rImage, SvTreeListEntry* pParent, bool bChildrenOnDemand, - std::unique_ptr<Entry> * aUserData + std::unique_ptr<Entry> && aUserData ); void RemoveEntry (SvTreeListEntry*); void RemoveEntry (ScriptDocument const&); diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 1bccb05..02fdd4f 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -23,6 +23,7 @@ #include <baside2.hrc> #include <iderdll.hxx> #include <iderdll2.hxx> +#include <o3tl/make_unique.hxx> #include <svx/passwd.hxx> #include <ucbhelper/content.hxx> #include <rtl/uri.hxx> @@ -1555,20 +1556,20 @@ void createLibImpl( vcl::Window* pWin, const ScriptDocument& rDocument, sal_uInt16 nMode = pBasicBox->GetMode(); bool bDlgMode = ( nMode & BROWSEMODE_DIALOGS ) && !( nMode & BROWSEMODE_MODULES ); sal_uInt16 nId = bDlgMode ? RID_IMG_DLGLIB : RID_IMG_MODLIB; - std::unique_ptr<Entry> e(new Entry(OBJ_TYPE_LIBRARY)); SvTreeListEntry* pNewLibEntry = pBasicBox->AddEntry( aLibName, Image( IDEResId( nId ) ), - pRootEntry, false, &e); + pRootEntry, false, + o3tl::make_unique<Entry>(OBJ_TYPE_LIBRARY)); DBG_ASSERT( pNewLibEntry, "InsertEntry fehlgeschlagen!" ); if( pNewLibEntry ) { - e.reset(new Entry(OBJ_TYPE_MODULE)); SvTreeListEntry* pEntry_ = pBasicBox->AddEntry( aModName, Image( IDEResId( RID_IMG_MODULE ) ), - pNewLibEntry, false, &e); + pNewLibEntry, false, + o3tl::make_unique<Entry>(OBJ_TYPE_MODULE)); DBG_ASSERT( pEntry_, "InsertEntry fehlgeschlagen!" ); pBasicBox->SetCurEntry( pEntry_ ); pBasicBox->Select( pBasicBox->GetCurEntry() ); // OV-Bug?! diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index 0403038..f8cb3ce 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -28,6 +28,7 @@ #include <basic/basmgr.hxx> #include <com/sun/star/script/XLibraryContainerPassword.hpp> #include <comphelper/processfactory.hxx> +#include <o3tl/make_unique.hxx> #include <sfx2/app.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/request.hxx> @@ -858,11 +859,11 @@ void ObjectPage::NewDialog() SvTreeListEntry* pEntry = m_pBasicBox->FindEntry( pLibEntry, aDlgName, OBJ_TYPE_DIALOG ); if ( !pEntry ) { - std::unique_ptr<Entry> e(new Entry(OBJ_TYPE_DIALOG)); pEntry = m_pBasicBox->AddEntry( aDlgName, Image( IDEResId( RID_IMG_DIALOG ) ), - pLibEntry, false, &e); + pLibEntry, false, + o3tl::make_unique<Entry>(OBJ_TYPE_DIALOG)); DBG_ASSERT( pEntry, "InsertEntry fehlgeschlagen!" ); } m_pBasicBox->SetCurEntry( pEntry ); @@ -1029,11 +1030,11 @@ SbModule* createModImpl( vcl::Window* pWin, const ScriptDocument& rDocument, SvTreeListEntry* pEntry = rBasicBox.FindEntry( pSubRootEntry, aModName, OBJ_TYPE_MODULE ); if ( !pEntry ) { - std::unique_ptr<Entry> e(new Entry(OBJ_TYPE_MODULE)); pEntry = rBasicBox.AddEntry( aModName, Image( IDEResId( RID_IMG_MODULE ) ), - pSubRootEntry, false, &e); + pSubRootEntry, false, + o3tl::make_unique<Entry>(OBJ_TYPE_MODULE)); DBG_ASSERT( pEntry, "InsertEntry fehlgeschlagen!" ); } rBasicBox.SetCurEntry( pEntry ); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
