codemaker,editeng: prefer passing OUString by reference
Change-Id: If3e2dd3905cc33f1e7fc9fbfbb9f2bb49a756a34
This commit is contained in:
parent
c0a6e9a1ba
commit
c58fe8c85f
@ -63,10 +63,10 @@ OString getTempDir(const OString& sFileName)
|
||||
}
|
||||
|
||||
OString createFileNameFromType( const OString& destination,
|
||||
const OString typeName,
|
||||
const OString postfix,
|
||||
const OString& typeName,
|
||||
const OString& postfix,
|
||||
bool bLowerCase,
|
||||
const OString prefix )
|
||||
const OString& prefix )
|
||||
{
|
||||
OString type(typeName.replace('.', '/'));
|
||||
|
||||
|
@ -691,7 +691,7 @@ void addTypeInfo(
|
||||
}
|
||||
|
||||
void handleEnumType(
|
||||
OUString name, rtl::Reference< unoidl::EnumTypeEntity > const & entity,
|
||||
const OUString& name, rtl::Reference< unoidl::EnumTypeEntity > const & entity,
|
||||
JavaOptions const & options)
|
||||
{
|
||||
assert(entity.is());
|
||||
@ -1406,7 +1406,7 @@ void addPlainStructBaseArguments(
|
||||
}
|
||||
|
||||
void handlePlainStructType(
|
||||
OUString name,
|
||||
const OUString& name,
|
||||
rtl::Reference< unoidl::PlainStructTypeEntity > const & entity,
|
||||
rtl::Reference< TypeManager > const & manager, JavaOptions const & options,
|
||||
Dependencies * dependencies)
|
||||
@ -1491,7 +1491,7 @@ void handlePlainStructType(
|
||||
}
|
||||
|
||||
void handlePolyStructType(
|
||||
OUString name,
|
||||
const OUString& name,
|
||||
rtl::Reference< unoidl::PolymorphicStructTypeTemplateEntity > const &
|
||||
entity,
|
||||
rtl::Reference< TypeManager > const & manager, JavaOptions const & options,
|
||||
@ -1626,7 +1626,7 @@ void addExceptionBaseArguments(
|
||||
}
|
||||
|
||||
void handleExceptionType(
|
||||
OUString name, rtl::Reference< unoidl::ExceptionTypeEntity > const & entity,
|
||||
const OUString& name, rtl::Reference< unoidl::ExceptionTypeEntity > const & entity,
|
||||
rtl::Reference< TypeManager > const & manager, JavaOptions const & options,
|
||||
Dependencies * dependencies)
|
||||
{
|
||||
@ -1797,7 +1797,7 @@ void createExceptionsAttribute(
|
||||
}
|
||||
|
||||
void handleInterfaceType(
|
||||
OUString name, rtl::Reference< unoidl::InterfaceTypeEntity > const & entity,
|
||||
const OUString& name, rtl::Reference< unoidl::InterfaceTypeEntity > const & entity,
|
||||
rtl::Reference< TypeManager > const & manager, JavaOptions const & options,
|
||||
Dependencies * dependencies)
|
||||
{
|
||||
@ -1956,7 +1956,7 @@ void handleTypedef(
|
||||
}
|
||||
|
||||
void handleConstantGroup(
|
||||
OUString name, rtl::Reference< unoidl::ConstantGroupEntity > const & entity,
|
||||
const OUString& name, rtl::Reference< unoidl::ConstantGroupEntity > const & entity,
|
||||
rtl::Reference< TypeManager > const & manager, JavaOptions const & options,
|
||||
Dependencies * dependencies)
|
||||
{
|
||||
@ -2208,7 +2208,7 @@ void addConstructor(
|
||||
}
|
||||
|
||||
void handleService(
|
||||
OUString name,
|
||||
const OUString& name,
|
||||
rtl::Reference< unoidl::SingleInterfaceBasedServiceEntity > const & entity,
|
||||
rtl::Reference< TypeManager > const & manager, JavaOptions const & options,
|
||||
Dependencies * dependencies)
|
||||
@ -2307,7 +2307,7 @@ void handleService(
|
||||
}
|
||||
|
||||
void handleSingleton(
|
||||
OUString name,
|
||||
const OUString& name,
|
||||
rtl::Reference< unoidl::InterfaceBasedSingletonEntity > const & entity,
|
||||
rtl::Reference< TypeManager > const & manager, JavaOptions const & options,
|
||||
Dependencies * dependencies)
|
||||
|
@ -31,10 +31,10 @@ struct TrieNode
|
||||
|
||||
void markWord();
|
||||
TrieNode* findChild(sal_Unicode aCharacter);
|
||||
TrieNode* traversePath(OUString sPath);
|
||||
TrieNode* traversePath(const OUString& sPath);
|
||||
void addNewChild(TrieNode* pChild);
|
||||
void collectSuggestions(OUString sPath, std::vector<OUString>& rSuggestionList);
|
||||
void collectSuggestionsForCurrentNode(TrieNode* pCurrent, OUString sPath, vector<OUString>& rSuggestionList);
|
||||
void collectSuggestions(const OUString& sPath, std::vector<OUString>& rSuggestionList);
|
||||
void collectSuggestionsForCurrentNode(TrieNode* pCurrent, const OUString& sPath, vector<OUString>& rSuggestionList);
|
||||
};
|
||||
|
||||
TrieNode::TrieNode(sal_Unicode aCharacter) :
|
||||
@ -99,7 +99,7 @@ TrieNode* TrieNode::findChild(sal_Unicode aInputCharacter)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void TrieNode::collectSuggestions(OUString sPath, vector<OUString>& rSuggestionList)
|
||||
void TrieNode::collectSuggestions(const OUString& sPath, vector<OUString>& rSuggestionList)
|
||||
{
|
||||
// first traverse nodes for alphabet characters
|
||||
for (int i=0; i<LATIN_ARRAY_SIZE; i++)
|
||||
@ -119,7 +119,7 @@ void TrieNode::collectSuggestions(OUString sPath, vector<OUString>& rSuggestionL
|
||||
}
|
||||
}
|
||||
|
||||
void TrieNode::collectSuggestionsForCurrentNode(TrieNode* pCurrent, OUString sPath, vector<OUString>& rSuggestionList)
|
||||
void TrieNode::collectSuggestionsForCurrentNode(TrieNode* pCurrent, const OUString& sPath, vector<OUString>& rSuggestionList)
|
||||
{
|
||||
OUString aStringPath = sPath + OUString(pCurrent->mCharacter);
|
||||
if(pCurrent->mMarker)
|
||||
@ -130,7 +130,7 @@ void TrieNode::collectSuggestionsForCurrentNode(TrieNode* pCurrent, OUString sPa
|
||||
pCurrent->collectSuggestions(aStringPath, rSuggestionList);
|
||||
}
|
||||
|
||||
TrieNode* TrieNode::traversePath(OUString sPath)
|
||||
TrieNode* TrieNode::traversePath(const OUString& sPath)
|
||||
{
|
||||
TrieNode* pCurrent = this;
|
||||
|
||||
@ -154,7 +154,7 @@ Trie::Trie() :
|
||||
Trie::~Trie()
|
||||
{}
|
||||
|
||||
void Trie::insert(OUString sInputString) const
|
||||
void Trie::insert(const OUString& sInputString) const
|
||||
{
|
||||
// adding an empty word is not allowed
|
||||
if ( sInputString.isEmpty() )
|
||||
@ -186,13 +186,13 @@ void Trie::insert(OUString sInputString) const
|
||||
pCurrent->markWord();
|
||||
}
|
||||
|
||||
void Trie::findSuggestions(OUString sWordPart, vector<OUString>& rSuggesstionList) const
|
||||
void Trie::findSuggestions(const OUString& sWordPart, vector<OUString>& rSuggestionList) const
|
||||
{
|
||||
TrieNode* pNode = mRoot->traversePath(sWordPart);
|
||||
|
||||
if (pNode != NULL)
|
||||
{
|
||||
pNode->collectSuggestions(sWordPart, rSuggesstionList);
|
||||
pNode->collectSuggestions(sWordPart, rSuggestionList);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -254,7 +254,7 @@ void OutlinerParaObject::ChangeStyleSheetName(SfxStyleFamily eFamily,
|
||||
mpImplOutlinerParaObject->mpEditTextObject->ChangeStyleSheetName(eFamily, rOldName, rNewName);
|
||||
}
|
||||
|
||||
void OutlinerParaObject::SetStyleSheets(sal_uInt16 nLevel, const OUString rNewName,
|
||||
void OutlinerParaObject::SetStyleSheets(sal_uInt16 nLevel, const OUString& rNewName,
|
||||
const SfxStyleFamily& rNewFamily)
|
||||
{
|
||||
const sal_Int32 nCount(Count());
|
||||
|
@ -105,10 +105,10 @@ private:
|
||||
::rtl::OString getTempDir(const ::rtl::OString& sFileName);
|
||||
|
||||
::rtl::OString createFileNameFromType(const ::rtl::OString& destination,
|
||||
const ::rtl::OString type,
|
||||
const ::rtl::OString postfix,
|
||||
const ::rtl::OString& type,
|
||||
const ::rtl::OString& postfix,
|
||||
bool bLowerCase=false,
|
||||
const ::rtl::OString prefix="");
|
||||
const ::rtl::OString& prefix="");
|
||||
|
||||
bool fileExists(const ::rtl::OString& fileName);
|
||||
bool makeValidTypeFile(const ::rtl::OString& targetFileName,
|
||||
|
@ -30,8 +30,8 @@ public:
|
||||
Trie();
|
||||
virtual ~Trie();
|
||||
|
||||
void insert(OUString sInputString) const;
|
||||
void findSuggestions(OUString sWordPart, std::vector<OUString>& rSuggesstionList) const;
|
||||
void insert(const OUString& sInputString) const;
|
||||
void findSuggestions(const OUString& sWordPart, std::vector<OUString>& rSuggestionList) const;
|
||||
void getAllEntries(std::vector<OUString>& entries);
|
||||
};
|
||||
|
||||
|
@ -75,7 +75,7 @@ public:
|
||||
const OUString& rNewName, SfxStyleFamily eNewFamily);
|
||||
void ChangeStyleSheetName(SfxStyleFamily eFamily, const OUString& rOldName,
|
||||
const OUString& rNewName);
|
||||
void SetStyleSheets(sal_uInt16 nLevel, const OUString rNewName,
|
||||
void SetStyleSheets(sal_uInt16 nLevel, const OUString& rNewName,
|
||||
const SfxStyleFamily& rNewFamily);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user