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
06a39e43
Kaydet (Commit)
06a39e43
authored
Tem 10, 2014
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
DOCX import: handle character format of dateTime SDT
Change-Id: Ia8966745b1ed63ae7de2ad0d673faff8b8804d63
üst
07601de4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
DomainMapper.cxx
writerfilter/source/dmapper/DomainMapper.cxx
+5
-1
SdtHelper.cxx
writerfilter/source/dmapper/SdtHelper.cxx
+3
-2
SdtHelper.hxx
writerfilter/source/dmapper/SdtHelper.hxx
+1
-1
No files found.
writerfilter/source/dmapper/DomainMapper.cxx
Dosyayı görüntüle @
06a39e43
...
@@ -2673,6 +2673,10 @@ void DomainMapper::lcl_startCharacterGroup()
...
@@ -2673,6 +2673,10 @@ void DomainMapper::lcl_startCharacterGroup()
m_pImpl
->
GetTopContext
()
->
Insert
(
PROP_SDT_END_BEFORE
,
uno
::
makeAny
(
true
),
true
,
CHAR_GRAB_BAG
);
m_pImpl
->
GetTopContext
()
->
Insert
(
PROP_SDT_END_BEFORE
,
uno
::
makeAny
(
true
),
true
,
CHAR_GRAB_BAG
);
m_pImpl
->
setSdtEndDeferred
(
false
);
m_pImpl
->
setSdtEndDeferred
(
false
);
}
}
// Remember formatting of the date control as it only supports plain strings natively.
if
(
!
m_pImpl
->
m_pSdtHelper
->
getDateFormat
().
isEmpty
())
enableInteropGrabBag
(
"CharFormat"
);
}
}
void
DomainMapper
::
lcl_endCharacterGroup
()
void
DomainMapper
::
lcl_endCharacterGroup
()
...
@@ -2785,7 +2789,7 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
...
@@ -2785,7 +2789,7 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
* create the control early, as in Writer, it's part of the cell, but
* create the control early, as in Writer, it's part of the cell, but
* in OOXML, the sdt contains the cell.
* in OOXML, the sdt contains the cell.
*/
*/
m_pImpl
->
m_pSdtHelper
->
createDateControl
(
sText
);
m_pImpl
->
m_pSdtHelper
->
createDateControl
(
sText
,
getInteropGrabBag
()
);
return
;
return
;
}
}
else
if
(
!
m_pImpl
->
m_pSdtHelper
->
isInteropGrabBagEmpty
())
else
if
(
!
m_pImpl
->
m_pSdtHelper
->
isInteropGrabBagEmpty
())
...
...
writerfilter/source/dmapper/SdtHelper.cxx
Dosyayı görüntüle @
06a39e43
...
@@ -92,7 +92,7 @@ void SdtHelper::createDropDownControl()
...
@@ -92,7 +92,7 @@ void SdtHelper::createDropDownControl()
m_aDropDownItems
.
clear
();
m_aDropDownItems
.
clear
();
}
}
void
SdtHelper
::
createDateControl
(
OUString
&
rContentText
)
void
SdtHelper
::
createDateControl
(
OUString
&
rContentText
,
beans
::
PropertyValue
aCharFormat
)
{
{
uno
::
Reference
<
awt
::
XControlModel
>
xControlModel
(
m_rDM_Impl
.
GetTextFactory
()
->
createInstance
(
"com.sun.star.form.component.DateField"
),
uno
::
UNO_QUERY
);
uno
::
Reference
<
awt
::
XControlModel
>
xControlModel
(
m_rDM_Impl
.
GetTextFactory
()
->
createInstance
(
"com.sun.star.form.component.DateField"
),
uno
::
UNO_QUERY
);
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
(
xControlModel
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
(
xControlModel
,
uno
::
UNO_QUERY
);
...
@@ -122,7 +122,7 @@ void SdtHelper::createDateControl(OUString& rContentText)
...
@@ -122,7 +122,7 @@ void SdtHelper::createDateControl(OUString& rContentText)
xPropertySet
->
setPropertyValue
(
"HelpText"
,
uno
::
makeAny
(
rContentText
));
xPropertySet
->
setPropertyValue
(
"HelpText"
,
uno
::
makeAny
(
rContentText
));
// append date format to grab bag
// append date format to grab bag
uno
::
Sequence
<
beans
::
PropertyValue
>
aGrabBag
(
4
);
uno
::
Sequence
<
beans
::
PropertyValue
>
aGrabBag
(
5
);
aGrabBag
[
0
].
Name
=
"OriginalDate"
;
aGrabBag
[
0
].
Name
=
"OriginalDate"
;
aGrabBag
[
0
].
Value
=
uno
::
makeAny
(
aDate
);
aGrabBag
[
0
].
Value
=
uno
::
makeAny
(
aDate
);
aGrabBag
[
1
].
Name
=
"OriginalContent"
;
aGrabBag
[
1
].
Name
=
"OriginalContent"
;
...
@@ -131,6 +131,7 @@ void SdtHelper::createDateControl(OUString& rContentText)
...
@@ -131,6 +131,7 @@ void SdtHelper::createDateControl(OUString& rContentText)
aGrabBag
[
2
].
Value
=
uno
::
makeAny
(
sDateFormat
);
aGrabBag
[
2
].
Value
=
uno
::
makeAny
(
sDateFormat
);
aGrabBag
[
3
].
Name
=
"Locale"
;
aGrabBag
[
3
].
Name
=
"Locale"
;
aGrabBag
[
3
].
Value
=
uno
::
makeAny
(
m_sLocale
.
makeStringAndClear
());
aGrabBag
[
3
].
Value
=
uno
::
makeAny
(
m_sLocale
.
makeStringAndClear
());
aGrabBag
[
4
]
=
aCharFormat
;
std
::
vector
<
OUString
>
aItems
;
std
::
vector
<
OUString
>
aItems
;
createControlShape
(
lcl_getOptimalWidth
(
m_rDM_Impl
.
GetStyleSheetTable
(),
rContentText
,
aItems
),
xControlModel
,
aGrabBag
);
createControlShape
(
lcl_getOptimalWidth
(
m_rDM_Impl
.
GetStyleSheetTable
(),
rContentText
,
aItems
),
xControlModel
,
aGrabBag
);
...
...
writerfilter/source/dmapper/SdtHelper.hxx
Dosyayı görüntüle @
06a39e43
...
@@ -98,7 +98,7 @@ public:
...
@@ -98,7 +98,7 @@ public:
/// Create drop-down control from w:sdt's w:dropDownList.
/// Create drop-down control from w:sdt's w:dropDownList.
void
createDropDownControl
();
void
createDropDownControl
();
/// Create date control from w:sdt's w:date.
/// Create date control from w:sdt's w:date.
void
createDateControl
(
OUString
&
rContentText
);
void
createDateControl
(
OUString
&
rContentText
,
css
::
beans
::
PropertyValue
aCharFormat
);
void
appendToInteropGrabBag
(
com
::
sun
::
star
::
beans
::
PropertyValue
rValue
);
void
appendToInteropGrabBag
(
com
::
sun
::
star
::
beans
::
PropertyValue
rValue
);
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
beans
::
PropertyValue
>
getInteropGrabBagAndClear
();
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
beans
::
PropertyValue
>
getInteropGrabBagAndClear
();
...
...
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