loplugin:passstuffbyref more return improvements
slightly less restrictive check when calling functions Change-Id: I35e268ac611797b1daa83777cda02288a635aa32 Reviewed-on: https://gerrit.libreoffice.org/47259 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
f4bd9029ba
commit
acdba3c2ee
@ -422,7 +422,7 @@ public:
|
||||
void BasicRemoveWatch ();
|
||||
Color const & GetBackgroundColor () const { return aSyntaxColors.GetBackgroundColor(); }
|
||||
Color const & GetFontColor () const { return aSyntaxColors.GetFontColor(); }
|
||||
Color GetSyntaxColor (TokenType eType) const { return aSyntaxColors.GetColor(eType); }
|
||||
Color const & GetSyntaxColor (TokenType eType) const { return aSyntaxColors.GetColor(eType); }
|
||||
|
||||
protected:
|
||||
// Window:
|
||||
@ -449,7 +449,7 @@ private:
|
||||
public:
|
||||
Color const & GetBackgroundColor () const { return m_aBackgroundColor; };
|
||||
Color const & GetFontColor () const { return m_aFontColor; }
|
||||
Color GetColor (TokenType eType) const { return aColors[eType]; }
|
||||
Color const & GetColor(TokenType eType) const { return aColors[eType]; }
|
||||
|
||||
private:
|
||||
virtual void ConfigurationChanged (utl::ConfigurationBroadcaster*, ConfigurationHints) override;
|
||||
|
@ -275,7 +275,7 @@ void PassStuffByRef::checkReturnValue(const FunctionDecl * functionDecl, const C
|
||||
return;
|
||||
}
|
||||
|
||||
//functionDecl->dump();
|
||||
// functionDecl->dump();
|
||||
|
||||
mbInsideFunctionDecl = true;
|
||||
mbFoundReturnValueDisqualifier = false;
|
||||
@ -412,12 +412,14 @@ bool PassStuffByRef::isReturnExprDisqualified(const Expr* expr)
|
||||
FunctionDecl const * calleeFunctionDecl = callExpr->getDirectCallee();
|
||||
if (!calleeFunctionDecl)
|
||||
return true;
|
||||
// TODO anything takes a param is suspect because it might return the param by ref.
|
||||
// TODO anything takes a non-integral param is suspect because it might return the param by ref.
|
||||
// we could tighten this to only reject functions that have a param of the same type
|
||||
// as the return type. Or we could check for such functions and disallow them.
|
||||
// Or we could force such functions to be annotated somehow.
|
||||
if (calleeFunctionDecl->getNumParams() > 0)
|
||||
return true;
|
||||
for (unsigned i = 0; i != calleeFunctionDecl->getNumParams(); ++i) {
|
||||
if (!calleeFunctionDecl->getParamDecl(i)->getType()->isIntegralOrEnumerationType())
|
||||
return true;
|
||||
}
|
||||
auto tc = loplugin::TypeCheck(calleeFunctionDecl->getReturnType());
|
||||
if (!tc.LvalueReference() && !tc.Pointer())
|
||||
return true;
|
||||
|
@ -41,8 +41,7 @@ struct S2 {
|
||||
// TODO
|
||||
OUString get10() { return OUString(*&get6()); } // todoexpected-error {{rather return class rtl::OUString by const& than by value, to avoid unnecessary copying [loplugin:passstuffbyref]}}
|
||||
OUString get11() const { return mxCow->get(); } // expected-error {{rather return class rtl::OUString by const& than by value, to avoid unnecessary copying [loplugin:passstuffbyref]}}
|
||||
// TODO anything takes a param is suspect because it might return the param by ref
|
||||
OUString get12() { return child.get2(false); } // todoexpected-error {{rather return class rtl::OUString by const& than by value, to avoid unnecessary copying [loplugin:passstuffbyref]}}
|
||||
OUString get12() { return child.get2(false); } // expected-error {{rather return class rtl::OUString by const& than by value, to avoid unnecessary copying [loplugin:passstuffbyref]}}
|
||||
|
||||
// no warning expected
|
||||
OUString set1() { return OUString("xxx"); }
|
||||
|
@ -551,13 +551,13 @@ ODsnTypeCollection::TypeIterator::~TypeIterator()
|
||||
#endif
|
||||
}
|
||||
|
||||
OUString ODsnTypeCollection::TypeIterator::getDisplayName() const
|
||||
OUString const & ODsnTypeCollection::TypeIterator::getDisplayName() const
|
||||
{
|
||||
OSL_ENSURE(m_nPosition < (sal_Int32)m_pContainer->m_aDsnTypesDisplayNames.size(), "ODsnTypeCollection::TypeIterator::getDisplayName : invalid position!");
|
||||
return m_pContainer->m_aDsnTypesDisplayNames[m_nPosition];
|
||||
}
|
||||
|
||||
OUString ODsnTypeCollection::TypeIterator::getURLPrefix() const
|
||||
OUString const & ODsnTypeCollection::TypeIterator::getURLPrefix() const
|
||||
{
|
||||
OSL_ENSURE(m_nPosition < (sal_Int32)m_pContainer->m_aDsnPrefixes.size(), "ODsnTypeCollection::TypeIterator::getDisplayName : invalid position!");
|
||||
return m_pContainer->m_aDsnPrefixes[m_nPosition];
|
||||
|
@ -201,8 +201,8 @@ public:
|
||||
TypeIterator(const TypeIterator& _rSource);
|
||||
~TypeIterator();
|
||||
|
||||
OUString getURLPrefix() const;
|
||||
OUString getDisplayName() const;
|
||||
OUString const & getURLPrefix() const;
|
||||
OUString const & getDisplayName() const;
|
||||
|
||||
/// prefix increment
|
||||
const TypeIterator& operator++();
|
||||
|
@ -67,8 +67,8 @@ namespace dbaui
|
||||
|
||||
// member access (read)
|
||||
const OUString& GetFieldName(EConnectionSide nWhich) const { return (nWhich == JTCS_FROM) ? m_aSourceFieldName : m_aDestFieldName; }
|
||||
OUString GetSourceFieldName() const { return GetFieldName(JTCS_FROM); }
|
||||
OUString GetDestFieldName() const { return GetFieldName(JTCS_TO); }
|
||||
OUString const & GetSourceFieldName() const { return GetFieldName(JTCS_FROM); }
|
||||
OUString const & GetDestFieldName() const { return GetFieldName(JTCS_TO); }
|
||||
|
||||
void Reset();
|
||||
OConnectionLineData& operator=( const OConnectionLineData& rConnLineData );
|
||||
|
@ -36,7 +36,7 @@ namespace dbaui
|
||||
OQueryTableConnection& operator=(const OQueryTableConnection& rConn);
|
||||
bool operator==(const OQueryTableConnection& rCompare);
|
||||
|
||||
OUString GetAliasName(EConnectionSide nWhich) const { return static_cast<OQueryTableConnectionData*>(GetData().get())->GetAliasName(nWhich); }
|
||||
OUString const & GetAliasName(EConnectionSide nWhich) const { return static_cast<OQueryTableConnectionData*>(GetData().get())->GetAliasName(nWhich); }
|
||||
|
||||
bool IsVisited() const { return m_bVisited; }
|
||||
void SetVisited(bool bVisited) { m_bVisited = bVisited; }
|
||||
|
@ -1396,7 +1396,7 @@ sal_Int8 OSelectionBrowseBox::ExecuteDrop( const BrowserExecuteDropEvent& _rEvt
|
||||
return DND_ACTION_LINK;
|
||||
}
|
||||
|
||||
OTableFieldDescRef OSelectionBrowseBox::AppendNewCol( sal_uInt16 nCnt)
|
||||
OTableFieldDescRef const & OSelectionBrowseBox::AppendNewCol( sal_uInt16 nCnt)
|
||||
{
|
||||
// one or more can be created, but the first one will is not returned
|
||||
sal_uInt32 nCount = getFields().size();
|
||||
|
@ -100,7 +100,7 @@ namespace dbaui
|
||||
void DuplicateConditionLevel( const sal_uInt16 nLevel);
|
||||
void AddOrder(const OTableFieldDescRef& rInfo, const EOrderDir eDir, sal_uInt32 _nCurrentPos);
|
||||
void ClearAll();
|
||||
OTableFieldDescRef AppendNewCol( sal_uInt16 nCnt=1 );
|
||||
OTableFieldDescRef const & AppendNewCol( sal_uInt16 nCnt=1 );
|
||||
bool Save();
|
||||
OQueryDesignView* getDesignView();
|
||||
OQueryDesignView* getDesignView() const;
|
||||
|
@ -173,7 +173,7 @@ public:
|
||||
virtual bool EventNotify( NotifyEvent& rNEvt ) override;
|
||||
virtual Size GetOptimalSize() const override;
|
||||
|
||||
TEntry_Impl GetEntryData( long nPos ) { return m_vEntries[ nPos ]; }
|
||||
TEntry_Impl const & GetEntryData( long nPos ) { return m_vEntries[ nPos ]; }
|
||||
long GetEntryCount() { return (long) m_vEntries.size(); }
|
||||
tools::Rectangle GetEntryRect( const long nPos ) const;
|
||||
bool HasActive() { return m_bHasActive; }
|
||||
|
@ -1721,7 +1721,7 @@ bool Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView, sal_Int32 _nFi
|
||||
return RemovingPagesHdl( pCurView );
|
||||
}
|
||||
|
||||
SfxItemSet Outliner::GetParaAttribs( sal_Int32 nPara )
|
||||
SfxItemSet const & Outliner::GetParaAttribs( sal_Int32 nPara )
|
||||
{
|
||||
return pEditEngine->GetParaAttribs( nPara );
|
||||
}
|
||||
|
@ -864,7 +864,7 @@ public:
|
||||
SfxStyleSheet* GetStyleSheet( sal_Int32 nPara );
|
||||
|
||||
void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& );
|
||||
SfxItemSet GetParaAttribs( sal_Int32 nPara );
|
||||
SfxItemSet const & GetParaAttribs( sal_Int32 nPara );
|
||||
|
||||
void Remove( Paragraph const * pPara, sal_Int32 nParaCount );
|
||||
bool Expand( Paragraph const * );
|
||||
|
@ -85,7 +85,7 @@ public:
|
||||
const ResourceManager::DeckContextDescriptorContainer& rDecks);
|
||||
void HighlightDeck (const OUString& rsDeckId);
|
||||
void RemoveDeckHighlight ();
|
||||
const OUString GetDeckIdForIndex (const sal_Int32 nIndex) const;
|
||||
OUString const & GetDeckIdForIndex (const sal_Int32 nIndex) const;
|
||||
void ToggleHideFlag (const sal_Int32 nIndex);
|
||||
void RestoreHideFlags();
|
||||
|
||||
|
@ -166,7 +166,7 @@ public:
|
||||
|
||||
virtual OString GetScreenshotId() const override;
|
||||
|
||||
OUString GetPageText( sal_uInt16 nPageId ) const
|
||||
OUString const & GetPageText( sal_uInt16 nPageId ) const
|
||||
{
|
||||
return m_pTabCtrl->GetPageText(nPageId);
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ public:
|
||||
|
||||
/** Returns a recognizer.
|
||||
*/
|
||||
css::uno::Reference< css::smarttags::XSmartTagRecognizer >
|
||||
css::uno::Reference< css::smarttags::XSmartTagRecognizer > const &
|
||||
GetRecognizer( sal_uInt32 i ) const { return maRecognizerList[i]; }
|
||||
|
||||
/** Is smart tag recognition active?
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
sal_uInt16 Count() const;
|
||||
|
||||
SotClipboardFormatId GetClipbrdFormatId( sal_uInt16 nPos ) const;
|
||||
const OUString GetClipbrdFormatName( sal_uInt16 nPos ) const;
|
||||
OUString const & GetClipbrdFormatName( sal_uInt16 nPos ) const;
|
||||
|
||||
private:
|
||||
std::unique_ptr<SvxClipboardFormatItem_Impl> pImpl;
|
||||
|
@ -412,7 +412,7 @@ void ScDrawShell::Activate (const bool)
|
||||
GetSidebarContextName()));
|
||||
}
|
||||
|
||||
::rtl::OUString ScDrawShell::GetSidebarContextName()
|
||||
const OUString & ScDrawShell::GetSidebarContextName()
|
||||
{
|
||||
return vcl::EnumContext::GetContextName(
|
||||
svx::sidebar::SelectionAnalyzer::GetContextForSelection_SC(
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
static bool AreAllObjectsOnLayer(SdrLayerID nLayerNo,const SdrMarkList& rMark);
|
||||
|
||||
void GetDrawAttrStateForIFBX( SfxItemSet& rSet );
|
||||
::rtl::OUString GetSidebarContextName();
|
||||
OUString const & GetSidebarContextName();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -137,7 +137,7 @@ public:
|
||||
Size GetOptimalSize() const override;
|
||||
bool EventNotify( NotifyEvent& rNEvt ) override;
|
||||
|
||||
TClientBoxEntry GetEntryData( long nPos ) { return m_vEntries[ nPos ]; }
|
||||
TClientBoxEntry const & GetEntryData( long nPos ) { return m_vEntries[ nPos ]; }
|
||||
long GetActiveEntryIndex();
|
||||
::tools::Rectangle GetEntryRect( const long nPos ) const;
|
||||
long PointToPos( const Point& rPos );
|
||||
|
@ -362,7 +362,7 @@ public:
|
||||
*/
|
||||
virtual bool RelocateToParentWindow (vcl::Window* pParentWindow) override;
|
||||
|
||||
OUString GetSidebarContextName() const;
|
||||
OUString const & GetSidebarContextName() const;
|
||||
|
||||
bool IsInSwitchPage() { return mbIsInSwitchPage; }
|
||||
|
||||
|
@ -35,8 +35,8 @@ public:
|
||||
ZoomList(ViewShell* pViewShell);
|
||||
|
||||
void InsertZoomRect(const ::tools::Rectangle& rRect);
|
||||
::tools::Rectangle GetNextZoomRect();
|
||||
::tools::Rectangle GetPreviousZoomRect();
|
||||
::tools::Rectangle const & GetNextZoomRect();
|
||||
::tools::Rectangle const & GetPreviousZoomRect();
|
||||
bool IsNextPossible() const;
|
||||
bool IsPreviousPossible() const;
|
||||
|
||||
|
@ -237,7 +237,7 @@ void MasterPageContainer::SetPreviewSize (PreviewSize eSize)
|
||||
NIL_TOKEN);
|
||||
}
|
||||
|
||||
Size MasterPageContainer::GetPreviewSizePixel() const
|
||||
Size const & MasterPageContainer::GetPreviewSizePixel() const
|
||||
{
|
||||
return mpImpl->GetPreviewSizePixel(mePreviewSize);
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ public:
|
||||
|
||||
/** Return the preview size in pixels.
|
||||
*/
|
||||
Size GetPreviewSizePixel() const;
|
||||
Size const & GetPreviewSizePixel() const;
|
||||
|
||||
enum PreviewState { PS_AVAILABLE, PS_CREATABLE, PS_PREPARING, PS_NOT_AVAILABLE };
|
||||
PreviewState GetPreviewState (Token aToken);
|
||||
|
@ -751,7 +751,7 @@ void DrawViewShell::GetAnnotationState (SfxItemSet& rItemSet )
|
||||
mpAnnotationManager->GetAnnotationState( rItemSet );
|
||||
}
|
||||
|
||||
::rtl::OUString DrawViewShell::GetSidebarContextName() const
|
||||
OUString const & DrawViewShell::GetSidebarContextName() const
|
||||
{
|
||||
svx::sidebar::SelectionAnalyzer::ViewType eViewType (svx::sidebar::SelectionAnalyzer::ViewType::Standard);
|
||||
switch (mePageKind)
|
||||
|
@ -54,7 +54,7 @@ void ZoomList::InsertZoomRect(const ::tools::Rectangle& rRect)
|
||||
rBindings.Invalidate( SID_ZOOM_PREV );
|
||||
}
|
||||
|
||||
::tools::Rectangle ZoomList::GetNextZoomRect()
|
||||
::tools::Rectangle const & ZoomList::GetNextZoomRect()
|
||||
{
|
||||
mnCurPos++;
|
||||
size_t nRectCount = maRectangles.size();
|
||||
@ -69,7 +69,7 @@ void ZoomList::InsertZoomRect(const ::tools::Rectangle& rRect)
|
||||
return maRectangles[mnCurPos];
|
||||
}
|
||||
|
||||
::tools::Rectangle ZoomList::GetPreviousZoomRect()
|
||||
::tools::Rectangle const & ZoomList::GetPreviousZoomRect()
|
||||
{
|
||||
if (mnCurPos > 0)
|
||||
mnCurPos--;
|
||||
|
@ -306,7 +306,7 @@ IMPL_LINK_NOARG(TabBar::Item, HandleClick, Button*, void)
|
||||
{} // workaround for #i123198#
|
||||
}
|
||||
|
||||
const ::rtl::OUString TabBar::GetDeckIdForIndex (const sal_Int32 nIndex) const
|
||||
OUString const & TabBar::GetDeckIdForIndex (const sal_Int32 nIndex) const
|
||||
{
|
||||
if (nIndex<0 || static_cast<size_t>(nIndex)>=maItems.size())
|
||||
throw RuntimeException();
|
||||
|
@ -105,7 +105,7 @@ public:
|
||||
namespace
|
||||
{
|
||||
|
||||
OUString getCategoryType()
|
||||
OUString const & getCategoryType()
|
||||
{
|
||||
return SfxClassificationHelper::policyTypeToString(SfxClassificationHelper::getPolicyType());
|
||||
}
|
||||
|
@ -163,9 +163,9 @@ private:
|
||||
virtual void SAL_CALL disposing() override;
|
||||
|
||||
/// @throws css::lang::IndexOutOfBoundsException
|
||||
TableRowRef getRow( sal_Int32 nRow ) const;
|
||||
TableRowRef const & getRow( sal_Int32 nRow ) const;
|
||||
/// @throws css::lang::IndexOutOfBoundsException
|
||||
TableColumnRef getColumn( sal_Int32 nColumn ) const;
|
||||
TableColumnRef const & getColumn( sal_Int32 nColumn ) const;
|
||||
|
||||
void updateRows();
|
||||
void updateColumns();
|
||||
|
@ -138,7 +138,7 @@ SotClipboardFormatId SvxClipboardFormatItem::GetClipbrdFormatId( sal_uInt16 nPos
|
||||
return pImpl->aFmtIds[ nPos ];
|
||||
}
|
||||
|
||||
const OUString SvxClipboardFormatItem::GetClipbrdFormatName( sal_uInt16 nPos ) const
|
||||
OUString const & SvxClipboardFormatItem::GetClipbrdFormatName( sal_uInt16 nPos ) const
|
||||
{
|
||||
return pImpl->aFmtNms[nPos];
|
||||
}
|
||||
|
@ -942,7 +942,7 @@ void TableModel::removeRows( sal_Int32 nIndex, sal_Int32 nCount )
|
||||
}
|
||||
|
||||
|
||||
TableRowRef TableModel::getRow( sal_Int32 nRow ) const
|
||||
TableRowRef const & TableModel::getRow( sal_Int32 nRow ) const
|
||||
{
|
||||
if( (nRow >= 0) && (nRow < getRowCountImpl()) )
|
||||
return maRows[nRow];
|
||||
@ -951,7 +951,7 @@ TableRowRef TableModel::getRow( sal_Int32 nRow ) const
|
||||
}
|
||||
|
||||
|
||||
TableColumnRef TableModel::getColumn( sal_Int32 nColumn ) const
|
||||
TableColumnRef const & TableModel::getColumn( sal_Int32 nColumn ) const
|
||||
{
|
||||
if( (nColumn >= 0) && (nColumn < getColumnCountImpl()) )
|
||||
return maColumns[nColumn];
|
||||
|
@ -132,8 +132,8 @@ public:
|
||||
void SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey const nKeys[]);
|
||||
|
||||
//initui.cxx
|
||||
static OUString GetAuthFieldName(ToxAuthorityField eType);
|
||||
static OUString GetAuthTypeName(ToxAuthorityType eType);
|
||||
static OUString const & GetAuthFieldName(ToxAuthorityField eType);
|
||||
static OUString const & GetAuthTypeName(ToxAuthorityType eType);
|
||||
|
||||
LanguageType GetLanguage() const {return m_eLanguage;}
|
||||
void SetLanguage(LanguageType nLang) {m_eLanguage = nLang;}
|
||||
|
@ -217,7 +217,7 @@ public:
|
||||
|
||||
sal_uInt16 GetStackCount() const;
|
||||
std::size_t GetAuthor( sal_uInt16 nPos = 0) const;
|
||||
OUString GetAuthorString( sal_uInt16 nPos = 0 ) const;
|
||||
OUString const & GetAuthorString( sal_uInt16 nPos = 0 ) const;
|
||||
const DateTime& GetTimeStamp( sal_uInt16 nPos = 0) const;
|
||||
RedlineType_t GetRealType( sal_uInt16 nPos = 0 ) const;
|
||||
RedlineType_t GetType( sal_uInt16 nPos = 0) const
|
||||
|
@ -191,7 +191,7 @@ public:
|
||||
|
||||
// Redlining.
|
||||
std::size_t GetRedlineAuthor();
|
||||
OUString GetRedlineAuthor(std::size_t nPos);
|
||||
OUString const & GetRedlineAuthor(std::size_t nPos);
|
||||
/// See SwXTextDocument::getTrackedChangeAuthors().
|
||||
OUString GetRedlineAuthorInfo();
|
||||
std::size_t InsertRedlineAuthor(const OUString& rAuthor);
|
||||
|
@ -1709,7 +1709,7 @@ std::size_t SwRangeRedline::GetAuthor( sal_uInt16 nPos ) const
|
||||
return GetRedlineData(nPos).nAuthor;
|
||||
}
|
||||
|
||||
OUString SwRangeRedline::GetAuthorString( sal_uInt16 nPos ) const
|
||||
OUString const & SwRangeRedline::GetAuthorString( sal_uInt16 nPos ) const
|
||||
{
|
||||
return SW_MOD()->GetRedlineAuthor(GetRedlineData(nPos).nAuthor);
|
||||
}
|
||||
|
@ -370,7 +370,7 @@ void MSWordStyles::BuildStyleIds()
|
||||
}
|
||||
}
|
||||
|
||||
OString MSWordStyles::GetStyleId(sal_uInt16 nId) const
|
||||
OString const & MSWordStyles::GetStyleId(sal_uInt16 nId) const
|
||||
{
|
||||
return m_aStyleIds[nId];
|
||||
}
|
||||
|
@ -1571,7 +1571,7 @@ public:
|
||||
sal_uInt16 GetSlot( const SwFormat* pFormat ) const;
|
||||
|
||||
/// Get styleId of the nId-th style (nId is its position in pFormatA).
|
||||
OString GetStyleId(sal_uInt16 nId) const;
|
||||
OString const & GetStyleId(sal_uInt16 nId) const;
|
||||
|
||||
const SwFormat* GetSwFormat(sal_uInt16 nId) const { return m_pFormatA[nId]; }
|
||||
/// Get numbering rule of the nId-th style
|
||||
|
@ -418,7 +418,7 @@ void SwModule::SetRedlineAuthor(const OUString &rAuthor)
|
||||
InsertRedlineAuthor( m_sActAuthor );
|
||||
}
|
||||
|
||||
OUString SwModule::GetRedlineAuthor(std::size_t nPos)
|
||||
OUString const & SwModule::GetRedlineAuthor(std::size_t nPos)
|
||||
{
|
||||
OSL_ENSURE(nPos < m_pAuthorNames.size(), "author not found!"); //#i45342# RTF doc with no author table caused reader to crash
|
||||
while(nPos >= m_pAuthorNames.size())
|
||||
|
@ -97,7 +97,7 @@ public:
|
||||
);
|
||||
|
||||
size_t GetGroupCnt();
|
||||
OUString GetGroupName(size_t);
|
||||
OUString const & GetGroupName(size_t);
|
||||
OUString GetGroupTitle( const OUString& rGroupName );
|
||||
|
||||
bool FindGroupName(OUString& rGroup);
|
||||
|
@ -352,7 +352,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
|
||||
|
||||
void SetPageStyle(const OUString &rCollName);
|
||||
|
||||
OUString GetCurPageStyle() const;
|
||||
OUString const & GetCurPageStyle() const;
|
||||
|
||||
// change current style using the attributes in effect
|
||||
void QuickUpdateStyle();
|
||||
|
@ -132,7 +132,7 @@ bool SwGlossaries::FindGroupName(OUString& rGroup)
|
||||
return false;
|
||||
}
|
||||
|
||||
OUString SwGlossaries::GetGroupName(size_t nGroupId)
|
||||
OUString const & SwGlossaries::GetGroupName(size_t nGroupId)
|
||||
{
|
||||
OSL_ENSURE(nGroupId < m_GlosArr.size(),
|
||||
"SwGlossaries::GetGroupName: index out of bounds");
|
||||
|
@ -329,7 +329,7 @@ namespace
|
||||
};
|
||||
}
|
||||
|
||||
OUString SwAuthorityFieldType::GetAuthFieldName(ToxAuthorityField eType)
|
||||
OUString const & SwAuthorityFieldType::GetAuthFieldName(ToxAuthorityField eType)
|
||||
{
|
||||
if(!pAuthFieldNameList)
|
||||
{
|
||||
@ -367,7 +367,7 @@ static const char* STR_AUTH_TYPE_ARY[] =
|
||||
STR_AUTH_TYPE_CUSTOM5
|
||||
};
|
||||
|
||||
OUString SwAuthorityFieldType::GetAuthTypeName(ToxAuthorityType eType)
|
||||
OUString const & SwAuthorityFieldType::GetAuthTypeName(ToxAuthorityType eType)
|
||||
{
|
||||
if(!pAuthFieldTypeList)
|
||||
{
|
||||
|
@ -1504,7 +1504,7 @@ void SwWrtShell::SetPageStyle(const OUString &rCollName)
|
||||
|
||||
// Access templates
|
||||
|
||||
OUString SwWrtShell::GetCurPageStyle() const
|
||||
OUString const & SwWrtShell::GetCurPageStyle() const
|
||||
{
|
||||
return GetPageDesc(GetCurPageDesc( false/*bCalcFrame*/ )).GetName();
|
||||
}
|
||||
|
@ -352,7 +352,7 @@ public:
|
||||
|
||||
@param i index of the row
|
||||
*/
|
||||
const RowPointer_t getRow(unsigned int i) const
|
||||
RowPointer_t const & getRow(unsigned int i) const
|
||||
{
|
||||
return mRows[i];
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ OOXMLValue::Pointer_t const & OOXMLBooleanValue::Create(bool bValue)
|
||||
return bValue ? True : False;
|
||||
}
|
||||
|
||||
OOXMLValue::Pointer_t OOXMLBooleanValue::Create(const char *pValue)
|
||||
OOXMLValue::Pointer_t const & OOXMLBooleanValue::Create(const char *pValue)
|
||||
{
|
||||
return Create (GetBooleanValue(pValue));
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ class OOXMLBooleanValue : public OOXMLValue
|
||||
explicit OOXMLBooleanValue(bool bValue);
|
||||
public:
|
||||
static OOXMLValue::Pointer_t const & Create (bool bValue);
|
||||
static OOXMLValue::Pointer_t Create (const char *pValue);
|
||||
static OOXMLValue::Pointer_t const & Create (const char *pValue);
|
||||
|
||||
virtual ~OOXMLBooleanValue() override;
|
||||
|
||||
|
@ -308,7 +308,7 @@ struct ZipStorageImpl
|
||||
void initialize();
|
||||
|
||||
Reference<XInputStream> getStream(const rtl::OUString &rPath);
|
||||
Reference<XInputStream> getStream(std::size_t nId);
|
||||
Reference<XInputStream> const & getStream(std::size_t nId);
|
||||
|
||||
private:
|
||||
void traverse(const Reference<container::XNameAccess> &rxEnum);
|
||||
@ -361,7 +361,7 @@ Reference<XInputStream> ZipStorageImpl::getStream(const rtl::OUString &rPath)
|
||||
return maStreams[aIt->second].xStream;
|
||||
}
|
||||
|
||||
Reference<XInputStream> ZipStorageImpl::getStream(const std::size_t nId)
|
||||
Reference<XInputStream> const & ZipStorageImpl::getStream(const std::size_t nId)
|
||||
{
|
||||
if (!maStreams[nId].xStream.is())
|
||||
maStreams[nId].xStream = createStream(rtl::OStringToOUString(maStreams[nId].aName, RTL_TEXTENCODING_UTF8));
|
||||
|
@ -87,9 +87,9 @@ public:
|
||||
|
||||
static XMLPropType GetPropType( const OUString& rLocalName );
|
||||
|
||||
static OUString MergeUnderline( XMLTokenEnum eUnderline,
|
||||
static OUString const & MergeUnderline( XMLTokenEnum eUnderline,
|
||||
bool bBold, bool bDouble );
|
||||
static OUString MergeLineThrough( XMLTokenEnum eLineThrough,
|
||||
static OUString const & MergeLineThrough( XMLTokenEnum eLineThrough,
|
||||
bool bBold, bool bDouble,
|
||||
sal_Unicode c );
|
||||
};
|
||||
@ -635,7 +635,7 @@ XMLPropType XMLPropertiesTContext_Impl::GetPropType( const OUString& rLocalName
|
||||
return eProp;
|
||||
}
|
||||
|
||||
OUString XMLPropertiesTContext_Impl::MergeUnderline(
|
||||
OUString const & XMLPropertiesTContext_Impl::MergeUnderline(
|
||||
XMLTokenEnum eUnderline, bool bBold, bool bDouble )
|
||||
{
|
||||
if( bDouble )
|
||||
@ -700,7 +700,7 @@ OUString XMLPropertiesTContext_Impl::MergeUnderline(
|
||||
return GetXMLToken( eUnderline );
|
||||
}
|
||||
|
||||
OUString XMLPropertiesTContext_Impl::MergeLineThrough(
|
||||
OUString const & XMLPropertiesTContext_Impl::MergeLineThrough(
|
||||
XMLTokenEnum eLineThrough, bool bBold, bool bDouble,
|
||||
sal_Unicode c )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user