summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-03-10 16:40:36 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-03-11 12:38:07 +0000
commit7f1d68a798fcde681fb01a17f0ff0fd4b2b6fb7f (patch)
treed8a2dc9147f3ce3e59e7d9c7ade0087229f2645b /filter
parente7e1d50fc0c8077be9d9603eab8ef86098c9aa24 (diff)
these don't need to be fields on the class
Change-Id: I6f8bab0b9c286270f1e896629379762e38d448c5 Reviewed-on: https://gerrit.libreoffice.org/23120 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/xsltdialog/typedetectionimport.cxx29
-rw-r--r--filter/source/xsltdialog/typedetectionimport.hxx12
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