summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorSzabolcs Dezsi <dezsiszabi@hotmail.com>2012-04-06 15:05:52 +0200
committerJan Holesovsky <kendy@suse.cz>2012-04-06 15:07:41 +0200
commit743f22045c4ec08c46c259fc0ba240194a391457 (patch)
treefaed42bb31c4ee767619eb5c3ebd4dec0a41fa03 /reportdesign
parent0c6ebe5d225d6a655f078977455cec6d0a3afa6e (diff)
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Pattern used: find . -name "*.cxx" -exec sed -i 's/\( *\)\(else if\|if\) *( *\([^!()|&]*\)\.equalsAsciiL( *RTL_CONSTASCII_STRINGPARAM *( *\([^)]*\)) *) *)$/\1\2 ( \3 == \4 )/' \{\} \;
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/filter/xml/dbloader2.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx22
-rw-r--r--reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx14
-rw-r--r--reportdesign/source/ui/misc/statusbarcontroller.cxx8
-rw-r--r--reportdesign/source/ui/misc/toolboxcontroller.cxx14
5 files changed, 30 insertions, 30 deletions
diff --git a/reportdesign/source/filter/xml/dbloader2.cxx b/reportdesign/source/filter/xml/dbloader2.cxx
index ff7ebac5d145..3b5ddd9172cb 100644
--- a/reportdesign/source/filter/xml/dbloader2.cxx
+++ b/reportdesign/source/filter/xml/dbloader2.cxx
@@ -74,7 +74,7 @@ ORptTypeDetection::ORptTypeDetection(Reference< XComponentContext > const & xCon
{
::rtl::OUString sMediaType;
xProp->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ) >>= sMediaType;
- if ( sMediaType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII)) )
+ if ( sMediaType == MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII )
return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StarBaseReport"));
::comphelper::disposeComponent(xProp);
}
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index f434fc05cc7b..75155732a956 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -158,7 +158,7 @@ void SAL_CALL ExportDocumentHandler::endDocument() throw (uno::RuntimeException,
void SAL_CALL ExportDocumentHandler::startElement(const ::rtl::OUString & _sName, const uno::Reference< xml::sax::XAttributeList > & xAttribs) throw (uno::RuntimeException, xml::sax::SAXException)
{
bool bExport = true;
- if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("office:chart")) )
+ if ( _sName == "office:chart" )
{
SvXMLAttributeList* pList = new SvXMLAttributeList();
uno::Reference< xml::sax::XAttributeList > xNewAttribs = pList;
@@ -201,12 +201,12 @@ void SAL_CALL ExportDocumentHandler::startElement(const ::rtl::OUString & _sName
m_xDelegatee->endElement(sTableCalc);
bExport = false;
}
- else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table")) )
+ else if ( _sName == "table:table" )
{
m_xDelegatee->startElement(lcl_createAttribute(XML_NP_RPT,XML_DETAIL),NULL);
lcl_exportPrettyPrinting(m_xDelegatee);
}
- else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-header-rows")) )
+ else if ( _sName == "table:table-header-rows" )
{
m_bCountColumnHeader = true;
}
@@ -214,7 +214,7 @@ void SAL_CALL ExportDocumentHandler::startElement(const ::rtl::OUString & _sName
{
++m_nColumnCount;
}
- else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-rows")) )
+ else if ( _sName == "table:table-rows" )
{
m_xDelegatee->startElement(_sName,xAttribs);
exportTableRows();
@@ -224,17 +224,17 @@ void SAL_CALL ExportDocumentHandler::startElement(const ::rtl::OUString & _sName
}
else if ( m_bTableRowsStarted && m_bFirstRowExported && (_sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-row")) || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-cell"))) )
bExport = false;
- else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("chart:plot-area")))
+ else if ( _sName == "chart:plot-area" )
{
SvXMLAttributeList* pList = SvXMLAttributeList::getImplementation(xAttribs);
pList->RemoveAttribute(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("table:cell-range-address")));
}
- else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("chart:categories")))
+ else if ( _sName == "chart:categories" )
{
static ::rtl::OUString s_sCellAddress(lcl_createAttribute(XML_NP_TABLE,XML_CELL_RANGE_ADDRESS));
lcl_correctCellAddress(s_sCellAddress,xAttribs);
}
- else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("chart:series")))
+ else if ( _sName == "chart:series" )
{
static ::rtl::OUString s_sCellAddress(lcl_createAttribute(XML_NP_CHART,XML_VALUES_CELL_RANGE_ADDRESS));
lcl_correctCellAddress(s_sCellAddress,xAttribs);
@@ -257,21 +257,21 @@ void SAL_CALL ExportDocumentHandler::endElement(const ::rtl::OUString & _sName)
{
bool bExport = true;
::rtl::OUString sNewName = _sName;
- if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("office:chart")) )
+ if ( _sName == "office:chart" )
{
sNewName = lcl_createAttribute(XML_NP_OFFICE,XML_REPORT);
}
- else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table")) )
+ else if ( _sName == "table:table" )
{
m_xDelegatee->endElement(_sName);
lcl_exportPrettyPrinting(m_xDelegatee);
sNewName = lcl_createAttribute(XML_NP_RPT,XML_DETAIL);
}
- else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-header-rows")) )
+ else if ( _sName == "table:table-header-rows" )
{
m_bCountColumnHeader = false;
}
- else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-rows")) )
+ else if ( _sName == "table:table-rows" )
m_bTableRowsStarted = false;
else if ( m_bTableRowsStarted && m_bFirstRowExported && (_sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-row")) || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-cell"))) )
bExport = false;
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index 0e87b7a20c39..215d5301338c 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -148,7 +148,7 @@ void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & _sName
{
uno::Reference< xml::sax::XAttributeList > xNewAttribs = _xAttrList;
bool bExport = true;
- if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("office:report")) )
+ if ( _sName == "office:report" )
{
const sal_Int16 nLength = (_xAttrList.is()) ? _xAttrList->getLength() : 0;
static const ::rtl::OUString s_sTRUE = ::xmloff::token::GetXMLToken(XML_TRUE);
@@ -196,7 +196,7 @@ void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & _sName
bExport = false;
m_bImportedChart = true;
}
- else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:master-detail-field")) )
+ else if ( _sName == "rpt:master-detail-field" )
{
const sal_Int16 nLength = (_xAttrList.is()) ? _xAttrList->getLength() : 0;
static const ::rtl::OUString s_sTRUE = ::xmloff::token::GetXMLToken(XML_TRUE);
@@ -244,7 +244,7 @@ void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & _sName
|| _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:report-component"))
|| _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:report-element")))
bExport = false;
- else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("chart:plot-area")))
+ else if ( _sName == "chart:plot-area" )
{
sal_Bool bHasCategories = sal_True;
const sal_Int16 nLength = (_xAttrList.is()) ? _xAttrList->getLength() : 0;
@@ -260,7 +260,7 @@ void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & _sName
sLocalName = sAttrName;
else
sLocalName = sAttrName.copy( nColonPos + 1L );
- if ( sLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("data-source-has-labels")) )
+ if ( sLocalName == "data-source-has-labels" )
{
const rtl::OUString sValue = _xAttrList->getValueByIndex( i );
bHasCategories = sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("both"));
@@ -271,7 +271,7 @@ void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & _sName
beans::PropertyValue* pArgEnd = pArgIter + m_aArguments.getLength();
for(;pArgIter != pArgEnd;++pArgIter)
{
- if ( pArgIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HasCategories")) )
+ if ( pArgIter->Name == "HasCategories" )
{
pArgIter->Value <<= bHasCategories;
break;
@@ -293,11 +293,11 @@ void SAL_CALL ImportDocumentHandler::endElement(const ::rtl::OUString & _sName)
{
bool bExport = true;
::rtl::OUString sNewName = _sName;
- if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("office:report")) )
+ if ( _sName == "office:report" )
{
sNewName = lcl_createAttribute(XML_NP_OFFICE,XML_CHART);
}
- else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:master-detail-fields")) )
+ else if ( _sName == "rpt:master-detail-fields" )
{
if ( !m_aMasterFields.empty() )
m_xDatabaseDataProvider->setMasterFields(uno::Sequence< ::rtl::OUString>(&*m_aMasterFields.begin(),m_aMasterFields.size()));
diff --git a/reportdesign/source/ui/misc/statusbarcontroller.cxx b/reportdesign/source/ui/misc/statusbarcontroller.cxx
index b93f27f564e2..5d77ea8efef1 100644
--- a/reportdesign/source/ui/misc/statusbarcontroller.cxx
+++ b/reportdesign/source/ui/misc/statusbarcontroller.cxx
@@ -108,11 +108,11 @@ void SAL_CALL OStatusbarController::initialize( const Sequence< Any >& _rArgumen
break;
}
}
- if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:ZoomSlider")) )
+ if ( m_aCommandURL == ".uno:ZoomSlider" )
{
m_pController = TStatusbarHelper::createFromQuery(new SvxZoomSliderControl(m_nSlotId = SID_ATTR_ZOOMSLIDER,m_nId,*pStatusBar));
}
- else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:Zoom")) )
+ else if ( m_aCommandURL == ".uno:Zoom" )
{
m_pController = TStatusbarHelper::createFromQuery(new SvxZoomStatusBarControl(m_nSlotId = SID_ATTR_ZOOM,m_nId,*pStatusBar));
}
@@ -135,7 +135,7 @@ void SAL_CALL OStatusbarController::statusChanged( const FeatureStateEvent& _aEv
if ( m_pController.is() )
{
- if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:ZoomSlider")) )
+ if ( m_aCommandURL == ".uno:ZoomSlider" )
{
Sequence< PropertyValue > aSeq;
if ( (_aEvent.State >>= aSeq) && aSeq.getLength() == 2 )
@@ -145,7 +145,7 @@ void SAL_CALL OStatusbarController::statusChanged( const FeatureStateEvent& _aEv
static_cast<SvxZoomSliderControl*>(m_pController.get())->StateChanged(m_nSlotId,SFX_ITEM_AVAILABLE,&aZoomSlider);
}
}
- else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:Zoom")) )
+ else if ( m_aCommandURL == ".uno:Zoom" )
{
Sequence< PropertyValue > aSeq;
if ( (_aEvent.State >>= aSeq) && aSeq.getLength() == 3 )
diff --git a/reportdesign/source/ui/misc/toolboxcontroller.cxx b/reportdesign/source/ui/misc/toolboxcontroller.cxx
index 74e670a19c3a..61219dc0531e 100644
--- a/reportdesign/source/ui/misc/toolboxcontroller.cxx
+++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx
@@ -158,37 +158,37 @@ void SAL_CALL OToolboxController::initialize( const Sequence< Any >& _rArguments
break;
}
}
- if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:BasicShapes")) )
+ if ( m_aCommandURL == ".uno:BasicShapes" )
{
m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:BasicShapes")),sal_True));
m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_BASIC,m_nToolBoxId,*pToolBox));
}
- else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:SymbolShapes")) )
+ else if ( m_aCommandURL == ".uno:SymbolShapes" )
{
m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SymbolShapes")),sal_True));
m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_SYMBOL,m_nToolBoxId,*pToolBox));
}
- else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:ArrowShapes")) )
+ else if ( m_aCommandURL == ".uno:ArrowShapes" )
{
m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:ArrowShapes")),sal_True));
m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_ARROW,m_nToolBoxId,*pToolBox));
}
- else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:FlowChartShapes")) )
+ else if ( m_aCommandURL == ".uno:FlowChartShapes" )
{
m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FlowChartShapes")),sal_True));
m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_FLOWCHART,m_nToolBoxId,*pToolBox));
}
- else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:CalloutShapes")) )
+ else if ( m_aCommandURL == ".uno:CalloutShapes" )
{
m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:CalloutShapes")),sal_True));
m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_CALLOUT,m_nToolBoxId,*pToolBox));
}
- else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:StarShapes")) )
+ else if ( m_aCommandURL == ".uno:StarShapes" )
{
m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:StarShapes")),sal_True));
m_pToolbarController = TToolbarHelper::createFromQuery(new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_STAR,m_nToolBoxId,*pToolBox));
}
- else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:CharFontName")) )
+ else if ( m_aCommandURL == ".uno:CharFontName" )
{
m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:CharFontName")),sal_True));
m_pToolbarController = TToolbarHelper::createFromQuery(new SvxFontNameToolBoxControl/*SvxStyleToolBoxControl*/(m_nSlotId = SID_ATTR_CHAR_FONT,m_nToolBoxId,*pToolBox));