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
56b647b3
Kaydet (Commit)
56b647b3
authored
Eyl 23, 2014
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
DOCX filter: roundtrip SDT properties on Frame TextPortions
Change-Id: Icb3dc9595a025c4386577d858c8ca96e2f9bbef7
üst
cb466794
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
7 deletions
+40
-7
sdt-run-picture.docx
sw/qa/extras/ooxmlexport/data/sdt-run-picture.docx
+0
-0
ooxmlexport.cxx
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+12
-0
docxattributeoutput.cxx
sw/source/filter/ww8/docxattributeoutput.cxx
+9
-0
DomainMapper_Impl.cxx
writerfilter/source/dmapper/DomainMapper_Impl.cxx
+19
-7
No files found.
sw/qa/extras/ooxmlexport/data/sdt-run-picture.docx
0 → 100644
Dosyayı görüntüle @
56b647b3
File added
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Dosyayı görüntüle @
56b647b3
...
...
@@ -251,6 +251,18 @@ DECLARE_OOXMLEXPORT_TEST(testSdtIgnoredFooter, "sdt-ignored-footer.docx")
}
}
DECLARE_OOXMLEXPORT_TEST
(
testSdtRunPicture
,
"sdt-run-picture.docx"
)
{
// SDT around run was exported as SDT around paragraph
if
(
xmlDocPtr
pXmlDoc
=
parseExport
(
"word/document.xml"
))
{
// This was 1: there was an SDT around w:p.
assertXPath
(
pXmlDoc
,
"//w:body/w:sdt"
,
0
);
// This was 0: there were no SDT around w:r.
assertXPath
(
pXmlDoc
,
"//w:body/w:p/w:sdt"
,
1
);
}
}
CPPUNIT_PLUGIN_IMPLEMENT
();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sw/source/filter/ww8/docxattributeoutput.cxx
Dosyayı görüntüle @
56b647b3
...
...
@@ -4132,6 +4132,15 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size
nImageType = XML_embed;
}
// In case there are any grab-bag items on the graphic frame, emit them now.
// These are always character grab-bags, as graphics are at-char or as-char in Word.
const SfxPoolItem* pItem = 0;
if (pFrmFmt->GetAttrSet().HasItem(RES_FRMATR_GRABBAG, &pItem))
{
const SfxGrabBagItem* pGrabBag = static_cast<const SfxGrabBagItem*>(pItem);
CharGrabBag(*pGrabBag);
}
m_rExport.SdrExporter().startDMLAnchorInline(pFrmFmt, rSize);
// picture description (used for pic:cNvPr later too)
...
...
writerfilter/source/dmapper/DomainMapper_Impl.cxx
Dosyayı görüntüle @
56b647b3
...
...
@@ -4455,6 +4455,22 @@ void DomainMapper_Impl::ImportGraphic(writerfilter::Reference< Properties >::Po
uno
::
Reference
<
text
::
XTextContent
>
xTextContent
(
m_pGraphicImport
->
GetGraphicObject
());
// In case the SDT starts with the text portion of the graphic, then set the SDT properties here.
bool
bHasGrabBag
=
false
;
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
(
xTextContent
,
uno
::
UNO_QUERY
);
if
(
xPropertySet
.
is
())
{
uno
::
Reference
<
beans
::
XPropertySetInfo
>
xPropertySetInfo
=
xPropertySet
->
getPropertySetInfo
();
bHasGrabBag
=
xPropertySetInfo
->
hasPropertyByName
(
"FrameInteropGrabBag"
);
// In case we're outside a paragraph, then the SDT properties are stored in the paragraph grab-bag, not the frame one.
if
(
!
m_pSdtHelper
->
isInteropGrabBagEmpty
()
&&
bHasGrabBag
&&
!
m_pSdtHelper
->
isOutsideAParagraph
())
{
comphelper
::
SequenceAsHashMap
aFrameGrabBag
(
xPropertySet
->
getPropertyValue
(
"FrameInteropGrabBag"
));
aFrameGrabBag
[
"SdtPr"
]
=
uno
::
makeAny
(
m_pSdtHelper
->
getInteropGrabBagAndClear
());
xPropertySet
->
setPropertyValue
(
"FrameInteropGrabBag"
,
uno
::
makeAny
(
aFrameGrabBag
.
getAsConstPropertyValueList
()));
}
}
/* Set "SdtEndBefore" property on Drawing.
* It is required in a case when Drawing appears immediately after first run i.e.
* there is no text/space/tab in between two runs.
...
...
@@ -4462,20 +4478,16 @@ void DomainMapper_Impl::ImportGraphic(writerfilter::Reference< Properties >::Po
*/
if
(
IsSdtEndBefore
())
{
uno
::
Reference
<
beans
::
XPropertySet
>
xGraphicObjectProperties
(
xTextContent
,
uno
::
UNO_QUERY_THROW
);
uno
::
Reference
<
beans
::
XPropertySetInfo
>
xPropSetInfo
;
if
(
xGraphicObjectProperties
.
is
())
if
(
xPropertySet
.
is
())
{
xPropSetInfo
=
xGraphicObjectProperties
->
getPropertySetInfo
();
if
(
xPropSetInfo
.
is
()
&&
xPropSetInfo
->
hasPropertyByName
(
"FrameInteropGrabBag"
))
if
(
bHasGrabBag
)
{
uno
::
Sequence
<
beans
::
PropertyValue
>
aFrameGrabBag
(
1
);
beans
::
PropertyValue
aRet
;
aRet
.
Name
=
"SdtEndBefore"
;
aRet
.
Value
<<=
uno
::
makeAny
(
true
);
aFrameGrabBag
[
0
]
=
aRet
;
x
GraphicObjectProperties
->
setPropertyValue
(
"FrameInteropGrabBag"
,
uno
::
makeAny
(
aFrameGrabBag
));
x
PropertySet
->
setPropertyValue
(
"FrameInteropGrabBag"
,
uno
::
makeAny
(
aFrameGrabBag
));
}
}
}
...
...
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