29#include <document.hxx>
35#include <inputwin.hxx>
54 virtual bool IsValid()
const override;
63 mpViewShell(pViewShell),
83 OSL_FAIL(
"this ViewForwarder is not valid");
98 OSL_FAIL(
"this ViewForwarder is not valid");
117 virtual bool IsValid()
const override;
127 , mpEditView( _pEditView )
142 Point aPoint( rPoint );
146 aPoint += aEditViewVisArea.
TopLeft();
148 return mpWindow->LogicToPixel( aPoint, rMapMode );
152 OSL_FAIL(
"this ViewForwarder is not valid");
167 aPoint -= aEditViewVisArea.
TopLeft();
173 OSL_FAIL(
"this ViewForwarder is not valid");
190 virtual bool IsValid()
const override;
198 : mpViewShell(pViewShell)
221 OSL_FAIL(
"this ViewForwarder is not valid");
244 OSL_FAIL(
"this ViewForwarder is not valid");
264ScPreviewHeaderFooterViewForwarder::ScPreviewHeaderFooterViewForwarder(
ScPreviewShell* pViewShell)
280ScPreviewCellViewForwarder::ScPreviewCellViewForwarder(
ScPreviewShell* pViewShell)
296ScPreviewHeaderCellViewForwarder::ScPreviewHeaderCellViewForwarder(
ScPreviewShell* pViewShell)
312ScPreviewNoteViewForwarder::ScPreviewNoteViewForwarder(
ScPreviewShell* pViewShell)
325 virtual bool IsValid()
const override;
330 virtual bool Copy()
override;
331 virtual bool Cut()
override;
332 virtual bool Paste()
override;
338 : mpEditView(pEditView)
351 return mpWindow->LogicToPixel( rPoint, rMapMode );
354 OSL_FAIL(
"this ViewForwarder is not valid");
362 return mpWindow->PixelToLogic( rPoint, rMapMode );
365 OSL_FAIL(
"this ViewForwarder is not valid");
380 OSL_FAIL(
"this ViewForwarder is not valid");
395 OSL_FAIL(
"this ViewForwarder is not valid");
410 OSL_FAIL(
"this ViewForwarder is not valid");
425 OSL_FAIL(
"this ViewForwarder is not valid");
440 OSL_FAIL(
"this ViewForwarder is not valid");
456 mpViewShell(pViewShell),
457 meSplitPos(eSplitPos),
458 mpAccessibleCell( pAccCell )
471 if ( rHint.
GetId() == SfxHintId::Dying )
496 Size aSize(nSizeX, nSizeY);
501 SvxCellHorJustify eHorJust = pHorJustifyItem ? pHorJustifyItem->GetValue() : SvxCellHorJustify::Standard;
502 if ( eHorJust == SvxCellHorJustify::Left )
540 if( pItem && (pItem->
GetValue() != 0_deg100) )
550 bool bLineBreak = ( pLineBreakItem && pLineBreakItem->
GetValue() );
580 case SvxCellHorJustify::Right:
585 case SvxCellHorJustify::Center:
587 nOffsetX -= nDiffX / 2;
599 SvxCellVerJustify eVerJust = ( pVerJustifyItem ? pVerJustifyItem->GetValue() : SvxCellVerJustify::Standard );
602 case SvxCellVerJustify::Standard:
603 case SvxCellVerJustify::Bottom:
605 nOffsetY = nSizeY - nBottomM - nTextHeight;
608 case SvxCellVerJustify::Center:
610 nOffsetY = ( nSizeY - nTopM - nBottomM - nTextHeight ) / 2 + nTopM;
649 GetBroadcaster().Broadcast(*aHint);
662 mpEditView(pEditView),
663 mpEditEngine(pEditView ? pEditView->GetEditEngine() : nullptr),
684 if ( rHint.
GetId() == SfxHintId::Dying )
748 GetBroadcaster().Broadcast(*aHint);
756 , mbEditEngineCreated(false)
821 pEnginePool->FreezeIdRanges();
831 Size aSize(pTxtWnd->GetSizePixel());
896 SdrHint aHint(SdrHintKind::BeginEdit);
903 SdrHint aHint(SdrHintKind::EndEdit);
915 mpViewShell(pViewShell)
928 if ( rHint.
GetId() == SfxHintId::Dying )
981 OUString aText,
const ScAddress& rP,
bool bColHeader,
bool bRowHeader)
983 mpViewShell(pViewShell),
985 mbColHeader(bColHeader),
986 mbRowHeader(bRowHeader)
999 if ( rHint.
GetId() == SfxHintId::Dying )
1025 pEnginePool->FreezeIdRanges();
1081 mpViewShell(pViewShell),
1083 mpEditObj(pEditObj),
1112 if ( rHint.
GetId() == SfxHintId::Dying )
1126 pEnginePool->FreezeIdRanges();
1127 std::unique_ptr<ScHeaderEditEngine> pHdrEngine(
new ScHeaderEditEngine( pEnginePool.get() ));
1129 pHdrEngine->EnableUndo(
false );
1130 pHdrEngine->SetRefMapMode(
MapMode(MapUnit::MapTwip));
1135 SfxItemSet aDefaults( pHdrEngine->GetEmptyItemSet() );
1144 pHdrEngine->SetDefaults( aDefaults );
1151 pHdrEngine->SetData(
aData );
1185 OUString sText,
const ScAddress& aCellPos,
bool bMarkNote)
1187 mpViewShell(pViewShell),
1190 maCellPos(aCellPos),
1191 mbMarkNote(bMarkNote),
1219 if ( rHint.
GetId() == SfxHintId::Dying )
1240 pEnginePool->FreezeIdRanges();
1295 virtual bool IsValid()
const override;
1315 return mpWindow->LogicToPixel( rPoint, rMapMode );
1321 return mpWindow->PixelToLogic( rPoint, rMapMode );
1331 OUString aCellText,
const Size& rCellSize ) :
1333 mpEditEngine( pEditEngine ),
1334 maCellText(
std::move( aCellText )),
1335 maCellSize( rCellSize )
1345 if ( rHint.
GetId() == SfxHintId::Dying )
IMPL_LINK(ScAccessibleTextData, NotifyHdl, EENotify &, aNotify, void)
sal_uInt16 GetValue() const
void SetText(const OUString &rStr)
MapMode const & GetRefMapMode() const
void EnableUndo(bool bEnable)
Link< EENotify &, void > const & GetNotifyHdl() const
void SetRefMapMode(const MapMode &rMapMode)
static rtl::Reference< SfxItemPool > CreatePool()
void SetPaperSize(const Size &rSize)
void SetNotifyHdl(const Link< EENotify &, void > &rLink)
ESelection GetSelection() const
tools::Rectangle GetVisArea() const
void SetSelection(const ESelection &rNewSel)
EditEngine * GetEditEngine() const
void SetOrigin(const Point &rOrigin)
MapUnit GetMapUnit() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
Size GetOutputSizePixel() const
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual ~ScAccessibleCellTextData() override
virtual SvxEditViewForwarder * GetEditViewForwarder(bool bCreate) override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual SvxTextForwarder * GetTextForwarder() override
std::unique_ptr< ScViewForwarder > mpViewForwarder
virtual SvxViewForwarder * GetViewForwarder() override
ScTabViewShell * mpViewShell
virtual ScAccessibleTextData * Clone() const override
ScAccessibleCell * mpAccessibleCell
ScAccessibleCellTextData(ScTabViewShell *pViewShell, const ScAddress &rP, ScSplitPos eSplitPos, ScAccessibleCell *pAccCell)
@descr This base class provides an implementation of the AccessibleCell service.
EditEngine * mpEditEngine
virtual SvxViewForwarder * GetViewForwarder() override
virtual SvxTextForwarder * GetTextForwarder() override
ScAccessibleCsvTextData(OutputDevice *pWindow, EditEngine *pEditEngine, OUString aCellText, const Size &rCellSize)
TextForwarderPtr mpTextForwarder
virtual ScAccessibleTextData * Clone() const override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual SvxEditViewForwarder * GetEditViewForwarder(bool bCreate) override
VclPtr< OutputDevice > mpWindow
ViewForwarderPtr mpViewForwarder
virtual ~ScAccessibleCsvTextData() override
virtual ~ScAccessibleEditLineTextData() override
virtual SvxTextForwarder * GetTextForwarder() override
ScAccessibleEditLineTextData(EditView *pEditView, OutputDevice *pWin, ScTextWnd *pTextWnd)
virtual ScAccessibleTextData * Clone() const override
virtual SvxEditViewForwarder * GetEditViewForwarder(bool bCreate) override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
VclPtr< OutputDevice > mpWindow
virtual SvxTextForwarder * GetTextForwarder() override
virtual SvxEditViewForwarder * GetEditViewForwarder(bool bCreate) override
std::unique_ptr< ScEditViewForwarder > mpEditViewForwarder
ScAccessibleEditObjectTextData(EditView *pEditView, OutputDevice *pWin, bool isClone=false)
virtual ~ScAccessibleEditObjectTextData() override
std::unique_ptr< SvxEditEngineForwarder > mpForwarder
virtual ScAccessibleTextData * Clone() const override
virtual SvxViewForwarder * GetViewForwarder() override
EditEngine * mpEditEngine
std::unique_ptr< ScEditObjectViewForwarder > mpViewForwarder
ScAccessibleNoteTextData(ScPreviewShell *pViewShell, OUString sText, const ScAddress &aCellPos, bool bMarkNote)
virtual SvxViewForwarder * GetViewForwarder() override
std::unique_ptr< ScPreviewViewForwarder > mxViewForwarder
virtual ~ScAccessibleNoteTextData() override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual ScAccessibleTextData * Clone() const override
virtual SvxTextForwarder * GetTextForwarder() override
ScPreviewShell * mpViewShell
std::unique_ptr< SvxEditEngineForwarder > mpForwarder
std::unique_ptr< ScEditEngineDefaulter > mpEditEngine
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual SvxTextForwarder * GetTextForwarder() override
ScAccessiblePreviewCellTextData(ScPreviewShell *pViewShell, const ScAddress &rP)
std::unique_ptr< ScPreviewViewForwarder > mpViewForwarder
virtual ~ScAccessiblePreviewCellTextData() override
virtual ScAccessibleTextData * Clone() const override
virtual SvxViewForwarder * GetViewForwarder() override
ScPreviewShell * mpViewShell
SfxBroadcaster & GetBroadcaster() const
virtual void Notify(SfxBroadcaster &, const SfxHint &) override
std::unique_ptr< ScFieldEditEngine > pEditEngine
ScDocShell * GetDocShell() const
std::unique_ptr< SvxEditEngineForwarder > pForwarder
virtual SvxTextForwarder * GetTextForwarder()
VclPtr< OutputDevice > mpWindow
virtual Point LogicToPixel(const Point &rPoint, const MapMode &rMapMode) const override
ScCsvViewForwarder(OutputDevice *pWindow)
virtual Point PixelToLogic(const Point &rPoint, const MapMode &rMapMode) const override
virtual bool IsValid() const override
OutputDevice * GetRefDevice()
const ScDocument & GetDocument() const
void AddUnoObject(SfxListener &rObject)
std::unique_ptr< ScFieldEditEngine > CreateFieldEditEngine()
SfxObjectShell * GetDocumentShell() const
SC_DLLPUBLIC bool HasValueData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
void RemoveUnoObject(SfxListener &rObject)
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
virtual Point PixelToLogic(const Point &rPoint, const MapMode &rMapMode) const override
ScEditObjectViewForwarder(OutputDevice *pWindow, const EditView *_pEditView)
VclPtr< OutputDevice > mpWindow
const EditView * mpEditView
virtual Point LogicToPixel(const Point &rPoint, const MapMode &rMapMode) const override
virtual bool IsValid() const override
virtual bool Copy() override
VclPtr< OutputDevice > mpWindow
virtual bool IsValid() const override
virtual bool GetSelection(ESelection &rSelection) const override
virtual bool Paste() override
virtual bool SetSelection(const ESelection &rSelection) override
virtual Point PixelToLogic(const Point &rPoint, const MapMode &rMapMode) const override
virtual Point LogicToPixel(const Point &rPoint, const MapMode &rMapMode) const override
virtual bool Cut() override
ScEditViewForwarder(EditView *pEditView, OutputDevice *pWin)
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...
bool GetHeaderPosition(tools::Rectangle &rHeaderRect) const
tools::Rectangle GetCellOutputRect(const ScAddress &rCellPos) const
tools::Rectangle GetHeaderCellOutputRect(const tools::Rectangle &rVisRect, const ScAddress &rCellPos, bool bColHeader) const
tools::Rectangle GetNoteInRangeOutputRect(const tools::Rectangle &rVisiblePixel, bool bNoteMarks, const ScAddress &aCellPos) const
const ScPreviewLocationData & GetLocationData()
ScDocument & GetDocument()
void FillFieldData(ScHeaderFieldData &rData)
ScPreviewShell * mpViewShell
virtual bool IsValid() const override
virtual Point LogicToPixel(const Point &rPoint, const MapMode &rMapMode) const override
ScPreviewViewForwarder(ScPreviewShell *pViewShell)
virtual Point PixelToLogic(const Point &rPoint, const MapMode &rMapMode) const override
ScViewData & GetViewData()
vcl::Window * GetWindowByPos(ScSplitPos ePos) const
bool IsInputActive() override
virtual void RemoveAccessibleTextData(ScAccessibleEditLineTextData &rTextData) override
virtual const OUString & GetTextString() const override
virtual void StartEditEngine() override
virtual void InsertAccessibleTextData(ScAccessibleEditLineTextData &rTextData) override
virtual EditView * GetEditView() const override
virtual bool HasEditView() const override
bool GetMergeSizePixel(SCCOL nX, SCROW nY, tools::Long &rSizeXPix, tools::Long &rSizeYPix) const
ScDocShell * GetDocShell() const
ScTabViewShell * mpViewShell
virtual bool IsValid() const override
virtual Point LogicToPixel(const Point &rPoint, const MapMode &rMapMode) const override
virtual Point PixelToLogic(const Point &rPoint, const MapMode &rMapMode) const override
ScViewForwarder(ScTabViewShell *pViewShell, ScSplitPos eSplitPos)
Degree100 GetValue() const
void Broadcast(const SfxHint &rHint)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
std::unique_ptr< SfxPoolItem > CloneSetWhich(sal_uInt16 nNewWhich) const
vcl::Window * GetWindow() const
constexpr tools::Long getHeight() const
constexpr tools::Long Height() const
constexpr tools::Long getWidth() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
static ::std::unique_ptr< SfxHint > EENotification2Hint(EENotify const *aNotify)
sal_Int16 GetRightMargin() const
sal_Int16 GetTopMargin() const
sal_Int16 GetBottomMargin() const
sal_Int16 GetLeftMargin() const
void SetOffset(const Point &rPoint)
Point LogicToPixel(const Point &rLogicPt) const
const MapMode & GetMapMode() const
Point PixelToLogic(const Point &rDevicePt) const
Size GetOutputSizePixel() const
constexpr TypedWhichId< SvxAdjustItem > EE_PARA_JUST(EE_PARA_START+16)
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 LINK(Instance, Class, Member)
constexpr OUStringLiteral aData
constexpr TypedWhichId< ScIndentItem > ATTR_INDENT(131)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_FONT_HEIGHT(101)
constexpr TypedWhichId< ScPatternAttr > ATTR_PATTERN(156)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CJK_FONT_HEIGHT(112)
constexpr TypedWhichId< ScRotateValueItem > ATTR_ROTATE_VALUE(135)
constexpr TypedWhichId< SvxHorJustifyItem > ATTR_HOR_JUSTIFY(129)
constexpr TypedWhichId< SvxMarginItem > ATTR_MARGIN(143)
constexpr TypedWhichId< SvxVerJustifyItem > ATTR_VER_JUSTIFY(132)
constexpr TypedWhichId< ScLineBreakCell > ATTR_LINEBREAK(139)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CTL_FONT_HEIGHT(117)
VclPtr< vcl::Window > mpWindow