diff options
Diffstat (limited to 'xmloff/source')
59 files changed, 453 insertions, 18 deletions
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx index 931983bc8c01..766f2f5e81a3 100644 --- a/xmloff/source/chart/SchXMLAxisContext.cxx +++ b/xmloff/source/chart/SchXMLAxisContext.cxx @@ -70,6 +70,8 @@ static const SvXMLEnumMapEntry<sal_uInt16> aXMLAxisTypeMap[] = { XML_TOKEN_INVALID, 0 } }; +namespace { + class SchXMLCategoriesContext : public SvXMLImportContext { private: @@ -96,6 +98,8 @@ private: Reference< beans::XPropertySet > m_xAxisProps; }; +} + SchXMLAxisContext::SchXMLAxisContext( SchXMLImportHelper& rImpHelper, SvXMLImport& rImport, const OUString& rLocalName, Reference< chart::XDiagram > const & xDiagram, diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index d94732c7e4b0..337a322fc469 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -919,8 +919,6 @@ bool lcl_exportDomainForThisSequence( const Reference< chart2::data::XDataSequen return bDomainExported; } -} // anonymous namespace - struct SchXMLDataPointStruct { OUString maStyleName; @@ -929,6 +927,8 @@ struct SchXMLDataPointStruct SchXMLDataPointStruct() : mnRepeat( 1 ) {} }; +} // anonymous namespace + // class SchXMLExportHelper SchXMLExportHelper::SchXMLExportHelper( SvXMLExport& rExport, SvXMLAutoStylePoolP& rASPool ) diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index 8b47555ccbb3..11cea543d7d7 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -497,6 +497,8 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib } } +namespace { + struct DomainInfo { DomainInfo( const OUString& rRole, const OUString& rRange, sal_Int32 nIndex ) @@ -508,6 +510,8 @@ struct DomainInfo sal_Int32 nIndexForLocalData; }; +} + void SchXMLSeries2Context::EndElement() { // special handling for different chart types. This is necessary as the diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index cb4a7e789793..ca52090960cc 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -559,6 +559,8 @@ SvXMLImportContextRef SchXMLTableRowContext::CreateChildContext( return pContext; } +namespace { + class SchXMLRangeSomewhereContext : public SvXMLImportContext { //#i113950# previously the range was exported to attribute text:id, @@ -583,6 +585,8 @@ public: virtual void EndElement() override; }; +} + // classes for cells and their content // class SchXMLTableCellContext SchXMLTableCellContext::SchXMLTableCellContext( diff --git a/xmloff/source/chart/SchXMLTextListContext.cxx b/xmloff/source/chart/SchXMLTextListContext.cxx index b2da8f6ad6f8..7f65edb2cd30 100644 --- a/xmloff/source/chart/SchXMLTextListContext.cxx +++ b/xmloff/source/chart/SchXMLTextListContext.cxx @@ -28,6 +28,8 @@ using ::com::sun::star::uno::Reference; using namespace com::sun::star; using namespace ::xmloff::token; +namespace { + class SchXMLListItemContext : public SvXMLImportContext { public: @@ -45,6 +47,8 @@ private: OUString& m_rText; }; +} + SchXMLListItemContext::SchXMLListItemContext( SvXMLImport& rImport , const OUString& rLocalName diff --git a/xmloff/source/chart/contexts.cxx b/xmloff/source/chart/contexts.cxx index c0cf395a0a1d..62bebf34ded9 100644 --- a/xmloff/source/chart/contexts.cxx +++ b/xmloff/source/chart/contexts.cxx @@ -31,6 +31,8 @@ using namespace com::sun::star; using namespace ::xmloff::token; +namespace { + class SchXMLBodyContext_Impl : public SvXMLImportContext { private: @@ -47,6 +49,8 @@ public: const uno::Reference< xml::sax::XAttributeList > & xAttrList ) override; }; +} + SchXMLBodyContext_Impl::SchXMLBodyContext_Impl( SchXMLImportHelper& rImpHelper, SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName ) : diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index 59c61614e6d8..6f8b9788d082 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.cxx @@ -51,6 +51,8 @@ using namespace com::sun::star; using namespace ::xmloff::token; +namespace { + class XMLMyList { std::vector<beans::PropertyValue> aProps; @@ -67,6 +69,8 @@ public: uno::Reference<container::XIndexContainer> GetIndexContainer(); }; +} + XMLMyList::XMLMyList(const uno::Reference<uno::XComponentContext>& rxContext) : nCount(0), m_xContext(rxContext) @@ -115,6 +119,8 @@ uno::Reference<container::XIndexContainer> XMLMyList::GetIndexContainer() return xIndexContainer; } +namespace { + class XMLConfigBaseContext : public SvXMLImportContext { protected: @@ -206,6 +212,8 @@ public: virtual void EndElement() override; }; +} + static SvXMLImportContext *CreateSettingsContext(SvXMLImport& rImport, sal_uInt16 p_nPrefix, const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList, diff --git a/xmloff/source/core/DomExport.cxx b/xmloff/source/core/DomExport.cxx index d437f2617c6d..1a16a155a3fc 100644 --- a/xmloff/source/core/DomExport.cxx +++ b/xmloff/source/core/DomExport.cxx @@ -46,6 +46,7 @@ using std::vector; using namespace com::sun::star::xml::dom; +namespace { class DomVisitor { @@ -57,6 +58,8 @@ public: virtual void endElement( const Reference<XElement>& ) {} }; +} + static void visit( DomVisitor&, const Reference<XDocument>& ); static void visit( DomVisitor&, const Reference<XNode>& ); @@ -115,6 +118,7 @@ void visit( DomVisitor& rVisitor, const Reference<XNode>& xNode ) rVisitor.endElement( Reference<XElement>( xNode, UNO_QUERY_THROW ) ); } +namespace { class DomExport: public DomVisitor { @@ -139,6 +143,8 @@ public: virtual void character( const Reference<XCharacterData>& ) override; }; +} + DomExport::DomExport( SvXMLExport& rExport ) : mrExport( rExport ) { diff --git a/xmloff/source/core/PropertySetMerger.cxx b/xmloff/source/core/PropertySetMerger.cxx index 7aeff6cc1b8f..812201024c86 100644 --- a/xmloff/source/core/PropertySetMerger.cxx +++ b/xmloff/source/core/PropertySetMerger.cxx @@ -28,6 +28,8 @@ using namespace ::com::sun::star::lang; #include <comphelper/sequence.hxx> #include <cppuhelper/implbase3.hxx> +namespace { + class PropertySetMergerImpl : public ::cppu::WeakAggImplHelper3< XPropertySet, XPropertyState, XPropertySetInfo > { private: @@ -63,6 +65,8 @@ public: virtual sal_Bool SAL_CALL hasPropertyByName( const OUString& Name ) override; }; +} + // Interface implementation PropertySetMergerImpl::PropertySetMergerImpl( Reference< XPropertySet > const & rPropSet1, Reference< XPropertySet > const & rPropSet2 ) diff --git a/xmloff/source/core/RDFaImportHelper.cxx b/xmloff/source/core/RDFaImportHelper.cxx index 7b408ecbbb49..7b29abf94f41 100644 --- a/xmloff/source/core/RDFaImportHelper.cxx +++ b/xmloff/source/core/RDFaImportHelper.cxx @@ -37,6 +37,8 @@ using namespace ::com::sun::star; namespace xmloff { +namespace { + /** a bit of context for parsing RDFa attributes */ class RDFaReader { @@ -102,6 +104,8 @@ public: void InsertRDFaEntry(struct RDFaEntry const & i_rEntry); }; +} + /** store parsed RDFa attributes */ struct ParsedRDFaAttributes { diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx index a690a5770f1c..57403644aea4 100644 --- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx +++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx @@ -38,6 +38,8 @@ using namespace ::com::sun::star::document; using namespace ::com::sun::star::xml::sax; using namespace ::xmloff::token; +namespace { + class XMLEmbeddedObjectImportContext_Impl : public SvXMLImportContext { css::uno::Reference< css::xml::sax::XDocumentHandler > xHandler; @@ -59,6 +61,7 @@ public: virtual void Characters( const OUString& rChars ) override; }; +} XMLEmbeddedObjectImportContext_Impl::XMLEmbeddedObjectImportContext_Impl( SvXMLImport& rImport, sal_uInt16 nPrfx, diff --git a/xmloff/source/core/attrlist.cxx b/xmloff/source/core/attrlist.cxx index 805cafdd45b6..d0dfaa7185ba 100644 --- a/xmloff/source/core/attrlist.cxx +++ b/xmloff/source/core/attrlist.cxx @@ -29,6 +29,8 @@ using namespace ::com::sun::star; using namespace ::xmloff::token; +namespace { + struct SvXMLTagAttribute_Impl { SvXMLTagAttribute_Impl( const OUString &rName, @@ -48,6 +50,8 @@ struct SvXMLTagAttribute_Impl OUString sValue; }; +} + struct SvXMLAttributeList_Impl { SvXMLAttributeList_Impl() diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 59dcf10f60a5..6bf39cd993cb 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -145,6 +145,8 @@ const XMLServiceMapEntry_Impl aServiceMap[] = { nullptr, 0, nullptr, 0 } }; +namespace { + class SettingsExportFacade : public ::xmloff::XMLSettingsExportContext { public: @@ -174,6 +176,8 @@ private: ::std::stack< OUString > m_aElements; }; +} + void SettingsExportFacade::AddAttribute( enum ::xmloff::token::XMLTokenEnum i_eName, const OUString& i_rValue ) { m_rExport.AddAttribute( XML_NAMESPACE_CONFIG, i_eName, i_rValue ); @@ -208,6 +212,8 @@ Reference< XComponentContext > SettingsExportFacade::GetComponentContext() const return m_rExport.getComponentContext(); } +namespace { + class SvXMLExportEventListener : public cppu::WeakImplHelper< css::lang::XEventListener > { @@ -221,6 +227,8 @@ public: virtual void SAL_CALL disposing(const lang::EventObject& rEventObject) override; }; +} + SvXMLExportEventListener::SvXMLExportEventListener(SvXMLExport* pTempExport) : pExport(pTempExport) { diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 51a1ef9b2c0d..9c1f806a999c 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -89,6 +89,8 @@ const OUString SvXMLImport::aDefaultNamespace = OUString(""); const OUString SvXMLImport::aNamespaceSeparator = OUString(":"); bool SvXMLImport::bIsNSMapsInitialized = false; +namespace { + class SvXMLImportEventListener : public cppu::WeakImplHelper< css::lang::XEventListener > { private: @@ -101,6 +103,8 @@ public: virtual void SAL_CALL disposing(const lang::EventObject& rEventObject) override; }; +} + SvXMLImportEventListener::SvXMLImportEventListener(SvXMLImport* pTempImport) : pImport(pTempImport) { diff --git a/xmloff/source/draw/EnhancedCustomShapeToken.cxx b/xmloff/source/draw/EnhancedCustomShapeToken.cxx index 6e65cabbde7e..3abca04a50db 100644 --- a/xmloff/source/draw/EnhancedCustomShapeToken.cxx +++ b/xmloff/source/draw/EnhancedCustomShapeToken.cxx @@ -32,12 +32,16 @@ static ::osl::Mutex& getHashMapMutex() return s_aHashMapProtection; } +namespace { + struct TokenTable { const char* pS; EnhancedCustomShapeTokenEnum const pE; }; +} + static const TokenTable pTokenTableArray[] = { { "type", EAS_type }, diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx index e502f4ea1aee..dc0b67f4ad9b 100644 --- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx +++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx @@ -84,6 +84,8 @@ SvXMLImportContextRef XMLGraphicsDefaultStyle::CreateChildContext( sal_uInt16 nP return xContext; } +namespace { + struct XMLPropertyByIndex { sal_Int32 const m_nIndex; explicit XMLPropertyByIndex(sal_Int32 const nIndex) : m_nIndex(nIndex) {} @@ -92,6 +94,8 @@ struct XMLPropertyByIndex { } }; +} + // This method is called for every default style void XMLGraphicsDefaultStyle::SetDefaults() { diff --git a/xmloff/source/draw/XMLImageMapContext.cxx b/xmloff/source/draw/XMLImageMapContext.cxx index 40d5a8f0d6db..e40be35d9969 100644 --- a/xmloff/source/draw/XMLImageMapContext.cxx +++ b/xmloff/source/draw/XMLImageMapContext.cxx @@ -94,6 +94,7 @@ static const SvXMLTokenMapEntry aImageMapObjectTokenMap[] = XML_TOKEN_MAP_END }; +namespace { class XMLImageMapObjectContext : public SvXMLImportContext { @@ -141,6 +142,7 @@ protected: css::uno::Reference<css::beans::XPropertySet> & rPropertySet); }; +} XMLImageMapObjectContext::XMLImageMapObjectContext( SvXMLImport& rImport, @@ -275,6 +277,7 @@ void XMLImageMapObjectContext::Prepare( rPropertySet->setPropertyValue( "Name", Any( sNam ) ); } +namespace { class XMLImageMapRectangleContext : public XMLImageMapObjectContext { @@ -302,6 +305,7 @@ protected: css::uno::Reference<css::beans::XPropertySet> & rPropertySet) override; }; +} XMLImageMapRectangleContext::XMLImageMapRectangleContext( SvXMLImport& rImport, @@ -372,6 +376,7 @@ void XMLImageMapRectangleContext::Prepare( XMLImageMapObjectContext::Prepare(rPropertySet); } +namespace { class XMLImageMapPolygonContext : public XMLImageMapObjectContext { @@ -398,6 +403,7 @@ protected: css::uno::Reference<css::beans::XPropertySet> & rPropertySet) override; }; +} XMLImageMapPolygonContext::XMLImageMapPolygonContext( SvXMLImport& rImport, @@ -455,6 +461,8 @@ void XMLImageMapPolygonContext::Prepare(Reference<XPropertySet> & rPropertySet) XMLImageMapObjectContext::Prepare(rPropertySet); } +namespace { + class XMLImageMapCircleContext : public XMLImageMapObjectContext { awt::Point aCenter; @@ -481,6 +489,7 @@ protected: css::uno::Reference<css::beans::XPropertySet> & rPropertySet) override; }; +} XMLImageMapCircleContext::XMLImageMapCircleContext( SvXMLImport& rImport, diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx index 79a5c600deb9..98bdeb17ef9e 100644 --- a/xmloff/source/draw/XMLNumberStyles.cxx +++ b/xmloff/source/draw/XMLNumberStyles.cxx @@ -31,6 +31,8 @@ using namespace ::xmloff::token; +namespace { + struct SdXMLDataStyleNumber { enum XMLTokenEnum const meNumberStyle; @@ -38,8 +40,11 @@ struct SdXMLDataStyleNumber bool const mbTextual; bool const mbDecimal02; const char* mpText; +}; + } -const aSdXMLDataStyleNumbers[] = + +SdXMLDataStyleNumber const aSdXMLDataStyleNumbers[] = { { XML_DAY, false, false, false, nullptr }, { XML_DAY, true, false, false, nullptr }, diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index 082f7ad5153b..d5b2c7d1d3fa 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -1205,6 +1205,8 @@ SvXMLImportContextRef AnimationNodeContext::CreateChildContext( sal_uInt16 nPref return new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); } +namespace { + class AnimationsImport: public SvXMLImport, public XAnimationNodeSupplier { public: @@ -1224,6 +1226,8 @@ private: Reference< XAnimationNode > mxRootNode; }; +} + AnimationsImport::AnimationsImport( const Reference< XComponentContext > & rxContext ) : SvXMLImport( rxContext, AnimationsImport_getImplementationName(), SvXMLImportFlags::META ) //FIXME: the above "IMPORT_META" used to be a nonsensical "true", question diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx index 2b0071cd1b5b..fbed96791f34 100644 --- a/xmloff/source/draw/animexp.cxx +++ b/xmloff/source/draw/animexp.cxx @@ -47,15 +47,19 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::presentation; using namespace ::xmloff::token; +namespace { -const struct Effect +struct Effect { XMLEffect const meKind; XMLEffectDirection const meDirection; sal_Int16 const mnStartScale; bool const mbIn; +}; + } - AnimationEffectMap[] = + +const Effect AnimationEffectMap[] = { { EK_none, ED_none, -1, true }, // AnimationEffect_NONE { EK_fade, ED_from_left, -1, true }, // AnimationEffect_FADE_FROM_LEFT @@ -196,8 +200,6 @@ enum XMLActionKind XMLE_PLAY }; -} - struct XMLEffectHint { XMLActionKind meKind; @@ -224,6 +226,8 @@ struct XMLEffectHint {} }; +} + class AnimExpImpl { public: diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx index f1ad97e5af1f..f2178aeb8454 100644 --- a/xmloff/source/draw/animimp.cxx +++ b/xmloff/source/draw/animimp.cxx @@ -345,8 +345,6 @@ enum XMLActionKind XMLE_PLAY }; -} - class XMLAnimationsEffectContext : public SvXMLImportContext { public: @@ -387,6 +385,7 @@ public: XMLAnimationsSoundContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, XMLAnimationsEffectContext* pParent ); }; +} XMLAnimationsSoundContext::XMLAnimationsSoundContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, XMLAnimationsEffectContext* pParent ) : SvXMLImportContext( rImport, nPrfx, rLocalName ) diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx index f9e10c11cf7d..f88af2fc88b3 100644 --- a/xmloff/source/draw/eventimp.cxx +++ b/xmloff/source/draw/eventimp.cxx @@ -75,6 +75,8 @@ SdXMLEventContextData::SdXMLEventContextData(const Reference< XShape >& rxShape) { } +namespace { + class SdXMLEventContext : public SvXMLImportContext { public: @@ -95,6 +97,7 @@ public: XMLEventSoundContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, SdXMLEventContext* pParent ); }; +} XMLEventSoundContext::XMLEventSoundContext( SvXMLImport& rImp, sal_uInt16 nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, SdXMLEventContext* pParent ) : SvXMLImportContext( rImp, nPrfx, rLocalName ) diff --git a/xmloff/source/draw/layerimp.cxx b/xmloff/source/draw/layerimp.cxx index 80c869da085b..c0826cbec25b 100644 --- a/xmloff/source/draw/layerimp.cxx +++ b/xmloff/source/draw/layerimp.cxx @@ -46,6 +46,8 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::container; using ::xmloff::token::IsXMLToken; +namespace { + class SdXMLLayerContext : public SvXMLImportContext { public: @@ -63,6 +65,8 @@ private: OUString msProtected; }; +} + SdXMLLayerContext::SdXMLLayerContext( SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, const Reference< XNameAccess >& xLayerManager ) : SvXMLImportContext(rImport, nPrefix, rLocalName) , mxLayerManager( xLayerManager ) diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx index de6a5e4655d5..94e976f2fc89 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.cxx @@ -752,6 +752,8 @@ static SvXMLEnumMapEntry<sal_Int32> const pXML_Caption_Type_Enum[] = { XML_TOKEN_INVALID,0 } }; +namespace { + class XMLCaptionEscapeRelative : public XMLPropertyHandler { public: @@ -765,6 +767,8 @@ public: const SvXMLUnitConverter& rUnitConverter ) const override; }; +} + bool XMLCaptionEscapeRelative::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& ) const { sal_Int32 nValue; @@ -790,6 +794,8 @@ bool XMLCaptionEscapeRelative::exportXML( OUString& rStrExpValue, const Any& rVa return true; } +namespace { + class XMLMoveSizeProtectHdl : public XMLPropertyHandler { public: @@ -807,6 +813,8 @@ private: const sal_Int32 mnType; }; +} + bool XMLMoveSizeProtectHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& ) const { const bool bValue = rStrImpValue.indexOf( GetXMLToken( mnType == XML_SD_TYPE_MOVE_PROTECT ? XML_POSITION : XML_SIZE ) ) != -1; @@ -831,6 +839,8 @@ bool XMLMoveSizeProtectHdl::exportXML( OUString& rStrExpValue, const Any& rValue return true; } +namespace { + class XMLSdHeaderFooterVisibilityTypeHdl : public XMLPropertyHandler { public: @@ -838,6 +848,8 @@ public: virtual bool exportXML( OUString& rStrExpValue, const css::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const override; }; +} + bool XMLSdHeaderFooterVisibilityTypeHdl::importXML( const OUString& rStrImpValue, css::uno::Any& rValue, @@ -871,6 +883,8 @@ bool XMLSdHeaderFooterVisibilityTypeHdl::exportXML( return bRet; } +namespace { + class XMLSdRotationAngleTypeHdl : public XMLPropertyHandler { public: @@ -878,6 +892,8 @@ public: virtual bool exportXML(OUString& rStrExpValue, const css::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter) const override; }; +} + bool XMLSdRotationAngleTypeHdl::importXML( const OUString& rStrImpValue, css::uno::Any& rValue, @@ -917,6 +933,8 @@ bool XMLSdRotationAngleTypeHdl::exportXML( return bRet; } +namespace { + class XMLFitToSizeEnumPropertyHdl : public XMLEnumPropertyHdl { public: @@ -948,6 +966,7 @@ public: } }; +} XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference< frame::XModel > const & xModel, SvXMLImport& rImport ) : mxModel( xModel ), mpExport(nullptr), mpImport( &rImport ) diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index 829c0ad16c87..3a7d52b880ab 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -48,6 +48,8 @@ using namespace ::com::sun::star; using namespace ::xmloff::token; +namespace { + class SdXMLBodyContext_Impl : public SvXMLImportContext { SdXMLImport& GetSdImport() { return static_cast<SdXMLImport&>(GetImport()); } @@ -63,6 +65,8 @@ public: const uno::Reference< xml::sax::XAttributeList > & xAttrList ) override; }; +} + SdXMLBodyContext_Impl::SdXMLBodyContext_Impl( SdXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList > & ) : @@ -78,6 +82,8 @@ SvXMLImportContextRef SdXMLBodyContext_Impl::CreateChildContext( return GetSdImport().CreateBodyContext(rLocalName, xAttrList); } +namespace { + // NB: virtually inherit so we can multiply inherit properly // in SdXMLFlatDocContext_Impl class SdXMLDocContext_Impl : public virtual SvXMLImportContext @@ -103,6 +109,8 @@ public: virtual void SAL_CALL endFastElement( sal_Int32 /*nElement*/ ) override {} }; +} + SdXMLDocContext_Impl::SdXMLDocContext_Impl( SdXMLImport& rImport ) : SvXMLImportContext(rImport) @@ -198,6 +206,8 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL SdXMLDocContext_Impl::c return new SvXMLImportContext( GetImport() ); } +namespace { + // context for flat file xml format class SdXMLFlatDocContext_Impl : public SdXMLDocContext_Impl, public SvXMLMetaDocumentContext @@ -217,6 +227,8 @@ public: sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override; }; +} + SdXMLFlatDocContext_Impl::SdXMLFlatDocContext_Impl( SdXMLImport& i_rImport, const uno::Reference<document::XDocumentProperties>& i_xDocProps) : SvXMLImportContext(i_rImport), diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index 59d08cacfed1..856635c09d31 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -47,12 +47,18 @@ #include <map> #include <vector> +namespace { + class ShapeGroupContext; +} + using namespace ::std; using namespace ::com::sun::star; using namespace ::xmloff::token; +namespace { + struct ConnectionHint { css::uno::Reference< css::drawing::XShape > mxConnector; @@ -70,6 +76,8 @@ struct XShapeCompareHelper } }; +} + /** this map store all glue point id mappings for shapes that had user defined glue points. This is needed because on insertion the glue points will get a new and unique id */ typedef std::map<sal_Int32,sal_Int32> GluePointIdMap; @@ -694,6 +702,8 @@ void XMLShapeImportHelper::finishShape( } } +namespace { + // helper functions for z-order sorting struct ZOrderHint { @@ -725,6 +735,8 @@ private: void moveShape( sal_Int32 nSourcePos, sal_Int32 nDestPos ); }; +} + ShapeGroupContext::ShapeGroupContext( uno::Reference< drawing::XShapes > const & rShapes, std::shared_ptr<ShapeGroupContext> pParentContext ) : mxShapes( rShapes ), mnCurrentZ( 0 ), mpParentContext( std::move(pParentContext) ) { diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx index f0a297c935f3..eb7cb4a634d5 100644 --- a/xmloff/source/draw/xexptran.cxx +++ b/xmloff/source/draw/xexptran.cxx @@ -178,6 +178,8 @@ struct ImpSdXMLExpTransObj2DBase // classes of objects, different sizes +namespace { + struct ImpSdXMLExpTransObj2DRotate : public ImpSdXMLExpTransObj2DBase { double const mfRotate; @@ -215,6 +217,8 @@ struct ImpSdXMLExpTransObj2DMatrix : public ImpSdXMLExpTransObj2DBase : ImpSdXMLExpTransObj2DBase(IMP_SDXMLEXP_TRANSOBJ2D_MATRIX), maMatrix(rNew) {} }; +} + // add members void SdXMLImExTransform2D::AddRotate(double fNew) @@ -548,6 +552,8 @@ struct ImpSdXMLExpTransObj3DBase // classes of objects, different sizes +namespace { + struct ImpSdXMLExpTransObj3DRotateX : public ImpSdXMLExpTransObj3DBase { double const mfRotateX; @@ -585,6 +591,8 @@ struct ImpSdXMLExpTransObj3DMatrix : public ImpSdXMLExpTransObj3DBase : ImpSdXMLExpTransObj3DBase(IMP_SDXMLEXP_TRANSOBJ3D_MATRIX), maMatrix(rNew) {} }; +} + // add members void SdXMLImExTransform3D::AddMatrix(const ::basegfx::B3DHomMatrix& rNew) diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx index af7fcdde026c..cd8d2b2a36de 100644 --- a/xmloff/source/draw/ximppage.cxx +++ b/xmloff/source/draw/ximppage.cxx @@ -53,6 +53,8 @@ using namespace ::com::sun::star::office; using namespace ::com::sun::star::xml::sax; using namespace ::com::sun::star::geometry; +namespace { + class DrawAnnotationContext : public SvXMLImportContext { @@ -71,6 +73,8 @@ private: OUStringBuffer maDateBuffer; }; +} + DrawAnnotationContext::DrawAnnotationContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName,const Reference< xml::sax::XAttributeList>& xAttrList, const Reference< XAnnotationAccess >& xAnnotationAccess ) : SvXMLImportContext( rImport, nPrfx, rLocalName ) , mxAnnotation( xAnnotationAccess->createAndInsertAnnotation() ) @@ -510,6 +514,8 @@ void SdXMLGenericPageContext::SetPageMaster( OUString const & rsPageMasterName ) } } +namespace { + class XoNavigationOrderAccess : public ::cppu::WeakImplHelper< XIndexAccess > { public: @@ -527,6 +533,8 @@ private: std::vector< Reference< XShape > > maShapes; }; +} + XoNavigationOrderAccess::XoNavigationOrderAccess( std::vector< Reference< XShape > >& rShapes ) { maShapes.swap( rShapes ); diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index 929fa5b37aa2..070b9ecad1e3 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -55,6 +55,8 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::xml::sax; using namespace ::xmloff::token; +namespace { + class SdXMLDrawingPagePropertySetContext : public SvXMLPropertySetContext { public: @@ -74,6 +76,7 @@ public: const XMLPropertyState& rProp) override; }; +} SdXMLDrawingPagePropertySetContext::SdXMLDrawingPagePropertySetContext( SvXMLImport& rImport, sal_uInt16 nPrfx, @@ -124,6 +127,8 @@ SvXMLImportContextRef SdXMLDrawingPagePropertySetContext::CreateChildContext( return xContext; } +namespace { + class SdXMLDrawingPageStyleContext : public XMLPropStyleContext { public: @@ -147,6 +152,7 @@ public: virtual void FillPropertySet( const css::uno::Reference< css::beans::XPropertySet > & rPropSet ) override; }; +} SdXMLDrawingPageStyleContext::SdXMLDrawingPageStyleContext( SvXMLImport& rImport, diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index fa3289e73826..877095defd42 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -76,6 +76,8 @@ namespace xmloff #define PROPID_MIN_VALUE 3 #define PROPID_MAX_VALUE 4 + namespace { + struct PropertyValueLess { bool operator()(const PropertyValue& _rLeft, const PropertyValue& _rRight) @@ -84,6 +86,8 @@ namespace xmloff } }; + } + //= OElementNameMap OElementNameMap::MapString2Element OElementNameMap::s_sElementTranslations; @@ -1349,6 +1353,8 @@ namespace xmloff simulateDefaultedAttribute(OAttributeMetaData::getDatabaseAttributeName(DAFlags::ConvertEmpty), PROPERTY_EMPTY_IS_NULL, "false"); } + namespace { + struct EqualHandle { const sal_Int32 m_nHandle; @@ -1360,6 +1366,8 @@ namespace xmloff } }; + } + void OTextLikeImport::removeRedundantCurrentValue() { if ( m_bEncounteredTextPara ) @@ -1402,6 +1410,8 @@ namespace xmloff // since this is the default of this property, anyway. } + namespace { + struct EqualName { const OUString & m_sName; @@ -1413,6 +1423,8 @@ namespace xmloff } }; + } + void OTextLikeImport::adjustDefaultControlProperty() { // In OpenOffice.org 2.0, we changed the implementation of the css.form.component.TextField (the model of a text field control), diff --git a/xmloff/source/meta/MetaImportComponent.cxx b/xmloff/source/meta/MetaImportComponent.cxx index 72661847c046..c3cbdb03d2b2 100644 --- a/xmloff/source/meta/MetaImportComponent.cxx +++ b/xmloff/source/meta/MetaImportComponent.cxx @@ -28,6 +28,8 @@ using namespace ::com::sun::star; using namespace ::xmloff::token; +namespace { + class XMLMetaImportComponent : public SvXMLImport { private: @@ -48,6 +50,8 @@ protected: virtual void SAL_CALL setTargetDocument( const css::uno::Reference< css::lang::XComponent >& xDoc ) override; }; +} + // global functions to support the component extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx index 907fd68d4e0d..533cc761d55c 100644 --- a/xmloff/source/meta/xmlmetai.cxx +++ b/xmloff/source/meta/xmlmetai.cxx @@ -39,6 +39,8 @@ using namespace com::sun::star; using namespace ::xmloff::token; +namespace { + /// builds a DOM tree from SAX events, by forwarding to SAXDocumentBuilder class XMLDocumentBuilderContext : public SvXMLImportContext { @@ -67,6 +69,8 @@ public: }; +} + XMLDocumentBuilderContext::XMLDocumentBuilderContext(SvXMLImport& rImport, sal_Int32 /*nElement*/, const uno::Reference<xml::sax::XFastAttributeList>&, const uno::Reference<xml::dom::XSAXDocumentBuilder2>& rDocBuilder) : diff --git a/xmloff/source/script/xmlscripti.cxx b/xmloff/source/script/xmlscripti.cxx index d3c9232f0317..9b6850102f5a 100644 --- a/xmloff/source/script/xmlscripti.cxx +++ b/xmloff/source/script/xmlscripti.cxx @@ -38,6 +38,8 @@ using namespace ::xmloff::token; // XMLScriptChildContext: context for <office:script> element +namespace { + class XMLScriptChildContext : public SvXMLImportContext { private: @@ -56,6 +58,8 @@ public: virtual void EndElement() override; }; +} + XMLScriptChildContext::XMLScriptChildContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const Reference< frame::XModel >& rxModel, const OUString& rLanguage ) :SvXMLImportContext( rImport, nPrfx, rLName ) diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx b/xmloff/source/style/PageMasterExportPropMapper.cxx index 377f76f4bc18..c19d145ed299 100644 --- a/xmloff/source/style/PageMasterExportPropMapper.cxx +++ b/xmloff/source/style/PageMasterExportPropMapper.cxx @@ -62,6 +62,8 @@ static void lcl_AddState(::std::vector< XMLPropertyState >& rPropState, sal_Int3 // helper struct to handle equal XMLPropertyState's for page, header and footer +namespace { + struct XMLPropertyStateBuffer { XMLPropertyState* pPMMarginAll; @@ -88,6 +90,8 @@ struct XMLPropertyStateBuffer void ContextFilter( ::std::vector< XMLPropertyState >& rPropState ); }; +} + XMLPropertyStateBuffer::XMLPropertyStateBuffer() : pPMMarginAll( nullptr ) , diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx index c3e263430a8b..d25bd5130545 100644 --- a/xmloff/source/style/XMLFontAutoStylePool.cxx +++ b/xmloff/source/style/XMLFontAutoStylePool.cxx @@ -47,6 +47,8 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::xmloff::token; +namespace { + class XMLFontAutoStylePoolEntry_Impl { OUString const sName; @@ -81,6 +83,7 @@ public: rtl_TextEncoding GetEncoding() const { return eEnc; } }; +} inline XMLFontAutoStylePoolEntry_Impl::XMLFontAutoStylePoolEntry_Impl( const OUString& rName, @@ -112,6 +115,8 @@ inline XMLFontAutoStylePoolEntry_Impl::XMLFontAutoStylePoolEntry_Impl( { } +namespace { + struct XMLFontAutoStylePoolEntryCmp_Impl { bool operator()( std::unique_ptr<XMLFontAutoStylePoolEntry_Impl> const& r1, @@ -136,6 +141,8 @@ struct XMLFontAutoStylePoolEntryCmp_Impl { } }; +} + class XMLFontAutoStylePool_Impl : public o3tl::sorted_vector<std::unique_ptr<XMLFontAutoStylePoolEntry_Impl>, XMLFontAutoStylePoolEntryCmp_Impl> { }; diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx index 13b600c21204..6934de7383e2 100644 --- a/xmloff/source/style/impastpl.cxx +++ b/xmloff/source/style/impastpl.cxx @@ -249,6 +249,8 @@ XMLAutoStylePoolParent::~XMLAutoStylePoolParent() { } +namespace { + struct ComparePartial { const XMLAutoStyleFamily& rFamilyData; @@ -265,6 +267,8 @@ struct ComparePartial } }; +} + // Adds an array of XMLPropertyState ( vector< XMLPropertyState > ) to list // if not added, yet. diff --git a/xmloff/source/style/prstylecond.cxx b/xmloff/source/style/prstylecond.cxx index ad16ee813cb8..e384a645dffe 100644 --- a/xmloff/source/style/prstylecond.cxx +++ b/xmloff/source/style/prstylecond.cxx @@ -25,12 +25,18 @@ using namespace ::xmloff::token; // note: keep this in sync with the list of conditions in sw/source/uibase/chrdlg/ccoll.cxx -static const struct ConditionMap +namespace { + +struct ConditionMap { char const* aInternal; XMLTokenEnum const nExternal; int const aValue; -} g_ConditionMap[] = +}; + +} + +static const ConditionMap g_ConditionMap[] = { { "TableHeader", XML_TABLE_HEADER, -1 }, { "Table", XML_TABLE, -1 }, diff --git a/xmloff/source/style/weighhdl.cxx b/xmloff/source/style/weighhdl.cxx index cb4d261010b9..b1b671d56efe 100644 --- a/xmloff/source/style/weighhdl.cxx +++ b/xmloff/source/style/weighhdl.cxx @@ -31,12 +31,16 @@ using namespace ::com::sun::star::uno; using namespace ::xmloff::token; +namespace { + struct FontWeightMapper { float const fWeight; sal_uInt16 const nValue; }; +} + FontWeightMapper const aFontWeightMap[] = { { css::awt::FontWeight::DONTKNOW, 0 }, diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx index d21c219f12cb..b7a4c96b2525 100644 --- a/xmloff/source/style/xmlimppr.cxx +++ b/xmloff/source/style/xmlimppr.cxx @@ -548,6 +548,8 @@ bool SvXMLImportPropertyMapper::FillPropertySet_( typedef pair<const OUString*, const Any* > PropertyPair; typedef vector<PropertyPair> PropertyPairs; +namespace { + struct PropertyPairLessFunctor { bool operator()( const PropertyPair& a, const PropertyPair& b ) const @@ -556,6 +558,8 @@ struct PropertyPairLessFunctor } }; +} + void SvXMLImportPropertyMapper::PrepareForMultiPropertySet_( const vector<XMLPropertyState> & rProperties, const Reference<XPropertySetInfo> & rPropSetInfo, diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index e5b367e1343e..7fc07dbb8120 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -55,6 +55,8 @@ using namespace ::svt; typedef std::set< sal_uInt32 > SvXMLuInt32Set; +namespace { + struct SvXMLEmbeddedTextEntry { sal_uInt16 const nSourcePos; // position in NumberFormat (to skip later) @@ -65,6 +67,8 @@ struct SvXMLEmbeddedTextEntry nSourcePos(nSP), nFormatPos(nFP), aText(rT) {} }; +} + class SvXMLEmbeddedTextEntryArr { typedef std::vector<SvXMLEmbeddedTextEntry> DataType; diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 29f9e1f7527b..4d3c334668be 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -47,6 +47,8 @@ using namespace ::com::sun::star; using namespace ::xmloff::token; +namespace { + struct SvXMLNumFmtEntry { OUString const aName; @@ -57,6 +59,8 @@ struct SvXMLNumFmtEntry aName(rN), nKey(nK), bRemoveAfterUse(bR) {} }; +} + class SvXMLNumImpData { SvNumberFormatter* pFormatter; @@ -109,6 +113,8 @@ struct SvXMLNumberInfo std::map<sal_Int32, OUString> m_EmbeddedElements; }; +namespace { + class SvXMLNumFmtElementContext : public SvXMLImportContext { SvXMLNumFormatContext& rParent; @@ -192,8 +198,6 @@ public: virtual void EndElement() override; }; -namespace { - enum SvXMLStyleTokens { XML_TOK_STYLE_TEXT, @@ -307,6 +311,8 @@ static const SvXMLEnumMapEntry<bool> aFormatSourceMap[] = { XML_TOKEN_INVALID, false } }; +namespace { + struct SvXMLDefaultDateFormat { NfIndexTableOffset const eFormat; @@ -320,6 +326,8 @@ struct SvXMLDefaultDateFormat bool const bSystem; }; +} + static const SvXMLDefaultDateFormat aDefaultDateFormats[] = { // format day-of-week day month year hours minutes seconds format-source diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index 09c95178212b..1ea6831d07b8 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -71,6 +71,8 @@ using namespace ::com::sun::star::io; class SvxXMLListLevelStyleContext_Impl; +namespace { + class SvxXMLListLevelStyleAttrContext_Impl : public SvXMLImportContext { SvxXMLListLevelStyleContext_Impl& rListLevel; @@ -99,8 +101,6 @@ public: SvxXMLListLevelStyleContext_Impl& rLLevel ); }; -namespace { - enum SvxXMLTextListLevelStyleAttrTokens { XML_TOK_TEXT_LEVEL_ATTR_LEVEL, @@ -146,7 +146,7 @@ static const SvXMLTokenMapEntry* lcl_getLevelAttrTokenMap() class SvxXMLListLevelStyleContext_Impl : public SvXMLImportContext { - friend class SvxXMLListLevelStyleAttrContext_Impl; + friend SvxXMLListLevelStyleAttrContext_Impl; OUString sPrefix; OUString sSuffix; diff --git a/xmloff/source/style/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx index ff55ebd3b7a5..eb232b155477 100644 --- a/xmloff/source/style/xmlprmap.cxx +++ b/xmloff/source/style/xmlprmap.cxx @@ -36,6 +36,8 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using ::xmloff::token::GetXMLToken; +namespace { + /** Helper-class for XML-im/export: - Holds a pointer to a given array of XMLPropertyMapEntry - Provides several methods to access data from this array @@ -69,6 +71,8 @@ struct XMLPropertySetMapperEntry_Impl sal_uInt32 GetPropType() const { return nType & XML_TYPE_PROP_MASK; } }; +} + XMLPropertySetMapperEntry_Impl::XMLPropertySetMapperEntry_Impl( const XMLPropertyMapEntry& rMapEntry, const rtl::Reference< XMLPropertyHandlerFactory >& rFactory ) : diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx index 5c4c12f667cf..17e72b70b62b 100644 --- a/xmloff/source/style/xmlstyle.cxx +++ b/xmloff/source/style/xmlstyle.cxx @@ -200,6 +200,8 @@ bool SvXMLStyleContext::IsTransient() const return false; } +namespace { + class SvXMLStyleIndex_Impl { OUString const sName; @@ -243,6 +245,8 @@ struct SvXMLStyleIndexCmp_Impl } }; +} + class SvXMLStylesContext_Impl { typedef std::set<SvXMLStyleIndex_Impl, SvXMLStyleIndexCmp_Impl> IndicesType; diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx index 1703542d0cf0..1154ef82fe98 100644 --- a/xmloff/source/table/XMLTableExport.cxx +++ b/xmloff/source/table/XMLTableExport.cxx @@ -98,6 +98,8 @@ const XMLPropertyMapEntry* getCellPropertiesMap() return &aXMLCellProperties[0]; } +namespace { + class StringStatisticHelper { private: @@ -110,6 +112,8 @@ public: sal_Int32 getModeString( /* out */ OUString& rModeString ); }; +} + void StringStatisticHelper::add( const OUString& rStyleName ) { std::map< OUString, sal_Int32 >::iterator iter( mStats.find( rStyleName ) ); diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx index ddaae9f5e484..1dd094c16c8a 100644 --- a/xmloff/source/table/XMLTableImport.cxx +++ b/xmloff/source/table/XMLTableImport.cxx @@ -65,8 +65,6 @@ struct ColumnInfo OUString msDefaultCellStyleName; }; -} - class XMLProxyContext : public SvXMLImportContext { public: @@ -89,6 +87,8 @@ struct MergeInfo : mnStartColumn( nStartColumn ), mnStartRow( nStartRow ), mnEndColumn( nStartColumn + nColumnSpan - 1 ), mnEndRow( nStartRow + nRowSpan - 1 ) {}; }; +} + typedef std::vector< std::shared_ptr< MergeInfo > > MergeInfoVector; class XMLTableImportContext : public SvXMLImportContext @@ -124,6 +124,8 @@ public: MergeInfoVector maMergeInfos; }; +namespace { + class XMLCellImportContext : public SvXMLImportContext { public: @@ -166,6 +168,8 @@ private: OUString msTemplateStyleName; }; +} + // class XMLProxyContext XMLProxyContext::XMLProxyContext( SvXMLImport& rImport, const SvXMLImportContextRef& xParent, sal_uInt16 nPrfx, const OUString& rLName ) diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx index cf3beb02918f..4177068ae434 100644 --- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx +++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx @@ -51,6 +51,7 @@ using namespace ::xmloff::token; // XMLFootnoteConfigHelper +namespace { /// local helper class for import of quo-vadis and ergo-sum elements class XMLFootnoteConfigHelper : public SvXMLImportContext @@ -73,6 +74,7 @@ public: virtual void Characters( const OUString& rChars ) override; }; +} XMLFootnoteConfigHelper::XMLFootnoteConfigHelper( SvXMLImport& rImport, diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index 0f33c760a6ac..c7e98d6791fc 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -113,6 +113,8 @@ inline XMLTextFrameContextHyperlink_Impl::XMLTextFrameContextHyperlink_Impl( { } +namespace { + // Implement Title/Description Elements UI (#i73249#) class XMLTextFrameTitleOrDescContext_Impl : public SvXMLImportContext { @@ -129,6 +131,7 @@ public: virtual void Characters( const OUString& rText ) override; }; +} XMLTextFrameTitleOrDescContext_Impl::XMLTextFrameTitleOrDescContext_Impl( SvXMLImport& rImport, @@ -145,6 +148,8 @@ void XMLTextFrameTitleOrDescContext_Impl::Characters( const OUString& rText ) mrTitleOrDesc += rText; } +namespace { + class XMLTextFrameParam_Impl : public SvXMLImportContext { public: @@ -156,6 +161,8 @@ public: ParamMap &rParamMap); }; +} + XMLTextFrameParam_Impl::XMLTextFrameParam_Impl( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, @@ -189,6 +196,9 @@ XMLTextFrameParam_Impl::XMLTextFrameParam_Impl( if (!sName.isEmpty() && bFoundValue ) rParamMap[sName] = sValue; } + +namespace { + class XMLTextFrameContourContext_Impl : public SvXMLImportContext { Reference < XPropertySet > xPropSet; @@ -203,6 +213,7 @@ public: bool bPath ); }; +} XMLTextFrameContourContext_Impl::XMLTextFrameContourContext_Impl( SvXMLImport& rImport, @@ -325,6 +336,8 @@ XMLTextFrameContourContext_Impl::XMLTextFrameContourContext_Impl( } } +namespace { + class XMLTextFrameContext_Impl : public SvXMLImportContext { css::uno::Reference < css::text::XTextCursor > xOldTextCursor; @@ -416,6 +429,7 @@ public: const css::uno::Reference < css::beans::XPropertySet >& GetPropSet() const { return xPropSet; } }; +} void XMLTextFrameContext_Impl::Create() { diff --git a/xmloff/source/text/XMLTextListAutoStylePool.cxx b/xmloff/source/text/XMLTextListAutoStylePool.cxx index aa23ec13bf29..dd788e215d8c 100644 --- a/xmloff/source/text/XMLTextListAutoStylePool.cxx +++ b/xmloff/source/text/XMLTextListAutoStylePool.cxx @@ -115,6 +115,8 @@ XMLTextListAutoStylePoolEntry_Impl::XMLTextListAutoStylePoolEntry_Impl( while (rNames.find(sName) != rNames.end()); } +namespace { + struct XMLTextListAutoStylePoolEntryCmp_Impl { bool operator()( @@ -137,6 +139,9 @@ struct XMLTextListAutoStylePoolEntryCmp_Impl } } }; + +} + class XMLTextListAutoStylePool_Impl : public o3tl::sorted_vector<std::unique_ptr<XMLTextListAutoStylePoolEntry_Impl>, XMLTextListAutoStylePoolEntryCmp_Impl> {}; XMLTextListAutoStylePool::XMLTextListAutoStylePool( SvXMLExport& rExp ) : diff --git a/xmloff/source/text/XMLTextShapeStyleContext.cxx b/xmloff/source/text/XMLTextShapeStyleContext.cxx index a781cc60be07..627f3ee3d60d 100644 --- a/xmloff/source/text/XMLTextShapeStyleContext.cxx +++ b/xmloff/source/text/XMLTextShapeStyleContext.cxx @@ -41,6 +41,8 @@ using namespace ::com::sun::star::style; using namespace ::com::sun::star::beans; using namespace ::xmloff::token; +namespace { + class XMLTextShapePropertySetContext_Impl : public XMLShapePropertySetContext { public: @@ -59,6 +61,8 @@ public: const XMLPropertyState& rProp) override; }; +} + XMLTextShapePropertySetContext_Impl::XMLTextShapePropertySetContext_Impl( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index e4f25cfa86cb..e44771a224a9 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -189,6 +189,8 @@ void XMLCharContext::InsertString(const OUString& _sString) GetImport().GetTextImport()->InsertString( _sString ); } +namespace { + /** import start of reference (<text:reference-start>) */ class XMLStartReferenceContext_Impl : public SvXMLImportContext { @@ -208,6 +210,7 @@ public: OUString& rName); }; +} XMLStartReferenceContext_Impl::XMLStartReferenceContext_Impl( SvXMLImport& rImport, @@ -258,6 +261,8 @@ bool XMLStartReferenceContext_Impl::FindName( return bNameOK; } +namespace { + /** import end of reference (<text:reference-end>) */ class XMLEndReferenceContext_Impl : public SvXMLImportContext { @@ -272,6 +277,7 @@ public: const Reference<xml::sax::XAttributeList> & xAttrList); }; +} XMLEndReferenceContext_Impl::XMLEndReferenceContext_Impl( SvXMLImport& rImport, @@ -303,6 +309,8 @@ XMLEndReferenceContext_Impl::XMLEndReferenceContext_Impl( } } +namespace { + class XMLImpSpanContext_Impl : public SvXMLImportContext { XMLHints_Impl& m_rHints; @@ -369,6 +377,7 @@ public: virtual void Characters( const OUString& rChars ) override; }; +} XMLImpHyperlinkContext_Impl::XMLImpHyperlinkContext_Impl( SvXMLImport& rImport, @@ -475,6 +484,8 @@ void XMLImpHyperlinkContext_Impl::Characters( const OUString& rChars ) GetImport().GetTextImport()->InsertString( rChars, mrbIgnoreLeadingSpace ); } +namespace { + class XMLImpRubyBaseContext_Impl : public SvXMLImportContext { XMLHints_Impl& m_rHints; @@ -499,6 +510,7 @@ public: virtual void Characters( const OUString& rChars ) override; }; +} XMLImpRubyBaseContext_Impl::XMLImpRubyBaseContext_Impl( SvXMLImport& rImport, @@ -531,6 +543,8 @@ void XMLImpRubyBaseContext_Impl::Characters( const OUString& rChars ) GetImport().GetTextImport()->InsertString( rChars, rIgnoreLeadingSpace ); } +namespace { + class XMLImpRubyContext_Impl : public SvXMLImportContext { XMLHints_Impl& m_rHints; @@ -580,6 +594,7 @@ public: virtual void Characters( const OUString& rChars ) override; }; +} XMLImpRubyTextContext_Impl::XMLImpRubyTextContext_Impl( SvXMLImport& rImport, @@ -692,6 +707,8 @@ SvXMLImportContextRef XMLImpRubyContext_Impl::CreateChildContext( return xContext; } +namespace { + /** for text:meta and text:meta-field */ class XMLMetaImportContextBase : public SvXMLImportContext @@ -733,6 +750,7 @@ public: = 0; }; +} XMLMetaImportContextBase::XMLMetaImportContextBase( SvXMLImport& i_rImport, @@ -807,6 +825,8 @@ void XMLMetaImportContextBase::ProcessAttribute(sal_uInt16 const i_nPrefix, } } +namespace { + /** text:meta */ class XMLMetaImportContext : public XMLMetaImportContextBase { @@ -832,6 +852,7 @@ public: virtual void InsertMeta(const Reference<XTextRange> & i_xInsertionRange) override; }; +} XMLMetaImportContext::XMLMetaImportContext( SvXMLImport& i_rImport, @@ -904,6 +925,8 @@ void XMLMetaImportContext::InsertMeta( } } +namespace { + /** text:meta-field */ class XMLMetaFieldImportContext : public XMLMetaImportContextBase { @@ -924,6 +947,7 @@ public: virtual void InsertMeta(const Reference<XTextRange> & i_xInsertionRange) override; }; +} XMLMetaFieldImportContext::XMLMetaFieldImportContext( SvXMLImport& i_rImport, @@ -993,6 +1017,8 @@ void XMLMetaFieldImportContext::InsertMeta( } } +namespace { + /** * Process index marks. * @@ -1043,6 +1069,7 @@ protected: const OUString& rServiceName); }; +} XMLIndexMarkImportContext_Impl::XMLIndexMarkImportContext_Impl( SvXMLImport& rImport, @@ -1249,6 +1276,8 @@ bool XMLIndexMarkImportContext_Impl::CreateMark( return false; } +namespace { + class XMLTOCMarkImportContext_Impl : public XMLIndexMarkImportContext_Impl { public: @@ -1269,6 +1298,7 @@ protected: Reference<beans::XPropertySet>& rPropSet) override; }; +} XMLTOCMarkImportContext_Impl::XMLTOCMarkImportContext_Impl( SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName, @@ -1308,6 +1338,8 @@ void XMLTOCMarkImportContext_Impl::ProcessAttribute( } } +namespace { + class XMLUserIndexMarkImportContext_Impl : public XMLIndexMarkImportContext_Impl { public: @@ -1328,6 +1360,7 @@ protected: Reference<beans::XPropertySet>& rPropSet) override; }; +} XMLUserIndexMarkImportContext_Impl::XMLUserIndexMarkImportContext_Impl( SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName, @@ -1374,6 +1407,8 @@ void XMLUserIndexMarkImportContext_Impl::ProcessAttribute( } } +namespace { + class XMLAlphaIndexMarkImportContext_Impl : public XMLIndexMarkImportContext_Impl { public: @@ -1394,6 +1429,7 @@ protected: Reference<beans::XPropertySet>& rPropSet) override; }; +} XMLAlphaIndexMarkImportContext_Impl::XMLAlphaIndexMarkImportContext_Impl( SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName, diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx index 32644e5f7f1c..2a6e3a32c0d5 100644 --- a/xmloff/source/text/txtprhdl.cxx +++ b/xmloff/source/text/txtprhdl.cxx @@ -245,6 +245,8 @@ static SvXMLEnumMapEntry<drawing::TextVerticalAdjust> const pXML_VerticalAlign_E { XML_TOKEN_INVALID, drawing::TextVerticalAdjust(0) } }; +namespace { + class XMLDropCapPropHdl_Impl : public XMLPropertyHandler { public: @@ -263,6 +265,8 @@ public: const SvXMLUnitConverter& ) const override; }; +} + bool XMLDropCapPropHdl_Impl::equals( const Any& r1, const Any& r2 ) const @@ -295,6 +299,8 @@ bool XMLDropCapPropHdl_Impl::exportXML( return false; } +namespace { + class XMLOpaquePropHdl_Impl : public XMLPropertyHandler { public: @@ -308,6 +314,8 @@ public: const SvXMLUnitConverter& ) const override; }; +} + bool XMLOpaquePropHdl_Impl::importXML( const OUString& rStrImpValue, Any& rValue, @@ -339,6 +347,8 @@ bool XMLOpaquePropHdl_Impl::exportXML( return true; } +namespace { + class XMLContourModePropHdl_Impl : public XMLPropertyHandler { public: @@ -352,6 +362,8 @@ public: const SvXMLUnitConverter& ) const override; }; +} + bool XMLContourModePropHdl_Impl::importXML( const OUString& rStrImpValue, Any& rValue, @@ -383,6 +395,8 @@ bool XMLContourModePropHdl_Impl::exportXML( return true; } +namespace { + class XMLParagraphOnlyPropHdl_Impl : public XMLPropertyHandler { public: @@ -396,6 +410,8 @@ public: const SvXMLUnitConverter& ) const override; }; +} + bool XMLParagraphOnlyPropHdl_Impl::importXML( const OUString& rStrImpValue, Any& rValue, @@ -441,6 +457,8 @@ SvXMLEnumMapEntry<WrapTextMode> const pXML_Wrap_Enum[] = { XML_TOKEN_INVALID, WrapTextMode(0) } }; +namespace { + class XMLWrapPropHdl_Impl : public XMLPropertyHandler { public: @@ -454,6 +472,8 @@ public: const SvXMLUnitConverter& ) const override; }; +} + bool XMLWrapPropHdl_Impl::importXML( const OUString& rStrImpValue, Any& rValue, @@ -486,6 +506,8 @@ bool XMLWrapPropHdl_Impl::exportXML( return bRet; } +namespace { + class XMLFrameProtectPropHdl_Impl : public XMLPropertyHandler { const OUString sVal; @@ -503,6 +525,8 @@ public: const SvXMLUnitConverter& ) const override; }; +} + bool XMLFrameProtectPropHdl_Impl::importXML( const OUString& rStrImpValue, Any& rValue, @@ -661,6 +685,8 @@ bool XMLTextColumnsPropertyHandler::exportXML( return false; } +namespace { + class XMLHoriMirrorPropHdl_Impl : public XMLPropertyHandler { public: @@ -674,6 +700,8 @@ public: const SvXMLUnitConverter& ) const override; }; +} + bool XMLHoriMirrorPropHdl_Impl::importXML( const OUString& rStrImpValue, Any& rValue, @@ -701,6 +729,8 @@ bool XMLHoriMirrorPropHdl_Impl::exportXML( return false; } +namespace { + class XMLGrfMirrorPropHdl_Impl : public XMLPropertyHandler { const OUString sVal; @@ -721,6 +751,8 @@ public: const SvXMLUnitConverter& ) const override; }; +} + bool XMLGrfMirrorPropHdl_Impl::importXML( const OUString& rStrImpValue, Any& rValue, @@ -795,6 +827,9 @@ SvXMLEnumMapEntry<sal_uInt16> const pXML_Emphasize_Enum[] = { XML_ACCENT, FontEmphasis::ACCENT_ABOVE }, { XML_TOKEN_INVALID, 0 } }; + +namespace { + class XMLTextEmphasizePropHdl_Impl : public XMLPropertyHandler { public: @@ -810,6 +845,8 @@ public: const SvXMLUnitConverter& ) const override; }; +} + bool XMLTextEmphasizePropHdl_Impl::importXML( const OUString& rStrImpValue, Any& rValue, @@ -891,6 +928,8 @@ bool XMLTextEmphasizePropHdl_Impl::exportXML( return bRet; } +namespace { + class XMLTextCombineCharPropHdl_Impl : public XMLPropertyHandler { public: @@ -906,6 +945,8 @@ public: const SvXMLUnitConverter& ) const override; }; +} + bool XMLTextCombineCharPropHdl_Impl::importXML( const OUString& rStrImpValue, Any& rValue, @@ -930,6 +971,8 @@ bool XMLTextCombineCharPropHdl_Impl::exportXML( return (1 == rStrExpValue.getLength()); } +namespace { + class XMLTextRelWidthHeightPropHdl_Impl : public XMLPropertyHandler { public: @@ -945,6 +988,8 @@ public: const SvXMLUnitConverter& ) const override; }; +} + bool XMLTextRelWidthHeightPropHdl_Impl::importXML( const OUString& rStrImpValue, Any& rValue, @@ -977,6 +1022,8 @@ bool XMLTextRelWidthHeightPropHdl_Impl::exportXML( return bRet; } +namespace { + class XMLTextSyncWidthHeightPropHdl_Impl : public XMLPropertyHandler { const OUString sValue; @@ -995,6 +1042,8 @@ public: const SvXMLUnitConverter& ) const override; }; +} + bool XMLTextSyncWidthHeightPropHdl_Impl::importXML( const OUString& rStrImpValue, Any& rValue, @@ -1020,6 +1069,8 @@ bool XMLTextSyncWidthHeightPropHdl_Impl::exportXML( return bRet; } +namespace { + class XMLTextRotationAnglePropHdl_Impl : public XMLPropertyHandler { @@ -1036,6 +1087,8 @@ public: const SvXMLUnitConverter& ) const override; }; +} + bool XMLTextRotationAnglePropHdl_Impl::importXML( const OUString& rStrImpValue, Any& rValue, @@ -1077,6 +1130,8 @@ bool XMLTextRotationAnglePropHdl_Impl::exportXML( return bRet; } +namespace { + class XMLNumber8OneBasedHdl : public XMLPropertyHandler { @@ -1093,6 +1148,8 @@ public: const SvXMLUnitConverter& ) const override; }; +} + bool XMLNumber8OneBasedHdl::importXML( const OUString& rStrImpValue, Any& rValue, @@ -1119,6 +1176,8 @@ bool XMLNumber8OneBasedHdl::exportXML( return bRet; } +namespace { + class XMLGraphicPropertyHandler : public XMLPropertyHandler { public: @@ -1139,6 +1198,8 @@ public: virtual bool equals(const css::uno::Any& rAny1, const css::uno::Any& rAny2) const override; }; +} + bool XMLGraphicPropertyHandler::equals(const Any& rAny1, const Any& rAny2) const { uno::Reference<graphic::XGraphic> xGraphic1; diff --git a/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx b/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx index 187333016852..a4fcb6129eba 100644 --- a/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx +++ b/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx @@ -32,6 +32,8 @@ using namespace ::xmloff::token; using ::com::sun::star::uno::Reference; +namespace { + class XMLAxisOASISContext : public XMLPersElemContentTContext { public: @@ -53,6 +55,8 @@ private: bool m_bHasCategories; }; +} + XMLAxisOASISContext::XMLAxisOASISContext( XMLTransformerBase& rTransformer, const OUString& rQName, diff --git a/xmloff/source/transform/MergeElemTContext.cxx b/xmloff/source/transform/MergeElemTContext.cxx index ac10b3044282..3d0a7543a6a4 100644 --- a/xmloff/source/transform/MergeElemTContext.cxx +++ b/xmloff/source/transform/MergeElemTContext.cxx @@ -30,6 +30,8 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::xml::sax; using namespace ::xmloff::token; +namespace { + class XMLParagraphTransformerContext : public XMLTransformerContext { public: @@ -44,6 +46,8 @@ public: const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; }; +} + XMLParagraphTransformerContext::XMLParagraphTransformerContext( XMLTransformerBase& rImp, const OUString& rQName ) : @@ -61,6 +65,8 @@ rtl::Reference<XMLTransformerContext> XMLParagraphTransformerContext::CreateChil rQName, true ); } +namespace { + class XMLPersTextContentRNGTransformTContext : public XMLPersTextContentTContext { public: @@ -73,6 +79,8 @@ public: virtual void Characters( const OUString& rChars ) override; }; +} + XMLPersTextContentRNGTransformTContext::XMLPersTextContentRNGTransformTContext( XMLTransformerBase& rTransformer, const OUString& rQName, diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx index 1e6055ebec14..2badb088e673 100644 --- a/xmloff/source/transform/OOo2Oasis.cxx +++ b/xmloff/source/transform/OOo2Oasis.cxx @@ -1090,6 +1090,8 @@ static XMLTokenEnum const aTokenMap[] = XML_TOKEN_END }; +namespace { + class XMLDocumentTransformerContext_Impl : public XMLTransformerContext { OUString const m_aElemQName; @@ -1107,6 +1109,8 @@ public: virtual void EndElement() override; }; +} + XMLDocumentTransformerContext_Impl::XMLDocumentTransformerContext_Impl( XMLTransformerBase& rImp, const OUString& rQName ) : @@ -1229,6 +1233,8 @@ void XMLDocumentTransformerContext_Impl::EndElement() GetTransformer().SetClass( m_aOldClass ); } +namespace { + class XMLBodyTransformerContext_Impl : public XMLTransformerContext { OUString m_aClassQName; @@ -1241,6 +1247,8 @@ public: virtual void EndElement() override; }; +} + XMLBodyTransformerContext_Impl::XMLBodyTransformerContext_Impl( XMLTransformerBase& rImp, const OUString& rQName ) : @@ -1283,6 +1291,8 @@ void XMLBodyTransformerContext_Impl::EndElement() XMLTransformerContext::EndElement(); } +namespace { + class XMLTabStopOOoTContext_Impl : public XMLPersElemContentTContext { public: @@ -1292,6 +1302,8 @@ public: virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; }; +} + XMLTabStopOOoTContext_Impl::XMLTabStopOOoTContext_Impl( XMLTransformerBase& rImp, const OUString& rQName ) : @@ -1370,6 +1382,8 @@ void XMLTabStopOOoTContext_Impl::StartElement( XMLPersElemContentTContext::StartElement( xAttrList ); } +namespace { + class XMLTrackedChangesOOoTContext_Impl : public XMLTransformerContext { sal_uInt16 const m_nPrefix; @@ -1384,6 +1398,8 @@ public: virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; }; +} + XMLTrackedChangesOOoTContext_Impl::XMLTrackedChangesOOoTContext_Impl( XMLTransformerBase& rImp, const OUString& rQName, @@ -1435,6 +1451,8 @@ void XMLTrackedChangesOOoTContext_Impl::StartElement( XMLTransformerContext::StartElement( rAttrList ); } +namespace { + class XMLTableOOoTransformerContext_Impl : public XMLTransformerContext { OUString const m_aElemQName; @@ -1447,6 +1465,8 @@ public: virtual void EndElement() override; }; +} + XMLTableOOoTransformerContext_Impl::XMLTableOOoTransformerContext_Impl( XMLTransformerBase& rImp, const OUString& rQName ) : diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx index 0f55019aa7b9..896b424f87e0 100644 --- a/xmloff/source/transform/Oasis2OOo.cxx +++ b/xmloff/source/transform/Oasis2OOo.cxx @@ -1148,6 +1148,8 @@ static XMLTokenEnum const aTokenMap[] = XML_DOT_DOT_DASH, XML_WAVE, XML_SMALL_WAVE, XML_TOKEN_END }; +namespace { + class XMLTableTransformerContext_Impl : public XMLTransformerContext { OUString m_aElemQName; @@ -1160,6 +1162,8 @@ public: virtual void EndElement() override; }; +} + XMLTableTransformerContext_Impl::XMLTableTransformerContext_Impl( XMLTransformerBase& rImp, const OUString& rQName ) : @@ -1240,6 +1244,8 @@ void XMLTableTransformerContext_Impl::EndElement() GetTransformer().GetDocHandler()->endElement( m_aElemQName ); } +namespace { + class XMLBodyOASISTransformerContext_Impl : public XMLTransformerContext { bool m_bFirstChild; @@ -1257,6 +1263,8 @@ public: virtual void EndElement() override; }; +} + XMLBodyOASISTransformerContext_Impl::XMLBodyOASISTransformerContext_Impl( XMLTransformerBase& rImp, const OUString& rQName ) : @@ -1292,6 +1300,8 @@ void XMLBodyOASISTransformerContext_Impl::EndElement() XMLTransformerContext::EndElement(); } +namespace { + class XMLTabStopOASISTContext_Impl : public XMLPersElemContentTContext { public: @@ -1301,6 +1311,8 @@ public: virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; }; +} + XMLTabStopOASISTContext_Impl::XMLTabStopOASISTContext_Impl( XMLTransformerBase& rImp, const OUString& rQName ) : @@ -1411,6 +1423,8 @@ void XMLTabStopOASISTContext_Impl::StartElement( XMLPersElemContentTContext::StartElement( xAttrList ); } +namespace { + class XMLConfigItemTContext_Impl : public XMLTransformerContext { OUString m_aContent; @@ -1428,6 +1442,8 @@ public: virtual void Characters( const OUString& rChars ) override; }; +} + XMLConfigItemTContext_Impl::XMLConfigItemTContext_Impl( XMLTransformerBase& rImp, const OUString& rQName ) : @@ -1512,6 +1528,8 @@ void XMLConfigItemTContext_Impl::EndElement() XMLTransformerContext::EndElement(); } +namespace { + class XMLTrackedChangesOASISTContext_Impl : public XMLTransformerContext { OUString const m_aAttrQName; @@ -1526,6 +1544,8 @@ public: virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; }; +} + XMLTrackedChangesOASISTContext_Impl::XMLTrackedChangesOASISTContext_Impl( XMLTransformerBase& rImp, const OUString& rQName, diff --git a/xmloff/source/transform/PersMixedContentTContext.cxx b/xmloff/source/transform/PersMixedContentTContext.cxx index 6d5342a09df3..f892530ac111 100644 --- a/xmloff/source/transform/PersMixedContentTContext.cxx +++ b/xmloff/source/transform/PersMixedContentTContext.cxx @@ -25,6 +25,8 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::xml::sax; +namespace { + class XMLPersTextTContext_Impl : public XMLTransformerContext { OUString m_aCharacters; @@ -45,6 +47,8 @@ public: virtual void Export() override; }; +} + XMLPersTextTContext_Impl::XMLPersTextTContext_Impl( XMLTransformerBase& rImp, const OUString& rChars ) : diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx index 00f429ee721b..584ae5985790 100644 --- a/xmloff/source/transform/StyleOOoTContext.cxx +++ b/xmloff/source/transform/StyleOOoTContext.cxx @@ -140,6 +140,8 @@ static const sal_uInt16 aElemActionMaps[XML_PROP_TYPE_END] = PROP_OOO_CHART_ELEM_ACTIONS }; +namespace { + class XMLTypedPropertiesOOoTContext_Impl : public XMLPersElemContentTContext { css::uno::Reference< css::xml::sax::XAttributeList > m_xAttrList; @@ -159,6 +161,8 @@ public: virtual void Export() override; }; +} + XMLTypedPropertiesOOoTContext_Impl::XMLTypedPropertiesOOoTContext_Impl( XMLTransformerBase& rImp, const OUString& rQName ) : @@ -202,6 +206,8 @@ void XMLTypedPropertiesOOoTContext_Impl::Export() } } +namespace { + class XMLPropertiesOOoTContext_Impl : public XMLTransformerContext { ::rtl::Reference < XMLTypedPropertiesOOoTContext_Impl > @@ -244,6 +250,8 @@ public: virtual bool IsPersistent() const override; }; +} + XMLTypedPropertiesOOoTContext_Impl *XMLPropertiesOOoTContext_Impl::GetPropContext( XMLPropType eType ) diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx index 35b10383f6d4..2235af1e2079 100644 --- a/xmloff/source/xforms/xformsexport.cxx +++ b/xmloff/source/xforms/xformsexport.cxx @@ -103,6 +103,9 @@ static void exportXFormsSchemas( SvXMLExport&, const Reference<css::xforms::XMod typedef OUString (*convert_t)( const Any& ); + +namespace { + struct ExportTable { const sal_Char* pPropertyName; @@ -110,6 +113,9 @@ struct ExportTable sal_uInt16 const nToken; convert_t const aConverter; }; + +} + static void lcl_export( const Reference<XPropertySet>& rPropertySet, SvXMLExport& rExport, const ExportTable* pTable ); |