24#include <config_features.h>
25#include <config_wasm_strip.h>
32#include <officecfg/Office/Common.hxx>
53#include <inputwin.hxx>
66#include <drformsh.hxx>
89#include <com/sun/star/frame/FrameSearchFlag.hpp>
90#include <com/sun/star/frame/XLayoutManager.hpp>
91#include <com/sun/star/scanner/ScannerContext.hpp>
92#include <com/sun/star/scanner/XScannerManager2.hpp>
93#include <com/sun/star/lang/XMultiServiceFactory.hpp>
94#include <com/sun/star/sdb/XDatabaseContext.hpp>
95#include <com/sun/star/sdb/DatabaseContext.hpp>
104#include <com/sun/star/document/XDocumentProperties.hpp>
105#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
109#include <LibreOfficeKit/LibreOfficeKitEnums.h>
120#define SWVIEWFLAGS SfxViewShellFlags::HAS_PRINTOPTIONS
159 SetVerbs( Sequence< embed::VerbDescriptor >() );
177 const_cast< SwView*
>( this )->AttrChangedNotify(
nullptr);
182 if ( pAsAnnotationShell )
185 const_cast< SwView*
>( this )->AttrChangedNotify(
nullptr);
210 SdrView *pSdrView = m_pWrtShell ? m_pWrtShell->GetDrawView() :
nullptr;
214 AttrChangedNotify(
nullptr);
220uno::Reference<frame::XLayoutManager> getLayoutManager(
const SfxViewFrame& rViewFrame)
222 uno::Reference<frame::XLayoutManager> xLayoutManager;
229 xLayoutManager.set(xPropSet->getPropertyValue(
"LayoutManager"), uno::UNO_QUERY);
231 catch (
const Exception& e)
233 SAL_WARN(
"sw.ui",
"Failure getting layout manager: " + e.Message);
236 return xLayoutManager;
242 if (
auto xLayoutManager = getLayoutManager(
GetViewFrame()))
244 if (!xLayoutManager->getElement(sElementURL).is())
246 xLayoutManager->createElement(sElementURL);
247 xLayoutManager->showElement(sElementURL);
260 bool bUpdateTable =
false;
273 bool bUpdateFly =
false;
318 if (eId != ToolbarId::None)
321 for ( sal_uInt16
i = 0;
true; ++
i )
324 if (
dynamic_cast< const SwBaseShell *
>( pSfxShell ) !=
nullptr
331 rDispatcher.
Pop( *pSfxShell, SfxDispatcherPopFlags::POP_DELETE );
333 else if (
dynamic_cast< const FmFormShell *
>( pSfxShell ) !=
nullptr )
335 rDispatcher.
Pop( *pSfxShell );
342 bool bInitFormShell =
false;
345 bInitFormShell =
true;
351 bool bSetExtInpCntxt =
false;
392#if HAVE_FEATURE_AVMEDIA
422 bSetExtInpCntxt =
true;
436 bSetExtInpCntxt =
true;
463 if( bSetExtInpCntxt &&
GetWrtShell().HasReadonlySel() )
464 bSetExtInpCntxt =
false;
469 ( InputContextFlags::Text |
470 InputContextFlags::ExtText ))
473 InputContextFlags::ExtText )) );
492 if ( bInitFormShell && pDView )
497 if (
GetDocShell()->GetDoc()->IsOLEPrtNotifyPending() )
517 static int lcl_CmpIds(
const void *pFirst,
const void *pSecond)
519 return *
static_cast<sal_uInt16
const *
>(pFirst) - *
static_cast<sal_uInt16
const *
>(pSecond);
525 if ( GetEditWin().IsChainMode() )
526 GetEditWin().SetChainMode(
false );
528 if (!m_pWrtShell || !GetDocShell())
536 CheckReadonlyState();
539 CheckReadonlySelection();
541 if( !m_bAttrChgNotified )
547 m_bAttrChgNotified =
true;
551 GetObjectShell()->GetMedium()->GetItemSet()->
552 GetItemIfSet( SID_HIDDEN,
false );
555 GetViewFrame().GetBindings().ENTERREGISTRATIONS();
556 m_bAttrChgNotifiedWithRegistrations =
true;
570 m_pPostItMgr->SetShadowState( m_pWrtShell->GetPostItFieldAtCursor() );
582 if ( m_bAttrChgNotifiedWithRegistrations )
584 GetViewFrame().GetBindings().LEAVEREGISTRATIONS();
585 m_bAttrChgNotifiedWithRegistrations =
false;
588 CheckReadonlyState();
589 CheckReadonlySelection();
591 bool bOldUndo = m_pWrtShell->DoesUndo();
592 m_pWrtShell->DoUndo(
false );
594 m_pWrtShell->DoUndo( bOldUndo );
595 m_bAttrChgNotified =
false;
596 GetViewImpl()->GetUNOObject_Impl()->NotifySelChanged();
613 static sal_uInt16 aROIds[] =
617 SID_REDO, SID_REPEAT, SID_PASTE,
621 SID_CHARMAP, FN_INSERT_SOFT_HYPHEN,
622 FN_INSERT_HARDHYPHEN, FN_INSERT_HARD_SPACE, FN_INSERT_NNBSP,
633 SID_ATTR_PARA_ADJUST_RIGHT, SID_ATTR_PARA_ADJUST_CENTER,SID_ATTR_PARA_ADJUST_BLOCK,
634 SID_ATTR_PARA_LINESPACE_10, SID_ATTR_PARA_LINESPACE_15, SID_ATTR_PARA_LINESPACE_20,
635 SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_FONTHEIGHT, SID_ATTR_CHAR_COLOR_BACKGROUND,
636 SID_ATTR_CHAR_BACK_COLOR,
637 SID_ATTR_CHAR_COLOR_BACKGROUND_EXT, SID_ATTR_CHAR_COLOR_EXT,
638 SID_ATTR_CHAR_COLOR, SID_ATTR_CHAR_WEIGHT, SID_ATTR_CHAR_POSTURE,
639 SID_ATTR_CHAR_OVERLINE,
640 SID_ATTR_CHAR_UNDERLINE, SID_ATTR_FLASH, SID_ATTR_CHAR_STRIKEOUT,
641 SID_ULINE_VAL_SINGLE, SID_ULINE_VAL_DOUBLE, SID_ULINE_VAL_DOTTED,
642 SID_ATTR_CHAR_CONTOUR, SID_ATTR_CHAR_SHADOWED,
645 SID_ATTR_CHAR_KERNING, SID_CHAR_DLG, SID_ATTR_CHAR_WORDLINEMODE,
648 SID_ATTR_PARA_SPLIT, SID_ATTR_PARA_KEEP, SID_ATTR_PARA_WIDOWS,
649 SID_ATTR_PARA_ORPHANS,
650 SID_ATTR_PARA_MODEL, SID_PARA_DLG,
654 static bool bFirst =
true;
660 if ( SfxItemState::DISABLED == eStateRO )
662 rDis.
SetSlotFilter( SfxSlotFilterState::ENABLED_READONLY, aROIds );
668 if ( SfxItemState::DISABLED == eStateProtAll )
670 static sal_uInt16 aAllProtIds[] = { SID_SAVEDOC,
FN_EDIT_REGION };
671 static bool bAllProtFirst =
true;
675 bAllProtFirst =
false;
677 rDis.
SetSlotFilter( SfxSlotFilterState::ENABLED_READONLY, aAllProtIds );
681 else if ( SfxItemState::DISABLED != eStateRO ||
682 SfxItemState::DISABLED != eStateProtAll )
698 !
m_pWrtShell->GetDrawView()->GetMarkedObjectList().GetMarkCount() ))
699 nDisableFlags |= SfxDisableFlags::SwOnProtectedCursor;
701 if( (SfxDisableFlags::SwOnProtectedCursor & nDisableFlags ) !=
723 aCntxt.
SetOptions( SfxDisableFlags::SwOnProtectedCursor & nDisableFlags
726 InputContextFlags::ExtText ))
728 ( InputContextFlags::Text |
729 InputContextFlags::ExtText )) );
748 m_aTimer(
"sw::SwView m_aTimer" ),
749 m_nNewPage(USHRT_MAX),
751 m_pNumRuleNodeFromDoc(nullptr),
754 m_pFormShell(nullptr),
755 m_pHScrollbar(nullptr),
756 m_pVScrollbar(nullptr),
762 m_pLastTableFormat(nullptr),
763 m_pLastFlyFormat(nullptr),
767 m_nDrawSfxId( USHRT_MAX ),
768 m_nFormSfxId( USHRT_MAX ),
771 m_nLeftBorderDistance( 0 ),
772 m_nRightBorderDistance( 0 ),
773 m_eLastSearchCommand( static_cast<
SvxSearchCmd>(0xFFFF) ),
774 m_bWheelScrollInProgress(false),
775 m_bCenterCursor(false),
777 m_bTabColFromDoc(false),
778 m_bTabRowFromDoc(false),
779 m_bSetTabColFromDoc(false),
780 m_bSetTabRowFromDoc(false),
781 m_bAttrChgNotified(false),
782 m_bAttrChgNotifiedWithRegistrations(false),
783 m_bVerbsActive(false),
784 m_bDrawRotate(false),
785 m_bDrawSelMode(true),
786 m_bShowAtResize(true),
787 m_bInOuterResizePixel(false),
788 m_bInInnerResizePixel(false),
789 m_bPasteState(false),
790 m_bPasteSpecialState(false),
791 m_bInMailMerge(false),
793 m_bOldShellWasPagePreview(false),
794 m_bIsPreviewDoubleClick(false),
795 m_bMakeSelectionVisible(false),
796 m_bForceChangesToolbar(true),
797 m_nLOKPageUpDownOffset(0)
799 static bool bRequestDoubleBuffering = getenv(
"VCL_DOUBLEBUFFERING_ENABLE");
800 if (bRequestDoubleBuffering)
836 bool bWebDShell =
dynamic_cast<const SwWebDocShell*
>(&rDocSh) !=
nullptr;
846 bool bOldShellWasSrcView =
false;
853 pExistingSh = pOldSh;
863 else if (
dynamic_cast<const SwSrcView *
>(pExistingSh) !=
nullptr)
864 bOldShellWasSrcView =
true;
867 SAL_INFO(
"sw.ui",
"before create WrtShell" );
921 SAL_INFO(
"sw.ui",
"after create WrtShell" );
923 SvxRulerSupportFlags::TABS |
924 SvxRulerSupportFlags::PARAGRAPH_MARGINS |
925 SvxRulerSupportFlags::BORDERS |
926 SvxRulerSupportFlags::NEGATIVE_MARGINS|
927 SvxRulerSupportFlags::REDUCED_METRIC,
933 const bool bIsDocModified =
m_pWrtShell->GetDoc()->getIDocumentState().IsModified();
940 if( SfxObjectCreateMode::EMBEDDED != rDocSh.
GetCreateMode() )
984 if (rDocSh.
GetCreateMode() == SfxObjectCreateMode::EMBEDDED &&
990 "sw.ui",
"/org.openoffice.Office.Common/Undo/Steps <= 0");
996 const bool bBrowse =
m_pWrtShell->GetViewOptions()->getBrowseMode();
1012#if !ENABLE_WASM_STRIP_ACCESSIBILITY
1016 if(
m_pWrtShell->GetDoc()->getIDocumentState().IsUpdateExpField() )
1018 if (
m_pWrtShell->GetDoc()->GetDocumentFieldsManager().containsUpdatableFields())
1023 m_pWrtShell->GetDoc()->getIDocumentFieldsAccess().UpdateFields(
false);
1026 m_pWrtShell->GetDoc()->getIDocumentState().SetUpdateExpFieldStat(
false );
1047 if (!
m_pWrtShell->GetDoc()->GetIDocumentUndoRedo().IsUndoNoResetModified() &&
1048 ( !pFirst || pFirst == &rVFrame ) &&
1066 uno::Reference< frame::XFrame > xBeamerFrame =
xFrame->findFrame(
1067 "_beamer", frame::FrameSearchFlag::CHILDREN);
1068 if(xBeamerFrame.is())
1096 if (
m_pWrtShell->GetViewOptions()->IsShowOutlineContentVisibilityButton())
1097 m_pWrtShell->InvalidateOutlineContentVisibility();
1117 SW_MOD()->SetView(
nullptr);
1159 const bool bWasLocked = pDrawModel->
isLocked();
1160 pDrawModel->setLock(
true);
1162 pDrawModel->setLock(bWasLocked);
1172 static bool bRequestDoubleBuffering = getenv(
"VCL_DOUBLEBUFFERING_ENABLE");
1173 if (bRequestDoubleBuffering)
1183 return dynamic_cast<SwDocShell*
>( pDocShell );
1197 rUserData = OUString::number( rRect.
Left() );
1199 rUserData += OUString::number( rRect.
Top() );
1201 rUserData += OUString::number(
m_pWrtShell->GetViewOptions()->GetZoom() );
1203 rUserData += OUString::number( rVis.
Left() );
1205 rUserData += OUString::number( rVis.
Top() );
1211 rUserData += OUString::number(
1212 static_cast<sal_uInt16
>(
m_pWrtShell->GetViewOptions()->GetZoomType()));
1225 uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
1227 uno::Reference<document::XDocumentProperties> xDocProps
1228 = xDPS->getDocumentProperties();
1229 OUString Created = xDocProps->getAuthor();
1230 OUString
Changed = xDocProps->getModifiedBy();
1238 if ( !(rUserData.indexOf(
';')>=0 &&
1254 Point aCursorPos( nX, nY );
1256 sal_uInt16 nZoomFactor =
1265 if ( nBottom > (
m_pWrtShell->GetDocSize().Height()+nAdd) )
1274 if( !
m_pWrtShell->GetViewOptions()->getBrowseMode() )
1278 eZoom = SvxZoomType::PERCENT;
1286 m_pViewImpl->SetRestorePosition(aCursorPos, bSelectObj);
1288 bool bSavedFlagValue =
m_pWrtShell->IsMacroExecAllowed();
1294 m_pWrtShell->SwCursorShell::SetCursor( aCursorPos, !bSelectObj );
1303 m_pWrtShell->SetMacroExecAllowed( bSavedFlagValue );
1321 sal_Int32 nIdx{ 0 };
1324 Point aCursorPos2( nXTmp, nYTmp );
1325 bSelectObj =
m_pWrtShell->IsObjSelectable( aCursorPos2 );
1327 m_pWrtShell->SwCursorShell::SetCursor( aCursorPos2 );
1366 sal_Int64 nX = rRect.
Left(), nY = rRect.
Top(), nLeft = rVis.
Left(), nTop = rVis.
Top();
1367 sal_Int16 nZoomType =
static_cast< sal_Int16
>(pVOpt->
GetZoomType());
1368 sal_Int16 nZoomFactor =
static_cast < sal_Int16
> (pVOpt->
GetZoom());
1373 bGotVisibleLeft =
false,
1374 bGotVisibleTop =
false,
1375 bGotZoomType =
false,
1376 bGotZoomFactor =
false, bGotIsSelectedFrame =
false,
1377 bGotViewLayoutColumns =
false, bGotViewLayoutBookMode =
false,
1378 bBrowseMode =
false, bGotBrowseMode =
false;
1380 bool bGotKeepRatio =
false;
1382 for (
const beans::PropertyValue& rValue : rSequence)
1384 if ( rValue.Name ==
"ViewLeft" )
1386 rValue.Value >>= nX;
1389 else if ( rValue.Name ==
"ViewTop" )
1391 rValue.Value >>= nY;
1394 else if ( rValue.Name ==
"VisibleLeft" )
1396 rValue.Value >>= nLeft;
1398 bGotVisibleLeft =
true;
1400 else if ( rValue.Name ==
"VisibleTop" )
1402 rValue.Value >>= nTop;
1404 bGotVisibleTop =
true;
1406 else if ( rValue.Name ==
"ZoomType" )
1408 rValue.Value >>= nZoomType;
1409 bGotZoomType =
true;
1411 else if ( rValue.Name ==
"ZoomFactor" )
1413 rValue.Value >>= nZoomFactor;
1414 bGotZoomFactor =
true;
1416 else if ( rValue.Name ==
"ViewLayoutColumns" )
1418 rValue.Value >>= nViewLayoutColumns;
1419 bGotViewLayoutColumns =
true;
1421 else if ( rValue.Name ==
"ViewLayoutBookMode" )
1423 bViewLayoutBookMode = *o3tl::doAccess<bool>(rValue.Value);
1424 bGotViewLayoutBookMode =
true;
1426 else if ( rValue.Name ==
"IsSelectedFrame" )
1428 rValue.Value >>= bSelectedFrame;
1429 bGotIsSelectedFrame =
true;
1431 else if (rValue.Name ==
"ShowOnlineLayout")
1433 rValue.Value >>= bBrowseMode;
1434 bGotBrowseMode =
true;
1436 else if (rValue.Name ==
"KeepRatio")
1438 rValue.Value >>= bKeepRatio;
1439 bGotKeepRatio =
true;
1453 Point aCursorPos( nX, nY );
1458 if ( !
m_pWrtShell->GetViewOptions()->getBrowseMode() )
1459 eZoom =
static_cast < SvxZoomType > ( nZoomType );
1462 eZoom = SvxZoomType::PERCENT;
1464 if (bGotIsSelectedFrame)
1466 bool bSelectObj = bSelectedFrame &&
m_pWrtShell->IsObjSelectable( aCursorPos );
1469 bool bSavedFlagValue =
m_pWrtShell->IsMacroExecAllowed();
1473 m_pViewImpl->SetRestorePosition(aCursorPos, bSelectObj);
1476 m_pWrtShell->SwCursorShell::SetCursor( aCursorPos, !bSelectObj );
1479 bool bInHeader =
true;
1480 if (
m_pWrtShell->IsInHeaderFooter( &bInHeader ) )
1507 m_pWrtShell->SetMacroExecAllowed( bSavedFlagValue );
1510 if (bGotKeepRatio && bKeepRatio != pVOpt->
IsKeepRatio())
1515 SW_MOD()->ApplyUsrPref(aUsrPref,
this);
1519 const bool bSetViewLayoutSettings = bGotViewLayoutColumns && bGotViewLayoutBookMode &&
1522 const bool bSetViewSettings = bGotZoomType && bGotZoomFactor &&
1529 const bool bZoomNeedsViewLayout = bSetViewLayoutSettings &&
1530 1 < nViewLayoutColumns &&
1532 eZoom != SvxZoomType::PERCENT;
1534 if ( !bZoomNeedsViewLayout )
1537 if ( bSetViewLayoutSettings )
1538 SetViewLayout( nViewLayoutColumns, bViewLayoutBookMode,
true );
1540 if ( bZoomNeedsViewLayout )
1543 if ( bSetViewSettings )
1544 SetZoom( eZoom, nZoomFactor,
true );
1550 if ( bGotVisibleLeft && bGotVisibleTop )
1552 Point aTopLeft(nLeft, nTop);
1557 aTopLeft.setX( (
m_aDocSz.
Width() + lBorder - nEditWidth ) / 2 );
1562 if( aTopLeft.X() > nXMax )
1563 aTopLeft.setX( nXMax < 0 ? 0 : nXMax );
1581 std::vector<beans::PropertyValue> aVector;
1605 const sal_Int16 nZoomType =
static_cast< sal_Int16
>(
m_pWrtShell->GetViewOptions()->GetZoomType());
1608 const sal_Int16 nViewLayoutColumns =
static_cast< sal_Int16
>(
m_pWrtShell->GetViewOptions()->GetViewLayoutColumns());
1657 return bText ?
GetWrtShell().SwCursorShell::HasSelection()
1687 bool bCallBase =
true;
1690 bool bDesignMode = pChangedHint->GetDesignMode();
1696 AttrChangedNotify(
nullptr);
1707 case SfxHintId::Dying:
1715 case SfxHintId::ModeChanged:
1725 case SfxHintId::TitleChanged:
1751 SfxBoolItem aItem( SID_FM_DESIGN_MODE, !bReadonly);
1753 SfxCallMode::ASYNCHRON, { &aItem });
1757 case SfxHintId::SwDrawViewsCreated:
1765 SfxCallMode::SYNCHRON, { &aItem });
1769 case SfxHintId::RedlineChanged:
1771 static sal_uInt16
const aSlotRedLine[] = {
1791#if defined(_WIN32) || defined UNX
1795 uno::Reference< XScannerManager2 > xScanMgr =
SW_MOD()->GetScannerManager();
1798 const ScannerContext aContext( xScanMgr->getAvailableScanners().getConstArray()[ 0 ] );
1799 const ScanError eError = xScanMgr->getError( aContext );
1801 if( ScanError_ScanErrorNone == eError )
1803 const uno::Reference< awt::XBitmap > xBitmap( xScanMgr->getBitmap( aContext ) );
1812 m_pWrtShell->InsertGraphic( OUString(), OUString(), aGrf );
1841 rVFrame.
SetChildWindow( SwInputChild::GetChildWindowId(),
false );
1913 return aDataHelper.
HasFormat( SotClipboardFormatId::SYLK ) || aDataHelper.
HasFormat( SotClipboardFormatId::SYLK_BIGCAPS );
1939 return pVwSh->getLOKVisibleArea();
1947 pSh->FlushPendingLOKInvalidateTiles();
1953 return pSh->getLOKPayload(
nType, nViewId);
1955 return std::nullopt;
1960 uno::Reference<lang::XMultiServiceFactory>
xFactory(
GetDocShell()->GetModel(), uno::UNO_QUERY);
1961 uno::Reference<beans::XPropertySet> xSettings(
1962 xFactory->createInstance(
"com.sun.star.document.Settings"), uno::UNO_QUERY);
1963 OUString sDataSourceName =
"";
1964 xSettings->getPropertyValue(
"CurrentDatabaseDataSource") >>= sDataSourceName;
1966 return sDataSourceName;
1971 uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
1972 Reference< XDatabaseContext> xDatabaseContext = DatabaseContext::create(xContext);
1974 return xDatabaseContext->hasByName(sDataSourceName);
1981 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 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)
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 *)
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)