LibreOffice Module sc (master) 1
AccessibleText.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <scitems.hxx>
21#include <editeng/eeitem.hxx>
22
23#include <memory>
24#include <AccessibleText.hxx>
25#include <AccessibleCell.hxx>
26#include <attrib.hxx>
27#include <tabvwsh.hxx>
28#include <editutil.hxx>
29#include <document.hxx>
30#include <scmod.hxx>
31#include <prevwsh.hxx>
32#include <docsh.hxx>
33#include <prevloc.hxx>
34#include <patattr.hxx>
35#include <inputwin.hxx>
36#include <editeng/unofored.hxx>
37#include <editeng/editview.hxx>
38#include <editeng/unoedhlp.hxx>
39#include <editeng/fhgtitem.hxx>
42#include <svx/svdmodel.hxx>
43#include <svx/algitem.hxx>
44#include <utility>
45#include <vcl/svapp.hxx>
46
48{
51public:
52 ScViewForwarder(ScTabViewShell* pViewShell, ScSplitPos eSplitPos);
53
54 virtual bool IsValid() const override;
55 virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const override;
56 virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const override;
57
58 void SetInvalid();
59};
60
62 :
63 mpViewShell(pViewShell),
64 meSplitPos(eSplitPos)
65{
66}
67
69{
70 return mpViewShell != nullptr;
71}
72
73Point ScViewForwarder::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const
74{
75 if (mpViewShell)
76 {
78 if (pWindow)
79 return pWindow->LogicToPixel( rPoint, rMapMode );
80 }
81 else
82 {
83 OSL_FAIL("this ViewForwarder is not valid");
84 }
85 return Point();
86}
87
88Point ScViewForwarder::PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const
89{
90 if (mpViewShell)
91 {
93 if (pWindow)
94 return pWindow->PixelToLogic( rPoint, rMapMode );
95 }
96 else
97 {
98 OSL_FAIL("this ViewForwarder is not valid");
99 }
100 return Point();
101}
102
104{
105 mpViewShell = nullptr;
106}
107
109{
111 // #i49561# EditView needed for access to its visible area.
113public:
115 const EditView* _pEditView);
116
117 virtual bool IsValid() const override;
118 virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const override;
119 virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const override;
120
121 void SetInvalid();
122};
123
125 const EditView* _pEditView )
126 : mpWindow(pWindow)
127 , mpEditView( _pEditView )
128{
129}
130
132{
133 return (mpWindow != nullptr);
134}
135
136Point ScEditObjectViewForwarder::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const
137{
138 if (mpWindow)
139 {
140 // #i49561# - consider offset of the visible area
141 // of the EditView before converting point to pixel.
142 Point aPoint( rPoint );
143 if ( mpEditView )
144 {
145 tools::Rectangle aEditViewVisArea( mpEditView->GetVisArea() );
146 aPoint += aEditViewVisArea.TopLeft();
147 }
148 return mpWindow->LogicToPixel( aPoint, rMapMode );
149 }
150 else
151 {
152 OSL_FAIL("this ViewForwarder is not valid");
153 }
154 return Point();
155}
156
157Point ScEditObjectViewForwarder::PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const
158{
159 if (mpWindow)
160 {
161 // #i49561# - consider offset of the visible area
162 // of the EditView after converting point to logic.
163 Point aPoint( mpWindow->PixelToLogic( rPoint, rMapMode ) );
164 if ( mpEditView )
165 {
166 tools::Rectangle aEditViewVisArea( mpEditView->GetVisArea() );
167 aPoint -= aEditViewVisArea.TopLeft();
168 }
169 return aPoint;
170 }
171 else
172 {
173 OSL_FAIL("this ViewForwarder is not valid");
174 }
175 return Point();
176}
177
179{
180 mpWindow = nullptr;
181}
182
184{
185protected:
187public:
188 explicit ScPreviewViewForwarder(ScPreviewShell* pViewShell);
189
190 virtual bool IsValid() const override;
191 virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const override;
192 virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const override;
193
194 void SetInvalid();
195};
196
198 : mpViewShell(pViewShell)
199{
200}
201
203{
204 return mpViewShell != nullptr;
205}
206
207Point ScPreviewViewForwarder::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const
208{
209 if (mpViewShell)
210 {
211 vcl::Window* pWindow = mpViewShell->GetWindow();
212 if (pWindow)
213 {
214 MapMode aMapMode(pWindow->GetMapMode().GetMapUnit());
215 Point aPoint2( OutputDevice::LogicToLogic( rPoint, rMapMode, aMapMode) );
216 return pWindow->LogicToPixel(aPoint2);
217 }
218 }
219 else
220 {
221 OSL_FAIL("this ViewForwarder is not valid");
222 }
223 return Point();
224}
225
226Point ScPreviewViewForwarder::PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const
227{
228 if (mpViewShell)
229 {
230 vcl::Window* pWindow = mpViewShell->GetWindow();
231 if (pWindow)
232 {
233 MapMode aMapMode(pWindow->GetMapMode());
234 aMapMode.SetOrigin(Point());
235 Point aPoint1( pWindow->PixelToLogic( rPoint ) );
236 Point aPoint2( OutputDevice::LogicToLogic( aPoint1,
237 MapMode(aMapMode.GetMapUnit()),
238 rMapMode ) );
239 return aPoint2;
240 }
241 }
242 else
243 {
244 OSL_FAIL("this ViewForwarder is not valid");
245 }
246 return Point();
247}
248
250{
251 mpViewShell = nullptr;
252}
253
254namespace {
255
256class ScPreviewHeaderFooterViewForwarder : public ScPreviewViewForwarder
257{
258public:
259 ScPreviewHeaderFooterViewForwarder(ScPreviewShell* pViewShell);
260};
261
262}
263
264ScPreviewHeaderFooterViewForwarder::ScPreviewHeaderFooterViewForwarder(ScPreviewShell* pViewShell)
265 :
266 ScPreviewViewForwarder(pViewShell)
267{
268}
269
270namespace {
271
272class ScPreviewCellViewForwarder : public ScPreviewViewForwarder
273{
274public:
275 ScPreviewCellViewForwarder(ScPreviewShell* pViewShell);
276};
277
278}
279
280ScPreviewCellViewForwarder::ScPreviewCellViewForwarder(ScPreviewShell* pViewShell)
281 :
282 ScPreviewViewForwarder(pViewShell)
283{
284}
285
286namespace {
287
288class ScPreviewHeaderCellViewForwarder : public ScPreviewViewForwarder
289{
290public:
291 ScPreviewHeaderCellViewForwarder(ScPreviewShell* pViewShell);
292};
293
294}
295
296ScPreviewHeaderCellViewForwarder::ScPreviewHeaderCellViewForwarder(ScPreviewShell* pViewShell)
297 :
298 ScPreviewViewForwarder(pViewShell)
299{
300}
301
302namespace {
303
304class ScPreviewNoteViewForwarder : public ScPreviewViewForwarder
305{
306public:
307 ScPreviewNoteViewForwarder(ScPreviewShell* pViewShell);
308};
309
310}
311
312ScPreviewNoteViewForwarder::ScPreviewNoteViewForwarder(ScPreviewShell* pViewShell)
313 :
314 ScPreviewViewForwarder(pViewShell)
315{
316}
317
319{
322public:
323 ScEditViewForwarder(EditView* pEditView, OutputDevice* pWin);
324
325 virtual bool IsValid() const override;
326 virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const override;
327 virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const override;
328 virtual bool GetSelection( ESelection& rSelection ) const override;
329 virtual bool SetSelection( const ESelection& rSelection ) override;
330 virtual bool Copy() override;
331 virtual bool Cut() override;
332 virtual bool Paste() override;
333
334 void SetInvalid();
335};
336
338 : mpEditView(pEditView)
339 , mpWindow(pWin)
340{
341}
342
344{
345 return mpWindow && mpEditView;
346}
347
348Point ScEditViewForwarder::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const
349{
350 if (mpWindow)
351 return mpWindow->LogicToPixel( rPoint, rMapMode );
352 else
353 {
354 OSL_FAIL("this ViewForwarder is not valid");
355 }
356 return Point();
357}
358
359Point ScEditViewForwarder::PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const
360{
361 if (mpWindow)
362 return mpWindow->PixelToLogic( rPoint, rMapMode );
363 else
364 {
365 OSL_FAIL("this ViewForwarder is not valid");
366 }
367 return Point();
368}
369
371{
372 bool bResult(false);
373 if (IsValid())
374 {
375 rSelection = mpEditView->GetSelection();
376 bResult = true;
377 }
378 else
379 {
380 OSL_FAIL("this ViewForwarder is not valid");
381 }
382 return bResult;
383}
384
386{
387 bool bResult(false);
388 if (IsValid())
389 {
390 mpEditView->SetSelection(rSelection);
391 bResult = true;
392 }
393 else
394 {
395 OSL_FAIL("this ViewForwarder is not valid");
396 }
397 return bResult;
398}
399
401{
402 bool bResult(false);
403 if (IsValid())
404 {
405 mpEditView->Copy();
406 bResult = true;
407 }
408 else
409 {
410 OSL_FAIL("this ViewForwarder is not valid");
411 }
412 return bResult;
413}
414
416{
417 bool bResult(false);
418 if (IsValid())
419 {
420 mpEditView->Cut();
421 bResult = true;
422 }
423 else
424 {
425 OSL_FAIL("this ViewForwarder is not valid");
426 }
427 return bResult;
428}
429
431{
432 bool bResult(false);
433 if (IsValid())
434 {
435 mpEditView->Paste();
436 bResult = true;
437 }
438 else
439 {
440 OSL_FAIL("this ViewForwarder is not valid");
441 }
442 return bResult;
443}
444
446{
447 mpWindow = nullptr;
448 mpEditView = nullptr;
449}
450
451// ScAccessibleCellTextData: shared data between sub objects of an accessible cell text object
452
454 const ScAddress& rP, ScSplitPos eSplitPos, ScAccessibleCell* pAccCell)
455 : ScAccessibleCellBaseTextData(GetDocShell(pViewShell), rP),
456 mpViewShell(pViewShell),
457 meSplitPos(eSplitPos),
458 mpAccessibleCell( pAccCell )
459{
460}
461
463{
464 if (pEditEngine)
465 pEditEngine->SetNotifyHdl(Link<EENotify&,void>());
466 mpViewForwarder.reset();
467}
468
470{
471 if ( rHint.GetId() == SfxHintId::Dying )
472 {
473 mpViewShell = nullptr; // invalid now
474 if (mpViewForwarder)
475 mpViewForwarder->SetInvalid();
476 }
478}
479
481{
483}
484
486{
487 ScCellTextData::GetTextForwarder(); // creates Forwarder and EditEngine
488
490 {
492 tools::Long nSizeX, nSizeY;
494 aCellPos.Col(), aCellPos.Row(), nSizeX, nSizeY);
495
496 Size aSize(nSizeX, nSizeY);
497
498 // #i92143# text getRangeExtents reports incorrect 'x' values for spreadsheet cells
499 tools::Long nIndent = 0;
500 const SvxHorJustifyItem* pHorJustifyItem = rDoc.GetAttr( aCellPos, ATTR_HOR_JUSTIFY );
501 SvxCellHorJustify eHorJust = pHorJustifyItem ? pHorJustifyItem->GetValue() : SvxCellHorJustify::Standard;
502 if ( eHorJust == SvxCellHorJustify::Left )
503 {
504 const ScIndentItem* pIndentItem = rDoc.GetAttr( aCellPos, ATTR_INDENT );
505 if ( pIndentItem )
506 {
507 nIndent = static_cast< tools::Long >( pIndentItem->GetValue() );
508 }
509 }
510
511 const SvxMarginItem* pMarginItem = rDoc.GetAttr( aCellPos, ATTR_MARGIN );
512 ScViewData& rViewData = mpViewShell->GetViewData();
513 double nPPTX = rViewData.GetPPTX();
514 double nPPTY = rViewData.GetPPTY();
515 tools::Long nLeftM = ( pMarginItem ? static_cast< tools::Long >( ( pMarginItem->GetLeftMargin() + nIndent ) * nPPTX ) : 0 );
516 tools::Long nTopM = ( pMarginItem ? static_cast< tools::Long >( pMarginItem->GetTopMargin() * nPPTY ) : 0 );
517 tools::Long nRightM = ( pMarginItem ? static_cast< tools::Long >( pMarginItem->GetRightMargin() * nPPTX ) : 0 );
518 tools::Long nBottomM = ( pMarginItem ? static_cast< tools::Long >( pMarginItem->GetBottomMargin() * nPPTY ) : 0 );
519 tools::Long nWidth = aSize.getWidth() - nLeftM - nRightM;
520 aSize.setWidth( nWidth );
521 aSize.setHeight( aSize.getHeight() - nTopM - nBottomM );
522
524 if ( pWin )
525 {
526 aSize = pWin->PixelToLogic( aSize, pEditEngine->GetRefMapMode() );
527 }
528
529 /* #i19430# Gnopernicus reads text partly if it sticks out of the cell
530 boundaries. This leads to wrong results in cases where the cell text
531 is rotated, because rotation is not taken into account when calcu-
532 lating the visible part of the text. In these cases we will expand
533 the cell size passed as paper size to the edit engine. The function
534 accessibility::AccessibleStaticTextBase::GetParagraphBoundingBox()
535 (see svx/source/accessibility/AccessibleStaticTextBase.cxx) will
536 return the size of the complete text then, which is used to expand
537 the cell bounding box in ScAccessibleCell::GetBoundingBox()
538 (see sc/source/ui/Accessibility/AccessibleCell.cxx). */
539 const ScRotateValueItem* pItem = rDoc.GetAttr( aCellPos, ATTR_ROTATE_VALUE );
540 if( pItem && (pItem->GetValue() != 0_deg100) )
541 {
542 pEditEngine->SetPaperSize( Size( LONG_MAX, aSize.getHeight() ) );
543 tools::Long nTxtWidth = static_cast< tools::Long >( pEditEngine->CalcTextWidth() );
544 aSize.setWidth( std::max( aSize.getWidth(), nTxtWidth + 2 ) );
545 }
546 else
547 {
548 // #i92143# text getRangeExtents reports incorrect 'x' values for spreadsheet cells
549 const ScLineBreakCell* pLineBreakItem = rDoc.GetAttr( aCellPos, ATTR_LINEBREAK );
550 bool bLineBreak = ( pLineBreakItem && pLineBreakItem->GetValue() );
551 if ( !bLineBreak )
552 {
553 tools::Long nTxtWidth = static_cast< tools::Long >( pEditEngine->CalcTextWidth() );
554 aSize.setWidth( ::std::max( aSize.getWidth(), nTxtWidth ) );
555 }
556 }
557
558 pEditEngine->SetPaperSize( aSize );
559
560 // #i92143# text getRangeExtents reports incorrect 'x' values for spreadsheet cells
561 if ( eHorJust == SvxCellHorJustify::Standard && rDoc.HasValueData( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab() ) )
562 {
563 pEditEngine->SetDefaultItem( SvxAdjustItem( SvxAdjust::Right, EE_PARA_JUST ) );
564 }
565
566 Size aTextSize;
567 if ( pWin )
568 {
569 aTextSize = pWin->LogicToPixel( Size( pEditEngine->CalcTextWidth(), pEditEngine->GetTextHeight() ), pEditEngine->GetRefMapMode() );
570 }
571 tools::Long nTextWidth = aTextSize.Width();
572 tools::Long nTextHeight = aTextSize.Height();
573
574 tools::Long nOffsetX = nLeftM;
575 tools::Long nDiffX = nTextWidth - nWidth;
576 if ( nDiffX > 0 )
577 {
578 switch ( eHorJust )
579 {
580 case SvxCellHorJustify::Right:
581 {
582 nOffsetX -= nDiffX;
583 }
584 break;
585 case SvxCellHorJustify::Center:
586 {
587 nOffsetX -= nDiffX / 2;
588 }
589 break;
590 default:
591 {
592 }
593 break;
594 }
595 }
596
597 tools::Long nOffsetY = 0;
598 const SvxVerJustifyItem* pVerJustifyItem = rDoc.GetAttr( aCellPos, ATTR_VER_JUSTIFY );
599 SvxCellVerJustify eVerJust = ( pVerJustifyItem ? pVerJustifyItem->GetValue() : SvxCellVerJustify::Standard );
600 switch ( eVerJust )
601 {
602 case SvxCellVerJustify::Standard:
603 case SvxCellVerJustify::Bottom:
604 {
605 nOffsetY = nSizeY - nBottomM - nTextHeight;
606 }
607 break;
608 case SvxCellVerJustify::Center:
609 {
610 nOffsetY = ( nSizeY - nTopM - nBottomM - nTextHeight ) / 2 + nTopM;
611 }
612 break;
613 default:
614 {
615 nOffsetY = nTopM;
616 }
617 break;
618 }
619
620 if ( mpAccessibleCell )
621 {
622 mpAccessibleCell->SetOffset( Point( nOffsetX, nOffsetY ) );
623 }
624
625 pEditEngine->SetNotifyHdl( LINK(this, ScAccessibleCellTextData, NotifyHdl) );
626 }
627
628 return pForwarder.get();
629}
630
632{
633 if (!mpViewForwarder)
635 return mpViewForwarder.get();
636}
637
639{
640 //#102219#; there should no EditViewForwarder be, because the cell is now readonly in this interface
641 return nullptr;
642}
643
644IMPL_LINK(ScAccessibleTextData, NotifyHdl, EENotify&, aNotify, void)
645{
646 ::std::unique_ptr< SfxHint > aHint = SvxEditSourceHelper::EENotification2Hint( &aNotify );
647
648 if (aHint)
649 GetBroadcaster().Broadcast(*aHint);
650}
651
653{
654 ScDocShell* pDocSh = nullptr;
655 if (pViewShell)
656 pDocSh = pViewShell->GetViewData().GetDocShell();
657 return pDocSh;
658}
659
661 :
662 mpEditView(pEditView),
663 mpEditEngine(pEditView ? pEditView->GetEditEngine() : nullptr),
664 mpWindow(pWin)
665{
666 // If the object is cloned, do NOT add notify hdl.
667 mbIsCloned = isClone;
668 if (mpEditEngine && !mbIsCloned)
670}
671
673{
674 // If the object is cloned, do NOT set notify hdl.
675 if (mpEditEngine && !mbIsCloned)
677 mpViewForwarder.reset();
678 mpEditViewForwarder.reset();
679 mpForwarder.reset();
680}
681
683{
684 if ( rHint.GetId() == SfxHintId::Dying )
685 {
686 mpWindow = nullptr;
687 mpEditView = nullptr;
688 mpEditEngine = nullptr;
689 mpForwarder.reset();
690 if (mpViewForwarder)
691 mpViewForwarder->SetInvalid();
693 mpEditViewForwarder->SetInvalid();
694 }
696}
697
699{
700 // Add para to indicate the object is cloned
702}
703
705{
707 {
708 if (!mpEditEngine)
710 // If the object is cloned, do NOT add notify hdl.
713 if(!mpForwarder)
715 }
716 return mpForwarder.get();
717}
718
720{
721 if (!mpViewForwarder)
722 {
723 // i#49561 Get right-aligned cell content to be read by screenreader.
725 }
726 return mpViewForwarder.get();
727}
728
730{
733 if (bCreate)
734 {
736 {
737 mpEditViewForwarder.reset();
738 }
739 }
740 return mpEditViewForwarder.get();
741}
742
744{
745 ::std::unique_ptr< SfxHint > aHint = SvxEditSourceHelper::EENotification2Hint( &rNotify );
746
747 if (aHint)
748 GetBroadcaster().Broadcast(*aHint);
749}
750
752 OutputDevice* pWin,
753 ScTextWnd* pTxtWnd)
754 : ScAccessibleEditObjectTextData(pEditView, pWin)
755 , mpTxtWnd(pTxtWnd)
756 , mbEditEngineCreated(false)
757{
758 if (mpTxtWnd)
760}
761
763{
764 if (mpTxtWnd)
766
768 {
769 delete mpEditEngine;
770 mpEditEngine = nullptr; // don't access in ScAccessibleEditObjectTextData dtor!
771 }
773 {
774 // the NotifyHdl also has to be removed from the ScTextWnd's EditEngine
775 // (it's set in ScAccessibleEditLineTextData::GetTextForwarder, and mpEditEngine
776 // is reset there)
778 }
779}
780
782{
783 if (mpTxtWnd)
785
787 mpWindow = nullptr;
788 mpTxtWnd = nullptr;
789}
790
792{
794}
795
797{
798 if (mpTxtWnd)
799 {
800 if (mpTxtWnd->HasEditView())
801 {
803
806 mbEditEngineCreated = false;
807
809 ScAccessibleEditObjectTextData::GetTextForwarder(); // fill the mpForwarder
810 mpEditEngine = nullptr;
811 }
812 else
813 {
814 mpEditView = nullptr;
815
818 if (!mpEditEngine)
819 {
821 pEnginePool->FreezeIdRanges();
822 mpEditEngine = new ScFieldEditEngine(nullptr, pEnginePool.get(), nullptr, true);
823 mbEditEngineCreated = true;
824 mpEditEngine->EnableUndo( false );
825 mpEditEngine->SetRefMapMode(MapMode(MapUnit::Map100thMM));
827
829
830#if 0
831 Size aSize(pTxtWnd->GetSizePixel());
832 aSize = pTxtWnd->PixelToLogic(aSize, mpEditEngine->GetRefMapMode());
834#else
835 OutputDevice& rDevice = mpTxtWnd->GetDrawingArea()->get_ref_device();
836 Size aSize(rDevice.GetOutputSizePixel());
837 aSize = rDevice.PixelToLogic(aSize, mpEditEngine->GetRefMapMode());
839#endif
840
842 }
843 }
844 }
845 return mpForwarder.get();
846}
847
849{
850 if (mpTxtWnd)
851 {
852 if (!mpTxtWnd->HasEditView() && bCreate)
853 {
854 if ( !mpTxtWnd->IsInputActive() )
855 {
857 mpTxtWnd->GrabFocus();
858
860 }
861 }
862 }
863
865}
866
868{
870 delete mpEditEngine;
873 mpEditEngine = nullptr;
874
875 mpForwarder.reset();
876 mpEditViewForwarder.reset();
877 mpViewForwarder.reset();
878 mbEditEngineCreated = false;
879}
880
882{
884 {
885 if (mpTxtWnd)
887 }
888}
889
891{
893 mpEditView = nullptr;
894
895 // send SdrHintKind::BeginEdit
896 SdrHint aHint(SdrHintKind::BeginEdit);
897 GetBroadcaster().Broadcast( aHint );
898}
899
901{
902 // send SdrHintKind::EndEdit
903 SdrHint aHint(SdrHintKind::EndEdit);
904 GetBroadcaster().Broadcast( aHint );
905
907 mpEditView = nullptr;
908}
909
910// ScAccessiblePreviewCellTextData: shared data between sub objects of an accessible cell text object
911
913 const ScAddress& rP)
914 : ScAccessibleCellBaseTextData(GetDocShell(pViewShell), rP),
915 mpViewShell(pViewShell)
916{
917}
918
920{
921 if (pEditEngine)
922 pEditEngine->SetNotifyHdl(Link<EENotify&,void>());
923 mpViewForwarder.reset();
924}
925
927{
928 if ( rHint.GetId() == SfxHintId::Dying )
929 {
930 mpViewShell = nullptr; // invalid now
931 if (mpViewForwarder)
932 mpViewForwarder->SetInvalid();
933 }
935}
936
938{
940}
941
943{
944 bool bEditEngineBefore(pEditEngine != nullptr);
945
946 ScCellTextData::GetTextForwarder(); // creates Forwarder and EditEngine
947
948 if (!bEditEngineBefore && pEditEngine)
949 {
952 if (pWin)
953 aSize = pWin->PixelToLogic(aSize, pEditEngine->GetRefMapMode());
954 pEditEngine->SetPaperSize(aSize);
955 }
956
957 if (pEditEngine)
958 pEditEngine->SetNotifyHdl( LINK(this, ScAccessiblePreviewCellTextData, NotifyHdl) );
959
960 return pForwarder.get();
961}
962
964{
965 if (!mpViewForwarder)
966 mpViewForwarder.reset(new ScPreviewCellViewForwarder(mpViewShell));
967 return mpViewForwarder.get();
968}
969
971{
972 ScDocShell* pDocSh = nullptr;
973 if (pViewShell)
974 pDocSh = static_cast<ScDocShell*>( pViewShell->GetDocument().GetDocumentShell());
975 return pDocSh;
976}
977
978// ScAccessiblePreviewHeaderCellTextData: shared data between sub objects of an accessible cell text object
979
981 OUString aText, const ScAddress& rP, bool bColHeader, bool bRowHeader)
982 : ScAccessibleCellBaseTextData(GetDocShell(pViewShell), rP),
983 mpViewShell(pViewShell),
984 maText(std::move(aText)),
985 mbColHeader(bColHeader),
986 mbRowHeader(bRowHeader)
987{
988}
989
991{
992 if (pEditEngine)
993 pEditEngine->SetNotifyHdl(Link<EENotify&,void>());
994 mpViewForwarder.reset();
995}
996
998{
999 if ( rHint.GetId() == SfxHintId::Dying )
1000 {
1001 mpViewShell = nullptr; // invalid now
1002 if (mpViewForwarder)
1003 mpViewForwarder->SetInvalid();
1004 }
1006}
1007
1009{
1011}
1012
1014{
1015 if (!pEditEngine)
1016 {
1017 if ( pDocShell )
1018 {
1019 ScDocument& rDoc = pDocShell->GetDocument();
1021 }
1022 else
1023 {
1025 pEnginePool->FreezeIdRanges();
1026 pEditEngine.reset( new ScFieldEditEngine(nullptr, pEnginePool.get(), nullptr, true) );
1027 }
1028 pEditEngine->EnableUndo( false );
1029 if (pDocShell)
1030 pEditEngine->SetRefDevice(pDocShell->GetRefDevice());
1031 else
1032 pEditEngine->SetRefMapMode(MapMode(MapUnit::Map100thMM));
1034 }
1035
1036 if (bDataValid)
1037 return pForwarder.get();
1038
1039 if (!maText.isEmpty())
1040 {
1041 if ( mpViewShell )
1042 {
1043 Size aOutputSize;
1044 vcl::Window* pWindow = mpViewShell->GetWindow();
1045 if ( pWindow )
1046 aOutputSize = pWindow->GetOutputSizePixel();
1047 tools::Rectangle aVisRect( Point(), aOutputSize );
1049 if (pWindow)
1050 aSize = pWindow->PixelToLogic(aSize, pEditEngine->GetRefMapMode());
1051 pEditEngine->SetPaperSize(aSize);
1052 }
1053 pEditEngine->SetTextCurrentDefaults( maText );
1054 }
1055
1056 bDataValid = true;
1057
1058 pEditEngine->SetNotifyHdl( LINK(this, ScAccessiblePreviewHeaderCellTextData, NotifyHdl) );
1059
1060 return pForwarder.get();
1061}
1062
1064{
1065 if (!mpViewForwarder)
1066 mpViewForwarder.reset(new ScPreviewHeaderCellViewForwarder(mpViewShell));
1067 return mpViewForwarder.get();
1068}
1069
1071{
1072 ScDocShell* pDocSh = nullptr;
1073 if (pViewShell)
1074 pDocSh = static_cast<ScDocShell*>(pViewShell->GetDocument().GetDocumentShell());
1075 return pDocSh;
1076}
1077
1079 const EditTextObject* pEditObj, SvxAdjust eAdjust)
1080 :
1081 mpViewShell(pViewShell),
1082 mpDocSh(nullptr),
1083 mpEditObj(pEditObj),
1084 mbDataValid(false),
1085 meAdjust(eAdjust)
1086{
1087 if (pViewShell)
1088 mpDocSh = static_cast<ScDocShell*>(pViewShell->GetDocument().GetDocumentShell());
1089 if (mpDocSh)
1091}
1092
1094{
1095 SolarMutexGuard aGuard; // needed for EditEngine dtor
1096
1097 if (mpDocSh)
1099 if (mpEditEngine)
1100 mpEditEngine->SetNotifyHdl(Link<EENotify&,void>());
1101 mpEditEngine.reset();
1102 mpForwarder.reset();
1103}
1104
1106{
1108}
1109
1111{
1112 if ( rHint.GetId() == SfxHintId::Dying )
1113 {
1114 mpViewShell = nullptr;// invalid now
1115 mpDocSh = nullptr;
1116 if (mxViewForwarder)
1117 mxViewForwarder->SetInvalid();
1118 }
1119}
1120
1122{
1123 if (!mpEditEngine)
1124 {
1126 pEnginePool->FreezeIdRanges();
1127 std::unique_ptr<ScHeaderEditEngine> pHdrEngine(new ScHeaderEditEngine( pEnginePool.get() ));
1128
1129 pHdrEngine->EnableUndo( false );
1130 pHdrEngine->SetRefMapMode(MapMode(MapUnit::MapTwip));
1131
1132 // default font must be set, independently of document
1133 // -> use global pool from module
1134
1135 SfxItemSet aDefaults( pHdrEngine->GetEmptyItemSet() );
1136 const ScPatternAttr& rPattern = SC_MOD()->GetPool().GetDefaultItem(ATTR_PATTERN);
1137 rPattern.FillEditItemSet( &aDefaults );
1138 // FillEditItemSet adjusts font height to 1/100th mm,
1139 // but for header/footer twips is needed, as in the PatternAttr:
1143 aDefaults.Put( SvxAdjustItem( meAdjust, EE_PARA_JUST ) );
1144 pHdrEngine->SetDefaults( aDefaults );
1145
1147 if (mpViewShell)
1149 else
1151 pHdrEngine->SetData( aData );
1152
1153 mpEditEngine = std::move(pHdrEngine);
1155 }
1156
1157 if (mbDataValid)
1158 return mpForwarder.get();
1159
1160 if ( mpViewShell )
1161 {
1162 tools::Rectangle aVisRect;
1164 Size aSize(aVisRect.GetSize());
1166 if (pWin)
1167 aSize = pWin->PixelToLogic(aSize, mpEditEngine->GetRefMapMode());
1168 mpEditEngine->SetPaperSize(aSize);
1169 }
1170 if (mpEditObj)
1171 mpEditEngine->SetTextCurrentDefaults(*mpEditObj);
1172
1173 mbDataValid = true;
1174 return mpForwarder.get();
1175}
1176
1178{
1179 if (!mxViewForwarder)
1180 mxViewForwarder = std::make_unique<ScPreviewHeaderFooterViewForwarder>(mpViewShell);
1181 return mxViewForwarder.get();
1182}
1183
1185 OUString sText, const ScAddress& aCellPos, bool bMarkNote)
1186 :
1187 mpViewShell(pViewShell),
1188 mpDocSh(nullptr),
1189 msText(std::move(sText)),
1190 maCellPos(aCellPos),
1191 mbMarkNote(bMarkNote),
1192 mbDataValid(false)
1193{
1194 if (pViewShell)
1195 mpDocSh = static_cast<ScDocShell*>(pViewShell->GetDocument().GetDocumentShell());
1196 if (mpDocSh)
1198}
1199
1201{
1202 SolarMutexGuard aGuard; // needed for EditEngine dtor
1203
1204 if (mpDocSh)
1206 if (mpEditEngine)
1207 mpEditEngine->SetNotifyHdl(Link<EENotify&,void>());
1208 mpEditEngine.reset();
1209 mpForwarder.reset();
1210}
1211
1213{
1215}
1216
1218{
1219 if ( rHint.GetId() == SfxHintId::Dying )
1220 {
1221 mpViewShell = nullptr;// invalid now
1222 mpDocSh = nullptr;
1223 if (mxViewForwarder)
1224 mxViewForwarder->SetInvalid();
1225 }
1226}
1227
1229{
1230 if (!mpEditEngine)
1231 {
1232 if ( mpDocSh )
1233 {
1234 ScDocument& rDoc = mpDocSh->GetDocument();
1236 }
1237 else
1238 {
1240 pEnginePool->FreezeIdRanges();
1241 mpEditEngine.reset( new ScFieldEditEngine(nullptr, pEnginePool.get(), nullptr, true) );
1242 }
1243 mpEditEngine->EnableUndo( false );
1244 if (mpDocSh)
1245 mpEditEngine->SetRefDevice(mpDocSh->GetRefDevice());
1246 else
1247 mpEditEngine->SetRefMapMode(MapMode(MapUnit::Map100thMM));
1249 }
1250
1251 if (mbDataValid)
1252 return mpForwarder.get();
1253
1254 if (!msText.isEmpty())
1255 {
1256
1257 if ( mpViewShell )
1258 {
1259 Size aOutputSize;
1260 vcl::Window* pWindow = mpViewShell->GetWindow();
1261 if ( pWindow )
1262 aOutputSize = pWindow->GetOutputSizePixel();
1263 tools::Rectangle aVisRect( Point(), aOutputSize );
1265 if (pWindow)
1266 aSize = pWindow->PixelToLogic(aSize, mpEditEngine->GetRefMapMode());
1267 mpEditEngine->SetPaperSize(aSize);
1268 }
1269 mpEditEngine->SetTextCurrentDefaults( msText );
1270 }
1271
1272 mbDataValid = true;
1273
1274 mpEditEngine->SetNotifyHdl( LINK(this, ScAccessibleNoteTextData, NotifyHdl) );
1275
1276 return mpForwarder.get();
1277}
1278
1280{
1281 if (!mxViewForwarder)
1282 mxViewForwarder = std::make_unique<ScPreviewNoteViewForwarder>(mpViewShell);
1283 return mxViewForwarder.get();
1284}
1285
1286// CSV import =================================================================
1287
1289{
1291
1292public:
1293 explicit ScCsvViewForwarder( OutputDevice* pWindow );
1294
1295 virtual bool IsValid() const override;
1296 virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const override;
1297 virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const override;
1298
1299 void SetInvalid();
1300};
1301
1303 mpWindow( pWindow )
1304{
1305}
1306
1308{
1309 return mpWindow != nullptr;
1310}
1311
1312Point ScCsvViewForwarder::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const
1313{
1314 if( !mpWindow ) return Point();
1315 return mpWindow->LogicToPixel( rPoint, rMapMode );
1316}
1317
1318Point ScCsvViewForwarder::PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const
1319{
1320 if( !mpWindow ) return Point();
1321 return mpWindow->PixelToLogic( rPoint, rMapMode );
1322}
1323
1325{
1326 mpWindow = nullptr;
1327}
1328
1330 OutputDevice* pWindow, EditEngine* pEditEngine,
1331 OUString aCellText, const Size& rCellSize ) :
1332 mpWindow( pWindow ),
1333 mpEditEngine( pEditEngine ),
1334 maCellText(std::move( aCellText )),
1335 maCellSize( rCellSize )
1336{
1337}
1338
1340{
1341}
1342
1344{
1345 if ( rHint.GetId() == SfxHintId::Dying )
1346 {
1347 mpWindow = nullptr;
1348 mpEditEngine = nullptr;
1349 if (mpViewForwarder)
1350 mpViewForwarder->SetInvalid();
1351 }
1352 ScAccessibleTextData::Notify( rBC, rHint );
1353}
1354
1356{
1358}
1359
1361{
1362 if( mpEditEngine )
1363 {
1366 if( !mpTextForwarder )
1368 }
1369 else
1370 mpTextForwarder.reset();
1371 return mpTextForwarder.get();
1372}
1373
1375{
1376 if( !mpViewForwarder )
1378 return mpViewForwarder.get();
1379}
1380
1382{
1383 return nullptr;
1384}
1385
1386/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
IMPL_LINK(ScAccessibleTextData, NotifyHdl, EENotify &, aNotify, void)
const OUString msText
Text maText
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
void Copy()
tools::Rectangle GetVisArea() const
void Cut()
void SetSelection(const ESelection &rNewSel)
EditEngine * GetEditEngine() const
void Paste()
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.
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
std::unique_ptr< ScEditObjectViewForwarder > mpViewForwarder
std::unique_ptr< ScPreviewViewForwarder > mxViewForwarder
ScAccessibleHeaderTextData(ScPreviewShell *pViewShell, const EditTextObject *pEditObj, SvxAdjust eAdjust)
std::unique_ptr< ScEditEngineDefaulter > mpEditEngine
virtual SvxViewForwarder * GetViewForwarder() override
virtual SvxTextForwarder * GetTextForwarder() override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual ScAccessibleTextData * Clone() const override
virtual ~ScAccessibleHeaderTextData() override
const EditTextObject * mpEditObj
std::unique_ptr< SvxEditEngineForwarder > mpForwarder
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
ScAccessiblePreviewHeaderCellTextData(ScPreviewShell *pViewShell, OUString aText, const ScAddress &rP, bool bColHeader, bool bRowHeader)
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual SvxTextForwarder * GetTextForwarder() override
virtual ~ScAccessiblePreviewHeaderCellTextData() override
virtual SvxViewForwarder * GetViewForwarder() override
virtual ScAccessibleTextData * Clone() const override
std::unique_ptr< ScPreviewViewForwarder > mpViewForwarder
SfxBroadcaster & GetBroadcaster() const
virtual void Notify(SfxBroadcaster &, const SfxHint &) override
SCTAB Tab() const
Definition: address.hxx:283
SCROW Row() const
Definition: address.hxx:274
SCCOL Col() const
Definition: address.hxx:279
ScDocShell * pDocShell
Definition: textuno.hxx:329
std::unique_ptr< ScFieldEditEngine > pEditEngine
Definition: textuno.hxx:331
ScDocShell * GetDocShell() const
Definition: textuno.hxx:353
std::unique_ptr< SvxEditEngineForwarder > pForwarder
Definition: textuno.hxx:332
virtual SvxTextForwarder * GetTextForwarder()
Definition: textuno.cxx:773
ScAddress aCellPos
Definition: textuno.hxx:330
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()
Definition: docsh3.cxx:466
const ScDocument & GetDocument() const
Definition: docsh.hxx:220
void AddUnoObject(SfxListener &rObject)
Definition: documen3.cxx:907
std::unique_ptr< ScFieldEditEngine > CreateFieldEditEngine()
Definition: documen2.cxx:1150
SfxObjectShell * GetDocumentShell() const
Definition: document.hxx:1081
SC_DLLPUBLIC bool HasValueData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3807
void RemoveUnoObject(SfxListener &rObject)
Definition: documen3.cxx:915
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
Definition: document.cxx:4778
virtual Point PixelToLogic(const Point &rPoint, const MapMode &rMapMode) const override
ScEditObjectViewForwarder(OutputDevice *pWindow, const EditView *_pEditView)
VclPtr< OutputDevice > mpWindow
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)
static void FillDummyFieldData(ScHeaderFieldData &rData)
Definition: textuno.cxx:283
const SfxPoolItem & GetItem(sal_uInt16 nWhichP) const
Definition: patattr.hxx:72
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...
Definition: patattr.cxx:827
bool GetHeaderPosition(tools::Rectangle &rHeaderRect) const
Definition: prevloc.cxx:334
tools::Rectangle GetCellOutputRect(const ScAddress &rCellPos) const
Definition: prevloc.cxx:692
tools::Rectangle GetHeaderCellOutputRect(const tools::Rectangle &rVisRect, const ScAddress &rCellPos, bool bColHeader) const
Definition: prevloc.cxx:665
tools::Rectangle GetNoteInRangeOutputRect(const tools::Rectangle &rVisiblePixel, bool bNoteMarks, const ScAddress &aCellPos) const
Definition: prevloc.cxx:427
const ScPreviewLocationData & GetLocationData()
Definition: prevwsh.cxx:1171
ScDocument & GetDocument()
Definition: prevwsh.cxx:1176
void FillFieldData(ScHeaderFieldData &rData)
Definition: prevwsh.cxx:870
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()
Definition: tabview.hxx:335
vcl::Window * GetWindowByPos(ScSplitPos ePos) const
Definition: tabview.hxx:373
bool IsInputActive() override
Definition: inputwin.cxx:2065
virtual void RemoveAccessibleTextData(ScAccessibleEditLineTextData &rTextData) override
Definition: inputwin.cxx:2203
virtual const OUString & GetTextString() const override
Definition: inputwin.cxx:2060
virtual void StartEditEngine() override
Definition: inputwin.cxx:1423
virtual void InsertAccessibleTextData(ScAccessibleEditLineTextData &rTextData) override
Definition: inputwin.cxx:2196
virtual EditView * GetEditView() const override
Definition: inputwin.cxx:1312
virtual bool HasEditView() const override
Definition: inputwin.cxx:1319
bool GetMergeSizePixel(SCCOL nX, SCROW nY, tools::Long &rSizeXPix, tools::Long &rSizeYPix) const
Definition: viewdata.cxx:2727
double GetPPTY() const
Definition: viewdata.hxx:469
ScDocShell * GetDocShell() const
Definition: viewdata.hxx:354
double GetPPTX() const
Definition: viewdata.hxx:468
ScSplitPos meSplitPos
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
bool GetValue() const
void Broadcast(const SfxHint &rHint)
SfxHintId GetId() const
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)
constexpr Point TopLeft() const
constexpr Size GetSize() const
Point LogicToPixel(const Point &rLogicPt) const
const MapMode & GetMapMode() const
Point PixelToLogic(const Point &rDevicePt) const
Size GetOutputSizePixel() const
constexpr double nPPTX
constexpr double nPPTY
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)
const long LONG_MAX
constexpr OUStringLiteral aData
long Long
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)
#define SC_MOD()
Definition: scmod.hxx:249
SvxCellHorJustify
SvxCellVerJustify
SvxAdjust
ScSplitPos
Definition: viewdata.hxx:44
VclPtr< vcl::Window > mpWindow