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
df979974
Kaydet (Commit)
df979974
authored
Ock 13, 2012
tarafından
David Tardon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
refactor slightly to avoid link problems with gcc 4.7
üst
bcadf38c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
54 deletions
+49
-54
anyrefdg.hxx
sc/source/ui/inc/anyrefdg.hxx
+17
-6
anyrefdg.cxx
sc/source/ui/miscdlgs/anyrefdg.cxx
+32
-48
No files found.
sc/source/ui/inc/anyrefdg.hxx
Dosyayı görüntüle @
df979974
...
...
@@ -121,7 +121,6 @@ class SC_DLLPUBLIC ScRefHandler : //public SfxModelessDialog,
public
:
operator
Window
*
(){
return
&
m_rWindow
;
}
Window
*
operator
->
()
{
return
static_cast
<
Window
*>
(
*
this
);
}
template
<
class
,
bool
>
friend
class
ScRefHdlrImplBase
;
friend
class
formula
::
RefButton
;
friend
class
formula
::
RefEdit
;
...
...
@@ -152,6 +151,9 @@ protected:
bool
ParseWithNames
(
ScRangeList
&
rRanges
,
const
String
&
rStr
,
ScDocument
*
pDoc
);
void
preNotify
(
const
NotifyEvent
&
rEvent
,
const
bool
bBindRef
);
void
stateChanged
(
const
StateChangedType
nStateChange
,
const
bool
bBindRef
);
public
:
ScRefHandler
(
Window
&
rWindow
,
SfxBindings
*
pB
/*, SfxChildWindow* pCW,
Window* pParent, sal_uInt16 nResId*/
,
bool
bBindRef
);
...
...
@@ -222,6 +224,20 @@ ScRefHdlrImplBase<TWindow,bBindRef>::ScRefHdlrImplBase( TParentWindow* pParent,
template
<
class
TWindow
,
bool
bBindRef
>
ScRefHdlrImplBase
<
TWindow
,
bBindRef
>::~
ScRefHdlrImplBase
(){}
template
<
class
TWindow
,
bool
bBindRef
>
long
ScRefHdlrImplBase
<
TWindow
,
bBindRef
>::
PreNotify
(
NotifyEvent
&
rNEvt
)
{
ScRefHandler
::
preNotify
(
rNEvt
,
bBindRef
);
return
TWindow
::
PreNotify
(
rNEvt
);
}
template
<
class
TWindow
,
bool
bBindRef
>
void
ScRefHdlrImplBase
<
TWindow
,
bBindRef
>::
StateChanged
(
StateChangedType
nStateChange
)
{
TWindow
::
StateChanged
(
nStateChange
);
ScRefHandler
::
stateChanged
(
nStateChange
,
bBindRef
);
}
//============================================================================
template
<
class
TDerived
,
class
TBase
,
bool
bBindRef
=
true
>
struct
ScRefHdlrImpl
:
ScRefHdlrImplBase
<
TBase
,
bBindRef
>
...
...
@@ -257,11 +273,6 @@ inline bool ScRefHandler::CanInputDone( sal_Bool bForced )
return
m_aHelper
.
CanInputDone
(
bForced
);
}
template
<>
SC_DLLPUBLIC
void
ScRefHdlrImplBase
<
SfxModelessDialog
,
true
>::
StateChanged
(
StateChangedType
nStateChange
);
template
<>
SC_DLLPUBLIC
long
ScRefHdlrImplBase
<
SfxModelessDialog
,
true
>::
PreNotify
(
NotifyEvent
&
rNEvt
);
template
<>
SC_DLLPUBLIC
void
ScRefHdlrImplBase
<
SfxTabDialog
,
false
>::
StateChanged
(
StateChangedType
nStateChange
);
template
<>
SC_DLLPUBLIC
long
ScRefHdlrImplBase
<
SfxTabDialog
,
false
>::
PreNotify
(
NotifyEvent
&
rNEvt
);
#endif // SC_ANYREFDG_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sc/source/ui/miscdlgs/anyrefdg.cxx
Dosyayı görüntüle @
df979974
...
...
@@ -865,54 +865,38 @@ void ScRefHandler::ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton*
m_aHelper
.
ToggleCollapsed
(
pEdit
,
pButton
);
}
#if defined( _MSC_VER )
#define INTRODUCE_TEMPLATE
#else
#define INTRODUCE_TEMPLATE template <>
#endif
#define IMPL_TWINDOW_PRENOTIFY( TWindow,bBindRef ) \
INTRODUCE_TEMPLATE long ScRefHdlrImplBase<TWindow,bBindRef>::PreNotify( NotifyEvent& rNEvt )\
{\
if( bBindRef || m_bInRefMode )\
{\
sal_uInt16 nSwitch=rNEvt.GetType();\
if(nSwitch==EVENT_GETFOCUS)\
{\
pActiveWin=rNEvt.GetWindow();\
}\
}\
return TWindow::PreNotify(rNEvt);\
}
#define IMPL_TWINDOW_STATECHANGED( TWindow,bBindRef ) \
INTRODUCE_TEMPLATE void ScRefHdlrImplBase<TWindow,bBindRef>::StateChanged( StateChangedType nStateChange )\
{\
TWindow::StateChanged( nStateChange );\
\
if( !bBindRef && !m_bInRefMode ) return;\
\
if(nStateChange == STATE_CHANGE_VISIBLE)\
{\
if(m_rWindow.IsVisible())\
{\
m_aHelper.enableInput( false );\
m_aHelper.EnableSpreadsheets();\
m_aHelper.SetDispatcherLock( sal_True );\
aTimer.Start();\
}\
else\
{\
m_aHelper.enableInput( sal_True );\
m_aHelper.SetDispatcherLock( false );
/*//! here and in DoClose ?*/
\
}\
}\
}
IMPL_TWINDOW_PRENOTIFY
(
SfxModelessDialog
,
true
)
IMPL_TWINDOW_PRENOTIFY
(
SfxTabDialog
,
false
)
IMPL_TWINDOW_STATECHANGED
(
SfxModelessDialog
,
true
)
IMPL_TWINDOW_STATECHANGED
(
SfxTabDialog
,
false
)
void
ScRefHandler
::
preNotify
(
const
NotifyEvent
&
rNEvt
,
const
bool
bBindRef
)
{
if
(
bBindRef
||
m_bInRefMode
)
{
sal_uInt16
nSwitch
=
rNEvt
.
GetType
();
if
(
nSwitch
==
EVENT_GETFOCUS
)
{
pActiveWin
=
rNEvt
.
GetWindow
();
}
}
}
void
ScRefHandler
::
stateChanged
(
const
StateChangedType
nStateChange
,
const
bool
bBindRef
)
{
if
(
!
bBindRef
&&
!
m_bInRefMode
)
return
;
if
(
nStateChange
==
STATE_CHANGE_VISIBLE
)
{
if
(
m_rWindow
.
IsVisible
())
{
m_aHelper
.
enableInput
(
false
);
m_aHelper
.
EnableSpreadsheets
();
m_aHelper
.
SetDispatcherLock
(
sal_True
);
aTimer
.
Start
();
}
else
{
m_aHelper
.
enableInput
(
sal_True
);
m_aHelper
.
SetDispatcherLock
(
false
);
/*//! here and in DoClose ?*/
}
}
}
IMPL_LINK
(
ScRefHandler
,
UpdateFocusHdl
,
Timer
*
,
EMPTYARG
)
{
...
...
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