LibreOffice Module sw (master)
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
sw
source
uibase
inc
uitool.hxx
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
* This file is part of the LibreOffice project.
4
*
5
* This Source Code Form is subject to the terms of the Mozilla Public
6
* License, v. 2.0. If a copy of the MPL was not distributed with this
7
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
*
9
* This file incorporates work covered by the following license notice:
10
*
11
* Licensed to the Apache Software Foundation (ASF) under one or more
12
* contributor license agreements. See the NOTICE file distributed
13
* with this work for additional information regarding copyright
14
* ownership. The ASF licenses this file to you under the Apache
15
* License, Version 2.0 (the "License"); you may not use this file
16
* except in compliance with the License. You may obtain a copy of
17
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
18
*/
19
#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_UITOOL_HXX
20
#define INCLUDED_SW_SOURCE_UIBASE_INC_UITOOL_HXX
21
22
#include <
vcl/weld.hxx
>
23
#include <
vcl/menu.hxx
>
24
#include <
swtypes.hxx
>
25
#include <
swdllapi.h
>
26
27
class
SfxItemSet
;
28
class
SwPageDesc
;
29
class
SvxTabStopItem
;
30
class
SwWrtShell
;
31
class
ListBox
;
32
namespace
weld
{
class
ComboBox
; }
33
class
SwDocShell
;
34
class
SwFrameFormat
;
35
class
SwTabCols
;
36
class
DateTime
;
37
class
SfxViewFrame
;
38
class
SwEditShell
;
39
40
// fill BoxInfo attribute
41
SW_DLLPUBLIC
void
PrepareBoxInfo
(
SfxItemSet
& rSet,
const
SwWrtShell
& rSh);
42
49
SW_DLLPUBLIC
void
ConvertAttrCharToGen
(
SfxItemSet
& rSet,
bool
bPara =
false
);
50
59
SW_DLLPUBLIC
void
ConvertAttrGenToChar
(
SfxItemSet
& rSet,
const
SfxItemSet
& rOrigSet,
bool
bPara =
false
);
60
61
70
void
ApplyCharBackground
(
const
Color
& rBackgroundColor,
SwWrtShell
& rShell);
71
72
// SfxItemSets <-> PageDesc
73
void
ItemSetToPageDesc
(
const
SfxItemSet
& rSet,
SwPageDesc
& rPageDesc );
74
void
PageDescToItemSet
(
const
SwPageDesc
& rPageDesc,
SfxItemSet
& rSet);
75
76
// fill tabs with default tabs
77
SW_DLLPUBLIC
void
MakeDefTabs
(
SwTwips
nDefDist,
SvxTabStopItem
& rTabs);
78
79
// erase DefaultTabs from TabStopArray
80
//void EraseDefTabs(SvxTabStopItem& rTabs);
81
82
// determine space between 1st and 2nd element
83
SW_DLLPUBLIC
SwTwips
GetTabDist
(
const
SvxTabStopItem
& rTabs);
84
85
// determine whether a Sfx-PageDesc combination exists in the set
86
// and set this in the set and delete the transport items
87
// (PageBreak & PageModel) from the set
88
void
SwToSfxPageDescAttr
(
SfxItemSet
& rSet );
89
void
SfxToSwPageDescAttr
(
const
SwWrtShell
& rShell,
SfxItemSet
& rSet );
90
91
SW_DLLPUBLIC
FieldUnit
GetDfltMetric
(
bool
bWeb);
92
void
SetDfltMetric
(
FieldUnit
eMetric,
bool
bWeb);
93
94
bool
HasCharUnit
(
bool
bWeb );
95
void
SetApplyCharUnit
(
bool
bApplyChar,
bool
bWeb);
96
97
// fill ListBox with all char style templates, except the standard ones
98
SW_DLLPUBLIC
void
FillCharStyleListBox
(
weld::ComboBox
& rToFill,
SwDocShell
* pDocSh,
bool
bSorted =
false
,
bool
bWithDefault =
false
);
99
100
//inserts a string sorted into a ListBox,
101
SW_DLLPUBLIC
void
InsertStringSorted
(
const
OUString& rId,
const
OUString& rEntry,
weld::ComboBox
& rToFill,
int
nOffset);
102
103
// Get table width and alignment
104
SwTwips
GetTableWidth
(
SwFrameFormat
const
* pFormat,
SwTabCols
const
& rCols, sal_uInt16 *pPercent,
105
SwWrtShell
* pSh );
106
107
OUString
GetAppLangDateTimeString
(
const
DateTime
& );
108
109
// search for a command string within the menu structure and execute it
110
// at the dispatcher if there is one, if executed return true
111
bool
ExecuteMenuCommand
(
PopupMenu
const
& rMenu,
SfxViewFrame
const
& rViewFrame, sal_uInt16 nId );
112
113
#endif // INCLUDED_SW_SOURCE_UIBASE_INC_UITOOL_HXX
114
115
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewFrame
FieldUnit
FieldUnit
DateTime
ItemSetToPageDesc
void ItemSetToPageDesc(const SfxItemSet &rSet, SwPageDesc &rPageDesc)
Definition:
uitool.cxx:269
SwToSfxPageDescAttr
void SwToSfxPageDescAttr(SfxItemSet &rSet)
Definition:
uitool.cxx:686
GetTableWidth
SwTwips GetTableWidth(SwFrameFormat const *pFormat, SwTabCols const &rCols, sal_uInt16 *pPercent, SwWrtShell *pSh)
Definition:
uitool.cxx:792
PopupMenu
FillCharStyleListBox
SW_DLLPUBLIC void FillCharStyleListBox(weld::ComboBox &rToFill, SwDocShell *pDocSh, bool bSorted=false, bool bWithDefault=false)
Definition:
uitool.cxx:751
ListBox
ConvertAttrCharToGen
SW_DLLPUBLIC void ConvertAttrCharToGen(SfxItemSet &rSet, bool bPara=false)
Convert character specific attributes to general ones used by tab pages.
Definition:
uitool.cxx:104
GetTabDist
SW_DLLPUBLIC SwTwips GetTabDist(const SvxTabStopItem &rTabs)
Definition:
uitool.cxx:619
swtypes.hxx
SfxToSwPageDescAttr
void SfxToSwPageDescAttr(const SwWrtShell &rShell, SfxItemSet &rSet)
Definition:
uitool.cxx:625
GetAppLangDateTimeString
OUString GetAppLangDateTimeString(const DateTime &)
Definition:
uitool.cxx:833
HasCharUnit
bool HasCharUnit(bool bWeb)
Definition:
uitool.cxx:843
ApplyCharBackground
void ApplyCharBackground(const Color &rBackgroundColor, SwWrtShell &rShell)
Apply character background on the shell.
Definition:
uitool.cxx:186
SwWrtShell
Used by the UI to modify the document model.
Definition:
wrtsh.hxx:91
SwFrameFormat
Style of a layout element.
Definition:
frmfmt.hxx:58
GetDfltMetric
SW_DLLPUBLIC FieldUnit GetDfltMetric(bool bWeb)
Definition:
uitool.cxx:726
SwTabCols
Definition:
tabcol.hxx:41
InsertStringSorted
SW_DLLPUBLIC void InsertStringSorted(const OUString &rId, const OUString &rEntry, weld::ComboBox &rToFill, int nOffset)
Definition:
uitool.cxx:738
SfxItemSet
SwPageDesc
Definition:
pagedesc.hxx:138
SwDocShell
Definition:
docsh.hxx:67
SetApplyCharUnit
void SetApplyCharUnit(bool bApplyChar, bool bWeb)
Definition:
uitool.cxx:848
SW_DLLPUBLIC
#define SW_DLLPUBLIC
Definition:
swdllapi.h:28
ConvertAttrGenToChar
SW_DLLPUBLIC void ConvertAttrGenToChar(SfxItemSet &rSet, const SfxItemSet &rOrigSet, bool bPara=false)
Convert general attributes to the corresponding character attributes.
Definition:
uitool.cxx:141
MakeDefTabs
SW_DLLPUBLIC void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem &rTabs)
Definition:
uitool.cxx:607
SwTwips
tools::Long SwTwips
Definition:
swtypes.hxx:49
weld::ComboBox
PageDescToItemSet
void PageDescToItemSet(const SwPageDesc &rPageDesc, SfxItemSet &rSet)
Definition:
uitool.cxx:428
weld
swdllapi.h
ExecuteMenuCommand
bool ExecuteMenuCommand(PopupMenu const &rMenu, SfxViewFrame const &rViewFrame, sal_uInt16 nId)
Definition:
uitool.cxx:853
Color
menu.hxx
ComboBox
PrepareBoxInfo
SW_DLLPUBLIC void PrepareBoxInfo(SfxItemSet &rSet, const SwWrtShell &rSh)
Definition:
uitool.cxx:79
weld.hxx
SetDfltMetric
void SetDfltMetric(FieldUnit eMetric, bool bWeb)
Definition:
uitool.cxx:733
SvxTabStopItem
SwEditShell
Definition:
editsh.hxx:138
Generated on Thu Apr 15 2021 20:39:36 for LibreOffice Module sw (master) by
1.8.10