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>
53 #include <navicfg.hxx>
55 #include <strings.hrc>
62 using namespace ::
svx;
90 if(bVAlignChanged && !bHScrollChanged && !bVScrollChanged)
119 return dynamic_cast<SwView*
>( pView );
131 OSL_ENSURE( pView,
"return no SwView" );
140 SwView* pCurrView = pActView;
146 && dynamic_cast< const SwWebView *>( pCurrView )) ));
182 std::unique_ptr<SwViewOption> xViewOpt;
187 xViewOpt->SetReadonly( bReadonly );
193 static_cast<SwWrtShell*
>(pSh)->SetReadOnlyAvailable(xViewOpt->IsCursorInProtectedArea());
221 if(eOldMetric != eMetric)
231 if(bWeb == (dynamic_cast<SwWebView*>( pTmpView) !=
nullptr) )
265 if(bWeb == (dynamic_cast<SwWebView *>( pTmpView ) !=
nullptr))
293 bool bHasChanged =
false;
294 if(bOldApplyCharUnit != bApplyChar)
307 eHScrollMetric = FieldUnit::CHAR;
308 eVScrollMetric = FieldUnit::LINE;
314 eHScrollMetric = FieldUnit::INCH;
315 else if ( eHScrollMetric == FieldUnit::CHAR )
316 eHScrollMetric = FieldUnit::CM;
318 eVScrollMetric = FieldUnit::INCH;
319 else if ( eVScrollMetric == FieldUnit::LINE )
320 eVScrollMetric = FieldUnit::CM;
326 if(bWeb == (dynamic_cast<SwWebView*>( pTmpView) !=
nullptr) )
370 uno::Reference<XFrame> xBeamerFrame = xFrame->findFrame(
"_beamer", FrameSearchFlag::CHILDREN);
371 if (!xBeamerFrame.is())
375 Reference<XController>
xController = xBeamerFrame->getController();
376 Reference<XSelectionSupplier> xControllerSelection(xController, UNO_QUERY);
377 if (xControllerSelection.is())
380 ODataAccessDescriptor aSelection;
382 aSelection[DataAccessDescriptorProperty::Command] <<= rData.
sCommand;
383 aSelection[DataAccessDescriptorProperty::CommandType] <<= rData.
nCommandType;
384 xControllerSelection->select(
makeAny(aSelection.createPropertyValueSequence()));
387 OSL_FAIL(
"no selection supplier in the beamer!");
427 static const Color aColArr[] =
440 auto authorsNode = rJsonWriter.
startArray(
"authors");
441 for (std::size_t nAuthor = 0; nAuthor <
m_pAuthorNames.size(); ++nAuthor)
444 rJsonWriter.
put(
"index", static_cast<sal_Int64>(nAuthor));
452 std::size_t
nPos = 0;
475 case SID_ATTR_CHAR_WEIGHT:
486 case SID_ATTR_CHAR_POSTURE:
497 case SID_ATTR_CHAR_UNDERLINE:
502 case SID_ATTR_CHAR_STRIKEOUT:
507 case SID_ATTR_CHAR_CASEMAP:
607 return static_cast<sal_uInt16
>(
m_pUsrPref->GetUpdateLinkMode());
632 bool bIsSpellWrongAgain,
bool bIsSpellAllAgain,
bool bSmartTags )
634 bool bOnlyWrong = bIsSpellWrongAgain && !bIsSpellAllAgain;
635 bool bInvalid = bOnlyWrong || bIsSpellAllAgain;
636 if( !(bOnlineSpelling || bInvalid) )
643 SwDoc* pTmp = pDocSh->GetDoc();
648 if ( bSmartTags && pViewShell && pViewShell->
GetWin() )
658 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)
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
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)
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)