[Libreoffice-commits] core.git: include/svl svl/source
Takeshi Abe
tabe at fixedpoint.jp
Mon Oct 16 10:57:21 UTC 2017
include/svl/svdde.hxx | 4 ++--
svl/source/svdde/ddesvr.cxx | 20 +-------------------
2 files changed, 3 insertions(+), 21 deletions(-)
New commits:
commit 98fbe10fa3a8e9d795f9ee294b14585efe4c615a
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Mon Oct 16 17:08:15 2017 +0900
svl: Drop unnecessary abstraction of DdeItemImp
Instead, just use std::vector<DdeItemImpData>.
Change-Id: If0c4943bdf370211cd6e0466a899da718480a4ae
Reviewed-on: https://gerrit.libreoffice.org/43415
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/svl/svdde.hxx b/include/svl/svdde.hxx
index 2415ad8e03ba..003a14f83923 100644
--- a/include/svl/svdde.hxx
+++ b/include/svl/svdde.hxx
@@ -43,7 +43,7 @@ class DdeTopic;
class DdeService;
struct DdeDataImp;
struct DdeImp;
-class DdeItemImp;
+struct DdeItemImpData;
struct Conversation;
typedef ::std::vector< DdeService* > DdeServices;
@@ -207,7 +207,7 @@ class SVL_DLLPUBLIC DdeItem
friend class DdeTopic;
DdeString* pName;
DdeTopic* pMyTopic;
- DdeItemImp* pImpData;
+ std::vector<DdeItemImpData>* pImpData;
protected:
sal_uInt8 nType;
diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx
index ad46b8a85ab5..8eedadf6ddf6 100644
--- a/svl/source/svdde/ddesvr.cxx
+++ b/svl/source/svdde/ddesvr.cxx
@@ -41,24 +41,6 @@ struct DdeItemImpData
explicit DdeItemImpData( HCONV nH ) : nHCnv( nH ), nCnt( 1 ) {}
};
-class DdeItemImp {
-public:
- DdeItemImp() : mvData() {}
-
- size_t size() const { return mvData.size(); }
-
- std::vector<DdeItemImpData>::iterator begin() { return mvData.begin(); }
-
- void erase(std::vector<DdeItemImpData>::iterator it) { mvData.erase(it); }
-
- void push_back(const DdeItemImpData& rData) { mvData.push_back(rData); }
-
- DdeItemImpData& operator[](size_t i) { return mvData[i]; }
-
-private:
- std::vector<DdeItemImpData> mvData;
-};
-
HDDEDATA CALLBACK DdeInternal::SvrCallback(
UINT nCode, UINT nCbType, HCONV hConv, HSZ hText1, HSZ hText2,
HDDEDATA hData, ULONG_PTR, ULONG_PTR )
@@ -755,7 +737,7 @@ void DdeInternal::IncMonitor(DdeItem *const pItem, HCONV nHCnv)
{
if (!pItem->pImpData)
{
- pItem->pImpData = new DdeItemImp;
+ pItem->pImpData = new std::vector<DdeItemImpData>;
if (DDEGETPUTITEM == pItem->nType)
{
static_cast<DdeGetPutItem*>(pItem)->AdviseLoop( true );
More information about the Libreoffice-commits
mailing list