LibreOffice Module sw (master)  1
PageBreakWin.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 
10 #include <bitmaps.hlst>
11 
12 #include <cmdid.h>
13 #include <cntfrm.hxx>
14 #include <txtfrm.hxx>
15 #include <notxtfrm.hxx>
16 #include <ndtxt.hxx>
17 #include <DashedLine.hxx>
18 #include <doc.hxx>
19 #include <edtwin.hxx>
20 #include <fmtpdsc.hxx>
21 #include <IDocumentUndoRedo.hxx>
23 #include <PageBreakWin.hxx>
24 #include <pagefrm.hxx>
25 #include <PostItMgr.hxx>
26 #include <FrameControlsManager.hxx>
27 #include <strings.hrc>
28 #include <tabfrm.hxx>
29 #include <uiitems.hxx>
30 #include <uiobject.hxx>
31 #include <view.hxx>
32 #include <viewopt.hxx>
33 #include <wrtsh.hxx>
34 
46 #include <sfx2/dispatch.hxx>
47 #include <sfx2/viewfrm.hxx>
48 #include <svl/stritem.hxx>
49 #include <vcl/canvastools.hxx>
50 #include <vcl/event.hxx>
51 #include <vcl/svapp.hxx>
52 #include <vcl/settings.hxx>
53 #include <memory>
54 
55 #define BUTTON_WIDTH 30
56 #define BUTTON_HEIGHT 19
57 #define ARROW_WIDTH 9
58 
59 using namespace basegfx;
60 using namespace basegfx::utils;
61 
62 namespace
63 {
64  class SwBreakDashedLine : public SwDashedLine
65  {
66  private:
68 
69  public:
70  SwBreakDashedLine( vcl::Window* pParent, Color& ( *pColorFn )(), SwPageBreakWin* pWin ) :
71  SwDashedLine( pParent, pColorFn ),
72  m_pWin( pWin ) {};
73  virtual ~SwBreakDashedLine() override { disposeOnce(); }
74  virtual void dispose() override { m_pWin.clear(); SwDashedLine::dispose(); }
75 
76  virtual void MouseMove( const MouseEvent& rMEvt ) override;
77  };
78 
79  void SwBreakDashedLine::MouseMove( const MouseEvent& rMEvt )
80  {
81  if ( rMEvt.IsLeaveWindow() )
82  {
83  // don't fade if we just move to the 'button'
84  Point aEventPos( GetPosPixel() + rMEvt.GetPosPixel() );
85  if ( !m_pWin->Contains( aEventPos ) || !m_pWin->IsVisible() )
86  m_pWin->Fade( false );
87  }
88  else if ( !m_pWin->IsVisible() )
89  {
90  m_pWin->Fade( true );
91  }
92 
93  if ( !rMEvt.IsSynthetic() && !m_pWin->IsVisible() )
94  {
95  m_pWin->UpdatePosition( rMEvt.GetPosPixel() );
96  }
97  }
98 }
99 
100 SwPageBreakWin::SwPageBreakWin( SwEditWin* pEditWin, const SwFrame *pFrame ) :
101  SwFrameMenuButtonBase(pEditWin, pFrame, "modules/swriter/ui/pbmenubutton.ui", "PBMenuButton"),
102  m_xMenuButton(m_xBuilder->weld_menu_button("menubutton")),
103  m_pLine( nullptr ),
104  m_bIsAppearing( false ),
105  m_nFadeRate( 100 ),
106  m_nDelayAppearing( 0 ),
107  m_bDestroyed( false )
108 {
109  set_id("PageBreak"); // for uitest
110 
111  m_xMenuButton->connect_toggled(LINK(this, SwPageBreakWin, ToggleHdl));
112  m_xMenuButton->connect_selected(LINK(this, SwPageBreakWin, SelectHdl));
113  m_xMenuButton->set_accessible_name(SwResId(STR_PAGE_BREAK_BUTTON));
114 
115  m_xVirDev = m_xMenuButton->create_virtual_device();
116  SetVirDevFont();
117 
118  // Use pixels for the rest of the drawing
119  m_xVirDev->SetMapMode( MapMode ( MapUnit::MapPixel ) );
120 
121  // Create the line control
123 
124  m_aFadeTimer.SetTimeout( 50 );
125  m_aFadeTimer.SetInvokeHandler( LINK( this, SwPageBreakWin, FadeHandler ) );
126 }
127 
129 {
130  disposeOnce();
131 }
132 
134 {
135  m_bDestroyed = true;
136  m_aFadeTimer.Stop();
137 
139 
140  m_xMenuButton.reset();
142 }
143 
145 {
146  if (!m_xVirDev)
147  return;
148 
149  const ::tools::Rectangle aRect(::tools::Rectangle(Point(0, 0), m_xVirDev->PixelToLogic(GetSizePixel())));
150 
151  // Properly paint the control
153 
154  BColor aHslLine = rgb2hsl(aColor);
155  double nLuminance = aHslLine.getZ();
156  nLuminance += (1.0 - nLuminance) * 0.75;
157  if ( aHslLine.getZ() > 0.7 )
158  nLuminance = aHslLine.getZ() * 0.7;
159  aHslLine.setZ(nLuminance);
160  BColor aOtherColor = hsl2rgb(aHslLine);
161 
163  if (rSettings.GetHighContrastMode())
164  {
165  aColor = rSettings.GetDialogTextColor().getBColor();
166  aOtherColor = rSettings.GetDialogColor().getBColor();
167  }
168 
169  bool bRtl = AllSettings::GetLayoutRTL();
170 
173  B2DPolygon aPolygon = createPolygonFromRect(aBRect, 3.0 / BUTTON_WIDTH, 3.0 / BUTTON_HEIGHT);
174 
175  // Create the polygon primitives
177  B2DPolyPolygon(aPolygon), aOtherColor));
179  aPolygon, aColor));
180 
181  // Create the primitive for the image
182  BitmapEx aBmpEx(RID_BMP_PAGE_BREAK);
183  double nImgOfstX = 3.0;
184  if (bRtl)
185  nImgOfstX = aRect.Right() - aBmpEx.GetSizePixel().Width() - 3.0;
187  aBmpEx, B2DPoint(nImgOfstX, 1.0)));
188 
189  double nTop = double(aRect.getHeight()) / 2.0;
190  double nBottom = nTop + 4.0;
191  double nLeft = aRect.getWidth() - ARROW_WIDTH - 6.0;
192  if (bRtl)
193  nLeft = ARROW_WIDTH - 2.0;
194  double nRight = nLeft + 8.0;
195 
196  B2DPolygon aTriangle;
197  aTriangle.append(B2DPoint(nLeft, nTop));
198  aTriangle.append(B2DPoint(nRight, nTop));
199  aTriangle.append(B2DPoint((nLeft + nRight) / 2.0, nBottom));
200  aTriangle.setClosed(true);
201 
202  BColor aTriangleColor = COL_BLACK.getBColor();
203  if (Application::GetSettings().GetStyleSettings().GetHighContrastMode())
204  aTriangleColor = COL_WHITE.getBColor();
205 
206  aSeq.emplace_back();
208  B2DPolyPolygon(aTriangle), aTriangleColor));
209 
211  double nFadeRate = double(m_nFadeRate) / 100.0;
212  const basegfx::BColorModifierSharedPtr aBColorModifier =
213  std::make_shared<basegfx::BColorModifier_interpolate>(COL_WHITE.getBColor(),
214  1.0 - nFadeRate);
216  aSeq, aBColorModifier));
217 
218  // Create the processor and process the primitives
219  const drawinglayer::geometry::ViewInformation2D aNewViewInfos;
220  std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor(
222 
223  pProcessor->process(aGhostedSeq);
224 
225  m_xMenuButton->set_custom_button(m_xVirDev.get());
226 }
227 
229 {
230  SvxBreak eBreak = SvxBreak::NONE;
231  if ( pCnt )
232  {
233  if ( pCnt->IsInTab() )
234  eBreak = pCnt->FindTabFrame()->GetBreakItem().GetBreak();
235  else
236  eBreak = pCnt->GetBreakItem().GetBreak();
237  }
238  return eBreak;
239 }
240 
241 IMPL_LINK(SwPageBreakWin, SelectHdl, const OString&, rIdent, void)
242 {
243  SwFrameControlPtr pThis = GetEditWin()->GetFrameControlsManager( ).GetControl( FrameControlType::PageBreak, GetFrame() );
244 
245  execute(rIdent);
246 
247  // Only fade if there is more than this temporary shared pointer:
248  // The main reference has been deleted due to a page break removal
249  if ( pThis.use_count() > 1 )
250  Fade( false );
251 }
252 
253 void SwPageBreakWin::execute(std::string_view rIdent)
254 {
255  // Is there a PageBefore break on this page?
257  SvxBreak eBreak = lcl_GetBreakItem( pCnt );
258 
259  // Also check the previous page - to see if there is a PageAfter break
260  SwContentFrame *pPrevCnt = nullptr;
261  SvxBreak ePrevBreak = SvxBreak::NONE;
262  const SwPageFrame* pPrevPage = static_cast<const SwPageFrame*>(GetPageFrame()->GetPrev());
263  if ( pPrevPage )
264  {
265  pPrevCnt = const_cast<SwContentFrame*>(pPrevPage->FindLastBodyContent());
266  ePrevBreak = lcl_GetBreakItem( pPrevCnt );
267  }
268 
269  if (pCnt && rIdent == "edit")
270  {
271  SwEditWin* pEditWin = GetEditWin();
272 
273  SwWrtShell& rSh = pEditWin->GetView().GetWrtShell();
274  bool bOldLock = rSh.IsViewLocked();
275  rSh.LockView( true );
276 
277  // Order of edit detection: first RES_BREAK PageAfter, then RES_BREAK PageBefore/RES_PAGEDESC
278  if ( ePrevBreak == SvxBreak::PageAfter )
279  pCnt = pPrevCnt;
280 
281  SwContentNode& rNd = pCnt->IsTextFrame()
282  ? *static_cast<SwTextFrame*>(pCnt)->GetTextNodeFirst()
283  : *static_cast<SwNoTextFrame*>(pCnt)->GetNode();
284 
285  if ( pCnt->IsInTab() )
286  {
287  rSh.Push( );
288  rSh.ClearMark();
289 
290  rSh.SetSelection( rNd );
291 
292  SfxStringItem aItem(pEditWin->GetView().GetPool().GetWhich(FN_FORMAT_TABLE_DLG), "textflow");
293  pEditWin->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(
295  SfxCallMode::SYNCHRON | SfxCallMode::RECORD,
296  { &aItem });
297 
299  }
300  else
301  {
302  SwPaM aPaM( rNd );
303  SwPaMItem aPaMItem( pEditWin->GetView().GetPool( ).GetWhich( FN_PARAM_PAM ), &aPaM );
304  SfxStringItem aItem( pEditWin->GetView().GetPool( ).GetWhich( SID_PARA_DLG ), "textflow" );
305  pEditWin->GetView().GetViewFrame()->GetDispatcher()->ExecuteList(
306  SID_PARA_DLG,
307  SfxCallMode::SYNCHRON | SfxCallMode::RECORD,
308  { &aItem, &aPaMItem });
309  }
310  rSh.LockView( bOldLock );
311  pEditWin->GrabFocus( );
312  }
313  else if (pCnt && rIdent == "delete")
314  {
315  SwContentNode& rNd = pCnt->IsTextFrame()
316  ? *static_cast<SwTextFrame*>(pCnt)->GetTextNodeFirst()
317  : *static_cast<SwNoTextFrame*>(pCnt)->GetNode();
318 
320 
321  SfxItemSet aSet(
322  GetEditWin()->GetView().GetWrtShell().GetAttrPool(),
324 
325  aSet.Put( SwFormatPageDesc( nullptr ) );
326  // This break could be from the current paragraph, if it has a PageBefore break.
327  if ( eBreak == SvxBreak::PageBefore )
328  aSet.Put( SvxFormatBreakItem( SvxBreak::NONE, RES_BREAK ) );
329 
331  SwPaM(rNd), aSet, SetAttrMode::DEFAULT, GetPageFrame()->getRootFrame());
332 
333  // This break could be from the previous paragraph, if it has a PageAfter break.
334  if ( ePrevBreak == SvxBreak::PageAfter )
335  {
336  SwContentNode& rPrevNd = pPrevCnt->IsTextFrame()
337  ? *static_cast<SwTextFrame*>(pPrevCnt)->GetTextNodeFirst()
338  : *static_cast<SwNoTextFrame*>(pPrevCnt)->GetNode();
339  aSet.ClearItem();
340  aSet.Put( SvxFormatBreakItem( SvxBreak::NONE, RES_BREAK ) );
342  SwPaM(rPrevNd), aSet, SetAttrMode::DEFAULT, pPrevCnt->getRootFrame());
343  }
344 
346  }
347 }
348 
349 void SwPageBreakWin::UpdatePosition(const std::optional<Point>& xEvtPt)
350 {
351  if ( xEvtPt )
352  {
353  if ( xEvtPt == m_xMousePt )
354  return;
355  m_xMousePt = xEvtPt;
356  }
357 
358  const SwPageFrame* pPageFrame = GetPageFrame();
359  const SwFrame* pPrevPage = pPageFrame;
360  do
361  {
362  pPrevPage = pPrevPage->GetPrev();
363  }
364  while ( pPrevPage && ( ( pPrevPage->getFrameArea().Top( ) == pPageFrame->getFrameArea().Top( ) )
365  || static_cast< const SwPageFrame* >( pPrevPage )->IsEmptyPage( ) ) );
366 
367  ::tools::Rectangle aBoundRect = GetEditWin()->LogicToPixel( pPageFrame->GetBoundRect(GetEditWin()).SVRect() );
368  ::tools::Rectangle aFrameRect = GetEditWin()->LogicToPixel( pPageFrame->getFrameArea().SVRect() );
369 
370  tools::Long nYLineOffset = ( aBoundRect.Top() + aFrameRect.Top() ) / 2;
371  if ( pPrevPage )
372  {
373  ::tools::Rectangle aPrevFrameRect = GetEditWin()->LogicToPixel( pPrevPage->getFrameArea().SVRect() );
374  nYLineOffset = ( aPrevFrameRect.Bottom() + aFrameRect.Top() ) / 2;
375  }
376 
377  // Get the page + sidebar coords
378  tools::Long nPgLeft = aFrameRect.Left();
379  tools::Long nPgRight = aFrameRect.Right();
380 
381  tools::ULong nSidebarWidth = 0;
382  const SwPostItMgr* pPostItMngr = GetEditWin()->GetView().GetWrtShell().GetPostItMgr();
383  if ( pPostItMngr && pPostItMngr->HasNotes() && pPostItMngr->ShowNotes() )
384  nSidebarWidth = pPostItMngr->GetSidebarBorderWidth( true ) + pPostItMngr->GetSidebarWidth( true );
385 
387  nPgLeft -= nSidebarWidth;
388  else if ( pPageFrame->SidebarPosition( ) == sw::sidebarwindows::SidebarPosition::RIGHT )
389  nPgRight += nSidebarWidth;
390 
392 
393  // Place the button on the left or right?
394  ::tools::Rectangle aVisArea = GetEditWin()->LogicToPixel( GetEditWin()->GetView().GetVisArea() );
395 
396  tools::Long nLineLeft = std::max( nPgLeft, aVisArea.Left() );
397  tools::Long nLineRight = std::min( nPgRight, aVisArea.Right() );
398  tools::Long nBtnLeft = nLineLeft;
399 
400  if ( m_xMousePt )
401  {
402  nBtnLeft = nLineLeft + m_xMousePt->X() - aBtnSize.getWidth() / 2;
403 
404  if ( nBtnLeft < nLineLeft )
405  nBtnLeft = nLineLeft;
406  else if ( ( nBtnLeft + aBtnSize.getWidth() ) > nLineRight )
407  nBtnLeft = nLineRight - aBtnSize.getWidth();
408  }
409 
410  // Set the button position
411  Point aBtnPos( nBtnLeft, nYLineOffset - BUTTON_HEIGHT / 2 );
412  SetPosSizePixel( aBtnPos, aBtnSize );
413  m_xVirDev->SetOutputSizePixel(aBtnSize);
414 
415  // Set the line position
416  Point aLinePos( nLineLeft, nYLineOffset - 5 );
417  Size aLineSize( nLineRight - nLineLeft, 10 );
418  m_pLine->SetPosSizePixel( aLinePos, aLineSize );
419 }
420 
421 void SwPageBreakWin::ShowAll( bool bShow )
422 {
423  m_pLine->Show( bShow );
424 }
425 
426 bool SwPageBreakWin::Contains( const Point &rDocPt ) const
427 {
429  if ( aRect.IsInside( rDocPt ) )
430  return true;
431 
433  return aLineRect.IsInside( rDocPt );
434 }
435 
436 void SwPageBreakWin::SetReadonly( bool bReadonly )
437 {
438  ShowAll( !bReadonly );
439 }
440 
441 void SwPageBreakWin::Fade( bool bFadeIn )
442 {
443  m_bIsAppearing = bFadeIn;
444  if ( bFadeIn )
445  m_nDelayAppearing = 0;
446 
447  if ( !m_bDestroyed && m_aFadeTimer.IsActive( ) )
448  m_aFadeTimer.Stop();
449  if ( !m_bDestroyed )
450  m_aFadeTimer.Start( );
451 }
452 
453 IMPL_LINK(SwPageBreakWin, ToggleHdl, weld::ToggleButton&, rMenuButton, void)
454 {
455  // hide on dropdown, draw fully unfaded if dropdown before fully faded in
456  Fade(rMenuButton.get_active());
457 }
458 
459 IMPL_LINK_NOARG(SwPageBreakWin, FadeHandler, Timer *, void)
460 {
461  const int TICKS_BEFORE_WE_APPEAR = 10;
462  if ( m_bIsAppearing && m_nDelayAppearing < TICKS_BEFORE_WE_APPEAR )
463  {
464  ++m_nDelayAppearing;
465  m_aFadeTimer.Start();
466  return;
467  }
468 
469  if ( m_bIsAppearing && m_nFadeRate > 0 )
470  m_nFadeRate -= 25;
471  else if ( !m_bIsAppearing && m_nFadeRate < 100 )
472  m_nFadeRate += 25;
473 
474  if ( m_nFadeRate != 100 && !IsVisible() )
475  Show();
476  else if ( m_nFadeRate == 100 && IsVisible( ) )
477  Hide();
478  else
479  {
480  UpdatePosition();
481  PaintButton();
482  }
483 
484  if (IsVisible( ) && m_nFadeRate > 0 && m_nFadeRate < 100)
485  m_aFadeTimer.Start();
486 }
487 
489 {
491 }
492 
493 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual Point GetPosPixel() const
SfxViewFrame * GetViewFrame() const
SvxBreak
Base class of the Writer layout elements.
Definition: frame.hxx:298
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:157
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
#define BUTTON_WIDTH
void append(const basegfx::B2DPoint &rPoint, sal_uInt32 nCount)
BColor rgb2hsl(const BColor &rRGBColor)
IMPL_LINK(SwPageBreakWin, SelectHdl, const OString &, rIdent, void)
const Color & GetDialogColor() const
virtual void dispose() override
SwContentNode * GetNode(SwPaM &rPam, bool &rbFirst, SwMoveFnCollection const &fnMove, bool const bInReadOnly, SwRootFrame const *const i_pLayout)
This function returns the next node in direction of search.
Definition: pam.cxx:823
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
Definition: fmtpdsc.hxx:35
virtual void InsertItemSet(const SwPaM &rRg, const SfxItemSet &, const SetAttrMode nFlags=SetAttrMode::DEFAULT, SwRootFrame const *pLayout=nullptr)=0
const SwView & GetView() const
Definition: edtwin.hxx:244
tools::Long getWidth() const
SvxBreak GetBreak() const
SfxDispatcher * GetDispatcher()
void UpdatePosition(const std::optional< Point > &xEvtPt=std::optional< Point >())
long Long
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
bool Pop(SwCursorShell::PopMode=SwCursorShell::PopMode::DeleteStack)
Definition: wrtsh1.cxx:1714
VclPtr< vcl::Window > m_pLine
virtual SwUndoId EndUndo(SwUndoId const eUndoId, SwRewriter const *const pRewriter)=0
Closes undo block.
std::function< std::unique_ptr< UIObject >vcl::Window *)> FactoryFunction
virtual Size GetSizePixel() const
#define FN_FORMAT_TABLE_DLG
Definition: cmdid.h:322
std::optional< Point > m_xMousePt
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(94)
sw::sidebarwindows::SidebarPosition SidebarPosition() const
asks the page on which side a margin should be shown, e.g for notes returns true for left side...
Definition: pagechg.cxx:1434
IDocumentUndoRedo & GetIDocumentUndoRedo()
Definition: doc.cxx:144
virtual const SvxFormatBreakItem & GetBreakItem() const
Definition: findfrm.cxx:655
SwContentFrame * FindFirstBodyContent()
Definition: pagefrm.hxx:334
Class for displaying a dashed line in the Writer GUI.
Definition: DashedLine.hxx:16
IDocumentContentOperations const & getIDocumentContentOperations() const
Definition: doc.cxx:315
void SetMapMode()
SwWrtShell & GetWrtShell() const
Definition: view.hxx:413
bool IsActive() const
static SvxBreak lcl_GetBreakItem(const SwContentFrame *pCnt)
Used by the UI to modify the document model.
Definition: wrtsh.hxx:91
tools::Long Left() const
const SwRect & getFrameArea() const
Definition: frame.hxx:178
unsigned long ULong
class SAL_WARN_UNUSED UNLESS_MERGELIBS(BASEGFX_DLLPUBLIC) BColorModifier_black_and_white final class SAL_WARN_UNUSED UNLESS_MERGELIBS(BASEGFX_DLLPUBLIC) BColorModifier_gamma final class SAL_WARN_UNUSED UNLESS_MERGELIBS(BASEGFX_DLLPUBLIC) BColorModifier_RGBLuminanceContrast final typedef std::shared_ptr< BColorModifier > BColorModifierSharedPtr
bool IsInTab() const
Definition: frame.hxx:936
Class for the page break control window.
void SetReadonly(bool bReadonly) override
int m_nDelayAppearing
Before we show the control, let it transparent for a few timer ticks to avoid appearing with every mo...
tools::Long Bottom() const
bool IsTextFrame() const
Definition: frame.hxx:1215
bool GetHighContrastMode() const
#define BUTTON_HEIGHT
SfxItemPool & GetPool() const
BColor hsl2rgb(const BColor &rHSLColor)
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
void clear()
virtual bool Contains(const Point &rDocPt) const override
Returns true if the point is inside the control.
virtual SwUndoId StartUndo(SwUndoId const eUndoId, SwRewriter const *const pRewriter)=0
Opens undo block.
bool IsLeaveWindow() const
SwDoc & GetDoc()
Definition: node.hxx:212
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
Definition: edtwin.hxx:58
SwRect GetBoundRect(OutputDevice const *pOutputDevice) const
Definition: paintfrm.cxx:6172
virtual void dispose() override
void Push()
store a copy of the current cursor on the cursor stack
Definition: crsrsh.cxx:2237
bool SetOutputSizePixel(const Size &rNewSize, bool bErase=true)
B2DPolygon createPolygonFromRect(const B2DRectangle &rRect, double fRadiusX, double fRadiusY)
virtual FactoryFunction GetUITestFactory() const override
tools::Long Width() const
void SetSelection(const SwPaM &rCursor)
Definition: crsrsh.cxx:3511
void execute(std::string_view rIdent)
static bool GetLayoutRTL()
virtual void Start() override
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
Definition: uiobject.cxx:233
SwFrame * GetPrev()
Definition: frame.hxx:660
bool IsInside(const Point &rPOINT) const
tools::ULong GetSidebarBorderWidth(bool bPx=false) const
Definition: PostItMgr.cxx:2127
virtual void dispose() override
Class sharing some MenuButton code.
OUString SwResId(const char *pId)
Definition: swmodule.cxx:166
tools::Long Top() const
tools::ULong GetSidebarWidth(bool bPx=false) const
Definition: PostItMgr.cxx:2101
void SetTimeout(sal_uInt64 nTimeoutMs)
void GrabFocus()
A page of the document layout.
Definition: pagefrm.hxx:41
static Color & GetPageBreakColor()
Definition: viewopt.cxx:472
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
basegfx::B2DRange b2DRectangleFromRectangle(const ::tools::Rectangle &rRect)
Point PixelToLogic(const Point &rDevicePt) const
Point LogicToPixel(const Point &rLogicPt) const
std::unique_ptr< drawinglayer::processor2d::BaseProcessor2D > createBaseProcessor2DFromOutputDevice(OutputDevice &rTargetOutDev, const drawinglayer::geometry::ViewInformation2D &rViewInformation2D)
void set_id(const OUString &rID)
void setClosed(bool bNew)
SwContentFrame * FindLastBodyContent()
Searches the last ContentFrame in BodyText below the page.
Definition: findfrm.cxx:52
tools::Rectangle SVRect() const
Definition: swrect.hxx:280
void Stop()
const SwPageFrame * GetPageFrame() const
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
bool IsSynthetic() const
void LockView(bool b)
Definition: viewsh.hxx:462
IMPL_LINK_NOARG(SwPageBreakWin, FadeHandler, Timer *, void)
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
static VclPtr< reference_type > Create(Arg &&...arg)
#define FN_PARAM_PAM
Definition: cmdid.h:824
void Top(const tools::Long nTop)
Definition: swrect.hxx:204
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
Sequence< sal_Int8 > aSeq
void SetInvokeHandler(const Link< Timer *, void > &rLink)
bool HasNotes() const
Definition: PostItMgr.cxx:2096
const Point & GetPosPixel() const
virtual void ShowAll(bool bShow) override
void ClearMark()
Definition: crsrsh.cxx:938
basegfx::BColor getBColor() const
std::unique_ptr< weld::MenuButton > m_xMenuButton
const SwPostItMgr * GetPostItMgr() const
Definition: viewsh.hxx:556
void Fade(bool bFadeIn)
VclPtr< VirtualDevice > m_xVirDev
VirtualDevice * get() const
virtual ~SwPageBreakWin() override
bool ShowNotes() const
Definition: PostItMgr.cxx:2090
std::shared_ptr< SwFrameControl > SwFrameControlPtr
const Size & GetSizePixel() const
const Color & GetDialogTextColor() const
SwPageBreakWin(SwEditWin *pEditWin, const SwFrame *pFrame)
virtual SwEditWin * GetEditWin() override
#define ARROW_WIDTH
tools::Long Right() const
SwRootFrame * getRootFrame()
Definition: frame.hxx:662
bool IsViewLocked() const
Definition: viewsh.hxx:461
SwTabFrame * FindTabFrame()
Definition: frame.hxx:1080
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)