LibreOffice Module sw (master)  1
Namespaces | Functions
uitool.hxx File Reference
#include <vcl/weld.hxx>
#include <vcl/menu.hxx>
#include <swtypes.hxx>
#include <swdllapi.h>
Include dependency graph for uitool.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 weld
 

Functions

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

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 186 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(), SwEditShell::StartUndo(), and SfxPoolItem::StaticWhichCast().

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

SW_DLLPUBLIC void ConvertAttrCharToGen ( SfxItemSet rSet,
bool  bPara = false 
)

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

Parameters
[in,out]rSetthe set in which character attributes are stored
[in]bIsParais called by a paragraph style

Definition at line 104 of file uitool.cxx.

References assert(), COL_TRANSPARENT(), SfxItemSet::GetItemState(), SfxItemSet::GetRanges(), SfxItemSet::MergeRange(), SfxItemSet::Put(), RES_CHRATR_BACKGROUND(), RES_CHRATR_HIGHLIGHT(), RES_PARATR_GRABBAG(), and SfxPoolItem::StaticWhichCast().

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

SW_DLLPUBLIC void ConvertAttrGenToChar ( SfxItemSet rSet,
const SfxItemSet rOrigSet,
bool  bPara = false 
)

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
[in]bIsParais called by a paragraph style

Definition at line 141 of file uitool.cxx.

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

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

bool ExecuteMenuCommand ( PopupMenu const &  rMenu,
SfxViewFrame const &  rViewFrame,
sal_uInt16  nId 
)
SW_DLLPUBLIC void FillCharStyleListBox ( weld::ComboBox rToFill,
SwDocShell pDocSh,
bool  bSorted = false,
bool  bWithDefault = false 
)
OUString GetAppLangDateTimeString ( const DateTime )
SW_DLLPUBLIC FieldUnit GetDfltMetric ( bool  bWeb)
SW_DLLPUBLIC 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 812 of file uitool.cxx.

References SW_MOD.

Referenced by SwTextShell::Execute().

SW_DLLPUBLIC void InsertStringSorted ( const OUString &  rId,
const OUString &  rEntry,
weld::ComboBox rToFill,
int  nOffset 
)
void ItemSetToPageDesc ( const SfxItemSet rSet,
SwPageDesc rPageDesc 
)
SW_DLLPUBLIC void MakeDefTabs ( SwTwips  nDefDist,
SvxTabStopItem rTabs 
)
void PageDescToItemSet ( const SwPageDesc rPageDesc,
SfxItemSet rSet 
)
SW_DLLPUBLIC void PrepareBoxInfo ( SfxItemSet rSet,
const SwWrtShell rSh 
)
void SetApplyCharUnit ( bool  bApplyChar,
bool  bWeb 
)

Definition at line 817 of file uitool.cxx.

References SW_MOD.

Referenced by SwModule::ApplyItemSet().

void SetDfltMetric ( FieldUnit  eMetric,
bool  bWeb 
)

Definition at line 702 of file uitool.cxx.

References SW_MOD.

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

void SfxToSwPageDescAttr ( const SwWrtShell rShell,
SfxItemSet rSet 
)
void SwToSfxPageDescAttr ( SfxItemSet rSet)