From 7f1d68a798fcde681fb01a17f0ff0fd4b2b6fb7f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 10 Mar 2016 16:40:36 +0200 Subject: [PATCH] these don't need to be fields on the class Change-Id: I6f8bab0b9c286270f1e896629379762e38d448c5 Reviewed-on: https://gerrit.libreoffice.org/23120 Tested-by: Jenkins Reviewed-by: Noel Grandin --- .../source/xsltdialog/typedetectionimport.cxx | 29 +++++++------------ .../source/xsltdialog/typedetectionimport.hxx | 12 -------- 2 files changed, 11 insertions(+), 30 deletions(-) diff --git a/filter/source/xsltdialog/typedetectionimport.cxx b/filter/source/xsltdialog/typedetectionimport.cxx index 8c19851a15d8..0865121dd0ec 100644 --- a/filter/source/xsltdialog/typedetectionimport.cxx +++ b/filter/source/xsltdialog/typedetectionimport.cxx @@ -34,19 +34,12 @@ using namespace com::sun::star::xml::sax; using namespace com::sun::star; using namespace std; +static const OUString sNode( "node" ); +static const OUString sName( "oor:name" ); +static const OUString sUIName( "UIName" ); +static const OUString sData( "Data" ); TypeDetectionImporter::TypeDetectionImporter() -: sRootNode( "oor:component-data" ), - sNode( "node" ), - sName( "oor:name" ), - sProp( "prop" ), - sValue( "value" ), - sUIName( "UIName" ), - sData( "Data" ), - sFilters( "Filters" ), - sTypes( "Types" ), - sFilterAdaptorService( "com.sun.star.comp.Writer.XmlFilterAdaptor" ), - sXSLTFilterService( "com.sun.star.documentconversion.XSLTFilter" ) { } @@ -200,10 +193,10 @@ filter_info_impl* TypeDetectionImporter::createFilterForNode( Node * pNode ) if( pFilter->maFlags == 0 ) bOk = false; - if( aFilterService != sFilterAdaptorService ) + if( aFilterService != "com.sun.star.comp.Writer.XmlFilterAdaptor" ) bOk = false; - if( aAdapterService != sXSLTFilterService ) + if( aAdapterService != "com.sun.star.documentconversion.XSLTFilter" ) bOk = false; if( pFilter->maExtension.isEmpty() ) @@ -236,7 +229,7 @@ void SAL_CALL TypeDetectionImporter::startElement( const OUString& aName, const if( maStack.empty() ) { // #109668# support legacy name as well on import - if( aName == sRootNode || aName == "oor:node" ) + if( aName == "oor:component-data" || aName == "oor:node" ) { eNewState = e_Root; } @@ -247,11 +240,11 @@ void SAL_CALL TypeDetectionImporter::startElement( const OUString& aName, const { OUString aNodeName( xAttribs->getValueByName( sName ) ); - if( aNodeName == sFilters ) + if( aNodeName == "Filters" ) { eNewState = e_Filters; } - else if( aNodeName == sTypes ) + else if( aNodeName == "Types" ) { eNewState = e_Types; } @@ -268,7 +261,7 @@ void SAL_CALL TypeDetectionImporter::startElement( const OUString& aName, const } else if( (maStack.top() == e_Filter) || (maStack.top() == e_Type)) { - if( aName == sProp ) + if( aName == "prop" ) { maPropertyName = xAttribs->getValueByName( sName ); eNewState = e_Property; @@ -276,7 +269,7 @@ void SAL_CALL TypeDetectionImporter::startElement( const OUString& aName, const } else if( maStack.top() == e_Property ) { - if( aName == sValue ) + if( aName == "value" ) { eNewState = e_Value; maValue.clear(); diff --git a/filter/source/xsltdialog/typedetectionimport.hxx b/filter/source/xsltdialog/typedetectionimport.hxx index fcc668e96454..9d2be2d2aaf4 100644 --- a/filter/source/xsltdialog/typedetectionimport.hxx +++ b/filter/source/xsltdialog/typedetectionimport.hxx @@ -97,18 +97,6 @@ private: OUString maValue; OUString maNodeName; OUString maPropertyName; - - const OUString sRootNode; - const OUString sNode; - const OUString sName; - const OUString sProp; - const OUString sValue; - const OUString sUIName; - const OUString sData; - const OUString sFilters; - const OUString sTypes; - const OUString sFilterAdaptorService; - const OUString sXSLTFilterService; }; #endif