diff options
Diffstat (limited to 'sw/source/core/doc')
-rw-r--r-- | sw/source/core/doc/doc.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/docbm.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/doccomp.cxx | 9 | ||||
-rw-r--r-- | sw/source/core/doc/docedt.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/doctxm.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/gctable.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/htmltbl.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/number.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/doc/swstylemanager.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/doc/tblrwcl.cxx | 16 |
10 files changed, 61 insertions, 4 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 246ffc1a5c8a..4ad631e560b2 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -461,6 +461,8 @@ void SwDoc::ChgDBData(const SwDBData& rNewData) getIDocumentFieldsAccess().GetSysFieldType(SwFieldIds::DatabaseName)->UpdateFields(); } +namespace { + struct PostItField_ : public SetGetExpField { PostItField_( const SwNodeIndex& rNdIdx, const SwTextField* pField ) @@ -476,6 +478,8 @@ struct PostItField_ : public SetGetExpField } }; +} + sal_uInt16 PostItField_::GetPageNo( const StringRangeEnumerator &rRangeEnum, const std::set< sal_Int32 > &rPossiblePages, diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index c0c973904bf5..dec1b3d58654 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -1117,6 +1117,8 @@ namespace sw { namespace mark lcl_DebugMarks(m_vAllMarks); } + namespace { + struct LazyFieldmarkDeleter : public IDocumentMarkAccess::ILazyDeleter { std::unique_ptr<Fieldmark> m_pFieldmark; @@ -1136,6 +1138,8 @@ namespace sw { namespace mark } }; + } + std::unique_ptr<IDocumentMarkAccess::ILazyDeleter> MarkManager::deleteMark(const const_iterator_t& ppMark) { diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index 534f471e9310..e3562414907d 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -47,6 +47,8 @@ using namespace ::com::sun::star; using std::vector; +namespace { + class SwCompareLine { const SwNode& rNode; @@ -307,8 +309,13 @@ struct CmpOptionsContainer int nIgnoreLen; bool bUseRsid; }; + +} + static CmpOptionsContainer CmpOptions; +namespace { + class CommonSubseq { private: @@ -372,6 +379,8 @@ public: } }; +} + CompareData::~CompareData() { if( pDelRing ) diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 7ecb764e30b5..3cc2e8b6144c 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -721,6 +721,8 @@ uno::Any SwDoc::Spell( SwPaM& rPaM, return aRet; } +namespace { + class SwHyphArgs : public SwInterHyphInfo { const SwNode *pStart; @@ -744,6 +746,8 @@ public: sal_uInt16 *GetPageSt() { return pPageSt; } }; +} + SwHyphArgs::SwHyphArgs( const SwPaM *pPam, const Point &rCursorPos, sal_uInt16* pPageCount, sal_uInt16* pPageStart ) : SwInterHyphInfo( rCursorPos ), pNode(nullptr), diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index d429af8bdf89..1526f0bd347e 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -192,6 +192,8 @@ void SwDoc::DeleteTOXMark( const SwTOXMark* pTOXMark ) getIDocumentState().SetModified(); } +namespace { + /// Travel between table of content Marks class CompareNodeContent { @@ -219,6 +221,8 @@ public: ( nNode == rCmp.nNode && nContent >= rCmp.nContent); } }; +} + const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark, SwTOXSearch eDir, bool bInReadOnly ) { diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx index 493ef4248c91..ddcf9e20c0f4 100644 --- a/sw/source/core/doc/gctable.cxx +++ b/sw/source/core/doc/gctable.cxx @@ -319,6 +319,8 @@ static void lcl_GC_Box_Border( const SwTableBox* pBox, SwGCLineBorder* pPara ) } } +namespace { + struct GCLinePara { SwTableLines* pLns; @@ -329,6 +331,8 @@ struct GCLinePara {} }; +} + static bool lcl_MergeGCLine(SwTableLine* pLine, GCLinePara* pPara); static bool lcl_MergeGCBox(SwTableBox* pTableBox, GCLinePara* pPara) diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx index 2873c98161e5..8e6f8ac1d446 100644 --- a/sw/source/core/doc/htmltbl.cxx +++ b/sw/source/core/doc/htmltbl.cxx @@ -48,6 +48,8 @@ using namespace ::com::sun::star; #define COLFUZZY 20 #define MAX_TABWIDTH (USHRT_MAX - 2001) +namespace { + class SwHTMLTableLayoutConstraints { sal_uInt16 const nRow; // start row @@ -72,6 +74,8 @@ public: sal_uInt16 GetColumn() const { return nCol; } }; +} + SwHTMLTableLayoutCnts::SwHTMLTableLayoutCnts(const SwStartNode *pSttNd, std::shared_ptr<SwHTMLTableLayout> const& rTab, bool bNoBrTag, diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index f57933440278..44b59a283faf 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -1050,6 +1050,8 @@ void SwNumRule::SetGrabBagItem(const uno::Any& rVal) namespace numfunc { + namespace { + /** class containing default bullet list configuration data */ class SwDefBulletConfig : private utl::ConfigItem { @@ -1112,8 +1114,6 @@ namespace numfunc std::unique_ptr<vcl::Font> mpFont; }; - namespace - { class theSwDefBulletConfig : public rtl::Static<SwDefBulletConfig, theSwDefBulletConfig>{}; } @@ -1276,6 +1276,8 @@ namespace numfunc return SwDefBulletConfig::getInstance().GetChar( nLevel ); } + namespace { + /** class containing configuration data about user interface behavior regarding lists and list items. configuration item about behavior of <TAB>/<SHIFT-TAB>-key at first @@ -1312,8 +1314,6 @@ namespace numfunc bool mbChangeIndentOnTabAtFirstPosOfFirstListItem; }; - namespace - { class theSwNumberingUIBehaviorConfig : public rtl::Static<SwNumberingUIBehaviorConfig, theSwNumberingUIBehaviorConfig>{}; } diff --git a/sw/source/core/doc/swstylemanager.cxx b/sw/source/core/doc/swstylemanager.cxx index abb217bcf80b..3af1b80d7596 100644 --- a/sw/source/core/doc/swstylemanager.cxx +++ b/sw/source/core/doc/swstylemanager.cxx @@ -26,6 +26,8 @@ typedef std::unordered_map< OUString, std::shared_ptr<SfxItemSet> > SwStyleNameCache; +namespace { + class SwStyleCache { SwStyleNameCache mMap; @@ -37,6 +39,8 @@ public: std::shared_ptr<SfxItemSet> getByName( const OUString& rName ) { return mMap[rName]; } }; +} + void SwStyleCache::addCompletePool( StylePool& rPool ) { std::unique_ptr<IStylePoolIteratorAccess> pIter = rPool.createIterator(); @@ -49,6 +53,8 @@ void SwStyleCache::addCompletePool( StylePool& rPool ) } } +namespace { + class SwStyleManager : public IStyleAccess { StylePool aAutoCharPool; @@ -74,6 +80,8 @@ public: virtual void clearCaches() override; }; +} + std::unique_ptr<IStyleAccess> createStyleManager( SfxItemSet const * pIgnorableParagraphItems ) { return std::make_unique<SwStyleManager>( pIgnorableParagraphItems ); diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index 1c295d097a6a..dd150db18b2a 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -69,6 +69,8 @@ using namespace com::sun::star::uno; #define CHECK_TABLE(t) #endif +namespace { + // In order to set the Frame Formats for the Boxes, it's enough to look // up the current one in the array. If it's already there return the new one. struct CpyTabFrame @@ -121,6 +123,8 @@ struct CR_SetBoxWidth } }; +} + static bool lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam, SwTwips nDist, bool bCheck ); static bool lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam, @@ -161,6 +165,8 @@ typedef bool (*FN_lcl_SetBoxWidth)(SwTableLine*, CR_SetBoxWidth&, SwTwips, bool #endif // DBG_UTIL +namespace { + struct CR_SetLineHeight { SwTableNode* pTableNd; @@ -183,6 +189,8 @@ struct CR_SetLineHeight {} }; +} + static bool lcl_SetSelLineHeight( SwTableLine* pLine, const CR_SetLineHeight& rParam, SwTwips nDist, bool bCheck ); static bool lcl_SetOtherLineHeight( SwTableLine* pLine, const CR_SetLineHeight& rParam, @@ -192,6 +200,8 @@ typedef bool (*FN_lcl_SetLineHeight)(SwTableLine*, CR_SetLineHeight&, SwTwips, b typedef o3tl::sorted_vector<CpyTabFrame> CpyTabFrames; +namespace { + struct CpyPara { std::shared_ptr< std::vector< std::vector< sal_uLong > > > pWidths; @@ -233,6 +243,8 @@ struct CpyPara {} }; +} + static void lcl_CopyRow(FndLine_ & rFndLine, CpyPara *const pCpyPara); static void lcl_CopyCol( FndBox_ & rFndBox, CpyPara *const pCpyPara) @@ -1306,6 +1318,8 @@ static void lcl_CalcWidth( SwTableBox* pBox ) pFormat->ResetFormatAttr( RES_BOXATR_BEGIN, RES_BOXATR_END - 1 ); } +namespace { + struct InsULPara { SwTableNode* pTableNd; @@ -1331,6 +1345,8 @@ struct InsULPara { bUL_LR = true; bUL = false; if( pLine ) pInsLine = pLine; } }; +} + static void lcl_Merge_MoveLine(FndLine_ & rFndLine, InsULPara *const pULPara); static void lcl_Merge_MoveBox(FndBox_ & rFndBox, InsULPara *const pULPara) |