diff options
Diffstat (limited to 'sw/source/core/unocore')
-rw-r--r-- | sw/source/core/unocore/unocoll.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/unocore/unofield.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/unocore/unoframe.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/unocore/unoidx.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/unocore/unoobj2.cxx | 15 | ||||
-rw-r--r-- | sw/source/core/unocore/unoparagraph.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/unocore/unoportenum.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/unocore/unorefmk.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/unocore/unosect.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 18 | ||||
-rw-r--r-- | sw/source/core/unocore/unotbl.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unotext.cxx | 4 |
12 files changed, 102 insertions, 6 deletions
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 787f38918915..ffd3316faf7f 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -92,6 +92,8 @@ using namespace ::com::sun::star::lang; #if HAVE_FEATURE_SCRIPTING +namespace { + class SwVbaCodeNameProvider : public ::cppu::WeakImplHelper< document::XCodeNameQuery > { SwDocShell* const mpDocShell; @@ -168,8 +170,12 @@ public: } }; +} + typedef std::unordered_map< OUString, OUString > StringHashMap; +namespace { + class SwVbaProjectNameProvider : public ::cppu::WeakImplHelper< container::XNameContainer > { StringHashMap mTemplateToProject; @@ -268,14 +274,20 @@ public: }; +} + #endif +namespace { + struct ProvNamesId_Type { const char * pName; SwServiceType const nType; }; +} + // note: this thing is indexed as an array, so do not insert/remove entries! const ProvNamesId_Type aProvNamesId[] = { diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index b5b7f4e1a88e..90b014202640 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -128,12 +128,16 @@ static const sal_uInt16 aDocInfoSubTypeFromService[] = DI_DOCNO //PROPERTY_MAP_FLDTYP_DOCINFO_REVISION }; +namespace { + struct ServiceIdResId { SwFieldIds const nResId; SwServiceType const nServiceId; }; +} + static const ServiceIdResId aServiceToRes[] = { {SwFieldIds::DateTime, SwServiceType::FieldTypeDateTime }, @@ -1071,6 +1075,8 @@ OUString SwXFieldMaster::LocalizeFormula( return rFormula; } +namespace { + struct SwFieldProperties_Impl { OUString sPar1; @@ -1112,6 +1118,8 @@ struct SwFieldProperties_Impl {} }; +} + class SwXTextField::Impl : public SvtListener { diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 294db651c919..7dbd91d656d4 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -962,6 +962,8 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI return bRet; } +namespace { + class SwFrameProperties_Impl : public BaseFrameProperties_Impl { public: @@ -970,6 +972,8 @@ public: bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrameSet, SfxItemSet& rSet, bool& rSizeFound) override; }; +} + SwFrameProperties_Impl::SwFrameProperties_Impl(): BaseFrameProperties_Impl(/*aSwMapProvider.GetPropertyMap(PROPERTY_MAP_TEXT_FRAME)*/ ) { @@ -1026,6 +1030,8 @@ bool SwFrameProperties_Impl::AnyToItemSet(SwDoc *pDoc, SfxItemSet& rSet, SfxItem return bRet; } +namespace { + class SwGraphicProperties_Impl : public BaseFrameProperties_Impl { public: @@ -1034,6 +1040,8 @@ public: virtual bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrameSet, SfxItemSet& rSet, bool& rSizeFound) override; }; +} + SwGraphicProperties_Impl::SwGraphicProperties_Impl( ) : BaseFrameProperties_Impl(/*aSwMapProvider.GetPropertyMap(PROPERTY_MAP_TEXT_GRAPHIC)*/ ) { @@ -1125,6 +1133,8 @@ bool SwGraphicProperties_Impl::AnyToItemSet( return bRet; } +namespace { + class SwOLEProperties_Impl : public SwFrameProperties_Impl { public: @@ -1134,6 +1144,8 @@ public: virtual bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrameSet, SfxItemSet& rSet, bool& rSizeFound) override; }; +} + bool SwOLEProperties_Impl::AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrameSet, SfxItemSet& rSet, bool& rSizeFound) { diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index ae93e9c63b07..87e06e218d7d 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -245,6 +245,8 @@ public: }; +namespace { + class SwDocIndexDescriptorProperties_Impl { private: @@ -259,6 +261,8 @@ public: void SetTypeName(const OUString& rSet) { m_sUserTOXTypeName = rSet; } }; +} + SwDocIndexDescriptorProperties_Impl::SwDocIndexDescriptorProperties_Impl( SwTOXType const*const pType) { @@ -1884,6 +1888,8 @@ SwXDocumentIndexMark::attach( m_pImpl->m_bIsDescriptor = false; } +namespace { + template<typename T> struct NotContainedIn { std::vector<T> const& m_rVector; @@ -1895,6 +1901,8 @@ template<typename T> struct NotContainedIn } }; +} + void SwXDocumentIndexMark::Impl::InsertTOXMark( SwTOXType & rTOXType, SwTOXMark & rMark, SwPaM & rPam, SwXTextCursor const*const pTextCursor) @@ -2639,11 +2647,15 @@ SwXDocumentIndex::TokenAccess_Impl::getSupportedServiceNames() return { "com.sun.star.text.DocumentIndexLevelFormat" }; } +namespace { + struct TokenType_ { const char *pName; enum FormTokenType const eTokenType; }; +} + static const struct TokenType_ g_TokenTypes[] = { { "TokenEntryNumber", TOKEN_ENTRY_NO }, diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 502e2e74c2dd..e4a282212751 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -138,6 +138,8 @@ void DeepCopyPaM(SwPaM const & rSource, SwPaM & rTarget) } // namespace sw +namespace { + struct FrameClientSortListLess { bool operator() (FrameClientSortListEntry const& r1, @@ -148,8 +150,6 @@ struct FrameClientSortListLess } }; -namespace -{ void lcl_CollectFrameAtNodeWithLayout(const SwContentFrame* pCFrame, FrameClientSortList_t& rFrames, const RndStdIds nAnchorType) @@ -399,6 +399,8 @@ void SwUnoCursorHelper::GetCursorAttr(SwPaM & rPam, } } +namespace { + struct SwXParagraphEnumerationImpl final : public SwXParagraphEnumeration { uno::Reference< text::XText > const m_xParentText; @@ -485,6 +487,8 @@ struct SwXParagraphEnumerationImpl final : public SwXParagraphEnumeration bool IgnoreLastElement(SwUnoCursor& rCursor, bool bMovedFromTable); }; +} + SwXParagraphEnumeration* SwXParagraphEnumeration::Create( uno::Reference< text::XText > const& xParent, const std::shared_ptr<SwUnoCursor>& pCursor, @@ -1418,6 +1422,8 @@ SwXTextRange::makeRedline( SwUnoCursorHelper::makeRedline( aPaM, rRedlineType, rRedlineProperties ); } +namespace { + struct SwXTextRangesImpl final : public SwXTextRanges { @@ -1462,6 +1468,8 @@ struct SwXTextRangesImpl final : public SwXTextRanges sw::UnoCursorPointer m_pUnoCursor; }; +} + void SwXTextRangesImpl::MakeRanges() { if (GetCursor()) @@ -1540,6 +1548,8 @@ void SwUnoCursorHelper::SetString(SwCursor & rCursor, const OUString& rString) pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::INSERT, nullptr); } +namespace { + struct SwXParaFrameEnumerationImpl final : public SwXParaFrameEnumeration { // XServiceInfo @@ -1584,6 +1594,7 @@ struct SwXParaFrameEnumerationImpl final : public SwXParaFrameEnumeration ::sw::UnoCursorPointer m_pUnoCursor; }; +} SwXParaFrameEnumeration* SwXParaFrameEnumeration::Create(const SwPaM& rPaM, const enum ParaFrameMode eParaFrameMode, SwFrameFormat* const pFormat) { return new SwXParaFrameEnumerationImpl(rPaM, eParaFrameMode, pFormat); } diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index 2b632ab78e79..2d3e33922aa3 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -59,6 +59,7 @@ using namespace ::com::sun::star; +namespace { class SwParaSelection { @@ -68,6 +69,8 @@ public: ~SwParaSelection(); }; +} + SwParaSelection::SwParaSelection(SwCursor & rCursor) : m_rCursor(rCursor) { diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 42d4658138a1..9cba2c7d9dd4 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -685,6 +685,8 @@ static void lcl_ExportSoftPageBreak( } } +namespace { + struct SwXRedlinePortion_Impl { const SwRangeRedline* m_pRedline; @@ -703,9 +705,13 @@ struct SwXRedlinePortion_Impl } }; +} + typedef std::shared_ptr < SwXRedlinePortion_Impl > SwXRedlinePortion_ImplSharedPtr; +namespace { + struct RedlineCompareStruct { static const SwPosition& getPosition ( const SwXRedlinePortion_ImplSharedPtr &r ) @@ -720,6 +726,8 @@ struct RedlineCompareStruct } }; +} + typedef std::multiset < SwXRedlinePortion_ImplSharedPtr, RedlineCompareStruct > SwXRedlinePortion_ImplList; diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index adab40c9d319..ee5756c761cd 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -187,6 +187,8 @@ SwXReferenceMark::getSupportedServiceNames() }; } +namespace { + template<typename T> struct NotContainedIn { std::vector<T> const& m_rVector; @@ -198,6 +200,8 @@ template<typename T> struct NotContainedIn } }; +} + void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam, SwXTextCursor const*const pCursor) { @@ -492,6 +496,8 @@ void SAL_CALL SwXReferenceMark::removeVetoableChangeListener( OSL_FAIL("SwXReferenceMark::removeVetoableChangeListener(): not implemented"); } +namespace { + class SwXMetaText : public cppu::OWeakObject, public SwXText { private: @@ -530,6 +536,8 @@ public: }; +} + SwXMetaText::SwXMetaText(SwDoc & rDoc, SwXMeta & rMeta) : SwXText(&rDoc, CursorType::Meta) , m_rMeta(rMeta) diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 05c4ba13275a..ff12dc325695 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -67,6 +67,8 @@ using namespace ::com::sun::star; +namespace { + struct SwTextSectionProperties_Impl { uno::Sequence<sal_Int8> m_Password; @@ -103,6 +105,8 @@ struct SwTextSectionProperties_Impl }; +} + class SwXTextSection::Impl : public SvtListener { diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 2169cb9cd285..acf2ae04d9f7 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -114,11 +114,11 @@ #include <set> #include <limits> +namespace { + class SwXStyle; class SwStyleProperties_Impl; -namespace -{ struct StyleFamilyEntry { using GetCountOrName_t = std::function<sal_Int32 (const SwDoc&, OUString*, sal_Int32)>; @@ -184,6 +184,8 @@ using namespace ::com::sun::star; namespace sw { + namespace { + class XStyleFamily : public cppu::WeakImplHelper < container::XNameContainer, @@ -281,8 +283,11 @@ namespace sw { return { "com.sun.star.style.StyleFamily" }; } }; + } } +namespace { + class SwStyleBase_Impl; class SwXStyle : public cppu::WeakImplHelper < @@ -454,6 +459,7 @@ public: virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues( const css::uno::Sequence< OUString >& aPropertyNames ) override; }; +} using sw::XStyleFamily; @@ -1114,6 +1120,8 @@ static const std::vector<ParagraphStyleCategoryEntry>* lcl_GetParagraphStyleCate return our_pParagraphStyleCategoryEntries; } +namespace { + class SwStyleProperties_Impl { const PropertyEntryVector_t aPropertyEntries; @@ -1168,6 +1176,8 @@ public: } }; +} + static SwGetPoolIdFromName lcl_GetSwEnumFromSfxEnum(SfxStyleFamily eFamily) { auto pEntries(lcl_GetStyleFamilyEntries()); @@ -1463,6 +1473,8 @@ void SwXStyle::ApplyDescriptorProperties() m_pPropertiesImpl->Apply(*this); } +namespace { + class SwStyleBase_Impl { private: @@ -1528,8 +1540,6 @@ public: }; }; -namespace -{ const char* STR_POOLPAGE_ARY[] = { // Page styles diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 1ad6dc454657..77330375aebf 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1805,6 +1805,8 @@ void SwXTextTableCursor::Notify( const SfxHint& rHint ) // SwXTextTable =========================================================== +namespace { + class SwTableProperties_Impl { SwUnoCursorHelper::SwAnyMapHelper aAnyMap; @@ -1819,6 +1821,8 @@ public: void ApplyTableAttr(const SwTable& rTable, SwDoc& rDoc); }; +} + SwTableProperties_Impl::SwTableProperties_Impl() { } diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index d49b07e35cb9..7b528399a035 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1777,6 +1777,8 @@ SwXText::convertToTextFrame( return xRet; } +namespace { + // Move previously imported paragraphs into a new text table. struct VerticallyMergedCell { @@ -1793,6 +1795,8 @@ struct VerticallyMergedCell } }; +} + #define COL_POS_FUZZY 2 static bool lcl_SimilarPosition( const sal_Int32 nPos1, const sal_Int32 nPos2 ) |