LibreOffice Module svtools (master) 1
Namespaces | Macros | Functions | Variables
ctrlbox.cxx File Reference
#include <sal/config.h>
#include <config_folders.h>
#include <comphelper/lok.hxx>
#include <i18nutil/unicode.hxx>
#include <officecfg/Office/Common.hxx>
#include <tools/stream.hxx>
#include <vcl/customweld.hxx>
#include <vcl/event.hxx>
#include <vcl/svapp.hxx>
#include <vcl/fieldvalues.hxx>
#include <vcl/settings.hxx>
#include <vcl/image.hxx>
#include <vcl/virdev.hxx>
#include <vcl/weldutils.hxx>
#include <rtl/math.hxx>
#include <sal/macros.h>
#include <sal/log.hxx>
#include <comphelper/string.hxx>
#include <unotools/localedatawrapper.hxx>
#include <unotools/syslocale.hxx>
#include <svtools/borderline.hxx>
#include <svtools/sampletext.hxx>
#include <svtools/svtresid.hxx>
#include <svtools/strings.hrc>
#include <svtools/ctrlbox.hxx>
#include <svtools/ctrltool.hxx>
#include <svtools/borderhelper.hxx>
#include <svtools/valueset.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <editeng/borderline.hxx>
#include <rtl/bootstrap.hxx>
#include <borderline.hrc>
#include <stdio.h>
Include dependency graph for ctrlbox.cxx:

Go to the source code of this file.

Namespaces

namespace  svtools
 

Macros

#define IMGOUTERTEXTSPACE   5
 
#define EXTRAFONTSIZE   5
 
#define GAPTOEXTRAPREVIEW   10
 
#define MINGAPWIDTH   2
 

Functions

static double lcl_getGuessedWidth (tools::Long nTested, double nRate, bool bChanging)
 
static void lclDrawPolygon (OutputDevice &rDev, const basegfx::B2DPolygon &rPolygon, tools::Long nWidth, SvxBorderLineStyle nDashing)
 
static std::vector< double > svtools::GetDashing (SvxBorderLineStyle nDashing)
 Dashing array must start with a line width and end with a blank width. More...
 
std::vector< double > svtools::GetLineDashing (SvxBorderLineStyle nDashing, double fScale)
 
basegfx::B2DPolyPolygon svtools::ApplyLineDashing (const basegfx::B2DPolygon &rPolygon, SvxBorderLineStyle nDashing, double fScale)
 
void svtools::DrawLine (OutputDevice &rDev, const Point &rP1, const Point &rP2, sal_uInt32 nWidth, SvxBorderLineStyle nDashing)
 
void svtools::DrawLine (OutputDevice &rDev, const basegfx::B2DPoint &rP1, const basegfx::B2DPoint &rP2, sal_uInt32 nWidth, SvxBorderLineStyle nDashing)
 
 IMPL_LINK (FontNameBox, SettingsChangedHdl, VclSimpleEvent &, rEvent, void)
 
static bool IsRunningUnitTest ()
 
 IMPL_LINK_NOARG (FontNameBox, CustomGetSizeHdl, OutputDevice &, Size)
 
 IMPL_LINK_NOARG (FontNameBox, UpdateHdl, Timer *, void)
 
static void DrawPreview (const FontMetric &rFontMetric, const Point &rTopLeft, OutputDevice &rDevice, bool bSelected)
 
 IMPL_LINK (FontNameBox, CustomRenderHdl, weld::ComboBox::render_args, aPayload, void)
 
 IMPL_LINK (FontSizeBox, ReformatHdl, weld::Widget &, rWidget, void)
 
 IMPL_LINK (FontSizeBox, ModifyHdl, weld::ComboBox &, rBox, void)
 
 IMPL_LINK (SvtLineListBox, ToggleHdl, weld::Toggleable &, rButton, void)
 
 IMPL_LINK_NOARG (SvtLineListBox, StyleUpdatedHdl, weld::Widget &, void)
 
 IMPL_LINK_NOARG (SvtLineListBox, NoneHdl, weld::Button &, void)
 
 IMPL_LINK_NOARG (SvtLineListBox, ValueSelectHdl, ValueSet *, void)
 
 IMPL_LINK_NOARG (SvtCalendarBox, SelectHdl, weld::Calendar &, void)
 
 IMPL_LINK_NOARG (SvtCalendarBox, ActivateHdl, weld::Calendar &, void)
 

Variables

constexpr OUStringLiteral FONTNAMEBOXMRUENTRIESFILE = u"/user/config/fontnameboxmruentries"
 
static Size gUserItemSz
 
static int gFontNameBoxes
 
static size_t gPreviewsPerDevice
 
static std::vector< VclPtr< VirtualDevice > > gFontPreviewVirDevs
 
static std::vector< OUString > gRenderedFontNames
 

Macro Definition Documentation

◆ EXTRAFONTSIZE

#define EXTRAFONTSIZE   5

Definition at line 62 of file ctrlbox.cxx.

◆ GAPTOEXTRAPREVIEW

#define GAPTOEXTRAPREVIEW   10

Definition at line 63 of file ctrlbox.cxx.

◆ IMGOUTERTEXTSPACE

#define IMGOUTERTEXTSPACE   5

Definition at line 61 of file ctrlbox.cxx.

◆ MINGAPWIDTH

#define MINGAPWIDTH   2

Definition at line 64 of file ctrlbox.cxx.

Function Documentation

◆ DrawPreview()

static void DrawPreview ( const FontMetric rFontMetric,
const Point rTopLeft,
OutputDevice rDevice,
bool  bSelected 
)
static

◆ IMPL_LINK() [1/5]

IMPL_LINK ( FontNameBox  ,
CustomRenderHdl  ,
weld::ComboBox::render_args  ,
aPayload  ,
void   
)

◆ IMPL_LINK() [2/5]

IMPL_LINK ( FontNameBox  ,
SettingsChangedHdl  ,
VclSimpleEvent ,
rEvent  ,
void   
)

Definition at line 351 of file ctrlbox.cxx.

References GetData, gFontPreviewVirDevs, gRenderedFontNames, and pData.

◆ IMPL_LINK() [3/5]

IMPL_LINK ( FontSizeBox  ,
ModifyHdl  ,
weld::ComboBox ,
rBox  ,
void   
)

Definition at line 1032 of file ctrlbox.cxx.

References aStr, unicode::isSpace(), and comphelper::string::stripStart().

◆ IMPL_LINK() [4/5]

IMPL_LINK ( FontSizeBox  ,
ReformatHdl  ,
weld::Widget ,
rWidget  ,
void   
)

Definition at line 1018 of file ctrlbox.cxx.

References Application::GetSettings().

◆ IMPL_LINK() [5/5]

IMPL_LINK ( SvtLineListBox  ,
ToggleHdl  ,
weld::Toggleable ,
rButton  ,
void   
)

Definition at line 1447 of file ctrlbox.cxx.

References GrabFocus.

◆ IMPL_LINK_NOARG() [1/7]

IMPL_LINK_NOARG ( FontNameBox  ,
CustomGetSizeHdl  ,
OutputDevice ,
Size   
)

Definition at line 531 of file ctrlbox.cxx.

References gUserItemSz.

◆ IMPL_LINK_NOARG() [2/7]

IMPL_LINK_NOARG ( FontNameBox  ,
UpdateHdl  ,
Timer ,
void   
)

Definition at line 564 of file ctrlbox.cxx.

◆ IMPL_LINK_NOARG() [3/7]

IMPL_LINK_NOARG ( SvtCalendarBox  ,
ActivateHdl  ,
weld::Calendar ,
void   
)

Definition at line 1607 of file ctrlbox.cxx.

References m_xControl.

◆ IMPL_LINK_NOARG() [4/7]

IMPL_LINK_NOARG ( SvtCalendarBox  ,
SelectHdl  ,
weld::Calendar ,
void   
)

Definition at line 1601 of file ctrlbox.cxx.

◆ IMPL_LINK_NOARG() [5/7]

IMPL_LINK_NOARG ( SvtLineListBox  ,
NoneHdl  ,
weld::Button ,
void   
)

Definition at line 1459 of file ctrlbox.cxx.

◆ IMPL_LINK_NOARG() [6/7]

IMPL_LINK_NOARG ( SvtLineListBox  ,
StyleUpdatedHdl  ,
weld::Widget ,
void   
)

Definition at line 1453 of file ctrlbox.cxx.

◆ IMPL_LINK_NOARG() [7/7]

IMPL_LINK_NOARG ( SvtLineListBox  ,
ValueSelectHdl  ,
ValueSet ,
void   
)

Definition at line 1534 of file ctrlbox.cxx.

References m_xControl.

◆ IsRunningUnitTest()

static bool IsRunningUnitTest ( )
static

Definition at line 507 of file ctrlbox.cxx.

Referenced by FontNameBox::EnableWYSIWYG().

◆ lcl_getGuessedWidth()

static double lcl_getGuessedWidth ( tools::Long  nTested,
double  nRate,
bool  bChanging 
)
static

Definition at line 136 of file ctrlbox.cxx.

Referenced by BorderWidthImpl::GuessWidth().

◆ lclDrawPolygon()

static void lclDrawPolygon ( OutputDevice rDev,
const basegfx::B2DPolygon rPolygon,
tools::Long  nWidth,
SvxBorderLineStyle  nDashing 
)
static

Variable Documentation

◆ FONTNAMEBOXMRUENTRIESFILE

constexpr OUStringLiteral FONTNAMEBOXMRUENTRIESFILE = u"/user/config/fontnameboxmruentries"
constexpr

Definition at line 66 of file ctrlbox.cxx.

Referenced by FontNameBox::InitFontMRUEntriesFile().

◆ gFontNameBoxes

int gFontNameBoxes
static

Definition at line 332 of file ctrlbox.cxx.

Referenced by FontNameBox::FontNameBox(), and FontNameBox::~FontNameBox().

◆ gFontPreviewVirDevs

std::vector<VclPtr<VirtualDevice> > gFontPreviewVirDevs
static

Definition at line 334 of file ctrlbox.cxx.

Referenced by FontNameBox::CachePreview(), IMPL_LINK(), and FontNameBox::~FontNameBox().

◆ gPreviewsPerDevice

size_t gPreviewsPerDevice
static

Definition at line 333 of file ctrlbox.cxx.

Referenced by FontNameBox::CachePreview().

◆ gRenderedFontNames

std::vector<OUString> gRenderedFontNames
static

Definition at line 335 of file ctrlbox.cxx.

Referenced by FontNameBox::CachePreview(), IMPL_LINK(), and FontNameBox::~FontNameBox().

◆ gUserItemSz

Size gUserItemSz
static

Definition at line 331 of file ctrlbox.cxx.

Referenced by FontNameBox::CachePreview(), DrawPreview(), IMPL_LINK(), and IMPL_LINK_NOARG().

◆ mfScale

double mfScale
private

Definition at line 280 of file ctrlbox.cxx.