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
ca6e60d4
Kaydet (Commit)
ca6e60d4
authored
Mar 05, 2014
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
writerfilter: handle anchorId and put it into the FrameGrabBag
Change-Id: I44f9a1f5b5d65ebdabd5f6d1e8d87bfadb66d664
üst
85b7de13
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
1 deletion
+51
-1
GraphicImport.cxx
writerfilter/source/dmapper/GraphicImport.cxx
+49
-1
GraphicImport.hxx
writerfilter/source/dmapper/GraphicImport.hxx
+2
-0
No files found.
writerfilter/source/dmapper/GraphicImport.cxx
Dosyayı görüntüle @
ca6e60d4
...
@@ -44,6 +44,9 @@
...
@@ -44,6 +44,9 @@
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase1.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx>
#include <rtl/math.hxx>
#include <rtl/ustrbuf.hxx>
#include <comphelper/string.hxx>
#include <oox/drawingml/drawingmltypes.hxx>
#include <oox/drawingml/drawingmltypes.hxx>
#include <dmapper/DomainMapper.hxx>
#include <dmapper/DomainMapper.hxx>
...
@@ -258,6 +261,7 @@ public:
...
@@ -258,6 +261,7 @@ public:
OUString
sAlternativeText
;
OUString
sAlternativeText
;
OUString
title
;
OUString
title
;
std
::
queue
<
OUString
>&
m_rPositivePercentages
;
std
::
queue
<
OUString
>&
m_rPositivePercentages
;
OUString
sAnchorId
;
GraphicImport_Impl
(
GraphicImportType
eImportType
,
DomainMapper
&
rDMapper
,
std
::
queue
<
OUString
>&
rPositivePercentages
)
:
GraphicImport_Impl
(
GraphicImportType
eImportType
,
DomainMapper
&
rDMapper
,
std
::
queue
<
OUString
>&
rPositivePercentages
)
:
nXSize
(
0
)
nXSize
(
0
)
...
@@ -455,7 +459,37 @@ void GraphicImport::handleWrapTextValue(sal_uInt32 nVal)
...
@@ -455,7 +459,37 @@ void GraphicImport::handleWrapTextValue(sal_uInt32 nVal)
}
}
}
}
void
GraphicImport
::
putPropertyToFrameGrabBag
(
const
OUString
&
sPropertyName
,
const
uno
::
Any
&
aPropertyValue
)
{
beans
::
PropertyValue
pProperty
;
pProperty
.
Name
=
sPropertyName
;
pProperty
.
Value
=
aPropertyValue
;
if
(
!
m_xShape
.
is
())
return
;
uno
::
Reference
<
beans
::
XPropertySet
>
xSet
(
m_xShape
,
uno
::
UNO_QUERY_THROW
);
if
(
!
xSet
.
is
())
return
;
uno
::
Reference
<
beans
::
XPropertySetInfo
>
xSetInfo
(
xSet
->
getPropertySetInfo
());
if
(
!
xSetInfo
.
is
())
return
;
const
OUString
&
aGrabBagPropName
=
OUString
(
"FrameInteropGrabBag"
);
if
(
xSetInfo
->
hasPropertyByName
(
aGrabBagPropName
))
{
uno
::
Sequence
<
beans
::
PropertyValue
>
aGrabBag
;
xSet
->
getPropertyValue
(
aGrabBagPropName
)
>>=
aGrabBag
;
sal_Int32
nLength
=
aGrabBag
.
getLength
();
aGrabBag
.
realloc
(
nLength
+
1
);
aGrabBag
[
nLength
]
=
pProperty
;
xSet
->
setPropertyValue
(
aGrabBagPropName
,
uno
::
makeAny
(
aGrabBag
));
}
}
void
GraphicImport
::
lcl_attribute
(
Id
nName
,
Value
&
val
)
void
GraphicImport
::
lcl_attribute
(
Id
nName
,
Value
&
val
)
{
{
...
@@ -560,6 +594,15 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
...
@@ -560,6 +594,15 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
case
NS_ooxml
:
:
LN_CT_Anchor_allowOverlap
:
// 90993;
case
NS_ooxml
:
:
LN_CT_Anchor_allowOverlap
:
// 90993;
//enable overlapping - ignored
//enable overlapping - ignored
break
;
break
;
case
NS_ooxml
:
:
LN_CT_Anchor_wp14_anchorId
:
{
OUStringBuffer
aBuffer
=
OUString
::
number
(
nIntValue
,
16
);
OUStringBuffer
aString
;
comphelper
::
string
::
padToLength
(
aString
,
8
-
aBuffer
.
getLength
(),
'0'
);
aString
.
append
(
aBuffer
.
getStr
());
m_pImpl
->
sAnchorId
=
aString
.
makeStringAndClear
().
toAsciiUpperCase
();
}
break
;
case
NS_ooxml
:
:
LN_CT_Point2D_x
:
// 90405;
case
NS_ooxml
:
:
LN_CT_Point2D_x
:
// 90405;
m_pImpl
->
nLeftPosition
=
ConversionHelper
::
convertTwipToMM100
(
nIntValue
);
m_pImpl
->
nLeftPosition
=
ConversionHelper
::
convertTwipToMM100
(
nIntValue
);
m_pImpl
->
nHoriRelation
=
text
::
RelOrientation
::
PAGE_FRAME
;
m_pImpl
->
nHoriRelation
=
text
::
RelOrientation
::
PAGE_FRAME
;
...
@@ -702,6 +745,11 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
...
@@ -702,6 +745,11 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
xShapeProps
->
setPropertyValue
(
"RotateAngle"
,
aRotation
);
xShapeProps
->
setPropertyValue
(
"RotateAngle"
,
aRotation
);
m_pImpl
->
bIsGraphic
=
true
;
m_pImpl
->
bIsGraphic
=
true
;
if
(
!
m_pImpl
->
sAnchorId
.
isEmpty
())
{
putPropertyToFrameGrabBag
(
"AnchorId"
,
uno
::
makeAny
(
m_pImpl
->
sAnchorId
));
}
}
}
if
(
bUseShape
&&
m_pImpl
->
eGraphicImportType
==
IMPORT_AS_DETECTED_ANCHOR
)
if
(
bUseShape
&&
m_pImpl
->
eGraphicImportType
==
IMPORT_AS_DETECTED_ANCHOR
)
...
@@ -801,7 +849,7 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
...
@@ -801,7 +849,7 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
#ifdef DEBUG_DMAPPER_GRAPHIC_IMPORT
#ifdef DEBUG_DMAPPER_GRAPHIC_IMPORT
dmapper_logger
->
element
(
"unhandled"
);
dmapper_logger
->
element
(
"unhandled"
);
#endif
#endif
;
break
;
}
}
}
}
...
...
writerfilter/source/dmapper/GraphicImport.hxx
Dosyayı görüntüle @
ca6e60d4
...
@@ -75,6 +75,8 @@ class GraphicImport : public LoggedProperties, public LoggedTable
...
@@ -75,6 +75,8 @@ class GraphicImport : public LoggedProperties, public LoggedTable
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
text
::
XTextContent
>
createGraphicObject
(
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
text
::
XTextContent
>
createGraphicObject
(
const
::
com
::
sun
::
star
::
beans
::
PropertyValues
&
aMediaProperties
);
const
::
com
::
sun
::
star
::
beans
::
PropertyValues
&
aMediaProperties
);
void
putPropertyToFrameGrabBag
(
const
OUString
&
sPropertyName
,
const
css
::
uno
::
Any
&
aPropertyValue
);
public
:
public
:
explicit
GraphicImport
(
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>
xComponentContext
,
explicit
GraphicImport
(
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>
xComponentContext
,
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
xTextFactory
,
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
xTextFactory
,
...
...
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