27#include <com/sun/star/frame/FrameSearchFlag.hpp>
28#include <com/sun/star/frame/XFrame.hpp>
29#include <com/sun/star/view/XSelectionSupplier.hpp>
32#include <editeng/editids.hrc>
41#include <osl/diagnose.h>
90 if(bVAlignChanged && !bHScrollChanged && !bVScrollChanged)
111 return &pActive->GetWrtShell();
118 return dynamic_cast<SwView*
>( pView );
130 OSL_ENSURE( pView,
"return no SwView" );
139 SwView* pCurrView = pActView;
145 &&
dynamic_cast< const SwWebView *
>( pCurrView )) ));
181 std::unique_ptr<SwViewOption> xViewOpt;
186 xViewOpt->SetReadonly( bReadonly );
192 static_cast<SwWrtShell*
>(pSh)->SetReadOnlyAvailable(xViewOpt->IsCursorInProtectedArea());
219 assert(pPref &&
"pPref is set by here");
221 if(eOldMetric != eMetric)
231 if(bWeb == (
dynamic_cast<SwWebView*
>( pTmpView) !=
nullptr) )
256 assert(pPref &&
"pPref will be set by now");
266 if(bWeb == (
dynamic_cast<SwWebView *
>( pTmpView ) !=
nullptr))
293 assert(pPref &&
"pPref is set by here");
295 bool bHasChanged =
false;
296 if(bOldApplyCharUnit != bApplyChar)
309 eHScrollMetric = FieldUnit::CHAR;
310 eVScrollMetric = FieldUnit::LINE;
315 eHScrollMetric = FieldUnit::INCH;
316 else if ( eHScrollMetric == FieldUnit::CHAR )
317 eHScrollMetric = FieldUnit::CM;
319 eVScrollMetric = FieldUnit::INCH;
320 else if ( eVScrollMetric == FieldUnit::LINE )
321 eVScrollMetric = FieldUnit::CM;
327 if(bWeb == (
dynamic_cast<SwWebView*
>( pTmpView) !=
nullptr) )
371 uno::Reference<XFrame> xBeamerFrame =
xFrame->findFrame(
"_beamer", FrameSearchFlag::CHILDREN);
372 if (!xBeamerFrame.is())
376 Reference<XController>
xController = xBeamerFrame->getController();
377 Reference<XSelectionSupplier> xControllerSelection(
xController, UNO_QUERY);
378 if (xControllerSelection.is())
381 ODataAccessDescriptor aSelection;
383 aSelection[DataAccessDescriptorProperty::Command] <<= rData.
sCommand;
384 aSelection[DataAccessDescriptorProperty::CommandType] <<= rData.
nCommandType;
385 xControllerSelection->select(
Any(aSelection.createPropertyValueSequence()));
388 OSL_FAIL(
"no selection supplier in the beamer!");
433 static const Color aColArr[] =
446 auto authorsNode = rJsonWriter.
startArray(
"authors");
447 for (std::size_t nAuthor = 0; nAuthor <
m_pAuthorNames.size(); ++nAuthor)
450 rJsonWriter.
put(
"index",
static_cast<sal_Int64
>(nAuthor));
458 std::size_t
nPos = 0;
481 case SID_ATTR_CHAR_WEIGHT:
492 case SID_ATTR_CHAR_POSTURE:
503 case SID_ATTR_CHAR_UNDERLINE:
508 case SID_ATTR_CHAR_STRIKEOUT:
513 case SID_ATTR_CHAR_CASEMAP:
605 assert(pPref &&
"pPref is set by here");
614 assert(
m_pUsrPref &&
"m_pUsrPref is set by here");
615 return o3tl::narrowing<sal_uInt16>(
m_pUsrPref->GetUpdateLinkMode());
622 assert(
m_pUsrPref &&
"m_pUsrPref is set by here");
630 assert(
m_pUsrPref &&
"m_pUsrPref is set by here");
638 assert(
m_pUsrPref &&
"m_pUsrPref is set by here");
643 bool bIsSpellWrongAgain,
bool bIsSpellAllAgain,
bool bSmartTags )
645 bool bOnlyWrong = bIsSpellWrongAgain && !bIsSpellAllAgain;
646 bool bInvalid = bOnlyWrong || bIsSpellAllAgain;
647 if( !(bOnlineSpelling || bInvalid) )
654 SwDoc* pTmp = pDocSh->GetDoc();
659 if ( bSmartTags && pViewShell && pViewShell->
GetWin() )
670 m_pUsrPref->SetDefaultPageMode(bIsSquaredPageMode);
virtual const SwViewShell * GetCurrentViewShell() const =0
Returns the layout set at the document.
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
static SAL_WARN_UNUSED_RESULT SfxObjectShell * GetNext(const SfxObjectShell &rPrev, const std::function< bool(const SfxObjectShell *)> &isObjectShell=nullptr, bool bOnlyVisible=true)
static SAL_WARN_UNUSED_RESULT SfxObjectShell * GetFirst(const std::function< bool(const SfxObjectShell *)> &isObjectShell=nullptr, bool bOnlyVisible=true)
SfxFrame & GetFrame() const
SfxViewFrame & GetViewFrame() const
static SAL_WARN_UNUSED_RESULT SfxViewShell * GetNext(const SfxViewShell &rPrev, bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
static SAL_WARN_UNUSED_RESULT SfxViewShell * GetFirst(bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
static SAL_WARN_UNUSED_RESULT SfxViewShell * Current()
OUString GetFullName() const
void SpellItAgainSam(bool bInvalid, bool bOnlyWrong, bool bSmartTags)
Re-trigger spelling in the idle handler.
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
bool IsVScrollMetric() const
FieldUnit GetHScrollMetric() const
void SetUsrPref(const SwViewOption &rCopy)
FieldUnit GetMetric() const
void SetVScrollMetric(FieldUnit eSet)
void SetMetric(FieldUnit eSet, bool bNoModify=false)
void SetApplyCharUnit(bool bSet, bool noModify=false)
bool IsHScrollMetric() const
FieldUnit GetVScrollMetric() const
bool IsApplyCharUnit() const
void SetHScrollMetric(FieldUnit eSet)
static void CheckSpellChanges(bool bOnlineSpelling, bool bIsSpellWrongAgain, bool bIsSpellAllAgain, bool bSmartTags)
std::size_t InsertRedlineAuthor(const OUString &rAuthor)
static SwView * GetNextView(SwView const *)
void GetInsertAuthorAttr(std::size_t nAuthor, SfxItemSet &rSet)
bool IsInsTableChangeNumFormat(bool bHTML) const
std::unique_ptr< SwPrintOptions > m_pWebPrintOptions
SwCompareMode GetCompareMode() const
const SwViewOption * GetViewOption(bool bWeb)
std::size_t GetRedlineAuthor()
SvtUserOptions & GetUserOptions()
SwFieldUpdateFlags GetFieldUpdateFlags() const
std::unique_ptr< SwNavigationConfig > m_pNavigationConfig
void ApplyRulerMetric(FieldUnit eMetric, bool bHorizontal, bool bWeb)
OUString const & GetDocStatWordDelim() const
void ApplyFieldUpdateFlags(SwFieldUpdateFlags eFieldFlags)
const SwMasterUsrPref * GetUsrPref(bool bWeb) const
static SwView * GetFirstView()
std::unique_ptr< SwMasterUsrPref, o3tl::default_delete< SwMasterUsrPref > > m_pWebUsrPref
void GetDeletedAuthorAttr(std::size_t nAuthor, SfxItemSet &rSet)
FieldUnit GetMetric(bool bWeb) const
bool m_bAuthorInitialised
void SetSplitVerticalByDefault(bool bHTML, bool value)
sal_uInt16 GetLinkUpdMode() const
bool IsSplitVerticalByDefault(bool bHTML) const
SwChapterNumRules * GetChapterNumRules()
void GetRedlineAuthorInfo(tools::JsonWriter &rJsonWriter)
See SwXTextDocument::getTrackedChangeAuthors().
bool IsInsTableAlignNum(bool bHTML) const
SwPrintOptions * GetPrtOptions(bool bWeb)
sal_uInt16 GetPieceLen() const
std::vector< OUString > m_pAuthorNames
void ApplyDefaultPageMode(bool bIsSquaredPageMode)
void ApplyUserMetric(FieldUnit eMetric, bool bWeb)
std::unique_ptr< SwMasterUsrPref, o3tl::default_delete< SwMasterUsrPref > > m_pUsrPref
void ApplyUsrPref(const SwViewOption &, SwView *, SvViewOpt nDest=SvViewOpt::DestView)
static void ShowDBObj(SwView const &rView, const SwDBData &rData)
std::unique_ptr< SwModuleOptions, o3tl::default_delete< SwModuleOptions > > m_pModuleConfig
void GetFormatAuthorAttr(std::size_t nAuthor, SfxItemSet &rSet)
SwNavigationConfig * GetNavigationConfig()
bool IsIgnorePieces() const
void ApplyUserCharUnit(bool bApplyChar, bool bWeb)
std::unique_ptr< SwPrintOptions > m_pPrintOptions
sal_uInt16 GetRedlineMarkPos() const
void SetRedlineAuthor(const OUString &rAuthor)
bool IsInsTableFormatNum(bool bHTML) const
void ClearRedlineAuthors()
void ApplyLinkMode(sal_Int32 nNewLinkMode)
const Color & GetRedlineMarkColor() const
std::unique_ptr< SwChapterNumRules > m_pChapterNumRules
void EnableHScrollbar(bool bEnable)
void EnableVScrollbar(bool bEnable)
void PrepareView(bool bIgnoreCount=false)
bool IsViewHRuler(bool bDirect=false) const
void SetIdle(bool b) const
bool IsVRulerRight() const
void SetPagePrevCol(sal_uInt8 n)
sal_uInt8 GetPagePrevCol() const
sal_uInt8 GetPagePrevRow() const
void SetPagePrevRow(sal_uInt8 n)
bool IsViewHScrollBar() const
bool getBrowseMode() const
bool IsViewVRuler(bool bDirect=false) const
bool IsViewVScrollBar() const
void SetUIOptions(const SwViewOption &)
const SwViewOption * GetViewOptions() const
virtual void ApplyViewOptions(const SwViewOption &rOpt)
void EndAction(const bool bIdleEnd=false)
vcl::Window * GetWin() const
virtual void SetReadonlyOption(bool bSet)
void SetUIOptions(const SwViewOption &rOpt)
SwWrtShell & GetWrtShell() const
void EnableVScrollbar(bool bEnable)
void EnableHScrollbar(bool bEnable)
SwPostItMgr * GetPostItMgr()
void ChangeVRulerMetric(FieldUnit eUnit)
SwDocShell * GetDocShell()
void ChangeTabMetric(FieldUnit eUnit)
Used by the UI to modify the document model.
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
constexpr ::Color COL_AUTHOR9_DARK(0xD1, 0x76, 0x00)
constexpr ::Color COL_AUTHOR8_DARK(0x35, 0x55, 0x6B)
constexpr ::Color COL_AUTHOR2_DARK(0x06, 0x46, 0xA2)
constexpr ::Color COL_AUTHOR3_DARK(0x57, 0x9D, 0x1C)
constexpr ::Color COL_AUTHOR6_DARK(0x00, 0x80, 0x80)
constexpr ::Color COL_AUTHOR7_DARK(0x8C, 0x84, 0x00)
constexpr ::Color COL_AUTHOR5_DARK(0xC5, 0x00, 0x0B)
constexpr ::Color COL_AUTHOR4_DARK(0x69, 0x2B, 0x9D)
constexpr ::Color COL_AUTHOR1_DARK(0xC6, 0x92, 0x00)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
constexpr TypedWhichId< SvxCrossedOutItem > RES_CHRATR_CROSSEDOUT(5)
constexpr TypedWhichId< SvxUnderlineItem > RES_CHRATR_UNDERLINE(14)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_WEIGHT(15)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CTL_WEIGHT(31)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_BACKGROUND(21)
constexpr TypedWhichId< SvxCaseMapItem > RES_CHRATR_CASEMAP(RES_CHRATR_BEGIN)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CTL_POSTURE(30)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CJK_WEIGHT(26)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CJK_POSTURE(25)
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
#define SAL_N_ELEMENTS(arr)
bool IsAsianTypographyEnabled()
Reference< XController > xController
Reference< XFrame > xFrame
static Color lcl_GetAuthorColor(std::size_t nPos)
SwWrtShell * GetActiveWrtShell()
static void lcl_FillAuthorAttr(std::size_t nAuthor, SfxItemSet &rSet, const AuthorCharAttr &rAttr)
static void lcl_SetUIPrefs(const SwViewOption &rPref, SwView *pView, SwViewShell *pSh)
OUString SwResId(TranslateId aId)