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
1b922da4
Kaydet (Commit)
1b922da4
authored
Mar 22, 2014
tarafından
Jacobo Aragunde Pérez
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw/qa: Code refactor.
Change-Id: I552b5111901a2e1011a2bd0acaf0231dadd56614
üst
d3e15e0c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
39 deletions
+38
-39
docxsdrexport.cxx
sw/source/filter/ww8/docxsdrexport.cxx
+38
-39
No files found.
sw/source/filter/ww8/docxsdrexport.cxx
Dosyayı görüntüle @
1b922da4
...
@@ -50,29 +50,37 @@ using namespace oox;
...
@@ -50,29 +50,37 @@ using namespace oox;
namespace
namespace
{
{
OUString
lclGetAnchorIdFromGrabBag
(
const
SdrObject
*
pObj
)
template
<
class
T
>
T
lclGetProperty
(
uno
::
Reference
<
drawing
::
XShape
>
rShape
,
OUString
rPropName
)
{
{
OUString
aResult
;
T
aResult
;
uno
::
Reference
<
drawing
::
XShape
>
xShape
(
const_cast
<
SdrObject
*>
(
pObj
)
->
getUnoShape
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
(
rShape
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
(
xShape
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
beans
::
XPropertySetInfo
>
xPropSetInfo
;
uno
::
Reference
<
beans
::
XPropertySetInfo
>
xPropSetInfo
;
if
(
!
xPropertySet
.
is
())
if
(
!
xPropertySet
.
is
())
return
aResult
;
return
aResult
;
xPropSetInfo
=
xPropertySet
->
getPropertySetInfo
();
xPropSetInfo
=
xPropertySet
->
getPropertySetInfo
();
if
(
xPropSetInfo
.
is
()
&&
xPropSetInfo
->
hasPropertyByName
(
"FrameInteropGrabBag"
))
if
(
xPropSetInfo
.
is
()
&&
xPropSetInfo
->
hasPropertyByName
(
rPropName
))
{
{
uno
::
Sequence
<
beans
::
PropertyValue
>
propList
;
xPropertySet
->
getPropertyValue
(
rPropName
)
>>=
aResult
;
xPropertySet
->
getPropertyValue
(
"FrameInteropGrabBag"
)
>>=
propList
;
}
for
(
sal_Int32
nProp
=
0
;
nProp
<
propList
.
getLength
();
++
nProp
)
return
aResult
;
}
OUString
lclGetAnchorIdFromGrabBag
(
const
SdrObject
*
pObj
)
{
OUString
aResult
;
uno
::
Reference
<
drawing
::
XShape
>
xShape
(
const_cast
<
SdrObject
*>
(
pObj
)
->
getUnoShape
(),
uno
::
UNO_QUERY
);
uno
::
Sequence
<
beans
::
PropertyValue
>
propList
=
lclGetProperty
<
uno
::
Sequence
<
beans
::
PropertyValue
>
>
(
xShape
,
"FrameInteropGrabBag"
);
for
(
sal_Int32
nProp
=
0
;
nProp
<
propList
.
getLength
();
++
nProp
)
{
OUString
aPropName
=
propList
[
nProp
].
Name
;
if
(
aPropName
==
"AnchorId"
)
{
{
OUString
aPropName
=
propList
[
nProp
].
Name
;
propList
[
nProp
].
Value
>>=
aResult
;
if
(
aPropName
==
"AnchorId"
)
break
;
{
propList
[
nProp
].
Value
>>=
aResult
;
break
;
}
}
}
}
}
return
aResult
;
return
aResult
;
...
@@ -555,31 +563,6 @@ void DocxSdrExport::writeDMLDrawing(const SdrObject* pSdrObject, const SwFrmFmt*
...
@@ -555,31 +563,6 @@ void DocxSdrExport::writeDMLDrawing(const SdrObject* pSdrObject, const SwFrmFmt*
pFS
->
singleElementNS
(
XML_wp
,
XML_docPr
,
xDocPrAttrListRef
);
pFS
->
singleElementNS
(
XML_wp
,
XML_docPr
,
xDocPrAttrListRef
);
uno
::
Reference
<
lang
::
XServiceInfo
>
xServiceInfo
(
xShape
,
uno
::
UNO_QUERY_THROW
);
uno
::
Reference
<
lang
::
XServiceInfo
>
xServiceInfo
(
xShape
,
uno
::
UNO_QUERY_THROW
);
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
(
xShape
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
beans
::
XPropertySetInfo
>
xPropSetInfo
;
if
(
xPropertySet
.
is
())
xPropSetInfo
=
xPropertySet
->
getPropertySetInfo
();
bool
bLockedCanvas
=
false
;
if
(
xPropSetInfo
.
is
()
&&
xPropSetInfo
->
hasPropertyByName
(
"InteropGrabBag"
))
{
uno
::
Sequence
<
beans
::
PropertyValue
>
propList
;
xPropertySet
->
getPropertyValue
(
"InteropGrabBag"
)
>>=
propList
;
for
(
sal_Int32
nProp
=
0
;
nProp
<
propList
.
getLength
();
++
nProp
)
{
OUString
propName
=
propList
[
nProp
].
Name
;
if
(
propName
==
"LockedCanvas"
)
{
/*
* Export as Locked Canvas only if the drawing
* was originally a Locked Canvas and is now inside a Text Frame.
*/
bLockedCanvas
=
m_pImpl
->
m_bIsInDMLTextFrame
;
break
;
}
}
}
const
char
*
pNamespace
=
"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"
;
const
char
*
pNamespace
=
"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"
;
if
(
xServiceInfo
->
supportsService
(
"com.sun.star.drawing.GroupShape"
))
if
(
xServiceInfo
->
supportsService
(
"com.sun.star.drawing.GroupShape"
))
pNamespace
=
"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"
;
pNamespace
=
"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"
;
...
@@ -592,6 +575,22 @@ void DocxSdrExport::writeDMLDrawing(const SdrObject* pSdrObject, const SwFrmFmt*
...
@@ -592,6 +575,22 @@ void DocxSdrExport::writeDMLDrawing(const SdrObject* pSdrObject, const SwFrmFmt*
XML_uri
,
pNamespace
,
XML_uri
,
pNamespace
,
FSEND
);
FSEND
);
bool
bLockedCanvas
=
false
;
uno
::
Sequence
<
beans
::
PropertyValue
>
propList
=
lclGetProperty
<
uno
::
Sequence
<
beans
::
PropertyValue
>
>
(
xShape
,
"InteropGrabBag"
);
for
(
sal_Int32
nProp
=
0
;
nProp
<
propList
.
getLength
();
++
nProp
)
{
OUString
propName
=
propList
[
nProp
].
Name
;
if
(
propName
==
"LockedCanvas"
)
{
/*
* Export as Locked Canvas only if the drawing
* was originally a Locked Canvas and is now inside a Text Frame.
*/
bLockedCanvas
=
m_pImpl
->
m_bIsInDMLTextFrame
;
break
;
}
}
if
(
bLockedCanvas
)
if
(
bLockedCanvas
)
pFS
->
startElementNS
(
XML_lc
,
XML_lockedCanvas
,
pFS
->
startElementNS
(
XML_lc
,
XML_lockedCanvas
,
FSNS
(
XML_xmlns
,
XML_lc
),
"http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas"
,
FSNS
(
XML_xmlns
,
XML_lc
),
"http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas"
,
...
...
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