LibreOffice Module sw (master)
1
|
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) |
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.
[in] | rBackgroundColor | the color to apply on the shell |
[in,out] | rShell | the 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.
[in,out] | rSet | the set in which character attributes are stored |
[in] | bIsPara | is 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.
[in,out] | rSet | the set in which character attributes are stored |
[in] | rOrigSet | original itemset used as input for the dialog |
[in] | bIsPara | is 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 | ||
) |
Definition at line 822 of file uitool.cxx.
References aSeq, aURL, SfxViewFrame::GetFrame(), SfxFrame::GetFrameInterface(), Menu::GetItemCommand(), Menu::GetItemCount(), Menu::GetItemId(), Menu::GetPopupMenu(), comphelper::getProcessComponentContext(), and xFrame.
Referenced by SwEditWin::Command(), and SwView::ExecSpellPopup().
SW_DLLPUBLIC void FillCharStyleListBox | ( | weld::ComboBox & | rToFill, |
SwDocShell * | pDocSh, | ||
bool | bSorted = false , |
||
bool | bWithDefault = false |
||
) |
Definition at line 720 of file uitool.cxx.
References weld::ComboBox::append(), ChrFmt, weld::ComboBox::find_text(), SfxStyleSheetBasePool::First(), weld::Widget::freeze(), weld::ComboBox::get_count(), SwDoc::GetCharFormats(), SwDocShell::GetDoc(), SfxStyleSheetBase::GetName(), SwFormat::GetName(), SwStyleNameMapper::GetPoolIdFromUIName(), SwDocShell::GetStyleSheetPool(), i, InsertStringSorted(), SwFormat::IsDefault(), SfxStyleSheetBasePool::Next(), sId, SwVectorModifyBase< Value >::size(), SwResId(), weld::Widget::thaw(), and USHRT_MAX.
Referenced by SwTemplateDlgController::PageCreated(), SwSvxNumBulletTabDialog::PageCreated(), SwDropCapsPage::Reset(), SwEndNoteOptionPage::SetShell(), SwOutlineSettingsTabPage::SetWrtShell(), SwTOXEntryTabPage::SetWrtShell(), SwCaptionOptPage::SwCaptionOptPage(), SwCharURLPage::SwCharURLPage(), and SwLineNumberingDlg::SwLineNumberingDlg().
OUString GetAppLangDateTimeString | ( | const DateTime & | ) |
Definition at line 802 of file uitool.cxx.
References LocaleDataWrapper::getDate(), SvtSysLocale::GetLocaleData(), and LocaleDataWrapper::getTime().
Referenced by SwTextShell::ExecField(), IMPL_LINK(), SwRedlineAcceptDlg::InsertChildren(), SwRedlineAcceptDlg::InsertParents(), lcl_GetRedlineHelp(), and sw::sidebarwindows::SidebarTextControl::RequestHelp().
SW_DLLPUBLIC FieldUnit GetDfltMetric | ( | bool | bWeb | ) |
Definition at line 695 of file uitool.cxx.
References SW_MOD.
Referenced by SwLabPage::DisplayFormat(), SwDocShell::Edit(), SwDrawTextShell::ExecFontWork(), SwTextShell::ExecInsert(), SwFrameShell::Execute(), SwDrawShell::Execute(), SwTableShell::Execute(), SwGrfShell::Execute(), SwDrawBaseShell::Execute(), SwTextShell::Execute(), SwDrawTextShell::Execute(), SwTableColumnPage::Init(), SwEditWin::MouseMove(), SwTemplateDlgController::PageCreated(), SwSvxNumBulletTabDialog::PageCreated(), SwFormatTablePage::Reset(), SwWrapTabPage::Reset(), SwColumnPage::Reset(), SwFramePage::Reset(), SwSectionIndentTabPage::Reset(), SwNumPositionTabPage::SetWrtShell(), SwModule::StateOther(), sw_CharDialog(), SwDropCapsPage::SwDropCapsPage(), SwEnvFormatPage::SwEnvFormatPage(), SwFootNotePage::SwFootNotePage(), SwLabFormatPage::SwLabFormatPage(), SwMailMergeLayoutPage::SwMailMergeLayoutPage(), SwTOXEntryTabPage::SwTOXEntryTabPage(), and sw::sidebar::WrapPropertyPanel::WrapPropertyPanel().
SW_DLLPUBLIC SwTwips GetTabDist | ( | const SvxTabStopItem & | rTabs | ) |
Definition at line 588 of file uitool.cxx.
References SvxTabStopItem::Count().
Referenced by SwModule::CreateItemSet(), SwEnvFormatPage::Edit(), SwView::ExecTabWin(), SwTextShell::Execute(), SwView::GetState(), and SwView::StateTabWin().
SwTwips GetTableWidth | ( | SwFrameFormat const * | pFormat, |
SwTabCols const & | rCols, | ||
sal_uInt16 * | pPercent, | ||
SwWrtShell * | pSh | ||
) |
Definition at line 761 of file uitool.cxx.
References FlyEmbeddedPrt, SwFEShell::GetAnyCurRect(), SwFEShell::GetFlyFrameFormat(), SwFormat::GetFrameSize(), SwFormatHoriOrient::GetHoriOrient(), SwFormat::GetHoriOrient(), SvxLRSpaceItem::GetLeft(), SwFormat::GetLRSpace(), SvxLRSpaceItem::GetRight(), SwTabCols::GetRight(), SvxSizeItem::GetWidth(), SwFormatFrameSize::GetWidthPercent(), PagePrt, and SwRect::Width().
Referenced by lcl_TableParamToItemSet().
bool HasCharUnit | ( | bool | bWeb | ) |
SW_DLLPUBLIC void InsertStringSorted | ( | const OUString & | rId, |
const OUString & | rEntry, | ||
weld::ComboBox & | rToFill, | ||
int | nOffset | ||
) |
Definition at line 707 of file uitool.cxx.
References CollatorWrapper::compareString(), weld::ComboBox::get_count(), weld::ComboBox::get_text(), GetAppCaseCollator(), weld::ComboBox::insert(), and nCount.
Referenced by FillCharStyleListBox(), lcl_InsertVectors(), and SwBreakDlg::SwBreakDlg().
void ItemSetToPageDesc | ( | const SfxItemSet & | rSet, |
SwPageDesc & | rPageDesc | ||
) |
Definition at line 269 of file uitool.cxx.
References SwPageDesc::ChgFirstShare(), SwPageDesc::ChgFooterShare(), SwPageDesc::ChgHeaderShare(), FillHdFt(), SwDoc::FindTextFormatCollByName(), Fixed, FN_PARAM_FTN_INFO, SfxItemSet::Get(), SwDoc::GetDfltTextFormatColl(), SwFormat::GetDoc(), SwFormat::GetFooter(), SwFormat::GetHeader(), SwDoc::getIDocumentStylePoolAccess(), CharFormat::GetItemSet(), SfxItemSet::GetItemState(), SwPageDesc::GetMaster(), SvxPageItem::GetNumType(), SvxPageItem::GetPageUsage(), SwStyleNameMapper::GetPoolIdFromUIName(), SvxSizeItem::GetSize(), IDocumentStylePoolAccess::GetTextCollFromPool(), SfxBoolItem::GetValue(), GetValue, SwFormatHeader::IsActive(), SwFormatFooter::IsActive(), SvxPageItem::IsLandscape(), lcl_convertUseFromSvx(), SwDoc::MakeTextFormatColl(), nId, SwPageDesc::SetFootnoteInfo(), SwFormat::SetFormatAttr(), SwTextFormatColl::SetFormatAttr(), SwPageDesc::SetLandscape(), SvxNumberType::SetNumberingType(), SwPageDesc::SetNumType(), SwPageDesc::SetRegisterFormatColl(), SvxSizeItem::SetSize(), SwPageDesc::SetUseOn(), TxtColl, and USHRT_MAX.
Referenced by SwView::Execute(), and SwDocStyleSheet::SetItemSet().
SW_DLLPUBLIC void MakeDefTabs | ( | SwTwips | nDefDist, |
SvxTabStopItem & | rTabs | ||
) |
Definition at line 576 of file uitool.cxx.
References SvxTabStopItem::Count(), and SvxTabStopItem::Insert().
Referenced by SwModule::ApplyItemSet(), SwEnvFormatPage::Edit(), SwView::ExecTabWin(), SwTextShell::Execute(), and SwView::Execute().
void PageDescToItemSet | ( | const SwPageDesc & | rPageDesc, |
SfxItemSet & | rSet | ||
) |
Definition at line 412 of file uitool.cxx.
References SfxPoolItem::Clone(), Fixed, SwFormat::GetAttrSet(), SwDoc::GetDfltFrameFormat(), SwFormat::GetDoc(), SwPageDesc::GetFollow(), SwFormat::GetFooter(), SwFormatFooter::GetFooterFormat(), SwPageDesc::GetFootnoteInfo(), SwFormat::GetFrameSize(), SwFormat::GetHeader(), SwFormatHeader::GetHeaderFormat(), SwFormatFrameSize::GetHeightSizeType(), SfxItemSet::GetItemState(), SwPageDesc::GetLandscape(), SwPageDesc::GetMaster(), SwFormat::GetName(), SwPageDesc::GetName(), SvxNumberType::GetNumberingType(), SwPageDesc::GetNumType(), SfxItemSet::GetPool(), SwPageDesc::GetRegisterFormatColl(), SvxSizeItem::GetSize(), SwPageDesc::GetUseOn(), SwFormatHeader::IsActive(), SwFormatFooter::IsActive(), SwPageDesc::IsFirstShared(), SwPageDesc::IsFooterShared(), SwPageDesc::IsHeaderShared(), lcl_convertUseToSvx(), MAXHEIGHT, MAXWIDTH, MIN_BORDER_DIST, SfxItemSet::Put(), RES_FRMATR_BEGIN(), RES_FRMATR_END(), SvxPageItem::SetDescName(), SvxPageItem::SetLandscape(), SvxPageItem::SetNumType(), SvxPageItem::SetPageUsage(), CntUnencodedStringItem::SetValue(), SfxPoolItem::SetWhich(), XATTR_FILL_FIRST(), and XATTR_FILL_LAST().
Referenced by SwDocStyleSheet::GetItemSet(), and SwView::GetState().
SW_DLLPUBLIC void PrepareBoxInfo | ( | SfxItemSet & | rSet, |
const SwWrtShell & | rSh | ||
) |
Definition at line 79 of file uitool.cxx.
References SfxPoolItem::Clone(), SwCursorShell::GetCursor(), SwCursorShell::GetCursorCnt(), SfxItemSet::GetItemState(), SwWrtShell::GetSelectionType(), SwCursorShell::IsTableMode(), MIN_BORDER_DIST, SfxItemSet::Put(), Table, and Text.
Referenced by SwEnvFormatPage::Edit(), SwBaseShell::ExecDlg(), SwTextShell::Execute(), SwBaseShell::GetBorderState(), sw_CharDialog(), SwFlyFrameAttrMgr::SwFlyFrameAttrMgr(), and SwFlyFrameAttrMgr::UpdateAttrMgr().
void SetApplyCharUnit | ( | bool | bApplyChar, |
bool | bWeb | ||
) |
Definition at line 817 of file uitool.cxx.
References SW_MOD.
Referenced by SwModule::ApplyItemSet().
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 | ||
) |
Definition at line 594 of file uitool.cxx.
References assert(), SfxItemSet::ClearItem(), SwEditShell::GetCurAttr(), SfxItemSet::GetItemState(), SfxShell::GetPool(), GetValue, SwWrtShell::GetView(), SfxItemSet::Put(), SwFormatPageDesc::RegisterToPageDesc(), RES_BREAK(), RES_PAGEDESC(), SwFormatPageDesc::SetNumOffset(), and SfxPoolItem::StaticWhichCast().
Referenced by SwDocShell::Edit(), SwTextShell::ExecParaAttrArgs(), SwView::FUNC_Search(), IMPL_LINK_NOARG(), SwView::Replace(), and sw_ParagraphDialogResult().
void SwToSfxPageDescAttr | ( | SfxItemSet & | rSet | ) |
Definition at line 655 of file uitool.cxx.
References aName, SfxItemSet::ClearItem(), SfxItemSet::GetItemState(), SfxItemSet::Put(), RES_PAGEDESC(), and SfxPoolItem::StaticWhichCast().
Referenced by SwDocShell::Edit(), SwTextShell::Execute(), and SwTextShell::GetAttrState().