55#define BOX_DISTANCE 10
56#define BUTTON_WIDTH 18
67 double nLuminance = aHslLine.
getZ() * 2.5;
68 if ( nLuminance == 0 )
70 else if ( nLuminance >= 1.0 )
71 nLuminance = aHslLine.
getZ() * 0.4;
72 aHslLine.
setZ( nLuminance );
79 double nLuminance = aHslDark.
getZ() * 255 + 20;
80 aHslDark.
setZ( nLuminance / 255.0 );
84 B2DPolygon lcl_GetPolygon( const ::tools::Rectangle& rRect,
bool bOnTop )
86 const double nRadius = 3;
87 const double nKappa((M_SQRT2 - 1.0) * 4.0 / 3.0);
93 B2DPoint aCorner( rRect.Left(), rRect.Bottom() );
94 B2DPoint aStart( rRect.Left(), rRect.Bottom() - nRadius );
95 B2DPoint aEnd( rRect.Left() + nRadius, rRect.Bottom() );
104 B2DPoint aCorner( rRect.Right(), rRect.Bottom() );
105 B2DPoint aStart( rRect.Right() - nRadius, rRect.Bottom() );
106 B2DPoint aEnd( rRect.Right(), rRect.Bottom() - nRadius );
107 aPolygon.
append( aStart );
132 B2DPolygon aPolygon = lcl_GetPolygon(rRect, bOnTop);
137 basegfx::BColor aLighterColor = lcl_GetLighterGradientColor(aFillColor);
151 double nAngle = M_PI;
168 , m_pEditWin(pEditWin)
170 , m_bIsHeader(bHeader)
186 m_pWin->SetZOrder(
this, ZOrderFlags::Before);
215 Point aLinePos(nXLineStart, aOffset.
Y());
216 Size aLineSize(nXLineEnd - nXLineStart, 1);
225 else if (
m_pWin && !bOnScreen)
229 m_pWin->SetOffset(aOffset);
233 InterimItemWindow(pEditWin,
"modules/swriter/ui/hfmenubutton.ui",
"HFMenuButton"),
234 m_xMenuButton(m_xBuilder->weld_menu_button(
"menubutton")),
235 m_xPushButton(m_xBuilder->weld_button(
"button")),
236 m_pEditWin(pEditWin),
238 m_bIsHeader( bHeader ),
239 m_bIsAppearing( false ),
241 m_aFadeTimer(
"SwHeaderFooterWin m_aFadeTimer")
291 : bIsLeft ?
SwResId(STR_LEFT_FOOTER_TITLE)
292 : bIsRight ?
SwResId(STR_RIGHT_FOOTER_TITLE)
296 : bIsLeft ?
SwResId(STR_LEFT_HEADER_TITLE)
297 : bIsRight ?
SwResId(STR_RIGHT_HEADER_TITLE)
314 nYFooterOff = aBoxSize.
Height();
317 aOffset.
Y() - nYFooterOff);
373 double(aTextPos.
X()),
double(aTextPos.
Y())));
378 std::vector<double>(), {}, std::move(aFontAttr), css::lang::Locale(), aLineColor)));
382 B2DVector(aRect.Right(), aRect.getOpenHeight()));
386 if (bIsEmptyHeaderFooter)
391 double nHalfW = ( nRight - nLeft ) / 2.0;
393 double nTop = aSignArea.
getCenterY() - nHalfW;
394 double nBottom = aSignArea.
getCenterY() + nHalfW;
432 std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor(
446 pProcessor->process(aGhostedSeq);
448 if (bIsEmptyHeaderFooter)
490 if (rIdent ==
u"edit")
492 OUString sPageId =
m_bIsHeader ? OUString(
"header") : OUString(
"footer");
495 else if (rIdent ==
u"borderback")
506 aSet.
MergeRange( SID_COLOR_TABLE, SID_PATTERN_LIST );
511 aSet.
MergeRange(SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER);
513 std::shared_ptr<SvxBoxInfoItem> aBoxInfo(std::make_shared<SvxBoxInfoItem>(SID_ATTR_BORDER_INNER));
515 aBoxInfo.reset(pBoxInfo->Clone());
517 aBoxInfo->SetTable(
false);
518 aBoxInfo->SetDist(
true);
519 aBoxInfo->SetMinDist(
false);
521 aBoxInfo->SetValid(SvxBoxInfoItemValidFlags::DISABLE);
530 else if (rIdent ==
u"delete")
536 else if (rIdent ==
u"insert_pagenumber")
541 else if (rIdent ==
u"insert_pagecount")
550 SwView& rView = m_pEditWin->GetView();
559 if (xThis->isDisposed())
562 m_xPushButton->hide();
563 m_xMenuButton->show();
569 ExecuteCommand(rIdent);
574 if (m_bIsAppearing && m_nFadeRate > 0)
576 else if (!m_bIsAppearing && m_nFadeRate < 100)
579 if (m_nFadeRate != 100 && !IsVisible())
583 else if (m_nFadeRate == 100 && IsVisible())
590 if (IsVisible() && m_nFadeRate > 0 && m_nFadeRate < 100)
591 m_aFadeTimer.Start();
const StyleSettings & GetStyleSettings() const
static bool GetLayoutRTL()
static const AllSettings & GetSettings()
basegfx::BColor getBColor() const
tools::Long GetLineHeight() const
tools::Long GetAscent() const
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
virtual void dispose() override
constexpr tools::Long Y() const
void setX(tools::Long nX)
constexpr tools::Long X() const
bool Execute(sal_uInt16 nSlot, const SfxPoolItem **pArgs=nullptr, SfxCallMode nCall=SfxCallMode::SLOT)
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void MergeRange(sal_uInt16 nFrom, sal_uInt16 nTo)
SfxBindings & GetBindings()
weld::Window * GetFrameWeld() const
SfxViewFrame & GetViewFrame() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
const Color & GetDialogTextColor() const
bool GetHighContrastMode() const
const Color & GetDialogColor() const
Class for displaying a dashed line in the Writer GUI.
void FormatPage(weld::Window *pDialogParent, const OUString &rPage, const OUString &rPageId, SwWrtShell &rActShell, SfxRequest *pRequest=nullptr)
Show page style format dialog.
virtual void SetModified(bool=true) override
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
void PutAreaListItems(SfxItemSet &rSet) const
Put needed items for XPropertyList entries from the DrawModel.
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
Base class of the Writer layout elements.
const OUString & GetName() const
SwFrameFormat & GetMaster()
bool IsHeaderShared() const
bool IsFirstShared() const
SwFrameFormat * GetRightFormat(bool const bFirst=false)
Layout uses the following methods to obtain a format in order to be able to create a page.
SwFrameFormat * GetLeftFormat(bool const bFirst=false)
A page of the document layout.
SwPageDesc * GetPageDesc()
const Color & GetHeaderFooterMarkColor() const
static const SwViewOption & GetCurrentViewOptions()
vcl::Window * GetWin() const
SwWrtShell & GetWrtShell() const
SwDocShell * GetDocShell()
Used by the UI to modify the document model.
void ChangeHeaderOrFooter(std::u16string_view rStyleName, bool bHeader, bool bOn, bool bShowWarning)
const SwView & GetView() const
void SetTimeout(sal_uInt64 nTimeoutMs)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
virtual void Start(bool bStartTimer=true) override
reference_type * get() const
static VclPtr< reference_type > Create(Arg &&... arg)
void transform(const basegfx::B2DHomMatrix &rMatrix)
void append(const basegfx::B2DPoint &rPoint, sal_uInt32 nCount)
void setClosed(bool bNew)
void appendBezierSegment(const basegfx::B2DPoint &rNextControlPoint, const basegfx::B2DPoint &rPrevControlPoint, const basegfx::B2DPoint &rPoint)
double getCenterX() const
double getCenterY() const
Point LogicToPixel(const Point &rLogicPt) const
virtual Point GetPosPixel() const
void GrabFocusToDocument()
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
virtual Size GetSizePixel() const
weld::Window * GetFrameWeld() const
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
#define FN_INSERT_FLD_PGNUMBER
#define FN_INSERT_FLD_PGCOUNT
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
#define LINK(Instance, Class, Member)
Sequence< sal_Int8 > aSeq
B2DHomMatrix createScaleTranslateB2DHomMatrix(double fScaleX, double fScaleY, double fTranslateX, double fTranslateY)
B2DHomMatrix createRotateAroundPoint(double fPointX, double fPointY, double fRadiant)
BColor rgb2hsl(const BColor &rRGBColor)
BColor hsl2rgb(const BColor &rHSLColor)
std::shared_ptr< BColorModifier > BColorModifierSharedPtr
rtl::Reference< BasePrimitive2D > Primitive2DReference
attribute::FontAttribute getFontAttributeFromVclFont(basegfx::B2DVector &o_rSize, const vcl::Font &rFont, bool bRTL, bool bBiDiStrong)
std::unique_ptr< BaseProcessor2D > createProcessor2DFromOutputDevice(OutputDevice &rTargetOutDev, const drawinglayer::geometry::ViewInformation2D &rViewInformation2D)
HSLColor interpolate(const HSLColor &rFrom, const HSLColor &rTo, double t, bool bCCW)
bool ShowBorderBackgroundDlg(weld::Window *pParent, SfxItemSet *pBBSet)
OUString SwResId(TranslateId aId)
constexpr SwTwips MIN_BORDER_DIST