Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
039b7c50
Kaydet (Commit)
039b7c50
authored
Agu 11, 2015
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: use std::unique_ptr in crsr code
Change-Id: I108683bc2548c9572d2800c062a2e036808464a8
üst
e7c134af
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
13 deletions
+14
-13
bookmrk.cxx
sw/source/core/crsr/bookmrk.cxx
+3
-2
findattr.cxx
sw/source/core/crsr/findattr.cxx
+4
-4
findfmt.cxx
sw/source/core/crsr/findfmt.cxx
+2
-2
viscrs.cxx
sw/source/core/crsr/viscrs.cxx
+2
-2
bookmrk.hxx
sw/source/core/inc/bookmrk.hxx
+3
-3
No files found.
sw/source/core/crsr/bookmrk.cxx
Dosyayı görüntüle @
039b7c50
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
*/
#include <memory>
#include <bookmrk.hxx>
#include <bookmrk.hxx>
#include <IDocumentMarkAccess.hxx>
#include <IDocumentMarkAccess.hxx>
#include <IDocumentUndoRedo.hxx>
#include <IDocumentUndoRedo.hxx>
...
@@ -160,13 +161,13 @@ namespace sw { namespace mark
...
@@ -160,13 +161,13 @@ namespace sw { namespace mark
void
MarkBase
::
SetMarkPos
(
const
SwPosition
&
rNewPos
)
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
);
m_pPos1
->
nContent
.
SetMark
(
this
);
}
}
void
MarkBase
::
SetOtherMarkPos
(
const
SwPosition
&
rNewPos
)
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
);
m_pPos2
->
nContent
.
SetMark
(
this
);
}
}
...
...
sw/source/core/crsr/findattr.cxx
Dosyayı görüntüle @
039b7c50
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
#include <swundo.hxx>
#include <swundo.hxx>
#include <crsskip.hxx>
#include <crsskip.hxx>
#include <boost/optional.hpp>
#include <boost/optional.hpp>
#include <
boost/scoped_ptr.hpp
>
#include <
memory
>
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
::
lang
;
using
namespace
::
com
::
sun
::
star
::
lang
;
...
@@ -888,7 +888,7 @@ bool SwPaM::Find( const SfxPoolItem& rAttr, bool bValue, SwMoveFn fnMove,
...
@@ -888,7 +888,7 @@ bool SwPaM::Find( const SfxPoolItem& rAttr, bool bValue, SwMoveFn fnMove,
const
sal_uInt16
nWhich
=
rAttr
.
Which
();
const
sal_uInt16
nWhich
=
rAttr
.
Which
();
bool
bCharAttr
=
isCHRATR
(
nWhich
)
||
isTXTATR
(
nWhich
);
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
bFound
=
false
;
bool
bFirst
=
true
;
bool
bFirst
=
true
;
...
@@ -966,7 +966,7 @@ typedef bool (*FnSearchAttr)( const SwTextNode&, SwAttrCheckArr&, SwPaM& );
...
@@ -966,7 +966,7 @@ typedef bool (*FnSearchAttr)( const SwTextNode&, SwAttrCheckArr&, SwPaM& );
bool
SwPaM
::
Find
(
const
SfxItemSet
&
rSet
,
bool
bNoColls
,
SwMoveFn
fnMove
,
bool
SwPaM
::
Find
(
const
SfxItemSet
&
rSet
,
bool
bNoColls
,
SwMoveFn
fnMove
,
const
SwPaM
*
pRegion
,
bool
bInReadOnly
,
bool
bMoveFirst
)
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
bFound
=
false
;
bool
bFirst
=
true
;
bool
bFirst
=
true
;
...
@@ -1153,7 +1153,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
...
@@ -1153,7 +1153,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
const_cast
<
SwPaM
*
>
(
pRegion
)
->
GetRingContainer
().
merge
(
rCursor
.
GetRingContainer
()
);
const_cast
<
SwPaM
*
>
(
pRegion
)
->
GetRingContainer
().
merge
(
rCursor
.
GetRingContainer
()
);
}
}
boost
::
scoped
_ptr
<
OUString
>
pRepl
(
(
bRegExp
)
?
std
::
unique
_ptr
<
OUString
>
pRepl
(
(
bRegExp
)
?
ReplaceBackReferences
(
*
pSearchOpt
,
pCrsr
)
:
0
);
ReplaceBackReferences
(
*
pSearchOpt
,
pCrsr
)
:
0
);
rCursor
.
GetDoc
()
->
getIDocumentContentOperations
().
ReplaceRange
(
*
pCrsr
,
rCursor
.
GetDoc
()
->
getIDocumentContentOperations
().
ReplaceRange
(
*
pCrsr
,
(
pRepl
.
get
())
?
*
pRepl
:
pSearchOpt
->
replaceString
,
(
pRepl
.
get
())
?
*
pRepl
:
pSearchOpt
->
replaceString
,
...
...
sw/source/core/crsr/findfmt.cxx
Dosyayı görüntüle @
039b7c50
...
@@ -19,14 +19,14 @@
...
@@ -19,14 +19,14 @@
#include <doc.hxx>
#include <doc.hxx>
#include <pamtyp.hxx>
#include <pamtyp.hxx>
#include <
boost/scoped_ptr.hpp
>
#include <
memory
>
bool
SwPaM
::
Find
(
const
SwFormat
&
rFormat
,
SwMoveFn
fnMove
,
bool
SwPaM
::
Find
(
const
SwFormat
&
rFormat
,
SwMoveFn
fnMove
,
const
SwPaM
*
pRegion
,
bool
bInReadOnly
)
const
SwPaM
*
pRegion
,
bool
bInReadOnly
)
{
{
bool
bFound
=
false
;
bool
bFound
=
false
;
const
bool
bSrchForward
=
(
fnMove
==
fnMoveForward
);
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 at beginning/end then move it out of the node
if
(
bSrchForward
if
(
bSrchForward
...
...
sw/source/core/crsr/viscrs.cxx
Dosyayı görüntüle @
039b7c50
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
#include <svx/sdr/overlay/overlayselection.hxx>
#include <svx/sdr/overlay/overlayselection.hxx>
#include <overlayrangesoutline.hxx>
#include <overlayrangesoutline.hxx>
#include <
boost/scoped_ptr.hpp
>
#include <
memory
>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <paintfrm.hxx>
#include <paintfrm.hxx>
...
@@ -410,7 +410,7 @@ void SwSelPaintRects::HighlightInputField()
...
@@ -410,7 +410,7 @@ void SwSelPaintRects::HighlightInputField()
if
(
pCurTextInputFieldAtCrsr
!=
NULL
)
if
(
pCurTextInputFieldAtCrsr
!=
NULL
)
{
{
SwTextNode
*
pTextNode
=
pCurTextInputFieldAtCrsr
->
GetpTextNode
();
SwTextNode
*
pTextNode
=
pCurTextInputFieldAtCrsr
->
GetpTextNode
();
::
boost
::
scoped
_ptr
<
SwShellCrsr
>
pCrsrForInputTextField
(
std
::
unique
_ptr
<
SwShellCrsr
>
pCrsrForInputTextField
(
new
SwShellCrsr
(
*
GetShell
(),
SwPosition
(
*
pTextNode
,
pCurTextInputFieldAtCrsr
->
GetStart
()
)
)
);
new
SwShellCrsr
(
*
GetShell
(),
SwPosition
(
*
pTextNode
,
pCurTextInputFieldAtCrsr
->
GetStart
()
)
)
);
pCrsrForInputTextField
->
SetMark
();
pCrsrForInputTextField
->
SetMark
();
pCrsrForInputTextField
->
GetMark
()
->
nNode
=
*
pTextNode
;
pCrsrForInputTextField
->
GetMark
()
->
nNode
=
*
pTextNode
;
...
...
sw/source/core/inc/bookmrk.hxx
Dosyayı görüntüle @
039b7c50
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
#include <cppuhelper/weakref.hxx>
#include <cppuhelper/weakref.hxx>
#include <sfx2/Metadatable.hxx>
#include <sfx2/Metadatable.hxx>
#include <vcl/keycod.hxx>
#include <vcl/keycod.hxx>
#include <
boost/scoped_ptr.hpp
>
#include <
memory
>
#include <boost/noncopyable.hpp>
#include <boost/noncopyable.hpp>
#include <map>
#include <map>
#include <rtl/ustring.hxx>
#include <rtl/ustring.hxx>
...
@@ -114,8 +114,8 @@ namespace sw {
...
@@ -114,8 +114,8 @@ namespace sw {
virtual
void
Modify
(
const
SfxPoolItem
*
pOld
,
const
SfxPoolItem
*
pNew
)
SAL_OVERRIDE
;
virtual
void
Modify
(
const
SfxPoolItem
*
pOld
,
const
SfxPoolItem
*
pNew
)
SAL_OVERRIDE
;
MarkBase
(
const
SwPaM
&
rPaM
,
const
OUString
&
rName
);
MarkBase
(
const
SwPaM
&
rPaM
,
const
OUString
&
rName
);
::
boost
::
scoped
_ptr
<
SwPosition
>
m_pPos1
;
std
::
unique
_ptr
<
SwPosition
>
m_pPos1
;
::
boost
::
scoped
_ptr
<
SwPosition
>
m_pPos2
;
std
::
unique
_ptr
<
SwPosition
>
m_pPos2
;
OUString
m_aName
;
OUString
m_aName
;
static
OUString
GenerateNewName
(
const
OUString
&
rPrefix
);
static
OUString
GenerateNewName
(
const
OUString
&
rPrefix
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment