diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-10 12:30:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-11 07:01:24 +0100 |
commit | 743d5604c22e2c599ec22c1afd8c7c02388d575f (patch) | |
tree | 6679a10446e504b108449f1e4fb53df66034aa51 /xmloff | |
parent | 2fab2c9d494035cc55d0bc56a47e784be6e64510 (diff) |
loplugin:indentation in writerfilter..xmloff
Change-Id: Ibda157508e92ab5fb222daf79a38941c30a8057e
Reviewed-on: https://gerrit.libreoffice.org/67611
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
26 files changed, 170 insertions, 169 deletions
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 097eb55a281f..4c267354a693 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -1643,7 +1643,7 @@ void SchXMLExportHelper_Impl::exportTable() { bExportString = false; - ::sax::Converter::convertDouble( + ::sax::Converter::convertDouble( msStringBuffer, fValue); msString = msStringBuffer.makeStringAndClear(); mrExport.AddAttribute( XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_FLOAT ); @@ -1698,7 +1698,7 @@ void SchXMLExportHelper_Impl::exportTable() { bExportString = false; - ::sax::Converter::convertDouble(msStringBuffer, fValue); + ::sax::Converter::convertDouble(msStringBuffer, fValue); msString = msStringBuffer.makeStringAndClear(); mrExport.AddAttribute( XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_FLOAT ); mrExport.AddAttribute( XML_NAMESPACE_OFFICE, XML_VALUE, msString ); diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx index 5e09a373cd97..19e76a693117 100644 --- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx +++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx @@ -272,15 +272,15 @@ void XMLEmbeddedObjectImportContext::EndElement() GetPrefix(), GetLocalName() ) ); xHandler->endDocument(); - try - { - Reference < XModifiable2 > xModifiable2( xComp, UNO_QUERY_THROW ); - xModifiable2->enableSetModified(); - xModifiable2->setModified( true ); // trigger new replacement image generation - } - catch( Exception& ) - { - } + try + { + Reference < XModifiable2 > xModifiable2( xComp, UNO_QUERY_THROW ); + xModifiable2->enableSetModified(); + xModifiable2->setModified( true ); // trigger new replacement image generation + } + catch( Exception& ) + { + } } } diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx index d916d56e794e..248a36213ee4 100644 --- a/xmloff/source/core/nmspmap.cxx +++ b/xmloff/source/core/nmspmap.cxx @@ -302,7 +302,7 @@ sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrName_( const OUString& rAttrName, } else { - rtl::Reference<NameSpaceEntry> xEntry(new NameSpaceEntry); + rtl::Reference<NameSpaceEntry> xEntry(new NameSpaceEntry); sal_Int32 nColonPos = rAttrName.indexOf( ':' ); if( -1 == nColonPos ) diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx index 73a92b9592e3..bfeb15bc25e3 100644 --- a/xmloff/source/draw/eventimp.cxx +++ b/xmloff/source/draw/eventimp.cxx @@ -269,124 +269,124 @@ void SdXMLEventContext::EndElement() OUString sAPIEventName; uno::Sequence< beans::PropertyValue > aProperties; - sAPIEventName = "OnClick"; + sAPIEventName = "OnClick"; - if( mbScript ) - meClickAction = ClickAction_MACRO; + if( mbScript ) + meClickAction = ClickAction_MACRO; - sal_Int32 nPropertyCount = 2; - switch( meClickAction ) - { - case ClickAction_NONE: - case ClickAction_PREVPAGE: - case ClickAction_NEXTPAGE: - case ClickAction_FIRSTPAGE: - case ClickAction_LASTPAGE: - case ClickAction_INVISIBLE: - case ClickAction_STOPPRESENTATION: - break; - case ClickAction_PROGRAM: - case ClickAction_VERB: - case ClickAction_BOOKMARK: - case ClickAction_DOCUMENT: + sal_Int32 nPropertyCount = 2; + switch( meClickAction ) + { + case ClickAction_NONE: + case ClickAction_PREVPAGE: + case ClickAction_NEXTPAGE: + case ClickAction_FIRSTPAGE: + case ClickAction_LASTPAGE: + case ClickAction_INVISIBLE: + case ClickAction_STOPPRESENTATION: + break; + case ClickAction_PROGRAM: + case ClickAction_VERB: + case ClickAction_BOOKMARK: + case ClickAction_DOCUMENT: + nPropertyCount += 1; + break; + case ClickAction_MACRO: + if ( msLanguage.equalsIgnoreAsciiCase("starbasic") ) nPropertyCount += 1; - break; - case ClickAction_MACRO: - if ( msLanguage.equalsIgnoreAsciiCase("starbasic") ) - nPropertyCount += 1; - break; + break; - case ClickAction_SOUND: - nPropertyCount += 2; - break; + case ClickAction_SOUND: + nPropertyCount += 2; + break; - case ClickAction_VANISH: - nPropertyCount += 4; - break; - default: - break; - } + case ClickAction_VANISH: + nPropertyCount += 4; + break; + default: + break; + } - aProperties.realloc( nPropertyCount ); - beans::PropertyValue* pProperties = aProperties.getArray(); + aProperties.realloc( nPropertyCount ); + beans::PropertyValue* pProperties = aProperties.getArray(); - if( ClickAction_MACRO == meClickAction ) + if( ClickAction_MACRO == meClickAction ) + { + if ( msLanguage.equalsIgnoreAsciiCase("starbasic") ) { - if ( msLanguage.equalsIgnoreAsciiCase("starbasic") ) + OUString sLibrary; + const OUString& rApp = GetXMLToken( XML_APPLICATION ); + const OUString& rDoc = GetXMLToken( XML_DOCUMENT ); + if( msMacroName.getLength() > rApp.getLength()+1 && + msMacroName.copy(0,rApp.getLength()).equalsIgnoreAsciiCase( rApp ) && + ':' == msMacroName[rApp.getLength()] ) { - OUString sLibrary; - const OUString& rApp = GetXMLToken( XML_APPLICATION ); - const OUString& rDoc = GetXMLToken( XML_DOCUMENT ); - if( msMacroName.getLength() > rApp.getLength()+1 && - msMacroName.copy(0,rApp.getLength()).equalsIgnoreAsciiCase( rApp ) && - ':' == msMacroName[rApp.getLength()] ) - { - sLibrary = "StarOffice"; - msMacroName = msMacroName.copy( rApp.getLength()+1 ); - } - else if( msMacroName.getLength() > rDoc.getLength()+1 && - msMacroName.copy(0,rDoc.getLength()).equalsIgnoreAsciiCase( rDoc ) && - ':' == msMacroName[rDoc.getLength()] ) - { - sLibrary = rDoc; - msMacroName = msMacroName.copy( rDoc.getLength()+1 ); - } - - pProperties->Name = "EventType"; - pProperties->Handle = -1; - pProperties->Value <<= OUString( "StarBasic" ); - pProperties->State = beans::PropertyState_DIRECT_VALUE; - pProperties++; - - pProperties->Name = "MacroName"; - pProperties->Handle = -1; - pProperties->Value <<= msMacroName; - pProperties->State = beans::PropertyState_DIRECT_VALUE; - pProperties++; - - pProperties->Name = "Library"; - pProperties->Handle = -1; - pProperties->Value <<= sLibrary; - pProperties->State = beans::PropertyState_DIRECT_VALUE; + sLibrary = "StarOffice"; + msMacroName = msMacroName.copy( rApp.getLength()+1 ); } - else + else if( msMacroName.getLength() > rDoc.getLength()+1 && + msMacroName.copy(0,rDoc.getLength()).equalsIgnoreAsciiCase( rDoc ) && + ':' == msMacroName[rDoc.getLength()] ) { - pProperties->Name = "EventType"; - pProperties->Handle = -1; - pProperties->Value <<= OUString( "Script" ); - pProperties->State = beans::PropertyState_DIRECT_VALUE; - pProperties++; - - pProperties->Name = "Script"; - pProperties->Handle = -1; - pProperties->Value <<= msMacroName; - pProperties->State = beans::PropertyState_DIRECT_VALUE; + sLibrary = rDoc; + msMacroName = msMacroName.copy( rDoc.getLength()+1 ); } + + pProperties->Name = "EventType"; + pProperties->Handle = -1; + pProperties->Value <<= OUString( "StarBasic" ); + pProperties->State = beans::PropertyState_DIRECT_VALUE; + pProperties++; + + pProperties->Name = "MacroName"; + pProperties->Handle = -1; + pProperties->Value <<= msMacroName; + pProperties->State = beans::PropertyState_DIRECT_VALUE; + pProperties++; + + pProperties->Name = "Library"; + pProperties->Handle = -1; + pProperties->Value <<= sLibrary; + pProperties->State = beans::PropertyState_DIRECT_VALUE; } else { pProperties->Name = "EventType"; pProperties->Handle = -1; - pProperties->Value <<= OUString( "Presentation" ); + pProperties->Value <<= OUString( "Script" ); pProperties->State = beans::PropertyState_DIRECT_VALUE; pProperties++; - // ClickAction_BOOKMARK and ClickAction_DOCUMENT share the same xml event - // so check here if its really a bookmark or maybe a document - if( meClickAction == ClickAction_BOOKMARK ) - { - if( !msBookmark.startsWith( "#" ) ) - meClickAction = ClickAction_DOCUMENT; - } - - pProperties->Name = "ClickAction"; + pProperties->Name = "Script"; pProperties->Handle = -1; - pProperties->Value <<= meClickAction; + pProperties->Value <<= msMacroName; pProperties->State = beans::PropertyState_DIRECT_VALUE; - pProperties++; + } + } + else + { + pProperties->Name = "EventType"; + pProperties->Handle = -1; + pProperties->Value <<= OUString( "Presentation" ); + pProperties->State = beans::PropertyState_DIRECT_VALUE; + pProperties++; + + // ClickAction_BOOKMARK and ClickAction_DOCUMENT share the same xml event + // so check here if its really a bookmark or maybe a document + if( meClickAction == ClickAction_BOOKMARK ) + { + if( !msBookmark.startsWith( "#" ) ) + meClickAction = ClickAction_DOCUMENT; + } - switch( meClickAction ) - { + pProperties->Name = "ClickAction"; + pProperties->Handle = -1; + pProperties->Value <<= meClickAction; + pProperties->State = beans::PropertyState_DIRECT_VALUE; + pProperties++; + + switch( meClickAction ) + { case ClickAction_NONE: case ClickAction_PREVPAGE: case ClickAction_NEXTPAGE: @@ -448,8 +448,8 @@ void SdXMLEventContext::EndElement() break; default: break; - } } + } xEvents->replaceByName( sAPIEventName, uno::Any( aProperties ) ); } while(false); diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 529aabcb4a3e..41dc67caea15 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -420,7 +420,7 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference< lang::XComponent mpPresPagePropsMapper = new XMLPageExportPropertyMapper( xMapper, *this ); // add family name - GetAutoStylePool()->AddFamily( + GetAutoStylePool()->AddFamily( XML_STYLE_FAMILY_SD_GRAPHICS_ID, OUString(XML_STYLE_FAMILY_SD_GRAPHICS_NAME), GetPropertySetMapper(), diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index dbf967bd6547..018e3f704452 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -3442,7 +3442,7 @@ SvXMLImportContextRef SdXMLFrameShapeContext::CreateChildContext( sal_uInt16 nPr SdXMLPluginShapeContext* pPluginContext = dynamic_cast<SdXMLPluginShapeContext*>(pShapeContext); if( pPluginContext && pPluginContext->getMimeType() == "model/vnd.gltf+json" ) { - mxImplContext = nullptr; + mxImplContext = nullptr; return new SvXMLImportContext(GetImport(), nPrefix, rLocalName); } } diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index 237fee20a63e..01f0f3e9e659 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -637,7 +637,7 @@ void SdXMLPresentationPageLayoutContext::EndElement() { mnTypeId = AUTOLAYOUT_4CLIPART; } - break; + break; } case 7: diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index 8ff178e015d9..1642fcfd8247 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -985,8 +985,8 @@ namespace xmloff ( *pAttributeId == SCAFlags::FocusOnClick ) ? BoolAttrFlags::DefaultTrue : BoolAttrFlags::DefaultFalse ); #if OSL_DEBUG_LEVEL > 0 - // reset the bit for later checking - m_nIncludeSpecial = m_nIncludeSpecial & ~*pAttributeId; + // reset the bit for later checking + m_nIncludeSpecial = m_nIncludeSpecial & ~*pAttributeId; #endif } } @@ -1026,8 +1026,8 @@ namespace xmloff nIntegerPropertyAttrDefaults[i] ); #if OSL_DEBUG_LEVEL > 0 - // reset the bit for later checking - m_nIncludeSpecial = m_nIncludeSpecial & ~nIntegerPropertyAttributeIds[i]; + // reset the bit for later checking + m_nIncludeSpecial = m_nIncludeSpecial & ~nIntegerPropertyAttributeIds[i]; #endif } @@ -1169,8 +1169,8 @@ namespace xmloff pStringPropertyNames[i] ); #if OSL_DEBUG_LEVEL > 0 - // reset the bit for later checking - m_nIncludeSpecial = m_nIncludeSpecial & ~nStringPropertyAttributeIds[i]; + // reset the bit for later checking + m_nIncludeSpecial = m_nIncludeSpecial & ~nStringPropertyAttributeIds[i]; #endif } } diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index e234ce5cf132..8adb230b5b62 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -363,7 +363,7 @@ namespace xmloff Sequence< sal_Int16 > aPropertyValueList( aXMLValueList.getLength() ); const Any* pXMLValue = aXMLValueList.getConstArray(); - sal_Int16* pPropValue = aPropertyValueList.getArray(); + sal_Int16* pPropValue = aPropertyValueList.getArray(); for ( sal_Int32 i=0; i<aXMLValueList.getLength(); ++i, ++pXMLValue, ++pPropValue ) { diff --git a/xmloff/source/style/DrawAspectHdl.cxx b/xmloff/source/style/DrawAspectHdl.cxx index 6b0fee7b2e87..f732118feb80 100644 --- a/xmloff/source/style/DrawAspectHdl.cxx +++ b/xmloff/source/style/DrawAspectHdl.cxx @@ -46,7 +46,7 @@ bool DrawAspectHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, c bool DrawAspectHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& ) const { bool bRet = false; - OUStringBuffer aOut; + OUStringBuffer aOut; sal_Int64 nAspect = 0; if( ( rValue >>= nAspect ) && nAspect > 0 ) diff --git a/xmloff/source/style/ImageStyle.cxx b/xmloff/source/style/ImageStyle.cxx index 987d4390dc68..c70a23b4dbe9 100644 --- a/xmloff/source/style/ImageStyle.cxx +++ b/xmloff/source/style/ImageStyle.cxx @@ -90,7 +90,7 @@ void XMLImageStyle::exportXML(OUString const & rStrName, uno::Any const & rValue bool XMLImageStyle::importXML(uno::Reference<xml::sax::XAttributeList> const & xAttrList, uno::Any& rValue, OUString& rStrName, SvXMLImport& rImport) { - static const SvXMLTokenMapEntry aHatchAttrTokenMap[] = + static const SvXMLTokenMapEntry aHatchAttrTokenMap[] = { { XML_NAMESPACE_DRAW, XML_NAME, XML_TOK_IMAGE_NAME }, { XML_NAMESPACE_DRAW, XML_DISPLAY_NAME, XML_TOK_IMAGE_DISPLAY_NAME }, diff --git a/xmloff/source/style/PageMasterImportPropMapper.cxx b/xmloff/source/style/PageMasterImportPropMapper.cxx index beff02ecc549..610a948cf491 100644 --- a/xmloff/source/style/PageMasterImportPropMapper.cxx +++ b/xmloff/source/style/PageMasterImportPropMapper.cxx @@ -251,7 +251,7 @@ void PageMasterImportPropertyMapper::finished(std::vector< XMLPropertyState >& r { table::BorderLine2 aBorderLine; pBorders[i]->maValue >>= aBorderLine; - if( pBorderWidths[i] ) + if( pBorderWidths[i] ) { table::BorderLine2 aBorderLineWidth; pBorderWidths[i]->maValue >>= aBorderLineWidth; @@ -274,7 +274,7 @@ void PageMasterImportPropertyMapper::finished(std::vector< XMLPropertyState >& r { table::BorderLine2 aBorderLine; pHeaderBorders[i]->maValue >>= aBorderLine; - if( pHeaderBorderWidths[i] ) + if( pHeaderBorderWidths[i] ) { table::BorderLine2 aBorderLineWidth; pHeaderBorderWidths[i]->maValue >>= aBorderLineWidth; @@ -297,7 +297,7 @@ void PageMasterImportPropertyMapper::finished(std::vector< XMLPropertyState >& r { table::BorderLine2 aBorderLine; pFooterBorders[i]->maValue >>= aBorderLine; - if( pFooterBorderWidths[i] ) + if( pFooterBorderWidths[i] ) { table::BorderLine2 aBorderLineWidth; pFooterBorderWidths[i]->maValue >>= aBorderLineWidth; diff --git a/xmloff/source/style/XMLClipPropertyHandler.cxx b/xmloff/source/style/XMLClipPropertyHandler.cxx index 1beaa5debdca..250063f15858 100644 --- a/xmloff/source/style/XMLClipPropertyHandler.cxx +++ b/xmloff/source/style/XMLClipPropertyHandler.cxx @@ -110,7 +110,7 @@ bool XMLClipPropertyHandler::importXML( const OUString& rStrImpValue, uno::Any& bool XMLClipPropertyHandler::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const { bool bRet = false; - OUStringBuffer aOut(30); + OUStringBuffer aOut(30); GraphicCrop aCrop; if( rValue >>= aCrop ) diff --git a/xmloff/source/style/XMLPercentOrMeasurePropertyHandler.cxx b/xmloff/source/style/XMLPercentOrMeasurePropertyHandler.cxx index b91fd45cb25b..bc0e20b7c0ca 100644 --- a/xmloff/source/style/XMLPercentOrMeasurePropertyHandler.cxx +++ b/xmloff/source/style/XMLPercentOrMeasurePropertyHandler.cxx @@ -62,7 +62,7 @@ bool XMLPercentOrMeasurePropertyHandler::exportXML( const Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const { - OUStringBuffer aOut; + OUStringBuffer aOut; sal_Int32 nValue = 0; if( !(rValue >>= nValue ) ) diff --git a/xmloff/source/style/shadwhdl.cxx b/xmloff/source/style/shadwhdl.cxx index b3c2739aa1db..278692040b8a 100644 --- a/xmloff/source/style/shadwhdl.cxx +++ b/xmloff/source/style/shadwhdl.cxx @@ -121,7 +121,7 @@ bool XMLShadowPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue bool XMLShadowPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const { bool bRet = false; - OUStringBuffer aOut; + OUStringBuffer aOut; table::ShadowFormat aShadow; if( rValue >>= aShadow ) diff --git a/xmloff/source/style/xmlbahdl.cxx b/xmloff/source/style/xmlbahdl.cxx index 9eb8d01c5092..488a5873f83b 100644 --- a/xmloff/source/style/xmlbahdl.cxx +++ b/xmloff/source/style/xmlbahdl.cxx @@ -193,7 +193,7 @@ bool XMLMeasurePropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, co { bool bRet = false; sal_Int32 nValue; - OUStringBuffer aOut; + OUStringBuffer aOut; if( lcl_xmloff_getAny( rValue, nValue, nBytes ) ) { @@ -309,7 +309,7 @@ bool XMLPercentPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, co { bool bRet = false; sal_Int32 nValue; - OUStringBuffer aOut; + OUStringBuffer aOut; if( lcl_xmloff_getAny( rValue, nValue, nBytes ) ) { @@ -387,7 +387,7 @@ bool XMLNegPercentPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, { bool bRet = false; sal_Int32 nValue; - OUStringBuffer aOut; + OUStringBuffer aOut; if( lcl_xmloff_getAny( rValue, nValue, nBytes ) ) { @@ -418,7 +418,7 @@ bool XMLMeasurePxPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, { bool bRet = false; sal_Int32 nValue; - OUStringBuffer aOut; + OUStringBuffer aOut; if( lcl_xmloff_getAny( rValue, nValue, nBytes ) ) { diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx index e2e3d14b230d..5fc0ff9c8d34 100644 --- a/xmloff/source/table/XMLTableExport.cxx +++ b/xmloff/source/table/XMLTableExport.cxx @@ -211,7 +211,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) void XMLTableExport::collectTableAutoStyles(const Reference < XColumnRowRange >& xColumnRowRange) { - if( !mbExportTables ) + if( !mbExportTables ) return; std::shared_ptr< XMLTableInfo > xTableInfo( new XMLTableInfo ); @@ -221,9 +221,9 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) { Reference< XIndexAccess > xIndexAccessCols( xColumnRowRange->getColumns(), UNO_QUERY_THROW ); const sal_Int32 nColumnCount = xIndexAccessCols->getCount(); - for( sal_Int32 nColumn = 0; nColumn < nColumnCount; ++nColumn ) try + for( sal_Int32 nColumn = 0; nColumn < nColumnCount; ++nColumn ) try { - Reference< XPropertySet > xPropSet( xIndexAccessCols->getByIndex(nColumn) , UNO_QUERY_THROW ); + Reference< XPropertySet > xPropSet( xIndexAccessCols->getByIndex(nColumn) , UNO_QUERY_THROW ); std::vector< XMLPropertyState > aPropStates( mxColumnExportPropertySetMapper->Filter( xPropSet ) ); if( has_states( aPropStates ) ) @@ -244,9 +244,10 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) StringStatisticHelper aStringStatistic; - for( sal_Int32 nRow = 0; nRow < nRowCount; ++nRow ) try + for( sal_Int32 nRow = 0; nRow < nRowCount; ++nRow ) + try { - Reference< XPropertySet > xPropSet( xIndexAccessRows->getByIndex(nRow) , UNO_QUERY_THROW ); + Reference< XPropertySet > xPropSet( xIndexAccessRows->getByIndex(nRow) , UNO_QUERY_THROW ); std::vector< XMLPropertyState > aRowPropStates( mxRowExportPropertySetMapper->Filter( xPropSet ) ); if( has_states( aRowPropStates ) ) @@ -381,7 +382,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) void XMLTableExport::ExportTableColumns( const Reference < XIndexAccess >& xtableColumnsIndexAccess, const std::shared_ptr< XMLTableInfo >& rTableInfo ) { const sal_Int32 nColumnCount = xtableColumnsIndexAccess->getCount(); - for( sal_Int32 nColumn = 0; nColumn < nColumnCount; ++nColumn ) + for( sal_Int32 nColumn = 0; nColumn < nColumnCount; ++nColumn ) { Reference< XPropertySet > xColumnProperties( xtableColumnsIndexAccess->getByIndex(nColumn) , UNO_QUERY ); if ( xColumnProperties.is() ) @@ -395,10 +396,10 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_STYLE_NAME, sStyleName ); } - // TODO: All columns first have to be checked if some ones - // have identical properties. If yes, attr table:number-columns-repeated - // has to be written. - SvXMLElementExport tableColumnElement( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_COLUMN, true, true ); + // TODO: All columns first have to be checked if some ones + // have identical properties. If yes, attr table:number-columns-repeated + // has to be written. + SvXMLElementExport tableColumnElement( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_COLUMN, true, true ); } } } @@ -467,7 +468,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) void XMLTableExport::exportTableStyles() { - if( !mbExportTables ) + if( !mbExportTables ) return; rtl::Reference<XMLStyleExport> aStEx; @@ -493,7 +494,7 @@ void XMLTableExport::exportTableStyles() void XMLTableExport::exportAutoStyles() { - if( !mbExportTables ) + if( !mbExportTables ) return; mrExport.GetAutoStylePool()->exportXML( XML_STYLE_FAMILY_TABLE_COLUMN ); @@ -553,7 +554,7 @@ static const TableStyleElement* getWriterSpecificTableStyleAttributes() void XMLTableExport::exportTableTemplates() { - if( !mbExportTables ) + if( !mbExportTables ) return; try @@ -610,7 +611,7 @@ void XMLTableExport::exportTableTemplates() mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_NAME, GetExport().EncodeStyleName(xTableStyle->getName())); } - SvXMLElementExport tableTemplate( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_TEMPLATE, true, true ); + SvXMLElementExport tableTemplate( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_TEMPLATE, true, true ); Reference< XNameAccess > xStyleNames( xTableStyle, UNO_QUERY_THROW ); pElements = getTableStyleMap(); @@ -622,7 +623,7 @@ void XMLTableExport::exportTableTemplates() if( xStyle.is() ) { mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_STYLE_NAME, GetExport().EncodeStyleName( xStyle->getName() ) ); - SvXMLElementExport element( mrExport, XML_NAMESPACE_TABLE, pElements->meElement, true, true ); + SvXMLElementExport element( mrExport, XML_NAMESPACE_TABLE, pElements->meElement, true, true ); } } catch(const Exception&) diff --git a/xmloff/source/text/XMLIndexTabStopEntryContext.cxx b/xmloff/source/text/XMLIndexTabStopEntryContext.cxx index ab547fce279d..6c39b33a74e8 100644 --- a/xmloff/source/text/XMLIndexTabStopEntryContext.cxx +++ b/xmloff/source/text/XMLIndexTabStopEntryContext.cxx @@ -149,7 +149,7 @@ void XMLIndexTabStopEntryContext::FillPropertyValues( } // tab character #i21237# - pValues[nNextEntry].Name = "WithTab"; + pValues[nNextEntry].Name = "WithTab"; pValues[nNextEntry].Value <<= bWithTab; nNextEntry++; diff --git a/xmloff/source/text/XMLIndexTableSourceContext.cxx b/xmloff/source/text/XMLIndexTableSourceContext.cxx index 3cc6d74b0966..a1a6a7bc32cd 100644 --- a/xmloff/source/text/XMLIndexTableSourceContext.cxx +++ b/xmloff/source/text/XMLIndexTableSourceContext.cxx @@ -103,11 +103,11 @@ void XMLIndexTableSourceContext::ProcessAttribute( sal_uInt16 nTmp; if (SvXMLUnitConverter::convertEnum(nTmp, rValue, lcl_aReferenceTypeTokenMap)) - { + { nDisplayFormat = nTmp; bDisplayFormatOK = true; } - break; + break; } default: diff --git a/xmloff/source/text/XMLTextNumRuleInfo.cxx b/xmloff/source/text/XMLTextNumRuleInfo.cxx index 7d7410091a42..848fae8c9ae5 100644 --- a/xmloff/source/text/XMLTextNumRuleInfo.cxx +++ b/xmloff/source/text/XMLTextNumRuleInfo.cxx @@ -181,7 +181,7 @@ void XMLTextNumRuleInfo::Set( sal_Int32 nCount = aProps.getLength(); for( sal_Int32 i=0; i<nCount; i++ ) { - const PropertyValue& rProp = pPropArray[i]; + const PropertyValue& rProp = pPropArray[i]; if ( rProp.Name == "StartWith" ) { diff --git a/xmloff/source/text/XMLTextShapeImportHelper.cxx b/xmloff/source/text/XMLTextShapeImportHelper.cxx index 59219712791b..f724fb8faf96 100644 --- a/xmloff/source/text/XMLTextShapeImportHelper.cxx +++ b/xmloff/source/text/XMLTextShapeImportHelper.cxx @@ -53,7 +53,7 @@ XMLTextShapeImportHelper::XMLTextShapeImportHelper( Reference < XDrawPageSupplier > xDPS( rImp.GetModel(), UNO_QUERY ); if( xDPS.is() ) { - Reference < XShapes > xShapes( xDPS->getDrawPage(), UNO_QUERY ); + Reference < XShapes > xShapes( xDPS->getDrawPage(), UNO_QUERY ); pushGroupForSorting( xShapes ); } diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index aa048c585485..f37f11561002 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -2077,10 +2077,10 @@ void XMLFileNameImportContext::PrepareField( Reference<XPropertySetInfo> xPropertySetInfo( xPropertySet->getPropertySetInfo()); - if (xPropertySetInfo->hasPropertyByName(sPropertyFixed)) - { + if (xPropertySetInfo->hasPropertyByName(sPropertyFixed)) + { xPropertySet->setPropertyValue(sPropertyFixed, Any(bFixed)); - } + } if (xPropertySetInfo->hasPropertyByName(sPropertyFileFormat)) { diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx index ee41e82b40be..adf236bbeb98 100644 --- a/xmloff/source/text/txtimppr.cxx +++ b/xmloff/source/text/txtimppr.cxx @@ -200,11 +200,11 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck( { aAny <<= OUString(); #if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG - sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( + sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pFontFamilyName->mnIndex + 1 ); - assert(nTmp == CTF_FONTSTYLENAME || nTmp == CTF_FONTSTYLENAME_CJK || nTmp == CTF_FONTSTYLENAME_CTL); + assert(nTmp == CTF_FONTSTYLENAME || nTmp == CTF_FONTSTYLENAME_CJK || nTmp == CTF_FONTSTYLENAME_CTL); #endif - ppNewFontStyleName->reset(new XMLPropertyState( pFontFamilyName->mnIndex + 1, + ppNewFontStyleName->reset(new XMLPropertyState( pFontFamilyName->mnIndex + 1, aAny )); } @@ -213,11 +213,11 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck( aAny <<= sal_Int16(css::awt::FontFamily::DONTKNOW); #if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG - sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( + sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pFontFamilyName->mnIndex + 2 ); - assert(nTmp == CTF_FONTFAMILY || nTmp == CTF_FONTFAMILY_CJK || nTmp == CTF_FONTFAMILY_CTL); + assert(nTmp == CTF_FONTFAMILY || nTmp == CTF_FONTFAMILY_CJK || nTmp == CTF_FONTFAMILY_CTL); #endif - ppNewFontFamily->reset(new XMLPropertyState( pFontFamilyName->mnIndex + 2, + ppNewFontFamily->reset(new XMLPropertyState( pFontFamilyName->mnIndex + 2, aAny )); } @@ -225,11 +225,11 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck( { aAny <<= sal_Int16(css::awt::FontPitch::DONTKNOW); #if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG - sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( + sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pFontFamilyName->mnIndex + 3 ); - assert(nTmp == CTF_FONTPITCH || nTmp == CTF_FONTPITCH_CJK || nTmp == CTF_FONTPITCH_CTL); + assert(nTmp == CTF_FONTPITCH || nTmp == CTF_FONTPITCH_CJK || nTmp == CTF_FONTPITCH_CTL); #endif - ppNewFontPitch->reset(new XMLPropertyState( pFontFamilyName->mnIndex + 3, + ppNewFontPitch->reset(new XMLPropertyState( pFontFamilyName->mnIndex + 3, aAny )); } @@ -237,11 +237,11 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck( { aAny <<= static_cast<sal_Int16>(osl_getThreadTextEncoding()); #if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG - sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( + sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pFontFamilyName->mnIndex + 4 ); - assert(nTmp == CTF_FONTCHARSET || nTmp == CTF_FONTCHARSET_CJK || nTmp == CTF_FONTCHARSET_CTL); + assert(nTmp == CTF_FONTCHARSET || nTmp == CTF_FONTCHARSET_CJK || nTmp == CTF_FONTCHARSET_CTL); #endif - ppNewFontCharSet->reset(new XMLPropertyState( pFontFamilyName->mnIndex + 4, + ppNewFontCharSet->reset(new XMLPropertyState( pFontFamilyName->mnIndex + 4, aAny )); } } diff --git a/xmloff/source/text/txtstyle.cxx b/xmloff/source/text/txtstyle.cxx index 103b4cc3ef40..543682d207ec 100644 --- a/xmloff/source/text/txtstyle.cxx +++ b/xmloff/source/text/txtstyle.cxx @@ -91,7 +91,7 @@ void XMLTextParagraphExport::exportStyleAttributes( { xPropSet->getPropertyValue( gsPageDescName ) >>= sName; // fix for #i5551# if( sName.getLength() > 0 ) - GetExport().AddAttribute( XML_NAMESPACE_STYLE, + GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_MASTER_PAGE_NAME, GetExport().EncodeStyleName( sName ) ); } @@ -99,7 +99,7 @@ void XMLTextParagraphExport::exportStyleAttributes( if( bProgress ) { ProgressBarHelper *pProgress = GetExport().GetProgressBarHelper(); - pProgress->SetValue( pProgress->GetValue()+2 ); + pProgress->SetValue( pProgress->GetValue()+2 ); } } diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx index 6e8aad50b037..1c3fdf367da9 100644 --- a/xmloff/source/transform/OOo2Oasis.cxx +++ b/xmloff/source/transform/OOo2Oasis.cxx @@ -1814,7 +1814,7 @@ Any OOo2OasisTransformer::queryInterface( const Type& rType ) if ( rType == cppu::UnoType<XImporter>::get()) { Reference<XImporter> xThis( this ); - aRet <<= xThis; + aRet <<= xThis; } else if ( rType == cppu::UnoType<XFilter>::get()) { diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx index 1b864ae662c1..a62f0dcee1e9 100644 --- a/xmloff/source/transform/TransformerBase.cxx +++ b/xmloff/source/transform/TransformerBase.cxx @@ -824,7 +824,7 @@ XMLMutableAttributeList *XMLTransformerBase::ProcessAttrList( XMLTransformerContext* pFirstContext = m_vContexts[0].get(); OUString aFirstContextLocalName; /* sal_uInt16 nFirstContextPrefix = */ - GetNamespaceMap().GetKeyByAttrName( pFirstContext->GetQName(), + GetNamespaceMap().GetKeyByAttrName( pFirstContext->GetQName(), &aFirstContextLocalName ); bool bIsDocumentStyle( ::xmloff::token::IsXMLToken( aFirstContextLocalName, |