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
9004eeae
Kaydet (Commit)
9004eeae
authored
Eyl 07, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert Link<> to typed
Change-Id: I206430e6cb32235b0ac47781fe586c3e374bfc17
üst
a7fde38a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
26 deletions
+21
-26
cuifmsearch.cxx
cui/source/dialogs/cuifmsearch.cxx
+1
-3
cuifmsearch.hxx
cui/source/inc/cuifmsearch.hxx
+1
-1
fmsrcimp.hxx
include/svx/fmsrcimp.hxx
+10
-10
fmsrcimp.cxx
svx/source/form/fmsrcimp.cxx
+9
-12
No files found.
cui/source/dialogs/cuifmsearch.cxx
Dosyayı görüntüle @
9004eeae
...
...
@@ -705,7 +705,7 @@ void FmSearchDialog::OnFound(const css::uno::Any& aCursorPos, sal_Int16 nFieldPo
m_pcmbSearchText
->
GrabFocus
();
}
IMPL_LINK
(
FmSearchDialog
,
OnSearchProgress
,
FmSearchProgress
*
,
pProgress
)
IMPL_LINK
_TYPED
(
FmSearchDialog
,
OnSearchProgress
,
const
FmSearchProgress
*
,
pProgress
,
void
)
{
SolarMutexGuard
aGuard
;
// make this single method thread-safe (it's an overkill to block the whole application for this,
...
...
@@ -761,8 +761,6 @@ IMPL_LINK(FmSearchDialog, OnSearchProgress, FmSearchProgress*, pProgress)
}
m_pftRecord
->
SetText
(
OUString
::
number
(
1
+
pProgress
->
nCurrentRecord
));
return
0L
;
}
void
FmSearchDialog
::
LoadParams
()
...
...
cui/source/inc/cuifmsearch.hxx
Dosyayı görüntüle @
9004eeae
...
...
@@ -171,7 +171,7 @@ private:
DECL_LINK
(
OnContextSelection
,
ListBox
*
);
DECL_LINK
(
OnSearchProgress
,
FmSearchProgress
*
);
DECL_LINK
_TYPED
(
OnSearchProgress
,
const
FmSearchProgress
*
,
void
);
DECL_LINK_TYPED
(
OnDelayedPaint
,
Timer
*
,
void
);
///< see EnableSearchUI
...
...
include/svx/fmsrcimp.hxx
Dosyayı görüntüle @
9004eeae
...
...
@@ -44,15 +44,15 @@
class
FmSearchEngine
;
class
SAL_WARN_UNUSED
FmSearchThread
:
public
::
osl
::
Thread
{
FmSearchEngine
*
m_pEngine
;
Link
<
>
m_aTerminationHdl
;
FmSearchEngine
*
m_pEngine
;
Link
<
FmSearchThread
*
,
void
>
m_aTerminationHdl
;
virtual
void
SAL_CALL
run
()
SAL_OVERRIDE
;
virtual
void
SAL_CALL
onTerminated
()
SAL_OVERRIDE
;
public
:
FmSearchThread
(
FmSearchEngine
*
pEngine
)
:
m_pEngine
(
pEngine
)
{
}
void
setTerminationHandler
(
Link
<>
aHdl
)
{
m_aTerminationHdl
=
aHdl
;
}
void
setTerminationHandler
(
Link
<
FmSearchThread
*
,
void
>
aHdl
)
{
m_aTerminationHdl
=
aHdl
;
}
};
/**
...
...
@@ -84,12 +84,12 @@ struct FmSearchProgress
class
SAL_WARN_UNUSED
FmRecordCountListener
:
public
::
cppu
::
WeakImplHelper1
<
::
com
::
sun
::
star
::
beans
::
XPropertyChangeListener
>
{
// attribute
Link
<
>
m_lnkWhoWantsToKnow
;
Link
<
sal_Int32
,
void
>
m_lnkWhoWantsToKnow
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>
m_xListening
;
// attribute access
public
:
Link
<
>
SetPropChangeHandler
(
const
Link
<
>&
lnk
);
Link
<
sal_Int32
,
void
>
SetPropChangeHandler
(
const
Link
<
sal_Int32
,
void
>&
lnk
);
// methods
public
:
...
...
@@ -203,7 +203,7 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED FmSearchEngine
// Data for the decision in which field a "Found" is accepted
::
com
::
sun
::
star
::
uno
::
Any
m_aPreviousLocBookmark
;
// position of the last finding
FieldCollection
::
iterator
m_iterPreviousLocField
;
// field of the last finding
FieldCollection
::
iterator
m_iterPreviousLocField
;
// field of the last finding
// Communication with the thread that does the actual searching
OUString
m_strSearchExpression
;
// forward direction
...
...
@@ -211,7 +211,7 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED FmSearchEngine
SEARCH_RESULT
m_srResult
;
// backward direction
// The link we broadcast the progress and the result to
Link
<
>
m_aProgressHandler
;
Link
<
const
FmSearchProgress
*
,
void
>
m_aProgressHandler
;
bool
m_bSearchingCurrently
:
1
;
// is an (asynchronous) search running?
bool
m_bCancelAsynchRequest
:
1
;
// should be cancelled?
::
osl
::
Mutex
m_aCancelAsynchAccess
;
// access to_bCancelAsynchRequest (technically only
...
...
@@ -312,7 +312,7 @@ public:
a FmSearchProgress structure
the handler should be in any case thread-safe
*/
void
SetProgressHandler
(
Link
<>
aHdl
)
{
m_aProgressHandler
=
aHdl
;
}
void
SetProgressHandler
(
Link
<
const
FmSearchProgress
*
,
void
>
aHdl
)
{
m_aProgressHandler
=
aHdl
;
}
/// search for the next appearance (for nDirection values check DIRECTION_*-defines)
void
SearchNext
(
const
OUString
&
strExpression
);
...
...
@@ -380,9 +380,9 @@ private:
SVX_DLLPRIVATE
bool
HasPreviousLoc
()
{
return
m_aPreviousLocBookmark
.
hasValue
();
}
DECL_LINK
(
OnSearchTerminated
,
FmSearchThread
*
);
DECL_LINK
_TYPED
(
OnSearchTerminated
,
FmSearchThread
*
,
void
);
// is used by SearchThread, after the return from this handler the thread removes itself
DECL_LINK
(
OnNewRecordCount
,
void
*
);
DECL_LINK
_TYPED
(
OnNewRecordCount
,
sal_Int32
,
void
);
};
#endif // INCLUDED_SVX_FMSRCIMP_HXX
...
...
svx/source/form/fmsrcimp.cxx
Dosyayı görüntüle @
9004eeae
...
...
@@ -107,9 +107,9 @@ FmRecordCountListener::FmRecordCountListener(const Reference< ::com::sun::star::
}
Link
<
>
FmRecordCountListener
::
SetPropChangeHandler
(
const
Link
<
>&
lnk
)
Link
<
sal_Int32
,
void
>
FmRecordCountListener
::
SetPropChangeHandler
(
const
Link
<
sal_Int32
,
void
>&
lnk
)
{
Link
<>
lnkReturn
=
m_lnkWhoWantsToKnow
;
Link
<
sal_Int32
,
void
>
lnkReturn
=
m_lnkWhoWantsToKnow
;
m_lnkWhoWantsToKnow
=
lnk
;
if
(
m_xListening
.
is
())
...
...
@@ -145,8 +145,8 @@ void FmRecordCountListener::NotifyCurrentCount()
if
(
m_lnkWhoWantsToKnow
.
IsSet
())
{
DBG_ASSERT
(
m_xListening
.
is
(),
"FmRecordCountListener::NotifyCurrentCount : I have no propset ... !?"
);
void
*
pTheCount
=
reinterpret_cast
<
void
*>
(
::
comphelper
::
getINT32
(
m_xListening
->
getPropertyValue
(
FM_PROP_ROWCOUNT
)
));
m_lnkWhoWantsToKnow
.
Call
(
pT
heCount
);
sal_Int32
theCount
=
::
comphelper
::
getINT32
(
m_xListening
->
getPropertyValue
(
FM_PROP_ROWCOUNT
));
m_lnkWhoWantsToKnow
.
Call
(
t
heCount
);
}
}
...
...
@@ -1063,10 +1063,10 @@ void FmSearchEngine::SearchNextImpl()
}
IMPL_LINK
(
FmSearchEngine
,
OnSearchTerminated
,
FmSearchThread
*
,
/*pThread*/
)
IMPL_LINK
_NOARG_TYPED
(
FmSearchEngine
,
OnSearchTerminated
,
FmSearchThread
*
,
void
)
{
if
(
!
m_aProgressHandler
.
IsSet
())
return
0L
;
return
;
FmSearchProgress
aProgress
;
try
...
...
@@ -1101,21 +1101,18 @@ IMPL_LINK(FmSearchEngine, OnSearchTerminated, FmSearchThread*, /*pThread*/)
m_aProgressHandler
.
Call
(
&
aProgress
);
m_bSearchingCurrently
=
false
;
return
0L
;
}
IMPL_LINK
(
FmSearchEngine
,
OnNewRecordCount
,
void
*
,
pCounterAsV
oid
)
IMPL_LINK
_TYPED
(
FmSearchEngine
,
OnNewRecordCount
,
sal_Int32
,
theCounter
,
v
oid
)
{
if
(
!
m_aProgressHandler
.
IsSet
())
return
0L
;
return
;
FmSearchProgress
aProgress
;
aProgress
.
nCurrentRecord
=
reinterpret_cast
<
sal_uIntPtr
>
(
pCounterAsVoid
)
;
aProgress
.
nCurrentRecord
=
theCounter
;
aProgress
.
aSearchState
=
FmSearchProgress
::
STATE_PROGRESS_COUNTING
;
m_aProgressHandler
.
Call
(
&
aProgress
);
return
0L
;
}
...
...
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