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
17c6fee1
Kaydet (Commit)
17c6fee1
authored
Nis 25, 2012
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ScHeaderFieldsObj::nType never changes and is always INVALID. Removed.
This cleans up the code quite a bit.
üst
9832505e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
39 deletions
+10
-39
fielduno.hxx
sc/inc/fielduno.hxx
+0
-1
fielduno.cxx
sc/source/ui/unoobj/fielduno.cxx
+10
-38
No files found.
sc/inc/fielduno.hxx
Dosyayı görüntüle @
17c6fee1
...
...
@@ -139,7 +139,6 @@ class ScHeaderFieldsObj : public cppu::WeakImplHelper5<
{
private
:
ScHeaderFooterTextData
&
mrData
;
sal_uInt16
nType
;
ScEditSource
*
mpEditSource
;
/// List of refresh listeners.
...
...
sc/source/ui/unoobj/fielduno.cxx
Dosyayı görüntüle @
17c6fee1
...
...
@@ -427,7 +427,6 @@ void SAL_CALL ScCellFieldsObj::removeRefreshListener( const uno::Reference<util:
ScHeaderFieldsObj
::
ScHeaderFieldsObj
(
ScHeaderFooterTextData
&
rData
)
:
mrData
(
rData
),
nType
(
SC_SERVICE_INVALID
),
mpRefreshListeners
(
NULL
)
{
mpEditSource
=
new
ScHeaderFooterEditSource
(
rData
);
...
...
@@ -488,35 +487,20 @@ ScEditFieldObj* ScHeaderFieldsObj::GetObjectByIndex_Impl(sal_Int32 Index) const
ScEditEngineDefaulter
*
pEditEngine
=
mpEditSource
->
GetEditEngine
();
ScUnoEditEngine
aTempEngine
(
pEditEngine
);
TypeId
aTypeId
=
NULL
;
switch
(
nType
)
{
case
SC_SERVICE_PAGEFIELD
:
aTypeId
=
TYPE
(
SvxPageField
);
break
;
case
SC_SERVICE_PAGESFIELD
:
aTypeId
=
TYPE
(
SvxPagesField
);
break
;
case
SC_SERVICE_DATEFIELD
:
aTypeId
=
TYPE
(
SvxDateField
);
break
;
case
SC_SERVICE_TIMEFIELD
:
aTypeId
=
TYPE
(
SvxTimeField
);
break
;
case
SC_SERVICE_TITLEFIELD
:
aTypeId
=
TYPE
(
SvxFileField
);
break
;
case
SC_SERVICE_FILEFIELD
:
aTypeId
=
TYPE
(
SvxExtFileField
);
break
;
case
SC_SERVICE_SHEETFIELD
:
aTypeId
=
TYPE
(
SvxTableField
);
break
;
// bei SC_SERVICE_INVALID bleibt TypeId Null
}
SvxFieldData
*
pData
=
aTempEngine
.
FindByIndex
(
(
sal_uInt16
)
Index
,
aTypeId
);
SvxFieldData
*
pData
=
aTempEngine
.
FindByIndex
((
sal_uInt16
)
Index
,
0
);
if
(
pData
)
{
sal_uInt16
nPar
=
aTempEngine
.
GetFieldPar
();
xub_StrLen
nPos
=
aTempEngine
.
GetFieldPos
();
sal_uInt16
nFieldType
=
nType
;
if
(
nFieldType
==
SC_SERVICE_INVALID
)
{
if
(
pData
->
ISA
(
SvxPageField
)
)
nFieldType
=
SC_SERVICE_PAGEFIELD
;
else
if
(
pData
->
ISA
(
SvxPagesField
)
)
nFieldType
=
SC_SERVICE_PAGESFIELD
;
else
if
(
pData
->
ISA
(
SvxDateField
)
)
nFieldType
=
SC_SERVICE_DATEFIELD
;
else
if
(
pData
->
ISA
(
SvxTimeField
)
)
nFieldType
=
SC_SERVICE_TIMEFIELD
;
else
if
(
pData
->
ISA
(
SvxFileField
)
)
nFieldType
=
SC_SERVICE_TITLEFIELD
;
else
if
(
pData
->
ISA
(
SvxExtFileField
)
)
nFieldType
=
SC_SERVICE_FILEFIELD
;
else
if
(
pData
->
ISA
(
SvxTableField
)
)
nFieldType
=
SC_SERVICE_SHEETFIELD
;
}
sal_uInt16
nFieldType
=
0
;
if
(
pData
->
ISA
(
SvxPageField
)
)
nFieldType
=
SC_SERVICE_PAGEFIELD
;
else
if
(
pData
->
ISA
(
SvxPagesField
)
)
nFieldType
=
SC_SERVICE_PAGESFIELD
;
else
if
(
pData
->
ISA
(
SvxDateField
)
)
nFieldType
=
SC_SERVICE_DATEFIELD
;
else
if
(
pData
->
ISA
(
SvxTimeField
)
)
nFieldType
=
SC_SERVICE_TIMEFIELD
;
else
if
(
pData
->
ISA
(
SvxFileField
)
)
nFieldType
=
SC_SERVICE_TITLEFIELD
;
else
if
(
pData
->
ISA
(
SvxExtFileField
)
)
nFieldType
=
SC_SERVICE_FILEFIELD
;
else
if
(
pData
->
ISA
(
SvxTableField
)
)
nFieldType
=
SC_SERVICE_SHEETFIELD
;
ESelection
aSelection
(
nPar
,
nPos
,
nPar
,
nPos
+
1
);
// Field is 1 character
uno
::
Reference
<
text
::
XTextRange
>
xTextRange
;
...
...
@@ -545,19 +529,7 @@ sal_Int32 SAL_CALL ScHeaderFieldsObj::getCount() throw(uno::RuntimeException)
//! Feld-Funktionen muessen an den Forwarder !!!
ScEditEngineDefaulter
*
pEditEngine
=
mpEditSource
->
GetEditEngine
();
ScUnoEditEngine
aTempEngine
(
pEditEngine
);
TypeId
aTypeId
=
NULL
;
switch
(
nType
)
{
case
SC_SERVICE_PAGEFIELD
:
aTypeId
=
TYPE
(
SvxPageField
);
break
;
case
SC_SERVICE_PAGESFIELD
:
aTypeId
=
TYPE
(
SvxPagesField
);
break
;
case
SC_SERVICE_DATEFIELD
:
aTypeId
=
TYPE
(
SvxDateField
);
break
;
case
SC_SERVICE_TIMEFIELD
:
aTypeId
=
TYPE
(
SvxTimeField
);
break
;
case
SC_SERVICE_TITLEFIELD
:
aTypeId
=
TYPE
(
SvxFileField
);
break
;
case
SC_SERVICE_FILEFIELD
:
aTypeId
=
TYPE
(
SvxExtFileField
);
break
;
case
SC_SERVICE_SHEETFIELD
:
aTypeId
=
TYPE
(
SvxTableField
);
break
;
}
return
aTempEngine
.
CountFields
(
aTypeId
);
// Felder zaehlen
return
aTempEngine
.
CountFields
(
0
);
}
uno
::
Any
SAL_CALL
ScHeaderFieldsObj
::
getByIndex
(
sal_Int32
nIndex
)
...
...
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