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
9f235cfe
Kaydet (Commit)
9f235cfe
authored
Şub 10, 2011
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
xmlfix3: #i113683#: finish CProcessingInstruction
üst
c5db3b93
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
24 deletions
+65
-24
document.cxx
unoxml/source/dom/document.cxx
+1
-1
processinginstruction.cxx
unoxml/source/dom/processinginstruction.cxx
+61
-18
processinginstruction.hxx
unoxml/source/dom/processinginstruction.hxx
+3
-5
No files found.
unoxml/source/dom/document.cxx
Dosyayı görüntüle @
9f235cfe
...
...
@@ -603,7 +603,7 @@ namespace DOM
xmlChar
*
xTarget
=
(
xmlChar
*
)
o1
.
getStr
();
OString
o2
=
OUStringToOString
(
data
,
RTL_TEXTENCODING_UTF8
);
xmlChar
*
xData
=
(
xmlChar
*
)
o2
.
getStr
();
xmlNodePtr
const
pNode
=
xmlNew
PI
(
xTarget
,
xData
);
xmlNodePtr
const
pNode
=
xmlNew
DocPI
(
m_aDocPtr
,
xTarget
,
xData
);
pNode
->
doc
=
m_aDocPtr
;
Reference
<
XProcessingInstruction
>
const
xRet
(
static_cast
<
XNode
*
>
(
GetCNode
(
pNode
).
get
()),
...
...
unoxml/source/dom/processinginstruction.cxx
Dosyayı görüntüle @
9f235cfe
...
...
@@ -54,46 +54,89 @@ namespace DOM
/**
The content of this processing instruction.
*/
OUString
SAL_CALL
CProcessingInstruction
::
getData
()
throw
(
RuntimeException
)
OUString
SAL_CALL
CProcessingInstruction
::
getData
()
throw
(
RuntimeException
)
{
// XXX
return
OUString
();
::
osl
::
MutexGuard
const
g
(
m_rMutex
);
if
(
0
==
m_aNodePtr
)
{
return
::
rtl
::
OUString
();
}
char
const
*
const
pContent
(
reinterpret_cast
<
char
const
*>
(
m_aNodePtr
->
content
));
if
(
0
==
pContent
)
{
return
::
rtl
::
OUString
();
}
OUString
const
ret
(
pContent
,
strlen
(
pContent
),
RTL_TEXTENCODING_UTF8
);
return
ret
;
}
/**
The target of this processing instruction.
*/
OUString
SAL_CALL
CProcessingInstruction
::
getTarget
()
throw
(
RuntimeException
)
OUString
SAL_CALL
CProcessingInstruction
::
getTarget
()
throw
(
RuntimeException
)
{
// XXX
return
OUString
();
}
::
osl
::
MutexGuard
const
g
(
m_rMutex
);
if
(
0
==
m_aNodePtr
)
{
return
::
rtl
::
OUString
();
}
char
const
*
const
pName
(
reinterpret_cast
<
char
const
*>
(
m_aNodePtr
->
name
));
if
(
0
==
pName
)
{
return
::
rtl
::
OUString
();
}
OUString
const
ret
(
pName
,
strlen
(
pName
),
RTL_TEXTENCODING_UTF8
);
return
ret
;
}
/**
The content of this processing instruction.
*/
void
SAL_CALL
CProcessingInstruction
::
setData
(
const
OUString
&
/*data*/
)
throw
(
RuntimeException
,
DOMException
)
void
SAL_CALL
CProcessingInstruction
::
setData
(
OUString
const
&
rData
)
throw
(
RuntimeException
,
DOMException
)
{
// XXX
}
::
osl
::
MutexGuard
const
g
(
m_rMutex
);
if
(
0
==
m_aNodePtr
)
{
throw
RuntimeException
();
}
OString
const
data
(
OUStringToOString
(
rData
,
RTL_TEXTENCODING_UTF8
));
xmlChar
const
*
const
pData
(
reinterpret_cast
<
xmlChar
const
*>
(
data
.
getStr
())
);
xmlFree
(
m_aNodePtr
->
content
);
m_aNodePtr
->
content
=
xmlStrdup
(
pData
);
}
OUString
SAL_CALL
CProcessingInstruction
::
getNodeName
()
throw
(
RuntimeException
)
OUString
SAL_CALL
CProcessingInstruction
::
getNodeName
()
throw
(
RuntimeException
)
{
::
osl
::
MutexGuard
const
g
(
m_rMutex
);
OUString
aName
;
if
(
m_aNodePtr
!=
NULL
)
{
const
xmlChar
*
xName
=
m_aNodePtr
->
name
;
aName
=
OUString
((
sal_Char
*
)
xName
,
strlen
((
char
*
)
xName
),
RTL_TEXTENCODING_UTF8
);
if
(
0
==
m_aNodePtr
)
{
return
::
rtl
::
OUString
();
}
return
aName
;
sal_Char
const
*
const
pName
=
reinterpret_cast
<
sal_Char
const
*>
(
m_aNodePtr
->
name
);
OUString
const
ret
(
pName
,
strlen
(
pName
),
RTL_TEXTENCODING_UTF8
);
return
ret
;
}
OUString
SAL_CALL
CProcessingInstruction
::
getNodeValue
()
throw
(
RuntimeException
)
OUString
SAL_CALL
CProcessingInstruction
::
getNodeValue
()
throw
(
RuntimeException
)
{
return
getData
();
}
void
SAL_CALL
CProcessingInstruction
::
setNodeValue
(
OUString
const
&
rNodeValue
)
throw
(
RuntimeException
,
DOMException
)
{
return
setData
(
rNodeValue
);
}
}
unoxml/source/dom/processinginstruction.hxx
Dosyayı görüntüle @
9f235cfe
...
...
@@ -81,6 +81,9 @@ namespace DOM
throw
(
RuntimeException
);
virtual
OUString
SAL_CALL
getNodeValue
()
throw
(
RuntimeException
);
virtual
void
SAL_CALL
setNodeValue
(
OUString
const
&
rNodeValue
)
throw
(
RuntimeException
,
DOMException
);
// --- delegation for XNde base.
virtual
Reference
<
XNode
>
SAL_CALL
appendChild
(
const
Reference
<
XNode
>&
newChild
)
throw
(
RuntimeException
,
DOMException
)
...
...
@@ -189,11 +192,6 @@ namespace DOM
{
return
CNode
::
replaceChild
(
newChild
,
oldChild
);
}
virtual
void
SAL_CALL
setNodeValue
(
const
OUString
&
nodeValue
)
throw
(
RuntimeException
,
DOMException
)
{
return
CNode
::
setNodeValue
(
nodeValue
);
}
virtual
void
SAL_CALL
setPrefix
(
const
OUString
&
prefix
)
throw
(
RuntimeException
,
DOMException
)
{
...
...
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