diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-04 10:29:18 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-05 09:30:41 +0200 |
commit | 259820af718fe15ea5080711f77918dad8f14fbb (patch) | |
tree | a80039fad41dfbfaeaa8fe0b7403c29336f37861 /sw/source/filter/ww8 | |
parent | 03e6cc9130864adcea5a1ae5440f24a9c128e8d6 (diff) |
loplugin:staticmethods
Change-Id: I90dd921077bbfc57200e398e7959306f26c65cfe
Diffstat (limited to 'sw/source/filter/ww8')
23 files changed, 90 insertions, 91 deletions
diff --git a/sw/source/filter/ww8/WW8FFData.hxx b/sw/source/filter/ww8/WW8FFData.hxx index 0f6dd3f51d7d..81e3e672da40 100644 --- a/sw/source/filter/ww8/WW8FFData.hxx +++ b/sw/source/filter/ww8/WW8FFData.hxx @@ -63,7 +63,7 @@ private: ::std::vector< OUString > msListEntries; protected: - void WriteOUString(SvStream * pStream, const OUString & rStr, bool bAddZero); + static void WriteOUString(SvStream * pStream, const OUString & rStr, bool bAddZero); public: WW8FFData(); diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx index 58a226a7202c..a4aabc6a9af1 100644 --- a/sw/source/filter/ww8/attributeoutputbase.hxx +++ b/sw/source/filter/ww8/attributeoutputbase.hxx @@ -363,7 +363,7 @@ public: protected: - void GetNumberPara( OUString& rStr, const SwField& rFld ); + static void GetNumberPara( OUString& rStr, const SwField& rFld ); /// Output frames - the implementation. virtual void OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point& rNdTopLeft ) = 0; diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 6b91f3663d7b..92a1b64eee51 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -6718,7 +6718,7 @@ void DocxAttributeOutput::FootnotesEndnotes( bool bFootnotes ) sal_Int32 nBody = bFootnotes? XML_footnotes: XML_endnotes; sal_Int32 nItem = bFootnotes? XML_footnote: XML_endnote; - m_pSerializer->startElementNS( XML_w, nBody, m_rExport.MainXmlNamespaces() ); + m_pSerializer->startElementNS( XML_w, nBody, DocxExport::MainXmlNamespaces() ); sal_Int32 nIndex = 0; diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 7ec178477215..8763530a6aff 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -416,7 +416,7 @@ private: void WriteOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrmFmt* rFlyFrmFmt ); /// checks whether the current component is a diagram - bool IsDiagram (const SdrObject* sdrObject); + static bool IsDiagram (const SdrObject* sdrObject); void InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); void StartTable( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); @@ -428,7 +428,7 @@ private: void EndTable(); void SyncNodelessCells(ww8::WW8TableNodeInfoInner::Pointer_t pInner, sal_Int32 nCell, sal_uInt32 nRow); void PopulateFrameProperties(const SwFrmFmt* pFrmFmt, const Size& rSize); - bool TextBoxIsFramePr(const SwFrmFmt& rFrmFmt); + static bool TextBoxIsFramePr(const SwFrmFmt& rFrmFmt); /// End cell, row, and even the entire table if necessary. void FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t pInner, bool bForceEmptyParagraph = false ); @@ -716,8 +716,8 @@ private: void CmdField_Impl( FieldInfos& rInfos ); void EndField_Impl( FieldInfos& rInfos ); - void AddToAttrList( std::unique_ptr<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrName, const sal_Char* sAttrValue ); - void AddToAttrList( std::unique_ptr<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nArgs, ... ); + static void AddToAttrList( std::unique_ptr<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrName, const sal_Char* sAttrValue ); + static void AddToAttrList( std::unique_ptr<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nArgs, ... ); std::unique_ptr<sax_fastparser::FastAttributeList> m_pFontsAttrList; std::unique_ptr<sax_fastparser::FastAttributeList> m_pEastAsianLayoutAttrList; @@ -953,7 +953,7 @@ public: void FootnotesEndnotes( bool bFootnotes ); /// writes the footnotePr/endnotePr (depending on tag) section - void WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr fs, int tag, const SwEndNoteInfo& info, int listtag ); + static void WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr fs, int tag, const SwEndNoteInfo& info, int listtag ); bool HasPostitFields() const; void WritePostitFields(); diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index f22cb911ed29..320eddd68214 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -858,11 +858,11 @@ void DocxExport::WriteSettings() // Has Footnotes if( m_pAttrOutput->HasFootnotes()) - m_pAttrOutput->WriteFootnoteEndnotePr( pFS, XML_footnotePr, m_pDoc->GetFtnInfo(), XML_footnote ); + DocxAttributeOutput::WriteFootnoteEndnotePr( pFS, XML_footnotePr, m_pDoc->GetFtnInfo(), XML_footnote ); // Has Endnotes if( m_pAttrOutput->HasEndnotes()) - m_pAttrOutput->WriteFootnoteEndnotePr( pFS, XML_endnotePr, m_pDoc->GetEndNoteInfo(), XML_endnote ); + DocxAttributeOutput::WriteFootnoteEndnotePr( pFS, XML_endnotePr, m_pDoc->GetEndNoteInfo(), XML_endnote ); // Has themeFontLang information uno::Reference< beans::XPropertySet > xPropSet( m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW ); diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx index ac1bbb3b2963..f3fe41399841 100644 --- a/sw/source/filter/ww8/docxexport.hxx +++ b/sw/source/filter/ww8/docxexport.hxx @@ -174,7 +174,7 @@ public: /// Returns the relationd id OString OutputChart( com::sun::star::uno::Reference< com::sun::star::frame::XModel >& xModel, sal_Int32 nCount, ::sax_fastparser::FSHelperPtr m_pSerializer ); OString WriteOLEObject( SwOLEObj& rObject, const OUString& sMediaType, const OUString& sRelationType, const OUString& sFileExtension ); - bool lcl_CopyStream( css::uno::Reference< css::io::XInputStream> xIn, css::uno::Reference< css::io::XOutputStream > xOut ); + static bool lcl_CopyStream( css::uno::Reference< css::io::XInputStream> xIn, css::uno::Reference< css::io::XOutputStream > xOut ); /// Writes the shape using drawingML syntax. void OutputDML( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape ); @@ -253,7 +253,7 @@ private: public: /// All xml namespaces to be used at the top of any text .xml file (main doc, headers, footers,...) - sax_fastparser::XFastAttributeListRef MainXmlNamespaces(); + static sax_fastparser::XFastAttributeListRef MainXmlNamespaces(); /// FIXME this is temporary, remotely reminding the method of the same /// name in WW8Export. diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 6427f01b48dc..f7f88831fa66 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -182,7 +182,7 @@ struct DocxSdrExport::Impl /// Writes wp wrapper code around an SdrObject, which itself is written using drawingML syntax. void textFrameShadow(const SwFrmFmt& rFrmFmt); - bool isSupportedDMLShape(uno::Reference<drawing::XShape> xShape); + static bool isSupportedDMLShape(uno::Reference<drawing::XShape> xShape); /// Undo the text direction mangling done by the frame btLr handler in writerfilter::dmapper::DomainMapper::lcl_startCharacterGroup() bool checkFrameBtlr(SwNode* pStartNode, bool bDML); }; @@ -798,7 +798,7 @@ bool lcl_isLockedCanvas(uno::Reference<drawing::XShape> xShape) void DocxSdrExport::writeDMLDrawing(const SdrObject* pSdrObject, const SwFrmFmt* pFrmFmt, int nAnchorId) { uno::Reference<drawing::XShape> xShape(const_cast<SdrObject*>(pSdrObject)->getUnoShape(), uno::UNO_QUERY_THROW); - if (!m_pImpl->isSupportedDMLShape(xShape)) + if (!Impl::isSupportedDMLShape(xShape)) return; m_pImpl->m_rExport.DocxAttrOutput().GetSdtEndBefore(pSdrObject); @@ -935,7 +935,7 @@ void DocxSdrExport::writeDMLAndVMLDrawing(const SdrObject* sdrObj, const SwFrmFm // In case we are already inside a DML block, then write the shape only as VML, turn out that's allowed to do. // A common service created in util to check for VML shapes which are allowed to have textbox in content - if ((msfilter::util::HasTextBoxContent(eShapeType)) && m_pImpl->isSupportedDMLShape(xShape) && !bDMLAndVMLDrawingOpen) + if ((msfilter::util::HasTextBoxContent(eShapeType)) && Impl::isSupportedDMLShape(xShape) && !bDMLAndVMLDrawingOpen) { m_pImpl->m_pSerializer->startElementNS(XML_mc, XML_AlternateContent, FSEND); diff --git a/sw/source/filter/ww8/escher.hxx b/sw/source/filter/ww8/escher.hxx index bb291fa062a4..e2899709dbdb 100644 --- a/sw/source/filter/ww8/escher.hxx +++ b/sw/source/filter/ww8/escher.hxx @@ -103,12 +103,12 @@ protected: void WriteOLEPicture(EscherPropertyContainer &rPropOpt, sal_uInt32 nShapeFlags, const Graphic &rGraphic, const SdrObject &rObj, sal_uInt32 nShapeId, const com::sun::star::awt::Rectangle* pVisArea ); - void WriteGrfAttr(const SwNoTxtNode& rNd,EscherPropertyContainer& rPropOpt); + static void WriteGrfAttr(const SwNoTxtNode& rNd,EscherPropertyContainer& rPropOpt); sal_Int32 DrawModelToEmu(sal_Int32 nVal) const { return BigMulDiv(nVal, mnEmuMul, mnEmuDiv); } - sal_Int32 ToFract16(sal_Int32 nVal, sal_uInt32 nMax) const; + static sal_Int32 ToFract16(sal_Int32 nVal, sal_uInt32 nMax); virtual void SetPicId(const SdrObject &, sal_uInt32, EscherPropertyContainer &); SdrLayerID GetInvisibleHellId() const; diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 81272a5700a4..e49d52e9b1be 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -213,7 +213,7 @@ void RtfExport::BuildNumbering() else { pRule = rListTbl[ n ]; - if (!m_pDoc->IsUsed(*pRule)) + if (!SwDoc::IsUsed(*pRule)) continue; } @@ -863,12 +863,12 @@ void RtfExport::resetStream() SvStream& RtfExport::OutULong(sal_uLong nVal) { - return m_pWriter->OutULong(Strm(), nVal); + return Writer::OutULong(Strm(), nVal); } SvStream& RtfExport::OutLong(long nVal) { - return m_pWriter->OutLong(Strm(), nVal); + return Writer::OutLong(Strm(), nVal); } void RtfExport::OutUnicode(const sal_Char* pToken, const OUString& rContent, bool bUpr) diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 682eb68b0c97..3a9d1b405235 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -2190,7 +2190,7 @@ void SwBasicEscherEx::Init() SetHellLayerId(rWrt.m_pDoc->getIDocumentDrawModelAccess().GetHellId()); } -sal_Int32 SwBasicEscherEx::ToFract16(sal_Int32 nVal, sal_uInt32 nMax) const +sal_Int32 SwBasicEscherEx::ToFract16(sal_Int32 nVal, sal_uInt32 nMax) { if (nMax) { diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index e0a216cd2e9f..2cc8ea741b6b 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -1099,7 +1099,7 @@ OUString BookmarkToWriter(const OUString &rBookmark) void SwWW8AttrIter::OutSwFmtRefMark(const SwFmtRefMark& rAttr, bool) { if ( m_rExport.HasRefToObject( REF_SETREFATTR, &rAttr.GetRefName(), 0 ) ) - m_rExport.AppendBookmark( m_rExport.GetBookmarkName( REF_SETREFATTR, + m_rExport.AppendBookmark( MSWordExportBase::GetBookmarkName( REF_SETREFATTR, &rAttr.GetRefName(), 0 )); } diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx index c9185fde1e74..106df4478dad 100644 --- a/sw/source/filter/ww8/wrtw8num.cxx +++ b/sw/source/filter/ww8/wrtw8num.cxx @@ -82,7 +82,7 @@ sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule ) for ( sal_uInt16 n = m_pUsedNumTbl->size(); n; ) { const SwNumRule& rRule = *(*m_pUsedNumTbl)[ --n ]; - if ( !m_pDoc->IsUsed( rRule ) ) + if ( !SwDoc::IsUsed( rRule ) ) { m_pUsedNumTbl->erase( m_pUsedNumTbl->begin() + n ); } diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index f24fbd70d5ad..f2de75169340 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -203,7 +203,7 @@ sal_uInt16 MSWordStyles::BuildGetSlot( const SwFmt& rFmt ) } -sal_uInt16 MSWordStyles::GetWWId( const SwFmt& rFmt ) const +sal_uInt16 MSWordStyles::GetWWId( const SwFmt& rFmt ) { sal_uInt16 nRet = ww::stiUser; // User-Style als default sal_uInt16 nPoolId = rFmt.GetPoolFmtId(); @@ -1123,7 +1123,7 @@ sal_uInt16 MSWordSections::CurrentNumberOfColumns( const SwDoc &rDoc ) const return NumberOfColumns( rDoc, aSects.back() ); } -sal_uInt16 MSWordSections::NumberOfColumns( const SwDoc &rDoc, const WW8_SepInfo& rInfo ) const +sal_uInt16 MSWordSections::NumberOfColumns( const SwDoc &rDoc, const WW8_SepInfo& rInfo ) { const SwPageDesc* pPd = rInfo.pPageDesc; if ( !pPd ) diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 9b5a410682d0..c5cc65416083 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -217,7 +217,7 @@ public: sal_uInt16 CurrentNumberOfColumns( const SwDoc &rDoc ) const; /// Number of columns of the provided WW8_SepInfo. - sal_uInt16 NumberOfColumns( const SwDoc &rDoc, const WW8_SepInfo& rInfo ) const; + static sal_uInt16 NumberOfColumns( const SwDoc &rDoc, const WW8_SepInfo& rInfo ); bool DocumentIsProtected() const { return mbDocumentIsProtected; } @@ -612,7 +612,7 @@ public: bool HasRefToObject( sal_uInt16 nTyp, const OUString* pName, sal_uInt16 nSeqNo ); /// Find the bookmark name. - OUString GetBookmarkName( sal_uInt16 nTyp, const OUString* pName, sal_uInt16 nSeqNo ); + static OUString GetBookmarkName( sal_uInt16 nTyp, const OUString* pName, sal_uInt16 nSeqNo ); /// Add a bookmark converted to a Word name. void AppendWordBookmark( const OUString& rName ); @@ -710,10 +710,10 @@ public: void WriteHeaderFooterText( const SwFmt& rFmt, bool bHeader); /// Format of the section. - const SwSectionFmt* GetSectionFormat( const SwNode& rNd ) const; + static const SwSectionFmt* GetSectionFormat( const SwNode& rNd ); /// Line number of the section start. - sal_uLong GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) const; + static sal_uLong GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ); /// Start new section. void OutputSectionBreaks( const SfxItemSet *pSet, const SwNode& rNd, bool isCellOpen = false, bool isTextNodeEmpty = false); @@ -1567,7 +1567,7 @@ class MSWordStyles /// Outputs attributes of one style. void WriteProperties( const SwFmt* pFmt, bool bPap, sal_uInt16 nPos, bool bInsDefCharSiz ); - sal_uInt16 GetWWId( const SwFmt& rFmt ) const; + static sal_uInt16 GetWWId( const SwFmt& rFmt ); void SetStyleDefaults( const SwFmt& rFmt, bool bPap ); diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index f2f2d2fd6ef9..a5f249e65da3 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -585,7 +585,7 @@ bool MSWordExportBase::OutputFollowPageDesc( const SfxItemSet* pSet, const SwTxt return bRet; } -const SwSectionFmt* MSWordExportBase::GetSectionFormat( const SwNode& rNd ) const +const SwSectionFmt* MSWordExportBase::GetSectionFormat( const SwNode& rNd ) { const SwSectionFmt* pFmt = NULL; const SwSectionNode* pSect = rNd.FindSectionNode(); @@ -598,7 +598,7 @@ const SwSectionFmt* MSWordExportBase::GetSectionFormat( const SwNode& rNd ) cons return pFmt; } -sal_uLong MSWordExportBase::GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) const +sal_uLong MSWordExportBase::GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) { const SwFmtLineNumber* pNItem = 0; if ( pSet ) @@ -2950,7 +2950,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) { const OUString aRefName(rRFld.GetSetRefName()); sStr = FieldString(eFld) - + GetExport().GetBookmarkName(nSubType, &aRefName, 0); + + MSWordExportBase::GetBookmarkName(nSubType, &aRefName, 0); } switch (pFld->GetFormat()) { @@ -2982,7 +2982,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) break; } sStr = FieldString(eFld) - + GetExport().GetBookmarkName(nSubType, 0, rRFld.GetSeqNo()); + + MSWordExportBase::GetBookmarkName(nSubType, 0, rRFld.GetSeqNo()); break; } @@ -3346,7 +3346,7 @@ void AttributeOutputBase::TextFootnote( const SwFmtFtn& rFtn ) OUString sBkmkNm; if ( GetExport().HasRefToObject( nTyp, 0, rFtn.GetTxtFtn()->GetSeqRefNo() )) { - sBkmkNm = GetExport().GetBookmarkName( nTyp, 0, + sBkmkNm = MSWordExportBase::GetBookmarkName( nTyp, 0, rFtn.GetTxtFtn()->GetSeqRefNo() ); GetExport().AppendBookmark( sBkmkNm ); } diff --git a/sw/source/filter/ww8/ww8glsy.hxx b/sw/source/filter/ww8/ww8glsy.hxx index a112803cf227..38557d567ac3 100644 --- a/sw/source/filter/ww8/ww8glsy.hxx +++ b/sw/source/filter/ww8/ww8glsy.hxx @@ -40,7 +40,7 @@ public: // fGlsy will indicate whether this has AutoText or not bool IsGlossaryFib() { return fGlsy; } private: - sal_uInt32 FindGlossaryFibOffset(SvStream &rTableStrm,SvStream &rStrm, + static sal_uInt32 FindGlossaryFibOffset(SvStream &rTableStrm,SvStream &rStrm, const WW8Fib &rFib); }; @@ -70,10 +70,10 @@ private: SvStorageRef xStg; sal_uInt16 nStrings; - bool MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks, bool bSaveRelFile, + static bool MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks, bool bSaveRelFile, const ::std::vector<OUString>& rStrings, const ::std::vector<ww::bytes>& rExtra); - bool HasBareGraphicEnd(SwDoc *pD,SwNodeIndex &rIdx); + static bool HasBareGraphicEnd(SwDoc *pD,SwNodeIndex &rIdx); WW8Glossary(const WW8Glossary&) SAL_DELETED_FUNCTION; WW8Glossary& operator=(const WW8Glossary&) SAL_DELETED_FUNCTION; diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 5f61b6a441e4..5fb5ee5d957f 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1495,7 +1495,7 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, // If we have just one single inline graphic then // don't insert a field for the single frame, set // the frames hyperlink field attribute directly. - if (0 != (pFrm = rReader.ContainsSingleInlineGraphic(aRegion))) + if (0 != (pFrm = SwWW8ImplReader::ContainsSingleInlineGraphic(aRegion))) { const SwFmtINetFmt *pAttr = static_cast<const SwFmtINetFmt *>( rEntry.pAttr); @@ -4298,9 +4298,9 @@ void wwSectionManager::SetSegmentToPageDesc(const wwSection &rSection, SetPage(rPage, rFmt, rSection, bIgnoreCols); if (!(rSection.maSep.pgbApplyTo & 1)) - mrReader.SetPageBorder(rFmt, rSection); + SwWW8ImplReader::SetPageBorder(rFmt, rSection); if (!(rSection.maSep.pgbApplyTo & 2)) - mrReader.SetPageBorder(rPage.GetFirstMaster(), rSection); + SwWW8ImplReader::SetPageBorder(rPage.GetFirstMaster(), rSection); mrReader.SetDocumentGrid(rFmt, rSection); } diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 67cc51245ddb..bc3da9dc7387 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -859,21 +859,20 @@ private: void GetPageULData(const wwSection &rNewSection, wwULSpaceData& rData) const; - void SetPageULSpaceItems(SwFrmFmt &rFmt, wwULSpaceData& rData, - const wwSection &rSection) const; + static void SetPageULSpaceItems(SwFrmFmt &rFmt, wwULSpaceData& rData, + const wwSection &rSection); - void SetPage(SwPageDesc &rPageDesc, SwFrmFmt &rFmt, - const wwSection &rSection, bool bIgnoreCols) const; + static void SetPage(SwPageDesc &rPageDesc, SwFrmFmt &rFmt, + const wwSection &rSection, bool bIgnoreCols); - void SetNumberingType(const wwSection &rNewSection, SwPageDesc &rPageDesc) - const; + static void SetNumberingType(const wwSection &rNewSection, SwPageDesc &rPageDesc); void SetUseOn(wwSection &rSection); void SetHdFt(wwSection &rSection, int nSect, const wwSection *pPrevious); SwSectionFmt *InsertSection(SwPaM& rMyPaM, wwSection &rSection); - bool SetCols(SwFrmFmt &rFmt, const wwSection &rSection, - sal_uInt32 nNetWidth) const; + static bool SetCols(SwFrmFmt &rFmt, const wwSection &rSection, + sal_uInt32 nNetWidth); bool SectionIsProtected(const wwSection &rSection) const; void SetLeftRight(wwSection &rSection); bool IsNewDoc() const; @@ -1414,8 +1413,8 @@ private: bool ReadChar(long nPosCp, long nCpOfs); bool ReadPlainChars(WW8_CP& rPos, sal_Int32 nEnd, sal_Int32 nCpOfs); bool ReadChars(WW8_CP& rPos, WW8_CP nNextAttr, long nTextEnd, long nCpOfs); - bool LangUsesHindiNumbers(sal_uInt16 nLang); - sal_Unicode TranslateToHindiNumbers(sal_Unicode); + static bool LangUsesHindiNumbers(sal_uInt16 nLang); + static sal_Unicode TranslateToHindiNumbers(sal_Unicode); void SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection); @@ -1450,7 +1449,7 @@ private: const SfxPoolItem* GetFmtAttr( sal_uInt16 nWhich ); bool JoinNode(SwPaM &rPam, bool bStealAttr = false); - bool IsBorder(const WW8_BRCVer9* pbrc, bool bChkBtwn = false) const; + static bool IsBorder(const WW8_BRCVer9* pbrc, bool bChkBtwn = false); //Set closest writer border equivalent into rBox from pbrc, optionally //recording true winword dimensions in pSizeArray. nSetBorders to mark a @@ -1460,27 +1459,27 @@ private: // Note #i20672# we can't properly support between lines so best to ignore // them for now - bool SetBorder(SvxBoxItem& rBox, const WW8_BRCVer9* pbrc, - short *pSizeArray=0, sal_uInt8 nSetBorders=0xFF) const; - void GetBorderDistance(const WW8_BRCVer9* pbrc, Rectangle& rInnerDist) const; - sal_uInt16 GetParagraphAutoSpace(bool fDontUseHTMLAutoSpacing); - bool SetShadow(SvxShadowItem& rShadow, const short *pSizeArray, - const WW8_BRCVer9& aRightBrc) const; + static bool SetBorder(SvxBoxItem& rBox, const WW8_BRCVer9* pbrc, + short *pSizeArray=0, sal_uInt8 nSetBorders=0xFF); + static void GetBorderDistance(const WW8_BRCVer9* pbrc, Rectangle& rInnerDist); + static sal_uInt16 GetParagraphAutoSpace(bool fDontUseHTMLAutoSpacing); + static bool SetShadow(SvxShadowItem& rShadow, const short *pSizeArray, + const WW8_BRCVer9& aRightBrc); //returns true is a shadow was set - bool SetFlyBordersShadow(SfxItemSet& rFlySet, const WW8_BRCVer9 *pbrc, - short *SizeArray=0) const; - void SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) const; + static bool SetFlyBordersShadow(SfxItemSet& rFlySet, const WW8_BRCVer9 *pbrc, + short *SizeArray=0); + static void SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection); - sal_Int32 MatchSdrBoxIntoFlyBoxItem( const Color& rLineColor, + static sal_Int32 MatchSdrBoxIntoFlyBoxItem( const Color& rLineColor, MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, sal_Int32 &rLineWidth, SvxBoxItem& rBox ); void MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, SfxItemSet &aFlySet, MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, Rectangle &rInnerDist ); - void AdjustLRWrapForWordMargins(const SvxMSDffImportRec &rRecord, + static void AdjustLRWrapForWordMargins(const SvxMSDffImportRec &rRecord, SvxLRSpaceItem &rLR); - void AdjustULWrapForWordMargins(const SvxMSDffImportRec &rRecord, + static void AdjustULWrapForWordMargins(const SvxMSDffImportRec &rRecord, SvxULSpaceItem &rUL); - void MapWrapIntoFlyFmt(SvxMSDffImportRec* pRecord, SwFrmFmt* pFlyFmt); + static void MapWrapIntoFlyFmt(SvxMSDffImportRec* pRecord, SwFrmFmt* pFlyFmt); void SetAttributesAtGrfNode(SvxMSDffImportRec const* pRecord, SwFrmFmt *pFlyFmt, WW8_FSPA *pF); @@ -1496,7 +1495,7 @@ private: bool TestSameApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos); ApoTestResults TestApo(int nCellLevel, bool bTableRowEnd, const WW8_TablePos *pTabPos); - void StripNegativeAfterIndent(SwFrmFmt *pFlyFmt) const; + static void StripNegativeAfterIndent(SwFrmFmt *pFlyFmt); void EndSpecial(); bool ProcessSpecial(bool &rbReSync, WW8_CP nStartCp); @@ -1505,7 +1504,7 @@ private: bool ReadGrafFile(OUString& rFileName, Graphic*& rpGraphic, const WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos, bool* pDelIt); - void ReplaceObj(const SdrObject &rReplaceTextObj, + static void ReplaceObj(const SdrObject &rReplaceTextObj, SdrObject &rSubObj); SwFlyFrmFmt* MakeGrafNotInCntnt(const WW8PicDesc& rPD, @@ -1726,7 +1725,7 @@ public: // eigentlich private, geht aber leider nur public void Read_BoldBiDiUsw(sal_uInt16 nId, const sal_uInt8*, short nLen); void Read_SubSuper( sal_uInt16, const sal_uInt8*, short nLen ); bool ConvertSubToGraphicPlacement(); - SwFrmFmt *ContainsSingleInlineGraphic(const SwPaM &rRegion); + static SwFrmFmt *ContainsSingleInlineGraphic(const SwPaM &rRegion); void Read_SubSuperProp( sal_uInt16, const sal_uInt8*, short nLen ); void Read_Underline( sal_uInt16, const sal_uInt8*, short nLen ); void Read_TxtColor( sal_uInt16, const sal_uInt8*, short nLen ); @@ -1871,7 +1870,7 @@ public: // eigentlich private, geht aber leider nur public eF_ResT Read_F_OCX(WW8FieldDesc*, OUString&); eF_ResT Read_F_Hyperlink(WW8FieldDesc*, OUString& rStr); - eF_ResT Read_F_Shape(WW8FieldDesc* pF, OUString& rStr); + eF_ResT Read_F_Shape(WW8FieldDesc* pF, OUString& rStr); eF_ResT Read_F_HTMLControl( WW8FieldDesc* pF, OUString& rStr); void DeleteFormImpl(); diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index ed54f3bcac38..216721a824fd 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -2939,8 +2939,8 @@ void WW8TabDesc::SetTabBorders(SwTableBox* pBox, short nWwIdx) if (pActBand->pTCs) // neither Cell Border nor Default Border defined ? { WW8_TCell* pT = &pActBand->pTCs[nWwIdx]; - if (pIo->IsBorder(pT->rgbrc)) - pIo->SetBorder(aFmtBox, pT->rgbrc); + if (SwWW8ImplReader::IsBorder(pT->rgbrc)) + SwWW8ImplReader::SetBorder(aFmtBox, pT->rgbrc); } if (pActBand->nOverrideSpacing[nWwIdx] & (1 << WW8TabBandDesc::wwTOP)) @@ -3225,7 +3225,7 @@ void WW8TabDesc::TableCellEnd() { SwTableBox* pBox = (*pTabBoxes)[0]; SwSelBoxes aBoxes; - pIo->m_rDoc.InsertRow( pTable->SelLineFromBox( pBox, aBoxes ) ); + pIo->m_rDoc.InsertRow( SwTable::SelLineFromBox( pBox, aBoxes ) ); } } } diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 70f39f67d7b0..4ff82eb834e2 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -3322,8 +3322,8 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr ) (*m_pPaM).Move(fnMoveBackward); SwPaM aRegion(*m_pPaM, m_pPaM); - OSL_ENSURE(m_rDoc.GetCurTOX(*aRegion.GetPoint()), "Misunderstood how toc works"); - if (SwTOXBase* pBase2 = (SwTOXBase*)m_rDoc.GetCurTOX(*aRegion.GetPoint())) + OSL_ENSURE(SwDoc::GetCurTOX(*aRegion.GetPoint()), "Misunderstood how toc works"); + if (SwTOXBase* pBase2 = (SwTOXBase*)SwDoc::GetCurTOX(*aRegion.GetPoint())) { pBase2->SetMSTOCExpression(rStr); diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 3bbfafdc9743..8863e0a4cf51 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -322,7 +322,7 @@ void SwWW8ImplReader::Read_ParaBiDi(sal_uInt16, const sal_uInt8* pData, short nL } bool wwSectionManager::SetCols(SwFrmFmt &rFmt, const wwSection &rSection, - sal_uInt32 nNetWidth) const + sal_uInt32 nNetWidth) { //sprmSCcolumns - number of columns - 1 const sal_Int16 nCols = rSection.NoCols(); @@ -412,7 +412,7 @@ void wwSectionManager::SetLeftRight(wwSection &rSection) } void wwSectionManager::SetPage(SwPageDesc &rInPageDesc, SwFrmFmt &rFmt, - const wwSection &rSection, bool bIgnoreCols) const + const wwSection &rSection, bool bIgnoreCols) { // 1. Orientierung rInPageDesc.SetLandscape(rSection.IsLandScape()); @@ -437,7 +437,7 @@ static sal_uInt16 lcl_MakeSafeNegativeSpacing(sal_uInt16 nIn) return nIn; } -void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) const +void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) { if (!IsBorder(rSection.brc)) return; @@ -579,7 +579,7 @@ void wwSectionManager::GetPageULData(const wwSection &rSection, } void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt, - wwSectionManager::wwULSpaceData& rData, const wwSection &rSection) const + wwSectionManager::wwULSpaceData& rData, const wwSection &rSection) { if (rData.bHasHeader) // ... und Header-Lower setzen { @@ -762,7 +762,7 @@ wwSection::wwSection(const SwPosition &rPos) : maStart(rPos.nNode), } void wwSectionManager::SetNumberingType(const wwSection &rNewSection, - SwPageDesc &rPageDesc) const + SwPageDesc &rPageDesc) { // Seitennummernformat speichern static const SvxExtNumType aNumTyp[5] = @@ -1372,13 +1372,13 @@ static bool lcl_IsBorder(const WW8_BRCVer9* pbrc, bool bChkBtwn = false) (bChkBtwn && pbrc[WW8_BETW ].brcType()); } -bool SwWW8ImplReader::IsBorder(const WW8_BRCVer9* pbrc, bool bChkBtwn) const +bool SwWW8ImplReader::IsBorder(const WW8_BRCVer9* pbrc, bool bChkBtwn) { return lcl_IsBorder(pbrc, bChkBtwn); } bool SwWW8ImplReader::SetBorder(SvxBoxItem& rBox, const WW8_BRCVer9* pbrc, - short *pSizeArray, sal_uInt8 nSetBorders) const + short *pSizeArray, sal_uInt8 nSetBorders) { bool bChange = false; static const std::pair<sal_uInt16, SvxBoxItemLine> aIdArr[] = @@ -1419,7 +1419,7 @@ bool SwWW8ImplReader::SetBorder(SvxBoxItem& rBox, const WW8_BRCVer9* pbrc, } bool SwWW8ImplReader::SetShadow(SvxShadowItem& rShadow, const short *pSizeArray, - const WW8_BRCVer9& aRightBrc) const + const WW8_BRCVer9& aRightBrc) { bool bRet = aRightBrc.fShadow() && pSizeArray && pSizeArray[WW8_RIGHT]; if (bRet) @@ -1438,7 +1438,7 @@ bool SwWW8ImplReader::SetShadow(SvxShadowItem& rShadow, const short *pSizeArray, } void SwWW8ImplReader::GetBorderDistance(const WW8_BRCVer9* pbrc, - Rectangle& rInnerDist) const + Rectangle& rInnerDist) { rInnerDist = Rectangle( pbrc[ 1 ].dptSpace() * 20, pbrc[ 0 ].dptSpace() * 20, @@ -1447,7 +1447,7 @@ void SwWW8ImplReader::GetBorderDistance(const WW8_BRCVer9* pbrc, } bool SwWW8ImplReader::SetFlyBordersShadow(SfxItemSet& rFlySet, - const WW8_BRCVer9 *pbrc, short *pSizeArray) const + const WW8_BRCVer9 *pbrc, short *pSizeArray) { bool bShadowed = false; if (IsBorder(pbrc)) @@ -2037,7 +2037,7 @@ WW8FlySet::WW8FlySet(SwWW8ImplReader& rReader, const WW8FlyPara* pFW, Put( aSurround ); short aSizeArray[5]={0}; - rReader.SetFlyBordersShadow(*this,pFW->brc,&aSizeArray[0]); + SwWW8ImplReader::SetFlyBordersShadow(*this,pFW->brc,&aSizeArray[0]); // der 5. Parameter ist immer 0, daher geht beim Cast nix verloren @@ -2084,7 +2084,7 @@ WW8FlySet::WW8FlySet( SwWW8ImplReader& rReader, const SwPaM* pPaM, WW8_BRCVer9 brcVer9[4]; for (int i = 0; i < 4; i++) brcVer9[i] = rPic.rgbrc[i]; - if (rReader.SetFlyBordersShadow( *this, brcVer9, &aSizeArray[0])) + if (SwWW8ImplReader::SetFlyBordersShadow( *this, brcVer9, &aSizeArray[0])) { Put(SvxLRSpaceItem( aSizeArray[WW8_LEFT], 0, 0, 0, RES_LR_SPACE ) ); Put(SvxULSpaceItem( aSizeArray[WW8_TOP], 0, RES_UL_SPACE )); @@ -2431,7 +2431,7 @@ bool SwWW8ImplReader::JoinNode(SwPaM &rPam, bool bStealAttr) } //In auto-width word frames negative after-indent values are ignored -void SwWW8ImplReader::StripNegativeAfterIndent(SwFrmFmt *pFlyFmt) const +void SwWW8ImplReader::StripNegativeAfterIndent(SwFrmFmt *pFlyFmt) { const SwNodeIndex* pSttNd = pFlyFmt->GetCntnt().GetCntntIdx(); if (!pSttNd) diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index e409085e493b..5064172a981b 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -3365,7 +3365,7 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p) pPieceIter->SetIdx( nOldPos ); } else - pPcd->AktPieceFc2Cp( p->nStartPos, p->nEndPos,&rSBase ); + WW8PLCFx_PCD::AktPieceFc2Cp( p->nStartPos, p->nEndPos,&rSBase ); } else { @@ -3399,7 +3399,7 @@ void WW8PLCFx_Cp_FKP::advance() // get Fkp entry WW8PLCFx_Fc_FKP::GetSprmsAndPos(nAttrStart, nAttrEnd, nFkpLen); - pPcd->AktPieceFc2Cp( nAttrStart, nAttrEnd, &rSBase ); + WW8PLCFx_PCD::AktPieceFc2Cp( nAttrStart, nAttrEnd, &rSBase ); bLineEnd = (ePLCF == PAP); } diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index 613649e7800d..02ebf3bc19cf 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -456,7 +456,7 @@ public: virtual void advance() SAL_OVERRIDE; WW8_CP AktPieceStartFc2Cp( WW8_FC nStartPos ); WW8_FC AktPieceStartCp2Fc( WW8_CP nCp ); - void AktPieceFc2Cp(WW8_CP& rStartPos, WW8_CP& rEndPos, + static void AktPieceFc2Cp(WW8_CP& rStartPos, WW8_CP& rEndPos, const WW8ScannerBase *pSBase); WW8PLCFpcd_Iter* GetPLCFIter() { return pPcdI; } void SetClipStart(WW8_CP nIn) { nClipStart = nIn; } @@ -902,7 +902,7 @@ private: sal_uInt16 WhereIdx(bool* pbStart=0, long* pPos=0) const; void AdjustEnds(WW8PLCFxDesc& rDesc); void GetNewSprms(WW8PLCFxDesc& rDesc); - void GetNewNoSprms(WW8PLCFxDesc& rDesc); + static void GetNewNoSprms(WW8PLCFxDesc& rDesc); void GetSprmStart(short nIdx, WW8PLCFManResult* pRes) const; void GetSprmEnd(short nIdx, WW8PLCFManResult* pRes) const; void GetNoSprmStart(short nIdx, WW8PLCFManResult* pRes) const; |