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
89d8f039
Kaydet (Commit)
89d8f039
authored
May 10, 2012
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Return the correct service names for each field type.
Change-Id: I1b6261d09dfc42913070ffd2f797688587ab7a8b
üst
7e934dcf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
43 deletions
+70
-43
unofield.cxx
editeng/source/uno/unofield.cxx
+70
-43
No files found.
editeng/source/uno/unofield.cxx
Dosyayı görüntüle @
89d8f039
...
...
@@ -153,6 +153,7 @@ const SfxItemPropertySet* ImplGetFieldItemPropertySet( sal_Int32 mnId )
return
&
aUrlFieldPropertySet_Impl
;
case
text
:
:
textfield
::
Type
::
DATE
:
case
text
:
:
textfield
::
Type
::
TIME
:
case
text
:
:
textfield
::
Type
::
DATE_TIME
:
return
&
aDateTimeFieldPropertySet_Impl
;
case
text
:
:
textfield
::
Type
::
EXTENDED_FILE
:
return
&
aExtFileFieldPropertySet_Impl
;
...
...
@@ -803,53 +804,79 @@ OUString SAL_CALL SvxUnoTextField::getImplementationName() throw(uno::RuntimeExc
return
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"SvxUnoTextField"
));
}
static
const
sal_Char
*
pOldServiceNames
[]
=
{
"com.sun.star.text.TextField.DateTime"
,
"com.sun.star.text.TextField.URL"
,
"com.sun.star.text.TextField.PageNumber"
,
"com.sun.star.text.TextField.PageCount"
,
"com.sun.star.text.TextField.DateTime"
,
"com.sun.star.text.TextField.DocInfo.Title"
,
// SvxFileField is used for title
"com.sun.star.text.TextField.SheetName"
,
"com.sun.star.text.TextField.DateTime"
,
"com.sun.star.text.TextField.FileName"
,
"com.sun.star.text.TextField.Author"
,
"com.sun.star.text.TextField.Measure"
,
"com.sun.star.text.TextField.DateTime"
,
"com.sun.star.presentation.TextField.Header"
,
"com.sun.star.presentation.TextField.Footer"
,
"com.sun.star.presentation.TextField.DateTime"
};
static
const
sal_Char
*
pNewServiceNames
[]
=
{
"com.sun.star.text.textfield.DateTime"
,
"com.sun.star.text.textfield.URL"
,
"com.sun.star.text.textfield.PageNumber"
,
"com.sun.star.text.textfield.PageCount"
,
"com.sun.star.text.textfield.DateTime"
,
"com.sun.star.text.textfield.docinfo.Title"
,
// SvxFileField is used for title
"com.sun.star.text.textfield.SheetName"
,
"com.sun.star.text.textfield.DateTime"
,
"com.sun.star.text.textfield.FileName"
,
"com.sun.star.text.textfield.Author"
,
"com.sun.star.text.textfield.Measure"
,
"com.sun.star.text.textfield.DateTime"
,
"com.sun.star.presentation.textfield.Header"
,
"com.sun.star.presentation.textfield.Footer"
,
"com.sun.star.presentation.textfield.DateTime"
};
uno
::
Sequence
<
OUString
>
SAL_CALL
SvxUnoTextField
::
getSupportedServiceNames
()
throw
(
uno
::
RuntimeException
)
{
uno
::
Sequence
<
OUString
>
aSeq
(
4
);
uno
::
Sequence
<
OUString
>
aSeq
(
4
);
OUString
*
pServices
=
aSeq
.
getArray
();
pServices
[
0
]
=
OUString
::
createFromAscii
(
pNewServiceNames
[
mnServiceId
]
);
pServices
[
1
]
=
OUString
::
createFromAscii
(
pOldServiceNames
[
mnServiceId
]
);
pServices
[
2
]
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.text.TextContent"
)),
pServices
[
3
]
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.text.TextField"
));
pServices
[
0
]
=
"com.sun.star.text.TextContent"
;
pServices
[
1
]
=
"com.sun.star.text.TextField"
;
switch
(
mnServiceId
)
{
case
text
:
:
textfield
::
Type
::
DATE
:
pServices
[
2
]
=
"com.sun.star.text.TextField.DateTime"
;
pServices
[
3
]
=
"com.sun.star.text.textfield.DateTime"
;
break
;
case
text
:
:
textfield
::
Type
::
URL
:
pServices
[
2
]
=
"com.sun.star.text.TextField.URL"
;
pServices
[
3
]
=
"com.sun.star.text.textfield.URL"
;
break
;
case
text
:
:
textfield
::
Type
::
PAGE
:
pServices
[
2
]
=
"com.sun.star.text.TextField.PageNumber"
;
pServices
[
3
]
=
"com.sun.star.text.textfield.PageNumber"
;
break
;
case
text
:
:
textfield
::
Type
::
PAGES
:
pServices
[
2
]
=
"com.sun.star.text.TextField.PageCount"
;
pServices
[
3
]
=
"com.sun.star.text.textfield.PageCount"
;
break
;
case
text
:
:
textfield
::
Type
::
TIME
:
pServices
[
2
]
=
"com.sun.star.text.TextField.DateTime"
;
pServices
[
3
]
=
"com.sun.star.text.textfield.DateTime"
;
break
;
case
text
:
:
textfield
::
Type
::
FILE
:
pServices
[
2
]
=
"com.sun.star.text.TextField.docinfo.Title"
;
pServices
[
3
]
=
"com.sun.star.text.textfield.docinfo.Title"
;
break
;
case
text
:
:
textfield
::
Type
::
TABLE
:
pServices
[
2
]
=
"com.sun.star.text.TextField.SheetName"
;
pServices
[
3
]
=
"com.sun.star.text.textfield.SheetName"
;
break
;
case
text
:
:
textfield
::
Type
::
EXTENDED_TIME
:
pServices
[
2
]
=
"com.sun.star.text.TextField.DateTime"
;
pServices
[
3
]
=
"com.sun.star.text.textfield.DateTime"
;
break
;
case
text
:
:
textfield
::
Type
::
EXTENDED_FILE
:
pServices
[
2
]
=
"com.sun.star.text.TextField.FileName"
;
pServices
[
3
]
=
"com.sun.star.text.textfield.FileName"
;
break
;
case
text
:
:
textfield
::
Type
::
AUTHOR
:
pServices
[
2
]
=
"com.sun.star.text.TextField.Author"
;
pServices
[
3
]
=
"com.sun.star.text.textfield.Author"
;
break
;
case
text
:
:
textfield
::
Type
::
MEASURE
:
pServices
[
2
]
=
"com.sun.star.text.TextField.Measure"
;
pServices
[
3
]
=
"com.sun.star.text.textfield.Measure"
;
break
;
case
text
:
:
textfield
::
Type
::
HEADER
:
pServices
[
2
]
=
"com.sun.star.presentation.TextField.Header"
;
pServices
[
3
]
=
"com.sun.star.presentation.textfield.Header"
;
break
;
case
text
:
:
textfield
::
Type
::
FOOTER
:
pServices
[
2
]
=
"com.sun.star.presentation.TextField.Footer"
;
pServices
[
3
]
=
"com.sun.star.presentation.textfield.Footer"
;
break
;
case
text
:
:
textfield
::
Type
::
DATE_TIME
:
pServices
[
2
]
=
"com.sun.star.text.TextField.DateTime"
;
pServices
[
3
]
=
"com.sun.star.text.textfield.DateTime"
;
break
;
case
text
:
:
textfield
::
Type
::
EXTENDED_DATE
:
pServices
[
2
]
=
"com.sun.star.presentation.TextField.DateTime"
;
pServices
[
3
]
=
"com.sun.star.presentation.textfield.DateTime"
;
break
;
default
:
aSeq
.
realloc
(
0
);
}
return
aSeq
;
}
...
...
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