28#include <editeng/editeng.hxx>
67 for (
auto & rEntry : aHdFtPropertyMap_Impl)
80 return &aHdFtPropertySet_Impl;
112 uno::Reference<text::XText> xInt(*
mxLeftText, uno::UNO_QUERY);
119 uno::Reference<text::XText> xInt(*
mxCenterText, uno::UNO_QUERY);
126 uno::Reference<text::XText> xInt(*
mxRightText, uno::UNO_QUERY);
131 const uno::Reference<sheet::XHeaderFooterContent>& rObj)
140 uno::Reference<css::sheet::XHeaderFooterContent> xThis(
this);
148 mpTextObj(pTextObj ? pTextObj->
Clone() : nullptr),
149 xContentObj(
std::move( xContent )),
168 pEnginePool->FreezeIdRanges();
169 std::unique_ptr<ScHeaderEditEngine> pHdrEngine(
new ScHeaderEditEngine( pEnginePool.get() ));
171 pHdrEngine->EnableUndo(
false );
172 pHdrEngine->SetRefMapMode(
MapMode(MapUnit::MapTwip));
177 SfxItemSet aDefaults( pHdrEngine->GetEmptyItemSet() );
185 pHdrEngine->SetDefaults( aDefaults );
189 pHdrEngine->SetData(
aData );
221 aTextData(xContent, nP, pTextObj)
260 const uno::Reference<text::XTextRange>& aTextPosition )
265 return mxUnoText->createTextCursorByRange(aTextPosition);
271 OUString aDummy(
"???");
287 if (!xContentObj.is())
288 throw css::uno::RuntimeException(
289 "ScHeaderFooterTextObj::getString: no ContentObj");
296 pData = pObj->GetLeftEditObject();
299 pData = pObj->GetCenterEditObject();
302 pData = pObj->GetRightEditObject();
305 SAL_WARN(
"sc.ui",
"unexpected enum value of ScHeaderFooterPart");
335 const OUString& aString,
sal_Bool bAbsorb )
340 mxUnoText->insertString( xRange, aString, bAbsorb );
344 const uno::Reference<text::XTextRange>& xRange,
345 sal_Int16 nControlCharacter,
sal_Bool bAbsorb )
350 mxUnoText->insertControlCharacter( xRange, nControlCharacter, bAbsorb );
354 const uno::Reference<text::XTextRange >& xRange,
355 const uno::Reference<text::XTextContent >& xContent,
359 if ( xContent.is() && xRange.is() )
363 SvxUnoTextRangeBase* pTextRange =
364 comphelper::getFromUnoTunnel<ScHeaderFooterTextCursor>( xRange );
366 if ( pHeaderField && !pHeaderField->
IsInserted() && pTextRange )
369 ESelection aSelection(pTextRange->GetSelection());
390 uno::Reference<text::XTextRange> xTextRange;
404 pHeaderField->
InitDoc(xTextRange, std::make_unique<ScHeaderFooterEditSource>(
aTextData), aSelection);
411 pTextRange->SetSelection( aSelection );
419 mxUnoText->insertTextContent( xRange, xContent, bAbsorb );
423 const uno::Reference<text::XTextContent>& xContent )
429 if ( pHeaderField && pHeaderField->
IsInserted() )
438 mxUnoText->removeTextContent( xContent );
483 const uno::Reference<text::XTextRange>& xRange,
484 sal_Int16 nParagraphs )
489 mxUnoText->moveTextRange( xRange, nParagraphs );
548 pNew->SetSelection( aNewSel );
550 return static_cast<SvxUnoTextRangeBase*
>(pNew.get());
564 pNew->SetSelection( aNewSel );
566 return static_cast<SvxUnoTextRangeBase*
>(pNew.get());
599 pNew->SetSelection( aNewSel );
601 return static_cast<SvxUnoTextRangeBase*
>(pNew.get());
615 pNew->SetSelection( aNewSel );
617 return static_cast<SvxUnoTextRangeBase*
>(pNew.get());
627 xParentText(
std::move( xParent ))
655 pNew->SetSelection( aNewSel );
657 return static_cast<SvxUnoTextRangeBase*
>(pNew.get());
671 pNew->SetSelection( aNewSel );
673 return static_cast<SvxUnoTextRangeBase*
>(pNew.get());
683 pEnginePool->SetDefaultMetric( MapUnit::Map100thMM );
684 pEnginePool->FreezeIdRanges();
714 ::GetSelection( aSel, GetEditSource()->GetTextForwarder() );
715 SetSelection( aSel );
771 pEnginePool->FreezeIdRanges();
796 pPattern->FillEditItemSet( &aDefaults );
797 pPattern->FillEditParaItems( &aDefaults );
810 if (!aText.isEmpty())
825 OSL_ENSURE(
pEditEngine !=
nullptr,
"no EditEngine for UpdateData()");
845 if (
nId == SfxHintId::Dying )
852 else if (
nId == SfxHintId::DataChanged )
std::unique_ptr< EditTextObject > CreateTextObject()
static rtl::Reference< SfxItemPool > CreatePool()
really derive cell from range?
uno3: SvxUnoTextCursor is not derived from XUnoTunnel, but should be (?)
rtl::Reference< ScCellObj > mxTextObj
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getEnd() override
ScCellTextCursor(ScCellObj &rText)
virtual css::uno::Reference< css::text::XText > SAL_CALL getText() override
virtual ~ScCellTextCursor() noexcept override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getStart() override
ScCellEditSource * GetOriginalSource()
std::unique_ptr< ScCellEditSource > pOriginalSource
std::unique_ptr< ScFieldEditEngine > pEditEngine
std::unique_ptr< SvxEditEngineForwarder > pForwarder
virtual SvxTextForwarder * GetTextForwarder()
virtual ~ScCellTextData() override
ScCellTextData(ScDocShell *pDocSh, const ScAddress &rP)
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
ScCellTextObj(ScDocShell *pDocSh, const ScAddress &rP)
virtual ~ScCellTextObj() COVERITY_NOEXCEPT_FALSE override
void PutData(const ScAddress &rPos, ScEditEngineDefaulter &rEngine, bool bApi)
OutputDevice * GetRefDevice()
const ScDocument & GetDocument() const
SC_DLLPUBLIC sal_uInt32 GetNumberFormat(SCCOL nCol, SCROW nRow, SCTAB nTab) const
void AddUnoObject(SfxListener &rObject)
std::unique_ptr< ScFieldEditEngine > CreateFieldEditEngine()
void DisposeFieldEditEngine(std::unique_ptr< ScFieldEditEngine > &rpEditEngine)
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
void RemoveUnoObject(SfxListener &rObject)
SC_DLLPUBLIC const ScPatternAttr * GetPattern(SCCOL nCol, SCROW nRow, SCTAB nTab) const
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getStart() override
virtual ~ScDrawTextCursor() noexcept override
ScDrawTextCursor(css::uno::Reference< css::text::XText > xParent, const SvxUnoTextBase &rText)
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getEnd() override
css::uno::Reference< css::text::XText > xParentText
virtual css::uno::Reference< css::text::XText > SAL_CALL getText() override
void SetTextCurrentDefaults(const EditTextObject &rTextObject)
SetText and apply defaults already set.
std::unique_ptr< EditTextObject > CreateTextObject()
void SetText(const EditTextObject &rTextObject)
virtual ~ScEditEngineTextObj() noexcept override
void InitDoc(const css::uno::Reference< css::text::XTextRange > &rContent, std::unique_ptr< ScEditSource > pEditSrc, const ESelection &rSel)
SvxFieldItem CreateFieldItem()
static OUString GetSpaceDelimitedString(const EditEngine &rEngine)
Retrieves string with paragraphs delimited by spaces.
const SfxPoolItem & GetItem(sal_uInt16 nWhichP) const
void FillEditItemSet(SfxItemSet *pEditSet, const SfxItemSet *pCondSet=nullptr) const
Converts all Calc items contained in the own item set to edit engine items and puts them into pEditSe...
~ScSimpleEditSourceHelper()
ScSimpleEditSourceHelper()
std::unique_ptr< SvxEditEngineForwarder > pForwarder
ScEditEngineDefaulter * GetEditEngine() const
std::unique_ptr< ScSimpleEditSource > pOriginalSource
std::unique_ptr< ScEditEngineDefaulter > pEditEngine
static SdrItemPool & GetGlobalDrawObjectItemPool()
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
std::unique_ptr< SfxPoolItem > CloneSetWhich(sal_uInt16 nNewWhich) const
virtual SvxTextForwarder * GetTextForwarder()=0
virtual void UpdateData()=0
virtual void QuickInsertField(const SvxFieldItem &rFld, const ESelection &rSel)=0
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT(EE_CHAR_START+2)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT_CTL(EE_CHAR_START+20)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT_CJK(EE_CHAR_START+19)
#define SAL_WARN(area, stream)
std::unique_ptr< sal_Int32[]> pData
#define SC_SIMPLE_SERVICE_INFO(ClassName, ClassNameAscii, ServiceAscii)
constexpr OUStringLiteral aData
css::uno::Reference< css::animations::XAnimationNode > Clone(const css::uno::Reference< css::animations::XAnimationNode > &xSourceNode, const SdPage *pSource=nullptr, const SdPage *pTarget=nullptr)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_FONT_HEIGHT(101)
constexpr TypedWhichId< ScPatternAttr > ATTR_PATTERN(156)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CJK_FONT_HEIGHT(112)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CTL_FONT_HEIGHT(117)
This is very similar to ScCellValue, except that it references the original value instead of copying ...
const EditTextObject * getEditText() const
UNO3_GETIMPLEMENTATION2_IMPL(ScCellTextCursor, SvxUnoTextCursor)
static const SvxItemPropertySet * lcl_GetHdFtPropertySet()
void GetSelection(struct ESelection &rSel, SvxTextForwarder const *pForwarder) noexcept
#define SVX_UNOEDIT_CHAR_PROPERTIES
#define SVX_UNOEDIT_NUMBERING_PROPERTY
#define SVX_UNOEDIT_PARA_PROPERTIES
#define SVX_UNOEDIT_FONT_PROPERTIES