summaryrefslogtreecommitdiff
path: root/filter/source/xsltdialog/typedetectionexport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'filter/source/xsltdialog/typedetectionexport.cxx')
-rw-r--r--filter/source/xsltdialog/typedetectionexport.cxx29
1 files changed, 13 insertions, 16 deletions
diff --git a/filter/source/xsltdialog/typedetectionexport.cxx b/filter/source/xsltdialog/typedetectionexport.cxx
index 0f86af1cbc5a..af367ec8a483 100644
--- a/filter/source/xsltdialog/typedetectionexport.cxx
+++ b/filter/source/xsltdialog/typedetectionexport.cxx
@@ -90,7 +90,6 @@ void TypeDetectionExporter::doExport( const Reference< XOutputStream >& xOS, co
static const OUStringLiteral sDocTypePrefix ( u"doctype:" );
static const OUStringLiteral sFilterAdaptorService( u"com.sun.star.comp.Writer.XmlFilterAdaptor" );
static const OUStringLiteral sXSLTFilterService ( u"com.sun.star.documentconversion.XSLTFilter" );
- static const OUStringLiteral sCdataAttribute ( u"CDATA" );
// set up sax writer and connect to given output stream
@@ -98,10 +97,10 @@ void TypeDetectionExporter::doExport( const Reference< XOutputStream >& xOS, co
xHandler->setOutputStream( xOS );
rtl::Reference<::comphelper::AttributeList> pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute ( "xmlns:oor", sCdataAttribute, "http://openoffice.org/2001/registry" );
- pAttrList->AddAttribute ( "xmlns:xs", sCdataAttribute, "http://www.w3.org/2001/XMLSchema" );
- pAttrList->AddAttribute ( sName, sCdataAttribute, "TypeDetection" );
- pAttrList->AddAttribute ( "oor:package", sCdataAttribute, "org.openoffice.Office" );
+ pAttrList->AddAttribute ( "xmlns:oor", "http://openoffice.org/2001/registry" );
+ pAttrList->AddAttribute ( "xmlns:xs", "http://www.w3.org/2001/XMLSchema" );
+ pAttrList->AddAttribute ( sName, "TypeDetection" );
+ pAttrList->AddAttribute ( "oor:package", "org.openoffice.Office" );
xHandler->startDocument();
xHandler->ignorableWhitespace ( sWhiteSpace );
@@ -110,14 +109,14 @@ void TypeDetectionExporter::doExport( const Reference< XOutputStream >& xOS, co
// export types
{
pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute ( sName, sCdataAttribute, "Types" );
+ pAttrList->AddAttribute ( sName, "Types" );
xHandler->ignorableWhitespace ( sWhiteSpace );
xHandler->startElement( sNode, pAttrList );
for (auto const& filter : rFilters)
{
pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute( sName, sCdataAttribute, filter->maType );
+ pAttrList->AddAttribute( sName, filter->maType );
xHandler->ignorableWhitespace ( sWhiteSpace );
xHandler->startElement( sNode, pAttrList );
OUString sValue = "0" + sComma + sComma;
@@ -141,14 +140,14 @@ void TypeDetectionExporter::doExport( const Reference< XOutputStream >& xOS, co
// export filters
{
pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute ( sName, sCdataAttribute, "Filters" );
+ pAttrList->AddAttribute ( sName, "Filters" );
xHandler->ignorableWhitespace ( sWhiteSpace );
xHandler->startElement( sNode, pAttrList );
for (auto const& filter : rFilters)
{
pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute( sName, sCdataAttribute, filter->maFilterName );
+ pAttrList->AddAttribute( sName, filter->maFilterName );
xHandler->ignorableWhitespace ( sWhiteSpace );
xHandler->startElement( sNode, pAttrList );
addLocaleProperty( xHandler, sUIName, filter->maInterfaceName );
@@ -207,14 +206,13 @@ void TypeDetectionExporter::addProperty( const Reference< XWriter >& xHandler, c
{
try
{
- static const OUStringLiteral sCdataAttribute( u"CDATA" );
static const OUStringLiteral sProp( u"prop" );
static const OUStringLiteral sValue( u"value" );
static const OUStringLiteral sWhiteSpace ( u" " );
rtl::Reference<::comphelper::AttributeList>pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute ( "oor:name", sCdataAttribute, rName );
- pAttrList->AddAttribute ( "oor:type", sCdataAttribute, "xs:string" );
+ pAttrList->AddAttribute ( "oor:name", rName );
+ pAttrList->AddAttribute ( "oor:type", "xs:string" );
xHandler->ignorableWhitespace ( sWhiteSpace );
xHandler->startElement( sProp, pAttrList );
@@ -235,19 +233,18 @@ void TypeDetectionExporter::addLocaleProperty( const Reference< XWriter >& xHand
{
try
{
- static const OUStringLiteral sCdataAttribute( u"CDATA" );
static const OUStringLiteral sProp( u"prop" );
static const OUStringLiteral sValue( u"value" );
static const OUStringLiteral sWhiteSpace ( u" " );
rtl::Reference<::comphelper::AttributeList> pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute ( "oor:name", sCdataAttribute, rName );
- pAttrList->AddAttribute ( "oor:type", sCdataAttribute, "xs:string" );
+ pAttrList->AddAttribute ( "oor:name", rName );
+ pAttrList->AddAttribute ( "oor:type", "xs:string" );
xHandler->ignorableWhitespace ( sWhiteSpace );
xHandler->startElement( sProp, pAttrList );
pAttrList = new ::comphelper::AttributeList;
- pAttrList->AddAttribute ( "xml:lang", sCdataAttribute, "en-US" );
+ pAttrList->AddAttribute ( "xml:lang", "en-US" );
xHandler->ignorableWhitespace ( sWhiteSpace );
xHandler->startElement( sValue, pAttrList );
xHandler->characters( rValue );