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
bdc1824e
Kaydet (Commit)
bdc1824e
authored
May 19, 2015
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SwPaM::Find: search in shapes anchored to the range
Change-Id: I028f95029deaebddcacf2730d429ad53abbc79fa
üst
b97fb340
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
5 deletions
+21
-5
findtxt.cxx
sw/source/core/crsr/findtxt.cxx
+21
-5
No files found.
sw/source/core/crsr/findtxt.cxx
Dosyayı görüntüle @
bdc1824e
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
#include <doc.hxx>
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
#include <IDocumentUndoRedo.hxx>
#include <IDocumentState.hxx>
#include <IDocumentState.hxx>
#include <IDocumentDrawModelAccess.hxx>
#include <pamtyp.hxx>
#include <pamtyp.hxx>
#include <ndtxt.hxx>
#include <ndtxt.hxx>
#include <swundo.hxx>
#include <swundo.hxx>
...
@@ -244,7 +245,8 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
...
@@ -244,7 +245,8 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
{
{
if
(
pNode
->
IsTxtNode
()
)
if
(
pNode
->
IsTxtNode
()
)
{
{
sal_Int32
nTxtLen
=
pNode
->
GetTxtNode
()
->
GetTxt
().
getLength
();
SwTxtNode
&
rTxtNode
=
*
pNode
->
GetTxtNode
();
sal_Int32
nTxtLen
=
rTxtNode
.
GetTxt
().
getLength
();
sal_Int32
nEnd
;
sal_Int32
nEnd
;
if
(
rNdIdx
==
pPam
->
GetMark
()
->
nNode
)
if
(
rNdIdx
==
pPam
->
GetMark
()
->
nNode
)
nEnd
=
pPam
->
GetMark
()
->
nContent
.
GetIndex
();
nEnd
=
pPam
->
GetMark
()
->
nContent
.
GetIndex
();
...
@@ -256,7 +258,7 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
...
@@ -256,7 +258,7 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
// if there are SwPostItFields inside our current node text, we
// if there are SwPostItFields inside our current node text, we
// split the text into separate pieces and search for text inside
// split the text into separate pieces and search for text inside
// the pieces as well as inside the fields
// the pieces as well as inside the fields
const
SwpHints
*
pHts
=
pNode
->
GetTxtNode
()
->
GetpSwpHints
();
const
SwpHints
*
pHts
=
rTxtNode
.
GetpSwpHints
();
// count PostItFields by looping over all fields
// count PostItFields by looping over all fields
sal_Int32
aNumberPostits
=
0
;
sal_Int32
aNumberPostits
=
0
;
...
@@ -295,14 +297,15 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
...
@@ -295,14 +297,15 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
SwViewShell
*
const
pWrtShell
=
(
pDocShell
)
?
pDocShell
->
GetEditShell
()
:
0
;
SwViewShell
*
const
pWrtShell
=
(
pDocShell
)
?
pDocShell
->
GetEditShell
()
:
0
;
SwPostItMgr
*
const
pPostItMgr
=
(
pWrtShell
)
?
pWrtShell
->
GetPostItMgr
()
:
0
;
SwPostItMgr
*
const
pPostItMgr
=
(
pWrtShell
)
?
pWrtShell
->
GetPostItMgr
()
:
0
;
SvxSearchItem
aSearchItem
(
SID_SEARCH_ITEM
);
aSearchItem
.
SetSearchOptions
(
rSearchOpt
);
aSearchItem
.
SetBackward
(
!
bSrchForward
);
// If there is an active text edit, then search there.
// If there is an active text edit, then search there.
if
(
SdrView
*
pSdrView
=
pWrtShell
->
GetDrawView
())
if
(
SdrView
*
pSdrView
=
pWrtShell
->
GetDrawView
())
{
{
if
(
pSdrView
->
GetTextEditObject
())
if
(
pSdrView
->
GetTextEditObject
())
{
{
SvxSearchItem
aSearchItem
(
SID_SEARCH_ITEM
);
aSearchItem
.
SetSearchOptions
(
rSearchOpt
);
aSearchItem
.
SetBackward
(
!
bSrchForward
);
sal_uInt16
nResult
=
pSdrView
->
GetTextEditOutlinerView
()
->
StartSearchAndReplace
(
aSearchItem
);
sal_uInt16
nResult
=
pSdrView
->
GetTextEditOutlinerView
()
->
StartSearchAndReplace
(
aSearchItem
);
if
(
!
nResult
)
if
(
!
nResult
)
{
{
...
@@ -318,6 +321,19 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
...
@@ -318,6 +321,19 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
}
}
}
}
// If there are any shapes anchored to this node, search there.
SwPaM
aPaM
(
pNode
->
GetDoc
()
->
GetNodes
().
GetEndOfContent
());
aPaM
.
GetPoint
()
->
nNode
=
rTxtNode
;
aPaM
.
GetPoint
()
->
nContent
.
Assign
(
aPaM
.
GetPoint
()
->
nNode
.
GetNode
().
GetTxtNode
(),
nStart
);
aPaM
.
SetMark
();
aPaM
.
GetMark
()
->
nNode
=
rTxtNode
.
GetIndex
()
+
1
;
aPaM
.
GetMark
()
->
nContent
.
Assign
(
aPaM
.
GetMark
()
->
nNode
.
GetNode
().
GetTxtNode
(),
0
);
if
(
pNode
->
GetDoc
()
->
getIDocumentDrawModelAccess
().
Search
(
aPaM
,
aSearchItem
))
{
bFound
=
true
;
break
;
}
sal_Int32
aStart
=
0
;
sal_Int32
aStart
=
0
;
// do we need to finish a note?
// do we need to finish a note?
if
(
pPostItMgr
&&
pPostItMgr
->
HasActiveSidebarWin
())
if
(
pPostItMgr
&&
pPostItMgr
->
HasActiveSidebarWin
())
...
...
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