accessibility/inc/accessibility/extended/textwindowaccessibility.hxx | 4 accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx | 2 basctl/source/basicide/baside2.cxx | 2 basctl/source/basicide/baside2b.cxx | 4 basic/inc/sbstdobj.hxx | 12 - basic/qa/cppunit/basictest.hxx | 2 basic/source/basmgr/basicmanagerrepository.cxx | 6 basic/source/basmgr/basmgr.cxx | 6 basic/source/classes/sbxmod.cxx | 4 basic/source/comp/codegen.cxx | 2 basic/source/inc/basiccharclass.hxx | 2 basic/source/inc/namecont.hxx | 11 - basic/source/inc/parser.hxx | 2 basic/source/inc/runtime.hxx | 4 basic/source/inc/stdobj.hxx | 4 basic/source/runtime/ddectrl.hxx | 2 chart2/source/view/main/ChartView.cxx | 4 compilerplugins/clang/staticmethods.cxx | 30 +++- cppcanvas/source/inc/implrenderer.hxx | 20 +- cppcanvas/source/mtfrenderer/emfplus.cxx | 6 cppcanvas/source/mtfrenderer/implrenderer.cxx | 8 - cppcanvas/source/mtfrenderer/transparencygroupaction.cxx | 2 cppcanvas/source/uno/uno_mtfrenderer.cxx | 5 cppcanvas/source/wrapper/basegfxfactory.cxx | 26 --- cppcanvas/source/wrapper/vclfactory.cxx | 28 ---- editeng/source/editeng/editdoc.cxx | 2 editeng/source/editeng/editdoc.hxx | 4 editeng/source/editeng/editeng.cxx | 2 editeng/source/editeng/impedit.hxx | 8 - editeng/source/editeng/impedit2.cxx | 2 editeng/source/editeng/impedit3.cxx | 4 editeng/source/editeng/impedit4.cxx | 4 editeng/source/editeng/impedit5.cxx | 2 editeng/source/items/flditem.cxx | 2 editeng/source/items/justifyitem.cxx | 6 editeng/source/lookuptree/Trie.cxx | 2 editeng/source/misc/splwrap.cxx | 2 editeng/source/misc/unolingu.cxx | 2 editeng/source/outliner/outleeng.cxx | 2 editeng/source/outliner/outlin2.cxx | 2 editeng/source/outliner/outliner.cxx | 2 editeng/source/uno/unoipset.cxx | 4 editeng/source/uno/unotext.cxx | 6 embeddedobj/source/inc/commonembobj.hxx | 2 embeddedobj/source/inc/docholder.hxx | 2 filter/source/graphicfilter/idxf/dxf2mtf.hxx | 2 filter/source/graphicfilter/ios2met/ios2met.cxx | 2 filter/source/graphicfilter/itiff/ccidecom.hxx | 4 hwpfilter/source/cspline.cxx | 8 - hwpfilter/source/hwpreader.hxx | 4 hwpfilter/source/solver.h | 8 - include/basic/basmgr.hxx | 4 include/basic/sbmod.hxx | 2 include/basic/sbstar.hxx | 2 include/cppcanvas/basegfxfactory.hxx | 14 -- include/cppcanvas/vclfactory.hxx | 24 +-- include/drawinglayer/XShapeDumper.hxx | 4 include/editeng/AccessibleEditableTextPara.hxx | 2 include/editeng/acorrcfg.hxx | 4 include/editeng/editeng.hxx | 2 include/editeng/flditem.hxx | 2 include/editeng/justifyitem.hxx | 6 include/editeng/outliner.hxx | 6 include/editeng/splwrap.hxx | 4 include/editeng/svxacorr.hxx | 4 include/editeng/svxrtf.hxx | 2 include/editeng/unoedsrc.hxx | 1 include/editeng/unoipset.hxx | 4 include/editeng/unotext.hxx | 2 include/svx/unoshape.hxx | 4 sc/source/core/data/documen9.cxx | 4 scripting/source/provider/MasterScriptProvider.hxx | 2 scripting/source/provider/URIHelper.hxx | 2 scripting/source/stringresource/stringresource.hxx | 4 sd/qa/unit/sdmodeltestbase.hxx | 2 sd/source/core/stlsheet.cxx | 6 sd/source/ui/app/sdmod2.cxx | 2 sd/source/ui/framework/factories/Pane.cxx | 2 sd/source/ui/func/fuinsfil.cxx | 8 - sd/source/ui/func/fuprobjs.cxx | 4 sd/source/ui/presenter/PresenterHelper.cxx | 4 sd/source/ui/presenter/PresenterPreviewCache.cxx | 4 sd/source/ui/presenter/PresenterTextView.cxx | 4 sd/source/ui/presenter/SlideRenderer.cxx | 4 sd/source/ui/slideshow/slideshowviewimpl.cxx | 4 sd/source/ui/unoidl/unopback.cxx | 6 sd/source/ui/view/drtxtob.cxx | 8 - sd/source/ui/view/outlnvsh.cxx | 11 - sd/source/ui/view/outlview.cxx | 38 ++--- shell/source/tools/lngconvex/cmdline.cxx | 2 shell/source/tools/lngconvex/cmdline.hxx | 2 slideshow/source/engine/rehearsetimingsactivity.cxx | 2 slideshow/source/engine/shapes/shapeimporter.cxx | 4 slideshow/source/engine/shapes/viewbackgroundshape.cxx | 4 slideshow/source/engine/shapes/viewshape.cxx | 8 - slideshow/source/engine/slide/slideimpl.cxx | 2 slideshow/source/engine/slide/userpaintoverlay.cxx | 4 slideshow/source/engine/slideview.cxx | 5 slideshow/source/engine/tools.cxx | 3 slideshow/source/engine/transitions/slidechangebase.cxx | 2 svx/source/svdraw/svdetc.cxx | 2 svx/source/svdraw/svdmodel.cxx | 2 svx/source/table/cell.cxx | 4 svx/source/unodraw/unoshape.cxx | 14 +- unoxml/source/rdf/librdf_repository.cxx | 69 ++++------ 105 files changed, 295 insertions(+), 334 deletions(-)
New commits: commit 593515e529d75f08f4d3766dac78b1792aea4be4 Author: Noel Grandin <[email protected]> Date: Fri Apr 10 14:12:10 2015 +0200 loplugin:staticmethods Change-Id: I332d3b3158b46cf130540c6e1479dd01cb457d03 diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index fa956cc..90594d0 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -2223,7 +2223,7 @@ OUString EditDoc::GetParaAsString( sal_Int32 nNode ) const OUString EditDoc::GetParaAsString( const ContentNode* pNode, sal_Int32 nStartPos, sal_Int32 nEndPos, - bool bResolveFields) const + bool bResolveFields) { return pNode->GetExpandedText(nStartPos, nEndPos, bResolveFields); } diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx index da5841b..5d12097 100644 --- a/editeng/source/editeng/editdoc.hxx +++ b/editeng/source/editeng/editdoc.hxx @@ -798,7 +798,7 @@ public: sal_uLong GetTextLen() const; OUString GetParaAsString( sal_Int32 nNode ) const; - OUString GetParaAsString(const ContentNode* pNode, sal_Int32 nStartPos = 0, sal_Int32 nEndPos = -1, bool bResolveFields = true) const; + static OUString GetParaAsString(const ContentNode* pNode, sal_Int32 nStartPos = 0, sal_Int32 nEndPos = -1, bool bResolveFields = true); EditPaM GetStartPaM() const; EditPaM GetEndPaM() const; @@ -813,7 +813,7 @@ public: void InsertAttribInSelection( ContentNode* pNode, sal_Int32 nStart, sal_Int32 nEnd, const SfxPoolItem& rPoolItem ); bool RemoveAttribs( ContentNode* pNode, sal_Int32 nStart, sal_Int32 nEnd, sal_uInt16 nWhich = 0 ); bool RemoveAttribs( ContentNode* pNode, sal_Int32 nStart, sal_Int32 nEnd, EditCharAttrib*& rpStarting, EditCharAttrib*& rpEnding, sal_uInt16 nWhich = 0 ); - void FindAttribs( ContentNode* pNode, sal_Int32 nStartPos, sal_Int32 nEndPos, SfxItemSet& rCurSet ); + static void FindAttribs( ContentNode* pNode, sal_Int32 nStartPos, sal_Int32 nEndPos, SfxItemSet& rCurSet ); sal_Int32 GetPos(const ContentNode* pNode) const; const ContentNode* GetObject(sal_Int32 nPos) const; diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 21bdec0..eec5cb9 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -2139,7 +2139,7 @@ void EditEngine::SetAllMisspellRanges( const std::vector<editeng::MisspellRanges void EditEngine::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ) { - pImpEditEngine->SetForbiddenCharsTable( xForbiddenChars ); + ImpEditEngine::SetForbiddenCharsTable( xForbiddenChars ); } void EditEngine::SetDefaultLanguage( LanguageType eLang ) diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 321bfbf..92e7f27 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -592,8 +592,8 @@ private: EditPaM CursorRight( const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode = ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL ); EditPaM CursorStartOfLine( const EditPaM& rPaM ); EditPaM CursorEndOfLine( const EditPaM& rPaM ); - EditPaM CursorStartOfParagraph( const EditPaM& rPaM ); - EditPaM CursorEndOfParagraph( const EditPaM& rPaM ); + static EditPaM CursorStartOfParagraph( const EditPaM& rPaM ); + static EditPaM CursorEndOfParagraph( const EditPaM& rPaM ); EditPaM CursorStartOfDoc(); EditPaM CursorEndOfDoc(); EditPaM WordLeft( const EditPaM& rPaM, sal_Int16 nWordType = ::com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ); @@ -619,7 +619,7 @@ private: void ImplInitLayoutMode( OutputDevice* pOutDev, sal_Int32 nPara, sal_Int32 nIndex ); LanguageType ImplCalcDigitLang(LanguageType eCurLang) const; void ImplInitDigitMode(OutputDevice* pOutDev, LanguageType eLang); - OUString convertDigits(const OUString &rString, sal_Int32 nStt, sal_Int32 nLen, LanguageType eDigitLang) const; + static OUString convertDigits(const OUString &rString, sal_Int32 nStt, sal_Int32 nLen, LanguageType eDigitLang); EditPaM ReadText( SvStream& rInput, EditSelection aSel ); EditPaM ReadRTF( SvStream& rInput, EditSelection aSel ); @@ -1011,7 +1011,7 @@ public: bool IsAddExtLeading() const { return bAddExtLeading; } rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharsTable( bool bGetInternal = true ) const; - void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ); + static void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ); /** sets a link that is called at the beginning of a drag operation at an edit view */ void SetBeginDropHdl( const Link& rLink ) { maBeginDropHdl = rLink; } diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index bb964c1..7fc5c43 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -294,7 +294,7 @@ OUString ImpEditEngine::GetSelected( const EditSelection& rSel, const LineEnd eE const sal_Int32 nStartPos = nNode==nStartNode ? aSel.Min().GetIndex() : 0; const sal_Int32 nEndPos = nNode==nEndNode ? aSel.Max().GetIndex() : pNode->Len(); // can also be == nStart! - aText += aEditDoc.GetParaAsString( pNode, nStartPos, nEndPos ); + aText += EditDoc::GetParaAsString( pNode, nStartPos, nEndPos ); if ( nNode < nEndNode ) aText += aSep; } diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 972c997..5157b8b 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -3505,7 +3505,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt { const SvxFieldData* pFieldData = pFieldItem->GetField(); if( pFieldData ) - pMtf->AddAction( pFieldData->createEndComment() ); + pMtf->AddAction( SvxFieldData::createEndComment() ); } } @@ -4291,7 +4291,7 @@ LanguageType ImpEditEngine::ImplCalcDigitLang(LanguageType eCurLang) const return eLang; } -OUString ImpEditEngine::convertDigits(const OUString &rString, sal_Int32 nStt, sal_Int32 nLen, LanguageType eDigitLang) const +OUString ImpEditEngine::convertDigits(const OUString &rString, sal_Int32 nStt, sal_Int32 nLen, LanguageType eDigitLang) { OUStringBuffer aBuf(rString); for (sal_Int32 nIdx = nStt, nEnd = nStt + nLen; nIdx < nEnd; ++nIdx) diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 6bcd3a9..37d0b20 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -254,7 +254,7 @@ sal_uInt32 ImpEditEngine::WriteText( SvStream& rOutput, EditSelection aSel ) if ( nNode == nEndNode ) // can also be == nStart! nEndPos = aSel.Max().GetIndex(); } - OUString aTmpStr = aEditDoc.GetParaAsString( pNode, nStartPos, nEndPos ); + OUString aTmpStr = EditDoc::GetParaAsString( pNode, nStartPos, nEndPos ); rOutput.WriteByteStringLine( aTmpStr, rOutput.GetStreamCharSet() ); } @@ -665,7 +665,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) if ( n == nEndPortion ) nE = nEndPos; - OUString aRTFStr = aEditDoc.GetParaAsString( pNode, nS, nE); + OUString aRTFStr = EditDoc::GetParaAsString( pNode, nS, nE); RTFOutFuncs::Out_String( rOutput, aRTFStr, eDestEnc ); rOutput.WriteChar( '}' ); } diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx index 698346d..1b019a7 100644 --- a/editeng/source/editeng/impedit5.cxx +++ b/editeng/source/editeng/impedit5.cxx @@ -328,7 +328,7 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, EditEngineAttribs nOnl // 2) Examine Style and paragraph attributes only when OFF ... // First the very hard formatting ... - aEditDoc.FindAttribs( pNode, nStartPos, nEndPos, aCurSet ); + EditDoc::FindAttribs( pNode, nStartPos, nEndPos, aCurSet ); if( nOnlyHardAttrib != EditEngineAttribs_OnlyHard ) { diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index 8297a40..8a643fa 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -271,7 +271,7 @@ MetaAction* SvxFieldData::createBeginComment() const return new MetaCommentAction( "FIELD_SEQ_BEGIN" ); } -MetaAction* SvxFieldData::createEndComment() const +MetaAction* SvxFieldData::createEndComment() { return new MetaCommentAction( "FIELD_SEQ_END" ); } diff --git a/editeng/source/items/justifyitem.cxx b/editeng/source/items/justifyitem.cxx index 7871c87..c8806bd 100644 --- a/editeng/source/items/justifyitem.cxx +++ b/editeng/source/items/justifyitem.cxx @@ -158,7 +158,7 @@ bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) } -OUString SvxHorJustifyItem::GetValueText( sal_uInt16 nVal ) const +OUString SvxHorJustifyItem::GetValueText( sal_uInt16 nVal ) { DBG_ASSERT( nVal <= SVX_HOR_JUSTIFY_REPEAT, "enum overflow!" ); return EE_RESSTR(RID_SVXITEMS_HORJUST_STANDARD + nVal); @@ -294,7 +294,7 @@ bool SvxVerJustifyItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) } -OUString SvxVerJustifyItem::GetValueText( sal_uInt16 nVal ) const +OUString SvxVerJustifyItem::GetValueText( sal_uInt16 nVal ) { DBG_ASSERT( nVal <= SVX_VER_JUSTIFY_BOTTOM, "enum overflow!" ); return EE_RESSTR(RID_SVXITEMS_VERJUST_STANDARD + nVal); @@ -376,7 +376,7 @@ bool SvxJustifyMethodItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId } -OUString SvxJustifyMethodItem::GetValueText( sal_uInt16 nVal ) const +OUString SvxJustifyMethodItem::GetValueText( sal_uInt16 nVal ) { DBG_ASSERT( nVal <= SVX_VER_JUSTIFY_BOTTOM, "enum overflow!" ); return EE_RESSTR(RID_SVXITEMS_JUSTMETHOD_AUTO + nVal); diff --git a/editeng/source/lookuptree/Trie.cxx b/editeng/source/lookuptree/Trie.cxx index 7565513..43e84b8 100644 --- a/editeng/source/lookuptree/Trie.cxx +++ b/editeng/source/lookuptree/Trie.cxx @@ -34,7 +34,7 @@ struct TrieNode TrieNode* traversePath(const OUString& sPath); void addNewChild(TrieNode* pChild); void collectSuggestions(const OUString& sPath, std::vector<OUString>& rSuggestionList); - void collectSuggestionsForCurrentNode(TrieNode* pCurrent, const OUString& sPath, vector<OUString>& rSuggestionList); + static void collectSuggestionsForCurrentNode(TrieNode* pCurrent, const OUString& sPath, vector<OUString>& rSuggestionList); }; TrieNode::TrieNode(sal_Unicode aCharacter) : diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx index 69b2bac..69d2fc2 100644 --- a/editeng/source/misc/splwrap.cxx +++ b/editeng/source/misc/splwrap.cxx @@ -432,7 +432,7 @@ bool SvxSpellWrapper::SpellNext( ) -Reference< XDictionary > SvxSpellWrapper::GetAllRightDic() const +Reference< XDictionary > SvxSpellWrapper::GetAllRightDic() { Reference< XDictionary > xDic; diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx index d3a1072..9208677 100644 --- a/editeng/source/misc/unolingu.cxx +++ b/editeng/source/misc/unolingu.cxx @@ -433,7 +433,7 @@ class LinguMgrExitLstnr : public cppu::WeakImplHelper1<XEventListener> { uno::Reference< XDesktop2 > xDesktop; - void AtExit(); + static void AtExit(); public: LinguMgrExitLstnr(); diff --git a/editeng/source/outliner/outleeng.cxx b/editeng/source/outliner/outleeng.cxx index ad3c1a6..ea0af4f 100644 --- a/editeng/source/outliner/outleeng.cxx +++ b/editeng/source/outliner/outleeng.cxx @@ -94,7 +94,7 @@ void OutlinerEditEng::ParagraphConnected( sal_Int32 /*nLeftParagraph*/, sal_Int3 if( pOwner && pOwner->IsUndoEnabled() && !const_cast<EditEngine&>(pOwner->GetEditEngine()).IsInUndo() ) { Paragraph* pPara = pOwner->GetParagraph( nRightParagraph ); - if( pPara && pOwner->HasParaFlag( pPara, ParaFlag::ISPAGE ) ) + if( pPara && Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE ) ) { pOwner->InsertUndo( new OutlinerUndoChangeParaFlags( pOwner, nRightParagraph, ParaFlag::ISPAGE, ParaFlag::NONE ) ); } diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx index 8dd6ef1..9f3defc 100644 --- a/editeng/source/outliner/outlin2.cxx +++ b/editeng/source/outliner/outlin2.cxx @@ -401,7 +401,7 @@ Reference< XSpellChecker1 > Outliner::GetSpeller() void Outliner::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ) { - pEditEngine->SetForbiddenCharsTable( xForbiddenChars ); + EditEngine::SetForbiddenCharsTable( xForbiddenChars ); } void Outliner::SetHyphenator( Reference< XHyphenator >& xHyph ) diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index e0b05e1..f1069cc 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -2078,7 +2078,7 @@ void Outliner::SetParaFlag( Paragraph* pPara, ParaFlag nFlag ) } } -bool Outliner::HasParaFlag( const Paragraph* pPara, ParaFlag nFlag ) const +bool Outliner::HasParaFlag( const Paragraph* pPara, ParaFlag nFlag ) { return pPara && pPara->HasFlag( nFlag ); } diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx index 402f9da..fbece03 100644 --- a/editeng/source/uno/unoipset.cxx +++ b/editeng/source/uno/unoipset.cxx @@ -95,7 +95,7 @@ bool SvxUnoCheckForPositiveValue( const uno::Any& rVal ) -uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet, bool bSearchInParent, bool bDontConvertNegativeValues ) const +uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet, bool bSearchInParent, bool bDontConvertNegativeValues ) { uno::Any aVal; if(!pMap || !pMap->nWID) @@ -141,7 +141,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* } -void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const uno::Any& rVal, SfxItemSet& rSet, bool bDontConvertNegativeValues ) const +void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const uno::Any& rVal, SfxItemSet& rSet, bool bDontConvertNegativeValues ) { if(!pMap || !pMap->nWID) return; diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index db0bfce..390b19f 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -496,7 +496,7 @@ void SvxUnoTextRangeBase::setPropertyValue( const SfxItemPropertySimpleEntry* pM // For parts of composite items with multiple properties (eg background) // must be taken from the document before the old item. rNewSet.Put(rOldSet.Get(pMap->nWID)); // Old Item in new Set - mpPropSet->setPropertyValue(pMap, rValue, rNewSet, false ); + SvxItemPropertySet::setPropertyValue(pMap, rValue, rNewSet, false ); } } @@ -679,7 +679,7 @@ void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertySimpleEntry* pM default: if(!GetPropertyValueHelper( *const_cast<SfxItemSet*>(&rSet), pMap, rAny, &maSelection, GetEditSource() )) - rAny = mpPropSet->getPropertyValue(pMap, rSet, true, false ); + rAny = SvxItemPropertySet::getPropertyValue(pMap, rSet, true, false ); } } @@ -1299,7 +1299,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyDefault( const OUString& aProp { SfxItemSet aSet( *pPool, pMap->nWID, pMap->nWID); aSet.Put(pPool->GetDefaultItem(pMap->nWID)); - return mpPropSet->getPropertyValue(pMap, aSet, true, false ); + return SvxItemPropertySet::getPropertyValue(pMap, aSet, true, false ); } } } diff --git a/filter/source/graphicfilter/itiff/ccidecom.hxx b/filter/source/graphicfilter/itiff/ccidecom.hxx index 0e57ea8..343f5fd 100644 --- a/filter/source/graphicfilter/itiff/ccidecom.hxx +++ b/filter/source/graphicfilter/itiff/ccidecom.hxx @@ -72,11 +72,11 @@ private: sal_uInt16 ReadCodeAndDecode(const CCILookUpTableEntry * pLookUp, sal_uInt16 nMaxCodeBits); - void FillBits(sal_uInt8 * pTarget, sal_uInt16 nTargetBits, + static void FillBits(sal_uInt8 * pTarget, sal_uInt16 nTargetBits, sal_uInt16 nBitPos, sal_uInt16 nNumBits, sal_uInt8 nBlackOrWhite); - sal_uInt16 CountBits(const sal_uInt8 * pData, sal_uInt16 nDataSizeBits, + static sal_uInt16 CountBits(const sal_uInt8 * pData, sal_uInt16 nDataSizeBits, sal_uInt16 nBitPos, sal_uInt8 nBlackOrWhite); void Read1DScanlineData(sal_uInt8 * pTarget, sal_uInt16 nTargetBits); diff --git a/include/editeng/AccessibleEditableTextPara.hxx b/include/editeng/AccessibleEditableTextPara.hxx index 337f97a..79c32f8 100644 --- a/include/editeng/AccessibleEditableTextPara.hxx +++ b/include/editeng/AccessibleEditableTextPara.hxx @@ -167,7 +167,7 @@ namespace accessibility virtual ::com::sun::star::uno::Sequence< OUString> SAL_CALL getSupportedServiceNames (void) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XServiceName - OUString SAL_CALL getServiceName (void) throw (::com::sun::star::uno::RuntimeException); + static OUString SAL_CALL getServiceName (void) throw (::com::sun::star::uno::RuntimeException); /** Set the current index in the accessibility parent diff --git a/include/editeng/acorrcfg.hxx b/include/editeng/acorrcfg.hxx index b0ecbc1..1a90fb3 100644 --- a/include/editeng/acorrcfg.hxx +++ b/include/editeng/acorrcfg.hxx @@ -28,7 +28,7 @@ class EDITENG_DLLPUBLIC SvxBaseAutoCorrCfg : public utl::ConfigItem { private: SvxAutoCorrCfg& rParent; - com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + static com::sun::star::uno::Sequence<OUString> GetPropertyNames(); virtual void ImplCommit() SAL_OVERRIDE; @@ -45,7 +45,7 @@ class EDITENG_DLLPUBLIC SvxSwAutoCorrCfg : public utl::ConfigItem { private: SvxAutoCorrCfg& rParent; - com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + static com::sun::star::uno::Sequence<OUString> GetPropertyNames(); virtual void ImplCommit() SAL_OVERRIDE; diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index 06d73f4..d3ed4b6 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -422,7 +422,7 @@ public: void GetAllMisspellRanges( std::vector<editeng::MisspellRanges>& rRanges ) const; void SetAllMisspellRanges( const std::vector<editeng::MisspellRanges>& rRanges ); - void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ); + static void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ); void SetDefaultLanguage( LanguageType eLang ); LanguageType GetDefaultLanguage() const; diff --git a/include/editeng/flditem.hxx b/include/editeng/flditem.hxx index 0c41aa8..13f7773 100644 --- a/include/editeng/flditem.hxx +++ b/include/editeng/flditem.hxx @@ -59,7 +59,7 @@ public: virtual bool operator==( const SvxFieldData& ) const; virtual MetaAction* createBeginComment() const; - MetaAction* createEndComment() const; + static MetaAction* createEndComment(); }; /** diff --git a/include/editeng/justifyitem.hxx b/include/editeng/justifyitem.hxx index 9189171..3ebd449 100644 --- a/include/editeng/justifyitem.hxx +++ b/include/editeng/justifyitem.hxx @@ -45,7 +45,7 @@ public: virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE; virtual sal_uInt16 GetValueCount() const SAL_OVERRIDE; - OUString GetValueText( sal_uInt16 nVal ) const; + static OUString GetValueText( sal_uInt16 nVal ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE; virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const SAL_OVERRIDE; @@ -78,7 +78,7 @@ public: virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE; virtual sal_uInt16 GetValueCount() const SAL_OVERRIDE; - OUString GetValueText( sal_uInt16 nVal ) const; + static OUString GetValueText( sal_uInt16 nVal ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE; virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const SAL_OVERRIDE; @@ -107,7 +107,7 @@ public: virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) SAL_OVERRIDE; virtual sal_uInt16 GetValueCount() const SAL_OVERRIDE; - OUString GetValueText( sal_uInt16 nVal ) const; + static OUString GetValueText( sal_uInt16 nVal ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE; virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const SAL_OVERRIDE; diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index b973e64..cc00d31 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -743,7 +743,7 @@ public: sal_Int16 GetDepth( sal_Int32 nPara ) const; void SetDepth( Paragraph* pParagraph, sal_Int16 nNewDepth ); - bool IsVisible( Paragraph* pPara ) const { return pPara->IsVisible(); } + static bool IsVisible( Paragraph* pPara ) { return pPara->IsVisible(); } void EnableUndo( bool bEnable ); bool IsUndoEnabled() const; @@ -887,7 +887,7 @@ public: bool Collapse( Paragraph* ); void SetParaFlag( Paragraph* pPara, ParaFlag nFlag ); - bool HasParaFlag( const Paragraph* pPara, ParaFlag nFlag ) const; + static bool HasParaFlag( const Paragraph* pPara, ParaFlag nFlag ); // Returns an array containing the widths of the Bullet Indentations // Last value must be -1. Is deleted by the outliner. @@ -936,7 +936,7 @@ public: void SetHyphenator( ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenator >& xHyph ); - void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ); + static void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ); // Deprecated void SetDefaultLanguage( LanguageType eLang ); diff --git a/include/editeng/splwrap.hxx b/include/editeng/splwrap.hxx index 18547e9..6c77e53 100644 --- a/include/editeng/splwrap.hxx +++ b/include/editeng/splwrap.hxx @@ -125,9 +125,9 @@ protected: virtual bool SpellContinue(); // Check Areas // Result available through GetLast virtual void ReplaceAll( const OUString &rNewText, sal_Int16 nLanguage ); //Replace word from the replace list - ::com::sun::star::uno::Reference< + static ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionary > - GetAllRightDic() const; + GetAllRightDic(); virtual void SpellEnd(); // Finish area virtual void ScrollArea(); // Set ScrollArea // Replace word diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx index 98510fc..e1f0ab2 100644 --- a/include/editeng/svxacorr.hxx +++ b/include/editeng/svxacorr.hxx @@ -176,7 +176,7 @@ class EDITENG_DLLPUBLIC SvxAutoCorrectLanguageLists void LoadXMLExceptList_Imp( SvStringsISortDtor*& rpLst, const sal_Char* pStrmName, SotStorageRef& rStg); - void SaveExceptList_Imp( const SvStringsISortDtor& rLst, + static void SaveExceptList_Imp( const SvStringsISortDtor& rLst, const sal_Char* pStrmName, SotStorageRef& rStg, bool bConvert = false); @@ -420,7 +420,7 @@ public: // (used to avoid occasional 'collisions' with (Thai) input-sequence-checking) static bool IsAutoCorrectChar( sal_Unicode cChar ); - bool NeedsHardspaceAutocorr( sal_Unicode cChar ); + static bool NeedsHardspaceAutocorr( sal_Unicode cChar ); CharClass& GetCharClass( LanguageType eLang ) { diff --git a/include/editeng/svxrtf.hxx b/include/editeng/svxrtf.hxx index cf9732f..857e18c 100644 --- a/include/editeng/svxrtf.hxx +++ b/include/editeng/svxrtf.hxx @@ -242,7 +242,7 @@ class EDITENG_DLLPUBLIC SvxRTFParser : public SvRTFParser protected: virtual void InsertPara() = 0; - OUString& DelCharAtEnd( OUString& rStr, const sal_Unicode cDel ); + static OUString& DelCharAtEnd( OUString& rStr, const sal_Unicode cDel ); // is called for each token that is recognized in CallParser virtual void NextToken( int nToken ) SAL_OVERRIDE; diff --git a/include/editeng/unoedsrc.hxx b/include/editeng/unoedsrc.hxx index 7c94aa2..581093a 100644 --- a/include/editeng/unoedsrc.hxx +++ b/include/editeng/unoedsrc.hxx @@ -210,7 +210,6 @@ public: */ virtual EBulletInfo GetBulletInfo( sal_Int32 nPara ) const = 0; - OUString GetNumStr(sal_uInt16) const { return OUString(); } virtual void SetUpdateModeForAcc(bool) {} virtual bool GetUpdateModeForAcc() const { return true; } diff --git a/include/editeng/unoipset.hxx b/include/editeng/unoipset.hxx index ffaa38c..e2f2c7e 100644 --- a/include/editeng/unoipset.hxx +++ b/include/editeng/unoipset.hxx @@ -47,8 +47,8 @@ public: ~SvxItemPropertySet(); // Methods, which work directly with the ItemSet - ::com::sun::star::uno::Any getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet, bool bSearchInParent, bool bDontConvertNegativeValues ) const; - void setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const ::com::sun::star::uno::Any& rVal, SfxItemSet& rSet, bool bDontConvertNegativeValues ) const; + static ::com::sun::star::uno::Any getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet, bool bSearchInParent, bool bDontConvertNegativeValues ); + static void setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const ::com::sun::star::uno::Any& rVal, SfxItemSet& rSet, bool bDontConvertNegativeValues ); // Methods that use Any instead ::com::sun::star::uno::Any getPropertyValue( const SfxItemPropertySimpleEntry* pMap ) const; diff --git a/include/editeng/unotext.hxx b/include/editeng/unotext.hxx index 35a65f2..736d126 100644 --- a/include/editeng/unotext.hxx +++ b/include/editeng/unotext.hxx @@ -264,7 +264,7 @@ protected: ::com::sun::star::beans::PropertyState SAL_CALL _getPropertyState( const OUString& PropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL _getPropertyStates( const ::com::sun::star::uno::Sequence< OUString >& aPropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); // returns true if property found or false if unknown property - bool _getOnePropertyStates(const SfxItemSet* pSet, const SfxItemPropertySimpleEntry* pMap, ::com::sun::star::beans::PropertyState& rState); + static bool _getOnePropertyStates(const SfxItemSet* pSet, const SfxItemPropertySimpleEntry* pMap, ::com::sun::star::beans::PropertyState& rState); void SAL_CALL _setPropertyToDefault( const OUString& PropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); void _setPropertyToDefault( SvxTextForwarder* pForwarder, const SfxItemPropertySimpleEntry* pMap, sal_Int32 nPara ) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException ); diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx index 20f2e22..67fb2e3 100644 --- a/include/svx/unoshape.hxx +++ b/include/svx/unoshape.hxx @@ -86,10 +86,10 @@ class SvxShapeMaster; class SvxItemPropertySet; class SfxItemSet; -void SVX_DLLPUBLIC SvxItemPropertySet_setPropertyValue( const SvxItemPropertySet& rPropSet, const SfxItemPropertySimpleEntry* pMap, +void SVX_DLLPUBLIC SvxItemPropertySet_setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const com::sun::star::uno::Any& rVal, SfxItemSet& rSet ); -com::sun::star::uno::Any SVX_DLLPUBLIC SvxItemPropertySet_getPropertyValue( const SvxItemPropertySet& rPropSet, const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet ); +com::sun::star::uno::Any SVX_DLLPUBLIC SvxItemPropertySet_getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet ); // WARNING: if you update the supported interfaces, diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx index 639eebb..2ec2a17 100644 --- a/sc/source/core/data/documen9.cxx +++ b/sc/source/core/data/documen9.cxx @@ -647,7 +647,7 @@ void ScDocument::SetForbiddenCharacters(const rtl::Reference<SvxForbiddenCharact { xForbiddenCharacters = rNew; if ( pEditEngine ) - pEditEngine->SetForbiddenCharsTable( xForbiddenCharacters ); + EditEngine::SetForbiddenCharsTable( xForbiddenCharacters ); if ( pDrawLayer ) pDrawLayer->SetForbiddenCharsTable( xForbiddenCharacters ); } @@ -698,7 +698,7 @@ void ScDocument::SetAsianKerning(bool bNew) void ScDocument::ApplyAsianEditSettings( ScEditEngineDefaulter& rEngine ) { - rEngine.SetForbiddenCharsTable( xForbiddenCharacters ); + EditEngine::SetForbiddenCharsTable( xForbiddenCharacters ); rEngine.SetAsianCompressionMode( GetAsianCompression() ); rEngine.SetKernAsianPunctuation( GetAsianKerning() ); } diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 3a369a1..7081470 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -1039,7 +1039,7 @@ void SAL_CALL SdStyleSheet::setPropertyValue( const OUString& aPropertyName, con } else if(!SvxUnoTextRangeBase::SetPropertyValueHelper( aSet, pEntry, aValue, aSet )) { - SvxItemPropertySet_setPropertyValue( GetStylePropertySet(), pEntry, aValue, aSet ); + SvxItemPropertySet_setPropertyValue( pEntry, aValue, aSet ); } rStyleSet.Put( aSet ); @@ -1120,7 +1120,7 @@ Any SAL_CALL SdStyleSheet::getPropertyValue( const OUString& PropertyName ) thro return aAny; // Hole Wert aus ItemSet - aAny = SvxItemPropertySet_getPropertyValue( GetStylePropertySet(),pEntry, aSet ); + aAny = SvxItemPropertySet_getPropertyValue( pEntry, aSet ); } if( pEntry->aType != aAny.getValueType() ) @@ -1295,7 +1295,7 @@ Any SAL_CALL SdStyleSheet::getPropertyDefault( const OUString& aPropertyName ) t SfxItemPool& rMyPool = GetPool().GetPool(); SfxItemSet aSet( rMyPool, pEntry->nWID, pEntry->nWID); aSet.Put( rMyPool.GetDefaultItem( pEntry->nWID ) ); - aRet = SvxItemPropertySet_getPropertyValue( GetStylePropertySet(), pEntry, aSet ); + aRet = SvxItemPropertySet_getPropertyValue( pEntry, aSet ); } return aRet; } diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx index fa5f4a0..a5faccb 100644 --- a/sd/source/ui/app/sdmod2.cxx +++ b/sd/source/ui/app/sdmod2.cxx @@ -100,7 +100,7 @@ static SdPage* GetCurrentPage( sd::ViewShell* pViewSh, EditFieldInfo* pInfo, boo for( Paragraph* pPara = rOutl.GetParagraph( 0 ); pPara && nPos >= 0; pPara = rOutl.GetParagraph( ++nParaPos ), nPos-- ) { - if( rOutl.HasParaFlag( pPara, ParaFlag::ISPAGE ) ) + if( Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE ) ) nPgNum++; } diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index d368f96..c47c8ec 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -533,7 +533,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium) Paragraph* pPara = aSelList.empty() ? NULL : *(aSelList.begin()); // what should we insert? - while (pPara && !rDocliner.HasParaFlag(pPara, ParaFlag::ISPAGE)) + while (pPara && !Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE)) pPara = rDocliner.GetParent(pPara); sal_Int32 nTargetPos = rDocliner.GetAbsPos(pPara) + 1; @@ -544,7 +544,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium) while (pPara) { sal_Int32 nPos = rDocliner.GetAbsPos( pPara ); - if ( rDocliner.HasParaFlag( pPara, ParaFlag::ISPAGE ) ) + if ( Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE ) ) nPage++; pPara = rDocliner.GetParagraph( nPos - 1 ); } @@ -588,7 +588,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium) while (pPara) { sal_Int32 nPos = pOutliner->GetAbsPos( pPara ); - if( pOutliner->HasParaFlag( pPara, ParaFlag::ISPAGE ) ) + if( Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE ) ) nNewPages++; pPara = pOutliner->GetParagraph( ++nPos ); } @@ -625,7 +625,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium) rDocliner.SetStyleSheet( nTargetPos, pOutlStyle ); } - if( rDocliner.HasParaFlag( pSourcePara, ParaFlag::ISPAGE ) ) + if( Outliner::HasParaFlag( pSourcePara, ParaFlag::ISPAGE ) ) { nNewPages++; if( pProgress ) diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx index 60cdc25..6578b58 100644 --- a/sd/source/ui/func/fuprobjs.cxx +++ b/sd/source/ui/func/fuprobjs.cxx @@ -89,7 +89,7 @@ void FuPresentationObjects::DoExecute( SfxRequest& ) Paragraph* pPara = aSelList.empty() ? NULL : *iter; nDepth = pOutl->GetDepth(pOutl->GetAbsPos( pPara ) ); - bool bPage = pOutl->HasParaFlag( pPara, ParaFlag::ISPAGE ); + bool bPage = ::Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE ); while( iter != aSelList.end() ) { @@ -103,7 +103,7 @@ void FuPresentationObjects::DoExecute( SfxRequest& ) break; } - if( pOutl->HasParaFlag( pPara, ParaFlag::ISPAGE ) != bPage ) + if( ::Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE ) != bPage ) { bUnique = false; break; diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx index f11a333..53be943 100644 --- a/sd/source/ui/unoidl/unopback.cxx +++ b/sd/source/ui/unoidl/unopback.cxx @@ -254,7 +254,7 @@ void SAL_CALL SdUnoPageBackground::setPropertyValue( const OUString& aPropertyNa } else { - SvxItemPropertySet_setPropertyValue( *mpPropSet, pEntry, aValue, aSet ); + SvxItemPropertySet_setPropertyValue( pEntry, aValue, aSet ); } mpSet->Put( aSet ); @@ -308,7 +308,7 @@ uno::Any SAL_CALL SdUnoPageBackground::getPropertyValue( const OUString& Propert aSet.Put( rPool.GetDefaultItem( pEntry->nWID ) ); // get value from ItemSet - aAny = SvxItemPropertySet_getPropertyValue( *mpPropSet, pEntry, aSet ); + aAny = SvxItemPropertySet_getPropertyValue( pEntry, aSet ); } } else @@ -436,7 +436,7 @@ uno::Any SAL_CALL SdUnoPageBackground::getPropertyDefault( const OUString& aProp SfxItemSet aSet( rPool, pEntry->nWID, pEntry->nWID); aSet.Put( rPool.GetDefaultItem( pEntry->nWID ) ); - aAny = SvxItemPropertySet_getPropertyValue( *mpPropSet, pEntry, aSet ); + aAny = SvxItemPropertySet_getPropertyValue( pEntry, aSet ); } } return aAny; diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index dec6968..6a6297d 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -286,7 +286,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) { // allow move up if position is 2 or greater OR it // is a title object (and thus depth==1) - if(pOutl->GetAbsPos(pPara) > 1 || ( pOutl->HasParaFlag(pPara,ParaFlag::ISPAGE) && pOutl->GetAbsPos(pPara) > 0 ) ) + if(pOutl->GetAbsPos(pPara) > 1 || ( ::Outliner::HasParaFlag(pPara,ParaFlag::ISPAGE) && pOutl->GetAbsPos(pPara) > 0 ) ) { // not at top bDisableUp = false; @@ -308,14 +308,14 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) sal_Int16 nDepth = pOutl->GetDepth( pOutl->GetAbsPos( pPara ) ); - if (nDepth > 0 || (bOutlineViewSh && (nDepth <= 0) && !pOutl->HasParaFlag( pPara, ParaFlag::ISPAGE )) ) + if (nDepth > 0 || (bOutlineViewSh && (nDepth <= 0) && !::Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE )) ) { // not minimum depth bDisableLeft = false; } if( (nDepth < pOLV->GetOutliner()->GetMaxDepth() && ( !bOutlineViewSh || pOutl->GetAbsPos(pPara) != 0 )) || - (bOutlineViewSh && (nDepth <= 0) && pOutl->HasParaFlag( pPara, ParaFlag::ISPAGE ) && pOutl->GetAbsPos(pPara) != 0) ) + (bOutlineViewSh && (nDepth <= 0) && ::Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE ) && pOutl->GetAbsPos(pPara) != 0) ) { // not maximum depth and not at top bDisableRight = false; @@ -336,7 +336,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) && pPara && 0 == pOutl->GetAbsPos(pPara) && pOutl->GetParagraphCount() > 1 - && !pOutl->HasParaFlag( pOutl->GetParagraph(1), ParaFlag::ISPAGE ) ) + && !::Outliner::HasParaFlag( pOutl->GetParagraph(1), ParaFlag::ISPAGE ) ) { // Needs to be disabled bDisableDown = true; diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 4c6c1fb..850a9f9 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -810,7 +810,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) sal_Int16 nDepth; sal_Int16 nTmpDepth = rOutl.GetDepth( rOutl.GetAbsPos( pPara ) ); - bool bPage = rOutl.HasParaFlag( pPara, ParaFlag::ISPAGE ); + bool bPage = ::Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE ); while (iter != aSelList.begin()) { @@ -818,7 +818,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) nDepth = rOutl.GetDepth( rOutl.GetAbsPos( pPara ) ); - if( nDepth != nTmpDepth || bPage != rOutl.HasParaFlag( pPara, ParaFlag::ISPAGE )) + if( nDepth != nTmpDepth || bPage != ::Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE )) bUnique = false; if (rOutl.HasChildren(pPara)) @@ -1310,7 +1310,6 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet) ::sd::Window* pWin = GetActiveWindow(); OutlinerView* pActiveView = pOlView->GetViewByWindow( pWin ); - ::Outliner& rOutliner = pOlView->GetOutliner(); std::vector<Paragraph*> aSelList; pActiveView->CreateSelectionList(aSelList); @@ -1324,10 +1323,10 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet) pLastPara = *(aSelList.rbegin()); } - if( !rOutliner.HasParaFlag(pFirstPara,ParaFlag::ISPAGE) ) + if( !::Outliner::HasParaFlag(pFirstPara,ParaFlag::ISPAGE) ) pFirstPara = pOlView->GetPrevTitle( pFirstPara ); - if( !rOutliner.HasParaFlag(pLastPara, ParaFlag::ISPAGE) ) + if( !::Outliner::HasParaFlag(pLastPara, ParaFlag::ISPAGE) ) pLastPara = pOlView->GetPrevTitle( pLastPara ); // only one page selected? @@ -1689,7 +1688,7 @@ bool OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara ) sal_Int32 nPara = nTitlePara + 1; sal_Int32 nParasInLayout = 0L; pPara = rOutliner.GetParagraph( nPara ); - while( pPara && !rOutliner.HasParaFlag(pPara, ParaFlag::ISPAGE) ) + while( pPara && !::Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE) ) { nParasInLayout++; pPara = rOutliner.GetParagraph( ++nPara ); diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index feeea97..483de85 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -331,7 +331,7 @@ Paragraph* OutlineView::GetPrevTitle(const Paragraph* pPara) while(nPos) { pPara = mrOutliner.GetParagraph(--nPos); - if( mrOutliner.HasParaFlag(pPara, ParaFlag::ISPAGE) ) + if( ::Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE) ) { return const_cast< Paragraph* >( pPara ); } @@ -353,7 +353,7 @@ Paragraph* OutlineView::GetNextTitle(const Paragraph* pPara) do { pResult = mrOutliner.GetParagraph(++nPos); - if( pResult && mrOutliner.HasParaFlag(pResult, ParaFlag::ISPAGE) ) + if( pResult && ::Outliner::HasParaFlag(pResult, ParaFlag::ISPAGE) ) return pResult; } while( pResult ); @@ -378,7 +378,9 @@ IMPL_LINK( OutlineView, ParagraphInsertedHdl, ::Outliner *, pOutliner ) UpdateParagraph( nAbsPos ); - if( (nAbsPos == 0) || mrOutliner.HasParaFlag(pPara,ParaFlag::ISPAGE) || mrOutliner.HasParaFlag(mrOutliner.GetParagraph( nAbsPos-1 ), ParaFlag::ISPAGE) ) + if( (nAbsPos == 0) || + ::Outliner::HasParaFlag(pPara,ParaFlag::ISPAGE) || + ::Outliner::HasParaFlag(mrOutliner.GetParagraph( nAbsPos-1 ), ParaFlag::ISPAGE) ) { InsertSlideForParagraph( pPara ); } @@ -511,7 +513,7 @@ IMPL_LINK( OutlineView, ParagraphRemovingHdl, ::Outliner *, pOutliner ) OutlineViewPageChangesGuard aGuard(this); Paragraph* pPara = pOutliner->GetHdlParagraph(); - if( pOutliner->HasParaFlag( pPara, ParaFlag::ISPAGE ) ) + if( ::Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE ) ) { // how many titles are in front of the title paragraph in question? sal_uLong nPos = 0L; @@ -570,7 +572,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner ) OutlineViewPageChangesGuard aGuard(this); Paragraph* pPara = pOutliner->GetHdlParagraph(); - if( pOutliner->HasParaFlag( pPara, ParaFlag::ISPAGE ) && ((pOutliner->GetPrevFlags() & ParaFlag::ISPAGE) == ParaFlag::NONE) ) + if( ::Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE ) && ((pOutliner->GetPrevFlags() & ParaFlag::ISPAGE) == ParaFlag::NONE) ) { // the current paragraph is transformed into a slide @@ -591,7 +593,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner ) { pParagraph = *iter; - if( !pOutliner->HasParaFlag( pParagraph, ParaFlag::ISPAGE ) && + if( !::Outliner::HasParaFlag( pParagraph, ParaFlag::ISPAGE ) && (pOutliner->GetDepth( pOutliner->GetAbsPos( pParagraph ) ) <= 0) ) mnPagesToProcess++; } @@ -640,7 +642,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner ) } pOutliner->UpdateFields(); } - else if( !pOutliner->HasParaFlag( pPara, ParaFlag::ISPAGE ) && ((pOutliner->GetPrevFlags() & ParaFlag::ISPAGE) != ParaFlag::NONE) ) + else if( !::Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE ) && ((pOutliner->GetPrevFlags() & ParaFlag::ISPAGE) != ParaFlag::NONE) ) { // the paragraph was a page but now becomes a normal paragraph @@ -735,7 +737,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner ) sal_Int16 nDepth = pOutliner->GetDepth( nPara ); bool bSubTitle = pPage->GetPresObj(PRESOBJ_TEXT) != NULL; - if( pOutliner->HasParaFlag(pPara, ParaFlag::ISPAGE) ) + if( ::Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE) ) { pStyleSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE ); } @@ -831,7 +833,7 @@ IMPL_LINK( OutlineView, BeginMovingHdl, ::Outliner *, pOutliner ) for (std::vector<Paragraph*>::iterator it = maSelectedParas.begin(); it != maSelectedParas.end();) { - if (!pOutliner->HasParaFlag(*it, ParaFlag::ISPAGE)) + if (!::Outliner::HasParaFlag(*it, ParaFlag::ISPAGE)) it = maSelectedParas.erase(it); else ++it; @@ -845,7 +847,7 @@ IMPL_LINK( OutlineView, BeginMovingHdl, ::Outliner *, pOutliner ) while(pPara) { - if( pOutliner->HasParaFlag(pPara, ParaFlag::ISPAGE) ) // one page? + if( ::Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE) ) // one page? { maOldParaOrder.push_back(pPara); SdPage* pPage = mrDoc.GetSdPage(nPos, PK_STANDARD); @@ -881,7 +883,7 @@ IMPL_LINK( OutlineView, EndMovingHdl, ::Outliner *, pOutliner ) Paragraph* pPrev = NULL; while (pPara && pPara != pSearchIt) { - if( pOutliner->HasParaFlag(pPara, ParaFlag::ISPAGE) ) + if( ::Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE) ) { nPosNewOrder++; pPrev = pPara; @@ -1239,7 +1241,7 @@ SdPage* OutlineView::GetActualPage() SdPage* OutlineView::GetPageForParagraph( Paragraph* pPara ) { - if( !mrOutliner.HasParaFlag(pPara,ParaFlag::ISPAGE) ) + if( !::Outliner::HasParaFlag(pPara,ParaFlag::ISPAGE) ) pPara = GetPrevTitle(pPara); sal_uInt32 nPageToSelect = 0; @@ -1267,7 +1269,7 @@ Paragraph* OutlineView::GetParagraphForPage( ::Outliner& rOutl, SdPage* pPage ) while( pPara ) { // if this paragraph is a page ... - if( mrOutliner.HasParaFlag(pPara,ParaFlag::ISPAGE) ) + if( ::Outliner::HasParaFlag(pPara,ParaFlag::ISPAGE) ) { // see if we already skipped enough pages if( 0 == nPagesToSkip ) @@ -1318,7 +1320,7 @@ void OutlineView::SetSelectedPages() for (std::vector<Paragraph*>::iterator it = aSelParas.begin(); it != aSelParas.end();) { - if (!mrOutliner.HasParaFlag(*it, ParaFlag::ISPAGE)) + if (!::Outliner::HasParaFlag(*it, ParaFlag::ISPAGE)) it = aSelParas.erase(it); else ++it; @@ -1332,7 +1334,7 @@ void OutlineView::SetSelectedPages() while(pPara) { - if( mrOutliner.HasParaFlag(pPara, ParaFlag::ISPAGE) ) // one page + if( ::Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE) ) // one page { SdPage* pPage = mrDoc.GetSdPage(nPos, PK_STANDARD); DBG_ASSERT(pPage!=NULL, @@ -1674,13 +1676,13 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo) Size aOffset( 100, 100 ); // paint slide number - if( pPara && mrOutliner.HasParaFlag(pPara,ParaFlag::ISPAGE) ) + if( pPara && ::Outliner::HasParaFlag(pPara,ParaFlag::ISPAGE) ) { long nPage = 0; // todo, printing?? for ( sal_Int32 n = 0; n <= pInfo->mnPara; n++ ) { Paragraph* p = mrOutliner.GetParagraph( n ); - if ( mrOutliner.HasParaFlag(p,ParaFlag::ISPAGE) ) + if ( ::Outliner::HasParaFlag(p,ParaFlag::ISPAGE) ) nPage++; } @@ -1775,7 +1777,7 @@ void OutlineView::OnEndPasteOrDrop( PasteOrDropInfos* pInfos ) { Paragraph* pPara = mrOutliner.GetParagraph( nPara ); - bool bPage = mrOutliner.HasParaFlag( pPara, ParaFlag::ISPAGE ); + bool bPage = ::Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE ); if( !bPage ) { diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index a4c62eb..32e8b24 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -412,7 +412,7 @@ SdrOutliner* SdrMakeOutliner(sal_uInt16 nOutlinerMode, SdrModel& rModel) pOutl->SetEditTextObjectPool( pPool ); pOutl->SetStyleSheetPool( static_cast<SfxStyleSheetPool*>(rModel.GetStyleSheetPool())); pOutl->SetDefTab(rModel.GetDefaultTabulator()); - pOutl->SetForbiddenCharsTable(rModel.GetForbiddenCharsTable()); + Outliner::SetForbiddenCharsTable(rModel.GetForbiddenCharsTable()); pOutl->SetAsianCompressionMode(rModel.GetCharCompressType()); pOutl->SetKernAsianPunctuation(rModel.IsKernAsianPunctuation()); pOutl->SetAddExtLeading(rModel.IsAddExtLeading()); diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 2f7366b..0ae5ea5 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -778,7 +778,7 @@ void SdrModel::ImpSetOutlinerDefaults( SdrOutliner* pOutliner, bool bInit ) } pOutliner->SetRefDevice(GetRefDevice()); - pOutliner->SetForbiddenCharsTable(GetForbiddenCharsTable()); + Outliner::SetForbiddenCharsTable(GetForbiddenCharsTable()); pOutliner->SetAsianCompressionMode( mnCharCompressType ); pOutliner->SetKernAsianPunctuation( IsKernAsianPunctuation() ); pOutliner->SetAddExtLeading( IsAddExtLeading() ); diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index c88b4bd..11aedb8 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -994,7 +994,7 @@ sal_Int32 SAL_CALL Cell::getError( ) throw (RuntimeException, std::exception) Any Cell::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleEntry* pMap ) { - Any aAny( SvxItemPropertySet_getPropertyValue( *mpPropSet, pMap, aSet ) ); + Any aAny( SvxItemPropertySet_getPropertyValue( pMap, aSet ) ); if( pMap->aType != aAny.getValueType() ) { @@ -1150,7 +1150,7 @@ void SAL_CALL Cell::setPropertyValue( const OUString& rPropertyName, const Any& if( aSet.GetItemState( pMap->nWID ) == SfxItemState::SET ) { - SvxItemPropertySet_setPropertyValue( *mpPropSet, pMap, rValue, aSet ); + SvxItemPropertySet_setPropertyValue( pMap, rValue, aSet ); } } } diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 58a3e7d..ce5c75e 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -632,7 +632,7 @@ void SvxItemPropertySet_ObtainSettingsFromPropertySet(const SvxItemPropertySet& if(SfxItemPool::IsWhich(pEntry->nWID)) rSet.Put(rSet.GetPool()->GetDefaultItem(pEntry->nWID)); // set - SvxItemPropertySet_setPropertyValue(rPropSet, pEntry, *pUsrAny, rSet); + SvxItemPropertySet_setPropertyValue(pEntry, *pUsrAny, rSet); } } } @@ -1725,7 +1725,7 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const if( pSet->GetItemState( pMap->nWID ) == SfxItemState::SET ) { - SvxItemPropertySet_setPropertyValue( *mpPropSet, pMap, rVal, *pSet ); + SvxItemPropertySet_setPropertyValue( pMap, rVal, *pSet ); } } @@ -2007,7 +2007,7 @@ uno::Any SvxShape::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleE default: { // get value form ItemSet - aAny = SvxItemPropertySet_getPropertyValue( *mpPropSet, pMap, aSet ); + aAny = SvxItemPropertySet_getPropertyValue( pMap, aSet ); if( pMap->aType != aAny.getValueType() ) { @@ -4210,23 +4210,23 @@ SdrObject* SdrObject::getSdrObjectFromXShape( const ::com::sun::star::uno::Refer return pSvxShape ? pSvxShape->GetSdrObject() : 0; } -uno::Any SvxItemPropertySet_getPropertyValue( const SvxItemPropertySet& rPropSet, const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet ) +uno::Any SvxItemPropertySet_getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet ) { if(!pMap || !pMap->nWID) return uno::Any(); // Check is for items that store either metric values if thei are positiv or percentage if thei are negativ. bool bDontConvertNegativeValues = ( pMap->nWID == XATTR_FILLBMP_SIZEX || pMap->nWID == XATTR_FILLBMP_SIZEY ); - return rPropSet.getPropertyValue( pMap, rSet, (pMap->nWID != SDRATTR_XMLATTRIBUTES), bDontConvertNegativeValues ); + return SvxItemPropertySet::getPropertyValue( pMap, rSet, (pMap->nWID != SDRATTR_XMLATTRIBUTES), bDontConvertNegativeValues ); } -void SvxItemPropertySet_setPropertyValue( const SvxItemPropertySet& rPropSet, const SfxItemPropertySimpleEntry* pMap, const uno::Any& rVal, SfxItemSet& rSet ) +void SvxItemPropertySet_setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const uno::Any& rVal, SfxItemSet& rSet ) { if(!pMap || !pMap->nWID) return; bool bDontConvertNegativeValues = ( pMap->nWID == XATTR_FILLBMP_SIZEX || pMap->nWID == XATTR_FILLBMP_SIZEY ); - rPropSet.setPropertyValue( pMap, rVal, rSet, bDontConvertNegativeValues ); + SvxItemPropertySet::setPropertyValue( pMap, rVal, rSet, bDontConvertNegativeValues ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit ee094bd46f55118993c72af719dc046476f9f311 Author: Noel Grandin <[email protected]> Date: Fri Apr 10 11:07:36 2015 +0200 loplugin:staticmethods Change-Id: If97f01a05294fa7efd59a8934c7b6f65cda5084a diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 5253ea9..64c1343 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -284,7 +284,7 @@ void ModulWindow::CheckCompileBasic() bool bWasModified = GetBasic()->IsModified(); - bDone = GetBasic()->Compile( xModule ); + bDone = StarBASIC::Compile( xModule ); if ( !bWasModified ) GetBasic()->SetModified(false); diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 7288856..a27aa8e 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -628,9 +628,9 @@ void EditorWindow::HandleAutoCorrect() if( r.tokenType == TT_KEYWORDS ) { sStr = sStr.toAsciiLowerCase(); - if( !rModulWindow.GetSbModule()->GetKeywordCase(sStr).isEmpty() ) + if( !SbModule::GetKeywordCase(sStr).isEmpty() ) // if it is a keyword, get its correct case - sStr = rModulWindow.GetSbModule()->GetKeywordCase(sStr); + sStr = SbModule::GetKeywordCase(sStr); else // else capitalize first letter/select the correct one, and replace sStr = sStr.replaceAt( 0, 1, OUString(sStr[0]).toAsciiUpperCase() ); diff --git a/basic/inc/sbstdobj.hxx b/basic/inc/sbstdobj.hxx index ae7ab2d..40cd961 100644 --- a/basic/inc/sbstdobj.hxx +++ b/basic/inc/sbstdobj.hxx @@ -109,12 +109,12 @@ protected: virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ) SAL_OVERRIDE; - void MethClear( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); - void MethGetData( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); - void MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); - void MethGetText( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); - void MethSetData( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); - void MethSetText( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); + static void MethClear( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); + static void MethGetData( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); + static void MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); + static void MethGetText( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); + static void MethSetData( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); + static void MethSetText( SbxVariable* pVar, SbxArray* pPar_, bool bWrite ); public: TYPEINFO_OVERRIDE(); diff --git a/basic/qa/cppunit/basictest.hxx b/basic/qa/cppunit/basictest.hxx index 684da80..8bb5992 100644 --- a/basic/qa/cppunit/basictest.hxx +++ b/basic/qa/cppunit/basictest.hxx @@ -126,7 +126,7 @@ class MacroSnippet DECL_LINK( BasicErrorHdl, StarBASIC * ); - ErrorDetail GetError() + static ErrorDetail GetError() { ErrorDetail aErr; aErr.sErrorText = StarBASIC::GetErrorText(); diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx index 45b63f2..9da674b 100644 --- a/basic/source/basmgr/basicmanagerrepository.cxx +++ b/basic/source/basmgr/basicmanagerrepository.cxx @@ -148,7 +148,7 @@ namespace basic <arg>_out_rStorage</arg> might or might not be <NULL/>), <FALSE/> otherwise. In the latter case, processing this document should stop. */ - bool impl_getDocumentStorage_nothrow( const Reference< XModel >& _rxDocument, Reference< XStorage >& _out_rStorage ); + static bool impl_getDocumentStorage_nothrow( const Reference< XModel >& _rxDocument, Reference< XStorage >& _out_rStorage ); /** retrieves the containers for Basic and Dialog libraries for a given document @@ -164,7 +164,7 @@ namespace basic @return <TRUE/> if and only if both containers exist, and could successfully be retrieved */ - bool impl_getDocumentLibraryContainers_nothrow( + static bool impl_getDocumentLibraryContainers_nothrow( const Reference< XModel >& _rxDocument, Reference< XPersistentLibraryContainer >& _out_rxBasicLibraries, Reference< XPersistentLibraryContainer >& _out_rxDialogLibraries @@ -172,7 +172,7 @@ namespace basic /** initializes the given library containers, which belong to a document */ - void impl_initDocLibraryContainers_nothrow( + static void impl_initDocLibraryContainers_nothrow( const Reference< XPersistentLibraryContainer >& _rxBasicLibraries, const Reference< XPersistentLibraryContainer >& _rxDialogLibraries ); diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 6d491e3..795b972 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -1059,7 +1059,7 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStora return false; } -bool BasicManager::ImplEncryptStream( SvStream& rStrm ) const +bool BasicManager::ImplEncryptStream( SvStream& rStrm ) { sal_Size nPos = rStrm.Tell(); sal_uInt32 nCreator; @@ -1114,7 +1114,7 @@ bool BasicManager::ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) con return bLoaded; } -void BasicManager::CheckModules( StarBASIC* pLib, bool bReference ) const +void BasicManager::CheckModules( StarBASIC* pLib, bool bReference ) { if ( !pLib ) { @@ -1128,7 +1128,7 @@ void BasicManager::CheckModules( StarBASIC* pLib, bool bReference ) const DBG_ASSERT( pModule, "Module not received!" ); if ( !pModule->IsCompiled() && !StarBASIC::GetErrorCode() ) { - pLib->Compile( pModule ); + StarBASIC::Compile( pModule ); } } diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index c2b0e79..36c8520 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -466,7 +466,7 @@ public: return dInst; } - void QuitApplication() + static void QuitApplication() { uno::Reference< frame::XDesktop2 > xDeskTop = frame::Desktop::create( comphelper::getProcessComponentContext() ); xDeskTop->terminate(); @@ -1784,7 +1784,7 @@ void SbModule::GetCodeCompleteDataFromParse(CodeCompleteDataCache& aCache) } -OUString SbModule::GetKeywordCase( const OUString& sKeyword ) const +OUString SbModule::GetKeywordCase( const OUString& sKeyword ) { return SbiParser::GetKeywordCase( sKeyword ); } diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx index 8b199c4..691fd9a 100644 --- a/basic/source/comp/codegen.cxx +++ b/basic/source/comp/codegen.cxx @@ -408,7 +408,7 @@ class PCodeBufferWalker private: T m_nBytes; sal_uInt8* m_pCode; - T readParam( sal_uInt8*& pCode ) + static T readParam( sal_uInt8*& pCode ) { short nBytes = sizeof( T ); T nOp1=0; diff --git a/basic/source/inc/basiccharclass.hxx b/basic/source/inc/basiccharclass.hxx index e6fea65..d625ae3 100644 --- a/basic/source/inc/basiccharclass.hxx +++ b/basic/source/inc/basiccharclass.hxx @@ -33,7 +33,7 @@ public: BasicCharClass(); bool isLetter( sal_Unicode c ); - bool isLetterUnicode( sal_Unicode c ); + static bool isLetterUnicode( sal_Unicode c ); bool isAlpha( sal_Unicode c, bool bCompatible ); bool isAlphaNumeric( sal_Unicode c, bool bCompatible ); static bool isWhitespace( sal_Unicode c ); diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx index c7258f5..9e20a08 100644 --- a/basic/source/inc/namecont.hxx +++ b/basic/source/inc/namecont.hxx @@ -389,7 +389,7 @@ public: } void enterMethod(); - void leaveMethod(); + static void leaveMethod(); bool isDisposed() const { return rBHelper.bInDispose || rBHelper.bDisposed; } void checkDisposed() const; @@ -540,18 +540,15 @@ public: class LibraryContainerMethodGuard { -private: - SfxLibraryContainer& m_rContainer; public: LibraryContainerMethodGuard( SfxLibraryContainer& _rContainer ) - :m_rContainer( _rContainer ) { - m_rContainer.enterMethod(); + _rContainer.enterMethod(); } ~LibraryContainerMethodGuard() { - m_rContainer.leaveMethod(); + basic::SfxLibraryContainer::leaveMethod(); } }; @@ -732,7 +729,7 @@ class ScriptSubPackageIterator sal_Int32 m_nSubPkgCount; sal_Int32 m_iNextSubPkg; - com::sun::star::uno::Reference< com::sun::star::deployment::XPackage > + static com::sun::star::uno::Reference< com::sun::star::deployment::XPackage > implDetectScriptPackage( const com::sun::star::uno::Reference < com::sun::star::deployment::XPackage >& rPackage, bool& rbPureDialogLib ); diff --git a/basic/source/inc/parser.hxx b/basic/source/inc/parser.hxx index 0e39423..018b895 100644 --- a/basic/source/inc/parser.hxx +++ b/basic/source/inc/parser.hxx @@ -58,7 +58,7 @@ class SbiParser : public SbiTokenizer void DefEnum( bool bPrivate ); // Parse enum declaration void DefDeclare( bool bPrivate ); void EnableCompatibility(); - bool IsUnoInterface( const OUString& sTypeName ); + static bool IsUnoInterface( const OUString& sTypeName ); public: SbxArrayRef rTypeArray; SbxArrayRef rEnumArray; diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx index 4c8e99d..33758e3 100644 --- a/basic/source/inc/runtime.hxx +++ b/basic/source/inc/runtime.hxx @@ -330,7 +330,7 @@ class SbiRuntime // #56204 swap out DIM-functionality into help method (step0.cxx) void DimImpl( SbxVariableRef refVar ); - bool implIsClass( SbxObject* pObj, const OUString& aClass ); + static bool implIsClass( SbxObject* pObj, const OUString& aClass ); void StepSETCLASS_impl( sal_uInt32 nOp1, bool bHandleDflt = false ); @@ -380,7 +380,7 @@ class SbiRuntime void StepDCREATE_REDIMP(sal_uInt32,sal_uInt32), StepDCREATE_IMPL(sal_uInt32,sal_uInt32); void StepFIND_CM( sal_uInt32, sal_uInt32 ); void StepFIND_STATIC( sal_uInt32, sal_uInt32 ); - void implHandleSbxFlags( SbxVariable* pVar, SbxDataType t, sal_uInt32 nOp2 ); + static void implHandleSbxFlags( SbxVariable* pVar, SbxDataType t, sal_uInt32 nOp2 ); public: void SetVBAEnabled( bool bEnabled ); bool IsImageFlag( SbiImageFlags n ) const; diff --git a/basic/source/inc/stdobj.hxx b/basic/source/inc/stdobj.hxx index 52b1441..ccd4d70 100644 --- a/basic/source/inc/stdobj.hxx +++ b/basic/source/inc/stdobj.hxx @@ -29,9 +29,9 @@ class SbiStdObject : public SbxObject { SbStdFactory* pStdFactory; - virtual ~SbiStdObject(); + virtual ~SbiStdObject(); using SbxVariable::GetInfo; - SbxInfo* GetInfo( short ); + static SbxInfo* GetInfo( short ); virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, const SfxHint& rHint, const TypeId& rHintType ) SAL_OVERRIDE; public: diff --git a/basic/source/runtime/ddectrl.hxx b/basic/source/runtime/ddectrl.hxx index 1f0a962..0bcfd32 100644 --- a/basic/source/runtime/ddectrl.hxx +++ b/basic/source/runtime/ddectrl.hxx @@ -30,7 +30,7 @@ class SbiDdeControl { private: DECL_LINK( Data, DdeData* ); - SbError GetLastErr( DdeConnection* ); + static SbError GetLastErr( DdeConnection* ); size_t GetFreeChannel(); std::vector<DdeConnection*> aConvList; OUString aData; diff --git a/compilerplugins/clang/staticmethods.cxx b/compilerplugins/clang/staticmethods.cxx index e59a48f..aaa4f6b 100644 --- a/compilerplugins/clang/staticmethods.cxx +++ b/compilerplugins/clang/staticmethods.cxx @@ -103,7 +103,8 @@ bool StaticMethods::TraverseCXXMethodDecl(const CXXMethodDecl * pCXXMethodDecl) return true; } // the DDE has a dummy implementation on Linux and a real one on Windows - if (getFilename(pCXXMethodDecl->getCanonicalDecl()->getLocStart()) == SRCDIR "/include/svl/svdde.hxx") { + std::string aFilename = getFilename(pCXXMethodDecl->getCanonicalDecl()->getLocStart()); + if (aFilename == SRCDIR "/include/svl/svdde.hxx") { return true; } std::string aParentName = pCXXMethodDecl->getParent()->getQualifiedNameAsString(); @@ -127,10 +128,17 @@ bool StaticMethods::TraverseCXXMethodDecl(const CXXMethodDecl * pCXXMethodDecl) return true; } // the unotools and svl config code stuff is doing weird stuff with a reference-counted statically allocated pImpl class - if (startsWith(getFilename(pCXXMethodDecl->getCanonicalDecl()->getLocStart()), SRCDIR "/include/unotools")) { + if (startsWith(aFilename, SRCDIR "/include/unotools")) { return true; } - if (startsWith(getFilename(pCXXMethodDecl->getCanonicalDecl()->getLocStart()), SRCDIR "/include/svl")) { + if (startsWith(aFilename, SRCDIR "/include/svl")) { + return true; + } + if (startsWith(aFilename, SRCDIR "/include/framework") || startsWith(aFilename, SRCDIR "/framework")) { + return true; + } + // there is some odd stuff happening here I don't fully understand, leave it for now + if (startsWith(aFilename, SRCDIR "/include/canvas") || startsWith(aFilename, SRCDIR "/canvas")) { return true; } // classes that have static data and some kind of weird reference-counting trick in it's constructor @@ -145,7 +153,14 @@ bool StaticMethods::TraverseCXXMethodDecl(const CXXMethodDecl * pCXXMethodDecl) std::string fqn = aParentName + "::" + pCXXMethodDecl->getNameAsString(); // only empty on Linux, not on windows if (fqn == "OleEmbeddedObject::GetVisualRepresentationInNativeFormat_Impl" - || fqn == "OleEmbeddedObject::GetRidOfComponent") { + || fqn == "OleEmbeddedObject::GetRidOfComponent" + || fqn == "connectivity::mozab::ProfileAccess::isProfileLocked" + || startsWith(fqn, "SbxDecimal::") + || fqn == "SbiDllMgr::Call" || fqn == "SbiDllMgr::FreeDll") { + return true; + } + // used in a function-pointer-table + if (startsWith(fqn, "SbiRuntime::Step")) { return true; } diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.hxx b/filter/source/graphicfilter/idxf/dxf2mtf.hxx index 354cd09..3adc4ee 100644 --- a/filter/source/graphicfilter/idxf/dxf2mtf.hxx +++ b/filter/source/graphicfilter/idxf/dxf2mtf.hxx @@ -53,7 +53,7 @@ private: Color aActFillColor; vcl::Font aActFont; - sal_uLong CountEntities(const DXFEntities & rEntities); + static sal_uLong CountEntities(const DXFEntities & rEntities); Color ConvertColor(sal_uInt8 nColor); diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index 4a77e38..874f627 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -399,7 +399,7 @@ private: sal_uLong ReadLittleEndian3BytesLong(); long ReadCoord(bool b32); Point ReadPoint( const bool bAdjustBoundRect = true ); - RasterOp OS2MixToRasterOp(sal_uInt8 nMix); + static RasterOp OS2MixToRasterOp(sal_uInt8 nMix); void ReadLine(bool bGivenPos, sal_uInt16 nOrderLen); void ReadRelLine(bool bGivenPos, sal_uInt16 nOrderLen); void ReadBox(bool bGivenPos); diff --git a/include/basic/basmgr.hxx b/include/basic/basmgr.hxx index fdad8f5..156d6ec 100644 --- a/include/basic/basmgr.hxx +++ b/include/basic/basmgr.hxx @@ -138,9 +138,9 @@ protected: void LoadBasicManager( SotStorage& rStorage, const OUString& rBaseURL, bool bLoadBasics = true ); void LoadOldBasicManager( SotStorage& rStorage ); bool ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) const; - bool ImplEncryptStream( SvStream& rStream ) const; + static bool ImplEncryptStream( SvStream& rStream ); BasicLibInfo* FindLibInfo( StarBASIC* pBasic ); - void CheckModules( StarBASIC* pBasic, bool bReference ) const; + static void CheckModules( StarBASIC* pBasic, bool bReference ); virtual ~BasicManager(); public: diff --git a/include/basic/sbmod.hxx b/include/basic/sbmod.hxx index 5aaafa7..9f2a5d8 100644 --- a/include/basic/sbmod.hxx +++ b/include/basic/sbmod.hxx @@ -137,7 +137,7 @@ public: bool createCOMWrapperForIface( ::com::sun::star::uno::Any& o_rRetAny, SbClassModuleObject* pProxyClassModuleObject ); void GetCodeCompleteDataFromParse(CodeCompleteDataCache& aCache); SbxArrayRef GetMethods() { return pMethods;} - OUString GetKeywordCase( const OUString& sKeyword ) const; + static OUString GetKeywordCase( const OUString& sKeyword ); }; typedef tools::SvRef<SbModule> SbModuleRef; diff --git a/include/basic/sbstar.hxx b/include/basic/sbstar.hxx index 105bf94..327027b 100644 --- a/include/basic/sbstar.hxx +++ b/include/basic/sbstar.hxx @@ -109,7 +109,7 @@ public: SbModule* MakeModule( const OUString& rName, const OUString& rSrc ); SbModule* MakeModule32( const OUString& rName, const OUString& rSrc ); SbModule* MakeModule32( const OUString& rName, const com::sun::star::script::ModuleInfo& mInfo, const OUString& rSrc ); - bool Compile( SbModule* ); + static bool Compile( SbModule* ); static void Stop(); static void Error( SbError ); static void Error( SbError, const OUString& rMsg ); diff --git a/scripting/source/provider/MasterScriptProvider.hxx b/scripting/source/provider/MasterScriptProvider.hxx index e321a2c..74523bb 100644 --- a/scripting/source/provider/MasterScriptProvider.hxx +++ b/scripting/source/provider/MasterScriptProvider.hxx @@ -112,7 +112,7 @@ public: OUString getContextString() { return m_sCtxString; } private: - OUString parseLocationName( const OUString& location ); + static OUString parseLocationName( const OUString& location ); void createPkgProvider(); bool isValid() { return m_bIsValid;} OUString getURLForModel(); diff --git a/scripting/source/provider/URIHelper.hxx b/scripting/source/provider/URIHelper.hxx index 1990384..e4162e8 100644 --- a/scripting/source/provider/URIHelper.hxx +++ b/scripting/source/provider/URIHelper.hxx @@ -53,7 +53,7 @@ private: bool initBaseURI(); OUString getLanguagePart(const OUString& rStorageURI); - OUString getLanguagePath(const OUString& rLanguagePart); + static OUString getLanguagePath(const OUString& rLanguagePart); public: diff --git a/scripting/source/stringresource/stringresource.hxx b/scripting/source/stringresource/stringresource.hxx index ff750bd..3054da7 100644 --- a/scripting/source/stringresource/stringresource.hxx +++ b/scripting/source/stringresource/stringresource.hxx @@ -261,8 +261,8 @@ protected: virtual void implLoadAllLocales( void ) SAL_OVERRIDE; void implScanLocaleNames( const ::com::sun::star::uno::Sequence< OUString >& aContentSeq ); - OUString implGetFileNameForLocaleItem( LocaleItem* pLocaleItem, const OUString& aNameBase ); - OUString implGetPathForLocaleItem( LocaleItem* pLocaleItem, const OUString& aNameBase, + static OUString implGetFileNameForLocaleItem( LocaleItem* pLocaleItem, const OUString& aNameBase ); + static OUString implGetPathForLocaleItem( LocaleItem* pLocaleItem, const OUString& aNameBase, const OUString& aLocation, bool bDefaultFile=false ); bool implReadPropertiesFile( LocaleItem* pLocaleItem, diff --git a/shell/source/tools/lngconvex/cmdline.cxx b/shell/source/tools/lngconvex/cmdline.cxx index ba6bed4..ae7c82d 100644 --- a/shell/source/tools/lngconvex/cmdline.cxx +++ b/shell/source/tools/lngconvex/cmdline.cxx @@ -82,7 +82,7 @@ std::string CommandLine::get_arg(const std::string& ArgumentName) const /** Returns whether a given argument is an argument name */ -bool CommandLine::is_arg_name(const std::string& Argument) const +bool CommandLine::is_arg_name(const std::string& Argument) { return (Argument.length() > 0 && Argument[0] == '-'); } diff --git a/shell/source/tools/lngconvex/cmdline.hxx b/shell/source/tools/lngconvex/cmdline.hxx index 99fc7b2..cd1b2f3 100644 --- a/shell/source/tools/lngconvex/cmdline.hxx +++ b/shell/source/tools/lngconvex/cmdline.hxx @@ -66,7 +66,7 @@ private: /** Returns whether a given argument is an argument name */ - bool is_arg_name(const std::string& Argument) const; + static bool is_arg_name(const std::string& Argument); private: size_t m_argc; commit 26ec80f47df1b32c5e1ae8c96d597ef8c90fee86 Author: Noel Grandin <[email protected]> Date: Thu Apr 9 08:45:51 2015 +0200 loplugin:staticmethods Change-Id: I33a8ca28b0c3bf1c31758d93238e74927bebde9c diff --git a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx index a24e8c9..1f2b65c 100644 --- a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx +++ b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx @@ -589,7 +589,7 @@ private: // Must be called with both the external (Solar) and internal mutex // locked, and after init has been called: - ::rtl::Reference< Paragraph > + static ::rtl::Reference< Paragraph > getParagraph(Paragraphs::iterator const & rIt); // Must be called with both the external (Solar) and internal mutex @@ -633,7 +633,7 @@ private: static ::FontWeight mapFontWeight(css::uno::Any const & rWeight); - void retrieveDefaultAttributesImpl( + static void retrieveDefaultAttributesImpl( Paragraph const * pParagraph, const css::uno::Sequence< OUString >& RequestedAttributes, tPropValMap& rDefAttrSeq); diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx index d96ffc6..432e321 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx @@ -135,7 +135,7 @@ public: void UpdateSelection_Impl_Acc (bool b_IsDropDownList); void UpdateFocus_Impl_Acc ( sal_uInt16 nPos, bool b_IsDropDownList) ; - void NotifyListItem(::com::sun::star::uno::Any& val); + static void NotifyListItem(::com::sun::star::uno::Any& val); protected: BoxType m_aBoxType; ::accessibility::IComboListBoxHelper* m_pListBoxHelper; diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index b9a1e37..d9258e9 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -3124,7 +3124,7 @@ OUString ChartView::dump() throw (uno::RuntimeException, std::exception) if(xShape.is()) { XShapeDumper dumper; - OUString aString = dumper.dump(mxRootShape); + OUString aString = XShapeDumper::dump(mxRootShape); aBuffer.append(aString); } else @@ -3133,7 +3133,7 @@ OUString ChartView::dump() throw (uno::RuntimeException, std::exception) if(!xSingleShape.is()) continue; XShapeDumper dumper; - OUString aString = dumper.dump(xSingleShape); + OUString aString = XShapeDumper::dump(xSingleShape); aBuffer.append(aString); } aBuffer.append("\n\n"); diff --git a/compilerplugins/clang/staticmethods.cxx b/compilerplugins/clang/staticmethods.cxx index 5ac9da4..e59a48f 100644 --- a/compilerplugins/clang/staticmethods.cxx +++ b/compilerplugins/clang/staticmethods.cxx @@ -142,7 +142,12 @@ bool StaticMethods::TraverseCXXMethodDecl(const CXXMethodDecl * pCXXMethodDecl) { return true; } - + std::string fqn = aParentName + "::" + pCXXMethodDecl->getNameAsString(); + // only empty on Linux, not on windows + if (fqn == "OleEmbeddedObject::GetVisualRepresentationInNativeFormat_Impl" + || fqn == "OleEmbeddedObject::GetRidOfComponent") { + return true; + } bVisitedThis = false; TraverseStmt(pCXXMethodDecl->getBody()); @@ -152,7 +157,7 @@ bool StaticMethods::TraverseCXXMethodDecl(const CXXMethodDecl * pCXXMethodDecl) report( DiagnosticsEngine::Warning, - "this method can be declared static " + aParentName, + "this method can be declared static " + fqn, pCXXMethodDecl->getCanonicalDecl()->getLocStart()) << pCXXMethodDecl->getCanonicalDecl()->getSourceRange(); return true; diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx index 1aa88f1..7514bc4 100644 --- a/cppcanvas/source/inc/implrenderer.hxx +++ b/cppcanvas/source/inc/implrenderer.hxx @@ -219,8 +219,8 @@ static float GetSwapFloat( SvStream& rSt ) typedef ::std::vector< MtfAction > ActionVector; /* EMF+ */ - void ReadRectangle (SvStream& s, float& x, float& y, float &width, float& height, bool bCompressed = false); - void ReadPoint (SvStream& s, float& x, float& y, sal_uInt32 flags); + static void ReadRectangle (SvStream& s, float& x, float& y, float &width, float& height, bool bCompressed = false); + static void ReadPoint (SvStream& s, float& x, float& y, sal_uInt32 flags); void MapToDevice (double &x, double &y); ::basegfx::B2DPoint Map (double ix, double iy); ::basegfx::B2DSize MapSize (double iwidth, double iheight); @@ -231,18 +231,18 @@ static float GetSwapFloat( SvStream& rSt ) ImplRenderer(const ImplRenderer&) SAL_DELETED_FUNCTION; ImplRenderer& operator=( const ImplRenderer& ) SAL_DELETED_FUNCTION; - void updateClipping( const ::basegfx::B2DPolyPolygon& rClipPoly, + static void updateClipping( const ::basegfx::B2DPolyPolygon& rClipPoly, const ActionFactoryParameters& rParms, bool bIntersect ); - void updateClipping( const ::Rectangle& rClipRect, + static void updateClipping( const ::Rectangle& rClipRect, const ActionFactoryParameters& rParms, bool bIntersect ); - ::com::sun::star::uno::Reference< + static ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont > createFont( double& o_rFontRotation, const ::vcl::Font& rFont, - const ActionFactoryParameters& rParms ) const; + const ActionFactoryParameters& rParms ); bool createActions( GDIMetaFile& rMtf, const ActionFactoryParameters& rParms, bool bSubsettableActions ); @@ -250,13 +250,13 @@ static float GetSwapFloat( SvStream& rSt ) const ActionFactoryParameters& rParms ); bool createFillAndStroke( const ::basegfx::B2DPolygon& rPoly, const ActionFactoryParameters& rParms ); - void skipContent( GDIMetaFile& rMtf, + static void skipContent( GDIMetaFile& rMtf, const char* pCommentString, - sal_Int32& io_rCurrActionIndex ) const; + sal_Int32& io_rCurrActionIndex ); - bool isActionContained( GDIMetaFile& rMtf, + static bool isActionContained( GDIMetaFile& rMtf, const char* pCommentString, - sal_uInt16 nType ) const; + sal_uInt16 nType ); void createGradientAction( const ::tools::PolyPolygon& rPoly, const ::Gradient& rGradient, diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index c5cf981..5afa0b2 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -1880,7 +1880,7 @@ namespace cppcanvas float dx, dy, dw, dh; - ReadRectangle (rMF, dx, dy, dw, dh, flags & 0x4000); + ReadRectangle (rMF, dx, dy, dw, dh, bool(flags & 0x4000)); SAL_INFO("cppcanvas.emf", "EMF+ RectData: " << dx << "," << dy << " " << dw << "x" << dh); @@ -1939,7 +1939,7 @@ namespace cppcanvas float dx, dy, dw, dh; - ReadRectangle (rMF, dx, dy, dw, dh, flags & 0x4000); + ReadRectangle (rMF, dx, dy, dw, dh, bool(flags & 0x4000)); SAL_INFO("cppcanvas.emf", "EMF+ RectData: " << dx << "," << dy << " " << dw << "x" << dh); @@ -2098,7 +2098,7 @@ namespace cppcanvas } else if (type == EmfPlusRecordTypeDrawImage) { float dx, dy, dw, dh; - ReadRectangle (rMF, dx, dy, dw, dh, flags & 0x4000); + ReadRectangle (rMF, dx, dy, dw, dh, bool(flags & 0x4000)); SAL_INFO("cppcanvas.emf", "EMF+ destination rectangle: " << dx << "," << dy << " " << dw << "x" << dh); diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index edc3a6e..9e93995 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -419,7 +419,7 @@ namespace cppcanvas void ImplRenderer::skipContent( GDIMetaFile& rMtf, const char* pCommentString, - sal_Int32& io_rCurrActionIndex ) const + sal_Int32& io_rCurrActionIndex ) { ENSURE_OR_THROW( pCommentString, "ImplRenderer::skipContent(): NULL string given" ); @@ -445,7 +445,7 @@ namespace cppcanvas bool ImplRenderer::isActionContained( GDIMetaFile& rMtf, const char* pCommentString, - sal_uInt16 nType ) const + sal_uInt16 nType ) { ENSURE_OR_THROW( pCommentString, "ImplRenderer::isActionContained(): NULL string given" ); @@ -754,7 +754,7 @@ namespace cppcanvas uno::Reference< rendering::XCanvasFont > ImplRenderer::createFont( double& o_rFontRotation, const vcl::Font& rFont, - const ActionFactoryParameters& rParms ) const + const ActionFactoryParameters& rParms ) { rendering::FontRequest aFontRequest; @@ -2688,7 +2688,7 @@ namespace cppcanvas { } - bool result() const + static bool result() { return true; // nothing can fail here } diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx index fa91a85..8237a12 100644 --- a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx +++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx @@ -350,7 +350,7 @@ namespace cppcanvas // update buffered bitmap and transformation - BitmapSharedPtr aBmp( VCLFactory::getInstance().createBitmap( + BitmapSharedPtr aBmp( VCLFactory::createBitmap( mpCanvas, aVDev.GetBitmapEx( aEmptyPoint, diff --git a/cppcanvas/source/uno/uno_mtfrenderer.cxx b/cppcanvas/source/uno/uno_mtfrenderer.cxx index ea9fe16..ba220ab 100644 --- a/cppcanvas/source/uno/uno_mtfrenderer.cxx +++ b/cppcanvas/source/uno/uno_mtfrenderer.cxx @@ -22,9 +22,8 @@ void MtfRenderer::setMetafile (const uno::Sequence< sal_Int8 >& /*rMtf*/) throw void MtfRenderer::draw (double fScaleX, double fScaleY) throw (uno::RuntimeException, std::exception) { if (mpMetafile && mxCanvas.get()) { - cppcanvas::VCLFactory& factory = cppcanvas::VCLFactory::getInstance(); - cppcanvas::BitmapCanvasSharedPtr canvas = factory.createBitmapCanvas (mxCanvas); - cppcanvas::RendererSharedPtr renderer = factory.createRenderer (canvas, *mpMetafile, cppcanvas::Renderer::Parameters ()); + cppcanvas::BitmapCanvasSharedPtr canvas = cppcanvas::VCLFactory::createBitmapCanvas (mxCanvas); + cppcanvas::RendererSharedPtr renderer = cppcanvas::VCLFactory::createRenderer (canvas, *mpMetafile, cppcanvas::Renderer::Parameters ()); ::basegfx::B2DHomMatrix aMatrix; aMatrix.scale( fScaleX, fScaleY ); canvas->setTransformation( aMatrix ); diff --git a/cppcanvas/source/wrapper/basegfxfactory.cxx b/cppcanvas/source/wrapper/basegfxfactory.cxx index 0cca170..f72394b 100644 --- a/cppcanvas/source/wrapper/basegfxfactory.cxx +++ b/cppcanvas/source/wrapper/basegfxfactory.cxx @@ -44,28 +44,8 @@ using namespace ::com::sun::star; namespace cppcanvas { - /* Singleton handling */ - struct InitInstance2 - { - BaseGfxFactory* operator()() - { - return new BaseGfxFactory(); - } - }; - - BaseGfxFactory& BaseGfxFactory::getInstance() - { - return *rtl_Instance< BaseGfxFactory, InitInstance2, ::osl::MutexGuard, - ::osl::GetGlobalMutex >::create( - InitInstance2(), ::osl::GetGlobalMutex()); - } - - BaseGfxFactory::BaseGfxFactory() - { - } - PolyPolygonSharedPtr BaseGfxFactory::createPolyPolygon( const CanvasSharedPtr& rCanvas, - const ::basegfx::B2DPolygon& rPoly ) const + const ::basegfx::B2DPolygon& rPoly ) { OSL_ENSURE( rCanvas.get() != NULL && rCanvas->getUNOCanvas().is(), @@ -86,7 +66,7 @@ namespace cppcanvas } BitmapSharedPtr BaseGfxFactory::createBitmap( const CanvasSharedPtr& rCanvas, - const ::basegfx::B2ISize& rSize ) const + const ::basegfx::B2ISize& rSize ) { OSL_ENSURE( rCanvas.get() != NULL && rCanvas->getUNOCanvas().is(), @@ -106,7 +86,7 @@ namespace cppcanvas } BitmapSharedPtr BaseGfxFactory::createAlphaBitmap( const CanvasSharedPtr& rCanvas, - const ::basegfx::B2ISize& rSize ) const + const ::basegfx::B2ISize& rSize ) { OSL_ENSURE( rCanvas.get() != NULL && rCanvas->getUNOCanvas().is(), diff --git a/cppcanvas/source/wrapper/vclfactory.cxx b/cppcanvas/source/wrapper/vclfactory.cxx index 0b5f7c3..669aabf 100644 --- a/cppcanvas/source/wrapper/vclfactory.cxx +++ b/cppcanvas/source/wrapper/vclfactory.cxx @@ -39,26 +39,6 @@ using namespace ::com::sun::star; namespace cppcanvas { - /* Singleton handling */ - struct InitInstance - { - VCLFactory* operator()() - { - return new VCLFactory(); - } - }; - - VCLFactory& VCLFactory::getInstance() - { - return *rtl_Instance< VCLFactory, InitInstance, ::osl::MutexGuard, - ::osl::GetGlobalMutex >::create( - InitInstance(), ::osl::GetGlobalMutex()); - } - - VCLFactory::VCLFactory() - { - } - CanvasSharedPtr VCLFactory::createCanvas( const uno::Reference< rendering::XCanvas >& xCanvas ) { return CanvasSharedPtr( @@ -71,7 +51,7 @@ namespace cppcanvas new internal::ImplBitmapCanvas( xCanvas ) ); } - SpriteCanvasSharedPtr VCLFactory::createSpriteCanvas( const vcl::Window& rVCLWindow ) const + SpriteCanvasSharedPtr VCLFactory::createSpriteCanvas( const vcl::Window& rVCLWindow ) { return SpriteCanvasSharedPtr( new internal::ImplSpriteCanvas( @@ -80,14 +60,14 @@ namespace cppcanvas uno::UNO_QUERY) ) ); } - SpriteCanvasSharedPtr VCLFactory::createSpriteCanvas( const uno::Reference< rendering::XSpriteCanvas >& xCanvas ) const + SpriteCanvasSharedPtr VCLFactory::createSpriteCanvas( const uno::Reference< rendering::XSpriteCanvas >& xCanvas ) { return SpriteCanvasSharedPtr( new internal::ImplSpriteCanvas( xCanvas ) ); } BitmapSharedPtr VCLFactory::createBitmap( const CanvasSharedPtr& rCanvas, - const ::BitmapEx& rBmpEx ) const + const ::BitmapEx& rBmpEx ) { OSL_ENSURE( rCanvas.get() != NULL && rCanvas->getUNOCanvas().is(), @@ -108,7 +88,7 @@ namespace cppcanvas RendererSharedPtr VCLFactory::createRenderer( const CanvasSharedPtr& rCanvas, const ::GDIMetaFile& rMtf, - const Renderer::Parameters& rParms ) const + const Renderer::Parameters& rParms ) { return RendererSharedPtr( new internal::ImplRenderer( rCanvas, rMtf, diff --git a/embeddedobj/source/inc/commonembobj.hxx b/embeddedobj/source/inc/commonembobj.hxx index ae3a09a..bc89f9a 100644 --- a/embeddedobj/source/inc/commonembobj.hxx +++ b/embeddedobj/source/inc/commonembobj.hxx @@ -223,7 +223,7 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseable > CreateTempDocFromLink_Impl(); OUString GetBaseURL_Impl() const; - OUString GetBaseURLFrom_Impl( + static OUString GetBaseURLFrom_Impl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArguments, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lObjArgs ); diff --git a/embeddedobj/source/inc/docholder.hxx b/embeddedobj/source/inc/docholder.hxx index a35209e..d372a57 100644 --- a/embeddedobj/source/inc/docholder.hxx +++ b/embeddedobj/source/inc/docholder.hxx @@ -141,7 +141,7 @@ public: void PlaceFrame( const ::com::sun::star::awt::Rectangle& aNewRect ); - bool SetFrameLMVisibility( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, + static bool SetFrameLMVisibility( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, bool bVisible ); bool ShowInplace( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xParent, diff --git a/hwpfilter/source/cspline.cxx b/hwpfilter/source/cspline.cxx index 06dde6c..90f8c1c 100644 --- a/hwpfilter/source/cspline.cxx +++ b/hwpfilter/source/cspline.cxx @@ -126,8 +126,8 @@ void PeriodicSpline (int N, double* x, double* a, double*& b, double*& c, h[i] = x[i+1]-x[i]; mgcLinearSystemD sys; - double** mat = sys.NewMatrix(N+1); // guaranteed to be zeroed memory - c = sys.NewVector(N+1); // guaranteed to be zeroed memory + double** mat = mgcLinearSystemD::NewMatrix(N+1); // guaranteed to be zeroed memory + c = mgcLinearSystemD::NewVector(N+1); // guaranteed to be zeroed memory // c[0] - c[N] = 0 mat[0][0] = +1.0f; @@ -152,7 +152,7 @@ void PeriodicSpline (int N, double* x, double* a, double*& b, double*& c, c[N] = 3.0f*((a[1]-a[0])/h[0] - (a[0]-a[N-1])/h[N-1]); // solve for c[0] through c[N] - sys.Solve(N+1,mat,c); + mgcLinearSystemD::Solve(N+1,mat,c); const double oneThird = 1.0/3.0; b = new double[N]; @@ -164,7 +164,7 @@ void PeriodicSpline (int N, double* x, double* a, double*& b, double*& c, } delete[] h; - sys.DeleteMatrix(N+1,mat); + mgcLinearSystemD::DeleteMatrix(N+1,mat); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/hwpfilter/source/hwpreader.hxx b/hwpfilter/source/hwpreader.hxx index 95252d9..c3ef10a 100644 --- a/hwpfilter/source/hwpreader.hxx +++ b/hwpfilter/source/hwpreader.hxx @@ -147,8 +147,8 @@ private: void makeTableStyle(Table *); void parseCharShape(CharShape *); void parseParaShape(ParaShape *); - char* getTStyleName(int, char *); - char* getPStyleName(int, char *); + static char* getTStyleName(int, char *); + static char* getPStyleName(int, char *); }; class HwpImportFilter : public WeakImplHelper4< XFilter, XImporter, XServiceInfo, XExtendedFilterDetection > diff --git a/hwpfilter/source/solver.h b/hwpfilter/source/solver.h index 0b1fffd..8aba94a 100644 --- a/hwpfilter/source/solver.h +++ b/hwpfilter/source/solver.h @@ -25,11 +25,11 @@ class mgcLinearSystemD public: mgcLinearSystemD() {;} - double** NewMatrix (int N); - void DeleteMatrix (int N, double** A); - double* NewVector (int N); + static double** NewMatrix (int N); + static void DeleteMatrix (int N, double** A); + static double* NewVector (int N); - int Solve (int N, double** A, double* b); + static int Solve (int N, double** A, double* b); // Input: // A[N][N] coefficient matrix, entries are A[row][col] // b[N] vector, entries are b[row] diff --git a/include/cppcanvas/basegfxfactory.hxx b/include/cppcanvas/basegfxfactory.hxx index 1152114..5341cd6 100644 --- a/include/cppcanvas/basegfxfactory.hxx +++ b/include/cppcanvas/basegfxfactory.hxx @@ -53,29 +53,23 @@ namespace cppcanvas class CPPCANVAS_DLLPUBLIC BaseGfxFactory { public: - static BaseGfxFactory& getInstance(); - /** Create a polygon from a ::basegfx::B2DPolygon The created polygon initially has the same size in user coordinate space as the source polygon */ - PolyPolygonSharedPtr createPolyPolygon( const CanvasSharedPtr&, const ::basegfx::B2DPolygon& rPoly ) const; + static PolyPolygonSharedPtr createPolyPolygon( const CanvasSharedPtr&, const ::basegfx::B2DPolygon& rPoly ); /** Create an uninitialized bitmap with the given size */ - BitmapSharedPtr createBitmap( const CanvasSharedPtr&, const ::basegfx::B2ISize& rSize ) const; + static BitmapSharedPtr createBitmap( const CanvasSharedPtr&, const ::basegfx::B2ISize& rSize ); /** Create an uninitialized alpha bitmap with the given size */ - BitmapSharedPtr createAlphaBitmap( const CanvasSharedPtr&, const ::basegfx::B2ISize& rSize ) const; + static BitmapSharedPtr createAlphaBitmap( const CanvasSharedPtr&, const ::basegfx::B2ISize& rSize ); private: - friend struct InitInstance2; - - // singleton - BaseGfxFactory(); - + BaseGfxFactory() SAL_DELETED_FUNCTION; ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
