Files
react-native/ReactCommon/fabric/components/text/paragraph/ParagraphLocalData.cpp
T
Valentin SherginandFacebook Github Bot 2332cb6fe2 Fabric: A bunch of #ifdef ANDROID
Summary: Nothing really changed; the change is only to better express an original intent.

Reviewed By: JoshuaGross

Differential Revision: D13962464

fbshipit-source-id: f385db8ba8662f2150181e47fc6a2a981f809e96
2019-02-06 16:34:46 -08:00

59 lines
1.3 KiB
C++

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "ParagraphLocalData.h"
#include <react/components/text/conversions.h>
#include <react/debug/debugStringConvertibleUtils.h>
namespace facebook {
namespace react {
AttributedString ParagraphLocalData::getAttributedString() const {
return attributedString_;
}
void ParagraphLocalData::setAttributedString(
AttributedString attributedString) {
ensureUnsealed();
attributedString_ = attributedString;
}
SharedTextLayoutManager ParagraphLocalData::getTextLayoutManager() const {
return textLayoutManager_;
}
void ParagraphLocalData::setTextLayoutManager(
SharedTextLayoutManager textLayoutManager) {
ensureUnsealed();
textLayoutManager_ = textLayoutManager;
}
#ifdef ANDROID
folly::dynamic ParagraphLocalData::getDynamic() const {
return toDynamic(*this);
}
#endif
#pragma mark - DebugStringConvertible
#if RN_DEBUG_STRING_CONVERTIBLE
std::string ParagraphLocalData::getDebugName() const {
return "ParagraphLocalData";
}
SharedDebugStringConvertibleList ParagraphLocalData::getDebugProps() const {
return {
debugStringConvertibleItem("attributedString", attributedString_, "")};
}
#endif
} // namespace react
} // namespace facebook