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
8338e278
Kaydet (Commit)
8338e278
authored
Ara 15, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
writerfilter: set a BaseURL on embedded math objects
Change-Id: I9a500e079c892e281bdfee9627641f118261e0f8
üst
75a200f3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
9 deletions
+20
-9
OOXMLDocument.hxx
writerfilter/inc/ooxml/OOXMLDocument.hxx
+1
-1
WriterFilter.cxx
writerfilter/source/filter/WriterFilter.cxx
+2
-1
OOXMLDocumentImpl.cxx
writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+8
-5
OOXMLDocumentImpl.hxx
writerfilter/source/ooxml/OOXMLDocumentImpl.hxx
+4
-1
OOXMLFastContextHandler.cxx
writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+5
-1
No files found.
writerfilter/inc/ooxml/OOXMLDocument.hxx
Dosyayı görüntüle @
8338e278
...
...
@@ -254,7 +254,7 @@ public:
static
OOXMLDocument
*
createDocument
(
OOXMLStream
::
Pointer_t
pStream
,
const
css
::
uno
::
Reference
<
css
::
task
::
XStatusIndicator
>&
xStatusIndicator
,
bool
bSkipImage
);
bool
bSkipImage
,
OUString
const
&
rBaseURL
);
};
...
...
writerfilter/source/filter/WriterFilter.cxx
Dosyayı görüntüle @
8338e278
...
...
@@ -154,6 +154,7 @@ sal_Bool WriterFilter::filter(const uno::Sequence< beans::PropertyValue >& aDesc
utl
::
MediaDescriptor
aMediaDesc
(
aDescriptor
);
bool
bRepairStorage
=
aMediaDesc
.
getUnpackedValueOrDefault
(
"RepairPackage"
,
false
);
bool
bSkipImages
=
aMediaDesc
.
getUnpackedValueOrDefault
(
"FilterOptions"
,
OUString
(
""
))
==
"SkipImages"
;
OUString
const
baseURI
=
aMediaDesc
.
getUnpackedValueOrDefault
(
"DocumentBaseURL"
,
OUString
(
""
));
uno
::
Reference
<
io
::
XInputStream
>
xInputStream
;
try
...
...
@@ -174,7 +175,7 @@ sal_Bool WriterFilter::filter(const uno::Sequence< beans::PropertyValue >& aDesc
//create the tokenizer and domain mapper
writerfilter
::
ooxml
::
OOXMLStream
::
Pointer_t
pDocStream
=
writerfilter
::
ooxml
::
OOXMLDocumentFactory
::
createStream
(
m_xContext
,
xInputStream
,
bRepairStorage
);
uno
::
Reference
<
task
::
XStatusIndicator
>
xStatusIndicator
=
aMediaDesc
.
getUnpackedValueOrDefault
(
utl
::
MediaDescriptor
::
PROP_STATUSINDICATOR
(),
uno
::
Reference
<
task
::
XStatusIndicator
>
());
writerfilter
::
ooxml
::
OOXMLDocument
::
Pointer_t
pDocument
(
writerfilter
::
ooxml
::
OOXMLDocumentFactory
::
createDocument
(
pDocStream
,
xStatusIndicator
,
bSkipImages
));
writerfilter
::
ooxml
::
OOXMLDocument
::
Pointer_t
pDocument
(
writerfilter
::
ooxml
::
OOXMLDocumentFactory
::
createDocument
(
pDocStream
,
xStatusIndicator
,
bSkipImages
,
baseURI
));
uno
::
Reference
<
frame
::
XModel
>
xModel
(
m_xDstDoc
,
uno
::
UNO_QUERY_THROW
);
pDocument
->
setModel
(
xModel
);
...
...
writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
Dosyayı görüntüle @
8338e278
...
...
@@ -49,7 +49,7 @@ namespace writerfilter {
namespace
ooxml
{
OOXMLDocumentImpl
::
OOXMLDocumentImpl
(
OOXMLStream
::
Pointer_t
pStream
,
const
uno
::
Reference
<
task
::
XStatusIndicator
>&
xStatusIndicator
,
bool
bSkipImages
)
OOXMLDocumentImpl
::
OOXMLDocumentImpl
(
OOXMLStream
::
Pointer_t
pStream
,
const
uno
::
Reference
<
task
::
XStatusIndicator
>&
xStatusIndicator
,
bool
bSkipImages
,
OUString
const
&
rBaseURL
)
:
mpStream
(
pStream
)
,
mxStatusIndicator
(
xStatusIndicator
)
,
mnXNoteId
(
0
)
...
...
@@ -61,6 +61,7 @@ OOXMLDocumentImpl::OOXMLDocumentImpl(OOXMLStream::Pointer_t pStream, const uno::
,
mnProgressLastPos
(
0
)
,
mnProgressCurrentPos
(
0
)
,
mnProgressEndPos
(
0
)
,
m_rBaseURL
(
rBaseURL
)
{
}
...
...
@@ -265,7 +266,7 @@ OOXMLDocumentImpl::getSubStream(const OUString & rId)
OOXMLDocumentImpl
*
pTemp
;
// Do not pass status indicator to sub-streams: they are typically marginal in size, so we just track the main document for now.
writerfilter
::
Reference
<
Stream
>::
Pointer_t
pRet
(
pTemp
=
new
OOXMLDocumentImpl
(
pStream
,
uno
::
Reference
<
task
::
XStatusIndicator
>
(),
mbSkipImages
));
writerfilter
::
Reference
<
Stream
>::
Pointer_t
pRet
(
pTemp
=
new
OOXMLDocumentImpl
(
pStream
,
uno
::
Reference
<
task
::
XStatusIndicator
>
(),
mbSkipImages
,
m_rBaseURL
));
pTemp
->
setModel
(
mxModel
);
pTemp
->
setDrawPage
(
mxDrawPage
);
pTemp
->
setIsSubstream
(
true
);
...
...
@@ -279,7 +280,7 @@ OOXMLDocumentImpl::getXNoteStream(OOXMLStream::StreamType_t nType, const Id & rT
OOXMLStream
::
Pointer_t
pStream
=
(
OOXMLDocumentFactory
::
createStream
(
mpStream
,
nType
));
// See above, no status indicator for the note stream, either.
OOXMLDocumentImpl
*
pDocument
=
new
OOXMLDocumentImpl
(
pStream
,
uno
::
Reference
<
task
::
XStatusIndicator
>
(),
mbSkipImages
);
OOXMLDocumentImpl
*
pDocument
=
new
OOXMLDocumentImpl
(
pStream
,
uno
::
Reference
<
task
::
XStatusIndicator
>
(),
mbSkipImages
,
m_rBaseURL
);
pDocument
->
setXNoteId
(
nId
);
pDocument
->
setXNoteType
(
rType
);
pDocument
->
setModel
(
getModel
());
...
...
@@ -927,9 +928,11 @@ uno::Sequence<beans::PropertyValue > OOXMLDocumentImpl::getEmbeddingsList( )
OOXMLDocument
*
OOXMLDocumentFactory
::
createDocument
(
OOXMLStream
::
Pointer_t
pStream
,
const
uno
::
Reference
<
task
::
XStatusIndicator
>&
xStatusIndicator
,
bool
mbSkipImages
)
(
OOXMLStream
::
Pointer_t
pStream
,
const
uno
::
Reference
<
task
::
XStatusIndicator
>&
xStatusIndicator
,
bool
mbSkipImages
,
OUString
const
&
rBaseURL
)
{
return
new
OOXMLDocumentImpl
(
pStream
,
xStatusIndicator
,
mbSkipImages
);
return
new
OOXMLDocumentImpl
(
pStream
,
xStatusIndicator
,
mbSkipImages
,
rBaseURL
);
}
}}
...
...
writerfilter/source/ooxml/OOXMLDocumentImpl.hxx
Dosyayı görüntüle @
8338e278
...
...
@@ -63,6 +63,8 @@ class OOXMLDocumentImpl : public OOXMLDocument
sal_Int32
mnProgressCurrentPos
;
/// End position, i.e. the estimated number of paragraphs.
sal_Int32
mnProgressEndPos
;
/// DocumentBaseURL
OUString
const
m_rBaseURL
;
protected
:
void
resolveFastSubStream
(
Stream
&
rStream
,
...
...
@@ -90,7 +92,7 @@ protected:
void
resolveGlossaryStream
(
Stream
&
rStream
);
void
resolveEmbeddingsStream
(
OOXMLStream
::
Pointer_t
pStream
);
public
:
OOXMLDocumentImpl
(
OOXMLStream
::
Pointer_t
pStream
,
const
css
::
uno
::
Reference
<
css
::
task
::
XStatusIndicator
>&
xStatusIndicator
,
bool
bSkipImages
);
OOXMLDocumentImpl
(
OOXMLStream
::
Pointer_t
pStream
,
const
css
::
uno
::
Reference
<
css
::
task
::
XStatusIndicator
>&
xStatusIndicator
,
bool
bSkipImages
,
OUString
const
&
rBaseURL
);
virtual
~
OOXMLDocumentImpl
();
virtual
void
resolve
(
Stream
&
rStream
)
override
;
...
...
@@ -138,6 +140,7 @@ public:
void
incrementProgress
();
bool
IsSkipImages
()
{
return
mbSkipImages
;
};
OUString
const
&
GetDocumentBaseURL
()
{
return
m_rBaseURL
;
};
};
}}
#endif // OOXML_DOCUMENT_IMPL_HXX
...
...
writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
Dosyayı görüntüle @
8338e278
...
...
@@ -2009,7 +2009,11 @@ void OOXMLFastContextHandlerMath::process()
SvGlobalName
name
(
SO3_SM_CLASSID
);
comphelper
::
EmbeddedObjectContainer
container
;
OUString
aName
;
uno
::
Reference
<
embed
::
XEmbeddedObject
>
ref
=
container
.
CreateEmbeddedObject
(
name
.
GetByteSequence
(),
aName
);
uno
::
Sequence
<
beans
::
PropertyValue
>
objArgs
(
1
);
objArgs
[
0
].
Name
=
"DefaultParentBaseURL"
;
objArgs
[
0
].
Value
<<=
getDocument
()
->
GetDocumentBaseURL
();
uno
::
Reference
<
embed
::
XEmbeddedObject
>
ref
=
container
.
CreateEmbeddedObject
(
name
.
GetByteSequence
(),
objArgs
,
aName
);
assert
(
ref
.
is
());
if
(
!
ref
.
is
())
return
;
...
...
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