/* -*- 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/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
// return pointer to active SmViewShell, if this is not possible // return 0 instead. //!! Since this method is based on the current focus it is somewhat //!! unreliable and may return unexpected 0 pointers!
SmViewShell * SmGetActiveView()
{
SfxViewShell *pView = SfxViewShell::Current();
SmViewShell* pSmView = dynamic_cast<SmViewShell*>(pView); if (!pSmView && comphelper::LibreOfficeKit::isActive())
{ auto* pWindow = static_cast<SmGraphicWindow*>(LokStarMathHelper(pView).GetGraphicWindow()); if (pWindow)
pSmView = &pWindow->GetGraphicWidget().GetView();
} return pSmView;
}
// check the requested size against minimum value constint nMinVal = o3tl::convert(2, o3tl::Length::pt, SmO3tlLengthUnit());
if (aSize.Height() < nMinVal)
aSize.setHeight( nMinVal );
//! we don't force a maximum value here because this may prevent eg the //! parentheses in "left ( ... right )" from matching up with large //! bodies (eg stack{...} with many entries). //! Of course this is holds only if characters are used and not polygons.
SmFace & operator *= (SmFace &rFace, const Fraction &rFrac) // scales the width and height of 'rFace' by 'rFrac' and returns a // reference to 'rFace'. // It's main use is to make scaling fonts look easier.
{ const Size &rFaceSize = rFace.GetFontSize();
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.