60void collectUIInformation(
const OUString& aFactor)
63 aDescription.
aID =
"writer_edit";
66 aDescription.
aKeyWord =
"SwEditWinUIObject";
67 aDescription.
aParent =
"MainWindow";
75 bool const bCursorIsVisible(
m_pWrtShell->IsCursorVisible());
84 collectUIInformation(OUString::number(nFactor));
88 short nFactor,
bool bViewOnly )
99 const bool bWeb =
dynamic_cast< const SwWebView *
>( this ) !=
nullptr;
107 if( eZoomType != SvxZoomType::PERCENT )
121 const MapMode aTmpMap( MapUnit::MapTwip );
122 const Size aWindowSize(
GetEditWin().PixelToLogic( rEditSize, aTmpMap ) );
124 if( SvxZoomType::OPTIMAL == eZoomType )
136 nFac = aWindowSize.
Width() * 100 / aPageSize.
Width();
138 else if(SvxZoomType::WHOLEPAGE == eZoomType || SvxZoomType::PAGEWIDTH == eZoomType )
144 nFac = aWindowSize.
Width() * 100 / nTmpWidth;
146 if ( SvxZoomType::WHOLEPAGE == eZoomType )
149 nFac =
std::min( nFac, nVisPercent );
155 nFac = aWindowSize.
Width() * 100 / nTmpWidth;
160 const sal_uInt16 nZoomFac = o3tl::narrowing<sal_uInt16>(nFac);
167 (nZoomFac != pUsrPref->
GetZoom() ||
172 SW_MOD()->ApplyUsrPref(*pUsrPref,
nullptr);
175 if ( pOpt->
GetZoom() != nZoomFac )
181 if ( eZoomType != SvxZoomType::PERCENT )
185 if ( eZoomType == SvxZoomType::WHOLEPAGE )
191 aPos.
setX( lLeftMargin );
194 rCharRect.
Bottom() < aPos.
Y() )
206 else if ( nZoomFac != pOpt->
GetZoom() )
227 const bool bUnLockView = !
m_pWrtShell->IsViewLocked();
237 const bool bWeb =
dynamic_cast< const SwWebView *
>( this ) !=
nullptr;
246 SW_MOD()->ApplyUsrPref(*pUsrPref,
nullptr);
280 OSL_ENSURE( rEvent.GetWindow(),
"Window???" );
283 switch ( rEvent.GetId() )
285 case VclEventId::WindowHide:
286 if( pChildWin == m_pHScrollbar )
287 ShowHScrollbar(
false );
288 else if( pChildWin == m_pVScrollbar )
289 ShowVScrollbar(
false );
291 case VclEventId::WindowShow:
292 if( pChildWin == m_pHScrollbar )
293 ShowHScrollbar(
true );
294 else if( pChildWin == m_pVScrollbar )
295 ShowVScrollbar(
true );
306 assert(!ppScrollbar);
311 ppScrollbar->SetScrollHdl(
LINK(
this,
SwView, HoriScrollHdl ));
313 ppScrollbar->SetScrollHdl(
LINK(
this,
SwView, VertScrollHdl ));
319 ppScrollbar->ExtendedShow();
324 bool* pbNext =
static_cast<bool*
>(
p);
327 const bool bNext = *pbNext;
336 if (
NID_POSTIT != s_nMoveType && m_pPostItMgr )
339 if (pActiveSidebarWin)
344 switch( s_nMoveType )
352 (!bNext && aVisiblePageNumbers.
nFirstPhy == 1))
356 SearchLabel::StartWrapped);
360 auto nPage = bNext ? aVisiblePageNumbers.
nLastPhy + 1 :
365 const Point aPt(GetVisArea().
Left(), nYPos);
366 Point aAlPt(AlignToPixel(aPt));
369 if(aPt.
Y() != aAlPt.
Y())
388 else if(s_nMoveType ==
NID_OLE)
390 bool bSuccess = bNext ?
406 bool bSuccess = rSh.
GotoObj(bNext,
427 GetViewFrame().GetDispatcher()->Execute(bNext ?
448 eSearchLabel = bNext ? SearchLabel::EndWrapped : SearchLabel::StartWrapped;
454 eSearchLabel = SearchLabel::NavElementNotFound;
473 pTyp = pCurField->
GetTyp();
494 if (bFrameTypeFootnote)
505 if (bFrameTypeFootnote)
520 std::vector< OUString > vNavMarkNames;
526 vNavMarkNames.push_back((*ppMark)->GetName());
528 std::sort(vNavMarkNames.begin(), vNavMarkNames.end());
531 if(!vNavMarkNames.empty())
538 if (s_nActMark >=
MAX_MARKS || s_nActMark >=
static_cast<sal_Int32
>(vNavMarkNames.size()))
549 s_nActMark = vNavMarkNames.size()-1;
553 rSh.
GotoMark(vNavMarkNames[s_nActMark]);
562 if (m_pPostItMgr->HasNotes())
565 m_pPostItMgr->AssureStdModeAtShell();
566 m_pPostItMgr->SetActiveSidebarWin(
nullptr);
567 GetEditWin().GrabFocus();
571 bool bWrapped =
false;
586 auto pAnnotationWin = m_pPostItMgr->GetAnnotationWin(
588 if (pAnnotationWin && pAnnotationWin->IsVisible())
600 GetViewFrame().GetDispatcher()->Execute(
FN_POSTIT);
603 SearchLabel::StartWrapped);
616 bool bBackward = s_pSrchItem->GetBackward();
619 s_pSrchItem->SetBackward(!bNext);
622 s_pSrchItem->SetBackward(bBackward);
643 m_pEditWin->GrabFocus();
709 switch( pRuler->GetClickType() )
711 case RulerType::DontKnow:
712 case RulerType::Outside:
713 sDefPage=
"labelTP_BORDER";
715 case RulerType::Indent:
716 sDefPage=
"labelTP_PARA_STD";
718 case RulerType::Margin1:
719 case RulerType::Margin2:
724 sDefPage =
"labelTP_TABULATOR";
729 GetViewFrame().GetDispatcher()->ExecuteList(nDefDlg,
730 SfxCallMode::SYNCHRON|SfxCallMode::RECORD,
wrapper iterator: wraps iterator of implementation while hiding MarkBase class; only IMark instances ...
Provides access to the marks of a document.
virtual const_iterator_t getAllMarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of marks.
virtual const_iterator_t getAllMarksBegin() const =0
returns a STL-like random access iterator to the begin of the sequence of marks.
static SW_DLLPUBLIC MarkType GetType(const ::sw::mark::IMark &rMark)
Returns the MarkType used to create the mark.
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
virtual bool IsTextEdit() const final override
void Invalidate(sal_uInt16 nId)
SfxViewFrame * GetFrame() const
virtual void Invalidate(sal_uInt16 nId=0)
virtual bool IsDesignMode() const
vcl::Window & GetWindow() const
SfxBindings & GetBindings()
SfxViewFrame & GetViewFrame() const
vcl::Window * GetWindow() const
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
tools::Long AdjustWidth(tools::Long n)
constexpr tools::Long Width() const
tools::Long GetRight() const
tools::Long GetLeft() const
static void SetSearchLabel(const SearchLabel &rSL)
Class for automated call of Start- and EndAction().
A helper class to save cursor state (position).
bool GotoNextOutline()
jump to next node with outline num.
bool GotoPrevOutline()
jump to previous node with outline num.
bool GotoNextFootnoteAnchor()
SwShellCursor * GetCursor_()
const SwPostItField * GetPostItFieldAtCursor() const
bool SttEndDoc(bool bStt)
bool MoveRegion(SwWhichRegion, SwMoveFnCollection const &)
bool MoveTable(SwWhichTable, SwMoveFnCollection const &)
bool GotoNxtPrvTOXMark(bool bNext=true)
jump to next/previous index marker
SwField * GetCurField(const bool bIncludeInputFieldAtStart=false) const
void EndAction(const bool bIdleEnd=false)
bool GotoFootnoteText()
jump from content to footnote
bool GotoPrevFootnoteAnchor()
void GoNextPrevCursorSetSearchLabel(const bool bNext)
bool GotoNxtPrvTableFormula(bool bNext=true, bool bOnlyErrors=false)
Jump to next/previous table formula Optionally it is possible to also jump to broken formulas.
bool IsCursorPtAtEnd() const
bool MoveFieldType(const SwFieldType *pFieldType, const bool bNext, const SwFieldIds nResType=SwFieldIds::Unknown, const bool bAddSetExpressionFieldsToInputFields=true)
void RestoreSavePos()
Restore cursor state to the one saved by SwCursorSaveState.
SwFieldType * GetFieldType(size_t nField, SwFieldIds nResId=SwFieldIds::Unknown) const
get field types with a ResId, if 0 get all
FrameTypeFlags GetFrameType(const Point *pPt, bool bStopAtFly) const
For return values see above FrameType.
bool GotoNextFly(GotoObjFlags eType=GotoObjFlags::FlyAny)
Independent selecting of flys.
bool GotoObj(bool bNext, GotoObjFlags eType=GotoObjFlags::DrawAny)
bool GotoPrevFly(GotoObjFlags eType=GotoObjFlags::FlyAny)
void EndTextEdit()
Deletes object if required.
Instances of SwFields and those derived from it occur 0 to n times.
Base class of all fields.
SwFieldTypesEnum GetTypeId() const
SwFieldType * GetTyp() const
SwFrameFormat & GetMaster()
UseOnPage GetUseOn() const
SwFrameFormat & GetLeft()
tools::ULong GetSidebarWidth(bool bPx=false) const
tools::ULong GetSidebarBorderWidth(bool bPx=false) const
Of course Writer needs its own rectangles.
void Height(tools::Long nNew)
void Top(const tools::Long nTop)
void Bottom(const tools::Long nBottom)
void SSize(const Size &rNew)
Represents the current text cursor of one opened edit window.
bool IsViewLayoutBookMode() const
SvxZoomType GetZoomType() const
sal_uInt16 GetZoom() const
void SetZoomType(SvxZoomType eZoom_)
void SetZoom(sal_uInt16 n)
sal_uInt16 GetViewLayoutColumns() const
void SetReadonly(bool bSet)
void SetViewLayoutColumns(sal_uInt16 nNew)
void SetViewLayoutBookMode(bool bNew)
const IDocumentMarkAccess * getIDocumentMarkAccess() const
Provides access to the document bookmark interface.
Point GetPagePos(sal_uInt16 nPageNum) const
void GetFirstLastVisPageNumbers(SwVisiblePageNumbers &rVisiblePageNumbers)
void GetHRulerMetric(FieldUnit &rToFill) const
SAL_DLLPRIVATE bool UpdateScrollbars()
VclPtr< SwScrollbar > m_pHScrollbar
static void SetActMark(sal_Int32 nSet)
static sal_uInt16 s_nMoveType
void EnableVScrollbar(bool bEnable)
std::unique_ptr< SwWrtShell > m_pWrtShell
void GetVRulerMetric(FieldUnit &rToFill) const
VclPtr< SwScrollbar > m_pVScrollbar
virtual FmFormShell * GetFormShell() override
bool m_bVScrollbarEnabled
VclPtr< SvxRuler > m_pHRuler
VclPtr< SvxRuler > m_pVRuler
void SetViewLayout(sal_uInt16 nColumns, bool bBookMode, bool bViewOnly=false)
void ShowHScrollbar(bool bShow)
void EnableHScrollbar(bool bEnable)
const tools::Rectangle & GetVisArea() const
bool IsHScrollbarVisible() const
SwPostItMgr * GetPostItMgr()
void ChangeVRulerMetric(FieldUnit eUnit)
static sal_Int32 s_nActMark
bool IsVScrollbarVisible() const
SAL_DLLPRIVATE void CreateScrollbar(bool bHori)
void SetVisArea(const tools::Rectangle &, bool bUpdateScrollbar=true)
SAL_DLLPRIVATE void CalcVisArea(const Size &rPixelSz)
SAL_DLLPRIVATE void SetZoom_(const Size &rEditSz, SvxZoomType eZoomType, short nFactor, bool bViewOnly)
static sal_uInt16 GetMoveType()
void ShowVScrollbar(bool bShow)
bool m_bHScrollbarEnabled
static void SetMoveType(sal_uInt16 nSet)
void SetZoom(SvxZoomType eZoomType, short nFactor=100, bool bViewOnly=false)
void ChangeTabMetric(FieldUnit eUnit)
Used by the UI to modify the document model.
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
void addCurrentPosition()
void GotoMark(const ::sw::mark::IMark *const pMark)
SwNavigationMgr & GetNavigationMgr()
void GotoFootnoteAnchor(const SwTextFootnote &rTextFootnote)
bool HasSelection() const
void MoveCursor(bool bWithSelect=false)
const SwView & GetView() const
static UITestLogger & getInstance()
void logEvent(const EventDescription &rDescription)
static VclPtr< reference_type > Create(Arg &&... arg)
#define FN_FORMAT_PAGE_DLG
GotoObjFlags
values can be combined via logical or
@ Page
Rect of current page.
@ PageCalc
... page will be formatted if required.
@ PagesArea
Rect covering the pages area.
SwFieldTypesEnum
List of FieldTypes at UI.
@ Database
For old documents the Field-Which IDs must be preserved !!!
#define LINK(Instance, Class, Member)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
SwNodeOffset abs(const SwNodeOffset &a)
SwMoveFnCollection const & fnTableStart
SwMoveFnCollection const & fnRegionStart
std::map< OUString, OUString > aParameters
constexpr SwTwips DOCUMENTBORDER
bool GotoNextRegion(SwPaM &rCurrentCursor, SwMoveFnCollection const &fnPosRegion, bool bInReadOnly)
bool GotoPrevRegion(SwPaM &rCurrentCursor, SwMoveFnCollection const &fnPosRegion, bool bInReadOnly)
bool GotoNextTable(SwPaM &rCurrentCursor, SwMoveFnCollection const &fnPosTable, bool bInReadOnly)
bool GotoPrevTable(SwPaM &rCurrentCursor, SwMoveFnCollection const &fnPosTable, bool bInReadOnly)
const tools::Long nLeftOfst
IMPL_LINK(SwView, WindowChildEventListener, VclWindowEvent &, rEvent, void)
#define NID_TABLE_FORMULA
#define NID_TABLE_FORMULA_ERROR