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>
66 bool bTextDialog = (nId == SID_SW_EDITOPTIONS);
77 bool bWebView =
dynamic_cast<SwWebView*
>( pAppView ) !=
nullptr;
79 if (bWebView != bTextDialog)
88 auto pRet = std::make_unique<SfxItemSet>(
93 SID_PRINTPREVIEW, SID_PRINTPREVIEW,
94 SID_ATTR_GRID_OPTIONS, SID_ATTR_GRID_OPTIONS,
95 SID_HTML_MODE, SID_HTML_MODE,
96 SID_ATTR_CHAR_CJK_LANGUAGE, SID_ATTR_CHAR_CJK_LANGUAGE,
97 SID_ATTR_CHAR_CTL_LANGUAGE, SID_ATTR_CHAR_CTL_LANGUAGE,
98 SID_ATTR_LANGUAGE, SID_ATTR_METRIC,
99 SID_ATTR_DEFTABSTOP, SID_ATTR_DEFTABSTOP,
100 SID_ATTR_APPLYCHARUNIT, SID_ATTR_APPLYCHARUNIT,
123 pRet->Put(
SwPtrItem(FN_PARAM_PRINTER, pPrt));
124 pRet->Put(
SwPtrItem(FN_PARAM_WRTSHELL, &rWrtShell));
133 css::lang::Locale aLocale;
136 using namespace ::com::sun::star::i18n::ScriptType;
143 aLang = aLinguCfg.
GetProperty(
"DefaultLocale_CJK");
148 aLang = aLinguCfg.
GetProperty(
"DefaultLocale_CTL");
164 pRet->Put(
SfxUInt16Item( FN_HSCROLL_METRIC, static_cast< sal_uInt16 >(eUnit)));
169 pRet->Put(
SfxUInt16Item( FN_VSCROLL_METRIC, static_cast< sal_uInt16 >(eUnit) ));
198 pRet->Put(aGridItem);
203 pRet->Put(aAddPrinterItem);
217 bool bTextDialog = nId == SID_SW_EDITOPTIONS;
224 bool bWebView =
dynamic_cast<SwWebView*
>( pAppView ) !=
nullptr;
225 if(bWebView == bTextDialog)
243 if( (!aViewOpt.
IsTab(
true ) && pDocDispItem->
m_bTab) ||
264 std::vector<SwNode*> aFoldedOutlineNdsArray;
300 bool bOutlineContentVisibleAttr =
true;
302 if (!bOutlineContentVisibleAttr)
304 aFoldedOutlineNdsArray.push_back(pNd);
312 if( SfxItemState::SET == rSet.
GetItemState(SID_ATTR_METRIC,
false, &pItem ) )
319 if( SfxItemState::SET == rSet.
GetItemState(SID_ATTR_APPLYCHARUNIT,
345 if( SfxItemState::SET == rSet.
GetItemState(SID_ATTR_DEFTABSTOP,
false, &pItem ) )
365 if( SfxItemState::SET == rSet.
GetItemState( SID_ATTR_GRID_OPTIONS,
false, &pItem ))
397 *pOpt = *pAddPrinterAttr;
435 for (
SwNode* pNd : aFoldedOutlineNdsArray)
436 pNd->GetTextNode()->SetAttrOutlineContentVisible(
false);
443 for (
SwNode* pNd : aFoldedOutlineNdsArray)
451 std::unique_ptr<SfxTabPage> xRet;
455 case RID_SW_TP_CONTENT_OPT:
456 case RID_SW_TP_HTML_CONTENT_OPT:
460 xRet = (*fnCreatePage)( pPage, pController, &rSet );
463 case RID_SW_TP_HTML_OPTGRID_PAGE:
464 case RID_SVXPAGE_GRID:
468 case RID_SW_TP_STD_FONT:
469 case RID_SW_TP_STD_FONT_CJK:
470 case RID_SW_TP_STD_FONT_CTL:
474 xRet = (*fnCreatePage)( pPage, pController, &rSet );
475 if(RID_SW_TP_STD_FONT != nId)
478 xRet->PageCreated(aSet);
482 case RID_SW_TP_HTML_OPTPRINT_PAGE:
483 case RID_SW_TP_OPTPRINT_PAGE:
487 xRet = (*fnCreatePage)( pPage, pController, &rSet );
489 xRet->PageCreated(aSet);
492 case RID_SW_TP_HTML_OPTTABLE_PAGE:
493 case RID_SW_TP_OPTTABLE_PAGE:
497 xRet = (*fnCreatePage)( pPage, pController, &rSet );
502 bool bWebView =
dynamic_cast<SwWebView*
>( pCurrView ) !=
nullptr;
503 if( (bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE == nId) ||
504 (!bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE != nId) )
507 xRet->PageCreated(aSet);
512 case RID_SW_TP_OPTSHDWCRSR:
513 case RID_SW_TP_HTML_OPTSHDWCRSR:
514 case RID_SW_TP_REDLINE_OPT:
515 case RID_SW_TP_COMPARISON_OPT:
516 case RID_SW_TP_OPTLOAD_PAGE:
517 case RID_SW_TP_OPTCOMPATIBILITY_PAGE:
518 case RID_SW_TP_MAILCONFIG:
522 xRet = (*fnCreatePage)( pPage, pController, &rSet );
523 if (nId == RID_SW_TP_OPTSHDWCRSR || nId == RID_SW_TP_HTML_OPTSHDWCRSR)
529 xRet->PageCreated(aSet);
534 case RID_SW_TP_OPTTEST_PAGE:
538 xRet = (*fnCreatePage)( pPage, pController, &rSet );
541 case RID_SW_TP_BACKGROUND:
545 xRet = (*fnCreatePage)( pPage, pController, &rSet );
546 xRet->PageCreated( rSet );
549 case RID_SW_TP_OPTCAPTION_PAGE:
553 xRet = (*fnCreatePage)( pPage, pController, &rSet );
559 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
sal_uInt32 GetFieldDivisionY() const
bool IsViewMetaChars() const
const Color & GetRetoucheColor() const
void GetHRulerMetric(FieldUnit &rToFill) const
constexpr TypedWhichId< SvxTabStopItem > RES_PARATR_TABSTOP(68)
void SetFieldDrawX(sal_uInt32 nSet)
const SwNodes & GetNodes() const
FieldUnit GetVScrollMetric() const
void SetDivisionX(short n)
static SfxAbstractDialogFactory * Create()
bool SttEndDoc(bool bStt)
void ChangeTabMetric(FieldUnit eUnit)
SwStdFontConfig * GetStdFontConfig()
void FillViewOptions(SwViewOption &rVOpt) const
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)
sal_uInt32 GetFieldDrawX() const
void SetHScrollMetric(FieldUnit eSet)
SwWrtShell * GetActiveWrtShell()
bool IsApplyCharUnit() const
sal_uInt16 GetValue() 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.
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
bool GetUseGridSnap() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) 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)
tools::Long Width() const
sal_uInt32 GetFieldDivisionX() const
#define FN_PARAM_STDFONTS
constexpr auto convertMm100ToTwip(N n)
bool IsTab(bool bHard=false) const
void FillViewOptions(SwViewOption &rVOpt) const
void SetFieldDivisionX(sal_uInt32 nSet)
bool GetAttrOutlineContentVisible(bool &bOutlineContentVisibleAttr)
GetAttrOutlineContentVisible.
static SwAbstractDialogFactory * Create()
bool IsLineBreak(bool bHard=false) const
const SwOutlineNodes & GetOutLineNds() const
Array of all OutlineNodes.
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)
bool GetSynchronize() const
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
void SetSynchronize(bool bSet)
virtual std::unique_ptr< SfxItemSet > CreateItemSet(sal_uInt16 nId) override
Item for settings dialog - document view.
const SwViewOption * GetViewOptions() const
void ToggleOutlineContentVisibility(SwNode *pNd, const bool bForceNotVisible=false)
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)
sal_uInt32 GetFieldDrawY() const
tools::Long Height() const
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)
css::uno::Any GetProperty(const OUString &rPropertyName) const
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLBACKGROUND)
void SetGridVisible(bool b)
bool GetGridVisible() const
std::vector< SwNode * >::size_type size_type
void SetDefTabInMm100(sal_Int32 nSet, bool bNoModify=false)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
bool IsSelFrameMode() const
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
void ApplyUsrPref(const SwViewOption &, SwView *, SvViewOpt nDest=SvViewOpt::DestView)
Base class of the Writer document model elements.