/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
if (!pWin->IsVisible())
pControl->ShowAll( true );
}
void SwFrameControlsManager::SetPageBreakControl( const SwPageFrame* pPageFrame )
{ // Check if we already have the control
SwFrameControlPtr pControl;
void SwFrameControlsManager::SetContentControlAliasButton(SwContentControl* pContentControl,
Point aTopLeftPixel)
{
SwFrameControlPtr pControl;
SwFrameControlPtrMap& rControls = m_aControls[FrameControlType::ContentControl]; // We don't really have a key, the SwPaM's mark decides what is the single content control in // this view that can have an alias button.
SwFrameControlPtrMap::iterator it = rControls.find(nullptr); if (it != rControls.end())
pControl = it->second; else
{
pControl = std::make_shared<SwFrameControl>(
VclPtr<SwContentControlAliasButton>::Create(m_pEditWin, pContentControl).get()); const SwViewOption* pViewOpt = m_pEditWin->GetView().GetWrtShell().GetViewOptions();
pControl->SetReadonly(pViewOpt->IsReadonly());
rControls[nullptr] = pControl;
}
auto pButton = dynamic_cast<SwContentControlAliasButton*>(pControl->GetWindow());
assert(pButton);
pButton->SetOffset(aTopLeftPixel);
pButton->SetContentControl(pContentControl);
pControl->ShowAll(true);
}
void SwFrameControlsManager::SetOutlineContentVisibilityButton(const SwContentFrame* pContentFrame)
{ // Check if we already have the control
SwFrameControlPtr pControl;
if (pWin->GetSymbol() == ButtonSymbol::SHOW)
pWin->Show(); // show the SHOW button immediately elseif (!pWin->IsVisible() && pWin->GetSymbol() == ButtonSymbol::HIDE)
pWin->ShowAll(true);
}
const SwPageFrame* SwFrameMenuButtonBase::GetPageFrame(const SwFrame* pFrame)
{ if (pFrame->IsPageFrame()) returnstatic_cast<const SwPageFrame*>(pFrame);
if (pFrame->IsFlyFrame()) returnstatic_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame()->FindPageFrame();
void SwFrameMenuButtonBase::SetVirDevFont(OutputDevice& rVirDev)
{ // Get the font and configure it
vcl::Font aFont = Application::GetSettings().GetStyleSettings().GetToolFont();
weld::SetPointFont(rVirDev, aFont);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.