Bug 538965 - part a: make nsMathMLmfencedFrame::CreateFencesAndSeparators return void; r=karlt a=bsmedberg

This commit is contained in:
Ms2ger 2010-11-05 11:57:39 +01:00
Родитель 68fe250adb
Коммит 7b04f77d8b
2 изменённых файлов: 7 добавлений и 10 удалений

Просмотреть файл

@ -89,7 +89,8 @@ nsMathMLmfencedFrame::SetInitialChildList(nsIAtom* aListName,
// No need to track the style contexts given to our MathML chars.
// The Style System will use Get/SetAdditionalStyleContext() to keep them
// up-to-date if dynamic changes arise.
return CreateFencesAndSeparators(PresContext());
CreateFencesAndSeparators(PresContext());
return NS_OK;
}
NS_IMETHODIMP
@ -126,7 +127,7 @@ nsMathMLmfencedFrame::RemoveFencesAndSeparators()
mSeparatorsCount = 0;
}
nsresult
void
nsMathMLmfencedFrame::CreateFencesAndSeparators(nsPresContext* aPresContext)
{
nsAutoString value;
@ -144,7 +145,6 @@ nsMathMLmfencedFrame::CreateFencesAndSeparators(nsPresContext* aPresContext)
if (!value.IsEmpty()) {
mOpenChar = new nsMathMLChar;
if (!mOpenChar) return NS_ERROR_OUT_OF_MEMORY;
mOpenChar->SetData(aPresContext, value);
isMutable = nsMathMLOperators::IsMutableOperator(value);
ResolveMathMLCharStyle(aPresContext, mContent, mStyleContext, mOpenChar, isMutable);
@ -162,7 +162,6 @@ nsMathMLmfencedFrame::CreateFencesAndSeparators(nsPresContext* aPresContext)
if (!value.IsEmpty()) {
mCloseChar = new nsMathMLChar;
if (!mCloseChar) return NS_ERROR_OUT_OF_MEMORY;
mCloseChar->SetData(aPresContext, value);
isMutable = nsMathMLOperators::IsMutableOperator(value);
ResolveMathMLCharStyle(aPresContext, mContent, mStyleContext, mCloseChar, isMutable);
@ -183,7 +182,6 @@ nsMathMLmfencedFrame::CreateFencesAndSeparators(nsPresContext* aPresContext)
PRInt32 sepCount = mFrames.GetLength() - 1;
if (0 < sepCount) {
mSeparatorsChar = new nsMathMLChar[sepCount];
if (!mSeparatorsChar) return NS_ERROR_OUT_OF_MEMORY;
nsAutoString sepChar;
for (PRInt32 i = 0; i < sepCount; i++) {
if (i < mSeparatorsCount) {
@ -204,7 +202,6 @@ nsMathMLmfencedFrame::CreateFencesAndSeparators(nsPresContext* aPresContext)
mSeparatorsCount = 0;
}
}
return NS_OK;
}
NS_IMETHODIMP

Просмотреть файл

@ -38,8 +38,8 @@
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsMathMLmfencedFrame_h___
#define nsMathMLmfencedFrame_h___
#ifndef nsMathMLmfencedFrame_h
#define nsMathMLmfencedFrame_h
#include "nsCOMPtr.h"
#include "nsMathMLContainerFrame.h"
@ -129,8 +129,8 @@ protected:
RemoveFencesAndSeparators();
// add fences and separators when all child frames are known
nsresult
void
CreateFencesAndSeparators(nsPresContext* aPresContext);
};
#endif /* nsMathMLmfencedFrame_h___ */
#endif /* nsMathMLmfencedFrame_h */