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>
52 #include <navicfg.hxx>
54 #include <strings.hrc>
61 using namespace ::
svx;
89 if(bVAlignChanged && !bHScrollChanged && !bVScrollChanged)
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());
220 if(eOldMetric != eMetric)
230 if(bWeb == (dynamic_cast<SwWebView*>( pTmpView) !=
nullptr) )
264 if(bWeb == (dynamic_cast<SwWebView *>( pTmpView ) !=
nullptr))
292 bool bHasChanged =
false;
293 if(bOldApplyCharUnit != bApplyChar)
306 eHScrollMetric = FieldUnit::CHAR;
307 eVScrollMetric = FieldUnit::LINE;
313 eHScrollMetric = FieldUnit::INCH;
314 else if ( eHScrollMetric == FieldUnit::CHAR )
315 eHScrollMetric = FieldUnit::CM;
317 eVScrollMetric = FieldUnit::INCH;
318 else if ( eVScrollMetric == FieldUnit::LINE )
319 eVScrollMetric = FieldUnit::CM;
325 if(bWeb == (dynamic_cast<SwWebView*>( pTmpView) !=
nullptr) )
369 uno::Reference<XFrame> xBeamerFrame = xFrame->findFrame(
"_beamer", FrameSearchFlag::CHILDREN);
370 if (!xBeamerFrame.is())
374 Reference<XController>
xController = xBeamerFrame->getController();
375 Reference<XSelectionSupplier> xControllerSelection(xController, UNO_QUERY);
376 if (xControllerSelection.is())
379 ODataAccessDescriptor aSelection;
381 aSelection[DataAccessDescriptorProperty::Command] <<= rData.
sCommand;
382 aSelection[DataAccessDescriptorProperty::CommandType] <<= rData.
nCommandType;
383 xControllerSelection->select(
makeAny(aSelection.createPropertyValueSequence()));
386 OSL_FAIL(
"no selection supplier in the beamer!");
426 static const Color aColArr[] =
439 auto authorsNode = rJsonWriter.
startNode(
"authors");
440 for (std::size_t nAuthor = 0; nAuthor <
m_pAuthorNames.size(); ++nAuthor)
442 auto authorNode = rJsonWriter.
startNode(
"");
443 rJsonWriter.
put(
"index", static_cast<sal_Int64>(nAuthor));
451 std::size_t
nPos = 0;
474 case SID_ATTR_CHAR_WEIGHT:
485 case SID_ATTR_CHAR_POSTURE:
496 case SID_ATTR_CHAR_UNDERLINE:
501 case SID_ATTR_CHAR_STRIKEOUT:
506 case SID_ATTR_CHAR_CASEMAP:
606 return static_cast<sal_uInt16
>(
m_pUsrPref->GetUpdateLinkMode());
631 bool bIsSpellWrongAgain,
bool bIsSpellAllAgain,
bool bSmartTags )
633 bool bOnlyWrong = bIsSpellWrongAgain && !bIsSpellAllAgain;
634 bool bInvalid = bOnlyWrong || bIsSpellAllAgain;
635 if( !(bOnlineSpelling || bInvalid) )
642 SwDoc* pTmp = pDocSh->GetDoc();
647 if ( bSmartTags && pViewShell && pViewShell->
GetWin() )
657 m_pUsrPref->SetDefaultPageMode(bIsSquaredPageMode);
SfxViewFrame * GetViewFrame() const
void ApplyUserCharUnit(bool bApplyChar, bool bWeb)
static void ShowDBObj(SwView const &rView, const SwDBData &rData)
constexpr TypedWhichId< SvxCrossedOutItem > RES_CHRATR_CROSSEDOUT(5)
virtual void ApplyViewOptions(const SwViewOption &rOpt)
void SetUsrPref(const SwViewOption &rCopy)
FieldUnit GetVScrollMetric() const
SwNavigationConfig * GetNavigationConfig()
void ChangeTabMetric(FieldUnit eUnit)
SwPrintOptions * GetPrtOptions(bool bWeb)
Reference< XFrame > xFrame
SwChapterNumRules * GetChapterNumRules()
void GetRedlineAuthorInfo(tools::JsonWriter &rJsonWriter)
See SwXTextDocument::getTrackedChangeAuthors().
void SetHScrollMetric(FieldUnit eSet)
SwWrtShell * GetActiveWrtShell()
bool IsApplyCharUnit() const
constexpr::Color COL_AUTHOR4_DARK(105, 43, 157)
constexpr TypedWhichId< SvxUnderlineItem > RES_CHRATR_UNDERLINE(14)
void SetSplitVerticalByDefault(bool bHTML, bool value)
bool IsSplitVerticalByDefault(bool bHTML) const
std::unique_ptr< SwMasterUsrPref, o3tl::default_delete< SwMasterUsrPref > > m_pWebUsrPref
bool IsIgnorePieces() const
void SetVScrollMetric(FieldUnit eSet)
const SwMasterUsrPref * GetUsrPref(bool bWeb) const
std::unique_ptr< SwChapterNumRules > m_pChapterNumRules
std::size_t GetRedlineAuthor()
void ApplyRulerMetric(FieldUnit eMetric, bool bHorizontal, bool bWeb)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CJK_POSTURE(25)
void GetInsertAuthorAttr(std::size_t nAuthor, SfxItemSet &rSet)
virtual void SetReadonlyOption(bool bSet)
void ApplyDefaultPageMode(bool bIsSquaredPageMode)
FieldUnit GetHScrollMetric() const
SwWrtShell & GetWrtShell() const
void SetPagePrevRow(sal_uInt8 n)
static void lcl_SetUIPrefs(const SwViewOption &rPref, SwView *pView, SwViewShell *pSh)
Used by the UI to modify the document model.
constexpr TypedWhichId< SvxCaseMapItem > RES_CHRATR_CASEMAP(RES_CHRATR_BEGIN)
static void CheckSpellChanges(bool bOnlineSpelling, bool bIsSpellWrongAgain, bool bIsSpellAllAgain, bool bSmartTags)
constexpr::Color COL_TRANSPARENT(0xFF, 0xFF, 0xFF, 0xFF)
Reference< XController > xController
const SwViewOption * GetViewOption(bool bWeb)
void ApplyLinkMode(sal_Int32 nNewLinkMode)
bool getBrowseMode() const
void GetFormatAuthorAttr(std::size_t nAuthor, SfxItemSet &rSet)
std::unique_ptr< SwPrintOptions > m_pWebPrintOptions
SfxFrame & GetFrame() const
static SfxViewShell * GetNext(const SfxViewShell &rPrev, bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
static SfxViewShell * Current()
constexpr::Color COL_AUTHOR6_DARK(0, 128, 128)
void SetUIOptions(const SwViewOption &rOpt)
constexpr::Color COL_AUTHOR8_DARK(53, 85, 107)
bool IsViewVScrollBar() const
constexpr::Color COL_AUTHOR2_DARK(6, 70, 162)
void EnableHScrollbar(bool bEnable)
std::vector< OUString > m_pAuthorNames
bool IsViewHRuler(bool bDirect=false) const
bool m_bAuthorInitialised
void PrepareView(bool bIgnoreCount=false)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_WEIGHT(15)
bool IsInsTableAlignNum(bool bHTML) const
#define SAL_N_ELEMENTS(arr)
const Color & GetRedlineMarkColor() const
void SetPagePrevCol(sal_uInt8 n)
std::size_t InsertRedlineAuthor(const OUString &rAuthor)
sal_uInt16 GetLinkUpdMode() const
constexpr::Color COL_AUTHOR9_DARK(209, 118, 0)
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
void GetDeletedAuthorAttr(std::size_t nAuthor, SfxItemSet &rSet)
bool IsViewVRuler(bool bDirect=false) const
SwFieldUpdateFlags GetFieldUpdateFlags() const
static SwView * GetFirstView()
bool IsInsTableFormatNum(bool bHTML) const
SvtUserOptions & GetUserOptions()
OUString SwResId(const char *pId)
void EnableHScrollbar(bool bEnable)
static SfxViewShell * GetFirst(bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
void SetApplyCharUnit(bool bSet, bool noModify=false)
void SpellItAgainSam(bool bInvalid, bool bOnlyWrong, bool bSmartTags)
Re-trigger spelling in the idle handler.
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
SwDocShell * GetDocShell()
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
sal_uInt8 GetPagePrevRow() const
void EndAction(const bool bIdleEnd=false)
constexpr::Color COL_AUTHOR1_DARK(198, 146, 0)
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
std::unique_ptr< SwModuleOptions, o3tl::default_delete< SwModuleOptions > > m_pModuleConfig
void EnableVScrollbar(bool bEnable)
bool IsVRulerRight() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_BACKGROUND(21)
bool IsAsianTypographyEnabled() const
FieldUnit GetMetric() const
void ApplyUserMetric(FieldUnit eMetric, bool bWeb)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CJK_WEIGHT(26)
void SetRedlineAuthor(const OUString &rAuthor)
bool IsVScrollMetric() const
static SfxObjectShell * GetFirst(const std::function< bool(const SfxObjectShell *)> &isObjectShell=nullptr, bool bOnlyVisible=true)
virtual const SwViewShell * GetCurrentViewShell() const =0
Returns the layout set at the document.
const SwViewOption * GetViewOptions() const
vcl::Window * GetWin() const
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CTL_WEIGHT(31)
constexpr::Color COL_AUTHOR5_DARK(197, 0, 11)
bool IsInsTableChangeNumFormat(bool bHTML) const
void SetIdle(bool b) const
bool IsHScrollMetric() const
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CTL_POSTURE(30)
std::unique_ptr< SwMasterUsrPref, o3tl::default_delete< SwMasterUsrPref > > m_pUsrPref
sal_uInt16 GetPieceLen() const
void ChangeVRulerMetric(FieldUnit eUnit)
SwPostItMgr * GetPostItMgr()
constexpr::Color COL_AUTHOR7_DARK(140, 132, 0)
std::unique_ptr< SwPrintOptions > m_pPrintOptions
SwCompareMode GetCompareMode() const
std::unique_ptr< SwNavigationConfig > m_pNavigationConfig
static SwView * GetNextView(SwView const *)
OUString GetFullName() const
static SfxObjectShell * GetNext(const SfxObjectShell &rPrev, const std::function< bool(const SfxObjectShell *)> &isObjectShell=nullptr, bool bOnlyVisible=true)
FieldUnit GetMetric(bool bWeb) const
void ApplyFieldUpdateFlags(SwFieldUpdateFlags eFieldFlags)
sal_uInt16 GetRedlineMarkPos() const
constexpr::Color COL_AUTHOR3_DARK(87, 157, 28)
static Color lcl_GetAuthorColor(std::size_t nPos)
bool IsViewHScrollBar() const
OUString const & GetDocStatWordDelim() const
void SetUIOptions(const SwViewOption &)
sal_uInt8 GetPagePrevCol() const
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
static void lcl_FillAuthorAttr(std::size_t nAuthor, SfxItemSet &rSet, const AuthorCharAttr &rAttr)
void SetMetric(FieldUnit eSet, bool bNoModify=false)
void EnableVScrollbar(bool bEnable)
void ApplyUsrPref(const SwViewOption &, SwView *, SvViewOpt nDest=SvViewOpt::DestView)
css::uno::Any SAL_CALL makeAny(const SharedUNOComponent< INTERFACE, COMPONENT > &value)