From c927d6daa9a6403c53cc41b1ab4dde820f08f387 Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Thu, 12 Nov 2020 13:29:07 +0100 Subject: tdf#123936 Formatting files in module xmloff with clang-format Change-Id: I4d9016a0e646da5d9f0044762f6ecce86ce1242b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105732 Reviewed-by: Christian Lohmaier Tested-by: Christian Lohmaier --- xmloff/inc/MultiPropertySetHelper.hxx | 62 +++++++++++----------- xmloff/inc/PropertySetMerger.hxx | 7 ++- xmloff/inc/XMLTextColumnsExport.hxx | 13 ++--- xmloff/inc/animimp.hxx | 9 ++-- xmloff/inc/forms/form_handler_factory.hxx | 13 +++-- xmloff/inc/xmltabi.hxx | 13 +++-- xmloff/source/chart/SchXMLEnumConverter.hxx | 4 +- .../source/chart/XMLErrorBarStylePropertyHdl.hxx | 5 +- xmloff/source/chart/XMLLabelSeparatorContext.hxx | 14 ++--- xmloff/source/draw/XMLNumberStylesExport.hxx | 8 +-- xmloff/source/draw/ximpnote.cxx | 35 ++++++------ xmloff/source/forms/formenums.hxx | 27 +++++----- xmloff/source/forms/formevents.hxx | 7 ++- xmloff/source/script/XMLScriptContextFactory.cxx | 22 +++----- xmloff/source/style/StyleMap.cxx | 8 +-- xmloff/source/style/xmlprhdl.cxx | 4 +- xmloff/source/text/XMLAutoTextEventImport.cxx | 21 +++----- xmloff/source/text/txtdropi.hxx | 15 ++---- xmloff/source/text/txtprhdl.hxx | 4 +- xmloff/source/transform/DocumentTContext.hxx | 6 +-- xmloff/source/transform/EventMap.hxx | 4 +- xmloff/source/transform/TransformerTokenMap.hxx | 5 +- 22 files changed, 139 insertions(+), 167 deletions(-) (limited to 'xmloff') diff --git a/xmloff/inc/MultiPropertySetHelper.hxx b/xmloff/inc/MultiPropertySetHelper.hxx index ee996422e2e3..65e378bd7a2d 100644 --- a/xmloff/inc/MultiPropertySetHelper.hxx +++ b/xmloff/inc/MultiPropertySetHelper.hxx @@ -23,13 +23,21 @@ #include #include - -namespace com::sun::star { - namespace beans { class XMultiPropertySet; } - namespace beans { class XPropertySet; } - namespace beans { class XPropertySetInfo; } +namespace com::sun::star +{ +namespace beans +{ +class XMultiPropertySet; +} +namespace beans +{ +class XPropertySet; +} +namespace beans +{ +class XPropertySetInfo; +} } - /** * The MultiPropertySetHelper performs the following functions: @@ -62,14 +70,14 @@ class MultiPropertySetHelper /// the sequence of property names that the current (multi) /// property set implementation supports - css::uno::Sequence< OUString > aPropertySequence; + css::uno::Sequence aPropertySequence; /// an array of indices that maps from pPropertyNames indices to /// aPropertySequence indices std::unique_ptr pSequenceIndex; /// the last set of values retrieved by getValues - css::uno::Sequence< css::uno::Any > aValues; + css::uno::Sequence aValues; /// result of aValues.getConstArray() const css::uno::Any* pValues; @@ -78,18 +86,15 @@ class MultiPropertySetHelper css::uno::Any aEmptyAny; public: - - MultiPropertySetHelper( const char** pNames ); + MultiPropertySetHelper(const char** pNames); ~MultiPropertySetHelper(); - /** * Call hasPropertiesByName for the provided XPropertySetInfo and build * list of allowed properties. */ - void hasProperties( const css::uno::Reference & ); - + void hasProperties(const css::uno::Reference&); /** * Return whether hasProperties was called @@ -103,7 +108,7 @@ public: * May only be called after hasProperties() was called for the * appropriate XPropertySetInfo. */ - void getValues( const css::uno::Reference & ); + void getValues(const css::uno::Reference&); /** * Get values from the XPropertySet. This can be much slower than @@ -113,22 +118,21 @@ public: * May only be called after hasProperties() was called for the * appropriate XPropertySetInfo. */ - void getValues( const css::uno::Reference & ); - + void getValues(const css::uno::Reference&); /** * Get a value from the values array. * * May only be called after getValues() was called. */ - inline const css::uno::Any& getValue( sal_Int16 nIndex ); + inline const css::uno::Any& getValue(sal_Int16 nIndex); /** * Find out if this property is supported. * * May only be called after hasProperties() was called. */ - inline bool hasProperty( sal_Int16 nIndex ); + inline bool hasProperty(sal_Int16 nIndex); /** * Get a value from the XPropertySet on demand. @@ -140,9 +144,9 @@ public: * bTryMult is set, the XMultiPropertySet is used to get the values. * */ - const css::uno::Any& getValue( sal_Int16 nIndex, - const css::uno::Reference &, - bool bTryMulti = false ); + const css::uno::Any& getValue(sal_Int16 nIndex, + const css::uno::Reference&, + bool bTryMulti = false); /** * Get a value from the XMultiPropertySet on demand. @@ -154,32 +158,30 @@ public: * XMultiPropertySet is used to get the values. * */ - const css::uno::Any& getValue( sal_Int16 nIndex, - const css::uno::Reference & ); + const css::uno::Any& getValue(sal_Int16 nIndex, + const css::uno::Reference&); void resetValues() { pValues = nullptr; } }; - // inline implementations of the often-called methods getValue and hasProperty: -const css::uno::Any& MultiPropertySetHelper::getValue( - sal_Int16 nValueNo ) +const css::uno::Any& MultiPropertySetHelper::getValue(sal_Int16 nValueNo) { assert(pValues && "called getValue() without calling getValues()"); assert(pSequenceIndex && "called getValue() without calling hasProperties()"); assert(nValueNo < nLength); - sal_Int16 nIndex = pSequenceIndex[ nValueNo ]; - return ( nIndex != -1 ) ? pValues[ nIndex ] : aEmptyAny; + sal_Int16 nIndex = pSequenceIndex[nValueNo]; + return (nIndex != -1) ? pValues[nIndex] : aEmptyAny; } -bool MultiPropertySetHelper::hasProperty( sal_Int16 nValueNo ) +bool MultiPropertySetHelper::hasProperty(sal_Int16 nValueNo) { assert(pSequenceIndex && "called hasProperty() without calling hasProperties()"); assert(nValueNo < nLength); - return pSequenceIndex[ nValueNo ] != -1; + return pSequenceIndex[nValueNo] != -1; } #endif diff --git a/xmloff/inc/PropertySetMerger.hxx b/xmloff/inc/PropertySetMerger.hxx index 22ec387fa0b9..26b076b4972b 100644 --- a/xmloff/inc/PropertySetMerger.hxx +++ b/xmloff/inc/PropertySetMerger.hxx @@ -22,10 +22,9 @@ #include -extern css::uno::Reference< css::beans::XPropertySet > - PropertySetMerger_CreateInstance( - const css::uno::Reference< css::beans::XPropertySet >& rPropSet1, - const css::uno::Reference< css::beans::XPropertySet >& rPropSet2 ) throw(); +extern css::uno::Reference PropertySetMerger_CreateInstance( + const css::uno::Reference& rPropSet1, + const css::uno::Reference& rPropSet2) throw(); #endif diff --git a/xmloff/inc/XMLTextColumnsExport.hxx b/xmloff/inc/XMLTextColumnsExport.hxx index a21f96125ff9..d407aee40f21 100644 --- a/xmloff/inc/XMLTextColumnsExport.hxx +++ b/xmloff/inc/XMLTextColumnsExport.hxx @@ -21,23 +21,24 @@ #include -namespace com::sun::star::uno { class Any; } +namespace com::sun::star::uno +{ +class Any; +} class SvXMLExport; class XMLTextColumnsExport { - SvXMLExport& rExport; + SvXMLExport& rExport; SvXMLExport& GetExport() { return rExport; } public: + XMLTextColumnsExport(SvXMLExport& rExport); - XMLTextColumnsExport( SvXMLExport& rExport ); - - void exportXML( const css::uno::Any& rAny ); + void exportXML(const css::uno::Any& rAny); }; - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/inc/animimp.hxx b/xmloff/inc/animimp.hxx index f187ac411e62..f526af6fb07b 100644 --- a/xmloff/inc/animimp.hxx +++ b/xmloff/inc/animimp.hxx @@ -30,13 +30,14 @@ class XMLAnimationsContext final : public SvXMLImportContext { public: - css::uno::Reference< css::beans::XPropertySet > mxLastShape; + css::uno::Reference mxLastShape; OUString maLastShapeId; - XMLAnimationsContext( SvXMLImport& rImport); + XMLAnimationsContext(SvXMLImport& rImport); - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( - sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override; + virtual css::uno::Reference SAL_CALL createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference& AttrList) override; }; #endif // INCLUDED_XMLOFF_INC_ANIMIMP_HXX diff --git a/xmloff/inc/forms/form_handler_factory.hxx b/xmloff/inc/forms/form_handler_factory.hxx index 0ee97e631edc..5f33b23dda03 100644 --- a/xmloff/inc/forms/form_handler_factory.hxx +++ b/xmloff/inc/forms/form_handler_factory.hxx @@ -24,13 +24,12 @@ namespace xmloff { - - //= FormHandlerFactory - class FormHandlerFactory - { - public: - static PPropertyHandler getFormPropertyHandler( const PropertyId i_propertyId ); - }; +//= FormHandlerFactory +class FormHandlerFactory +{ +public: + static PPropertyHandler getFormPropertyHandler(const PropertyId i_propertyId); +}; } // namespace xmloff diff --git a/xmloff/inc/xmltabi.hxx b/xmloff/inc/xmltabi.hxx index bc51546cdd4a..809c257de9ef 100644 --- a/xmloff/inc/xmltabi.hxx +++ b/xmloff/inc/xmltabi.hxx @@ -35,18 +35,17 @@ private: std::unique_ptr mpTabStops; public: + SvxXMLTabStopImportContext(SvXMLImport& rImport, sal_Int32 nElement, + const XMLPropertyState& rProp, + ::std::vector& rProps); - SvxXMLTabStopImportContext( SvXMLImport& rImport, sal_Int32 nElement, - const XMLPropertyState& rProp, - ::std::vector< XMLPropertyState > &rProps ); - - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( - sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override; + virtual css::uno::Reference SAL_CALL createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference& AttrList) override; virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; }; - #endif // INCLUDED_XMLOFF_INC_XMLTABI_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLEnumConverter.hxx b/xmloff/source/chart/SchXMLEnumConverter.hxx index b3a5e79c60c0..b17e560fe0db 100644 --- a/xmloff/source/chart/SchXMLEnumConverter.hxx +++ b/xmloff/source/chart/SchXMLEnumConverter.hxx @@ -24,8 +24,8 @@ class SchXMLEnumConverter { public: - static XMLEnumPropertyHdl& getLegendPositionConverter();//returns a singleton - static XMLEnumPropertyHdl& getLegendExpansionConverter();//returns a singleton + static XMLEnumPropertyHdl& getLegendPositionConverter(); //returns a singleton + static XMLEnumPropertyHdl& getLegendExpansionConverter(); //returns a singleton }; #endif // INCLUDED_XMLOFF_SOURCE_CHART_SCHXMLENUMCONVERTER_HXX diff --git a/xmloff/source/chart/XMLErrorBarStylePropertyHdl.hxx b/xmloff/source/chart/XMLErrorBarStylePropertyHdl.hxx index dfe6354c716f..57530f638963 100644 --- a/xmloff/source/chart/XMLErrorBarStylePropertyHdl.hxx +++ b/xmloff/source/chart/XMLErrorBarStylePropertyHdl.hxx @@ -24,10 +24,11 @@ class XMLErrorBarStylePropertyHdl : public XMLEnumPropertyHdl { public: - XMLErrorBarStylePropertyHdl( const SvXMLEnumMapEntry* pEnumMap ); + XMLErrorBarStylePropertyHdl(const SvXMLEnumMapEntry* pEnumMap); virtual ~XMLErrorBarStylePropertyHdl() override; - virtual bool exportXML( OUString& rStrExpValue, const css::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const override; + virtual bool exportXML(OUString& rStrExpValue, const css::uno::Any& rValue, + const SvXMLUnitConverter& rUnitConverter) const override; }; #endif // INCLUDED_XMLOFF_SOURCE_CHART_XMLERRORBARSTYLEPROPERTYHDL_HXX diff --git a/xmloff/source/chart/XMLLabelSeparatorContext.hxx b/xmloff/source/chart/XMLLabelSeparatorContext.hxx index fc1451923686..d7d8928c82f1 100644 --- a/xmloff/source/chart/XMLLabelSeparatorContext.hxx +++ b/xmloff/source/chart/XMLLabelSeparatorContext.hxx @@ -24,18 +24,18 @@ class XMLLabelSeparatorContext : public XMLElementPropertyContext { public: - - XMLLabelSeparatorContext( SvXMLImport& rImport, sal_Int32 nElement, - const XMLPropertyState& rProp, - ::std::vector< XMLPropertyState > &rProps ); + XMLLabelSeparatorContext(SvXMLImport& rImport, sal_Int32 nElement, + const XMLPropertyState& rProp, + ::std::vector& rProps); virtual ~XMLLabelSeparatorContext() override; - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( - sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override; + virtual css::uno::Reference SAL_CALL createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference& AttrList) override; virtual void SAL_CALL endFastElement(sal_Int32 nElement) override; private: - OUString m_aSeparator; + OUString m_aSeparator; }; #endif // INCLUDED_XMLOFF_SOURCE_CHART_XMLLABELSEPARATORCONTEXT_HXX diff --git a/xmloff/source/draw/XMLNumberStylesExport.hxx b/xmloff/source/draw/XMLNumberStylesExport.hxx index 7d1f062dfdf3..6e196775e98b 100644 --- a/xmloff/source/draw/XMLNumberStylesExport.hxx +++ b/xmloff/source/draw/XMLNumberStylesExport.hxx @@ -31,11 +31,11 @@ const sal_Int16 SdXMLTimeFormatCount = 7; class SdXMLNumberStylesExporter { public: - static void exportTimeStyle( SdXMLExport& rExport, sal_Int32 nStyle ); - static void exportDateStyle( SdXMLExport& rExport, sal_Int32 nStyle ); + static void exportTimeStyle(SdXMLExport& rExport, sal_Int32 nStyle); + static void exportDateStyle(SdXMLExport& rExport, sal_Int32 nStyle); - static OUString getTimeStyleName(const sal_Int32 nTimeFormat ); - static OUString getDateStyleName(const sal_Int32 nDateFormat ); + static OUString getTimeStyleName(const sal_Int32 nTimeFormat); + static OUString getDateStyleName(const sal_Int32 nDateFormat); }; #endif // INCLUDED_XMLOFF_SOURCE_DRAW_XMLNUMBERSTYLESEXPORT_HXX diff --git a/xmloff/source/draw/ximpnote.cxx b/xmloff/source/draw/ximpnote.cxx index 3018bbda5c67..d855e85bf4ad 100644 --- a/xmloff/source/draw/ximpnote.cxx +++ b/xmloff/source/draw/ximpnote.cxx @@ -23,17 +23,17 @@ using namespace ::com::sun::star; using namespace ::xmloff::token; -SdXMLNotesContext::SdXMLNotesContext( SdXMLImport& rImport, - const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList, - uno::Reference< drawing::XShapes > const & rShapes) -: SdXMLGenericPageContext( rImport, xAttrList, rShapes ) +SdXMLNotesContext::SdXMLNotesContext( + SdXMLImport& rImport, const css::uno::Reference& xAttrList, + uno::Reference const& rShapes) + : SdXMLGenericPageContext(rImport, xAttrList, rShapes) { OUString sStyleName, sPageMasterName; - for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList )) + for (auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList)) { OUString sValue = aIter.toString(); - switch(aIter.getToken()) + switch (aIter.getToken()) { case XML_ELEMENT(STYLE, XML_PAGE_LAYOUT_NAME): { @@ -49,47 +49,44 @@ SdXMLNotesContext::SdXMLNotesContext( SdXMLImport& rImport, case XML_ELEMENT(PRESENTATION_SO52, XML_USE_HEADER_NAME): case XML_ELEMENT(PRESENTATION_OOO, XML_USE_HEADER_NAME): { - maUseHeaderDeclName = sValue; + maUseHeaderDeclName = sValue; break; } case XML_ELEMENT(PRESENTATION, XML_USE_FOOTER_NAME): case XML_ELEMENT(PRESENTATION_SO52, XML_USE_FOOTER_NAME): case XML_ELEMENT(PRESENTATION_OOO, XML_USE_FOOTER_NAME): { - maUseFooterDeclName = sValue; + maUseFooterDeclName = sValue; break; } case XML_ELEMENT(PRESENTATION, XML_USE_DATE_TIME_NAME): case XML_ELEMENT(PRESENTATION_SO52, XML_USE_DATE_TIME_NAME): case XML_ELEMENT(PRESENTATION_OOO, XML_USE_DATE_TIME_NAME): { - maUseDateTimeDeclName = sValue; + maUseDateTimeDeclName = sValue; break; } - } } - SetStyle( sStyleName ); + SetStyle(sStyleName); // now delete all up-to-now contained shapes from this notes page - uno::Reference< drawing::XShape > xShape; - while(rShapes->getCount()) + uno::Reference xShape; + while (rShapes->getCount()) { rShapes->getByIndex(0) >>= xShape; - if(xShape.is()) + if (xShape.is()) rShapes->remove(xShape); } // set page-master? - if(!sPageMasterName.isEmpty()) + if (!sPageMasterName.isEmpty()) { - SetPageMaster( sPageMasterName ); + SetPageMaster(sPageMasterName); } } -SdXMLNotesContext::~SdXMLNotesContext() -{ -} +SdXMLNotesContext::~SdXMLNotesContext() {} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/forms/formenums.hxx b/xmloff/source/forms/formenums.hxx index cc63e961f270..a1860b75137c 100644 --- a/xmloff/source/forms/formenums.hxx +++ b/xmloff/source/forms/formenums.hxx @@ -31,27 +31,26 @@ namespace xmloff { - extern const SvXMLEnumMapEntry aSubmitEncodingMap[]; -extern const SvXMLEnumMapEntry aSubmitMethodMap[]; -extern const SvXMLEnumMapEntry aCommandTypeMap[]; -extern const SvXMLEnumMapEntry aNavigationTypeMap[]; -extern const SvXMLEnumMapEntry aTabulatorCycleMap[]; -extern const SvXMLEnumMapEntry aFormButtonTypeMap[]; -extern const SvXMLEnumMapEntry aListSourceTypeMap[]; -extern const SvXMLEnumMapEntry aCheckStateMap[]; -extern const SvXMLEnumMapEntry aTextAlignMap[]; +extern const SvXMLEnumMapEntry aSubmitMethodMap[]; +extern const SvXMLEnumMapEntry aCommandTypeMap[]; +extern const SvXMLEnumMapEntry aNavigationTypeMap[]; +extern const SvXMLEnumMapEntry aTabulatorCycleMap[]; +extern const SvXMLEnumMapEntry aFormButtonTypeMap[]; +extern const SvXMLEnumMapEntry aListSourceTypeMap[]; +extern const SvXMLEnumMapEntry aCheckStateMap[]; +extern const SvXMLEnumMapEntry aTextAlignMap[]; extern const SvXMLEnumMapEntry aBorderTypeMap[]; extern const SvXMLEnumMapEntry aFontEmphasisMap[]; extern const SvXMLEnumMapEntry aFontReliefMap[]; -extern const SvXMLEnumMapEntry aListLinkageMap[]; -extern const SvXMLEnumMapEntry aOrientationMap[]; -extern const SvXMLEnumMapEntry aVisualEffectMap[]; -extern const SvXMLEnumMapEntry aImagePositionMap[]; +extern const SvXMLEnumMapEntry aListLinkageMap[]; +extern const SvXMLEnumMapEntry aOrientationMap[]; +extern const SvXMLEnumMapEntry aVisualEffectMap[]; +extern const SvXMLEnumMapEntry aImagePositionMap[]; extern const SvXMLEnumMapEntry aImageAlignMap[]; extern const SvXMLEnumMapEntry aScaleModeMap[]; -} // namespace xmloff +} // namespace xmloff #endif // INCLUDED_XMLOFF_SOURCE_FORMS_FORMENUMS_HXX diff --git a/xmloff/source/forms/formevents.hxx b/xmloff/source/forms/formevents.hxx index 131ec338c870..18d02448ec8c 100644 --- a/xmloff/source/forms/formevents.hxx +++ b/xmloff/source/forms/formevents.hxx @@ -23,11 +23,10 @@ struct XMLEventNameTranslation; namespace xmloff { +//= event translation table +extern const XMLEventNameTranslation* g_pFormsEventTranslation; - //= event translation table - extern const XMLEventNameTranslation* g_pFormsEventTranslation; - -} // namespace xmloff +} // namespace xmloff #endif // INCLUDED_XMLOFF_SOURCE_FORMS_FORMEVENTS_HXX diff --git a/xmloff/source/script/XMLScriptContextFactory.cxx b/xmloff/source/script/XMLScriptContextFactory.cxx index da16657efd5c..1792b88d2207 100644 --- a/xmloff/source/script/XMLScriptContextFactory.cxx +++ b/xmloff/source/script/XMLScriptContextFactory.cxx @@ -24,7 +24,6 @@ #include #include - using namespace ::xmloff::token; using ::com::sun::star::xml::sax::XAttributeList; @@ -36,19 +35,13 @@ constexpr OUStringLiteral gsEventType(u"EventType"); constexpr OUStringLiteral gsScript(u"Script"); constexpr OUStringLiteral gsURL(u"Script"); -XMLScriptContextFactory::XMLScriptContextFactory() -{ -} +XMLScriptContextFactory::XMLScriptContextFactory() {} -XMLScriptContextFactory::~XMLScriptContextFactory() -{ -} +XMLScriptContextFactory::~XMLScriptContextFactory() {} -SvXMLImportContext * XMLScriptContextFactory::CreateContext -(SvXMLImport & rImport, - const Reference & xAttrList, - XMLEventsImportContext * rEvents, - const OUString & rApiEventName) +SvXMLImportContext* XMLScriptContextFactory::CreateContext( + SvXMLImport& rImport, const Reference& xAttrList, + XMLEventsImportContext* rEvents, const OUString& rApiEventName) { OUString sURLVal; @@ -56,8 +49,8 @@ SvXMLImportContext * XMLScriptContextFactory::CreateContext for (sal_Int16 nAttr = 0; nAttr < nCount; nAttr++) { OUString sLocalName; - sal_uInt16 nPrefix = rImport.GetNamespaceMap(). - GetKeyByAttrName(xAttrList->getNameByIndex(nAttr), &sLocalName); + sal_uInt16 nPrefix = rImport.GetNamespaceMap().GetKeyByAttrName( + xAttrList->getNameByIndex(nAttr), &sLocalName); if (XML_NAMESPACE_XLINK == nPrefix) { @@ -85,5 +78,4 @@ SvXMLImportContext * XMLScriptContextFactory::CreateContext return new SvXMLImportContext(rImport); } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/StyleMap.cxx b/xmloff/source/style/StyleMap.cxx index 6fbac08717f2..1d52ea112374 100644 --- a/xmloff/source/style/StyleMap.cxx +++ b/xmloff/source/style/StyleMap.cxx @@ -22,13 +22,9 @@ using namespace css::uno; using namespace css::lang; -StyleMap::StyleMap() -{ -} +StyleMap::StyleMap() {} -StyleMap::~StyleMap() -{ -} +StyleMap::~StyleMap() {} // XUnoTunnel & co UNO3_GETIMPLEMENTATION_IMPL(StyleMap); diff --git a/xmloff/source/style/xmlprhdl.cxx b/xmloff/source/style/xmlprhdl.cxx index 2b9d7b6558e7..530bcd479321 100644 --- a/xmloff/source/style/xmlprhdl.cxx +++ b/xmloff/source/style/xmlprhdl.cxx @@ -22,10 +22,10 @@ XMLPropertyHandler::~XMLPropertyHandler() { - // does nothing + // does nothing } -bool XMLPropertyHandler::equals( const css::uno::Any& r1, const css::uno::Any& r2 ) const +bool XMLPropertyHandler::equals(const css::uno::Any& r1, const css::uno::Any& r2) const { return (r1 == r2); } diff --git a/xmloff/source/text/XMLAutoTextEventImport.cxx b/xmloff/source/text/XMLAutoTextEventImport.cxx index 3b17e654c13e..09cce6ffd0ae 100644 --- a/xmloff/source/text/XMLAutoTextEventImport.cxx +++ b/xmloff/source/text/XMLAutoTextEventImport.cxx @@ -41,24 +41,21 @@ using ::com::sun::star::lang::XMultiServiceFactory; using ::xmloff::token::XML_AUTO_TEXT_EVENTS; XMLAutoTextEventImport::XMLAutoTextEventImport( - const css::uno::Reference< css::uno::XComponentContext >& xContext) -: SvXMLImport(xContext, "") + const css::uno::Reference& xContext) + : SvXMLImport(xContext, "") { } -XMLAutoTextEventImport::~XMLAutoTextEventImport() throw() -{ -} +XMLAutoTextEventImport::~XMLAutoTextEventImport() throw() {} -void XMLAutoTextEventImport::initialize( - const Sequence & rArguments ) +void XMLAutoTextEventImport::initialize(const Sequence& rArguments) { // The events may come as either an XNameReplace or XEventsSupplier. - for( const auto& rArgument : rArguments ) + for (const auto& rArgument : rArguments) { const Type& rType = rArgument.getValueType(); - if ( rType == cppu::UnoType::get()) + if (rType == cppu::UnoType::get()) { Reference xSupplier; rArgument >>= xSupplier; @@ -77,12 +74,10 @@ void XMLAutoTextEventImport::initialize( SvXMLImport::initialize(rArguments); } - SvXMLImportContext* XMLAutoTextEventImport::CreateFastContext( - sal_Int32 nElement, - const Reference & /*xAttrList*/ ) + sal_Int32 nElement, const Reference& /*xAttrList*/) { - if ( xEvents.is() && nElement == XML_ELEMENT(OOO, XML_AUTO_TEXT_EVENTS) ) + if (xEvents.is() && nElement == XML_ELEMENT(OOO, XML_AUTO_TEXT_EVENTS)) { return new XMLAutoTextContainerEventImport(*this, xEvents); } diff --git a/xmloff/source/text/txtdropi.hxx b/xmloff/source/text/txtdropi.hxx index 9ddefc812d2b..09e9d979bd8e 100644 --- a/xmloff/source/text/txtdropi.hxx +++ b/xmloff/source/text/txtdropi.hxx @@ -22,24 +22,20 @@ #include - -class XMLTextDropCapImportContext :public XMLElementPropertyContext +class XMLTextDropCapImportContext : public XMLElementPropertyContext { XMLPropertyState aWholeWordProp; OUString sStyleName; private: - void ProcessAttrs( - const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ); + void ProcessAttrs(const css::uno::Reference& xAttrList); public: - XMLTextDropCapImportContext( SvXMLImport& rImport, sal_Int32 nElement, - const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList, - const XMLPropertyState& rProp, - sal_Int32 nWholeWOrdIdx, - ::std::vector< XMLPropertyState > &rProps ); + const css::uno::Reference& xAttrList, + const XMLPropertyState& rProp, sal_Int32 nWholeWOrdIdx, + ::std::vector& rProps); virtual ~XMLTextDropCapImportContext() override; @@ -48,7 +44,6 @@ public: const OUString& GetStyleName() const { return sStyleName; } }; - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtprhdl.hxx b/xmloff/source/text/txtprhdl.hxx index 6b1703f16eaa..98825e1bfc59 100644 --- a/xmloff/source/text/txtprhdl.hxx +++ b/xmloff/source/text/txtprhdl.hxx @@ -19,16 +19,14 @@ #ifndef INCLUDED_XMLOFF_SOURCE_TEXT_TXTPRHDL_HXX #define INCLUDED_XMLOFF_SOURCE_TEXT_TXTPRHDL_HXX - #include class XMLTextPropertyHandlerFactory : public XMLPropertyHandlerFactory { public: - XMLTextPropertyHandlerFactory(); - virtual const XMLPropertyHandler* GetPropertyHandler( sal_Int32 nType ) const override ; + virtual const XMLPropertyHandler* GetPropertyHandler(sal_Int32 nType) const override; }; #endif diff --git a/xmloff/source/transform/DocumentTContext.hxx b/xmloff/source/transform/DocumentTContext.hxx index 24368170d7a0..0b71cd9c829d 100644 --- a/xmloff/source/transform/DocumentTContext.hxx +++ b/xmloff/source/transform/DocumentTContext.hxx @@ -29,13 +29,13 @@ public: // starts. Namespace processing has been done already. // Note that virtual methods cannot be used inside constructors. Use // StartElement instead if this is required. - XMLDocumentTransformerContext( XMLTransformerBase& rTransformer, - const OUString& rQName ); + XMLDocumentTransformerContext(XMLTransformerBase& rTransformer, const OUString& rQName); // StartElement is called after a context has been constructed and // before an elements context is parsed. It may be used for actions that // require virtual methods. The default is to do nothing. - virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; + virtual void + StartElement(const css::uno::Reference& xAttrList) override; }; #endif // INCLUDED_XMLOFF_SOURCE_TRANSFORM_DOCUMENTTCONTEXT_HXX diff --git a/xmloff/source/transform/EventMap.hxx b/xmloff/source/transform/EventMap.hxx index 9584e6eebd9a..4237eb2ebd56 100644 --- a/xmloff/source/transform/EventMap.hxx +++ b/xmloff/source/transform/EventMap.hxx @@ -25,8 +25,8 @@ struct XMLTransformerEventMapEntry { sal_uInt16 const m_nOASISPrefix; - const char *m_pOASISName; - const char *m_pOOoName; + const char* m_pOASISName; + const char* m_pOOoName; }; extern XMLTransformerEventMapEntry const aTransformerEventMap[]; diff --git a/xmloff/source/transform/TransformerTokenMap.hxx b/xmloff/source/transform/TransformerTokenMap.hxx index 6e760fb8aa3c..e62555d5c753 100644 --- a/xmloff/source/transform/TransformerTokenMap.hxx +++ b/xmloff/source/transform/TransformerTokenMap.hxx @@ -24,11 +24,10 @@ #include #include -class XMLTransformerTokenMap : - public std::unordered_map< OUString, ::xmloff::token::XMLTokenEnum > +class XMLTransformerTokenMap : public std::unordered_map { public: - explicit XMLTransformerTokenMap( ::xmloff::token::XMLTokenEnum const *pInit ); + explicit XMLTransformerTokenMap(::xmloff::token::XMLTokenEnum const* pInit); }; #endif // INCLUDED_XMLOFF_SOURCE_TRANSFORM_TRANSFORMERTOKENMAP_HXX -- cgit