20#include <com/sun/star/beans/PropertyAttribute.hpp>
21#include <com/sun/star/lang/Locale.hpp>
22#include <com/sun/star/text/XTextField.hpp>
27#include <editeng/editeng.hxx>
50 UndoTextAPIChanged(
SdrModel& rModel, TextApiObject* pTextObj );
52 virtual void Undo()
override;
53 virtual void Redo()
override;
63UndoTextAPIChanged::UndoTextAPIChanged(
SdrModel& rModel, TextApiObject* pTextObj )
65, mpOldText( pTextObj->CreateText() )
66, mxTextObj( pTextObj )
70void UndoTextAPIChanged::Undo()
73 mpNewText = mxTextObj->CreateText();
75 mxTextObj->SetText( *mpOldText );
78void UndoTextAPIChanged::Redo()
82 mxTextObj->SetText( *mpNewText );
88struct TextAPIEditSource_Impl
100 std::shared_ptr<TextAPIEditSource_Impl>
m_xImpl;
102 virtual std::unique_ptr<SvxEditSource>
Clone()
const override;
104 virtual void UpdateData()
override;
113 OUString GetText()
const;
132 return &aSdTextPortionPropertyMap;
135TextApiObject::TextApiObject( std::unique_ptr<TextAPIEditSource> pEditSource )
137, mpSource(
std::move(pEditSource))
171 pModel->
AddUndo( std::make_unique<UndoTextAPIChanged>( *pModel,
this ) );
187 pImpl =
dynamic_cast< TextApiObject*
>( comphelper::getFromUnoTunnel<SvxUnoTextBase>( xText ) );
194 , m_xImpl(rSource.m_xImpl)
213 m_xImpl->mpTextForwarder =
nullptr;
219 delete m_xImpl->mpTextForwarder;
220 m_xImpl->mpTextForwarder =
nullptr;
241 return m_xImpl->mpTextForwarder;
255 m_xImpl->mpOutliner->SetText( rText );
262 return m_xImpl->mpOutliner->CreateParaObject();
270 return m_xImpl->mpOutliner->GetEditEngine().GetText();
static SAL_DLLPRIVATE void SetCalcFieldValueHdl(::Outliner *pOutliner)
The main purpose of this class is searching and replacing as well as spelling of impress documents.
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
bool IsUndoEnabled() const
static SdrItemPool & GetGlobalDrawObjectItemPool()
css::uno::Type const & get()
virtual std::unique_ptr< SvxEditSource > Clone() const override
TextAPIEditSource(const TextAPIEditSource &rSource)
void SetText(OutlinerParaObject const &rText)
virtual void UpdateData() override
SdDrawDocument * GetDoc()
std::shared_ptr< TextAPIEditSource_Impl > m_xImpl
std::optional< OutlinerParaObject > CreateText()
virtual SvxTextForwarder * GetTextForwarder() override
std::unique_ptr< TextAPIEditSource > mpSource
std::optional< OutlinerParaObject > CreateText()
static rtl::Reference< TextApiObject > create(SdDrawDocument *pDoc)
void SetText(OutlinerParaObject const &rText)
virtual ~TextApiObject() noexcept override
static TextApiObject * getImplementation(const css::uno::Reference< css::text::XText > &)
TextApiObject(std::unique_ptr< TextAPIEditSource > pEditSource)
virtual void SetText(const OUString &rStr) override
#define EE_PARA_MAX_COUNT
constexpr TypedWhichId< SvxFieldItem > EE_FEATURE_FIELD(EE_FEATURE_NOTCONV+1)
constexpr TypedWhichId< SvXMLAttrContainerItem > EE_PARA_XMLATTRIBS(EE_PARA_START+1)
constexpr TypedWhichId< SvXMLAttrContainerItem > EE_CHAR_XMLATTRIBS(EE_CHAR_START+28)
void Dispose(const T &xInterface)
std::shared_ptr< T > make_shared(Args &&... args)
static const SvxItemPropertySet * ImplGetSdTextPortionPropertyMap()
Reference< XAnimationNode > Clone(const Reference< XAnimationNode > &xSourceNode, const SdPage *pSource, const SdPage *pTarget)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
#define SVX_UNOEDIT_OUTLINER_PROPERTIES
#define SVX_UNOEDIT_CHAR_PROPERTIES
#define SVX_UNOEDIT_PARA_PROPERTIES
#define SVX_UNOEDIT_FONT_PROPERTIES