diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-03-02 16:22:14 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-02 16:53:30 +0000 |
commit | fd6986343521bc182cb26ae974dbd7b6a7e8ef25 (patch) | |
tree | a36910fa049bbdf7f42e659fba870512fd6abbb1 | |
parent | 88a031e593e0a16881132b08d162ed40a5549d23 (diff) |
V813: Decreased performance
Change-Id: I49c022b29a2771b5091ba04b85e5117773730b85
-rw-r--r-- | sw/inc/unodraw.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/unocore/unodraw.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/dbui/mmconfigitem.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/docvw/HeaderFooterWin.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/inc/langhelper.hxx | 13 | ||||
-rw-r--r-- | sw/source/uibase/inc/mmconfigitem.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/inc/wrtsh.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/langhelper.cxx | 18 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh1.cxx | 3 |
11 files changed, 33 insertions, 37 deletions
diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx index 5790b92d222b..be30e27be0a3 100644 --- a/sw/inc/unodraw.hxx +++ b/sw/inc/unodraw.hxx @@ -181,8 +181,8 @@ class SwXShape : public SwXShapeBaseClass, @author OD */ - ::com::sun::star::drawing::HomogenMatrix3 _ConvertTransformationToLayoutDir( - ::com::sun::star::drawing::HomogenMatrix3 _aMatrixInHoriL2R ); + css::drawing::HomogenMatrix3 _ConvertTransformationToLayoutDir( + const css::drawing::HomogenMatrix3& rMatrixInHoriL2R ); /** method to adjust the positioning properties diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 4c266a2a5445..2589732988b4 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3680,15 +3680,15 @@ void SwLayoutFrm::Paint(SwRect const& rRect, SwPrintData const*const) const } static drawinglayer::primitive2d::Primitive2DSequence lcl_CreateDashedIndicatorPrimitive( - basegfx::B2DPoint aStart, basegfx::B2DPoint aEnd, + const basegfx::B2DPoint& rStart, const basegfx::B2DPoint& rEnd, basegfx::BColor aColor ) { drawinglayer::primitive2d::Primitive2DSequence aSeq( 1 ); std::vector< double > aStrokePattern; basegfx::B2DPolygon aLinePolygon; - aLinePolygon.append( aStart ); - aLinePolygon.append( aEnd ); + aLinePolygon.append(rStart); + aLinePolygon.append(rEnd); const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); if ( rSettings.GetHighContrastMode( ) ) diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 3cc240edf1e3..87a888f20407 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -2550,9 +2550,9 @@ awt::Point SwXShape::_ConvertPositionToHoriL2R( const awt::Point _aObjPos, #i31698# */ drawing::HomogenMatrix3 SwXShape::_ConvertTransformationToLayoutDir( - drawing::HomogenMatrix3 _aMatrixInHoriL2R ) + const drawing::HomogenMatrix3& rMatrixInHoriL2R ) { - drawing::HomogenMatrix3 aMatrix( _aMatrixInHoriL2R ); + drawing::HomogenMatrix3 aMatrix(rMatrixInHoriL2R); // #i44334#, #i44681# - direct manipulation of the // tranformation structure isn't valid, if it contains rotation. diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 499e73bd96c4..e101eb953f42 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1035,7 +1035,7 @@ public: SwStyleProperties_Impl(const SfxItemPropertyMap& rMap); ~SwStyleProperties_Impl(); - bool SetProperty(const OUString& rName, uno::Any aVal); + bool SetProperty(const OUString& rName, const uno::Any& rVal); bool GetProperty(const OUString& rName, uno::Any*& rpAny); bool ClearProperty( const OUString& rPropertyName ); void ClearAllProperties( ); @@ -1063,7 +1063,7 @@ SwStyleProperties_Impl::~SwStyleProperties_Impl() delete[] pAnyArr; } -bool SwStyleProperties_Impl::SetProperty(const OUString& rName, uno::Any aVal) +bool SwStyleProperties_Impl::SetProperty(const OUString& rName, const uno::Any& rVal) { sal_uInt16 nPos = 0; bool bRet = false; @@ -1073,7 +1073,7 @@ bool SwStyleProperties_Impl::SetProperty(const OUString& rName, uno::Any aVal) if(rName == aIt->sName) { delete pAnyArr[nPos]; - pAnyArr[nPos] = new uno::Any ( aVal ); + pAnyArr[nPos] = new uno::Any(rVal); bRet = true; break; } diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx index f4efd1ab6931..12e1465eb466 100644 --- a/sw/source/uibase/dbui/mmconfigitem.cxx +++ b/sw/source/uibase/dbui/mmconfigitem.cxx @@ -827,12 +827,12 @@ void SwMailMergeConfigItem::SetCountrySettings(bool bSet, const OUString& rCount void SwMailMergeConfigItem::SetCurrentConnection( Reference< XDataSource> xSource, - SharedConnection xConnection, + const SharedConnection& rConnection, Reference< XColumnsSupplier> xColumnsSupplier, const SwDBData& rDBData) { m_pImpl->xSource = xSource ; - m_pImpl->xConnection = xConnection ; + m_pImpl->xConnection = rConnection ; m_pImpl->xColumnsSupplier = xColumnsSupplier; m_pImpl->aDBData = rDBData; m_pImpl->xResultSet = 0; diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index 6ac23cc79cfc..53c7c2825772 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -60,9 +60,9 @@ using namespace drawinglayer::attribute; namespace { - static basegfx::BColor lcl_GetFillColor( basegfx::BColor aLineColor ) + static basegfx::BColor lcl_GetFillColor(const basegfx::BColor& rLineColor) { - basegfx::BColor aHslLine = basegfx::tools::rgb2hsl( aLineColor ); + basegfx::BColor aHslLine = basegfx::tools::rgb2hsl(rLineColor); double nLuminance = aHslLine.getZ() * 2.5; if ( nLuminance == 0 ) nLuminance = 0.5; @@ -72,9 +72,9 @@ namespace return basegfx::tools::hsl2rgb( aHslLine ); } - static basegfx::BColor lcl_GetLighterGradientColor( basegfx::BColor aDarkColor ) + static basegfx::BColor lcl_GetLighterGradientColor(const basegfx::BColor& rDarkColor) { - basegfx::BColor aHslDark = basegfx::tools::rgb2hsl( aDarkColor ); + basegfx::BColor aHslDark = basegfx::tools::rgb2hsl(rDarkColor); double nLuminance = aHslDark.getZ() * 255 + 20; aHslDark.setZ( nLuminance / 255.0 ); return basegfx::tools::hsl2rgb( aHslDark ); diff --git a/sw/source/uibase/inc/langhelper.hxx b/sw/source/uibase/inc/langhelper.hxx index b4f1ebe8b970..8a62282a6866 100644 --- a/sw/source/uibase/inc/langhelper.hxx +++ b/sw/source/uibase/inc/langhelper.hxx @@ -33,22 +33,19 @@ namespace SwLangHelper extern bool SetLanguageStatus( OutlinerView* pOLV, SfxRequest &rReq, SwView &rView, SwWrtShell &rSh ); extern void SetLanguage( SwWrtShell &rWrtSh, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ); -// extern void SetLanguage( SwWrtShell &rWrtSh, EditEngine* pEditEngine, ESelection aSelection, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ); - extern void SetLanguage( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ); + extern void SetLanguage( SwWrtShell &rWrtSh, OutlinerView* pOLV, const ESelection& rSelection, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ); extern void SetLanguage_None( SwWrtShell &rWrtSh, bool bIsForSelection, SfxItemSet &rCoreSet ); -// extern void SetLanguage_None( SwWrtShell &rWrtSh, EditEngine* pEditEngine, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet ); - extern void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet ); + extern void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView* pOLV, const ESelection& rSelection, bool bIsForSelection, SfxItemSet &rCoreSet ); extern void ResetLanguages( SwWrtShell &rWrtSh, bool bIsForSelection ); -// extern void ResetLanguages( SwWrtShell &rWrtSh, EditEngine* pEditEngine, ESelection aSelection, bool bIsForSelection ); - extern void ResetLanguages( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection ); + extern void ResetLanguages( SwWrtShell &rWrtSh, OutlinerView* pOLV, const ESelection& rSelection, bool bIsForSelection ); // document extern void SelectCurrentPara( SwWrtShell &rWrtSh ); // EditView extern void SelectPara( EditView &rEditView, const ESelection &rCurSel ); - extern OUString GetTextForLanguageGuessing( EditEngine* rEditEngine, ESelection aDocSelection ); - extern OUString GetTextForLanguageGuessing( SwWrtShell &rSh ); + extern OUString GetTextForLanguageGuessing(EditEngine* rEditEngine, const ESelection& rDocSelection); + extern OUString GetTextForLanguageGuessing(SwWrtShell &rSh); extern LanguageType GetLanguage( SfxItemSet aSet, sal_uInt16 nLangWhichId ); extern LanguageType GetLanguage( SwWrtShell &rSh, sal_uInt16 nLangWhichId ); diff --git a/sw/source/uibase/inc/mmconfigitem.hxx b/sw/source/uibase/inc/mmconfigitem.hxx index 8117cfd01ca4..7b4115ed7689 100644 --- a/sw/source/uibase/inc/mmconfigitem.hxx +++ b/sw/source/uibase/inc/mmconfigitem.hxx @@ -82,7 +82,7 @@ public: void SetCurrentConnection( ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> xSource, - SharedConnection xConnection, + const SharedConnection& rConnection, ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> xColumnsSupplier, const SwDBData& rDBData); diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx index cd394fafc21b..e1b312ef1fee 100644 --- a/sw/source/uibase/inc/wrtsh.hxx +++ b/sw/source/uibase/inc/wrtsh.hxx @@ -296,7 +296,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); bool bRule = false ); void InsertByWord( const OUString & ); - void InsertPageBreak(const OUString *pPageDesc = 0, ::boost::optional<sal_uInt16> pPgNum = boost::none ); + void InsertPageBreak(const OUString *pPageDesc = 0, const ::boost::optional<sal_uInt16>& rPgNum = boost::none); void InsertLineBreak(); void InsertColumnBreak(); void InsertFootnote(const OUString &, bool bEndNote = false, bool bEdit = true ); diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx index 5b15c36bd3d8..866aeb9240d1 100644 --- a/sw/source/uibase/shells/langhelper.cxx +++ b/sw/source/uibase/shells/langhelper.cxx @@ -231,7 +231,7 @@ namespace SwLangHelper SetLanguage( rWrtSh, 0 , ESelection(), rLangText, bIsForSelection, rCoreSet ); } - void SetLanguage( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ) + void SetLanguage( SwWrtShell &rWrtSh, OutlinerView* pOLV, const ESelection& rSelection, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet ) { const LanguageType nLang = SvtLanguageTable::GetLanguageType( rLangText ); if (nLang != LANGUAGE_DONTKNOW) @@ -262,7 +262,7 @@ namespace SwLangHelper if (pEditEngine) { rCoreSet.Put( SvxLanguageItem( nLang, nLangWhichId )); - pEditEngine->QuickSetAttribs( rCoreSet, aSelection); + pEditEngine->QuickSetAttribs(rCoreSet, rSelection); } else { @@ -313,7 +313,7 @@ namespace SwLangHelper SetLanguage_None( rWrtSh,0,ESelection(),bIsForSelection,rCoreSet ); } - void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet ) + void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView* pOLV, const ESelection& rSelection, bool bIsForSelection, SfxItemSet &rCoreSet ) { // EditEngine IDs const sal_uInt16 aLangWhichId_EE[3] = @@ -343,7 +343,7 @@ namespace SwLangHelper { for (size_t i = 0; i < SAL_N_ELEMENTS(aLangWhichId_EE); ++i) rCoreSet.Put( SvxLanguageItem( LANGUAGE_NONE, aLangWhichId_EE[i] )); - pEditEngine->QuickSetAttribs( rCoreSet, aSelection); + pEditEngine->QuickSetAttribs(rCoreSet, rSelection); } else { @@ -373,10 +373,10 @@ namespace SwLangHelper ResetLanguages( rWrtSh, 0 , ESelection(), bIsForSelection ); } - void ResetLanguages( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection ) + void ResetLanguages( SwWrtShell &rWrtSh, OutlinerView* pOLV, const ESelection& rSelection, bool bIsForSelection ) { (void) bIsForSelection; - (void) aSelection; + (void) rSelection; // reset language for current selection. // The selection should already have been expanded to the whole paragraph or @@ -558,17 +558,17 @@ namespace SwLangHelper return aText; } - OUString GetTextForLanguageGuessing( EditEngine* rEditEngine, ESelection aDocSelection ) + OUString GetTextForLanguageGuessing(EditEngine* rEditEngine, const ESelection& rDocSelection) { // string for guessing language OUString aText; // get the full text of the paragraph that the end of selection is in - aText = rEditEngine->GetText(aDocSelection.nEndPos); + aText = rEditEngine->GetText(rDocSelection.nEndPos); if (!aText.isEmpty()) { sal_Int32 nStt = 0; - sal_Int32 nEnd = aDocSelection.nEndPos; + sal_Int32 nEnd = rDocSelection.nEndPos; // at most 100 chars to the left... nStt = nEnd > 100 ? nEnd - 100 : 0; // ... and 100 to the right of the cursor position diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index e84ef8000f11..2267b09f07f9 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -833,8 +833,7 @@ void SwWrtShell::ConnectObj( svt::EmbeddedObjectRef& xObj, const SwRect &rPrt, // Insert hard page break; // Selections will be overwritten - -void SwWrtShell::InsertPageBreak(const OUString *pPageDesc, ::boost::optional<sal_uInt16> oPgNum ) +void SwWrtShell::InsertPageBreak(const OUString *pPageDesc, const ::boost::optional<sal_uInt16>& oPgNum ) { ResetCursorStack(); if( CanInsert() ) |