LibreOffice Module sw (master)  1
HeaderFooterWin.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 <app.hrc>
11 #include <strings.hrc>
12 #include <globals.hrc>
13 
14 #include <doc.hxx>
15 #include <drawdoc.hxx>
16 #include <cmdid.h>
17 #include <DashedLine.hxx>
18 #include <docsh.hxx>
19 #include <edtwin.hxx>
20 #include <fmthdft.hxx>
21 #include <HeaderFooterWin.hxx>
22 #include <pagedesc.hxx>
23 #include <pagefrm.hxx>
24 #include <SwRewriter.hxx>
25 #include <view.hxx>
26 #include <viewopt.hxx>
27 #include <wrtsh.hxx>
29 
43 #include <editeng/boxitem.hxx>
44 #include <editeng/brushitem.hxx>
45 #include <svx/hdft.hxx>
46 #include <svx/svxids.hrc>
47 #include <sfx2/dispatch.hxx>
48 #include <sfx2/viewfrm.hxx>
51 #include <vcl/canvastools.hxx>
52 #include <vcl/decoview.hxx>
53 #include <vcl/gradient.hxx>
54 #include <vcl/metric.hxx>
55 #include <vcl/menubtn.hxx>
56 #include <vcl/svapp.hxx>
57 #include <vcl/settings.hxx>
58 #include <memory>
59 
60 #define TEXT_PADDING 5
61 #define BOX_DISTANCE 10
62 #define BUTTON_WIDTH 18
63 
64 using namespace basegfx;
65 using namespace basegfx::utils;
66 using namespace drawinglayer::attribute;
67 
68 namespace
69 {
71  {
72  basegfx::BColor aHslLine = basegfx::utils::rgb2hsl(rLineColor);
73  double nLuminance = aHslLine.getZ() * 2.5;
74  if ( nLuminance == 0 )
75  nLuminance = 0.5;
76  else if ( nLuminance >= 1.0 )
77  nLuminance = aHslLine.getZ() * 0.4;
78  aHslLine.setZ( nLuminance );
79  return basegfx::utils::hsl2rgb( aHslLine );
80  }
81 
82  basegfx::BColor lcl_GetLighterGradientColor(const basegfx::BColor& rDarkColor)
83  {
84  basegfx::BColor aHslDark = basegfx::utils::rgb2hsl(rDarkColor);
85  double nLuminance = aHslDark.getZ() * 255 + 20;
86  aHslDark.setZ( nLuminance / 255.0 );
87  return basegfx::utils::hsl2rgb( aHslDark );
88  }
89 
90  B2DPolygon lcl_GetPolygon( const ::tools::Rectangle& rRect, bool bOnTop )
91  {
92  const double nRadius = 3;
93  const double nKappa((M_SQRT2 - 1.0) * 4.0 / 3.0);
94 
95  B2DPolygon aPolygon;
96  aPolygon.append( B2DPoint( rRect.Left(), rRect.Top() ) );
97 
98  {
99  B2DPoint aCorner( rRect.Left(), rRect.Bottom() );
100  B2DPoint aStart( rRect.Left(), rRect.Bottom() - nRadius );
101  B2DPoint aEnd( rRect.Left() + nRadius, rRect.Bottom() );
102  aPolygon.append( aStart );
103  aPolygon.appendBezierSegment(
104  interpolate( aStart, aCorner, nKappa ),
105  interpolate( aEnd, aCorner, nKappa ),
106  aEnd );
107  }
108 
109  {
110  B2DPoint aCorner( rRect.Right(), rRect.Bottom() );
111  B2DPoint aStart( rRect.Right() - nRadius, rRect.Bottom() );
112  B2DPoint aEnd( rRect.Right(), rRect.Bottom() - nRadius );
113  aPolygon.append( aStart );
114  aPolygon.appendBezierSegment(
115  interpolate( aStart, aCorner, nKappa ),
116  interpolate( aEnd, aCorner, nKappa ),
117  aEnd );
118  }
119 
120  aPolygon.append( B2DPoint( rRect.Right(), rRect.Top() ) );
121 
122  if ( !bOnTop )
123  {
126  aBRect.getCenterX(), aBRect.getCenterY(), M_PI );
127  aPolygon.transform( aRotation );
128  }
129 
130  return aPolygon;
131  }
132 }
133 
135  const tools::Rectangle& rRect, bool bOnTop)
136 {
137  rSeq.clear();
138  B2DPolygon aPolygon = lcl_GetPolygon(rRect, bOnTop);
139 
140  // Colors
142  basegfx::BColor aFillColor = lcl_GetFillColor(aLineColor);
143  basegfx::BColor aLighterColor = lcl_GetLighterGradientColor(aFillColor);
144 
146  if (rSettings.GetHighContrastMode())
147  {
148  aFillColor = rSettings.GetDialogColor().getBColor();
149  aLineColor = rSettings.GetDialogTextColor().getBColor();
150 
153  }
154  else
155  {
157  double nAngle = M_PI;
158  if (bOnTop)
159  nAngle = 0;
160  FillGradientAttribute aFillAttrs(drawinglayer::attribute::GradientStyle::Linear, 0.0, 0.0, 0.0, nAngle, aLighterColor, aFillColor, 10);
162  new drawinglayer::primitive2d::FillGradientPrimitive2D(aGradientRect, aFillAttrs)));
163  }
164 
165  // Create the border lines primitive
167  new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aPolygon, aLineColor)));
168 }
169 
170 SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwFrame *pFrame, bool bHeader ) :
171  SwFrameMenuButtonBase( pEditWin, pFrame ),
172  m_aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/swriter/ui/headerfootermenu.ui", ""),
173  m_bIsHeader( bHeader ),
174  m_pPopupMenu(m_aBuilder.get_menu("menu")),
175  m_pLine( nullptr ),
176  m_bIsAppearing( false ),
177  m_nFadeRate( 100 ),
178  m_aFadeTimer( )
179 {
180  //FIXME RenderContext
181 
182  // Get the font and configure it
184  SetZoomedPointFont(*this, aFont);
185 
186  // Create the line control
188  m_pLine->SetZOrder(this, ZOrderFlags::Before);
189 
190  // set the PopupMenu
191  // Rewrite the menu entries' text
192  if (m_bIsHeader)
193  {
194  m_pPopupMenu->SetItemText(m_pPopupMenu->GetItemId("edit"), SwResId(STR_FORMAT_HEADER));
195  m_pPopupMenu->SetItemText(m_pPopupMenu->GetItemId("delete"), SwResId(STR_DELETE_HEADER));
196  }
197  else
198  {
199  m_pPopupMenu->SetItemText(m_pPopupMenu->GetItemId("edit"), SwResId(STR_FORMAT_FOOTER));
200  m_pPopupMenu->SetItemText(m_pPopupMenu->GetItemId("delete"), SwResId(STR_DELETE_FOOTER));
201  }
202 
204 
207 }
208 
210 {
211  disposeOnce();
212 }
213 
215 {
220 }
221 
222 void SwHeaderFooterWin::SetOffset(Point aOffset, long nXLineStart, long nXLineEnd)
223 {
224  // Compute the text to show
226  bool bIsFirst = !pDesc->IsFirstShared() && GetPageFrame()->OnFirstPage();
227  bool bIsLeft = !pDesc->IsHeaderShared() && !GetPageFrame()->OnRightPage();
228  bool bIsRight = !pDesc->IsHeaderShared() && GetPageFrame()->OnRightPage();
229  m_sLabel = SwResId(STR_HEADER_TITLE);
230  if (!m_bIsHeader)
231  m_sLabel = bIsFirst ? SwResId(STR_FIRST_FOOTER_TITLE)
232  : bIsLeft ? SwResId(STR_LEFT_FOOTER_TITLE)
233  : bIsRight ? SwResId(STR_RIGHT_FOOTER_TITLE)
234  : SwResId(STR_FOOTER_TITLE );
235  else
236  m_sLabel = bIsFirst ? SwResId(STR_FIRST_HEADER_TITLE)
237  : bIsLeft ? SwResId(STR_LEFT_HEADER_TITLE)
238  : bIsRight ? SwResId(STR_RIGHT_HEADER_TITLE)
239  : SwResId(STR_HEADER_TITLE);
240 
241  sal_Int32 nPos = m_sLabel.lastIndexOf("%1");
242  m_sLabel = m_sLabel.replaceAt(nPos, 2, pDesc->GetName());
243 
244  // Compute the text size and get the box position & size from it
245  ::tools::Rectangle aTextRect;
246  GetTextBoundRect(aTextRect, m_sLabel);
247  ::tools::Rectangle aTextPxRect = LogicToPixel(aTextRect);
248  FontMetric aFontMetric = GetFontMetric(GetFont());
249  Size aBoxSize (aTextPxRect.GetWidth() + BUTTON_WIDTH + TEXT_PADDING * 2,
250  aFontMetric.GetLineHeight() + TEXT_PADDING * 2 );
251 
252  long nYFooterOff = 0;
253  if (!m_bIsHeader)
254  nYFooterOff = aBoxSize.Height();
255 
256  Point aBoxPos(aOffset.X() - aBoxSize.Width() - BOX_DISTANCE,
257  aOffset.Y() - nYFooterOff);
258 
260  {
261  aBoxPos.setX( aOffset.X() + BOX_DISTANCE );
262  }
263 
264  // Set the position & Size of the window
265  SetPosSizePixel(aBoxPos, aBoxSize);
266 
267  double nYLinePos = aBoxPos.Y();
268  if (!m_bIsHeader)
269  nYLinePos += aBoxSize.Height();
270  Point aLinePos(nXLineStart, nYLinePos);
271  Size aLineSize(nXLineEnd - nXLineStart, 1);
272  m_pLine->SetPosSizePixel(aLinePos, aLineSize);
273 }
274 
276 {
277  if (!PopupMenu::IsInExecute())
278  {
279  m_bIsAppearing = bShow;
280 
281  if (m_aFadeTimer.IsActive())
282  m_aFadeTimer.Stop();
284  }
285 }
286 
287 bool SwHeaderFooterWin::Contains( const Point &rDocPt ) const
288 {
290  if (aRect.IsInside(rDocPt))
291  return true;
292 
294  return aLineRect.IsInside(rDocPt);
295 }
296 
297 void SwHeaderFooterWin::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&)
298 {
299  // Use pixels for the rest of the drawing
300  SetMapMode(MapMode(MapUnit::MapPixel));
302  const ::tools::Rectangle aRect(::tools::Rectangle(Point(0, 0), rRenderContext.PixelToLogic(GetSizePixel())));
303 
305 
306  // Create the text primitive
308  B2DVector aFontSize;
309  FontAttribute aFontAttr = drawinglayer::primitive2d::getFontAttributeFromVclFont(aFontSize, rRenderContext.GetFont(), false, false);
310 
311  FontMetric aFontMetric = rRenderContext.GetFontMetric(rRenderContext.GetFont());
312  double nTextOffsetY = aFontMetric.GetAscent() + TEXT_PADDING;
313  Point aTextPos(TEXT_PADDING, nTextOffsetY);
314 
316  aFontSize.getX(), aFontSize.getY(),
317  double(aTextPos.X()), double(aTextPos.Y())));
318 
321  aTextMatrix, m_sLabel, 0, m_sLabel.getLength(),
322  std::vector<double>(), aFontAttr, css::lang::Locale(), aLineColor)));
323 
324  // Create the 'plus' or 'arrow' primitive
325  B2DRectangle aSignArea(B2DPoint(aRect.Right() - BUTTON_WIDTH, 0.0),
326  B2DSize(aRect.Right(), aRect.getHeight()));
327 
328  B2DPolygon aSign;
329  if (IsEmptyHeaderFooter())
330  {
331  // Create the + polygon
332  double nLeft = aSignArea.getMinX() + TEXT_PADDING;
333  double nRight = aSignArea.getMaxX() - TEXT_PADDING;
334  double nHalfW = ( nRight - nLeft ) / 2.0;
335 
336  double nTop = aSignArea.getCenterY() - nHalfW;
337  double nBottom = aSignArea.getCenterY() + nHalfW;
338 
339  aSign.append(B2DPoint(nLeft, aSignArea.getCenterY() - 1.0));
340  aSign.append(B2DPoint(aSignArea.getCenterX() - 1.0, aSignArea.getCenterY() - 1.0));
341  aSign.append(B2DPoint(aSignArea.getCenterX() - 1.0, nTop));
342  aSign.append(B2DPoint(aSignArea.getCenterX() + 1.0, nTop));
343  aSign.append(B2DPoint(aSignArea.getCenterX() + 1.0, aSignArea.getCenterY() - 1.0));
344  aSign.append(B2DPoint(nRight, aSignArea.getCenterY() - 1.0));
345  aSign.append(B2DPoint(nRight, aSignArea.getCenterY() + 1.0));
346  aSign.append(B2DPoint(aSignArea.getCenterX() + 1.0, aSignArea.getCenterY() + 1.0));
347  aSign.append(B2DPoint(aSignArea.getCenterX() + 1.0, nBottom));
348  aSign.append(B2DPoint(aSignArea.getCenterX() - 1.0, nBottom));
349  aSign.append(B2DPoint(aSignArea.getCenterX() - 1.0, aSignArea.getCenterY() + 1.0));
350  aSign.append(B2DPoint(nLeft, aSignArea.getCenterY() + 1.0));
351  aSign.setClosed(true);
352  }
353  else
354  {
355  // Create the v polygon
356  B2DPoint aLeft(aSignArea.getMinX() + TEXT_PADDING, aSignArea.getCenterY());
357  B2DPoint aRight(aSignArea.getMaxX() - TEXT_PADDING, aSignArea.getCenterY());
358  B2DPoint aBottom((aLeft.getX() + aRight.getX()) / 2.0, aLeft.getY() + 4.0);
359  aSign.append(aLeft);
360  aSign.append(aRight);
361  aSign.append(aBottom);
362  aSign.setClosed(true);
363  }
364 
365  BColor aSignColor = COL_BLACK.getBColor();
366  if (Application::GetSettings().GetStyleSettings().GetHighContrastMode())
367  aSignColor = COL_WHITE.getBColor();
368 
371  B2DPolyPolygon(aSign), aSignColor)) );
372 
373  // Create the processor and process the primitives
374  const drawinglayer::geometry::ViewInformation2D aNewViewInfos;
375  std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor(
377 
378  // TODO Ghost it all if needed
380  double nFadeRate = double(m_nFadeRate) / 100.0;
381 
382  const basegfx::BColorModifierSharedPtr aBColorModifier(
384  1.0 - nFadeRate));
385 
387  new drawinglayer::primitive2d::ModifiedColorPrimitive2D(aSeq, aBColorModifier));
388 
389  pProcessor->process(aGhostedSeq);
390 }
391 
393 {
394  bool bResult = true;
395 
396  // Actually check it
398 
399  bool const bFirst(GetPageFrame()->OnFirstPage());
400  const SwFrameFormat *const pFormat = (GetPageFrame()->OnRightPage())
401  ? pDesc->GetRightFormat(bFirst)
402  : pDesc->GetLeftFormat(bFirst);
403 
404  if ( pFormat )
405  {
406  if ( m_bIsHeader )
407  bResult = !pFormat->GetHeader().IsActive();
408  else
409  bResult = !pFormat->GetFooter().IsActive();
410  }
411 
412  return bResult;
413 }
414 
415 void SwHeaderFooterWin::ExecuteCommand(const OString& rIdent)
416 {
417  SwView& rView = GetEditWin()->GetView();
418  SwWrtShell& rSh = rView.GetWrtShell();
419 
420  const OUString& rStyleName = GetPageFrame()->GetPageDesc()->GetName();
421  if (rIdent == "edit")
422  {
423  OString sPageId = m_bIsHeader ? OString("header") : OString("footer");
424  rView.GetDocShell()->FormatPage(rStyleName, sPageId, rSh);
425  }
426  else if (rIdent == "borderback")
427  {
429  const SwFrameFormat& rMaster = pDesc->GetMaster();
430  SwFrameFormat* pHFFormat = const_cast< SwFrameFormat* >( rMaster.GetFooter().GetFooterFormat() );
431  if ( m_bIsHeader )
432  pHFFormat = const_cast< SwFrameFormat* >( rMaster.GetHeader().GetHeaderFormat() );
433  SfxItemSet aSet( pHFFormat->GetAttrSet() );
434 
435  // Items to hand over XPropertyList things like XColorList,
436  // XHatchList, XGradientList, and XBitmapList to the Area TabPage:
437  aSet.MergeRange( SID_COLOR_TABLE, SID_PATTERN_LIST );
438  // create needed items for XPropertyList entries from the DrawModel so that
439  // the Area TabPage can access them
441 
443  {
444  pHFFormat->SetFormatAttr( aSet );
445  rView.GetDocShell()->SetModified();
446  }
447  }
448  else if (rIdent == "delete")
449  {
450  rSh.ChangeHeaderOrFooter( rStyleName, m_bIsHeader, false, true );
451  // warning: "this" may be disposed now
452  rSh.GetWin()->GrabFocusToDocument();
453  }
454  else if (rIdent == "insert_pagenumber")
455  {
456  SfxViewFrame* pVFrame = rSh.GetView().GetViewFrame();
458  }
459  else if (rIdent == "insert_pagecount")
460  {
461  SfxViewFrame* pVFrame = rSh.GetView().GetViewFrame();
463  }
464 }
465 
466 void SwHeaderFooterWin::SetReadonly( bool bReadonly )
467 {
468  ShowAll( !bReadonly );
469 }
470 
472 {
473  if (IsEmptyHeaderFooter())
474  {
475  SwView& rView = GetEditWin()->GetView();
476  SwWrtShell& rSh = rView.GetWrtShell();
477 
478  const OUString& rStyleName = GetPageFrame()->GetPageDesc()->GetName();
479  rSh.ChangeHeaderOrFooter( rStyleName, m_bIsHeader, true, false );
480  }
481  else
483 }
484 
486 {
488 }
489 
491 {
492  if (m_bIsAppearing && m_nFadeRate > 0)
493  m_nFadeRate -= 25;
494  else if (!m_bIsAppearing && m_nFadeRate < 100)
495  m_nFadeRate += 25;
496 
497  if (m_nFadeRate != 100 && !IsVisible())
498  {
499  Show();
500  m_pLine->Show();
501  }
502  else if (m_nFadeRate == 100 && IsVisible())
503  {
504  Show(false);
505  m_pLine->Show(false);
506  }
507  else
508  Invalidate();
509 
510  if (IsVisible() && m_nFadeRate > 0 && m_nFadeRate < 100)
511  m_aFadeTimer.Start();
512 }
513 
514 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual Point GetPosPixel() const
SfxViewFrame * GetViewFrame() const
double getCenterY() const
#define FN_INSERT_FLD_PGCOUNT
Definition: cmdid.h:250
Base class of the Writer layout elements.
Definition: frame.hxx:295
long GetWidth() const
SwHeaderFooterWin(SwEditWin *pEditWin, const SwFrame *pFrame, bool bHeader)
void append(const basegfx::B2DPoint &rPoint, sal_uInt32 nCount)
virtual void SetModified(bool=true) override
Definition: docsh2.cxx:1402
BColor rgb2hsl(const BColor &rRGBColor)
const Color & GetDialogColor() const
constexpr::Color COL_BLACK(0x00, 0x00, 0x00)
virtual void dispose() override
const SwFormatHeader & GetHeader(bool=true) const
Definition: fmthdft.hxx:97
static Color & GetHeaderFooterMarkColor()
Definition: viewopt.cxx:447
long Height() const
void ChangeHeaderOrFooter(const OUString &rStyleName, bool bHeader, bool bOn, bool bShowWarning)
Definition: wrtsh1.cxx:1788
const SwView & GetView() const
Definition: edtwin.hxx:239
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
double getX() const
#define FN_INSERT_FLD_PGNUMBER
Definition: cmdid.h:249
virtual Size GetSizePixel() const
void appendBezierSegment(const basegfx::B2DPoint &rNextControlPoint, const basegfx::B2DPoint &rPrevControlPoint, const basegfx::B2DPoint &rPoint)
sal_uInt16 sal_Char sal_Char * pDesc
double getZ() const
double getY() const
void SetReadonly(bool bReadonly) override
virtual void ShowAll(bool bShow) override
virtual ~SwHeaderFooterWin() override
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
#define BUTTON_WIDTH
void SetMapMode()
double getMaxX() const
static basegfx::BColor lcl_GetFillColor(const basegfx::BColor &rLineColor, double aLuminance)
attribute::FontAttribute getFontAttributeFromVclFont(basegfx::B2DVector &o_rSize, const vcl::Font &rFont, bool bRTL, bool bBiDiStrong)
const OUString & GetName() const
Definition: pagedesc.hxx:186
bool GetTextBoundRect(tools::Rectangle &rRect, const OUString &rStr, sal_Int32 nBase=0, sal_Int32 nIndex=0, sal_Int32 nLen=-1, sal_uLong nLayoutWidth=0, const long *pDXArray=nullptr, const SalLayoutGlyphs *pGlyphs=nullptr) const
SwWrtShell & GetWrtShell() const
Definition: view.hxx:400
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
Definition: doc.cxx:187
bool IsActive() const
Definition: fmthdft.hxx:89
bool IsActive() const
Used by the UI to modify the document model.
Definition: wrtsh.hxx:88
bool ShowBorderBackgroundDlg(weld::Window *pParent, SfxItemSet *pBBSet)
weld::Window * GetFrameWeld() const
#define TEXT_PADDING
virtual void dispose() override
const SwView & GetView() const
Definition: wrtsh.hxx:426
void setX(long nX)
std::shared_ptr< BColorModifier > BColorModifierSharedPtr
const vcl::Font & GetFont() const
bool GetHighContrastMode() const
bool OnRightPage() const
Definition: frame.hxx:711
B2DHomMatrix createScaleTranslateB2DHomMatrix(double fScaleX, double fScaleY, double fTranslateX, double fTranslateY)
FontMetric GetFontMetric() const
SwDoc * GetDoc() const
Definition: viewsh.hxx:284
bool Execute(sal_uInt16 nSlot, const SfxPoolItem **pArgs=nullptr, SfxCallMode nCall=SfxCallMode::SLOT)
VclPtr< PopupMenu > m_pPopupMenu
BColor hsl2rgb(const BColor &rHSLColor)
bool IsHeaderShared() const
Definition: pagedesc.hxx:295
IMPL_LINK_NOARG(SwHeaderFooterWin, FadeHandler, Timer *, void)
Style of a layout element.
Definition: frmfmt.hxx:57
const vcl::Font & GetToolFont() const
const SwFrameFormat * GetFooterFormat() const
Definition: fmthdft.hxx:85
OString const & GetCurItemIdent() const
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
Definition: edtwin.hxx:58
static void PaintButton(drawinglayer::primitive2d::Primitive2DContainer &rSeq, const tools::Rectangle &rRect, bool bOnTop)
SwFrameFormat * GetLeftFormat(bool const bFirst=false)
Definition: pagedesc.cxx:361
SfxBindings & GetBindings()
SwPageDesc * GetPageDesc()
Definition: pagefrm.hxx:129
sal_uInt16 GetItemId(sal_uInt16 nPos) const
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
const SwFormatFooter & GetFooter(bool=true) const
Definition: fmthdft.hxx:99
static bool GetLayoutRTL()
virtual void Start() override
void GrabFocusToDocument()
bool IsInside(const Point &rPOINT) const
virtual bool Contains(const Point &rDocPt) const override
Returns true if the point is inside the control.
Class sharing some MenuButton code.
B2DPolygon interpolate(const B2DPolygon &rOld1, const B2DPolygon &rOld2, double t)
OUString SwResId(const char *pId)
Definition: swmodule.cxx:191
long GetAscent() const
#define BOX_DISTANCE
void SetTimeout(sal_uInt64 nTimeoutMs)
void PutAreaListItems(SfxItemSet &rSet) const
Put needed items for XPropertyList entries from the DrawModel.
Definition: drawdoc.cxx:138
long X() const
SwDocShell * GetDocShell()
Definition: view.cxx:1115
static bool IsInExecute()
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
void transform(const basegfx::B2DHomMatrix &rMatrix)
double getCenterX() const
basegfx::B2DRange b2DRectangleFromRectangle(const ::tools::Rectangle &rRect)
Class for the header and footer separator control window.
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)
virtual bool SetFormatAttr(const SfxPoolItem &rAttr)
Definition: format.cxx:460
SwFrameFormat & GetMaster()
Definition: pagedesc.hxx:216
void SetOffset(Point aOffset, long nXLineStart, long nXLineEnd)
void setClosed(bool bNew)
void disposeBuilder()
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
void Stop()
vcl::Window * GetWin() const
Definition: viewsh.hxx:340
B2DHomMatrix createRotateAroundPoint(double fPointX, double fPointY, double fRadiant)
void ExecuteCommand(const OString &rIdent)
SwFrameFormat * GetRightFormat(bool const bFirst=false)
Layout uses the following methods to obtain a format in order to be able to create a page...
Definition: pagedesc.cxx:368
void SetPopupMenu(PopupMenu *pNewMenu)
static VclPtr< reference_type > Create(Arg &&...arg)
VclPtr< vcl::Window > m_pLine
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
void SetInvokeHandler(const Link< Timer *, void > &rLink)
css::uno::Reference< css::graphic::XPrimitive2D > Primitive2DReference
void SetZOrder(vcl::Window *pRefWindow, ZOrderFlags nFlags)
constexpr::Color COL_WHITE(0xFF, 0xFF, 0xFF)
basegfx::BColor getBColor() const
bool OnFirstPage() const
Definition: trvlfrm.cxx:1760
const SwPageFrame * GetPageFrame()
double getMinX() const
virtual void Select() override
bool IsFirstShared() const
Definition: pagedesc.cxx:375
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:116
void FormatPage(const OUString &rPage, const OString &rPageId, SwWrtShell &rActShell, SfxRequest *pRequest=nullptr)
Show page style format dialog.
Definition: docst.cxx:1433
bool IsActive() const
Definition: fmthdft.hxx:58
void SetZoomedPointFont(vcl::RenderContext &rRenderContext, const vcl::Font &rFont)
const Color & GetDialogTextColor() const
virtual SwEditWin * GetEditWin() override
sal_Int32 nPos
void setZ(double fZ)
Definition: view.hxx:146
long Y() const
const SwFrameFormat * GetHeaderFormat() const
Definition: fmthdft.hxx:54
long GetLineHeight() const
void SetItemText(sal_uInt16 nItemId, const OUString &rStr)