23 #include <com/sun/star/i18n/ScriptType.hpp>
35 #include <svx/dialogs.hrc>
39 #include <fontcfg.hxx>
52 #include <uiitems.hxx>
55 #include <globals.hrc>
64 bool bTextDialog = (nId == SID_SW_EDITOPTIONS);
75 bool bWebView =
dynamic_cast<SwWebView*
>( pAppView ) !=
nullptr;
77 if (bWebView != bTextDialog)
89 SID_PRINTPREVIEW, SID_PRINTPREVIEW,
90 SID_ATTR_GRID_OPTIONS, SID_ATTR_GRID_OPTIONS,
91 SID_HTML_MODE, SID_HTML_MODE,
92 SID_ATTR_CHAR_CJK_LANGUAGE, SID_ATTR_CHAR_CJK_LANGUAGE,
93 SID_ATTR_CHAR_CTL_LANGUAGE, SID_ATTR_CHAR_CTL_LANGUAGE,
94 SID_ATTR_LANGUAGE, SID_ATTR_METRIC,
95 SID_ATTR_DEFTABSTOP, SID_ATTR_DEFTABSTOP,
96 SID_ATTR_APPLYCHARUNIT, SID_ATTR_APPLYCHARUNIT,
120 aRet.Put(
SwPtrItem(FN_PARAM_PRINTER, pPrt));
121 aRet.Put(
SwPtrItem(FN_PARAM_WRTSHELL, &rWrtShell));
130 css::lang::Locale aLocale;
133 using namespace ::com::sun::star::i18n::ScriptType;
161 aRet.Put(
SfxUInt16Item( FN_HSCROLL_METRIC, static_cast< sal_uInt16 >(eUnit)));
166 aRet.Put(
SfxUInt16Item( FN_VSCROLL_METRIC, static_cast< sal_uInt16 >(eUnit) ));
200 aRet.Put(aAddPrinterItem);
214 bool bTextDialog = nId == SID_SW_EDITOPTIONS;
221 bool bWebView =
dynamic_cast<SwWebView*
>( pAppView ) !=
nullptr;
222 if(bWebView == bTextDialog)
237 if( (!aViewOpt.
IsTab(
true ) && pDocDispItem->m_bTab) ||
238 (!aViewOpt.
IsBlank(
true ) && pDocDispItem->m_bSpace) ||
240 (!aViewOpt.
IsParagraph(
true ) && pDocDispItem->m_bParagraphEnd) ||
241 (!aViewOpt.
IsLineBreak(
true ) && pDocDispItem->m_bManualBreak) )
249 pDocDispItem->FillViewOptions( aViewOpt );
261 pElemItem->FillViewOptions( aViewOpt );
272 if (bTreatSubsChanged)
281 ::SetDfltMetric(static_cast<FieldUnit>(pMetricItem->GetValue()), !bTextDialog);
308 sal_uInt16 nTabDist = pItem->GetValue();
328 aViewOpt.
SetSnap( pGridItem->GetUseGridSnap() );
330 if( aViewOpt.
IsGridVisible() != pGridItem->GetGridVisible() )
332 Size aSize( pGridItem->GetFieldDrawX(), pGridItem->GetFieldDrawY() );
335 short nDiv =
static_cast<short>(pGridItem->GetFieldDivisionX()) ;
338 nDiv =
static_cast<short>(pGridItem->GetFieldDivisionY());
355 *pOpt = *pAddPrinterAttr;
361 pItem->FillViewOptions( aViewOpt );
395 std::unique_ptr<SfxTabPage> xRet;
399 case RID_SW_TP_CONTENT_OPT:
400 case RID_SW_TP_HTML_CONTENT_OPT:
404 xRet = (*fnCreatePage)( pPage, pController, &rSet );
407 case RID_SW_TP_HTML_OPTGRID_PAGE:
408 case RID_SVXPAGE_GRID:
412 case RID_SW_TP_STD_FONT:
413 case RID_SW_TP_STD_FONT_CJK:
414 case RID_SW_TP_STD_FONT_CTL:
418 xRet = (*fnCreatePage)( pPage, pController, &rSet );
419 if(RID_SW_TP_STD_FONT != nId)
422 xRet->PageCreated(aSet);
426 case RID_SW_TP_HTML_OPTPRINT_PAGE:
427 case RID_SW_TP_OPTPRINT_PAGE:
431 xRet = (*fnCreatePage)( pPage, pController, &rSet );
433 xRet->PageCreated(aSet);
436 case RID_SW_TP_HTML_OPTTABLE_PAGE:
437 case RID_SW_TP_OPTTABLE_PAGE:
441 xRet = (*fnCreatePage)( pPage, pController, &rSet );
446 bool bWebView =
dynamic_cast<SwWebView*
>( pCurrView ) !=
nullptr;
447 if( (bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE == nId) ||
448 (!bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE != nId) )
451 xRet->PageCreated(aSet);
456 case RID_SW_TP_OPTSHDWCRSR:
457 case RID_SW_TP_HTML_OPTSHDWCRSR:
458 case RID_SW_TP_REDLINE_OPT:
459 case RID_SW_TP_COMPARISON_OPT:
460 case RID_SW_TP_OPTLOAD_PAGE:
461 case RID_SW_TP_OPTCOMPATIBILITY_PAGE:
462 case RID_SW_TP_MAILCONFIG:
466 xRet = (*fnCreatePage)( pPage, pController, &rSet );
467 if (nId == RID_SW_TP_OPTSHDWCRSR || nId == RID_SW_TP_HTML_OPTSHDWCRSR)
473 xRet->PageCreated(aSet);
478 case RID_SW_TP_OPTTEST_PAGE:
482 xRet = (*fnCreatePage)( pPage, pController, &rSet );
485 case RID_SW_TP_BACKGROUND:
489 xRet = (*fnCreatePage)( pPage, pController, &rSet );
490 xRet->PageCreated( rSet );
493 case RID_SW_TP_OPTCAPTION_PAGE:
497 xRet = (*fnCreatePage)( pPage, pController, &rSet );
503 SAL_WARN(
"sw",
"SwModule::CreateTabPage(): Unknown tabpage id " << nId );
void SetDefault(const SfxPoolItem &)
Set attribute as new default attribute in document.
SfxViewFrame * GetViewFrame() const
bool IsSynchronize() const
bool IsViewMetaChars() const
const Color & GetRetoucheColor() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
void GetHRulerMetric(FieldUnit &rToFill) const
constexpr TypedWhichId< SvxTabStopItem > RES_PARATR_TABSTOP(68)
void SetFieldDrawX(sal_uInt32 nSet)
FieldUnit GetVScrollMetric() const
void SetDivisionX(short n)
constexpr auto toTwips(N number, Length from)
static SfxAbstractDialogFactory * Create()
void ChangeTabMetric(FieldUnit eUnit)
SwStdFontConfig * GetStdFontConfig()
void SetFieldDrawY(sal_uInt32 nSet)
SwPrintOptions * GetPrtOptions(bool bWeb)
static LanguageType convertToLanguageType(const css::lang::Locale &rLocale, bool bResolveSystem=true)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
void SetHScrollMetric(FieldUnit eSet)
SwWrtShell * GetActiveWrtShell()
bool IsApplyCharUnit() const
static LanguageType resolveSystemLanguageByScriptType(LanguageType nLang, sal_Int16 nType)
void SetFieldDivisionY(sal_uInt32 nSet)
std::unique_ptr< SwMasterUsrPref, o3tl::default_delete< SwMasterUsrPref > > m_pWebUsrPref
void SetVScrollMetric(FieldUnit eSet)
const SwMasterUsrPref * GetUsrPref(bool bWeb) const
#define FN_HSCROLL_METRIC
void SetAlignMathObjectsToBaseline(bool bVal, bool noModify=false)
#define FN_PARAM_SHADOWCURSOR
virtual void ApplyItemSet(sal_uInt16 nId, const SfxItemSet &rSet) override
void Invalidate(sal_uInt16 nId)
#define FN_PARAM_ADDPRINTER
void PutItem(const SfxPoolItem &rItem)
FieldUnit GetHScrollMetric() const
SwWrtShell & GetWrtShell() const
static LanguageType nLang
SfxApplication * SfxGetpApp()
sal_Int32 GetDefTabInMm100() const
#define FN_VSCROLL_METRIC
constexpr auto convertTwipToMm100(N n)
Used by the UI to modify the document model.
constexpr tools::Long Width() const
virtual CreateTabPage GetTabPageCreatorFunc(sal_uInt16 nId)=0
short GetDivisionX() const
void SetCursorInProtectedArea(bool b)
Item for settings dialog, ShadowCursorPage.
short GetDivisionY() const
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
void SetSynchronize(bool b)
static SfxViewShell * Current()
virtual std::unique_ptr< SfxTabPage > CreateTabPage(sal_uInt16 nId, weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet) override
#define FN_PARAM_CRSR_IN_PROTECTED
bool IsBlank(bool bHard=false) const
SfxItemPool & GetPool() const
bool IsShowOutlineContentVisibilityButton() const
const Color & GetColor() const
const IDocumentDeviceAccess & getIDocumentDeviceAccess() const
Provides access to the document device interface.
void SetGridVisible(bool bSet)
const SfxPoolItem & GetDefault(sal_uInt16 nFormatHint) const
Query default attribute of document.
bool IsCursorInProtectedArea() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
css::uno::Any GetProperty(std::u16string_view rPropertyName) const
SfxBindings & GetBindings()
#define FN_PARAM_WRTSHELL
void SetOptions(const SfxItemSet &)
bool IsParagraph(bool bHard=false) const
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rAttrSet)
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
#define FN_PARAM_STDFONTS
virtual std::optional< SfxItemSet > CreateItemSet(sal_uInt16 nId) override
bool IsTab(bool bHard=false) const
void SetFieldDivisionX(sal_uInt32 nSet)
static SwAbstractDialogFactory * Create()
bool IsLineBreak(bool bHard=false) const
void MakeAllFoldedOutlineContentVisible(bool bMakeVisible=true)
std::unique_ptr< SfxPoolItem > CloneSetWhich(sal_uInt16 nNewWhich) const
virtual SfxPrinter * getPrinter(bool bCreate) const =0
Return the printer set at the document.
SfxItemPool * GetPool() const
void SetViewMetaChars(bool b)
void SetSnapSize(Size const &rSz)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void SetDivisionY(short n)
FieldUnit GetMetric() const
SwWrtShell * GetWrtShellPtr() const
static SfxViewFrame * Current()
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
constexpr tools::Long Height() const
void SetSynchronize(bool bSet)
Item for settings dialog - document view.
const SwViewOption * GetViewOptions() const
void SetRetoucheColor(const Color &r)
void AlignAllFormulasToBaseline()
aligns all formulas with anchor 'as char' to baseline
void SetUseGridSnap(bool bSet)
const Size & GetSnapSize() const
IDocumentSettingAccess const & getIDocumentSettingAccess() const
#define FN_VIEW_HIDDEN_PARA
std::unique_ptr< SwMasterUsrPref, o3tl::default_delete< SwMasterUsrPref > > m_pUsrPref
void ChangeVRulerMetric(FieldUnit eUnit)
void GetVRulerMetric(FieldUnit &rToFill) const
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
#define FN_VIEW_META_CHARS
virtual CreateTabPage GetTabPageCreatorFunc(sal_uInt16 nId)=0
bool IsTreatSubOutlineLevelsAsContent() const
bool IsShowBookmarks(bool const bHard=false) const
bool IsGridVisible() const
#define SAL_WARN(area, stream)
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLBACKGROUND)
void SetGridVisible(bool b)
void SetDefTabInMm100(sal_Int32 nSet, bool bNoModify=false)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
void ApplyUsrPref(const SwViewOption &, SwView *, SvViewOpt nDest=SvViewOpt::DestView)