summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-10-08 08:36:45 +0200
committerLuboš Luňák <l.lunak@collabora.com>2021-10-24 20:58:33 +0200
commitd0f8aeb92af554fdce8c02985a4b1aebf30106ed (patch)
tree33c9eed6f6e1a056290fa2b4ca5242b4f78f1834
parent556363e1e654c1e6584e2aafeb15d0bf05d5d013 (diff)
remove slow wrappers for std::vector
Noel has already done this in master in a number of commits, this one changes those that make SfxViewShell:GetFirst/Next slower. Change-Id: I69dcb026ce969731071be55f36d3c6d42daa89e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124116 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
-rw-r--r--include/sfx2/app.hxx7
-rw-r--r--sfx2/IwyuFilter_sfx2.yaml1
-rw-r--r--sfx2/Library_sfx.mk1
-rw-r--r--sfx2/inc/pch/precompiled_sfx.hxx1
-rw-r--r--sfx2/source/appl/app.cxx1
-rw-r--r--sfx2/source/appl/appdata.cxx1
-rw-r--r--sfx2/source/appl/appinit.cxx1
-rw-r--r--sfx2/source/appl/appquit.cxx1
-rw-r--r--sfx2/source/appl/shellimpl.cxx127
-rw-r--r--sfx2/source/doc/objxtor.cxx1
-rw-r--r--sfx2/source/inc/shellimpl.hxx94
-rw-r--r--sfx2/source/view/lokhelper.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx1
-rw-r--r--sfx2/source/view/viewsh.cxx1
14 files changed, 4 insertions, 236 deletions
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 9714ad8e13d5..38aa6afb86fc 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -43,15 +43,16 @@ class SfxDispatcher;
class SfxEventHint;
class SfxItemSet;
class SfxObjectShell;
-class SfxObjectShellArr_Impl;
+typedef ::std::vector<SfxObjectShell*> SfxObjectShellArr_Impl;
class SfxObjectShellLock;
class SfxProgress;
class SfxSlotPool;
class SfxStbCtrlFactArr_Impl;
class SfxTbxCtrlFactArr_Impl;
class SfxViewFrame;
-class SfxViewFrameArr_Impl;
-class SfxViewShellArr_Impl;
+typedef ::std::vector<SfxViewFrame*> SfxViewFrameArr_Impl;
+class SfxViewShell;
+typedef ::std::vector<SfxViewShell*> SfxViewShellArr_Impl;
class StarBASIC;
class SfxWorkWindow;
class SfxFilterMatcher;
diff --git a/sfx2/IwyuFilter_sfx2.yaml b/sfx2/IwyuFilter_sfx2.yaml
index 87396e719fc4..1f4511123cb5 100644
--- a/sfx2/IwyuFilter_sfx2.yaml
+++ b/sfx2/IwyuFilter_sfx2.yaml
@@ -60,7 +60,6 @@ excludelist:
- sfx2/fcontnr.hxx
- sfx2/msgpool.hxx
- sfx2/viewsh.hxx
- - shellimpl.hxx
sfx2/source/appl/appmisc.cxx:
# Needed for TypedWhichId macro
- svl/stritem.hxx
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index 9103e633e104..77b08037409f 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -113,7 +113,6 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
sfx2/source/appl/preventduplicateinteraction \
sfx2/source/appl/sfxhelp \
sfx2/source/appl/sfxpicklist \
- sfx2/source/appl/shellimpl \
sfx2/source/appl/shutdownicon \
sfx2/source/appl/workwin \
sfx2/source/appl/xpackcreator \
diff --git a/sfx2/inc/pch/precompiled_sfx.hxx b/sfx2/inc/pch/precompiled_sfx.hxx
index 36b9d794c0af..688fc8de95e1 100644
--- a/sfx2/inc/pch/precompiled_sfx.hxx
+++ b/sfx2/inc/pch/precompiled_sfx.hxx
@@ -478,7 +478,6 @@
#include <sfx2/viewsh.hxx>
#include <sfxpicklist.hxx>
#include <sfxtypes.hxx>
-#include <shellimpl.hxx>
#include <splitwin.hxx>
#include <statcach.hxx>
#include <workwin.hxx>
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index b1433520ca97..c27e9e954646 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -50,7 +50,6 @@
#include <sfx2/sfxdlg.hxx>
#include <sfx2/stbitem.hxx>
#include <sfx2/dockwin.hxx>
-#include <shellimpl.hxx>
#include <comphelper/lok.hxx>
#include <sidebar/ControllerFactory.hxx>
diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx
index 0039cdae17a5..253153fea738 100644
--- a/sfx2/source/appl/appdata.cxx
+++ b/sfx2/source/appl/appdata.cxx
@@ -31,7 +31,6 @@
#include <appbaslib.hxx>
#include <childwinimpl.hxx>
#include <ctrlfactoryimpl.hxx>
-#include <shellimpl.hxx>
#include <unoctitm.hxx>
#include <svl/svdde.hxx>
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index fbecd9d66b61..131b14093238 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -47,7 +47,6 @@
#include <nochaos.hxx>
#include <sfxpicklist.hxx>
#include <ctrlfactoryimpl.hxx>
-#include <shellimpl.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::frame;
diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx
index 1fafb81ceb42..f66cecd66e78 100644
--- a/sfx2/source/appl/appquit.cxx
+++ b/sfx2/source/appl/appquit.cxx
@@ -36,7 +36,6 @@
#include <appbaslib.hxx>
#include <childwinimpl.hxx>
#include <ctrlfactoryimpl.hxx>
-#include <shellimpl.hxx>
#include <basic/basicmanagerrepository.hxx>
using ::basic::BasicManagerRepository;
diff --git a/sfx2/source/appl/shellimpl.cxx b/sfx2/source/appl/shellimpl.cxx
deleted file mode 100644
index 2ef1a7fe31c2..000000000000
--- a/sfx2/source/appl/shellimpl.cxx
+++ /dev/null
@@ -1,127 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <shellimpl.hxx>
-
-SfxObjectShellArr_Impl::iterator SfxObjectShellArr_Impl::begin()
-{
- return maData.begin();
-}
-
-SfxObjectShellArr_Impl::iterator SfxObjectShellArr_Impl::end()
-{
- return maData.end();
-}
-
-const SfxObjectShell* SfxObjectShellArr_Impl::operator[] ( size_t i ) const
-{
- return maData[i];
-}
-
-SfxObjectShell* SfxObjectShellArr_Impl::operator[] ( size_t i )
-{
- return maData[i];
-}
-
-void SfxObjectShellArr_Impl::erase( const iterator& it )
-{
- maData.erase(it);
-}
-
-void SfxObjectShellArr_Impl::push_back( SfxObjectShell* p )
-{
- maData.push_back(p);
-}
-
-size_t SfxObjectShellArr_Impl::size() const
-{
- return maData.size();
-}
-
-SfxViewFrameArr_Impl::iterator SfxViewFrameArr_Impl::begin()
-{
- return maData.begin();
-}
-
-SfxViewFrameArr_Impl::iterator SfxViewFrameArr_Impl::end()
-{
- return maData.end();
-}
-
-const SfxViewFrame* SfxViewFrameArr_Impl::operator[] ( size_t i ) const
-{
- return maData[i];
-}
-
-SfxViewFrame* SfxViewFrameArr_Impl::operator[] ( size_t i )
-{
- return maData[i];
-}
-
-void SfxViewFrameArr_Impl::erase( const iterator& it )
-{
- maData.erase(it);
-}
-
-void SfxViewFrameArr_Impl::push_back( SfxViewFrame* p )
-{
- maData.push_back(p);
-}
-
-size_t SfxViewFrameArr_Impl::size() const
-{
- return maData.size();
-}
-
-SfxViewShellArr_Impl::iterator SfxViewShellArr_Impl::begin()
-{
- return maData.begin();
-}
-
-SfxViewShellArr_Impl::iterator SfxViewShellArr_Impl::end()
-{
- return maData.end();
-}
-
-const SfxViewShell* SfxViewShellArr_Impl::operator[] ( size_t i ) const
-{
- return maData[i];
-}
-
-SfxViewShell* SfxViewShellArr_Impl::operator[] ( size_t i )
-{
- return maData[i];
-}
-
-void SfxViewShellArr_Impl::erase( const iterator& it )
-{
- maData.erase(it);
-}
-
-void SfxViewShellArr_Impl::push_back( SfxViewShell* p )
-{
- maData.push_back(p);
-}
-
-size_t SfxViewShellArr_Impl::size() const
-{
- return maData.size();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index a746d1ac89fb..bc54bcc7e40b 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -76,7 +76,6 @@
#include <appbaslib.hxx>
#include <sfx2/sfxbasemodel.hxx>
#include <sfx2/sfxuno.hxx>
-#include <shellimpl.hxx>
#include <sfx2/notebookbar/SfxNotebookBar.hxx>
#include <sfx2/infobar.hxx>
diff --git a/sfx2/source/inc/shellimpl.hxx b/sfx2/source/inc/shellimpl.hxx
deleted file mode 100644
index 1476271bbbc0..000000000000
--- a/sfx2/source/inc/shellimpl.hxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_SFX2_SHELLIMPL_HXX
-#define INCLUDED_SFX2_SHELLIMPL_HXX
-
-#include <cstdlib>
-#include <vector>
-
-class SfxObjectShell;
-class SfxViewFrame;
-class SfxViewShell;
-
-class SfxObjectShellArr_Impl
-{
- typedef std::vector<SfxObjectShell*> DataType;
- DataType maData;
-
-public:
- typedef DataType::iterator iterator;
-
- iterator begin();
- iterator end();
-
- const SfxObjectShell* operator[](size_t i) const;
- SfxObjectShell* operator[](size_t i);
-
- void erase(const iterator& it);
-
- void push_back(SfxObjectShell* p);
-
- size_t size() const;
-};
-
-class SfxViewFrameArr_Impl
-{
- typedef std::vector<SfxViewFrame*> DataType;
- DataType maData;
-
-public:
- typedef DataType::iterator iterator;
- iterator begin();
- iterator end();
-
- const SfxViewFrame* operator[](size_t i) const;
- SfxViewFrame* operator[](size_t i);
-
- void erase(const iterator& it);
-
- void push_back(SfxViewFrame* p);
-
- size_t size() const;
-};
-
-class SfxViewShellArr_Impl
-{
- typedef std::vector<SfxViewShell*> DataType;
- DataType maData;
-
-public:
- typedef DataType::iterator iterator;
-
- iterator begin();
- iterator end();
-
- const SfxViewShell* operator[](size_t i) const;
- SfxViewShell* operator[](size_t i);
-
- void erase(const iterator& it);
-
- void push_back(SfxViewShell* p);
-
- size_t size() const;
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 9b65dcec7df7..d8766225fcbe 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -29,8 +29,6 @@
#include <editeng/outliner.hxx>
#include <sfx2/msgpool.hxx>
-#include <shellimpl.hxx>
-
#include <boost/property_tree/json_parser.hpp>
using namespace com::sun::star;
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 7081b3b8038a..e216c2058f36 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -85,7 +85,6 @@
#include <svtools/strings.hrc>
#include <svtools/svtresid.hxx>
#include <framework/framelistanalyzer.hxx>
-#include <shellimpl.hxx>
#include <optional>
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 81757258805a..fab9d5af2b13 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -86,7 +86,6 @@
#include <sfx2/lokhelper.hxx>
#include <sfx2/lokcallback.hxx>
#include <openuriexternally.hxx>
-#include <shellimpl.hxx>
#include <iostream>
#include <vector>
#include <libxml/xmlwriter.h>