28 m_pEditWin( pEditWin )
45 SwFrameControlPtrMap::iterator aIt = rControls.find(pFrame);
47 if (aIt != rControls.end())
71 rCtrl.second->ShowAll(
false );
77 for (
auto& rCtrl : rEntry.second )
78 rCtrl.second->SetReadonly( bReadonly );
91 SwFrameControlPtrMap::iterator lb = rControls.lower_bound(pPageFrame);
92 if (lb != rControls.end() && !(rControls.key_comp()(pPageFrame, lb->first)))
93 pControl = lb->second;
100 pNewControl->SetReadonly( pViewOpt->
IsReadonly() );
101 rControls.insert(lb, make_pair(pPageFrame, pNewControl));
102 pControl.swap( pNewControl );
105 tools::Rectangle aPageRect = m_pEditWin->LogicToPixel( pPageFrame->getFrameArea().SVRect() );
108 assert( pWin !=
nullptr) ;
109 assert( pWin->
IsHeader() == bHeader );
113 pControl->ShowAll(
true );
123 SwFrameControlPtrMap::iterator lb = rControls.lower_bound(pPageFrame);
124 if (lb != rControls.end() && !(rControls.key_comp()(pPageFrame, lb->first)))
125 pControl = lb->second;
131 pNewControl->SetReadonly( pViewOpt->
IsReadonly() );
133 rControls.insert(lb, make_pair(pPageFrame, pNewControl));
135 pControl.swap( pNewControl );
139 assert (pWin !=
nullptr);
142 pControl->ShowAll(
true );
147 if(pFlyFrame ==
nullptr)
155 SwFrameControlPtrMap::iterator lb = rControls.lower_bound(pFlyFrame);
156 if (lb != rControls.end() && !(rControls.key_comp()(pFlyFrame, lb->first)))
157 pControl = lb->second;
165 pNewControl->SetReadonly( pViewOpt->
IsReadonly() );
167 rControls.insert(lb, make_pair(pFlyFrame, pNewControl));
169 pControl.swap( pNewControl );
173 assert(pButton !=
nullptr);
175 pControl->ShowAll( bShow );
185 SwFrameControlPtrMap::iterator it = rControls.find(
nullptr);
186 if (it != rControls.end())
187 pControl = it->second;
190 pControl = std::make_shared<SwFrameControl>(
193 pControl->SetReadonly(pViewOpt->
IsReadonly());
194 rControls[
nullptr] = pControl;
199 pButton->SetOffset(aTopLeftPixel);
200 pButton->SetContentControl(pContentControl);
201 pControl->ShowAll(
true);
205 const OUString& rUIXMLDescription,
const OUString& rID)
207 , m_pEditWin(pEditWin)
219 SwFrameControlPtrMap::iterator lb = rControls.lower_bound(pContentFrame);
220 if (lb != rControls.end() && !(rControls.key_comp()(pContentFrame, lb->first)))
222 pControl = lb->second;
229 rControls.insert(lb, make_pair(pContentFrame, pNewControl));
230 pControl.swap(pNewControl);
234 assert(pWin !=
nullptr);
281 assert(
static_cast<bool>(pWindow));
283 mpIFace =
dynamic_cast<ISwFrameControl *
>( pWindow.
get() );
292ISwFrameControl::~ISwFrameControl()
std::map< const SwFrame *, SwFrameControlPtr > SwFrameControlPtrMap
std::shared_ptr< SwFrameControl > SwFrameControlPtr
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
virtual void dispose() override
const vcl::Font & GetToolFont() const
const SwFrame * GetAnchorFrame() const
Class for the page break control window.
void UpdatePosition(const std::optional< Point > &xEvtPt=std::optional< Point >())
In case the content control has an alias/title, this widget shows it above the top left corner of the...
Stores the properties of a content control.
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
general base class for all free-flowing frames
SwFrameControl(const VclPtr< vcl::Window > &pWindow)
ISwFrameControl * mpIFace
VclPtr< vcl::Window > mxWindow
~SwFrameControlsManager()
void HideControls(FrameControlType eType)
void SetReadonlyControls(bool bReadonly)
std::map< FrameControlType, SwFrameControlPtrMap > m_aControls
void SetHeaderFooterControl(const SwPageFrame *pPageFrame, FrameControlType eType, Point aOffset)
void SetContentControlAliasButton(SwContentControl *pContentControl, Point aTopLeftPixel)
void SetPageBreakControl(const SwPageFrame *pPageFrame)
void RemoveControlsByType(FrameControlType eType, const SwFrame *pFrame)
VclPtr< SwEditWin > m_pEditWin
void SetOutlineContentVisibilityButton(const SwContentFrame *pContentFrame)
void SetUnfloatTableButton(const SwFlyFrame *pFlyFrame, bool bShow, Point aTopRightPixel=Point())
SwFrameControlsManager(SwEditWin *pEditWin)
SwFrameControlPtr GetControl(FrameControlType eType, const SwFrame *pFrame)
void RemoveControls(const SwFrame *pFrame)
Base class of the Writer layout elements.
SwPageFrame * FindPageFrame()
ButtonSymbol GetSymbol() const
virtual void ShowAll(bool bShow) override
A page of the document layout.
void reset(reference_type *pBody)
reference_type * get() const
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
void SetPointFont(OutputDevice &rDevice, const vcl::Font &rFont)