Kaydet (Commit) 32c26ffb authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#56549 crash in format->autocorrect->apply and edit changes

regression from cad9afa1

Change-Id: I1aa36bf86969a5a90456817d360d59125948e519
üst c8c72d90
...@@ -87,7 +87,7 @@ struct SW_DLLPUBLIC ShellResource : public Resource ...@@ -87,7 +87,7 @@ struct SW_DLLPUBLIC ShellResource : public Resource
private: private:
void _GetAutoFmtNameLst() const; void _GetAutoFmtNameLst() const;
std::vector<String> *pAutoFmtNameLst; mutable std::vector<String> *pAutoFmtNameLst;
String sPageDescFirstName; String sPageDescFirstName;
String sPageDescFollowName; String sPageDescFollowName;
String sPageDescName; String sPageDescName;
......
...@@ -229,10 +229,10 @@ struct ImpAutoFmtNameListLoader : public Resource ...@@ -229,10 +229,10 @@ struct ImpAutoFmtNameListLoader : public Resource
void ShellResource::_GetAutoFmtNameLst() const void ShellResource::_GetAutoFmtNameLst() const
{ {
std::vector<String>* pLst(pAutoFmtNameLst); assert(!pAutoFmtNameLst);
pLst = new std::vector<String>; pAutoFmtNameLst = new std::vector<String>;
pLst->reserve(STR_AUTOFMTREDL_END); pAutoFmtNameLst->reserve(STR_AUTOFMTREDL_END);
ImpAutoFmtNameListLoader aTmp( *pLst ); ImpAutoFmtNameListLoader aTmp(*pAutoFmtNameLst);
} }
ImpAutoFmtNameListLoader::ImpAutoFmtNameListLoader( std::vector<String>& rLst ) ImpAutoFmtNameListLoader::ImpAutoFmtNameListLoader( std::vector<String>& rLst )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment