[Libreoffice-commits] core.git: 6 commits - configure.ac solenv/gdb sw/inc sw/source
Michael Stahl
mstahl at redhat.com
Mon Jul 27 08:12:28 PDT 2015
configure.ac | 3 ++
solenv/gdb/libreoffice/sw.py | 2 -
sw/inc/pch/precompiled_sw.hxx | 1
sw/source/core/doc/docsort.cxx | 14 ++++-----
sw/source/core/inc/blink.hxx | 17 +++++++++--
sw/source/core/text/blink.cxx | 41 +++++++++++++---------------
sw/source/filter/html/htmlatr.cxx | 54 ++++++++++++++++++-------------------
sw/source/filter/html/wrthtml.cxx | 8 ++---
sw/source/filter/html/wrthtml.hxx | 18 +++++++++---
sw/source/ui/dialog/uiregionsw.cxx | 10 ++++--
sw/source/uibase/inc/regionsw.hxx | 7 ++--
11 files changed, 99 insertions(+), 76 deletions(-)
New commits:
commit bd50d025fe5acf974f690e3388b8a429b8443139
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Jul 27 15:49:49 2015 +0200
sw: replace boost::ptr_multiset with std::multiset
Change-Id: I0b1743bd23844c46572af24e8fbdd0a61676d840
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index 1540a5e..e740d22 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -48,7 +48,6 @@
#include <boost/noncopyable.hpp>
#include <boost/numeric/conversion/cast.hpp>
#include <boost/optional.hpp>
-#include <boost/ptr_container/ptr_set.hpp>
#include <memory>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index a4fdcaa..a7e5f41 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <boost/ptr_container/ptr_set.hpp>
-
#include <hintids.hxx>
#include <rtl/math.hxx>
#include <unotools/collatorwrapper.hxx>
@@ -50,6 +48,8 @@
#include <node2lay.hxx>
#include <unochart.hxx>
+#include <set>
+
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star;
@@ -63,8 +63,8 @@ LocaleDataWrapper* SwSortElement::pLclData = 0;
// List of all sorted elements
-typedef ::boost::ptr_multiset<SwSortTextElement> SwSortTextElements;
-typedef ::boost::ptr_multiset<SwSortBoxElement> SwSortBoxElements;
+typedef ::std::multiset<SwSortTextElement> SwSortTextElements;
+typedef ::std::multiset<SwSortBoxElement> SwSortBoxElements;
/// Construct a SortElement for the Sort
void SwSortElement::Init( SwDoc* pD, const SwSortOptions& rOpt,
@@ -379,8 +379,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
while( aStart <= pEnd->nNode )
{
// Iterate over a selected range
- SwSortTextElement* pSE = new SwSortTextElement( aStart );
- aSortSet.insert(pSE);
+ aSortSet.insert(SwSortTextElement(aStart));
++aStart;
}
@@ -562,8 +561,7 @@ bool SwDoc::SortTable(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
// When sorting, do not include the first row if the HeaderLine is repeated
for( sal_uInt16 i = static_cast<sal_uInt16>(nStart); i < nCount; ++i)
{
- SwSortBoxElement* pEle = new SwSortBoxElement( i );
- aSortList.insert(pEle);
+ aSortList.insert(SwSortBoxElement(i));
}
// Move after Sorting
commit abf56d46be1b11973fce1fa48e40b82820d66e58
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Jul 27 15:14:49 2015 +0200
sw: replace boost::ptr_set with std::map<std::unique_ptr>
Change-Id: I2af80c8223ec3074058c013be7302ebf8edad95c
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 711462e..601be95 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -142,7 +142,7 @@ private:
SwFormatNoBalancedColumns m_Balance;
SvxFrameDirectionItem m_FrmDirItem;
SvxLRSpaceItem m_LRSpaceItem;
- size_t m_nArrPos;
+ const size_t m_nArrPos;
// shows, if maybe textcontent is in the region
bool m_bContent : 1;
// for multiselection, mark at first, then work with TreeListBox!
@@ -816,9 +816,10 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OkHdl)
pEntry = m_pTree->Next( pEntry );
}
- for (SectReprArr::reverse_iterator aI = aSectReprArr.rbegin(), aEnd = aSectReprArr.rend(); aI != aEnd; ++aI)
+ for (SectReprs_t::reverse_iterator it = m_SectReprs.rbegin(), aEnd = m_SectReprs.rend(); it != aEnd; ++it)
{
- SwSectionFormat* pFormat = aOrigArray[ aI->GetArrPos() ];
+ assert(it->first == it->second->GetArrPos());
+ SwSectionFormat* pFormat = aOrigArray[ it->second->GetArrPos() ];
const size_t nNewPos = rDocFormats.GetPos( pFormat );
if( SIZE_MAX != nNewPos )
rSh.DelSectionFormat( nNewPos );
@@ -930,7 +931,8 @@ IMPL_LINK_NOARG(SwEditRegionDlg, ChangeDismissHdl)
bool bRestart = false;
if(pSectRepr->IsSelected())
{
- aSectReprArr.insert( pSectRepr );
+ m_SectReprs.insert(std::make_pair(pSectRepr->GetArrPos(),
+ std::unique_ptr<SectRepr>(pSectRepr)));
while( (pChild = m_pTree->FirstChild(pEntry) )!= 0 )
{
// because of the repositioning we have to start at the beginning again
diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx
index d74e06a..7b4d1de 100644
--- a/sw/source/uibase/inc/regionsw.hxx
+++ b/sw/source/uibase/inc/regionsw.hxx
@@ -44,7 +44,8 @@
#include <svx/paraprev.hxx>
#include <editeng/lrspitem.hxx>
-#include <boost/ptr_container/ptr_set.hpp>
+#include <memory>
+#include <map>
class SwWrtShell;
@@ -56,7 +57,7 @@ namespace sfx2
// dialog "edit regions"
class SectRepr;
-typedef boost::ptr_set<SectRepr> SectReprArr;
+typedef std::map<size_t, std::unique_ptr<SectRepr>> SectReprs_t;
class SwEditRegionDlg : public SfxModalDialog
{
@@ -91,7 +92,7 @@ class SwEditRegionDlg : public SfxModalDialog
ImageList aImageIL;
SwWrtShell& rSh;
- SectReprArr aSectReprArr;
+ SectReprs_t m_SectReprs;
const SwSection* pCurrSect;
sfx2::DocumentInserter* m_pDocInserter;
VclPtr<vcl::Window> m_pOldDefDlgParent;
commit 27825a355edc79ac62f16b3ea8554ea834bed514
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Jul 27 14:48:58 2015 +0200
sw: replace boost::ptr_set with std::set<std::unique_ptr>
Change-Id: Ie4854f8b0d52771a609aee7ba4620c9308424d64
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 489c617..776d472 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -523,12 +523,12 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
}
// Jetzt holen wir das Token und ggf. die Klasse
- SwHTMLFormatInfo aFormatInfo( &rFormat );
+ std::unique_ptr<SwHTMLFormatInfo> pTmpInfo(new SwHTMLFormatInfo(&rFormat));
SwHTMLFormatInfo *pFormatInfo;
- SwHTMLFormatInfos::iterator it = rHWrt.aTextCollInfos.find( aFormatInfo );
- if( it != rHWrt.aTextCollInfos.end() )
+ SwHTMLFormatInfos::iterator it = rHWrt.m_TextCollInfos.find( pTmpInfo );
+ if (it != rHWrt.m_TextCollInfos.end())
{
- pFormatInfo = &*it;
+ pFormatInfo = it->get();
}
else
{
@@ -536,7 +536,7 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
rHWrt.bCfgOutStyles, rHWrt.eLang,
rHWrt.nCSS1Script,
false );
- rHWrt.aTextCollInfos.insert( pFormatInfo );
+ rHWrt.m_TextCollInfos.insert(std::unique_ptr<SwHTMLFormatInfo>(pFormatInfo));
if( rHWrt.aScriptParaStyles.count( rFormat.GetName() ) )
pFormatInfo->bScriptDependent = true;
}
@@ -1590,17 +1590,17 @@ const SwHTMLFormatInfo *HTMLEndPosLst::GetFormatInfo( const SwFormat& rFormat,
SwHTMLFormatInfos& rFormatInfos )
{
SwHTMLFormatInfo *pFormatInfo;
- const SwHTMLFormatInfo aFormatInfo( &rFormat );
- SwHTMLFormatInfos::iterator it = rFormatInfos.find( aFormatInfo );
- if( it != rFormatInfos.end() )
+ std::unique_ptr<SwHTMLFormatInfo> pTmpInfo(new SwHTMLFormatInfo(&rFormat));
+ SwHTMLFormatInfos::iterator it = rFormatInfos.find( pTmpInfo );
+ if (it != rFormatInfos.end())
{
- pFormatInfo = &*it;
+ pFormatInfo = it->get();
}
else
{
pFormatInfo = new SwHTMLFormatInfo( &rFormat, pDoc, pTemplate,
bOutStyles );
- rFormatInfos.insert( pFormatInfo );
+ rFormatInfos.insert(std::unique_ptr<SwHTMLFormatInfo>(pFormatInfo));
if ( rScriptTextStyles.count( rFormat.GetName() ) )
pFormatInfo->bScriptDependent = true;
}
@@ -2309,7 +2309,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
if( aFormatInfo.pItemSet )
{
aEndPosLst.Insert( *aFormatInfo.pItemSet, 0, nEnd + nOffset,
- rHTMLWrt.aChrFormatInfos, false, true );
+ rHTMLWrt.m_CharFormatInfos, false, true );
}
if( !aOutlineText.isEmpty() || rHTMLWrt.pFormatFootnote )
@@ -2368,14 +2368,14 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
if( rHTMLWrt.bWriteAll )
aEndPosLst.Insert( pHt->GetAttr(), nHtStt + nOffset,
nHtEnd + nOffset,
- rHTMLWrt.aChrFormatInfos );
+ rHTMLWrt.m_CharFormatInfos );
else
{
sal_Int32 nTmpStt = nHtStt < nStrPos ? nStrPos : nHtStt;
sal_Int32 nTmpEnd = nHtEnd < nEnd ? nHtEnd : nEnd;
aEndPosLst.Insert( pHt->GetAttr(), nTmpStt + nOffset,
nTmpEnd + nOffset,
- rHTMLWrt.aChrFormatInfos );
+ rHTMLWrt.m_CharFormatInfos );
}
continue;
// aber nicht ausgeben, das erfolgt spaeter !!
@@ -2423,7 +2423,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
// Bereich aufspannen werden ignoriert
aEndPosLst.Insert( pHt->GetAttr(), nStrPos + nOffset,
*pHt->End() + nOffset,
- rHTMLWrt.aChrFormatInfos );
+ rHTMLWrt.m_CharFormatInfos );
}
}
else
@@ -2460,7 +2460,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
if( RES_DRAWFRMFMT == pFrameFormat->Which() )
aEndPosLst.Insert( *static_cast<const SwDrawFrameFormat *>(pFrameFormat),
nStrPos + nOffset,
- rHTMLWrt.aChrFormatInfos );
+ rHTMLWrt.m_CharFormatInfos );
}
aEndPosLst.OutEndAttrs( rHTMLWrt, nStrPos + nOffset, &aContext );
@@ -2954,22 +2954,22 @@ Writer& OutHTML_INetFormat( Writer& rWrt, const SwFormatINetFormat& rINetFormat,
{
const SwCharFormat* pFormat = rWrt.pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool(
RES_POOLCHR_INET_NORMAL );
- SwHTMLFormatInfo aFormatInfo( pFormat );
- SwHTMLFormatInfos::const_iterator it = rHTMLWrt.aChrFormatInfos.find( aFormatInfo );
- if( it != rHTMLWrt.aChrFormatInfos.end() )
+ std::unique_ptr<SwHTMLFormatInfo> pFormatInfo(new SwHTMLFormatInfo(pFormat));
+ auto const it = rHTMLWrt.m_CharFormatInfos.find( pFormatInfo );
+ if (it != rHTMLWrt.m_CharFormatInfos.end())
{
- bScriptDependent = it->bScriptDependent;
+ bScriptDependent = (*it)->bScriptDependent;
}
}
if( !bScriptDependent )
{
const SwCharFormat* pFormat = rWrt.pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool(
RES_POOLCHR_INET_VISIT );
- SwHTMLFormatInfo aFormatInfo( pFormat );
- SwHTMLFormatInfos::const_iterator it = rHTMLWrt.aChrFormatInfos.find( aFormatInfo );
- if( it != rHTMLWrt.aChrFormatInfos.end() )
+ std::unique_ptr<SwHTMLFormatInfo> pFormatInfo(new SwHTMLFormatInfo(pFormat));
+ auto const it = rHTMLWrt.m_CharFormatInfos.find( pFormatInfo );
+ if (it != rHTMLWrt.m_CharFormatInfos.end())
{
- bScriptDependent = it->bScriptDependent;
+ bScriptDependent = (*it)->bScriptDependent;
}
}
@@ -3113,12 +3113,12 @@ static Writer& OutHTML_SwTextCharFormat( Writer& rWrt, const SfxPoolItem& rHt )
return rWrt;
}
- SwHTMLFormatInfo aFormatInfo( pFormat );
- SwHTMLFormatInfos::const_iterator it = rHTMLWrt.aChrFormatInfos.find( aFormatInfo );
- if( it == rHTMLWrt.aChrFormatInfos.end())
+ std::unique_ptr<SwHTMLFormatInfo> pTmpInfo(new SwHTMLFormatInfo(pFormat));
+ SwHTMLFormatInfos::const_iterator it = rHTMLWrt.m_CharFormatInfos.find(pTmpInfo);
+ if (it == rHTMLWrt.m_CharFormatInfos.end())
return rWrt;
- const SwHTMLFormatInfo *pFormatInfo = &*it;
+ const SwHTMLFormatInfo *pFormatInfo = it->get();
OSL_ENSURE( pFormatInfo, "Wieso gint es keine Infos ueber die Zeichenvorlage?" );
if( rHTMLWrt.bTagOn )
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 12ef030..1502441 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -448,11 +448,11 @@ sal_uLong SwHTMLWriter::WriteStream()
aHTMLControls.DeleteAndDestroyAll();
- if( !aChrFormatInfos.empty() )
- aChrFormatInfos.clear();
+ if (!m_CharFormatInfos.empty())
+ m_CharFormatInfos.clear();
- if( !aTextCollInfos.empty() )
- aTextCollInfos.clear();
+ if (!m_TextCollInfos.empty())
+ m_TextCollInfos.clear();
if(!aImgMapNames.empty())
aImgMapNames.clear();
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index 53955f5..8dad0b5 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -20,8 +20,9 @@
#define INCLUDED_SW_SOURCE_FILTER_HTML_WRTHTML_HXX
#include <boost/ptr_container/ptr_vector.hpp>
-#include <boost/ptr_container/ptr_set.hpp>
+#include <memory>
#include <vector>
+#include <set>
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/form/XForm.hpp>
@@ -263,7 +264,16 @@ struct SwHTMLFormatInfo
};
-typedef boost::ptr_set<SwHTMLFormatInfo> SwHTMLFormatInfos;
+struct SwHTMLFormatInfo_Less
+{
+ bool operator()(std::unique_ptr<SwHTMLFormatInfo> const& lhs,
+ std::unique_ptr<SwHTMLFormatInfo> const& rhs)
+ {
+ return (*lhs) < (*rhs);
+ }
+};
+
+typedef std::set<std::unique_ptr<SwHTMLFormatInfo>, SwHTMLFormatInfo_Less> SwHTMLFormatInfos;
class IDocumentStylePoolAccess;
@@ -296,8 +306,8 @@ public:
std::vector<OUString> aOutlineMarks;
std::vector<sal_uInt32> aOutlineMarkPoss;
HTMLControls aHTMLControls; // die zu schreibenden Forms
- SwHTMLFormatInfos aChrFormatInfos;
- SwHTMLFormatInfos aTextCollInfos;
+ SwHTMLFormatInfos m_CharFormatInfos;
+ SwHTMLFormatInfos m_TextCollInfos;
INetFormats aINetFormats; // die "offenen" INet-Attribute
SwHTMLTextFootnotes *pFootEndNotes;
commit 6be72cc21cd59e6cb3c4dcda9416d1ab362f0a14
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Jul 27 14:15:15 2015 +0200
configure: make --enable-selective-debuginfo less errorprone
Change-Id: I6b7379323a86242b42a8a5137807c535bf1d7c46
diff --git a/configure.ac b/configure.ac
index 2d36f0c..8d3b906 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3919,6 +3919,9 @@ ENABLE_DEBUGINFO_FOR=
if test -n "$ENABLE_DEBUG"; then
AC_MSG_CHECKING([whether to use selective debuginfo])
if test -n "$enable_selective_debuginfo" -a "$enable_selective_debuginfo" != "no"; then
+ if test "$enable_selective_debuginfo" = "yes"; then
+ AC_MSG_ERROR([--enable-selective-debuginfo requires a parameter])
+ fi
ENABLE_DEBUGINFO_FOR="$enable_selective_debuginfo"
AC_MSG_RESULT([for "$enable_selective_debuginfo"])
else
commit e19d1afd7e6ef75b994e436aff57bd94efbb5acb
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Jul 27 13:45:43 2015 +0200
sw: replace boost::ptr_set with std::set<std::unique_ptr>
Change-Id: I8f08074cfd9515d3ded629427745c113f8c80dbc
diff --git a/sw/source/core/inc/blink.hxx b/sw/source/core/inc/blink.hxx
index 2c3a74e..6c14225 100644
--- a/sw/source/core/inc/blink.hxx
+++ b/sw/source/core/inc/blink.hxx
@@ -26,7 +26,9 @@ class SwTextFrm;
#include <vcl/timer.hxx>
#include <tools/gen.hxx>
-#include <boost/ptr_container/ptr_set.hpp>
+
+#include <set>
+#include <memory>
class SwBlinkPortion
{
@@ -61,11 +63,20 @@ public:
{ return reinterpret_cast<sal_IntPtr>(pPor) == reinterpret_cast<sal_IntPtr>(rBlinkPortion.pPor); }
};
-class SwBlinkList : public boost::ptr_set<SwBlinkPortion> {};
+struct SwBlinkPortion_Less
+{
+ bool operator()(std::unique_ptr<SwBlinkPortion> const& lhs,
+ std::unique_ptr<SwBlinkPortion> const& rhs)
+ {
+ return (*lhs) < (*rhs);
+ }
+};
+
+typedef std::set<std::unique_ptr<SwBlinkPortion>, SwBlinkPortion_Less> SwBlinkSet;
class SwBlink
{
- SwBlinkList aList;
+ SwBlinkSet m_List;
AutoTimer aTimer;
bool bVisible;
diff --git a/sw/source/core/text/blink.cxx b/sw/source/core/text/blink.cxx
index db06123..db11349 100644
--- a/sw/source/core/text/blink.cxx
+++ b/sw/source/core/text/blink.cxx
@@ -62,12 +62,12 @@ IMPL_LINK_NOARG_TYPED(SwBlink, Blinker, Timer *, void)
aTimer.SetTimeout( BLINK_ON_TIME );
else
aTimer.SetTimeout( BLINK_OFF_TIME );
- if( !aList.empty() )
+ if (!m_List.empty())
{
- for( SwBlinkList::iterator it = aList.begin(); it != aList.end(); )
+ for (SwBlinkSet::iterator it = m_List.begin(); it != m_List.end(); )
{
- const SwBlinkPortion* pTmp = &*it;
+ const SwBlinkPortion* pTmp = it->get();
if( pTmp->GetRootFrm() &&
pTmp->GetRootFrm()->GetCurrShell() )
{
@@ -108,7 +108,7 @@ IMPL_LINK_NOARG_TYPED(SwBlink, Blinker, Timer *, void)
->GetCurrShell()->InvalidateWindows( aRefresh );
}
else // Portions without a shell can be removed from the list
- it = aList.erase(it);
+ it = m_List.erase(it);
}
}
else // If the list is empty, the timer can be stopped
@@ -118,19 +118,18 @@ IMPL_LINK_NOARG_TYPED(SwBlink, Blinker, Timer *, void)
void SwBlink::Insert( const Point& rPoint, const SwLinePortion* pPor,
const SwTextFrm *pTextFrm, sal_uInt16 nDir )
{
- SwBlinkPortion *pBlinkPor = new SwBlinkPortion( pPor, nDir );
+ std::unique_ptr<SwBlinkPortion> pBlinkPor(new SwBlinkPortion(pPor, nDir));
- SwBlinkList::iterator it = aList.find( *pBlinkPor );
- if( it != aList.end() )
+ SwBlinkSet::iterator it = m_List.find( pBlinkPor );
+ if (it != m_List.end())
{
- (*it).SetPos( rPoint );
- delete pBlinkPor;
+ (*it)->SetPos( rPoint );
}
else
{
pBlinkPor->SetPos( rPoint );
pBlinkPor->SetRootFrm( pTextFrm->getRootFrm() );
- aList.insert( pBlinkPor );
+ m_List.insert(std::move(pBlinkPor));
pTextFrm->SetBlinkPor();
if( pPor->IsLayPortion() || pPor->IsParaPortion() )
const_cast<SwLineLayout*>(static_cast<const SwLineLayout*>(pPor))->SetBlinking();
@@ -144,13 +143,13 @@ void SwBlink::Replace( const SwLinePortion* pOld, const SwLinePortion* pNew )
{
// setting direction to 0 because direction does not matter
// for this operation
- SwBlinkPortion aBlink( pOld, 0 );
- SwBlinkList::iterator it = aList.find( aBlink );
- if( it != aList.end() )
+ std::unique_ptr<SwBlinkPortion> pBlinkPortion(new SwBlinkPortion(pOld, 0));
+ SwBlinkSet::iterator it = m_List.find( pBlinkPortion );
+ if (it != m_List.end())
{
- SwBlinkPortion* aTmp = new SwBlinkPortion( &*it, pNew );
- aList.erase( it );
- aList.insert( aTmp );
+ std::unique_ptr<SwBlinkPortion> pTmp(new SwBlinkPortion(it->get(), pNew));
+ m_List.erase( it );
+ m_List.insert(std::move(pTmp));
}
}
@@ -158,16 +157,16 @@ void SwBlink::Delete( const SwLinePortion* pPor )
{
// setting direction to 0 because direction does not matter
// for this operation
- SwBlinkPortion aBlink( pPor, 0 );
- aList.erase( aBlink );
+ std::unique_ptr<SwBlinkPortion> pBlinkPortion(new SwBlinkPortion(pPor, 0));
+ m_List.erase( pBlinkPortion );
}
void SwBlink::FrmDelete( const SwRootFrm* pRoot )
{
- for( SwBlinkList::iterator it = aList.begin(); it != aList.end(); )
+ for (SwBlinkSet::iterator it = m_List.begin(); it != m_List.end(); )
{
- if( pRoot == (*it).GetRootFrm() )
- aList.erase( it++ );
+ if (pRoot == (*it)->GetRootFrm())
+ m_List.erase( it++ );
else
++it;
}
commit f29ac1d91b12ab2f55d7ab7afce62238a59b8cba
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Jul 24 18:23:22 2015 +0200
gdb pretty printer for SwNodes fails on Python 3 due to "unicode"
Change-Id: I8e4983a91d4f97a2a20fbeed89d4e0f186c35fad
diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py
index 2c5874a..ddbbb42 100644
--- a/solenv/gdb/libreoffice/sw.py
+++ b/solenv/gdb/libreoffice/sw.py
@@ -213,7 +213,7 @@ class BigPtrArrayPrinter(object):
# accessing this is completely non-obvious...
# also, node.dynamic_cast(node.dynamic_type) is null?
value = " TextNode " + \
- unicode(node.cast(node.dynamic_type).dereference()['m_Text'])
+ six.text_type(node.cast(node.dynamic_type).dereference()['m_Text'])
elif str(node.dynamic_type.target()) == "SwOLENode":
value = " OLENode "
elif str(node.dynamic_type.target()) == "SwGrfNode":
More information about the Libreoffice-commits
mailing list