LibreOffice Module sw (master)  1
Macros | Functions
uitool.cxx File Reference
#include <hintids.hxx>
#include <osl/diagnose.h>
#include <tools/datetime.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
#include <unotools/collatorwrapper.hxx>
#include <svl/urihelper.hxx>
#include <svl/stritem.hxx>
#include <svl/grabbagitem.hxx>
#include <unotools/syslocale.hxx>
#include <sfx2/app.hxx>
#include <IDocumentStylePoolAccess.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
#include <editeng/pmdlitem.hxx>
#include <editeng/tstpitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/shaditem.hxx>
#include <editeng/sizeitem.hxx>
#include <editeng/brushitem.hxx>
#include <svx/pageitem.hxx>
#include <svx/svxids.hrc>
#include <editeng/lrspitem.hxx>
#include <svl/style.hxx>
#include <vcl/lstbox.hxx>
#include <unotools/localedatawrapper.hxx>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <comphelper/processfactory.hxx>
#include <sfx2/viewfrm.hxx>
#include <fmtornt.hxx>
#include <tabcol.hxx>
#include <edtwin.hxx>
#include <fmtfsize.hxx>
#include <fmthdft.hxx>
#include <fmtpdsc.hxx>
#include <wview.hxx>
#include <uiitems.hxx>
#include <docsh.hxx>
#include <wrtsh.hxx>
#include <swmodule.hxx>
#include <view.hxx>
#include <uitool.hxx>
#include <frmatr.hxx>
#include <paratr.hxx>
#include <fmtcol.hxx>
#include <poolfmt.hxx>
#include <usrpref.hxx>
#include <cmdid.h>
#include <globals.hrc>
#include <doc.hxx>
#include <docary.hxx>
#include <charfmt.hxx>
#include <SwStyleNameMapper.hxx>
#include <editsh.hxx>
Include dependency graph for uitool.cxx:

Go to the source code of this file.

Macros

#define MAXHEIGHT   28350
 
#define MAXWIDTH   28350
 

Functions

void SetMetric (MetricFormatter &rCtrl, FieldUnit eUnit)
 
void PrepareBoxInfo (SfxItemSet &rSet, const SwWrtShell &rSh)
 
void ConvertAttrCharToGen (SfxItemSet &rSet)
 Convert character specific attributes to general ones used by tab pages. More...
 
void ConvertAttrGenToChar (SfxItemSet &rSet, const SfxItemSet &rOrigSet)
 Convert general attributes to the corresponding character attributes. More...
 
void ApplyCharBackground (const Color &rBackgroundColor, SwWrtShell &rShell)
 Apply character background on the shell. More...
 
static void FillHdFt (SwFrameFormat *pFormat, const SfxItemSet &rSet)
 
static SvxPageUsage lcl_convertUseToSvx (UseOnPage nUse)
 Convert from UseOnPage to SvxPageUsage. More...
 
static UseOnPage lcl_convertUseFromSvx (SvxPageUsage nUse)
 Convert from SvxPageUsage to UseOnPage. More...
 
void ItemSetToPageDesc (const SfxItemSet &rSet, SwPageDesc &rPageDesc)
 
void PageDescToItemSet (const SwPageDesc &rPageDesc, SfxItemSet &rSet)
 
void MakeDefTabs (SwTwips nDefDist, SvxTabStopItem &rTabs)
 
SwTwips GetTabDist (const SvxTabStopItem &rTabs)
 
void SfxToSwPageDescAttr (const SwWrtShell &rShell, SfxItemSet &rSet)
 
void SwToSfxPageDescAttr (SfxItemSet &rCoreSet)
 
FieldUnit GetDfltMetric (bool bWeb)
 
void SetDfltMetric (FieldUnit eMetric, bool bWeb)
 
void InsertStringSorted (const OUString &rId, const OUString &rEntry, weld::ComboBox &rToFill, int nOffset)
 
void FillCharStyleListBox (weld::ComboBox &rToFill, SwDocShell *pDocSh, bool bSorted, bool bWithDefault)
 
SwTwips GetTableWidth (SwFrameFormat const *pFormat, SwTabCols const &rCols, sal_uInt16 *pPercent, SwWrtShell *pSh)
 
OUString GetAppLangDateTimeString (const DateTime &rDT)
 
bool HasCharUnit (bool bWeb)
 
void SetApplyCharUnit (bool bApplyChar, bool bWeb)
 
bool ExecuteMenuCommand (PopupMenu const &rMenu, SfxViewFrame const &rViewFrame, sal_uInt16 nId)
 

Macro Definition Documentation

#define MAXHEIGHT   28350

Definition at line 81 of file uitool.cxx.

Referenced by PageDescToItemSet().

#define MAXWIDTH   28350

Definition at line 82 of file uitool.cxx.

Referenced by PageDescToItemSet().

Function Documentation

void ApplyCharBackground ( const Color rBackgroundColor,
SwWrtShell rShell 
)

Apply character background on the shell.

Need to use this to hide the mixed character background and character highlighting attribute, which were added for MSO compatibility where there are two kind of character background.

Parameters
[in]rBackgroundColorthe color to apply on the shell
[in,out]rShellthe shell on which we apply the new attribute

Definition at line 203 of file uitool.cxx.

References SwEditShell::EndUndo(), SwEditShell::GetCurAttr(), SfxGrabBagItem::GetGrabBag(), SfxShell::GetPool(), SwWrtShell::GetView(), INSATTR, RES_CHRATR_BACKGROUND, RES_CHRATR_GRABBAG, RES_CHRATR_HIGHLIGHT, SwEditShell::SetAttrItem(), and SwEditShell::StartUndo().

Referenced by SwTextShell::Execute(), and SwEditWin::MouseButtonUp().

void ConvertAttrCharToGen ( SfxItemSet rSet)

Convert character specific attributes to general ones used by tab pages.

Parameters
[in,out]rSetthe set in which character attributes are stored

Definition at line 128 of file uitool.cxx.

References COL_TRANSPARENT(), SvxBrushItem::GetColor(), SfxItemSet::GetItemState(), SfxItemSet::GetRanges(), SfxItemSet::MergeRange(), SfxItemSet::Put(), RES_CHRATR_BACKGROUND, RES_CHRATR_HIGHLIGHT, and RES_PARATR_GRABBAG.

Referenced by SwEnvFormatPage::Edit(), SwDocShell::Edit(), and sw_CharDialog().

void ConvertAttrGenToChar ( SfxItemSet rSet,
const SfxItemSet rOrigSet 
)

Convert general attributes to the corresponding character attributes.

This method is used after executed a character dialog.

Parameters
[in,out]rSetthe set in which character attributes are stored
[in]rOrigSetoriginal itemset used as input for the dialog

Definition at line 162 of file uitool.cxx.

References SfxItemSet::ClearItem(), SfxGrabBagItem::GetGrabBag(), SfxItemSet::GetItemState(), SfxItemSet::Put(), RES_BACKGROUND, RES_CHRATR_BACKGROUND, RES_CHRATR_GRABBAG, RES_CHRATR_HIGHLIGHT, RES_PARATR_GRABBAG, and SfxItemSet::SetRanges().

Referenced by SwEnvFormatPage::Edit(), SwDocShell::Edit(), IMPL_LINK_NOARG(), and sw_CharDialogResult().

bool ExecuteMenuCommand ( PopupMenu const &  rMenu,
SfxViewFrame const &  rViewFrame,
sal_uInt16  nId 
)
void FillCharStyleListBox ( weld::ComboBox rToFill,
SwDocShell pDocSh,
bool  bSorted,
bool  bWithDefault 
)
static void FillHdFt ( SwFrameFormat pFormat,
const SfxItemSet rSet 
)
static
OUString GetAppLangDateTimeString ( const DateTime rDT)
FieldUnit GetDfltMetric ( bool  bWeb)
SwTwips GetTabDist ( const SvxTabStopItem rTabs)
SwTwips GetTableWidth ( SwFrameFormat const *  pFormat,
SwTabCols const &  rCols,
sal_uInt16 *  pPercent,
SwWrtShell pSh 
)
bool HasCharUnit ( bool  bWeb)

Definition at line 829 of file uitool.cxx.

References SW_MOD.

Referenced by SwTextShell::Execute().

void InsertStringSorted ( const OUString &  rId,
const OUString &  rEntry,
weld::ComboBox rToFill,
int  nOffset 
)
void ItemSetToPageDesc ( const SfxItemSet rSet,
SwPageDesc rPageDesc 
)
static UseOnPage lcl_convertUseFromSvx ( SvxPageUsage  nUse)
static

Convert from SvxPageUsage to UseOnPage.

Definition at line 270 of file uitool.cxx.

References All, Left, Mirror, NONE, and Right.

Referenced by ItemSetToPageDesc().

static SvxPageUsage lcl_convertUseToSvx ( UseOnPage  nUse)
static

Convert from UseOnPage to SvxPageUsage.

Definition at line 255 of file uitool.cxx.

References All, Left, Mirror, and Right.

Referenced by PageDescToItemSet().

void MakeDefTabs ( SwTwips  nDefDist,
SvxTabStopItem rTabs 
)
void PageDescToItemSet ( const SwPageDesc rPageDesc,
SfxItemSet rSet 
)
void PrepareBoxInfo ( SfxItemSet rSet,
const SwWrtShell rSh 
)
void SetApplyCharUnit ( bool  bApplyChar,
bool  bWeb 
)

Definition at line 834 of file uitool.cxx.

References SW_MOD.

Referenced by SwModule::ApplyItemSet().

void SetDfltMetric ( FieldUnit  eMetric,
bool  bWeb 
)

Definition at line 717 of file uitool.cxx.

References SW_MOD.

Referenced by SwModule::ApplyItemSet(), and SwModule::ExecOther().

void SetMetric ( MetricFormatter rCtrl,
FieldUnit  eUnit 
)
void SfxToSwPageDescAttr ( const SwWrtShell rShell,
SfxItemSet rSet 
)
void SwToSfxPageDescAttr ( SfxItemSet rCoreSet)