59 void collectUIInformation(
const OUString& aFactor)
62 aDescription.
aID =
"writer_edit";
65 aDescription.
aKeyWord =
"SwEditWinUIObject";
66 aDescription.
aParent =
"MainWindow";
74 bool const bCursorIsVisible(
m_pWrtShell->IsCursorVisible());
83 collectUIInformation(OUString::number(nFactor));
87 short nFactor,
bool bViewOnly )
98 const bool bWeb =
dynamic_cast< const SwWebView *
>( this ) !=
nullptr;
106 if( eZoomType != SvxZoomType::PERCENT )
112 Size aPageSize( aPageRect.SSize() );
113 Size aRootSize( aRootRect.SSize() );
117 if (pPostItMgr->HasNotes() && pPostItMgr->ShowNotes())
118 aPageSize.AdjustWidth(pPostItMgr->GetSidebarWidth() + pPostItMgr->GetSidebarBorderWidth() );
120 const MapMode aTmpMap( MapUnit::MapTwip );
121 const Size aWindowSize(
GetEditWin().PixelToLogic( rEditSize, aTmpMap ) );
126 aPageSize.AdjustWidth(std::abs( rLeftLRSpace.
GetLeft() - rLRSpace.
GetLeft() ) );
129 if( SvxZoomType::OPTIMAL == eZoomType )
131 if (!pPostItMgr->HasNotes() || !pPostItMgr->ShowNotes())
134 nFac = aWindowSize.
Width() * 100 / aPageSize.Width();
136 else if(SvxZoomType::WHOLEPAGE == eZoomType || SvxZoomType::PAGEWIDTH == eZoomType )
139 tools::Long nTmpWidth = bAutomaticViewLayout ? aPageSize.Width() : aRootSize.Width();
141 aPageSize.AdjustHeight(nOf );
142 nFac = aWindowSize.
Width() * 100 / nTmpWidth;
144 if ( SvxZoomType::WHOLEPAGE == eZoomType )
147 nFac = std::min( nFac, nVisPercent );
152 const tools::Long nTmpWidth = bAutomaticViewLayout ? aPageSize.Width() : aRootSize.Width();
153 nFac = aWindowSize.
Width() * 100 / nTmpWidth;
158 const sal_uInt16 nZoomFac =
static_cast<sal_uInt16
>(nFac);
165 (nZoomFac != pUsrPref->
GetZoom() ||
170 SW_MOD()->ApplyUsrPref(*pUsrPref,
nullptr);
173 if ( pOpt->
GetZoom() != nZoomFac )
179 if ( eZoomType != SvxZoomType::PERCENT )
183 if ( eZoomType == SvxZoomType::WHOLEPAGE )
189 aPos.setX( lLeftMargin );
192 rCharRect.
Bottom() < aPos.Y() )
193 aPos.setY( rCharRect.
Top() - rCharRect.
Height() );
204 else if ( nZoomFac != pOpt->
GetZoom() )
225 const bool bUnLockView = !
m_pWrtShell->IsViewLocked();
235 const bool bWeb =
dynamic_cast< const SwWebView *
>( this ) !=
nullptr;
244 SW_MOD()->ApplyUsrPref(*pUsrPref,
nullptr);
278 OSL_ENSURE( rEvent.GetWindow(),
"Window???" );
281 switch ( rEvent.GetId() )
283 case VclEventId::WindowHide:
284 if( pChildWin == m_pHScrollbar )
285 ShowHScrollbar(
false );
286 else if( pChildWin == m_pVScrollbar )
287 ShowVScrollbar(
false );
289 case VclEventId::WindowShow:
290 if( pChildWin == m_pHScrollbar )
291 ShowHScrollbar(
true );
292 else if( pChildWin == m_pVScrollbar )
293 ShowVScrollbar(
true );
325 bool* pbNext =
static_cast<bool*
>(
p);
328 const bool bNext = *pbNext;
337 if (
NID_POSTIT != m_nMoveType && m_pPostItMgr )
340 if (pActiveSidebarWin)
345 switch( m_nMoveType )
353 Point aAlPt(AlignToPixel(aPt) );
356 if(aPt.Y() != aAlPt.Y())
357 aAlPt.AdjustY(3 * GetEditWin().PixelToLogic(
Size(0, 1)).
Height());
360 SearchLabel::StartWrapped);
364 bNext ? PhyPageDown() : PhyPageUp();
383 else if(m_nMoveType ==
NID_OLE)
385 bool bSuccess = bNext ?
401 bool bSuccess = rSh.
GotoObj(bNext,
422 GetViewFrame()->GetDispatcher()->Execute(bNext ?
437 if (bFrameTypeFootnote)
448 if (bFrameTypeFootnote)
463 std::vector< OUString > vNavMarkNames;
469 vNavMarkNames.push_back((*ppMark)->GetName());
471 std::sort(vNavMarkNames.begin(), vNavMarkNames.end());
474 if(!vNavMarkNames.empty())
481 if (m_nActMark >=
MAX_MARKS || m_nActMark >= static_cast<sal_Int32>(vNavMarkNames.size()))
490 if (m_nActMark < 0 || m_nActMark >= static_cast<sal_Int32>(vNavMarkNames.size()))
492 m_nActMark = vNavMarkNames.size()-1;
496 rSh.
GotoMark(vNavMarkNames[m_nActMark]);
505 if (m_pPostItMgr->HasNotes())
522 GetViewFrame()->GetDispatcher()->Execute(
FN_POSTIT);
524 SearchLabel::StartWrapped);
535 GetViewFrame()->GetDispatcher()->Execute(
FN_POSTIT);
548 bool bBackward = s_pSrchItem->GetBackward();
551 s_pSrchItem->SetBackward(!bNext);
554 s_pSrchItem->SetBackward(bBackward);
574 m_pEditWin->GrabFocus();
639 sal_uInt16 nDefDlg = SID_PARA_DLG;
640 switch( pRuler->GetClickType() )
642 case RulerType::DontKnow:
643 case RulerType::Outside:
644 sDefPage=
"labelTP_BORDER";
646 case RulerType::Indent:
647 sDefPage=
"labelTP_PARA_STD";
649 case RulerType::Margin1:
650 case RulerType::Margin2:
655 sDefPage =
"labelTP_TABULATOR";
660 GetViewFrame()->GetDispatcher()->ExecuteList(nDefDlg,
661 SfxCallMode::SYNCHRON|SfxCallMode::RECORD,
SwFieldType * GetFieldType(size_t nField, SwFieldIds nResId=SwFieldIds::Unknown) const
get field types with a ResId, if 0 get all
SfxViewFrame * GetViewFrame() const
#define LINK(Instance, Class, Member)
Instances of SwFields and those derived from it occur 0 to n times.
bool SetActiveSidebarWin()
void SetActive(bool bOn=true)
void GetHRulerMetric(FieldUnit &rToFill) const
void SetReadonly(bool bSet)
static sal_uInt16 GetMoveType()
SwFrameFormat & GetLeft()
SfxViewFrame * GetFrame() const
void SetZoom(sal_uInt16 n)
bool GotoPrevTable(SwPaM &rCurrentCursor, SwMoveFnCollection const &fnPosTable, bool bInReadOnly)
sal_uInt16 GetNextPrevPageNum(bool bNext=true)
bool SttEndDoc(bool bStt)
bool GotoNextFootnoteAnchor()
std::unique_ptr< SwWrtShell > m_pWrtShell
void SetViewLayout(sal_uInt16 nColumns, bool bBookMode, bool bViewOnly=false)
void ChangeTabMetric(FieldUnit eUnit)
bool MoveFieldType(const SwFieldType *pFieldType, const bool bNext, const SwFieldIds nResType=SwFieldIds::Unknown, const bool bAddSetExpressionFieldsToInputFields=true)
VclPtr< SvxRuler > m_pHRuler
wrapper iterator: wraps iterator of implementation while hiding MarkBase class; only IMark instances ...
tools::Long GetRight() const
static SW_DLLPUBLIC MarkType GetType(const ::sw::mark::IMark &rMark)
Returns the MarkType used to create the mark.
Provides access to the marks of a document.
void SetViewLayoutColumns(sal_uInt16 nNew)
#define NID_TABLE_FORMULA
bool GotoFootnoteAnchor()
jump from footnote to anchor
Of course Writer needs its own rectangles.
void Invalidate(sal_uInt16 nId)
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 GotoNextFly(GotoObjFlags eType=GotoObjFlags::FlyAny)
Independent selecting of flys.
UseOnPage GetUseOn() const
void SetVisArea(const tools::Rectangle &, bool bUpdateScrollbar=true)
SvxZoomType GetZoomType() const
SwNavigationMgr & GetNavigationMgr()
Used by the UI to modify the document model.
constexpr tools::Long Width() const
static UITestLogger & getInstance()
void logEvent(const EventDescription &rDescription)
vcl::Window & GetWindow() const
const SwView & GetView() const
bool m_bVScrollbarEnabled
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
bool GotoFootnoteText()
jump from content to footnote
SfxFrame & GetFrame() const
const IDocumentMarkAccess * getIDocumentMarkAccess() const
Provides access to the document bookmark interface.
SAL_DLLPRIVATE void SetZoom_(const Size &rEditSz, SvxZoomType eZoomType, short nFactor, bool bViewOnly)
GotoObjFlags
values can be combined via logical or
SwShellCursor * GetCursor_()
virtual const_iterator_t getAllMarksBegin() const =0
returns a STL-like random access iterator to the begin of the sequence of marks.
virtual bool IsDesignMode() const
Class for automated call of Start- and EndAction().
virtual FmFormShell * GetFormShell() override
void SetZoomType(SvxZoomType eZoom_)
A helper class to save cursor state (position).
bool HasSelection() const
virtual const_iterator_t getAllMarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of marks.
bool IsViewLayoutBookMode() const
static sal_Int32 m_nActMark
bool GoNextPrevCursorSetSearchLabel(const bool bNext)
SfxBindings & GetBindings()
tools::Long GetLeft() const
#define NID_TABLE_FORMULA_ERROR
void ShowVScrollbar(bool bShow)
const tools::Long nLeftOfst
bool GotoPrevOutline()
jump to previous node with outline num.
bool IsHScrollbarVisible() const
static void SetMoveType(sal_uInt16 nSet)
IMPL_LINK(SwView, WindowChildEventListener, VclWindowEvent &, rEvent, void)
void EnableHScrollbar(bool bEnable)
VclPtr< SvxRuler > m_pVRuler
static void SetSearchLabel(const SearchLabel &rSL)
SAL_DLLPRIVATE void CalcVisArea(const Size &rPixelSz)
void ShowHScrollbar(bool bShow)
bool GotoPrevFootnoteAnchor()
bool GotoObj(bool bNext, GotoObjFlags eType=GotoObjFlags::DrawAny)
void EnableVScrollbar(bool bEnable)
SwFrameFormat & GetMaster()
void GotoMark(const ::sw::mark::IMark *const pMark)
bool GotoNextRegion(SwPaM &rCurrentCursor, SwMoveFnCollection const &fnPosRegion, bool bInReadOnly)
void Bottom(const tools::Long nBottom)
void SetZoom(SvxZoomType eZoomType, short nFactor=100, bool bViewOnly=false)
bool MoveRegion(SwWhichRegion, SwMoveFnCollection const &)
void SetViewLayoutBookMode(bool bNew)
void addCurrentPosition()
VclPtr< SwScrollbar > m_pVScrollbar
virtual bool IsTextEdit() const final override
bool GotoPrevFly(GotoObjFlags eType=GotoObjFlags::FlyAny)
Rect covering the pages area.
SwMoveFnCollection const & fnTableStart
void MoveCursor(bool bWithSelect=false)
constexpr tools::Long Height() const
bool IsVScrollbarVisible() const
bool MoveTable(SwWhichTable, SwMoveFnCollection const &)
bool IsCursorPtAtEnd() const
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
virtual void Invalidate(sal_uInt16 nId=0)
Point GetPagePos(sal_uInt16 nPageNum) const
... page will be formatted if required.
static VclPtr< reference_type > Create(Arg &&...arg)
void ChangeVRulerMetric(FieldUnit eUnit)
void Top(const tools::Long nTop)
VclPtr< SwScrollbar > m_pHScrollbar
SwPostItMgr * GetPostItMgr()
sal_uInt16 GetZoom() const
void EndTextEdit()
Deletes object if required.
static sal_uInt16 m_nMoveType
#define FN_FORMAT_PAGE_DLG
vcl::Window * GetWindow() const
void GetVRulerMetric(FieldUnit &rToFill) const
const tools::Rectangle & GetVisArea() const
bool GotoPrevRegion(SwPaM &rCurrentCursor, SwMoveFnCollection const &fnPosRegion, bool bInReadOnly)
bool GotoNxtPrvTOXMark(bool bNext=true)
jump to next/previous index marker
SAL_DLLPRIVATE bool UpdateScrollbars()
bool GotoNextTable(SwPaM &rCurrentCursor, SwMoveFnCollection const &fnPosTable, bool bInReadOnly)
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
std::map< OUString, OUString > aParameters
SAL_DLLPRIVATE void CreateScrollbar(bool bHori)
bool m_bHScrollbarEnabled
void Height(tools::Long nNew)
FrameTypeFlags GetFrameType(const Point *pPt, bool bStopAtFly) const
For return values see above FrameType.
sal_uInt16 GetViewLayoutColumns() const
static void SetActMark(sal_Int32 nSet)
void RestoreSavePos()
Restore cursor state to the one saved by SwCursorSaveState.
bool GotoNextOutline()
jump to next node with outline num.
void EndAction(const bool bIdleEnd=false)
SwMoveFnCollection const & fnRegionStart