Common.h (844B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #ifndef dom_serializers_gtest_Common_h 8 #define dom_serializers_gtest_Common_h 9 10 #include "nsIParserUtils.h" 11 #include "nsServiceManagerUtils.h" 12 #include "nsString.h" 13 14 const uint32_t kDefaultWrapColumn = 72; 15 16 inline void ConvertBufToPlainText(nsString& aConBuf, int aFlag, 17 uint32_t aWrapColumn) { 18 nsCOMPtr<nsIParserUtils> utils = do_GetService(NS_PARSERUTILS_CONTRACTID); 19 utils->ConvertToPlainText(aConBuf, aFlag, aWrapColumn, aConBuf); 20 } 21 22 #endif // dom_serializers_gtest_Common_h