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
f14a3a04
Kaydet (Commit)
f14a3a04
authored
May 30, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use UnoCursorPointer in SwXTextRanges
Change-Id: Iabcb98f664739aaae0d92b4f2a6b0e50bdcbc09b
üst
fc87cdbd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
34 deletions
+7
-34
unocrsr.hxx
sw/inc/unocrsr.hxx
+3
-0
unoobj2.cxx
sw/source/core/unocore/unoobj2.cxx
+4
-34
No files found.
sw/inc/unocrsr.hxx
Dosyayı görüntüle @
f14a3a04
...
...
@@ -107,6 +107,9 @@ namespace sw
class
UnoCursorPointer
:
public
SwClient
{
public
:
UnoCursorPointer
()
:
m_pCursor
(
nullptr
)
{}
UnoCursorPointer
(
std
::
shared_ptr
<
SwUnoCrsr
>
pCursor
)
:
m_pCursor
(
pCursor
)
{
...
...
sw/source/core/unocore/unoobj2.cxx
Dosyayı görüntüle @
f14a3a04
...
...
@@ -1467,56 +1467,26 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
}
class
SwXTextRanges
::
Impl
:
public
SwClient
{
public
:
::
std
::
vector
<
uno
::
Reference
<
text
::
XTextRange
>
>
m_Ranges
;
s
td
::
shared_ptr
<
SwUnoCrsr
>
m_pUnoCursor
;
s
w
::
UnoCursorPointer
m_pUnoCursor
;
explicit
Impl
(
SwPaM
*
const
pPaM
)
{
if
(
pPaM
)
{
m_pUnoCursor
=
pPaM
->
GetDoc
()
->
CreateUnoCrsr
(
*
pPaM
->
GetPoint
());
m_pUnoCursor
->
Add
(
this
);
m_pUnoCursor
.
reset
(
pPaM
->
GetDoc
()
->
CreateUnoCrsr
(
*
pPaM
->
GetPoint
()));
::
sw
::
DeepCopyPaM
(
*
pPaM
,
*
GetCursor
());
}
MakeRanges
();
}
virtual
~
Impl
()
{
if
(
m_pUnoCursor
)
m_pUnoCursor
->
Remove
(
this
);
}
SwUnoCrsr
*
GetCursor
()
{
return
static_cast
<
SwUnoCrsr
*>
(
GetRegisteredIn
());
}
SwUnoCrsr
*
GetCursor
()
{
return
&
(
*
m_pUnoCursor
);
}
void
MakeRanges
();
protected
:
// SwClient
virtual
void
Modify
(
const
SfxPoolItem
*
pOld
,
const
SfxPoolItem
*
pNew
)
SAL_OVERRIDE
;
virtual
void
SwClientNotify
(
const
SwModify
&
rModify
,
const
SfxHint
&
rHint
)
SAL_OVERRIDE
;
};
void
SwXTextRanges
::
Impl
::
Modify
(
const
SfxPoolItem
*
pOld
,
const
SfxPoolItem
*
pNew
)
{
ClientModify
(
this
,
pOld
,
pNew
);
}
void
SwXTextRanges
::
Impl
::
SwClientNotify
(
const
SwModify
&
rModify
,
const
SfxHint
&
rHint
)
{
SwClient
::
SwClientNotify
(
rModify
,
rHint
);
if
(
m_pUnoCursor
&&
typeid
(
rHint
)
==
typeid
(
sw
::
DocDisposingHint
))
{
m_pUnoCursor
->
Remove
(
this
);
m_pUnoCursor
.
reset
();
}
}
void
SwXTextRanges
::
Impl
::
MakeRanges
()
{
if
(
GetCursor
())
...
...
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