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
914b4fb5
Kaydet (Commit)
914b4fb5
authored
Nis 19, 2015
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
import chart MSO 2007 streams correctly for docx files, tdf#82216
Change-Id: Icda809faf315dac5953d38781b2b401d51f7a40a
üst
6f969d25
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
12 deletions
+36
-12
xmlfilterbase.hxx
include/oox/core/xmlfilterbase.hxx
+3
-0
XFastShapeContextHandler.idl
offapi/com/sun/star/xml/sax/XFastShapeContextHandler.idl
+2
-0
xmlfilterbase.cxx
oox/source/core/xmlfilterbase.cxx
+9
-12
ShapeContextHandler.cxx
oox/source/shape/ShapeContextHandler.cxx
+13
-0
ShapeContextHandler.hxx
oox/source/shape/ShapeContextHandler.hxx
+7
-0
OOXMLFastContextHandler.cxx
writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+2
-0
No files found.
include/oox/core/xmlfilterbase.hxx
Dosyayı görüntüle @
914b4fb5
...
@@ -236,6 +236,9 @@ public:
...
@@ -236,6 +236,9 @@ public:
bool
isMSO2007Document
()
const
;
bool
isMSO2007Document
()
const
;
void
checkDocumentProperties
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
document
::
XDocumentProperties
>
xDocProps
);
protected
:
protected
:
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
io
::
XInputStream
>
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
io
::
XInputStream
>
implGetInputStream
(
utl
::
MediaDescriptor
&
rMediaDesc
)
const
SAL_OVERRIDE
;
implGetInputStream
(
utl
::
MediaDescriptor
&
rMediaDesc
)
const
SAL_OVERRIDE
;
...
...
offapi/com/sun/star/xml/sax/XFastShapeContextHandler.idl
Dosyayı görüntüle @
914b4fb5
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#
include
<
com
/
sun
/
star
/
drawing
/
XDrawPage
.
idl>
#
include
<
com
/
sun
/
star
/
drawing
/
XDrawPage
.
idl>
#
include
<
com
/
sun
/
star
/
frame
/
XModel
.
idl>
#
include
<
com
/
sun
/
star
/
frame
/
XModel
.
idl>
#
include
<
com
/
sun
/
star
/
io
/
XInputStream
.
idl>
#
include
<
com
/
sun
/
star
/
io
/
XInputStream
.
idl>
#
include
<
com
/
sun
/
star
/
document
/
XDocumentProperties
.
idl>
module
com
{
module
sun
{
module
star
{
module
xml
{
module
sax
{
module
com
{
module
sun
{
module
star
{
module
xml
{
module
sax
{
...
@@ -43,6 +44,7 @@ interface XFastShapeContextHandler: com::sun::star::xml::sax::XFastContextHandle
...
@@ -43,6 +44,7 @@ interface XFastShapeContextHandler: com::sun::star::xml::sax::XFastContextHandle
[
attribute
]
string
RelationFragmentPath
;
[
attribute
]
string
RelationFragmentPath
;
[
attribute
]
long
StartToken
;
[
attribute
]
long
StartToken
;
[
attribute
]
com
::
sun
::
star
::
awt
::
Point
Position
;
[
attribute
]
com
::
sun
::
star
::
awt
::
Point
Position
;
[
attribute
]
com
::
sun
::
star
::
document
::
XDocumentProperties
DocumentProperties
;
}
;
}
;
...
...
oox/source/core/xmlfilterbase.cxx
Dosyayı görüntüle @
914b4fb5
...
@@ -223,33 +223,30 @@ XmlFilterBase::~XmlFilterBase()
...
@@ -223,33 +223,30 @@ XmlFilterBase::~XmlFilterBase()
mxImpl
->
maFastParser
.
setDocumentHandler
(
0
);
mxImpl
->
maFastParser
.
setDocumentHandler
(
0
);
}
}
namespace
{
void
XmlFilterBase
::
checkDocumentProperties
(
Reference
<
XDocumentProperties
>
xDocProps
)
bool
is2007MSODocument
(
Reference
<
XDocumentProperties
>
xDocProps
)
{
{
mbMSO2007
=
false
;
if
(
!
xDocProps
->
getGenerator
().
startsWithIgnoreAsciiCase
(
"Microsoft"
))
if
(
!
xDocProps
->
getGenerator
().
startsWithIgnoreAsciiCase
(
"Microsoft"
))
return
false
;
return
;
uno
::
Reference
<
beans
::
XPropertyAccess
>
xUserDefProps
(
xDocProps
->
getUserDefinedProperties
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
beans
::
XPropertyAccess
>
xUserDefProps
(
xDocProps
->
getUserDefinedProperties
(),
uno
::
UNO_QUERY
);
if
(
!
xUserDefProps
.
is
())
if
(
!
xUserDefProps
.
is
())
return
false
;
return
;
comphelper
::
SequenceAsHashMap
aUserDefinedProperties
(
xUserDefProps
->
getPropertyValues
());
comphelper
::
SequenceAsHashMap
aUserDefinedProperties
(
xUserDefProps
->
getPropertyValues
());
comphelper
::
SequenceAsHashMap
::
iterator
it
=
aUserDefinedProperties
.
find
(
"AppVersion"
);
comphelper
::
SequenceAsHashMap
::
iterator
it
=
aUserDefinedProperties
.
find
(
"AppVersion"
);
if
(
it
==
aUserDefinedProperties
.
end
())
if
(
it
==
aUserDefinedProperties
.
end
())
return
false
;
return
;
OUString
aValue
;
OUString
aValue
;
if
(
!
(
it
->
second
>>=
aValue
))
if
(
!
(
it
->
second
>>=
aValue
))
return
false
;
return
;
if
(
!
aValue
.
startsWithIgnoreAsciiCase
(
"12."
))
if
(
!
aValue
.
startsWithIgnoreAsciiCase
(
"12."
))
return
false
;
return
;
SAL_WARN
(
"oox"
,
"a MSO 2007 document"
);
SAL_WARN
(
"oox"
,
"a MSO 2007 document"
);
return
true
;
mbMSO2007
=
true
;
}
}
}
void
XmlFilterBase
::
importDocumentProperties
()
void
XmlFilterBase
::
importDocumentProperties
()
...
@@ -270,7 +267,7 @@ void XmlFilterBase::importDocumentProperties()
...
@@ -270,7 +267,7 @@ void XmlFilterBase::importDocumentProperties()
Reference
<
XDocumentPropertiesSupplier
>
xPropSupplier
(
xModel
,
UNO_QUERY
);
Reference
<
XDocumentPropertiesSupplier
>
xPropSupplier
(
xModel
,
UNO_QUERY
);
Reference
<
XDocumentProperties
>
xDocProps
=
xPropSupplier
->
getDocumentProperties
();
Reference
<
XDocumentProperties
>
xDocProps
=
xPropSupplier
->
getDocumentProperties
();
xImporter
->
importProperties
(
xDocumentStorage
,
xDocProps
);
xImporter
->
importProperties
(
xDocumentStorage
,
xDocProps
);
mbMSO2007
=
is2007MSODocument
(
xDocProps
);
checkDocumentProperties
(
xDocProps
);
}
}
FastParser
*
XmlFilterBase
::
createParser
()
const
FastParser
*
XmlFilterBase
::
createParser
()
const
...
...
oox/source/shape/ShapeContextHandler.cxx
Dosyayı görüntüle @
914b4fb5
...
@@ -620,6 +620,19 @@ void SAL_CALL ShapeContextHandler::setPosition(const awt::Point& rPosition) thro
...
@@ -620,6 +620,19 @@ void SAL_CALL ShapeContextHandler::setPosition(const awt::Point& rPosition) thro
maPosition
=
rPosition
;
maPosition
=
rPosition
;
}
}
void
SAL_CALL
ShapeContextHandler
::
setDocumentProperties
(
const
uno
::
Reference
<
document
::
XDocumentProperties
>&
xDocProps
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
mxDocumentProperties
=
xDocProps
;
mxFilterBase
->
checkDocumentProperties
(
mxDocumentProperties
);
}
uno
::
Reference
<
document
::
XDocumentProperties
>
SAL_CALL
ShapeContextHandler
::
getDocumentProperties
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
return
mxDocumentProperties
;
}
OUString
ShapeContextHandler
::
getImplementationName
()
OUString
ShapeContextHandler
::
getImplementationName
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
{
...
...
oox/source/shape/ShapeContextHandler.hxx
Dosyayı görüntüle @
914b4fb5
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include "oox/core/xmlfilterbase.hxx"
#include "oox/core/xmlfilterbase.hxx"
#include "ShapeFilterBase.hxx"
#include "ShapeFilterBase.hxx"
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
namespace
oox
{
namespace
shape
{
namespace
oox
{
namespace
shape
{
...
@@ -138,6 +139,11 @@ public:
...
@@ -138,6 +139,11 @@ public:
virtual
css
::
awt
::
Point
SAL_CALL
getPosition
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
css
::
awt
::
Point
SAL_CALL
getPosition
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
setPosition
(
const
css
::
awt
::
Point
&
rPosition
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
setPosition
(
const
css
::
awt
::
Point
&
rPosition
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
setDocumentProperties
(
const
css
::
uno
::
Reference
<
css
::
document
::
XDocumentProperties
>&
xDocProps
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
css
::
uno
::
Reference
<
css
::
document
::
XDocumentProperties
>
SAL_CALL
getDocumentProperties
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
private
:
private
:
ShapeContextHandler
(
ShapeContextHandler
&
)
SAL_DELETED_FUNCTION
;
ShapeContextHandler
(
ShapeContextHandler
&
)
SAL_DELETED_FUNCTION
;
void
operator
=
(
ShapeContextHandler
&
)
SAL_DELETED_FUNCTION
;
void
operator
=
(
ShapeContextHandler
&
)
SAL_DELETED_FUNCTION
;
...
@@ -159,6 +165,7 @@ private:
...
@@ -159,6 +165,7 @@ private:
css
::
uno
::
Reference
<
css
::
drawing
::
XShape
>
mxSavedShape
;
css
::
uno
::
Reference
<
css
::
drawing
::
XShape
>
mxSavedShape
;
css
::
uno
::
Reference
<
XFastContextHandler
>
mxWpgContext
;
css
::
uno
::
Reference
<
XFastContextHandler
>
mxWpgContext
;
css
::
uno
::
Reference
<
XFastContextHandler
>
mxChartShapeContext
;
css
::
uno
::
Reference
<
XFastContextHandler
>
mxChartShapeContext
;
css
::
uno
::
Reference
<
css
::
document
::
XDocumentProperties
>
mxDocumentProperties
;
core
::
XmlFilterRef
mxFilterBase
;
core
::
XmlFilterRef
mxFilterBase
;
drawingml
::
ThemePtr
mpThemePtr
;
drawingml
::
ThemePtr
mpThemePtr
;
...
...
writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
Dosyayı görüntüle @
914b4fb5
...
@@ -1532,6 +1532,8 @@ OOXMLFastContextHandlerShape::OOXMLFastContextHandlerShape
...
@@ -1532,6 +1532,8 @@ OOXMLFastContextHandlerShape::OOXMLFastContextHandlerShape
}
}
mrShapeContext
->
setModel
(
getDocument
()
->
getModel
());
mrShapeContext
->
setModel
(
getDocument
()
->
getModel
());
uno
::
Reference
<
document
::
XDocumentPropertiesSupplier
>
xDocSupplier
(
getDocument
()
->
getModel
(),
uno
::
UNO_QUERY_THROW
);
mrShapeContext
->
setDocumentProperties
(
xDocSupplier
->
getDocumentProperties
());
mrShapeContext
->
setDrawPage
(
getDocument
()
->
getDrawPage
());
mrShapeContext
->
setDrawPage
(
getDocument
()
->
getDrawPage
());
mrShapeContext
->
setInputStream
(
getDocument
()
->
getStorageStream
());
mrShapeContext
->
setInputStream
(
getDocument
()
->
getStorageStream
());
...
...
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