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
7e8c7652
Kaydet (Commit)
7e8c7652
authored
Kas 07, 2001
tarafından
Andreas Bregas
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#86383# Export for new library index files
üst
774503c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
27 deletions
+63
-27
xmllib_export.cxx
xmlscript/source/xmllib_imexp/xmllib_export.cxx
+63
-27
No files found.
xmlscript/source/xmllib_imexp/xmllib_export.cxx
Dosyayı görüntüle @
7e8c7652
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: xmllib_export.cxx,v $
*
* $Revision: 1.
4
$
* $Revision: 1.
5
$
*
* last change: $Author: ab $ $Date: 2001-1
0-23 15:25:50
$
* last change: $Author: ab $ $Date: 2001-1
1-07 18:21:04
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -69,8 +69,12 @@ using namespace rtl;
namespace
xmlscript
{
static
OUString
aTrueStr
(
RTL_CONSTASCII_USTRINGPARAM
(
"true"
)
);
static
OUString
aFalseStr
(
RTL_CONSTASCII_USTRINGPARAM
(
"false"
)
);
//##################################################################################################
//==================================================================================================
SAL_DLLEXPORT
void
...
...
@@ -101,8 +105,6 @@ SAL_CALL exportLibraryContainer(
xOut
->
ignorableWhitespace
(
OUString
()
);
xOut
->
startElement
(
aLibrariesName
,
xAttributes
);
OUString
aTrueStr
(
RTL_CONSTASCII_USTRINGPARAM
(
"true"
)
);
OUString
aFalseStr
(
RTL_CONSTASCII_USTRINGPARAM
(
"false"
)
);
int
nLibCount
=
pLibArray
->
mnLibCount
;
for
(
sal_Int32
i
=
0
;
i
<
nLibCount
;
i
++
)
{
...
...
@@ -116,7 +118,8 @@ SAL_CALL exportLibraryContainer(
pLibElement
->
addAttribute
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
XMLNS_LIBRARY_PREFIX
":name"
)
),
rLib
.
aName
);
if
(
rLib
.
bLink
&&
rLib
.
aStorageURL
.
getLength
()
)
if
(
rLib
.
aStorageURL
.
getLength
()
)
{
pLibElement
->
addAttribute
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
XMLNS_XLINK_PREFIX
":href"
)
),
rLib
.
aStorageURL
);
...
...
@@ -127,36 +130,69 @@ SAL_CALL exportLibraryContainer(
pLibElement
->
addAttribute
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
XMLNS_LIBRARY_PREFIX
":link"
)
),
rLib
.
bLink
?
aTrueStr
:
aFalseStr
);
pLibElement
->
addAttribute
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
XMLNS_LIBRARY_PREFIX
":readonly"
)
),
rLib
.
bReadOnly
?
aTrueStr
:
aFalseStr
);
pLibElement
->
dump
(
xOut
);
}
xOut
->
ignorableWhitespace
(
OUString
()
);
xOut
->
endElement
(
aLibrariesName
);
xOut
->
endDocument
();
}
pLibElement
->
addAttribute
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
XMLNS_LIBRARY_PREFIX
":passwordprotected"
)
),
rLib
.
bPasswordProtected
?
aTrueStr
:
aFalseStr
);
//==================================================================================================
sal_Int32
nElementCount
=
rLib
.
aElementNames
.
getLength
();
if
(
nElementCount
)
SAL_DLLEXPORT
void
SAL_CALL
exportLibrary
(
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
xml
::
sax
::
XExtendedDocumentHandler
>
const
&
xOut
,
const
LibDescriptor
&
rLib
)
SAL_THROW
(
(
::
com
::
sun
::
star
::
uno
::
Exception
)
)
{
xOut
->
startDocument
();
OUString
aDocTypeStr
(
RTL_CONSTASCII_USTRINGPARAM
(
"<!DOCTYPE library:library PUBLIC
\"
-//OpenOffice.org//DTD OfficeDocument 1.0//EN
\"
"
"
\"
library.dtd
\"
>"
)
);
xOut
->
unknown
(
aDocTypeStr
);
xOut
->
ignorableWhitespace
(
OUString
()
);
OUString
aLibraryName
(
RTL_CONSTASCII_USTRINGPARAM
(
XMLNS_LIBRARY_PREFIX
":library"
)
);
XMLElement
*
pLibElement
=
new
XMLElement
(
aLibraryName
);
Reference
<
xml
::
sax
::
XAttributeList
>
xAttributes
(
pLibElement
);
pLibElement
->
addAttribute
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"xmlns:"
XMLNS_LIBRARY_PREFIX
)
),
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
XMLNS_LIBRARY_URI
)
)
);
pLibElement
->
addAttribute
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
XMLNS_LIBRARY_PREFIX
":name"
)
),
rLib
.
aName
);
pLibElement
->
addAttribute
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
XMLNS_LIBRARY_PREFIX
":readonly"
)
),
rLib
.
bReadOnly
?
aTrueStr
:
aFalseStr
);
pLibElement
->
addAttribute
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
XMLNS_LIBRARY_PREFIX
":passwordprotected"
)
),
rLib
.
bPasswordProtected
?
aTrueStr
:
aFalseStr
);
sal_Int32
nElementCount
=
rLib
.
aElementNames
.
getLength
();
if
(
nElementCount
)
{
const
OUString
*
pElementNames
=
rLib
.
aElementNames
.
getConstArray
();
for
(
sal_Int32
i
=
0
;
i
<
nElementCount
;
i
++
)
{
const
OUString
*
pElementNames
=
rLib
.
aElementNames
.
getConstArray
();
for
(
sal_Int32
i
=
0
;
i
<
nElementCount
;
i
++
)
{
XMLElement
*
pElement
=
new
XMLElement
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
XMLNS_LIBRARY_PREFIX
":element"
)
)
);
Reference
<
xml
::
sax
::
XAttributeList
>
xElementAttribs
;
xElementAttribs
=
static_cast
<
xml
::
sax
::
XAttributeList
*
>
(
pElement
);
pElement
->
addAttribute
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
XMLNS_LIBRARY_PREFIX
":name"
)
),
pElementNames
[
i
]
);
pLibElement
->
addSubElement
(
pElement
);
}
}
XMLElement
*
pElement
=
new
XMLElement
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
XMLNS_LIBRARY_PREFIX
":element"
)
)
);
Reference
<
xml
::
sax
::
XAttributeList
>
xElementAttribs
;
xElementAttribs
=
static_cast
<
xml
::
sax
::
XAttributeList
*
>
(
pElement
);
pLibElement
->
dump
(
xOut
);
pElement
->
addAttribute
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
XMLNS_LIBRARY_PREFIX
":name"
)
),
pElementNames
[
i
]
);
pLibElement
->
addSubElement
(
pElement
);
}
}
xOut
->
ignorableWhitespace
(
OUString
()
);
xOut
->
endElement
(
aLibrariesName
);
pLibElement
->
dump
(
xOut
);
xOut
->
endDocument
();
}
};
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