24#include <config_features.h>
25#include <config_wasm_strip.h>
33#include <officecfg/Office/Common.hxx>
54#include <inputwin.hxx>
67#include <drformsh.hxx>
90#include <com/sun/star/frame/FrameSearchFlag.hpp>
91#include <com/sun/star/frame/XLayoutManager.hpp>
92#include <com/sun/star/scanner/ScannerContext.hpp>
93#include <com/sun/star/scanner/XScannerManager2.hpp>
94#include <com/sun/star/lang/XMultiServiceFactory.hpp>
95#include <com/sun/star/sdb/XDatabaseContext.hpp>
96#include <com/sun/star/sdb/DatabaseContext.hpp>
105#include <com/sun/star/document/XDocumentProperties.hpp>
106#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
110#include <LibreOfficeKit/LibreOfficeKitEnums.h>
121#define SWVIEWFLAGS SfxViewShellFlags::HAS_PRINTOPTIONS
160 SetVerbs( Sequence< embed::VerbDescriptor >() );
178 const_cast< SwView*
>( this )->AttrChangedNotify(
nullptr);
183 if ( pAsAnnotationShell )
186 const_cast< SwView*
>( this )->AttrChangedNotify(
nullptr);
211 SdrView *pSdrView = m_pWrtShell ? m_pWrtShell->GetDrawView() :
nullptr;
215 AttrChangedNotify(
nullptr);
221uno::Reference<frame::XLayoutManager> getLayoutManager(
const SfxViewFrame& rViewFrame)
223 uno::Reference<frame::XLayoutManager> xLayoutManager;
230 xLayoutManager.set(xPropSet->getPropertyValue(
"LayoutManager"), uno::UNO_QUERY);
232 catch (
const Exception& e)
234 SAL_WARN(
"sw.ui",
"Failure getting layout manager: " + e.Message);
237 return xLayoutManager;
243 if (
auto xLayoutManager = getLayoutManager(
GetViewFrame()))
245 if (!xLayoutManager->getElement(sElementURL).is())
247 xLayoutManager->createElement(sElementURL);
248 xLayoutManager->showElement(sElementURL);
261 bool bUpdateTable =
false;
274 bool bUpdateFly =
false;
319 if (eId != ToolbarId::None)
322 for ( sal_uInt16
i = 0;
true; ++
i )
325 if (
dynamic_cast< const SwBaseShell *
>( pSfxShell ) !=
nullptr
332 rDispatcher.
Pop( *pSfxShell, SfxDispatcherPopFlags::POP_DELETE );
334 else if (
dynamic_cast< const FmFormShell *
>( pSfxShell ) !=
nullptr )
336 rDispatcher.
Pop( *pSfxShell );
343 bool bInitFormShell =
false;
346 bInitFormShell =
true;
352 bool bSetExtInpCntxt =
false;
393#if HAVE_FEATURE_AVMEDIA
423 bSetExtInpCntxt =
true;
437 bSetExtInpCntxt =
true;
464 if( bSetExtInpCntxt &&
GetWrtShell().HasReadonlySel() )
465 bSetExtInpCntxt =
false;
470 ( InputContextFlags::Text |
471 InputContextFlags::ExtText ))
474 InputContextFlags::ExtText )) );
493 if ( bInitFormShell && pDView )
498 if (
GetDocShell()->GetDoc()->IsOLEPrtNotifyPending() )
518 static int lcl_CmpIds(
const void *pFirst,
const void *pSecond)
520 return *
static_cast<sal_uInt16
const *
>(pFirst) - *
static_cast<sal_uInt16
const *
>(pSecond);
526 if ( GetEditWin().IsChainMode() )
527 GetEditWin().SetChainMode(
false );
529 if (!m_pWrtShell || !GetDocShell())
537 CheckReadonlyState();
540 CheckReadonlySelection();
542 if( !m_bAttrChgNotified )
548 m_bAttrChgNotified =
true;
552 GetObjectShell()->GetMedium()->GetItemSet().
553 GetItemIfSet( SID_HIDDEN,
false );
556 GetViewFrame().GetBindings().ENTERREGISTRATIONS();
557 m_bAttrChgNotifiedWithRegistrations =
true;
571 m_pPostItMgr->SetShadowState( m_pWrtShell->GetPostItFieldAtCursor() );
583 if ( m_bAttrChgNotifiedWithRegistrations )
585 GetViewFrame().GetBindings().LEAVEREGISTRATIONS();
586 m_bAttrChgNotifiedWithRegistrations =
false;
589 CheckReadonlyState();
590 CheckReadonlySelection();
592 bool bOldUndo = m_pWrtShell->DoesUndo();
593 m_pWrtShell->DoUndo(
false );
595 m_pWrtShell->DoUndo( bOldUndo );
596 m_bAttrChgNotified =
false;
597 GetViewImpl()->GetUNOObject_Impl()->NotifySelChanged();
614 static sal_uInt16 aROIds[] =
618 SID_REDO, SID_REPEAT, SID_PASTE,
622 SID_CHARMAP, FN_INSERT_SOFT_HYPHEN,
623 FN_INSERT_HARDHYPHEN, FN_INSERT_HARD_SPACE, FN_INSERT_NNBSP,
634 SID_ATTR_PARA_ADJUST_RIGHT, SID_ATTR_PARA_ADJUST_CENTER,SID_ATTR_PARA_ADJUST_BLOCK,
635 SID_ATTR_PARA_LINESPACE_10, SID_ATTR_PARA_LINESPACE_15, SID_ATTR_PARA_LINESPACE_20,
636 SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_FONTHEIGHT, SID_ATTR_CHAR_COLOR_BACKGROUND,
637 SID_ATTR_CHAR_BACK_COLOR,
638 SID_ATTR_CHAR_COLOR_BACKGROUND_EXT, SID_ATTR_CHAR_COLOR_EXT,
639 SID_ATTR_CHAR_COLOR, SID_ATTR_CHAR_WEIGHT, SID_ATTR_CHAR_POSTURE,
640 SID_ATTR_CHAR_OVERLINE,
641 SID_ATTR_CHAR_UNDERLINE, SID_ATTR_FLASH, SID_ATTR_CHAR_STRIKEOUT,
642 SID_ULINE_VAL_SINGLE, SID_ULINE_VAL_DOUBLE, SID_ULINE_VAL_DOTTED,
643 SID_ATTR_CHAR_CONTOUR, SID_ATTR_CHAR_SHADOWED,
646 SID_ATTR_CHAR_KERNING, SID_CHAR_DLG, SID_ATTR_CHAR_WORDLINEMODE,
649 SID_ATTR_PARA_SPLIT, SID_ATTR_PARA_KEEP, SID_ATTR_PARA_WIDOWS,
650 SID_ATTR_PARA_ORPHANS,
651 SID_ATTR_PARA_MODEL, SID_PARA_DLG,
655 static bool bFirst =
true;
661 if ( SfxItemState::DISABLED == eStateRO )
663 rDis.
SetSlotFilter( SfxSlotFilterState::ENABLED_READONLY, aROIds );
669 if ( SfxItemState::DISABLED == eStateProtAll )
671 static sal_uInt16 aAllProtIds[] = { SID_SAVEDOC,
FN_EDIT_REGION };
672 static bool bAllProtFirst =
true;
676 bAllProtFirst =
false;
678 rDis.
SetSlotFilter( SfxSlotFilterState::ENABLED_READONLY, aAllProtIds );
682 else if ( SfxItemState::DISABLED != eStateRO ||
683 SfxItemState::DISABLED != eStateProtAll )
699 !
m_pWrtShell->GetDrawView()->GetMarkedObjectList().GetMarkCount() ))
700 nDisableFlags |= SfxDisableFlags::SwOnProtectedCursor;
702 if( (SfxDisableFlags::SwOnProtectedCursor & nDisableFlags ) !=
724 aCntxt.
SetOptions( SfxDisableFlags::SwOnProtectedCursor & nDisableFlags
727 InputContextFlags::ExtText ))
729 ( InputContextFlags::Text |
730 InputContextFlags::ExtText )) );
749 m_aTimer(
"sw::SwView m_aTimer" ),
750 m_nNewPage(USHRT_MAX),
752 m_pNumRuleNodeFromDoc(nullptr),
755 m_pFormShell(nullptr),
756 m_pHScrollbar(nullptr),
757 m_pVScrollbar(nullptr),
763 m_pLastTableFormat(nullptr),
764 m_pLastFlyFormat(nullptr),
768 m_nDrawSfxId( USHRT_MAX ),
769 m_nFormSfxId( USHRT_MAX ),
772 m_nLeftBorderDistance( 0 ),
773 m_nRightBorderDistance( 0 ),
774 m_eLastSearchCommand( static_cast<
SvxSearchCmd>(0xFFFF) ),
775 m_bWheelScrollInProgress(false),
776 m_bCenterCursor(false),
778 m_bTabColFromDoc(false),
779 m_bTabRowFromDoc(false),
780 m_bSetTabColFromDoc(false),
781 m_bSetTabRowFromDoc(false),
782 m_bAttrChgNotified(false),
783 m_bAttrChgNotifiedWithRegistrations(false),
784 m_bVerbsActive(false),
785 m_bDrawRotate(false),
786 m_bDrawSelMode(true),
787 m_bShowAtResize(true),
788 m_bInOuterResizePixel(false),
789 m_bInInnerResizePixel(false),
790 m_bPasteState(false),
791 m_bPasteSpecialState(false),
792 m_bInMailMerge(false),
794 m_bOldShellWasPagePreview(false),
795 m_bIsPreviewDoubleClick(false),
796 m_bMakeSelectionVisible(false),
797 m_bForceChangesToolbar(true),
798 m_nLOKPageUpDownOffset(0)
800 static bool bRequestDoubleBuffering = getenv(
"VCL_DOUBLEBUFFERING_ENABLE");
801 if (bRequestDoubleBuffering)
837 bool bWebDShell =
dynamic_cast<const SwWebDocShell*
>(&rDocSh) !=
nullptr;
847 bool bOldShellWasSrcView =
false;
854 pExistingSh = pOldSh;
864 else if (
dynamic_cast<const SwSrcView *
>(pExistingSh) !=
nullptr)
865 bOldShellWasSrcView =
true;
868 SAL_INFO(
"sw.ui",
"before create WrtShell" );
922 SAL_INFO(
"sw.ui",
"after create WrtShell" );
924 SvxRulerSupportFlags::TABS |
925 SvxRulerSupportFlags::PARAGRAPH_MARGINS |
926 SvxRulerSupportFlags::BORDERS |
927 SvxRulerSupportFlags::NEGATIVE_MARGINS|
928 SvxRulerSupportFlags::REDUCED_METRIC,
934 const bool bIsDocModified =
m_pWrtShell->GetDoc()->getIDocumentState().IsModified();
941 if( SfxObjectCreateMode::EMBEDDED != rDocSh.
GetCreateMode() )
985 if (rDocSh.
GetCreateMode() == SfxObjectCreateMode::EMBEDDED &&
991 "sw.ui",
"/org.openoffice.Office.Common/Undo/Steps <= 0");
997 const bool bBrowse =
m_pWrtShell->GetViewOptions()->getBrowseMode();
1013#if !ENABLE_WASM_STRIP_ACCESSIBILITY
1017 if(
m_pWrtShell->GetDoc()->getIDocumentState().IsUpdateExpField() )
1019 if (
m_pWrtShell->GetDoc()->GetDocumentFieldsManager().containsUpdatableFields())
1024 m_pWrtShell->GetDoc()->getIDocumentFieldsAccess().UpdateFields(
false);
1027 m_pWrtShell->GetDoc()->getIDocumentState().SetUpdateExpFieldStat(
false );
1048 if (!
m_pWrtShell->GetDoc()->GetIDocumentUndoRedo().IsUndoNoResetModified() &&
1049 ( !pFirst || pFirst == &rVFrame ) &&
1067 uno::Reference< frame::XFrame > xBeamerFrame =
xFrame->findFrame(
1068 "_beamer", frame::FrameSearchFlag::CHILDREN);
1069 if(xBeamerFrame.is())
1097 if (
m_pWrtShell->GetViewOptions()->IsShowOutlineContentVisibilityButton())
1098 m_pWrtShell->InvalidateOutlineContentVisibility();
1118 SW_MOD()->SetView(
nullptr);
1160 const bool bWasLocked = pDrawModel->
isLocked();
1161 pDrawModel->setLock(
true);
1163 pDrawModel->setLock(bWasLocked);
1173 static bool bRequestDoubleBuffering = getenv(
"VCL_DOUBLEBUFFERING_ENABLE");
1174 if (bRequestDoubleBuffering)
1196 return dynamic_cast<SwDocShell*
>( pDocShell );
1210 rUserData = OUString::number( rRect.
Left() );
1212 rUserData += OUString::number( rRect.
Top() );
1214 rUserData += OUString::number(
m_pWrtShell->GetViewOptions()->GetZoom() );
1216 rUserData += OUString::number( rVis.
Left() );
1218 rUserData += OUString::number( rVis.
Top() );
1224 rUserData += OUString::number(
1225 static_cast<sal_uInt16
>(
m_pWrtShell->GetViewOptions()->GetZoomType()));
1238 uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
1240 uno::Reference<document::XDocumentProperties> xDocProps
1241 = xDPS->getDocumentProperties();
1242 OUString Created = xDocProps->getAuthor();
1243 OUString
Changed = xDocProps->getModifiedBy();
1251 if ( !(rUserData.indexOf(
';')>=0 &&
1267 Point aCursorPos( nX, nY );
1269 sal_uInt16 nZoomFactor =
1278 if ( nBottom > (
m_pWrtShell->GetDocSize().Height()+nAdd) )
1287 if( !
m_pWrtShell->GetViewOptions()->getBrowseMode() )
1291 eZoom = SvxZoomType::PERCENT;
1299 m_pViewImpl->SetRestorePosition(aCursorPos, bSelectObj);
1301 bool bSavedFlagValue =
m_pWrtShell->IsMacroExecAllowed();
1307 m_pWrtShell->SwCursorShell::SetCursor( aCursorPos, !bSelectObj );
1316 m_pWrtShell->SetMacroExecAllowed( bSavedFlagValue );
1334 sal_Int32 nIdx{ 0 };
1337 Point aCursorPos2( nXTmp, nYTmp );
1338 bSelectObj =
m_pWrtShell->IsObjSelectable( aCursorPos2 );
1340 m_pWrtShell->SwCursorShell::SetCursor( aCursorPos2 );
1379 sal_Int64 nX = rRect.
Left(), nY = rRect.
Top(), nLeft = rVis.
Left(), nTop = rVis.
Top();
1380 sal_Int16 nZoomType =
static_cast< sal_Int16
>(pVOpt->
GetZoomType());
1381 sal_Int16 nZoomFactor =
static_cast < sal_Int16
> (pVOpt->
GetZoom());
1386 bGotVisibleLeft =
false,
1387 bGotVisibleTop =
false,
1388 bGotZoomType =
false,
1389 bGotZoomFactor =
false, bGotIsSelectedFrame =
false,
1390 bGotViewLayoutColumns =
false, bGotViewLayoutBookMode =
false,
1391 bBrowseMode =
false, bGotBrowseMode =
false;
1393 bool bGotKeepRatio =
false;
1395 for (
const beans::PropertyValue& rValue : rSequence)
1397 if ( rValue.Name ==
"ViewLeft" )
1399 rValue.Value >>= nX;
1402 else if ( rValue.Name ==
"ViewTop" )
1404 rValue.Value >>= nY;
1407 else if ( rValue.Name ==
"VisibleLeft" )
1409 rValue.Value >>= nLeft;
1411 bGotVisibleLeft =
true;
1413 else if ( rValue.Name ==
"VisibleTop" )
1415 rValue.Value >>= nTop;
1417 bGotVisibleTop =
true;
1419 else if ( rValue.Name ==
"ZoomType" )
1421 rValue.Value >>= nZoomType;
1422 bGotZoomType =
true;
1424 else if ( rValue.Name ==
"ZoomFactor" )
1426 rValue.Value >>= nZoomFactor;
1427 bGotZoomFactor =
true;
1429 else if ( rValue.Name ==
"ViewLayoutColumns" )
1431 rValue.Value >>= nViewLayoutColumns;
1432 bGotViewLayoutColumns =
true;
1434 else if ( rValue.Name ==
"ViewLayoutBookMode" )
1436 bViewLayoutBookMode = *o3tl::doAccess<bool>(rValue.Value);
1437 bGotViewLayoutBookMode =
true;
1439 else if ( rValue.Name ==
"IsSelectedFrame" )
1441 rValue.Value >>= bSelectedFrame;
1442 bGotIsSelectedFrame =
true;
1444 else if (rValue.Name ==
"ShowOnlineLayout")
1446 rValue.Value >>= bBrowseMode;
1447 bGotBrowseMode =
true;
1449 else if (rValue.Name ==
"KeepRatio")
1451 rValue.Value >>= bKeepRatio;
1452 bGotKeepRatio =
true;
1466 Point aCursorPos( nX, nY );
1471 if ( !
m_pWrtShell->GetViewOptions()->getBrowseMode() )
1472 eZoom =
static_cast < SvxZoomType > ( nZoomType );
1475 eZoom = SvxZoomType::PERCENT;
1477 if (bGotIsSelectedFrame)
1479 bool bSelectObj = bSelectedFrame &&
m_pWrtShell->IsObjSelectable( aCursorPos );
1482 bool bSavedFlagValue =
m_pWrtShell->IsMacroExecAllowed();
1486 m_pViewImpl->SetRestorePosition(aCursorPos, bSelectObj);
1489 m_pWrtShell->SwCursorShell::SetCursor( aCursorPos, !bSelectObj );
1492 bool bInHeader =
true;
1493 if (
m_pWrtShell->IsInHeaderFooter( &bInHeader ) )
1520 m_pWrtShell->SetMacroExecAllowed( bSavedFlagValue );
1523 if (bGotKeepRatio && bKeepRatio != pVOpt->
IsKeepRatio())
1528 SW_MOD()->ApplyUsrPref(aUsrPref,
this);
1532 const bool bSetViewLayoutSettings = bGotViewLayoutColumns && bGotViewLayoutBookMode &&
1535 const bool bSetViewSettings = bGotZoomType && bGotZoomFactor &&
1542 const bool bZoomNeedsViewLayout = bSetViewLayoutSettings &&
1543 1 < nViewLayoutColumns &&
1545 eZoom != SvxZoomType::PERCENT;
1547 if ( !bZoomNeedsViewLayout )
1550 if ( bSetViewLayoutSettings )
1551 SetViewLayout( nViewLayoutColumns, bViewLayoutBookMode,
true );
1553 if ( bZoomNeedsViewLayout )
1556 if ( bSetViewSettings )
1557 SetZoom( eZoom, nZoomFactor,
true );
1563 if ( bGotVisibleLeft && bGotVisibleTop )
1565 Point aTopLeft(nLeft, nTop);
1575 if( aTopLeft.
X() > nXMax )
1576 aTopLeft.
setX( nXMax < 0 ? 0 : nXMax );
1594 std::vector<beans::PropertyValue> aVector;
1618 const sal_Int16 nZoomType =
static_cast< sal_Int16
>(
m_pWrtShell->GetViewOptions()->GetZoomType());
1621 const sal_Int16 nViewLayoutColumns =
static_cast< sal_Int16
>(
m_pWrtShell->GetViewOptions()->GetViewLayoutColumns());
1670 return bText ?
GetWrtShell().SwCursorShell::HasSelection()
1700 bool bCallBase =
true;
1703 bool bDesignMode = pChangedHint->GetDesignMode();
1709 AttrChangedNotify(
nullptr);
1720 case SfxHintId::Dying:
1728 case SfxHintId::ModeChanged:
1738 case SfxHintId::TitleChanged:
1764 SfxBoolItem aItem( SID_FM_DESIGN_MODE, !bReadonly);
1766 SfxCallMode::ASYNCHRON, { &aItem });
1770 case SfxHintId::SwDrawViewsCreated:
1778 SfxCallMode::SYNCHRON, { &aItem });
1782 case SfxHintId::RedlineChanged:
1784 static sal_uInt16
const aSlotRedLine[] = {
1804#if defined(_WIN32) || defined UNX
1808 uno::Reference< XScannerManager2 > xScanMgr =
SW_MOD()->GetScannerManager();
1811 const ScannerContext aContext( xScanMgr->getAvailableScanners().getConstArray()[ 0 ] );
1812 const ScanError eError = xScanMgr->getError( aContext );
1814 if( ScanError_ScanErrorNone == eError )
1816 const uno::Reference< awt::XBitmap > xBitmap( xScanMgr->getBitmap( aContext ) );
1825 m_pWrtShell->InsertGraphic( OUString(), OUString(), aGrf );
1854 rVFrame.
SetChildWindow( SwInputChild::GetChildWindowId(),
false );
1926 return aDataHelper.
HasFormat( SotClipboardFormatId::SYLK ) || aDataHelper.
HasFormat( SotClipboardFormatId::SYLK_BIGCAPS );
1952 return pVwSh->getLOKVisibleArea();
1960 pSh->FlushPendingLOKInvalidateTiles();
1966 return pSh->getLOKPayload(
nType, nViewId);
1968 return std::nullopt;
1973 uno::Reference<lang::XMultiServiceFactory>
xFactory(
GetDocShell()->GetModel(), uno::UNO_QUERY);
1974 uno::Reference<beans::XPropertySet> xSettings(
1975 xFactory->createInstance(
"com.sun.star.document.Settings"), uno::UNO_QUERY);
1976 OUString sDataSourceName =
"";
1977 xSettings->getPropertyValue(
"CurrentDatabaseDataSource") >>= sDataSourceName;
1979 return sDataSourceName;
1984 uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
1985 Reference< XDatabaseContext> xDatabaseContext = DatabaseContext::create(xContext);
1987 return xDatabaseContext->hasByName(sDataSourceName);
1994 o_rData = *
SW_MOD()->GetPrtOptions(bWeb);
constexpr auto convertTwipToMm100(N n)
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
virtual void SetCurrentViewShell(SwViewShell *pNew)=0
!!!The old layout must be deleted!!!
virtual const SwViewShell * GetCurrentViewShell() const =0
Returns the layout set at the document.
virtual void ClearFieldActivation()=0
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
virtual void set(DocumentSettingId id, bool value)=0
Set the specified document setting.
InputContextFlags GetOptions() const
void SetOptions(InputContextFlags nOptions)
Size GetOutputSize() const
void setX(tools::Long nX)
constexpr tools::Long X() const
void SetDesignMode(bool bOn=true)
void ReadUserDataSequenceValue(const css::beans::PropertyValue *pValue)
void WriteUserDataSequence(css::uno::Sequence< css::beans::PropertyValue > &rValues)
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally=false)
void DisposeUndoManager()
virtual bool IsTextEdit() const final override
void Invalidate(sal_uInt16 nId)
void InvalidateAll(bool bWithMsg)
void SetDisableFlags(SfxDisableFlags nFlags)
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
ToolbarId GetObjectBarId(sal_uInt16 nPos) const
void SetSlotFilter(SfxSlotFilterState nEnable=SfxSlotFilterState::DISABLED, o3tl::span< sal_uInt16 const > pSIDs=o3tl::span< sal_uInt16 const >())
void Pop(SfxShell &rShell, SfxDispatcherPopFlags nMode=SfxDispatcherPopFlags::NONE)
SfxDisableFlags GetDisableFlags() const
void Push(SfxShell &rShell)
SfxShell * GetShell(sal_uInt16 nIdx) const
SfxItemState QueryState(sal_uInt16 nSID, const SfxPoolItem *&rpState)
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
static void notifyOtherViews(const SfxViewShell *pThisView, int nType, std::string_view rKey, const OString &rPayload)
bool IsInModalMode() const
bool IsEnableSetModified() const
css::uno::Reference< css::frame::XModel3 > GetModel() const
void EnableSetModified(bool bEnable=true)
SfxObjectCreateMode GetCreateMode() const
SfxItemPool & GetPool() const
void SetVerbs(const css::uno::Sequence< css::embed::VerbDescriptor > &aVerbs)
SfxViewFrame * GetFrame() const
SfxViewShell * GetViewShell() const
void SetName(const OUString &rName)
vcl::Window & GetWindow() const
SfxBindings & GetBindings()
void SetChildWindow(sal_uInt16 nId, bool bVisible, bool bSetFocus=true)
SfxDispatcher * GetDispatcher()
SfxChildWindow * GetChildWindow(sal_uInt16)
static SAL_WARN_UNUSED_RESULT SfxViewFrame * GetFirst(const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
SfxFrame & GetFrame() const
virtual SfxObjectShell * GetObjectShell() override
virtual bool PrepareClose(bool bUI=true)
virtual void libreOfficeKitViewCallback(int nType, const OString &pPayload) const override
SfxViewFrame & GetViewFrame() const
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
void SetNewWindowAllowed(bool bSet)
void SetWindow(vcl::Window *pViewPort)
vcl::Window * GetWindow() const
const Size & GetMargin() const
constexpr tools::Long Width() const
void GetOptions(SvtLinguOptions &rOptions) const
void SetView(SwView *pVw)
Set View for actions via Shell.
const SwView * GetView() const
virtual tools::Rectangle GetVisArea(sal_uInt16 nAspect) const override
SwDoc * GetDoc()
returns Doc. But be careful!
void PrtOLENotify(bool bAll)
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
IDocumentSettingAccess const & getIDocumentSettingAccess() const
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
virtual void Deactivate()
SfxShell subclass that is used while interacting with the editeng-based text of a shape.
void GetSelectedText(OUString &rBuf, ParaBreakType nHndlParaBreak=ParaBreakType::ToBlank)
Query text within selection.
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
void UpdatePointer(const Point &, sal_uInt16 nButtons=0)
FieldUnit GetHScrollMetric() const
FieldUnit GetVScrollMetric() const
static void ShowDBObj(SwView const &rView, const SwDBData &rData)
bool ResetFormDesignMode() const
bool FormDesignModeToReset() const
Of course Writer needs its own rectangles.
void Top(const tools::Long nTop)
void Left(const tools::Long nLeft)
static bool IsPasteOwnFormat(const TransferableDataHelper &)
static bool IsPasteSpecial(const SwWrtShell &rWrtShell, const TransferableDataHelper &)
static SotExchangeDest GetSotDestination(const SwWrtShell &rSh)
static bool IsPaste(const SwWrtShell &, const TransferableDataHelper &)
SwViewGlueDocShell(SwView &rView, SwDocShell &rDocSh)
bool IsViewHRuler(bool bDirect=false) const
bool IsViewLayoutBookMode() const
SvxZoomType GetZoomType() const
bool IsShowHiddenField() const
bool IsShowHiddenPara() const
sal_uInt16 GetZoom() const
void SetZoomType(SvxZoomType eZoom_)
void SetZoom(sal_uInt16 n)
sal_uInt16 GetViewLayoutColumns() const
bool IsViewHScrollBar() const
void SetKeepRatio(bool b)
bool getBrowseMode() const
bool IsShowHiddenChar(bool bHard=false) const
void SetOnlineSpell(bool b)
bool IsViewVRuler(bool bDirect=false) const
bool IsCursorInProtectedArea() const
void SetReadonly(bool bSet)
bool IsViewVScrollBar() const
void SetViewLayoutColumns(sal_uInt16 nNew)
void SetViewLayoutBookMode(bool bNew)
void setBrowseMode(bool bSet)
const SwViewOption * GetViewOptions() const
virtual void ApplyViewOptions(const SwViewOption &rOpt)
const IDocumentMarkAccess * getIDocumentMarkAccess() const
Provides access to the document bookmark interface.
const IDocumentDrawModelAccess & getIDocumentDrawModelAccess() const
Provides access to the document draw model interface.
void AddTransferable(SwTransferable &rTransferable)
SwXTextView * GetUNOObject_Impl()
virtual bool PrepareClose(bool bUI=true) override
SwView(SfxViewFrame &rFrame, SfxViewShell *)
void afterCallbackRegistered() override
See SfxViewShell::afterCallbackRegistered().
virtual ErrCode DoVerb(sal_Int32 nVerb) override
VclPtr< SwScrollbar > m_pHScrollbar
FmFormShell * m_pFormShell
SAL_DLLPRIVATE void CheckReadonlyState()
SotExchangeDest m_nLastPasteDestination
virtual void WriteUserData(OUString &, bool bBrowse=false) override
virtual bool HasSelection(bool bText=true) const override
virtual void ReadUserDataSequence(const css::uno::Sequence< css::beans::PropertyValue > &) override
SfxDispatcher & GetDispatcher()
virtual void flushPendingLOKInvalidateTiles() override
static SvxSearchItem * s_pSrchItem
SwWrtShell & GetWrtShell() const
SAL_DLLPRIVATE void CheckReadonlySelection()
std::unique_ptr< SwGlossaryHdl > m_pGlosHdl
std::unique_ptr< SwView_Impl > m_pViewImpl
std::unique_ptr< SwWrtShell > m_pWrtShell
virtual OUString GetSelectionText(bool bCompleteWords=false, bool bOnlyASample=false) override
virtual SdrView * GetDrawView() const override
virtual std::optional< OString > getLOKPayload(int nType, int nViewId) const override
std::unique_ptr< SwPostItMgr > m_pPostItMgr
VclPtr< SwScrollbar > m_pVScrollbar
virtual void SelectShell()
virtual FmFormShell * GetFormShell() override
void Execute(SfxRequest &)
bool m_bVScrollbarEnabled
VclPtr< SvxRuler > m_pHRuler
VclPtr< SvxRuler > m_pVRuler
VclPtr< SwEditWin > m_pEditWin
void SetViewLayout(sal_uInt16 nColumns, bool bBookMode, bool bViewOnly=false)
void ShowHScrollbar(bool bShow)
std::unique_ptr< SwFormatClipboard > m_pFormatClipboard
const tools::Rectangle & GetVisArea() const
static std::unique_ptr< SearchAttrItemList > s_xReplaceList
virtual tools::Rectangle getLOKVisibleArea() const override
SfxObjectShellLock CreateTmpSelectionDoc()
virtual ~SwView() override
virtual void WriteUserDataSequence(css::uno::Sequence< css::beans::PropertyValue > &) override
bool m_bOldShellWasPagePreview
static std::unique_ptr< SearchAttrItemList > s_xSearchList
bool m_bPasteSpecialState
OUString GetDataSourceName() const
void ImpSetVerb(SelectionType nSelType)
virtual void ReadUserData(const OUString &, bool bBrowse=false) override
SelectionType m_nSelectionType
void AddTransferable(SwTransferable &rTransferable)
bool m_bInitOnceCompleted
bool IsPasteSpecialAllowed()
SwWrtShell * GetWrtShellPtr() const
SwDrawBase * GetDrawFuncPtr() const
SwGlossaryHdl * GetGlosHdl()
virtual void ShowCursor(bool bOn=true) override
void SetDrawFuncPtr(std::unique_ptr< SwDrawBase > pFuncPtr)
virtual SAL_DLLPRIVATE void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
std::unique_ptr< SwViewGlueDocShell > m_xGlueDocShell
SwDocShell * GetDocShell()
SwView_Impl * GetViewImpl()
void DocSzChgd(const Size &rNewSize)
bool m_bAttrChgNotifiedWithRegistrations
SAL_DLLPRIVATE void CreateScrollbar(bool bHori)
void SetVisArea(const tools::Rectangle &, bool bUpdateScrollbar=true)
bool m_bIsPreviewDoubleClick
const SwFrameFormat * m_pLastTableFormat
void ShowUIElement(const OUString &sElementURL) const
static bool IsDataSourceAvailable(const OUString sDataSourceName)
void ShowVScrollbar(bool bShow)
bool m_bHScrollbarEnabled
const SwFrameFormat * m_pLastFlyFormat
bool IsPasteSpreadsheet(bool bHasOwnTableCopied)
void SetZoom(SvxZoomType eZoomType, short nFactor=100, bool bViewOnly=false)
OUString GetSelectionTextParam(bool bCompleteWords, bool bEraseTrail)
static bool s_bJustOpened
Used by the UI to modify the document model.
SelectionType GetSelectionType() const
virtual void SetReadonlyOption(bool bSet) override
bool HasSelection() const
bool SelWrd(const Point *=nullptr)
void LaunchOLEObj(sal_Int32 nVerb=css::embed::EmbedVerbs::MS_OLEVERB_PRIMARY)
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getViewSettings() override
SfxObjectShellLock BuildTmpSelectionDoc()
void SetTimeout(sal_uInt64 nTimeoutMs)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
static TransferableDataHelper CreateFromSystemClipboard(vcl::Window *pWindow)
bool HasFormat(SotClipboardFormatId nFormat) const
css::uno::Reference< css::datatransfer::XTransferable > GetXTransferable() const
static BitmapEx GetBitmap(const css::uno::Reference< css::awt::XBitmap > &rxBitmap)
static VclPtr< reference_type > Create(Arg &&... arg)
Point OutputToScreenPixel(const Point &rPos) const
void SetInputContext(const InputContext &rInputContext)
::OutputDevice const * GetOutDev() const
void AddChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
Point PixelToLogic(const Point &rDevicePt) const
void RemoveChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
#define FN_REDLINE_ACCEPT_DIRECT
#define FN_TABLE_PASTE_COL_BEFORE
#define FN_FORMAT_DROPCAPS
#define FN_INSERT_LINEBREAK
#define FN_INSERT_BOOKMARK
#define FN_INSERT_BREAK_DLG
#define FN_INSERT_COMBO_BOX_CONTENT_CONTROL
#define FN_INSERT_CONTENT_CONTROL
#define FN_SET_SUPER_SCRIPT
#define FN_INSERT_PLAIN_TEXT_CONTENT_CONTROL
#define FN_REDLINE_ACCEPT_ALL
#define FN_DELETE_BACK_LINE
#define FN_SHIFT_BACKSPACE
#define FN_GROW_FONT_SIZE
#define FN_SHRINK_FONT_SIZE
#define FN_INSERT_DROPDOWN_CONTENT_CONTROL
#define FN_DELETE_BACK_PARA
#define FN_REDLINE_REJECT_DIRECT
#define FN_DELETE_BACK_WORD
#define FN_INSERT_DATE_CONTENT_CONTROL
#define FN_PASTE_NESTED_TABLE
#define FN_REDLINE_NEXT_CHANGE
#define FN_REDLINE_PREV_CHANGE
#define FN_DELETE_WHOLE_LINE
#define FN_SET_SUB_SCRIPT
#define FN_INSERT_COLUMN_BREAK
#define FN_INSERT_PICTURE_CONTENT_CONTROL
#define FN_INSERT_CHECKBOX_CONTENT_CONTROL
#define FN_REDLINE_REJECT_ALL
#define FN_TABLE_PASTE_ROW_BEFORE
#define FN_DELETE_BACK_SENT
virtual SfxBindings & GetBindings() override
Reference< XSingleServiceFactory > xFactory
FlyProtectFlags
values can be combined via logical or
constexpr OUStringLiteral IsReadOnly(u"IsReadOnly")
#define LINK(Instance, Class, Member)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
#define SAL_N_ELEMENTS(arr)
constexpr OUStringLiteral aData
SfxDispatcher * GetDispatcher()
OString stripEnd(const OString &rIn, char c)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
constexpr auto toTwips(N number, Length from)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
Dialog to specify the properties of date form field.
void InitPrintOptionsFromApplication(SwPrintData &o_rData, bool const bWeb)
#define SFX_OBJECTBAR_OBJECT
constexpr auto WB_STDRULER
constexpr WinBits WB_EXTRAFIELD
@ PARAGRAPH_MARGINS_VERTICAL
Reference< XFrame > xFrame
constexpr SwTwips DOCUMENTBORDER
static bool lcl_IsOwnDocument(SwView &rView)
static int lcl_CmpIds(const void *pFirst, const void *pSecond)
IMPL_LINK_NOARG(SwView, FormControlActivated, LinkParamNone *, void)