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;
321 if (eId != ToolbarId::None)
324 for ( sal_uInt16
i = 0;
true; ++
i )
327 if (
dynamic_cast< const SwBaseShell *
>( pSfxShell ) !=
nullptr
334 rDispatcher.
Pop( *pSfxShell, SfxDispatcherPopFlags::POP_DELETE );
336 else if (
dynamic_cast< const FmFormShell *
>( pSfxShell ) !=
nullptr )
338 rDispatcher.
Pop( *pSfxShell );
345 bool bInitFormShell =
false;
348 bInitFormShell =
true;
354 bool bSetExtInpCntxt =
false;
395#if HAVE_FEATURE_AVMEDIA
425 bSetExtInpCntxt =
true;
439 bSetExtInpCntxt =
true;
466 if( bSetExtInpCntxt &&
GetWrtShell().HasReadonlySel() )
467 bSetExtInpCntxt =
false;
472 ( InputContextFlags::Text |
473 InputContextFlags::ExtText ))
476 InputContextFlags::ExtText )) );
495 if ( bInitFormShell && pDView )
500 if (
GetDocShell()->GetDoc()->IsOLEPrtNotifyPending() )
520 static int lcl_CmpIds(
const void *pFirst,
const void *pSecond)
522 return *
static_cast<sal_uInt16
const *
>(pFirst) - *
static_cast<sal_uInt16
const *
>(pSecond);
528 if ( GetEditWin().IsChainMode() )
529 GetEditWin().SetChainMode(
false );
534 CheckReadonlyState();
537 CheckReadonlySelection();
539 if( !m_bAttrChgNotified )
545 m_bAttrChgNotified =
true;
549 GetObjectShell()->GetMedium()->GetItemSet()->
550 GetItemIfSet( SID_HIDDEN,
false );
553 GetViewFrame()->GetBindings().ENTERREGISTRATIONS();
554 m_bAttrChgNotifiedWithRegistrations =
true;
568 m_pPostItMgr->SetShadowState( m_pWrtShell->GetPostItFieldAtCursor() );
580 if ( m_bAttrChgNotifiedWithRegistrations )
582 GetViewFrame()->GetBindings().LEAVEREGISTRATIONS();
583 m_bAttrChgNotifiedWithRegistrations =
false;
586 CheckReadonlyState();
587 CheckReadonlySelection();
589 bool bOldUndo = m_pWrtShell->DoesUndo();
590 m_pWrtShell->DoUndo(
false );
592 m_pWrtShell->DoUndo( bOldUndo );
593 m_bAttrChgNotified =
false;
594 GetViewImpl()->GetUNOObject_Impl()->NotifySelChanged();
611 static sal_uInt16 aROIds[] =
615 SID_REDO, SID_REPEAT, SID_PASTE,
619 SID_CHARMAP, FN_INSERT_SOFT_HYPHEN,
620 FN_INSERT_HARDHYPHEN, FN_INSERT_HARD_SPACE, FN_INSERT_NNBSP,
631 SID_ATTR_PARA_ADJUST_RIGHT, SID_ATTR_PARA_ADJUST_CENTER,SID_ATTR_PARA_ADJUST_BLOCK,
632 SID_ATTR_PARA_LINESPACE_10, SID_ATTR_PARA_LINESPACE_15, SID_ATTR_PARA_LINESPACE_20,
633 SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_FONTHEIGHT, SID_ATTR_CHAR_COLOR_BACKGROUND,
634 SID_ATTR_CHAR_BACK_COLOR,
635 SID_ATTR_CHAR_COLOR_BACKGROUND_EXT, SID_ATTR_CHAR_COLOR_EXT,
636 SID_ATTR_CHAR_COLOR, SID_ATTR_CHAR_WEIGHT, SID_ATTR_CHAR_POSTURE,
637 SID_ATTR_CHAR_OVERLINE,
638 SID_ATTR_CHAR_UNDERLINE, SID_ATTR_FLASH, SID_ATTR_CHAR_STRIKEOUT,
639 SID_ULINE_VAL_SINGLE, SID_ULINE_VAL_DOUBLE, SID_ULINE_VAL_DOTTED,
640 SID_ATTR_CHAR_CONTOUR, SID_ATTR_CHAR_SHADOWED,
643 SID_ATTR_CHAR_KERNING, SID_CHAR_DLG, SID_ATTR_CHAR_WORDLINEMODE,
646 SID_ATTR_PARA_SPLIT, SID_ATTR_PARA_KEEP, SID_ATTR_PARA_WIDOWS,
647 SID_ATTR_PARA_ORPHANS,
648 SID_ATTR_PARA_MODEL, SID_PARA_DLG,
652 static bool bFirst =
true;
658 if ( SfxItemState::DISABLED == eStateRO )
660 rDis.
SetSlotFilter( SfxSlotFilterState::ENABLED_READONLY, aROIds );
666 if ( SfxItemState::DISABLED == eStateProtAll )
668 static sal_uInt16 aAllProtIds[] = { SID_SAVEDOC,
FN_EDIT_REGION };
669 static bool bAllProtFirst =
true;
673 bAllProtFirst =
false;
675 rDis.
SetSlotFilter( SfxSlotFilterState::ENABLED_READONLY, aAllProtIds );
679 else if ( SfxItemState::DISABLED != eStateRO ||
680 SfxItemState::DISABLED != eStateProtAll )
696 !
m_pWrtShell->GetDrawView()->GetMarkedObjectList().GetMarkCount() ))
697 nDisableFlags |= SfxDisableFlags::SwOnProtectedCursor;
699 if( (SfxDisableFlags::SwOnProtectedCursor & nDisableFlags ) !=
721 aCntxt.
SetOptions( SfxDisableFlags::SwOnProtectedCursor & nDisableFlags
724 InputContextFlags::ExtText ))
726 ( InputContextFlags::Text |
727 InputContextFlags::ExtText )) );
746 m_aTimer(
"sw::SwView m_aTimer" ),
747 m_nNewPage(USHRT_MAX),
749 m_pNumRuleNodeFromDoc(nullptr),
752 m_pFormShell(nullptr),
753 m_pHScrollbar(nullptr),
754 m_pVScrollbar(nullptr),
760 m_pLastTableFormat(nullptr),
761 m_pLastFlyFormat(nullptr),
765 m_nDrawSfxId( USHRT_MAX ),
766 m_nFormSfxId( USHRT_MAX ),
769 m_nLeftBorderDistance( 0 ),
770 m_nRightBorderDistance( 0 ),
771 m_eLastSearchCommand( static_cast<
SvxSearchCmd>(0xFFFF) ),
772 m_bWheelScrollInProgress(false),
773 m_bCenterCursor(false),
775 m_bTabColFromDoc(false),
776 m_bTabRowFromDoc(false),
777 m_bSetTabColFromDoc(false),
778 m_bSetTabRowFromDoc(false),
779 m_bAttrChgNotified(false),
780 m_bAttrChgNotifiedWithRegistrations(false),
781 m_bVerbsActive(false),
782 m_bDrawRotate(false),
783 m_bDrawSelMode(true),
784 m_bShowAtResize(true),
785 m_bInOuterResizePixel(false),
786 m_bInInnerResizePixel(false),
787 m_bPasteState(false),
788 m_bPasteSpecialState(false),
789 m_bInMailMerge(false),
791 m_bOldShellWasPagePreview(false),
792 m_bIsPreviewDoubleClick(false),
793 m_bMakeSelectionVisible(false),
794 m_bForceChangesToolbar(true),
795 m_nLOKPageUpDownOffset(0)
797 static bool bRequestDoubleBuffering = getenv(
"VCL_DOUBLEBUFFERING_ENABLE");
798 if (bRequestDoubleBuffering)
829 bool bWebDShell =
dynamic_cast<const SwWebDocShell*
>(&rDocSh) !=
nullptr;
839 bool bOldShellWasSrcView =
false;
846 pExistingSh = pOldSh;
856 else if (
dynamic_cast<const SwSrcView *
>(pExistingSh) !=
nullptr)
857 bOldShellWasSrcView =
true;
860 SAL_INFO(
"sw.ui",
"before create WrtShell" );
914 SAL_INFO(
"sw.ui",
"after create WrtShell" );
916 SvxRulerSupportFlags::TABS |
917 SvxRulerSupportFlags::PARAGRAPH_MARGINS |
918 SvxRulerSupportFlags::BORDERS |
919 SvxRulerSupportFlags::NEGATIVE_MARGINS|
920 SvxRulerSupportFlags::REDUCED_METRIC,
926 const bool bIsDocModified =
m_pWrtShell->GetDoc()->getIDocumentState().IsModified();
933 if( SfxObjectCreateMode::EMBEDDED != rDocSh.
GetCreateMode() )
977 if (rDocSh.
GetCreateMode() == SfxObjectCreateMode::EMBEDDED &&
983 "sw.ui",
"/org.openoffice.Office.Common/Undo/Steps <= 0");
989 const bool bBrowse =
m_pWrtShell->GetViewOptions()->getBrowseMode();
1004#if !ENABLE_WASM_STRIP_ACCESSIBILITY
1008 if(
m_pWrtShell->GetDoc()->getIDocumentState().IsUpdateExpField() )
1010 if (
m_pWrtShell->GetDoc()->GetDocumentFieldsManager().containsUpdatableFields())
1015 m_pWrtShell->GetDoc()->getIDocumentFieldsAccess().UpdateFields(
false);
1018 m_pWrtShell->GetDoc()->getIDocumentState().SetUpdateExpFieldStat(
false );
1039 if (!
m_pWrtShell->GetDoc()->GetIDocumentUndoRedo().IsUndoNoResetModified() &&
1040 ( !pFirst || pFirst == pVFrame ) &&
1058 uno::Reference< frame::XFrame > xBeamerFrame =
xFrame->findFrame(
1059 "_beamer", frame::FrameSearchFlag::CHILDREN);
1060 if(xBeamerFrame.is())
1085 if (
m_pWrtShell->GetViewOptions()->IsShowOutlineContentVisibilityButton())
1086 m_pWrtShell->InvalidateOutlineContentVisibility();
1105 SW_MOD()->SetView(
nullptr);
1153 static bool bRequestDoubleBuffering = getenv(
"VCL_DOUBLEBUFFERING_ENABLE");
1154 if (bRequestDoubleBuffering)
1164 return dynamic_cast<SwDocShell*
>( pDocShell );
1178 rUserData = OUString::number( rRect.
Left() );
1180 rUserData += OUString::number( rRect.
Top() );
1182 rUserData += OUString::number(
m_pWrtShell->GetViewOptions()->GetZoom() );
1184 rUserData += OUString::number( rVis.
Left() );
1186 rUserData += OUString::number( rVis.
Top() );
1192 rUserData += OUString::number(
1193 static_cast<sal_uInt16
>(
m_pWrtShell->GetViewOptions()->GetZoomType()));
1202 uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
1204 uno::Reference<document::XDocumentProperties> xDocProps
1205 = xDPS->getDocumentProperties();
1206 OUString Created = xDocProps->getAuthor();
1207 OUString
Changed = xDocProps->getModifiedBy();
1215 if ( !(rUserData.indexOf(
';')>=0 &&
1231 Point aCursorPos( nX, nY );
1233 sal_uInt16 nZoomFactor =
1242 if ( nBottom > (
m_pWrtShell->GetDocSize().Height()+nAdd) )
1251 if( !
m_pWrtShell->GetViewOptions()->getBrowseMode() )
1255 eZoom = SvxZoomType::PERCENT;
1263 m_pViewImpl->SetRestorePosition(aCursorPos, bSelectObj);
1265 bool bSavedFlagValue =
m_pWrtShell->IsMacroExecAllowed();
1271 m_pWrtShell->SwCursorShell::SetCursor( aCursorPos, !bSelectObj );
1280 m_pWrtShell->SetMacroExecAllowed( bSavedFlagValue );
1298 sal_Int32 nIdx{ 0 };
1301 Point aCursorPos2( nXTmp, nYTmp );
1302 bSelectObj =
m_pWrtShell->IsObjSelectable( aCursorPos2 );
1304 m_pWrtShell->SwCursorShell::SetCursor( aCursorPos2 );
1343 sal_Int64 nX = rRect.
Left(), nY = rRect.
Top(), nLeft = rVis.
Left(), nTop = rVis.
Top();
1344 sal_Int16 nZoomType =
static_cast< sal_Int16
>(pVOpt->
GetZoomType());
1345 sal_Int16 nZoomFactor =
static_cast < sal_Int16
> (pVOpt->
GetZoom());
1351 bGotVisibleLeft =
false,
1352 bGotVisibleTop =
false,
1353 bGotZoomType =
false,
1354 bGotZoomFactor =
false, bGotIsSelectedFrame =
false,
1355 bGotViewLayoutColumns =
false, bGotViewLayoutBookMode =
false,
1356 bGotHideWhitespace =
false,
1357 bBrowseMode =
false, bGotBrowseMode =
false;
1359 bool bGotKeepRatio =
false;
1361 for (
const beans::PropertyValue& rValue : rSequence)
1363 if ( rValue.Name ==
"ViewLeft" )
1365 rValue.Value >>= nX;
1368 else if ( rValue.Name ==
"ViewTop" )
1370 rValue.Value >>= nY;
1373 else if ( rValue.Name ==
"VisibleLeft" )
1375 rValue.Value >>= nLeft;
1377 bGotVisibleLeft =
true;
1379 else if ( rValue.Name ==
"VisibleTop" )
1381 rValue.Value >>= nTop;
1383 bGotVisibleTop =
true;
1385 else if ( rValue.Name ==
"ZoomType" )
1387 rValue.Value >>= nZoomType;
1388 bGotZoomType =
true;
1390 else if ( rValue.Name ==
"ZoomFactor" )
1392 rValue.Value >>= nZoomFactor;
1393 bGotZoomFactor =
true;
1395 else if ( rValue.Name ==
"ViewLayoutColumns" )
1397 rValue.Value >>= nViewLayoutColumns;
1398 bGotViewLayoutColumns =
true;
1400 else if ( rValue.Name ==
"ViewLayoutBookMode" )
1402 bViewLayoutBookMode = *o3tl::doAccess<bool>(rValue.Value);
1403 bGotViewLayoutBookMode =
true;
1405 else if ( rValue.Name ==
"IsSelectedFrame" )
1407 rValue.Value >>= bSelectedFrame;
1408 bGotIsSelectedFrame =
true;
1410 else if (rValue.Name ==
"ShowOnlineLayout")
1412 rValue.Value >>= bBrowseMode;
1413 bGotBrowseMode =
true;
1415 else if (rValue.Name ==
"KeepRatio")
1417 rValue.Value >>= bKeepRatio;
1418 bGotKeepRatio =
true;
1420 else if (rValue.Name ==
"HideWhitespace")
1422 rValue.Value >>= bHideWhitespace;
1423 bGotHideWhitespace =
true;
1437 Point aCursorPos( nX, nY );
1442 if ( !
m_pWrtShell->GetViewOptions()->getBrowseMode() )
1443 eZoom =
static_cast < SvxZoomType > ( nZoomType );
1446 eZoom = SvxZoomType::PERCENT;
1448 if (bGotIsSelectedFrame)
1450 bool bSelectObj = bSelectedFrame &&
m_pWrtShell->IsObjSelectable( aCursorPos );
1453 bool bSavedFlagValue =
m_pWrtShell->IsMacroExecAllowed();
1457 m_pViewImpl->SetRestorePosition(aCursorPos, bSelectObj);
1460 m_pWrtShell->SwCursorShell::SetCursor( aCursorPos, !bSelectObj );
1463 bool bInHeader =
true;
1464 if (
m_pWrtShell->IsInHeaderFooter( &bInHeader ) )
1491 m_pWrtShell->SetMacroExecAllowed( bSavedFlagValue );
1495 bool bUsrPrefModified =
false;
1496 if (bGotKeepRatio && bKeepRatio != pVOpt->
IsKeepRatio())
1500 bUsrPrefModified =
true;
1505 bUsrPrefModified =
true;
1507 if (bUsrPrefModified)
1509 SW_MOD()->ApplyUsrPref(aUsrPref,
this);
1513 const bool bSetViewLayoutSettings = bGotViewLayoutColumns && bGotViewLayoutBookMode &&
1516 const bool bSetViewSettings = bGotZoomType && bGotZoomFactor &&
1523 const bool bZoomNeedsViewLayout = bSetViewLayoutSettings &&
1524 1 < nViewLayoutColumns &&
1526 eZoom != SvxZoomType::PERCENT;
1528 if ( !bZoomNeedsViewLayout )
1531 if ( bSetViewLayoutSettings )
1532 SetViewLayout( nViewLayoutColumns, bViewLayoutBookMode,
true );
1534 if ( bZoomNeedsViewLayout )
1537 if ( bSetViewSettings )
1538 SetZoom( eZoom, nZoomFactor,
true );
1544 if ( bGotVisibleLeft && bGotVisibleTop )
1546 Point aTopLeft(nLeft, nTop);
1551 aTopLeft.setX( (
m_aDocSz.
Width() + lBorder - nEditWidth ) / 2 );
1556 if( aTopLeft.X() > nXMax )
1557 aTopLeft.setX( nXMax < 0 ? 0 : nXMax );
1575 std::vector<beans::PropertyValue> aVector;
1599 const sal_Int16 nZoomType =
static_cast< sal_Int16
>(
m_pWrtShell->GetViewOptions()->GetZoomType());
1602 const sal_Int16 nViewLayoutColumns =
static_cast< sal_Int16
>(
m_pWrtShell->GetViewOptions()->GetViewLayoutColumns());
1615 "HideWhitespace",
m_pWrtShell->GetViewOptions()->IsHideWhitespaceMode()));
1654 return bText ?
GetWrtShell().SwCursorShell::HasSelection()
1684 bool bCallBase =
true;
1687 bool bDesignMode = pChangedHint->GetDesignMode();
1693 AttrChangedNotify(
nullptr);
1704 case SfxHintId::Dying:
1712 case SfxHintId::ModeChanged:
1722 case SfxHintId::TitleChanged:
1748 SfxBoolItem aItem( SID_FM_DESIGN_MODE, !bReadonly);
1750 SfxCallMode::ASYNCHRON, { &aItem });
1754 case SfxHintId::SwDrawViewsCreated:
1762 SfxCallMode::SYNCHRON, { &aItem });
1766 case SfxHintId::RedlineChanged:
1768 static sal_uInt16
const aSlotRedLine[] = {
1788#if defined(_WIN32) || defined UNX
1792 uno::Reference< XScannerManager2 > xScanMgr =
SW_MOD()->GetScannerManager();
1795 const ScannerContext aContext( xScanMgr->getAvailableScanners().getConstArray()[ 0 ] );
1796 const ScanError eError = xScanMgr->getError( aContext );
1798 if( ScanError_ScanErrorNone == eError )
1800 const uno::Reference< awt::XBitmap > xBitmap( xScanMgr->getBitmap( aContext ) );
1809 m_pWrtShell->InsertGraphic( OUString(), OUString(), aGrf );
1838 pVFrame->
SetChildWindow( SwInputChild::GetChildWindowId(),
false );
1910 return aDataHelper.
HasFormat( SotClipboardFormatId::SYLK ) || aDataHelper.
HasFormat( SotClipboardFormatId::SYLK_BIGCAPS );
1958 uno::Reference<lang::XMultiServiceFactory>
xFactory(
GetDocShell()->GetModel(), uno::UNO_QUERY);
1959 uno::Reference<beans::XPropertySet> xSettings(
1960 xFactory->createInstance(
"com.sun.star.document.Settings"), uno::UNO_QUERY);
1961 OUString sDataSourceName =
"";
1962 xSettings->getPropertyValue(
"CurrentDatabaseDataSource") >>= sDataSourceName;
1964 return sDataSourceName;
1969 uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
1970 Reference< XDatabaseContext> xDatabaseContext = DatabaseContext::create(xContext);
1972 return xDatabaseContext->hasByName(sDataSourceName);
1979 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)
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
SfxViewFrame * GetViewFrame() const
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 IsHideWhitespaceMode() const
void SetHideWhitespaceMode(bool bMode)
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 tools::Rectangle & getLOKVisibleArea() const
The visible area in the client (set by setClientVisibleArea).
void FlushPendingLOKInvalidateTiles()
void AddTransferable(SwTransferable &rTransferable)
SwXTextView * GetUNOObject_Impl()
virtual bool PrepareClose(bool bUI=true) override
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
SwView(SfxViewFrame *pFrame, SfxViewShell *)
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.
std::optional< OString > getLOKPayload(int nType, int nViewId) const
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)