[Libreoffice-commits] core.git: 2 commits - sw/source vcl/inc
Miklos Vajna
vmiklos at collabora.co.uk
Tue Aug 11 00:13:54 PDT 2015
sw/source/core/crsr/bookmrk.cxx | 5 +++--
sw/source/core/crsr/findattr.cxx | 8 ++++----
sw/source/core/crsr/findfmt.cxx | 4 ++--
sw/source/core/crsr/viscrs.cxx | 4 ++--
sw/source/core/inc/bookmrk.hxx | 6 +++---
vcl/inc/salframe.hxx | 1 +
vcl/inc/salvd.hxx | 1 +
7 files changed, 16 insertions(+), 13 deletions(-)
New commits:
commit 039b7c50c9d164e9d3e1274f7246e03a2b23fe50
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Aug 11 09:13:23 2015 +0200
sw: use std::unique_ptr in crsr code
Change-Id: I108683bc2548c9572d2800c062a2e036808464a8
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 6b81556..76536da 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <memory>
#include <bookmrk.hxx>
#include <IDocumentMarkAccess.hxx>
#include <IDocumentUndoRedo.hxx>
@@ -160,13 +161,13 @@ namespace sw { namespace mark
void MarkBase::SetMarkPos(const SwPosition& rNewPos)
{
- ::boost::scoped_ptr<SwPosition>(new SwPosition(rNewPos)).swap(m_pPos1);
+ std::unique_ptr<SwPosition>(new SwPosition(rNewPos)).swap(m_pPos1);
m_pPos1->nContent.SetMark(this);
}
void MarkBase::SetOtherMarkPos(const SwPosition& rNewPos)
{
- ::boost::scoped_ptr<SwPosition>(new SwPosition(rNewPos)).swap(m_pPos2);
+ std::unique_ptr<SwPosition>(new SwPosition(rNewPos)).swap(m_pPos2);
m_pPos2->nContent.SetMark(this);
}
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 9ff5944..c8bb015 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -43,7 +43,7 @@
#include <swundo.hxx>
#include <crsskip.hxx>
#include <boost/optional.hpp>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
using namespace ::com::sun::star;
using namespace ::com::sun::star::lang;
@@ -888,7 +888,7 @@ bool SwPaM::Find( const SfxPoolItem& rAttr, bool bValue, SwMoveFn fnMove,
const sal_uInt16 nWhich = rAttr.Which();
bool bCharAttr = isCHRATR(nWhich) || isTXTATR(nWhich);
- boost::scoped_ptr<SwPaM> pPam(MakeRegion( fnMove, pRegion ));
+ std::unique_ptr<SwPaM> pPam(MakeRegion( fnMove, pRegion ));
bool bFound = false;
bool bFirst = true;
@@ -966,7 +966,7 @@ typedef bool (*FnSearchAttr)( const SwTextNode&, SwAttrCheckArr&, SwPaM& );
bool SwPaM::Find( const SfxItemSet& rSet, bool bNoColls, SwMoveFn fnMove,
const SwPaM *pRegion, bool bInReadOnly, bool bMoveFirst )
{
- boost::scoped_ptr<SwPaM> pPam(MakeRegion( fnMove, pRegion ));
+ std::unique_ptr<SwPaM> pPam(MakeRegion( fnMove, pRegion ));
bool bFound = false;
bool bFirst = true;
@@ -1153,7 +1153,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
const_cast< SwPaM* >(pRegion)->GetRingContainer().merge( rCursor.GetRingContainer() );
}
- boost::scoped_ptr<OUString> pRepl( (bRegExp) ?
+ std::unique_ptr<OUString> pRepl( (bRegExp) ?
ReplaceBackReferences( *pSearchOpt, pCrsr ) : 0 );
rCursor.GetDoc()->getIDocumentContentOperations().ReplaceRange( *pCrsr,
(pRepl.get()) ? *pRepl : pSearchOpt->replaceString,
diff --git a/sw/source/core/crsr/findfmt.cxx b/sw/source/core/crsr/findfmt.cxx
index e9e7455..42713d5 100644
--- a/sw/source/core/crsr/findfmt.cxx
+++ b/sw/source/core/crsr/findfmt.cxx
@@ -19,14 +19,14 @@
#include <doc.hxx>
#include <pamtyp.hxx>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
bool SwPaM::Find( const SwFormat& rFormat, SwMoveFn fnMove,
const SwPaM *pRegion, bool bInReadOnly )
{
bool bFound = false;
const bool bSrchForward = (fnMove == fnMoveForward);
- boost::scoped_ptr<SwPaM> pPam(MakeRegion( fnMove, pRegion ));
+ std::unique_ptr<SwPaM> pPam(MakeRegion( fnMove, pRegion ));
// if at beginning/end then move it out of the node
if( bSrchForward
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 6ff4596..1eb02ba 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -51,7 +51,7 @@
#include <svx/sdr/overlay/overlayselection.hxx>
#include <overlayrangesoutline.hxx>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <paintfrm.hxx>
@@ -410,7 +410,7 @@ void SwSelPaintRects::HighlightInputField()
if ( pCurTextInputFieldAtCrsr != NULL )
{
SwTextNode* pTextNode = pCurTextInputFieldAtCrsr->GetpTextNode();
- ::boost::scoped_ptr<SwShellCrsr> pCrsrForInputTextField(
+ std::unique_ptr<SwShellCrsr> pCrsrForInputTextField(
new SwShellCrsr( *GetShell(), SwPosition( *pTextNode, pCurTextInputFieldAtCrsr->GetStart() ) ) );
pCrsrForInputTextField->SetMark();
pCrsrForInputTextField->GetMark()->nNode = *pTextNode;
diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx
index a47040b..df6671f 100644
--- a/sw/source/core/inc/bookmrk.hxx
+++ b/sw/source/core/inc/bookmrk.hxx
@@ -23,7 +23,7 @@
#include <cppuhelper/weakref.hxx>
#include <sfx2/Metadatable.hxx>
#include <vcl/keycod.hxx>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
#include <boost/noncopyable.hpp>
#include <map>
#include <rtl/ustring.hxx>
@@ -114,8 +114,8 @@ namespace sw {
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) SAL_OVERRIDE;
MarkBase(const SwPaM& rPaM, const OUString& rName);
- ::boost::scoped_ptr<SwPosition> m_pPos1;
- ::boost::scoped_ptr<SwPosition> m_pPos2;
+ std::unique_ptr<SwPosition> m_pPos1;
+ std::unique_ptr<SwPosition> m_pPos2;
OUString m_aName;
static OUString GenerateNewName(const OUString& rPrefix);
commit e7c134af920b007e697e0f7ed20a22af347c0690
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Aug 11 09:12:40 2015 +0200
vcl: add SalFrame / SalVirtualDevice doxygen comments
Change-Id: I0c2a9a5b4266ee0f0d15b7cbfa49f898930d002a
diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx
index 65213dc..e75ed2d 100644
--- a/vcl/inc/salframe.hxx
+++ b/vcl/inc/salframe.hxx
@@ -96,6 +96,7 @@ typedef sal_uInt64 SalExtStyle;
struct SystemParentData;
+/// A SalFrame is a system window (e.g. an X11 window).
class VCL_PLUGIN_PUBLIC SalFrame
: public vcl::DeletionNotifier
, public SalGeometryProvider
diff --git a/vcl/inc/salvd.hxx b/vcl/inc/salvd.hxx
index c07722f..737757f 100644
--- a/vcl/inc/salvd.hxx
+++ b/vcl/inc/salvd.hxx
@@ -26,6 +26,7 @@
class SalGraphics;
+/// A non-visible drawable/buffer (e.g. an X11 Pixmap).
class VCL_PLUGIN_PUBLIC SalVirtualDevice
: public SalGeometryProvider
{
More information about the Libreoffice-commits
mailing list