23#include <com/sun/star/i18n/ScriptType.hpp>
35#include <svx/dialogs.hrc>
66 bool bTextDialog = (
nId == SID_SW_EDITOPTIONS);
77 bool bWebView =
dynamic_cast<SwWebView*
>( pAppView ) !=
nullptr;
79 if (bWebView != bTextDialog)
91 SID_PRINTPREVIEW, SID_PRINTPREVIEW,
92 SID_ATTR_GRID_OPTIONS, SID_ATTR_GRID_OPTIONS,
93 SID_HTML_MODE, SID_HTML_MODE,
94 SID_ATTR_CHAR_CJK_LANGUAGE, SID_ATTR_CHAR_CJK_LANGUAGE,
95 SID_ATTR_CHAR_CTL_LANGUAGE, SID_ATTR_CHAR_CTL_LANGUAGE,
96 SID_ATTR_LANGUAGE, SID_ATTR_METRIC,
97 SID_ATTR_DEFTABSTOP, SID_ATTR_DEFTABSTOP,
98 SID_ATTR_APPLYCHARUNIT, SID_ATTR_APPLYCHARUNIT,
132 css::lang::Locale aLocale;
135 using namespace ::com::sun::star::i18n::ScriptType;
202 aRet.Put(aAddPrinterItem);
216 bool bTextDialog =
nId == SID_SW_EDITOPTIONS;
223 bool bWebView =
dynamic_cast<SwWebView*
>( pAppView ) !=
nullptr;
224 if(bWebView == bTextDialog)
239 if( (!aViewOpt.
IsTab(
true ) && pDocDispItem->m_bTab) ||
240 (!aViewOpt.
IsBlank(
true ) && pDocDispItem->m_bSpace) ||
242 (!aViewOpt.
IsParagraph(
true ) && pDocDispItem->m_bParagraphEnd) ||
243 (!aViewOpt.
IsLineBreak(
true ) && pDocDispItem->m_bManualBreak) )
251 pDocDispItem->FillViewOptions( aViewOpt );
260 bool bReFoldOutlineFolding =
false;
263 pElemItem->FillViewOptions( aViewOpt );
268 bool bIsOutlineFoldingOn = pWrtShell->GetViewOptions()->IsShowOutlineContentVisibilityButton();
270 != pWrtShell->GetViewOptions()->IsTreatSubOutlineLevelsAsContent();
271 if (bIsOutlineFoldingOn &&
278 if (bTreatSubsChanged)
279 bReFoldOutlineFolding =
true;
284 bReFoldOutlineFolding =
285 pWrtShell->GetViewOptions()->IsShowOutlineContentVisibilityButton() !=
322 sal_uInt16 nTabDist = pItem->GetValue();
342 aViewOpt.
SetSnap( pGridItem->GetUseGridSnap() );
344 if( aViewOpt.
IsGridVisible() != pGridItem->GetGridVisible() )
346 Size aSize( pGridItem->GetFieldDrawX(), pGridItem->GetFieldDrawY() );
349 short nDiv =
static_cast<short>(pGridItem->GetFieldDivisionX()) ;
352 nDiv =
static_cast<short>(pGridItem->GetFieldDivisionY());
369 *pOpt = *pAddPrinterAttr;
375 pItem->FillViewOptions( aViewOpt );
403 if (bReFoldOutlineFolding)
415 std::unique_ptr<SfxTabPage> xRet;
419 case RID_SW_TP_CONTENT_OPT:
420 case RID_SW_TP_HTML_CONTENT_OPT:
424 xRet = (*fnCreatePage)( pPage, pController, &
rSet );
427 case RID_SW_TP_HTML_OPTGRID_PAGE:
428 case RID_SVXPAGE_GRID:
432 case RID_SW_TP_STD_FONT:
433 case RID_SW_TP_STD_FONT_CJK:
434 case RID_SW_TP_STD_FONT_CTL:
438 xRet = (*fnCreatePage)( pPage, pController, &
rSet );
439 if(RID_SW_TP_STD_FONT !=
nId)
442 xRet->PageCreated(aSet);
446 case RID_SW_TP_HTML_OPTPRINT_PAGE:
447 case RID_SW_TP_OPTPRINT_PAGE:
451 xRet = (*fnCreatePage)( pPage, pController, &
rSet );
453 xRet->PageCreated(aSet);
456 case RID_SW_TP_HTML_OPTTABLE_PAGE:
457 case RID_SW_TP_OPTTABLE_PAGE:
461 xRet = (*fnCreatePage)( pPage, pController, &
rSet );
466 bool bWebView =
dynamic_cast<SwWebView*
>( pCurrView ) !=
nullptr;
467 if( (bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE ==
nId) ||
468 (!bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE !=
nId) )
471 xRet->PageCreated(aSet);
476 case RID_SW_TP_OPTSHDWCRSR:
477 case RID_SW_TP_HTML_OPTSHDWCRSR:
478 case RID_SW_TP_REDLINE_OPT:
479 case RID_SW_TP_COMPARISON_OPT:
480 case RID_SW_TP_OPTLOAD_PAGE:
481 case RID_SW_TP_OPTCOMPATIBILITY_PAGE:
482 case RID_SW_TP_MAILCONFIG:
486 xRet = (*fnCreatePage)( pPage, pController, &
rSet );
487 if (
nId == RID_SW_TP_OPTSHDWCRSR ||
nId == RID_SW_TP_HTML_OPTSHDWCRSR)
493 xRet->PageCreated(aSet);
498 case RID_SW_TP_OPTTEST_PAGE:
502 xRet = (*fnCreatePage)( pPage, pController, &
rSet );
505 case RID_SW_TP_BACKGROUND:
509 xRet = (*fnCreatePage)( pPage, pController, &
rSet );
510 xRet->PageCreated(
rSet );
513 case RID_SW_TP_OPTCAPTION_PAGE:
517 xRet = (*fnCreatePage)( pPage, pController, &
rSet );
523 SAL_WARN(
"sw",
"SwModule::CreateTabPage(): Unknown tabpage id " <<
nId );
@ MATH_BASELINE_ALIGNMENT
constexpr auto convertTwipToMm100(N n)
virtual SfxPrinter * getPrinter(bool bCreate) const =0
Return the printer set at the document.
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
static LanguageType convertToLanguageType(const css::lang::Locale &rLocale, bool bResolveSystem=true)
static LanguageType resolveSystemLanguageByScriptType(LanguageType nLang, sal_Int16 nType)
static SfxAbstractDialogFactory * Create()
virtual CreateTabPage GetTabPageCreatorFunc(sal_uInt16 nId)=0
static void SetOptions(const SfxItemSet &)
void Invalidate(sal_uInt16 nId)
SfxItemPool * GetPool() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
std::unique_ptr< SfxPoolItem > CloneSetWhich(sal_uInt16 nNewWhich) const
void PutItem(const SfxPoolItem &rItem)
SfxItemPool & GetPool() const
static SAL_WARN_UNUSED_RESULT SfxViewFrame * Current()
SfxBindings & GetBindings()
SfxViewFrame & GetViewFrame() const
static SAL_WARN_UNUSED_RESULT SfxViewShell * Current()
constexpr tools::Long Height() const
constexpr tools::Long Width() const
css::uno::Any GetProperty(std::u16string_view rPropertyName) const
const Color & GetColor() const
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rAttrSet)
void SetFieldDrawX(sal_uInt32 nSet)
void SetUseGridSnap(bool bSet)
void SetFieldDrawY(sal_uInt32 nSet)
void SetSynchronize(bool bSet)
void SetGridVisible(bool bSet)
void SetFieldDivisionY(sal_uInt32 nSet)
void SetFieldDivisionX(sal_uInt32 nSet)
virtual CreateTabPage GetTabPageCreatorFunc(sal_uInt16 nId)=0
static SwAbstractDialogFactory * Create()
Item for settings dialog - document view.
IDocumentSettingAccess const & getIDocumentSettingAccess() const
const SfxPoolItem & GetDefault(sal_uInt16 nFormatHint) const
Query default attribute of document.
void SetDefault(const SfxPoolItem &)
Set attribute as new default attribute in document.
void AlignAllFormulasToBaseline()
aligns all formulas with anchor 'as char' to baseline
FieldUnit GetHScrollMetric() const
void SetDefTabInMm100(sal_Int32 nSet, bool bNoModify=false)
void SetAlignMathObjectsToBaseline(bool bVal, bool noModify=false)
FieldUnit GetMetric() const
void SetVScrollMetric(FieldUnit eSet)
FieldUnit GetVScrollMetric() const
sal_Int32 GetDefTabInMm100() const
bool IsApplyCharUnit() const
void SetHScrollMetric(FieldUnit eSet)
const SwMasterUsrPref * GetUsrPref(bool bWeb) const
std::unique_ptr< SwMasterUsrPref, o3tl::default_delete< SwMasterUsrPref > > m_pWebUsrPref
SwStdFontConfig * GetStdFontConfig()
virtual std::unique_ptr< SfxTabPage > CreateTabPage(sal_uInt16 nId, weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet) override
SwPrintOptions * GetPrtOptions(bool bWeb)
virtual void ApplyItemSet(sal_uInt16 nId, const SfxItemSet &rSet) override
std::unique_ptr< SwMasterUsrPref, o3tl::default_delete< SwMasterUsrPref > > m_pUsrPref
void ApplyUsrPref(const SwViewOption &, SwView *, SvViewOpt nDest=SvViewOpt::DestView)
virtual std::optional< SfxItemSet > CreateItemSet(sal_uInt16 nId) override
Item for settings dialog, ShadowCursorPage.
bool IsParagraph(bool bHard=false) const
bool IsSynchronize() const
bool IsShowBookmarks(bool const bHard=false) const
bool IsBlank(bool bHard=false) const
bool IsShowOutlineContentVisibilityButton() const
void SetSynchronize(bool b)
bool IsGridVisible() const
short GetDivisionY() const
void SetCursorInProtectedArea(bool b)
const Color & GetRetoucheColor() const
bool IsTreatSubOutlineLevelsAsContent() const
void SetGridVisible(bool b)
void SetSnapSize(Size const &rSz)
const Size & GetSnapSize() const
bool IsCursorInProtectedArea() const
void SetDivisionX(short n)
bool IsViewMetaChars() const
bool IsLineBreak(bool bHard=false) const
bool IsTab(bool bHard=false) const
short GetDivisionX() const
void SetDivisionY(short n)
void SetRetoucheColor(const Color &r)
void SetViewMetaChars(bool b)
const SwViewOption * GetViewOptions() const
const IDocumentDeviceAccess & getIDocumentDeviceAccess() const
Provides access to the document device interface.
void GetHRulerMetric(FieldUnit &rToFill) const
SwWrtShell & GetWrtShell() const
void GetVRulerMetric(FieldUnit &rToFill) const
void ChangeVRulerMetric(FieldUnit eUnit)
SwWrtShell * GetWrtShellPtr() const
void ChangeTabMetric(FieldUnit eUnit)
Used by the UI to modify the document model.
#define FN_VSCROLL_METRIC
#define FN_PARAM_SHADOWCURSOR
#define FN_PARAM_STDFONTS
#define FN_PARAM_ADDPRINTER
#define FN_VIEW_HIDDEN_PARA
#define FN_PARAM_WRTSHELL
#define FN_SHOW_OUTLINECONTENTVISIBILITYBUTTON
#define FN_VIEW_META_CHARS
#define FN_HSCROLL_METRIC
#define FN_PARAM_CRSR_IN_PROTECTED
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(111)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
constexpr TypedWhichId< SvxTabStopItem > RES_PARATR_TABSTOP(68)
#define SAL_WARN(area, stream)
constexpr auto toTwips(N number, Length from)
static LanguageType nLang
SwWrtShell * GetActiveWrtShell()
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLUSESLIDEBACKGROUND)